@clarify-labs/renderer 0.6.3 → 0.6.5

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.
Files changed (53) hide show
  1. package/output/{OpenApiOperation-mhoi-s4N.cjs → OpenApiOperation-CsDX1s-6.cjs} +875 -81
  2. package/output/OpenApiOperation-CsDX1s-6.cjs.map +1 -0
  3. package/output/{OpenApiOperation-DYXG-6Rw.js → OpenApiOperation-WntXLbai.js} +778 -74
  4. package/output/OpenApiOperation-WntXLbai.js.map +1 -0
  5. package/output/ThemeRoot-DXoVzHSZ.cjs +1800 -0
  6. package/output/ThemeRoot-DXoVzHSZ.cjs.map +1 -0
  7. package/output/ThemeRoot-Dr8JC8Yc.js +1757 -0
  8. package/output/ThemeRoot-Dr8JC8Yc.js.map +1 -0
  9. package/output/app/ErrorBoundary.d.ts +29 -0
  10. package/output/client.cjs +5 -1
  11. package/output/client.d.ts +2 -0
  12. package/output/client.js +3 -2
  13. package/output/core/i18n.d.ts +1 -1
  14. package/output/core/types.d.ts +30 -9
  15. package/output/index.cjs +41 -31
  16. package/output/index.cjs.map +1 -1
  17. package/output/index.d.ts +3 -1
  18. package/output/index.js +18 -11
  19. package/output/index.js.map +1 -1
  20. package/output/openapi/entry.d.ts +1 -0
  21. package/output/preview.cjs +4 -3
  22. package/output/preview.cjs.map +1 -1
  23. package/output/preview.js +4 -3
  24. package/output/preview.js.map +1 -1
  25. package/output/{render-CjZt3edL.cjs → render-BfNmzJeJ.cjs} +12 -8
  26. package/output/render-BfNmzJeJ.cjs.map +1 -0
  27. package/output/{render-BpavVnAe.js → render-DS2wcTZJ.js} +12 -8
  28. package/output/render-DS2wcTZJ.js.map +1 -0
  29. package/output/renderer.css +450 -565
  30. package/output/server.cjs +11 -7
  31. package/output/server.cjs.map +1 -1
  32. package/output/server.js +11 -7
  33. package/output/server.js.map +1 -1
  34. package/output/{shell-_MyLsMUI.cjs → shell-D4tS8Jts.cjs} +112 -1016
  35. package/output/shell-D4tS8Jts.cjs.map +1 -0
  36. package/output/{shell-BlMMdTpZ.js → shell-DvTfFx6M.js} +107 -933
  37. package/output/shell-DvTfFx6M.js.map +1 -0
  38. package/output/theme/ThemeEditor.d.ts +67 -0
  39. package/output/theme/ThemeProvider.d.ts +1 -1
  40. package/output/theme/ThemeRoot.d.ts +9 -0
  41. package/output/theme/randomTheme.d.ts +2 -0
  42. package/output/theme/variables.d.ts +62 -0
  43. package/package.json +1 -1
  44. package/output/AppShell-D3FsVHQK.js +0 -390
  45. package/output/AppShell-D3FsVHQK.js.map +0 -1
  46. package/output/AppShell-DeaJ-rgo.cjs +0 -409
  47. package/output/AppShell-DeaJ-rgo.cjs.map +0 -1
  48. package/output/OpenApiOperation-DYXG-6Rw.js.map +0 -1
  49. package/output/OpenApiOperation-mhoi-s4N.cjs.map +0 -1
  50. package/output/render-BpavVnAe.js.map +0 -1
  51. package/output/render-CjZt3edL.cjs.map +0 -1
  52. package/output/shell-BlMMdTpZ.js.map +0 -1
  53. package/output/shell-_MyLsMUI.cjs.map +0 -1
