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