zudoku 0.38.0 → 0.39.1

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 (269) hide show
  1. package/dist/app/entry.server.d.ts +5 -4
  2. package/dist/app/entry.server.js +2 -2
  3. package/dist/app/entry.server.js.map +1 -1
  4. package/dist/app/tailwind.js +14 -0
  5. package/dist/app/tailwind.js.map +1 -1
  6. package/dist/cli/cmds/dev.js +1 -7
  7. package/dist/cli/cmds/dev.js.map +1 -1
  8. package/dist/config/validators/common.d.ts +17 -0
  9. package/dist/config/validators/common.js +1 -0
  10. package/dist/config/validators/common.js.map +1 -1
  11. package/dist/config/validators/validate.d.ts +7 -0
  12. package/dist/lib/components/Bootstrap.d.ts +2 -1
  13. package/dist/lib/components/Bootstrap.js +3 -2
  14. package/dist/lib/components/Bootstrap.js.map +1 -1
  15. package/dist/lib/components/Header.js +2 -2
  16. package/dist/lib/components/Header.js.map +1 -1
  17. package/dist/lib/components/Heading.d.ts +1 -1
  18. package/dist/lib/components/Layout.js +2 -9
  19. package/dist/lib/components/Layout.js.map +1 -1
  20. package/dist/lib/components/Main.js +3 -1
  21. package/dist/lib/components/Main.js.map +1 -1
  22. package/dist/lib/components/MobileTopNavigation.js +6 -3
  23. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  24. package/dist/lib/components/Pagination.d.ts +10 -0
  25. package/dist/lib/components/Pagination.js +10 -0
  26. package/dist/lib/components/Pagination.js.map +1 -0
  27. package/dist/lib/components/TopNavigation.d.ts +1 -0
  28. package/dist/lib/components/TopNavigation.js +18 -2
  29. package/dist/lib/components/TopNavigation.js.map +1 -1
  30. package/dist/lib/components/Zudoku.js +4 -1
  31. package/dist/lib/components/Zudoku.js.map +1 -1
  32. package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
  33. package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
  34. package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
  35. package/dist/lib/components/index.d.ts +2 -1
  36. package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
  37. package/dist/lib/components/navigation/PoweredByZudoku.js +6 -0
  38. package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
  39. package/dist/lib/components/navigation/SidebarItem.d.ts +1 -0
  40. package/dist/lib/components/navigation/SidebarItem.js +7 -3
  41. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  42. package/dist/lib/components/navigation/SidebarWrapper.js +9 -2
  43. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  44. package/dist/lib/{plugins/markdown → components/navigation}/Toc.js +5 -7
  45. package/dist/lib/components/navigation/Toc.js.map +1 -0
  46. package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
  47. package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
  48. package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
  49. package/dist/lib/core/RouteGuard.d.ts +1 -0
  50. package/dist/lib/core/RouteGuard.js +9 -3
  51. package/dist/lib/core/RouteGuard.js.map +1 -1
  52. package/dist/lib/core/ZudokuContext.d.ts +1 -0
  53. package/dist/lib/core/ZudokuContext.js.map +1 -1
  54. package/dist/lib/oas/graphql/index.d.ts +2 -1
  55. package/dist/lib/oas/graphql/index.js +74 -14
  56. package/dist/lib/oas/graphql/index.js.map +1 -1
  57. package/dist/lib/oas/parser/dereference/index.js +2 -0
  58. package/dist/lib/oas/parser/dereference/index.js.map +1 -1
  59. package/dist/lib/oas/parser/index.d.ts +5 -3
  60. package/dist/lib/oas/parser/index.js +0 -22
  61. package/dist/lib/oas/parser/index.js.map +1 -1
  62. package/dist/lib/plugins/api-catalog/index.js +19 -17
  63. package/dist/lib/plugins/api-catalog/index.js.map +1 -1
  64. package/dist/lib/plugins/markdown/MdxPage.js +3 -3
  65. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  66. package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
  67. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  68. package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
  69. package/dist/lib/plugins/openapi/OperationList.js +28 -8
  70. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  71. package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
  72. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  73. package/dist/lib/plugins/openapi/ParameterListItem.js +2 -1
  74. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  75. package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
  76. package/dist/lib/plugins/openapi/SchemaList.js +52 -0
  77. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
  78. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
  79. package/dist/lib/plugins/openapi/client/GraphQLClient.js +1 -1
  80. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
  81. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +6 -2
  82. package/dist/lib/plugins/openapi/client/useCreateQuery.js +5 -5
  83. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
  84. package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
  85. package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
  86. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -2
  87. package/dist/lib/plugins/openapi/graphql/gql.js +3 -2
  88. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  89. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +67 -11
  90. package/dist/lib/plugins/openapi/graphql/graphql.js +34 -5
  91. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  92. package/dist/lib/plugins/openapi/index.js +12 -0
  93. package/dist/lib/plugins/openapi/index.js.map +1 -1
  94. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
  95. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
  96. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
  97. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
  98. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
  99. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
  100. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
  101. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
  102. package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
  103. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
  104. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +12 -0
  105. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
  106. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +2 -4
  107. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +12 -9
  108. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  109. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -2
  110. package/dist/lib/plugins/openapi/schema/SchemaView.js +30 -52
  111. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  112. package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
  113. package/dist/lib/plugins/openapi/schema/utils.js +3 -1
  114. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  115. package/dist/lib/plugins/openapi/util/getRoutes.js +9 -3
  116. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  117. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +9 -4
  118. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  119. package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
  120. package/dist/lib/plugins/search-pagefind/ResultList.js +6 -12
  121. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  122. package/dist/lib/plugins/search-pagefind/index.d.ts +1 -3
  123. package/dist/lib/util/useOnScreen.d.ts +3 -2
  124. package/dist/lib/util/useOnScreen.js +3 -3
  125. package/dist/lib/util/useOnScreen.js.map +1 -1
  126. package/dist/vite/api/schema-codegen.js +2 -2
  127. package/dist/vite/api/schema-codegen.js.map +1 -1
  128. package/dist/vite/api/schema-codegen.test.js +5 -0
  129. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  130. package/dist/vite/build.js +1 -9
  131. package/dist/vite/build.js.map +1 -1
  132. package/dist/vite/plugin-api.js +8 -7
  133. package/dist/vite/plugin-api.js.map +1 -1
  134. package/dist/vite/plugin-search.js +1 -1
  135. package/dist/vite/plugin-search.js.map +1 -1
  136. package/dist/vite/prerender/FileWritingResponse.d.ts +9 -5
  137. package/dist/vite/prerender/FileWritingResponse.js +5 -5
  138. package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
  139. package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
  140. package/dist/vite/prerender/InMemoryResponse.js +32 -0
  141. package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
  142. package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
  143. package/dist/vite/prerender/PrerenderResponse.js +2 -0
  144. package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
  145. package/dist/vite/prerender/prerender.d.ts +1 -0
  146. package/dist/vite/prerender/prerender.js +18 -0
  147. package/dist/vite/prerender/prerender.js.map +1 -1
  148. package/dist/vite/prerender/worker.js +36 -8
  149. package/dist/vite/prerender/worker.js.map +1 -1
  150. package/dist/zuplo/with-zuplo.js +4 -0
  151. package/dist/zuplo/with-zuplo.js.map +1 -1
  152. package/lib/{AuthenticationPlugin-Duy_R1TU.js → AuthenticationPlugin-foqdvvkf.js} +2 -2
  153. package/lib/{AuthenticationPlugin-Duy_R1TU.js.map → AuthenticationPlugin-foqdvvkf.js.map} +1 -1
  154. package/lib/{Markdown-DIZ8nBVC.js → Markdown-aF5FdsNi.js} +1339 -1335
  155. package/lib/{Markdown-DIZ8nBVC.js.map → Markdown-aF5FdsNi.js.map} +1 -1
  156. package/lib/MdxPage-JscVnWM8.js +84 -0
  157. package/lib/MdxPage-JscVnWM8.js.map +1 -0
  158. package/lib/{OasProvider-D1A10JeA.js → OasProvider-C7Y53snX.js} +3 -3
  159. package/lib/{OasProvider-D1A10JeA.js.map → OasProvider-C7Y53snX.js.map} +1 -1
  160. package/lib/OperationList-_M8wg22T.js +5066 -0
  161. package/lib/OperationList-_M8wg22T.js.map +1 -0
  162. package/lib/Pagination-DCCvGq0m.js +46 -0
  163. package/lib/Pagination-DCCvGq0m.js.map +1 -0
  164. package/lib/RouteGuard-CqZPoZYJ.js +744 -0
  165. package/lib/RouteGuard-CqZPoZYJ.js.map +1 -0
  166. package/lib/SchemaList-CrKZdUyo.js +148 -0
  167. package/lib/SchemaList-CrKZdUyo.js.map +1 -0
  168. package/lib/SchemaView-B4JHn-BX.js +354 -0
  169. package/lib/SchemaView-B4JHn-BX.js.map +1 -0
  170. package/lib/{Select-fAYcJ0OU.js → Select-DVFRKf1R.js} +3 -3
  171. package/lib/{Select-fAYcJ0OU.js.map → Select-DVFRKf1R.js.map} +1 -1
  172. package/lib/{SlotletProvider-BEwNY8q0.js → SlotletProvider-DXvc0aY6.js} +2 -2
  173. package/lib/{SlotletProvider-BEwNY8q0.js.map → SlotletProvider-DXvc0aY6.js.map} +1 -1
  174. package/lib/Toc-YBsgI72s.js +92 -0
  175. package/lib/Toc-YBsgI72s.js.map +1 -0
  176. package/lib/{createServer-DjgKDpGV.js → createServer-mYvGvmc0.js} +2596 -2502
  177. package/lib/createServer-mYvGvmc0.js.map +1 -0
  178. package/lib/{hook-Cge6LiTK.js → hook-CqpVYDqN.js} +28 -28
  179. package/lib/{hook-Cge6LiTK.js.map → hook-CqpVYDqN.js.map} +1 -1
  180. package/lib/{index-B0y3fTg-.js → index-C8-tlf_X.js} +771 -729
  181. package/lib/index-C8-tlf_X.js.map +1 -0
  182. package/lib/index-D6ktNq4i.js +1863 -0
  183. package/lib/index-D6ktNq4i.js.map +1 -0
  184. package/lib/{mutation-EChriCeF.js → mutation-8LjrN7uz.js} +2 -2
  185. package/lib/{mutation-EChriCeF.js.map → mutation-8LjrN7uz.js.map} +1 -1
  186. package/lib/objectEntries-yMIkr2mI.js +5 -0
  187. package/lib/objectEntries-yMIkr2mI.js.map +1 -0
  188. package/lib/useLatest-hmRS46UF.js +11 -0
  189. package/lib/useLatest-hmRS46UF.js.map +1 -0
  190. package/lib/zudoku.auth-auth0.js +1 -1
  191. package/lib/zudoku.auth-clerk.js +2 -2
  192. package/lib/zudoku.auth-openid.js +2 -2
  193. package/lib/zudoku.components.js +32 -1454
  194. package/lib/zudoku.components.js.map +1 -1
  195. package/lib/zudoku.hooks.js +1 -1
  196. package/lib/zudoku.plugin-api-catalog.js +80 -76
  197. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  198. package/lib/zudoku.plugin-api-keys.js +3 -3
  199. package/lib/zudoku.plugin-custom-pages.js +1 -1
  200. package/lib/zudoku.plugin-markdown.js +1 -1
  201. package/lib/zudoku.plugin-openapi.js +2 -2
  202. package/lib/zudoku.plugin-search-pagefind.js +132 -137
  203. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  204. package/package.json +6 -5
  205. package/src/app/entry.server.tsx +6 -3
  206. package/src/app/tailwind.ts +14 -0
  207. package/src/lib/components/Bootstrap.tsx +13 -6
  208. package/src/lib/components/Header.tsx +2 -2
  209. package/src/lib/components/Layout.tsx +5 -17
  210. package/src/lib/components/Main.tsx +6 -3
  211. package/src/lib/components/MobileTopNavigation.tsx +27 -18
  212. package/src/lib/components/Pagination.tsx +47 -0
  213. package/src/lib/components/TopNavigation.tsx +29 -2
  214. package/src/lib/components/Zudoku.tsx +5 -3
  215. package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
  216. package/src/lib/components/navigation/PoweredByZudoku.tsx +23 -0
  217. package/src/lib/components/navigation/SidebarItem.tsx +10 -4
  218. package/src/lib/components/navigation/SidebarWrapper.tsx +27 -13
  219. package/src/lib/{plugins/markdown → components/navigation}/Toc.tsx +5 -14
  220. package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
  221. package/src/lib/core/RouteGuard.tsx +26 -4
  222. package/src/lib/core/ZudokuContext.ts +1 -0
  223. package/src/lib/oas/graphql/index.ts +118 -45
  224. package/src/lib/oas/parser/dereference/index.ts +2 -0
  225. package/src/lib/oas/parser/index.ts +7 -29
  226. package/src/lib/plugins/api-catalog/index.tsx +40 -35
  227. package/src/lib/plugins/markdown/MdxPage.tsx +6 -36
  228. package/src/lib/plugins/openapi/ColorizedParam.tsx +1 -1
  229. package/src/lib/plugins/openapi/OperationList.tsx +36 -15
  230. package/src/lib/plugins/openapi/OperationListItem.tsx +7 -2
  231. package/src/lib/plugins/openapi/ParameterListItem.tsx +2 -0
  232. package/src/lib/plugins/openapi/SchemaList.tsx +151 -0
  233. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +1 -1
  234. package/src/lib/plugins/openapi/client/useCreateQuery.ts +12 -5
  235. package/src/lib/plugins/openapi/components/EnumValues.tsx +1 -1
  236. package/src/lib/plugins/openapi/graphql/gql.ts +15 -6
  237. package/src/lib/plugins/openapi/graphql/graphql.ts +104 -15
  238. package/src/lib/plugins/openapi/index.tsx +13 -0
  239. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
  240. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
  241. package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
  242. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +36 -0
  243. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +20 -21
  244. package/src/lib/plugins/openapi/schema/SchemaView.tsx +69 -141
  245. package/src/lib/plugins/openapi/schema/utils.ts +7 -1
  246. package/src/lib/plugins/openapi/util/getRoutes.tsx +9 -6
  247. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +11 -4
  248. package/src/lib/plugins/search-pagefind/ResultList.tsx +5 -16
  249. package/src/lib/plugins/search-pagefind/index.tsx +1 -1
  250. package/src/lib/util/useOnScreen.ts +6 -4
  251. package/dist/cli/dev/pagefind-command.d.ts +0 -3
  252. package/dist/cli/dev/pagefind-command.js +0 -59
  253. package/dist/cli/dev/pagefind-command.js.map +0 -1
  254. package/dist/lib/components/context/PluginSystem.d.ts +0 -1
  255. package/dist/lib/components/context/PluginSystem.js +0 -2
  256. package/dist/lib/components/context/PluginSystem.js.map +0 -1
  257. package/dist/lib/plugins/markdown/Toc.js.map +0 -1
  258. package/lib/MdxPage-JEdbfW-f.js +0 -195
  259. package/lib/MdxPage-JEdbfW-f.js.map +0 -1
  260. package/lib/OperationList-yOmYzMIp.js +0 -5379
  261. package/lib/OperationList-yOmYzMIp.js.map +0 -1
  262. package/lib/createServer-DjgKDpGV.js.map +0 -1
  263. package/lib/index-B0y3fTg-.js.map +0 -1
  264. package/lib/index.esm-CltAN0Tf.js +0 -711
  265. package/lib/index.esm-CltAN0Tf.js.map +0 -1
  266. package/lib/objectEntries-BS7aAgOm.js +0 -12
  267. package/lib/objectEntries-BS7aAgOm.js.map +0 -1
  268. package/src/lib/components/context/PluginSystem.ts +0 -0
  269. /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
