boltdocs 2.6.2 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/bin/boltdocs.js +0 -1
  2. package/dist/cache-CQKlT4fI.mjs +6 -0
  3. package/dist/cache-DorPMFgW.cjs +6 -0
  4. package/dist/cards-BLoSiRuL.d.ts +30 -0
  5. package/dist/cards-CQn9mXZS.d.cts +30 -0
  6. package/dist/chunk-Ds5LZdWN.cjs +6 -0
  7. package/dist/client/index.cjs +1 -1
  8. package/dist/client/index.d.cts +167 -1338
  9. package/dist/client/index.d.ts +166 -1337
  10. package/dist/client/index.js +1 -1
  11. package/dist/{package-CFP44vfn.cjs → client/mdx.cjs} +1 -1
  12. package/dist/client/mdx.d.cts +128 -0
  13. package/dist/client/mdx.d.ts +129 -0
  14. package/dist/client/mdx.js +6 -0
  15. package/dist/client/primitives.cjs +6 -0
  16. package/dist/client/primitives.d.cts +818 -0
  17. package/dist/client/primitives.d.ts +818 -0
  18. package/dist/client/primitives.js +6 -0
  19. package/dist/client/theme/neutral.css +74 -361
  20. package/dist/client/theme/reset.css +189 -0
  21. package/dist/docs-layout-BlDhcQRv.cjs +6 -0
  22. package/dist/docs-layout-BvAOWEJw.js +6 -0
  23. package/dist/doctor-BQiQhCTl.cjs +6 -0
  24. package/dist/doctor-COpf35L2.cjs +20 -0
  25. package/dist/doctor-Dh1XP7Pz.mjs +20 -0
  26. package/dist/generator-DGW6pkCC.cjs +22 -0
  27. package/dist/generator-Dv3wEmhZ.mjs +22 -0
  28. package/dist/icons-dev-CrQLjoQp.js +6 -0
  29. package/dist/icons-dev-rzdz6Lf3.cjs +6 -0
  30. package/dist/image-BkIfa9oo.js +6 -0
  31. package/dist/image-DIGjCPe6.cjs +6 -0
  32. package/dist/mdx-K0WYBAJ3.js +7 -0
  33. package/dist/mdx-hpErbRUe.cjs +7 -0
  34. package/dist/meta-loader-0gJ4PtBC.cjs +6 -0
  35. package/dist/meta-loader-9IpAHWDS.mjs +6 -0
  36. package/dist/node/cli-entry.cjs +1 -2
  37. package/dist/node/cli-entry.mjs +1 -2
  38. package/dist/node/index.cjs +1 -1
  39. package/dist/node/index.d.cts +55 -11
  40. package/dist/node/index.d.mts +55 -12
  41. package/dist/node/index.mjs +1 -1
  42. package/dist/node/routes/worker.cjs +6 -0
  43. package/dist/node/routes/worker.d.cts +2 -0
  44. package/dist/node/routes/worker.d.mts +2 -0
  45. package/dist/node/routes/worker.mjs +6 -0
  46. package/dist/node-C2nWXElP.mjs +112 -0
  47. package/dist/node-CinkUtxV.cjs +112 -0
  48. package/dist/package-BMYLDBBP.cjs +6 -0
  49. package/dist/{package-Bqbn1AYK.mjs → package-HegMOTL_.mjs} +1 -1
  50. package/dist/parser-Bh11BsdA.cjs +6 -0
  51. package/dist/parser-D8eQvE7N.mjs +6 -0
  52. package/dist/parser-DYRzXWmA.cjs +6 -0
  53. package/dist/routes-CHf76Ye4.cjs +6 -0
  54. package/dist/routes-CMUZGI6T.mjs +6 -0
  55. package/dist/routes-Co1mRM58.cjs +6 -0
  56. package/dist/search-dialog-BACuzoVX.cjs +6 -0
  57. package/dist/search-dialog-BKagVT17.js +6 -0
  58. package/dist/search-dialog-C8w12eUx.js +6 -0
  59. package/dist/search-dialog-CGyrozZE.cjs +6 -0
  60. package/dist/search-dialog-D26rUnJ_.cjs +6 -0
  61. package/dist/sidebar-DKvg6KOc.d.cts +491 -0
  62. package/dist/sidebar-Dr1TiRIy.d.ts +491 -0
  63. package/dist/utils-BxNAXhZZ.mjs +7 -0
  64. package/dist/utils-Clzu7jvb.cjs +7 -0
  65. package/dist/worker-pool-Bd8Y9KDv.mjs +6 -0
  66. package/dist/worker-pool-BwU8ckrg.cjs +6 -0
  67. package/package.json +27 -8
  68. package/src/client/app/doc-page.tsx +9 -5
  69. package/src/client/app/docs-layout.tsx +17 -3
  70. package/src/client/app/head.tsx +122 -0
  71. package/src/client/app/helmet-compat.tsx +36 -0
  72. package/src/client/app/mdx-component.tsx +5 -52
  73. package/src/client/app/mdx-components-context.tsx +32 -8
  74. package/src/client/app/routes-context.tsx +2 -2
  75. package/src/client/app/scroll-handler.tsx +1 -1
  76. package/src/client/app/theme-context.tsx +5 -5
  77. package/src/client/app/ui-context.tsx +42 -0
  78. package/src/client/components/docs-layout-default.tsx +85 -0
  79. package/src/client/components/icons-dev.tsx +38 -15
  80. package/src/client/components/mdx/callout.tsx +97 -0
  81. package/src/client/components/mdx/card.tsx +73 -98
  82. package/src/client/components/mdx/cards.tsx +27 -0
  83. package/src/client/components/mdx/code-block.tsx +37 -17
  84. package/src/client/components/mdx/field.tsx +24 -56
  85. package/src/client/components/mdx/image.tsx +36 -15
  86. package/src/client/components/mdx/index.ts +19 -53
  87. package/src/client/components/mdx/table.tsx +46 -148
  88. package/src/client/components/mdx/typographics.tsx +120 -0
  89. package/src/client/components/mdx/{hooks/use-code-block.ts → use-code-block.ts} +5 -7
  90. package/src/client/components/primitives/breadcrumbs.tsx +5 -24
  91. package/src/client/components/primitives/button.tsx +3 -142
  92. package/src/client/components/primitives/code-block.tsx +104 -97
  93. package/src/client/components/{docs-layout.tsx → primitives/docs-layout.tsx} +15 -24
  94. package/src/client/components/primitives/error-boundary.tsx +107 -0
  95. package/src/client/components/primitives/heading.tsx +128 -0
  96. package/src/client/components/primitives/helpers/observer.ts +62 -32
  97. package/src/client/components/primitives/image.tsx +26 -0
  98. package/src/client/components/primitives/link.tsx +50 -52
  99. package/src/client/components/primitives/menu.tsx +25 -49
  100. package/src/client/components/primitives/navbar.tsx +234 -59
  101. package/src/client/components/primitives/on-this-page.tsx +169 -40
  102. package/src/client/components/primitives/page-nav.tsx +11 -39
  103. package/src/client/components/primitives/popover.tsx +12 -30
  104. package/src/client/components/primitives/search-dialog.tsx +77 -71
  105. package/src/client/components/primitives/sidebar.tsx +312 -119
  106. package/src/client/components/primitives/skeleton.tsx +1 -1
  107. package/src/client/components/primitives/tabs.tsx +5 -16
  108. package/src/client/components/primitives/tooltip.tsx +1 -1
  109. package/src/client/components/ui-base/banner.tsx +66 -0
  110. package/src/client/components/ui-base/breadcrumbs.tsx +26 -20
  111. package/src/client/components/ui-base/copy-markdown.tsx +43 -35
  112. package/src/client/components/ui-base/error-boundary.tsx +9 -46
  113. package/src/client/components/ui-base/github-stars.tsx +5 -3
  114. package/src/client/components/ui-base/index.ts +3 -3
  115. package/src/client/components/ui-base/last-updated.tsx +27 -0
  116. package/src/client/components/ui-base/navbar.tsx +183 -89
  117. package/src/client/components/ui-base/not-found.tsx +11 -9
  118. package/src/client/components/ui-base/on-this-page.tsx +8 -104
  119. package/src/client/components/ui-base/page-nav.tsx +23 -9
  120. package/src/client/components/ui-base/search-dialog.tsx +111 -36
  121. package/src/client/components/ui-base/search-highlight.tsx +10 -0
  122. package/src/client/components/ui-base/sidebar.tsx +77 -154
  123. package/src/client/components/ui-base/tabs.tsx +20 -7
  124. package/src/client/components/ui-base/theme-toggle.tsx +88 -10
  125. package/src/client/components/ui-base/version-i18n.tsx +80 -0
  126. package/src/client/hooks/index.ts +2 -1
  127. package/src/client/hooks/use-analytics.ts +272 -0
  128. package/src/client/hooks/use-i18n.ts +116 -50
  129. package/src/client/hooks/use-localized-to.ts +70 -27
  130. package/src/client/hooks/use-navbar.ts +69 -39
  131. package/src/client/hooks/use-page-nav.ts +28 -25
  132. package/src/client/hooks/use-routes.ts +63 -80
  133. package/src/client/hooks/use-search-highlight.ts +185 -0
  134. package/src/client/hooks/use-search.ts +12 -3
  135. package/src/client/hooks/use-sidebar.ts +183 -80
  136. package/src/client/hooks/use-tabs.ts +3 -4
  137. package/src/client/hooks/use-version.ts +44 -29
  138. package/src/client/index.ts +13 -87
  139. package/src/client/mdx.ts +2 -0
  140. package/src/client/primitives.ts +19 -0
  141. package/src/client/ssg/boltdocs-shell.tsx +68 -79
  142. package/src/client/ssg/create-routes.tsx +268 -72
  143. package/src/client/ssg/mdx-page.tsx +2 -1
  144. package/src/client/store/boltdocs-context.tsx +72 -20
  145. package/src/client/theme/neutral.css +74 -361
  146. package/src/client/theme/reset.css +189 -0
  147. package/src/client/types.ts +10 -2
  148. package/src/client/utils/path.ts +9 -0
  149. package/src/client/utils/react-to-text.ts +24 -24
  150. package/src/client/virtual.d.ts +1 -1
  151. package/src/shared/types.ts +82 -22
  152. package/dist/node-Bogvkxao.mjs +0 -101
  153. package/dist/node-CXaog6St.cjs +0 -101
  154. package/dist/search-dialog-CV3eJzMm.cjs +0 -6
  155. package/dist/search-dialog-DNTomKgu.js +0 -6
  156. package/dist/use-search-CS3gH19M.js +0 -6
  157. package/dist/use-search-DBpJZQuw.cjs +0 -6
  158. package/src/client/components/mdx/admonition.tsx +0 -91
  159. package/src/client/components/mdx/badge.tsx +0 -41
  160. package/src/client/components/mdx/button.tsx +0 -35
  161. package/src/client/components/mdx/component-preview.tsx +0 -37
  162. package/src/client/components/mdx/component-props.tsx +0 -83
  163. package/src/client/components/mdx/file-tree.tsx +0 -325
  164. package/src/client/components/mdx/hooks/use-component-preview.ts +0 -16
  165. package/src/client/components/mdx/hooks/useTable.ts +0 -74
  166. package/src/client/components/mdx/hooks/useTabs.ts +0 -68
  167. package/src/client/components/mdx/link.tsx +0 -38
  168. package/src/client/components/mdx/list.tsx +0 -192
  169. package/src/client/components/mdx/tabs.tsx +0 -135
  170. package/src/client/components/mdx/video.tsx +0 -68
  171. package/src/client/components/primitives/index.ts +0 -19
  172. package/src/client/components/primitives/navigation-menu.tsx +0 -114
  173. package/src/client/components/ui-base/head.tsx +0 -83
  174. package/src/client/components/ui-base/loading.tsx +0 -57
  175. package/src/client/components/ui-base/powered-by.tsx +0 -25
  176. package/src/client/hooks/use-onthispage.ts +0 -23
  177. package/src/client/utils/use-on-change.ts +0 -15
package/bin/boltdocs.js CHANGED
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- 'use strict'
3
2
 
4
3
  /**
5
4
  * Stable entry point for the Boltdocs CLI.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ import{a as e,o as t}from"./utils-BxNAXhZZ.mjs";import n from"node:path";import r from"node:fs";import i from"node:crypto";import a from"node:zlib";import{promisify as o}from"node:util";import{LRUCache as s}from"lru-cache";const c=o(r.writeFile),l=o(r.readFile),u=o(r.mkdir),d=o(r.rename),f=o(a.gzip),p=new class{activeTasks=new Set;add(e){let t=Promise.resolve().then(e).catch(()=>{}).finally(()=>{this.activeTasks.delete(t)});this.activeTasks.add(t)}async flush(){await Promise.all(Array.from(this.activeTasks))}get pending(){return this.activeTasks.size}};var m=class{entries=new Map;cachePath=null;compress;constructor(t={}){let r=e();if(this.compress=t.compress===void 0?r.compress:t.compress,t.name){let e=t.root||process.cwd(),i=this.compress?`json.gz`:`json`;this.cachePath=n.resolve(e,r.dir,`${t.name}.${i}`)}}async load(){if(!e().noCache&&this.cachePath)try{if(!r.existsSync(this.cachePath))return;let e=await l(this.cachePath);this.cachePath.endsWith(`.gz`)&&(e=await o(a.gunzip)(e));let t=JSON.parse(e.toString(`utf-8`));this.entries=new Map(Object.entries(t))}catch{}}save(){if(e().noCache||!this.cachePath)return;let t=Object.fromEntries(this.entries),r=JSON.stringify(t),o=this.cachePath,s=this.compress;p.add(async()=>{try{await u(n.dirname(o),{recursive:!0});let e=Buffer.from(r);s&&(e=await new Promise((t,n)=>{a.gzip(e,(e,r)=>{e?n(e):t(r)})}));let t=`${o}.${i.randomBytes(4).toString(`hex`)}.tmp`;await c(t,e),await d(t,o)}catch{}})}get(e){let n=this.entries.get(e);return!n||t(e)!==n.mtime?null:n.data}set(e,n){this.entries.set(e,{data:n,mtime:t(e)})}isValid(e){let n=this.entries.get(e);return n?t(e)===n.mtime:!1}invalidate(e){this.entries.delete(e)}invalidateAll(){this.entries.clear()}pruneStale(e){for(let t of this.entries.keys())e.has(t)||this.entries.delete(t)}get size(){return this.entries.size}async flush(){await p.flush()}},h=class{index=new Map;memoryCache;baseDir;shardsDir;indexPath;constructor(t,r=process.cwd()){let i=e();this.baseDir=n.resolve(r,i.dir,`transform-${t}`),this.shardsDir=n.resolve(this.baseDir,`shards`),this.indexPath=n.resolve(this.baseDir,`index.json`),this.memoryCache=new s({max:i.lruLimit,ttl:i.lruTTL,updateAgeOnGet:!0})}async load(){if(!e().noCache)try{if(!r.existsSync(this.indexPath))return;let e=await l(this.indexPath,`utf-8`);this.index=new Map(Object.entries(JSON.parse(e)))}catch{}}save(){if(e().noCache)return;let t=JSON.stringify(Object.fromEntries(this.index)),r=this.indexPath;p.add(async()=>{try{await u(n.dirname(r),{recursive:!0}),await c(r,t)}catch{}})}async getMany(e){let t=new Map,r=[];for(let n of e){let e=this.memoryCache.get(n);e?t.set(n,e):this.index.has(n)&&r.push(n)}if(r.length>0){let e=await Promise.all(r.map(async e=>{let t=this.index.get(e),r=n.resolve(this.shardsDir,`${t}.gz`);try{let t=await l(r),n=await new Promise((e,n)=>{a.gunzip(t,(t,r)=>{t?n(t):e(r.toString(`utf-8`))})});return this.memoryCache.set(e,n),{key:e,val:n}}catch{return null}}));for(let n of e)n&&t.set(n.key,n.val)}return t}get(e){let t=this.memoryCache.get(e);if(t)return t;let i=this.index.get(e);if(!i)return null;let o=n.resolve(this.shardsDir,`${i}.gz`);if(!r.existsSync(o))return null;try{let t=r.readFileSync(o),n=a.gunzipSync(t).toString(`utf-8`);return this.memoryCache.set(e,n),n}catch{return null}}async getAsync(e){let t=this.memoryCache.get(e);if(t)return t;let i=this.index.get(e);if(!i)return null;let o=n.resolve(this.shardsDir,`${i}.gz`);try{if(!r.existsSync(o))return null;let t=await l(o),n=await new Promise((e,n)=>{a.gunzip(t,(t,r)=>{t?n(t):e(r.toString(`utf-8`))})});return this.memoryCache.set(e,n),n}catch{return null}}set(e,t){let a=i.createHash(`md5`).update(t).digest(`hex`);this.index.set(e,a),this.memoryCache.set(e,t);let o=n.resolve(this.shardsDir,`${a}.gz`);p.add(async()=>{try{if(r.existsSync(o))return;await u(this.shardsDir,{recursive:!0});let e=await f(Buffer.from(t)),n=`${o}.${i.randomBytes(4).toString(`hex`)}.tmp`;await c(n,e),await d(n,o)}catch{}})}get size(){return this.index.size}async flush(){await p.flush()}};const g=new Map,_=()=>{let t=e();return n.resolve(process.cwd(),t.dir,`cache/parser`)},v=`v2.3`;var y=class{static async get(t){if(e().noCache)return null;try{let e=g.get(t);if(e)return e.data;let a=await r.promises.stat(t),o=_(),s=i.createHash(`md5`).update(t).digest(`hex`),c=n.join(o,`${s}.json`);try{let e=await r.promises.readFile(c,`utf-8`),n=JSON.parse(e);return n._mtime!==a.mtimeMs||n._v!==v?null:(g.set(t,{data:n.data,mtime:n._mtime}),n.data)}catch{return null}}catch{return null}}static async set(t,a){if(!e().noCache)try{let e=await r.promises.stat(t);g.set(t,{data:a,mtime:e.mtimeMs});let o=_(),s=i.createHash(`md5`).update(t).digest(`hex`),c=n.join(o,`${s}.json`),l={_v:v,_mtime:e.mtimeMs,data:a};p.add(async()=>{try{await r.promises.mkdir(o,{recursive:!0}),await r.promises.writeFile(c,JSON.stringify(l))}catch{}})}catch{}}static invalidate(e){g.delete(e)}static clear(){g.clear();let e=_();if(r.existsSync(e))try{r.rmSync(e,{recursive:!0,force:!0})}catch{}}};export{m as n,h as r,y as t};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ const e=require(`./chunk-Ds5LZdWN.cjs`),t=require(`./utils-Clzu7jvb.cjs`);let n=require(`node:path`);n=e.n(n);let r=require(`node:fs`);r=e.n(r);let i=require(`node:crypto`);i=e.n(i);let a=require(`node:zlib`);a=e.n(a);let o=require(`node:util`),s=require(`lru-cache`);const c=(0,o.promisify)(r.default.writeFile),l=(0,o.promisify)(r.default.readFile),u=(0,o.promisify)(r.default.mkdir),d=(0,o.promisify)(r.default.rename),f=(0,o.promisify)(a.default.gzip),p=new class{activeTasks=new Set;add(e){let t=Promise.resolve().then(e).catch(()=>{}).finally(()=>{this.activeTasks.delete(t)});this.activeTasks.add(t)}async flush(){await Promise.all(Array.from(this.activeTasks))}get pending(){return this.activeTasks.size}};var m=class{entries=new Map;cachePath=null;compress;constructor(e={}){let r=t.a();if(this.compress=e.compress===void 0?r.compress:e.compress,e.name){let t=e.root||process.cwd(),i=this.compress?`json.gz`:`json`;this.cachePath=n.default.resolve(t,r.dir,`${e.name}.${i}`)}}async load(){if(!t.a().noCache&&this.cachePath)try{if(!r.default.existsSync(this.cachePath))return;let e=await l(this.cachePath);this.cachePath.endsWith(`.gz`)&&(e=await(0,o.promisify)(a.default.gunzip)(e));let t=JSON.parse(e.toString(`utf-8`));this.entries=new Map(Object.entries(t))}catch{}}save(){if(t.a().noCache||!this.cachePath)return;let e=Object.fromEntries(this.entries),r=JSON.stringify(e),o=this.cachePath,s=this.compress;p.add(async()=>{try{await u(n.default.dirname(o),{recursive:!0});let e=Buffer.from(r);s&&(e=await new Promise((t,n)=>{a.default.gzip(e,(e,r)=>{e?n(e):t(r)})}));let t=`${o}.${i.default.randomBytes(4).toString(`hex`)}.tmp`;await c(t,e),await d(t,o)}catch{}})}get(e){let n=this.entries.get(e);return!n||t.o(e)!==n.mtime?null:n.data}set(e,n){this.entries.set(e,{data:n,mtime:t.o(e)})}isValid(e){let n=this.entries.get(e);return n?t.o(e)===n.mtime:!1}invalidate(e){this.entries.delete(e)}invalidateAll(){this.entries.clear()}pruneStale(e){for(let t of this.entries.keys())e.has(t)||this.entries.delete(t)}get size(){return this.entries.size}async flush(){await p.flush()}},h=class{index=new Map;memoryCache;baseDir;shardsDir;indexPath;constructor(e,r=process.cwd()){let i=t.a();this.baseDir=n.default.resolve(r,i.dir,`transform-${e}`),this.shardsDir=n.default.resolve(this.baseDir,`shards`),this.indexPath=n.default.resolve(this.baseDir,`index.json`),this.memoryCache=new s.LRUCache({max:i.lruLimit,ttl:i.lruTTL,updateAgeOnGet:!0})}async load(){if(!t.a().noCache)try{if(!r.default.existsSync(this.indexPath))return;let e=await l(this.indexPath,`utf-8`);this.index=new Map(Object.entries(JSON.parse(e)))}catch{}}save(){if(t.a().noCache)return;let e=JSON.stringify(Object.fromEntries(this.index)),r=this.indexPath;p.add(async()=>{try{await u(n.default.dirname(r),{recursive:!0}),await c(r,e)}catch{}})}async getMany(e){let t=new Map,r=[];for(let n of e){let e=this.memoryCache.get(n);e?t.set(n,e):this.index.has(n)&&r.push(n)}if(r.length>0){let e=await Promise.all(r.map(async e=>{let t=this.index.get(e),r=n.default.resolve(this.shardsDir,`${t}.gz`);try{let t=await l(r),n=await new Promise((e,n)=>{a.default.gunzip(t,(t,r)=>{t?n(t):e(r.toString(`utf-8`))})});return this.memoryCache.set(e,n),{key:e,val:n}}catch{return null}}));for(let n of e)n&&t.set(n.key,n.val)}return t}get(e){let t=this.memoryCache.get(e);if(t)return t;let i=this.index.get(e);if(!i)return null;let o=n.default.resolve(this.shardsDir,`${i}.gz`);if(!r.default.existsSync(o))return null;try{let t=r.default.readFileSync(o),n=a.default.gunzipSync(t).toString(`utf-8`);return this.memoryCache.set(e,n),n}catch{return null}}async getAsync(e){let t=this.memoryCache.get(e);if(t)return t;let i=this.index.get(e);if(!i)return null;let o=n.default.resolve(this.shardsDir,`${i}.gz`);try{if(!r.default.existsSync(o))return null;let t=await l(o),n=await new Promise((e,n)=>{a.default.gunzip(t,(t,r)=>{t?n(t):e(r.toString(`utf-8`))})});return this.memoryCache.set(e,n),n}catch{return null}}set(e,t){let a=i.default.createHash(`md5`).update(t).digest(`hex`);this.index.set(e,a),this.memoryCache.set(e,t);let o=n.default.resolve(this.shardsDir,`${a}.gz`);p.add(async()=>{try{if(r.default.existsSync(o))return;await u(this.shardsDir,{recursive:!0});let e=await f(Buffer.from(t)),n=`${o}.${i.default.randomBytes(4).toString(`hex`)}.tmp`;await c(n,e),await d(n,o)}catch{}})}get size(){return this.index.size}async flush(){await p.flush()}};const g=new Map,_=()=>{let e=t.a();return n.default.resolve(process.cwd(),e.dir,`cache/parser`)},v=`v2.3`;var y=class{static async get(e){if(t.a().noCache)return null;try{let t=g.get(e);if(t)return t.data;let a=await r.default.promises.stat(e),o=_(),s=i.default.createHash(`md5`).update(e).digest(`hex`),c=n.default.join(o,`${s}.json`);try{let t=await r.default.promises.readFile(c,`utf-8`),n=JSON.parse(t);return n._mtime!==a.mtimeMs||n._v!==v?null:(g.set(e,{data:n.data,mtime:n._mtime}),n.data)}catch{return null}}catch{return null}}static async set(e,a){if(!t.a().noCache)try{let t=await r.default.promises.stat(e);g.set(e,{data:a,mtime:t.mtimeMs});let o=_(),s=i.default.createHash(`md5`).update(e).digest(`hex`),c=n.default.join(o,`${s}.json`),l={_v:v,_mtime:t.mtimeMs,data:a};p.add(async()=>{try{await r.default.promises.mkdir(o,{recursive:!0}),await r.default.promises.writeFile(c,JSON.stringify(l))}catch{}})}catch{}}static invalidate(e){g.delete(e)}static clear(){g.clear();let e=_();if(r.default.existsSync(e))try{r.default.rmSync(e,{recursive:!0,force:!0})}catch{}}};Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return y}});
@@ -0,0 +1,30 @@
1
+
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/client/components/mdx/card.d.ts
5
+ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ title?: React.ReactNode;
7
+ icon?: React.ReactNode;
8
+ href?: string;
9
+ }
10
+ declare function Card({
11
+ className,
12
+ title,
13
+ icon,
14
+ href,
15
+ children,
16
+ ...props
17
+ }: CardProps): _$react_jsx_runtime0.JSX.Element;
18
+ //#endregion
19
+ //#region src/client/components/mdx/cards.d.ts
20
+ interface CardsProps extends React.HTMLAttributes<HTMLDivElement> {
21
+ cols?: 1 | 2 | 3 | 4;
22
+ }
23
+ declare function Cards({
24
+ children,
25
+ className,
26
+ cols,
27
+ ...props
28
+ }: CardsProps): _$react_jsx_runtime0.JSX.Element;
29
+ //#endregion
30
+ export { Card as n, Cards as t };
@@ -0,0 +1,30 @@
1
+
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/client/components/mdx/card.d.ts
5
+ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ title?: React.ReactNode;
7
+ icon?: React.ReactNode;
8
+ href?: string;
9
+ }
10
+ declare function Card({
11
+ className,
12
+ title,
13
+ icon,
14
+ href,
15
+ children,
16
+ ...props
17
+ }: CardProps): _$react_jsx_runtime0.JSX.Element;
18
+ //#endregion
19
+ //#region src/client/components/mdx/cards.d.ts
20
+ interface CardsProps extends React.HTMLAttributes<HTMLDivElement> {
21
+ cols?: 1 | 2 | 3 | 4;
22
+ }
23
+ declare function Cards({
24
+ children,
25
+ className,
26
+ cols,
27
+ ...props
28
+ }: CardsProps): _$react_jsx_runtime0.JSX.Element;
29
+ //#endregion
30
+ export { Card as n, Cards as t };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Boltdocs - https://boltdocs.vercel.app
3
+ * Copyright (c) 2026 Jesus Alcala
4
+ * Licensed under the MIT License.
5
+ */
6
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
@@ -3,4 +3,4 @@
3
3
  * Copyright (c) 2026 Jesus Alcala
