@x-wave/blog 1.0.24 → 1.0.27
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 +173 -176
- package/locales/index.ts +1 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as h, jsx as e, Fragment as z } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as E } from "react-i18next";
|
|
3
|
-
import { useLocation as G, useNavigate as F, useParams as
|
|
3
|
+
import { useLocation as G, useNavigate as F, useParams as ce, Link as he, Navigate as Ne, Routes as Se, Route as ge } from "react-router-dom";
|
|
4
4
|
import { useState as L, useEffect as S, createContext as Pe, useContext as De, useRef as H } from "react";
|
|
5
5
|
import Be from "react-markdown";
|
|
6
6
|
import Me from "remark-gfm";
|
|
7
7
|
import ae from "i18next";
|
|
8
|
-
import { User as Ee, CalendarBlank as Re, X as
|
|
9
|
-
import { createPortal as
|
|
8
|
+
import { User as Ee, CalendarBlank as Re, X as re, Tag as Oe, MagnifyingGlass as me, List as je, Sun as _e, Moon as pe, Monitor as fe, CaretDown as se, Globe as Ae, CaretRight as We } from "@phosphor-icons/react";
|
|
9
|
+
import { createPortal as $e } from "react-dom";
|
|
10
10
|
const He = "_tabContainer_zk6h4_1", qe = "_tab_zk6h4_1", Fe = "_active_zk6h4_45", Q = {
|
|
11
11
|
tabContainer: He,
|
|
12
12
|
tab: qe,
|
|
@@ -19,8 +19,8 @@ function Ue({ hasAdvanced: t }) {
|
|
|
19
19
|
if (s) {
|
|
20
20
|
const g = new URLSearchParams(a.search);
|
|
21
21
|
g.delete("advanced");
|
|
22
|
-
const _ = g.toString(),
|
|
23
|
-
o(`${a.pathname}${
|
|
22
|
+
const _ = g.toString(), u = _ ? `?${_}` : "";
|
|
23
|
+
o(`${a.pathname}${u}${a.hash}`);
|
|
24
24
|
}
|
|
25
25
|
}, m = () => {
|
|
26
26
|
if (!s) {
|
|
@@ -28,7 +28,7 @@ function Ue({ hasAdvanced: t }) {
|
|
|
28
28
|
g.set("advanced", ""), o(`${a.pathname}?${g.toString()}${a.hash}`);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ h("div", { className: Q.tabContainer, children: [
|
|
32
32
|
/* @__PURE__ */ e(
|
|
33
33
|
"button",
|
|
34
34
|
{
|
|
@@ -52,16 +52,16 @@ function Ue({ hasAdvanced: t }) {
|
|
|
52
52
|
function Ke({ children: t }) {
|
|
53
53
|
return /* @__PURE__ */ e("div", { className: "xw-blog-root", children: t });
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function xe(t) {
|
|
56
56
|
function n(a) {
|
|
57
57
|
const o = a.match(/^---\s*\n([\s\S]*?)\n---\s*\n/);
|
|
58
58
|
if (!o) return { frontmatter: {}, content: a };
|
|
59
59
|
const c = {}, s = o[1];
|
|
60
60
|
let i = "", m = !1;
|
|
61
61
|
const g = [];
|
|
62
|
-
for (const
|
|
62
|
+
for (const u of s.split(`
|
|
63
63
|
`)) {
|
|
64
|
-
const b =
|
|
64
|
+
const b = u.trim();
|
|
65
65
|
if (b.startsWith("-")) {
|
|
66
66
|
if (m) {
|
|
67
67
|
const p = b.substring(1).trim();
|
|
@@ -93,8 +93,8 @@ function Ce(t) {
|
|
|
93
93
|
async loadMDXContent(a, o, c = !1) {
|
|
94
94
|
const s = c ? `${o}-advanced.mdx` : `${o}.mdx`, i = `./docs/${a}/${s}`, m = t[i];
|
|
95
95
|
if (!m) throw new Error(`File not found: ${i}`);
|
|
96
|
-
const g = await m(), { frontmatter: _, content:
|
|
97
|
-
return { content:
|
|
96
|
+
const g = await m(), { frontmatter: _, content: u } = n(g);
|
|
97
|
+
return { content: u, frontmatter: _ };
|
|
98
98
|
},
|
|
99
99
|
/**
|
|
100
100
|
* Load English content for generating consistent heading IDs.
|
|
@@ -119,7 +119,7 @@ function Ce(t) {
|
|
|
119
119
|
);
|
|
120
120
|
for (const i of s)
|
|
121
121
|
try {
|
|
122
|
-
const m = t[i], g = await m(), { frontmatter: _, content:
|
|
122
|
+
const m = t[i], g = await m(), { frontmatter: _, content: u } = n(g), b = i.split("/").pop() || "", p = b.replace(".mdx", "").replace("-advanced", ""), d = u.match(/^#\s+(.+)$/m), l = d ? d[1].trim() : p;
|
|
123
123
|
if (b.includes("-advanced")) continue;
|
|
124
124
|
const r = _.tags;
|
|
125
125
|
if (r && Array.isArray(r))
|
|
@@ -133,30 +133,30 @@ function Ce(t) {
|
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
135
|
function Va(t) {
|
|
136
|
-
const n =
|
|
136
|
+
const n = xe(t);
|
|
137
137
|
return {
|
|
138
138
|
mdxFiles: t,
|
|
139
139
|
loadContent: n.loadMDXContent,
|
|
140
140
|
loadEnglishContent: n.loadEnglishContent
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
|
-
const
|
|
144
|
-
const n = () => t || (typeof window > "u" ? "system" : localStorage.getItem(
|
|
143
|
+
const ve = "app-theme", Ce = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", be = (t) => t === "system" ? Ce() : t, Ie = (t) => {
|
|
144
|
+
const n = () => t || (typeof window > "u" ? "system" : localStorage.getItem(ve) || "system"), [a, o] = L(n);
|
|
145
145
|
return S(() => {
|
|
146
|
-
const s =
|
|
146
|
+
const s = be(a), i = document.querySelector(".xw-blog-root");
|
|
147
147
|
if (i && (i.classList.remove("light", "dark"), i.classList.add(s)), a === "system") {
|
|
148
148
|
const m = window.matchMedia("(prefers-color-scheme: dark)"), g = () => {
|
|
149
|
-
const _ =
|
|
150
|
-
|
|
149
|
+
const _ = Ce(), u = document.querySelector(".xw-blog-root");
|
|
150
|
+
u && (u.classList.remove("light", "dark"), u.classList.add(_));
|
|
151
151
|
};
|
|
152
152
|
return m.addEventListener("change", g), () => m.removeEventListener("change", g);
|
|
153
153
|
}
|
|
154
154
|
}, [a]), {
|
|
155
155
|
theme: a,
|
|
156
156
|
setTheme: (s) => {
|
|
157
|
-
localStorage.setItem(
|
|
157
|
+
localStorage.setItem(ve, s), o(s);
|
|
158
158
|
},
|
|
159
|
-
effectiveTheme:
|
|
159
|
+
effectiveTheme: be(a)
|
|
160
160
|
};
|
|
161
161
|
}, ze = (t) => "items" in t, te = (t, n) => t.map((a) => ze(a) ? {
|
|
162
162
|
title: ae.getFixedT(n)(a.title),
|
|
@@ -175,36 +175,36 @@ const be = "app-theme", Ie = () => typeof window > "u" ? "light" : window.matchM
|
|
|
175
175
|
...a.showTableOfContents !== void 0 && {
|
|
176
176
|
showTableOfContents: a.showTableOfContents
|
|
177
177
|
}
|
|
178
|
-
}), V = (t) => t.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""),
|
|
178
|
+
}), V = (t) => t.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""), ke = Pe(null);
|
|
179
179
|
function Ja({
|
|
180
180
|
children: t,
|
|
181
181
|
config: n,
|
|
182
182
|
blog: a,
|
|
183
183
|
navigationData: o = []
|
|
184
184
|
}) {
|
|
185
|
-
|
|
185
|
+
Ie(n.defaultTheme);
|
|
186
186
|
const [c, s] = L({});
|
|
187
187
|
S(() => {
|
|
188
|
-
const { buildTagIndex: m } =
|
|
188
|
+
const { buildTagIndex: m } = xe(a.mdxFiles), g = n.supportedLanguages.map(async (_) => {
|
|
189
189
|
try {
|
|
190
|
-
const
|
|
191
|
-
return { language: _, index:
|
|
192
|
-
} catch (
|
|
193
|
-
return console.error(`Failed to build tag index for ${_}:`,
|
|
190
|
+
const u = await m(_);
|
|
191
|
+
return { language: _, index: u };
|
|
192
|
+
} catch (u) {
|
|
193
|
+
return console.error(`Failed to build tag index for ${_}:`, u), { language: _, index: {} };
|
|
194
194
|
}
|
|
195
195
|
});
|
|
196
196
|
Promise.all(g).then((_) => {
|
|
197
|
-
const
|
|
197
|
+
const u = {};
|
|
198
198
|
for (const b of _)
|
|
199
|
-
|
|
200
|
-
s(
|
|
199
|
+
u[b.language] = b.index;
|
|
200
|
+
s(u);
|
|
201
201
|
}).catch((_) => {
|
|
202
202
|
console.error("Failed to build tag indices:", _);
|
|
203
203
|
});
|
|
204
204
|
}, [a.mdxFiles, n.supportedLanguages]);
|
|
205
205
|
const i = { ...n, navigationData: o, tagIndex: c };
|
|
206
206
|
return /* @__PURE__ */ e(
|
|
207
|
-
|
|
207
|
+
ke.Provider,
|
|
208
208
|
{
|
|
209
209
|
value: {
|
|
210
210
|
config: i,
|
|
@@ -216,17 +216,17 @@ function Ja({
|
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
function R() {
|
|
219
|
-
const t = De(
|
|
219
|
+
const t = De(ke);
|
|
220
220
|
if (!t)
|
|
221
221
|
throw new Error("useBlogConfig must be used within a BlogProvider");
|
|
222
222
|
return t;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function ye() {
|
|
225
225
|
return !!new URL(window.location.href).hash;
|
|
226
226
|
}
|
|
227
227
|
function Ge(t, n, a) {
|
|
228
228
|
const o = a ? `${a}/` : "";
|
|
229
|
-
return
|
|
229
|
+
return ye() ? `#${o}${n}/${t}` : `/${o}${n}/${t}`;
|
|
230
230
|
}
|
|
231
231
|
function Qe(t) {
|
|
232
232
|
const n = {
|
|
@@ -239,7 +239,7 @@ function Qe(t) {
|
|
|
239
239
|
c === "advanced" ? n.advanced = !0 : c.startsWith("a=") && (n.anchor = c.substring(2));
|
|
240
240
|
return n;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function we(t, n = 80) {
|
|
243
243
|
const a = document.getElementById(t);
|
|
244
244
|
if (a) {
|
|
245
245
|
const c = a.getBoundingClientRect().top + window.pageYOffset - n;
|
|
@@ -251,7 +251,7 @@ function Ne(t, n = 80) {
|
|
|
251
251
|
}
|
|
252
252
|
function Xe(t, n = !1) {
|
|
253
253
|
const a = new URL(window.location.href);
|
|
254
|
-
if (
|
|
254
|
+
if (ye()) {
|
|
255
255
|
const o = a.hash.split("?"), c = o[0], s = new URLSearchParams(o[1] || "");
|
|
256
256
|
s.set("a", t), n && s.set("advanced", "");
|
|
257
257
|
const i = s.toString();
|
|
@@ -267,14 +267,14 @@ const Ye = "_metadata_bsge0_1", Ve = "_author_bsge0_9", Je = "_date_bsge0_10", o
|
|
|
267
267
|
author: Ve,
|
|
268
268
|
date: Je
|
|
269
269
|
};
|
|
270
|
-
function
|
|
270
|
+
function Le({ date: t, author: n }) {
|
|
271
271
|
const { t: a } = E();
|
|
272
|
-
return !t && !n ? null : /* @__PURE__ */
|
|
273
|
-
n && /* @__PURE__ */
|
|
272
|
+
return !t && !n ? null : /* @__PURE__ */ h("div", { className: oe.metadata, children: [
|
|
273
|
+
n && /* @__PURE__ */ h("span", { className: oe.author, children: [
|
|
274
274
|
/* @__PURE__ */ e(Ee, { size: 16, weight: "regular" }),
|
|
275
275
|
n
|
|
276
276
|
] }),
|
|
277
|
-
t && /* @__PURE__ */
|
|
277
|
+
t && /* @__PURE__ */ h("span", { className: oe.date, children: [
|
|
278
278
|
/* @__PURE__ */ e(Re, { size: 16, weight: "regular" }),
|
|
279
279
|
a("ui.lastEdited"),
|
|
280
280
|
": ",
|
|
@@ -360,7 +360,7 @@ function ht({
|
|
|
360
360
|
}, [s]), S(() => () => {
|
|
361
361
|
_.current && _.current.disconnect();
|
|
362
362
|
}, []);
|
|
363
|
-
const
|
|
363
|
+
const u = (b) => {
|
|
364
364
|
const p = document.getElementById(b);
|
|
365
365
|
if (p) {
|
|
366
366
|
const d = new URLSearchParams(o.search);
|
|
@@ -377,13 +377,13 @@ function ht({
|
|
|
377
377
|
});
|
|
378
378
|
}
|
|
379
379
|
};
|
|
380
|
-
return s.length === 0 ? null : /* @__PURE__ */
|
|
380
|
+
return s.length === 0 ? null : /* @__PURE__ */ h("aside", { className: j.tableOfContents, children: [
|
|
381
381
|
/* @__PURE__ */ e("div", { className: j.header, children: /* @__PURE__ */ e("span", { className: j.title, children: a("ui.onThisPage", "On this page") }) }),
|
|
382
382
|
/* @__PURE__ */ e("nav", { className: j.nav, children: /* @__PURE__ */ e("ul", { className: j.list, children: s.map((b) => /* @__PURE__ */ e("li", { className: j.item, children: /* @__PURE__ */ e(
|
|
383
383
|
"button",
|
|
384
384
|
{
|
|
385
385
|
className: `${j.link} ${j[`level${b.level}`]} ${m === b.id ? j.active : ""}`,
|
|
386
|
-
onClick: () =>
|
|
386
|
+
onClick: () => u(b.id),
|
|
387
387
|
type: "button",
|
|
388
388
|
children: b.text
|
|
389
389
|
}
|
|
@@ -413,10 +413,10 @@ function Ct({
|
|
|
413
413
|
const _ = s.basePath || "";
|
|
414
414
|
i(`${_}/${a}/${g}`), o();
|
|
415
415
|
};
|
|
416
|
-
return
|
|
417
|
-
/* @__PURE__ */ e("div", { className: O.overlay, onClick: o, children: /* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */
|
|
416
|
+
return $e(
|
|
417
|
+
/* @__PURE__ */ e("div", { className: O.overlay, onClick: o, children: /* @__PURE__ */ h("div", { className: O.modal, onClick: (g) => g.stopPropagation(), children: [
|
|
418
|
+
/* @__PURE__ */ h("div", { className: O.header, children: [
|
|
419
|
+
/* @__PURE__ */ h("h2", { className: O.title, children: [
|
|
420
420
|
c("ui.tagResults"),
|
|
421
421
|
": ",
|
|
422
422
|
t
|
|
@@ -428,11 +428,11 @@ function Ct({
|
|
|
428
428
|
className: O.closeButton,
|
|
429
429
|
onClick: o,
|
|
430
430
|
"aria-label": "Close",
|
|
431
|
-
children: /* @__PURE__ */ e(
|
|
431
|
+
children: /* @__PURE__ */ e(re, {})
|
|
432
432
|
}
|
|
433
433
|
)
|
|
434
434
|
] }),
|
|
435
|
-
/* @__PURE__ */ e("div", { className: O.results, children: n.length === 0 ? /* @__PURE__ */ e("div", { className: O.noResults, children: c("ui.noTagResults") }) : /* @__PURE__ */ e("ul", { className: O.resultsList, children: n.map((g) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */
|
|
435
|
+
/* @__PURE__ */ e("div", { className: O.results, children: n.length === 0 ? /* @__PURE__ */ e("div", { className: O.noResults, children: c("ui.noTagResults") }) : /* @__PURE__ */ e("ul", { className: O.resultsList, children: n.map((g) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ h(
|
|
436
436
|
"button",
|
|
437
437
|
{
|
|
438
438
|
type: "button",
|
|
@@ -440,7 +440,7 @@ function Ct({
|
|
|
440
440
|
onClick: () => m(g.slug),
|
|
441
441
|
children: [
|
|
442
442
|
/* @__PURE__ */ e("div", { className: O.resultTitle, children: g.title }),
|
|
443
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ h("div", { className: O.resultSlug, children: [
|
|
444
444
|
"/",
|
|
445
445
|
g.slug
|
|
446
446
|
] })
|
|
@@ -465,14 +465,14 @@ function Pt({ tags: t, variant: n = "default", onTagClick: a }) {
|
|
|
465
465
|
const c = (s) => {
|
|
466
466
|
a && a(s);
|
|
467
467
|
};
|
|
468
|
-
return /* @__PURE__ */
|
|
468
|
+
return /* @__PURE__ */ h(
|
|
469
469
|
"div",
|
|
470
470
|
{
|
|
471
471
|
className: `${K.tags} ${n === "compact" ? K.compact : ""}`,
|
|
472
472
|
children: [
|
|
473
|
-
n === "default" && /* @__PURE__ */
|
|
473
|
+
n === "default" && /* @__PURE__ */ h("div", { className: K.tagLabel, children: [
|
|
474
474
|
/* @__PURE__ */ e(Oe, { className: K.tagIcon, weight: "duotone" }),
|
|
475
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ h("span", { children: [
|
|
476
476
|
o("ui.tags"),
|
|
477
477
|
":"
|
|
478
478
|
] })
|
|
@@ -506,8 +506,8 @@ const Dt = "_contentPage_1nxj5_1", Bt = "_loadingContainer_1nxj5_48", Mt = "_err
|
|
|
506
506
|
codeLanguage: qt
|
|
507
507
|
};
|
|
508
508
|
function Ft({ language: t }) {
|
|
509
|
-
var
|
|
510
|
-
const { slug: n } =
|
|
509
|
+
var ue;
|
|
510
|
+
const { slug: n } = ce(), a = G(), { config: o, loadContent: c, loadEnglishContent: s } = R(), [i, m] = L(""), [g, _] = L(""), [u, b] = L({}), [p, d] = L(!0), [l, r] = L(null), [w, C] = L(!0), [I, f] = L(null), N = H(0), D = H([]), J = Qe(a.search), U = J.advanced;
|
|
511
511
|
if (S(() => {
|
|
512
512
|
(async () => {
|
|
513
513
|
if (!n) return;
|
|
@@ -565,40 +565,40 @@ function Ft({ language: t }) {
|
|
|
565
565
|
]), S(() => {
|
|
566
566
|
if (!p && J.anchor) {
|
|
567
567
|
const v = setTimeout(() => {
|
|
568
|
-
|
|
568
|
+
we(J.anchor);
|
|
569
569
|
}, 150);
|
|
570
570
|
return () => clearTimeout(v);
|
|
571
571
|
}
|
|
572
572
|
}, [p, J.anchor]), p)
|
|
573
|
-
return /* @__PURE__ */ e("div", { className: B.contentPage, children: /* @__PURE__ */
|
|
573
|
+
return /* @__PURE__ */ e("div", { className: B.contentPage, children: /* @__PURE__ */ h("div", { className: B.loadingContainer, children: [
|
|
574
574
|
/* @__PURE__ */ e("div", { className: B.skeletonTitle }),
|
|
575
575
|
/* @__PURE__ */ e("div", { className: B.skeletonParagraph }),
|
|
576
576
|
/* @__PURE__ */ e("div", { className: B.skeletonParagraph }),
|
|
577
577
|
/* @__PURE__ */ e("div", { className: B.skeletonParagraphShort })
|
|
578
578
|
] }) });
|
|
579
579
|
if (l)
|
|
580
|
-
return /* @__PURE__ */ e("div", { className: B.contentPage, children: /* @__PURE__ */ e("div", { className: B.errorContainer, children: /* @__PURE__ */
|
|
580
|
+
return /* @__PURE__ */ e("div", { className: B.contentPage, children: /* @__PURE__ */ e("div", { className: B.errorContainer, children: /* @__PURE__ */ h("div", { className: B.errorText, children: [
|
|
581
581
|
"Error: ",
|
|
582
582
|
l
|
|
583
583
|
] }) }) });
|
|
584
584
|
N.current = 0;
|
|
585
|
-
let
|
|
585
|
+
let de = !1;
|
|
586
586
|
const Z = (v, k) => {
|
|
587
|
-
v.preventDefault(),
|
|
587
|
+
v.preventDefault(), we(k), Xe(k, U);
|
|
588
588
|
};
|
|
589
|
-
return /* @__PURE__ */
|
|
590
|
-
/* @__PURE__ */
|
|
591
|
-
/* @__PURE__ */ e(Ue, { hasAdvanced:
|
|
589
|
+
return /* @__PURE__ */ h(z, { children: [
|
|
590
|
+
/* @__PURE__ */ h("div", { className: B.contentPage, children: [
|
|
591
|
+
/* @__PURE__ */ e(Ue, { hasAdvanced: u.hasAdvanced || !1 }),
|
|
592
592
|
/* @__PURE__ */ e("div", { className: B.mdxContent, children: /* @__PURE__ */ e(
|
|
593
593
|
Be,
|
|
594
594
|
{
|
|
595
595
|
remarkPlugins: [Me],
|
|
596
596
|
components: {
|
|
597
597
|
h1: ({ children: v }) => {
|
|
598
|
-
const k = N.current++, P = D.current[k] || "", $ = V(P), y = !
|
|
599
|
-
|
|
600
|
-
const q =
|
|
601
|
-
return /* @__PURE__ */
|
|
598
|
+
const k = N.current++, P = D.current[k] || "", $ = V(P), y = !de;
|
|
599
|
+
de = !0;
|
|
600
|
+
const q = u.date || u.author;
|
|
601
|
+
return /* @__PURE__ */ h(z, { children: [
|
|
602
602
|
/* @__PURE__ */ e(
|
|
603
603
|
"h1",
|
|
604
604
|
{
|
|
@@ -616,10 +616,10 @@ function Ft({ language: t }) {
|
|
|
616
616
|
}
|
|
617
617
|
),
|
|
618
618
|
y && q && /* @__PURE__ */ e(
|
|
619
|
-
|
|
619
|
+
Le,
|
|
620
620
|
{
|
|
621
|
-
date:
|
|
622
|
-
author:
|
|
621
|
+
date: u.date,
|
|
622
|
+
author: u.author
|
|
623
623
|
}
|
|
624
624
|
)
|
|
625
625
|
] });
|
|
@@ -676,7 +676,7 @@ function Ft({ language: t }) {
|
|
|
676
676
|
if (!v)
|
|
677
677
|
return /* @__PURE__ */ e("code", { ...P, children: k });
|
|
678
678
|
const y = (v == null ? void 0 : v.replace("language-", "")) || "";
|
|
679
|
-
return /* @__PURE__ */
|
|
679
|
+
return /* @__PURE__ */ h("div", { className: B.codeBlock, children: [
|
|
680
680
|
y && /* @__PURE__ */ e("div", { className: B.codeLanguage, children: y }),
|
|
681
681
|
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: v, ...P, children: k }) })
|
|
682
682
|
] });
|
|
@@ -710,17 +710,17 @@ function Ft({ language: t }) {
|
|
|
710
710
|
children: i
|
|
711
711
|
}
|
|
712
712
|
) }),
|
|
713
|
-
|
|
713
|
+
u.tags && u.tags.length > 0 && /* @__PURE__ */ e(
|
|
714
714
|
Pt,
|
|
715
715
|
{
|
|
716
|
-
tags:
|
|
716
|
+
tags: u.tags,
|
|
717
717
|
variant: "compact",
|
|
718
718
|
onTagClick: (v) => f(v)
|
|
719
719
|
}
|
|
720
720
|
)
|
|
721
721
|
] }),
|
|
722
722
|
w && /* @__PURE__ */ e(ht, { content: i, englishContent: g }),
|
|
723
|
-
I && ((
|
|
723
|
+
I && ((ue = o.tagIndex) == null ? void 0 : ue[t]) && /* @__PURE__ */ e(
|
|
724
724
|
Ct,
|
|
725
725
|
{
|
|
726
726
|
tag: I,
|
|
@@ -752,7 +752,7 @@ const Ut = "_searchButton_1k9sl_1", Kt = "_searchIcon_1k9sl_17", zt = "_searchHi
|
|
|
752
752
|
hint: rn
|
|
753
753
|
};
|
|
754
754
|
function ln({ language: t }) {
|
|
755
|
-
const { t: n } = E(), a = F(), { config: o } = R(), [c, s] = L(!1), [i, m] = L(""), [g, _] = L([]), [
|
|
755
|
+
const { t: n } = E(), a = F(), { config: o } = R(), [c, s] = L(!1), [i, m] = L(""), [g, _] = L([]), [u, b] = L(0), p = H(null), d = H(null), r = typeof navigator < "u" && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘K" : "Ctrl+K", w = (o.navigationData ? te(o.navigationData, t) : []).flatMap((f) => "items" in f ? f.items.map((N) => ({
|
|
756
756
|
title: N.title,
|
|
757
757
|
slug: N.slug
|
|
758
758
|
})) : [{ title: f.title, slug: f.slug }]);
|
|
@@ -787,7 +787,7 @@ function ln({ language: t }) {
|
|
|
787
787
|
};
|
|
788
788
|
}, []);
|
|
789
789
|
const C = (f) => {
|
|
790
|
-
f.key === "ArrowDown" ? (f.preventDefault(), b((N) => Math.min(N + 1, g.length - 1))) : f.key === "ArrowUp" ? (f.preventDefault(), b((N) => Math.max(N - 1, 0))) : f.key === "Enter" && g[
|
|
790
|
+
f.key === "ArrowDown" ? (f.preventDefault(), b((N) => Math.min(N + 1, g.length - 1))) : f.key === "ArrowUp" ? (f.preventDefault(), b((N) => Math.max(N - 1, 0))) : f.key === "Enter" && g[u] && (f.preventDefault(), I(g[u].slug));
|
|
791
791
|
};
|
|
792
792
|
S(() => {
|
|
793
793
|
const f = (N) => {
|
|
@@ -799,8 +799,8 @@ function ln({ language: t }) {
|
|
|
799
799
|
const N = o.basePath || "";
|
|
800
800
|
a(`${N}/${t}/${f}`), s(!1), m("");
|
|
801
801
|
};
|
|
802
|
-
return /* @__PURE__ */
|
|
803
|
-
/* @__PURE__ */
|
|
802
|
+
return /* @__PURE__ */ h(z, { children: [
|
|
803
|
+
/* @__PURE__ */ h(
|
|
804
804
|
"button",
|
|
805
805
|
{
|
|
806
806
|
type: "button",
|
|
@@ -813,13 +813,13 @@ function ln({ language: t }) {
|
|
|
813
813
|
},
|
|
814
814
|
"aria-label": n("ui.search"),
|
|
815
815
|
children: [
|
|
816
|
-
/* @__PURE__ */ e(
|
|
816
|
+
/* @__PURE__ */ e(me, { className: T.searchIcon }),
|
|
817
817
|
/* @__PURE__ */ e("span", { className: T.searchHint, children: n("ui.search") }),
|
|
818
818
|
/* @__PURE__ */ e("kbd", { className: T.kbd, children: r })
|
|
819
819
|
]
|
|
820
820
|
}
|
|
821
821
|
),
|
|
822
|
-
c &&
|
|
822
|
+
c && $e(
|
|
823
823
|
/* @__PURE__ */ e(
|
|
824
824
|
"div",
|
|
825
825
|
{
|
|
@@ -827,15 +827,15 @@ function ln({ language: t }) {
|
|
|
827
827
|
onClick: () => {
|
|
828
828
|
s(!1), m("");
|
|
829
829
|
},
|
|
830
|
-
children: /* @__PURE__ */
|
|
830
|
+
children: /* @__PURE__ */ h(
|
|
831
831
|
"div",
|
|
832
832
|
{
|
|
833
833
|
className: T.searchModal,
|
|
834
834
|
ref: d,
|
|
835
835
|
onClick: (f) => f.stopPropagation(),
|
|
836
836
|
children: [
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
/* @__PURE__ */ e(
|
|
837
|
+
/* @__PURE__ */ h("div", { className: T.searchHeader, children: [
|
|
838
|
+
/* @__PURE__ */ e(me, { className: T.searchIcon }),
|
|
839
839
|
/* @__PURE__ */ e(
|
|
840
840
|
"input",
|
|
841
841
|
{
|
|
@@ -857,37 +857,37 @@ function ln({ language: t }) {
|
|
|
857
857
|
s(!1), m("");
|
|
858
858
|
},
|
|
859
859
|
"aria-label": "Close search",
|
|
860
|
-
children: /* @__PURE__ */ e(
|
|
860
|
+
children: /* @__PURE__ */ e(re, {})
|
|
861
861
|
}
|
|
862
862
|
)
|
|
863
863
|
] }),
|
|
864
|
-
i && /* @__PURE__ */ e("div", { className: T.searchResults, children: g.length === 0 ? /* @__PURE__ */ e("div", { className: T.noResults, children: n("ui.noSearchResults") }) : /* @__PURE__ */ e("ul", { className: T.resultsList, children: g.map((f, N) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */
|
|
864
|
+
i && /* @__PURE__ */ e("div", { className: T.searchResults, children: g.length === 0 ? /* @__PURE__ */ e("div", { className: T.noResults, children: n("ui.noSearchResults") }) : /* @__PURE__ */ e("ul", { className: T.resultsList, children: g.map((f, N) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ h(
|
|
865
865
|
"button",
|
|
866
866
|
{
|
|
867
867
|
type: "button",
|
|
868
|
-
className: `${T.resultItem} ${N ===
|
|
868
|
+
className: `${T.resultItem} ${N === u ? T.selected : ""}`,
|
|
869
869
|
onClick: () => I(f.slug),
|
|
870
870
|
onMouseEnter: () => b(N),
|
|
871
871
|
children: [
|
|
872
872
|
/* @__PURE__ */ e("div", { className: T.resultTitle, children: f.title }),
|
|
873
|
-
/* @__PURE__ */
|
|
873
|
+
/* @__PURE__ */ h("div", { className: T.resultSlug, children: [
|
|
874
874
|
"/",
|
|
875
875
|
f.slug
|
|
876
876
|
] })
|
|
877
877
|
]
|
|
878
878
|
}
|
|
879
879
|
) }, f.slug)) }) }),
|
|
880
|
-
!i && /* @__PURE__ */
|
|
881
|
-
/* @__PURE__ */
|
|
880
|
+
!i && /* @__PURE__ */ h("div", { className: T.searchHints, children: [
|
|
881
|
+
/* @__PURE__ */ h("div", { className: T.hint, children: [
|
|
882
882
|
/* @__PURE__ */ e("kbd", { children: "↑" }),
|
|
883
883
|
/* @__PURE__ */ e("kbd", { children: "↓" }),
|
|
884
884
|
/* @__PURE__ */ e("span", { children: n("ui.searchNavigate") })
|
|
885
885
|
] }),
|
|
886
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ h("div", { className: T.hint, children: [
|
|
887
887
|
/* @__PURE__ */ e("kbd", { children: "↵" }),
|
|
888
888
|
/* @__PURE__ */ e("span", { children: n("ui.searchSelect") })
|
|
889
889
|
] }),
|
|
890
|
-
/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ h("div", { className: T.hint, children: [
|
|
891
891
|
/* @__PURE__ */ e("kbd", { children: "esc" }),
|
|
892
892
|
/* @__PURE__ */ e("span", { children: n("ui.searchClose") })
|
|
893
893
|
] })
|
|
@@ -923,14 +923,14 @@ const dn = "_header_jrobc_1", un = "_container_jrobc_24", hn = "_content_jrobc_3
|
|
|
923
923
|
dropdownIcon: Ln
|
|
924
924
|
};
|
|
925
925
|
function Tn({ onMobileMenuToggle: t }) {
|
|
926
|
-
const { t: n, i18n: a } = E(), { config: o } = R(), c = o.header ?? {}, s = c.navLinks ?? [], i = c.dropdownItems ?? [], [m, g] = L(!1), [_,
|
|
926
|
+
const { t: n, i18n: a } = E(), { config: o } = R(), c = o.header ?? {}, s = c.navLinks ?? [], i = c.dropdownItems ?? [], [m, g] = L(!1), [_, u] = L(!1), { theme: b, setTheme: p } = Ie(), d = H(null), l = H(null);
|
|
927
927
|
return S(() => {
|
|
928
928
|
const r = (w) => {
|
|
929
|
-
d.current && !d.current.contains(w.target) && g(!1), l.current && !l.current.contains(w.target) &&
|
|
929
|
+
d.current && !d.current.contains(w.target) && g(!1), l.current && !l.current.contains(w.target) && u(!1);
|
|
930
930
|
};
|
|
931
931
|
return document.addEventListener("mousedown", r), () => document.removeEventListener("mousedown", r);
|
|
932
|
-
}, []), /* @__PURE__ */ e("header", { className: x.header, children: /* @__PURE__ */ e("div", { className: x.container, children: /* @__PURE__ */
|
|
933
|
-
/* @__PURE__ */
|
|
932
|
+
}, []), /* @__PURE__ */ e("header", { className: x.header, children: /* @__PURE__ */ e("div", { className: x.container, children: /* @__PURE__ */ h("div", { className: x.content, children: [
|
|
933
|
+
/* @__PURE__ */ h("div", { className: x.leftSection, children: [
|
|
934
934
|
/* @__PURE__ */ e(
|
|
935
935
|
"button",
|
|
936
936
|
{
|
|
@@ -943,73 +943,73 @@ function Tn({ onMobileMenuToggle: t }) {
|
|
|
943
943
|
),
|
|
944
944
|
/* @__PURE__ */ e("div", { className: x.logo })
|
|
945
945
|
] }),
|
|
946
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ h("nav", { className: x.nav, children: [
|
|
947
947
|
/* @__PURE__ */ e(ln, { language: a.language }),
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
/* @__PURE__ */
|
|
948
|
+
/* @__PURE__ */ h("div", { className: x.themeDropdown, ref: l, children: [
|
|
949
|
+
/* @__PURE__ */ h(
|
|
950
950
|
"button",
|
|
951
951
|
{
|
|
952
952
|
type: "button",
|
|
953
953
|
className: x.themeButton,
|
|
954
|
-
onClick: () =>
|
|
954
|
+
onClick: () => u(!_),
|
|
955
955
|
"aria-expanded": _,
|
|
956
956
|
"aria-haspopup": "true",
|
|
957
957
|
"aria-label": n("ui.theme"),
|
|
958
958
|
children: [
|
|
959
|
-
b === "light" && /* @__PURE__ */ e(
|
|
960
|
-
b === "dark" && /* @__PURE__ */ e(
|
|
961
|
-
b === "system" && /* @__PURE__ */ e(
|
|
959
|
+
b === "light" && /* @__PURE__ */ e(_e, { className: x.themeIcon }),
|
|
960
|
+
b === "dark" && /* @__PURE__ */ e(pe, { className: x.themeIcon }),
|
|
961
|
+
b === "system" && /* @__PURE__ */ e(fe, { className: x.themeIcon }),
|
|
962
962
|
/* @__PURE__ */ e(se, { className: x.caretIcon })
|
|
963
963
|
]
|
|
964
964
|
}
|
|
965
965
|
),
|
|
966
|
-
_ && /* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
966
|
+
_ && /* @__PURE__ */ h("div", { className: x.dropdownMenu, children: [
|
|
967
|
+
/* @__PURE__ */ h(
|
|
968
968
|
"button",
|
|
969
969
|
{
|
|
970
970
|
type: "button",
|
|
971
971
|
onClick: () => {
|
|
972
|
-
p("light"),
|
|
972
|
+
p("light"), u(!1);
|
|
973
973
|
},
|
|
974
974
|
className: x.dropdownItem,
|
|
975
975
|
children: [
|
|
976
|
-
/* @__PURE__ */ e(
|
|
976
|
+
/* @__PURE__ */ e(_e, { className: x.dropdownIcon }),
|
|
977
977
|
n("ui.light")
|
|
978
978
|
]
|
|
979
979
|
}
|
|
980
980
|
),
|
|
981
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ h(
|
|
982
982
|
"button",
|
|
983
983
|
{
|
|
984
984
|
type: "button",
|
|
985
985
|
onClick: () => {
|
|
986
|
-
p("dark"),
|
|
986
|
+
p("dark"), u(!1);
|
|
987
987
|
},
|
|
988
988
|
className: x.dropdownItem,
|
|
989
989
|
children: [
|
|
990
|
-
/* @__PURE__ */ e(
|
|
990
|
+
/* @__PURE__ */ e(pe, { className: x.dropdownIcon }),
|
|
991
991
|
n("ui.dark")
|
|
992
992
|
]
|
|
993
993
|
}
|
|
994
994
|
),
|
|
995
|
-
/* @__PURE__ */
|
|
995
|
+
/* @__PURE__ */ h(
|
|
996
996
|
"button",
|
|
997
997
|
{
|
|
998
998
|
type: "button",
|
|
999
999
|
onClick: () => {
|
|
1000
|
-
p("system"),
|
|
1000
|
+
p("system"), u(!1);
|
|
1001
1001
|
},
|
|
1002
1002
|
className: x.dropdownItem,
|
|
1003
1003
|
children: [
|
|
1004
|
-
/* @__PURE__ */ e(
|
|
1004
|
+
/* @__PURE__ */ e(fe, { className: x.dropdownIcon }),
|
|
1005
1005
|
n("ui.system")
|
|
1006
1006
|
]
|
|
1007
1007
|
}
|
|
1008
1008
|
)
|
|
1009
1009
|
] })
|
|
1010
1010
|
] }),
|
|
1011
|
-
i.length > 0 && /* @__PURE__ */
|
|
1012
|
-
/* @__PURE__ */
|
|
1011
|
+
i.length > 0 && /* @__PURE__ */ h("div", { className: x.supportDropdown, ref: d, children: [
|
|
1012
|
+
/* @__PURE__ */ h(
|
|
1013
1013
|
"button",
|
|
1014
1014
|
{
|
|
1015
1015
|
type: "button",
|
|
@@ -1025,7 +1025,7 @@ function Tn({ onMobileMenuToggle: t }) {
|
|
|
1025
1025
|
),
|
|
1026
1026
|
m && /* @__PURE__ */ e("div", { className: x.dropdownMenu, children: i.map((r, w) => {
|
|
1027
1027
|
const C = r.target ?? (r.url.startsWith("http") ? "_blank" : "_self"), I = r.rel ?? (C === "_blank" ? "noopener noreferrer" : void 0), f = r.icon;
|
|
1028
|
-
return /* @__PURE__ */
|
|
1028
|
+
return /* @__PURE__ */ h(
|
|
1029
1029
|
"a",
|
|
1030
1030
|
{
|
|
1031
1031
|
href: r.url,
|
|
@@ -1043,7 +1043,7 @@ function Tn({ onMobileMenuToggle: t }) {
|
|
|
1043
1043
|
] }),
|
|
1044
1044
|
s.map((r, w) => {
|
|
1045
1045
|
const C = r.target ?? (typeof r.url == "string" && r.url.startsWith("http") ? "_blank" : "_self"), I = r.rel ?? (C === "_blank" ? "noopener noreferrer" : void 0), f = r.icon;
|
|
1046
|
-
return /* @__PURE__ */
|
|
1046
|
+
return /* @__PURE__ */ h(
|
|
1047
1047
|
"a",
|
|
1048
1048
|
{
|
|
1049
1049
|
href: r.url,
|
|
@@ -1062,11 +1062,11 @@ function Tn({ onMobileMenuToggle: t }) {
|
|
|
1062
1062
|
] }) }) });
|
|
1063
1063
|
}
|
|
1064
1064
|
const X = (t) => "items" in t;
|
|
1065
|
-
function
|
|
1065
|
+
function le({
|
|
1066
1066
|
styles: t,
|
|
1067
1067
|
onLanguageChange: n
|
|
1068
1068
|
}) {
|
|
1069
|
-
const { i18n: a } = E(), o = G(), c = F(), { config: s } = R(), [i, m] = L(!1), g = H(null), _ = a.language,
|
|
1069
|
+
const { i18n: a } = E(), o = G(), c = F(), { config: s } = R(), [i, m] = L(!1), g = H(null), _ = a.language, u = (p) => {
|
|
1070
1070
|
const d = s.basePath || "";
|
|
1071
1071
|
let l = o.pathname;
|
|
1072
1072
|
d && l.startsWith(d) && (l = l.slice(d.length));
|
|
@@ -1083,8 +1083,8 @@ function ie({
|
|
|
1083
1083
|
return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
|
|
1084
1084
|
}, []);
|
|
1085
1085
|
const b = (p) => a.getFixedT(p)("language") || p;
|
|
1086
|
-
return /* @__PURE__ */
|
|
1087
|
-
/* @__PURE__ */
|
|
1086
|
+
return /* @__PURE__ */ h("div", { className: t.languageSelect, ref: g, children: [
|
|
1087
|
+
/* @__PURE__ */ h(
|
|
1088
1088
|
"button",
|
|
1089
1089
|
{
|
|
1090
1090
|
type: "button",
|
|
@@ -1104,7 +1104,7 @@ function ie({
|
|
|
1104
1104
|
{
|
|
1105
1105
|
type: "button",
|
|
1106
1106
|
className: `${t.languageOption} ${p === _ ? t.selected : ""}`,
|
|
1107
|
-
onClick: () =>
|
|
1107
|
+
onClick: () => u(p),
|
|
1108
1108
|
role: "option",
|
|
1109
1109
|
"aria-selected": p === _,
|
|
1110
1110
|
children: b(p)
|
|
@@ -1113,7 +1113,7 @@ function ie({
|
|
|
1113
1113
|
)) })
|
|
1114
1114
|
] });
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function ie({ styles: t, onLinkClick: n }) {
|
|
1117
1117
|
const { i18n: a } = E(), o = G(), { config: c } = R(), [s, i] = L(() => {
|
|
1118
1118
|
if (!c.navigationData) return {};
|
|
1119
1119
|
const d = a.language;
|
|
@@ -1150,7 +1150,7 @@ function de({ styles: t, onLinkClick: n }) {
|
|
|
1150
1150
|
...l,
|
|
1151
1151
|
[d]: !l[d]
|
|
1152
1152
|
}));
|
|
1153
|
-
},
|
|
1153
|
+
}, u = (d) => {
|
|
1154
1154
|
const l = c.basePath || "";
|
|
1155
1155
|
let r = o.pathname;
|
|
1156
1156
|
l && r.startsWith(l) && (r = r.slice(l.length));
|
|
@@ -1165,8 +1165,8 @@ function de({ styles: t, onLinkClick: n }) {
|
|
|
1165
1165
|
}, p = () => {
|
|
1166
1166
|
n == null || n();
|
|
1167
1167
|
};
|
|
1168
|
-
return /* @__PURE__ */ e("div", { className: t.navigation, children: g.map((d) => X(d) ? /* @__PURE__ */
|
|
1169
|
-
/* @__PURE__ */
|
|
1168
|
+
return /* @__PURE__ */ e("div", { className: t.navigation, children: g.map((d) => X(d) ? /* @__PURE__ */ h("div", { className: t.section, children: [
|
|
1169
|
+
/* @__PURE__ */ h(
|
|
1170
1170
|
"button",
|
|
1171
1171
|
{
|
|
1172
1172
|
type: "button",
|
|
@@ -1179,20 +1179,20 @@ function de({ styles: t, onLinkClick: n }) {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
),
|
|
1181
1181
|
s[d.title] && /* @__PURE__ */ e("div", { className: t.sectionItems, children: d.items.map((l) => /* @__PURE__ */ e(
|
|
1182
|
-
|
|
1182
|
+
he,
|
|
1183
1183
|
{
|
|
1184
1184
|
to: b(l.slug),
|
|
1185
|
-
className: `${t.navItem} ${
|
|
1185
|
+
className: `${t.navItem} ${u(l.slug) ? t.active : ""}`,
|
|
1186
1186
|
onClick: p,
|
|
1187
1187
|
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: l.title }) })
|
|
1188
1188
|
},
|
|
1189
1189
|
l.slug
|
|
1190
1190
|
)) })
|
|
1191
1191
|
] }, d.title) : /* @__PURE__ */ e(
|
|
1192
|
-
|
|
1192
|
+
he,
|
|
1193
1193
|
{
|
|
1194
1194
|
to: b(d.slug),
|
|
1195
|
-
className: `${t.navItem} ${
|
|
1195
|
+
className: `${t.navItem} ${u(d.slug) ? t.active : ""}`,
|
|
1196
1196
|
onClick: p,
|
|
1197
1197
|
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: d.title }) })
|
|
1198
1198
|
},
|
|
@@ -1204,9 +1204,9 @@ function Za({
|
|
|
1204
1204
|
onLinkClick: n,
|
|
1205
1205
|
onLanguageChange: a
|
|
1206
1206
|
}) {
|
|
1207
|
-
return /* @__PURE__ */
|
|
1208
|
-
/* @__PURE__ */ e(
|
|
1209
|
-
/* @__PURE__ */ e(
|
|
1207
|
+
return /* @__PURE__ */ h(z, { children: [
|
|
1208
|
+
/* @__PURE__ */ e(le, { styles: t, onLanguageChange: a }),
|
|
1209
|
+
/* @__PURE__ */ e(ie, { styles: t, onLinkClick: n })
|
|
1210
1210
|
] });
|
|
1211
1211
|
}
|
|
1212
1212
|
const Sn = "_backdrop_1a7pu_1", Pn = "_open_1a7pu_13", Dn = "_mobileMenu_1a7pu_18", Bn = "_header_1a7pu_37", Mn = "_brand_1a7pu_46", En = "_cloudIcon_1a7pu_53", Rn = "_title_1a7pu_62", On = "_closeButton_1a7pu_69", jn = "_closeIcon_1a7pu_101", An = "_languageSection_1a7pu_106", Wn = "_languageSelect_1a7pu_112", Hn = "_languageButton_1a7pu_117", qn = "_icon_1a7pu_156", Fn = "_chevron_1a7pu_162", Un = "_languageDropdown_1a7pu_172", Kn = "_languageOption_1a7pu_185", zn = "_selected_1a7pu_226", Gn = "_scrollArea_1a7pu_231", Qn = "_navigation_1a7pu_237", Xn = "_section_1a7pu_241", Yn = "_sectionButton_1a7pu_245", Vn = "_expanded_1a7pu_285", Jn = "_sectionItems_1a7pu_289", Zn = "_navItem_1a7pu_297", ea = "_active_1a7pu_310", ta = "_navItemContent_1a7pu_316", na = "_navItemTitle_1a7pu_322", M = {
|
|
@@ -1247,7 +1247,7 @@ function aa({ isOpen: t, onClose: n }) {
|
|
|
1247
1247
|
s.key === "Escape" && t && n();
|
|
1248
1248
|
};
|
|
1249
1249
|
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
1250
|
-
}, [t, n]), /* @__PURE__ */
|
|
1250
|
+
}, [t, n]), /* @__PURE__ */ h(z, { children: [
|
|
1251
1251
|
/* @__PURE__ */ e(
|
|
1252
1252
|
"div",
|
|
1253
1253
|
{
|
|
@@ -1255,9 +1255,9 @@ function aa({ isOpen: t, onClose: n }) {
|
|
|
1255
1255
|
onClick: n
|
|
1256
1256
|
}
|
|
1257
1257
|
),
|
|
1258
|
-
/* @__PURE__ */
|
|
1259
|
-
/* @__PURE__ */
|
|
1260
|
-
/* @__PURE__ */
|
|
1258
|
+
/* @__PURE__ */ h("div", { className: `${M.mobileMenu} ${t ? M.open : ""}`, children: [
|
|
1259
|
+
/* @__PURE__ */ h("div", { className: M.header, children: [
|
|
1260
|
+
/* @__PURE__ */ h("div", { className: M.brand, children: [
|
|
1261
1261
|
o && /* @__PURE__ */ e(o, { className: M.cloudIcon }),
|
|
1262
1262
|
/* @__PURE__ */ e("h1", { className: M.title, children: a.title })
|
|
1263
1263
|
] }),
|
|
@@ -1268,12 +1268,12 @@ function aa({ isOpen: t, onClose: n }) {
|
|
|
1268
1268
|
className: M.closeButton,
|
|
1269
1269
|
onClick: n,
|
|
1270
1270
|
"aria-label": "Close menu",
|
|
1271
|
-
children: /* @__PURE__ */ e(
|
|
1271
|
+
children: /* @__PURE__ */ e(re, { className: M.closeIcon })
|
|
1272
1272
|
}
|
|
1273
1273
|
)
|
|
1274
1274
|
] }),
|
|
1275
|
-
/* @__PURE__ */ e("div", { className: M.languageSection, children: /* @__PURE__ */ e(
|
|
1276
|
-
/* @__PURE__ */ e("div", { className: M.scrollArea, children: /* @__PURE__ */ e(
|
|
1275
|
+
/* @__PURE__ */ e("div", { className: M.languageSection, children: /* @__PURE__ */ e(le, { styles: M, onLanguageChange: n }) }),
|
|
1276
|
+
/* @__PURE__ */ e("div", { className: M.scrollArea, children: /* @__PURE__ */ e(ie, { styles: M, onLinkClick: n }) })
|
|
1277
1277
|
] })
|
|
1278
1278
|
] });
|
|
1279
1279
|
}
|
|
@@ -1302,15 +1302,15 @@ const oa = "_sidebar_1tdxt_1", sa = "_header_1tdxt_17", ca = "_brand_1tdxt_29",
|
|
|
1302
1302
|
};
|
|
1303
1303
|
function Ia() {
|
|
1304
1304
|
const { config: t } = R(), n = t.logo, a = t.supportedLanguages.length > 1;
|
|
1305
|
-
return /* @__PURE__ */
|
|
1306
|
-
/* @__PURE__ */
|
|
1307
|
-
/* @__PURE__ */
|
|
1305
|
+
return /* @__PURE__ */ h("div", { className: W.sidebar, children: [
|
|
1306
|
+
/* @__PURE__ */ h("div", { className: W.header, children: [
|
|
1307
|
+
/* @__PURE__ */ h("div", { className: W.brand, children: [
|
|
1308
1308
|
n && /* @__PURE__ */ e(n, { className: W.cloudIcon }),
|
|
1309
1309
|
/* @__PURE__ */ e("div", { className: W.title, children: t.title })
|
|
1310
1310
|
] }),
|
|
1311
|
-
a && /* @__PURE__ */ e(
|
|
1311
|
+
a && /* @__PURE__ */ e(le, { styles: W })
|
|
1312
1312
|
] }),
|
|
1313
|
-
/* @__PURE__ */ e("div", { className: W.scrollArea, children: /* @__PURE__ */ e(
|
|
1313
|
+
/* @__PURE__ */ e("div", { className: W.scrollArea, children: /* @__PURE__ */ e(ie, { styles: W }) })
|
|
1314
1314
|
] });
|
|
1315
1315
|
}
|
|
1316
1316
|
const ka = "_app_wf6ni_1", ya = "_layout_wf6ni_9", La = "_main_wf6ni_15", Ta = "_fullWidth_wf6ni_21", Sa = "_contentWrapper_wf6ni_30", Y = {
|
|
@@ -1321,7 +1321,7 @@ const ka = "_app_wf6ni_1", ya = "_layout_wf6ni_9", La = "_main_wf6ni_15", Ta = "
|
|
|
1321
1321
|
contentWrapper: Sa
|
|
1322
1322
|
};
|
|
1323
1323
|
function Pa({ children: t }) {
|
|
1324
|
-
const { language: n } =
|
|
1324
|
+
const { language: n } = ce(), { i18n: a } = E(), { config: o } = R(), [c, s] = L(!1);
|
|
1325
1325
|
S(() => {
|
|
1326
1326
|
n && o.supportedLanguages.includes(n) && a.changeLanguage(n);
|
|
1327
1327
|
}, [n, a, o.supportedLanguages]);
|
|
@@ -1331,18 +1331,18 @@ function Pa({ children: t }) {
|
|
|
1331
1331
|
s(!1);
|
|
1332
1332
|
};
|
|
1333
1333
|
if (!n || !o.supportedLanguages.includes(n))
|
|
1334
|
-
return /* @__PURE__ */ e(
|
|
1335
|
-
const g = !!o.header, _ = o.showSideMenu !== !1,
|
|
1336
|
-
return /* @__PURE__ */
|
|
1334
|
+
return /* @__PURE__ */ e(Ne, { to: "/en/welcome", replace: !0 });
|
|
1335
|
+
const g = !!o.header, _ = o.showSideMenu !== !1, u = o.contentMaxWidth ? { width: "100%", maxWidth: o.contentMaxWidth } : void 0;
|
|
1336
|
+
return /* @__PURE__ */ h("div", { className: Y.app, children: [
|
|
1337
1337
|
g && /* @__PURE__ */ e(Tn, { onMobileMenuToggle: i }),
|
|
1338
1338
|
/* @__PURE__ */ e(aa, { isOpen: c, onClose: m }),
|
|
1339
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ h("div", { className: Y.layout, children: [
|
|
1340
1340
|
_ && /* @__PURE__ */ e(Ia, {}),
|
|
1341
1341
|
/* @__PURE__ */ e(
|
|
1342
1342
|
"main",
|
|
1343
1343
|
{
|
|
1344
1344
|
className: `${Y.main} ${_ ? "" : Y.fullWidth}`,
|
|
1345
|
-
children: /* @__PURE__ */ e("div", { className: Y.contentWrapper, style:
|
|
1345
|
+
children: /* @__PURE__ */ e("div", { className: Y.contentWrapper, style: u, children: t })
|
|
1346
1346
|
}
|
|
1347
1347
|
)
|
|
1348
1348
|
] })
|
|
@@ -1401,40 +1401,37 @@ function Ha() {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
})();
|
|
1403
1403
|
}, [t.language, a.navigationData, o]);
|
|
1404
|
-
const _ = (
|
|
1404
|
+
const _ = (u) => {
|
|
1405
1405
|
const b = a.basePath || "";
|
|
1406
|
-
c(`${b}/${t.language}/${
|
|
1406
|
+
c(`${b}/${t.language}/${u}`);
|
|
1407
1407
|
};
|
|
1408
|
-
return m ? /* @__PURE__ */ e("div", { className: A.loading, children: n("ui.loadingArticles") }) : s.length === 0 ? /* @__PURE__ */ e("div", { className: A.empty, children: n("ui.noArticlesFound") }) : /* @__PURE__ */
|
|
1409
|
-
/* @__PURE__ */
|
|
1410
|
-
|
|
1411
|
-
s.length > 0 && /* @__PURE__ */ e(ce, { date: s[0].date, author: s[0].author })
|
|
1412
|
-
] }),
|
|
1413
|
-
/* @__PURE__ */ e("div", { className: A.articlesList, children: s.map((h) => /* @__PURE__ */ u(
|
|
1408
|
+
return m ? /* @__PURE__ */ e("div", { className: A.loading, children: n("ui.loadingArticles") }) : s.length === 0 ? /* @__PURE__ */ e("div", { className: A.empty, children: n("ui.noArticlesFound") }) : /* @__PURE__ */ h("div", { className: A.homePage, children: [
|
|
1409
|
+
/* @__PURE__ */ e("div", { className: A.header, children: /* @__PURE__ */ e("h1", { className: A.title, children: n("ui.latestPosts") }) }),
|
|
1410
|
+
/* @__PURE__ */ e("div", { className: A.articlesList, children: s.map((u) => /* @__PURE__ */ h(
|
|
1414
1411
|
"button",
|
|
1415
1412
|
{
|
|
1416
1413
|
className: A.articleCard,
|
|
1417
|
-
onClick: () => _(
|
|
1414
|
+
onClick: () => _(u.slug),
|
|
1418
1415
|
type: "button",
|
|
1419
1416
|
children: [
|
|
1420
|
-
/* @__PURE__ */ e("h2", { className: A.articleTitle, children:
|
|
1421
|
-
|
|
1422
|
-
/* @__PURE__ */ e(
|
|
1417
|
+
/* @__PURE__ */ e("h2", { className: A.articleTitle, children: u.title }),
|
|
1418
|
+
u.description && /* @__PURE__ */ e("p", { className: A.articleDescription, children: u.description }),
|
|
1419
|
+
/* @__PURE__ */ e(Le, { date: u.date, author: u.author })
|
|
1423
1420
|
]
|
|
1424
1421
|
},
|
|
1425
|
-
|
|
1422
|
+
u.slug
|
|
1426
1423
|
)) })
|
|
1427
1424
|
] });
|
|
1428
1425
|
}
|
|
1429
1426
|
function eo() {
|
|
1430
|
-
const { language: t } =
|
|
1431
|
-
return /* @__PURE__ */ e(Pa, { children: /* @__PURE__ */
|
|
1432
|
-
/* @__PURE__ */ e(
|
|
1427
|
+
const { language: t } = ce(), { config: n } = R();
|
|
1428
|
+
return /* @__PURE__ */ e(Pa, { children: /* @__PURE__ */ h(Se, { children: [
|
|
1429
|
+
/* @__PURE__ */ e(ge, { path: "/:slug", element: /* @__PURE__ */ e(Ft, { language: t }) }),
|
|
1433
1430
|
/* @__PURE__ */ e(
|
|
1434
|
-
|
|
1431
|
+
ge,
|
|
1435
1432
|
{
|
|
1436
1433
|
index: !0,
|
|
1437
|
-
element: (n.defaultRoute || "latest") === "latest" ? /* @__PURE__ */ e(Ha, {}) : /* @__PURE__ */ e(
|
|
1434
|
+
element: (n.defaultRoute || "latest") === "latest" ? /* @__PURE__ */ e(Ha, {}) : /* @__PURE__ */ e(Ne, { to: `./${n.defaultRoute}`, replace: !0 })
|
|
1438
1435
|
}
|
|
1439
1436
|
)
|
|
1440
1437
|
] }) });
|
|
@@ -1458,8 +1455,8 @@ function no() {
|
|
|
1458
1455
|
const m = i.split("/").filter(Boolean), g = m[0];
|
|
1459
1456
|
let _ = "";
|
|
1460
1457
|
o.supportedLanguages.includes(g) ? (m[0] = c, _ = `${s}/${m.join("/")}`) : _ = `${s}/${c}${i}`;
|
|
1461
|
-
const
|
|
1462
|
-
t.changeLanguage(c), a(
|
|
1458
|
+
const u = _ + n.search + n.hash;
|
|
1459
|
+
t.changeLanguage(c), a(u);
|
|
1463
1460
|
};
|
|
1464
1461
|
}
|
|
1465
1462
|
export {
|
|
@@ -1471,22 +1468,22 @@ export {
|
|
|
1471
1468
|
eo as DocumentationRoutes,
|
|
1472
1469
|
Tn as Header,
|
|
1473
1470
|
Ha as HomePage,
|
|
1474
|
-
|
|
1475
|
-
|
|
1471
|
+
le as LanguageSelector,
|
|
1472
|
+
Le as Metadata,
|
|
1476
1473
|
aa as MobileMenu,
|
|
1477
1474
|
Za as NavigationContent,
|
|
1478
|
-
|
|
1475
|
+
ie as NavigationMenu,
|
|
1479
1476
|
ln as SearchBar,
|
|
1480
1477
|
Ia as Sidebar,
|
|
1481
1478
|
ht as TableOfContents,
|
|
1482
1479
|
Ct as TagResultsModal,
|
|
1483
1480
|
Pt as Tags,
|
|
1484
1481
|
Va as createBlogUtils,
|
|
1485
|
-
|
|
1482
|
+
xe as createContentLoaders,
|
|
1486
1483
|
V as generateHeadingId,
|
|
1487
1484
|
te as getNavigationData,
|
|
1488
1485
|
R as useBlogConfig,
|
|
1489
1486
|
no as useLanguageChange,
|
|
1490
1487
|
to as useSearchModal,
|
|
1491
|
-
|
|
1488
|
+
Ie as useTheme
|
|
1492
1489
|
};
|
package/locales/index.ts
CHANGED