@@ -1,1457 +1,35 @@
1
- var ut = Object.defineProperty;
2
- var ye = (t) => {
3
- throw TypeError(t);
4
- };
5
- var dt = (t, e, s) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
6
- var j = (t, e, s) => dt(t, typeof e != "symbol" ? e + "" : e, s), ve = (t, e, s) => e.has(t) || ye("Cannot " + s);
7
- var l = (t, e, s) => (ve(t, e, "read from private field"), s ? s.call(t) : e.get(t)), w = (t, e, s) => e.has(t) ? ye("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), v = (t, e, s, n) => (ve(t, e, "write to private field"), n ? n.call(t, s) : e.set(t, s), s);
8
- var J = (t, e, s, n) => ({
9
- set _(a) {
10
- v(t, e, a, s);
11
- },
12
- get _() {
13
- return l(t, e, n);
14
- }
15
- });
16
- import { a as Fe, H as le, M as ht, u as ft } from "./index.esm-CltAN0Tf.js";
17
- import { z as ze, J as mt } from "./index-DwT-v3zK.js";
18
- import { a as gt, u as _, m as pt, O as ce, R as xt, S as yt, f as ue, g as vt, L as de } from "./chunk-HA7DTUK3-C4gP41vD.js";
19
- import { S as He, p as Be, Q as bt, n as P, q as be, r as je, t as A, v as jt, w as wt, x as Pt, y as Ct, z as we, A as Pe, B as Nt, h as Ce, C as Ne, D as Dt, g as Le, l as U, a as O, m as kt, E as Ke, F as $e, G as St, d as H, u as Et, j as Ot, b as Mt, Z as qt, H as At, I as Tt } from "./hook-Cge6LiTK.js";
20
- import { j as r } from "./jsx-runtime-CYK1ROHF.js";
21
- import { D as It, a as Qt, c as Rt, b as Ft, d as zt } from "./Dialog-sbgekbjb.js";
22
- import { Z as Ht } from "./invariant-Caa8-XvF.js";
23
- import { u as Bt, o as Lt } from "./objectEntries-BS7aAgOm.js";
24
- import { E as Ue, S as D, a as Kt, R as $t } from "./SlotletProvider-BEwNY8q0.js";
25
- import { Button as Ut } from "./ui/Button.js";
26
- import { Callout as Zt } from "./ui/Callout.js";
27
- import { M as Yt } from "./mutation-EChriCeF.js";
28
- import * as I from "react";
29
- import Xt, { createContext as he, StrictMode as Ze, useRef as fe, useEffect as Y, useState as Z, useCallback as Gt, Suspense as me, memo as Ye, Component as Vt, createElement as De, useMemo as re, useContext as _t } from "react";
30
- import * as Wt from "react-dom";
31
- import { C as ge } from "./ClientOnly-E7hGysn1.js";
32
- import { s as Jt, S as ke, a as es, H as ts, P as ss, b as rs, V as ns, M as as } from "./Markdown-DIZ8nBVC.js";
33
- import { B as ie } from "./Button-Fp19CMUr.js";
34
- import { c as E } from "./cn-qaFjX9_3.js";
35
- import { isSearchPlugin as is, isProfileMenuPlugin as os, isNavigationPlugin as ls, isEventConsumerPlugin as cs, needsInitialization as us, isApiIdentityPlugin as ds, isMdxProviderPlugin as hs, hasHead as fs } from "./zudoku.plugins.js";
36
- import { DropdownMenu as ms, DropdownMenuTrigger as gs, DropdownMenuContent as ps, DropdownMenuLabel as xs, DropdownMenuSeparator as ne, DropdownMenuSub as ys, DropdownMenuSubTrigger as vs, DropdownMenuPortal as bs, DropdownMenuSubContent as js, DropdownMenuItem as ws } from "./ui/DropdownMenu.js";
37
- import { CircleXIcon as Ps, SearchIcon as Cs, SunIcon as Ns, MoonIcon as Ds, MenuIcon as ks, PanelLeftIcon as Ss } from "lucide-react";
38
- import { VisuallyHidden as Xe } from "@radix-ui/react-visually-hidden";
39
- import { D as Es, a as Os, b as Ge, c as Ve, d as M } from "./Drawer-kDAfOq_2.js";
40
- import { a as Ms } from "./index-CPNSgwSb.js";
41
- import { S as _e } from "./Spinner-CE68iCm0.js";
42
- import { C as qs } from "./CategoryHeading-DpB47wvk.js";
43
- var S, Ie, As = (Ie = class extends He {
44
- constructor(e = {}) {
45
- super();
46
- w(this, S);
47
- this.config = e, v(this, S, /* @__PURE__ */ new Map());
48
- }
49
- build(e, s, n) {
50
- const a = s.queryKey, o = s.queryHash ?? Be(a, s);
51
- let i = this.get(o);
52
- return i || (i = new bt({
53
- client: e,
54
- queryKey: a,
55
- queryHash: o,
56
- options: e.defaultQueryOptions(s),
57
- state: n,
58
- defaultOptions: e.getQueryDefaults(a)
59
- }), this.add(i)), i;
60
- }
61
- add(e) {
62
- l(this, S).has(e.queryHash) || (l(this, S).set(e.queryHash, e), this.notify({
63
- type: "added",
64
- query: e
65
- }));
66
- }
67
- remove(e) {
68
- const s = l(this, S).get(e.queryHash);
69
- s && (e.destroy(), s === e && l(this, S).delete(e.queryHash), this.notify({ type: "removed", query: e }));
70
- }
71
- clear() {
72
- P.batch(() => {
73
- this.getAll().forEach((e) => {
74
- this.remove(e);
75
- });
76
- });
77
- }
78
- get(e) {
79
- return l(this, S).get(e);
80
- }
81
- getAll() {
82
- return [...l(this, S).values()];
83
- }
84
- find(e) {
85
- const s = { exact: !0, ...e };
86
- return this.getAll().find(
87
- (n) => be(s, n)
88
- );
89
- }
90
- findAll(e = {}) {
91
- const s = this.getAll();
92
- return Object.keys(e).length > 0 ? s.filter((n) => be(e, n)) : s;
93
- }
94
- notify(e) {
95
- P.batch(() => {
96
- this.listeners.forEach((s) => {
97
- s(e);
98
- });
99
- });
100
- }
101
- onFocus() {
102
- P.batch(() => {
103
- this.getAll().forEach((e) => {
104
- e.onFocus();
105
- });
106
- });
107
- }
108
- onOnline() {
109
- P.batch(() => {
110
- this.getAll().forEach((e) => {
111
- e.onOnline();
112
- });
113
- });
114
- }
115
- }, S = new WeakMap(), Ie), T, N, V, Qe, Ts = (Qe = class extends He {
116
- constructor(e = {}) {
117
- super();
118
- w(this, T);
119
- w(this, N);
120
- w(this, V);
121
- this.config = e, v(this, T, /* @__PURE__ */ new Set()), v(this, N, /* @__PURE__ */ new Map()), v(this, V, 0);
122
- }
123
- build(e, s, n) {
124
- const a = new Yt({
125
- mutationCache: this,
126
- mutationId: ++J(this, V)._,
127
- options: e.defaultMutationOptions(s),
128
- state: n
129
- });
130
- return this.add(a), a;
131
- }
132
- add(e) {
133
- l(this, T).add(e);
134
- const s = ee(e);
135
- if (typeof s == "string") {
136
- const n = l(this, N).get(s);
137
- n ? n.push(e) : l(this, N).set(s, [e]);
138
- }
139
- this.notify({ type: "added", mutation: e });
140
- }
141
- remove(e) {
142
- if (l(this, T).delete(e)) {
143
- const s = ee(e);
144
- if (typeof s == "string") {
145
- const n = l(this, N).get(s);
146
- if (n)
147
- if (n.length > 1) {
148
- const a = n.indexOf(e);
149
- a !== -1 && n.splice(a, 1);
150
- } else n[0] === e && l(this, N).delete(s);
151
- }
152
- }
153
- this.notify({ type: "removed", mutation: e });
154
- }
155
- canRun(e) {
156
- const s = ee(e);
157
- if (typeof s == "string") {
158
- const n = l(this, N).get(s), a = n == null ? void 0 : n.find(
159
- (o) => o.state.status === "pending"
160
- );
161
- return !a || a === e;
162
- } else
163
- return !0;
164
- }
165
- runNext(e) {
166
- var n;
167
- const s = ee(e);
168
- if (typeof s == "string") {
169
- const a = (n = l(this, N).get(s)) == null ? void 0 : n.find((o) => o !== e && o.state.isPaused);
170
- return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
171
- } else
172
- return Promise.resolve();
173
- }
174
- clear() {
175
- P.batch(() => {
176
- l(this, T).forEach((e) => {
177
- this.notify({ type: "removed", mutation: e });
178
- }), l(this, T).clear(), l(this, N).clear();
179
- });
180
- }
181
- getAll() {
182
- return Array.from(l(this, T));
183
- }
184
- find(e) {
185
- const s = { exact: !0, ...e };
186
- return this.getAll().find(
187
- (n) => je(s, n)
188
- );
189
- }
190
- findAll(e = {}) {
191
- return this.getAll().filter((s) => je(e, s));
192
- }
193
- notify(e) {
194
- P.batch(() => {
195
- this.listeners.forEach((s) => {
196
- s(e);
197
- });
198
- });
199
- }
200
- resumePausedMutations() {
201
- const e = this.getAll().filter((s) => s.state.isPaused);
202
- return P.batch(
203
- () => Promise.all(
204
- e.map((s) => s.continue().catch(A))
205
- )
206
- );
207
- }
208
- }, T = new WeakMap(), N = new WeakMap(), V = new WeakMap(), Qe);
209
- function ee(t) {
210
- var e;
211
- return (e = t.options.scope) == null ? void 0 : e.id;
212
- }
213
- function Se(t) {
214
- return {
215
- onFetch: (e, s) => {
216
- var x, f, h, p, C;
217
- const n = e.options, a = (h = (f = (x = e.fetchOptions) == null ? void 0 : x.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, o = ((p = e.state.data) == null ? void 0 : p.pages) || [], i = ((C = e.state.data) == null ? void 0 : C.pageParams) || [];
218
- let u = { pages: [], pageParams: [] }, d = 0;
219
- const c = async () => {
220
- let m = !1;
221
- const y = (b) => {
222
- Object.defineProperty(b, "signal", {
223
- enumerable: !0,
224
- get: () => (e.signal.aborted ? m = !0 : e.signal.addEventListener("abort", () => {
225
- m = !0;
226
- }), e.signal)
227
- });
228
- }, q = jt(e.options, e.fetchOptions), z = async (b, k, X) => {
229
- if (m)
230
- return Promise.reject();
231
- if (k == null && b.pages.length)
232
- return Promise.resolve(b);
233
- const W = {
234
- client: e.client,
235
- queryKey: e.queryKey,
236
- pageParam: k,
237
- direction: X ? "backward" : "forward",
238
- meta: e.options.meta
239
- };
240
- y(W);
241
- const ct = await q(
242
- W
243
- ), { maxPages: pe } = e.options, xe = X ? wt : Pt;
244
- return {
245
- pages: xe(b.pages, ct, pe),
246
- pageParams: xe(b.pageParams, k, pe)
247
- };
248
- };
249
- if (a && o.length) {
250
- const b = a === "backward", k = b ? Is : Ee, X = {
251
- pages: o,
252
- pageParams: i
253
- }, W = k(n, X);
254
- u = await z(X, W, b);
255
- } else {
256
- const b = t ?? o.length;
257
- do {
258
- const k = d === 0 ? i[0] ?? n.initialPageParam : Ee(n, u);
259
- if (d > 0 && k == null)
260
- break;
261
- u = await z(u, k), d++;
262
- } while (d < b);
263
- }
264
- return u;
265
- };
266
- e.options.persister ? e.fetchFn = () => {
267
- var m, y;
268
- return (y = (m = e.options).persister) == null ? void 0 : y.call(
269
- m,
270
- c,
271
- {
272
- client: e.client,
273
- queryKey: e.queryKey,
274
- meta: e.options.meta,
275
- signal: e.signal
276
- },
277
- s
278
- );
279
- } : e.fetchFn = c;
280
- }
281
- };
282
- }
283
- function Ee(t, { pages: e, pageParams: s }) {
284
- const n = e.length - 1;
285
- return e.length > 0 ? t.getNextPageParam(
286
- e[n],
287
- e,
288
- s[n],
289
- s
290
- ) : void 0;
291
- }
292
- function Is(t, { pages: e, pageParams: s }) {
293
- var n;
294
- return e.length > 0 ? (n = t.getPreviousPageParam) == null ? void 0 : n.call(t, e[0], e, s[0], s) : void 0;
295
- }
296
- var g, Q, R, B, L, F, K, $, Re, Qs = (Re = class {
297
- constructor(t = {}) {
298
- w(this, g);
299
- w(this, Q);
300
- w(this, R);
301
- w(this, B);
302
- w(this, L);
303
- w(this, F);
304
- w(this, K);
305
- w(this, $);
306
- v(this, g, t.queryCache || new As()), v(this, Q, t.mutationCache || new Ts()), v(this, R, t.defaultOptions || {}), v(this, B, /* @__PURE__ */ new Map()), v(this, L, /* @__PURE__ */ new Map()), v(this, F, 0);
307
- }
308
- mount() {
309
- J(this, F)._++, l(this, F) === 1 && (v(this, K, Ct.subscribe(async (t) => {
310
- t && (await this.resumePausedMutations(), l(this, g).onFocus());
311
- })), v(this, $, we.subscribe(async (t) => {
312
- t && (await this.resumePausedMutations(), l(this, g).onOnline());
313
- })));
314
- }
315
- unmount() {
316
- var t, e;
317
- J(this, F)._--, l(this, F) === 0 && ((t = l(this, K)) == null || t.call(this), v(this, K, void 0), (e = l(this, $)) == null || e.call(this), v(this, $, void 0));
318
- }
319
- isFetching(t) {
320
- return l(this, g).findAll({ ...t, fetchStatus: "fetching" }).length;
321
- }
322
- isMutating(t) {
323
- return l(this, Q).findAll({ ...t, status: "pending" }).length;
324
- }
325
- getQueryData(t) {
326
- var s;
327
- const e = this.defaultQueryOptions({ queryKey: t });
328
- return (s = l(this, g).get(e.queryHash)) == null ? void 0 : s.state.data;
329
- }
330
- ensureQueryData(t) {
331
- const e = this.defaultQueryOptions(t), s = l(this, g).build(this, e), n = s.state.data;
332
- return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && s.isStaleByTime(Pe(e.staleTime, s)) && this.prefetchQuery(e), Promise.resolve(n));
333
- }
334
- getQueriesData(t) {
335
- return l(this, g).findAll(t).map(({ queryKey: e, state: s }) => {
336
- const n = s.data;
337
- return [e, n];
338
- });
339
- }
340
- setQueryData(t, e, s) {
341
- const n = this.defaultQueryOptions({ queryKey: t }), a = l(this, g).get(
342
- n.queryHash
343
- ), o = a == null ? void 0 : a.state.data, i = Nt(e, o);
344
- if (i !== void 0)
345
- return l(this, g).build(this, n).setData(i, { ...s, manual: !0 });
346
- }
347
- setQueriesData(t, e, s) {
348
- return P.batch(
349
- () => l(this, g).findAll(t).map(({ queryKey: n }) => [
350
- n,
351
- this.setQueryData(n, e, s)
352
- ])
353
- );
354
- }
355
- getQueryState(t) {
356
- var s;
357
- const e = this.defaultQueryOptions({ queryKey: t });
358
- return (s = l(this, g).get(
359
- e.queryHash
360
- )) == null ? void 0 : s.state;
361
- }
362
- removeQueries(t) {
363
- const e = l(this, g);
364
- P.batch(() => {
365
- e.findAll(t).forEach((s) => {
366
- e.remove(s);
367
- });
368
- });
369
- }
370
- resetQueries(t, e) {
371
- const s = l(this, g), n = {
372
- type: "active",
373
- ...t
374
- };
375
- return P.batch(() => (s.findAll(t).forEach((a) => {
376
- a.reset();
377
- }), this.refetchQueries(n, e)));
378
- }
379
- cancelQueries(t, e = {}) {
380
- const s = { revert: !0, ...e }, n = P.batch(
381
- () => l(this, g).findAll(t).map((a) => a.cancel(s))
382
- );
383
- return Promise.all(n).then(A).catch(A);
384
- }
385
- invalidateQueries(t, e = {}) {
386
- return P.batch(() => {
387
- if (l(this, g).findAll(t).forEach((n) => {
388
- n.invalidate();
389
- }), (t == null ? void 0 : t.refetchType) === "none")
390
- return Promise.resolve();
391
- const s = {
392
- ...t,
393
- type: (t == null ? void 0 : t.refetchType) ?? (t == null ? void 0 : t.type) ?? "active"
394
- };
395
- return this.refetchQueries(s, e);
396
- });
397
- }
398
- refetchQueries(t, e = {}) {
399
- const s = {
400
- ...e,
401
- cancelRefetch: e.cancelRefetch ?? !0
402
- }, n = P.batch(
403
- () => l(this, g).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
404
- let o = a.fetch(void 0, s);
405
- return s.throwOnError || (o = o.catch(A)), a.state.fetchStatus === "paused" ? Promise.resolve() : o;
406
- })
407
- );
408
- return Promise.all(n).then(A);
409
- }
410
- fetchQuery(t) {
411
- const e = this.defaultQueryOptions(t);
412
- e.retry === void 0 && (e.retry = !1);
413
- const s = l(this, g).build(this, e);
414
- return s.isStaleByTime(
415
- Pe(e.staleTime, s)
416
- ) ? s.fetch(e) : Promise.resolve(s.state.data);
417
- }
418
- prefetchQuery(t) {
419
- return this.fetchQuery(t).then(A).catch(A);
420
- }
421
- fetchInfiniteQuery(t) {
422
- return t.behavior = Se(t.pages), this.fetchQuery(t);
423
- }
424
- prefetchInfiniteQuery(t) {
425
- return this.fetchInfiniteQuery(t).then(A).catch(A);
426
- }
427
- ensureInfiniteQueryData(t) {
428
- return t.behavior = Se(t.pages), this.ensureQueryData(t);
429
- }
430
- resumePausedMutations() {
431
- return we.isOnline() ? l(this, Q).resumePausedMutations() : Promise.resolve();
432
- }
433
- getQueryCache() {
434
- return l(this, g);
435
- }
436
- getMutationCache() {
437
- return l(this, Q);
438
- }
439
- getDefaultOptions() {
440
- return l(this, R);
441
- }
442
- setDefaultOptions(t) {
443
- v(this, R, t);
444
- }
445
- setQueryDefaults(t, e) {
446
- l(this, B).set(Ce(t), {
447
- queryKey: t,
448
- defaultOptions: e
449
- });
450
- }
451
- getQueryDefaults(t) {
452
- const e = [...l(this, B).values()], s = {};
453
- return e.forEach((n) => {
454
- Ne(t, n.queryKey) && Object.assign(s, n.defaultOptions);
455
- }), s;
456
- }
457
- setMutationDefaults(t, e) {
458
- l(this, L).set(Ce(t), {
459
- mutationKey: t,
460
- defaultOptions: e
461
- });
462
- }
463
- getMutationDefaults(t) {
464
- const e = [...l(this, L).values()];
465
- let s = {};
466
- return e.forEach((n) => {
467
- Ne(t, n.mutationKey) && (s = { ...s, ...n.defaultOptions });
468
- }), s;
469
- }
470
- defaultQueryOptions(t) {
471
- if (t._defaulted)
472
- return t;
473
- const e = {
474
- ...l(this, R).queries,
475
- ...this.getQueryDefaults(t.queryKey),
476
- ...t,
477
- _defaulted: !0
478
- };
479
- return e.queryHash || (e.queryHash = Be(
480
- e.queryKey,
481
- e
482
- )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.queryFn === Dt && (e.enabled = !1), e;
483
- }
484
- defaultMutationOptions(t) {
485
- return t != null && t._defaulted ? t : {
486
- ...l(this, R).mutations,
487
- ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
488
- ...t,
489
- _defaulted: !0
490
- };
491
- }
492
- clear() {
493
- l(this, g).clear(), l(this, Q).clear();
494
- }
495
- }, g = new WeakMap(), Q = new WeakMap(), R = new WeakMap(), B = new WeakMap(), L = new WeakMap(), F = new WeakMap(), K = new WeakMap(), $ = new WeakMap(), Re);
496
- function Rs(t) {
497
- return t;
498
- }
499
- function Oe(t, e, s) {
500
- var d, c;
501
- if (typeof e != "object" || e === null)
502
- return;
503
- const n = t.getMutationCache(), a = t.getQueryCache(), o = ((d = s == null ? void 0 : s.defaultOptions) == null ? void 0 : d.deserializeData) ?? ((c = t.getDefaultOptions().hydrate) == null ? void 0 : c.deserializeData) ?? Rs, i = e.mutations || [], u = e.queries || [];
504
- i.forEach(({ state: x, ...f }) => {
505
- var h, p;
506
- n.build(
507
- t,
508
- {
509
- ...(h = t.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
510
- ...(p = s == null ? void 0 : s.defaultOptions) == null ? void 0 : p.mutations,
511
- ...f
512
- },
513
- x
514
- );
515
- }), u.forEach(({ queryKey: x, state: f, queryHash: h, meta: p, promise: C }) => {
516
- var q, z;
517
- let m = a.get(h);
518
- const y = f.data === void 0 ? f.data : o(f.data);
519
- if (m) {
520
- if (m.state.dataUpdatedAt < f.dataUpdatedAt) {
521
- const { fetchStatus: b, ...k } = f;
522
- m.setState({
523
- ...k,
524
- data: y
525
- });
526
- }
527
- } else
528
- m = a.build(
529
- t,
530
- {
531
- ...(q = t.getDefaultOptions().hydrate) == null ? void 0 : q.queries,
532
- ...(z = s == null ? void 0 : s.defaultOptions) == null ? void 0 : z.queries,
533
- queryKey: x,
534
- queryHash: h,
535
- meta: p
536
- },
537
- // Reset fetch status to idle to avoid
538
- // query being stuck in fetching state upon hydration
539
- {
540
- ...f,
541
- data: y,
542
- fetchStatus: "idle"
543
- }
544
- );
545
- if (C) {
546
- const b = Promise.resolve(C).then(o);
547
- m.fetch(void 0, { initialPromise: b });
548
- }
549
- });
550
- }
551
- var Me = (t, e) => typeof t == "object" && t !== null && e in t, Fs = ({
552
- children: t,
553
- options: e = {},
554
- state: s,
555
- queryClient: n
556
- }) => {
557
- const a = Le(n), [o, i] = I.useState(), u = I.useRef(e);
558
- return u.current = e, I.useMemo(() => {
559
- if (s) {
560
- if (typeof s != "object")
561
- return;
562
- const d = a.getQueryCache(), c = s.queries || [], x = [], f = [];
563
- for (const h of c) {
564
- const p = d.get(h.queryHash);
565
- if (!p)
566
- x.push(h);
567
- else {
568
- const C = h.state.dataUpdatedAt > p.state.dataUpdatedAt || // RSC special serialized then-able chunks
569
- Me(h.promise, "status") && Me(p.promise, "status") && h.promise.status !== p.promise.status, m = o == null ? void 0 : o.find(
570
- (y) => y.queryHash === h.queryHash
571
- );
572
- C && (!m || h.state.dataUpdatedAt > m.state.dataUpdatedAt) && f.push(h);
573
- }
574
- }
575
- x.length > 0 && Oe(a, { queries: x }, u.current), f.length > 0 && i(
576
- (h) => h ? [...h, ...f] : f
577
- );
578
- }
579
- }, [a, o, s]), I.useEffect(() => {
580
- o && (Oe(a, { queries: o }, u.current), i(void 0));
581
- }, [a, o]), t;
582
- };
583
- const zs = () => {
584
- const t = U(), e = O(), s = gt(), n = _(), a = Bt(n.pathname), { protectedRoutes: o = [] } = e.options, i = o.some(
585
- (u) => pt({ path: u, end: !0 }, n.pathname)
586
- );
587
- if (kt({
588
- queryKey: ["login-redirect"],
589
- queryFn: async () => {
590
- var u;
591
- return await new Promise((d) => setTimeout(d, 1200)), await ((u = e.authentication) == null ? void 0 : u.signIn({
592
- redirectTo: a.current
593
- })), !0;
594
- },
595
- enabled: typeof window < "u" && i && !t.isPending && !t.isAuthenticated
596
- }), i && !t.isAuthenticated)
597
- return /* @__PURE__ */ r.jsx(
598
- It,
599
- {
600
- open: !0,
601
- onOpenChange: (u) => {
602
- u || s(-1);
603
- },
604
- children: /* @__PURE__ */ r.jsxs(Qt, { children: [
605
- /* @__PURE__ */ r.jsx(Rt, { children: /* @__PURE__ */ r.jsx(Ft, { children: "Logging you in..." }) }),
606
- /* @__PURE__ */ r.jsx(zt, { children: "Please wait while we log you in." })
607
- ] })
608
- }
609
- );
610
- if (i && !t.isAuthEnabled)
611
- throw new Ht("Authentication is not enabled", {
612
- title: "Authentication is not enabled",
613
- developerHint: "To use protectedRoutes you need authentication to be enabled"
614
- });
615
- return /* @__PURE__ */ r.jsx(ce, {});
616
- };
617
- function Hs({ error: t }) {
618
- return /* @__PURE__ */ r.jsx(Ue, { error: t });
619
- }
620
- /**
621
- * react-router v7.2.0
622
- *
623
- * Copyright (c) Remix Software Inc.
624
- *
625
- * This source code is licensed under the MIT license found in the
626
- * LICENSE.md file in the root directory of this source tree.
627
- *
628
- * @license MIT
629
- */
630
- function Bs(t) {
631
- return /* @__PURE__ */ I.createElement(xt, { flushSync: Wt.flushSync, ...t });
632
- }
633
- const oe = he({ stagger: !1 }), Ls = new Qs({
634
- defaultOptions: {
635
- queries: {
636
- staleTime: 1e3 * 60 * 5
637
- }
638
- }
639
- }), Ks = ({
640
- router: t,
641
- hydrate: e = !1
642
- }) => /* @__PURE__ */ r.jsx(Ze, { children: /* @__PURE__ */ r.jsx(Ke, { client: Ls, children: /* @__PURE__ */ r.jsx(Fs, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ r.jsx(Fe, { children: /* @__PURE__ */ r.jsx(oe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ r.jsx(Bs, { router: t }) }) }) }) }) }), $s = ({
643
- router: t,
644
- context: e,
645
- queryClient: s,
646
- helmetContext: n
647
- }) => /* @__PURE__ */ r.jsx(Ze, { children: /* @__PURE__ */ r.jsx(Ke, { client: s, children: /* @__PURE__ */ r.jsx(Fe, { context: n, children: /* @__PURE__ */ r.jsx(yt, { router: t, context: e }) }) }) });
648
- var G = { exports: {} }, Us = G.exports, qe;
649
- function Zs() {
650
- return qe || (qe = 1, function(t, e) {
651
- (function(s, n) {
652
- n(e, Xt);
653
- })(Us, function(s, n) {
654
- const a = {
655
- delay: 500,
656
- minDuration: 200,
657
- ssr: !0
658
- };
659
- function o() {
660
- const [u, d] = n.useState(!0);
661
- return n.useEffect(() => {
662
- d(!1);
663
- }, []), u;
664
- }
665
- function i(u, d) {
666
- d = Object.assign({}, a, d);
667
- const c = o() && d.ssr, x = c && u ? "DISPLAY" : "IDLE", [f, h] = n.useState(x), p = n.useRef(null);
668
- return n.useEffect(() => {
669
- if (u && (f === "IDLE" || c)) {
670
- clearTimeout(p.current);
671
- const C = c ? 0 : d.delay;
672
- p.current = setTimeout(() => {
673
- if (!u)
674
- return h("IDLE");
675
- p.current = setTimeout(() => {
676
- h("EXPIRE");
677
- }, d.minDuration), h("DISPLAY");
678
- }, C), c || h("DELAY");
679
- }
680
- !u && f !== "DISPLAY" && (clearTimeout(p.current), h("IDLE"));
681
- }, [u, f, d.delay, d.minDuration, c]), n.useEffect(() => () => clearTimeout(p.current), []), f === "DISPLAY" || f === "EXPIRE";
682
- }
683
- s.defaultOptions = a, s.useSpinDelay = i;
684
- });
685
- }(G, G.exports)), G.exports;
686
- }
687
- var Ys = Zs();
688
- const Xs = () => {
689
- const t = _(), e = fe(t.pathname);
690
- Y(() => {
691
- const s = e.current !== t.pathname, n = t.hash !== "";
692
- s && !n && window.scrollTo(0, 0), e.current = t.pathname;
693
- }, [t.pathname, t.hash]);
694
- };
695
- function Gs({
696
- className: t,
697
- ...e
698
- }) {
699
- return /* @__PURE__ */ r.jsx(
700
- "div",
701
- {
702
- className: E("animate-pulse rounded-md bg-muted", t),
703
- ...e
704
- }
705
- );
706
- }
707
- const Ae = {
708
- info: "bg-blue-500",
709
- note: "bg-gray-500",
710
- tip: "bg-green-600",
711
- caution: "bg-orange-500",
712
- danger: "bg-rose-500"
713
- }, Vs = () => {
714
- const { page: t } = O(), [e, s] = Z(!0);
715
- if (!(t != null && t.banner) || !e)
716
- return /* @__PURE__ */ r.jsx("style", { children: ":root { --banner-height: 0px; }" });
717
- const n = t.banner.color && t.banner.color in Ae ? Ae[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = n ? {} : { backgroundColor: t.banner.color };
718
- return /* @__PURE__ */ r.jsxs(
719
- "div",
720
- {
721
- className: E(
722
- "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
723
- n
724
- ),
725
- "data-pagefind-ignore": "all",
726
- style: a,
727
- children: [
728
- /* @__PURE__ */ r.jsx("div", { className: "w-full", children: t.banner.message }),
729
- t.banner.dismissible && /* @__PURE__ */ r.jsx(
730
- "button",
731
- {
732
- type: "button",
733
- className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
734
- onClick: () => s(!1),
735
- children: /* @__PURE__ */ r.jsx(Ps, { size: 16 })
736
- }
737
- )
738
- ]
739
- }
740
- );
741
- }, We = ({ className: t }) => {
742
- const e = O(), [s, n] = Z(!1), a = Gt(() => n(!1), []);
743
- Y(() => {
744
- if (s)
745
- return;
746
- function i(u) {
747
- u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), n(!0));
748
- }
749
- return window.addEventListener("keydown", i), () => {
750
- window.removeEventListener("keydown", i);
751
- };
752
- }, [s, n]);
753
- const o = e.plugins.find(is);
754
- return o ? /* @__PURE__ */ r.jsxs("div", { className: t, children: [
755
- /* @__PURE__ */ r.jsxs(
756
- "button",
757
- {
758
- type: "button",
759
- onClick: () => n(!0),
760
- className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
761
- children: [
762
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
763
- /* @__PURE__ */ r.jsx(Cs, { size: 14 }),
764
- "Search"
765
- ] }),
766
- /* @__PURE__ */ r.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" })
767
- ]
768
- }
769
- ),
770
- /* @__PURE__ */ r.jsx(me, { fallback: null, children: o.renderSearch({
771
- isOpen: s,
772
- onClose: a
773
- }) })
774
- ] }) : null;
775
- }, Je = () => {
776
- const { resolvedTheme: t, setTheme: e } = ze();
777
- return /* @__PURE__ */ r.jsx(ge, { fallback: /* @__PURE__ */ r.jsx(ie, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ r.jsxs(
778
- "button",
779
- {
780
- type: "button",
781
- className: "flex rounded-full border p-0.5 gap-0.5 group",
782
- onClick: () => e(t === "dark" ? "light" : "dark"),
783
- "aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
784
- children: [
785
- /* @__PURE__ */ r.jsx(
786
- "div",
787
- {
788
- className: E(
789
- "border border-transparent rounded-full p-0.5 [&>svg>circle]:transition-colors [&>svg>path]:transition-transform transition-all [&>svg>path]:duration-200 [&>svg>circle]:duration-500 [&>svg>circle]:fill-transparent",
790
- t === "light" && "border-border bg-muted",
791
- t === "dark" && "group-hover:[&>svg>path]:scale-110 group-hover:[&>svg>path]:-translate-x-[1px] group-hover:[&>svg>path]:-translate-y-[1px] group-hover:rotate-[15deg] "
792
- ),
793
- children: /* @__PURE__ */ r.jsx(Ns, { size: 16 })
794
- }
795
- ),
796
- /* @__PURE__ */ r.jsx(
797
- "div",
798
- {
799
- className: E(
800
- "border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
801
- t === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
802
- t === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
803
- ),
804
- children: /* @__PURE__ */ r.jsx(Ds, { size: 16 })
805
- }
806
- )
807
- ]
808
- }
809
- ) });
810
- }, et = (t) => (e) => e.display === "hide" ? !1 : e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", _s = () => {
811
- const { topNavigation: t } = O(), { isAuthenticated: e } = U(), s = t.filter(et(e));
812
- return s.length === 0 ? /* @__PURE__ */ r.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ r.jsx(me, { children: /* @__PURE__ */ r.jsxs("div", { className: "items-center justify-between px-8 h-[--top-nav-height] hidden lg:flex text-sm", children: [
813
- /* @__PURE__ */ r.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ r.jsx("ul", { className: "flex flex-row items-center gap-8", children: s.map((n) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(tt, { ...n }) }, n.id)) }) }),
814
- /* @__PURE__ */ r.jsx(D, { name: "top-navigation-side" })
815
- ] }) });
816
- }, tt = ({
817
- id: t,
818
- label: e,
819
- default: s
820
- }) => {
821
- var c;
822
- const { sidebars: n } = O(), a = n[t], o = $e(), i = !!ue().location, u = ((c = o.topNavItem) == null ? void 0 : c.id) === t && !i, d = s ?? (a ? St(a, (x) => {
823
- if (x.type === "doc") return H(x.id);
824
- }) : H(t)) ?? H(t);
825
- return (
826
- // We don't use isActive here because it has to be inside the sidebar,
827
- // the top nav id doesn't necessarily start with the sidebar id
828
- /* @__PURE__ */ r.jsx(
829
- vt,
830
- {
831
- className: ({ isPending: x }) => Ms(
832
- "block lg:py-3.5 font-medium -mb-px",
833
- u || x ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
834
- ),
835
- to: d,
836
- children: e
837
- }
838
- )
839
- );
840
- }, Ws = () => {
841
- const { topNavigation: t } = O(), { isAuthenticated: e } = U(), [s, n] = Z(!1);
842
- return /* @__PURE__ */ r.jsxs(
843
- Es,
844
- {
845
- direction: "right",
846
- open: s,
847
- onOpenChange: (a) => n(a),
848
- children: [
849
- /* @__PURE__ */ r.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ r.jsx(Os, { className: "lg:hidden", children: /* @__PURE__ */ r.jsx(ks, { size: 22 }) }) }),
850
- /* @__PURE__ */ r.jsx(
851
- Ge,
852
- {
853
- className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
854
- "aria-describedby": void 0,
855
- children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
856
- /* @__PURE__ */ r.jsx(Xe, { children: /* @__PURE__ */ r.jsx(Ve, { children: "Navigation" }) }),
857
- /* @__PURE__ */ r.jsx(We, { className: "flex p-4" }),
858
- /* @__PURE__ */ r.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
859
- /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(Je, {}) }),
860
- t.filter(et(e)).map((a) => /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx("button", { type: "button", onClick: () => n(!1), children: /* @__PURE__ */ r.jsx(tt, { ...a }) }) }, a.label))
861
- ] })
862
- ] })
863
- }
864
- )
865
- ]
866
- }
867
- );
868
- }, se = ({ item: t }) => t.children ? /* @__PURE__ */ r.jsxs(ys, { children: [
869
- /* @__PURE__ */ r.jsx(vs, { children: t.label }),
870
- /* @__PURE__ */ r.jsx(bs, { children: /* @__PURE__ */ r.jsx(js, { children: t.children.map((e, s) => (
871
- // eslint-disable-next-line react/no-array-index-key
872
- /* @__PURE__ */ r.jsx(se, { item: e }, s)
873
- )) }) })
874
- ] }, t.label) : /* @__PURE__ */ r.jsx(de, { to: t.path ?? "", children: /* @__PURE__ */ r.jsxs(ws, { className: "flex gap-2", children: [
875
- t.icon && /* @__PURE__ */ r.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
876
- t.label
877
- ] }, t.label) }), st = Ye(function() {
878
- const e = U(), { isAuthenticated: s, profile: n, isAuthEnabled: a } = U(), o = O(), { page: i, plugins: u } = o, d = u.filter((c) => os(c)).flatMap((c) => c.getProfileMenuItems(o)).sort((c) => c.weight ?? 0);
879
- return /* @__PURE__ */ r.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
880
- /* @__PURE__ */ r.jsx(Vs, {}),
881
- /* @__PURE__ */ r.jsx("div", { className: "border-b", children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl 2xl:border-x mx-auto flex relative items-center justify-between px-4 lg:px-8 h-[--top-header-height]", children: [
882
- /* @__PURE__ */ r.jsx("div", { className: "flex", children: /* @__PURE__ */ r.jsx(de, { to: "/", children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-3.5", children: [
883
- (i == null ? void 0 : i.logo) && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
884
- /* @__PURE__ */ r.jsx(
885
- "img",
886
- {
887
- src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : H(
888
- "/",
889
- i.logo.src.light
890
- ),
891
- alt: i.logo.alt ?? i.pageTitle,
892
- style: { width: i.logo.width },
893
- className: "h-10 dark:hidden",
894
- loading: "lazy"
895
- }
896
- ),
897
- /* @__PURE__ */ r.jsx(
898
- "img",
899
- {
900
- src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : H(
901
- "/",
902
- i.logo.src.dark
903
- ),
904
- alt: i.logo.alt ?? i.pageTitle,
905
- style: { width: i.logo.width },
906
- className: "h-10 hidden dark:block",
907
- loading: "lazy"
908
- }
909
- )
910
- ] }),
911
- /* @__PURE__ */ r.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
912
- ] }) }) }),
913
- /* @__PURE__ */ r.jsx("div", { className: "absolute inset-x-0 justify-center items-center hidden lg:flex w-full pointer-events-none", children: /* @__PURE__ */ r.jsx(We, { className: "pointer-events-auto" }) }),
914
- /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-8", children: [
915
- /* @__PURE__ */ r.jsx(Ws, {}),
916
- /* @__PURE__ */ r.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
917
- /* @__PURE__ */ r.jsx(D, { name: "head-navigation-start" }),
918
- a && /* @__PURE__ */ r.jsx(
919
- ge,
920
- {
921
- fallback: /* @__PURE__ */ r.jsx(Gs, { className: "rounded h-5 w-24 mr-4" }),
922
- children: s ? Object.values(d).length > 0 && /* @__PURE__ */ r.jsxs(ms, { modal: !1, children: [
923
- /* @__PURE__ */ r.jsx(gs, { asChild: !0, children: /* @__PURE__ */ r.jsx(ie, { variant: "ghost", children: n != null && n.name ? `${n.name}` : "My Account" }) }),
924
- /* @__PURE__ */ r.jsxs(ps, { className: "w-56", children: [
925
- /* @__PURE__ */ r.jsxs(xs, { children: [
926
- n != null && n.name ? `${n.name}` : "My Account",
927
- (n == null ? void 0 : n.email) && /* @__PURE__ */ r.jsx("div", { className: "font-normal text-muted-foreground", children: n.email })
928
- ] }),
929
- d.filter((c) => c.category === "top").length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
930
- d.filter((c) => c.category === "top").map((c) => /* @__PURE__ */ r.jsx(se, { item: c }, c.label)),
931
- d.filter(
932
- (c) => !c.category || c.category === "middle"
933
- ).length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
934
- d.filter(
935
- (c) => !c.category || c.category === "middle"
936
- ).map((c) => /* @__PURE__ */ r.jsx(se, { item: c }, c.label)),
937
- d.filter((c) => c.category === "bottom").length > 0 && /* @__PURE__ */ r.jsx(ne, {}),
938
- d.filter((c) => c.category === "bottom").map((c) => /* @__PURE__ */ r.jsx(se, { item: c }, c.label))
939
- ] })
940
- ] }) : /* @__PURE__ */ r.jsx(ie, { variant: "ghost", onClick: () => e.login(), children: "Login" })
941
- }
942
- ),
943
- /* @__PURE__ */ r.jsx(D, { name: "head-navigation-end" }),
944
- /* @__PURE__ */ r.jsx(Je, {})
945
- ] })
946
- ] })
947
- ] }) }),
948
- /* @__PURE__ */ r.jsx("div", { className: "border-b hidden lg:block", children: /* @__PURE__ */ r.jsxs("div", { className: "max-w-screen-2xl mx-auto 2xl:border-x", children: [
949
- /* @__PURE__ */ r.jsx(D, { name: "top-navigation-before" }),
950
- /* @__PURE__ */ r.jsx(_s, {}),
951
- /* @__PURE__ */ r.jsx(D, { name: "top-navigation-after" })
952
- ] }) })
953
- ] });
954
- }), rt = ({
955
- shouldScaleBackground: t = !0,
956
- ...e
957
- }) => /* @__PURE__ */ r.jsx(
958
- M.Root,
959
- {
960
- shouldScaleBackground: t,
961
- ...e
962
- }
963
- );
964
- rt.displayName = "Drawer";
965
- const Js = M.Trigger, er = M.Portal, nt = I.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r.jsx(
966
- M.Overlay,
967
- {
968
- ref: s,
969
- className: E("fixed inset-0 z-50 bg-black/80", t),
970
- ...e
971
- }
972
- ));
973
- nt.displayName = M.Overlay.displayName;
974
- const tr = I.forwardRef(
975
- ({ className: t, children: e, hideBar: s = !0, ...n }, a) => /* @__PURE__ */ r.jsxs(er, { children: [
976
- /* @__PURE__ */ r.jsx(nt, {}),
977
- /* @__PURE__ */ r.jsxs(
978
- M.Content,
979
- {
980
- ref: a,
981
- className: E(
982
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
983
- t
984
- ),
985
- ...n,
986
- children: [
987
- !s && /* @__PURE__ */ r.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
988
- e
989
- ]
990
- }
991
- )
992
- ] })
993
- );
994
- tr.displayName = "DrawerContent";
995
- const sr = I.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r.jsx(
996
- M.Title,
997
- {
998
- ref: s,
999
- className: E(
1000
- "text-lg font-semibold leading-none tracking-tight",
1001
- t
1002
- ),
1003
- ...e
1004
- }
1005
- ));
1006
- sr.displayName = M.Title.displayName;
1007
- const rr = I.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r.jsx(
1008
- M.Description,
1009
- {
1010
- ref: s,
1011
- className: E("text-sm text-muted-foreground", t),
1012
- ...e
1013
- }
1014
- ));
1015
- rr.displayName = M.Description.displayName;
1016
- const at = ({
1017
- children: t,
1018
- className: e,
1019
- ref: s
1020
- }) => /* @__PURE__ */ r.jsx(
1021
- "nav",
1022
- {
1023
- className: E(
1024
- "hidden lg:flex h-full scrollbar flex-col overflow-y-auto shrink-0 text-sm border-r pr-6",
1025
- "sticky top-[--header-height] h-[calc(100vh-var(--header-height))]",
1026
- "-mx-[--padding-nav-item] max-w-[--side-nav-width] pb-6 pt-[--padding-content-top] scroll-pt-2 gap-2",
1027
- e
1028
- ),
1029
- ref: s,
1030
- children: t
1031
- }
1032
- );
1033
- at.displayName = "SidebarWrapper";
1034
- const nr = ({
1035
- onRequestClose: t,
1036
- sidebar: e
1037
- }) => {
1038
- const s = fe(null);
1039
- return Y(() => {
1040
- var a;
1041
- const n = (a = s.current) == null ? void 0 : a.querySelector('[aria-current="page"]');
1042
- Jt(n ?? null);
1043
- }, []), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1044
- /* @__PURE__ */ r.jsxs(at, { ref: s, children: [
1045
- /* @__PURE__ */ r.jsx(D, { name: "zudoku-before-navigation" }),
1046
- e.map((n) => /* @__PURE__ */ r.jsx(ke, { item: n }, n.label)),
1047
- /* @__PURE__ */ r.jsx(D, { name: "zudoku-after-navigation" })
1048
- ] }),
1049
- /* @__PURE__ */ r.jsx(
1050
- Ge,
1051
- {
1052
- className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
1053
- "aria-describedby": void 0,
1054
- children: /* @__PURE__ */ r.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
1055
- /* @__PURE__ */ r.jsx(Xe, { children: /* @__PURE__ */ r.jsx(Ve, { children: "Sidebar" }) }),
1056
- e.map((n) => /* @__PURE__ */ r.jsx(
1057
- ke,
1058
- {
1059
- item: n,
1060
- onRequestClose: t
1061
- },
1062
- n.label
1063
- ))
1064
- ] })
1065
- }
1066
- )
1067
- ] });
1068
- }, ar = ({ children: t }) => {
1069
- const [e, s] = Z(!1), { sidebar: n } = $e(), a = n.length > 0;
1070
- return /* @__PURE__ */ r.jsxs(
1071
- rt,
1072
- {
1073
- direction: "left",
1074
- open: e,
1075
- onOpenChange: (o) => s(o),
1076
- children: [
1077
- a && /* @__PURE__ */ r.jsx(
1078
- nr,
1079
- {
1080
- onRequestClose: () => s(!1),
1081
- sidebar: n
1082
- }
1083
- ),
1084
- a && /* @__PURE__ */ r.jsx("div", { className: "lg:hidden -mx-4 px-4 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b", children: /* @__PURE__ */ r.jsxs(Js, { className: "flex items-center gap-2", children: [
1085
- /* @__PURE__ */ r.jsx(Ss, { size: 16, strokeWidth: 1.5 }),
1086
- /* @__PURE__ */ r.jsx("span", { className: "text-sm", children: "Menu" })
1087
- ] }) }),
1088
- /* @__PURE__ */ r.jsxs(
1089
- "main",
1090
- {
1091
- "data-pagefind-body": !0,
1092
- className: E(
1093
- "h-auto dark:border-white/10 translate-x-0",
1094
- a ? "lg:pl-12" : "col-span-full"
1095
- ),
1096
- children: [
1097
- /* @__PURE__ */ r.jsx(D, { name: "zudoku-before-content" }),
1098
- t,
1099
- /* @__PURE__ */ r.jsx(D, { name: "zudoku-after-content" })
1100
- ]
1101
- }
1102
- )
1103
- ]
1104
- }
1105
- );
1106
- }, Te = () => /* @__PURE__ */ r.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ r.jsx(_e, {}) }), ir = ({ children: t }) => {
1107
- const { meta: e, authentication: s, options: n } = O(), a = _();
1108
- es(), Xs(), Y(() => {
1109
- var u;
1110
- (u = s == null ? void 0 : s.onPageLoad) == null || u.call(s);
1111
- }, [s]);
1112
- const o = !!ue().location, i = Ys.useSpinDelay(o, {
1113
- delay: 300,
1114
- minDuration: 500
1115
- });
1116
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1117
- !1,
1118
- /* @__PURE__ */ r.jsxs(le, { titleTemplate: e == null ? void 0 : e.title, children: [
1119
- n.canonicalUrlOrigin && /* @__PURE__ */ r.jsx(
1120
- "link",
1121
- {
1122
- rel: "canonical",
1123
- href: H(
1124
- n.canonicalUrlOrigin,
1125
- n.basePath,
1126
- a.pathname
1127
- )
1128
- }
1129
- ),
1130
- (e == null ? void 0 : e.description) && /* @__PURE__ */ r.jsx("meta", { name: "description", content: e.description }),
1131
- (e == null ? void 0 : e.favicon) && /* @__PURE__ */ r.jsx("link", { rel: "icon", href: e.favicon })
1132
- ] }),
1133
- /* @__PURE__ */ r.jsx(D, { name: "layout-before-head" }),
1134
- /* @__PURE__ */ r.jsx(st, {}),
1135
- /* @__PURE__ */ r.jsx(D, { name: "layout-after-head" }),
1136
- /* @__PURE__ */ r.jsx("div", { className: "grid grid-cols-1 grid-rows-[min-content_1fr] lg:grid-cols-[var(--side-nav-width)_1fr] max-w-screen-2xl w-full lg:mx-auto px-4 lg:px-8 2xl:border-x", children: i ? /* @__PURE__ */ r.jsx(Te, {}) : /* @__PURE__ */ r.jsx(me, { fallback: /* @__PURE__ */ r.jsx(Te, {}), children: /* @__PURE__ */ r.jsx(ar, { children: t ?? /* @__PURE__ */ r.jsx(ce, {}) }) }) })
1137
- ] });
1138
- }, or = ({
1139
- title: t = "An error occurred",
1140
- message: e,
1141
- category: s
1142
- }) => /* @__PURE__ */ r.jsxs("div", { className: ss + " h-full pt-[--padding-content-top]", children: [
1143
- s && /* @__PURE__ */ r.jsx(qs, { children: s }),
1144
- t && /* @__PURE__ */ r.jsx(ts, { level: 1, className: "flex gap-3.5 items-center", children: t }),
1145
- /* @__PURE__ */ r.jsx("p", { children: e })
1146
- ] }), lr = (t) => {
1147
- switch (t) {
1148
- case 400:
1149
- return {
1150
- title: "Bad Request",
1151
- message: "The request could not be understood by the server due to malformed syntax."
1152
- };
1153
- case 403:
1154
- return {
1155
- title: "Forbidden",
1156
- message: "You don't have permission to access this resource."
1157
- };
1158
- case 404:
1159
- return {
1160
- title: "Not Found",
1161
- message: "The requested resource could not be found."
1162
- };
1163
- case 405:
1164
- return {
1165
- title: "Method Not Allowed",
1166
- message: "The request method is not supported for the requested resource."
1167
- };
1168
- case 414:
1169
- return {
1170
- title: "Request URI Too Large",
1171
- message: "The request URI is too large."
1172
- };
1173
- case 416:
1174
- return {
1175
- title: "Range Not Satisfiable",
1176
- message: "The server cannot satisfy the request range."
1177
- };
1178
- case 500:
1179
- return {
1180
- title: "Internal Server Error",
1181
- message: "An unexpected error occurred while processing your request."
1182
- };
1183
- case 501:
1184
- return {
1185
- title: "Not Implemented",
1186
- message: "The server does not support the functionality required to fulfill the request."
1187
- };
1188
- case 502:
1189
- return {
1190
- title: "Bad Gateway",
1191
- message: "The server received an invalid response from the upstream server."
1192
- };
1193
- case 503:
1194
- return {
1195
- title: "Service Unavailable",
1196
- message: "The server is temporarily unable to handle the request."
1197
- };
1198
- case 504:
1199
- return {
1200
- title: "Gateway Timeout",
1201
- message: "The server did not receive a timely response from the upstream server."
1202
- };
1203
- default:
1204
- return {
1205
- title: "An error occurred",
1206
- message: "Something went wrong while processing your request."
1207
- };
1208
- }
1209
- }, cr = ({ statusCode: t, message: e }) => {
1210
- const s = lr(t);
1211
- return /* @__PURE__ */ r.jsx(
1212
- or,
1213
- {
1214
- title: s.title,
1215
- message: e ?? s.message,
1216
- category: t
1217
- }
1218
- );
1219
- }, ur = he(null), ae = {
1220
- didCatch: !1,
1221
- error: null
1222
- };
1223
- class dr extends Vt {
1224
- constructor(e) {
1225
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ae;
1226
- }
1227
- static getDerivedStateFromError(e) {
1228
- return {
1229
- didCatch: !0,
1230
- error: e
1231
- };
1232
- }
1233
- resetErrorBoundary() {
1234
- const {
1235
- error: e
1236
- } = this.state;
1237
- if (e !== null) {
1238
- for (var s, n, a = arguments.length, o = new Array(a), i = 0; i < a; i++)
1239
- o[i] = arguments[i];
1240
- (s = (n = this.props).onReset) === null || s === void 0 || s.call(n, {
1241
- args: o,
1242
- reason: "imperative-api"
1243
- }), this.setState(ae);
1244
- }
1245
- }
1246
- componentDidCatch(e, s) {
1247
- var n, a;
1248
- (n = (a = this.props).onError) === null || n === void 0 || n.call(a, e, s);
1249
- }
1250
- componentDidUpdate(e, s) {
1251
- const {
1252
- didCatch: n
1253
- } = this.state, {
1254
- resetKeys: a
1255
- } = this.props;
1256
- if (n && s.error !== null && hr(e.resetKeys, a)) {
1257
- var o, i;
1258
- (o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
1259
- next: a,
1260
- prev: e.resetKeys,
1261
- reason: "keys"
1262
- }), this.setState(ae);
1263
- }
1264
- }
1265
- render() {
1266
- const {
1267
- children: e,
1268
- fallbackRender: s,
1269
- FallbackComponent: n,
1270
- fallback: a
1271
- } = this.props, {
1272
- didCatch: o,
1273
- error: i
1274
- } = this.state;
1275
- let u = e;
1276
- if (o) {
1277
- const d = {
1278
- error: i,
1279
- resetErrorBoundary: this.resetErrorBoundary
1280
- };
1281
- if (typeof s == "function")
1282
- u = s(d);
1283
- else if (n)
1284
- u = De(n, d);
1285
- else if (a !== void 0)
1286
- u = a;
1287
- else
1288
- throw i;
1289
- }
1290
- return De(ur.Provider, {
1291
- value: {
1292
- didCatch: o,
1293
- error: i,
1294
- resetErrorBoundary: this.resetErrorBoundary
1295
- }
1296
- }, u);
1297
- }
1298
- }
1299
- function hr() {
1300
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1301
- return t.length !== e.length || t.some((s, n) => !Object.is(s, e[n]));
1302
- }
1303
- let fr = () => ({
1304
- emit(t, ...e) {
1305
- for (let s = this.events[t] || [], n = 0, a = s.length; n < a; n++)
1306
- s[n](...e);
1307
- },
1308
- events: {},
1309
- on(t, e) {
1310
- var s;
1311
- return ((s = this.events)[t] || (s[t] = [])).push(e), () => {
1312
- var n;
1313
- this.events[t] = (n = this.events[t]) == null ? void 0 : n.filter((a) => e !== a);
1314
- };
1315
- }
1316
- });
1317
- class mr {
1318
- constructor(e, s) {
1319
- j(this, "plugins");
1320
- j(this, "sidebars");
1321
- j(this, "topNavigation");
1322
- j(this, "meta");
1323
- j(this, "page");
1324
- j(this, "authentication");
1325
- j(this, "navigationPlugins");
1326
- j(this, "emitter", fr());
1327
- j(this, "initialize", async () => {
1328
- await Promise.all(
1329
- this.plugins.filter(us).map((e) => {
1330
- var s;
1331
- return (s = e.initialize) == null ? void 0 : s.call(e, this);
1332
- })
1333
- );
1334
- });
1335
- j(this, "getApiIdentities", async () => (await Promise.all(
1336
- this.plugins.filter(ds).map((s) => s.getIdentities(this))
1337
- )).flat());
1338
- j(this, "emitEvent", (e, ...s) => this.emitter.emit(e, ...s));
1339
- j(this, "getPluginSidebar", async (e) => (await Promise.all(
1340
- this.navigationPlugins.map(
1341
- (n) => {
1342
- var a;
1343
- return (a = n.getSidebar) == null ? void 0 : a.call(n, Ot(e), this);
1344
- }
1345
- )
1346
- )).flatMap((n) => n ?? []));
1347
- j(this, "signRequest", async (e) => {
1348
- if (!this.authentication)
1349
- throw new Error("No authentication provider configured");
1350
- return await this.authentication.signRequest(e);
1351
- });
1352
- this.options = e, this.queryClient = s, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(ls), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page, this.plugins.forEach((n) => {
1353
- cs(n) && Lt(n.events).forEach(([a, o]) => {
1354
- this.emitter.on(a, o);
1355
- });
1356
- }), Et.subscribe((n, a) => {
1357
- this.emitEvent("auth", {
1358
- prev: a,
1359
- next: n
1360
- });
1361
- });
1362
- }
1363
- addEventListener(e, s) {
1364
- return this.emitter.on(e, s);
1365
- }
1366
- }
1367
- function gr({ error: t, resetErrorBoundary: e }) {
1368
- return /* @__PURE__ */ r.jsx(Ue, { error: t });
1369
- }
1370
- const te = globalThis;
1371
- (!te.requestIdleCallback || !te.cancelIdleCallback) && (te.requestIdleCallback = (t) => setTimeout(t, 1), te.cancelIdleCallback = clearTimeout);
1372
- const it = {
1373
- Header: st
1374
- }, pr = he(it), xr = pr.Provider, yr = () => {
1375
- const t = _(), e = O(), s = fe(void 0);
1376
- return Y(() => {
1377
- e.emitEvent("location", {
1378
- from: s.current,
1379
- to: t
1380
- }), s.current = t;
1381
- }, [e, t]), null;
1382
- }, vr = ({
1383
- children: t,
1384
- context: e
1385
- }) => (Mt({
1386
- queryFn: async () => (await e.initialize(), !0),
1387
- queryKey: ["zudoku-initialize"]
1388
- }), /* @__PURE__ */ r.jsx(qt.Provider, { value: e, children: t })), ot = Ye(
1389
- ({ children: t, ...e }) => {
1390
- var p, C;
1391
- const s = re(
1392
- () => ({ ...it, ...e.overrides }),
1393
- [e.overrides]
1394
- ), n = _(), a = re(() => {
1395
- var y;
1396
- return {
1397
- ...(e.plugins ?? []).filter(hs).flatMap(
1398
- (q) => q.getMdxComponents ? [q.getMdxComponents()] : []
1399
- ).reduce(
1400
- (q, z) => ({ ...q, ...z }),
1401
- {}
1402
- ),
1403
- ...rs,
1404
- ...(y = e.mdx) == null ? void 0 : y.components
1405
- };
1406
- }, [(p = e.mdx) == null ? void 0 : p.components, e.plugins]), { stagger: o } = _t(oe), [i, u] = Z(!1), d = re(
1407
- () => i ? { stagger: !0 } : { stagger: o },
1408
- [o, i]
1409
- ), c = ue(), x = Le();
1410
- Y(() => {
1411
- i || u(!0);
1412
- }, [i, c.location]);
1413
- const [f] = Z(
1414
- () => new mr(e, x)
1415
- ), h = (C = e.plugins) == null ? void 0 : C.flatMap(
1416
- (m) => {
1417
- var y;
1418
- return fs(m) ? ((y = m.getHead) == null ? void 0 : y.call(m, { location: n })) ?? [] : [];
1419
- }
1420
- ).map((m, y) => /* @__PURE__ */ r.jsx(le, { children: m }, y));
1421
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1422
- h,
1423
- /* @__PURE__ */ r.jsx(oe.Provider, { value: d, children: /* @__PURE__ */ r.jsxs(vr, { context: f, children: [
1424
- /* @__PURE__ */ r.jsx(yr, {}),
1425
- /* @__PURE__ */ r.jsx(ht, { components: a, children: /* @__PURE__ */ r.jsx(mt, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ r.jsx(xr, { value: s, children: /* @__PURE__ */ r.jsx(Kt, { slotlets: e.slotlets, children: /* @__PURE__ */ r.jsx(ns, { children: t ?? /* @__PURE__ */ r.jsx(ce, {}) }) }) }) }) })
1426
- ] }) })
1427
- ] });
1428
- }
1429
- );
1430
- ot.displayName = "ZudokoInner";
1431
- const lt = (t) => /* @__PURE__ */ r.jsx(dr, { FallbackComponent: gr, children: /* @__PURE__ */ r.jsx(ot, { ...t }) });
1432
- lt.displayName = "Zudoku";
1433
- const Zr = ft, Yr = ir, Xr = $t, Gr = Hs, Vr = Ks, _r = $s, Wr = zs, Jr = le, en = O, tn = U, sn = At, rn = Tt, nn = lt, an = cr, on = Zt, ln = as, cn = _e, un = ge, dn = Ut, hn = de, fn = ze;
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-DXvc0aY6.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-D6ktNq4i.js";
7
+ import "./ui/Button.js";
8
+ import "./ui/Callout.js";
9
+ import "./ClientOnly-E7hGysn1.js";
10
+ import "./Markdown-aF5FdsNi.js";
11
+ import "./Spinner-CE68iCm0.js";
1434
12
  export {
1435
- Vr as Bootstrap,
1436
- _r as BootstrapStatic,
1437
- dn as Button,
1438
- rn as CACHE_KEYS,
1439
- on as Callout,
1440
- un as ClientOnly,
1441
- Jr as Head,
1442
- Yr as Layout,
1443
- hn as Link,
1444
- ln as Markdown,
1445
- Wr as RouteGuard,
1446
- Xr as RouterError,
1447
- Gr as ServerError,
1448
- cn as Spinner,
1449
- an as StatusPage,
1450
- nn as Zudoku,
1451
- tn as useAuth,
1452
- sn as useCache,
1453
- Zr as useMDXComponents,
1454
- fn as useTheme,
1455
- en as useZudoku
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
1456
34
  };
1457
35
  //# sourceMappingURL=zudoku.components.js.map