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