boltdocs 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/base-ui/index.d.mts +25 -0
- package/dist/base-ui/index.d.ts +25 -0
- package/dist/base-ui/index.js +1 -0
- package/dist/base-ui/index.mjs +1 -0
- package/dist/{cache-Q4T6VAUL.mjs → cache-CRAZ55X7.mjs} +1 -1
- package/dist/chunk-5D6XPYQ3.mjs +74 -0
- package/dist/chunk-6QXCKZAT.mjs +1 -0
- package/dist/chunk-H4M6P3DM.mjs +1 -0
- package/dist/chunk-JD3RSDE4.mjs +1 -0
- package/dist/chunk-JXHNX2WN.mjs +1 -0
- package/dist/chunk-JZXLCA2E.mjs +1 -0
- package/dist/chunk-MZBG4N4W.mjs +1 -0
- package/dist/chunk-NBCYHLAA.mjs +1 -0
- package/dist/chunk-Q3MLYTIQ.mjs +1 -0
- package/dist/chunk-RSII2UPE.mjs +1 -0
- package/dist/chunk-T3W44KWY.mjs +1 -0
- package/dist/chunk-ZK2266IZ.mjs +1 -0
- package/dist/chunk-ZRJ55GGF.mjs +1 -0
- package/dist/client/index.d.mts +13 -115
- package/dist/client/index.d.ts +13 -115
- package/dist/client/index.js +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/client/ssr.js +1 -1
- package/dist/client/ssr.mjs +1 -1
- package/dist/client/types.d.mts +3 -0
- package/dist/client/types.d.ts +3 -0
- package/dist/client/types.js +1 -0
- package/dist/client/types.mjs +0 -0
- package/dist/copy-markdown-C-90ixSe.d.ts +15 -0
- package/dist/copy-markdown-CbS8X-qe.d.mts +15 -0
- package/dist/{client/hooks → hooks}/index.d.mts +25 -12
- package/dist/{client/hooks → hooks}/index.d.ts +25 -12
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/index.mjs +1 -0
- package/dist/integrations/index.d.mts +48 -0
- package/dist/integrations/index.d.ts +48 -0
- package/dist/integrations/index.js +1 -0
- package/dist/integrations/index.mjs +1 -0
- package/dist/link-DfBwCeZc.d.mts +68 -0
- package/dist/link-DfBwCeZc.d.ts +68 -0
- package/dist/loading-BqGrFWO5.d.mts +68 -0
- package/dist/loading-chS3pm9W.d.ts +68 -0
- package/dist/{client/components/mdx → mdx}/index.d.mts +6 -38
- package/dist/{client/components/mdx → mdx}/index.d.ts +6 -38
- package/dist/mdx/index.js +1 -0
- package/dist/mdx/index.mjs +1 -0
- package/dist/node/cli-entry.js +27 -27
- package/dist/node/cli-entry.mjs +1 -1
- package/dist/node/index.d.mts +44 -14
- package/dist/node/index.d.ts +44 -14
- package/dist/node/index.js +23 -23
- package/dist/node/index.mjs +1 -1
- package/dist/primitives/index.d.mts +301 -0
- package/dist/primitives/index.d.ts +301 -0
- package/dist/primitives/index.js +1 -0
- package/dist/primitives/index.mjs +1 -0
- package/dist/search-dialog-MA5AISC7.mjs +1 -0
- package/dist/{types-Cp21DHI6.d.mts → types-j7jvWsJj.d.mts} +63 -17
- package/dist/{types-Cp21DHI6.d.ts → types-j7jvWsJj.d.ts} +63 -17
- package/dist/{use-routes-xLhumjbV.d.ts → use-routes-Cd806kGw.d.ts} +1 -1
- package/dist/{use-routes-8Iei6jTp.d.mts → use-routes-DDL0_jkQ.d.mts} +1 -1
- package/package.json +34 -8
- package/src/client/app/index.tsx +155 -35
- package/src/client/app/mdx-component.tsx +7 -3
- package/src/client/app/theme-context.tsx +40 -23
- package/src/client/components/default-layout.tsx +12 -6
- package/src/client/components/primitives/breadcrumbs.tsx +1 -1
- package/src/client/components/primitives/navbar.tsx +5 -2
- package/src/client/components/primitives/search-dialog.tsx +12 -3
- package/src/client/components/ui-base/breadcrumbs.tsx +1 -1
- package/src/client/components/ui-base/index.ts +17 -0
- package/src/client/components/ui-base/navbar.tsx +66 -33
- package/src/client/components/ui-base/powered-by.tsx +8 -5
- package/src/client/components/ui-base/sidebar.tsx +31 -22
- package/src/client/components/ui-base/tabs.tsx +4 -1
- package/src/client/components/ui-base/theme-toggle.tsx +35 -15
- package/src/client/hooks/use-i18n.ts +37 -7
- package/src/client/hooks/use-localized-to.ts +45 -68
- package/src/client/hooks/use-navbar.ts +10 -3
- package/src/client/hooks/use-routes.ts +61 -17
- package/src/client/hooks/use-search.ts +21 -5
- package/src/client/hooks/use-sidebar.ts +5 -2
- package/src/client/hooks/use-version.ts +5 -0
- package/src/client/integrations/index.ts +1 -0
- package/src/client/store/use-boltdocs-store.ts +43 -0
- package/src/client/types.ts +4 -2
- package/src/client/utils/i18n.ts +23 -0
- package/src/node/config.ts +54 -17
- package/src/node/index.ts +1 -1
- package/src/node/mdx/cache.ts +12 -0
- package/src/node/mdx/highlighter.ts +47 -0
- package/src/node/mdx/index.ts +114 -0
- package/src/node/mdx/rehype-shiki.ts +53 -0
- package/src/node/mdx/remark-shiki.ts +61 -0
- package/src/node/plugin/html.ts +8 -4
- package/src/node/plugin/index.ts +117 -68
- package/src/node/routes/index.ts +34 -13
- package/src/node/routes/parser.ts +12 -4
- package/src/node/ssg/index.ts +3 -3
- package/src/node/utils.ts +32 -2
- package/tsup.config.ts +7 -2
- package/dist/chunk-52MVMZWS.mjs +0 -1
- package/dist/chunk-BVWWKXJH.mjs +0 -1
- package/dist/chunk-DVY3RDXD.mjs +0 -1
- package/dist/chunk-FUVYCYWC.mjs +0 -1
- package/dist/chunk-GBLMDJ2B.mjs +0 -1
- package/dist/chunk-ISPX45DF.mjs +0 -1
- package/dist/chunk-PNXZMUCO.mjs +0 -1
- package/dist/chunk-V2ZHKQSP.mjs +0 -74
- package/dist/client/components/mdx/index.js +0 -1
- package/dist/client/components/mdx/index.mjs +0 -1
- package/dist/client/hooks/index.js +0 -1
- package/dist/client/hooks/index.mjs +0 -1
- package/dist/search-dialog-TWGYKF2D.mjs +0 -1
- package/src/node/mdx.ts +0 -279
package/dist/client/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as $,b as Se,c as we,d as ke,e as Me,f as Be,g as He,h as Ee,i as Ie}from"../chunk-DVY3RDXD.mjs";import{A as Ht,B as te,C as Ne,a as st,b as mt,c as lt,d as ct,e as Y,f as pt,g as dt,h as ut,i as ft,j as gt,k as ht,l as bt,m as vt,n as xt,o as Ct,p as yt,q as Pt,r as Lt,s as Tt,t as Rt,u as Nt,v as St,w as wt,x as kt,y as Mt,z as Bt}from"../chunk-FUVYCYWC.mjs";import{a as xe,b as K}from"../chunk-GBLMDJ2B.mjs";import{A as Re,F as R,a as C,b as Z,d as D,e as Ce,h as g,q as ye,r as Pe,s as Le,t as T,u as y,v as Q,w as M,x as Te,y as j,z as ee}from"../chunk-BVWWKXJH.mjs";import{b as be,c as O,f as ve}from"../chunk-52MVMZWS.mjs";import ae,{useEffect as Yt,useState as qe,useMemo as Ze}from"react";import Qt from"react-dom/client";import{BrowserRouter as jt,Routes as eo,Route as V}from"react-router-dom";import{ArrowLeft as Et}from"lucide-react";import{jsx as A,jsxs as Oe}from"react/jsx-runtime";function W(){return A("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:Oe("div",{className:"space-y-4",children:[A("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),A("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),A("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."}),Oe(Z,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[A(Et,{size:16})," Go to Home"]})]})})}import{useEffect as It,useState as Ot}from"react";import{jsx as P,jsxs as oe}from"react/jsx-runtime";function re(){let[e,t]=Ot(0);It(()=>{let r=0,a=!0,i=setInterval(()=>{a?(r+=1,r>=100&&(r=100,a=!1)):(r-=1,r<=0&&(r=0,a=!0)),t(r)},20);return()=>clearInterval(i)},[]);let o=`inset(${100-e}% 0 0 0)`;return P("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-4 text-center",children:P("div",{className:"relative group",children:oe("div",{className:"relative inline-block",children:[oe("svg",{className:"w-24 h-auto opacity-10 filter grayscale brightness-50",viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[P("title",{children:"Loading indicator background"}),P("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),P("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]}),oe("svg",{className:"absolute top-0 left-0 w-24 h-auto text-primary-500 drop-shadow-[0_0_20px_rgba(var(--primary-rgb),0.5)] transition-[clip-path] duration-100 ease-linear",style:{clipPath:o},viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[P("title",{children:"Loading indicator animated fill"}),P("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),P("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]})]})})})}import ne from"virtual:boltdocs-layout";import{startTransition as Dt}from"react";import{RouterProvider as $t}from"react-aria-components";import{useNavigate as At,useHref as zt}from"react-router-dom";import{jsx as Vt}from"react/jsx-runtime";function De({children:e}){let t=At();return Vt($t,{navigate:(o,r)=>{Dt(()=>{t(o,r)})},useHref:zt,children:e})}import{useLayoutEffect as _t}from"react";import{useLocation as Ft}from"react-router-dom";function $e(){let{pathname:e,hash:t}=Ft();return _t(()=>{let o=document.querySelector(".boltdocs-content");if(o){if(t){let r=t.replace("#",""),a=document.getElementById(r);if(a){let n=o.getBoundingClientRect().top,f=a.getBoundingClientRect().top-n-80+o.scrollTop;o.scrollTo({top:f,behavior:"smooth"});return}}o.scrollTo(0,0)}},[e,t]),null}import{Outlet as Gt}from"react-router-dom";import Ut from"virtual:boltdocs-layout";import{jsx as Ae}from"react/jsx-runtime";function ze(){return Ae(Ut,{children:Ae(Gt,{})})}import{MDXProvider as Xt}from"@mdx-js/react";import{createContext as qt,useContext as Zt}from"react";import{jsx as Wt}from"react/jsx-runtime";var Ve=qt({});function z(){return Zt(Ve)}function _e({components:e,children:t}){return Wt(Ve.Provider,{value:e,children:t})}import{jsx as Fe}from"react/jsx-runtime";function Ge({Component:e}){let t=z();return Fe(Xt,{components:t,children:Fe(e,{})})}import{Link as Jt}from"lucide-react";import{jsx as x,jsxs as Kt}from"react/jsx-runtime";var B=({level:e,id:t,children:o})=>{let r=`h${e}`;return Kt(r,{id:t,className:"boltdocs-heading",children:[o,t&&x("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:x(Jt,{size:16})})]})},Ue={...Ne,h1:e=>x(B,{level:1,...e}),h2:e=>x(B,{level:2,...e}),h3:e=>x(B,{level:3,...e}),h4:e=>x(B,{level:4,...e}),h5:e=>x(B,{level:5,...e}),h6:e=>x(B,{level:6,...e}),pre:e=>x(Y,{...e,children:e.children})};import{jsx as p,jsxs as We}from"react/jsx-runtime";function to({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:a,homePage:i,externalPages:n,components:s={}}){let[m,f]=qe(e),[d]=qe(t),u=n||{},b=Ze(()=>m.filter(c=>!(i&&(c.path==="/"||c.path===""))&&!u[c.path===""?"/":c.path]).map(c=>{let L=Object.keys(r).find(q=>q===`/${o}/${c.filePath}`||q.endsWith(`/${o}/${c.filePath}`)||q.endsWith(`/${o}\\${c.filePath.replace(/\\/g,"/")}`)),he=L?r[L]:null;return{...c,Component:ae.lazy(async()=>he?await he():{default:W})}}),[m,r,o,i,u]);Yt(()=>{a&&a.on("boltdocs:routes-update",c=>{f(c)})},[a]);let U=Ze(()=>({...Ue,...s}),[s]);return p(xe,{children:p(_e,{components:U,children:p(be.Provider,{value:d,children:p(De,{children:We(ve,{routes:m,modules:r,children:[p($e,{}),We(eo,{children:[i&&p(V,{path:"/",element:p(ne,{children:p(i,{})})}),Object.entries(u).map(([c,L])=>p(V,{path:c,element:p(ne,{children:p(L,{})})},c)),p(V,{element:p(ze,{}),children:b.map(c=>p(V,{path:c.path===""?"/":c.path,element:p(ae.Suspense,{fallback:p(re,{}),children:p(Ge,{Component:c.Component})})},c.path))},"docs-layout"),p(V,{path:"*",element:p(ne,{children:p(W,{})})})]})]})})})})})}function oo(e){let{target:t,routes:o,docsDirName:r,config:a,modules:i,hot:n,homePage:s,externalPages:m,components:f}=e,d=document.querySelector(t);if(!d)throw new Error(`[boltdocs] Mount target "${t}" not found in document.`);let u=p(ae.StrictMode,{children:p(jt,{children:p(to,{initialRoutes:o,initialConfig:a,docsDirName:r,modules:i,hot:n,homePage:s,externalPages:m,components:f})})});d.innerHTML="",Qt.createRoot(d).render(u)}import{jsx as H}from"react/jsx-runtime";function ro({children:e,className:t,style:o}){return H("div",{className:C("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",t),style:o,children:e})}function no({children:e,className:t,style:o}){return H("div",{className:C("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",t),style:o,children:e})}function ao({children:e,className:t,style:o}){return H("main",{className:C("boltdocs-content flex-1 min-w-0 overflow-y-auto",t),style:o,children:H("div",{className:"boltdocs-page mx-auto max-w-content-max pt-4 pb-20 px-4 sm:px-8",children:e})})}function io({children:e,className:t,style:o}){return H("div",{className:C("flex items-center justify-between mb-10",t),style:o,children:e})}function so({children:e,className:t,style:o}){return H("div",{className:C("mt-20",t),style:o,children:e})}var N=Object.assign(ro,{Body:no,Content:ao,ContentHeader:io,ContentFooter:so});import{Suspense as Co,lazy as yo}from"react";import{useEffect as mo,useState as lo}from"react";import{Sun as co,Moon as po}from"lucide-react";import{ToggleButton as uo}from"react-aria-components";import{jsx as X}from"react/jsx-runtime";function Xe(){let{theme:e,toggleTheme:t}=K(),[o,r]=lo(!1);return mo(()=>{r(!0)},[]),o?X(uo,{onChange:t,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","aria-label":"Toggle theme",isSelected:e==="dark",children:e==="dark"?X(co,{size:20,className:"animate-in fade-in zoom-in duration-300"}):X(po,{size:20,className:"animate-in fade-in zoom-in duration-300"})}):X("div",{className:"h-9 w-9"})}import{useEffect as ho,useState as bo}from"react";var fo="https://api.github.com";async function Je(e,t,o=fo){let r=new Headers;t&&r.append("authorization",t);let i=await(await fetch(`${o}/repos/${e}`,{headers:r})).json();return i.stargazers_count!==void 0?go(i.stargazers_count):"0"}var go=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);import{jsx as Ke,jsxs as vo}from"react/jsx-runtime";function Ye({repo:e}){let[t,o]=bo(null);return ho(()=>{e&&Je(e).then(r=>o(r)).catch(()=>o("0"))},[e]),vo("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:[Ke(Ce,{className:"h-4 w-4"}),t&&Ke("span",{className:"tabular-nums",children:t})]})}import*as xo from"lucide-react";import{jsx as E,jsxs as Qe}from"react/jsx-runtime";function je({tabs:e,routes:t}){let{indicatorStyle:o,tabRefs:r,activeIndex:a}=Me(e,t),i=n=>{if(!n)return null;if(n.trim().startsWith("<svg"))return E("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:n}});let s=xo[n];return s?E(s,{size:16}):E("img",{src:n,alt:"",className:"h-4 w-4 object-contain"})};return E("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:Qe(Q.TabsList,{className:"border-none py-0",children:[e.map((n,s)=>{let m=s===a,f=t.find(u=>u.tab&&u.tab.toLowerCase()===n.id.toLowerCase()),d=f?f.path:"#";return Qe(Z,{href:d,ref:u=>{r.current[s]=u},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${m?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[i(n.icon),E("span",{children:n.text})]},n.id)}),E(Q.TabsIndicator,{style:o})]})})}import{useLocation as Po}from"react-router-dom";import{ChevronDown as et}from"lucide-react";import{jsx as l,jsxs as I}from"react/jsx-runtime";var Lo=yo(()=>import("../search-dialog-TWGYKF2D.mjs").then(e=>({default:e.SearchDialog})));function ie(){let{links:e,title:t,logo:o,logoProps:r,github:a,social:i,config:n}=Se(),{routes:s,allRoutes:m,currentVersion:f,currentLocale:d}=$(),{pathname:u}=Po(),b=n.theme||n.themeConfig||{},U=b?.tabs&&b.tabs.length>0;return I(g.NavbarRoot,{className:U?"border-b-0":"",children:[I(g.Content,{children:[I(g.NavbarLeft,{children:[l(g.NavbarLogo,{src:o??"",alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),l(g.Title,{children:t}),n.versions&&f&&l(To,{}),l(g.Links,{children:e.map(c=>l(g.Link,{...c},c.href))})]}),l(g.NavbarCenter,{children:l(Co,{fallback:l("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:l(Lo,{routes:s||[]})})}),I(g.NavbarRight,{children:[n.i18n&&d&&l(Ro,{}),l(g.Split,{}),l(Xe,{}),a&&l(Ye,{repo:b?.githubRepo??""}),i.length>0&&l(g.Split,{}),l("div",{className:"flex items-center gap-1",children:i.map(({icon:c,link:L})=>l(g.Socials,{icon:c,link:L,className:"p-1.5"},L))})]})]}),u!=="/"&&U&&b?.tabs&&l("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:l(je,{tabs:b.tabs,routes:m||s||[]})})]})}function To(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:o}=we();return t.length===0?null:I(R.Trigger,{children:[l(D,{variant:"outline",iconPosition:"right",icon:l(et,{}),children:e}),l(R.Section,{items:t,children:r=>l(R.Item,{onPress:()=>o(r.value),children:r.label},`${r.value??""}`)})]})}function Ro(){let{currentLocaleLabel:e,availableLocales:t,handleLocaleChange:o}=ke();return t.length===0?null:I(R.Trigger,{children:[l(D,{variant:"outline",iconPosition:"right",icon:l(et,{}),children:e}),l(R.Section,{items:t,children:r=>l(R.Item,{onPress:()=>o(r.value),children:r.label},`${r.value??""}`)})]})}import{useState as So,useEffect as wo,useMemo as ko}from"react";import{Zap as No}from"lucide-react";import{jsx as se,jsxs as tt}from"react/jsx-runtime";function ot(){return se("div",{className:"rounded-full px-4 py-2 bg-gray-100 text-xs text-gray-500 flex items-center gap-1 mt-6 justify-center",children:tt("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1",children:[se(No,{className:"powered-by-icon",size:12,fill:"currentColor"}),tt("span",{children:["Powered by ",se("strong",{children:"Boltdocs"})]})]})})}import*as Mo from"lucide-react";import{jsx as S,jsxs as Ho}from"react/jsx-runtime";function rt(e){return e&&Mo[e]||void 0}function Bo({group:e,activePath:t,getIcon:o}){let r=ko(()=>e.routes.some(n=>n.path===t),[e.routes,t]),[a,i]=So(!0);return wo(()=>{r&&i(!0)},[r]),S(M.SidebarGroup,{title:e.title,isOpen:a,onToggle:()=>i(!a),children:e.routes.map(n=>S(M.SidebarLink,{label:n.title,href:n.path,active:t===n.path,icon:o(n.icon),badge:n.badge},n.path))})}function me({routes:e,config:t}){let{groups:o,ungrouped:r,activePath:a}=Be(e),i=t.theme||t.themeConfig||{};return Ho(M.SidebarRoot,{children:[r.length>0&&S(M.SidebarGroup,{className:"mb-6",children:r.map(n=>S(M.SidebarLink,{label:n.title,href:n.path,active:a===n.path,icon:rt(n.icon),badge:n.badge},n.path))}),o.map(n=>S(Bo,{group:n,activePath:a,getIcon:rt},n.slug)),i?.poweredBy&&S("div",{className:"mt-auto pt-8",children:S(ot,{})})]})}import Eo,{useRef as nt,useEffect as Io,useState as Oo,useCallback as Do}from"react";import{Pencil as $o,CircleHelp as Ao,TextAlignStart as zo}from"lucide-react";import{jsx as h,jsxs as w}from"react/jsx-runtime";function le({headings:e=[],editLink:t,communityHelp:o,filePath:r}){let{headings:a}=He(e),i=Eo.useMemo(()=>a.map(n=>({title:n.text,url:`#${n.id}`,depth:n.level})),[a]);return a.length===0?null:h(Le,{toc:i,children:h(Vo,{headings:a,editLink:t,communityHelp:o,filePath:r})})}function Vo({headings:e,editLink:t,communityHelp:o,filePath:r}){let a=ye(),[i,n]=Oo({opacity:0}),s=nt(null),m=nt(null);Io(()=>{if(!a||!s.current)return;let d=s.current.querySelector(`a[href="#${a}"]`);d&&n({transform:`translateY(${d.offsetTop}px)`,height:`${d.offsetHeight}px`,opacity:1})},[a]);let f=Do((d,u)=>{d.preventDefault();let b=document.getElementById(u);b&&(b.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${u}`))},[]);return w(T.OnThisPageRoot,{children:[w(T.OnThisPageHeader,{className:"flex flex-row gap-x-2",children:[h(zo,{size:16}),"On this page"]}),h(Pe,{containerRef:m,children:w(T.OnThisPageContent,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:m,children:[h(T.OnThisPageIndicator,{style:i}),h("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:s,children:e.map(d=>h(T.OnThisPageItem,{level:d.level,children:h(T.OnThisPageLink,{href:`#${d.id}`,active:a===d.id,onClick:u=>f(u,d.id),className:"pl-4",children:d.text})},d.id))})]})}),(t||o)&&w("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[h("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),w("ul",{className:"space-y-3",children:[t&&r&&h("li",{children:w("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:[h($o,{size:16}),"Edit this page"]})}),o&&h("li",{children:w("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[h(Ao,{size:16}),"Community help"]})})]})]})]})}import{useEffect as _o}from"react";import{useLocation as Fo}from"react-router-dom";function ce({siteTitle:e,siteDescription:t,routes:o}){let r=Fo();return _o(()=>{let a=o.find(f=>f.path===r.pathname),i=a?.title,n=a?.description||t||"";document.title=i?`${i} | ${e}`:e;let s=document.querySelector('meta[name="description"]');s||(s=document.createElement("meta"),s.name="description",document.head.appendChild(s)),s.content=n,k("property","og:title",document.title),k("property","og:description",n),k("property","og:type","article"),k("property","og:url",window.location.href),k("name","twitter:card","summary"),k("name","twitter:title",document.title),k("name","twitter:description",n);let m=document.querySelector('link[rel="canonical"]');m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m)),m.href=window.location.origin+r.pathname},[r.pathname,e,t,o]),null}function k(e,t,o){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=o}import{Home as Go}from"lucide-react";import{jsx as _,jsxs as at}from"react/jsx-runtime";function pe(){let{crumbs:e,activeRoute:t}=Ee(),o=O(),r=o.theme||o.themeConfig||{};return e.length===0||!r?.breadcrumbs?null:at(Te,{children:[_(j,{children:_(ee,{href:"/",children:_(Go,{size:14})})}),e.map((a,i)=>at(j,{children:[_(Re,{}),_(ee,{href:a.href,className:C({"font-medium text-text-main":a.href===t?.path}),children:a.label})]},`crumb-${a.href}-${a.label}-${i}`))]})}import{jsx as F,jsxs as de}from"react/jsx-runtime";function ue(){let{prevPage:e,nextPage:t}=Ie();return!e&&!t?null:de(y.PageNavRoot,{children:[e?de(y.PageNavLink,{to:e.path,direction:"prev",children:[F(y.PageNavLink.Title,{children:"Previous"}),F(y.PageNavLink.Description,{children:e.title})]}):F("div",{}),t&&de(y.PageNavLink,{to:t.path,direction:"next",children:[F(y.PageNavLink.Title,{children:"Next"}),F(y.PageNavLink.Description,{children:t.title})]})]})}import{useEffect as Uo,useState as qo}from"react";import{ProgressBar as Zo}from"react-aria-components";import{jsx as it}from"react/jsx-runtime";function fe(){let[e,t]=qo(0);return Uo(()=>{let o=null,r,a=()=>{if(!o)return;let{scrollTop:n,scrollHeight:s,clientHeight:m}=o;if(s<=m){t(0);return}let f=n/(s-m)*100;t(Math.min(100,Math.max(0,f)))},i=()=>(o=document.querySelector(".boltdocs-content"),o?(o.addEventListener("scroll",a),a(),r&&clearInterval(r),!0):!1);return i()||(r=setInterval(i,100)),()=>{o&&o.removeEventListener("scroll",a),r&&clearInterval(r)}},[]),it(Zo,{value:e,"aria-label":"Reading progress",className:"fixed top-0 left-0 right-0 z-999 h-0.5 bg-transparent w-full pointer-events-none",children:({percentage:o})=>it("div",{className:"h-full bg-primary-500 transition-[width] duration-300 ease-out shadow-[0_0_8px_rgba(var(--primary-rgb),0.4)]",style:{width:`${o}%`}})})}import{Component as Wo}from"react";import{jsx as ge,jsxs as Xo}from"react/jsx-runtime";var G=class extends Wo{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error in Boltdocs Layout:",t,o)}render(){return this.state.hasError?this.props.fallback||Xo("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[ge("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),ge("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),ge(D,{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 Jo}from"react-router-dom";import{jsx as v,jsxs as J}from"react/jsx-runtime";function Ko({children:e}){let{routes:t,allRoutes:o,currentRoute:r}=$(),{pathname:a}=Jo(),i=O(),s=z().CopyMarkdown||te,m=a==="/"||a==="";return J(N,{children:[v(fe,{}),v(ce,{siteTitle:i.themeConfig?.title||"Boltdocs",siteDescription:i.themeConfig?.description||"",routes:o}),v(ie,{}),J(N.Body,{children:[!m&&v(me,{routes:t,config:i}),J(N.Content,{children:[!m&&J(N.ContentHeader,{children:[v(pe,{}),v(s,{mdxRaw:r?._rawContent,route:r,config:i.themeConfig?.copyMarkdown})]}),v(G,{children:e}),!m&&v(N.ContentFooter,{children:v(ue,{})})]}),!m&&v(le,{headings:r?.headings,editLink:i.themeConfig?.editLink,communityHelp:i.themeConfig?.communityHelp,filePath:r?.filePath})]})]})}export{bt as Admonition,ft as Badge,pe as Breadcrumbs,st as Button,ht as Card,gt as Cards,Tt as Caution,Y as CodeBlock,Ht as ComponentPreview,Bt as ComponentProps,te as CopyMarkdown,yt as Danger,Ko as DefaultLayout,N as DocsLayout,G as ErrorBoundary,wt as Field,Nt as FileTree,ce as Head,Mt as Image,Lt as Important,Pt as InfoBox,kt as Link,Rt as List,re as Loading,ie as Navbar,W as NotFound,vt as Note,le as OnThisPage,ue as PageNav,fe as ProgressBar,me as Sidebar,pt as Tab,St as Table,dt as Tabs,xt as Tip,ut as Video,Ct as Warning,oo as createBoltdocsApp,mt as defineSandbox,ct as embedSandbox,lt as openSandbox,O as useConfig,z as useMdxComponents,$ as useRoutes,K as useTheme};
|
|
1
|
+
import{a as H,b as O,f as F,h as I,i as U,j as V,k as W,l as q,m as z,n as X}from"../chunk-6QXCKZAT.mjs";import{a as $}from"../chunk-RSII2UPE.mjs";import{a as fo,b as E,c as Co,d as xo,e as Ro,f as ho,g as Lo,h as Po,i as vo,j as bo,k as To,l as Mo,m as Bo,n as Ho,o as So,p as ko,q as wo,r as No,s as Do,t as Eo,u as Ao,v as Oo,w as $o,x as Fo,y as Y}from"../chunk-MZBG4N4W.mjs";import{a as A}from"../chunk-ZK2266IZ.mjs";import{a as Q,b as lo}from"../chunk-JD3RSDE4.mjs";import{a as uo,b as yo,c as go}from"../chunk-T3W44KWY.mjs";import{a as R}from"../chunk-ZRJ55GGF.mjs";import{a as G,b as D,d as J,e as b,f as x}from"../chunk-NBCYHLAA.mjs";import"../chunk-JZXLCA2E.mjs";import k,{useEffect as K,useState as io,useMemo as mo}from"react";import oe from"react-dom/client";import{BrowserRouter as ee,Routes as te,Route as g}from"react-router-dom";import M from"virtual:boltdocs-layout";import{startTransition as Io}from"react";import{RouterProvider as Uo}from"react-aria-components";import{useNavigate as Vo,useHref as Wo}from"react-router-dom";import{jsx as qo}from"react/jsx-runtime";function Z({children:o}){let e=Vo();return qo(Uo,{navigate:(t,a)=>{Io(()=>{e(t,a)})},useHref:Wo,children:o})}import{useLayoutEffect as zo}from"react";import{useLocation as Xo}from"react-router-dom";function j(){let{pathname:o,hash:e}=Xo();return zo(()=>{let t=document.querySelector(".boltdocs-content");if(t){if(e){let a=e.replace("#",""),i=document.getElementById(a);if(i){let r=t.getBoundingClientRect().top,p=i.getBoundingClientRect().top-r-80+t.scrollTop;t.scrollTo({top:p,behavior:"smooth"});return}}t.scrollTo(0,0)}},[o,e]),null}import{Outlet as Ko}from"react-router-dom";import _o from"virtual:boltdocs-layout";import{jsx as oo}from"react/jsx-runtime";function eo(){return oo(_o,{children:oo(Ko,{})})}import{MDXProvider as Yo}from"@mdx-js/react";import{createContext as Go,useContext as Jo}from"react";import{jsx as Qo}from"react/jsx-runtime";var to=Go({});function T(){return Jo(to)}function no({components:o,children:e}){return Qo(to.Provider,{value:o,children:e})}import{jsx as ro}from"react/jsx-runtime";function so({Component:o}){let e=T();return ro(Yo,{components:e,children:ro(o,{})})}import{Link as Zo}from"lucide-react";import{jsx as u,jsxs as jo}from"react/jsx-runtime";var h=({level:o,id:e,children:t,...a})=>{let i=`h${o}`;return jo(i,{id:e,...a,className:"boltdocs-heading",children:[t,e&&u("a",{href:`#${e}`,className:"header-anchor","aria-label":"Anchor",children:u(Zo,{size:16})})]})},ao={...Y,Loading:O,h1:o=>u(h,{level:1,...o}),h2:o=>u(h,{level:2,...o}),h3:o=>u(h,{level:3,...o}),h4:o=>u(h,{level:4,...o}),h5:o=>u(h,{level:5,...o}),h6:o=>u(h,{level:6,...o}),pre:o=>u(E,{...o,children:o.children})};import{useLocation as ne}from"react-router-dom";import{Fragment as me,jsx as n,jsxs as S}from"react/jsx-runtime";function re(){let{currentLocale:o,config:e}=x();return K(()=>{if(!e.i18n)return;let t=e.i18n.localeConfigs?.[o];document.documentElement.lang=t?.htmlLang||o||"en",document.documentElement.dir=t?.direction||"ltr"},[o,e.i18n]),null}function se(){let o=ne(),{config:e}=x(),t=b(r=>r.setLocale),a=b(r=>r.setVersion),i=b(r=>r.currentLocale),c=b(r=>r.currentVersion);return K(()=>{let r=o.pathname.split("/").filter(Boolean),m=0,l=e.versions?.defaultVersion,p=e.i18n?.defaultLocale;if(r[m]==="docs"&&m++,e.versions&&r.length>m){let d=e.versions.versions.find(P=>P.path===r[m]);d&&(l=d.path,m++)}e.i18n&&r.length>m&&e.i18n.locales[r[m]]?p=r[m]:e.i18n&&r.length===0&&(p=i||e.i18n.defaultLocale),p!==i&&t(p),l!==c&&a(l)},[o.pathname,e,t,a,i,c]),null}function ae({initialRoutes:o,initialConfig:e,docsDirName:t,modules:a,hot:i,homePage:c,externalPages:r,components:m={}}){let[l,p]=io(o),[d,P]=io(e),N=r||{},po=mo(()=>l.filter(s=>!(c&&(s.path==="/"||s.path===""))&&!N[s.path===""?"/":s.path]).map(s=>{let v=Object.keys(a).find(y=>y===`/${t}/${s.filePath}`||y.endsWith(`/${t}/${s.filePath}`)||y.endsWith(`/${t}\\${s.filePath.replace(/\\/g,"/")}`)),B=v?a[v]:null;return{...s,Component:k.lazy(async()=>B?await B():{default:H})}}),[l,a,t,c,N]);K(()=>{i&&(i.on("boltdocs:routes-update",s=>{p(s)}),i.on("boltdocs:config-update",s=>{P(s)}))},[i]);let _=mo(()=>({...ao,...m}),[m]),co=_.Loading;return n(Q,{children:n(no,{components:_,children:n(G.Provider,{value:d,children:n(Z,{children:S(J,{routes:l,modules:a,children:[n(j,{}),n(se,{}),n(re,{}),S(te,{children:[n(g,{element:n(eo,{}),children:po.map(s=>n(g,{path:s.path===""?"/":s.path,element:n(k.Suspense,{fallback:n(co,{}),children:n(so,{Component:s.Component})})},s.path))},"docs-layout"),c&&S(me,{children:[n(g,{path:"/",element:n(M,{children:n(c,{})})}),d.i18n&&Object.keys(d.i18n.locales).map(s=>n(g,{path:`/${s}`,element:n(M,{children:n(c,{})})},`home-${s}`))]}),Object.entries(N).map(([s,v])=>{let B=s==="/"?"":s;return S(k.Fragment,{children:[n(g,{path:s,element:n(M,{children:n(v,{})})}),d.i18n&&Object.keys(d.i18n.locales).map(y=>n(g,{path:`/${y}${B}`,element:n(M,{children:n(v,{})})},`${s}-${y}`))]},s)}),n(g,{path:"*",element:n(M,{children:n(H,{})})})]})]})})})})})}function ie(o){let{target:e,routes:t,docsDirName:a,config:i,modules:c,hot:r,homePage:m,externalPages:l,components:p}=o,d=document.querySelector(e);if(!d)throw new Error(`[boltdocs] Mount target "${e}" not found in document.`);let P=n(k.StrictMode,{children:n(ee,{children:n(ae,{initialRoutes:t,initialConfig:i,docsDirName:a,modules:c,hot:r,homePage:m,externalPages:l,components:p})})});d.innerHTML="",oe.createRoot(d).render(P)}import{jsx as L}from"react/jsx-runtime";function pe({children:o,className:e,style:t}){return L("div",{className:R("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",e),style:t,children:o})}function ce({children:o,className:e,style:t}){return L("div",{className:R("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",e),style:t,children:o})}function le({children:o,className:e,style:t}){return L("main",{className:R("boltdocs-content flex-1 min-w-0 overflow-y-auto",e),style:t,children:L("div",{className:"boltdocs-page mx-auto max-w-content-max pt-4 pb-20 px-4 sm:px-8",children:o})})}function de({children:o,className:e,style:t}){return L("div",{className:R("flex items-center justify-between mb-10",e),style:t,children:o})}function fe({children:o,className:e,style:t}){return L("div",{className:R("mt-20",e),style:t,children:o})}var C=Object.assign(pe,{Body:ce,Content:le,ContentHeader:de,ContentFooter:fe});import{useLocation as ue}from"react-router-dom";import{jsx as f,jsxs as w}from"react/jsx-runtime";function ye({children:o}){let{routes:e,allRoutes:t,currentRoute:a,currentLocale:i}=x(),{pathname:c}=ue(),r=D(),l=T().CopyMarkdown||A,p=c==="/"||c==="";return w(C,{children:[f(z,{}),f(V,{siteTitle:$(r.theme?.title,i)||"Boltdocs",siteDescription:$(r.theme?.description,i)||"",routes:t}),f(F,{}),w(C.Body,{children:[!p&&f(I,{routes:e,config:r}),w(C.Content,{children:[!p&&w(C.ContentHeader,{children:[f(W,{}),f(l,{mdxRaw:a?._rawContent,route:a,config:r.theme?.copyMarkdown})]}),f(X,{children:o}),!p&&f(C.ContentFooter,{children:f(q,{})})]}),!p&&f(U,{headings:a?.headings,editLink:r.theme?.editLink,communityHelp:r.theme?.communityHelp,filePath:a?.filePath})]})]})}export{vo as Admonition,ho as Badge,W as Breadcrumbs,fo as Button,Po as Card,Lo as Cards,ko as Caution,E as CodeBlock,Fo as ComponentPreview,$o as ComponentProps,A as CopyMarkdown,Bo as Danger,ye as DefaultLayout,C as DocsLayout,X as ErrorBoundary,Eo as Field,No as FileTree,V as Head,Oo as Image,So as Important,Ho as InfoBox,Ao as Link,wo as List,O as Loading,F as Navbar,H as NotFound,bo as Note,U as OnThisPage,q as PageNav,z as ProgressBar,I as Sidebar,Co as Tab,Do as Table,xo as Tabs,To as Tip,Ro as Video,Mo as Warning,ie as createBoltdocsApp,uo as defineSandbox,go as embedSandbox,yo as openSandbox,D as useConfig,T as useMdxComponents,x as useRoutes,lo as useTheme};
|
package/dist/client/ssr.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var qo=Object.create;var ke=Object.defineProperty;var Ko=Object.getOwnPropertyDescriptor;var Zo=Object.getOwnPropertyNames;var Jo=Object.getPrototypeOf,Qo=Object.prototype.hasOwnProperty;var ct=(e,t)=>{for(var o in t)ke(e,o,{get:t[o],enumerable:!0})},dt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Zo(t))!Qo.call(e,n)&&n!==o&&ke(e,n,{get:()=>t[n],enumerable:!(r=Ko(t,n))||r.enumerable});return e};var R=(e,t,o)=>(o=e!=null?qo(Jo(e)):{},dt(t||!e||!e.__esModule?ke(o,"default",{value:e,enumerable:!0}):o,e)),Yo=e=>dt(ke({},"__esModule",{value:!0}),e);var Gr={};ct(Gr,{render:()=>_r});module.exports=Yo(Gr);var Uo=R(require("react")),jo=R(require("react-dom/server")),Xo=require("react-router-dom/server");var j=R(require("react")),Wr=R(require("react-dom/client")),ee=require("react-router-dom");var yt=require("lucide-react");var je=R(require("react")),ht=require("react-aria-components"),vt=require("react-router-dom");var mt=require("react-router-dom");var Ae=require("react"),Ge=(0,Ae.createContext)(null);function ie(){let e=(0,Ae.use)(Ge);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}function Ue(e){let t=(0,mt.useLocation)(),o=ie();if(!o||typeof e!="string"||!o.i18n&&!o.versions)return e;let r="/docs";if(!e.startsWith(r))return e;let s=t.pathname.substring(r.length).split("/").filter(Boolean),c=o.versions?.defaultVersion,i=o.i18n?.defaultLocale,l=0;o.versions&&s.length>l&&o.versions.versions[s[l]]&&(c=s[l],l++),o.i18n&&s.length>l&&o.i18n.locales[s[l]]&&(i=s[l]);let m=e.substring(r.length).split("/").filter(Boolean),p=0,f=!1,g=!1;o.versions&&m.length>p&&o.versions.versions[m[p]]&&(f=!0,p++),o.i18n&&m.length>p&&o.i18n.locales[m[p]]&&(g=!0,p++);let b=m.slice(p),x=[];o.versions&&(f?x.push(m[0]):c&&x.push(c)),o.i18n&&(g?x.push(m[f?1:0]):i&&x.push(i)),x.push(...b);let N=`${r}/${x.join("/")}`;return N.endsWith("/")&&(N=N.slice(0,-1)),N===r?r:N}var te=require("react"),bt=require("react/jsx-runtime"),pt=(0,te.createContext)({preload:()=>{},routes:[]});function ut(){return(0,te.use)(pt)}function ft({routes:e,modules:t,children:o}){let r=(0,te.useRef)(null),n=(0,te.useCallback)(s=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let c=s.split("#")[0].split("?")[0],i=e.find(l=>l.path===c||c==="/"&&l.path==="");if(i?.filePath){let l=Object.keys(t).find(d=>d.endsWith("/"+i.filePath));l&&t[l]().catch(d=>{console.error(`[boltdocs] Failed to preload route ${s}:`,d)})}},100)},[e,t]);return(0,bt.jsx)(pt.Provider,{value:{preload:n,routes:e},children:o})}var gt=require("clsx"),xt=require("tailwind-merge");function a(...e){return(0,xt.twMerge)((0,gt.clsx)(e))}var Xe=require("react/jsx-runtime"),oe=je.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:s,...c}=e,i=Ue(o??""),{preload:l}=ut();return(0,Xe.jsx)(ht.Link,{...c,ref:t,href:i,onMouseEnter:p=>{n?.(p),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&l(i)},onFocus:p=>{s?.(p),r==="hover"&&typeof i=="string"&&i.startsWith("/")&&l(i)}})});oe.displayName="Link";var er=je.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:s,...c}=e,i=(0,vt.useLocation)(),l=Ue(o??""),d=r?i.pathname===l:i.pathname.startsWith(l),m=typeof n=="function"?n({isActive:d}):a(n,d&&"active"),p=typeof s=="function"?s({isActive:d}):s;return(0,Xe.jsx)(oe,{...c,ref:t,href:o,className:m,children:p})});er.displayName="NavLink";var Z=require("react/jsx-runtime");function qe(){return(0,Z.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,Z.jsxs)("div",{className:"space-y-4",children:[(0,Z.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,Z.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,Z.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,Z.jsxs)(oe,{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,Z.jsx)(yt.ArrowLeft,{size:16})," Go to Home"]})]})})}var Le=require("react"),M=require("react/jsx-runtime");function Ct(){let[e,t]=(0,Le.useState)(0);(0,Le.useEffect)(()=>{let r=0,n=!0,s=setInterval(()=>{n?(r+=1,r>=100&&(r=100,n=!1)):(r-=1,r<=0&&(r=0,n=!0)),t(r)},20);return()=>clearInterval(s)},[]);let o=`inset(${100-e}% 0 0 0)`;return(0,M.jsx)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-4 text-center",children:(0,M.jsx)("div",{className:"relative group",children:(0,M.jsxs)("div",{className:"relative inline-block",children:[(0,M.jsxs)("svg",{className:"w-24 h-auto opacity-10 filter grayscale brightness-50",viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[(0,M.jsx)("title",{children:"Loading indicator background"}),(0,M.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,M.jsx)("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]}),(0,M.jsxs)("svg",{className:"absolute top-0 left-0 w-24 h-auto text-primary-500 drop-shadow-[0_0_20px_rgba(var(--primary-rgb),0.5)] transition-[clip-path] duration-100 ease-linear",style:{clipPath:o},viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[(0,M.jsx)("title",{children:"Loading indicator animated fill"}),(0,M.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,M.jsx)("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]})]})})})}var X=require("react"),wt=require("react/jsx-runtime"),Rt=(0,X.createContext)(void 0);function Nt({children:e}){let[t,o]=(0,X.useState)("dark"),[r,n]=(0,X.useState)(!1);(0,X.useEffect)(()=>{n(!0);let i=localStorage.getItem("boltdocs-theme");if(i==="light"||i==="dark")o(i);else{let m=window.matchMedia("(prefers-color-scheme: dark)").matches;o(m?"dark":"light")}let l=window.matchMedia("(prefers-color-scheme: dark)"),d=m=>{localStorage.getItem("boltdocs-theme")||o(m.matches?"dark":"light")};return l.addEventListener("change",d),()=>l.removeEventListener("change",d)},[]),(0,X.useEffect)(()=>{if(!r)return;let i=document.documentElement;t==="light"?(i.classList.add("theme-light"),i.dataset.theme="light"):(i.classList.remove("theme-light"),i.dataset.theme="dark")},[t,r]);let s=()=>{let i=t==="dark"?"light":"dark";o(i),localStorage.setItem("boltdocs-theme",i)},c=i=>{o(i),localStorage.setItem("boltdocs-theme",i)};return(0,wt.jsx)(Rt.Provider,{value:{theme:t,toggleTheme:s,setTheme:c},children:e})}function Pt(){let e=(0,X.use)(Rt);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var We=R(require("virtual:boltdocs-layout"));var Tt=require("react"),kt=require("react-aria-components"),Be=require("react-router-dom"),Lt=require("react/jsx-runtime");function At({children:e}){let t=(0,Be.useNavigate)();return(0,Lt.jsx)(kt.RouterProvider,{navigate:(o,r)=>{(0,Tt.startTransition)(()=>{t(o,r)})},useHref:Be.useHref,children:e})}var Bt=require("react"),It=require("react-router-dom");function Mt(){let{pathname:e,hash:t}=(0,It.useLocation)();return(0,Bt.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content");if(o){if(t){let r=t.replace("#",""),n=document.getElementById(r);if(n){let c=o.getBoundingClientRect().top,d=n.getBoundingClientRect().top-c-80+o.scrollTop;o.scrollTo({top:d,behavior:"smooth"});return}}o.scrollTo(0,0)}},[e,t]),null}var St=require("react-router-dom"),Et=R(require("virtual:boltdocs-layout")),Ke=require("react/jsx-runtime");function Ot(){return(0,Ke.jsx)(Et.default,{children:(0,Ke.jsx)(St.Outlet,{})})}var Ft=require("@mdx-js/react");var Ie=require("react"),zt=require("react/jsx-runtime"),Dt=(0,Ie.createContext)({});function Vt(){return(0,Ie.useContext)(Dt)}function Ht({components:e,children:t}){return(0,zt.jsx)(Dt.Provider,{value:e,children:t})}var Ze=require("react/jsx-runtime");function $t({Component:e}){let t=Vt();return(0,Ze.jsx)(Ft.MDXProvider,{components:t,children:(0,Ze.jsx)(e,{})})}var Wo=require("lucide-react");var lt={};ct(lt,{Admonition:()=>Q,Badge:()=>to,Button:()=>_t,Card:()=>io,Cards:()=>so,Caution:()=>go,CodeBlock:()=>re,ComponentPreview:()=>Lo,ComponentProps:()=>ko,CopyMarkdown:()=>$o,Danger:()=>uo,Field:()=>Ro,FileTree:()=>vo,Image:()=>wo,Important:()=>bo,InfoBox:()=>fo,Link:()=>No,List:()=>xo,Note:()=>co,Tab:()=>Jt,Table:()=>Co,Tabs:()=>Qt,Tip:()=>mo,Video:()=>Yt,Warning:()=>po});var Se=R(require("react-aria-components"));var Wt=require("class-variance-authority"),_=require("react/jsx-runtime"),Me=(0,Wt.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"}}),ae=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:s,variant:c,size:i,rounded:l,iconSize:d,disabled:m,...p})=>{let f=r||!n&&!!t,g=f?(0,_.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,_.jsxs)(_.Fragment,{children:[t&&o==="left"&&(0,_.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,_.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,_.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,_.jsx)(Se.Link,{href:e,className:a(Me({variant:c,size:i,rounded:l,iconSize:f?d:void 0,disabled:m}),s),...p,children:g}):(0,_.jsx)(Se.Button,{className:a(Me({variant:c,size:i,rounded:l,iconSize:f?d:void 0,disabled:m}),s),...p,children:g})};var Gt=require("react/jsx-runtime"),_t=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:s,...c})=>(0,Gt.jsx)(ae,{className:a("group",Me({variant:t,size:o,rounded:r,iconSize:n,disabled:s,className:e})),...c});var Ee=R(require("react-aria-components")),Oe=require("lucide-react");var Je=require("codesandbox/lib/api/define.js");function Ut(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",s=e.description||"Generic Sandbox",c={};for(let[i,l]of Object.entries(t)){let d=typeof l.content=="object"?JSON.stringify(l.content,null,2):l.content;c[i]={content:d,isBinary:l.isBinary??!1}}if(!c["package.json"]){let l=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};c["package.json"]={content:JSON.stringify({private:!0,name:n,description:s,type:"module",version:"1.0.0",scripts:e.scripts||l,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return c}function tr(e){let t=Ut(e),o=(0,Je.getParameters)({files:t}),r=new URLSearchParams({parameters:o,installDependencies:"true"});return e.entry&&r.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${r.toString()}`,options:e}}function jt(e){if(typeof window>"u")return tr(e);let t=Ut(e),o=(0,Je.getParameters)({files:t}),r=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let s=(i,l)=>{let d=document.createElement("input");d.type="hidden",d.name=i,d.value=l,n.appendChild(d)},c=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return s("query",c.toString()),s("parameters",o),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${o}`,options:e}}var 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}};var G=require("react");function qt(e){let{title:t,sandbox:o}=e,[r,n]=(0,G.useState)(!1),[s,c]=(0,G.useState)(!1),[i,l]=(0,G.useState)(!1),d=(0,G.useRef)(null),m=ie(),p=(0,G.useCallback)(async()=>{let g=d.current?.textContent??"";Xt(g),n(!0),setTimeout(()=>n(!1),2e3)},[]),f=(0,G.useCallback)(()=>{let g=d.current?.textContent??"",b=m?.integrations?.sandbox?.config||{},x=typeof o=="object"?o:b,N=x.entry||"src/App.tsx";jt({title:t??"Code Snippet",...x,files:{...x.files,[N]:{content:g}}})},[t,m,o]);return(0,G.useEffect)(()=>{let g=d.current?.textContent?.length??0;l(g>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:s,setIsExpanded:c,isExpandable:i,preRef:d,handleCopy:p,handleSandbox:f,shouldTruncate:i&&!s}}var he=require("react/jsx-runtime");function or(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var Kt=e=>(0,he.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...or(e),children:[(0,he.jsx)("title",{children:"CodeSandbox"}),(0,he.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var le=R(require("react-aria-components"));var z=require("react/jsx-runtime"),nr=({className:e,children:t,...o})=>(0,z.jsx)(le.Tooltip,{...o,offset:8,className:r=>a("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(le.OverlayArrow,{children:(0,z.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,z.jsx)("title",{children:"Arrow"}),(0,z.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),Qe=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,z.jsxs)(le.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,z.jsx)(nr,{...n,children:e})]});var A=require("react/jsx-runtime");function re(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:s,...c}=e,d=!!ie()?.integrations?.sandbox?.enable&&!r,{copied:m,isExpanded:p,setIsExpanded:f,isExpandable:g,preRef:b,handleCopy:x,handleSandbox:N,shouldTruncate:H}=qt(e);return(0,A.jsxs)("div",{className:a("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",H&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[(0,A.jsxs)("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:[d&&(0,A.jsx)(Qe,{content:"Open in CodeSandbox",children:(0,A.jsx)(Ee.Button,{onPress:N,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:(0,A.jsx)(Kt,{size:20})})}),!n&&(0,A.jsx)(Qe,{content:m?"Copied!":"Copy code",children:(0,A.jsx)(Ee.Button,{onPress:x,className:a("grid place-items-center w-8 h-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-115 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2",m?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:m?(0,A.jsx)(Oe.Check,{size:20}):(0,A.jsx)(Oe.Copy,{size:20})})})]}),s?(0,A.jsx)("div",{ref:b,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:s}}):(0,A.jsx)("pre",{ref:b,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...c,children:t}),g&&(0,A.jsx)("div",{className:a(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:(0,A.jsx)(Ee.Button,{onPress:()=>f(!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"})})]})}var ce=require("react"),ne=R(require("react-aria-components"));var J=require("react");function Zt({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[r,n]=(0,J.useState)(o===-1?0:o),s=(0,J.useRef)([]),[c,i]=(0,J.useState)({opacity:0,transform:"translateX(0)",width:0});(0,J.useEffect)(()=>{let d=s.current[r];d&&i({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[r,t]);let l=(0,J.useCallback)(d=>{let m=0;if(d.key==="ArrowRight"?m=1:d.key==="ArrowLeft"&&(m=-1),m!==0){let p=(r+m+t.length)%t.length;for(;t[p].props.disabled&&p!==r;)p=(p+m+t.length)%t.length;p!==r&&!t[p].props.disabled&&(n(p),s.current[p]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:s,indicatorStyle:c,handleKeyDown:l}}var Ye=require("class-variance-authority"),S=require("react/jsx-runtime"),sr=(0,Ye.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"}}),ir=(0,Ye.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 Jt({children:e}){let t=typeof e=="string"?(0,S.jsx)(re,{className:"language-bash",children:(0,S.jsx)("code",{children:e.trim()})}):e;return(0,S.jsx)("div",{className:"py-4",children:t})}function Qt({defaultIndex:e=0,children:t}){let o=(0,ce.useMemo)(()=>ce.Children.toArray(t).filter(i=>(0,ce.isValidElement)(i)&&i.props?.label),[t]),{active:r,setActive:n,tabRefs:s,indicatorStyle:c}=Zt({initialIndex:e,tabs:o});return(0,S.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,S.jsxs)(ne.Tabs,{selectedKey:r.toString(),onSelectionChange:i=>n(Number(i)),className:"w-full",children:[(0,S.jsxs)(ne.TabList,{"aria-label":"Content Tabs",className:a(sr()),children:[o.map((i,l)=>{let{label:d,icon:m,disabled:p}=i.props,f=l.toString();return(0,S.jsxs)(ne.Tab,{id:f,isDisabled:p,ref:g=>{s.current[l]=g},className:({isSelected:g,isDisabled:b})=>a(ir({isActive:g,isDisabled:b})),children:[!!m&&(0,S.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:m}),(0,S.jsx)("span",{children:d})]},f)}),(0,S.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:c,"aria-hidden":"true"})]}),o.map((i,l)=>(0,S.jsx)(ne.TabPanel,{id:l.toString(),children:o[l]},l))]})})}var de=require("react"),ve=require("react/jsx-runtime");function Yt({src:e,poster:t,alt:o,children:r,controls:n,preload:s="metadata",...c}){let i=(0,de.useRef)(null),[l,d]=(0,de.useState)(!1);return(0,de.useEffect)(()=>{let m=i.current;if(!m)return;let p=new IntersectionObserver(([f])=>{f.isIntersecting&&(d(!0),p.disconnect())},{rootMargin:"200px"});return p.observe(m),()=>p.disconnect()},[]),(0,ve.jsx)("div",{ref:i,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:l?(0,ve.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:s,playsInline:!0,...c,children:[r,"Your browser does not support the video tag."]}):(0,ve.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}var eo=require("class-variance-authority"),oo=require("react/jsx-runtime"),ar=(0,eo.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 to({variant:e="default",children:t,className:o="",...r}){return(0,oo.jsx)("span",{className:a(ar({variant:e}),o),...r,children:t})}var ye=require("react"),ro=R(require("react-aria-components"));var no=require("class-variance-authority"),E=require("react/jsx-runtime"),lr=(0,no.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 so({cols:e=3,children:t,className:o="",...r}){return(0,E.jsx)("div",{className:a(lr({cols:e}),o),...r,children:t})}function io({title:e,icon:t,href:o,children:r,className:n="",...s}){let c=(0,ye.useRef)(null),i=(0,ye.useRef)(null),l=(0,ye.useCallback)(p=>{let f=c.current||i.current;if(!f)return;let{left:g,top:b}=f.getBoundingClientRect();f.style.setProperty("--x",`${p.clientX-g}px`),f.style.setProperty("--y",`${p.clientY-b}px`)},[]),d=(0,E.jsxs)(E.Fragment,{children:[(0,E.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,E.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,E.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,E.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,E.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),m=a("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return o?(0,E.jsx)(ro.Link,{ref:i,href:o,className:a(m,"no-underline cursor-pointer"),onMouseMove:l,...s,children:d}):(0,E.jsx)("div",{ref:c,role:"presentation",className:m,onMouseMove:l,...s,children:d})}var B=require("lucide-react");var lo=require("class-variance-authority"),P=require("react/jsx-runtime"),cr={note:(0,P.jsx)(B.Bookmark,{size:18}),tip:(0,P.jsx)(B.Lightbulb,{size:18}),info:(0,P.jsx)(B.Info,{size:18}),warning:(0,P.jsx)(B.AlertTriangle,{size:18}),danger:(0,P.jsx)(B.ShieldAlert,{size:18}),important:(0,P.jsx)(B.Flame,{size:18}),caution:(0,P.jsx)(B.Zap,{size:18})},dr={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},ao=(0,lo.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 Q({type:e="note",title:t,children:o,className:r="",...n}){return(0,P.jsxs)("div",{className:a(ao({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,P.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,P.jsx)("span",{className:a("shrink-0",ao({type:e})),children:cr[e]}),(0,P.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||dr[e]})]}),(0,P.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var co=e=>(0,P.jsx)(Q,{type:"note",...e}),mo=e=>(0,P.jsx)(Q,{type:"tip",...e}),po=e=>(0,P.jsx)(Q,{type:"warning",...e}),uo=e=>(0,P.jsx)(Q,{type:"danger",...e}),fo=e=>(0,P.jsx)(Q,{type:"info",...e}),bo=e=>(0,P.jsx)(Q,{type:"important",...e}),go=e=>(0,P.jsx)(Q,{type:"caution",...e});var De=require("react"),me=require("lucide-react");var Ve=require("class-variance-authority"),U=require("react/jsx-runtime"),mr=(0,Ve.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}}),pr=(0,Ve.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}}),ur=(0,Ve.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 fr({icon:e,children:t,variant:o,dense:r}){return(0,U.jsxs)("li",{className:a(pr({variant:o,dense:r})),children:[e&&(0,U.jsx)("span",{className:a(ur({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,U.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var br={checked:e=>(0,U.jsx)(me.Check,{size:14,className:a("text-emerald-500 shrink-0",e)}),arrow:e=>(0,U.jsx)(me.ChevronRight,{size:14,className:a("text-primary-400 shrink-0",e)}),bubble:e=>(0,U.jsx)(me.Circle,{size:6,fill:"currentColor",className:a("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function xo({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...s}){let c=t!==void 0&&Number(t)>1,i=br[e],l=mr({variant:e,cols:t,dense:o,isGrid:c,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,U.jsx)(d,{className:l,...s,children:r}):(0,U.jsx)("ul",{className:l,...s,children:De.Children.map(r,m=>{if(!(0,De.isValidElement)(m))return m;let p=m,f=p.type==="li"?p.props.children:p.props.children||m;return(0,U.jsx)(fr,{icon:i(),variant:e,dense:o,children:f})})})}var q=require("react"),K=R(require("react-aria-components")),F=require("lucide-react");var w=require("react/jsx-runtime"),Ce=16,Re=2,et={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 ot(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(ot).join(""):(0,q.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?ot(e.props.children):""}function gr(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,w.jsx)(F.Folder,{size:Ce,strokeWidth:Re,className:a(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=a(r,"text-text-dim group-hover:text-text-main");return et.CODE.test(o)?(0,w.jsx)(F.FileCode,{size:Ce,strokeWidth:Re,className:n}):et.TEXT.test(o)?(0,w.jsx)(F.FileText,{size:Ce,strokeWidth:Re,className:n}):et.IMAGE.test(o)?(0,w.jsx)(F.FileImage,{size:Ce,strokeWidth:Re,className:n}):(0,w.jsx)(F.File,{size:Ce,strokeWidth:Re,className:n})}function tt(e,t){if(!(0,q.isValidElement)(e))return!1;let o=e.type;if(typeof o=="string")return o===t;if(typeof o=="function")return o.name===t||o.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function xr(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function He(e,t="root"){if(!(0,q.isValidElement)(e))return[];let o=[];if(tt(e,"ul"))return q.Children.forEach(e.props.children,(r,n)=>{o.push(...He(r,`${t}-${n}`))}),o;if(tt(e,"li")){let r=q.Children.toArray(e.props.children),n=r.findIndex(b=>tt(b,"ul")),s=n!==-1,c=s?r.slice(0,n):r,i=s?r.slice(n):[],l=ot(c),{name:d,comment:m}=xr(l),p=d.endsWith("/"),f=p?d.slice(0,-1):d,g=s||p;return o.push({id:`${t}-${f}`,name:f,comment:m,isFolder:g,children:s?He(i[0],`${t}-${f}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&q.Children.forEach(e.props.children,(r,n)=>{o.push(...He(r,`${t}-${n}`))}),o}function ho({item:e}){return(0,w.jsxs)(K.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,w.jsx)(K.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,w.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,w.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,w.jsx)(K.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,w.jsx)(F.ChevronRight,{size:14,strokeWidth:3,className:a("transition-transform duration-200",t&&"rotate-90")})}):(0,w.jsx)("div",{className:"w-[18px]"}),gr(e.name,e.isFolder),(0,w.jsx)("span",{className:a("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,w.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,w.jsx)(K.Collection,{items:e.children,children:t=>(0,w.jsx)(ho,{item:t})})]})}function vo({children:e}){let t=(0,q.useMemo)(()=>He(e),[e]);return(0,w.jsx)("div",{className:"my-8",children:(0,w.jsx)(K.Tree,{items:t,"aria-label":"File Tree",className:a("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:o=>(0,w.jsx)(ho,{item:o})})})}var Ne=R(require("react-aria-components"));var pe=require("react");function yo({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,s]=(0,pe.useState)(null),[c,i]=(0,pe.useState)(1),l=(0,pe.useMemo)(()=>{if(!e)return[];let f=[...e];return t&&n!==null&&f.sort((g,b)=>{let x=g[n.key],N=b[n.key],H=typeof x=="string"?x:"",Te=typeof N=="string"?N:"";return H<Te?n.direction==="asc"?-1:1:H>Te?n.direction==="asc"?1:-1:0}),f},[e,n,t]),d=Math.ceil(l.length/r),m=(0,pe.useMemo)(()=>{if(!o)return l;let f=(c-1)*r;return l.slice(f,f+r)},[l,o,c,r]);return{sortConfig:n,currentPage:c,setCurrentPage:i,totalPages:d,paginatedData:m,requestSort:f=>{if(!t)return;let g="asc";n&&n.key===f&&n.direction==="asc"&&(g="desc"),s({key:f,direction:g})}}}var O=require("lucide-react");var h=require("react/jsx-runtime");function Co({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:s=!1,pageSize:c=10}){let{sortConfig:i,currentPage:l,setCurrentPage:d,totalPages:m,paginatedData:p,requestSort:f}=yo({data:t,sortable:n,paginated:s,pageSize:c}),g=x=>n?i?.key!==x?(0,h.jsx)(O.ChevronDown,{size:14,className:"ml-1 opacity-30"}):i.direction==="asc"?(0,h.jsx)(O.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,h.jsx)(O.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,b=o||(0,h.jsxs)(h.Fragment,{children:[e&&(0,h.jsx)("thead",{children:(0,h.jsx)("tr",{children:e.map((x,N)=>(0,h.jsx)("th",{onClick:()=>f(N),className:a("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:(0,h.jsxs)("div",{className:"flex items-center",children:[x,g(N)]})},N))})}),p&&(0,h.jsx)("tbody",{children:p.map((x,N)=>(0,h.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:x.map((H,Te)=>(0,h.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:H},Te))},N))})]});return(0,h.jsxs)("div",{className:a("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:b})}),s&&m>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 ",l," of ",m]}),(0,h.jsxs)("div",{className:"flex items-center gap-1",children:[(0,h.jsx)(Ne.Button,{onPress:()=>d(1),isDisabled:l===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)(O.ChevronsLeft,{size:16})}),(0,h.jsx)(Ne.Button,{onPress:()=>d(x=>Math.max(x-1,1)),isDisabled:l===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)(O.ChevronLeft,{size:16})}),(0,h.jsx)(Ne.Button,{onPress:()=>d(x=>Math.min(x+1,m)),isDisabled:l===m,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)(O.ChevronRight,{size:16})}),(0,h.jsx)(Ne.Button,{onPress:()=>d(m),isDisabled:l===m,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)(O.ChevronsRight,{size:16})})]})]})]})}var D=require("react/jsx-runtime");function Ro({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:s,className:c=""}){return(0,D.jsxs)("article",{className:a("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",c),id:s,children:[(0,D.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,D.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,D.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,D.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,D.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,D.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&(0,D.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,D.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,D.jsx)("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),(0,D.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}var Po=require("react/jsx-runtime");function No({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),s=a("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,Po.jsx)(oe,{href:e,className:s,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}var To=require("react/jsx-runtime");function wo({src:e,alt:t,theme:o,...r}){let{theme:n}=Pt();return o&&o!==n?null:(0,To.jsx)("img",{src:e,alt:t||"",...r})}var C=require("react/jsx-runtime");function ko({title:e,props:t,className:o=""}){return(0,C.jsxs)("div",{className:a("my-6",o),children:[e&&(0,C.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,C.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,C.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,C.jsx)("thead",{children:(0,C.jsxs)("tr",{children:[(0,C.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,C.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,C.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,C.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,C.jsx)("tbody",{children:t.map((r,n)=>(0,C.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,C.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,C.jsx)("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&(0,C.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,C.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,C.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,C.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,C.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,C.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,C.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}var rt=require("react");function Ao(e){let{code:t,children:o,preview:r}=e,n=(0,rt.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),s=(0,rt.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:s}}var ue=require("react/jsx-runtime");function Lo(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:s={}}=e,{initialCode:c,previewElement:i}=Ao(e);return(0,ue.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,ue.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:i}),!o&&(0,ue.jsx)("div",{className:"border-t border-border-subtle",children:(0,ue.jsx)(re,{hideSandbox:r,hideCopy:n,title:s.title,lang:"tsx",highlightedHtml:t,children:c})})]})}var Fo=require("react"),Y=require("lucide-react");var Bo=require("react");var hr=require("react-aria-components"),Pe=require("lucide-react");var Io=require("react/jsx-runtime");var we=R(require("react-aria-components")),vr=require("lucide-react");var it=require("react/jsx-runtime");var k=R(require("react-aria-components")),se=require("lucide-react");var v=require("react/jsx-runtime"),yr=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,v.jsx)(k.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:a("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:(0,v.jsx)(k.Modal,{className:a("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:(0,v.jsx)(k.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Cr=({children:e,className:t,...o})=>(0,v.jsx)("div",{className:t,children:(0,v.jsx)(k.Autocomplete,{...o,className:"flex flex-col min-h-0",children:e})}),Rr=({className:e,...t})=>(0,v.jsxs)(k.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,v.jsx)(se.Search,{className:"h-5 w-5 text-text-muted"}),(0,v.jsx)(k.Input,{...t,className:a("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,v.jsx)("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:(0,v.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),Nr=({children:e,className:t,...o})=>(0,v.jsx)(k.ListBox,{...o,className:a("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Pr=({children:e,className:t,...o})=>(0,v.jsx)(k.ListBoxItem,{...o,className:a("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>(0,v.jsxs)(v.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,v.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,v.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,v.jsx)(se.CornerDownLeft,{size:10})]})]})}),wr=({isHeading:e,className:t})=>(0,v.jsx)("div",{className:a("shrink-0",t),children:e?(0,v.jsx)(se.Hash,{size:18}):(0,v.jsx)(se.FileText,{size:18})}),Tr=({children:e,className:t})=>(0,v.jsx)("span",{className:a("block font-medium truncate flex-1 text-sm",t),children:e}),kr=({children:e,className:t})=>(0,v.jsx)("span",{className:a("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),si={Root:yr,Autocomplete:Cr,Input:Rr,List:Nr,Item:Object.assign(Pr,{Icon:wr,Title:Tr,Bio:kr})};var V=require("react"),Ar=R(require("scroll-into-view-if-needed"));var Mo=require("react");var So=require("react/jsx-runtime"),hi=(0,V.createContext)(null),vi=(0,V.createContext)(null);function Lr(e){let[t,o]=(0,V.useState)({isOverflowing:!1,isAtBottom:!1});return(0,V.useEffect)(()=>{let r=e.current;if(!r)return;let n=()=>{let c=r.scrollHeight>r.clientHeight,i=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:c,isAtBottom:i})};n(),r.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n);let s=new MutationObserver(n);return s.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",n),window.removeEventListener("resize",n),s.disconnect()}},[e]),t}var Br=({children:e,className:t,ref:o,...r})=>{let n=(0,V.useRef)(null);(0,V.useImperativeHandle)(o,()=>n.current);let{isOverflowing:s,isAtBottom:c}=Lr(n);return(0,So.jsx)("div",{ref:n,className:a("relative overflow-y-auto boltdocs-otp-content",s&&!c&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};Br.displayName="OnThisPageContent";var Eo=R(require("react-aria-components")),$e=require("lucide-react");var $=require("react/jsx-runtime"),Ir=({children:e,className:t})=>(0,$.jsx)("nav",{className:a("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),Mr=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,$.jsxs)(Eo.Link,{href:t,className:a("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",n?"text-right justify-end":"text-left justify-start",r),children:[!n&&(0,$.jsx)($e.ChevronLeft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),(0,$.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&(0,$.jsx)($e.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Sr=({children:e,className:t})=>(0,$.jsx)("span",{className:a("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Er=({children:e,className:t})=>(0,$.jsx)("span",{className:a("text-base font-bold text-text-main truncate",t),children:e}),Or=({children:e})=>(0,$.jsx)($.Fragment,{children:e}),Ni={PageNavRoot:Ir,PageNavLink:Object.assign(Mr,{Title:Sr,Description:Er,Icon:Or})};var Dr=require("react/jsx-runtime");var Vr=R(require("react-aria-components")),Hr=require("lucide-react");var Oo=require("react/jsx-runtime");var at=require("react-aria-components"),zr=require("lucide-react");var Fr=require("react/jsx-runtime");var Vo=require("react/jsx-runtime"),Do=({children:e,className:t,vertical:o=!1})=>(0,Vo.jsx)("div",{className:a("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});var ge=require("lucide-react"),zo=R(require("react")),L=R(require("react-aria-components"));var be=R(require("react-aria-components"));var fe=require("react/jsx-runtime"),Ho=({children:e,className:t,showArrow:o,...r})=>(0,fe.jsxs)(be.Popover,{offset:8,...r,className:be.composeRenderProps(t,n=>a("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",n)),children:[o&&(0,fe.jsx)(be.OverlayArrow,{className:"group",children:(0,fe.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,fe.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var I=require("react/jsx-runtime");function nt(e){let[t,o]=zo.default.Children.toArray(e.children).slice(0,2);return(0,I.jsxs)(L.MenuTrigger,{...e,children:[t,(0,I.jsx)(Ho,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function st(e){return(0,I.jsx)(L.Menu,{...e,className:L.composeRenderProps(e.className,t=>a("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function ze(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,I.jsx)(L.MenuItem,{...e,textValue:t,className:L.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:s})=>a("group relative flex flex-row items-center gap-2.5 px-3 py-1.5 rounded-lg outline-none cursor-default transition-all duration-200","text-text-main text-[0.8125rem]",r&&"bg-primary-500/10 text-primary-600 shadow-sm",n&&"scale-[0.98] bg-primary-500/15",s&&"opacity-40 grayscale pointer-events-none",o)),children:L.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:s})=>(0,I.jsxs)(I.Fragment,{children:[r!=="none"&&(0,I.jsxs)("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,I.jsx)(ge.Check,{className:"w-3.5 h-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,I.jsx)(ge.Dot,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,I.jsx)("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),s&&(0,I.jsx)(ge.ChevronRight,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}var Fe=require("react-aria-components");var T=require("react/jsx-runtime"),$r=e=>{let[t,o]=(0,Fo.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let s=new Blob([e],{type:"text/plain;charset=utf-8"}),c=URL.createObjectURL(s);window.open(c,"_blank")}}};function $o({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:s,handleOpenRaw:c}=$r(r),i=o!==!1,l=typeof o=="object"&&o.text||"Copy Markdown";return!i||!r?null:(0,T.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,T.jsxs)(Do,{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,T.jsx)(ae,{variant:"ghost",onPress:s,icon:n?(0,T.jsx)(Y.Check,{size:16}):(0,T.jsx)(Y.Copy,{size:16}),iconPosition:"left",className:a("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!":l}),(0,T.jsxs)(nt,{placement:"bottom end",children:[(0,T.jsx)(ae,{variant:"ghost",isIconOnly:!0,icon:(0,T.jsx)(Y.ChevronDown,{size:14}),className:a("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,T.jsxs)(st,{className:"w-52",children:[(0,T.jsxs)(ze,{onAction:s,className:"flex flex-row items-start gap-2.5 group",children:[(0,T.jsx)(Y.Copy,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,T.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,T.jsxs)(ze,{onAction:c,className:"flex flex-row items-start gap-2.5 group",children:[(0,T.jsx)(Y.ExternalLink,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,T.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}var W=require("react/jsx-runtime"),xe=({level:e,id:t,children:o})=>{let r=`h${e}`;return(0,W.jsxs)(r,{id:t,className:"boltdocs-heading",children:[o,t&&(0,W.jsx)("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:(0,W.jsx)(Wo.Link,{size:16})})]})},_o={...lt,h1:e=>(0,W.jsx)(xe,{level:1,...e}),h2:e=>(0,W.jsx)(xe,{level:2,...e}),h3:e=>(0,W.jsx)(xe,{level:3,...e}),h4:e=>(0,W.jsx)(xe,{level:4,...e}),h5:e=>(0,W.jsx)(xe,{level:5,...e}),h6:e=>(0,W.jsx)(xe,{level:6,...e}),pre:e=>(0,W.jsx)(re,{...e,children:e.children})};var y=require("react/jsx-runtime");function Go({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:s,externalPages:c,components:i={}}){let[l,d]=(0,j.useState)(e),[m]=(0,j.useState)(t),p=c||{},f=(0,j.useMemo)(()=>l.filter(b=>!(s&&(b.path==="/"||b.path===""))&&!p[b.path===""?"/":b.path]).map(b=>{let x=Object.keys(r).find(H=>H===`/${o}/${b.filePath}`||H.endsWith(`/${o}/${b.filePath}`)||H.endsWith(`/${o}\\${b.filePath.replace(/\\/g,"/")}`)),N=x?r[x]:null;return{...b,Component:j.default.lazy(async()=>N?await N():{default:qe})}}),[l,r,o,s,p]);(0,j.useEffect)(()=>{n&&n.on("boltdocs:routes-update",b=>{d(b)})},[n]);let g=(0,j.useMemo)(()=>({..._o,...i}),[i]);return(0,y.jsx)(Nt,{children:(0,y.jsx)(Ht,{components:g,children:(0,y.jsx)(Ge.Provider,{value:m,children:(0,y.jsx)(At,{children:(0,y.jsxs)(ft,{routes:l,modules:r,children:[(0,y.jsx)(Mt,{}),(0,y.jsxs)(ee.Routes,{children:[s&&(0,y.jsx)(ee.Route,{path:"/",element:(0,y.jsx)(We.default,{children:(0,y.jsx)(s,{})})}),Object.entries(p).map(([b,x])=>(0,y.jsx)(ee.Route,{path:b,element:(0,y.jsx)(We.default,{children:(0,y.jsx)(x,{})})},b)),(0,y.jsx)(ee.Route,{element:(0,y.jsx)(Ot,{}),children:f.map(b=>(0,y.jsx)(ee.Route,{path:b.path===""?"/":b.path,element:(0,y.jsx)(j.default.Suspense,{fallback:(0,y.jsx)(Ct,{}),children:(0,y.jsx)($t,{Component:b.Component})})},b.path))},"docs-layout"),(0,y.jsx)(ee.Route,{path:"*",element:(0,y.jsx)(We.default,{children:(0,y.jsx)(qe,{})})})]})]})})})})})}var _e=require("react/jsx-runtime");async function _r(e){let{path:t,routes:o,config:r,modules:n,homePage:s,externalPages:c,docsDirName:i}=e,l={};for(let[m,p]of Object.entries(n))l[m]=()=>Promise.resolve(p);return jo.default.renderToString((0,_e.jsx)(Uo.default.StrictMode,{children:(0,_e.jsx)(Xo.StaticRouter,{location:t,children:(0,_e.jsx)(Go,{initialRoutes:o,initialConfig:r,docsDirName:i,modules:l,homePage:s,externalPages:c})})}))}0&&(module.exports={render});
|
|
1
|
+
"use strict";var rr=Object.create;var Me=Object.defineProperty;var nr=Object.getOwnPropertyDescriptor;var sr=Object.getOwnPropertyNames;var ir=Object.getPrototypeOf,ar=Object.prototype.hasOwnProperty;var gt=(e,t)=>{for(var o in t)Me(e,o,{get:t[o],enumerable:!0})},bt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of sr(t))!ar.call(e,n)&&n!==o&&Me(e,n,{get:()=>t[n],enumerable:!(r=nr(t,n))||r.enumerable});return e};var N=(e,t,o)=>(o=e!=null?rr(ir(e)):{},bt(t||!e||!e.__esModule?Me(o,"default",{value:e,enumerable:!0}):o,e)),lr=e=>bt(Me({},"__esModule",{value:!0}),e);var tn={};gt(tn,{render:()=>en});module.exports=lr(tn);var Qo=N(require("react")),Yo=N(require("react-dom/server")),er=require("react-router-dom/server");var I=N(require("react")),Jr=N(require("react-dom/client")),Z=require("react-router-dom");var Tt=require("lucide-react");var Qe=N(require("react")),Pt=require("react-aria-components"),wt=require("react-router-dom");var Ie=require("react"),Ze=(0,Ie.createContext)(null);function ne(){let e=(0,Ie.use)(Ze);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Ct=require("react-router-dom");var se=require("react"),vt=require("react/jsx-runtime"),xt=(0,se.createContext)({preload:()=>{},routes:[]});function Ee(){return(0,se.use)(xt)}function ht({routes:e,modules:t,children:o}){let r=(0,se.useRef)(null),n=(0,se.useCallback)(i=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let l=i.split("#")[0].split("?")[0],a=e.find(s=>s.path===l||l==="/"&&s.path==="");if(a?.filePath){let s=Object.keys(t).find(d=>d.endsWith("/"+a.filePath));s&&t[s]().catch(d=>{console.error(`[boltdocs] Failed to preload route ${i}:`,d)})}},100)},[e,t]);return(0,vt.jsx)(xt.Provider,{value:{preload:n,routes:e},children:o})}var yt=require("zustand"),Oe=require("zustand/middleware"),Y=(0,yt.create)()((0,Oe.persist)(e=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:t=>e({currentLocale:t}),setVersion:t=>e({currentVersion:t}),setHasHydrated:t=>e({hasHydrated:t})}),{name:"boltdocs-storage",storage:(0,Oe.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function Re(){let{routes:e}=Ee(),t=ne(),o=(0,Ct.useLocation)(),r=Y(p=>p.currentLocale),n=Y(p=>p.currentVersion),i=Y(p=>p.hasHydrated),l=e.find(p=>p.path===o.pathname),a=t.i18n?l?.locale||(i?r:void 0)||t.i18n.defaultLocale:void 0,s=t.versions?l?.version||(i?n:void 0)||t.versions.defaultVersion:void 0,d=e.filter(p=>{let T=t.i18n?(p.locale||t.i18n.defaultLocale)===a:!0,E=t.versions?(p.version||t.versions.defaultVersion)===s:!0;if(!(T&&E))return!1;let U=t.i18n;if(U){let tr=!!l?.locale,or=!!p.locale;if(e.some(Se=>Se!==p&&Se.filePath===p.filePath&&Se.version===p.version&&(Se.locale||U.defaultLocale)===(p.locale||U.defaultLocale))&&tr!==or)return!1}return!0}),f=t.i18n?.localeConfigs?.[a]?.label||t.i18n?.locales[a]||a,b=t.versions?.versions.find(p=>p.path===s)?.label||s,y=t.i18n?Object.entries(t.i18n.locales).map(([p,T])=>{let E=t.i18n?.localeConfigs?.[p];return{key:p,label:E?.label||T,isCurrent:p===a}}):[],C=t.versions?t.versions.versions.map(p=>({key:p.path,label:p.label,isCurrent:p.path===s})):[];return{routes:d,allRoutes:e,currentRoute:l,currentLocale:a,currentLocaleLabel:f,availableLocales:y,currentVersion:s,currentVersionLabel:b,availableVersions:C,config:t}}function Je(e){let t=ne(),{currentLocale:o,currentVersion:r}=Re();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,i=t.versions;if(!n&&!i)return e;let l=e.startsWith("/docs"),a=e.split("/").filter(Boolean),s=0;a[s]==="docs"&&s++,i&&a.length>s&&i.versions.find(b=>b.path===a[s])&&s++,n&&a.length>s&&n.locales[a[s]]&&s++;let d=a.slice(s),m=[];l&&(m.push("docs"),i&&r&&m.push(r)),n&&o&&o!==n.defaultLocale&&m.push(o),m.push(...d);let f=`/${m.join("/")}`;return f.length>1&&f.endsWith("/")?f.slice(0,-1):f||"/"}var Rt=require("clsx"),Nt=require("tailwind-merge");function c(...e){return(0,Nt.twMerge)((0,Rt.clsx)(e))}var Ye=require("react/jsx-runtime"),ie=Qe.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:i,...l}=e,a=Je(o??""),{preload:s}=Ee();return(0,Ye.jsx)(Pt.Link,{...l,ref:t,href:a,onMouseEnter:f=>{n?.(f),r==="hover"&&typeof a=="string"&&a.startsWith("/")&&s(a)},onFocus:f=>{i?.(f),r==="hover"&&typeof a=="string"&&a.startsWith("/")&&s(a)}})});ie.displayName="Link";var cr=Qe.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:i,...l}=e,a=(0,wt.useLocation)(),s=Je(o??""),d=r?a.pathname===s:a.pathname.startsWith(s),m=typeof n=="function"?n({isActive:d}):c(n,d&&"active"),f=typeof i=="function"?i({isActive:d}):i;return(0,Ye.jsx)(ie,{...l,ref:t,href:o,className:m,children:f})});cr.displayName="NavLink";var ee=require("react/jsx-runtime");function et(){return(0,ee.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,ee.jsxs)("div",{className:"space-y-4",children:[(0,ee.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,ee.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,ee.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,ee.jsxs)(ie,{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,ee.jsx)(Tt.ArrowLeft,{size:16})," Go to Home"]})]})})}var j=require("react"),Bt=require("react/jsx-runtime"),kt=(0,j.createContext)(void 0);function Lt({children:e}){let[t,o]=(0,j.useState)("system"),[r,n]=(0,j.useState)("dark"),[i,l]=(0,j.useState)(!1);(0,j.useEffect)(()=>{l(!0);let s=localStorage.getItem("boltdocs-theme"),d=s==="light"||s==="dark"||s==="system"?s:"system";o(d);let m=window.matchMedia("(prefers-color-scheme: dark)");((b,y)=>{n(b==="system"?y?"dark":"light":b)})(d,m.matches);let g=b=>{n(y=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?b.matches?"dark":"light":y)};return m.addEventListener("change",g),()=>m.removeEventListener("change",g)},[]),(0,j.useEffect)(()=>{if(!i)return;let s=window.matchMedia("(prefers-color-scheme: dark)").matches,d=t==="system"?s?"dark":"light":t;n(d);let m=document.documentElement;d==="light"?(m.classList.add("theme-light"),m.dataset.theme="light"):(m.classList.remove("theme-light"),m.dataset.theme="dark")},[t,i]);let a=s=>{o(s),localStorage.setItem("boltdocs-theme",s)};return(0,Bt.jsx)(kt.Provider,{value:{theme:t,resolvedTheme:r,setTheme:a},children:e})}function At(){let e=(0,j.use)(kt);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var Ce=N(require("virtual:boltdocs-layout"));var St=require("react"),Mt=require("react-aria-components"),Ve=require("react-router-dom"),Et=require("react/jsx-runtime");function It({children:e}){let t=(0,Ve.useNavigate)();return(0,Et.jsx)(Mt.RouterProvider,{navigate:(o,r)=>{(0,St.startTransition)(()=>{t(o,r)})},useHref:Ve.useHref,children:e})}var Ot=require("react"),Vt=require("react-router-dom");function Ht(){let{pathname:e,hash:t}=(0,Vt.useLocation)();return(0,Ot.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content");if(o){if(t){let r=t.replace("#",""),n=document.getElementById(r);if(n){let l=o.getBoundingClientRect().top,d=n.getBoundingClientRect().top-l-80+o.scrollTop;o.scrollTo({top:d,behavior:"smooth"});return}}o.scrollTo(0,0)}},[e,t]),null}var Dt=require("react-router-dom"),zt=N(require("virtual:boltdocs-layout")),tt=require("react/jsx-runtime");function Ft(){return(0,tt.jsx)(zt.default,{children:(0,tt.jsx)(Dt.Outlet,{})})}var Ut=require("@mdx-js/react");var He=require("react"),Gt=require("react/jsx-runtime"),$t=(0,He.createContext)({});function Wt(){return(0,He.useContext)($t)}function _t({components:e,children:t}){return(0,Gt.jsx)($t.Provider,{value:e,children:t})}var ot=require("react/jsx-runtime");function jt({Component:e}){let t=Wt();return(0,ot.jsx)(Ut.MDXProvider,{components:t,children:(0,ot.jsx)(e,{})})}var Xo=require("lucide-react");var ft={};gt(ft,{Admonition:()=>oe,Badge:()=>io,Button:()=>Xt,Card:()=>po,Cards:()=>mo,Caution:()=>Co,CodeBlock:()=>ae,ComponentPreview:()=>Eo,ComponentProps:()=>Mo,CopyMarkdown:()=>jo,Danger:()=>ho,Field:()=>ko,FileTree:()=>Po,Image:()=>Bo,Important:()=>yo,InfoBox:()=>vo,Link:()=>Lo,List:()=>Ro,Note:()=>go,Tab:()=>oo,Table:()=>To,Tabs:()=>ro,Tip:()=>bo,Video:()=>no,Warning:()=>xo});var ze=N(require("react-aria-components"));var qt=require("class-variance-authority"),q=require("react/jsx-runtime"),De=(0,qt.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"}}),de=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:i,variant:l,size:a,rounded:s,iconSize:d,disabled:m,...f})=>{let g=r||!n&&!!t,b=g?(0,q.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,q.jsxs)(q.Fragment,{children:[t&&o==="left"&&(0,q.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,q.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,q.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,q.jsx)(ze.Link,{href:e,className:c(De({variant:l,size:a,rounded:s,iconSize:g?d:void 0,disabled:m}),i),...f,children:b}):(0,q.jsx)(ze.Button,{className:c(De({variant:l,size:a,rounded:s,iconSize:g?d:void 0,disabled:m}),i),...f,children:b})};var Kt=require("react/jsx-runtime"),Xt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:i,...l})=>(0,Kt.jsx)(de,{className:c("group",De({variant:t,size:o,rounded:r,iconSize:n,disabled:i,className:e})),...l});var Fe=N(require("react-aria-components")),$e=require("lucide-react");var rt=require("codesandbox/lib/api/define.js");function Zt(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",i=e.description||"Generic Sandbox",l={};for(let[a,s]of Object.entries(t)){let d=typeof s.content=="object"?JSON.stringify(s.content,null,2):s.content;l[a]={content:d,isBinary:s.isBinary??!1}}if(!l["package.json"]){let s=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};l["package.json"]={content:JSON.stringify({private:!0,name:n,description:i,type:"module",version:"1.0.0",scripts:e.scripts||s,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return l}function dr(e){let t=Zt(e),o=(0,rt.getParameters)({files:t}),r=new URLSearchParams({parameters:o,installDependencies:"true"});return e.entry&&r.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${r.toString()}`,options:e}}function Jt(e){if(typeof window>"u")return dr(e);let t=Zt(e),o=(0,rt.getParameters)({files:t}),r=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let i=(a,s)=>{let d=document.createElement("input");d.type="hidden",d.name=a,d.value=s,n.appendChild(d)},l=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return i("query",l.toString()),i("parameters",o),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${o}`,options:e}}var Qt=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}};var X=require("react");function Yt(e){let{title:t,sandbox:o}=e,[r,n]=(0,X.useState)(!1),[i,l]=(0,X.useState)(!1),[a,s]=(0,X.useState)(!1),d=(0,X.useRef)(null),m=ne(),f=(0,X.useCallback)(async()=>{let b=d.current?.textContent??"";Qt(b),n(!0),setTimeout(()=>n(!1),2e3)},[]),g=(0,X.useCallback)(()=>{let b=d.current?.textContent??"",y=m?.integrations?.sandbox?.config||{},C=typeof o=="object"?o:y,p=C.entry||"src/App.tsx";Jt({title:t??"Code Snippet",...C,files:{...C.files,[p]:{content:b}}})},[t,m,o]);return(0,X.useEffect)(()=>{let b=d.current?.textContent?.length??0;s(b>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:i,setIsExpanded:l,isExpandable:a,preRef:d,handleCopy:f,handleSandbox:g,shouldTruncate:a&&!i}}var Ne=require("react/jsx-runtime");function mr(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var eo=e=>(0,Ne.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...mr(e),children:[(0,Ne.jsx)("title",{children:"CodeSandbox"}),(0,Ne.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var me=N(require("react-aria-components"));var $=require("react/jsx-runtime"),ur=({className:e,children:t,...o})=>(0,$.jsx)(me.Tooltip,{...o,offset:8,className:r=>c("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(me.OverlayArrow,{children:(0,$.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,$.jsx)("title",{children:"Arrow"}),(0,$.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),nt=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,$.jsxs)(me.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,$.jsx)(ur,{...n,children:e})]});var A=require("react/jsx-runtime");function ae(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:i,...l}=e,d=!!ne()?.integrations?.sandbox?.enable&&!r,{copied:m,isExpanded:f,setIsExpanded:g,isExpandable:b,preRef:y,handleCopy:C,handleSandbox:p,shouldTruncate:T}=Yt(e);return(0,A.jsxs)("div",{className:c("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",T&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[(0,A.jsxs)("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:[d&&(0,A.jsx)(nt,{content:"Open in CodeSandbox",children:(0,A.jsx)(Fe.Button,{onPress:p,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:(0,A.jsx)(eo,{size:20})})}),!n&&(0,A.jsx)(nt,{content:m?"Copied!":"Copy code",children:(0,A.jsx)(Fe.Button,{onPress:C,className:c("grid place-items-center w-8 h-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-115 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2",m?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:m?(0,A.jsx)($e.Check,{size:20}):(0,A.jsx)($e.Copy,{size:20})})})]}),i?(0,A.jsx)("div",{ref:y,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:i}}):(0,A.jsx)("pre",{ref:y,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...l,children:t}),b&&(0,A.jsx)("div",{className:c(T?"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,A.jsx)(Fe.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"})})]})}var pe=require("react"),le=N(require("react-aria-components"));var te=require("react");function to({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[r,n]=(0,te.useState)(o===-1?0:o),i=(0,te.useRef)([]),[l,a]=(0,te.useState)({opacity:0,transform:"translateX(0)",width:0});(0,te.useEffect)(()=>{let d=i.current[r];d&&a({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[r,t]);let s=(0,te.useCallback)(d=>{let m=0;if(d.key==="ArrowRight"?m=1:d.key==="ArrowLeft"&&(m=-1),m!==0){let f=(r+m+t.length)%t.length;for(;t[f].props.disabled&&f!==r;)f=(f+m+t.length)%t.length;f!==r&&!t[f].props.disabled&&(n(f),i.current[f]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:i,indicatorStyle:l,handleKeyDown:s}}var st=require("class-variance-authority"),O=require("react/jsx-runtime"),fr=(0,st.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"}}),gr=(0,st.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 oo({children:e}){let t=typeof e=="string"?(0,O.jsx)(ae,{className:"language-bash",children:(0,O.jsx)("code",{children:e.trim()})}):e;return(0,O.jsx)("div",{className:"py-4",children:t})}function ro({defaultIndex:e=0,children:t}){let o=(0,pe.useMemo)(()=>pe.Children.toArray(t).filter(a=>(0,pe.isValidElement)(a)&&a.props?.label),[t]),{active:r,setActive:n,tabRefs:i,indicatorStyle:l}=to({initialIndex:e,tabs:o});return(0,O.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,O.jsxs)(le.Tabs,{selectedKey:r.toString(),onSelectionChange:a=>n(Number(a)),className:"w-full",children:[(0,O.jsxs)(le.TabList,{"aria-label":"Content Tabs",className:c(fr()),children:[o.map((a,s)=>{let{label:d,icon:m,disabled:f}=a.props,g=s.toString();return(0,O.jsxs)(le.Tab,{id:g,isDisabled:f,ref:b=>{i.current[s]=b},className:({isSelected:b,isDisabled:y})=>c(gr({isActive:b,isDisabled:y})),children:[!!m&&(0,O.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:m}),(0,O.jsx)("span",{children:d})]},g)}),(0,O.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:l,"aria-hidden":"true"})]}),o.map((a,s)=>(0,O.jsx)(le.TabPanel,{id:s.toString(),children:o[s]},s))]})})}var ue=require("react"),Pe=require("react/jsx-runtime");function no({src:e,poster:t,alt:o,children:r,controls:n,preload:i="metadata",...l}){let a=(0,ue.useRef)(null),[s,d]=(0,ue.useState)(!1);return(0,ue.useEffect)(()=>{let m=a.current;if(!m)return;let f=new IntersectionObserver(([g])=>{g.isIntersecting&&(d(!0),f.disconnect())},{rootMargin:"200px"});return f.observe(m),()=>f.disconnect()},[]),(0,Pe.jsx)("div",{ref:a,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:s?(0,Pe.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:i,playsInline:!0,...l,children:[r,"Your browser does not support the video tag."]}):(0,Pe.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}var so=require("class-variance-authority"),ao=require("react/jsx-runtime"),br=(0,so.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 io({variant:e="default",children:t,className:o="",...r}){return(0,ao.jsx)("span",{className:c(br({variant:e}),o),...r,children:t})}var we=require("react"),lo=N(require("react-aria-components"));var co=require("class-variance-authority"),V=require("react/jsx-runtime"),xr=(0,co.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 mo({cols:e=3,children:t,className:o="",...r}){return(0,V.jsx)("div",{className:c(xr({cols:e}),o),...r,children:t})}function po({title:e,icon:t,href:o,children:r,className:n="",...i}){let l=(0,we.useRef)(null),a=(0,we.useRef)(null),s=(0,we.useCallback)(f=>{let g=l.current||a.current;if(!g)return;let{left:b,top:y}=g.getBoundingClientRect();g.style.setProperty("--x",`${f.clientX-b}px`),g.style.setProperty("--y",`${f.clientY-y}px`)},[]),d=(0,V.jsxs)(V.Fragment,{children:[(0,V.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,V.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,V.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,V.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,V.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),m=c("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return o?(0,V.jsx)(lo.Link,{ref:a,href:o,className:c(m,"no-underline cursor-pointer"),onMouseMove:s,...i,children:d}):(0,V.jsx)("div",{ref:l,role:"presentation",className:m,onMouseMove:s,...i,children:d})}var S=require("lucide-react");var fo=require("class-variance-authority"),P=require("react/jsx-runtime"),hr={note:(0,P.jsx)(S.Bookmark,{size:18}),tip:(0,P.jsx)(S.Lightbulb,{size:18}),info:(0,P.jsx)(S.Info,{size:18}),warning:(0,P.jsx)(S.AlertTriangle,{size:18}),danger:(0,P.jsx)(S.ShieldAlert,{size:18}),important:(0,P.jsx)(S.Flame,{size:18}),caution:(0,P.jsx)(S.Zap,{size:18})},vr={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},uo=(0,fo.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 oe({type:e="note",title:t,children:o,className:r="",...n}){return(0,P.jsxs)("div",{className:c(uo({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,P.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,P.jsx)("span",{className:c("shrink-0",uo({type:e})),children:hr[e]}),(0,P.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||vr[e]})]}),(0,P.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var go=e=>(0,P.jsx)(oe,{type:"note",...e}),bo=e=>(0,P.jsx)(oe,{type:"tip",...e}),xo=e=>(0,P.jsx)(oe,{type:"warning",...e}),ho=e=>(0,P.jsx)(oe,{type:"danger",...e}),vo=e=>(0,P.jsx)(oe,{type:"info",...e}),yo=e=>(0,P.jsx)(oe,{type:"important",...e}),Co=e=>(0,P.jsx)(oe,{type:"caution",...e});var We=require("react"),fe=require("lucide-react");var _e=require("class-variance-authority"),K=require("react/jsx-runtime"),yr=(0,_e.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}}),Cr=(0,_e.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}}),Rr=(0,_e.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 Nr({icon:e,children:t,variant:o,dense:r}){return(0,K.jsxs)("li",{className:c(Cr({variant:o,dense:r})),children:[e&&(0,K.jsx)("span",{className:c(Rr({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,K.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Pr={checked:e=>(0,K.jsx)(fe.Check,{size:14,className:c("text-emerald-500 shrink-0",e)}),arrow:e=>(0,K.jsx)(fe.ChevronRight,{size:14,className:c("text-primary-400 shrink-0",e)}),bubble:e=>(0,K.jsx)(fe.Circle,{size:6,fill:"currentColor",className:c("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Ro({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...i}){let l=t!==void 0&&Number(t)>1,a=Pr[e],s=yr({variant:e,cols:t,dense:o,isGrid:l,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,K.jsx)(d,{className:s,...i,children:r}):(0,K.jsx)("ul",{className:s,...i,children:We.Children.map(r,m=>{if(!(0,We.isValidElement)(m))return m;let f=m,g=f.type==="li"?f.props.children:f.props.children||m;return(0,K.jsx)(Nr,{icon:a(),variant:e,dense:o,children:g})})})}var J=require("react"),Q=N(require("react-aria-components")),W=require("lucide-react");var w=require("react/jsx-runtime"),Te=16,ke=2,it={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 lt(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(lt).join(""):(0,J.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?lt(e.props.children):""}function wr(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,w.jsx)(W.Folder,{size:Te,strokeWidth:ke,className:c(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=c(r,"text-text-dim group-hover:text-text-main");return it.CODE.test(o)?(0,w.jsx)(W.FileCode,{size:Te,strokeWidth:ke,className:n}):it.TEXT.test(o)?(0,w.jsx)(W.FileText,{size:Te,strokeWidth:ke,className:n}):it.IMAGE.test(o)?(0,w.jsx)(W.FileImage,{size:Te,strokeWidth:ke,className:n}):(0,w.jsx)(W.File,{size:Te,strokeWidth:ke,className:n})}function at(e,t){if(!(0,J.isValidElement)(e))return!1;let o=e.type;if(typeof o=="string")return o===t;if(typeof o=="function")return o.name===t||o.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function Tr(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Ge(e,t="root"){if(!(0,J.isValidElement)(e))return[];let o=[];if(at(e,"ul"))return J.Children.forEach(e.props.children,(r,n)=>{o.push(...Ge(r,`${t}-${n}`))}),o;if(at(e,"li")){let r=J.Children.toArray(e.props.children),n=r.findIndex(y=>at(y,"ul")),i=n!==-1,l=i?r.slice(0,n):r,a=i?r.slice(n):[],s=lt(l),{name:d,comment:m}=Tr(s),f=d.endsWith("/"),g=f?d.slice(0,-1):d,b=i||f;return o.push({id:`${t}-${g}`,name:g,comment:m,isFolder:b,children:i?Ge(a[0],`${t}-${g}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&J.Children.forEach(e.props.children,(r,n)=>{o.push(...Ge(r,`${t}-${n}`))}),o}function No({item:e}){return(0,w.jsxs)(Q.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,w.jsx)(Q.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,w.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,w.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,w.jsx)(Q.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,w.jsx)(W.ChevronRight,{size:14,strokeWidth:3,className:c("transition-transform duration-200",t&&"rotate-90")})}):(0,w.jsx)("div",{className:"w-[18px]"}),wr(e.name,e.isFolder),(0,w.jsx)("span",{className:c("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,w.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,w.jsx)(Q.Collection,{items:e.children,children:t=>(0,w.jsx)(No,{item:t})})]})}function Po({children:e}){let t=(0,J.useMemo)(()=>Ge(e),[e]);return(0,w.jsx)("div",{className:"my-8",children:(0,w.jsx)(Q.Tree,{items:t,"aria-label":"File Tree",className:c("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:o=>(0,w.jsx)(No,{item:o})})})}var Le=N(require("react-aria-components"));var ge=require("react");function wo({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,i]=(0,ge.useState)(null),[l,a]=(0,ge.useState)(1),s=(0,ge.useMemo)(()=>{if(!e)return[];let g=[...e];return t&&n!==null&&g.sort((b,y)=>{let C=b[n.key],p=y[n.key],T=typeof C=="string"?C:"",E=typeof p=="string"?p:"";return T<E?n.direction==="asc"?-1:1:T>E?n.direction==="asc"?1:-1:0}),g},[e,n,t]),d=Math.ceil(s.length/r),m=(0,ge.useMemo)(()=>{if(!o)return s;let g=(l-1)*r;return s.slice(g,g+r)},[s,o,l,r]);return{sortConfig:n,currentPage:l,setCurrentPage:a,totalPages:d,paginatedData:m,requestSort:g=>{if(!t)return;let b="asc";n&&n.key===g&&n.direction==="asc"&&(b="desc"),i({key:g,direction:b})}}}var H=require("lucide-react");var h=require("react/jsx-runtime");function To({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:i=!1,pageSize:l=10}){let{sortConfig:a,currentPage:s,setCurrentPage:d,totalPages:m,paginatedData:f,requestSort:g}=wo({data:t,sortable:n,paginated:i,pageSize:l}),b=C=>n?a?.key!==C?(0,h.jsx)(H.ChevronDown,{size:14,className:"ml-1 opacity-30"}):a.direction==="asc"?(0,h.jsx)(H.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,h.jsx)(H.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,y=o||(0,h.jsxs)(h.Fragment,{children:[e&&(0,h.jsx)("thead",{children:(0,h.jsx)("tr",{children:e.map((C,p)=>(0,h.jsx)("th",{onClick:()=>g(p),className:c("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:(0,h.jsxs)("div",{className:"flex items-center",children:[C,b(p)]})},p))})}),f&&(0,h.jsx)("tbody",{children:f.map((C,p)=>(0,h.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:C.map((T,E)=>(0,h.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:T},E))},p))})]});return(0,h.jsxs)("div",{className:c("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:y})}),i&&m>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 ",s," of ",m]}),(0,h.jsxs)("div",{className:"flex items-center gap-1",children:[(0,h.jsx)(Le.Button,{onPress:()=>d(1),isDisabled:s===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,h.jsx)(H.ChevronsLeft,{size:16})}),(0,h.jsx)(Le.Button,{onPress:()=>d(C=>Math.max(C-1,1)),isDisabled:s===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,h.jsx)(H.ChevronLeft,{size:16})}),(0,h.jsx)(Le.Button,{onPress:()=>d(C=>Math.min(C+1,m)),isDisabled:s===m,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)(H.ChevronRight,{size:16})}),(0,h.jsx)(Le.Button,{onPress:()=>d(m),isDisabled:s===m,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)(H.ChevronsRight,{size:16})})]})]})]})}var D=require("react/jsx-runtime");function ko({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:i,className:l=""}){return(0,D.jsxs)("article",{className:c("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",l),id:i,children:[(0,D.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,D.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,D.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,D.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,D.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,D.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&(0,D.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,D.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,D.jsx)("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),(0,D.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}var Ao=require("react/jsx-runtime");function Lo({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),i=c("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,Ao.jsx)(ie,{href:e,className:i,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}var So=require("react/jsx-runtime");function Bo({src:e,alt:t,theme:o,...r}){let{theme:n}=At();return o&&o!==n?null:(0,So.jsx)("img",{src:e,alt:t||"",...r})}var R=require("react/jsx-runtime");function Mo({title:e,props:t,className:o=""}){return(0,R.jsxs)("div",{className:c("my-6",o),children:[e&&(0,R.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,R.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,R.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,R.jsx)("thead",{children:(0,R.jsxs)("tr",{children:[(0,R.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,R.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,R.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,R.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,R.jsx)("tbody",{children:t.map((r,n)=>(0,R.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,R.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,R.jsx)("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&(0,R.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,R.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,R.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,R.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,R.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,R.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,R.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}var ct=require("react");function Io(e){let{code:t,children:o,preview:r}=e,n=(0,ct.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),i=(0,ct.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:i}}var be=require("react/jsx-runtime");function Eo(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:i={}}=e,{initialCode:l,previewElement:a}=Io(e);return(0,be.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,be.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:a}),!o&&(0,be.jsx)("div",{className:"border-t border-border-subtle",children:(0,be.jsx)(ae,{hideSandbox:r,hideCopy:n,title:i.title,lang:"tsx",highlightedHtml:t,children:l})})]})}var Uo=require("react"),re=require("lucide-react");var Oo=require("react");var kr=require("react-aria-components"),Ae=require("lucide-react");var Vo=require("react/jsx-runtime");var Be=N(require("react-aria-components")),Lr=require("lucide-react");var pt=require("react/jsx-runtime");var L=N(require("react-aria-components")),ce=require("lucide-react");var v=require("react/jsx-runtime"),Ar=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,v.jsx)(L.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:c("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:(0,v.jsx)(L.Modal,{className:c("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:(0,v.jsx)(L.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Br=({children:e,className:t,onSelectionChange:o,...r})=>(0,v.jsx)("div",{className:t,children:(0,v.jsx)(L.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),Sr=({className:e,...t})=>(0,v.jsxs)(L.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,v.jsx)(ce.Search,{className:"h-5 w-5 text-text-muted"}),(0,v.jsx)(L.Input,{...t,className:c("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,v.jsx)("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:(0,v.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),Mr=({children:e,className:t,...o})=>(0,v.jsx)(L.ListBox,{...o,className:c("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Ir=({children:e,className:t,...o})=>(0,v.jsx)(L.ListBoxItem,{...o,className:c("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>(0,v.jsxs)(v.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,v.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,v.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,v.jsx)(ce.CornerDownLeft,{size:10})]})]})}),Er=({isHeading:e,className:t})=>(0,v.jsx)("div",{className:c("shrink-0",t),children:e?(0,v.jsx)(ce.Hash,{size:18}):(0,v.jsx)(ce.FileText,{size:18})}),Or=({children:e,className:t})=>(0,v.jsx)("span",{className:c("block font-medium truncate flex-1 text-sm",t),children:e}),Vr=({children:e,className:t})=>(0,v.jsx)("span",{className:c("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),Ni={Root:Ar,Autocomplete:Br,Input:Sr,List:Mr,Item:Object.assign(Ir,{Icon:Er,Title:Or,Bio:Vr})};var z=require("react"),Hr=N(require("scroll-into-view-if-needed"));var Ho=require("react");var Do=require("react/jsx-runtime"),Vi=(0,z.createContext)(null),Hi=(0,z.createContext)(null);function Dr(e){let[t,o]=(0,z.useState)({isOverflowing:!1,isAtBottom:!1});return(0,z.useEffect)(()=>{let r=e.current;if(!r)return;let n=()=>{let l=r.scrollHeight>r.clientHeight,a=r.scrollHeight-r.scrollTop<=r.clientHeight+2;o({isOverflowing:l,isAtBottom:a})};n(),r.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n);let i=new MutationObserver(n);return i.observe(r,{childList:!0,subtree:!0}),()=>{r.removeEventListener("scroll",n),window.removeEventListener("resize",n),i.disconnect()}},[e]),t}var zr=({children:e,className:t,ref:o,...r})=>{let n=(0,z.useRef)(null);(0,z.useImperativeHandle)(o,()=>n.current);let{isOverflowing:i,isAtBottom:l}=Dr(n);return(0,Do.jsx)("div",{ref:n,className:c("relative overflow-y-auto boltdocs-otp-content",i&&!l&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...r,children:e})};zr.displayName="OnThisPageContent";var zo=N(require("react-aria-components")),qe=require("lucide-react");var _=require("react/jsx-runtime"),Fr=({children:e,className:t})=>(0,_.jsx)("nav",{className:c("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),$r=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,_.jsxs)(zo.Link,{href:t,className:c("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",n?"text-right justify-end":"text-left justify-start",r),children:[!n&&(0,_.jsx)(qe.ChevronLeft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),(0,_.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&(0,_.jsx)(qe.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Wr=({children:e,className:t})=>(0,_.jsx)("span",{className:c("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),_r=({children:e,className:t})=>(0,_.jsx)("span",{className:c("text-base font-bold text-text-main truncate",t),children:e}),Gr=({children:e})=>(0,_.jsx)(_.Fragment,{children:e}),$i={PageNavRoot:Fr,PageNavLink:Object.assign($r,{Title:Wr,Description:_r,Icon:Gr})};var Ur=require("react/jsx-runtime");var jr=N(require("react-aria-components")),qr=require("lucide-react");var Fo=require("react/jsx-runtime");var ut=require("react-aria-components"),Xr=require("lucide-react");var Kr=require("react/jsx-runtime");var Wo=require("react/jsx-runtime"),$o=({children:e,className:t,vertical:o=!1})=>(0,Wo.jsx)("div",{className:c("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});var ve=require("lucide-react"),Go=N(require("react")),B=N(require("react-aria-components"));var he=N(require("react-aria-components"));var xe=require("react/jsx-runtime"),_o=({children:e,className:t,showArrow:o,...r})=>(0,xe.jsxs)(he.Popover,{offset:8,...r,className:he.composeRenderProps(t,n=>c("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",n)),children:[o&&(0,xe.jsx)(he.OverlayArrow,{className:"group",children:(0,xe.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,xe.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var M=require("react/jsx-runtime");function dt(e){let[t,o]=Go.default.Children.toArray(e.children).slice(0,2);return(0,M.jsxs)(B.MenuTrigger,{...e,children:[t,(0,M.jsx)(_o,{placement:e.placement,className:"min-w-[200px]",children:o})]})}function mt(e){return(0,M.jsx)(B.Menu,{...e,className:B.composeRenderProps(e.className,t=>c("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function Ue(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,M.jsx)(B.MenuItem,{...e,textValue:t,className:B.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:i})=>c("group relative flex flex-row items-center gap-2.5 px-3 py-1.5 rounded-lg outline-none cursor-default transition-all duration-200","text-text-main text-[0.8125rem]",r&&"bg-primary-500/10 text-primary-600 shadow-sm",n&&"scale-[0.98] bg-primary-500/15",i&&"opacity-40 grayscale pointer-events-none",o)),children:B.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:i})=>(0,M.jsxs)(M.Fragment,{children:[r!=="none"&&(0,M.jsxs)("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,M.jsx)(ve.Check,{className:"w-3.5 h-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,M.jsx)(ve.Dot,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,M.jsx)("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:o}),i&&(0,M.jsx)(ve.ChevronRight,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}var je=require("react-aria-components");var k=require("react/jsx-runtime"),Zr=e=>{let[t,o]=(0,Uo.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let i=new Blob([e],{type:"text/plain;charset=utf-8"}),l=URL.createObjectURL(i);window.open(l,"_blank")}}};function jo({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:i,handleOpenRaw:l}=Zr(r),a=o!==!1,s=typeof o=="object"&&o.text||"Copy Markdown";return!a||!r?null:(0,k.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,k.jsxs)($o,{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,k.jsx)(de,{variant:"ghost",onPress:i,icon:n?(0,k.jsx)(re.Check,{size:16}):(0,k.jsx)(re.Copy,{size:16}),iconPosition:"left",className:c("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":s}),(0,k.jsxs)(dt,{placement:"bottom end",children:[(0,k.jsx)(de,{variant:"ghost",isIconOnly:!0,icon:(0,k.jsx)(re.ChevronDown,{size:14}),className:c("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,k.jsxs)(mt,{className:"w-52",children:[(0,k.jsxs)(Ue,{onAction:i,className:"flex flex-row items-start gap-2.5 group",children:[(0,k.jsx)(re.Copy,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,k.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,k.jsxs)(Ue,{onAction:l,className:"flex flex-row items-start gap-2.5 group",children:[(0,k.jsx)(re.ExternalLink,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,k.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}var Xe=require("react"),F=require("react/jsx-runtime");function qo(){let[e,t]=(0,Xe.useState)(0);(0,Xe.useEffect)(()=>{let r=0,n=!0,i=setInterval(()=>{n?(r+=1,r>=100&&(r=100,n=!1)):(r-=1,r<=0&&(r=0,n=!0)),t(r)},20);return()=>clearInterval(i)},[]);let o=`inset(${100-e}% 0 0 0)`;return(0,F.jsx)("div",{className:"flex flex-col items-center justify-center min-h-[60vh] p-4 text-center",children:(0,F.jsx)("div",{className:"relative group",children:(0,F.jsxs)("div",{className:"relative inline-block",children:[(0,F.jsxs)("svg",{className:"w-24 h-auto opacity-10 filter grayscale brightness-50",viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[(0,F.jsx)("title",{children:"Loading indicator background"}),(0,F.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,F.jsx)("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]}),(0,F.jsxs)("svg",{className:"absolute top-0 left-0 w-24 h-auto text-primary-500 drop-shadow-[0_0_20px_rgba(var(--primary-rgb),0.5)] transition-[clip-path] duration-100 ease-linear",style:{clipPath:o},viewBox:"0 0 60 51",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-hidden":"true",children:[(0,F.jsx)("title",{children:"Loading indicator animated fill"}),(0,F.jsx)("path",{d:"M29.4449 0H19.4449V16.5L29.4449 6.5V0Z",fill:"currentColor"}),(0,F.jsx)("path",{d:"M26.9449 22.7265C26.9449 22.5077 21.2201 27.0658 16.9449 28.5C13.7491 29.5721 12.3156 29.5038 8.94486 29.5C5.59532 29.4963 0 28.5 0 28.5C0 28.5 5.57953 28.5146 8.94486 27.5C12.5409 26.4158 14.8203 25.5843 17.9449 23.5C23.3445 19.898 29.4449 11.5 29.4449 11.5L29.9449 18C29.9449 18 33.5825 15.8308 36.4449 15C39.4452 14.1291 44.4449 14 44.4449 14C44.4449 14 36.9449 19 34.4449 21.5C31.5322 24.4126 29.8582 26.9017 29.4449 31C29.1217 34.2041 29.4771 36.4508 31.4449 39C33.5792 41.765 35.952 43.0183 39.4449 43C42.677 42.9831 45.3003 42.4182 47.4449 40C49.7406 37.4113 50.2495 34.4466 49.9449 31C49.6603 27.7804 48.4876 25.4953 45.9449 23.5C43.2931 21.4191 36.4449 24 36.4449 24L47.9449 15C47.9449 15 51.5761 16.771 53.4449 18.5C55.711 20.5967 56.7467 22.1546 57.9449 25C59.1784 27.9295 59.4832 29.8216 59.4449 33C59.4089 35.9867 59.179 37.78 57.9449 40.5C56.8475 42.9185 55.8511 44.6507 53.9449 46.5C51.9236 48.4609 50.5803 49.0076 47.9449 50C45.5414 50.9051 44.0131 51 41.4449 51C38.8766 51 37.3235 50.9685 34.9449 50C32.4851 48.9985 29.4449 46 29.4449 46V51H19.4449V37.9904L22.9449 31.4226L26.9449 22.7265Z",fill:"currentColor"})]})]})})})}var G=require("react/jsx-runtime"),ye=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return(0,G.jsxs)(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&(0,G.jsx)("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:(0,G.jsx)(Xo.Link,{size:16})})]})},Ko={...ft,Loading:qo,h1:e=>(0,G.jsx)(ye,{level:1,...e}),h2:e=>(0,G.jsx)(ye,{level:2,...e}),h3:e=>(0,G.jsx)(ye,{level:3,...e}),h4:e=>(0,G.jsx)(ye,{level:4,...e}),h5:e=>(0,G.jsx)(ye,{level:5,...e}),h6:e=>(0,G.jsx)(ye,{level:6,...e}),pre:e=>(0,G.jsx)(ae,{...e,children:e.children})};var Zo=require("react-router-dom");var x=require("react/jsx-runtime");function Qr(){let{currentLocale:e,config:t}=Re();return(0,I.useEffect)(()=>{if(!t.i18n)return;let o=t.i18n.localeConfigs?.[e];document.documentElement.lang=o?.htmlLang||e||"en",document.documentElement.dir=o?.direction||"ltr"},[e,t.i18n]),null}function Yr(){let e=(0,Zo.useLocation)(),{config:t}=Re(),o=Y(l=>l.setLocale),r=Y(l=>l.setVersion),n=Y(l=>l.currentLocale),i=Y(l=>l.currentVersion);return(0,I.useEffect)(()=>{let l=e.pathname.split("/").filter(Boolean),a=0,s=t.versions?.defaultVersion,d=t.i18n?.defaultLocale;if(l[a]==="docs"&&a++,t.versions&&l.length>a){let m=t.versions.versions.find(f=>f.path===l[a]);m&&(s=m.path,a++)}t.i18n&&l.length>a&&t.i18n.locales[l[a]]?d=l[a]:t.i18n&&l.length===0&&(d=n||t.i18n.defaultLocale),d!==n&&o(d),s!==i&&r(s)},[e.pathname,t,o,r,n,i]),null}function Jo({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:i,externalPages:l,components:a={}}){let[s,d]=(0,I.useState)(e),[m,f]=(0,I.useState)(t),g=l||{},b=(0,I.useMemo)(()=>s.filter(p=>!(i&&(p.path==="/"||p.path===""))&&!g[p.path===""?"/":p.path]).map(p=>{let T=Object.keys(r).find(U=>U===`/${o}/${p.filePath}`||U.endsWith(`/${o}/${p.filePath}`)||U.endsWith(`/${o}\\${p.filePath.replace(/\\/g,"/")}`)),E=T?r[T]:null;return{...p,Component:I.default.lazy(async()=>E?await E():{default:et})}}),[s,r,o,i,g]);(0,I.useEffect)(()=>{n&&(n.on("boltdocs:routes-update",p=>{d(p)}),n.on("boltdocs:config-update",p=>{f(p)}))},[n]);let y=(0,I.useMemo)(()=>({...Ko,...a}),[a]),C=y.Loading;return(0,x.jsx)(Lt,{children:(0,x.jsx)(_t,{components:y,children:(0,x.jsx)(Ze.Provider,{value:m,children:(0,x.jsx)(It,{children:(0,x.jsxs)(ht,{routes:s,modules:r,children:[(0,x.jsx)(Ht,{}),(0,x.jsx)(Yr,{}),(0,x.jsx)(Qr,{}),(0,x.jsxs)(Z.Routes,{children:[(0,x.jsx)(Z.Route,{element:(0,x.jsx)(Ft,{}),children:b.map(p=>(0,x.jsx)(Z.Route,{path:p.path===""?"/":p.path,element:(0,x.jsx)(I.default.Suspense,{fallback:(0,x.jsx)(C,{}),children:(0,x.jsx)(jt,{Component:p.Component})})},p.path))},"docs-layout"),i&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Z.Route,{path:"/",element:(0,x.jsx)(Ce.default,{children:(0,x.jsx)(i,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(p=>(0,x.jsx)(Z.Route,{path:`/${p}`,element:(0,x.jsx)(Ce.default,{children:(0,x.jsx)(i,{})})},`home-${p}`))]}),Object.entries(g).map(([p,T])=>{let E=p==="/"?"":p;return(0,x.jsxs)(I.default.Fragment,{children:[(0,x.jsx)(Z.Route,{path:p,element:(0,x.jsx)(Ce.default,{children:(0,x.jsx)(T,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(U=>(0,x.jsx)(Z.Route,{path:`/${U}${E}`,element:(0,x.jsx)(Ce.default,{children:(0,x.jsx)(T,{})})},`${p}-${U}`))]},p)}),(0,x.jsx)(Z.Route,{path:"*",element:(0,x.jsx)(Ce.default,{children:(0,x.jsx)(et,{})})})]})]})})})})})}var Ke=require("react/jsx-runtime");async function en(e){let{path:t,routes:o,config:r,modules:n,homePage:i,externalPages:l,docsDirName:a}=e,s={};for(let[m,f]of Object.entries(n))s[m]=()=>Promise.resolve(f);return Yo.default.renderToString((0,Ke.jsx)(Qo.default.StrictMode,{children:(0,Ke.jsx)(er.StaticRouter,{location:t,children:(0,Ke.jsx)(Jo,{initialRoutes:o,initialConfig:r,docsDirName:a,modules:s,homePage:i,externalPages:l})})}))}0&&(module.exports={render});
|