boltdocs 2.4.1 → 2.5.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.
Files changed (113) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cache-3FOEPC2P.mjs +1 -0
  3. package/dist/chunk-ITFGVXPE.mjs +1 -0
  4. package/dist/chunk-TP5KMRD3.mjs +1 -0
  5. package/dist/chunk-UD2LQG2M.mjs +75 -0
  6. package/dist/chunk-Y4RE5KI7.mjs +1 -0
  7. package/dist/client/index.d.mts +1225 -14
  8. package/dist/client/index.d.ts +1225 -14
  9. package/dist/client/index.js +1 -1
  10. package/dist/client/index.mjs +1 -1
  11. package/dist/client/ssr.js +1 -1
  12. package/dist/client/ssr.mjs +1 -1
  13. package/dist/node/cli-entry.js +37 -35
  14. package/dist/node/cli-entry.mjs +1 -1
  15. package/dist/node/index.d.mts +263 -1
  16. package/dist/node/index.d.ts +263 -1
  17. package/dist/node/index.js +34 -32
  18. package/dist/node/index.mjs +1 -1
  19. package/dist/package-TWC3BMZ7.mjs +1 -0
  20. package/dist/search-dialog-YBM4GYDR.mjs +1 -0
  21. package/package.json +46 -76
  22. package/src/client/components/primitives/breadcrumbs.tsx +10 -10
  23. package/src/client/components/primitives/index.ts +17 -16
  24. package/src/client/components/primitives/menu.tsx +11 -14
  25. package/src/client/components/primitives/navbar.tsx +29 -29
  26. package/src/client/components/primitives/navigation-menu.tsx +7 -9
  27. package/src/client/components/primitives/on-this-page.tsx +16 -18
  28. package/src/client/components/primitives/page-nav.tsx +10 -13
  29. package/src/client/components/primitives/search-dialog.tsx +17 -19
  30. package/src/client/components/primitives/sidebar.tsx +8 -10
  31. package/src/client/components/primitives/tabs.tsx +10 -12
  32. package/src/client/components/primitives/tooltip.tsx +3 -5
  33. package/src/client/components/ui-base/breadcrumbs.tsx +12 -15
  34. package/src/client/components/ui-base/copy-markdown.tsx +8 -10
  35. package/src/client/components/ui-base/navbar.tsx +10 -10
  36. package/src/client/components/ui-base/on-this-page.tsx +13 -12
  37. package/src/client/components/ui-base/page-nav.tsx +15 -15
  38. package/src/client/components/ui-base/search-dialog.tsx +13 -20
  39. package/src/client/components/ui-base/sidebar.tsx +9 -9
  40. package/src/client/components/ui-base/tabs.tsx +6 -7
  41. package/src/client/components/ui-base/theme-toggle.tsx +11 -11
  42. package/src/client/hooks/index.ts +12 -12
  43. package/src/client/index.ts +34 -11
  44. package/src/node/config.ts +48 -6
  45. package/src/node/errors.ts +44 -0
  46. package/src/node/index.ts +29 -2
  47. package/src/node/mdx/index.ts +9 -2
  48. package/src/node/plugin/index.ts +72 -4
  49. package/src/node/plugins/index.ts +17 -0
  50. package/src/node/plugins/plugin-errors.ts +62 -0
  51. package/src/node/plugins/plugin-lifecycle.ts +117 -0
  52. package/src/node/plugins/plugin-sandbox.ts +59 -0
  53. package/src/node/plugins/plugin-store.ts +54 -0
  54. package/src/node/plugins/plugin-types.ts +107 -0
  55. package/src/node/plugins/plugin-validator.ts +105 -0
  56. package/src/node/routes/parser.ts +35 -5
  57. package/src/node/schema/config.ts +208 -0
  58. package/src/node/schema/frontmatter.ts +17 -0
  59. package/src/node/security/constants/index.ts +10 -0
  60. package/src/node/security/csp.ts +31 -0
  61. package/src/node/security/headers.ts +27 -0
  62. package/src/node/utils.ts +153 -5
  63. package/tsup.config.ts +0 -6
  64. package/dist/base-ui/index.d.mts +0 -25
  65. package/dist/base-ui/index.d.ts +0 -25
  66. package/dist/base-ui/index.js +0 -1
  67. package/dist/base-ui/index.mjs +0 -1
  68. package/dist/cache-P6WK424C.mjs +0 -1
  69. package/dist/chunk-2DI3OGHV.mjs +0 -1
  70. package/dist/chunk-2Z5T6EAU.mjs +0 -1
  71. package/dist/chunk-64AJ5QLT.mjs +0 -1
  72. package/dist/chunk-DDX52BX4.mjs +0 -1
  73. package/dist/chunk-HRZDSFR5.mjs +0 -1
  74. package/dist/chunk-JD3RSDE4.mjs +0 -1
  75. package/dist/chunk-JZXLCA2E.mjs +0 -1
  76. package/dist/chunk-NBCYHLAA.mjs +0 -1
  77. package/dist/chunk-PPVDMDEL.mjs +0 -1
  78. package/dist/chunk-T3W44KWY.mjs +0 -1
  79. package/dist/chunk-UBE4CKOA.mjs +0 -1
  80. package/dist/chunk-UWT4AJTH.mjs +0 -73
  81. package/dist/chunk-WWJ7WKDI.mjs +0 -1
  82. package/dist/chunk-Y4RRHPXC.mjs +0 -1
  83. package/dist/client/types.d.mts +0 -3
  84. package/dist/client/types.d.ts +0 -3
  85. package/dist/client/types.js +0 -1
  86. package/dist/client/types.mjs +0 -0
  87. package/dist/copy-markdown--9yjpbyy.d.mts +0 -15
  88. package/dist/copy-markdown-l2MYkcG7.d.ts +0 -15
  89. package/dist/hooks/index.d.mts +0 -137
  90. package/dist/hooks/index.d.ts +0 -137
  91. package/dist/hooks/index.js +0 -1
  92. package/dist/hooks/index.mjs +0 -1
  93. package/dist/integrations/index.d.mts +0 -48
  94. package/dist/integrations/index.d.ts +0 -48
  95. package/dist/integrations/index.js +0 -1
  96. package/dist/integrations/index.mjs +0 -1
  97. package/dist/link-DfBwCeZc.d.mts +0 -68
  98. package/dist/link-DfBwCeZc.d.ts +0 -68
  99. package/dist/loading-BwUos0wZ.d.mts +0 -57
  100. package/dist/loading-nlnUD01v.d.ts +0 -57
  101. package/dist/mdx/index.d.mts +0 -178
  102. package/dist/mdx/index.d.ts +0 -178
  103. package/dist/mdx/index.js +0 -1
  104. package/dist/mdx/index.mjs +0 -1
  105. package/dist/primitives/index.d.mts +0 -292
  106. package/dist/primitives/index.d.ts +0 -292
  107. package/dist/primitives/index.js +0 -1
  108. package/dist/primitives/index.mjs +0 -1
  109. package/dist/search-dialog-OONKKC5H.mjs +0 -1
  110. package/dist/types-opDA2E9-.d.mts +0 -394
  111. package/dist/types-opDA2E9-.d.ts +0 -394
  112. package/dist/use-routes-DNwgTRpU.d.ts +0 -29
  113. package/dist/use-routes-DrT80Eom.d.mts +0 -29
