@next-library/theme 1.0.0

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/dist/client.js ADDED
@@ -0,0 +1,3465 @@
1
+ 'use client';
2
+ import * as React6 from 'react';
3
+ import React6__default, { useState, useRef, useEffect, useCallback } from 'react';
4
+ import { useScroll, useMotionValueEvent, motion } from 'motion/react';
5
+ import { clsx } from 'clsx';
6
+ import { twMerge } from 'tailwind-merge';
7
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
+ import Link3 from 'next/link';
9
+ import Image from 'next/image';
10
+ import { useRouter, usePathname } from 'next/navigation';
11
+ import { Loader2, Search, X, CheckIcon, CircleIcon, ChevronRightIcon, LanguagesIcon, XIcon, PanelLeftIcon, FolderOpenIcon, FolderClosedIcon, ChevronRight, ChevronDown, FileTextIcon, Menu, GithubIcon, MoreHorizontal, Home, ExternalLinkIcon, CopyIcon, ChevronDownIcon, CookieIcon, ChevronUpIcon, FolderUp, ChevronLeft } from 'lucide-react';
12
+ import { useTheme } from 'next-themes';
13
+ import { useLocale } from '@next-library/core/hooks';
14
+ import { Slot } from '@radix-ui/react-slot';
15
+ import { cva } from 'class-variance-authority';
16
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
17
+ import { Drawer as Drawer$1 } from 'vaul';
18
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
19
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
20
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
21
+ import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
22
+ import GitHubButton from 'react-github-btn';
23
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
24
+ import ReactMarkdown from 'react-markdown';
25
+ import remarkGfm from 'remark-gfm';
26
+ import remarkLint from 'remark-lint';
27
+ import remarkFrontmatter from 'remark-frontmatter';
28
+ import rehypeSanitize from 'rehype-sanitize';
29
+ import rehypeSlug from 'rehype-slug';
30
+ import rehypeCallouts from 'rehype-callouts';
31
+ import rehypeExternalLinks from 'rehype-external-links';
32
+ import rehypeMathJax from 'rehype-mathjax';
33
+ import rehypeHighlight from 'rehype-highlight';
34
+ import rehypeAutolinkHeadings from 'rehype-autolink-headings';
35
+ import * as SelectPrimitive from '@radix-ui/react-select';
36
+
37
+ function cn(...inputs) {
38
+ return twMerge(clsx(inputs));
39
+ }
40
+
41
+ // src/lib/translations/index.ts
42
+ var en = {
43
+ copyPage: "Copy page",
44
+ copied: "Copied!",
45
+ openInChatGPT: "Open in ChatGPT",
46
+ openInClaude: "Open in Claude",
47
+ askAboutThisPage: "Ask about this page in ChatGPT",
48
+ copyPageDescription: "Copy page as Markdown for LLMs",
49
+ askQuestionsDescription: "Ask questions about this page",
50
+ chatGPTPrefix: "This page came from",
51
+ tableOfContents: "Table of Contents",
52
+ contributors: "Contributors",
53
+ goToDocsHome: "Go to docs home",
54
+ goBackTo: "Go back to",
55
+ goToPreviousPage: "Go to previous page",
56
+ goToNextPage: "Go to next page",
57
+ noPreviousPage: "No previous page",
58
+ noNextPage: "No next page",
59
+ cookieConsent: "Cookie Consent",
60
+ cookieDescription: "We use cookies to enhance your experience.",
61
+ cookieLearnMore: "Learn more",
62
+ accept: "Accept",
63
+ decline: "Decline",
64
+ goToHomePage: "Go to home page",
65
+ home: "Home",
66
+ linkCopied: "Link copied!",
67
+ copyLinkToSection: "Copy link to section",
68
+ search: "Search",
69
+ searchPlaceholder: "Search",
70
+ closeBanner: "Close banner",
71
+ fallbackLocaleWarning: "This content is shown in {fallbackLocaleName} as it's not available in {requestedLocaleName}."
72
+ };
73
+ var fr = {
74
+ copyPage: "Copier la page",
75
+ copied: "Copi\xE9 !",
76
+ openInChatGPT: "Ouvrir dans ChatGPT",
77
+ openInClaude: "Ouvrir dans Claude",
78
+ askAboutThisPage: "Poser une question sur cette page dans ChatGPT",
79
+ copyPageDescription: "Copier la page au format Markdown pour les LLM",
80
+ askQuestionsDescription: "Poser des questions sur cette page",
81
+ chatGPTPrefix: "Cette page provient de",
82
+ tableOfContents: "Table des mati\xE8res",
83
+ contributors: "Contributeurs",
84
+ goToDocsHome: "Aller \xE0 l'accueil de la documentation",
85
+ goBackTo: "Retour \xE0",
86
+ goToPreviousPage: "Page pr\xE9c\xE9dente",
87
+ goToNextPage: "Page suivante",
88
+ noPreviousPage: "Aucune page pr\xE9c\xE9dente",
89
+ noNextPage: "Aucune page suivante",
90
+ cookieConsent: "Consentement aux cookies",
91
+ cookieDescription: "Nous utilisons des cookies pour am\xE9liorer votre exp\xE9rience.",
92
+ cookieLearnMore: "En savoir plus",
93
+ accept: "Accepter",
94
+ decline: "Refuser",
95
+ goToHomePage: "Aller \xE0 la page d'accueil",
96
+ home: "Accueil",
97
+ linkCopied: "Lien copi\xE9 !",
98
+ copyLinkToSection: "Copier le lien vers la section",
99
+ search: "Rechercher",
100
+ searchPlaceholder: "Rechercher",
101
+ closeBanner: "Fermer la banni\xE8re",
102
+ fallbackLocaleWarning: "Ce contenu est affich\xE9 en {fallbackLocaleName} car il n'est pas disponible en {requestedLocaleName}."
103
+ };
104
+ var de = {
105
+ copyPage: "Seite kopieren",
106
+ copied: "Kopiert!",
107
+ openInChatGPT: "In ChatGPT \xF6ffnen",
108
+ openInClaude: "In Claude \xF6ffnen",
109
+ askAboutThisPage: "Fragen Sie ChatGPT zu dieser Seite",
110
+ copyPageDescription: "Seite als Markdown f\xFCr LLMs kopieren",
111
+ askQuestionsDescription: "Fragen zu dieser Seite stellen",
112
+ chatGPTPrefix: "Diese Seite stammt von",
113
+ tableOfContents: "Inhaltsverzeichnis",
114
+ contributors: "Mitwirkende",
115
+ goToDocsHome: "Zur Dokumentations-Startseite",
116
+ goBackTo: "Zur\xFCck zu",
117
+ goToPreviousPage: "Vorherige Seite",
118
+ goToNextPage: "N\xE4chste Seite",
119
+ noPreviousPage: "Keine vorherige Seite",
120
+ noNextPage: "Keine n\xE4chste Seite",
121
+ cookieConsent: "Cookie-Zustimmung",
122
+ cookieDescription: "Wir verwenden Cookies, um Ihr Erlebnis zu verbessern.",
123
+ cookieLearnMore: "Mehr erfahren",
124
+ accept: "Akzeptieren",
125
+ decline: "Ablehnen",
126
+ goToHomePage: "Zur Startseite",
127
+ home: "Startseite",
128
+ linkCopied: "Link kopiert!",
129
+ copyLinkToSection: "Link zum Abschnitt kopieren",
130
+ search: "Suchen",
131
+ searchPlaceholder: "Suchen",
132
+ closeBanner: "Banner schlie\xDFen",
133
+ fallbackLocaleWarning: "Dieser Inhalt wird in {fallbackLocaleName} angezeigt, da er in {requestedLocaleName} nicht verf\xFCgbar ist."
134
+ };
135
+ var es = {
136
+ copyPage: "Copiar p\xE1gina",
137
+ copied: "\xA1Copiado!",
138
+ openInChatGPT: "Abrir en ChatGPT",
139
+ openInClaude: "Abrir en Claude",
140
+ askAboutThisPage: "Preguntar sobre esta p\xE1gina en ChatGPT",
141
+ copyPageDescription: "Copiar p\xE1gina como Markdown para LLMs",
142
+ askQuestionsDescription: "Hacer preguntas sobre esta p\xE1gina",
143
+ chatGPTPrefix: "Esta p\xE1gina proviene de",
144
+ tableOfContents: "Tabla de contenidos",
145
+ contributors: "Colaboradores",
146
+ goToDocsHome: "Ir al inicio de la documentaci\xF3n",
147
+ goBackTo: "Volver a",
148
+ goToPreviousPage: "P\xE1gina anterior",
149
+ goToNextPage: "P\xE1gina siguiente",
150
+ noPreviousPage: "No hay p\xE1gina anterior",
151
+ noNextPage: "No hay p\xE1gina siguiente",
152
+ cookieConsent: "Consentimiento de cookies",
153
+ cookieDescription: "Utilizamos cookies para mejorar su experiencia.",
154
+ cookieLearnMore: "Saber m\xE1s",
155
+ accept: "Aceptar",
156
+ decline: "Rechazar",
157
+ goToHomePage: "Ir a la p\xE1gina de inicio",
158
+ home: "Inicio",
159
+ linkCopied: "\xA1Enlace copiado!",
160
+ copyLinkToSection: "Copiar enlace a la secci\xF3n",
161
+ search: "Buscar",
162
+ searchPlaceholder: "Buscar",
163
+ closeBanner: "Cerrar banner",
164
+ fallbackLocaleWarning: "Este contenido se muestra en {fallbackLocaleName} ya que no est\xE1 disponible en {requestedLocaleName}."
165
+ };
166
+ var ar = {
167
+ copyPage: "\u0646\u0633\u062E \u0627\u0644\u0635\u0641\u062D\u0629",
168
+ copied: "\u062A\u0645 \u0627\u0644\u0646\u0633\u062E!",
169
+ openInChatGPT: "\u0641\u062A\u062D \u0641\u064A ChatGPT",
170
+ openInClaude: "\u0641\u062A\u062D \u0641\u064A Claude",
171
+ askAboutThisPage: "\u0627\u0633\u0623\u0644 \u0639\u0646 \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629 \u0641\u064A ChatGPT",
172
+ copyPageDescription: "\u0646\u0633\u062E \u0627\u0644\u0635\u0641\u062D\u0629 \u0643\u0640 Markdown \u0644\u0644\u0640 LLMs",
173
+ askQuestionsDescription: "\u0627\u0637\u0631\u062D \u0623\u0633\u0626\u0644\u0629 \u062D\u0648\u0644 \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629",
174
+ chatGPTPrefix: "\u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629 \u062C\u0627\u0621\u062A \u0645\u0646",
175
+ tableOfContents: "\u062C\u062F\u0648\u0644 \u0627\u0644\u0645\u062D\u062A\u0648\u064A\u0627\u062A",
176
+ contributors: "\u0627\u0644\u0645\u0633\u0627\u0647\u0645\u0648\u0646",
177
+ goToDocsHome: "\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629 \u0644\u0644\u0648\u062B\u0627\u0626\u0642",
178
+ goBackTo: "\u0627\u0644\u0639\u0648\u062F\u0629 \u0625\u0644\u0649",
179
+ goToPreviousPage: "\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0633\u0627\u0628\u0642\u0629",
180
+ goToNextPage: "\u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u062A\u0627\u0644\u064A\u0629",
181
+ noPreviousPage: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0635\u0641\u062D\u0629 \u0633\u0627\u0628\u0642\u0629",
182
+ noNextPage: "\u0644\u0627 \u062A\u0648\u062C\u062F \u0635\u0641\u062D\u0629 \u062A\u0627\u0644\u064A\u0629",
183
+ cookieConsent: "\u0645\u0648\u0627\u0641\u0642\u0629 \u0645\u0644\u0641\u0627\u062A \u062A\u0639\u0631\u064A\u0641 \u0627\u0644\u0627\u0631\u062A\u0628\u0627\u0637",
184
+ cookieDescription: "\u0646\u0633\u062A\u062E\u062F\u0645 \u0645\u0644\u0641\u0627\u062A \u062A\u0639\u0631\u064A\u0641 \u0627\u0644\u0627\u0631\u062A\u0628\u0627\u0637 \u0644\u062A\u062D\u0633\u064A\u0646 \u062A\u062C\u0631\u0628\u062A\u0643.",
185
+ cookieLearnMore: "\u0645\u0639\u0631\u0641\u0629 \u0627\u0644\u0645\u0632\u064A\u062F",
186
+ accept: "\u0642\u0628\u0648\u0644",
187
+ decline: "\u0631\u0641\u0636",
188
+ goToHomePage: "\u0627\u0644\u0627\u0646\u062A\u0642\u0627\u0644 \u0625\u0644\u0649 \u0627\u0644\u0635\u0641\u062D\u0629 \u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629",
189
+ home: "\u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629",
190
+ linkCopied: "\u062A\u0645 \u0646\u0633\u062E \u0627\u0644\u0631\u0627\u0628\u0637!",
191
+ copyLinkToSection: "\u0646\u0633\u062E \u0627\u0644\u0631\u0627\u0628\u0637 \u0625\u0644\u0649 \u0627\u0644\u0642\u0633\u0645",
192
+ search: "\u0628\u062D\u062B",
193
+ searchPlaceholder: "\u0628\u062D\u062B",
194
+ closeBanner: "\u0625\u063A\u0644\u0627\u0642 \u0627\u0644\u0634\u0639\u0627\u0631",
195
+ fallbackLocaleWarning: "\u064A\u062A\u0645 \u0639\u0631\u0636 \u0647\u0630\u0627 \u0627\u0644\u0645\u062D\u062A\u0648\u0649 \u0628\u0640 {fallbackLocaleName} \u0644\u0623\u0646\u0647 \u063A\u064A\u0631 \u0645\u062A\u0627\u062D \u0628\u0640 {requestedLocaleName}."
196
+ };
197
+ var zh = {
198
+ copyPage: "\u590D\u5236\u9875\u9762",
199
+ copied: "\u5DF2\u590D\u5236\uFF01",
200
+ openInChatGPT: "\u5728 ChatGPT \u4E2D\u6253\u5F00",
201
+ openInClaude: "\u5728 Claude \u4E2D\u6253\u5F00",
202
+ askAboutThisPage: "\u5728 ChatGPT \u4E2D\u8BE2\u95EE\u6B64\u9875\u9762",
203
+ copyPageDescription: "\u5C06\u9875\u9762\u590D\u5236\u4E3A Markdown \u683C\u5F0F\u4F9B LLM \u4F7F\u7528",
204
+ askQuestionsDescription: "\u8BE2\u95EE\u6709\u5173\u6B64\u9875\u9762\u7684\u95EE\u9898",
205
+ chatGPTPrefix: "\u6B64\u9875\u9762\u6765\u81EA",
206
+ tableOfContents: "\u76EE\u5F55",
207
+ contributors: "\u8D21\u732E\u8005",
208
+ goToDocsHome: "\u524D\u5F80\u6587\u6863\u9996\u9875",
209
+ goBackTo: "\u8FD4\u56DE",
210
+ goToPreviousPage: "\u4E0A\u4E00\u9875",
211
+ goToNextPage: "\u4E0B\u4E00\u9875",
212
+ noPreviousPage: "\u6CA1\u6709\u4E0A\u4E00\u9875",
213
+ noNextPage: "\u6CA1\u6709\u4E0B\u4E00\u9875",
214
+ cookieConsent: "Cookie \u540C\u610F",
215
+ cookieDescription: "\u6211\u4EEC\u4F7F\u7528 Cookie \u6765\u6539\u5584\u60A8\u7684\u4F53\u9A8C\u3002",
216
+ cookieLearnMore: "\u4E86\u89E3\u66F4\u591A",
217
+ accept: "\u63A5\u53D7",
218
+ decline: "\u62D2\u7EDD",
219
+ goToHomePage: "\u524D\u5F80\u9996\u9875",
220
+ home: "\u9996\u9875",
221
+ linkCopied: "\u94FE\u63A5\u5DF2\u590D\u5236\uFF01",
222
+ copyLinkToSection: "\u590D\u5236\u7AE0\u8282\u94FE\u63A5",
223
+ search: "\u641C\u7D22",
224
+ searchPlaceholder: "\u641C\u7D22",
225
+ closeBanner: "\u5173\u95ED\u6A2A\u5E45",
226
+ fallbackLocaleWarning: "\u6B64\u5185\u5BB9\u4EE5 {fallbackLocaleName} \u663E\u793A\uFF0C\u56E0\u4E3A {requestedLocaleName} \u4E0D\u53EF\u7528\u3002"
227
+ };
228
+ var ja = {
229
+ copyPage: "\u30DA\u30FC\u30B8\u3092\u30B3\u30D4\u30FC",
230
+ copied: "\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F\uFF01",
231
+ openInChatGPT: "ChatGPT \u3067\u958B\u304F",
232
+ openInClaude: "Claude \u3067\u958B\u304F",
233
+ askAboutThisPage: "ChatGPT \u3067\u3053\u306E\u30DA\u30FC\u30B8\u306B\u3064\u3044\u3066\u8CEA\u554F\u3059\u308B",
234
+ copyPageDescription: "\u30DA\u30FC\u30B8\u3092 LLM \u7528\u306E Markdown \u3068\u3057\u3066\u30B3\u30D4\u30FC",
235
+ askQuestionsDescription: "\u3053\u306E\u30DA\u30FC\u30B8\u306B\u3064\u3044\u3066\u8CEA\u554F\u3059\u308B",
236
+ chatGPTPrefix: "\u3053\u306E\u30DA\u30FC\u30B8\u306F",
237
+ tableOfContents: "\u76EE\u6B21",
238
+ contributors: "\u8CA2\u732E\u8005",
239
+ goToDocsHome: "\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30DB\u30FC\u30E0\u3078",
240
+ goBackTo: "\u623B\u308B",
241
+ goToPreviousPage: "\u524D\u306E\u30DA\u30FC\u30B8",
242
+ goToNextPage: "\u6B21\u306E\u30DA\u30FC\u30B8",
243
+ noPreviousPage: "\u524D\u306E\u30DA\u30FC\u30B8\u306A\u3057",
244
+ noNextPage: "\u6B21\u306E\u30DA\u30FC\u30B8\u306A\u3057",
245
+ cookieConsent: "Cookie \u540C\u610F",
246
+ cookieDescription: "\u4F53\u9A13\u3092\u5411\u4E0A\u3055\u305B\u308B\u305F\u3081\u306B Cookie \u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002",
247
+ cookieLearnMore: "\u8A73\u7D30\u3092\u898B\u308B",
248
+ accept: "\u540C\u610F",
249
+ decline: "\u62D2\u5426",
250
+ goToHomePage: "\u30DB\u30FC\u30E0\u30DA\u30FC\u30B8\u3078",
251
+ home: "\u30DB\u30FC\u30E0",
252
+ linkCopied: "\u30EA\u30F3\u30AF\u3092\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F\uFF01",
253
+ copyLinkToSection: "\u30BB\u30AF\u30B7\u30E7\u30F3\u3078\u306E\u30EA\u30F3\u30AF\u3092\u30B3\u30D4\u30FC",
254
+ search: "\u691C\u7D22",
255
+ searchPlaceholder: "\u691C\u7D22",
256
+ closeBanner: "\u30D0\u30CA\u30FC\u3092\u9589\u3058\u308B",
257
+ fallbackLocaleWarning: "\u3053\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306F {requestedLocaleName} \u3067\u5229\u7528\u3067\u304D\u306A\u3044\u305F\u3081\u3001{fallbackLocaleName} \u3067\u8868\u793A\u3055\u308C\u3066\u3044\u307E\u3059\u3002"
258
+ };
259
+ var ko = {
260
+ copyPage: "\uD398\uC774\uC9C0 \uBCF5\uC0AC",
261
+ copied: "\uBCF5\uC0AC\uB428!",
262
+ openInChatGPT: "ChatGPT\uC5D0\uC11C \uC5F4\uAE30",
263
+ openInClaude: "Claude\uC5D0\uC11C \uC5F4\uAE30",
264
+ askAboutThisPage: "ChatGPT\uC5D0\uC11C \uC774 \uD398\uC774\uC9C0\uC5D0 \uB300\uD574 \uC9C8\uBB38\uD558\uAE30",
265
+ copyPageDescription: "\uD398\uC774\uC9C0\uB97C LLM\uC6A9 Markdown\uC73C\uB85C \uBCF5\uC0AC",
266
+ askQuestionsDescription: "\uC774 \uD398\uC774\uC9C0\uC5D0 \uB300\uD574 \uC9C8\uBB38\uD558\uAE30",
267
+ chatGPTPrefix: "\uC774 \uD398\uC774\uC9C0\uB294",
268
+ tableOfContents: "\uBAA9\uCC28",
269
+ contributors: "\uAE30\uC5EC\uC790",
270
+ goToDocsHome: "\uBB38\uC11C \uD648\uC73C\uB85C \uC774\uB3D9",
271
+ goBackTo: "\uB3CC\uC544\uAC00\uAE30",
272
+ goToPreviousPage: "\uC774\uC804 \uD398\uC774\uC9C0",
273
+ goToNextPage: "\uB2E4\uC74C \uD398\uC774\uC9C0",
274
+ noPreviousPage: "\uC774\uC804 \uD398\uC774\uC9C0 \uC5C6\uC74C",
275
+ noNextPage: "\uB2E4\uC74C \uD398\uC774\uC9C0 \uC5C6\uC74C",
276
+ cookieConsent: "\uCFE0\uD0A4 \uB3D9\uC758",
277
+ cookieDescription: "\uACBD\uD5D8\uC744 \uD5A5\uC0C1\uC2DC\uD0A4\uAE30 \uC704\uD574 \uCFE0\uD0A4\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.",
278
+ cookieLearnMore: "\uC790\uC138\uD788 \uC54C\uC544\uBCF4\uAE30",
279
+ accept: "\uC218\uB77D",
280
+ decline: "\uAC70\uBD80",
281
+ goToHomePage: "\uD648\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",
282
+ home: "\uD648",
283
+ linkCopied: "\uB9C1\uD06C \uBCF5\uC0AC\uB428!",
284
+ copyLinkToSection: "\uC139\uC158 \uB9C1\uD06C \uBCF5\uC0AC",
285
+ search: "\uAC80\uC0C9",
286
+ searchPlaceholder: "\uAC80\uC0C9",
287
+ closeBanner: "\uBC30\uB108 \uB2EB\uAE30",
288
+ fallbackLocaleWarning: "\uC774 \uCF58\uD150\uCE20\uB294 {requestedLocaleName}\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4 {fallbackLocaleName}\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4."
289
+ };
290
+ var pt = {
291
+ copyPage: "Copiar p\xE1gina",
292
+ copied: "Copiado!",
293
+ openInChatGPT: "Abrir no ChatGPT",
294
+ openInClaude: "Abrir no Claude",
295
+ askAboutThisPage: "Perguntar sobre esta p\xE1gina no ChatGPT",
296
+ copyPageDescription: "Copiar p\xE1gina como Markdown para LLMs",
297
+ askQuestionsDescription: "Fazer perguntas sobre esta p\xE1gina",
298
+ chatGPTPrefix: "Esta p\xE1gina veio de",
299
+ tableOfContents: "\xCDndice",
300
+ contributors: "Contribuidores",
301
+ goToDocsHome: "Ir para a p\xE1gina inicial da documenta\xE7\xE3o",
302
+ goBackTo: "Voltar para",
303
+ goToPreviousPage: "P\xE1gina anterior",
304
+ goToNextPage: "Pr\xF3xima p\xE1gina",
305
+ noPreviousPage: "Sem p\xE1gina anterior",
306
+ noNextPage: "Sem pr\xF3xima p\xE1gina",
307
+ cookieConsent: "Consentimento de Cookies",
308
+ cookieDescription: "Usamos cookies para melhorar sua experi\xEAncia.",
309
+ cookieLearnMore: "Saiba mais",
310
+ accept: "Aceitar",
311
+ decline: "Recusar",
312
+ goToHomePage: "Ir para a p\xE1gina inicial",
313
+ home: "In\xEDcio",
314
+ linkCopied: "Link copiado!",
315
+ copyLinkToSection: "Copiar link para a se\xE7\xE3o",
316
+ search: "Pesquisar",
317
+ searchPlaceholder: "Pesquisar",
318
+ closeBanner: "Fechar banner",
319
+ fallbackLocaleWarning: "Este conte\xFAdo \xE9 exibido em {fallbackLocaleName} pois n\xE3o est\xE1 dispon\xEDvel em {requestedLocaleName}."
320
+ };
321
+ var it = {
322
+ copyPage: "Copia pagina",
323
+ copied: "Copiato!",
324
+ openInChatGPT: "Apri in ChatGPT",
325
+ openInClaude: "Apri in Claude",
326
+ askAboutThisPage: "Chiedi informazioni su questa pagina in ChatGPT",
327
+ copyPageDescription: "Copia pagina come Markdown per LLM",
328
+ askQuestionsDescription: "Fai domande su questa pagina",
329
+ chatGPTPrefix: "Questa pagina proviene da",
330
+ tableOfContents: "Indice",
331
+ contributors: "Collaboratori",
332
+ goToDocsHome: "Vai alla home della documentazione",
333
+ goBackTo: "Torna a",
334
+ goToPreviousPage: "Pagina precedente",
335
+ goToNextPage: "Pagina successiva",
336
+ noPreviousPage: "Nessuna pagina precedente",
337
+ noNextPage: "Nessuna pagina successiva",
338
+ cookieConsent: "Consenso ai Cookie",
339
+ cookieDescription: "Utilizziamo i cookie per migliorare la tua esperienza.",
340
+ cookieLearnMore: "Scopri di pi\xF9",
341
+ accept: "Accetta",
342
+ decline: "Rifiuta",
343
+ goToHomePage: "Vai alla home",
344
+ home: "Home",
345
+ linkCopied: "Link copiato!",
346
+ copyLinkToSection: "Copia link alla sezione",
347
+ search: "Cerca",
348
+ searchPlaceholder: "Cerca",
349
+ closeBanner: "Chiudi banner",
350
+ fallbackLocaleWarning: "Questo contenuto \xE8 mostrato in {fallbackLocaleName} poich\xE9 non \xE8 disponibile in {requestedLocaleName}."
351
+ };
352
+ var ru = {
353
+ copyPage: "\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443",
354
+ copied: "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u043E!",
355
+ openInChatGPT: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 ChatGPT",
356
+ openInClaude: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 Claude",
357
+ askAboutThisPage: "\u0421\u043F\u0440\u043E\u0441\u0438\u0442\u044C \u043E\u0431 \u044D\u0442\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435 \u0432 ChatGPT",
358
+ copyPageDescription: "\u0421\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u043A\u0430\u043A Markdown \u0434\u043B\u044F LLM",
359
+ askQuestionsDescription: "\u0417\u0430\u0434\u0430\u0442\u044C \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u043E\u0431 \u044D\u0442\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0435",
360
+ chatGPTPrefix: "\u042D\u0442\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430 \u0432\u0437\u044F\u0442\u0430 \u0441",
361
+ tableOfContents: "\u0421\u043E\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0435",
362
+ contributors: "\u0423\u0447\u0430\u0441\u0442\u043D\u0438\u043A\u0438",
363
+ goToDocsHome: "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u0438",
364
+ goBackTo: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043A",
365
+ goToPreviousPage: "\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430",
366
+ goToNextPage: "\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430",
367
+ noPreviousPage: "\u041D\u0435\u0442 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B",
368
+ noNextPage: "\u041D\u0435\u0442 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B",
369
+ cookieConsent: "\u0421\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u043D\u0430 Cookie",
370
+ cookieDescription: "\u041C\u044B \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C cookie \u0434\u043B\u044F \u0443\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u043F\u044B\u0442\u0430.",
371
+ cookieLearnMore: "\u0423\u0437\u043D\u0430\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435",
372
+ accept: "\u041F\u0440\u0438\u043D\u044F\u0442\u044C",
373
+ decline: "\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C",
374
+ goToHomePage: "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0433\u043B\u0430\u0432\u043D\u0443\u044E",
375
+ home: "\u0413\u043B\u0430\u0432\u043D\u0430\u044F",
376
+ linkCopied: "\u0421\u0441\u044B\u043B\u043A\u0430 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0430!",
377
+ copyLinkToSection: "\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443 \u043D\u0430 \u0440\u0430\u0437\u0434\u0435\u043B",
378
+ search: "\u041F\u043E\u0438\u0441\u043A",
379
+ searchPlaceholder: "\u041F\u043E\u0438\u0441\u043A",
380
+ closeBanner: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0431\u0430\u043D\u043D\u0435\u0440",
381
+ fallbackLocaleWarning: "\u042D\u0442\u043E\u0442 \u043A\u043E\u043D\u0442\u0435\u043D\u0442 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043D\u0430 {fallbackLocaleName}, \u0442\u0430\u043A \u043A\u0430\u043A \u043E\u043D \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043D\u0430 {requestedLocaleName}."
382
+ };
383
+ var nl = {
384
+ copyPage: "Pagina kopi\xEBren",
385
+ copied: "Gekopieerd!",
386
+ openInChatGPT: "Openen in ChatGPT",
387
+ openInClaude: "Openen in Claude",
388
+ askAboutThisPage: "Vraag over deze pagina in ChatGPT",
389
+ copyPageDescription: "Pagina kopi\xEBren als Markdown voor LLMs",
390
+ askQuestionsDescription: "Vragen stellen over deze pagina",
391
+ chatGPTPrefix: "Deze pagina komt van",
392
+ tableOfContents: "Inhoudsopgave",
393
+ contributors: "Bijdragers",
394
+ goToDocsHome: "Naar documentatie startpagina",
395
+ goBackTo: "Terug naar",
396
+ goToPreviousPage: "Vorige pagina",
397
+ goToNextPage: "Volgende pagina",
398
+ noPreviousPage: "Geen vorige pagina",
399
+ noNextPage: "Geen volgende pagina",
400
+ cookieConsent: "Cookie Toestemming",
401
+ cookieDescription: "We gebruiken cookies om uw ervaring te verbeteren.",
402
+ cookieLearnMore: "Meer informatie",
403
+ accept: "Accepteren",
404
+ decline: "Weigeren",
405
+ goToHomePage: "Naar startpagina",
406
+ home: "Startpagina",
407
+ linkCopied: "Link gekopieerd!",
408
+ copyLinkToSection: "Link naar sectie kopi\xEBren",
409
+ search: "Zoeken",
410
+ searchPlaceholder: "Zoeken",
411
+ closeBanner: "Banner sluiten",
412
+ fallbackLocaleWarning: "Deze inhoud wordt weergegeven in {fallbackLocaleName} omdat deze niet beschikbaar is in {requestedLocaleName}."
413
+ };
414
+ var sv = {
415
+ copyPage: "Kopiera sida",
416
+ copied: "Kopierad!",
417
+ openInChatGPT: "\xD6ppna i ChatGPT",
418
+ openInClaude: "\xD6ppna i Claude",
419
+ askAboutThisPage: "Fr\xE5ga om denna sida i ChatGPT",
420
+ copyPageDescription: "Kopiera sida som Markdown f\xF6r LLMs",
421
+ askQuestionsDescription: "St\xE4lla fr\xE5gor om denna sida",
422
+ chatGPTPrefix: "Denna sida kommer fr\xE5n",
423
+ tableOfContents: "Inneh\xE5llsf\xF6rteckning",
424
+ contributors: "Bidragsgivare",
425
+ goToDocsHome: "G\xE5 till dokumentationsstartsidan",
426
+ goBackTo: "Tillbaka till",
427
+ goToPreviousPage: "F\xF6reg\xE5ende sida",
428
+ goToNextPage: "N\xE4sta sida",
429
+ noPreviousPage: "Ingen f\xF6reg\xE5ende sida",
430
+ noNextPage: "Ingen n\xE4sta sida",
431
+ cookieConsent: "Cookie-medgivande",
432
+ cookieDescription: "Vi anv\xE4nder cookies f\xF6r att f\xF6rb\xE4ttra din upplevelse.",
433
+ cookieLearnMore: "L\xE4s mer",
434
+ accept: "Acceptera",
435
+ decline: "Avvisa",
436
+ goToHomePage: "G\xE5 till startsidan",
437
+ home: "Hem",
438
+ linkCopied: "L\xE4nk kopierad!",
439
+ copyLinkToSection: "Kopiera l\xE4nk till avsnitt",
440
+ search: "S\xF6k",
441
+ searchPlaceholder: "S\xF6k",
442
+ closeBanner: "St\xE4ng banner",
443
+ fallbackLocaleWarning: "Detta inneh\xE5ll visas p\xE5 {fallbackLocaleName} eftersom det inte \xE4r tillg\xE4ngligt p\xE5 {requestedLocaleName}."
444
+ };
445
+ var no = {
446
+ copyPage: "Kopier side",
447
+ copied: "Kopiert!",
448
+ openInChatGPT: "\xC5pne i ChatGPT",
449
+ openInClaude: "\xC5pne i Claude",
450
+ askAboutThisPage: "Sp\xF8r om denne siden i ChatGPT",
451
+ copyPageDescription: "Kopier side som Markdown for LLMs",
452
+ askQuestionsDescription: "Stille sp\xF8rsm\xE5l om denne siden",
453
+ chatGPTPrefix: "Denne siden kommer fra",
454
+ tableOfContents: "Innholdsfortegnelse",
455
+ contributors: "Bidragsytere",
456
+ goToDocsHome: "G\xE5 til dokumentasjonsforsiden",
457
+ goBackTo: "Tilbake til",
458
+ goToPreviousPage: "Forrige side",
459
+ goToNextPage: "Neste side",
460
+ noPreviousPage: "Ingen forrige side",
461
+ noNextPage: "Ingen neste side",
462
+ cookieConsent: "Cookie-samtykke",
463
+ cookieDescription: "Vi bruker informasjonskapsler for \xE5 forbedre opplevelsen din.",
464
+ cookieLearnMore: "Finn ut mer",
465
+ accept: "Godta",
466
+ decline: "Avsl\xE5",
467
+ goToHomePage: "G\xE5 til forsiden",
468
+ home: "Hjem",
469
+ linkCopied: "Lenke kopiert!",
470
+ copyLinkToSection: "Kopier lenke til seksjon",
471
+ search: "S\xF8k",
472
+ searchPlaceholder: "S\xF8k",
473
+ closeBanner: "Lukk banner",
474
+ fallbackLocaleWarning: "Dette innholdet vises p\xE5 {fallbackLocaleName} fordi det ikke er tilgjengelig p\xE5 {requestedLocaleName}."
475
+ };
476
+ var da = {
477
+ copyPage: "Kopier side",
478
+ copied: "Kopieret!",
479
+ openInChatGPT: "\xC5bn i ChatGPT",
480
+ openInClaude: "\xC5bn i Claude",
481
+ askAboutThisPage: "Sp\xF8rg om denne side i ChatGPT",
482
+ copyPageDescription: "Kopier side som Markdown til LLMs",
483
+ askQuestionsDescription: "Stille sp\xF8rgsm\xE5l om denne side",
484
+ chatGPTPrefix: "Denne side kommer fra",
485
+ tableOfContents: "Indholdsfortegnelse",
486
+ contributors: "Bidragydere",
487
+ goToDocsHome: "G\xE5 til dokumentationsforsiden",
488
+ goBackTo: "Tilbage til",
489
+ goToPreviousPage: "Forrige side",
490
+ goToNextPage: "N\xE6ste side",
491
+ noPreviousPage: "Ingen forrige side",
492
+ noNextPage: "Ingen n\xE6ste side",
493
+ cookieConsent: "Cookie-samtykke",
494
+ cookieDescription: "Vi bruger cookies til at forbedre din oplevelse.",
495
+ cookieLearnMore: "L\xE6s mere",
496
+ accept: "Accepter",
497
+ decline: "Afvis",
498
+ goToHomePage: "G\xE5 til forsiden",
499
+ home: "Hjem",
500
+ linkCopied: "Link kopieret!",
501
+ copyLinkToSection: "Kopier link til sektion",
502
+ search: "S\xF8g",
503
+ searchPlaceholder: "S\xF8g",
504
+ closeBanner: "Luk banner",
505
+ fallbackLocaleWarning: "Dette indhold vises p\xE5 {fallbackLocaleName}, fordi det ikke er tilg\xE6ngeligt p\xE5 {requestedLocaleName}."
506
+ };
507
+ var fi = {
508
+ copyPage: "Kopioi sivu",
509
+ copied: "Kopioitu!",
510
+ openInChatGPT: "Avaa ChatGPT:ss\xE4",
511
+ openInClaude: "Avaa Claude:ssa",
512
+ askAboutThisPage: "Kysy t\xE4st\xE4 sivusta ChatGPT:ss\xE4",
513
+ copyPageDescription: "Kopioi sivu Markdown-muodossa LLM:ille",
514
+ askQuestionsDescription: "Kysy kysymyksi\xE4 t\xE4st\xE4 sivusta",
515
+ chatGPTPrefix: "T\xE4m\xE4 sivu tulee",
516
+ tableOfContents: "Sis\xE4llysluettelo",
517
+ contributors: "Osallistujat",
518
+ goToDocsHome: "Siirry dokumentaation etusivulle",
519
+ goBackTo: "Takaisin",
520
+ goToPreviousPage: "Edellinen sivu",
521
+ goToNextPage: "Seuraava sivu",
522
+ noPreviousPage: "Ei edellist\xE4 sivua",
523
+ noNextPage: "Ei seuraavaa sivua",
524
+ cookieConsent: "Ev\xE4steiden suostumus",
525
+ cookieDescription: "K\xE4yt\xE4mme ev\xE4steit\xE4 parantaaksemme kokemustasi.",
526
+ cookieLearnMore: "Lue lis\xE4\xE4",
527
+ accept: "Hyv\xE4ksy",
528
+ decline: "Hylk\xE4\xE4",
529
+ goToHomePage: "Siirry etusivulle",
530
+ home: "Koti",
531
+ linkCopied: "Linkki kopioitu!",
532
+ copyLinkToSection: "Kopioi linkki osioon",
533
+ search: "Hae",
534
+ searchPlaceholder: "Hae",
535
+ closeBanner: "Sulje banneri",
536
+ fallbackLocaleWarning: "T\xE4m\xE4 sis\xE4lt\xF6 n\xE4ytet\xE4\xE4n {fallbackLocaleName}ksi, koska se ei ole saatavilla {requestedLocaleName}ksi."
537
+ };
538
+ var pl = {
539
+ copyPage: "Kopiuj stron\u0119",
540
+ copied: "Skopiowano!",
541
+ openInChatGPT: "Otw\xF3rz w ChatGPT",
542
+ openInClaude: "Otw\xF3rz w Claude",
543
+ askAboutThisPage: "Zapytaj o t\u0119 stron\u0119 w ChatGPT",
544
+ copyPageDescription: "Skopiuj stron\u0119 jako Markdown dla LLM",
545
+ askQuestionsDescription: "Zadawaj pytania dotycz\u0105ce tej strony",
546
+ chatGPTPrefix: "Ta strona pochodzi z",
547
+ tableOfContents: "Spis tre\u015Bci",
548
+ contributors: "Wsp\xF3\u0142tw\xF3rcy",
549
+ goToDocsHome: "Przejd\u017A do strony g\u0142\xF3wnej dokumentacji",
550
+ goBackTo: "Wr\xF3\u0107 do",
551
+ goToPreviousPage: "Poprzednia strona",
552
+ goToNextPage: "Nast\u0119pna strona",
553
+ noPreviousPage: "Brak poprzedniej strony",
554
+ noNextPage: "Brak nast\u0119pnej strony",
555
+ cookieConsent: "Zgoda na pliki cookie",
556
+ cookieDescription: "U\u017Cywamy plik\xF3w cookie, aby poprawi\u0107 Twoje wra\u017Cenia.",
557
+ cookieLearnMore: "Dowiedz si\u0119 wi\u0119cej",
558
+ accept: "Zaakceptuj",
559
+ decline: "Odrzu\u0107",
560
+ goToHomePage: "Przejd\u017A do strony g\u0142\xF3wnej",
561
+ home: "Strona g\u0142\xF3wna",
562
+ linkCopied: "Link skopiowany!",
563
+ copyLinkToSection: "Kopiuj link do sekcji",
564
+ search: "Szukaj",
565
+ searchPlaceholder: "Szukaj",
566
+ closeBanner: "Zamknij baner",
567
+ fallbackLocaleWarning: "Ta zawarto\u015B\u0107 jest wy\u015Bwietlana w {fallbackLocaleName}, poniewa\u017C nie jest dost\u0119pna w {requestedLocaleName}."
568
+ };
569
+ var tr = {
570
+ copyPage: "Sayfay\u0131 kopyala",
571
+ copied: "Kopyaland\u0131!",
572
+ openInChatGPT: "ChatGPT'te A\xE7",
573
+ openInClaude: "Claude'da A\xE7",
574
+ askAboutThisPage: "ChatGPT'te bu sayfa hakk\u0131nda sor",
575
+ copyPageDescription: "Sayfay\u0131 LLM'ler i\xE7in Markdown olarak kopyala",
576
+ askQuestionsDescription: "Bu sayfa hakk\u0131nda sorular sor",
577
+ chatGPTPrefix: "Bu sayfa",
578
+ tableOfContents: "\u0130\xE7indekiler",
579
+ contributors: "Katk\u0131da Bulunanlar",
580
+ goToDocsHome: "Dok\xFCmantasyon ana sayfas\u0131na git",
581
+ goBackTo: "Geri d\xF6n",
582
+ goToPreviousPage: "\xD6nceki sayfa",
583
+ goToNextPage: "Sonraki sayfa",
584
+ noPreviousPage: "\xD6nceki sayfa yok",
585
+ noNextPage: "Sonraki sayfa yok",
586
+ cookieConsent: "\xC7erez Onay\u0131",
587
+ cookieDescription: "Deneyiminizi geli\u015Ftirmek i\xE7in \xE7erezler kullan\u0131yoruz.",
588
+ cookieLearnMore: "Daha fazla bilgi",
589
+ accept: "Kabul Et",
590
+ decline: "Reddet",
591
+ goToHomePage: "Ana sayfaya git",
592
+ home: "Ana Sayfa",
593
+ linkCopied: "Ba\u011Flant\u0131 kopyaland\u0131!",
594
+ copyLinkToSection: "B\xF6l\xFCme ba\u011Flant\u0131 kopyala",
595
+ search: "Ara",
596
+ searchPlaceholder: "Ara",
597
+ closeBanner: "Banner'\u0131 kapat",
598
+ fallbackLocaleWarning: "Bu i\xE7erik {requestedLocaleName} dilinde mevcut olmad\u0131\u011F\u0131 i\xE7in {fallbackLocaleName} dilinde g\xF6sterilmektedir."
599
+ };
600
+ var he = {
601
+ copyPage: "\u05D4\u05E2\u05EA\u05E7 \u05E2\u05DE\u05D5\u05D3",
602
+ copied: "\u05D4\u05D5\u05E2\u05EA\u05E7!",
603
+ openInChatGPT: "\u05E4\u05EA\u05D7 \u05D1-ChatGPT",
604
+ openInClaude: "\u05E4\u05EA\u05D7 \u05D1-Claude",
605
+ askAboutThisPage: "\u05E9\u05D0\u05DC \u05E2\u05DC \u05D3\u05E3 \u05D6\u05D4 \u05D1-ChatGPT",
606
+ copyPageDescription: "\u05D4\u05E2\u05EA\u05E7 \u05D3\u05E3 \u05DB-Markdown \u05E2\u05D1\u05D5\u05E8 LLMs",
607
+ askQuestionsDescription: "\u05E9\u05D0\u05DC \u05E9\u05D0\u05DC\u05D5\u05EA \u05E2\u05DC \u05D3\u05E3 \u05D6\u05D4",
608
+ chatGPTPrefix: "\u05D3\u05E3 \u05D6\u05D4 \u05D4\u05D2\u05D9\u05E2 \u05DE",
609
+ tableOfContents: "\u05EA\u05D5\u05DB\u05DF \u05E2\u05E0\u05D9\u05D9\u05E0\u05D9\u05DD",
610
+ contributors: "\u05EA\u05D5\u05E8\u05DE\u05D9\u05DD",
611
+ goToDocsHome: "\u05E2\u05D1\u05D5\u05E8 \u05DC\u05D3\u05E3 \u05D4\u05D1\u05D9\u05EA \u05E9\u05DC \u05D4\u05EA\u05D9\u05E2\u05D5\u05D3",
612
+ goBackTo: "\u05D7\u05D6\u05D5\u05E8 \u05DC",
613
+ goToPreviousPage: "\u05E2\u05DE\u05D5\u05D3 \u05E7\u05D5\u05D3\u05DD",
614
+ goToNextPage: "\u05E2\u05DE\u05D5\u05D3 \u05D4\u05D1\u05D0",
615
+ noPreviousPage: "\u05D0\u05D9\u05DF \u05E2\u05DE\u05D5\u05D3 \u05E7\u05D5\u05D3\u05DD",
616
+ noNextPage: "\u05D0\u05D9\u05DF \u05E2\u05DE\u05D5\u05D3 \u05D4\u05D1\u05D0",
617
+ cookieConsent: "\u05D4\u05E1\u05DB\u05DE\u05D4 \u05DC\u05E2\u05D5\u05D2\u05D9\u05D5\u05EA",
618
+ cookieDescription: "\u05D0\u05E0\u05D5 \u05DE\u05E9\u05EA\u05DE\u05E9\u05D9\u05DD \u05D1\u05E2\u05D5\u05D2\u05D9\u05D5\u05EA \u05DB\u05D3\u05D9 \u05DC\u05E9\u05E4\u05E8 \u05D0\u05EA \u05D4\u05D7\u05D5\u05D5\u05D9\u05D4 \u05E9\u05DC\u05DA.",
619
+ cookieLearnMore: "\u05DC\u05DE\u05D3 \u05E2\u05D5\u05D3",
620
+ accept: "\u05DE\u05E7\u05D1\u05DC",
621
+ decline: "\u05D3\u05D5\u05D7\u05D4",
622
+ goToHomePage: "\u05E2\u05D1\u05D5\u05E8 \u05DC\u05D3\u05E3 \u05D4\u05D1\u05D9\u05EA",
623
+ home: "\u05D1\u05D9\u05EA",
624
+ linkCopied: "\u05E7\u05D9\u05E9\u05D5\u05E8 \u05D4\u05D5\u05E2\u05EA\u05E7!",
625
+ copyLinkToSection: "\u05D4\u05E2\u05EA\u05E7 \u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05E1\u05E2\u05D9\u05E3",
626
+ search: "\u05D7\u05E4\u05E9",
627
+ searchPlaceholder: "\u05D7\u05E4\u05E9",
628
+ closeBanner: "\u05E1\u05D2\u05D5\u05E8 \u05D1\u05D0\u05E0\u05E8",
629
+ fallbackLocaleWarning: "\u05EA\u05D5\u05DB\u05DF \u05D6\u05D4 \u05DE\u05D5\u05E6\u05D2 \u05D1-{fallbackLocaleName} \u05DE\u05DB\u05D9\u05D5\u05D5\u05DF \u05E9\u05D4\u05D5\u05D0 \u05D0\u05D9\u05E0\u05D5 \u05D6\u05DE\u05D9\u05DF \u05D1-{requestedLocaleName}."
630
+ };
631
+ var hi = {
632
+ copyPage: "\u092A\u0943\u0937\u094D\u0920 \u0915\u0949\u092A\u0940 \u0915\u0930\u0947\u0902",
633
+ copied: "\u0915\u0949\u092A\u0940 \u0915\u093F\u092F\u093E \u0917\u092F\u093E!",
634
+ openInChatGPT: "ChatGPT \u092E\u0947\u0902 \u0916\u094B\u0932\u0947\u0902",
635
+ openInClaude: "Claude \u092E\u0947\u0902 \u0916\u094B\u0932\u0947\u0902",
636
+ askAboutThisPage: "ChatGPT \u092E\u0947\u0902 \u0907\u0938 \u092A\u0943\u0937\u094D\u0920 \u0915\u0947 \u092C\u093E\u0930\u0947 \u092E\u0947\u0902 \u092A\u0942\u091B\u0947\u0902",
637
+ copyPageDescription: "\u092A\u0943\u0937\u094D\u0920 \u0915\u094B LLM \u0915\u0947 \u0932\u093F\u090F Markdown \u0915\u0947 \u0930\u0942\u092A \u092E\u0947\u0902 \u0915\u0949\u092A\u0940 \u0915\u0930\u0947\u0902",
638
+ askQuestionsDescription: "\u0907\u0938 \u092A\u0943\u0937\u094D\u0920 \u0915\u0947 \u092C\u093E\u0930\u0947 \u092E\u0947\u0902 \u092A\u094D\u0930\u0936\u094D\u0928 \u092A\u0942\u091B\u0947\u0902",
639
+ chatGPTPrefix: "\u092F\u0939 \u092A\u0943\u0937\u094D\u0920",
640
+ tableOfContents: "\u0935\u093F\u0937\u092F \u0938\u0942\u091A\u0940",
641
+ contributors: "\u092F\u094B\u0917\u0926\u093E\u0928\u0915\u0930\u094D\u0924\u093E",
642
+ goToDocsHome: "\u0926\u0938\u094D\u0924\u093E\u0935\u0947\u091C\u093C \u0939\u094B\u092E \u092A\u0930 \u091C\u093E\u090F\u0902",
643
+ goBackTo: "\u0935\u093E\u092A\u0938 \u091C\u093E\u090F\u0902",
644
+ goToPreviousPage: "\u092A\u093F\u091B\u0932\u093E \u092A\u0943\u0937\u094D\u0920",
645
+ goToNextPage: "\u0905\u0917\u0932\u093E \u092A\u0943\u0937\u094D\u0920",
646
+ noPreviousPage: "\u0915\u094B\u0908 \u092A\u093F\u091B\u0932\u093E \u092A\u0943\u0937\u094D\u0920 \u0928\u0939\u0940\u0902",
647
+ noNextPage: "\u0915\u094B\u0908 \u0905\u0917\u0932\u093E \u092A\u0943\u0937\u094D\u0920 \u0928\u0939\u0940\u0902",
648
+ cookieConsent: "\u0915\u0941\u0915\u0940 \u0938\u0939\u092E\u0924\u093F",
649
+ cookieDescription: "\u0939\u092E \u0906\u092A\u0915\u0947 \u0905\u0928\u0941\u092D\u0935 \u0915\u094B \u092C\u0947\u0939\u0924\u0930 \u092C\u0928\u093E\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F \u0915\u0941\u0915\u0940\u091C\u093C \u0915\u093E \u0909\u092A\u092F\u094B\u0917 \u0915\u0930\u0924\u0947 \u0939\u0948\u0902\u0964",
650
+ cookieLearnMore: "\u0914\u0930 \u091C\u093E\u0928\u0947\u0902",
651
+ accept: "\u0938\u094D\u0935\u0940\u0915\u093E\u0930 \u0915\u0930\u0947\u0902",
652
+ decline: "\u0905\u0938\u094D\u0935\u0940\u0915\u093E\u0930 \u0915\u0930\u0947\u0902",
653
+ goToHomePage: "\u0939\u094B\u092E \u092A\u0947\u091C \u092A\u0930 \u091C\u093E\u090F\u0902",
654
+ home: "\u0939\u094B\u092E",
655
+ linkCopied: "\u0932\u093F\u0902\u0915 \u0915\u0949\u092A\u0940 \u0915\u093F\u092F\u093E \u0917\u092F\u093E!",
656
+ copyLinkToSection: "\u0905\u0928\u0941\u092D\u093E\u0917 \u0915\u0947 \u0932\u093F\u090F \u0932\u093F\u0902\u0915 \u0915\u0949\u092A\u0940 \u0915\u0930\u0947\u0902",
657
+ search: "\u0916\u094B\u091C\u0947\u0902",
658
+ searchPlaceholder: "\u0916\u094B\u091C\u0947\u0902",
659
+ closeBanner: "\u092C\u0948\u0928\u0930 \u092C\u0902\u0926 \u0915\u0930\u0947\u0902",
660
+ fallbackLocaleWarning: "\u092F\u0939 \u0938\u093E\u092E\u0917\u094D\u0930\u0940 {fallbackLocaleName} \u092E\u0947\u0902 \u0926\u093F\u0916\u093E\u0908 \u091C\u093E \u0930\u0939\u0940 \u0939\u0948 \u0915\u094D\u092F\u094B\u0902\u0915\u093F \u092F\u0939 {requestedLocaleName} \u092E\u0947\u0902 \u0909\u092A\u0932\u092C\u094D\u0927 \u0928\u0939\u0940\u0902 \u0939\u0948\u0964"
661
+ };
662
+ var translations = {
663
+ en,
664
+ fr,
665
+ de,
666
+ es,
667
+ ar,
668
+ zh,
669
+ ja,
670
+ ko,
671
+ pt,
672
+ it,
673
+ ru,
674
+ nl,
675
+ sv,
676
+ no,
677
+ da,
678
+ fi,
679
+ pl,
680
+ tr,
681
+ he,
682
+ hi
683
+ };
684
+ function getTranslations(locale = "en") {
685
+ return translations[locale] || translations.en;
686
+ }
687
+ function StickyBanner({
688
+ className,
689
+ children,
690
+ hideOnScroll = false,
691
+ locale = "en",
692
+ closeLabel
693
+ }) {
694
+ const [open, setOpen] = useState(true);
695
+ const { scrollY } = useScroll();
696
+ const translations2 = getTranslations(locale);
697
+ const ariaLabel = closeLabel || translations2.closeBanner;
698
+ useMotionValueEvent(scrollY, "change", (latest) => {
699
+ if (hideOnScroll && latest > 16) {
700
+ setOpen(false);
701
+ } else {
702
+ setOpen(true);
703
+ }
704
+ });
705
+ return /* @__PURE__ */ jsxs(
706
+ motion.div,
707
+ {
708
+ className: cn(
709
+ "sticky inset-x-0 top-0 z-40 flex min-h-12 w-full items-center justify-center bg-transparent px-4 py-1",
710
+ className
711
+ ),
712
+ initial: {
713
+ y: -100,
714
+ opacity: 0
715
+ },
716
+ animate: {
717
+ y: open ? 0 : -100,
718
+ opacity: open ? 1 : 0
719
+ },
720
+ transition: {
721
+ duration: 0.3,
722
+ ease: "easeInOut"
723
+ },
724
+ children: [
725
+ children,
726
+ /* @__PURE__ */ jsx(
727
+ motion.button,
728
+ {
729
+ initial: {
730
+ scale: 0
731
+ },
732
+ animate: {
733
+ scale: 1
734
+ },
735
+ className: "absolute top-1/2 right-2 -translate-y-1/2 cursor-pointer",
736
+ onClick: () => setOpen(!open),
737
+ "aria-label": ariaLabel,
738
+ children: /* @__PURE__ */ jsx(CloseIcon, { className: "h-5 w-5 text-white", "aria-hidden": "true" })
739
+ }
740
+ )
741
+ ]
742
+ }
743
+ );
744
+ }
745
+ var CloseIcon = (props) => {
746
+ return /* @__PURE__ */ jsxs(
747
+ "svg",
748
+ {
749
+ xmlns: "http://www.w3.org/2000/svg",
750
+ width: "24",
751
+ height: "24",
752
+ viewBox: "0 0 24 24",
753
+ fill: "none",
754
+ stroke: "currentColor",
755
+ strokeWidth: "2",
756
+ strokeLinecap: "round",
757
+ strokeLinejoin: "round",
758
+ ...props,
759
+ children: [
760
+ /* @__PURE__ */ jsx("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }),
761
+ /* @__PURE__ */ jsx("path", { d: "M18 6l-12 12" }),
762
+ /* @__PURE__ */ jsx("path", { d: "M6 6l12 12" })
763
+ ]
764
+ }
765
+ );
766
+ };
767
+ function Banner({ children, language = "en" }) {
768
+ return /* @__PURE__ */ jsx(
769
+ StickyBanner,
770
+ {
771
+ className: "bg-gradient-to-b from-blue-500 to-blue-600 text-center py-2 lg:py-0",
772
+ hideOnScroll: true,
773
+ locale: language,
774
+ children: /* @__PURE__ */ jsx("p", { className: "mx-0 max-w-[90%] text-white drop-shadow-md", children })
775
+ }
776
+ );
777
+ }
778
+ function Logo({ className = "", language = "en", title = "" }) {
779
+ const translations2 = getTranslations(language);
780
+ return /* @__PURE__ */ jsx(
781
+ Link3,
782
+ {
783
+ href: `/${language}`,
784
+ className: ` font-bold hidden lg:flex text-lg hover:opacity-80 transition-opacity ${className}`,
785
+ "aria-label": translations2.goToHomePage,
786
+ children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
787
+ /* @__PURE__ */ jsx(Image, { src: "/logo.png", alt: `${title} logo`, width: 20, height: 20 }),
788
+ /* @__PURE__ */ jsx(
789
+ "span",
790
+ {
791
+ className: "items-center hidden xl:flex select-none text-md font-bold",
792
+ title: `${title} logo`,
793
+ children: title
794
+ }
795
+ )
796
+ ] })
797
+ }
798
+ );
799
+ }
800
+ function TopCategories({ categories, className = "" }) {
801
+ if (categories.length === 0) {
802
+ return null;
803
+ }
804
+ return /* @__PURE__ */ jsx(
805
+ "nav",
806
+ {
807
+ className: `hidden md:flex items-center space-x-6 mr-2 ${className}`,
808
+ "aria-label": "Top navigation categories",
809
+ children: categories.map((category) => /* @__PURE__ */ jsx(
810
+ Link3,
811
+ {
812
+ href: category.path,
813
+ className: "text-sm text-gray-700 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white transition-colors",
814
+ children: category.title
815
+ },
816
+ category.path
817
+ ))
818
+ }
819
+ );
820
+ }
821
+ function MobileTopCategories({ categories, className = "" }) {
822
+ const [isOpen, setIsOpen] = React6__default.useState(false);
823
+ if (categories.length === 0) {
824
+ return null;
825
+ }
826
+ return /* @__PURE__ */ jsxs("div", { className: `md:hidden ${className}`, children: [
827
+ /* @__PURE__ */ jsxs(
828
+ "button",
829
+ {
830
+ onClick: () => setIsOpen(!isOpen),
831
+ className: "flex items-center space-x-1 px-3 py-2 text-sm font-medium text-gray-700 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white transition-colors",
832
+ "aria-label": "Toggle navigation menu",
833
+ "aria-expanded": isOpen,
834
+ children: [
835
+ /* @__PURE__ */ jsx("span", { children: "Menu" }),
836
+ /* @__PURE__ */ jsx(
837
+ "svg",
838
+ {
839
+ className: `h-4 w-4 transition-transform ${isOpen ? "rotate-180" : ""}`,
840
+ fill: "none",
841
+ stroke: "currentColor",
842
+ viewBox: "0 0 24 24",
843
+ children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" })
844
+ }
845
+ )
846
+ ]
847
+ }
848
+ ),
849
+ isOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
850
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-10", onClick: () => setIsOpen(false) }),
851
+ /* @__PURE__ */ jsx("div", { className: "absolute top-full left-0 mt-1 w-48 bg-white dark:bg-gray-800 rounded-md shadow-lg ring-1 ring-black ring-opacity-5 z-20", children: /* @__PURE__ */ jsx("div", { className: "py-1", role: "menu", children: categories.map((category) => /* @__PURE__ */ jsx(
852
+ Link3,
853
+ {
854
+ href: category.path,
855
+ className: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-700 transition-colors",
856
+ role: "menuitem",
857
+ onClick: () => setIsOpen(false),
858
+ children: category.title
859
+ },
860
+ category.path
861
+ )) }) })
862
+ ] })
863
+ ] });
864
+ }
865
+ function Input({ className, type, ...props }) {
866
+ return /* @__PURE__ */ jsx(
867
+ "input",
868
+ {
869
+ type,
870
+ "data-slot": "input",
871
+ className: cn(
872
+ "file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
873
+ "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
874
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
875
+ className
876
+ ),
877
+ ...props
878
+ }
879
+ );
880
+ }
881
+ var INPUTS = /* @__PURE__ */ new Set(["INPUT", "SELECT", "BUTTON", "TEXTAREA"]);
882
+ function SearchBar({ language = "en", className }) {
883
+ const router = useRouter();
884
+ usePathname();
885
+ const translations2 = getTranslations(language);
886
+ const [query, setQuery] = useState("");
887
+ const [results, setResults] = useState([]);
888
+ const [isLoading, setIsLoading] = useState(false);
889
+ const [isOpen, setIsOpen] = useState(false);
890
+ const [isMac, setIsMac] = useState(false);
891
+ const [selectedIndex, setSelectedIndex] = useState(-1);
892
+ const inputRef = useRef(null);
893
+ const containerRef = useRef(null);
894
+ const resultsRef = useRef(null);
895
+ useEffect(() => {
896
+ setIsMac(typeof navigator !== "undefined" && navigator.userAgent.includes("Mac"));
897
+ }, []);
898
+ useEffect(() => {
899
+ if (!query.trim()) {
900
+ setResults([]);
901
+ setIsLoading(false);
902
+ return;
903
+ }
904
+ setIsLoading(true);
905
+ const timeoutId = setTimeout(async () => {
906
+ try {
907
+ const searchParams = new URLSearchParams({
908
+ q: query,
909
+ lang: language || "en"
910
+ });
911
+ const response = await fetch(`/api/search?${searchParams.toString()}`);
912
+ if (!response.ok) {
913
+ throw new Error("Search request failed");
914
+ }
915
+ const data = await response.json();
916
+ setResults(data.results || []);
917
+ setIsLoading(false);
918
+ setSelectedIndex(-1);
919
+ } catch (error) {
920
+ console.error("Search error:", error);
921
+ setResults([]);
922
+ setIsLoading(false);
923
+ }
924
+ }, 200);
925
+ return () => clearTimeout(timeoutId);
926
+ }, [query, language]);
927
+ useEffect(() => {
928
+ const handleKeyDown = (event) => {
929
+ const el = document.activeElement;
930
+ if (!el || INPUTS.has(el.tagName) || el.isContentEditable) {
931
+ return;
932
+ }
933
+ if (event.key === "/" && !event.shiftKey) {
934
+ event.preventDefault();
935
+ inputRef.current?.focus({ preventScroll: true });
936
+ setIsOpen(true);
937
+ }
938
+ if (event.key === "k" && !event.shiftKey && (isMac ? event.metaKey : event.ctrlKey)) {
939
+ event.preventDefault();
940
+ inputRef.current?.focus({ preventScroll: true });
941
+ setIsOpen(true);
942
+ }
943
+ };
944
+ window.addEventListener("keydown", handleKeyDown);
945
+ return () => {
946
+ window.removeEventListener("keydown", handleKeyDown);
947
+ };
948
+ }, [isMac]);
949
+ useEffect(() => {
950
+ if (!isOpen || results.length === 0) return;
951
+ const handleKeyDown = (event) => {
952
+ if (event.key === "ArrowDown") {
953
+ event.preventDefault();
954
+ setSelectedIndex((prev) => prev < results.length - 1 ? prev + 1 : prev);
955
+ } else if (event.key === "ArrowUp") {
956
+ event.preventDefault();
957
+ setSelectedIndex((prev) => prev > 0 ? prev - 1 : -1);
958
+ } else if (event.key === "Enter" && selectedIndex >= 0) {
959
+ event.preventDefault();
960
+ handleSelectResult(results[selectedIndex]);
961
+ } else if (event.key === "Escape") {
962
+ event.preventDefault();
963
+ setIsOpen(false);
964
+ inputRef.current?.blur();
965
+ }
966
+ };
967
+ window.addEventListener("keydown", handleKeyDown);
968
+ return () => {
969
+ window.removeEventListener("keydown", handleKeyDown);
970
+ };
971
+ }, [isOpen, results, selectedIndex]);
972
+ useEffect(() => {
973
+ const handleClickOutside = (event) => {
974
+ if (containerRef.current && !containerRef.current.contains(event.target)) {
975
+ setIsOpen(false);
976
+ }
977
+ };
978
+ document.addEventListener("mousedown", handleClickOutside);
979
+ return () => {
980
+ document.removeEventListener("mousedown", handleClickOutside);
981
+ };
982
+ }, []);
983
+ useEffect(() => {
984
+ if (selectedIndex >= 0 && resultsRef.current) {
985
+ const selectedElement = resultsRef.current.children[selectedIndex];
986
+ if (selectedElement) {
987
+ selectedElement.scrollIntoView({ block: "nearest", behavior: "smooth" });
988
+ }
989
+ }
990
+ }, [selectedIndex]);
991
+ const handleSelectResult = useCallback(
992
+ (result) => {
993
+ const url = `/${result.language}/docs/${result.path}`;
994
+ setIsOpen(false);
995
+ setQuery("");
996
+ setResults([]);
997
+ inputRef.current?.blur();
998
+ router.push(url);
999
+ },
1000
+ [router]
1001
+ );
1002
+ const handleClear = useCallback(() => {
1003
+ setQuery("");
1004
+ setResults([]);
1005
+ inputRef.current?.focus();
1006
+ }, []);
1007
+ const handleFocus = useCallback(() => {
1008
+ setIsOpen(true);
1009
+ }, []);
1010
+ const handleBlur = useCallback(() => {
1011
+ setTimeout(() => {
1012
+ setIsOpen(false);
1013
+ }, 200);
1014
+ }, []);
1015
+ const showResults = isOpen && (query.trim().length > 0 || results.length > 0);
1016
+ return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), ref: containerRef, children: [
1017
+ /* @__PURE__ */ jsxs("div", { className: "relative", children: [
1018
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none", children: isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 text-muted-foreground animate-spin", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(Search, { className: "h-4 w-4 text-muted-foreground", "aria-hidden": "true" }) }),
1019
+ /* @__PURE__ */ jsx(
1020
+ Input,
1021
+ {
1022
+ ref: inputRef,
1023
+ type: "text",
1024
+ spellCheck: false,
1025
+ autoComplete: "off",
1026
+ className: "pl-10 pr-20 min-w-[200px] max-w-[300px]",
1027
+ placeholder: translations2.searchPlaceholder,
1028
+ "aria-label": translations2.search,
1029
+ value: query,
1030
+ onChange: (e) => {
1031
+ setQuery(e.target.value);
1032
+ setIsOpen(true);
1033
+ },
1034
+ onFocus: handleFocus,
1035
+ onBlur: handleBlur
1036
+ }
1037
+ ),
1038
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-y-0 right-0 pr-3 flex items-center justify-center w-12", children: query ? /* @__PURE__ */ jsx(
1039
+ "button",
1040
+ {
1041
+ type: "button",
1042
+ onClick: handleClear,
1043
+ className: "flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors",
1044
+ "aria-label": "Clear search",
1045
+ children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
1046
+ }
1047
+ ) : /* @__PURE__ */ jsx("div", { className: "pointer-events-none flex items-center justify-center", children: /* @__PURE__ */ jsxs("kbd", { className: "hidden md:inline-flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100", children: [
1048
+ isMac ? "\u2318" : "Ctrl",
1049
+ "+K"
1050
+ ] }) }) })
1051
+ ] }),
1052
+ showResults && /* @__PURE__ */ jsx(
1053
+ "div",
1054
+ {
1055
+ className: "absolute top-full left-0 mt-2 w-full max-w-[500px] max-h-[400px] overflow-y-auto overflow-x-hidden bg-popover border rounded-md shadow-lg z-50",
1056
+ ref: resultsRef,
1057
+ children: isLoading ? /* @__PURE__ */ jsxs("div", { className: "p-4 text-center text-sm text-muted-foreground", children: [
1058
+ translations2.search,
1059
+ "..."
1060
+ ] }) : results.length === 0 ? /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "No results found" }) : /* @__PURE__ */ jsx("div", { className: "p-1", children: results.map((result, index) => /* @__PURE__ */ jsxs(
1061
+ "button",
1062
+ {
1063
+ type: "button",
1064
+ onClick: () => handleSelectResult(result),
1065
+ className: cn(
1066
+ "w-full text-left px-3 py-2 rounded-sm hover:bg-accent hover:text-accent-foreground transition-colors",
1067
+ selectedIndex === index && "bg-accent text-accent-foreground"
1068
+ ),
1069
+ children: [
1070
+ /* @__PURE__ */ jsx("div", { className: "font-medium text-sm", children: result.title }),
1071
+ result.description && /* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground mt-1 line-clamp-2", children: result.description })
1072
+ ]
1073
+ },
1074
+ `${result.language}-${result.path}`
1075
+ )) })
1076
+ }
1077
+ )
1078
+ ] });
1079
+ }
1080
+ function ThemeSwitcher() {
1081
+ const { resolvedTheme, setTheme } = useTheme();
1082
+ const otherTheme = resolvedTheme === "dark" ? "light" : "dark";
1083
+ const [mounted, setMounted] = React6__default.useState(false);
1084
+ React6__default.useEffect(() => {
1085
+ setMounted(true);
1086
+ }, []);
1087
+ return /* @__PURE__ */ jsxs(
1088
+ "button",
1089
+ {
1090
+ type: "button",
1091
+ className: "flex h-9 w-9 items-center rounded-full justify-center transition-colors",
1092
+ "aria-label": mounted ? `Switch to ${otherTheme} theme` : "Toggle theme",
1093
+ onClick: () => setTheme(otherTheme),
1094
+ children: [
1095
+ /* @__PURE__ */ jsx(SunIcon, { className: "h-6 w-6 stroke-current dark:hidden" }),
1096
+ /* @__PURE__ */ jsx(MoonIcon, { className: "hidden h-6 w-6 stroke-current dark:block" })
1097
+ ]
1098
+ }
1099
+ );
1100
+ }
1101
+ function SunIcon(props) {
1102
+ return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", ...props, children: [
1103
+ /* @__PURE__ */ jsx("path", { d: "M12.5 10a2.5 2.5 0 1 1-5 0 2.5 2.5 0 0 1 5 0Z" }),
1104
+ /* @__PURE__ */ jsx(
1105
+ "path",
1106
+ {
1107
+ strokeLinecap: "round",
1108
+ d: "M10 5.5v-1M13.182 6.818l.707-.707M14.5 10h1M13.182 13.182l.707.707M10 15.5v-1M6.11 13.889l.708-.707M4.5 10h1M6.11 6.111l.708.707"
1109
+ }
1110
+ )
1111
+ ] });
1112
+ }
1113
+ function MoonIcon(props) {
1114
+ return /* @__PURE__ */ jsx("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", ...props, children: /* @__PURE__ */ jsx("path", { d: "M15.224 11.724a5.5 5.5 0 0 1-6.949-6.949 5.5 5.5 0 1 0 6.949 6.949Z" }) });
1115
+ }
1116
+ var buttonVariants = cva(
1117
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
1118
+ {
1119
+ variants: {
1120
+ variant: {
1121
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
1122
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1123
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
1124
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
1125
+ ghost: "hover:bg-accent hover:text-accent-foreground",
1126
+ link: "text-primary underline-offset-4 hover:underline"
1127
+ },
1128
+ size: {
1129
+ default: "h-10 px-4 py-2",
1130
+ sm: "h-9 rounded-md px-3",
1131
+ lg: "h-11 rounded-md px-8",
1132
+ icon: "h-10 w-10"
1133
+ }
1134
+ },
1135
+ defaultVariants: {
1136
+ variant: "default",
1137
+ size: "default"
1138
+ }
1139
+ }
1140
+ );
1141
+ var Button = React6.forwardRef(
1142
+ ({ className, variant, size, asChild = false, ...props }, ref) => {
1143
+ const Comp = asChild ? Slot : "button";
1144
+ return /* @__PURE__ */ jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref, ...props });
1145
+ }
1146
+ );
1147
+ Button.displayName = "Button";
1148
+ function DropdownMenu({ ...props }) {
1149
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
1150
+ }
1151
+ function DropdownMenuPortal({
1152
+ ...props
1153
+ }) {
1154
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
1155
+ }
1156
+ function DropdownMenuTrigger({
1157
+ ...props
1158
+ }) {
1159
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
1160
+ }
1161
+ function DropdownMenuContent({
1162
+ className,
1163
+ sideOffset = 4,
1164
+ ...props
1165
+ }) {
1166
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
1167
+ DropdownMenuPrimitive.Content,
1168
+ {
1169
+ "data-slot": "dropdown-menu-content",
1170
+ sideOffset,
1171
+ className: cn(
1172
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",
1173
+ className
1174
+ ),
1175
+ ...props
1176
+ }
1177
+ ) });
1178
+ }
1179
+ function DropdownMenuGroup({ ...props }) {
1180
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
1181
+ }
1182
+ function DropdownMenuItem({
1183
+ className,
1184
+ inset,
1185
+ variant = "default",
1186
+ ...props
1187
+ }) {
1188
+ return /* @__PURE__ */ jsx(
1189
+ DropdownMenuPrimitive.Item,
1190
+ {
1191
+ "data-slot": "dropdown-menu-item",
1192
+ "data-inset": inset,
1193
+ "data-variant": variant,
1194
+ className: cn(
1195
+ "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive! [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1196
+ className
1197
+ ),
1198
+ ...props
1199
+ }
1200
+ );
1201
+ }
1202
+ function DropdownMenuCheckboxItem({
1203
+ className,
1204
+ children,
1205
+ checked,
1206
+ ...props
1207
+ }) {
1208
+ return /* @__PURE__ */ jsxs(
1209
+ DropdownMenuPrimitive.CheckboxItem,
1210
+ {
1211
+ "data-slot": "dropdown-menu-checkbox-item",
1212
+ className: cn(
1213
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1214
+ className
1215
+ ),
1216
+ checked,
1217
+ ...props,
1218
+ children: [
1219
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
1220
+ children
1221
+ ]
1222
+ }
1223
+ );
1224
+ }
1225
+ function DropdownMenuRadioGroup({
1226
+ ...props
1227
+ }) {
1228
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
1229
+ }
1230
+ function DropdownMenuRadioItem({
1231
+ className,
1232
+ children,
1233
+ ...props
1234
+ }) {
1235
+ return /* @__PURE__ */ jsxs(
1236
+ DropdownMenuPrimitive.RadioItem,
1237
+ {
1238
+ "data-slot": "dropdown-menu-radio-item",
1239
+ className: cn(
1240
+ "focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1241
+ className
1242
+ ),
1243
+ ...props,
1244
+ children: [
1245
+ /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "size-2 fill-current" }) }) }),
1246
+ children
1247
+ ]
1248
+ }
1249
+ );
1250
+ }
1251
+ function DropdownMenuLabel({
1252
+ className,
1253
+ inset,
1254
+ ...props
1255
+ }) {
1256
+ return /* @__PURE__ */ jsx(
1257
+ DropdownMenuPrimitive.Label,
1258
+ {
1259
+ "data-slot": "dropdown-menu-label",
1260
+ "data-inset": inset,
1261
+ className: cn("px-2 py-1.5 text-sm font-medium data-inset:pl-8", className),
1262
+ ...props
1263
+ }
1264
+ );
1265
+ }
1266
+ function DropdownMenuSeparator({
1267
+ className,
1268
+ ...props
1269
+ }) {
1270
+ return /* @__PURE__ */ jsx(
1271
+ DropdownMenuPrimitive.Separator,
1272
+ {
1273
+ "data-slot": "dropdown-menu-separator",
1274
+ className: cn("bg-border -mx-1 my-1 h-px", className),
1275
+ ...props
1276
+ }
1277
+ );
1278
+ }
1279
+ function DropdownMenuShortcut({ className, ...props }) {
1280
+ return /* @__PURE__ */ jsx(
1281
+ "span",
1282
+ {
1283
+ "data-slot": "dropdown-menu-shortcut",
1284
+ className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
1285
+ ...props
1286
+ }
1287
+ );
1288
+ }
1289
+ function DropdownMenuSub({ ...props }) {
1290
+ return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
1291
+ }
1292
+ function DropdownMenuSubTrigger({
1293
+ className,
1294
+ inset,
1295
+ children,
1296
+ ...props
1297
+ }) {
1298
+ return /* @__PURE__ */ jsxs(
1299
+ DropdownMenuPrimitive.SubTrigger,
1300
+ {
1301
+ "data-slot": "dropdown-menu-sub-trigger",
1302
+ "data-inset": inset,
1303
+ className: cn(
1304
+ "focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8",
1305
+ className
1306
+ ),
1307
+ ...props,
1308
+ children: [
1309
+ children,
1310
+ /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto size-4" })
1311
+ ]
1312
+ }
1313
+ );
1314
+ }
1315
+ function DropdownMenuSubContent({
1316
+ className,
1317
+ ...props
1318
+ }) {
1319
+ return /* @__PURE__ */ jsx(
1320
+ DropdownMenuPrimitive.SubContent,
1321
+ {
1322
+ "data-slot": "dropdown-menu-sub-content",
1323
+ className: cn(
1324
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
1325
+ className
1326
+ ),
1327
+ ...props
1328
+ }
1329
+ );
1330
+ }
1331
+ function LanguageSwitcher({
1332
+ className = "",
1333
+ availableLocales: propLocales,
1334
+ localeConfigs
1335
+ }) {
1336
+ const { locale, availableLocales: hookLocales, changeLocale, isLoading } = useLocale();
1337
+ const availableLocales = propLocales && propLocales.length > 0 ? propLocales : hookLocales;
1338
+ if (isLoading) {
1339
+ return /* @__PURE__ */ jsx(
1340
+ Button,
1341
+ {
1342
+ variant: "ghost",
1343
+ size: "icon",
1344
+ className: `flex h-9 w-9 items-center rounded-full justify-center ${className}`,
1345
+ children: /* @__PURE__ */ jsx(LanguagesIcon, { className: "h-4 w-4", "data-testid": "globe-icon" })
1346
+ }
1347
+ );
1348
+ }
1349
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
1350
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
1351
+ Button,
1352
+ {
1353
+ variant: "ghost",
1354
+ size: "icon",
1355
+ className: "flex h-9 w-9 items-center rounded-full justify-center",
1356
+ "aria-label": "Select language",
1357
+ "aria-haspopup": "true",
1358
+ children: /* @__PURE__ */ jsx(LanguagesIcon, { className: "h-4 w-4", "data-testid": "globe-icon" })
1359
+ }
1360
+ ) }),
1361
+ /* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", className: "dark:bg-black", children: availableLocales.map((availableLocale) => {
1362
+ const localeConfig = localeConfigs?.find((config) => config.code === availableLocale);
1363
+ const nativeName = localeConfig?.nativeName || availableLocale.toUpperCase();
1364
+ const isActive = availableLocale === locale;
1365
+ return /* @__PURE__ */ jsx(
1366
+ DropdownMenuItem,
1367
+ {
1368
+ onClick: () => changeLocale(availableLocale),
1369
+ className: `${isActive ? "bg-accent text-accent-foreground" : ""}`,
1370
+ children: nativeName
1371
+ },
1372
+ availableLocale
1373
+ );
1374
+ }) })
1375
+ ] });
1376
+ }
1377
+ function Drawer({ ...props }) {
1378
+ return /* @__PURE__ */ jsx(Drawer$1.Root, { "data-slot": "drawer", ...props });
1379
+ }
1380
+ function DrawerTrigger({ ...props }) {
1381
+ return /* @__PURE__ */ jsx(Drawer$1.Trigger, { "data-slot": "drawer-trigger", ...props });
1382
+ }
1383
+ function DrawerPortal({ ...props }) {
1384
+ return /* @__PURE__ */ jsx(Drawer$1.Portal, { "data-slot": "drawer-portal", ...props });
1385
+ }
1386
+ function DrawerClose({ ...props }) {
1387
+ return /* @__PURE__ */ jsx(Drawer$1.Close, { "data-slot": "drawer-close", ...props });
1388
+ }
1389
+ function DrawerOverlay({
1390
+ className,
1391
+ ...props
1392
+ }) {
1393
+ return /* @__PURE__ */ jsx(
1394
+ Drawer$1.Overlay,
1395
+ {
1396
+ "data-slot": "drawer-overlay",
1397
+ className: cn(
1398
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1399
+ className
1400
+ ),
1401
+ ...props
1402
+ }
1403
+ );
1404
+ }
1405
+ function DrawerContent({
1406
+ className,
1407
+ children,
1408
+ ...props
1409
+ }) {
1410
+ return /* @__PURE__ */ jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
1411
+ /* @__PURE__ */ jsx(DrawerOverlay, {}),
1412
+ /* @__PURE__ */ jsxs(
1413
+ Drawer$1.Content,
1414
+ {
1415
+ "data-slot": "drawer-content",
1416
+ className: cn(
1417
+ "group/drawer-content bg-background fixed z-50 flex h-auto flex-col",
1418
+ "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b",
1419
+ "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t",
1420
+ "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm",
1421
+ "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",
1422
+ className
1423
+ ),
1424
+ ...props,
1425
+ children: [
1426
+ /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }),
1427
+ children
1428
+ ]
1429
+ }
1430
+ )
1431
+ ] });
1432
+ }
1433
+ function DrawerHeader({ className, ...props }) {
1434
+ return /* @__PURE__ */ jsx(
1435
+ "div",
1436
+ {
1437
+ "data-slot": "drawer-header",
1438
+ className: cn(
1439
+ "flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",
1440
+ className
1441
+ ),
1442
+ ...props
1443
+ }
1444
+ );
1445
+ }
1446
+ function DrawerFooter({ className, ...props }) {
1447
+ return /* @__PURE__ */ jsx(
1448
+ "div",
1449
+ {
1450
+ "data-slot": "drawer-footer",
1451
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
1452
+ ...props
1453
+ }
1454
+ );
1455
+ }
1456
+ function DrawerTitle({ className, ...props }) {
1457
+ return /* @__PURE__ */ jsx(
1458
+ Drawer$1.Title,
1459
+ {
1460
+ "data-slot": "drawer-title",
1461
+ className: cn("text-foreground font-semibold", className),
1462
+ ...props
1463
+ }
1464
+ );
1465
+ }
1466
+ function DrawerDescription({
1467
+ className,
1468
+ ...props
1469
+ }) {
1470
+ return /* @__PURE__ */ jsx(
1471
+ Drawer$1.Description,
1472
+ {
1473
+ "data-slot": "drawer-description",
1474
+ className: cn("text-muted-foreground text-sm", className),
1475
+ ...props
1476
+ }
1477
+ );
1478
+ }
1479
+ function Parent({ parent, currentPath, locale = "en" }) {
1480
+ const isActive = parent && currentPath && parent.websitePath === `/${currentPath}`;
1481
+ const translations2 = getTranslations(locale);
1482
+ return /* @__PURE__ */ jsx(
1483
+ "div",
1484
+ {
1485
+ className: `flex flex-row items-center gap-2 text-wrap rounded-lg border shadow-sm p-4 truncate
1486
+ ${isActive ? "dark:border-blue-400 border-blue-600 bg-blue-50 dark:bg-blue-900/20" : "bg-gradient-to-b from-muted/10 to-muted/50 border-border"}`,
1487
+ children: /* @__PURE__ */ jsx("p", { className: "font-medium text-lg", children: parent?.title || translations2.home })
1488
+ }
1489
+ );
1490
+ }
1491
+ function LevelElevator({ currentLevel, className }) {
1492
+ return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col items-center py-2", className), children: /* @__PURE__ */ jsx("div", { className: "relative w-8 h-8 overflow-hidden bg-foreground rounded-md border border-foreground shadow-sm", children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center text-background text-sm font-bold", children: currentLevel }) }) });
1493
+ }
1494
+ function Toolbox({
1495
+ currentLevel,
1496
+ className,
1497
+ parent,
1498
+ grandparent,
1499
+ previousPage,
1500
+ nextPage,
1501
+ lang,
1502
+ path,
1503
+ translations: translations2 = {}
1504
+ }) {
1505
+ const defaultTranslations = getTranslations(lang);
1506
+ const {
1507
+ goToDocsHome = defaultTranslations.goToDocsHome,
1508
+ goBackTo = defaultTranslations.goBackTo,
1509
+ goToPreviousPage = defaultTranslations.goToPreviousPage,
1510
+ goToNextPage = defaultTranslations.goToNextPage,
1511
+ noPreviousPage = defaultTranslations.noPreviousPage,
1512
+ noNextPage = defaultTranslations.noNextPage
1513
+ } = translations2;
1514
+ return /* @__PURE__ */ jsxs(
1515
+ "div",
1516
+ {
1517
+ className: cn(
1518
+ "flex items-center justify-between rounded-lg border border-border bg-muted/50 shadow-sm px-4",
1519
+ className
1520
+ ),
1521
+ children: [
1522
+ /* @__PURE__ */ jsx(LevelElevator, { currentLevel }),
1523
+ /* @__PURE__ */ jsx("div", { className: "h-4 w-px bg-border" }),
1524
+ /* @__PURE__ */ jsx(
1525
+ Link3,
1526
+ {
1527
+ href: `/${lang}/docs`,
1528
+ className: "flex items-center justify-center h-7 w-7 rounded-md transition-all duration-200 text-muted-foreground hover:text-foreground hover:bg-background hover:scale-110",
1529
+ title: goToDocsHome,
1530
+ "aria-label": goToDocsHome,
1531
+ children: /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" })
1532
+ }
1533
+ ),
1534
+ /* @__PURE__ */ jsx("div", { className: "h-4 w-px bg-border" }),
1535
+ (() => {
1536
+ if (grandparent && grandparent.websitePath && parent && path === parent.websitePath?.replace(`/${lang}/docs/`, "")) {
1537
+ return /* @__PURE__ */ jsx(
1538
+ Link3,
1539
+ {
1540
+ href: grandparent.websitePath,
1541
+ className: "flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground hover:text-foreground hover:bg-background hover:scale-110 transition-all duration-200",
1542
+ title: `${goBackTo} ${grandparent.title}`,
1543
+ "aria-label": `${goBackTo} ${grandparent.title}`,
1544
+ children: /* @__PURE__ */ jsx(FolderUp, { className: "h-4 w-4" })
1545
+ }
1546
+ );
1547
+ } else if (parent && parent.websitePath && path !== parent.websitePath?.replace(`/${lang}/docs/`, "")) {
1548
+ return /* @__PURE__ */ jsx(
1549
+ Link3,
1550
+ {
1551
+ href: parent.websitePath,
1552
+ className: "flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground hover:text-foreground hover:bg-background hover:scale-110 transition-all duration-200",
1553
+ title: `${goBackTo} ${parent?.title}`,
1554
+ "aria-label": `${goBackTo} ${parent?.title}`,
1555
+ children: /* @__PURE__ */ jsx(FolderUp, { className: "h-4 w-4" })
1556
+ }
1557
+ );
1558
+ }
1559
+ return /* @__PURE__ */ jsx(
1560
+ Link3,
1561
+ {
1562
+ href: `/${lang}/docs`,
1563
+ className: "flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground hover:text-foreground hover:bg-background hover:scale-110 transition-all duration-200",
1564
+ title: goToDocsHome,
1565
+ "aria-label": goToDocsHome,
1566
+ children: /* @__PURE__ */ jsx(FolderUp, { className: "h-4 w-4" })
1567
+ }
1568
+ );
1569
+ })(),
1570
+ /* @__PURE__ */ jsx("div", { className: "h-4 w-px bg-border" }),
1571
+ previousPage ? /* @__PURE__ */ jsx(
1572
+ Link3,
1573
+ {
1574
+ href: previousPage.websitePath || "#",
1575
+ className: "flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground hover:text-foreground hover:bg-background hover:scale-110 transition-all duration-200",
1576
+ title: `${goToPreviousPage}: ${previousPage.title}`,
1577
+ "aria-label": `${goToPreviousPage}: ${previousPage.title}`,
1578
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
1579
+ }
1580
+ ) : /* @__PURE__ */ jsx(
1581
+ "div",
1582
+ {
1583
+ className: "flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground/30 cursor-not-allowed",
1584
+ title: noPreviousPage,
1585
+ "aria-label": noPreviousPage,
1586
+ children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
1587
+ }
1588
+ ),
1589
+ nextPage ? /* @__PURE__ */ jsx(
1590
+ Link3,
1591
+ {
1592
+ href: nextPage.websitePath || "#",
1593
+ className: "flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground hover:text-foreground hover:bg-background hover:scale-110 transition-all duration-200",
1594
+ title: `${goToNextPage}: ${nextPage.title}`,
1595
+ "aria-label": `${goToNextPage}: ${nextPage.title}`,
1596
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
1597
+ }
1598
+ ) : /* @__PURE__ */ jsx(
1599
+ "div",
1600
+ {
1601
+ className: "flex items-center justify-center h-7 w-7 rounded-md text-muted-foreground/30 cursor-not-allowed",
1602
+ title: noNextPage,
1603
+ "aria-label": noNextPage,
1604
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
1605
+ }
1606
+ )
1607
+ ]
1608
+ }
1609
+ );
1610
+ }
1611
+ var MOBILE_BREAKPOINT = 768;
1612
+ function useIsMobile() {
1613
+ const [isMobile, setIsMobile] = React6.useState(void 0);
1614
+ React6.useEffect(() => {
1615
+ const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
1616
+ const onChange = () => {
1617
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1618
+ };
1619
+ mql.addEventListener("change", onChange);
1620
+ setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
1621
+ return () => mql.removeEventListener("change", onChange);
1622
+ }, []);
1623
+ return !!isMobile;
1624
+ }
1625
+ function Separator2({
1626
+ className,
1627
+ orientation = "horizontal",
1628
+ decorative = true,
1629
+ ...props
1630
+ }) {
1631
+ return /* @__PURE__ */ jsx(
1632
+ SeparatorPrimitive.Root,
1633
+ {
1634
+ "data-slot": "separator",
1635
+ decorative,
1636
+ orientation,
1637
+ className: cn(
1638
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
1639
+ className
1640
+ ),
1641
+ ...props
1642
+ }
1643
+ );
1644
+ }
1645
+ function Sheet({ ...props }) {
1646
+ return /* @__PURE__ */ jsx(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
1647
+ }
1648
+ function SheetTrigger({ ...props }) {
1649
+ return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
1650
+ }
1651
+ function SheetClose({ ...props }) {
1652
+ return /* @__PURE__ */ jsx(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props });
1653
+ }
1654
+ function SheetPortal({ ...props }) {
1655
+ return /* @__PURE__ */ jsx(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
1656
+ }
1657
+ function SheetOverlay({
1658
+ className,
1659
+ ...props
1660
+ }) {
1661
+ return /* @__PURE__ */ jsx(
1662
+ SheetPrimitive.Overlay,
1663
+ {
1664
+ "data-slot": "sheet-overlay",
1665
+ className: cn(
1666
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
1667
+ className
1668
+ ),
1669
+ ...props
1670
+ }
1671
+ );
1672
+ }
1673
+ function SheetContent({
1674
+ className,
1675
+ children,
1676
+ side = "right",
1677
+ ...props
1678
+ }) {
1679
+ return /* @__PURE__ */ jsxs(SheetPortal, { children: [
1680
+ /* @__PURE__ */ jsx(SheetOverlay, {}),
1681
+ /* @__PURE__ */ jsxs(
1682
+ SheetPrimitive.Content,
1683
+ {
1684
+ "data-slot": "sheet-content",
1685
+ className: cn(
1686
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
1687
+ side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
1688
+ side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
1689
+ side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
1690
+ side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
1691
+ className
1692
+ ),
1693
+ ...props,
1694
+ children: [
1695
+ children,
1696
+ /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
1697
+ /* @__PURE__ */ jsx(XIcon, { className: "size-4" }),
1698
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
1699
+ ] })
1700
+ ]
1701
+ }
1702
+ )
1703
+ ] });
1704
+ }
1705
+ function SheetHeader({ className, ...props }) {
1706
+ return /* @__PURE__ */ jsx(
1707
+ "div",
1708
+ {
1709
+ "data-slot": "sheet-header",
1710
+ className: cn("flex flex-col gap-1.5 p-4", className),
1711
+ ...props
1712
+ }
1713
+ );
1714
+ }
1715
+ function SheetFooter({ className, ...props }) {
1716
+ return /* @__PURE__ */ jsx(
1717
+ "div",
1718
+ {
1719
+ "data-slot": "sheet-footer",
1720
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
1721
+ ...props
1722
+ }
1723
+ );
1724
+ }
1725
+ function SheetTitle({ className, ...props }) {
1726
+ return /* @__PURE__ */ jsx(
1727
+ SheetPrimitive.Title,
1728
+ {
1729
+ "data-slot": "sheet-title",
1730
+ className: cn("text-foreground font-semibold", className),
1731
+ ...props
1732
+ }
1733
+ );
1734
+ }
1735
+ function SheetDescription({
1736
+ className,
1737
+ ...props
1738
+ }) {
1739
+ return /* @__PURE__ */ jsx(
1740
+ SheetPrimitive.Description,
1741
+ {
1742
+ "data-slot": "sheet-description",
1743
+ className: cn("text-muted-foreground text-sm", className),
1744
+ ...props
1745
+ }
1746
+ );
1747
+ }
1748
+ function Skeleton({ className, ...props }) {
1749
+ return /* @__PURE__ */ jsx(
1750
+ "div",
1751
+ {
1752
+ "data-slot": "skeleton",
1753
+ className: cn("bg-accent animate-pulse", className),
1754
+ ...props
1755
+ }
1756
+ );
1757
+ }
1758
+ function TooltipProvider({
1759
+ delayDuration = 0,
1760
+ ...props
1761
+ }) {
1762
+ return /* @__PURE__ */ jsx(
1763
+ TooltipPrimitive.Provider,
1764
+ {
1765
+ "data-slot": "tooltip-provider",
1766
+ delayDuration,
1767
+ ...props
1768
+ }
1769
+ );
1770
+ }
1771
+ function Tooltip({ ...props }) {
1772
+ return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
1773
+ }
1774
+ function TooltipTrigger({ ...props }) {
1775
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
1776
+ }
1777
+ function TooltipContent({
1778
+ className,
1779
+ sideOffset = 0,
1780
+ children,
1781
+ ...props
1782
+ }) {
1783
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
1784
+ TooltipPrimitive.Content,
1785
+ {
1786
+ "data-slot": "tooltip-content",
1787
+ sideOffset,
1788
+ className: cn(
1789
+ "bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
1790
+ className
1791
+ ),
1792
+ ...props,
1793
+ children: [
1794
+ children,
1795
+ /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
1796
+ ]
1797
+ }
1798
+ ) });
1799
+ }
1800
+ var SIDEBAR_COOKIE_NAME = "sidebar_state";
1801
+ var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
1802
+ var SIDEBAR_WIDTH = "16rem";
1803
+ var SIDEBAR_WIDTH_MOBILE = "18rem";
1804
+ var SIDEBAR_WIDTH_ICON = "3rem";
1805
+ var SIDEBAR_KEYBOARD_SHORTCUT = "b";
1806
+ var SidebarContext = React6.createContext(null);
1807
+ function useSidebar() {
1808
+ const context = React6.useContext(SidebarContext);
1809
+ if (!context) {
1810
+ throw new Error("useSidebar must be used within a SidebarProvider.");
1811
+ }
1812
+ return context;
1813
+ }
1814
+ function SidebarProvider({
1815
+ defaultOpen = true,
1816
+ open: openProp,
1817
+ onOpenChange: setOpenProp,
1818
+ className,
1819
+ style,
1820
+ children,
1821
+ ...props
1822
+ }) {
1823
+ const isMobile = useIsMobile();
1824
+ const [openMobile, setOpenMobile] = React6.useState(false);
1825
+ const [_open, _setOpen] = React6.useState(defaultOpen);
1826
+ const open = openProp ?? _open;
1827
+ const setOpen = React6.useCallback(
1828
+ (value) => {
1829
+ const openState = typeof value === "function" ? value(open) : value;
1830
+ if (setOpenProp) {
1831
+ setOpenProp(openState);
1832
+ } else {
1833
+ _setOpen(openState);
1834
+ }
1835
+ document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
1836
+ },
1837
+ [setOpenProp, open]
1838
+ );
1839
+ const toggleSidebar = React6.useCallback(() => {
1840
+ return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
1841
+ }, [isMobile, setOpen, setOpenMobile]);
1842
+ React6.useEffect(() => {
1843
+ const handleKeyDown = (event) => {
1844
+ if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
1845
+ event.preventDefault();
1846
+ toggleSidebar();
1847
+ }
1848
+ };
1849
+ window.addEventListener("keydown", handleKeyDown);
1850
+ return () => window.removeEventListener("keydown", handleKeyDown);
1851
+ }, [toggleSidebar]);
1852
+ const state = open ? "expanded" : "collapsed";
1853
+ const contextValue = React6.useMemo(
1854
+ () => ({
1855
+ state,
1856
+ open,
1857
+ setOpen,
1858
+ isMobile,
1859
+ openMobile,
1860
+ setOpenMobile,
1861
+ toggleSidebar
1862
+ }),
1863
+ [state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
1864
+ );
1865
+ return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ jsx(
1866
+ "div",
1867
+ {
1868
+ "data-slot": "sidebar-wrapper",
1869
+ style: {
1870
+ "--sidebar-width": SIDEBAR_WIDTH,
1871
+ "--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
1872
+ ...style
1873
+ },
1874
+ className: cn(
1875
+ "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex w-full",
1876
+ className
1877
+ ),
1878
+ ...props,
1879
+ children
1880
+ }
1881
+ ) }) });
1882
+ }
1883
+ function Sidebar({
1884
+ side = "left",
1885
+ variant = "sidebar",
1886
+ collapsible = "offcanvas",
1887
+ className,
1888
+ children,
1889
+ ...props
1890
+ }) {
1891
+ const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
1892
+ if (collapsible === "none") {
1893
+ return /* @__PURE__ */ jsx(
1894
+ "div",
1895
+ {
1896
+ "data-slot": "sidebar",
1897
+ className: cn(
1898
+ "bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
1899
+ className
1900
+ ),
1901
+ ...props,
1902
+ children
1903
+ }
1904
+ );
1905
+ }
1906
+ if (isMobile) {
1907
+ return /* @__PURE__ */ jsx(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ jsxs(
1908
+ SheetContent,
1909
+ {
1910
+ "data-sidebar": "sidebar",
1911
+ "data-slot": "sidebar",
1912
+ "data-mobile": "true",
1913
+ className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
1914
+ style: {
1915
+ "--sidebar-width": SIDEBAR_WIDTH_MOBILE
1916
+ },
1917
+ side,
1918
+ children: [
1919
+ /* @__PURE__ */ jsxs(SheetHeader, { className: "sr-only", children: [
1920
+ /* @__PURE__ */ jsx(SheetTitle, { children: "Sidebar" }),
1921
+ /* @__PURE__ */ jsx(SheetDescription, { children: "Displays the mobile sidebar." })
1922
+ ] }),
1923
+ /* @__PURE__ */ jsx("div", { className: "flex h-full w-full flex-col", children })
1924
+ ]
1925
+ }
1926
+ ) });
1927
+ }
1928
+ return /* @__PURE__ */ jsxs(
1929
+ "div",
1930
+ {
1931
+ className: "group peer text-sidebar-foreground hidden md:block",
1932
+ "data-state": state,
1933
+ "data-collapsible": state === "collapsed" ? collapsible : "",
1934
+ "data-variant": variant,
1935
+ "data-side": side,
1936
+ "data-slot": "sidebar",
1937
+ children: [
1938
+ /* @__PURE__ */ jsx(
1939
+ "div",
1940
+ {
1941
+ "data-slot": "sidebar-gap",
1942
+ className: cn(
1943
+ "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
1944
+ "group-data-[collapsible=offcanvas]:w-0",
1945
+ "group-data-[side=right]:rotate-180",
1946
+ variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
1947
+ )
1948
+ }
1949
+ ),
1950
+ /* @__PURE__ */ jsx(
1951
+ "div",
1952
+ {
1953
+ "data-slot": "sidebar-container",
1954
+ className: cn(
1955
+ "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
1956
+ side === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
1957
+ // Adjust the padding for floating and inset variants.
1958
+ variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
1959
+ className
1960
+ ),
1961
+ ...props,
1962
+ children: /* @__PURE__ */ jsx(
1963
+ "div",
1964
+ {
1965
+ "data-sidebar": "sidebar",
1966
+ "data-slot": "sidebar-inner",
1967
+ className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
1968
+ children
1969
+ }
1970
+ )
1971
+ }
1972
+ )
1973
+ ]
1974
+ }
1975
+ );
1976
+ }
1977
+ function SidebarTrigger({ className, onClick, ...props }) {
1978
+ const { toggleSidebar } = useSidebar();
1979
+ return /* @__PURE__ */ jsxs(
1980
+ Button,
1981
+ {
1982
+ "data-sidebar": "trigger",
1983
+ "data-slot": "sidebar-trigger",
1984
+ variant: "ghost",
1985
+ size: "icon",
1986
+ className: cn("size-7", className),
1987
+ onClick: (event) => {
1988
+ onClick?.(event);
1989
+ toggleSidebar();
1990
+ },
1991
+ ...props,
1992
+ children: [
1993
+ /* @__PURE__ */ jsx(PanelLeftIcon, {}),
1994
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
1995
+ ]
1996
+ }
1997
+ );
1998
+ }
1999
+ function SidebarRail({ className, ...props }) {
2000
+ const { toggleSidebar } = useSidebar();
2001
+ return /* @__PURE__ */ jsx(
2002
+ "button",
2003
+ {
2004
+ "data-sidebar": "rail",
2005
+ "data-slot": "sidebar-rail",
2006
+ "aria-label": "Toggle Sidebar",
2007
+ tabIndex: -1,
2008
+ onClick: toggleSidebar,
2009
+ title: "Toggle Sidebar",
2010
+ className: cn(
2011
+ "hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
2012
+ "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
2013
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
2014
+ "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
2015
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
2016
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
2017
+ className
2018
+ ),
2019
+ ...props
2020
+ }
2021
+ );
2022
+ }
2023
+ function SidebarInset({ className, ...props }) {
2024
+ return /* @__PURE__ */ jsx(
2025
+ "main",
2026
+ {
2027
+ "data-slot": "sidebar-inset",
2028
+ className: cn(
2029
+ "bg-background relative flex w-full flex-1 flex-col",
2030
+ "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
2031
+ className
2032
+ ),
2033
+ ...props
2034
+ }
2035
+ );
2036
+ }
2037
+ function SidebarInput({ className, ...props }) {
2038
+ return /* @__PURE__ */ jsx(
2039
+ Input,
2040
+ {
2041
+ "data-slot": "sidebar-input",
2042
+ "data-sidebar": "input",
2043
+ className: cn("bg-background h-8 w-full shadow-none", className),
2044
+ ...props
2045
+ }
2046
+ );
2047
+ }
2048
+ function SidebarHeader({ className, ...props }) {
2049
+ return /* @__PURE__ */ jsx(
2050
+ "div",
2051
+ {
2052
+ "data-slot": "sidebar-header",
2053
+ "data-sidebar": "header",
2054
+ className: cn("flex flex-col gap-2 p-2", className),
2055
+ ...props
2056
+ }
2057
+ );
2058
+ }
2059
+ function SidebarFooter({ className, ...props }) {
2060
+ return /* @__PURE__ */ jsx(
2061
+ "div",
2062
+ {
2063
+ "data-slot": "sidebar-footer",
2064
+ "data-sidebar": "footer",
2065
+ className: cn("flex flex-col gap-2 p-2", className),
2066
+ ...props
2067
+ }
2068
+ );
2069
+ }
2070
+ function SidebarSeparator({ className, ...props }) {
2071
+ return /* @__PURE__ */ jsx(
2072
+ Separator2,
2073
+ {
2074
+ "data-slot": "sidebar-separator",
2075
+ "data-sidebar": "separator",
2076
+ className: cn("bg-sidebar-border mx-2 w-auto", className),
2077
+ ...props
2078
+ }
2079
+ );
2080
+ }
2081
+ function SidebarContent({ className, ...props }) {
2082
+ return /* @__PURE__ */ jsx(
2083
+ "div",
2084
+ {
2085
+ "data-slot": "sidebar-content",
2086
+ "data-sidebar": "content",
2087
+ className: cn(
2088
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
2089
+ className
2090
+ ),
2091
+ ...props
2092
+ }
2093
+ );
2094
+ }
2095
+ function SidebarGroup({ className, ...props }) {
2096
+ return /* @__PURE__ */ jsx(
2097
+ "div",
2098
+ {
2099
+ "data-slot": "sidebar-group",
2100
+ "data-sidebar": "group",
2101
+ className: cn("relative flex w-full min-w-0 flex-col p-2", className),
2102
+ ...props
2103
+ }
2104
+ );
2105
+ }
2106
+ function SidebarGroupLabel({
2107
+ className,
2108
+ asChild = false,
2109
+ ...props
2110
+ }) {
2111
+ const Comp = asChild ? Slot : "div";
2112
+ return /* @__PURE__ */ jsx(
2113
+ Comp,
2114
+ {
2115
+ "data-slot": "sidebar-group-label",
2116
+ "data-sidebar": "group-label",
2117
+ className: cn(
2118
+ "text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
2119
+ "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
2120
+ className
2121
+ ),
2122
+ ...props
2123
+ }
2124
+ );
2125
+ }
2126
+ function SidebarGroupAction({
2127
+ className,
2128
+ asChild = false,
2129
+ ...props
2130
+ }) {
2131
+ const Comp = asChild ? Slot : "button";
2132
+ return /* @__PURE__ */ jsx(
2133
+ Comp,
2134
+ {
2135
+ "data-slot": "sidebar-group-action",
2136
+ "data-sidebar": "group-action",
2137
+ className: cn(
2138
+ "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
2139
+ // Increases the hit area of the button on mobile.
2140
+ "after:absolute after:-inset-2 md:after:hidden",
2141
+ "group-data-[collapsible=icon]:hidden",
2142
+ className
2143
+ ),
2144
+ ...props
2145
+ }
2146
+ );
2147
+ }
2148
+ function SidebarGroupContent({ className, ...props }) {
2149
+ return /* @__PURE__ */ jsx(
2150
+ "div",
2151
+ {
2152
+ "data-slot": "sidebar-group-content",
2153
+ "data-sidebar": "group-content",
2154
+ className: cn("w-full text-sm", className),
2155
+ ...props
2156
+ }
2157
+ );
2158
+ }
2159
+ function SidebarMenu({ className, ...props }) {
2160
+ return /* @__PURE__ */ jsx(
2161
+ "ul",
2162
+ {
2163
+ "data-slot": "sidebar-menu",
2164
+ "data-sidebar": "menu",
2165
+ className: cn("flex w-full min-w-0 flex-col gap-1", className),
2166
+ ...props
2167
+ }
2168
+ );
2169
+ }
2170
+ function SidebarMenuItem({ className, ...props }) {
2171
+ return /* @__PURE__ */ jsx(
2172
+ "li",
2173
+ {
2174
+ "data-slot": "sidebar-menu-item",
2175
+ "data-sidebar": "menu-item",
2176
+ className: cn("group/menu-item relative", className),
2177
+ ...props
2178
+ }
2179
+ );
2180
+ }
2181
+ var sidebarMenuButtonVariants = cva(
2182
+ "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
2183
+ {
2184
+ variants: {
2185
+ variant: {
2186
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
2187
+ outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
2188
+ },
2189
+ size: {
2190
+ default: "h-8 text-sm",
2191
+ sm: "h-7 text-xs",
2192
+ lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
2193
+ }
2194
+ },
2195
+ defaultVariants: {
2196
+ variant: "default",
2197
+ size: "default"
2198
+ }
2199
+ }
2200
+ );
2201
+ function SidebarMenuButton({
2202
+ asChild = false,
2203
+ isActive = false,
2204
+ variant = "default",
2205
+ size = "default",
2206
+ tooltip,
2207
+ className,
2208
+ ...props
2209
+ }) {
2210
+ const Comp = asChild ? Slot : "button";
2211
+ const { isMobile, state } = useSidebar();
2212
+ const button = /* @__PURE__ */ jsx(
2213
+ Comp,
2214
+ {
2215
+ "data-slot": "sidebar-menu-button",
2216
+ "data-sidebar": "menu-button",
2217
+ "data-size": size,
2218
+ "data-active": isActive,
2219
+ className: cn(sidebarMenuButtonVariants({ variant, size }), className),
2220
+ ...props
2221
+ }
2222
+ );
2223
+ if (!tooltip) {
2224
+ return button;
2225
+ }
2226
+ if (typeof tooltip === "string") {
2227
+ tooltip = {
2228
+ children: tooltip
2229
+ };
2230
+ }
2231
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
2232
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: button }),
2233
+ /* @__PURE__ */ jsx(
2234
+ TooltipContent,
2235
+ {
2236
+ side: "right",
2237
+ align: "center",
2238
+ hidden: state !== "collapsed" || isMobile,
2239
+ ...tooltip
2240
+ }
2241
+ )
2242
+ ] });
2243
+ }
2244
+ function SidebarMenuAction({
2245
+ className,
2246
+ asChild = false,
2247
+ showOnHover = false,
2248
+ ...props
2249
+ }) {
2250
+ const Comp = asChild ? Slot : "button";
2251
+ return /* @__PURE__ */ jsx(
2252
+ Comp,
2253
+ {
2254
+ "data-slot": "sidebar-menu-action",
2255
+ "data-sidebar": "menu-action",
2256
+ className: cn(
2257
+ "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
2258
+ // Increases the hit area of the button on mobile.
2259
+ "after:absolute after:-inset-2 md:after:hidden",
2260
+ "peer-data-[size=sm]/menu-button:top-1",
2261
+ "peer-data-[size=default]/menu-button:top-1.5",
2262
+ "peer-data-[size=lg]/menu-button:top-2.5",
2263
+ "group-data-[collapsible=icon]:hidden",
2264
+ showOnHover && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
2265
+ className
2266
+ ),
2267
+ ...props
2268
+ }
2269
+ );
2270
+ }
2271
+ function SidebarMenuBadge({ className, ...props }) {
2272
+ return /* @__PURE__ */ jsx(
2273
+ "div",
2274
+ {
2275
+ "data-slot": "sidebar-menu-badge",
2276
+ "data-sidebar": "menu-badge",
2277
+ className: cn(
2278
+ "text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
2279
+ "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
2280
+ "peer-data-[size=sm]/menu-button:top-1",
2281
+ "peer-data-[size=default]/menu-button:top-1.5",
2282
+ "peer-data-[size=lg]/menu-button:top-2.5",
2283
+ "group-data-[collapsible=icon]:hidden",
2284
+ className
2285
+ ),
2286
+ ...props
2287
+ }
2288
+ );
2289
+ }
2290
+ function SidebarMenuSkeleton({
2291
+ className,
2292
+ showIcon = false,
2293
+ ...props
2294
+ }) {
2295
+ const width = React6.useMemo(() => {
2296
+ return `${Math.floor(Math.random() * 40) + 50}%`;
2297
+ }, []);
2298
+ return /* @__PURE__ */ jsxs(
2299
+ "div",
2300
+ {
2301
+ "data-slot": "sidebar-menu-skeleton",
2302
+ "data-sidebar": "menu-skeleton",
2303
+ className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
2304
+ ...props,
2305
+ children: [
2306
+ showIcon && /* @__PURE__ */ jsx(Skeleton, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
2307
+ /* @__PURE__ */ jsx(
2308
+ Skeleton,
2309
+ {
2310
+ className: "h-4 max-w-(--skeleton-width) flex-1",
2311
+ "data-sidebar": "menu-skeleton-text",
2312
+ style: {
2313
+ "--skeleton-width": width
2314
+ }
2315
+ }
2316
+ )
2317
+ ]
2318
+ }
2319
+ );
2320
+ }
2321
+ function SidebarMenuSub({ className, ...props }) {
2322
+ return /* @__PURE__ */ jsx(
2323
+ "ul",
2324
+ {
2325
+ "data-slot": "sidebar-menu-sub",
2326
+ "data-sidebar": "menu-sub",
2327
+ className: cn(
2328
+ "border-sidebar-border ml-3 flex min-w-0 translate-x-px flex-col gap-1 border-l pl-3 py-0.5",
2329
+ "group-data-[collapsible=icon]:hidden",
2330
+ className
2331
+ ),
2332
+ ...props
2333
+ }
2334
+ );
2335
+ }
2336
+ function SidebarMenuSubItem({ className, ...props }) {
2337
+ return /* @__PURE__ */ jsx(
2338
+ "li",
2339
+ {
2340
+ "data-slot": "sidebar-menu-sub-item",
2341
+ "data-sidebar": "menu-sub-item",
2342
+ className: cn("group/menu-sub-item relative", className),
2343
+ ...props
2344
+ }
2345
+ );
2346
+ }
2347
+ function SidebarMenuSubButton({
2348
+ asChild = false,
2349
+ size = "md",
2350
+ isActive = false,
2351
+ className,
2352
+ ...props
2353
+ }) {
2354
+ const Comp = asChild ? Slot : "a";
2355
+ return /* @__PURE__ */ jsx(
2356
+ Comp,
2357
+ {
2358
+ "data-slot": "sidebar-menu-sub-button",
2359
+ "data-sidebar": "menu-sub-button",
2360
+ "data-size": size,
2361
+ "data-active": isActive,
2362
+ className: cn(
2363
+ "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
2364
+ "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
2365
+ size === "sm" && "text-xs",
2366
+ size === "md" && "text-sm",
2367
+ "group-data-[collapsible=icon]:hidden",
2368
+ className
2369
+ ),
2370
+ ...props
2371
+ }
2372
+ );
2373
+ }
2374
+ function Collapsible({ ...props }) {
2375
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
2376
+ }
2377
+ function CollapsibleTrigger2({
2378
+ ...props
2379
+ }) {
2380
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props });
2381
+ }
2382
+ function CollapsibleContent2({
2383
+ ...props
2384
+ }) {
2385
+ return /* @__PURE__ */ jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props });
2386
+ }
2387
+ function isActiveNode(node, currentPath) {
2388
+ if (!currentPath || !node.websitePath) return false;
2389
+ const nodePath = node.websitePath.replace(/\/$/, "");
2390
+ const normalizedCurrentPath = currentPath.replace(/\/$/, "");
2391
+ return nodePath === normalizedCurrentPath;
2392
+ }
2393
+ function hasActiveChild(node, currentPath) {
2394
+ if (!currentPath || !node.children) return false;
2395
+ return Object.values(node.children).some(
2396
+ (child) => isActiveNode(child, currentPath) || hasActiveChild(child, currentPath)
2397
+ );
2398
+ }
2399
+ function SidebarNavigation({
2400
+ nodes,
2401
+ currentPath,
2402
+ language = "en",
2403
+ translations: translations2 = {}
2404
+ }) {
2405
+ const { toggleFolder = "Toggle folder" } = translations2;
2406
+ return /* @__PURE__ */ jsx(SidebarProvider, { children: /* @__PURE__ */ jsx(SidebarContent, { className: "overflow-hidden p-1", children: nodes.map((node) => {
2407
+ if (!node.websitePath) return null;
2408
+ const isActive = isActiveNode(node, currentPath);
2409
+ const hasActiveChildNode = hasActiveChild(node, currentPath);
2410
+ return node.children && Object.keys(node.children).length > 0 ? /* @__PURE__ */ jsx(Collapsible, { className: "group/collapsible", children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsxs(SidebarMenuItem, { children: [
2411
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-nowrap items-center gap-2", children: [
2412
+ /* @__PURE__ */ jsxs(
2413
+ Link3,
2414
+ {
2415
+ href: node.websitePath,
2416
+ className: `flex flex-nowrap items-center gap-2 flex-auto p-2 rounded-md hover:bg-neutral-100 dark:hover:bg-neutral-900 ${isActive ? "bg-blue-50 dark:bg-blue-900/20 dark:border-blue-400 border-blue-600" : hasActiveChildNode ? "bg-blue-50/50 dark:bg-blue-900/10" : ""}`,
2417
+ children: [
2418
+ /* @__PURE__ */ jsxs("div", { className: "flex-none", children: [
2419
+ /* @__PURE__ */ jsx(FolderOpenIcon, { className: "h-4 w-4 group-data-[state=closed]/collapsible:hidden" }),
2420
+ /* @__PURE__ */ jsx(FolderClosedIcon, { className: "h-4 w-4 group-data-[state=open]/collapsible:hidden" })
2421
+ ] }),
2422
+ /* @__PURE__ */ jsx("span", { className: `flex-auto ${isActive ? "font-medium" : ""}`, children: node.title })
2423
+ ]
2424
+ }
2425
+ ),
2426
+ /* @__PURE__ */ jsxs(
2427
+ CollapsibleTrigger2,
2428
+ {
2429
+ className: "p-2 rounded-md hover:bg-neutral-100 dark:hover:bg-neutral-900 self-end",
2430
+ "aria-label": `${toggleFolder}: ${node.title}`,
2431
+ children: [
2432
+ /* @__PURE__ */ jsx(
2433
+ ChevronRight,
2434
+ {
2435
+ className: "h-4 w-4 group-data-[state=open]/collapsible:hidden",
2436
+ "aria-hidden": "true"
2437
+ }
2438
+ ),
2439
+ /* @__PURE__ */ jsx(
2440
+ ChevronDown,
2441
+ {
2442
+ className: "h-4 w-4 group-data-[state=closed]/collapsible:hidden",
2443
+ "aria-hidden": "true"
2444
+ }
2445
+ )
2446
+ ]
2447
+ }
2448
+ )
2449
+ ] }),
2450
+ /* @__PURE__ */ jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsx(SidebarMenuSub, { children: Object.entries(node.children || {}).map(([, child]) => {
2451
+ if (!child.websitePath) return null;
2452
+ const isChildActive = isActiveNode(child, currentPath);
2453
+ return /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(
2454
+ Link3,
2455
+ {
2456
+ href: child.websitePath,
2457
+ className: `flex items-center gap-2 p-2 rounded-md hover:bg-neutral-100 dark:hover:bg-neutral-900 ${isChildActive ? "bg-blue-50 dark:bg-blue-900/20 border dark:border-blue-400 border-blue-600 font-medium" : ""}`,
2458
+ children: [
2459
+ child.children && Object.keys(child.children).length > 0 ? /* @__PURE__ */ jsx(FolderClosedIcon, { className: "h-4 w-4 flex-none" }) : /* @__PURE__ */ jsx(FileTextIcon, { className: "h-4 w-4 flex-none" }),
2460
+ /* @__PURE__ */ jsx("span", { className: "", children: child.title })
2461
+ ]
2462
+ }
2463
+ ) }, child.websitePath);
2464
+ }) }) })
2465
+ ] }, node.websitePath) }, `menu-${node.websitePath}`) }, node.websitePath) : /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxs(
2466
+ Link3,
2467
+ {
2468
+ href: node.websitePath,
2469
+ className: `flex items-center gap-2 p-2 rounded-md hover:bg-neutral-100 dark:hover:bg-neutral-900 ${isActive ? "bg-blue-50 dark:bg-blue-900/20 dark:border-blue-400 border border-blue-600 font-medium" : ""}`,
2470
+ children: [
2471
+ /* @__PURE__ */ jsx(FileTextIcon, { className: "h-4 w-4 flex-none" }),
2472
+ /* @__PURE__ */ jsx("span", { className: "", children: node.title })
2473
+ ]
2474
+ }
2475
+ ) }, node.websitePath) }, `menu-${node.websitePath}`);
2476
+ }) }) });
2477
+ }
2478
+ function MobileMenu({ pageData, translations: translations2 = {} }) {
2479
+ if (!pageData) {
2480
+ return null;
2481
+ }
2482
+ const {
2483
+ openMobileMenu = "Open mobile menu",
2484
+ navigation = "Navigation",
2485
+ mobileMenuDescription = "Mobile navigation menu"
2486
+ } = translations2;
2487
+ const { sidebar, navigation: nav, computed } = pageData;
2488
+ return /* @__PURE__ */ jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ jsxs(Drawer, { direction: "right", children: [
2489
+ /* @__PURE__ */ jsx(DrawerTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "icon", className: "h-9 w-9", children: [
2490
+ /* @__PURE__ */ jsx(Menu, { className: "h-4 w-4" }),
2491
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: openMobileMenu })
2492
+ ] }) }),
2493
+ /* @__PURE__ */ jsxs(DrawerContent, { className: "h-full w-[85vw] sm:w-[400px]", children: [
2494
+ /* @__PURE__ */ jsxs(DrawerHeader, { className: "sr-only", children: [
2495
+ /* @__PURE__ */ jsx(DrawerTitle, { children: navigation }),
2496
+ /* @__PURE__ */ jsx(DrawerDescription, { children: mobileMenuDescription })
2497
+ ] }),
2498
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4 p-4 overflow-y-auto", children: [
2499
+ /* @__PURE__ */ jsx(
2500
+ Parent,
2501
+ {
2502
+ parent: sidebar.parent,
2503
+ currentPath: `${computed.lang}/docs/${computed.path}`
2504
+ }
2505
+ ),
2506
+ /* @__PURE__ */ jsx(
2507
+ Toolbox,
2508
+ {
2509
+ currentLevel: sidebar.currentLevel,
2510
+ parent: sidebar.parent,
2511
+ grandparent: sidebar.grandparent,
2512
+ previousPage: nav.previous,
2513
+ nextPage: nav.next,
2514
+ lang: computed.lang,
2515
+ path: computed.path
2516
+ }
2517
+ ),
2518
+ /* @__PURE__ */ jsx(
2519
+ SidebarNavigation,
2520
+ {
2521
+ nodes: sidebar.items,
2522
+ currentPath: `/${computed.lang}/docs/${computed.path}`,
2523
+ language: computed.lang
2524
+ }
2525
+ )
2526
+ ] })
2527
+ ] })
2528
+ ] }) });
2529
+ }
2530
+ function GithubStar({ repoUrl }) {
2531
+ const [isVisible, setIsVisible] = useState(false);
2532
+ useEffect(() => {
2533
+ const timer = setTimeout(() => {
2534
+ setIsVisible(true);
2535
+ }, 500);
2536
+ return () => clearTimeout(timer);
2537
+ }, []);
2538
+ if (!repoUrl) {
2539
+ return null;
2540
+ }
2541
+ return /* @__PURE__ */ jsxs("div", { className: "h-5 relative flex items-center", children: [
2542
+ !isVisible && /* @__PURE__ */ jsx(Skeleton, { className: "w-16 h-5 rounded-xs" }),
2543
+ /* @__PURE__ */ jsx(
2544
+ "div",
2545
+ {
2546
+ className: isVisible ? "opacity-100" : "opacity-0",
2547
+ style: {
2548
+ transition: "opacity 0.3s ease-in",
2549
+ pointerEvents: isVisible ? "auto" : "none",
2550
+ minHeight: "20px"
2551
+ // Prevent layout shift
2552
+ },
2553
+ children: /* @__PURE__ */ jsx(
2554
+ GitHubButton,
2555
+ {
2556
+ href: repoUrl,
2557
+ "data-color-scheme": "no-preference: dark-high-contrast; light: light; dark: dark-high-contrast;",
2558
+ "data-icon": "octicon-star",
2559
+ "data-show-count": "true",
2560
+ "aria-label": "Star on GitHub",
2561
+ children: "Star"
2562
+ }
2563
+ )
2564
+ }
2565
+ )
2566
+ ] });
2567
+ }
2568
+ function GithubLink({ language = "en", repoUrl }) {
2569
+ if (!repoUrl) {
2570
+ return null;
2571
+ }
2572
+ let url = repoUrl;
2573
+ if (language !== "en") {
2574
+ url = `${repoUrl}/tree/main/i18n/${language}`;
2575
+ }
2576
+ return /* @__PURE__ */ jsx(
2577
+ Link3,
2578
+ {
2579
+ href: url,
2580
+ className: buttonVariants({ variant: "ghost", size: "icon" }),
2581
+ target: "_blank",
2582
+ rel: "noopener noreferrer",
2583
+ "aria-label": "View source on GitHub",
2584
+ children: /* @__PURE__ */ jsx(GithubIcon, {})
2585
+ }
2586
+ );
2587
+ }
2588
+ function TOCItem({
2589
+ item,
2590
+ level = 0,
2591
+ path = ""
2592
+ }) {
2593
+ const uniquePath = path ? `${path}/${item.id}` : item.id;
2594
+ const handleClick = (e) => {
2595
+ e.preventDefault();
2596
+ const element = document.getElementById(item.id);
2597
+ if (element) {
2598
+ const navbar = document.querySelector("nav") || document.querySelector("[data-navbar]");
2599
+ const navbarHeight = navbar ? navbar.offsetHeight : 80;
2600
+ const elementPosition = element.offsetTop - navbarHeight - 20;
2601
+ window.scrollTo({
2602
+ top: elementPosition,
2603
+ behavior: "smooth"
2604
+ });
2605
+ }
2606
+ };
2607
+ return /* @__PURE__ */ jsxs("li", { className: cn("text-sm", level === 0 ? "font-medium" : "font-normal"), children: [
2608
+ /* @__PURE__ */ jsx(
2609
+ "a",
2610
+ {
2611
+ href: `#${item.id}`,
2612
+ className: cn(
2613
+ "text-neutral-700 hover:text-neutral-300 dark:text-neutral-300 block py-1",
2614
+ "hover:bg-neutral-100 dark:hover:bg-neutral-900 rounded px-2",
2615
+ ""
2616
+ ),
2617
+ onClick: handleClick,
2618
+ children: item.text
2619
+ }
2620
+ ),
2621
+ item.children && item.children.length > 0 && /* @__PURE__ */ jsx("ul", { className: cn("pl-4 space-y-1 mt-1", level === 0 ? "list-none" : "list-disc ml-4"), children: item.children.map((child) => /* @__PURE__ */ jsx(
2622
+ TOCItem,
2623
+ {
2624
+ item: child,
2625
+ level: level + 1,
2626
+ path: uniquePath
2627
+ },
2628
+ `${uniquePath}/${child.id}`
2629
+ )) })
2630
+ ] });
2631
+ }
2632
+ function TableOfContents({ toc, className, lang, translations: translations2 = {} }) {
2633
+ const defaultTranslations = getTranslations(lang);
2634
+ const { tableOfContents: tocLabel = defaultTranslations.tableOfContents } = translations2;
2635
+ if (!toc || toc.length === 0) {
2636
+ return null;
2637
+ }
2638
+ return /* @__PURE__ */ jsxs("div", { className, children: [
2639
+ /* @__PURE__ */ jsx("h3", { className: "font-medium text-sm mb-2", children: tocLabel }),
2640
+ /* @__PURE__ */ jsx("nav", { children: /* @__PURE__ */ jsx("ul", { className: "space-y-1 list-none", children: toc.map((item) => /* @__PURE__ */ jsx(TOCItem, { item }, item.id)) }) })
2641
+ ] });
2642
+ }
2643
+ function Avatar({ className, ...props }) {
2644
+ return /* @__PURE__ */ jsx(
2645
+ AvatarPrimitive.Root,
2646
+ {
2647
+ "data-slot": "avatar",
2648
+ className: cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className),
2649
+ ...props
2650
+ }
2651
+ );
2652
+ }
2653
+ function AvatarImage({ className, ...props }) {
2654
+ return /* @__PURE__ */ jsx(
2655
+ AvatarPrimitive.Image,
2656
+ {
2657
+ "data-slot": "avatar-image",
2658
+ className: cn("aspect-square size-full object-cover", className),
2659
+ ...props
2660
+ }
2661
+ );
2662
+ }
2663
+ function AvatarFallback({
2664
+ className,
2665
+ ...props
2666
+ }) {
2667
+ return /* @__PURE__ */ jsx(
2668
+ AvatarPrimitive.Fallback,
2669
+ {
2670
+ "data-slot": "avatar-fallback",
2671
+ className: cn("bg-muted flex size-full items-center justify-center rounded-full", className),
2672
+ ...props
2673
+ }
2674
+ );
2675
+ }
2676
+ function optimizeAvatarUrl(url) {
2677
+ if (url && url.includes("avatars.githubusercontent.com")) {
2678
+ if (!url.includes("&s=") && !url.includes("?s=")) {
2679
+ return `${url}&s=64`;
2680
+ }
2681
+ }
2682
+ return url;
2683
+ }
2684
+ function GithubContributors({
2685
+ contributors,
2686
+ githubPath,
2687
+ locale,
2688
+ translations: translations2 = {}
2689
+ }) {
2690
+ const defaultTranslations = getTranslations(locale);
2691
+ const { contributors: contributorsLabel = defaultTranslations.contributors } = translations2;
2692
+ if (contributors.length === 0) {
2693
+ return null;
2694
+ }
2695
+ return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
2696
+ /* @__PURE__ */ jsx("h3", { className: "font-medium text-sm mb-2", children: contributorsLabel }),
2697
+ /* @__PURE__ */ jsxs("div", { className: "isolate flex -space-x-2 overflow-hidden pl-1", children: [
2698
+ contributors.slice(0, 8).map((contributor, index) => /* @__PURE__ */ jsx(
2699
+ Link3,
2700
+ {
2701
+ href: contributor.url,
2702
+ target: "_blank",
2703
+ rel: "noopener noreferrer",
2704
+ className: `relative inline-block z-${90 - index * 10}`,
2705
+ children: /* @__PURE__ */ jsxs(Avatar, { className: "w-10 h-10", children: [
2706
+ /* @__PURE__ */ jsx(
2707
+ AvatarImage,
2708
+ {
2709
+ src: optimizeAvatarUrl(contributor.image),
2710
+ alt: contributor.username,
2711
+ className: "object-cover"
2712
+ }
2713
+ ),
2714
+ /* @__PURE__ */ jsx(AvatarFallback, { children: contributor.username[0] })
2715
+ ] })
2716
+ },
2717
+ contributor.username
2718
+ )),
2719
+ contributors.length > 8 && /* @__PURE__ */ jsx(
2720
+ Link3,
2721
+ {
2722
+ href: `https://github.com/${githubPath || ""}`,
2723
+ target: "_blank",
2724
+ rel: "noopener noreferrer",
2725
+ className: `relative inline-block z-0`,
2726
+ children: /* @__PURE__ */ jsxs(Avatar, { className: "w-10 h-10", children: [
2727
+ /* @__PURE__ */ jsx(AvatarImage, { color: "white" }),
2728
+ /* @__PURE__ */ jsx(AvatarFallback, { children: /* @__PURE__ */ jsxs("span", { className: "font-bold", children: [
2729
+ "+",
2730
+ contributors.length - 8
2731
+ ] }) })
2732
+ ] })
2733
+ },
2734
+ "8+"
2735
+ )
2736
+ ] })
2737
+ ] });
2738
+ }
2739
+ function Breadcrumb({ ...props }) {
2740
+ return /* @__PURE__ */ jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
2741
+ }
2742
+ function BreadcrumbList({ className, ...props }) {
2743
+ return /* @__PURE__ */ jsx(
2744
+ "ol",
2745
+ {
2746
+ "data-slot": "breadcrumb-list",
2747
+ className: cn(
2748
+ "text-muted-foreground flex items-center gap-1.5 text-sm sm:gap-2.5",
2749
+ className
2750
+ ),
2751
+ ...props
2752
+ }
2753
+ );
2754
+ }
2755
+ function BreadcrumbItem({ className, ...props }) {
2756
+ return /* @__PURE__ */ jsx(
2757
+ "li",
2758
+ {
2759
+ "data-slot": "breadcrumb-item",
2760
+ className: cn("inline-flex items-center gap-1.5", className),
2761
+ ...props
2762
+ }
2763
+ );
2764
+ }
2765
+ function BreadcrumbLink({
2766
+ asChild,
2767
+ className,
2768
+ ...props
2769
+ }) {
2770
+ const Comp = asChild ? Slot : "a";
2771
+ return /* @__PURE__ */ jsx(
2772
+ Comp,
2773
+ {
2774
+ "data-slot": "breadcrumb-link",
2775
+ className: cn("hover:text-foreground transition-colors", className),
2776
+ ...props
2777
+ }
2778
+ );
2779
+ }
2780
+ function BreadcrumbPage({ className, ...props }) {
2781
+ return /* @__PURE__ */ jsx(
2782
+ "span",
2783
+ {
2784
+ "data-slot": "breadcrumb-page",
2785
+ role: "link",
2786
+ "aria-disabled": "true",
2787
+ "aria-current": "page",
2788
+ className: cn("text-foreground font-normal", className),
2789
+ ...props
2790
+ }
2791
+ );
2792
+ }
2793
+ function BreadcrumbSeparator({ children, className, ...props }) {
2794
+ return /* @__PURE__ */ jsx(
2795
+ "li",
2796
+ {
2797
+ "data-slot": "breadcrumb-separator",
2798
+ role: "presentation",
2799
+ "aria-hidden": "true",
2800
+ className: cn("[&>svg]:size-3.5", className),
2801
+ ...props,
2802
+ children: children ?? /* @__PURE__ */ jsx(ChevronRight, {})
2803
+ }
2804
+ );
2805
+ }
2806
+ function BreadcrumbEllipsis({ className, ...props }) {
2807
+ return /* @__PURE__ */ jsxs(
2808
+ "span",
2809
+ {
2810
+ "data-slot": "breadcrumb-ellipsis",
2811
+ role: "presentation",
2812
+ "aria-hidden": "true",
2813
+ className: cn("flex size-9 items-center justify-center", className),
2814
+ ...props,
2815
+ children: [
2816
+ /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4" }),
2817
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
2818
+ ]
2819
+ }
2820
+ );
2821
+ }
2822
+ function useMediaQuery(query) {
2823
+ const [value, setValue] = React6.useState(false);
2824
+ React6.useEffect(() => {
2825
+ function onChange(event) {
2826
+ setValue(event.matches);
2827
+ }
2828
+ const result = matchMedia(query);
2829
+ result.addEventListener("change", onChange);
2830
+ setValue(result.matches);
2831
+ return () => result.removeEventListener("change", onChange);
2832
+ }, [query]);
2833
+ return value;
2834
+ }
2835
+ function BreadcrumbToggle({ overflowItems, className }) {
2836
+ const [open, setOpen] = React6.useState(false);
2837
+ const isDesktop = useMediaQuery("(min-width: 768px)");
2838
+ const handleOverflowItemClick = useCallback(() => {
2839
+ setOpen(false);
2840
+ }, []);
2841
+ if (overflowItems.length === 0) {
2842
+ return null;
2843
+ }
2844
+ return /* @__PURE__ */ jsx(BreadcrumbItem, { className, children: isDesktop ? /* @__PURE__ */ jsxs(DropdownMenu, { open, onOpenChange: setOpen, children: [
2845
+ /* @__PURE__ */ jsxs(
2846
+ DropdownMenuTrigger,
2847
+ {
2848
+ className: "flex items-center gap-1",
2849
+ "aria-label": "Show more breadcrumb items",
2850
+ children: [
2851
+ /* @__PURE__ */ jsx(BreadcrumbEllipsis, { className: "size-4" }),
2852
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle menu" })
2853
+ ]
2854
+ }
2855
+ ),
2856
+ /* @__PURE__ */ jsx(DropdownMenuContent, { align: "start", className: "bg-white dark:bg-black", children: overflowItems.map((item, index) => /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: handleOverflowItemClick, children: /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(
2857
+ Link3,
2858
+ {
2859
+ href: item.href || "#",
2860
+ className: "w-full",
2861
+ "aria-label": `Navigate to ${item.label}`,
2862
+ children: item.label
2863
+ }
2864
+ ) }) }, index)) })
2865
+ ] }) : /* @__PURE__ */ jsxs(Drawer, { open, onOpenChange: setOpen, children: [
2866
+ /* @__PURE__ */ jsx(DrawerTrigger, { "aria-label": "Show more breadcrumb items", children: /* @__PURE__ */ jsx(BreadcrumbEllipsis, { className: "h-4 w-4" }) }),
2867
+ /* @__PURE__ */ jsxs(DrawerContent, { children: [
2868
+ /* @__PURE__ */ jsx("div", { className: "grid gap-1 p-4 overflow-y-auto", children: overflowItems.map((item, index) => /* @__PURE__ */ jsx(
2869
+ Link3,
2870
+ {
2871
+ href: item.href || "#",
2872
+ className: "py-2 px-3 text-sm rounded-md hover:bg-muted transition-colors",
2873
+ onClick: handleOverflowItemClick,
2874
+ "aria-label": `Navigate to ${item.label}`,
2875
+ children: item.label
2876
+ },
2877
+ index
2878
+ )) }),
2879
+ /* @__PURE__ */ jsx(DrawerFooter, { className: "pt-4", children: /* @__PURE__ */ jsx(DrawerClose, { asChild: true, children: /* @__PURE__ */ jsx(Button, { variant: "outline", children: "Close" }) }) })
2880
+ ] })
2881
+ ] }) });
2882
+ }
2883
+ function Breadcrumbs({ data, isLoading = false, className, locale = "en" }) {
2884
+ const { navigation } = data;
2885
+ const breadcrumbs = navigation.breadcrumbs;
2886
+ const translations2 = getTranslations(locale);
2887
+ if (breadcrumbs.length === 1) {
2888
+ return null;
2889
+ }
2890
+ if (isLoading) {
2891
+ return /* @__PURE__ */ jsx(Breadcrumb, { className, id: "breadcrumbs", children: /* @__PURE__ */ jsxs(BreadcrumbList, { children: [
2892
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx("div", { className: "h-4 w-4 bg-muted animate-pulse rounded" }) }),
2893
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
2894
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx("div", { className: "h-4 w-20 bg-muted animate-pulse rounded" }) })
2895
+ ] }) });
2896
+ }
2897
+ const ITEMS_TO_DISPLAY = 3;
2898
+ const hasOverflow = breadcrumbs.length > ITEMS_TO_DISPLAY;
2899
+ const overflowItems = hasOverflow ? breadcrumbs.slice(1, -2) : [];
2900
+ const visibleItems = hasOverflow ? breadcrumbs.slice(-2) : breadcrumbs.slice(1);
2901
+ return /* @__PURE__ */ jsx(Breadcrumb, { className, id: "breadcrumbs", children: /* @__PURE__ */ jsxs(BreadcrumbList, { children: [
2902
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(Link3, { href: breadcrumbs[0]?.href || "#", "aria-label": translations2.goToHomePage, children: /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }) }) }) }),
2903
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {}),
2904
+ hasOverflow && /* @__PURE__ */ jsxs(Fragment, { children: [
2905
+ /* @__PURE__ */ jsx(BreadcrumbToggle, { overflowItems }),
2906
+ /* @__PURE__ */ jsx(BreadcrumbSeparator, {})
2907
+ ] }),
2908
+ visibleItems.map((item, index) => {
2909
+ const isLast = index === visibleItems.length - 1;
2910
+ return /* @__PURE__ */ jsxs(React6.Fragment, { children: [
2911
+ /* @__PURE__ */ jsx(BreadcrumbItem, { children: /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, className: !isLast ? "whitespace-nowrap" : "line-clamp-1", children: /* @__PURE__ */ jsx(Link3, { href: item.href || "#", "aria-label": `Navigate to ${item.label}`, children: item.label }) }) }),
2912
+ index < visibleItems.length - 1 && /* @__PURE__ */ jsx(BreadcrumbSeparator, {})
2913
+ ] }, index);
2914
+ })
2915
+ ] }) });
2916
+ }
2917
+ var Card = React6.forwardRef(
2918
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2919
+ "div",
2920
+ {
2921
+ ref,
2922
+ className: cn("rounded-lg border bg-card text-card-foreground shadow-sm", className),
2923
+ ...props
2924
+ }
2925
+ )
2926
+ );
2927
+ Card.displayName = "Card";
2928
+ var CardHeader = React6.forwardRef(
2929
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })
2930
+ );
2931
+ CardHeader.displayName = "CardHeader";
2932
+ var CardTitle = React6.forwardRef(
2933
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2934
+ "h3",
2935
+ {
2936
+ ref,
2937
+ className: cn("text-2xl font-semibold leading-none tracking-tight", className),
2938
+ ...props
2939
+ }
2940
+ )
2941
+ );
2942
+ CardTitle.displayName = "CardTitle";
2943
+ var CardDescription = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("text-sm text-muted-foreground", className), ...props }));
2944
+ CardDescription.displayName = "CardDescription";
2945
+ var CardContent = React6.forwardRef(
2946
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props })
2947
+ );
2948
+ CardContent.displayName = "CardContent";
2949
+ var CardFooter = React6.forwardRef(
2950
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex items-center p-6 pt-0", className), ...props })
2951
+ );
2952
+ CardFooter.displayName = "CardFooter";
2953
+ function FolderCards({ nodes }) {
2954
+ return /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: nodes.map((node) => /* @__PURE__ */ jsx(
2955
+ Card,
2956
+ {
2957
+ className: "hover:bg-accent transition-colors border relative group",
2958
+ children: /* @__PURE__ */ jsxs(Link3, { href: node.websitePath || "", className: "block h-full", children: [
2959
+ /* @__PURE__ */ jsx(CardHeader, { className: "pb-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-2", children: [
2960
+ /* @__PURE__ */ jsx(CardTitle, { className: "text-base font-medium leading-tight pr-6", children: node.title }),
2961
+ /* @__PURE__ */ jsx(ExternalLinkIcon, { className: "size-4 text-muted-foreground shrink-0 absolute top-4 right-4" })
2962
+ ] }) }),
2963
+ (() => {
2964
+ const description = node.frontmatter?.description;
2965
+ return description && typeof description === "string" ? /* @__PURE__ */ jsx(CardContent, { className: "pt-0", children: /* @__PURE__ */ jsx(CardDescription, { className: "text-sm text-muted-foreground", children: description }) }) : null;
2966
+ })()
2967
+ ] })
2968
+ },
2969
+ node.websitePath
2970
+ )) });
2971
+ }
2972
+ function MarkdownRenderer({ markdown, className = "" }) {
2973
+ return /* @__PURE__ */ jsx("article", { className: `prose prose-md max-w-none dark:prose-invert ${className}`, children: /* @__PURE__ */ jsx(
2974
+ ReactMarkdown,
2975
+ {
2976
+ remarkPlugins: [
2977
+ remarkLint,
2978
+ remarkGfm,
2979
+ remarkFrontmatter
2980
+ ],
2981
+ rehypePlugins: [
2982
+ rehypeSanitize,
2983
+ rehypeSlug,
2984
+ rehypeAutolinkHeadings,
2985
+ rehypeCallouts,
2986
+ rehypeExternalLinks,
2987
+ rehypeMathJax,
2988
+ rehypeHighlight
2989
+ ],
2990
+ components: {
2991
+ h1: () => null
2992
+ },
2993
+ children: markdown
2994
+ }
2995
+ ) });
2996
+ }
2997
+ function ChatGPTIcon({ className }) {
2998
+ return /* @__PURE__ */ jsx(
2999
+ "svg",
3000
+ {
3001
+ viewBox: "0 0 20 20",
3002
+ fill: "currentColor",
3003
+ xmlns: "http://www.w3.org/2000/svg",
3004
+ className,
3005
+ children: /* @__PURE__ */ jsx("path", { d: "M11.2475 18.25C10.6975 18.25 10.175 18.1455 9.67999 17.9365C9.18499 17.7275 8.74499 17.436 8.35999 17.062C7.94199 17.205 7.50749 17.2765 7.05649 17.2765C6.31949 17.2765 5.63749 17.095 5.01049 16.732C4.38349 16.369 3.87749 15.874 3.49249 15.247C3.11849 14.62 2.93149 13.9215 2.93149 13.1515C2.93149 12.8325 2.97549 12.486 3.06349 12.112C2.62349 11.705 2.28249 11.2375 2.04049 10.7095C1.79849 10.1705 1.67749 9.6095 1.67749 9.0265C1.67749 8.4325 1.80399 7.8605 2.05699 7.3105C2.30999 6.7605 2.66199 6.2875 3.11299 5.8915C3.57499 5.4845 4.10849 5.204 4.71349 5.05C4.83449 4.423 5.08749 3.862 5.47249 3.367C5.86849 2.861 6.35249 2.465 6.92449 2.179C7.49649 1.893 8.10699 1.75 8.75599 1.75C9.30599 1.75 9.82849 1.8545 10.3235 2.0635C10.8185 2.2725 11.2585 2.564 11.6435 2.938C12.0615 2.795 12.496 2.7235 12.947 2.7235C13.684 2.7235 14.366 2.905 14.993 3.268C15.62 3.631 16.1205 4.126 16.4945 4.753C16.8795 5.38 17.072 6.0785 17.072 6.8485C17.072 7.1675 17.028 7.514 16.94 7.888C17.38 8.295 17.721 8.768 17.963 9.307C18.205 9.835 18.326 10.3905 18.326 10.9735C18.326 11.5675 18.1995 12.1395 17.9465 12.6895C17.6935 13.2395 17.336 13.718 16.874 14.125C16.423 14.521 15.895 14.796 15.29 14.95C15.169 15.577 14.9105 16.138 14.5145 16.633C14.1295 17.139 13.651 17.535 13.079 17.821C12.507 18.107 11.8965 18.25 11.2475 18.25ZM7.17199 16.1875C7.72199 16.1875 8.20049 16.072 8.60749 15.841L11.7095 14.059C11.8195 13.982 11.8745 13.8775 11.8745 13.7455V12.3265L7.88149 14.62C7.63949 14.763 7.39749 14.763 7.15549 14.62L4.03699 12.8215C4.03699 12.8545 4.03149 12.893 4.02049 12.937C4.02049 12.981 4.02049 13.047 4.02049 13.135C4.02049 13.696 4.15249 14.213 4.41649 14.686C4.69149 15.148 5.07099 15.511 5.55499 15.775C6.03899 16.05 6.57799 16.1875 7.17199 16.1875ZM7.33699 13.498C7.40299 13.531 7.46349 13.5475 7.51849 13.5475C7.57349 13.5475 7.62849 13.531 7.68349 13.498L8.92099 12.7885L4.94449 10.4785C4.70249 10.3355 4.58149 10.121 4.58149 9.835V6.2545C4.03149 6.4965 3.59149 6.8705 3.26149 7.3765C2.93149 7.8715 2.76649 8.4215 2.76649 9.0265C2.76649 9.5655 2.90399 10.0825 3.17899 10.5775C3.45399 11.0725 3.81149 11.4465 4.25149 11.6995L7.33699 13.498ZM11.2475 17.161C11.8305 17.161 12.3585 17.029 12.8315 16.765C13.3045 16.501 13.6785 16.138 13.9535 15.676C14.2285 15.214 14.366 14.697 14.366 14.125V10.561C14.366 10.429 14.311 10.33 14.201 10.264L12.947 9.538V14.1415C12.947 14.4275 12.826 14.642 12.584 14.785L9.46549 16.5835C10.0045 16.9685 10.5985 17.161 11.2475 17.161ZM11.8745 11.122V8.878L10.01 7.822L8.12899 8.878V11.122L10.01 12.178L11.8745 11.122ZM7.05649 5.8585C7.05649 5.5725 7.17749 5.358 7.41949 5.215L10.538 3.4165C9.99899 3.0315 9.40499 2.839 8.75599 2.839C8.17299 2.839 7.64499 2.971 7.17199 3.235C6.69899 3.499 6.32499 3.862 6.04999 4.324C5.78599 4.786 5.65399 5.303 5.65399 5.875V9.4225C5.65399 9.5545 5.70899 9.659 5.81899 9.736L7.05649 10.462V5.8585ZM15.4385 13.7455C15.9885 13.5035 16.423 13.1295 16.742 12.6235C17.072 12.1175 17.237 11.5675 17.237 10.9735C17.237 10.4345 17.0995 9.9175 16.8245 9.4225C16.5495 8.9275 16.192 8.5535 15.752 8.3005L12.6665 6.5185C12.6005 6.4745 12.54 6.458 12.485 6.469C12.43 6.469 12.375 6.4855 12.32 6.5185L11.0825 7.2115L15.0755 9.538C15.1965 9.604 15.2845 9.692 15.3395 9.802C15.4055 9.901 15.4385 10.022 15.4385 10.165V13.7455ZM12.122 5.3635C12.364 5.2095 12.606 5.2095 12.848 5.3635L15.983 7.195C15.983 7.118 15.983 7.019 15.983 6.898C15.983 6.37 15.851 5.8695 15.587 5.3965C15.334 4.9125 14.9655 4.5275 14.4815 4.2415C14.0085 3.9555 13.4585 3.8125 12.8315 3.8125C12.2815 3.8125 11.803 3.928 11.396 4.159L8.29399 5.941C8.18399 6.018 8.12899 6.1225 8.12899 6.2545V7.6735L12.122 5.3635Z" })
3006
+ }
3007
+ );
3008
+ }
3009
+ function ClaudeIcon({ className }) {
3010
+ return /* @__PURE__ */ jsxs(
3011
+ "svg",
3012
+ {
3013
+ viewBox: "0 0 100 101",
3014
+ fill: "currentColor",
3015
+ xmlns: "http://www.w3.org/2000/svg",
3016
+ className,
3017
+ children: [
3018
+ /* @__PURE__ */ jsx("path", { d: "M96.0000 40.0000 L99.5002 42.0000 L99.5002 43.5000 L98.5000 47.0000 L56.0000 57.0000 L52.0040 47.0708 L96.0000 40.0000 M96.0000 40.0000 " }),
3019
+ /* @__PURE__ */ jsx("path", { d: "M80.1032 10.5903 L84.9968 11.6171 L86.2958 13.2179 L87.5346 17.0540 L87.0213 19.5007 L58.5000 58.5000 L49.0000 49.0000 L75.3008 14.4873 L80.1032 10.5903 M80.1032 10.5903 " }),
3020
+ /* @__PURE__ */ jsx("path", { d: "M55.5002 4.5000 L58.5005 2.5000 L61.0002 3.5000 L63.5002 7.0000 L56.6511 48.1620 L52.0005 45.0000 L50.0005 39.5000 L53.5003 8.5000 L55.5002 4.5000 M55.5002 4.5000 " }),
3021
+ /* @__PURE__ */ jsx("path", { d: "M23.4253 5.1588 L26.5075 1.2217 L28.5175 0.7632 L32.5063 1.3458 L34.4748 2.8868 L48.8202 34.6902 L54.0089 49.8008 L47.9378 53.1760 L24.8009 11.1886 L23.4253 5.1588 M23.4253 5.1588 " }),
3022
+ /* @__PURE__ */ jsx("path", { d: "M8.4990 27.0019 L7.4999 23.0001 L10.5003 19.5001 L14.0003 20.0001 L15.0003 20.0001 L36.0000 35.5000 L42.5000 40.5000 L51.5000 47.5000 L46.5000 56.0000 L42.0002 52.5000 L39.0001 49.5000 L10.0000 29.0001 L8.4990 27.0019 M8.4990 27.0019 " }),
3023
+ /* @__PURE__ */ jsx("path", { d: "M2.5003 53.0000 L0.2370 50.5000 L0.2373 48.2759 L2.5003 47.5000 L28.0000 49.0000 L53.0000 51.0000 L52.1885 55.9782 L4.5000 53.5000 L2.5003 53.0000 M2.5003 53.0000 " }),
3024
+ /* @__PURE__ */ jsx("path", { d: "M17.5002 79.0264 L12.5005 79.0264 L10.5124 76.7369 L10.5124 74.0000 L19.0005 68.0000 L53.5082 46.0337 L57.0005 52.0000 L17.5002 79.0264 M17.5002 79.0264 " }),
3025
+ /* @__PURE__ */ jsx("path", { d: "M27.0004 92.9999 L25.0003 93.4999 L22.0003 91.9999 L22.5004 89.4999 L52.0003 50.5000 L56.0004 55.9999 L34.0003 85.0000 L27.0004 92.9999 M27.0004 92.9999 " }),
3026
+ /* @__PURE__ */ jsx("path", { d: "M51.9998 98.0000 L50.5002 100.0000 L47.5002 101.0000 L45.0001 99.0000 L43.5000 96.0000 L51.0003 55.4999 L55.5001 55.9999 L51.9998 98.0000 M51.9998 98.0000 " }),
3027
+ /* @__PURE__ */ jsx("path", { d: "M77.5007 86.9997 L77.5007 90.9997 L77.0006 92.4997 L75.0004 93.4997 L71.5006 93.0339 L47.4669 57.2642 L56.9998 50.0002 L64.9994 64.5004 L65.7507 69.7497 L77.5007 86.9997 M77.5007 86.9997 " }),
3028
+ /* @__PURE__ */ jsx("path", { d: "M89.0008 80.9991 L89.5008 83.4991 L88.0008 85.4991 L86.5007 84.9991 L78.0007 78.9991 L65.0007 67.4991 L55.0007 60.4991 L58.0000 51.0000 L62.9999 54.0001 L66.0007 59.4991 L89.0008 80.9991 M89.0008 80.9991 " }),
3029
+ /* @__PURE__ */ jsx("path", { d: "M82.5003 55.5000 L95.0003 56.5000 L98.0003 58.5000 L100.0000 61.5000 L100.0000 63.6587 L94.5003 66.0000 L66.5005 59.0000 L55.0003 58.5000 L58.0000 48.0000 L66.0005 54.0000 L82.5003 55.5000 M82.5003 55.5000 " })
3030
+ ]
3031
+ }
3032
+ );
3033
+ }
3034
+ function CopyPageButton({
3035
+ sourceCode,
3036
+ pageUrl,
3037
+ websiteTitle,
3038
+ className,
3039
+ locale = "en",
3040
+ translations: translations2 = {}
3041
+ }) {
3042
+ const [isCopied, setCopied] = useState(false);
3043
+ const defaultTranslations = getTranslations(locale);
3044
+ const {
3045
+ copyPage = defaultTranslations.copyPage,
3046
+ copied = defaultTranslations.copied,
3047
+ openInChatGPT = defaultTranslations.openInChatGPT,
3048
+ openInClaude = defaultTranslations.openInClaude,
3049
+ askAboutThisPage = defaultTranslations.askAboutThisPage,
3050
+ copyPageDescription = defaultTranslations.copyPageDescription,
3051
+ askQuestionsDescription = defaultTranslations.askQuestionsDescription,
3052
+ chatGPTPrefix = defaultTranslations.chatGPTPrefix
3053
+ } = translations2;
3054
+ useEffect(() => {
3055
+ if (!isCopied) return;
3056
+ const timerId = setTimeout(() => {
3057
+ setCopied(false);
3058
+ }, 1e3);
3059
+ return () => {
3060
+ clearTimeout(timerId);
3061
+ };
3062
+ }, [isCopied]);
3063
+ function handleCopy() {
3064
+ navigator.clipboard.writeText(sourceCode);
3065
+ setCopied(true);
3066
+ setTimeout(() => setCopied(false), 2e3);
3067
+ }
3068
+ function handleOpenInChatGPT() {
3069
+ if (!pageUrl) return;
3070
+ const fullPageUrl = pageUrl.startsWith("http") ? pageUrl : `https://${pageUrl.replace(/^\/+/, "")}`;
3071
+ const titlePart = websiteTitle ? `${websiteTitle} - ` : "";
3072
+ const prefix = `${chatGPTPrefix} ${titlePart}${fullPageUrl} please read it to answer my questions.
3073
+
3074
+ `;
3075
+ const fullMessage = prefix + sourceCode;
3076
+ const encodedMessage = encodeURIComponent(fullMessage);
3077
+ const chatGPTUrl = `https://chatgpt.com/?q=${encodedMessage}`;
3078
+ window.open(chatGPTUrl, "_blank", "noopener,noreferrer");
3079
+ }
3080
+ function handleOpenInClaude() {
3081
+ if (!pageUrl) return;
3082
+ const fullPageUrl = pageUrl.startsWith("http") ? pageUrl : `https://${pageUrl.replace(/^\/+/, "")}`;
3083
+ const titlePart = websiteTitle ? `${websiteTitle} - ` : "";
3084
+ const prefix = `${chatGPTPrefix} ${titlePart}${fullPageUrl} please read it to answer my questions.
3085
+
3086
+ `;
3087
+ const fullMessage = prefix + sourceCode;
3088
+ const encodedMessage = encodeURIComponent(fullMessage);
3089
+ const claudeUrl = `https://claude.ai/new?q=${encodedMessage}`;
3090
+ window.open(claudeUrl, "_blank", "noopener,noreferrer");
3091
+ }
3092
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
3093
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
3094
+ Button,
3095
+ {
3096
+ variant: "outline",
3097
+ size: "sm",
3098
+ className: cn(
3099
+ "flex gap-2 text-sm font-medium items-center",
3100
+ isCopied && "opacity-70",
3101
+ className
3102
+ ),
3103
+ children: [
3104
+ /* @__PURE__ */ jsx(CopyIcon, { width: "16" }),
3105
+ isCopied ? copied : copyPage,
3106
+ /* @__PURE__ */ jsx(ChevronDownIcon, { width: "14", className: "opacity-50" })
3107
+ ]
3108
+ }
3109
+ ) }),
3110
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "min-w-[200px]", children: [
3111
+ /* @__PURE__ */ jsxs(DropdownMenuItem, { onClick: handleCopy, children: [
3112
+ /* @__PURE__ */ jsx(CopyIcon, { width: "16", className: "mr-2" }),
3113
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
3114
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: copyPage }),
3115
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: copyPageDescription })
3116
+ ] })
3117
+ ] }),
3118
+ pageUrl && /* @__PURE__ */ jsxs(Fragment, { children: [
3119
+ /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: handleOpenInChatGPT, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
3120
+ /* @__PURE__ */ jsx(ChatGPTIcon, { className: "w-4 h-4 shrink-0" }),
3121
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1", children: [
3122
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
3123
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: openInChatGPT }),
3124
+ /* @__PURE__ */ jsx(ExternalLinkIcon, { width: "12", className: "text-muted-foreground shrink-0" })
3125
+ ] }),
3126
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: askQuestionsDescription })
3127
+ ] })
3128
+ ] }) }),
3129
+ /* @__PURE__ */ jsx(DropdownMenuItem, { onClick: handleOpenInClaude, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
3130
+ /* @__PURE__ */ jsx(ClaudeIcon, { className: "w-4 h-4 shrink-0" }),
3131
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col flex-1", children: [
3132
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
3133
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: openInClaude }),
3134
+ /* @__PURE__ */ jsx(ExternalLinkIcon, { width: "12", className: "text-muted-foreground shrink-0" })
3135
+ ] }),
3136
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: askQuestionsDescription })
3137
+ ] })
3138
+ ] }) })
3139
+ ] })
3140
+ ] })
3141
+ ] });
3142
+ }
3143
+ function track(event, data) {
3144
+ if (typeof window !== "undefined") {
3145
+ try {
3146
+ import('@vercel/analytics').then(({ track: trackFn }) => {
3147
+ trackFn(event, data);
3148
+ }).catch(() => {
3149
+ });
3150
+ } catch {
3151
+ }
3152
+ }
3153
+ }
3154
+ function CookieBanner({
3155
+ locale,
3156
+ variant = "default",
3157
+ onAcceptCallback = () => {
3158
+ },
3159
+ onDeclineCallback = () => {
3160
+ },
3161
+ translations: translations2 = {}
3162
+ }) {
3163
+ const [isOpen, setIsOpen] = useState(false);
3164
+ const [hide, setHide] = useState(false);
3165
+ const defaultTranslations = getTranslations(locale);
3166
+ const {
3167
+ title = defaultTranslations.cookieConsent,
3168
+ description = defaultTranslations.cookieDescription,
3169
+ learnMore = defaultTranslations.cookieLearnMore,
3170
+ accept: acceptText = defaultTranslations.accept,
3171
+ decline: declineText = defaultTranslations.decline
3172
+ } = translations2;
3173
+ const handleAccept = () => {
3174
+ setIsOpen(false);
3175
+ localStorage.setItem("cookieConsent", "true");
3176
+ setTimeout(() => {
3177
+ setHide(true);
3178
+ }, 700);
3179
+ onAcceptCallback();
3180
+ };
3181
+ const handleDecline = () => {
3182
+ setIsOpen(false);
3183
+ localStorage.setItem("cookieConsent", "false");
3184
+ setTimeout(() => {
3185
+ setHide(true);
3186
+ }, 700);
3187
+ onDeclineCallback();
3188
+ };
3189
+ useEffect(() => {
3190
+ try {
3191
+ const consent = localStorage.getItem("cookieConsent");
3192
+ if (consent === "true" || consent === "false") {
3193
+ setIsOpen(false);
3194
+ setHide(true);
3195
+ } else {
3196
+ setIsOpen(true);
3197
+ }
3198
+ } catch (e) {
3199
+ console.error("Error reading cookie consent:", e);
3200
+ setIsOpen(true);
3201
+ }
3202
+ }, []);
3203
+ return variant !== "small" ? /* @__PURE__ */ jsx(
3204
+ "div",
3205
+ {
3206
+ className: cn(
3207
+ "fixed z-[200] bottom-0 left-0 right-0 sm:right-0 sm:left-auto sm:bottom-4 w-full sm:max-w-md duration-700",
3208
+ !isOpen ? "transition-[opacity,transform] translate-y-8 opacity-0" : "transition-[opacity,transform] translate-y-0 opacity-100",
3209
+ hide && "hidden"
3210
+ ),
3211
+ children: /* @__PURE__ */ jsx("div", { className: "rounded-md m-3 border border-border shadow-lg bg-background", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
3212
+ /* @__PURE__ */ jsxs("div", { className: "border-b border-border h-14 flex items-center justify-between p-4", children: [
3213
+ /* @__PURE__ */ jsx("h1", { className: "text-lg font-medium", children: title }),
3214
+ /* @__PURE__ */ jsx(CookieIcon, { className: "h-[1.2rem] w-[1.2rem]" })
3215
+ ] }),
3216
+ /* @__PURE__ */ jsx("div", { className: "p-4", children: /* @__PURE__ */ jsxs("p", { className: "text-sm font-normal text-start mb-2", children: [
3217
+ description,
3218
+ " ",
3219
+ /* @__PURE__ */ jsx(Link3, { href: `/${locale}/privacy`, className: "text-xs underline ml-1", children: learnMore })
3220
+ ] }) }),
3221
+ /* @__PURE__ */ jsxs("div", { className: "flex justify-around gap-2 p-4 py-5 border-t border-border dark:bg-background/20", children: [
3222
+ /* @__PURE__ */ jsx(Button, { onClick: handleAccept, className: "flex-1", children: acceptText }),
3223
+ /* @__PURE__ */ jsx(Button, { onClick: handleDecline, className: "flex-1", variant: "secondary", children: declineText })
3224
+ ] })
3225
+ ] }) })
3226
+ }
3227
+ ) : /* @__PURE__ */ jsx(
3228
+ "div",
3229
+ {
3230
+ className: cn(
3231
+ "fixed z-[200] bottom-0 left-0 right-0 sm:right-4 sm:left-auto sm:bottom-4 w-full sm:max-w-md duration-700",
3232
+ !isOpen ? "transition-[opacity,transform] translate-y-8 opacity-0" : "transition-[opacity,transform] translate-y-0 opacity-100",
3233
+ hide && "hidden"
3234
+ ),
3235
+ children: /* @__PURE__ */ jsxs("div", { className: "m-3 bg-background border border-border rounded-lg", children: [
3236
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-3", children: [
3237
+ /* @__PURE__ */ jsx("h1", { className: "text-lg font-medium", children: title }),
3238
+ /* @__PURE__ */ jsx(CookieIcon, { className: "h-[1.2rem] w-[1.2rem]" })
3239
+ ] }),
3240
+ /* @__PURE__ */ jsx("div", { className: "p-3 -mt-2", children: /* @__PURE__ */ jsxs("p", { className: "text-sm text-left text-muted-foreground", children: [
3241
+ description,
3242
+ " ",
3243
+ /* @__PURE__ */ jsx(Link3, { href: `/${locale}/privacy`, className: "underline", children: learnMore })
3244
+ ] }) }),
3245
+ /* @__PURE__ */ jsxs("div", { className: "p-3 flex items-center gap-2 mt-2 border-t", children: [
3246
+ /* @__PURE__ */ jsx(
3247
+ Button,
3248
+ {
3249
+ className: "w-full h-9 rounded-full",
3250
+ onClick: () => {
3251
+ track("Accept Cookie Banner");
3252
+ handleAccept();
3253
+ },
3254
+ children: acceptText
3255
+ }
3256
+ ),
3257
+ /* @__PURE__ */ jsx(
3258
+ Button,
3259
+ {
3260
+ className: "w-full h-9 rounded-full",
3261
+ variant: "outline",
3262
+ onClick: () => {
3263
+ track("Decline Cookie Banner");
3264
+ handleDecline();
3265
+ },
3266
+ children: declineText
3267
+ }
3268
+ )
3269
+ ] })
3270
+ ] })
3271
+ }
3272
+ );
3273
+ }
3274
+ function Select({ ...props }) {
3275
+ return /* @__PURE__ */ jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
3276
+ }
3277
+ function SelectGroup({ ...props }) {
3278
+ return /* @__PURE__ */ jsx(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
3279
+ }
3280
+ function SelectValue({ ...props }) {
3281
+ return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
3282
+ }
3283
+ function SelectTrigger({
3284
+ className,
3285
+ size = "default",
3286
+ children,
3287
+ ...props
3288
+ }) {
3289
+ return /* @__PURE__ */ jsxs(
3290
+ SelectPrimitive.Trigger,
3291
+ {
3292
+ "data-slot": "select-trigger",
3293
+ "data-size": size,
3294
+ className: cn(
3295
+ "border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
3296
+ className
3297
+ ),
3298
+ ...props,
3299
+ children: [
3300
+ children,
3301
+ /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" }) })
3302
+ ]
3303
+ }
3304
+ );
3305
+ }
3306
+ function SelectContent({
3307
+ className,
3308
+ children,
3309
+ position = "popper",
3310
+ align = "center",
3311
+ ...props
3312
+ }) {
3313
+ return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
3314
+ SelectPrimitive.Content,
3315
+ {
3316
+ "data-slot": "select-content",
3317
+ className: cn(
3318
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
3319
+ position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
3320
+ className
3321
+ ),
3322
+ position,
3323
+ align,
3324
+ ...props,
3325
+ children: [
3326
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
3327
+ /* @__PURE__ */ jsx(
3328
+ SelectPrimitive.Viewport,
3329
+ {
3330
+ className: cn(
3331
+ "p-1",
3332
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
3333
+ ),
3334
+ children
3335
+ }
3336
+ ),
3337
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
3338
+ ]
3339
+ }
3340
+ ) });
3341
+ }
3342
+ function SelectLabel({ className, ...props }) {
3343
+ return /* @__PURE__ */ jsx(
3344
+ SelectPrimitive.Label,
3345
+ {
3346
+ "data-slot": "select-label",
3347
+ className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
3348
+ ...props
3349
+ }
3350
+ );
3351
+ }
3352
+ function SelectItem({
3353
+ className,
3354
+ children,
3355
+ ...props
3356
+ }) {
3357
+ return /* @__PURE__ */ jsxs(
3358
+ SelectPrimitive.Item,
3359
+ {
3360
+ "data-slot": "select-item",
3361
+ className: cn(
3362
+ "focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
3363
+ className
3364
+ ),
3365
+ ...props,
3366
+ children: [
3367
+ /* @__PURE__ */ jsx("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) }) }),
3368
+ /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
3369
+ ]
3370
+ }
3371
+ );
3372
+ }
3373
+ function SelectSeparator({
3374
+ className,
3375
+ ...props
3376
+ }) {
3377
+ return /* @__PURE__ */ jsx(
3378
+ SelectPrimitive.Separator,
3379
+ {
3380
+ "data-slot": "select-separator",
3381
+ className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
3382
+ ...props
3383
+ }
3384
+ );
3385
+ }
3386
+ function SelectScrollUpButton({
3387
+ className,
3388
+ ...props
3389
+ }) {
3390
+ return /* @__PURE__ */ jsx(
3391
+ SelectPrimitive.ScrollUpButton,
3392
+ {
3393
+ "data-slot": "select-scroll-up-button",
3394
+ className: cn("flex cursor-default items-center justify-center py-1", className),
3395
+ ...props,
3396
+ children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
3397
+ }
3398
+ );
3399
+ }
3400
+ function SelectScrollDownButton({
3401
+ className,
3402
+ ...props
3403
+ }) {
3404
+ return /* @__PURE__ */ jsx(
3405
+ SelectPrimitive.ScrollDownButton,
3406
+ {
3407
+ "data-slot": "select-scroll-down-button",
3408
+ className: cn("flex cursor-default items-center justify-center py-1", className),
3409
+ ...props,
3410
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
3411
+ }
3412
+ );
3413
+ }
3414
+ function AnchorLinkHandler({ locale = "en" }) {
3415
+ const translations2 = getTranslations(locale);
3416
+ useEffect(() => {
3417
+ const handleClick = (e) => {
3418
+ const target = e.target;
3419
+ const anchor = target.closest('a[href^="#"]');
3420
+ if (anchor && anchor.classList.contains("inline-flex")) {
3421
+ e.preventDefault();
3422
+ e.stopPropagation();
3423
+ const href = anchor.getAttribute("href");
3424
+ if (href) {
3425
+ const fullUrl = window.location.origin + window.location.pathname + href;
3426
+ navigator.clipboard.writeText(fullUrl).then(() => {
3427
+ const originalTitle = anchor.getAttribute("title");
3428
+ anchor.setAttribute("title", translations2.linkCopied);
3429
+ const icon = anchor.querySelector("svg");
3430
+ if (icon) {
3431
+ icon.classList.add("text-green-500");
3432
+ setTimeout(() => {
3433
+ icon.classList.remove("text-green-500");
3434
+ }, 1e3);
3435
+ }
3436
+ setTimeout(() => {
3437
+ anchor.setAttribute("title", originalTitle || translations2.copyLinkToSection);
3438
+ }, 2e3);
3439
+ }).catch((err) => {
3440
+ console.error("Failed to copy link:", err);
3441
+ try {
3442
+ const textArea = document.createElement("textarea");
3443
+ textArea.value = fullUrl;
3444
+ document.body.appendChild(textArea);
3445
+ textArea.select();
3446
+ document.execCommand("copy");
3447
+ document.body.removeChild(textArea);
3448
+ } catch (fallbackErr) {
3449
+ console.error("Fallback copy failed:", fallbackErr);
3450
+ }
3451
+ });
3452
+ }
3453
+ }
3454
+ };
3455
+ document.addEventListener("click", handleClick);
3456
+ return () => {
3457
+ document.removeEventListener("click", handleClick);
3458
+ };
3459
+ }, []);
3460
+ return null;
3461
+ }
3462
+
3463
+ export { AnchorLinkHandler, Avatar, AvatarFallback, AvatarImage, Banner, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, BreadcrumbToggle, Breadcrumbs, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CookieBanner, CopyPageButton, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FolderCards, GithubContributors, GithubLink, GithubStar, Input, LanguageSwitcher, LevelElevator, Logo, MarkdownRenderer, MobileMenu, MobileTopCategories, SearchBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarNavigation, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, StickyBanner, TableOfContents, ThemeSwitcher, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TopCategories, buttonVariants, useIsMobile, useMediaQuery, useSidebar };
3464
+ //# sourceMappingURL=client.js.map
3465
+ //# sourceMappingURL=client.js.map