@x-wave/blog 2.1.8 → 2.2.1
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 +898 -917
- package/package.json +1 -1
- package/styles/index.css +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 pe, Navigate as qe, Routes as Xe, Route as xe } from "react-router-dom";
|
|
4
|
+
import { CaretLeft as Ye, CaretRight as Oe, ArrowSquareOut as Ve, User as Je, CalendarBlank as Ze, X as ve, Tag as et, MagnifyingGlass as Se, List as tt, Sun as Pe, Moon as Me, Monitor as Be, CaretDown as _e, 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 We } from "react-dom";
|
|
10
|
+
const lt = "_tabContainer_zk6h4_1", it = "_tab_zk6h4_1", dt = "_active_zk6h4_45", ae = {
|
|
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(), m = a ? `?${a}` : "";
|
|
23
|
+
c(`${s.pathname}${m}${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: ae.tabContainer, children: [
|
|
32
32
|
/* @__PURE__ */ e(
|
|
33
33
|
"button",
|
|
34
34
|
{
|
|
35
35
|
type: "button",
|
|
36
|
-
className: `${
|
|
37
|
-
onClick:
|
|
36
|
+
className: `${ae.tab} ${r ? "" : ae.active}`,
|
|
37
|
+
onClick: _,
|
|
38
38
|
children: n("ui.simple")
|
|
39
39
|
}
|
|
40
40
|
),
|
|
@@ -42,393 +42,444 @@ function ht({ hasAdvanced: t }) {
|
|
|
42
42
|
"button",
|
|
43
43
|
{
|
|
44
44
|
type: "button",
|
|
45
|
-
className: `${
|
|
46
|
-
onClick:
|
|
45
|
+
className: `${ae.tab} ${r ? ae.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 He(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 = {}, m = u[1];
|
|
61
|
+
let o = "", l = !1;
|
|
62
|
+
const v = [];
|
|
63
|
+
for (const g of m.split(`
|
|
63
64
|
`)) {
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
68
|
-
|
|
65
|
+
const k = g.trim();
|
|
66
|
+
if (k.startsWith("-")) {
|
|
67
|
+
if (l) {
|
|
68
|
+
const f = k.substring(1).trim();
|
|
69
|
+
v.push(f);
|
|
69
70
|
}
|
|
70
71
|
continue;
|
|
71
72
|
}
|
|
72
|
-
if (
|
|
73
|
-
const [
|
|
74
|
-
if (
|
|
75
|
-
|
|
73
|
+
if (l && !k.startsWith("-") && (a[o] = v.slice(), v.length = 0, l = !1), k != null && k.includes(":")) {
|
|
74
|
+
const [f, ...b] = k.split(":"), y = b.join(":").trim();
|
|
75
|
+
if (o = f.trim(), !y) {
|
|
76
|
+
l = !0;
|
|
76
77
|
continue;
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
+
y === "true" ? a[o] = !0 : y === "false" ? a[o] = !1 : a[o] = y;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
-
const
|
|
82
|
+
l && v.length > 0 && (a[o] = v);
|
|
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 h(d, u, a) {
|
|
93
|
+
const m = typeof d.title == "string" ? d.title : void 0;
|
|
94
|
+
if (m) return m;
|
|
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
|
+
(m) => m.startsWith(u)
|
|
101
|
+
);
|
|
102
|
+
for (const m of a)
|
|
103
|
+
if (!(m.split("/").pop() || "").endsWith("-advanced.mdx"))
|
|
104
|
+
try {
|
|
105
|
+
const l = t[m], v = await l(), { frontmatter: w, content: g } = s(v), k = c(m), f = h(w, g, k);
|
|
106
|
+
yield { slug: k, title: f, frontmatter: w, content: g, filePath: m };
|
|
107
|
+
} catch (l) {
|
|
108
|
+
console.warn(`Failed to process ${m}:`, l);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async function _(d) {
|
|
112
|
+
const u = n.get(d);
|
|
113
|
+
if (u) return u;
|
|
114
|
+
const a = (async () => {
|
|
115
|
+
const m = [];
|
|
116
|
+
for await (const o of r(d))
|
|
117
|
+
m.push({
|
|
118
|
+
slug: o.slug,
|
|
119
|
+
title: o.title,
|
|
120
|
+
frontmatter: o.frontmatter
|
|
121
|
+
});
|
|
122
|
+
return m.sort((o, l) => {
|
|
123
|
+
const v = o.frontmatter.date, w = l.frontmatter.date, g = v ? new Date(v).getTime() : null, k = w ? new Date(w).getTime() : null, f = g !== null && !Number.isNaN(g) ? g : null, b = k !== null && !Number.isNaN(k) ? k : null;
|
|
124
|
+
return f !== null && b !== null ? f !== b ? b - f : o.title.localeCompare(l.title) : f !== null ? -1 : b !== null ? 1 : o.title.localeCompare(l.title);
|
|
125
|
+
}), m;
|
|
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 (!
|
|
96
|
-
const
|
|
97
|
-
return { content:
|
|
136
|
+
async loadMDXContent(d, u, a = !1) {
|
|
137
|
+
const m = a ? `${u}-advanced.mdx` : `${u}.mdx`, o = `./docs/${d}/${m}`, l = t[o];
|
|
138
|
+
if (!l) throw new Error(`File not found: ${o}`);
|
|
139
|
+
const v = await l(), { frontmatter: w, content: g } = s(v);
|
|
140
|
+
return { content: g, 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
|
|
107
|
-
return
|
|
146
|
+
async loadEnglishContent(d, u = !1) {
|
|
147
|
+
const m = `./docs/en/${u ? `${d}-advanced.mdx` : `${d}.mdx`}`, o = t[m];
|
|
148
|
+
if (!o) throw new Error(`File not found: ${m}`);
|
|
149
|
+
const l = await o(), { content: v } = s(l);
|
|
150
|
+
return v;
|
|
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 m of u) {
|
|
162
|
+
const o = m.frontmatter.tags;
|
|
163
|
+
if (o && Array.isArray(o))
|
|
164
|
+
for (const l of o)
|
|
165
|
+
a[l] || (a[l] = []), a[l].some((v) => v.slug === m.slug) || a[l].push({ slug: m.slug, title: m.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 = He(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 Ee = "app-theme", Fe = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", Ae = (t) => t === "system" ? Fe() : t, ze = (t) => {
|
|
197
|
+
const n = () => t || (typeof window > "u" ? "system" : localStorage.getItem(Ee) || "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(), m = document.querySelector(".xw-blog-root");
|
|
203
|
+
m && (m.classList.remove("light", "dark"), m.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(Ee, 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, De = (t) => "items" in t, _t = async (t, n, s) => {
|
|
215
|
+
const c = [];
|
|
216
|
+
for (const h of t)
|
|
217
|
+
if (mt(h)) {
|
|
218
|
+
const r = [];
|
|
219
|
+
for (const d of h.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)(h.title);
|
|
233
|
+
c.push({
|
|
234
|
+
title: _,
|
|
235
|
+
items: r,
|
|
236
|
+
...h.defaultOpen !== void 0 && {
|
|
237
|
+
defaultOpen: h.defaultOpen
|
|
185
238
|
}
|
|
186
239
|
});
|
|
187
240
|
} else
|
|
188
241
|
try {
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
...
|
|
192
|
-
title:
|
|
242
|
+
const r = await s(n, h.slug, !1), _ = typeof r.frontmatter.title == "string" ? r.frontmatter.title : h.slug;
|
|
243
|
+
c.push({
|
|
244
|
+
...h,
|
|
245
|
+
title: _
|
|
193
246
|
});
|
|
194
247
|
} catch {
|
|
195
|
-
|
|
196
|
-
...
|
|
197
|
-
title:
|
|
248
|
+
c.push({
|
|
249
|
+
...h,
|
|
250
|
+
title: h.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
|
+
}, Ke = 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
|
+
ze(n.defaultTheme);
|
|
270
|
+
const [h, r] = T({});
|
|
271
|
+
S(() => {
|
|
272
|
+
const { buildTagIndex: d } = He(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 m = await d(a);
|
|
275
|
+
return { language: a, index: m };
|
|
276
|
+
} catch (m) {
|
|
277
|
+
return console.error(`Failed to build tag index for ${a}:`, m), { 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 m = {};
|
|
282
|
+
for (const o of a)
|
|
283
|
+
m[o.language] = o.index;
|
|
284
|
+
r(m);
|
|
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: h };
|
|
240
290
|
return /* @__PURE__ */ e(
|
|
241
|
-
|
|
291
|
+
Ke.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(Ke);
|
|
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 Ue(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 h of c)
|
|
320
|
+
h === "advanced" ? n.advanced = !0 : h.startsWith("a=") && (n.anchor = h.substring(2));
|
|
270
321
|
return n;
|
|
271
322
|
}
|
|
272
|
-
function
|
|
273
|
-
const
|
|
274
|
-
if (
|
|
275
|
-
const
|
|
323
|
+
function je(t, n = 80) {
|
|
324
|
+
const s = document.getElementById(t);
|
|
325
|
+
if (s) {
|
|
326
|
+
const h = s.getBoundingClientRect().top + window.pageYOffset - n;
|
|
276
327
|
window.scrollTo({
|
|
277
|
-
top:
|
|
328
|
+
top: h,
|
|
278
329
|
behavior: "smooth"
|
|
279
330
|
});
|
|
280
331
|
}
|
|
281
332
|
}
|
|
282
|
-
function
|
|
283
|
-
const
|
|
284
|
-
|
|
333
|
+
function vt(t, n = !1) {
|
|
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
|
-
function
|
|
337
|
+
function ft(t = "smooth") {
|
|
287
338
|
window.scrollTo({
|
|
288
339
|
top: 0,
|
|
289
340
|
left: 0,
|
|
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",
|
|
344
|
+
const bt = "_articleNavigation_kz84g_1", kt = "_navContainer_kz84g_7", Nt = "_navLink_kz84g_24", wt = "_navLinkContent_kz84g_61", It = "_navIcon_kz84g_76", yt = "_navText_kz84g_83", $t = "_navLabel_kz84g_90", Ct = "_navTitle_kz84g_98", q = {
|
|
294
345
|
articleNavigation: bt,
|
|
295
346
|
navContainer: kt,
|
|
296
347
|
navLink: Nt,
|
|
297
348
|
navLinkContent: wt,
|
|
298
349
|
navIcon: It,
|
|
299
|
-
navText:
|
|
300
|
-
navLabel:
|
|
301
|
-
navTitle:
|
|
350
|
+
navText: yt,
|
|
351
|
+
navLabel: $t,
|
|
352
|
+
navTitle: Ct
|
|
302
353
|
};
|
|
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: h
|
|
309
360
|
}) {
|
|
310
|
-
const { t:
|
|
311
|
-
const
|
|
312
|
-
return
|
|
361
|
+
const { t: r } = j(), { config: _ } = R(), d = Y(), a = Ue(d.search).advanced, m = _.basePath || "", o = (v) => {
|
|
362
|
+
const w = `${m}/${h}/${v}`;
|
|
363
|
+
return a ? `${w}?advanced=true` : w;
|
|
313
364
|
};
|
|
314
|
-
if (!t && !
|
|
365
|
+
if (!t && !s)
|
|
315
366
|
return null;
|
|
316
|
-
const
|
|
317
|
-
|
|
367
|
+
const l = () => {
|
|
368
|
+
ft("auto");
|
|
318
369
|
};
|
|
319
|
-
return /* @__PURE__ */ e("nav", { className: q.articleNavigation, "aria-label": "Article navigation", children: /* @__PURE__ */
|
|
370
|
+
return /* @__PURE__ */ e("nav", { className: q.articleNavigation, "aria-label": "Article navigation", children: /* @__PURE__ */ i("div", { className: q.navContainer, children: [
|
|
320
371
|
t ? /* @__PURE__ */ e(
|
|
321
|
-
|
|
372
|
+
de,
|
|
322
373
|
{
|
|
323
|
-
to:
|
|
374
|
+
to: o(t),
|
|
324
375
|
className: q.navLink,
|
|
325
|
-
onClick:
|
|
326
|
-
children: /* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */ e("div", { className: q.navIcon, children: /* @__PURE__ */ e(
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
-
/* @__PURE__ */ e("span", { className: q.navLabel, children:
|
|
376
|
+
onClick: l,
|
|
377
|
+
children: /* @__PURE__ */ i("div", { className: q.navLinkContent, children: [
|
|
378
|
+
/* @__PURE__ */ e("div", { className: q.navIcon, children: /* @__PURE__ */ e(Ye, { size: 20, weight: "bold" }) }),
|
|
379
|
+
/* @__PURE__ */ i("div", { className: q.navText, children: [
|
|
380
|
+
/* @__PURE__ */ e("span", { className: q.navLabel, children: r("nav.previous") }),
|
|
330
381
|
/* @__PURE__ */ e("span", { className: q.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:
|
|
389
|
+
to: o(s),
|
|
339
390
|
className: q.navLink,
|
|
340
|
-
onClick:
|
|
341
|
-
children: /* @__PURE__ */
|
|
342
|
-
/* @__PURE__ */
|
|
343
|
-
/* @__PURE__ */ e("span", { className: q.navLabel, children:
|
|
344
|
-
/* @__PURE__ */ e("span", { className: q.navTitle, children:
|
|
391
|
+
onClick: l,
|
|
392
|
+
children: /* @__PURE__ */ i("div", { className: q.navLinkContent, children: [
|
|
393
|
+
/* @__PURE__ */ i("div", { className: q.navText, children: [
|
|
394
|
+
/* @__PURE__ */ e("span", { className: q.navLabel, children: r("nav.next") }),
|
|
395
|
+
/* @__PURE__ */ e("span", { className: q.navTitle, children: c || s })
|
|
345
396
|
] }),
|
|
346
|
-
/* @__PURE__ */ e("div", { className: q.navIcon, children: /* @__PURE__ */ e(
|
|
397
|
+
/* @__PURE__ */ e("div", { className: q.navIcon, children: /* @__PURE__ */ e(Oe, { 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", oe = {
|
|
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: oe.blogSidebar, children: /* @__PURE__ */ i("div", { className: oe.section, children: [
|
|
413
|
+
/* @__PURE__ */ e("h3", { className: oe.sectionTitle, children: t("ui.connect") }),
|
|
414
|
+
/* @__PURE__ */ e("div", { className: oe.linksList, children: s.map((c, h) => {
|
|
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: oe.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
|
+
h
|
|
378
429
|
);
|
|
379
430
|
}) })
|
|
380
431
|
] }) });
|
|
381
432
|
}
|
|
382
|
-
const
|
|
383
|
-
breadcrumb:
|
|
384
|
-
breadcrumbList:
|
|
385
|
-
breadcrumbItem:
|
|
386
|
-
breadcrumbLink:
|
|
387
|
-
breadcrumbSeparator:
|
|
388
|
-
breadcrumbCurrent:
|
|
433
|
+
const Et = "_breadcrumb_rarc4_1", At = "_breadcrumbList_rarc4_5", Dt = "_breadcrumbItem_rarc4_15", jt = "_breadcrumbLink_rarc4_21", Rt = "_breadcrumbSeparator_rarc4_41", qt = "_breadcrumbCurrent_rarc4_46", X = {
|
|
434
|
+
breadcrumb: Et,
|
|
435
|
+
breadcrumbList: At,
|
|
436
|
+
breadcrumbItem: Dt,
|
|
437
|
+
breadcrumbLink: jt,
|
|
438
|
+
breadcrumbSeparator: Rt,
|
|
439
|
+
breadcrumbCurrent: qt
|
|
389
440
|
};
|
|
390
|
-
function
|
|
391
|
-
const { t:
|
|
392
|
-
|
|
393
|
-
}, u = (
|
|
394
|
-
return /* @__PURE__ */ e("nav", { className: X.breadcrumb, "aria-label": "Breadcrumb", children: /* @__PURE__ */
|
|
441
|
+
function Ot({ articleTitle: t, language: n }) {
|
|
442
|
+
const { t: s } = j(), { config: c } = R(), h = Q(), _ = `${c.basePath || ""}/${n}`, d = (a) => {
|
|
443
|
+
a.preventDefault(), window.scrollTo({ top: 0, left: 0, behavior: "auto" }), h(_);
|
|
444
|
+
}, u = (a, m = 60) => a.length <= m ? a : `${a.substring(0, m)}…`;
|
|
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",
|
|
461
|
+
const Wt = "_metadata_bsge0_1", Ht = "_author_bsge0_9", Ft = "_date_bsge0_10", me = {
|
|
411
462
|
metadata: Wt,
|
|
412
463
|
author: Ht,
|
|
413
|
-
date:
|
|
464
|
+
date: Ft
|
|
414
465
|
};
|
|
415
|
-
function
|
|
416
|
-
const { t:
|
|
417
|
-
return !t && !n ? null : /* @__PURE__ */
|
|
418
|
-
n && /* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */ e(
|
|
466
|
+
function ge({ date: t, author: n }) {
|
|
467
|
+
const { t: s } = j();
|
|
468
|
+
return !t && !n ? null : /* @__PURE__ */ i("div", { className: me.metadata, children: [
|
|
469
|
+
n && /* @__PURE__ */ i("span", { className: me.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: me.date, children: [
|
|
474
|
+
/* @__PURE__ */ e(Ze, { size: 16, weight: "regular" }),
|
|
475
|
+
s("ui.lastEdited"),
|
|
425
476
|
": ",
|
|
426
477
|
t
|
|
427
478
|
] })
|
|
428
479
|
] });
|
|
429
480
|
}
|
|
430
|
-
const
|
|
431
|
-
tableOfContents:
|
|
481
|
+
const zt = "_tableOfContents_9ofak_1", Kt = "_header_9ofak_21", Ut = "_title_9ofak_25", Gt = "_nav_9ofak_34", Qt = "_list_9ofak_40", Xt = "_link_9ofak_47", Yt = "_active_9ofak_71", Vt = "_level1_9ofak_87", Jt = "_level2_9ofak_93", Zt = "_level3_9ofak_98", en = "_level4_9ofak_104", tn = "_level5_9ofak_110", nn = "_level6_9ofak_116", F = {
|
|
482
|
+
tableOfContents: zt,
|
|
432
483
|
header: Kt,
|
|
433
484
|
title: Ut,
|
|
434
485
|
nav: Gt,
|
|
@@ -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(), h = 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 l = /^(#{1,6})\s+(.+)$/gm, v = [];
|
|
504
|
+
let w = l.exec(t);
|
|
505
|
+
const g = [];
|
|
506
|
+
for (; w !== null; ) {
|
|
507
|
+
const y = w[1].length, P = w[2].trim();
|
|
508
|
+
g.push({ level: y, text: P }), w = l.exec(t);
|
|
458
509
|
}
|
|
459
|
-
const
|
|
460
|
-
let f =
|
|
461
|
-
for (; f !== null &&
|
|
462
|
-
const
|
|
510
|
+
const k = /^(#{1,6})\s+(.+)$/gm;
|
|
511
|
+
let f = k.exec(n), b = 0;
|
|
512
|
+
for (; f !== null && b < g.length; ) {
|
|
513
|
+
const y = f[2].trim(), P = ee(y);
|
|
463
514
|
v.push({
|
|
464
|
-
id:
|
|
465
|
-
text:
|
|
515
|
+
id: P,
|
|
516
|
+
text: g[b].text,
|
|
466
517
|
// Use localized text for display
|
|
467
|
-
level:
|
|
468
|
-
}),
|
|
518
|
+
level: g[b].level
|
|
519
|
+
}), b++, f = k.exec(n);
|
|
469
520
|
}
|
|
470
|
-
|
|
521
|
+
_(v);
|
|
471
522
|
})();
|
|
472
|
-
}, [t, n]),
|
|
473
|
-
if (
|
|
474
|
-
const
|
|
475
|
-
const
|
|
523
|
+
}, [t, n]), S(() => {
|
|
524
|
+
if (r.length === 0) return;
|
|
525
|
+
const o = setTimeout(() => {
|
|
526
|
+
const l = r.filter(
|
|
476
527
|
(v) => !document.getElementById(v.id)
|
|
477
528
|
);
|
|
478
|
-
|
|
529
|
+
l.length > 0 && console.warn("Some heading elements not found:", l);
|
|
479
530
|
}, 100);
|
|
480
|
-
return () => clearTimeout(
|
|
481
|
-
}, [
|
|
482
|
-
if (
|
|
483
|
-
|
|
484
|
-
const
|
|
485
|
-
const
|
|
486
|
-
|
|
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 l = r.map((v) => document.getElementById(v.id)).filter(Boolean);
|
|
537
|
+
l.length !== 0 && (a.current = new IntersectionObserver(
|
|
487
538
|
(v) => {
|
|
488
|
-
const
|
|
489
|
-
if (
|
|
490
|
-
const
|
|
491
|
-
u(
|
|
539
|
+
const w = v.filter((g) => g.isIntersecting);
|
|
540
|
+
if (w.length > 0) {
|
|
541
|
+
const g = w.reduce((k, f) => k.boundingClientRect.top < f.boundingClientRect.top ? k : f);
|
|
542
|
+
u(g.target.id);
|
|
492
543
|
}
|
|
493
544
|
},
|
|
494
545
|
{
|
|
495
546
|
rootMargin: "-80px 0% -80% 0%",
|
|
496
547
|
threshold: 0
|
|
497
548
|
}
|
|
498
|
-
),
|
|
499
|
-
|
|
549
|
+
), l.forEach((v) => {
|
|
550
|
+
a.current && a.current.observe(v);
|
|
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 v = new URLSearchParams(
|
|
512
|
-
v.set("a",
|
|
513
|
-
`${
|
|
559
|
+
const m = (o) => {
|
|
560
|
+
const l = document.getElementById(o);
|
|
561
|
+
if (l) {
|
|
562
|
+
const v = new URLSearchParams(c.search);
|
|
563
|
+
v.set("a", o), h(
|
|
564
|
+
`${c.pathname}?${v.toString()}${c.hash}`,
|
|
514
565
|
{
|
|
515
566
|
replace: !0
|
|
516
567
|
}
|
|
517
568
|
);
|
|
518
|
-
const
|
|
569
|
+
const k = l.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:
|
|
527
|
-
/* @__PURE__ */ e("nav", { className:
|
|
576
|
+
return r.length === 0 ? null : /* @__PURE__ */ i("aside", { className: F.tableOfContents, children: [
|
|
577
|
+
/* @__PURE__ */ e("div", { className: F.header, children: /* @__PURE__ */ e("span", { className: F.title, children: s("ui.onThisPage", "On this page") }) }),
|
|
578
|
+
/* @__PURE__ */ e("nav", { className: F.nav, children: /* @__PURE__ */ e("ul", { className: F.list, children: r.map((o) => /* @__PURE__ */ e("li", { className: F.item, children: /* @__PURE__ */ e(
|
|
528
579
|
"button",
|
|
529
580
|
{
|
|
530
|
-
className: `${
|
|
531
|
-
onClick: () =>
|
|
581
|
+
className: `${F.link} ${F[`level${o.level}`]} ${d === o.id ? F.active : ""}`,
|
|
582
|
+
onClick: () => m(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: h } = 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 We(
|
|
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
|
+
h("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: h("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
|
] })
|
|
@@ -596,306 +647,271 @@ function pn({
|
|
|
596
647
|
document.body
|
|
597
648
|
);
|
|
598
649
|
}
|
|
599
|
-
const
|
|
600
|
-
tags:
|
|
601
|
-
compact:
|
|
650
|
+
const vn = "_tags_11t8a_1", fn = "_compact_11t8a_9", bn = "_tagLabel_11t8a_15", kn = "_tagIcon_11t8a_25", Nn = "_tagList_11t8a_30", wn = "_tag_11t8a_1", Z = {
|
|
651
|
+
tags: vn,
|
|
652
|
+
compact: fn,
|
|
602
653
|
tagLabel: bn,
|
|
603
654
|
tagIcon: kn,
|
|
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 h = (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: () => h(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
|
|
641
|
-
contentPage:
|
|
691
|
+
const yn = "_contentPage_mc666_1", $n = "_withMetadata_mc666_30", Cn = "_loadingContainer_mc666_64", Tn = "_errorContainer_mc666_65", Ln = "_skeletonTitle_mc666_87", xn = "_skeletonParagraph_mc666_96", Sn = "_skeletonParagraphShort_mc666_109", Pn = "_errorText_mc666_123", Mn = "_mdxContent_mc666_128", Bn = "_codeBlock_mc666_316", En = "_codeLanguage_mc666_320", D = {
|
|
692
|
+
contentPage: yn,
|
|
693
|
+
withMetadata: $n,
|
|
642
694
|
loadingContainer: Cn,
|
|
643
|
-
errorContainer:
|
|
644
|
-
skeletonTitle:
|
|
645
|
-
skeletonParagraph:
|
|
646
|
-
skeletonParagraphShort:
|
|
647
|
-
errorText:
|
|
648
|
-
mdxContent:
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
}, qe = (t) => {
|
|
695
|
+
errorContainer: Tn,
|
|
696
|
+
skeletonTitle: Ln,
|
|
697
|
+
skeletonParagraph: xn,
|
|
698
|
+
skeletonParagraphShort: Sn,
|
|
699
|
+
errorText: Pn,
|
|
700
|
+
mdxContent: Mn,
|
|
701
|
+
codeBlock: Bn,
|
|
702
|
+
codeLanguage: En
|
|
703
|
+
}, Re = (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 An({ language: t }) {
|
|
711
|
+
var we, Ie, ye, $e, Ce;
|
|
712
|
+
const { slug: n } = pe(), s = Y(), { config: c, loadContent: h, loadEnglishContent: r, discoverArticles: _ } = R(), [d, u] = T(""), [a, m] = T(""), [o, l] = T({}), [v, w] = T(!0), [g, k] = T(null), [f, b] = T(!0), [y, P] = T(null), [N, C] = T(""), [M, W] = T({}), z = G(0), te = G([]), ce = Ue(s.search), V = ce.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;
|
|
715
|
+
if (n) {
|
|
716
|
+
w(!0), k(null), z.current = 0;
|
|
682
717
|
try {
|
|
683
|
-
I
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
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 h(t, n, V);
|
|
721
|
+
} catch {
|
|
722
|
+
if (V)
|
|
723
|
+
I = await h(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 A = typeof I.frontmatter.title == "string" ? I.frontmatter.title : void 0;
|
|
736
|
+
let ne = I.content, J = L, ue = "";
|
|
737
|
+
if (A) {
|
|
738
|
+
const ie = Re(L), Qe = Re(I.content);
|
|
739
|
+
ue = ie.title || "", J = ie.content, ne = Qe.content;
|
|
740
|
+
} else
|
|
741
|
+
ue = "";
|
|
742
|
+
const Te = /^(#{1,6})\s+(.+)$/gm, Le = [];
|
|
743
|
+
let he = Te.exec(
|
|
744
|
+
J
|
|
745
|
+
);
|
|
746
|
+
for (; he !== null; ) {
|
|
747
|
+
const ie = he[2].trim();
|
|
748
|
+
Le.push(ie), he = Te.exec(J);
|
|
749
|
+
}
|
|
750
|
+
te.current = Le, C(ue), m(J), u(ne), l(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
|
-
t,
|
|
721
|
-
V,
|
|
722
|
-
a.navigationData,
|
|
723
|
-
s,
|
|
724
|
-
c
|
|
725
|
-
]), P(() => {
|
|
726
|
-
if (!g && ce.anchor) {
|
|
758
|
+
}, [n, t, V, h, r]), S(() => {
|
|
759
|
+
if (!v && ce.anchor) {
|
|
727
760
|
const p = setTimeout(() => {
|
|
728
|
-
|
|
761
|
+
je(ce.anchor);
|
|
729
762
|
}, 150);
|
|
730
763
|
return () => clearTimeout(p);
|
|
731
764
|
}
|
|
732
|
-
}, [
|
|
765
|
+
}, [v, ce.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, _]), v)
|
|
779
|
+
return /* @__PURE__ */ e("div", { className: D.contentPage, children: /* @__PURE__ */ i("div", { className: D.loadingContainer, children: [
|
|
780
|
+
/* @__PURE__ */ e("div", { className: D.skeletonTitle }),
|
|
781
|
+
/* @__PURE__ */ e("div", { className: D.skeletonParagraph }),
|
|
782
|
+
/* @__PURE__ */ e("div", { className: D.skeletonParagraph }),
|
|
783
|
+
/* @__PURE__ */ e("div", { className: D.skeletonParagraphShort })
|
|
761
784
|
] }) });
|
|
762
|
-
if (
|
|
763
|
-
return /* @__PURE__ */ e("div", { className:
|
|
785
|
+
if (g)
|
|
786
|
+
return /* @__PURE__ */ e("div", { className: D.contentPage, children: /* @__PURE__ */ e("div", { className: D.errorContainer, children: /* @__PURE__ */ i("div", { className: D.errorText, children: [
|
|
764
787
|
"Error: ",
|
|
765
|
-
|
|
788
|
+
g
|
|
766
789
|
] }) }) });
|
|
767
|
-
const re = typeof
|
|
768
|
-
|
|
769
|
-
let
|
|
770
|
-
const
|
|
771
|
-
p.preventDefault(),
|
|
790
|
+
const re = typeof o.title == "string" && o.title.trim().length > 0, Ge = re ? ee(N || o.title) : "", ke = !!(o.date || o.author);
|
|
791
|
+
z.current = 0;
|
|
792
|
+
let Ne = !1;
|
|
793
|
+
const le = (p, I) => {
|
|
794
|
+
p.preventDefault(), je(I), vt(I, V);
|
|
772
795
|
};
|
|
773
|
-
return /* @__PURE__ */
|
|
774
|
-
/* @__PURE__ */
|
|
775
|
-
/* @__PURE__ */ e(
|
|
776
|
-
re && /* @__PURE__ */
|
|
777
|
-
/* @__PURE__ */ e(
|
|
796
|
+
return /* @__PURE__ */ i(U, { children: [
|
|
797
|
+
/* @__PURE__ */ i("div", { className: D.contentPage, children: [
|
|
798
|
+
/* @__PURE__ */ e(ut, { hasAdvanced: o.hasAdvanced || !1 }),
|
|
799
|
+
re && /* @__PURE__ */ i(U, { children: [
|
|
800
|
+
/* @__PURE__ */ e(Ot, { articleTitle: o.title, language: t }),
|
|
778
801
|
/* @__PURE__ */ e(
|
|
779
802
|
"h1",
|
|
780
803
|
{
|
|
781
|
-
id:
|
|
782
|
-
className:
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
{
|
|
786
|
-
href: `#${me}`,
|
|
787
|
-
onClick: (p) => te(p, me),
|
|
788
|
-
style: { color: "inherit", textDecoration: "none" },
|
|
789
|
-
children: i.title
|
|
790
|
-
}
|
|
791
|
-
)
|
|
804
|
+
id: Ge,
|
|
805
|
+
className: ke ? D.withMetadata : void 0,
|
|
806
|
+
style: c.articleTitleFont ? { fontFamily: c.articleTitleFont } : void 0,
|
|
807
|
+
children: o.title
|
|
792
808
|
}
|
|
793
809
|
),
|
|
794
|
-
|
|
810
|
+
ke && /* @__PURE__ */ e(ge, { date: o.date, author: o.author })
|
|
795
811
|
] }),
|
|
796
|
-
/* @__PURE__ */ e("div", { className:
|
|
797
|
-
|
|
812
|
+
/* @__PURE__ */ e("div", { className: D.mdxContent, children: /* @__PURE__ */ e(
|
|
813
|
+
ct,
|
|
798
814
|
{
|
|
799
|
-
remarkPlugins: [
|
|
815
|
+
remarkPlugins: [rt],
|
|
800
816
|
components: {
|
|
801
817
|
h1: ({ children: p }) => {
|
|
802
|
-
const
|
|
803
|
-
|
|
804
|
-
const
|
|
805
|
-
return /* @__PURE__ */
|
|
818
|
+
const I = z.current++, B = te.current[I] || "", L = ee(B), A = !Ne;
|
|
819
|
+
Ne = !0;
|
|
820
|
+
const ne = o.date || o.author;
|
|
821
|
+
return /* @__PURE__ */ i(U, { children: [
|
|
806
822
|
/* @__PURE__ */ e(
|
|
807
823
|
"h1",
|
|
808
824
|
{
|
|
809
|
-
id:
|
|
810
|
-
className:
|
|
825
|
+
id: L,
|
|
826
|
+
className: A && ne && !re ? D.withMetadata : void 0,
|
|
811
827
|
children: /* @__PURE__ */ e(
|
|
812
828
|
"a",
|
|
813
829
|
{
|
|
814
|
-
href: `#${
|
|
815
|
-
onClick: (
|
|
830
|
+
href: `#${L}`,
|
|
831
|
+
onClick: (J) => le(J, L),
|
|
816
832
|
style: { color: "inherit", textDecoration: "none" },
|
|
817
833
|
children: p
|
|
818
834
|
}
|
|
819
835
|
)
|
|
820
836
|
}
|
|
821
837
|
),
|
|
822
|
-
|
|
823
|
-
|
|
838
|
+
A && ne && !re && /* @__PURE__ */ e(
|
|
839
|
+
ge,
|
|
824
840
|
{
|
|
825
|
-
date:
|
|
826
|
-
author:
|
|
841
|
+
date: o.date,
|
|
842
|
+
author: o.author
|
|
827
843
|
}
|
|
828
844
|
)
|
|
829
845
|
] });
|
|
830
846
|
},
|
|
831
847
|
h2: ({ children: p }) => {
|
|
832
|
-
const
|
|
833
|
-
return /* @__PURE__ */ e("h2", { id:
|
|
848
|
+
const I = z.current++, B = te.current[I] || "", L = ee(B);
|
|
849
|
+
return /* @__PURE__ */ e("h2", { id: L, children: /* @__PURE__ */ e(
|
|
834
850
|
"a",
|
|
835
851
|
{
|
|
836
|
-
href: `#${
|
|
837
|
-
onClick: (
|
|
852
|
+
href: `#${L}`,
|
|
853
|
+
onClick: (A) => le(A, L),
|
|
838
854
|
style: { color: "inherit", textDecoration: "none" },
|
|
839
855
|
children: p
|
|
840
856
|
}
|
|
841
857
|
) });
|
|
842
858
|
},
|
|
843
859
|
h3: ({ children: p }) => {
|
|
844
|
-
const
|
|
845
|
-
return /* @__PURE__ */ e("h3", { id:
|
|
860
|
+
const I = z.current++, B = te.current[I] || "", L = ee(B);
|
|
861
|
+
return /* @__PURE__ */ e("h3", { id: L, children: /* @__PURE__ */ e(
|
|
846
862
|
"a",
|
|
847
863
|
{
|
|
848
|
-
href: `#${
|
|
849
|
-
onClick: (
|
|
864
|
+
href: `#${L}`,
|
|
865
|
+
onClick: (A) => le(A, L),
|
|
850
866
|
style: { color: "inherit", textDecoration: "none" },
|
|
851
867
|
children: p
|
|
852
868
|
}
|
|
853
869
|
) });
|
|
854
870
|
},
|
|
855
871
|
h4: ({ children: p }) => {
|
|
856
|
-
const
|
|
857
|
-
return /* @__PURE__ */ e("h4", { id:
|
|
872
|
+
const I = z.current++, B = te.current[I] || "", L = ee(B);
|
|
873
|
+
return /* @__PURE__ */ e("h4", { id: L, children: /* @__PURE__ */ e(
|
|
858
874
|
"a",
|
|
859
875
|
{
|
|
860
|
-
href: `#${
|
|
861
|
-
onClick: (
|
|
876
|
+
href: `#${L}`,
|
|
877
|
+
onClick: (A) => le(A, L),
|
|
862
878
|
style: { color: "inherit", textDecoration: "none" },
|
|
863
879
|
children: p
|
|
864
880
|
}
|
|
865
881
|
) });
|
|
866
882
|
},
|
|
867
883
|
h5: ({ children: p }) => {
|
|
868
|
-
const
|
|
869
|
-
return /* @__PURE__ */ e("h5", { id:
|
|
884
|
+
const I = `h5-${z.current++}`;
|
|
885
|
+
return /* @__PURE__ */ e("h5", { id: I, children: p });
|
|
870
886
|
},
|
|
871
887
|
h6: ({ children: p }) => {
|
|
872
|
-
const
|
|
873
|
-
return /* @__PURE__ */ e("h6", { id:
|
|
888
|
+
const I = `h6-${z.current++}`;
|
|
889
|
+
return /* @__PURE__ */ e("h6", { id: I, children: p });
|
|
874
890
|
},
|
|
875
891
|
p: ({ children: p }) => /* @__PURE__ */ e("p", { children: p }),
|
|
876
892
|
ul: ({ children: p }) => /* @__PURE__ */ e("ul", { children: p }),
|
|
877
893
|
ol: ({ children: p }) => /* @__PURE__ */ e("ol", { children: p }),
|
|
878
894
|
li: ({ children: p }) => /* @__PURE__ */ e("li", { children: p }),
|
|
879
|
-
code: ({ className: p, children:
|
|
895
|
+
code: ({ className: p, children: I, ...B }) => {
|
|
880
896
|
if (!p)
|
|
881
|
-
return /* @__PURE__ */ e("code", { ...
|
|
882
|
-
const
|
|
883
|
-
return /* @__PURE__ */
|
|
884
|
-
|
|
885
|
-
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: p, ...
|
|
897
|
+
return /* @__PURE__ */ e("code", { ...B, children: I });
|
|
898
|
+
const A = (p == null ? void 0 : p.replace("language-", "")) || "";
|
|
899
|
+
return /* @__PURE__ */ i("div", { className: D.codeBlock, children: [
|
|
900
|
+
A && /* @__PURE__ */ e("div", { className: D.codeLanguage, children: A }),
|
|
901
|
+
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: p, ...B, children: I }) })
|
|
886
902
|
] });
|
|
887
903
|
},
|
|
888
904
|
pre: ({ children: p }) => /* @__PURE__ */ e(U, { children: p }),
|
|
889
905
|
// Let code component handle pre styling
|
|
890
906
|
blockquote: ({ children: p }) => /* @__PURE__ */ e("blockquote", { children: p }),
|
|
891
|
-
a: ({ href: p, children:
|
|
907
|
+
a: ({ href: p, children: I, ...B }) => {
|
|
892
908
|
if (p != null && p.startsWith("./")) {
|
|
893
|
-
const
|
|
894
|
-
|
|
909
|
+
const L = p.slice(2), A = pt(
|
|
910
|
+
L,
|
|
895
911
|
t,
|
|
896
|
-
|
|
912
|
+
c.basePath
|
|
897
913
|
);
|
|
898
|
-
return /* @__PURE__ */ e("a", { href:
|
|
914
|
+
return /* @__PURE__ */ e("a", { href: A, ...B, children: I });
|
|
899
915
|
}
|
|
900
916
|
return p != null && p.startsWith("http://") || p != null && p.startsWith("https://") ? /* @__PURE__ */ e(
|
|
901
917
|
"a",
|
|
@@ -903,59 +919,59 @@ function En({ language: t }) {
|
|
|
903
919
|
href: p,
|
|
904
920
|
target: "_blank",
|
|
905
921
|
rel: "noopener noreferrer",
|
|
906
|
-
...
|
|
907
|
-
children:
|
|
922
|
+
...B,
|
|
923
|
+
children: I
|
|
908
924
|
}
|
|
909
|
-
) : /* @__PURE__ */ e("a", { href: p, ...
|
|
925
|
+
) : /* @__PURE__ */ e("a", { href: p, ...B, children: I });
|
|
910
926
|
},
|
|
911
927
|
strong: ({ children: p }) => /* @__PURE__ */ e("strong", { children: p }),
|
|
912
928
|
em: ({ children: p }) => /* @__PURE__ */ e("em", { children: p })
|
|
913
929
|
},
|
|
914
|
-
children:
|
|
930
|
+
children: d
|
|
915
931
|
}
|
|
916
932
|
) }),
|
|
917
|
-
|
|
918
|
-
|
|
933
|
+
c.articleCTA && /* @__PURE__ */ e("div", { children: c.articleCTA }),
|
|
934
|
+
o.tags && o.tags.length > 0 && /* @__PURE__ */ e(
|
|
919
935
|
In,
|
|
920
936
|
{
|
|
921
|
-
tags:
|
|
937
|
+
tags: o.tags,
|
|
922
938
|
variant: "compact",
|
|
923
|
-
onTagClick: (p) =>
|
|
939
|
+
onTagClick: (p) => P(p)
|
|
924
940
|
}
|
|
925
941
|
),
|
|
926
|
-
|
|
942
|
+
c.showArticleNavigation && /* @__PURE__ */ e(
|
|
927
943
|
Tt,
|
|
928
944
|
{
|
|
929
|
-
prevSlug: (
|
|
930
|
-
prevTitle: (
|
|
931
|
-
nextSlug: (
|
|
932
|
-
nextTitle: (
|
|
945
|
+
prevSlug: (we = M.prev) == null ? void 0 : we.slug,
|
|
946
|
+
prevTitle: (Ie = M.prev) == null ? void 0 : Ie.title,
|
|
947
|
+
nextSlug: (ye = M.next) == null ? void 0 : ye.slug,
|
|
948
|
+
nextTitle: ($e = M.next) == null ? void 0 : $e.title,
|
|
933
949
|
language: t
|
|
934
950
|
}
|
|
935
951
|
)
|
|
936
952
|
] }),
|
|
937
|
-
|
|
938
|
-
|
|
953
|
+
f && /* @__PURE__ */ e(an, { content: d, englishContent: a }),
|
|
954
|
+
y && ((Ce = c.tagIndex) == null ? void 0 : Ce[t]) && /* @__PURE__ */ e(
|
|
939
955
|
pn,
|
|
940
956
|
{
|
|
941
|
-
tag:
|
|
942
|
-
results:
|
|
957
|
+
tag: y,
|
|
958
|
+
results: c.tagIndex[t][y] || [],
|
|
943
959
|
language: t,
|
|
944
|
-
onClose: () =>
|
|
960
|
+
onClose: () => P(null)
|
|
945
961
|
}
|
|
946
962
|
)
|
|
947
963
|
] });
|
|
948
964
|
}
|
|
949
|
-
const
|
|
950
|
-
searchButton:
|
|
951
|
-
searchIcon:
|
|
952
|
-
searchHint:
|
|
953
|
-
kbd:
|
|
954
|
-
searchOverlay:
|
|
965
|
+
const Dn = "_searchButton_1k9sl_1", jn = "_searchIcon_1k9sl_17", Rn = "_searchHint_1k9sl_23", qn = "_kbd_1k9sl_27", On = "_searchOverlay_1k9sl_42", Wn = "_searchModal_1k9sl_67", Hn = "_searchHeader_1k9sl_91", Fn = "_searchInput_1k9sl_105", zn = "_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 = {
|
|
966
|
+
searchButton: Dn,
|
|
967
|
+
searchIcon: jn,
|
|
968
|
+
searchHint: Rn,
|
|
969
|
+
kbd: qn,
|
|
970
|
+
searchOverlay: On,
|
|
955
971
|
searchModal: Wn,
|
|
956
972
|
searchHeader: Hn,
|
|
957
|
-
searchInput:
|
|
958
|
-
closeButton:
|
|
973
|
+
searchInput: Fn,
|
|
974
|
+
closeButton: zn,
|
|
959
975
|
searchResults: Kn,
|
|
960
976
|
resultsList: Un,
|
|
961
977
|
resultItem: Gn,
|
|
@@ -967,156 +983,155 @@ const jn = "_searchButton_1k9sl_1", Rn = "_searchIcon_1k9sl_17", An = "_searchHi
|
|
|
967
983
|
hint: Zn
|
|
968
984
|
};
|
|
969
985
|
function ea({ language: t }) {
|
|
970
|
-
const { t: n } =
|
|
971
|
-
|
|
986
|
+
const { t: n } = j(), s = Q(), { config: c, discoverArticles: h } = R(), [r, _] = T(!1), [d, u] = T(""), [a, m] = T([]), [o, l] = T(0), [v, w] = T([]), g = G(null), k = G(null), b = typeof navigator < "u" && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘K" : "Ctrl+K";
|
|
987
|
+
S(() => {
|
|
972
988
|
(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
|
-
}
|
|
989
|
+
try {
|
|
990
|
+
const M = (await h(t)).map((W) => ({
|
|
991
|
+
title: W.title,
|
|
992
|
+
slug: W.slug,
|
|
993
|
+
description: W.description
|
|
994
|
+
}));
|
|
995
|
+
w(M);
|
|
996
|
+
} catch (C) {
|
|
997
|
+
console.error("Failed to build search index:", C);
|
|
998
|
+
}
|
|
987
999
|
})();
|
|
988
|
-
}, [
|
|
989
|
-
if (!
|
|
990
|
-
|
|
1000
|
+
}, [t, h]), S(() => {
|
|
1001
|
+
if (!d.trim()) {
|
|
1002
|
+
m([]), l(0);
|
|
991
1003
|
return;
|
|
992
1004
|
}
|
|
993
|
-
const
|
|
994
|
-
(
|
|
1005
|
+
const N = d.toLowerCase(), C = v.filter(
|
|
1006
|
+
(M) => {
|
|
1007
|
+
var W;
|
|
1008
|
+
return M.title.toLowerCase().includes(N) || M.slug.toLowerCase().includes(N) || ((W = M.description) == null ? void 0 : W.toLowerCase().includes(N));
|
|
1009
|
+
}
|
|
995
1010
|
);
|
|
996
|
-
|
|
997
|
-
}, [
|
|
998
|
-
const
|
|
999
|
-
(
|
|
1000
|
-
var
|
|
1001
|
-
return (
|
|
1002
|
-
}, 100)),
|
|
1011
|
+
m(C), l(0);
|
|
1012
|
+
}, [d, v]), S(() => {
|
|
1013
|
+
const N = (C) => {
|
|
1014
|
+
(C.metaKey || C.ctrlKey) && C.key === "k" && (C.preventDefault(), _(!0), setTimeout(() => {
|
|
1015
|
+
var M;
|
|
1016
|
+
return (M = g.current) == null ? void 0 : M.focus();
|
|
1017
|
+
}, 100)), C.key === "Escape" && r && (_(!1), u(""));
|
|
1003
1018
|
};
|
|
1004
|
-
return document.addEventListener("keydown",
|
|
1005
|
-
}, [
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1008
|
-
var
|
|
1009
|
-
return (
|
|
1019
|
+
return document.addEventListener("keydown", N), () => document.removeEventListener("keydown", N);
|
|
1020
|
+
}, [r]), S(() => {
|
|
1021
|
+
const N = () => {
|
|
1022
|
+
_(!0), setTimeout(() => {
|
|
1023
|
+
var M;
|
|
1024
|
+
return (M = g.current) == null ? void 0 : M.focus();
|
|
1010
1025
|
}, 100);
|
|
1011
|
-
},
|
|
1012
|
-
|
|
1026
|
+
}, C = () => {
|
|
1027
|
+
_(!1), u("");
|
|
1013
1028
|
};
|
|
1014
|
-
return window.addEventListener("blog:open-search",
|
|
1015
|
-
window.removeEventListener("blog:open-search",
|
|
1029
|
+
return window.addEventListener("blog:open-search", N), window.addEventListener("blog:close-search", C), () => {
|
|
1030
|
+
window.removeEventListener("blog:open-search", N), window.removeEventListener("blog:close-search", C);
|
|
1016
1031
|
};
|
|
1017
1032
|
}, []);
|
|
1018
|
-
const
|
|
1019
|
-
|
|
1033
|
+
const y = (N) => {
|
|
1034
|
+
N.key === "ArrowDown" ? (N.preventDefault(), l((C) => Math.min(C + 1, a.length - 1))) : N.key === "ArrowUp" ? (N.preventDefault(), l((C) => Math.max(C - 1, 0))) : N.key === "Enter" && a[o] && (N.preventDefault(), P(a[o].slug));
|
|
1020
1035
|
};
|
|
1021
|
-
|
|
1022
|
-
const
|
|
1023
|
-
|
|
1036
|
+
S(() => {
|
|
1037
|
+
const N = (C) => {
|
|
1038
|
+
k.current && !k.current.contains(C.target) && (_(!1), u(""));
|
|
1024
1039
|
};
|
|
1025
|
-
return
|
|
1026
|
-
}, [
|
|
1027
|
-
const
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1040
|
+
return r && document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
|
|
1041
|
+
}, [r]);
|
|
1042
|
+
const P = (N) => {
|
|
1043
|
+
const C = c.basePath || "";
|
|
1044
|
+
s(`${C}/${t}/${N}`), _(!1), u("");
|
|
1030
1045
|
};
|
|
1031
|
-
return /* @__PURE__ */
|
|
1032
|
-
/* @__PURE__ */
|
|
1046
|
+
return /* @__PURE__ */ i(U, { children: [
|
|
1047
|
+
/* @__PURE__ */ i(
|
|
1033
1048
|
"button",
|
|
1034
1049
|
{
|
|
1035
1050
|
type: "button",
|
|
1036
|
-
className:
|
|
1051
|
+
className: x.searchButton,
|
|
1037
1052
|
onClick: () => {
|
|
1038
|
-
|
|
1039
|
-
var
|
|
1040
|
-
return (
|
|
1053
|
+
_(!0), setTimeout(() => {
|
|
1054
|
+
var N;
|
|
1055
|
+
return (N = g.current) == null ? void 0 : N.focus();
|
|
1041
1056
|
}, 100);
|
|
1042
1057
|
},
|
|
1043
1058
|
"aria-label": n("ui.search"),
|
|
1044
1059
|
children: [
|
|
1045
|
-
/* @__PURE__ */ e(
|
|
1046
|
-
/* @__PURE__ */ e("span", { className:
|
|
1047
|
-
/* @__PURE__ */ e("kbd", { className:
|
|
1060
|
+
/* @__PURE__ */ e(Se, { className: x.searchIcon }),
|
|
1061
|
+
/* @__PURE__ */ e("span", { className: x.searchHint, children: n("ui.search") }),
|
|
1062
|
+
/* @__PURE__ */ e("kbd", { className: x.kbd, children: b })
|
|
1048
1063
|
]
|
|
1049
1064
|
}
|
|
1050
1065
|
),
|
|
1051
|
-
|
|
1066
|
+
r && We(
|
|
1052
1067
|
/* @__PURE__ */ e(
|
|
1053
1068
|
"div",
|
|
1054
1069
|
{
|
|
1055
|
-
className:
|
|
1070
|
+
className: x.searchOverlay,
|
|
1056
1071
|
onClick: () => {
|
|
1057
|
-
|
|
1072
|
+
_(!1), u("");
|
|
1058
1073
|
},
|
|
1059
|
-
children: /* @__PURE__ */
|
|
1074
|
+
children: /* @__PURE__ */ i(
|
|
1060
1075
|
"div",
|
|
1061
1076
|
{
|
|
1062
|
-
className:
|
|
1063
|
-
ref:
|
|
1064
|
-
onClick: (
|
|
1077
|
+
className: x.searchModal,
|
|
1078
|
+
ref: k,
|
|
1079
|
+
onClick: (N) => N.stopPropagation(),
|
|
1065
1080
|
children: [
|
|
1066
|
-
/* @__PURE__ */
|
|
1067
|
-
/* @__PURE__ */ e(
|
|
1081
|
+
/* @__PURE__ */ i("div", { className: x.searchHeader, children: [
|
|
1082
|
+
/* @__PURE__ */ e(Se, { className: x.searchIcon }),
|
|
1068
1083
|
/* @__PURE__ */ e(
|
|
1069
1084
|
"input",
|
|
1070
1085
|
{
|
|
1071
|
-
ref:
|
|
1086
|
+
ref: g,
|
|
1072
1087
|
type: "text",
|
|
1073
|
-
className:
|
|
1088
|
+
className: x.searchInput,
|
|
1074
1089
|
placeholder: n("ui.searchPlaceholder"),
|
|
1075
|
-
value:
|
|
1076
|
-
onChange: (
|
|
1077
|
-
onKeyDown:
|
|
1090
|
+
value: d,
|
|
1091
|
+
onChange: (N) => u(N.target.value),
|
|
1092
|
+
onKeyDown: y
|
|
1078
1093
|
}
|
|
1079
1094
|
),
|
|
1080
1095
|
/* @__PURE__ */ e(
|
|
1081
1096
|
"button",
|
|
1082
1097
|
{
|
|
1083
1098
|
type: "button",
|
|
1084
|
-
className:
|
|
1099
|
+
className: x.closeButton,
|
|
1085
1100
|
onClick: () => {
|
|
1086
|
-
|
|
1101
|
+
_(!1), u("");
|
|
1087
1102
|
},
|
|
1088
1103
|
"aria-label": "Close search",
|
|
1089
|
-
children: /* @__PURE__ */ e(
|
|
1104
|
+
children: /* @__PURE__ */ e(ve, {})
|
|
1090
1105
|
}
|
|
1091
1106
|
)
|
|
1092
1107
|
] }),
|
|
1093
|
-
|
|
1108
|
+
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, C) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ i(
|
|
1094
1109
|
"button",
|
|
1095
1110
|
{
|
|
1096
1111
|
type: "button",
|
|
1097
|
-
className: `${
|
|
1098
|
-
onClick: () =>
|
|
1099
|
-
onMouseEnter: () =>
|
|
1112
|
+
className: `${x.resultItem} ${C === o ? x.selected : ""}`,
|
|
1113
|
+
onClick: () => P(N.slug),
|
|
1114
|
+
onMouseEnter: () => l(C),
|
|
1100
1115
|
children: [
|
|
1101
|
-
/* @__PURE__ */ e("div", { className:
|
|
1102
|
-
/* @__PURE__ */
|
|
1116
|
+
/* @__PURE__ */ e("div", { className: x.resultTitle, children: N.title }),
|
|
1117
|
+
/* @__PURE__ */ i("div", { className: x.resultSlug, children: [
|
|
1103
1118
|
"/",
|
|
1104
|
-
|
|
1119
|
+
N.slug
|
|
1105
1120
|
] })
|
|
1106
1121
|
]
|
|
1107
1122
|
}
|
|
1108
|
-
) },
|
|
1109
|
-
!
|
|
1110
|
-
/* @__PURE__ */
|
|
1123
|
+
) }, N.slug)) }) }),
|
|
1124
|
+
!d && /* @__PURE__ */ i("div", { className: x.searchHints, children: [
|
|
1125
|
+
/* @__PURE__ */ i("div", { className: x.hint, children: [
|
|
1111
1126
|
/* @__PURE__ */ e("kbd", { children: "↑" }),
|
|
1112
1127
|
/* @__PURE__ */ e("kbd", { children: "↓" }),
|
|
1113
1128
|
/* @__PURE__ */ e("span", { children: n("ui.searchNavigate") })
|
|
1114
1129
|
] }),
|
|
1115
|
-
/* @__PURE__ */
|
|
1130
|
+
/* @__PURE__ */ i("div", { className: x.hint, children: [
|
|
1116
1131
|
/* @__PURE__ */ e("kbd", { children: "↵" }),
|
|
1117
1132
|
/* @__PURE__ */ e("span", { children: n("ui.searchSelect") })
|
|
1118
1133
|
] }),
|
|
1119
|
-
/* @__PURE__ */
|
|
1134
|
+
/* @__PURE__ */ i("div", { className: x.hint, children: [
|
|
1120
1135
|
/* @__PURE__ */ e("kbd", { children: "esc" }),
|
|
1121
1136
|
/* @__PURE__ */ e("span", { children: n("ui.searchClose") })
|
|
1122
1137
|
] })
|
|
@@ -1130,7 +1145,7 @@ function ea({ language: t }) {
|
|
|
1130
1145
|
)
|
|
1131
1146
|
] });
|
|
1132
1147
|
}
|
|
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",
|
|
1148
|
+
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", va = "_dropdownMenu_jrobc_208", fa = "_dropdownItem_jrobc_221", ba = "_dropdownIcon_jrobc_244", $ = {
|
|
1134
1149
|
header: ta,
|
|
1135
1150
|
container: na,
|
|
1136
1151
|
content: aa,
|
|
@@ -1144,269 +1159,269 @@ const ta = "_header_jrobc_1", na = "_container_jrobc_24", aa = "_content_jrobc_3
|
|
|
1144
1159
|
supportDropdown: ua,
|
|
1145
1160
|
themeDropdown: ha,
|
|
1146
1161
|
themeButton: ma,
|
|
1147
|
-
themeIcon:
|
|
1148
|
-
supportButton:
|
|
1162
|
+
themeIcon: _a,
|
|
1163
|
+
supportButton: ga,
|
|
1149
1164
|
caretIcon: pa,
|
|
1150
|
-
dropdownMenu:
|
|
1151
|
-
dropdownItem:
|
|
1165
|
+
dropdownMenu: va,
|
|
1166
|
+
dropdownItem: fa,
|
|
1152
1167
|
dropdownIcon: ba
|
|
1153
1168
|
};
|
|
1154
1169
|
function ka({ onMobileMenuToggle: t }) {
|
|
1155
|
-
const { t: n, i18n:
|
|
1156
|
-
return
|
|
1157
|
-
const
|
|
1158
|
-
v.current && !v.current.contains(
|
|
1170
|
+
const { t: n, i18n: s } = j(), { config: c } = R(), h = c.header ?? {}, r = h.navLinks ?? [], _ = h.dropdownItems ?? [], [d, u] = T(!1), [a, m] = T(!1), { theme: o, setTheme: l } = ze(), v = G(null), w = G(null);
|
|
1171
|
+
return S(() => {
|
|
1172
|
+
const g = (k) => {
|
|
1173
|
+
v.current && !v.current.contains(k.target) && u(!1), w.current && !w.current.contains(k.target) && m(!1);
|
|
1159
1174
|
};
|
|
1160
|
-
return document.addEventListener("mousedown",
|
|
1161
|
-
}, []), /* @__PURE__ */ e("header", { className:
|
|
1162
|
-
/* @__PURE__ */
|
|
1175
|
+
return document.addEventListener("mousedown", g), () => document.removeEventListener("mousedown", g);
|
|
1176
|
+
}, []), /* @__PURE__ */ e("header", { className: $.header, children: /* @__PURE__ */ e("div", { className: $.container, children: /* @__PURE__ */ i("div", { className: $.content, children: [
|
|
1177
|
+
/* @__PURE__ */ i("div", { className: $.leftSection, children: [
|
|
1163
1178
|
/* @__PURE__ */ e(
|
|
1164
1179
|
"button",
|
|
1165
1180
|
{
|
|
1166
1181
|
type: "button",
|
|
1167
|
-
className:
|
|
1182
|
+
className: $.mobileMenuButton,
|
|
1168
1183
|
onClick: t,
|
|
1169
1184
|
"aria-label": "Open menu",
|
|
1170
|
-
children: /* @__PURE__ */ e(
|
|
1185
|
+
children: /* @__PURE__ */ e(tt, { className: $.burgerIcon })
|
|
1171
1186
|
}
|
|
1172
1187
|
),
|
|
1173
|
-
/* @__PURE__ */ e("div", { className:
|
|
1188
|
+
/* @__PURE__ */ e("div", { className: $.logo })
|
|
1174
1189
|
] }),
|
|
1175
|
-
/* @__PURE__ */
|
|
1176
|
-
/* @__PURE__ */ e(ea, { language:
|
|
1177
|
-
/* @__PURE__ */
|
|
1178
|
-
/* @__PURE__ */
|
|
1190
|
+
/* @__PURE__ */ i("nav", { className: $.nav, children: [
|
|
1191
|
+
/* @__PURE__ */ e(ea, { language: s.language }),
|
|
1192
|
+
/* @__PURE__ */ i("div", { className: $.themeDropdown, ref: w, children: [
|
|
1193
|
+
/* @__PURE__ */ i(
|
|
1179
1194
|
"button",
|
|
1180
1195
|
{
|
|
1181
1196
|
type: "button",
|
|
1182
|
-
className:
|
|
1183
|
-
onClick: () =>
|
|
1184
|
-
"aria-expanded":
|
|
1197
|
+
className: $.themeButton,
|
|
1198
|
+
onClick: () => m(!a),
|
|
1199
|
+
"aria-expanded": a,
|
|
1185
1200
|
"aria-haspopup": "true",
|
|
1186
1201
|
"aria-label": n("ui.theme"),
|
|
1187
1202
|
children: [
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
/* @__PURE__ */ e(
|
|
1203
|
+
o === "light" && /* @__PURE__ */ e(Pe, { className: $.themeIcon }),
|
|
1204
|
+
o === "dark" && /* @__PURE__ */ e(Me, { className: $.themeIcon }),
|
|
1205
|
+
o === "system" && /* @__PURE__ */ e(Be, { className: $.themeIcon }),
|
|
1206
|
+
/* @__PURE__ */ e(_e, { className: $.caretIcon })
|
|
1192
1207
|
]
|
|
1193
1208
|
}
|
|
1194
1209
|
),
|
|
1195
|
-
|
|
1196
|
-
/* @__PURE__ */
|
|
1210
|
+
a && /* @__PURE__ */ i("div", { className: $.dropdownMenu, children: [
|
|
1211
|
+
/* @__PURE__ */ i(
|
|
1197
1212
|
"button",
|
|
1198
1213
|
{
|
|
1199
1214
|
type: "button",
|
|
1200
1215
|
onClick: () => {
|
|
1201
|
-
|
|
1216
|
+
l("light"), m(!1);
|
|
1202
1217
|
},
|
|
1203
|
-
className:
|
|
1218
|
+
className: $.dropdownItem,
|
|
1204
1219
|
children: [
|
|
1205
|
-
/* @__PURE__ */ e(
|
|
1220
|
+
/* @__PURE__ */ e(Pe, { className: $.dropdownIcon }),
|
|
1206
1221
|
n("ui.light")
|
|
1207
1222
|
]
|
|
1208
1223
|
}
|
|
1209
1224
|
),
|
|
1210
|
-
/* @__PURE__ */
|
|
1225
|
+
/* @__PURE__ */ i(
|
|
1211
1226
|
"button",
|
|
1212
1227
|
{
|
|
1213
1228
|
type: "button",
|
|
1214
1229
|
onClick: () => {
|
|
1215
|
-
|
|
1230
|
+
l("dark"), m(!1);
|
|
1216
1231
|
},
|
|
1217
|
-
className:
|
|
1232
|
+
className: $.dropdownItem,
|
|
1218
1233
|
children: [
|
|
1219
|
-
/* @__PURE__ */ e(
|
|
1234
|
+
/* @__PURE__ */ e(Me, { className: $.dropdownIcon }),
|
|
1220
1235
|
n("ui.dark")
|
|
1221
1236
|
]
|
|
1222
1237
|
}
|
|
1223
1238
|
),
|
|
1224
|
-
/* @__PURE__ */
|
|
1239
|
+
/* @__PURE__ */ i(
|
|
1225
1240
|
"button",
|
|
1226
1241
|
{
|
|
1227
1242
|
type: "button",
|
|
1228
1243
|
onClick: () => {
|
|
1229
|
-
|
|
1244
|
+
l("system"), m(!1);
|
|
1230
1245
|
},
|
|
1231
|
-
className:
|
|
1246
|
+
className: $.dropdownItem,
|
|
1232
1247
|
children: [
|
|
1233
|
-
/* @__PURE__ */ e(
|
|
1248
|
+
/* @__PURE__ */ e(Be, { className: $.dropdownIcon }),
|
|
1234
1249
|
n("ui.system")
|
|
1235
1250
|
]
|
|
1236
1251
|
}
|
|
1237
1252
|
)
|
|
1238
1253
|
] })
|
|
1239
1254
|
] }),
|
|
1240
|
-
|
|
1241
|
-
/* @__PURE__ */
|
|
1255
|
+
_.length > 0 && /* @__PURE__ */ i("div", { className: $.supportDropdown, ref: v, children: [
|
|
1256
|
+
/* @__PURE__ */ i(
|
|
1242
1257
|
"button",
|
|
1243
1258
|
{
|
|
1244
1259
|
type: "button",
|
|
1245
|
-
className:
|
|
1246
|
-
onClick: () => u(!
|
|
1247
|
-
"aria-expanded":
|
|
1260
|
+
className: $.supportButton,
|
|
1261
|
+
onClick: () => u(!d),
|
|
1262
|
+
"aria-expanded": d,
|
|
1248
1263
|
"aria-haspopup": "true",
|
|
1249
1264
|
children: [
|
|
1250
1265
|
n("ui.support"),
|
|
1251
|
-
/* @__PURE__ */ e(
|
|
1266
|
+
/* @__PURE__ */ e(_e, { className: $.caretIcon })
|
|
1252
1267
|
]
|
|
1253
1268
|
}
|
|
1254
1269
|
),
|
|
1255
|
-
|
|
1256
|
-
const f =
|
|
1257
|
-
return /* @__PURE__ */
|
|
1270
|
+
d && /* @__PURE__ */ e("div", { className: $.dropdownMenu, children: _.map((g, k) => {
|
|
1271
|
+
const f = g.target ?? (g.url.startsWith("http") ? "_blank" : "_self"), b = g.rel ?? (f === "_blank" ? "noopener noreferrer" : void 0), y = g.icon;
|
|
1272
|
+
return /* @__PURE__ */ i(
|
|
1258
1273
|
"a",
|
|
1259
1274
|
{
|
|
1260
|
-
href:
|
|
1275
|
+
href: g.url,
|
|
1261
1276
|
target: f,
|
|
1262
|
-
rel:
|
|
1263
|
-
className:
|
|
1277
|
+
rel: b,
|
|
1278
|
+
className: $.dropdownItem,
|
|
1264
1279
|
children: [
|
|
1265
|
-
|
|
1266
|
-
|
|
1280
|
+
y && /* @__PURE__ */ e(y, { className: $.dropdownIcon }),
|
|
1281
|
+
g.label
|
|
1267
1282
|
]
|
|
1268
1283
|
},
|
|
1269
|
-
|
|
1284
|
+
k
|
|
1270
1285
|
);
|
|
1271
1286
|
}) })
|
|
1272
1287
|
] }),
|
|
1273
|
-
|
|
1274
|
-
const f =
|
|
1275
|
-
return /* @__PURE__ */
|
|
1288
|
+
r.map((g, k) => {
|
|
1289
|
+
const f = g.target ?? (typeof g.url == "string" && g.url.startsWith("http") ? "_blank" : "_self"), b = g.rel ?? (f === "_blank" ? "noopener noreferrer" : void 0), y = g.icon;
|
|
1290
|
+
return /* @__PURE__ */ i(
|
|
1276
1291
|
"a",
|
|
1277
1292
|
{
|
|
1278
|
-
href:
|
|
1293
|
+
href: g.url,
|
|
1279
1294
|
target: f,
|
|
1280
|
-
rel:
|
|
1281
|
-
className:
|
|
1295
|
+
rel: b,
|
|
1296
|
+
className: g.className ?? $.navLink,
|
|
1282
1297
|
children: [
|
|
1283
|
-
|
|
1284
|
-
|
|
1298
|
+
g.label,
|
|
1299
|
+
y && /* @__PURE__ */ e(y, { className: $.externalIcon })
|
|
1285
1300
|
]
|
|
1286
1301
|
},
|
|
1287
|
-
|
|
1302
|
+
k
|
|
1288
1303
|
);
|
|
1289
1304
|
})
|
|
1290
1305
|
] })
|
|
1291
1306
|
] }) }) });
|
|
1292
1307
|
}
|
|
1293
|
-
function
|
|
1308
|
+
function fe({
|
|
1294
1309
|
styles: t,
|
|
1295
1310
|
onLanguageChange: n
|
|
1296
1311
|
}) {
|
|
1297
|
-
const { i18n:
|
|
1298
|
-
const v =
|
|
1299
|
-
let
|
|
1300
|
-
v &&
|
|
1301
|
-
const
|
|
1312
|
+
const { i18n: s } = j(), c = Y(), h = Q(), { config: r } = R(), [_, d] = T(!1), u = G(null), a = s.language, m = (l) => {
|
|
1313
|
+
const v = r.basePath || "";
|
|
1314
|
+
let w = c.pathname;
|
|
1315
|
+
v && w.startsWith(v) && (w = w.slice(v.length));
|
|
1316
|
+
const g = w.split("/").filter(Boolean), k = g[0];
|
|
1302
1317
|
let f = "";
|
|
1303
|
-
|
|
1304
|
-
const
|
|
1305
|
-
|
|
1318
|
+
r.supportedLanguages.includes(k) ? (g[0] = l, f = `${v}/${g.join("/")}`) : f = `${v}/${l}${w}`;
|
|
1319
|
+
const b = f + c.search + c.hash;
|
|
1320
|
+
s.changeLanguage(l), h(b), d(!1), n == null || n();
|
|
1306
1321
|
};
|
|
1307
|
-
|
|
1308
|
-
const
|
|
1309
|
-
u.current && !u.current.contains(v.target) &&
|
|
1322
|
+
S(() => {
|
|
1323
|
+
const l = (v) => {
|
|
1324
|
+
u.current && !u.current.contains(v.target) && d(!1);
|
|
1310
1325
|
};
|
|
1311
|
-
return document.addEventListener("mousedown",
|
|
1326
|
+
return document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
|
|
1312
1327
|
}, []);
|
|
1313
|
-
const
|
|
1314
|
-
return /* @__PURE__ */
|
|
1315
|
-
/* @__PURE__ */
|
|
1328
|
+
const o = (l) => s.getFixedT(l)("language") || l;
|
|
1329
|
+
return /* @__PURE__ */ i("div", { className: t.languageSelect, ref: u, children: [
|
|
1330
|
+
/* @__PURE__ */ i(
|
|
1316
1331
|
"button",
|
|
1317
1332
|
{
|
|
1318
1333
|
type: "button",
|
|
1319
1334
|
className: t.languageButton,
|
|
1320
|
-
onClick: () =>
|
|
1321
|
-
"aria-expanded":
|
|
1335
|
+
onClick: () => d(!_),
|
|
1336
|
+
"aria-expanded": _,
|
|
1322
1337
|
"aria-haspopup": "listbox",
|
|
1323
1338
|
children: [
|
|
1324
|
-
/* @__PURE__ */ e(
|
|
1325
|
-
|
|
1326
|
-
/* @__PURE__ */ e(
|
|
1339
|
+
/* @__PURE__ */ e(nt, { className: t.icon }),
|
|
1340
|
+
o(a),
|
|
1341
|
+
/* @__PURE__ */ e(_e, { className: t.chevron })
|
|
1327
1342
|
]
|
|
1328
1343
|
}
|
|
1329
1344
|
),
|
|
1330
|
-
|
|
1345
|
+
_ && /* @__PURE__ */ e("div", { className: t.languageDropdown, role: "listbox", children: r.supportedLanguages.map((l) => /* @__PURE__ */ e(
|
|
1331
1346
|
"button",
|
|
1332
1347
|
{
|
|
1333
1348
|
type: "button",
|
|
1334
|
-
className: `${t.languageOption} ${
|
|
1335
|
-
onClick: () =>
|
|
1349
|
+
className: `${t.languageOption} ${l === a ? t.selected : ""}`,
|
|
1350
|
+
onClick: () => m(l),
|
|
1336
1351
|
role: "option",
|
|
1337
|
-
"aria-selected":
|
|
1338
|
-
children:
|
|
1352
|
+
"aria-selected": l === a,
|
|
1353
|
+
children: o(l)
|
|
1339
1354
|
},
|
|
1340
|
-
|
|
1355
|
+
l
|
|
1341
1356
|
)) })
|
|
1342
1357
|
] });
|
|
1343
1358
|
}
|
|
1344
|
-
function
|
|
1345
|
-
const { i18n:
|
|
1346
|
-
|
|
1359
|
+
function be({ styles: t, onLinkClick: n }) {
|
|
1360
|
+
const { i18n: s } = j(), c = Y(), { config: h, loadContent: r } = R(), [_, d] = T([]), [u, a] = T({}), [m, o] = T(!0), l = s.language;
|
|
1361
|
+
S(() => {
|
|
1347
1362
|
(async () => {
|
|
1348
|
-
if (!
|
|
1349
|
-
|
|
1363
|
+
if (!h.navigationData) {
|
|
1364
|
+
o(!1);
|
|
1350
1365
|
return;
|
|
1351
1366
|
}
|
|
1352
1367
|
try {
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
),
|
|
1358
|
-
(
|
|
1359
|
-
if (
|
|
1360
|
-
const
|
|
1361
|
-
|
|
1368
|
+
const b = await _t(
|
|
1369
|
+
h.navigationData,
|
|
1370
|
+
l,
|
|
1371
|
+
r
|
|
1372
|
+
), y = b.reduce(
|
|
1373
|
+
(P, N, C) => {
|
|
1374
|
+
if (De(N)) {
|
|
1375
|
+
const M = h.navigationData[C], W = "items" in M && M.defaultOpen === !0;
|
|
1376
|
+
P[N.title] = W;
|
|
1362
1377
|
}
|
|
1363
|
-
return
|
|
1378
|
+
return P;
|
|
1364
1379
|
},
|
|
1365
1380
|
{}
|
|
1366
1381
|
);
|
|
1367
|
-
|
|
1368
|
-
} catch (
|
|
1369
|
-
console.error("Failed to load navigation data:",
|
|
1382
|
+
a(y), d(b), o(!1);
|
|
1383
|
+
} catch (b) {
|
|
1384
|
+
console.error("Failed to load navigation data:", b), o(!1);
|
|
1370
1385
|
}
|
|
1371
1386
|
})();
|
|
1372
|
-
}, [
|
|
1387
|
+
}, [l, h.navigationData, r]);
|
|
1373
1388
|
const v = (f) => {
|
|
1374
|
-
|
|
1375
|
-
...
|
|
1376
|
-
[f]: !
|
|
1389
|
+
a((b) => ({
|
|
1390
|
+
...b,
|
|
1391
|
+
[f]: !b[f]
|
|
1377
1392
|
}));
|
|
1378
|
-
},
|
|
1379
|
-
const
|
|
1380
|
-
let
|
|
1381
|
-
|
|
1382
|
-
const
|
|
1383
|
-
return
|
|
1384
|
-
},
|
|
1385
|
-
const
|
|
1386
|
-
let
|
|
1387
|
-
|
|
1388
|
-
const
|
|
1389
|
-
return
|
|
1390
|
-
},
|
|
1393
|
+
}, w = (f) => {
|
|
1394
|
+
const b = h.basePath || "";
|
|
1395
|
+
let y = c.pathname;
|
|
1396
|
+
b && y.startsWith(b) && (y = y.slice(b.length));
|
|
1397
|
+
const P = y.split("/").filter(Boolean);
|
|
1398
|
+
return P[P.length - 1] === f;
|
|
1399
|
+
}, g = (f) => {
|
|
1400
|
+
const b = h.basePath || "";
|
|
1401
|
+
let y = c.pathname;
|
|
1402
|
+
b && y.startsWith(b) && (y = y.slice(b.length));
|
|
1403
|
+
const P = y.split("/").filter(Boolean);
|
|
1404
|
+
return P[0] && h.supportedLanguages.includes(P[0]) ? `${b}/${P[0]}/${f}` : `${b}/${l}/${f}`;
|
|
1405
|
+
}, k = () => {
|
|
1391
1406
|
n == null || n();
|
|
1392
1407
|
};
|
|
1393
|
-
return
|
|
1394
|
-
/* @__PURE__ */
|
|
1408
|
+
return m ? /* @__PURE__ */ i("div", { className: t.navigation, children: [
|
|
1409
|
+
/* @__PURE__ */ i("div", { className: t.skeletonSection, children: [
|
|
1395
1410
|
/* @__PURE__ */ e("div", { className: t.skeletonSectionTitle }),
|
|
1396
|
-
/* @__PURE__ */
|
|
1411
|
+
/* @__PURE__ */ i("div", { className: t.skeletonSectionItems, children: [
|
|
1397
1412
|
/* @__PURE__ */ e("div", { className: t.skeletonItem }),
|
|
1398
1413
|
/* @__PURE__ */ e("div", { className: t.skeletonItem })
|
|
1399
1414
|
] })
|
|
1400
1415
|
] }),
|
|
1401
|
-
/* @__PURE__ */
|
|
1416
|
+
/* @__PURE__ */ i("div", { className: t.skeletonSection, children: [
|
|
1402
1417
|
/* @__PURE__ */ e("div", { className: t.skeletonSectionTitle }),
|
|
1403
|
-
/* @__PURE__ */
|
|
1418
|
+
/* @__PURE__ */ i("div", { className: t.skeletonSectionItems, children: [
|
|
1404
1419
|
/* @__PURE__ */ e("div", { className: t.skeletonItem }),
|
|
1405
1420
|
/* @__PURE__ */ e("div", { className: t.skeletonItem })
|
|
1406
1421
|
] })
|
|
1407
1422
|
] })
|
|
1408
|
-
] }) : /* @__PURE__ */ e("div", { className: t.navigation, children:
|
|
1409
|
-
/* @__PURE__ */
|
|
1423
|
+
] }) : /* @__PURE__ */ e("div", { className: t.navigation, children: _.map((f) => De(f) ? /* @__PURE__ */ i("div", { className: t.section, children: [
|
|
1424
|
+
/* @__PURE__ */ i(
|
|
1410
1425
|
"button",
|
|
1411
1426
|
{
|
|
1412
1427
|
type: "button",
|
|
@@ -1414,26 +1429,26 @@ function we({ styles: t, onLinkClick: n }) {
|
|
|
1414
1429
|
onClick: () => v(f.title),
|
|
1415
1430
|
children: [
|
|
1416
1431
|
f.title,
|
|
1417
|
-
/* @__PURE__ */ e(
|
|
1432
|
+
/* @__PURE__ */ e(Oe, { className: t.icon })
|
|
1418
1433
|
]
|
|
1419
1434
|
}
|
|
1420
1435
|
),
|
|
1421
|
-
u[f.title] && /* @__PURE__ */ e("div", { className: t.sectionItems, children: f.items.map((
|
|
1422
|
-
|
|
1436
|
+
u[f.title] && /* @__PURE__ */ e("div", { className: t.sectionItems, children: f.items.map((b) => /* @__PURE__ */ e(
|
|
1437
|
+
de,
|
|
1423
1438
|
{
|
|
1424
|
-
to:
|
|
1425
|
-
className: `${t.navItem} ${
|
|
1426
|
-
onClick:
|
|
1427
|
-
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children:
|
|
1439
|
+
to: g(b.slug),
|
|
1440
|
+
className: `${t.navItem} ${w(b.slug) ? t.active : ""}`,
|
|
1441
|
+
onClick: k,
|
|
1442
|
+
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: b.title }) })
|
|
1428
1443
|
},
|
|
1429
|
-
|
|
1444
|
+
b.slug
|
|
1430
1445
|
)) })
|
|
1431
1446
|
] }, f.title) : /* @__PURE__ */ e(
|
|
1432
|
-
|
|
1447
|
+
de,
|
|
1433
1448
|
{
|
|
1434
|
-
to:
|
|
1435
|
-
className: `${t.navItem} ${
|
|
1436
|
-
onClick:
|
|
1449
|
+
to: g(f.slug),
|
|
1450
|
+
className: `${t.navItem} ${w(f.slug) ? t.active : ""}`,
|
|
1451
|
+
onClick: k,
|
|
1437
1452
|
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: f.title }) })
|
|
1438
1453
|
},
|
|
1439
1454
|
f.slug
|
|
@@ -1442,82 +1457,82 @@ function we({ styles: t, onLinkClick: n }) {
|
|
|
1442
1457
|
function Zo({
|
|
1443
1458
|
styles: t,
|
|
1444
1459
|
onLinkClick: n,
|
|
1445
|
-
onLanguageChange:
|
|
1460
|
+
onLanguageChange: s
|
|
1446
1461
|
}) {
|
|
1447
|
-
return /* @__PURE__ */
|
|
1448
|
-
/* @__PURE__ */ e(
|
|
1449
|
-
/* @__PURE__ */ e(
|
|
1462
|
+
return /* @__PURE__ */ i(U, { children: [
|
|
1463
|
+
/* @__PURE__ */ e(fe, { styles: t, onLanguageChange: s }),
|
|
1464
|
+
/* @__PURE__ */ e(be, { styles: t, onLinkClick: n })
|
|
1450
1465
|
] });
|
|
1451
1466
|
}
|
|
1452
|
-
const Na = "_backdrop_1a7pu_1", wa = "_open_1a7pu_13", Ia = "_mobileMenu_1a7pu_18",
|
|
1467
|
+
const Na = "_backdrop_1a7pu_1", wa = "_open_1a7pu_13", Ia = "_mobileMenu_1a7pu_18", ya = "_header_1a7pu_37", $a = "_brand_1a7pu_46", Ca = "_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", Aa = "_languageDropdown_1a7pu_172", Da = "_languageOption_1a7pu_185", ja = "_selected_1a7pu_226", Ra = "_scrollArea_1a7pu_231", qa = "_navigation_1a7pu_237", Oa = "_section_1a7pu_241", Wa = "_sectionButton_1a7pu_245", Ha = "_expanded_1a7pu_285", Fa = "_sectionItems_1a7pu_289", za = "_navItem_1a7pu_297", Ka = "_active_1a7pu_310", Ua = "_navItemContent_1a7pu_316", Ga = "_navItemTitle_1a7pu_322", O = {
|
|
1453
1468
|
backdrop: Na,
|
|
1454
1469
|
open: wa,
|
|
1455
1470
|
mobileMenu: Ia,
|
|
1456
|
-
header:
|
|
1457
|
-
brand:
|
|
1458
|
-
cloudIcon:
|
|
1471
|
+
header: ya,
|
|
1472
|
+
brand: $a,
|
|
1473
|
+
cloudIcon: Ca,
|
|
1459
1474
|
title: Ta,
|
|
1460
1475
|
closeButton: La,
|
|
1461
1476
|
closeIcon: xa,
|
|
1462
1477
|
languageSection: Sa,
|
|
1463
1478
|
languageSelect: Pa,
|
|
1464
|
-
languageButton:
|
|
1465
|
-
icon:
|
|
1466
|
-
chevron:
|
|
1467
|
-
languageDropdown:
|
|
1468
|
-
languageOption:
|
|
1469
|
-
selected:
|
|
1470
|
-
scrollArea:
|
|
1471
|
-
navigation:
|
|
1472
|
-
section:
|
|
1479
|
+
languageButton: Ma,
|
|
1480
|
+
icon: Ba,
|
|
1481
|
+
chevron: Ea,
|
|
1482
|
+
languageDropdown: Aa,
|
|
1483
|
+
languageOption: Da,
|
|
1484
|
+
selected: ja,
|
|
1485
|
+
scrollArea: Ra,
|
|
1486
|
+
navigation: qa,
|
|
1487
|
+
section: Oa,
|
|
1473
1488
|
sectionButton: Wa,
|
|
1474
1489
|
expanded: Ha,
|
|
1475
|
-
sectionItems:
|
|
1476
|
-
navItem:
|
|
1490
|
+
sectionItems: Fa,
|
|
1491
|
+
navItem: za,
|
|
1477
1492
|
active: Ka,
|
|
1478
1493
|
navItemContent: Ua,
|
|
1479
1494
|
navItemTitle: Ga
|
|
1480
1495
|
};
|
|
1481
1496
|
function Qa({ isOpen: t, onClose: n }) {
|
|
1482
|
-
const { config:
|
|
1483
|
-
return
|
|
1497
|
+
const { config: s } = R(), c = s.logo;
|
|
1498
|
+
return S(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
|
1484
1499
|
document.body.style.overflow = "unset";
|
|
1485
|
-
}), [t]),
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1500
|
+
}), [t]), S(() => {
|
|
1501
|
+
const h = (r) => {
|
|
1502
|
+
r.key === "Escape" && t && n();
|
|
1488
1503
|
};
|
|
1489
|
-
return document.addEventListener("keydown",
|
|
1490
|
-
}, [t, n]), /* @__PURE__ */
|
|
1504
|
+
return document.addEventListener("keydown", h), () => document.removeEventListener("keydown", h);
|
|
1505
|
+
}, [t, n]), /* @__PURE__ */ i(U, { children: [
|
|
1491
1506
|
/* @__PURE__ */ e(
|
|
1492
1507
|
"div",
|
|
1493
1508
|
{
|
|
1494
|
-
className: `${
|
|
1509
|
+
className: `${O.backdrop} ${t ? O.open : ""}`,
|
|
1495
1510
|
onClick: n
|
|
1496
1511
|
}
|
|
1497
1512
|
),
|
|
1498
|
-
/* @__PURE__ */
|
|
1499
|
-
/* @__PURE__ */
|
|
1500
|
-
/* @__PURE__ */
|
|
1501
|
-
|
|
1502
|
-
/* @__PURE__ */ e("h1", { className:
|
|
1513
|
+
/* @__PURE__ */ i("div", { className: `${O.mobileMenu} ${t ? O.open : ""}`, children: [
|
|
1514
|
+
/* @__PURE__ */ i("div", { className: O.header, children: [
|
|
1515
|
+
/* @__PURE__ */ i("div", { className: O.brand, children: [
|
|
1516
|
+
c && /* @__PURE__ */ e(c, { className: O.cloudIcon }),
|
|
1517
|
+
/* @__PURE__ */ e("h1", { className: O.title, children: s.title })
|
|
1503
1518
|
] }),
|
|
1504
1519
|
/* @__PURE__ */ e(
|
|
1505
1520
|
"button",
|
|
1506
1521
|
{
|
|
1507
1522
|
type: "button",
|
|
1508
|
-
className:
|
|
1523
|
+
className: O.closeButton,
|
|
1509
1524
|
onClick: n,
|
|
1510
1525
|
"aria-label": "Close menu",
|
|
1511
|
-
children: /* @__PURE__ */ e(
|
|
1526
|
+
children: /* @__PURE__ */ e(ve, { className: O.closeIcon })
|
|
1512
1527
|
}
|
|
1513
1528
|
)
|
|
1514
1529
|
] }),
|
|
1515
|
-
/* @__PURE__ */ e("div", { className:
|
|
1516
|
-
/* @__PURE__ */ e("div", { className:
|
|
1530
|
+
/* @__PURE__ */ e("div", { className: O.languageSection, children: /* @__PURE__ */ e(fe, { styles: O, onLanguageChange: n }) }),
|
|
1531
|
+
/* @__PURE__ */ e("div", { className: O.scrollArea, children: /* @__PURE__ */ e(be, { styles: O, onLinkClick: n }) })
|
|
1517
1532
|
] })
|
|
1518
1533
|
] });
|
|
1519
1534
|
}
|
|
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",
|
|
1535
|
+
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", vo = "_skeletonSection_1qgjy_267", fo = "_skeletonSectionTitle_1qgjy_274", bo = "_skeleton-loading_1qgjy_1", ko = "_skeletonSectionItems_1qgjy_294", No = "_skeletonItem_1qgjy_302", K = {
|
|
1521
1536
|
sidebar: Xa,
|
|
1522
1537
|
header: Ya,
|
|
1523
1538
|
brand: Va,
|
|
@@ -1536,168 +1551,134 @@ const Xa = "_sidebar_1qgjy_1", Ya = "_header_1qgjy_17", Va = "_brand_1qgjy_29",
|
|
|
1536
1551
|
sectionButton: uo,
|
|
1537
1552
|
expanded: ho,
|
|
1538
1553
|
sectionItems: mo,
|
|
1539
|
-
navItem:
|
|
1540
|
-
active:
|
|
1554
|
+
navItem: _o,
|
|
1555
|
+
active: go,
|
|
1541
1556
|
navItemContent: po,
|
|
1542
|
-
skeletonSection:
|
|
1543
|
-
skeletonSectionTitle:
|
|
1557
|
+
skeletonSection: vo,
|
|
1558
|
+
skeletonSectionTitle: fo,
|
|
1544
1559
|
"skeleton-loading": "_skeleton-loading_1qgjy_1",
|
|
1545
1560
|
skeletonLoading: bo,
|
|
1546
1561
|
skeletonSectionItems: ko,
|
|
1547
1562
|
skeletonItem: No
|
|
1548
1563
|
};
|
|
1549
1564
|
function wo() {
|
|
1550
|
-
const { config: t } =
|
|
1551
|
-
return /* @__PURE__ */
|
|
1552
|
-
/* @__PURE__ */
|
|
1553
|
-
/* @__PURE__ */
|
|
1565
|
+
const { config: t } = R(), n = t.logo, s = t.supportedLanguages.length > 1;
|
|
1566
|
+
return /* @__PURE__ */ i("div", { className: K.sidebar, children: [
|
|
1567
|
+
/* @__PURE__ */ i("div", { className: K.header, children: [
|
|
1568
|
+
/* @__PURE__ */ i("div", { className: K.brand, children: [
|
|
1554
1569
|
n && /* @__PURE__ */ e(n, { className: K.cloudIcon }),
|
|
1555
1570
|
/* @__PURE__ */ e("div", { className: K.title, children: t.title })
|
|
1556
1571
|
] }),
|
|
1557
|
-
|
|
1572
|
+
s && /* @__PURE__ */ e(fe, { styles: K })
|
|
1558
1573
|
] }),
|
|
1559
|
-
/* @__PURE__ */ e("div", { className: K.scrollArea, children: /* @__PURE__ */ e(
|
|
1574
|
+
/* @__PURE__ */ e("div", { className: K.scrollArea, children: /* @__PURE__ */ e(be, { styles: K }) })
|
|
1560
1575
|
] });
|
|
1561
1576
|
}
|
|
1562
|
-
const Io = "_app_wf6ni_1",
|
|
1577
|
+
const Io = "_app_wf6ni_1", yo = "_layout_wf6ni_9", $o = "_main_wf6ni_15", Co = "_fullWidth_wf6ni_21", To = "_contentWrapper_wf6ni_30", se = {
|
|
1563
1578
|
app: Io,
|
|
1564
|
-
layout:
|
|
1565
|
-
main:
|
|
1566
|
-
fullWidth:
|
|
1579
|
+
layout: yo,
|
|
1580
|
+
main: $o,
|
|
1581
|
+
fullWidth: Co,
|
|
1567
1582
|
contentWrapper: To
|
|
1568
1583
|
};
|
|
1569
1584
|
function Lo({ children: t }) {
|
|
1570
|
-
const { language: n } =
|
|
1571
|
-
|
|
1572
|
-
n &&
|
|
1573
|
-
}, [n,
|
|
1574
|
-
const
|
|
1575
|
-
|
|
1576
|
-
},
|
|
1577
|
-
|
|
1585
|
+
const { language: n } = pe(), { i18n: s } = j(), { config: c } = R(), [h, r] = T(!1);
|
|
1586
|
+
S(() => {
|
|
1587
|
+
n && c.supportedLanguages.includes(n) && s.changeLanguage(n);
|
|
1588
|
+
}, [n, s, c.supportedLanguages]);
|
|
1589
|
+
const _ = () => {
|
|
1590
|
+
r(!h);
|
|
1591
|
+
}, d = () => {
|
|
1592
|
+
r(!1);
|
|
1578
1593
|
};
|
|
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
|
-
|
|
1594
|
+
if (!n || !c.supportedLanguages.includes(n))
|
|
1595
|
+
return /* @__PURE__ */ e(qe, { to: "/en/welcome", replace: !0 });
|
|
1596
|
+
const u = !!c.header, a = c.showSideMenu !== !1, m = c.contentMaxWidth ? { width: "100%", maxWidth: c.contentMaxWidth } : void 0;
|
|
1597
|
+
return /* @__PURE__ */ i("div", { className: se.app, children: [
|
|
1598
|
+
u && /* @__PURE__ */ e(ka, { onMobileMenuToggle: _ }),
|
|
1599
|
+
/* @__PURE__ */ e(Qa, { isOpen: h, onClose: d }),
|
|
1600
|
+
/* @__PURE__ */ i("div", { className: se.layout, children: [
|
|
1601
|
+
a && /* @__PURE__ */ e(wo, {}),
|
|
1587
1602
|
/* @__PURE__ */ e(
|
|
1588
1603
|
"main",
|
|
1589
1604
|
{
|
|
1590
|
-
className: `${
|
|
1591
|
-
children: /* @__PURE__ */ e("div", { className:
|
|
1605
|
+
className: `${se.main} ${a ? "" : se.fullWidth}`,
|
|
1606
|
+
children: /* @__PURE__ */ e("div", { className: se.contentWrapper, style: m, children: t })
|
|
1592
1607
|
}
|
|
1593
1608
|
)
|
|
1594
1609
|
] })
|
|
1595
1610
|
] });
|
|
1596
1611
|
}
|
|
1597
|
-
const xo = "
|
|
1612
|
+
const xo = "_homePage_1otqy_1", So = "_header_1otqy_20", Po = "_title_1otqy_24", Mo = "_articlesList_1otqy_31", Bo = "_articleCard_1otqy_37", Eo = "_articleTitle_1otqy_56", Ao = "_articleDescription_1otqy_63", Do = "_empty_1otqy_71", jo = "_skeletonCard_1otqy_85", Ro = "_skeletonTitle_1otqy_95", qo = "_skeletonText_1otqy_104", Oo = "_skeletonMetadata_1otqy_113", E = {
|
|
1598
1613
|
homePage: xo,
|
|
1599
1614
|
header: So,
|
|
1600
1615
|
title: Po,
|
|
1601
|
-
articlesList:
|
|
1602
|
-
articleCard:
|
|
1603
|
-
articleTitle:
|
|
1604
|
-
articleDescription:
|
|
1605
|
-
empty:
|
|
1606
|
-
skeletonCard:
|
|
1607
|
-
skeletonTitle:
|
|
1608
|
-
skeletonText:
|
|
1609
|
-
skeletonMetadata:
|
|
1616
|
+
articlesList: Mo,
|
|
1617
|
+
articleCard: Bo,
|
|
1618
|
+
articleTitle: Eo,
|
|
1619
|
+
articleDescription: Ao,
|
|
1620
|
+
empty: Do,
|
|
1621
|
+
skeletonCard: jo,
|
|
1622
|
+
skeletonTitle: Ro,
|
|
1623
|
+
skeletonText: qo,
|
|
1624
|
+
skeletonMetadata: Oo
|
|
1610
1625
|
};
|
|
1611
1626
|
function Wo() {
|
|
1612
|
-
const { i18n: t, t: n } =
|
|
1613
|
-
|
|
1627
|
+
const { i18n: t, t: n } = j(), { config: s, discoverArticles: c } = R(), h = Q(), [r, _] = T([]), [d, u] = T(!0), a = s.articleTitleFont ? { fontFamily: s.articleTitleFont } : void 0;
|
|
1628
|
+
S(() => {
|
|
1614
1629
|
(async () => {
|
|
1615
1630
|
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:", _);
|
|
1631
|
+
const l = await c(t.language);
|
|
1632
|
+
_(l.slice(0, 50));
|
|
1633
|
+
} catch (l) {
|
|
1634
|
+
console.error("Failed to load articles:", l);
|
|
1654
1635
|
} finally {
|
|
1655
1636
|
u(!1);
|
|
1656
1637
|
}
|
|
1657
1638
|
})();
|
|
1658
|
-
}, [t.language,
|
|
1659
|
-
const
|
|
1660
|
-
const
|
|
1661
|
-
window.scrollTo({ top: 0, left: 0, behavior: "auto" }),
|
|
1639
|
+
}, [t.language, c]);
|
|
1640
|
+
const m = (o) => {
|
|
1641
|
+
const l = s.basePath || "";
|
|
1642
|
+
window.scrollTo({ top: 0, left: 0, behavior: "auto" }), h(`${l}/${t.language}/${o}`);
|
|
1662
1643
|
};
|
|
1663
|
-
return
|
|
1644
|
+
return d ? /* @__PURE__ */ i("div", { className: E.homePage, children: [
|
|
1664
1645
|
/* @__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((
|
|
1646
|
+
/* @__PURE__ */ e("div", { className: E.articlesList, children: [...Array(5)].map((o, l) => /* @__PURE__ */ i("div", { className: E.skeletonCard, children: [
|
|
1666
1647
|
/* @__PURE__ */ e("div", { className: E.skeletonTitle }),
|
|
1667
1648
|
/* @__PURE__ */ e("div", { className: E.skeletonText }),
|
|
1668
1649
|
/* @__PURE__ */ e("div", { className: E.skeletonText }),
|
|
1669
1650
|
/* @__PURE__ */ e("div", { className: E.skeletonMetadata })
|
|
1670
|
-
] },
|
|
1671
|
-
] }) :
|
|
1672
|
-
/* @__PURE__ */
|
|
1651
|
+
] }, l)) })
|
|
1652
|
+
] }) : r.length === 0 ? /* @__PURE__ */ e("div", { className: E.empty, children: n("ui.noArticlesFound") }) : /* @__PURE__ */ i(U, { children: [
|
|
1653
|
+
/* @__PURE__ */ i("div", { className: E.homePage, children: [
|
|
1673
1654
|
/* @__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:
|
|
1655
|
+
/* @__PURE__ */ e("div", { className: E.articlesList, children: r.map((o) => /* @__PURE__ */ i(
|
|
1675
1656
|
"button",
|
|
1676
1657
|
{
|
|
1677
1658
|
className: E.articleCard,
|
|
1678
|
-
onClick: () =>
|
|
1659
|
+
onClick: () => m(o.slug),
|
|
1679
1660
|
type: "button",
|
|
1680
1661
|
children: [
|
|
1681
|
-
/* @__PURE__ */ e("h2", { className: E.articleTitle, children:
|
|
1682
|
-
|
|
1683
|
-
/* @__PURE__ */ e(
|
|
1662
|
+
/* @__PURE__ */ e("h2", { className: E.articleTitle, style: a, children: o.title }),
|
|
1663
|
+
o.description && /* @__PURE__ */ e("p", { className: E.articleDescription, children: o.description }),
|
|
1664
|
+
/* @__PURE__ */ e(ge, { date: o.date, author: o.author })
|
|
1684
1665
|
]
|
|
1685
1666
|
},
|
|
1686
|
-
|
|
1667
|
+
o.slug
|
|
1687
1668
|
)) })
|
|
1688
1669
|
] }),
|
|
1689
|
-
/* @__PURE__ */ e(
|
|
1670
|
+
/* @__PURE__ */ e(Bt, {})
|
|
1690
1671
|
] });
|
|
1691
1672
|
}
|
|
1692
1673
|
function es() {
|
|
1693
|
-
const { language: t } =
|
|
1694
|
-
return /* @__PURE__ */ e(Lo, { children: /* @__PURE__ */
|
|
1695
|
-
/* @__PURE__ */ e(
|
|
1674
|
+
const { language: t } = pe(), { config: n } = R();
|
|
1675
|
+
return /* @__PURE__ */ e(Lo, { children: /* @__PURE__ */ i(Xe, { children: [
|
|
1676
|
+
/* @__PURE__ */ e(xe, { path: "/:slug", element: /* @__PURE__ */ e(An, { language: t }) }),
|
|
1696
1677
|
/* @__PURE__ */ e(
|
|
1697
|
-
|
|
1678
|
+
xe,
|
|
1698
1679
|
{
|
|
1699
1680
|
index: !0,
|
|
1700
|
-
element: (n.defaultRoute || "latest") === "latest" ? /* @__PURE__ */ e(Wo, {}) : /* @__PURE__ */ e(
|
|
1681
|
+
element: (n.defaultRoute || "latest") === "latest" ? /* @__PURE__ */ e(Wo, {}) : /* @__PURE__ */ e(qe, { to: `./${n.defaultRoute}`, replace: !0 })
|
|
1701
1682
|
}
|
|
1702
1683
|
)
|
|
1703
1684
|
] }) });
|
|
@@ -1713,47 +1694,47 @@ function ts() {
|
|
|
1713
1694
|
};
|
|
1714
1695
|
}
|
|
1715
1696
|
function ns() {
|
|
1716
|
-
const { i18n: t } =
|
|
1717
|
-
return (
|
|
1718
|
-
const
|
|
1719
|
-
let
|
|
1720
|
-
|
|
1721
|
-
const
|
|
1722
|
-
let
|
|
1723
|
-
|
|
1724
|
-
const
|
|
1725
|
-
t.changeLanguage(
|
|
1697
|
+
const { i18n: t } = j(), n = Y(), s = Q(), { config: c } = R();
|
|
1698
|
+
return (h) => {
|
|
1699
|
+
const r = c.basePath || "";
|
|
1700
|
+
let _ = n.pathname;
|
|
1701
|
+
r && _.startsWith(r) && (_ = _.slice(r.length));
|
|
1702
|
+
const d = _.split("/").filter(Boolean), u = d[0];
|
|
1703
|
+
let a = "";
|
|
1704
|
+
c.supportedLanguages.includes(u) ? (d[0] = h, a = `${r}/${d.join("/")}`) : a = `${r}/${h}${_}`;
|
|
1705
|
+
const m = a + n.search + n.hash;
|
|
1706
|
+
t.changeLanguage(h), s(m);
|
|
1726
1707
|
};
|
|
1727
1708
|
}
|
|
1728
1709
|
export {
|
|
1729
|
-
|
|
1710
|
+
ut as AdvancedModeToggle,
|
|
1730
1711
|
Tt as ArticleNavigation,
|
|
1731
1712
|
Jo as BlogProvider,
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1713
|
+
ht as BlogRoot,
|
|
1714
|
+
Bt as BlogSidebar,
|
|
1715
|
+
Ot as Breadcrumb,
|
|
1716
|
+
An as ContentPage,
|
|
1736
1717
|
Lo as DocumentationLayout,
|
|
1737
1718
|
es as DocumentationRoutes,
|
|
1738
1719
|
ka as Header,
|
|
1739
1720
|
Wo as HomePage,
|
|
1740
|
-
|
|
1741
|
-
|
|
1721
|
+
fe as LanguageSelector,
|
|
1722
|
+
ge as Metadata,
|
|
1742
1723
|
Qa as MobileMenu,
|
|
1743
1724
|
Zo as NavigationContent,
|
|
1744
|
-
|
|
1725
|
+
be as NavigationMenu,
|
|
1745
1726
|
ea as SearchBar,
|
|
1746
1727
|
wo as Sidebar,
|
|
1747
1728
|
an as TableOfContents,
|
|
1748
1729
|
pn as TagResultsModal,
|
|
1749
1730
|
In as Tags,
|
|
1750
1731
|
Vo as createBlogUtils,
|
|
1751
|
-
|
|
1732
|
+
He as createContentLoaders,
|
|
1752
1733
|
ee as generateHeadingId,
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1734
|
+
gt as getAdjacentArticles,
|
|
1735
|
+
_t as getNavigationData,
|
|
1736
|
+
R as useBlogConfig,
|
|
1756
1737
|
ns as useLanguageChange,
|
|
1757
1738
|
ts as useSearchModal,
|
|
1758
|
-
|
|
1739
|
+
ze as useTheme
|
|
1759
1740
|
};
|