@x-wave/blog 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -1
- package/index.js +569 -524
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e, Fragment as z } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useLocation as
|
|
4
|
-
import { X as se, Tag as Ce, User as Te, CalendarBlank as
|
|
5
|
-
import { useState as
|
|
2
|
+
import { useTranslation as O } from "react-i18next";
|
|
3
|
+
import { useLocation as U, useNavigate as G, useParams as ae, Link as de, Navigate as fe, Routes as ke, Route as ue } from "react-router-dom";
|
|
4
|
+
import { X as se, Tag as Ce, User as Te, CalendarBlank as Se, MagnifyingGlass as he, List as ye, Sun as me, Moon as ge, Monitor as _e, CaretDown as oe, Globe as Le, CaretRight as Pe } from "@phosphor-icons/react";
|
|
5
|
+
import { useState as L, useEffect as P, createContext as Be, useContext as Me, useRef as W } from "react";
|
|
6
6
|
import De from "react-markdown";
|
|
7
|
-
import
|
|
7
|
+
import Ee from "remark-gfm";
|
|
8
8
|
import ne from "i18next";
|
|
9
9
|
import { createPortal as ve } from "react-dom";
|
|
10
|
-
const
|
|
11
|
-
tabContainer:
|
|
10
|
+
const Oe = "_tabContainer_zk6h4_1", Re = "_tab_zk6h4_1", je = "_active_zk6h4_45", X = {
|
|
11
|
+
tabContainer: Oe,
|
|
12
12
|
tab: Re,
|
|
13
13
|
active: je
|
|
14
14
|
};
|
|
15
15
|
function Ae({ hasAdvanced: t }) {
|
|
16
|
-
const { t: n } =
|
|
16
|
+
const { t: n } = O(), a = U(), s = G();
|
|
17
17
|
if (!t) return null;
|
|
18
|
-
const
|
|
19
|
-
if (
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
s(`${
|
|
18
|
+
const o = new URLSearchParams(a.search).has("advanced"), l = () => {
|
|
19
|
+
if (o) {
|
|
20
|
+
const u = new URLSearchParams(a.search);
|
|
21
|
+
u.delete("advanced");
|
|
22
|
+
const p = u.toString(), w = p ? `?${p}` : "";
|
|
23
|
+
s(`${a.pathname}${w}${a.hash}`);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
26
|
-
if (!
|
|
27
|
-
const
|
|
28
|
-
|
|
25
|
+
}, g = () => {
|
|
26
|
+
if (!o) {
|
|
27
|
+
const u = new URLSearchParams(a.search);
|
|
28
|
+
u.set("advanced", ""), s(`${a.pathname}?${u.toString()}${a.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: `${
|
|
37
|
-
onClick:
|
|
36
|
+
className: `${X.tab} ${o ? "" : X.active}`,
|
|
37
|
+
onClick: l,
|
|
38
38
|
children: n("ui.simple")
|
|
39
39
|
}
|
|
40
40
|
),
|
|
@@ -42,8 +42,8 @@ function Ae({ hasAdvanced: t }) {
|
|
|
42
42
|
"button",
|
|
43
43
|
{
|
|
44
44
|
type: "button",
|
|
45
|
-
className: `${
|
|
46
|
-
onClick:
|
|
45
|
+
className: `${X.tab} ${o ? X.active : ""}`,
|
|
46
|
+
onClick: g,
|
|
47
47
|
children: n("ui.advanced")
|
|
48
48
|
}
|
|
49
49
|
)
|
|
@@ -53,58 +53,58 @@ function He({ children: t }) {
|
|
|
53
53
|
return /* @__PURE__ */ e("div", { className: "xw-blog-root", children: t });
|
|
54
54
|
}
|
|
55
55
|
function be(t) {
|
|
56
|
-
function n(
|
|
57
|
-
const s =
|
|
58
|
-
if (!s) return { frontmatter: {}, content:
|
|
59
|
-
const
|
|
60
|
-
let
|
|
61
|
-
const
|
|
62
|
-
for (const
|
|
56
|
+
function n(a) {
|
|
57
|
+
const s = a.match(/^---\s*\n([\s\S]*?)\n---\s*\n/);
|
|
58
|
+
if (!s) return { frontmatter: {}, content: a };
|
|
59
|
+
const c = {}, o = s[1];
|
|
60
|
+
let l = "", g = !1;
|
|
61
|
+
const u = [];
|
|
62
|
+
for (const w of o.split(`
|
|
63
63
|
`)) {
|
|
64
|
-
const _ =
|
|
64
|
+
const _ = w.trim();
|
|
65
65
|
if (_.startsWith("-")) {
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
68
|
-
|
|
66
|
+
if (g) {
|
|
67
|
+
const v = _.substring(1).trim();
|
|
68
|
+
u.push(v);
|
|
69
69
|
}
|
|
70
70
|
continue;
|
|
71
71
|
}
|
|
72
|
-
if (
|
|
73
|
-
const [
|
|
74
|
-
if (
|
|
75
|
-
|
|
72
|
+
if (g && !_.startsWith("-") && (c[l] = u.slice(), u.length = 0, g = !1), _ != null && _.includes(":")) {
|
|
73
|
+
const [v, ...r] = _.split(":"), f = r.join(":").trim();
|
|
74
|
+
if (l = v.trim(), !f) {
|
|
75
|
+
g = !0;
|
|
76
76
|
continue;
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
f === "true" ? c[l] = !0 : f === "false" ? c[l] = !1 : c[l] = f;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
const
|
|
81
|
+
g && u.length > 0 && (c[l] = u);
|
|
82
|
+
const p = a.replace(
|
|
83
83
|
/^---\s*\n[\s\S]*?\n---\s*\n/,
|
|
84
84
|
""
|
|
85
85
|
);
|
|
86
|
-
return { frontmatter:
|
|
86
|
+
return { frontmatter: c, content: p };
|
|
87
87
|
}
|
|
88
88
|
return {
|
|
89
89
|
/**
|
|
90
90
|
* Load MDX content for a given language and slug.
|
|
91
91
|
* Automatically loads the advanced variant if `advanced` is true.
|
|
92
92
|
*/
|
|
93
|
-
async loadMDXContent(
|
|
94
|
-
const
|
|
95
|
-
if (!
|
|
96
|
-
const
|
|
97
|
-
return { content:
|
|
93
|
+
async loadMDXContent(a, s, c = !1) {
|
|
94
|
+
const o = c ? `${s}-advanced.mdx` : `${s}.mdx`, l = `./docs/${a}/${o}`, g = t[l];
|
|
95
|
+
if (!g) throw new Error(`File not found: ${l}`);
|
|
96
|
+
const u = await g(), { frontmatter: p, content: w } = n(u);
|
|
97
|
+
return { content: w, frontmatter: p };
|
|
98
98
|
},
|
|
99
99
|
/**
|
|
100
100
|
* Load English content for generating consistent heading IDs.
|
|
101
101
|
* All heading anchors are derived from English content for stability across translations.
|
|
102
102
|
*/
|
|
103
|
-
async loadEnglishContent(
|
|
104
|
-
const
|
|
105
|
-
if (!
|
|
106
|
-
const
|
|
107
|
-
return
|
|
103
|
+
async loadEnglishContent(a, s = !1) {
|
|
104
|
+
const o = `./docs/en/${s ? `${a}-advanced.mdx` : `${a}.mdx`}`, l = t[o];
|
|
105
|
+
if (!l) throw new Error(`File not found: ${o}`);
|
|
106
|
+
const g = await l(), { content: u } = n(g);
|
|
107
|
+
return u;
|
|
108
108
|
},
|
|
109
109
|
/**
|
|
110
110
|
* Build a tag index from all MDX files.
|
|
@@ -113,26 +113,26 @@ function be(t) {
|
|
|
113
113
|
* @param language - Language code to scan (defaults to 'en')
|
|
114
114
|
* @returns Promise resolving to tag index mapping tag names to document info
|
|
115
115
|
*/
|
|
116
|
-
async buildTagIndex(
|
|
117
|
-
const s = {},
|
|
118
|
-
(
|
|
116
|
+
async buildTagIndex(a = "en") {
|
|
117
|
+
const s = {}, c = `./docs/${a}/`, o = Object.keys(t).filter(
|
|
118
|
+
(l) => l.startsWith(c)
|
|
119
119
|
);
|
|
120
|
-
for (const
|
|
120
|
+
for (const l of o)
|
|
121
121
|
try {
|
|
122
|
-
const
|
|
122
|
+
const g = t[l], u = await g(), { frontmatter: p, content: w } = n(u), _ = l.split("/").pop() || "", v = _.replace(".mdx", "").replace("-advanced", ""), r = w.match(/^#\s+(.+)$/m), f = r ? r[1].trim() : v;
|
|
123
123
|
if (_.includes("-advanced")) continue;
|
|
124
|
-
const i =
|
|
124
|
+
const i = p.tags;
|
|
125
125
|
if (i && Array.isArray(i))
|
|
126
126
|
for (const b of i)
|
|
127
|
-
s[b] || (s[b] = []), s[b].some((
|
|
128
|
-
} catch (
|
|
129
|
-
console.warn(`Failed to process ${
|
|
127
|
+
s[b] || (s[b] = []), s[b].some((C) => C.slug === v) || s[b].push({ slug: v, title: f });
|
|
128
|
+
} catch (g) {
|
|
129
|
+
console.warn(`Failed to process ${l}:`, g);
|
|
130
130
|
}
|
|
131
131
|
return s;
|
|
132
132
|
}
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Eo(t) {
|
|
136
136
|
const n = be(t);
|
|
137
137
|
return {
|
|
138
138
|
mdxFiles: t,
|
|
@@ -141,15 +141,15 @@ function Oo(t) {
|
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
const we = "app-theme", $e = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", pe = (t) => t === "system" ? $e() : t, qe = () => typeof window > "u" ? "system" : localStorage.getItem(we) || "system", Ne = () => {
|
|
144
|
-
const [t, n] =
|
|
145
|
-
return
|
|
146
|
-
const s = pe(t),
|
|
147
|
-
if (
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
|
|
144
|
+
const [t, n] = L(qe);
|
|
145
|
+
return P(() => {
|
|
146
|
+
const s = pe(t), c = document.querySelector(".xw-blog-root");
|
|
147
|
+
if (c && (c.classList.remove("light", "dark"), c.classList.add(s)), t === "system") {
|
|
148
|
+
const o = window.matchMedia("(prefers-color-scheme: dark)"), l = () => {
|
|
149
|
+
const g = $e(), u = document.querySelector(".xw-blog-root");
|
|
150
|
+
u && (u.classList.remove("light", "dark"), u.classList.add(g));
|
|
151
151
|
};
|
|
152
|
-
return
|
|
152
|
+
return o.addEventListener("change", l), () => o.removeEventListener("change", l);
|
|
153
153
|
}
|
|
154
154
|
}, [t]), {
|
|
155
155
|
theme: t,
|
|
@@ -158,9 +158,9 @@ const we = "app-theme", $e = () => typeof window > "u" ? "light" : window.matchM
|
|
|
158
158
|
},
|
|
159
159
|
effectiveTheme: pe(t)
|
|
160
160
|
};
|
|
161
|
-
}, We = (t) => "items" in t, te = (t, n) => t.map((
|
|
162
|
-
title: ne.getFixedT(n)(
|
|
163
|
-
items:
|
|
161
|
+
}, We = (t) => "items" in t, te = (t, n) => t.map((a) => We(a) ? {
|
|
162
|
+
title: ne.getFixedT(n)(a.title),
|
|
163
|
+
items: a.items.map((s) => ({
|
|
164
164
|
title: ne.getFixedT(n)(s.title),
|
|
165
165
|
slug: s.slug,
|
|
166
166
|
...s.hasAdvanced && { hasAdvanced: s.hasAdvanced },
|
|
@@ -169,54 +169,59 @@ const we = "app-theme", $e = () => typeof window > "u" ? "light" : window.matchM
|
|
|
169
169
|
}
|
|
170
170
|
}))
|
|
171
171
|
} : {
|
|
172
|
-
title: ne.getFixedT(n)(
|
|
173
|
-
slug:
|
|
174
|
-
...
|
|
175
|
-
...
|
|
176
|
-
showTableOfContents:
|
|
172
|
+
title: ne.getFixedT(n)(a.title),
|
|
173
|
+
slug: a.slug,
|
|
174
|
+
...a.hasAdvanced && { hasAdvanced: a.hasAdvanced },
|
|
175
|
+
...a.showTableOfContents !== void 0 && {
|
|
176
|
+
showTableOfContents: a.showTableOfContents
|
|
177
177
|
}
|
|
178
|
-
}),
|
|
179
|
-
function
|
|
178
|
+
}), V = (t) => t.toString().toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, ""), Ie = Be(null);
|
|
179
|
+
function Oo({
|
|
180
|
+
children: t,
|
|
181
|
+
config: n,
|
|
182
|
+
blog: a,
|
|
183
|
+
navigationData: s
|
|
184
|
+
}) {
|
|
180
185
|
Ne();
|
|
181
|
-
const [
|
|
182
|
-
|
|
183
|
-
const { buildTagIndex:
|
|
186
|
+
const [c, o] = L({});
|
|
187
|
+
P(() => {
|
|
188
|
+
const { buildTagIndex: g } = be(a.mdxFiles), u = n.supportedLanguages.map(async (p) => {
|
|
184
189
|
try {
|
|
185
|
-
const
|
|
186
|
-
return { language:
|
|
187
|
-
} catch (
|
|
188
|
-
return console.error(`Failed to build tag index for ${
|
|
190
|
+
const w = await g(p);
|
|
191
|
+
return { language: p, index: w };
|
|
192
|
+
} catch (w) {
|
|
193
|
+
return console.error(`Failed to build tag index for ${p}:`, w), { language: p, index: {} };
|
|
189
194
|
}
|
|
190
195
|
});
|
|
191
|
-
Promise.all(
|
|
192
|
-
const
|
|
193
|
-
for (const
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}).catch((
|
|
197
|
-
console.error("Failed to build tag indices:",
|
|
196
|
+
Promise.all(u).then((p) => {
|
|
197
|
+
const w = {};
|
|
198
|
+
for (const _ of p)
|
|
199
|
+
w[_.language] = _.index;
|
|
200
|
+
o(w);
|
|
201
|
+
}).catch((p) => {
|
|
202
|
+
console.error("Failed to build tag indices:", p);
|
|
198
203
|
});
|
|
199
|
-
}, [
|
|
200
|
-
const
|
|
204
|
+
}, [a.mdxFiles, n.supportedLanguages]);
|
|
205
|
+
const l = { ...n, navigationData: s, tagIndex: c };
|
|
201
206
|
return /* @__PURE__ */ e(
|
|
202
207
|
Ie.Provider,
|
|
203
208
|
{
|
|
204
209
|
value: {
|
|
205
|
-
config:
|
|
206
|
-
loadContent:
|
|
207
|
-
loadEnglishContent:
|
|
210
|
+
config: l,
|
|
211
|
+
loadContent: a.loadContent,
|
|
212
|
+
loadEnglishContent: a.loadEnglishContent
|
|
208
213
|
},
|
|
209
214
|
children: /* @__PURE__ */ e(He, { children: t })
|
|
210
215
|
}
|
|
211
216
|
);
|
|
212
217
|
}
|
|
213
|
-
function
|
|
218
|
+
function j() {
|
|
214
219
|
const t = Me(Ie);
|
|
215
220
|
if (!t)
|
|
216
221
|
throw new Error("useBlogConfig must be used within a BlogProvider");
|
|
217
222
|
return t;
|
|
218
223
|
}
|
|
219
|
-
const Fe = "_tableOfContents_11q9u_1", Ke = "_header_11q9u_20", ze = "_title_11q9u_24", Ue = "_nav_11q9u_33", Ge = "_list_11q9u_39", Qe = "_link_11q9u_46", Xe = "_active_11q9u_70", Ye = "_level1_11q9u_86", Ve = "_level2_11q9u_92", Je = "_level3_11q9u_97", Ze = "_level4_11q9u_103", et = "_level5_11q9u_109", tt = "_level6_11q9u_115",
|
|
224
|
+
const Fe = "_tableOfContents_11q9u_1", Ke = "_header_11q9u_20", ze = "_title_11q9u_24", Ue = "_nav_11q9u_33", Ge = "_list_11q9u_39", Qe = "_link_11q9u_46", Xe = "_active_11q9u_70", Ye = "_level1_11q9u_86", Ve = "_level2_11q9u_92", Je = "_level3_11q9u_97", Ze = "_level4_11q9u_103", et = "_level5_11q9u_109", tt = "_level6_11q9u_115", H = {
|
|
220
225
|
tableOfContents: Fe,
|
|
221
226
|
header: Ke,
|
|
222
227
|
title: ze,
|
|
@@ -235,96 +240,96 @@ function nt({
|
|
|
235
240
|
content: t,
|
|
236
241
|
englishContent: n
|
|
237
242
|
}) {
|
|
238
|
-
const { t:
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
const
|
|
242
|
-
let
|
|
243
|
+
const { t: a } = O(), s = U(), c = G(), [o, l] = L([]), [g, u] = L(""), p = W(null);
|
|
244
|
+
P(() => {
|
|
245
|
+
u(""), (() => {
|
|
246
|
+
const v = /^(#{1,6})\s+(.+)$/gm, r = [];
|
|
247
|
+
let f = v.exec(t);
|
|
243
248
|
const i = [];
|
|
244
|
-
for (;
|
|
245
|
-
const m =
|
|
246
|
-
i.push({ level: m, text:
|
|
249
|
+
for (; f !== null; ) {
|
|
250
|
+
const m = f[1].length, $ = f[2].trim();
|
|
251
|
+
i.push({ level: m, text: $ }), f = v.exec(t);
|
|
247
252
|
}
|
|
248
253
|
const b = /^(#{1,6})\s+(.+)$/gm;
|
|
249
|
-
let
|
|
250
|
-
for (;
|
|
251
|
-
const m =
|
|
252
|
-
|
|
253
|
-
id:
|
|
254
|
-
text: i[
|
|
254
|
+
let C = b.exec(n), S = 0;
|
|
255
|
+
for (; C !== null && S < i.length; ) {
|
|
256
|
+
const m = C[2].trim(), $ = V(m);
|
|
257
|
+
r.push({
|
|
258
|
+
id: $,
|
|
259
|
+
text: i[S].text,
|
|
255
260
|
// Use localized text for display
|
|
256
|
-
level: i[
|
|
257
|
-
}),
|
|
261
|
+
level: i[S].level
|
|
262
|
+
}), S++, C = b.exec(n);
|
|
258
263
|
}
|
|
259
|
-
|
|
264
|
+
l(r);
|
|
260
265
|
})();
|
|
261
|
-
}, [t, n]),
|
|
262
|
-
if (
|
|
266
|
+
}, [t, n]), P(() => {
|
|
267
|
+
if (o.length === 0) return;
|
|
263
268
|
const _ = setTimeout(() => {
|
|
264
|
-
const
|
|
265
|
-
(
|
|
269
|
+
const v = o.filter(
|
|
270
|
+
(r) => !document.getElementById(r.id)
|
|
266
271
|
);
|
|
267
|
-
|
|
272
|
+
v.length > 0 && console.warn("Some heading elements not found:", v);
|
|
268
273
|
}, 100);
|
|
269
274
|
return () => clearTimeout(_);
|
|
270
|
-
}, [
|
|
271
|
-
if (
|
|
272
|
-
|
|
275
|
+
}, [o]), P(() => {
|
|
276
|
+
if (o.length === 0) return;
|
|
277
|
+
p.current && p.current.disconnect();
|
|
273
278
|
const _ = setTimeout(() => {
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
(
|
|
277
|
-
const
|
|
278
|
-
if (
|
|
279
|
-
const i =
|
|
280
|
-
|
|
279
|
+
const v = o.map((r) => document.getElementById(r.id)).filter(Boolean);
|
|
280
|
+
v.length !== 0 && (p.current = new IntersectionObserver(
|
|
281
|
+
(r) => {
|
|
282
|
+
const f = r.filter((i) => i.isIntersecting);
|
|
283
|
+
if (f.length > 0) {
|
|
284
|
+
const i = f.reduce((b, C) => b.boundingClientRect.top < C.boundingClientRect.top ? b : C);
|
|
285
|
+
u(i.target.id);
|
|
281
286
|
}
|
|
282
287
|
},
|
|
283
288
|
{
|
|
284
289
|
rootMargin: "-80px 0% -80% 0%",
|
|
285
290
|
threshold: 0
|
|
286
291
|
}
|
|
287
|
-
),
|
|
288
|
-
|
|
292
|
+
), v.forEach((r) => {
|
|
293
|
+
p.current && p.current.observe(r);
|
|
289
294
|
}));
|
|
290
295
|
}, 150);
|
|
291
296
|
return () => {
|
|
292
|
-
clearTimeout(_),
|
|
297
|
+
clearTimeout(_), p.current && p.current.disconnect();
|
|
293
298
|
};
|
|
294
|
-
}, [
|
|
295
|
-
|
|
299
|
+
}, [o]), P(() => () => {
|
|
300
|
+
p.current && p.current.disconnect();
|
|
296
301
|
}, []);
|
|
297
|
-
const
|
|
298
|
-
const
|
|
299
|
-
if (
|
|
300
|
-
const
|
|
301
|
-
|
|
302
|
-
`${s.pathname}?${
|
|
302
|
+
const w = (_) => {
|
|
303
|
+
const v = document.getElementById(_);
|
|
304
|
+
if (v) {
|
|
305
|
+
const r = new URLSearchParams(s.search);
|
|
306
|
+
r.set("a", _), c(
|
|
307
|
+
`${s.pathname}?${r.toString()}${s.hash}`,
|
|
303
308
|
{
|
|
304
309
|
replace: !0
|
|
305
310
|
}
|
|
306
311
|
);
|
|
307
|
-
const b =
|
|
312
|
+
const b = v.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
308
313
|
window.scrollTo({
|
|
309
314
|
top: b,
|
|
310
315
|
behavior: "smooth"
|
|
311
316
|
});
|
|
312
317
|
}
|
|
313
318
|
};
|
|
314
|
-
return
|
|
315
|
-
/* @__PURE__ */ e("div", { className:
|
|
316
|
-
/* @__PURE__ */ e("nav", { className:
|
|
319
|
+
return o.length === 0 ? null : /* @__PURE__ */ d("aside", { className: H.tableOfContents, children: [
|
|
320
|
+
/* @__PURE__ */ e("div", { className: H.header, children: /* @__PURE__ */ e("span", { className: H.title, children: a("ui.onThisPage", "On this page") }) }),
|
|
321
|
+
/* @__PURE__ */ e("nav", { className: H.nav, children: /* @__PURE__ */ e("ul", { className: H.list, children: o.map((_) => /* @__PURE__ */ e("li", { className: H.item, children: /* @__PURE__ */ e(
|
|
317
322
|
"button",
|
|
318
323
|
{
|
|
319
|
-
className: `${
|
|
320
|
-
onClick: () =>
|
|
324
|
+
className: `${H.link} ${H[`level${_.level}`]} ${g === _.id ? H.active : ""}`,
|
|
325
|
+
onClick: () => w(_.id),
|
|
321
326
|
type: "button",
|
|
322
327
|
children: _.text
|
|
323
328
|
}
|
|
324
329
|
) }, _.id)) }) })
|
|
325
330
|
] });
|
|
326
331
|
}
|
|
327
|
-
const ot = "_overlay_1e1d4_1", at = "_modal_1e1d4_26", st = "_header_1e1d4_50", ct = "_title_1e1d4_58", rt = "_closeButton_1e1d4_65", lt = "_results_1e1d4_86", it = "_resultsList_1e1d4_94", dt = "_resultItem_1e1d4_100", ut = "_resultTitle_1e1d4_119", ht = "_resultSlug_1e1d4_124", mt = "_noResults_1e1d4_130",
|
|
332
|
+
const ot = "_overlay_1e1d4_1", at = "_modal_1e1d4_26", st = "_header_1e1d4_50", ct = "_title_1e1d4_58", rt = "_closeButton_1e1d4_65", lt = "_results_1e1d4_86", it = "_resultsList_1e1d4_94", dt = "_resultItem_1e1d4_100", ut = "_resultTitle_1e1d4_119", ht = "_resultSlug_1e1d4_124", mt = "_noResults_1e1d4_130", E = {
|
|
328
333
|
overlay: ot,
|
|
329
334
|
modal: at,
|
|
330
335
|
header: st,
|
|
@@ -337,21 +342,21 @@ const ot = "_overlay_1e1d4_1", at = "_modal_1e1d4_26", st = "_header_1e1d4_50",
|
|
|
337
342
|
resultSlug: ht,
|
|
338
343
|
noResults: mt
|
|
339
344
|
};
|
|
340
|
-
function
|
|
345
|
+
function gt({
|
|
341
346
|
tag: t,
|
|
342
347
|
results: n,
|
|
343
|
-
language:
|
|
348
|
+
language: a,
|
|
344
349
|
onClose: s
|
|
345
350
|
}) {
|
|
346
|
-
const { t:
|
|
347
|
-
const
|
|
348
|
-
|
|
351
|
+
const { t: c } = O(), { config: o } = j(), l = G(), g = (u) => {
|
|
352
|
+
const p = o.basePath || "";
|
|
353
|
+
l(`${p}/${a}/${u}`), s();
|
|
349
354
|
};
|
|
350
355
|
return ve(
|
|
351
|
-
/* @__PURE__ */ e("div", { className:
|
|
352
|
-
/* @__PURE__ */ d("div", { className:
|
|
353
|
-
/* @__PURE__ */ d("h2", { className:
|
|
354
|
-
|
|
356
|
+
/* @__PURE__ */ e("div", { className: E.overlay, onClick: s, children: /* @__PURE__ */ d("div", { className: E.modal, onClick: (u) => u.stopPropagation(), children: [
|
|
357
|
+
/* @__PURE__ */ d("div", { className: E.header, children: [
|
|
358
|
+
/* @__PURE__ */ d("h2", { className: E.title, children: [
|
|
359
|
+
c("ui.tagResults"),
|
|
355
360
|
": ",
|
|
356
361
|
t
|
|
357
362
|
] }),
|
|
@@ -359,45 +364,45 @@ function _t({
|
|
|
359
364
|
"button",
|
|
360
365
|
{
|
|
361
366
|
type: "button",
|
|
362
|
-
className:
|
|
367
|
+
className: E.closeButton,
|
|
363
368
|
onClick: s,
|
|
364
369
|
"aria-label": "Close",
|
|
365
370
|
children: /* @__PURE__ */ e(se, {})
|
|
366
371
|
}
|
|
367
372
|
)
|
|
368
373
|
] }),
|
|
369
|
-
/* @__PURE__ */ e("div", { className:
|
|
374
|
+
/* @__PURE__ */ e("div", { className: E.results, children: n.length === 0 ? /* @__PURE__ */ e("div", { className: E.noResults, children: c("ui.noTagResults") }) : /* @__PURE__ */ e("ul", { className: E.resultsList, children: n.map((u) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
370
375
|
"button",
|
|
371
376
|
{
|
|
372
377
|
type: "button",
|
|
373
|
-
className:
|
|
374
|
-
onClick: () =>
|
|
378
|
+
className: E.resultItem,
|
|
379
|
+
onClick: () => g(u.slug),
|
|
375
380
|
children: [
|
|
376
|
-
/* @__PURE__ */ e("div", { className:
|
|
377
|
-
/* @__PURE__ */ d("div", { className:
|
|
381
|
+
/* @__PURE__ */ e("div", { className: E.resultTitle, children: u.title }),
|
|
382
|
+
/* @__PURE__ */ d("div", { className: E.resultSlug, children: [
|
|
378
383
|
"/",
|
|
379
|
-
|
|
384
|
+
u.slug
|
|
380
385
|
] })
|
|
381
386
|
]
|
|
382
387
|
}
|
|
383
|
-
) },
|
|
388
|
+
) }, u.slug)) }) })
|
|
384
389
|
] }) }),
|
|
385
390
|
document.body
|
|
386
391
|
);
|
|
387
392
|
}
|
|
388
|
-
const
|
|
389
|
-
tags:
|
|
393
|
+
const _t = "_tags_11t8a_1", pt = "_compact_11t8a_9", ft = "_tagLabel_11t8a_15", vt = "_tagIcon_11t8a_25", bt = "_tagList_11t8a_30", wt = "_tag_11t8a_1", K = {
|
|
394
|
+
tags: _t,
|
|
390
395
|
compact: pt,
|
|
391
396
|
tagLabel: ft,
|
|
392
397
|
tagIcon: vt,
|
|
393
398
|
tagList: bt,
|
|
394
399
|
tag: wt
|
|
395
400
|
};
|
|
396
|
-
function $t({ tags: t, variant: n = "default", onTagClick:
|
|
397
|
-
const { t: s } =
|
|
401
|
+
function $t({ tags: t, variant: n = "default", onTagClick: a }) {
|
|
402
|
+
const { t: s } = O();
|
|
398
403
|
if (!t || t.length === 0) return null;
|
|
399
|
-
const
|
|
400
|
-
|
|
404
|
+
const c = (o) => {
|
|
405
|
+
a && a(o);
|
|
401
406
|
};
|
|
402
407
|
return /* @__PURE__ */ d(
|
|
403
408
|
"div",
|
|
@@ -411,167 +416,167 @@ function $t({ tags: t, variant: n = "default", onTagClick: o }) {
|
|
|
411
416
|
":"
|
|
412
417
|
] })
|
|
413
418
|
] }),
|
|
414
|
-
/* @__PURE__ */ e("div", { className: K.tagList, children: t.map((
|
|
419
|
+
/* @__PURE__ */ e("div", { className: K.tagList, children: t.map((o) => /* @__PURE__ */ e(
|
|
415
420
|
"button",
|
|
416
421
|
{
|
|
417
422
|
type: "button",
|
|
418
423
|
className: K.tag,
|
|
419
|
-
onClick: () =>
|
|
420
|
-
"aria-label": `${s("ui.filterByTag")}: ${
|
|
421
|
-
children:
|
|
424
|
+
onClick: () => c(o),
|
|
425
|
+
"aria-label": `${s("ui.filterByTag")}: ${o}`,
|
|
426
|
+
children: o
|
|
422
427
|
},
|
|
423
|
-
|
|
428
|
+
o
|
|
424
429
|
)) })
|
|
425
430
|
]
|
|
426
431
|
}
|
|
427
432
|
);
|
|
428
433
|
}
|
|
429
|
-
const Nt = "_contentPage_1nxj5_1", It = "_metadata_1nxj5_20", xt = "_author_1nxj5_30", kt = "_date_1nxj5_31", Ct = "_loadingContainer_1nxj5_48", Tt = "_errorContainer_1nxj5_49",
|
|
434
|
+
const Nt = "_contentPage_1nxj5_1", It = "_metadata_1nxj5_20", xt = "_author_1nxj5_30", kt = "_date_1nxj5_31", Ct = "_loadingContainer_1nxj5_48", Tt = "_errorContainer_1nxj5_49", St = "_skeletonTitle_1nxj5_71", yt = "_skeletonParagraph_1nxj5_80", Lt = "_skeletonParagraphShort_1nxj5_93", Pt = "_errorText_1nxj5_107", Bt = "_mdxContent_1nxj5_112", Mt = "_withMetadata_1nxj5_125", Dt = "_codeBlock_1nxj5_300", Et = "_codeLanguage_1nxj5_304", M = {
|
|
430
435
|
contentPage: Nt,
|
|
431
436
|
metadata: It,
|
|
432
437
|
author: xt,
|
|
433
438
|
date: kt,
|
|
434
439
|
loadingContainer: Ct,
|
|
435
440
|
errorContainer: Tt,
|
|
436
|
-
skeletonTitle:
|
|
437
|
-
skeletonParagraph:
|
|
438
|
-
skeletonParagraphShort:
|
|
439
|
-
errorText:
|
|
441
|
+
skeletonTitle: St,
|
|
442
|
+
skeletonParagraph: yt,
|
|
443
|
+
skeletonParagraphShort: Lt,
|
|
444
|
+
errorText: Pt,
|
|
440
445
|
mdxContent: Bt,
|
|
441
446
|
withMetadata: Mt,
|
|
442
447
|
codeBlock: Dt,
|
|
443
|
-
codeLanguage:
|
|
448
|
+
codeLanguage: Et
|
|
444
449
|
};
|
|
445
|
-
function
|
|
450
|
+
function Ot({ language: t }) {
|
|
446
451
|
var ie;
|
|
447
|
-
const { slug: n } = ae(),
|
|
448
|
-
const
|
|
452
|
+
const { slug: n } = ae(), a = U(), { t: s } = O(), { config: c, loadContent: o, loadEnglishContent: l } = j(), [g, u] = L(""), [p, w] = L(""), [_, v] = L({}), [r, f] = L(!0), [i, b] = L(null), [C, S] = L(!0), [m, $] = L(null), B = W(0), Q = W([]), J = ((h) => {
|
|
453
|
+
const N = {
|
|
449
454
|
advanced: !1,
|
|
450
455
|
anchor: ""
|
|
451
456
|
};
|
|
452
|
-
if (!
|
|
453
|
-
const
|
|
454
|
-
for (const T of
|
|
455
|
-
T === "advanced" ?
|
|
456
|
-
return
|
|
457
|
-
})(
|
|
458
|
-
if (
|
|
457
|
+
if (!h) return N;
|
|
458
|
+
const I = (h.startsWith("?") ? h.substring(1) : h).split("&");
|
|
459
|
+
for (const T of I)
|
|
460
|
+
T === "advanced" ? N.advanced = !0 : T.startsWith("a=") && (N.anchor = T.substring(2));
|
|
461
|
+
return N;
|
|
462
|
+
})(a.search), A = J.advanced;
|
|
463
|
+
if (P(() => {
|
|
459
464
|
(async () => {
|
|
460
465
|
if (!n) return;
|
|
461
|
-
|
|
462
|
-
let
|
|
463
|
-
for (const
|
|
464
|
-
if ("items" in
|
|
465
|
-
const
|
|
466
|
-
if (
|
|
467
|
-
|
|
466
|
+
f(!0), b(null), B.current = 0;
|
|
467
|
+
let N = !0;
|
|
468
|
+
for (const x of c.navigationData)
|
|
469
|
+
if ("items" in x) {
|
|
470
|
+
const I = x.items.find((T) => T.slug === n);
|
|
471
|
+
if (I) {
|
|
472
|
+
N = I.showTableOfContents !== !1;
|
|
468
473
|
break;
|
|
469
474
|
}
|
|
470
|
-
} else if (
|
|
471
|
-
|
|
475
|
+
} else if (x.slug === n) {
|
|
476
|
+
N = x.showTableOfContents !== !1;
|
|
472
477
|
break;
|
|
473
478
|
}
|
|
474
|
-
|
|
479
|
+
S(N);
|
|
475
480
|
try {
|
|
476
|
-
let
|
|
481
|
+
let x;
|
|
477
482
|
try {
|
|
478
|
-
|
|
483
|
+
x = await o(t, n, A);
|
|
479
484
|
} catch {
|
|
480
|
-
if (
|
|
481
|
-
|
|
485
|
+
if (A)
|
|
486
|
+
x = await o(t, n, !1);
|
|
482
487
|
else
|
|
483
488
|
throw new Error("Content not found");
|
|
484
489
|
}
|
|
485
|
-
let
|
|
490
|
+
let I = "";
|
|
486
491
|
try {
|
|
487
|
-
|
|
492
|
+
I = await l(n, A);
|
|
488
493
|
} catch {
|
|
489
|
-
|
|
494
|
+
A && (I = await l(n, !1));
|
|
490
495
|
}
|
|
491
|
-
const T = /^(#{1,6})\s+(.+)$/gm,
|
|
492
|
-
let F = T.exec(
|
|
496
|
+
const T = /^(#{1,6})\s+(.+)$/gm, R = [];
|
|
497
|
+
let F = T.exec(I);
|
|
493
498
|
for (; F !== null; ) {
|
|
494
499
|
const Z = F[2].trim();
|
|
495
|
-
|
|
500
|
+
R.push(Z), F = T.exec(I);
|
|
496
501
|
}
|
|
497
|
-
|
|
498
|
-
} catch (
|
|
499
|
-
b(
|
|
502
|
+
Q.current = R, w(I), u(x.content), v(x.frontmatter);
|
|
503
|
+
} catch (x) {
|
|
504
|
+
b(x instanceof Error ? x.message : "Failed to load content");
|
|
500
505
|
} finally {
|
|
501
|
-
|
|
506
|
+
f(!1);
|
|
502
507
|
}
|
|
503
508
|
})();
|
|
504
509
|
}, [
|
|
505
510
|
n,
|
|
506
511
|
t,
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
]),
|
|
512
|
-
if (!
|
|
513
|
-
const
|
|
514
|
-
const
|
|
515
|
-
if (
|
|
516
|
-
const T =
|
|
512
|
+
A,
|
|
513
|
+
c.navigationData,
|
|
514
|
+
o,
|
|
515
|
+
l
|
|
516
|
+
]), P(() => {
|
|
517
|
+
if (!r && J.anchor) {
|
|
518
|
+
const h = setTimeout(() => {
|
|
519
|
+
const N = document.getElementById(J.anchor);
|
|
520
|
+
if (N) {
|
|
521
|
+
const T = N.getBoundingClientRect().top + window.pageYOffset - 80;
|
|
517
522
|
window.scrollTo({
|
|
518
523
|
top: T,
|
|
519
524
|
behavior: "smooth"
|
|
520
525
|
});
|
|
521
526
|
}
|
|
522
527
|
}, 150);
|
|
523
|
-
return () => clearTimeout(
|
|
528
|
+
return () => clearTimeout(h);
|
|
524
529
|
}
|
|
525
|
-
}, [
|
|
526
|
-
return /* @__PURE__ */ e("div", { className:
|
|
527
|
-
/* @__PURE__ */ e("div", { className:
|
|
528
|
-
/* @__PURE__ */ e("div", { className:
|
|
529
|
-
/* @__PURE__ */ e("div", { className:
|
|
530
|
-
/* @__PURE__ */ e("div", { className:
|
|
530
|
+
}, [r, J.anchor]), r)
|
|
531
|
+
return /* @__PURE__ */ e("div", { className: M.contentPage, children: /* @__PURE__ */ d("div", { className: M.loadingContainer, children: [
|
|
532
|
+
/* @__PURE__ */ e("div", { className: M.skeletonTitle }),
|
|
533
|
+
/* @__PURE__ */ e("div", { className: M.skeletonParagraph }),
|
|
534
|
+
/* @__PURE__ */ e("div", { className: M.skeletonParagraph }),
|
|
535
|
+
/* @__PURE__ */ e("div", { className: M.skeletonParagraphShort })
|
|
531
536
|
] }) });
|
|
532
537
|
if (i)
|
|
533
|
-
return /* @__PURE__ */ e("div", { className:
|
|
538
|
+
return /* @__PURE__ */ e("div", { className: M.contentPage, children: /* @__PURE__ */ e("div", { className: M.errorContainer, children: /* @__PURE__ */ d("div", { className: M.errorText, children: [
|
|
534
539
|
"Error: ",
|
|
535
540
|
i
|
|
536
541
|
] }) }) });
|
|
537
|
-
|
|
542
|
+
B.current = 0;
|
|
538
543
|
let le = !1;
|
|
539
|
-
const xe = () => /* @__PURE__ */ d("div", { className:
|
|
540
|
-
_.author && /* @__PURE__ */ d("span", { className:
|
|
544
|
+
const xe = () => /* @__PURE__ */ d("div", { className: M.metadata, children: [
|
|
545
|
+
_.author && /* @__PURE__ */ d("span", { className: M.author, children: [
|
|
541
546
|
/* @__PURE__ */ e(Te, { size: 16, weight: "regular" }),
|
|
542
547
|
_.author
|
|
543
548
|
] }),
|
|
544
|
-
_.date && /* @__PURE__ */ d("span", { className:
|
|
545
|
-
/* @__PURE__ */ e(
|
|
549
|
+
_.date && /* @__PURE__ */ d("span", { className: M.date, children: [
|
|
550
|
+
/* @__PURE__ */ e(Se, { size: 16, weight: "regular" }),
|
|
546
551
|
s("ui.lastEdited"),
|
|
547
552
|
": ",
|
|
548
553
|
_.date
|
|
549
554
|
] })
|
|
550
555
|
] });
|
|
551
556
|
return /* @__PURE__ */ d(z, { children: [
|
|
552
|
-
/* @__PURE__ */ d("div", { className:
|
|
557
|
+
/* @__PURE__ */ d("div", { className: M.contentPage, children: [
|
|
553
558
|
/* @__PURE__ */ e(Ae, { hasAdvanced: _.hasAdvanced || !1 }),
|
|
554
|
-
/* @__PURE__ */ e("div", { className:
|
|
559
|
+
/* @__PURE__ */ e("div", { className: M.mdxContent, children: /* @__PURE__ */ e(
|
|
555
560
|
De,
|
|
556
561
|
{
|
|
557
|
-
remarkPlugins: [
|
|
562
|
+
remarkPlugins: [Ee],
|
|
558
563
|
components: {
|
|
559
|
-
h1: ({ children:
|
|
560
|
-
const
|
|
564
|
+
h1: ({ children: h }) => {
|
|
565
|
+
const N = B.current++, x = Q.current[N] || "", I = V(x), T = A ? `?advanced&a=${I}` : `?a=${I}`, R = `#/${t}/${n}${T}`, F = !le;
|
|
561
566
|
le = !0;
|
|
562
567
|
const Z = _.date || _.author;
|
|
563
568
|
return /* @__PURE__ */ d(z, { children: [
|
|
564
569
|
/* @__PURE__ */ e(
|
|
565
570
|
"h1",
|
|
566
571
|
{
|
|
567
|
-
id:
|
|
568
|
-
className: F && Z ?
|
|
572
|
+
id: I,
|
|
573
|
+
className: F && Z ? M.withMetadata : void 0,
|
|
569
574
|
children: /* @__PURE__ */ e(
|
|
570
575
|
"a",
|
|
571
576
|
{
|
|
572
|
-
href:
|
|
577
|
+
href: R,
|
|
573
578
|
style: { color: "inherit", textDecoration: "none" },
|
|
574
|
-
children:
|
|
579
|
+
children: h
|
|
575
580
|
}
|
|
576
581
|
)
|
|
577
582
|
}
|
|
@@ -579,83 +584,83 @@ function Et({ language: t }) {
|
|
|
579
584
|
F && Z && /* @__PURE__ */ e(xe, {})
|
|
580
585
|
] });
|
|
581
586
|
},
|
|
582
|
-
h2: ({ children:
|
|
583
|
-
const
|
|
584
|
-
return /* @__PURE__ */ e("h2", { id:
|
|
587
|
+
h2: ({ children: h }) => {
|
|
588
|
+
const N = B.current++, x = Q.current[N] || "", I = V(x), T = A ? `?advanced&a=${I}` : `?a=${I}`, R = `#/${t}/${n}${T}`;
|
|
589
|
+
return /* @__PURE__ */ e("h2", { id: I, children: /* @__PURE__ */ e(
|
|
585
590
|
"a",
|
|
586
591
|
{
|
|
587
|
-
href:
|
|
592
|
+
href: R,
|
|
588
593
|
style: { color: "inherit", textDecoration: "none" },
|
|
589
|
-
children:
|
|
594
|
+
children: h
|
|
590
595
|
}
|
|
591
596
|
) });
|
|
592
597
|
},
|
|
593
|
-
h3: ({ children:
|
|
594
|
-
const
|
|
595
|
-
return /* @__PURE__ */ e("h3", { id:
|
|
598
|
+
h3: ({ children: h }) => {
|
|
599
|
+
const N = B.current++, x = Q.current[N] || "", I = V(x), T = A ? `?advanced&a=${I}` : `?a=${I}`, R = `#/${t}/${n}${T}`;
|
|
600
|
+
return /* @__PURE__ */ e("h3", { id: I, children: /* @__PURE__ */ e(
|
|
596
601
|
"a",
|
|
597
602
|
{
|
|
598
|
-
href:
|
|
603
|
+
href: R,
|
|
599
604
|
style: { color: "inherit", textDecoration: "none" },
|
|
600
|
-
children:
|
|
605
|
+
children: h
|
|
601
606
|
}
|
|
602
607
|
) });
|
|
603
608
|
},
|
|
604
|
-
h4: ({ children:
|
|
605
|
-
const
|
|
606
|
-
return /* @__PURE__ */ e("h4", { id:
|
|
609
|
+
h4: ({ children: h }) => {
|
|
610
|
+
const N = B.current++, x = Q.current[N] || "", I = V(x), T = A ? `?advanced&a=${I}` : `?a=${I}`, R = `#/${t}/${n}${T}`;
|
|
611
|
+
return /* @__PURE__ */ e("h4", { id: I, children: /* @__PURE__ */ e(
|
|
607
612
|
"a",
|
|
608
613
|
{
|
|
609
|
-
href:
|
|
614
|
+
href: R,
|
|
610
615
|
style: { color: "inherit", textDecoration: "none" },
|
|
611
|
-
children:
|
|
616
|
+
children: h
|
|
612
617
|
}
|
|
613
618
|
) });
|
|
614
619
|
},
|
|
615
|
-
h5: ({ children:
|
|
616
|
-
const
|
|
617
|
-
return /* @__PURE__ */ e("h5", { id:
|
|
620
|
+
h5: ({ children: h }) => {
|
|
621
|
+
const N = `h5-${B.current++}`;
|
|
622
|
+
return /* @__PURE__ */ e("h5", { id: N, children: h });
|
|
618
623
|
},
|
|
619
|
-
h6: ({ children:
|
|
620
|
-
const
|
|
621
|
-
return /* @__PURE__ */ e("h6", { id:
|
|
624
|
+
h6: ({ children: h }) => {
|
|
625
|
+
const N = `h6-${B.current++}`;
|
|
626
|
+
return /* @__PURE__ */ e("h6", { id: N, children: h });
|
|
622
627
|
},
|
|
623
|
-
p: ({ children:
|
|
624
|
-
ul: ({ children:
|
|
625
|
-
ol: ({ children:
|
|
626
|
-
li: ({ children:
|
|
627
|
-
code: ({ className:
|
|
628
|
-
if (!
|
|
629
|
-
return /* @__PURE__ */ e("code", { ...
|
|
630
|
-
const T = (
|
|
631
|
-
return /* @__PURE__ */ d("div", { className:
|
|
632
|
-
T && /* @__PURE__ */ e("div", { className:
|
|
633
|
-
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className:
|
|
628
|
+
p: ({ children: h }) => /* @__PURE__ */ e("p", { children: h }),
|
|
629
|
+
ul: ({ children: h }) => /* @__PURE__ */ e("ul", { children: h }),
|
|
630
|
+
ol: ({ children: h }) => /* @__PURE__ */ e("ol", { children: h }),
|
|
631
|
+
li: ({ children: h }) => /* @__PURE__ */ e("li", { children: h }),
|
|
632
|
+
code: ({ className: h, children: N, ...x }) => {
|
|
633
|
+
if (!h)
|
|
634
|
+
return /* @__PURE__ */ e("code", { ...x, children: N });
|
|
635
|
+
const T = (h == null ? void 0 : h.replace("language-", "")) || "";
|
|
636
|
+
return /* @__PURE__ */ d("div", { className: M.codeBlock, children: [
|
|
637
|
+
T && /* @__PURE__ */ e("div", { className: M.codeLanguage, children: T }),
|
|
638
|
+
/* @__PURE__ */ e("pre", { children: /* @__PURE__ */ e("code", { className: h, ...x, children: N }) })
|
|
634
639
|
] });
|
|
635
640
|
},
|
|
636
|
-
pre: ({ children:
|
|
641
|
+
pre: ({ children: h }) => /* @__PURE__ */ e(z, { children: h }),
|
|
637
642
|
// Let code component handle pre styling
|
|
638
|
-
blockquote: ({ children:
|
|
639
|
-
a: ({ href:
|
|
640
|
-
if (
|
|
641
|
-
const
|
|
642
|
-
return /* @__PURE__ */ e("a", { href: T, ...
|
|
643
|
+
blockquote: ({ children: h }) => /* @__PURE__ */ e("blockquote", { children: h }),
|
|
644
|
+
a: ({ href: h, children: N, ...x }) => {
|
|
645
|
+
if (h != null && h.startsWith("./")) {
|
|
646
|
+
const I = h.slice(2), T = `#/${t}/${I}`;
|
|
647
|
+
return /* @__PURE__ */ e("a", { href: T, ...x, children: N });
|
|
643
648
|
}
|
|
644
|
-
return
|
|
649
|
+
return h != null && h.startsWith("http://") || h != null && h.startsWith("https://") ? /* @__PURE__ */ e(
|
|
645
650
|
"a",
|
|
646
651
|
{
|
|
647
|
-
href:
|
|
652
|
+
href: h,
|
|
648
653
|
target: "_blank",
|
|
649
654
|
rel: "noopener noreferrer",
|
|
650
|
-
...
|
|
651
|
-
children:
|
|
655
|
+
...x,
|
|
656
|
+
children: N
|
|
652
657
|
}
|
|
653
|
-
) : /* @__PURE__ */ e("a", { href:
|
|
658
|
+
) : /* @__PURE__ */ e("a", { href: h, ...x, children: N });
|
|
654
659
|
},
|
|
655
|
-
strong: ({ children:
|
|
656
|
-
em: ({ children:
|
|
660
|
+
strong: ({ children: h }) => /* @__PURE__ */ e("strong", { children: h }),
|
|
661
|
+
em: ({ children: h }) => /* @__PURE__ */ e("em", { children: h })
|
|
657
662
|
},
|
|
658
|
-
children:
|
|
663
|
+
children: g
|
|
659
664
|
}
|
|
660
665
|
) }),
|
|
661
666
|
_.tags && _.tags.length > 0 && /* @__PURE__ */ e(
|
|
@@ -663,23 +668,23 @@ function Et({ language: t }) {
|
|
|
663
668
|
{
|
|
664
669
|
tags: _.tags,
|
|
665
670
|
variant: "compact",
|
|
666
|
-
onTagClick: (
|
|
671
|
+
onTagClick: (h) => $(h)
|
|
667
672
|
}
|
|
668
673
|
)
|
|
669
674
|
] }),
|
|
670
|
-
|
|
671
|
-
m && ((ie =
|
|
672
|
-
|
|
675
|
+
C && /* @__PURE__ */ e(nt, { content: g, englishContent: p }),
|
|
676
|
+
m && ((ie = c.tagIndex) == null ? void 0 : ie[t]) && /* @__PURE__ */ e(
|
|
677
|
+
gt,
|
|
673
678
|
{
|
|
674
679
|
tag: m,
|
|
675
|
-
results:
|
|
680
|
+
results: c.tagIndex[t][m] || [],
|
|
676
681
|
language: t,
|
|
677
|
-
onClose: () =>
|
|
682
|
+
onClose: () => $(null)
|
|
678
683
|
}
|
|
679
684
|
)
|
|
680
685
|
] });
|
|
681
686
|
}
|
|
682
|
-
const Rt = "_searchButton_1k9sl_1", jt = "_searchIcon_1k9sl_17", At = "_searchHint_1k9sl_23", Ht = "_kbd_1k9sl_27", qt = "_searchOverlay_1k9sl_42", Wt = "_searchModal_1k9sl_67", Ft = "_searchHeader_1k9sl_91", Kt = "_searchInput_1k9sl_105", zt = "_closeButton_1k9sl_123", Ut = "_searchResults_1k9sl_144", Gt = "_resultsList_1k9sl_152", Qt = "_resultItem_1k9sl_158", Xt = "_selected_1k9sl_173", Yt = "_resultTitle_1k9sl_176", Vt = "_resultSlug_1k9sl_180", Jt = "_noResults_1k9sl_186", Zt = "_searchHints_1k9sl_193", en = "_hint_1k9sl_210",
|
|
687
|
+
const Rt = "_searchButton_1k9sl_1", jt = "_searchIcon_1k9sl_17", At = "_searchHint_1k9sl_23", Ht = "_kbd_1k9sl_27", qt = "_searchOverlay_1k9sl_42", Wt = "_searchModal_1k9sl_67", Ft = "_searchHeader_1k9sl_91", Kt = "_searchInput_1k9sl_105", zt = "_closeButton_1k9sl_123", Ut = "_searchResults_1k9sl_144", Gt = "_resultsList_1k9sl_152", Qt = "_resultItem_1k9sl_158", Xt = "_selected_1k9sl_173", Yt = "_resultTitle_1k9sl_176", Vt = "_resultSlug_1k9sl_180", Jt = "_noResults_1k9sl_186", Zt = "_searchHints_1k9sl_193", en = "_hint_1k9sl_210", y = {
|
|
683
688
|
searchButton: Rt,
|
|
684
689
|
searchIcon: jt,
|
|
685
690
|
searchHint: At,
|
|
@@ -700,133 +705,145 @@ const Rt = "_searchButton_1k9sl_1", jt = "_searchIcon_1k9sl_17", At = "_searchHi
|
|
|
700
705
|
hint: en
|
|
701
706
|
};
|
|
702
707
|
function tn({ language: t }) {
|
|
703
|
-
const { t: n } =
|
|
704
|
-
|
|
708
|
+
const { t: n } = O(), { config: a } = j(), s = G(), [c, o] = L(!1), [l, g] = L(""), [u, p] = L([]), [w, _] = L(0), v = W(null), r = W(null), i = typeof navigator < "u" && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘K" : "Ctrl+K", b = te(
|
|
709
|
+
a.navigationData,
|
|
705
710
|
t
|
|
706
|
-
).flatMap((m) => "items" in m ? m.items.map((
|
|
707
|
-
title:
|
|
708
|
-
slug:
|
|
711
|
+
).flatMap((m) => "items" in m ? m.items.map(($) => ({
|
|
712
|
+
title: $.title,
|
|
713
|
+
slug: $.slug
|
|
709
714
|
})) : [{ title: m.title, slug: m.slug }]);
|
|
710
|
-
|
|
711
|
-
if (!
|
|
712
|
-
|
|
715
|
+
P(() => {
|
|
716
|
+
if (!l.trim()) {
|
|
717
|
+
p([]), _(0);
|
|
713
718
|
return;
|
|
714
719
|
}
|
|
715
|
-
const m =
|
|
716
|
-
(
|
|
720
|
+
const m = l.toLowerCase(), $ = b.filter(
|
|
721
|
+
(B) => B.title.toLowerCase().includes(m) || B.slug.toLowerCase().includes(m)
|
|
717
722
|
);
|
|
718
|
-
|
|
719
|
-
}, [
|
|
720
|
-
const m = (
|
|
721
|
-
(
|
|
722
|
-
var
|
|
723
|
-
return (
|
|
724
|
-
}, 100)),
|
|
723
|
+
p($), _(0);
|
|
724
|
+
}, [l]), P(() => {
|
|
725
|
+
const m = ($) => {
|
|
726
|
+
($.metaKey || $.ctrlKey) && $.key === "k" && ($.preventDefault(), o(!0), setTimeout(() => {
|
|
727
|
+
var B;
|
|
728
|
+
return (B = v.current) == null ? void 0 : B.focus();
|
|
729
|
+
}, 100)), $.key === "Escape" && c && (o(!1), g(""));
|
|
725
730
|
};
|
|
726
731
|
return document.addEventListener("keydown", m), () => document.removeEventListener("keydown", m);
|
|
727
|
-
}, [
|
|
728
|
-
|
|
729
|
-
|
|
732
|
+
}, [c]), P(() => {
|
|
733
|
+
const m = () => {
|
|
734
|
+
o(!0), setTimeout(() => {
|
|
735
|
+
var B;
|
|
736
|
+
return (B = v.current) == null ? void 0 : B.focus();
|
|
737
|
+
}, 100);
|
|
738
|
+
}, $ = () => {
|
|
739
|
+
o(!1), g("");
|
|
740
|
+
};
|
|
741
|
+
return window.addEventListener("blog:open-search", m), window.addEventListener("blog:close-search", $), () => {
|
|
742
|
+
window.removeEventListener("blog:open-search", m), window.removeEventListener("blog:close-search", $);
|
|
743
|
+
};
|
|
744
|
+
}, []);
|
|
745
|
+
const C = (m) => {
|
|
746
|
+
m.key === "ArrowDown" ? (m.preventDefault(), _(($) => Math.min($ + 1, u.length - 1))) : m.key === "ArrowUp" ? (m.preventDefault(), _(($) => Math.max($ - 1, 0))) : m.key === "Enter" && u[w] && (m.preventDefault(), S(u[w].slug));
|
|
730
747
|
};
|
|
731
|
-
|
|
732
|
-
const m = (
|
|
733
|
-
|
|
748
|
+
P(() => {
|
|
749
|
+
const m = ($) => {
|
|
750
|
+
r.current && !r.current.contains($.target) && (o(!1), g(""));
|
|
734
751
|
};
|
|
735
|
-
return
|
|
736
|
-
}, [
|
|
737
|
-
const
|
|
738
|
-
const
|
|
739
|
-
s(`${
|
|
752
|
+
return c && document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
|
|
753
|
+
}, [c]);
|
|
754
|
+
const S = (m) => {
|
|
755
|
+
const $ = a.basePath || "";
|
|
756
|
+
s(`${$}/${t}/${m}`), o(!1), g("");
|
|
740
757
|
};
|
|
741
758
|
return /* @__PURE__ */ d(z, { children: [
|
|
742
759
|
/* @__PURE__ */ d(
|
|
743
760
|
"button",
|
|
744
761
|
{
|
|
745
762
|
type: "button",
|
|
746
|
-
className:
|
|
763
|
+
className: y.searchButton,
|
|
747
764
|
onClick: () => {
|
|
748
|
-
|
|
765
|
+
o(!0), setTimeout(() => {
|
|
749
766
|
var m;
|
|
750
|
-
return (m =
|
|
767
|
+
return (m = v.current) == null ? void 0 : m.focus();
|
|
751
768
|
}, 100);
|
|
752
769
|
},
|
|
753
770
|
"aria-label": n("ui.search"),
|
|
754
771
|
children: [
|
|
755
|
-
/* @__PURE__ */ e(he, { className:
|
|
756
|
-
/* @__PURE__ */ e("span", { className:
|
|
757
|
-
/* @__PURE__ */ e("kbd", { className:
|
|
772
|
+
/* @__PURE__ */ e(he, { className: y.searchIcon }),
|
|
773
|
+
/* @__PURE__ */ e("span", { className: y.searchHint, children: n("ui.search") }),
|
|
774
|
+
/* @__PURE__ */ e("kbd", { className: y.kbd, children: i })
|
|
758
775
|
]
|
|
759
776
|
}
|
|
760
777
|
),
|
|
761
|
-
|
|
778
|
+
c && ve(
|
|
762
779
|
/* @__PURE__ */ e(
|
|
763
780
|
"div",
|
|
764
781
|
{
|
|
765
|
-
className:
|
|
782
|
+
className: y.searchOverlay,
|
|
766
783
|
onClick: () => {
|
|
767
|
-
|
|
784
|
+
o(!1), g("");
|
|
768
785
|
},
|
|
769
786
|
children: /* @__PURE__ */ d(
|
|
770
787
|
"div",
|
|
771
788
|
{
|
|
772
|
-
className:
|
|
773
|
-
ref:
|
|
789
|
+
className: y.searchModal,
|
|
790
|
+
ref: r,
|
|
774
791
|
onClick: (m) => m.stopPropagation(),
|
|
775
792
|
children: [
|
|
776
|
-
/* @__PURE__ */ d("div", { className:
|
|
777
|
-
/* @__PURE__ */ e(he, { className:
|
|
793
|
+
/* @__PURE__ */ d("div", { className: y.searchHeader, children: [
|
|
794
|
+
/* @__PURE__ */ e(he, { className: y.searchIcon }),
|
|
778
795
|
/* @__PURE__ */ e(
|
|
779
796
|
"input",
|
|
780
797
|
{
|
|
781
|
-
ref:
|
|
798
|
+
ref: v,
|
|
782
799
|
type: "text",
|
|
783
|
-
className:
|
|
800
|
+
className: y.searchInput,
|
|
784
801
|
placeholder: n("ui.searchPlaceholder"),
|
|
785
|
-
value:
|
|
786
|
-
onChange: (m) =>
|
|
787
|
-
onKeyDown:
|
|
802
|
+
value: l,
|
|
803
|
+
onChange: (m) => g(m.target.value),
|
|
804
|
+
onKeyDown: C
|
|
788
805
|
}
|
|
789
806
|
),
|
|
790
807
|
/* @__PURE__ */ e(
|
|
791
808
|
"button",
|
|
792
809
|
{
|
|
793
810
|
type: "button",
|
|
794
|
-
className:
|
|
811
|
+
className: y.closeButton,
|
|
795
812
|
onClick: () => {
|
|
796
|
-
|
|
813
|
+
o(!1), g("");
|
|
797
814
|
},
|
|
798
815
|
"aria-label": "Close search",
|
|
799
816
|
children: /* @__PURE__ */ e(se, {})
|
|
800
817
|
}
|
|
801
818
|
)
|
|
802
819
|
] }),
|
|
803
|
-
|
|
820
|
+
l && /* @__PURE__ */ e("div", { className: y.searchResults, children: u.length === 0 ? /* @__PURE__ */ e("div", { className: y.noResults, children: n("ui.noSearchResults") }) : /* @__PURE__ */ e("ul", { className: y.resultsList, children: u.map((m, $) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ d(
|
|
804
821
|
"button",
|
|
805
822
|
{
|
|
806
823
|
type: "button",
|
|
807
|
-
className: `${
|
|
808
|
-
onClick: () =>
|
|
809
|
-
onMouseEnter: () => _(
|
|
824
|
+
className: `${y.resultItem} ${$ === w ? y.selected : ""}`,
|
|
825
|
+
onClick: () => S(m.slug),
|
|
826
|
+
onMouseEnter: () => _($),
|
|
810
827
|
children: [
|
|
811
|
-
/* @__PURE__ */ e("div", { className:
|
|
812
|
-
/* @__PURE__ */ d("div", { className:
|
|
828
|
+
/* @__PURE__ */ e("div", { className: y.resultTitle, children: m.title }),
|
|
829
|
+
/* @__PURE__ */ d("div", { className: y.resultSlug, children: [
|
|
813
830
|
"/",
|
|
814
831
|
m.slug
|
|
815
832
|
] })
|
|
816
833
|
]
|
|
817
834
|
}
|
|
818
835
|
) }, m.slug)) }) }),
|
|
819
|
-
!
|
|
820
|
-
/* @__PURE__ */ d("div", { className:
|
|
836
|
+
!l && /* @__PURE__ */ d("div", { className: y.searchHints, children: [
|
|
837
|
+
/* @__PURE__ */ d("div", { className: y.hint, children: [
|
|
821
838
|
/* @__PURE__ */ e("kbd", { children: "↑" }),
|
|
822
839
|
/* @__PURE__ */ e("kbd", { children: "↓" }),
|
|
823
840
|
/* @__PURE__ */ e("span", { children: n("ui.searchNavigate") })
|
|
824
841
|
] }),
|
|
825
|
-
/* @__PURE__ */ d("div", { className:
|
|
842
|
+
/* @__PURE__ */ d("div", { className: y.hint, children: [
|
|
826
843
|
/* @__PURE__ */ e("kbd", { children: "↵" }),
|
|
827
844
|
/* @__PURE__ */ e("span", { children: n("ui.searchSelect") })
|
|
828
845
|
] }),
|
|
829
|
-
/* @__PURE__ */ d("div", { className:
|
|
846
|
+
/* @__PURE__ */ d("div", { className: y.hint, children: [
|
|
830
847
|
/* @__PURE__ */ e("kbd", { children: "esc" }),
|
|
831
848
|
/* @__PURE__ */ e("span", { children: n("ui.searchClose") })
|
|
832
849
|
] })
|
|
@@ -840,7 +857,7 @@ function tn({ language: t }) {
|
|
|
840
857
|
)
|
|
841
858
|
] });
|
|
842
859
|
}
|
|
843
|
-
const nn = "_header_jrobc_1", on = "_container_jrobc_24", an = "_content_jrobc_36", sn = "_leftSection_jrobc_43", cn = "_mobileMenuButton_jrobc_49", rn = "_burgerIcon_jrobc_87", ln = "_logo_jrobc_92", dn = "_nav_jrobc_98", un = "_navLink_jrobc_109", hn = "_externalIcon_jrobc_135", mn = "_supportDropdown_jrobc_141",
|
|
860
|
+
const nn = "_header_jrobc_1", on = "_container_jrobc_24", an = "_content_jrobc_36", sn = "_leftSection_jrobc_43", cn = "_mobileMenuButton_jrobc_49", rn = "_burgerIcon_jrobc_87", ln = "_logo_jrobc_92", dn = "_nav_jrobc_98", un = "_navLink_jrobc_109", hn = "_externalIcon_jrobc_135", mn = "_supportDropdown_jrobc_141", gn = "_themeDropdown_jrobc_145", _n = "_themeButton_jrobc_149", pn = "_themeIcon_jrobc_171", fn = "_supportButton_jrobc_177", vn = "_caretIcon_jrobc_198", bn = "_dropdownMenu_jrobc_208", wn = "_dropdownItem_jrobc_221", $n = "_dropdownIcon_jrobc_244", k = {
|
|
844
861
|
header: nn,
|
|
845
862
|
container: on,
|
|
846
863
|
content: an,
|
|
@@ -852,8 +869,8 @@ const nn = "_header_jrobc_1", on = "_container_jrobc_24", an = "_content_jrobc_3
|
|
|
852
869
|
navLink: un,
|
|
853
870
|
externalIcon: hn,
|
|
854
871
|
supportDropdown: mn,
|
|
855
|
-
themeDropdown:
|
|
856
|
-
themeButton:
|
|
872
|
+
themeDropdown: gn,
|
|
873
|
+
themeButton: _n,
|
|
857
874
|
themeIcon: pn,
|
|
858
875
|
supportButton: fn,
|
|
859
876
|
caretIcon: vn,
|
|
@@ -862,57 +879,57 @@ const nn = "_header_jrobc_1", on = "_container_jrobc_24", an = "_content_jrobc_3
|
|
|
862
879
|
dropdownIcon: $n
|
|
863
880
|
};
|
|
864
881
|
function Nn({ onMobileMenuToggle: t }) {
|
|
865
|
-
const { t: n, i18n:
|
|
866
|
-
return
|
|
882
|
+
const { t: n, i18n: a } = O(), { config: s } = j(), c = s.header ?? {}, o = c.navLinks ?? [], l = c.dropdownItems ?? [], [g, u] = L(!1), [p, w] = L(!1), { theme: _, setTheme: v } = Ne(), r = W(null), f = W(null);
|
|
883
|
+
return P(() => {
|
|
867
884
|
const i = (b) => {
|
|
868
|
-
|
|
885
|
+
r.current && !r.current.contains(b.target) && u(!1), f.current && !f.current.contains(b.target) && w(!1);
|
|
869
886
|
};
|
|
870
887
|
return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
|
|
871
|
-
}, []), /* @__PURE__ */ e("header", { className:
|
|
872
|
-
/* @__PURE__ */ d("div", { className:
|
|
888
|
+
}, []), /* @__PURE__ */ e("header", { className: k.header, children: /* @__PURE__ */ e("div", { className: k.container, children: /* @__PURE__ */ d("div", { className: k.content, children: [
|
|
889
|
+
/* @__PURE__ */ d("div", { className: k.leftSection, children: [
|
|
873
890
|
/* @__PURE__ */ e(
|
|
874
891
|
"button",
|
|
875
892
|
{
|
|
876
893
|
type: "button",
|
|
877
|
-
className:
|
|
894
|
+
className: k.mobileMenuButton,
|
|
878
895
|
onClick: t,
|
|
879
896
|
"aria-label": "Open menu",
|
|
880
|
-
children: /* @__PURE__ */ e(
|
|
897
|
+
children: /* @__PURE__ */ e(ye, { className: k.burgerIcon })
|
|
881
898
|
}
|
|
882
899
|
),
|
|
883
|
-
/* @__PURE__ */ e("div", { className:
|
|
900
|
+
/* @__PURE__ */ e("div", { className: k.logo })
|
|
884
901
|
] }),
|
|
885
|
-
/* @__PURE__ */ d("nav", { className:
|
|
886
|
-
/* @__PURE__ */ e(tn, { language:
|
|
887
|
-
/* @__PURE__ */ d("div", { className:
|
|
902
|
+
/* @__PURE__ */ d("nav", { className: k.nav, children: [
|
|
903
|
+
/* @__PURE__ */ e(tn, { language: a.language }),
|
|
904
|
+
/* @__PURE__ */ d("div", { className: k.themeDropdown, ref: f, children: [
|
|
888
905
|
/* @__PURE__ */ d(
|
|
889
906
|
"button",
|
|
890
907
|
{
|
|
891
908
|
type: "button",
|
|
892
|
-
className:
|
|
893
|
-
onClick: () =>
|
|
894
|
-
"aria-expanded":
|
|
909
|
+
className: k.themeButton,
|
|
910
|
+
onClick: () => w(!p),
|
|
911
|
+
"aria-expanded": p,
|
|
895
912
|
"aria-haspopup": "true",
|
|
896
913
|
"aria-label": n("ui.theme"),
|
|
897
914
|
children: [
|
|
898
|
-
_ === "light" && /* @__PURE__ */ e(me, { className:
|
|
899
|
-
_ === "dark" && /* @__PURE__ */ e(
|
|
900
|
-
_ === "system" && /* @__PURE__ */ e(
|
|
901
|
-
/* @__PURE__ */ e(oe, { className:
|
|
915
|
+
_ === "light" && /* @__PURE__ */ e(me, { className: k.themeIcon }),
|
|
916
|
+
_ === "dark" && /* @__PURE__ */ e(ge, { className: k.themeIcon }),
|
|
917
|
+
_ === "system" && /* @__PURE__ */ e(_e, { className: k.themeIcon }),
|
|
918
|
+
/* @__PURE__ */ e(oe, { className: k.caretIcon })
|
|
902
919
|
]
|
|
903
920
|
}
|
|
904
921
|
),
|
|
905
|
-
|
|
922
|
+
p && /* @__PURE__ */ d("div", { className: k.dropdownMenu, children: [
|
|
906
923
|
/* @__PURE__ */ d(
|
|
907
924
|
"button",
|
|
908
925
|
{
|
|
909
926
|
type: "button",
|
|
910
927
|
onClick: () => {
|
|
911
|
-
|
|
928
|
+
v("light"), w(!1);
|
|
912
929
|
},
|
|
913
|
-
className:
|
|
930
|
+
className: k.dropdownItem,
|
|
914
931
|
children: [
|
|
915
|
-
/* @__PURE__ */ e(me, { className:
|
|
932
|
+
/* @__PURE__ */ e(me, { className: k.dropdownIcon }),
|
|
916
933
|
n("ui.light")
|
|
917
934
|
]
|
|
918
935
|
}
|
|
@@ -922,11 +939,11 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
922
939
|
{
|
|
923
940
|
type: "button",
|
|
924
941
|
onClick: () => {
|
|
925
|
-
|
|
942
|
+
v("dark"), w(!1);
|
|
926
943
|
},
|
|
927
|
-
className:
|
|
944
|
+
className: k.dropdownItem,
|
|
928
945
|
children: [
|
|
929
|
-
/* @__PURE__ */ e(
|
|
946
|
+
/* @__PURE__ */ e(ge, { className: k.dropdownIcon }),
|
|
930
947
|
n("ui.dark")
|
|
931
948
|
]
|
|
932
949
|
}
|
|
@@ -936,43 +953,43 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
936
953
|
{
|
|
937
954
|
type: "button",
|
|
938
955
|
onClick: () => {
|
|
939
|
-
|
|
956
|
+
v("system"), w(!1);
|
|
940
957
|
},
|
|
941
|
-
className:
|
|
958
|
+
className: k.dropdownItem,
|
|
942
959
|
children: [
|
|
943
|
-
/* @__PURE__ */ e(
|
|
960
|
+
/* @__PURE__ */ e(_e, { className: k.dropdownIcon }),
|
|
944
961
|
n("ui.system")
|
|
945
962
|
]
|
|
946
963
|
}
|
|
947
964
|
)
|
|
948
965
|
] })
|
|
949
966
|
] }),
|
|
950
|
-
|
|
967
|
+
l.length > 0 && /* @__PURE__ */ d("div", { className: k.supportDropdown, ref: r, children: [
|
|
951
968
|
/* @__PURE__ */ d(
|
|
952
969
|
"button",
|
|
953
970
|
{
|
|
954
971
|
type: "button",
|
|
955
|
-
className:
|
|
956
|
-
onClick: () =>
|
|
957
|
-
"aria-expanded":
|
|
972
|
+
className: k.supportButton,
|
|
973
|
+
onClick: () => u(!g),
|
|
974
|
+
"aria-expanded": g,
|
|
958
975
|
"aria-haspopup": "true",
|
|
959
976
|
children: [
|
|
960
977
|
n("ui.support"),
|
|
961
|
-
/* @__PURE__ */ e(oe, { className:
|
|
978
|
+
/* @__PURE__ */ e(oe, { className: k.caretIcon })
|
|
962
979
|
]
|
|
963
980
|
}
|
|
964
981
|
),
|
|
965
|
-
|
|
966
|
-
const
|
|
982
|
+
g && /* @__PURE__ */ e("div", { className: k.dropdownMenu, children: l.map((i, b) => {
|
|
983
|
+
const C = i.target ?? (i.url.startsWith("http") ? "_blank" : "_self"), S = i.rel ?? (C === "_blank" ? "noopener noreferrer" : void 0), m = i.icon;
|
|
967
984
|
return /* @__PURE__ */ d(
|
|
968
985
|
"a",
|
|
969
986
|
{
|
|
970
987
|
href: i.url,
|
|
971
|
-
target:
|
|
972
|
-
rel:
|
|
973
|
-
className:
|
|
988
|
+
target: C,
|
|
989
|
+
rel: S,
|
|
990
|
+
className: k.dropdownItem,
|
|
974
991
|
children: [
|
|
975
|
-
m && /* @__PURE__ */ e(m, { className:
|
|
992
|
+
m && /* @__PURE__ */ e(m, { className: k.dropdownIcon }),
|
|
976
993
|
i.label
|
|
977
994
|
]
|
|
978
995
|
},
|
|
@@ -980,18 +997,18 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
980
997
|
);
|
|
981
998
|
}) })
|
|
982
999
|
] }),
|
|
983
|
-
|
|
984
|
-
const
|
|
1000
|
+
o.map((i, b) => {
|
|
1001
|
+
const C = i.target ?? (typeof i.url == "string" && i.url.startsWith("http") ? "_blank" : "_self"), S = i.rel ?? (C === "_blank" ? "noopener noreferrer" : void 0), m = i.icon;
|
|
985
1002
|
return /* @__PURE__ */ d(
|
|
986
1003
|
"a",
|
|
987
1004
|
{
|
|
988
1005
|
href: i.url,
|
|
989
|
-
target:
|
|
990
|
-
rel:
|
|
991
|
-
className: i.className ??
|
|
1006
|
+
target: C,
|
|
1007
|
+
rel: S,
|
|
1008
|
+
className: i.className ?? k.navLink,
|
|
992
1009
|
children: [
|
|
993
1010
|
i.label,
|
|
994
|
-
m && /* @__PURE__ */ e(m, { className:
|
|
1011
|
+
m && /* @__PURE__ */ e(m, { className: k.externalIcon })
|
|
995
1012
|
]
|
|
996
1013
|
},
|
|
997
1014
|
b
|
|
@@ -1000,170 +1017,170 @@ function Nn({ onMobileMenuToggle: t }) {
|
|
|
1000
1017
|
] })
|
|
1001
1018
|
] }) }) });
|
|
1002
1019
|
}
|
|
1003
|
-
const
|
|
1020
|
+
const Y = (t) => "items" in t;
|
|
1004
1021
|
function ce({
|
|
1005
1022
|
styles: t,
|
|
1006
1023
|
onLanguageChange: n
|
|
1007
1024
|
}) {
|
|
1008
|
-
const { i18n:
|
|
1009
|
-
const
|
|
1010
|
-
let
|
|
1011
|
-
|
|
1012
|
-
const i =
|
|
1013
|
-
let
|
|
1014
|
-
|
|
1015
|
-
const
|
|
1016
|
-
|
|
1025
|
+
const { i18n: a } = O(), s = U(), c = G(), { config: o } = j(), [l, g] = L(!1), u = W(null), p = a.language, w = (v) => {
|
|
1026
|
+
const r = o.basePath || "";
|
|
1027
|
+
let f = s.pathname;
|
|
1028
|
+
r && f.startsWith(r) && (f = f.slice(r.length));
|
|
1029
|
+
const i = f.split("/").filter(Boolean), b = i[0];
|
|
1030
|
+
let C = "";
|
|
1031
|
+
o.supportedLanguages.includes(b) ? (i[0] = v, C = `${r}/${i.join("/")}`) : C = `${r}/${v}${f}`;
|
|
1032
|
+
const S = C + s.search + s.hash;
|
|
1033
|
+
a.changeLanguage(v), c(S), g(!1), n == null || n();
|
|
1017
1034
|
};
|
|
1018
|
-
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1035
|
+
P(() => {
|
|
1036
|
+
const v = (r) => {
|
|
1037
|
+
u.current && !u.current.contains(r.target) && g(!1);
|
|
1021
1038
|
};
|
|
1022
|
-
return document.addEventListener("mousedown",
|
|
1039
|
+
return document.addEventListener("mousedown", v), () => document.removeEventListener("mousedown", v);
|
|
1023
1040
|
}, []);
|
|
1024
|
-
const _ = (
|
|
1025
|
-
return /* @__PURE__ */ d("div", { className: t.languageSelect, ref:
|
|
1041
|
+
const _ = (v) => a.getFixedT(v)("language") || v;
|
|
1042
|
+
return /* @__PURE__ */ d("div", { className: t.languageSelect, ref: u, children: [
|
|
1026
1043
|
/* @__PURE__ */ d(
|
|
1027
1044
|
"button",
|
|
1028
1045
|
{
|
|
1029
1046
|
type: "button",
|
|
1030
1047
|
className: t.languageButton,
|
|
1031
|
-
onClick: () =>
|
|
1032
|
-
"aria-expanded":
|
|
1048
|
+
onClick: () => g(!l),
|
|
1049
|
+
"aria-expanded": l,
|
|
1033
1050
|
"aria-haspopup": "listbox",
|
|
1034
1051
|
children: [
|
|
1035
|
-
/* @__PURE__ */ e(
|
|
1036
|
-
_(
|
|
1052
|
+
/* @__PURE__ */ e(Le, { className: t.icon }),
|
|
1053
|
+
_(p),
|
|
1037
1054
|
/* @__PURE__ */ e(oe, { className: t.chevron })
|
|
1038
1055
|
]
|
|
1039
1056
|
}
|
|
1040
1057
|
),
|
|
1041
|
-
|
|
1058
|
+
l && /* @__PURE__ */ e("div", { className: t.languageDropdown, role: "listbox", children: o.supportedLanguages.map((v) => /* @__PURE__ */ e(
|
|
1042
1059
|
"button",
|
|
1043
1060
|
{
|
|
1044
1061
|
type: "button",
|
|
1045
|
-
className: `${t.languageOption} ${
|
|
1046
|
-
onClick: () =>
|
|
1062
|
+
className: `${t.languageOption} ${v === p ? t.selected : ""}`,
|
|
1063
|
+
onClick: () => w(v),
|
|
1047
1064
|
role: "option",
|
|
1048
|
-
"aria-selected":
|
|
1049
|
-
children: _(
|
|
1065
|
+
"aria-selected": v === p,
|
|
1066
|
+
children: _(v)
|
|
1050
1067
|
},
|
|
1051
|
-
|
|
1068
|
+
v
|
|
1052
1069
|
)) })
|
|
1053
1070
|
] });
|
|
1054
1071
|
}
|
|
1055
1072
|
function re({ styles: t, onLinkClick: n }) {
|
|
1056
|
-
const { i18n:
|
|
1057
|
-
const
|
|
1058
|
-
return te(
|
|
1059
|
-
(i, b,
|
|
1060
|
-
if (
|
|
1061
|
-
const
|
|
1073
|
+
const { i18n: a } = O(), s = U(), { config: c } = j(), [o, l] = L(() => {
|
|
1074
|
+
const r = a.language;
|
|
1075
|
+
return te(c.navigationData, r).reduce(
|
|
1076
|
+
(i, b, C) => {
|
|
1077
|
+
if (Y(b)) {
|
|
1078
|
+
const S = c.navigationData[C], m = Y(S) && S.defaultOpen === !0;
|
|
1062
1079
|
i[b.title] = m;
|
|
1063
1080
|
}
|
|
1064
1081
|
return i;
|
|
1065
1082
|
},
|
|
1066
1083
|
{}
|
|
1067
1084
|
);
|
|
1068
|
-
}),
|
|
1069
|
-
|
|
1070
|
-
|
|
1085
|
+
}), g = a.language, u = te(
|
|
1086
|
+
c.navigationData,
|
|
1087
|
+
g
|
|
1071
1088
|
);
|
|
1072
|
-
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1075
|
-
|
|
1089
|
+
P(() => {
|
|
1090
|
+
const f = te(
|
|
1091
|
+
c.navigationData,
|
|
1092
|
+
g
|
|
1076
1093
|
).reduce(
|
|
1077
|
-
(i, b,
|
|
1078
|
-
if (
|
|
1079
|
-
const
|
|
1094
|
+
(i, b, C) => {
|
|
1095
|
+
if (Y(b)) {
|
|
1096
|
+
const S = c.navigationData[C], m = Y(S) && S.defaultOpen === !0;
|
|
1080
1097
|
i[b.title] = m;
|
|
1081
1098
|
}
|
|
1082
1099
|
return i;
|
|
1083
1100
|
},
|
|
1084
1101
|
{}
|
|
1085
1102
|
);
|
|
1086
|
-
|
|
1087
|
-
}, [
|
|
1088
|
-
const
|
|
1089
|
-
|
|
1090
|
-
...
|
|
1091
|
-
[
|
|
1103
|
+
l(f);
|
|
1104
|
+
}, [g, c.navigationData]);
|
|
1105
|
+
const p = (r) => {
|
|
1106
|
+
l((f) => ({
|
|
1107
|
+
...f,
|
|
1108
|
+
[r]: !f[r]
|
|
1092
1109
|
}));
|
|
1093
|
-
},
|
|
1094
|
-
const
|
|
1110
|
+
}, w = (r) => {
|
|
1111
|
+
const f = c.basePath || "";
|
|
1095
1112
|
let i = s.pathname;
|
|
1096
|
-
|
|
1113
|
+
f && i.startsWith(f) && (i = i.slice(f.length));
|
|
1097
1114
|
const b = i.split("/").filter(Boolean);
|
|
1098
|
-
return b[b.length - 1] ===
|
|
1099
|
-
}, _ = (
|
|
1100
|
-
const
|
|
1115
|
+
return b[b.length - 1] === r;
|
|
1116
|
+
}, _ = (r) => {
|
|
1117
|
+
const f = c.basePath || "";
|
|
1101
1118
|
let i = s.pathname;
|
|
1102
|
-
|
|
1119
|
+
f && i.startsWith(f) && (i = i.slice(f.length));
|
|
1103
1120
|
const b = i.split("/").filter(Boolean);
|
|
1104
|
-
return b[0] &&
|
|
1105
|
-
},
|
|
1121
|
+
return b[0] && c.supportedLanguages.includes(b[0]) ? `${f}/${b[0]}/${r}` : `${f}/${g}/${r}`;
|
|
1122
|
+
}, v = () => {
|
|
1106
1123
|
n == null || n();
|
|
1107
1124
|
};
|
|
1108
|
-
return /* @__PURE__ */ e("div", { className: t.navigation, children:
|
|
1125
|
+
return /* @__PURE__ */ e("div", { className: t.navigation, children: u.map((r) => Y(r) ? /* @__PURE__ */ d("div", { className: t.section, children: [
|
|
1109
1126
|
/* @__PURE__ */ d(
|
|
1110
1127
|
"button",
|
|
1111
1128
|
{
|
|
1112
1129
|
type: "button",
|
|
1113
|
-
className: `${t.sectionButton} ${
|
|
1114
|
-
onClick: () =>
|
|
1130
|
+
className: `${t.sectionButton} ${o[r.title] ? t.expanded : ""}`,
|
|
1131
|
+
onClick: () => p(r.title),
|
|
1115
1132
|
children: [
|
|
1116
|
-
|
|
1117
|
-
/* @__PURE__ */ e(
|
|
1133
|
+
r.title,
|
|
1134
|
+
/* @__PURE__ */ e(Pe, { className: t.icon })
|
|
1118
1135
|
]
|
|
1119
1136
|
}
|
|
1120
1137
|
),
|
|
1121
|
-
|
|
1138
|
+
o[r.title] && /* @__PURE__ */ e("div", { className: t.sectionItems, children: r.items.map((f) => /* @__PURE__ */ e(
|
|
1122
1139
|
de,
|
|
1123
1140
|
{
|
|
1124
|
-
to: _(
|
|
1125
|
-
className: `${t.navItem} ${
|
|
1126
|
-
onClick:
|
|
1127
|
-
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children:
|
|
1141
|
+
to: _(f.slug),
|
|
1142
|
+
className: `${t.navItem} ${w(f.slug) ? t.active : ""}`,
|
|
1143
|
+
onClick: v,
|
|
1144
|
+
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: f.title }) })
|
|
1128
1145
|
},
|
|
1129
|
-
|
|
1146
|
+
f.slug
|
|
1130
1147
|
)) })
|
|
1131
|
-
] },
|
|
1148
|
+
] }, r.title) : /* @__PURE__ */ e(
|
|
1132
1149
|
de,
|
|
1133
1150
|
{
|
|
1134
|
-
to: _(
|
|
1135
|
-
className: `${t.navItem} ${
|
|
1136
|
-
onClick:
|
|
1137
|
-
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children:
|
|
1151
|
+
to: _(r.slug),
|
|
1152
|
+
className: `${t.navItem} ${w(r.slug) ? t.active : ""}`,
|
|
1153
|
+
onClick: v,
|
|
1154
|
+
children: /* @__PURE__ */ e("div", { className: t.navItemContent, children: /* @__PURE__ */ e("span", { className: t.navItemTitle, children: r.title }) })
|
|
1138
1155
|
},
|
|
1139
|
-
|
|
1156
|
+
r.slug
|
|
1140
1157
|
)) });
|
|
1141
1158
|
}
|
|
1142
1159
|
function Ro({
|
|
1143
1160
|
styles: t,
|
|
1144
1161
|
onLinkClick: n,
|
|
1145
|
-
onLanguageChange:
|
|
1162
|
+
onLanguageChange: a
|
|
1146
1163
|
}) {
|
|
1147
1164
|
return /* @__PURE__ */ d(z, { children: [
|
|
1148
|
-
/* @__PURE__ */ e(ce, { styles: t, onLanguageChange:
|
|
1165
|
+
/* @__PURE__ */ e(ce, { styles: t, onLanguageChange: a }),
|
|
1149
1166
|
/* @__PURE__ */ e(re, { styles: t, onLinkClick: n })
|
|
1150
1167
|
] });
|
|
1151
1168
|
}
|
|
1152
|
-
const In = "_backdrop_1a7pu_1", xn = "_open_1a7pu_13", kn = "_mobileMenu_1a7pu_18", Cn = "_header_1a7pu_37", Tn = "_brand_1a7pu_46",
|
|
1169
|
+
const In = "_backdrop_1a7pu_1", xn = "_open_1a7pu_13", kn = "_mobileMenu_1a7pu_18", Cn = "_header_1a7pu_37", Tn = "_brand_1a7pu_46", Sn = "_cloudIcon_1a7pu_53", yn = "_title_1a7pu_62", Ln = "_closeButton_1a7pu_69", Pn = "_closeIcon_1a7pu_101", Bn = "_languageSection_1a7pu_106", Mn = "_languageSelect_1a7pu_112", Dn = "_languageButton_1a7pu_117", En = "_icon_1a7pu_156", On = "_chevron_1a7pu_162", Rn = "_languageDropdown_1a7pu_172", jn = "_languageOption_1a7pu_185", An = "_selected_1a7pu_226", Hn = "_scrollArea_1a7pu_231", qn = "_navigation_1a7pu_237", Wn = "_section_1a7pu_241", Fn = "_sectionButton_1a7pu_245", Kn = "_expanded_1a7pu_285", zn = "_sectionItems_1a7pu_289", Un = "_navItem_1a7pu_297", Gn = "_active_1a7pu_310", Qn = "_navItemContent_1a7pu_316", Xn = "_navItemTitle_1a7pu_322", D = {
|
|
1153
1170
|
backdrop: In,
|
|
1154
1171
|
open: xn,
|
|
1155
1172
|
mobileMenu: kn,
|
|
1156
1173
|
header: Cn,
|
|
1157
1174
|
brand: Tn,
|
|
1158
|
-
cloudIcon:
|
|
1159
|
-
title:
|
|
1160
|
-
closeButton:
|
|
1161
|
-
closeIcon:
|
|
1175
|
+
cloudIcon: Sn,
|
|
1176
|
+
title: yn,
|
|
1177
|
+
closeButton: Ln,
|
|
1178
|
+
closeIcon: Pn,
|
|
1162
1179
|
languageSection: Bn,
|
|
1163
1180
|
languageSelect: Mn,
|
|
1164
1181
|
languageButton: Dn,
|
|
1165
|
-
icon:
|
|
1166
|
-
chevron:
|
|
1182
|
+
icon: En,
|
|
1183
|
+
chevron: On,
|
|
1167
1184
|
languageDropdown: Rn,
|
|
1168
1185
|
languageOption: jn,
|
|
1169
1186
|
selected: An,
|
|
@@ -1179,14 +1196,14 @@ const In = "_backdrop_1a7pu_1", xn = "_open_1a7pu_13", kn = "_mobileMenu_1a7pu_1
|
|
|
1179
1196
|
navItemTitle: Xn
|
|
1180
1197
|
};
|
|
1181
1198
|
function Yn({ isOpen: t, onClose: n }) {
|
|
1182
|
-
const { config:
|
|
1183
|
-
return
|
|
1199
|
+
const { config: a } = j(), s = a.logo;
|
|
1200
|
+
return P(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "unset", () => {
|
|
1184
1201
|
document.body.style.overflow = "unset";
|
|
1185
|
-
}), [t]),
|
|
1186
|
-
const
|
|
1187
|
-
|
|
1202
|
+
}), [t]), P(() => {
|
|
1203
|
+
const c = (o) => {
|
|
1204
|
+
o.key === "Escape" && t && n();
|
|
1188
1205
|
};
|
|
1189
|
-
return document.addEventListener("keydown",
|
|
1206
|
+
return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
|
|
1190
1207
|
}, [t, n]), /* @__PURE__ */ d(z, { children: [
|
|
1191
1208
|
/* @__PURE__ */ e(
|
|
1192
1209
|
"div",
|
|
@@ -1199,7 +1216,7 @@ function Yn({ isOpen: t, onClose: n }) {
|
|
|
1199
1216
|
/* @__PURE__ */ d("div", { className: D.header, children: [
|
|
1200
1217
|
/* @__PURE__ */ d("div", { className: D.brand, children: [
|
|
1201
1218
|
s && /* @__PURE__ */ e(s, { className: D.cloudIcon }),
|
|
1202
|
-
/* @__PURE__ */ e("h1", { className: D.title, children:
|
|
1219
|
+
/* @__PURE__ */ e("h1", { className: D.title, children: a.title })
|
|
1203
1220
|
] }),
|
|
1204
1221
|
/* @__PURE__ */ e(
|
|
1205
1222
|
"button",
|
|
@@ -1217,7 +1234,7 @@ function Yn({ isOpen: t, onClose: n }) {
|
|
|
1217
1234
|
] })
|
|
1218
1235
|
] });
|
|
1219
1236
|
}
|
|
1220
|
-
const Vn = "_sidebar_1tdxt_1", Jn = "_header_1tdxt_17", Zn = "_brand_1tdxt_29", eo = "_cloudIcon_1tdxt_35", to = "_title_1tdxt_44", no = "_languageSelect_1tdxt_55", oo = "_languageButton_1tdxt_61", ao = "_icon_1tdxt_99", so = "_chevron_1tdxt_104", co = "_languageDropdown_1tdxt_114", ro = "_languageOption_1tdxt_128", lo = "_selected_1tdxt_147", io = "_scrollArea_1tdxt_152", uo = "_navigation_1tdxt_158", ho = "_section_1tdxt_164", mo = "_sectionButton_1tdxt_170",
|
|
1237
|
+
const Vn = "_sidebar_1tdxt_1", Jn = "_header_1tdxt_17", Zn = "_brand_1tdxt_29", eo = "_cloudIcon_1tdxt_35", to = "_title_1tdxt_44", no = "_languageSelect_1tdxt_55", oo = "_languageButton_1tdxt_61", ao = "_icon_1tdxt_99", so = "_chevron_1tdxt_104", co = "_languageDropdown_1tdxt_114", ro = "_languageOption_1tdxt_128", lo = "_selected_1tdxt_147", io = "_scrollArea_1tdxt_152", uo = "_navigation_1tdxt_158", ho = "_section_1tdxt_164", mo = "_sectionButton_1tdxt_170", go = "_expanded_1tdxt_213", _o = "_sectionItems_1tdxt_217", po = "_navItem_1tdxt_225", fo = "_active_1tdxt_238", vo = "_navItemContent_1tdxt_243", q = {
|
|
1221
1238
|
sidebar: Vn,
|
|
1222
1239
|
header: Jn,
|
|
1223
1240
|
brand: Zn,
|
|
@@ -1234,21 +1251,21 @@ const Vn = "_sidebar_1tdxt_1", Jn = "_header_1tdxt_17", Zn = "_brand_1tdxt_29",
|
|
|
1234
1251
|
navigation: uo,
|
|
1235
1252
|
section: ho,
|
|
1236
1253
|
sectionButton: mo,
|
|
1237
|
-
expanded:
|
|
1238
|
-
sectionItems:
|
|
1254
|
+
expanded: go,
|
|
1255
|
+
sectionItems: _o,
|
|
1239
1256
|
navItem: po,
|
|
1240
1257
|
active: fo,
|
|
1241
1258
|
navItemContent: vo
|
|
1242
1259
|
};
|
|
1243
1260
|
function bo() {
|
|
1244
|
-
const { config: t } =
|
|
1261
|
+
const { config: t } = j(), n = t.logo, a = t.supportedLanguages.length > 1;
|
|
1245
1262
|
return /* @__PURE__ */ d("div", { className: q.sidebar, children: [
|
|
1246
1263
|
/* @__PURE__ */ d("div", { className: q.header, children: [
|
|
1247
1264
|
/* @__PURE__ */ d("div", { className: q.brand, children: [
|
|
1248
1265
|
n && /* @__PURE__ */ e(n, { className: q.cloudIcon }),
|
|
1249
1266
|
/* @__PURE__ */ e("div", { className: q.title, children: t.title })
|
|
1250
1267
|
] }),
|
|
1251
|
-
/* @__PURE__ */ e(ce, { styles: q })
|
|
1268
|
+
a && /* @__PURE__ */ e(ce, { styles: q })
|
|
1252
1269
|
] }),
|
|
1253
1270
|
/* @__PURE__ */ e("div", { className: q.scrollArea, children: /* @__PURE__ */ e(re, { styles: q }) })
|
|
1254
1271
|
] });
|
|
@@ -1260,20 +1277,23 @@ const wo = "_app_1v4z4_1", $o = "_layout_1v4z4_9", No = "_main_1v4z4_15", Io = "
|
|
|
1260
1277
|
contentWrapper: Io
|
|
1261
1278
|
};
|
|
1262
1279
|
function xo({ children: t }) {
|
|
1263
|
-
const { language: n } = ae(), { i18n:
|
|
1264
|
-
|
|
1265
|
-
n && s.supportedLanguages.includes(n) &&
|
|
1266
|
-
}, [n,
|
|
1267
|
-
const
|
|
1268
|
-
|
|
1269
|
-
},
|
|
1270
|
-
|
|
1280
|
+
const { language: n } = ae(), { i18n: a } = O(), { config: s } = j(), [c, o] = L(!1);
|
|
1281
|
+
P(() => {
|
|
1282
|
+
n && s.supportedLanguages.includes(n) && a.changeLanguage(n);
|
|
1283
|
+
}, [n, a, s.supportedLanguages]);
|
|
1284
|
+
const l = () => {
|
|
1285
|
+
o(!c);
|
|
1286
|
+
}, g = () => {
|
|
1287
|
+
o(!1);
|
|
1271
1288
|
};
|
|
1272
|
-
|
|
1273
|
-
/* @__PURE__ */ e(
|
|
1274
|
-
|
|
1289
|
+
if (!n || !s.supportedLanguages.includes(n))
|
|
1290
|
+
return /* @__PURE__ */ e(fe, { to: "/en/welcome", replace: !0 });
|
|
1291
|
+
const u = !!s.header, p = !!s.navigationData;
|
|
1292
|
+
return /* @__PURE__ */ d("div", { className: ee.app, children: [
|
|
1293
|
+
u && /* @__PURE__ */ e(Nn, { onMobileMenuToggle: l }),
|
|
1294
|
+
/* @__PURE__ */ e(Yn, { isOpen: c, onClose: g }),
|
|
1275
1295
|
/* @__PURE__ */ d("div", { className: ee.layout, children: [
|
|
1276
|
-
/* @__PURE__ */ e(bo, {}),
|
|
1296
|
+
p && /* @__PURE__ */ e(bo, {}),
|
|
1277
1297
|
/* @__PURE__ */ e("main", { className: ee.main, children: /* @__PURE__ */ e("div", { className: ee.contentWrapper, children: t }) })
|
|
1278
1298
|
] })
|
|
1279
1299
|
] });
|
|
@@ -1281,15 +1301,38 @@ function xo({ children: t }) {
|
|
|
1281
1301
|
function jo() {
|
|
1282
1302
|
const { language: t } = ae();
|
|
1283
1303
|
return /* @__PURE__ */ e(xo, { children: /* @__PURE__ */ d(ke, { children: [
|
|
1284
|
-
/* @__PURE__ */ e(ue, { path: "/:slug", element: /* @__PURE__ */ e(
|
|
1304
|
+
/* @__PURE__ */ e(ue, { path: "/:slug", element: /* @__PURE__ */ e(Ot, { language: t }) }),
|
|
1285
1305
|
/* @__PURE__ */ e(ue, { path: "/", element: /* @__PURE__ */ e(fe, { to: "welcome", replace: !0 }) })
|
|
1286
1306
|
] }) });
|
|
1287
1307
|
}
|
|
1308
|
+
function Ao() {
|
|
1309
|
+
return {
|
|
1310
|
+
openSearchModal: () => {
|
|
1311
|
+
window.dispatchEvent(new CustomEvent("blog:open-search"));
|
|
1312
|
+
},
|
|
1313
|
+
closeSearchModal: () => {
|
|
1314
|
+
window.dispatchEvent(new CustomEvent("blog:close-search"));
|
|
1315
|
+
}
|
|
1316
|
+
};
|
|
1317
|
+
}
|
|
1318
|
+
function Ho() {
|
|
1319
|
+
const { i18n: t } = O(), n = U(), a = G(), { config: s } = j();
|
|
1320
|
+
return (c) => {
|
|
1321
|
+
const o = s.basePath || "";
|
|
1322
|
+
let l = n.pathname;
|
|
1323
|
+
o && l.startsWith(o) && (l = l.slice(o.length));
|
|
1324
|
+
const g = l.split("/").filter(Boolean), u = g[0];
|
|
1325
|
+
let p = "";
|
|
1326
|
+
s.supportedLanguages.includes(u) ? (g[0] = c, p = `${o}/${g.join("/")}`) : p = `${o}/${c}${l}`;
|
|
1327
|
+
const w = p + n.search + n.hash;
|
|
1328
|
+
t.changeLanguage(c), a(w);
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1288
1331
|
export {
|
|
1289
1332
|
Ae as AdvancedModeToggle,
|
|
1290
|
-
|
|
1333
|
+
Oo as BlogProvider,
|
|
1291
1334
|
He as BlogRoot,
|
|
1292
|
-
|
|
1335
|
+
Ot as ContentPage,
|
|
1293
1336
|
xo as DocumentationLayout,
|
|
1294
1337
|
jo as DocumentationRoutes,
|
|
1295
1338
|
Nn as Header,
|
|
@@ -1300,12 +1343,14 @@ export {
|
|
|
1300
1343
|
tn as SearchBar,
|
|
1301
1344
|
bo as Sidebar,
|
|
1302
1345
|
nt as TableOfContents,
|
|
1303
|
-
|
|
1346
|
+
gt as TagResultsModal,
|
|
1304
1347
|
$t as Tags,
|
|
1305
|
-
|
|
1348
|
+
Eo as createBlogUtils,
|
|
1306
1349
|
be as createContentLoaders,
|
|
1307
|
-
|
|
1350
|
+
V as generateHeadingId,
|
|
1308
1351
|
te as getNavigationData,
|
|
1309
|
-
|
|
1352
|
+
j as useBlogConfig,
|
|
1353
|
+
Ho as useLanguageChange,
|
|
1354
|
+
Ao as useSearchModal,
|
|
1310
1355
|
Ne as useTheme
|
|
1311
1356
|
};
|