boltdocs 2.5.4 → 2.5.6
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/bin/boltdocs.js +1 -1
- package/dist/cache-Cr8W2zgZ.cjs +6 -0
- package/dist/cache-DFdakSmR.mjs +6 -0
- package/dist/client/index.d.mts +1276 -861
- package/dist/client/index.d.ts +1276 -861
- package/dist/client/index.js +6 -1
- package/dist/client/index.mjs +6 -1
- package/dist/client/ssr.cjs +6 -0
- package/dist/client/ssr.d.cts +80 -0
- package/dist/client/ssr.d.mts +63 -61
- package/dist/client/ssr.mjs +6 -1
- package/dist/client/theme/neutral.css +388 -0
- package/dist/node/cli-entry.cjs +8 -0
- package/dist/node/cli-entry.d.cts +2 -0
- package/dist/node/cli-entry.d.mts +2 -1
- package/dist/node/cli-entry.mjs +7 -5
- package/dist/node/index.cjs +6 -0
- package/dist/node/index.d.cts +574 -0
- package/dist/node/index.d.mts +385 -378
- package/dist/node/index.mjs +6 -1
- package/dist/node-CWXme96p.mjs +73 -0
- package/dist/node-VYfhzGrh.cjs +73 -0
- package/dist/package-BY8Jd2j4.cjs +6 -0
- package/dist/package-OFZf0s2j.mjs +6 -0
- package/dist/search-dialog-BeNyI_KQ.mjs +6 -0
- package/dist/search-dialog-dYsCAk5S.js +6 -0
- package/dist/use-search-D25n0PrV.mjs +6 -0
- package/dist/use-search-WuzdH1cJ.js +6 -0
- package/package.json +16 -12
- package/src/client/app/index.tsx +15 -12
- package/src/client/components/default-layout.tsx +21 -19
- package/src/client/hooks/use-i18n.ts +1 -1
- package/src/client/hooks/use-routes.ts +1 -1
- package/src/client/hooks/use-version.ts +1 -1
- package/src/client/store/boltdocs-context.tsx +119 -0
- package/CHANGELOG.md +0 -92
- package/dist/cache-3FOEPC2P.mjs +0 -1
- package/dist/chunk-IMEKU5U3.mjs +0 -75
- package/dist/chunk-J2PTDWZM.mjs +0 -1
- package/dist/chunk-TP5KMRD3.mjs +0 -1
- package/dist/chunk-Y4RE5KI7.mjs +0 -1
- package/dist/client/ssr.d.ts +0 -78
- package/dist/client/ssr.js +0 -1
- package/dist/node/cli-entry.d.ts +0 -1
- package/dist/node/cli-entry.js +0 -80
- package/dist/node/index.d.ts +0 -567
- package/dist/node/index.js +0 -75
- package/dist/package-KCTE4HFV.mjs +0 -1
- package/dist/search-dialog-O6VLVSOA.mjs +0 -1
- package/src/client/store/use-boltdocs-store.ts +0 -44
- package/src/node/cache.ts +0 -408
- package/src/node/cli/build.ts +0 -53
- package/src/node/cli/dev.ts +0 -22
- package/src/node/cli/doctor.ts +0 -243
- package/src/node/cli/index.ts +0 -9
- package/src/node/cli/ui.ts +0 -54
- package/src/node/cli-entry.ts +0 -24
- package/src/node/config.ts +0 -382
- package/src/node/errors.ts +0 -44
- package/src/node/index.ts +0 -84
- package/src/node/mdx/cache.ts +0 -12
- package/src/node/mdx/highlighter.ts +0 -47
- package/src/node/mdx/index.ts +0 -122
- package/src/node/mdx/rehype-shiki.ts +0 -62
- package/src/node/mdx/remark-code-meta.ts +0 -35
- package/src/node/mdx/remark-shiki.ts +0 -61
- package/src/node/plugin/entry.ts +0 -87
- package/src/node/plugin/html.ts +0 -99
- package/src/node/plugin/index.ts +0 -464
- package/src/node/plugin/types.ts +0 -9
- package/src/node/plugins/index.ts +0 -17
- package/src/node/plugins/plugin-errors.ts +0 -62
- package/src/node/plugins/plugin-lifecycle.ts +0 -117
- package/src/node/plugins/plugin-sandbox.ts +0 -59
- package/src/node/plugins/plugin-store.ts +0 -54
- package/src/node/plugins/plugin-types.ts +0 -107
- package/src/node/plugins/plugin-validator.ts +0 -105
- package/src/node/routes/cache.ts +0 -28
- package/src/node/routes/index.ts +0 -293
- package/src/node/routes/parser.ts +0 -262
- package/src/node/routes/sorter.ts +0 -42
- package/src/node/routes/types.ts +0 -61
- package/src/node/schema/config.ts +0 -195
- package/src/node/schema/frontmatter.ts +0 -17
- package/src/node/search/index.ts +0 -55
- package/src/node/security/constants/index.ts +0 -10
- package/src/node/security/csp.ts +0 -31
- package/src/node/security/headers.ts +0 -27
- package/src/node/ssg/index.ts +0 -205
- package/src/node/ssg/meta.ts +0 -33
- package/src/node/ssg/options.ts +0 -15
- package/src/node/ssg/robots.ts +0 -53
- package/src/node/ssg/sitemap.ts +0 -55
- package/src/node/utils.ts +0 -349
- package/tsconfig.json +0 -26
- package/tsup.config.ts +0 -56
package/dist/client/ssr.d.mts
CHANGED
|
@@ -1,78 +1,80 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
|
|
2
|
+
import React from "react";
|
|
3
|
+
//#region src/client/types.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* Metadata provided by the server for a specific route.
|
|
5
6
|
* Maps closely to the `RouteMeta` type in the Node environment.
|
|
6
7
|
*/
|
|
7
8
|
interface ComponentRoute {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
9
|
+
/** The final URL path */
|
|
10
|
+
path: string;
|
|
11
|
+
/** The absolute filesystem path of the source file */
|
|
12
|
+
componentPath: string;
|
|
13
|
+
/** The page title */
|
|
14
|
+
title: string;
|
|
15
|
+
/** Explicit order in the sidebar */
|
|
16
|
+
sidebarPosition?: number;
|
|
17
|
+
/** The relative path from the docs directory */
|
|
18
|
+
filePath: string;
|
|
19
|
+
/** The group directory name */
|
|
20
|
+
group?: string;
|
|
21
|
+
/** The display title of the group */
|
|
22
|
+
groupTitle?: string;
|
|
23
|
+
/** Explicit order of the group in the sidebar */
|
|
24
|
+
groupPosition?: number;
|
|
25
|
+
/** Extracted markdown headings for search indexing */
|
|
26
|
+
headings?: {
|
|
27
|
+
level: number;
|
|
28
|
+
text: string;
|
|
29
|
+
id: string;
|
|
30
|
+
}[];
|
|
31
|
+
/** The page summary or description */
|
|
32
|
+
description?: string;
|
|
33
|
+
/** The locale this route belongs to, if i18n is configured */
|
|
34
|
+
locale?: string;
|
|
35
|
+
/** The version this route belongs to, if versioning is configured */
|
|
36
|
+
version?: string;
|
|
37
|
+
/** Optional icon to display (Lucide icon name or raw SVG) */
|
|
38
|
+
icon?: string;
|
|
39
|
+
/** The tab this route belongs to, if tabs are configured */
|
|
40
|
+
tab?: string;
|
|
41
|
+
/** Optional badge to display next to the sidebar item */
|
|
42
|
+
badge?: string | {
|
|
43
|
+
text: 'updated' | 'new' | 'deprecated';
|
|
44
|
+
expires?: string;
|
|
45
|
+
};
|
|
46
|
+
/** Optional icon for the route's group */
|
|
47
|
+
groupIcon?: string;
|
|
48
|
+
/** The extracted plain-text content of the page for search indexing */
|
|
49
|
+
_content?: string;
|
|
50
|
+
/** The raw markdown content of the page */
|
|
51
|
+
_rawContent?: string;
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/client/ssr.d.ts
|
|
53
55
|
/**
|
|
54
56
|
* Options for rendering the Boltdocs application on the server (SSG).
|
|
55
57
|
*/
|
|
56
58
|
interface RenderOptions {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
/** The URL path currently being rendered */
|
|
60
|
+
path: string;
|
|
61
|
+
/** Initial routes generated by the Vite plugin (`virtual:boltdocs-routes`) */
|
|
62
|
+
routes: ComponentRoute[];
|
|
63
|
+
/** Site configuration (`virtual:boltdocs-config`) */
|
|
64
|
+
config: any;
|
|
65
|
+
/** The name of the documentation directory (e.g. 'docs') */
|
|
66
|
+
docsDirName: string;
|
|
67
|
+
/** Optional custom React component to render when visiting the root path ('/') */
|
|
68
|
+
homePage?: React.ComponentType;
|
|
69
|
+
/** Custom external pages mapped by their route path */
|
|
70
|
+
externalPages?: Record<string, React.ComponentType<any>>;
|
|
71
|
+
/** Preloaded modules (since SSR cannot use dynamic imports easily) */
|
|
72
|
+
modules: Record<string, any>;
|
|
71
73
|
}
|
|
72
74
|
/**
|
|
73
75
|
* Renders the full React application into an HTML string for a specific route.
|
|
74
76
|
* This is called by the Node SSG script during the Vite build process.
|
|
75
77
|
*/
|
|
76
78
|
declare function render(options: RenderOptions): Promise<string>;
|
|
77
|
-
|
|
78
|
-
export {
|
|
79
|
+
//#endregion
|
|
80
|
+
export { RenderOptions, render };
|
package/dist/client/ssr.mjs
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
var ho=Object.defineProperty;var xo=(e,t)=>{for(var o in t)ho(e,o,{get:t[o],enumerable:!0})};import Wn from"react";import Fn from"react-dom/server";import{StaticRouter as $n}from"react-router-dom/server";import Ze,{useEffect as Qe,useState as mo,useMemo as uo}from"react";import Tc from"react-dom/client";import{BrowserRouter as Lc,Routes as Vn,Route as Y}from"react-router-dom";import{ArrowLeft as Vo}from"lucide-react";import rt from"react";import{Link as Bo}from"react-aria-components";import{useLocation as Eo}from"react-router-dom";import{createContext as bo,use as vo}from"react";var Ee=bo(null);function G(){let e=vo(Ee);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}import{useLocation as Lo}from"react-router-dom";import{createContext as yo,use as Co,useCallback as Ro,useRef as wo}from"react";import{jsx as Po}from"react/jsx-runtime";var tt=yo({preload:()=>{},routes:[]});function Re(){return Co(tt)}function ot({routes:e,modules:t,children:o}){let r=wo(null),n=Ro(a=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let i=a.split("#")[0].split("?")[0],l=e.find(s=>s.path===i||i==="/"&&s.path==="");if(l?.filePath){let s=Object.keys(t).find(c=>c.endsWith("/"+l.filePath));s&&t[s]().catch(c=>{console.error(`[boltdocs] Failed to preload route ${a}:`,c)})}},100)},[e,t]);return Po(tt.Provider,{value:{preload:n,routes:e},children:o})}import{create as No}from"zustand";import{persist as To,createJSONStorage as ko}from"zustand/middleware";var D=No()(To(e=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:t=>e({currentLocale:t}),setVersion:t=>e({currentVersion:t}),setHasHydrated:t=>e({hasHydrated:t})}),{name:"boltdocs-storage",storage:ko(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function pe(){let{routes:e}=Re(),t=G(),o=Lo(),r=D(h=>h.currentLocale),n=D(h=>h.currentVersion),a=D(h=>h.hasHydrated),i=e.find(h=>h.path===o.pathname),l=t.i18n?i?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,s=t.versions?i?.version||(a?n:void 0)||t.versions.defaultVersion:void 0,c=e.filter(h=>{let B=t.i18n?(h.locale||t.i18n.defaultLocale)===l:!0,x=t.versions?(h.version||t.versions.defaultVersion)===s:!0;if(!(B&&x))return!1;let E=t.i18n;if(E){let j=!!i?.locale,z=!!h.locale;if(e.some(Ce=>Ce!==h&&Ce.filePath===h.filePath&&Ce.version===h.version&&(Ce.locale||E.defaultLocale)===(h.locale||E.defaultLocale))&&j!==z)return!1}return!0}),p=t.i18n?.localeConfigs?.[l]?.label||t.i18n?.locales[l]||l,b=t.versions?.versions.find(h=>h.path===s)?.label||s,y=t.i18n?Object.entries(t.i18n.locales).map(([h,B])=>{let x=t.i18n?.localeConfigs?.[h];return{key:h,label:x?.label||B,isCurrent:h===l}}):[],w=t.versions?t.versions.versions.map(h=>({key:h.path,label:h.label,isCurrent:h.path===s})):[];return{routes:c,allRoutes:e,currentRoute:i,currentLocale:l,currentLocaleLabel:p,availableLocales:y,currentVersion:s,currentVersionLabel:b,availableVersions:w,config:t}}function Se(e){let t=G(),{currentLocale:o,currentVersion:r}=pe();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,a=t.versions;if(!n&&!a)return e;let i=e.startsWith("/docs"),l=e.split("/").filter(Boolean),s=0;l[s]==="docs"&&s++,a&&l.length>s&&a.versions.find(b=>b.path===l[s])&&s++,n&&l.length>s&&n.locales[l[s]]&&s++;let c=l.slice(s),d=[];i&&(d.push("docs"),a&&r&&d.push(r)),n&&o&&o!==n.defaultLocale&&d.push(o),d.push(...c);let p=`/${d.join("/")}`;return p.length>1&&p.endsWith("/")?p.slice(0,-1):p||"/"}import{clsx as Ao}from"clsx";import{twMerge as Mo}from"tailwind-merge";function m(...e){return Mo(Ao(e))}import{jsx as nt}from"react/jsx-runtime";var Z=rt.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:a,...i}=e,l=Se(o??""),{preload:s}=Re();return nt(Bo,{...i,ref:t,href:l,onMouseEnter:p=>{n?.(p),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)},onFocus:p=>{a?.(p),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)}})});Z.displayName="Link";var So=rt.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:a,...i}=e,l=Eo(),s=Se(o??""),c=r?l.pathname===s:l.pathname.startsWith(s),d=typeof n=="function"?n({isActive:c}):m(n,c&&"active"),p=typeof a=="function"?a({isActive:c}):a;return nt(Z,{...i,ref:t,href:o,className:d,children:p})});So.displayName="NavLink";import{jsx as me,jsxs as st}from"react/jsx-runtime";function Ve(){return me("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:st("div",{className:"space-y-4",children:[me("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),me("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),me("p",{className:"text-sm text-text-muted max-w-sm mx-auto",children:"The page you're looking for doesn't exist or has been moved."}),st(Z,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[me(Vo,{size:16})," Go to Home"]})]})})}import{createContext as Ho,use as Io,useEffect as at,useState as He}from"react";import{jsx as zo}from"react/jsx-runtime";var it=Ho(void 0);function lt({children:e}){let[t,o]=He("system"),[r,n]=He("dark"),[a,i]=He(!1);at(()=>{i(!0);let s=localStorage.getItem("boltdocs-theme"),c=s==="light"||s==="dark"||s==="system"?s:"system";o(c);let d=window.matchMedia("(prefers-color-scheme: dark)");((b,y)=>{n(b==="system"?y?"dark":"light":b)})(c,d.matches);let g=b=>{n(y=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?b.matches?"dark":"light":y)};return d.addEventListener("change",g),()=>d.removeEventListener("change",g)},[]),at(()=>{if(!a)return;let s=window.matchMedia("(prefers-color-scheme: dark)").matches,c=t==="system"?s?"dark":"light":t;n(c);let d=document.documentElement;c==="light"?(d.classList.add("theme-light"),d.dataset.theme="light"):(d.classList.remove("theme-light"),d.dataset.theme="dark")},[t,a]);let l=s=>{o(s),localStorage.setItem("boltdocs-theme",s)};return zo(it.Provider,{value:{theme:t,resolvedTheme:r,setTheme:l},children:e})}function ct(){let e=Io(it);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}import fo from"virtual:boltdocs-layout";import{startTransition as Do}from"react";import{RouterProvider as Oo}from"react-aria-components";import{useNavigate as Wo,useHref as Fo}from"react-router-dom";import{jsx as $o}from"react/jsx-runtime";function dt({children:e}){let t=Wo();return $o(Oo,{navigate:(o,r)=>{Do(()=>{t(o,r)})},useHref:Fo,children:e})}import{useLayoutEffect as Go}from"react";import{useLocation as _o}from"react-router-dom";function pt(){let{pathname:e,hash:t}=_o();return Go(()=>{let o=document.querySelector(".boltdocs-content")||window,r=()=>o===window?window.scrollY:o.scrollTop,n=(a,i="auto")=>{o===window?window.scrollTo({top:a,behavior:i}):o.scrollTo({top:a,behavior:i})};if(t){let a=t.replace("#",""),i=document.getElementById(a);if(i){let s=o===window?0:o.getBoundingClientRect().top,p=i.getBoundingClientRect().top-s-80+r();n(p,"smooth");return}}n(0)},[e,t]),null}import{Outlet as Uo}from"react-router-dom";import qo from"virtual:boltdocs-layout";import{jsx as mt}from"react/jsx-runtime";function ut(){return mt(qo,{children:mt(Uo,{})})}import{createContext as Jo,use as Xo}from"react";import{jsx as Ko}from"react/jsx-runtime";var ft=Jo({});function gt(){return Xo(ft)}function ht({components:e,children:t}){return Ko(ft.Provider,{value:e,children:t})}import{jsx as Yo}from"react/jsx-runtime";function xt({Component:e}){let t=gt();return Yo(e,{components:t})}import{Link as En}from"lucide-react";var je={};xo(je,{Admonition:()=>F,Badge:()=>Mt,Button:()=>bt,Card:()=>Ht,Cards:()=>Vt,Caution:()=>_t,CodeBlock:()=>_,ComponentPreview:()=>so,ComponentProps:()=>oo,CopyMarkdown:()=>lo,Danger:()=>Ft,Field:()=>Qt,FileTree:()=>Jt,Image:()=>to,Important:()=>Gt,InfoBox:()=>$t,Link:()=>eo,List:()=>Ut,Note:()=>Dt,Tab:()=>Tt,Table:()=>Zt,Tabs:()=>kt,Tip:()=>Ot,Video:()=>At,Warning:()=>Wt});import*as Pe from"react-aria-components";import{cva as jo}from"class-variance-authority";import{Fragment as Zo,jsx as Q,jsxs as Qo}from"react/jsx-runtime";var we=jo("flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none",{variants:{variant:{primary:"bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg",secondary:"bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong",outline:"bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500",ghost:"bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main",danger:"bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15",success:"bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15",warning:"bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15",info:"bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15",subtle:"bg-primary-500/10 text-primary-500 hover:bg-primary-500/20",link:"bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline"},size:{sm:"min-h-8 px-3.5 text-[0.8125rem] gap-1.5",md:"min-h-10 px-5 text-[0.9375rem] gap-2",lg:"min-h-12 px-7 text-[1.05rem] gap-2.5"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},iconSize:{sm:"w-8 h-8 p-0",md:"w-10 h-10 p-0",lg:"w-12 h-12 p-0"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:null}},defaultVariants:{variant:"primary",size:"md",rounded:"md"}}),ee=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:a,variant:i,size:l,rounded:s,iconSize:c,disabled:d,...p})=>{let g=r||!n&&!!t,b=g?Q("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):Qo(Zo,{children:[t&&o==="left"&&Q("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),Q("span",{className:"flex items-center",children:n}),t&&o==="right"&&Q("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?Q(Pe.Link,{href:e,className:m(we({variant:i,size:l,rounded:s,iconSize:g?c:void 0,disabled:d}),a),...p,children:b}):Q(Pe.Button,{className:m(we({variant:i,size:l,rounded:s,iconSize:g?c:void 0,disabled:d}),a),...p,children:b})};import{jsx as er}from"react/jsx-runtime";var bt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:a,...i})=>er(ee,{className:m("group",we({variant:t,size:o,rounded:r,iconSize:n,disabled:a,className:e})),...i});import*as De from"react-aria-components";import{Copy as sr,Check as ar,File as ir}from"lucide-react";var vt=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}};import{useCallback as tr,useEffect as or,useRef as rr,useState as Ie}from"react";function yt(e){let{title:t}=e,[o,r]=Ie(!1),[n,a]=Ie(!1),[i,l]=Ie(!1),s=rr(null),c=G(),d=tr(async()=>{let p=s.current?.textContent??"";vt(p),r(!0),setTimeout(()=>r(!1),2e3)},[]);return or(()=>{let p=s.current?.textContent?.length??0;l(p>120)},[e.children,e.highlightedHtml]),{copied:o,isExpanded:n,setIsExpanded:a,isExpandable:i,preRef:s,handleCopy:d,shouldTruncate:i&&!n}}import{jsx as C,jsxs as W}from"react/jsx-runtime";function O(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var Ne=e=>W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...O(e),children:[C("title",{children:"TypeScript"}),C("path",{fill:"#2563EB",d:"M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z"})]}),Te=e=>W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...O(e),children:[C("title",{children:"JavaScript"}),C("path",{fill:"#F59E0B",d:"M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z"})]}),ke=e=>W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...O(e),children:[C("title",{children:"JSON"}),C("path",{fill:"#F59E0B",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),Le=e=>W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...O(e),children:[C("title",{children:"CSS"}),C("path",{fill:"#0EA5E9",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),Ae=e=>W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...O(e),children:[C("title",{children:"HTML"}),C("path",{fill:"#EA580C",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]});var te=e=>W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...O(e),children:[C("title",{children:"React"}),C("path",{fill:"#0E8ADC",d:"M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z"}),C("path",{stroke:"#0E8ADC",d:"M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z"}),C("path",{stroke:"#0E8ADC",d:"M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z"}),C("path",{stroke:"#0E8ADC",d:"M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z"})]}),oe=e=>W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...O(e),children:[C("title",{children:"Markdown"}),C("path",{fill:"#60A5FA",d:"M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z"})]}),re=e=>W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...O(e),children:[C("title",{children:"Shell"}),C("path",{stroke:"#14B8A6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.336 17l6-6-6-6M12.336 19h8"})]}),ne=e=>W("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...O(e),children:[C("title",{children:"YAML"}),C("path",{fill:"#A78BFA",d:"M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z"})]});import*as se from"react-aria-components";import{Fragment as nr,jsx as ue,jsxs as ze}from"react/jsx-runtime";var Ct=({className:e,children:t,...o})=>ue(se.Tooltip,{...o,offset:8,className:r=>m("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>ze(nr,{children:[ue(se.OverlayArrow,{children:ze("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90",children:[ue("title",{children:"Arrow"}),ue("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),fe=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>ze(se.TooltipTrigger,{delay:o,closeDelay:r,children:[t,ue(Ct,{...n,children:e})]});fe.Root=fe;fe.Content=Ct;import{jsx as S,jsxs as Rt}from"react/jsx-runtime";var lr={ts:Ne,tsx:te,js:Te,jsx:te,json:ke,css:Le,html:Ae,md:oe,mdx:oe,bash:re,sh:re,yaml:ne,yml:ne};function _(e){let{children:t,hideCopy:o=!1,highlightedHtml:r,"data-highlighted-html":n,title:a,"data-lang":i,plain:l=!1,...s}=e,c=r||n,d=G(),p=e.lang||i||"",{copied:g,isExpanded:b,setIsExpanded:y,isExpandable:w,preRef:h,handleCopy:B,shouldTruncate:x}=yt(e),E=lr[p];return Rt("div",{className:m("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!l,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":x},e.className),children:[a&&Rt("div",{className:"flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted",children:[E?S(E,{size:14}):S(ir,{size:14,className:"opacity-60"}),S("span",{children:a})]}),S("div",{className:"absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100",children:!o&&S(fe,{content:g?"Copied!":"Copy code",children:S(De.Button,{onPress:B,className:m("grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2",g?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:g?S(ar,{size:20}):S(sr,{size:20})})})}),c?S("div",{ref:h,className:"shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!",dangerouslySetInnerHTML:{__html:c}}):S("pre",{ref:h,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...s,children:t}),w&&S("div",{className:m(x?"absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10":"relative flex justify-center py-4"),children:S(De.Button,{onPress:()=>y(!b),className:"rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md",children:b?"Show less":"Expand code"})})]})}import{Children as mr,isValidElement as ur,useMemo as fr}from"react";import*as q from"react-aria-components";import{useState as wt,useRef as cr,useEffect as dr,useCallback as pr}from"react";function Pt({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(c=>!c.props.disabled):e,[r,n]=wt(o===-1?0:o),a=cr([]),[i,l]=wt({opacity:0,transform:"translateX(0)",width:0});dr(()=>{let c=a.current[r];c&&l({opacity:1,width:c.offsetWidth,transform:`translateX(${c.offsetLeft}px)`})},[r,t]);let s=pr(c=>{let d=0;if(c.key==="ArrowRight"?d=1:c.key==="ArrowLeft"&&(d=-1),d!==0){let p=(r+d+t.length)%t.length;for(;t[p].props.disabled&&p!==r;)p=(p+d+t.length)%t.length;p!==r&&!t[p].props.disabled&&(n(p),a.current[p]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:a,indicatorStyle:i,handleKeyDown:s}}import{cva as Nt}from"class-variance-authority";import{jsx as U,jsxs as Oe}from"react/jsx-runtime";var gr=Nt("relative flex items-center border-b border-border-subtle gap-1 overflow-x-auto no-scrollbar",{variants:{size:{default:"px-0",compact:"px-2"}},defaultVariants:{size:"default"}}),hr=Nt("flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap",{variants:{isActive:{true:"text-primary-500",false:"text-text-muted hover:text-text-main"},isDisabled:{true:"opacity-40 pointer-events-none",false:""}},defaultVariants:{isActive:!1,isDisabled:!1}});function Tt({children:e}){let t=typeof e=="string"?U(_,{className:"language-bash",children:U("code",{children:e.trim()})}):e;return U("div",{className:"py-4",children:t})}function kt({defaultIndex:e=0,children:t}){let o=fr(()=>mr.toArray(t).filter(l=>ur(l)&&l.props?.label),[t]),{active:r,setActive:n,tabRefs:a,indicatorStyle:i}=Pt({initialIndex:e,tabs:o});return U("div",{className:"my-8 w-full group/tabs",children:Oe(q.Tabs,{selectedKey:r.toString(),onSelectionChange:l=>n(Number(l)),className:"w-full",children:[Oe(q.TabList,{"aria-label":"Content Tabs",className:m(gr()),children:[o.map((l,s)=>{let{label:c,icon:d,disabled:p}=l.props,g=s.toString();return Oe(q.Tab,{id:g,isDisabled:p,ref:b=>{a.current[s]=b},className:({isSelected:b,isDisabled:y})=>m(hr({isActive:b,isDisabled:y})),children:[!!d&&U("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:d}),U("span",{children:c})]},g)}),U("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:i,"aria-hidden":"true"})]}),o.map((l,s)=>U(q.TabPanel,{id:s.toString(),children:o[s]},s))]})})}import{useRef as xr,useState as br,useEffect as vr}from"react";import{jsx as Lt,jsxs as yr}from"react/jsx-runtime";function At({src:e,poster:t,alt:o,children:r,controls:n,preload:a="metadata",...i}){let l=xr(null),[s,c]=br(!1);return vr(()=>{let d=l.current;if(!d)return;let p=new IntersectionObserver(([g])=>{g.isIntersecting&&(c(!0),p.disconnect())},{rootMargin:"200px"});return p.observe(d),()=>p.disconnect()},[]),Lt("div",{ref:l,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:s?yr("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...i,children:[r,"Your browser does not support the video tag."]}):Lt("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}import{cva as Cr}from"class-variance-authority";import{jsx as wr}from"react/jsx-runtime";var Rr=Cr("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight",{variants:{variant:{default:"bg-bg-surface text-text-muted border-border-subtle",primary:"bg-primary-500/15 text-primary-400 border-primary-500/20",success:"bg-emerald-500/15 text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",danger:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-sky-500/15 text-sky-400 border-sky-500/20"}},defaultVariants:{variant:"default"}});function Mt({variant:e="default",children:t,className:o="",...r}){return wr("span",{className:m(Rr({variant:e}),o),...r,children:t})}import{useCallback as Pr,useRef as Bt}from"react";import*as St from"react-aria-components";import{cva as Nr}from"class-variance-authority";import{Fragment as kr,jsx as X,jsxs as Et}from"react/jsx-runtime";var Tr=Nr("grid gap-4 my-6",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{cols:3}});function Vt({cols:e=3,children:t,className:o="",...r}){return X("div",{className:m(Tr({cols:e}),o),...r,children:t})}function Ht({title:e,icon:t,href:o,children:r,className:n="",...a}){let i=Bt(null),l=Bt(null),s=Pr(p=>{let g=i.current||l.current;if(!g)return;let{left:b,top:y}=g.getBoundingClientRect();g.style.setProperty("--x",`${p.clientX-b}px`),g.style.setProperty("--y",`${p.clientY-y}px`)},[]),c=Et(kr,{children:[X("div",{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)"}}),t&&X("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3",children:t}),Et("div",{className:"space-y-1.5",children:[e&&X("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&X("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),d=m("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return o?X(St.Link,{ref:l,href:o,className:m(d,"no-underline cursor-pointer"),onMouseMove:s,...a,children:c}):X("div",{ref:i,role:"presentation",className:d,onMouseMove:s,...a,children:c})}import{Info as Lr,Lightbulb as Ar,AlertTriangle as Mr,ShieldAlert as Br,Bookmark as Er,Zap as Sr,Flame as Vr}from"lucide-react";import{cva as Hr}from"class-variance-authority";import{jsx as N,jsxs as zt}from"react/jsx-runtime";var Ir={note:N(Er,{size:18}),tip:N(Ar,{size:18}),info:N(Lr,{size:18}),warning:N(Mr,{size:18}),danger:N(Br,{size:18}),important:N(Vr,{size:18}),caution:N(Sr,{size:18})},zr={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},It=Hr("py-4 px-4 rounded-lg",{variants:{type:{note:"border-primary-400 bg-primary-500/5 text-primary-400",tip:"border-emerald-500 bg-emerald-500/5 text-emerald-500",info:"border-sky-500 bg-sky-500/5 text-sky-500",warning:"border-amber-500 bg-amber-500/5 text-amber-500",danger:"border-red-500 bg-red-500/5 text-red-500",important:"border-orange-500 bg-orange-500/5 text-orange-500",caution:"border-yellow-500 bg-yellow-500/5 text-yellow-500"}},defaultVariants:{type:"note"}});function F({type:e="note",title:t,children:o,className:r="",...n}){return zt("div",{className:m(It({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[zt("div",{className:"flex items-center flex-row gap-2 mb-2",children:[N("span",{className:m("shrink-0",It({type:e})),children:Ir[e]}),N("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||zr[e]})]}),N("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var Dt=e=>N(F,{type:"note",...e}),Ot=e=>N(F,{type:"tip",...e}),Wt=e=>N(F,{type:"warning",...e}),Ft=e=>N(F,{type:"danger",...e}),$t=e=>N(F,{type:"info",...e}),Gt=e=>N(F,{type:"important",...e}),_t=e=>N(F,{type:"caution",...e});import{Children as Dr,isValidElement as Or}from"react";import{Check as Wr,ChevronRight as Fr,Circle as $r}from"lucide-react";import{cva as We}from"class-variance-authority";import{jsx as J,jsxs as Xr}from"react/jsx-runtime";var Gr=We("my-6 transition-all duration-200",{variants:{variant:{default:"list-disc pl-5 text-text-muted marker:text-primary-500/50",number:"list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold",checked:"list-none p-0",arrow:"list-none p-0",bubble:"list-none p-0"},cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"},isGrid:{true:"grid gap-x-8 gap-y-3",false:"space-y-2"},dense:{true:"space-y-1",false:"space-y-2"}},compoundVariants:[{variant:"default",dense:!0,className:"space-y-0.5"}],defaultVariants:{variant:"default",cols:1,isGrid:!1,dense:!1}}),_r=We("group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200",{variants:{variant:{default:"",number:"",checked:"hover:translate-x-0.5",arrow:"hover:translate-x-0.5",bubble:"hover:translate-x-0.5"},dense:{true:"py-0",false:"py-0.5"}},defaultVariants:{variant:"default",dense:!1}}),Ur=We("mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110",{variants:{variant:{bubble:"h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold",default:""}},defaultVariants:{variant:"default"}});function qr({icon:e,children:t,variant:o,dense:r}){return Xr("li",{className:m(_r({variant:o,dense:r})),children:[e&&J("span",{className:m(Ur({variant:o==="bubble"?"bubble":"default"})),children:e}),J("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Jr={checked:e=>J(Wr,{size:14,className:m("text-emerald-500 shrink-0",e)}),arrow:e=>J(Fr,{size:14,className:m("text-primary-400 shrink-0",e)}),bubble:e=>J($r,{size:6,fill:"currentColor",className:m("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Ut({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...a}){let i=t!==void 0&&Number(t)>1,l=Jr[e],s=Gr({variant:e,cols:t,dense:o,isGrid:i,className:n}),c=e==="number"?"ol":"ul";return e==="default"||e==="number"?J(c,{className:s,...a,children:r}):J("ul",{className:s,...a,children:Dr.map(r,d=>{if(!Or(d))return d;let p=d,g=p.type==="li"?p.props.children:p.props.children||d;return J(qr,{icon:l(),variant:e,dense:o,children:g})})})}import{Children as Fe,isValidElement as qe,useMemo as Kr}from"react";import*as H from"react-aria-components";import{Folder as Yr,FileText as jr,File as Zr,FileCode as Qr,FileImage as en,ChevronRight as tn}from"lucide-react";import{jsx as T,jsxs as _e}from"react/jsx-runtime";var ae=16,ge=2,on={ts:Ne,tsx:te,js:Te,jsx:te,json:ke,css:Le,html:Ae,md:oe,mdx:oe,bash:re,sh:re,yaml:ne,yml:ne},$e={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function Ue(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(Ue).join(""):qe(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?Ue(e.props.children):""}function rn(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return T(Yr,{size:ae,strokeWidth:ge,className:m(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=o.split(".").pop()||"",a=on[n];if(a)return T(a,{size:ae});let i=m(r,"text-text-dim group-hover:text-text-main");return $e.CODE.test(o)?T(Qr,{size:ae,strokeWidth:ge,className:i}):$e.TEXT.test(o)?T(jr,{size:ae,strokeWidth:ge,className:i}):$e.IMAGE.test(o)?T(en,{size:ae,strokeWidth:ge,className:i}):T(Zr,{size:ae,strokeWidth:ge,className:i})}function Ge(e,t){if(!qe(e))return!1;let o=e.type;if(typeof o=="string")return o===t;if(typeof o=="function")return o.name===t||o.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function nn(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Me(e,t="root"){if(!qe(e))return[];let o=[];if(Ge(e,"ul"))return Fe.forEach(e.props.children,(r,n)=>{o.push(...Me(r,`${t}-${n}`))}),o;if(Ge(e,"li")){let r=Fe.toArray(e.props.children),n=r.findIndex(y=>Ge(y,"ul")),a=n!==-1,i=a?r.slice(0,n):r,l=a?r.slice(n):[],s=Ue(i),{name:c,comment:d}=nn(s),p=c.endsWith("/"),g=p?c.slice(0,-1):c,b=a||p;return o.push({id:`${t}-${g}`,name:g,comment:d,isFolder:b,children:a?Me(l[0],`${t}-${g}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&Fe.forEach(e.props.children,(r,n)=>{o.push(...Me(r,`${t}-${n}`))}),o}function qt({item:e}){return _e(H.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[T(H.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>_e("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[T("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?T(H.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:T(tn,{size:14,strokeWidth:3,className:m("transition-transform duration-200",t&&"rotate-90")})}):T("div",{className:"w-[18px]"}),rn(e.name,e.isFolder),T("span",{className:m("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&_e("span",{className:"ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans",children:["//"," ",e.comment]})]})}),e.children&&T(H.Collection,{items:e.children,children:t=>T(qt,{item:t})})]})}function Jt({children:e}){let t=Kr(()=>Me(e),[e]);return T("div",{className:"my-8",children:T(H.Tree,{items:t,"aria-label":"File Tree",className:m("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:o=>T(qt,{item:o})})})}import*as he from"react-aria-components";import{useState as Xt,useMemo as Kt}from"react";function Yt({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,a]=Xt(null),[i,l]=Xt(1),s=Kt(()=>{if(!e)return[];let g=[...e];return t&&n!==null&&g.sort((b,y)=>{let w=b[n.key],h=y[n.key],B=typeof w=="string"?w:"",x=typeof h=="string"?h:"";return B<x?n.direction==="asc"?-1:1:B>x?n.direction==="asc"?1:-1:0}),g},[e,n,t]),c=Math.ceil(s.length/r),d=Kt(()=>{if(!o)return s;let g=(i-1)*r;return s.slice(g,g+r)},[s,o,i,r]);return{sortConfig:n,currentPage:i,setCurrentPage:l,totalPages:c,paginatedData:d,requestSort:g=>{if(!t)return;let b="asc";n&&n.key===g&&n.direction==="asc"&&(b="desc"),a({key:g,direction:b})}}}import{ChevronUp as sn,ChevronDown as jt,ChevronLeft as an,ChevronRight as ln,ChevronsLeft as cn,ChevronsRight as dn}from"lucide-react";import{Fragment as pn,jsx as P,jsxs as ie}from"react/jsx-runtime";function Zt({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:a=!1,pageSize:i=10}){let{sortConfig:l,currentPage:s,setCurrentPage:c,totalPages:d,paginatedData:p,requestSort:g}=Yt({data:t,sortable:n,paginated:a,pageSize:i}),b=w=>n?l?.key!==w?P(jt,{size:14,className:"ml-1 opacity-30"}):l.direction==="asc"?P(sn,{size:14,className:"ml-1 text-primary-400"}):P(jt,{size:14,className:"ml-1 text-primary-400"}):null,y=o||ie(pn,{children:[e&&P("thead",{children:P("tr",{children:e.map((w,h)=>P("th",{onClick:()=>g(h),className:m("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:ie("div",{className:"flex items-center",children:[w,b(h)]})},h))})}),p&&P("tbody",{children:p.map((w,h)=>P("tr",{className:"transition-colors hover:bg-bg-surface",children:w.map((B,x)=>P("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:B},x))},h))})]});return ie("div",{className:m("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[P("div",{className:"overflow-x-auto",children:P("table",{className:"w-full border-collapse text-sm",children:y})}),a&&d>1&&ie("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[ie("span",{className:"text-xs text-text-muted",children:["Page ",s," of ",d]}),ie("div",{className:"flex items-center gap-1",children:[P(he.Button,{onPress:()=>c(1),isDisabled:s===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:P(cn,{size:16})}),P(he.Button,{onPress:()=>c(w=>Math.max(w-1,1)),isDisabled:s===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:P(an,{size:16})}),P(he.Button,{onPress:()=>c(w=>Math.min(w+1,d)),isDisabled:s===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:P(ln,{size:16})}),P(he.Button,{onPress:()=>c(d),isDisabled:s===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:P(dn,{size:16})})]})]})]})}import{jsx as le,jsxs as xe}from"react/jsx-runtime";function Qt({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:a,className:i=""}){return xe("article",{className:m("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",i),id:a,children:[xe("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[xe("div",{className:"flex flex-wrap items-center gap-2.5",children:[le("code",{className:"inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors group-hover:bg-primary-500/15",children:e}),t&&le("span",{className:"rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm",children:t}),r&&xe("div",{className:"flex items-center gap-1.5 rounded-full bg-red-500/10 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-red-400 border border-red-500/20 shadow-sm",children:[le("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&xe("div",{className:"flex items-center gap-2 text-[11px] text-text-muted bg-bg-muted/30 px-2.5 py-1 rounded-md border border-border-subtle/50",children:[le("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),le("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),le("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}import{jsx as mn}from"react/jsx-runtime";function eo({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=m("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return mn(Z,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}import{jsx as un}from"react/jsx-runtime";function to({src:e,alt:t,theme:o,...r}){let{theme:n}=ct();return o&&o!==n?null:un("img",{src:e,alt:t||"",...r})}import{jsx as k,jsxs as be}from"react/jsx-runtime";function oo({title:e,props:t,className:o=""}){return be("div",{className:m("my-6",o),children:[e&&k("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),k("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:be("table",{className:"w-full border-collapse text-sm",children:[k("thead",{children:be("tr",{children:[k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Property"}),k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Type"}),k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Default"}),k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Description"})]})}),k("tbody",{children:t.map((r,n)=>be("tr",{className:"transition-colors hover:bg-bg-surface",children:[be("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[k("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&k("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:k("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?k("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):k("span",{className:"text-text-dim",children:"\u2014"})}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}import{useMemo as ro}from"react";function no(e){let{code:t,children:o,preview:r}=e,n=ro(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),a=ro(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:a}}import{jsx as Je,jsxs as fn}from"react/jsx-runtime";function so(e){let{highlightedHtml:t,hideCode:o=!1,hideCopy:r=!1}=e,{initialCode:n,previewElement:a}=no(e);return fn("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[Je("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:a}),!o&&Je("div",{className:"border-t border-border-subtle",children:Je(_,{hideCopy:r,lang:"tsx",highlightedHtml:t,plain:!0,children:n})})]})}import{useState as kn}from"react";import{Copy as io,Check as Ln,ExternalLink as An,ChevronDown as Mn}from"lucide-react";import{jsx as gn}from"react/jsx-runtime";var Xe=({children:e,className:t,vertical:o=!1})=>gn("div",{className:m("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});import{Check as xn,ChevronRight as bn,Dot as vn}from"lucide-react";import ao from"react";import*as R from"react-aria-components";import*as ce from"react-aria-components";import{jsx as Ke,jsxs as hn}from"react/jsx-runtime";var Ye=({children:e,className:t,showArrow:o,...r})=>hn(ce.Popover,{offset:8,...r,className:ce.composeRenderProps(t,n=>m("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none",n)),children:[o&&Ke(ce.OverlayArrow,{className:"group",children:Ke("svg",{viewBox:"0 0 12 12",className:"block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90","aria-hidden":"true",children:Ke("path",{d:"M0 0 L6 6 L12 0"})})}),e]});import{Fragment as Nn,jsx as V,jsxs as ve}from"react/jsx-runtime";function yn(e){let[t,o]=ao.Children.toArray(e.children).slice(0,2);return ve(R.MenuTrigger,{...e,children:[t,V(Ye,{placement:e.placement,className:"min-w-35",children:o})]})}function Cn(e){let[t,o]=ao.Children.toArray(e.children).slice(0,2);return ve(R.SubmenuTrigger,{...e,children:[t,V(Ye,{offset:-4,crossOffset:-4,children:o})]})}function M(e){return V(R.Menu,{...e,className:R.composeRenderProps(e.className,t=>m("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function Rn(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return V(R.MenuItem,{...e,textValue:t,className:R.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:a})=>m("group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none","text-text-main text-[12px]",{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":r,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":a},o)),children:R.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:a})=>ve(Nn,{children:[r!=="none"&&ve("span",{className:"flex items-center size-4 shrink-0 justify-center",children:[n&&r==="multiple"&&V(xn,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&V(vn,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),V("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:o}),a&&V(bn,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function wn({title:e,...t}){return ve(R.MenuSection,{...t,className:m("flex flex-col gap-0.5",t.className),children:[e&&V(R.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),V(R.Collection,{items:t.items,children:t.children})]})}function Pn(e){return V(R.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}M.Root=M;M.Item=Rn;M.Trigger=yn;M.SubTrigger=Cn;M.Section=wn;M.Separator=Pn;import{jsx as Tn}from"react/jsx-runtime";function L({className:e,variant:t="rect",...o}){return Tn("div",{className:m("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}import{Separator as Fl}from"react-aria-components";import{ToggleButton as Gl}from"react-aria-components";import{jsx as I,jsxs as ye}from"react/jsx-runtime";var Bn=e=>{let[t,o]=kn(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(a);window.open(i,"_blank")}}};function lo({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:i}=Bn(r),l=o!==!1,s=typeof o=="object"&&o.text||"Copy Markdown";return!l||!r?null:I("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:ye(Xe,{className:"rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden",children:[I(ee,{variant:"ghost",onPress:a,icon:n?I(Ln,{size:16}):I(io,{size:16}),iconPosition:"left",className:m("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":s}),ye(M.Trigger,{placement:"bottom end",children:[I(ee,{variant:"ghost",isIconOnly:!0,icon:I(Mn,{size:14}),className:m("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),ye(M.Root,{className:"w-52",children:[ye(M.Item,{onAction:a,children:[I(io,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),I("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),ye(M.Item,{onAction:i,children:[I(An,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),I("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}import{jsx as A,jsxs as K}from"react/jsx-runtime";function co(){return A("div",{className:m("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:K("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[K("div",{className:"flex gap-2",children:[A(L,{className:"h-3 w-16"}),A(L,{className:"h-3 w-24"})]}),A(L,{className:"h-10 w-[60%] sm:h-12"}),K("div",{className:"space-y-3",children:[A(L,{className:"h-4 w-full"}),A(L,{className:"h-4 w-[95%]"}),A(L,{className:"h-4 w-[40%]"})]}),K("div",{className:"space-y-6 pt-4",children:[A(L,{className:"h-7 w-32"}),K("div",{className:"space-y-3",children:[A(L,{className:"h-4 w-full"}),A(L,{className:"h-4 w-[98%]"}),A(L,{className:"h-4 w-[92%]"}),A(L,{className:"h-4 w-[60%]"})]})]}),A(L,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),K("div",{className:"space-y-6 pt-4",children:[A(L,{className:"h-7 w-48"}),K("div",{className:"space-y-3",children:[A(L,{className:"h-4 w-full"}),A(L,{className:"h-4 w-[85%]"})]})]})]})})}import{jsx as $,jsxs as Sn}from"react/jsx-runtime";var de=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return Sn(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&$("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:$(En,{size:16})})]})},po={...je,Loading:co,h1:e=>$(de,{level:1,...e}),h2:e=>$(de,{level:2,...e}),h3:e=>$(de,{level:3,...e}),h4:e=>$(de,{level:4,...e}),h5:e=>$(de,{level:5,...e}),h6:e=>$(de,{level:6,...e}),pre:e=>$(_,{...e,children:e.children})};import Hn from"virtual:boltdocs-mdx-components";import{useLocation as In}from"react-router-dom";import{Fragment as On,jsx as v,jsxs as Be}from"react/jsx-runtime";function zn(){let{currentLocale:e,config:t}=pe();return Qe(()=>{if(!t.i18n)return;let o=t.i18n.localeConfigs?.[e];document.documentElement.lang=o?.htmlLang||e||"en",document.documentElement.dir=o?.direction||"ltr"},[e,t.i18n]),null}function Dn(){let e=In(),{config:t}=pe(),o=D(i=>i.setLocale),r=D(i=>i.setVersion),n=D(i=>i.currentLocale),a=D(i=>i.currentVersion);return Qe(()=>{let i=e.pathname.split("/").filter(Boolean),l=0,s=t.versions?.defaultVersion,c=t.i18n?.defaultLocale;if(i[l]==="docs"&&l++,t.versions&&i.length>l){let d=t.versions.versions.find(p=>p.path===i[l]);d&&(s=d.path,l++)}t.i18n&&i.length>l&&t.i18n.locales[i[l]]?c=i[l]:t.i18n&&i.length===0&&(c=n||t.i18n.defaultLocale),c!==n&&o(c),s!==a&&r(s)},[e.pathname,t,o,r,n,a]),null}function go({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:a,externalPages:i,externalLayout:l,components:s={}}){let[c,d]=mo(e),[p,g]=mo(t),b=i||{},y=l||fo,w=uo(()=>c.filter(x=>!(a&&(x.path==="/"||x.path===""))&&!b[x.path===""?"/":x.path]).map(x=>{let E=Object.keys(r).find(z=>z===`/${o}/${x.filePath}`||z.endsWith(`/${o}/${x.filePath}`)||z.endsWith(`/${o}\\${x.filePath.replace(/\\/g,"/")}`)),j=E?r[E]:null;return{...x,Component:Ze.lazy(async()=>j?await j():{default:Ve})}}),[c,r,o,a,b]);Qe(()=>{n&&(n.on("boltdocs:routes-update",x=>{d(x)}),n.on("boltdocs:config-update",x=>{g(x)}))},[n]);let h=uo(()=>({...po,...Hn,...s}),[s]),B=h.Loading;return v(lt,{children:v(ht,{components:h,children:v(Ee.Provider,{value:p,children:v(dt,{children:Be(ot,{routes:c,modules:r,children:[v(pt,{}),v(Dn,{}),v(zn,{}),Be(Vn,{children:[v(Y,{element:v(ut,{}),children:w.map(x=>v(Y,{path:x.path===""?"/":x.path,element:v(Ze.Suspense,{fallback:v(B,{}),children:v(xt,{Component:x.Component})})},x.path))},"docs-layout"),a&&Be(On,{children:[v(Y,{path:"/",element:v(y,{children:v(a,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(x=>v(Y,{path:`/${x}`,element:v(y,{children:v(a,{})})},`home-${x}`))]}),Object.entries(b).map(([x,E])=>{let j=x==="/"?"":x;return Be(Ze.Fragment,{children:[v(Y,{path:x,element:v(y,{children:v(E,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(z=>v(Y,{path:`/${z}${j}`,element:v(y,{children:v(E,{})})},`${x}-${z}`))]},x)}),v(Y,{path:"*",element:v(fo,{children:v(Ve,{})})})]})]})})})})})}import{jsx as et}from"react/jsx-runtime";async function jc(e){let{path:t,routes:o,config:r,modules:n,homePage:a,externalPages:i,docsDirName:l}=e,s={};for(let[d,p]of Object.entries(n))s[d]=()=>Promise.resolve(p);return Fn.renderToString(et(Wn.StrictMode,{children:et($n,{location:t,children:et(go,{initialRoutes:o,initialConfig:r,docsDirName:l,modules:s,homePage:a,externalPages:i})})}))}export{jc as render};
|
|
1
|
+
/**
|
|
2
|
+
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
+
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import e,{Children as t,createContext as n,isValidElement as r,startTransition as i,use as a,useCallback as o,useContext as s,useEffect as c,useLayoutEffect as l,useMemo as u,useRef as d,useState as f}from"react";import p from"react-dom/server";import{StaticRouter as m}from"react-router-dom/server.js";import"react-dom/client";import{Outlet as h,Route as g,Routes as _,useHref as v,useLocation as y,useNavigate as b}from"react-router-dom";import{AlertTriangle as ee,ArrowLeft as x,Bookmark as te,Check as S,ChevronDown as C,ChevronLeft as ne,ChevronRight as w,ChevronUp as re,ChevronsLeft as ie,ChevronsRight as ae,Circle as oe,Copy as T,Dot as se,ExternalLink as ce,File as le,FileCode as ue,FileImage as de,FileText as fe,Flame as pe,Folder as me,Info as he,Lightbulb as ge,Link as _e,ShieldAlert as ve,Zap as ye}from"lucide-react";import*as E from"react-aria-components";import{Link as be,RouterProvider as xe}from"react-aria-components";import{Fragment as D,jsx as O,jsxs as k}from"react/jsx-runtime";import{clsx as Se}from"clsx";import{twMerge as Ce}from"tailwind-merge";import A from"virtual:boltdocs-layout";import{cva as j}from"class-variance-authority";import we from"virtual:boltdocs-mdx-components";var Te=Object.defineProperty,Ee=(e,t)=>{let n={};for(var r in e)Te(n,r,{get:e[r],enumerable:!0});return t||Te(n,Symbol.toStringTag,{value:`Module`}),n};const De=n(null);function M(){let e=a(De);if(!e)throw Error(`useConfig must be used within a ConfigProvider`);return e}const Oe=n({preload:()=>{},routes:[]});function ke(){return a(Oe)}function Ae({routes:e,modules:t,children:n}){let r=d(null),i=o(n=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let r=n.split(`#`)[0].split(`?`)[0],i=e.find(e=>e.path===r||r===`/`&&e.path===``);if(i?.filePath){let e=Object.keys(t).find(e=>e.endsWith(`/`+i.filePath));e&&t[e]().catch(e=>{console.error(`[boltdocs] Failed to preload route ${n}:`,e)})}},100)},[e,t]);return O(Oe.Provider,{value:{preload:i,routes:e},children:n})}const je=n(void 0),Me=`boltdocs-storage`;function Ne(){try{let e=localStorage.getItem(Me);if(e){let t=JSON.parse(e);return t?.state||t}}catch{}return{}}function Pe({children:e}){let t=Ne(),[n,r]=f(t.currentLocale),[i,a]=f(t.currentVersion),[s,l]=f(!1);c(()=>{l(!0)},[]),c(()=>{if(s){let e={currentLocale:n,currentVersion:i};try{localStorage.setItem(Me,JSON.stringify({state:e}))}catch{}}},[n,i,s]);let u={currentLocale:n,currentVersion:i,hasHydrated:s,setLocale:o(e=>{r(e)},[]),setVersion:o(e=>{a(e)},[]),setHasHydrated:o(e=>{l(e)},[])};return O(je.Provider,{value:u,children:e})}function Fe(){let e=s(je);if(!e)throw Error(`useBoltdocsContext must be used within a BoltdocsProvider`);return e}function N(e){return e(Fe())}function P(){let{routes:e}=ke(),t=M(),n=y(),r=N(e=>e.currentLocale),i=N(e=>e.currentVersion),a=N(e=>e.hasHydrated),o=e.find(e=>e.path===n.pathname),s=t.i18n?o?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,c=t.versions?o?.version||(a?i:void 0)||t.versions.defaultVersion:void 0,l=e.filter(n=>{let r=t.i18n?(n.locale||t.i18n.defaultLocale)===s:!0,i=t.versions?(n.version||t.versions.defaultVersion)===c:!0;if(!(r&&i))return!1;let a=t.i18n;if(a){let t=!!o?.locale,r=!!n.locale;if(e.some(e=>e!==n&&e.filePath===n.filePath&&e.version===n.version&&(e.locale||a.defaultLocale)===(n.locale||a.defaultLocale))&&t!==r)return!1}return!0}),u=t.i18n?.localeConfigs?.[s]?.label||t.i18n?.locales[s]||s,d=t.versions?.versions.find(e=>e.path===c)?.label||c;return{routes:l,allRoutes:e,currentRoute:o,currentLocale:s,currentLocaleLabel:u,availableLocales:t.i18n?Object.entries(t.i18n.locales).map(([e,n])=>({key:e,label:t.i18n?.localeConfigs?.[e]?.label||n,isCurrent:e===s})):[],currentVersion:c,currentVersionLabel:d,availableVersions:t.versions?t.versions.versions.map(e=>({key:e.path,label:e.label,isCurrent:e.path===c})):[],config:t}}function Ie(e){let t=M(),{currentLocale:n,currentVersion:r}=P();if(!t||typeof e!=`string`||e.startsWith(`http`)||e.startsWith(`//`))return e;let i=t.i18n,a=t.versions;if(!i&&!a)return e;let o=e.startsWith(`/docs`),s=e.split(`/`).filter(Boolean),c=0;s[c]===`docs`&&c++,a&&s.length>c&&a.versions.find(e=>e.path===s[c])&&c++,i&&s.length>c&&i.locales[s[c]]&&c++;let l=s.slice(c),u=[];o&&(u.push(`docs`),a&&r&&u.push(r)),i&&n&&n!==i.defaultLocale&&u.push(n),u.push(...l);let d=`/${u.join(`/`)}`;return d.length>1&&d.endsWith(`/`)?d.slice(0,-1):d||`/`}function F(...e){return Ce(Se(e))}const I=e.forwardRef((e,t)=>{let{href:n,prefetch:r=`hover`,onMouseEnter:i,onFocus:a,...o}=e,s=Ie(n??``),{preload:c}=ke(),l=e=>{i?.(e),r===`hover`&&typeof s==`string`&&s.startsWith(`/`)&&c(s)},u=e=>{a?.(e),r===`hover`&&typeof s==`string`&&s.startsWith(`/`)&&c(s)};return O(be,{...o,ref:t,href:s,onMouseEnter:l,onFocus:u})});I.displayName=`Link`;const Le=e.forwardRef((e,t)=>{let{href:n,end:r=!1,className:i,children:a,...o}=e,s=y(),c=Ie(n??``),l=r?s.pathname===c:s.pathname.startsWith(c),u=typeof i==`function`?i({isActive:l}):F(i,l&&`active`),d=typeof a==`function`?a({isActive:l}):a;return O(I,{...o,ref:t,href:n,className:u,children:d})});Le.displayName=`NavLink`;function Re(){return O(`div`,{className:`flex items-center justify-center min-h-[60vh] text-center`,children:k(`div`,{className:`space-y-4`,children:[O(`span`,{className:`text-8xl font-black tracking-tighter text-primary-500/20`,children:`404`}),O(`h1`,{className:`text-2xl font-bold text-text-main`,children:`Page Not Found`}),O(`p`,{className:`text-sm text-text-muted max-w-sm mx-auto`,children:`The page you're looking for doesn't exist or has been moved.`}),k(I,{href:`/`,className:`inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30`,children:[O(x,{size:16}),` Go to Home`]})]})})}const ze=n(void 0);function Be({children:e}){let[t,n]=f(`system`),[r,i]=f(`dark`),[a,o]=f(!1);return c(()=>{o(!0);let e=localStorage.getItem(`boltdocs-theme`),t=e===`light`||e===`dark`||e===`system`?e:`system`;n(t);let r=window.matchMedia(`(prefers-color-scheme: dark)`);((e,t)=>{i(e===`system`?t?`dark`:`light`:e)})(t,r.matches);let a=e=>{i(t=>(localStorage.getItem(`boltdocs-theme`)||`system`)===`system`?e.matches?`dark`:`light`:t)};return r.addEventListener(`change`,a),()=>r.removeEventListener(`change`,a)},[]),c(()=>{if(!a)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`).matches,n=t===`system`?e?`dark`:`light`:t;i(n);let r=document.documentElement;n===`light`?(r.classList.add(`theme-light`),r.dataset.theme=`light`):(r.classList.remove(`theme-light`),r.dataset.theme=`dark`)},[t,a]),O(ze.Provider,{value:{theme:t,resolvedTheme:r,setTheme:e=>{n(e),localStorage.setItem(`boltdocs-theme`,e)}},children:e})}function Ve(){let e=a(ze);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function He({children:e}){let t=b();return O(xe,{navigate:(e,n)=>{i(()=>{t(e,n)})},useHref:v,children:e})}function Ue(){let{pathname:e,hash:t}=y();return l(()=>{let e=document.querySelector(`.boltdocs-content`)||window,n=()=>e===window?window.scrollY:e.scrollTop,r=(t,n=`auto`)=>{e===window?window.scrollTo({top:t,behavior:n}):e.scrollTo({top:t,behavior:n})};if(t){let i=t.replace(`#`,``),a=document.getElementById(i);if(a){let t=e===window?0:e.getBoundingClientRect().top;r(a.getBoundingClientRect().top-t-80+n(),`smooth`);return}}r(0)},[e,t]),null}function We(){return O(A,{children:O(h,{})})}const Ge=n({});function Ke(){return a(Ge)}function qe({components:e,children:t}){return O(Ge.Provider,{value:e,children:t})}function Je({Component:e}){return O(e,{components:Ke()})}const L=j(`flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none`,{variants:{variant:{primary:`bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg`,secondary:`bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong`,outline:`bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500`,ghost:`bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main`,danger:`bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15`,success:`bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15`,warning:`bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15`,info:`bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15`,subtle:`bg-primary-500/10 text-primary-500 hover:bg-primary-500/20`,link:`bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline`},size:{sm:`min-h-8 px-3.5 text-[0.8125rem] gap-1.5`,md:`min-h-10 px-5 text-[0.9375rem] gap-2`,lg:`min-h-12 px-7 text-[1.05rem] gap-2.5`},rounded:{none:`rounded-none`,sm:`rounded-sm`,md:`rounded-md`,lg:`rounded-lg`,full:`rounded-full`},iconSize:{sm:`w-8 h-8 p-0`,md:`w-10 h-10 p-0`,lg:`w-12 h-12 p-0`},disabled:{true:`opacity-50 cursor-not-allowed pointer-events-none`,false:null}},defaultVariants:{variant:`primary`,size:`md`,rounded:`md`}}),R=({href:e,icon:t,iconPosition:n=`left`,isIconOnly:r,children:i,className:a,variant:o,size:s,rounded:c,iconSize:l,disabled:u,...d})=>{let f=r||!i&&!!t,p=f?O(`span`,{className:`inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]`,children:t}):k(D,{children:[t&&n===`left`&&O(`span`,{className:`inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]`,children:t}),O(`span`,{className:`flex items-center`,children:i}),t&&n===`right`&&O(`span`,{className:`inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]`,children:t})]});return e?O(E.Link,{href:e,className:F(L({variant:o,size:s,rounded:c,iconSize:f?l:void 0,disabled:u}),a),...d,children:p}):O(E.Button,{className:F(L({variant:o,size:s,rounded:c,iconSize:f?l:void 0,disabled:u}),a),...d,children:p})},Ye=({className:e,variant:t,size:n,rounded:r,iconSize:i,disabled:a,...o})=>O(R,{className:F(`group`,L({variant:t,size:n,rounded:r,iconSize:i,disabled:a,className:e})),...o}),Xe=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);return t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t),!0}};function Ze(e){let{title:t}=e,[n,r]=f(!1),[i,a]=f(!1),[s,l]=f(!1),u=d(null);M();let p=o(async()=>{Xe(u.current?.textContent??``),r(!0),setTimeout(()=>r(!1),2e3)},[]);return c(()=>{l((u.current?.textContent?.length??0)>120)},[e.children,e.highlightedHtml]),{copied:n,isExpanded:i,setIsExpanded:a,isExpandable:s,preRef:u,handleCopy:p,shouldTruncate:s&&!i}}function z(e){let{size:t=20,...n}=e;return{...n,width:t,height:t}}const Qe=e=>k(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...z(e),children:[O(`title`,{children:`TypeScript`}),O(`path`,{fill:`#2563EB`,d:`M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z`})]}),$e=e=>k(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...z(e),children:[O(`title`,{children:`JavaScript`}),O(`path`,{fill:`#F59E0B`,d:`M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z`})]}),et=e=>k(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...z(e),children:[O(`title`,{children:`JSON`}),O(`path`,{fill:`#F59E0B`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),tt=e=>k(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...z(e),children:[O(`title`,{children:`CSS`}),O(`path`,{fill:`#0EA5E9`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),nt=e=>k(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...z(e),children:[O(`title`,{children:`HTML`}),O(`path`,{fill:`#EA580C`,d:`M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z`})]}),B=e=>k(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...z(e),children:[O(`title`,{children:`React`}),O(`path`,{fill:`#0E8ADC`,d:`M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z`}),O(`path`,{stroke:`#0E8ADC`,d:`M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z`}),O(`path`,{stroke:`#0E8ADC`,d:`M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z`}),O(`path`,{stroke:`#0E8ADC`,d:`M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z`})]}),V=e=>k(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...z(e),children:[O(`title`,{children:`Markdown`}),O(`path`,{fill:`#60A5FA`,d:`M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z`})]}),H=e=>k(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...z(e),children:[O(`title`,{children:`Shell`}),O(`path`,{stroke:`#14B8A6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M4.336 17l6-6-6-6M12.336 19h8`})]}),U=e=>k(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...z(e),children:[O(`title`,{children:`YAML`}),O(`path`,{fill:`#A78BFA`,d:`M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z`})]}),rt=({className:e,children:t,...n})=>O(E.Tooltip,{...n,offset:8,className:t=>F(`group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none`,`data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100`,`data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75`,`data-[placement=top]:slide-in-from-bottom-1`,`data-[placement=bottom]:slide-in-from-top-1`,`data-[placement=left]:slide-in-from-right-1`,`data-[placement=right]:slide-in-from-left-1`,typeof e==`function`?e(t):e),children:e=>k(D,{children:[O(E.OverlayArrow,{children:k(`svg`,{width:8,height:8,viewBox:`0 0 8 8`,className:`fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90`,children:[O(`title`,{children:`Arrow`}),O(`path`,{d:`M0 0 L4 4 L8 0`})]})}),typeof t==`function`?t(e):t]})}),W=({content:e,children:t,delay:n=500,closeDelay:r=0,...i})=>k(E.TooltipTrigger,{delay:n,closeDelay:r,children:[t,O(rt,{...i,children:e})]});W.Root=W,W.Content=rt;const it={ts:Qe,tsx:B,js:$e,jsx:B,json:et,css:tt,html:nt,md:V,mdx:V,bash:H,sh:H,yaml:U,yml:U};function G(e){let{children:t,hideCopy:n=!1,highlightedHtml:r,"data-highlighted-html":i,title:a,"data-lang":o,plain:s=!1,...c}=e,l=r||i;M();let u=e.lang||o||``,{copied:d,isExpanded:f,setIsExpanded:p,isExpandable:m,preRef:h,handleCopy:g,shouldTruncate:_}=Ze(e),v=it[u];return k(`div`,{className:F(`group relative overflow-hidden bg-(--color-code-bg)`,`contain-layout contain-paint`,{"my-6 rounded-lg border border-border-subtle":!s,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":_},e.className),children:[a&&k(`div`,{className:`flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted`,children:[v?O(v,{size:14}):O(le,{size:14,className:`opacity-60`}),O(`span`,{children:a})]}),O(`div`,{className:`absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100`,children:!n&&O(W,{content:d?`Copied!`:`Copy code`,children:O(E.Button,{onPress:g,className:F(`grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2`,d?`text-emerald-400`:`text-text-muted hover:text-text-main`),"aria-label":`Copy code`,children:O(d?S:T,{size:20})})})}),l?O(`div`,{ref:h,className:`shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!`,dangerouslySetInnerHTML:{__html:l}}):O(`pre`,{ref:h,className:`m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]`,...c,children:t}),m&&O(`div`,{className:F(_?`absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10`:`relative flex justify-center py-4`),children:O(E.Button,{onPress:()=>p(!f),className:`rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md`,children:f?`Show less`:`Expand code`})})]})}function at({initialIndex:e=0,tabs:t}){let n=t[e]?.props.disabled?t.findIndex(e=>!e.props.disabled):e,[r,i]=f(n===-1?0:n),a=d([]),[s,l]=f({opacity:0,transform:`translateX(0)`,width:0});return c(()=>{let e=a.current[r];e&&l({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[r,t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:s,handleKeyDown:o(e=>{let n=0;if(e.key===`ArrowRight`?n=1:e.key===`ArrowLeft`&&(n=-1),n!==0){let e=(r+n+t.length)%t.length;for(;t[e].props.disabled&&e!==r;)e=(e+n+t.length)%t.length;e!==r&&!t[e].props.disabled&&(i(e),a.current[e]?.focus())}},[r,t])}}const ot=j(`relative flex items-center border-b border-border-subtle gap-1 overflow-x-auto no-scrollbar`,{variants:{size:{default:`px-0`,compact:`px-2`}},defaultVariants:{size:`default`}}),st=j(`flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap`,{variants:{isActive:{true:`text-primary-500`,false:`text-text-muted hover:text-text-main`},isDisabled:{true:`opacity-40 pointer-events-none`,false:``}},defaultVariants:{isActive:!1,isDisabled:!1}});function ct({children:e}){return O(`div`,{className:`py-4`,children:typeof e==`string`?O(G,{className:`language-bash`,children:O(`code`,{children:e.trim()})}):e})}function lt({defaultIndex:e=0,children:n}){let i=u(()=>t.toArray(n).filter(e=>r(e)&&e.props?.label),[n]),{active:a,setActive:o,tabRefs:s,indicatorStyle:c}=at({initialIndex:e,tabs:i});return O(`div`,{className:`my-8 w-full group/tabs`,children:k(E.Tabs,{selectedKey:a.toString(),onSelectionChange:e=>o(Number(e)),className:`w-full`,children:[k(E.TabList,{"aria-label":`Content Tabs`,className:F(ot()),children:[i.map((e,t)=>{let{label:n,icon:r,disabled:i}=e.props,a=t.toString();return k(E.Tab,{id:a,isDisabled:i,ref:e=>{s.current[t]=e},className:({isSelected:e,isDisabled:t})=>F(st({isActive:e,isDisabled:t})),children:[!!r&&O(`span`,{className:`shrink-0 [&>svg]:w-4 [&>svg]:h-4`,children:r}),O(`span`,{children:n})]},a)}),O(`div`,{className:`absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none`,style:c,"aria-hidden":`true`})]}),i.map((e,t)=>O(E.TabPanel,{id:t.toString(),children:i[t]},t))]})})}function ut({src:e,poster:t,alt:n,children:r,controls:i,preload:a=`metadata`,...o}){let s=d(null),[l,u]=f(!1);return c(()=>{let e=s.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e.isIntersecting&&(u(!0),t.disconnect())},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[]),O(`div`,{ref:s,className:`my-6 overflow-hidden rounded-lg border border-border-subtle`,children:l?k(`video`,{className:`block w-full h-auto`,src:e,poster:t,controls:!0,preload:a,playsInline:!0,...o,children:[r,`Your browser does not support the video tag.`]}):O(`div`,{className:`aspect-video bg-bg-surface animate-pulse`,role:`img`,"aria-label":n||`Video`})})}const dt=j(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight`,{variants:{variant:{default:`bg-bg-surface text-text-muted border-border-subtle`,primary:`bg-primary-500/15 text-primary-400 border-primary-500/20`,success:`bg-emerald-500/15 text-emerald-400 border-emerald-500/20`,warning:`bg-amber-500/15 text-amber-400 border-amber-500/20`,danger:`bg-red-500/15 text-red-400 border-red-500/20`,info:`bg-sky-500/15 text-sky-400 border-sky-500/20`}},defaultVariants:{variant:`default`}});function ft({variant:e=`default`,children:t,className:n=``,...r}){return O(`span`,{className:F(dt({variant:e}),n),...r,children:t})}const pt=j(`grid gap-4 my-6`,{variants:{cols:{1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-4`}},defaultVariants:{cols:3}});function mt({cols:e=3,children:t,className:n=``,...r}){return O(`div`,{className:F(pt({cols:e}),n),...r,children:t})}function ht({title:e,icon:t,href:n,children:r,className:i=``,...a}){let s=d(null),c=d(null),l=o(e=>{let t=s.current||c.current;if(!t)return;let{left:n,top:r}=t.getBoundingClientRect();t.style.setProperty(`--x`,`${e.clientX-n}px`),t.style.setProperty(`--y`,`${e.clientY-r}px`)},[]),u=k(D,{children:[O(`div`,{className:`pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100`,style:{background:`radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)`}}),t&&O(`div`,{className:`mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3`,children:t}),k(`div`,{className:`space-y-1.5`,children:[e&&O(`h3`,{className:`text-sm font-bold text-text-main`,children:e}),r&&O(`div`,{className:`text-sm text-text-muted leading-relaxed`,children:r})]})]}),f=F(`group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden`,`transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,i);return n?O(E.Link,{ref:c,href:n,className:F(f,`no-underline cursor-pointer`),onMouseMove:l,...a,children:u}):O(`div`,{ref:s,role:`presentation`,className:f,onMouseMove:l,...a,children:u})}const gt={note:O(te,{size:18}),tip:O(ge,{size:18}),info:O(he,{size:18}),warning:O(ee,{size:18}),danger:O(ve,{size:18}),important:O(pe,{size:18}),caution:O(ye,{size:18})},_t={note:`Note`,tip:`Tip`,info:`Info`,warning:`Warning`,danger:`Danger`,important:`Important`,caution:`Caution`},vt=j(`py-4 px-4 rounded-lg`,{variants:{type:{note:`border-primary-400 bg-primary-500/5 text-primary-400`,tip:`border-emerald-500 bg-emerald-500/5 text-emerald-500`,info:`border-sky-500 bg-sky-500/5 text-sky-500`,warning:`border-amber-500 bg-amber-500/5 text-amber-500`,danger:`border-red-500 bg-red-500/5 text-red-500`,important:`border-orange-500 bg-orange-500/5 text-orange-500`,caution:`border-yellow-500 bg-yellow-500/5 text-yellow-500`}},defaultVariants:{type:`note`}});function K({type:e=`note`,title:t,children:n,className:r=``,...i}){return k(`div`,{className:F(vt({type:e}),r),role:e===`warning`||e===`danger`?`alert`:`note`,...i,children:[k(`div`,{className:`flex items-center flex-row gap-2 mb-2`,children:[O(`span`,{className:F(`shrink-0`,vt({type:e})),children:gt[e]}),O(`span`,{className:`text-sm font-bold tracking-tight text-text-main`,children:t||_t[e]})]}),O(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0`,children:n})]})}const yt=e=>O(K,{type:`note`,...e}),bt=e=>O(K,{type:`tip`,...e}),xt=e=>O(K,{type:`warning`,...e}),St=e=>O(K,{type:`danger`,...e}),Ct=e=>O(K,{type:`info`,...e}),wt=e=>O(K,{type:`important`,...e}),Tt=e=>O(K,{type:`caution`,...e}),Et=j(`my-6 transition-all duration-200`,{variants:{variant:{default:`list-disc pl-5 text-text-muted marker:text-primary-500/50`,number:`list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold`,checked:`list-none p-0`,arrow:`list-none p-0`,bubble:`list-none p-0`},cols:{1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-4`},isGrid:{true:`grid gap-x-8 gap-y-3`,false:`space-y-2`},dense:{true:`space-y-1`,false:`space-y-2`}},compoundVariants:[{variant:`default`,dense:!0,className:`space-y-0.5`}],defaultVariants:{variant:`default`,cols:1,isGrid:!1,dense:!1}}),Dt=j(`group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200`,{variants:{variant:{default:``,number:``,checked:`hover:translate-x-0.5`,arrow:`hover:translate-x-0.5`,bubble:`hover:translate-x-0.5`},dense:{true:`py-0`,false:`py-0.5`}},defaultVariants:{variant:`default`,dense:!1}}),Ot=j(`mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110`,{variants:{variant:{bubble:`h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold`,default:``}},defaultVariants:{variant:`default`}});function kt({icon:e,children:t,variant:n,dense:r}){return k(`li`,{className:F(Dt({variant:n,dense:r})),children:[e&&O(`span`,{className:F(Ot({variant:n===`bubble`?`bubble`:`default`})),children:e}),O(`div`,{className:`flex-1 text-text-muted group-hover:text-text-main transition-colors`,children:t})]})}const At={checked:e=>O(S,{size:14,className:F(`text-emerald-500 shrink-0`,e)}),arrow:e=>O(w,{size:14,className:F(`text-primary-400 shrink-0`,e)}),bubble:e=>O(oe,{size:6,fill:`currentColor`,className:F(`text-primary-500 shrink-0`,e)}),default:()=>null,number:()=>null};function jt({variant:e=`default`,cols:n=1,dense:i=!1,children:a,className:o,...s}){let c=n!==void 0&&Number(n)>1,l=At[e],u=Et({variant:e,cols:n,dense:i,isGrid:c,className:o});return e===`default`||e===`number`?O(e===`number`?`ol`:`ul`,{className:u,...s,children:a}):O(`ul`,{className:u,...s,children:t.map(a,t=>{if(!r(t))return t;let n=t,a=n.type===`li`?n.props.children:n.props.children||t;return O(kt,{icon:l(),variant:e,dense:i,children:a})})})}const Mt={ts:Qe,tsx:B,js:$e,jsx:B,json:et,css:tt,html:nt,md:V,mdx:V,bash:H,sh:H,yaml:U,yml:U},q={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function J(e){return typeof e==`string`?e:typeof e==`number`?e.toString():Array.isArray(e)?e.map(J).join(``):r(e)&&e.props&&typeof e.props==`object`&&`children`in e.props?J(e.props.children):``}function Nt(e,t){let n=e.toLowerCase(),r=`shrink-0 transition-colors duration-200`;if(t)return O(me,{size:16,strokeWidth:2,className:F(r,`text-primary-400`),fill:`currentColor`,fillOpacity:.15});let i=Mt[n.split(`.`).pop()||``];if(i)return O(i,{size:16});let a=F(r,`text-text-dim group-hover:text-text-main`);return q.CODE.test(n)?O(ue,{size:16,strokeWidth:2,className:a}):q.TEXT.test(n)?O(fe,{size:16,strokeWidth:2,className:a}):q.IMAGE.test(n)?O(de,{size:16,strokeWidth:2,className:a}):O(le,{size:16,strokeWidth:2,className:a})}function Y(e,t){if(!r(e))return!1;let n=e.type;if(typeof n==`string`)return n===t;if(typeof n==`function`)return n.name===t||n.name?.toLowerCase()===t;let i=e.props;return i?.originalType===t||i?.mdxType===t}function Pt(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function X(e,n=`root`){if(!r(e))return[];let i=[];if(Y(e,`ul`))return t.forEach(e.props.children,(e,t)=>{i.push(...X(e,`${n}-${t}`))}),i;if(Y(e,`li`)){let r=t.toArray(e.props.children),a=r.findIndex(e=>Y(e,`ul`)),o=a!==-1,s=o?r.slice(0,a):r,c=o?r.slice(a):[],{name:l,comment:u}=Pt(J(s)),d=l.endsWith(`/`),f=d?l.slice(0,-1):l,p=o||d;return i.push({id:`${n}-${f}`,name:f,comment:u,isFolder:p,children:o?X(c[0],`${n}-${f}`):void 0}),i}return e.props&&typeof e.props==`object`&&`children`in e.props&&t.forEach(e.props.children,(e,t)=>{i.push(...X(e,`${n}-${t}`))}),i}function Ft({item:e}){return k(E.TreeItem,{id:e.id,textValue:e.name,className:`outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md`,children:[O(E.TreeItemContent,{children:({isExpanded:t,hasChildItems:n})=>k(`div`,{className:`flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer`,children:[O(`div`,{style:{width:`calc((var(--tree-item-level) - 1) * 1rem)`},className:`shrink-0`}),n?O(E.Button,{slot:`chevron`,className:`outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors`,children:O(w,{size:14,strokeWidth:3,className:F(`transition-transform duration-200`,t&&`rotate-90`)})}):O(`div`,{className:`w-[18px]`}),Nt(e.name,e.isFolder),O(`span`,{className:F(`text-sm transition-colors truncate select-none`,e.isFolder?`font-semibold text-text-main`:`text-text-muted group-hover:text-text-main`),children:e.name}),e.comment&&k(`span`,{className:`ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans`,children:[`//`,` `,e.comment]})]})}),e.children&&O(E.Collection,{items:e.children,children:e=>O(Ft,{item:e})})]})}function It({children:e}){let t=u(()=>X(e),[e]);return O(`div`,{className:`my-8`,children:O(E.Tree,{items:t,"aria-label":`File Tree`,className:F(`rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none`,`max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle`,`focus-visible:ring-2 focus-visible:ring-primary-500/20`),children:e=>O(Ft,{item:e})})})}function Lt({data:e,sortable:t=!1,paginated:n=!1,pageSize:r=10}){let[i,a]=f(null),[o,s]=f(1),c=u(()=>{if(!e)return[];let n=[...e];return t&&i!==null&&n.sort((e,t)=>{let n=e[i.key],r=t[i.key],a=typeof n==`string`?n:``,o=typeof r==`string`?r:``;return a<o?i.direction===`asc`?-1:1:a>o?i.direction===`asc`?1:-1:0}),n},[e,i,t]);return{sortConfig:i,currentPage:o,setCurrentPage:s,totalPages:Math.ceil(c.length/r),paginatedData:u(()=>{if(!n)return c;let e=(o-1)*r;return c.slice(e,e+r)},[c,n,o,r]),requestSort:e=>{if(!t)return;let n=`asc`;i&&i.key===e&&i.direction===`asc`&&(n=`desc`),a({key:e,direction:n})}}}function Rt({headers:e,data:t,children:n,className:r=``,sortable:i=!1,paginated:a=!1,pageSize:o=10}){let{sortConfig:s,currentPage:c,setCurrentPage:l,totalPages:u,paginatedData:d,requestSort:f}=Lt({data:t,sortable:i,paginated:a,pageSize:o}),p=e=>i?s?.key===e?s.direction===`asc`?O(re,{size:14,className:`ml-1 text-primary-400`}):O(C,{size:14,className:`ml-1 text-primary-400`}):O(C,{size:14,className:`ml-1 opacity-30`}):null,m=n||k(D,{children:[e&&O(`thead`,{children:O(`tr`,{children:e.map((e,t)=>O(`th`,{onClick:()=>f(t),className:F(`text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm`,i&&`cursor-pointer select-none hover:text-primary-400 transition-colors`),children:k(`div`,{className:`flex items-center`,children:[e,p(t)]})},t))})}),d&&O(`tbody`,{children:d.map((e,t)=>O(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:e.map((e,t)=>O(`td`,{className:`px-3 py-2 border-b border-border-subtle text-sm text-text-muted`,children:e},t))},t))})]});return k(`div`,{className:F(`my-6 rounded-lg border border-border-subtle overflow-hidden`,r),children:[O(`div`,{className:`overflow-x-auto`,children:O(`table`,{className:`w-full border-collapse text-sm`,children:m})}),a&&u>1&&k(`div`,{className:`flex items-center justify-between border-t border-border-subtle px-4 py-3`,children:[k(`span`,{className:`text-xs text-text-muted`,children:[`Page `,c,` of `,u]}),k(`div`,{className:`flex items-center gap-1`,children:[O(E.Button,{onPress:()=>l(1),isDisabled:c===1,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:O(ie,{size:16})}),O(E.Button,{onPress:()=>l(e=>Math.max(e-1,1)),isDisabled:c===1,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:O(ne,{size:16})}),O(E.Button,{onPress:()=>l(e=>Math.min(e+1,u)),isDisabled:c===u,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:O(w,{size:16})}),O(E.Button,{onPress:()=>l(u),isDisabled:c===u,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:O(ae,{size:16})})]})]})]})}function zt({name:e,type:t,defaultValue:n,required:r=!1,children:i,id:a,className:o=``}){return k(`article`,{className:F(`group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300`,`hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5`,o),id:a,children:[k(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4`,children:[k(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[O(`code`,{className:`inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors group-hover:bg-primary-500/15`,children:e}),t&&O(`span`,{className:`rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm`,children:t}),r&&k(`div`,{className:`flex items-center gap-1.5 rounded-full bg-red-500/10 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-red-400 border border-red-500/20 shadow-sm`,children:[O(`span`,{className:`h-1 w-1 rounded-full bg-red-400 animate-pulse`}),`Required`]})]}),n&&k(`div`,{className:`flex items-center gap-2 text-[11px] text-text-muted bg-bg-muted/30 px-2.5 py-1 rounded-md border border-border-subtle/50`,children:[O(`span`,{className:`font-semibold opacity-60 uppercase tracking-tighter`,children:`Default`}),O(`code`,{className:`font-mono text-text-main font-medium`,children:n})]})]}),O(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30`,children:i})]})}function Bt({to:e,children:t,className:n=``,...r}){let i=e&&(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`));return O(I,{href:e,className:F(`text-blue-600 hover:text-blue-800 hover:underline cursor-pointer`,n),target:i?`_blank`:void 0,rel:i?`noopener noreferrer`:void 0,...r,children:t})}function Vt({src:e,alt:t,theme:n,...r}){let{theme:i}=Ve();return n&&n!==i?null:O(`img`,{src:e,alt:t||``,...r})}function Ht({title:e,props:t,className:n=``}){return k(`div`,{className:F(`my-6`,n),children:[e&&O(`h3`,{className:`text-base font-bold text-text-main mb-3`,children:e}),O(`div`,{className:`overflow-x-auto rounded-lg border border-border-subtle`,children:k(`table`,{className:`w-full border-collapse text-sm`,children:[O(`thead`,{children:k(`tr`,{children:[O(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Property`}),O(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Type`}),O(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Default`}),O(`th`,{className:`text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted`,children:`Description`})]})}),O(`tbody`,{children:t.map((e,t)=>k(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:[k(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:[O(`code`,{className:`rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400`,children:e.name}),e.required&&O(`span`,{className:`ml-1 text-red-400 font-bold`,children:`*`})]}),O(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:O(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted`,children:e.type})}),O(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:e.defaultValue?O(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400`,children:e.defaultValue}):O(`span`,{className:`text-text-dim`,children:`—`})}),O(`td`,{className:`px-4 py-2.5 border-b border-border-subtle text-text-muted`,children:e.description})]},`${e.name}-${t}`))})]})})]})}function Ut(e){let{code:t,children:n,preview:r}=e;return{initialCode:u(()=>(t??(typeof n==`string`?n:``)).trim(),[t,n]),previewElement:u(()=>r??(typeof n==`string`?null:n),[r,n])}}function Wt(e){let{highlightedHtml:t,hideCode:n=!1,hideCopy:r=!1}=e,{initialCode:i,previewElement:a}=Ut(e);return k(`div`,{className:`my-6 overflow-hidden rounded-xl border border-border-subtle`,children:[O(`div`,{className:`flex items-center justify-center p-8 bg-bg-surface`,children:a}),!n&&O(`div`,{className:`border-t border-border-subtle`,children:O(G,{hideCopy:r,lang:`tsx`,highlightedHtml:t,plain:!0,children:i})})]})}const Gt=({children:e,className:t,vertical:n=!1})=>O(`div`,{className:F(`inline-flex`,n?`flex-col`:`flex-row`,!n&&[`[&>*:not(:first-child)]:-ml-px`,`[&>*:first-child]:rounded-r-none`,`[&>*:last-child]:rounded-l-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,t?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-l-full`,`[&>*:last-child]:rounded-r-full`],t?.includes(`rounded-xl`)&&[`[&>*:first-child]:rounded-l-xl`,`[&>*:last-child]:rounded-r-xl`],t?.includes(`rounded-lg`)&&[`[&>*:first-child]:rounded-l-lg`,`[&>*:last-child]:rounded-r-lg`]],n&&[`[&>*:not(:first-child)]:-mt-px`,`[&>*:first-child]:rounded-b-none`,`[&>*:last-child]:rounded-t-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,t?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-t-full`,`[&>*:last-child]:rounded-b-full`]],t),children:e}),Kt=({children:e,className:t,showArrow:n,...r})=>k(E.Popover,{offset:8,...r,className:E.composeRenderProps(t,e=>F(`z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none`,e)),children:[n&&O(E.OverlayArrow,{className:`group`,children:O(`svg`,{viewBox:`0 0 12 12`,className:`block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90`,"aria-hidden":`true`,children:O(`path`,{d:`M0 0 L6 6 L12 0`})})}),e]});function qt(t){let[n,r]=e.Children.toArray(t.children).slice(0,2);return k(E.MenuTrigger,{...t,children:[n,O(Kt,{placement:t.placement,className:`min-w-35`,children:r})]})}function Jt(t){let[n,r]=e.Children.toArray(t.children).slice(0,2);return k(E.SubmenuTrigger,{...t,children:[n,O(Kt,{offset:-4,crossOffset:-4,children:r})]})}function Z(e){return O(E.Menu,{...e,className:E.composeRenderProps(e.className,e=>F(`p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75`,e))})}function Yt(e){let t=e.textValue||(typeof e.children==`string`?e.children:void 0);return O(E.MenuItem,{...e,textValue:t,className:E.composeRenderProps(e.className,(e,{isFocused:t,isPressed:n,isDisabled:r})=>F(`group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none`,`text-text-main text-[12px]`,{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":t,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":r},e)),children:E.composeRenderProps(e.children,(e,{selectionMode:t,isSelected:n,hasSubmenu:r})=>k(D,{children:[t!==`none`&&k(`span`,{className:`flex items-center size-4 shrink-0 justify-center`,children:[n&&t===`multiple`&&O(S,{className:`size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200`}),n&&t===`single`&&O(se,{className:`size-5 text-primary-500 animate-in zoom-in-50 duration-200`})]}),O(`div`,{className:`flex flex-row w-full transition-colors items-center gap-2 py-1 px-1`,children:e}),r&&O(w,{className:`size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors`})]}))})}function Xt({title:e,...t}){return k(E.MenuSection,{...t,className:F(`flex flex-col gap-0.5`,t.className),children:[e&&O(E.Header,{className:`px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none`,children:e}),O(E.Collection,{items:t.items,children:t.children})]})}function Zt(e){return O(E.Separator,{...e,className:`mx-2 my-1.5 border-t border-border-subtle/50`})}Z.Root=Z,Z.Item=Yt,Z.Trigger=qt,Z.SubTrigger=Jt,Z.Section=Xt,Z.Separator=Zt;function Q({className:e,variant:t=`rect`,...n}){return O(`div`,{className:F(`animate-pulse bg-bg-muted`,t===`circle`?`rounded-full`:`rounded-md`,e),...n})}const Qt=e=>{let[t,n]=f(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)},handleOpenRaw:()=>{let t=new Blob([e],{type:`text/plain;charset=utf-8`}),n=URL.createObjectURL(t);window.open(n,`_blank`)}}};function $t({content:e,mdxRaw:t,config:n}){let r=t||e||``,{copied:i,handleCopy:a,handleOpenRaw:o}=Qt(r),s=n!==!1,c=typeof n==`object`&&n.text||`Copy Markdown`;return!s||!r?null:O(`div`,{className:`relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200`,children:k(Gt,{className:`rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden`,children:[O(R,{variant:`ghost`,onPress:a,icon:O(i?S:T,{size:16}),iconPosition:`left`,className:F(`px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0`,`text-text-main transition-all duration-300 hover:bg-primary-500/5`,i&&`text-emerald-500 hover:bg-emerald-500/5`),children:i?`Copied!`:c}),k(Z.Trigger,{placement:`bottom end`,children:[O(R,{variant:`ghost`,isIconOnly:!0,icon:O(C,{size:14}),className:F(`px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0`,`transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500`)}),k(Z.Root,{className:`w-52`,children:[k(Z.Item,{onAction:a,children:[O(T,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),O(`span`,{className:`font-medium text-[0.8125rem]`,children:`Copy Markdown`})]}),k(Z.Item,{onAction:o,children:[O(ce,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),O(`span`,{className:`font-medium text-[0.8125rem]`,children:`View as Markdown`})]})]})]})]})})}var en=Ee({Admonition:()=>K,Badge:()=>ft,Button:()=>Ye,Card:()=>ht,Cards:()=>mt,Caution:()=>Tt,CodeBlock:()=>G,ComponentPreview:()=>Wt,ComponentProps:()=>Ht,CopyMarkdown:()=>$t,Danger:()=>St,Field:()=>zt,FileTree:()=>It,Image:()=>Vt,Important:()=>wt,InfoBox:()=>Ct,Link:()=>Bt,List:()=>jt,Note:()=>yt,Tab:()=>ct,Table:()=>Rt,Tabs:()=>lt,Tip:()=>bt,Video:()=>ut,Warning:()=>xt});function tn(){return O(`div`,{className:F(`w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in`),children:k(`div`,{className:`mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10`,children:[k(`div`,{className:`flex gap-2`,children:[O(Q,{className:`h-3 w-16`}),O(Q,{className:`h-3 w-24`})]}),O(Q,{className:`h-10 w-[60%] sm:h-12`}),k(`div`,{className:`space-y-3`,children:[O(Q,{className:`h-4 w-full`}),O(Q,{className:`h-4 w-[95%]`}),O(Q,{className:`h-4 w-[40%]`})]}),k(`div`,{className:`space-y-6 pt-4`,children:[O(Q,{className:`h-7 w-32`}),k(`div`,{className:`space-y-3`,children:[O(Q,{className:`h-4 w-full`}),O(Q,{className:`h-4 w-[98%]`}),O(Q,{className:`h-4 w-[92%]`}),O(Q,{className:`h-4 w-[60%]`})]})]}),O(Q,{className:`h-32 w-full rounded-lg bg-bg-muted/50`}),k(`div`,{className:`space-y-6 pt-4`,children:[O(Q,{className:`h-7 w-48`}),k(`div`,{className:`space-y-3`,children:[O(Q,{className:`h-4 w-full`}),O(Q,{className:`h-4 w-[85%]`})]})]})]})})}const $=({level:e,id:t,children:n,...r})=>k(`h${e}`,{id:t,...r,className:`boltdocs-heading`,children:[n,t&&O(`a`,{href:`#${t}`,className:`header-anchor`,"aria-label":`Anchor`,children:O(_e,{size:16})})]}),nn={...en,Loading:tn,h1:e=>O($,{level:1,...e}),h2:e=>O($,{level:2,...e}),h3:e=>O($,{level:3,...e}),h4:e=>O($,{level:4,...e}),h5:e=>O($,{level:5,...e}),h6:e=>O($,{level:6,...e}),pre:e=>O(G,{...e,children:e.children})};function rn(){let{currentLocale:e,config:t}=P();return c(()=>{if(!t.i18n)return;let n=t.i18n.localeConfigs?.[e];document.documentElement.lang=n?.htmlLang||e||`en`,document.documentElement.dir=n?.direction||`ltr`},[e,t.i18n]),null}function an(){let e=y(),{config:t}=P(),n=N(e=>e.setLocale),r=N(e=>e.setVersion),i=N(e=>e.currentLocale),a=N(e=>e.currentVersion);return c(()=>{let o=e.pathname.split(`/`).filter(Boolean),s=0,c=t.versions?.defaultVersion,l=t.i18n?.defaultLocale;if(o[s]===`docs`&&s++,t.versions&&o.length>s){let e=t.versions.versions.find(e=>e.path===o[s]);e&&(c=e.path,s++)}t.i18n&&o.length>s&&t.i18n.locales[o[s]]?l=o[s]:t.i18n&&o.length===0&&(l=i||t.i18n.defaultLocale),l!==i&&n(l),c!==a&&r(c)},[e.pathname,t,n,r,i,a]),null}function on({initialRoutes:t,initialConfig:n,docsDirName:r,modules:i,hot:a,homePage:o,externalPages:s,externalLayout:l,components:d={}}){let[p,m]=f(t),[h,v]=f(n),y=s||{},b=l||A,ee=u(()=>p.filter(e=>!(o&&(e.path===`/`||e.path===``))&&!y[e.path===``?`/`:e.path]).map(t=>{let n=Object.keys(i).find(e=>e===`/${r}/${t.filePath}`||e.endsWith(`/${r}/${t.filePath}`)||e.endsWith(`/${r}\\${t.filePath.replace(/\\/g,`/`)}`)),a=n?i[n]:null;return{...t,Component:e.lazy(async()=>a?await a():{default:Re})}}),[p,i,r,o,y]);c(()=>{a&&(a.on(`boltdocs:routes-update`,e=>{m(e)}),a.on(`boltdocs:config-update`,e=>{v(e)}))},[a]);let x=u(()=>({...nn,...we,...d}),[d]),te=x.Loading;return O(Pe,{children:O(Be,{children:O(qe,{components:x,children:O(De.Provider,{value:h,children:O(He,{children:k(Ae,{routes:p,modules:i,children:[O(Ue,{}),O(an,{}),O(rn,{}),k(_,{children:[O(g,{element:O(We,{}),children:ee.map(t=>O(g,{path:t.path===``?`/`:t.path,element:O(e.Suspense,{fallback:O(te,{}),children:O(Je,{Component:t.Component})})},t.path))},`docs-layout`),o&&k(D,{children:[O(g,{path:`/`,element:O(b,{children:O(o,{})})}),h.i18n&&Object.keys(h.i18n.locales).map(e=>O(g,{path:`/${e}`,element:O(b,{children:O(o,{})})},`home-${e}`))]}),Object.entries(y).map(([t,n])=>{let r=t===`/`?``:t;return k(e.Fragment,{children:[O(g,{path:t,element:O(b,{children:O(n,{})})}),h.i18n&&Object.keys(h.i18n.locales).map(e=>O(g,{path:`/${e}${r}`,element:O(b,{children:O(n,{})})},`${t}-${e}`))]},t)}),O(g,{path:`*`,element:O(A,{children:O(Re,{})})})]})]})})})})})})}async function sn(t){let{path:n,routes:r,config:i,modules:a,homePage:o,externalPages:s,docsDirName:c}=t,l={};for(let[e,t]of Object.entries(a))l[e]=()=>Promise.resolve(t);return p.renderToString(O(e.StrictMode,{children:O(m,{location:n,children:O(on,{initialRoutes:r,initialConfig:i,docsDirName:c,modules:l,homePage:o,externalPages:s})})}))}export{sn as render};
|