zudoku 0.0.0-fcb84d6 → 0.0.0-fd8f8ad

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 (665) hide show
  1. package/README.md +121 -0
  2. package/cli.js +2 -2
  3. package/dist/app/demo.js +0 -2
  4. package/dist/app/demo.js.map +1 -1
  5. package/dist/app/entry.client.js +16 -2
  6. package/dist/app/entry.client.js.map +1 -1
  7. package/dist/app/entry.server.js +9 -6
  8. package/dist/app/entry.server.js.map +1 -1
  9. package/dist/app/main.d.ts +2 -1
  10. package/dist/app/main.js +11 -28
  11. package/dist/app/main.js.map +1 -1
  12. package/dist/app/standalone.js +0 -2
  13. package/dist/app/standalone.js.map +1 -1
  14. package/dist/cli/cli.js +1 -2
  15. package/dist/cli/cli.js.map +1 -1
  16. package/dist/cli/common/machine-id/lib.js.map +1 -1
  17. package/dist/cli/common/outdated.js.map +1 -1
  18. package/dist/cli/common/utils/box.js.map +1 -1
  19. package/dist/codegen.d.ts +3 -0
  20. package/dist/codegen.js +45 -0
  21. package/dist/codegen.js.map +1 -0
  22. package/dist/config/validators/InputSidebarSchema.d.ts +12 -12
  23. package/dist/config/validators/SidebarSchema.d.ts +24 -1
  24. package/dist/config/validators/SidebarSchema.js +76 -39
  25. package/dist/config/validators/SidebarSchema.js.map +1 -1
  26. package/dist/config/validators/validate.d.ts +398 -252
  27. package/dist/config/validators/validate.js +23 -7
  28. package/dist/config/validators/validate.js.map +1 -1
  29. package/dist/index.d.ts +4 -1
  30. package/dist/index.js +1 -1
  31. package/dist/index.js.map +1 -1
  32. package/dist/lib/authentication/authentication.d.ts +2 -2
  33. package/dist/lib/authentication/components/CallbackHandler.js +21 -31
  34. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  35. package/dist/lib/authentication/hook.d.ts +1 -1
  36. package/dist/lib/authentication/hook.js +1 -1
  37. package/dist/lib/authentication/hook.js.map +1 -1
  38. package/dist/lib/authentication/providers/auth0.js +10 -9
  39. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  40. package/dist/lib/authentication/state.d.ts +1 -1
  41. package/dist/lib/authentication/state.js +5 -3
  42. package/dist/lib/authentication/state.js.map +1 -1
  43. package/dist/lib/authentication/use-broadcast/shared.d.ts +48 -0
  44. package/dist/lib/authentication/use-broadcast/shared.js +243 -0
  45. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -0
  46. package/dist/lib/authentication/use-broadcast/useBroadcast.d.ts +24 -0
  47. package/dist/lib/authentication/use-broadcast/useBroadcast.js +106 -0
  48. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -0
  49. package/dist/lib/components/Bootstrap.d.ts +3 -1
  50. package/dist/lib/components/Bootstrap.js +11 -3
  51. package/dist/lib/components/Bootstrap.js.map +1 -1
  52. package/dist/lib/components/ClientOnly.d.ts +4 -2
  53. package/dist/lib/components/ClientOnly.js +1 -1
  54. package/dist/lib/components/ClientOnly.js.map +1 -1
  55. package/dist/lib/components/DeveloperHint.js +2 -1
  56. package/dist/lib/components/DeveloperHint.js.map +1 -1
  57. package/dist/lib/components/Header.js +10 -7
  58. package/dist/lib/components/Header.js.map +1 -1
  59. package/dist/lib/components/Heading.d.ts +1 -1
  60. package/dist/lib/components/MobileTopNavigation.js +7 -3
  61. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  62. package/dist/lib/components/SlotletProvider.d.ts +2 -1
  63. package/dist/lib/components/SlotletProvider.js.map +1 -1
  64. package/dist/lib/components/SyntaxHighlight.js +19 -12
  65. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  66. package/dist/lib/components/ThemeSwitch.d.ts +1 -0
  67. package/dist/lib/components/ThemeSwitch.js +11 -0
  68. package/dist/lib/components/ThemeSwitch.js.map +1 -0
  69. package/dist/lib/components/TopNavigation.d.ts +3 -0
  70. package/dist/lib/components/TopNavigation.js +38 -5
  71. package/dist/lib/components/TopNavigation.js.map +1 -1
  72. package/dist/lib/components/{DevPortal.d.ts → Zudoku.d.ts} +3 -3
  73. package/dist/lib/components/{DevPortal.js → Zudoku.js} +13 -14
  74. package/dist/lib/components/Zudoku.js.map +1 -0
  75. package/dist/lib/components/context/ZudokuContext.d.ts +10 -14
  76. package/dist/lib/components/context/ZudokuContext.js +27 -26
  77. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  78. package/dist/lib/components/context/ZudokuProvider.d.ts +2 -2
  79. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  80. package/dist/lib/components/index.d.ts +20 -13
  81. package/dist/lib/components/index.js +11 -5
  82. package/dist/lib/components/index.js.map +1 -1
  83. package/dist/lib/components/navigation/Sidebar.js +3 -3
  84. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  85. package/dist/lib/components/navigation/SidebarCategory.js +12 -7
  86. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  87. package/dist/lib/components/navigation/SidebarItem.js +3 -5
  88. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  89. package/dist/lib/components/navigation/utils.js +10 -14
  90. package/dist/lib/components/navigation/utils.js.map +1 -1
  91. package/dist/lib/core/{DevPortalContext.d.ts → ZudokuContext.d.ts} +6 -13
  92. package/dist/lib/core/{DevPortalContext.js → ZudokuContext.js} +2 -7
  93. package/dist/lib/core/ZudokuContext.js.map +1 -0
  94. package/dist/lib/core/plugins.d.ts +13 -12
  95. package/dist/lib/core/plugins.js.map +1 -1
  96. package/dist/lib/errors/ErrorAlert.d.ts +1 -1
  97. package/dist/lib/errors/ErrorAlert.js +8 -3
  98. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  99. package/dist/lib/oas/graphql/index.js +4 -4
  100. package/dist/lib/oas/graphql/index.js.map +1 -1
  101. package/dist/lib/oas/parser/upgrade/index.js +3 -1
  102. package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
  103. package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
  104. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  105. package/dist/lib/plugins/api-keys/index.d.ts +9 -9
  106. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  107. package/dist/lib/plugins/custom-pages/CustomPage.js +2 -2
  108. package/dist/lib/plugins/custom-pages/index.d.ts +2 -2
  109. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  110. package/dist/lib/plugins/markdown/index.d.ts +6 -7
  111. package/dist/lib/plugins/markdown/index.js +31 -3
  112. package/dist/lib/plugins/markdown/index.js.map +1 -1
  113. package/dist/lib/plugins/markdown/resolver.d.ts +38 -0
  114. package/dist/lib/plugins/markdown/resolver.js +75 -0
  115. package/dist/lib/plugins/markdown/resolver.js.map +1 -0
  116. package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +5 -0
  117. package/dist/lib/plugins/openapi/CollapsibleCode.js +24 -0
  118. package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -0
  119. package/dist/lib/plugins/openapi/ColorizedParam.js +13 -9
  120. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  121. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  122. package/dist/lib/plugins/openapi/Endpoint.js +5 -9
  123. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  124. package/dist/lib/plugins/openapi/OperationList.d.ts +2 -2
  125. package/dist/lib/plugins/openapi/OperationList.js +21 -22
  126. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  127. package/dist/lib/plugins/openapi/ParameterListItem.js +6 -1
  128. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  129. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +7 -3
  130. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  131. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +9 -2
  132. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  133. package/dist/lib/plugins/openapi/Route.d.ts +4 -4
  134. package/dist/lib/plugins/openapi/Route.js +2 -4
  135. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  136. package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -1
  137. package/dist/lib/plugins/openapi/Sidecar.js +35 -33
  138. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  139. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +8 -0
  140. package/dist/lib/plugins/openapi/client/GraphQLClient.js +102 -0
  141. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -0
  142. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +7 -0
  143. package/dist/lib/plugins/openapi/client/GraphQLContext.js +5 -0
  144. package/dist/lib/plugins/openapi/client/GraphQLContext.js.map +1 -0
  145. package/dist/lib/plugins/openapi/client/createServer.d.ts +1 -0
  146. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
  147. package/dist/lib/plugins/openapi/client/useCreateQuery.js +13 -0
  148. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -0
  149. package/dist/lib/plugins/openapi/client/worker.d.ts +4 -1
  150. package/dist/lib/plugins/openapi/client/worker.js +23 -14
  151. package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
  152. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +3 -3
  153. package/dist/lib/plugins/openapi/graphql/fragment-masking.js +3 -4
  154. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  155. package/dist/lib/plugins/openapi/graphql/gql.d.ts +5 -51
  156. package/dist/lib/plugins/openapi/graphql/gql.js +4 -2
  157. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  158. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +32 -8
  159. package/dist/lib/plugins/openapi/graphql/graphql.js +194 -662
  160. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  161. package/dist/lib/plugins/openapi/index.d.ts +2 -2
  162. package/dist/lib/plugins/openapi/index.js +40 -53
  163. package/dist/lib/plugins/openapi/index.js.map +1 -1
  164. package/dist/lib/plugins/openapi/playground/Playground.js +2 -1
  165. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  166. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  167. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  168. package/dist/lib/plugins/openapi/schema/SchemaView.js +2 -1
  169. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  170. package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +0 -1
  171. package/dist/lib/plugins/openapi/util/generateSchemaExample.js +25 -36
  172. package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
  173. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  174. package/dist/lib/plugins/openapi-worker.js +7 -1
  175. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  176. package/dist/lib/plugins/redirect/index.d.ts +4 -7
  177. package/dist/lib/plugins/redirect/index.js +1 -1
  178. package/dist/lib/plugins/redirect/index.js.map +1 -1
  179. package/dist/lib/plugins/search-inkeep/index.d.ts +2 -2
  180. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  181. package/dist/lib/ui/Accordion.d.ts +7 -0
  182. package/dist/lib/ui/Accordion.js +14 -0
  183. package/dist/lib/ui/Accordion.js.map +1 -0
  184. package/dist/lib/ui/ActionButton.d.ts +4 -0
  185. package/dist/lib/ui/ActionButton.js +10 -0
  186. package/dist/lib/ui/ActionButton.js.map +1 -0
  187. package/dist/lib/ui/Alert.d.ts +8 -0
  188. package/dist/lib/ui/Alert.js +23 -0
  189. package/dist/lib/ui/Alert.js.map +1 -0
  190. package/dist/lib/ui/AlertDialog.d.ts +20 -0
  191. package/dist/lib/ui/AlertDialog.js +27 -0
  192. package/dist/lib/ui/AlertDialog.js.map +1 -0
  193. package/dist/lib/ui/AspectRatio.d.ts +3 -0
  194. package/dist/lib/ui/AspectRatio.js +4 -0
  195. package/dist/lib/ui/AspectRatio.js.map +1 -0
  196. package/dist/lib/ui/Badge.d.ts +9 -0
  197. package/dist/lib/ui/Badge.js +21 -0
  198. package/dist/lib/ui/Badge.js.map +1 -0
  199. package/dist/lib/ui/Breadcrumb.d.ts +19 -0
  200. package/dist/lib/ui/Breadcrumb.js +24 -0
  201. package/dist/lib/ui/Breadcrumb.js.map +1 -0
  202. package/dist/lib/ui/Button.d.ts +2 -3
  203. package/dist/lib/ui/Button.js +1 -1
  204. package/dist/lib/ui/Button.js.map +1 -1
  205. package/dist/lib/ui/Carousel.d.ts +18 -0
  206. package/dist/lib/ui/Carousel.js +99 -0
  207. package/dist/lib/ui/Carousel.js.map +1 -0
  208. package/dist/lib/ui/Checkbox.d.ts +4 -0
  209. package/dist/lib/ui/Checkbox.js +9 -0
  210. package/dist/lib/ui/Checkbox.js.map +1 -0
  211. package/dist/lib/ui/Collapsible.d.ts +5 -0
  212. package/dist/lib/ui/Collapsible.js +6 -0
  213. package/dist/lib/ui/Collapsible.js.map +1 -0
  214. package/dist/lib/ui/Command.d.ts +80 -0
  215. package/dist/lib/ui/Command.js +31 -0
  216. package/dist/lib/ui/Command.js.map +1 -0
  217. package/dist/lib/{components → ui}/Dialog.js +2 -2
  218. package/dist/lib/ui/Dialog.js.map +1 -0
  219. package/dist/lib/ui/Form.d.ts +23 -0
  220. package/dist/lib/ui/Form.js +63 -0
  221. package/dist/lib/ui/Form.js.map +1 -0
  222. package/dist/lib/ui/HoverCard.d.ts +6 -0
  223. package/dist/lib/ui/HoverCard.js +10 -0
  224. package/dist/lib/ui/HoverCard.js.map +1 -0
  225. package/dist/lib/ui/Label.d.ts +5 -0
  226. package/dist/lib/ui/Label.js +10 -0
  227. package/dist/lib/ui/Label.js.map +1 -0
  228. package/dist/lib/ui/Pagination.d.ts +28 -0
  229. package/dist/lib/ui/Pagination.js +24 -0
  230. package/dist/lib/ui/Pagination.js.map +1 -0
  231. package/dist/lib/ui/Popover.d.ts +6 -0
  232. package/dist/lib/ui/Popover.js +10 -0
  233. package/dist/lib/ui/Popover.js.map +1 -0
  234. package/dist/lib/ui/Progress.d.ts +4 -0
  235. package/dist/lib/ui/Progress.js +8 -0
  236. package/dist/lib/ui/Progress.js.map +1 -0
  237. package/dist/lib/ui/RadioGroup.d.ts +5 -0
  238. package/dist/lib/ui/RadioGroup.js +15 -0
  239. package/dist/lib/ui/RadioGroup.js.map +1 -0
  240. package/dist/lib/ui/ScrollArea.d.ts +5 -0
  241. package/dist/lib/ui/ScrollArea.js +12 -0
  242. package/dist/lib/ui/ScrollArea.js.map +1 -0
  243. package/dist/lib/ui/Select.js.map +1 -0
  244. package/dist/lib/ui/Skeleton.d.ts +2 -0
  245. package/dist/lib/ui/Skeleton.js +7 -0
  246. package/dist/lib/ui/Skeleton.js.map +1 -0
  247. package/dist/lib/ui/Slider.d.ts +4 -0
  248. package/dist/lib/ui/Slider.js +8 -0
  249. package/dist/lib/ui/Slider.js.map +1 -0
  250. package/dist/lib/ui/Switch.d.ts +4 -0
  251. package/dist/lib/ui/Switch.js +8 -0
  252. package/dist/lib/ui/Switch.js.map +1 -0
  253. package/dist/lib/ui/Textarea.d.ts +4 -0
  254. package/dist/lib/ui/Textarea.js +9 -0
  255. package/dist/lib/ui/Textarea.js.map +1 -0
  256. package/dist/lib/ui/Toggle.d.ts +12 -0
  257. package/dist/lib/ui/Toggle.js +26 -0
  258. package/dist/lib/ui/Toggle.js.map +1 -0
  259. package/dist/lib/ui/ToggleGroup.d.ts +12 -0
  260. package/dist/lib/ui/ToggleGroup.js +21 -0
  261. package/dist/lib/ui/ToggleGroup.js.map +1 -0
  262. package/dist/lib/ui/Tooltip.d.ts +7 -0
  263. package/dist/lib/ui/Tooltip.js +11 -0
  264. package/dist/lib/ui/Tooltip.js.map +1 -0
  265. package/dist/lib/util/MdxComponents.d.ts +1 -1
  266. package/dist/lib/util/MdxComponents.js.map +1 -1
  267. package/dist/lib/util/invariant.d.ts +9 -0
  268. package/dist/lib/util/invariant.js +7 -3
  269. package/dist/lib/util/invariant.js.map +1 -1
  270. package/dist/lib/util/useExposedProps.js +3 -2
  271. package/dist/lib/util/useExposedProps.js.map +1 -1
  272. package/dist/lib/util/useIsomorphicLayoutEffect.d.ts +3 -0
  273. package/dist/lib/util/useIsomorphicLayoutEffect.js +4 -0
  274. package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -0
  275. package/dist/lib/util/useOnScreen.d.ts +4 -0
  276. package/dist/lib/util/useOnScreen.js +19 -0
  277. package/dist/lib/util/useOnScreen.js.map +1 -0
  278. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  279. package/dist/vite/build.js +12 -3
  280. package/dist/vite/build.js.map +1 -1
  281. package/dist/vite/config.d.ts +2 -8
  282. package/dist/vite/config.js +24 -60
  283. package/dist/vite/config.js.map +1 -1
  284. package/dist/vite/debug.d.ts +1 -0
  285. package/dist/vite/debug.js +10 -0
  286. package/dist/vite/debug.js.map +1 -0
  287. package/dist/vite/dev-server.js +1 -1
  288. package/dist/vite/dev-server.js.map +1 -1
  289. package/dist/vite/html.js +0 -2
  290. package/dist/vite/html.js.map +1 -1
  291. package/dist/vite/output.d.ts +101 -0
  292. package/dist/vite/output.js +33 -0
  293. package/dist/vite/output.js.map +1 -0
  294. package/dist/vite/plugin-component.js +17 -7
  295. package/dist/vite/plugin-component.js.map +1 -1
  296. package/dist/vite/plugin-config-reload.js +0 -2
  297. package/dist/vite/plugin-config-reload.js.map +1 -1
  298. package/dist/vite/plugin-config.d.ts +2 -3
  299. package/dist/vite/plugin-config.js +2 -3
  300. package/dist/vite/plugin-config.js.map +1 -1
  301. package/dist/vite/plugin-docs.js +37 -26
  302. package/dist/vite/plugin-docs.js.map +1 -1
  303. package/dist/vite/plugin-frontmatter.d.ts +2 -1
  304. package/dist/vite/plugin-frontmatter.js +27 -24
  305. package/dist/vite/plugin-frontmatter.js.map +1 -1
  306. package/dist/vite/plugin-mdx.d.ts +0 -6
  307. package/dist/vite/plugin-mdx.js +3 -2
  308. package/dist/vite/plugin-mdx.js.map +1 -1
  309. package/dist/vite/plugin-search.d.ts +3 -0
  310. package/dist/vite/plugin-search.js +26 -0
  311. package/dist/vite/plugin-search.js.map +1 -0
  312. package/dist/vite/plugin-sidebar.js +7 -6
  313. package/dist/vite/plugin-sidebar.js.map +1 -1
  314. package/dist/vite/plugin.js +4 -4
  315. package/dist/vite/plugin.js.map +1 -1
  316. package/dist/vite/prerender.d.ts +5 -1
  317. package/dist/vite/prerender.js +7 -5
  318. package/dist/vite/prerender.js.map +1 -1
  319. package/dist/vite/remarkStaticGeneration.d.ts +3 -0
  320. package/dist/vite/remarkStaticGeneration.js +125 -0
  321. package/dist/vite/remarkStaticGeneration.js.map +1 -0
  322. package/lib/{utils-C8S3st2k.js → AnchorLink-CDlhr8gL.js} +232 -275
  323. package/lib/AnchorLink-CDlhr8gL.js.map +1 -0
  324. package/lib/{AuthenticationPlugin-D1nhROkO.js → AuthenticationPlugin-DeGDVa1r.js} +6 -5
  325. package/lib/{AuthenticationPlugin-D1nhROkO.js.map → AuthenticationPlugin-DeGDVa1r.js.map} +1 -1
  326. package/lib/Button-jK0EsymC.js +48 -0
  327. package/lib/Button-jK0EsymC.js.map +1 -0
  328. package/lib/{CategoryHeading-B7TlPvuN.js → CategoryHeading-Bb9dqxD3.js} +4 -4
  329. package/lib/{CategoryHeading-B7TlPvuN.js.map → CategoryHeading-Bb9dqxD3.js.map} +1 -1
  330. package/lib/ClientOnly-E7hGysn1.js +11 -0
  331. package/lib/ClientOnly-E7hGysn1.js.map +1 -0
  332. package/lib/Dialog-k70Qfukb.js +67 -0
  333. package/lib/Dialog-k70Qfukb.js.map +1 -0
  334. package/lib/Markdown-BorQdbxW.js +15192 -0
  335. package/lib/Markdown-BorQdbxW.js.map +1 -0
  336. package/lib/{MdxPage-B4FcPIi5.js → MdxPage-DFlbtJWi.js} +33 -31
  337. package/lib/{MdxPage-B4FcPIi5.js.map → MdxPage-DFlbtJWi.js.map} +1 -1
  338. package/lib/OperationList-KshJrrLL.js +4691 -0
  339. package/lib/OperationList-KshJrrLL.js.map +1 -0
  340. package/lib/Route-DlG_HTMu.js +11 -0
  341. package/lib/Route-DlG_HTMu.js.map +1 -0
  342. package/lib/Select-DP74t8Yy.js +223 -0
  343. package/lib/Select-DP74t8Yy.js.map +1 -0
  344. package/lib/SidebarBadge-DxFJcJ6V.js +51 -0
  345. package/lib/SidebarBadge-DxFJcJ6V.js.map +1 -0
  346. package/lib/SlotletProvider-D2v6rJy1.js +252 -0
  347. package/lib/SlotletProvider-D2v6rJy1.js.map +1 -0
  348. package/lib/SyntaxHighlight-CBmwwKoM.js +2983 -0
  349. package/lib/SyntaxHighlight-CBmwwKoM.js.map +1 -0
  350. package/lib/__vite-browser-external-BYRIRx8p.js +9 -0
  351. package/lib/__vite-browser-external-BYRIRx8p.js.map +1 -0
  352. package/lib/_commonjsHelpers-BkfeUUK-.js +29 -0
  353. package/lib/_commonjsHelpers-BkfeUUK-.js.map +1 -0
  354. package/lib/assets/{worker-Bf8vjASY.js → worker-CPsGZsve.js} +565 -561
  355. package/lib/assets/{worker-Bf8vjASY.js.map → worker-CPsGZsve.js.map} +1 -1
  356. package/lib/cn-BmFQLtkS.js +2279 -0
  357. package/lib/cn-BmFQLtkS.js.map +1 -0
  358. package/lib/context-D1nXWxm7.js +22 -0
  359. package/lib/context-D1nXWxm7.js.map +1 -0
  360. package/lib/createServer-DK-g7kbB.js +16089 -0
  361. package/lib/createServer-DK-g7kbB.js.map +1 -0
  362. package/lib/hook-Diu0rqp-.js +229 -0
  363. package/lib/hook-Diu0rqp-.js.map +1 -0
  364. package/lib/index-BcesIHH4.js +1273 -0
  365. package/lib/index-BcesIHH4.js.map +1 -0
  366. package/lib/index-Bn6Lc9tq.js +9 -0
  367. package/lib/{index-DJqnphbT.js.map → index-Bn6Lc9tq.js.map} +1 -1
  368. package/lib/index-BuAyrJe3.js +46 -0
  369. package/lib/index-BuAyrJe3.js.map +1 -0
  370. package/lib/index-Czzd9rjU.js +899 -0
  371. package/lib/index-Czzd9rjU.js.map +1 -0
  372. package/lib/{index-D06ATMgg.js → index-LNp6rxyU.js} +2 -2
  373. package/lib/{index-D06ATMgg.js.map → index-LNp6rxyU.js.map} +1 -1
  374. package/lib/index-Yn8c3UWE.js +921 -0
  375. package/lib/index-Yn8c3UWE.js.map +1 -0
  376. package/lib/index.esm-C5mr_sKO.js +1193 -0
  377. package/lib/index.esm-C5mr_sKO.js.map +1 -0
  378. package/lib/invariant-Caa8-XvF.js +26 -0
  379. package/lib/invariant-Caa8-XvF.js.map +1 -0
  380. package/lib/{router-BsfSoK2j.js → router-lfyopgBI.js} +23 -23
  381. package/lib/{router-BsfSoK2j.js.map → router-lfyopgBI.js.map} +1 -1
  382. package/lib/state-BsPrOUAh.js +252 -0
  383. package/lib/state-BsPrOUAh.js.map +1 -0
  384. package/lib/ui/Accordion.js +47 -0
  385. package/lib/ui/Accordion.js.map +1 -0
  386. package/lib/ui/ActionButton.js +25 -0
  387. package/lib/ui/ActionButton.js.map +1 -0
  388. package/lib/ui/Alert.js +51 -0
  389. package/lib/ui/Alert.js.map +1 -0
  390. package/lib/ui/AlertDialog.js +114 -0
  391. package/lib/ui/AlertDialog.js.map +1 -0
  392. package/lib/ui/AspectRatio.js +6 -0
  393. package/lib/ui/AspectRatio.js.map +1 -0
  394. package/lib/ui/Badge.js +27 -0
  395. package/lib/ui/Badge.js.map +1 -0
  396. package/lib/ui/Breadcrumb.js +94 -0
  397. package/lib/ui/Breadcrumb.js.map +1 -0
  398. package/lib/ui/Button.js +49 -0
  399. package/lib/ui/Button.js.map +1 -0
  400. package/lib/ui/Callout.js +77 -0
  401. package/lib/ui/Callout.js.map +1 -0
  402. package/lib/ui/Card.js +62 -0
  403. package/lib/ui/Card.js.map +1 -0
  404. package/lib/ui/Carousel.js +1410 -0
  405. package/lib/ui/Carousel.js.map +1 -0
  406. package/lib/ui/Checkbox.js +28 -0
  407. package/lib/ui/Checkbox.js.map +1 -0
  408. package/lib/ui/Collapsible.js +8 -0
  409. package/lib/ui/Collapsible.js.map +1 -0
  410. package/lib/ui/Command.js +550 -0
  411. package/lib/ui/Command.js.map +1 -0
  412. package/lib/ui/Dialog.js +101 -0
  413. package/lib/ui/Dialog.js.map +1 -0
  414. package/lib/ui/Drawer.js +1153 -0
  415. package/lib/ui/Drawer.js.map +1 -0
  416. package/lib/ui/DropdownMenu.js +145 -0
  417. package/lib/ui/DropdownMenu.js.map +1 -0
  418. package/lib/ui/Form.js +95 -0
  419. package/lib/ui/Form.js.map +1 -0
  420. package/lib/ui/HoverCard.js +24 -0
  421. package/lib/ui/HoverCard.js.map +1 -0
  422. package/lib/ui/Input.js +22 -0
  423. package/lib/ui/Input.js.map +1 -0
  424. package/lib/ui/Label.js +20 -0
  425. package/lib/ui/Label.js.map +1 -0
  426. package/lib/ui/Pagination.js +106 -0
  427. package/lib/ui/Pagination.js.map +1 -0
  428. package/lib/ui/Popover.js +24 -0
  429. package/lib/ui/Popover.js.map +1 -0
  430. package/lib/ui/Progress.js +27 -0
  431. package/lib/ui/Progress.js.map +1 -0
  432. package/lib/ui/RadioGroup.js +32 -0
  433. package/lib/ui/RadioGroup.js.map +1 -0
  434. package/lib/ui/ScrollArea.js +39 -0
  435. package/lib/ui/ScrollArea.js.map +1 -0
  436. package/lib/ui/Select.js +122 -0
  437. package/lib/ui/Select.js.map +1 -0
  438. package/lib/ui/Skeleton.js +18 -0
  439. package/lib/ui/Skeleton.js.map +1 -0
  440. package/lib/ui/Slider.js +24 -0
  441. package/lib/ui/Slider.js.map +1 -0
  442. package/lib/ui/Switch.js +28 -0
  443. package/lib/ui/Switch.js.map +1 -0
  444. package/lib/ui/Tabs.js +47 -0
  445. package/lib/ui/Tabs.js.map +1 -0
  446. package/lib/ui/Textarea.js +21 -0
  447. package/lib/ui/Textarea.js.map +1 -0
  448. package/lib/ui/Toggle.js +38 -0
  449. package/lib/ui/Toggle.js.map +1 -0
  450. package/lib/ui/ToggleGroup.js +42 -0
  451. package/lib/ui/ToggleGroup.js.map +1 -0
  452. package/lib/ui/Tooltip.js +24 -0
  453. package/lib/ui/Tooltip.js.map +1 -0
  454. package/lib/useExposedProps-CTPtylCV.js +10 -0
  455. package/lib/useExposedProps-CTPtylCV.js.map +1 -0
  456. package/lib/{ZudokuContext-MRoel6bS.js → utils-DcpDOncX.js} +455 -410
  457. package/lib/utils-DcpDOncX.js.map +1 -0
  458. package/lib/zudoku.auth-auth0.js +24 -19
  459. package/lib/zudoku.auth-auth0.js.map +1 -1
  460. package/lib/zudoku.auth-clerk.js +2 -2
  461. package/lib/zudoku.auth-openid.js +482 -488
  462. package/lib/zudoku.auth-openid.js.map +1 -1
  463. package/lib/zudoku.components.js +1109 -2963
  464. package/lib/zudoku.components.js.map +1 -1
  465. package/lib/zudoku.openapi-worker.js +10 -16336
  466. package/lib/zudoku.openapi-worker.js.map +1 -1
  467. package/lib/zudoku.plugin-api-keys.js +68 -75
  468. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  469. package/lib/zudoku.plugin-custom-pages.js +9 -8
  470. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  471. package/lib/zudoku.plugin-markdown.js +93 -27
  472. package/lib/zudoku.plugin-markdown.js.map +1 -1
  473. package/lib/zudoku.plugin-openapi.js +6 -11
  474. package/lib/zudoku.plugin-openapi.js.map +1 -1
  475. package/lib/zudoku.plugin-redirect.js +2 -2
  476. package/lib/zudoku.plugin-redirect.js.map +1 -1
  477. package/lib/zudoku.plugin-search-inkeep.js +9 -13
  478. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  479. package/package.json +42 -10
  480. package/src/app/demo.tsx +0 -3
  481. package/src/app/entry.client.tsx +18 -2
  482. package/src/app/entry.server.tsx +60 -50
  483. package/src/app/main.css +5 -2
  484. package/src/app/main.tsx +16 -34
  485. package/src/app/standalone.tsx +1 -4
  486. package/src/lib/authentication/authentication.ts +2 -2
  487. package/src/lib/authentication/components/CallbackHandler.tsx +20 -51
  488. package/src/lib/authentication/hook.ts +1 -1
  489. package/src/lib/authentication/providers/auth0.tsx +15 -10
  490. package/src/lib/authentication/state.ts +12 -5
  491. package/{LICENSE.md → src/lib/authentication/use-broadcast/LICENSE.md} +2 -2
  492. package/src/lib/authentication/use-broadcast/shared.ts +372 -0
  493. package/src/lib/authentication/use-broadcast/useBroadcast.ts +146 -0
  494. package/src/lib/components/Bootstrap.tsx +36 -9
  495. package/src/lib/components/ClientOnly.tsx +6 -3
  496. package/src/lib/components/DeveloperHint.tsx +6 -1
  497. package/src/lib/components/Header.tsx +50 -40
  498. package/src/lib/components/MobileTopNavigation.tsx +9 -1
  499. package/src/lib/components/SlotletProvider.tsx +2 -0
  500. package/src/lib/components/SyntaxHighlight.tsx +84 -46
  501. package/src/lib/components/ThemeSwitch.tsx +24 -0
  502. package/src/lib/components/TopNavigation.tsx +70 -23
  503. package/src/lib/components/Zudoku.tsx +108 -0
  504. package/src/lib/components/context/ZudokuContext.ts +33 -30
  505. package/src/lib/components/context/ZudokuProvider.tsx +2 -2
  506. package/src/lib/components/index.ts +14 -6
  507. package/src/lib/components/navigation/Sidebar.tsx +5 -5
  508. package/src/lib/components/navigation/SidebarCategory.tsx +13 -13
  509. package/src/lib/components/navigation/SidebarItem.tsx +3 -5
  510. package/src/lib/components/navigation/utils.ts +11 -16
  511. package/src/lib/core/{DevPortalContext.ts → ZudokuContext.ts} +6 -13
  512. package/src/lib/core/plugins.ts +14 -16
  513. package/src/lib/errors/ErrorAlert.tsx +20 -6
  514. package/src/lib/oas/graphql/index.ts +4 -4
  515. package/src/lib/oas/parser/upgrade/index.ts +3 -1
  516. package/src/lib/plugins/api-keys/CreateApiKey.tsx +2 -2
  517. package/src/lib/plugins/api-keys/index.tsx +9 -9
  518. package/src/lib/plugins/custom-pages/CustomPage.tsx +2 -2
  519. package/src/lib/plugins/custom-pages/index.tsx +2 -2
  520. package/src/lib/plugins/markdown/index.tsx +50 -13
  521. package/src/lib/plugins/markdown/resolver.ts +92 -0
  522. package/src/lib/plugins/openapi/CollapsibleCode.tsx +80 -0
  523. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -14
  524. package/src/lib/plugins/openapi/Endpoint.tsx +7 -12
  525. package/src/lib/plugins/openapi/OperationList.tsx +20 -40
  526. package/src/lib/plugins/openapi/ParameterListItem.tsx +37 -31
  527. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +18 -13
  528. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +17 -12
  529. package/src/lib/plugins/openapi/Route.tsx +11 -12
  530. package/src/lib/plugins/openapi/Sidecar.tsx +73 -59
  531. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +140 -0
  532. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +16 -0
  533. package/src/lib/plugins/openapi/client/createServer.ts +2 -0
  534. package/src/lib/plugins/openapi/client/useCreateQuery.ts +18 -0
  535. package/src/lib/plugins/openapi/client/worker.ts +38 -24
  536. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +11 -18
  537. package/src/lib/plugins/openapi/graphql/gql.ts +10 -27
  538. package/src/lib/plugins/openapi/graphql/graphql.ts +233 -665
  539. package/src/lib/plugins/openapi/index.tsx +42 -67
  540. package/src/lib/plugins/openapi/playground/Playground.tsx +4 -3
  541. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  542. package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
  543. package/src/lib/plugins/openapi/util/generateSchemaExample.ts +28 -42
  544. package/src/lib/plugins/openapi-worker.ts +11 -1
  545. package/src/lib/plugins/redirect/index.tsx +5 -9
  546. package/src/lib/plugins/search-inkeep/index.tsx +2 -2
  547. package/src/lib/ui/Accordion.tsx +56 -0
  548. package/src/lib/ui/ActionButton.tsx +28 -0
  549. package/src/lib/ui/{Note.tsx → Alert.tsx} +11 -10
  550. package/src/lib/ui/AlertDialog.tsx +139 -0
  551. package/src/lib/ui/AspectRatio.tsx +5 -0
  552. package/src/lib/ui/Badge.tsx +36 -0
  553. package/src/lib/ui/Breadcrumb.tsx +115 -0
  554. package/src/lib/ui/Button.tsx +1 -1
  555. package/src/lib/ui/Carousel.tsx +260 -0
  556. package/src/lib/ui/Checkbox.tsx +28 -0
  557. package/src/lib/ui/Collapsible.tsx +9 -0
  558. package/src/lib/ui/Command.tsx +151 -0
  559. package/src/lib/{components → ui}/Dialog.tsx +4 -3
  560. package/src/lib/ui/Form.tsx +177 -0
  561. package/src/lib/ui/HoverCard.tsx +27 -0
  562. package/src/lib/ui/Label.tsx +24 -0
  563. package/src/lib/ui/Pagination.tsx +117 -0
  564. package/src/lib/ui/Popover.tsx +29 -0
  565. package/src/lib/ui/Progress.tsx +26 -0
  566. package/src/lib/ui/RadioGroup.tsx +42 -0
  567. package/src/lib/ui/ScrollArea.tsx +46 -0
  568. package/src/lib/ui/Skeleton.tsx +15 -0
  569. package/src/lib/ui/Slider.tsx +26 -0
  570. package/src/lib/ui/Switch.tsx +27 -0
  571. package/src/lib/ui/Textarea.tsx +23 -0
  572. package/src/lib/ui/Toggle.tsx +43 -0
  573. package/src/lib/ui/ToggleGroup.tsx +59 -0
  574. package/src/lib/ui/Tooltip.tsx +28 -0
  575. package/src/lib/util/MdxComponents.tsx +0 -1
  576. package/src/lib/util/invariant.ts +15 -3
  577. package/src/lib/util/useExposedProps.tsx +8 -2
  578. package/src/lib/util/useIsomorphicLayoutEffect.ts +5 -0
  579. package/src/lib/util/useOnScreen.ts +32 -0
  580. package/src/lib/util/useScrollToAnchor.ts +1 -1
  581. package/dist/internal.d.ts +0 -1
  582. package/dist/internal.js +0 -2
  583. package/dist/internal.js.map +0 -1
  584. package/dist/lib/components/DevPortal.js.map +0 -1
  585. package/dist/lib/components/Dialog.js.map +0 -1
  586. package/dist/lib/components/Select.js.map +0 -1
  587. package/dist/lib/components/context/ThemeContext.d.ts +0 -2
  588. package/dist/lib/components/context/ThemeContext.js +0 -7
  589. package/dist/lib/components/context/ThemeContext.js.map +0 -1
  590. package/dist/lib/components/context/ThemeProvider.d.ts +0 -4
  591. package/dist/lib/components/context/ThemeProvider.js +0 -23
  592. package/dist/lib/components/context/ThemeProvider.js.map +0 -1
  593. package/dist/lib/core/DevPortalContext.js.map +0 -1
  594. package/dist/lib/plugins/markdown/generateRoutes.d.ts +0 -3
  595. package/dist/lib/plugins/markdown/generateRoutes.js +0 -21
  596. package/dist/lib/plugins/markdown/generateRoutes.js.map +0 -1
  597. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +0 -12
  598. package/dist/lib/plugins/openapi/client/createMemoryClient.js +0 -46
  599. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +0 -1
  600. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +0 -10
  601. package/dist/lib/plugins/openapi/client/createWorkerClient.js +0 -61
  602. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +0 -1
  603. package/dist/lib/plugins/openapi/client/interfaces.d.ts +0 -4
  604. package/dist/lib/plugins/openapi/client/interfaces.js +0 -2
  605. package/dist/lib/plugins/openapi/client/interfaces.js.map +0 -1
  606. package/dist/lib/themeToggle.d.ts +0 -1
  607. package/dist/lib/themeToggle.js +0 -7
  608. package/dist/lib/themeToggle.js.map +0 -1
  609. package/dist/lib/ui/Note.d.ts +0 -8
  610. package/dist/lib/ui/Note.js +0 -23
  611. package/dist/lib/ui/Note.js.map +0 -1
  612. package/dist/lib/util/createWaitForNotify.d.ts +0 -1
  613. package/dist/lib/util/createWaitForNotify.js +0 -15
  614. package/dist/lib/util/createWaitForNotify.js.map +0 -1
  615. package/dist/vite/plugin-html-transform.d.ts +0 -2
  616. package/dist/vite/plugin-html-transform.js +0 -15
  617. package/dist/vite/plugin-html-transform.js.map +0 -1
  618. package/lib/DeveloperHint-B_QCCafl.js +0 -16
  619. package/lib/DeveloperHint-B_QCCafl.js.map +0 -1
  620. package/lib/ErrorPage-DqqAV1dr.js +0 -16
  621. package/lib/ErrorPage-DqqAV1dr.js.map +0 -1
  622. package/lib/Input-a9rLgbP_.js +0 -2229
  623. package/lib/Input-a9rLgbP_.js.map +0 -1
  624. package/lib/Markdown-Y__eLG0x.js +0 -20441
  625. package/lib/Markdown-Y__eLG0x.js.map +0 -1
  626. package/lib/OperationList-DuPG2FA2.js +0 -601
  627. package/lib/OperationList-DuPG2FA2.js.map +0 -1
  628. package/lib/Route-Bb3QClHu.js +0 -13
  629. package/lib/Route-Bb3QClHu.js.map +0 -1
  630. package/lib/SidebarBadge-BdzN0ZBK.js +0 -503
  631. package/lib/SidebarBadge-BdzN0ZBK.js.map +0 -1
  632. package/lib/SlotletProvider-DmqWiVFt.js +0 -239
  633. package/lib/SlotletProvider-DmqWiVFt.js.map +0 -1
  634. package/lib/ZudokuContext-MRoel6bS.js.map +0 -1
  635. package/lib/index-BijFM__9.js +0 -124
  636. package/lib/index-BijFM__9.js.map +0 -1
  637. package/lib/index-CCa8ojDW.js +0 -5964
  638. package/lib/index-CCa8ojDW.js.map +0 -1
  639. package/lib/index-DFN92YJN.js +0 -1782
  640. package/lib/index-DFN92YJN.js.map +0 -1
  641. package/lib/index-DJqnphbT.js +0 -35
  642. package/lib/index-_GxJ8hpM.js +0 -2867
  643. package/lib/index-_GxJ8hpM.js.map +0 -1
  644. package/lib/joinPath-B7kNnUX4.js +0 -8
  645. package/lib/joinPath-B7kNnUX4.js.map +0 -1
  646. package/lib/state-CsuHT8ZO.js +0 -183
  647. package/lib/state-CsuHT8ZO.js.map +0 -1
  648. package/lib/urql-core-KJnLL26g.js +0 -1455
  649. package/lib/urql-core-KJnLL26g.js.map +0 -1
  650. package/lib/useExposedProps-BWwxa-Hg.js +0 -9
  651. package/lib/useExposedProps-BWwxa-Hg.js.map +0 -1
  652. package/lib/utils-C8S3st2k.js.map +0 -1
  653. package/src/lib/components/DevPortal.tsx +0 -111
  654. package/src/lib/components/context/ThemeContext.tsx +0 -8
  655. package/src/lib/components/context/ThemeProvider.tsx +0 -27
  656. package/src/lib/plugins/markdown/generateRoutes.tsx +0 -38
  657. package/src/lib/plugins/openapi/client/createMemoryClient.ts +0 -51
  658. package/src/lib/plugins/openapi/client/createWorkerClient.ts +0 -75
  659. package/src/lib/plugins/openapi/client/interfaces.ts +0 -5
  660. package/src/lib/themeToggle.ts +0 -7
  661. package/src/lib/util/createWaitForNotify.ts +0 -18
  662. /package/dist/lib/{components → ui}/Dialog.d.ts +0 -0
  663. /package/dist/lib/{components → ui}/Select.d.ts +0 -0
  664. /package/dist/lib/{components → ui}/Select.js +0 -0
  665. /package/src/lib/{components → ui}/Select.tsx +0 -0
