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
@@ -0,0 +1,1863 @@
1
+ var nr = Object.defineProperty;
2
+ var De = (t) => {
3
+ throw TypeError(t);
4
+ };
5
+ var sr = (t, e, r) => e in t ? nr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
6
+ var O = (t, e, r) => sr(t, typeof e != "symbol" ? e + "" : e, r), qe = (t, e, r) => e.has(t) || De("Cannot " + r);
7
+ var d = (t, e, r) => (qe(t, e, "read from private field"), r ? r.call(t) : e.get(t)), A = (t, e, r) => e.has(t) ? De("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), M = (t, e, r, n) => (qe(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r);
8
+ var ce = (t, e, r, n) => ({
9
+ set _(a) {
10
+ M(t, e, a, r);
11
+ },
12
+ get _() {
13
+ return d(t, e, n);
14
+ }
15
+ });
16
+ import { B as ot, a as it, H as Ne, R as ar } from "./RouteGuard-CqZPoZYJ.js";
17
+ import { z as ct, J as or } from "./index-DwT-v3zK.js";
18
+ import { R as ir, S as cr, u as pe, f as ge, g as lr, L as Te, O as lt } from "./chunk-HA7DTUK3-C4gP41vD.js";
19
+ import { S as ut, v as dt, Q as ur, n as R, w as $e, x as Fe, y as B, z as dr, A as fr, B as hr, C as mr, D as Ie, E as Qe, F as pr, h as ze, G as Le, H as gr, g as ft, I as ht, e as I, l as ae, J as mt, K as vr, f as ee, u as yr, j as xr, d as br, Z as jr, L as wr, M as Pr } from "./hook-CqpVYDqN.js";
20
+ import { E as pt, S as q, a as Sr, R as Cr } from "./SlotletProvider-DXvc0aY6.js";
21
+ import { j as s } from "./jsx-runtime-CYK1ROHF.js";
22
+ import { Button as Er } from "./ui/Button.js";
23
+ import { Callout as Nr } from "./ui/Callout.js";
24
+ import { M as Tr } from "./mutation-8LjrN7uz.js";
25
+ import * as K from "react";
26
+ import he, { createContext as Me, StrictMode as gt, useRef as G, useEffect as Q, useState as J, useCallback as W, Suspense as Oe, memo as vt, Component as Mr, createElement as Be, useMemo as xe, useContext as Or } from "react";
27
+ import * as Ar from "react-dom";
28
+ import { C as Ae } from "./ClientOnly-E7hGysn1.js";
29
+ import { s as Rr, a as He, b as kr, H as _r, P as Dr, c as qr, V as $r, M as Fr } from "./Markdown-aF5FdsNi.js";
30
+ import { B as Se } from "./Button-Fp19CMUr.js";
31
+ import { c as $ } from "./cn-qaFjX9_3.js";
32
+ import { isSearchPlugin as Ir, isProfileMenuPlugin as Qr, isNavigationPlugin as zr, isEventConsumerPlugin as Lr, needsInitialization as Br, isApiIdentityPlugin as Hr, isMdxProviderPlugin as Kr, hasHead as Ur } from "./zudoku.plugins.js";
33
+ import { DropdownMenu as Yr, DropdownMenuTrigger as Zr, DropdownMenuContent as Vr, DropdownMenuLabel as Wr, DropdownMenuSeparator as be, DropdownMenuSub as Gr, DropdownMenuSubTrigger as Xr, DropdownMenuPortal as Jr, DropdownMenuSubContent as en, DropdownMenuItem as tn } from "./ui/DropdownMenu.js";
34
+ import { CircleXIcon as rn, ChevronRightIcon as nn, SearchIcon as sn, SunIcon as an, MoonIcon as on, MenuIcon as cn, PanelLeftIcon as ln } from "lucide-react";
35
+ import { VisuallyHidden as yt } from "@radix-ui/react-visually-hidden";
36
+ import { D as un, a as dn, b as xt, c as bt, d as z } from "./Drawer-kDAfOq_2.js";
37
+ import { a as fn } from "./index-CPNSgwSb.js";
38
+ import { S as jt } from "./Spinner-CE68iCm0.js";
39
+ import { C as hn } from "./CategoryHeading-DpB47wvk.js";
40
+ import { o as mn } from "./objectEntries-yMIkr2mI.js";
41
+ const Ce = {}, wt = he.createContext(Ce);
42
+ function Pt(t) {
43
+ const e = he.useContext(wt);
44
+ return he.useMemo(
45
+ function() {
46
+ return typeof t == "function" ? t(e) : { ...e, ...t };
47
+ },
48
+ [e, t]
49
+ );
50
+ }
51
+ function pn(t) {
52
+ let e;
53
+ return t.disableParentContext ? e = typeof t.components == "function" ? t.components(Ce) : t.components || Ce : e = Pt(t.components), he.createElement(
54
+ wt.Provider,
55
+ { value: e },
56
+ t.children
57
+ );
58
+ }
59
+ var F, nt, gn = (nt = class extends ut {
60
+ constructor(e = {}) {
61
+ super();
62
+ A(this, F);
63
+ this.config = e, M(this, F, /* @__PURE__ */ new Map());
64
+ }
65
+ build(e, r, n) {
66
+ const a = r.queryKey, i = r.queryHash ?? dt(a, r);
67
+ let o = this.get(i);
68
+ return o || (o = new ur({
69
+ client: e,
70
+ queryKey: a,
71
+ queryHash: i,
72
+ options: e.defaultQueryOptions(r),
73
+ state: n,
74
+ defaultOptions: e.getQueryDefaults(a)
75
+ }), this.add(o)), o;
76
+ }
77
+ add(e) {
78
+ d(this, F).has(e.queryHash) || (d(this, F).set(e.queryHash, e), this.notify({
79
+ type: "added",
80
+ query: e
81
+ }));
82
+ }
83
+ remove(e) {
84
+ const r = d(this, F).get(e.queryHash);
85
+ r && (e.destroy(), r === e && d(this, F).delete(e.queryHash), this.notify({ type: "removed", query: e }));
86
+ }
87
+ clear() {
88
+ R.batch(() => {
89
+ this.getAll().forEach((e) => {
90
+ this.remove(e);
91
+ });
92
+ });
93
+ }
94
+ get(e) {
95
+ return d(this, F).get(e);
96
+ }
97
+ getAll() {
98
+ return [...d(this, F).values()];
99
+ }
100
+ find(e) {
101
+ const r = { exact: !0, ...e };
102
+ return this.getAll().find(
103
+ (n) => $e(r, n)
104
+ );
105
+ }
106
+ findAll(e = {}) {
107
+ const r = this.getAll();
108
+ return Object.keys(e).length > 0 ? r.filter((n) => $e(e, n)) : r;
109
+ }
110
+ notify(e) {
111
+ R.batch(() => {
112
+ this.listeners.forEach((r) => {
113
+ r(e);
114
+ });
115
+ });
116
+ }
117
+ onFocus() {
118
+ R.batch(() => {
119
+ this.getAll().forEach((e) => {
120
+ e.onFocus();
121
+ });
122
+ });
123
+ }
124
+ onOnline() {
125
+ R.batch(() => {
126
+ this.getAll().forEach((e) => {
127
+ e.onOnline();
128
+ });
129
+ });
130
+ }
131
+ }, F = new WeakMap(), nt), H, D, oe, st, vn = (st = class extends ut {
132
+ constructor(e = {}) {
133
+ super();
134
+ A(this, H);
135
+ A(this, D);
136
+ A(this, oe);
137
+ this.config = e, M(this, H, /* @__PURE__ */ new Set()), M(this, D, /* @__PURE__ */ new Map()), M(this, oe, 0);
138
+ }
139
+ build(e, r, n) {
140
+ const a = new Tr({
141
+ mutationCache: this,
142
+ mutationId: ++ce(this, oe)._,
143
+ options: e.defaultMutationOptions(r),
144
+ state: n
145
+ });
146
+ return this.add(a), a;
147
+ }
148
+ add(e) {
149
+ d(this, H).add(e);
150
+ const r = le(e);
151
+ if (typeof r == "string") {
152
+ const n = d(this, D).get(r);
153
+ n ? n.push(e) : d(this, D).set(r, [e]);
154
+ }
155
+ this.notify({ type: "added", mutation: e });
156
+ }
157
+ remove(e) {
158
+ if (d(this, H).delete(e)) {
159
+ const r = le(e);
160
+ if (typeof r == "string") {
161
+ const n = d(this, D).get(r);
162
+ if (n)
163
+ if (n.length > 1) {
164
+ const a = n.indexOf(e);
165
+ a !== -1 && n.splice(a, 1);
166
+ } else n[0] === e && d(this, D).delete(r);
167
+ }
168
+ }
169
+ this.notify({ type: "removed", mutation: e });
170
+ }
171
+ canRun(e) {
172
+ const r = le(e);
173
+ if (typeof r == "string") {
174
+ const n = d(this, D).get(r), a = n == null ? void 0 : n.find(
175
+ (i) => i.state.status === "pending"
176
+ );
177
+ return !a || a === e;
178
+ } else
179
+ return !0;
180
+ }
181
+ runNext(e) {
182
+ var n;
183
+ const r = le(e);
184
+ if (typeof r == "string") {
185
+ const a = (n = d(this, D).get(r)) == null ? void 0 : n.find((i) => i !== e && i.state.isPaused);
186
+ return (a == null ? void 0 : a.continue()) ?? Promise.resolve();
187
+ } else
188
+ return Promise.resolve();
189
+ }
190
+ clear() {
191
+ R.batch(() => {
192
+ d(this, H).forEach((e) => {
193
+ this.notify({ type: "removed", mutation: e });
194
+ }), d(this, H).clear(), d(this, D).clear();
195
+ });
196
+ }
197
+ getAll() {
198
+ return Array.from(d(this, H));
199
+ }
200
+ find(e) {
201
+ const r = { exact: !0, ...e };
202
+ return this.getAll().find(
203
+ (n) => Fe(r, n)
204
+ );
205
+ }
206
+ findAll(e = {}) {
207
+ return this.getAll().filter((r) => Fe(e, r));
208
+ }
209
+ notify(e) {
210
+ R.batch(() => {
211
+ this.listeners.forEach((r) => {
212
+ r(e);
213
+ });
214
+ });
215
+ }
216
+ resumePausedMutations() {
217
+ const e = this.getAll().filter((r) => r.state.isPaused);
218
+ return R.batch(
219
+ () => Promise.all(
220
+ e.map((r) => r.continue().catch(B))
221
+ )
222
+ );
223
+ }
224
+ }, H = new WeakMap(), D = new WeakMap(), oe = new WeakMap(), st);
225
+ function le(t) {
226
+ var e;
227
+ return (e = t.options.scope) == null ? void 0 : e.id;
228
+ }
229
+ function Ke(t) {
230
+ return {
231
+ onFetch: (e, r) => {
232
+ var b, y, g, x, m;
233
+ const n = e.options, a = (g = (y = (b = e.fetchOptions) == null ? void 0 : b.meta) == null ? void 0 : y.fetchMore) == null ? void 0 : g.direction, i = ((x = e.state.data) == null ? void 0 : x.pages) || [], o = ((m = e.state.data) == null ? void 0 : m.pageParams) || [];
234
+ let f = { pages: [], pageParams: [] }, h = 0;
235
+ const l = async () => {
236
+ let p = !1;
237
+ const C = (v) => {
238
+ Object.defineProperty(v, "signal", {
239
+ enumerable: !0,
240
+ get: () => (e.signal.aborted ? p = !0 : e.signal.addEventListener("abort", () => {
241
+ p = !0;
242
+ }), e.signal)
243
+ });
244
+ }, N = dr(e.options, e.fetchOptions), T = async (v, j, c) => {
245
+ if (p)
246
+ return Promise.reject();
247
+ if (j == null && v.pages.length)
248
+ return Promise.resolve(v);
249
+ const S = {
250
+ client: e.client,
251
+ queryKey: e.queryKey,
252
+ pageParam: j,
253
+ direction: c ? "backward" : "forward",
254
+ meta: e.options.meta
255
+ };
256
+ C(S);
257
+ const k = await N(
258
+ S
259
+ ), { maxPages: _ } = e.options, L = c ? fr : hr;
260
+ return {
261
+ pages: L(v.pages, k, _),
262
+ pageParams: L(v.pageParams, j, _)
263
+ };
264
+ };
265
+ if (a && i.length) {
266
+ const v = a === "backward", j = v ? yn : Ue, c = {
267
+ pages: i,
268
+ pageParams: o
269
+ }, S = j(n, c);
270
+ f = await T(c, S, v);
271
+ } else {
272
+ const v = t ?? i.length;
273
+ do {
274
+ const j = h === 0 ? o[0] ?? n.initialPageParam : Ue(n, f);
275
+ if (h > 0 && j == null)
276
+ break;
277
+ f = await T(f, j), h++;
278
+ } while (h < v);
279
+ }
280
+ return f;
281
+ };
282
+ e.options.persister ? e.fetchFn = () => {
283
+ var p, C;
284
+ return (C = (p = e.options).persister) == null ? void 0 : C.call(
285
+ p,
286
+ l,
287
+ {
288
+ client: e.client,
289
+ queryKey: e.queryKey,
290
+ meta: e.options.meta,
291
+ signal: e.signal
292
+ },
293
+ r
294
+ );
295
+ } : e.fetchFn = l;
296
+ }
297
+ };
298
+ }
299
+ function Ue(t, { pages: e, pageParams: r }) {
300
+ const n = e.length - 1;
301
+ return e.length > 0 ? t.getNextPageParam(
302
+ e[n],
303
+ e,
304
+ r[n],
305
+ r
306
+ ) : void 0;
307
+ }
308
+ function yn(t, { pages: e, pageParams: r }) {
309
+ var n;
310
+ return e.length > 0 ? (n = t.getPreviousPageParam) == null ? void 0 : n.call(t, e[0], e, r[0], r) : void 0;
311
+ }
312
+ var E, Y, Z, te, re, V, ne, se, at, xn = (at = class {
313
+ constructor(t = {}) {
314
+ A(this, E);
315
+ A(this, Y);
316
+ A(this, Z);
317
+ A(this, te);
318
+ A(this, re);
319
+ A(this, V);
320
+ A(this, ne);
321
+ A(this, se);
322
+ M(this, E, t.queryCache || new gn()), M(this, Y, t.mutationCache || new vn()), M(this, Z, t.defaultOptions || {}), M(this, te, /* @__PURE__ */ new Map()), M(this, re, /* @__PURE__ */ new Map()), M(this, V, 0);
323
+ }
324
+ mount() {
325
+ ce(this, V)._++, d(this, V) === 1 && (M(this, ne, mr.subscribe(async (t) => {
326
+ t && (await this.resumePausedMutations(), d(this, E).onFocus());
327
+ })), M(this, se, Ie.subscribe(async (t) => {
328
+ t && (await this.resumePausedMutations(), d(this, E).onOnline());
329
+ })));
330
+ }
331
+ unmount() {
332
+ var t, e;
333
+ ce(this, V)._--, d(this, V) === 0 && ((t = d(this, ne)) == null || t.call(this), M(this, ne, void 0), (e = d(this, se)) == null || e.call(this), M(this, se, void 0));
334
+ }
335
+ isFetching(t) {
336
+ return d(this, E).findAll({ ...t, fetchStatus: "fetching" }).length;
337
+ }
338
+ isMutating(t) {
339
+ return d(this, Y).findAll({ ...t, status: "pending" }).length;
340
+ }
341
+ getQueryData(t) {
342
+ var r;
343
+ const e = this.defaultQueryOptions({ queryKey: t });
344
+ return (r = d(this, E).get(e.queryHash)) == null ? void 0 : r.state.data;
345
+ }
346
+ ensureQueryData(t) {
347
+ const e = this.defaultQueryOptions(t), r = d(this, E).build(this, e), n = r.state.data;
348
+ return n === void 0 ? this.fetchQuery(t) : (t.revalidateIfStale && r.isStaleByTime(Qe(e.staleTime, r)) && this.prefetchQuery(e), Promise.resolve(n));
349
+ }
350
+ getQueriesData(t) {
351
+ return d(this, E).findAll(t).map(({ queryKey: e, state: r }) => {
352
+ const n = r.data;
353
+ return [e, n];
354
+ });
355
+ }
356
+ setQueryData(t, e, r) {
357
+ const n = this.defaultQueryOptions({ queryKey: t }), a = d(this, E).get(
358
+ n.queryHash
359
+ ), i = a == null ? void 0 : a.state.data, o = pr(e, i);
360
+ if (o !== void 0)
361
+ return d(this, E).build(this, n).setData(o, { ...r, manual: !0 });
362
+ }
363
+ setQueriesData(t, e, r) {
364
+ return R.batch(
365
+ () => d(this, E).findAll(t).map(({ queryKey: n }) => [
366
+ n,
367
+ this.setQueryData(n, e, r)
368
+ ])
369
+ );
370
+ }
371
+ getQueryState(t) {
372
+ var r;
373
+ const e = this.defaultQueryOptions({ queryKey: t });
374
+ return (r = d(this, E).get(
375
+ e.queryHash
376
+ )) == null ? void 0 : r.state;
377
+ }
378
+ removeQueries(t) {
379
+ const e = d(this, E);
380
+ R.batch(() => {
381
+ e.findAll(t).forEach((r) => {
382
+ e.remove(r);
383
+ });
384
+ });
385
+ }
386
+ resetQueries(t, e) {
387
+ const r = d(this, E), n = {
388
+ type: "active",
389
+ ...t
390
+ };
391
+ return R.batch(() => (r.findAll(t).forEach((a) => {
392
+ a.reset();
393
+ }), this.refetchQueries(n, e)));
394
+ }
395
+ cancelQueries(t, e = {}) {
396
+ const r = { revert: !0, ...e }, n = R.batch(
397
+ () => d(this, E).findAll(t).map((a) => a.cancel(r))
398
+ );
399
+ return Promise.all(n).then(B).catch(B);
400
+ }
401
+ invalidateQueries(t, e = {}) {
402
+ return R.batch(() => {
403
+ if (d(this, E).findAll(t).forEach((n) => {
404
+ n.invalidate();
405
+ }), (t == null ? void 0 : t.refetchType) === "none")
406
+ return Promise.resolve();
407
+ const r = {
408
+ ...t,
409
+ type: (t == null ? void 0 : t.refetchType) ?? (t == null ? void 0 : t.type) ?? "active"
410
+ };
411
+ return this.refetchQueries(r, e);
412
+ });
413
+ }
414
+ refetchQueries(t, e = {}) {
415
+ const r = {
416
+ ...e,
417
+ cancelRefetch: e.cancelRefetch ?? !0
418
+ }, n = R.batch(
419
+ () => d(this, E).findAll(t).filter((a) => !a.isDisabled()).map((a) => {
420
+ let i = a.fetch(void 0, r);
421
+ return r.throwOnError || (i = i.catch(B)), a.state.fetchStatus === "paused" ? Promise.resolve() : i;
422
+ })
423
+ );
424
+ return Promise.all(n).then(B);
425
+ }
426
+ fetchQuery(t) {
427
+ const e = this.defaultQueryOptions(t);
428
+ e.retry === void 0 && (e.retry = !1);
429
+ const r = d(this, E).build(this, e);
430
+ return r.isStaleByTime(
431
+ Qe(e.staleTime, r)
432
+ ) ? r.fetch(e) : Promise.resolve(r.state.data);
433
+ }
434
+ prefetchQuery(t) {
435
+ return this.fetchQuery(t).then(B).catch(B);
436
+ }
437
+ fetchInfiniteQuery(t) {
438
+ return t.behavior = Ke(t.pages), this.fetchQuery(t);
439
+ }
440
+ prefetchInfiniteQuery(t) {
441
+ return this.fetchInfiniteQuery(t).then(B).catch(B);
442
+ }
443
+ ensureInfiniteQueryData(t) {
444
+ return t.behavior = Ke(t.pages), this.ensureQueryData(t);
445
+ }
446
+ resumePausedMutations() {
447
+ return Ie.isOnline() ? d(this, Y).resumePausedMutations() : Promise.resolve();
448
+ }
449
+ getQueryCache() {
450
+ return d(this, E);
451
+ }
452
+ getMutationCache() {
453
+ return d(this, Y);
454
+ }
455
+ getDefaultOptions() {
456
+ return d(this, Z);
457
+ }
458
+ setDefaultOptions(t) {
459
+ M(this, Z, t);
460
+ }
461
+ setQueryDefaults(t, e) {
462
+ d(this, te).set(ze(t), {
463
+ queryKey: t,
464
+ defaultOptions: e
465
+ });
466
+ }
467
+ getQueryDefaults(t) {
468
+ const e = [...d(this, te).values()], r = {};
469
+ return e.forEach((n) => {
470
+ Le(t, n.queryKey) && Object.assign(r, n.defaultOptions);
471
+ }), r;
472
+ }
473
+ setMutationDefaults(t, e) {
474
+ d(this, re).set(ze(t), {
475
+ mutationKey: t,
476
+ defaultOptions: e
477
+ });
478
+ }
479
+ getMutationDefaults(t) {
480
+ const e = [...d(this, re).values()];
481
+ let r = {};
482
+ return e.forEach((n) => {
483
+ Le(t, n.mutationKey) && (r = { ...r, ...n.defaultOptions });
484
+ }), r;
485
+ }
486
+ defaultQueryOptions(t) {
487
+ if (t._defaulted)
488
+ return t;
489
+ const e = {
490
+ ...d(this, Z).queries,
491
+ ...this.getQueryDefaults(t.queryKey),
492
+ ...t,
493
+ _defaulted: !0
494
+ };
495
+ return e.queryHash || (e.queryHash = dt(
496
+ e.queryKey,
497
+ e
498
+ )), 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 === gr && (e.enabled = !1), e;
499
+ }
500
+ defaultMutationOptions(t) {
501
+ return t != null && t._defaulted ? t : {
502
+ ...d(this, Z).mutations,
503
+ ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
504
+ ...t,
505
+ _defaulted: !0
506
+ };
507
+ }
508
+ clear() {
509
+ d(this, E).clear(), d(this, Y).clear();
510
+ }
511
+ }, E = new WeakMap(), Y = new WeakMap(), Z = new WeakMap(), te = new WeakMap(), re = new WeakMap(), V = new WeakMap(), ne = new WeakMap(), se = new WeakMap(), at);
512
+ function bn(t) {
513
+ return t;
514
+ }
515
+ function Ye(t, e, r) {
516
+ var h, l;
517
+ if (typeof e != "object" || e === null)
518
+ return;
519
+ const n = t.getMutationCache(), a = t.getQueryCache(), i = ((h = r == null ? void 0 : r.defaultOptions) == null ? void 0 : h.deserializeData) ?? ((l = t.getDefaultOptions().hydrate) == null ? void 0 : l.deserializeData) ?? bn, o = e.mutations || [], f = e.queries || [];
520
+ o.forEach(({ state: b, ...y }) => {
521
+ var g, x;
522
+ n.build(
523
+ t,
524
+ {
525
+ ...(g = t.getDefaultOptions().hydrate) == null ? void 0 : g.mutations,
526
+ ...(x = r == null ? void 0 : r.defaultOptions) == null ? void 0 : x.mutations,
527
+ ...y
528
+ },
529
+ b
530
+ );
531
+ }), f.forEach(({ queryKey: b, state: y, queryHash: g, meta: x, promise: m }) => {
532
+ var N, T;
533
+ let p = a.get(g);
534
+ const C = y.data === void 0 ? y.data : i(y.data);
535
+ if (p) {
536
+ if (p.state.dataUpdatedAt < y.dataUpdatedAt) {
537
+ const { fetchStatus: v, ...j } = y;
538
+ p.setState({
539
+ ...j,
540
+ data: C
541
+ });
542
+ }
543
+ } else
544
+ p = a.build(
545
+ t,
546
+ {
547
+ ...(N = t.getDefaultOptions().hydrate) == null ? void 0 : N.queries,
548
+ ...(T = r == null ? void 0 : r.defaultOptions) == null ? void 0 : T.queries,
549
+ queryKey: b,
550
+ queryHash: g,
551
+ meta: x
552
+ },
553
+ // Reset fetch status to idle to avoid
554
+ // query being stuck in fetching state upon hydration
555
+ {
556
+ ...y,
557
+ data: C,
558
+ fetchStatus: "idle"
559
+ }
560
+ );
561
+ if (m) {
562
+ const v = Promise.resolve(m).then(i);
563
+ p.fetch(void 0, { initialPromise: v });
564
+ }
565
+ });
566
+ }
567
+ var Ze = (t, e) => typeof t == "object" && t !== null && e in t, jn = ({
568
+ children: t,
569
+ options: e = {},
570
+ state: r,
571
+ queryClient: n
572
+ }) => {
573
+ const a = ft(n), [i, o] = K.useState(), f = K.useRef(e);
574
+ return f.current = e, K.useMemo(() => {
575
+ if (r) {
576
+ if (typeof r != "object")
577
+ return;
578
+ const h = a.getQueryCache(), l = r.queries || [], b = [], y = [];
579
+ for (const g of l) {
580
+ const x = h.get(g.queryHash);
581
+ if (!x)
582
+ b.push(g);
583
+ else {
584
+ const m = g.state.dataUpdatedAt > x.state.dataUpdatedAt || // RSC special serialized then-able chunks
585
+ Ze(g.promise, "status") && Ze(x.promise, "status") && g.promise.status !== x.promise.status, p = i == null ? void 0 : i.find(
586
+ (C) => C.queryHash === g.queryHash
587
+ );
588
+ m && (!p || g.state.dataUpdatedAt > p.state.dataUpdatedAt) && y.push(g);
589
+ }
590
+ }
591
+ b.length > 0 && Ye(a, { queries: b }, f.current), y.length > 0 && o(
592
+ (g) => g ? [...g, ...y] : y
593
+ );
594
+ }
595
+ }, [a, i, r]), K.useEffect(() => {
596
+ i && (Ye(a, { queries: i }, f.current), o(void 0));
597
+ }, [a, i]), t;
598
+ };
599
+ function wn({ error: t }) {
600
+ return /* @__PURE__ */ s.jsx(pt, { error: t });
601
+ }
602
+ /**
603
+ * react-router v7.2.0
604
+ *
605
+ * Copyright (c) Remix Software Inc.
606
+ *
607
+ * This source code is licensed under the MIT license found in the
608
+ * LICENSE.md file in the root directory of this source tree.
609
+ *
610
+ * @license MIT
611
+ */
612
+ function Pn(t) {
613
+ return /* @__PURE__ */ K.createElement(ir, { flushSync: Ar.flushSync, ...t });
614
+ }
615
+ const Ee = Me({ stagger: !1 }), Sn = new xn({
616
+ defaultOptions: {
617
+ queries: {
618
+ staleTime: 1e3 * 60 * 5
619
+ }
620
+ }
621
+ }), Cn = ({
622
+ router: t,
623
+ hydrate: e = !1
624
+ }) => /* @__PURE__ */ s.jsx(gt, { children: /* @__PURE__ */ s.jsx(ht, { client: Sn, children: /* @__PURE__ */ s.jsx(jn, { state: e ? window.DATA : void 0, children: /* @__PURE__ */ s.jsx(ot, { value: !1, children: /* @__PURE__ */ s.jsx(it, { children: /* @__PURE__ */ s.jsx(Ee.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ s.jsx(Pn, { router: t }) }) }) }) }) }) }), En = ({
625
+ router: t,
626
+ context: e,
627
+ queryClient: r,
628
+ helmetContext: n,
629
+ bypassProtection: a = !1
630
+ }) => /* @__PURE__ */ s.jsx(gt, { children: /* @__PURE__ */ s.jsx(ht, { client: r, children: /* @__PURE__ */ s.jsx(it, { context: n, children: /* @__PURE__ */ s.jsx(ot, { value: a, children: /* @__PURE__ */ s.jsx(cr, { router: t, context: e }) }) }) }) }), Nn = () => {
631
+ const t = pe(), e = G(t.pathname);
632
+ Q(() => {
633
+ const r = e.current !== t.pathname, n = t.hash !== "";
634
+ r && !n && window.scrollTo(0, 0), e.current = t.pathname;
635
+ }, [t.pathname, t.hash]);
636
+ };
637
+ function Tn({
638
+ className: t,
639
+ ...e
640
+ }) {
641
+ return /* @__PURE__ */ s.jsx(
642
+ "div",
643
+ {
644
+ className: $("animate-pulse rounded-md bg-muted", t),
645
+ ...e
646
+ }
647
+ );
648
+ }
649
+ const Ve = {
650
+ info: "bg-blue-500",
651
+ note: "bg-gray-500",
652
+ tip: "bg-green-600",
653
+ caution: "bg-orange-500",
654
+ danger: "bg-rose-500"
655
+ }, Mn = () => {
656
+ const { page: t } = I(), [e, r] = J(!0);
657
+ if (!(t != null && t.banner) || !e)
658
+ return /* @__PURE__ */ s.jsx("style", { children: ":root { --banner-height: 0px; }" });
659
+ const n = t.banner.color && t.banner.color in Ve ? Ve[t.banner.color] : t.banner.color ? void 0 : "bg-primary", a = n ? {} : { backgroundColor: t.banner.color };
660
+ return /* @__PURE__ */ s.jsxs(
661
+ "div",
662
+ {
663
+ className: $(
664
+ "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
665
+ n
666
+ ),
667
+ "data-pagefind-ignore": "all",
668
+ style: a,
669
+ children: [
670
+ /* @__PURE__ */ s.jsx("div", { className: "w-full", children: t.banner.message }),
671
+ t.banner.dismissible && /* @__PURE__ */ s.jsx(
672
+ "button",
673
+ {
674
+ type: "button",
675
+ className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
676
+ onClick: () => r(!1),
677
+ children: /* @__PURE__ */ s.jsx(rn, { size: 16 })
678
+ }
679
+ )
680
+ ]
681
+ }
682
+ );
683
+ }, St = (t) => /* @__PURE__ */ s.jsxs(
684
+ "svg",
685
+ {
686
+ xmlns: "http://www.w3.org/2000/svg",
687
+ viewBox: "0 0 132 100",
688
+ fill: "none",
689
+ ...t,
690
+ children: [
691
+ /* @__PURE__ */ s.jsx(
692
+ "path",
693
+ {
694
+ fill: "currentColor",
695
+ fillRule: "evenodd",
696
+ d: "M80.092 2.963A4.66 4.66 0 0 1 84.449 0h34.049c6.325 0 10.835 6.135 8.948 12.172L116.653 46.71a4.688 4.688 0 0 1-4.474 3.29H75c-5.178 0-7.813 4.687-9.375 9.374-1.288 3.864-11.07 28.963-14.467 37.662A4.66 4.66 0 0 1 46.801 100H12.75c-6.324 0-10.834-6.134-8.947-12.171l10.793-34.54A4.688 4.688 0 0 1 19.071 50H56.25c5.178 0 7.813-4.687 9.375-9.375 1.288-3.864 11.07-28.962 14.467-37.662Z",
697
+ clipRule: "evenodd"
698
+ }
699
+ ),
700
+ /* @__PURE__ */ s.jsx(
701
+ "path",
702
+ {
703
+ fill: "currentColor",
704
+ d: "M83.54 57.813a7.813 7.813 0 0 0-7.316 5.07L63.888 95.777c-.766 2.043.744 4.222 2.926 4.222h36.828c5.211 0 9.875-3.232 11.704-8.11l8.821-23.522c1.915-5.107-1.861-10.555-7.315-10.555H83.539ZM29.17 0a12.5 12.5 0 0 0-11.704 8.111l-8.82 23.521c-1.915 5.107 1.86 10.556 7.315 10.556h33.312a7.813 7.813 0 0 0 7.316-5.07L68.924 4.223C69.691 2.18 68.18 0 65.998 0H29.17Z"
705
+ }
706
+ )
707
+ ]
708
+ }
709
+ );
710
+ St.displayName = "ZudokuLogo";
711
+ const Ct = ({ className: t }) => /* @__PURE__ */ s.jsxs(
712
+ "a",
713
+ {
714
+ href: "https://zudoku.dev",
715
+ target: "_blank",
716
+ rel: "noopener noreferrer",
717
+ className: $(
718
+ "flex justify-between items-center w-full border border-transparent hover:border-border rounded-full hover:shadow-sm h-7 px-3 text-nowrap hover:bg-muted/80 transition-all",
719
+ t
720
+ ),
721
+ children: [
722
+ /* @__PURE__ */ s.jsxs("div", { className: "opacity-70 hover:opacity-100 transition-opacity gap-1.5 text-[11px] font-medium rounded-full h-7 flex items-center text-nowrap", children: [
723
+ /* @__PURE__ */ s.jsx(St, { className: "w-3.5 h-3.5 dark:fill-white" }),
724
+ "powered by Zudoku"
725
+ ] }),
726
+ /* @__PURE__ */ s.jsx("div", { className: "text-xs font-medium opacity-70 hover:text-foreground transition-colors cursor-pointer", children: /* @__PURE__ */ s.jsx(nn, { size: 12, absoluteStrokeWidth: !0, strokeWidth: 1.5 }) })
727
+ ]
728
+ }
729
+ ), Et = ({ className: t }) => {
730
+ const e = I(), [r, n] = J(!1), a = W(() => n(!1), []);
731
+ Q(() => {
732
+ if (r)
733
+ return;
734
+ function o(f) {
735
+ f.key === "k" && (f.metaKey || f.ctrlKey) && (f.preventDefault(), n(!0));
736
+ }
737
+ return window.addEventListener("keydown", o), () => {
738
+ window.removeEventListener("keydown", o);
739
+ };
740
+ }, [r, n]);
741
+ const i = e.plugins.find(Ir);
742
+ return i ? /* @__PURE__ */ s.jsxs("div", { className: t, children: [
743
+ /* @__PURE__ */ s.jsxs(
744
+ "button",
745
+ {
746
+ type: "button",
747
+ onClick: () => n(!0),
748
+ 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",
749
+ children: [
750
+ /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
751
+ /* @__PURE__ */ s.jsx(sn, { size: 14 }),
752
+ "Search"
753
+ ] }),
754
+ /* @__PURE__ */ s.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" })
755
+ ]
756
+ }
757
+ ),
758
+ /* @__PURE__ */ s.jsx(Oe, { fallback: null, children: i.renderSearch({
759
+ isOpen: r,
760
+ onClose: a
761
+ }) })
762
+ ] }) : null;
763
+ }, Nt = () => {
764
+ const { resolvedTheme: t, setTheme: e } = ct();
765
+ return /* @__PURE__ */ s.jsx(Ae, { fallback: /* @__PURE__ */ s.jsx(Se, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ s.jsxs(
766
+ "button",
767
+ {
768
+ type: "button",
769
+ className: "flex rounded-full border p-0.5 gap-0.5 group",
770
+ onClick: () => e(t === "dark" ? "light" : "dark"),
771
+ "aria-label": t === "dark" ? "Switch to light mode" : "Switch to dark mode",
772
+ children: [
773
+ /* @__PURE__ */ s.jsx(
774
+ "div",
775
+ {
776
+ className: $(
777
+ "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",
778
+ t === "light" && "border-border bg-muted",
779
+ 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] "
780
+ ),
781
+ children: /* @__PURE__ */ s.jsx(an, { size: 16 })
782
+ }
783
+ ),
784
+ /* @__PURE__ */ s.jsx(
785
+ "div",
786
+ {
787
+ className: $(
788
+ "border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
789
+ t === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
790
+ t === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
791
+ ),
792
+ children: /* @__PURE__ */ s.jsx(on, { size: 16 })
793
+ }
794
+ )
795
+ ]
796
+ }
797
+ ) });
798
+ };
799
+ function me() {
800
+ return me = Object.assign ? Object.assign.bind() : function(t) {
801
+ for (var e = 1; e < arguments.length; e++) {
802
+ var r = arguments[e];
803
+ for (var n in r) ({}).hasOwnProperty.call(r, n) && (t[n] = r[n]);
804
+ }
805
+ return t;
806
+ }, me.apply(null, arguments);
807
+ }
808
+ var ue = { exports: {} }, w = {};
809
+ /** @license React v16.13.1
810
+ * react-is.production.min.js
811
+ *
812
+ * Copyright (c) Facebook, Inc. and its affiliates.
813
+ *
814
+ * This source code is licensed under the MIT license found in the
815
+ * LICENSE file in the root directory of this source tree.
816
+ */
817
+ var We;
818
+ function On() {
819
+ if (We) return w;
820
+ We = 1;
821
+ var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, n = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, f = t ? Symbol.for("react.context") : 60110, h = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, b = t ? Symbol.for("react.forward_ref") : 60112, y = t ? Symbol.for("react.suspense") : 60113, g = t ? Symbol.for("react.suspense_list") : 60120, x = t ? Symbol.for("react.memo") : 60115, m = t ? Symbol.for("react.lazy") : 60116, p = t ? Symbol.for("react.block") : 60121, C = t ? Symbol.for("react.fundamental") : 60117, N = t ? Symbol.for("react.responder") : 60118, T = t ? Symbol.for("react.scope") : 60119;
822
+ function v(c) {
823
+ if (typeof c == "object" && c !== null) {
824
+ var S = c.$$typeof;
825
+ switch (S) {
826
+ case e:
827
+ switch (c = c.type, c) {
828
+ case h:
829
+ case l:
830
+ case n:
831
+ case i:
832
+ case a:
833
+ case y:
834
+ return c;
835
+ default:
836
+ switch (c = c && c.$$typeof, c) {
837
+ case f:
838
+ case b:
839
+ case m:
840
+ case x:
841
+ case o:
842
+ return c;
843
+ default:
844
+ return S;
845
+ }
846
+ }
847
+ case r:
848
+ return S;
849
+ }
850
+ }
851
+ }
852
+ function j(c) {
853
+ return v(c) === l;
854
+ }
855
+ return w.AsyncMode = h, w.ConcurrentMode = l, w.ContextConsumer = f, w.ContextProvider = o, w.Element = e, w.ForwardRef = b, w.Fragment = n, w.Lazy = m, w.Memo = x, w.Portal = r, w.Profiler = i, w.StrictMode = a, w.Suspense = y, w.isAsyncMode = function(c) {
856
+ return j(c) || v(c) === h;
857
+ }, w.isConcurrentMode = j, w.isContextConsumer = function(c) {
858
+ return v(c) === f;
859
+ }, w.isContextProvider = function(c) {
860
+ return v(c) === o;
861
+ }, w.isElement = function(c) {
862
+ return typeof c == "object" && c !== null && c.$$typeof === e;
863
+ }, w.isForwardRef = function(c) {
864
+ return v(c) === b;
865
+ }, w.isFragment = function(c) {
866
+ return v(c) === n;
867
+ }, w.isLazy = function(c) {
868
+ return v(c) === m;
869
+ }, w.isMemo = function(c) {
870
+ return v(c) === x;
871
+ }, w.isPortal = function(c) {
872
+ return v(c) === r;
873
+ }, w.isProfiler = function(c) {
874
+ return v(c) === i;
875
+ }, w.isStrictMode = function(c) {
876
+ return v(c) === a;
877
+ }, w.isSuspense = function(c) {
878
+ return v(c) === y;
879
+ }, w.isValidElementType = function(c) {
880
+ return typeof c == "string" || typeof c == "function" || c === n || c === l || c === i || c === a || c === y || c === g || typeof c == "object" && c !== null && (c.$$typeof === m || c.$$typeof === x || c.$$typeof === o || c.$$typeof === f || c.$$typeof === b || c.$$typeof === C || c.$$typeof === N || c.$$typeof === T || c.$$typeof === p);
881
+ }, w.typeOf = v, w;
882
+ }
883
+ var P = {};
884
+ /** @license React v16.13.1
885
+ * react-is.development.js
886
+ *
887
+ * Copyright (c) Facebook, Inc. and its affiliates.
888
+ *
889
+ * This source code is licensed under the MIT license found in the
890
+ * LICENSE file in the root directory of this source tree.
891
+ */
892
+ var Ge;
893
+ function An() {
894
+ return Ge || (Ge = 1, process.env.NODE_ENV !== "production" && function() {
895
+ var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, r = t ? Symbol.for("react.portal") : 60106, n = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, f = t ? Symbol.for("react.context") : 60110, h = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, b = t ? Symbol.for("react.forward_ref") : 60112, y = t ? Symbol.for("react.suspense") : 60113, g = t ? Symbol.for("react.suspense_list") : 60120, x = t ? Symbol.for("react.memo") : 60115, m = t ? Symbol.for("react.lazy") : 60116, p = t ? Symbol.for("react.block") : 60121, C = t ? Symbol.for("react.fundamental") : 60117, N = t ? Symbol.for("react.responder") : 60118, T = t ? Symbol.for("react.scope") : 60119;
896
+ function v(u) {
897
+ return typeof u == "string" || typeof u == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
898
+ u === n || u === l || u === i || u === a || u === y || u === g || typeof u == "object" && u !== null && (u.$$typeof === m || u.$$typeof === x || u.$$typeof === o || u.$$typeof === f || u.$$typeof === b || u.$$typeof === C || u.$$typeof === N || u.$$typeof === T || u.$$typeof === p);
899
+ }
900
+ function j(u) {
901
+ if (typeof u == "object" && u !== null) {
902
+ var ye = u.$$typeof;
903
+ switch (ye) {
904
+ case e:
905
+ var ie = u.type;
906
+ switch (ie) {
907
+ case h:
908
+ case l:
909
+ case n:
910
+ case i:
911
+ case a:
912
+ case y:
913
+ return ie;
914
+ default:
915
+ var _e = ie && ie.$$typeof;
916
+ switch (_e) {
917
+ case f:
918
+ case b:
919
+ case m:
920
+ case x:
921
+ case o:
922
+ return _e;
923
+ default:
924
+ return ye;
925
+ }
926
+ }
927
+ case r:
928
+ return ye;
929
+ }
930
+ }
931
+ }
932
+ var c = h, S = l, k = f, _ = o, L = e, U = b, ve = n, X = m, Qt = x, zt = r, Lt = i, Bt = a, Ht = y, Re = !1;
933
+ function Kt(u) {
934
+ return Re || (Re = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), ke(u) || j(u) === h;
935
+ }
936
+ function ke(u) {
937
+ return j(u) === l;
938
+ }
939
+ function Ut(u) {
940
+ return j(u) === f;
941
+ }
942
+ function Yt(u) {
943
+ return j(u) === o;
944
+ }
945
+ function Zt(u) {
946
+ return typeof u == "object" && u !== null && u.$$typeof === e;
947
+ }
948
+ function Vt(u) {
949
+ return j(u) === b;
950
+ }
951
+ function Wt(u) {
952
+ return j(u) === n;
953
+ }
954
+ function Gt(u) {
955
+ return j(u) === m;
956
+ }
957
+ function Xt(u) {
958
+ return j(u) === x;
959
+ }
960
+ function Jt(u) {
961
+ return j(u) === r;
962
+ }
963
+ function er(u) {
964
+ return j(u) === i;
965
+ }
966
+ function tr(u) {
967
+ return j(u) === a;
968
+ }
969
+ function rr(u) {
970
+ return j(u) === y;
971
+ }
972
+ P.AsyncMode = c, P.ConcurrentMode = S, P.ContextConsumer = k, P.ContextProvider = _, P.Element = L, P.ForwardRef = U, P.Fragment = ve, P.Lazy = X, P.Memo = Qt, P.Portal = zt, P.Profiler = Lt, P.StrictMode = Bt, P.Suspense = Ht, P.isAsyncMode = Kt, P.isConcurrentMode = ke, P.isContextConsumer = Ut, P.isContextProvider = Yt, P.isElement = Zt, P.isForwardRef = Vt, P.isFragment = Wt, P.isLazy = Gt, P.isMemo = Xt, P.isPortal = Jt, P.isProfiler = er, P.isStrictMode = tr, P.isSuspense = rr, P.isValidElementType = v, P.typeOf = j;
973
+ }()), P;
974
+ }
975
+ var Xe;
976
+ function Rn() {
977
+ return Xe || (Xe = 1, process.env.NODE_ENV === "production" ? ue.exports = On() : ue.exports = An()), ue.exports;
978
+ }
979
+ var je, Je;
980
+ function kn() {
981
+ if (Je) return je;
982
+ Je = 1;
983
+ var t = Rn(), e = {
984
+ childContextTypes: !0,
985
+ contextType: !0,
986
+ contextTypes: !0,
987
+ defaultProps: !0,
988
+ displayName: !0,
989
+ getDefaultProps: !0,
990
+ getDerivedStateFromError: !0,
991
+ getDerivedStateFromProps: !0,
992
+ mixins: !0,
993
+ propTypes: !0,
994
+ type: !0
995
+ }, r = {
996
+ name: !0,
997
+ length: !0,
998
+ prototype: !0,
999
+ caller: !0,
1000
+ callee: !0,
1001
+ arguments: !0,
1002
+ arity: !0
1003
+ }, n = {
1004
+ $$typeof: !0,
1005
+ render: !0,
1006
+ defaultProps: !0,
1007
+ displayName: !0,
1008
+ propTypes: !0
1009
+ }, a = {
1010
+ $$typeof: !0,
1011
+ compare: !0,
1012
+ defaultProps: !0,
1013
+ displayName: !0,
1014
+ propTypes: !0,
1015
+ type: !0
1016
+ }, i = {};
1017
+ i[t.ForwardRef] = n, i[t.Memo] = a;
1018
+ function o(m) {
1019
+ return t.isMemo(m) ? a : i[m.$$typeof] || e;
1020
+ }
1021
+ var f = Object.defineProperty, h = Object.getOwnPropertyNames, l = Object.getOwnPropertySymbols, b = Object.getOwnPropertyDescriptor, y = Object.getPrototypeOf, g = Object.prototype;
1022
+ function x(m, p, C) {
1023
+ if (typeof p != "string") {
1024
+ if (g) {
1025
+ var N = y(p);
1026
+ N && N !== g && x(m, N, C);
1027
+ }
1028
+ var T = h(p);
1029
+ l && (T = T.concat(l(p)));
1030
+ for (var v = o(m), j = o(p), c = 0; c < T.length; ++c) {
1031
+ var S = T[c];
1032
+ if (!r[S] && !(C && C[S]) && !(j && j[S]) && !(v && v[S])) {
1033
+ var k = b(p, S);
1034
+ try {
1035
+ f(m, S, k);
1036
+ } catch {
1037
+ }
1038
+ }
1039
+ }
1040
+ }
1041
+ return m;
1042
+ }
1043
+ return je = x, je;
1044
+ }
1045
+ kn();
1046
+ var Tt = function(e, r, n) {
1047
+ return e = e <= n ? e : n, e = e >= r ? e : r, e;
1048
+ }, _n = function() {
1049
+ var e = !1, r = [], n = function() {
1050
+ e = !0;
1051
+ var f = r.shift();
1052
+ if (f)
1053
+ return f(n);
1054
+ e = !1;
1055
+ }, a = function() {
1056
+ e = !1, r = [];
1057
+ }, i = function(f) {
1058
+ r.push(f), !e && r.length === 1 && n();
1059
+ };
1060
+ return {
1061
+ clear: a,
1062
+ enqueue: i
1063
+ };
1064
+ }, Dn = function() {
1065
+ var e, r = function() {
1066
+ e && window.cancelAnimationFrame(e);
1067
+ }, n = function(i, o) {
1068
+ var f, h, l = function(y) {
1069
+ if (h = h || y, f = y - h, f > o) {
1070
+ i();
1071
+ return;
1072
+ }
1073
+ e = window.requestAnimationFrame(l);
1074
+ };
1075
+ e = window.requestAnimationFrame(l);
1076
+ };
1077
+ return {
1078
+ cancel: r,
1079
+ schedule: n
1080
+ };
1081
+ }, qn = function(e) {
1082
+ var r = 0;
1083
+ return e >= 0 && e < 0.2 ? r = 0.1 : e >= 0.2 && e < 0.5 ? r = 0.04 : e >= 0.5 && e < 0.8 ? r = 0.02 : e >= 0.8 && e < 0.99 && (r = 5e-3), Tt(e + r, 0, 0.994);
1084
+ }, et = function(e) {
1085
+ Q(e, []);
1086
+ }, $n = function(e) {
1087
+ return ++e % 1e6;
1088
+ }, Fn = function() {
1089
+ var e = J(0), r = e[1];
1090
+ return W(function() {
1091
+ return r($n);
1092
+ }, []);
1093
+ }, In = function(e) {
1094
+ e === void 0 && (e = {});
1095
+ var r = Fn(), n = G(me({}, e)), a = W(function() {
1096
+ return n.current;
1097
+ }, []), i = W(function(o) {
1098
+ o && (Object.assign(n.current, o), r());
1099
+ }, []);
1100
+ return [a, i];
1101
+ }, Qn = function() {
1102
+ var e = G(!0);
1103
+ return e.current ? (e.current = !1, !0) : e.current;
1104
+ }, tt = function(e, r) {
1105
+ var n = Qn();
1106
+ Q(function() {
1107
+ if (!n)
1108
+ return e();
1109
+ }, r);
1110
+ }, Mt = function() {
1111
+ }, rt = {
1112
+ isFinished: !0,
1113
+ progress: 0,
1114
+ sideEffect: Mt
1115
+ }, zn = function(e) {
1116
+ var r = e === void 0 ? {} : e, n = r.animationDuration, a = n === void 0 ? 200 : n, i = r.incrementDuration, o = i === void 0 ? 800 : i, f = r.isAnimating, h = f === void 0 ? !1 : f, l = r.minimum, b = l === void 0 ? 0.08 : l, y = In(rt), g = y[0], x = y[1], m = G(null), p = G(null);
1117
+ et(function() {
1118
+ m.current = _n(), p.current = Dn();
1119
+ });
1120
+ var C = W(function() {
1121
+ var S, k;
1122
+ (S = p.current) == null || S.cancel(), (k = m.current) == null || k.clear();
1123
+ }, []), N = W(function(S) {
1124
+ var k;
1125
+ if (S = Tt(S, b, 1), S === 1) {
1126
+ var _, L;
1127
+ C(), (_ = m.current) == null || _.enqueue(function(U) {
1128
+ x({
1129
+ progress: S,
1130
+ sideEffect: function() {
1131
+ var X;
1132
+ return (X = p.current) == null ? void 0 : X.schedule(U, a);
1133
+ }
1134
+ });
1135
+ }), (L = m.current) == null || L.enqueue(function() {
1136
+ x({
1137
+ isFinished: !0,
1138
+ sideEffect: C
1139
+ });
1140
+ });
1141
+ return;
1142
+ }
1143
+ (k = m.current) == null || k.enqueue(function(U) {
1144
+ x({
1145
+ isFinished: !1,
1146
+ progress: S,
1147
+ sideEffect: function() {
1148
+ var X;
1149
+ return (X = p.current) == null ? void 0 : X.schedule(U, a);
1150
+ }
1151
+ });
1152
+ });
1153
+ }, [a, C, b, m, x, p]), T = W(function() {
1154
+ N(qn(g().progress));
1155
+ }, [g, N]), v = W(function() {
1156
+ var S = function() {
1157
+ var _;
1158
+ T(), (_ = m.current) == null || _.enqueue(function(L) {
1159
+ var U;
1160
+ (U = p.current) == null || U.schedule(function() {
1161
+ S(), L();
1162
+ }, o);
1163
+ });
1164
+ };
1165
+ S();
1166
+ }, [o, m, p, T]), j = G(Mt), c = g().sideEffect;
1167
+ return Q(function() {
1168
+ j.current = T;
1169
+ }), et(function() {
1170
+ return h && v(), C;
1171
+ }), tt(function() {
1172
+ g().sideEffect();
1173
+ }, [g, c]), tt(function() {
1174
+ h ? x(me({}, rt, {
1175
+ sideEffect: v
1176
+ })) : N(1);
1177
+ }, [h, N, x, v]), {
1178
+ animationDuration: a,
1179
+ isFinished: g().isFinished,
1180
+ progress: g().progress
1181
+ };
1182
+ };
1183
+ const Ot = (t) => (e) => e.display === "hide" ? !1 : e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", At = () => {
1184
+ const e = ge().state === "loading", [r, n] = J(!1);
1185
+ Q(() => {
1186
+ const o = setTimeout(() => n(e), 100);
1187
+ return () => clearTimeout(o);
1188
+ }, [e]);
1189
+ const { isFinished: a, progress: i } = zn({ isAnimating: r });
1190
+ return /* @__PURE__ */ s.jsx(
1191
+ "div",
1192
+ {
1193
+ className: "absolute w-0 left-0 right-0 bottom-[-1px] h-[2px] bg-primary transition-all duration-300 ease-in-out",
1194
+ style: {
1195
+ opacity: a ? 0 : 1,
1196
+ width: a ? 0 : `${i * 100}%`
1197
+ }
1198
+ }
1199
+ );
1200
+ }, Ln = () => {
1201
+ const { topNavigation: t } = I(), { isAuthenticated: e } = ae(), r = t.filter(Ot(e));
1202
+ return r.length === 0 ? /* @__PURE__ */ s.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ s.jsxs(Oe, { children: [
1203
+ /* @__PURE__ */ s.jsxs("div", { className: "items-center justify-between px-8 h-[--top-nav-height] hidden lg:flex text-sm relative", children: [
1204
+ /* @__PURE__ */ s.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ s.jsx("ul", { className: "flex flex-row items-center gap-8", children: r.map((n) => /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(Rt, { ...n }) }, n.id)) }) }),
1205
+ /* @__PURE__ */ s.jsx(q, { name: "top-navigation-side" })
1206
+ ] }),
1207
+ /* @__PURE__ */ s.jsx(At, {})
1208
+ ] });
1209
+ }, Rt = ({
1210
+ id: t,
1211
+ label: e,
1212
+ default: r
1213
+ }) => {
1214
+ var l;
1215
+ const { sidebars: n } = I(), a = n[t], i = mt(), o = !!ge().location, f = ((l = i.topNavItem) == null ? void 0 : l.id) === t && !o, h = r ?? (a ? vr(a, (b) => {
1216
+ if (b.type === "doc") return ee(b.id);
1217
+ }) : ee(t)) ?? ee(t);
1218
+ return (
1219
+ // We don't use isActive here because it has to be inside the sidebar,
1220
+ // the top nav id doesn't necessarily start with the sidebar id
1221
+ /* @__PURE__ */ s.jsx(
1222
+ lr,
1223
+ {
1224
+ className: ({ isPending: b }) => fn(
1225
+ "block lg:py-3.5 font-medium -mb-px",
1226
+ f || b ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
1227
+ ),
1228
+ to: h,
1229
+ children: e
1230
+ }
1231
+ )
1232
+ );
1233
+ }, Bn = () => {
1234
+ var i;
1235
+ const { topNavigation: t, options: e } = I(), { isAuthenticated: r } = ae(), [n, a] = J(!1);
1236
+ return /* @__PURE__ */ s.jsxs(
1237
+ un,
1238
+ {
1239
+ direction: "right",
1240
+ open: n,
1241
+ onOpenChange: (o) => a(o),
1242
+ children: [
1243
+ /* @__PURE__ */ s.jsxs("div", { className: "flex lg:hidden justify-self-end", children: [
1244
+ /* @__PURE__ */ s.jsx(dn, { className: "lg:hidden", children: /* @__PURE__ */ s.jsx(cn, { size: 22 }) }),
1245
+ /* @__PURE__ */ s.jsx(At, {})
1246
+ ] }),
1247
+ /* @__PURE__ */ s.jsx(
1248
+ xt,
1249
+ {
1250
+ className: "lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none",
1251
+ "aria-describedby": void 0,
1252
+ children: /* @__PURE__ */ s.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none h-full flex flex-col justify-between", children: [
1253
+ /* @__PURE__ */ s.jsxs("div", { children: [
1254
+ /* @__PURE__ */ s.jsx(yt, { children: /* @__PURE__ */ s.jsx(bt, { children: "Navigation" }) }),
1255
+ /* @__PURE__ */ s.jsx(Et, { className: "flex p-4" }),
1256
+ /* @__PURE__ */ s.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
1257
+ /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(Nt, {}) }),
1258
+ t.filter(Ot(r)).map((o) => /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx("button", { type: "button", onClick: () => a(!1), children: /* @__PURE__ */ s.jsx(Rt, { ...o }) }) }, o.label))
1259
+ ] })
1260
+ ] }),
1261
+ ((i = e.page) == null ? void 0 : i.showPoweredBy) !== !1 && /* @__PURE__ */ s.jsx(Ct, { className: "flex-grow-0 justify-center gap-1" })
1262
+ ] })
1263
+ }
1264
+ )
1265
+ ]
1266
+ }
1267
+ );
1268
+ }, fe = ({ item: t }) => t.children ? /* @__PURE__ */ s.jsxs(Gr, { children: [
1269
+ /* @__PURE__ */ s.jsx(Xr, { children: t.label }),
1270
+ /* @__PURE__ */ s.jsx(Jr, { children: /* @__PURE__ */ s.jsx(en, { children: t.children.map((e, r) => (
1271
+ // eslint-disable-next-line react/no-array-index-key
1272
+ /* @__PURE__ */ s.jsx(fe, { item: e }, r)
1273
+ )) }) })
1274
+ ] }, t.label) : /* @__PURE__ */ s.jsx(Te, { to: t.path ?? "", children: /* @__PURE__ */ s.jsxs(tn, { className: "flex gap-2", children: [
1275
+ t.icon && /* @__PURE__ */ s.jsx(t.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
1276
+ t.label
1277
+ ] }, t.label) }), kt = vt(function() {
1278
+ const e = ae(), { isAuthenticated: r, profile: n, isAuthEnabled: a } = ae(), i = I(), { page: o, plugins: f } = i, h = f.filter((l) => Qr(l)).flatMap((l) => l.getProfileMenuItems(i)).sort((l) => l.weight ?? 0);
1279
+ return /* @__PURE__ */ s.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
1280
+ /* @__PURE__ */ s.jsx(Mn, {}),
1281
+ /* @__PURE__ */ s.jsx("div", { className: "border-b", children: /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl mx-auto flex relative items-center justify-between px-4 lg:px-8 h-[--top-header-height] border-transparent", children: [
1282
+ /* @__PURE__ */ s.jsx("div", { className: "flex", children: /* @__PURE__ */ s.jsx(Te, { to: "/", children: /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-3.5", children: [
1283
+ (o == null ? void 0 : o.logo) && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1284
+ /* @__PURE__ */ s.jsx(
1285
+ "img",
1286
+ {
1287
+ src: /https?:\/\//.test(o.logo.src.light) ? o.logo.src.light : ee(
1288
+ "/",
1289
+ o.logo.src.light
1290
+ ),
1291
+ alt: o.logo.alt ?? o.pageTitle,
1292
+ style: { width: o.logo.width },
1293
+ className: "h-10 dark:hidden",
1294
+ loading: "lazy"
1295
+ }
1296
+ ),
1297
+ /* @__PURE__ */ s.jsx(
1298
+ "img",
1299
+ {
1300
+ src: /https?:\/\//.test(o.logo.src.dark) ? o.logo.src.dark : ee(
1301
+ "/",
1302
+ o.logo.src.dark
1303
+ ),
1304
+ alt: o.logo.alt ?? o.pageTitle,
1305
+ style: { width: o.logo.width },
1306
+ className: "h-10 hidden dark:block",
1307
+ loading: "lazy"
1308
+ }
1309
+ )
1310
+ ] }),
1311
+ /* @__PURE__ */ s.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: o == null ? void 0 : o.pageTitle })
1312
+ ] }) }) }),
1313
+ /* @__PURE__ */ s.jsx("div", { className: "absolute inset-x-0 justify-center items-center hidden lg:flex w-full pointer-events-none", children: /* @__PURE__ */ s.jsx(Et, { className: "pointer-events-auto" }) }),
1314
+ /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-8", children: [
1315
+ /* @__PURE__ */ s.jsx(Bn, {}),
1316
+ /* @__PURE__ */ s.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
1317
+ /* @__PURE__ */ s.jsx(q, { name: "head-navigation-start" }),
1318
+ a && /* @__PURE__ */ s.jsx(
1319
+ Ae,
1320
+ {
1321
+ fallback: /* @__PURE__ */ s.jsx(Tn, { className: "rounded h-5 w-24 mr-4" }),
1322
+ children: r ? Object.values(h).length > 0 && /* @__PURE__ */ s.jsxs(Yr, { modal: !1, children: [
1323
+ /* @__PURE__ */ s.jsx(Zr, { asChild: !0, children: /* @__PURE__ */ s.jsx(Se, { variant: "ghost", children: n != null && n.name ? `${n.name}` : "My Account" }) }),
1324
+ /* @__PURE__ */ s.jsxs(Vr, { className: "w-56", children: [
1325
+ /* @__PURE__ */ s.jsxs(Wr, { children: [
1326
+ n != null && n.name ? `${n.name}` : "My Account",
1327
+ (n == null ? void 0 : n.email) && /* @__PURE__ */ s.jsx("div", { className: "font-normal text-muted-foreground", children: n.email })
1328
+ ] }),
1329
+ h.filter((l) => l.category === "top").length > 0 && /* @__PURE__ */ s.jsx(be, {}),
1330
+ h.filter((l) => l.category === "top").map((l) => /* @__PURE__ */ s.jsx(fe, { item: l }, l.label)),
1331
+ h.filter(
1332
+ (l) => !l.category || l.category === "middle"
1333
+ ).length > 0 && /* @__PURE__ */ s.jsx(be, {}),
1334
+ h.filter(
1335
+ (l) => !l.category || l.category === "middle"
1336
+ ).map((l) => /* @__PURE__ */ s.jsx(fe, { item: l }, l.label)),
1337
+ h.filter((l) => l.category === "bottom").length > 0 && /* @__PURE__ */ s.jsx(be, {}),
1338
+ h.filter((l) => l.category === "bottom").map((l) => /* @__PURE__ */ s.jsx(fe, { item: l }, l.label))
1339
+ ] })
1340
+ ] }) : /* @__PURE__ */ s.jsx(Se, { variant: "ghost", onClick: () => e.login(), children: "Login" })
1341
+ }
1342
+ ),
1343
+ /* @__PURE__ */ s.jsx(q, { name: "head-navigation-end" }),
1344
+ /* @__PURE__ */ s.jsx(Nt, {})
1345
+ ] })
1346
+ ] })
1347
+ ] }) }),
1348
+ /* @__PURE__ */ s.jsx("div", { className: "border-b hidden lg:block", children: /* @__PURE__ */ s.jsxs("div", { className: "max-w-screen-2xl mx-auto border-transparent", children: [
1349
+ /* @__PURE__ */ s.jsx(q, { name: "top-navigation-before" }),
1350
+ /* @__PURE__ */ s.jsx(Ln, {}),
1351
+ /* @__PURE__ */ s.jsx(q, { name: "top-navigation-after" })
1352
+ ] }) })
1353
+ ] });
1354
+ }), _t = ({
1355
+ shouldScaleBackground: t = !0,
1356
+ ...e
1357
+ }) => /* @__PURE__ */ s.jsx(
1358
+ z.Root,
1359
+ {
1360
+ shouldScaleBackground: t,
1361
+ ...e
1362
+ }
1363
+ );
1364
+ _t.displayName = "Drawer";
1365
+ const Hn = z.Trigger, Kn = z.Portal, Dt = K.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ s.jsx(
1366
+ z.Overlay,
1367
+ {
1368
+ ref: r,
1369
+ className: $("fixed inset-0 z-50 bg-black/80", t),
1370
+ ...e
1371
+ }
1372
+ ));
1373
+ Dt.displayName = z.Overlay.displayName;
1374
+ const Un = K.forwardRef(
1375
+ ({ className: t, children: e, hideBar: r = !0, ...n }, a) => /* @__PURE__ */ s.jsxs(Kn, { children: [
1376
+ /* @__PURE__ */ s.jsx(Dt, {}),
1377
+ /* @__PURE__ */ s.jsxs(
1378
+ z.Content,
1379
+ {
1380
+ ref: a,
1381
+ className: $(
1382
+ "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
1383
+ t
1384
+ ),
1385
+ ...n,
1386
+ children: [
1387
+ !r && /* @__PURE__ */ s.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
1388
+ e
1389
+ ]
1390
+ }
1391
+ )
1392
+ ] })
1393
+ );
1394
+ Un.displayName = "DrawerContent";
1395
+ const Yn = K.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ s.jsx(
1396
+ z.Title,
1397
+ {
1398
+ ref: r,
1399
+ className: $(
1400
+ "text-lg font-semibold leading-none tracking-tight",
1401
+ t
1402
+ ),
1403
+ ...e
1404
+ }
1405
+ ));
1406
+ Yn.displayName = z.Title.displayName;
1407
+ const Zn = K.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ s.jsx(
1408
+ z.Description,
1409
+ {
1410
+ ref: r,
1411
+ className: $("text-sm text-muted-foreground", t),
1412
+ ...e
1413
+ }
1414
+ ));
1415
+ Zn.displayName = z.Description.displayName;
1416
+ const qt = ({
1417
+ children: t,
1418
+ className: e,
1419
+ ref: r
1420
+ }) => {
1421
+ var a;
1422
+ const { options: n } = I();
1423
+ return /* @__PURE__ */ s.jsxs("div", { className: "grid sticky top-[--header-height] lg:h-[calc(100vh-var(--header-height))] grid-rows-[1fr_min-content] border-r", children: [
1424
+ /* @__PURE__ */ s.jsx(
1425
+ "nav",
1426
+ {
1427
+ className: $(
1428
+ "hidden max-w-[calc(var(--side-nav-width)+var(--padding-nav-item))] lg:flex scrollbar flex-col overflow-y-auto shrink-0 text-sm pe-3 ps-4 lg:ps-8",
1429
+ "-mx-[--padding-nav-item] pb-6 pt-[--padding-content-top] scroll-pt-2 gap-1",
1430
+ e
1431
+ ),
1432
+ style: {
1433
+ maskImage: "linear-gradient(180deg, transparent 1%, rgba(0, 0, 0, 1) 20px, rgba(0, 0, 0, 1) 90%, transparent 99%)"
1434
+ },
1435
+ ref: r,
1436
+ children: t
1437
+ }
1438
+ ),
1439
+ /* @__PURE__ */ s.jsx("div", { className: "bg-background border-t p-2 mx-5 gap-2 items-center mt-2 drop-shadow-[0_-3px_1px_rgba(0,0,0,0.015)] hidden lg:[&:has(>_:nth-child(1):last-child)]:flex", children: ((a = n.page) == null ? void 0 : a.showPoweredBy) !== !1 && /* @__PURE__ */ s.jsx(Ct, {}) })
1440
+ ] });
1441
+ };
1442
+ qt.displayName = "SidebarWrapper";
1443
+ const Vn = ({
1444
+ onRequestClose: t,
1445
+ sidebar: e
1446
+ }) => {
1447
+ const r = G(null);
1448
+ return Q(() => {
1449
+ var a;
1450
+ const n = (a = r.current) == null ? void 0 : a.querySelector('[aria-current="page"]');
1451
+ Rr(n ?? null);
1452
+ }, []), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1453
+ /* @__PURE__ */ s.jsxs(qt, { ref: r, children: [
1454
+ /* @__PURE__ */ s.jsx(q, { name: "zudoku-before-navigation" }),
1455
+ e.map((n) => /* @__PURE__ */ s.jsx(He, { item: n }, n.label)),
1456
+ /* @__PURE__ */ s.jsx(q, { name: "zudoku-after-navigation" })
1457
+ ] }),
1458
+ /* @__PURE__ */ s.jsx(
1459
+ xt,
1460
+ {
1461
+ className: "lg:hidden h-[100dvh] left-0 w-[320px] rounded-none",
1462
+ "aria-describedby": void 0,
1463
+ children: /* @__PURE__ */ s.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
1464
+ /* @__PURE__ */ s.jsx(yt, { children: /* @__PURE__ */ s.jsx(bt, { children: "Sidebar" }) }),
1465
+ e.map((n) => /* @__PURE__ */ s.jsx(
1466
+ He,
1467
+ {
1468
+ item: n,
1469
+ onRequestClose: t
1470
+ },
1471
+ n.label
1472
+ ))
1473
+ ] })
1474
+ }
1475
+ )
1476
+ ] });
1477
+ }, Wn = ({ children: t }) => {
1478
+ const [e, r] = J(!1), { sidebar: n } = mt(), a = n.length > 0, i = ge().state === "loading";
1479
+ return /* @__PURE__ */ s.jsxs(
1480
+ _t,
1481
+ {
1482
+ direction: "left",
1483
+ open: e,
1484
+ onOpenChange: (o) => r(o),
1485
+ children: [
1486
+ a && /* @__PURE__ */ s.jsx(
1487
+ Vn,
1488
+ {
1489
+ onRequestClose: () => r(!1),
1490
+ sidebar: n
1491
+ }
1492
+ ),
1493
+ a && /* @__PURE__ */ s.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__ */ s.jsxs(Hn, { className: "flex items-center gap-2 px-4", children: [
1494
+ /* @__PURE__ */ s.jsx(ln, { size: 16, strokeWidth: 1.5 }),
1495
+ /* @__PURE__ */ s.jsx("span", { className: "text-sm", children: "Menu" })
1496
+ ] }) }),
1497
+ /* @__PURE__ */ s.jsxs(
1498
+ "main",
1499
+ {
1500
+ "data-pagefind-body": !0,
1501
+ className: $(
1502
+ "px-4 lg:pe-8 lg:px-8",
1503
+ !a && "col-span-full",
1504
+ i && "animate-pulse"
1505
+ ),
1506
+ children: [
1507
+ /* @__PURE__ */ s.jsx(q, { name: "zudoku-before-content" }),
1508
+ t,
1509
+ /* @__PURE__ */ s.jsx(q, { name: "zudoku-after-content" })
1510
+ ]
1511
+ }
1512
+ )
1513
+ ]
1514
+ }
1515
+ );
1516
+ }, Gn = () => /* @__PURE__ */ s.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ s.jsx(jt, {}) }), Xn = ({ children: t }) => {
1517
+ const { meta: e, authentication: r, options: n } = I(), a = pe();
1518
+ return kr(), Nn(), Q(() => {
1519
+ var i;
1520
+ (i = r == null ? void 0 : r.onPageLoad) == null || i.call(r);
1521
+ }, [r]), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1522
+ !1,
1523
+ /* @__PURE__ */ s.jsxs(Ne, { titleTemplate: e == null ? void 0 : e.title, children: [
1524
+ n.canonicalUrlOrigin && /* @__PURE__ */ s.jsx(
1525
+ "link",
1526
+ {
1527
+ rel: "canonical",
1528
+ href: ee(
1529
+ n.canonicalUrlOrigin,
1530
+ n.basePath,
1531
+ a.pathname
1532
+ )
1533
+ }
1534
+ ),
1535
+ (e == null ? void 0 : e.description) && /* @__PURE__ */ s.jsx("meta", { name: "description", content: e.description }),
1536
+ (e == null ? void 0 : e.favicon) && /* @__PURE__ */ s.jsx("link", { rel: "icon", href: e.favicon })
1537
+ ] }),
1538
+ /* @__PURE__ */ s.jsx(q, { name: "layout-before-head" }),
1539
+ /* @__PURE__ */ s.jsx(kt, {}),
1540
+ /* @__PURE__ */ s.jsx(q, { name: "layout-after-head" }),
1541
+ /* @__PURE__ */ s.jsx("div", { className: "grid grid-cols-1 grid-rows-[0_min-content_1fr] lg:grid-rows-[min-content_1fr] lg:grid-cols-[var(--side-nav-width)_1fr] max-w-screen-2xl w-full lg:mx-auto", children: /* @__PURE__ */ s.jsx(Oe, { fallback: /* @__PURE__ */ s.jsx(Gn, {}), children: /* @__PURE__ */ s.jsx(Wn, { children: t ?? /* @__PURE__ */ s.jsx(lt, {}) }) }) })
1542
+ ] });
1543
+ }, Jn = ({
1544
+ title: t = "An error occurred",
1545
+ message: e,
1546
+ category: r
1547
+ }) => /* @__PURE__ */ s.jsxs("div", { className: Dr + " h-full pt-[--padding-content-top]", children: [
1548
+ r && /* @__PURE__ */ s.jsx(hn, { children: r }),
1549
+ t && /* @__PURE__ */ s.jsx(_r, { level: 1, className: "flex gap-3.5 items-center", children: t }),
1550
+ /* @__PURE__ */ s.jsx("p", { children: e })
1551
+ ] }), es = (t) => {
1552
+ switch (t) {
1553
+ case 400:
1554
+ return {
1555
+ title: "Bad Request",
1556
+ message: "The request could not be understood by the server due to malformed syntax."
1557
+ };
1558
+ case 403:
1559
+ return {
1560
+ title: "Forbidden",
1561
+ message: "You don't have permission to access this resource."
1562
+ };
1563
+ case 404:
1564
+ return {
1565
+ title: "Not Found",
1566
+ message: "The requested resource could not be found."
1567
+ };
1568
+ case 405:
1569
+ return {
1570
+ title: "Method Not Allowed",
1571
+ message: "The request method is not supported for the requested resource."
1572
+ };
1573
+ case 414:
1574
+ return {
1575
+ title: "Request URI Too Large",
1576
+ message: "The request URI is too large."
1577
+ };
1578
+ case 416:
1579
+ return {
1580
+ title: "Range Not Satisfiable",
1581
+ message: "The server cannot satisfy the request range."
1582
+ };
1583
+ case 500:
1584
+ return {
1585
+ title: "Internal Server Error",
1586
+ message: "An unexpected error occurred while processing your request."
1587
+ };
1588
+ case 501:
1589
+ return {
1590
+ title: "Not Implemented",
1591
+ message: "The server does not support the functionality required to fulfill the request."
1592
+ };
1593
+ case 502:
1594
+ return {
1595
+ title: "Bad Gateway",
1596
+ message: "The server received an invalid response from the upstream server."
1597
+ };
1598
+ case 503:
1599
+ return {
1600
+ title: "Service Unavailable",
1601
+ message: "The server is temporarily unable to handle the request."
1602
+ };
1603
+ case 504:
1604
+ return {
1605
+ title: "Gateway Timeout",
1606
+ message: "The server did not receive a timely response from the upstream server."
1607
+ };
1608
+ default:
1609
+ return {
1610
+ title: "An error occurred",
1611
+ message: "Something went wrong while processing your request."
1612
+ };
1613
+ }
1614
+ }, ts = ({ statusCode: t, message: e }) => {
1615
+ const r = es(t);
1616
+ return /* @__PURE__ */ s.jsx(
1617
+ Jn,
1618
+ {
1619
+ title: r.title,
1620
+ message: e ?? r.message,
1621
+ category: t
1622
+ }
1623
+ );
1624
+ }, rs = Me(null), we = {
1625
+ didCatch: !1,
1626
+ error: null
1627
+ };
1628
+ class ns extends Mr {
1629
+ constructor(e) {
1630
+ super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = we;
1631
+ }
1632
+ static getDerivedStateFromError(e) {
1633
+ return {
1634
+ didCatch: !0,
1635
+ error: e
1636
+ };
1637
+ }
1638
+ resetErrorBoundary() {
1639
+ const {
1640
+ error: e
1641
+ } = this.state;
1642
+ if (e !== null) {
1643
+ for (var r, n, a = arguments.length, i = new Array(a), o = 0; o < a; o++)
1644
+ i[o] = arguments[o];
1645
+ (r = (n = this.props).onReset) === null || r === void 0 || r.call(n, {
1646
+ args: i,
1647
+ reason: "imperative-api"
1648
+ }), this.setState(we);
1649
+ }
1650
+ }
1651
+ componentDidCatch(e, r) {
1652
+ var n, a;
1653
+ (n = (a = this.props).onError) === null || n === void 0 || n.call(a, e, r);
1654
+ }
1655
+ componentDidUpdate(e, r) {
1656
+ const {
1657
+ didCatch: n
1658
+ } = this.state, {
1659
+ resetKeys: a
1660
+ } = this.props;
1661
+ if (n && r.error !== null && ss(e.resetKeys, a)) {
1662
+ var i, o;
1663
+ (i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
1664
+ next: a,
1665
+ prev: e.resetKeys,
1666
+ reason: "keys"
1667
+ }), this.setState(we);
1668
+ }
1669
+ }
1670
+ render() {
1671
+ const {
1672
+ children: e,
1673
+ fallbackRender: r,
1674
+ FallbackComponent: n,
1675
+ fallback: a
1676
+ } = this.props, {
1677
+ didCatch: i,
1678
+ error: o
1679
+ } = this.state;
1680
+ let f = e;
1681
+ if (i) {
1682
+ const h = {
1683
+ error: o,
1684
+ resetErrorBoundary: this.resetErrorBoundary
1685
+ };
1686
+ if (typeof r == "function")
1687
+ f = r(h);
1688
+ else if (n)
1689
+ f = Be(n, h);
1690
+ else if (a !== void 0)
1691
+ f = a;
1692
+ else
1693
+ throw o;
1694
+ }
1695
+ return Be(rs.Provider, {
1696
+ value: {
1697
+ didCatch: i,
1698
+ error: o,
1699
+ resetErrorBoundary: this.resetErrorBoundary
1700
+ }
1701
+ }, f);
1702
+ }
1703
+ }
1704
+ function ss() {
1705
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1706
+ return t.length !== e.length || t.some((r, n) => !Object.is(r, e[n]));
1707
+ }
1708
+ let as = () => ({
1709
+ emit(t, ...e) {
1710
+ for (let r = this.events[t] || [], n = 0, a = r.length; n < a; n++)
1711
+ r[n](...e);
1712
+ },
1713
+ events: {},
1714
+ on(t, e) {
1715
+ var r;
1716
+ return ((r = this.events)[t] || (r[t] = [])).push(e), () => {
1717
+ var n;
1718
+ this.events[t] = (n = this.events[t]) == null ? void 0 : n.filter((a) => e !== a);
1719
+ };
1720
+ }
1721
+ });
1722
+ class os {
1723
+ constructor(e, r) {
1724
+ O(this, "plugins");
1725
+ O(this, "sidebars");
1726
+ O(this, "topNavigation");
1727
+ O(this, "meta");
1728
+ O(this, "page");
1729
+ O(this, "authentication");
1730
+ O(this, "navigationPlugins");
1731
+ O(this, "emitter", as());
1732
+ O(this, "initialize", async () => {
1733
+ await Promise.all(
1734
+ this.plugins.filter(Br).map((e) => {
1735
+ var r;
1736
+ return (r = e.initialize) == null ? void 0 : r.call(e, this);
1737
+ })
1738
+ );
1739
+ });
1740
+ O(this, "getApiIdentities", async () => (await Promise.all(
1741
+ this.plugins.filter(Hr).map((r) => r.getIdentities(this))
1742
+ )).flat());
1743
+ O(this, "emitEvent", (e, ...r) => this.emitter.emit(e, ...r));
1744
+ O(this, "getPluginSidebar", async (e) => (await Promise.all(
1745
+ this.navigationPlugins.map(
1746
+ (n) => {
1747
+ var a;
1748
+ return (a = n.getSidebar) == null ? void 0 : a.call(n, xr(e), this);
1749
+ }
1750
+ )
1751
+ )).flatMap((n) => n ?? []));
1752
+ O(this, "signRequest", async (e) => {
1753
+ if (!this.authentication)
1754
+ throw new Error("No authentication provider configured");
1755
+ return await this.authentication.signRequest(e);
1756
+ });
1757
+ this.options = e, this.queryClient = r, this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(zr), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page, this.plugins.forEach((n) => {
1758
+ Lr(n) && mn(n.events).forEach(([a, i]) => {
1759
+ this.emitter.on(a, i);
1760
+ });
1761
+ }), yr.subscribe((n, a) => {
1762
+ this.emitEvent("auth", {
1763
+ prev: a,
1764
+ next: n
1765
+ });
1766
+ });
1767
+ }
1768
+ addEventListener(e, r) {
1769
+ return this.emitter.on(e, r);
1770
+ }
1771
+ }
1772
+ function is({ error: t, resetErrorBoundary: e }) {
1773
+ return /* @__PURE__ */ s.jsx(pt, { error: t });
1774
+ }
1775
+ const de = globalThis;
1776
+ (!de.requestIdleCallback || !de.cancelIdleCallback) && (de.requestIdleCallback = (t) => setTimeout(t, 1), de.cancelIdleCallback = clearTimeout);
1777
+ const $t = {
1778
+ Header: kt
1779
+ }, cs = Me($t), ls = cs.Provider, us = () => {
1780
+ const t = pe(), e = I(), r = G(void 0);
1781
+ return Q(() => {
1782
+ e.emitEvent("location", {
1783
+ from: r.current,
1784
+ to: t
1785
+ }), r.current = t;
1786
+ }, [e, t]), null;
1787
+ }, ds = ({
1788
+ children: t,
1789
+ context: e
1790
+ }) => (br({
1791
+ queryFn: async () => (await e.initialize(), !0),
1792
+ queryKey: ["zudoku-initialize"]
1793
+ }), /* @__PURE__ */ s.jsx(jr.Provider, { value: e, children: t }));
1794
+ let Pe;
1795
+ const Ft = vt(
1796
+ ({ children: t, ...e }) => {
1797
+ var g, x;
1798
+ const r = xe(
1799
+ () => ({ ...$t, ...e.overrides }),
1800
+ [e.overrides]
1801
+ ), n = pe(), a = xe(() => {
1802
+ var p;
1803
+ return {
1804
+ ...(e.plugins ?? []).filter(Kr).flatMap(
1805
+ (C) => C.getMdxComponents ? [C.getMdxComponents()] : []
1806
+ ).reduce(
1807
+ (C, N) => ({ ...C, ...N }),
1808
+ {}
1809
+ ),
1810
+ ...qr,
1811
+ ...(p = e.mdx) == null ? void 0 : p.components
1812
+ };
1813
+ }, [(g = e.mdx) == null ? void 0 : g.components, e.plugins]), { stagger: i } = Or(Ee), [o, f] = J(!1), h = xe(
1814
+ () => o ? { stagger: !0 } : { stagger: i },
1815
+ [i, o]
1816
+ ), l = ge(), b = ft();
1817
+ Q(() => {
1818
+ o || f(!0);
1819
+ }, [o, l.location]), Pe || (Pe = new os(e, b));
1820
+ const y = (x = e.plugins) == null ? void 0 : x.flatMap(
1821
+ (m) => {
1822
+ var p;
1823
+ return Ur(m) ? ((p = m.getHead) == null ? void 0 : p.call(m, { location: n })) ?? [] : [];
1824
+ }
1825
+ ).map((m, p) => /* @__PURE__ */ s.jsx(Ne, { children: m }, p));
1826
+ return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1827
+ y,
1828
+ /* @__PURE__ */ s.jsx(Ee.Provider, { value: h, children: /* @__PURE__ */ s.jsxs(ds, { context: Pe, children: [
1829
+ /* @__PURE__ */ s.jsx(us, {}),
1830
+ /* @__PURE__ */ s.jsx(pn, { components: a, children: /* @__PURE__ */ s.jsx(or, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ s.jsx(ls, { value: r, children: /* @__PURE__ */ s.jsx(Sr, { slotlets: e.slotlets, children: /* @__PURE__ */ s.jsx($r, { children: t ?? /* @__PURE__ */ s.jsx(lt, {}) }) }) }) }) })
1831
+ ] }) })
1832
+ ] });
1833
+ }
1834
+ );
1835
+ Ft.displayName = "ZudokoInner";
1836
+ const It = (t) => /* @__PURE__ */ s.jsx(ns, { FallbackComponent: is, children: /* @__PURE__ */ s.jsx(Ft, { ...t }) });
1837
+ It.displayName = "Zudoku";
1838
+ const qs = Pt, $s = Xn, Fs = Cr, Is = wn, Qs = Cn, zs = En, Ls = ar, Bs = Ne, Hs = I, Ks = ae, Us = wr, Ys = Pr, Zs = It, Vs = ts, Ws = Nr, Gs = Fr, Xs = jt, Js = Ae, ea = Er, ta = Te, ra = ct;
1839
+ export {
1840
+ ea as B,
1841
+ Ys as C,
1842
+ Bs as H,
1843
+ ta as L,
1844
+ Gs as M,
1845
+ Fs as R,
1846
+ Is as S,
1847
+ Zs as Z,
1848
+ Ks as a,
1849
+ Hs as b,
1850
+ qs as c,
1851
+ $s as d,
1852
+ Qs as e,
1853
+ zs as f,
1854
+ Ls as g,
1855
+ Us as h,
1856
+ Vs as i,
1857
+ Ws as j,
1858
+ Xs as k,
1859
+ Js as l,
1860
+ ra as m,
1861
+ Pt as u
1862
+ };
1863
+ //# sourceMappingURL=index-D6ktNq4i.js.map