boltdocs 2.4.2 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/cache-3FOEPC2P.mjs +1 -0
- package/dist/chunk-ITFGVXPE.mjs +1 -0
- package/dist/chunk-TP5KMRD3.mjs +1 -0
- package/dist/chunk-UD2LQG2M.mjs +75 -0
- package/dist/chunk-Y4RE5KI7.mjs +1 -0
- package/dist/client/index.d.mts +1225 -14
- package/dist/client/index.d.ts +1225 -14
- package/dist/client/index.js +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/client/ssr.js +1 -1
- package/dist/client/ssr.mjs +1 -1
- package/dist/node/cli-entry.js +37 -35
- package/dist/node/cli-entry.mjs +1 -1
- package/dist/node/index.d.mts +263 -1
- package/dist/node/index.d.ts +263 -1
- package/dist/node/index.js +34 -32
- package/dist/node/index.mjs +1 -1
- package/dist/package-TWC3BMZ7.mjs +1 -0
- package/dist/search-dialog-YBM4GYDR.mjs +1 -0
- package/package.json +46 -76
- package/src/client/components/primitives/breadcrumbs.tsx +10 -10
- package/src/client/components/primitives/index.ts +17 -16
- package/src/client/components/primitives/menu.tsx +11 -14
- package/src/client/components/primitives/navbar.tsx +29 -29
- package/src/client/components/primitives/navigation-menu.tsx +7 -9
- package/src/client/components/primitives/on-this-page.tsx +16 -18
- package/src/client/components/primitives/page-nav.tsx +10 -13
- package/src/client/components/primitives/search-dialog.tsx +17 -19
- package/src/client/components/primitives/sidebar.tsx +8 -10
- package/src/client/components/primitives/tabs.tsx +10 -12
- package/src/client/components/primitives/tooltip.tsx +3 -5
- package/src/client/components/ui-base/breadcrumbs.tsx +12 -15
- package/src/client/components/ui-base/copy-markdown.tsx +8 -10
- package/src/client/components/ui-base/navbar.tsx +10 -10
- package/src/client/components/ui-base/on-this-page.tsx +13 -12
- package/src/client/components/ui-base/page-nav.tsx +15 -15
- package/src/client/components/ui-base/search-dialog.tsx +13 -20
- package/src/client/components/ui-base/sidebar.tsx +9 -9
- package/src/client/components/ui-base/tabs.tsx +6 -7
- package/src/client/components/ui-base/theme-toggle.tsx +11 -11
- package/src/client/hooks/index.ts +12 -12
- package/src/client/index.ts +34 -11
- package/src/node/config.ts +48 -6
- package/src/node/errors.ts +44 -0
- package/src/node/index.ts +29 -2
- package/src/node/mdx/index.ts +9 -2
- package/src/node/plugin/index.ts +72 -4
- package/src/node/plugins/index.ts +17 -0
- package/src/node/plugins/plugin-errors.ts +62 -0
- package/src/node/plugins/plugin-lifecycle.ts +117 -0
- package/src/node/plugins/plugin-sandbox.ts +59 -0
- package/src/node/plugins/plugin-store.ts +54 -0
- package/src/node/plugins/plugin-types.ts +107 -0
- package/src/node/plugins/plugin-validator.ts +105 -0
- package/src/node/routes/parser.ts +35 -5
- package/src/node/schema/config.ts +208 -0
- package/src/node/schema/frontmatter.ts +17 -0
- package/src/node/security/constants/index.ts +10 -0
- package/src/node/security/csp.ts +31 -0
- package/src/node/security/headers.ts +27 -0
- package/src/node/utils.ts +153 -5
- package/tsup.config.ts +0 -6
- package/dist/base-ui/index.d.mts +0 -25
- package/dist/base-ui/index.d.ts +0 -25
- package/dist/base-ui/index.js +0 -1
- package/dist/base-ui/index.mjs +0 -1
- package/dist/cache-P6WK424C.mjs +0 -1
- package/dist/chunk-2DI3OGHV.mjs +0 -1
- package/dist/chunk-2Z5T6EAU.mjs +0 -1
- package/dist/chunk-64AJ5QLT.mjs +0 -1
- package/dist/chunk-DDX52BX4.mjs +0 -1
- package/dist/chunk-HRZDSFR5.mjs +0 -1
- package/dist/chunk-JD3RSDE4.mjs +0 -1
- package/dist/chunk-JZXLCA2E.mjs +0 -1
- package/dist/chunk-NBCYHLAA.mjs +0 -1
- package/dist/chunk-PPVDMDEL.mjs +0 -1
- package/dist/chunk-T3W44KWY.mjs +0 -1
- package/dist/chunk-UBE4CKOA.mjs +0 -1
- package/dist/chunk-UWT4AJTH.mjs +0 -73
- package/dist/chunk-WWJ7WKDI.mjs +0 -1
- package/dist/chunk-Y4RRHPXC.mjs +0 -1
- package/dist/client/types.d.mts +0 -3
- package/dist/client/types.d.ts +0 -3
- package/dist/client/types.js +0 -1
- package/dist/client/types.mjs +0 -0
- package/dist/copy-markdown--9yjpbyy.d.mts +0 -15
- package/dist/copy-markdown-l2MYkcG7.d.ts +0 -15
- package/dist/hooks/index.d.mts +0 -137
- package/dist/hooks/index.d.ts +0 -137
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/index.mjs +0 -1
- package/dist/integrations/index.d.mts +0 -48
- package/dist/integrations/index.d.ts +0 -48
- package/dist/integrations/index.js +0 -1
- package/dist/integrations/index.mjs +0 -1
- package/dist/link-DfBwCeZc.d.mts +0 -68
- package/dist/link-DfBwCeZc.d.ts +0 -68
- package/dist/loading-BwUos0wZ.d.mts +0 -57
- package/dist/loading-nlnUD01v.d.ts +0 -57
- package/dist/mdx/index.d.mts +0 -178
- package/dist/mdx/index.d.ts +0 -178
- package/dist/mdx/index.js +0 -1
- package/dist/mdx/index.mjs +0 -1
- package/dist/primitives/index.d.mts +0 -292
- package/dist/primitives/index.d.ts +0 -292
- package/dist/primitives/index.js +0 -1
- package/dist/primitives/index.mjs +0 -1
- package/dist/search-dialog-OONKKC5H.mjs +0 -1
- package/dist/types-opDA2E9-.d.mts +0 -394
- package/dist/types-opDA2E9-.d.ts +0 -394
- package/dist/use-routes-DNwgTRpU.d.ts +0 -29
- package/dist/use-routes-DrT80Eom.d.mts +0 -29
package/dist/client/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Xs=Object.create;var Ft=Object.defineProperty;var Js=Object.getOwnPropertyDescriptor;var Ys=Object.getOwnPropertyNames;var Zs=Object.getPrototypeOf,Qs=Object.prototype.hasOwnProperty;var L=(e,t)=>()=>(e&&(t=e(e=0)),t);var Yo=(e,t)=>{for(var o in t)Ft(e,o,{get:t[o],enumerable:!0})},$r=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Ys(t))!Qs.call(e,n)&&n!==o&&Ft(e,n,{get:()=>t[n],enumerable:!(r=Js(t,n))||r.enumerable});return e};var S=(e,t,o)=>(o=e!=null?Xs(Zs(e)):{},$r(t||!e||!e.__esModule?Ft(o,"default",{value:e,enumerable:!0}):o,e)),ea=e=>$r(Ft({},"__esModule",{value:!0}),e);var s=L(()=>{"use strict"});function F(){let e=(0,Wt.use)(Zo);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Wt,Zo,ge=L(()=>{"use strict";s();Wt=require("react"),Zo=(0,Wt.createContext)(null)});function Gt(){return(0,Ve.use)(Fr)}function Wr({routes:e,modules:t,children:o}){let r=(0,Ve.useRef)(null),n=(0,Ve.useCallback)(a=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let i=a.split("#")[0].split("?")[0],c=e.find(l=>l.path===i||i==="/"&&l.path==="");if(c?.filePath){let l=Object.keys(t).find(u=>u.endsWith("/"+c.filePath));l&&t[l]().catch(u=>{console.error(`[boltdocs] Failed to preload route ${a}:`,u)})}},100)},[e,t]);return(0,Gr.jsx)(Fr.Provider,{value:{preload:n,routes:e},children:o})}var Ve,Gr,Fr,_t=L(()=>{"use strict";s();Ve=require("react"),Gr=require("react/jsx-runtime"),Fr=(0,Ve.createContext)({preload:()=>{},routes:[]})});var _r,jt,re,Lt=L(()=>{"use strict";s();_r=require("zustand"),jt=require("zustand/middleware"),re=(0,_r.create)()((0,jt.persist)(e=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:t=>e({currentLocale:t}),setVersion:t=>e({currentVersion:t}),setHasHydrated:t=>e({hasHydrated:t})}),{name:"boltdocs-storage",storage:(0,jt.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}))});function A(){let{routes:e}=Gt(),t=F(),o=(0,jr.useLocation)(),r=re(b=>b.currentLocale),n=re(b=>b.currentVersion),a=re(b=>b.hasHydrated),i=e.find(b=>b.path===o.pathname),c=t.i18n?i?.locale||(a?r:void 0)||t.i18n.defaultLocale:void 0,l=t.versions?i?.version||(a?n:void 0)||t.versions.defaultVersion:void 0,u=e.filter(b=>{let k=t.i18n?(b.locale||t.i18n.defaultLocale)===c:!0,R=t.versions?(b.version||t.versions.defaultVersion)===l:!0;if(!(k&&R))return!1;let Q=t.i18n;if(Q){let le=!!i?.locale,G=!!b.locale;if(e.some(ce=>ce!==b&&ce.filePath===b.filePath&&ce.version===b.version&&(ce.locale||Q.defaultLocale)===(b.locale||Q.defaultLocale))&&le!==G)return!1}return!0}),p=t.i18n?.localeConfigs?.[c]?.label||t.i18n?.locales[c]||c,h=t.versions?.versions.find(b=>b.path===l)?.label||l,x=t.i18n?Object.entries(t.i18n.locales).map(([b,k])=>{let R=t.i18n?.localeConfigs?.[b];return{key:b,label:R?.label||k,isCurrent:b===c}}):[],v=t.versions?t.versions.versions.map(b=>({key:b.path,label:b.label,isCurrent:b.path===l})):[];return{routes:u,allRoutes:e,currentRoute:i,currentLocale:c,currentLocaleLabel:p,availableLocales:x,currentVersion:l,currentVersionLabel:h,availableVersions:v,config:t}}var jr,ee=L(()=>{"use strict";s();jr=require("react-router-dom");ge();_t();Lt()});function kt(e){let t=F(),{currentLocale:o,currentVersion:r}=A();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,a=t.versions;if(!n&&!a)return e;let i=e.startsWith("/docs"),c=e.split("/").filter(Boolean),l=0;c[l]==="docs"&&l++,a&&c.length>l&&a.versions.find(h=>h.path===c[l])&&l++,n&&c.length>l&&n.locales[c[l]]&&l++;let u=c.slice(l),d=[];i&&(d.push("docs"),a&&r&&d.push(r)),n&&o&&o!==n.defaultLocale&&d.push(o),d.push(...u);let p=`/${d.join("/")}`;return p.length>1&&p.endsWith("/")?p.slice(0,-1):p||"/"}var Ut=L(()=>{"use strict";s();ge();ee()});function m(...e){return(0,qr.twMerge)((0,Ur.clsx)(e))}var Ur,qr,w=L(()=>{"use strict";s();Ur=require("clsx"),qr=require("tailwind-merge")});var Qo,Kr,Xr,er,K,ta,Qe=L(()=>{"use strict";s();Qo=S(require("react")),Kr=require("react-aria-components"),Xr=require("react-router-dom");Ut();_t();w();er=require("react/jsx-runtime"),K=Qo.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:a,...i}=e,c=kt(o??""),{preload:l}=Gt();return(0,er.jsx)(Kr.Link,{...i,ref:t,href:c,onMouseEnter:p=>{n?.(p),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&l(c)},onFocus:p=>{a?.(p),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&l(c)}})});K.displayName="Link";ta=Qo.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:a,...i}=e,c=(0,Xr.useLocation)(),l=kt(o??""),u=r?c.pathname===l:c.pathname.startsWith(l),d=typeof n=="function"?n({isActive:u}):m(n,u&&"active"),p=typeof a=="function"?a({isActive:u}):a;return(0,er.jsx)(K,{...i,ref:t,href:o,className:d,children:p})});ta.displayName="NavLink"});var Jt,bn,he,Xt,Re,Yt=L(()=>{"use strict";s();Jt=S(require("react-aria-components"));w();bn=require("class-variance-authority"),he=require("react/jsx-runtime"),Xt=(0,bn.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"}}),Re=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:a,variant:i,size:c,rounded:l,iconSize:u,disabled:d,...p})=>{let f=r||!n&&!!t,h=f?(0,he.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,he.jsxs)(he.Fragment,{children:[t&&o==="left"&&(0,he.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,he.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,he.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,he.jsx)(Jt.Link,{href:e,className:m(Xt({variant:i,size:c,rounded:l,iconSize:f?u:void 0,disabled:d}),a),...p,children:h}):(0,he.jsx)(Jt.Button,{className:m(Xt({variant:i,size:c,rounded:l,iconSize:f?u:void 0,disabled:d}),a),...p,children:h})}});function te(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var y,to,Cn,Rn,Pn,Nn,oo,ro,no,so,ao,tt,ot,rt,nt,At=L(()=>{"use strict";s();y=require("react/jsx-runtime");to=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...te(e),children:[(0,y.jsx)("title",{children:"GitHub"}),(0,y.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),Cn=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...te(e),children:[(0,y.jsx)("title",{children:"Discord"}),(0,y.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z"})]}),Rn=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...te(e),children:[(0,y.jsx)("title",{children:"X"}),(0,y.jsx)("path",{d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})]}),Pn=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...te(e),children:[(0,y.jsx)("title",{children:"CodeSandbox"}),(0,y.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]}),Nn=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...te(e),children:[(0,y.jsx)("title",{children:"Bluesky"}),(0,y.jsx)("path",{d:"M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"})]}),oo=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,y.jsx)("title",{children:"TypeScript"}),(0,y.jsx)("path",{fill:"#2563EB",d:"M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z"})]}),ro=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,y.jsx)("title",{children:"JavaScript"}),(0,y.jsx)("path",{fill:"#F59E0B",d:"M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z"})]}),no=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,y.jsx)("title",{children:"JSON"}),(0,y.jsx)("path",{fill:"#F59E0B",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),so=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,y.jsx)("title",{children:"CSS"}),(0,y.jsx)("path",{fill:"#0EA5E9",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),ao=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,y.jsx)("title",{children:"HTML"}),(0,y.jsx)("path",{fill:"#EA580C",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),tt=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,y.jsx)("title",{children:"React"}),(0,y.jsx)("path",{fill:"#0E8ADC",d:"M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z"}),(0,y.jsx)("path",{stroke:"#0E8ADC",d:"M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z"}),(0,y.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z"}),(0,y.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z"})]}),ot=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,y.jsx)("title",{children:"Markdown"}),(0,y.jsx)("path",{fill:"#60A5FA",d:"M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z"})]}),rt=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...te(e),children:[(0,y.jsx)("title",{children:"Shell"}),(0,y.jsx)("path",{stroke:"#14B8A6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.336 17l6-6-6-6M12.336 19h8"})]}),nt=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...te(e),children:[(0,y.jsx)("title",{children:"YAML"}),(0,y.jsx)("path",{fill:"#A78BFA",d:"M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z"})]})});var st,me,ra,sr,ar=L(()=>{"use strict";s();st=S(require("react-aria-components"));w();me=require("react/jsx-runtime"),ra=({className:e,children:t,...o})=>(0,me.jsx)(st.Tooltip,{...o,offset:8,className:r=>m("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>(0,me.jsxs)(me.Fragment,{children:[(0,me.jsx)(st.OverlayArrow,{children:(0,me.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,me.jsx)("title",{children:"Arrow"}),(0,me.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),sr=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,me.jsxs)(st.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,me.jsx)(ra,{...n,children:e})]})});var Mo,Dn,ze,N,va,ya,Ca,Ra,Pa,Na,wa,Ta,La,ka,Sa,Aa,Ba,Ia,X,Eo=L(()=>{"use strict";s();Mo=require("react");Oo();Dn=require("react-aria-components"),ze=require("lucide-react");At();N=require("react/jsx-runtime"),va=({children:e,className:t,...o})=>(0,N.jsx)("header",{className:m("boltdocs-navbar sticky top-0 z-50 w-full border-b border-border-subtle bg-bg-main/80 backdrop-blur-md",t),...o,children:e}),ya=({children:e,className:t})=>(0,N.jsx)("div",{className:m("mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6",t),children:e}),Ca=({children:e,className:t})=>(0,N.jsx)("div",{className:m("flex flex-1 items-center justify-start gap-4 min-w-0",t),children:e}),Ra=({children:e,className:t})=>(0,N.jsx)("div",{className:m("flex flex-1 items-center justify-end gap-2 md:gap-4 min-w-0",t),children:e}),Pa=({children:e,className:t})=>(0,N.jsx)("div",{className:m("hidden lg:flex flex-1 justify-center items-center gap-4 px-4 min-w-0 w-full",t),children:e}),Na=({src:e,alt:t,width:o=24,height:r=24,className:n})=>(0,N.jsx)(K,{href:"/",className:m("flex items-center gap-2 shrink-0 outline-none",n),children:e?(0,N.jsx)("img",{src:e,alt:t,width:o,height:r,className:"h-6 w-6 object-contain"}):null}),wa=({children:e,className:t})=>(0,N.jsx)(K,{href:"/",children:(0,N.jsx)("span",{className:m("text-lg font-bold tracking-tight hidden sm:inline-block",t),children:e})}),Ta=({children:e,className:t})=>(0,N.jsx)("nav",{className:m("hidden md:flex items-center gap-6 text-sm font-medium",t),children:e}),La=({label:e,href:t,active:o,to:r,className:n})=>(0,N.jsxs)(K,{href:t,target:r==="external"?"_blank":void 0,className:m("transition-colors outline-none font-medium focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm",{"text-primary-500":o,"text-text-muted hover:text-text-main":!o},n),children:[e,r==="external"&&(0,N.jsx)("span",{className:"ml-1 inline-block",children:(0,N.jsx)(ze.ExternalLink,{size:12})})]}),ka=({className:e,onPress:t})=>{let[o,r]=(0,Mo.useState)(!1),n=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return(0,Mo.useEffect)(()=>{r(!0)},[]),(0,N.jsxs)(Dn.Button,{onPress:t,className:m("flex items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-muted outline-none cursor-pointer","transition-all duration-200 hover:border-border-strong hover:text-text-main hover:bg-bg-muted hover:shadow-sm active:scale-[0.98]","focus-visible:ring-2 focus-visible:ring-primary-500/30","w-full max-w-[720px] justify-between",e),children:[(0,N.jsxs)("div",{className:"flex items-center gap-2",children:[(0,N.jsx)(ze.Search,{size:16}),(0,N.jsx)("span",{className:"hidden sm:inline-block",children:"Search docs..."})]}),(0,N.jsxs)("div",{className:"hidden sm:flex items-center gap-1 pointer-events-none select-none",children:[(0,N.jsx)("kbd",{className:"flex h-5 items-center justify-center rounded border border-border-subtle bg-bg-main px-1.5 font-mono text-[10px] font-medium",children:n?"\u2318":"Ctrl"}),(0,N.jsx)("kbd",{className:"flex h-5 w-5 items-center justify-center rounded border border-border-subtle bg-bg-main font-mono text-[10px] font-medium",children:"K"})]})]})},Sa=({className:e,theme:t,onThemeChange:o})=>(0,N.jsx)(ut.ToggleButton,{isSelected:t==="dark",onChange:o,className:m("rounded-md p-2 text-text-muted outline-none cursor-pointer","transition-all duration-300 hover:bg-bg-surface hover:text-text-main hover:rotate-12 active:scale-90","focus-visible:ring-2 focus-visible:ring-primary-500/30",e),"aria-label":"Toggle theme",children:t==="dark"?(0,N.jsx)(ze.Sun,{size:20}):(0,N.jsx)(ze.Moon,{size:20})}),Aa=({name:e})=>{if(e==="github")return(0,N.jsx)(to,{});if(e==="discord")return(0,N.jsx)(Cn,{});if(e==="x")return(0,N.jsx)(Rn,{});if(e==="bluesky")return(0,N.jsx)(Nn,{})},Ba=({icon:e,link:t,className:o})=>(0,N.jsx)(K,{href:t,target:"_blank",rel:"noopener noreferrer",className:m("rounded-md p-2 text-text-muted outline-none transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:(0,N.jsx)(Aa,{name:e})}),Ia=({className:e})=>(0,N.jsx)(ut.Separator,{orientation:"vertical",className:m("h-6 w-px bg-border-subtle mx-1",e)}),X={NavbarRoot:va,NavbarLeft:Ca,NavbarRight:Ra,NavbarCenter:Pa,NavbarLogo:Na,Title:wa,Links:Ta,Link:La,SearchTrigger:ka,Theme:Sa,Socials:Ba,Split:Ia,Content:ya}});var Ot,Ma,dr,Hn=L(()=>{"use strict";s();Ot=S(require("react-aria-components")),Ma=require("lucide-react");w();dr=require("react/jsx-runtime")});var _,$e,B,ur,fr,gr,br,hr,xr,vr,yr,Gc,Cr=L(()=>{"use strict";s();_=S(require("react-aria-components")),$e=require("lucide-react");w();B=require("react/jsx-runtime"),ur=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,B.jsx)(_.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:m("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:(0,B.jsx)(_.Modal,{className:m("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:(0,B.jsx)(_.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),fr=({children:e,className:t,onSelectionChange:o,...r})=>(0,B.jsx)("div",{className:t,children:(0,B.jsx)(_.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),gr=({className:e,...t})=>(0,B.jsxs)(_.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,B.jsx)($e.Search,{className:"h-5 w-5 text-text-muted"}),(0,B.jsx)(_.Input,{...t,className:m("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,B.jsx)("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:(0,B.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),br=({children:e,className:t,...o})=>(0,B.jsx)(_.ListBox,{...o,className:m("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),hr=({children:e,className:t,...o})=>(0,B.jsx)(_.ListBoxItem,{...o,className:m("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>(0,B.jsxs)(B.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,B.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,B.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,B.jsx)($e.CornerDownLeft,{size:10})]})]})}),xr=({isHeading:e,className:t})=>(0,B.jsx)("div",{className:m("shrink-0",t),children:e?(0,B.jsx)($e.Hash,{size:18}):(0,B.jsx)($e.FileText,{size:18})}),vr=({children:e,className:t})=>(0,B.jsx)("span",{className:m("block font-medium truncate flex-1 text-sm",t),children:e}),yr=({children:e,className:t})=>(0,B.jsx)("span",{className:m("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),Gc={Root:ur,Autocomplete:fr,Input:gr,List:br,Item:Object.assign(hr,{Icon:xr,Title:vr,Bio:yr})}});function zn(e,t){let o=(0,Vo.useRef)(e);(0,Vo.useEffect)(()=>{o.current!==e&&(t(e),o.current=e)},[e,t])}var Vo,$n=L(()=>{"use strict";s();Vo=require("react")});function Rr(e){return e.startsWith("#")?e.slice(1):null}var Do,Fn=L(()=>{"use strict";s();Do=class{items=[];single=!1;observer=null;onChange;callback(t){if(t.length===0)return;for(let r of t){let n=this.items.find(a=>a.id===r.target.id);if(n){n.active=r.isIntersecting;let a=100;n.fallback=!r.isIntersecting&&r.boundingClientRect.top<a}}let o=-1;for(let r=this.items.length-1;r>=0;r--)if(this.items[r].fallback){o=r;break}o===-1&&this.items.length>0&&(o=0),this.items=this.items.map((r,n)=>({...r,active:n===o,t:n===o?Date.now():r.t})),this.onChange?.()}setItems(t){let o=this.observer;if(o)for(let r of this.items){let n=document.getElementById(r.id);n&&o.unobserve(n)}this.items=[];for(let r of t){let n=Rr(r.url);n&&this.items.push({id:n,active:!1,fallback:!1,t:0,original:r})}this.watchItems(),typeof window<"u"&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(t){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),t),this.watchItems())}watchItems(){if(this.observer)for(let t of this.items){let o=document.getElementById(t.id);o&&this.observer.observe(o)}}unwatch(){this.observer?.disconnect(),this.observer=null}}});function Ea(){let e=(0,O.use)(Pr);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function _n(){let e=Ea();return(0,O.useMemo)(()=>{let t;for(let o of e)o.active&&(!t||o.t>t.t)&&(t=o);return t?.id},[e])}function jn({containerRef:e,children:t}){return(0,Te.jsx)(Gn.Provider,{value:e,children:t})}function Un({toc:e,single:t=!1,children:o}){let r=(0,O.useMemo)(()=>new Do,[]),[n,a]=(0,O.useState)(r.items);return r.single=t,(0,O.useEffect)(()=>{r.setItems(e)},[r,e]),(0,O.useEffect)(()=>(r.watch({rootMargin:"-100px 0% 0% 0%",threshold:0}),r.onChange=()=>a([...r.items]),()=>{r.unwatch()}),[r]),(0,Te.jsx)(Pr.Provider,{value:n,children:o})}var O,Wn,Te,Pr,Gn,Oa,Va,qn,Da,Ha,za,$a,Xe,Nr=L(()=>{"use strict";s();O=require("react"),Wn=S(require("scroll-into-view-if-needed"));w();$n();Fn();Te=require("react/jsx-runtime"),Pr=(0,O.createContext)(null),Gn=(0,O.createContext)(null);Oa=({children:e,className:t})=>(0,Te.jsx)("nav",{className:m("sticky top-navbar hidden xl:flex flex-col shrink-0","w-toc","py-8 pl-6 pr-4",t),children:e}),Va=({children:e,className:t,...o})=>(0,Te.jsx)("div",{className:m("mb-4 text-xs font-bold uppercase tracking-wider text-text-main",t),...o,children:e}),qn=({children:e,className:t,ref:o,...r})=>{let n=(0,O.useRef)(null);return(0,O.useImperativeHandle)(o,()=>n.current),(0,Te.jsx)("div",{ref:n,className:m("relative overflow-y-auto boltdocs-otp-content",t),...r,children:e})};qn.displayName="OnThisPageContent";Da=({children:e,className:t})=>(0,Te.jsx)("ul",{className:m("relative space-y-1 text-sm border-l border-border-subtle",t),children:e}),Ha=({level:e,children:t,className:o})=>(0,Te.jsx)("li",{className:m(e===3&&"pl-3",o),children:t}),za=({children:e,href:t,active:o,onClick:r,className:n})=>{let a=(0,O.use)(Pr),i=(0,O.use)(Gn),c=t?Rr(t):null,l=(0,O.useRef)(null),[u,d]=(0,O.useState)(o);return zn(c&&a?a.find(p=>p.id===c)?.active:null,p=>{p!==null&&p!==u&&(d(!!p),p&&l.current&&i?.current&&(0,Wn.default)(l.current,{behavior:"smooth",block:"center",inline:"center",scrollMode:"if-needed",boundary:i.current}))}),(0,O.useEffect)(()=>{o!==void 0&&d(o)},[o]),(0,Te.jsx)("a",{ref:l,href:t,onClick:r,"data-active":u,className:m("block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main",u?"text-primary-500 font-medium":"text-text-muted",n),children:e})},$a=({style:e,className:t})=>(0,Te.jsx)("div",{className:m("absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300",t),style:e}),Xe={OnThisPageRoot:Oa,OnThisPageHeader:Va,OnThisPageContent:qn,OnThisPageList:Da,OnThisPageItem:Ha,OnThisPageLink:za,OnThisPageIndicator:$a}});var Kn,Ho,de,Fa,Wa,Ga,_a,ja,Fe,wr=L(()=>{"use strict";s();Kn=S(require("react-aria-components")),Ho=require("lucide-react");w();de=require("react/jsx-runtime"),Fa=({children:e,className:t})=>(0,de.jsx)("nav",{className:m("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),Wa=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,de.jsxs)(Kn.Link,{href:t,className:m("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",n?"text-right justify-end":"text-left justify-start",r),children:[!n&&(0,de.jsx)(Ho.ChevronLeft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),(0,de.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&(0,de.jsx)(Ho.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Ga=({children:e,className:t})=>(0,de.jsx)("span",{className:m("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),_a=({children:e,className:t})=>(0,de.jsx)("span",{className:m("text-base font-bold text-text-main truncate",t),children:e}),ja=({children:e})=>(0,de.jsx)(de.Fragment,{children:e}),Fe={PageNavRoot:Fa,PageNavLink:Object.assign(Wa,{Title:Ga,Description:_a,Icon:ja})}});var ft,Ua,qa,Ka,Xa,Ja,Tr,Lr=L(()=>{"use strict";s();w();ft=require("react/jsx-runtime"),Ua=({children:e,className:t="",...o})=>(0,ft.jsx)("div",{className:m("w-full",t),...o,children:e}),qa=({children:e,className:t=""})=>(0,ft.jsx)("div",{role:"tablist",className:m("relative flex flex-row items-center border-b border-border-subtle",t),children:e}),Ka=({children:e,id:t,selected:o,className:r="",...n})=>(0,ft.jsx)("button",{role:"tab","aria-selected":o,className:m("flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none",o?"text-primary-500":"text-text-muted hover:text-text-main",r),...n,children:e}),Xa=({children:e,className:t=""})=>(0,ft.jsx)("div",{className:m("p-4 outline-none",t),children:e}),Ja=({className:e="",style:t})=>(0,ft.jsx)("div",{className:m("absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300",e),style:t}),Tr={TabsRoot:Ua,TabsList:qa,TabsItem:Ka,TabsContent:Xa,TabsIndicator:Ja}});var Xn,Jn,j,Ya,Za,Qa,ei,ti,gt,kr=L(()=>{"use strict";s();Qe();Xn=S(require("react-aria-components")),Jn=require("lucide-react");w();j=require("react/jsx-runtime"),Ya=({badge:e})=>{let t={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 e=="object"&&e?.expires){let r=new Date(e.expires),n=new Date,a=r.getTime()-n.getTime();if(Math.ceil(a/(1e3*60*60*24))===0)return null}let o=typeof e=="string"?e:e?.text;return(0,j.jsx)("span",{className:m("ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap",t[o]||t.new),children:o})},Za=({children:e,className:t})=>(0,j.jsx)("aside",{className:m("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",t),children:(0,j.jsx)("nav",{className:"flex-1 space-y-6",children:e})}),Qa=({children:e,title:t,icon:o,isOpen:r=!0,onToggle:n,className:a})=>(0,j.jsxs)("div",{className:m("space-y-1",a),children:[t&&(0,j.jsxs)(Xn.Button,{onPress:n,className:m("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,j.jsxs)("div",{className:"flex items-center gap-2",children:[o&&(0,j.jsx)(o,{size:14}),t]}),(0,j.jsx)(Jn.ChevronRight,{size:14,className:m("transition-transform duration-200",r&&"rotate-90")})]}),r&&(0,j.jsx)("div",{className:"space-y-0.5",children:e})]}),ei=({children:e,className:t})=>(0,j.jsx)("div",{className:m(t),children:e}),ti=({label:e,href:t,active:o,icon:r,badge:n,className:a})=>(0,j.jsxs)(K,{href:t,className:m("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",o?"bg-primary-500/10 text-primary-500 font-medium":"text-text-muted hover:bg-bg-surface hover:text-text-main hover:translate-x-1",a),children:[r&&(0,j.jsx)(r,{size:16,className:m(o?"text-primary-500":"text-text-muted group-hover:text-text-main")}),(0,j.jsx)("span",{className:"truncate",children:e}),n&&(0,j.jsx)(Ya,{badge:n})]}),gt={SidebarRoot:Za,SidebarGroup:Qa,SidebarGroupItem:ei,SidebarLink:ti}});var bt,Yn,Vt,Zn,Sr,Ar,Qn,Br=L(()=>{"use strict";s();bt=require("react-aria-components"),Yn=require("lucide-react");w();Vt=require("react/jsx-runtime"),Zn=({children:e,className:t,...o})=>(0,Vt.jsx)(bt.Breadcrumbs,{className:m("flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted",t),...o,children:e}),Sr=({children:e,className:t,...o})=>(0,Vt.jsx)(bt.Breadcrumb,{className:m("flex items-center mb-0 gap-1.5",t),...o,children:e}),Ar=({children:e,href:t,className:o,...r})=>(0,Vt.jsx)(bt.Link,{href:t,className:m("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",o),...r,children:e}),Qn=({className:e})=>(0,Vt.jsx)(Yn.ChevronRight,{size:14,className:m("shrink-0 text-text-dim",e)})});var ts,es,os=L(()=>{"use strict";s();w();ts=require("react/jsx-runtime"),es=({children:e,className:t,vertical:o=!1})=>(0,ts.jsx)("div",{className:m("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e})});var xt,ht,Ir,Mr=L(()=>{"use strict";"use client";s();xt=S(require("react-aria-components"));w();ht=require("react/jsx-runtime"),Ir=({children:e,className:t,showArrow:o,...r})=>(0,ht.jsxs)(xt.Popover,{offset:8,...r,className:xt.composeRenderProps(t,n=>m("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none",n)),children:[o&&(0,ht.jsx)(xt.OverlayArrow,{className:"group",children:(0,ht.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,ht.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]})});function Dt(e){let[t,o]=Er.default.Children.toArray(e.children).slice(0,2);return(0,H.jsxs)(z.MenuTrigger,{...e,children:[t,(0,H.jsx)(Ir,{placement:e.placement,className:"min-w-35",children:o})]})}function oi(e){let[t,o]=Er.default.Children.toArray(e.children).slice(0,2);return(0,H.jsxs)(z.SubmenuTrigger,{...e,children:[t,(0,H.jsx)(Ir,{offset:-4,crossOffset:-4,children:o})]})}function Ht(e){return(0,H.jsx)(z.Menu,{...e,className:z.composeRenderProps(e.className,t=>m("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function We(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,H.jsx)(z.MenuItem,{...e,textValue:t,className:z.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:a})=>m("group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none","text-text-main text-[12px]",{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":r,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":a},o)),children:z.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:a})=>(0,H.jsxs)(H.Fragment,{children:[r!=="none"&&(0,H.jsxs)("span",{className:"flex items-center size-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,H.jsx)(vt.Check,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,H.jsx)(vt.Dot,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,H.jsx)("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:o}),a&&(0,H.jsx)(vt.ChevronRight,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function ri({title:e,...t}){return(0,H.jsxs)(z.MenuSection,{...t,className:m("flex flex-col gap-0.5",t.className),children:[e&&(0,H.jsx)(z.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),(0,H.jsx)(z.Collection,{items:t.items,children:t.children})]})}function ni(e){return(0,H.jsx)(z.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}var vt,Er,z,H,Ie,zo=L(()=>{"use strict";"use client";s();vt=require("lucide-react"),Er=S(require("react")),z=S(require("react-aria-components"));Mr();w();H=require("react/jsx-runtime");Ie={Root:Ht,Item:We,Trigger:Dt,SubTrigger:oi,Section:ri,Separator:ni}});function U({className:e,variant:t="rect",...o}){return(0,rs.jsx)("div",{className:m("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}var rs,Or=L(()=>{"use strict";s();w();rs=require("react/jsx-runtime")});var ut,Oo=L(()=>{"use strict";s();Eo();Hn();Cr();Nr();wr();Lr();kr();Br();Yt();os();zo();Mr();ar();Qe();Or();ut=require("react-aria-components");w()});function bs(e){let{currentLocale:t,currentVersion:o}=A(),[r,n]=(0,_e.useState)(!1),[a,i]=(0,_e.useState)(""),[c,l]=(0,_e.useState)(null);(0,_e.useEffect)(()=>{if(!r||c)return;let d=new gs.Index({preset:"match",tokenize:"full",resolution:9,cache:!0});for(let p of Hr.default)d.add(p.id,`${p.title} ${p.content}`);l(d)},[r,c]);let u=(0,_e.useMemo)(()=>{if(!a)return e.filter(h=>{let x=!t||h.locale===t,v=!o||h.version===o;return x&&v}).slice(0,10).map(h=>({id:h.path,title:h.title,path:h.path,bio:h.description||"",groupTitle:h.groupTitle}));if(!c)return[];let d=c.search(a,{limit:20,suggest:!0}),p=[],f=new Set;for(let h of d){let x=Hr.default.find(k=>k.id===h);if(!x)continue;let v=!t||x.locale===t,b=!o||x.version===o;!v||!b||f.has(x.url)||(f.add(x.url),p.push({id:x.url,title:x.title,path:x.url,bio:x.display,groupTitle:x.display.split(" > ")[0],isHeading:x.url.includes("#")}))}return p.slice(0,10)},[a,c,t,o,e]);return{isOpen:r,setIsOpen:n,query:a,setQuery:i,list:u,input:{value:a,onChange:d=>i(d.target.value)}}}var _e,gs,Hr,zr=L(()=>{"use strict";s();_e=require("react"),gs=require("flexsearch");ee();Hr=S(require("virtual:boltdocs-search"))});var Vs={};Yo(Vs,{SearchDialog:()=>xi});function xi({routes:e}){let{isOpen:t,setIsOpen:o,query:r,setQuery:n,list:a}=bs(e),i=(0,Os.useNavigate)();(0,Go.useEffect)(()=>{let l=u=>{(/Mac/.test(navigator.userAgent)?u.metaKey:u.ctrlKey)&&(u.key==="k"||u.key==="j")&&(u.preventDefault(),o(f=>!f))};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[o]);let c=(0,Go.useCallback)(l=>{let u=String(l);if(o(!1),u.includes("#")){let[d,p]=u.split("#");i(d),setTimeout(()=>{let f=document.getElementById(p);f&&f.scrollIntoView({behavior:"smooth"})},100)}else i(u)},[i,o]);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(X.SearchTrigger,{onPress:()=>o(!0)}),(0,Y.jsx)(ur,{isOpen:t,onOpenChange:o,children:(0,Y.jsxs)(fr,{onSelectionChange:c,children:[(0,Y.jsx)(gr,{value:r,onChange:l=>n(l.target.value)}),(0,Y.jsx)(br,{items:a,children:l=>(0,Y.jsxs)(hr,{onPress:()=>c(l.id),textValue:l.title,children:[(0,Y.jsx)(xr,{isHeading:l.isHeading}),(0,Y.jsxs)("div",{className:"flex flex-col justify-center gap-0.5",children:[(0,Y.jsx)(vr,{children:l.title}),(0,Y.jsx)(yr,{children:l.bio})]})]},l.id)})]})})]})}var Go,Os,Y,Ds=L(()=>{"use strict";s();Go=require("react");zr();Cr();Eo();Os=require("react-router-dom"),Y=require("react/jsx-runtime")});var Ti={};Yo(Ti,{Admonition:()=>ve,Badge:()=>po,Breadcrumbs:()=>Xo,Button:()=>Zt,Card:()=>fo,Cards:()=>uo,Caution:()=>Co,CodeBlock:()=>Pe,ComponentPreview:()=>Io,ComponentProps:()=>Bo,CopyMarkdown:()=>yt,Danger:()=>xo,DefaultLayout:()=>qs,DocsLayout:()=>Ue,ErrorBoundary:()=>Tt,Field:()=>ko,FileTree:()=>To,Head:()=>Ko,Image:()=>Ao,Important:()=>yo,InfoBox:()=>vo,Link:()=>So,List:()=>No,Loading:()=>$o,Navbar:()=>jo,NotFound:()=>St,Note:()=>go,OnThisPage:()=>qo,PageNav:()=>Jo,Sidebar:()=>Uo,Tab:()=>lo,Table:()=>Lo,Tabs:()=>co,Tip:()=>bo,Video:()=>mo,Warning:()=>ho,createBoltdocsApp:()=>ms,defineSandbox:()=>nr,embedSandbox:()=>xn,openSandbox:()=>eo,useConfig:()=>F,useMdxComponents:()=>et,useRoutes:()=>A,useTheme:()=>De});module.exports=ea(Ti);s();s();var J=S(require("react")),is=S(require("react-dom/client")),fe=require("react-router-dom");s();var Jr=require("lucide-react");Qe();var Ae=require("react/jsx-runtime");function St(){return(0,Ae.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,Ae.jsxs)("div",{className:"space-y-4",children:[(0,Ae.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,Ae.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,Ae.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,Ae.jsxs)(K,{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,Ae.jsx)(Jr.ArrowLeft,{size:16})," Go to Home"]})]})})}s();var be=require("react"),Qr=require("react/jsx-runtime"),Yr=(0,be.createContext)(void 0);function Zr({children:e}){let[t,o]=(0,be.useState)("system"),[r,n]=(0,be.useState)("dark"),[a,i]=(0,be.useState)(!1);(0,be.useEffect)(()=>{i(!0);let l=localStorage.getItem("boltdocs-theme"),u=l==="light"||l==="dark"||l==="system"?l:"system";o(u);let d=window.matchMedia("(prefers-color-scheme: dark)");((h,x)=>{n(h==="system"?x?"dark":"light":h)})(u,d.matches);let f=h=>{n(x=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?h.matches?"dark":"light":x)};return d.addEventListener("change",f),()=>d.removeEventListener("change",f)},[]),(0,be.useEffect)(()=>{if(!a)return;let l=window.matchMedia("(prefers-color-scheme: dark)").matches,u=t==="system"?l?"dark":"light":t;n(u);let d=document.documentElement;u==="light"?(d.classList.add("theme-light"),d.dataset.theme="light"):(d.classList.remove("theme-light"),d.dataset.theme="dark")},[t,a]);let c=l=>{o(l),localStorage.setItem("boltdocs-theme",l)};return(0,Qr.jsx)(Yr.Provider,{value:{theme:t,resolvedTheme:r,setTheme:c},children:e})}function De(){let e=(0,be.use)(Yr);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var Dr=S(require("virtual:boltdocs-layout"));_t();s();var en=require("react"),tn=require("react-aria-components"),qt=require("react-router-dom"),rn=require("react/jsx-runtime");function on({children:e}){let t=(0,qt.useNavigate)();return(0,rn.jsx)(tn.RouterProvider,{navigate:(o,r)=>{(0,en.startTransition)(()=>{t(o,r)})},useHref:qt.useHref,children:e})}ge();s();var nn=require("react"),sn=require("react-router-dom");function an(){let{pathname:e,hash:t}=(0,sn.useLocation)();return(0,nn.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content")||window,r=()=>o===window?window.scrollY:o.scrollTop,n=(a,i="auto")=>{o===window?window.scrollTo({top:a,behavior:i}):o.scrollTo({top:a,behavior:i})};if(t){let a=t.replace("#",""),i=document.getElementById(a);if(i){let l=o===window?0:o.getBoundingClientRect().top,p=i.getBoundingClientRect().top-l-80+r();n(p,"smooth");return}}n(0)},[e,t]),null}s();var ln=require("react-router-dom"),cn=S(require("virtual:boltdocs-layout")),tr=require("react/jsx-runtime");function mn(){return(0,tr.jsx)(cn.default,{children:(0,tr.jsx)(ln.Outlet,{})})}s();var fn=require("@mdx-js/react");s();var Kt=require("react"),un=require("react/jsx-runtime"),pn=(0,Kt.createContext)({});function et(){return(0,Kt.use)(pn)}function dn({components:e,children:t}){return(0,un.jsx)(pn.Provider,{value:e,children:t})}var or=require("react/jsx-runtime");function gn({Component:e}){let t=et();return(0,or.jsx)(fn.MDXProvider,{components:t,children:(0,or.jsx)(e,{})})}s();var ss=require("lucide-react");var Vr={};Yo(Vr,{Admonition:()=>ve,Badge:()=>po,Button:()=>Zt,Card:()=>fo,Cards:()=>uo,Caution:()=>Co,CodeBlock:()=>Pe,ComponentPreview:()=>Io,ComponentProps:()=>Bo,CopyMarkdown:()=>yt,Danger:()=>xo,Field:()=>ko,FileTree:()=>To,Image:()=>Ao,Important:()=>yo,InfoBox:()=>vo,Link:()=>So,List:()=>No,Note:()=>go,Tab:()=>lo,Table:()=>Lo,Tabs:()=>co,Tip:()=>bo,Video:()=>mo,Warning:()=>ho});s();s();Yt();w();var hn=require("react/jsx-runtime"),Zt=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:a,...i})=>(0,hn.jsx)(Re,{className:m("group",Xt({variant:t,size:o,rounded:r,iconSize:n,disabled:a,className:e})),...i});s();var io=S(require("react-aria-components")),at=require("lucide-react");w();s();ge();s();var Qt=require("codesandbox/lib/api/define.js");function rr(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",a=e.description||"Generic Sandbox",i={};for(let[c,l]of Object.entries(t)){let u=typeof l.content=="object"?JSON.stringify(l.content,null,2):l.content;i[c]={content:u,isBinary:l.isBinary??!1}}if(!i["package.json"]){let l=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};i["package.json"]={content:JSON.stringify({private:!0,name:n,description:a,type:"module",version:"1.0.0",scripts:e.scripts||l,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return i}function nr(e){let t=rr(e),o=(0,Qt.getParameters)({files:t}),r=new URLSearchParams({parameters:o,installDependencies:"true"});return e.entry&&r.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${r.toString()}`,options:e}}function eo(e){if(typeof window>"u")return nr(e);let t=rr(e),o=(0,Qt.getParameters)({files:t}),r=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let a=(c,l)=>{let u=document.createElement("input");u.type="hidden",u.name=c,u.value=l,n.appendChild(u)},i=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return a("query",i.toString()),a("parameters",o),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${o}`,options:e}}function xn(e){let t=rr(e),o=(0,Qt.getParameters)({files:t}),r=e.embed||{},n=new URLSearchParams({parameters:o,embed:"1"});return r.view&&n.set("view",r.view),r.theme&&n.set("theme",r.theme),r.hideNavigation&&n.set("hidenavigation","1"),e.entry&&n.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${n.toString()}`,options:e}}s();var vn=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}};var xe=require("react");function yn(e){let{title:t,sandbox:o}=e,[r,n]=(0,xe.useState)(!1),[a,i]=(0,xe.useState)(!1),[c,l]=(0,xe.useState)(!1),u=(0,xe.useRef)(null),d=F(),p=(0,xe.useCallback)(async()=>{let h=u.current?.textContent??"";vn(h),n(!0),setTimeout(()=>n(!1),2e3)},[]),f=(0,xe.useCallback)(()=>{let h=u.current?.textContent??"",x=d?.integrations?.sandbox?.config||{},v=typeof o=="object"?o:x,b=v.entry||"src/App.tsx";eo({title:t??"Code Snippet",...v,files:{...v.files,[b]:{content:h}}})},[t,d,o]);return(0,xe.useEffect)(()=>{let h=u.current?.textContent?.length??0;l(h>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:a,setIsExpanded:i,isExpandable:c,preRef:u,handleCopy:p,handleSandbox:f,shouldTruncate:c&&!a}}ge();At();ar();var $=require("react/jsx-runtime"),na={ts:oo,tsx:tt,js:ro,jsx:tt,json:no,css:so,html:ao,md:ot,mdx:ot,bash:rt,sh:rt,yaml:nt,yml:nt};function Pe(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:a,title:i,"data-lang":c,plain:l=!1,...u}=e,f=!!F()?.integrations?.sandbox?.enable&&!r,h=e.lang||c||"",{copied:x,isExpanded:v,setIsExpanded:b,isExpandable:k,preRef:R,handleCopy:Q,handleSandbox:le,shouldTruncate:G}=yn(e),qe=na[h];return(0,$.jsxs)("div",{className:m("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!l,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":G},e.className),children:[i&&(0,$.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted",children:[qe?(0,$.jsx)(qe,{size:14}):(0,$.jsx)(at.File,{size:14,className:"opacity-60"}),(0,$.jsx)("span",{children:i})]}),(0,$.jsxs)("div",{className:"absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100",children:[f&&(0,$.jsx)(sr,{content:"Open in CodeSandbox",children:(0,$.jsx)(io.Button,{onPress:le,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:(0,$.jsx)(Pn,{size:20})})}),!n&&(0,$.jsx)(sr,{content:x?"Copied!":"Copy code",children:(0,$.jsx)(io.Button,{onPress:Q,className:m("grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2",x?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:x?(0,$.jsx)(at.Check,{size:20}):(0,$.jsx)(at.Copy,{size:20})})})]}),a?(0,$.jsx)("div",{ref:R,className:"shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!",dangerouslySetInnerHTML:{__html:a}}):(0,$.jsx)("pre",{ref:R,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...u,children:t}),k&&(0,$.jsx)("div",{className:m(G?"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,$.jsx)(io.Button,{onPress:()=>b(!v),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:v?"Show less":"Expand code"})})]})}s();var it=require("react"),He=S(require("react-aria-components"));s();var Be=require("react");function wn({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(u=>!u.props.disabled):e,[r,n]=(0,Be.useState)(o===-1?0:o),a=(0,Be.useRef)([]),[i,c]=(0,Be.useState)({opacity:0,transform:"translateX(0)",width:0});(0,Be.useEffect)(()=>{let u=a.current[r];u&&c({opacity:1,width:u.offsetWidth,transform:`translateX(${u.offsetLeft}px)`})},[r,t]);let l=(0,Be.useCallback)(u=>{let d=0;if(u.key==="ArrowRight"?d=1:u.key==="ArrowLeft"&&(d=-1),d!==0){let p=(r+d+t.length)%t.length;for(;t[p].props.disabled&&p!==r;)p=(p+d+t.length)%t.length;p!==r&&!t[p].props.disabled&&(n(p),a.current[p]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:a,indicatorStyle:i,handleKeyDown:l}}w();var ir=require("class-variance-authority"),ne=require("react/jsx-runtime"),sa=(0,ir.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"}}),aa=(0,ir.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 lo({children:e}){let t=typeof e=="string"?(0,ne.jsx)(Pe,{className:"language-bash",children:(0,ne.jsx)("code",{children:e.trim()})}):e;return(0,ne.jsx)("div",{className:"py-4",children:t})}function co({defaultIndex:e=0,children:t}){let o=(0,it.useMemo)(()=>it.Children.toArray(t).filter(c=>(0,it.isValidElement)(c)&&c.props?.label),[t]),{active:r,setActive:n,tabRefs:a,indicatorStyle:i}=wn({initialIndex:e,tabs:o});return(0,ne.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,ne.jsxs)(He.Tabs,{selectedKey:r.toString(),onSelectionChange:c=>n(Number(c)),className:"w-full",children:[(0,ne.jsxs)(He.TabList,{"aria-label":"Content Tabs",className:m(sa()),children:[o.map((c,l)=>{let{label:u,icon:d,disabled:p}=c.props,f=l.toString();return(0,ne.jsxs)(He.Tab,{id:f,isDisabled:p,ref:h=>{a.current[l]=h},className:({isSelected:h,isDisabled:x})=>m(aa({isActive:h,isDisabled:x})),children:[!!d&&(0,ne.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:d}),(0,ne.jsx)("span",{children:u})]},f)}),(0,ne.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:i,"aria-hidden":"true"})]}),o.map((c,l)=>(0,ne.jsx)(He.TabPanel,{id:l.toString(),children:o[l]},l))]})})}s();var lt=require("react"),Bt=require("react/jsx-runtime");function mo({src:e,poster:t,alt:o,children:r,controls:n,preload:a="metadata",...i}){let c=(0,lt.useRef)(null),[l,u]=(0,lt.useState)(!1);return(0,lt.useEffect)(()=>{let d=c.current;if(!d)return;let p=new IntersectionObserver(([f])=>{f.isIntersecting&&(u(!0),p.disconnect())},{rootMargin:"200px"});return p.observe(d),()=>p.disconnect()},[]),(0,Bt.jsx)("div",{ref:c,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:l?(0,Bt.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...i,children:[r,"Your browser does not support the video tag."]}):(0,Bt.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}s();w();var Tn=require("class-variance-authority"),Ln=require("react/jsx-runtime"),ia=(0,Tn.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight",{variants:{variant:{default:"bg-bg-surface text-text-muted border-border-subtle",primary:"bg-primary-500/15 text-primary-400 border-primary-500/20",success:"bg-emerald-500/15 text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",danger:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-sky-500/15 text-sky-400 border-sky-500/20"}},defaultVariants:{variant:"default"}});function po({variant:e="default",children:t,className:o="",...r}){return(0,Ln.jsx)("span",{className:m(ia({variant:e}),o),...r,children:t})}s();var It=require("react"),kn=S(require("react-aria-components"));w();var Sn=require("class-variance-authority"),se=require("react/jsx-runtime"),la=(0,Sn.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 uo({cols:e=3,children:t,className:o="",...r}){return(0,se.jsx)("div",{className:m(la({cols:e}),o),...r,children:t})}function fo({title:e,icon:t,href:o,children:r,className:n="",...a}){let i=(0,It.useRef)(null),c=(0,It.useRef)(null),l=(0,It.useCallback)(p=>{let f=i.current||c.current;if(!f)return;let{left:h,top:x}=f.getBoundingClientRect();f.style.setProperty("--x",`${p.clientX-h}px`),f.style.setProperty("--y",`${p.clientY-x}px`)},[]),u=(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("div",{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)"}}),t&&(0,se.jsx)("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3",children:t}),(0,se.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,se.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,se.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),d=m("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return o?(0,se.jsx)(kn.Link,{ref:c,href:o,className:m(d,"no-underline cursor-pointer"),onMouseMove:l,...a,children:u}):(0,se.jsx)("div",{ref:i,role:"presentation",className:d,onMouseMove:l,...a,children:u})}s();var oe=require("lucide-react");w();var Bn=require("class-variance-authority"),D=require("react/jsx-runtime"),ca={note:(0,D.jsx)(oe.Bookmark,{size:18}),tip:(0,D.jsx)(oe.Lightbulb,{size:18}),info:(0,D.jsx)(oe.Info,{size:18}),warning:(0,D.jsx)(oe.AlertTriangle,{size:18}),danger:(0,D.jsx)(oe.ShieldAlert,{size:18}),important:(0,D.jsx)(oe.Flame,{size:18}),caution:(0,D.jsx)(oe.Zap,{size:18})},ma={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},An=(0,Bn.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 ve({type:e="note",title:t,children:o,className:r="",...n}){return(0,D.jsxs)("div",{className:m(An({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,D.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,D.jsx)("span",{className:m("shrink-0",An({type:e})),children:ca[e]}),(0,D.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||ma[e]})]}),(0,D.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var go=e=>(0,D.jsx)(ve,{type:"note",...e}),bo=e=>(0,D.jsx)(ve,{type:"tip",...e}),ho=e=>(0,D.jsx)(ve,{type:"warning",...e}),xo=e=>(0,D.jsx)(ve,{type:"danger",...e}),vo=e=>(0,D.jsx)(ve,{type:"info",...e}),yo=e=>(0,D.jsx)(ve,{type:"important",...e}),Co=e=>(0,D.jsx)(ve,{type:"caution",...e});s();var Ro=require("react"),ct=require("lucide-react");w();var Po=require("class-variance-authority"),ye=require("react/jsx-runtime"),pa=(0,Po.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}}),da=(0,Po.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}}),ua=(0,Po.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 fa({icon:e,children:t,variant:o,dense:r}){return(0,ye.jsxs)("li",{className:m(da({variant:o,dense:r})),children:[e&&(0,ye.jsx)("span",{className:m(ua({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,ye.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var ga={checked:e=>(0,ye.jsx)(ct.Check,{size:14,className:m("text-emerald-500 shrink-0",e)}),arrow:e=>(0,ye.jsx)(ct.ChevronRight,{size:14,className:m("text-primary-400 shrink-0",e)}),bubble:e=>(0,ye.jsx)(ct.Circle,{size:6,fill:"currentColor",className:m("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function No({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...a}){let i=t!==void 0&&Number(t)>1,c=ga[e],l=pa({variant:e,cols:t,dense:o,isGrid:i,className:n}),u=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,ye.jsx)(u,{className:l,...a,children:r}):(0,ye.jsx)("ul",{className:l,...a,children:Ro.Children.map(r,d=>{if(!(0,Ro.isValidElement)(d))return d;let p=d,f=p.type==="li"?p.props.children:p.props.children||d;return(0,ye.jsx)(fa,{icon:c(),variant:e,dense:o,children:f})})})}s();var Ne=require("react"),we=S(require("react-aria-components")),pe=require("lucide-react");w();At();var E=require("react/jsx-runtime"),mt=16,Mt=2,ba={ts:oo,tsx:tt,js:ro,jsx:tt,json:no,css:so,html:ao,md:ot,mdx:ot,bash:rt,sh:rt,yaml:nt,yml:nt},lr={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 mr(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(mr).join(""):(0,Ne.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?mr(e.props.children):""}function ha(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,E.jsx)(pe.Folder,{size:mt,strokeWidth:Mt,className:m(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=o.split(".").pop()||"",a=ba[n];if(a)return(0,E.jsx)(a,{size:mt});let i=m(r,"text-text-dim group-hover:text-text-main");return lr.CODE.test(o)?(0,E.jsx)(pe.FileCode,{size:mt,strokeWidth:Mt,className:i}):lr.TEXT.test(o)?(0,E.jsx)(pe.FileText,{size:mt,strokeWidth:Mt,className:i}):lr.IMAGE.test(o)?(0,E.jsx)(pe.FileImage,{size:mt,strokeWidth:Mt,className:i}):(0,E.jsx)(pe.File,{size:mt,strokeWidth:Mt,className:i})}function cr(e,t){if(!(0,Ne.isValidElement)(e))return!1;let o=e.type;if(typeof o=="string")return o===t;if(typeof o=="function")return o.name===t||o.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function xa(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function wo(e,t="root"){if(!(0,Ne.isValidElement)(e))return[];let o=[];if(cr(e,"ul"))return Ne.Children.forEach(e.props.children,(r,n)=>{o.push(...wo(r,`${t}-${n}`))}),o;if(cr(e,"li")){let r=Ne.Children.toArray(e.props.children),n=r.findIndex(x=>cr(x,"ul")),a=n!==-1,i=a?r.slice(0,n):r,c=a?r.slice(n):[],l=mr(i),{name:u,comment:d}=xa(l),p=u.endsWith("/"),f=p?u.slice(0,-1):u,h=a||p;return o.push({id:`${t}-${f}`,name:f,comment:d,isFolder:h,children:a?wo(c[0],`${t}-${f}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&Ne.Children.forEach(e.props.children,(r,n)=>{o.push(...wo(r,`${t}-${n}`))}),o}function In({item:e}){return(0,E.jsxs)(we.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[(0,E.jsx)(we.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,E.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,E.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,E.jsx)(we.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,E.jsx)(pe.ChevronRight,{size:14,strokeWidth:3,className:m("transition-transform duration-200",t&&"rotate-90")})}):(0,E.jsx)("div",{className:"w-[18px]"}),ha(e.name,e.isFolder),(0,E.jsx)("span",{className:m("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&(0,E.jsxs)("span",{className:"ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans",children:["//"," ",e.comment]})]})}),e.children&&(0,E.jsx)(we.Collection,{items:e.children,children:t=>(0,E.jsx)(In,{item:t})})]})}function To({children:e}){let t=(0,Ne.useMemo)(()=>wo(e),[e]);return(0,E.jsx)("div",{className:"my-8",children:(0,E.jsx)(we.Tree,{items:t,"aria-label":"File Tree",className:m("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:o=>(0,E.jsx)(In,{item:o})})})}s();var Et=S(require("react-aria-components"));s();var pt=require("react");function Mn({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,a]=(0,pt.useState)(null),[i,c]=(0,pt.useState)(1),l=(0,pt.useMemo)(()=>{if(!e)return[];let f=[...e];return t&&n!==null&&f.sort((h,x)=>{let v=h[n.key],b=x[n.key],k=typeof v=="string"?v:"",R=typeof b=="string"?b:"";return k<R?n.direction==="asc"?-1:1:k>R?n.direction==="asc"?1:-1:0}),f},[e,n,t]),u=Math.ceil(l.length/r),d=(0,pt.useMemo)(()=>{if(!o)return l;let f=(i-1)*r;return l.slice(f,f+r)},[l,o,i,r]);return{sortConfig:n,currentPage:i,setCurrentPage:c,totalPages:u,paginatedData:d,requestSort:f=>{if(!t)return;let h="asc";n&&n.key===f&&n.direction==="asc"&&(h="desc"),a({key:f,direction:h})}}}var ae=require("lucide-react");w();var T=require("react/jsx-runtime");function Lo({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:a=!1,pageSize:i=10}){let{sortConfig:c,currentPage:l,setCurrentPage:u,totalPages:d,paginatedData:p,requestSort:f}=Mn({data:t,sortable:n,paginated:a,pageSize:i}),h=v=>n?c?.key!==v?(0,T.jsx)(ae.ChevronDown,{size:14,className:"ml-1 opacity-30"}):c.direction==="asc"?(0,T.jsx)(ae.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,T.jsx)(ae.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,x=o||(0,T.jsxs)(T.Fragment,{children:[e&&(0,T.jsx)("thead",{children:(0,T.jsx)("tr",{children:e.map((v,b)=>(0,T.jsx)("th",{onClick:()=>f(b),className:m("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:(0,T.jsxs)("div",{className:"flex items-center",children:[v,h(b)]})},b))})}),p&&(0,T.jsx)("tbody",{children:p.map((v,b)=>(0,T.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:v.map((k,R)=>(0,T.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:k},R))},b))})]});return(0,T.jsxs)("div",{className:m("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[(0,T.jsx)("div",{className:"overflow-x-auto",children:(0,T.jsx)("table",{className:"w-full border-collapse text-sm",children:x})}),a&&d>1&&(0,T.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,T.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",l," of ",d]}),(0,T.jsxs)("div",{className:"flex items-center gap-1",children:[(0,T.jsx)(Et.Button,{onPress:()=>u(1),isDisabled:l===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,T.jsx)(ae.ChevronsLeft,{size:16})}),(0,T.jsx)(Et.Button,{onPress:()=>u(v=>Math.max(v-1,1)),isDisabled:l===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,T.jsx)(ae.ChevronLeft,{size:16})}),(0,T.jsx)(Et.Button,{onPress:()=>u(v=>Math.min(v+1,d)),isDisabled:l===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,T.jsx)(ae.ChevronRight,{size:16})}),(0,T.jsx)(Et.Button,{onPress:()=>u(d),isDisabled:l===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,T.jsx)(ae.ChevronsRight,{size:16})})]})]})]})}s();w();var ie=require("react/jsx-runtime");function ko({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:a,className:i=""}){return(0,ie.jsxs)("article",{className:m("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",i),id:a,children:[(0,ie.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,ie.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,ie.jsx)("code",{className:"inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors group-hover:bg-primary-500/15",children:e}),t&&(0,ie.jsx)("span",{className:"rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm",children:t}),r&&(0,ie.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,ie.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&(0,ie.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,ie.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,ie.jsx)("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),(0,ie.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}s();Qe();w();var En=require("react/jsx-runtime");function So({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=m("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,En.jsx)(K,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}s();var On=require("react/jsx-runtime");function Ao({src:e,alt:t,theme:o,...r}){let{theme:n}=De();return o&&o!==n?null:(0,On.jsx)("img",{src:e,alt:t||"",...r})}s();w();var M=require("react/jsx-runtime");function Bo({title:e,props:t,className:o=""}){return(0,M.jsxs)("div",{className:m("my-6",o),children:[e&&(0,M.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,M.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,M.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,M.jsx)("thead",{children:(0,M.jsxs)("tr",{children:[(0,M.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,M.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,M.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,M.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,M.jsx)("tbody",{children:t.map((r,n)=>(0,M.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,M.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,M.jsx)("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&(0,M.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,M.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,M.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,M.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,M.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,M.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,M.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}s();s();var pr=require("react");function Vn(e){let{code:t,children:o,preview:r}=e,n=(0,pr.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),a=(0,pr.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:a}}var dt=require("react/jsx-runtime");function Io(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:i,previewElement:c}=Vn(e);return(0,dt.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,dt.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:c}),!o&&(0,dt.jsx)("div",{className:"border-t border-border-subtle",children:(0,dt.jsx)(Pe,{hideSandbox:r,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,plain:!0,children:i})})]})}s();var ns=require("react"),Me=require("lucide-react");Oo();var W=require("react/jsx-runtime"),si=e=>{let[t,o]=(0,ns.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(a);window.open(i,"_blank")}}};function yt({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:i}=si(r),c=o!==!1,l=typeof o=="object"&&o.text||"Copy Markdown";return!c||!r?null:(0,W.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,W.jsxs)(es,{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,W.jsx)(Re,{variant:"ghost",onPress:a,icon:n?(0,W.jsx)(Me.Check,{size:16}):(0,W.jsx)(Me.Copy,{size:16}),iconPosition:"left",className:m("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":l}),(0,W.jsxs)(Dt,{placement:"bottom end",children:[(0,W.jsx)(Re,{variant:"ghost",isIconOnly:!0,icon:(0,W.jsx)(Me.ChevronDown,{size:14}),className:m("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),(0,W.jsxs)(Ht,{className:"w-52",children:[(0,W.jsxs)(We,{onAction:a,children:[(0,W.jsx)(Me.Copy,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,W.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,W.jsxs)(We,{onAction:i,children:[(0,W.jsx)(Me.ExternalLink,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,W.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}s();w();Or();var I=require("react/jsx-runtime");function $o(){return(0,I.jsx)("div",{className:m("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:(0,I.jsxs)("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[(0,I.jsxs)("div",{className:"flex gap-2",children:[(0,I.jsx)(U,{className:"h-3 w-16"}),(0,I.jsx)(U,{className:"h-3 w-24"})]}),(0,I.jsx)(U,{className:"h-10 w-[60%] sm:h-12"}),(0,I.jsxs)("div",{className:"space-y-3",children:[(0,I.jsx)(U,{className:"h-4 w-full"}),(0,I.jsx)(U,{className:"h-4 w-[95%]"}),(0,I.jsx)(U,{className:"h-4 w-[40%]"})]}),(0,I.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,I.jsx)(U,{className:"h-7 w-32"}),(0,I.jsxs)("div",{className:"space-y-3",children:[(0,I.jsx)(U,{className:"h-4 w-full"}),(0,I.jsx)(U,{className:"h-4 w-[98%]"}),(0,I.jsx)(U,{className:"h-4 w-[92%]"}),(0,I.jsx)(U,{className:"h-4 w-[60%]"})]})]}),(0,I.jsx)(U,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),(0,I.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,I.jsx)(U,{className:"h-7 w-48"}),(0,I.jsxs)("div",{className:"space-y-3",children:[(0,I.jsx)(U,{className:"h-4 w-full"}),(0,I.jsx)(U,{className:"h-4 w-[85%]"})]})]})]})})}var ue=require("react/jsx-runtime"),Ct=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return(0,ue.jsxs)(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&(0,ue.jsx)("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:(0,ue.jsx)(ss.Link,{size:16})})]})},as={...Vr,Loading:$o,h1:e=>(0,ue.jsx)(Ct,{level:1,...e}),h2:e=>(0,ue.jsx)(Ct,{level:2,...e}),h3:e=>(0,ue.jsx)(Ct,{level:3,...e}),h4:e=>(0,ue.jsx)(Ct,{level:4,...e}),h5:e=>(0,ue.jsx)(Ct,{level:5,...e}),h6:e=>(0,ue.jsx)(Ct,{level:6,...e}),pre:e=>(0,ue.jsx)(Pe,{...e,children:e.children})};var ls=S(require("virtual:boltdocs-mdx-components"));ee();var cs=require("react-router-dom");Lt();var P=require("react/jsx-runtime");function ai(){let{currentLocale:e,config:t}=A();return(0,J.useEffect)(()=>{if(!t.i18n)return;let o=t.i18n.localeConfigs?.[e];document.documentElement.lang=o?.htmlLang||e||"en",document.documentElement.dir=o?.direction||"ltr"},[e,t.i18n]),null}function ii(){let e=(0,cs.useLocation)(),{config:t}=A(),o=re(i=>i.setLocale),r=re(i=>i.setVersion),n=re(i=>i.currentLocale),a=re(i=>i.currentVersion);return(0,J.useEffect)(()=>{let i=e.pathname.split("/").filter(Boolean),c=0,l=t.versions?.defaultVersion,u=t.i18n?.defaultLocale;if(i[c]==="docs"&&c++,t.versions&&i.length>c){let d=t.versions.versions.find(p=>p.path===i[c]);d&&(l=d.path,c++)}t.i18n&&i.length>c&&t.i18n.locales[i[c]]?u=i[c]:t.i18n&&i.length===0&&(u=n||t.i18n.defaultLocale),u!==n&&o(u),l!==a&&r(l)},[e.pathname,t,o,r,n,a]),null}function li({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:a,externalPages:i,externalLayout:c,components:l={}}){let[u,d]=(0,J.useState)(e),[p,f]=(0,J.useState)(t),h=i||{},x=c||Dr.default,v=(0,J.useMemo)(()=>u.filter(R=>!(a&&(R.path==="/"||R.path===""))&&!h[R.path===""?"/":R.path]).map(R=>{let Q=Object.keys(r).find(G=>G===`/${o}/${R.filePath}`||G.endsWith(`/${o}/${R.filePath}`)||G.endsWith(`/${o}\\${R.filePath.replace(/\\/g,"/")}`)),le=Q?r[Q]:null;return{...R,Component:J.default.lazy(async()=>le?await le():{default:St})}}),[u,r,o,a,h]);(0,J.useEffect)(()=>{n&&(n.on("boltdocs:routes-update",R=>{d(R)}),n.on("boltdocs:config-update",R=>{f(R)}))},[n]);let b=(0,J.useMemo)(()=>({...as,...ls.default,...l}),[l]),k=b.Loading;return(0,P.jsx)(Zr,{children:(0,P.jsx)(dn,{components:b,children:(0,P.jsx)(Zo.Provider,{value:p,children:(0,P.jsx)(on,{children:(0,P.jsxs)(Wr,{routes:u,modules:r,children:[(0,P.jsx)(an,{}),(0,P.jsx)(ii,{}),(0,P.jsx)(ai,{}),(0,P.jsxs)(fe.Routes,{children:[(0,P.jsx)(fe.Route,{element:(0,P.jsx)(mn,{}),children:v.map(R=>(0,P.jsx)(fe.Route,{path:R.path===""?"/":R.path,element:(0,P.jsx)(J.default.Suspense,{fallback:(0,P.jsx)(k,{}),children:(0,P.jsx)(gn,{Component:R.Component})})},R.path))},"docs-layout"),a&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(fe.Route,{path:"/",element:(0,P.jsx)(x,{children:(0,P.jsx)(a,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(R=>(0,P.jsx)(fe.Route,{path:`/${R}`,element:(0,P.jsx)(x,{children:(0,P.jsx)(a,{})})},`home-${R}`))]}),Object.entries(h).map(([R,Q])=>{let le=R==="/"?"":R;return(0,P.jsxs)(J.default.Fragment,{children:[(0,P.jsx)(fe.Route,{path:R,element:(0,P.jsx)(x,{children:(0,P.jsx)(Q,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(G=>(0,P.jsx)(fe.Route,{path:`/${G}${le}`,element:(0,P.jsx)(x,{children:(0,P.jsx)(Q,{})})},`${R}-${G}`))]},R)}),(0,P.jsx)(fe.Route,{path:"*",element:(0,P.jsx)(Dr.default,{children:(0,P.jsx)(St,{})})})]})]})})})})})}function ms(e){let{target:t,routes:o,docsDirName:r,config:n,modules:a,hot:i,homePage:c,externalPages:l,externalLayout:u,components:d}=e,p=document.querySelector(t);if(!p)throw new Error(`[boltdocs] Mount target "${t}" not found in document.`);let f=(0,P.jsx)(J.default.StrictMode,{children:(0,P.jsx)(fe.BrowserRouter,{children:(0,P.jsx)(li,{initialRoutes:o,initialConfig:n,docsDirName:r,modules:a,hot:i,homePage:c,externalPages:l,externalLayout:u,components:d})})});p.innerHTML="",is.default.createRoot(p).render(f)}ge();ee();s();w();s();s();var ps=require("react-router-dom");ge();s();function Ge(e,t){return e?typeof e=="string"?e:t&&e[t]?e[t]:Object.values(e)[0]||"":""}ee();function ds(){let e=F(),{theme:t}=De(),o=(0,ps.useLocation)(),{currentLocale:r}=A(),n=e.theme||{},a=Ge(n.title,r)||"Boltdocs",i=n.navbar||[],c=n.socialLinks||[],l=n.githubRepo,u=i.map(x=>{let v=x.href||x.to||x.link||"",b=k=>{let R=o.pathname;if(R===k)return!0;if(!k||k==="/")return R==="/";let Q=qe=>{let ce=qe.split("/").filter(Boolean),Ke=0;return e.i18n?.locales&&ce[Ke]&&e.i18n.locales[ce[Ke]]&&Ke++,e.versions?.versions&&ce[Ke]&&e.versions.versions.some(Ks=>Ks.path===ce[Ke])&&Ke++,ce.slice(Ke)},le=Q(k),G=Q(R);return le.length===0?G.length===0:G.length<le.length?!1:le.every((qe,ce)=>G[ce]===qe)};return{label:Ge(x.label||x.text,r),href:v,active:b(v),to:v.startsWith("http")||v.startsWith("//")?"external":void 0}}),d=n.logo,p=d?typeof d=="string"?d:t==="dark"?d.dark:d.light:null,f={alt:(d&&typeof d=="object"?d.alt:void 0)||a,width:d&&typeof d=="object"?d.width:void 0,height:d&&typeof d=="object"?d.height:void 0},h=l?`https://github.com/${l}`:null;return{links:u,title:a,logo:p,logoProps:f,github:h,social:c,config:e,theme:t}}s();var us=require("react-router-dom");ge();function fs(e){let t=F(),o=(0,us.useLocation)(),r=p=>p.endsWith("/")&&p.length>1?p.slice(0,-1):p,n=r(o.pathname),a=e.find(p=>r(p.path)===n),i=a?.tab?.toLowerCase(),c=i?e.filter(p=>!p.tab||p.tab.toLowerCase()===i):e,l=[],u=new Map;for(let p of c)p.group?(u.has(p.group)||u.set(p.group,{slug:p.group,title:p.groupTitle||p.group,routes:[],icon:p.groupIcon}),u.get(p.group).routes.push(p)):l.push(p);return{groups:Array.from(u.values()),ungrouped:l,activeRoute:a,activePath:n,config:t}}zr();s();var hs=require("react");function xs(e=[]){let[t,o]=(0,hs.useState)(null);return{headings:e,activeId:t,setActiveId:o}}s();var vs=require("react-router-dom"),Rt=require("react");function ys(e=[],t=[]){let o=(0,vs.useLocation)(),r=(0,Rt.useRef)([]),[n,a]=(0,Rt.useState)({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),c=t.find(d=>d.path===o.pathname)?.tab?.toLowerCase(),l=e.findIndex(d=>d.id.toLowerCase()===c),u=l===-1?0:l;return(0,Rt.useEffect)(()=>{let d=r.current[u];d&&a({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[u,e.length,o.pathname]),{tabs:e,activeIndex:u,indicatorStyle:n,tabRefs:r,activeTabId:c}}s();var Cs=require("react-router-dom");s();function je(e,t,o){let r=e;return t&&(r===t||r.startsWith(t+"/"))&&(r=r===t?"index.md":r.slice(t.length+1)),o&&(r===o||r.startsWith(o+"/"))&&(r=r===o?"index.md":r.slice(o.length+1)),r}ee();Lt();function Rs(){let e=(0,Cs.useNavigate)(),t=A(),{allRoutes:o,currentRoute:r,currentVersion:n,currentLocale:a,config:i}=t,c=i.versions,l=re(p=>p.setVersion),u=p=>{if(!c||p===n)return;l(p);let f=`/docs/${p}`;if(r){let h=je(r.filePath,r.version,r.locale),x=o.find(v=>je(v.filePath,v.version,v.locale)===h&&(v.version||c.defaultVersion)===p&&(a?v.locale===a:!v.locale));if(x)f=x.path;else{let v=o.find(b=>je(b.filePath,b.version,b.locale)==="index.md"&&(b.version||c.defaultVersion)===p&&(a?b.locale===a:!b.locale));f=v?v.path:`/docs/${p}${a?`/${a}`:""}`}}e(f)},d=t.availableVersions.map(p=>({...p,label:p.label,value:p.key}));return{currentVersion:n,currentVersionLabel:t.currentVersionLabel,availableVersions:d,handleVersionChange:u}}s();var Ps=require("react-router-dom");ee();Lt();function Ns(){let e=(0,Ps.useNavigate)(),t=A(),{allRoutes:o,currentRoute:r,currentLocale:n,config:a}=t,i=a.i18n,c=re(f=>f.setLocale),l=f=>{if(!i||f===n)return;c(f);let h="/";if(r){let x=je(r.filePath,r.version,r.locale),v=o.find(b=>je(b.filePath,b.version,b.locale)===x&&(b.locale||i.defaultLocale)===f&&b.version===r.version);if(v)h=v.path;else{let b=o.find(k=>je(k.filePath,k.version,k.locale)==="index.md"&&(k.locale||i.defaultLocale)===f&&k.version===r.version);h=b?b.path:f===i.defaultLocale?r.version?`/${r.version}`:"/":r.version?`/${r.version}/${f}`:`/${f}`}}else{let x=o.find(v=>(v.filePath==="index.mdx"||v.filePath==="index.md")&&(v.locale||i.defaultLocale)===f&&!v.version);x?h=x.path:h=f===i.defaultLocale?"/":`/${f}`}e(h)},d=a.i18n?.localeConfigs?.[n]?.label||a.i18n?.locales[n]||n,p=a.i18n?Object.entries(a.i18n.locales).map(([f,h])=>{let x=a.i18n?.localeConfigs?.[f];return{key:f,label:x?.label||h,value:f,isCurrent:f===n}}):[];return{currentLocale:n,currentLocaleLabel:d,availableLocales:p,handleLocaleChange:l}}s();var ws=require("react-router-dom");ee();function Ts(){let{routes:e,currentRoute:t}=A(),o=(0,ws.useLocation)();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let r=t.tab?.toLowerCase(),n=r?e.filter(l=>l.tab?.toLowerCase()===r):e.filter(l=>!l.tab),a=n.findIndex(l=>l.path===o.pathname),i=a>0?n[a-1]:null,c=a!==-1&&a<n.length-1?n[a+1]:null;return{prevPage:i,nextPage:c,currentRoute:t}}s();ee();function Ls(){let{currentRoute:e}=A(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}ee();Ut();s();var ks=require("react-router-dom"),Ss=()=>(0,ks.useLocation)();var Je=require("react/jsx-runtime");function ci({children:e,className:t,style:o}){return(0,Je.jsx)("div",{className:m("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",t),style:o,children:e})}function mi({children:e,className:t,style:o}){return(0,Je.jsx)("div",{className:m("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",t),style:o,children:e})}function pi({children:e,className:t,style:o}){return(0,Je.jsx)("main",{className:m("boltdocs-content flex-1 min-w-0 overflow-y-auto","contain-layout",t),style:o,children:e})}function di({children:e,className:t,style:o}){let{pathname:r}=Ss();return(0,Je.jsx)("div",{className:m("boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8",{"max-w-content-max":r.includes("/docs/")},t),style:o,children:e})}function ui({children:e,className:t,style:o}){return(0,Je.jsx)("div",{className:m("flex items-center justify-between mb-10",t),style:o,children:e})}function fi({children:e,className:t,style:o}){return(0,Je.jsx)("div",{className:m("mt-20",t),style:o,children:e})}var Ue=Object.assign(ci,{Body:mi,Content:pi,ContentMdx:di,ContentHeader:ui,ContentFooter:fi});s();s();var _o=require("react");ee();Eo();s();var Fo=require("react"),Ee=require("lucide-react");var As=require("react-aria-components");zo();var q=require("react/jsx-runtime");function Bs(){let{theme:e,setTheme:t}=De(),[o,r]=(0,Fo.useState)(!1);return(0,Fo.useEffect)(()=>{r(!0)},[]),o?(0,q.jsxs)(Dt,{placement:"bottom right",children:[(0,q.jsx)(As.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,q.jsx)(e==="system"?Ee.Monitor:e==="dark"?Ee.Moon:Ee.Sun,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),(0,q.jsxs)(Ht,{selectionMode:"single",selectedKeys:[e],onSelectionChange:a=>{let i=Array.from(a)[0];t(i)},children:[(0,q.jsxs)(We,{id:"light",children:[(0,q.jsx)(Ee.Sun,{size:16}),(0,q.jsx)("span",{children:"Light"})]}),(0,q.jsxs)(We,{id:"dark",children:[(0,q.jsx)(Ee.Moon,{size:16}),(0,q.jsx)("span",{children:"Dark"})]}),(0,q.jsxs)(We,{id:"system",children:[(0,q.jsx)(Ee.Monitor,{size:16}),(0,q.jsx)("span",{children:"System"})]})]})]}):(0,q.jsx)("div",{className:"h-9 w-9"})}s();var Wo=require("react");s();var gi="https://api.github.com";async function Is(e,t,o=gi){let r=new Headers;t&&r.append("authorization",t);let a=await(await fetch(`${o}/repos/${e}`,{headers:r})).json();return a.stargazers_count!==void 0?bi(a.stargazers_count):"0"}var bi=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);At();var zt=require("react/jsx-runtime");function Ms({repo:e}){let[t,o]=(0,Wo.useState)(null);return(0,Wo.useEffect)(()=>{e&&Is(e).then(r=>o(r)).catch(()=>o("0"))},[e]),(0,zt.jsxs)("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:[(0,zt.jsx)(to,{className:"h-4 w-4"}),t&&(0,zt.jsx)("span",{className:"tabular-nums",children:t})]})}s();Lr();Qe();var hi=S(require("lucide-react"));ee();var Le=require("react/jsx-runtime");function Es({tabs:e,routes:t}){let{currentLocale:o}=A(),{indicatorStyle:r,tabRefs:n,activeIndex:a}=ys(e,t),i=c=>{if(!c)return null;if(c.trim().startsWith("<svg"))return(0,Le.jsx)("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:c}});let l=hi[c];return l?(0,Le.jsx)(l,{size:16}):(0,Le.jsx)("img",{src:c,alt:"",className:"h-4 w-4 object-contain"})};return(0,Le.jsx)("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:(0,Le.jsxs)(Tr.TabsList,{className:"border-none py-0",children:[e.map((c,l)=>{let u=l===a,d=t.find(f=>f.tab&&f.tab.toLowerCase()===c.id.toLowerCase()),p=d?d.path:"#";return(0,Le.jsxs)(K,{href:p,ref:f=>{n.current[l]=f},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${u?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[i(c.icon),(0,Le.jsx)("span",{children:Ge(c.text,o)})]},c.id)}),(0,Le.jsx)(Tr.TabsIndicator,{style:r})]})})}var Hs=require("react-router-dom");zo();Yt();var $t=require("lucide-react");Ut();var C=require("react/jsx-runtime"),vi=(0,_o.lazy)(()=>Promise.resolve().then(()=>(Ds(),Vs)).then(e=>({default:e.SearchDialog})));function jo(){let{links:e,title:t,logo:o,logoProps:r,github:n,social:a,config:i}=ds(),{routes:c,allRoutes:l,currentVersion:u,currentLocale:d}=A(),{pathname:p}=(0,Hs.useLocation)(),f=i.theme||{},h=p.startsWith("/docs"),x=f?.tabs&&f.tabs.length>0;return(0,C.jsxs)(X.NavbarRoot,{className:x?"border-b-0":"",children:[(0,C.jsxs)(X.Content,{children:[(0,C.jsxs)(X.NavbarLeft,{children:[o&&(0,C.jsx)(X.NavbarLogo,{src:o,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),(0,C.jsx)(X.Title,{children:t}),i.versions&&u&&(0,C.jsx)(Ci,{})]}),(0,C.jsx)(X.NavbarCenter,{children:(0,C.jsx)(_o.Suspense,{fallback:(0,C.jsx)("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:(0,C.jsx)(vi,{routes:c||[]})})}),(0,C.jsxs)(X.NavbarRight,{children:[(0,C.jsx)(X.Links,{children:e.map(v=>(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(yi,{link:v},v.href)}))}),i.i18n&&d&&(0,C.jsx)(Ri,{}),(0,C.jsx)(X.Split,{}),(0,C.jsx)(Bs,{}),n&&(0,C.jsx)(Ms,{repo:f?.githubRepo??""}),a.length>0&&(0,C.jsx)(X.Split,{}),(0,C.jsx)("div",{className:"flex items-center gap-1",children:a.map(({icon:v,link:b})=>(0,C.jsx)(X.Socials,{icon:v,link:b,className:"p-1.5"},b))})]})]}),h&&x&&f?.tabs&&(0,C.jsx)("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:(0,C.jsx)(Es,{tabs:f.tabs,routes:l||c||[]})})]})}function yi({link:e}){let t=kt(e.href||"");return(0,C.jsx)(X.Link,{...e,href:t})}function Ci(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:o}=Rs();return t.length===0?null:(0,C.jsxs)(Ie.Trigger,{children:[(0,C.jsx)(Re,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:(0,C.jsx)($t.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,C.jsx)("span",{className:"font-semibold text-[0.8125rem]",children:e})}),(0,C.jsx)(Ie.Root,{children:(0,C.jsx)(Ie.Section,{items:t,children:r=>(0,C.jsx)(Ie.Item,{onPress:()=>o(r.value),children:r.label},`${r.value??""}`)})})]})}function Ri(){let{currentLocale:e,availableLocales:t,handleLocaleChange:o}=Ns();return t.length===0?null:(0,C.jsxs)(Ie.Trigger,{children:[(0,C.jsx)(Re,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:(0,C.jsx)($t.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,C.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,C.jsx)($t.Languages,{className:"w-3.5 h-3.5 text-primary-500"}),(0,C.jsx)("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),(0,C.jsx)(Ie.Root,{children:(0,C.jsx)(Ie.Section,{items:t,children:r=>(0,C.jsx)(Ie.Item,{onPress:()=>o(r.value),children:(0,C.jsxs)("div",{className:"flex items-center justify-between w-full gap-4",children:[(0,C.jsx)("span",{children:r.label}),(0,C.jsx)("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:r.value})]})},`${r.value??""}`)})})]})}s();var Pt=require("react");kr();s();var zs=require("lucide-react"),Ye=require("react/jsx-runtime");function $s(){return(0,Ye.jsx)("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:(0,Ye.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,Ye.jsx)(zs.Zap,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),(0,Ye.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,Ye.jsx)("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}var Pi=S(require("lucide-react")),ke=require("react/jsx-runtime");function Fs(e){return e&&Pi[e]||void 0}function Ni({group:e,activePath:t,getIcon:o}){let r=(0,Pt.useMemo)(()=>e.routes.some(i=>i.path===t),[e.routes,t]),[n,a]=(0,Pt.useState)(!0);return(0,Pt.useEffect)(()=>{r&&a(!0)},[r]),(0,ke.jsx)(gt.SidebarGroup,{title:e.title,isOpen:n,onToggle:()=>a(!n),children:e.routes.map(i=>{let c=t===(i.path.endsWith("/")?i.path.slice(0,-1):i.path);return(0,ke.jsx)(gt.SidebarLink,{label:i.title,href:i.path,active:c,icon:o(i.icon),badge:i.badge},i.path)})})}function Uo({routes:e,config:t}){let{groups:o,ungrouped:r,activePath:n}=fs(e),a=t.theme||{};return(0,ke.jsxs)(gt.SidebarRoot,{children:[r.length>0&&(0,ke.jsx)(gt.SidebarGroup,{className:"mb-6",children:r.map(i=>{let c=n===(i.path.endsWith("/")?i.path.slice(0,-1):i.path);return(0,ke.jsx)(gt.SidebarLink,{label:i.title,href:i.path,active:c,icon:Fs(i.icon),badge:i.badge},i.path)})}),o.map(i=>(0,ke.jsx)(Ni,{group:i,activePath:n,getIcon:Fs},i.slug)),a?.poweredBy&&(0,ke.jsx)("div",{className:"mt-auto pt-8",children:(0,ke.jsx)($s,{})})]})}s();Nr();var Ce=S(require("react"));var Nt=require("lucide-react"),V=require("react/jsx-runtime");function qo({headings:e=[],editLink:t,communityHelp:o,filePath:r}){let{headings:n}=xs(e),a=Ce.default.useMemo(()=>n.map(i=>({title:i.text,url:`#${i.id}`,depth:i.level})),[n]);return n.length===0?null:(0,V.jsx)(Un,{toc:a,children:(0,V.jsx)(wi,{headings:n,editLink:t,communityHelp:o,filePath:r})})}function wi({headings:e,editLink:t,communityHelp:o,filePath:r}){let n=_n(),[a,i]=(0,Ce.useState)({opacity:0}),c=(0,Ce.useRef)(null),l=(0,Ce.useRef)(null);(0,Ce.useEffect)(()=>{if(!n||!c.current)return;let d=c.current.querySelector(`a[href="#${n}"]`);d&&i({transform:`translateY(${d.offsetTop}px)`,height:`${d.offsetHeight}px`,opacity:1})},[n]);let u=(0,Ce.useCallback)((d,p)=>{d.preventDefault();let f=document.getElementById(p);f&&(f.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${p}`))},[]);return(0,V.jsxs)(Xe.OnThisPageRoot,{children:[(0,V.jsxs)(Xe.OnThisPageHeader,{className:"flex flex-row gap-x-2",children:[(0,V.jsx)(Nt.TextAlignStart,{size:16}),"On this page"]}),(0,V.jsx)(jn,{containerRef:l,children:(0,V.jsxs)(Xe.OnThisPageContent,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:l,children:[(0,V.jsx)(Xe.OnThisPageIndicator,{style:a}),(0,V.jsx)("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:c,children:e.map(d=>(0,V.jsx)(Xe.OnThisPageItem,{level:d.level,children:(0,V.jsx)(Xe.OnThisPageLink,{href:`#${d.id}`,active:n===d.id,onClick:p=>u(p,d.id),className:"pl-4",children:d.text})},d.id))})]})}),(t||o)&&(0,V.jsxs)("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[(0,V.jsx)("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),(0,V.jsxs)("ul",{className:"space-y-3",children:[t&&r&&(0,V.jsx)("li",{children:(0,V.jsxs)("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:[(0,V.jsx)(Nt.Pencil,{size:16}),"Edit this page"]})}),o&&(0,V.jsx)("li",{children:(0,V.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,V.jsx)(Nt.CircleHelp,{size:16}),"Community help"]})})]})]})]})}s();var Ws=require("react"),Gs=require("react-router-dom");function Ko({siteTitle:e,siteDescription:t,routes:o}){let r=(0,Gs.useLocation)();return(0,Ws.useEffect)(()=>{let n=o.find(u=>u.path===r.pathname),a=n?.title,i=n?.description||t||"";document.title=a?`${a} | ${e}`:e;let c=document.querySelector('meta[name="description"]');c||(c=document.createElement("meta"),c.name="description",document.head.appendChild(c)),c.content=i,Ze("property","og:title",document.title),Ze("property","og:description",i),Ze("property","og:type","article"),Ze("property","og:url",window.location.href),Ze("name","twitter:card","summary"),Ze("name","twitter:title",document.title),Ze("name","twitter:description",i);let l=document.querySelector('link[rel="canonical"]');l||(l=document.createElement("link"),l.rel="canonical",document.head.appendChild(l)),l.href=window.location.origin+r.pathname},[r.pathname,e,t,o]),null}function Ze(e,t,o){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=o}s();var _s=require("lucide-react");Br();w();ge();var Oe=require("react/jsx-runtime");function Xo(){let{crumbs:e,activeRoute:t}=Ls(),r=F().theme||{};return e.length===0||!r?.breadcrumbs?null:(0,Oe.jsxs)(Zn,{children:[(0,Oe.jsx)(Sr,{children:(0,Oe.jsx)(Ar,{href:"/",children:(0,Oe.jsx)(_s.Home,{size:14})})}),e.map((n,a)=>(0,Oe.jsxs)(Sr,{children:[(0,Oe.jsx)(Qn,{}),(0,Oe.jsx)(Ar,{href:n.href,className:m({"font-medium text-text-main":n.href===t?.path}),children:n.label})]},`crumb-${n.href}-${n.label}-${a}`))]})}s();wr();var Se=require("react/jsx-runtime");function Jo(){let{prevPage:e,nextPage:t}=Ts();return!e&&!t?null:(0,Se.jsxs)(Fe.PageNavRoot,{className:"animate-in fade-in slide-in-from-bottom-4 duration-700",children:[e?(0,Se.jsxs)(Fe.PageNavLink,{to:e.path,direction:"prev",children:[(0,Se.jsx)(Fe.PageNavLink.Title,{children:"Previous"}),(0,Se.jsx)(Fe.PageNavLink.Description,{children:e.title})]}):(0,Se.jsx)("div",{}),t&&(0,Se.jsxs)(Fe.PageNavLink,{to:t.path,direction:"next",children:[(0,Se.jsx)(Fe.PageNavLink.Title,{children:"Next"}),(0,Se.jsx)(Fe.PageNavLink.Description,{children:t.title})]})]})}s();var js=require("react");Oo();var wt=require("react/jsx-runtime"),Tt=class extends js.Component{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error in Boltdocs Layout:",t,o)}render(){return this.state.hasError?this.props.fallback||(0,wt.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[(0,wt.jsx)("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),(0,wt.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,wt.jsx)(Re,{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}};ee();ge();var Us=require("react-router-dom");var Z=require("react/jsx-runtime");function qs({children:e}){let{routes:t,allRoutes:o,currentRoute:r,currentLocale:n}=A(),{pathname:a}=(0,Us.useLocation)(),i=F(),l=et().CopyMarkdown||yt,u=a==="/"||a==="";return(0,Z.jsxs)(Ue,{children:[(0,Z.jsx)(Ko,{siteTitle:Ge(i.theme?.title,n)||"Boltdocs",siteDescription:Ge(i.theme?.description,n)||"",routes:o}),(0,Z.jsx)(jo,{}),(0,Z.jsxs)(Ue.Body,{children:[!u&&(0,Z.jsx)(Uo,{routes:t,config:i}),(0,Z.jsxs)(Ue.Content,{children:[!u&&(0,Z.jsxs)(Ue.ContentHeader,{children:[(0,Z.jsx)(Xo,{}),(0,Z.jsx)(l,{mdxRaw:r?._rawContent,route:r,config:i.theme?.copyMarkdown})]}),(0,Z.jsx)(Tt,{children:e}),!u&&(0,Z.jsx)(Ue.ContentFooter,{children:(0,Z.jsx)(Jo,{})})]}),!u&&(0,Z.jsx)(qo,{headings:r?.headings,editLink:i.theme?.editLink,communityHelp:i.theme?.communityHelp,filePath:r?.filePath})]})]})}
|
|
1
|
+
"use strict";var Ws=Object.create;var Xt=Object.defineProperty;var Gs=Object.getOwnPropertyDescriptor;var _s=Object.getOwnPropertyNames;var Us=Object.getPrototypeOf,js=Object.prototype.hasOwnProperty;var k=(e,t)=>()=>(e&&(t=e(e=0)),t);var yr=(e,t)=>{for(var o in t)Xt(e,o,{get:t[o],enumerable:!0})},qr=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of _s(t))!js.call(e,n)&&n!==o&&Xt(e,n,{get:()=>t[n],enumerable:!(r=Gs(t,n))||r.enumerable});return e};var I=(e,t,o)=>(o=e!=null?Ws(Us(e)):{},qr(t||!e||!e.__esModule?Xt(o,"default",{value:e,enumerable:!0}):o,e)),qs=e=>qr(Xt({},"__esModule",{value:!0}),e);var a=k(()=>{"use strict"});function W(){let e=(0,Jt.use)(Cr);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Jt,Cr,Ne=k(()=>{"use strict";a();Jt=require("react"),Cr=(0,Jt.createContext)(null)});function Yt(){return(0,Ue.use)(Kr)}function Xr({routes:e,modules:t,children:o}){let r=(0,Ue.useRef)(null),n=(0,Ue.useCallback)(s=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{let i=s.split("#")[0].split("?")[0],c=e.find(l=>l.path===i||i==="/"&&l.path==="");if(c?.filePath){let l=Object.keys(t).find(u=>u.endsWith("/"+c.filePath));l&&t[l]().catch(u=>{console.error(`[boltdocs] Failed to preload route ${s}:`,u)})}},100)},[e,t]);return(0,Jr.jsx)(Kr.Provider,{value:{preload:n,routes:e},children:o})}var Ue,Jr,Kr,Zt=k(()=>{"use strict";a();Ue=require("react"),Jr=require("react/jsx-runtime"),Kr=(0,Ue.createContext)({preload:()=>{},routes:[]})});var Yr,Qt,ce,Et=k(()=>{"use strict";a();Yr=require("zustand"),Qt=require("zustand/middleware"),ce=(0,Yr.create)()((0,Qt.persist)(e=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:t=>e({currentLocale:t}),setVersion:t=>e({currentVersion:t}),setHasHydrated:t=>e({hasHydrated:t})}),{name:"boltdocs-storage",storage:(0,Qt.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}))});function A(){let{routes:e}=Yt(),t=W(),o=(0,Zr.useLocation)(),r=ce(b=>b.currentLocale),n=ce(b=>b.currentVersion),s=ce(b=>b.hasHydrated),i=e.find(b=>b.path===o.pathname),c=t.i18n?i?.locale||(s?r:void 0)||t.i18n.defaultLocale:void 0,l=t.versions?i?.version||(s?n:void 0)||t.versions.defaultVersion:void 0,u=e.filter(b=>{let S=t.i18n?(b.locale||t.i18n.defaultLocale)===c:!0,R=t.versions?(b.version||t.versions.defaultVersion)===l:!0;if(!(S&&R))return!1;let se=t.i18n;if(se){let he=!!i?.locale,X=!!b.locale;if(e.some(xe=>xe!==b&&xe.filePath===b.filePath&&xe.version===b.version&&(xe.locale||se.defaultLocale)===(b.locale||se.defaultLocale))&&he!==X)return!1}return!0}),p=t.i18n?.localeConfigs?.[c]?.label||t.i18n?.locales[c]||c,h=t.versions?.versions.find(b=>b.path===l)?.label||l,x=t.i18n?Object.entries(t.i18n.locales).map(([b,S])=>{let R=t.i18n?.localeConfigs?.[b];return{key:b,label:R?.label||S,isCurrent:b===c}}):[],v=t.versions?t.versions.versions.map(b=>({key:b.path,label:b.label,isCurrent:b.path===l})):[];return{routes:u,allRoutes:e,currentRoute:i,currentLocale:c,currentLocaleLabel:p,availableLocales:x,currentVersion:l,currentVersionLabel:h,availableVersions:v,config:t}}var Zr,me=k(()=>{"use strict";a();Zr=require("react-router-dom");Ne();Zt();Et()});function rt(e){let t=W(),{currentLocale:o,currentVersion:r}=A();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,s=t.versions;if(!n&&!s)return e;let i=e.startsWith("/docs"),c=e.split("/").filter(Boolean),l=0;c[l]==="docs"&&l++,s&&c.length>l&&s.versions.find(h=>h.path===c[l])&&l++,n&&c.length>l&&n.locales[c[l]]&&l++;let u=c.slice(l),d=[];i&&(d.push("docs"),s&&r&&d.push(r)),n&&o&&o!==n.defaultLocale&&d.push(o),d.push(...u);let p=`/${d.join("/")}`;return p.length>1&&p.endsWith("/")?p.slice(0,-1):p||"/"}var eo=k(()=>{"use strict";a();Ne();me()});function m(...e){return(0,en.twMerge)((0,Qr.clsx)(e))}var Qr,en,N=k(()=>{"use strict";a();Qr=require("clsx"),en=require("tailwind-merge")});var Rr,tn,on,Nr,G,Pr,nt=k(()=>{"use strict";a();Rr=I(require("react")),tn=require("react-aria-components"),on=require("react-router-dom");eo();Zt();N();Nr=require("react/jsx-runtime"),G=Rr.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:s,...i}=e,c=rt(o??""),{preload:l}=Yt();return(0,Nr.jsx)(tn.Link,{...i,ref:t,href:c,onMouseEnter:p=>{n?.(p),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&l(c)},onFocus:p=>{s?.(p),r==="hover"&&typeof c=="string"&&c.startsWith("/")&&l(c)}})});G.displayName="Link";Pr=Rr.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:s,...i}=e,c=(0,on.useLocation)(),l=rt(o??""),u=r?c.pathname===l:c.pathname.startsWith(l),d=typeof n=="function"?n({isActive:u}):m(n,u&&"active"),p=typeof s=="function"?s({isActive:u}):s;return(0,Nr.jsx)(G,{...i,ref:t,href:o,className:d,children:p})});Pr.displayName="NavLink"});var no,Pn,Te,ro,pe,Vt=k(()=>{"use strict";a();no=I(require("react-aria-components"));N();Pn=require("class-variance-authority"),Te=require("react/jsx-runtime"),ro=(0,Pn.cva)("flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none",{variants:{variant:{primary:"bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg",secondary:"bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong",outline:"bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500",ghost:"bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main",danger:"bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15",success:"bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15",warning:"bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15",info:"bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15",subtle:"bg-primary-500/10 text-primary-500 hover:bg-primary-500/20",link:"bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline"},size:{sm:"min-h-8 px-3.5 text-[0.8125rem] gap-1.5",md:"min-h-10 px-5 text-[0.9375rem] gap-2",lg:"min-h-12 px-7 text-[1.05rem] gap-2.5"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},iconSize:{sm:"w-8 h-8 p-0",md:"w-10 h-10 p-0",lg:"w-12 h-12 p-0"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:null}},defaultVariants:{variant:"primary",size:"md",rounded:"md"}}),pe=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:s,variant:i,size:c,rounded:l,iconSize:u,disabled:d,...p})=>{let f=r||!n&&!!t,h=f?(0,Te.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,Te.jsxs)(Te.Fragment,{children:[t&&o==="left"&&(0,Te.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,Te.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,Te.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,Te.jsx)(no.Link,{href:e,className:m(ro({variant:i,size:c,rounded:l,iconSize:f?u:void 0,disabled:d}),s),...p,children:h}):(0,Te.jsx)(no.Button,{className:m(ro({variant:i,size:c,rounded:l,iconSize:f?u:void 0,disabled:d}),s),...p,children:h})}});function ae(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var y,ao,Sn,In,An,Bn,io,lo,co,mo,po,mt,pt,dt,ut,Dt=k(()=>{"use strict";a();y=require("react/jsx-runtime");ao=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...ae(e),children:[(0,y.jsx)("title",{children:"GitHub"}),(0,y.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),Sn=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...ae(e),children:[(0,y.jsx)("title",{children:"Discord"}),(0,y.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z"})]}),In=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...ae(e),children:[(0,y.jsx)("title",{children:"X"}),(0,y.jsx)("path",{d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})]}),An=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...ae(e),children:[(0,y.jsx)("title",{children:"CodeSandbox"}),(0,y.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]}),Bn=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...ae(e),children:[(0,y.jsx)("title",{children:"Bluesky"}),(0,y.jsx)("path",{d:"M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"})]}),io=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ae(e),children:[(0,y.jsx)("title",{children:"TypeScript"}),(0,y.jsx)("path",{fill:"#2563EB",d:"M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z"})]}),lo=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ae(e),children:[(0,y.jsx)("title",{children:"JavaScript"}),(0,y.jsx)("path",{fill:"#F59E0B",d:"M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z"})]}),co=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ae(e),children:[(0,y.jsx)("title",{children:"JSON"}),(0,y.jsx)("path",{fill:"#F59E0B",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),mo=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ae(e),children:[(0,y.jsx)("title",{children:"CSS"}),(0,y.jsx)("path",{fill:"#0EA5E9",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),po=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ae(e),children:[(0,y.jsx)("title",{children:"HTML"}),(0,y.jsx)("path",{fill:"#EA580C",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),mt=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ae(e),children:[(0,y.jsx)("title",{children:"React"}),(0,y.jsx)("path",{fill:"#0E8ADC",d:"M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z"}),(0,y.jsx)("path",{stroke:"#0E8ADC",d:"M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z"}),(0,y.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z"}),(0,y.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z"})]}),pt=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ae(e),children:[(0,y.jsx)("title",{children:"Markdown"}),(0,y.jsx)("path",{fill:"#60A5FA",d:"M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z"})]}),dt=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",...ae(e),children:[(0,y.jsx)("title",{children:"Shell"}),(0,y.jsx)("path",{stroke:"#14B8A6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.336 17l6-6-6-6M12.336 19h8"})]}),ut=e=>(0,y.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",...ae(e),children:[(0,y.jsx)("title",{children:"YAML"}),(0,y.jsx)("path",{fill:"#A78BFA",d:"M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z"})]})});var ft,ve,Mn,qe,kr=k(()=>{"use strict";a();ft=I(require("react-aria-components"));N();ve=require("react/jsx-runtime"),Mn=({className:e,children:t,...o})=>(0,ve.jsx)(ft.Tooltip,{...o,offset:8,className:r=>m("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(r):e),children:r=>(0,ve.jsxs)(ve.Fragment,{children:[(0,ve.jsx)(ft.OverlayArrow,{children:(0,ve.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,ve.jsx)("title",{children:"Arrow"}),(0,ve.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(r):t]})}),qe=({content:e,children:t,delay:o=500,closeDelay:r=0,...n})=>(0,ve.jsxs)(ft.TooltipTrigger,{delay:o,closeDelay:r,children:[t,(0,ve.jsx)(Mn,{...n,children:e})]});qe.Root=qe;qe.Content=Mn});var Ho,jn,Xe,w,U,pa,da,ua,fa,ga,ba,ha,xa,va,ya,Ca,Ra,Pa,ee,Wt=k(()=>{"use strict";a();Ho=require("react");zo();jn=require("react-aria-components"),Xe=require("lucide-react");Dt();w=require("react/jsx-runtime"),U=({children:e,className:t,...o})=>(0,w.jsx)("header",{className:m("boltdocs-navbar sticky top-0 z-50 w-full border-b border-border-subtle bg-bg-main/80 backdrop-blur-md",t),...o,children:e}),pa=({children:e,className:t})=>(0,w.jsx)("div",{className:m("mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6",t),children:e}),da=({children:e,className:t})=>(0,w.jsx)("div",{className:m("flex flex-1 items-center justify-start gap-4 min-w-0",t),children:e}),ua=({children:e,className:t})=>(0,w.jsx)("div",{className:m("flex flex-1 items-center justify-end gap-2 md:gap-4 min-w-0",t),children:e}),fa=({children:e,className:t})=>(0,w.jsx)("div",{className:m("hidden lg:flex flex-1 justify-center items-center gap-4 px-4 min-w-0 w-full",t),children:e}),ga=({src:e,alt:t,width:o=24,height:r=24,className:n})=>(0,w.jsx)(G,{href:"/",className:m("flex items-center gap-2 shrink-0 outline-none",n),children:e?(0,w.jsx)("img",{src:e,alt:t,width:o,height:r,className:"h-6 w-6 object-contain"}):null}),ba=({children:e,className:t})=>(0,w.jsx)(G,{href:"/",children:(0,w.jsx)("span",{className:m("text-lg font-bold tracking-tight hidden sm:inline-block",t),children:e})}),ha=({children:e,className:t})=>(0,w.jsx)("nav",{className:m("hidden md:flex items-center gap-6 text-sm font-medium",t),children:e}),xa=({label:e,href:t,active:o,to:r,className:n})=>(0,w.jsxs)(G,{href:t,target:r==="external"?"_blank":void 0,className:m("transition-colors outline-none font-medium focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm",{"text-primary-500":o,"text-text-muted hover:text-text-main":!o},n),children:[e,r==="external"&&(0,w.jsx)("span",{className:"ml-1 inline-block",children:(0,w.jsx)(Xe.ExternalLink,{size:12})})]}),va=({className:e,onPress:t})=>{let[o,r]=(0,Ho.useState)(!1),n=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return(0,Ho.useEffect)(()=>{r(!0)},[]),(0,w.jsxs)(jn.Button,{onPress:t,className:m("flex items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-muted outline-none cursor-pointer","transition-all duration-200 hover:border-border-strong hover:text-text-main hover:bg-bg-muted hover:shadow-sm active:scale-[0.98]","focus-visible:ring-2 focus-visible:ring-primary-500/30","w-full max-w-[720px] justify-between",e),children:[(0,w.jsxs)("div",{className:"flex items-center gap-2",children:[(0,w.jsx)(Xe.Search,{size:16}),(0,w.jsx)("span",{className:"hidden sm:inline-block",children:"Search docs..."})]}),(0,w.jsxs)("div",{className:"hidden sm:flex items-center gap-1 pointer-events-none select-none",children:[(0,w.jsx)("kbd",{className:"flex h-5 items-center justify-center rounded border border-border-subtle bg-bg-main px-1.5 font-mono text-[10px] font-medium",children:n?"\u2318":"Ctrl"}),(0,w.jsx)("kbd",{className:"flex h-5 w-5 items-center justify-center rounded border border-border-subtle bg-bg-main font-mono text-[10px] font-medium",children:"K"})]})]})},ya=({className:e,theme:t,onThemeChange:o})=>(0,w.jsx)(Or.ToggleButton,{isSelected:t==="dark",onChange:o,className:m("rounded-md p-2 text-text-muted outline-none cursor-pointer","transition-all duration-300 hover:bg-bg-surface hover:text-text-main hover:rotate-12 active:scale-90","focus-visible:ring-2 focus-visible:ring-primary-500/30",e),"aria-label":"Toggle theme",children:t==="dark"?(0,w.jsx)(Xe.Sun,{size:20}):(0,w.jsx)(Xe.Moon,{size:20})}),Ca=({name:e})=>{if(e==="github")return(0,w.jsx)(ao,{});if(e==="discord")return(0,w.jsx)(Sn,{});if(e==="x")return(0,w.jsx)(In,{});if(e==="bluesky")return(0,w.jsx)(Bn,{})},Ra=({icon:e,link:t,className:o})=>(0,w.jsx)(G,{href:t,target:"_blank",rel:"noopener noreferrer",className:m("rounded-md p-2 text-text-muted outline-none transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:(0,w.jsx)(Ca,{name:e})}),Pa=({className:e})=>(0,w.jsx)(Er.Separator,{orientation:"vertical",className:m("h-6 w-px bg-border-subtle mx-1",e)});U.Root=U;U.Left=da;U.Right=ua;U.Center=fa;U.Logo=ga;U.Title=ba;U.Links=ha;U.Link=xa;U.SearchTrigger=va;U.Theme=ya;U.Socials=Ra;U.Split=Pa;U.Content=pa;ee=U});var Oe,qn,te,st,wa,Ta,La,Vr=k(()=>{"use strict";a();Oe=I(require("react-aria-components")),qn=require("lucide-react");N();te=require("react/jsx-runtime"),st=({children:e,className:t,...o})=>(0,te.jsx)("nav",{className:m("relative flex items-center",t),...o,children:e}),wa=({children:e,className:t})=>(0,te.jsx)("div",{className:m("flex list-none items-center gap-1",t),children:e}),Ta=({children:e,label:t,className:o})=>(0,te.jsxs)(Oe.MenuTrigger,{children:[(0,te.jsxs)(Oe.Button,{className:m("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",o),children:[t,(0,te.jsx)(qn.ChevronDown,{size:14,className:"transition-transform"})]}),(0,te.jsx)(Oe.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,te.jsx)(Oe.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:e})})]}),La=({label:e,href:t,description:o,className:r,children:n,...s})=>(0,te.jsx)(Oe.MenuItem,{href:t,className:m("block rounded-lg px-3 py-2 text-sm outline-none cursor-pointer transition-colors","hover:bg-bg-muted focus:bg-bg-muted",r),...s,children:n||(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)("div",{className:"font-semibold text-text-main",children:e}),o&&(0,te.jsx)("div",{className:"text-xs text-text-muted line-clamp-1 mt-0.5",children:o})]})});st.Root=st;st.List=wa;st.Item=Ta;st.Link=La});var J,Je,B,j,Sa,Ia,Aa,Ba,Ma,Ea,Oa,$o=k(()=>{"use strict";a();J=I(require("react-aria-components")),Je=require("lucide-react");N();B=require("react/jsx-runtime"),j=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,B.jsx)(J.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:m("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:(0,B.jsx)(J.Modal,{className:m("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",r),children:(0,B.jsx)(J.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Sa=({children:e,className:t,onSelectionChange:o,...r})=>(0,B.jsx)("div",{className:t,children:(0,B.jsx)(J.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),Ia=({className:e,...t})=>(0,B.jsxs)(J.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,B.jsx)(Je.Search,{className:"h-5 w-5 text-text-muted"}),(0,B.jsx)(J.Input,{...t,className:m("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,B.jsx)("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:(0,B.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),Aa=({children:e,className:t,...o})=>(0,B.jsx)(J.ListBox,{...o,className:m("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Ba=({children:e,className:t,...o})=>(0,B.jsx)(J.ListBoxItem,{...o,className:m("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:r=>(0,B.jsxs)(B.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,B.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,B.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,B.jsx)(Je.CornerDownLeft,{size:10})]})]})}),Ma=({isHeading:e,className:t})=>(0,B.jsx)("div",{className:m("shrink-0",t),children:e?(0,B.jsx)(Je.Hash,{size:18}):(0,B.jsx)(Je.FileText,{size:18})}),Ea=({children:e,className:t})=>(0,B.jsx)("span",{className:m("block font-medium truncate flex-1 text-sm",t),children:e}),Oa=({children:e,className:t})=>(0,B.jsx)("span",{className:m("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e});j.Root=j;j.Autocomplete=Sa;j.Input=Ia;j.List=Aa;j.Item=Object.assign(Ba,{Icon:Ma,Title:Ea,Bio:Oa})});function Kn(e,t){let o=(0,Fo.useRef)(e);(0,Fo.useEffect)(()=>{o.current!==e&&(t(e),o.current=e)},[e,t])}var Fo,Xn=k(()=>{"use strict";a();Fo=require("react")});function Dr(e){return e.startsWith("#")?e.slice(1):null}var Wo,Jn=k(()=>{"use strict";a();Wo=class{items=[];single=!1;observer=null;onChange;callback(t){if(t.length===0)return;for(let r of t){let n=this.items.find(s=>s.id===r.target.id);if(n){n.active=r.isIntersecting;let s=100;n.fallback=!r.isIntersecting&&r.boundingClientRect.top<s}}let o=-1;for(let r=this.items.length-1;r>=0;r--)if(this.items[r].fallback){o=r;break}o===-1&&this.items.length>0&&(o=0),this.items=this.items.map((r,n)=>({...r,active:n===o,t:n===o?Date.now():r.t})),this.onChange?.()}setItems(t){let o=this.observer;if(o)for(let r of this.items){let n=document.getElementById(r.id);n&&o.unobserve(n)}this.items=[];for(let r of t){let n=Dr(r.url);n&&this.items.push({id:n,active:!1,fallback:!1,t:0,original:r})}this.watchItems(),typeof window<"u"&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(t){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),t),this.watchItems())}watchItems(){if(this.observer)for(let t of this.items){let o=document.getElementById(t.id);o&&this.observer.observe(o)}}unwatch(){this.observer?.disconnect(),this.observer=null}}});function Go(){let e=(0,O.use)(Hr);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function _o(){let e=Go();return(0,O.useMemo)(()=>{let t;for(let o of e)o.active&&(!t||o.t>t.t)&&(t=o);return t?.id},[e])}function Qn(){let e=Go();return(0,O.useMemo)(()=>{let t=[];for(let o of e)o.active&&t.push(o.id);return t},[e])}function Uo({containerRef:e,children:t}){return(0,Ve.jsx)(Zn.Provider,{value:e,children:t})}function jo({toc:e,single:t=!1,children:o}){let r=(0,O.useMemo)(()=>new Wo,[]),[n,s]=(0,O.useState)(r.items);return r.single=t,(0,O.useEffect)(()=>{r.setItems(e)},[r,e]),(0,O.useEffect)(()=>(r.watch({rootMargin:"-100px 0% 0% 0%",threshold:0}),r.onChange=()=>s([...r.items]),()=>{r.unwatch()}),[r]),(0,Ve.jsx)(Hr.Provider,{value:n,children:o})}var O,Yn,Ve,Hr,Zn,q,Da,es,Ha,za,$a,Fa,qo=k(()=>{"use strict";a();O=require("react"),Yn=I(require("scroll-into-view-if-needed"));N();Xn();Jn();Ve=require("react/jsx-runtime"),Hr=(0,O.createContext)(null),Zn=(0,O.createContext)(null);q=({children:e,className:t})=>(0,Ve.jsx)("nav",{className:m("sticky top-navbar hidden xl:flex flex-col shrink-0","w-toc","py-8 pl-6 pr-4",t),children:e}),Da=({children:e,className:t,...o})=>(0,Ve.jsx)("div",{className:m("mb-4 text-xs font-bold uppercase tracking-wider text-text-main",t),...o,children:e}),es=({children:e,className:t,ref:o,...r})=>{let n=(0,O.useRef)(null);return(0,O.useImperativeHandle)(o,()=>n.current),(0,Ve.jsx)("div",{ref:n,className:m("relative overflow-y-auto boltdocs-otp-content",t),...r,children:e})};es.displayName="OnThisPageContent";Ha=({children:e,className:t})=>(0,Ve.jsx)("ul",{className:m("relative space-y-1 text-sm border-l border-border-subtle",t),children:e}),za=({level:e,children:t,className:o})=>(0,Ve.jsx)("li",{className:m(e===3&&"pl-3",o),children:t}),$a=({children:e,href:t,active:o,onClick:r,className:n})=>{let s=(0,O.use)(Hr),i=(0,O.use)(Zn),c=t?Dr(t):null,l=(0,O.useRef)(null),[u,d]=(0,O.useState)(o);return Kn(c&&s?s.find(p=>p.id===c)?.active:null,p=>{p!==null&&p!==u&&(d(!!p),p&&l.current&&i?.current&&(0,Yn.default)(l.current,{behavior:"smooth",block:"center",inline:"center",scrollMode:"if-needed",boundary:i.current}))}),(0,O.useEffect)(()=>{o!==void 0&&d(o)},[o]),(0,Ve.jsx)("a",{ref:l,href:t,onClick:r,"data-active":u,className:m("block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main",u?"text-primary-500 font-medium":"text-text-muted",n),children:e})},Fa=({style:e,className:t})=>(0,Ve.jsx)("div",{className:m("absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300",t),style:e});q.Root=q;q.Header=Da;q.Content=es;q.List=Ha;q.Item=za;q.Link=$a;q.Indicator=Fa});var ts,Ko,Ce,Y,Ga,_a,Ua,ja,Xo=k(()=>{"use strict";a();ts=I(require("react-aria-components")),Ko=require("lucide-react");N();Ce=require("react/jsx-runtime"),Y=({children:e,className:t})=>(0,Ce.jsx)("nav",{className:m("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),Ga=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,Ce.jsxs)(ts.Link,{href:t,className:m("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",n?"text-right justify-end":"text-left justify-start",r),children:[!n&&(0,Ce.jsx)(Ko.ChevronLeft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),(0,Ce.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&(0,Ce.jsx)(Ko.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},_a=({children:e,className:t})=>(0,Ce.jsx)("span",{className:m("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Ua=({children:e,className:t})=>(0,Ce.jsx)("span",{className:m("text-base font-bold text-text-main truncate",t),children:e}),ja=({children:e})=>(0,Ce.jsx)(Ce.Fragment,{children:e});Y.Root=Y;Y.Link=Ga;Y.Title=_a;Y.Description=Ua;Y.Icon=ja});var Rt,Ie,Ka,Xa,Ja,Ya,Jo=k(()=>{"use strict";a();N();Rt=require("react/jsx-runtime"),Ie=({children:e,className:t="",...o})=>(0,Rt.jsx)("div",{className:m("w-full",t),...o,children:e}),Ka=({children:e,className:t=""})=>(0,Rt.jsx)("div",{role:"tablist",className:m("relative flex flex-row items-center border-b border-border-subtle",t),children:e}),Xa=({children:e,id:t,selected:o,className:r="",...n})=>(0,Rt.jsx)("button",{role:"tab","aria-selected":o,className:m("flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none",o?"text-primary-500":"text-text-muted hover:text-text-main",r),...n,children:e}),Ja=({children:e,className:t=""})=>(0,Rt.jsx)("div",{className:m("p-4 outline-none",t),children:e}),Ya=({className:e="",style:t})=>(0,Rt.jsx)("div",{className:m("absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300",e),style:t});Ie.Root=Ie;Ie.List=Ka;Ie.Item=Xa;Ie.Content=Ja;Ie.Indicator=Ya});var os,rs,Z,Qa,be,ei,ti,oi,Yo=k(()=>{"use strict";a();nt();os=I(require("react-aria-components")),rs=require("lucide-react");N();Z=require("react/jsx-runtime"),Qa=({badge:e})=>{let t={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 e=="object"&&e?.expires){let r=new Date(e.expires),n=new Date,s=r.getTime()-n.getTime();if(Math.ceil(s/(1e3*60*60*24))===0)return null}let o=typeof e=="string"?e:e?.text;return(0,Z.jsx)("span",{className:m("ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap",t[o]||t.new),children:o})},be=({children:e,className:t})=>(0,Z.jsx)("aside",{className:m("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",t),children:(0,Z.jsx)("nav",{className:"flex-1 space-y-6",children:e})}),ei=({children:e,title:t,icon:o,isOpen:r=!0,onToggle:n,className:s})=>(0,Z.jsxs)("div",{className:m("space-y-1",s),children:[t&&(0,Z.jsxs)(os.Button,{onPress:n,className:m("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,Z.jsxs)("div",{className:"flex items-center gap-2",children:[o&&(0,Z.jsx)(o,{size:14}),t]}),(0,Z.jsx)(rs.ChevronRight,{size:14,className:m("transition-transform duration-200",r&&"rotate-90")})]}),r&&(0,Z.jsx)("div",{className:"space-y-0.5",children:e})]}),ti=({children:e,className:t})=>(0,Z.jsx)("div",{className:m(t),children:e}),oi=({label:e,href:t,active:o,icon:r,badge:n,className:s})=>(0,Z.jsxs)(G,{href:t,className:m("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",o?"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:[r&&(0,Z.jsx)(r,{size:16,className:m(o?"text-primary-500":"text-text-muted group-hover:text-text-main")}),(0,Z.jsx)("span",{className:"truncate",children:e}),n&&(0,Z.jsx)(Qa,{badge:n})]});be.Root=be;be.Group=ei;be.GroupItem=ti;be.Link=oi});var Pt,ns,Gt,le,ni,si,ai,Zo=k(()=>{"use strict";a();Pt=require("react-aria-components"),ns=require("lucide-react");N();Gt=require("react/jsx-runtime"),le=({children:e,className:t,...o})=>(0,Gt.jsx)(Pt.Breadcrumbs,{className:m("flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted",t),...o,children:e}),ni=({children:e,className:t,...o})=>(0,Gt.jsx)(Pt.Breadcrumb,{className:m("flex items-center mb-0 gap-1.5",t),...o,children:e}),si=({children:e,href:t,className:o,...r})=>(0,Gt.jsx)(Pt.Link,{href:t,className:m("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",o),...r,children:e}),ai=({className:e})=>(0,Gt.jsx)(ns.ChevronRight,{size:14,className:m("shrink-0 text-text-dim",e)});le.Root=le;le.Item=ni;le.Link=si;le.Separator=ai});var ss,_t,zr=k(()=>{"use strict";a();N();ss=require("react/jsx-runtime"),_t=({children:e,className:t,vertical:o=!1})=>(0,ss.jsx)("div",{className:m("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],o&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e})});var wt,Nt,Ut,$r=k(()=>{"use strict";"use client";a();wt=I(require("react-aria-components"));N();Nt=require("react/jsx-runtime"),Ut=({children:e,className:t,showArrow:o,...r})=>(0,Nt.jsxs)(wt.Popover,{offset:8,...r,className:wt.composeRenderProps(t,n=>m("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none",n)),children:[o&&(0,Nt.jsx)(wt.OverlayArrow,{className:"group",children:(0,Nt.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,Nt.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]})});function li(e){let[t,o]=Fr.default.Children.toArray(e.children).slice(0,2);return(0,z.jsxs)($.MenuTrigger,{...e,children:[t,(0,z.jsx)(Ut,{placement:e.placement,className:"min-w-35",children:o})]})}function ci(e){let[t,o]=Fr.default.Children.toArray(e.children).slice(0,2);return(0,z.jsxs)($.SubmenuTrigger,{...e,children:[t,(0,z.jsx)(Ut,{offset:-4,crossOffset:-4,children:o})]})}function T(e){return(0,z.jsx)($.Menu,{...e,className:$.composeRenderProps(e.className,t=>m("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function mi(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,z.jsx)($.MenuItem,{...e,textValue:t,className:$.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:s})=>m("group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none","text-text-main text-[12px]",{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":r,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":s},o)),children:$.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:s})=>(0,z.jsxs)(z.Fragment,{children:[r!=="none"&&(0,z.jsxs)("span",{className:"flex items-center size-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,z.jsx)(Tt.Check,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,z.jsx)(Tt.Dot,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,z.jsx)("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:o}),s&&(0,z.jsx)(Tt.ChevronRight,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function pi({title:e,...t}){return(0,z.jsxs)($.MenuSection,{...t,className:m("flex flex-col gap-0.5",t.className),children:[e&&(0,z.jsx)($.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),(0,z.jsx)($.Collection,{items:t.items,children:t.children})]})}function di(e){return(0,z.jsx)($.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}var Tt,Fr,$,z,jt=k(()=>{"use strict";"use client";a();Tt=require("lucide-react"),Fr=I(require("react")),$=I(require("react-aria-components"));$r();N();z=require("react/jsx-runtime");T.Root=T;T.Item=mi;T.Trigger=li;T.SubTrigger=ci;T.Section=pi;T.Separator=di});function _({className:e,variant:t="rect",...o}){return(0,as.jsx)("div",{className:m("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}var as,Wr=k(()=>{"use strict";a();N();as=require("react/jsx-runtime")});var Er,Or,zo=k(()=>{"use strict";a();Wt();Vr();$o();qo();Xo();Jo();Yo();Zo();Vt();zr();jt();nt();Er=require("react-aria-components"),Or=require("react-aria-components");N()});function or(e){let{currentLocale:t,currentVersion:o}=A(),[r,n]=(0,Ze.useState)(!1),[s,i]=(0,Ze.useState)(""),[c,l]=(0,Ze.useState)(null);(0,Ze.useEffect)(()=>{if(!r||c)return;let d=new bs.Index({preset:"match",tokenize:"full",resolution:9,cache:!0});for(let p of Ur.default)d.add(p.id,`${p.title} ${p.content}`);l(d)},[r,c]);let u=(0,Ze.useMemo)(()=>{if(!s)return e.filter(h=>{let x=!t||h.locale===t,v=!o||h.version===o;return x&&v}).slice(0,10).map(h=>({id:h.path,title:h.title,path:h.path,bio:h.description||"",groupTitle:h.groupTitle}));if(!c)return[];let d=c.search(s,{limit:20,suggest:!0}),p=[],f=new Set;for(let h of d){let x=Ur.default.find(S=>S.id===h);if(!x)continue;let v=!t||x.locale===t,b=!o||x.version===o;!v||!b||f.has(x.url)||(f.add(x.url),p.push({id:x.url,title:x.title,path:x.url,bio:x.display,groupTitle:x.display.split(" > ")[0],isHeading:x.url.includes("#")}))}return p.slice(0,10)},[s,c,t,o,e]);return{isOpen:r,setIsOpen:n,query:s,setQuery:i,list:u,input:{value:s,onChange:d=>i(d.target.value)}}}var Ze,bs,Ur,jr=k(()=>{"use strict";a();Ze=require("react"),bs=require("flexsearch");me();Ur=I(require("virtual:boltdocs-search"))});var Ss={};yr(Ss,{SearchDialog:()=>Ti});function Ti({routes:e}){let{isOpen:t,setIsOpen:o,query:r,setQuery:n,list:s}=or(e),i=(0,ks.useNavigate)();(0,dr.useEffect)(()=>{let l=u=>{(/Mac/.test(navigator.userAgent)?u.metaKey:u.ctrlKey)&&(u.key==="k"||u.key==="j")&&(u.preventDefault(),o(f=>!f))};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[o]);let c=(0,dr.useCallback)(l=>{let u=String(l);if(o(!1),u.includes("#")){let[d,p]=u.split("#");i(d),setTimeout(()=>{let f=document.getElementById(p);f&&f.scrollIntoView({behavior:"smooth"})},100)}else i(u)},[i,o]);return(0,re.jsxs)(re.Fragment,{children:[(0,re.jsx)(ee.SearchTrigger,{onPress:()=>o(!0)}),(0,re.jsx)(j.Root,{isOpen:t,onOpenChange:o,children:(0,re.jsxs)(j.Autocomplete,{onSelectionChange:c,children:[(0,re.jsx)(j.Input,{value:r,onChange:l=>n(l.target.value)}),(0,re.jsx)(j.List,{items:s,children:l=>(0,re.jsxs)(j.Item,{onPress:()=>c(l.id),textValue:l.title,children:[(0,re.jsx)(j.Item.Icon,{isHeading:l.isHeading}),(0,re.jsxs)("div",{className:"flex flex-col justify-center gap-0.5",children:[(0,re.jsx)(j.Item.Title,{children:l.title}),(0,re.jsx)(j.Item.Bio,{children:l.bio})]})]},l.id)})]})})]})}var dr,ks,re,Is=k(()=>{"use strict";a();dr=require("react");jr();$o();Wt();ks=require("react-router-dom"),re=require("react/jsx-runtime")});var Ei={};yr(Ei,{Admonition:()=>ke,AnchorProvider:()=>jo,Badge:()=>ho,Breadcrumbs:()=>xr,Button:()=>so,ButtonGroup:()=>_t,Card:()=>vo,Cards:()=>xo,Caution:()=>To,CodeBlock:()=>Be,ComponentPreview:()=>Do,ComponentProps:()=>Vo,CopyMarkdown:()=>Lt,Danger:()=>Po,DefaultLayout:()=>$s,DocsLayout:()=>et,ErrorBoundary:()=>Mt,Field:()=>Mo,FileTree:()=>Ao,Head:()=>hr,Image:()=>Oo,Important:()=>wo,InfoBox:()=>No,Link:()=>Eo,List:()=>So,Loading:()=>Qo,Navbar:()=>fr,NotFound:()=>Ot,Note:()=>yo,OnThisPage:()=>br,PageNav:()=>vr,PrimitiveBreadcrumbs:()=>le,PrimitiveButton:()=>pe,PrimitiveLink:()=>G,PrimitiveMenu:()=>T,PrimitiveNavLink:()=>Pr,PrimitiveNavbar:()=>U,PrimitiveNavigationMenu:()=>st,PrimitiveOnThisPage:()=>q,PrimitivePageNav:()=>Y,PrimitivePopover:()=>Ut,PrimitiveSidebar:()=>be,PrimitiveSkeleton:()=>_,PrimitiveTabs:()=>Ie,PrimitiveTooltip:()=>qe,ScrollProvider:()=>Uo,SearchDialogPrimitive:()=>j,Sidebar:()=>gr,Tab:()=>fo,Table:()=>Bo,Tabs:()=>go,Tip:()=>Co,Video:()=>bo,Warning:()=>Ro,cn:()=>m,createBoltdocsApp:()=>us,useActiveAnchor:()=>_o,useActiveAnchors:()=>Qn,useBreadcrumbs:()=>lr,useConfig:()=>W,useI18n:()=>ar,useItems:()=>Go,useLocalizedTo:()=>rt,useLocation:()=>cr,useMdxComponents:()=>ct,useNavbar:()=>er,useOnThisPage:()=>rr,usePageNav:()=>ir,useRoutes:()=>A,useSearch:()=>or,useSidebar:()=>tr,useTabs:()=>nr,useTheme:()=>je,useVersion:()=>sr});module.exports=qs(Ei);a();a();var oe=I(require("react")),ms=I(require("react-dom/client")),Pe=require("react-router-dom");a();var rn=require("lucide-react");nt();var $e=require("react/jsx-runtime");function Ot(){return(0,$e.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,$e.jsxs)("div",{className:"space-y-4",children:[(0,$e.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,$e.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,$e.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,$e.jsxs)(G,{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,$e.jsx)(rn.ArrowLeft,{size:16})," Go to Home"]})]})})}a();var we=require("react"),an=require("react/jsx-runtime"),nn=(0,we.createContext)(void 0);function sn({children:e}){let[t,o]=(0,we.useState)("system"),[r,n]=(0,we.useState)("dark"),[s,i]=(0,we.useState)(!1);(0,we.useEffect)(()=>{i(!0);let l=localStorage.getItem("boltdocs-theme"),u=l==="light"||l==="dark"||l==="system"?l:"system";o(u);let d=window.matchMedia("(prefers-color-scheme: dark)");((h,x)=>{n(h==="system"?x?"dark":"light":h)})(u,d.matches);let f=h=>{n(x=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?h.matches?"dark":"light":x)};return d.addEventListener("change",f),()=>d.removeEventListener("change",f)},[]),(0,we.useEffect)(()=>{if(!s)return;let l=window.matchMedia("(prefers-color-scheme: dark)").matches,u=t==="system"?l?"dark":"light":t;n(u);let d=document.documentElement;u==="light"?(d.classList.add("theme-light"),d.dataset.theme="light"):(d.classList.remove("theme-light"),d.dataset.theme="dark")},[t,s]);let c=l=>{o(l),localStorage.setItem("boltdocs-theme",l)};return(0,an.jsx)(nn.Provider,{value:{theme:t,resolvedTheme:r,setTheme:c},children:e})}function je(){let e=(0,we.use)(nn);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var _r=I(require("virtual:boltdocs-layout"));Zt();a();var ln=require("react"),cn=require("react-aria-components"),to=require("react-router-dom"),pn=require("react/jsx-runtime");function mn({children:e}){let t=(0,to.useNavigate)();return(0,pn.jsx)(cn.RouterProvider,{navigate:(o,r)=>{(0,ln.startTransition)(()=>{t(o,r)})},useHref:to.useHref,children:e})}Ne();a();var dn=require("react"),un=require("react-router-dom");function fn(){let{pathname:e,hash:t}=(0,un.useLocation)();return(0,dn.useLayoutEffect)(()=>{let o=document.querySelector(".boltdocs-content")||window,r=()=>o===window?window.scrollY:o.scrollTop,n=(s,i="auto")=>{o===window?window.scrollTo({top:s,behavior:i}):o.scrollTo({top:s,behavior:i})};if(t){let s=t.replace("#",""),i=document.getElementById(s);if(i){let l=o===window?0:o.getBoundingClientRect().top,p=i.getBoundingClientRect().top-l-80+r();n(p,"smooth");return}}n(0)},[e,t]),null}a();var gn=require("react-router-dom"),bn=I(require("virtual:boltdocs-layout")),wr=require("react/jsx-runtime");function hn(){return(0,wr.jsx)(bn.default,{children:(0,wr.jsx)(gn.Outlet,{})})}a();var Cn=require("@mdx-js/react");a();var oo=require("react"),yn=require("react/jsx-runtime"),xn=(0,oo.createContext)({});function ct(){return(0,oo.use)(xn)}function vn({components:e,children:t}){return(0,yn.jsx)(xn.Provider,{value:e,children:t})}var Tr=require("react/jsx-runtime");function Rn({Component:e}){let t=ct();return(0,Tr.jsx)(Cn.MDXProvider,{components:t,children:(0,Tr.jsx)(e,{})})}a();var ls=require("lucide-react");var Gr={};yr(Gr,{Admonition:()=>ke,Badge:()=>ho,Button:()=>so,Card:()=>vo,Cards:()=>xo,Caution:()=>To,CodeBlock:()=>Be,ComponentPreview:()=>Do,ComponentProps:()=>Vo,CopyMarkdown:()=>Lt,Danger:()=>Po,Field:()=>Mo,FileTree:()=>Ao,Image:()=>Oo,Important:()=>wo,InfoBox:()=>No,Link:()=>Eo,List:()=>So,Note:()=>yo,Tab:()=>fo,Table:()=>Bo,Tabs:()=>go,Tip:()=>Co,Video:()=>bo,Warning:()=>Ro});a();a();Vt();N();var Nn=require("react/jsx-runtime"),so=({className:e,variant:t,size:o,rounded:r,iconSize:n,disabled:s,...i})=>(0,Nn.jsx)(pe,{className:m("group",ro({variant:t,size:o,rounded:r,iconSize:n,disabled:s,className:e})),...i});a();var uo=I(require("react-aria-components")),gt=require("lucide-react");N();a();Ne();a();var Lr=require("codesandbox/lib/api/define.js");function wn(e){let t=e.files||{},o=e.dependencies||{},r=e.devDependencies||{},n=e.title||"codesandbox-project",s=e.description||"Generic Sandbox",i={};for(let[c,l]of Object.entries(t)){let u=typeof l.content=="object"?JSON.stringify(l.content,null,2):l.content;i[c]={content:u,isBinary:l.isBinary??!1}}if(!i["package.json"]){let l=e.template==="vite"||!!r.vite||!!r["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};i["package.json"]={content:JSON.stringify({private:!0,name:n,description:s,type:"module",version:"1.0.0",scripts:e.scripts||l,dependencies:o,devDependencies:r},null,2),isBinary:!1}}return i}function Ks(e){let t=wn(e),o=(0,Lr.getParameters)({files:t}),r=new URLSearchParams({parameters:o,installDependencies:"true"});return e.entry&&r.set("file",`/${e.entry}`),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?${r.toString()}`,options:e}}function Tn(e){if(typeof window>"u")return Ks(e);let t=wn(e),o=(0,Lr.getParameters)({files:t}),r=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let s=(c,l)=>{let u=document.createElement("input");u.type="hidden",u.name=c,u.value=l,n.appendChild(u)},i=new URLSearchParams({file:`/${r}`,eslint:"0",codemirror:"1",installDependencies:"true"});return s("query",i.toString()),s("parameters",o),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:o,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${o}`,options:e}}a();var Ln=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}};var Le=require("react");function kn(e){let{title:t,sandbox:o}=e,[r,n]=(0,Le.useState)(!1),[s,i]=(0,Le.useState)(!1),[c,l]=(0,Le.useState)(!1),u=(0,Le.useRef)(null),d=W(),p=(0,Le.useCallback)(async()=>{let h=u.current?.textContent??"";Ln(h),n(!0),setTimeout(()=>n(!1),2e3)},[]),f=(0,Le.useCallback)(()=>{let h=u.current?.textContent??"",x=d?.integrations?.sandbox?.config||{},v=typeof o=="object"?o:x,b=v.entry||"src/App.tsx";Tn({title:t??"Code Snippet",...v,files:{...v.files,[b]:{content:h}}})},[t,d,o]);return(0,Le.useEffect)(()=>{let h=u.current?.textContent?.length??0;l(h>120)},[e.children,e.highlightedHtml]),{copied:r,isExpanded:s,setIsExpanded:i,isExpandable:c,preRef:u,handleCopy:p,handleSandbox:f,shouldTruncate:c&&!s}}Ne();Dt();kr();var F=require("react/jsx-runtime"),Js={ts:io,tsx:mt,js:lo,jsx:mt,json:co,css:mo,html:po,md:pt,mdx:pt,bash:dt,sh:dt,yaml:ut,yml:ut};function Be(e){let{children:t,sandbox:o,hideSandbox:r=!0,hideCopy:n=!1,highlightedHtml:s,title:i,"data-lang":c,plain:l=!1,...u}=e,f=!!W()?.integrations?.sandbox?.enable&&!r,h=e.lang||c||"",{copied:x,isExpanded:v,setIsExpanded:b,isExpandable:S,preRef:R,handleCopy:se,handleSandbox:he,shouldTruncate:X}=kn(e),tt=Js[h];return(0,F.jsxs)("div",{className:m("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!l,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":X},e.className),children:[i&&(0,F.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:[tt?(0,F.jsx)(tt,{size:14}):(0,F.jsx)(gt.File,{size:14,className:"opacity-60"}),(0,F.jsx)("span",{children:i})]}),(0,F.jsxs)("div",{className:"absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100",children:[f&&(0,F.jsx)(qe,{content:"Open in CodeSandbox",children:(0,F.jsx)(uo.Button,{onPress:he,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:(0,F.jsx)(An,{size:20})})}),!n&&(0,F.jsx)(qe,{content:x?"Copied!":"Copy code",children:(0,F.jsx)(uo.Button,{onPress:se,className:m("grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2",x?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:x?(0,F.jsx)(gt.Check,{size:20}):(0,F.jsx)(gt.Copy,{size:20})})})]}),s?(0,F.jsx)("div",{ref:R,className:"shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!",dangerouslySetInnerHTML:{__html:s}}):(0,F.jsx)("pre",{ref:R,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...u,children:t}),S&&(0,F.jsx)("div",{className:m(X?"absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10":"relative flex justify-center py-4"),children:(0,F.jsx)(uo.Button,{onPress:()=>b(!v),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:v?"Show less":"Expand code"})})]})}a();var bt=require("react"),Ke=I(require("react-aria-components"));a();var Fe=require("react");function En({initialIndex:e=0,tabs:t}){let o=t[e]?.props.disabled?t.findIndex(u=>!u.props.disabled):e,[r,n]=(0,Fe.useState)(o===-1?0:o),s=(0,Fe.useRef)([]),[i,c]=(0,Fe.useState)({opacity:0,transform:"translateX(0)",width:0});(0,Fe.useEffect)(()=>{let u=s.current[r];u&&c({opacity:1,width:u.offsetWidth,transform:`translateX(${u.offsetLeft}px)`})},[r,t]);let l=(0,Fe.useCallback)(u=>{let d=0;if(u.key==="ArrowRight"?d=1:u.key==="ArrowLeft"&&(d=-1),d!==0){let p=(r+d+t.length)%t.length;for(;t[p].props.disabled&&p!==r;)p=(p+d+t.length)%t.length;p!==r&&!t[p].props.disabled&&(n(p),s.current[p]?.focus())}},[r,t]);return{active:r,setActive:n,tabRefs:s,indicatorStyle:i,handleKeyDown:l}}N();var Sr=require("class-variance-authority"),de=require("react/jsx-runtime"),Ys=(0,Sr.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"}}),Zs=(0,Sr.cva)("flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap",{variants:{isActive:{true:"text-primary-500",false:"text-text-muted hover:text-text-main"},isDisabled:{true:"opacity-40 pointer-events-none",false:""}},defaultVariants:{isActive:!1,isDisabled:!1}});function fo({children:e}){let t=typeof e=="string"?(0,de.jsx)(Be,{className:"language-bash",children:(0,de.jsx)("code",{children:e.trim()})}):e;return(0,de.jsx)("div",{className:"py-4",children:t})}function go({defaultIndex:e=0,children:t}){let o=(0,bt.useMemo)(()=>bt.Children.toArray(t).filter(c=>(0,bt.isValidElement)(c)&&c.props?.label),[t]),{active:r,setActive:n,tabRefs:s,indicatorStyle:i}=En({initialIndex:e,tabs:o});return(0,de.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,de.jsxs)(Ke.Tabs,{selectedKey:r.toString(),onSelectionChange:c=>n(Number(c)),className:"w-full",children:[(0,de.jsxs)(Ke.TabList,{"aria-label":"Content Tabs",className:m(Ys()),children:[o.map((c,l)=>{let{label:u,icon:d,disabled:p}=c.props,f=l.toString();return(0,de.jsxs)(Ke.Tab,{id:f,isDisabled:p,ref:h=>{s.current[l]=h},className:({isSelected:h,isDisabled:x})=>m(Zs({isActive:h,isDisabled:x})),children:[!!d&&(0,de.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:d}),(0,de.jsx)("span",{children:u})]},f)}),(0,de.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:i,"aria-hidden":"true"})]}),o.map((c,l)=>(0,de.jsx)(Ke.TabPanel,{id:l.toString(),children:o[l]},l))]})})}a();var ht=require("react"),Ht=require("react/jsx-runtime");function bo({src:e,poster:t,alt:o,children:r,controls:n,preload:s="metadata",...i}){let c=(0,ht.useRef)(null),[l,u]=(0,ht.useState)(!1);return(0,ht.useEffect)(()=>{let d=c.current;if(!d)return;let p=new IntersectionObserver(([f])=>{f.isIntersecting&&(u(!0),p.disconnect())},{rootMargin:"200px"});return p.observe(d),()=>p.disconnect()},[]),(0,Ht.jsx)("div",{ref:c,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:l?(0,Ht.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:s,playsInline:!0,...i,children:[r,"Your browser does not support the video tag."]}):(0,Ht.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":o||"Video"})})}a();N();var On=require("class-variance-authority"),Vn=require("react/jsx-runtime"),Qs=(0,On.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight",{variants:{variant:{default:"bg-bg-surface text-text-muted border-border-subtle",primary:"bg-primary-500/15 text-primary-400 border-primary-500/20",success:"bg-emerald-500/15 text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",danger:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-sky-500/15 text-sky-400 border-sky-500/20"}},defaultVariants:{variant:"default"}});function ho({variant:e="default",children:t,className:o="",...r}){return(0,Vn.jsx)("span",{className:m(Qs({variant:e}),o),...r,children:t})}a();var zt=require("react"),Dn=I(require("react-aria-components"));N();var Hn=require("class-variance-authority"),ue=require("react/jsx-runtime"),ea=(0,Hn.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 xo({cols:e=3,children:t,className:o="",...r}){return(0,ue.jsx)("div",{className:m(ea({cols:e}),o),...r,children:t})}function vo({title:e,icon:t,href:o,children:r,className:n="",...s}){let i=(0,zt.useRef)(null),c=(0,zt.useRef)(null),l=(0,zt.useCallback)(p=>{let f=i.current||c.current;if(!f)return;let{left:h,top:x}=f.getBoundingClientRect();f.style.setProperty("--x",`${p.clientX-h}px`),f.style.setProperty("--y",`${p.clientY-x}px`)},[]),u=(0,ue.jsxs)(ue.Fragment,{children:[(0,ue.jsx)("div",{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)"}}),t&&(0,ue.jsx)("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3",children:t}),(0,ue.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,ue.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),r&&(0,ue.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:r})]})]}),d=m("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return o?(0,ue.jsx)(Dn.Link,{ref:c,href:o,className:m(d,"no-underline cursor-pointer"),onMouseMove:l,...s,children:u}):(0,ue.jsx)("div",{ref:i,role:"presentation",className:d,onMouseMove:l,...s,children:u})}a();var ie=require("lucide-react");N();var $n=require("class-variance-authority"),H=require("react/jsx-runtime"),ta={note:(0,H.jsx)(ie.Bookmark,{size:18}),tip:(0,H.jsx)(ie.Lightbulb,{size:18}),info:(0,H.jsx)(ie.Info,{size:18}),warning:(0,H.jsx)(ie.AlertTriangle,{size:18}),danger:(0,H.jsx)(ie.ShieldAlert,{size:18}),important:(0,H.jsx)(ie.Flame,{size:18}),caution:(0,H.jsx)(ie.Zap,{size:18})},oa={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},zn=(0,$n.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 ke({type:e="note",title:t,children:o,className:r="",...n}){return(0,H.jsxs)("div",{className:m(zn({type:e}),r),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,H.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,H.jsx)("span",{className:m("shrink-0",zn({type:e})),children:ta[e]}),(0,H.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||oa[e]})]}),(0,H.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:o})]})}var yo=e=>(0,H.jsx)(ke,{type:"note",...e}),Co=e=>(0,H.jsx)(ke,{type:"tip",...e}),Ro=e=>(0,H.jsx)(ke,{type:"warning",...e}),Po=e=>(0,H.jsx)(ke,{type:"danger",...e}),No=e=>(0,H.jsx)(ke,{type:"info",...e}),wo=e=>(0,H.jsx)(ke,{type:"important",...e}),To=e=>(0,H.jsx)(ke,{type:"caution",...e});a();var Lo=require("react"),xt=require("lucide-react");N();var ko=require("class-variance-authority"),Se=require("react/jsx-runtime"),ra=(0,ko.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}}),na=(0,ko.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}}),sa=(0,ko.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 aa({icon:e,children:t,variant:o,dense:r}){return(0,Se.jsxs)("li",{className:m(na({variant:o,dense:r})),children:[e&&(0,Se.jsx)("span",{className:m(sa({variant:o==="bubble"?"bubble":"default"})),children:e}),(0,Se.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var ia={checked:e=>(0,Se.jsx)(xt.Check,{size:14,className:m("text-emerald-500 shrink-0",e)}),arrow:e=>(0,Se.jsx)(xt.ChevronRight,{size:14,className:m("text-primary-400 shrink-0",e)}),bubble:e=>(0,Se.jsx)(xt.Circle,{size:6,fill:"currentColor",className:m("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function So({variant:e="default",cols:t=1,dense:o=!1,children:r,className:n,...s}){let i=t!==void 0&&Number(t)>1,c=ia[e],l=ra({variant:e,cols:t,dense:o,isGrid:i,className:n}),u=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,Se.jsx)(u,{className:l,...s,children:r}):(0,Se.jsx)("ul",{className:l,...s,children:Lo.Children.map(r,d=>{if(!(0,Lo.isValidElement)(d))return d;let p=d,f=p.type==="li"?p.props.children:p.props.children||d;return(0,Se.jsx)(aa,{icon:c(),variant:e,dense:o,children:f})})})}a();var Me=require("react"),Ee=I(require("react-aria-components")),ye=require("lucide-react");N();Dt();var V=require("react/jsx-runtime"),vt=16,$t=2,la={ts:io,tsx:mt,js:lo,jsx:mt,json:co,css:mo,html:po,md:pt,mdx:pt,bash:dt,sh:dt,yaml:ut,yml:ut},Ir={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 Br(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(Br).join(""):(0,Me.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?Br(e.props.children):""}function ca(e,t){let o=e.toLowerCase(),r="shrink-0 transition-colors duration-200";if(t)return(0,V.jsx)(ye.Folder,{size:vt,strokeWidth:$t,className:m(r,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=o.split(".").pop()||"",s=la[n];if(s)return(0,V.jsx)(s,{size:vt});let i=m(r,"text-text-dim group-hover:text-text-main");return Ir.CODE.test(o)?(0,V.jsx)(ye.FileCode,{size:vt,strokeWidth:$t,className:i}):Ir.TEXT.test(o)?(0,V.jsx)(ye.FileText,{size:vt,strokeWidth:$t,className:i}):Ir.IMAGE.test(o)?(0,V.jsx)(ye.FileImage,{size:vt,strokeWidth:$t,className:i}):(0,V.jsx)(ye.File,{size:vt,strokeWidth:$t,className:i})}function Ar(e,t){if(!(0,Me.isValidElement)(e))return!1;let o=e.type;if(typeof o=="string")return o===t;if(typeof o=="function")return o.name===t||o.name?.toLowerCase()===t;let r=e.props;return r?.originalType===t||r?.mdxType===t}function ma(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Io(e,t="root"){if(!(0,Me.isValidElement)(e))return[];let o=[];if(Ar(e,"ul"))return Me.Children.forEach(e.props.children,(r,n)=>{o.push(...Io(r,`${t}-${n}`))}),o;if(Ar(e,"li")){let r=Me.Children.toArray(e.props.children),n=r.findIndex(x=>Ar(x,"ul")),s=n!==-1,i=s?r.slice(0,n):r,c=s?r.slice(n):[],l=Br(i),{name:u,comment:d}=ma(l),p=u.endsWith("/"),f=p?u.slice(0,-1):u,h=s||p;return o.push({id:`${t}-${f}`,name:f,comment:d,isFolder:h,children:s?Io(c[0],`${t}-${f}`):void 0}),o}return e.props&&typeof e.props=="object"&&"children"in e.props&&Me.Children.forEach(e.props.children,(r,n)=>{o.push(...Io(r,`${t}-${n}`))}),o}function Fn({item:e}){return(0,V.jsxs)(Ee.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[(0,V.jsx)(Ee.TreeItemContent,{children:({isExpanded:t,hasChildItems:o})=>(0,V.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,V.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),o?(0,V.jsx)(Ee.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,V.jsx)(ye.ChevronRight,{size:14,strokeWidth:3,className:m("transition-transform duration-200",t&&"rotate-90")})}):(0,V.jsx)("div",{className:"w-[18px]"}),ca(e.name,e.isFolder),(0,V.jsx)("span",{className:m("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&(0,V.jsxs)("span",{className:"ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans",children:["//"," ",e.comment]})]})}),e.children&&(0,V.jsx)(Ee.Collection,{items:e.children,children:t=>(0,V.jsx)(Fn,{item:t})})]})}function Ao({children:e}){let t=(0,Me.useMemo)(()=>Io(e),[e]);return(0,V.jsx)("div",{className:"my-8",children:(0,V.jsx)(Ee.Tree,{items:t,"aria-label":"File Tree",className:m("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:o=>(0,V.jsx)(Fn,{item:o})})})}a();var Ft=I(require("react-aria-components"));a();var yt=require("react");function Wn({data:e,sortable:t=!1,paginated:o=!1,pageSize:r=10}){let[n,s]=(0,yt.useState)(null),[i,c]=(0,yt.useState)(1),l=(0,yt.useMemo)(()=>{if(!e)return[];let f=[...e];return t&&n!==null&&f.sort((h,x)=>{let v=h[n.key],b=x[n.key],S=typeof v=="string"?v:"",R=typeof b=="string"?b:"";return S<R?n.direction==="asc"?-1:1:S>R?n.direction==="asc"?1:-1:0}),f},[e,n,t]),u=Math.ceil(l.length/r),d=(0,yt.useMemo)(()=>{if(!o)return l;let f=(i-1)*r;return l.slice(f,f+r)},[l,o,i,r]);return{sortConfig:n,currentPage:i,setCurrentPage:c,totalPages:u,paginatedData:d,requestSort:f=>{if(!t)return;let h="asc";n&&n.key===f&&n.direction==="asc"&&(h="desc"),s({key:f,direction:h})}}}var fe=require("lucide-react");N();var L=require("react/jsx-runtime");function Bo({headers:e,data:t,children:o,className:r="",sortable:n=!1,paginated:s=!1,pageSize:i=10}){let{sortConfig:c,currentPage:l,setCurrentPage:u,totalPages:d,paginatedData:p,requestSort:f}=Wn({data:t,sortable:n,paginated:s,pageSize:i}),h=v=>n?c?.key!==v?(0,L.jsx)(fe.ChevronDown,{size:14,className:"ml-1 opacity-30"}):c.direction==="asc"?(0,L.jsx)(fe.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,L.jsx)(fe.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,x=o||(0,L.jsxs)(L.Fragment,{children:[e&&(0,L.jsx)("thead",{children:(0,L.jsx)("tr",{children:e.map((v,b)=>(0,L.jsx)("th",{onClick:()=>f(b),className:m("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:(0,L.jsxs)("div",{className:"flex items-center",children:[v,h(b)]})},b))})}),p&&(0,L.jsx)("tbody",{children:p.map((v,b)=>(0,L.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:v.map((S,R)=>(0,L.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:S},R))},b))})]});return(0,L.jsxs)("div",{className:m("my-6 rounded-lg border border-border-subtle overflow-hidden",r),children:[(0,L.jsx)("div",{className:"overflow-x-auto",children:(0,L.jsx)("table",{className:"w-full border-collapse text-sm",children:x})}),s&&d>1&&(0,L.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,L.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",l," of ",d]}),(0,L.jsxs)("div",{className:"flex items-center gap-1",children:[(0,L.jsx)(Ft.Button,{onPress:()=>u(1),isDisabled:l===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,L.jsx)(fe.ChevronsLeft,{size:16})}),(0,L.jsx)(Ft.Button,{onPress:()=>u(v=>Math.max(v-1,1)),isDisabled:l===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,L.jsx)(fe.ChevronLeft,{size:16})}),(0,L.jsx)(Ft.Button,{onPress:()=>u(v=>Math.min(v+1,d)),isDisabled:l===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,L.jsx)(fe.ChevronRight,{size:16})}),(0,L.jsx)(Ft.Button,{onPress:()=>u(d),isDisabled:l===d,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,L.jsx)(fe.ChevronsRight,{size:16})})]})]})]})}a();N();var ge=require("react/jsx-runtime");function Mo({name:e,type:t,defaultValue:o,required:r=!1,children:n,id:s,className:i=""}){return(0,ge.jsxs)("article",{className:m("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",i),id:s,children:[(0,ge.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,ge.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,ge.jsx)("code",{className:"inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors group-hover:bg-primary-500/15",children:e}),t&&(0,ge.jsx)("span",{className:"rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm",children:t}),r&&(0,ge.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,ge.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),o&&(0,ge.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,ge.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,ge.jsx)("code",{className:"font-mono text-text-main font-medium",children:o})]})]}),(0,ge.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}a();nt();N();var Gn=require("react/jsx-runtime");function Eo({to:e,children:t,className:o="",...r}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),s=m("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",o);return(0,Gn.jsx)(G,{href:e,className:s,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...r,children:t})}a();var _n=require("react/jsx-runtime");function Oo({src:e,alt:t,theme:o,...r}){let{theme:n}=je();return o&&o!==n?null:(0,_n.jsx)("img",{src:e,alt:t||"",...r})}a();N();var E=require("react/jsx-runtime");function Vo({title:e,props:t,className:o=""}){return(0,E.jsxs)("div",{className:m("my-6",o),children:[e&&(0,E.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,E.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,E.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,E.jsx)("thead",{children:(0,E.jsxs)("tr",{children:[(0,E.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,E.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,E.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,E.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,E.jsx)("tbody",{children:t.map((r,n)=>(0,E.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,E.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,E.jsx)("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:r.name}),r.required&&(0,E.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,E.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,E.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:r.type})}),(0,E.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:r.defaultValue?(0,E.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:r.defaultValue}):(0,E.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,E.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:r.description})]},`${r.name}-${n}`))})]})})]})}a();a();var Mr=require("react");function Un(e){let{code:t,children:o,preview:r}=e,n=(0,Mr.useMemo)(()=>(t??(typeof o=="string"?o:"")).trim(),[t,o]),s=(0,Mr.useMemo)(()=>r??(typeof o!="string"?o:null),[r,o]);return{initialCode:n,previewElement:s}}var Ct=require("react/jsx-runtime");function Do(e){let{highlightedHtml:t,hideCode:o=!1,hideSandbox:r=!1,hideCopy:n=!1,sandboxOptions:s={}}=e,{initialCode:i,previewElement:c}=Un(e);return(0,Ct.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,Ct.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:c}),!o&&(0,Ct.jsx)("div",{className:"border-t border-border-subtle",children:(0,Ct.jsx)(Be,{hideSandbox:r,hideCopy:n,title:s.title,lang:"tsx",highlightedHtml:t,plain:!0,children:i})})]})}a();var is=require("react"),We=require("lucide-react");zo();var K=require("react/jsx-runtime"),ui=e=>{let[t,o]=(0,is.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let s=new Blob([e],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(s);window.open(i,"_blank")}}};function Lt({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:s,handleOpenRaw:i}=ui(r),c=o!==!1,l=typeof o=="object"&&o.text||"Copy Markdown";return!c||!r?null:(0,K.jsx)("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:(0,K.jsxs)(_t,{className:"rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden",children:[(0,K.jsx)(pe,{variant:"ghost",onPress:s,icon:n?(0,K.jsx)(We.Check,{size:16}):(0,K.jsx)(We.Copy,{size:16}),iconPosition:"left",className:m("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":l}),(0,K.jsxs)(T.Trigger,{placement:"bottom end",children:[(0,K.jsx)(pe,{variant:"ghost",isIconOnly:!0,icon:(0,K.jsx)(We.ChevronDown,{size:14}),className:m("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),(0,K.jsxs)(T.Root,{className:"w-52",children:[(0,K.jsxs)(T.Item,{onAction:s,children:[(0,K.jsx)(We.Copy,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,K.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,K.jsxs)(T.Item,{onAction:i,children:[(0,K.jsx)(We.ExternalLink,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,K.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}a();N();Wr();var M=require("react/jsx-runtime");function Qo(){return(0,M.jsx)("div",{className:m("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:(0,M.jsxs)("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[(0,M.jsxs)("div",{className:"flex gap-2",children:[(0,M.jsx)(_,{className:"h-3 w-16"}),(0,M.jsx)(_,{className:"h-3 w-24"})]}),(0,M.jsx)(_,{className:"h-10 w-[60%] sm:h-12"}),(0,M.jsxs)("div",{className:"space-y-3",children:[(0,M.jsx)(_,{className:"h-4 w-full"}),(0,M.jsx)(_,{className:"h-4 w-[95%]"}),(0,M.jsx)(_,{className:"h-4 w-[40%]"})]}),(0,M.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,M.jsx)(_,{className:"h-7 w-32"}),(0,M.jsxs)("div",{className:"space-y-3",children:[(0,M.jsx)(_,{className:"h-4 w-full"}),(0,M.jsx)(_,{className:"h-4 w-[98%]"}),(0,M.jsx)(_,{className:"h-4 w-[92%]"}),(0,M.jsx)(_,{className:"h-4 w-[60%]"})]})]}),(0,M.jsx)(_,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),(0,M.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,M.jsx)(_,{className:"h-7 w-48"}),(0,M.jsxs)("div",{className:"space-y-3",children:[(0,M.jsx)(_,{className:"h-4 w-full"}),(0,M.jsx)(_,{className:"h-4 w-[85%]"})]})]})]})})}var Re=require("react/jsx-runtime"),kt=({level:e,id:t,children:o,...r})=>{let n=`h${e}`;return(0,Re.jsxs)(n,{id:t,...r,className:"boltdocs-heading",children:[o,t&&(0,Re.jsx)("a",{href:`#${t}`,className:"header-anchor","aria-label":"Anchor",children:(0,Re.jsx)(ls.Link,{size:16})})]})},cs={...Gr,Loading:Qo,h1:e=>(0,Re.jsx)(kt,{level:1,...e}),h2:e=>(0,Re.jsx)(kt,{level:2,...e}),h3:e=>(0,Re.jsx)(kt,{level:3,...e}),h4:e=>(0,Re.jsx)(kt,{level:4,...e}),h5:e=>(0,Re.jsx)(kt,{level:5,...e}),h6:e=>(0,Re.jsx)(kt,{level:6,...e}),pre:e=>(0,Re.jsx)(Be,{...e,children:e.children})};var ps=I(require("virtual:boltdocs-mdx-components"));me();var ds=require("react-router-dom");Et();var P=require("react/jsx-runtime");function fi(){let{currentLocale:e,config:t}=A();return(0,oe.useEffect)(()=>{if(!t.i18n)return;let o=t.i18n.localeConfigs?.[e];document.documentElement.lang=o?.htmlLang||e||"en",document.documentElement.dir=o?.direction||"ltr"},[e,t.i18n]),null}function gi(){let e=(0,ds.useLocation)(),{config:t}=A(),o=ce(i=>i.setLocale),r=ce(i=>i.setVersion),n=ce(i=>i.currentLocale),s=ce(i=>i.currentVersion);return(0,oe.useEffect)(()=>{let i=e.pathname.split("/").filter(Boolean),c=0,l=t.versions?.defaultVersion,u=t.i18n?.defaultLocale;if(i[c]==="docs"&&c++,t.versions&&i.length>c){let d=t.versions.versions.find(p=>p.path===i[c]);d&&(l=d.path,c++)}t.i18n&&i.length>c&&t.i18n.locales[i[c]]?u=i[c]:t.i18n&&i.length===0&&(u=n||t.i18n.defaultLocale),u!==n&&o(u),l!==s&&r(l)},[e.pathname,t,o,r,n,s]),null}function bi({initialRoutes:e,initialConfig:t,docsDirName:o,modules:r,hot:n,homePage:s,externalPages:i,externalLayout:c,components:l={}}){let[u,d]=(0,oe.useState)(e),[p,f]=(0,oe.useState)(t),h=i||{},x=c||_r.default,v=(0,oe.useMemo)(()=>u.filter(R=>!(s&&(R.path==="/"||R.path===""))&&!h[R.path===""?"/":R.path]).map(R=>{let se=Object.keys(r).find(X=>X===`/${o}/${R.filePath}`||X.endsWith(`/${o}/${R.filePath}`)||X.endsWith(`/${o}\\${R.filePath.replace(/\\/g,"/")}`)),he=se?r[se]:null;return{...R,Component:oe.default.lazy(async()=>he?await he():{default:Ot})}}),[u,r,o,s,h]);(0,oe.useEffect)(()=>{n&&(n.on("boltdocs:routes-update",R=>{d(R)}),n.on("boltdocs:config-update",R=>{f(R)}))},[n]);let b=(0,oe.useMemo)(()=>({...cs,...ps.default,...l}),[l]),S=b.Loading;return(0,P.jsx)(sn,{children:(0,P.jsx)(vn,{components:b,children:(0,P.jsx)(Cr.Provider,{value:p,children:(0,P.jsx)(mn,{children:(0,P.jsxs)(Xr,{routes:u,modules:r,children:[(0,P.jsx)(fn,{}),(0,P.jsx)(gi,{}),(0,P.jsx)(fi,{}),(0,P.jsxs)(Pe.Routes,{children:[(0,P.jsx)(Pe.Route,{element:(0,P.jsx)(hn,{}),children:v.map(R=>(0,P.jsx)(Pe.Route,{path:R.path===""?"/":R.path,element:(0,P.jsx)(oe.default.Suspense,{fallback:(0,P.jsx)(S,{}),children:(0,P.jsx)(Rn,{Component:R.Component})})},R.path))},"docs-layout"),s&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Pe.Route,{path:"/",element:(0,P.jsx)(x,{children:(0,P.jsx)(s,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(R=>(0,P.jsx)(Pe.Route,{path:`/${R}`,element:(0,P.jsx)(x,{children:(0,P.jsx)(s,{})})},`home-${R}`))]}),Object.entries(h).map(([R,se])=>{let he=R==="/"?"":R;return(0,P.jsxs)(oe.default.Fragment,{children:[(0,P.jsx)(Pe.Route,{path:R,element:(0,P.jsx)(x,{children:(0,P.jsx)(se,{})})}),p.i18n&&Object.keys(p.i18n.locales).map(X=>(0,P.jsx)(Pe.Route,{path:`/${X}${he}`,element:(0,P.jsx)(x,{children:(0,P.jsx)(se,{})})},`${R}-${X}`))]},R)}),(0,P.jsx)(Pe.Route,{path:"*",element:(0,P.jsx)(_r.default,{children:(0,P.jsx)(Ot,{})})})]})]})})})})})}function us(e){let{target:t,routes:o,docsDirName:r,config:n,modules:s,hot:i,homePage:c,externalPages:l,externalLayout:u,components:d}=e,p=document.querySelector(t);if(!p)throw new Error(`[boltdocs] Mount target "${t}" not found in document.`);let f=(0,P.jsx)(oe.default.StrictMode,{children:(0,P.jsx)(Pe.BrowserRouter,{children:(0,P.jsx)(bi,{initialRoutes:o,initialConfig:n,docsDirName:r,modules:s,hot:i,homePage:c,externalPages:l,externalLayout:u,components:d})})});p.innerHTML="",ms.default.createRoot(p).render(f)}Ne();me();a();a();var fs=require("react-router-dom");Ne();a();function Ye(e,t){return e?typeof e=="string"?e:t&&e[t]?e[t]:Object.values(e)[0]||"":""}me();function er(){let e=W(),{theme:t}=je(),o=(0,fs.useLocation)(),{currentLocale:r}=A(),n=e.theme||{},s=Ye(n.title,r)||"Boltdocs",i=n.navbar||[],c=n.socialLinks||[],l=n.githubRepo,u=i.map(x=>{let v=x.href||x.to||x.link||"",b=S=>{let R=o.pathname;if(R===S)return!0;if(!S||S==="/")return R==="/";let se=tt=>{let xe=tt.split("/").filter(Boolean),ot=0;return e.i18n?.locales&&xe[ot]&&e.i18n.locales[xe[ot]]&&ot++,e.versions?.versions&&xe[ot]&&e.versions.versions.some(Fs=>Fs.path===xe[ot])&&ot++,xe.slice(ot)},he=se(S),X=se(R);return he.length===0?X.length===0:X.length<he.length?!1:he.every((tt,xe)=>X[xe]===tt)};return{label:Ye(x.label||x.text,r),href:v,active:b(v),to:v.startsWith("http")||v.startsWith("//")?"external":void 0}}),d=n.logo,p=d?typeof d=="string"?d:t==="dark"?d.dark:d.light:null,f={alt:(d&&typeof d=="object"?d.alt:void 0)||s,width:d&&typeof d=="object"?d.width:void 0,height:d&&typeof d=="object"?d.height:void 0},h=l?`https://github.com/${l}`:null;return{links:u,title:s,logo:p,logoProps:f,github:h,social:c,config:e,theme:t}}a();var gs=require("react-router-dom");Ne();function tr(e){let t=W(),o=(0,gs.useLocation)(),r=p=>p.endsWith("/")&&p.length>1?p.slice(0,-1):p,n=r(o.pathname),s=e.find(p=>r(p.path)===n),i=s?.tab?.toLowerCase(),c=i?e.filter(p=>!p.tab||p.tab.toLowerCase()===i):e,l=[],u=new Map;for(let p of c)p.group?(u.has(p.group)||u.set(p.group,{slug:p.group,title:p.groupTitle||p.group,routes:[],icon:p.groupIcon}),u.get(p.group).routes.push(p)):l.push(p);return{groups:Array.from(u.values()),ungrouped:l,activeRoute:s,activePath:n,config:t}}jr();a();var hs=require("react");function rr(e=[]){let[t,o]=(0,hs.useState)(null);return{headings:e,activeId:t,setActiveId:o}}a();var xs=require("react-router-dom"),St=require("react");function nr(e=[],t=[]){let o=(0,xs.useLocation)(),r=(0,St.useRef)([]),[n,s]=(0,St.useState)({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),c=t.find(d=>d.path===o.pathname)?.tab?.toLowerCase(),l=e.findIndex(d=>d.id.toLowerCase()===c),u=l===-1?0:l;return(0,St.useEffect)(()=>{let d=r.current[u];d&&s({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[u,e.length,o.pathname]),{tabs:e,activeIndex:u,indicatorStyle:n,tabRefs:r,activeTabId:c}}a();var vs=require("react-router-dom");a();function Qe(e,t,o){let r=e;return t&&(r===t||r.startsWith(t+"/"))&&(r=r===t?"index.md":r.slice(t.length+1)),o&&(r===o||r.startsWith(o+"/"))&&(r=r===o?"index.md":r.slice(o.length+1)),r}me();Et();function sr(){let e=(0,vs.useNavigate)(),t=A(),{allRoutes:o,currentRoute:r,currentVersion:n,currentLocale:s,config:i}=t,c=i.versions,l=ce(p=>p.setVersion),u=p=>{if(!c||p===n)return;l(p);let f=`/docs/${p}`;if(r){let h=Qe(r.filePath,r.version,r.locale),x=o.find(v=>Qe(v.filePath,v.version,v.locale)===h&&(v.version||c.defaultVersion)===p&&(s?v.locale===s:!v.locale));if(x)f=x.path;else{let v=o.find(b=>Qe(b.filePath,b.version,b.locale)==="index.md"&&(b.version||c.defaultVersion)===p&&(s?b.locale===s:!b.locale));f=v?v.path:`/docs/${p}${s?`/${s}`:""}`}}e(f)},d=t.availableVersions.map(p=>({...p,label:p.label,value:p.key}));return{currentVersion:n,currentVersionLabel:t.currentVersionLabel,availableVersions:d,handleVersionChange:u}}a();var ys=require("react-router-dom");me();Et();function ar(){let e=(0,ys.useNavigate)(),t=A(),{allRoutes:o,currentRoute:r,currentLocale:n,config:s}=t,i=s.i18n,c=ce(f=>f.setLocale),l=f=>{if(!i||f===n)return;c(f);let h="/";if(r){let x=Qe(r.filePath,r.version,r.locale),v=o.find(b=>Qe(b.filePath,b.version,b.locale)===x&&(b.locale||i.defaultLocale)===f&&b.version===r.version);if(v)h=v.path;else{let b=o.find(S=>Qe(S.filePath,S.version,S.locale)==="index.md"&&(S.locale||i.defaultLocale)===f&&S.version===r.version);h=b?b.path:f===i.defaultLocale?r.version?`/${r.version}`:"/":r.version?`/${r.version}/${f}`:`/${f}`}}else{let x=o.find(v=>(v.filePath==="index.mdx"||v.filePath==="index.md")&&(v.locale||i.defaultLocale)===f&&!v.version);x?h=x.path:h=f===i.defaultLocale?"/":`/${f}`}e(h)},d=s.i18n?.localeConfigs?.[n]?.label||s.i18n?.locales[n]||n,p=s.i18n?Object.entries(s.i18n.locales).map(([f,h])=>{let x=s.i18n?.localeConfigs?.[f];return{key:f,label:x?.label||h,value:f,isCurrent:f===n}}):[];return{currentLocale:n,currentLocaleLabel:d,availableLocales:p,handleLocaleChange:l}}a();var Cs=require("react-router-dom");me();function ir(){let{routes:e,currentRoute:t}=A(),o=(0,Cs.useLocation)();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let r=t.tab?.toLowerCase(),n=r?e.filter(l=>l.tab?.toLowerCase()===r):e.filter(l=>!l.tab),s=n.findIndex(l=>l.path===o.pathname),i=s>0?n[s-1]:null,c=s!==-1&&s<n.length-1?n[s+1]:null;return{prevPage:i,nextPage:c,currentRoute:t}}a();me();function lr(){let{currentRoute:e}=A(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}eo();a();var Rs=require("react-router-dom"),cr=()=>(0,Rs.useLocation)();a();N();var at=require("react/jsx-runtime");function hi({children:e,className:t,style:o}){return(0,at.jsx)("div",{className:m("h-screen flex flex-col overflow-hidden bg-bg-main text-text-main",t),style:o,children:e})}function xi({children:e,className:t,style:o}){return(0,at.jsx)("div",{className:m("mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden",t),style:o,children:e})}function vi({children:e,className:t,style:o}){return(0,at.jsx)("main",{className:m("boltdocs-content flex-1 min-w-0 overflow-y-auto","contain-layout",t),style:o,children:e})}function yi({children:e,className:t,style:o}){let{pathname:r}=cr();return(0,at.jsx)("div",{className:m("boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8",{"max-w-content-max":r.includes("/docs/")},t),style:o,children:e})}function Ci({children:e,className:t,style:o}){return(0,at.jsx)("div",{className:m("flex items-center justify-between mb-10",t),style:o,children:e})}function Ri({children:e,className:t,style:o}){return(0,at.jsx)("div",{className:m("mt-20",t),style:o,children:e})}var et=Object.assign(hi,{Body:xi,Content:vi,ContentMdx:yi,ContentHeader:Ci,ContentFooter:Ri});a();a();var ur=require("react");me();Wt();a();var mr=require("react"),Ge=require("lucide-react");var Ps=require("react-aria-components");jt();var Q=require("react/jsx-runtime");function Ns(){let{theme:e,setTheme:t}=je(),[o,r]=(0,mr.useState)(!1);if((0,mr.useEffect)(()=>{r(!0)},[]),!o)return(0,Q.jsx)("div",{className:"h-9 w-9"});let n=e==="system"?Ge.Monitor:e==="dark"?Ge.Moon:Ge.Sun;return(0,Q.jsxs)(T.Trigger,{placement:"bottom right",children:[(0,Q.jsx)(Ps.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,Q.jsx)(n,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),(0,Q.jsxs)(T.Root,{selectionMode:"single",selectedKeys:[e],onSelectionChange:s=>{let i=Array.from(s)[0];t(i)},children:[(0,Q.jsxs)(T.Item,{id:"light",children:[(0,Q.jsx)(Ge.Sun,{size:16}),(0,Q.jsx)("span",{children:"Light"})]}),(0,Q.jsxs)(T.Item,{id:"dark",children:[(0,Q.jsx)(Ge.Moon,{size:16}),(0,Q.jsx)("span",{children:"Dark"})]}),(0,Q.jsxs)(T.Item,{id:"system",children:[(0,Q.jsx)(Ge.Monitor,{size:16}),(0,Q.jsx)("span",{children:"System"})]})]})]})}a();var pr=require("react");a();var Pi="https://api.github.com";async function ws(e,t,o=Pi){let r=new Headers;t&&r.append("authorization",t);let s=await(await fetch(`${o}/repos/${e}`,{headers:r})).json();return s.stargazers_count!==void 0?Ni(s.stargazers_count):"0"}var Ni=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);Dt();var qt=require("react/jsx-runtime");function Ts({repo:e}){let[t,o]=(0,pr.useState)(null);return(0,pr.useEffect)(()=>{e&&ws(e).then(r=>o(r)).catch(()=>o("0"))},[e]),(0,qt.jsxs)("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:[(0,qt.jsx)(ao,{className:"h-4 w-4"}),t&&(0,qt.jsx)("span",{className:"tabular-nums",children:t})]})}a();Jo();nt();var wi=I(require("lucide-react"));me();var De=require("react/jsx-runtime");function Ls({tabs:e,routes:t}){let{currentLocale:o}=A(),{indicatorStyle:r,tabRefs:n,activeIndex:s}=nr(e,t),i=c=>{if(!c)return null;if(c.trim().startsWith("<svg"))return(0,De.jsx)("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:c}});let l=wi[c];return l?(0,De.jsx)(l,{size:16}):(0,De.jsx)("img",{src:c,alt:"",className:"h-4 w-4 object-contain"})};return(0,De.jsx)("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:(0,De.jsxs)(Ie.List,{className:"border-none py-0",children:[e.map((c,l)=>{let u=l===s,d=t.find(f=>f.tab&&f.tab.toLowerCase()===c.id.toLowerCase()),p=d?d.path:"#";return(0,De.jsxs)(G,{href:p,ref:f=>{n.current[l]=f},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${u?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[i(c.icon),(0,De.jsx)("span",{children:Ye(c.text,o)})]},c.id)}),(0,De.jsx)(Ie.Indicator,{style:r})]})})}var As=require("react-router-dom");jt();Vt();var Kt=require("lucide-react");eo();var C=require("react/jsx-runtime"),Li=(0,ur.lazy)(()=>Promise.resolve().then(()=>(Is(),Ss)).then(e=>({default:e.SearchDialog})));function fr(){let{links:e,title:t,logo:o,logoProps:r,github:n,social:s,config:i}=er(),{routes:c,allRoutes:l,currentVersion:u,currentLocale:d}=A(),{pathname:p}=(0,As.useLocation)(),f=i.theme||{},h=p.startsWith("/docs"),x=f?.tabs&&f.tabs.length>0;return(0,C.jsxs)(ee.Root,{className:x?"border-b-0":"",children:[(0,C.jsxs)(ee.Content,{children:[(0,C.jsxs)(ee.Left,{children:[o&&(0,C.jsx)(ee.Logo,{src:o,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),(0,C.jsx)(ee.Title,{children:t}),i.versions&&u&&(0,C.jsx)(Si,{})]}),(0,C.jsx)(ee.Center,{children:(0,C.jsx)(ur.Suspense,{fallback:(0,C.jsx)("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:(0,C.jsx)(Li,{routes:c||[]})})}),(0,C.jsxs)(ee.Right,{children:[(0,C.jsx)(ee.Links,{children:e.map(v=>(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(ki,{link:v},v.href)}))}),i.i18n&&d&&(0,C.jsx)(Ii,{}),(0,C.jsx)(ee.Split,{}),(0,C.jsx)(Ns,{}),n&&(0,C.jsx)(Ts,{repo:f?.githubRepo??""}),s.length>0&&(0,C.jsx)(ee.Split,{}),(0,C.jsx)("div",{className:"flex items-center gap-1",children:s.map(({icon:v,link:b})=>(0,C.jsx)(ee.Socials,{icon:v,link:b,className:"p-1.5"},b))})]})]}),h&&x&&f?.tabs&&(0,C.jsx)("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:(0,C.jsx)(Ls,{tabs:f.tabs,routes:l||c||[]})})]})}function ki({link:e}){let t=rt(e.href||"");return(0,C.jsx)(ee.Link,{...e,href:t})}function Si(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:o}=sr();return t.length===0?null:(0,C.jsxs)(T.Trigger,{children:[(0,C.jsx)(pe,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:(0,C.jsx)(Kt.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,C.jsx)("span",{className:"font-semibold text-[0.8125rem]",children:e})}),(0,C.jsx)(T.Root,{children:(0,C.jsx)(T.Section,{items:t,children:r=>(0,C.jsx)(T.Item,{onPress:()=>o(r.value),children:r.label},`${r.value??""}`)})})]})}function Ii(){let{currentLocale:e,availableLocales:t,handleLocaleChange:o}=ar();return t.length===0?null:(0,C.jsxs)(T.Trigger,{children:[(0,C.jsx)(pe,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:(0,C.jsx)(Kt.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,C.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,C.jsx)(Kt.Languages,{className:"w-3.5 h-3.5 text-primary-500"}),(0,C.jsx)("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),(0,C.jsx)(T.Root,{children:(0,C.jsx)(T.Section,{items:t,children:r=>(0,C.jsx)(T.Item,{onPress:()=>o(r.value),children:(0,C.jsxs)("div",{className:"flex items-center justify-between w-full gap-4",children:[(0,C.jsx)("span",{children:r.label}),(0,C.jsx)("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:r.value})]})},`${r.value??""}`)})})]})}a();var It=require("react");Yo();a();var Bs=require("lucide-react"),it=require("react/jsx-runtime");function Ms(){return(0,it.jsx)("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:(0,it.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,it.jsx)(Bs.Zap,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),(0,it.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,it.jsx)("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}var Ai=I(require("lucide-react")),He=require("react/jsx-runtime");function Es(e){return e&&Ai[e]||void 0}function Bi({group:e,activePath:t,getIcon:o}){let r=(0,It.useMemo)(()=>e.routes.some(i=>i.path===t),[e.routes,t]),[n,s]=(0,It.useState)(!0);return(0,It.useEffect)(()=>{r&&s(!0)},[r]),(0,He.jsx)(be.Group,{title:e.title,isOpen:n,onToggle:()=>s(!n),children:e.routes.map(i=>{let c=t===(i.path.endsWith("/")?i.path.slice(0,-1):i.path);return(0,He.jsx)(be.Link,{label:i.title,href:i.path,active:c,icon:o(i.icon),badge:i.badge},i.path)})})}function gr({routes:e,config:t}){let{groups:o,ungrouped:r,activePath:n}=tr(e),s=t.theme||{};return(0,He.jsxs)(be.Root,{children:[r.length>0&&(0,He.jsx)(be.Group,{className:"mb-6",children:r.map(i=>{let c=n===(i.path.endsWith("/")?i.path.slice(0,-1):i.path);return(0,He.jsx)(be.Link,{label:i.title,href:i.path,active:c,icon:Es(i.icon),badge:i.badge},i.path)})}),o.map(i=>(0,He.jsx)(Bi,{group:i,activePath:n,getIcon:Es},i.slug)),s?.poweredBy&&(0,He.jsx)("div",{className:"mt-auto pt-8",children:(0,He.jsx)(Ms,{})})]})}a();qo();var Ae=I(require("react"));var At=require("lucide-react"),D=require("react/jsx-runtime");function br({headings:e=[],editLink:t,communityHelp:o,filePath:r}){let{headings:n}=rr(e),s=Ae.default.useMemo(()=>n.map(i=>({title:i.text,url:`#${i.id}`,depth:i.level})),[n]);return n.length===0?null:(0,D.jsx)(jo,{toc:s,children:(0,D.jsx)(Mi,{headings:n,editLink:t,communityHelp:o,filePath:r})})}function Mi({headings:e,editLink:t,communityHelp:o,filePath:r}){let n=_o(),[s,i]=(0,Ae.useState)({opacity:0}),c=(0,Ae.useRef)(null),l=(0,Ae.useRef)(null);(0,Ae.useEffect)(()=>{if(!n||!c.current)return;let d=c.current.querySelector(`a[href="#${n}"]`);d&&i({transform:`translateY(${d.offsetTop}px)`,height:`${d.offsetHeight}px`,opacity:1})},[n]);let u=(0,Ae.useCallback)((d,p)=>{d.preventDefault();let f=document.getElementById(p);f&&(f.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${p}`))},[]);return(0,D.jsxs)(q.Root,{children:[(0,D.jsxs)(q.Header,{className:"flex flex-row gap-x-2",children:[(0,D.jsx)(At.TextAlignStart,{size:16}),"On this page"]}),(0,D.jsx)(Uo,{containerRef:l,children:(0,D.jsxs)(q.Content,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:l,children:[(0,D.jsx)(q.Indicator,{style:s}),(0,D.jsx)("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:c,children:e.map(d=>(0,D.jsx)(q.Item,{level:d.level,children:(0,D.jsx)(q.Link,{href:`#${d.id}`,active:n===d.id,onClick:p=>u(p,d.id),className:"pl-4",children:d.text})},d.id))})]})}),(t||o)&&(0,D.jsxs)("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[(0,D.jsx)("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),(0,D.jsxs)("ul",{className:"space-y-3",children:[t&&r&&(0,D.jsx)("li",{children:(0,D.jsxs)("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:[(0,D.jsx)(At.Pencil,{size:16}),"Edit this page"]})}),o&&(0,D.jsx)("li",{children:(0,D.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,D.jsx)(At.CircleHelp,{size:16}),"Community help"]})})]})]})]})}a();var Os=require("react"),Vs=require("react-router-dom");function hr({siteTitle:e,siteDescription:t,routes:o}){let r=(0,Vs.useLocation)();return(0,Os.useEffect)(()=>{let n=o.find(u=>u.path===r.pathname),s=n?.title,i=n?.description||t||"";document.title=s?`${s} | ${e}`:e;let c=document.querySelector('meta[name="description"]');c||(c=document.createElement("meta"),c.name="description",document.head.appendChild(c)),c.content=i,lt("property","og:title",document.title),lt("property","og:description",i),lt("property","og:type","article"),lt("property","og:url",window.location.href),lt("name","twitter:card","summary"),lt("name","twitter:title",document.title),lt("name","twitter:description",i);let l=document.querySelector('link[rel="canonical"]');l||(l=document.createElement("link"),l.rel="canonical",document.head.appendChild(l)),l.href=window.location.origin+r.pathname},[r.pathname,e,t,o]),null}function lt(e,t,o){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=o}a();var Ds=require("lucide-react");Zo();N();Ne();var _e=require("react/jsx-runtime");function xr(){let{crumbs:e,activeRoute:t}=lr(),r=W().theme||{};return e.length===0||!r?.breadcrumbs?null:(0,_e.jsxs)(le.Root,{children:[(0,_e.jsx)(le.Item,{children:(0,_e.jsx)(le.Link,{href:"/",children:(0,_e.jsx)(Ds.Home,{size:14})})}),e.map((n,s)=>(0,_e.jsxs)(le.Item,{children:[(0,_e.jsx)(le.Separator,{}),(0,_e.jsx)(le.Link,{href:n.href,className:m({"font-medium text-text-main":n.href===t?.path}),children:n.label})]},`crumb-${n.href}-${n.label}-${s}`))]})}a();Xo();var ze=require("react/jsx-runtime");function vr(){let{prevPage:e,nextPage:t}=ir();return!e&&!t?null:(0,ze.jsxs)(Y.Root,{className:"animate-in fade-in slide-in-from-bottom-4 duration-700",children:[e?(0,ze.jsxs)(Y.Link,{to:e.path,direction:"prev",children:[(0,ze.jsx)(Y.Title,{children:"Previous"}),(0,ze.jsx)(Y.Description,{children:e.title})]}):(0,ze.jsx)("div",{}),t&&(0,ze.jsxs)(Y.Link,{to:t.path,direction:"next",children:[(0,ze.jsx)(Y.Title,{children:"Next"}),(0,ze.jsx)(Y.Description,{children:t.title})]})]})}a();var Hs=require("react");zo();var Bt=require("react/jsx-runtime"),Mt=class extends Hs.Component{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error in Boltdocs Layout:",t,o)}render(){return this.state.hasError?this.props.fallback||(0,Bt.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[(0,Bt.jsx)("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),(0,Bt.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,Bt.jsx)(pe,{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}};me();Ne();var zs=require("react-router-dom");var ne=require("react/jsx-runtime");function $s({children:e}){let{routes:t,allRoutes:o,currentRoute:r,currentLocale:n}=A(),{pathname:s}=(0,zs.useLocation)(),i=W(),l=ct().CopyMarkdown||Lt,u=s==="/"||s==="";return(0,ne.jsxs)(et,{children:[(0,ne.jsx)(hr,{siteTitle:Ye(i.theme?.title,n)||"Boltdocs",siteDescription:Ye(i.theme?.description,n)||"",routes:o}),(0,ne.jsx)(fr,{}),(0,ne.jsxs)(et.Body,{children:[!u&&(0,ne.jsx)(gr,{routes:t,config:i}),(0,ne.jsxs)(et.Content,{children:[!u&&(0,ne.jsxs)(et.ContentHeader,{children:[(0,ne.jsx)(xr,{}),(0,ne.jsx)(l,{mdxRaw:r?._rawContent,route:r,config:i.theme?.copyMarkdown})]}),(0,ne.jsx)(Mt,{children:e}),!u&&(0,ne.jsx)(et.ContentFooter,{children:(0,ne.jsx)(vr,{})})]}),!u&&(0,ne.jsx)(br,{headings:r?.headings,editLink:i.theme?.editLink,communityHelp:i.theme?.communityHelp,filePath:r?.filePath})]})]})}Wt();Vr();$o();qo();Xo();Jo();Yo();Zo();Vt();zr();jt();$r();kr();nt();Wr();N();
|