@@ -1,3134 +1,884 @@
1
- var Ba = Object.defineProperty;
2
- var fn = (e) => {
1
+ var mt = Object.defineProperty;
2
+ var we = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var Ha = (e, t, n) => t in e ? Ba(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var ae = (e, t, n) => Ha(e, typeof t != "symbol" ? t + "" : t, n), hn = (e, t, n) => t.has(e) || fn("Cannot " + n);
7
- var w = (e, t, n) => (hn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ce = (e, t, n) => t.has(e) ? fn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), X = (e, t, n, r) => (hn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
8
- var ut = (e, t, n, r) => ({
9
- set _(o) {
10
- X(e, t, o, n);
5
+ var gt = (e, t, r) => t in e ? mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
6
+ var N = (e, t, r) => gt(e, typeof t != "symbol" ? t + "" : t, r), Ne = (e, t, r) => t.has(e) || we("Cannot " + r);
7
+ var l = (e, t, r) => (Ne(e, t, "read from private field"), r ? r.call(e) : t.get(e)), C = (e, t, r) => t.has(e) ? we("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), y = (e, t, r, s) => (Ne(e, t, "write to private field"), s ? s.call(e, r) : t.set(e, r), r);
8
+ var X = (e, t, r, s) => ({
9
+ set _(n) {
10
+ y(e, t, n, r);
11
11
  },
12
12
  get _() {
13
- return w(e, t, r);
13
+ return l(e, t, s);
14
14
  }
15
15
  });
16
- import { c as On, H as At, M as Ua, d as za, A as Ka, b as qa } from "./utils-C8S3st2k.js";
17
- import { e as Qa, f as Va, R as Ga, N as Ze, L as kt, g as Wa, O as In, h as Ya, b as Xa, u as $t } from "./index-DFN92YJN.js";
18
- import { E as An, S as xe, a as Ja, R as Za } from "./SlotletProvider-DmqWiVFt.js";
16
+ import { a as Fe, A as pt, H as he, M as vt, u as xt } from "./AnchorLink-CDlhr8gL.js";
17
+ import { d as yt, R as bt, N as re, u as jt, L as se } from "./index-Yn8c3UWE.js";
18
+ import { u as wt } from "./state-BsPrOUAh.js";
19
+ import { E as qe, S as O, a as Nt, R as Ct } from "./SlotletProvider-D2v6rJy1.js";
19
20
  import { j as a } from "./jsx-runtime-B6kdoens.js";
20
- import { M as eo, f as to, c as kn, p as $n, A as no, d as rt, j as ro, b as I, k as ao, F as oo, D as so, C as io, P as Ke, i as Ft, q as lo, s as Fn, R as co, S as uo, t as fo, h as ho, r as Ln, m as po, a as gt, u as Bn, V as Hn, n as pn, B as jt } from "./index-_GxJ8hpM.js";
21
- import { a as $, c as Un, b as mo, T as go, d as vo, V as wo, u as Lt, e as xo, C as yo } from "./Markdown-Y__eLG0x.js";
22
- import * as h from "react";
23
- import p, { StrictMode as zn, createContext as Kn, Component as bo, createElement as mn, isValidElement as So, useState as Ie, useMemo as mt, useLayoutEffect as Co, useEffect as Ce, useCallback as qn, Suspense as Qn, memo as Vn, useContext as Mo, Fragment as Ro, useRef as Bt, forwardRef as Eo } from "react";
24
- import { a as Ht } from "./index-DJqnphbT.js";
25
- import { B as Do } from "./router-BsfSoK2j.js";
26
- import { a as Nt, R as Po, T as jo, C as No } from "./index-BijFM__9.js";
27
- import { S as Gn, f as Wn, Q as To, n as se, m as gn, g as vn, i as be, j as _o, k as Oo, l as Io, o as Ao, p as wn, r as xn, q as ko, h as yn, t as bn, v as $o, u as qe, b as Fo, Z as Lo, w as Bo, c as Yn, x as Ho } from "./ZudokuContext-MRoel6bS.js";
28
- import { j as vt } from "./joinPath-B7kNnUX4.js";
29
- import { ChevronRightIcon as Xn, CheckIcon as Uo, DotIcon as zo, CircleXIcon as Ko, SearchIcon as qo, MenuIcon as Qo, MoonStarIcon as Vo, SunIcon as Go, ExternalLinkIcon as Wo, PanelLeftIcon as Yo } from "lucide-react";
30
- import { c as Jn, P as yt, R as Xo, I as Jo, O as Zo, C as es, T as ts, a as ns, b as rs, D as as, d as os, e as ss, S as Ct } from "./SidebarBadge-BdzN0ZBK.js";
31
- import { S as is } from "./Spinner-3cQDBVGr.js";
32
- function ls({ error: e }) {
33
- return /* @__PURE__ */ a.jsx(An, { error: e });
34
- }
35
- var at = {};
36
- const cs = /* @__PURE__ */ Ht(Do), us = /* @__PURE__ */ Ht(Qa), ds = /* @__PURE__ */ Ht(Va);
37
- Object.defineProperty(at, "__esModule", { value: !0 });
38
- var fs = p, we = cs, Ut = us, Se = ds;
39
- function hs(e) {
40
- if (e && e.__esModule) return e;
41
- var t = /* @__PURE__ */ Object.create(null);
42
- return e && Object.keys(e).forEach(function(n) {
43
- if (n !== "default") {
44
- var r = Object.getOwnPropertyDescriptor(e, n);
45
- Object.defineProperty(t, n, r.get ? r : {
46
- enumerable: !0,
47
- get: function() {
48
- return e[n];
49
- }
50
- });
51
- }
52
- }), t.default = e, Object.freeze(t);
53
- }
54
- var ge = /* @__PURE__ */ hs(fs);
55
- function ps({
56
- basename: e,
57
- children: t,
58
- location: n = "/",
59
- future: r
60
- }) {
61
- typeof n == "string" && (n = Se.parsePath(n));
62
- let o = we.Action.Pop, s = {
63
- pathname: n.pathname || "/",
64
- search: n.search || "",
65
- hash: n.hash || "",
66
- state: n.state != null ? n.state : null,
67
- key: n.key || "default"
68
- }, i = Zn();
69
- return /* @__PURE__ */ ge.createElement(Se.Router, {
70
- basename: e,
71
- children: t,
72
- location: s,
73
- navigationType: o,
74
- navigator: i,
75
- future: r,
76
- static: !0
77
- });
78
- }
79
- function ms({
80
- context: e,
81
- router: t,
82
- hydrate: n = !0,
83
- nonce: r
84
- }) {
85
- t && e || (process.env.NODE_ENV !== "production" ? we.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : we.UNSAFE_invariant(!1));
86
- let o = {
87
- router: t,
88
- navigator: Zn(),
89
- static: !0,
90
- staticContext: e,
91
- basename: e.basename || "/"
92
- }, s = /* @__PURE__ */ new Map(), i = "";
93
- if (n !== !1) {
94
- let u = {
95
- loaderData: e.loaderData,
96
- actionData: e.actionData,
97
- errors: vs(e.errors)
98
- };
99
- i = `window.__staticRouterHydrationData = JSON.parse(${Cs(JSON.stringify(JSON.stringify(u)))});`;
100
- }
101
- let {
102
- state: l
103
- } = o.router;
104
- return /* @__PURE__ */ ge.createElement(ge.Fragment, null, /* @__PURE__ */ ge.createElement(Se.UNSAFE_DataRouterContext.Provider, {
105
- value: o
106
- }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_DataRouterStateContext.Provider, {
107
- value: l
108
- }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_FetchersContext.Provider, {
109
- value: s
110
- }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_ViewTransitionContext.Provider, {
111
- value: {
112
- isTransitioning: !1
113
- }
114
- }, /* @__PURE__ */ ge.createElement(Se.Router, {
115
- basename: o.basename,
116
- location: l.location,
117
- navigationType: l.historyAction,
118
- navigator: o.navigator,
119
- static: o.static,
120
- future: {
121
- v7_relativeSplatPath: t.future.v7_relativeSplatPath
122
- }
123
- }, /* @__PURE__ */ ge.createElement(gs, {
124
- routes: t.routes,
125
- future: t.future,
126
- state: l
127
- })))))), i ? /* @__PURE__ */ ge.createElement("script", {
128
- suppressHydrationWarning: !0,
129
- nonce: r,
130
- dangerouslySetInnerHTML: {
131
- __html: i
132
- }
133
- }) : null);
134
- }
135
- function gs({
136
- routes: e,
137
- future: t,
138
- state: n
139
- }) {
140
- return Ut.UNSAFE_useRoutesImpl(e, void 0, n, t);
141
- }
142
- function vs(e) {
143
- if (!e) return null;
144
- let t = Object.entries(e), n = {};
145
- for (let [r, o] of t)
146
- we.isRouteErrorResponse(o) ? n[r] = {
147
- ...o,
148
- __type: "RouteErrorResponse"
149
- } : o instanceof Error ? n[r] = {
150
- message: o.message,
151
- __type: "Error",
152
- // If this is a subclass (i.e., ReferenceError), send up the type so we
153
- // can re-create the same type during hydration.
154
- ...o.name !== "Error" ? {
155
- __subType: o.name
156
- } : {}
157
- } : n[r] = o;
158
- return n;
159
- }
160
- function Zn() {
161
- return {
162
- createHref: er,
163
- encodeLocation: tr,
164
- push(e) {
165
- throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
166
- },
167
- replace(e) {
168
- throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`);
169
- },
170
- go(e) {
171
- throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`);
172
- },
173
- back() {
174
- throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.");
175
- },
176
- forward() {
177
- throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.");
178
- }
179
- };
180
- }
181
- function ws(e, t) {
182
- return we.createStaticHandler(e, {
183
- ...t,
184
- mapRouteProperties: Ut.UNSAFE_mapRouteProperties
185
- });
186
- }
187
- function xs(e, t, n = {}) {
188
- let r = {}, o = we.UNSAFE_convertRoutesToDataRoutes(e, Ut.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((l) => {
189
- let u = r[l.route.id] || l.route;
190
- return {
191
- ...l,
192
- route: u
193
- };
194
- }), i = (l) => `You cannot use router.${l}() on the server because it is a stateless environment`;
195
- return {
196
- get basename() {
197
- return t.basename;
198
- },
199
- get future() {
200
- var l, u;
201
- return {
202
- v7_fetcherPersist: !1,
203
- v7_normalizeFormMethod: !1,
204
- v7_partialHydration: ((l = n.future) == null ? void 0 : l.v7_partialHydration) === !0,
205
- v7_prependBasename: !1,
206
- v7_relativeSplatPath: ((u = n.future) == null ? void 0 : u.v7_relativeSplatPath) === !0,
207
- v7_skipActionErrorRevalidation: !1
208
- };
209
- },
210
- get state() {
211
- return {
212
- historyAction: we.Action.Pop,
213
- location: t.location,
214
- matches: s,
215
- loaderData: t.loaderData,
216
- actionData: t.actionData,
217
- errors: t.errors,
218
- initialized: !0,
219
- navigation: we.IDLE_NAVIGATION,
220
- restoreScrollPosition: null,
221
- preventScrollReset: !1,
222
- revalidation: "idle",
223
- fetchers: /* @__PURE__ */ new Map(),
224
- blockers: /* @__PURE__ */ new Map()
225
- };
226
- },
227
- get routes() {
228
- return o;
229
- },
230
- get window() {
231
- },
232
- initialize() {
233
- throw i("initialize");
234
- },
235
- subscribe() {
236
- throw i("subscribe");
237
- },
238
- enableScrollRestoration() {
239
- throw i("enableScrollRestoration");
240
- },
241
- navigate() {
242
- throw i("navigate");
243
- },
244
- fetch() {
245
- throw i("fetch");
246
- },
247
- revalidate() {
248
- throw i("revalidate");
249
- },
250
- createHref: er,
251
- encodeLocation: tr,
252
- getFetcher() {
253
- return we.IDLE_FETCHER;
254
- },
255
- deleteFetcher() {
256
- throw i("deleteFetcher");
257
- },
258
- dispose() {
259
- throw i("dispose");
260
- },
261
- getBlocker() {
262
- return we.IDLE_BLOCKER;
263
- },
264
- deleteBlocker() {
265
- throw i("deleteBlocker");
266
- },
267
- patchRoutes() {
268
- throw i("patchRoutes");
269
- },
270
- _internalFetchControllers: /* @__PURE__ */ new Map(),
271
- _internalActiveDeferreds: /* @__PURE__ */ new Map(),
272
- _internalSetRoutes() {
273
- throw i("_internalSetRoutes");
274
- }
275
- };
276
- }
277
- function er(e) {
278
- return typeof e == "string" ? e : Se.createPath(e);
279
- }
280
- function tr(e) {
281
- let t = typeof e == "string" ? e : Se.createPath(e);
282
- t = t.replace(/ $/, "%20");
283
- let n = ys.test(t) ? new URL(t) : new URL(t, "http://localhost");
284
- return {
285
- pathname: n.pathname,
286
- search: n.search,
287
- hash: n.hash
288
- };
289
- }
290
- const ys = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, bs = {
291
- "&": "\\u0026",
292
- ">": "\\u003e",
293
- "<": "\\u003c",
294
- "\u2028": "\\u2028",
295
- "\u2029": "\\u2029"
296
- }, Ss = /[&><\u2028\u2029]/g;
297
- function Cs(e) {
298
- return e.replace(Ss, (t) => bs[t]);
299
- }
300
- at.StaticRouter = ps;
301
- var Ms = at.StaticRouterProvider = ms;
302
- at.createStaticHandler = ws;
303
- at.createStaticRouter = xs;
304
- const Rs = ({
305
- router: e,
306
- hydrate: t = !1
307
- }) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { children: /* @__PURE__ */ a.jsx(Nt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(Ga, { router: e }) }) }) }), Es = ({
308
- router: e,
309
- context: t,
310
- helmetContext: n
311
- }) => /* @__PURE__ */ a.jsx(zn, { children: /* @__PURE__ */ a.jsx(On, { context: n, children: /* @__PURE__ */ a.jsx(Ms, { router: e, context: t }) }) });
312
- var ve, Nn, Ds = (Nn = class extends Gn {
21
+ import { Button as St } from "./ui/Button.js";
22
+ import { Callout as Pt } from "./ui/Callout.js";
23
+ import { S as ze, l as Be, Q as Et, n as w, m as Ce, o as Se, p as M, q as kt, r as At, t as Ot, v as Mt, w as Pe, x as Ee, y as Dt, h as ke, z as Ae, A as Rt, d as Tt, B as He, C as It, j as F, u as Q, D as Le, E as _t, g as Qt, Z as Ft } from "./utils-DcpDOncX.js";
24
+ import { M as qt, u as ae } from "./hook-Diu0rqp-.js";
25
+ import * as G from "react";
26
+ import zt, { useState as q, StrictMode as Ue, useEffect as z, useRef as fe, useCallback as Bt, Suspense as me, memo as Ke, forwardRef as Ht, createContext as $e, Component as Lt, createElement as Oe, useMemo as ne, useContext as Ut, Fragment as Kt } from "react";
27
+ import { a as ge } from "./_commonjsHelpers-BkfeUUK-.js";
28
+ import { B as $t } from "./router-lfyopgBI.js";
29
+ import { I as Vt, y as Zt, u as pe, O as Ve, j as Wt } from "./index-Czzd9rjU.js";
30
+ import { S as ce, a as ie } from "./SidebarBadge-DxFJcJ6V.js";
31
+ import { C as ve } from "./ClientOnly-E7hGysn1.js";
32
+ import { ChevronRightIcon as Yt, ExternalLinkIcon as Jt, CircleXIcon as Xt, SearchIcon as Gt, MoonStarIcon as er, SunIcon as tr, MenuIcon as rr, PanelLeftIcon as ar } from "lucide-react";
33
+ import { Drawer as Ze, DrawerTrigger as We, DrawerContent as Ye, DrawerTitle as Je, DrawerClose as sr } from "./ui/Drawer.js";
34
+ import { c as R } from "./cn-BmFQLtkS.js";
35
+ import { u as xe, a as nr, V as ir } from "./Markdown-BorQdbxW.js";
36
+ import { c as or, a as Xe } from "./index-BuAyrJe3.js";
37
+ import * as oe from "@radix-ui/react-collapsible";
38
+ import { B as ue } from "./Button-jK0EsymC.js";
39
+ import { DropdownMenu as lr, DropdownMenuTrigger as cr, DropdownMenuContent as ur, DropdownMenuLabel as dr, DropdownMenuSeparator as hr, DropdownMenuSub as fr, DropdownMenuSubTrigger as mr, DropdownMenuPortal as gr, DropdownMenuSubContent as pr, DropdownMenuItem as vr } from "./ui/DropdownMenu.js";
40
+ import { VisuallyHidden as Ge } from "@radix-ui/react-visually-hidden";
41
+ import { z as xr, J as yr } from "./SyntaxHighlight-CBmwwKoM.js";
42
+ import { S as br } from "./Spinner-3cQDBVGr.js";
43
+ function jr({ error: e }) {
44
+ return /* @__PURE__ */ a.jsx(qe, { error: e });
45
+ }
46
+ var k, Ie, wr = (Ie = class extends ze {
313
47
  constructor(t = {}) {
314
48
  super();
315
- ce(this, ve);
316
- this.config = t, X(this, ve, /* @__PURE__ */ new Map());
49
+ C(this, k);
50
+ this.config = t, y(this, k, /* @__PURE__ */ new Map());
317
51
  }
318
- build(t, n, r) {
319
- const o = n.queryKey, s = n.queryHash ?? Wn(o, n);
320
- let i = this.get(s);
321
- return i || (i = new To({
52
+ build(t, r, s) {
53
+ const n = r.queryKey, o = r.queryHash ?? Be(n, r);
54
+ let i = this.get(o);
55
+ return i || (i = new Et({
322
56
  cache: this,
323
- queryKey: o,
324
- queryHash: s,
325
- options: t.defaultQueryOptions(n),
326
- state: r,
327
- defaultOptions: t.getQueryDefaults(o)
57
+ queryKey: n,
58
+ queryHash: o,
59
+ options: t.defaultQueryOptions(r),
60
+ state: s,
61
+ defaultOptions: t.getQueryDefaults(n)
328
62
  }), this.add(i)), i;
329
63
  }
330
64
  add(t) {
331
- w(this, ve).has(t.queryHash) || (w(this, ve).set(t.queryHash, t), this.notify({
65
+ l(this, k).has(t.queryHash) || (l(this, k).set(t.queryHash, t), this.notify({
332
66
  type: "added",
333
67
  query: t
334
68
  }));
335
69
  }
336
70
  remove(t) {
337
- const n = w(this, ve).get(t.queryHash);
338
- n && (t.destroy(), n === t && w(this, ve).delete(t.queryHash), this.notify({ type: "removed", query: t }));
71
+ const r = l(this, k).get(t.queryHash);
72
+ r && (t.destroy(), r === t && l(this, k).delete(t.queryHash), this.notify({ type: "removed", query: t }));
339
73
  }
340
74
  clear() {
341
- se.batch(() => {
75
+ w.batch(() => {
342
76
  this.getAll().forEach((t) => {
343
77
  this.remove(t);
344
78
  });
345
79
  });
346
80
  }
347
81
  get(t) {
348
- return w(this, ve).get(t);
82
+ return l(this, k).get(t);
349
83
  }
350
84
  getAll() {
351
- return [...w(this, ve).values()];
85
+ return [...l(this, k).values()];
352
86
  }
353
87
  find(t) {
354
- const n = { exact: !0, ...t };
88
+ const r = { exact: !0, ...t };
355
89
  return this.getAll().find(
356
- (r) => gn(n, r)
90
+ (s) => Ce(r, s)
357
91
  );
358
92
  }
359
93
  findAll(t = {}) {
360
- const n = this.getAll();
361
- return Object.keys(t).length > 0 ? n.filter((r) => gn(t, r)) : n;
94
+ const r = this.getAll();
95
+ return Object.keys(t).length > 0 ? r.filter((s) => Ce(t, s)) : r;
362
96
  }
363
97
  notify(t) {
364
- se.batch(() => {
365
- this.listeners.forEach((n) => {
366
- n(t);
98
+ w.batch(() => {
99
+ this.listeners.forEach((r) => {
100
+ r(t);
367
101
  });
368
102
  });
369
103
  }
370
104
  onFocus() {
371
- se.batch(() => {
105
+ w.batch(() => {
372
106
  this.getAll().forEach((t) => {
373
107
  t.onFocus();
374
108
  });
375
109
  });
376
110
  }
377
111
  onOnline() {
378
- se.batch(() => {
112
+ w.batch(() => {
379
113
  this.getAll().forEach((t) => {
380
114
  t.onOnline();
381
115
  });
382
116
  });
383
117
  }
384
- }, ve = new WeakMap(), Nn), oe, nt, Tn, Ps = (Tn = class extends Gn {
118
+ }, k = new WeakMap(), Ie), j, Z, _e, Nr = (_e = class extends ze {
385
119
  constructor(t = {}) {
386
120
  super();
387
- ce(this, oe);
388
- ce(this, nt);
389
- this.config = t, X(this, oe, /* @__PURE__ */ new Map()), X(this, nt, Date.now());
121
+ C(this, j);
122
+ C(this, Z);
123
+ this.config = t, y(this, j, /* @__PURE__ */ new Map()), y(this, Z, Date.now());
390
124
  }
391
- build(t, n, r) {
392
- const o = new eo({
125
+ build(t, r, s) {
126
+ const n = new qt({
393
127
  mutationCache: this,
394
- mutationId: ++ut(this, nt)._,
395
- options: t.defaultMutationOptions(n),
396
- state: r
128
+ mutationId: ++X(this, Z)._,
129
+ options: t.defaultMutationOptions(r),
130
+ state: s
397
131
  });
398
- return this.add(o), o;
132
+ return this.add(n), n;
399
133
  }
400
134
  add(t) {
401
- const n = dt(t), r = w(this, oe).get(n) ?? [];
402
- r.push(t), w(this, oe).set(n, r), this.notify({ type: "added", mutation: t });
135
+ const r = ee(t), s = l(this, j).get(r) ?? [];
136
+ s.push(t), l(this, j).set(r, s), this.notify({ type: "added", mutation: t });
403
137
  }
404
138
  remove(t) {
405
- var r;
406
- const n = dt(t);
407
- if (w(this, oe).has(n)) {
408
- const o = (r = w(this, oe).get(n)) == null ? void 0 : r.filter((s) => s !== t);
409
- o && (o.length === 0 ? w(this, oe).delete(n) : w(this, oe).set(n, o));
139
+ var s;
140
+ const r = ee(t);
141
+ if (l(this, j).has(r)) {
142
+ const n = (s = l(this, j).get(r)) == null ? void 0 : s.filter((o) => o !== t);
143
+ n && (n.length === 0 ? l(this, j).delete(r) : l(this, j).set(r, n));
410
144
  }
411
145
  this.notify({ type: "removed", mutation: t });
412
146
  }
413
147
  canRun(t) {
414
- var r;
415
- const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o.state.status === "pending");
416
- return !n || n === t;
148
+ var s;
149
+ const r = (s = l(this, j).get(ee(t))) == null ? void 0 : s.find((n) => n.state.status === "pending");
150
+ return !r || r === t;
417
151
  }
418
152
  runNext(t) {
419
- var r;
420
- const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o !== t && o.state.isPaused);
421
- return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
153
+ var s;
154
+ const r = (s = l(this, j).get(ee(t))) == null ? void 0 : s.find((n) => n !== t && n.state.isPaused);
155
+ return (r == null ? void 0 : r.continue()) ?? Promise.resolve();
422
156
  }
423
157
  clear() {
424
- se.batch(() => {
158
+ w.batch(() => {
425
159
  this.getAll().forEach((t) => {
426
160
  this.remove(t);
427
161
  });
428
162
  });
429
163
  }
430
164
  getAll() {
431
- return [...w(this, oe).values()].flat();
165
+ return [...l(this, j).values()].flat();
432
166
  }
433
167
  find(t) {
434
- const n = { exact: !0, ...t };
168
+ const r = { exact: !0, ...t };
435
169
  return this.getAll().find(
436
- (r) => vn(n, r)
170
+ (s) => Se(r, s)
437
171
  );
438
172
  }
439
173
  findAll(t = {}) {
440
- return this.getAll().filter((n) => vn(t, n));
174
+ return this.getAll().filter((r) => Se(t, r));
441
175
  }
442
176
  notify(t) {
443
- se.batch(() => {
444
- this.listeners.forEach((n) => {
445
- n(t);
177
+ w.batch(() => {
178
+ this.listeners.forEach((r) => {
179
+ r(t);
446
180
  });
447
181
  });
448
182
  }
449
183
  resumePausedMutations() {
450
- const t = this.getAll().filter((n) => n.state.isPaused);
451
- return se.batch(
184
+ const t = this.getAll().filter((r) => r.state.isPaused);
185
+ return w.batch(
452
186
  () => Promise.all(
453
- t.map((n) => n.continue().catch(be))
187
+ t.map((r) => r.continue().catch(M))
454
188
  )
455
189
  );
456
190
  }
457
- }, oe = new WeakMap(), nt = new WeakMap(), Tn);
458
- function dt(e) {
191
+ }, j = new WeakMap(), Z = new WeakMap(), _e);
192
+ function ee(e) {
459
193
  var t;
460
194
  return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
461
195
  }
462
- function Sn(e) {
196
+ function Me(e) {
463
197
  return {
464
- onFetch: (t, n) => {
465
- var f, c, d, R, C;
466
- const r = t.options, o = (d = (c = (f = t.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : d.direction, s = ((R = t.state.data) == null ? void 0 : R.pages) || [], i = ((C = t.state.data) == null ? void 0 : C.pageParams) || [];
467
- let l = { pages: [], pageParams: [] }, u = 0;
468
- const m = async () => {
469
- let g = !1;
470
- const T = (P) => {
471
- Object.defineProperty(P, "signal", {
198
+ onFetch: (t, r) => {
199
+ var x, m, f, v, p;
200
+ const s = t.options, n = (f = (m = (x = t.fetchOptions) == null ? void 0 : x.meta) == null ? void 0 : m.fetchMore) == null ? void 0 : f.direction, o = ((v = t.state.data) == null ? void 0 : v.pages) || [], i = ((p = t.state.data) == null ? void 0 : p.pageParams) || [];
201
+ let c = { pages: [], pageParams: [] }, u = 0;
202
+ const d = async () => {
203
+ let h = !1;
204
+ const S = (b) => {
205
+ Object.defineProperty(b, "signal", {
472
206
  enumerable: !0,
473
- get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
474
- g = !0;
207
+ get: () => (t.signal.aborted ? h = !0 : t.signal.addEventListener("abort", () => {
208
+ h = !0;
475
209
  }), t.signal)
476
210
  });
477
- }, M = _o(t.options, t.fetchOptions), A = async (P, v, z) => {
478
- if (g)
211
+ }, Y = kt(t.options, t.fetchOptions), K = async (b, P, $) => {
212
+ if (h)
479
213
  return Promise.reject();
480
- if (v == null && P.pages.length)
481
- return Promise.resolve(P);
482
- const Z = {
214
+ if (P == null && b.pages.length)
215
+ return Promise.resolve(b);
216
+ const J = {
483
217
  queryKey: t.queryKey,
484
- pageParam: v,
485
- direction: z ? "backward" : "forward",
218
+ pageParam: P,
219
+ direction: $ ? "backward" : "forward",
486
220
  meta: t.options.meta
487
221
  };
488
- T(Z);
489
- const b = await M(
490
- Z
491
- ), { maxPages: j } = t.options, D = z ? Oo : Io;
222
+ S(J);
223
+ const ft = await Y(
224
+ J
225
+ ), { maxPages: be } = t.options, je = $ ? At : Ot;
492
226
  return {
493
- pages: D(P.pages, b, j),
494
- pageParams: D(P.pageParams, v, j)
227
+ pages: je(b.pages, ft, be),
228
+ pageParams: je(b.pageParams, P, be)
495
229
  };
496
230
  };
497
- if (o && s.length) {
498
- const P = o === "backward", v = P ? js : Cn, z = {
499
- pages: s,
231
+ if (n && o.length) {
232
+ const b = n === "backward", P = b ? Cr : De, $ = {
233
+ pages: o,
500
234
  pageParams: i
501
- }, Z = v(r, z);
502
- l = await A(z, Z, P);
235
+ }, J = P(s, $);
236
+ c = await K($, J, b);
503
237
  } else {
504
- const P = e ?? s.length;
238
+ const b = e ?? o.length;
505
239
  do {
506
- const v = u === 0 ? i[0] ?? r.initialPageParam : Cn(r, l);
507
- if (u > 0 && v == null)
240
+ const P = u === 0 ? i[0] ?? s.initialPageParam : De(s, c);
241
+ if (u > 0 && P == null)
508
242
  break;
509
- l = await A(l, v), u++;
510
- } while (u < P);
243
+ c = await K(c, P), u++;
244
+ } while (u < b);
511
245
  }
512
- return l;
246
+ return c;
513
247
  };
514
248
  t.options.persister ? t.fetchFn = () => {
515
- var g, T;
516
- return (T = (g = t.options).persister) == null ? void 0 : T.call(
517
- g,
518
- m,
249
+ var h, S;
250
+ return (S = (h = t.options).persister) == null ? void 0 : S.call(
251
+ h,
252
+ d,
519
253
  {
520
254
  queryKey: t.queryKey,
521
255
  meta: t.options.meta,
522
256
  signal: t.signal
523
257
  },
524
- n
258
+ r
525
259
  );
526
- } : t.fetchFn = m;
260
+ } : t.fetchFn = d;
527
261
  }
528
262
  };
529
263
  }
530
- function Cn(e, { pages: t, pageParams: n }) {
531
- const r = t.length - 1;
264
+ function De(e, { pages: t, pageParams: r }) {
265
+ const s = t.length - 1;
532
266
  return t.length > 0 ? e.getNextPageParam(
533
- t[r],
267
+ t[s],
534
268
  t,
535
- n[r],
536
- n
269
+ r[s],
270
+ r
537
271
  ) : void 0;
538
272
  }
539
- function js(e, { pages: t, pageParams: n }) {
540
- var r;
541
- return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, n[0], n) : void 0;
273
+ function Cr(e, { pages: t, pageParams: r }) {
274
+ var s;
275
+ return t.length > 0 ? (s = e.getPreviousPageParam) == null ? void 0 : s.call(e, t[0], t, r[0], r) : void 0;
542
276
  }
543
- var F, Pe, je, Be, He, Ne, Ue, ze, _n, Ns = (_n = class {
277
+ var g, T, I, B, H, _, L, U, Qe, Sr = (Qe = class {
544
278
  constructor(e = {}) {
545
- ce(this, F);
546
- ce(this, Pe);
547
- ce(this, je);
548
- ce(this, Be);
549
- ce(this, He);
550
- ce(this, Ne);
551
- ce(this, Ue);
552
- ce(this, ze);
553
- X(this, F, e.queryCache || new Ds()), X(this, Pe, e.mutationCache || new Ps()), X(this, je, e.defaultOptions || {}), X(this, Be, /* @__PURE__ */ new Map()), X(this, He, /* @__PURE__ */ new Map()), X(this, Ne, 0);
279
+ C(this, g);
280
+ C(this, T);
281
+ C(this, I);
282
+ C(this, B);
283
+ C(this, H);
284
+ C(this, _);
285
+ C(this, L);
286
+ C(this, U);
287
+ y(this, g, e.queryCache || new wr()), y(this, T, e.mutationCache || new Nr()), y(this, I, e.defaultOptions || {}), y(this, B, /* @__PURE__ */ new Map()), y(this, H, /* @__PURE__ */ new Map()), y(this, _, 0);
554
288
  }
555
289
  mount() {
556
- ut(this, Ne)._++, w(this, Ne) === 1 && (X(this, Ue, Ao.subscribe(async (e) => {
557
- e && (await this.resumePausedMutations(), w(this, F).onFocus());
558
- })), X(this, ze, wn.subscribe(async (e) => {
559
- e && (await this.resumePausedMutations(), w(this, F).onOnline());
290
+ X(this, _)._++, l(this, _) === 1 && (y(this, L, Mt.subscribe(async (e) => {
291
+ e && (await this.resumePausedMutations(), l(this, g).onFocus());
292
+ })), y(this, U, Pe.subscribe(async (e) => {
293
+ e && (await this.resumePausedMutations(), l(this, g).onOnline());
560
294
  })));
561
295
  }
562
296
  unmount() {
563
297
  var e, t;
564
- ut(this, Ne)._--, w(this, Ne) === 0 && ((e = w(this, Ue)) == null || e.call(this), X(this, Ue, void 0), (t = w(this, ze)) == null || t.call(this), X(this, ze, void 0));
298
+ X(this, _)._--, l(this, _) === 0 && ((e = l(this, L)) == null || e.call(this), y(this, L, void 0), (t = l(this, U)) == null || t.call(this), y(this, U, void 0));
565
299
  }
566
300
  isFetching(e) {
567
- return w(this, F).findAll({ ...e, fetchStatus: "fetching" }).length;
301
+ return l(this, g).findAll({ ...e, fetchStatus: "fetching" }).length;
568
302
  }
569
303
  isMutating(e) {
570
- return w(this, Pe).findAll({ ...e, status: "pending" }).length;
304
+ return l(this, T).findAll({ ...e, status: "pending" }).length;
571
305
  }
572
306
  getQueryData(e) {
573
- var n;
307
+ var r;
574
308
  const t = this.defaultQueryOptions({ queryKey: e });
575
- return (n = w(this, F).get(t.queryHash)) == null ? void 0 : n.state.data;
309
+ return (r = l(this, g).get(t.queryHash)) == null ? void 0 : r.state.data;
576
310
  }
577
311
  ensureQueryData(e) {
578
312
  const t = this.getQueryData(e.queryKey);
579
313
  if (t === void 0)
580
314
  return this.fetchQuery(e);
581
315
  {
582
- const n = this.defaultQueryOptions(e), r = w(this, F).build(this, n);
583
- return e.revalidateIfStale && r.isStaleByTime(xn(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
316
+ const r = this.defaultQueryOptions(e), s = l(this, g).build(this, r);
317
+ return e.revalidateIfStale && s.isStaleByTime(Ee(r.staleTime, s)) && this.prefetchQuery(r), Promise.resolve(t);
584
318
  }
585
319
  }
586
320
  getQueriesData(e) {
587
- return w(this, F).findAll(e).map(({ queryKey: t, state: n }) => {
588
- const r = n.data;
589
- return [t, r];
321
+ return l(this, g).findAll(e).map(({ queryKey: t, state: r }) => {
322
+ const s = r.data;
323
+ return [t, s];
590
324
  });
591
325
  }
592
- setQueryData(e, t, n) {
593
- const r = this.defaultQueryOptions({ queryKey: e }), o = w(this, F).get(
594
- r.queryHash
595
- ), s = o == null ? void 0 : o.state.data, i = ko(t, s);
326
+ setQueryData(e, t, r) {
327
+ const s = this.defaultQueryOptions({ queryKey: e }), n = l(this, g).get(
328
+ s.queryHash
329
+ ), o = n == null ? void 0 : n.state.data, i = Dt(t, o);
596
330
  if (i !== void 0)
597
- return w(this, F).build(this, r).setData(i, { ...n, manual: !0 });
331
+ return l(this, g).build(this, s).setData(i, { ...r, manual: !0 });
598
332
  }
599
- setQueriesData(e, t, n) {
600
- return se.batch(
601
- () => w(this, F).findAll(e).map(({ queryKey: r }) => [
602
- r,
603
- this.setQueryData(r, t, n)
333
+ setQueriesData(e, t, r) {
334
+ return w.batch(
335
+ () => l(this, g).findAll(e).map(({ queryKey: s }) => [
336
+ s,
337
+ this.setQueryData(s, t, r)
604
338
  ])
605
339
  );
606
340
  }
607
341
  getQueryState(e) {
608
- var n;
342
+ var r;
609
343
  const t = this.defaultQueryOptions({ queryKey: e });
610
- return (n = w(this, F).get(t.queryHash)) == null ? void 0 : n.state;
344
+ return (r = l(this, g).get(t.queryHash)) == null ? void 0 : r.state;
611
345
  }
612
346
  removeQueries(e) {
613
- const t = w(this, F);
614
- se.batch(() => {
615
- t.findAll(e).forEach((n) => {
616
- t.remove(n);
347
+ const t = l(this, g);
348
+ w.batch(() => {
349
+ t.findAll(e).forEach((r) => {
350
+ t.remove(r);
617
351
  });
618
352
  });
619
353
  }
620
354
  resetQueries(e, t) {
621
- const n = w(this, F), r = {
355
+ const r = l(this, g), s = {
622
356
  type: "active",
623
357
  ...e
624
358
  };
625
- return se.batch(() => (n.findAll(e).forEach((o) => {
626
- o.reset();
627
- }), this.refetchQueries(r, t)));
359
+ return w.batch(() => (r.findAll(e).forEach((n) => {
360
+ n.reset();
361
+ }), this.refetchQueries(s, t)));
628
362
  }
629
363
  cancelQueries(e = {}, t = {}) {
630
- const n = { revert: !0, ...t }, r = se.batch(
631
- () => w(this, F).findAll(e).map((o) => o.cancel(n))
364
+ const r = { revert: !0, ...t }, s = w.batch(
365
+ () => l(this, g).findAll(e).map((n) => n.cancel(r))
632
366
  );
633
- return Promise.all(r).then(be).catch(be);
367
+ return Promise.all(s).then(M).catch(M);
634
368
  }
635
369
  invalidateQueries(e = {}, t = {}) {
636
- return se.batch(() => {
637
- if (w(this, F).findAll(e).forEach((r) => {
638
- r.invalidate();
370
+ return w.batch(() => {
371
+ if (l(this, g).findAll(e).forEach((s) => {
372
+ s.invalidate();
639
373
  }), e.refetchType === "none")
640
374
  return Promise.resolve();
641
- const n = {
375
+ const r = {
642
376
  ...e,
643
377
  type: e.refetchType ?? e.type ?? "active"
644
378
  };
645
- return this.refetchQueries(n, t);
379
+ return this.refetchQueries(r, t);
646
380
  });
647
381
  }
648
382
  refetchQueries(e = {}, t) {
649
- const n = {
383
+ const r = {
650
384
  ...t,
651
385
  cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
652
- }, r = se.batch(
653
- () => w(this, F).findAll(e).filter((o) => !o.isDisabled()).map((o) => {
654
- let s = o.fetch(void 0, n);
655
- return n.throwOnError || (s = s.catch(be)), o.state.fetchStatus === "paused" ? Promise.resolve() : s;
386
+ }, s = w.batch(
387
+ () => l(this, g).findAll(e).filter((n) => !n.isDisabled()).map((n) => {
388
+ let o = n.fetch(void 0, r);
389
+ return r.throwOnError || (o = o.catch(M)), n.state.fetchStatus === "paused" ? Promise.resolve() : o;
656
390
  })
657
391
  );
658
- return Promise.all(r).then(be);
392
+ return Promise.all(s).then(M);
659
393
  }
660
394
  fetchQuery(e) {
661
395
  const t = this.defaultQueryOptions(e);
662
396
  t.retry === void 0 && (t.retry = !1);
663
- const n = w(this, F).build(this, t);
664
- return n.isStaleByTime(
665
- xn(t.staleTime, n)
666
- ) ? n.fetch(t) : Promise.resolve(n.state.data);
397
+ const r = l(this, g).build(this, t);
398
+ return r.isStaleByTime(
399
+ Ee(t.staleTime, r)
400
+ ) ? r.fetch(t) : Promise.resolve(r.state.data);
667
401
  }
668
402
  prefetchQuery(e) {
669
- return this.fetchQuery(e).then(be).catch(be);
403
+ return this.fetchQuery(e).then(M).catch(M);
670
404
  }
671
405
  fetchInfiniteQuery(e) {
672
- return e.behavior = Sn(e.pages), this.fetchQuery(e);
406
+ return e.behavior = Me(e.pages), this.fetchQuery(e);
673
407
  }
674
408
  prefetchInfiniteQuery(e) {
675
- return this.fetchInfiniteQuery(e).then(be).catch(be);
409
+ return this.fetchInfiniteQuery(e).then(M).catch(M);
676
410
  }
677
411
  ensureInfiniteQueryData(e) {
678
- return e.behavior = Sn(e.pages), this.ensureQueryData(e);
412
+ return e.behavior = Me(e.pages), this.ensureQueryData(e);
679
413
  }
680
414
  resumePausedMutations() {
681
- return wn.isOnline() ? w(this, Pe).resumePausedMutations() : Promise.resolve();
415
+ return Pe.isOnline() ? l(this, T).resumePausedMutations() : Promise.resolve();
682
416
  }
683
417
  getQueryCache() {
684
- return w(this, F);
418
+ return l(this, g);
685
419
  }
686
420
  getMutationCache() {
687
- return w(this, Pe);
421
+ return l(this, T);
688
422
  }
689
423
  getDefaultOptions() {
690
- return w(this, je);
424
+ return l(this, I);
691
425
  }
692
426
  setDefaultOptions(e) {
693
- X(this, je, e);
427
+ y(this, I, e);
694
428
  }
695
429
  setQueryDefaults(e, t) {
696
- w(this, Be).set(yn(e), {
430
+ l(this, B).set(ke(e), {
697
431
  queryKey: e,
698
432
  defaultOptions: t
699
433
  });
700
434
  }
701
435
  getQueryDefaults(e) {
702
- const t = [...w(this, Be).values()];
703
- let n = {};
704
- return t.forEach((r) => {
705
- bn(e, r.queryKey) && (n = { ...n, ...r.defaultOptions });
706
- }), n;
436
+ const t = [...l(this, B).values()];
437
+ let r = {};
438
+ return t.forEach((s) => {
439
+ Ae(e, s.queryKey) && (r = { ...r, ...s.defaultOptions });
440
+ }), r;
707
441
  }
708
442
  setMutationDefaults(e, t) {
709
- w(this, He).set(yn(e), {
443
+ l(this, H).set(ke(e), {
710
444
  mutationKey: e,
711
445
  defaultOptions: t
712
446
  });
713
447
  }
714
448
  getMutationDefaults(e) {
715
- const t = [...w(this, He).values()];
716
- let n = {};
717
- return t.forEach((r) => {
718
- bn(e, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
719
- }), n;
449
+ const t = [...l(this, H).values()];
450
+ let r = {};
451
+ return t.forEach((s) => {
452
+ Ae(e, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
453
+ }), r;
720
454
  }
721
455
  defaultQueryOptions(e) {
722
456
  if (e._defaulted)
723
457
  return e;
724
458
  const t = {
725
- ...w(this, je).queries,
459
+ ...l(this, I).queries,
726
460
  ...this.getQueryDefaults(e.queryKey),
727
461
  ...e,
728
462
  _defaulted: !0
729
463
  };
730
- return t.queryHash || (t.queryHash = Wn(
464
+ return t.queryHash || (t.queryHash = Be(
731
465
  t.queryKey,
732
466
  t
733
- )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === $o && (t.enabled = !1), t;
467
+ )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === Rt && (t.enabled = !1), t;
734
468
  }
735
469
  defaultMutationOptions(e) {
736
470
  return e != null && e._defaulted ? e : {
737
- ...w(this, je).mutations,
471
+ ...l(this, I).mutations,
738
472
  ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
739
473
  ...e,
740
474
  _defaulted: !0
741
475
  };
742
476
  }
743
477
  clear() {
744
- w(this, F).clear(), w(this, Pe).clear();
745
- }
746
- }, F = new WeakMap(), Pe = new WeakMap(), je = new WeakMap(), Be = new WeakMap(), He = new WeakMap(), Ne = new WeakMap(), Ue = new WeakMap(), ze = new WeakMap(), _n);
747
- const Ts = Kn(null), Mt = {
748
- didCatch: !1,
749
- error: null
750
- };
751
- class _s extends bo {
752
- constructor(t) {
753
- super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Mt;
754
- }
755
- static getDerivedStateFromError(t) {
756
- return {
757
- didCatch: !0,
758
- error: t
759
- };
478
+ l(this, g).clear(), l(this, T).clear();
760
479
  }
761
- resetErrorBoundary() {
762
- const {
763
- error: t
764
- } = this.state;
765
- if (t !== null) {
766
- for (var n, r, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
767
- s[i] = arguments[i];
768
- (n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
769
- args: s,
770
- reason: "imperative-api"
771
- }), this.setState(Mt);
480
+ }, g = new WeakMap(), T = new WeakMap(), I = new WeakMap(), B = new WeakMap(), H = new WeakMap(), _ = new WeakMap(), L = new WeakMap(), U = new WeakMap(), Qe);
481
+ function Pr(e) {
482
+ return e;
483
+ }
484
+ function Re(e, t, r) {
485
+ var u, d;
486
+ if (typeof t != "object" || t === null)
487
+ return;
488
+ const s = e.getMutationCache(), n = e.getQueryCache(), o = ((u = r == null ? void 0 : r.defaultOptions) == null ? void 0 : u.deserializeData) ?? ((d = e.getDefaultOptions().hydrate) == null ? void 0 : d.deserializeData) ?? Pr, i = t.mutations || [], c = t.queries || [];
489
+ i.forEach(({ state: x, ...m }) => {
490
+ var f, v;
491
+ s.build(
492
+ e,
493
+ {
494
+ ...(f = e.getDefaultOptions().hydrate) == null ? void 0 : f.mutations,
495
+ ...(v = r == null ? void 0 : r.defaultOptions) == null ? void 0 : v.mutations,
496
+ ...m
497
+ },
498
+ x
499
+ );
500
+ }), c.forEach(({ queryKey: x, state: m, queryHash: f, meta: v, promise: p }) => {
501
+ var Y, K;
502
+ let h = n.get(f);
503
+ const S = m.data === void 0 ? m.data : o(m.data);
504
+ if (h) {
505
+ if (h.state.dataUpdatedAt < m.dataUpdatedAt) {
506
+ const { fetchStatus: b, ...P } = m;
507
+ h.setState({
508
+ ...P,
509
+ data: S
510
+ });
511
+ }
512
+ } else
513
+ h = n.build(
514
+ e,
515
+ {
516
+ ...(Y = e.getDefaultOptions().hydrate) == null ? void 0 : Y.queries,
517
+ ...(K = r == null ? void 0 : r.defaultOptions) == null ? void 0 : K.queries,
518
+ queryKey: x,
519
+ queryHash: f,
520
+ meta: v
521
+ },
522
+ // Reset fetch status to idle to avoid
523
+ // query being stuck in fetching state upon hydration
524
+ {
525
+ ...m,
526
+ data: S,
527
+ fetchStatus: "idle"
528
+ }
529
+ );
530
+ if (p) {
531
+ const b = Promise.resolve(p).then(o);
532
+ h.fetch(void 0, { initialPromise: b });
772
533
  }
773
- }
774
- componentDidCatch(t, n) {
775
- var r, o;
776
- (r = (o = this.props).onError) === null || r === void 0 || r.call(o, t, n);
777
- }
778
- componentDidUpdate(t, n) {
779
- const {
780
- didCatch: r
781
- } = this.state, {
782
- resetKeys: o
783
- } = this.props;
784
- if (r && n.error !== null && Os(t.resetKeys, o)) {
785
- var s, i;
786
- (s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
787
- next: o,
788
- prev: t.resetKeys,
789
- reason: "keys"
790
- }), this.setState(Mt);
534
+ });
535
+ }
536
+ var Er = ({
537
+ children: e,
538
+ options: t = {},
539
+ state: r,
540
+ queryClient: s
541
+ }) => {
542
+ const n = Tt(s), [o, i] = G.useState(), c = G.useRef(t);
543
+ return c.current = t, G.useMemo(() => {
544
+ if (r) {
545
+ if (typeof r != "object")
546
+ return;
547
+ const u = n.getQueryCache(), d = r.queries || [], x = [], m = [];
548
+ for (const f of d) {
549
+ const v = u.get(f.queryHash);
550
+ if (!v)
551
+ x.push(f);
552
+ else {
553
+ const p = f.state.dataUpdatedAt > v.state.dataUpdatedAt, h = o == null ? void 0 : o.find(
554
+ (S) => S.queryHash === f.queryHash
555
+ );
556
+ p && (!h || f.state.dataUpdatedAt > h.state.dataUpdatedAt) && m.push(f);
557
+ }
558
+ }
559
+ x.length > 0 && Re(n, { queries: x }, c.current), m.length > 0 && i(
560
+ (f) => f ? [...f, ...m] : m
561
+ );
791
562
  }
792
- }
793
- render() {
794
- const {
795
- children: t,
796
- fallbackRender: n,
797
- FallbackComponent: r,
798
- fallback: o
799
- } = this.props, {
800
- didCatch: s,
801
- error: i
802
- } = this.state;
803
- let l = t;
804
- if (s) {
805
- const u = {
806
- error: i,
807
- resetErrorBoundary: this.resetErrorBoundary
808
- };
809
- if (typeof n == "function")
810
- l = n(u);
811
- else if (r)
812
- l = mn(r, u);
813
- else if (o === null || So(o))
814
- l = o;
815
- else
816
- throw i;
563
+ }, [n, o, r]), G.useEffect(() => {
564
+ o && (Re(n, { queries: o }, c.current), i(void 0));
565
+ }, [n, o]), e;
566
+ }, W = {};
567
+ const kr = /* @__PURE__ */ ge($t), Ar = /* @__PURE__ */ ge(Vt), Or = /* @__PURE__ */ ge(yt);
568
+ Object.defineProperty(W, "__esModule", { value: !0 });
569
+ var Mr = zt, A = kr, ye = Ar, D = Or;
570
+ function Dr(e) {
571
+ if (e && e.__esModule) return e;
572
+ var t = /* @__PURE__ */ Object.create(null);
573
+ return e && Object.keys(e).forEach(function(r) {
574
+ if (r !== "default") {
575
+ var s = Object.getOwnPropertyDescriptor(e, r);
576
+ Object.defineProperty(t, r, s.get ? s : {
577
+ enumerable: !0,
578
+ get: function() {
579
+ return e[r];
580
+ }
581
+ });
817
582
  }
818
- return mn(Ts.Provider, {
819
- value: {
820
- didCatch: s,
821
- error: i,
822
- resetErrorBoundary: this.resetErrorBoundary
823
- }
824
- }, l);
825
- }
583
+ }), t.default = e, Object.freeze(t);
826
584
  }
827
- function Os() {
828
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
829
- return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
585
+ var E = /* @__PURE__ */ Dr(Mr);
586
+ function Rr({
587
+ basename: e,
588
+ children: t,
589
+ location: r = "/",
590
+ future: s
591
+ }) {
592
+ typeof r == "string" && (r = D.parsePath(r));
593
+ let n = A.Action.Pop, o = {
594
+ pathname: r.pathname || "/",
595
+ search: r.search || "",
596
+ hash: r.hash || "",
597
+ state: r.state != null ? r.state : null,
598
+ key: r.key || "default"
599
+ }, i = et();
600
+ return /* @__PURE__ */ E.createElement(D.Router, {
601
+ basename: e,
602
+ children: t,
603
+ location: o,
604
+ navigationType: n,
605
+ navigator: i,
606
+ future: s,
607
+ static: !0
608
+ });
830
609
  }
831
- const Is = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", As = (e) => "getRoutes" in e && typeof e.getRoutes == "function", ks = (e) => "renderSearch" in e && typeof e.renderSearch == "function", $s = (e) => "initialize" in e && typeof e.initialize == "function", Fs = (e) => "getHead" in e && typeof e.getHead == "function", Ls = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", Bs = (e) => "getIdentities" in e && typeof e.getIdentities == "function", nr = new Ns();
832
- class Hs {
833
- constructor(t) {
834
- ae(this, "plugins");
835
- ae(this, "sidebars");
836
- ae(this, "topNavigation");
837
- ae(this, "meta");
838
- ae(this, "page");
839
- ae(this, "authentication");
840
- ae(this, "navigationPlugins");
841
- ae(this, "initialize", async () => {
842
- await Promise.all(
843
- this.plugins.filter($s).map((t) => {
844
- var n;
845
- return (n = t.initialize) == null ? void 0 : n.call(t, this);
846
- })
847
- );
848
- });
849
- ae(this, "invalidateCache", async (t) => {
850
- await nr.invalidateQueries({ queryKey: t });
851
- });
852
- ae(this, "getApiIdentities", async () => (await Promise.all(
853
- this.plugins.filter(Bs).map((n) => n.getIdentities(this))
854
- )).flat());
855
- ae(this, "getPluginSidebar", async (t) => (await Promise.all(
856
- this.navigationPlugins.map(
857
- (r) => {
858
- var o;
859
- return (o = r.getSidebar) == null ? void 0 : o.call(r, vt(t));
860
- }
861
- )
862
- )).flatMap((r) => r ?? []));
863
- ae(this, "signRequest", async (t) => {
864
- if (!this.authentication)
865
- throw new Error("No authentication provider configured");
866
- const n = await this.authentication.getAccessToken();
867
- return t.headers.set("Authorization", `Bearer ${n}`), t;
868
- });
869
- this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(As), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
870
- }
871
- }
872
- function Us({ error: e, resetErrorBoundary: t }) {
873
- return /* @__PURE__ */ a.jsx(An, { error: e });
874
- }
875
- const ft = globalThis;
876
- (!ft.requestIdleCallback || !ft.cancelIdleCallback) && (ft.requestIdleCallback = (e) => setTimeout(e, 1), ft.cancelIdleCallback = clearTimeout);
877
- var Tt = ["Enter", " "], zs = ["ArrowDown", "PageUp", "Home"], rr = ["ArrowUp", "PageDown", "End"], Ks = [...zs, ...rr], qs = {
878
- ltr: [...Tt, "ArrowRight"],
879
- rtl: [...Tt, "ArrowLeft"]
880
- }, Qs = {
881
- ltr: ["ArrowLeft"],
882
- rtl: ["ArrowRight"]
883
- }, ot = "Menu", [et, Vs, Gs] = to(ot), [Ae, ar] = kn(ot, [
884
- Gs,
885
- $n,
886
- Jn
887
- ]), st = $n(), or = Jn(), [sr, Te] = Ae(ot), [Ws, it] = Ae(ot), ir = (e) => {
888
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, l = st(t), [u, m] = h.useState(null), f = h.useRef(!1), c = Ft(s), d = ho(o);
889
- return h.useEffect(() => {
890
- const R = () => {
891
- f.current = !0, document.addEventListener("pointerdown", C, { capture: !0, once: !0 }), document.addEventListener("pointermove", C, { capture: !0, once: !0 });
892
- }, C = () => f.current = !1;
893
- return document.addEventListener("keydown", R, { capture: !0 }), () => {
894
- document.removeEventListener("keydown", R, { capture: !0 }), document.removeEventListener("pointerdown", C, { capture: !0 }), document.removeEventListener("pointermove", C, { capture: !0 });
895
- };
896
- }, []), /* @__PURE__ */ a.jsx(Ln, { ...l, children: /* @__PURE__ */ a.jsx(
897
- sr,
898
- {
899
- scope: t,
900
- open: n,
901
- onOpenChange: c,
902
- content: u,
903
- onContentChange: m,
904
- children: /* @__PURE__ */ a.jsx(
905
- Ws,
906
- {
907
- scope: t,
908
- onClose: h.useCallback(() => c(!1), [c]),
909
- isUsingKeyboardRef: f,
910
- dir: d,
911
- modal: i,
912
- children: r
913
- }
914
- )
915
- }
916
- ) });
917
- };
918
- ir.displayName = ot;
919
- var Ys = "MenuAnchor", zt = h.forwardRef(
920
- (e, t) => {
921
- const { __scopeMenu: n, ...r } = e, o = st(n);
922
- return /* @__PURE__ */ a.jsx(no, { ...o, ...r, ref: t });
923
- }
924
- );
925
- zt.displayName = Ys;
926
- var Kt = "MenuPortal", [Xs, lr] = Ae(Kt, {
927
- forceMount: void 0
928
- }), cr = (e) => {
929
- const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Te(Kt, t);
930
- return /* @__PURE__ */ a.jsx(Xs, { scope: t, forceMount: n, children: /* @__PURE__ */ a.jsx(yt, { present: n || s.open, children: /* @__PURE__ */ a.jsx(po, { asChild: !0, container: o, children: r }) }) });
931
- };
932
- cr.displayName = Kt;
933
- var ue = "MenuContent", [Js, qt] = Ae(ue), ur = h.forwardRef(
934
- (e, t) => {
935
- const n = lr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu);
936
- return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(yt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ a.jsx(Zs, { ...o, ref: t }) : /* @__PURE__ */ a.jsx(ei, { ...o, ref: t }) }) }) });
937
- }
938
- ), Zs = h.forwardRef(
939
- (e, t) => {
940
- const n = Te(ue, e.__scopeMenu), r = h.useRef(null), o = rt(t, r);
941
- return h.useEffect(() => {
942
- const s = r.current;
943
- if (s) return ro(s);
944
- }, []), /* @__PURE__ */ a.jsx(
945
- Qt,
946
- {
947
- ...e,
948
- ref: o,
949
- trapFocus: n.open,
950
- disableOutsidePointerEvents: n.open,
951
- disableOutsideScroll: !0,
952
- onFocusOutside: I(
953
- e.onFocusOutside,
954
- (s) => s.preventDefault(),
955
- { checkForDefaultPrevented: !1 }
956
- ),
957
- onDismiss: () => n.onOpenChange(!1)
958
- }
959
- );
960
- }
961
- ), ei = h.forwardRef((e, t) => {
962
- const n = Te(ue, e.__scopeMenu);
963
- return /* @__PURE__ */ a.jsx(
964
- Qt,
965
- {
966
- ...e,
967
- ref: t,
968
- trapFocus: !1,
969
- disableOutsidePointerEvents: !1,
970
- disableOutsideScroll: !1,
971
- onDismiss: () => n.onOpenChange(!1)
972
- }
973
- );
974
- }), Qt = h.forwardRef(
975
- (e, t) => {
976
- const {
977
- __scopeMenu: n,
978
- loop: r = !1,
979
- trapFocus: o,
980
- onOpenAutoFocus: s,
981
- onCloseAutoFocus: i,
982
- disableOutsidePointerEvents: l,
983
- onEntryFocus: u,
984
- onEscapeKeyDown: m,
985
- onPointerDownOutside: f,
986
- onFocusOutside: c,
987
- onInteractOutside: d,
988
- onDismiss: R,
989
- disableOutsideScroll: C,
990
- ...g
991
- } = e, T = Te(ue, n), M = it(ue, n), A = st(n), P = or(n), v = Vs(n), [z, Z] = h.useState(null), b = h.useRef(null), j = rt(t, b, T.onContentChange), D = h.useRef(0), B = h.useRef(""), K = h.useRef(0), W = h.useRef(null), x = h.useRef("right"), V = h.useRef(0), G = C ? co : h.Fragment, te = C ? { as: uo, allowPinchZoom: !0 } : void 0, q = (y) => {
992
- var le, Re;
993
- const Q = B.current + y, ie = v().filter((re) => !re.disabled), de = document.activeElement, pe = (le = ie.find((re) => re.ref.current === de)) == null ? void 0 : le.textValue, Me = ie.map((re) => re.textValue), ke = fi(Me, Q, pe), ye = (Re = ie.find((re) => re.textValue === ke)) == null ? void 0 : Re.ref.current;
994
- (function re($e) {
995
- B.current = $e, window.clearTimeout(D.current), $e !== "" && (D.current = window.setTimeout(() => re(""), 1e3));
996
- })(Q), ye && setTimeout(() => ye.focus());
997
- };
998
- h.useEffect(() => () => window.clearTimeout(D.current), []), ao();
999
- const Y = h.useCallback((y) => {
1000
- var ie, de;
1001
- return x.current === ((ie = W.current) == null ? void 0 : ie.side) && pi(y, (de = W.current) == null ? void 0 : de.area);
1002
- }, []);
1003
- return /* @__PURE__ */ a.jsx(
1004
- Js,
1005
- {
1006
- scope: n,
1007
- searchRef: B,
1008
- onItemEnter: h.useCallback(
1009
- (y) => {
1010
- Y(y) && y.preventDefault();
1011
- },
1012
- [Y]
1013
- ),
1014
- onItemLeave: h.useCallback(
1015
- (y) => {
1016
- var Q;
1017
- Y(y) || ((Q = b.current) == null || Q.focus(), Z(null));
1018
- },
1019
- [Y]
1020
- ),
1021
- onTriggerLeave: h.useCallback(
1022
- (y) => {
1023
- Y(y) && y.preventDefault();
1024
- },
1025
- [Y]
1026
- ),
1027
- pointerGraceTimerRef: K,
1028
- onPointerGraceIntentChange: h.useCallback((y) => {
1029
- W.current = y;
1030
- }, []),
1031
- children: /* @__PURE__ */ a.jsx(G, { ...te, children: /* @__PURE__ */ a.jsx(
1032
- oo,
1033
- {
1034
- asChild: !0,
1035
- trapped: o,
1036
- onMountAutoFocus: I(s, (y) => {
1037
- var Q;
1038
- y.preventDefault(), (Q = b.current) == null || Q.focus({ preventScroll: !0 });
1039
- }),
1040
- onUnmountAutoFocus: i,
1041
- children: /* @__PURE__ */ a.jsx(
1042
- so,
1043
- {
1044
- asChild: !0,
1045
- disableOutsidePointerEvents: l,
1046
- onEscapeKeyDown: m,
1047
- onPointerDownOutside: f,
1048
- onFocusOutside: c,
1049
- onInteractOutside: d,
1050
- onDismiss: R,
1051
- children: /* @__PURE__ */ a.jsx(
1052
- Xo,
1053
- {
1054
- asChild: !0,
1055
- ...P,
1056
- dir: M.dir,
1057
- orientation: "vertical",
1058
- loop: r,
1059
- currentTabStopId: z,
1060
- onCurrentTabStopIdChange: Z,
1061
- onEntryFocus: I(u, (y) => {
1062
- M.isUsingKeyboardRef.current || y.preventDefault();
1063
- }),
1064
- preventScrollOnEntryFocus: !0,
1065
- children: /* @__PURE__ */ a.jsx(
1066
- io,
1067
- {
1068
- role: "menu",
1069
- "aria-orientation": "vertical",
1070
- "data-state": Dr(T.open),
1071
- "data-radix-menu-content": "",
1072
- dir: M.dir,
1073
- ...A,
1074
- ...g,
1075
- ref: j,
1076
- style: { outline: "none", ...g.style },
1077
- onKeyDown: I(g.onKeyDown, (y) => {
1078
- const ie = y.target.closest("[data-radix-menu-content]") === y.currentTarget, de = y.ctrlKey || y.altKey || y.metaKey, pe = y.key.length === 1;
1079
- ie && (y.key === "Tab" && y.preventDefault(), !de && pe && q(y.key));
1080
- const Me = b.current;
1081
- if (y.target !== Me || !Ks.includes(y.key)) return;
1082
- y.preventDefault();
1083
- const ye = v().filter((le) => !le.disabled).map((le) => le.ref.current);
1084
- rr.includes(y.key) && ye.reverse(), ui(ye);
1085
- }),
1086
- onBlur: I(e.onBlur, (y) => {
1087
- y.currentTarget.contains(y.target) || (window.clearTimeout(D.current), B.current = "");
1088
- }),
1089
- onPointerMove: I(
1090
- e.onPointerMove,
1091
- tt((y) => {
1092
- const Q = y.target, ie = V.current !== y.clientX;
1093
- if (y.currentTarget.contains(Q) && ie) {
1094
- const de = y.clientX > V.current ? "right" : "left";
1095
- x.current = de, V.current = y.clientX;
1096
- }
1097
- })
1098
- )
1099
- }
1100
- )
1101
- }
1102
- )
1103
- }
1104
- )
1105
- }
1106
- ) })
1107
- }
1108
- );
1109
- }
1110
- );
1111
- ur.displayName = ue;
1112
- var ti = "MenuGroup", Vt = h.forwardRef(
1113
- (e, t) => {
1114
- const { __scopeMenu: n, ...r } = e;
1115
- return /* @__PURE__ */ a.jsx(Ke.div, { role: "group", ...r, ref: t });
1116
- }
1117
- );
1118
- Vt.displayName = ti;
1119
- var ni = "MenuLabel", dr = h.forwardRef(
1120
- (e, t) => {
1121
- const { __scopeMenu: n, ...r } = e;
1122
- return /* @__PURE__ */ a.jsx(Ke.div, { ...r, ref: t });
1123
- }
1124
- );
1125
- dr.displayName = ni;
1126
- var wt = "MenuItem", Mn = "menu.itemSelect", bt = h.forwardRef(
1127
- (e, t) => {
1128
- const { disabled: n = !1, onSelect: r, ...o } = e, s = h.useRef(null), i = it(wt, e.__scopeMenu), l = qt(wt, e.__scopeMenu), u = rt(t, s), m = h.useRef(!1), f = () => {
1129
- const c = s.current;
1130
- if (!n && c) {
1131
- const d = new CustomEvent(Mn, { bubbles: !0, cancelable: !0 });
1132
- c.addEventListener(Mn, (R) => r == null ? void 0 : r(R), { once: !0 }), fo(c, d), d.defaultPrevented ? m.current = !1 : i.onClose();
1133
- }
610
+ function Tr({
611
+ context: e,
612
+ router: t,
613
+ hydrate: r = !0,
614
+ nonce: s
615
+ }) {
616
+ t && e || (process.env.NODE_ENV !== "production" ? A.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : A.UNSAFE_invariant(!1));
617
+ let n = {
618
+ router: t,
619
+ navigator: et(),
620
+ static: !0,
621
+ staticContext: e,
622
+ basename: e.basename || "/"
623
+ }, o = /* @__PURE__ */ new Map(), i = "";
624
+ if (r !== !1) {
625
+ let u = {
626
+ loaderData: e.loaderData,
627
+ actionData: e.actionData,
628
+ errors: _r(e.errors)
1134
629
  };
1135
- return /* @__PURE__ */ a.jsx(
1136
- fr,
1137
- {
1138
- ...o,
1139
- ref: u,
1140
- disabled: n,
1141
- onClick: I(e.onClick, f),
1142
- onPointerDown: (c) => {
1143
- var d;
1144
- (d = e.onPointerDown) == null || d.call(e, c), m.current = !0;
1145
- },
1146
- onPointerUp: I(e.onPointerUp, (c) => {
1147
- var d;
1148
- m.current || (d = c.currentTarget) == null || d.click();
1149
- }),
1150
- onKeyDown: I(e.onKeyDown, (c) => {
1151
- const d = l.searchRef.current !== "";
1152
- n || d && c.key === " " || Tt.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
1153
- })
1154
- }
1155
- );
1156
- }
1157
- );
1158
- bt.displayName = wt;
1159
- var fr = h.forwardRef(
1160
- (e, t) => {
1161
- const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = qt(wt, n), l = or(n), u = h.useRef(null), m = rt(t, u), [f, c] = h.useState(!1), [d, R] = h.useState("");
1162
- return h.useEffect(() => {
1163
- const C = u.current;
1164
- C && R((C.textContent ?? "").trim());
1165
- }, [s.children]), /* @__PURE__ */ a.jsx(
1166
- et.ItemSlot,
1167
- {
1168
- scope: n,
1169
- disabled: r,
1170
- textValue: o ?? d,
1171
- children: /* @__PURE__ */ a.jsx(Jo, { asChild: !0, ...l, focusable: !r, children: /* @__PURE__ */ a.jsx(
1172
- Ke.div,
1173
- {
1174
- role: "menuitem",
1175
- "data-highlighted": f ? "" : void 0,
1176
- "aria-disabled": r || void 0,
1177
- "data-disabled": r ? "" : void 0,
1178
- ...s,
1179
- ref: m,
1180
- onPointerMove: I(
1181
- e.onPointerMove,
1182
- tt((C) => {
1183
- r ? i.onItemLeave(C) : (i.onItemEnter(C), C.defaultPrevented || C.currentTarget.focus({ preventScroll: !0 }));
1184
- })
1185
- ),
1186
- onPointerLeave: I(
1187
- e.onPointerLeave,
1188
- tt((C) => i.onItemLeave(C))
1189
- ),
1190
- onFocus: I(e.onFocus, () => c(!0)),
1191
- onBlur: I(e.onBlur, () => c(!1))
1192
- }
1193
- ) })
1194
- }
1195
- );
1196
- }
1197
- ), ri = "MenuCheckboxItem", hr = h.forwardRef(
1198
- (e, t) => {
1199
- const { checked: n = !1, onCheckedChange: r, ...o } = e;
1200
- return /* @__PURE__ */ a.jsx(wr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ a.jsx(
1201
- bt,
1202
- {
1203
- role: "menuitemcheckbox",
1204
- "aria-checked": xt(n) ? "mixed" : n,
1205
- ...o,
1206
- ref: t,
1207
- "data-state": Yt(n),
1208
- onSelect: I(
1209
- o.onSelect,
1210
- () => r == null ? void 0 : r(xt(n) ? !0 : !n),
1211
- { checkForDefaultPrevented: !1 }
1212
- )
1213
- }
1214
- ) });
1215
- }
1216
- );
1217
- hr.displayName = ri;
1218
- var pr = "MenuRadioGroup", [ai, oi] = Ae(
1219
- pr,
1220
- { value: void 0, onValueChange: () => {
1221
- } }
1222
- ), mr = h.forwardRef(
1223
- (e, t) => {
1224
- const { value: n, onValueChange: r, ...o } = e, s = Ft(r);
1225
- return /* @__PURE__ */ a.jsx(ai, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ a.jsx(Vt, { ...o, ref: t }) });
1226
- }
1227
- );
1228
- mr.displayName = pr;
1229
- var gr = "MenuRadioItem", vr = h.forwardRef(
1230
- (e, t) => {
1231
- const { value: n, ...r } = e, o = oi(gr, e.__scopeMenu), s = n === o.value;
1232
- return /* @__PURE__ */ a.jsx(wr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ a.jsx(
1233
- bt,
1234
- {
1235
- role: "menuitemradio",
1236
- "aria-checked": s,
1237
- ...r,
1238
- ref: t,
1239
- "data-state": Yt(s),
1240
- onSelect: I(
1241
- r.onSelect,
1242
- () => {
1243
- var i;
1244
- return (i = o.onValueChange) == null ? void 0 : i.call(o, n);
1245
- },
1246
- { checkForDefaultPrevented: !1 }
1247
- )
1248
- }
1249
- ) });
1250
- }
1251
- );
1252
- vr.displayName = gr;
1253
- var Gt = "MenuItemIndicator", [wr, si] = Ae(
1254
- Gt,
1255
- { checked: !1 }
1256
- ), xr = h.forwardRef(
1257
- (e, t) => {
1258
- const { __scopeMenu: n, forceMount: r, ...o } = e, s = si(Gt, n);
1259
- return /* @__PURE__ */ a.jsx(
1260
- yt,
1261
- {
1262
- present: r || xt(s.checked) || s.checked === !0,
1263
- children: /* @__PURE__ */ a.jsx(
1264
- Ke.span,
1265
- {
1266
- ...o,
1267
- ref: t,
1268
- "data-state": Yt(s.checked)
1269
- }
1270
- )
1271
- }
1272
- );
1273
- }
1274
- );
1275
- xr.displayName = Gt;
1276
- var ii = "MenuSeparator", yr = h.forwardRef(
1277
- (e, t) => {
1278
- const { __scopeMenu: n, ...r } = e;
1279
- return /* @__PURE__ */ a.jsx(
1280
- Ke.div,
1281
- {
1282
- role: "separator",
1283
- "aria-orientation": "horizontal",
1284
- ...r,
1285
- ref: t
1286
- }
1287
- );
1288
- }
1289
- );
1290
- yr.displayName = ii;
1291
- var li = "MenuArrow", br = h.forwardRef(
1292
- (e, t) => {
1293
- const { __scopeMenu: n, ...r } = e, o = st(n);
1294
- return /* @__PURE__ */ a.jsx(lo, { ...o, ...r, ref: t });
1295
- }
1296
- );
1297
- br.displayName = li;
1298
- var Wt = "MenuSub", [ci, Sr] = Ae(Wt), Cr = (e) => {
1299
- const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, s = Te(Wt, t), i = st(t), [l, u] = h.useState(null), [m, f] = h.useState(null), c = Ft(o);
1300
- return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ a.jsx(Ln, { ...i, children: /* @__PURE__ */ a.jsx(
1301
- sr,
1302
- {
1303
- scope: t,
1304
- open: r,
1305
- onOpenChange: c,
1306
- content: m,
1307
- onContentChange: f,
1308
- children: /* @__PURE__ */ a.jsx(
1309
- ci,
1310
- {
1311
- scope: t,
1312
- contentId: gt(),
1313
- triggerId: gt(),
1314
- trigger: l,
1315
- onTriggerChange: u,
1316
- children: n
1317
- }
1318
- )
1319
- }
1320
- ) });
1321
- };
1322
- Cr.displayName = Wt;
1323
- var Xe = "MenuSubTrigger", Mr = h.forwardRef(
1324
- (e, t) => {
1325
- const n = Te(Xe, e.__scopeMenu), r = it(Xe, e.__scopeMenu), o = Sr(Xe, e.__scopeMenu), s = qt(Xe, e.__scopeMenu), i = h.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, m = { __scopeMenu: e.__scopeMenu }, f = h.useCallback(() => {
1326
- i.current && window.clearTimeout(i.current), i.current = null;
1327
- }, []);
1328
- return h.useEffect(() => f, [f]), h.useEffect(() => {
1329
- const c = l.current;
1330
- return () => {
1331
- window.clearTimeout(c), u(null);
1332
- };
1333
- }, [l, u]), /* @__PURE__ */ a.jsx(zt, { asChild: !0, ...m, children: /* @__PURE__ */ a.jsx(
1334
- fr,
1335
- {
1336
- id: o.triggerId,
1337
- "aria-haspopup": "menu",
1338
- "aria-expanded": n.open,
1339
- "aria-controls": o.contentId,
1340
- "data-state": Dr(n.open),
1341
- ...e,
1342
- ref: Fn(t, o.onTriggerChange),
1343
- onClick: (c) => {
1344
- var d;
1345
- (d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), n.open || n.onOpenChange(!0));
1346
- },
1347
- onPointerMove: I(
1348
- e.onPointerMove,
1349
- tt((c) => {
1350
- s.onItemEnter(c), !c.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
1351
- n.onOpenChange(!0), f();
1352
- }, 100));
1353
- })
1354
- ),
1355
- onPointerLeave: I(
1356
- e.onPointerLeave,
1357
- tt((c) => {
1358
- var R, C;
1359
- f();
1360
- const d = (R = n.content) == null ? void 0 : R.getBoundingClientRect();
1361
- if (d) {
1362
- const g = (C = n.content) == null ? void 0 : C.dataset.side, T = g === "right", M = T ? -5 : 5, A = d[T ? "left" : "right"], P = d[T ? "right" : "left"];
1363
- s.onPointerGraceIntentChange({
1364
- area: [
1365
- // Apply a bleed on clientX to ensure that our exit point is
1366
- // consistently within polygon bounds
1367
- { x: c.clientX + M, y: c.clientY },
1368
- { x: A, y: d.top },
1369
- { x: P, y: d.top },
1370
- { x: P, y: d.bottom },
1371
- { x: A, y: d.bottom }
1372
- ],
1373
- side: g
1374
- }), window.clearTimeout(l.current), l.current = window.setTimeout(
1375
- () => s.onPointerGraceIntentChange(null),
1376
- 300
1377
- );
1378
- } else {
1379
- if (s.onTriggerLeave(c), c.defaultPrevented) return;
1380
- s.onPointerGraceIntentChange(null);
1381
- }
1382
- })
1383
- ),
1384
- onKeyDown: I(e.onKeyDown, (c) => {
1385
- var R;
1386
- const d = s.searchRef.current !== "";
1387
- e.disabled || d && c.key === " " || qs[r.dir].includes(c.key) && (n.onOpenChange(!0), (R = n.content) == null || R.focus(), c.preventDefault());
1388
- })
1389
- }
1390
- ) });
1391
- }
1392
- );
1393
- Mr.displayName = Xe;
1394
- var Rr = "MenuSubContent", Er = h.forwardRef(
1395
- (e, t) => {
1396
- const n = lr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu), l = Sr(Rr, e.__scopeMenu), u = h.useRef(null), m = rt(t, u);
1397
- return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(yt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(
1398
- Qt,
1399
- {
1400
- id: l.contentId,
1401
- "aria-labelledby": l.triggerId,
1402
- ...o,
1403
- ref: m,
1404
- align: "start",
1405
- side: i.dir === "rtl" ? "left" : "right",
1406
- disableOutsidePointerEvents: !1,
1407
- disableOutsideScroll: !1,
1408
- trapFocus: !1,
1409
- onOpenAutoFocus: (f) => {
1410
- var c;
1411
- i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), f.preventDefault();
1412
- },
1413
- onCloseAutoFocus: (f) => f.preventDefault(),
1414
- onFocusOutside: I(e.onFocusOutside, (f) => {
1415
- f.target !== l.trigger && s.onOpenChange(!1);
1416
- }),
1417
- onEscapeKeyDown: I(e.onEscapeKeyDown, (f) => {
1418
- i.onClose(), f.preventDefault();
1419
- }),
1420
- onKeyDown: I(e.onKeyDown, (f) => {
1421
- var R;
1422
- const c = f.currentTarget.contains(f.target), d = Qs[i.dir].includes(f.key);
1423
- c && d && (s.onOpenChange(!1), (R = l.trigger) == null || R.focus(), f.preventDefault());
1424
- })
1425
- }
1426
- ) }) }) });
1427
- }
1428
- );
1429
- Er.displayName = Rr;
1430
- function Dr(e) {
1431
- return e ? "open" : "closed";
1432
- }
1433
- function xt(e) {
1434
- return e === "indeterminate";
1435
- }
1436
- function Yt(e) {
1437
- return xt(e) ? "indeterminate" : e ? "checked" : "unchecked";
1438
- }
1439
- function ui(e) {
1440
- const t = document.activeElement;
1441
- for (const n of e)
1442
- if (n === t || (n.focus(), document.activeElement !== t)) return;
1443
- }
1444
- function di(e, t) {
1445
- return e.map((n, r) => e[(t + r) % e.length]);
1446
- }
1447
- function fi(e, t, n) {
1448
- const o = t.length > 1 && Array.from(t).every((m) => m === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
1449
- let i = di(e, Math.max(s, 0));
1450
- o.length === 1 && (i = i.filter((m) => m !== n));
1451
- const u = i.find(
1452
- (m) => m.toLowerCase().startsWith(o.toLowerCase())
1453
- );
1454
- return u !== n ? u : void 0;
1455
- }
1456
- function hi(e, t) {
1457
- const { x: n, y: r } = e;
1458
- let o = !1;
1459
- for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
1460
- const l = t[s].x, u = t[s].y, m = t[i].x, f = t[i].y;
1461
- u > r != f > r && n < (m - l) * (r - u) / (f - u) + l && (o = !o);
1462
- }
1463
- return o;
1464
- }
1465
- function pi(e, t) {
1466
- if (!t) return !1;
1467
- const n = { x: e.clientX, y: e.clientY };
1468
- return hi(n, t);
1469
- }
1470
- function tt(e) {
1471
- return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1472
- }
1473
- var mi = ir, gi = zt, vi = cr, wi = ur, xi = Vt, yi = dr, bi = bt, Si = hr, Ci = mr, Mi = vr, Ri = xr, Ei = yr, Di = br, Pi = Cr, ji = Mr, Ni = Er, Xt = "DropdownMenu", [Ti, dc] = kn(
1474
- Xt,
1475
- [ar]
1476
- ), J = ar(), [_i, Pr] = Ti(Xt), jr = (e) => {
1477
- const {
1478
- __scopeDropdownMenu: t,
1479
- children: n,
1480
- dir: r,
1481
- open: o,
1482
- defaultOpen: s,
1483
- onOpenChange: i,
1484
- modal: l = !0
1485
- } = e, u = J(t), m = h.useRef(null), [f = !1, c] = Bn({
1486
- prop: o,
1487
- defaultProp: s,
1488
- onChange: i
1489
- });
1490
- return /* @__PURE__ */ a.jsx(
1491
- _i,
1492
- {
1493
- scope: t,
1494
- triggerId: gt(),
1495
- triggerRef: m,
1496
- contentId: gt(),
1497
- open: f,
1498
- onOpenChange: c,
1499
- onOpenToggle: h.useCallback(() => c((d) => !d), [c]),
1500
- modal: l,
1501
- children: /* @__PURE__ */ a.jsx(mi, { ...u, open: f, onOpenChange: c, dir: r, modal: l, children: n })
1502
- }
1503
- );
1504
- };
1505
- jr.displayName = Xt;
1506
- var Nr = "DropdownMenuTrigger", Tr = h.forwardRef(
1507
- (e, t) => {
1508
- const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Pr(Nr, n), i = J(n);
1509
- return /* @__PURE__ */ a.jsx(gi, { asChild: !0, ...i, children: /* @__PURE__ */ a.jsx(
1510
- Ke.button,
1511
- {
1512
- type: "button",
1513
- id: s.triggerId,
1514
- "aria-haspopup": "menu",
1515
- "aria-expanded": s.open,
1516
- "aria-controls": s.open ? s.contentId : void 0,
1517
- "data-state": s.open ? "open" : "closed",
1518
- "data-disabled": r ? "" : void 0,
1519
- disabled: r,
1520
- ...o,
1521
- ref: Fn(t, s.triggerRef),
1522
- onPointerDown: I(e.onPointerDown, (l) => {
1523
- !r && l.button === 0 && l.ctrlKey === !1 && (s.onOpenToggle(), s.open || l.preventDefault());
1524
- }),
1525
- onKeyDown: I(e.onKeyDown, (l) => {
1526
- r || (["Enter", " "].includes(l.key) && s.onOpenToggle(), l.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(l.key) && l.preventDefault());
1527
- })
1528
- }
1529
- ) });
1530
- }
1531
- );
1532
- Tr.displayName = Nr;
1533
- var Oi = "DropdownMenuPortal", _r = (e) => {
1534
- const { __scopeDropdownMenu: t, ...n } = e, r = J(t);
1535
- return /* @__PURE__ */ a.jsx(vi, { ...r, ...n });
1536
- };
1537
- _r.displayName = Oi;
1538
- var Or = "DropdownMenuContent", Ir = h.forwardRef(
1539
- (e, t) => {
1540
- const { __scopeDropdownMenu: n, ...r } = e, o = Pr(Or, n), s = J(n), i = h.useRef(!1);
1541
- return /* @__PURE__ */ a.jsx(
1542
- wi,
1543
- {
1544
- id: o.contentId,
1545
- "aria-labelledby": o.triggerId,
1546
- ...s,
1547
- ...r,
1548
- ref: t,
1549
- onCloseAutoFocus: I(e.onCloseAutoFocus, (l) => {
1550
- var u;
1551
- i.current || (u = o.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
1552
- }),
1553
- onInteractOutside: I(e.onInteractOutside, (l) => {
1554
- const u = l.detail.originalEvent, m = u.button === 0 && u.ctrlKey === !0, f = u.button === 2 || m;
1555
- (!o.modal || f) && (i.current = !0);
1556
- }),
1557
- style: {
1558
- ...e.style,
1559
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1560
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1561
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1562
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1563
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1564
- }
1565
- }
1566
- );
1567
- }
1568
- );
1569
- Ir.displayName = Or;
1570
- var Ii = "DropdownMenuGroup", Ai = h.forwardRef(
1571
- (e, t) => {
1572
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1573
- return /* @__PURE__ */ a.jsx(xi, { ...o, ...r, ref: t });
1574
- }
1575
- );
1576
- Ai.displayName = Ii;
1577
- var ki = "DropdownMenuLabel", Ar = h.forwardRef(
1578
- (e, t) => {
1579
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1580
- return /* @__PURE__ */ a.jsx(yi, { ...o, ...r, ref: t });
1581
- }
1582
- );
1583
- Ar.displayName = ki;
1584
- var $i = "DropdownMenuItem", kr = h.forwardRef(
1585
- (e, t) => {
1586
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1587
- return /* @__PURE__ */ a.jsx(bi, { ...o, ...r, ref: t });
1588
- }
1589
- );
1590
- kr.displayName = $i;
1591
- var Fi = "DropdownMenuCheckboxItem", $r = h.forwardRef((e, t) => {
1592
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1593
- return /* @__PURE__ */ a.jsx(Si, { ...o, ...r, ref: t });
1594
- });
1595
- $r.displayName = Fi;
1596
- var Li = "DropdownMenuRadioGroup", Bi = h.forwardRef((e, t) => {
1597
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1598
- return /* @__PURE__ */ a.jsx(Ci, { ...o, ...r, ref: t });
1599
- });
1600
- Bi.displayName = Li;
1601
- var Hi = "DropdownMenuRadioItem", Fr = h.forwardRef((e, t) => {
1602
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1603
- return /* @__PURE__ */ a.jsx(Mi, { ...o, ...r, ref: t });
1604
- });
1605
- Fr.displayName = Hi;
1606
- var Ui = "DropdownMenuItemIndicator", Lr = h.forwardRef((e, t) => {
1607
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1608
- return /* @__PURE__ */ a.jsx(Ri, { ...o, ...r, ref: t });
1609
- });
1610
- Lr.displayName = Ui;
1611
- var zi = "DropdownMenuSeparator", Br = h.forwardRef((e, t) => {
1612
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1613
- return /* @__PURE__ */ a.jsx(Ei, { ...o, ...r, ref: t });
1614
- });
1615
- Br.displayName = zi;
1616
- var Ki = "DropdownMenuArrow", qi = h.forwardRef(
1617
- (e, t) => {
1618
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1619
- return /* @__PURE__ */ a.jsx(Di, { ...o, ...r, ref: t });
1620
- }
1621
- );
1622
- qi.displayName = Ki;
1623
- var Qi = (e) => {
1624
- const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i = J(t), [l = !1, u] = Bn({
1625
- prop: r,
1626
- defaultProp: s,
1627
- onChange: o
1628
- });
1629
- return /* @__PURE__ */ a.jsx(Pi, { ...i, open: l, onOpenChange: u, children: n });
1630
- }, Vi = "DropdownMenuSubTrigger", Hr = h.forwardRef((e, t) => {
1631
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1632
- return /* @__PURE__ */ a.jsx(ji, { ...o, ...r, ref: t });
1633
- });
1634
- Hr.displayName = Vi;
1635
- var Gi = "DropdownMenuSubContent", Ur = h.forwardRef((e, t) => {
1636
- const { __scopeDropdownMenu: n, ...r } = e, o = J(n);
1637
- return /* @__PURE__ */ a.jsx(
1638
- Ni,
1639
- {
1640
- ...o,
1641
- ...r,
1642
- ref: t,
1643
- style: {
1644
- ...e.style,
1645
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1646
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1647
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1648
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1649
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1650
- }
1651
- }
1652
- );
1653
- });
1654
- Ur.displayName = Gi;
1655
- var Wi = jr, Yi = Tr, zr = _r, Kr = Ir, qr = Ar, Qr = kr, Vr = $r, Gr = Fr, Wr = Lr, Yr = Br, Xi = Qi, Xr = Hr, Jr = Ur;
1656
- const Ji = Wi, Zi = Yi, el = zr, tl = Xi, Zr = h.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
1657
- Xr,
1658
- {
1659
- ref: o,
1660
- className: $(
1661
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
1662
- t && "pl-8",
1663
- e
1664
- ),
1665
- ...r,
1666
- children: [
1667
- n,
1668
- /* @__PURE__ */ a.jsx(Xn, { className: "ml-auto h-4 w-4" })
1669
- ]
1670
- }
1671
- ));
1672
- Zr.displayName = Xr.displayName;
1673
- const ea = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
1674
- Jr,
1675
- {
1676
- ref: n,
1677
- className: $(
1678
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1679
- e
1680
- ),
1681
- ...t
1682
- }
1683
- ));
1684
- ea.displayName = Jr.displayName;
1685
- const ta = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ a.jsx(zr, { children: /* @__PURE__ */ a.jsx(
1686
- Kr,
1687
- {
1688
- ref: r,
1689
- sideOffset: t,
1690
- className: $(
1691
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
1692
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1693
- e
1694
- ),
1695
- ...n
1696
- }
1697
- ) }));
1698
- ta.displayName = Kr.displayName;
1699
- const na = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
1700
- Qr,
1701
- {
1702
- ref: r,
1703
- className: $(
1704
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1705
- t && "pl-8",
1706
- e
1707
- ),
1708
- ...n
1709
- }
1710
- ));
1711
- na.displayName = Qr.displayName;
1712
- const nl = h.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
1713
- Vr,
1714
- {
1715
- ref: o,
1716
- className: $(
1717
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1718
- e
1719
- ),
1720
- checked: n,
1721
- ...r,
1722
- children: [
1723
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Wr, { children: /* @__PURE__ */ a.jsx(Uo, { className: "h-4 w-4" }) }) }),
1724
- t
1725
- ]
1726
- }
1727
- ));
1728
- nl.displayName = Vr.displayName;
1729
- const rl = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ a.jsxs(
1730
- Gr,
1731
- {
1732
- ref: r,
1733
- className: $(
1734
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1735
- e
1736
- ),
1737
- ...n,
1738
- children: [
1739
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Wr, { children: /* @__PURE__ */ a.jsx(zo, { className: "h-4 w-4 fill-current" }) }) }),
1740
- t
1741
- ]
1742
- }
1743
- ));
1744
- rl.displayName = Gr.displayName;
1745
- const ra = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
1746
- qr,
1747
- {
1748
- ref: r,
1749
- className: $(
1750
- "px-2 py-1.5 text-sm font-semibold",
1751
- t && "pl-8",
1752
- e
1753
- ),
1754
- ...n
1755
- }
1756
- ));
1757
- ra.displayName = qr.displayName;
1758
- const aa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
1759
- Yr,
1760
- {
1761
- ref: n,
1762
- className: $("-mx-1 my-1 h-px bg-muted", e),
1763
- ...t
630
+ i = `window.__staticRouterHydrationData = JSON.parse(${Hr(JSON.stringify(JSON.stringify(u)))});`;
1764
631
  }
1765
- ));
1766
- aa.displayName = Yr.displayName;
1767
- const Rn = {
1768
- info: "bg-blue-500",
1769
- note: "bg-gray-500",
1770
- tip: "bg-green-600",
1771
- caution: "bg-orange-500",
1772
- danger: "bg-rose-500"
1773
- }, al = () => {
1774
- const { page: e } = qe(), [t, n] = Ie(!0);
1775
- if (!(e != null && e.banner) || !t)
1776
- return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
1777
- const r = e.banner.color && e.banner.color in Rn ? Rn[e.banner.color] : e.banner.color ? void 0 : "bg-primary", o = r ? {} : { backgroundColor: e.banner.color };
1778
- return /* @__PURE__ */ a.jsxs(
1779
- "div",
1780
- {
1781
- className: $(
1782
- "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
1783
- r
1784
- ),
1785
- style: o,
1786
- children: [
1787
- /* @__PURE__ */ a.jsx("div", { className: "w-full", children: e.banner.message }),
1788
- e.banner.dismissible && /* @__PURE__ */ a.jsx(
1789
- "button",
1790
- {
1791
- type: "button",
1792
- className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
1793
- onClick: () => n(!1),
1794
- children: /* @__PURE__ */ a.jsx(Ko, { size: 16 })
1795
- }
1796
- )
1797
- ]
632
+ let {
633
+ state: c
634
+ } = n.router;
635
+ return /* @__PURE__ */ E.createElement(E.Fragment, null, /* @__PURE__ */ E.createElement(D.UNSAFE_DataRouterContext.Provider, {
636
+ value: n
637
+ }, /* @__PURE__ */ E.createElement(D.UNSAFE_DataRouterStateContext.Provider, {
638
+ value: c
639
+ }, /* @__PURE__ */ E.createElement(D.UNSAFE_FetchersContext.Provider, {
640
+ value: o
641
+ }, /* @__PURE__ */ E.createElement(D.UNSAFE_ViewTransitionContext.Provider, {
642
+ value: {
643
+ isTransitioning: !1
1798
644
  }
1799
- );
1800
- };
1801
- function ol(e) {
1802
- if (typeof document > "u") return;
1803
- let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
1804
- n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
1805
- }
1806
- const oa = p.createContext({
1807
- drawerRef: {
1808
- current: null
1809
- },
1810
- overlayRef: {
1811
- current: null
1812
- },
1813
- onPress: () => {
1814
- },
1815
- onRelease: () => {
1816
- },
1817
- onDrag: () => {
1818
- },
1819
- onNestedDrag: () => {
1820
- },
1821
- onNestedOpenChange: () => {
1822
- },
1823
- onNestedRelease: () => {
1824
- },
1825
- openProp: void 0,
1826
- dismissible: !1,
1827
- isOpen: !1,
1828
- isDragging: !1,
1829
- keyboardIsOpen: {
1830
- current: !1
1831
- },
1832
- snapPointsOffset: null,
1833
- snapPoints: null,
1834
- handleOnly: !1,
1835
- modal: !1,
1836
- shouldFade: !1,
1837
- activeSnapPoint: null,
1838
- onOpenChange: () => {
1839
- },
1840
- setActiveSnapPoint: () => {
1841
- },
1842
- closeDrawer: () => {
1843
- },
1844
- direction: "bottom",
1845
- shouldAnimate: {
1846
- current: !0
1847
- },
1848
- shouldScaleBackground: !1,
1849
- setBackgroundColorOnScale: !0,
1850
- noBodyStyles: !1,
1851
- container: null,
1852
- autoFocus: !1
1853
- }), Qe = () => {
1854
- const e = p.useContext(oa);
1855
- if (!e)
1856
- throw new Error("useDrawerContext must be used within a Drawer.Root");
1857
- return e;
1858
- };
1859
- ol(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
1860
- [data-state=closed]
1861
- ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);
1862
- function sl() {
1863
- const e = navigator.userAgent;
1864
- return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || // Android Firefox
1865
- /FxiOS/.test(e));
1866
- }
1867
- function il() {
1868
- return Jt(/^Mac/);
1869
- }
1870
- function ll() {
1871
- return Jt(/^iPhone/);
1872
- }
1873
- function En() {
1874
- return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
1875
- }
1876
- function cl() {
1877
- return Jt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
1878
- il() && navigator.maxTouchPoints > 1;
1879
- }
1880
- function sa() {
1881
- return ll() || cl();
1882
- }
1883
- function Jt(e) {
1884
- return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
1885
- }
1886
- const ul = 24, dl = typeof window < "u" ? Co : Ce;
1887
- function Dn(...e) {
1888
- return (...t) => {
1889
- for (let n of e)
1890
- typeof n == "function" && n(...t);
1891
- };
1892
- }
1893
- const Rt = typeof document < "u" && window.visualViewport;
1894
- function Pn(e) {
1895
- let t = window.getComputedStyle(e);
1896
- return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
1897
- }
1898
- function ia(e) {
1899
- for (Pn(e) && (e = e.parentElement); e && !Pn(e); )
1900
- e = e.parentElement;
1901
- return e || document.scrollingElement || document.documentElement;
1902
- }
1903
- const fl = /* @__PURE__ */ new Set([
1904
- "checkbox",
1905
- "radio",
1906
- "range",
1907
- "color",
1908
- "file",
1909
- "image",
1910
- "button",
1911
- "submit",
1912
- "reset"
1913
- ]);
1914
- let ht = 0, Et;
1915
- function hl(e = {}) {
1916
- let { isDisabled: t } = e;
1917
- dl(() => {
1918
- if (!t)
1919
- return ht++, ht === 1 && sa() && (Et = pl()), () => {
1920
- ht--, ht === 0 && (Et == null || Et());
1921
- };
1922
- }, [
1923
- t
1924
- ]);
1925
- }
1926
- function pl() {
1927
- let e, t = 0, n = (c) => {
1928
- e = ia(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
1929
- }, r = (c) => {
1930
- if (!e || e === document.documentElement || e === document.body) {
1931
- c.preventDefault();
1932
- return;
645
+ }, /* @__PURE__ */ E.createElement(D.Router, {
646
+ basename: n.basename,
647
+ location: c.location,
648
+ navigationType: c.historyAction,
649
+ navigator: n.navigator,
650
+ static: n.static,
651
+ future: {
652
+ v7_relativeSplatPath: t.future.v7_relativeSplatPath
1933
653
  }
1934
- let d = c.changedTouches[0].pageY, R = e.scrollTop, C = e.scrollHeight - e.clientHeight;
1935
- C !== 0 && ((R <= 0 && d > t || R >= C && d < t) && c.preventDefault(), t = d);
1936
- }, o = (c) => {
1937
- let d = c.target;
1938
- _t(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
1939
- d.style.transform = "";
1940
- }));
1941
- }, s = (c) => {
1942
- let d = c.target;
1943
- _t(d) && (d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
1944
- d.style.transform = "", Rt && (Rt.height < window.innerHeight ? requestAnimationFrame(() => {
1945
- jn(d);
1946
- }) : Rt.addEventListener("resize", () => jn(d), {
1947
- once: !0
1948
- }));
1949
- }));
1950
- }, i = () => {
1951
- window.scrollTo(0, 0);
1952
- }, l = window.pageXOffset, u = window.pageYOffset, m = Dn(ml(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
1953
- window.scrollTo(0, 0);
1954
- let f = Dn(We(document, "touchstart", n, {
1955
- passive: !1,
1956
- capture: !0
1957
- }), We(document, "touchmove", r, {
1958
- passive: !1,
1959
- capture: !0
1960
- }), We(document, "touchend", o, {
1961
- passive: !1,
1962
- capture: !0
1963
- }), We(document, "focus", s, !0), We(window, "scroll", i));
1964
- return () => {
1965
- m(), f(), window.scrollTo(l, u);
1966
- };
1967
- }
1968
- function ml(e, t, n) {
1969
- let r = e.style[t];
1970
- return e.style[t] = n, () => {
1971
- e.style[t] = r;
1972
- };
1973
- }
1974
- function We(e, t, n, r) {
1975
- return e.addEventListener(t, n, r), () => {
1976
- e.removeEventListener(t, n, r);
1977
- };
1978
- }
1979
- function jn(e) {
1980
- let t = document.scrollingElement || document.documentElement;
1981
- for (; e && e !== t; ) {
1982
- let n = ia(e);
1983
- if (n !== document.documentElement && n !== document.body && n !== e) {
1984
- let r = n.getBoundingClientRect().top, o = e.getBoundingClientRect().top, s = e.getBoundingClientRect().bottom;
1985
- const i = n.getBoundingClientRect().bottom + ul;
1986
- s > i && (n.scrollTop += o - r);
654
+ }, /* @__PURE__ */ E.createElement(Ir, {
655
+ routes: t.routes,
656
+ future: t.future,
657
+ state: c
658
+ })))))), i ? /* @__PURE__ */ E.createElement("script", {
659
+ suppressHydrationWarning: !0,
660
+ nonce: s,
661
+ dangerouslySetInnerHTML: {
662
+ __html: i
1987
663
  }
1988
- e = n.parentElement;
1989
- }
1990
- }
1991
- function _t(e) {
1992
- return e instanceof HTMLInputElement && !fl.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
1993
- }
1994
- function gl(e, t) {
1995
- typeof e == "function" ? e(t) : e != null && (e.current = t);
664
+ }) : null);
1996
665
  }
1997
- function vl(...e) {
1998
- return (t) => e.forEach((n) => gl(n, t));
666
+ function Ir({
667
+ routes: e,
668
+ future: t,
669
+ state: r
670
+ }) {
671
+ return ye.UNSAFE_useRoutesImpl(e, void 0, r, t);
1999
672
  }
2000
- function la(...e) {
2001
- return h.useCallback(vl(...e), e);
673
+ function _r(e) {
674
+ if (!e) return null;
675
+ let t = Object.entries(e), r = {};
676
+ for (let [s, n] of t)
677
+ A.isRouteErrorResponse(n) ? r[s] = {
678
+ ...n,
679
+ __type: "RouteErrorResponse"
680
+ } : n instanceof Error ? r[s] = {
681
+ message: n.message,
682
+ __type: "Error",
683
+ // If this is a subclass (i.e., ReferenceError), send up the type so we
684
+ // can re-create the same type during hydration.
685
+ ...n.name !== "Error" ? {
686
+ __subType: n.name
687
+ } : {}
688
+ } : r[s] = n;
689
+ return r;
2002
690
  }
2003
- const ca = /* @__PURE__ */ new WeakMap();
2004
- function H(e, t, n = !1) {
2005
- if (!e || !(e instanceof HTMLElement)) return;
2006
- let r = {};
2007
- Object.entries(t).forEach(([o, s]) => {
2008
- if (o.startsWith("--")) {
2009
- e.style.setProperty(o, s);
2010
- return;
691
+ function et() {
692
+ return {
693
+ createHref: tt,
694
+ encodeLocation: rt,
695
+ push(e) {
696
+ throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
697
+ },
698
+ replace(e) {
699
+ throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`);
700
+ },
701
+ go(e) {
702
+ throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`);
703
+ },
704
+ back() {
705
+ throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.");
706
+ },
707
+ forward() {
708
+ throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.");
2011
709
  }
2012
- r[o] = e.style[o], e.style[o] = s;
2013
- }), !n && ca.set(e, r);
2014
- }
2015
- function wl(e, t) {
2016
- if (!e || !(e instanceof HTMLElement)) return;
2017
- let n = ca.get(e);
2018
- n && (e.style[t] = n[t]);
2019
- }
2020
- const U = (e) => {
2021
- switch (e) {
2022
- case "top":
2023
- case "bottom":
2024
- return !0;
2025
- case "left":
2026
- case "right":
2027
- return !1;
2028
- default:
2029
- return e;
2030
- }
2031
- };
2032
- function pt(e, t) {
2033
- if (!e)
2034
- return null;
2035
- const n = window.getComputedStyle(e), r = (
2036
- // @ts-ignore
2037
- n.transform || n.webkitTransform || n.mozTransform
2038
- );
2039
- let o = r.match(/^matrix3d\((.+)\)$/);
2040
- return o ? parseFloat(o[1].split(", ")[U(t) ? 13 : 12]) : (o = r.match(/^matrix\((.+)\)$/), o ? parseFloat(o[1].split(", ")[U(t) ? 5 : 4]) : null);
2041
- }
2042
- function xl(e) {
2043
- return 8 * (Math.log(e + 1) - 2);
2044
- }
2045
- function Dt(e, t) {
2046
- if (!e) return () => {
2047
710
  };
2048
- const n = e.style.cssText;
2049
- return Object.assign(e.style, t), () => {
2050
- e.style.cssText = n;
2051
- };
2052
- }
2053
- function yl(...e) {
2054
- return (...t) => {
2055
- for (const n of e)
2056
- typeof n == "function" && n(...t);
2057
- };
2058
- }
2059
- const k = {
2060
- DURATION: 0.5,
2061
- EASE: [
2062
- 0.32,
2063
- 0.72,
2064
- 0,
2065
- 1
2066
- ]
2067
- }, ua = 0.4, bl = 0.25, Sl = 100, da = 8, Oe = 16, Ot = 26, Pt = "vaul-dragging";
2068
- function fa(e) {
2069
- const t = p.useRef(e);
2070
- return p.useEffect(() => {
2071
- t.current = e;
2072
- }), p.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
2073
711
  }
2074
- function Cl({ defaultProp: e, onChange: t }) {
2075
- const n = p.useState(e), [r] = n, o = p.useRef(r), s = fa(t);
2076
- return p.useEffect(() => {
2077
- o.current !== r && (s(r), o.current = r);
2078
- }, [
2079
- r,
2080
- o,
2081
- s
2082
- ]), n;
2083
- }
2084
- function ha({ prop: e, defaultProp: t, onChange: n = () => {
2085
- } }) {
2086
- const [r, o] = Cl({
2087
- defaultProp: t,
2088
- onChange: n
2089
- }), s = e !== void 0, i = s ? e : r, l = fa(n), u = p.useCallback((m) => {
2090
- if (s) {
2091
- const c = typeof m == "function" ? m(e) : m;
2092
- c !== e && l(c);
2093
- } else
2094
- o(m);
2095
- }, [
2096
- s,
2097
- e,
2098
- o,
2099
- l
2100
- ]);
2101
- return [
2102
- i,
2103
- u
2104
- ];
712
+ function Qr(e, t) {
713
+ return A.createStaticHandler(e, {
714
+ ...t,
715
+ mapRouteProperties: ye.UNSAFE_mapRouteProperties
716
+ });
2105
717
  }
2106
- function Ml({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: o, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom", container: u, snapToSequentialPoint: m }) {
2107
- const [f, c] = ha({
2108
- prop: e,
2109
- defaultProp: n == null ? void 0 : n[0],
2110
- onChange: t
2111
- }), [d, R] = p.useState(typeof window < "u" ? {
2112
- innerWidth: window.innerWidth,
2113
- innerHeight: window.innerHeight
2114
- } : void 0);
2115
- p.useEffect(() => {
2116
- function b() {
2117
- R({
2118
- innerWidth: window.innerWidth,
2119
- innerHeight: window.innerHeight
2120
- });
2121
- }
2122
- return window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
2123
- }, []);
2124
- const C = p.useMemo(() => f === (n == null ? void 0 : n[n.length - 1]) || null, [
2125
- n,
2126
- f
2127
- ]), g = p.useMemo(() => {
2128
- var b;
2129
- return (b = n == null ? void 0 : n.findIndex((j) => j === f)) != null ? b : null;
2130
- }, [
2131
- n,
2132
- f
2133
- ]), T = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === f || !n, M = p.useMemo(() => {
2134
- const b = u ? {
2135
- width: u.getBoundingClientRect().width,
2136
- height: u.getBoundingClientRect().height
2137
- } : typeof window < "u" ? {
2138
- width: window.innerWidth,
2139
- height: window.innerHeight
2140
- } : {
2141
- width: 0,
2142
- height: 0
718
+ function Fr(e, t, r = {}) {
719
+ let s = {}, n = A.UNSAFE_convertRoutesToDataRoutes(e, ye.UNSAFE_mapRouteProperties, void 0, s), o = t.matches.map((c) => {
720
+ let u = s[c.route.id] || c.route;
721
+ return {
722
+ ...c,
723
+ route: u
2143
724
  };
2144
- var j;
2145
- return (j = n == null ? void 0 : n.map((D) => {
2146
- const B = typeof D == "string";
2147
- let K = 0;
2148
- if (B && (K = parseInt(D, 10)), U(l)) {
2149
- const x = B ? K : d ? D * b.height : 0;
2150
- return d ? l === "bottom" ? b.height - x : -b.height + x : x;
2151
- }
2152
- const W = B ? K : d ? D * b.width : 0;
2153
- return d ? l === "right" ? b.width - W : -b.width + W : W;
2154
- })) != null ? j : [];
2155
- }, [
2156
- n,
2157
- d,
2158
- u
2159
- ]), A = p.useMemo(() => g !== null ? M == null ? void 0 : M[g] : null, [
2160
- M,
2161
- g
2162
- ]), P = p.useCallback((b) => {
2163
- var j;
2164
- const D = (j = M == null ? void 0 : M.findIndex((B) => B === b)) != null ? j : null;
2165
- i(D), H(r.current, {
2166
- transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2167
- transform: U(l) ? `translate3d(0, ${b}px, 0)` : `translate3d(${b}px, 0, 0)`
2168
- }), M && D !== M.length - 1 && s !== void 0 && D !== s && D < s ? H(o.current, {
2169
- transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2170
- opacity: "0"
2171
- }) : H(o.current, {
2172
- transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2173
- opacity: "1"
2174
- }), c(n == null ? void 0 : n[Math.max(D, 0)]);
2175
- }, [
2176
- r.current,
2177
- n,
2178
- M,
2179
- s,
2180
- o,
2181
- c
2182
- ]);
2183
- p.useEffect(() => {
2184
- if (f || e) {
2185
- var b;
2186
- const j = (b = n == null ? void 0 : n.findIndex((D) => D === e || D === f)) != null ? b : -1;
2187
- M && j !== -1 && typeof M[j] == "number" && P(M[j]);
2188
- }
2189
- }, [
2190
- f,
2191
- e,
2192
- n,
2193
- M,
2194
- P
2195
- ]);
2196
- function v({ draggedDistance: b, closeDrawer: j, velocity: D, dismissible: B }) {
2197
- if (s === void 0) return;
2198
- const K = l === "bottom" || l === "right" ? (A ?? 0) - b : (A ?? 0) + b, W = g === s - 1, x = g === 0, V = b > 0;
2199
- if (W && H(o.current, {
2200
- transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`
2201
- }), !m && D > 2 && !V) {
2202
- B ? j() : P(M[0]);
2203
- return;
2204
- }
2205
- if (!m && D > 2 && V && M && n) {
2206
- P(M[n.length - 1]);
2207
- return;
2208
- }
2209
- const G = M == null ? void 0 : M.reduce((q, Y) => typeof q != "number" || typeof Y != "number" ? q : Math.abs(Y - K) < Math.abs(q - K) ? Y : q), te = U(l) ? window.innerHeight : window.innerWidth;
2210
- if (D > ua && Math.abs(b) < te * 0.4) {
2211
- const q = V ? 1 : -1;
2212
- if (q > 0 && C && n) {
2213
- P(M[n.length - 1]);
2214
- return;
2215
- }
2216
- if (x && q < 0 && B && j(), g === null) return;
2217
- P(M[g + q]);
2218
- return;
2219
- }
2220
- P(G);
2221
- }
2222
- function z({ draggedDistance: b }) {
2223
- if (A === null) return;
2224
- const j = l === "bottom" || l === "right" ? A - b : A + b;
2225
- (l === "bottom" || l === "right") && j < M[M.length - 1] || (l === "top" || l === "left") && j > M[M.length - 1] || H(r.current, {
2226
- transform: U(l) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
2227
- });
2228
- }
2229
- function Z(b, j) {
2230
- if (!n || typeof g != "number" || !M || s === void 0) return null;
2231
- const D = g === s - 1;
2232
- if (g >= s && j)
2233
- return 0;
2234
- if (D && !j) return 1;
2235
- if (!T && !D) return null;
2236
- const K = D ? g + 1 : g - 1, W = D ? M[K] - M[K - 1] : M[K + 1] - M[K], x = b / Math.abs(W);
2237
- return D ? 1 - x : x;
2238
- }
725
+ }), i = (c) => `You cannot use router.${c}() on the server because it is a stateless environment`;
2239
726
  return {
2240
- isLastSnapPoint: C,
2241
- activeSnapPoint: f,
2242
- shouldFade: T,
2243
- getPercentageDragged: Z,
2244
- setActiveSnapPoint: c,
2245
- activeSnapPointIndex: g,
2246
- onRelease: v,
2247
- onDrag: z,
2248
- snapPointsOffset: M
2249
- };
2250
- }
2251
- const Rl = () => () => {
2252
- };
2253
- function El() {
2254
- const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: o } = Qe(), s = p.useRef(null), i = mt(() => document.body.style.backgroundColor, []);
2255
- function l() {
2256
- return (window.innerWidth - Ot) / window.innerWidth;
2257
- }
2258
- p.useEffect(() => {
2259
- if (t && n) {
2260
- s.current && clearTimeout(s.current);
2261
- const u = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
2262
- if (!u) return;
2263
- yl(r && !o ? Dt(document.body, {
2264
- background: "black"
2265
- }) : Rl, Dt(u, {
2266
- transformOrigin: U(e) ? "top" : "left",
2267
- transitionProperty: "transform, border-radius",
2268
- transitionDuration: `${k.DURATION}s`,
2269
- transitionTimingFunction: `cubic-bezier(${k.EASE.join(",")})`
2270
- }));
2271
- const m = Dt(u, {
2272
- borderRadius: `${da}px`,
2273
- overflow: "hidden",
2274
- ...U(e) ? {
2275
- transform: `scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`
2276
- } : {
2277
- transform: `scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`
2278
- }
2279
- });
2280
- return () => {
2281
- m(), s.current = window.setTimeout(() => {
2282
- i ? document.body.style.background = i : document.body.style.removeProperty("background");
2283
- }, k.DURATION * 1e3);
2284
- };
2285
- }
2286
- }, [
2287
- t,
2288
- n,
2289
- i
2290
- ]);
2291
- }
2292
- let Ye = null;
2293
- function Dl({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: o, noBodyStyles: s }) {
2294
- const [i, l] = p.useState(() => typeof window < "u" ? window.location.href : ""), u = p.useRef(0), m = p.useCallback(() => {
2295
- if (En() && Ye === null && e && !s) {
2296
- Ye = {
2297
- position: document.body.style.position,
2298
- top: document.body.style.top,
2299
- left: document.body.style.left,
2300
- height: document.body.style.height,
2301
- right: "unset"
727
+ get basename() {
728
+ return t.basename;
729
+ },
730
+ get future() {
731
+ var c, u;
732
+ return {
733
+ v7_fetcherPersist: !1,
734
+ v7_normalizeFormMethod: !1,
735
+ v7_partialHydration: ((c = r.future) == null ? void 0 : c.v7_partialHydration) === !0,
736
+ v7_prependBasename: !1,
737
+ v7_relativeSplatPath: ((u = r.future) == null ? void 0 : u.v7_relativeSplatPath) === !0,
738
+ v7_skipActionErrorRevalidation: !1
2302
739
  };
2303
- const { scrollX: c, innerHeight: d } = window;
2304
- document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
2305
- top: `${-u.current}px`,
2306
- left: `${-c}px`,
2307
- right: "0px",
2308
- height: "auto"
2309
- }), window.setTimeout(() => window.requestAnimationFrame(() => {
2310
- const R = d - window.innerHeight;
2311
- R && u.current >= d && (document.body.style.top = `${-(u.current + R)}px`);
2312
- }), 300);
2313
- }
2314
- }, [
2315
- e
2316
- ]), f = p.useCallback(() => {
2317
- if (En() && Ye !== null && !s) {
2318
- const c = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
2319
- Object.assign(document.body.style, Ye), window.requestAnimationFrame(() => {
2320
- if (o && i !== window.location.href) {
2321
- l(window.location.href);
2322
- return;
2323
- }
2324
- window.scrollTo(d, c);
2325
- }), Ye = null;
2326
- }
2327
- }, [
2328
- i
2329
- ]);
2330
- return p.useEffect(() => {
2331
- function c() {
2332
- u.current = window.scrollY;
2333
- }
2334
- return c(), window.addEventListener("scroll", c), () => {
2335
- window.removeEventListener("scroll", c);
2336
- };
2337
- }, []), p.useEffect(() => {
2338
- if (t)
2339
- return () => {
2340
- typeof document > "u" || document.querySelector("[data-vaul-drawer]") || f();
740
+ },
741
+ get state() {
742
+ return {
743
+ historyAction: A.Action.Pop,
744
+ location: t.location,
745
+ matches: o,
746
+ loaderData: t.loaderData,
747
+ actionData: t.actionData,
748
+ errors: t.errors,
749
+ initialized: !0,
750
+ navigation: A.IDLE_NAVIGATION,
751
+ restoreScrollPosition: null,
752
+ preventScrollReset: !1,
753
+ revalidation: "idle",
754
+ fetchers: /* @__PURE__ */ new Map(),
755
+ blockers: /* @__PURE__ */ new Map()
2341
756
  };
2342
- }, [
2343
- t,
2344
- f
2345
- ]), p.useEffect(() => {
2346
- n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && m(), t || window.setTimeout(() => {
2347
- f();
2348
- }, 500)) : f());
2349
- }, [
2350
- e,
2351
- r,
2352
- i,
2353
- t,
2354
- n,
2355
- m,
2356
- f
2357
- ]), {
2358
- restorePositionSetting: f
2359
- };
2360
- }
2361
- function pa({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: s, shouldScaleBackground: i = !1, setBackgroundColorOnScale: l = !0, closeThreshold: u = bl, scrollLockTimeout: m = Sl, dismissible: f = !0, handleOnly: c = !1, fadeFromIndex: d = s && s.length - 1, activeSnapPoint: R, setActiveSnapPoint: C, fixed: g, modal: T = !0, onClose: M, nested: A, noBodyStyles: P = !1, direction: v = "bottom", defaultOpen: z = !1, disablePreventScroll: Z = !0, snapToSequentialPoint: b = !1, preventScrollRestoration: j = !1, repositionInputs: D = !0, onAnimationEnd: B, container: K, autoFocus: W = !1 }) {
2362
- var x, V;
2363
- const [G = !1, te] = ha({
2364
- defaultProp: z,
2365
- prop: e,
2366
- onChange: (S) => {
2367
- t == null || t(S), !S && !A && _a(), setTimeout(() => {
2368
- B == null || B(S);
2369
- }, k.DURATION * 1e3), S && !T && typeof window < "u" && window.requestAnimationFrame(() => {
2370
- document.body.style.pointerEvents = "auto";
2371
- }), S || (document.body.style.pointerEvents = "auto");
2372
- }
2373
- }), [q, Y] = p.useState(!1), [y, Q] = p.useState(!1), [ie, de] = p.useState(!1), pe = p.useRef(null), Me = p.useRef(null), ke = p.useRef(null), ye = p.useRef(null), le = p.useRef(null), Re = p.useRef(!1), re = p.useRef(null), $e = p.useRef(0), Fe = p.useRef(!1), nn = p.useRef(!z), rn = p.useRef(0), E = p.useRef(null), an = p.useRef(((x = E.current) == null ? void 0 : x.getBoundingClientRect().height) || 0), on = p.useRef(((V = E.current) == null ? void 0 : V.getBoundingClientRect().width) || 0), St = p.useRef(0), Da = p.useCallback((S) => {
2374
- s && S === Ve.length - 1 && (Me.current = /* @__PURE__ */ new Date());
2375
- }, []), { activeSnapPoint: Pa, activeSnapPointIndex: Le, setActiveSnapPoint: sn, onRelease: ja, snapPointsOffset: Ve, onDrag: Na, shouldFade: ln, getPercentageDragged: Ta } = Ml({
2376
- snapPoints: s,
2377
- activeSnapPointProp: R,
2378
- setActiveSnapPointProp: C,
2379
- drawerRef: E,
2380
- fadeFromIndex: d,
2381
- overlayRef: pe,
2382
- onSnapPointChange: Da,
2383
- direction: v,
2384
- container: K,
2385
- snapToSequentialPoint: b
2386
- });
2387
- hl({
2388
- isDisabled: !G || y || !T || ie || !q || !D || !Z
2389
- });
2390
- const { restorePositionSetting: _a } = Dl({
2391
- isOpen: G,
2392
- modal: T,
2393
- nested: A ?? !1,
2394
- hasBeenOpened: q,
2395
- preventScrollRestoration: j,
2396
- noBodyStyles: P
2397
- });
2398
- function lt() {
2399
- return (window.innerWidth - Ot) / window.innerWidth;
2400
- }
2401
- function Oa(S) {
2402
- var _, O;
2403
- !f && !s || E.current && !E.current.contains(S.target) || (an.current = ((_ = E.current) == null ? void 0 : _.getBoundingClientRect().height) || 0, on.current = ((O = E.current) == null ? void 0 : O.getBoundingClientRect().width) || 0, Q(!0), ke.current = /* @__PURE__ */ new Date(), sa() && window.addEventListener("touchend", () => Re.current = !1, {
2404
- once: !0
2405
- }), S.target.setPointerCapture(S.pointerId), $e.current = U(v) ? S.pageY : S.pageX);
2406
- }
2407
- function cn(S, _) {
2408
- var O;
2409
- let N = S;
2410
- const L = (O = window.getSelection()) == null ? void 0 : O.toString(), ne = E.current ? pt(E.current, v) : null, ee = /* @__PURE__ */ new Date();
2411
- if (N.tagName === "SELECT" || N.hasAttribute("data-vaul-no-drag") || N.closest("[data-vaul-no-drag]"))
2412
- return !1;
2413
- if (v === "right" || v === "left")
2414
- return !0;
2415
- if (Me.current && ee.getTime() - Me.current.getTime() < 500)
2416
- return !1;
2417
- if (ne !== null && (v === "bottom" ? ne > 0 : ne < 0))
2418
- return !0;
2419
- if (L && L.length > 0)
2420
- return !1;
2421
- if (le.current && ee.getTime() - le.current.getTime() < m && ne === 0 || _)
2422
- return le.current = ee, !1;
2423
- for (; N; ) {
2424
- if (N.scrollHeight > N.clientHeight) {
2425
- if (N.scrollTop !== 0)
2426
- return le.current = /* @__PURE__ */ new Date(), !1;
2427
- if (N.getAttribute("role") === "dialog")
2428
- return !0;
2429
- }
2430
- N = N.parentNode;
2431
- }
2432
- return !0;
2433
- }
2434
- function Ia(S) {
2435
- if (E.current && y) {
2436
- const _ = v === "bottom" || v === "right" ? 1 : -1, O = ($e.current - (U(v) ? S.pageY : S.pageX)) * _, N = O > 0, L = s && !f && !N;
2437
- if (L && Le === 0) return;
2438
- const ne = Math.abs(O), ee = document.querySelector("[data-vaul-drawer-wrapper]"), Ee = v === "bottom" || v === "top" ? an.current : on.current;
2439
- let fe = ne / Ee;
2440
- const _e = Ta(ne, N);
2441
- if (_e !== null && (fe = _e), L && fe >= 1 || !Re.current && !cn(S.target, N)) return;
2442
- if (E.current.classList.add(Pt), Re.current = !0, H(E.current, {
2443
- transition: "none"
2444
- }), H(pe.current, {
2445
- transition: "none"
2446
- }), s && Na({
2447
- draggedDistance: O
2448
- }), N && !s) {
2449
- const me = xl(O), ct = Math.min(me * -1, 0) * _;
2450
- H(E.current, {
2451
- transform: U(v) ? `translate3d(0, ${ct}px, 0)` : `translate3d(${ct}px, 0, 0)`
2452
- });
2453
- return;
2454
- }
2455
- const De = 1 - fe;
2456
- if ((ln || d && Le === d - 1) && (r == null || r(S, fe), H(pe.current, {
2457
- opacity: `${De}`,
2458
- transition: "none"
2459
- }, !0)), ee && pe.current && i) {
2460
- const me = Math.min(lt() + fe * (1 - lt()), 1), ct = 8 - fe * 8, dn = Math.max(0, 14 - fe * 14);
2461
- H(ee, {
2462
- borderRadius: `${ct}px`,
2463
- transform: U(v) ? `scale(${me}) translate3d(0, ${dn}px, 0)` : `scale(${me}) translate3d(${dn}px, 0, 0)`,
2464
- transition: "none"
2465
- }, !0);
2466
- }
2467
- if (!s) {
2468
- const me = ne * _;
2469
- H(E.current, {
2470
- transform: U(v) ? `translate3d(0, ${me}px, 0)` : `translate3d(${me}px, 0, 0)`
2471
- });
2472
- }
2473
- }
2474
- }
2475
- p.useEffect(() => {
2476
- window.requestAnimationFrame(() => {
2477
- nn.current = !0;
2478
- });
2479
- }, []), p.useEffect(() => {
2480
- var S;
2481
- function _() {
2482
- if (!E.current || !D) return;
2483
- const O = document.activeElement;
2484
- if (_t(O) || Fe.current) {
2485
- var N;
2486
- const L = ((N = window.visualViewport) == null ? void 0 : N.height) || 0, ne = window.innerHeight;
2487
- let ee = ne - L;
2488
- const Ee = E.current.getBoundingClientRect().height || 0, fe = Ee > ne * 0.8;
2489
- St.current || (St.current = Ee);
2490
- const _e = E.current.getBoundingClientRect().top;
2491
- if (Math.abs(rn.current - ee) > 60 && (Fe.current = !Fe.current), s && s.length > 0 && Ve && Le) {
2492
- const De = Ve[Le] || 0;
2493
- ee += De;
2494
- }
2495
- if (rn.current = ee, Ee > L || Fe.current) {
2496
- const De = E.current.getBoundingClientRect().height;
2497
- let me = De;
2498
- De > L && (me = L - (fe ? _e : Ot)), g ? E.current.style.height = `${De - Math.max(ee, 0)}px` : E.current.style.height = `${Math.max(me, L - _e)}px`;
2499
- } else sl() || (E.current.style.height = `${St.current}px`);
2500
- s && s.length > 0 && !Fe.current ? E.current.style.bottom = "0px" : E.current.style.bottom = `${Math.max(ee, 0)}px`;
2501
- }
2502
- }
2503
- return (S = window.visualViewport) == null || S.addEventListener("resize", _), () => {
2504
- var O;
2505
- return (O = window.visualViewport) == null ? void 0 : O.removeEventListener("resize", _);
2506
- };
2507
- }, [
2508
- Le,
2509
- s,
2510
- Ve
2511
- ]);
2512
- function Ge(S) {
2513
- Aa(), M == null || M(), S || te(!1), setTimeout(() => {
2514
- s && sn(s[0]);
2515
- }, k.DURATION * 1e3);
2516
- }
2517
- function un() {
2518
- if (!E.current) return;
2519
- const S = document.querySelector("[data-vaul-drawer-wrapper]"), _ = pt(E.current, v);
2520
- H(E.current, {
2521
- transform: "translate3d(0, 0, 0)",
2522
- transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`
2523
- }), H(pe.current, {
2524
- transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2525
- opacity: "1"
2526
- }), i && _ && _ > 0 && G && H(S, {
2527
- borderRadius: `${da}px`,
2528
- overflow: "hidden",
2529
- ...U(v) ? {
2530
- transform: `scale(${lt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
2531
- transformOrigin: "top"
2532
- } : {
2533
- transform: `scale(${lt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
2534
- transformOrigin: "left"
2535
- },
2536
- transitionProperty: "transform, border-radius",
2537
- transitionDuration: `${k.DURATION}s`,
2538
- transitionTimingFunction: `cubic-bezier(${k.EASE.join(",")})`
2539
- }, !0);
2540
- }
2541
- function Aa() {
2542
- !y || !E.current || (E.current.classList.remove(Pt), Re.current = !1, Q(!1), ye.current = /* @__PURE__ */ new Date());
2543
- }
2544
- function ka(S) {
2545
- if (!y || !E.current) return;
2546
- E.current.classList.remove(Pt), Re.current = !1, Q(!1), ye.current = /* @__PURE__ */ new Date();
2547
- const _ = pt(E.current, v);
2548
- if (!S || !cn(S.target, !1) || !_ || Number.isNaN(_) || ke.current === null) return;
2549
- const O = ye.current.getTime() - ke.current.getTime(), N = $e.current - (U(v) ? S.pageY : S.pageX), L = Math.abs(N) / O;
2550
- if (L > 0.05 && (de(!0), setTimeout(() => {
2551
- de(!1);
2552
- }, 200)), s) {
2553
- ja({
2554
- draggedDistance: N * (v === "bottom" || v === "right" ? 1 : -1),
2555
- closeDrawer: Ge,
2556
- velocity: L,
2557
- dismissible: f
2558
- }), o == null || o(S, !0);
2559
- return;
2560
- }
2561
- if (v === "bottom" || v === "right" ? N > 0 : N < 0) {
2562
- un(), o == null || o(S, !0);
2563
- return;
2564
- }
2565
- if (L > ua) {
2566
- Ge(), o == null || o(S, !1);
2567
- return;
2568
- }
2569
- var ne;
2570
- const ee = Math.min((ne = E.current.getBoundingClientRect().height) != null ? ne : 0, window.innerHeight);
2571
- var Ee;
2572
- const fe = Math.min((Ee = E.current.getBoundingClientRect().width) != null ? Ee : 0, window.innerWidth), _e = v === "left" || v === "right";
2573
- if (Math.abs(_) >= (_e ? fe : ee) * u) {
2574
- Ge(), o == null || o(S, !1);
2575
- return;
2576
- }
2577
- o == null || o(S, !0), un();
2578
- }
2579
- p.useEffect(() => (G && (H(document.documentElement, {
2580
- scrollBehavior: "auto"
2581
- }), Me.current = /* @__PURE__ */ new Date()), () => {
2582
- wl(document.documentElement, "scrollBehavior");
2583
- }), [
2584
- G
2585
- ]);
2586
- function $a(S) {
2587
- const _ = S ? (window.innerWidth - Oe) / window.innerWidth : 1, O = S ? -Oe : 0;
2588
- re.current && window.clearTimeout(re.current), H(E.current, {
2589
- transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2590
- transform: `scale(${_}) translate3d(0, ${O}px, 0)`
2591
- }), !S && E.current && (re.current = setTimeout(() => {
2592
- const N = pt(E.current, v);
2593
- H(E.current, {
2594
- transition: "none",
2595
- transform: U(v) ? `translate3d(0, ${N}px, 0)` : `translate3d(${N}px, 0, 0)`
2596
- });
2597
- }, 500));
2598
- }
2599
- function Fa(S, _) {
2600
- if (_ < 0) return;
2601
- const O = (window.innerWidth - Oe) / window.innerWidth, N = O + _ * (1 - O), L = -Oe + _ * Oe;
2602
- H(E.current, {
2603
- transform: U(v) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`,
2604
- transition: "none"
2605
- });
2606
- }
2607
- function La(S, _) {
2608
- const O = U(v) ? window.innerHeight : window.innerWidth, N = _ ? (O - Oe) / O : 1, L = _ ? -Oe : 0;
2609
- _ && H(E.current, {
2610
- transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2611
- transform: U(v) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`
2612
- });
2613
- }
2614
- return p.useEffect(() => {
2615
- T || window.requestAnimationFrame(() => {
2616
- document.body.style.pointerEvents = "auto";
2617
- });
2618
- }, [
2619
- T
2620
- ]), /* @__PURE__ */ p.createElement(os, {
2621
- defaultOpen: z,
2622
- onOpenChange: (S) => {
2623
- !f && !S || (S ? Y(!0) : Ge(!0), te(S));
2624
757
  },
2625
- open: G
2626
- }, /* @__PURE__ */ p.createElement(oa.Provider, {
2627
- value: {
2628
- activeSnapPoint: Pa,
2629
- snapPoints: s,
2630
- setActiveSnapPoint: sn,
2631
- drawerRef: E,
2632
- overlayRef: pe,
2633
- onOpenChange: t,
2634
- onPress: Oa,
2635
- onRelease: ka,
2636
- onDrag: Ia,
2637
- dismissible: f,
2638
- shouldAnimate: nn,
2639
- handleOnly: c,
2640
- isOpen: G,
2641
- isDragging: y,
2642
- shouldFade: ln,
2643
- closeDrawer: Ge,
2644
- onNestedDrag: Fa,
2645
- onNestedOpenChange: $a,
2646
- onNestedRelease: La,
2647
- keyboardIsOpen: Fe,
2648
- modal: T,
2649
- snapPointsOffset: Ve,
2650
- activeSnapPointIndex: Le,
2651
- direction: v,
2652
- shouldScaleBackground: i,
2653
- setBackgroundColorOnScale: l,
2654
- noBodyStyles: P,
2655
- container: K,
2656
- autoFocus: W
2657
- }
2658
- }, n));
2659
- }
2660
- const ma = /* @__PURE__ */ p.forwardRef(function({ ...e }, t) {
2661
- const { overlayRef: n, snapPoints: r, onRelease: o, shouldFade: s, isOpen: i, modal: l, shouldAnimate: u } = Qe(), m = la(t, n), f = r && r.length > 0;
2662
- if (!l)
2663
- return null;
2664
- const c = p.useCallback((d) => o(d), [
2665
- o
2666
- ]);
2667
- return /* @__PURE__ */ p.createElement(Zo, {
2668
- onMouseUp: c,
2669
- ref: m,
2670
- "data-vaul-overlay": "",
2671
- "data-vaul-snap-points": i && f ? "true" : "false",
2672
- "data-vaul-snap-points-overlay": i && s ? "true" : "false",
2673
- "data-vaul-animate": u != null && u.current ? "true" : "false",
2674
- ...e
2675
- });
2676
- });
2677
- ma.displayName = "Drawer.Overlay";
2678
- const ga = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, o) {
2679
- const { drawerRef: s, onPress: i, onRelease: l, onDrag: u, keyboardIsOpen: m, snapPointsOffset: f, activeSnapPointIndex: c, modal: d, isOpen: R, direction: C, snapPoints: g, container: T, handleOnly: M, shouldAnimate: A, autoFocus: P } = Qe(), [v, z] = p.useState(!1), Z = la(o, s), b = p.useRef(null), j = p.useRef(null), D = p.useRef(!1), B = g && g.length > 0;
2680
- El();
2681
- const K = (x, V, G = 0) => {
2682
- if (D.current) return !0;
2683
- const te = Math.abs(x.y), q = Math.abs(x.x), Y = q > te, y = [
2684
- "bottom",
2685
- "right"
2686
- ].includes(V) ? 1 : -1;
2687
- if (V === "left" || V === "right") {
2688
- if (!(x.x * y < 0) && q >= 0 && q <= G)
2689
- return Y;
2690
- } else if (!(x.y * y < 0) && te >= 0 && te <= G)
2691
- return !Y;
2692
- return D.current = !0, !0;
2693
- };
2694
- p.useEffect(() => {
2695
- B && window.requestAnimationFrame(() => {
2696
- z(!0);
2697
- });
2698
- }, []);
2699
- function W(x) {
2700
- b.current = null, D.current = !1, l(x);
2701
- }
2702
- return /* @__PURE__ */ p.createElement(es, {
2703
- "data-vaul-drawer-direction": C,
2704
- "data-vaul-drawer": "",
2705
- "data-vaul-delayed-snap-points": v ? "true" : "false",
2706
- "data-vaul-snap-points": R && B ? "true" : "false",
2707
- "data-vaul-custom-container": T ? "true" : "false",
2708
- "data-vaul-animate": A != null && A.current ? "true" : "false",
2709
- ...r,
2710
- ref: Z,
2711
- style: f && f.length > 0 ? {
2712
- "--snap-point-height": `${f[c ?? 0]}px`,
2713
- ...t
2714
- } : t,
2715
- onPointerDown: (x) => {
2716
- M || (r.onPointerDown == null || r.onPointerDown.call(r, x), b.current = {
2717
- x: x.pageX,
2718
- y: x.pageY
2719
- }, i(x));
758
+ get routes() {
759
+ return n;
2720
760
  },
2721
- onOpenAutoFocus: (x) => {
2722
- n == null || n(x), P || x.preventDefault();
761
+ get window() {
2723
762
  },
2724
- onPointerDownOutside: (x) => {
2725
- if (e == null || e(x), !d || x.defaultPrevented) {
2726
- x.preventDefault();
2727
- return;
2728
- }
2729
- m.current && (m.current = !1);
763
+ initialize() {
764
+ throw i("initialize");
2730
765
  },
2731
- onFocusOutside: (x) => {
2732
- if (!d) {
2733
- x.preventDefault();
2734
- return;
2735
- }
766
+ subscribe() {
767
+ throw i("subscribe");
768
+ },
769
+ enableScrollRestoration() {
770
+ throw i("enableScrollRestoration");
2736
771
  },
2737
- onPointerMove: (x) => {
2738
- if (j.current = x, M || (r.onPointerMove == null || r.onPointerMove.call(r, x), !b.current)) return;
2739
- const V = x.pageY - b.current.y, G = x.pageX - b.current.x, te = x.pointerType === "touch" ? 10 : 2;
2740
- K({
2741
- x: G,
2742
- y: V
2743
- }, C, te) ? u(x) : (Math.abs(G) > te || Math.abs(V) > te) && (b.current = null);
772
+ navigate() {
773
+ throw i("navigate");
2744
774
  },
2745
- onPointerUp: (x) => {
2746
- r.onPointerUp == null || r.onPointerUp.call(r, x), b.current = null, D.current = !1, l(x);
775
+ fetch() {
776
+ throw i("fetch");
2747
777
  },
2748
- onPointerOut: (x) => {
2749
- r.onPointerOut == null || r.onPointerOut.call(r, x), W(j.current);
778
+ revalidate() {
779
+ throw i("revalidate");
2750
780
  },
2751
- onContextMenu: (x) => {
2752
- r.onContextMenu == null || r.onContextMenu.call(r, x), j.current && W(j.current);
2753
- }
2754
- });
2755
- });
2756
- ga.displayName = "Drawer.Content";
2757
- const Pl = 250, jl = 120, va = /* @__PURE__ */ p.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
2758
- const { closeDrawer: o, isDragging: s, snapPoints: i, activeSnapPoint: l, setActiveSnapPoint: u, dismissible: m, handleOnly: f, isOpen: c, onPress: d, onDrag: R } = Qe(), C = p.useRef(null), g = p.useRef(!1);
2759
- function T() {
2760
- if (g.current) {
2761
- P();
2762
- return;
2763
- }
2764
- window.setTimeout(() => {
2765
- M();
2766
- }, jl);
2767
- }
2768
- function M() {
2769
- if (s || e || g.current) {
2770
- P();
2771
- return;
2772
- }
2773
- if (P(), !i || i.length === 0) {
2774
- m || o();
2775
- return;
2776
- }
2777
- if (l === i[i.length - 1] && m) {
2778
- o();
2779
- return;
2780
- }
2781
- const z = i.findIndex((b) => b === l);
2782
- if (z === -1) return;
2783
- const Z = i[z + 1];
2784
- u(Z);
2785
- }
2786
- function A() {
2787
- C.current = window.setTimeout(() => {
2788
- g.current = !0;
2789
- }, Pl);
2790
- }
2791
- function P() {
2792
- C.current && window.clearTimeout(C.current), g.current = !1;
2793
- }
2794
- return /* @__PURE__ */ p.createElement("div", {
2795
- onClick: T,
2796
- onPointerCancel: P,
2797
- onPointerDown: (v) => {
2798
- f && d(v), A();
781
+ createHref: tt,
782
+ encodeLocation: rt,
783
+ getFetcher() {
784
+ return A.IDLE_FETCHER;
2799
785
  },
2800
- onPointerMove: (v) => {
2801
- f && R(v);
786
+ deleteFetcher() {
787
+ throw i("deleteFetcher");
2802
788
  },
2803
- // onPointerUp is already handled by the content component
2804
- ref: r,
2805
- "data-vaul-drawer-visible": c ? "true" : "false",
2806
- "data-vaul-handle": "",
2807
- "aria-hidden": "true",
2808
- ...n
2809
- }, /* @__PURE__ */ p.createElement("span", {
2810
- "data-vaul-handle-hitarea": "",
2811
- "aria-hidden": "true"
2812
- }, t));
2813
- });
2814
- va.displayName = "Drawer.Handle";
2815
- function Nl({ onDrag: e, onOpenChange: t, ...n }) {
2816
- const { onNestedDrag: r, onNestedOpenChange: o, onNestedRelease: s } = Qe();
2817
- if (!r)
2818
- throw new Error("Drawer.NestedRoot must be placed in another drawer");
2819
- return /* @__PURE__ */ p.createElement(pa, {
2820
- nested: !0,
2821
- onClose: () => {
2822
- o(!1);
789
+ dispose() {
790
+ throw i("dispose");
2823
791
  },
2824
- onDrag: (i, l) => {
2825
- r(i, l), e == null || e(i, l);
792
+ getBlocker() {
793
+ return A.IDLE_BLOCKER;
2826
794
  },
2827
- onOpenChange: (i) => {
2828
- i && o(i);
795
+ deleteBlocker() {
796
+ throw i("deleteBlocker");
2829
797
  },
2830
- onRelease: s,
2831
- ...n
2832
- });
2833
- }
2834
- function Tl(e) {
2835
- const t = Qe(), { container: n = t.container, ...r } = e;
2836
- return /* @__PURE__ */ p.createElement(ss, {
2837
- container: n,
2838
- ...r
2839
- });
2840
- }
2841
- const he = {
2842
- Root: pa,
2843
- NestedRoot: Nl,
2844
- Content: ga,
2845
- Overlay: ma,
2846
- Trigger: ts,
2847
- Portal: Tl,
2848
- Handle: va,
2849
- Close: ns,
2850
- Title: rs,
2851
- Description: as
2852
- }, Zt = ({
2853
- shouldScaleBackground: e = !0,
2854
- ...t
2855
- }) => /* @__PURE__ */ a.jsx(
2856
- he.Root,
2857
- {
2858
- shouldScaleBackground: e,
2859
- ...t
2860
- }
2861
- );
2862
- Zt.displayName = "Drawer";
2863
- const wa = he.Trigger, _l = he.Portal, Ol = he.Close, xa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2864
- he.Overlay,
2865
- {
2866
- ref: n,
2867
- className: $("fixed inset-0 z-50 bg-black/80", e),
2868
- ...t
2869
- }
2870
- ));
2871
- xa.displayName = he.Overlay.displayName;
2872
- const en = h.forwardRef(
2873
- ({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(_l, { children: [
2874
- /* @__PURE__ */ a.jsx(xa, {}),
2875
- /* @__PURE__ */ a.jsxs(
2876
- he.Content,
2877
- {
2878
- ref: o,
2879
- className: $(
2880
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
2881
- e
2882
- ),
2883
- ...r,
2884
- children: [
2885
- !n && /* @__PURE__ */ a.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2886
- t
2887
- ]
2888
- }
2889
- )
2890
- ] })
2891
- );
2892
- en.displayName = "DrawerContent";
2893
- const tn = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2894
- he.Title,
2895
- {
2896
- ref: n,
2897
- className: $(
2898
- "text-lg font-semibold leading-none tracking-tight",
2899
- e
2900
- ),
2901
- ...t
2902
- }
2903
- ));
2904
- tn.displayName = he.Title.displayName;
2905
- const Il = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2906
- he.Description,
2907
- {
2908
- ref: n,
2909
- className: $("text-sm text-muted-foreground", e),
2910
- ...t
2911
- }
2912
- ));
2913
- Il.displayName = he.Description.displayName;
2914
- const ya = () => {
2915
- const e = qe(), [t, n] = Ie(!1), r = qn(() => n(!1), []);
2916
- Ce(() => {
2917
- if (t)
2918
- return;
2919
- function s(i) {
2920
- i.key === "k" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), n(!0));
2921
- }
2922
- return window.addEventListener("keydown", s), () => {
2923
- window.removeEventListener("keydown", s);
2924
- };
2925
- }, [t, n]);
2926
- const o = e.plugins.find(ks);
2927
- return o ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2928
- /* @__PURE__ */ a.jsxs(
2929
- "button",
2930
- {
2931
- type: "button",
2932
- onClick: () => n(!0),
2933
- className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
2934
- children: [
2935
- /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
2936
- /* @__PURE__ */ a.jsx(qo, { size: 14 }),
2937
- "Search"
2938
- ] }),
2939
- /* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
2940
- ]
2941
- }
2942
- ),
2943
- /* @__PURE__ */ a.jsx(Qn, { fallback: null, children: o.renderSearch({
2944
- isOpen: t,
2945
- onClose: r
2946
- }) })
2947
- ] }) : null;
2948
- }, Al = () => {
2949
- const { topNavigation: e } = qe();
2950
- return /* @__PURE__ */ a.jsxs(Zt, { direction: "right", children: [
2951
- /* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(wa, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Qo, { size: 22 }) }) }),
2952
- /* @__PURE__ */ a.jsxs(
2953
- en,
2954
- {
2955
- className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
2956
- "aria-describedby": void 0,
2957
- children: [
2958
- /* @__PURE__ */ a.jsx(Hn, { children: /* @__PURE__ */ a.jsx(tn, { children: "Navigation" }) }),
2959
- /* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(ya, {}) }),
2960
- /* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.map((t) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
2961
- Ze,
2962
- {
2963
- className: ({ isActive: n }) => Un(
2964
- "block font-medium border-b-2",
2965
- n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
2966
- ),
2967
- to: t.id,
2968
- children: /* @__PURE__ */ a.jsx(Ol, { children: t.label })
2969
- }
2970
- ) }, t.label)) })
2971
- ]
798
+ patchRoutes() {
799
+ throw i("patchRoutes");
800
+ },
801
+ _internalFetchControllers: /* @__PURE__ */ new Map(),
802
+ _internalActiveDeferreds: /* @__PURE__ */ new Map(),
803
+ _internalSetRoutes() {
804
+ throw i("_internalSetRoutes");
805
+ }
806
+ };
807
+ }
808
+ function tt(e) {
809
+ return typeof e == "string" ? e : D.createPath(e);
810
+ }
811
+ function rt(e) {
812
+ let t = typeof e == "string" ? e : D.createPath(e);
813
+ t = t.replace(/ $/, "%20");
814
+ let r = qr.test(t) ? new URL(t) : new URL(t, "http://localhost");
815
+ return {
816
+ pathname: r.pathname,
817
+ search: r.search,
818
+ hash: r.hash
819
+ };
820
+ }
821
+ const qr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, zr = {
822
+ "&": "\\u0026",
823
+ ">": "\\u003e",
824
+ "<": "\\u003c",
825
+ "\u2028": "\\u2028",
826
+ "\u2029": "\\u2029"
827
+ }, Br = /[&><\u2028\u2029]/g;
828
+ function Hr(e) {
829
+ return e.replace(Br, (t) => zr[t]);
830
+ }
831
+ W.StaticRouter = Rr;
832
+ var Lr = W.StaticRouterProvider = Tr;
833
+ W.createStaticHandler = Qr;
834
+ W.createStaticRouter = Fr;
835
+ const Ur = ({
836
+ router: e,
837
+ hydrate: t = !1
838
+ }) => {
839
+ const [r] = q(
840
+ () => new Sr({
841
+ defaultOptions: {
842
+ queries: {
843
+ staleTime: 3e5
844
+ }
2972
845
  }
2973
- )
2974
- ] });
2975
- }, kl = () => {
2976
- const { topNavigation: e } = qe();
2977
- return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.map((t) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
2978
- Ze,
846
+ })
847
+ );
848
+ return /* @__PURE__ */ a.jsx(Ue, { children: /* @__PURE__ */ a.jsx(He, { client: r, children: /* @__PURE__ */ a.jsx(Er, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ a.jsx(Fe, { children: /* @__PURE__ */ a.jsx(ce.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(
849
+ bt,
2979
850
  {
2980
- className: ({ isActive: n }) => Un(
2981
- "block py-3.5 font-medium -mb-px border-b-2",
2982
- n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
2983
- ),
2984
- to: t.id,
2985
- children: t.label
851
+ router: e,
852
+ future: { v7_startTransition: !0 }
2986
853
  }
2987
- ) }, t.label)) }) });
2988
- }, ba = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(tl, { children: [
2989
- /* @__PURE__ */ a.jsx(Zr, { children: e.label }),
2990
- /* @__PURE__ */ a.jsx(el, { children: /* @__PURE__ */ a.jsx(ea, { children: e.children.map((t, n) => (
2991
- // eslint-disable-next-line react/no-array-index-key
2992
- /* @__PURE__ */ a.jsx(ba, { item: t }, n)
2993
- )) }) })
2994
- ] }, e.label) : /* @__PURE__ */ a.jsx(kt, { to: e.path ?? "", children: /* @__PURE__ */ a.jsx(na, { children: e.label }, e.label) }), Sa = Vn(function() {
2995
- const t = pn(), [n, r] = mo(), { isAuthenticated: o, profile: s, isAuthEnabled: i } = pn(), l = qe(), { page: u, plugins: m } = l, f = m.filter((d) => Is(d)).flatMap((d) => d.getProfileMenuItems(l)).map((d) => /* @__PURE__ */ a.jsx(ba, { item: d }, d.label)), c = n ? Vo : Go;
2996
- return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
2997
- /* @__PURE__ */ a.jsx(al, {}),
2998
- /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
2999
- /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
3000
- /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(kt, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
3001
- (u == null ? void 0 : u.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3002
- /* @__PURE__ */ a.jsx(
3003
- "img",
3004
- {
3005
- src: u.logo.src.light,
3006
- alt: u.logo.alt ?? u.pageTitle,
3007
- style: { width: u.logo.width },
3008
- className: $("h-10", n && "hidden"),
3009
- loading: "lazy"
3010
- }
3011
- ),
3012
- /* @__PURE__ */ a.jsx(
3013
- "img",
3014
- {
3015
- src: u.logo.src.dark,
3016
- alt: u.logo.alt ?? u.pageTitle,
3017
- style: { width: u.logo.width },
3018
- className: $("h-10", !n && "hidden"),
3019
- loading: "lazy"
3020
- }
3021
- )
3022
- ] }),
3023
- /* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: u == null ? void 0 : u.pageTitle })
3024
- ] }) }) }),
3025
- /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
3026
- /* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(ya, {}) }),
3027
- /* @__PURE__ */ a.jsx(Al, {}),
3028
- /* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
3029
- /* @__PURE__ */ a.jsx(xe, { name: "head-navigation-start" }),
3030
- i && !o ? /* @__PURE__ */ a.jsx(jt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : f.length > 0 && /* @__PURE__ */ a.jsxs(Ji, { modal: !1, children: [
3031
- /* @__PURE__ */ a.jsx(Zi, { asChild: !0, children: /* @__PURE__ */ a.jsx(jt, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
3032
- /* @__PURE__ */ a.jsxs(ta, { className: "w-56", children: [
3033
- /* @__PURE__ */ a.jsx(ra, { children: "My Account" }),
3034
- /* @__PURE__ */ a.jsx(aa, {}),
3035
- f
3036
- ] })
3037
- ] }),
3038
- /* @__PURE__ */ a.jsx(
3039
- "button",
3040
- {
3041
- type: "button",
3042
- "aria-label": n ? "Switch to light mode" : "Switch to dark mode",
3043
- className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
3044
- onClick: r,
3045
- children: /* @__PURE__ */ a.jsx(c, { size: 18 })
3046
- }
3047
- ),
3048
- /* @__PURE__ */ a.jsx(xe, { name: "head-navigation-end" })
3049
- ] })
3050
- ] })
3051
- ] }),
3052
- /* @__PURE__ */ a.jsx(xe, { name: "top-navigation-before" }),
3053
- /* @__PURE__ */ a.jsx(kl, {}),
3054
- /* @__PURE__ */ a.jsx(xe, { name: "top-navigation-after" })
3055
- ] })
3056
- ] });
3057
- }), Ca = {
3058
- Header: Sa
3059
- }, $l = Kn(Ca), Fl = $l.Provider, Ll = (e) => {
3060
- const [t, n] = Ie(!1);
3061
- Ce(() => {
3062
- const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), l = s === "dark" || !s && i.matches;
3063
- n(l);
3064
- }, [t]);
3065
- const r = qn(() => {
3066
- const s = !t;
3067
- document.documentElement.classList.toggle("dark", s), localStorage.setItem("theme", s ? "dark" : "light"), n(s);
3068
- }, [t]), o = [t, r];
3069
- return /* @__PURE__ */ a.jsx(go.Provider, { value: o, ...e });
3070
- }, Bl = ({
3071
- children: e,
3072
- context: t
3073
- }) => (Fo({
3074
- queryFn: async () => (await t.initialize(), !0),
3075
- queryKey: ["zudoku-initialize"]
3076
- }), /* @__PURE__ */ a.jsx(Lo.Provider, { value: t, children: e })), Hl = ({
3077
- children: e,
3078
- ...t
3079
- }) => {
3080
- var c, d;
3081
- const n = mt(
3082
- () => ({ ...Ca, ...t.overrides }),
3083
- [t.overrides]
3084
- ), r = mt(() => {
3085
- var C;
3086
- return {
3087
- ...(t.plugins ?? []).filter(Ls).flatMap(
3088
- (g) => g.getMdxComponents ? [g.getMdxComponents()] : []
3089
- ).reduce((g, T) => ({ ...g, ...T }), {}),
3090
- ...vo,
3091
- ...(C = t.mdx) == null ? void 0 : C.components
3092
- };
3093
- }, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: o } = Mo(Nt), [s, i] = Ie(!1), l = mt(
3094
- () => s ? { stagger: !0 } : { stagger: o },
3095
- [o, s]
3096
- ), u = Wa();
3097
- Ce(() => {
3098
- s || i(!0);
3099
- }, [s, u.location]);
3100
- const [m] = Ie(() => new Hs(t)), f = (d = t.plugins) == null ? void 0 : d.filter(Fs).map((R, C) => {
3101
- var g;
3102
- return /* @__PURE__ */ a.jsx(Ro, { children: (g = R.getHead) == null ? void 0 : g.call(R) }, C);
3103
- });
3104
- return /* @__PURE__ */ a.jsxs(Bo, { client: nr, children: [
3105
- /* @__PURE__ */ a.jsx(At, { children: f }),
3106
- /* @__PURE__ */ a.jsx(Nt.Provider, { value: l, children: /* @__PURE__ */ a.jsx(Bl, { context: m, children: /* @__PURE__ */ a.jsx(Ua, { components: r, children: /* @__PURE__ */ a.jsx(Ll, { children: /* @__PURE__ */ a.jsx(Fl, { value: n, children: /* @__PURE__ */ a.jsx(Ja, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(wo, { children: e ?? /* @__PURE__ */ a.jsx(In, {}) }) }) }) }) }) }) })
3107
- ] });
3108
- }, Ul = Vn(Hl), Ma = (e) => /* @__PURE__ */ a.jsx(_s, { FallbackComponent: Us, children: /* @__PURE__ */ a.jsx(Ul, { ...e }) });
3109
- Ma.displayName = "DevPortal";
3110
- const zl = ({
854
+ ) }) }) }) }) });
855
+ }, Kr = ({
856
+ router: e,
857
+ context: t,
858
+ queryClient: r,
859
+ helmetContext: s
860
+ }) => /* @__PURE__ */ a.jsx(Ue, { children: /* @__PURE__ */ a.jsx(He, { client: r, children: /* @__PURE__ */ a.jsx(Fe, { context: s, children: /* @__PURE__ */ a.jsx(Lr, { router: e, context: t }) }) }) }), $r = ({
3111
861
  category: e,
3112
862
  level: t
3113
863
  }) => {
3114
- var R, C;
3115
- const n = Yn(), r = za(e), [o, s] = Ie(!1), i = e.collapsible ?? !0, l = e.collapsed ?? !0, u = !!(!i || !l || r), [m, f] = Ie(u), c = Ya(vt(n == null ? void 0 : n.id, (R = e.link) == null ? void 0 : R.id));
3116
- Ce(() => {
3117
- r && f(!0);
864
+ var f, v;
865
+ const r = It(e), [s, n] = q(!1), o = e.collapsible ?? !0, i = e.collapsed ?? !0, c = !!(!o || !i || r), [u, d] = q(c), x = Zt(((f = e.link) == null ? void 0 : f.id) ?? "");
866
+ z(() => {
867
+ r && d(!0);
3118
868
  }, [r]);
3119
- const d = i && /* @__PURE__ */ a.jsx(
869
+ const m = o && /* @__PURE__ */ a.jsx(
3120
870
  "button",
3121
871
  {
3122
872
  type: "button",
3123
- onClick: (g) => {
3124
- g.preventDefault(), f((T) => !T), s(!0);
873
+ onClick: (p) => {
874
+ p.preventDefault(), d((h) => !h), n(!0);
3125
875
  },
3126
876
  children: /* @__PURE__ */ a.jsx(
3127
- Xn,
877
+ Yt,
3128
878
  {
3129
879
  size: 16,
3130
- className: $(
3131
- o && "transition",
880
+ className: R(
881
+ s && "transition",
3132
882
  "shrink-0 group-data-[state=open]:rotate-90"
3133
883
  )
3134
884
  }
@@ -3136,90 +886,92 @@ const zl = ({
3136
886
  }
3137
887
  );
3138
888
  return /* @__PURE__ */ a.jsxs(
3139
- Po,
889
+ oe.Root,
3140
890
  {
3141
891
  className: "flex flex-col",
3142
- defaultOpen: u,
3143
- open: m,
3144
- onOpenChange: () => f(!0),
892
+ defaultOpen: c,
893
+ open: u,
894
+ onOpenChange: () => d(!0),
3145
895
  children: [
3146
- /* @__PURE__ */ a.jsx(jo, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
896
+ /* @__PURE__ */ a.jsx(oe.Trigger, { className: "group", asChild: !0, disabled: !o, children: /* @__PURE__ */ a.jsxs(
3147
897
  "div",
3148
898
  {
3149
- onClick: () => s(!0),
3150
- className: $(
3151
- "text-start",
3152
- Je({ isActive: !1, isTopLevel: t === 0 }),
3153
- i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
3154
- ),
899
+ onClick: () => n(!0),
900
+ className: V({
901
+ isActive: !1,
902
+ isTopLevel: t === 0,
903
+ className: [
904
+ "text-start",
905
+ o ? "cursor-pointer" : "cursor-default hover:bg-transparent"
906
+ ]
907
+ }),
3155
908
  children: [
3156
909
  e.icon && /* @__PURE__ */ a.jsx(
3157
910
  e.icon,
3158
911
  {
3159
912
  size: 16,
3160
- className: $(
913
+ className: R(
3161
914
  "align-[-0.125em] -translate-x-1",
3162
- c && "text-primary"
915
+ x && "text-primary"
3163
916
  )
3164
917
  }
3165
918
  ),
3166
- ((C = e.link) == null ? void 0 : C.type) === "doc" ? /* @__PURE__ */ a.jsx(
3167
- Ze,
919
+ ((v = e.link) == null ? void 0 : v.type) === "doc" ? /* @__PURE__ */ a.jsx(
920
+ re,
3168
921
  {
3169
- to: vt(n == null ? void 0 : n.id, e.link.id),
922
+ to: F(e.link.id),
3170
923
  className: "flex-1",
3171
924
  onClick: () => {
3172
- c && !m && f(!0);
925
+ x && !u && d(!0);
3173
926
  },
3174
927
  children: /* @__PURE__ */ a.jsxs(
3175
928
  "div",
3176
929
  {
3177
- className: $(
930
+ className: R(
3178
931
  "flex items-center gap-2 justify-between w-full",
3179
- c ? "text-primary" : "text-foreground/80"
932
+ x ? "text-primary" : "text-foreground/80"
3180
933
  ),
3181
934
  children: [
3182
935
  /* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
3183
- d
936
+ m
3184
937
  ]
3185
938
  }
3186
939
  )
3187
940
  }
3188
941
  ) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
3189
942
  /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
3190
- d
943
+ m
3191
944
  ] })
3192
945
  ]
3193
946
  }
3194
947
  ) }),
3195
948
  /* @__PURE__ */ a.jsx(
3196
- No,
949
+ oe.Content,
3197
950
  {
3198
- className: $(
951
+ className: R(
3199
952
  // CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
3200
- o && "CollapsibleContent",
3201
- "ms-[calc(var(--padding-nav-item)*1.125)]"
953
+ s && "CollapsibleContent"
3202
954
  ),
3203
- children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ps-2", children: e.items.map((g) => /* @__PURE__ */ a.jsx(
3204
- It,
955
+ children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: e.items.map((p) => /* @__PURE__ */ a.jsx(
956
+ de,
3205
957
  {
3206
958
  level: t + 1,
3207
- item: g
959
+ item: p
3208
960
  },
3209
- ("id" in g ? g.id : "") + ("href" in g ? g.href : "") + g.label
961
+ ("id" in p ? p.id : "") + ("href" in p ? p.href : "") + p.label
3210
962
  )) })
3211
963
  }
3212
964
  )
3213
965
  ]
3214
966
  }
3215
967
  );
3216
- }, Je = xo(
968
+ }, V = or(
3217
969
  "flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
3218
970
  {
3219
971
  variants: {
3220
972
  isTopLevel: {
3221
- true: "font-semibold -mx-[--padding-nav-item]",
3222
- false: "-me-[--padding-nav-item]"
973
+ true: "font-medium -mx-[--padding-nav-item]",
974
+ false: "-mr-[--padding-nav-item] ml-[--padding-nav-item]"
3223
975
  },
3224
976
  isActive: {
3225
977
  true: "text-primary font-medium",
@@ -3234,171 +986,390 @@ const zl = ({
3234
986
  isActive: !1
3235
987
  }
3236
988
  }
3237
- ), Ra = "data-anchor", It = ({
989
+ ), at = "data-anchor", de = ({
3238
990
  item: e,
3239
991
  level: t = 0
3240
992
  }) => {
3241
- var s, i;
3242
- const n = Yn(), { activeAnchor: r } = Lt(), [o] = Xa();
993
+ var n, o;
994
+ const { activeAnchor: r } = xe(), [s] = jt();
3243
995
  switch (e.type) {
3244
996
  case "category":
3245
- return /* @__PURE__ */ a.jsx(zl, { category: e, level: t });
997
+ return /* @__PURE__ */ a.jsx($r, { category: e, level: t });
3246
998
  case "doc":
3247
999
  return /* @__PURE__ */ a.jsxs(
3248
- Ze,
1000
+ re,
3249
1001
  {
3250
- className: ({ isActive: l }) => Je({ isActive: l, isTopLevel: t === 0 }),
3251
- to: vt(n == null ? void 0 : n.id, e.id),
1002
+ className: ({ isActive: i }) => V({ isActive: i, isTopLevel: t === 0 }),
1003
+ to: F(e.id),
3252
1004
  children: [
3253
1005
  e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
3254
1006
  e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3255
1007
  /* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: e.label, children: e.label }),
3256
- /* @__PURE__ */ a.jsx(Ct, { ...e.badge })
1008
+ /* @__PURE__ */ a.jsx(ie, { ...e.badge })
3257
1009
  ] }) : e.label
3258
1010
  ]
3259
1011
  }
3260
1012
  );
3261
1013
  case "link":
3262
1014
  return e.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
3263
- Ka,
1015
+ pt,
3264
1016
  {
3265
- to: { hash: e.href, search: o.toString() },
3266
- [Ra]: e.href.slice(1),
3267
- className: Je({
1017
+ to: { hash: e.href, search: s.toString() },
1018
+ [at]: e.href.slice(1),
1019
+ className: V({
3268
1020
  isActive: e.href.slice(1) === r,
3269
1021
  isTopLevel: t === 0,
3270
- className: ((s = e.badge) == null ? void 0 : s.placement) !== "start" && "justify-between"
1022
+ className: ((n = e.badge) == null ? void 0 : n.placement) !== "start" && "justify-between"
3271
1023
  }),
3272
1024
  children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3273
1025
  /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3274
- /* @__PURE__ */ a.jsx(Ct, { ...e.badge })
1026
+ /* @__PURE__ */ a.jsx(ie, { ...e.badge })
3275
1027
  ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
3276
1028
  }
3277
1029
  ) : e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
3278
1030
  "a",
3279
1031
  {
3280
- className: Je({ isTopLevel: t === 0 }),
1032
+ className: V({ isTopLevel: t === 0 }),
3281
1033
  href: e.href,
3282
1034
  target: "_blank",
3283
1035
  rel: "noopener noreferrer",
3284
1036
  children: [
3285
1037
  /* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
3286
- /* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(Wo, { className: "inline -translate-y-0.5", size: 12 }) })
1038
+ /* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(Jt, { className: "inline -translate-y-0.5", size: 12 }) })
3287
1039
  ]
3288
1040
  }
3289
1041
  ) : /* @__PURE__ */ a.jsx(
3290
- Ze,
1042
+ re,
3291
1043
  {
3292
- className: Je({
3293
- className: ((i = e.badge) == null ? void 0 : i.placement) !== "start" && "justify-between"
1044
+ className: V({
1045
+ className: ((o = e.badge) == null ? void 0 : o.placement) !== "start" && "justify-between"
3294
1046
  }),
3295
1047
  to: e.href,
3296
1048
  children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3297
1049
  /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3298
- /* @__PURE__ */ a.jsx(Ct, { ...e.badge })
1050
+ /* @__PURE__ */ a.jsx(ie, { ...e.badge })
3299
1051
  ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
3300
1052
  }
3301
1053
  );
3302
1054
  }
3303
- }, Kl = (e, t = { block: "center" }) => {
1055
+ }, Vr = (e, t = { block: "center" }) => {
3304
1056
  if (!e) return;
3305
- const n = e.getBoundingClientRect();
3306
- n.top >= 0 && n.left >= 0 && n.bottom <= (window.innerHeight || document.documentElement.clientHeight) && n.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
3307
- }, ql = () => {
3308
- const e = $t(), { setActiveAnchor: t } = Lt();
3309
- Ce(() => {
1057
+ const r = e.getBoundingClientRect();
1058
+ r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
1059
+ }, Zr = () => {
1060
+ const e = pe(), { setActiveAnchor: t } = xe();
1061
+ z(() => {
3310
1062
  if (!e.hash) return;
3311
- const n = decodeURIComponent(e.hash.split("/")[0].slice(1)), r = () => {
3312
- const o = document.getElementById(n), s = document.querySelector(`[${Ra}="${n}"]`);
3313
- return o ? (o.scrollIntoView(), Kl(s), requestIdleCallback(() => t(n)), !0) : !1;
1063
+ const r = decodeURIComponent(e.hash.split("/")[0].slice(1)), s = () => {
1064
+ const n = document.getElementById(r), o = document.querySelector(`[${at}="${r}"]`);
1065
+ return n ? (n.scrollIntoView(), Vr(o), requestIdleCallback(() => t(r)), !0) : !1;
3314
1066
  };
3315
- if (!r()) {
3316
- const o = new MutationObserver((s, i) => {
3317
- r() && i.disconnect();
1067
+ if (!s()) {
1068
+ const n = new MutationObserver((o, i) => {
1069
+ s() && i.disconnect();
3318
1070
  });
3319
- return o.observe(document.body, { childList: !0, subtree: !0 }), () => o.disconnect();
1071
+ return n.observe(document.body, { childList: !0, subtree: !0 }), () => n.disconnect();
3320
1072
  }
3321
1073
  }, [e.hash, t]);
3322
- }, Ql = () => {
3323
- const e = $t(), t = Bt(e.pathname);
3324
- Ce(() => {
1074
+ }, Wr = () => {
1075
+ const e = pe(), t = fe(e.pathname);
1076
+ z(() => {
3325
1077
  t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
3326
1078
  }, [e.pathname]);
3327
- }, Ea = Eo(({ children: e, className: t, pushMainContent: n }, r) => /* @__PURE__ */ a.jsx(
1079
+ };
1080
+ function Yr({
1081
+ className: e,
1082
+ ...t
1083
+ }) {
1084
+ return /* @__PURE__ */ a.jsx(
1085
+ "div",
1086
+ {
1087
+ className: R("animate-pulse rounded-md bg-muted", e),
1088
+ ...t
1089
+ }
1090
+ );
1091
+ }
1092
+ const Jr = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", Xr = (e) => "getRoutes" in e && typeof e.getRoutes == "function", Gr = (e) => "renderSearch" in e && typeof e.renderSearch == "function", ea = (e) => "initialize" in e && typeof e.initialize == "function", ta = (e) => "getHead" in e && typeof e.getHead == "function", ra = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", aa = (e) => "getIdentities" in e && typeof e.getIdentities == "function", Te = {
1093
+ info: "bg-blue-500",
1094
+ note: "bg-gray-500",
1095
+ tip: "bg-green-600",
1096
+ caution: "bg-orange-500",
1097
+ danger: "bg-rose-500"
1098
+ }, sa = () => {
1099
+ const { page: e } = Q(), [t, r] = q(!0);
1100
+ if (!(e != null && e.banner) || !t)
1101
+ return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
1102
+ const s = e.banner.color && e.banner.color in Te ? Te[e.banner.color] : e.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: e.banner.color };
1103
+ return /* @__PURE__ */ a.jsxs(
1104
+ "div",
1105
+ {
1106
+ className: R(
1107
+ "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
1108
+ s
1109
+ ),
1110
+ style: n,
1111
+ children: [
1112
+ /* @__PURE__ */ a.jsx("div", { className: "w-full", children: e.banner.message }),
1113
+ e.banner.dismissible && /* @__PURE__ */ a.jsx(
1114
+ "button",
1115
+ {
1116
+ type: "button",
1117
+ className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
1118
+ onClick: () => r(!1),
1119
+ children: /* @__PURE__ */ a.jsx(Xt, { size: 16 })
1120
+ }
1121
+ )
1122
+ ]
1123
+ }
1124
+ );
1125
+ }, st = () => {
1126
+ const e = Q(), [t, r] = q(!1), s = Bt(() => r(!1), []);
1127
+ z(() => {
1128
+ if (t)
1129
+ return;
1130
+ function o(i) {
1131
+ i.key === "k" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), r(!0));
1132
+ }
1133
+ return window.addEventListener("keydown", o), () => {
1134
+ window.removeEventListener("keydown", o);
1135
+ };
1136
+ }, [t, r]);
1137
+ const n = e.plugins.find(Gr);
1138
+ return n ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1139
+ /* @__PURE__ */ a.jsxs(
1140
+ "button",
1141
+ {
1142
+ type: "button",
1143
+ onClick: () => r(!0),
1144
+ className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
1145
+ children: [
1146
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
1147
+ /* @__PURE__ */ a.jsx(Gt, { size: 14 }),
1148
+ "Search"
1149
+ ] }),
1150
+ /* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
1151
+ ]
1152
+ }
1153
+ ),
1154
+ /* @__PURE__ */ a.jsx(me, { fallback: null, children: n.renderSearch({
1155
+ isOpen: t,
1156
+ onClose: s
1157
+ }) })
1158
+ ] }) : null;
1159
+ }, nt = () => {
1160
+ const { theme: e, setTheme: t } = xr(), r = e === "dark" ? er : tr;
1161
+ return /* @__PURE__ */ a.jsx(ve, { children: /* @__PURE__ */ a.jsx(
1162
+ ue,
1163
+ {
1164
+ variant: "ghost",
1165
+ "aria-label": e === "dark" ? "Switch to light mode" : "Switch to dark mode",
1166
+ className: "p-2.5 -m-2.5 rounded-full",
1167
+ onClick: () => t(e === "dark" ? "light" : "dark"),
1168
+ children: /* @__PURE__ */ a.jsx(r, { size: 18 })
1169
+ }
1170
+ ) });
1171
+ }, it = (e) => (t) => t.display === "auth" && e || t.display === "anon" && !e || !t.display || t.display === "always", na = () => {
1172
+ const { topNavigation: e } = Q(), { isAuthenticated: t } = ae();
1173
+ return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx(me, { children: /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.filter(it(t)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(ia, { ...r }) }, r.id)) }) }) });
1174
+ }, ia = ({ id: e, label: t, default: r }) => {
1175
+ var u;
1176
+ const { sidebars: s } = Q(), n = Le(), o = s[e], i = r ?? (o ? _t(o, (d) => {
1177
+ if (d.type === "doc") return F(d.id);
1178
+ }) : F(e));
1179
+ if (!i)
1180
+ throw new Error(
1181
+ `No links found in top navigation for top navigation '${e}'. Check that the sidebar isn't empty or that a default link set.`
1182
+ );
1183
+ const c = ((u = n.topNavItem) == null ? void 0 : u.id) === e;
1184
+ return /* @__PURE__ */ a.jsx(
1185
+ se,
1186
+ {
1187
+ className: Xe(
1188
+ "block py-3.5 font-medium -mb-px border-b-2",
1189
+ c ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
1190
+ ),
1191
+ to: i,
1192
+ children: t
1193
+ }
1194
+ );
1195
+ }, oa = () => {
1196
+ const { topNavigation: e } = Q(), { isAuthenticated: t } = ae();
1197
+ return /* @__PURE__ */ a.jsxs(Ze, { direction: "right", children: [
1198
+ /* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(We, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(rr, { size: 22 }) }) }),
1199
+ /* @__PURE__ */ a.jsxs(
1200
+ Ye,
1201
+ {
1202
+ className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
1203
+ "aria-describedby": void 0,
1204
+ children: [
1205
+ /* @__PURE__ */ a.jsx(Ge, { children: /* @__PURE__ */ a.jsx(Je, { children: "Navigation" }) }),
1206
+ /* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(st, {}) }),
1207
+ /* @__PURE__ */ a.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
1208
+ /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(nt, {}) }),
1209
+ e.filter(it(t)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
1210
+ re,
1211
+ {
1212
+ className: ({ isActive: s }) => Xe(
1213
+ "block font-medium border-b-2",
1214
+ s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
1215
+ ),
1216
+ to: r.id,
1217
+ children: /* @__PURE__ */ a.jsx(sr, { children: r.label })
1218
+ }
1219
+ ) }, r.label))
1220
+ ] })
1221
+ ]
1222
+ }
1223
+ )
1224
+ ] });
1225
+ }, ot = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(fr, { children: [
1226
+ /* @__PURE__ */ a.jsx(mr, { children: e.label }),
1227
+ /* @__PURE__ */ a.jsx(gr, { children: /* @__PURE__ */ a.jsx(pr, { children: e.children.map((t, r) => (
1228
+ // eslint-disable-next-line react/no-array-index-key
1229
+ /* @__PURE__ */ a.jsx(ot, { item: t }, r)
1230
+ )) }) })
1231
+ ] }, e.label) : /* @__PURE__ */ a.jsx(se, { to: e.path ?? "", children: /* @__PURE__ */ a.jsx(vr, { children: e.label }, e.label) }), lt = Ke(function() {
1232
+ const t = ae(), { isAuthenticated: r, profile: s, isAuthEnabled: n } = ae(), o = Q(), { page: i, plugins: c } = o, u = c.filter((d) => Jr(d)).flatMap((d) => d.getProfileMenuItems(o)).map((d) => /* @__PURE__ */ a.jsx(ot, { item: d }, d.label));
1233
+ return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
1234
+ /* @__PURE__ */ a.jsx(sa, {}),
1235
+ /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
1236
+ /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
1237
+ /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(se, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
1238
+ (i == null ? void 0 : i.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1239
+ /* @__PURE__ */ a.jsx(
1240
+ "img",
1241
+ {
1242
+ src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : F(
1243
+ "/",
1244
+ i.logo.src.light
1245
+ ),
1246
+ alt: i.logo.alt ?? i.pageTitle,
1247
+ style: { width: i.logo.width },
1248
+ className: "h-10 dark:hidden",
1249
+ loading: "lazy"
1250
+ }
1251
+ ),
1252
+ /* @__PURE__ */ a.jsx(
1253
+ "img",
1254
+ {
1255
+ "data-hide-on-theme": "light",
1256
+ src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : F(
1257
+ "/",
1258
+ i.logo.src.dark
1259
+ ),
1260
+ alt: i.logo.alt ?? i.pageTitle,
1261
+ style: { width: i.logo.width },
1262
+ className: "h-10",
1263
+ loading: "lazy"
1264
+ }
1265
+ )
1266
+ ] }),
1267
+ /* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
1268
+ ] }) }) }),
1269
+ /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
1270
+ /* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(st, {}) }),
1271
+ /* @__PURE__ */ a.jsx(oa, {}),
1272
+ /* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
1273
+ /* @__PURE__ */ a.jsx(O, { name: "head-navigation-start" }),
1274
+ n && /* @__PURE__ */ a.jsx(
1275
+ ve,
1276
+ {
1277
+ fallback: /* @__PURE__ */ a.jsx(Yr, { className: "rounded h-5 w-24 mr-4" }),
1278
+ children: r ? u.length > 0 && /* @__PURE__ */ a.jsxs(lr, { modal: !1, children: [
1279
+ /* @__PURE__ */ a.jsx(cr, { asChild: !0, children: /* @__PURE__ */ a.jsx(ue, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
1280
+ /* @__PURE__ */ a.jsxs(ur, { className: "w-56", children: [
1281
+ /* @__PURE__ */ a.jsx(dr, { children: "My Account" }),
1282
+ /* @__PURE__ */ a.jsx(hr, {}),
1283
+ u
1284
+ ] })
1285
+ ] }) : /* @__PURE__ */ a.jsx(ue, { variant: "ghost", onClick: () => t.login(), children: "Login" })
1286
+ }
1287
+ ),
1288
+ /* @__PURE__ */ a.jsx(nt, {}),
1289
+ /* @__PURE__ */ a.jsx(O, { name: "head-navigation-end" })
1290
+ ] })
1291
+ ] })
1292
+ ] }),
1293
+ /* @__PURE__ */ a.jsx(O, { name: "top-navigation-before" }),
1294
+ /* @__PURE__ */ a.jsx(na, {}),
1295
+ /* @__PURE__ */ a.jsx(O, { name: "top-navigation-after" })
1296
+ ] })
1297
+ ] });
1298
+ }), ct = Ht(({ children: e, className: t, pushMainContent: r }, s) => /* @__PURE__ */ a.jsx(
3328
1299
  "nav",
3329
1300
  {
3330
- "data-navigation": String(n),
3331
- className: $(
1301
+ "data-navigation": String(r),
1302
+ className: R(
3332
1303
  "scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
3333
1304
  "px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
3334
1305
  "w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
3335
1306
  t
3336
1307
  ),
3337
- ref: r,
1308
+ ref: s,
3338
1309
  children: e
3339
1310
  }
3340
1311
  ));
3341
- Ea.displayName = "SidebarWrapper";
3342
- const Vl = () => {
3343
- const e = Bt(null), t = Ho();
1312
+ ct.displayName = "SidebarWrapper";
1313
+ const la = () => {
1314
+ const e = fe(null), t = Le();
3344
1315
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3345
1316
  /* @__PURE__ */ a.jsxs(
3346
- Ea,
1317
+ ct,
3347
1318
  {
3348
1319
  ref: e,
3349
- pushMainContent: t.data.items.length > 0,
1320
+ pushMainContent: t.sidebar.length > 0,
3350
1321
  children: [
3351
- /* @__PURE__ */ a.jsx(xe, { name: "zudoku-before-navigation" }),
3352
- t.data.items.map((n) => /* @__PURE__ */ a.jsx(It, { item: n }, n.label)),
3353
- /* @__PURE__ */ a.jsx(xe, { name: "zudoku-after-navigation" })
1322
+ /* @__PURE__ */ a.jsx(O, { name: "zudoku-before-navigation" }),
1323
+ t.sidebar.map((r) => /* @__PURE__ */ a.jsx(de, { item: r }, r.label)),
1324
+ /* @__PURE__ */ a.jsx(O, { name: "zudoku-after-navigation" })
3354
1325
  ]
3355
1326
  }
3356
1327
  ),
3357
1328
  /* @__PURE__ */ a.jsxs(
3358
- en,
1329
+ Ye,
3359
1330
  {
3360
1331
  className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none overflow-auto",
3361
1332
  "aria-describedby": void 0,
3362
1333
  children: [
3363
- /* @__PURE__ */ a.jsx(Hn, { children: /* @__PURE__ */ a.jsx(tn, { children: "Sidebar" }) }),
3364
- t.data.items.map((n) => /* @__PURE__ */ a.jsx(It, { item: n }, n.label))
1334
+ /* @__PURE__ */ a.jsx(Ge, { children: /* @__PURE__ */ a.jsx(Je, { children: "Sidebar" }) }),
1335
+ t.sidebar.map((r) => /* @__PURE__ */ a.jsx(de, { item: r }, r.label))
3365
1336
  ]
3366
1337
  }
3367
1338
  )
3368
1339
  ] });
3369
- }, Gl = ({ children: e }) => {
3370
- const t = $t(), { setActiveAnchor: n } = Lt(), { meta: r, authentication: o } = qe();
3371
- ql(), Ql();
3372
- const s = Bt(t.pathname);
3373
- return Ce(() => {
1340
+ }, ca = ({ children: e }) => {
1341
+ const t = pe(), { setActiveAnchor: r } = xe(), { meta: s, authentication: n } = Q();
1342
+ Zr(), Wr();
1343
+ const o = fe(t.pathname);
1344
+ return z(() => {
3374
1345
  var i;
3375
- (i = o == null ? void 0 : o.pageLoad) == null || i.call(o);
3376
- }, [o]), Ce(() => {
3377
- t.pathname !== s.current && n(""), s.current = t.pathname;
3378
- }, [t.pathname, n]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1346
+ (i = n == null ? void 0 : n.pageLoad) == null || i.call(n);
1347
+ }, [n]), z(() => {
1348
+ t.pathname !== o.current && r(""), o.current = t.pathname;
1349
+ }, [t.pathname, r]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3379
1350
  !1,
3380
- /* @__PURE__ */ a.jsxs(At, { titleTemplate: r == null ? void 0 : r.title, children: [
3381
- (r == null ? void 0 : r.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: r.description }),
3382
- (r == null ? void 0 : r.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: r.favicon })
1351
+ /* @__PURE__ */ a.jsxs(he, { titleTemplate: s == null ? void 0 : s.title, children: [
1352
+ (s == null ? void 0 : s.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: s.description }),
1353
+ (s == null ? void 0 : s.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: s.favicon })
3383
1354
  ] }),
3384
- /* @__PURE__ */ a.jsx(xe, { name: "layout-before-head" }),
3385
- /* @__PURE__ */ a.jsx(Sa, {}),
3386
- /* @__PURE__ */ a.jsx(xe, { name: "layout-after-head" }),
1355
+ /* @__PURE__ */ a.jsx(O, { name: "layout-before-head" }),
1356
+ /* @__PURE__ */ a.jsx(lt, {}),
1357
+ /* @__PURE__ */ a.jsx(O, { name: "layout-after-head" }),
3387
1358
  /* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
3388
- Qn,
1359
+ me,
3389
1360
  {
3390
- fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(is, {}) }),
3391
- children: /* @__PURE__ */ a.jsxs(Zt, { direction: "left", children: [
3392
- /* @__PURE__ */ a.jsx(Vl, {}),
1361
+ fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(br, {}) }),
1362
+ children: /* @__PURE__ */ a.jsxs(Ze, { direction: "left", children: [
1363
+ /* @__PURE__ */ a.jsx(la, {}),
3393
1364
  /* @__PURE__ */ a.jsx(
3394
1365
  "div",
3395
1366
  {
3396
- className: $(
1367
+ className: R(
3397
1368
  "lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
3398
1369
  "peer-data-[navigation=false]:hidden"
3399
1370
  ),
3400
- children: /* @__PURE__ */ a.jsxs(wa, { className: "flex items-center gap-2", children: [
3401
- /* @__PURE__ */ a.jsx(Yo, { size: 16, strokeWidth: 1.5 }),
1371
+ children: /* @__PURE__ */ a.jsxs(We, { className: "flex items-center gap-2", children: [
1372
+ /* @__PURE__ */ a.jsx(ar, { size: 16, strokeWidth: 1.5 }),
3402
1373
  /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
3403
1374
  ] })
3404
1375
  }
@@ -3406,7 +1377,7 @@ const Vl = () => {
3406
1377
  /* @__PURE__ */ a.jsxs(
3407
1378
  "main",
3408
1379
  {
3409
- className: $(
1380
+ className: R(
3410
1381
  "h-full dark:border-white/10 translate-x-0",
3411
1382
  "lg:overflow-visible",
3412
1383
  // This works in tandem with the `SidebarWrapper` component
@@ -3414,9 +1385,9 @@ const Vl = () => {
3414
1385
  "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
3415
1386
  ),
3416
1387
  children: [
3417
- /* @__PURE__ */ a.jsx(xe, { name: "zudoku-before-content" }),
3418
- e ?? /* @__PURE__ */ a.jsx(In, {}),
3419
- /* @__PURE__ */ a.jsx(xe, { name: "zudoku-after-content" })
1388
+ /* @__PURE__ */ a.jsx(O, { name: "zudoku-before-content" }),
1389
+ e ?? /* @__PURE__ */ a.jsx(Ve, {}),
1390
+ /* @__PURE__ */ a.jsx(O, { name: "zudoku-after-content" })
3420
1391
  ]
3421
1392
  }
3422
1393
  )
@@ -3424,18 +1395,193 @@ const Vl = () => {
3424
1395
  }
3425
1396
  ) })
3426
1397
  ] });
3427
- }, fc = qa, hc = yo, pc = Ma, mc = Gl, gc = kt, vc = Za, wc = ls, xc = Rs, yc = Es, bc = jt, Sc = At;
1398
+ }, ua = $e(null), le = {
1399
+ didCatch: !1,
1400
+ error: null
1401
+ };
1402
+ class da extends Lt {
1403
+ constructor(t) {
1404
+ super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = le;
1405
+ }
1406
+ static getDerivedStateFromError(t) {
1407
+ return {
1408
+ didCatch: !0,
1409
+ error: t
1410
+ };
1411
+ }
1412
+ resetErrorBoundary() {
1413
+ const {
1414
+ error: t
1415
+ } = this.state;
1416
+ if (t !== null) {
1417
+ for (var r, s, n = arguments.length, o = new Array(n), i = 0; i < n; i++)
1418
+ o[i] = arguments[i];
1419
+ (r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
1420
+ args: o,
1421
+ reason: "imperative-api"
1422
+ }), this.setState(le);
1423
+ }
1424
+ }
1425
+ componentDidCatch(t, r) {
1426
+ var s, n;
1427
+ (s = (n = this.props).onError) === null || s === void 0 || s.call(n, t, r);
1428
+ }
1429
+ componentDidUpdate(t, r) {
1430
+ const {
1431
+ didCatch: s
1432
+ } = this.state, {
1433
+ resetKeys: n
1434
+ } = this.props;
1435
+ if (s && r.error !== null && ha(t.resetKeys, n)) {
1436
+ var o, i;
1437
+ (o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
1438
+ next: n,
1439
+ prev: t.resetKeys,
1440
+ reason: "keys"
1441
+ }), this.setState(le);
1442
+ }
1443
+ }
1444
+ render() {
1445
+ const {
1446
+ children: t,
1447
+ fallbackRender: r,
1448
+ FallbackComponent: s,
1449
+ fallback: n
1450
+ } = this.props, {
1451
+ didCatch: o,
1452
+ error: i
1453
+ } = this.state;
1454
+ let c = t;
1455
+ if (o) {
1456
+ const u = {
1457
+ error: i,
1458
+ resetErrorBoundary: this.resetErrorBoundary
1459
+ };
1460
+ if (typeof r == "function")
1461
+ c = r(u);
1462
+ else if (s)
1463
+ c = Oe(s, u);
1464
+ else if (n !== void 0)
1465
+ c = n;
1466
+ else
1467
+ throw i;
1468
+ }
1469
+ return Oe(ua.Provider, {
1470
+ value: {
1471
+ didCatch: o,
1472
+ error: i,
1473
+ resetErrorBoundary: this.resetErrorBoundary
1474
+ }
1475
+ }, c);
1476
+ }
1477
+ }
1478
+ function ha() {
1479
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1480
+ return e.length !== t.length || e.some((r, s) => !Object.is(r, t[s]));
1481
+ }
1482
+ class fa {
1483
+ constructor(t) {
1484
+ N(this, "plugins");
1485
+ N(this, "sidebars");
1486
+ N(this, "topNavigation");
1487
+ N(this, "meta");
1488
+ N(this, "page");
1489
+ N(this, "authentication");
1490
+ N(this, "navigationPlugins");
1491
+ N(this, "initialize", async () => {
1492
+ await Promise.all(
1493
+ this.plugins.filter(ea).map((t) => {
1494
+ var r;
1495
+ return (r = t.initialize) == null ? void 0 : r.call(t, this);
1496
+ })
1497
+ );
1498
+ });
1499
+ N(this, "getApiIdentities", async () => (await Promise.all(
1500
+ this.plugins.filter(aa).map((r) => r.getIdentities(this))
1501
+ )).flat());
1502
+ N(this, "getPluginSidebar", async (t) => (await Promise.all(
1503
+ this.navigationPlugins.map(
1504
+ (s) => {
1505
+ var n;
1506
+ return (n = s.getSidebar) == null ? void 0 : n.call(s, F(t));
1507
+ }
1508
+ )
1509
+ )).flatMap((s) => s ?? []));
1510
+ N(this, "signRequest", async (t) => {
1511
+ if (!this.authentication)
1512
+ throw new Error("No authentication provider configured");
1513
+ const r = await this.authentication.getAccessToken();
1514
+ return t.headers.set("Authorization", `Bearer ${r}`), t;
1515
+ });
1516
+ this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Xr), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
1517
+ }
1518
+ }
1519
+ function ma({ error: e, resetErrorBoundary: t }) {
1520
+ return /* @__PURE__ */ a.jsx(qe, { error: e });
1521
+ }
1522
+ const te = globalThis;
1523
+ (!te.requestIdleCallback || !te.cancelIdleCallback) && (te.requestIdleCallback = (e) => setTimeout(e, 1), te.cancelIdleCallback = clearTimeout);
1524
+ const ut = {
1525
+ Header: lt
1526
+ }, ga = $e(ut), pa = ga.Provider, va = ({
1527
+ children: e,
1528
+ context: t
1529
+ }) => (Qt({
1530
+ queryFn: async () => (await t.initialize(), !0),
1531
+ queryKey: ["zudoku-initialize"]
1532
+ }), /* @__PURE__ */ a.jsx(Ft.Provider, { value: t, children: e })), dt = Ke(
1533
+ ({ children: e, ...t }) => {
1534
+ var m, f;
1535
+ const r = ne(
1536
+ () => ({ ...ut, ...t.overrides }),
1537
+ [t.overrides]
1538
+ ), s = ne(() => {
1539
+ var p;
1540
+ return {
1541
+ ...(t.plugins ?? []).filter(ra).flatMap(
1542
+ (h) => h.getMdxComponents ? [h.getMdxComponents()] : []
1543
+ ).reduce(
1544
+ (h, S) => ({ ...h, ...S }),
1545
+ {}
1546
+ ),
1547
+ ...nr,
1548
+ ...(p = t.mdx) == null ? void 0 : p.components
1549
+ };
1550
+ }, [(m = t.mdx) == null ? void 0 : m.components, t.plugins]), { stagger: n } = Ut(ce), [o, i] = q(!1), c = ne(
1551
+ () => o ? { stagger: !0 } : { stagger: n },
1552
+ [n, o]
1553
+ ), u = Wt();
1554
+ z(() => {
1555
+ o || i(!0);
1556
+ }, [o, u.location]);
1557
+ const [d] = q(() => new fa(t)), x = (f = t.plugins) == null ? void 0 : f.filter(ta).map((v, p) => {
1558
+ var h;
1559
+ return /* @__PURE__ */ a.jsx(Kt, { children: (h = v.getHead) == null ? void 0 : h.call(v) }, p);
1560
+ });
1561
+ return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1562
+ /* @__PURE__ */ a.jsx(he, { children: x }),
1563
+ /* @__PURE__ */ a.jsx(ce.Provider, { value: c, children: /* @__PURE__ */ a.jsx(va, { context: d, children: /* @__PURE__ */ a.jsx(vt, { components: s, children: /* @__PURE__ */ a.jsx(yr, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ a.jsx(pa, { value: r, children: /* @__PURE__ */ a.jsx(Nt, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(ir, { children: e ?? /* @__PURE__ */ a.jsx(Ve, {}) }) }) }) }) }) }) })
1564
+ ] });
1565
+ }
1566
+ );
1567
+ dt.displayName = "ZudokoInner";
1568
+ const ht = (e) => /* @__PURE__ */ a.jsx(da, { FallbackComponent: ma, children: /* @__PURE__ */ a.jsx(dt, { ...e }) });
1569
+ ht.displayName = "Zudoku";
1570
+ const Ua = xt, Ka = ca, $a = Ct, Va = jr, Za = Ur, Wa = Kr, Ya = he, Ja = Q, Xa = wt, Ga = ht, es = Pt, ts = ve, rs = St, as = se;
3428
1571
  export {
3429
- xc as Bootstrap,
3430
- yc as BootstrapStatic,
3431
- bc as Button,
3432
- hc as Callout,
3433
- pc as DevPortal,
3434
- Sc as Head,
3435
- mc as Layout,
3436
- gc as Link,
3437
- vc as RouterError,
3438
- wc as ServerError,
3439
- fc as useMDXComponents
1572
+ Za as Bootstrap,
1573
+ Wa as BootstrapStatic,
1574
+ rs as Button,
1575
+ es as Callout,
1576
+ ts as ClientOnly,
1577
+ Ya as Head,
1578
+ Ka as Layout,
1579
+ as as Link,
1580
+ $a as RouterError,
1581
+ Va as ServerError,
1582
+ Ga as Zudoku,
1583
+ Xa as useAuth,
1584
+ Ua as useMDXComponents,
1585
+ Ja as useZudoku
3440
1586
  };
3441
1587
  //# sourceMappingURL=zudoku.components.js.map