@@ -1,390 +0,0 @@
1
- import { C as normalizeRoutePath, D as ContentActions, I as useClarifyConfig, M as useBuiltInText, O as isExternalHref, P as ClarifyLocaleContext, S as isSameRoutePath, k as localizeHref, n as Navigation, r as safeDecodeURIComponent, t as Header, y as SectionProvider } from "./shell-BlMMdTpZ.js";
2
- import clsx from "clsx";
3
- import { Fragment, Suspense, lazy, useEffect, useMemo } from "react";
4
- import { Link, Route, Routes, useLocation } from "react-router-dom";
5
- import { ChevronLeft, ChevronRight } from "lucide-react";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
- //#region source/app/BuiltWithClarify.tsx
8
- function ClarifyMark(props) {
9
- return /* @__PURE__ */ jsxs("svg", {
10
- viewBox: "0 0 279 200",
11
- "aria-hidden": "true",
12
- ...props,
13
- children: [
14
- /* @__PURE__ */ jsx("path", {
15
- d: "M44.867217 0.00543761C130.715579 1.00591567 200 70.9091172 200 156.994562L199.986321 155.127494C199.384888 180.009127 179.026368 199.994562 154 199.994562H46C20.5949015 199.994562 0 179.399661 0 153.994562V45.9945624C0 21.0975659 19.7793434 0.820282524 44.4815926 0.0191499894Z",
16
- fill: "#00D492"
17
- }),
18
- /* @__PURE__ */ jsx("path", {
19
- d: "M123.867217 0.00543761C209.715579 1.00591567 279 70.9091172 279 156.994562L278.986321 155.127494C278.384888 180.009127 258.026368 199.994562 233 199.994562H125C99.5949015 199.994562 79 179.399661 79 153.994562V45.9945624C79 21.0975659 98.7793434 0.820282524 123.481593 0.0191499894Z",
20
- fill: "#00F6C9",
21
- fillOpacity: "0.6",
22
- transform: "rotate(-90 179 100)"
23
- }),
24
- /* @__PURE__ */ jsx("path", {
25
- d: "M199.979267 154.416906L199.984438 155.157125L199.962366 155.872459C198.977251 180.406837 178.776104 199.994562 154 199.994562L124.372438 199.994125L124.249053 199.994081C99.6939678 199.603921 79.8122712 179.973634 79.01915 155.518407L79.0054376 155.132783C79.5830823 105.566626 103.129768 61.5221348 139.498462 33.1463428C175.69419 61.3871018 199.186123 105.143863 199.979267 154.416906Z",
26
- fill: "#00F692"
27
- })
28
- ]
29
- });
30
- }
31
- function BuiltWithClarify() {
32
- const t = useBuiltInText();
33
- return /* @__PURE__ */ jsxs("a", {
34
- href: "https://clarify.pub",
35
- target: "_blank",
36
- rel: "noreferrer",
37
- "aria-label": t("builtWith.label"),
38
- className: "clarify-built-with inline-flex items-center gap-1.5 rounded-full px-2 py-1 font-medium no-underline transition",
39
- children: [
40
- /* @__PURE__ */ jsx("span", { children: t("builtWith.prefix") }),
41
- /* @__PURE__ */ jsx(ClarifyMark, { className: "clarify-built-with-logo h-3.5 w-5 flex-none" }),
42
- /* @__PURE__ */ jsx("span", {
43
- className: "clarify-built-with-brand font-semibold",
44
- children: "Clarify"
45
- })
46
- ]
47
- });
48
- }
49
- //#endregion
50
- //#region source/app/PageFooter.tsx
51
- function resolveLocalizedText(text, locale, fallbackLocale) {
52
- if (typeof text === "string") return text;
53
- return (locale ? text[locale] : void 0) ?? (fallbackLocale ? text[fallbackLocale] : void 0) ?? Object.values(text)[0] ?? "";
54
- }
55
- function localeForPath$1(config, pathname) {
56
- const i18n = config.i18n;
57
- if (!i18n) return void 0;
58
- const firstSegment = pathname.split("/").filter(Boolean)[0];
59
- return i18n.locales.find((locale) => locale.code === firstSegment)?.code ?? i18n.defaultLocale;
60
- }
61
- function FooterLink(arg0) {
62
- const { link, locale, config } = arg0;
63
- const external = link.external ?? isExternalHref(link.href);
64
- const href = external ? link.href : localizeHref(link.href, config, locale);
65
- const className = "clarify-footer-link no-underline transition";
66
- const label = resolveLocalizedText(link.label, locale, config.i18n?.defaultLocale);
67
- if (external) return /* @__PURE__ */ jsx("a", {
68
- href,
69
- target: "_blank",
70
- rel: "noreferrer",
71
- className,
72
- children: label
73
- });
74
- return /* @__PURE__ */ jsx(Link, {
75
- to: href,
76
- className,
77
- children: label
78
- });
79
- }
80
- function SocialLink(arg0) {
81
- const { name, href } = arg0;
82
- return /* @__PURE__ */ jsx("a", {
83
- href,
84
- target: "_blank",
85
- rel: "noreferrer",
86
- className: "clarify-footer-social capitalize no-underline transition",
87
- children: name
88
- });
89
- }
90
- function PageFooter() {
91
- const config = useClarifyConfig();
92
- const locale = localeForPath$1(config, useLocation().pathname);
93
- const footer = config.footer;
94
- const links = footer?.links ?? [];
95
- const socials = Object.entries(footer?.socials ?? {});
96
- const copyright = footer?.copyright ? resolveLocalizedText(footer.copyright, locale, config.i18n?.defaultLocale) : void 0;
97
- const hasCustomFooter = Boolean(copyright || links.length > 0 || socials.length > 0);
98
- return /* @__PURE__ */ jsxs("footer", {
99
- className: clsx("clarify-page-footer mx-auto mt-16 flex w-full max-w-(--clarify-theme-layout-max-width) flex-col items-end gap-4 border-t border-(--clarify-theme-tokens-colors-border) px-4 py-8 sm:px-6 lg:mt-24 lg:px-5 dark:border-white/10", hasCustomFooter && "sm:flex-row sm:items-center sm:justify-between"),
100
- children: [hasCustomFooter ? /* @__PURE__ */ jsxs("div", {
101
- className: "clarify-footer-content flex flex-col gap-3 text-right sm:text-left",
102
- children: [copyright ? /* @__PURE__ */ jsx("p", {
103
- className: "clarify-footer-copyright m-0",
104
- children: copyright
105
- }) : null, links.length > 0 || socials.length > 0 ? /* @__PURE__ */ jsxs("div", {
106
- className: "clarify-footer-links flex flex-wrap justify-end gap-x-4 gap-y-2 sm:justify-start",
107
- children: [links.map((link) => /* @__PURE__ */ jsx(FooterLink, {
108
- link,
109
- locale,
110
- config
111
- }, `${link.href}-${resolveLocalizedText(link.label, locale, config.i18n?.defaultLocale)}`)), socials.map(([name, href]) => /* @__PURE__ */ jsx(SocialLink, {
112
- name,
113
- href
114
- }, name))]
115
- }) : null]
116
- }) : null, /* @__PURE__ */ jsx("div", {
117
- className: "clarify-footer-brand flex justify-end",
118
- children: /* @__PURE__ */ jsx(BuiltWithClarify, {})
119
- })]
120
- });
121
- }
122
- //#endregion
123
- //#region source/app/PageNavigation.tsx
124
- function flattenNavigation(nodes) {
125
- return nodes.flatMap((node) => node.children?.length ? flattenNavigation(node.children) : [node]);
126
- }
127
- function PageNavigation(arg0) {
128
- const { navigation, currentRoute } = arg0;
129
- const t = useBuiltInText();
130
- if (!currentRoute) return null;
131
- const pageRoutes = flattenNavigation(navigation);
132
- const currentIndex = pageRoutes.findIndex((route) => isSameRoutePath(route.path, currentRoute.path));
133
- if (currentIndex === -1) return null;
134
- const previous = pageRoutes[currentIndex - 1];
135
- const next = pageRoutes[currentIndex + 1];
136
- if (!previous && !next) return null;
137
- return /* @__PURE__ */ jsxs("nav", {
138
- className: "clarify-page-navigation mt-6 grid gap-3 @3xl:grid-cols-2",
139
- "aria-label": t("navigation.previousNext"),
140
- children: [/* @__PURE__ */ jsx(PageNavigationLink, {
141
- direction: "previous",
142
- route: previous
143
- }), /* @__PURE__ */ jsx(PageNavigationLink, {
144
- direction: "next",
145
- route: next
146
- })]
147
- });
148
- }
149
- function PageNavigationLink(arg0) {
150
- const { direction, route } = arg0;
151
- const t = useBuiltInText();
152
- if (!route) return /* @__PURE__ */ jsx("div", { className: "hidden @3xl:block" });
153
- const isNext = direction === "next";
154
- return /* @__PURE__ */ jsxs(Link, {
155
- to: normalizeRoutePath(route.path),
156
- className: clsx("group flex min-w-0 items-center gap-3 rounded-lg border border-(--clarify-theme-tokens-colors-border) px-4 py-3 no-underline transition hover:border-(--clarify-theme-tokens-colors-primary) hover:bg-(--clarify-theme-tokens-colors-surface) dark:border-white/10 dark:hover:border-(--clarify-theme-tokens-colors-primary) dark:hover:bg-white/2.5", isNext && "@3xl:justify-end @3xl:text-right"),
157
- children: [
158
- !isNext ? /* @__PURE__ */ jsx(ChevronLeft, { className: "h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-muted) transition group-hover:text-(--clarify-theme-tokens-colors-primary)" }) : null,
159
- /* @__PURE__ */ jsxs("span", {
160
- className: "min-w-0 flex-1",
161
- children: [/* @__PURE__ */ jsx("span", {
162
- className: "clarify-page-navigation-label block font-medium uppercase tracking-wide text-(--clarify-theme-tokens-colors-muted)",
163
- children: isNext ? t("navigation.next") : t("navigation.previous")
164
- }), /* @__PURE__ */ jsx("span", {
165
- className: "clarify-page-navigation-title mt-0.5 block truncate font-semibold text-(--clarify-theme-tokens-colors-foreground) dark:text-white",
166
- children: route.title
167
- })]
168
- }),
169
- isNext ? /* @__PURE__ */ jsx(ChevronRight, { className: "h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-muted) transition group-hover:text-(--clarify-theme-tokens-colors-primary)" }) : null
170
- ]
171
- });
172
- }
173
- //#endregion
174
- //#region source/app/PageSkeleton.tsx
175
- function PageSkeleton() {
176
- return /* @__PURE__ */ jsxs("div", {
177
- className: "clarify-page-skeleton animate-pulse space-y-8 py-8",
178
- children: [
179
- /* @__PURE__ */ jsx("div", { className: "h-11 w-full max-w-[24rem] rounded-3xl bg-zinc-200 dark:bg-zinc-800" }),
180
- /* @__PURE__ */ jsxs("div", {
181
- className: "space-y-6",
182
- children: [/* @__PURE__ */ jsx("div", { className: "h-7 w-full max-w-[28rem] rounded-2xl bg-zinc-200 dark:bg-zinc-800" }), /* @__PURE__ */ jsx("div", { className: "h-7 w-full max-w-[22rem] rounded-2xl bg-zinc-200 dark:bg-zinc-800" })]
183
- }),
184
- /* @__PURE__ */ jsxs("div", {
185
- className: "grid gap-6 xl:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]",
186
- children: [/* @__PURE__ */ jsx("div", { className: "h-52 rounded-[1.75rem] bg-zinc-200 dark:bg-zinc-800" }), /* @__PURE__ */ jsx("div", { className: "h-52 rounded-[1.75rem] bg-zinc-200 dark:bg-zinc-800" })]
187
- }),
188
- /* @__PURE__ */ jsx("div", {
189
- className: "space-y-5",
190
- children: Array.from({ length: 3 }).map((_, index) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", { className: "h-5 w-full max-w-[18rem] rounded-full bg-zinc-200 dark:bg-zinc-800" }), /* @__PURE__ */ jsx("div", { className: "h-32 rounded-[1.5rem] bg-zinc-200 dark:bg-zinc-800" })] }, index))
191
- })
192
- ]
193
- });
194
- }
195
- //#endregion
196
- //#region source/app/AppShell.tsx
197
- function routeForPath(routes, pathname) {
198
- return routes.find((route) => isSameRoutePath(route.path, pathname));
199
- }
200
- function sectionsForRoute(route) {
201
- return route?.sections?.map((section) => ({
202
- id: section.id,
203
- title: section.title,
204
- badge: section.badge,
205
- tags: section.tags
206
- })) ?? [];
207
- }
208
- function resolveRouteComponent(route) {
209
- if (route.lazy) return lazy(route.component);
210
- return route.component;
211
- }
212
- function scrollToHash(hash) {
213
- if (!hash) return;
214
- const targetId = safeDecodeURIComponent(hash.slice(1));
215
- window.requestAnimationFrame(() => {
216
- document.getElementById(targetId)?.scrollIntoView();
217
- window.requestAnimationFrame(() => {
218
- window.dispatchEvent(new Event("scroll"));
219
- });
220
- });
221
- }
222
- function localeForPath(config, pathname, route) {
223
- if (route?.locale) return route.locale;
224
- const i18n = config.i18n;
225
- if (!i18n) return void 0;
226
- const firstSegment = pathname.split("/").filter(Boolean)[0];
227
- return i18n.locales.find((locale) => locale.code === firstSegment)?.code ?? i18n.defaultLocale;
228
- }
229
- function isTabbedNavigation(navigation) {
230
- return !Array.isArray(navigation) && "tabs" in navigation;
231
- }
232
- function hasPath(nodes, pathname) {
233
- return nodes.some((node) => isSameRoutePath(node.path, pathname) || hasPath(node.children ?? [], pathname));
234
- }
235
- function navigationFromTabs(navigation, pathname) {
236
- return {
237
- items: navigation.tabs.find((tab) => isSameRoutePath(tab.path, pathname) || hasPath(tab.children, pathname))?.children ?? navigation.tabs[0]?.children ?? [],
238
- tabs: navigation.tabs
239
- };
240
- }
241
- function navigationForLocale(navigation, locale, pathname) {
242
- if (Array.isArray(navigation)) return { items: navigation };
243
- if (isTabbedNavigation(navigation)) return navigationFromTabs(navigation, pathname);
244
- if (!locale) return { items: [] };
245
- const localizedNavigation = navigation[locale];
246
- if (!localizedNavigation) return { items: [] };
247
- return Array.isArray(localizedNavigation) ? { items: localizedNavigation } : navigationFromTabs(localizedNavigation, pathname);
248
- }
249
- function themeStyle(config) {
250
- const { colors, radius } = config.theme.tokens;
251
- const { layout } = config.theme;
252
- return {
253
- "--clarify-theme-tokens-colors-primary": colors.primary,
254
- "--clarify-theme-tokens-colors-accent": colors.accent,
255
- "--clarify-theme-tokens-colors-background": colors.background,
256
- "--clarify-theme-tokens-colors-foreground": colors.foreground,
257
- "--clarify-theme-tokens-colors-surface": colors.surface,
258
- "--clarify-theme-tokens-colors-muted": colors.muted,
259
- "--clarify-theme-tokens-colors-border": colors.border,
260
- "--clarify-theme-tokens-colors-code-background": colors.codeBackground,
261
- "--clarify-theme-tokens-radius-sm": radius.sm,
262
- "--clarify-theme-tokens-radius-md": radius.md,
263
- "--clarify-theme-tokens-radius-lg": radius.lg,
264
- "--clarify-theme-tokens-radius-xl": radius.xl,
265
- "--clarify-theme-layout-max-width": layout.maxWidth
266
- };
267
- }
268
- function pageTitle(config, route) {
269
- const routeTitle = route?.title?.trim();
270
- if (!routeTitle || routeTitle === config.title) return config.title;
271
- return `${routeTitle} - ${config.title}`;
272
- }
273
- function setNamedMeta(name, content) {
274
- const existing = document.head.querySelector(`meta[name="${name}"]`);
275
- if (!content) {
276
- existing?.remove();
277
- return;
278
- }
279
- const meta = existing ?? document.createElement("meta");
280
- meta.name = name;
281
- meta.content = content;
282
- if (!existing) document.head.appendChild(meta);
283
- }
284
- function applyDocumentMetadata(config, route) {
285
- document.title = pageTitle(config, route);
286
- setNamedMeta("description", route?.description ?? config.description);
287
- setNamedMeta("keywords", route?.keywords?.join(", "));
288
- }
289
- function applyRootThemeVariables(themeVariables) {
290
- const rootStyle = document.documentElement.style;
291
- for (const [property, value] of Object.entries(themeVariables)) rootStyle.setProperty(property, value);
292
- return () => {
293
- for (const property of Object.keys(themeVariables)) rootStyle.removeProperty(property);
294
- };
295
- }
296
- function AppShell(arg0) {
297
- const { config, routes, navigation } = arg0;
298
- const location = useLocation();
299
- const pathname = normalizeRoutePath(location.pathname);
300
- const currentRoute = routeForPath(routes, pathname);
301
- const currentLocale = localeForPath(config, pathname, currentRoute);
302
- const currentLocaleConfig = config.i18n?.locales.find((locale) => locale.code === currentLocale);
303
- const currentNavigation = navigationForLocale(navigation, currentLocale, pathname);
304
- const sections = useMemo(() => sectionsForRoute(currentRoute), [currentRoute]);
305
- const hasTabs = Boolean(currentNavigation.tabs?.length);
306
- const themeVariables = useMemo(() => themeStyle(config), [config]);
307
- const renderRoutes = useMemo(() => routes.map((route) => ({
308
- ...route,
309
- component: resolveRouteComponent(route)
310
- })), [routes]);
311
- useEffect(() => applyRootThemeVariables(themeVariables), [themeVariables]);
312
- useEffect(() => {
313
- if (location.hash) {
314
- scrollToHash(location.hash);
315
- return;
316
- }
317
- window.scrollTo({
318
- top: 0,
319
- left: 0
320
- });
321
- window.requestAnimationFrame(() => {
322
- window.dispatchEvent(new Event("scroll"));
323
- });
324
- }, [location.hash, location.pathname]);
325
- useEffect(() => {
326
- if (!currentLocale) return;
327
- document.documentElement.lang = currentLocale;
328
- if (currentLocaleConfig?.dir) document.documentElement.dir = currentLocaleConfig.dir;
329
- else document.documentElement.removeAttribute("dir");
330
- }, [currentLocale, currentLocaleConfig?.dir]);
331
- useEffect(() => {
332
- applyDocumentMetadata(config, currentRoute);
333
- }, [config, currentRoute]);
334
- return /* @__PURE__ */ jsx(ClarifyLocaleContext.Provider, {
335
- value: currentLocale,
336
- children: /* @__PURE__ */ jsx(SectionProvider, {
337
- sections,
338
- children: /* @__PURE__ */ jsxs("div", {
339
- className: "clarify-app h-full min-h-screen bg-(--clarify-theme-tokens-colors-background) text-(--clarify-theme-tokens-colors-foreground) dark:bg-zinc-950 dark:text-white",
340
- "data-theme-preset": config.theme.preset,
341
- style: themeVariables,
342
- children: [
343
- /* @__PURE__ */ jsx(Header, {
344
- config,
345
- navigation: currentNavigation.items,
346
- tabs: currentNavigation.tabs,
347
- routes,
348
- currentLocale,
349
- currentRoute
350
- }),
351
- /* @__PURE__ */ jsxs("div", {
352
- className: "clarify-layout mx-auto grid w-full max-w-(--clarify-theme-layout-max-width) grid-cols-1 lg:grid-cols-[18rem_minmax(0,1fr)] xl:grid-cols-[20rem_minmax(0,1fr)]",
353
- children: [/* @__PURE__ */ jsx("aside", {
354
- className: clsx("clarify-sidebar hidden lg:sticky lg:z-30 lg:block lg:h-[calc(100vh-3.5rem)] lg:self-start lg:overflow-y-auto lg:bg-(--clarify-theme-tokens-colors-background) lg:px-5 lg:pb-8 xl:px-6 lg:dark:bg-zinc-950", hasTabs ? "lg:top-28 lg:h-[calc(100vh-7rem)] lg:pt-6" : "lg:top-14 lg:pt-6"),
355
- children: /* @__PURE__ */ jsx(Navigation, { navigation: currentNavigation.items })
356
- }), /* @__PURE__ */ jsxs("div", {
357
- className: clsx("clarify-content @container relative flex min-h-screen min-w-0 flex-col px-4 sm:px-6 lg:px-8 xl:px-10", hasTabs ? "pt-14 lg:pt-28" : "pt-14"),
358
- children: [
359
- /* @__PURE__ */ jsx(ContentActions, {
360
- hasTabs,
361
- route: currentRoute,
362
- routePrefix: config.routePrefix
363
- }),
364
- /* @__PURE__ */ jsx("main", {
365
- className: "clarify-main min-w-0 flex-auto",
366
- children: /* @__PURE__ */ jsx(Suspense, {
367
- fallback: /* @__PURE__ */ jsx(PageSkeleton, {}),
368
- children: /* @__PURE__ */ jsx(Routes, { children: renderRoutes.map((route) => /* @__PURE__ */ jsx(Route, {
369
- path: route.path,
370
- element: /* @__PURE__ */ jsx(route.component, {})
371
- }, route.path)) })
372
- })
373
- }),
374
- /* @__PURE__ */ jsx(PageNavigation, {
375
- navigation: currentNavigation.items,
376
- currentRoute
377
- })
378
- ]
379
- })]
380
- }),
381
- /* @__PURE__ */ jsx(PageFooter, {})
382
- ]
383
- })
384
- })
385
- });
386
- }
387
- //#endregion
388
- export { PageFooter as n, BuiltWithClarify as r, AppShell as t };
389
-
390
- //# sourceMappingURL=AppShell-D3FsVHQK.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AppShell-D3FsVHQK.js","names":[],"sources":["../source/app/BuiltWithClarify.tsx","../source/app/PageFooter.tsx","../source/app/PageNavigation.tsx","../source/app/PageSkeleton.tsx","../source/app/AppShell.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react'\n\nimport { useBuiltInText } from '../core/i18n'\n\nfunction ClarifyMark(props: ComponentPropsWithoutRef<'svg'>) {\n return (\n <svg viewBox=\"0 0 279 200\" aria-hidden=\"true\" {...props}>\n <path d=\"M44.867217 0.00543761C130.715579 1.00591567 200 70.9091172 200 156.994562L199.986321 155.127494C199.384888 180.009127 179.026368 199.994562 154 199.994562H46C20.5949015 199.994562 0 179.399661 0 153.994562V45.9945624C0 21.0975659 19.7793434 0.820282524 44.4815926 0.0191499894Z\" fill=\"#00D492\" />\n <path d=\"M123.867217 0.00543761C209.715579 1.00591567 279 70.9091172 279 156.994562L278.986321 155.127494C278.384888 180.009127 258.026368 199.994562 233 199.994562H125C99.5949015 199.994562 79 179.399661 79 153.994562V45.9945624C79 21.0975659 98.7793434 0.820282524 123.481593 0.0191499894Z\" fill=\"#00F6C9\" fillOpacity=\"0.6\" transform=\"rotate(-90 179 100)\" />\n <path d=\"M199.979267 154.416906L199.984438 155.157125L199.962366 155.872459C198.977251 180.406837 178.776104 199.994562 154 199.994562L124.372438 199.994125L124.249053 199.994081C99.6939678 199.603921 79.8122712 179.973634 79.01915 155.518407L79.0054376 155.132783C79.5830823 105.566626 103.129768 61.5221348 139.498462 33.1463428C175.69419 61.3871018 199.186123 105.143863 199.979267 154.416906Z\" fill=\"#00F692\" />\n </svg>\n )\n}\n\nexport function BuiltWithClarify() {\n const t = useBuiltInText()\n\n return (\n <a\n href=\"https://clarify.pub\"\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label={t('builtWith.label')}\n className=\"clarify-built-with inline-flex items-center gap-1.5 rounded-full px-2 py-1 font-medium no-underline transition\"\n >\n <span>{t('builtWith.prefix')}</span>\n <ClarifyMark className=\"clarify-built-with-logo h-3.5 w-5 flex-none\" />\n <span className=\"clarify-built-with-brand font-semibold\">Clarify</span>\n </a>\n )\n}\n","import clsx from 'clsx'\nimport { Link, useLocation } from 'react-router-dom'\n\nimport { useClarifyConfig } from '../core/context'\nimport type { ClarifyConfig, ClarifyLocalizedText, ClarifyNavbarLink } from '../core/types'\nimport { isExternalHref, localizeHref } from '../utils/href'\n\nimport { BuiltWithClarify } from './BuiltWithClarify'\n\nfunction resolveLocalizedText(text: ClarifyLocalizedText, locale?: string, fallbackLocale?: string): string {\n if (typeof text === 'string') return text\n return (locale ? text[locale] : undefined) ?? (fallbackLocale ? text[fallbackLocale] : undefined) ?? Object.values(text)[0] ?? ''\n}\n\nfunction localeForPath(config: ClarifyConfig, pathname: string): string | undefined {\n const i18n = config.i18n\n if (!i18n) return undefined\n const firstSegment = pathname.split('/').filter(Boolean)[0]\n return i18n.locales.find((locale) => locale.code === firstSegment)?.code ?? i18n.defaultLocale\n}\n\ntype FooterLinkProps = { link: ClarifyNavbarLink; locale?: string; config: ClarifyConfig }\n\nfunction FooterLink(arg0: FooterLinkProps) {\n const { link, locale, config } = arg0\n const external = link.external ?? isExternalHref(link.href)\n const href = external ? link.href : localizeHref(link.href, config, locale)\n const className = \"clarify-footer-link no-underline transition\"\n const label = resolveLocalizedText(link.label, locale, config.i18n?.defaultLocale)\n\n if (external) {\n return (\n <a href={href} target=\"_blank\" rel=\"noreferrer\" className={className}>\n {label}\n </a>\n )\n }\n\n return (\n <Link to={href} className={className}>\n {label}\n </Link>\n )\n}\n\ntype SocialLinkProps = { name: string; href: string }\n\nfunction SocialLink(arg0: SocialLinkProps) {\n const { name, href } = arg0\n\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"clarify-footer-social capitalize no-underline transition\"\n >\n {name}\n </a>\n )\n}\n\nexport function PageFooter() {\n const config = useClarifyConfig()\n const location = useLocation()\n const locale = localeForPath(config, location.pathname)\n const footer = config.footer\n const links = footer?.links ?? []\n const socials = Object.entries(footer?.socials ?? {})\n const copyright = footer?.copyright\n ? resolveLocalizedText(footer.copyright, locale, config.i18n?.defaultLocale)\n : undefined\n const hasCustomFooter = Boolean(copyright || links.length > 0 || socials.length > 0)\n\n return (\n <footer\n className={clsx(\n 'clarify-page-footer mx-auto mt-16 flex w-full max-w-(--clarify-theme-layout-max-width) flex-col items-end gap-4 border-t border-(--clarify-theme-tokens-colors-border) px-4 py-8 sm:px-6 lg:mt-24 lg:px-5 dark:border-white/10',\n hasCustomFooter && 'sm:flex-row sm:items-center sm:justify-between',\n )}\n >\n {hasCustomFooter ? (\n <div className=\"clarify-footer-content flex flex-col gap-3 text-right sm:text-left\">\n {copyright ? (\n <p className=\"clarify-footer-copyright m-0\">{copyright}</p>\n ) : null}\n {links.length > 0 || socials.length > 0 ? (\n <div className=\"clarify-footer-links flex flex-wrap justify-end gap-x-4 gap-y-2 sm:justify-start\">\n {links.map((link) => (\n <FooterLink key={`${link.href}-${resolveLocalizedText(link.label, locale, config.i18n?.defaultLocale)}`} link={link} locale={locale} config={config} />\n ))}\n {socials.map(([name, href]) => (\n <SocialLink key={name} name={name} href={href} />\n ))}\n </div>\n ) : null}\n </div>\n ) : null}\n <div className=\"clarify-footer-brand flex justify-end\">\n <BuiltWithClarify />\n </div>\n </footer>\n )\n}\n","import clsx from 'clsx'\nimport { ChevronLeft, ChevronRight } from 'lucide-react'\nimport { Link } from 'react-router-dom'\n\nimport { useBuiltInText } from '../core/i18n'\nimport type { NavigationNode, RouteItem } from '../core/types'\nimport { isSameRoutePath, normalizeRoutePath } from '../utils/path'\n\nfunction flattenNavigation(nodes: NavigationNode[]): NavigationNode[] {\n return nodes.flatMap((node) => node.children?.length ? flattenNavigation(node.children) : [node])\n}\n\ntype PageNavigationProps = { navigation: NavigationNode[]; currentRoute?: RouteItem }\n\nexport function PageNavigation(arg0: PageNavigationProps) {\n const { navigation, currentRoute } = arg0\n const t = useBuiltInText()\n if (!currentRoute) return null\n\n const pageRoutes = flattenNavigation(navigation)\n const currentIndex = pageRoutes.findIndex((route) => isSameRoutePath(route.path, currentRoute.path))\n if (currentIndex === -1) return null\n\n const previous = pageRoutes[currentIndex - 1]\n const next = pageRoutes[currentIndex + 1]\n if (!previous && !next) return null\n\n return (\n <nav className=\"clarify-page-navigation mt-6 grid gap-3 @3xl:grid-cols-2\" aria-label={t('navigation.previousNext')}>\n <PageNavigationLink direction=\"previous\" route={previous} />\n <PageNavigationLink direction=\"next\" route={next} />\n </nav>\n )\n}\n\ntype PageNavigationLinkProps = { direction: 'previous' | 'next'; route?: NavigationNode }\n\nfunction PageNavigationLink(arg0: PageNavigationLinkProps) {\n const { direction, route } = arg0\n const t = useBuiltInText()\n if (!route) return <div className=\"hidden @3xl:block\" />\n\n const isNext = direction === 'next'\n\n return (\n <Link\n to={normalizeRoutePath(route.path)}\n className={clsx(\n 'group flex min-w-0 items-center gap-3 rounded-lg border border-(--clarify-theme-tokens-colors-border) px-4 py-3 no-underline transition hover:border-(--clarify-theme-tokens-colors-primary) hover:bg-(--clarify-theme-tokens-colors-surface) dark:border-white/10 dark:hover:border-(--clarify-theme-tokens-colors-primary) dark:hover:bg-white/2.5',\n isNext && '@3xl:justify-end @3xl:text-right',\n )}\n >\n {!isNext ? <ChevronLeft className=\"h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-muted) transition group-hover:text-(--clarify-theme-tokens-colors-primary)\" /> : null}\n <span className=\"min-w-0 flex-1\">\n <span className=\"clarify-page-navigation-label block font-medium uppercase tracking-wide text-(--clarify-theme-tokens-colors-muted)\">{isNext ? t('navigation.next') : t('navigation.previous')}</span>\n <span className=\"clarify-page-navigation-title mt-0.5 block truncate font-semibold text-(--clarify-theme-tokens-colors-foreground) dark:text-white\">{route.title}</span>\n </span>\n {isNext ? <ChevronRight className=\"h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-muted) transition group-hover:text-(--clarify-theme-tokens-colors-primary)\" /> : null}\n </Link>\n )\n}\n","import { Fragment } from 'react'\n\nexport function PageSkeleton() {\n return (\n <div className=\"clarify-page-skeleton animate-pulse space-y-8 py-8\">\n <div className=\"h-11 w-full max-w-[24rem] rounded-3xl bg-zinc-200 dark:bg-zinc-800\" />\n <div className=\"space-y-6\">\n <div className=\"h-7 w-full max-w-[28rem] rounded-2xl bg-zinc-200 dark:bg-zinc-800\" />\n <div className=\"h-7 w-full max-w-[22rem] rounded-2xl bg-zinc-200 dark:bg-zinc-800\" />\n </div>\n <div className=\"grid gap-6 xl:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]\">\n <div className=\"h-52 rounded-[1.75rem] bg-zinc-200 dark:bg-zinc-800\" />\n <div className=\"h-52 rounded-[1.75rem] bg-zinc-200 dark:bg-zinc-800\" />\n </div>\n <div className=\"space-y-5\">\n {Array.from({ length: 3 }).map((_, index) => (\n <Fragment key={index}>\n <div className=\"h-5 w-full max-w-[18rem] rounded-full bg-zinc-200 dark:bg-zinc-800\" />\n <div className=\"h-32 rounded-[1.5rem] bg-zinc-200 dark:bg-zinc-800\" />\n </Fragment>\n ))}\n </div>\n </div>\n )\n}\n","import clsx from 'clsx'\nimport { Suspense, lazy, useEffect, useMemo } from 'react'\nimport type { CSSProperties, ComponentType } from 'react'\nimport { Routes, Route, useLocation } from 'react-router-dom'\n\nimport { ClarifyLocaleContext } from '../context'\nimport { ContentActions, Header, Navigation } from '../shell'\nimport type { RouteItem, ClarifyConfig, NavigationNode, NavigationTab, NavigationTree, TabbedNavigation } from '../types'\nimport { safeDecodeURIComponent } from '../utils/hash'\nimport { isSameRoutePath, normalizeRoutePath } from '../utils/path'\n\nimport { PageFooter } from './PageFooter'\nimport { PageNavigation } from './PageNavigation'\nimport { PageSkeleton } from './PageSkeleton'\nimport { SectionProvider, type Section } from './SectionProvider'\n\nexport type AppShellProps = {\n config: ClarifyConfig\n routes: RouteItem[]\n navigation: NavigationTree\n}\n\ntype ThemeCssVariables = CSSProperties & Record<`--clarify-theme-${string}`, string>\n\nfunction routeForPath(routes: RouteItem[], pathname: string): RouteItem | undefined {\n return routes.find((route) => isSameRoutePath(route.path, pathname))\n}\n\nfunction sectionsForRoute(route?: RouteItem): Section[] {\n return (\n route?.sections?.map((section) => ({\n id: section.id,\n title: section.title,\n badge: section.badge,\n tags: section.tags,\n })) ?? []\n )\n}\n\nfunction resolveRouteComponent(route: RouteItem): ComponentType {\n if (route.lazy) return lazy(route.component as () => Promise<{ default: ComponentType }>)\n return route.component as ComponentType\n}\n\nfunction scrollToHash(hash: string) {\n if (!hash) return\n\n const targetId = safeDecodeURIComponent(hash.slice(1))\n window.requestAnimationFrame(() => {\n document.getElementById(targetId)?.scrollIntoView()\n window.requestAnimationFrame(() => {\n window.dispatchEvent(new Event('scroll'))\n })\n })\n}\n\nfunction localeForPath(config: ClarifyConfig, pathname: string, route?: RouteItem): string | undefined {\n if (route?.locale) return route.locale\n const i18n = config.i18n\n if (!i18n) return undefined\n const firstSegment = pathname.split('/').filter(Boolean)[0]\n return i18n.locales.find((locale) => locale.code === firstSegment)?.code ?? i18n.defaultLocale\n}\n\nfunction isTabbedNavigation(navigation: NavigationTree): navigation is TabbedNavigation {\n return !Array.isArray(navigation) && 'tabs' in navigation\n}\n\nfunction hasPath(nodes: NavigationNode[], pathname: string): boolean {\n return nodes.some((node) => isSameRoutePath(node.path, pathname) || hasPath(node.children ?? [], pathname))\n}\n\ntype NavigationState = {\n items: NavigationNode[]\n tabs?: NavigationTab[]\n}\n\nfunction navigationFromTabs(navigation: TabbedNavigation, pathname: string): NavigationState {\n const currentTab = navigation.tabs.find((tab) => isSameRoutePath(tab.path, pathname) || hasPath(tab.children, pathname))\n return {\n items: currentTab?.children ?? navigation.tabs[0]?.children ?? [],\n tabs: navigation.tabs,\n }\n}\n\nfunction navigationForLocale(navigation: NavigationTree, locale: string | undefined, pathname: string): NavigationState {\n if (Array.isArray(navigation)) return { items: navigation }\n if (isTabbedNavigation(navigation)) return navigationFromTabs(navigation, pathname)\n if (!locale) return { items: [] }\n\n const localizedNavigation = navigation[locale]\n if (!localizedNavigation) return { items: [] }\n return Array.isArray(localizedNavigation) ? { items: localizedNavigation } : navigationFromTabs(localizedNavigation, pathname)\n}\n\nfunction themeStyle(config: ClarifyConfig): ThemeCssVariables {\n const { colors, radius } = config.theme.tokens\n const { layout } = config.theme\n\n return {\n '--clarify-theme-tokens-colors-primary': colors.primary,\n '--clarify-theme-tokens-colors-accent': colors.accent,\n '--clarify-theme-tokens-colors-background': colors.background,\n '--clarify-theme-tokens-colors-foreground': colors.foreground,\n '--clarify-theme-tokens-colors-surface': colors.surface,\n '--clarify-theme-tokens-colors-muted': colors.muted,\n '--clarify-theme-tokens-colors-border': colors.border,\n '--clarify-theme-tokens-colors-code-background': colors.codeBackground,\n '--clarify-theme-tokens-radius-sm': radius.sm,\n '--clarify-theme-tokens-radius-md': radius.md,\n '--clarify-theme-tokens-radius-lg': radius.lg,\n '--clarify-theme-tokens-radius-xl': radius.xl,\n '--clarify-theme-layout-max-width': layout.maxWidth,\n }\n}\n\nfunction pageTitle(config: ClarifyConfig, route?: RouteItem): string {\n const routeTitle = route?.title?.trim()\n if (!routeTitle || routeTitle === config.title) return config.title\n return `${routeTitle} - ${config.title}`\n}\n\nfunction setNamedMeta(name: string, content: string | undefined) {\n const existing = document.head.querySelector<HTMLMetaElement>(`meta[name=\"${name}\"]`)\n if (!content) {\n existing?.remove()\n return\n }\n\n const meta = existing ?? document.createElement('meta')\n meta.name = name\n meta.content = content\n if (!existing) document.head.appendChild(meta)\n}\n\nfunction applyDocumentMetadata(config: ClarifyConfig, route?: RouteItem) {\n document.title = pageTitle(config, route)\n setNamedMeta('description', route?.description ?? config.description)\n setNamedMeta('keywords', route?.keywords?.join(', '))\n}\n\nfunction applyRootThemeVariables(themeVariables: ThemeCssVariables): () => void {\n const rootStyle = document.documentElement.style\n\n for (const [property, value] of Object.entries(themeVariables)) {\n rootStyle.setProperty(property, value)\n }\n\n return () => {\n for (const property of Object.keys(themeVariables)) {\n rootStyle.removeProperty(property)\n }\n }\n}\n\nexport function AppShell(arg0: AppShellProps) {\n const { config, routes, navigation } = arg0\n const location = useLocation()\n const pathname = normalizeRoutePath(location.pathname)\n const currentRoute = routeForPath(routes, pathname)\n const currentLocale = localeForPath(config, pathname, currentRoute)\n const currentLocaleConfig = config.i18n?.locales.find((locale) => locale.code === currentLocale)\n const currentNavigation = navigationForLocale(navigation, currentLocale, pathname)\n const sections = useMemo(() => sectionsForRoute(currentRoute), [currentRoute])\n const hasTabs = Boolean(currentNavigation.tabs?.length)\n const themeVariables = useMemo(() => themeStyle(config), [config])\n const renderRoutes = useMemo(\n () => routes.map(route => ({ ...route, component: resolveRouteComponent(route) })),\n [routes],\n )\n\n useEffect(() => applyRootThemeVariables(themeVariables), [themeVariables])\n\n useEffect(() => {\n if (location.hash) {\n scrollToHash(location.hash)\n return\n }\n\n window.scrollTo({ top: 0, left: 0 })\n window.requestAnimationFrame(() => {\n window.dispatchEvent(new Event('scroll'))\n })\n }, [location.hash, location.pathname])\n\n useEffect(() => {\n if (!currentLocale) return\n document.documentElement.lang = currentLocale\n if (currentLocaleConfig?.dir) {\n document.documentElement.dir = currentLocaleConfig.dir\n } else {\n document.documentElement.removeAttribute('dir')\n }\n }, [currentLocale, currentLocaleConfig?.dir])\n\n useEffect(() => {\n applyDocumentMetadata(config, currentRoute)\n }, [config, currentRoute])\n\n return (\n <ClarifyLocaleContext.Provider value={currentLocale}>\n <SectionProvider sections={sections}>\n <div\n className=\"clarify-app h-full min-h-screen bg-(--clarify-theme-tokens-colors-background) text-(--clarify-theme-tokens-colors-foreground) dark:bg-zinc-950 dark:text-white\"\n data-theme-preset={config.theme.preset}\n style={themeVariables}\n >\n <Header\n config={config}\n navigation={currentNavigation.items}\n tabs={currentNavigation.tabs}\n routes={routes}\n currentLocale={currentLocale}\n currentRoute={currentRoute}\n />\n <div className=\"clarify-layout mx-auto grid w-full max-w-(--clarify-theme-layout-max-width) grid-cols-1 lg:grid-cols-[18rem_minmax(0,1fr)] xl:grid-cols-[20rem_minmax(0,1fr)]\">\n <aside\n className={clsx(\n 'clarify-sidebar hidden lg:sticky lg:z-30 lg:block lg:h-[calc(100vh-3.5rem)] lg:self-start lg:overflow-y-auto lg:bg-(--clarify-theme-tokens-colors-background) lg:px-5 lg:pb-8 xl:px-6 lg:dark:bg-zinc-950',\n hasTabs ? 'lg:top-28 lg:h-[calc(100vh-7rem)] lg:pt-6' : 'lg:top-14 lg:pt-6',\n )}\n >\n <Navigation navigation={currentNavigation.items} />\n </aside>\n <div className={clsx('clarify-content @container relative flex min-h-screen min-w-0 flex-col px-4 sm:px-6 lg:px-8 xl:px-10', hasTabs ? 'pt-14 lg:pt-28' : 'pt-14')}>\n <ContentActions hasTabs={hasTabs} route={currentRoute} routePrefix={config.routePrefix} />\n <main className=\"clarify-main min-w-0 flex-auto\">\n <Suspense fallback={<PageSkeleton />}>\n <Routes>\n {renderRoutes.map((route) => (\n <Route key={route.path} path={route.path} element={<route.component />} />\n ))}\n </Routes>\n </Suspense>\n </main>\n <PageNavigation navigation={currentNavigation.items} currentRoute={currentRoute} />\n </div>\n </div>\n <PageFooter />\n </div>\n </SectionProvider>\n </ClarifyLocaleContext.Provider>\n )\n}\n"],"mappings":";;;;;;;AAIA,SAAS,YAAY,OAAwC;CAC3D,OACE,qBAAC,OAAD;EAAK,SAAQ;EAAc,eAAY;EAAO,GAAI;YAAlD;GACE,oBAAC,QAAD;IAAM,GAAE;IAAwR,MAAK;GAAW,CAAA;GAChT,oBAAC,QAAD;IAAM,GAAE;IAA6R,MAAK;IAAU,aAAY;IAAM,WAAU;GAAuB,CAAA;GACvW,oBAAC,QAAD;IAAM,GAAE;IAAsY,MAAK;GAAW,CAAA;EAC3Z;;AAET;AAEA,SAAgB,mBAAmB;CACjC,MAAM,IAAI,eAAe;CAEzB,OACE,qBAAC,KAAD;EACE,MAAK;EACL,QAAO;EACP,KAAI;EACJ,cAAY,EAAE,iBAAiB;EAC/B,WAAU;YALZ;GAOE,oBAAC,QAAD,EAAA,UAAO,EAAE,kBAAkB,EAAQ,CAAA;GACnC,oBAAC,aAAD,EAAa,WAAU,8CAA+C,CAAA;GACtE,oBAAC,QAAD;IAAM,WAAU;cAAyC;GAAa,CAAA;EACrE;;AAEP;;;ACrBA,SAAS,qBAAqB,MAA4B,QAAiB,gBAAiC;CAC1G,IAAI,OAAO,SAAS,UAAU,OAAO;CACrC,QAAQ,SAAS,KAAK,UAAU,KAAA,OAAe,iBAAiB,KAAK,kBAAkB,KAAA,MAAc,OAAO,OAAO,IAAI,EAAE,MAAM;AACjI;AAEA,SAAS,gBAAc,QAAuB,UAAsC;CAClF,MAAM,OAAO,OAAO;CACpB,IAAI,CAAC,MAAM,OAAO,KAAA;CAClB,MAAM,eAAe,SAAS,MAAM,GAAG,EAAE,OAAO,OAAO,EAAE;CACzD,OAAO,KAAK,QAAQ,MAAM,WAAW,OAAO,SAAS,YAAY,GAAG,QAAQ,KAAK;AACnF;AAIA,SAAS,WAAW,MAAuB;CACzC,M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