zudoku 0.0.0-fed343e → 0.0.0-feda542

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