4
4
  * Licensed under the MIT License.
5
5
  */
6
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../use-search-DBpJZQuw.cjs`);let t=require(`react-router-dom`),n=require(`virtual:boltdocs-layout`);n=e.D(n);let r=require(`react`),i=require(`react/jsx-runtime`),a=require(`react-aria-components`);a=e.D(a);let o=require(`react-helmet-async`);o=e.D(o);let s=require(`lucide-react`);s=e.D(s);let c=require(`class-variance-authority`),l=require(`scroll-into-view-if-needed`);l=e.D(l);let u=require(`virtual:boltdocs-mdx-components`);u=e.D(u);let d=require(`virtual:boltdocs-icons`);d=e.D(d);const f=Symbol.for(`__BDOCS_MDX_COMPONENTS_CONTEXT__`),p=Symbol.for(`__BDOCS_MDX_COMPONENTS_INSTANCE__`),m=globalThis[f]||(globalThis[f]=(0,r.createContext)({}));function h(){let e=(0,r.use)(m);return(!e||Object.keys(e).length===0)&&globalThis[p]?globalThis[p]:e}function g({components:e,children:t}){return typeof globalThis<`u`&&(globalThis[p]=e),(0,i.jsx)(m.Provider,{value:e,children:t})}function _({route:e,content:t,mdxComponents:a}){let o=h(),s=(0,r.useMemo)(()=>({...o,...a}),[o,a]);return t?(0,i.jsx)(n.default,{route:e,children:(0,i.jsx)(t,{components:s})}):null}function v({MDXComponent:e,mdxComponents:n}){let r=(0,t.useLoaderData)(),a=e||r?.MDXComponent,o=n||r?.mdxComponents;return a?(0,i.jsx)(_,{route:{path:r.path,filePath:r.filePath,title:r.frontmatter.title,description:r.frontmatter.description,headings:r.headings,locale:r.locale,version:r.version,group:r.group,groupTitle:r.groupTitle},content:a,mdxComponents:o}):null}const y=Symbol.for(`__BDOCS_THEME_CONTEXT__`),b=Symbol.for(`__BDOCS_THEME_INSTANCE__`),x=`boltdocs-theme-change`,S=globalThis[y]||(globalThis[y]=(0,r.createContext)(void 0));function C({children:e}){let[t,n]=(0,r.useState)(`system`),[a,o]=(0,r.useState)(`dark`),s=e=>{let t=window.matchMedia(`(prefers-color-scheme: dark)`),n=e===`dark`||e===`system`&&t.matches,r=window.document.documentElement;r.classList.toggle(`dark`,n),r.dataset.theme=n?`dark`:`light`,o(n?`dark`:`light`)};(0,r.useEffect)(()=>{let e=localStorage.getItem(`boltdocs-theme`);e?(n(e),s(e)):s(`system`);let t=window.matchMedia(`(prefers-color-scheme: dark)`),r=()=>{(localStorage.getItem(`boltdocs-theme`)||`system`)===`system`&&s(`system`)};return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[]);let c={theme:t,resolvedTheme:a,setTheme:e=>{n(e),localStorage.setItem(`boltdocs-theme`,e),s(e),typeof window<`u`&&window.dispatchEvent(new CustomEvent(x,{detail:e}))}};return typeof globalThis<`u`&&(globalThis[b]=c),(0,i.jsx)(S.Provider,{value:c,children:e})}function w(){let e=(0,r.use)(S),[,t]=(0,r.useState)({});if((0,r.useEffect)(()=>{if(e)return;let n=()=>t({});return window.addEventListener(x,n),()=>window.removeEventListener(x,n)},[e]),!e&&typeof globalThis<`u`&&globalThis[b])return globalThis[b];if(e===void 0)throw Error(`useTheme must be used within a ThemeProvider`);return e}function ee(){let{pathname:e,hash:n}=(0,t.useLocation)();return(0,r.useLayoutEffect)(()=>{let e=document.querySelector(`.boltdocs-content`)||window,t=()=>e===window?window.scrollY:e.scrollTop,r=(t,n=`auto`)=>{e===window?window.scrollTo({top:t,behavior:n}):e.scrollTo({top:t,behavior:n})};if(n){let i=n.replace(`#`,``),a=document.getElementById(i);if(a){let n=e===window?0:e.getBoundingClientRect().top;r(a.getBoundingClientRect().top-n-80+t(),`smooth`);return}}r(0)},[e,n]),null}const T=(0,c.cva)(`flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none`,{variants:{variant:{primary:`bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg`,secondary:`bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong`,outline:`bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500`,ghost:`bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main`,danger:`bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15`,success:`bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15`,warning:`bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15`,info:`bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15`,subtle:`bg-primary-500/10 text-primary-500 hover:bg-primary-500/20`,link:`bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline`},size:{sm:`min-h-8 px-3.5 text-[0.8125rem] gap-1.5`,md:`min-h-10 px-5 text-[0.9375rem] gap-2`,lg:`min-h-12 px-7 text-[1.05rem] gap-2.5`},rounded:{none:`rounded-none`,sm:`rounded-sm`,md:`rounded-md`,lg:`rounded-lg`,full:`rounded-full`},iconSize:{sm:`w-8 h-8 p-0`,md:`w-10 h-10 p-0`,lg:`w-12 h-12 p-0`},disabled:{true:`opacity-50 cursor-not-allowed pointer-events-none`,false:null}},defaultVariants:{variant:`primary`,size:`md`,rounded:`md`}}),E=({href:t,icon:n,iconPosition:r=`left`,isIconOnly:o,children:s,className:c,variant:l,size:u,rounded:d,iconSize:f,disabled:p,...m})=>{let h=o||!s&&!!n,g=h?(0,i.jsx)(`span`,{className:`inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]`,children:n}):(0,i.jsxs)(i.Fragment,{children:[n&&r===`left`&&(0,i.jsx)(`span`,{className:`inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]`,children:n}),(0,i.jsx)(`span`,{className:`flex items-center`,children:s}),n&&r===`right`&&(0,i.jsx)(`span`,{className:`inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]`,children:n})]});return t?(0,i.jsx)(a.Link,{href:t,className:e.x(T({variant:l,size:u,rounded:d,iconSize:h?f:void 0,disabled:p}),c),...m,children:g}):(0,i.jsx)(a.Button,{className:e.x(T({variant:l,size:u,rounded:d,iconSize:h?f:void 0,disabled:p}),c),...m,children:g})},te=({className:t,variant:n,size:r,rounded:a,iconSize:o,disabled:s,...c})=>(0,i.jsx)(E,{className:e.x(`group`,T({variant:n,size:r,rounded:a,iconSize:o,disabled:s,className:t})),...c}),D=(e,t)=>{if(e==null||typeof e==`boolean`)return``;if(typeof e==`string`||typeof e==`number`)return String(e);if(Array.isArray(e))return e.map(e=>D(e,t)).join(``);if((0,r.isValidElement)(e)){let n=t?.get(e.type);return n?n(e.props):D(e.props.children,t)}return``},ne=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);return t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t),!0}};function re(t){let{title:n}=t,[i,a]=(0,r.useState)(!1),[o,s]=(0,r.useState)(!1),[c,l]=(0,r.useState)(!1),u=(0,r.useRef)(null);e.C();let d=(0,r.useCallback)(async()=>{ne(u.current?.textContent??``),a(!0),setTimeout(()=>a(!1),2e3)},[]);return(0,r.useEffect)(()=>{l((u.current?.textContent?.length??0)>120)},[t.children,t.highlightedHtml]),{copied:i,isExpanded:o,setIsExpanded:s,isExpandable:c,preRef:u,handleCopy:d,shouldTruncate:c&&!o}}const ie=({children:t,className:n,plain:r=!1,...a})=>(0,i.jsx)(`div`,{className:e.x(`not-prose boltdocs-code-block`,`group relative overflow-hidden bg-(--color-code-bg)`,`contain-layout contain-paint`,{"my-6 rounded-lg border border-border-subtle":!r},n),...a,children:t}),ae=({children:t,className:n,...r})=>(0,i.jsx)(`div`,{className:e.x(`flex h-9 items-center justify-between px-4 py-1.5`,`border-b border-border-subtle bg-bg-surface/50`,`text-[13px] font-medium text-text-muted`,n),...r,children:t}),oe=({children:t,className:n,...r})=>(0,i.jsx)(`div`,{className:e.x(`flex items-center space-x-2`,n),...r,children:t}),se=({className:t,children:n,shouldTruncate:r=!1,...a})=>(0,i.jsx)(`div`,{className:e.x(`relative`,{"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":r},t),...a,children:n}),ce=({className:t,children:n,...r})=>(0,i.jsx)(a.Tooltip,{...r,offset:8,className:n=>e.x(`group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none`,`data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100`,`data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75`,`data-[placement=top]:slide-in-from-bottom-1`,`data-[placement=bottom]:slide-in-from-top-1`,`data-[placement=left]:slide-in-from-right-1`,`data-[placement=right]:slide-in-from-left-1`,typeof t==`function`?t(n):t),children:e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(a.OverlayArrow,{children:(0,i.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,i.jsx)(`title`,{children:`Arrow`}),(0,i.jsx)(`path`,{d:`M0 0 L4 4 L8 0`})]})}),typeof n==`function`?n(e):n]})}),O=({content:e,children:t,delay:n=500,closeDelay:r=0,...o})=>(0,i.jsxs)(a.TooltipTrigger,{delay:n,closeDelay:r,children:[t,(0,i.jsx)(ce,{...o,children:e})]});O.Root=O,O.Content=ce;const le={ts:e.y,tsx:e.g,js:e.p,jsx:e.g,json:e.m,css:e.d,html:e.l,md:e.h,mdx:e.h,bash:e.v,sh:e.v,yaml:e.b,yml:e.b,rs:e._,rust:e._,toml:e.u},ue=({copied:t,handleCopy:n})=>(0,i.jsx)(O,{content:t?`Copied!`:`Copy code`,children:(0,i.jsx)(a.Button,{onPress:n,className:e.x(`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`,t?`text-emerald-400`:`text-text-muted hover:text-text-main`),"aria-label":`Copy code`,children:t?(0,i.jsx)(s.Check,{size:20}):(0,i.jsx)(s.Copy,{size:20})})});function k(t){let{children:n,hideCopy:r=!1,highlightedHtml:o,"data-highlighted-html":c,title:l,"data-title":u,"data-lang":d,plain:f=!1,...p}=t,m=o||c,h=l||u,g=t.lang||d||``,{copied:_,isExpanded:v,setIsExpanded:y,isExpandable:b,preRef:x,handleCopy:S,shouldTruncate:C}=re(t),w=le[g];return(0,i.jsxs)(ie,{plain:f,className:t.className,children:[(h||!r)&&(0,i.jsxs)(ae,{children:[(0,i.jsx)(oe,{children:h&&(0,i.jsxs)(i.Fragment,{children:[w?(0,i.jsx)(w,{size:14}):(0,i.jsx)(s.File,{size:14,className:`opacity-60`}),(0,i.jsx)(`span`,{children:h})]})}),!r&&(0,i.jsx)(ue,{copied:_,handleCopy:S})]}),(0,i.jsxs)(se,{shouldTruncate:C,children:[m?(0,i.jsx)(`div`,{ref:x,className:`shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!`,dangerouslySetInnerHTML:{__html:m}}):(0,i.jsx)(`pre`,{ref:x,className:`m-0! p-5! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7] overflow-x-auto`,...p,children:D(n)}),b&&(0,i.jsx)(`div`,{className:e.x(C?`absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10`:`relative flex justify-center py-4`),children:(0,i.jsx)(a.Button,{onPress:()=>y(!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`})})]})]})}function de({initialIndex:e=0,tabs:t}){let n=t[e]?.props.disabled?t.findIndex(e=>!e.props.disabled):e,[i,a]=(0,r.useState)(n===-1?0:n),o=(0,r.useRef)([]),[s,c]=(0,r.useState)({opacity:0,transform:`translateX(0)`,width:0});return(0,r.useEffect)(()=>{let e=o.current[i];e&&c({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[i,t]),{active:i,setActive:a,tabRefs:o,indicatorStyle:s,handleKeyDown:(0,r.useCallback)(e=>{let n=0;if(e.key===`ArrowRight`?n=1:e.key===`ArrowLeft`&&(n=-1),n!==0){let e=(i+n+t.length)%t.length;for(;t[e].props.disabled&&e!==i;)e=(e+n+t.length)%t.length;e!==i&&!t[e].props.disabled&&(a(e),o.current[e]?.focus())}},[i,t])}}const fe=(0,c.cva)(`relative flex items-center border-b border-border-subtle gap-1 overflow-x-auto no-scrollbar`,{variants:{size:{default:`px-0`,compact:`px-2`}},defaultVariants:{size:`default`}}),pe=(0,c.cva)(`flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap`,{variants:{isActive:{true:`text-primary-500`,false:`text-text-muted hover:text-text-main`},isDisabled:{true:`opacity-40 pointer-events-none`,false:``}},defaultVariants:{isActive:!1,isDisabled:!1}});function me({children:e}){return(0,i.jsx)(`div`,{className:`py-4`,children:typeof e==`string`?(0,i.jsx)(k,{className:`language-bash`,children:(0,i.jsx)(`code`,{children:e.trim()})}):e})}function he({defaultIndex:t=0,children:n}){let o=(0,r.useMemo)(()=>r.Children.toArray(n).filter(e=>(0,r.isValidElement)(e)&&e.props?.label),[n]),{active:s,setActive:c,tabRefs:l,indicatorStyle:u}=de({initialIndex:t,tabs:o});return(0,i.jsx)(`div`,{className:`my-8 w-full group/tabs`,children:(0,i.jsxs)(a.Tabs,{selectedKey:s.toString(),onSelectionChange:e=>c(Number(e)),className:`w-full`,children:[(0,i.jsxs)(a.TabList,{"aria-label":`Content Tabs`,className:e.x(fe()),children:[o.map((t,n)=>{let{label:r,icon:o,disabled:s}=t.props,c=n.toString();return(0,i.jsxs)(a.Tab,{id:c,isDisabled:s,ref:e=>{l.current[n]=e},className:({isSelected:t,isDisabled:n})=>e.x(pe({isActive:t,isDisabled:n})),children:[!!o&&(0,i.jsx)(`span`,{className:`shrink-0 [&>svg]:w-4 [&>svg]:h-4`,children:o}),(0,i.jsx)(`span`,{children:r})]},c)}),(0,i.jsx)(`div`,{className:`absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none`,style:u,"aria-hidden":`true`})]}),o.map((e,t)=>(0,i.jsx)(a.TabPanel,{id:t.toString(),children:o[t]},t))]})})}function ge({src:e,poster:t,alt:n,children:a,controls:o,preload:s=`metadata`,...c}){let l=(0,r.useRef)(null),[u,d]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let e=l.current;if(!e)return;let t=new IntersectionObserver(([e])=>{e.isIntersecting&&(d(!0),t.disconnect())},{rootMargin:`200px`});return t.observe(e),()=>t.disconnect()},[]),(0,i.jsx)(`div`,{ref:l,className:`my-6 overflow-hidden rounded-lg border border-border-subtle`,children:u?(0,i.jsxs)(`video`,{className:`block w-full h-auto`,src:e,poster:t,controls:!0,preload:s,playsInline:!0,...c,children:[a,`Your browser does not support the video tag.`]}):(0,i.jsx)(`div`,{className:`aspect-video bg-bg-surface animate-pulse`,role:`img`,"aria-label":n||`Video`})})}const _e=(0,c.cva)(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight`,{variants:{variant:{default:`bg-bg-surface text-text-muted border-border-subtle`,primary:`bg-primary-500/15 text-primary-400 border-primary-500/20`,success:`bg-emerald-500/15 text-emerald-400 border-emerald-500/20`,warning:`bg-amber-500/15 text-amber-400 border-amber-500/20`,danger:`bg-red-500/15 text-red-400 border-red-500/20`,info:`bg-sky-500/15 text-sky-400 border-sky-500/20`}},defaultVariants:{variant:`default`}});function ve({variant:t=`default`,children:n,className:r=``,...a}){return(0,i.jsx)(`span`,{className:e.x(_e({variant:t}),r),...a,children:n})}const ye=(0,c.cva)(`grid gap-4 my-6`,{variants:{cols:{1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-4`}},defaultVariants:{cols:3}});function be({cols:t=3,children:n,className:r=``,...a}){return(0,i.jsx)(`div`,{className:e.x(ye({cols:t}),r),...a,children:n})}function xe({title:t,icon:n,href:o,children:s,className:c=``,...l}){let u=(0,r.useRef)(null),d=(0,r.useRef)(null),f=(0,r.useCallback)(e=>{let t=u.current||d.current;if(!t)return;let{left:n,top:r}=t.getBoundingClientRect();t.style.setProperty(`--x`,`${e.clientX-n}px`),t.style.setProperty(`--y`,`${e.clientY-r}px`)},[]),p=(0,i.jsxs)(i.Fragment,{children:[(0,i.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%)`}}),n&&(0,i.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:n}),(0,i.jsxs)(`div`,{className:`space-y-1.5`,children:[t&&(0,i.jsx)(`h3`,{className:`text-sm font-bold text-text-main`,children:t}),s&&(0,i.jsx)(`div`,{className:`text-sm text-text-muted leading-relaxed`,children:s})]})]}),m=e.x(`group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden`,`transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,c);return o?(0,i.jsx)(a.Link,{ref:d,href:o,className:e.x(m,`no-underline cursor-pointer`),onMouseMove:f,...l,children:p}):(0,i.jsx)(`div`,{ref:u,role:`presentation`,className:m,onMouseMove:f,...l,children:p})}const Se={note:(0,i.jsx)(s.Bookmark,{size:18}),tip:(0,i.jsx)(s.Lightbulb,{size:18}),info:(0,i.jsx)(s.Info,{size:18}),warning:(0,i.jsx)(s.AlertTriangle,{size:18}),danger:(0,i.jsx)(s.ShieldAlert,{size:18}),important:(0,i.jsx)(s.Flame,{size:18}),caution:(0,i.jsx)(s.Zap,{size:18})},Ce=(0,c.cva)(`py-4 px-4 rounded-lg flex items-center gap-3 border-[1px] flex-row`,{variants:{type:{note:`border-primary-200 dark:border-primary-800 bg-primary-500/5 text-primary-400`,tip:`border-emerald-200 dark:border-emerald-800 bg-emerald-500/5 text-emerald-500`,info:`border-sky-200 dark:border-sky-800 bg-sky-500/5 text-sky-500`,warning:`border-amber-200 dark:border-amber-800 bg-amber-500/5 text-amber-500`,danger:`border-red-200 dark:border-red-800/70 bg-red-500/5 text-red-500`,important:`border-orange-200 dark:border-orange-800/70 bg-orange-500/5 text-orange-500`,caution:`border-yellow-200 dark:border-yellow-800/70 bg-yellow-500/5 text-yellow-500`}},defaultVariants:{type:`note`}});function A({type:t=`note`,title:n,children:r,className:a=``,...o}){return(0,i.jsxs)(`div`,{className:e.x(Ce({type:t}),a),role:t===`warning`||t===`danger`?`alert`:`note`,...o,children:[Se[t],(0,i.jsx)(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0`,children:r})]})}const j=e=>(0,i.jsx)(A,{type:`note`,...e}),M=e=>(0,i.jsx)(A,{type:`tip`,...e}),N=e=>(0,i.jsx)(A,{type:`warning`,...e}),P=e=>(0,i.jsx)(A,{type:`danger`,...e}),we=e=>(0,i.jsx)(A,{type:`info`,...e}),Te=e=>(0,i.jsx)(A,{type:`important`,...e}),Ee=e=>(0,i.jsx)(A,{type:`caution`,...e}),De=(0,c.cva)(`my-6 transition-all duration-200`,{variants:{variant:{default:`list-disc pl-5 text-text-muted marker:text-primary-500/50`,number:`list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold`,checked:`list-none p-0`,arrow:`list-none p-0`,bubble:`list-none p-0`},cols:{1:`grid-cols-1`,2:`grid-cols-1 sm:grid-cols-2`,3:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-3`,4:`grid-cols-1 sm:grid-cols-2 lg:grid-cols-4`},isGrid:{true:`grid gap-x-8 gap-y-3`,false:`space-y-2`},dense:{true:`space-y-1`,false:`space-y-2`}},compoundVariants:[{variant:`default`,dense:!0,className:`space-y-0.5`}],defaultVariants:{variant:`default`,cols:1,isGrid:!1,dense:!1}}),Oe=(0,c.cva)(`group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200`,{variants:{variant:{default:``,number:``,checked:`hover:translate-x-0.5`,arrow:`hover:translate-x-0.5`,bubble:`hover:translate-x-0.5`},dense:{true:`py-0`,false:`py-0.5`}},defaultVariants:{variant:`default`,dense:!1}}),ke=(0,c.cva)(`mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110`,{variants:{variant:{bubble:`h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold`,default:``}},defaultVariants:{variant:`default`}});function Ae({icon:t,children:n,variant:r,dense:a}){return(0,i.jsxs)(`li`,{className:e.x(Oe({variant:r,dense:a})),children:[t&&(0,i.jsx)(`span`,{className:e.x(ke({variant:r===`bubble`?`bubble`:`default`})),children:t}),(0,i.jsx)(`div`,{className:`flex-1 text-text-muted group-hover:text-text-main transition-colors`,children:n})]})}const je={checked:t=>(0,i.jsx)(s.Check,{size:14,className:e.x(`text-emerald-500 shrink-0`,t)}),arrow:t=>(0,i.jsx)(s.ChevronRight,{size:14,className:e.x(`text-primary-400 shrink-0`,t)}),bubble:t=>(0,i.jsx)(s.Circle,{size:6,fill:`currentColor`,className:e.x(`text-primary-500 shrink-0`,t)}),default:()=>null,number:()=>null};function Me({variant:e=`default`,cols:t=1,dense:n=!1,children:a,className:o,...s}){let c=t!==void 0&&Number(t)>1,l=je[e],u=De({variant:e,cols:t,dense:n,isGrid:c,className:o}),d=e===`number`?`ol`:`ul`;return e===`default`||e===`number`?(0,i.jsx)(d,{className:u,...s,children:a}):(0,i.jsx)(`ul`,{className:u,...s,children:r.Children.map(a,t=>{if(!(0,r.isValidElement)(t))return t;let a=t,o=a.type===`li`?a.props.children:a.props.children||t;return(0,i.jsx)(Ae,{icon:l(),variant:e,dense:n,children:o})})})}const Ne={ts:e.y,tsx:e.g,js:e.p,jsx:e.g,json:e.m,css:e.d,html:e.l,md:e.h,mdx:e.h,bash:e.v,sh:e.v,yaml:e.b,yml:e.b},F={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 I(e){return typeof e==`string`?e:typeof e==`number`?e.toString():Array.isArray(e)?e.map(I).join(``):(0,r.isValidElement)(e)&&e.props&&typeof e.props==`object`&&`children`in e.props?I(e.props.children):``}function Pe(t,n){let r=t.toLowerCase(),a=`shrink-0 transition-colors duration-200`;if(n)return(0,i.jsx)(s.Folder,{size:16,strokeWidth:2,className:e.x(a,`text-primary-400`),fill:`currentColor`,fillOpacity:.15});let o=Ne[r.split(`.`).pop()||``];if(o)return(0,i.jsx)(o,{size:16});let c=e.x(a,`text-text-dim group-hover:text-text-main`);return F.CODE.test(r)?(0,i.jsx)(s.FileCode,{size:16,strokeWidth:2,className:c}):F.TEXT.test(r)?(0,i.jsx)(s.FileText,{size:16,strokeWidth:2,className:c}):F.IMAGE.test(r)?(0,i.jsx)(s.FileImage,{size:16,strokeWidth:2,className:c}):(0,i.jsx)(s.File,{size:16,strokeWidth:2,className:c})}function L(e,t){if(!(0,r.isValidElement)(e))return!1;let n=e.type;if(typeof n==`string`)return n===t;if(typeof n==`function`)return n.name===t||n.name?.toLowerCase()===t;let i=e.props;return i?.originalType===t||i?.mdxType===t}function Fe(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function R(e,t=`root`){if(!(0,r.isValidElement)(e))return[];let n=[];if(L(e,`ul`))return r.Children.forEach(e.props.children,(e,r)=>{n.push(...R(e,`${t}-${r}`))}),n;if(L(e,`li`)){let i=r.Children.toArray(e.props.children),a=i.findIndex(e=>L(e,`ul`)),o=a!==-1,s=o?i.slice(0,a):i,c=o?i.slice(a):[],{name:l,comment:u}=Fe(I(s)),d=l.endsWith(`/`),f=d?l.slice(0,-1):l,p=o||d;return n.push({id:`${t}-${f}`,name:f,comment:u,isFolder:p,children:o?R(c[0],`${t}-${f}`):void 0}),n}return e.props&&typeof e.props==`object`&&`children`in e.props&&r.Children.forEach(e.props.children,(e,r)=>{n.push(...R(e,`${t}-${r}`))}),n}function Ie({item:t}){return(0,i.jsxs)(a.TreeItem,{id:t.id,textValue:t.name,className:`outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md`,children:[(0,i.jsx)(a.TreeItemContent,{children:({isExpanded:n,hasChildItems:r})=>(0,i.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,i.jsx)(`div`,{style:{width:`calc((var(--tree-item-level) - 1) * 1rem)`},className:`shrink-0`}),r?(0,i.jsx)(a.Button,{slot:`chevron`,className:`outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors`,children:(0,i.jsx)(s.ChevronRight,{size:14,strokeWidth:3,className:e.x(`transition-transform duration-200`,n&&`rotate-90`)})}):(0,i.jsx)(`div`,{className:`w-[18px]`}),Pe(t.name,t.isFolder),(0,i.jsx)(`span`,{className:e.x(`text-sm transition-colors truncate select-none`,t.isFolder?`font-semibold text-text-main`:`text-text-muted group-hover:text-text-main`),children:t.name}),t.comment&&(0,i.jsxs)(`span`,{className:`ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans`,children:[`//`,` `,t.comment]})]})}),t.children&&(0,i.jsx)(a.Collection,{items:t.children,children:e=>(0,i.jsx)(Ie,{item:e})})]})}function Le({children:t}){let n=(0,r.useMemo)(()=>R(t),[t]);return(0,i.jsx)(`div`,{className:`my-8`,children:(0,i.jsx)(a.Tree,{items:n,"aria-label":`File Tree`,className:e.x(`rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none`,`max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle`,`focus-visible:ring-2 focus-visible:ring-primary-500/20`),children:e=>(0,i.jsx)(Ie,{item:e})})})}function Re({data:e,sortable:t=!1,paginated:n=!1,pageSize:i=10}){let[a,o]=(0,r.useState)(null),[s,c]=(0,r.useState)(1),l=(0,r.useMemo)(()=>{if(!e)return[];let n=[...e];return t&&a!==null&&n.sort((e,t)=>{let n=e[a.key],r=t[a.key],i=typeof n==`string`?n:``,o=typeof r==`string`?r:``;return i<o?a.direction===`asc`?-1:1:i>o?a.direction===`asc`?1:-1:0}),n},[e,a,t]);return{sortConfig:a,currentPage:s,setCurrentPage:c,totalPages:Math.ceil(l.length/i),paginatedData:(0,r.useMemo)(()=>{if(!n)return l;let e=(s-1)*i;return l.slice(e,e+i)},[l,n,s,i]),requestSort:e=>{if(!t)return;let n=`asc`;a&&a.key===e&&a.direction===`asc`&&(n=`desc`),o({key:e,direction:n})}}}function ze({headers:t,data:n,children:r,className:o=``,sortable:c=!1,paginated:l=!1,pageSize:u=10}){let{sortConfig:d,currentPage:f,setCurrentPage:p,totalPages:m,paginatedData:h,requestSort:g}=Re({data:n,sortable:c,paginated:l,pageSize:u}),_=e=>c?d?.key===e?d.direction===`asc`?(0,i.jsx)(s.ChevronUp,{size:14,className:`ml-1 text-primary-400`}):(0,i.jsx)(s.ChevronDown,{size:14,className:`ml-1 text-primary-400`}):(0,i.jsx)(s.ChevronDown,{size:14,className:`ml-1 opacity-30`}):null,v=r||(0,i.jsxs)(i.Fragment,{children:[t&&(0,i.jsx)(`thead`,{children:(0,i.jsx)(`tr`,{children:t.map((t,n)=>(0,i.jsx)(`th`,{onClick:()=>g(n),className:e.x(`text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm`,c&&`cursor-pointer select-none hover:text-primary-400 transition-colors`),children:(0,i.jsxs)(`div`,{className:`flex items-center`,children:[t,_(n)]})},n))})}),h&&(0,i.jsx)(`tbody`,{children:h.map((e,t)=>(0,i.jsx)(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:e.map((e,t)=>(0,i.jsx)(`td`,{className:`px-3 py-2 border-b border-border-subtle text-sm text-text-muted`,children:e},t))},t))})]});return(0,i.jsxs)(`div`,{className:e.x(`my-6 rounded-lg border border-border-subtle overflow-hidden`,o),children:[(0,i.jsx)(`div`,{className:`overflow-x-auto`,children:(0,i.jsx)(`table`,{className:`w-full border-collapse text-sm`,children:v})}),l&&m>1&&(0,i.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border-subtle px-4 py-3`,children:[(0,i.jsxs)(`span`,{className:`text-xs text-text-muted`,children:[`Page `,f,` of `,m]}),(0,i.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,i.jsx)(a.Button,{onPress:()=>p(1),isDisabled:f===1,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:(0,i.jsx)(s.ChevronsLeft,{size:16})}),(0,i.jsx)(a.Button,{onPress:()=>p(e=>Math.max(e-1,1)),isDisabled:f===1,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:(0,i.jsx)(s.ChevronLeft,{size:16})}),(0,i.jsx)(a.Button,{onPress:()=>p(e=>Math.min(e+1,m)),isDisabled:f===m,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:(0,i.jsx)(s.ChevronRight,{size:16})}),(0,i.jsx)(a.Button,{onPress:()=>p(m),isDisabled:f===m,className:`grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer`,children:(0,i.jsx)(s.ChevronsRight,{size:16})})]})]})]})}function Be({name:t,type:n,defaultValue:r,required:a=!1,children:o,id:s,className:c=``}){return(0,i.jsxs)(`article`,{className:e.x(`group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300`,c),id:s,children:[(0,i.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4`,children:[(0,i.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2.5`,children:[(0,i.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`,children:t}),n&&(0,i.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 shadow-sm`,children:n}),a&&(0,i.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 text-red-400 border border-red-500/20 shadow-sm`,children:[(0,i.jsx)(`span`,{className:`h-1 w-1 rounded-full bg-red-400 animate-pulse`}),`Required`]})]}),r&&(0,i.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,i.jsx)(`span`,{className:`font-semibold opacity-60 uppercase tracking-tighter`,children:`Default`}),(0,i.jsx)(`code`,{className:`font-mono text-text-main font-medium`,children:r})]})]}),(0,i.jsx)(`div`,{className:`text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30`,children:o})]})}function Ve({to:t,children:n,className:r=``,...a}){let o=t&&(t.startsWith(`http://`)||t.startsWith(`https://`)||t.startsWith(`//`));return(0,i.jsx)(e.i,{href:t,className:e.x(`text-blue-600 hover:text-blue-800 hover:underline cursor-pointer`,r),target:o?`_blank`:void 0,rel:o?`noopener noreferrer`:void 0,...a,children:n})}function He({src:e,alt:t,theme:n,...r}){let{theme:a}=w();return n&&n!==a?null:(0,i.jsx)(`img`,{src:e,alt:t||``,...r})}function Ue({title:t,props:n,className:r=``}){return(0,i.jsxs)(`div`,{className:e.x(`my-6`,r),children:[t&&(0,i.jsx)(`h3`,{className:`text-base font-bold text-text-main mb-3`,children:t}),(0,i.jsx)(`div`,{className:`overflow-x-auto rounded-lg border border-border-subtle`,children:(0,i.jsxs)(`table`,{className:`w-full border-collapse text-sm`,children:[(0,i.jsx)(`thead`,{children:(0,i.jsxs)(`tr`,{children:[(0,i.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,i.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,i.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,i.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,i.jsx)(`tbody`,{children:n.map((e,t)=>(0,i.jsxs)(`tr`,{className:`transition-colors hover:bg-bg-surface`,children:[(0,i.jsxs)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:[(0,i.jsx)(`code`,{className:`rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400`,children:e.name}),e.required&&(0,i.jsx)(`span`,{className:`ml-1 text-red-400 font-bold`,children:`*`})]}),(0,i.jsx)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:(0,i.jsx)(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted`,children:e.type})}),(0,i.jsx)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle`,children:e.defaultValue?(0,i.jsx)(`code`,{className:`rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400`,children:e.defaultValue}):(0,i.jsx)(`span`,{className:`text-text-dim`,children:`—`})}),(0,i.jsx)(`td`,{className:`px-4 py-2.5 border-b border-border-subtle text-text-muted`,children:e.description})]},`${e.name}-${t}`))})]})})]})}function We(e){let{code:t,children:n,preview:i}=e;return{initialCode:(0,r.useMemo)(()=>(t??(typeof n==`string`?n:``)).trim(),[t,n]),previewElement:(0,r.useMemo)(()=>i??(typeof n==`string`?null:n),[i,n])}}function Ge(e){let{highlightedHtml:t,hideCode:n=!1,hideCopy:r=!1}=e,{initialCode:a,previewElement:o}=We(e);return(0,i.jsxs)(`div`,{className:`my-6 overflow-hidden rounded-xl border border-border-subtle`,children:[(0,i.jsx)(`div`,{className:`flex items-center justify-center p-8 bg-bg-surface`,children:o}),!n&&(0,i.jsx)(`div`,{className:`border-t border-border-subtle`,children:(0,i.jsx)(k,{hideCopy:r,lang:`tsx`,highlightedHtml:t,plain:!0,children:a})})]})}const z=({children:t,className:n,...r})=>(0,i.jsx)(`nav`,{className:e.x(`relative flex items-center`,n),...r,children:t});z.Root=z,z.List=({children:t,className:n})=>(0,i.jsx)(`div`,{className:e.x(`flex list-none items-center gap-1`,n),children:t}),z.Item=({children:t,label:n,className:r})=>(0,i.jsxs)(a.MenuTrigger,{children:[(0,i.jsxs)(a.Button,{className:e.x(`flex items-center gap-1 rounded-md px-3 py-1.5 text-sm font-medium outline-none transition-colors cursor-pointer`,`text-text-muted hover:bg-bg-surface hover:text-text-main`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,r),children:[n,(0,i.jsx)(s.ChevronDown,{size:14,className:`transition-transform`})]}),(0,i.jsx)(a.Popover,{placement:`bottom start`,className:`entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards`,children:(0,i.jsx)(a.Menu,{className:`w-56 outline-none rounded-xl border border-border-subtle bg-bg-surface p-2 shadow-xl ring-1 ring-border-strong/5`,children:t})})]}),z.Link=({label:t,href:n,description:r,className:o,children:s,...c})=>(0,i.jsx)(a.MenuItem,{href:n,className:e.x(`block rounded-lg px-3 py-2 text-sm outline-none cursor-pointer transition-colors`,`hover:bg-bg-muted focus:bg-bg-muted`,o),...c,children:s||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(`div`,{className:`font-semibold text-text-main`,children:t}),r&&(0,i.jsx)(`div`,{className:`text-xs text-text-muted line-clamp-1 mt-0.5`,children:r})]})});function Ke(e,t){let n=(0,r.useRef)(e);(0,r.useEffect)(()=>{n.current!==e&&(t(e),n.current=e)},[e,t])}function qe(e){return e.startsWith(`#`)?e.slice(1):null}var Je=class{items=[];single=!1;observer=null;onChange;callback(e){if(e.length===0)return;for(let t of e){let e=this.items.find(e=>e.id===t.target.id);e&&(e.active=t.isIntersecting,e.fallback=!t.isIntersecting&&t.boundingClientRect.top<100)}let t=-1;for(let e=this.items.length-1;e>=0;e--)if(this.items[e].fallback){t=e;break}t===-1&&this.items.length>0&&(t=0),this.items=this.items.map((e,n)=>({...e,active:n===t,t:n===t?Date.now():e.t})),this.onChange?.()}setItems(e){let t=this.observer;if(t)for(let e of this.items){let n=document.getElementById(e.id);n&&t.unobserve(n)}this.items=[];for(let t of e){let e=qe(t.url);e&&this.items.push({id:e,active:!1,fallback:!1,t:0,original:t})}this.watchItems(),typeof window<`u`&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(e){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),e),this.watchItems())}watchItems(){if(this.observer)for(let e of this.items){let t=document.getElementById(e.id);t&&this.observer.observe(t)}}unwatch(){this.observer?.disconnect(),this.observer=null}};const B=(0,r.createContext)(null),Ye=(0,r.createContext)(null);function V(){let e=(0,r.use)(B);if(!e)throw Error(`Component must be used under the <AnchorProvider /> component.`);return e}function H(){let e=V();return(0,r.useMemo)(()=>{let t;for(let n of e)n.active&&(!t||n.t>t.t)&&(t=n);return t?.id},[e])}function Xe(){let e=V();return(0,r.useMemo)(()=>{let t=[];for(let n of e)n.active&&t.push(n.id);return t},[e])}function Ze({containerRef:e,children:t}){return(0,i.jsx)(Ye.Provider,{value:e,children:t})}function Qe({toc:e,single:t=!1,children:n}){let a=(0,r.useMemo)(()=>new Je,[]),[o,s]=(0,r.useState)(a.items);return a.single=t,(0,r.useEffect)(()=>{a.setItems(e)},[a,e]),(0,r.useEffect)(()=>(a.watch({rootMargin:`-100px 0% 0% 0%`,threshold:0}),a.onChange=()=>s([...a.items]),()=>{a.unwatch()}),[a]),(0,i.jsx)(B.Provider,{value:o,children:n})}const U=({children:t,className:n})=>(0,i.jsx)(`nav`,{className:e.x(`sticky top-navbar hidden xl:flex flex-col shrink-0`,`w-toc`,`py-8 pl-6 pr-4`,n),children:t}),$e=({children:t,className:n,...r})=>(0,i.jsx)(`div`,{className:e.x(`mb-4 text-xs font-bold text-text-main`,n),...r,children:t}),et=({children:t,className:n,ref:a,...o})=>{let s=(0,r.useRef)(null);return(0,r.useImperativeHandle)(a,()=>s.current),(0,i.jsx)(`div`,{ref:s,className:e.x(`relative overflow-y-auto boltdocs-otp-content`,n),...o,children:t})};et.displayName=`OnThisPageContent`,U.Root=U,U.Header=$e,U.Content=et,U.List=({children:t,className:n})=>(0,i.jsx)(`ul`,{className:e.x(`relative space-y-1 text-sm border-l border-border-subtle`,n),children:t}),U.Item=({level:t,children:n,className:r})=>(0,i.jsx)(`li`,{className:e.x(t===3&&`pl-3`,r),children:n}),U.Link=({children:t,href:n,active:a,onClick:o,className:s})=>{let c=(0,r.use)(B),u=(0,r.use)(Ye),d=n?qe(n):null,f=(0,r.useRef)(null),[p,m]=(0,r.useState)(a);return Ke(d&&c?c.find(e=>e.id===d)?.active:null,e=>{e!==null&&e!==p&&(m(!!e),e&&f.current&&u?.current&&(0,l.default)(f.current,{behavior:`smooth`,block:`center`,inline:`center`,scrollMode:`if-needed`,boundary:u.current}))}),(0,r.useEffect)(()=>{a!==void 0&&m(a)},[a]),(0,i.jsx)(`a`,{ref:f,href:n,onClick:o,"data-active":p,className:e.x(`block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main`,p?`text-primary-500 font-medium`:`text-text-muted`,s),children:t})},U.Indicator=({style:t,className:n})=>(0,i.jsx)(`div`,{className:e.x(`absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300`,n),style:t});const W=({children:t,className:n})=>(0,i.jsx)(`nav`,{className:e.x(`grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle`,n),children:t});W.Root=W,W.Link=({children:t,to:n,direction:r,className:o})=>{let c=r===`next`;return(0,i.jsxs)(a.Link,{href:n,className:e.x(`flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none`,`transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,c?`text-right justify-end`:`text-left justify-start`,o),children:[!c&&(0,i.jsx)(s.ChevronLeft,{className:`mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1`}),(0,i.jsx)(`div`,{className:`flex flex-col gap-1 flex-1`,children:t}),c&&(0,i.jsx)(s.ChevronRight,{className:`ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1`})]})},W.Title=({children:t,className:n})=>(0,i.jsx)(`span`,{className:e.x(`text-xs font-medium uppercase text-text-muted`,n),children:t}),W.Description=({children:t,className:n})=>(0,i.jsx)(`span`,{className:e.x(`text-base font-bold text-text-main truncate`,n),children:t}),W.Icon=({children:e})=>(0,i.jsx)(i.Fragment,{children:e});const G=({children:t,className:n=``,...r})=>(0,i.jsx)(`div`,{className:e.x(`w-full`,n),...r,children:t});G.Root=G,G.List=({children:t,className:n=``})=>(0,i.jsx)(`div`,{role:`tablist`,className:e.x(`relative flex flex-row items-center border-b border-border-subtle`,n),children:t}),G.Item=({children:t,id:n,selected:r,className:a=``,...o})=>(0,i.jsx)(`button`,{role:`tab`,"aria-selected":r,className:e.x(`flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none`,r?`text-primary-500`:`text-text-muted hover:text-text-main`,a),...o,children:t}),G.Content=({children:t,className:n=``})=>(0,i.jsx)(`div`,{className:e.x(`p-4 outline-none`,n),children:t}),G.Indicator=({className:t=``,style:n})=>(0,i.jsx)(`div`,{className:e.x(`absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300`,t),style:n});const tt=({badge:t})=>{let n={new:`bg-primary-500/20 text-primary-500`,updated:`bg-gray-500/20 text-gray-500`,deprecated:`bg-red-500/20 text-red-500`};if(typeof t==`object`&&t?.expires){let e=new Date(t.expires),n=new Date,r=e.getTime()-n.getTime();if(Math.ceil(r/(1e3*60*60*24))===0)return null}let r=typeof t==`string`?t:t?.text;return(0,i.jsx)(`span`,{className:e.x(`ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap`,n[r]||n.new),children:r})},K=({children:t,className:n})=>(0,i.jsx)(`aside`,{className:e.x(`boltdocs-sidebar sticky top-navbar hidden lg:flex flex-col shrink-0`,`w-sidebar h-full`,`overflow-y-auto border-r border-border-subtle bg-bg-main`,`py-6 px-4`,n),children:(0,i.jsx)(`nav`,{className:`flex-1 space-y-6`,children:t})});K.Root=K,K.Group=({children:t,title:n,icon:r,className:a})=>(0,i.jsxs)(`div`,{className:e.x(`space-y-1`,a),children:[n&&(0,i.jsx)(`div`,{className:e.x(`flex w-full items-center justify-between px-2 py-1.5 text-sm font-semibold`,`text-text-main`),children:(0,i.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r&&(0,i.jsx)(r,{size:14}),n]})}),t&&(0,i.jsx)(`div`,{className:`space-y-0.5`,children:t})]}),K.SubGroup=({label:t,href:n,active:r,icon:o,badge:c,className:l,isOpen:u=!1,onToggle:d,children:f})=>(0,i.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,i.jsxs)(`div`,{className:`flex items-center w-full`,children:[(0,i.jsxs)(e.i,{href:n,className:e.x(`group flex flex-1 items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none`,`transition-all duration-200 ease-in-out`,`focus-visible:ring-2 focus-visible:ring-primary-500/30`,r?`bg-primary-500/10 text-primary-500 font-medium`:`text-text-muted hover:bg-bg-surface hover:text-text-main hover:translate-x-1`,l),children:[o&&(0,i.jsx)(o,{size:16,className:e.x(r?`text-primary-500`:`text-text-muted group-hover:text-text-main`)}),(0,i.jsx)(`span`,{className:`truncate`,children:t}),c&&(0,i.jsx)(tt,{badge:c})]}),f&&(0,i.jsx)(a.Button,{onPress:d,className:`flex items-center justify-center p-1.5 ml-1 rounded-md text-text-muted hover:bg-bg-surface hover:text-text-main transition-colors outline-none focus-visible:ring-2 focus-visible:ring-primary-500/30 cursor-pointer`,children:(0,i.jsx)(s.ChevronRight,{size:16,className:e.x(`transition-transform duration-200`,u&&`rotate-90`)})})]}),u&&f&&(0,i.jsx)(`div`,{className:`pl-4 ml-[7px] border-l border-border-subtle/50 space-y-0.5 mt-0.5`,children:f})]}),K.GroupItem=({children:t,className:n})=>(0,i.jsx)(`div`,{className:e.x(n),children:t}),K.Link=({label:t,href:n,active:r,icon:a,badge:o,className:s})=>(0,i.jsxs)(e.i,{href:n,className:e.x(`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`,{"bg-primary-500/10 text-primary-500 font-medium":r,"text-text-muted hover:bg-bg-muted hover:text-text-main":!r},s),children:[a&&(0,i.jsx)(a,{size:16,className:e.x(r?`text-primary-500`:`text-text-muted group-hover:text-text-main`)}),(0,i.jsx)(`span`,{className:`truncate`,children:t}),o&&(0,i.jsx)(tt,{badge:o})]});const q=({children:t,className:n,...r})=>(0,i.jsx)(a.Breadcrumbs,{className:e.x(`flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted`,n),...r,children:t});q.Root=q,q.Item=({children:t,className:n,...r})=>(0,i.jsx)(a.Breadcrumb,{className:e.x(`flex items-center mb-0 gap-1.5`,n),...r,children:t}),q.Link=({children:t,href:n,className:r,...o})=>(0,i.jsx)(a.Link,{href:n,className:e.x(`transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm`,`current:font-medium current:text-text-main current:pointer-events-none cursor-pointer`,r),...o,children:t}),q.Separator=({className:t})=>(0,i.jsx)(s.ChevronRight,{size:14,className:e.x(`shrink-0 text-text-dim`,t)});const nt=({children:t,className:n,vertical:r=!1})=>(0,i.jsx)(`div`,{className:e.x(`inline-flex`,r?`flex-col`:`flex-row`,!r&&[`[&>*:not(:first-child)]:-ml-px`,`[&>*:first-child]:rounded-r-none`,`[&>*:last-child]:rounded-l-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,n?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-l-full`,`[&>*:last-child]:rounded-r-full`],n?.includes(`rounded-xl`)&&[`[&>*:first-child]:rounded-l-xl`,`[&>*:last-child]:rounded-r-xl`],n?.includes(`rounded-lg`)&&[`[&>*:first-child]:rounded-l-lg`,`[&>*:last-child]:rounded-r-lg`]],r&&[`[&>*:not(:first-child)]:-mt-px`,`[&>*:first-child]:rounded-b-none`,`[&>*:last-child]:rounded-t-none`,`[&>*:not(:first-child):not(:last-child)]:rounded-none`,n?.includes(`rounded-full`)&&[`[&>*:first-child]:rounded-t-full`,`[&>*:last-child]:rounded-b-full`]],n),children:t}),J=({children:t,className:n,showArrow:r,...o})=>(0,i.jsxs)(a.Popover,{offset:8,...o,className:a.composeRenderProps(n,t=>e.x(`z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none transition-none`,t)),children:[r&&(0,i.jsx)(a.OverlayArrow,{className:`group`,children:(0,i.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,i.jsx)(`path`,{d:`M0 0 L6 6 L12 0`})})}),t]});function rt(e){let[t,n]=r.Children.toArray(e.children).slice(0,2);return(0,i.jsxs)(a.MenuTrigger,{...e,children:[t,(0,i.jsx)(J,{placement:e.placement,className:`min-w-35`,children:n})]})}function it(e){let[t,n]=r.Children.toArray(e.children).slice(0,2);return(0,i.jsxs)(a.SubmenuTrigger,{...e,children:[t,(0,i.jsx)(J,{offset:-4,crossOffset:-4,children:n})]})}function Y(t){return(0,i.jsx)(a.Menu,{...t,className:a.composeRenderProps(t.className,t=>e.x(`p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75`,t))})}function at(t){let n=t.textValue||(typeof t.children==`string`?t.children:void 0);return(0,i.jsx)(a.MenuItem,{...t,textValue:n,className:a.composeRenderProps(t.className,(t,{isFocused:n,isPressed:r,isDisabled:i})=>e.x(`group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none`,`text-text-main text-[12px]`,{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":n,"bg-bg-surface-elevanted":r,"opacity-40 grayscale pointer-events-none":i},t)),children:a.composeRenderProps(t.children,(e,{selectionMode:t,isSelected:n,hasSubmenu:r})=>(0,i.jsxs)(i.Fragment,{children:[t!==`none`&&(0,i.jsxs)(`span`,{className:`flex items-center size-4 shrink-0 justify-center`,children:[n&&t===`multiple`&&(0,i.jsx)(s.Check,{className:`size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200`}),n&&t===`single`&&(0,i.jsx)(s.Dot,{className:`size-5 text-primary-500 animate-in zoom-in-50 duration-200`})]}),(0,i.jsx)(`div`,{className:`flex flex-row w-full transition-colors items-center gap-2 py-1 px-1`,children:e}),r&&(0,i.jsx)(s.ChevronRight,{className:`size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors`})]}))})}function ot({title:t,...n}){return(0,i.jsxs)(a.MenuSection,{...n,className:e.x(`flex flex-col gap-0.5`,n.className),children:[t&&(0,i.jsx)(a.Header,{className:`px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none`,children:t}),(0,i.jsx)(a.Collection,{items:n.items,children:n.children})]})}function st(e){return(0,i.jsx)(a.Separator,{...e,className:`mx-2 my-1.5 border-t border-border-subtle/50`})}Y.Root=Y,Y.Item=at,Y.Trigger=rt,Y.SubTrigger=it,Y.Section=ot,Y.Separator=st;function X({className:t,variant:n=`rect`,...r}){return(0,i.jsx)(`div`,{className:e.x(`animate-pulse bg-bg-muted`,n===`circle`?`rounded-full`:`rounded-md`,t),...r})}const ct=e=>{let[t,n]=(0,r.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)},handleOpenRaw:()=>{let t=new Blob([e],{type:`text/plain;charset=utf-8`}),n=URL.createObjectURL(t);window.open(n,`_blank`)}}};function lt({content:t,mdxRaw:n,config:r}){let a=n||t||``,{copied:o,handleCopy:c,handleOpenRaw:l}=ct(a),u=r!==!1,d=typeof r==`object`&&r.text||`Copy Markdown`;return!u||!a?null:(0,i.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,i.jsxs)(nt,{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,i.jsx)(E,{variant:`ghost`,onPress:c,icon:o?(0,i.jsx)(s.Check,{size:16}):(0,i.jsx)(s.Copy,{size:16}),iconPosition:`left`,className:e.x(`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`,o&&`text-emerald-500 hover:bg-emerald-500/5`),children:o?`Copied!`:d}),(0,i.jsxs)(Y.Trigger,{placement:`bottom end`,children:[(0,i.jsx)(E,{variant:`ghost`,isIconOnly:!0,icon:(0,i.jsx)(s.ChevronDown,{size:14}),className:e.x(`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,i.jsxs)(Y.Root,{className:`w-52`,children:[(0,i.jsxs)(Y.Item,{onAction:c,children:[(0,i.jsx)(s.Copy,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),(0,i.jsx)(`span`,{className:`font-medium text-[0.8125rem]`,children:`Copy Markdown`})]}),(0,i.jsxs)(Y.Item,{onAction:l,children:[(0,i.jsx)(s.ExternalLink,{size:16,className:`size-4 mt-0.5 text-text-muted group-hover:text-primary-500`}),(0,i.jsx)(`span`,{className:`font-medium text-[0.8125rem]`,children:`View as Markdown`})]})]})]})]})})}var ut=e.E({Admonition:()=>A,Badge:()=>ve,Button:()=>te,Card:()=>xe,Cards:()=>be,Caution:()=>Ee,CodeBlock:()=>k,ComponentPreview:()=>Ge,ComponentProps:()=>Ue,CopyMarkdown:()=>lt,Danger:()=>P,Field:()=>Be,FileTree:()=>Le,Image:()=>He,Important:()=>Te,InfoBox:()=>we,Link:()=>Ve,List:()=>Me,Note:()=>j,Tab:()=>me,Table:()=>ze,Tabs:()=>he,Tip:()=>M,Video:()=>ge,Warning:()=>N});function dt(){return(0,i.jsx)(`div`,{className:e.x(`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)(X,{className:`h-3 w-16`}),(0,i.jsx)(X,{className:`h-3 w-24`})]}),(0,i.jsx)(X,{className:`h-10 w-[60%] sm:h-12`}),(0,i.jsxs)(`div`,{className:`space-y-3`,children:[(0,i.jsx)(X,{className:`h-4 w-full`}),(0,i.jsx)(X,{className:`h-4 w-[95%]`}),(0,i.jsx)(X,{className:`h-4 w-[40%]`})]}),(0,i.jsxs)(`div`,{className:`space-y-6 pt-4`,children:[(0,i.jsx)(X,{className:`h-7 w-32`}),(0,i.jsxs)(`div`,{className:`space-y-3`,children:[(0,i.jsx)(X,{className:`h-4 w-full`}),(0,i.jsx)(X,{className:`h-4 w-[98%]`}),(0,i.jsx)(X,{className:`h-4 w-[92%]`}),(0,i.jsx)(X,{className:`h-4 w-[60%]`})]})]}),(0,i.jsx)(X,{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)(X,{className:`h-7 w-48`}),(0,i.jsxs)(`div`,{className:`space-y-3`,children:[(0,i.jsx)(X,{className:`h-4 w-full`}),(0,i.jsx)(X,{className:`h-4 w-[85%]`})]})]})]})})}const Z=({level:e,id:t,children:n,...r})=>(0,i.jsxs)(`h${e}`,{id:t,...r,className:`boltdocs-heading`,children:[n,t&&(0,i.jsx)(`a`,{href:`#${t}`,className:`header-anchor`,"aria-label":`Anchor`,children:(0,i.jsx)(s.Link,{size:16})})]}),ft={...ut,Loading:dt,h1:e=>(0,i.jsx)(Z,{level:1,...e}),h2:e=>(0,i.jsx)(Z,{level:2,...e}),h3:e=>(0,i.jsx)(Z,{level:3,...e}),h4:e=>(0,i.jsx)(Z,{level:4,...e}),h5:e=>(0,i.jsx)(Z,{level:5,...e}),h6:e=>(0,i.jsx)(Z,{level:6,...e}),pre:e=>(0,i.jsx)(k,{...e,children:e.children})},pt=o,mt=pt.HelmetProvider||pt.default?.HelmetProvider||(({children:e})=>(0,i.jsx)(i.Fragment,{children:e}));function ht({config:t}){let{currentLocale:n}=e.T();return(0,r.useEffect)(()=>{if(!t.i18n||typeof document>`u`)return;let e=n||t.i18n.defaultLocale,r=t.i18n.localeConfigs?.[e];document.documentElement.lang=r?.htmlLang||e||`en`,document.documentElement.dir=r?.direction||`ltr`},[n,t.i18n]),null}function gt({config:n}){let i=(0,t.useLocation)(),{setLocale:a,setVersion:o,currentLocale:s,currentVersion:c}=e.T();return(0,r.useEffect)(()=>{let e=i.pathname.split(`/`).filter(Boolean),t=0,r=n.versions?.defaultVersion,l=n.i18n?.defaultLocale;if(e[t]===`docs`&&t++,n.versions&&e.length>t){let i=n.versions.versions.find(n=>n.path===e[t]);i&&(r=i.path,t++)}if(n.i18n&&e.length>t){let r=e[t];(Array.isArray(n.i18n.locales)?n.i18n.locales.includes(r):n.i18n.locales[r])&&(l=r)}else n.i18n&&e.length===0&&(l=s||n.i18n.defaultLocale);l!==s&&a(l||``),r!==c&&o(r??``)},[i.pathname,n,a,o,s,c]),null}function _t({config:n,routes:o,components:s={}}){let c=(0,r.useMemo)(()=>({...ft,...u.default,...s}),[s]),l=(0,t.useNavigate)(),{pathname:d}=(0,t.useLocation)(),f=(0,r.useMemo)(()=>{let e=d||`/`;return e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e},[d]),p=(0,r.useMemo)(()=>o.find(e=>(e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e)(e.path===``?`/`:e.path)===f),[o,f]);return(0,i.jsx)(mt,{children:(0,i.jsx)(e.c,{routes:o,children:(0,i.jsx)(C,{children:(0,i.jsx)(g,{components:c,children:(0,i.jsx)(e.S.Provider,{value:n,children:(0,i.jsxs)(a.RouterProvider,{navigate:l,children:[(0,i.jsx)(ee,{}),(0,i.jsxs)(e.w,{initialLocale:p?.locale,initialVersion:p?.version,children:[(0,i.jsx)(gt,{config:n}),(0,i.jsx)(ht,{config:n}),(0,i.jsx)(t.Outlet,{})]})]})})})})})})}function vt(){return(0,i.jsx)(`div`,{className:`flex items-center justify-center min-h-[60vh] text-center`,children:(0,i.jsxs)(`div`,{className:`space-y-4`,children:[(0,i.jsx)(`span`,{className:`text-8xl font-black tracking-tighter text-primary-500/20`,children:`404`}),(0,i.jsx)(`h1`,{className:`text-2xl font-bold text-text-main`,children:`Page Not Found`}),(0,i.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,i.jsxs)(e.i,{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,i.jsx)(s.ArrowLeft,{size:16}),` Go to Home`]})]})})}function yt(e,t){let n=t.replace(/\\/g,`/`),r=Object.keys(e);if(r.length===0)return;let i=r[0].replace(/\\/g,`/`).split(`/`).filter(Boolean)[0]||`docs`,a=`/${i}/${n}`,o=`./${i}/${n}`;return r.find(e=>{let t=e.replace(/\\/g,`/`);return t===a||t===o||t.endsWith(a)})}function bt(e){let{routesData:t,config:n,mdxModules:r,Layout:a,homePage:o,externalPages:s,externalLayout:c,components:l}=e,u=c||a,d=e=>{let t=n.base||`/`;return e.startsWith(t)?e:`${t===`/`?``:t.replace(/\/$/,``)}${e.startsWith(`/`)?e:`/${e}`}`||`/`},f=[...t],p=[...t.map(e=>{let t=yt(r,e.filePath),n=t?r[t]?.default:null,a=d(e.path===``?`/`:e.path);return{path:a,element:(0,i.jsx)(v,{MDXComponent:n,mdxComponents:l}),loader:async()=>({path:a,frontmatter:{title:e.title,description:e.description||``},headings:e.headings||[],filePath:e.filePath,locale:e.locale,version:e.version,group:e.group,groupTitle:e.groupTitle}),getStaticPaths:()=>[a]}})];if(o){let e=[{path:d(`/`),locale:n.i18n?.defaultLocale}];n.i18n&&Object.keys(n.i18n.locales).forEach(t=>{e.push({path:d(`/${t}`),locale:t})}),e.forEach(({path:e,locale:t})=>{p.find(t=>t.path===e)||(f.push({path:e,locale:t,title:`Home`,filePath:``,headings:[]}),p.push({path:e,element:(0,i.jsx)(u,{children:(0,i.jsx)(o,{})}),loader:async()=>({path:e,locale:t}),getStaticPaths:()=>[e]}))})}return s&&Object.entries(s).forEach(([e,t])=>{let r=d(e);p.find(e=>e.path===r)||(f.push({path:r,locale:n.i18n?.defaultLocale,title:e,filePath:``,headings:[]}),p.push({path:r,element:(0,i.jsx)(u,{children:(0,i.jsx)(t,{})}),loader:async()=>({path:r,locale:n.i18n?.defaultLocale}),getStaticPaths:()=>[r]}),n.i18n&&Object.keys(n.i18n.locales).forEach(n=>{let r=d(`/${n}${e===`/`?``:e}`);p.find(e=>e.path===r)||(f.push({path:r,locale:n,title:e,filePath:``,headings:[]}),p.push({path:r,element:(0,i.jsx)(u,{children:(0,i.jsx)(t,{})}),loader:async()=>({path:r,locale:n}),getStaticPaths:()=>[r]}))}))}),p.push({path:`*`,element:(0,i.jsx)(u,{children:(0,i.jsx)(vt,{})})}),[{element:(0,i.jsx)(_t,{config:n,routes:f,components:l}),children:p}]}function Q(e,t){return e?typeof e==`string`?e:t&&e[t]?e[t]:Object.values(e)[0]||``:``}function xt(){let n=e.C(),{theme:r,resolvedTheme:i}=w(),a=(0,t.useLocation)(),{currentLocale:o}=e.s(),s=n.theme||{},c=Q(s.title,o)||`Boltdocs`,l=s.navbar||[],u=s.socialLinks||[],d=s.githubRepo,f=l.map(e=>{let t=e.href||e.to||e.link||``;return{label:Q(e.label||e.text,o),href:t,active:(e=>{let t=a.pathname;if(t===e)return!0;if(!e||e===`/`)return t===`/`;let r=e=>{let t=e.split(`/`).filter(Boolean),r=0;return n.i18n?.locales&&t[r]&&n.i18n.locales[t[r]]&&r++,n.versions?.versions&&t[r]&&n.versions.versions.some(e=>e.path===t[r])&&r++,t.slice(r)},i=r(e),o=r(t);return i.length===0?o.length===0:o.length<i.length?!1:i.every((e,t)=>o[t]===e)})(t),to:t.startsWith(`http`)||t.startsWith(`//`)?`external`:void 0}}),p=s.logo;return{links:f,title:c,logo:p?typeof p==`string`?p:i===`dark`?p.dark:p.light:null,logoProps:{alt:(p&&typeof p==`object`?p.alt:void 0)||c,width:p&&typeof p==`object`?p.width:void 0,height:p&&typeof p==`object`?p.height:void 0},github:d?`https://github.com/${d}`:null,social:u,config:n,theme:r}}function St(n){let r=e.C(),i=(0,t.useLocation)(),a=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,o=a(i.pathname),s=n.find(e=>a(e.path)===o),c=s?.tab?.toLowerCase(),l=c?n.filter(e=>!e.tab||e.tab.toLowerCase()===c):n,u=[],d=new Map;for(let e of l)!e.filePath&&!e.group||(e.group?(d.has(e.group)||d.set(e.group,{slug:e.group,title:e.groupTitle||e.group,routes:[],icon:e.groupIcon}),d.get(e.group).routes.push(e)):u.push(e));return{groups:Array.from(d.values()).map(e=>{let t=new Map,n=new Map;for(let r of e.routes)r.subRouteGroup&&((r.path.endsWith(`/${r.subRouteGroup}`)||r.path.endsWith(`/${r.subRouteGroup}/`))&&!t.has(r.subRouteGroup)?t.set(r.subRouteGroup,r):(n.has(r.subRouteGroup)||n.set(r.subRouteGroup,[]),n.get(r.subRouteGroup).push(r)));let r=[],i=new Set;for(let a of e.routes)if(a.subRouteGroup){if(!i.has(a.subRouteGroup)){i.add(a.subRouteGroup);let e=t.get(a.subRouteGroup),o=n.get(a.subRouteGroup)||[];e?r.push({...e,subRoutes:o}):r.push(...o)}}else r.push(a);return{...e,routes:r}}),ungrouped:u,activeRoute:s,activePath:o,config:r}}function Ct(e=[]){let[t,n]=(0,r.useState)(null);return{headings:e,activeId:t,setActiveId:n}}function wt(e=[],n=[]){let i=(0,t.useLocation)(),a=(0,r.useRef)([]),[o,s]=(0,r.useState)({opacity:0,transform:`translateX(0) scaleX(0)`,width:0}),c=e=>e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e,l=c(i.pathname),u=n.find(e=>c(e.path)===l)?.tab?.toLowerCase(),d=e.findIndex(e=>e.id.toLowerCase()===u),f=d===-1?0:d;return(0,r.useEffect)(()=>{let e=a.current[f];e&&s({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[f,e.length,i.pathname]),{tabs:e,activeIndex:f,indicatorStyle:o,tabRefs:a,activeTabId:u}}function $(e,t,n){let r=e;return t&&(r===t||r.startsWith(t+`/`))&&(r=r===t?`index.md`:r.slice(t.length+1)),n&&(r===n||r.startsWith(n+`/`))&&(r=r===n?`index.md`:r.slice(n.length+1)),r}function Tt(){let n=(0,t.useNavigate)(),r=e.s(),{allRoutes:i,currentRoute:a,currentVersion:o,currentLocale:s,config:c}=r,l=c.versions,{setVersion:u}=e.T(),d=e=>{if(!l||e===o)return;u(e);let t=c.i18n?Object.keys(c.i18n.locales).map(e=>`/${e}`):[];if(!(!a||a.path===`/`||a.path===c.base||a.path===``||t.includes(a.path))&&a){let t=`/docs/${e}`,r=$(a.filePath,a.version,a.locale),o=i.find(t=>$(t.filePath,t.version,t.locale)===r&&(t.version||l.defaultVersion)===e&&(s?t.locale===s:!t.locale));if(o)t=o.path;else{let n=i.find(t=>$(t.filePath,t.version,t.locale)===`index.md`&&(t.version||l.defaultVersion)===e&&(s?t.locale===s:!t.locale));t=n?n.path:`/docs/${e}${s?`/${s}`:``}`}n(t)}},f=r.availableVersions.map(e=>({...e,label:e.label,value:e.key}));return{currentVersion:o,currentVersionLabel:r.currentVersionLabel,availableVersions:f,handleVersionChange:d}}function Et(){let n=(0,t.useNavigate)(),{allRoutes:r,currentRoute:i,currentLocale:a,config:o}=e.s(),s=o.i18n,{setLocale:c}=e.T();return{currentLocale:a,currentLocaleLabel:o.i18n?.localeConfigs?.[a]?.label||o.i18n?.locales[a]||a,availableLocales:o.i18n?Object.entries(o.i18n.locales).map(([e,t])=>({key:e,label:o.i18n?.localeConfigs?.[e]?.label||t,value:e,isCurrent:e===a})):[],handleLocaleChange:e=>{if(!s||e===a)return;c(e);let t=`/`;if(i){let n=$(i.filePath,i.version,i.locale),a=r.find(t=>$(t.filePath,t.version,t.locale)===n&&(t.locale||s.defaultLocale)===e&&t.version===i.version);if(a)t=a.path;else{let n=r.find(t=>$(t.filePath,t.version,t.locale)===`index.md`&&(t.locale||s.defaultLocale)===e&&t.version===i.version);t=n?n.path:e===s.defaultLocale?i.version?`/${i.version}`:`/`:i.version?`/${i.version}/${e}`:`/${e}`}}else{let n=r.find(t=>(t.filePath===`index.mdx`||t.filePath===`index.md`)&&(t.locale||s.defaultLocale)===e&&!t.version);t=n?n.path:e===s.defaultLocale?`/`:`/${e}`}n(t)}}}function Dt(){let{routes:n,currentRoute:r}=e.s(),i=(0,t.useLocation)();if(!r)return{prevPage:null,nextPage:null,currentRoute:null};let a=r.tab?.toLowerCase(),o=a?n.filter(e=>e.tab?.toLowerCase()===a):n.filter(e=>!e.tab),s=o.findIndex(e=>e.path===i.pathname);return{prevPage:s>0?o[s-1]:null,nextPage:s!==-1&&s<o.length-1?o[s+1]:null,currentRoute:r}}function Ot(){let{currentRoute:t}=e.s(),n=[];return t&&(t.groupTitle&&n.push({label:t.groupTitle}),n.push({label:t.title,href:t.path})),{crumbs:n,activeRoute:t}}const kt=()=>(0,t.useLocation)();function At({children:t,className:n,style:r}){return(0,i.jsx)(`div`,{className:e.x(`h-screen flex flex-col overflow-hidden bg-bg-main text-text-main`,n),style:r,children:t})}function jt({children:t,className:n,style:r}){return(0,i.jsx)(`div`,{className:e.x(`mx-auto flex flex-1 w-full max-w-(--breakpoint-3xl) bg-bg-main overflow-hidden`,n),style:r,children:t})}function Mt({children:t,className:n,style:r}){return(0,i.jsx)(`main`,{className:e.x(`boltdocs-content flex-1 min-w-0 overflow-y-auto`,`contain-layout`,n),style:r,children:t})}function Nt({children:t,className:n,style:r}){let{pathname:a}=kt();return(0,i.jsx)(`div`,{className:e.x(`boltdocs-page mx-auto pt-4 pb-20 px-4 sm:px-8`,{"max-w-content-max":a.includes(`/docs/`)},n),style:r,children:t})}function Pt({children:t,className:n,style:r}){return(0,i.jsx)(`div`,{className:e.x(`flex items-center justify-between mb-10`,n),style:r,children:t})}function Ft({children:t,className:n,style:r}){return(0,i.jsx)(`div`,{className:e.x(`mt-20`,n),style:r,children:t})}const It=Object.assign(At,{Body:jt,Content:Mt,ContentMdx:Nt,ContentHeader:Pt,ContentFooter:Ft});function Lt(){let{theme:e,setTheme:t}=w(),[n,o]=(0,r.useState)(!1);if((0,r.useEffect)(()=>{o(!0)},[]),!n)return(0,i.jsx)(`div`,{className:`h-9 w-9`});let c=e===`system`?s.Monitor:e===`dark`?s.Moon:s.Sun;return(0,i.jsxs)(Y.Trigger,{placement:`bottom right`,children:[(0,i.jsx)(a.Button,{className:`flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main outline-none focus-visible:ring-2 focus-visible:ring-primary-500`,"aria-label":`Selection theme`,children:(0,i.jsx)(c,{size:20,className:`animate-in fade-in zoom-in duration-300`})}),(0,i.jsxs)(Y.Root,{selectionMode:`single`,selectedKeys:[e],onSelectionChange:e=>{let n=Array.from(e)[0];t(n)},children:[(0,i.jsxs)(Y.Item,{id:`light`,children:[(0,i.jsx)(s.Sun,{size:16}),(0,i.jsx)(`span`,{children:`Light`})]}),(0,i.jsxs)(Y.Item,{id:`dark`,children:[(0,i.jsx)(s.Moon,{size:16}),(0,i.jsx)(`span`,{children:`Dark`})]}),(0,i.jsxs)(Y.Item,{id:`system`,children:[(0,i.jsx)(s.Monitor,{size:16}),(0,i.jsx)(`span`,{children:`System`})]})]})]})}async function Rt(e,t,n=`https://api.github.com`){let r=new Headers;t&&r.append(`authorization`,t);let i=await(await fetch(`${n}/repos/${e}`,{headers:r})).json();return i.stargazers_count===void 0?`0`:zt(i.stargazers_count)}const zt=e=>Intl.NumberFormat(`en`,{notation:`compact`,compactDisplay:`short`}).format(e);function Bt({repo:t}){let[n,a]=(0,r.useState)(null);return(0,r.useEffect)(()=>{t&&Rt(t).then(e=>a(e)).catch(()=>a(`0`))},[t]),(0,i.jsxs)(`a`,{href:`https://github.com/${t}`,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,i.jsx)(e.f,{className:`h-4 w-4`}),n&&(0,i.jsx)(`span`,{className:`tabular-nums`,children:n})]})}function Vt({tabs:t,routes:n}){let{currentLocale:r}=e.s(),{indicatorStyle:a,tabRefs:o,activeIndex:c}=wt(t,n),l=e=>{if(!e)return null;if(e.trim().startsWith(`<svg`))return(0,i.jsx)(`span`,{className:`h-4 w-4`,dangerouslySetInnerHTML:{__html:e}});let t=s[e];return t?(0,i.jsx)(t,{size:16}):(0,i.jsx)(`img`,{src:e,alt:``,className:`h-4 w-4 object-contain`})};return(0,i.jsx)(`div`,{className:`mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6`,children:(0,i.jsxs)(G.List,{className:`border-none py-0`,children:[t.map((t,a)=>{let s=a===c,u=n.find(e=>e.tab&&e.tab.toLowerCase()===t.id.toLowerCase());return(0,i.jsxs)(e.i,{href:u?u.path:`#`,ref:e=>{o.current[a]=e},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${s?`text-primary-500`:`text-text-muted hover:text-text-main`}`,children:[l(t.icon),(0,i.jsx)(`span`,{children:Q(t.text,r)})]},t.id)}),(0,i.jsx)(G.Indicator,{style:a})]})})}const Ht=(0,r.lazy)(()=>Promise.resolve().then(()=>require(`../search-dialog-CV3eJzMm.cjs`)).then(e=>({default:e.SearchDialog})));function Ut(){let{links:n,title:a,logo:o,logoProps:s,github:c,social:l,config:u}=xt(),{routes:d,allRoutes:f,currentVersion:p,currentLocale:m}=e.s(),{pathname:h}=(0,t.useLocation)(),g=u.theme||{},_=h.startsWith(`/docs`),v=g?.tabs&&g.tabs.length>0;return(0,i.jsxs)(e.r.Root,{className:v?`border-b-0`:``,children:[(0,i.jsxs)(e.r.Content,{children:[(0,i.jsxs)(e.r.Left,{children:[o&&(0,i.jsx)(e.r.Logo,{src:o,alt:s?.alt||a,width:s?.width??24,height:s?.height??24}),(0,i.jsx)(e.r.Title,{children:a}),u.versions&&p&&(0,i.jsx)(Gt,{})]}),(0,i.jsx)(e.r.Center,{children:(0,i.jsx)(r.Suspense,{fallback:(0,i.jsx)(`div`,{className:`h-9 w-32 animate-pulse rounded-md bg-bg-surface`}),children:(0,i.jsx)(Ht,{routes:d||[]})})}),(0,i.jsxs)(e.r.Right,{children:[(0,i.jsx)(e.r.Links,{children:n.map(e=>(0,i.jsx)(Wt,{link:e},e.href))}),u.i18n&&m&&(0,i.jsx)(Kt,{}),(0,i.jsx)(e.r.Split,{}),(0,i.jsx)(Lt,{}),c&&(0,i.jsx)(Bt,{repo:g?.githubRepo??``}),l.length>0&&(0,i.jsx)(e.r.Split,{}),(0,i.jsx)(`div`,{className:`flex items-center gap-1`,children:l.map(({icon:t,link:n})=>(0,i.jsx)(e.r.Socials,{icon:t,link:n,className:`p-1.5`},n))})]})]}),_&&v&&g?.tabs&&(0,i.jsx)(`div`,{className:`w-full border-b border-border-subtle bg-bg-main`,children:(0,i.jsx)(Vt,{tabs:g.tabs,routes:f||d||[]})})]})}function Wt({link:t}){let n=e.o(t.href||``);return(0,i.jsx)(e.r.Link,{...t,href:n})}function Gt(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:n}=Tt();return t.length===0?null:(0,i.jsxs)(Y.Trigger,{children:[(0,i.jsx)(E,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:(0,i.jsx)(s.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,i.jsx)(`span`,{className:`font-semibold text-[0.8125rem]`,children:e})}),(0,i.jsx)(Y.Root,{children:(0,i.jsx)(Y.Section,{items:t,children:e=>(0,i.jsx)(Y.Item,{onPress:()=>n(e.value),children:e.label},`${e.value??``}`)})})]})}function Kt(){let{currentLocale:e,availableLocales:t,handleLocaleChange:n}=Et();return t.length===0?null:(0,i.jsxs)(Y.Trigger,{children:[(0,i.jsx)(E,{variant:`outline`,size:`sm`,rounded:`lg`,iconPosition:`right`,icon:(0,i.jsx)(s.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,i.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,i.jsx)(s.Languages,{className:`w-3.5 h-3.5 text-primary-500`}),(0,i.jsx)(`span`,{className:`font-bold text-[0.75rem] uppercase opacity-90`,children:e||`en`})]})}),(0,i.jsx)(Y.Root,{children:(0,i.jsx)(Y.Section,{items:t,children:e=>(0,i.jsx)(Y.Item,{onPress:()=>n(e.value),children:(0,i.jsxs)(`div`,{className:`flex items-center justify-between w-full gap-4`,children:[(0,i.jsx)(`span`,{children:e.label}),(0,i.jsx)(`span`,{className:`text-[10px] font-bold opacity-40 uppercase tracking-tighter`,children:e.value})]})},`${e.value??``}`)})})]})}function qt(){return(0,i.jsx)(`div`,{className:`flex items-center justify-center mt-10 mb-4 px-4 w-full`,children:(0,i.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,i.jsx)(s.Zap,{className:`w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300`,fill:`currentColor`}),(0,i.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,i.jsx)(`strong`,{className:`font-bold text-text-main/80 group-hover:text-text-main`,children:`Boltdocs`})]})]})})}function Jt(e){if(!e)return;let t={...s,...d.default};return t[e]||t[e+`Icon`]||void 0}function Yt({route:e,activePath:t,getIcon:n}){let a=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path),o=(0,r.useMemo)(()=>e.subRoutes?.some(e=>e.path===t),[e.subRoutes,t]),[s,c]=(0,r.useState)(o||a);return(0,r.useEffect)(()=>{(o||a)&&c(!0)},[o,a]),(0,i.jsx)(K.SubGroup,{label:e.title,href:e.path,active:a,icon:n(e.icon),badge:e.badge,isOpen:s,onToggle:()=>c(!s),children:e.subRoutes?.map(e=>{let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return(0,i.jsx)(K.Link,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge},e.path)})})}function Xt({group:e,activePath:t,getIcon:n}){return(0,i.jsx)(K.Group,{title:e.title,icon:n(e.icon),children:e.routes.map(e=>{if(e.subRoutes&&e.subRoutes.length>0)return(0,i.jsx)(Yt,{route:e,activePath:t,getIcon:n},e.path);let r=t===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return(0,i.jsx)(K.Link,{label:e.title,href:e.path,active:r,icon:n(e.icon),badge:e.badge},e.path)})})}function Zt({routes:e,config:t}){let{groups:n,ungrouped:r,activePath:a}=St(e),o=t.theme||{};return(0,i.jsxs)(K.Root,{children:[r.length>0&&(0,i.jsx)(K.Group,{className:`mb-6`,children:r.map(e=>{let t=a===(e.path.endsWith(`/`)?e.path.slice(0,-1):e.path);return(0,i.jsx)(K.Link,{label:e.title,href:e.path,active:t,icon:Jt(e.icon),badge:e.badge},e.path)})}),n.map(e=>(0,i.jsx)(Xt,{group:e,activePath:a,getIcon:Jt},e.slug)),o?.poweredBy&&(0,i.jsx)(`div`,{className:`mt-auto pt-8`,children:(0,i.jsx)(qt,{})})]})}function Qt({headings:e=[],editLink:t,communityHelp:n,filePath:a}){let{headings:o}=Ct(e),s=(0,r.useMemo)(()=>o.map(e=>({title:e.text,url:`#${e.id}`,depth:e.level})),[o]);return o.length===0?null:(0,i.jsx)(Qe,{toc:s,children:(0,i.jsx)($t,{headings:o,editLink:t,communityHelp:n,filePath:a})})}function $t({headings:e,editLink:t,communityHelp:n,filePath:a}){let o=H(),[c,l]=(0,r.useState)({opacity:0}),u=(0,r.useRef)(null),d=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(!o||!u.current)return;let e=u.current.querySelector(`a[href="#${o}"]`);e&&l({transform:`translateY(${e.offsetTop}px)`,height:`${e.offsetHeight}px`,opacity:1})},[o]);let f=(0,r.useCallback)((e,t)=>{e.preventDefault();let n=document.getElementById(t);n&&(n.scrollIntoView({behavior:`smooth`}),window.history.pushState(null,``,`#${t}`))},[]);return(0,i.jsxs)(U.Root,{children:[(0,i.jsxs)(U.Header,{className:`flex flex-row gap-x-2`,children:[(0,i.jsx)(s.TextAlignStart,{size:16}),`On this page`]}),(0,i.jsx)(Ze,{containerRef:d,children:(0,i.jsxs)(U.Content,{className:`max-h-[450px] boltdocs-otp-scroll-area`,ref:d,children:[(0,i.jsx)(U.Indicator,{style:c}),(0,i.jsx)(`ul`,{className:`relative space-y-2 border-l border-border-subtle`,ref:u,children:e.map(e=>(0,i.jsx)(U.Item,{level:e.level,children:(0,i.jsx)(U.Link,{href:`#${e.id}`,active:o===e.id,onClick:t=>f(t,e.id),className:`pl-4`,children:e.text})},e.id))})]})}),(t||n)&&(0,i.jsxs)(`div`,{className:`mt-8 pt-8 border-t border-border-subtle space-y-4`,children:[(0,i.jsx)(`p`,{className:`text-xs font-bold uppercase text-text-main`,children:`Need help?`}),(0,i.jsxs)(`ul`,{className:`space-y-3`,children:[t&&a&&(0,i.jsx)(`li`,{children:(0,i.jsxs)(`a`,{href:t.replace(`:path`,a),target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors`,children:[(0,i.jsx)(s.Pencil,{size:16}),`Edit this page`]})}),n&&(0,i.jsx)(`li`,{children:(0,i.jsxs)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors`,children:[(0,i.jsx)(s.CircleHelp,{size:16}),`Community help`]})})]})]})]})}const en=o,tn=en.Helmet||en.default?.Helmet||(({children:e})=>(0,i.jsx)(i.Fragment,{children:e}));function nn({siteTitle:n,siteDescription:r,routes:a}){let o=(0,t.useLocation)(),s=e.C(),c=a?.find?.(e=>e.path===o.pathname),l=c?.title,u=c?.description||r||``,d=l?`${l} | ${n}`:n,f=c?.seo||{},p=s?.seo?.metatags||{},m=s?.seo?.thumbnails?.background,h=f[`og:image`]||m;return(0,i.jsxs)(tn,{children:[(0,i.jsx)(`title`,{children:d}),(0,i.jsx)(`meta`,{name:`description`,content:u}),(0,i.jsx)(`meta`,{property:`og:title`,content:d}),(0,i.jsx)(`meta`,{property:`og:description`,content:u}),(0,i.jsx)(`meta`,{property:`og:type`,content:`article`}),typeof window<`u`&&(0,i.jsx)(`meta`,{property:`og:url`,content:window.location.href}),typeof window<`u`&&(0,i.jsx)(`link`,{rel:`canonical`,href:window.location.origin+o.pathname}),(0,i.jsx)(`meta`,{name:`twitter:card`,content:`summary`}),(0,i.jsx)(`meta`,{name:`twitter:title`,content:d}),(0,i.jsx)(`meta`,{name:`twitter:description`,content:u}),h&&(0,i.jsx)(`meta`,{name:`twitter:image`,content:h}),h&&(0,i.jsx)(`meta`,{property:`og:image`,content:h}),(0,i.jsx)(`meta`,{name:`generator`,content:`Boltdocs`}),Object.entries(p).map(([e,t])=>e.startsWith(`og:`)||e.startsWith(`music:`)||e.startsWith(`video:`)||e.startsWith(`article:`)||e.startsWith(`book:`)||e.startsWith(`profile:`)?(0,i.jsx)(`meta`,{property:e,content:t},e):(0,i.jsx)(`meta`,{name:e,content:t},e)),Object.entries(f).map(([e,t])=>e===`noindex`&&t===!0?(0,i.jsx)(`meta`,{name:`robots`,content:`noindex`},`noindex`):e===`robots`?(0,i.jsx)(`meta`,{name:`robots`,content:t},`robots`):e===`canonical`?(0,i.jsx)(`link`,{rel:`canonical`,href:t},`canonical`):e.startsWith(`og:`)||e.startsWith(`music:`)||e.startsWith(`video:`)||e.startsWith(`article:`)||e.startsWith(`book:`)||e.startsWith(`profile:`)?(0,i.jsx)(`meta`,{property:e,content:t},e):(0,i.jsx)(`meta`,{name:e,content:t},e))]})}function rn(){let{crumbs:t,activeRoute:n}=Ot(),r=e.C().theme||{};return t.length===0||!r?.breadcrumbs?null:(0,i.jsxs)(q.Root,{children:[(0,i.jsx)(q.Item,{children:(0,i.jsx)(q.Link,{href:`/`,children:(0,i.jsx)(s.Home,{size:14})})}),t.map((t,r)=>(0,i.jsxs)(q.Item,{children:[(0,i.jsx)(q.Separator,{}),(0,i.jsx)(q.Link,{href:t.href,className:e.x({"font-medium text-text-main":t.href===n?.path}),children:t.label})]},`crumb-${t.href}-${t.label}-${r}`))]})}function an(){let{prevPage:e,nextPage:t}=Dt();return!e&&!t?null:(0,i.jsxs)(W.Root,{className:`animate-in fade-in slide-in-from-bottom-4 duration-700`,children:[e?(0,i.jsxs)(W.Link,{to:e.path,direction:`prev`,children:[(0,i.jsx)(W.Title,{children:`Previous`}),(0,i.jsx)(W.Description,{children:e.title})]}):(0,i.jsx)(`div`,{}),t&&(0,i.jsxs)(W.Link,{to:t.path,direction:`next`,children:[(0,i.jsx)(W.Title,{children:`Next`}),(0,i.jsx)(W.Description,{children:t.title})]})]})}var on=class extends r.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`Uncaught error in Boltdocs Layout:`,e,t)}render(){return this.state.hasError?this.props.fallback||(0,i.jsxs)(`div`,{className:`flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4`,children:[(0,i.jsx)(`div`,{className:`text-lg font-bold text-red-400`,children:`Something went wrong`}),(0,i.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,i.jsx)(E,{className:`rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer`,onPress:()=>this.setState({hasError:!1}),children:`Try again`})]}):this.props.children}};exports.Admonition=A,exports.AnchorProvider=Qe,exports.Badge=ve,exports.BoltdocsShell=_t,exports.Breadcrumbs=rn,exports.Button=te,exports.ButtonGroup=nt,exports.Card=xe,exports.Cards=be,exports.Caution=Ee,exports.CodeBlock=k,exports.ComponentPreview=Ge,exports.ComponentProps=Ue,exports.CopyMarkdown=lt,exports.Danger=P,exports.DocsLayout=It,exports.ErrorBoundary=on,exports.Field=Be,exports.FileTree=Le,exports.Head=nn,exports.Image=He,exports.Important=Te,exports.InfoBox=we,exports.Link=Ve,exports.List=Me,exports.Loading=dt,exports.MdxPage=v,exports.Navbar=Ut,exports.NotFound=vt,exports.Note=j,exports.OnThisPage=Qt,exports.PageNav=an,exports.PrimitiveBreadcrumbs=q,exports.PrimitiveButton=E,exports.PrimitiveLink=e.i,exports.PrimitiveMenu=Y,exports.PrimitiveNavLink=e.a,exports.PrimitiveNavbar=e.r,exports.PrimitiveNavigationMenu=z,exports.PrimitiveOnThisPage=U,exports.PrimitivePageNav=W,exports.PrimitivePopover=J,exports.PrimitiveSidebar=K,exports.PrimitiveSkeleton=X,exports.PrimitiveTabs=G,exports.PrimitiveTooltip=O,exports.ScrollProvider=Ze,exports.SearchDialogPrimitive=e.n,exports.Sidebar=Zt,exports.Tab=me,exports.Table=ze,exports.Tabs=he,exports.Tip=M,exports.Video=ge,exports.Warning=N,exports.cn=e.x,exports.createRoutes=bt,exports.getTranslated=Q,exports.useActiveAnchor=H,exports.useActiveAnchors=Xe,exports.useBreadcrumbs=Ot,exports.useConfig=e.C,exports.useI18n=Et,exports.useItems=V,exports.useLocalizedTo=e.o,exports.useLocation=kt,exports.useMdxComponents=h,exports.useNavbar=xt,exports.useOnThisPage=Ct,exports.usePageNav=Dt,exports.useRoutes=e.s,exports.useSearch=e.t,exports.useSidebar=St,exports.useTabs=wt,exports.useTheme=w,exports.useVersion=Tt;
6
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../icons-dev-rzdz6Lf3.cjs`),t=require(`../docs-layout-BlDhcQRv.cjs`),n=require(`../image-DIGjCPe6.cjs`),r=require(`../search-dialog-D26rUnJ_.cjs`),i=require(`../search-dialog-BACuzoVX.cjs`),a=require(`../mdx-hpErbRUe.cjs`);let o=require(`react-router-dom`),s=require(`react`),c=require(`react/jsx-runtime`),l=require(`lucide-react`);l=e.O(l);let u=require(`react-aria-components`),d=require(`react-helmet-async`);d=e.O(d);let f=require(`virtual:boltdocs-mdx-components`);f=e.O(f);let p=require(`virtual:boltdocs-layout`);p=e.O(p);const m=Symbol.for(`__BDOCS_MDX_COMPONENTS_CONTEXT__`),h=Symbol.for(`__BDOCS_MDX_COMPONENTS_INSTANCE__`),g=globalThis[m]||(globalThis[m]=(0,s.createContext)({}));function _(){let e=(0,s.use)(g);return(!e||Object.keys(e).length===0)&&globalThis[h]?globalThis[h]:e}function v({components:e,children:t}){let n=(0,s.useMemo)(()=>{let t={},n={};return Object.entries(e).forEach(([e,r])=>{if(e.startsWith(`Frontmatter_`)){let t=e.slice(12);n[t]=r}else t[e]=r}),t.Frontmatter=n,t},[e]);return typeof globalThis<`u`&&(globalThis[h]=n),(0,c.jsx)(g.Provider,{value:n,children:t})}function y(){let{currentRoute:t}=e.x(),n=[];return t&&(t.groupTitle&&n.push({label:t.groupTitle}),n.push({label:t.title,href:t.path})),{crumbs:n,activeRoute:t}}function b(){let{crumbs:n,activeRoute:r}=y();return n.length===0?null:(0,c.jsxs)(t.N.Root,{className:`gap-2 text-xs sm:text-sm font-medium`,children:[(0,c.jsx)(t.N.Item,{children:(0,c.jsx)(t.N.Link,{href:`/`,className:`text-muted hover:text-body transition-colors flex items-center`,children:(0,c.jsx)(l.Home,{size:14})})}),n.map((n,i)=>{let a=n.href===r?.path;return(0,c.jsxs)(t.N.Item,{className:`gap-2`,children:[(0,c.jsx)(t.N.Separator,{className:`text-muted/40`}),(0,c.jsx)(t.N.Link,{href:n.href,className:e.y(`transition-colors`,a?`text-body font-semibold cursor-default pointer-events-none`:`text-muted hover:text-body`),children:n.label})]},`crumb-${n.href}-${n.label}-${i}`)})]})}const x=e=>{let[t,n]=(0,s.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)},handleOpenRaw:()=>{let t=new Blob([e],{type:`text/plain;charset=utf-8`}),n=URL.createObjectURL(t);window.open(n,`_blank`)}}};function S({content:n,mdxRaw:r}){let i=r||n||``,{copied:a,handleCopy:o,handleOpenRaw:s}=x(i);return i?(0,c.jsx)(`div`,{className:`relative inline-flex z-100 shrink-0 w-max`,children:(0,c.jsxs)(t.j,{className:`rounded-xl border border-subtle bg-surface transition-all duration-300 hover:border-primary-500/50 group overflow-hidden`,children:[(0,c.jsx)(t.M,{onPress:o,className:e.y(`md:hidden flex items-center justify-center w-8 h-8 bg-transparent outline-none select-none cursor-pointer border-none`,`text-muted transition-all duration-300 hover:bg-primary-500/5 hover:text-body`,a&&`text-emerald-500 hover:bg-emerald-500/5`),"aria-label":a?`Copied!`:`Copy Markdown`,children:a?(0,c.jsx)(l.Check,{size:14}):(0,c.jsx)(l.Copy,{size:14})}),(0,c.jsxs)(t.M,{onPress:o,className:e.y(`hidden md:flex items-center gap-2 px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 shrink-0 outline-none select-none cursor-pointer border-none`,`text-body transition-all duration-300 hover:bg-primary-500/5`,a&&`text-emerald-500 hover:bg-emerald-500/5`),children:[a?(0,c.jsx)(l.Check,{size:16}):(0,c.jsx)(l.Copy,{size:16}),a?`Copied!`:`Copy Markdown`]}),(0,c.jsxs)(t.k.Trigger,{placement:`bottom end`,children:[(0,c.jsx)(t.M,{className:e.y(`flex items-center justify-center px-2.5 md:px-3.5 h-8 md:h-9 border-none border-l border-subtle/50 text-muted rounded-none bg-transparent shrink-0 outline-none select-none cursor-pointer`,`transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500`),children:(0,c.jsx)(l.ChevronDown,{size:14})}),(0,c.jsxs)(t.k.Root,{className:`w-52 bg-main border border-subtle rounded-xl p-1.5 shadow-md outline-none flex flex-col gap-0.5 animate-fade-in z-100`,children:[(0,c.jsxs)(t.k.Item,{onAction:o,className:`flex items-center px-3 py-2 rounded-lg text-xs font-medium text-body dark:hover:bg-primary-300/50 hover:bg-primary-200/50 transition-colors duration-100 cursor-pointer select-none outline-none group`,children:[(0,c.jsx)(l.Copy,{size:16,className:`size-4 text-muted dark:group-hover:text-primary-500 group-hover:text-primary-400`}),(0,c.jsx)(`span`,{className:`ml-2`,children:`Copy Markdown`})]}),(0,c.jsxs)(t.k.Item,{onAction:s,className:`flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-medium text-body dark:hover:bg-primary-300/50 hover:bg-primary-200/50 transition-colors duration-100 cursor-pointer select-none outline-none group`,children:[(0,c.jsx)(l.ExternalLink,{size:16,className:`size-4 text-muted dark:group-hover:text-primary-500 group-hover:text-primary-400`}),(0,c.jsx)(`span`,{className:`ml-2`,children:`View as Markdown`})]})]})]})]})}):null}function C({children:e,fallback:n}){return(0,c.jsx)(t.D,{fallback:n,children:e})}async function w(e,t,n=`https://api.github.com`){let r=new Headers;t&&r.append(`authorization`,t);let i=await(await fetch(`${n}/repos/${e}`,{headers:r})).json();return i.stargazers_count===void 0?`0`:T(i.stargazers_count)}const T=e=>Intl.NumberFormat(`en`,{notation:`compact`,compactDisplay:`short`}).format(e);function E({repo:t}){let[n,r]=(0,s.useState)(null);return(0,s.useEffect)(()=>{t&&w(t).then(e=>r(e)).catch(()=>r(`0`))},[t]),(0,c.jsxs)(`a`,{href:`https://github.com/${t}`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-2 rounded-xl border border-subtle bg-surface px-3 py-1.5 text-xs font-semibold text-muted dark:hover:bg-primary-300/50 hover:bg-primary-200/50 transition-colors duration-100 hover:border-primary-500/50 hover:text-body select-none outline-none`,children:[(0,c.jsx)(e.s,{className:`h-4 w-4 text-body`}),n!==null&&(0,c.jsxs)(`span`,{className:`tabular-nums font-medium`,children:[n,` stars`]})]})}function D(e,t){return e?typeof e==`string`?e:t&&e[t]?e[t]:Object.values(e)[0]||``:``}function O(){let t=e.D(),{theme:r,resolvedTheme:i}=n.l(),a=(0,o.useLocation)(),{currentLocale:c}=e.x(),l=t.theme||{},u=D(l.title,c)||`Boltdocs`,d=l.navbar||[],f=l.socialLinks||[],p=l.githubRepo,m=(0,s.useMemo)(()=>d.map(e=>{let n=e.href||e.to||e.link||``,r=e=>{let n=a.pathname;if(n===e)return!0;if(!e||e===`/`)return n===`/`;let r=e=>{let n=e.split(`/`).filter(Boolean),r=0;return t.i18n?.locales&&n[r]&&t.i18n.locales[n[r]]&&r++,t.versions?.versions&&n[r]&&t.versions.versions.some(e=>e.path===n[r])&&r++,n.slice(r)},i=r(e),o=r(n);return i.length===0?o.length===0:o.length<i.length?!1:i.every((e,t)=>o[t]===e)},i=(e=>{if(!(!e||e.length===0))return e.map(e=>{let t=e.href||e.to||e.link||``;return{label:D(e.label||e.text,c),href:t,active:r(t),to:t.startsWith(`http`)||t.startsWith(`//`)?`external`:void 0}})})(e.items);return{label:D(e.label||e.text,c),href:n,active:r(n),to:n.startsWith(`http`)||n.startsWith(`//`)?`external`:void 0,items:i}}),[d,a.pathname,c,t]),h=l.logo;return{links:m,title:u,logo:h?typeof h==`string`?h:i===`dark`?h.dark:h.light:null,logoProps:{alt:(h&&typeof h==`object`?h.alt:void 0)||u,width:h&&typeof h==`object`?h.width:void 0,height:h&&typeof h==`object`?h.height:void 0},github:p?`https://github.com/${p}`:null,social:f,config:t,theme:r}}function ee(){let{theme:e,setTheme:r}=n.l(),[i,a]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{a(!0)},[]),!i)return(0,c.jsx)(`div`,{className:`h-9 w-9`});let o=e===`system`?l.Monitor:e===`dark`?l.Moon:l.Sun;return(0,c.jsxs)(t.k.Trigger,{placement:`bottom right`,children:[(0,c.jsx)(u.Button,{className:`flex h-9 w-9 items-center justify-center rounded-xl text-muted transition-colors hover:bg-surface hover:text-body outline-none border-none bg-transparent cursor-pointer`,"aria-label":`Selection theme`,children:(0,c.jsx)(o,{size:20,className:`animate-in fade-in zoom-in duration-300`})}),(0,c.jsxs)(t.k.Root,{selectionMode:`single`,selectedKeys:[e],onSelectionChange:e=>{let t=Array.from(e)[0];r(t)},className:`w-36 bg-main border border-subtle rounded-xl p-1.5 shadow-md outline-none flex flex-col gap-0.5 animate-fade-in z-100`,children:[(0,c.jsxs)(t.k.Item,{id:`light`,className:`group flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-medium text-body dark:hover:bg-primary-300/50 hover:bg-primary-200/50 transition-colors duration-100 cursor-pointer select-none outline-none group data-selected:text-primary-500 data-selected:bg-primary-500/5`,children:[(0,c.jsx)(l.Sun,{className:`group-hover:text-primary-500 dark:group-hover:text-primary-200`,size:16}),(0,c.jsx)(`span`,{className:`ml-2`,children:`Light`})]}),(0,c.jsxs)(t.k.Item,{id:`dark`,className:`flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-medium text-body dark:hover:bg-primary-300/50 hover:bg-primary-200/50 transition-colors duration-100 cursor-pointer select-none outline-none group data-selected:text-primary-500 data-selected:bg-primary-500/5`,children:[(0,c.jsx)(l.Moon,{className:`group-hover:text-primary-500 dark:group-hover:text-primary-200`,size:16}),(0,c.jsx)(`span`,{className:`ml-2`,children:`Dark`})]}),(0,c.jsxs)(t.k.Item,{id:`system`,className:`flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-medium text-body dark:hover:bg-primary-300/50 hover:bg-primary-200/50 transition-colors duration-100 cursor-pointer select-none outline-none group data-selected:text-primary-500 data-selected:bg-primary-500/5`,children:[(0,c.jsx)(l.Monitor,{className:`group-hover:text-primary-500 dark:group-hover:text-primary-200`,size:16}),(0,c.jsx)(`span`,{className:`ml-2`,children:`System`})]})]})]})}function k({className:t}){let{theme:r,setTheme:i}=n.l(),[a,o]=(0,s.useState)(!1);if((0,s.useEffect)(()=>{o(!0)},[]),!a)return(0,c.jsx)(`div`,{className:e.y(`h-10 w-full bg-surface rounded-xl animate-pulse`,t)});let u=r===`dark`;return(0,c.jsxs)(`div`,{className:e.y(`flex p-1 bg-surface border border-subtle rounded-xl relative w-full h-11`,t),children:[(0,c.jsx)(`div`,{className:e.y(`absolute inset-y-1 w-[calc(50%-4px)] bg-main border border-subtle rounded-lg transition-all duration-300 ease-out shadow-xs`,u?`translate-x-full`:`translate-x-0`)}),(0,c.jsx)(`button`,{onClick:()=>i(`light`),className:e.y(`flex-1 flex items-center justify-center rounded-lg z-10 transition-colors outline-none cursor-pointer border-none bg-transparent`,u?`text-muted hover:text-body`:`text-body font-semibold`),"aria-label":`Light mode`,children:(0,c.jsx)(l.Sun,{size:18})}),(0,c.jsx)(`button`,{onClick:()=>i(`dark`),className:e.y(`flex-1 flex items-center justify-center rounded-lg z-10 transition-colors outline-none cursor-pointer border-none bg-transparent`,u?`text-body font-semibold`:`text-muted hover:text-body`),"aria-label":`Dark mode`,children:(0,c.jsx)(l.Moon,{size:18})})]})}function A(t=[],n=[]){let r=(0,o.useLocation)(),i=(0,s.useRef)([]),[a,c]=(0,s.useState)({opacity:0,transform:`translateX(0) scaleX(0)`,width:0}),l=e.S(r.pathname),u=n.find(t=>e.S(t.path)===l)?.tab?.toLowerCase(),d=t.findIndex(e=>e.id.toLowerCase()===u),f=d===-1?0:d;return(0,s.useEffect)(()=>{let e=i.current[f];e&&c({opacity:1,width:e.offsetWidth,transform:`translateX(${e.offsetLeft}px)`})},[f,t.length,r.pathname]),{tabs:t,activeIndex:f,indicatorStyle:a,tabRefs:i,activeTabId:u}}function te({tabs:n,routes:r}){let{currentLocale:i}=e.x(),{indicatorStyle:a,tabRefs:o,activeIndex:u}=A(n,r);(0,s.useEffect)(()=>{let e=o.current[u];e&&e.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})},[u]);let d=e=>{if(!e)return null;if(e.trim().startsWith(`<svg`))return(0,c.jsx)(`span`,{className:`h-4 w-4`,dangerouslySetInnerHTML:{__html:e}});let t=l[e];return t?(0,c.jsx)(t,{size:16}):(0,c.jsx)(`img`,{src:e,alt:``,className:`h-4 w-4 object-contain`})};return(0,c.jsx)(`div`,{className:`mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6 select-none`,children:(0,c.jsxs)(t.E.List,{className:`border-none py-0 scrollbar-hide relative flex flex-row items-center`,children:[n.map((t,n)=>{let a=n===u,s=r.find(e=>e.tab&&e.tab.toLowerCase()===t.id.toLowerCase());return(0,c.jsxs)(e._,{href:s?s.path:`#`,ref:e=>{o.current[n]=e},className:`relative flex items-center gap-2 px-4 py-3.5 text-sm font-semibold transition-colors duration-300 outline-none whitespace-nowrap ${a?`text-primary-500`:`text-muted hover:text-body`}`,children:[d(t.icon),(0,c.jsx)(`span`,{children:D(t.text,i)})]},t.id)}),(0,c.jsx)(t.E.Indicator,{style:a,className:`h-0.5 bg-primary-500 rounded-full transition-all duration-300`})]})})}function j(e,t,n){let r=e;return t&&(r===t||r.startsWith(t+`/`))&&(r=r===t?`index.md`:r.slice(t.length+1)),n&&(r===n||r.startsWith(n+`/`))&&(r=r===n?`index.md`:r.slice(n.length+1)),r}function M(){let t=(0,o.useNavigate)(),n=e.D(),{allRoutes:r,currentRoute:i,currentVersion:a,currentLocale:c}=e.x(),l=n.versions,{setVersion:u}=e.w();return{currentVersion:a,currentVersionLabel:l?.versions?.find?.(e=>e.path===a)?.label||a,availableVersions:(0,s.useMemo)(()=>l?l.versions.map(e=>({key:e.path,label:e.label,value:e.path,isCurrent:e.path===a})):[],[l,a]),handleVersionChange:e=>{if(!l||e===a)return;u(e);let o=`${(n.base||`/docs`).replace(/\/$/,``)}/${e}${c?`/${c}`:``}`;if(i){let t=j(i.filePath,i.version,i.locale),a=r.find(r=>j(r.filePath,r.version,r.locale)===t&&(r.version||l.defaultVersion)===e&&(!n.i18n||(r.locale||n.i18n.defaultLocale)===c));if(a)o=a.path;else{let t=r.find(t=>j(t.filePath,t.version,t.locale)===`index.md`&&(t.version||l.defaultVersion)===e&&(!n.i18n||(t.locale||n.i18n.defaultLocale)===c));t&&(o=t.path)}}else{let t=r.find(t=>(t.version||l.defaultVersion)===e&&(!n.i18n||(t.locale||n.i18n.defaultLocale)===c));t&&(o=t.path)}t(o)}}}function N(){let t=(0,o.useNavigate)(),n=e.D(),{allRoutes:r,currentRoute:i,currentLocale:a,currentVersion:c}=e.x(),l=n.i18n,{setLocale:u}=e.w(),d=e=>{if(!l||e===a)return;u(e);let o=n.base||`/`,s=o===`/`?``:o.replace(/\/$/,``),d=!!i?.filePath,f=``;if(i)if(d){let t=j(i.filePath,i.version,i.locale),n=r.find(n=>j(n.filePath,n.version,n.locale)===t&&(n.locale||l.defaultLocale)===e&&n.version===i.version);if(n)f=n.path;else{let t=r.find(t=>j(t.filePath,t.version,t.locale)===`index.md`&&(t.locale||l.defaultLocale)===e&&t.version===i.version);f=t?t.path:`${s}${i.version?`/${i.version}`:``}${e===l.defaultLocale?``:`/${e}`}`||`/`}}else{let t=i.path,n=t.split(`/`).filter(Boolean);if(n.length>0&&(Array.isArray(l.locales)?l.locales.includes(n[0]):l.locales[n[0]])&&(n.shift(),t=`/`+n.join(`/`)),e===l.defaultLocale)f=t===``?`/`:t;else{let n=t.startsWith(`/`)?t:`/${t}`;f=`/${e}${n===`/`?``:n}`}}else{let t=r.find(t=>(t.locale||l.defaultLocale)===e&&(t.version||n.versions?.defaultVersion)===(c||n.versions?.defaultVersion));if(t)f=t.path;else{let t=c&&c!==n.versions?.defaultVersion?`/${c}`:``;f=e===l.defaultLocale?`${s}${t}`:`${s}${t}/${e}`}}(!f||f===``)&&(f=`/`),f=f.replace(/\/+/g,`/`),t(f)},f=l?.locales,p=f?Array.isArray(f)?a:f[a]:void 0;return{currentLocale:a,currentLocaleLabel:l?.localeConfigs?.[a]?.label||p||a,availableLocales:(0,s.useMemo)(()=>l?Array.isArray(l.locales)?l.locales.map(e=>({key:e,label:l?.localeConfigs?.[e]?.label||e,value:e,isCurrent:e===a})):Object.entries(l.locales).map(([e,t])=>({key:e,label:l?.localeConfigs?.[e]?.label||t,value:e,isCurrent:e===a})):[],[l,a]),handleLocaleChange:d}}function P({className:n}){let{currentVersionLabel:r,availableVersions:i,handleVersionChange:a}=M();return i.length===0?null:(0,c.jsxs)(t.k.Trigger,{children:[(0,c.jsxs)(t.M,{className:e.y(`flex h-9 items-center justify-between gap-2 border border-subtle bg-surface px-4 py-1.5 rounded-xl text-xs font-semibold text-body hover:bg-primary-50/20 hover:border-primary-500/50 transition-all duration-300 outline-none select-none cursor-pointer`,n),children:[(0,c.jsx)(`span`,{className:`font-semibold text-[0.8125rem]`,children:r}),(0,c.jsx)(l.ChevronDown,{className:`w-3.5 h-3.5 text-muted/60`})]}),(0,c.jsx)(t.k.Root,{className:`w-40 bg-main border border-subtle rounded-xl p-1.5 shadow-md outline-none flex flex-col gap-0.5 animate-fade-in z-100`,children:(0,c.jsx)(t.k.Section,{items:i,children:e=>(0,c.jsx)(t.k.Item,{onPress:()=>a(e.value),className:`flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-medium text-body hover:bg-primary-50/50 cursor-pointer select-none outline-none group data-selected:text-primary-500 data-selected:bg-primary-500/5`,children:e.label},`${e.value??``}`)})})]})}function F({className:n}){let{currentLocale:r,availableLocales:i,handleLocaleChange:a}=N();return i.length===0?null:(0,c.jsxs)(t.k.Trigger,{children:[(0,c.jsxs)(t.M,{className:e.y(`flex h-9 items-center justify-between gap-2 border border-subtle bg-surface px-4 py-1.5 rounded-xl text-xs font-semibold text-body hover:bg-primary-50/20 hover:border-primary-500/50 transition-all duration-300 outline-none select-none cursor-pointer`,n),children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,c.jsx)(l.Languages,{className:`w-3.5 h-3.5 text-primary-500`}),(0,c.jsx)(`span`,{className:`font-bold text-[0.75rem] uppercase opacity-90`,children:r||`en`})]}),(0,c.jsx)(l.ChevronDown,{className:`w-3.5 h-3.5 text-muted/60`})]}),(0,c.jsx)(t.k.Root,{className:`w-40 bg-main border border-subtle rounded-xl p-1.5 shadow-md outline-none flex flex-col gap-0.5 animate-fade-in z-100`,children:(0,c.jsx)(t.k.Section,{items:i,children:e=>(0,c.jsx)(t.k.Item,{onPress:()=>a(e.value),className:`flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-medium text-body dark:hover:bg-primary-300/50 hover:bg-primary-200/50 transition-colors duration-100 cursor-pointer select-none outline-none group data-selected:text-primary-500 data-selected:bg-primary-500/5`,children:(0,c.jsx)(`span`,{children:e.label})},`${e.value??``}`)})})]})}const I=(0,s.lazy)(()=>Promise.resolve().then(()=>require(`../search-dialog-CGyrozZE.cjs`)).then(e=>({default:e.SearchDialog})));function L(){let{links:n,title:i,logo:a,logoProps:u,github:d,social:f,config:p}=O(),{routes:m,allRoutes:h,currentRoute:g,currentVersion:_,currentLocale:v}=e.x(),{pathname:y}=(0,o.useLocation)(),{isSidebarOpen:b,toggleSidebar:x}=t.T(),[S,C]=(0,s.useState)(!1),w=p.theme||{},T=!!g?.filePath,D=w?.tabs&&w.tabs.length>0;return(0,c.jsxs)(r.n.Root,{className:e.y(`border-b border-subtle bg-main/80 backdrop-blur-md`,D&&`border-b-0`),children:[(0,c.jsxs)(r.n.Content,{children:[(0,c.jsxs)(r.n.Left,{children:[T&&(0,c.jsx)(t.M,{onPress:x,className:`mr-2 lg:hidden p-1.5 h-8 w-8 flex items-center justify-center bg-transparent border-none outline-none select-none cursor-pointer rounded-xl hover:bg-primary-50/50 transition-colors`,"aria-label":b?`Close sidebar`:`Open sidebar`,children:b?(0,c.jsx)(l.X,{className:`w-5 h-5 text-body`}):(0,c.jsx)(l.Menu,{className:`w-5 h-5 text-body`})}),a&&(0,c.jsx)(r.n.Logo,{src:a,alt:u?.alt||i,width:u?.width??24,height:u?.height??24,href:`site:/`}),(0,c.jsx)(r.n.Title,{href:`site:/`,children:i}),(0,c.jsx)(`div`,{className:`hidden sm:block`,children:p.versions&&_&&(0,c.jsx)(P,{})})]}),(0,c.jsx)(r.n.Center,{children:(0,c.jsx)(s.Suspense,{fallback:(0,c.jsx)(`div`,{className:`h-9 w-32 animate-pulse rounded-md bg-surface`}),children:(0,c.jsx)(I,{routes:m||[]})})}),(0,c.jsxs)(r.n.Right,{children:[(0,c.jsx)(s.Suspense,{fallback:null,children:(0,c.jsx)(`div`,{className:`lg:hidden`,children:(0,c.jsx)(I,{routes:m||[]})})}),(0,c.jsx)(r.n.Links,{children:n.map(e=>(0,c.jsx)(ne,{link:e},e.href))}),(0,c.jsxs)(`div`,{className:`hidden sm:flex items-center gap-2`,children:[p.i18n&&v&&(0,c.jsx)(F,{}),(0,c.jsx)(r.n.Split,{className:`bg-subtle`})]}),(0,c.jsx)(`div`,{className:`hidden md:block`,children:(0,c.jsx)(ee,{})}),d&&(0,c.jsx)(`div`,{className:`hidden md:block`,children:(0,c.jsx)(E,{repo:w?.githubRepo??``})}),f.length>0&&(0,c.jsx)(`div`,{className:`hidden md:block`,children:(0,c.jsx)(r.n.Split,{className:`bg-subtle`})}),(0,c.jsx)(`div`,{className:`hidden md:flex items-center gap-1`,children:f.map(({icon:e,link:t})=>(0,c.jsx)(r.n.Socials,{icon:e,link:t,className:`p-1.5 text-muted hover:text-body hover:bg-surface rounded-md transition-all focus-visible:ring-2 focus-visible:ring-primary-500/30`},t))}),(0,c.jsx)(r.n.More,{onPress:()=>C(!0),className:`text-muted hover:text-body active:scale-90 transition-all focus-visible:ring-2 focus-visible:ring-primary-500/30`})]})]}),(0,c.jsxs)(r.n.MobileMenu,{isOpen:S,onClose:()=>C(!1),className:`bg-main/98 backdrop-blur-2xl`,children:[(0,c.jsx)(`div`,{className:`flex flex-col gap-1`,children:n.map(e=>(0,c.jsx)(R,{link:e,onClose:()=>C(!1)},e.href))}),f.length>0&&(0,c.jsxs)(`div`,{className:`mt-6`,children:[(0,c.jsx)(`div`,{className:`px-4 mb-4 text-xs font-bold uppercase tracking-widest text-muted/50`,children:`Connect`}),(0,c.jsx)(`div`,{className:`flex flex-wrap gap-2 px-2`,children:f.map(({icon:e,link:t})=>(0,c.jsx)(r.n.Socials,{icon:e,link:t,className:`p-3 bg-surface border border-subtle rounded-xl flex-1 justify-center`},t))})]})]}),T&&D&&w?.tabs&&(0,c.jsx)(`div`,{className:`w-full border-b border-subtle bg-main`,children:(0,c.jsx)(te,{tabs:w.tabs,routes:h||m||[]})})]})}function ne({link:t}){let n=e.b(t.href||``),{pathname:i}=(0,o.useLocation)(),a=i===n||i.startsWith(n+`/`);return t.items&&t.items.length>0?(0,c.jsx)(r.n.Dropdown,{label:(0,c.jsx)(`span`,{className:e.y(`transition-colors outline-none font-medium focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm px-2 py-1`,a?`text-primary-500`:`text-muted hover:text-body`),children:t.label}),children:t.items?.map(t=>(0,c.jsx)(r.n.DropdownItem,{href:e.b(t.href||``),label:t.label},t.href))}):(0,c.jsx)(r.n.Link,{...t,href:n,active:a,className:e.y(`transition-colors outline-none font-medium focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm`,a?`text-primary-500`:`text-muted hover:text-body`)})}function R({link:t,onClose:n}){let i=e.b(t.href||``),{pathname:a}=(0,o.useLocation)(),s=a===i;return t.items&&t.items.length>0?(0,c.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,c.jsx)(`div`,{className:e.y(`px-3 py-2 text-sm transition-all`,s?`text-body`:`text-muted/80 hover:text-body`),children:t.label}),(0,c.jsx)(`div`,{className:`flex flex-col gap-1 pl-4`,children:t.items?.map(e=>(0,c.jsx)(R,{link:e,onClose:n},e.href))})]}):(0,c.jsx)(r.n.MobileLink,{...t,href:i,active:s,onPress:n,className:e.y(`transition-all`,s?`text-body`:`text-muted/80 hover:text-body`)})}function z(){return(0,c.jsx)(`div`,{className:`flex items-center justify-center min-h-[65vh] text-center px-4`,children:(0,c.jsxs)(`div`,{className:`space-y-6 max-w-md mx-auto p-8 border border-subtle bg-surface rounded-2xl shadow-xs`,children:[(0,c.jsx)(`span`,{className:`block text-7xl font-extrabold tracking-tight text-primary-500`,children:`404`}),(0,c.jsxs)(`div`,{className:`space-y-2`,children:[(0,c.jsx)(`h1`,{className:`text-xl font-bold text-body`,children:`Page Not Found`}),(0,c.jsx)(`p`,{className:`text-sm text-muted leading-relaxed`,children:`The page you're looking for doesn't exist or has been moved.`})]}),(0,c.jsxs)(e._,{href:`/`,className:`inline-flex items-center gap-2 rounded-xl border border-subtle bg-main px-6 py-2.5 text-xs font-semibold text-body hover:bg-primary-50/50 hover:border-primary-500/50 transition-all duration-300 outline-none select-none`,children:[(0,c.jsx)(l.ArrowLeft,{size:14}),` Go to Home`]})]})})}function B({headings:e=[],editLink:n,communityHelp:r,filePath:i}){return e.length===0?null:(0,c.jsxs)(t._.Root,{children:[(0,c.jsxs)(t._.Header,{className:`flex flex-row gap-x-2`,children:[(0,c.jsx)(l.TextAlignStart,{size:16}),`On this page`]}),(0,c.jsx)(t._.Tree,{headings:e}),(n||r)&&(0,c.jsxs)(`div`,{className:`mt-8 pt-8 border-t border-subtle space-y-4`,children:[(0,c.jsx)(`p`,{className:`text-xs font-bold text-body`,children:`Need help?`}),(0,c.jsxs)(`ul`,{className:`space-y-3`,children:[n&&i&&(0,c.jsx)(`li`,{children:(0,c.jsxs)(`a`,{href:n.replace(`:path`,i),target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-muted hover:text-body transition-colors`,children:[(0,c.jsx)(l.Pencil,{size:16}),`Edit this page`]})}),r&&(0,c.jsx)(`li`,{children:(0,c.jsxs)(`a`,{href:r,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-2 text-sm text-muted hover:text-body transition-colors`,children:[(0,c.jsx)(l.CircleHelp,{size:16}),`Community help`]})})]})]})]})}function V(){let{routes:t,currentRoute:n}=e.x(),r=(0,o.useLocation)();return(0,s.useMemo)(()=>{if(!n)return{prevPage:null,nextPage:null,currentRoute:null};let e=n.tab?.toLowerCase(),i=e?t.filter(t=>t.tab?.toLowerCase()===e):t.filter(e=>!e.tab),a=i.findIndex(e=>e.path===r.pathname);return{prevPage:a>0?i[a-1]:null,nextPage:a!==-1&&a<i.length-1?i[a+1]:null,currentRoute:n}},[t,n,r.pathname])}function H(){let{prevPage:e,nextPage:n}=V();return!e&&!n?null:(0,c.jsxs)(t.h.Root,{className:`pt-8 border-t border-subtle grid sm:grid-cols-2 gap-4 animate-in fade-in slide-in-from-bottom-4 duration-700 select-none`,children:[e?(0,c.jsxs)(t.h.Link,{to:e.path,direction:`prev`,className:`group border border-subtle bg-surface p-5 rounded-2xl transition-all duration-300 hover:border-primary-500/50 hover:bg-primary-50/20`,children:[(0,c.jsx)(t.h.Title,{className:`text-xs font-bold uppercase tracking-wider text-muted/60 mb-1`,children:`Previous`}),(0,c.jsx)(t.h.Description,{className:`text-sm sm:text-base font-bold text-body group-hover:text-primary-500 transition-colors`,children:e.title})]}):(0,c.jsx)(`div`,{}),n?(0,c.jsxs)(t.h.Link,{to:n.path,direction:`next`,className:`group border border-subtle bg-surface p-5 rounded-2xl transition-all duration-300 hover:border-primary-500/50 hover:bg-primary-50/20`,children:[(0,c.jsx)(t.h.Title,{className:`text-xs font-bold uppercase tracking-wider text-muted/60 mb-1`,children:`Next`}),(0,c.jsx)(t.h.Description,{className:`text-sm sm:text-base font-bold text-body group-hover:text-primary-500 transition-colors`,children:n.title})]}):(0,c.jsx)(`div`,{})]})}function re({routes:e,config:n}){let{logo:r,title:i,logoProps:a}=O(),{closeSidebar:o}=t.T(),s=r?(0,c.jsx)(`img`,{src:r,alt:a?.alt||i,width:24,height:24,className:`rounded-xl`}):null,u=n.versions||n.i18n;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(t.i.Root,{children:(0,c.jsx)(t.i.Content,{children:(0,c.jsx)(t.i.Items,{routes:e})})}),(0,c.jsxs)(t.i.Mobile,{children:[(0,c.jsxs)(t.i.Header,{children:[(0,c.jsxs)(`div`,{className:`flex items-center gap-3`,children:[s,(0,c.jsx)(`span`,{className:`font-bold text-lg tracking-tight text-body truncate max-w-[120px]`,children:i})]}),(0,c.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,c.jsx)(k,{className:`w-24 h-9 rounded-xl`}),(0,c.jsx)(t.M,{onPress:o,className:`h-9 w-9 flex items-center justify-center bg-transparent border-none outline-none select-none cursor-pointer rounded-xl hover:bg-primary-50/50 text-muted hover:text-body transition-colors`,"aria-label":`Close sidebar`,children:(0,c.jsx)(l.X,{size:20})})]})]}),(0,c.jsxs)(t.i.Content,{children:[u&&(0,c.jsxs)(`div`,{className:`flex flex-col gap-4 mb-10`,children:[(0,c.jsxs)(`div`,{className:`flex gap-3`,children:[n.versions&&(0,c.jsx)(P,{className:`flex-1 justify-between h-10 bg-surface border-subtle rounded-xl`}),n.i18n&&(0,c.jsx)(F,{className:`flex-1 justify-between h-10 bg-surface border-subtle rounded-xl`})]}),(0,c.jsx)(`div`,{className:`mt-2 border-b border-subtle`})]}),(0,c.jsx)(t.i.Items,{routes:e})]})]})]})}const U=Object.assign(re,{Root:t.i.Root,Mobile:t.i.Mobile,Header:t.i.Header,Content:t.i.Content,Group:t.i.Group,Link:t.i.Link,SubGroup:t.i.SubGroup,Item:t.i.Item,Items:t.i.Items});function W({date:e}){if(!e)return null;let t=new Date(e);if(isNaN(t.getTime()))return null;let n=t.toLocaleDateString(void 0,{year:`numeric`,month:`long`,day:`numeric`});return(0,c.jsxs)(`div`,{className:`mt-16 pt-6 border-t border-subtle flex items-center justify-between text-xs text-muted select-none`,children:[(0,c.jsx)(`span`,{}),(0,c.jsxs)(`span`,{className:`italic`,children:[`Last updated on `,n]})]})}function ie({route:e,content:t,mdxComponents:n}){let r=_(),i=(0,s.useMemo)(()=>({LastUpdated:W,...r,...n}),[r,n]),a=i.LastUpdated||W;return t?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(t,{components:i}),e?.lastUpdated&&(0,c.jsx)(a,{date:e.lastUpdated})]}):null}function G({MDXComponent:e,mdxComponents:t}){let n=(0,o.useLoaderData)(),r=e||n?.MDXComponent,i=t||n?.mdxComponents;return r?(0,c.jsx)(ie,{route:{path:n.path,filePath:n.filePath,title:n.frontmatter.title,description:n.frontmatter.description,headings:n.headings,locale:n.locale,version:n.version,group:n.group,groupTitle:n.groupTitle,lastUpdated:n.lastUpdated,frontmatter:n.frontmatter},content:r,mdxComponents:i}):null}const K=d,q=K.Helmet||K.default?.Helmet||(({children:e})=>(0,c.jsx)(c.Fragment,{children:e})),J=K.HelmetProvider||K.default?.HelmetProvider||(({children:e})=>(0,c.jsx)(c.Fragment,{children:e}));function ae(){let{pathname:e,hash:t}=(0,o.useLocation)();return(0,s.useLayoutEffect)(()=>{let e=document.querySelector(`.boltdocs-content`)||window,n=()=>e===window?window.scrollY:e.scrollTop,r=(t,n=`auto`)=>{e===window?window.scrollTo({top:t,behavior:n}):e.scrollTo({top:t,behavior:n})};if(t){let i=t.replace(`#`,``),a=document.getElementById(i);if(a){let t=e===window?0:e.getBoundingClientRect().top;r(a.getBoundingClientRect().top-t-80+n(),`auto`);return}}r(0)},[e,t]),null}const oe={...a.t,NotFound:z,404:z};function Y(e){return e.endsWith(`/`)&&e.length>1?e.slice(0,-1):e}function se({config:t}){let{currentLocale:n}=e.w();return(0,s.useEffect)(()=>{if(!t.i18n||typeof document>`u`)return;let e=n||t.i18n.defaultLocale,r=t.i18n.localeConfigs?.[e];document.documentElement.lang=r?.htmlLang||e||`en`,document.documentElement.dir=r?.direction||`ltr`},[n,t.i18n]),null}function ce({config:t,routeMap:n}){let r=(0,o.useLocation)(),{setLocale:i,setVersion:a}=e.w();return(0,s.useEffect)(()=>{let e=Y(r.pathname),o=n.get(e);o&&(t.i18n&&i(o.locale||t.i18n.defaultLocale),t.versions&&a(o.version||t.versions.defaultVersion))},[r.pathname,t,n,i,a]),null}function X({config:r,routes:i,components:a={}}){let l=(0,s.useMemo)(()=>({...oe,...f.default,...a}),[a]),{pathname:u}=(0,o.useLocation)(),d=(0,s.useMemo)(()=>Y(u||`/`),[u]),p=(0,s.useMemo)(()=>{let e=new Map;for(let t of i){let n=Y(t.path===``?`/`:t.path);e.set(n,t)}return e},[i]),m=(0,s.useMemo)(()=>{let e=p.get(d),t,n;return e&&(r.i18n&&(t=e.locale||r.i18n.defaultLocale),r.versions&&(n=e.version||r.versions.defaultVersion)),{initLocale:t,initVersion:n}},[d,r,p]);return(0,c.jsx)(J,{children:(0,c.jsx)(e.T,{routes:i,children:(0,c.jsx)(n.c,{children:(0,c.jsx)(t.w,{children:(0,c.jsx)(v,{components:l,children:(0,c.jsxs)(e.E.Provider,{value:r,children:[(0,c.jsx)(ae,{}),(0,c.jsxs)(e.C,{initialLocale:m.initLocale,initialVersion:m.initVersion,children:[(0,c.jsx)(ce,{config:r,routeMap:p}),(0,c.jsx)(se,{config:r}),(0,c.jsx)(o.Outlet,{})]})]})})})})})})}function le({siteTitle:t,siteDescription:n,routes:r}){let i=(0,o.useLocation)(),a=e.D(),{currentLocale:l}=e.x(),u=(0,s.useMemo)(()=>r?.find?.(e=>e.path===i.pathname),[r,i.pathname]),d=u?.title,f=D(n,l),p=u?.description||f||``,m=D(t,l),h=d?`${d} | ${m}`:m,g=u?.seo||{},_=a?.seo?.metatags||{},v=a?.seo?.thumbnails?.background,y=g[`og:image`]||v;return(0,c.jsxs)(q,{children:[(0,c.jsx)(`title`,{children:h}),(0,c.jsx)(`meta`,{name:`description`,content:p}),(0,c.jsx)(`meta`,{property:`og:title`,content:h}),(0,c.jsx)(`meta`,{property:`og:description`,content:p}),(0,c.jsx)(`meta`,{property:`og:type`,content:`article`}),typeof window<`u`&&(0,c.jsx)(`meta`,{property:`og:url`,content:window.location.href}),typeof window<`u`&&(0,c.jsx)(`link`,{rel:`canonical`,href:window.location.origin+i.pathname}),(0,c.jsx)(`meta`,{name:`twitter:card`,content:`summary`}),(0,c.jsx)(`meta`,{name:`twitter:title`,content:h}),(0,c.jsx)(`meta`,{name:`twitter:description`,content:p}),y&&(0,c.jsx)(`meta`,{name:`twitter:image`,content:y}),y&&(0,c.jsx)(`meta`,{property:`og:image`,content:y}),(0,c.jsx)(`meta`,{name:`generator`,content:`Boltdocs`}),Object.entries(_).map(([e,t])=>e.startsWith(`og:`)||e.startsWith(`music:`)||e.startsWith(`video:`)||e.startsWith(`article:`)||e.startsWith(`book:`)||e.startsWith(`profile:`)?(0,c.jsx)(`meta`,{property:e,content:t},e):(0,c.jsx)(`meta`,{name:e,content:t},e)),Object.entries(g).map(([e,t])=>e===`noindex`&&t===!0?(0,c.jsx)(`meta`,{name:`robots`,content:`noindex`},`noindex`):e===`robots`?(0,c.jsx)(`meta`,{name:`robots`,content:t},`robots`):e===`canonical`?(0,c.jsx)(`link`,{rel:`canonical`,href:t},`canonical`):e.startsWith(`og:`)||e.startsWith(`music:`)||e.startsWith(`video:`)||e.startsWith(`article:`)||e.startsWith(`book:`)||e.startsWith(`profile:`)?(0,c.jsx)(`meta`,{property:e,content:t},e):(0,c.jsx)(`meta`,{name:e,content:t},e))]})}function ue(){let t=e.D(),{currentRoute:n,allRoutes:r}=e.x();return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(le,{siteTitle:t.theme?.title,siteDescription:t.theme?.description,routes:r||[]}),(0,c.jsx)(p.default,{route:n,children:(0,c.jsx)(o.Outlet,{})})]})}const de=()=>(0,c.jsx)(`div`,{className:`text-muted text-sm py-4`,children:`Loading...`}),fe=({moduleLoader:e,moduleKey:t,route:n,components:r})=>{let i=e?.default??e??null;return(0,s.useEffect)(()=>{if(!{}.hot||!t)return;let e=e=>{e.relPath.replace(/\\/g,`/`).replace(/^\//,``)===n.filePath.replace(/\\/g,`/`).replace(/^\//,``)&&import(t+`?t=`+Date.now()).then(e=>{})};return{}.hot.on(`boltdocs:mdx-update`,e),()=>({}).hot?.off(`boltdocs:mdx-update`,e)},[t,n.filePath]),i?(0,c.jsx)(G,{MDXComponent:i,mdxComponents:r}):(0,c.jsx)(de,{})},pe=()=>{let e=_();return(0,c.jsx)(e.NotFound||e[404]||z,{})};function me(e){let{routesData:t,config:n,mdxModules:r,externalPages:i,externalLayout:a,components:s}=e,l=a||(({children:e})=>(0,c.jsx)(c.Fragment,{children:e})),u=e=>{let t=n.base||`/`;return e.startsWith(t)?e:`${t===`/`?``:t.replace(/\/$/,``)}${e.startsWith(`/`)?e:`/${e}`}`||`/`},d=[],f=n.versions?.defaultVersion,p=(n.base||`/docs`).replace(/\/$/,``);f&&t.forEach(e=>{if(e.version)return;let t=e.path||``,n=t.startsWith(p)?t.substring(p.length).replace(/^\//,``):t.replace(/^\//,``);if(!(n===f||n.startsWith(`${f}/`))){let t=`${p}/${f}/${n}`.replace(/\/+/g,`/`).replace(/\/$/,``)||`/`;d.push({...e,path:t,version:f})}});let m=[...t,...d],h=new Map,g=Object.keys(r);if(g.length>0){let e=g[0].replace(/\\/g,`/`).split(`/`).filter(Boolean)[0]||`docs`,t=`/${e}/`,n=`./${e}/`;for(let e of g){let r=e.replace(/\\/g,`/`),i=``;r.indexOf(t)===-1?r.startsWith(n)&&(i=r.substring(n.length)):i=r.substring(r.indexOf(t)+t.length),i?h.set(i,e):h.set(r,e)}}let _=m.map(e=>{let t=e.filePath.replace(/\\/g,`/`),n=h.get(t),i=n?r[n]:null,a=u(e.path===``?`/`:e.path);return{path:a,element:(0,c.jsx)(fe,{moduleKey:n,moduleLoader:i,route:e,components:s},n||a),loader:async()=>({path:a,frontmatter:{title:e.title,description:e.description||``,...e.frontmatter||{}},headings:e.headings||[],filePath:e.filePath,locale:e.locale,version:e.version,group:e.group,groupTitle:e.groupTitle,date:e.date,lastUpdated:e.lastUpdated}),getStaticPaths:()=>[a]}}),v=(n.base||`/docs`).replace(/\/$/,``);v||=`/`;let y=n.i18n?.locales?Array.isArray(n.i18n.locales)?n.i18n.locales:Object.keys(n.i18n.locales):[],b=n.versions?.versions?.map(e=>e.path)||[],x=[];x.push({path:v,filter:()=>!0});let S=[];b.length>0&&b.forEach(e=>S.push(`/${e}`)),y.length>0&&y.forEach(e=>S.push(`/${e}`)),b.length>0&&y.length>0&&b.forEach(e=>{y.forEach(t=>{S.push(`/${e}/${t}`)})}),S.forEach(e=>{let t=v===`/`?e:`${v}${e}`;x.push({path:t,filter:e=>e.startsWith(t.replace(/\/$/,``)+`/`)})});let C=new Set(_.map(e=>(e.path||``).replace(/\/$/,``))),w=new Set;i&&Object.keys(i).forEach(e=>{let t=e.startsWith(`/`)?e:`/${e}`;w.add(t.replace(/\/$/,``)),n.i18n&&Object.keys(n.i18n.locales).forEach(e=>{w.add(`/${e}${t===`/`?``:t}`.replace(/\/$/,``))})}),x.forEach(({path:e,filter:t})=>{if(e===`/`)return;let r=e.replace(/\/$/,``);if(!(C.has(r)||w.has(r))){let i=n.theme?.tabs?.[0]?.id,a=i?`${r}/${i}`.replace(/\/+/g,`/`):null,s=a&&C.has(a.replace(/\/$/,``))?_.find(e=>e.path.replace(/\/$/,``)===a.replace(/\/$/,``)):_.find(e=>t(e.path)&&e.path!==r),l=s?s.path:_.length>0?_[0].path:null;l&&_.push({path:e,element:(0,c.jsx)(o.Navigate,{to:l,replace:!0}),loader:async()=>({path:e}),getStaticPaths:()=>[e]})}});let T=[{element:(0,c.jsx)(ue,{}),children:_}],E=[];return i&&Object.entries(i).forEach(([e,t])=>{let r=e.startsWith(`/`)?e:`/${e}`;T.find(e=>e.path===r)||(E.push({path:r,locale:n.i18n?.defaultLocale,title:e===`/`?`Home`:e.replace(/^\//,``).split(`/`).pop()||`Page`,filePath:``,headings:[]}),T.push({path:r,element:(0,c.jsx)(l,{children:(0,c.jsx)(t,{})}),loader:async()=>({path:r,locale:n.i18n?.defaultLocale}),getStaticPaths:()=>[r]}),n.i18n&&Object.keys(n.i18n.locales).forEach(n=>{let r=`/${n}${e===`/`?``:e}`;T.find(e=>e.path===r)||(E.push({path:r,locale:n,title:e,filePath:``,headings:[]}),T.push({path:r,element:(0,c.jsx)(l,{children:(0,c.jsx)(t,{})}),loader:async()=>({path:r,locale:n}),getStaticPaths:()=>[r]}))}))}),T.push({path:`*`,element:(0,c.jsx)(l,{children:(0,c.jsx)(pe,{})})}),[{element:(0,c.jsx)(X,{config:n,routes:[...m,...E],components:s}),children:T}]}function Z(e){return typeof window>`u`?Q():typeof window.gtag==`function`?he(e):window.dataLayer?ge(e):Q()}function he(e){return{trackPageView:(t,n)=>{window.gtag?.(`event`,`page_view`,{page_path:t,page_title:n||document.title,send_to:e?.ga4?.measurementId})},trackEvent:({action:t,category:n,label:r,value:i,params:a})=>{window.gtag?.(`event`,t,{event_category:n,event_label:r,value:i,send_to:e?.ga4?.measurementId,...a})},trackSearch:(t,n)=>{window.gtag?.(`event`,`search`,{search_term:t,results_count:n,send_to:e?.ga4?.measurementId})},trackDownload:(t,n)=>{window.gtag?.(`event`,`file_download`,{file_name:t,file_type:n||t.split(`.`).pop(),send_to:e?.ga4?.measurementId})},trackExternalLink:t=>{window.gtag?.(`event`,`external_link`,{link_url:t,send_to:e?.ga4?.measurementId})},isEnabled:!0}}function ge(e){return{trackPageView:(t,n)=>{window.dataLayer?.push({event:`page_view`,page_path:t,page_title:n||document.title,send_to:e?.gtm?.tagId})},trackEvent:({action:t,category:n,label:r,value:i,params:a})=>{window.dataLayer?.push({event:t,event_category:n,event_label:r,value:i,send_to:e?.gtm?.tagId,...a})},trackSearch:(t,n)=>{window.dataLayer?.push({event:`search`,search_term:t,results_count:n,send_to:e?.gtm?.tagId})},trackDownload:(t,n)=>{window.dataLayer?.push({event:`file_download`,file_name:t,file_type:n||t.split(`.`).pop(),send_to:e?.gtm?.tagId})},trackExternalLink:t=>{window.dataLayer?.push({event:`external_link`,link_url:t,send_to:e?.gtm?.tagId})},isEnabled:!0}}function Q(){return{trackPageView:()=>{},trackEvent:()=>{},trackSearch:()=>{},trackDownload:()=>{},trackExternalLink:()=>{},isEnabled:!1}}const $=Symbol.for(`__BDOCS_CONFIG_INSTANCE__`);function _e(e={}){let{config:n,autoTrackPageViews:r=!0,autoTrackDownloads:i=!0,autoTrackExternalLinks:a=!0,excludePatterns:o=[]}=e,c=typeof globalThis<`u`?globalThis[$]:void 0,l=n??c?.integrations,u=(0,s.useMemo)(()=>Z(l),[l]),d=(0,s.useRef)(``),f=t.r();return(0,s.useEffect)(()=>{if(!r||!u.isEnabled)return;let e=f.pathname+f.search;e!==d.current&&(d.current=e,u.trackPageView(e,document.title))},[f.pathname,r,u]),(0,s.useEffect)(()=>{if(!i||!u.isEnabled)return;let e=e=>{let t=e.target?.closest(`a`);if(!t)return;let n=t.getAttribute(`href`);if(n&&!o.some(e=>e.test(n))&&(t.hasAttribute(`download`)||/\.(pdf|doc|docx|xls|xlsx|ppt|pptx|zip|rar|7z|tar|gz|mp3|mp4|avi|mov|png|jpg|jpeg|gif|svg|webp)$/i.test(n))){let e=n.split(`/`).pop()||n;u.trackDownload(e,e.split(`.`).pop())}};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[i,a,u,o]),(0,s.useEffect)(()=>{if(!a||!u.isEnabled)return;let e=e=>{let t=e.target?.closest(`a`);if(!t)return;let n=t.getAttribute(`href`);n&&(o.some(e=>e.test(n))||(n.startsWith(`http://`)||n.startsWith(`https://`)||n.startsWith(`//`))&&!n.includes(window.location.hostname)&&u.trackExternalLink(n))};return document.addEventListener(`click`,e),()=>document.removeEventListener(`click`,e)},[a,u,o]),u}function ve(){let e=(0,s.useMemo)(()=>Z(),[]);return(0,s.useCallback)((t,n)=>{e.trackPageView(t,n)},[e])}function ye(){let e=(0,s.useMemo)(()=>Z(),[]);return(0,s.useCallback)(t=>{e.trackEvent(t)},[e])}function be({children:n}){let{routes:r,currentRoute:i}=e.x(),a=e.D();return(0,c.jsxs)(t.t,{className:`selection:bg-primary-500/10 selection:text-primary-500`,children:[(0,c.jsx)(L,{}),(0,c.jsxs)(t.t.Body,{className:`bg-main`,children:[(0,c.jsx)(U,{routes:r||[],config:a}),(0,c.jsx)(t.t.Content,{className:`animate-in fade-in duration-500 scroll-smooth`,children:(0,c.jsxs)(t.t.ContentMdx,{className:`max-w-5xl px-2 pt-8 pb-24`,children:[(0,c.jsxs)(t.t.Header,{children:[(0,c.jsxs)(`div`,{className:`mb-4 border-b border-subtle pb-4 flex flex-wrap items-center justify-between gap-3`,children:[(0,c.jsx)(b,{}),(0,c.jsx)(S,{mdxRaw:i?._rawContent,route:i})]}),i?.title&&(0,c.jsx)(`h1`,{className:`text-4xl font-bold tracking-tight text-default mb-3`,children:i.title}),i?.description&&(0,c.jsx)(`p`,{className:`text-lg text-muted-foreground mb-6 leading-relaxed`,children:i.description})]}),(0,c.jsx)(C,{children:(0,c.jsx)(`div`,{className:`prose prose-neutral dark:prose-invert max-w-none`,children:n})}),(0,c.jsx)(t.t.Footer,{children:(0,c.jsx)(H,{})})]})}),(0,c.jsx)(B,{headings:i?.headings,editLink:a.theme?.editLink,communityHelp:a.theme?.communityHelp,filePath:i?.filePath})]})]})}const xe=Object.assign(be,{Body:t.t.Body,Content:t.t.Content,ContentMdx:t.t.ContentMdx,Header:t.t.Header,Footer:t.t.Footer});exports.BoltdocsShell=X,exports.Breadcrumbs=b,exports.Card=a.r,exports.Cards=a.n,exports.CopyMarkdown=S,exports.DocsLayout=xe,exports.ErrorBoundary=C,exports.MdxPage=G,exports.Navbar=L,exports.NotFound=z,exports.OnThisPage=B,exports.PageNav=H,exports.SearchDialog=i.t,exports.Sidebar=U,exports.cn=e.y,exports.copyToClipboard=a.i,exports.createRoutes=me,exports.getStarsRepo=w,exports.getTranslated=D,exports.reactToText=a.a,exports.useAnalytics=_e,exports.useBreadcrumbs=y,exports.useConfig=e.D,exports.useI18n=N,exports.useLocalizedTo=e.b,exports.useLocation=t.r,exports.useMdxComponents=_,exports.useNavbar=O,exports.usePageNav=V,exports.useRoutes=e.x,exports.useSearch=i.n,exports.useSearchHighlight=t.n,exports.useSidebar=t.m,exports.useTabs=A,exports.useTheme=n.l,exports.useTrackEvent=ye,exports.useTrackPageView=ve,exports.useUI=t.T,exports.useVersion=M;