zudoku 0.0.0-f417aae → 0.0.0-f471fb8

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