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/index.mjs
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
import{A as ar,B as ir,C as Ke,D as lr,E as Ye,F as Je,G as X,H as F,I as $e,J as ne,K as j,L as Ze,M as cr,N as C,O as T,P as mr,a as or,b as eo,c as S,d as to,e as $,f as R,g as Xe,h as u,i as re,j as rr,k as oo,l as V,m as ro,n as He,o as Ve,p as De,q as Oe,r as ze,s as ue,t as fe,u as ge,v as be,w as je,x as nr,y as I,z as sr}from"../chunk-J2PTDWZM.mjs";import Ge,{useEffect as Ht,useState as Do,useMemo as Oo}from"react";import Kn from"react-dom/client";import{BrowserRouter as Yn,Routes as Jn,Route as le}from"react-router-dom";import{ArrowLeft as pr}from"lucide-react";import{jsx as Pe,jsxs as no}from"react/jsx-runtime";function Fe(){return Pe("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:no("div",{className:"space-y-4",children:[Pe("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),Pe("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),Pe("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."}),no(re,{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:[Pe(pr,{size:16})," Go to Home"]})]})})}import{createContext as dr,use as ur,useEffect as so,useState as Qe}from"react";import{jsx as fr}from"react/jsx-runtime";var ao=dr(void 0);function io({children:e}){let[t,r]=Qe("system"),[o,n]=Qe("dark"),[a,s]=Qe(!1);so(()=>{s(!0);let i=localStorage.getItem("boltdocs-theme"),p=i==="light"||i==="dark"||i==="system"?i:"system";r(p);let l=window.matchMedia("(prefers-color-scheme: dark)");((g,b)=>{n(g==="system"?b?"dark":"light":g)})(p,l.matches);let d=g=>{n(b=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?g.matches?"dark":"light":b)};return l.addEventListener("change",d),()=>l.removeEventListener("change",d)},[]),so(()=>{if(!a)return;let i=window.matchMedia("(prefers-color-scheme: dark)").matches,p=t==="system"?i?"dark":"light":t;n(p);let l=document.documentElement;p==="light"?(l.classList.add("theme-light"),l.dataset.theme="light"):(l.classList.remove("theme-light"),l.dataset.theme="dark")},[t,a]);let m=i=>{r(i),localStorage.setItem("boltdocs-theme",i)};return fr(ao.Provider,{value:{theme:t,resolvedTheme:o,setTheme:m},children:e})}function se(){let e=ur(ao);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}import zo from"virtual:boltdocs-layout";import{startTransition as gr}from"react";import{RouterProvider as br}from"react-aria-components";import{useNavigate as hr,useHref as xr}from"react-router-dom";import{jsx as vr}from"react/jsx-runtime";function lo({children:e}){let t=hr();return vr(br,{navigate:(r,o)=>{gr(()=>{t(r,o)})},useHref:xr,children:e})}import{useLayoutEffect as yr}from"react";import{useLocation as Cr}from"react-router-dom";function co(){let{pathname:e,hash:t}=Cr();return yr(()=>{let r=document.querySelector(".boltdocs-content")||window,o=()=>r===window?window.scrollY:r.scrollTop,n=(a,s="auto")=>{r===window?window.scrollTo({top:a,behavior:s}):r.scrollTo({top:a,behavior:s})};if(t){let a=t.replace("#",""),s=document.getElementById(a);if(s){let i=r===window?0:r.getBoundingClientRect().top,c=s.getBoundingClientRect().top-i-80+o();n(c,"smooth");return}}n(0)},[e,t]),null}import{Outlet as Rr}from"react-router-dom";import Pr from"virtual:boltdocs-layout";import{jsx as mo}from"react/jsx-runtime";function po(){return mo(Pr,{children:mo(Rr,{})})}import{createContext as Nr,use as Tr}from"react";import{jsx as Lr}from"react/jsx-runtime";var uo=Nr({});function Ne(){return Tr(uo)}function fo({components:e,children:t}){return Lr(uo.Provider,{value:e,children:t})}import{jsx as wr}from"react/jsx-runtime";function go({Component:e}){let t=Ne();return wr(e,{components:t})}import{Link as Xn}from"lucide-react";var Bt={};or(Bt,{Admonition:()=>D,Badge:()=>it,Button:()=>et,Card:()=>ct,Cards:()=>lt,Caution:()=>bt,CodeBlock:()=>W,ComponentPreview:()=>Et,ComponentProps:()=>St,CopyMarkdown:()=>Se,Danger:()=>ut,Field:()=>wt,FileTree:()=>Tt,Image:()=>Mt,Important:()=>gt,InfoBox:()=>ft,Link:()=>kt,List:()=>xt,Note:()=>mt,Tab:()=>nt,Table:()=>Lt,Tabs:()=>st,Tip:()=>pt,Video:()=>at,Warning:()=>dt});import{jsx as kr}from"react/jsx-runtime";var et=({className:e,variant:t,size:r,rounded:o,iconSize:n,disabled:a,...s})=>kr(V,{className:u("group",oo({variant:t,size:r,rounded:o,iconSize:n,disabled:a,className:e})),...s});import*as ot from"react-aria-components";import{Copy as Er,Check as Br,File as Ar}from"lucide-react";var bo=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 Mr,useEffect as Sr,useRef as Ir,useState as tt}from"react";function ho(e){let{title:t}=e,[r,o]=tt(!1),[n,a]=tt(!1),[s,m]=tt(!1),i=Ir(null),p=S(),l=Mr(async()=>{let c=i.current?.textContent??"";bo(c),o(!0),setTimeout(()=>o(!1),2e3)},[]);return Sr(()=>{let c=i.current?.textContent?.length??0;m(c>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:n,setIsExpanded:a,isExpandable:s,preRef:i,handleCopy:l,shouldTruncate:s&&!n}}import{jsx as B,jsxs as xo}from"react/jsx-runtime";var Hr={ts:He,tsx:ue,js:Ve,jsx:ue,json:De,css:Oe,html:ze,md:fe,mdx:fe,bash:ge,sh:ge,yaml:be,yml:be};function W(e){let{children:t,hideCopy:r=!1,highlightedHtml:o,"data-highlighted-html":n,title:a,"data-lang":s,plain:m=!1,...i}=e,p=o||n,l=S(),c=e.lang||s||"",{copied:d,isExpanded:g,setIsExpanded:b,isExpandable:f,preRef:x,handleCopy:P,shouldTruncate:h}=ho(e),A=Hr[c];return xo("div",{className:u("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!m,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":h},e.className),children:[a&&xo("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:[A?B(A,{size:14}):B(Ar,{size:14,className:"opacity-60"}),B("span",{children:a})]}),B("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:!r&&B(je,{content:d?"Copied!":"Copy code",children:B(ot.Button,{onPress:P,className:u("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:d?B(Br,{size:20}):B(Er,{size:20})})})}),p?B("div",{ref:x,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:p}}):B("pre",{ref:x,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...i,children:t}),f&&B("div",{className:u(h?"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:B(ot.Button,{onPress:()=>b(!g),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:g?"Show less":"Expand code"})})]})}import{Children as zr,isValidElement as $r,useMemo as Fr}from"react";import*as Y from"react-aria-components";import{useState as vo,useRef as Vr,useEffect as Dr,useCallback as Or}from"react";function yo({initialIndex:e=0,tabs:t}){let r=t[e]?.props.disabled?t.findIndex(p=>!p.props.disabled):e,[o,n]=vo(r===-1?0:r),a=Vr([]),[s,m]=vo({opacity:0,transform:"translateX(0)",width:0});Dr(()=>{let p=a.current[o];p&&m({opacity:1,width:p.offsetWidth,transform:`translateX(${p.offsetLeft}px)`})},[o,t]);let i=Or(p=>{let l=0;if(p.key==="ArrowRight"?l=1:p.key==="ArrowLeft"&&(l=-1),l!==0){let c=(o+l+t.length)%t.length;for(;t[c].props.disabled&&c!==o;)c=(c+l+t.length)%t.length;c!==o&&!t[c].props.disabled&&(n(c),a.current[c]?.focus())}},[o,t]);return{active:o,setActive:n,tabRefs:a,indicatorStyle:s,handleKeyDown:i}}import{cva as Co}from"class-variance-authority";import{jsx as K,jsxs as rt}from"react/jsx-runtime";var Wr=Co("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"}}),_r=Co("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 nt({children:e}){let t=typeof e=="string"?K(W,{className:"language-bash",children:K("code",{children:e.trim()})}):e;return K("div",{className:"py-4",children:t})}function st({defaultIndex:e=0,children:t}){let r=Fr(()=>zr.toArray(t).filter(m=>$r(m)&&m.props?.label),[t]),{active:o,setActive:n,tabRefs:a,indicatorStyle:s}=yo({initialIndex:e,tabs:r});return K("div",{className:"my-8 w-full group/tabs",children:rt(Y.Tabs,{selectedKey:o.toString(),onSelectionChange:m=>n(Number(m)),className:"w-full",children:[rt(Y.TabList,{"aria-label":"Content Tabs",className:u(Wr()),children:[r.map((m,i)=>{let{label:p,icon:l,disabled:c}=m.props,d=i.toString();return rt(Y.Tab,{id:d,isDisabled:c,ref:g=>{a.current[i]=g},className:({isSelected:g,isDisabled:b})=>u(_r({isActive:g,isDisabled:b})),children:[!!l&&K("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:l}),K("span",{children:p})]},d)}),K("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:s,"aria-hidden":"true"})]}),r.map((m,i)=>K(Y.TabPanel,{id:i.toString(),children:r[i]},i))]})})}import{useRef as Gr,useState as Ur,useEffect as qr}from"react";import{jsx as Ro,jsxs as Xr}from"react/jsx-runtime";function at({src:e,poster:t,alt:r,children:o,controls:n,preload:a="metadata",...s}){let m=Gr(null),[i,p]=Ur(!1);return qr(()=>{let l=m.current;if(!l)return;let c=new IntersectionObserver(([d])=>{d.isIntersecting&&(p(!0),c.disconnect())},{rootMargin:"200px"});return c.observe(l),()=>c.disconnect()},[]),Ro("div",{ref:m,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:i?Xr("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...s,children:[o,"Your browser does not support the video tag."]}):Ro("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":r||"Video"})})}import{cva as jr}from"class-variance-authority";import{jsx as Yr}from"react/jsx-runtime";var Kr=jr("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 it({variant:e="default",children:t,className:r="",...o}){return Yr("span",{className:u(Kr({variant:e}),r),...o,children:t})}import{useCallback as Jr,useRef as Po}from"react";import*as To from"react-aria-components";import{cva as Zr}from"class-variance-authority";import{Fragment as en,jsx as ae,jsxs as No}from"react/jsx-runtime";var Qr=Zr("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 lt({cols:e=3,children:t,className:r="",...o}){return ae("div",{className:u(Qr({cols:e}),r),...o,children:t})}function ct({title:e,icon:t,href:r,children:o,className:n="",...a}){let s=Po(null),m=Po(null),i=Jr(c=>{let d=s.current||m.current;if(!d)return;let{left:g,top:b}=d.getBoundingClientRect();d.style.setProperty("--x",`${c.clientX-g}px`),d.style.setProperty("--y",`${c.clientY-b}px`)},[]),p=No(en,{children:[ae("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&&ae("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}),No("div",{className:"space-y-1.5",children:[e&&ae("h3",{className:"text-sm font-bold text-text-main",children:e}),o&&ae("div",{className:"text-sm text-text-muted leading-relaxed",children:o})]})]}),l=u("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 r?ae(To.Link,{ref:m,href:r,className:u(l,"no-underline cursor-pointer"),onMouseMove:i,...a,children:p}):ae("div",{ref:s,role:"presentation",className:l,onMouseMove:i,...a,children:p})}import{Info as tn,Lightbulb as on,AlertTriangle as rn,ShieldAlert as nn,Bookmark as sn,Zap as an,Flame as ln}from"lucide-react";import{cva as cn}from"class-variance-authority";import{jsx as L,jsxs as wo}from"react/jsx-runtime";var mn={note:L(sn,{size:18}),tip:L(on,{size:18}),info:L(tn,{size:18}),warning:L(rn,{size:18}),danger:L(nn,{size:18}),important:L(ln,{size:18}),caution:L(an,{size:18})},pn={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},Lo=cn("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 D({type:e="note",title:t,children:r,className:o="",...n}){return wo("div",{className:u(Lo({type:e}),o),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[wo("div",{className:"flex items-center flex-row gap-2 mb-2",children:[L("span",{className:u("shrink-0",Lo({type:e})),children:mn[e]}),L("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||pn[e]})]}),L("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:r})]})}var mt=e=>L(D,{type:"note",...e}),pt=e=>L(D,{type:"tip",...e}),dt=e=>L(D,{type:"warning",...e}),ut=e=>L(D,{type:"danger",...e}),ft=e=>L(D,{type:"info",...e}),gt=e=>L(D,{type:"important",...e}),bt=e=>L(D,{type:"caution",...e});import{Children as dn,isValidElement as un}from"react";import{Check as fn,ChevronRight as gn,Circle as bn}from"lucide-react";import{cva as ht}from"class-variance-authority";import{jsx as J,jsxs as Rn}from"react/jsx-runtime";var hn=ht("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}}),xn=ht("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}}),vn=ht("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 yn({icon:e,children:t,variant:r,dense:o}){return Rn("li",{className:u(xn({variant:r,dense:o})),children:[e&&J("span",{className:u(vn({variant:r==="bubble"?"bubble":"default"})),children:e}),J("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Cn={checked:e=>J(fn,{size:14,className:u("text-emerald-500 shrink-0",e)}),arrow:e=>J(gn,{size:14,className:u("text-primary-400 shrink-0",e)}),bubble:e=>J(bn,{size:6,fill:"currentColor",className:u("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function xt({variant:e="default",cols:t=1,dense:r=!1,children:o,className:n,...a}){let s=t!==void 0&&Number(t)>1,m=Cn[e],i=hn({variant:e,cols:t,dense:r,isGrid:s,className:n}),p=e==="number"?"ol":"ul";return e==="default"||e==="number"?J(p,{className:i,...a,children:o}):J("ul",{className:i,...a,children:dn.map(o,l=>{if(!un(l))return l;let c=l,d=c.type==="li"?c.props.children:c.props.children||l;return J(yn,{icon:m(),variant:e,dense:r,children:d})})})}import{Children as vt,isValidElement as Nt,useMemo as Pn}from"react";import*as O from"react-aria-components";import{Folder as Nn,FileText as Tn,File as Ln,FileCode as wn,FileImage as kn,ChevronRight as Mn}from"lucide-react";import{jsx as w,jsxs as Rt}from"react/jsx-runtime";var he=16,Te=2,Sn={ts:He,tsx:ue,js:Ve,jsx:ue,json:De,css:Oe,html:ze,md:fe,mdx:fe,bash:ge,sh:ge,yaml:be,yml:be},yt={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 Pt(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(Pt).join(""):Nt(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?Pt(e.props.children):""}function In(e,t){let r=e.toLowerCase(),o="shrink-0 transition-colors duration-200";if(t)return w(Nn,{size:he,strokeWidth:Te,className:u(o,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=r.split(".").pop()||"",a=Sn[n];if(a)return w(a,{size:he});let s=u(o,"text-text-dim group-hover:text-text-main");return yt.CODE.test(r)?w(wn,{size:he,strokeWidth:Te,className:s}):yt.TEXT.test(r)?w(Tn,{size:he,strokeWidth:Te,className:s}):yt.IMAGE.test(r)?w(kn,{size:he,strokeWidth:Te,className:s}):w(Ln,{size:he,strokeWidth:Te,className:s})}function Ct(e,t){if(!Nt(e))return!1;let r=e.type;if(typeof r=="string")return r===t;if(typeof r=="function")return r.name===t||r.name?.toLowerCase()===t;let o=e.props;return o?.originalType===t||o?.mdxType===t}function En(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function We(e,t="root"){if(!Nt(e))return[];let r=[];if(Ct(e,"ul"))return vt.forEach(e.props.children,(o,n)=>{r.push(...We(o,`${t}-${n}`))}),r;if(Ct(e,"li")){let o=vt.toArray(e.props.children),n=o.findIndex(b=>Ct(b,"ul")),a=n!==-1,s=a?o.slice(0,n):o,m=a?o.slice(n):[],i=Pt(s),{name:p,comment:l}=En(i),c=p.endsWith("/"),d=c?p.slice(0,-1):p,g=a||c;return r.push({id:`${t}-${d}`,name:d,comment:l,isFolder:g,children:a?We(m[0],`${t}-${d}`):void 0}),r}return e.props&&typeof e.props=="object"&&"children"in e.props&&vt.forEach(e.props.children,(o,n)=>{r.push(...We(o,`${t}-${n}`))}),r}function ko({item:e}){return Rt(O.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[w(O.TreeItemContent,{children:({isExpanded:t,hasChildItems:r})=>Rt("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[w("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),r?w(O.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:w(Mn,{size:14,strokeWidth:3,className:u("transition-transform duration-200",t&&"rotate-90")})}):w("div",{className:"w-[18px]"}),In(e.name,e.isFolder),w("span",{className:u("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&&Rt("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&&w(O.Collection,{items:e.children,children:t=>w(ko,{item:t})})]})}function Tt({children:e}){let t=Pn(()=>We(e),[e]);return w("div",{className:"my-8",children:w(O.Tree,{items:t,"aria-label":"File Tree",className:u("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:r=>w(ko,{item:r})})})}import*as Le from"react-aria-components";import{useState as Mo,useMemo as So}from"react";function Io({data:e,sortable:t=!1,paginated:r=!1,pageSize:o=10}){let[n,a]=Mo(null),[s,m]=Mo(1),i=So(()=>{if(!e)return[];let d=[...e];return t&&n!==null&&d.sort((g,b)=>{let f=g[n.key],x=b[n.key],P=typeof f=="string"?f:"",h=typeof x=="string"?x:"";return P<h?n.direction==="asc"?-1:1:P>h?n.direction==="asc"?1:-1:0}),d},[e,n,t]),p=Math.ceil(i.length/o),l=So(()=>{if(!r)return i;let d=(s-1)*o;return i.slice(d,d+o)},[i,r,s,o]);return{sortConfig:n,currentPage:s,setCurrentPage:m,totalPages:p,paginatedData:l,requestSort:d=>{if(!t)return;let g="asc";n&&n.key===d&&n.direction==="asc"&&(g="desc"),a({key:d,direction:g})}}}import{ChevronUp as Bn,ChevronDown as Eo,ChevronLeft as An,ChevronRight as Hn,ChevronsLeft as Vn,ChevronsRight as Dn}from"lucide-react";import{Fragment as On,jsx as N,jsxs as xe}from"react/jsx-runtime";function Lt({headers:e,data:t,children:r,className:o="",sortable:n=!1,paginated:a=!1,pageSize:s=10}){let{sortConfig:m,currentPage:i,setCurrentPage:p,totalPages:l,paginatedData:c,requestSort:d}=Io({data:t,sortable:n,paginated:a,pageSize:s}),g=f=>n?m?.key!==f?N(Eo,{size:14,className:"ml-1 opacity-30"}):m.direction==="asc"?N(Bn,{size:14,className:"ml-1 text-primary-400"}):N(Eo,{size:14,className:"ml-1 text-primary-400"}):null,b=r||xe(On,{children:[e&&N("thead",{children:N("tr",{children:e.map((f,x)=>N("th",{onClick:()=>d(x),className:u("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:xe("div",{className:"flex items-center",children:[f,g(x)]})},x))})}),c&&N("tbody",{children:c.map((f,x)=>N("tr",{className:"transition-colors hover:bg-bg-surface",children:f.map((P,h)=>N("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:P},h))},x))})]});return xe("div",{className:u("my-6 rounded-lg border border-border-subtle overflow-hidden",o),children:[N("div",{className:"overflow-x-auto",children:N("table",{className:"w-full border-collapse text-sm",children:b})}),a&&l>1&&xe("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[xe("span",{className:"text-xs text-text-muted",children:["Page ",i," of ",l]}),xe("div",{className:"flex items-center gap-1",children:[N(Le.Button,{onPress:()=>p(1),isDisabled:i===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:N(Vn,{size:16})}),N(Le.Button,{onPress:()=>p(f=>Math.max(f-1,1)),isDisabled:i===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:N(An,{size:16})}),N(Le.Button,{onPress:()=>p(f=>Math.min(f+1,l)),isDisabled:i===l,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:N(Hn,{size:16})}),N(Le.Button,{onPress:()=>p(l),isDisabled:i===l,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:N(Dn,{size:16})})]})]})]})}import{jsx as ve,jsxs as we}from"react/jsx-runtime";function wt({name:e,type:t,defaultValue:r,required:o=!1,children:n,id:a,className:s=""}){return we("article",{className:u("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",s),id:a,children:[we("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[we("div",{className:"flex flex-wrap items-center gap-2.5",children:[ve("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&&ve("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}),o&&we("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:[ve("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),r&&we("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:[ve("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),ve("code",{className:"font-mono text-text-main font-medium",children:r})]})]}),ve("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}import{jsx as zn}from"react/jsx-runtime";function kt({to:e,children:t,className:r="",...o}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=u("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",r);return zn(re,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...o,children:t})}import{jsx as $n}from"react/jsx-runtime";function Mt({src:e,alt:t,theme:r,...o}){let{theme:n}=se();return r&&r!==n?null:$n("img",{src:e,alt:t||"",...o})}import{jsx as k,jsxs as ke}from"react/jsx-runtime";function St({title:e,props:t,className:r=""}){return ke("div",{className:u("my-6",r),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:ke("table",{className:"w-full border-collapse text-sm",children:[k("thead",{children:ke("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((o,n)=>ke("tr",{className:"transition-colors hover:bg-bg-surface",children:[ke("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:o.name}),o.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:o.type})}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:o.defaultValue?k("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:o.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:o.description})]},`${o.name}-${n}`))})]})})]})}import{useMemo as Bo}from"react";function Ao(e){let{code:t,children:r,preview:o}=e,n=Bo(()=>(t??(typeof r=="string"?r:"")).trim(),[t,r]),a=Bo(()=>o??(typeof r!="string"?r:null),[o,r]);return{initialCode:n,previewElement:a}}import{jsx as It,jsxs as Fn}from"react/jsx-runtime";function Et(e){let{highlightedHtml:t,hideCode:r=!1,hideCopy:o=!1}=e,{initialCode:n,previewElement:a}=Ao(e);return Fn("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[It("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:a}),!r&&It("div",{className:"border-t border-border-subtle",children:It(W,{hideCopy:o,lang:"tsx",highlightedHtml:t,plain:!0,children:n})})]})}import{useState as Wn}from"react";import{Copy as Ho,Check as _n,ExternalLink as Gn,ChevronDown as Un}from"lucide-react";import{jsx as z,jsxs as Me}from"react/jsx-runtime";var qn=e=>{let[t,r]=Wn(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),s=URL.createObjectURL(a);window.open(s,"_blank")}}};function Se({content:e,mdxRaw:t,config:r}){let o=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:s}=qn(o),m=r!==!1,i=typeof r=="object"&&r.text||"Copy Markdown";return!m||!o?null:z("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:Me(Ze,{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:[z(V,{variant:"ghost",onPress:a,icon:n?z(_n,{size:16}):z(Ho,{size:16}),iconPosition:"left",className:u("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!":i}),Me(C.Trigger,{placement:"bottom end",children:[z(V,{variant:"ghost",isIconOnly:!0,icon:z(Un,{size:14}),className:u("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")}),Me(C.Root,{className:"w-52",children:[Me(C.Item,{onAction:a,children:[z(Ho,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),z("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),Me(C.Item,{onAction:s,children:[z(Gn,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),z("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}import{jsx as M,jsxs as ie}from"react/jsx-runtime";function At(){return M("div",{className:u("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:ie("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[ie("div",{className:"flex gap-2",children:[M(T,{className:"h-3 w-16"}),M(T,{className:"h-3 w-24"})]}),M(T,{className:"h-10 w-[60%] sm:h-12"}),ie("div",{className:"space-y-3",children:[M(T,{className:"h-4 w-full"}),M(T,{className:"h-4 w-[95%]"}),M(T,{className:"h-4 w-[40%]"})]}),ie("div",{className:"space-y-6 pt-4",children:[M(T,{className:"h-7 w-32"}),ie("div",{className:"space-y-3",children:[M(T,{className:"h-4 w-full"}),M(T,{className:"h-4 w-[98%]"}),M(T,{className:"h-4 w-[92%]"}),M(T,{className:"h-4 w-[60%]"})]})]}),M(T,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),ie("div",{className:"space-y-6 pt-4",children:[M(T,{className:"h-7 w-48"}),ie("div",{className:"space-y-3",children:[M(T,{className:"h-4 w-full"}),M(T,{className:"h-4 w-[85%]"})]})]})]})})}import{jsx as _,jsxs as jn}from"react/jsx-runtime";var ye=({level:e,id:t,children:r,...o})=>{let n=`h${e}`;return jn(n,{id:t,...o,className:"boltdocs-heading",children:[r,t&&_("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:_(Xn,{size:16})})]})},Vo={...Bt,Loading:At,h1:e=>_(ye,{level:1,...e}),h2:e=>_(ye,{level:2,...e}),h3:e=>_(ye,{level:3,...e}),h4:e=>_(ye,{level:4,...e}),h5:e=>_(ye,{level:5,...e}),h6:e=>_(ye,{level:6,...e}),pre:e=>_(W,{...e,children:e.children})};import Zn from"virtual:boltdocs-mdx-components";import{useLocation as Qn}from"react-router-dom";import{Fragment as ns,jsx as y,jsxs as _e}from"react/jsx-runtime";function es(){let{currentLocale:e,config:t}=R();return Ht(()=>{if(!t.i18n)return;let r=t.i18n.localeConfigs?.[e];document.documentElement.lang=r?.htmlLang||e||"en",document.documentElement.dir=r?.direction||"ltr"},[e,t.i18n]),null}function ts(){let e=Qn(),{config:t}=R(),r=$(s=>s.setLocale),o=$(s=>s.setVersion),n=$(s=>s.currentLocale),a=$(s=>s.currentVersion);return Ht(()=>{let s=e.pathname.split("/").filter(Boolean),m=0,i=t.versions?.defaultVersion,p=t.i18n?.defaultLocale;if(s[m]==="docs"&&m++,t.versions&&s.length>m){let l=t.versions.versions.find(c=>c.path===s[m]);l&&(i=l.path,m++)}t.i18n&&s.length>m&&t.i18n.locales[s[m]]?p=s[m]:t.i18n&&s.length===0&&(p=n||t.i18n.defaultLocale),p!==n&&r(p),i!==a&&o(i)},[e.pathname,t,r,o,n,a]),null}function os({initialRoutes:e,initialConfig:t,docsDirName:r,modules:o,hot:n,homePage:a,externalPages:s,externalLayout:m,components:i={}}){let[p,l]=Do(e),[c,d]=Do(t),g=s||{},b=m||zo,f=Oo(()=>p.filter(h=>!(a&&(h.path==="/"||h.path===""))&&!g[h.path===""?"/":h.path]).map(h=>{let A=Object.keys(o).find(H=>H===`/${r}/${h.filePath}`||H.endsWith(`/${r}/${h.filePath}`)||H.endsWith(`/${r}\\${h.filePath.replace(/\\/g,"/")}`)),q=A?o[A]:null;return{...h,Component:Ge.lazy(async()=>q?await q():{default:Fe})}}),[p,o,r,a,g]);Ht(()=>{n&&(n.on("boltdocs:routes-update",h=>{l(h)}),n.on("boltdocs:config-update",h=>{d(h)}))},[n]);let x=Oo(()=>({...Vo,...Zn,...i}),[i]),P=x.Loading;return y(io,{children:y(fo,{components:x,children:y(eo.Provider,{value:c,children:y(lo,{children:_e(to,{routes:p,modules:o,children:[y(co,{}),y(ts,{}),y(es,{}),_e(Jn,{children:[y(le,{element:y(po,{}),children:f.map(h=>y(le,{path:h.path===""?"/":h.path,element:y(Ge.Suspense,{fallback:y(P,{}),children:y(go,{Component:h.Component})})},h.path))},"docs-layout"),a&&_e(ns,{children:[y(le,{path:"/",element:y(b,{children:y(a,{})})}),c.i18n&&Object.keys(c.i18n.locales).map(h=>y(le,{path:`/${h}`,element:y(b,{children:y(a,{})})},`home-${h}`))]}),Object.entries(g).map(([h,A])=>{let q=h==="/"?"":h;return _e(Ge.Fragment,{children:[y(le,{path:h,element:y(b,{children:y(A,{})})}),c.i18n&&Object.keys(c.i18n.locales).map(H=>y(le,{path:`/${H}${q}`,element:y(b,{children:y(A,{})})},`${h}-${H}`))]},h)}),y(le,{path:"*",element:y(zo,{children:y(Fe,{})})})]})]})})})})})}function rs(e){let{target:t,routes:r,docsDirName:o,config:n,modules:a,hot:s,homePage:m,externalPages:i,externalLayout:p,components:l}=e,c=document.querySelector(t);if(!c)throw new Error(`[boltdocs] Mount target "${t}" not found in document.`);let d=y(Ge.StrictMode,{children:y(Yn,{children:y(os,{initialRoutes:r,initialConfig:n,docsDirName:o,modules:a,hot:s,homePage:m,externalPages:i,externalLayout:p,components:l})})});c.innerHTML="",Kn.createRoot(c).render(d)}import{useLocation as ss}from"react-router-dom";function Z(e,t){return e?typeof e=="string"?e:t&&e[t]?e[t]:Object.values(e)[0]||"":""}function Vt(){let e=S(),{theme:t}=se(),r=ss(),{currentLocale:o}=R(),n=e.theme||{},a=Z(n.title,o)||"Boltdocs",s=n.navbar||[],m=n.socialLinks||[],i=n.githubRepo,p=s.map(b=>{let f=b.href||b.to||b.link||"",x=P=>{let h=r.pathname;if(h===P)return!0;if(!P||P==="/")return h==="/";let A=qe=>{let te=qe.split("/").filter(Boolean),oe=0;return e.i18n?.locales&&te[oe]&&e.i18n.locales[te[oe]]&&oe++,e.versions?.versions&&te[oe]&&e.versions.versions.some(tr=>tr.path===te[oe])&&oe++,te.slice(oe)},q=A(P),H=A(h);return q.length===0?H.length===0:H.length<q.length?!1:q.every((qe,te)=>H[te]===qe)};return{label:Z(b.label||b.text,o),href:f,active:x(f),to:f.startsWith("http")||f.startsWith("//")?"external":void 0}}),l=n.logo,c=l?typeof l=="string"?l:t==="dark"?l.dark:l.light:null,d={alt:(l&&typeof l=="object"?l.alt:void 0)||a,width:l&&typeof l=="object"?l.width:void 0,height:l&&typeof l=="object"?l.height:void 0},g=i?`https://github.com/${i}`:null;return{links:p,title:a,logo:c,logoProps:d,github:g,social:m,config:e,theme:t}}import{useLocation as as}from"react-router-dom";function Dt(e){let t=S(),r=as(),o=c=>c.endsWith("/")&&c.length>1?c.slice(0,-1):c,n=o(r.pathname),a=e.find(c=>o(c.path)===n),s=a?.tab?.toLowerCase(),m=s?e.filter(c=>!c.tab||c.tab.toLowerCase()===s):e,i=[],p=new Map;for(let c of m)c.group?(p.has(c.group)||p.set(c.group,{slug:c.group,title:c.groupTitle||c.group,routes:[],icon:c.groupIcon}),p.get(c.group).routes.push(c)):i.push(c);return{groups:Array.from(p.values()),ungrouped:i,activeRoute:a,activePath:n,config:t}}import{useState as is}from"react";function Ot(e=[]){let[t,r]=is(null);return{headings:e,activeId:t,setActiveId:r}}import{useLocation as ls}from"react-router-dom";import{useEffect as cs,useState as ms,useRef as ps}from"react";function zt(e=[],t=[]){let r=ls(),o=ps([]),[n,a]=ms({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),m=t.find(l=>l.path===r.pathname)?.tab?.toLowerCase(),i=e.findIndex(l=>l.id.toLowerCase()===m),p=i===-1?0:i;return cs(()=>{let l=o.current[p];l&&a({opacity:1,width:l.offsetWidth,transform:`translateX(${l.offsetLeft}px)`})},[p,e.length,r.pathname]),{tabs:e,activeIndex:p,indicatorStyle:n,tabRefs:o,activeTabId:m}}import{useNavigate as ds}from"react-router-dom";function Q(e,t,r){let o=e;return t&&(o===t||o.startsWith(t+"/"))&&(o=o===t?"index.md":o.slice(t.length+1)),r&&(o===r||o.startsWith(r+"/"))&&(o=o===r?"index.md":o.slice(r.length+1)),o}function $t(){let e=ds(),t=R(),{allRoutes:r,currentRoute:o,currentVersion:n,currentLocale:a,config:s}=t,m=s.versions,i=$(c=>c.setVersion),p=c=>{if(!m||c===n)return;i(c);let d=`/docs/${c}`;if(o){let g=Q(o.filePath,o.version,o.locale),b=r.find(f=>Q(f.filePath,f.version,f.locale)===g&&(f.version||m.defaultVersion)===c&&(a?f.locale===a:!f.locale));if(b)d=b.path;else{let f=r.find(x=>Q(x.filePath,x.version,x.locale)==="index.md"&&(x.version||m.defaultVersion)===c&&(a?x.locale===a:!x.locale));d=f?f.path:`/docs/${c}${a?`/${a}`:""}`}}e(d)},l=t.availableVersions.map(c=>({...c,label:c.label,value:c.key}));return{currentVersion:n,currentVersionLabel:t.currentVersionLabel,availableVersions:l,handleVersionChange:p}}import{useNavigate as us}from"react-router-dom";function Ft(){let e=us(),t=R(),{allRoutes:r,currentRoute:o,currentLocale:n,config:a}=t,s=a.i18n,m=$(d=>d.setLocale),i=d=>{if(!s||d===n)return;m(d);let g="/";if(o){let b=Q(o.filePath,o.version,o.locale),f=r.find(x=>Q(x.filePath,x.version,x.locale)===b&&(x.locale||s.defaultLocale)===d&&x.version===o.version);if(f)g=f.path;else{let x=r.find(P=>Q(P.filePath,P.version,P.locale)==="index.md"&&(P.locale||s.defaultLocale)===d&&P.version===o.version);g=x?x.path:d===s.defaultLocale?o.version?`/${o.version}`:"/":o.version?`/${o.version}/${d}`:`/${d}`}}else{let b=r.find(f=>(f.filePath==="index.mdx"||f.filePath==="index.md")&&(f.locale||s.defaultLocale)===d&&!f.version);b?g=b.path:g=d===s.defaultLocale?"/":`/${d}`}e(g)},l=a.i18n?.localeConfigs?.[n]?.label||a.i18n?.locales[n]||n,c=a.i18n?Object.entries(a.i18n.locales).map(([d,g])=>{let b=a.i18n?.localeConfigs?.[d];return{key:d,label:b?.label||g,value:d,isCurrent:d===n}}):[];return{currentLocale:n,currentLocaleLabel:l,availableLocales:c,handleLocaleChange:i}}import{useLocation as fs}from"react-router-dom";function Wt(){let{routes:e,currentRoute:t}=R(),r=fs();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let o=t.tab?.toLowerCase(),n=o?e.filter(i=>i.tab?.toLowerCase()===o):e.filter(i=>!i.tab),a=n.findIndex(i=>i.path===r.pathname),s=a>0?n[a-1]:null,m=a!==-1&&a<n.length-1?n[a+1]:null;return{prevPage:s,nextPage:m,currentRoute:t}}function _t(){let{currentRoute:e}=R(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}import{useLocation as gs}from"react-router-dom";var Gt=()=>gs();import{jsx as Ce}from"react/jsx-runtime";function bs({children:e,className:t,style:r}){return Ce("div",{className:u("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",t),style:r,children:e})}function hs({children:e,className:t,style:r}){return Ce("div",{className:u("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",t),style:r,children:e})}function xs({children:e,className:t,style:r}){return Ce("main",{className:u("boltdocs-content flex-1 min-w-0 overflow-y-auto","contain-layout",t),style:r,children:e})}function vs({children:e,className:t,style:r}){let{pathname:o}=Gt();return Ce("div",{className:u("boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8",{"max-w-content-max":o.includes("/docs/")},t),style:r,children:e})}function ys({children:e,className:t,style:r}){return Ce("div",{className:u("flex items-center justify-between mb-10",t),style:r,children:e})}function Cs({children:e,className:t,style:r}){return Ce("div",{className:u("mt-20",t),style:r,children:e})}var ce=Object.assign(bs,{Body:hs,Content:xs,ContentMdx:vs,ContentHeader:ys,ContentFooter:Cs});import{Suspense as Is,lazy as Es}from"react";import{useEffect as Rs,useState as Ps}from"react";import{Sun as $o,Moon as Fo,Monitor as Wo}from"lucide-react";import{Button as Ns}from"react-aria-components";import{jsx as G,jsxs as Ie}from"react/jsx-runtime";function _o(){let{theme:e,setTheme:t}=se(),[r,o]=Ps(!1);if(Rs(()=>{o(!0)},[]),!r)return G("div",{className:"h-9 w-9"});let n=e==="system"?Wo:e==="dark"?Fo:$o;return Ie(C.Trigger,{placement:"bottom right",children:[G(Ns,{className:"flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main outline-none focus-visible:ring-2 focus-visible:ring-primary-500","aria-label":"Selection theme",children:G(n,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),Ie(C.Root,{selectionMode:"single",selectedKeys:[e],onSelectionChange:a=>{let s=Array.from(a)[0];t(s)},children:[Ie(C.Item,{id:"light",children:[G($o,{size:16}),G("span",{children:"Light"})]}),Ie(C.Item,{id:"dark",children:[G(Fo,{size:16}),G("span",{children:"Dark"})]}),Ie(C.Item,{id:"system",children:[G(Wo,{size:16}),G("span",{children:"System"})]})]})]})}import{useEffect as ws,useState as ks}from"react";var Ts="https://api.github.com";async function Go(e,t,r=Ts){let o=new Headers;t&&o.append("authorization",t);let a=await(await fetch(`${r}/repos/${e}`,{headers:o})).json();return a.stargazers_count!==void 0?Ls(a.stargazers_count):"0"}var Ls=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);import{jsx as Uo,jsxs as Ms}from"react/jsx-runtime";function qo({repo:e}){let[t,r]=ks(null);return ws(()=>{e&&Go(e).then(o=>r(o)).catch(()=>r("0"))},[e]),Ms("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-muted transition-all hover:bg-bg-main hover:border-border-strong hover:text-text-main",children:[Uo(ro,{className:"h-4 w-4"}),t&&Uo("span",{className:"tabular-nums",children:t})]})}import*as Ss from"lucide-react";import{jsx as Re,jsxs as Xo}from"react/jsx-runtime";function jo({tabs:e,routes:t}){let{currentLocale:r}=R(),{indicatorStyle:o,tabRefs:n,activeIndex:a}=zt(e,t),s=m=>{if(!m)return null;if(m.trim().startsWith("<svg"))return Re("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:m}});let i=Ss[m];return i?Re(i,{size:16}):Re("img",{src:m,alt:"",className:"h-4 w-4 object-contain"})};return Re("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:Xo($e.List,{className:"border-none py-0",children:[e.map((m,i)=>{let p=i===a,l=t.find(d=>d.tab&&d.tab.toLowerCase()===m.id.toLowerCase()),c=l?l.path:"#";return Xo(re,{href:c,ref:d=>{n.current[i]=d},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${p?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[s(m.icon),Re("span",{children:Z(m.text,r)})]},m.id)}),Re($e.Indicator,{style:o})]})})}import{useLocation as Bs}from"react-router-dom";import{ChevronDown as Ko,Languages as As}from"lucide-react";import{Fragment as zs,jsx as v,jsxs as ee}from"react/jsx-runtime";var Hs=Es(()=>import("../search-dialog-O6VLVSOA.mjs").then(e=>({default:e.SearchDialog})));function Ut(){let{links:e,title:t,logo:r,logoProps:o,github:n,social:a,config:s}=Vt(),{routes:m,allRoutes:i,currentVersion:p,currentLocale:l}=R(),{pathname:c}=Bs(),d=s.theme||{},g=c.startsWith("/docs"),b=d?.tabs&&d.tabs.length>0;return ee(I.Root,{className:b?"border-b-0":"",children:[ee(I.Content,{children:[ee(I.Left,{children:[r&&v(I.Logo,{src:r,alt:o?.alt||t,width:o?.width??24,height:o?.height??24}),v(I.Title,{children:t}),s.versions&&p&&v(Ds,{})]}),v(I.Center,{children:v(Is,{fallback:v("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:v(Hs,{routes:m||[]})})}),ee(I.Right,{children:[v(I.Links,{children:e.map(f=>v(zs,{children:v(Vs,{link:f},f.href)}))}),s.i18n&&l&&v(Os,{}),v(I.Split,{}),v(_o,{}),n&&v(qo,{repo:d?.githubRepo??""}),a.length>0&&v(I.Split,{}),v("div",{className:"flex items-center gap-1",children:a.map(({icon:f,link:x})=>v(I.Socials,{icon:f,link:x,className:"p-1.5"},x))})]})]}),g&&b&&d?.tabs&&v("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:v(jo,{tabs:d.tabs,routes:i||m||[]})})]})}function Vs({link:e}){let t=Xe(e.href||"");return v(I.Link,{...e,href:t})}function Ds(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:r}=$t();return t.length===0?null:ee(C.Trigger,{children:[v(V,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:v(Ko,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5",children:v("span",{className:"font-semibold text-[0.8125rem]",children:e})}),v(C.Root,{children:v(C.Section,{items:t,children:o=>v(C.Item,{onPress:()=>r(o.value),children:o.label},`${o.value??""}`)})})]})}function Os(){let{currentLocale:e,availableLocales:t,handleLocaleChange:r}=Ft();return t.length===0?null:ee(C.Trigger,{children:[v(V,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:v(Ko,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5 px-2.5",children:ee("div",{className:"flex items-center gap-1.5",children:[v(As,{className:"w-3.5 h-3.5 text-primary-500"}),v("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),v(C.Root,{children:v(C.Section,{items:t,children:o=>v(C.Item,{onPress:()=>r(o.value),children:ee("div",{className:"flex items-center justify-between w-full gap-4",children:[v("span",{children:o.label}),v("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:o.value})]})},`${o.value??""}`)})})]})}import{useState as Fs,useEffect as Ws,useMemo as _s}from"react";import{Zap as $s}from"lucide-react";import{jsx as qt,jsxs as Yo}from"react/jsx-runtime";function Jo(){return qt("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:Yo("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center gap-2 px-4 py-2 rounded-full border border-border-subtle bg-bg-surface/50 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:bg-bg-surface hover:shadow-xl hover:shadow-primary-500/5 select-none",children:[qt($s,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),Yo("span",{className:"text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide",children:["Powered by"," ",qt("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}import*as Gs from"lucide-react";import{jsx as me,jsxs as qs}from"react/jsx-runtime";function Zo(e){return e&&Gs[e]||void 0}function Us({group:e,activePath:t,getIcon:r}){let o=_s(()=>e.routes.some(s=>s.path===t),[e.routes,t]),[n,a]=Fs(!0);return Ws(()=>{o&&a(!0)},[o]),me(ne.Group,{title:e.title,isOpen:n,onToggle:()=>a(!n),children:e.routes.map(s=>{let m=t===(s.path.endsWith("/")?s.path.slice(0,-1):s.path);return me(ne.Link,{label:s.title,href:s.path,active:m,icon:r(s.icon),badge:s.badge},s.path)})})}function Xt({routes:e,config:t}){let{groups:r,ungrouped:o,activePath:n}=Dt(e),a=t.theme||{};return qs(ne.Root,{children:[o.length>0&&me(ne.Group,{className:"mb-6",children:o.map(s=>{let m=n===(s.path.endsWith("/")?s.path.slice(0,-1):s.path);return me(ne.Link,{label:s.title,href:s.path,active:m,icon:Zo(s.icon),badge:s.badge},s.path)})}),r.map(s=>me(Us,{group:s,activePath:n,getIcon:Zo},s.slug)),a?.poweredBy&&me("div",{className:"mt-auto pt-8",children:me(Jo,{})})]})}import Xs,{useRef as Qo,useEffect as js,useState as Ks,useCallback as Ys}from"react";import{Pencil as Js,CircleHelp as Zs,TextAlignStart as Qs}from"lucide-react";import{jsx as E,jsxs as pe}from"react/jsx-runtime";function jt({headings:e=[],editLink:t,communityHelp:r,filePath:o}){let{headings:n}=Ot(e),a=Xs.useMemo(()=>n.map(s=>({title:s.text,url:`#${s.id}`,depth:s.level})),[n]);return n.length===0?null:E(Je,{toc:a,children:E(ea,{headings:n,editLink:t,communityHelp:r,filePath:o})})}function ea({headings:e,editLink:t,communityHelp:r,filePath:o}){let n=Ke(),[a,s]=Ks({opacity:0}),m=Qo(null),i=Qo(null);js(()=>{if(!n||!m.current)return;let l=m.current.querySelector(`a[href="#${n}"]`);l&&s({transform:`translateY(${l.offsetTop}px)`,height:`${l.offsetHeight}px`,opacity:1})},[n]);let p=Ys((l,c)=>{l.preventDefault();let d=document.getElementById(c);d&&(d.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${c}`))},[]);return pe(X.Root,{children:[pe(X.Header,{className:"flex flex-row gap-x-2",children:[E(Qs,{size:16}),"On this page"]}),E(Ye,{containerRef:i,children:pe(X.Content,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:i,children:[E(X.Indicator,{style:a}),E("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:m,children:e.map(l=>E(X.Item,{level:l.level,children:E(X.Link,{href:`#${l.id}`,active:n===l.id,onClick:c=>p(c,l.id),className:"pl-4",children:l.text})},l.id))})]})}),(t||r)&&pe("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[E("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),pe("ul",{className:"space-y-3",children:[t&&o&&E("li",{children:pe("a",{href:t.replace(":path",o),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[E(Js,{size:16}),"Edit this page"]})}),r&&E("li",{children:pe("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[E(Zs,{size:16}),"Community help"]})})]})]})]})}import{useEffect as ta}from"react";import{useLocation as oa}from"react-router-dom";function Kt({siteTitle:e,siteDescription:t,routes:r}){let o=oa();return ta(()=>{let n=r.find(p=>p.path===o.pathname),a=n?.title,s=n?.description||t||"";document.title=a?`${a} | ${e}`:e;let m=document.querySelector('meta[name="description"]');m||(m=document.createElement("meta"),m.name="description",document.head.appendChild(m)),m.content=s,de("property","og:title",document.title),de("property","og:description",s),de("property","og:type","article"),de("property","og:url",window.location.href),de("name","twitter:card","summary"),de("name","twitter:title",document.title),de("name","twitter:description",s);let i=document.querySelector('link[rel="canonical"]');i||(i=document.createElement("link"),i.rel="canonical",document.head.appendChild(i)),i.href=window.location.origin+o.pathname},[o.pathname,e,t,r]),null}function de(e,t,r){let o=document.querySelector(`meta[${e}="${t}"]`);o||(o=document.createElement("meta"),o.setAttribute(e,t),document.head.appendChild(o)),o.content=r}import{Home as ra}from"lucide-react";import{jsx as Ee,jsxs as er}from"react/jsx-runtime";function Yt(){let{crumbs:e,activeRoute:t}=_t(),o=S().theme||{};return e.length===0||!o?.breadcrumbs?null:er(j.Root,{children:[Ee(j.Item,{children:Ee(j.Link,{href:"/",children:Ee(ra,{size:14})})}),e.map((n,a)=>er(j.Item,{children:[Ee(j.Separator,{}),Ee(j.Link,{href:n.href,className:u({"font-medium text-text-main":n.href===t?.path}),children:n.label})]},`crumb-${n.href}-${n.label}-${a}`))]})}import{jsx as Be,jsxs as Jt}from"react/jsx-runtime";function Zt(){let{prevPage:e,nextPage:t}=Wt();return!e&&!t?null:Jt(F.Root,{className:"animate-in fade-in slide-in-from-bottom-4 duration-700",children:[e?Jt(F.Link,{to:e.path,direction:"prev",children:[Be(F.Title,{children:"Previous"}),Be(F.Description,{children:e.title})]}):Be("div",{}),t&&Jt(F.Link,{to:t.path,direction:"next",children:[Be(F.Title,{children:"Next"}),Be(F.Description,{children:t.title})]})]})}import{Component as na}from"react";import{jsx as Qt,jsxs as sa}from"react/jsx-runtime";var Ae=class extends na{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("Uncaught error in Boltdocs Layout:",t,r)}render(){return this.state.hasError?this.props.fallback||sa("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[Qt("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),Qt("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),Qt(V,{className:"rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer",onPress:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}};import{useLocation as aa}from"react-router-dom";import{jsx as U,jsxs as Ue}from"react/jsx-runtime";function ia({children:e}){let{routes:t,allRoutes:r,currentRoute:o,currentLocale:n}=R(),{pathname:a}=aa(),s=S(),i=Ne().CopyMarkdown||Se,p=a==="/"||a==="";return Ue(ce,{children:[U(Kt,{siteTitle:Z(s.theme?.title,n)||"Boltdocs",siteDescription:Z(s.theme?.description,n)||"",routes:r}),U(Ut,{}),Ue(ce.Body,{children:[!p&&U(Xt,{routes:t,config:s}),Ue(ce.Content,{children:[!p&&Ue(ce.ContentHeader,{children:[U(Yt,{}),U(i,{mdxRaw:o?._rawContent,route:o,config:s.theme?.copyMarkdown})]}),U(Ae,{children:e}),!p&&U(ce.ContentFooter,{children:U(Zt,{})})]}),!p&&U(jt,{headings:o?.headings,editLink:s.theme?.editLink,communityHelp:s.theme?.communityHelp,filePath:o?.filePath})]})]})}export{D as Admonition,Je as AnchorProvider,it as Badge,Yt as Breadcrumbs,et as Button,Ze as ButtonGroup,ct as Card,lt as Cards,bt as Caution,W as CodeBlock,Et as ComponentPreview,St as ComponentProps,Se as CopyMarkdown,ut as Danger,ia as DefaultLayout,ce as DocsLayout,Ae as ErrorBoundary,wt as Field,Tt as FileTree,Kt as Head,Mt as Image,gt as Important,ft as InfoBox,kt as Link,xt as List,At as Loading,Ut as Navbar,Fe as NotFound,mt as Note,jt as OnThisPage,Zt as PageNav,j as PrimitiveBreadcrumbs,V as PrimitiveButton,re as PrimitiveLink,C as PrimitiveMenu,rr as PrimitiveNavLink,nr as PrimitiveNavbar,sr as PrimitiveNavigationMenu,X as PrimitiveOnThisPage,F as PrimitivePageNav,cr as PrimitivePopover,ne as PrimitiveSidebar,T as PrimitiveSkeleton,$e as PrimitiveTabs,je as PrimitiveTooltip,Ye as ScrollProvider,ar as SearchDialogPrimitive,Xt as Sidebar,nt as Tab,Lt as Table,st as Tabs,pt as Tip,at as Video,dt as Warning,u as cn,rs as createBoltdocsApp,Ke as useActiveAnchor,lr as useActiveAnchors,_t as useBreadcrumbs,S as useConfig,Ft as useI18n,ir as useItems,Xe as useLocalizedTo,Gt as useLocation,Ne as useMdxComponents,Vt as useNavbar,Ot as useOnThisPage,Wt as usePageNav,R as useRoutes,mr as useSearch,Dt as useSidebar,zt as useTabs,se as useTheme,$t as useVersion};
|
|
1
|
+
/**
|
|
2
|
+
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
+
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
import{A as e,B as t,C as n,D as r,E as i,F as a,I as o,L as s,M as c,N as l,O as u,P as d,R as f,S as p,T as m,V as h,_ as g,a as _,b as v,c as y,d as b,f as ee,g as te,h as ne,i as re,j as ie,k as x,l as S,m as ae,n as C,o as w,p as oe,r as T,s as E,t as se,u as ce,v as D,w as le,x as ue,y as de,z as fe}from"../use-search-D25n0PrV.mjs";import O,{Children as k,Component as pe,Suspense as me,createContext as he,isValidElement as A,lazy as ge,startTransition as _e,use as ve,useCallback as j,useEffect as M,useLayoutEffect as ye,useMemo as N,useRef as P,useState as F}from"react";import{createRoot as be}from"react-dom/client";import{BrowserRouter as xe,Outlet as Se,Route as I,Routes as Ce,useHref as we,useLocation as L,useNavigate as Te}from"react-router-dom";import*as Ee from"lucide-react";import{AlertTriangle as De,ArrowLeft as Oe,Bookmark as ke,Check as Ae,ChevronDown as R,ChevronLeft as je,ChevronRight as Me,ChevronUp as Ne,ChevronsLeft as Pe,ChevronsRight as Fe,Circle as Ie,CircleHelp as Le,Copy as Re,ExternalLink as ze,File as Be,FileCode as Ve,FileImage as He,FileText as Ue,Flame as We,Folder as Ge,Home as Ke,Info as qe,Languages as Je,Lightbulb as Ye,Link as Xe,Monitor as Ze,Moon as Qe,Pencil as $e,ShieldAlert as et,Sun as tt,TextAlignStart as nt,Zap as rt}from"lucide-react";import*as z from"react-aria-components";import{Button as it,RouterProvider as at}from"react-aria-components";import{Fragment as B,jsx as V,jsxs as H}from"react/jsx-runtime";import ot from"virtual:boltdocs-layout";import{cva as U}from"class-variance-authority";import st from"virtual:boltdocs-mdx-components";var ct=Object.defineProperty,lt=(e,t)=>{let n={};for(var r in e)ct(n,r,{get:e[r],enumerable:!0});return t||ct(n,Symbol.toStringTag,{value:`Module`}),n};function ut(){return V(`div`,{className:`flex items-center justify-center min-h-[60vh] text-center`,children:H(`div`,{className:`space-y-4`,children:[V(`span`,{className:`text-8xl font-black tracking-tighter text-primary-500/20`,children:`404`}),V(`h1`,{className:`text-2xl font-bold text-text-main`,children:`Page Not Found`}),V(`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.`}),H(c,{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:[V(Oe,{size:16}),` Go to Home`]})]})})}const dt=he(void 0);function ft({children:e}){let[t,n]=F(`system`),[r,i]=F(`dark`),[a,o]=F(!1);return M(()=>{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)},[]),M(()=>{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]),V(dt.Provider,{value:{theme:t,resolvedTheme:r,setTheme:e=>{n(e),localStorage.setItem(`boltdocs-theme`,e)}},children:e})}function W(){let e=ve(dt);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function pt({children:e}){let t=Te();return V(at,{navigate:(e,n)=>{_e(()=>{t(e,n)})},useHref:we,children:e})}function mt(){let{pathname:e,hash:t}=L();return ye(()=>{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 ht(){return V(ot,{children:V(Se,{})})}const gt=he({});function _t(){return ve(gt)}function vt({components:e,children:t}){return V(gt.Provider,{value:e,children:t})}function yt({Component:e}){return V(e,{components:_t()})}const bt=({className:t,variant:n,size:r,rounded:i,iconSize:a,disabled:o,...s})=>V(e,{className:d(`group`,ie({variant:n,size:r,rounded:i,iconSize:a,disabled:o,className:t})),...s}),xt=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 St(e){let{title:t}=e,[n,r]=F(!1),[i,a]=F(!1),[o,s]=F(!1),c=P(null);h();let l=j(async()=>{xt(c.current?.textContent??``),r(!0),setTimeout(()=>r(!1),2e3)},[]);return M(()=>{s((c.current?.textContent?.length??0)>120)},[e.children,e.highlightedHtml]),{copied:n,isExpanded:i,setIsExpanded:a,isExpandable:o,preRef:c,handleCopy:l,shouldTruncate:o&&!i}}const Ct={ts:u,tsx:i,js:n,jsx:i,json:le,css:ue,html:v,md:m,mdx:m,bash:r,sh:r,yaml:x,yml:x};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;h();let u=e.lang||o||``,{copied:f,isExpanded:p,setIsExpanded:m,isExpandable:g,preRef:_,handleCopy:v,shouldTruncate:y}=St(e),b=Ct[u];return H(`div`,{className:d(`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":y},e.className),children:[a&&H(`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:[b?V(b,{size:14}):V(Be,{size:14,className:`opacity-60`}),V(`span`,{children:a})]}),V(`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&&V(de,{content:f?`Copied!`:`Copy code`,children:V(z.Button,{onPress:v,className:d(`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`,f?`text-emerald-400`:`text-text-muted hover:text-text-main`),"aria-label":`Copy code`,children:V(f?Ae:Re,{size:20})})})}),l?V(`div`,{ref:_,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}}):V(`pre`,{ref:_,className:`m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]`,...c,children:t}),g&&V(`div`,{className:d(y?`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:V(z.Button,{onPress:()=>m(!p),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:p?`Show less`:`Expand code`})})]})}function wt({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=P([]),[o,s]=F({opacity:0,transform:`translateX(0)`,width:0});return M(()=>{let e=a.current[r];e&&s({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[r,t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:o,handleKeyDown:j(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 Tt=U(`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`}}),Et=U(`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 Dt({children:e}){return V(`div`,{className:`py-4`,children:typeof e==`string`?V(G,{className:`language-bash`,children:V(`code`,{children:e.trim()})}):e})}function Ot({defaultIndex:e=0,children:t}){let n=N(()=>k.toArray(t).filter(e=>A(e)&&e.props?.label),[t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:o}=wt({initialIndex:e,tabs:n});return V(`div`,{className:`my-8 w-full group/tabs`,children:H(z.Tabs,{selectedKey:r.toString(),onSelectionChange:e=>i(Number(e)),className:`w-full`,children:[H(z.TabList,{"aria-label":`Content Tabs`,className:d(Tt()),children:[n.map((e,t)=>{let{label:n,icon:r,disabled:i}=e.props,o=t.toString();return H(z.Tab,{id:o,isDisabled:i,ref:e=>{a.current[t]=e},className:({isSelected:e,isDisabled:t})=>d(Et({isActive:e,isDisabled:t})),children:[!!r&&V(`span`,{className:`shrink-0 [&>svg]:w-4 [&>svg]:h-4`,children:r}),V(`span`,{children:n})]},o)}),V(`div`,{className:`absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none`,style:o,"aria-hidden":`true`})]}),n.map((e,t)=>V(z.TabPanel,{id:t.toString(),children:n[t]},t))]})})}function kt({src:e,poster:t,alt:n,children:r,controls:i,preload:a=`metadata`,...o}){let s=P(null),[c,l]=F(!1);return M(()=>{let e=s.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e.isIntersecting&&(l(!0),t.disconnect())},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[]),V(`div`,{ref:s,className:`my-6 overflow-hidden rounded-lg border border-border-subtle`,children:c?H(`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.`]}):V(`div`,{className:`aspect-video bg-bg-surface animate-pulse`,role:`img`,"aria-label":n||`Video`})})}const At=U(`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 jt({variant:e=`default`,children:t,className:n=``,...r}){return V(`span`,{className:d(At({variant:e}),n),...r,children:t})}const Mt=U(`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 Nt({cols:e=3,children:t,className:n=``,...r}){return V(`div`,{className:d(Mt({cols:e}),n),...r,children:t})}function Pt({title:e,icon:t,href:n,children:r,className:i=``,...a}){let o=P(null),s=P(null),c=j(e=>{let t=o.current||s.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`)},[]),l=H(B,{children:[V(`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&&V(`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}),H(`div`,{className:`space-y-1.5`,children:[e&&V(`h3`,{className:`text-sm font-bold text-text-main`,children:e}),r&&V(`div`,{className:`text-sm text-text-muted leading-relaxed`,children:r})]})]}),u=d(`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?V(z.Link,{ref:s,href:n,className:d(u,`no-underline cursor-pointer`),onMouseMove:c,...a,children:l}):V(`div`,{ref:o,role:`presentation`,className:u,onMouseMove:c,...a,children:l})}const Ft={note:V(ke,{size:18}),tip:V(Ye,{size:18}),info:V(qe,{size:18}),warning:V(De,{size:18}),danger:V(et,{size:18}),important:V(We,{size:18}),caution:V(rt,{size:18})},It={note:`Note`,tip:`Tip`,info:`Info`,warning:`Warning`,danger:`Danger`,important:`Important`,caution:`Caution`},Lt=U(`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 H(`div`,{className:d(Lt({type:e}),r),role:e===`warning`||e===`danger`?`alert`:`note`,...i,children:[H(`div`,{className:`flex items-center flex-row gap-2 mb-2`,children:[V(`span`,{className:d(`shrink-0`,Lt({type:e})),children:Ft[e]}),V(`span`,{className:`text-sm font-bold tracking-tight text-text-main`,children:t||It[e]})]}),V(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0`,children:n})]})}const Rt=e=>V(K,{type:`note`,...e}),zt=e=>V(K,{type:`tip`,...e}),Bt=e=>V(K,{type:`warning`,...e}),Vt=e=>V(K,{type:`danger`,...e}),Ht=e=>V(K,{type:`info`,...e}),Ut=e=>V(K,{type:`important`,...e}),Wt=e=>V(K,{type:`caution`,...e}),Gt=U(`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}}),Kt=U(`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}}),qt=U(`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 Jt({icon:e,children:t,variant:n,dense:r}){return H(`li`,{className:d(Kt({variant:n,dense:r})),children:[e&&V(`span`,{className:d(qt({variant:n===`bubble`?`bubble`:`default`})),children:e}),V(`div`,{className:`flex-1 text-text-muted group-hover:text-text-main transition-colors`,children:t})]})}const Yt={checked:e=>V(Ae,{size:14,className:d(`text-emerald-500 shrink-0`,e)}),arrow:e=>V(Me,{size:14,className:d(`text-primary-400 shrink-0`,e)}),bubble:e=>V(Ie,{size:6,fill:`currentColor`,className:d(`text-primary-500 shrink-0`,e)}),default:()=>null,number:()=>null};function Xt({variant:e=`default`,cols:t=1,dense:n=!1,children:r,className:i,...a}){let o=t!==void 0&&Number(t)>1,s=Yt[e],c=Gt({variant:e,cols:t,dense:n,isGrid:o,className:i});return e===`default`||e===`number`?V(e===`number`?`ol`:`ul`,{className:c,...a,children:r}):V(`ul`,{className:c,...a,children:k.map(r,t=>{if(!A(t))return t;let r=t,i=r.type===`li`?r.props.children:r.props.children||t;return V(Jt,{icon:s(),variant:e,dense:n,children:i})})})}const Zt={ts:u,tsx:i,js:n,jsx:i,json:le,css:ue,html:v,md:m,mdx:m,bash:r,sh:r,yaml:x,yml:x},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 Qt(e){return typeof e==`string`?e:typeof e==`number`?e.toString():Array.isArray(e)?e.map(Qt).join(``):A(e)&&e.props&&typeof e.props==`object`&&`children`in e.props?Qt(e.props.children):``}function $t(e,t){let n=e.toLowerCase(),r=`shrink-0 transition-colors duration-200`;if(t)return V(Ge,{size:16,strokeWidth:2,className:d(r,`text-primary-400`),fill:`currentColor`,fillOpacity:.15});let i=Zt[n.split(`.`).pop()||``];if(i)return V(i,{size:16});let a=d(r,`text-text-dim group-hover:text-text-main`);return q.CODE.test(n)?V(Ve,{size:16,strokeWidth:2,className:a}):q.TEXT.test(n)?V(Ue,{size:16,strokeWidth:2,className:a}):q.IMAGE.test(n)?V(He,{size:16,strokeWidth:2,className:a}):V(Be,{size:16,strokeWidth:2,className:a})}function en(e,t){if(!A(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 r=e.props;return r?.originalType===t||r?.mdxType===t}function tn(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function J(e,t=`root`){if(!A(e))return[];let n=[];if(en(e,`ul`))return k.forEach(e.props.children,(e,r)=>{n.push(...J(e,`${t}-${r}`))}),n;if(en(e,`li`)){let r=k.toArray(e.props.children),i=r.findIndex(e=>en(e,`ul`)),a=i!==-1,o=a?r.slice(0,i):r,s=a?r.slice(i):[],{name:c,comment:l}=tn(Qt(o)),u=c.endsWith(`/`),d=u?c.slice(0,-1):c,f=a||u;return n.push({id:`${t}-${d}`,name:d,comment:l,isFolder:f,children:a?J(s[0],`${t}-${d}`):void 0}),n}return e.props&&typeof e.props==`object`&&`children`in e.props&&k.forEach(e.props.children,(e,r)=>{n.push(...J(e,`${t}-${r}`))}),n}function nn({item:e}){return H(z.TreeItem,{id:e.id,textValue:e.name,className:`outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md`,children:[V(z.TreeItemContent,{children:({isExpanded:t,hasChildItems:n})=>H(`div`,{className:`flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer`,children:[V(`div`,{style:{width:`calc((var(--tree-item-level) - 1) * 1rem)`},className:`shrink-0`}),n?V(z.Button,{slot:`chevron`,className:`outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors`,children:V(Me,{size:14,strokeWidth:3,className:d(`transition-transform duration-200`,t&&`rotate-90`)})}):V(`div`,{className:`w-[18px]`}),$t(e.name,e.isFolder),V(`span`,{className:d(`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&&H(`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&&V(z.Collection,{items:e.children,children:e=>V(nn,{item:e})})]})}function rn({children:e}){let t=N(()=>J(e),[e]);return V(`div`,{className:`my-8`,children:V(z.Tree,{items:t,"aria-label":`File Tree`,className:d(`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=>V(nn,{item:e})})})}function an({data:e,sortable:t=!1,paginated:n=!1,pageSize:r=10}){let[i,a]=F(null),[o,s]=F(1),c=N(()=>{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:N(()=>{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 on({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:f,requestSort:p}=an({data:t,sortable:i,paginated:a,pageSize:o}),m=e=>i?s?.key===e?s.direction===`asc`?V(Ne,{size:14,className:`ml-1 text-primary-400`}):V(R,{size:14,className:`ml-1 text-primary-400`}):V(R,{size:14,className:`ml-1 opacity-30`}):null,h=n||H(B,{children:[e&&V(`thead`,{children:V(`tr`,{children:e.map((e,t)=>V(`th`,{onClick:()=>p(t),className:d(`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:H(`div`,{className:`flex items-center`,children:[e,m(t)]})},t))})}),f&&V(`tbody`,{children:f.map((e,t)=>V(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:e.map((e,t)=>V(`td`,{className:`px-3 py-2 border-b border-border-subtle text-sm text-text-muted`,children:e},t))},t))})]});return H(`div`,{className:d(`my-6 rounded-lg border border-border-subtle overflow-hidden`,r),children:[V(`div`,{className:`overflow-x-auto`,children:V(`table`,{className:`w-full border-collapse text-sm`,children:h})}),a&&u>1&&H(`div`,{className:`flex items-center justify-between border-t border-border-subtle px-4 py-3`,children:[H(`span`,{className:`text-xs text-text-muted`,children:[`Page `,c,` of `,u]}),H(`div`,{className:`flex items-center gap-1`,children:[V(z.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:V(Pe,{size:16})}),V(z.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:V(je,{size:16})}),V(z.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:V(Me,{size:16})}),V(z.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:V(Fe,{size:16})})]})]})]})}function sn({name:e,type:t,defaultValue:n,required:r=!1,children:i,id:a,className:o=``}){return H(`article`,{className:d(`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:[H(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4`,children:[H(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[V(`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&&V(`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&&H(`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:[V(`span`,{className:`h-1 w-1 rounded-full bg-red-400 animate-pulse`}),`Required`]})]}),n&&H(`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:[V(`span`,{className:`font-semibold opacity-60 uppercase tracking-tighter`,children:`Default`}),V(`code`,{className:`font-mono text-text-main font-medium`,children:n})]})]}),V(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30`,children:i})]})}function cn({to:e,children:t,className:n=``,...r}){let i=e&&(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`));return V(c,{href:e,className:d(`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 ln({src:e,alt:t,theme:n,...r}){let{theme:i}=W();return n&&n!==i?null:V(`img`,{src:e,alt:t||``,...r})}function un({title:e,props:t,className:n=``}){return H(`div`,{className:d(`my-6`,n),children:[e&&V(`h3`,{className:`text-base font-bold text-text-main mb-3`,children:e}),V(`div`,{className:`overflow-x-auto rounded-lg border border-border-subtle`,children:H(`table`,{className:`w-full border-collapse text-sm`,children:[V(`thead`,{children:H(`tr`,{children:[V(`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`}),V(`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`}),V(`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`}),V(`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`})]})}),V(`tbody`,{children:t.map((e,t)=>H(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:[H(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:[V(`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&&V(`span`,{className:`ml-1 text-red-400 font-bold`,children:`*`})]}),V(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:V(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted`,children:e.type})}),V(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:e.defaultValue?V(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400`,children:e.defaultValue}):V(`span`,{className:`text-text-dim`,children:`—`})}),V(`td`,{className:`px-4 py-2.5 border-b border-border-subtle text-text-muted`,children:e.description})]},`${e.name}-${t}`))})]})})]})}function dn(e){let{code:t,children:n,preview:r}=e;return{initialCode:N(()=>(t??(typeof n==`string`?n:``)).trim(),[t,n]),previewElement:N(()=>r??(typeof n==`string`?null:n),[r,n])}}function fn(e){let{highlightedHtml:t,hideCode:n=!1,hideCopy:r=!1}=e,{initialCode:i,previewElement:a}=dn(e);return H(`div`,{className:`my-6 overflow-hidden rounded-xl border border-border-subtle`,children:[V(`div`,{className:`flex items-center justify-center p-8 bg-bg-surface`,children:a}),!n&&V(`div`,{className:`border-t border-border-subtle`,children:V(G,{hideCopy:r,lang:`tsx`,highlightedHtml:t,plain:!0,children:i})})]})}const pn=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 mn({content:t,mdxRaw:n,config:r}){let i=n||t||``,{copied:a,handleCopy:o,handleOpenRaw:s}=pn(i),c=r!==!1,l=typeof r==`object`&&r.text||`Copy Markdown`;return!c||!i?null:V(`div`,{className:`relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200`,children:H(_,{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:[V(e,{variant:`ghost`,onPress:o,icon:V(a?Ae:Re,{size:16}),iconPosition:`left`,className:d(`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`,a&&`text-emerald-500 hover:bg-emerald-500/5`),children:a?`Copied!`:l}),H(T.Trigger,{placement:`bottom end`,children:[V(e,{variant:`ghost`,isIconOnly:!0,icon:V(R,{size:14}),className:d(`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`)}),H(T.Root,{className:`w-52`,children:[H(T.Item,{onAction:o,children:[V(Re,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),V(`span`,{className:`font-medium text-[0.8125rem]`,children:`Copy Markdown`})]}),H(T.Item,{onAction:s,children:[V(ze,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),V(`span`,{className:`font-medium text-[0.8125rem]`,children:`View as Markdown`})]})]})]})]})})}var hn=lt({Admonition:()=>K,Badge:()=>jt,Button:()=>bt,Card:()=>Pt,Cards:()=>Nt,Caution:()=>Wt,CodeBlock:()=>G,ComponentPreview:()=>fn,ComponentProps:()=>un,CopyMarkdown:()=>mn,Danger:()=>Vt,Field:()=>sn,FileTree:()=>rn,Image:()=>ln,Important:()=>Ut,InfoBox:()=>Ht,Link:()=>cn,List:()=>Xt,Note:()=>Rt,Tab:()=>Dt,Table:()=>on,Tabs:()=>Ot,Tip:()=>zt,Video:()=>kt,Warning:()=>Bt});function gn(){return V(`div`,{className:d(`w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in`),children:H(`div`,{className:`mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10`,children:[H(`div`,{className:`flex gap-2`,children:[V(C,{className:`h-3 w-16`}),V(C,{className:`h-3 w-24`})]}),V(C,{className:`h-10 w-[60%] sm:h-12`}),H(`div`,{className:`space-y-3`,children:[V(C,{className:`h-4 w-full`}),V(C,{className:`h-4 w-[95%]`}),V(C,{className:`h-4 w-[40%]`})]}),H(`div`,{className:`space-y-6 pt-4`,children:[V(C,{className:`h-7 w-32`}),H(`div`,{className:`space-y-3`,children:[V(C,{className:`h-4 w-full`}),V(C,{className:`h-4 w-[98%]`}),V(C,{className:`h-4 w-[92%]`}),V(C,{className:`h-4 w-[60%]`})]})]}),V(C,{className:`h-32 w-full rounded-lg bg-bg-muted/50`}),H(`div`,{className:`space-y-6 pt-4`,children:[V(C,{className:`h-7 w-48`}),H(`div`,{className:`space-y-3`,children:[V(C,{className:`h-4 w-full`}),V(C,{className:`h-4 w-[85%]`})]})]})]})})}const Y=({level:e,id:t,children:n,...r})=>H(`h${e}`,{id:t,...r,className:`boltdocs-heading`,children:[n,t&&V(`a`,{href:`#${t}`,className:`header-anchor`,"aria-label":`Anchor`,children:V(Xe,{size:16})})]}),_n={...hn,Loading:gn,h1:e=>V(Y,{level:1,...e}),h2:e=>V(Y,{level:2,...e}),h3:e=>V(Y,{level:3,...e}),h4:e=>V(Y,{level:4,...e}),h5:e=>V(Y,{level:5,...e}),h6:e=>V(Y,{level:6,...e}),pre:e=>V(G,{...e,children:e.children})};function vn(){let{currentLocale:e,config:t}=o();return M(()=>{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 yn(){let e=L(),{config:t}=o(),n=f(e=>e.setLocale),r=f(e=>e.setVersion),i=f(e=>e.currentLocale),a=f(e=>e.currentVersion);return M(()=>{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 bn({initialRoutes:e,initialConfig:n,docsDirName:r,modules:i,hot:a,homePage:o,externalPages:c,externalLayout:l,components:u={}}){let[d,f]=F(e),[p,m]=F(n),h=c||{},g=l||ot,_=N(()=>d.filter(e=>!(o&&(e.path===`/`||e.path===``))&&!h[e.path===``?`/`:e.path]).map(e=>{let t=Object.keys(i).find(t=>t===`/${r}/${e.filePath}`||t.endsWith(`/${r}/${e.filePath}`)||t.endsWith(`/${r}\\${e.filePath.replace(/\\/g,`/`)}`)),n=t?i[t]:null;return{...e,Component:O.lazy(async()=>n?await n():{default:ut})}}),[d,i,r,o,h]);M(()=>{a&&(a.on(`boltdocs:routes-update`,e=>{f(e)}),a.on(`boltdocs:config-update`,e=>{m(e)}))},[a]);let v=N(()=>({..._n,...st,...u}),[u]),y=v.Loading;return V(s,{children:V(ft,{children:V(vt,{components:v,children:V(t.Provider,{value:p,children:V(pt,{children:H(fe,{routes:d,modules:i,children:[V(mt,{}),V(yn,{}),V(vn,{}),H(Ce,{children:[V(I,{element:V(ht,{}),children:_.map(e=>V(I,{path:e.path===``?`/`:e.path,element:V(O.Suspense,{fallback:V(y,{}),children:V(yt,{Component:e.Component})})},e.path))},`docs-layout`),o&&H(B,{children:[V(I,{path:`/`,element:V(g,{children:V(o,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(e=>V(I,{path:`/${e}`,element:V(g,{children:V(o,{})})},`home-${e}`))]}),Object.entries(h).map(([e,t])=>{let n=e===`/`?``:e;return H(O.Fragment,{children:[V(I,{path:e,element:V(g,{children:V(t,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(r=>V(I,{path:`/${r}${n}`,element:V(g,{children:V(t,{})})},`${e}-${r}`))]},e)}),V(I,{path:`*`,element:V(ot,{children:V(ut,{})})})]})]})})})})})})}function xn(e){let{target:t,routes:n,docsDirName:r,config:i,modules:a,hot:o,homePage:s,externalPages:c,externalLayout:l,components:u}=e,d=document.querySelector(t);if(!d)throw Error(`[boltdocs] Mount target "${t}" not found in document.`);let f=V(O.StrictMode,{children:V(xe,{children:V(bn,{initialRoutes:n,initialConfig:i,docsDirName:r,modules:a,hot:o,homePage:s,externalPages:c,externalLayout:l,components:u})})});d.innerHTML=``,be(d).render(f)}function X(e,t){return e?typeof e==`string`?e:t&&e[t]?e[t]:Object.values(e)[0]||``:``}function Sn(){let e=h(),{theme:t}=W(),n=L(),{currentLocale:r}=o(),i=e.theme||{},a=X(i.title,r)||`Boltdocs`,s=i.navbar||[],c=i.socialLinks||[],l=i.githubRepo,u=s.map(t=>{let i=t.href||t.to||t.link||``;return{label:X(t.label||t.text,r),href:i,active:(t=>{let r=n.pathname;if(r===t)return!0;if(!t||t===`/`)return r===`/`;let i=t=>{let n=t.split(`/`).filter(Boolean),r=0;return e.i18n?.locales&&n[r]&&e.i18n.locales[n[r]]&&r++,e.versions?.versions&&n[r]&&e.versions.versions.some(e=>e.path===n[r])&&r++,n.slice(r)},a=i(t),o=i(r);return a.length===0?o.length===0:o.length<a.length?!1:a.every((e,t)=>o[t]===e)})(i),to:i.startsWith(`http`)||i.startsWith(`//`)?`external`:void 0}}),d=i.logo;return{links:u,title:a,logo:d?typeof d==`string`?d:t===`dark`?d.dark:d.light:null,logoProps:{alt:(d&&typeof d==`object`?d.alt:void 0)||a,width:d&&typeof d==`object`?d.width:void 0,height:d&&typeof d==`object`?d.height:void 0},github:l?`https://github.com/${l}`:null,social:c,config:e,theme:t}}function Cn(e){let t=h(),n=L(),r=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,i=r(n.pathname),a=e.find(e=>r(e.path)===i),o=a?.tab?.toLowerCase(),s=o?e.filter(e=>!e.tab||e.tab.toLowerCase()===o):e,c=[],l=new Map;for(let e of s)e.group?(l.has(e.group)||l.set(e.group,{slug:e.group,title:e.groupTitle||e.group,routes:[],icon:e.groupIcon}),l.get(e.group).routes.push(e)):c.push(e);return{groups:Array.from(l.values()),ungrouped:c,activeRoute:a,activePath:i,config:t}}function wn(e=[]){let[t,n]=F(null);return{headings:e,activeId:t,setActiveId:n}}function Tn(e=[],t=[]){let n=L(),r=P([]),[i,a]=F({opacity:0,transform:`translateX(0) scaleX(0)`,width:0}),o=t.find(e=>e.path===n.pathname)?.tab?.toLowerCase(),s=e.findIndex(e=>e.id.toLowerCase()===o),c=s===-1?0:s;return M(()=>{let e=r.current[c];e&&a({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[c,e.length,n.pathname]),{tabs:e,activeIndex:c,indicatorStyle:i,tabRefs:r,activeTabId:o}}function Z(e,t,n){let r=e;return t&&(r===t||r.startsWith(t+`/`))&&(r=r===t?`index.md`:r.slice(t.length+1)),n&&(r===n||r.startsWith(n+`/`))&&(r=r===n?`index.md`:r.slice(n.length+1)),r}function En(){let e=Te(),t=o(),{allRoutes:n,currentRoute:r,currentVersion:i,currentLocale:a,config:s}=t,c=s.versions,l=f(e=>e.setVersion),u=t=>{if(!c||t===i)return;l(t);let o=`/docs/${t}`;if(r){let e=Z(r.filePath,r.version,r.locale),i=n.find(n=>Z(n.filePath,n.version,n.locale)===e&&(n.version||c.defaultVersion)===t&&(a?n.locale===a:!n.locale));if(i)o=i.path;else{let e=n.find(e=>Z(e.filePath,e.version,e.locale)===`index.md`&&(e.version||c.defaultVersion)===t&&(a?e.locale===a:!e.locale));o=e?e.path:`/docs/${t}${a?`/${a}`:``}`}}e(o)},d=t.availableVersions.map(e=>({...e,label:e.label,value:e.key}));return{currentVersion:i,currentVersionLabel:t.currentVersionLabel,availableVersions:d,handleVersionChange:u}}function Dn(){let e=Te(),{allRoutes:t,currentRoute:n,currentLocale:r,config:i}=o(),a=i.i18n,s=f(e=>e.setLocale);return{currentLocale:r,currentLocaleLabel:i.i18n?.localeConfigs?.[r]?.label||i.i18n?.locales[r]||r,availableLocales:i.i18n?Object.entries(i.i18n.locales).map(([e,t])=>({key:e,label:i.i18n?.localeConfigs?.[e]?.label||t,value:e,isCurrent:e===r})):[],handleLocaleChange:i=>{if(!a||i===r)return;s(i);let o=`/`;if(n){let e=Z(n.filePath,n.version,n.locale),r=t.find(t=>Z(t.filePath,t.version,t.locale)===e&&(t.locale||a.defaultLocale)===i&&t.version===n.version);if(r)o=r.path;else{let e=t.find(e=>Z(e.filePath,e.version,e.locale)===`index.md`&&(e.locale||a.defaultLocale)===i&&e.version===n.version);o=e?e.path:i===a.defaultLocale?n.version?`/${n.version}`:`/`:n.version?`/${n.version}/${i}`:`/${i}`}}else{let e=t.find(e=>(e.filePath===`index.mdx`||e.filePath===`index.md`)&&(e.locale||a.defaultLocale)===i&&!e.version);o=e?e.path:i===a.defaultLocale?`/`:`/${i}`}e(o)}}}function On(){let{routes:e,currentRoute:t}=o(),n=L();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let r=t.tab?.toLowerCase(),i=r?e.filter(e=>e.tab?.toLowerCase()===r):e.filter(e=>!e.tab),a=i.findIndex(e=>e.path===n.pathname);return{prevPage:a>0?i[a-1]:null,nextPage:a!==-1&&a<i.length-1?i[a+1]:null,currentRoute:t}}function kn(){let{currentRoute:e}=o(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}const An=()=>L();function jn({children:e,className:t,style:n}){return V(`div`,{className:d(`h-screen flex flex-col overflow-hidden bg-bg-main text-text-main`,t),style:n,children:e})}function Mn({children:e,className:t,style:n}){return V(`div`,{className:d(`mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden`,t),style:n,children:e})}function Nn({children:e,className:t,style:n}){return V(`main`,{className:d(`boltdocs-content flex-1 min-w-0 overflow-y-auto`,`contain-layout`,t),style:n,children:e})}function Pn({children:e,className:t,style:n}){let{pathname:r}=An();return V(`div`,{className:d(`boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8`,{"max-w-content-max":r.includes(`/docs/`)},t),style:n,children:e})}function Fn({children:e,className:t,style:n}){return V(`div`,{className:d(`flex items-center justify-between mb-10`,t),style:n,children:e})}function In({children:e,className:t,style:n}){return V(`div`,{className:d(`mt-20`,t),style:n,children:e})}const Q=Object.assign(jn,{Body:Mn,Content:Nn,ContentMdx:Pn,ContentHeader:Fn,ContentFooter:In});function Ln(){let{theme:e,setTheme:t}=W(),[n,r]=F(!1);if(M(()=>{r(!0)},[]),!n)return V(`div`,{className:`h-9 w-9`});let i=e===`system`?Ze:e===`dark`?Qe:tt;return H(T.Trigger,{placement:`bottom right`,children:[V(it,{className:`flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main outline-none focus-visible:ring-2 focus-visible:ring-primary-500`,"aria-label":`Selection theme`,children:V(i,{size:20,className:`animate-in fade-in zoom-in duration-300`})}),H(T.Root,{selectionMode:`single`,selectedKeys:[e],onSelectionChange:e=>{let n=Array.from(e)[0];t(n)},children:[H(T.Item,{id:`light`,children:[V(tt,{size:16}),V(`span`,{children:`Light`})]}),H(T.Item,{id:`dark`,children:[V(Qe,{size:16}),V(`span`,{children:`Dark`})]}),H(T.Item,{id:`system`,children:[V(Ze,{size:16}),V(`span`,{children:`System`})]})]})]})}async function Rn(e,t,n=`https://api.github.com`){let r=new Headers;t&&r.append(`authorization`,t);let i=await(await fetch(`${n}/repos/${e}`,{headers:r})).json();return i.stargazers_count===void 0?`0`:zn(i.stargazers_count)}const zn=e=>Intl.NumberFormat(`en`,{notation:`compact`,compactDisplay:`short`}).format(e);function Bn({repo:e}){let[t,n]=F(null);return M(()=>{e&&Rn(e).then(e=>n(e)).catch(()=>n(`0`))},[e]),H(`a`,{href:`https://github.com/${e}`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-muted transition-all hover:bg-bg-main hover:border-border-strong hover:text-text-main`,children:[V(p,{className:`h-4 w-4`}),t&&V(`span`,{className:`tabular-nums`,children:t})]})}function Vn({tabs:e,routes:t}){let{currentLocale:n}=o(),{indicatorStyle:r,tabRefs:i,activeIndex:a}=Tn(e,t),s=e=>{if(!e)return null;if(e.trim().startsWith(`<svg`))return V(`span`,{className:`h-4 w-4`,dangerouslySetInnerHTML:{__html:e}});let t=Ee[e];return t?V(t,{size:16}):V(`img`,{src:e,alt:``,className:`h-4 w-4 object-contain`})};return V(`div`,{className:`mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6`,children:H(y.List,{className:`border-none py-0`,children:[e.map((e,r)=>{let o=r===a,l=t.find(t=>t.tab&&t.tab.toLowerCase()===e.id.toLowerCase());return H(c,{href:l?l.path:`#`,ref:e=>{i.current[r]=e},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${o?`text-primary-500`:`text-text-muted hover:text-text-main`}`,children:[s(e.icon),V(`span`,{children:X(e.text,n)})]},e.id)}),V(y.Indicator,{style:r})]})})}const Hn=ge(()=>import(`../search-dialog-BeNyI_KQ.mjs`).then(e=>({default:e.SearchDialog})));function Un(){let{links:e,title:t,logo:n,logoProps:r,github:i,social:a,config:s}=Sn(),{routes:c,allRoutes:l,currentVersion:u,currentLocale:d}=o(),{pathname:f}=L(),p=s.theme||{},m=f.startsWith(`/docs`),h=p?.tabs&&p.tabs.length>0;return H(D.Root,{className:h?`border-b-0`:``,children:[H(D.Content,{children:[H(D.Left,{children:[n&&V(D.Logo,{src:n,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),V(D.Title,{children:t}),s.versions&&u&&V(Gn,{})]}),V(D.Center,{children:V(me,{fallback:V(`div`,{className:`h-9 w-32 animate-pulse rounded-md bg-bg-surface`}),children:V(Hn,{routes:c||[]})})}),H(D.Right,{children:[V(D.Links,{children:e.map(e=>V(B,{children:V(Wn,{link:e},e.href)}))}),s.i18n&&d&&V(Kn,{}),V(D.Split,{}),V(Ln,{}),i&&V(Bn,{repo:p?.githubRepo??``}),a.length>0&&V(D.Split,{}),V(`div`,{className:`flex items-center gap-1`,children:a.map(({icon:e,link:t})=>V(D.Socials,{icon:e,link:t,className:`p-1.5`},t))})]})]}),m&&h&&p?.tabs&&V(`div`,{className:`w-full border-b border-border-subtle bg-bg-main`,children:V(Vn,{tabs:p.tabs,routes:l||c||[]})})]})}function Wn({link:e}){let t=a(e.href||``);return V(D.Link,{...e,href:t})}function Gn(){let{currentVersionLabel:t,availableVersions:n,handleVersionChange:r}=En();return n.length===0?null:H(T.Trigger,{children:[V(e,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:V(R,{className:`w-3.5 h-3.5 text-text-muted/60`}),className:`h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5`,children:V(`span`,{className:`font-semibold text-[0.8125rem]`,children:t})}),V(T.Root,{children:V(T.Section,{items:n,children:e=>V(T.Item,{onPress:()=>r(e.value),children:e.label},`${e.value??``}`)})})]})}function Kn(){let{currentLocale:t,availableLocales:n,handleLocaleChange:r}=Dn();return n.length===0?null:H(T.Trigger,{children:[V(e,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:V(R,{className:`w-3.5 h-3.5 text-text-muted/60`}),className:`h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5 px-2.5`,children:H(`div`,{className:`flex items-center gap-1.5`,children:[V(Je,{className:`w-3.5 h-3.5 text-primary-500`}),V(`span`,{className:`font-bold text-[0.75rem] tracking-wider uppercase opacity-90`,children:t||`en`})]})}),V(T.Root,{children:V(T.Section,{items:n,children:e=>V(T.Item,{onPress:()=>r(e.value),children:H(`div`,{className:`flex items-center justify-between w-full gap-4`,children:[V(`span`,{children:e.label}),V(`span`,{className:`text-[10px] font-bold opacity-40 uppercase tracking-tighter`,children:e.value})]})},`${e.value??``}`)})})]})}function qn(){return V(`div`,{className:`flex items-center justify-center mt-10 mb-4 px-4 w-full`,children:H(`a`,{href:`https://github.com/jesusalcaladev/boltdocs`,target:`_blank`,rel:`noopener noreferrer`,className:`group relative flex items-center gap-2 px-4 py-2 rounded-full border border-border-subtle bg-bg-surface/50 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:bg-bg-surface hover:shadow-xl hover:shadow-primary-500/5 select-none`,children:[V(rt,{className:`w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300`,fill:`currentColor`}),H(`span`,{className:`text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide`,children:[`Powered by`,` `,V(`strong`,{className:`font-bold text-text-main/80 group-hover:text-text-main`,children:`Boltdocs`})]})]})})}function Jn(e){if(e)return Ee[e]||void 0}function Yn({group:e,activePath:t,getIcon:n}){let r=N(()=>e.routes.some(e=>e.path===t),[e.routes,t]),[i,a]=F(!0);return M(()=>{r&&a(!0)},[r]),V(E.Group,{title:e.title,isOpen:i,onToggle:()=>a(!i),children:e.routes.map(e=>{let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return V(E.Link,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge},e.path)})})}function Xn({routes:e,config:t}){let{groups:n,ungrouped:r,activePath:i}=Cn(e),a=t.theme||{};return H(E.Root,{children:[r.length>0&&V(E.Group,{className:`mb-6`,children:r.map(e=>{let t=i===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return V(E.Link,{label:e.title,href:e.path,active:t,icon:Jn(e.icon),badge:e.badge},e.path)})}),n.map(e=>V(Yn,{group:e,activePath:i,getIcon:Jn},e.slug)),a?.poweredBy&&V(`div`,{className:`mt-auto pt-8`,children:V(qn,{})})]})}function Zn({headings:e=[],editLink:t,communityHelp:n,filePath:r}){let{headings:i}=wn(e),a=O.useMemo(()=>i.map(e=>({title:e.text,url:`#${e.id}`,depth:e.level})),[i]);return i.length===0?null:V(ce,{toc:a,children:V(Qn,{headings:i,editLink:t,communityHelp:n,filePath:r})})}function Qn({headings:e,editLink:t,communityHelp:n,filePath:r}){let i=oe(),[a,o]=F({opacity:0}),s=P(null),c=P(null);M(()=>{if(!i||!s.current)return;let e=s.current.querySelector(`a[href="#${i}"]`);e&&o({transform:`translateY(${e.offsetTop}px)`,height:`${e.offsetHeight}px`,opacity:1})},[i]);let l=j((e,t)=>{e.preventDefault();let n=document.getElementById(t);n&&(n.scrollIntoView({behavior:`smooth`}),window.history.pushState(null,``,`#${t}`))},[]);return H(b.Root,{children:[H(b.Header,{className:`flex flex-row gap-x-2`,children:[V(nt,{size:16}),`On this page`]}),V(ee,{containerRef:c,children:H(b.Content,{className:`max-h-[450px] boltdocs-otp-scroll-area`,ref:c,children:[V(b.Indicator,{style:a}),V(`ul`,{className:`relative space-y-2 border-l border-border-subtle`,ref:s,children:e.map(e=>V(b.Item,{level:e.level,children:V(b.Link,{href:`#${e.id}`,active:i===e.id,onClick:t=>l(t,e.id),className:`pl-4`,children:e.text})},e.id))})]})}),(t||n)&&H(`div`,{className:`mt-8 pt-8 border-t border-border-subtle space-y-4`,children:[V(`p`,{className:`text-xs font-bold uppercase tracking-wider text-text-main`,children:`Need help?`}),H(`ul`,{className:`space-y-3`,children:[t&&r&&V(`li`,{children:H(`a`,{href:t.replace(`:path`,r),target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors`,children:[V($e,{size:16}),`Edit this page`]})}),n&&V(`li`,{children:H(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors`,children:[V(Le,{size:16}),`Community help`]})})]})]})]})}function $n({siteTitle:e,siteDescription:t,routes:n}){let r=L();return M(()=>{let i=n.find(e=>e.path===r.pathname),a=i?.title,o=i?.description||t||``;document.title=a?`${a} | ${e}`:e;let s=document.querySelector(`meta[name="description"]`);s||(s=document.createElement(`meta`),s.name=`description`,document.head.appendChild(s)),s.content=o,$(`property`,`og:title`,document.title),$(`property`,`og:description`,o),$(`property`,`og:type`,`article`),$(`property`,`og:url`,window.location.href),$(`name`,`twitter:card`,`summary`),$(`name`,`twitter:title`,document.title),$(`name`,`twitter:description`,o);let c=document.querySelector(`link[rel="canonical"]`);c||(c=document.createElement(`link`),c.rel=`canonical`,document.head.appendChild(c)),c.href=window.location.origin+r.pathname},[r.pathname,e,t,n]),null}function $(e,t,n){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement(`meta`),r.setAttribute(e,t),document.head.appendChild(r)),r.content=n}function er(){let{crumbs:e,activeRoute:t}=kn(),n=h().theme||{};return e.length===0||!n?.breadcrumbs?null:H(w.Root,{children:[V(w.Item,{children:V(w.Link,{href:`/`,children:V(Ke,{size:14})})}),e.map((e,n)=>H(w.Item,{children:[V(w.Separator,{}),V(w.Link,{href:e.href,className:d({"font-medium text-text-main":e.href===t?.path}),children:e.label})]},`crumb-${e.href}-${e.label}-${n}`))]})}function tr(){let{prevPage:e,nextPage:t}=On();return!e&&!t?null:H(S.Root,{className:`animate-in fade-in slide-in-from-bottom-4 duration-700`,children:[e?H(S.Link,{to:e.path,direction:`prev`,children:[V(S.Title,{children:`Previous`}),V(S.Description,{children:e.title})]}):V(`div`,{}),t&&H(S.Link,{to:t.path,direction:`next`,children:[V(S.Title,{children:`Next`}),V(S.Description,{children:t.title})]})]})}var nr=class extends pe{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`Uncaught error in Boltdocs Layout:`,e,t)}render(){return this.state.hasError?this.props.fallback||H(`div`,{className:`flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4`,children:[V(`div`,{className:`text-lg font-bold text-red-400`,children:`Something went wrong`}),V(`p`,{className:`text-sm text-text-muted max-w-md`,children:this.state.error?.message||`An unexpected error occurred while rendering this page.`}),V(e,{className:`rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer`,onPress:()=>this.setState({hasError:!1}),children:`Try again`})]}):this.props.children}};function rr({children:e}){let{routes:t,allRoutes:n,currentRoute:r,currentLocale:i}=o(),{pathname:a}=L(),s=h(),c=_t().CopyMarkdown||mn,l=a.startsWith(`/docs`);return H(Q,{children:[V($n,{siteTitle:X(s.theme?.title,i)||`Boltdocs`,siteDescription:X(s.theme?.description,i)||``,routes:n}),V(Un,{}),H(Q.Body,{children:[l&&V(Xn,{routes:t,config:s}),V(Q.Content,{children:H(Q.ContentMdx,{children:[l&&H(Q.ContentHeader,{children:[V(er,{}),V(c,{mdxRaw:r?._rawContent,route:r,config:s.theme?.copyMarkdown})]}),V(nr,{children:e}),l&&V(Q.ContentFooter,{children:V(tr,{})})]})}),l&&V(Zn,{headings:r?.headings,editLink:s.theme?.editLink,communityHelp:s.theme?.communityHelp,filePath:r?.filePath})]})]})}export{K as Admonition,ce as AnchorProvider,jt as Badge,er as Breadcrumbs,bt as Button,_ as ButtonGroup,Pt as Card,Nt as Cards,Wt as Caution,G as CodeBlock,fn as ComponentPreview,un as ComponentProps,mn as CopyMarkdown,Vt as Danger,rr as DefaultLayout,Q as DocsLayout,nr as ErrorBoundary,sn as Field,rn as FileTree,$n as Head,ln as Image,Ut as Important,Ht as InfoBox,cn as Link,Xt as List,gn as Loading,Un as Navbar,ut as NotFound,Rt as Note,Zn as OnThisPage,tr as PageNav,w as PrimitiveBreadcrumbs,e as PrimitiveButton,c as PrimitiveLink,T as PrimitiveMenu,l as PrimitiveNavLink,D as PrimitiveNavbar,g as PrimitiveNavigationMenu,b as PrimitiveOnThisPage,S as PrimitivePageNav,re as PrimitivePopover,E as PrimitiveSidebar,C as PrimitiveSkeleton,y as PrimitiveTabs,de as PrimitiveTooltip,ee as ScrollProvider,te as SearchDialogPrimitive,Xn as Sidebar,Dt as Tab,on as Table,Ot as Tabs,zt as Tip,kt as Video,Bt as Warning,d as cn,xn as createBoltdocsApp,oe as useActiveAnchor,ae as useActiveAnchors,kn as useBreadcrumbs,h as useConfig,Dn as useI18n,ne as useItems,a as useLocalizedTo,An as useLocation,_t as useMdxComponents,Sn as useNavbar,wn as useOnThisPage,On as usePageNav,o as useRoutes,se as useSearch,Cn as useSidebar,Tn as useTabs,W as useTheme,En as useVersion};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Boltdocs - https://boltdocs.vercel.app
|
|
3
|
+
* Copyright (c) 2026 Jesus Alcala
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require(`react`);l=c(l);let u=require(`react-dom/server`);u=c(u);let d=require(`react-router-dom/server.js`);require(`react-dom/client`);let f=require(`react-router-dom`),p=require(`lucide-react`),m=require(`react-aria-components`);m=c(m);let h=require(`react/jsx-runtime`),g=require(`clsx`),_=require(`tailwind-merge`),v=require(`virtual:boltdocs-layout`);v=c(v);let y=require(`class-variance-authority`),b=require(`virtual:boltdocs-mdx-components`);b=c(b);const x=(0,l.createContext)(null);function S(){let e=(0,l.use)(x);if(!e)throw Error(`useConfig must be used within a ConfigProvider`);return e}const C=(0,l.createContext)({preload:()=>{},routes:[]});function ee(){return(0,l.use)(C)}function te({routes:e,modules:t,children:n}){let r=(0,l.useRef)(null),i=(0,l.useCallback)(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(0,h.jsx)(C.Provider,{value:{preload:i,routes:e},children:n})}const w=(0,l.createContext)(void 0),T=`boltdocs-storage`;function ne(){try{let e=localStorage.getItem(T);if(e){let t=JSON.parse(e);return t?.state||t}}catch{}return{}}function re({children:e}){let t=ne(),[n,r]=(0,l.useState)(t.currentLocale),[i,a]=(0,l.useState)(t.currentVersion),[o,s]=(0,l.useState)(!1);(0,l.useEffect)(()=>{s(!0)},[]),(0,l.useEffect)(()=>{if(o){let e={currentLocale:n,currentVersion:i};try{localStorage.setItem(T,JSON.stringify({state:e}))}catch{}}},[n,i,o]);let c={currentLocale:n,currentVersion:i,hasHydrated:o,setLocale:(0,l.useCallback)(e=>{r(e)},[]),setVersion:(0,l.useCallback)(e=>{a(e)},[]),setHasHydrated:(0,l.useCallback)(e=>{s(e)},[])};return(0,h.jsx)(w.Provider,{value:c,children:e})}function ie(){let e=(0,l.useContext)(w);if(!e)throw Error(`useBoltdocsContext must be used within a BoltdocsProvider`);return e}function E(e){return e(ie())}function D(){let{routes:e}=ee(),t=S(),n=(0,f.useLocation)(),r=E(e=>e.currentLocale),i=E(e=>e.currentVersion),a=E(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 O(e){let t=S(),{currentLocale:n,currentVersion:r}=D();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 k(...e){return(0,_.twMerge)((0,g.clsx)(e))}const A=l.default.forwardRef((e,t)=>{let{href:n,prefetch:r=`hover`,onMouseEnter:i,onFocus:a,...o}=e,s=O(n??``),{preload:c}=ee(),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(0,h.jsx)(m.Link,{...o,ref:t,href:s,onMouseEnter:l,onFocus:u})});A.displayName=`Link`;const ae=l.default.forwardRef((e,t)=>{let{href:n,end:r=!1,className:i,children:a,...o}=e,s=(0,f.useLocation)(),c=O(n??``),l=r?s.pathname===c:s.pathname.startsWith(c),u=typeof i==`function`?i({isActive:l}):k(i,l&&`active`),d=typeof a==`function`?a({isActive:l}):a;return(0,h.jsx)(A,{...o,ref:t,href:n,className:u,children:d})});ae.displayName=`NavLink`;function oe(){return(0,h.jsx)(`div`,{className:`flex items-center justify-center min-h-[60vh] text-center`,children:(0,h.jsxs)(`div`,{className:`space-y-4`,children:[(0,h.jsx)(`span`,{className:`text-8xl font-black tracking-tighter text-primary-500/20`,children:`404`}),(0,h.jsx)(`h1`,{className:`text-2xl font-bold text-text-main`,children:`Page Not Found`}),(0,h.jsx)(`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.`}),(0,h.jsxs)(A,{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:[(0,h.jsx)(p.ArrowLeft,{size:16}),` Go to Home`]})]})})}const se=(0,l.createContext)(void 0);function ce({children:e}){let[t,n]=(0,l.useState)(`system`),[r,i]=(0,l.useState)(`dark`),[a,o]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{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)},[]),(0,l.useEffect)(()=>{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]),(0,h.jsx)(se.Provider,{value:{theme:t,resolvedTheme:r,setTheme:e=>{n(e),localStorage.setItem(`boltdocs-theme`,e)}},children:e})}function le(){let e=(0,l.use)(se);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function ue({children:e}){let t=(0,f.useNavigate)();return(0,h.jsx)(m.RouterProvider,{navigate:(e,n)=>{(0,l.startTransition)(()=>{t(e,n)})},useHref:f.useHref,children:e})}function de(){let{pathname:e,hash:t}=(0,f.useLocation)();return(0,l.useLayoutEffect)(()=>{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 fe(){return(0,h.jsx)(v.default,{children:(0,h.jsx)(f.Outlet,{})})}const pe=(0,l.createContext)({});function me(){return(0,l.use)(pe)}function he({components:e,children:t}){return(0,h.jsx)(pe.Provider,{value:e,children:t})}function ge({Component:e}){return(0,h.jsx)(e,{components:me()})}const j=(0,y.cva)(`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`}}),M=({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?(0,h.jsx)(`span`,{className:`inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]`,children:t}):(0,h.jsxs)(h.Fragment,{children:[t&&n===`left`&&(0,h.jsx)(`span`,{className:`inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]`,children:t}),(0,h.jsx)(`span`,{className:`flex items-center`,children:i}),t&&n===`right`&&(0,h.jsx)(`span`,{className:`inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]`,children:t})]});return e?(0,h.jsx)(m.Link,{href:e,className:k(j({variant:o,size:s,rounded:c,iconSize:f?l:void 0,disabled:u}),a),...d,children:p}):(0,h.jsx)(m.Button,{className:k(j({variant:o,size:s,rounded:c,iconSize:f?l:void 0,disabled:u}),a),...d,children:p})},_e=({className:e,variant:t,size:n,rounded:r,iconSize:i,disabled:a,...o})=>(0,h.jsx)(M,{className:k(`group`,j({variant:t,size:n,rounded:r,iconSize:i,disabled:a,className:e})),...o}),ve=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 ye(e){let{title:t}=e,[n,r]=(0,l.useState)(!1),[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(!1),c=(0,l.useRef)(null);S();let u=(0,l.useCallback)(async()=>{ve(c.current?.textContent??``),r(!0),setTimeout(()=>r(!1),2e3)},[]);return(0,l.useEffect)(()=>{s((c.current?.textContent?.length??0)>120)},[e.children,e.highlightedHtml]),{copied:n,isExpanded:i,setIsExpanded:a,isExpandable:o,preRef:c,handleCopy:u,shouldTruncate:o&&!i}}function N(e){let{size:t=20,...n}=e;return{...n,width:t,height:t}}const P=e=>(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...N(e),children:[(0,h.jsx)(`title`,{children:`TypeScript`}),(0,h.jsx)(`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`})]}),F=e=>(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...N(e),children:[(0,h.jsx)(`title`,{children:`JavaScript`}),(0,h.jsx)(`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`})]}),I=e=>(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...N(e),children:[(0,h.jsx)(`title`,{children:`JSON`}),(0,h.jsx)(`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`})]}),L=e=>(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...N(e),children:[(0,h.jsx)(`title`,{children:`CSS`}),(0,h.jsx)(`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`})]}),be=e=>(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...N(e),children:[(0,h.jsx)(`title`,{children:`HTML`}),(0,h.jsx)(`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`})]}),R=e=>(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...N(e),children:[(0,h.jsx)(`title`,{children:`React`}),(0,h.jsx)(`path`,{fill:`#0E8ADC`,d:`M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z`}),(0,h.jsx)(`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`}),(0,h.jsx)(`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`}),(0,h.jsx)(`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`})]}),z=e=>(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...N(e),children:[(0,h.jsx)(`title`,{children:`Markdown`}),(0,h.jsx)(`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`})]}),B=e=>(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 25 24`,...N(e),children:[(0,h.jsx)(`title`,{children:`Shell`}),(0,h.jsx)(`path`,{stroke:`#14B8A6`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M4.336 17l6-6-6-6M12.336 19h8`})]}),V=e=>(0,h.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,...N(e),children:[(0,h.jsx)(`title`,{children:`YAML`}),(0,h.jsx)(`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`})]}),H=({className:e,children:t,...n})=>(0,h.jsx)(m.Tooltip,{...n,offset:8,className:t=>k(`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=>(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(m.OverlayArrow,{children:(0,h.jsxs)(`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:[(0,h.jsx)(`title`,{children:`Arrow`}),(0,h.jsx)(`path`,{d:`M0 0 L4 4 L8 0`})]})}),typeof t==`function`?t(e):t]})}),U=({content:e,children:t,delay:n=500,closeDelay:r=0,...i})=>(0,h.jsxs)(m.TooltipTrigger,{delay:n,closeDelay:r,children:[t,(0,h.jsx)(H,{...i,children:e})]});U.Root=U,U.Content=H;const xe={ts:P,tsx:R,js:F,jsx:R,json:I,css:L,html:be,md:z,mdx:z,bash:B,sh:B,yaml:V,yml:V};function W(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;S();let u=e.lang||o||``,{copied:d,isExpanded:f,setIsExpanded:g,isExpandable:_,preRef:v,handleCopy:y,shouldTruncate:b}=ye(e),x=xe[u];return(0,h.jsxs)(`div`,{className:k(`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":b},e.className),children:[a&&(0,h.jsxs)(`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:[x?(0,h.jsx)(x,{size:14}):(0,h.jsx)(p.File,{size:14,className:`opacity-60`}),(0,h.jsx)(`span`,{children:a})]}),(0,h.jsx)(`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&&(0,h.jsx)(U,{content:d?`Copied!`:`Copy code`,children:(0,h.jsx)(m.Button,{onPress:y,className:k(`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:d?(0,h.jsx)(p.Check,{size:20}):(0,h.jsx)(p.Copy,{size:20})})})}),l?(0,h.jsx)(`div`,{ref:v,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}}):(0,h.jsx)(`pre`,{ref:v,className:`m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]`,...c,children:t}),_&&(0,h.jsx)(`div`,{className:k(b?`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:(0,h.jsx)(m.Button,{onPress:()=>g(!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 Se({initialIndex:e=0,tabs:t}){let n=t[e]?.props.disabled?t.findIndex(e=>!e.props.disabled):e,[r,i]=(0,l.useState)(n===-1?0:n),a=(0,l.useRef)([]),[o,s]=(0,l.useState)({opacity:0,transform:`translateX(0)`,width:0});return(0,l.useEffect)(()=>{let e=a.current[r];e&&s({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[r,t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:o,handleKeyDown:(0,l.useCallback)(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 Ce=(0,y.cva)(`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`}}),we=(0,y.cva)(`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 Te({children:e}){return(0,h.jsx)(`div`,{className:`py-4`,children:typeof e==`string`?(0,h.jsx)(W,{className:`language-bash`,children:(0,h.jsx)(`code`,{children:e.trim()})}):e})}function Ee({defaultIndex:e=0,children:t}){let n=(0,l.useMemo)(()=>l.Children.toArray(t).filter(e=>(0,l.isValidElement)(e)&&e.props?.label),[t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:o}=Se({initialIndex:e,tabs:n});return(0,h.jsx)(`div`,{className:`my-8 w-full group/tabs`,children:(0,h.jsxs)(m.Tabs,{selectedKey:r.toString(),onSelectionChange:e=>i(Number(e)),className:`w-full`,children:[(0,h.jsxs)(m.TabList,{"aria-label":`Content Tabs`,className:k(Ce()),children:[n.map((e,t)=>{let{label:n,icon:r,disabled:i}=e.props,o=t.toString();return(0,h.jsxs)(m.Tab,{id:o,isDisabled:i,ref:e=>{a.current[t]=e},className:({isSelected:e,isDisabled:t})=>k(we({isActive:e,isDisabled:t})),children:[!!r&&(0,h.jsx)(`span`,{className:`shrink-0 [&>svg]:w-4 [&>svg]:h-4`,children:r}),(0,h.jsx)(`span`,{children:n})]},o)}),(0,h.jsx)(`div`,{className:`absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none`,style:o,"aria-hidden":`true`})]}),n.map((e,t)=>(0,h.jsx)(m.TabPanel,{id:t.toString(),children:n[t]},t))]})})}function De({src:e,poster:t,alt:n,children:r,controls:i,preload:a=`metadata`,...o}){let s=(0,l.useRef)(null),[c,u]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{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()},[]),(0,h.jsx)(`div`,{ref:s,className:`my-6 overflow-hidden rounded-lg border border-border-subtle`,children:c?(0,h.jsxs)(`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.`]}):(0,h.jsx)(`div`,{className:`aspect-video bg-bg-surface animate-pulse`,role:`img`,"aria-label":n||`Video`})})}const Oe=(0,y.cva)(`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 ke({variant:e=`default`,children:t,className:n=``,...r}){return(0,h.jsx)(`span`,{className:k(Oe({variant:e}),n),...r,children:t})}const Ae=(0,y.cva)(`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 je({cols:e=3,children:t,className:n=``,...r}){return(0,h.jsx)(`div`,{className:k(Ae({cols:e}),n),...r,children:t})}function Me({title:e,icon:t,href:n,children:r,className:i=``,...a}){let o=(0,l.useRef)(null),s=(0,l.useRef)(null),c=(0,l.useCallback)(e=>{let t=o.current||s.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=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`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&&(0,h.jsx)(`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}),(0,h.jsxs)(`div`,{className:`space-y-1.5`,children:[e&&(0,h.jsx)(`h3`,{className:`text-sm font-bold text-text-main`,children:e}),r&&(0,h.jsx)(`div`,{className:`text-sm text-text-muted leading-relaxed`,children:r})]})]}),d=k(`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?(0,h.jsx)(m.Link,{ref:s,href:n,className:k(d,`no-underline cursor-pointer`),onMouseMove:c,...a,children:u}):(0,h.jsx)(`div`,{ref:o,role:`presentation`,className:d,onMouseMove:c,...a,children:u})}const Ne={note:(0,h.jsx)(p.Bookmark,{size:18}),tip:(0,h.jsx)(p.Lightbulb,{size:18}),info:(0,h.jsx)(p.Info,{size:18}),warning:(0,h.jsx)(p.AlertTriangle,{size:18}),danger:(0,h.jsx)(p.ShieldAlert,{size:18}),important:(0,h.jsx)(p.Flame,{size:18}),caution:(0,h.jsx)(p.Zap,{size:18})},Pe={note:`Note`,tip:`Tip`,info:`Info`,warning:`Warning`,danger:`Danger`,important:`Important`,caution:`Caution`},G=(0,y.cva)(`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(0,h.jsxs)(`div`,{className:k(G({type:e}),r),role:e===`warning`||e===`danger`?`alert`:`note`,...i,children:[(0,h.jsxs)(`div`,{className:`flex items-center flex-row gap-2 mb-2`,children:[(0,h.jsx)(`span`,{className:k(`shrink-0`,G({type:e})),children:Ne[e]}),(0,h.jsx)(`span`,{className:`text-sm font-bold tracking-tight text-text-main`,children:t||Pe[e]})]}),(0,h.jsx)(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0`,children:n})]})}const Fe=e=>(0,h.jsx)(K,{type:`note`,...e}),Ie=e=>(0,h.jsx)(K,{type:`tip`,...e}),Le=e=>(0,h.jsx)(K,{type:`warning`,...e}),Re=e=>(0,h.jsx)(K,{type:`danger`,...e}),ze=e=>(0,h.jsx)(K,{type:`info`,...e}),Be=e=>(0,h.jsx)(K,{type:`important`,...e}),Ve=e=>(0,h.jsx)(K,{type:`caution`,...e}),He=(0,y.cva)(`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}}),Ue=(0,y.cva)(`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}}),We=(0,y.cva)(`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 Ge({icon:e,children:t,variant:n,dense:r}){return(0,h.jsxs)(`li`,{className:k(Ue({variant:n,dense:r})),children:[e&&(0,h.jsx)(`span`,{className:k(We({variant:n===`bubble`?`bubble`:`default`})),children:e}),(0,h.jsx)(`div`,{className:`flex-1 text-text-muted group-hover:text-text-main transition-colors`,children:t})]})}const Ke={checked:e=>(0,h.jsx)(p.Check,{size:14,className:k(`text-emerald-500 shrink-0`,e)}),arrow:e=>(0,h.jsx)(p.ChevronRight,{size:14,className:k(`text-primary-400 shrink-0`,e)}),bubble:e=>(0,h.jsx)(p.Circle,{size:6,fill:`currentColor`,className:k(`text-primary-500 shrink-0`,e)}),default:()=>null,number:()=>null};function qe({variant:e=`default`,cols:t=1,dense:n=!1,children:r,className:i,...a}){let o=t!==void 0&&Number(t)>1,s=Ke[e],c=He({variant:e,cols:t,dense:n,isGrid:o,className:i}),u=e===`number`?`ol`:`ul`;return e===`default`||e===`number`?(0,h.jsx)(u,{className:c,...a,children:r}):(0,h.jsx)(`ul`,{className:c,...a,children:l.Children.map(r,t=>{if(!(0,l.isValidElement)(t))return t;let r=t,i=r.type===`li`?r.props.children:r.props.children||t;return(0,h.jsx)(Ge,{icon:s(),variant:e,dense:n,children:i})})})}const Je={ts:P,tsx:R,js:F,jsx:R,json:I,css:L,html:be,md:z,mdx:z,bash:B,sh:B,yaml:V,yml:V},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(``):(0,l.isValidElement)(e)&&e.props&&typeof e.props==`object`&&`children`in e.props?J(e.props.children):``}function Ye(e,t){let n=e.toLowerCase(),r=`shrink-0 transition-colors duration-200`;if(t)return(0,h.jsx)(p.Folder,{size:16,strokeWidth:2,className:k(r,`text-primary-400`),fill:`currentColor`,fillOpacity:.15});let i=Je[n.split(`.`).pop()||``];if(i)return(0,h.jsx)(i,{size:16});let a=k(r,`text-text-dim group-hover:text-text-main`);return q.CODE.test(n)?(0,h.jsx)(p.FileCode,{size:16,strokeWidth:2,className:a}):q.TEXT.test(n)?(0,h.jsx)(p.FileText,{size:16,strokeWidth:2,className:a}):q.IMAGE.test(n)?(0,h.jsx)(p.FileImage,{size:16,strokeWidth:2,className:a}):(0,h.jsx)(p.File,{size:16,strokeWidth:2,className:a})}function Y(e,t){if(!(0,l.isValidElement)(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 r=e.props;return r?.originalType===t||r?.mdxType===t}function Xe(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,t=`root`){if(!(0,l.isValidElement)(e))return[];let n=[];if(Y(e,`ul`))return l.Children.forEach(e.props.children,(e,r)=>{n.push(...X(e,`${t}-${r}`))}),n;if(Y(e,`li`)){let r=l.Children.toArray(e.props.children),i=r.findIndex(e=>Y(e,`ul`)),a=i!==-1,o=a?r.slice(0,i):r,s=a?r.slice(i):[],{name:c,comment:u}=Xe(J(o)),d=c.endsWith(`/`),f=d?c.slice(0,-1):c,p=a||d;return n.push({id:`${t}-${f}`,name:f,comment:u,isFolder:p,children:a?X(s[0],`${t}-${f}`):void 0}),n}return e.props&&typeof e.props==`object`&&`children`in e.props&&l.Children.forEach(e.props.children,(e,r)=>{n.push(...X(e,`${t}-${r}`))}),n}function Ze({item:e}){return(0,h.jsxs)(m.TreeItem,{id:e.id,textValue:e.name,className:`outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md`,children:[(0,h.jsx)(m.TreeItemContent,{children:({isExpanded:t,hasChildItems:n})=>(0,h.jsxs)(`div`,{className:`flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer`,children:[(0,h.jsx)(`div`,{style:{width:`calc((var(--tree-item-level) - 1) * 1rem)`},className:`shrink-0`}),n?(0,h.jsx)(m.Button,{slot:`chevron`,className:`outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors`,children:(0,h.jsx)(p.ChevronRight,{size:14,strokeWidth:3,className:k(`transition-transform duration-200`,t&&`rotate-90`)})}):(0,h.jsx)(`div`,{className:`w-[18px]`}),Ye(e.name,e.isFolder),(0,h.jsx)(`span`,{className:k(`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&&(0,h.jsxs)(`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&&(0,h.jsx)(m.Collection,{items:e.children,children:e=>(0,h.jsx)(Ze,{item:e})})]})}function Qe({children:e}){let t=(0,l.useMemo)(()=>X(e),[e]);return(0,h.jsx)(`div`,{className:`my-8`,children:(0,h.jsx)(m.Tree,{items:t,"aria-label":`File Tree`,className:k(`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=>(0,h.jsx)(Ze,{item:e})})})}function $e({data:e,sortable:t=!1,paginated:n=!1,pageSize:r=10}){let[i,a]=(0,l.useState)(null),[o,s]=(0,l.useState)(1),c=(0,l.useMemo)(()=>{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:(0,l.useMemo)(()=>{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 et({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}=$e({data:t,sortable:i,paginated:a,pageSize:o}),g=e=>i?s?.key===e?s.direction===`asc`?(0,h.jsx)(p.ChevronUp,{size:14,className:`ml-1 text-primary-400`}):(0,h.jsx)(p.ChevronDown,{size:14,className:`ml-1 text-primary-400`}):(0,h.jsx)(p.ChevronDown,{size:14,className:`ml-1 opacity-30`}):null,_=n||(0,h.jsxs)(h.Fragment,{children:[e&&(0,h.jsx)(`thead`,{children:(0,h.jsx)(`tr`,{children:e.map((e,t)=>(0,h.jsx)(`th`,{onClick:()=>f(t),className:k(`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:(0,h.jsxs)(`div`,{className:`flex items-center`,children:[e,g(t)]})},t))})}),d&&(0,h.jsx)(`tbody`,{children:d.map((e,t)=>(0,h.jsx)(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:e.map((e,t)=>(0,h.jsx)(`td`,{className:`px-3 py-2 border-b border-border-subtle text-sm text-text-muted`,children:e},t))},t))})]});return(0,h.jsxs)(`div`,{className:k(`my-6 rounded-lg border border-border-subtle overflow-hidden`,r),children:[(0,h.jsx)(`div`,{className:`overflow-x-auto`,children:(0,h.jsx)(`table`,{className:`w-full border-collapse text-sm`,children:_})}),a&&u>1&&(0,h.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border-subtle px-4 py-3`,children:[(0,h.jsxs)(`span`,{className:`text-xs text-text-muted`,children:[`Page `,c,` of `,u]}),(0,h.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,h.jsx)(m.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:(0,h.jsx)(p.ChevronsLeft,{size:16})}),(0,h.jsx)(m.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:(0,h.jsx)(p.ChevronLeft,{size:16})}),(0,h.jsx)(m.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:(0,h.jsx)(p.ChevronRight,{size:16})}),(0,h.jsx)(m.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:(0,h.jsx)(p.ChevronsRight,{size:16})})]})]})]})}function tt({name:e,type:t,defaultValue:n,required:r=!1,children:i,id:a,className:o=``}){return(0,h.jsxs)(`article`,{className:k(`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:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4`,children:[(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,h.jsx)(`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&&(0,h.jsx)(`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&&(0,h.jsxs)(`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:[(0,h.jsx)(`span`,{className:`h-1 w-1 rounded-full bg-red-400 animate-pulse`}),`Required`]})]}),n&&(0,h.jsxs)(`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:[(0,h.jsx)(`span`,{className:`font-semibold opacity-60 uppercase tracking-tighter`,children:`Default`}),(0,h.jsx)(`code`,{className:`font-mono text-text-main font-medium`,children:n})]})]}),(0,h.jsx)(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30`,children:i})]})}function nt({to:e,children:t,className:n=``,...r}){let i=e&&(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`));return(0,h.jsx)(A,{href:e,className:k(`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 rt({src:e,alt:t,theme:n,...r}){let{theme:i}=le();return n&&n!==i?null:(0,h.jsx)(`img`,{src:e,alt:t||``,...r})}function it({title:e,props:t,className:n=``}){return(0,h.jsxs)(`div`,{className:k(`my-6`,n),children:[e&&(0,h.jsx)(`h3`,{className:`text-base font-bold text-text-main mb-3`,children:e}),(0,h.jsx)(`div`,{className:`overflow-x-auto rounded-lg border border-border-subtle`,children:(0,h.jsxs)(`table`,{className:`w-full border-collapse text-sm`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{children:[(0,h.jsx)(`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`}),(0,h.jsx)(`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`}),(0,h.jsx)(`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`}),(0,h.jsx)(`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`})]})}),(0,h.jsx)(`tbody`,{children:t.map((e,t)=>(0,h.jsxs)(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:[(0,h.jsxs)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:[(0,h.jsx)(`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&&(0,h.jsx)(`span`,{className:`ml-1 text-red-400 font-bold`,children:`*`})]}),(0,h.jsx)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:(0,h.jsx)(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted`,children:e.type})}),(0,h.jsx)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:e.defaultValue?(0,h.jsx)(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400`,children:e.defaultValue}):(0,h.jsx)(`span`,{className:`text-text-dim`,children:`—`})}),(0,h.jsx)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle text-text-muted`,children:e.description})]},`${e.name}-${t}`))})]})})]})}function at(e){let{code:t,children:n,preview:r}=e;return{initialCode:(0,l.useMemo)(()=>(t??(typeof n==`string`?n:``)).trim(),[t,n]),previewElement:(0,l.useMemo)(()=>r??(typeof n==`string`?null:n),[r,n])}}function ot(e){let{highlightedHtml:t,hideCode:n=!1,hideCopy:r=!1}=e,{initialCode:i,previewElement:a}=at(e);return(0,h.jsxs)(`div`,{className:`my-6 overflow-hidden rounded-xl border border-border-subtle`,children:[(0,h.jsx)(`div`,{className:`flex items-center justify-center p-8 bg-bg-surface`,children:a}),!n&&(0,h.jsx)(`div`,{className:`border-t border-border-subtle`,children:(0,h.jsx)(W,{hideCopy:r,lang:`tsx`,highlightedHtml:t,plain:!0,children:i})})]})}const st=({children:e,className:t,vertical:n=!1})=>(0,h.jsx)(`div`,{className:k(`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}),ct=({children:e,className:t,showArrow:n,...r})=>(0,h.jsxs)(m.Popover,{offset:8,...r,className:m.composeRenderProps(t,e=>k(`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&&(0,h.jsx)(m.OverlayArrow,{className:`group`,children:(0,h.jsx)(`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:(0,h.jsx)(`path`,{d:`M0 0 L6 6 L12 0`})})}),e]});function lt(e){let[t,n]=l.default.Children.toArray(e.children).slice(0,2);return(0,h.jsxs)(m.MenuTrigger,{...e,children:[t,(0,h.jsx)(ct,{placement:e.placement,className:`min-w-35`,children:n})]})}function ut(e){let[t,n]=l.default.Children.toArray(e.children).slice(0,2);return(0,h.jsxs)(m.SubmenuTrigger,{...e,children:[t,(0,h.jsx)(ct,{offset:-4,crossOffset:-4,children:n})]})}function Z(e){return(0,h.jsx)(m.Menu,{...e,className:m.composeRenderProps(e.className,e=>k(`p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75`,e))})}function dt(e){let t=e.textValue||(typeof e.children==`string`?e.children:void 0);return(0,h.jsx)(m.MenuItem,{...e,textValue:t,className:m.composeRenderProps(e.className,(e,{isFocused:t,isPressed:n,isDisabled:r})=>k(`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:m.composeRenderProps(e.children,(e,{selectionMode:t,isSelected:n,hasSubmenu:r})=>(0,h.jsxs)(h.Fragment,{children:[t!==`none`&&(0,h.jsxs)(`span`,{className:`flex items-center size-4 shrink-0 justify-center`,children:[n&&t===`multiple`&&(0,h.jsx)(p.Check,{className:`size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200`}),n&&t===`single`&&(0,h.jsx)(p.Dot,{className:`size-5 text-primary-500 animate-in zoom-in-50 duration-200`})]}),(0,h.jsx)(`div`,{className:`flex flex-row w-full transition-colors items-center gap-2 py-1 px-1`,children:e}),r&&(0,h.jsx)(p.ChevronRight,{className:`size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors`})]}))})}function ft({title:e,...t}){return(0,h.jsxs)(m.MenuSection,{...t,className:k(`flex flex-col gap-0.5`,t.className),children:[e&&(0,h.jsx)(m.Header,{className:`px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none`,children:e}),(0,h.jsx)(m.Collection,{items:t.items,children:t.children})]})}function pt(e){return(0,h.jsx)(m.Separator,{...e,className:`mx-2 my-1.5 border-t border-border-subtle/50`})}Z.Root=Z,Z.Item=dt,Z.Trigger=lt,Z.SubTrigger=ut,Z.Section=ft,Z.Separator=pt;function Q({className:e,variant:t=`rect`,...n}){return(0,h.jsx)(`div`,{className:k(`animate-pulse bg-bg-muted`,t===`circle`?`rounded-full`:`rounded-md`,e),...n})}const mt=e=>{let[t,n]=(0,l.useState)(!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 ht({content:e,mdxRaw:t,config:n}){let r=t||e||``,{copied:i,handleCopy:a,handleOpenRaw:o}=mt(r),s=n!==!1,c=typeof n==`object`&&n.text||`Copy Markdown`;return!s||!r?null:(0,h.jsx)(`div`,{className:`relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200`,children:(0,h.jsxs)(st,{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:[(0,h.jsx)(M,{variant:`ghost`,onPress:a,icon:i?(0,h.jsx)(p.Check,{size:16}):(0,h.jsx)(p.Copy,{size:16}),iconPosition:`left`,className:k(`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}),(0,h.jsxs)(Z.Trigger,{placement:`bottom end`,children:[(0,h.jsx)(M,{variant:`ghost`,isIconOnly:!0,icon:(0,h.jsx)(p.ChevronDown,{size:14}),className:k(`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`)}),(0,h.jsxs)(Z.Root,{className:`w-52`,children:[(0,h.jsxs)(Z.Item,{onAction:a,children:[(0,h.jsx)(p.Copy,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),(0,h.jsx)(`span`,{className:`font-medium text-[0.8125rem]`,children:`Copy Markdown`})]}),(0,h.jsxs)(Z.Item,{onAction:o,children:[(0,h.jsx)(p.ExternalLink,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),(0,h.jsx)(`span`,{className:`font-medium text-[0.8125rem]`,children:`View as Markdown`})]})]})]})]})})}var gt=o({Admonition:()=>K,Badge:()=>ke,Button:()=>_e,Card:()=>Me,Cards:()=>je,Caution:()=>Ve,CodeBlock:()=>W,ComponentPreview:()=>ot,ComponentProps:()=>it,CopyMarkdown:()=>ht,Danger:()=>Re,Field:()=>tt,FileTree:()=>Qe,Image:()=>rt,Important:()=>Be,InfoBox:()=>ze,Link:()=>nt,List:()=>qe,Note:()=>Fe,Tab:()=>Te,Table:()=>et,Tabs:()=>Ee,Tip:()=>Ie,Video:()=>De,Warning:()=>Le});function _t(){return(0,h.jsx)(`div`,{className:k(`w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in`),children:(0,h.jsxs)(`div`,{className:`mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10`,children:[(0,h.jsxs)(`div`,{className:`flex gap-2`,children:[(0,h.jsx)(Q,{className:`h-3 w-16`}),(0,h.jsx)(Q,{className:`h-3 w-24`})]}),(0,h.jsx)(Q,{className:`h-10 w-[60%] sm:h-12`}),(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsx)(Q,{className:`h-4 w-full`}),(0,h.jsx)(Q,{className:`h-4 w-[95%]`}),(0,h.jsx)(Q,{className:`h-4 w-[40%]`})]}),(0,h.jsxs)(`div`,{className:`space-y-6 pt-4`,children:[(0,h.jsx)(Q,{className:`h-7 w-32`}),(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsx)(Q,{className:`h-4 w-full`}),(0,h.jsx)(Q,{className:`h-4 w-[98%]`}),(0,h.jsx)(Q,{className:`h-4 w-[92%]`}),(0,h.jsx)(Q,{className:`h-4 w-[60%]`})]})]}),(0,h.jsx)(Q,{className:`h-32 w-full rounded-lg bg-bg-muted/50`}),(0,h.jsxs)(`div`,{className:`space-y-6 pt-4`,children:[(0,h.jsx)(Q,{className:`h-7 w-48`}),(0,h.jsxs)(`div`,{className:`space-y-3`,children:[(0,h.jsx)(Q,{className:`h-4 w-full`}),(0,h.jsx)(Q,{className:`h-4 w-[85%]`})]})]})]})})}const $=({level:e,id:t,children:n,...r})=>(0,h.jsxs)(`h${e}`,{id:t,...r,className:`boltdocs-heading`,children:[n,t&&(0,h.jsx)(`a`,{href:`#${t}`,className:`header-anchor`,"aria-label":`Anchor`,children:(0,h.jsx)(p.Link,{size:16})})]}),vt={...gt,Loading:_t,h1:e=>(0,h.jsx)($,{level:1,...e}),h2:e=>(0,h.jsx)($,{level:2,...e}),h3:e=>(0,h.jsx)($,{level:3,...e}),h4:e=>(0,h.jsx)($,{level:4,...e}),h5:e=>(0,h.jsx)($,{level:5,...e}),h6:e=>(0,h.jsx)($,{level:6,...e}),pre:e=>(0,h.jsx)(W,{...e,children:e.children})};function yt(){let{currentLocale:e,config:t}=D();return(0,l.useEffect)(()=>{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 bt(){let e=(0,f.useLocation)(),{config:t}=D(),n=E(e=>e.setLocale),r=E(e=>e.setVersion),i=E(e=>e.currentLocale),a=E(e=>e.currentVersion);return(0,l.useEffect)(()=>{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 xt({initialRoutes:e,initialConfig:t,docsDirName:n,modules:r,hot:i,homePage:a,externalPages:o,externalLayout:s,components:c={}}){let[u,d]=(0,l.useState)(e),[p,m]=(0,l.useState)(t),g=o||{},_=s||v.default,y=(0,l.useMemo)(()=>u.filter(e=>!(a&&(e.path===`/`||e.path===``))&&!g[e.path===``?`/`:e.path]).map(e=>{let t=Object.keys(r).find(t=>t===`/${n}/${e.filePath}`||t.endsWith(`/${n}/${e.filePath}`)||t.endsWith(`/${n}\\${e.filePath.replace(/\\/g,`/`)}`)),i=t?r[t]:null;return{...e,Component:l.default.lazy(async()=>i?await i():{default:oe})}}),[u,r,n,a,g]);(0,l.useEffect)(()=>{i&&(i.on(`boltdocs:routes-update`,e=>{d(e)}),i.on(`boltdocs:config-update`,e=>{m(e)}))},[i]);let S=(0,l.useMemo)(()=>({...vt,...b.default,...c}),[c]),C=S.Loading;return(0,h.jsx)(re,{children:(0,h.jsx)(ce,{children:(0,h.jsx)(he,{components:S,children:(0,h.jsx)(x.Provider,{value:p,children:(0,h.jsx)(ue,{children:(0,h.jsxs)(te,{routes:u,modules:r,children:[(0,h.jsx)(de,{}),(0,h.jsx)(bt,{}),(0,h.jsx)(yt,{}),(0,h.jsxs)(f.Routes,{children:[(0,h.jsx)(f.Route,{element:(0,h.jsx)(fe,{}),children:y.map(e=>(0,h.jsx)(f.Route,{path:e.path===``?`/`:e.path,element:(0,h.jsx)(l.default.Suspense,{fallback:(0,h.jsx)(C,{}),children:(0,h.jsx)(ge,{Component:e.Component})})},e.path))},`docs-layout`),a&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(f.Route,{path:`/`,element:(0,h.jsx)(_,{children:(0,h.jsx)(a,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(e=>(0,h.jsx)(f.Route,{path:`/${e}`,element:(0,h.jsx)(_,{children:(0,h.jsx)(a,{})})},`home-${e}`))]}),Object.entries(g).map(([e,t])=>{let n=e===`/`?``:e;return(0,h.jsxs)(l.default.Fragment,{children:[(0,h.jsx)(f.Route,{path:e,element:(0,h.jsx)(_,{children:(0,h.jsx)(t,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(r=>(0,h.jsx)(f.Route,{path:`/${r}${n}`,element:(0,h.jsx)(_,{children:(0,h.jsx)(t,{})})},`${e}-${r}`))]},e)}),(0,h.jsx)(f.Route,{path:`*`,element:(0,h.jsx)(v.default,{children:(0,h.jsx)(oe,{})})})]})]})})})})})})}async function St(e){let{path:t,routes:n,config:r,modules:i,homePage:a,externalPages:o,docsDirName:s}=e,c={};for(let[e,t]of Object.entries(i))c[e]=()=>Promise.resolve(t);return u.default.renderToString((0,h.jsx)(l.default.StrictMode,{children:(0,h.jsx)(d.StaticRouter,{location:t,children:(0,h.jsx)(xt,{initialRoutes:n,initialConfig:r,docsDirName:s,modules:c,homePage:a,externalPages:o})})}))}exports.render=St;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
|
|
2
|
+
import React from "react";
|
|
3
|
+
//#region src/client/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Metadata provided by the server for a specific route.
|
|
6
|
+
* Maps closely to the `RouteMeta` type in the Node environment.
|
|
7
|
+
*/
|
|
8
|
+
interface ComponentRoute {
|
|
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;
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region src/client/ssr.d.ts
|
|
55
|
+
/**
|
|
56
|
+
* Options for rendering the Boltdocs application on the server (SSG).
|
|
57
|
+
*/
|
|
58
|
+
interface RenderOptions {
|
|
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>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Renders the full React application into an HTML string for a specific route.
|
|
76
|
+
* This is called by the Node SSG script during the Vite build process.
|
|
77
|
+
*/
|
|
78
|
+
declare function render(options: RenderOptions): Promise<string>;
|
|
79
|
+
//#endregion
|
|
80
|
+
export { RenderOptions, render };
|