@@ -1 +1 @@
1
- import{a as Z}from"../chunk-DDX52BX4.mjs";import{a as H,b as O,f as I,h as V,i as U,j as W,k as q,l as z,m as X}from"../chunk-PPVDMDEL.mjs";import{a as $}from"../chunk-HRZDSFR5.mjs";import{a as yo,b as A,c as Lo,d as Ro,e as ho,f as Po,g as vo,h as To,i as Mo,j as bo,k as Bo,l as Ho,m as wo,n as So,o as Eo,p as ko,q as No,r as Do,s as Ao,t as Fo,u as Oo,v as $o,w as Io,x as Vo,y as Q}from"../chunk-2DI3OGHV.mjs";import{a as F}from"../chunk-64AJ5QLT.mjs";import{a as J,b as uo}from"../chunk-JD3RSDE4.mjs";import{a as Co,b as xo,c as go}from"../chunk-T3W44KWY.mjs";import"../chunk-2Z5T6EAU.mjs";import{a as x}from"../chunk-WWJ7WKDI.mjs";import{a as _,b as D,d as G,e as T,f as R}from"../chunk-NBCYHLAA.mjs";import"../chunk-JZXLCA2E.mjs";import S,{useEffect as K,useState as mo,useMemo as co}from"react";import te from"react-dom/client";import{BrowserRouter as ne,Routes as re,Route as g}from"react-router-dom";import po from"virtual:boltdocs-layout";import{startTransition as Uo}from"react";import{RouterProvider as Wo}from"react-aria-components";import{useNavigate as qo,useHref as zo}from"react-router-dom";import{jsx as Xo}from"react/jsx-runtime";function j({children:o}){let e=qo();return Xo(Wo,{navigate:(t,s)=>{Uo(()=>{e(t,s)})},useHref:zo,children:o})}import{useLayoutEffect as Ko}from"react";import{useLocation as Yo}from"react-router-dom";function oo(){let{pathname:o,hash:e}=Yo();return Ko(()=>{let t=document.querySelector(".boltdocs-content")||window,s=()=>t===window?window.scrollY:t.scrollTop,i=(m,n="auto")=>{t===window?window.scrollTo({top:m,behavior:n}):t.scrollTo({top:m,behavior:n})};if(e){let m=e.replace("#",""),n=document.getElementById(m);if(n){let d=t===window?0:t.getBoundingClientRect().top,l=n.getBoundingClientRect().top-d-80+s();i(l,"smooth");return}}i(0)},[o,e]),null}import{Outlet as _o}from"react-router-dom";import Go from"virtual:boltdocs-layout";import{jsx as eo}from"react/jsx-runtime";function to(){return eo(Go,{children:eo(_o,{})})}import{MDXProvider as jo}from"@mdx-js/react";import{createContext as Jo,use as Qo}from"react";import{jsx as Zo}from"react/jsx-runtime";var no=Jo({});function M(){return Qo(no)}function ro({components:o,children:e}){return Zo(no.Provider,{value:o,children:e})}import{jsx as ao}from"react/jsx-runtime";function so({Component:o}){let e=M();return ao(jo,{components:e,children:ao(o,{})})}import{Link as oe}from"lucide-react";import{jsx as f,jsxs as ee}from"react/jsx-runtime";var h=({level:o,id:e,children:t,...s})=>{let i=`h${o}`;return ee(i,{id:e,...s,className:"boltdocs-heading",children:[t,e&&f("a",{href:`#${e}`,className:"header-anchor","aria-label":"Anchor",children:f(oe,{size:16})})]})},io={...Q,Loading:O,h1:o=>f(h,{level:1,...o}),h2:o=>f(h,{level:2,...o}),h3:o=>f(h,{level:3,...o}),h4:o=>f(h,{level:4,...o}),h5:o=>f(h,{level:5,...o}),h6:o=>f(h,{level:6,...o}),pre:o=>f(A,{...o,children:o.children})};import ae from"virtual:boltdocs-mdx-components";import{useLocation as se}from"react-router-dom";import{Fragment as le,jsx as r,jsxs as w}from"react/jsx-runtime";function ie(){let{currentLocale:o,config:e}=R();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 me(){let o=se(),{config:e}=R(),t=T(n=>n.setLocale),s=T(n=>n.setVersion),i=T(n=>n.currentLocale),m=T(n=>n.currentVersion);return K(()=>{let n=o.pathname.split("/").filter(Boolean),p=0,d=e.versions?.defaultVersion,c=e.i18n?.defaultLocale;if(n[p]==="docs"&&p++,e.versions&&n.length>p){let y=e.versions.versions.find(l=>l.path===n[p]);y&&(d=y.path,p++)}e.i18n&&n.length>p&&e.i18n.locales[n[p]]?c=n[p]:e.i18n&&n.length===0&&(c=i||e.i18n.defaultLocale),c!==i&&t(c),d!==m&&s(d)},[o.pathname,e,t,s,i,m]),null}function ce({initialRoutes:o,initialConfig:e,docsDirName:t,modules:s,hot:i,homePage:m,externalPages:n,externalLayout:p,components:d={}}){let[c,y]=mo(o),[l,k]=mo(e),N=n||{},b=p||po,lo=co(()=>c.filter(a=>!(m&&(a.path==="/"||a.path===""))&&!N[a.path===""?"/":a.path]).map(a=>{let v=Object.keys(s).find(C=>C===`/${t}/${a.filePath}`||C.endsWith(`/${t}/${a.filePath}`)||C.endsWith(`/${t}\\${a.filePath.replace(/\\/g,"/")}`)),B=v?s[v]:null;return{...a,Component:S.lazy(async()=>B?await B():{default:H})}}),[c,s,t,m,N]);K(()=>{i&&(i.on("boltdocs:routes-update",a=>{y(a)}),i.on("boltdocs:config-update",a=>{k(a)}))},[i]);let Y=co(()=>({...io,...ae,...d}),[d]),fo=Y.Loading;return r(J,{children:r(ro,{components:Y,children:r(_.Provider,{value:l,children:r(j,{children:w(G,{routes:c,modules:s,children:[r(oo,{}),r(me,{}),r(ie,{}),w(re,{children:[r(g,{element:r(to,{}),children:lo.map(a=>r(g,{path:a.path===""?"/":a.path,element:r(S.Suspense,{fallback:r(fo,{}),children:r(so,{Component:a.Component})})},a.path))},"docs-layout"),m&&w(le,{children:[r(g,{path:"/",element:r(b,{children:r(m,{})})}),l.i18n&&Object.keys(l.i18n.locales).map(a=>r(g,{path:`/${a}`,element:r(b,{children:r(m,{})})},`home-${a}`))]}),Object.entries(N).map(([a,v])=>{let B=a==="/"?"":a;return w(S.Fragment,{children:[r(g,{path:a,element:r(b,{children:r(v,{})})}),l.i18n&&Object.keys(l.i18n.locales).map(C=>r(g,{path:`/${C}${B}`,element:r(b,{children:r(v,{})})},`${a}-${C}`))]},a)}),r(g,{path:"*",element:r(po,{children:r(H,{})})})]})]})})})})})}function pe(o){let{target:e,routes:t,docsDirName:s,config:i,modules:m,hot:n,homePage:p,externalPages:d,externalLayout:c,components:y}=o,l=document.querySelector(e);if(!l)throw new Error(`[boltdocs] Mount target "${e}" not found in document.`);let k=r(S.StrictMode,{children:r(ne,{children:r(ce,{initialRoutes:t,initialConfig:i,docsDirName:s,modules:m,hot:n,homePage:p,externalPages:d,externalLayout:c,components:y})})});l.innerHTML="",te.createRoot(l).render(k)}import{jsx as P}from"react/jsx-runtime";function de({children:o,className:e,style:t}){return P("div",{className:x("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",e),style:t,children:o})}function fe({children:o,className:e,style:t}){return P("div",{className:x("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",e),style:t,children:o})}function ue({children:o,className:e,style:t}){return P("main",{className:x("boltdocs-content flex-1 min-w-0 overflow-y-auto","contain-layout",e),style:t,children:o})}function ye({children:o,className:e,style:t}){let{pathname:s}=Z();return P("div",{className:x("boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8",{"max-w-content-max":s.includes("/docs/")},e),style:t,children:o})}function Ce({children:o,className:e,style:t}){return P("div",{className:x("flex items-center justify-between mb-10",e),style:t,children:o})}function xe({children:o,className:e,style:t}){return P("div",{className:x("mt-20",e),style:t,children:o})}var L=Object.assign(de,{Body:fe,Content:ue,ContentMdx:ye,ContentHeader:Ce,ContentFooter:xe});import{useLocation as ge}from"react-router-dom";import{jsx as u,jsxs as E}from"react/jsx-runtime";function Le({children:o}){let{routes:e,allRoutes:t,currentRoute:s,currentLocale:i}=R(),{pathname:m}=ge(),n=D(),d=M().CopyMarkdown||F,c=m==="/"||m==="";return E(L,{children:[u(W,{siteTitle:$(n.theme?.title,i)||"Boltdocs",siteDescription:$(n.theme?.description,i)||"",routes:t}),u(I,{}),E(L.Body,{children:[!c&&u(V,{routes:e,config:n}),E(L.Content,{children:[!c&&E(L.ContentHeader,{children:[u(q,{}),u(d,{mdxRaw:s?._rawContent,route:s,config:n.theme?.copyMarkdown})]}),u(X,{children:o}),!c&&u(L.ContentFooter,{children:u(z,{})})]}),!c&&u(U,{headings:s?.headings,editLink:n.theme?.editLink,communityHelp:n.theme?.communityHelp,filePath:s?.filePath})]})]})}export{Mo as Admonition,Po as Badge,q as Breadcrumbs,yo as Button,To as Card,vo as Cards,ko as Caution,A as CodeBlock,Vo as ComponentPreview,Io as ComponentProps,F as CopyMarkdown,wo as Danger,Le as DefaultLayout,L as DocsLayout,X as ErrorBoundary,Fo as Field,Do as FileTree,W as Head,$o as Image,Eo as Important,So as InfoBox,Oo as Link,No as List,O as Loading,I as Navbar,H as NotFound,bo as Note,U as OnThisPage,z as PageNav,V as Sidebar,Lo as Tab,Ao as Table,Ro as Tabs,Bo as Tip,ho as Video,Ho as Warning,pe as createBoltdocsApp,Co as defineSandbox,go as embedSandbox,xo as openSandbox,D as useConfig,M as useMdxComponents,R as useRoutes,uo as useTheme};
1
+ import{A as dr,B as pr,C as ur,D as Je,E as fr,F as Ye,G as Ze,H as j,I as W,J as We,K as ne,L as X,M as Qe,N as gr,O as C,P as T,Q as br,a as lr,b as to,c as B,d as oo,e as F,f as R,g as Ke,h as u,i as re,j as cr,k as ro,l as V,m as no,n as so,o as He,p as Oe,q as De,r as $e,s as ze,t as fe,u as ge,v as be,w as he,x as Fe,y as mr,z as E}from"../chunk-ITFGVXPE.mjs";import je,{useEffect as Ht,useState as _o,useMemo as Go}from"react";import ts from"react-dom/client";import{BrowserRouter as os,Routes as rs,Route as le}from"react-router-dom";import{ArrowLeft as hr}from"lucide-react";import{jsx as Ne,jsxs as ao}from"react/jsx-runtime";function _e(){return Ne("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:ao("div",{className:"space-y-4",children:[Ne("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),Ne("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),Ne("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."}),ao(re,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[Ne(hr,{size:16})," Go to Home"]})]})})}import{createContext as xr,use as vr,useEffect as io,useState as et}from"react";import{jsx as yr}from"react/jsx-runtime";var lo=xr(void 0);function co({children:e}){let[t,o]=et("system"),[r,n]=et("dark"),[a,s]=et(!1);io(()=>{s(!0);let i=localStorage.getItem("boltdocs-theme"),d=i==="light"||i==="dark"||i==="system"?i:"system";o(d);let c=window.matchMedia("(prefers-color-scheme: dark)");((g,b)=>{n(g==="system"?b?"dark":"light":g)})(d,c.matches);let p=g=>{n(b=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?g.matches?"dark":"light":b)};return c.addEventListener("change",p),()=>c.removeEventListener("change",p)},[]),io(()=>{if(!a)return;let i=window.matchMedia("(prefers-color-scheme: dark)").matches,d=t==="system"?i?"dark":"light":t;n(d);let c=document.documentElement;d==="light"?(c.classList.add("theme-light"),c.dataset.theme="light"):(c.classList.remove("theme-light"),c.dataset.theme="dark")},[t,a]);let l=i=>{o(i),localStorage.setItem("boltdocs-theme",i)};return yr(lo.Provider,{value:{theme:t,resolvedTheme:r,setTheme:l},children:e})}function se(){let e=vr(lo);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}import Uo from"virtual:boltdocs-layout";import{startTransition as Cr}from"react";import{RouterProvider as Rr}from"react-aria-components";import{useNavigate as Pr,useHref as Nr}from"react-router-dom";import{jsx as Tr}from"react/jsx-runtime";function mo({children:e}){let t=Pr();return Tr(Rr,{navigate:(o,r)=>{Cr(()=>{t(o,r)})},useHref:Nr,children:e})}import{useLayoutEffect as Lr}from"react";import{useLocation as wr}from"react-router-dom";function po(){let{pathname:e,hash:t}=wr();return Lr(()=>{let o=document.querySelector(".boltdocs-content")||window,r=()=>o===window?window.scrollY:o.scrollTop,n=(a,s="auto")=>{o===window?window.scrollTo({top:a,behavior:s}):o.scrollTo({top:a,behavior:s})};if(t){let a=t.replace("#",""),s=document.getElementById(a);if(s){let i=o===window?0:o.getBoundingClientRect().top,m=s.getBoundingClientRect().top-i-80+r();n(m,"smooth");return}}n(0)},[e,t]),null}import{Outlet as kr}from"react-router-dom";import Sr from"virtual:boltdocs-layout";import{jsx as uo}from"react/jsx-runtime";function fo(){return uo(Sr,{children:uo(kr,{})})}import{MDXProvider as Er}from"@mdx-js/react";import{createContext as Mr,use as Ir}from"react";import{jsx as Br}from"react/jsx-runtime";var go=Mr({});function Te(){return Ir(go)}function bo({components:e,children:t}){return Br(go.Provider,{value:e,children:t})}import{jsx as ho}from"react/jsx-runtime";function xo({Component:e}){let t=Te();return ho(Er,{components:t,children:ho(e,{})})}import{Link as Qn}from"lucide-react";var At={};lr(At,{Admonition:()=>D,Badge:()=>lt,Button:()=>tt,Card:()=>mt,Cards:()=>ct,Caution:()=>ht,CodeBlock:()=>_,ComponentPreview:()=>Et,ComponentProps:()=>It,CopyMarkdown:()=>Ie,Danger:()=>ft,Field:()=>kt,FileTree:()=>Lt,Image:()=>Mt,Important:()=>bt,InfoBox:()=>gt,Link:()=>St,List:()=>vt,Note:()=>dt,Tab:()=>st,Table:()=>wt,Tabs:()=>at,Tip:()=>pt,Video:()=>it,Warning:()=>ut});import{jsx as Ar}from"react/jsx-runtime";var tt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:a,...s})=>Ar(V,{className:u("group",ro({variant:t,size:o,rounded:r,iconSize:n,disabled:a,className:e})),...s});import*as Ge from"react-aria-components";import{Copy as Dr,Check as $r,File as zr}from"lucide-react";import{getParameters as vo}from"codesandbox/lib/api/define.js";function yo(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",a=e.description||"Generic Sandbox",s={};for(let[l,i]of Object.entries(t)){let d=typeof i.content=="object"?JSON.stringify(i.content,null,2):i.content;s[l]={content:d,isBinary:i.isBinary??!1}}if(!s["package.json"]){let i=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};s["package.json"]={content:JSON.stringify({private:!0,name:n,description:a,type:"module",version:"1.0.0",scripts:e.scripts||i,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return s}function Vr(e){let t=yo(e),o=vo({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 Co(e){if(typeof window>"u")return Vr(e);let t=yo(e),o=vo({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 a=(l,i)=>{let d=document.createElement("input");d.type="hidden",d.name=l,d.value=i,n.appendChild(d)},s=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return a("query",s.toString()),a("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 Ro=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}};import{useCallback as Po,useEffect as Hr,useRef as Or,useState as ot}from"react";function No(e){let{title:t,sandbox:o}=e,[r,n]=ot(!1),[a,s]=ot(!1),[l,i]=ot(!1),d=Or(null),c=B(),m=Po(async()=>{let g=d.current?.textContent??"";Ro(g),n(!0),setTimeout(()=>n(!1),2e3)},[]),p=Po(()=>{let g=d.current?.textContent??"",b=c?.integrations?.sandbox?.config||{},f=typeof o=="object"?o:b,x=f.entry||"src/App.tsx";Co({title:t??"Code Snippet",...f,files:{...f.files,[x]:{content:g}}})},[t,c,o]);return Hr(()=>{let g=d.current?.textContent?.length??0;i(g>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:a,setIsExpanded:s,isExpandable:l,preRef:d,handleCopy:m,handleSandbox:p,shouldTruncate:l&&!a}}import{jsx as I,jsxs as rt}from"react/jsx-runtime";var Fr={ts:He,tsx:fe,js:Oe,jsx:fe,json:De,css:$e,html:ze,md:ge,mdx:ge,bash:be,sh:be,yaml:he,yml:he};function _(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:a,title:s,"data-lang":l,plain:i=!1,...d}=e,p=!!B()?.integrations?.sandbox?.enable&&!r,g=e.lang||l||"",{copied:b,isExpanded:f,setIsExpanded:x,isExpandable:P,preRef:h,handleCopy:H,handleSandbox:O,shouldTruncate:M}=No(e),ue=Fr[g];return rt("div",{className:u("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!i,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":M},e.className),children:[s&&rt("div",{className:"flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted",children:[ue?I(ue,{size:14}):I(zr,{size:14,className:"opacity-60"}),I("span",{children:s})]}),rt("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:[p&&I(Fe,{content:"Open in CodeSandbox",children:I(Ge.Button,{onPress:O,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:I(so,{size:20})})}),!n&&I(Fe,{content:b?"Copied!":"Copy code",children:I(Ge.Button,{onPress:H,className:u("grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2",b?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:b?I($r,{size:20}):I(Dr,{size:20})})})]}),a?I("div",{ref:h,className:"shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!",dangerouslySetInnerHTML:{__html:a}}):I("pre",{ref:h,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...d,children:t}),P&&I("div",{className:u(M?"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:I(Ge.Button,{onPress:()=>x(!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"})})]})}import{Children as Ur,isValidElement as qr,useMemo as jr}from"react";import*as J from"react-aria-components";import{useState as To,useRef as Wr,useEffect as _r,useCallback as Gr}from"react";function Lo({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[r,n]=To(o===-1?0:o),a=Wr([]),[s,l]=To({opacity:0,transform:"translateX(0)",width:0});_r(()=>{let d=a.current[r];d&&l({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[r,t]);let i=Gr(d=>{let c=0;if(d.key==="ArrowRight"?c=1:d.key==="ArrowLeft"&&(c=-1),c!==0){let m=(r+c+t.length)%t.length;for(;t[m].props.disabled&&m!==r;)m=(m+c+t.length)%t.length;m!==r&&!t[m].props.disabled&&(n(m),a.current[m]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:a,indicatorStyle:s,handleKeyDown:i}}import{cva as wo}from"class-variance-authority";import{jsx as K,jsxs as nt}from"react/jsx-runtime";var Xr=wo("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"}}),Kr=wo("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 st({children:e}){let t=typeof e=="string"?K(_,{className:"language-bash",children:K("code",{children:e.trim()})}):e;return K("div",{className:"py-4",children:t})}function at({defaultIndex:e=0,children:t}){let o=jr(()=>Ur.toArray(t).filter(l=>qr(l)&&l.props?.label),[t]),{active:r,setActive:n,tabRefs:a,indicatorStyle:s}=Lo({initialIndex:e,tabs:o});return K("div",{className:"my-8 w-full group/tabs",children:nt(J.Tabs,{selectedKey:r.toString(),onSelectionChange:l=>n(Number(l)),className:"w-full",children:[nt(J.TabList,{"aria-label":"Content Tabs",className:u(Xr()),children:[o.map((l,i)=>{let{label:d,icon:c,disabled:m}=l.props,p=i.toString();return nt(J.Tab,{id:p,isDisabled:m,ref:g=>{a.current[i]=g},className:({isSelected:g,isDisabled:b})=>u(Kr({isActive:g,isDisabled:b})),children:[!!c&&K("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:c}),K("span",{children:d})]},p)}),K("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:s,"aria-hidden":"true"})]}),o.map((l,i)=>K(J.TabPanel,{id:i.toString(),children:o[i]},i))]})})}import{useRef as Jr,useState as Yr,useEffect as Zr}from"react";import{jsx as ko,jsxs as Qr}from"react/jsx-runtime";function it({src:e,poster:t,alt:o,children:r,controls:n,preload:a="metadata",...s}){let l=Jr(null),[i,d]=Yr(!1);return Zr(()=>{let c=l.current;if(!c)return;let m=new IntersectionObserver(([p])=>{p.isIntersecting&&(d(!0),m.disconnect())},{rootMargin:"200px"});return m.observe(c),()=>m.disconnect()},[]),ko("div",{ref:l,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:i?Qr("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...s,children:[r,"Your browser does not support the video tag."]}):ko("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}import{cva as en}from"class-variance-authority";import{jsx as on}from"react/jsx-runtime";var tn=en("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 lt({variant:e="default",children:t,className:o="",...r}){return on("span",{className:u(tn({variant:e}),o),...r,children:t})}import{useCallback as rn,useRef as So}from"react";import*as Io from"react-aria-components";import{cva as nn}from"class-variance-authority";import{Fragment as an,jsx as ae,jsxs as Mo}from"react/jsx-runtime";var sn=nn("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 ct({cols:e=3,children:t,className:o="",...r}){return ae("div",{className:u(sn({cols:e}),o),...r,children:t})}function mt({title:e,icon:t,href:o,children:r,className:n="",...a}){let s=So(null),l=So(null),i=rn(m=>{let p=s.current||l.current;if(!p)return;let{left:g,top:b}=p.getBoundingClientRect();p.style.setProperty("--x",`${m.clientX-g}px`),p.style.setProperty("--y",`${m.clientY-b}px`)},[]),d=Mo(an,{children:[ae("div",{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)"}}),t&&ae("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3",children:t}),Mo("div",{className:"space-y-1.5",children:[e&&ae("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&ae("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),c=u("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return o?ae(Io.Link,{ref:l,href:o,className:u(c,"no-underline cursor-pointer"),onMouseMove:i,...a,children:d}):ae("div",{ref:s,role:"presentation",className:c,onMouseMove:i,...a,children:d})}import{Info as ln,Lightbulb as cn,AlertTriangle as mn,ShieldAlert as dn,Bookmark as pn,Zap as un,Flame as fn}from"lucide-react";import{cva as gn}from"class-variance-authority";import{jsx as L,jsxs as Eo}from"react/jsx-runtime";var bn={note:L(pn,{size:18}),tip:L(cn,{size:18}),info:L(ln,{size:18}),warning:L(mn,{size:18}),danger:L(dn,{size:18}),important:L(fn,{size:18}),caution:L(un,{size:18})},hn={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},Bo=gn("py-4 px-4 rounded-lg",{variants:{type:{note:"border-primary-400 bg-primary-500/5 text-primary-400",tip:"border-emerald-500 bg-emerald-500/5 text-emerald-500",info:"border-sky-500 bg-sky-500/5 text-sky-500",warning:"border-amber-500 bg-amber-500/5 text-amber-500",danger:"border-red-500 bg-red-500/5 text-red-500",important:"border-orange-500 bg-orange-500/5 text-orange-500",caution:"border-yellow-500 bg-yellow-500/5 text-yellow-500"}},defaultVariants:{type:"note"}});function D({type:e="note",title:t,children:o,className:r="",...n}){return Eo("div",{className:u(Bo({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[Eo("div",{className:"flex items-center flex-row gap-2 mb-2",children:[L("span",{className:u("shrink-0",Bo({type:e})),children:bn[e]}),L("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||hn[e]})]}),L("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var dt=e=>L(D,{type:"note",...e}),pt=e=>L(D,{type:"tip",...e}),ut=e=>L(D,{type:"warning",...e}),ft=e=>L(D,{type:"danger",...e}),gt=e=>L(D,{type:"info",...e}),bt=e=>L(D,{type:"important",...e}),ht=e=>L(D,{type:"caution",...e});import{Children as xn,isValidElement as vn}from"react";import{Check as yn,ChevronRight as Cn,Circle as Rn}from"lucide-react";import{cva as xt}from"class-variance-authority";import{jsx as Y,jsxs as kn}from"react/jsx-runtime";var Pn=xt("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}}),Nn=xt("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}}),Tn=xt("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 Ln({icon:e,children:t,variant:o,dense:r}){return kn("li",{className:u(Nn({variant:o,dense:r})),children:[e&&Y("span",{className:u(Tn({variant:o==="bubble"?"bubble":"default"})),children:e}),Y("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var wn={checked:e=>Y(yn,{size:14,className:u("text-emerald-500 shrink-0",e)}),arrow:e=>Y(Cn,{size:14,className:u("text-primary-400 shrink-0",e)}),bubble:e=>Y(Rn,{size:6,fill:"currentColor",className:u("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function vt({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...a}){let s=t!==void 0&&Number(t)>1,l=wn[e],i=Pn({variant:e,cols:t,dense:o,isGrid:s,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?Y(d,{className:i,...a,children:r}):Y("ul",{className:i,...a,children:xn.map(r,c=>{if(!vn(c))return c;let m=c,p=m.type==="li"?m.props.children:m.props.children||c;return Y(Ln,{icon:l(),variant:e,dense:o,children:p})})})}import{Children as yt,isValidElement as Tt,useMemo as Sn}from"react";import*as $ from"react-aria-components";import{Folder as Mn,FileText as In,File as Bn,FileCode as En,FileImage as An,ChevronRight as Vn}from"lucide-react";import{jsx as w,jsxs as Pt}from"react/jsx-runtime";var xe=16,Le=2,Hn={ts:He,tsx:fe,js:Oe,jsx:fe,json:De,css:$e,html:ze,md:ge,mdx:ge,bash:be,sh:be,yaml:he,yml:he},Ct={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 Nt(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(Nt).join(""):Tt(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?Nt(e.props.children):""}function On(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return w(Mn,{size:xe,strokeWidth:Le,className:u(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=o.split(".").pop()||"",a=Hn[n];if(a)return w(a,{size:xe});let s=u(r,"text-text-dim group-hover:text-text-main");return Ct.CODE.test(o)?w(En,{size:xe,strokeWidth:Le,className:s}):Ct.TEXT.test(o)?w(In,{size:xe,strokeWidth:Le,className:s}):Ct.IMAGE.test(o)?w(An,{size:xe,strokeWidth:Le,className:s}):w(Bn,{size:xe,strokeWidth:Le,className:s})}function Rt(e,t){if(!Tt(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 Dn(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Ue(e,t="root"){if(!Tt(e))return[];let o=[];if(Rt(e,"ul"))return yt.forEach(e.props.children,(r,n)=>{o.push(...Ue(r,`${t}-${n}`))}),o;if(Rt(e,"li")){let r=yt.toArray(e.props.children),n=r.findIndex(b=>Rt(b,"ul")),a=n!==-1,s=a?r.slice(0,n):r,l=a?r.slice(n):[],i=Nt(s),{name:d,comment:c}=Dn(i),m=d.endsWith("/"),p=m?d.slice(0,-1):d,g=a||m;return o.push({id:`${t}-${p}`,name:p,comment:c,isFolder:g,children:a?Ue(l[0],`${t}-${p}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&yt.forEach(e.props.children,(r,n)=>{o.push(...Ue(r,`${t}-${n}`))}),o}function Ao({item:e}){return Pt($.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[w($.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>Pt("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[w("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?w($.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:w(Vn,{size:14,strokeWidth:3,className:u("transition-transform duration-200",t&&"rotate-90")})}):w("div",{className:"w-[18px]"}),On(e.name,e.isFolder),w("span",{className:u("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&Pt("span",{className:"ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans",children:["//"," ",e.comment]})]})}),e.children&&w($.Collection,{items:e.children,children:t=>w(Ao,{item:t})})]})}function Lt({children:e}){let t=Sn(()=>Ue(e),[e]);return w("div",{className:"my-8",children:w($.Tree,{items:t,"aria-label":"File Tree",className:u("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:o=>w(Ao,{item:o})})})}import*as we from"react-aria-components";import{useState as Vo,useMemo as Ho}from"react";function Oo({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,a]=Vo(null),[s,l]=Vo(1),i=Ho(()=>{if(!e)return[];let p=[...e];return t&&n!==null&&p.sort((g,b)=>{let f=g[n.key],x=b[n.key],P=typeof f=="string"?f:"",h=typeof x=="string"?x:"";return P<h?n.direction==="asc"?-1:1:P>h?n.direction==="asc"?1:-1:0}),p},[e,n,t]),d=Math.ceil(i.length/r),c=Ho(()=>{if(!o)return i;let p=(s-1)*r;return i.slice(p,p+r)},[i,o,s,r]);return{sortConfig:n,currentPage:s,setCurrentPage:l,totalPages:d,paginatedData:c,requestSort:p=>{if(!t)return;let g="asc";n&&n.key===p&&n.direction==="asc"&&(g="desc"),a({key:p,direction:g})}}}import{ChevronUp as $n,ChevronDown as Do,ChevronLeft as zn,ChevronRight as Fn,ChevronsLeft as Wn,ChevronsRight as _n}from"lucide-react";import{Fragment as Gn,jsx as N,jsxs as ve}from"react/jsx-runtime";function wt({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:a=!1,pageSize:s=10}){let{sortConfig:l,currentPage:i,setCurrentPage:d,totalPages:c,paginatedData:m,requestSort:p}=Oo({data:t,sortable:n,paginated:a,pageSize:s}),g=f=>n?l?.key!==f?N(Do,{size:14,className:"ml-1 opacity-30"}):l.direction==="asc"?N($n,{size:14,className:"ml-1 text-primary-400"}):N(Do,{size:14,className:"ml-1 text-primary-400"}):null,b=o||ve(Gn,{children:[e&&N("thead",{children:N("tr",{children:e.map((f,x)=>N("th",{onClick:()=>p(x),className:u("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:ve("div",{className:"flex items-center",children:[f,g(x)]})},x))})}),m&&N("tbody",{children:m.map((f,x)=>N("tr",{className:"transition-colors hover:bg-bg-surface",children:f.map((P,h)=>N("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:P},h))},x))})]});return ve("div",{className:u("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[N("div",{className:"overflow-x-auto",children:N("table",{className:"w-full border-collapse text-sm",children:b})}),a&&c>1&&ve("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[ve("span",{className:"text-xs text-text-muted",children:["Page ",i," of ",c]}),ve("div",{className:"flex items-center gap-1",children:[N(we.Button,{onPress:()=>d(1),isDisabled:i===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:N(Wn,{size:16})}),N(we.Button,{onPress:()=>d(f=>Math.max(f-1,1)),isDisabled:i===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:N(zn,{size:16})}),N(we.Button,{onPress:()=>d(f=>Math.min(f+1,c)),isDisabled:i===c,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:N(Fn,{size:16})}),N(we.Button,{onPress:()=>d(c),isDisabled:i===c,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:N(_n,{size:16})})]})]})]})}import{jsx as ye,jsxs as ke}from"react/jsx-runtime";function kt({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:a,className:s=""}){return ke("article",{className:u("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",s),id:a,children:[ke("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[ke("div",{className:"flex flex-wrap items-center gap-2.5",children:[ye("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&&ye("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&&ke("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:[ye("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&ke("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:[ye("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),ye("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),ye("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}import{jsx as Un}from"react/jsx-runtime";function St({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=u("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return Un(re,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}import{jsx as qn}from"react/jsx-runtime";function Mt({src:e,alt:t,theme:o,...r}){let{theme:n}=se();return o&&o!==n?null:qn("img",{src:e,alt:t||"",...r})}import{jsx as k,jsxs as Se}from"react/jsx-runtime";function It({title:e,props:t,className:o=""}){return Se("div",{className:u("my-6",o),children:[e&&k("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),k("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:Se("table",{className:"w-full border-collapse text-sm",children:[k("thead",{children:Se("tr",{children:[k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Property"}),k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Type"}),k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Default"}),k("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Description"})]})}),k("tbody",{children:t.map((r,n)=>Se("tr",{className:"transition-colors hover:bg-bg-surface",children:[Se("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[k("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&k("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:k("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?k("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):k("span",{className:"text-text-dim",children:"\u2014"})}),k("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}import{useMemo as $o}from"react";function zo(e){let{code:t,children:o,preview:r}=e,n=$o(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),a=$o(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:a}}import{jsx as Bt,jsxs as jn}from"react/jsx-runtime";function Et(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:s,previewElement:l}=zo(e);return jn("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[Bt("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:l}),!o&&Bt("div",{className:"border-t border-border-subtle",children:Bt(_,{hideSandbox:r,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,plain:!0,children:s})})]})}import{useState as Xn}from"react";import{Copy as Fo,Check as Kn,ExternalLink as Jn,ChevronDown as Yn}from"lucide-react";import{jsx as z,jsxs as Me}from"react/jsx-runtime";var Zn=e=>{let[t,o]=Xn(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),s=URL.createObjectURL(a);window.open(s,"_blank")}}};function Ie({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:s}=Zn(r),l=o!==!1,i=typeof o=="object"&&o.text||"Copy Markdown";return!l||!r?null:z("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:Me(Qe,{className:"rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden",children:[z(V,{variant:"ghost",onPress:a,icon:n?z(Kn,{size:16}):z(Fo,{size:16}),iconPosition:"left",className:u("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":i}),Me(C.Trigger,{placement:"bottom end",children:[z(V,{variant:"ghost",isIconOnly:!0,icon:z(Yn,{size:14}),className:u("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),Me(C.Root,{className:"w-52",children:[Me(C.Item,{onAction:a,children:[z(Fo,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),z("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),Me(C.Item,{onAction:s,children:[z(Jn,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),z("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}import{jsx as S,jsxs as ie}from"react/jsx-runtime";function Vt(){return S("div",{className:u("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:ie("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[ie("div",{className:"flex gap-2",children:[S(T,{className:"h-3 w-16"}),S(T,{className:"h-3 w-24"})]}),S(T,{className:"h-10 w-[60%] sm:h-12"}),ie("div",{className:"space-y-3",children:[S(T,{className:"h-4 w-full"}),S(T,{className:"h-4 w-[95%]"}),S(T,{className:"h-4 w-[40%]"})]}),ie("div",{className:"space-y-6 pt-4",children:[S(T,{className:"h-7 w-32"}),ie("div",{className:"space-y-3",children:[S(T,{className:"h-4 w-full"}),S(T,{className:"h-4 w-[98%]"}),S(T,{className:"h-4 w-[92%]"}),S(T,{className:"h-4 w-[60%]"})]})]}),S(T,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),ie("div",{className:"space-y-6 pt-4",children:[S(T,{className:"h-7 w-48"}),ie("div",{className:"space-y-3",children:[S(T,{className:"h-4 w-full"}),S(T,{className:"h-4 w-[85%]"})]})]})]})})}import{jsx as G,jsxs as es}from"react/jsx-runtime";var Ce=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return es(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&G("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:G(Qn,{size:16})})]})},Wo={...At,Loading:Vt,h1:e=>G(Ce,{level:1,...e}),h2:e=>G(Ce,{level:2,...e}),h3:e=>G(Ce,{level:3,...e}),h4:e=>G(Ce,{level:4,...e}),h5:e=>G(Ce,{level:5,...e}),h6:e=>G(Ce,{level:6,...e}),pre:e=>G(_,{...e,children:e.children})};import ns from"virtual:boltdocs-mdx-components";import{useLocation as ss}from"react-router-dom";import{Fragment as ms,jsx as y,jsxs as qe}from"react/jsx-runtime";function as(){let{currentLocale:e,config:t}=R();return Ht(()=>{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 is(){let e=ss(),{config:t}=R(),o=F(s=>s.setLocale),r=F(s=>s.setVersion),n=F(s=>s.currentLocale),a=F(s=>s.currentVersion);return Ht(()=>{let s=e.pathname.split("/").filter(Boolean),l=0,i=t.versions?.defaultVersion,d=t.i18n?.defaultLocale;if(s[l]==="docs"&&l++,t.versions&&s.length>l){let c=t.versions.versions.find(m=>m.path===s[l]);c&&(i=c.path,l++)}t.i18n&&s.length>l&&t.i18n.locales[s[l]]?d=s[l]:t.i18n&&s.length===0&&(d=n||t.i18n.defaultLocale),d!==n&&o(d),i!==a&&r(i)},[e.pathname,t,o,r,n,a]),null}function ls({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:a,externalPages:s,externalLayout:l,components:i={}}){let[d,c]=_o(e),[m,p]=_o(t),g=s||{},b=l||Uo,f=Go(()=>d.filter(h=>!(a&&(h.path==="/"||h.path===""))&&!g[h.path===""?"/":h.path]).map(h=>{let H=Object.keys(r).find(M=>M===`/${o}/${h.filePath}`||M.endsWith(`/${o}/${h.filePath}`)||M.endsWith(`/${o}\\${h.filePath.replace(/\\/g,"/")}`)),O=H?r[H]:null;return{...h,Component:je.lazy(async()=>O?await O():{default:_e})}}),[d,r,o,a,g]);Ht(()=>{n&&(n.on("boltdocs:routes-update",h=>{c(h)}),n.on("boltdocs:config-update",h=>{p(h)}))},[n]);let x=Go(()=>({...Wo,...ns,...i}),[i]),P=x.Loading;return y(co,{children:y(bo,{components:x,children:y(to.Provider,{value:m,children:y(mo,{children:qe(oo,{routes:d,modules:r,children:[y(po,{}),y(is,{}),y(as,{}),qe(rs,{children:[y(le,{element:y(fo,{}),children:f.map(h=>y(le,{path:h.path===""?"/":h.path,element:y(je.Suspense,{fallback:y(P,{}),children:y(xo,{Component:h.Component})})},h.path))},"docs-layout"),a&&qe(ms,{children:[y(le,{path:"/",element:y(b,{children:y(a,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(h=>y(le,{path:`/${h}`,element:y(b,{children:y(a,{})})},`home-${h}`))]}),Object.entries(g).map(([h,H])=>{let O=h==="/"?"":h;return qe(je.Fragment,{children:[y(le,{path:h,element:y(b,{children:y(H,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(M=>y(le,{path:`/${M}${O}`,element:y(b,{children:y(H,{})})},`${h}-${M}`))]},h)}),y(le,{path:"*",element:y(Uo,{children:y(_e,{})})})]})]})})})})})}function cs(e){let{target:t,routes:o,docsDirName:r,config:n,modules:a,hot:s,homePage:l,externalPages:i,externalLayout:d,components:c}=e,m=document.querySelector(t);if(!m)throw new Error(`[boltdocs] Mount target "${t}" not found in document.`);let p=y(je.StrictMode,{children:y(os,{children:y(ls,{initialRoutes:o,initialConfig:n,docsDirName:r,modules:a,hot:s,homePage:l,externalPages:i,externalLayout:d,components:c})})});m.innerHTML="",ts.createRoot(m).render(p)}import{useLocation as ds}from"react-router-dom";function Z(e,t){return e?typeof e=="string"?e:t&&e[t]?e[t]:Object.values(e)[0]||"":""}function Ot(){let e=B(),{theme:t}=se(),o=ds(),{currentLocale:r}=R(),n=e.theme||{},a=Z(n.title,r)||"Boltdocs",s=n.navbar||[],l=n.socialLinks||[],i=n.githubRepo,d=s.map(b=>{let f=b.href||b.to||b.link||"",x=P=>{let h=o.pathname;if(h===P)return!0;if(!P||P==="/")return h==="/";let H=ue=>{let te=ue.split("/").filter(Boolean),oe=0;return e.i18n?.locales&&te[oe]&&e.i18n.locales[te[oe]]&&oe++,e.versions?.versions&&te[oe]&&e.versions.versions.some(ir=>ir.path===te[oe])&&oe++,te.slice(oe)},O=H(P),M=H(h);return O.length===0?M.length===0:M.length<O.length?!1:O.every((ue,te)=>M[te]===ue)};return{label:Z(b.label||b.text,r),href:f,active:x(f),to:f.startsWith("http")||f.startsWith("//")?"external":void 0}}),c=n.logo,m=c?typeof c=="string"?c:t==="dark"?c.dark:c.light:null,p={alt:(c&&typeof c=="object"?c.alt:void 0)||a,width:c&&typeof c=="object"?c.width:void 0,height:c&&typeof c=="object"?c.height:void 0},g=i?`https://github.com/${i}`:null;return{links:d,title:a,logo:m,logoProps:p,github:g,social:l,config:e,theme:t}}import{useLocation as ps}from"react-router-dom";function Dt(e){let t=B(),o=ps(),r=m=>m.endsWith("/")&&m.length>1?m.slice(0,-1):m,n=r(o.pathname),a=e.find(m=>r(m.path)===n),s=a?.tab?.toLowerCase(),l=s?e.filter(m=>!m.tab||m.tab.toLowerCase()===s):e,i=[],d=new Map;for(let m of l)m.group?(d.has(m.group)||d.set(m.group,{slug:m.group,title:m.groupTitle||m.group,routes:[],icon:m.groupIcon}),d.get(m.group).routes.push(m)):i.push(m);return{groups:Array.from(d.values()),ungrouped:i,activeRoute:a,activePath:n,config:t}}import{useState as us}from"react";function $t(e=[]){let[t,o]=us(null);return{headings:e,activeId:t,setActiveId:o}}import{useLocation as fs}from"react-router-dom";import{useEffect as gs,useState as bs,useRef as hs}from"react";function zt(e=[],t=[]){let o=fs(),r=hs([]),[n,a]=bs({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),l=t.find(c=>c.path===o.pathname)?.tab?.toLowerCase(),i=e.findIndex(c=>c.id.toLowerCase()===l),d=i===-1?0:i;return gs(()=>{let c=r.current[d];c&&a({opacity:1,width:c.offsetWidth,transform:`translateX(${c.offsetLeft}px)`})},[d,e.length,o.pathname]),{tabs:e,activeIndex:d,indicatorStyle:n,tabRefs:r,activeTabId:l}}import{useNavigate as xs}from"react-router-dom";function Q(e,t,o){let r=e;return t&&(r===t||r.startsWith(t+"/"))&&(r=r===t?"index.md":r.slice(t.length+1)),o&&(r===o||r.startsWith(o+"/"))&&(r=r===o?"index.md":r.slice(o.length+1)),r}function Ft(){let e=xs(),t=R(),{allRoutes:o,currentRoute:r,currentVersion:n,currentLocale:a,config:s}=t,l=s.versions,i=F(m=>m.setVersion),d=m=>{if(!l||m===n)return;i(m);let p=`/docs/${m}`;if(r){let g=Q(r.filePath,r.version,r.locale),b=o.find(f=>Q(f.filePath,f.version,f.locale)===g&&(f.version||l.defaultVersion)===m&&(a?f.locale===a:!f.locale));if(b)p=b.path;else{let f=o.find(x=>Q(x.filePath,x.version,x.locale)==="index.md"&&(x.version||l.defaultVersion)===m&&(a?x.locale===a:!x.locale));p=f?f.path:`/docs/${m}${a?`/${a}`:""}`}}e(p)},c=t.availableVersions.map(m=>({...m,label:m.label,value:m.key}));return{currentVersion:n,currentVersionLabel:t.currentVersionLabel,availableVersions:c,handleVersionChange:d}}import{useNavigate as vs}from"react-router-dom";function Wt(){let e=vs(),t=R(),{allRoutes:o,currentRoute:r,currentLocale:n,config:a}=t,s=a.i18n,l=F(p=>p.setLocale),i=p=>{if(!s||p===n)return;l(p);let g="/";if(r){let b=Q(r.filePath,r.version,r.locale),f=o.find(x=>Q(x.filePath,x.version,x.locale)===b&&(x.locale||s.defaultLocale)===p&&x.version===r.version);if(f)g=f.path;else{let x=o.find(P=>Q(P.filePath,P.version,P.locale)==="index.md"&&(P.locale||s.defaultLocale)===p&&P.version===r.version);g=x?x.path:p===s.defaultLocale?r.version?`/${r.version}`:"/":r.version?`/${r.version}/${p}`:`/${p}`}}else{let b=o.find(f=>(f.filePath==="index.mdx"||f.filePath==="index.md")&&(f.locale||s.defaultLocale)===p&&!f.version);b?g=b.path:g=p===s.defaultLocale?"/":`/${p}`}e(g)},c=a.i18n?.localeConfigs?.[n]?.label||a.i18n?.locales[n]||n,m=a.i18n?Object.entries(a.i18n.locales).map(([p,g])=>{let b=a.i18n?.localeConfigs?.[p];return{key:p,label:b?.label||g,value:p,isCurrent:p===n}}):[];return{currentLocale:n,currentLocaleLabel:c,availableLocales:m,handleLocaleChange:i}}import{useLocation as ys}from"react-router-dom";function _t(){let{routes:e,currentRoute:t}=R(),o=ys();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let r=t.tab?.toLowerCase(),n=r?e.filter(i=>i.tab?.toLowerCase()===r):e.filter(i=>!i.tab),a=n.findIndex(i=>i.path===o.pathname),s=a>0?n[a-1]:null,l=a!==-1&&a<n.length-1?n[a+1]:null;return{prevPage:s,nextPage:l,currentRoute:t}}function Gt(){let{currentRoute:e}=R(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}import{useLocation as Cs}from"react-router-dom";var Ut=()=>Cs();import{jsx as Re}from"react/jsx-runtime";function Rs({children:e,className:t,style:o}){return Re("div",{className:u("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",t),style:o,children:e})}function Ps({children:e,className:t,style:o}){return Re("div",{className:u("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",t),style:o,children:e})}function Ns({children:e,className:t,style:o}){return Re("main",{className:u("boltdocs-content flex-1 min-w-0 overflow-y-auto","contain-layout",t),style:o,children:e})}function Ts({children:e,className:t,style:o}){let{pathname:r}=Ut();return Re("div",{className:u("boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8",{"max-w-content-max":r.includes("/docs/")},t),style:o,children:e})}function Ls({children:e,className:t,style:o}){return Re("div",{className:u("flex items-center justify-between mb-10",t),style:o,children:e})}function ws({children:e,className:t,style:o}){return Re("div",{className:u("mt-20",t),style:o,children:e})}var ce=Object.assign(Rs,{Body:Ps,Content:Ns,ContentMdx:Ts,ContentHeader:Ls,ContentFooter:ws});import{Suspense as Os,lazy as Ds}from"react";import{useEffect as ks,useState as Ss}from"react";import{Sun as qo,Moon as jo,Monitor as Xo}from"lucide-react";import{Button as Ms}from"react-aria-components";import{jsx as U,jsxs as Be}from"react/jsx-runtime";function Ko(){let{theme:e,setTheme:t}=se(),[o,r]=Ss(!1);if(ks(()=>{r(!0)},[]),!o)return U("div",{className:"h-9 w-9"});let n=e==="system"?Xo:e==="dark"?jo:qo;return Be(C.Trigger,{placement:"bottom right",children:[U(Ms,{className:"flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main outline-none focus-visible:ring-2 focus-visible:ring-primary-500","aria-label":"Selection theme",children:U(n,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),Be(C.Root,{selectionMode:"single",selectedKeys:[e],onSelectionChange:a=>{let s=Array.from(a)[0];t(s)},children:[Be(C.Item,{id:"light",children:[U(qo,{size:16}),U("span",{children:"Light"})]}),Be(C.Item,{id:"dark",children:[U(jo,{size:16}),U("span",{children:"Dark"})]}),Be(C.Item,{id:"system",children:[U(Xo,{size:16}),U("span",{children:"System"})]})]})]})}import{useEffect as Es,useState as As}from"react";var Is="https://api.github.com";async function Jo(e,t,o=Is){let r=new Headers;t&&r.append("authorization",t);let a=await(await fetch(`${o}/repos/${e}`,{headers:r})).json();return a.stargazers_count!==void 0?Bs(a.stargazers_count):"0"}var Bs=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);import{jsx as Yo,jsxs as Vs}from"react/jsx-runtime";function Zo({repo:e}){let[t,o]=As(null);return Es(()=>{e&&Jo(e).then(r=>o(r)).catch(()=>o("0"))},[e]),Vs("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:[Yo(no,{className:"h-4 w-4"}),t&&Yo("span",{className:"tabular-nums",children:t})]})}import*as Hs from"lucide-react";import{jsx as Pe,jsxs as Qo}from"react/jsx-runtime";function er({tabs:e,routes:t}){let{currentLocale:o}=R(),{indicatorStyle:r,tabRefs:n,activeIndex:a}=zt(e,t),s=l=>{if(!l)return null;if(l.trim().startsWith("<svg"))return Pe("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:l}});let i=Hs[l];return i?Pe(i,{size:16}):Pe("img",{src:l,alt:"",className:"h-4 w-4 object-contain"})};return Pe("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:Qo(We.List,{className:"border-none py-0",children:[e.map((l,i)=>{let d=i===a,c=t.find(p=>p.tab&&p.tab.toLowerCase()===l.id.toLowerCase()),m=c?c.path:"#";return Qo(re,{href:m,ref:p=>{n.current[i]=p},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${d?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[s(l.icon),Pe("span",{children:Z(l.text,o)})]},l.id)}),Pe(We.Indicator,{style:r})]})})}import{useLocation as $s}from"react-router-dom";import{ChevronDown as tr,Languages as zs}from"lucide-react";import{Fragment as Us,jsx as v,jsxs as ee}from"react/jsx-runtime";var Fs=Ds(()=>import("../search-dialog-YBM4GYDR.mjs").then(e=>({default:e.SearchDialog})));function qt(){let{links:e,title:t,logo:o,logoProps:r,github:n,social:a,config:s}=Ot(),{routes:l,allRoutes:i,currentVersion:d,currentLocale:c}=R(),{pathname:m}=$s(),p=s.theme||{},g=m.startsWith("/docs"),b=p?.tabs&&p.tabs.length>0;return ee(E.Root,{className:b?"border-b-0":"",children:[ee(E.Content,{children:[ee(E.Left,{children:[o&&v(E.Logo,{src:o,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),v(E.Title,{children:t}),s.versions&&d&&v(_s,{})]}),v(E.Center,{children:v(Os,{fallback:v("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:v(Fs,{routes:l||[]})})}),ee(E.Right,{children:[v(E.Links,{children:e.map(f=>v(Us,{children:v(Ws,{link:f},f.href)}))}),s.i18n&&c&&v(Gs,{}),v(E.Split,{}),v(Ko,{}),n&&v(Zo,{repo:p?.githubRepo??""}),a.length>0&&v(E.Split,{}),v("div",{className:"flex items-center gap-1",children:a.map(({icon:f,link:x})=>v(E.Socials,{icon:f,link:x,className:"p-1.5"},x))})]})]}),g&&b&&p?.tabs&&v("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:v(er,{tabs:p.tabs,routes:i||l||[]})})]})}function Ws({link:e}){let t=Ke(e.href||"");return v(E.Link,{...e,href:t})}function _s(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:o}=Ft();return t.length===0?null:ee(C.Trigger,{children:[v(V,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:v(tr,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5",children:v("span",{className:"font-semibold text-[0.8125rem]",children:e})}),v(C.Root,{children:v(C.Section,{items:t,children:r=>v(C.Item,{onPress:()=>o(r.value),children:r.label},`${r.value??""}`)})})]})}function Gs(){let{currentLocale:e,availableLocales:t,handleLocaleChange:o}=Wt();return t.length===0?null:ee(C.Trigger,{children:[v(V,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:v(tr,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5 px-2.5",children:ee("div",{className:"flex items-center gap-1.5",children:[v(zs,{className:"w-3.5 h-3.5 text-primary-500"}),v("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),v(C.Root,{children:v(C.Section,{items:t,children:r=>v(C.Item,{onPress:()=>o(r.value),children:ee("div",{className:"flex items-center justify-between w-full gap-4",children:[v("span",{children:r.label}),v("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:r.value})]})},`${r.value??""}`)})})]})}import{useState as js,useEffect as Xs,useMemo as Ks}from"react";import{Zap as qs}from"lucide-react";import{jsx as jt,jsxs as or}from"react/jsx-runtime";function rr(){return jt("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:or("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center gap-2 px-4 py-2 rounded-full border border-border-subtle bg-bg-surface/50 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:bg-bg-surface hover:shadow-xl hover:shadow-primary-500/5 select-none",children:[jt(qs,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),or("span",{className:"text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide",children:["Powered by"," ",jt("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}import*as Js from"lucide-react";import{jsx as me,jsxs as Zs}from"react/jsx-runtime";function nr(e){return e&&Js[e]||void 0}function Ys({group:e,activePath:t,getIcon:o}){let r=Ks(()=>e.routes.some(s=>s.path===t),[e.routes,t]),[n,a]=js(!0);return Xs(()=>{r&&a(!0)},[r]),me(ne.Group,{title:e.title,isOpen:n,onToggle:()=>a(!n),children:e.routes.map(s=>{let l=t===(s.path.endsWith("/")?s.path.slice(0,-1):s.path);return me(ne.Link,{label:s.title,href:s.path,active:l,icon:o(s.icon),badge:s.badge},s.path)})})}function Xt({routes:e,config:t}){let{groups:o,ungrouped:r,activePath:n}=Dt(e),a=t.theme||{};return Zs(ne.Root,{children:[r.length>0&&me(ne.Group,{className:"mb-6",children:r.map(s=>{let l=n===(s.path.endsWith("/")?s.path.slice(0,-1):s.path);return me(ne.Link,{label:s.title,href:s.path,active:l,icon:nr(s.icon),badge:s.badge},s.path)})}),o.map(s=>me(Ys,{group:s,activePath:n,getIcon:nr},s.slug)),a?.poweredBy&&me("div",{className:"mt-auto pt-8",children:me(rr,{})})]})}import Qs,{useRef as sr,useEffect as ea,useState as ta,useCallback as oa}from"react";import{Pencil as ra,CircleHelp as na,TextAlignStart as sa}from"lucide-react";import{jsx as A,jsxs as de}from"react/jsx-runtime";function Kt({headings:e=[],editLink:t,communityHelp:o,filePath:r}){let{headings:n}=$t(e),a=Qs.useMemo(()=>n.map(s=>({title:s.text,url:`#${s.id}`,depth:s.level})),[n]);return n.length===0?null:A(Ze,{toc:a,children:A(aa,{headings:n,editLink:t,communityHelp:o,filePath:r})})}function aa({headings:e,editLink:t,communityHelp:o,filePath:r}){let n=Je(),[a,s]=ta({opacity:0}),l=sr(null),i=sr(null);ea(()=>{if(!n||!l.current)return;let c=l.current.querySelector(`a[href="#${n}"]`);c&&s({transform:`translateY(${c.offsetTop}px)`,height:`${c.offsetHeight}px`,opacity:1})},[n]);let d=oa((c,m)=>{c.preventDefault();let p=document.getElementById(m);p&&(p.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${m}`))},[]);return de(j.Root,{children:[de(j.Header,{className:"flex flex-row gap-x-2",children:[A(sa,{size:16}),"On this page"]}),A(Ye,{containerRef:i,children:de(j.Content,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:i,children:[A(j.Indicator,{style:a}),A("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:l,children:e.map(c=>A(j.Item,{level:c.level,children:A(j.Link,{href:`#${c.id}`,active:n===c.id,onClick:m=>d(m,c.id),className:"pl-4",children:c.text})},c.id))})]})}),(t||o)&&de("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[A("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),de("ul",{className:"space-y-3",children:[t&&r&&A("li",{children:de("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:[A(ra,{size:16}),"Edit this page"]})}),o&&A("li",{children:de("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:[A(na,{size:16}),"Community help"]})})]})]})]})}import{useEffect as ia}from"react";import{useLocation as la}from"react-router-dom";function Jt({siteTitle:e,siteDescription:t,routes:o}){let r=la();return ia(()=>{let n=o.find(d=>d.path===r.pathname),a=n?.title,s=n?.description||t||"";document.title=a?`${a} | ${e}`:e;let l=document.querySelector('meta[name="description"]');l||(l=document.createElement("meta"),l.name="description",document.head.appendChild(l)),l.content=s,pe("property","og:title",document.title),pe("property","og:description",s),pe("property","og:type","article"),pe("property","og:url",window.location.href),pe("name","twitter:card","summary"),pe("name","twitter:title",document.title),pe("name","twitter:description",s);let i=document.querySelector('link[rel="canonical"]');i||(i=document.createElement("link"),i.rel="canonical",document.head.appendChild(i)),i.href=window.location.origin+r.pathname},[r.pathname,e,t,o]),null}function pe(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 ca}from"lucide-react";import{jsx as Ee,jsxs as ar}from"react/jsx-runtime";function Yt(){let{crumbs:e,activeRoute:t}=Gt(),r=B().theme||{};return e.length===0||!r?.breadcrumbs?null:ar(X.Root,{children:[Ee(X.Item,{children:Ee(X.Link,{href:"/",children:Ee(ca,{size:14})})}),e.map((n,a)=>ar(X.Item,{children:[Ee(X.Separator,{}),Ee(X.Link,{href:n.href,className:u({"font-medium text-text-main":n.href===t?.path}),children:n.label})]},`crumb-${n.href}-${n.label}-${a}`))]})}import{jsx as Ae,jsxs as Zt}from"react/jsx-runtime";function Qt(){let{prevPage:e,nextPage:t}=_t();return!e&&!t?null:Zt(W.Root,{className:"animate-in fade-in slide-in-from-bottom-4 duration-700",children:[e?Zt(W.Link,{to:e.path,direction:"prev",children:[Ae(W.Title,{children:"Previous"}),Ae(W.Description,{children:e.title})]}):Ae("div",{}),t&&Zt(W.Link,{to:t.path,direction:"next",children:[Ae(W.Title,{children:"Next"}),Ae(W.Description,{children:t.title})]})]})}import{Component as ma}from"react";import{jsx as eo,jsxs as da}from"react/jsx-runtime";var Ve=class extends ma{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||da("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[eo("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),eo("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),eo(V,{className:"rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer",onPress:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}};import{useLocation as pa}from"react-router-dom";import{jsx as q,jsxs as Xe}from"react/jsx-runtime";function ua({children:e}){let{routes:t,allRoutes:o,currentRoute:r,currentLocale:n}=R(),{pathname:a}=pa(),s=B(),i=Te().CopyMarkdown||Ie,d=a==="/"||a==="";return Xe(ce,{children:[q(Jt,{siteTitle:Z(s.theme?.title,n)||"Boltdocs",siteDescription:Z(s.theme?.description,n)||"",routes:o}),q(qt,{}),Xe(ce.Body,{children:[!d&&q(Xt,{routes:t,config:s}),Xe(ce.Content,{children:[!d&&Xe(ce.ContentHeader,{children:[q(Yt,{}),q(i,{mdxRaw:r?._rawContent,route:r,config:s.theme?.copyMarkdown})]}),q(Ve,{children:e}),!d&&q(ce.ContentFooter,{children:q(Qt,{})})]}),!d&&q(Kt,{headings:r?.headings,editLink:s.theme?.editLink,communityHelp:s.theme?.communityHelp,filePath:r?.filePath})]})]})}export{D as Admonition,Ze as AnchorProvider,lt as Badge,Yt as Breadcrumbs,tt as Button,Qe as ButtonGroup,mt as Card,ct as Cards,ht as Caution,_ as CodeBlock,Et as ComponentPreview,It as ComponentProps,Ie as CopyMarkdown,ft as Danger,ua as DefaultLayout,ce as DocsLayout,Ve as ErrorBoundary,kt as Field,Lt as FileTree,Jt as Head,Mt as Image,bt as Important,gt as InfoBox,St as Link,vt as List,Vt as Loading,qt as Navbar,_e as NotFound,dt as Note,Kt as OnThisPage,Qt as PageNav,X as PrimitiveBreadcrumbs,V as PrimitiveButton,re as PrimitiveLink,C as PrimitiveMenu,cr as PrimitiveNavLink,mr as PrimitiveNavbar,dr as PrimitiveNavigationMenu,j as PrimitiveOnThisPage,W as PrimitivePageNav,gr as PrimitivePopover,ne as PrimitiveSidebar,T as PrimitiveSkeleton,We as PrimitiveTabs,Fe as PrimitiveTooltip,Ye as ScrollProvider,pr as SearchDialogPrimitive,Xt as Sidebar,st as Tab,wt as Table,at as Tabs,pt as Tip,it as Video,ut as Warning,u as cn,cs as createBoltdocsApp,Je as useActiveAnchor,fr as useActiveAnchors,Gt as useBreadcrumbs,B as useConfig,Wt as useI18n,ur as useItems,Ke as useLocalizedTo,Ut as useLocation,Te as useMdxComponents,Ot as useNavbar,$t as useOnThisPage,_t as usePageNav,R as useRoutes,br as useSearch,Dt as useSidebar,zt as useTabs,se as useTheme,Ft as useVersion};
@@ -1 +1 @@
1
- "use strict";var xr=Object.create;var De=Object.defineProperty;var br=Object.getOwnPropertyDescriptor;var hr=Object.getOwnPropertyNames;var vr=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty;var Tt=(e,t)=>{for(var o in t)De(e,o,{get:t[o],enumerable:!0})},kt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of hr(t))!yr.call(e,n)&&n!==o&&De(e,n,{get:()=>t[n],enumerable:!(r=br(t,n))||r.enumerable});return e};var w=(e,t,o)=>(o=e!=null?xr(vr(e)):{},kt(t||!e||!e.__esModule?De(o,"default",{value:e,enumerable:!0}):o,e)),Cr=e=>kt(De({},"__esModule",{value:!0}),e);var gn={};Tt(gn,{render:()=>fn});module.exports=Cr(gn);var ur=w(require("react")),fr=w(require("react-dom/server")),gr=require("react-router-dom/server");var V=w(require("react")),pn=w(require("react-dom/client")),Q=require("react-router-dom");var zt=require("lucide-react");var ct=w(require("react")),Ot=require("react-aria-components"),Vt=require("react-router-dom");var Fe=require("react"),it=(0,Fe.createContext)(null);function ce(){let e=(0,Fe.use)(it);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Bt=require("react-router-dom");var de=require("react"),St=require("react/jsx-runtime"),Lt=(0,de.createContext)({preload:()=>{},routes:[]});function We(){return(0,de.use)(Lt)}function At({routes:e,modules:t,children:o}){let r=(0,de.useRef)(null),n=(0,de.useCallback)(a=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let i=a.split("#")[0].split("?")[0],l=e.find(s=>s.path===i||i==="/"&&s.path==="");if(l?.filePath){let s=Object.keys(t).find(d=>d.endsWith("/"+l.filePath));s&&t[s]().catch(d=>{console.error(`[boltdocs] Failed to preload route ${a}:`,d)})}},100)},[e,t]);return(0,St.jsx)(Lt.Provider,{value:{preload:n,routes:e},children:o})}var Mt=require("zustand"),$e=require("zustand/middleware"),re=(0,Mt.create)()((0,$e.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,$e.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function Me(){let{routes:e}=We(),t=ce(),o=(0,Bt.useLocation)(),r=re(g=>g.currentLocale),n=re(g=>g.currentVersion),a=re(g=>g.hasHydrated),i=e.find(g=>g.path===o.pathname),l=t.i18n?i?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,s=t.versions?i?.version||(a?n:void 0)||t.versions.defaultVersion:void 0,d=e.filter(g=>{let W=t.i18n?(g.locale||t.i18n.defaultLocale)===l:!0,x=t.versions?(g.version||t.versions.defaultVersion)===s:!0;if(!(W&&x))return!1;let q=t.i18n;if(q){let le=!!i?.locale,$=!!g.locale;if(e.some(He=>He!==g&&He.filePath===g.filePath&&He.version===g.version&&(He.locale||q.defaultLocale)===(g.locale||q.defaultLocale))&&le!==$)return!1}return!0}),m=t.i18n?.localeConfigs?.[l]?.label||t.i18n?.locales[l]||l,b=t.versions?.versions.find(g=>g.path===s)?.label||s,C=t.i18n?Object.entries(t.i18n.locales).map(([g,W])=>{let x=t.i18n?.localeConfigs?.[g];return{key:g,label:x?.label||W,isCurrent:g===l}}):[],P=t.versions?t.versions.versions.map(g=>({key:g.path,label:g.label,isCurrent:g.path===s})):[];return{routes:d,allRoutes:e,currentRoute:i,currentLocale:l,currentLocaleLabel:m,availableLocales:C,currentVersion:s,currentVersionLabel:b,availableVersions:P,config:t}}function lt(e){let t=ce(),{currentLocale:o,currentVersion:r}=Me();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,a=t.versions;if(!n&&!a)return e;let i=e.startsWith("/docs"),l=e.split("/").filter(Boolean),s=0;l[s]==="docs"&&s++,a&&l.length>s&&a.versions.find(b=>b.path===l[s])&&s++,n&&l.length>s&&n.locales[l[s]]&&s++;let d=l.slice(s),p=[];i&&(p.push("docs"),a&&r&&p.push(r)),n&&o&&o!==n.defaultLocale&&p.push(o),p.push(...d);let m=`/${p.join("/")}`;return m.length>1&&m.endsWith("/")?m.slice(0,-1):m||"/"}var It=require("clsx"),Et=require("tailwind-merge");function c(...e){return(0,Et.twMerge)((0,It.clsx)(e))}var dt=require("react/jsx-runtime"),pe=ct.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:a,...i}=e,l=lt(o??""),{preload:s}=We();return(0,dt.jsx)(Ot.Link,{...i,ref:t,href:l,onMouseEnter:m=>{n?.(m),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)},onFocus:m=>{a?.(m),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)}})});pe.displayName="Link";var Rr=ct.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:a,...i}=e,l=(0,Vt.useLocation)(),s=lt(o??""),d=r?l.pathname===s:l.pathname.startsWith(s),p=typeof n=="function"?n({isActive:d}):c(n,d&&"active"),m=typeof a=="function"?a({isActive:d}):a;return(0,dt.jsx)(pe,{...i,ref:t,href:o,className:p,children:m})});Rr.displayName="NavLink";var ne=require("react/jsx-runtime");function pt(){return(0,ne.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,ne.jsxs)("div",{className:"space-y-4",children:[(0,ne.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,ne.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,ne.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,ne.jsxs)(pe,{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,ne.jsx)(zt.ArrowLeft,{size:16})," Go to Home"]})]})})}var X=require("react"),Wt=require("react/jsx-runtime"),Ht=(0,X.createContext)(void 0);function Dt({children:e}){let[t,o]=(0,X.useState)("system"),[r,n]=(0,X.useState)("dark"),[a,i]=(0,X.useState)(!1);(0,X.useEffect)(()=>{i(!0);let s=localStorage.getItem("boltdocs-theme"),d=s==="light"||s==="dark"||s==="system"?s:"system";o(d);let p=window.matchMedia("(prefers-color-scheme: dark)");((b,C)=>{n(b==="system"?C?"dark":"light":b)})(d,p.matches);let f=b=>{n(C=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?b.matches?"dark":"light":C)};return p.addEventListener("change",f),()=>p.removeEventListener("change",f)},[]),(0,X.useEffect)(()=>{if(!a)return;let s=window.matchMedia("(prefers-color-scheme: dark)").matches,d=t==="system"?s?"dark":"light":t;n(d);let p=document.documentElement;d==="light"?(p.classList.add("theme-light"),p.dataset.theme="light"):(p.classList.remove("theme-light"),p.dataset.theme="dark")},[t,a]);let l=s=>{o(s),localStorage.setItem("boltdocs-theme",s)};return(0,Wt.jsx)(Ht.Provider,{value:{theme:t,resolvedTheme:r,setTheme:l},children:e})}function Ft(){let e=(0,X.use)(Ht);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var wt=w(require("virtual:boltdocs-layout"));var $t=require("react"),jt=require("react-aria-components"),je=require("react-router-dom"),_t=require("react/jsx-runtime");function Gt({children:e}){let t=(0,je.useNavigate)();return(0,_t.jsx)(jt.RouterProvider,{navigate:(o,r)=>{(0,$t.startTransition)(()=>{t(o,r)})},useHref:je.useHref,children:e})}var Ut=require("react"),qt=require("react-router-dom");function Xt(){let{pathname:e,hash:t}=(0,qt.useLocation)();return(0,Ut.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content")||window,r=()=>o===window?window.scrollY:o.scrollTop,n=(a,i="auto")=>{o===window?window.scrollTo({top:a,behavior:i}):o.scrollTo({top:a,behavior:i})};if(t){let a=t.replace("#",""),i=document.getElementById(a);if(i){let s=o===window?0:o.getBoundingClientRect().top,m=i.getBoundingClientRect().top-s-80+r();n(m,"smooth");return}}n(0)},[e,t]),null}var Jt=require("react-router-dom"),Kt=w(require("virtual:boltdocs-layout")),mt=require("react/jsx-runtime");function Yt(){return(0,mt.jsx)(Kt.default,{children:(0,mt.jsx)(Jt.Outlet,{})})}var oo=require("@mdx-js/react");var Ge=require("react"),to=require("react/jsx-runtime"),Zt=(0,Ge.createContext)({});function Qt(){return(0,Ge.use)(Zt)}function eo({components:e,children:t}){return(0,to.jsx)(Zt.Provider,{value:e,children:t})}var ut=require("react/jsx-runtime");function ro({Component:e}){let t=Qt();return(0,ut.jsx)(oo.MDXProvider,{components:t,children:(0,ut.jsx)(e,{})})}var lr=require("lucide-react");var Pt={};Tt(Pt,{Admonition:()=>ae,Badge:()=>ho,Button:()=>so,Card:()=>No,Cards:()=>Ro,Caution:()=>Bo,CodeBlock:()=>me,ComponentPreview:()=>_o,ComponentProps:()=>jo,CopyMarkdown:()=>ar,Danger:()=>Ao,Field:()=>Ho,FileTree:()=>Oo,Image:()=>Wo,Important:()=>Mo,InfoBox:()=>So,Link:()=>Do,List:()=>Io,Note:()=>To,Tab:()=>fo,Table:()=>zo,Tabs:()=>go,Tip:()=>ko,Video:()=>xo,Warning:()=>Lo});var Ue=w(require("react-aria-components"));var no=require("class-variance-authority"),J=require("react/jsx-runtime"),_e=(0,no.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"}}),Be=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:a,variant:i,size:l,rounded:s,iconSize:d,disabled:p,...m})=>{let f=r||!n&&!!t,b=f?(0,J.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,J.jsxs)(J.Fragment,{children:[t&&o==="left"&&(0,J.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,J.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,J.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,J.jsx)(Ue.Link,{href:e,className:c(_e({variant:i,size:l,rounded:s,iconSize:f?d:void 0,disabled:p}),a),...m,children:b}):(0,J.jsx)(Ue.Button,{className:c(_e({variant:i,size:l,rounded:s,iconSize:f?d:void 0,disabled:p}),a),...m,children:b})};var ao=require("react/jsx-runtime"),so=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:a,...i})=>(0,ao.jsx)(Be,{className:c("group",_e({variant:t,size:o,rounded:r,iconSize:n,disabled:a,className:e})),...i});var Ze=w(require("react-aria-components")),ye=require("lucide-react");var ft=require("codesandbox/lib/api/define.js");function io(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",a=e.description||"Generic Sandbox",i={};for(let[l,s]of Object.entries(t)){let d=typeof s.content=="object"?JSON.stringify(s.content,null,2):s.content;i[l]={content:d,isBinary:s.isBinary??!1}}if(!i["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"};i["package.json"]={content:JSON.stringify({private:!0,name:n,description:a,type:"module",version:"1.0.0",scripts:e.scripts||s,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return i}function Nr(e){let t=io(e),o=(0,ft.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 lo(e){if(typeof window>"u")return Nr(e);let t=io(e),o=(0,ft.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 a=(l,s)=>{let d=document.createElement("input");d.type="hidden",d.name=l,d.value=s,n.appendChild(d)},i=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return a("query",i.toString()),a("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 co=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 K=require("react");function po(e){let{title:t,sandbox:o}=e,[r,n]=(0,K.useState)(!1),[a,i]=(0,K.useState)(!1),[l,s]=(0,K.useState)(!1),d=(0,K.useRef)(null),p=ce(),m=(0,K.useCallback)(async()=>{let b=d.current?.textContent??"";co(b),n(!0),setTimeout(()=>n(!1),2e3)},[]),f=(0,K.useCallback)(()=>{let b=d.current?.textContent??"",C=p?.integrations?.sandbox?.config||{},P=typeof o=="object"?o:C,g=P.entry||"src/App.tsx";lo({title:t??"Code Snippet",...P,files:{...P.files,[g]:{content:b}}})},[t,p,o]);return(0,K.useEffect)(()=>{let b=d.current?.textContent?.length??0;s(b>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:a,setIsExpanded:i,isExpandable:l,preRef:d,handleCopy:m,handleSandbox:f,shouldTruncate:l&&!a}}var v=require("react/jsx-runtime");function ee(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var mo=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...ee(e),children:[(0,v.jsx)("title",{children:"CodeSandbox"}),(0,v.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var qe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"TypeScript"}),(0,v.jsx)("path",{fill:"#2563EB",d:"M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z"})]}),Xe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"JavaScript"}),(0,v.jsx)("path",{fill:"#F59E0B",d:"M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z"})]}),Je=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"JSON"}),(0,v.jsx)("path",{fill:"#F59E0B",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),Ke=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"CSS"}),(0,v.jsx)("path",{fill:"#0EA5E9",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),Ye=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"HTML"}),(0,v.jsx)("path",{fill:"#EA580C",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]});var ge=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"React"}),(0,v.jsx)("path",{fill:"#0E8ADC",d:"M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z"})]}),xe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"Markdown"}),(0,v.jsx)("path",{fill:"#60A5FA",d:"M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z"})]}),be=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...ee(e),children:[(0,v.jsx)("title",{children:"Shell"}),(0,v.jsx)("path",{stroke:"#14B8A6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.336 17l6-6-6-6M12.336 19h8"})]}),he=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ee(e),children:[(0,v.jsx)("title",{children:"YAML"}),(0,v.jsx)("path",{fill:"#A78BFA",d:"M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z"})]});var ve=w(require("react-aria-components"));var j=require("react/jsx-runtime"),wr=({className:e,children:t,...o})=>(0,j.jsx)(ve.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,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ve.OverlayArrow,{children:(0,j.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,j.jsx)("title",{children:"Arrow"}),(0,j.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),gt=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,j.jsxs)(ve.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,j.jsx)(wr,{...n,children:e})]});var A=require("react/jsx-runtime"),Tr={ts:qe,tsx:ge,js:Xe,jsx:ge,json:Je,css:Ke,html:Ye,md:xe,mdx:xe,bash:be,sh:be,yaml:he,yml:he};function me(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:a,title:i,"data-lang":l,plain:s=!1,...d}=e,f=!!ce()?.integrations?.sandbox?.enable&&!r,b=e.lang||l||"",{copied:C,isExpanded:P,setIsExpanded:g,isExpandable:W,preRef:x,handleCopy:q,handleSandbox:le,shouldTruncate:$}=po(e),at=Tr[b];return(0,A.jsxs)("div",{className:c("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!s,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":$},e.className),children:[i&&(0,A.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted",children:[at?(0,A.jsx)(at,{size:14}):(0,A.jsx)(ye.File,{size:14,className:"opacity-60"}),(0,A.jsx)("span",{children:i})]}),(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:[f&&(0,A.jsx)(gt,{content:"Open in CodeSandbox",children:(0,A.jsx)(Ze.Button,{onPress:le,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)(mo,{size:20})})}),!n&&(0,A.jsx)(gt,{content:C?"Copied!":"Copy code",children:(0,A.jsx)(Ze.Button,{onPress:q,className:c("grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2",C?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:C?(0,A.jsx)(ye.Check,{size:20}):(0,A.jsx)(ye.Copy,{size:20})})})]}),a?(0,A.jsx)("div",{ref:x,className:"shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!",dangerouslySetInnerHTML:{__html:a}}):(0,A.jsx)("pre",{ref:x,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...d,children:t}),W&&(0,A.jsx)("div",{className:c($?"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)(Ze.Button,{onPress:()=>g(!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"),ue=w(require("react-aria-components"));var se=require("react");function uo({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[r,n]=(0,se.useState)(o===-1?0:o),a=(0,se.useRef)([]),[i,l]=(0,se.useState)({opacity:0,transform:"translateX(0)",width:0});(0,se.useEffect)(()=>{let d=a.current[r];d&&l({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[r,t]);let s=(0,se.useCallback)(d=>{let p=0;if(d.key==="ArrowRight"?p=1:d.key==="ArrowLeft"&&(p=-1),p!==0){let m=(r+p+t.length)%t.length;for(;t[m].props.disabled&&m!==r;)m=(m+p+t.length)%t.length;m!==r&&!t[m].props.disabled&&(n(m),a.current[m]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:a,indicatorStyle:i,handleKeyDown:s}}var xt=require("class-variance-authority"),z=require("react/jsx-runtime"),kr=(0,xt.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"}}),Lr=(0,xt.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 fo({children:e}){let t=typeof e=="string"?(0,z.jsx)(me,{className:"language-bash",children:(0,z.jsx)("code",{children:e.trim()})}):e;return(0,z.jsx)("div",{className:"py-4",children:t})}function go({defaultIndex:e=0,children:t}){let o=(0,Ce.useMemo)(()=>Ce.Children.toArray(t).filter(l=>(0,Ce.isValidElement)(l)&&l.props?.label),[t]),{active:r,setActive:n,tabRefs:a,indicatorStyle:i}=uo({initialIndex:e,tabs:o});return(0,z.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,z.jsxs)(ue.Tabs,{selectedKey:r.toString(),onSelectionChange:l=>n(Number(l)),className:"w-full",children:[(0,z.jsxs)(ue.TabList,{"aria-label":"Content Tabs",className:c(kr()),children:[o.map((l,s)=>{let{label:d,icon:p,disabled:m}=l.props,f=s.toString();return(0,z.jsxs)(ue.Tab,{id:f,isDisabled:m,ref:b=>{a.current[s]=b},className:({isSelected:b,isDisabled:C})=>c(Lr({isActive:b,isDisabled:C})),children:[!!p&&(0,z.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:p}),(0,z.jsx)("span",{children:d})]},f)}),(0,z.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:i,"aria-hidden":"true"})]}),o.map((l,s)=>(0,z.jsx)(ue.TabPanel,{id:s.toString(),children:o[s]},s))]})})}var Re=require("react"),Ie=require("react/jsx-runtime");function xo({src:e,poster:t,alt:o,children:r,controls:n,preload:a="metadata",...i}){let l=(0,Re.useRef)(null),[s,d]=(0,Re.useState)(!1);return(0,Re.useEffect)(()=>{let p=l.current;if(!p)return;let m=new IntersectionObserver(([f])=>{f.isIntersecting&&(d(!0),m.disconnect())},{rootMargin:"200px"});return m.observe(p),()=>m.disconnect()},[]),(0,Ie.jsx)("div",{ref:l,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:s?(0,Ie.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...i,children:[r,"Your browser does not support the video tag."]}):(0,Ie.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}var bo=require("class-variance-authority"),vo=require("react/jsx-runtime"),Ar=(0,bo.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 ho({variant:e="default",children:t,className:o="",...r}){return(0,vo.jsx)("span",{className:c(Ar({variant:e}),o),...r,children:t})}var Ee=require("react"),yo=w(require("react-aria-components"));var Co=require("class-variance-authority"),H=require("react/jsx-runtime"),Sr=(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 Ro({cols:e=3,children:t,className:o="",...r}){return(0,H.jsx)("div",{className:c(Sr({cols:e}),o),...r,children:t})}function No({title:e,icon:t,href:o,children:r,className:n="",...a}){let i=(0,Ee.useRef)(null),l=(0,Ee.useRef)(null),s=(0,Ee.useCallback)(m=>{let f=i.current||l.current;if(!f)return;let{left:b,top:C}=f.getBoundingClientRect();f.style.setProperty("--x",`${m.clientX-b}px`),f.style.setProperty("--y",`${m.clientY-C}px`)},[]),d=(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("div",{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)"}}),t&&(0,H.jsx)("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3",children:t}),(0,H.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,H.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,H.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),p=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,H.jsx)(yo.Link,{ref:l,href:o,className:c(p,"no-underline cursor-pointer"),onMouseMove:s,...a,children:d}):(0,H.jsx)("div",{ref:i,role:"presentation",className:p,onMouseMove:s,...a,children:d})}var E=require("lucide-react");var wo=require("class-variance-authority"),L=require("react/jsx-runtime"),Mr={note:(0,L.jsx)(E.Bookmark,{size:18}),tip:(0,L.jsx)(E.Lightbulb,{size:18}),info:(0,L.jsx)(E.Info,{size:18}),warning:(0,L.jsx)(E.AlertTriangle,{size:18}),danger:(0,L.jsx)(E.ShieldAlert,{size:18}),important:(0,L.jsx)(E.Flame,{size:18}),caution:(0,L.jsx)(E.Zap,{size:18})},Br={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},Po=(0,wo.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 ae({type:e="note",title:t,children:o,className:r="",...n}){return(0,L.jsxs)("div",{className:c(Po({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,L.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,L.jsx)("span",{className:c("shrink-0",Po({type:e})),children:Mr[e]}),(0,L.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||Br[e]})]}),(0,L.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var To=e=>(0,L.jsx)(ae,{type:"note",...e}),ko=e=>(0,L.jsx)(ae,{type:"tip",...e}),Lo=e=>(0,L.jsx)(ae,{type:"warning",...e}),Ao=e=>(0,L.jsx)(ae,{type:"danger",...e}),So=e=>(0,L.jsx)(ae,{type:"info",...e}),Mo=e=>(0,L.jsx)(ae,{type:"important",...e}),Bo=e=>(0,L.jsx)(ae,{type:"caution",...e});var Qe=require("react"),Ne=require("lucide-react");var et=require("class-variance-authority"),Y=require("react/jsx-runtime"),Ir=(0,et.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}}),Er=(0,et.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}}),Or=(0,et.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 Vr({icon:e,children:t,variant:o,dense:r}){return(0,Y.jsxs)("li",{className:c(Er({variant:o,dense:r})),children:[e&&(0,Y.jsx)("span",{className:c(Or({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,Y.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var zr={checked:e=>(0,Y.jsx)(Ne.Check,{size:14,className:c("text-emerald-500 shrink-0",e)}),arrow:e=>(0,Y.jsx)(Ne.ChevronRight,{size:14,className:c("text-primary-400 shrink-0",e)}),bubble:e=>(0,Y.jsx)(Ne.Circle,{size:6,fill:"currentColor",className:c("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Io({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...a}){let i=t!==void 0&&Number(t)>1,l=zr[e],s=Ir({variant:e,cols:t,dense:o,isGrid:i,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,Y.jsx)(d,{className:s,...a,children:r}):(0,Y.jsx)("ul",{className:s,...a,children:Qe.Children.map(r,p=>{if(!(0,Qe.isValidElement)(p))return p;let m=p,f=m.type==="li"?m.props.children:m.props.children||p;return(0,Y.jsx)(Vr,{icon:l(),variant:e,dense:o,children:f})})})}var te=require("react"),oe=w(require("react-aria-components")),G=require("lucide-react");var k=require("react/jsx-runtime"),Pe=16,Oe=2,Hr={ts:qe,tsx:ge,js:Xe,jsx:ge,json:Je,css:Ke,html:Ye,md:xe,mdx:xe,bash:be,sh:be,yaml:he,yml:he},bt={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 vt(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(vt).join(""):(0,te.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?vt(e.props.children):""}function Dr(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,k.jsx)(G.Folder,{size:Pe,strokeWidth:Oe,className:c(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=o.split(".").pop()||"",a=Hr[n];if(a)return(0,k.jsx)(a,{size:Pe});let i=c(r,"text-text-dim group-hover:text-text-main");return bt.CODE.test(o)?(0,k.jsx)(G.FileCode,{size:Pe,strokeWidth:Oe,className:i}):bt.TEXT.test(o)?(0,k.jsx)(G.FileText,{size:Pe,strokeWidth:Oe,className:i}):bt.IMAGE.test(o)?(0,k.jsx)(G.FileImage,{size:Pe,strokeWidth:Oe,className:i}):(0,k.jsx)(G.File,{size:Pe,strokeWidth:Oe,className:i})}function ht(e,t){if(!(0,te.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 Fr(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function tt(e,t="root"){if(!(0,te.isValidElement)(e))return[];let o=[];if(ht(e,"ul"))return te.Children.forEach(e.props.children,(r,n)=>{o.push(...tt(r,`${t}-${n}`))}),o;if(ht(e,"li")){let r=te.Children.toArray(e.props.children),n=r.findIndex(C=>ht(C,"ul")),a=n!==-1,i=a?r.slice(0,n):r,l=a?r.slice(n):[],s=vt(i),{name:d,comment:p}=Fr(s),m=d.endsWith("/"),f=m?d.slice(0,-1):d,b=a||m;return o.push({id:`${t}-${f}`,name:f,comment:p,isFolder:b,children:a?tt(l[0],`${t}-${f}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&te.Children.forEach(e.props.children,(r,n)=>{o.push(...tt(r,`${t}-${n}`))}),o}function Eo({item:e}){return(0,k.jsxs)(oe.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,k.jsx)(oe.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,k.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,k.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,k.jsx)(oe.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,k.jsx)(G.ChevronRight,{size:14,strokeWidth:3,className:c("transition-transform duration-200",t&&"rotate-90")})}):(0,k.jsx)("div",{className:"w-[18px]"}),Dr(e.name,e.isFolder),(0,k.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,k.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,k.jsx)(oe.Collection,{items:e.children,children:t=>(0,k.jsx)(Eo,{item:t})})]})}function Oo({children:e}){let t=(0,te.useMemo)(()=>tt(e),[e]);return(0,k.jsx)("div",{className:"my-8",children:(0,k.jsx)(oe.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,k.jsx)(Eo,{item:o})})})}var Ve=w(require("react-aria-components"));var we=require("react");function Vo({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,a]=(0,we.useState)(null),[i,l]=(0,we.useState)(1),s=(0,we.useMemo)(()=>{if(!e)return[];let f=[...e];return t&&n!==null&&f.sort((b,C)=>{let P=b[n.key],g=C[n.key],W=typeof P=="string"?P:"",x=typeof g=="string"?g:"";return W<x?n.direction==="asc"?-1:1:W>x?n.direction==="asc"?1:-1:0}),f},[e,n,t]),d=Math.ceil(s.length/r),p=(0,we.useMemo)(()=>{if(!o)return s;let f=(i-1)*r;return s.slice(f,f+r)},[s,o,i,r]);return{sortConfig:n,currentPage:i,setCurrentPage:l,totalPages:d,paginatedData:p,requestSort:f=>{if(!t)return;let b="asc";n&&n.key===f&&n.direction==="asc"&&(b="desc"),a({key:f,direction:b})}}}var D=require("lucide-react");var y=require("react/jsx-runtime");function zo({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:a=!1,pageSize:i=10}){let{sortConfig:l,currentPage:s,setCurrentPage:d,totalPages:p,paginatedData:m,requestSort:f}=Vo({data:t,sortable:n,paginated:a,pageSize:i}),b=P=>n?l?.key!==P?(0,y.jsx)(D.ChevronDown,{size:14,className:"ml-1 opacity-30"}):l.direction==="asc"?(0,y.jsx)(D.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,y.jsx)(D.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,C=o||(0,y.jsxs)(y.Fragment,{children:[e&&(0,y.jsx)("thead",{children:(0,y.jsx)("tr",{children:e.map((P,g)=>(0,y.jsx)("th",{onClick:()=>f(g),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,y.jsxs)("div",{className:"flex items-center",children:[P,b(g)]})},g))})}),m&&(0,y.jsx)("tbody",{children:m.map((P,g)=>(0,y.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:P.map((W,x)=>(0,y.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:W},x))},g))})]});return(0,y.jsxs)("div",{className:c("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[(0,y.jsx)("div",{className:"overflow-x-auto",children:(0,y.jsx)("table",{className:"w-full border-collapse text-sm",children:C})}),a&&p>1&&(0,y.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,y.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",s," of ",p]}),(0,y.jsxs)("div",{className:"flex items-center gap-1",children:[(0,y.jsx)(Ve.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,y.jsx)(D.ChevronsLeft,{size:16})}),(0,y.jsx)(Ve.Button,{onPress:()=>d(P=>Math.max(P-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,y.jsx)(D.ChevronLeft,{size:16})}),(0,y.jsx)(Ve.Button,{onPress:()=>d(P=>Math.min(P+1,p)),isDisabled:s===p,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,y.jsx)(D.ChevronRight,{size:16})}),(0,y.jsx)(Ve.Button,{onPress:()=>d(p),isDisabled:s===p,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,y.jsx)(D.ChevronsRight,{size:16})})]})]})]})}var F=require("react/jsx-runtime");function Ho({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:a,className:i=""}){return(0,F.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",i),id:a,children:[(0,F.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,F.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,F.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,F.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,F.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,F.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&(0,F.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,F.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,F.jsx)("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),(0,F.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}var Fo=require("react/jsx-runtime");function Do({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=c("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,Fo.jsx)(pe,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}var $o=require("react/jsx-runtime");function Wo({src:e,alt:t,theme:o,...r}){let{theme:n}=Ft();return o&&o!==n?null:(0,$o.jsx)("img",{src:e,alt:t||"",...r})}var T=require("react/jsx-runtime");function jo({title:e,props:t,className:o=""}){return(0,T.jsxs)("div",{className:c("my-6",o),children:[e&&(0,T.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,T.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,T.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,T.jsx)("thead",{children:(0,T.jsxs)("tr",{children:[(0,T.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,T.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,T.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,T.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,T.jsx)("tbody",{children:t.map((r,n)=>(0,T.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,T.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,T.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,T.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,T.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,T.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,T.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,T.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,T.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,T.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}var yt=require("react");function Go(e){let{code:t,children:o,preview:r}=e,n=(0,yt.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),a=(0,yt.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:a}}var Te=require("react/jsx-runtime");function _o(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:i,previewElement:l}=Go(e);return(0,Te.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,Te.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:l}),!o&&(0,Te.jsx)("div",{className:"border-t border-border-subtle",children:(0,Te.jsx)(me,{hideSandbox:r,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,plain:!0,children:i})})]})}var sr=require("react"),ie=require("lucide-react");var Uo=require("react");var Wr=require("react-aria-components"),ot=require("lucide-react");var qo=require("react/jsx-runtime");var ze=w(require("react-aria-components")),$r=require("lucide-react");var Ct=require("react/jsx-runtime");var M=w(require("react-aria-components")),fe=require("lucide-react");var R=require("react/jsx-runtime"),jr=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,R.jsx)(M.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,R.jsx)(M.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,R.jsx)(M.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Gr=({children:e,className:t,onSelectionChange:o,...r})=>(0,R.jsx)("div",{className:t,children:(0,R.jsx)(M.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),_r=({className:e,...t})=>(0,R.jsxs)(M.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,R.jsx)(fe.Search,{className:"h-5 w-5 text-text-muted"}),(0,R.jsx)(M.Input,{...t,className:c("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,R.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,R.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),Ur=({children:e,className:t,...o})=>(0,R.jsx)(M.ListBox,{...o,className:c("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),qr=({children:e,className:t,...o})=>(0,R.jsx)(M.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,R.jsxs)(R.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,R.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,R.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,R.jsx)(fe.CornerDownLeft,{size:10})]})]})}),Xr=({isHeading:e,className:t})=>(0,R.jsx)("div",{className:c("shrink-0",t),children:e?(0,R.jsx)(fe.Hash,{size:18}):(0,R.jsx)(fe.FileText,{size:18})}),Jr=({children:e,className:t})=>(0,R.jsx)("span",{className:c("block font-medium truncate flex-1 text-sm",t),children:e}),Kr=({children:e,className:t})=>(0,R.jsx)("span",{className:c("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),Oa={Root:jr,Autocomplete:Gr,Input:_r,List:Ur,Item:Object.assign(qr,{Icon:Xr,Title:Jr,Bio:Kr})};var Z=require("react"),Yr=w(require("scroll-into-view-if-needed"));var Xo=require("react");var Jo=require("react/jsx-runtime"),Ja=(0,Z.createContext)(null),Ka=(0,Z.createContext)(null);var Zr=({children:e,className:t,ref:o,...r})=>{let n=(0,Z.useRef)(null);return(0,Z.useImperativeHandle)(o,()=>n.current),(0,Jo.jsx)("div",{ref:n,className:c("relative overflow-y-auto boltdocs-otp-content",t),...r,children:e})};Zr.displayName="OnThisPageContent";var Ko=w(require("react-aria-components")),nt=require("lucide-react");var _=require("react/jsx-runtime"),Qr=({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}),en=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,_.jsxs)(Ko.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)(nt.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)(nt.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},tn=({children:e,className:t})=>(0,_.jsx)("span",{className:c("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),on=({children:e,className:t})=>(0,_.jsx)("span",{className:c("text-base font-bold text-text-main truncate",t),children:e}),rn=({children:e})=>(0,_.jsx)(_.Fragment,{children:e}),ei={PageNavRoot:Qr,PageNavLink:Object.assign(en,{Title:tn,Description:on,Icon:rn})};var nn=require("react/jsx-runtime");var sn=w(require("react-aria-components")),an=require("lucide-react");var Yo=require("react/jsx-runtime");var Rt=require("react-aria-components"),ln=require("lucide-react");var cn=require("react/jsx-runtime");var Qo=require("react/jsx-runtime"),Zo=({children:e,className:t,vertical:o=!1})=>(0,Qo.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 Ae=require("lucide-react"),tr=w(require("react")),I=w(require("react-aria-components"));var Le=w(require("react-aria-components"));var ke=require("react/jsx-runtime"),er=({children:e,className:t,showArrow:o,...r})=>(0,ke.jsxs)(Le.Popover,{offset:8,...r,className:Le.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 transition-none",n)),children:[o&&(0,ke.jsx)(Le.OverlayArrow,{className:"group",children:(0,ke.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,ke.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var O=require("react/jsx-runtime");function or(e){let[t,o]=tr.default.Children.toArray(e.children).slice(0,2);return(0,O.jsxs)(I.MenuTrigger,{...e,children:[t,(0,O.jsx)(er,{placement:e.placement,className:"min-w-35",children:o})]})}function rr(e){return(0,O.jsx)(I.Menu,{...e,className:I.composeRenderProps(e.className,t=>c("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function Nt(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,O.jsx)(I.MenuItem,{...e,textValue:t,className:I.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:a})=>c("group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none","text-text-main text-[12px]",{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":r,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":a},o)),children:I.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:a})=>(0,O.jsxs)(O.Fragment,{children:[r!=="none"&&(0,O.jsxs)("span",{className:"flex items-center size-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,O.jsx)(Ae.Check,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,O.jsx)(Ae.Dot,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,O.jsx)("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:o}),a&&(0,O.jsx)(Ae.ChevronRight,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}var nr=require("react/jsx-runtime");function B({className:e,variant:t="rect",...o}){return(0,nr.jsx)("div",{className:c("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}var rt=require("react-aria-components");var S=require("react/jsx-runtime"),dn=e=>{let[t,o]=(0,sr.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(a);window.open(i,"_blank")}}};function ar({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:i}=dn(r),l=o!==!1,s=typeof o=="object"&&o.text||"Copy Markdown";return!l||!r?null:(0,S.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,S.jsxs)(Zo,{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,S.jsx)(Be,{variant:"ghost",onPress:a,icon:n?(0,S.jsx)(ie.Check,{size:16}):(0,S.jsx)(ie.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,S.jsxs)(or,{placement:"bottom end",children:[(0,S.jsx)(Be,{variant:"ghost",isIconOnly:!0,icon:(0,S.jsx)(ie.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,S.jsxs)(rr,{className:"w-52",children:[(0,S.jsxs)(Nt,{onAction:a,children:[(0,S.jsx)(ie.Copy,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,S.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,S.jsxs)(Nt,{onAction:i,children:[(0,S.jsx)(ie.ExternalLink,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,S.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}var N=require("react/jsx-runtime");function ir(){return(0,N.jsx)("div",{className:c("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:(0,N.jsxs)("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[(0,N.jsxs)("div",{className:"flex gap-2",children:[(0,N.jsx)(B,{className:"h-3 w-16"}),(0,N.jsx)(B,{className:"h-3 w-24"})]}),(0,N.jsx)(B,{className:"h-10 w-[60%] sm:h-12"}),(0,N.jsxs)("div",{className:"space-y-3",children:[(0,N.jsx)(B,{className:"h-4 w-full"}),(0,N.jsx)(B,{className:"h-4 w-[95%]"}),(0,N.jsx)(B,{className:"h-4 w-[40%]"})]}),(0,N.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,N.jsx)(B,{className:"h-7 w-32"}),(0,N.jsxs)("div",{className:"space-y-3",children:[(0,N.jsx)(B,{className:"h-4 w-full"}),(0,N.jsx)(B,{className:"h-4 w-[98%]"}),(0,N.jsx)(B,{className:"h-4 w-[92%]"}),(0,N.jsx)(B,{className:"h-4 w-[60%]"})]})]}),(0,N.jsx)(B,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),(0,N.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,N.jsx)(B,{className:"h-7 w-48"}),(0,N.jsxs)("div",{className:"space-y-3",children:[(0,N.jsx)(B,{className:"h-4 w-full"}),(0,N.jsx)(B,{className:"h-4 w-[85%]"})]})]})]})})}var U=require("react/jsx-runtime"),Se=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return(0,U.jsxs)(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&(0,U.jsx)("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:(0,U.jsx)(lr.Link,{size:16})})]})},cr={...Pt,Loading:ir,h1:e=>(0,U.jsx)(Se,{level:1,...e}),h2:e=>(0,U.jsx)(Se,{level:2,...e}),h3:e=>(0,U.jsx)(Se,{level:3,...e}),h4:e=>(0,U.jsx)(Se,{level:4,...e}),h5:e=>(0,U.jsx)(Se,{level:5,...e}),h6:e=>(0,U.jsx)(Se,{level:6,...e}),pre:e=>(0,U.jsx)(me,{...e,children:e.children})};var dr=w(require("virtual:boltdocs-mdx-components"));var pr=require("react-router-dom");var h=require("react/jsx-runtime");function mn(){let{currentLocale:e,config:t}=Me();return(0,V.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 un(){let e=(0,pr.useLocation)(),{config:t}=Me(),o=re(i=>i.setLocale),r=re(i=>i.setVersion),n=re(i=>i.currentLocale),a=re(i=>i.currentVersion);return(0,V.useEffect)(()=>{let i=e.pathname.split("/").filter(Boolean),l=0,s=t.versions?.defaultVersion,d=t.i18n?.defaultLocale;if(i[l]==="docs"&&l++,t.versions&&i.length>l){let p=t.versions.versions.find(m=>m.path===i[l]);p&&(s=p.path,l++)}t.i18n&&i.length>l&&t.i18n.locales[i[l]]?d=i[l]:t.i18n&&i.length===0&&(d=n||t.i18n.defaultLocale),d!==n&&o(d),s!==a&&r(s)},[e.pathname,t,o,r,n,a]),null}function mr({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:a,externalPages:i,externalLayout:l,components:s={}}){let[d,p]=(0,V.useState)(e),[m,f]=(0,V.useState)(t),b=i||{},C=l||wt.default,P=(0,V.useMemo)(()=>d.filter(x=>!(a&&(x.path==="/"||x.path===""))&&!b[x.path===""?"/":x.path]).map(x=>{let q=Object.keys(r).find($=>$===`/${o}/${x.filePath}`||$.endsWith(`/${o}/${x.filePath}`)||$.endsWith(`/${o}\\${x.filePath.replace(/\\/g,"/")}`)),le=q?r[q]:null;return{...x,Component:V.default.lazy(async()=>le?await le():{default:pt})}}),[d,r,o,a,b]);(0,V.useEffect)(()=>{n&&(n.on("boltdocs:routes-update",x=>{p(x)}),n.on("boltdocs:config-update",x=>{f(x)}))},[n]);let g=(0,V.useMemo)(()=>({...cr,...dr.default,...s}),[s]),W=g.Loading;return(0,h.jsx)(Dt,{children:(0,h.jsx)(eo,{components:g,children:(0,h.jsx)(it.Provider,{value:m,children:(0,h.jsx)(Gt,{children:(0,h.jsxs)(At,{routes:d,modules:r,children:[(0,h.jsx)(Xt,{}),(0,h.jsx)(un,{}),(0,h.jsx)(mn,{}),(0,h.jsxs)(Q.Routes,{children:[(0,h.jsx)(Q.Route,{element:(0,h.jsx)(Yt,{}),children:P.map(x=>(0,h.jsx)(Q.Route,{path:x.path===""?"/":x.path,element:(0,h.jsx)(V.default.Suspense,{fallback:(0,h.jsx)(W,{}),children:(0,h.jsx)(ro,{Component:x.Component})})},x.path))},"docs-layout"),a&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Q.Route,{path:"/",element:(0,h.jsx)(C,{children:(0,h.jsx)(a,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(x=>(0,h.jsx)(Q.Route,{path:`/${x}`,element:(0,h.jsx)(C,{children:(0,h.jsx)(a,{})})},`home-${x}`))]}),Object.entries(b).map(([x,q])=>{let le=x==="/"?"":x;return(0,h.jsxs)(V.default.Fragment,{children:[(0,h.jsx)(Q.Route,{path:x,element:(0,h.jsx)(C,{children:(0,h.jsx)(q,{})})}),m.i18n&&Object.keys(m.i18n.locales).map($=>(0,h.jsx)(Q.Route,{path:`/${$}${le}`,element:(0,h.jsx)(C,{children:(0,h.jsx)(q,{})})},`${x}-${$}`))]},x)}),(0,h.jsx)(Q.Route,{path:"*",element:(0,h.jsx)(wt.default,{children:(0,h.jsx)(pt,{})})})]})]})})})})})}var st=require("react/jsx-runtime");async function fn(e){let{path:t,routes:o,config:r,modules:n,homePage:a,externalPages:i,docsDirName:l}=e,s={};for(let[p,m]of Object.entries(n))s[p]=()=>Promise.resolve(m);return fr.default.renderToString((0,st.jsx)(ur.default.StrictMode,{children:(0,st.jsx)(gr.StaticRouter,{location:t,children:(0,st.jsx)(mr,{initialRoutes:o,initialConfig:r,docsDirName:l,modules:s,homePage:a,externalPages:i})})}))}0&&(module.exports={render});
1
+ "use strict";var Zo=Object.create;var He=Object.defineProperty;var Qo=Object.getOwnPropertyDescriptor;var er=Object.getOwnPropertyNames;var tr=Object.getPrototypeOf,or=Object.prototype.hasOwnProperty;var ht=(e,t)=>{for(var o in t)He(e,o,{get:t[o],enumerable:!0})},vt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of er(t))!or.call(e,n)&&n!==o&&He(e,n,{get:()=>t[n],enumerable:!(r=Qo(t,n))||r.enumerable});return e};var M=(e,t,o)=>(o=e!=null?Zo(tr(e)):{},vt(t||!e||!e.__esModule?He(o,"default",{value:e,enumerable:!0}):o,e)),rr=e=>vt(He({},"__esModule",{value:!0}),e);var Er={};ht(Er,{render:()=>Br});module.exports=rr(Er);var Xo=M(require("react")),Ko=M(require("react-dom/server")),Yo=require("react-router-dom/server");var V=M(require("react")),Ar=M(require("react-dom/client")),K=require("react-router-dom");var At=require("lucide-react");var ot=M(require("react")),kt=require("react-aria-components"),Lt=require("react-router-dom");var ze=require("react"),et=(0,ze.createContext)(null);function ae(){let e=(0,ze.use)(et);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Pt=require("react-router-dom");var ie=require("react"),Rt=require("react/jsx-runtime"),yt=(0,ie.createContext)({preload:()=>{},routes:[]});function Ie(){return(0,ie.use)(yt)}function Ct({routes:e,modules:t,children:o}){let r=(0,ie.useRef)(null),n=(0,ie.useCallback)(a=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let i=a.split("#")[0].split("?")[0],l=e.find(s=>s.path===i||i==="/"&&s.path==="");if(l?.filePath){let s=Object.keys(t).find(c=>c.endsWith("/"+l.filePath));s&&t[s]().catch(c=>{console.error(`[boltdocs] Failed to preload route ${a}:`,c)})}},100)},[e,t]);return(0,Rt.jsx)(yt.Provider,{value:{preload:n,routes:e},children:o})}var wt=require("zustand"),Oe=require("zustand/middleware"),ee=(0,wt.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 Ae(){let{routes:e}=Ie(),t=ae(),o=(0,Pt.useLocation)(),r=ee(g=>g.currentLocale),n=ee(g=>g.currentVersion),a=ee(g=>g.hasHydrated),i=e.find(g=>g.path===o.pathname),l=t.i18n?i?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,s=t.versions?i?.version||(a?n:void 0)||t.versions.defaultVersion:void 0,c=e.filter(g=>{let F=t.i18n?(g.locale||t.i18n.defaultLocale)===l:!0,b=t.versions?(g.version||t.versions.defaultVersion)===s:!0;if(!(F&&b))return!1;let U=t.i18n;if(U){let se=!!i?.locale,W=!!g.locale;if(e.some(Ve=>Ve!==g&&Ve.filePath===g.filePath&&Ve.version===g.version&&(Ve.locale||U.defaultLocale)===(g.locale||U.defaultLocale))&&se!==W)return!1}return!0}),m=t.i18n?.localeConfigs?.[l]?.label||t.i18n?.locales[l]||l,x=t.versions?.versions.find(g=>g.path===s)?.label||s,C=t.i18n?Object.entries(t.i18n.locales).map(([g,F])=>{let b=t.i18n?.localeConfigs?.[g];return{key:g,label:b?.label||F,isCurrent:g===l}}):[],w=t.versions?t.versions.versions.map(g=>({key:g.path,label:g.label,isCurrent:g.path===s})):[];return{routes:c,allRoutes:e,currentRoute:i,currentLocale:l,currentLocaleLabel:m,availableLocales:C,currentVersion:s,currentVersionLabel:x,availableVersions:w,config:t}}function tt(e){let t=ae(),{currentLocale:o,currentVersion:r}=Ae();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,a=t.versions;if(!n&&!a)return e;let i=e.startsWith("/docs"),l=e.split("/").filter(Boolean),s=0;l[s]==="docs"&&s++,a&&l.length>s&&a.versions.find(x=>x.path===l[s])&&s++,n&&l.length>s&&n.locales[l[s]]&&s++;let c=l.slice(s),d=[];i&&(d.push("docs"),a&&r&&d.push(r)),n&&o&&o!==n.defaultLocale&&d.push(o),d.push(...c);let m=`/${d.join("/")}`;return m.length>1&&m.endsWith("/")?m.slice(0,-1):m||"/"}var Nt=require("clsx"),Tt=require("tailwind-merge");function p(...e){return(0,Tt.twMerge)((0,Nt.clsx)(e))}var rt=require("react/jsx-runtime"),de=ot.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:a,...i}=e,l=tt(o??""),{preload:s}=Ie();return(0,rt.jsx)(kt.Link,{...i,ref:t,href:l,onMouseEnter:m=>{n?.(m),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)},onFocus:m=>{a?.(m),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&s(l)}})});de.displayName="Link";var nr=ot.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:a,...i}=e,l=(0,Lt.useLocation)(),s=tt(o??""),c=r?l.pathname===s:l.pathname.startsWith(s),d=typeof n=="function"?n({isActive:c}):p(n,c&&"active"),m=typeof a=="function"?a({isActive:c}):a;return(0,rt.jsx)(de,{...i,ref:t,href:o,className:d,children:m})});nr.displayName="NavLink";var te=require("react/jsx-runtime");function nt(){return(0,te.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,te.jsxs)("div",{className:"space-y-4",children:[(0,te.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,te.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,te.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,te.jsxs)(de,{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,te.jsx)(At.ArrowLeft,{size:16})," Go to Home"]})]})})}var j=require("react"),Et=require("react/jsx-runtime"),Mt=(0,j.createContext)(void 0);function St({children:e}){let[t,o]=(0,j.useState)("system"),[r,n]=(0,j.useState)("dark"),[a,i]=(0,j.useState)(!1);(0,j.useEffect)(()=>{i(!0);let s=localStorage.getItem("boltdocs-theme"),c=s==="light"||s==="dark"||s==="system"?s:"system";o(c);let d=window.matchMedia("(prefers-color-scheme: dark)");((x,C)=>{n(x==="system"?C?"dark":"light":x)})(c,d.matches);let f=x=>{n(C=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?x.matches?"dark":"light":C)};return d.addEventListener("change",f),()=>d.removeEventListener("change",f)},[]),(0,j.useEffect)(()=>{if(!a)return;let s=window.matchMedia("(prefers-color-scheme: dark)").matches,c=t==="system"?s?"dark":"light":t;n(c);let d=document.documentElement;c==="light"?(d.classList.add("theme-light"),d.dataset.theme="light"):(d.classList.remove("theme-light"),d.dataset.theme="dark")},[t,a]);let l=s=>{o(s),localStorage.setItem("boltdocs-theme",s)};return(0,Et.jsx)(Mt.Provider,{value:{theme:t,resolvedTheme:r,setTheme:l},children:e})}function Bt(){let e=(0,j.use)(Mt);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var xt=M(require("virtual:boltdocs-layout"));var Vt=require("react"),Ht=require("react-aria-components"),De=require("react-router-dom"),It=require("react/jsx-runtime");function zt({children:e}){let t=(0,De.useNavigate)();return(0,It.jsx)(Ht.RouterProvider,{navigate:(o,r)=>{(0,Vt.startTransition)(()=>{t(o,r)})},useHref:De.useHref,children:e})}var Ot=require("react"),Dt=require("react-router-dom");function Ft(){let{pathname:e,hash:t}=(0,Dt.useLocation)();return(0,Ot.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content")||window,r=()=>o===window?window.scrollY:o.scrollTop,n=(a,i="auto")=>{o===window?window.scrollTo({top:a,behavior:i}):o.scrollTo({top:a,behavior:i})};if(t){let a=t.replace("#",""),i=document.getElementById(a);if(i){let s=o===window?0:o.getBoundingClientRect().top,m=i.getBoundingClientRect().top-s-80+r();n(m,"smooth");return}}n(0)},[e,t]),null}var Wt=require("react-router-dom"),$t=M(require("virtual:boltdocs-layout")),st=require("react/jsx-runtime");function Gt(){return(0,st.jsx)($t.default,{children:(0,st.jsx)(Wt.Outlet,{})})}var Jt=require("@mdx-js/react");var Fe=require("react"),qt=require("react/jsx-runtime"),_t=(0,Fe.createContext)({});function Ut(){return(0,Fe.use)(_t)}function jt({components:e,children:t}){return(0,qt.jsx)(_t.Provider,{value:e,children:t})}var at=require("react/jsx-runtime");function Xt({Component:e}){let t=Ut();return(0,at.jsx)(Jt.MDXProvider,{components:t,children:(0,at.jsx)(e,{})})}var _o=require("lucide-react");var bt={};ht(bt,{Admonition:()=>re,Badge:()=>po,Button:()=>Yt,Card:()=>bo,Cards:()=>go,Caution:()=>No,CodeBlock:()=>le,ComponentPreview:()=>Oo,ComponentProps:()=>zo,CopyMarkdown:()=>$o,Danger:()=>Ro,Field:()=>So,FileTree:()=>Lo,Image:()=>Vo,Important:()=>Po,InfoBox:()=>wo,Link:()=>Bo,List:()=>To,Note:()=>vo,Tab:()=>ao,Table:()=>Mo,Tabs:()=>io,Tip:()=>yo,Video:()=>lo,Warning:()=>Co});var $e=M(require("react-aria-components"));var Kt=require("class-variance-authority"),q=require("react/jsx-runtime"),We=(0,Kt.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"}}),pe=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:a,variant:i,size:l,rounded:s,iconSize:c,disabled:d,...m})=>{let f=r||!n&&!!t,x=f?(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)($e.Link,{href:e,className:p(We({variant:i,size:l,rounded:s,iconSize:f?c:void 0,disabled:d}),a),...m,children:x}):(0,q.jsx)($e.Button,{className:p(We({variant:i,size:l,rounded:s,iconSize:f?c:void 0,disabled:d}),a),...m,children:x})};var Zt=require("react/jsx-runtime"),Yt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:a,...i})=>(0,Zt.jsx)(pe,{className:p("group",We({variant:t,size:o,rounded:r,iconSize:n,disabled:a,className:e})),...i});var Je=M(require("react-aria-components")),he=require("lucide-react");var it=require("codesandbox/lib/api/define.js");function Qt(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",a=e.description||"Generic Sandbox",i={};for(let[l,s]of Object.entries(t)){let c=typeof s.content=="object"?JSON.stringify(s.content,null,2):s.content;i[l]={content:c,isBinary:s.isBinary??!1}}if(!i["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"};i["package.json"]={content:JSON.stringify({private:!0,name:n,description:a,type:"module",version:"1.0.0",scripts:e.scripts||s,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return i}function sr(e){let t=Qt(e),o=(0,it.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 eo(e){if(typeof window>"u")return sr(e);let t=Qt(e),o=(0,it.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 a=(l,s)=>{let c=document.createElement("input");c.type="hidden",c.name=l,c.value=s,n.appendChild(c)},i=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return a("query",i.toString()),a("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 to=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 J=require("react");function oo(e){let{title:t,sandbox:o}=e,[r,n]=(0,J.useState)(!1),[a,i]=(0,J.useState)(!1),[l,s]=(0,J.useState)(!1),c=(0,J.useRef)(null),d=ae(),m=(0,J.useCallback)(async()=>{let x=c.current?.textContent??"";to(x),n(!0),setTimeout(()=>n(!1),2e3)},[]),f=(0,J.useCallback)(()=>{let x=c.current?.textContent??"",C=d?.integrations?.sandbox?.config||{},w=typeof o=="object"?o:C,g=w.entry||"src/App.tsx";eo({title:t??"Code Snippet",...w,files:{...w.files,[g]:{content:x}}})},[t,d,o]);return(0,J.useEffect)(()=>{let x=c.current?.textContent?.length??0;s(x>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:a,setIsExpanded:i,isExpandable:l,preRef:c,handleCopy:m,handleSandbox:f,shouldTruncate:l&&!a}}var v=require("react/jsx-runtime");function Y(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var ro=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...Y(e),children:[(0,v.jsx)("title",{children:"CodeSandbox"}),(0,v.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var Ge=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"TypeScript"}),(0,v.jsx)("path",{fill:"#2563EB",d:"M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z"})]}),_e=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"JavaScript"}),(0,v.jsx)("path",{fill:"#F59E0B",d:"M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z"})]}),Ue=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"JSON"}),(0,v.jsx)("path",{fill:"#F59E0B",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),je=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"CSS"}),(0,v.jsx)("path",{fill:"#0EA5E9",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),qe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"HTML"}),(0,v.jsx)("path",{fill:"#EA580C",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]});var me=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"React"}),(0,v.jsx)("path",{fill:"#0E8ADC",d:"M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z"}),(0,v.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z"})]}),ue=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"Markdown"}),(0,v.jsx)("path",{fill:"#60A5FA",d:"M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z"})]}),fe=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...Y(e),children:[(0,v.jsx)("title",{children:"Shell"}),(0,v.jsx)("path",{stroke:"#14B8A6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.336 17l6-6-6-6M12.336 19h8"})]}),ge=e=>(0,v.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...Y(e),children:[(0,v.jsx)("title",{children:"YAML"}),(0,v.jsx)("path",{fill:"#A78BFA",d:"M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z"})]});var xe=M(require("react-aria-components"));var $=require("react/jsx-runtime"),no=({className:e,children:t,...o})=>(0,$.jsx)(xe.Tooltip,{...o,offset:8,className:r=>p("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)(xe.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]})}),be=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,$.jsxs)(xe.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,$.jsx)(no,{...n,children:e})]});be.Root=be;be.Content=no;var A=require("react/jsx-runtime"),ar={ts:Ge,tsx:me,js:_e,jsx:me,json:Ue,css:je,html:qe,md:ue,mdx:ue,bash:fe,sh:fe,yaml:ge,yml:ge};function le(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:a,title:i,"data-lang":l,plain:s=!1,...c}=e,f=!!ae()?.integrations?.sandbox?.enable&&!r,x=e.lang||l||"",{copied:C,isExpanded:w,setIsExpanded:g,isExpandable:F,preRef:b,handleCopy:U,handleSandbox:se,shouldTruncate:W}=oo(e),Qe=ar[x];return(0,A.jsxs)("div",{className:p("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!s,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":W},e.className),children:[i&&(0,A.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted",children:[Qe?(0,A.jsx)(Qe,{size:14}):(0,A.jsx)(he.File,{size:14,className:"opacity-60"}),(0,A.jsx)("span",{children:i})]}),(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:[f&&(0,A.jsx)(be,{content:"Open in CodeSandbox",children:(0,A.jsx)(Je.Button,{onPress:se,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)(ro,{size:20})})}),!n&&(0,A.jsx)(be,{content:C?"Copied!":"Copy code",children:(0,A.jsx)(Je.Button,{onPress:U,className:p("grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2",C?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:C?(0,A.jsx)(he.Check,{size:20}):(0,A.jsx)(he.Copy,{size:20})})})]}),a?(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:a}}):(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}),F&&(0,A.jsx)("div",{className:p(W?"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)(Je.Button,{onPress:()=>g(!w),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:w?"Show less":"Expand code"})})]})}var ve=require("react"),ce=M(require("react-aria-components"));var oe=require("react");function so({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(c=>!c.props.disabled):e,[r,n]=(0,oe.useState)(o===-1?0:o),a=(0,oe.useRef)([]),[i,l]=(0,oe.useState)({opacity:0,transform:"translateX(0)",width:0});(0,oe.useEffect)(()=>{let c=a.current[r];c&&l({opacity:1,width:c.offsetWidth,transform:`translateX(${c.offsetLeft}px)`})},[r,t]);let s=(0,oe.useCallback)(c=>{let d=0;if(c.key==="ArrowRight"?d=1:c.key==="ArrowLeft"&&(d=-1),d!==0){let m=(r+d+t.length)%t.length;for(;t[m].props.disabled&&m!==r;)m=(m+d+t.length)%t.length;m!==r&&!t[m].props.disabled&&(n(m),a.current[m]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:a,indicatorStyle:i,handleKeyDown:s}}var lt=require("class-variance-authority"),H=require("react/jsx-runtime"),ir=(0,lt.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"}}),lr=(0,lt.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 ao({children:e}){let t=typeof e=="string"?(0,H.jsx)(le,{className:"language-bash",children:(0,H.jsx)("code",{children:e.trim()})}):e;return(0,H.jsx)("div",{className:"py-4",children:t})}function io({defaultIndex:e=0,children:t}){let o=(0,ve.useMemo)(()=>ve.Children.toArray(t).filter(l=>(0,ve.isValidElement)(l)&&l.props?.label),[t]),{active:r,setActive:n,tabRefs:a,indicatorStyle:i}=so({initialIndex:e,tabs:o});return(0,H.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,H.jsxs)(ce.Tabs,{selectedKey:r.toString(),onSelectionChange:l=>n(Number(l)),className:"w-full",children:[(0,H.jsxs)(ce.TabList,{"aria-label":"Content Tabs",className:p(ir()),children:[o.map((l,s)=>{let{label:c,icon:d,disabled:m}=l.props,f=s.toString();return(0,H.jsxs)(ce.Tab,{id:f,isDisabled:m,ref:x=>{a.current[s]=x},className:({isSelected:x,isDisabled:C})=>p(lr({isActive:x,isDisabled:C})),children:[!!d&&(0,H.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:d}),(0,H.jsx)("span",{children:c})]},f)}),(0,H.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:i,"aria-hidden":"true"})]}),o.map((l,s)=>(0,H.jsx)(ce.TabPanel,{id:s.toString(),children:o[s]},s))]})})}var ye=require("react"),Me=require("react/jsx-runtime");function lo({src:e,poster:t,alt:o,children:r,controls:n,preload:a="metadata",...i}){let l=(0,ye.useRef)(null),[s,c]=(0,ye.useState)(!1);return(0,ye.useEffect)(()=>{let d=l.current;if(!d)return;let m=new IntersectionObserver(([f])=>{f.isIntersecting&&(c(!0),m.disconnect())},{rootMargin:"200px"});return m.observe(d),()=>m.disconnect()},[]),(0,Me.jsx)("div",{ref:l,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:s?(0,Me.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...i,children:[r,"Your browser does not support the video tag."]}):(0,Me.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}var co=require("class-variance-authority"),mo=require("react/jsx-runtime"),cr=(0,co.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 po({variant:e="default",children:t,className:o="",...r}){return(0,mo.jsx)("span",{className:p(cr({variant:e}),o),...r,children:t})}var Se=require("react"),uo=M(require("react-aria-components"));var fo=require("class-variance-authority"),z=require("react/jsx-runtime"),dr=(0,fo.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 go({cols:e=3,children:t,className:o="",...r}){return(0,z.jsx)("div",{className:p(dr({cols:e}),o),...r,children:t})}function bo({title:e,icon:t,href:o,children:r,className:n="",...a}){let i=(0,Se.useRef)(null),l=(0,Se.useRef)(null),s=(0,Se.useCallback)(m=>{let f=i.current||l.current;if(!f)return;let{left:x,top:C}=f.getBoundingClientRect();f.style.setProperty("--x",`${m.clientX-x}px`),f.style.setProperty("--y",`${m.clientY-C}px`)},[]),c=(0,z.jsxs)(z.Fragment,{children:[(0,z.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,z.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,z.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,z.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,z.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),d=p("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,z.jsx)(uo.Link,{ref:l,href:o,className:p(d,"no-underline cursor-pointer"),onMouseMove:s,...a,children:c}):(0,z.jsx)("div",{ref:i,role:"presentation",className:d,onMouseMove:s,...a,children:c})}var E=require("lucide-react");var ho=require("class-variance-authority"),T=require("react/jsx-runtime"),pr={note:(0,T.jsx)(E.Bookmark,{size:18}),tip:(0,T.jsx)(E.Lightbulb,{size:18}),info:(0,T.jsx)(E.Info,{size:18}),warning:(0,T.jsx)(E.AlertTriangle,{size:18}),danger:(0,T.jsx)(E.ShieldAlert,{size:18}),important:(0,T.jsx)(E.Flame,{size:18}),caution:(0,T.jsx)(E.Zap,{size:18})},mr={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},xo=(0,ho.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 re({type:e="note",title:t,children:o,className:r="",...n}){return(0,T.jsxs)("div",{className:p(xo({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,T.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,T.jsx)("span",{className:p("shrink-0",xo({type:e})),children:pr[e]}),(0,T.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||mr[e]})]}),(0,T.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var vo=e=>(0,T.jsx)(re,{type:"note",...e}),yo=e=>(0,T.jsx)(re,{type:"tip",...e}),Co=e=>(0,T.jsx)(re,{type:"warning",...e}),Ro=e=>(0,T.jsx)(re,{type:"danger",...e}),wo=e=>(0,T.jsx)(re,{type:"info",...e}),Po=e=>(0,T.jsx)(re,{type:"important",...e}),No=e=>(0,T.jsx)(re,{type:"caution",...e});var Xe=require("react"),Ce=require("lucide-react");var Ke=require("class-variance-authority"),X=require("react/jsx-runtime"),ur=(0,Ke.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}}),fr=(0,Ke.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}}),gr=(0,Ke.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 br({icon:e,children:t,variant:o,dense:r}){return(0,X.jsxs)("li",{className:p(fr({variant:o,dense:r})),children:[e&&(0,X.jsx)("span",{className:p(gr({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,X.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var xr={checked:e=>(0,X.jsx)(Ce.Check,{size:14,className:p("text-emerald-500 shrink-0",e)}),arrow:e=>(0,X.jsx)(Ce.ChevronRight,{size:14,className:p("text-primary-400 shrink-0",e)}),bubble:e=>(0,X.jsx)(Ce.Circle,{size:6,fill:"currentColor",className:p("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function To({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...a}){let i=t!==void 0&&Number(t)>1,l=xr[e],s=ur({variant:e,cols:t,dense:o,isGrid:i,className:n}),c=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,X.jsx)(c,{className:s,...a,children:r}):(0,X.jsx)("ul",{className:s,...a,children:Xe.Children.map(r,d=>{if(!(0,Xe.isValidElement)(d))return d;let m=d,f=m.type==="li"?m.props.children:m.props.children||d;return(0,X.jsx)(br,{icon:l(),variant:e,dense:o,children:f})})})}var Z=require("react"),Q=M(require("react-aria-components")),G=require("lucide-react");var N=require("react/jsx-runtime"),Re=16,Be=2,hr={ts:Ge,tsx:me,js:_e,jsx:me,json:Ue,css:je,html:qe,md:ue,mdx:ue,bash:fe,sh:fe,yaml:ge,yml:ge},ct={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function pt(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(pt).join(""):(0,Z.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?pt(e.props.children):""}function vr(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,N.jsx)(G.Folder,{size:Re,strokeWidth:Be,className:p(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=o.split(".").pop()||"",a=hr[n];if(a)return(0,N.jsx)(a,{size:Re});let i=p(r,"text-text-dim group-hover:text-text-main");return ct.CODE.test(o)?(0,N.jsx)(G.FileCode,{size:Re,strokeWidth:Be,className:i}):ct.TEXT.test(o)?(0,N.jsx)(G.FileText,{size:Re,strokeWidth:Be,className:i}):ct.IMAGE.test(o)?(0,N.jsx)(G.FileImage,{size:Re,strokeWidth:Be,className:i}):(0,N.jsx)(G.File,{size:Re,strokeWidth:Be,className:i})}function dt(e,t){if(!(0,Z.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 yr(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Ye(e,t="root"){if(!(0,Z.isValidElement)(e))return[];let o=[];if(dt(e,"ul"))return Z.Children.forEach(e.props.children,(r,n)=>{o.push(...Ye(r,`${t}-${n}`))}),o;if(dt(e,"li")){let r=Z.Children.toArray(e.props.children),n=r.findIndex(C=>dt(C,"ul")),a=n!==-1,i=a?r.slice(0,n):r,l=a?r.slice(n):[],s=pt(i),{name:c,comment:d}=yr(s),m=c.endsWith("/"),f=m?c.slice(0,-1):c,x=a||m;return o.push({id:`${t}-${f}`,name:f,comment:d,isFolder:x,children:a?Ye(l[0],`${t}-${f}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&Z.Children.forEach(e.props.children,(r,n)=>{o.push(...Ye(r,`${t}-${n}`))}),o}function ko({item:e}){return(0,N.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,N.jsx)(Q.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,N.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,N.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,N.jsx)(Q.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,N.jsx)(G.ChevronRight,{size:14,strokeWidth:3,className:p("transition-transform duration-200",t&&"rotate-90")})}):(0,N.jsx)("div",{className:"w-[18px]"}),vr(e.name,e.isFolder),(0,N.jsx)("span",{className:p("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,N.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,N.jsx)(Q.Collection,{items:e.children,children:t=>(0,N.jsx)(ko,{item:t})})]})}function Lo({children:e}){let t=(0,Z.useMemo)(()=>Ye(e),[e]);return(0,N.jsx)("div",{className:"my-8",children:(0,N.jsx)(Q.Tree,{items:t,"aria-label":"File Tree",className:p("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,N.jsx)(ko,{item:o})})})}var Ee=M(require("react-aria-components"));var we=require("react");function Ao({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,a]=(0,we.useState)(null),[i,l]=(0,we.useState)(1),s=(0,we.useMemo)(()=>{if(!e)return[];let f=[...e];return t&&n!==null&&f.sort((x,C)=>{let w=x[n.key],g=C[n.key],F=typeof w=="string"?w:"",b=typeof g=="string"?g:"";return F<b?n.direction==="asc"?-1:1:F>b?n.direction==="asc"?1:-1:0}),f},[e,n,t]),c=Math.ceil(s.length/r),d=(0,we.useMemo)(()=>{if(!o)return s;let f=(i-1)*r;return s.slice(f,f+r)},[s,o,i,r]);return{sortConfig:n,currentPage:i,setCurrentPage:l,totalPages:c,paginatedData:d,requestSort:f=>{if(!t)return;let x="asc";n&&n.key===f&&n.direction==="asc"&&(x="desc"),a({key:f,direction:x})}}}var I=require("lucide-react");var y=require("react/jsx-runtime");function Mo({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:a=!1,pageSize:i=10}){let{sortConfig:l,currentPage:s,setCurrentPage:c,totalPages:d,paginatedData:m,requestSort:f}=Ao({data:t,sortable:n,paginated:a,pageSize:i}),x=w=>n?l?.key!==w?(0,y.jsx)(I.ChevronDown,{size:14,className:"ml-1 opacity-30"}):l.direction==="asc"?(0,y.jsx)(I.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,y.jsx)(I.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,C=o||(0,y.jsxs)(y.Fragment,{children:[e&&(0,y.jsx)("thead",{children:(0,y.jsx)("tr",{children:e.map((w,g)=>(0,y.jsx)("th",{onClick:()=>f(g),className:p("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,y.jsxs)("div",{className:"flex items-center",children:[w,x(g)]})},g))})}),m&&(0,y.jsx)("tbody",{children:m.map((w,g)=>(0,y.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:w.map((F,b)=>(0,y.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:F},b))},g))})]});return(0,y.jsxs)("div",{className:p("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[(0,y.jsx)("div",{className:"overflow-x-auto",children:(0,y.jsx)("table",{className:"w-full border-collapse text-sm",children:C})}),a&&d>1&&(0,y.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,y.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",s," of ",d]}),(0,y.jsxs)("div",{className:"flex items-center gap-1",children:[(0,y.jsx)(Ee.Button,{onPress:()=>c(1),isDisabled:s===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(I.ChevronsLeft,{size:16})}),(0,y.jsx)(Ee.Button,{onPress:()=>c(w=>Math.max(w-1,1)),isDisabled:s===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(I.ChevronLeft,{size:16})}),(0,y.jsx)(Ee.Button,{onPress:()=>c(w=>Math.min(w+1,d)),isDisabled:s===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(I.ChevronRight,{size:16})}),(0,y.jsx)(Ee.Button,{onPress:()=>c(d),isDisabled:s===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,y.jsx)(I.ChevronsRight,{size:16})})]})]})]})}var O=require("react/jsx-runtime");function So({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:a,className:i=""}){return(0,O.jsxs)("article",{className:p("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",i),id:a,children:[(0,O.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,O.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,O.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,O.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,O.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,O.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&(0,O.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,O.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,O.jsx)("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),(0,O.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}var Eo=require("react/jsx-runtime");function Bo({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=p("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,Eo.jsx)(de,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}var Ho=require("react/jsx-runtime");function Vo({src:e,alt:t,theme:o,...r}){let{theme:n}=Bt();return o&&o!==n?null:(0,Ho.jsx)("img",{src:e,alt:t||"",...r})}var P=require("react/jsx-runtime");function zo({title:e,props:t,className:o=""}){return(0,P.jsxs)("div",{className:p("my-6",o),children:[e&&(0,P.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,P.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,P.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,P.jsx)("thead",{children:(0,P.jsxs)("tr",{children:[(0,P.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,P.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,P.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,P.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,P.jsx)("tbody",{children:t.map((r,n)=>(0,P.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,P.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,P.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,P.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,P.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,P.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,P.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,P.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,P.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,P.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}var mt=require("react");function Io(e){let{code:t,children:o,preview:r}=e,n=(0,mt.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),a=(0,mt.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:a}}var Pe=require("react/jsx-runtime");function Oo(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:i,previewElement:l}=Io(e);return(0,Pe.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,Pe.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:l}),!o&&(0,Pe.jsx)("div",{className:"border-t border-border-subtle",children:(0,Pe.jsx)(le,{hideSandbox:r,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,plain:!0,children:i})})]})}var Wo=require("react"),ne=require("lucide-react");var Do=require("react/jsx-runtime"),ut=({children:e,className:t,vertical:o=!1})=>(0,Do.jsx)("div",{className:p("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 ke=require("lucide-react"),gt=M(require("react")),L=M(require("react-aria-components"));var Te=M(require("react-aria-components"));var Ne=require("react/jsx-runtime"),ft=({children:e,className:t,showArrow:o,...r})=>(0,Ne.jsxs)(Te.Popover,{offset:8,...r,className:Te.composeRenderProps(t,n=>p("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none",n)),children:[o&&(0,Ne.jsx)(Te.OverlayArrow,{className:"group",children:(0,Ne.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,Ne.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var k=require("react/jsx-runtime");function Cr(e){let[t,o]=gt.default.Children.toArray(e.children).slice(0,2);return(0,k.jsxs)(L.MenuTrigger,{...e,children:[t,(0,k.jsx)(ft,{placement:e.placement,className:"min-w-35",children:o})]})}function Rr(e){let[t,o]=gt.default.Children.toArray(e.children).slice(0,2);return(0,k.jsxs)(L.SubmenuTrigger,{...e,children:[t,(0,k.jsx)(ft,{offset:-4,crossOffset:-4,children:o})]})}function D(e){return(0,k.jsx)(L.Menu,{...e,className:L.composeRenderProps(e.className,t=>p("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function wr(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,k.jsx)(L.MenuItem,{...e,textValue:t,className:L.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:a})=>p("group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none","text-text-main text-[12px]",{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":r,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":a},o)),children:L.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:a})=>(0,k.jsxs)(k.Fragment,{children:[r!=="none"&&(0,k.jsxs)("span",{className:"flex items-center size-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,k.jsx)(ke.Check,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,k.jsx)(ke.Dot,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,k.jsx)("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:o}),a&&(0,k.jsx)(ke.ChevronRight,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function Pr({title:e,...t}){return(0,k.jsxs)(L.MenuSection,{...t,className:p("flex flex-col gap-0.5",t.className),children:[e&&(0,k.jsx)(L.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),(0,k.jsx)(L.Collection,{items:t.items,children:t.children})]})}function Nr(e){return(0,k.jsx)(L.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}D.Root=D;D.Item=wr;D.Trigger=Cr;D.SubTrigger=Rr;D.Section=Pr;D.Separator=Nr;var Fo=require("react/jsx-runtime");function B({className:e,variant:t="rect",...o}){return(0,Fo.jsx)("div",{className:p("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}var Tr=require("react-aria-components"),kr=require("react-aria-components");var S=require("react/jsx-runtime"),Lr=e=>{let[t,o]=(0,Wo.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(a);window.open(i,"_blank")}}};function $o({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:i}=Lr(r),l=o!==!1,s=typeof o=="object"&&o.text||"Copy Markdown";return!l||!r?null:(0,S.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,S.jsxs)(ut,{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,S.jsx)(pe,{variant:"ghost",onPress:a,icon:n?(0,S.jsx)(ne.Check,{size:16}):(0,S.jsx)(ne.Copy,{size:16}),iconPosition:"left",className:p("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,S.jsxs)(D.Trigger,{placement:"bottom end",children:[(0,S.jsx)(pe,{variant:"ghost",isIconOnly:!0,icon:(0,S.jsx)(ne.ChevronDown,{size:14}),className:p("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,S.jsxs)(D.Root,{className:"w-52",children:[(0,S.jsxs)(D.Item,{onAction:a,children:[(0,S.jsx)(ne.Copy,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,S.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,S.jsxs)(D.Item,{onAction:i,children:[(0,S.jsx)(ne.ExternalLink,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,S.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}var R=require("react/jsx-runtime");function Go(){return(0,R.jsx)("div",{className:p("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:(0,R.jsxs)("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[(0,R.jsxs)("div",{className:"flex gap-2",children:[(0,R.jsx)(B,{className:"h-3 w-16"}),(0,R.jsx)(B,{className:"h-3 w-24"})]}),(0,R.jsx)(B,{className:"h-10 w-[60%] sm:h-12"}),(0,R.jsxs)("div",{className:"space-y-3",children:[(0,R.jsx)(B,{className:"h-4 w-full"}),(0,R.jsx)(B,{className:"h-4 w-[95%]"}),(0,R.jsx)(B,{className:"h-4 w-[40%]"})]}),(0,R.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,R.jsx)(B,{className:"h-7 w-32"}),(0,R.jsxs)("div",{className:"space-y-3",children:[(0,R.jsx)(B,{className:"h-4 w-full"}),(0,R.jsx)(B,{className:"h-4 w-[98%]"}),(0,R.jsx)(B,{className:"h-4 w-[92%]"}),(0,R.jsx)(B,{className:"h-4 w-[60%]"})]})]}),(0,R.jsx)(B,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),(0,R.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,R.jsx)(B,{className:"h-7 w-48"}),(0,R.jsxs)("div",{className:"space-y-3",children:[(0,R.jsx)(B,{className:"h-4 w-full"}),(0,R.jsx)(B,{className:"h-4 w-[85%]"})]})]})]})})}var _=require("react/jsx-runtime"),Le=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return(0,_.jsxs)(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&(0,_.jsx)("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:(0,_.jsx)(_o.Link,{size:16})})]})},Uo={...bt,Loading:Go,h1:e=>(0,_.jsx)(Le,{level:1,...e}),h2:e=>(0,_.jsx)(Le,{level:2,...e}),h3:e=>(0,_.jsx)(Le,{level:3,...e}),h4:e=>(0,_.jsx)(Le,{level:4,...e}),h5:e=>(0,_.jsx)(Le,{level:5,...e}),h6:e=>(0,_.jsx)(Le,{level:6,...e}),pre:e=>(0,_.jsx)(le,{...e,children:e.children})};var jo=M(require("virtual:boltdocs-mdx-components"));var qo=require("react-router-dom");var h=require("react/jsx-runtime");function Mr(){let{currentLocale:e,config:t}=Ae();return(0,V.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 Sr(){let e=(0,qo.useLocation)(),{config:t}=Ae(),o=ee(i=>i.setLocale),r=ee(i=>i.setVersion),n=ee(i=>i.currentLocale),a=ee(i=>i.currentVersion);return(0,V.useEffect)(()=>{let i=e.pathname.split("/").filter(Boolean),l=0,s=t.versions?.defaultVersion,c=t.i18n?.defaultLocale;if(i[l]==="docs"&&l++,t.versions&&i.length>l){let d=t.versions.versions.find(m=>m.path===i[l]);d&&(s=d.path,l++)}t.i18n&&i.length>l&&t.i18n.locales[i[l]]?c=i[l]:t.i18n&&i.length===0&&(c=n||t.i18n.defaultLocale),c!==n&&o(c),s!==a&&r(s)},[e.pathname,t,o,r,n,a]),null}function Jo({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:a,externalPages:i,externalLayout:l,components:s={}}){let[c,d]=(0,V.useState)(e),[m,f]=(0,V.useState)(t),x=i||{},C=l||xt.default,w=(0,V.useMemo)(()=>c.filter(b=>!(a&&(b.path==="/"||b.path===""))&&!x[b.path===""?"/":b.path]).map(b=>{let U=Object.keys(r).find(W=>W===`/${o}/${b.filePath}`||W.endsWith(`/${o}/${b.filePath}`)||W.endsWith(`/${o}\\${b.filePath.replace(/\\/g,"/")}`)),se=U?r[U]:null;return{...b,Component:V.default.lazy(async()=>se?await se():{default:nt})}}),[c,r,o,a,x]);(0,V.useEffect)(()=>{n&&(n.on("boltdocs:routes-update",b=>{d(b)}),n.on("boltdocs:config-update",b=>{f(b)}))},[n]);let g=(0,V.useMemo)(()=>({...Uo,...jo.default,...s}),[s]),F=g.Loading;return(0,h.jsx)(St,{children:(0,h.jsx)(jt,{components:g,children:(0,h.jsx)(et.Provider,{value:m,children:(0,h.jsx)(zt,{children:(0,h.jsxs)(Ct,{routes:c,modules:r,children:[(0,h.jsx)(Ft,{}),(0,h.jsx)(Sr,{}),(0,h.jsx)(Mr,{}),(0,h.jsxs)(K.Routes,{children:[(0,h.jsx)(K.Route,{element:(0,h.jsx)(Gt,{}),children:w.map(b=>(0,h.jsx)(K.Route,{path:b.path===""?"/":b.path,element:(0,h.jsx)(V.default.Suspense,{fallback:(0,h.jsx)(F,{}),children:(0,h.jsx)(Xt,{Component:b.Component})})},b.path))},"docs-layout"),a&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(K.Route,{path:"/",element:(0,h.jsx)(C,{children:(0,h.jsx)(a,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(b=>(0,h.jsx)(K.Route,{path:`/${b}`,element:(0,h.jsx)(C,{children:(0,h.jsx)(a,{})})},`home-${b}`))]}),Object.entries(x).map(([b,U])=>{let se=b==="/"?"":b;return(0,h.jsxs)(V.default.Fragment,{children:[(0,h.jsx)(K.Route,{path:b,element:(0,h.jsx)(C,{children:(0,h.jsx)(U,{})})}),m.i18n&&Object.keys(m.i18n.locales).map(W=>(0,h.jsx)(K.Route,{path:`/${W}${se}`,element:(0,h.jsx)(C,{children:(0,h.jsx)(U,{})})},`${b}-${W}`))]},b)}),(0,h.jsx)(K.Route,{path:"*",element:(0,h.jsx)(xt.default,{children:(0,h.jsx)(nt,{})})})]})]})})})})})}var Ze=require("react/jsx-runtime");async function Br(e){let{path:t,routes:o,config:r,modules:n,homePage:a,externalPages:i,docsDirName:l}=e,s={};for(let[d,m]of Object.entries(n))s[d]=()=>Promise.resolve(m);return Ko.default.renderToString((0,Ze.jsx)(Xo.default.StrictMode,{children:(0,Ze.jsx)(Yo.StaticRouter,{location:t,children:(0,Ze.jsx)(Jo,{initialRoutes:o,initialConfig:r,docsDirName:l,modules:s,homePage:a,externalPages:i})})}))}0&&(module.exports={render});