boltdocs 2.5.6 → 2.6.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 (112) hide show
  1. package/bin/boltdocs.js +2 -2
  2. package/dist/client/index.cjs +6 -0
  3. package/dist/client/{index.d.mts → index.d.cts} +134 -252
  4. package/dist/client/index.d.ts +135 -253
  5. package/dist/client/index.js +1 -1
  6. package/dist/client/theme/neutral.css +90 -50
  7. package/dist/node/cli-entry.cjs +2 -2
  8. package/dist/node/cli-entry.mjs +2 -2
  9. package/dist/node/index.cjs +1 -1
  10. package/dist/node/index.d.cts +150 -205
  11. package/dist/node/index.d.mts +150 -205
  12. package/dist/node/index.mjs +1 -1
  13. package/dist/node-BgvNl2Ay.mjs +89 -0
  14. package/dist/node-vkbb0MK7.cjs +89 -0
  15. package/dist/{package-OFZf0s2j.mjs → package-CR0HF9x3.mjs} +1 -1
  16. package/dist/{package-BY8Jd2j4.cjs → package-Dgmsc_l5.cjs} +1 -1
  17. package/dist/search-dialog-3lvKsbVG.js +6 -0
  18. package/dist/search-dialog-DMK5OpgH.cjs +6 -0
  19. package/dist/use-search-C9bxCqfF.js +6 -0
  20. package/dist/use-search-DcfZSunO.cjs +6 -0
  21. package/package.json +19 -22
  22. package/src/client/app/config-context.tsx +38 -5
  23. package/src/client/app/doc-page.tsx +34 -0
  24. package/src/client/app/mdx-component.tsx +2 -3
  25. package/src/client/app/mdx-components-context.tsx +27 -2
  26. package/src/client/app/routes-context.tsx +34 -0
  27. package/src/client/app/scroll-handler.tsx +7 -4
  28. package/src/client/app/theme-context.tsx +71 -67
  29. package/src/client/components/default-layout.tsx +13 -14
  30. package/src/client/components/docs-layout.tsx +1 -2
  31. package/src/client/components/icons-dev.tsx +36 -5
  32. package/src/client/components/mdx/admonition.tsx +11 -27
  33. package/src/client/components/mdx/badge.tsx +1 -1
  34. package/src/client/components/mdx/button.tsx +3 -3
  35. package/src/client/components/mdx/card.tsx +1 -1
  36. package/src/client/components/mdx/code-block.tsx +90 -80
  37. package/src/client/components/mdx/component-preview.tsx +1 -5
  38. package/src/client/components/mdx/component-props.tsx +1 -1
  39. package/src/client/components/mdx/field.tsx +4 -5
  40. package/src/client/components/mdx/file-tree.tsx +6 -3
  41. package/src/client/components/mdx/hooks/use-code-block.ts +2 -2
  42. package/src/client/components/mdx/image.tsx +1 -1
  43. package/src/client/components/mdx/link.tsx +2 -2
  44. package/src/client/components/mdx/list.tsx +1 -1
  45. package/src/client/components/mdx/table.tsx +1 -1
  46. package/src/client/components/mdx/tabs.tsx +1 -1
  47. package/src/client/components/primitives/breadcrumbs.tsx +1 -7
  48. package/src/client/components/primitives/button-group.tsx +1 -1
  49. package/src/client/components/primitives/button.tsx +1 -1
  50. package/src/client/components/primitives/code-block.tsx +113 -0
  51. package/src/client/components/primitives/link.tsx +23 -41
  52. package/src/client/components/primitives/menu.tsx +5 -6
  53. package/src/client/components/primitives/navbar.tsx +6 -18
  54. package/src/client/components/primitives/navigation-menu.tsx +4 -4
  55. package/src/client/components/primitives/on-this-page.tsx +6 -10
  56. package/src/client/components/primitives/page-nav.tsx +4 -9
  57. package/src/client/components/primitives/popover.tsx +1 -1
  58. package/src/client/components/primitives/search-dialog.tsx +3 -6
  59. package/src/client/components/primitives/sidebar.tsx +80 -22
  60. package/src/client/components/primitives/skeleton.tsx +1 -1
  61. package/src/client/components/primitives/tabs.tsx +4 -11
  62. package/src/client/components/primitives/tooltip.tsx +3 -3
  63. package/src/client/components/ui-base/breadcrumbs.tsx +4 -6
  64. package/src/client/components/ui-base/copy-markdown.tsx +2 -7
  65. package/src/client/components/ui-base/github-stars.tsx +2 -2
  66. package/src/client/components/ui-base/head.tsx +58 -51
  67. package/src/client/components/ui-base/loading.tsx +2 -2
  68. package/src/client/components/ui-base/navbar.tsx +12 -14
  69. package/src/client/components/ui-base/not-found.tsx +1 -1
  70. package/src/client/components/ui-base/on-this-page.tsx +6 -6
  71. package/src/client/components/ui-base/page-nav.tsx +4 -8
  72. package/src/client/components/ui-base/search-dialog.tsx +10 -8
  73. package/src/client/components/ui-base/sidebar.tsx +76 -23
  74. package/src/client/components/ui-base/tabs.tsx +9 -8
  75. package/src/client/components/ui-base/theme-toggle.tsx +2 -2
  76. package/src/client/hooks/use-i18n.ts +3 -3
  77. package/src/client/hooks/use-localized-to.ts +1 -1
  78. package/src/client/hooks/use-navbar.ts +8 -6
  79. package/src/client/hooks/use-routes.ts +19 -11
  80. package/src/client/hooks/use-search.ts +1 -1
  81. package/src/client/hooks/use-sidebar.ts +48 -2
  82. package/src/client/hooks/use-tabs.ts +6 -2
  83. package/src/client/hooks/use-version.ts +3 -3
  84. package/src/client/index.ts +22 -22
  85. package/src/client/ssg/boltdocs-shell.tsx +127 -0
  86. package/src/client/ssg/create-routes.tsx +179 -0
  87. package/src/client/ssg/index.ts +3 -0
  88. package/src/client/ssg/mdx-page.tsx +37 -0
  89. package/src/client/store/boltdocs-context.tsx +46 -99
  90. package/src/client/theme/neutral.css +90 -50
  91. package/src/client/types.ts +5 -33
  92. package/src/client/utils/react-to-text.ts +34 -0
  93. package/dist/cache-Cr8W2zgZ.cjs +0 -6
  94. package/dist/cache-DFdakSmR.mjs +0 -6
  95. package/dist/client/index.mjs +0 -6
  96. package/dist/client/ssr.cjs +0 -6
  97. package/dist/client/ssr.d.cts +0 -80
  98. package/dist/client/ssr.d.mts +0 -80
  99. package/dist/client/ssr.mjs +0 -6
  100. package/dist/node-CWXme96p.mjs +0 -73
  101. package/dist/node-VYfhzGrh.cjs +0 -73
  102. package/dist/search-dialog-BeNyI_KQ.mjs +0 -6
  103. package/dist/search-dialog-dYsCAk5S.js +0 -6
  104. package/dist/use-search-D25n0PrV.mjs +0 -6
  105. package/dist/use-search-WuzdH1cJ.js +0 -6
  106. package/src/client/app/index.tsx +0 -348
  107. package/src/client/app/mdx-page.tsx +0 -15
  108. package/src/client/app/preload.tsx +0 -66
  109. package/src/client/app/router.tsx +0 -30
  110. package/src/client/integrations/codesandbox.ts +0 -179
  111. package/src/client/integrations/index.ts +0 -1
  112. package/src/client/ssr.tsx +0 -65
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../use-search-WuzdH1cJ.js`);let t=require(`react`);t=e.T(t);let n=require(`react-dom/client`),r=require(`react-router-dom`),i=require(`lucide-react`);i=e.T(i);let a=require(`react-aria-components`);a=e.T(a);let o=require(`react/jsx-runtime`),s=require(`virtual:boltdocs-layout`);s=e.T(s);let c=require(`class-variance-authority`),l=require(`scroll-into-view-if-needed`);l=e.T(l);let u=require(`virtual:boltdocs-mdx-components`);u=e.T(u);function d(){return(0,o.jsx)(`div`,{className:`flex items-center justify-center min-h-[60vh] text-center`,children:(0,o.jsxs)(`div`,{className:`space-y-4`,children:[(0,o.jsx)(`span`,{className:`text-8xl font-black tracking-tighter text-primary-500/20`,children:`404`}),(0,o.jsx)(`h1`,{className:`text-2xl font-bold text-text-main`,children:`Page Not Found`}),(0,o.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,o.jsxs)(e.m,{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,o.jsx)(i.ArrowLeft,{size:16}),` Go to Home`]})]})})}const f=(0,t.createContext)(void 0);function p({children:e}){let[n,r]=(0,t.useState)(`system`),[i,a]=(0,t.useState)(`dark`),[s,c]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{c(!0);let e=localStorage.getItem(`boltdocs-theme`),t=e===`light`||e===`dark`||e===`system`?e:`system`;r(t);let n=window.matchMedia(`(prefers-color-scheme: dark)`);((e,t)=>{a(e===`system`?t?`dark`:`light`:e)})(t,n.matches);let i=e=>{a(t=>(localStorage.getItem(`boltdocs-theme`)||`system`)===`system`?e.matches?`dark`:`light`:t)};return n.addEventListener(`change`,i),()=>n.removeEventListener(`change`,i)},[]),(0,t.useEffect)(()=>{if(!s)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`).matches,t=n===`system`?e?`dark`:`light`:n;a(t);let r=document.documentElement;t===`light`?(r.classList.add(`theme-light`),r.dataset.theme=`light`):(r.classList.remove(`theme-light`),r.dataset.theme=`dark`)},[n,s]),(0,o.jsx)(f.Provider,{value:{theme:n,resolvedTheme:i,setTheme:e=>{r(e),localStorage.setItem(`boltdocs-theme`,e)}},children:e})}function m(){let e=(0,t.use)(f);if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function h({children:e}){let n=(0,r.useNavigate)();return(0,o.jsx)(a.RouterProvider,{navigate:(e,r)=>{(0,t.startTransition)(()=>{n(e,r)})},useHref:r.useHref,children:e})}function g(){let{pathname:e,hash:n}=(0,r.useLocation)();return(0,t.useLayoutEffect)(()=>{let e=document.querySelector(`.boltdocs-content`)||window,t=()=>e===window?window.scrollY:e.scrollTop,r=(t,n=`auto`)=>{e===window?window.scrollTo({top:t,behavior:n}):e.scrollTo({top:t,behavior:n})};if(n){let i=n.replace(`#`,``),a=document.getElementById(i);if(a){let n=e===window?0:e.getBoundingClientRect().top;r(a.getBoundingClientRect().top-n-80+t(),`smooth`);return}}r(0)},[e,n]),null}function _(){return(0,o.jsx)(s.default,{children:(0,o.jsx)(r.Outlet,{})})}const v=(0,t.createContext)({});function y(){return(0,t.use)(v)}function ee({components:e,children:t}){return(0,o.jsx)(v.Provider,{value:e,children:t})}function b({Component:e}){return(0,o.jsx)(e,{components:y()})}const x=(0,c.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`}}),S=({href:t,icon:n,iconPosition:r=`left`,isIconOnly:i,children:s,className:c,variant:l,size:u,rounded:d,iconSize:f,disabled:p,...m})=>{let h=i||!s&&!!n,g=h?(0,o.jsx)(`span`,{className:`inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]`,children:n}):(0,o.jsxs)(o.Fragment,{children:[n&&r===`left`&&(0,o.jsx)(`span`,{className:`inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]`,children:n}),(0,o.jsx)(`span`,{className:`flex items-center`,children:s}),n&&r===`right`&&(0,o.jsx)(`span`,{className:`inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]`,children:n})]});return t?(0,o.jsx)(a.Link,{href:t,className:e.g(x({variant:l,size:u,rounded:d,iconSize:h?f:void 0,disabled:p}),c),...m,children:g}):(0,o.jsx)(a.Button,{className:e.g(x({variant:l,size:u,rounded:d,iconSize:h?f:void 0,disabled:p}),c),...m,children:g})},C=({className:t,variant:n,size:r,rounded:i,iconSize:a,disabled:s,...c})=>(0,o.jsx)(S,{className:e.g(`group`,x({variant:n,size:r,rounded:i,iconSize:a,disabled:s,className:t})),...c}),te=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);return t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t),!0}};function w(n){let{title:r}=n,[i,a]=(0,t.useState)(!1),[o,s]=(0,t.useState)(!1),[c,l]=(0,t.useState)(!1),u=(0,t.useRef)(null);e.C();let d=(0,t.useCallback)(async()=>{te(u.current?.textContent??``),a(!0),setTimeout(()=>a(!1),2e3)},[]);return(0,t.useEffect)(()=>{l((u.current?.textContent?.length??0)>120)},[n.children,n.highlightedHtml]),{copied:i,isExpanded:o,setIsExpanded:s,isExpandable:c,preRef:u,handleCopy:d,shouldTruncate:c&&!o}}const T=({className:t,children:n,...r})=>(0,o.jsx)(a.Tooltip,{...r,offset:8,className:n=>e.g(`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 t==`function`?t(n):t),children:e=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.OverlayArrow,{children:(0,o.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,o.jsx)(`title`,{children:`Arrow`}),(0,o.jsx)(`path`,{d:`M0 0 L4 4 L8 0`})]})}),typeof n==`function`?n(e):n]})}),E=({content:e,children:t,delay:n=500,closeDelay:r=0,...i})=>(0,o.jsxs)(a.TooltipTrigger,{delay:n,closeDelay:r,children:[t,(0,o.jsx)(T,{...i,children:e})]});E.Root=E,E.Content=T;const D={ts:e.f,tsx:e.u,js:e.s,jsx:e.u,json:e.c,css:e.a,html:e.i,md:e.l,mdx:e.l,bash:e.d,sh:e.d,yaml:e.p,yml:e.p};function O(t){let{children:n,hideCopy:r=!1,highlightedHtml:s,"data-highlighted-html":c,title:l,"data-lang":u,plain:d=!1,...f}=t,p=s||c;e.C();let m=t.lang||u||``,{copied:h,isExpanded:g,setIsExpanded:_,isExpandable:v,preRef:y,handleCopy:ee,shouldTruncate:b}=w(t),x=D[m];return(0,o.jsxs)(`div`,{className:e.g(`group relative overflow-hidden bg-(--color-code-bg)`,`contain-layout contain-paint`,{"my-6 rounded-lg border border-border-subtle":!d,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":b},t.className),children:[l&&(0,o.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted`,children:[x?(0,o.jsx)(x,{size:14}):(0,o.jsx)(i.File,{size:14,className:`opacity-60`}),(0,o.jsx)(`span`,{children:l})]}),(0,o.jsx)(`div`,{className:`absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100`,children:!r&&(0,o.jsx)(E,{content:h?`Copied!`:`Copy code`,children:(0,o.jsx)(a.Button,{onPress:ee,className:e.g(`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`,h?`text-emerald-400`:`text-text-muted hover:text-text-main`),"aria-label":`Copy code`,children:h?(0,o.jsx)(i.Check,{size:20}):(0,o.jsx)(i.Copy,{size:20})})})}),p?(0,o.jsx)(`div`,{ref:y,className:`shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!`,dangerouslySetInnerHTML:{__html:p}}):(0,o.jsx)(`pre`,{ref:y,className:`m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]`,...f,children:n}),v&&(0,o.jsx)(`div`,{className:e.g(b?`absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10`:`relative flex justify-center py-4`),children:(0,o.jsx)(a.Button,{onPress:()=>_(!g),className:`rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md`,children:g?`Show less`:`Expand code`})})]})}function ne({initialIndex:e=0,tabs:n}){let r=n[e]?.props.disabled?n.findIndex(e=>!e.props.disabled):e,[i,a]=(0,t.useState)(r===-1?0:r),o=(0,t.useRef)([]),[s,c]=(0,t.useState)({opacity:0,transform:`translateX(0)`,width:0});return(0,t.useEffect)(()=>{let e=o.current[i];e&&c({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[i,n]),{active:i,setActive:a,tabRefs:o,indicatorStyle:s,handleKeyDown:(0,t.useCallback)(e=>{let t=0;if(e.key===`ArrowRight`?t=1:e.key===`ArrowLeft`&&(t=-1),t!==0){let e=(i+t+n.length)%n.length;for(;n[e].props.disabled&&e!==i;)e=(e+t+n.length)%n.length;e!==i&&!n[e].props.disabled&&(a(e),o.current[e]?.focus())}},[i,n])}}const re=(0,c.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`}}),ie=(0,c.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 ae({children:e}){return(0,o.jsx)(`div`,{className:`py-4`,children:typeof e==`string`?(0,o.jsx)(O,{className:`language-bash`,children:(0,o.jsx)(`code`,{children:e.trim()})}):e})}function oe({defaultIndex:n=0,children:r}){let i=(0,t.useMemo)(()=>t.Children.toArray(r).filter(e=>(0,t.isValidElement)(e)&&e.props?.label),[r]),{active:s,setActive:c,tabRefs:l,indicatorStyle:u}=ne({initialIndex:n,tabs:i});return(0,o.jsx)(`div`,{className:`my-8 w-full group/tabs`,children:(0,o.jsxs)(a.Tabs,{selectedKey:s.toString(),onSelectionChange:e=>c(Number(e)),className:`w-full`,children:[(0,o.jsxs)(a.TabList,{"aria-label":`Content Tabs`,className:e.g(re()),children:[i.map((t,n)=>{let{label:r,icon:i,disabled:s}=t.props,c=n.toString();return(0,o.jsxs)(a.Tab,{id:c,isDisabled:s,ref:e=>{l.current[n]=e},className:({isSelected:t,isDisabled:n})=>e.g(ie({isActive:t,isDisabled:n})),children:[!!i&&(0,o.jsx)(`span`,{className:`shrink-0 [&>svg]:w-4 [&>svg]:h-4`,children:i}),(0,o.jsx)(`span`,{children:r})]},c)}),(0,o.jsx)(`div`,{className:`absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none`,style:u,"aria-hidden":`true`})]}),i.map((e,t)=>(0,o.jsx)(a.TabPanel,{id:t.toString(),children:i[t]},t))]})})}function se({src:e,poster:n,alt:r,children:i,controls:a,preload:s=`metadata`,...c}){let l=(0,t.useRef)(null),[u,d]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{let e=l.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e.isIntersecting&&(d(!0),t.disconnect())},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[]),(0,o.jsx)(`div`,{ref:l,className:`my-6 overflow-hidden rounded-lg border border-border-subtle`,children:u?(0,o.jsxs)(`video`,{className:`block w-full h-auto`,src:e,poster:n,controls:!0,preload:s,playsInline:!0,...c,children:[i,`Your browser does not support the video tag.`]}):(0,o.jsx)(`div`,{className:`aspect-video bg-bg-surface animate-pulse`,role:`img`,"aria-label":r||`Video`})})}const ce=(0,c.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 le({variant:t=`default`,children:n,className:r=``,...i}){return(0,o.jsx)(`span`,{className:e.g(ce({variant:t}),r),...i,children:n})}const ue=(0,c.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 de({cols:t=3,children:n,className:r=``,...i}){return(0,o.jsx)(`div`,{className:e.g(ue({cols:t}),r),...i,children:n})}function fe({title:n,icon:r,href:i,children:s,className:c=``,...l}){let u=(0,t.useRef)(null),d=(0,t.useRef)(null),f=(0,t.useCallback)(e=>{let t=u.current||d.current;if(!t)return;let{left:n,top:r}=t.getBoundingClientRect();t.style.setProperty(`--x`,`${e.clientX-n}px`),t.style.setProperty(`--y`,`${e.clientY-r}px`)},[]),p=(0,o.jsxs)(o.Fragment,{children:[(0,o.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%)`}}),r&&(0,o.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:r}),(0,o.jsxs)(`div`,{className:`space-y-1.5`,children:[n&&(0,o.jsx)(`h3`,{className:`text-sm font-bold text-text-main`,children:n}),s&&(0,o.jsx)(`div`,{className:`text-sm text-text-muted leading-relaxed`,children:s})]})]}),m=e.g(`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`,c);return i?(0,o.jsx)(a.Link,{ref:d,href:i,className:e.g(m,`no-underline cursor-pointer`),onMouseMove:f,...l,children:p}):(0,o.jsx)(`div`,{ref:u,role:`presentation`,className:m,onMouseMove:f,...l,children:p})}const pe={note:(0,o.jsx)(i.Bookmark,{size:18}),tip:(0,o.jsx)(i.Lightbulb,{size:18}),info:(0,o.jsx)(i.Info,{size:18}),warning:(0,o.jsx)(i.AlertTriangle,{size:18}),danger:(0,o.jsx)(i.ShieldAlert,{size:18}),important:(0,o.jsx)(i.Flame,{size:18}),caution:(0,o.jsx)(i.Zap,{size:18})},me={note:`Note`,tip:`Tip`,info:`Info`,warning:`Warning`,danger:`Danger`,important:`Important`,caution:`Caution`},he=(0,c.cva)(`py-4 px-4 rounded-lg`,{variants:{type:{note:`border-primary-400 bg-primary-500/5 text-primary-400`,tip:`border-emerald-500 bg-emerald-500/5 text-emerald-500`,info:`border-sky-500 bg-sky-500/5 text-sky-500`,warning:`border-amber-500 bg-amber-500/5 text-amber-500`,danger:`border-red-500 bg-red-500/5 text-red-500`,important:`border-orange-500 bg-orange-500/5 text-orange-500`,caution:`border-yellow-500 bg-yellow-500/5 text-yellow-500`}},defaultVariants:{type:`note`}});function k({type:t=`note`,title:n,children:r,className:i=``,...a}){return(0,o.jsxs)(`div`,{className:e.g(he({type:t}),i),role:t===`warning`||t===`danger`?`alert`:`note`,...a,children:[(0,o.jsxs)(`div`,{className:`flex items-center flex-row gap-2 mb-2`,children:[(0,o.jsx)(`span`,{className:e.g(`shrink-0`,he({type:t})),children:pe[t]}),(0,o.jsx)(`span`,{className:`text-sm font-bold tracking-tight text-text-main`,children:n||me[t]})]}),(0,o.jsx)(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0`,children:r})]})}const ge=e=>(0,o.jsx)(k,{type:`note`,...e}),_e=e=>(0,o.jsx)(k,{type:`tip`,...e}),ve=e=>(0,o.jsx)(k,{type:`warning`,...e}),ye=e=>(0,o.jsx)(k,{type:`danger`,...e}),be=e=>(0,o.jsx)(k,{type:`info`,...e}),xe=e=>(0,o.jsx)(k,{type:`important`,...e}),Se=e=>(0,o.jsx)(k,{type:`caution`,...e}),Ce=(0,c.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}}),we=(0,c.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}}),Te=(0,c.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 Ee({icon:t,children:n,variant:r,dense:i}){return(0,o.jsxs)(`li`,{className:e.g(we({variant:r,dense:i})),children:[t&&(0,o.jsx)(`span`,{className:e.g(Te({variant:r===`bubble`?`bubble`:`default`})),children:t}),(0,o.jsx)(`div`,{className:`flex-1 text-text-muted group-hover:text-text-main transition-colors`,children:n})]})}const De={checked:t=>(0,o.jsx)(i.Check,{size:14,className:e.g(`text-emerald-500 shrink-0`,t)}),arrow:t=>(0,o.jsx)(i.ChevronRight,{size:14,className:e.g(`text-primary-400 shrink-0`,t)}),bubble:t=>(0,o.jsx)(i.Circle,{size:6,fill:`currentColor`,className:e.g(`text-primary-500 shrink-0`,t)}),default:()=>null,number:()=>null};function Oe({variant:e=`default`,cols:n=1,dense:r=!1,children:i,className:a,...s}){let c=n!==void 0&&Number(n)>1,l=De[e],u=Ce({variant:e,cols:n,dense:r,isGrid:c,className:a}),d=e===`number`?`ol`:`ul`;return e===`default`||e===`number`?(0,o.jsx)(d,{className:u,...s,children:i}):(0,o.jsx)(`ul`,{className:u,...s,children:t.Children.map(i,n=>{if(!(0,t.isValidElement)(n))return n;let i=n,a=i.type===`li`?i.props.children:i.props.children||n;return(0,o.jsx)(Ee,{icon:l(),variant:e,dense:r,children:a})})})}const ke={ts:e.f,tsx:e.u,js:e.s,jsx:e.u,json:e.c,css:e.a,html:e.i,md:e.l,mdx:e.l,bash:e.d,sh:e.d,yaml:e.p,yml:e.p},A={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function j(e){return typeof e==`string`?e:typeof e==`number`?e.toString():Array.isArray(e)?e.map(j).join(``):(0,t.isValidElement)(e)&&e.props&&typeof e.props==`object`&&`children`in e.props?j(e.props.children):``}function Ae(t,n){let r=t.toLowerCase(),a=`shrink-0 transition-colors duration-200`;if(n)return(0,o.jsx)(i.Folder,{size:16,strokeWidth:2,className:e.g(a,`text-primary-400`),fill:`currentColor`,fillOpacity:.15});let s=ke[r.split(`.`).pop()||``];if(s)return(0,o.jsx)(s,{size:16});let c=e.g(a,`text-text-dim group-hover:text-text-main`);return A.CODE.test(r)?(0,o.jsx)(i.FileCode,{size:16,strokeWidth:2,className:c}):A.TEXT.test(r)?(0,o.jsx)(i.FileText,{size:16,strokeWidth:2,className:c}):A.IMAGE.test(r)?(0,o.jsx)(i.FileImage,{size:16,strokeWidth:2,className:c}):(0,o.jsx)(i.File,{size:16,strokeWidth:2,className:c})}function M(e,n){if(!(0,t.isValidElement)(e))return!1;let r=e.type;if(typeof r==`string`)return r===n;if(typeof r==`function`)return r.name===n||r.name?.toLowerCase()===n;let i=e.props;return i?.originalType===n||i?.mdxType===n}function je(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function N(e,n=`root`){if(!(0,t.isValidElement)(e))return[];let r=[];if(M(e,`ul`))return t.Children.forEach(e.props.children,(e,t)=>{r.push(...N(e,`${n}-${t}`))}),r;if(M(e,`li`)){let i=t.Children.toArray(e.props.children),a=i.findIndex(e=>M(e,`ul`)),o=a!==-1,s=o?i.slice(0,a):i,c=o?i.slice(a):[],{name:l,comment:u}=je(j(s)),d=l.endsWith(`/`),f=d?l.slice(0,-1):l,p=o||d;return r.push({id:`${n}-${f}`,name:f,comment:u,isFolder:p,children:o?N(c[0],`${n}-${f}`):void 0}),r}return e.props&&typeof e.props==`object`&&`children`in e.props&&t.Children.forEach(e.props.children,(e,t)=>{r.push(...N(e,`${n}-${t}`))}),r}function P({item:t}){return(0,o.jsxs)(a.TreeItem,{id:t.id,textValue:t.name,className:`outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md`,children:[(0,o.jsx)(a.TreeItemContent,{children:({isExpanded:n,hasChildItems:r})=>(0,o.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,o.jsx)(`div`,{style:{width:`calc((var(--tree-item-level) - 1) * 1rem)`},className:`shrink-0`}),r?(0,o.jsx)(a.Button,{slot:`chevron`,className:`outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors`,children:(0,o.jsx)(i.ChevronRight,{size:14,strokeWidth:3,className:e.g(`transition-transform duration-200`,n&&`rotate-90`)})}):(0,o.jsx)(`div`,{className:`w-[18px]`}),Ae(t.name,t.isFolder),(0,o.jsx)(`span`,{className:e.g(`text-sm transition-colors truncate select-none`,t.isFolder?`font-semibold text-text-main`:`text-text-muted group-hover:text-text-main`),children:t.name}),t.comment&&(0,o.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:[`//`,` `,t.comment]})]})}),t.children&&(0,o.jsx)(a.Collection,{items:t.children,children:e=>(0,o.jsx)(P,{item:e})})]})}function F({children:n}){let r=(0,t.useMemo)(()=>N(n),[n]);return(0,o.jsx)(`div`,{className:`my-8`,children:(0,o.jsx)(a.Tree,{items:r,"aria-label":`File Tree`,className:e.g(`rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none`,`max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle`,`focus-visible:ring-2 focus-visible:ring-primary-500/20`),children:e=>(0,o.jsx)(P,{item:e})})})}function Me({data:e,sortable:n=!1,paginated:r=!1,pageSize:i=10}){let[a,o]=(0,t.useState)(null),[s,c]=(0,t.useState)(1),l=(0,t.useMemo)(()=>{if(!e)return[];let t=[...e];return n&&a!==null&&t.sort((e,t)=>{let n=e[a.key],r=t[a.key],i=typeof n==`string`?n:``,o=typeof r==`string`?r:``;return i<o?a.direction===`asc`?-1:1:i>o?a.direction===`asc`?1:-1:0}),t},[e,a,n]);return{sortConfig:a,currentPage:s,setCurrentPage:c,totalPages:Math.ceil(l.length/i),paginatedData:(0,t.useMemo)(()=>{if(!r)return l;let e=(s-1)*i;return l.slice(e,e+i)},[l,r,s,i]),requestSort:e=>{if(!n)return;let t=`asc`;a&&a.key===e&&a.direction===`asc`&&(t=`desc`),o({key:e,direction:t})}}}function Ne({headers:t,data:n,children:r,className:s=``,sortable:c=!1,paginated:l=!1,pageSize:u=10}){let{sortConfig:d,currentPage:f,setCurrentPage:p,totalPages:m,paginatedData:h,requestSort:g}=Me({data:n,sortable:c,paginated:l,pageSize:u}),_=e=>c?d?.key===e?d.direction===`asc`?(0,o.jsx)(i.ChevronUp,{size:14,className:`ml-1 text-primary-400`}):(0,o.jsx)(i.ChevronDown,{size:14,className:`ml-1 text-primary-400`}):(0,o.jsx)(i.ChevronDown,{size:14,className:`ml-1 opacity-30`}):null,v=r||(0,o.jsxs)(o.Fragment,{children:[t&&(0,o.jsx)(`thead`,{children:(0,o.jsx)(`tr`,{children:t.map((t,n)=>(0,o.jsx)(`th`,{onClick:()=>g(n),className:e.g(`text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm`,c&&`cursor-pointer select-none hover:text-primary-400 transition-colors`),children:(0,o.jsxs)(`div`,{className:`flex items-center`,children:[t,_(n)]})},n))})}),h&&(0,o.jsx)(`tbody`,{children:h.map((e,t)=>(0,o.jsx)(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:e.map((e,t)=>(0,o.jsx)(`td`,{className:`px-3 py-2 border-b border-border-subtle text-sm text-text-muted`,children:e},t))},t))})]});return(0,o.jsxs)(`div`,{className:e.g(`my-6 rounded-lg border border-border-subtle overflow-hidden`,s),children:[(0,o.jsx)(`div`,{className:`overflow-x-auto`,children:(0,o.jsx)(`table`,{className:`w-full border-collapse text-sm`,children:v})}),l&&m>1&&(0,o.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border-subtle px-4 py-3`,children:[(0,o.jsxs)(`span`,{className:`text-xs text-text-muted`,children:[`Page `,f,` of `,m]}),(0,o.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,o.jsx)(a.Button,{onPress:()=>p(1),isDisabled:f===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,o.jsx)(i.ChevronsLeft,{size:16})}),(0,o.jsx)(a.Button,{onPress:()=>p(e=>Math.max(e-1,1)),isDisabled:f===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,o.jsx)(i.ChevronLeft,{size:16})}),(0,o.jsx)(a.Button,{onPress:()=>p(e=>Math.min(e+1,m)),isDisabled:f===m,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:(0,o.jsx)(i.ChevronRight,{size:16})}),(0,o.jsx)(a.Button,{onPress:()=>p(m),isDisabled:f===m,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:(0,o.jsx)(i.ChevronsRight,{size:16})})]})]})]})}function Pe({name:t,type:n,defaultValue:r,required:i=!1,children:a,id:s,className:c=``}){return(0,o.jsxs)(`article`,{className:e.g(`group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300`,`hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5`,c),id:s,children:[(0,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:t}),n&&(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:n}),i&&(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`]})]}),r&&(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:r})]})]}),(0,o.jsx)(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30`,children:a})]})}function Fe({to:t,children:n,className:r=``,...i}){let a=t&&(t.startsWith(`http://`)||t.startsWith(`https://`)||t.startsWith(`//`));return(0,o.jsx)(e.m,{href:t,className:e.g(`text-blue-600 hover:text-blue-800 hover:underline cursor-pointer`,r),target:a?`_blank`:void 0,rel:a?`noopener noreferrer`:void 0,...i,children:n})}function Ie({src:e,alt:t,theme:n,...r}){let{theme:i}=m();return n&&n!==i?null:(0,o.jsx)(`img`,{src:e,alt:t||``,...r})}function Le({title:t,props:n,className:r=``}){return(0,o.jsxs)(`div`,{className:e.g(`my-6`,r),children:[t&&(0,o.jsx)(`h3`,{className:`text-base font-bold text-text-main mb-3`,children:t}),(0,o.jsx)(`div`,{className:`overflow-x-auto rounded-lg border border-border-subtle`,children:(0,o.jsxs)(`table`,{className:`w-full border-collapse text-sm`,children:[(0,o.jsx)(`thead`,{children:(0,o.jsxs)(`tr`,{children:[(0,o.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,o.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,o.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,o.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,o.jsx)(`tbody`,{children:n.map((e,t)=>(0,o.jsxs)(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:[(0,o.jsxs)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:[(0,o.jsx)(`code`,{className:`rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400`,children:e.name}),e.required&&(0,o.jsx)(`span`,{className:`ml-1 text-red-400 font-bold`,children:`*`})]}),(0,o.jsx)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:(0,o.jsx)(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted`,children:e.type})}),(0,o.jsx)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:e.defaultValue?(0,o.jsx)(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400`,children:e.defaultValue}):(0,o.jsx)(`span`,{className:`text-text-dim`,children:`—`})}),(0,o.jsx)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle text-text-muted`,children:e.description})]},`${e.name}-${t}`))})]})})]})}function Re(e){let{code:n,children:r,preview:i}=e;return{initialCode:(0,t.useMemo)(()=>(n??(typeof r==`string`?r:``)).trim(),[n,r]),previewElement:(0,t.useMemo)(()=>i??(typeof r==`string`?null:r),[i,r])}}function ze(e){let{highlightedHtml:t,hideCode:n=!1,hideCopy:r=!1}=e,{initialCode:i,previewElement:a}=Re(e);return(0,o.jsxs)(`div`,{className:`my-6 overflow-hidden rounded-xl border border-border-subtle`,children:[(0,o.jsx)(`div`,{className:`flex items-center justify-center p-8 bg-bg-surface`,children:a}),!n&&(0,o.jsx)(`div`,{className:`border-t border-border-subtle`,children:(0,o.jsx)(O,{hideCopy:r,lang:`tsx`,highlightedHtml:t,plain:!0,children:i})})]})}const I=({children:t,className:n,...r})=>(0,o.jsx)(`nav`,{className:e.g(`relative flex items-center`,n),...r,children:t});I.Root=I,I.List=({children:t,className:n})=>(0,o.jsx)(`div`,{className:e.g(`flex list-none items-center gap-1`,n),children:t}),I.Item=({children:t,label:n,className:r})=>(0,o.jsxs)(a.MenuTrigger,{children:[(0,o.jsxs)(a.Button,{className:e.g(`flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium outline-none transition-colors cursor-pointer`,`text-text-muted hover:bg-bg-surface hover:text-text-main`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,r),children:[n,(0,o.jsx)(i.ChevronDown,{size:14,className:`transition-transform`})]}),(0,o.jsx)(a.Popover,{placement:`bottom start`,className:`entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards`,children:(0,o.jsx)(a.Menu,{className:`w-56 outline-none rounded-xl border border-border-subtle bg-bg-surface p-2 shadow-xl ring-1 ring-border-strong/5`,children:t})})]}),I.Link=({label:t,href:n,description:r,className:i,children:s,...c})=>(0,o.jsx)(a.MenuItem,{href:n,className:e.g(`block rounded-lg px-3 py-2 text-sm outline-none cursor-pointer transition-colors`,`hover:bg-bg-muted focus:bg-bg-muted`,i),...c,children:s||(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`div`,{className:`font-semibold text-text-main`,children:t}),r&&(0,o.jsx)(`div`,{className:`text-xs text-text-muted line-clamp-1 mt-0.5`,children:r})]})});function Be(e,n){let r=(0,t.useRef)(e);(0,t.useEffect)(()=>{r.current!==e&&(n(e),r.current=e)},[e,n])}function Ve(e){return e.startsWith(`#`)?e.slice(1):null}var He=class{items=[];single=!1;observer=null;onChange;callback(e){if(e.length===0)return;for(let t of e){let e=this.items.find(e=>e.id===t.target.id);e&&(e.active=t.isIntersecting,e.fallback=!t.isIntersecting&&t.boundingClientRect.top<100)}let t=-1;for(let e=this.items.length-1;e>=0;e--)if(this.items[e].fallback){t=e;break}t===-1&&this.items.length>0&&(t=0),this.items=this.items.map((e,n)=>({...e,active:n===t,t:n===t?Date.now():e.t})),this.onChange?.()}setItems(e){let t=this.observer;if(t)for(let e of this.items){let n=document.getElementById(e.id);n&&t.unobserve(n)}this.items=[];for(let t of e){let e=Ve(t.url);e&&this.items.push({id:e,active:!1,fallback:!1,t:0,original:t})}this.watchItems(),typeof window<`u`&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(e){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),e),this.watchItems())}watchItems(){if(this.observer)for(let e of this.items){let t=document.getElementById(e.id);t&&this.observer.observe(t)}}unwatch(){this.observer?.disconnect(),this.observer=null}};const L=(0,t.createContext)(null),Ue=(0,t.createContext)(null);function R(){let e=(0,t.use)(L);if(!e)throw Error(`Component must be used under the <AnchorProvider /> component.`);return e}function We(){let e=R();return(0,t.useMemo)(()=>{let t;for(let n of e)n.active&&(!t||n.t>t.t)&&(t=n);return t?.id},[e])}function Ge(){let e=R();return(0,t.useMemo)(()=>{let t=[];for(let n of e)n.active&&t.push(n.id);return t},[e])}function Ke({containerRef:e,children:t}){return(0,o.jsx)(Ue.Provider,{value:e,children:t})}function qe({toc:e,single:n=!1,children:r}){let i=(0,t.useMemo)(()=>new He,[]),[a,s]=(0,t.useState)(i.items);return i.single=n,(0,t.useEffect)(()=>{i.setItems(e)},[i,e]),(0,t.useEffect)(()=>(i.watch({rootMargin:`-100px 0% 0% 0%`,threshold:0}),i.onChange=()=>s([...i.items]),()=>{i.unwatch()}),[i]),(0,o.jsx)(L.Provider,{value:a,children:r})}const z=({children:t,className:n})=>(0,o.jsx)(`nav`,{className:e.g(`sticky top-navbar hidden xl:flex flex-col shrink-0`,`w-toc`,`py-8 pl-6 pr-4`,n),children:t}),Je=({children:t,className:n,...r})=>(0,o.jsx)(`div`,{className:e.g(`mb-4 text-xs font-bold uppercase tracking-wider text-text-main`,n),...r,children:t}),Ye=({children:n,className:r,ref:i,...a})=>{let s=(0,t.useRef)(null);return(0,t.useImperativeHandle)(i,()=>s.current),(0,o.jsx)(`div`,{ref:s,className:e.g(`relative overflow-y-auto boltdocs-otp-content`,r),...a,children:n})};Ye.displayName=`OnThisPageContent`,z.Root=z,z.Header=Je,z.Content=Ye,z.List=({children:t,className:n})=>(0,o.jsx)(`ul`,{className:e.g(`relative space-y-1 text-sm border-l border-border-subtle`,n),children:t}),z.Item=({level:t,children:n,className:r})=>(0,o.jsx)(`li`,{className:e.g(t===3&&`pl-3`,r),children:n}),z.Link=({children:n,href:r,active:i,onClick:a,className:s})=>{let c=(0,t.use)(L),u=(0,t.use)(Ue),d=r?Ve(r):null,f=(0,t.useRef)(null),[p,m]=(0,t.useState)(i);return Be(d&&c?c.find(e=>e.id===d)?.active:null,e=>{e!==null&&e!==p&&(m(!!e),e&&f.current&&u?.current&&(0,l.default)(f.current,{behavior:`smooth`,block:`center`,inline:`center`,scrollMode:`if-needed`,boundary:u.current}))}),(0,t.useEffect)(()=>{i!==void 0&&m(i)},[i]),(0,o.jsx)(`a`,{ref:f,href:r,onClick:a,"data-active":p,className:e.g(`block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main`,p?`text-primary-500 font-medium`:`text-text-muted`,s),children:n})},z.Indicator=({style:t,className:n})=>(0,o.jsx)(`div`,{className:e.g(`absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300`,n),style:t});const B=({children:t,className:n})=>(0,o.jsx)(`nav`,{className:e.g(`grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle`,n),children:t});B.Root=B,B.Link=({children:t,to:n,direction:r,className:s})=>{let c=r===`next`;return(0,o.jsxs)(a.Link,{href:n,className:e.g(`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`,c?`text-right justify-end`:`text-left justify-start`,s),children:[!c&&(0,o.jsx)(i.ChevronLeft,{className:`mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1`}),(0,o.jsx)(`div`,{className:`flex flex-col gap-1 flex-1`,children:t}),c&&(0,o.jsx)(i.ChevronRight,{className:`ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1`})]})},B.Title=({children:t,className:n})=>(0,o.jsx)(`span`,{className:e.g(`text-xs font-medium uppercase tracking-wider text-text-muted`,n),children:t}),B.Description=({children:t,className:n})=>(0,o.jsx)(`span`,{className:e.g(`text-base font-bold text-text-main truncate`,n),children:t}),B.Icon=({children:e})=>(0,o.jsx)(o.Fragment,{children:e});const V=({children:t,className:n=``,...r})=>(0,o.jsx)(`div`,{className:e.g(`w-full`,n),...r,children:t});V.Root=V,V.List=({children:t,className:n=``})=>(0,o.jsx)(`div`,{role:`tablist`,className:e.g(`relative flex flex-row items-center border-b border-border-subtle`,n),children:t}),V.Item=({children:t,id:n,selected:r,className:i=``,...a})=>(0,o.jsx)(`button`,{role:`tab`,"aria-selected":r,className:e.g(`flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none`,r?`text-primary-500`:`text-text-muted hover:text-text-main`,i),...a,children:t}),V.Content=({children:t,className:n=``})=>(0,o.jsx)(`div`,{className:e.g(`p-4 outline-none`,n),children:t}),V.Indicator=({className:t=``,style:n})=>(0,o.jsx)(`div`,{className:e.g(`absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300`,t),style:n});const Xe=({badge:t})=>{let n={new:`bg-primary-500/20 text-primary-500`,updated:`bg-gray-500/20 text-gray-500`,deprecated:`bg-red-500/20 text-red-500`};if(typeof t==`object`&&t?.expires){let e=new Date(t.expires),n=new Date,r=e.getTime()-n.getTime();if(Math.ceil(r/(1e3*60*60*24))===0)return null}let r=typeof t==`string`?t:t?.text;return(0,o.jsx)(`span`,{className:e.g(`ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap`,n[r]||n.new),children:r})},H=({children:t,className:n})=>(0,o.jsx)(`aside`,{className:e.g(`boltdocs-sidebar sticky top-navbar hidden lg:flex flex-col shrink-0`,`w-sidebar h-full`,`overflow-y-auto border-r border-border-subtle bg-bg-main`,`py-6 px-4`,n),children:(0,o.jsx)(`nav`,{className:`flex-1 space-y-6`,children:t})});H.Root=H,H.Group=({children:t,title:n,icon:r,isOpen:s=!0,onToggle:c,className:l})=>(0,o.jsxs)(`div`,{className:e.g(`space-y-1`,l),children:[n&&(0,o.jsxs)(a.Button,{onPress:c,className:e.g(`flex w-full items-center justify-between px-2 py-1.5 text-xs font-bold uppercase tracking-wider outline-none cursor-pointer`,`text-text-muted hover:text-text-main transition-colors`,`focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md`),children:[(0,o.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r&&(0,o.jsx)(r,{size:14}),n]}),(0,o.jsx)(i.ChevronRight,{size:14,className:e.g(`transition-transform duration-200`,s&&`rotate-90`)})]}),s&&(0,o.jsx)(`div`,{className:`space-y-0.5`,children:t})]}),H.GroupItem=({children:t,className:n})=>(0,o.jsx)(`div`,{className:e.g(n),children:t}),H.Link=({label:t,href:n,active:r,icon:i,badge:a,className:s})=>(0,o.jsxs)(e.m,{href:n,className:e.g(`group flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none`,`transition-all duration-200 ease-in-out`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,r?`bg-primary-500/10 text-primary-500 font-medium`:`text-text-muted hover:bg-bg-surface hover:text-text-main hover:translate-x-1`,s),children:[i&&(0,o.jsx)(i,{size:16,className:e.g(r?`text-primary-500`:`text-text-muted group-hover:text-text-main`)}),(0,o.jsx)(`span`,{className:`truncate`,children:t}),a&&(0,o.jsx)(Xe,{badge:a})]});const U=({children:t,className:n,...r})=>(0,o.jsx)(a.Breadcrumbs,{className:e.g(`flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted`,n),...r,children:t});U.Root=U,U.Item=({children:t,className:n,...r})=>(0,o.jsx)(a.Breadcrumb,{className:e.g(`flex items-center mb-0 gap-1.5`,n),...r,children:t}),U.Link=({children:t,href:n,className:r,...i})=>(0,o.jsx)(a.Link,{href:n,className:e.g(`transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm`,`current:font-medium current:text-text-main current:pointer-events-none cursor-pointer`,r),...i,children:t}),U.Separator=({className:t})=>(0,o.jsx)(i.ChevronRight,{size:14,className:e.g(`shrink-0 text-text-dim`,t)});const Ze=({children:t,className:n,vertical:r=!1})=>(0,o.jsx)(`div`,{className:e.g(`inline-flex`,r?`flex-col`:`flex-row`,!r&&[`[&>*:not(:first-child)]:-ml-px`,`[&>*:first-child]:rounded-r-none`,`[&>*:last-child]:rounded-l-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,n?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-l-full`,`[&>*:last-child]:rounded-r-full`],n?.includes(`rounded-xl`)&&[`[&>*:first-child]:rounded-l-xl`,`[&>*:last-child]:rounded-r-xl`],n?.includes(`rounded-lg`)&&[`[&>*:first-child]:rounded-l-lg`,`[&>*:last-child]:rounded-r-lg`]],r&&[`[&>*:not(:first-child)]:-mt-px`,`[&>*:first-child]:rounded-b-none`,`[&>*:last-child]:rounded-t-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,n?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-t-full`,`[&>*:last-child]:rounded-b-full`]],n),children:t}),W=({children:t,className:n,showArrow:r,...i})=>(0,o.jsxs)(a.Popover,{offset:8,...i,className:a.composeRenderProps(n,t=>e.g(`z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none`,t)),children:[r&&(0,o.jsx)(a.OverlayArrow,{className:`group`,children:(0,o.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,o.jsx)(`path`,{d:`M0 0 L6 6 L12 0`})})}),t]});function Qe(e){let[n,r]=t.default.Children.toArray(e.children).slice(0,2);return(0,o.jsxs)(a.MenuTrigger,{...e,children:[n,(0,o.jsx)(W,{placement:e.placement,className:`min-w-35`,children:r})]})}function $e(e){let[n,r]=t.default.Children.toArray(e.children).slice(0,2);return(0,o.jsxs)(a.SubmenuTrigger,{...e,children:[n,(0,o.jsx)(W,{offset:-4,crossOffset:-4,children:r})]})}function G(t){return(0,o.jsx)(a.Menu,{...t,className:a.composeRenderProps(t.className,t=>e.g(`p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75`,t))})}function et(t){let n=t.textValue||(typeof t.children==`string`?t.children:void 0);return(0,o.jsx)(a.MenuItem,{...t,textValue:n,className:a.composeRenderProps(t.className,(t,{isFocused:n,isPressed:r,isDisabled:i})=>e.g(`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":n,"bg-bg-surface-elevanted":r,"opacity-40 grayscale pointer-events-none":i},t)),children:a.composeRenderProps(t.children,(e,{selectionMode:t,isSelected:n,hasSubmenu:r})=>(0,o.jsxs)(o.Fragment,{children:[t!==`none`&&(0,o.jsxs)(`span`,{className:`flex items-center size-4 shrink-0 justify-center`,children:[n&&t===`multiple`&&(0,o.jsx)(i.Check,{className:`size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200`}),n&&t===`single`&&(0,o.jsx)(i.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:e}),r&&(0,o.jsx)(i.ChevronRight,{className:`size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors`})]}))})}function tt({title:t,...n}){return(0,o.jsxs)(a.MenuSection,{...n,className:e.g(`flex flex-col gap-0.5`,n.className),children:[t&&(0,o.jsx)(a.Header,{className:`px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none`,children:t}),(0,o.jsx)(a.Collection,{items:n.items,children:n.children})]})}function nt(e){return(0,o.jsx)(a.Separator,{...e,className:`mx-2 my-1.5 border-t border-border-subtle/50`})}G.Root=G,G.Item=et,G.Trigger=Qe,G.SubTrigger=$e,G.Section=tt,G.Separator=nt;function K({className:t,variant:n=`rect`,...r}){return(0,o.jsx)(`div`,{className:e.g(`animate-pulse bg-bg-muted`,n===`circle`?`rounded-full`:`rounded-md`,t),...r})}const rt=e=>{let[n,r]=(0,t.useState)(!1);return{copied:n,handleCopy:()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)},handleOpenRaw:()=>{let t=new Blob([e],{type:`text/plain;charset=utf-8`}),n=URL.createObjectURL(t);window.open(n,`_blank`)}}};function q({content:t,mdxRaw:n,config:r}){let a=n||t||``,{copied:s,handleCopy:c,handleOpenRaw:l}=rt(a),u=r!==!1,d=typeof r==`object`&&r.text||`Copy Markdown`;return!u||!a?null:(0,o.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,o.jsxs)(Ze,{className:`rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden`,children:[(0,o.jsx)(S,{variant:`ghost`,onPress:c,icon:s?(0,o.jsx)(i.Check,{size:16}):(0,o.jsx)(i.Copy,{size:16}),iconPosition:`left`,className:e.g(`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`,s&&`text-emerald-500 hover:bg-emerald-500/5`),children:s?`Copied!`:d}),(0,o.jsxs)(G.Trigger,{placement:`bottom end`,children:[(0,o.jsx)(S,{variant:`ghost`,isIconOnly:!0,icon:(0,o.jsx)(i.ChevronDown,{size:14}),className:e.g(`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,o.jsxs)(G.Root,{className:`w-52`,children:[(0,o.jsxs)(G.Item,{onAction:c,children:[(0,o.jsx)(i.Copy,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),(0,o.jsx)(`span`,{className:`font-medium text-[0.8125rem]`,children:`Copy Markdown`})]}),(0,o.jsxs)(G.Item,{onAction:l,children:[(0,o.jsx)(i.ExternalLink,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),(0,o.jsx)(`span`,{className:`font-medium text-[0.8125rem]`,children:`View as Markdown`})]})]})]})]})})}var it=e.w({Admonition:()=>k,Badge:()=>le,Button:()=>C,Card:()=>fe,Cards:()=>de,Caution:()=>Se,CodeBlock:()=>O,ComponentPreview:()=>ze,ComponentProps:()=>Le,CopyMarkdown:()=>q,Danger:()=>ye,Field:()=>Pe,FileTree:()=>F,Image:()=>Ie,Important:()=>xe,InfoBox:()=>be,Link:()=>Fe,List:()=>Oe,Note:()=>ge,Tab:()=>ae,Table:()=>Ne,Tabs:()=>oe,Tip:()=>_e,Video:()=>se,Warning:()=>ve});function at(){return(0,o.jsx)(`div`,{className:e.g(`w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in`),children:(0,o.jsxs)(`div`,{className:`mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10`,children:[(0,o.jsxs)(`div`,{className:`flex gap-2`,children:[(0,o.jsx)(K,{className:`h-3 w-16`}),(0,o.jsx)(K,{className:`h-3 w-24`})]}),(0,o.jsx)(K,{className:`h-10 w-[60%] sm:h-12`}),(0,o.jsxs)(`div`,{className:`space-y-3`,children:[(0,o.jsx)(K,{className:`h-4 w-full`}),(0,o.jsx)(K,{className:`h-4 w-[95%]`}),(0,o.jsx)(K,{className:`h-4 w-[40%]`})]}),(0,o.jsxs)(`div`,{className:`space-y-6 pt-4`,children:[(0,o.jsx)(K,{className:`h-7 w-32`}),(0,o.jsxs)(`div`,{className:`space-y-3`,children:[(0,o.jsx)(K,{className:`h-4 w-full`}),(0,o.jsx)(K,{className:`h-4 w-[98%]`}),(0,o.jsx)(K,{className:`h-4 w-[92%]`}),(0,o.jsx)(K,{className:`h-4 w-[60%]`})]})]}),(0,o.jsx)(K,{className:`h-32 w-full rounded-lg bg-bg-muted/50`}),(0,o.jsxs)(`div`,{className:`space-y-6 pt-4`,children:[(0,o.jsx)(K,{className:`h-7 w-48`}),(0,o.jsxs)(`div`,{className:`space-y-3`,children:[(0,o.jsx)(K,{className:`h-4 w-full`}),(0,o.jsx)(K,{className:`h-4 w-[85%]`})]})]})]})})}const J=({level:e,id:t,children:n,...r})=>(0,o.jsxs)(`h${e}`,{id:t,...r,className:`boltdocs-heading`,children:[n,t&&(0,o.jsx)(`a`,{href:`#${t}`,className:`header-anchor`,"aria-label":`Anchor`,children:(0,o.jsx)(i.Link,{size:16})})]}),ot={...it,Loading:at,h1:e=>(0,o.jsx)(J,{level:1,...e}),h2:e=>(0,o.jsx)(J,{level:2,...e}),h3:e=>(0,o.jsx)(J,{level:3,...e}),h4:e=>(0,o.jsx)(J,{level:4,...e}),h5:e=>(0,o.jsx)(J,{level:5,...e}),h6:e=>(0,o.jsx)(J,{level:6,...e}),pre:e=>(0,o.jsx)(O,{...e,children:e.children})};function st(){let{currentLocale:n,config:r}=e.v();return(0,t.useEffect)(()=>{if(!r.i18n)return;let e=r.i18n.localeConfigs?.[n];document.documentElement.lang=e?.htmlLang||n||`en`,document.documentElement.dir=e?.direction||`ltr`},[n,r.i18n]),null}function ct(){let n=(0,r.useLocation)(),{config:i}=e.v(),a=e.b(e=>e.setLocale),o=e.b(e=>e.setVersion),s=e.b(e=>e.currentLocale),c=e.b(e=>e.currentVersion);return(0,t.useEffect)(()=>{let e=n.pathname.split(`/`).filter(Boolean),t=0,r=i.versions?.defaultVersion,l=i.i18n?.defaultLocale;if(e[t]===`docs`&&t++,i.versions&&e.length>t){let n=i.versions.versions.find(n=>n.path===e[t]);n&&(r=n.path,t++)}i.i18n&&e.length>t&&i.i18n.locales[e[t]]?l=e[t]:i.i18n&&e.length===0&&(l=s||i.i18n.defaultLocale),l!==s&&a(l),r!==c&&o(r)},[n.pathname,i,a,o,s,c]),null}function lt({initialRoutes:n,initialConfig:i,docsDirName:a,modules:c,hot:l,homePage:f,externalPages:m,externalLayout:v,components:y={}}){let[x,S]=(0,t.useState)(n),[C,te]=(0,t.useState)(i),w=m||{},T=v||s.default,E=(0,t.useMemo)(()=>x.filter(e=>!(f&&(e.path===`/`||e.path===``))&&!w[e.path===``?`/`:e.path]).map(e=>{let n=Object.keys(c).find(t=>t===`/${a}/${e.filePath}`||t.endsWith(`/${a}/${e.filePath}`)||t.endsWith(`/${a}\\${e.filePath.replace(/\\/g,`/`)}`)),r=n?c[n]:null;return{...e,Component:t.default.lazy(async()=>r?await r():{default:d})}}),[x,c,a,f,w]);(0,t.useEffect)(()=>{l&&(l.on(`boltdocs:routes-update`,e=>{S(e)}),l.on(`boltdocs:config-update`,e=>{te(e)}))},[l]);let D=(0,t.useMemo)(()=>({...ot,...u.default,...y}),[y]),O=D.Loading;return(0,o.jsx)(e.y,{children:(0,o.jsx)(p,{children:(0,o.jsx)(ee,{components:D,children:(0,o.jsx)(e.S.Provider,{value:C,children:(0,o.jsx)(h,{children:(0,o.jsxs)(e.x,{routes:x,modules:c,children:[(0,o.jsx)(g,{}),(0,o.jsx)(ct,{}),(0,o.jsx)(st,{}),(0,o.jsxs)(r.Routes,{children:[(0,o.jsx)(r.Route,{element:(0,o.jsx)(_,{}),children:E.map(e=>(0,o.jsx)(r.Route,{path:e.path===``?`/`:e.path,element:(0,o.jsx)(t.default.Suspense,{fallback:(0,o.jsx)(O,{}),children:(0,o.jsx)(b,{Component:e.Component})})},e.path))},`docs-layout`),f&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.Route,{path:`/`,element:(0,o.jsx)(T,{children:(0,o.jsx)(f,{})})}),C.i18n&&Object.keys(C.i18n.locales).map(e=>(0,o.jsx)(r.Route,{path:`/${e}`,element:(0,o.jsx)(T,{children:(0,o.jsx)(f,{})})},`home-${e}`))]}),Object.entries(w).map(([e,n])=>{let i=e===`/`?``:e;return(0,o.jsxs)(t.default.Fragment,{children:[(0,o.jsx)(r.Route,{path:e,element:(0,o.jsx)(T,{children:(0,o.jsx)(n,{})})}),C.i18n&&Object.keys(C.i18n.locales).map(t=>(0,o.jsx)(r.Route,{path:`/${t}${i}`,element:(0,o.jsx)(T,{children:(0,o.jsx)(n,{})})},`${e}-${t}`))]},e)}),(0,o.jsx)(r.Route,{path:`*`,element:(0,o.jsx)(s.default,{children:(0,o.jsx)(d,{})})})]})]})})})})})})}function ut(e){let{target:i,routes:a,docsDirName:s,config:c,modules:l,hot:u,homePage:d,externalPages:f,externalLayout:p,components:m}=e,h=document.querySelector(i);if(!h)throw Error(`[boltdocs] Mount target "${i}" not found in document.`);let g=(0,o.jsx)(t.default.StrictMode,{children:(0,o.jsx)(r.BrowserRouter,{children:(0,o.jsx)(lt,{initialRoutes:a,initialConfig:c,docsDirName:s,modules:l,hot:u,homePage:d,externalPages:f,externalLayout:p,components:m})})});h.innerHTML=``,(0,n.createRoot)(h).render(g)}function Y(e,t){return e?typeof e==`string`?e:t&&e[t]?e[t]:Object.values(e)[0]||``:``}function dt(){let t=e.C(),{theme:n}=m(),i=(0,r.useLocation)(),{currentLocale:a}=e.v(),o=t.theme||{},s=Y(o.title,a)||`Boltdocs`,c=o.navbar||[],l=o.socialLinks||[],u=o.githubRepo,d=c.map(e=>{let n=e.href||e.to||e.link||``;return{label:Y(e.label||e.text,a),href:n,active:(e=>{let n=i.pathname;if(n===e)return!0;if(!e||e===`/`)return n===`/`;let r=e=>{let n=e.split(`/`).filter(Boolean),r=0;return t.i18n?.locales&&n[r]&&t.i18n.locales[n[r]]&&r++,t.versions?.versions&&n[r]&&t.versions.versions.some(e=>e.path===n[r])&&r++,n.slice(r)},a=r(e),o=r(n);return a.length===0?o.length===0:o.length<a.length?!1:a.every((e,t)=>o[t]===e)})(n),to:n.startsWith(`http`)||n.startsWith(`//`)?`external`:void 0}}),f=o.logo;return{links:d,title:s,logo:f?typeof f==`string`?f:n===`dark`?f.dark:f.light:null,logoProps:{alt:(f&&typeof f==`object`?f.alt:void 0)||s,width:f&&typeof f==`object`?f.width:void 0,height:f&&typeof f==`object`?f.height:void 0},github:u?`https://github.com/${u}`:null,social:l,config:t,theme:n}}function ft(t){let n=e.C(),i=(0,r.useLocation)(),a=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,o=a(i.pathname),s=t.find(e=>a(e.path)===o),c=s?.tab?.toLowerCase(),l=c?t.filter(e=>!e.tab||e.tab.toLowerCase()===c):t,u=[],d=new Map;for(let e of l)e.group?(d.has(e.group)||d.set(e.group,{slug:e.group,title:e.groupTitle||e.group,routes:[],icon:e.groupIcon}),d.get(e.group).routes.push(e)):u.push(e);return{groups:Array.from(d.values()),ungrouped:u,activeRoute:s,activePath:o,config:n}}function pt(e=[]){let[n,r]=(0,t.useState)(null);return{headings:e,activeId:n,setActiveId:r}}function mt(e=[],n=[]){let i=(0,r.useLocation)(),a=(0,t.useRef)([]),[o,s]=(0,t.useState)({opacity:0,transform:`translateX(0) scaleX(0)`,width:0}),c=n.find(e=>e.path===i.pathname)?.tab?.toLowerCase(),l=e.findIndex(e=>e.id.toLowerCase()===c),u=l===-1?0:l;return(0,t.useEffect)(()=>{let e=a.current[u];e&&s({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[u,e.length,i.pathname]),{tabs:e,activeIndex:u,indicatorStyle:o,tabRefs:a,activeTabId:c}}function X(e,t,n){let r=e;return t&&(r===t||r.startsWith(t+`/`))&&(r=r===t?`index.md`:r.slice(t.length+1)),n&&(r===n||r.startsWith(n+`/`))&&(r=r===n?`index.md`:r.slice(n.length+1)),r}function ht(){let t=(0,r.useNavigate)(),n=e.v(),{allRoutes:i,currentRoute:a,currentVersion:o,currentLocale:s,config:c}=n,l=c.versions,u=e.b(e=>e.setVersion),d=e=>{if(!l||e===o)return;u(e);let n=`/docs/${e}`;if(a){let t=X(a.filePath,a.version,a.locale),r=i.find(n=>X(n.filePath,n.version,n.locale)===t&&(n.version||l.defaultVersion)===e&&(s?n.locale===s:!n.locale));if(r)n=r.path;else{let t=i.find(t=>X(t.filePath,t.version,t.locale)===`index.md`&&(t.version||l.defaultVersion)===e&&(s?t.locale===s:!t.locale));n=t?t.path:`/docs/${e}${s?`/${s}`:``}`}}t(n)},f=n.availableVersions.map(e=>({...e,label:e.label,value:e.key}));return{currentVersion:o,currentVersionLabel:n.currentVersionLabel,availableVersions:f,handleVersionChange:d}}function gt(){let t=(0,r.useNavigate)(),{allRoutes:n,currentRoute:i,currentLocale:a,config:o}=e.v(),s=o.i18n,c=e.b(e=>e.setLocale);return{currentLocale:a,currentLocaleLabel:o.i18n?.localeConfigs?.[a]?.label||o.i18n?.locales[a]||a,availableLocales:o.i18n?Object.entries(o.i18n.locales).map(([e,t])=>({key:e,label:o.i18n?.localeConfigs?.[e]?.label||t,value:e,isCurrent:e===a})):[],handleLocaleChange:e=>{if(!s||e===a)return;c(e);let r=`/`;if(i){let t=X(i.filePath,i.version,i.locale),a=n.find(n=>X(n.filePath,n.version,n.locale)===t&&(n.locale||s.defaultLocale)===e&&n.version===i.version);if(a)r=a.path;else{let t=n.find(t=>X(t.filePath,t.version,t.locale)===`index.md`&&(t.locale||s.defaultLocale)===e&&t.version===i.version);r=t?t.path:e===s.defaultLocale?i.version?`/${i.version}`:`/`:i.version?`/${i.version}/${e}`:`/${e}`}}else{let t=n.find(t=>(t.filePath===`index.mdx`||t.filePath===`index.md`)&&(t.locale||s.defaultLocale)===e&&!t.version);r=t?t.path:e===s.defaultLocale?`/`:`/${e}`}t(r)}}}function _t(){let{routes:t,currentRoute:n}=e.v(),i=(0,r.useLocation)();if(!n)return{prevPage:null,nextPage:null,currentRoute:null};let a=n.tab?.toLowerCase(),o=a?t.filter(e=>e.tab?.toLowerCase()===a):t.filter(e=>!e.tab),s=o.findIndex(e=>e.path===i.pathname);return{prevPage:s>0?o[s-1]:null,nextPage:s!==-1&&s<o.length-1?o[s+1]:null,currentRoute:n}}function vt(){let{currentRoute:t}=e.v(),n=[];return t&&(t.groupTitle&&n.push({label:t.groupTitle}),n.push({label:t.title,href:t.path})),{crumbs:n,activeRoute:t}}const yt=()=>(0,r.useLocation)();function bt({children:t,className:n,style:r}){return(0,o.jsx)(`div`,{className:e.g(`h-screen flex flex-col overflow-hidden bg-bg-main text-text-main`,n),style:r,children:t})}function xt({children:t,className:n,style:r}){return(0,o.jsx)(`div`,{className:e.g(`mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden`,n),style:r,children:t})}function St({children:t,className:n,style:r}){return(0,o.jsx)(`main`,{className:e.g(`boltdocs-content flex-1 min-w-0 overflow-y-auto`,`contain-layout`,n),style:r,children:t})}function Ct({children:t,className:n,style:r}){let{pathname:i}=yt();return(0,o.jsx)(`div`,{className:e.g(`boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8`,{"max-w-content-max":i.includes(`/docs/`)},n),style:r,children:t})}function wt({children:t,className:n,style:r}){return(0,o.jsx)(`div`,{className:e.g(`flex items-center justify-between mb-10`,n),style:r,children:t})}function Tt({children:t,className:n,style:r}){return(0,o.jsx)(`div`,{className:e.g(`mt-20`,n),style:r,children:t})}const Z=Object.assign(bt,{Body:xt,Content:St,ContentMdx:Ct,ContentHeader:wt,ContentFooter:Tt});function Et(){let{theme:e,setTheme:n}=m(),[r,s]=(0,t.useState)(!1);if((0,t.useEffect)(()=>{s(!0)},[]),!r)return(0,o.jsx)(`div`,{className:`h-9 w-9`});let c=e===`system`?i.Monitor:e===`dark`?i.Moon:i.Sun;return(0,o.jsxs)(G.Trigger,{placement:`bottom right`,children:[(0,o.jsx)(a.Button,{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:(0,o.jsx)(c,{size:20,className:`animate-in fade-in zoom-in duration-300`})}),(0,o.jsxs)(G.Root,{selectionMode:`single`,selectedKeys:[e],onSelectionChange:e=>{let t=Array.from(e)[0];n(t)},children:[(0,o.jsxs)(G.Item,{id:`light`,children:[(0,o.jsx)(i.Sun,{size:16}),(0,o.jsx)(`span`,{children:`Light`})]}),(0,o.jsxs)(G.Item,{id:`dark`,children:[(0,o.jsx)(i.Moon,{size:16}),(0,o.jsx)(`span`,{children:`Dark`})]}),(0,o.jsxs)(G.Item,{id:`system`,children:[(0,o.jsx)(i.Monitor,{size:16}),(0,o.jsx)(`span`,{children:`System`})]})]})]})}async function Dt(e,t,n=`https://api.github.com`){let r=new Headers;t&&r.append(`authorization`,t);let i=await(await fetch(`${n}/repos/${e}`,{headers:r})).json();return i.stargazers_count===void 0?`0`:Ot(i.stargazers_count)}const Ot=e=>Intl.NumberFormat(`en`,{notation:`compact`,compactDisplay:`short`}).format(e);function kt({repo:n}){let[r,i]=(0,t.useState)(null);return(0,t.useEffect)(()=>{n&&Dt(n).then(e=>i(e)).catch(()=>i(`0`))},[n]),(0,o.jsxs)(`a`,{href:`https://github.com/${n}`,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:[(0,o.jsx)(e.o,{className:`h-4 w-4`}),r&&(0,o.jsx)(`span`,{className:`tabular-nums`,children:r})]})}function At({tabs:t,routes:n}){let{currentLocale:r}=e.v(),{indicatorStyle:a,tabRefs:s,activeIndex:c}=mt(t,n),l=e=>{if(!e)return null;if(e.trim().startsWith(`<svg`))return(0,o.jsx)(`span`,{className:`h-4 w-4`,dangerouslySetInnerHTML:{__html:e}});let t=i[e];return t?(0,o.jsx)(t,{size:16}):(0,o.jsx)(`img`,{src:e,alt:``,className:`h-4 w-4 object-contain`})};return(0,o.jsx)(`div`,{className:`mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6`,children:(0,o.jsxs)(V.List,{className:`border-none py-0`,children:[t.map((t,i)=>{let a=i===c,u=n.find(e=>e.tab&&e.tab.toLowerCase()===t.id.toLowerCase());return(0,o.jsxs)(e.m,{href:u?u.path:`#`,ref:e=>{s.current[i]=e},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${a?`text-primary-500`:`text-text-muted hover:text-text-main`}`,children:[l(t.icon),(0,o.jsx)(`span`,{children:Y(t.text,r)})]},t.id)}),(0,o.jsx)(V.Indicator,{style:a})]})})}const jt=(0,t.lazy)(()=>Promise.resolve().then(()=>require(`../search-dialog-dYsCAk5S.js`)).then(e=>({default:e.SearchDialog})));function Q(){let{links:n,title:i,logo:a,logoProps:s,github:c,social:l,config:u}=dt(),{routes:d,allRoutes:f,currentVersion:p,currentLocale:m}=e.v(),{pathname:h}=(0,r.useLocation)(),g=u.theme||{},_=h.startsWith(`/docs`),v=g?.tabs&&g.tabs.length>0;return(0,o.jsxs)(e.r.Root,{className:v?`border-b-0`:``,children:[(0,o.jsxs)(e.r.Content,{children:[(0,o.jsxs)(e.r.Left,{children:[a&&(0,o.jsx)(e.r.Logo,{src:a,alt:s?.alt||i,width:s?.width??24,height:s?.height??24}),(0,o.jsx)(e.r.Title,{children:i}),u.versions&&p&&(0,o.jsx)(Nt,{})]}),(0,o.jsx)(e.r.Center,{children:(0,o.jsx)(t.Suspense,{fallback:(0,o.jsx)(`div`,{className:`h-9 w-32 animate-pulse rounded-md bg-bg-surface`}),children:(0,o.jsx)(jt,{routes:d||[]})})}),(0,o.jsxs)(e.r.Right,{children:[(0,o.jsx)(e.r.Links,{children:n.map(e=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Mt,{link:e},e.href)}))}),u.i18n&&m&&(0,o.jsx)(Pt,{}),(0,o.jsx)(e.r.Split,{}),(0,o.jsx)(Et,{}),c&&(0,o.jsx)(kt,{repo:g?.githubRepo??``}),l.length>0&&(0,o.jsx)(e.r.Split,{}),(0,o.jsx)(`div`,{className:`flex items-center gap-1`,children:l.map(({icon:t,link:n})=>(0,o.jsx)(e.r.Socials,{icon:t,link:n,className:`p-1.5`},n))})]})]}),_&&v&&g?.tabs&&(0,o.jsx)(`div`,{className:`w-full border-b border-border-subtle bg-bg-main`,children:(0,o.jsx)(At,{tabs:g.tabs,routes:f||d||[]})})]})}function Mt({link:t}){let n=e._(t.href||``);return(0,o.jsx)(e.r.Link,{...t,href:n})}function Nt(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:n}=ht();return t.length===0?null:(0,o.jsxs)(G.Trigger,{children:[(0,o.jsx)(S,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:(0,o.jsx)(i.ChevronDown,{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:(0,o.jsx)(`span`,{className:`font-semibold text-[0.8125rem]`,children:e})}),(0,o.jsx)(G.Root,{children:(0,o.jsx)(G.Section,{items:t,children:e=>(0,o.jsx)(G.Item,{onPress:()=>n(e.value),children:e.label},`${e.value??``}`)})})]})}function Pt(){let{currentLocale:e,availableLocales:t,handleLocaleChange:n}=gt();return t.length===0?null:(0,o.jsxs)(G.Trigger,{children:[(0,o.jsx)(S,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:(0,o.jsx)(i.ChevronDown,{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:(0,o.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,o.jsx)(i.Languages,{className:`w-3.5 h-3.5 text-primary-500`}),(0,o.jsx)(`span`,{className:`font-bold text-[0.75rem] tracking-wider uppercase opacity-90`,children:e||`en`})]})}),(0,o.jsx)(G.Root,{children:(0,o.jsx)(G.Section,{items:t,children:e=>(0,o.jsx)(G.Item,{onPress:()=>n(e.value),children:(0,o.jsxs)(`div`,{className:`flex items-center justify-between w-full gap-4`,children:[(0,o.jsx)(`span`,{children:e.label}),(0,o.jsx)(`span`,{className:`text-[10px] font-bold opacity-40 uppercase tracking-tighter`,children:e.value})]})},`${e.value??``}`)})})]})}function Ft(){return(0,o.jsx)(`div`,{className:`flex items-center justify-center mt-10 mb-4 px-4 w-full`,children:(0,o.jsxs)(`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:[(0,o.jsx)(i.Zap,{className:`w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300`,fill:`currentColor`}),(0,o.jsxs)(`span`,{className:`text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide`,children:[`Powered by`,` `,(0,o.jsx)(`strong`,{className:`font-bold text-text-main/80 group-hover:text-text-main`,children:`Boltdocs`})]})]})})}function It(e){if(e)return i[e]||void 0}function Lt({group:e,activePath:n,getIcon:r}){let i=(0,t.useMemo)(()=>e.routes.some(e=>e.path===n),[e.routes,n]),[a,s]=(0,t.useState)(!0);return(0,t.useEffect)(()=>{i&&s(!0)},[i]),(0,o.jsx)(H.Group,{title:e.title,isOpen:a,onToggle:()=>s(!a),children:e.routes.map(e=>{let t=n===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return(0,o.jsx)(H.Link,{label:e.title,href:e.path,active:t,icon:r(e.icon),badge:e.badge},e.path)})})}function Rt({routes:e,config:t}){let{groups:n,ungrouped:r,activePath:i}=ft(e),a=t.theme||{};return(0,o.jsxs)(H.Root,{children:[r.length>0&&(0,o.jsx)(H.Group,{className:`mb-6`,children:r.map(e=>{let t=i===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return(0,o.jsx)(H.Link,{label:e.title,href:e.path,active:t,icon:It(e.icon),badge:e.badge},e.path)})}),n.map(e=>(0,o.jsx)(Lt,{group:e,activePath:i,getIcon:It},e.slug)),a?.poweredBy&&(0,o.jsx)(`div`,{className:`mt-auto pt-8`,children:(0,o.jsx)(Ft,{})})]})}function zt({headings:e=[],editLink:n,communityHelp:r,filePath:i}){let{headings:a}=pt(e),s=t.default.useMemo(()=>a.map(e=>({title:e.text,url:`#${e.id}`,depth:e.level})),[a]);return a.length===0?null:(0,o.jsx)(qe,{toc:s,children:(0,o.jsx)(Bt,{headings:a,editLink:n,communityHelp:r,filePath:i})})}function Bt({headings:e,editLink:n,communityHelp:r,filePath:a}){let s=We(),[c,l]=(0,t.useState)({opacity:0}),u=(0,t.useRef)(null),d=(0,t.useRef)(null);(0,t.useEffect)(()=>{if(!s||!u.current)return;let e=u.current.querySelector(`a[href="#${s}"]`);e&&l({transform:`translateY(${e.offsetTop}px)`,height:`${e.offsetHeight}px`,opacity:1})},[s]);let f=(0,t.useCallback)((e,t)=>{e.preventDefault();let n=document.getElementById(t);n&&(n.scrollIntoView({behavior:`smooth`}),window.history.pushState(null,``,`#${t}`))},[]);return(0,o.jsxs)(z.Root,{children:[(0,o.jsxs)(z.Header,{className:`flex flex-row gap-x-2`,children:[(0,o.jsx)(i.TextAlignStart,{size:16}),`On this page`]}),(0,o.jsx)(Ke,{containerRef:d,children:(0,o.jsxs)(z.Content,{className:`max-h-[450px] boltdocs-otp-scroll-area`,ref:d,children:[(0,o.jsx)(z.Indicator,{style:c}),(0,o.jsx)(`ul`,{className:`relative space-y-2 border-l border-border-subtle`,ref:u,children:e.map(e=>(0,o.jsx)(z.Item,{level:e.level,children:(0,o.jsx)(z.Link,{href:`#${e.id}`,active:s===e.id,onClick:t=>f(t,e.id),className:`pl-4`,children:e.text})},e.id))})]})}),(n||r)&&(0,o.jsxs)(`div`,{className:`mt-8 pt-8 border-t border-border-subtle space-y-4`,children:[(0,o.jsx)(`p`,{className:`text-xs font-bold uppercase tracking-wider text-text-main`,children:`Need help?`}),(0,o.jsxs)(`ul`,{className:`space-y-3`,children:[n&&a&&(0,o.jsx)(`li`,{children:(0,o.jsxs)(`a`,{href:n.replace(`:path`,a),target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors`,children:[(0,o.jsx)(i.Pencil,{size:16}),`Edit this page`]})}),r&&(0,o.jsx)(`li`,{children:(0,o.jsxs)(`a`,{href:r,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors`,children:[(0,o.jsx)(i.CircleHelp,{size:16}),`Community help`]})})]})]})]})}function Vt({siteTitle:e,siteDescription:n,routes:i}){let a=(0,r.useLocation)();return(0,t.useEffect)(()=>{let t=i.find(e=>e.path===a.pathname),r=t?.title,o=t?.description||n||``;document.title=r?`${r} | ${e}`:e;let s=document.querySelector(`meta[name="description"]`);s||(s=document.createElement(`meta`),s.name=`description`,document.head.appendChild(s)),s.content=o,$(`property`,`og:title`,document.title),$(`property`,`og:description`,o),$(`property`,`og:type`,`article`),$(`property`,`og:url`,window.location.href),$(`name`,`twitter:card`,`summary`),$(`name`,`twitter:title`,document.title),$(`name`,`twitter:description`,o);let c=document.querySelector(`link[rel="canonical"]`);c||(c=document.createElement(`link`),c.rel=`canonical`,document.head.appendChild(c)),c.href=window.location.origin+a.pathname},[a.pathname,e,n,i]),null}function $(e,t,n){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement(`meta`),r.setAttribute(e,t),document.head.appendChild(r)),r.content=n}function Ht(){let{crumbs:t,activeRoute:n}=vt(),r=e.C().theme||{};return t.length===0||!r?.breadcrumbs?null:(0,o.jsxs)(U.Root,{children:[(0,o.jsx)(U.Item,{children:(0,o.jsx)(U.Link,{href:`/`,children:(0,o.jsx)(i.Home,{size:14})})}),t.map((t,r)=>(0,o.jsxs)(U.Item,{children:[(0,o.jsx)(U.Separator,{}),(0,o.jsx)(U.Link,{href:t.href,className:e.g({"font-medium text-text-main":t.href===n?.path}),children:t.label})]},`crumb-${t.href}-${t.label}-${r}`))]})}function Ut(){let{prevPage:e,nextPage:t}=_t();return!e&&!t?null:(0,o.jsxs)(B.Root,{className:`animate-in fade-in slide-in-from-bottom-4 duration-700`,children:[e?(0,o.jsxs)(B.Link,{to:e.path,direction:`prev`,children:[(0,o.jsx)(B.Title,{children:`Previous`}),(0,o.jsx)(B.Description,{children:e.title})]}):(0,o.jsx)(`div`,{}),t&&(0,o.jsxs)(B.Link,{to:t.path,direction:`next`,children:[(0,o.jsx)(B.Title,{children:`Next`}),(0,o.jsx)(B.Description,{children:t.title})]})]})}var Wt=class extends t.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`Uncaught error in Boltdocs Layout:`,e,t)}render(){return this.state.hasError?this.props.fallback||(0,o.jsxs)(`div`,{className:`flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4`,children:[(0,o.jsx)(`div`,{className:`text-lg font-bold text-red-400`,children:`Something went wrong`}),(0,o.jsx)(`p`,{className:`text-sm text-text-muted max-w-md`,children:this.state.error?.message||`An unexpected error occurred while rendering this page.`}),(0,o.jsx)(S,{className:`rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer`,onPress:()=>this.setState({hasError:!1}),children:`Try again`})]}):this.props.children}};function Gt({children:t}){let{routes:n,allRoutes:i,currentRoute:a,currentLocale:s}=e.v(),{pathname:c}=(0,r.useLocation)(),l=e.C(),u=y().CopyMarkdown||q,d=c.startsWith(`/docs`);return(0,o.jsxs)(Z,{children:[(0,o.jsx)(Vt,{siteTitle:Y(l.theme?.title,s)||`Boltdocs`,siteDescription:Y(l.theme?.description,s)||``,routes:i}),(0,o.jsx)(Q,{}),(0,o.jsxs)(Z.Body,{children:[d&&(0,o.jsx)(Rt,{routes:n,config:l}),(0,o.jsx)(Z.Content,{children:(0,o.jsxs)(Z.ContentMdx,{children:[d&&(0,o.jsxs)(Z.ContentHeader,{children:[(0,o.jsx)(Ht,{}),(0,o.jsx)(u,{mdxRaw:a?._rawContent,route:a,config:l.theme?.copyMarkdown})]}),(0,o.jsx)(Wt,{children:t}),d&&(0,o.jsx)(Z.ContentFooter,{children:(0,o.jsx)(Ut,{})})]})}),d&&(0,o.jsx)(zt,{headings:a?.headings,editLink:l.theme?.editLink,communityHelp:l.theme?.communityHelp,filePath:a?.filePath})]})]})}exports.Admonition=k,exports.AnchorProvider=qe,exports.Badge=le,exports.Breadcrumbs=Ht,exports.Button=C,exports.ButtonGroup=Ze,exports.Card=fe,exports.Cards=de,exports.Caution=Se,exports.CodeBlock=O,exports.ComponentPreview=ze,exports.ComponentProps=Le,exports.CopyMarkdown=q,exports.Danger=ye,exports.DefaultLayout=Gt,exports.DocsLayout=Z,exports.ErrorBoundary=Wt,exports.Field=Pe,exports.FileTree=F,exports.Head=Vt,exports.Image=Ie,exports.Important=xe,exports.InfoBox=be,exports.Link=Fe,exports.List=Oe,exports.Loading=at,exports.Navbar=Q,exports.NotFound=d,exports.Note=ge,exports.OnThisPage=zt,exports.PageNav=Ut,exports.PrimitiveBreadcrumbs=U,exports.PrimitiveButton=S,exports.PrimitiveLink=e.m,exports.PrimitiveMenu=G,exports.PrimitiveNavLink=e.h,exports.PrimitiveNavbar=e.r,exports.PrimitiveNavigationMenu=I,exports.PrimitiveOnThisPage=z,exports.PrimitivePageNav=B,exports.PrimitivePopover=W,exports.PrimitiveSidebar=H,exports.PrimitiveSkeleton=K,exports.PrimitiveTabs=V,exports.PrimitiveTooltip=E,exports.ScrollProvider=Ke,exports.SearchDialogPrimitive=e.n,exports.Sidebar=Rt,exports.Tab=ae,exports.Table=Ne,exports.Tabs=oe,exports.Tip=_e,exports.Video=se,exports.Warning=ve,exports.cn=e.g,exports.createBoltdocsApp=ut,exports.useActiveAnchor=We,exports.useActiveAnchors=Ge,exports.useBreadcrumbs=vt,exports.useConfig=e.C,exports.useI18n=gt,exports.useItems=R,exports.useLocalizedTo=e._,exports.useLocation=yt,exports.useMdxComponents=y,exports.useNavbar=dt,exports.useOnThisPage=pt,exports.usePageNav=_t,exports.useRoutes=e.v,exports.useSearch=e.t,exports.useSidebar=ft,exports.useTabs=mt,exports.useTheme=m,exports.useVersion=ht;
6
+ import{A as e,B as t,C as n,D as r,E as i,F as a,H as o,I as s,L as c,M as l,N as u,O as d,P as f,R as p,S as m,T as h,U as g,V as _,_ as ee,a as v,b as y,c as te,d as b,f as ne,g as re,h as ie,i as ae,j as x,k as oe,l as S,m as se,n as C,o as w,p as ce,r as T,s as E,t as le,u as ue,v as D,w as de,x as fe,y as O,z as k}from"../use-search-C9bxCqfF.js";import{Outlet as pe,useLoaderData as me,useLocation as A,useNavigate as he}from"react-router-dom";import ge from"virtual:boltdocs-layout";import{Children as j,Component as _e,Suspense as ve,createContext as ye,isValidElement as M,lazy as be,use as xe,useCallback as N,useEffect as P,useLayoutEffect as Se,useMemo as F,useRef as I,useState as L}from"react";import{Fragment as R,jsx as z,jsxs as B}from"react/jsx-runtime";import*as V from"react-aria-components";import{Button as Ce,RouterProvider as we}from"react-aria-components";import{Helmet as Te,HelmetProvider as Ee}from"react-helmet-async";import*as De from"lucide-react";import{AlertTriangle as Oe,ArrowLeft as ke,Bookmark as Ae,Check as je,ChevronDown as H,ChevronLeft as Me,ChevronRight as U,ChevronUp as Ne,ChevronsLeft as Pe,ChevronsRight as Fe,Circle as Ie,CircleHelp as Le,Copy as W,ExternalLink as Re,File as ze,FileCode as Be,FileImage as Ve,FileText as He,Flame as Ue,Folder as We,Home as Ge,Info as Ke,Languages as qe,Lightbulb as Je,Link as Ye,Monitor as Xe,Moon as Ze,Pencil as Qe,ShieldAlert as $e,Sun as et,TextAlignStart as tt,Zap as nt}from"lucide-react";import{cva as G}from"class-variance-authority";import rt from"virtual:boltdocs-mdx-components";import it from"virtual:boltdocs-icons";var at=Object.defineProperty,ot=(e,t)=>{let n={};for(var r in e)at(n,r,{get:e[r],enumerable:!0});return t||at(n,Symbol.toStringTag,{value:`Module`}),n};function st(e){return e}const ct=Symbol.for(`__BDOCS_MDX_COMPONENTS_CONTEXT__`),lt=Symbol.for(`__BDOCS_MDX_COMPONENTS_INSTANCE__`),ut=globalThis[ct]||(globalThis[ct]=ye({}));function dt(){let e=xe(ut);return(!e||Object.keys(e).length===0)&&globalThis[lt]?globalThis[lt]:e}function ft({components:e,children:t}){return typeof globalThis<`u`&&(globalThis[lt]=e),z(ut.Provider,{value:e,children:t})}function pt({route:e,content:t,mdxComponents:n}){let r=dt(),i=F(()=>({...r,...n}),[r,n]);return t?z(ge,{route:e,children:z(t,{components:i})}):null}function mt({MDXComponent:e,mdxComponents:t}){let n=me(),r=e||n?.MDXComponent,i=t||n?.mdxComponents;return r?z(pt,{route:{path:n.path,filePath:n.filePath,title:n.frontmatter.title,description:n.frontmatter.description,headings:n.headings,locale:n.locale,version:n.version,group:n.group,groupTitle:n.groupTitle},content:r,mdxComponents:i}):null}const ht=Symbol.for(`__BDOCS_THEME_CONTEXT__`),gt=Symbol.for(`__BDOCS_THEME_INSTANCE__`),_t=`boltdocs-theme-change`,vt=globalThis[ht]||(globalThis[ht]=ye(void 0));function yt({children:e}){let[t,n]=L(`system`),[r,i]=L(`dark`),a=e=>{let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=e===`dark`||e===`system`&&t.matches,r=window.document.documentElement;r.classList.toggle(`dark`,n),r.dataset.theme=n?`dark`:`light`,i(n?`dark`:`light`)};P(()=>{let e=localStorage.getItem(`boltdocs-theme`);e?(n(e),a(e)):a(`system`);let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>{(localStorage.getItem(`boltdocs-theme`)||`system`)===`system`&&a(`system`)};return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[]);let o={theme:t,resolvedTheme:r,setTheme:e=>{n(e),localStorage.setItem(`boltdocs-theme`,e),a(e),typeof window<`u`&&window.dispatchEvent(new CustomEvent(_t,{detail:e}))}};return typeof globalThis<`u`&&(globalThis[gt]=o),z(vt.Provider,{value:o,children:e})}function K(){let e=xe(vt),[,t]=L({});if(P(()=>{if(e)return;let n=()=>t({});return window.addEventListener(_t,n),()=>window.removeEventListener(_t,n)},[e]),!e&&typeof globalThis<`u`&&globalThis[gt])return globalThis[gt];if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function bt(){let{pathname:e,hash:t}=A();return Se(()=>{let e=document.querySelector(`.boltdocs-content`)||window,n=()=>e===window?window.scrollY:e.scrollTop,r=(t,n=`auto`)=>{e===window?window.scrollTo({top:t,behavior:n}):e.scrollTo({top:t,behavior:n})};if(t){let i=t.replace(`#`,``),a=document.getElementById(i);if(a){let t=e===window?0:e.getBoundingClientRect().top;r(a.getBoundingClientRect().top-t-80+n(),`smooth`);return}}r(0)},[e,t]),null}const xt=({className:e,variant:t,size:n,rounded:r,iconSize:i,disabled:a,...o})=>z(c,{className:k(`group`,p({variant:t,size:n,rounded:r,iconSize:i,disabled:a,className:e})),...o}),St=(e,t)=>{if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||typeof e==`number`)return String(e);if(Array.isArray(e))return e.map(e=>St(e,t)).join(``);if(M(e)){let n=t?.get(e.type);return n?n(e.props):St(e.props.children,t)}return``},Ct=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);return t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t),!0}};function wt(e){let{title:t}=e,[n,r]=L(!1),[i,a]=L(!1),[o,s]=L(!1),c=I(null);_();let l=N(async()=>{Ct(c.current?.textContent??``),r(!0),setTimeout(()=>r(!1),2e3)},[]);return P(()=>{s((c.current?.textContent?.length??0)>120)},[e.children,e.highlightedHtml]),{copied:n,isExpanded:i,setIsExpanded:a,isExpandable:o,preRef:c,handleCopy:l,shouldTruncate:o&&!i}}const Tt=({children:e,className:t,plain:n=!1,...r})=>z(`div`,{className:k(`not-prose boltdocs-code-block`,`group relative overflow-hidden bg-(--color-code-bg)`,`contain-layout contain-paint`,{"my-6 rounded-lg border border-border-subtle":!n},t),...r,children:e}),Et=({children:e,className:t,...n})=>z(`div`,{className:k(`flex h-9 items-center justify-between px-4 py-1.5`,`border-b border-border-subtle bg-bg-surface/50`,`text-[13px] font-medium text-text-muted`,t),...n,children:e}),Dt=({children:e,className:t,...n})=>z(`div`,{className:k(`flex items-center space-x-2`,t),...n,children:e}),Ot=({className:e,children:t,shouldTruncate:n=!1,...r})=>z(`div`,{className:k(`relative`,{"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":n},e),...r,children:t}),kt={ts:a,tsx:l,js:oe,jsx:l,json:e,css:r,html:h,md:x,mdx:x,bash:f,sh:f,yaml:s,yml:s,rs:u,rust:u,toml:i},At=({copied:e,handleCopy:t})=>z(de,{content:e?`Copied!`:`Copy code`,children:z(Ce,{onPress:t,className:k(`grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2`,e?`text-emerald-400`:`text-text-muted hover:text-text-main`),"aria-label":`Copy code`,children:z(e?je:W,{size:20})})});function q(e){let{children:t,hideCopy:n=!1,highlightedHtml:r,"data-highlighted-html":i,title:a,"data-title":o,"data-lang":s,plain:c=!1,...l}=e,u=r||i,d=a||o,f=e.lang||s||``,{copied:p,isExpanded:m,setIsExpanded:h,isExpandable:g,preRef:_,handleCopy:ee,shouldTruncate:v}=wt(e),y=kt[f];return B(Tt,{plain:c,className:e.className,children:[(d||!n)&&B(Et,{children:[z(Dt,{children:d&&B(R,{children:[y?z(y,{size:14}):z(ze,{size:14,className:`opacity-60`}),z(`span`,{children:d})]})}),!n&&z(At,{copied:p,handleCopy:ee})]}),B(Ot,{shouldTruncate:v,children:[u?z(`div`,{ref:_,className:`shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!`,dangerouslySetInnerHTML:{__html:u}}):z(`pre`,{ref:_,className:`m-0! p-5! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7] overflow-x-auto`,...l,children:St(t)}),g&&z(`div`,{className:k(v?`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:z(Ce,{onPress:()=>h(!m),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:m?`Show less`:`Expand code`})})]})]})}function jt({initialIndex:e=0,tabs:t}){let n=t[e]?.props.disabled?t.findIndex(e=>!e.props.disabled):e,[r,i]=L(n===-1?0:n),a=I([]),[o,s]=L({opacity:0,transform:`translateX(0)`,width:0});return P(()=>{let e=a.current[r];e&&s({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[r,t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:o,handleKeyDown:N(e=>{let n=0;if(e.key===`ArrowRight`?n=1:e.key===`ArrowLeft`&&(n=-1),n!==0){let e=(r+n+t.length)%t.length;for(;t[e].props.disabled&&e!==r;)e=(e+n+t.length)%t.length;e!==r&&!t[e].props.disabled&&(i(e),a.current[e]?.focus())}},[r,t])}}const Mt=G(`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`}}),Nt=G(`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 Pt({children:e}){return z(`div`,{className:`py-4`,children:typeof e==`string`?z(q,{className:`language-bash`,children:z(`code`,{children:e.trim()})}):e})}function Ft({defaultIndex:e=0,children:t}){let n=F(()=>j.toArray(t).filter(e=>M(e)&&e.props?.label),[t]),{active:r,setActive:i,tabRefs:a,indicatorStyle:o}=jt({initialIndex:e,tabs:n});return z(`div`,{className:`my-8 w-full group/tabs`,children:B(V.Tabs,{selectedKey:r.toString(),onSelectionChange:e=>i(Number(e)),className:`w-full`,children:[B(V.TabList,{"aria-label":`Content Tabs`,className:k(Mt()),children:[n.map((e,t)=>{let{label:n,icon:r,disabled:i}=e.props,o=t.toString();return B(V.Tab,{id:o,isDisabled:i,ref:e=>{a.current[t]=e},className:({isSelected:e,isDisabled:t})=>k(Nt({isActive:e,isDisabled:t})),children:[!!r&&z(`span`,{className:`shrink-0 [&>svg]:w-4 [&>svg]:h-4`,children:r}),z(`span`,{children:n})]},o)}),z(`div`,{className:`absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none`,style:o,"aria-hidden":`true`})]}),n.map((e,t)=>z(V.TabPanel,{id:t.toString(),children:n[t]},t))]})})}function It({src:e,poster:t,alt:n,children:r,controls:i,preload:a=`metadata`,...o}){let s=I(null),[c,l]=L(!1);return P(()=>{let e=s.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e.isIntersecting&&(l(!0),t.disconnect())},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[]),z(`div`,{ref:s,className:`my-6 overflow-hidden rounded-lg border border-border-subtle`,children:c?B(`video`,{className:`block w-full h-auto`,src:e,poster:t,controls:!0,preload:a,playsInline:!0,...o,children:[r,`Your browser does not support the video tag.`]}):z(`div`,{className:`aspect-video bg-bg-surface animate-pulse`,role:`img`,"aria-label":n||`Video`})})}const Lt=G(`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 Rt({variant:e=`default`,children:t,className:n=``,...r}){return z(`span`,{className:k(Lt({variant:e}),n),...r,children:t})}const zt=G(`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 Bt({cols:e=3,children:t,className:n=``,...r}){return z(`div`,{className:k(zt({cols:e}),n),...r,children:t})}function Vt({title:e,icon:t,href:n,children:r,className:i=``,...a}){let o=I(null),s=I(null),c=N(e=>{let t=o.current||s.current;if(!t)return;let{left:n,top:r}=t.getBoundingClientRect();t.style.setProperty(`--x`,`${e.clientX-n}px`),t.style.setProperty(`--y`,`${e.clientY-r}px`)},[]),l=B(R,{children:[z(`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&&z(`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}),B(`div`,{className:`space-y-1.5`,children:[e&&z(`h3`,{className:`text-sm font-bold text-text-main`,children:e}),r&&z(`div`,{className:`text-sm text-text-muted leading-relaxed`,children:r})]})]}),u=k(`group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden`,`transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,i);return n?z(V.Link,{ref:s,href:n,className:k(u,`no-underline cursor-pointer`),onMouseMove:c,...a,children:l}):z(`div`,{ref:o,role:`presentation`,className:u,onMouseMove:c,...a,children:l})}const Ht={note:z(Ae,{size:18}),tip:z(Je,{size:18}),info:z(Ke,{size:18}),warning:z(Oe,{size:18}),danger:z($e,{size:18}),important:z(Ue,{size:18}),caution:z(nt,{size:18})},Ut=G(`py-4 px-4 rounded-lg flex items-center gap-3 border-[1px] flex-row`,{variants:{type:{note:`border-primary-200 dark:border-primary-800 bg-primary-500/5 text-primary-400`,tip:`border-emerald-200 dark:border-emerald-800 bg-emerald-500/5 text-emerald-500`,info:`border-sky-200 dark:border-sky-800 bg-sky-500/5 text-sky-500`,warning:`border-amber-200 dark:border-amber-800 bg-amber-500/5 text-amber-500`,danger:`border-red-200 dark:border-red-800/70 bg-red-500/5 text-red-500`,important:`border-orange-200 dark:border-orange-800/70 bg-orange-500/5 text-orange-500`,caution:`border-yellow-200 dark:border-yellow-800/70 bg-yellow-500/5 text-yellow-500`}},defaultVariants:{type:`note`}});function J({type:e=`note`,title:t,children:n,className:r=``,...i}){return B(`div`,{className:k(Ut({type:e}),r),role:e===`warning`||e===`danger`?`alert`:`note`,...i,children:[Ht[e],z(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0`,children:n})]})}const Wt=e=>z(J,{type:`note`,...e}),Gt=e=>z(J,{type:`tip`,...e}),Kt=e=>z(J,{type:`warning`,...e}),qt=e=>z(J,{type:`danger`,...e}),Jt=e=>z(J,{type:`info`,...e}),Yt=e=>z(J,{type:`important`,...e}),Xt=e=>z(J,{type:`caution`,...e}),Zt=G(`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}}),Qt=G(`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}}),$t=G(`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 en({icon:e,children:t,variant:n,dense:r}){return B(`li`,{className:k(Qt({variant:n,dense:r})),children:[e&&z(`span`,{className:k($t({variant:n===`bubble`?`bubble`:`default`})),children:e}),z(`div`,{className:`flex-1 text-text-muted group-hover:text-text-main transition-colors`,children:t})]})}const tn={checked:e=>z(je,{size:14,className:k(`text-emerald-500 shrink-0`,e)}),arrow:e=>z(U,{size:14,className:k(`text-primary-400 shrink-0`,e)}),bubble:e=>z(Ie,{size:6,fill:`currentColor`,className:k(`text-primary-500 shrink-0`,e)}),default:()=>null,number:()=>null};function nn({variant:e=`default`,cols:t=1,dense:n=!1,children:r,className:i,...a}){let o=t!==void 0&&Number(t)>1,s=tn[e],c=Zt({variant:e,cols:t,dense:n,isGrid:o,className:i});return e===`default`||e===`number`?z(e===`number`?`ol`:`ul`,{className:c,...a,children:r}):z(`ul`,{className:c,...a,children:j.map(r,t=>{if(!M(t))return t;let r=t,i=r.type===`li`?r.props.children:r.props.children||t;return z(en,{icon:s(),variant:e,dense:n,children:i})})})}const rn={ts:a,tsx:l,js:oe,jsx:l,json:e,css:r,html:h,md:x,mdx:x,bash:f,sh:f,yaml:s,yml:s},an={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 on(e){return typeof e==`string`?e:typeof e==`number`?e.toString():Array.isArray(e)?e.map(on).join(``):M(e)&&e.props&&typeof e.props==`object`&&`children`in e.props?on(e.props.children):``}function sn(e,t){let n=e.toLowerCase(),r=`shrink-0 transition-colors duration-200`;if(t)return z(We,{size:16,strokeWidth:2,className:k(r,`text-primary-400`),fill:`currentColor`,fillOpacity:.15});let i=rn[n.split(`.`).pop()||``];if(i)return z(i,{size:16});let a=k(r,`text-text-dim group-hover:text-text-main`);return an.CODE.test(n)?z(Be,{size:16,strokeWidth:2,className:a}):an.TEXT.test(n)?z(He,{size:16,strokeWidth:2,className:a}):an.IMAGE.test(n)?z(Ve,{size:16,strokeWidth:2,className:a}):z(ze,{size:16,strokeWidth:2,className:a})}function cn(e,t){if(!M(e))return!1;let n=e.type;if(typeof n==`string`)return n===t;if(typeof n==`function`)return n.name===t||n.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function ln(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Y(e,t=`root`){if(!M(e))return[];let n=[];if(cn(e,`ul`))return j.forEach(e.props.children,(e,r)=>{n.push(...Y(e,`${t}-${r}`))}),n;if(cn(e,`li`)){let r=j.toArray(e.props.children),i=r.findIndex(e=>cn(e,`ul`)),a=i!==-1,o=a?r.slice(0,i):r,s=a?r.slice(i):[],{name:c,comment:l}=ln(on(o)),u=c.endsWith(`/`),d=u?c.slice(0,-1):c,f=a||u;return n.push({id:`${t}-${d}`,name:d,comment:l,isFolder:f,children:a?Y(s[0],`${t}-${d}`):void 0}),n}return e.props&&typeof e.props==`object`&&`children`in e.props&&j.forEach(e.props.children,(e,r)=>{n.push(...Y(e,`${t}-${r}`))}),n}function un({item:e}){return B(V.TreeItem,{id:e.id,textValue:e.name,className:`outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md`,children:[z(V.TreeItemContent,{children:({isExpanded:t,hasChildItems:n})=>B(`div`,{className:`flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer`,children:[z(`div`,{style:{width:`calc((var(--tree-item-level) - 1) * 1rem)`},className:`shrink-0`}),n?z(V.Button,{slot:`chevron`,className:`outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors`,children:z(U,{size:14,strokeWidth:3,className:k(`transition-transform duration-200`,t&&`rotate-90`)})}):z(`div`,{className:`w-[18px]`}),sn(e.name,e.isFolder),z(`span`,{className:k(`text-sm transition-colors truncate select-none`,e.isFolder?`font-semibold text-text-main`:`text-text-muted group-hover:text-text-main`),children:e.name}),e.comment&&B(`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&&z(V.Collection,{items:e.children,children:e=>z(un,{item:e})})]})}function dn({children:e}){let t=F(()=>Y(e),[e]);return z(`div`,{className:`my-8`,children:z(V.Tree,{items:t,"aria-label":`File Tree`,className:k(`rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none`,`max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle`,`focus-visible:ring-2 focus-visible:ring-primary-500/20`),children:e=>z(un,{item:e})})})}function fn({data:e,sortable:t=!1,paginated:n=!1,pageSize:r=10}){let[i,a]=L(null),[o,s]=L(1),c=F(()=>{if(!e)return[];let n=[...e];return t&&i!==null&&n.sort((e,t)=>{let n=e[i.key],r=t[i.key],a=typeof n==`string`?n:``,o=typeof r==`string`?r:``;return a<o?i.direction===`asc`?-1:1:a>o?i.direction===`asc`?1:-1:0}),n},[e,i,t]);return{sortConfig:i,currentPage:o,setCurrentPage:s,totalPages:Math.ceil(c.length/r),paginatedData:F(()=>{if(!n)return c;let e=(o-1)*r;return c.slice(e,e+r)},[c,n,o,r]),requestSort:e=>{if(!t)return;let n=`asc`;i&&i.key===e&&i.direction===`asc`&&(n=`desc`),a({key:e,direction:n})}}}function pn({headers:e,data:t,children:n,className:r=``,sortable:i=!1,paginated:a=!1,pageSize:o=10}){let{sortConfig:s,currentPage:c,setCurrentPage:l,totalPages:u,paginatedData:d,requestSort:f}=fn({data:t,sortable:i,paginated:a,pageSize:o}),p=e=>i?s?.key===e?s.direction===`asc`?z(Ne,{size:14,className:`ml-1 text-primary-400`}):z(H,{size:14,className:`ml-1 text-primary-400`}):z(H,{size:14,className:`ml-1 opacity-30`}):null,m=n||B(R,{children:[e&&z(`thead`,{children:z(`tr`,{children:e.map((e,t)=>z(`th`,{onClick:()=>f(t),className:k(`text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm`,i&&`cursor-pointer select-none hover:text-primary-400 transition-colors`),children:B(`div`,{className:`flex items-center`,children:[e,p(t)]})},t))})}),d&&z(`tbody`,{children:d.map((e,t)=>z(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:e.map((e,t)=>z(`td`,{className:`px-3 py-2 border-b border-border-subtle text-sm text-text-muted`,children:e},t))},t))})]});return B(`div`,{className:k(`my-6 rounded-lg border border-border-subtle overflow-hidden`,r),children:[z(`div`,{className:`overflow-x-auto`,children:z(`table`,{className:`w-full border-collapse text-sm`,children:m})}),a&&u>1&&B(`div`,{className:`flex items-center justify-between border-t border-border-subtle px-4 py-3`,children:[B(`span`,{className:`text-xs text-text-muted`,children:[`Page `,c,` of `,u]}),B(`div`,{className:`flex items-center gap-1`,children:[z(V.Button,{onPress:()=>l(1),isDisabled:c===1,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:z(Pe,{size:16})}),z(V.Button,{onPress:()=>l(e=>Math.max(e-1,1)),isDisabled:c===1,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:z(Me,{size:16})}),z(V.Button,{onPress:()=>l(e=>Math.min(e+1,u)),isDisabled:c===u,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:z(U,{size:16})}),z(V.Button,{onPress:()=>l(u),isDisabled:c===u,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:z(Fe,{size:16})})]})]})]})}function mn({name:e,type:t,defaultValue:n,required:r=!1,children:i,id:a,className:o=``}){return B(`article`,{className:k(`group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300`,o),id:a,children:[B(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4`,children:[B(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[z(`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`,children:e}),t&&z(`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 shadow-sm`,children:t}),r&&B(`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 text-red-400 border border-red-500/20 shadow-sm`,children:[z(`span`,{className:`h-1 w-1 rounded-full bg-red-400 animate-pulse`}),`Required`]})]}),n&&B(`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:[z(`span`,{className:`font-semibold opacity-60 uppercase tracking-tighter`,children:`Default`}),z(`code`,{className:`font-mono text-text-main font-medium`,children:n})]})]}),z(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30`,children:i})]})}function hn({to:e,children:t,className:n=``,...r}){let i=e&&(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`));return z(O,{href:e,className:k(`text-blue-600 hover:text-blue-800 hover:underline cursor-pointer`,n),target:i?`_blank`:void 0,rel:i?`noopener noreferrer`:void 0,...r,children:t})}function gn({src:e,alt:t,theme:n,...r}){let{theme:i}=K();return n&&n!==i?null:z(`img`,{src:e,alt:t||``,...r})}function _n({title:e,props:t,className:n=``}){return B(`div`,{className:k(`my-6`,n),children:[e&&z(`h3`,{className:`text-base font-bold text-text-main mb-3`,children:e}),z(`div`,{className:`overflow-x-auto rounded-lg border border-border-subtle`,children:B(`table`,{className:`w-full border-collapse text-sm`,children:[z(`thead`,{children:B(`tr`,{children:[z(`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`}),z(`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`}),z(`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`}),z(`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`})]})}),z(`tbody`,{children:t.map((e,t)=>B(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:[B(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:[z(`code`,{className:`rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400`,children:e.name}),e.required&&z(`span`,{className:`ml-1 text-red-400 font-bold`,children:`*`})]}),z(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:z(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted`,children:e.type})}),z(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:e.defaultValue?z(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400`,children:e.defaultValue}):z(`span`,{className:`text-text-dim`,children:`—`})}),z(`td`,{className:`px-4 py-2.5 border-b border-border-subtle text-text-muted`,children:e.description})]},`${e.name}-${t}`))})]})})]})}function vn(e){let{code:t,children:n,preview:r}=e;return{initialCode:F(()=>(t??(typeof n==`string`?n:``)).trim(),[t,n]),previewElement:F(()=>r??(typeof n==`string`?null:n),[r,n])}}function yn(e){let{highlightedHtml:t,hideCode:n=!1,hideCopy:r=!1}=e,{initialCode:i,previewElement:a}=vn(e);return B(`div`,{className:`my-6 overflow-hidden rounded-xl border border-border-subtle`,children:[z(`div`,{className:`flex items-center justify-center p-8 bg-bg-surface`,children:a}),!n&&z(`div`,{className:`border-t border-border-subtle`,children:z(q,{hideCopy:r,lang:`tsx`,highlightedHtml:t,plain:!0,children:i})})]})}const bn=e=>{let[t,n]=L(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)},handleOpenRaw:()=>{let t=new Blob([e],{type:`text/plain;charset=utf-8`}),n=URL.createObjectURL(t);window.open(n,`_blank`)}}};function xn({content:e,mdxRaw:t,config:n}){let r=t||e||``,{copied:i,handleCopy:a,handleOpenRaw:o}=bn(r),s=n!==!1,l=typeof n==`object`&&n.text||`Copy Markdown`;return!s||!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:B(v,{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(c,{variant:`ghost`,onPress:a,icon:z(i?je:W,{size:16}),iconPosition:`left`,className:k(`px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0`,`text-text-main transition-all duration-300 hover:bg-primary-500/5`,i&&`text-emerald-500 hover:bg-emerald-500/5`),children:i?`Copied!`:l}),B(T.Trigger,{placement:`bottom end`,children:[z(c,{variant:`ghost`,isIconOnly:!0,icon:z(H,{size:14}),className:k(`px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0`,`transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500`)}),B(T.Root,{className:`w-52`,children:[B(T.Item,{onAction:a,children:[z(W,{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`})]}),B(T.Item,{onAction:o,children:[z(Re,{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`})]})]})]})]})})}var Sn=ot({Admonition:()=>J,Badge:()=>Rt,Button:()=>xt,Card:()=>Vt,Cards:()=>Bt,Caution:()=>Xt,CodeBlock:()=>q,ComponentPreview:()=>yn,ComponentProps:()=>_n,CopyMarkdown:()=>xn,Danger:()=>qt,Field:()=>mn,FileTree:()=>dn,Image:()=>gn,Important:()=>Yt,InfoBox:()=>Jt,Link:()=>hn,List:()=>nn,Note:()=>Wt,Tab:()=>Pt,Table:()=>pn,Tabs:()=>Ft,Tip:()=>Gt,Video:()=>It,Warning:()=>Kt});function Cn(){return z(`div`,{className:k(`w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in`),children:B(`div`,{className:`mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10`,children:[B(`div`,{className:`flex gap-2`,children:[z(C,{className:`h-3 w-16`}),z(C,{className:`h-3 w-24`})]}),z(C,{className:`h-10 w-[60%] sm:h-12`}),B(`div`,{className:`space-y-3`,children:[z(C,{className:`h-4 w-full`}),z(C,{className:`h-4 w-[95%]`}),z(C,{className:`h-4 w-[40%]`})]}),B(`div`,{className:`space-y-6 pt-4`,children:[z(C,{className:`h-7 w-32`}),B(`div`,{className:`space-y-3`,children:[z(C,{className:`h-4 w-full`}),z(C,{className:`h-4 w-[98%]`}),z(C,{className:`h-4 w-[92%]`}),z(C,{className:`h-4 w-[60%]`})]})]}),z(C,{className:`h-32 w-full rounded-lg bg-bg-muted/50`}),B(`div`,{className:`space-y-6 pt-4`,children:[z(C,{className:`h-7 w-48`}),B(`div`,{className:`space-y-3`,children:[z(C,{className:`h-4 w-full`}),z(C,{className:`h-4 w-[85%]`})]})]})]})})}const X=({level:e,id:t,children:n,...r})=>B(`h${e}`,{id:t,...r,className:`boltdocs-heading`,children:[n,t&&z(`a`,{href:`#${t}`,className:`header-anchor`,"aria-label":`Anchor`,children:z(Ye,{size:16})})]}),wn={...Sn,Loading:Cn,h1:e=>z(X,{level:1,...e}),h2:e=>z(X,{level:2,...e}),h3:e=>z(X,{level:3,...e}),h4:e=>z(X,{level:4,...e}),h5:e=>z(X,{level:5,...e}),h6:e=>z(X,{level:6,...e}),pre:e=>z(q,{...e,children:e.children})};function Tn({config:e}){let{currentLocale:t}=g();return P(()=>{if(!e.i18n||typeof document>`u`)return;let n=t||e.i18n.defaultLocale,r=e.i18n.localeConfigs?.[n];document.documentElement.lang=r?.htmlLang||n||`en`,document.documentElement.dir=r?.direction||`ltr`},[t,e.i18n]),null}function En({config:e}){let t=A(),{setLocale:n,setVersion:r,currentLocale:i,currentVersion:a}=g();return P(()=>{let o=t.pathname.split(`/`).filter(Boolean),s=0,c=e.versions?.defaultVersion,l=e.i18n?.defaultLocale;if(o[s]===`docs`&&s++,e.versions&&o.length>s){let t=e.versions.versions.find(e=>e.path===o[s]);t&&(c=t.path,s++)}e.i18n&&o.length>s&&e.i18n.locales[o[s]]?l=o[s]:e.i18n&&o.length===0&&(l=i||e.i18n.defaultLocale),l!==i&&n(l||``),c!==a&&r(c??``)},[t.pathname,e,n,r,i,a]),null}function Dn({config:e,routes:r,components:i={}}){let a=F(()=>({...wn,...rt,...i}),[i]),s=he();return z(Ee,{children:z(o,{children:z(yt,{children:z(ft,{components:a,children:z(t.Provider,{value:e,children:z(n,{routes:r,children:B(we,{navigate:s,children:[z(bt,{}),z(En,{config:e}),z(Tn,{config:e}),z(pe,{})]})})})})})})})}function On(){return z(`div`,{className:`flex items-center justify-center min-h-[60vh] text-center`,children:B(`div`,{className:`space-y-4`,children:[z(`span`,{className:`text-8xl font-black tracking-tighter text-primary-500/20`,children:`404`}),z(`h1`,{className:`text-2xl font-bold text-text-main`,children:`Page Not Found`}),z(`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.`}),B(O,{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:[z(ke,{size:16}),` Go to Home`]})]})})}function kn(e,t){let n=t.replace(/\\/g,`/`);return Object.keys(e).find(e=>e.endsWith(`/${n}`)||e.endsWith(n))}function An(e){let{routesData:t,config:n,mdxModules:r,Layout:i,homePage:a,externalPages:o,externalLayout:s,components:c}=e,l=s||i,u=e=>{let t=n.base||`/`;return e.startsWith(t)?e:`${t===`/`?``:t.replace(/\/$/,``)}${e.startsWith(`/`)?e:`/${e}`}`||`/`},d=[...t.map(e=>{let t=kn(r,e.filePath),n=t?r[t]?.default:null,i=u(e.path===``?`/`:e.path);return{path:i,element:z(mt,{MDXComponent:n,mdxComponents:c}),loader:async()=>({path:i,frontmatter:{title:e.title,description:e.description||``},headings:e.headings||[],filePath:e.filePath,locale:e.locale,version:e.version,group:e.group,groupTitle:e.groupTitle}),getStaticPaths:()=>[i]}})];if(a){let e=[u(`/`)];n.i18n&&Object.keys(n.i18n.locales).forEach(t=>{e.push(u(`/${t}`))}),e.forEach(e=>{d.find(t=>t.path===e)||d.push({path:e,element:z(l,{children:z(a,{})}),getStaticPaths:()=>[e]})})}return o&&Object.entries(o).forEach(([e,t])=>{let r=u(e);d.find(e=>e.path===r)||(d.push({path:r,element:z(l,{children:z(t,{})}),getStaticPaths:()=>[r]}),n.i18n&&Object.keys(n.i18n.locales).forEach(n=>{let r=u(`/${n}${e===`/`?``:e}`);d.find(e=>e.path===r)||d.push({path:r,element:z(l,{children:z(t,{})}),getStaticPaths:()=>[r]})}))}),d.push({path:`*`,element:z(l,{children:z(On,{})})}),[{element:z(Dn,{config:n,routes:[...t],components:c}),children:d}]}function Z(e,t){return e?typeof e==`string`?e:t&&e[t]?e[t]:Object.values(e)[0]||``:``}function jn(){let e=_(),{theme:t,resolvedTheme:n}=K(),r=A(),{currentLocale:i}=m(),a=e.theme||{},o=Z(a.title,i)||`Boltdocs`,s=a.navbar||[],c=a.socialLinks||[],l=a.githubRepo,u=s.map(t=>{let n=t.href||t.to||t.link||``;return{label:Z(t.label||t.text,i),href:n,active:(t=>{let n=r.pathname;if(n===t)return!0;if(!t||t===`/`)return n===`/`;let i=t=>{let n=t.split(`/`).filter(Boolean),r=0;return e.i18n?.locales&&n[r]&&e.i18n.locales[n[r]]&&r++,e.versions?.versions&&n[r]&&e.versions.versions.some(e=>e.path===n[r])&&r++,n.slice(r)},a=i(t),o=i(n);return a.length===0?o.length===0:o.length<a.length?!1:a.every((e,t)=>o[t]===e)})(n),to:n.startsWith(`http`)||n.startsWith(`//`)?`external`:void 0}}),d=a.logo;return{links:u,title:o,logo:d?typeof d==`string`?d:n===`dark`?d.dark:d.light:null,logoProps:{alt:(d&&typeof d==`object`?d.alt:void 0)||o,width:d&&typeof d==`object`?d.width:void 0,height:d&&typeof d==`object`?d.height:void 0},github:l?`https://github.com/${l}`:null,social:c,config:e,theme:t}}function Mn(e){let t=_(),n=A(),r=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,i=r(n.pathname),a=e.find(e=>r(e.path)===i),o=a?.tab?.toLowerCase(),s=o?e.filter(e=>!e.tab||e.tab.toLowerCase()===o):e,c=[],l=new Map;for(let e of s)e.group?(l.has(e.group)||l.set(e.group,{slug:e.group,title:e.groupTitle||e.group,routes:[],icon:e.groupIcon}),l.get(e.group).routes.push(e)):c.push(e);return{groups:Array.from(l.values()).map(e=>{let t=new Map,n=new Map;for(let r of e.routes)r.subRouteGroup&&((r.path.endsWith(`/${r.subRouteGroup}`)||r.path.endsWith(`/${r.subRouteGroup}/`))&&!t.has(r.subRouteGroup)?t.set(r.subRouteGroup,r):(n.has(r.subRouteGroup)||n.set(r.subRouteGroup,[]),n.get(r.subRouteGroup).push(r)));let r=[],i=new Set;for(let a of e.routes)if(a.subRouteGroup){if(!i.has(a.subRouteGroup)){i.add(a.subRouteGroup);let e=t.get(a.subRouteGroup),o=n.get(a.subRouteGroup)||[];e?r.push({...e,subRoutes:o}):r.push(...o)}}else r.push(a);return{...e,routes:r}}),ungrouped:c,activeRoute:a,activePath:i,config:t}}function Nn(e=[]){let[t,n]=L(null);return{headings:e,activeId:t,setActiveId:n}}function Pn(e=[],t=[]){let n=A(),r=I([]),[i,a]=L({opacity:0,transform:`translateX(0) scaleX(0)`,width:0}),o=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,s=o(n.pathname),c=t.find(e=>o(e.path)===s)?.tab?.toLowerCase(),l=e.findIndex(e=>e.id.toLowerCase()===c),u=l===-1?0:l;return P(()=>{let e=r.current[u];e&&a({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[u,e.length,n.pathname]),{tabs:e,activeIndex:u,indicatorStyle:i,tabRefs:r,activeTabId:c}}function Q(e,t,n){let r=e;return t&&(r===t||r.startsWith(t+`/`))&&(r=r===t?`index.md`:r.slice(t.length+1)),n&&(r===n||r.startsWith(n+`/`))&&(r=r===n?`index.md`:r.slice(n.length+1)),r}function Fn(){let e=he(),t=m(),{allRoutes:n,currentRoute:r,currentVersion:i,currentLocale:a,config:o}=t,s=o.versions,{setVersion:c}=g(),l=t=>{if(!s||t===i)return;c(t);let o=`/docs/${t}`;if(r){let e=Q(r.filePath,r.version,r.locale),i=n.find(n=>Q(n.filePath,n.version,n.locale)===e&&(n.version||s.defaultVersion)===t&&(a?n.locale===a:!n.locale));if(i)o=i.path;else{let e=n.find(e=>Q(e.filePath,e.version,e.locale)===`index.md`&&(e.version||s.defaultVersion)===t&&(a?e.locale===a:!e.locale));o=e?e.path:`/docs/${t}${a?`/${a}`:``}`}}e(o)},u=t.availableVersions.map(e=>({...e,label:e.label,value:e.key}));return{currentVersion:i,currentVersionLabel:t.currentVersionLabel,availableVersions:u,handleVersionChange:l}}function In(){let e=he(),{allRoutes:t,currentRoute:n,currentLocale:r,config:i}=m(),a=i.i18n,{setLocale:o}=g();return{currentLocale:r,currentLocaleLabel:i.i18n?.localeConfigs?.[r]?.label||i.i18n?.locales[r]||r,availableLocales:i.i18n?Object.entries(i.i18n.locales).map(([e,t])=>({key:e,label:i.i18n?.localeConfigs?.[e]?.label||t,value:e,isCurrent:e===r})):[],handleLocaleChange:i=>{if(!a||i===r)return;o(i);let s=`/`;if(n){let e=Q(n.filePath,n.version,n.locale),r=t.find(t=>Q(t.filePath,t.version,t.locale)===e&&(t.locale||a.defaultLocale)===i&&t.version===n.version);if(r)s=r.path;else{let e=t.find(e=>Q(e.filePath,e.version,e.locale)===`index.md`&&(e.locale||a.defaultLocale)===i&&e.version===n.version);s=e?e.path:i===a.defaultLocale?n.version?`/${n.version}`:`/`:n.version?`/${n.version}/${i}`:`/${i}`}}else{let e=t.find(e=>(e.filePath===`index.mdx`||e.filePath===`index.md`)&&(e.locale||a.defaultLocale)===i&&!e.version);s=e?e.path:i===a.defaultLocale?`/`:`/${i}`}e(s)}}}function Ln(){let{routes:e,currentRoute:t}=m(),n=A();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let r=t.tab?.toLowerCase(),i=r?e.filter(e=>e.tab?.toLowerCase()===r):e.filter(e=>!e.tab),a=i.findIndex(e=>e.path===n.pathname);return{prevPage:a>0?i[a-1]:null,nextPage:a!==-1&&a<i.length-1?i[a+1]:null,currentRoute:t}}function Rn(){let{currentRoute:e}=m(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}const zn=()=>A();function Bn({children:e,className:t,style:n}){return z(`div`,{className:k(`h-screen flex flex-col overflow-hidden bg-bg-main text-text-main`,t),style:n,children:e})}function Vn({children:e,className:t,style:n}){return z(`div`,{className:k(`mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden`,t),style:n,children:e})}function Hn({children:e,className:t,style:n}){return z(`main`,{className:k(`boltdocs-content flex-1 min-w-0 overflow-y-auto`,`contain-layout`,t),style:n,children:e})}function Un({children:e,className:t,style:n}){let{pathname:r}=zn();return z(`div`,{className:k(`boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8`,{"max-w-content-max":r.includes(`/docs/`)},t),style:n,children:e})}function Wn({children:e,className:t,style:n}){return z(`div`,{className:k(`flex items-center justify-between mb-10`,t),style:n,children:e})}function Gn({children:e,className:t,style:n}){return z(`div`,{className:k(`mt-20`,t),style:n,children:e})}const $=Object.assign(Bn,{Body:Vn,Content:Hn,ContentMdx:Un,ContentHeader:Wn,ContentFooter:Gn});function Kn(){let{theme:e,setTheme:t}=K(),[n,r]=L(!1);if(P(()=>{r(!0)},[]),!n)return z(`div`,{className:`h-9 w-9`});let i=e===`system`?Xe:e===`dark`?Ze:et;return B(T.Trigger,{placement:`bottom right`,children:[z(Ce,{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:z(i,{size:20,className:`animate-in fade-in zoom-in duration-300`})}),B(T.Root,{selectionMode:`single`,selectedKeys:[e],onSelectionChange:e=>{let n=Array.from(e)[0];t(n)},children:[B(T.Item,{id:`light`,children:[z(et,{size:16}),z(`span`,{children:`Light`})]}),B(T.Item,{id:`dark`,children:[z(Ze,{size:16}),z(`span`,{children:`Dark`})]}),B(T.Item,{id:`system`,children:[z(Xe,{size:16}),z(`span`,{children:`System`})]})]})]})}async function qn(e,t,n=`https://api.github.com`){let r=new Headers;t&&r.append(`authorization`,t);let i=await(await fetch(`${n}/repos/${e}`,{headers:r})).json();return i.stargazers_count===void 0?`0`:Jn(i.stargazers_count)}const Jn=e=>Intl.NumberFormat(`en`,{notation:`compact`,compactDisplay:`short`}).format(e);function Yn({repo:e}){let[t,n]=L(null);return P(()=>{e&&qn(e).then(e=>n(e)).catch(()=>n(`0`))},[e]),B(`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:[z(d,{className:`h-4 w-4`}),t&&z(`span`,{className:`tabular-nums`,children:t})]})}function Xn({tabs:e,routes:t}){let{currentLocale:n}=m(),{indicatorStyle:r,tabRefs:i,activeIndex:a}=Pn(e,t),o=e=>{if(!e)return null;if(e.trim().startsWith(`<svg`))return z(`span`,{className:`h-4 w-4`,dangerouslySetInnerHTML:{__html:e}});let t=De[e];return t?z(t,{size:16}):z(`img`,{src:e,alt:``,className:`h-4 w-4 object-contain`})};return z(`div`,{className:`mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6`,children:B(te.List,{className:`border-none py-0`,children:[e.map((e,r)=>{let s=r===a,c=t.find(t=>t.tab&&t.tab.toLowerCase()===e.id.toLowerCase());return B(O,{href:c?c.path:`#`,ref:e=>{i.current[r]=e},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${s?`text-primary-500`:`text-text-muted hover:text-text-main`}`,children:[o(e.icon),z(`span`,{children:Z(e.text,n)})]},e.id)}),z(te.Indicator,{style:r})]})})}const Zn=be(()=>import(`../search-dialog-3lvKsbVG.js`).then(e=>({default:e.SearchDialog})));function Qn(){let{links:e,title:t,logo:n,logoProps:r,github:i,social:a,config:o}=jn(),{routes:s,allRoutes:c,currentVersion:l,currentLocale:u}=m(),{pathname:d}=A(),f=o.theme||{},p=d.startsWith(`/docs`),h=f?.tabs&&f.tabs.length>0;return B(D.Root,{className:h?`border-b-0`:``,children:[B(D.Content,{children:[B(D.Left,{children:[n&&z(D.Logo,{src:n,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),z(D.Title,{children:t}),o.versions&&l&&z(er,{})]}),z(D.Center,{children:z(ve,{fallback:z(`div`,{className:`h-9 w-32 animate-pulse rounded-md bg-bg-surface`}),children:z(Zn,{routes:s||[]})})}),B(D.Right,{children:[z(D.Links,{children:e.map(e=>z($n,{link:e},e.href))}),o.i18n&&u&&z(tr,{}),z(D.Split,{}),z(Kn,{}),i&&z(Yn,{repo:f?.githubRepo??``}),a.length>0&&z(D.Split,{}),z(`div`,{className:`flex items-center gap-1`,children:a.map(({icon:e,link:t})=>z(D.Socials,{icon:e,link:t,className:`p-1.5`},t))})]})]}),p&&h&&f?.tabs&&z(`div`,{className:`w-full border-b border-border-subtle bg-bg-main`,children:z(Xn,{tabs:f.tabs,routes:c||s||[]})})]})}function $n({link:e}){let t=fe(e.href||``);return z(D.Link,{...e,href:t})}function er(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:n}=Fn();return t.length===0?null:B(T.Trigger,{children:[z(c,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:z(H,{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:z(`span`,{className:`font-semibold text-[0.8125rem]`,children:e})}),z(T.Root,{children:z(T.Section,{items:t,children:e=>z(T.Item,{onPress:()=>n(e.value),children:e.label},`${e.value??``}`)})})]})}function tr(){let{currentLocale:e,availableLocales:t,handleLocaleChange:n}=In();return t.length===0?null:B(T.Trigger,{children:[z(c,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:z(H,{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:B(`div`,{className:`flex items-center gap-1.5`,children:[z(qe,{className:`w-3.5 h-3.5 text-primary-500`}),z(`span`,{className:`font-bold text-[0.75rem] uppercase opacity-90`,children:e||`en`})]})}),z(T.Root,{children:z(T.Section,{items:t,children:e=>z(T.Item,{onPress:()=>n(e.value),children:B(`div`,{className:`flex items-center justify-between w-full gap-4`,children:[z(`span`,{children:e.label}),z(`span`,{className:`text-[10px] font-bold opacity-40 uppercase tracking-tighter`,children:e.value})]})},`${e.value??``}`)})})]})}function nr(){return z(`div`,{className:`flex items-center justify-center mt-10 mb-4 px-4 w-full`,children:B(`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:[z(nt,{className:`w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300`,fill:`currentColor`}),B(`span`,{className:`text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide`,children:[`Powered by`,` `,z(`strong`,{className:`font-bold text-text-main/80 group-hover:text-text-main`,children:`Boltdocs`})]})]})})}function rr(e){if(!e)return;let t={...De,...it};return t[e]||t[e+`Icon`]||void 0}function ir({route:e,activePath:t,getIcon:n}){let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path),i=F(()=>e.subRoutes?.some(e=>e.path===t),[e.subRoutes,t]),[a,o]=L(i||r);return P(()=>{(i||r)&&o(!0)},[i,r]),z(E.SubGroup,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge,isOpen:a,onToggle:()=>o(!a),children:e.subRoutes?.map(e=>{let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return z(E.Link,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge},e.path)})})}function ar({group:e,activePath:t,getIcon:n}){return z(E.Group,{title:e.title,icon:n(e.icon),children:e.routes.map(e=>{if(e.subRoutes&&e.subRoutes.length>0)return z(ir,{route:e,activePath:t,getIcon:n},e.path);let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return z(E.Link,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge},e.path)})})}function or({routes:e,config:t}){let{groups:n,ungrouped:r,activePath:i}=Mn(e),a=t.theme||{};return B(E.Root,{children:[r.length>0&&z(E.Group,{className:`mb-6`,children:r.map(e=>{let t=i===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return z(E.Link,{label:e.title,href:e.path,active:t,icon:rr(e.icon),badge:e.badge},e.path)})}),n.map(e=>z(ar,{group:e,activePath:i,getIcon:rr},e.slug)),a?.poweredBy&&z(`div`,{className:`mt-auto pt-8`,children:z(nr,{})})]})}function sr({headings:e=[],editLink:t,communityHelp:n,filePath:r}){let{headings:i}=Nn(e),a=F(()=>i.map(e=>({title:e.text,url:`#${e.id}`,depth:e.level})),[i]);return i.length===0?null:z(ue,{toc:a,children:z(cr,{headings:i,editLink:t,communityHelp:n,filePath:r})})}function cr({headings:e,editLink:t,communityHelp:n,filePath:r}){let i=ce(),[a,o]=L({opacity:0}),s=I(null),c=I(null);P(()=>{if(!i||!s.current)return;let e=s.current.querySelector(`a[href="#${i}"]`);e&&o({transform:`translateY(${e.offsetTop}px)`,height:`${e.offsetHeight}px`,opacity:1})},[i]);let l=N((e,t)=>{e.preventDefault();let n=document.getElementById(t);n&&(n.scrollIntoView({behavior:`smooth`}),window.history.pushState(null,``,`#${t}`))},[]);return B(b.Root,{children:[B(b.Header,{className:`flex flex-row gap-x-2`,children:[z(tt,{size:16}),`On this page`]}),z(ne,{containerRef:c,children:B(b.Content,{className:`max-h-[450px] boltdocs-otp-scroll-area`,ref:c,children:[z(b.Indicator,{style:a}),z(`ul`,{className:`relative space-y-2 border-l border-border-subtle`,ref:s,children:e.map(e=>z(b.Item,{level:e.level,children:z(b.Link,{href:`#${e.id}`,active:i===e.id,onClick:t=>l(t,e.id),className:`pl-4`,children:e.text})},e.id))})]})}),(t||n)&&B(`div`,{className:`mt-8 pt-8 border-t border-border-subtle space-y-4`,children:[z(`p`,{className:`text-xs font-bold uppercase text-text-main`,children:`Need help?`}),B(`ul`,{className:`space-y-3`,children:[t&&r&&z(`li`,{children:B(`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:[z(Qe,{size:16}),`Edit this page`]})}),n&&z(`li`,{children:B(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors`,children:[z(Le,{size:16}),`Community help`]})})]})]})]})}function lr({siteTitle:e,siteDescription:t,routes:n}){let r=A(),i=_(),a=n?.find?.(e=>e.path===r.pathname),o=a?.title,s=a?.description||t||``,c=o?`${o} | ${e}`:e,l=a?.seo||{},u=i?.seo?.metatags||{},d=i?.seo?.thumbnails?.background,f=l[`og:image`]||d;return B(Te,{children:[z(`title`,{children:c}),z(`meta`,{name:`description`,content:s}),z(`meta`,{property:`og:title`,content:c}),z(`meta`,{property:`og:description`,content:s}),z(`meta`,{property:`og:type`,content:`article`}),typeof window<`u`&&z(`meta`,{property:`og:url`,content:window.location.href}),typeof window<`u`&&z(`link`,{rel:`canonical`,href:window.location.origin+r.pathname}),z(`meta`,{name:`twitter:card`,content:`summary`}),z(`meta`,{name:`twitter:title`,content:c}),z(`meta`,{name:`twitter:description`,content:s}),f&&z(`meta`,{name:`twitter:image`,content:f}),f&&z(`meta`,{property:`og:image`,content:f}),z(`meta`,{name:`generator`,content:`Boltdocs`}),Object.entries(u).map(([e,t])=>e.startsWith(`og:`)||e.startsWith(`music:`)||e.startsWith(`video:`)||e.startsWith(`article:`)||e.startsWith(`book:`)||e.startsWith(`profile:`)?z(`meta`,{property:e,content:t},e):z(`meta`,{name:e,content:t},e)),Object.entries(l).map(([e,t])=>e===`noindex`&&t===!0?z(`meta`,{name:`robots`,content:`noindex`},`noindex`):e===`robots`?z(`meta`,{name:`robots`,content:t},`robots`):e===`canonical`?z(`link`,{rel:`canonical`,href:t},`canonical`):e.startsWith(`og:`)||e.startsWith(`music:`)||e.startsWith(`video:`)||e.startsWith(`article:`)||e.startsWith(`book:`)||e.startsWith(`profile:`)?z(`meta`,{property:e,content:t},e):z(`meta`,{name:e,content:t},e))]})}function ur(){let{crumbs:e,activeRoute:t}=Rn(),n=_().theme||{};return e.length===0||!n?.breadcrumbs?null:B(w.Root,{children:[z(w.Item,{children:z(w.Link,{href:`/`,children:z(Ge,{size:14})})}),e.map((e,n)=>B(w.Item,{children:[z(w.Separator,{}),z(w.Link,{href:e.href,className:k({"font-medium text-text-main":e.href===t?.path}),children:e.label})]},`crumb-${e.href}-${e.label}-${n}`))]})}function dr(){let{prevPage:e,nextPage:t}=Ln();return!e&&!t?null:B(S.Root,{className:`animate-in fade-in slide-in-from-bottom-4 duration-700`,children:[e?B(S.Link,{to:e.path,direction:`prev`,children:[z(S.Title,{children:`Previous`}),z(S.Description,{children:e.title})]}):z(`div`,{}),t&&B(S.Link,{to:t.path,direction:`next`,children:[z(S.Title,{children:`Next`}),z(S.Description,{children:t.title})]})]})}var fr=class extends _e{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`Uncaught error in Boltdocs Layout:`,e,t)}render(){return this.state.hasError?this.props.fallback||B(`div`,{className:`flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4`,children:[z(`div`,{className:`text-lg font-bold text-red-400`,children:`Something went wrong`}),z(`p`,{className:`text-sm text-text-muted max-w-md`,children:this.state.error?.message||`An unexpected error occurred while rendering this page.`}),z(c,{className:`rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer`,onPress:()=>this.setState({hasError:!1}),children:`Try again`})]}):this.props.children}};function pr({children:e}){let{routes:t,allRoutes:n,currentRoute:r,currentLocale:i}=m(),{pathname:a}=A(),o=_(),s=dt().CopyMarkdown||xn,c=a.startsWith(`/docs`);return B($,{children:[z(lr,{siteTitle:Z(o.theme?.title,i)||`Boltdocs`,siteDescription:Z(o.theme?.description,i)||``,routes:n}),z(Qn,{}),B($.Body,{children:[c&&z(or,{routes:t,config:o}),z($.Content,{children:B($.ContentMdx,{children:[c&&B($.ContentHeader,{children:[z(ur,{}),z(s,{mdxRaw:r?._rawContent,route:r,config:o.theme?.copyMarkdown})]}),z(fr,{children:e}),c&&z($.ContentFooter,{children:z(dr,{})})]})}),c&&z(sr,{headings:r?.headings,editLink:o.theme?.editLink,communityHelp:o.theme?.communityHelp,filePath:r?.filePath})]})]})}export{J as Admonition,ue as AnchorProvider,Rt as Badge,Dn as BoltdocsShell,ur as Breadcrumbs,xt as Button,v as ButtonGroup,Vt as Card,Bt as Cards,Xt as Caution,q as CodeBlock,yn as ComponentPreview,_n as ComponentProps,xn as CopyMarkdown,qt as Danger,pr as DefaultLayout,$ as DocsLayout,fr as ErrorBoundary,mn as Field,dn as FileTree,lr as Head,gn as Image,Yt as Important,Jt as InfoBox,hn as Link,nn as List,Cn as Loading,mt as MdxPage,Qn as Navbar,On as NotFound,Wt as Note,sr as OnThisPage,dr as PageNav,w as PrimitiveBreadcrumbs,c as PrimitiveButton,O as PrimitiveLink,T as PrimitiveMenu,y as PrimitiveNavLink,D as PrimitiveNavbar,ee as PrimitiveNavigationMenu,b as PrimitiveOnThisPage,S as PrimitivePageNav,ae as PrimitivePopover,E as PrimitiveSidebar,C as PrimitiveSkeleton,te as PrimitiveTabs,de as PrimitiveTooltip,ne as ScrollProvider,re as SearchDialogPrimitive,or as Sidebar,Pt as Tab,pn as Table,Ft as Tabs,Gt as Tip,It as Video,Kt as Warning,k as cn,An as createRoutes,st as defineConfig,ce as useActiveAnchor,se as useActiveAnchors,Rn as useBreadcrumbs,_ as useConfig,In as useI18n,ie as useItems,fe as useLocalizedTo,zn as useLocation,dt as useMdxComponents,jn as useNavbar,Nn as useOnThisPage,Ln as usePageNav,m as useRoutes,le as useSearch,Mn as useSidebar,Pn as useTabs,K as useTheme,Fn as useVersion};
@@ -90,6 +90,10 @@
90
90
  }
91
91
  }
92
92
 
93
+ @variant dark
94
+ (
95
+ &:where(.dark, .dark *));
96
+
93
97
  .animate-pulse {
94
98
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
95
99
  }
@@ -99,9 +103,9 @@
99
103
  }
100
104
 
101
105
  :root[data-theme="dark"],
102
- :root:not(.theme-light) {
103
- --color-bg-main: var(--color-neutral-950);
104
- --color-bg-surface: var(--color-neutral-900);
106
+ :root.dark {
107
+ --color-bg-main: var(--color-neutral-900);
108
+ --color-bg-surface: var(--color-neutral-800);
105
109
  --color-bg-muted: var(--color-neutral-800);
106
110
  --color-text-main: var(--color-neutral-50);
107
111
  --color-text-muted: var(--color-neutral-400);
@@ -112,6 +116,7 @@
112
116
  --color-code-text: var(--color-neutral-200);
113
117
  }
114
118
 
119
+
115
120
  @layer base {
116
121
  *,
117
122
  *::before,
@@ -271,7 +276,6 @@
271
276
  border-radius: var(--radius-lg);
272
277
  margin: 2rem 0;
273
278
  display: block;
274
- box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
275
279
  }
276
280
  .boltdocs-page table {
277
281
  width: 100%;
@@ -294,41 +298,6 @@
294
298
  .boltdocs-page tr:hover td {
295
299
  background-color: var(--color-bg-surface);
296
300
  }
297
- .boltdocs-page :not(pre) > code {
298
- background-color: var(--color-bg-surface);
299
- padding: 0.15rem 0.45rem;
300
- border-radius: 5px;
301
- font-family: var(--font-mono);
302
- font-size: 0.85em;
303
- color: var(--color-primary-400);
304
- border: 1px solid var(--color-border-subtle);
305
- }
306
- .boltdocs-page pre {
307
- margin: 1.5rem 0;
308
- border-radius: var(--radius-md);
309
- overflow-x: auto;
310
- font-family: var(--font-mono);
311
- font-size: 0.8125rem;
312
- line-height: 1.7;
313
- background-color: var(--color-code-bg);
314
- color: var(--color-code-text);
315
- border: 1px solid var(--color-border-subtle);
316
- }
317
- .boltdocs-page pre > code {
318
- display: grid;
319
- padding: 1rem;
320
- background-color: transparent;
321
- border: none;
322
- color: inherit;
323
- font-size: inherit;
324
- }
325
- .boltdocs-page pre > code .line {
326
- padding: 0 1.25rem;
327
- }
328
- .boltdocs-page pre > code .line.highlighted {
329
- background-color: oklch(0.6 0.22 280 / 10%);
330
- border-left: 2px solid var(--color-primary-500);
331
- }
332
301
 
333
302
  @media (max-width: 768px) {
334
303
  .boltdocs-page h1 {
@@ -369,20 +338,91 @@
369
338
  opacity: 1;
370
339
  }
371
340
 
372
- /* ═══ Shiki Dual Theme ═══ */
373
- .shiki-wrapper .shiki.shiki-themes {
341
+ /* ═══ Shiki Styles ═══ */
342
+
343
+ /* Shiki Light/Dark Mode */
344
+ :root .shiki,
345
+ :root .shiki span {
346
+ font-family: var(--font-mono);
347
+ font-size: 12px !important;
374
348
  background-color: transparent !important;
375
- color: var(--shiki-light) !important;
376
- }
377
- .shiki-wrapper .shiki.shiki-themes span {
378
- color: var(--shiki-light);
379
349
  }
380
- :root[data-theme="dark"] .shiki-wrapper .shiki.shiki-themes,
381
- :root:not(.theme-light) .shiki-wrapper .shiki.shiki-themes {
350
+
351
+ :root.dark .shiki,
352
+ :root.dark .shiki span {
382
353
  color: var(--shiki-dark) !important;
383
354
  }
384
- :root[data-theme="dark"] .shiki-wrapper .shiki.shiki-themes span,
385
- :root:not(.theme-light) .shiki-wrapper .shiki.shiki-themes span {
386
- color: var(--shiki-dark) !important;
355
+
356
+ /* Base Shiki Pre & Span Styles */
357
+ pre.shiki {
358
+ @apply py-2 text-[12px] leading-[1.6];
359
+ }
360
+
361
+ pre.shiki span.line {
362
+ @apply relative block px-4 py-0;
363
+ min-height: 1.6em;
364
+ }
365
+
366
+ /* Shiki Word Wrap */
367
+ pre.shiki-word-wrap {
368
+ @apply whitespace-pre-wrap break-words;
369
+ }
370
+
371
+ pre.shiki-word-wrap span.line {
372
+ @apply block w-full;
373
+ }
374
+
375
+ /* Shiki Line Numbers */
376
+ pre.shiki-line-numbers code {
377
+ counter-reset: step;
378
+ counter-increment: step 0;
379
+ }
380
+
381
+ pre.shiki-line-numbers .line {
382
+ @apply pl-12!;
383
+ }
384
+
385
+ /* Hide the last line if it is completely empty to avoid extra numbers */
386
+ pre.shiki-line-numbers .line:last-child:empty,
387
+ pre.shiki-line-numbers .line:last-child:has(> :empty) {
388
+ display: none;
389
+ }
390
+
391
+ pre.shiki-line-numbers .line::before {
392
+ counter-increment: step;
393
+ content: counter(step);
394
+ @apply absolute left-0 top-0 inline-flex w-10 justify-end pr-3;
395
+ @apply text-[11px] text-text-muted opacity-30 select-none;
396
+ line-height: inherit; /* Sync with line text */
397
+ }
398
+
399
+ /* Shiki Highlight */
400
+ pre span.shiki-line-highlight {
401
+ @apply relative z-0 inline-block w-full;
402
+ &::after {
403
+ content: "";
404
+ @apply absolute top-0 left-0 -z-10 h-full w-full border-l-2 border-primary-500 bg-primary-500/10! opacity-100;
405
+ }
406
+ }
407
+
408
+ /* Shiki Notation Diff */
409
+ pre.has-diff span.line.diff {
410
+ @apply relative inline-block w-full;
411
+ }
412
+
413
+ pre.has-diff span.line.diff.add {
414
+ @apply bg-emerald-500/10! dark:bg-emerald-500/10!;
415
+ &::before {
416
+ content: "+";
417
+ @apply absolute left-2 text-emerald-500 font-bold;
418
+ }
419
+ }
420
+
421
+ pre.has-diff span.line.diff.remove {
422
+ @apply bg-danger-500/10! opacity-70;
423
+ &::before {
424
+ content: "-";
425
+ @apply absolute left-2 text-danger-500 font-bold;
426
+ }
387
427
  }
388
428
  }
@@ -4,5 +4,5 @@
4
4
  * Copyright (c) 2026 Jesus Alcala
5
5
  * Licensed under the MIT License.
6
6
  */
7
- const e=require(`../cache-Cr8W2zgZ.cjs`),t=require(`../node-VYfhzGrh.cjs`);let n=require(`vite`),r=require(`fast-glob`);r=e.S(r);let i=require(`fs`);i=e.S(i);let a=require(`path`);a=e.S(a);let o=require(`cac`);o=e.S(o);var s=e.x({colors:()=>c,error:()=>d,formatLog:()=>l,info:()=>u,success:()=>f});const c={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`};function l(e,t=``){return`${t}${c.bold}[boltdocs]${c.reset} ${e}${c.reset}`}function u(e){console.log(l(e))}function d(e,t){console.error(l(e,c.red)),t&&console.error(t)}function f(e){console.log(l(e,c.green))}async function p(e=process.cwd()){try{let r=await(0,n.createServer)(await t.n(e,`development`));await r.listen(),r.printUrls(),r.bindCLIShortcuts({print:!0})}catch(e){d(`Failed to start dev server:`,e),process.exit(1)}}async function m(e=process.cwd()){let r=!1,o=a.default.resolve(e,`index.html`);try{if(!i.default.existsSync(o)){let n=await t.v(`docs`,e);i.default.writeFileSync(o,t.h(n),`utf-8`),r=!0}await(0,n.build)(await t.n(e,`production`)),f(`Build completed successfully.`)}catch(e){d(`Build failed:`,e),process.exit(1)}finally{r&&i.default.existsSync(o)&&i.default.unlinkSync(o)}}async function h(e=process.cwd()){try{(await(0,n.preview)(await t.n(e,`production`))).printUrls()}catch(e){d(`Failed to start preview server:`,e),process.exit(1)}}async function g(n=process.cwd()){let{colors:o}=s;u(`${o.bold}Running documentation health check...${o.reset}\n`);let c=performance.now();try{let s=await t.v(`docs`,n),l=a.default.resolve(n,`docs`);i.default.existsSync(l)||(d(`Documentation directory not found at ${l}`),process.exit(1));let p=await(0,r.default)([`**/*.md`,`**/*.mdx`],{cwd:l,absolute:!0,suppressErrors:!0}),m=0,h=0,g=0,_=new Map,v=(e,t)=>{let n=a.default.relative(l,e),r=_.get(n);r||(r=[],_.set(n,r)),r.push(t),t.level===`high`?m++:t.level===`warning`?h++:t.level===`low`&&g++},y=`/docs`;for(let t of p){let{data:n,content:r}=e.p(t);n.title||v(t,{level:`warning`,message:`Missing "title" in frontmatter.`,suggestion:"Add `title: Your Title` to the YAML frontmatter at the top of the file."}),n.description||v(t,{level:`low`,message:`Missing "description" in frontmatter.`,suggestion:`Adding a description helps with SEO and search previews.`});let o=/\[.*?\]\((.*?)\)/g,s=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,c=[...r.matchAll(o),...r.matchAll(s)];for(let e of c){let n=e[1];if(!n||n.startsWith(`http`)||n.startsWith(`https`)||n.startsWith(`#`)||n.startsWith(`mailto:`)||n.startsWith(`tel:`)||(n=n.split(`#`)[0],!n))continue;let r;if(n.startsWith(`/`)){let e=n;(n.startsWith(y+`/`)||n===y)&&(e=n.substring(5)),r=a.default.join(l,e)}else r=a.default.resolve(a.default.dirname(t),n);let o=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],s=!1;for(let e of o){let t=r+e;if(i.default.existsSync(t)&&i.default.statSync(t).isFile()){s=!0;break}}s||v(t,{level:`high`,message:`Broken internal link: "${n}"`,suggestion:`Ensure the file exists at "${r}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(s.i18n){let{defaultLocale:t,locales:n}=s.i18n,r=Object.keys(n).filter(e=>e!==t);for(let n of p){let o=e.f(a.default.relative(l,n)).split(`/`);if(o[0]===t){let e=o.slice(1).join(`/`);for(let t of r){let r=[t,...o.slice(1)],s=a.default.join(l,...r);i.default.existsSync(s)||v(n,{level:`warning`,message:`Missing translation for locale "${t}"`,suggestion:`Create a translated version of this file at "${t}/${e}".`})}}}}if(_.size===0)f(`All documentation files are healthy!
8
- `);else{for(let[e,t]of _.entries()){console.log(`📄 ${o.bold}${e}${o.reset}`);let n=t.sort((e,t)=>{let n={high:1,warning:2,low:3};return n[e.level]-n[t.level]});for(let e of n){let t=``,n=``;e.level===`high`?(t=`❌`,n=o.red):e.level===`warning`?(t=`⚠️`,n=o.yellow):(t=`ℹ️`,n=o.cyan),console.log(` ${n}${t} ${e.level.toUpperCase()}:${o.reset} ${e.message}`),e.suggestion&&console.log(` ${o.gray}💡 Suggestion: ${e.suggestion}${o.reset}`)}console.log(``)}console.log(`${o.bold}Summary:${o.reset}`),console.log(` ${o.red}${m} high-level errors${o.reset}`),console.log(` ${o.yellow}${h} warnings${o.reset}`),console.log(` ${o.cyan}${g} minor improvements${o.reset}\n`),m>0&&d(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(h>0||g>0)&&u(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}u(`Finished in ${(performance.now()-c).toFixed(2)}ms\n`),m>0&&process.exit(1)}catch(e){d(`Failed to run doctor check:`,e),process.exit(1)}}const _=(0,o.default)(`boltdocs`);_.command(`[root]`,`Start development server`).alias(`dev`).action(p),_.command(`build [root]`,`Build for production`).action(m),_.command(`preview [root]`,`Preview production build`).action(h),_.command(`doctor [root]`,`Check documentation health`).action(g),_.help(),_.version(`2.0.0`),_.parse();
7
+ const e=require(`../node-vkbb0MK7.cjs`);let t=require(`vite`),n=require(`fast-glob`);n=e.x(n);let r=require(`fs`);r=e.x(r);let i=require(`path`);i=e.x(i);let a=require(`cac`);a=e.x(a);let o=require(`@bdocs/ssg/node`);var s=e.b({colors:()=>c,error:()=>d,formatLog:()=>l,info:()=>u,success:()=>f});const c={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`};function l(e,t=``){return`${t}${c.bold}[boltdocs]${c.reset} ${e}${c.reset}`}function u(e){console.log(l(e))}function d(e,t){console.error(l(e,c.red)),t&&console.error(t)}function f(e){console.log(l(e,c.green))}async function p(t=process.cwd()){try{let n=await(0,o.createServer)(await e.n(t,`development`));await n.listen(),n.printUrls(),n.bindCLIShortcuts({print:!0})}catch(e){d(`Failed to start dev server:`,e),process.exit(1)}}async function m(t=process.cwd()){try{await(0,o.build)({entry:`boltdocs/entry`},await e.n(t,`production`)),f(`SSG build completed successfully!`)}catch(e){d(`Build failed:`,e),process.exit(1)}}async function h(n=process.cwd()){try{(await(0,t.preview)(await e.n(n,`production`))).printUrls()}catch(e){d(`Failed to start preview server:`,e),process.exit(1)}}async function g(t=process.cwd()){let{colors:a}=s;u(`${a.bold}Running documentation health check...${a.reset}\n`);let o=performance.now();try{let s=await e.g(`docs`,t),c=i.default.resolve(t,`docs`);r.default.existsSync(c)||(d(`Documentation directory not found at ${c}`),process.exit(1));let l=await(0,n.default)([`**/*.md`,`**/*.mdx`],{cwd:c,absolute:!0,suppressErrors:!0}),p=0,m=0,h=0,g=new Map,_=(e,t)=>{let n=i.default.relative(c,e),r=g.get(n);r||(r=[],g.set(n,r)),r.push(t),t.level===`high`?p++:t.level===`warning`?m++:t.level===`low`&&h++},v=`/docs`;for(let t of l){let{data:n,content:a}=e.y(t);n.title||_(t,{level:`warning`,message:`Missing "title" in frontmatter.`,suggestion:"Add `title: Your Title` to the YAML frontmatter at the top of the file."}),n.description||_(t,{level:`low`,message:`Missing "description" in frontmatter.`,suggestion:`Adding a description helps with SEO and search previews.`});let o=/\[.*?\]\((.*?)\)/g,s=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,l=[...a.matchAll(o),...a.matchAll(s)];for(let e of l){let n=e[1];if(!n||n.startsWith(`http`)||n.startsWith(`https`)||n.startsWith(`#`)||n.startsWith(`mailto:`)||n.startsWith(`tel:`)||(n=n.split(`#`)[0],!n))continue;let a;if(n.startsWith(`/`)){let e=n;(n.startsWith(v+`/`)||n===v)&&(e=n.substring(5)),a=i.default.join(c,e)}else a=i.default.resolve(i.default.dirname(t),n);let o=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],s=!1;for(let e of o){let t=a+e;if(r.default.existsSync(t)&&r.default.statSync(t).isFile()){s=!0;break}}s||_(t,{level:`high`,message:`Broken internal link: "${n}"`,suggestion:`Ensure the file exists at "${a}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(s.i18n){let{defaultLocale:t,locales:n}=s.i18n,a=Object.keys(n).filter(e=>e!==t);for(let n of l){let o=e.v(i.default.relative(c,n)).split(`/`);if(o[0]===t){let e=o.slice(1).join(`/`);for(let t of a){let a=[t,...o.slice(1)],s=i.default.join(c,...a);r.default.existsSync(s)||_(n,{level:`warning`,message:`Missing translation for locale "${t}"`,suggestion:`Create a translated version of this file at "${t}/${e}".`})}}}}if(g.size===0)f(`All documentation files are healthy!
8
+ `);else{for(let[e,t]of g.entries()){console.log(`📄 ${a.bold}${e}${a.reset}`);let n=t.sort((e,t)=>{let n={high:1,warning:2,low:3};return n[e.level]-n[t.level]});for(let e of n){let t=``,n=``;e.level===`high`?(t=`❌`,n=a.red):e.level===`warning`?(t=`⚠️`,n=a.yellow):(t=`ℹ️`,n=a.cyan),console.log(` ${n}${t} ${e.level.toUpperCase()}:${a.reset} ${e.message}`),e.suggestion&&console.log(` ${a.gray}💡 Suggestion: ${e.suggestion}${a.reset}`)}console.log(``)}console.log(`${a.bold}Summary:${a.reset}`),console.log(` ${a.red}${p} high-level errors${a.reset}`),console.log(` ${a.yellow}${m} warnings${a.reset}`),console.log(` ${a.cyan}${h} minor improvements${a.reset}\n`),p>0&&d(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(m>0||h>0)&&u(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}u(`Finished in ${(performance.now()-o).toFixed(2)}ms\n`),p>0&&process.exit(1)}catch(e){d(`Failed to run doctor check:`,e),process.exit(1)}}const _=(0,a.default)(`boltdocs`);_.command(`[root]`,`Start development server`).alias(`dev`).action(p),_.command(`build [root]`,`Build for production`).action(m),_.command(`preview [root]`,`Preview production build`).action(h),_.command(`doctor [root]`,`Check documentation health`).action(g),_.help(),_.version(`2.0.0`),_.parse();
@@ -4,5 +4,5 @@
4
4
  * Copyright (c) 2026 Jesus Alcala
5
5
  * Licensed under the MIT License.
6
6
  */
7
- import{D as e,E as t,T as n,d as r,h as i,m as a}from"../cache-DFdakSmR.mjs";import{_ as o,b as s,g as c,n as l,r as u,x as d}from"../node-CWXme96p.mjs";import{build as f,createServer as p,preview as m}from"vite";import h from"fast-glob";import g from"fs";import _ from"path";import v from"cac";var y=e({colors:()=>w,error:()=>S,formatLog:()=>b,info:()=>x,success:()=>C});function b(e,t=``){return`${t}${w.bold}[boltdocs]${w.reset} ${e}${w.reset}`}function x(e){console.log(b(e))}function S(e,t){console.error(b(e,w.red)),t&&console.error(t)}function C(e){console.log(b(e,w.green))}var w,T=t((()=>{w={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`}}));async function E(e=process.cwd()){try{let t=await p(await l(e,`development`));await t.listen(),t.printUrls(),t.bindCLIShortcuts({print:!0})}catch(e){S(`Failed to start dev server:`,e),process.exit(1)}}var D=t((()=>{u(),T()}));async function O(e=process.cwd()){let t=!1,n=_.resolve(e,`index.html`);try{if(!g.existsSync(n)){let r=await d(`docs`,e);g.writeFileSync(n,c(r),`utf-8`),t=!0}await f(await l(e,`production`)),C(`Build completed successfully.`)}catch(e){S(`Build failed:`,e),process.exit(1)}finally{t&&g.existsSync(n)&&g.unlinkSync(n)}}async function k(e=process.cwd()){try{(await m(await l(e,`production`))).printUrls()}catch(e){S(`Failed to start preview server:`,e),process.exit(1)}}var A=t((()=>{u(),o(),T()}));async function j(e=process.cwd()){let{colors:t}=y;x(`${t.bold}Running documentation health check...${t.reset}\n`);let n=performance.now();try{let r=await d(`docs`,e),o=_.resolve(e,`docs`);g.existsSync(o)||(S(`Documentation directory not found at ${o}`),process.exit(1));let s=await h([`**/*.md`,`**/*.mdx`],{cwd:o,absolute:!0,suppressErrors:!0}),c=0,l=0,u=0,f=new Map,p=(e,t)=>{let n=_.relative(o,e),r=f.get(n);r||(r=[],f.set(n,r)),r.push(t),t.level===`high`?c++:t.level===`warning`?l++:t.level===`low`&&u++},m=`/docs`;for(let e of s){let{data:t,content:n}=i(e);t.title||p(e,{level:`warning`,message:`Missing "title" in frontmatter.`,suggestion:"Add `title: Your Title` to the YAML frontmatter at the top of the file."}),t.description||p(e,{level:`low`,message:`Missing "description" in frontmatter.`,suggestion:`Adding a description helps with SEO and search previews.`});let r=/\[.*?\]\((.*?)\)/g,a=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,s=[...n.matchAll(r),...n.matchAll(a)];for(let t of s){let n=t[1];if(!n||n.startsWith(`http`)||n.startsWith(`https`)||n.startsWith(`#`)||n.startsWith(`mailto:`)||n.startsWith(`tel:`)||(n=n.split(`#`)[0],!n))continue;let r;if(n.startsWith(`/`)){let e=n;(n.startsWith(m+`/`)||n===m)&&(e=n.substring(5)),r=_.join(o,e)}else r=_.resolve(_.dirname(e),n);let i=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],a=!1;for(let e of i){let t=r+e;if(g.existsSync(t)&&g.statSync(t).isFile()){a=!0;break}}a||p(e,{level:`high`,message:`Broken internal link: "${n}"`,suggestion:`Ensure the file exists at "${r}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(r.i18n){let{defaultLocale:e,locales:t}=r.i18n,n=Object.keys(t).filter(t=>t!==e);for(let t of s){let r=a(_.relative(o,t)).split(`/`);if(r[0]===e){let e=r.slice(1).join(`/`);for(let i of n){let n=[i,...r.slice(1)],a=_.join(o,...n);g.existsSync(a)||p(t,{level:`warning`,message:`Missing translation for locale "${i}"`,suggestion:`Create a translated version of this file at "${i}/${e}".`})}}}}if(f.size===0)C(`All documentation files are healthy!
8
- `);else{for(let[e,n]of f.entries()){console.log(`📄 ${t.bold}${e}${t.reset}`);let r=n.sort((e,t)=>{let n={high:1,warning:2,low:3};return n[e.level]-n[t.level]});for(let e of r){let n=``,r=``;e.level===`high`?(n=`❌`,r=t.red):e.level===`warning`?(n=`⚠️`,r=t.yellow):(n=`ℹ️`,r=t.cyan),console.log(` ${r}${n} ${e.level.toUpperCase()}:${t.reset} ${e.message}`),e.suggestion&&console.log(` ${t.gray}💡 Suggestion: ${e.suggestion}${t.reset}`)}console.log(``)}console.log(`${t.bold}Summary:${t.reset}`),console.log(` ${t.red}${c} high-level errors${t.reset}`),console.log(` ${t.yellow}${l} warnings${t.reset}`),console.log(` ${t.cyan}${u} minor improvements${t.reset}\n`),c>0&&S(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(l>0||u>0)&&x(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}x(`Finished in ${(performance.now()-n).toFixed(2)}ms\n`),c>0&&process.exit(1)}catch(e){S(`Failed to run doctor check:`,e),process.exit(1)}}var M=t((()=>{s(),r(),T()})),N=t((()=>{D(),A(),M(),T()})),P=n((()=>{N();let e=v(`boltdocs`);e.command(`[root]`,`Start development server`).alias(`dev`).action(E),e.command(`build [root]`,`Build for production`).action(O),e.command(`preview [root]`,`Preview production build`).action(k),e.command(`doctor [root]`,`Check documentation health`).action(j),e.help(),e.version(`2.0.0`),e.parse()}));export default P();export{};
7
+ import{g as e,n as t,v as n,y as r}from"../node-BgvNl2Ay.mjs";import{preview as i}from"vite";import a from"fast-glob";import o from"fs";import s from"path";import c from"cac";import{build as l,createServer as u}from"@bdocs/ssg/node";var d=Object.defineProperty,f=((e,t)=>{let n={};for(var r in e)d(n,r,{get:e[r],enumerable:!0});return t||d(n,Symbol.toStringTag,{value:`Module`}),n})({colors:()=>p,error:()=>g,formatLog:()=>m,info:()=>h,success:()=>_});const p={reset:`\x1B[0m`,bold:`\x1B[1m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,cyan:`\x1B[36m`,gray:`\x1B[90m`};function m(e,t=``){return`${t}${p.bold}[boltdocs]${p.reset} ${e}${p.reset}`}function h(e){console.log(m(e))}function g(e,t){console.error(m(e,p.red)),t&&console.error(t)}function _(e){console.log(m(e,p.green))}async function v(e=process.cwd()){try{let n=await u(await t(e,`development`));await n.listen(),n.printUrls(),n.bindCLIShortcuts({print:!0})}catch(e){g(`Failed to start dev server:`,e),process.exit(1)}}async function y(e=process.cwd()){try{await l({entry:`boltdocs/entry`},await t(e,`production`)),_(`SSG build completed successfully!`)}catch(e){g(`Build failed:`,e),process.exit(1)}}async function b(e=process.cwd()){try{(await i(await t(e,`production`))).printUrls()}catch(e){g(`Failed to start preview server:`,e),process.exit(1)}}async function x(t=process.cwd()){let{colors:i}=f;h(`${i.bold}Running documentation health check...${i.reset}\n`);let c=performance.now();try{let l=await e(`docs`,t),u=s.resolve(t,`docs`);o.existsSync(u)||(g(`Documentation directory not found at ${u}`),process.exit(1));let d=await a([`**/*.md`,`**/*.mdx`],{cwd:u,absolute:!0,suppressErrors:!0}),f=0,p=0,m=0,v=new Map,y=(e,t)=>{let n=s.relative(u,e),r=v.get(n);r||(r=[],v.set(n,r)),r.push(t),t.level===`high`?f++:t.level===`warning`?p++:t.level===`low`&&m++},b=`/docs`;for(let e of d){let{data:t,content:n}=r(e);t.title||y(e,{level:`warning`,message:`Missing "title" in frontmatter.`,suggestion:"Add `title: Your Title` to the YAML frontmatter at the top of the file."}),t.description||y(e,{level:`low`,message:`Missing "description" in frontmatter.`,suggestion:`Adding a description helps with SEO and search previews.`});let i=/\[.*?\]\((.*?)\)/g,a=/<a\s+[^>]*href=["']([^"']+)["'][^>]*>/g,c=[...n.matchAll(i),...n.matchAll(a)];for(let t of c){let n=t[1];if(!n||n.startsWith(`http`)||n.startsWith(`https`)||n.startsWith(`#`)||n.startsWith(`mailto:`)||n.startsWith(`tel:`)||(n=n.split(`#`)[0],!n))continue;let r;if(n.startsWith(`/`)){let e=n;(n.startsWith(b+`/`)||n===b)&&(e=n.substring(5)),r=s.join(u,e)}else r=s.resolve(s.dirname(e),n);let i=[``,`.md`,`.mdx`,`/index.md`,`/index.mdx`],a=!1;for(let e of i){let t=r+e;if(o.existsSync(t)&&o.statSync(t).isFile()){a=!0;break}}a||y(e,{level:`high`,message:`Broken internal link: "${n}"`,suggestion:`Ensure the file exists at "${r}". If it's a directory, ensure it has an "index.md" or "index.mdx".`})}}if(l.i18n){let{defaultLocale:e,locales:t}=l.i18n,r=Object.keys(t).filter(t=>t!==e);for(let t of d){let i=n(s.relative(u,t)).split(`/`);if(i[0]===e){let e=i.slice(1).join(`/`);for(let n of r){let r=[n,...i.slice(1)],a=s.join(u,...r);o.existsSync(a)||y(t,{level:`warning`,message:`Missing translation for locale "${n}"`,suggestion:`Create a translated version of this file at "${n}/${e}".`})}}}}if(v.size===0)_(`All documentation files are healthy!
8
+ `);else{for(let[e,t]of v.entries()){console.log(`📄 ${i.bold}${e}${i.reset}`);let n=t.sort((e,t)=>{let n={high:1,warning:2,low:3};return n[e.level]-n[t.level]});for(let e of n){let t=``,n=``;e.level===`high`?(t=`❌`,n=i.red):e.level===`warning`?(t=`⚠️`,n=i.yellow):(t=`ℹ️`,n=i.cyan),console.log(` ${n}${t} ${e.level.toUpperCase()}:${i.reset} ${e.message}`),e.suggestion&&console.log(` ${i.gray}💡 Suggestion: ${e.suggestion}${i.reset}`)}console.log(``)}console.log(`${i.bold}Summary:${i.reset}`),console.log(` ${i.red}${f} high-level errors${i.reset}`),console.log(` ${i.yellow}${p} warnings${i.reset}`),console.log(` ${i.cyan}${m} minor improvements${i.reset}\n`),f>0&&g(`HIGH ERROR: Fix these to ensure your documentation builds correctly.`),(p>0||m>0)&&h(`TIP: Address warnings and suggestions for premium quality docs.`),console.log(``)}h(`Finished in ${(performance.now()-c).toFixed(2)}ms\n`),f>0&&process.exit(1)}catch(e){g(`Failed to run doctor check:`,e),process.exit(1)}}const S=c(`boltdocs`);S.command(`[root]`,`Start development server`).alias(`dev`).action(v),S.command(`build [root]`,`Build for production`).action(y),S.command(`preview [root]`,`Preview production build`).action(b),S.command(`doctor [root]`,`Check documentation health`).action(x),S.help(),S.version(`2.0.0`),S.parse();export{};
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../node-VYfhzGrh.cjs`);exports.BoltdocsPluginStore=e.l,exports.PluginCompatibilityError=e.u,exports.PluginError=e.d,exports.PluginHookError=e.f,exports.PluginLifecycleManager=e.i,exports.PluginPermissionError=e.p,exports.PluginSandbox=e.a,exports.PluginValidationError=e.m,exports.SecurePluginSchema=e.o,exports.createPlugin=e.r,exports.createViteConfig=e.n,exports.default=e.t,exports.defineConfig=e._,exports.generateStaticPages=e.g,exports.hasPermission=e.s,exports.resolveConfig=e.v,exports.validatePlugins=e.c;
6
+ Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require(`../node-vkbb0MK7.cjs`);exports.BoltdocsPluginStore=e.l,exports.PluginCompatibilityError=e.u,exports.PluginError=e.d,exports.PluginHookError=e.f,exports.PluginLifecycleManager=e.i,exports.PluginPermissionError=e.p,exports.PluginSandbox=e.a,exports.PluginValidationError=e.m,exports.SecurePluginSchema=e.o,exports.createPlugin=e.r,exports.createViteConfig=e.n,exports.default=e.t,exports.defineConfig=e._,exports.generateEntryCode=e.h,exports.hasPermission=e.s,exports.resolveConfig=e.g,exports.validatePlugins=e.c;