zudoku 0.16.3 → 0.18.0

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 (342) hide show
  1. package/dist/app/demo.js +0 -2
  2. package/dist/app/demo.js.map +1 -1
  3. package/dist/app/entry.client.js +14 -0
  4. package/dist/app/entry.client.js.map +1 -1
  5. package/dist/app/entry.server.js +5 -4
  6. package/dist/app/entry.server.js.map +1 -1
  7. package/dist/app/main.d.ts +1 -1
  8. package/dist/app/main.js +2 -2
  9. package/dist/app/main.js.map +1 -1
  10. package/dist/app/standalone.js +0 -2
  11. package/dist/app/standalone.js.map +1 -1
  12. package/dist/codegen.d.ts +3 -0
  13. package/dist/codegen.js +45 -0
  14. package/dist/codegen.js.map +1 -0
  15. package/dist/config/validators/InputSidebarSchema.d.ts +10 -10
  16. package/dist/config/validators/validate.d.ts +114 -114
  17. package/dist/config/validators/validate.js.map +1 -1
  18. package/dist/index.d.ts +2 -2
  19. package/dist/index.js +1 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/lib/authentication/authentication.d.ts +2 -2
  22. package/dist/lib/authentication/hook.d.ts +5 -4
  23. package/dist/lib/authentication/hook.js +1 -3
  24. package/dist/lib/authentication/hook.js.map +1 -1
  25. package/dist/lib/authentication/providers/auth0.js +11 -11
  26. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  27. package/dist/lib/authentication/providers/openid.d.ts +0 -1
  28. package/dist/lib/authentication/providers/openid.js +11 -26
  29. package/dist/lib/authentication/providers/openid.js.map +1 -1
  30. package/dist/lib/authentication/state.d.ts +25 -4
  31. package/dist/lib/authentication/state.js +28 -3
  32. package/dist/lib/authentication/state.js.map +1 -1
  33. package/dist/lib/authentication/use-broadcast/shared.d.ts +48 -0
  34. package/dist/lib/authentication/use-broadcast/shared.js +243 -0
  35. package/dist/lib/authentication/use-broadcast/shared.js.map +1 -0
  36. package/dist/lib/authentication/use-broadcast/useBroadcast.d.ts +24 -0
  37. package/dist/lib/authentication/use-broadcast/useBroadcast.js +106 -0
  38. package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -0
  39. package/dist/lib/components/Bootstrap.d.ts +3 -1
  40. package/dist/lib/components/Bootstrap.js +11 -3
  41. package/dist/lib/components/Bootstrap.js.map +1 -1
  42. package/dist/lib/components/ClientOnly.d.ts +4 -2
  43. package/dist/lib/components/ClientOnly.js +1 -1
  44. package/dist/lib/components/ClientOnly.js.map +1 -1
  45. package/dist/lib/components/DeveloperHint.js +2 -1
  46. package/dist/lib/components/DeveloperHint.js.map +1 -1
  47. package/dist/lib/components/Header.js +5 -7
  48. package/dist/lib/components/Header.js.map +1 -1
  49. package/dist/lib/components/Heading.d.ts +1 -1
  50. package/dist/lib/components/Layout.js +11 -3
  51. package/dist/lib/components/Layout.js.map +1 -1
  52. package/dist/lib/components/MobileTopNavigation.js +6 -7
  53. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  54. package/dist/lib/components/SyntaxHighlight.js +16 -12
  55. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  56. package/dist/lib/components/ThemeSwitch.d.ts +1 -0
  57. package/dist/lib/components/ThemeSwitch.js +13 -0
  58. package/dist/lib/components/ThemeSwitch.js.map +1 -0
  59. package/dist/lib/components/TopNavigation.d.ts +2 -0
  60. package/dist/lib/components/TopNavigation.js +13 -7
  61. package/dist/lib/components/TopNavigation.js.map +1 -1
  62. package/dist/lib/components/{DevPortal.d.ts → Zudoku.d.ts} +3 -3
  63. package/dist/lib/components/{DevPortal.js → Zudoku.js} +13 -14
  64. package/dist/lib/components/Zudoku.js.map +1 -0
  65. package/dist/lib/components/context/ZudokuContext.d.ts +7 -7
  66. package/dist/lib/components/context/ZudokuContext.js +8 -13
  67. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  68. package/dist/lib/components/context/ZudokuProvider.d.ts +2 -2
  69. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  70. package/dist/lib/components/index.d.ts +18 -10
  71. package/dist/lib/components/index.js +2 -3
  72. package/dist/lib/components/index.js.map +1 -1
  73. package/dist/lib/components/navigation/Sidebar.js +1 -1
  74. package/dist/lib/components/navigation/Sidebar.js.map +1 -1
  75. package/dist/lib/components/navigation/utils.js +2 -2
  76. package/dist/lib/components/navigation/utils.js.map +1 -1
  77. package/dist/lib/core/{DevPortalContext.d.ts → ZudokuContext.d.ts} +3 -7
  78. package/dist/lib/core/{DevPortalContext.js → ZudokuContext.js} +2 -7
  79. package/dist/lib/core/ZudokuContext.js.map +1 -0
  80. package/dist/lib/core/plugins.d.ts +12 -12
  81. package/dist/lib/core/plugins.js.map +1 -1
  82. package/dist/lib/errors/ErrorAlert.js +1 -1
  83. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  84. package/dist/lib/plugins/api-keys/index.d.ts +9 -9
  85. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  86. package/dist/lib/plugins/custom-pages/index.d.ts +2 -2
  87. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  88. package/dist/lib/plugins/markdown/index.d.ts +2 -2
  89. package/dist/lib/plugins/markdown/index.js.map +1 -1
  90. package/dist/lib/plugins/openapi/ColorizedParam.js +13 -9
  91. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  92. package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -1
  93. package/dist/lib/plugins/openapi/Endpoint.js +5 -9
  94. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  95. package/dist/lib/plugins/openapi/OperationList.d.ts +2 -2
  96. package/dist/lib/plugins/openapi/OperationList.js +7 -22
  97. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  98. package/dist/lib/plugins/openapi/Route.d.ts +4 -4
  99. package/dist/lib/plugins/openapi/Route.js +2 -4
  100. package/dist/lib/plugins/openapi/Route.js.map +1 -1
  101. package/dist/lib/plugins/openapi/Sidecar.d.ts +1 -1
  102. package/dist/lib/plugins/openapi/Sidecar.js +34 -33
  103. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  104. package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +8 -0
  105. package/dist/lib/plugins/openapi/client/GraphQLClient.js +102 -0
  106. package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -0
  107. package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +7 -0
  108. package/dist/lib/plugins/openapi/client/GraphQLContext.js +5 -0
  109. package/dist/lib/plugins/openapi/client/GraphQLContext.js.map +1 -0
  110. package/dist/lib/plugins/openapi/client/createServer.d.ts +1 -0
  111. package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +5 -0
  112. package/dist/lib/plugins/openapi/client/useCreateQuery.js +13 -0
  113. package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -0
  114. package/dist/lib/plugins/openapi/client/worker.d.ts +4 -1
  115. package/dist/lib/plugins/openapi/client/worker.js +23 -14
  116. package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
  117. package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +3 -3
  118. package/dist/lib/plugins/openapi/graphql/fragment-masking.js +3 -4
  119. package/dist/lib/plugins/openapi/graphql/fragment-masking.js.map +1 -1
  120. package/dist/lib/plugins/openapi/graphql/gql.d.ts +5 -52
  121. package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
  122. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  123. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +134 -9
  124. package/dist/lib/plugins/openapi/graphql/graphql.js +194 -778
  125. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  126. package/dist/lib/plugins/openapi/index.d.ts +2 -2
  127. package/dist/lib/plugins/openapi/index.js +40 -53
  128. package/dist/lib/plugins/openapi/index.js.map +1 -1
  129. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  130. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  131. package/dist/lib/plugins/openapi-worker.js +7 -1
  132. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  133. package/dist/lib/plugins/redirect/index.d.ts +2 -2
  134. package/dist/lib/plugins/redirect/index.js.map +1 -1
  135. package/dist/lib/plugins/search-inkeep/index.d.ts +2 -2
  136. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  137. package/dist/lib/ui/ActionButton.d.ts +3 -1
  138. package/dist/lib/util/MdxComponents.d.ts +1 -1
  139. package/dist/lib/util/useOnScreen.d.ts +4 -0
  140. package/dist/lib/util/useOnScreen.js +19 -0
  141. package/dist/lib/util/useOnScreen.js.map +1 -0
  142. package/dist/vite/config.js +0 -1
  143. package/dist/vite/config.js.map +1 -1
  144. package/dist/vite/html.js +0 -2
  145. package/dist/vite/html.js.map +1 -1
  146. package/dist/vite/plugin-component.js +1 -1
  147. package/dist/vite/plugin-component.js.map +1 -1
  148. package/dist/vite/plugin-mdx.d.ts +0 -6
  149. package/dist/vite/plugin-mdx.js +3 -2
  150. package/dist/vite/plugin-mdx.js.map +1 -1
  151. package/dist/vite/plugin.js +0 -2
  152. package/dist/vite/plugin.js.map +1 -1
  153. package/dist/vite/remarkStaticGeneration.d.ts +3 -0
  154. package/dist/vite/remarkStaticGeneration.js +125 -0
  155. package/dist/vite/remarkStaticGeneration.js.map +1 -0
  156. package/lib/{AnchorLink-BbB2q-jx.js → AnchorLink-CDlhr8gL.js} +11 -10
  157. package/lib/{AnchorLink-BbB2q-jx.js.map → AnchorLink-CDlhr8gL.js.map} +1 -1
  158. package/lib/{AuthenticationPlugin-C9BHGXlE.js → AuthenticationPlugin-DeGDVa1r.js} +6 -5
  159. package/lib/{AuthenticationPlugin-C9BHGXlE.js.map → AuthenticationPlugin-DeGDVa1r.js.map} +1 -1
  160. package/lib/{Spinner-ChOGyPls.js → Button-jK0EsymC.js} +12 -15
  161. package/lib/Button-jK0EsymC.js.map +1 -0
  162. package/lib/{ClientOnly-CVN6leDu.js → ClientOnly-E7hGysn1.js} +4 -4
  163. package/lib/ClientOnly-E7hGysn1.js.map +1 -0
  164. package/lib/Markdown-ievDDhFT.js +15192 -0
  165. package/lib/Markdown-ievDDhFT.js.map +1 -0
  166. package/lib/{MdxPage-DKMH_t0f.js → MdxPage-Bwn-VSsH.js} +5 -5
  167. package/lib/{MdxPage-DKMH_t0f.js.map → MdxPage-Bwn-VSsH.js.map} +1 -1
  168. package/lib/OperationList-BwBl1xrD.js +4691 -0
  169. package/lib/OperationList-BwBl1xrD.js.map +1 -0
  170. package/lib/Route-DlG_HTMu.js +11 -0
  171. package/lib/Route-DlG_HTMu.js.map +1 -0
  172. package/lib/{Select-Bagt3Bme.js → Select-O9ZM3ZgX.js} +7 -7
  173. package/lib/Select-O9ZM3ZgX.js.map +1 -0
  174. package/lib/SidebarBadge-DxFJcJ6V.js +51 -0
  175. package/lib/SidebarBadge-DxFJcJ6V.js.map +1 -0
  176. package/lib/SlotletProvider-DyomlzGx.js +252 -0
  177. package/lib/SlotletProvider-DyomlzGx.js.map +1 -0
  178. package/lib/Spinner-3cQDBVGr.js +7 -0
  179. package/lib/Spinner-3cQDBVGr.js.map +1 -0
  180. package/lib/SyntaxHighlight-DkLOsjHS.js +2983 -0
  181. package/lib/SyntaxHighlight-DkLOsjHS.js.map +1 -0
  182. package/lib/assets/{worker-YA-aCP3P.js → worker-CPsGZsve.js} +24 -22
  183. package/lib/assets/{worker-YA-aCP3P.js.map → worker-CPsGZsve.js.map} +1 -1
  184. package/lib/context-D1nXWxm7.js +22 -0
  185. package/lib/context-D1nXWxm7.js.map +1 -0
  186. package/lib/createServer-DK-g7kbB.js +16089 -0
  187. package/lib/createServer-DK-g7kbB.js.map +1 -0
  188. package/lib/{hook-sn0zMTkE.js → hook-hEqe7fPB.js} +12 -14
  189. package/lib/hook-hEqe7fPB.js.map +1 -0
  190. package/lib/index-Czzd9rjU.js +899 -0
  191. package/lib/index-Czzd9rjU.js.map +1 -0
  192. package/lib/index-DNxQ_rCt.js +1273 -0
  193. package/lib/index-DNxQ_rCt.js.map +1 -0
  194. package/lib/index-Yn8c3UWE.js +921 -0
  195. package/lib/index-Yn8c3UWE.js.map +1 -0
  196. package/lib/{router-BsfSoK2j.js → router-lfyopgBI.js} +23 -23
  197. package/lib/{router-BsfSoK2j.js.map → router-lfyopgBI.js.map} +1 -1
  198. package/lib/state-tsXBLONe.js +203 -0
  199. package/lib/{state-CsuHT8ZO.js.map → state-tsXBLONe.js.map} +1 -1
  200. package/lib/ui/ActionButton.js +11 -10
  201. package/lib/ui/ActionButton.js.map +1 -1
  202. package/lib/useExposedProps-CTPtylCV.js +10 -0
  203. package/lib/{useExposedProps-ChOIUaS4.js.map → useExposedProps-CTPtylCV.js.map} +1 -1
  204. package/lib/{ZudokuContext-BKXGJTmu.js → utils-DcpDOncX.js} +242 -246
  205. package/lib/utils-DcpDOncX.js.map +1 -0
  206. package/lib/zudoku.auth-auth0.js +24 -18
  207. package/lib/zudoku.auth-auth0.js.map +1 -1
  208. package/lib/zudoku.auth-clerk.js +2 -2
  209. package/lib/zudoku.auth-openid.js +124 -138
  210. package/lib/zudoku.auth-openid.js.map +1 -1
  211. package/lib/zudoku.components.js +1284 -1121
  212. package/lib/zudoku.components.js.map +1 -1
  213. package/lib/zudoku.openapi-worker.js +10 -16346
  214. package/lib/zudoku.openapi-worker.js.map +1 -1
  215. package/lib/zudoku.plugin-api-keys.js +18 -18
  216. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  217. package/lib/zudoku.plugin-custom-pages.js +2 -2
  218. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  219. package/lib/zudoku.plugin-markdown.js +1 -1
  220. package/lib/zudoku.plugin-markdown.js.map +1 -1
  221. package/lib/zudoku.plugin-openapi.js +5 -9
  222. package/lib/zudoku.plugin-openapi.js.map +1 -1
  223. package/lib/zudoku.plugin-redirect.js +1 -1
  224. package/lib/zudoku.plugin-redirect.js.map +1 -1
  225. package/lib/zudoku.plugin-search-inkeep.js +1 -1
  226. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  227. package/package.json +14 -4
  228. package/src/app/demo.tsx +0 -3
  229. package/src/app/entry.client.tsx +14 -0
  230. package/src/app/entry.server.tsx +59 -57
  231. package/src/app/main.tsx +4 -4
  232. package/src/app/standalone.tsx +0 -3
  233. package/src/lib/authentication/authentication.ts +2 -2
  234. package/src/lib/authentication/hook.ts +1 -3
  235. package/src/lib/authentication/providers/auth0.tsx +16 -11
  236. package/src/lib/authentication/providers/openid.tsx +12 -30
  237. package/src/lib/authentication/state.ts +50 -9
  238. package/{LICENSE.md → src/lib/authentication/use-broadcast/LICENSE.md} +2 -2
  239. package/src/lib/authentication/use-broadcast/shared.ts +372 -0
  240. package/src/lib/authentication/use-broadcast/useBroadcast.ts +146 -0
  241. package/src/lib/components/Bootstrap.tsx +36 -9
  242. package/src/lib/components/ClientOnly.tsx +6 -3
  243. package/src/lib/components/DeveloperHint.tsx +6 -1
  244. package/src/lib/components/Header.tsx +32 -37
  245. package/src/lib/components/Layout.tsx +48 -36
  246. package/src/lib/components/MobileTopNavigation.tsx +15 -18
  247. package/src/lib/components/SyntaxHighlight.tsx +81 -46
  248. package/src/lib/components/ThemeSwitch.tsx +26 -0
  249. package/src/lib/components/TopNavigation.tsx +27 -19
  250. package/src/lib/components/Zudoku.tsx +108 -0
  251. package/src/lib/components/context/ZudokuContext.ts +11 -16
  252. package/src/lib/components/context/ZudokuProvider.tsx +2 -2
  253. package/src/lib/components/index.ts +2 -3
  254. package/src/lib/components/navigation/Sidebar.tsx +3 -3
  255. package/src/lib/components/navigation/utils.ts +2 -2
  256. package/src/lib/core/{DevPortalContext.ts → ZudokuContext.ts} +3 -11
  257. package/src/lib/core/plugins.ts +12 -16
  258. package/src/lib/errors/ErrorAlert.tsx +2 -1
  259. package/src/lib/plugins/api-keys/index.tsx +9 -9
  260. package/src/lib/plugins/custom-pages/index.tsx +2 -2
  261. package/src/lib/plugins/markdown/index.tsx +2 -2
  262. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -14
  263. package/src/lib/plugins/openapi/Endpoint.tsx +5 -10
  264. package/src/lib/plugins/openapi/OperationList.tsx +6 -40
  265. package/src/lib/plugins/openapi/Route.tsx +11 -12
  266. package/src/lib/plugins/openapi/Sidecar.tsx +72 -61
  267. package/src/lib/plugins/openapi/client/GraphQLClient.tsx +140 -0
  268. package/src/lib/plugins/openapi/client/GraphQLContext.tsx +16 -0
  269. package/src/lib/plugins/openapi/client/createServer.ts +2 -0
  270. package/src/lib/plugins/openapi/client/useCreateQuery.ts +18 -0
  271. package/src/lib/plugins/openapi/client/worker.ts +38 -24
  272. package/src/lib/plugins/openapi/graphql/fragment-masking.ts +11 -18
  273. package/src/lib/plugins/openapi/graphql/gql.ts +7 -25
  274. package/src/lib/plugins/openapi/graphql/graphql.ts +351 -782
  275. package/src/lib/plugins/openapi/index.tsx +42 -67
  276. package/src/lib/plugins/openapi/schema/SchemaView.tsx +1 -1
  277. package/src/lib/plugins/openapi-worker.ts +11 -1
  278. package/src/lib/plugins/redirect/index.tsx +2 -2
  279. package/src/lib/plugins/search-inkeep/index.tsx +2 -2
  280. package/src/lib/ui/ActionButton.tsx +1 -1
  281. package/src/lib/util/useOnScreen.ts +32 -0
  282. package/dist/lib/components/DevPortal.js.map +0 -1
  283. package/dist/lib/components/context/ThemeContext.d.ts +0 -2
  284. package/dist/lib/components/context/ThemeContext.js +0 -7
  285. package/dist/lib/components/context/ThemeContext.js.map +0 -1
  286. package/dist/lib/components/context/ThemeProvider.d.ts +0 -4
  287. package/dist/lib/components/context/ThemeProvider.js +0 -23
  288. package/dist/lib/components/context/ThemeProvider.js.map +0 -1
  289. package/dist/lib/core/DevPortalContext.js.map +0 -1
  290. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +0 -9
  291. package/dist/lib/plugins/openapi/client/createMemoryClient.js +0 -54
  292. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +0 -1
  293. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +0 -10
  294. package/dist/lib/plugins/openapi/client/createWorkerClient.js +0 -62
  295. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +0 -1
  296. package/dist/lib/plugins/openapi/client/interfaces.d.ts +0 -4
  297. package/dist/lib/plugins/openapi/client/interfaces.js +0 -2
  298. package/dist/lib/plugins/openapi/client/interfaces.js.map +0 -1
  299. package/dist/lib/themeToggle.d.ts +0 -1
  300. package/dist/lib/themeToggle.js +0 -7
  301. package/dist/lib/themeToggle.js.map +0 -1
  302. package/dist/lib/util/createWaitForNotify.d.ts +0 -1
  303. package/dist/lib/util/createWaitForNotify.js +0 -15
  304. package/dist/lib/util/createWaitForNotify.js.map +0 -1
  305. package/dist/vite/plugin-html-transform.d.ts +0 -2
  306. package/dist/vite/plugin-html-transform.js +0 -15
  307. package/dist/vite/plugin-html-transform.js.map +0 -1
  308. package/lib/ClientOnly-CVN6leDu.js.map +0 -1
  309. package/lib/DeveloperHint-DHdLXGHA.js +0 -16
  310. package/lib/DeveloperHint-DHdLXGHA.js.map +0 -1
  311. package/lib/Markdown-BDcCAWwm.js +0 -18059
  312. package/lib/Markdown-BDcCAWwm.js.map +0 -1
  313. package/lib/OperationList-BjppA5yM.js +0 -621
  314. package/lib/OperationList-BjppA5yM.js.map +0 -1
  315. package/lib/Route-D_djzMv3.js +0 -13
  316. package/lib/Route-D_djzMv3.js.map +0 -1
  317. package/lib/Select-Bagt3Bme.js.map +0 -1
  318. package/lib/SidebarBadge-Bbt92M5K.js +0 -38
  319. package/lib/SidebarBadge-Bbt92M5K.js.map +0 -1
  320. package/lib/SlotletProvider-Da7eFgd2.js +0 -241
  321. package/lib/SlotletProvider-Da7eFgd2.js.map +0 -1
  322. package/lib/Spinner-ChOGyPls.js.map +0 -1
  323. package/lib/StaggeredRender-DDHSzQKE.js +0 -17
  324. package/lib/StaggeredRender-DDHSzQKE.js.map +0 -1
  325. package/lib/ZudokuContext-BKXGJTmu.js.map +0 -1
  326. package/lib/hook-sn0zMTkE.js.map +0 -1
  327. package/lib/index-CRo94sKK.js +0 -1783
  328. package/lib/index-CRo94sKK.js.map +0 -1
  329. package/lib/index-_gtpPhlu.js +0 -5877
  330. package/lib/index-_gtpPhlu.js.map +0 -1
  331. package/lib/state-CsuHT8ZO.js +0 -183
  332. package/lib/urql-core-35Qt_U4i.js +0 -1511
  333. package/lib/urql-core-35Qt_U4i.js.map +0 -1
  334. package/lib/useExposedProps-ChOIUaS4.js +0 -9
  335. package/src/lib/components/DevPortal.tsx +0 -111
  336. package/src/lib/components/context/ThemeContext.tsx +0 -8
  337. package/src/lib/components/context/ThemeProvider.tsx +0 -27
  338. package/src/lib/plugins/openapi/client/createMemoryClient.ts +0 -65
  339. package/src/lib/plugins/openapi/client/createWorkerClient.ts +0 -79
  340. package/src/lib/plugins/openapi/client/interfaces.ts +0 -5
  341. package/src/lib/themeToggle.ts +0 -7
  342. package/src/lib/util/createWaitForNotify.ts +0 -18
@@ -1,1154 +1,923 @@
1
- var ut = Object.defineProperty;
2
- var ye = (t) => {
3
- throw TypeError(t);
1
+ var xt = Object.defineProperty;
2
+ var Ne = (e) => {
3
+ throw TypeError(e);
4
4
  };
5
- var dt = (t, e, r) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
6
- var v = (t, e, r) => dt(t, typeof e != "symbol" ? e + "" : e, r), je = (t, e, r) => e.has(t) || ye("Cannot " + r);
7
- var l = (t, e, r) => (je(t, e, "read from private field"), r ? r.call(t) : e.get(t)), y = (t, e, r) => e.has(t) ? ye("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), g = (t, e, r, s) => (je(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
8
- var X = (t, e, r, s) => ({
5
+ var yt = (e, t, r) => t in e ? xt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
6
+ var S = (e, t, r) => yt(e, typeof t != "symbol" ? t + "" : t, r), Ee = (e, t, r) => t.has(e) || Ne("Cannot " + r);
7
+ var l = (e, t, r) => (Ee(e, t, "read from private field"), r ? r.call(e) : t.get(e)), N = (e, t, r) => t.has(e) ? Ne("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, r), y = (e, t, r, s) => (Ee(e, t, "write to private field"), s ? s.call(e, r) : t.set(e, r), r);
8
+ var J = (e, t, r, s) => ({
9
9
  set _(n) {
10
- g(t, e, n, r);
10
+ y(e, t, n, r);
11
11
  },
12
12
  get _() {
13
- return l(t, e, s);
13
+ return l(e, t, s);
14
14
  }
15
15
  });
16
- import { a as Te, H as ce, M as ht, A as ft, u as gt } from "./AnchorLink-BbB2q-jx.js";
17
- import { e as mt, f as pt, R as vt, L as te, g as G, h as xt, O as _e, i as bt, b as yt, u as ue } from "./index-CRo94sKK.js";
18
- import { u as jt } from "./state-CsuHT8ZO.js";
19
- import { E as Fe, S as k, a as wt, R as Nt } from "./SlotletProvider-Da7eFgd2.js";
16
+ import { a as Be, A as bt, H as he, M as jt, u as wt } from "./AnchorLink-CDlhr8gL.js";
17
+ import { d as St, R as Nt, N as re, u as Et, L as fe } from "./index-Yn8c3UWE.js";
18
+ import { u as Pt } from "./state-tsXBLONe.js";
19
+ import { E as ze, S as D, a as Ct, R as kt } from "./SlotletProvider-DyomlzGx.js";
20
20
  import { j as a } from "./jsx-runtime-B6kdoens.js";
21
- import { Button as Pt } from "./ui/Button.js";
22
- import { Callout as St } from "./ui/Callout.js";
23
- import Ct, { StrictMode as Qe, createContext as Be, Component as Et, createElement as we, useState as Q, useCallback as Le, useEffect as _, Suspense as de, memo as He, useMemo as re, useContext as kt, Fragment as At, useRef as he, forwardRef as Mt } from "react";
24
- import { a as fe } from "./_commonjsHelpers-BkfeUUK-.js";
25
- import { B as Dt } from "./router-BsfSoK2j.js";
26
- import { a as oe } from "./StaggeredRender-DDHSzQKE.js";
27
- import { C as Ot } from "./ClientOnly-CVN6leDu.js";
28
- import { S as ze, i as qe, Q as Rt, n as b, m as Ne, j as Pe, k as M, l as It, o as Tt, p as _t, q as Ft, r as Se, t as Ce, v as Qt, h as Ee, w as ke, x as Bt, y as B, u as F, z as Ke, A as Lt, g as Ht, Z as zt, B as qt, C as Kt } from "./ZudokuContext-BKXGJTmu.js";
29
- import { M as $t, u as ee } from "./hook-sn0zMTkE.js";
30
- import { a as Ut, T as Vt, b as Wt, V as Yt, u as ge } from "./Markdown-BDcCAWwm.js";
31
- import { CircleXIcon as Xt, SearchIcon as Zt, MenuIcon as Jt, MoonStarIcon as Gt, SunIcon as er, ChevronRightIcon as tr, ExternalLinkIcon as rr, PanelLeftIcon as ar } from "lucide-react";
32
- import { B as ae, S as sr } from "./Spinner-ChOGyPls.js";
33
- import { DropdownMenu as nr, DropdownMenuTrigger as ir, DropdownMenuContent as or, DropdownMenuLabel as lr, DropdownMenuSeparator as cr, DropdownMenuSub as ur, DropdownMenuSubTrigger as dr, DropdownMenuPortal as hr, DropdownMenuSubContent as fr, DropdownMenuItem as gr } from "./ui/DropdownMenu.js";
34
- import { c as A } from "./cn-BmFQLtkS.js";
35
- import { VisuallyHidden as $e } from "@radix-ui/react-visually-hidden";
36
- import { a as Ue, c as mr } from "./index-BuAyrJe3.js";
37
- import { Drawer as Ve, DrawerTrigger as We, DrawerContent as Ye, DrawerTitle as Xe, DrawerClose as pr } from "./ui/Drawer.js";
38
- import { S as se } from "./SidebarBadge-Bbt92M5K.js";
39
- import * as ne from "@radix-ui/react-collapsible";
40
- function vr({ error: t }) {
41
- return /* @__PURE__ */ a.jsx(Fe, { error: t });
21
+ import { Button as At } from "./ui/Button.js";
22
+ import { Callout as Dt } from "./ui/Callout.js";
23
+ import { S as He, l as Ue, Q as Ot, n as w, m as Pe, o as Ce, p as O, q as Mt, r as Rt, t as It, v as Tt, w as ke, x as Ae, y as _t, h as De, z as Oe, A as Ft, d as Qt, B as $e, C as qt, j as q, u as Q, D as Ke, E as Lt, g as Bt, Z as zt } from "./utils-DcpDOncX.js";
24
+ import { M as Ht, u as ae } from "./hook-hEqe7fPB.js";
25
+ import * as G from "react";
26
+ import Ve, { useState as F, StrictMode as Ze, useEffect as L, useRef as me, useCallback as Ut, Suspense as ge, memo as Ye, forwardRef as $t, createContext as We, Component as Kt, createElement as Me, useMemo as se, useContext as Vt, Fragment as Zt } from "react";
27
+ import { a as pe, c as Yt } from "./_commonjsHelpers-BkfeUUK-.js";
28
+ import { B as Wt } from "./router-lfyopgBI.js";
29
+ import { I as Xt, y as Jt, u as ve, j as xe, O as Xe } from "./index-Czzd9rjU.js";
30
+ import { S as le, a as ne } from "./SidebarBadge-DxFJcJ6V.js";
31
+ import { C as ye } from "./ClientOnly-E7hGysn1.js";
32
+ import { ChevronRightIcon as Gt, ExternalLinkIcon as er, CircleXIcon as tr, SearchIcon as rr, MoonStarIcon as ar, SunIcon as sr, MenuIcon as nr, PanelLeftIcon as ir } from "lucide-react";
33
+ import { Drawer as Je, DrawerTrigger as Ge, DrawerContent as et, DrawerTitle as tt } from "./ui/Drawer.js";
34
+ import { c as R } from "./cn-BmFQLtkS.js";
35
+ import { u as be, a as or, V as lr } from "./Markdown-ievDDhFT.js";
36
+ import { c as cr, a as ur } from "./index-BuAyrJe3.js";
37
+ import * as ie from "@radix-ui/react-collapsible";
38
+ import { B as ce } from "./Button-jK0EsymC.js";
39
+ import { DropdownMenu as dr, DropdownMenuTrigger as hr, DropdownMenuContent as fr, DropdownMenuLabel as mr, DropdownMenuSeparator as gr, DropdownMenuSub as pr, DropdownMenuSubTrigger as vr, DropdownMenuPortal as xr, DropdownMenuSubContent as yr, DropdownMenuItem as br } from "./ui/DropdownMenu.js";
40
+ import { VisuallyHidden as rt } from "@radix-ui/react-visually-hidden";
41
+ import { z as jr, J as wr } from "./SyntaxHighlight-DkLOsjHS.js";
42
+ import { Z as Sr } from "./invariant-Caa8-XvF.js";
43
+ import { S as Nr } from "./Spinner-3cQDBVGr.js";
44
+ function Er({ error: e }) {
45
+ return /* @__PURE__ */ a.jsx(ze, { error: e });
42
46
  }
43
- var W = {};
44
- const xr = /* @__PURE__ */ fe(Dt), br = /* @__PURE__ */ fe(mt), yr = /* @__PURE__ */ fe(pt);
45
- Object.defineProperty(W, "__esModule", { value: !0 });
46
- var jr = Ct, E = xr, me = br, D = yr;
47
- function wr(t) {
48
- if (t && t.__esModule) return t;
49
- var e = /* @__PURE__ */ Object.create(null);
50
- return t && Object.keys(t).forEach(function(r) {
51
- if (r !== "default") {
52
- var s = Object.getOwnPropertyDescriptor(t, r);
53
- Object.defineProperty(e, r, s.get ? s : {
54
- enumerable: !0,
55
- get: function() {
56
- return t[r];
57
- }
58
- });
59
- }
60
- }), e.default = t, Object.freeze(e);
61
- }
62
- var S = /* @__PURE__ */ wr(jr);
63
- function Nr({
64
- basename: t,
65
- children: e,
66
- location: r = "/",
67
- future: s
68
- }) {
69
- typeof r == "string" && (r = D.parsePath(r));
70
- let n = E.Action.Pop, i = {
71
- pathname: r.pathname || "/",
72
- search: r.search || "",
73
- hash: r.hash || "",
74
- state: r.state != null ? r.state : null,
75
- key: r.key || "default"
76
- }, o = Ze();
77
- return /* @__PURE__ */ S.createElement(D.Router, {
78
- basename: t,
79
- children: e,
80
- location: i,
81
- navigationType: n,
82
- navigator: o,
83
- future: s,
84
- static: !0
85
- });
86
- }
87
- function Pr({
88
- context: t,
89
- router: e,
90
- hydrate: r = !0,
91
- nonce: s
92
- }) {
93
- e && t || (process.env.NODE_ENV !== "production" ? E.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : E.UNSAFE_invariant(!1));
94
- let n = {
95
- router: e,
96
- navigator: Ze(),
97
- static: !0,
98
- staticContext: t,
99
- basename: t.basename || "/"
100
- }, i = /* @__PURE__ */ new Map(), o = "";
101
- if (r !== !1) {
102
- let c = {
103
- loaderData: t.loaderData,
104
- actionData: t.actionData,
105
- errors: Cr(t.errors)
106
- };
107
- o = `window.__staticRouterHydrationData = JSON.parse(${Or(JSON.stringify(JSON.stringify(c)))});`;
108
- }
109
- let {
110
- state: u
111
- } = n.router;
112
- return /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement(D.UNSAFE_DataRouterContext.Provider, {
113
- value: n
114
- }, /* @__PURE__ */ S.createElement(D.UNSAFE_DataRouterStateContext.Provider, {
115
- value: u
116
- }, /* @__PURE__ */ S.createElement(D.UNSAFE_FetchersContext.Provider, {
117
- value: i
118
- }, /* @__PURE__ */ S.createElement(D.UNSAFE_ViewTransitionContext.Provider, {
119
- value: {
120
- isTransitioning: !1
121
- }
122
- }, /* @__PURE__ */ S.createElement(D.Router, {
123
- basename: n.basename,
124
- location: u.location,
125
- navigationType: u.historyAction,
126
- navigator: n.navigator,
127
- static: n.static,
128
- future: {
129
- v7_relativeSplatPath: e.future.v7_relativeSplatPath
130
- }
131
- }, /* @__PURE__ */ S.createElement(Sr, {
132
- routes: e.routes,
133
- future: e.future,
134
- state: u
135
- })))))), o ? /* @__PURE__ */ S.createElement("script", {
136
- suppressHydrationWarning: !0,
137
- nonce: s,
138
- dangerouslySetInnerHTML: {
139
- __html: o
140
- }
141
- }) : null);
142
- }
143
- function Sr({
144
- routes: t,
145
- future: e,
146
- state: r
147
- }) {
148
- return me.UNSAFE_useRoutesImpl(t, void 0, r, e);
149
- }
150
- function Cr(t) {
151
- if (!t) return null;
152
- let e = Object.entries(t), r = {};
153
- for (let [s, n] of e)
154
- E.isRouteErrorResponse(n) ? r[s] = {
155
- ...n,
156
- __type: "RouteErrorResponse"
157
- } : n instanceof Error ? r[s] = {
158
- message: n.message,
159
- __type: "Error",
160
- // If this is a subclass (i.e., ReferenceError), send up the type so we
161
- // can re-create the same type during hydration.
162
- ...n.name !== "Error" ? {
163
- __subType: n.name
164
- } : {}
165
- } : r[s] = n;
166
- return r;
167
- }
168
- function Ze() {
169
- return {
170
- createHref: Je,
171
- encodeLocation: Ge,
172
- push(t) {
173
- throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)})\` somewhere in your app.`);
174
- },
175
- replace(t) {
176
- throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)}, { replace: true })\` somewhere in your app.`);
177
- },
178
- go(t) {
179
- throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${t})\` somewhere in your app.`);
180
- },
181
- back() {
182
- throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.");
183
- },
184
- forward() {
185
- throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.");
186
- }
187
- };
188
- }
189
- function Er(t, e) {
190
- return E.createStaticHandler(t, {
191
- ...e,
192
- mapRouteProperties: me.UNSAFE_mapRouteProperties
193
- });
194
- }
195
- function kr(t, e, r = {}) {
196
- let s = {}, n = E.UNSAFE_convertRoutesToDataRoutes(t, me.UNSAFE_mapRouteProperties, void 0, s), i = e.matches.map((u) => {
197
- let c = s[u.route.id] || u.route;
198
- return {
199
- ...u,
200
- route: c
201
- };
202
- }), o = (u) => `You cannot use router.${u}() on the server because it is a stateless environment`;
203
- return {
204
- get basename() {
205
- return e.basename;
206
- },
207
- get future() {
208
- var u, c;
209
- return {
210
- v7_fetcherPersist: !1,
211
- v7_normalizeFormMethod: !1,
212
- v7_partialHydration: ((u = r.future) == null ? void 0 : u.v7_partialHydration) === !0,
213
- v7_prependBasename: !1,
214
- v7_relativeSplatPath: ((c = r.future) == null ? void 0 : c.v7_relativeSplatPath) === !0,
215
- v7_skipActionErrorRevalidation: !1
216
- };
217
- },
218
- get state() {
219
- return {
220
- historyAction: E.Action.Pop,
221
- location: e.location,
222
- matches: i,
223
- loaderData: e.loaderData,
224
- actionData: e.actionData,
225
- errors: e.errors,
226
- initialized: !0,
227
- navigation: E.IDLE_NAVIGATION,
228
- restoreScrollPosition: null,
229
- preventScrollReset: !1,
230
- revalidation: "idle",
231
- fetchers: /* @__PURE__ */ new Map(),
232
- blockers: /* @__PURE__ */ new Map()
233
- };
234
- },
235
- get routes() {
236
- return n;
237
- },
238
- get window() {
239
- },
240
- initialize() {
241
- throw o("initialize");
242
- },
243
- subscribe() {
244
- throw o("subscribe");
245
- },
246
- enableScrollRestoration() {
247
- throw o("enableScrollRestoration");
248
- },
249
- navigate() {
250
- throw o("navigate");
251
- },
252
- fetch() {
253
- throw o("fetch");
254
- },
255
- revalidate() {
256
- throw o("revalidate");
257
- },
258
- createHref: Je,
259
- encodeLocation: Ge,
260
- getFetcher() {
261
- return E.IDLE_FETCHER;
262
- },
263
- deleteFetcher() {
264
- throw o("deleteFetcher");
265
- },
266
- dispose() {
267
- throw o("dispose");
268
- },
269
- getBlocker() {
270
- return E.IDLE_BLOCKER;
271
- },
272
- deleteBlocker() {
273
- throw o("deleteBlocker");
274
- },
275
- patchRoutes() {
276
- throw o("patchRoutes");
277
- },
278
- _internalFetchControllers: /* @__PURE__ */ new Map(),
279
- _internalActiveDeferreds: /* @__PURE__ */ new Map(),
280
- _internalSetRoutes() {
281
- throw o("_internalSetRoutes");
282
- }
283
- };
284
- }
285
- function Je(t) {
286
- return typeof t == "string" ? t : D.createPath(t);
287
- }
288
- function Ge(t) {
289
- let e = typeof t == "string" ? t : D.createPath(t);
290
- e = e.replace(/ $/, "%20");
291
- let r = Ar.test(e) ? new URL(e) : new URL(e, "http://localhost");
292
- return {
293
- pathname: r.pathname,
294
- search: r.search,
295
- hash: r.hash
296
- };
297
- }
298
- const Ar = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Mr = {
299
- "&": "\\u0026",
300
- ">": "\\u003e",
301
- "<": "\\u003c",
302
- "\u2028": "\\u2028",
303
- "\u2029": "\\u2029"
304
- }, Dr = /[&><\u2028\u2029]/g;
305
- function Or(t) {
306
- return t.replace(Dr, (e) => Mr[e]);
307
- }
308
- W.StaticRouter = Nr;
309
- var Rr = W.StaticRouterProvider = Pr;
310
- W.createStaticHandler = Er;
311
- W.createStaticRouter = kr;
312
- const Ir = ({
313
- router: t,
314
- hydrate: e = !1
315
- }) => /* @__PURE__ */ a.jsx(Qe, { children: /* @__PURE__ */ a.jsx(Te, { children: /* @__PURE__ */ a.jsx(oe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ a.jsx(vt, { router: t }) }) }) }), Tr = ({
316
- router: t,
317
- context: e,
318
- helmetContext: r
319
- }) => /* @__PURE__ */ a.jsx(Qe, { children: /* @__PURE__ */ a.jsx(Te, { context: r, children: /* @__PURE__ */ a.jsx(Rr, { router: t, context: e }) }) });
320
- var C, Oe, _r = (Oe = class extends ze {
321
- constructor(e = {}) {
47
+ var k, Qe, Pr = (Qe = class extends He {
48
+ constructor(t = {}) {
322
49
  super();
323
- y(this, C);
324
- this.config = e, g(this, C, /* @__PURE__ */ new Map());
50
+ N(this, k);
51
+ this.config = t, y(this, k, /* @__PURE__ */ new Map());
325
52
  }
326
- build(e, r, s) {
327
- const n = r.queryKey, i = r.queryHash ?? qe(n, r);
328
- let o = this.get(i);
329
- return o || (o = new Rt({
53
+ build(t, r, s) {
54
+ const n = r.queryKey, o = r.queryHash ?? Ue(n, r);
55
+ let i = this.get(o);
56
+ return i || (i = new Ot({
330
57
  cache: this,
331
58
  queryKey: n,
332
- queryHash: i,
333
- options: e.defaultQueryOptions(r),
59
+ queryHash: o,
60
+ options: t.defaultQueryOptions(r),
334
61
  state: s,
335
- defaultOptions: e.getQueryDefaults(n)
336
- }), this.add(o)), o;
62
+ defaultOptions: t.getQueryDefaults(n)
63
+ }), this.add(i)), i;
337
64
  }
338
- add(e) {
339
- l(this, C).has(e.queryHash) || (l(this, C).set(e.queryHash, e), this.notify({
65
+ add(t) {
66
+ l(this, k).has(t.queryHash) || (l(this, k).set(t.queryHash, t), this.notify({
340
67
  type: "added",
341
- query: e
68
+ query: t
342
69
  }));
343
70
  }
344
- remove(e) {
345
- const r = l(this, C).get(e.queryHash);
346
- r && (e.destroy(), r === e && l(this, C).delete(e.queryHash), this.notify({ type: "removed", query: e }));
71
+ remove(t) {
72
+ const r = l(this, k).get(t.queryHash);
73
+ r && (t.destroy(), r === t && l(this, k).delete(t.queryHash), this.notify({ type: "removed", query: t }));
347
74
  }
348
75
  clear() {
349
- b.batch(() => {
350
- this.getAll().forEach((e) => {
351
- this.remove(e);
76
+ w.batch(() => {
77
+ this.getAll().forEach((t) => {
78
+ this.remove(t);
352
79
  });
353
80
  });
354
81
  }
355
- get(e) {
356
- return l(this, C).get(e);
82
+ get(t) {
83
+ return l(this, k).get(t);
357
84
  }
358
85
  getAll() {
359
- return [...l(this, C).values()];
86
+ return [...l(this, k).values()];
360
87
  }
361
- find(e) {
362
- const r = { exact: !0, ...e };
88
+ find(t) {
89
+ const r = { exact: !0, ...t };
363
90
  return this.getAll().find(
364
- (s) => Ne(r, s)
91
+ (s) => Pe(r, s)
365
92
  );
366
93
  }
367
- findAll(e = {}) {
94
+ findAll(t = {}) {
368
95
  const r = this.getAll();
369
- return Object.keys(e).length > 0 ? r.filter((s) => Ne(e, s)) : r;
96
+ return Object.keys(t).length > 0 ? r.filter((s) => Pe(t, s)) : r;
370
97
  }
371
- notify(e) {
372
- b.batch(() => {
98
+ notify(t) {
99
+ w.batch(() => {
373
100
  this.listeners.forEach((r) => {
374
- r(e);
101
+ r(t);
375
102
  });
376
103
  });
377
104
  }
378
105
  onFocus() {
379
- b.batch(() => {
380
- this.getAll().forEach((e) => {
381
- e.onFocus();
106
+ w.batch(() => {
107
+ this.getAll().forEach((t) => {
108
+ t.onFocus();
382
109
  });
383
110
  });
384
111
  }
385
112
  onOnline() {
386
- b.batch(() => {
387
- this.getAll().forEach((e) => {
388
- e.onOnline();
113
+ w.batch(() => {
114
+ this.getAll().forEach((t) => {
115
+ t.onOnline();
389
116
  });
390
117
  });
391
118
  }
392
- }, C = new WeakMap(), Oe), x, V, Re, Fr = (Re = class extends ze {
393
- constructor(e = {}) {
119
+ }, k = new WeakMap(), Qe), j, Z, qe, Cr = (qe = class extends He {
120
+ constructor(t = {}) {
394
121
  super();
395
- y(this, x);
396
- y(this, V);
397
- this.config = e, g(this, x, /* @__PURE__ */ new Map()), g(this, V, Date.now());
122
+ N(this, j);
123
+ N(this, Z);
124
+ this.config = t, y(this, j, /* @__PURE__ */ new Map()), y(this, Z, Date.now());
398
125
  }
399
- build(e, r, s) {
400
- const n = new $t({
126
+ build(t, r, s) {
127
+ const n = new Ht({
401
128
  mutationCache: this,
402
- mutationId: ++X(this, V)._,
403
- options: e.defaultMutationOptions(r),
129
+ mutationId: ++J(this, Z)._,
130
+ options: t.defaultMutationOptions(r),
404
131
  state: s
405
132
  });
406
133
  return this.add(n), n;
407
134
  }
408
- add(e) {
409
- const r = Z(e), s = l(this, x).get(r) ?? [];
410
- s.push(e), l(this, x).set(r, s), this.notify({ type: "added", mutation: e });
135
+ add(t) {
136
+ const r = ee(t), s = l(this, j).get(r) ?? [];
137
+ s.push(t), l(this, j).set(r, s), this.notify({ type: "added", mutation: t });
411
138
  }
412
- remove(e) {
139
+ remove(t) {
413
140
  var s;
414
- const r = Z(e);
415
- if (l(this, x).has(r)) {
416
- const n = (s = l(this, x).get(r)) == null ? void 0 : s.filter((i) => i !== e);
417
- n && (n.length === 0 ? l(this, x).delete(r) : l(this, x).set(r, n));
141
+ const r = ee(t);
142
+ if (l(this, j).has(r)) {
143
+ const n = (s = l(this, j).get(r)) == null ? void 0 : s.filter((o) => o !== t);
144
+ n && (n.length === 0 ? l(this, j).delete(r) : l(this, j).set(r, n));
418
145
  }
419
- this.notify({ type: "removed", mutation: e });
146
+ this.notify({ type: "removed", mutation: t });
420
147
  }
421
- canRun(e) {
148
+ canRun(t) {
422
149
  var s;
423
- const r = (s = l(this, x).get(Z(e))) == null ? void 0 : s.find((n) => n.state.status === "pending");
424
- return !r || r === e;
150
+ const r = (s = l(this, j).get(ee(t))) == null ? void 0 : s.find((n) => n.state.status === "pending");
151
+ return !r || r === t;
425
152
  }
426
- runNext(e) {
153
+ runNext(t) {
427
154
  var s;
428
- const r = (s = l(this, x).get(Z(e))) == null ? void 0 : s.find((n) => n !== e && n.state.isPaused);
155
+ const r = (s = l(this, j).get(ee(t))) == null ? void 0 : s.find((n) => n !== t && n.state.isPaused);
429
156
  return (r == null ? void 0 : r.continue()) ?? Promise.resolve();
430
157
  }
431
158
  clear() {
432
- b.batch(() => {
433
- this.getAll().forEach((e) => {
434
- this.remove(e);
159
+ w.batch(() => {
160
+ this.getAll().forEach((t) => {
161
+ this.remove(t);
435
162
  });
436
163
  });
437
164
  }
438
165
  getAll() {
439
- return [...l(this, x).values()].flat();
166
+ return [...l(this, j).values()].flat();
440
167
  }
441
- find(e) {
442
- const r = { exact: !0, ...e };
168
+ find(t) {
169
+ const r = { exact: !0, ...t };
443
170
  return this.getAll().find(
444
- (s) => Pe(r, s)
171
+ (s) => Ce(r, s)
445
172
  );
446
173
  }
447
- findAll(e = {}) {
448
- return this.getAll().filter((r) => Pe(e, r));
174
+ findAll(t = {}) {
175
+ return this.getAll().filter((r) => Ce(t, r));
449
176
  }
450
- notify(e) {
451
- b.batch(() => {
177
+ notify(t) {
178
+ w.batch(() => {
452
179
  this.listeners.forEach((r) => {
453
- r(e);
180
+ r(t);
454
181
  });
455
182
  });
456
183
  }
457
184
  resumePausedMutations() {
458
- const e = this.getAll().filter((r) => r.state.isPaused);
459
- return b.batch(
185
+ const t = this.getAll().filter((r) => r.state.isPaused);
186
+ return w.batch(
460
187
  () => Promise.all(
461
- e.map((r) => r.continue().catch(M))
188
+ t.map((r) => r.continue().catch(O))
462
189
  )
463
190
  );
464
191
  }
465
- }, x = new WeakMap(), V = new WeakMap(), Re);
466
- function Z(t) {
467
- var e;
468
- return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
192
+ }, j = new WeakMap(), Z = new WeakMap(), qe);
193
+ function ee(e) {
194
+ var t;
195
+ return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
469
196
  }
470
- function Ae(t) {
197
+ function Re(e) {
471
198
  return {
472
- onFetch: (e, r) => {
473
- var j, N, p, P, h;
474
- const s = e.options, n = (p = (N = (j = e.fetchOptions) == null ? void 0 : j.meta) == null ? void 0 : N.fetchMore) == null ? void 0 : p.direction, i = ((P = e.state.data) == null ? void 0 : P.pages) || [], o = ((h = e.state.data) == null ? void 0 : h.pageParams) || [];
475
- let u = { pages: [], pageParams: [] }, c = 0;
476
- const m = async () => {
477
- let f = !1;
478
- const L = (w) => {
479
- Object.defineProperty(w, "signal", {
199
+ onFetch: (t, r) => {
200
+ var p, f, h, g, v;
201
+ const s = t.options, n = (h = (f = (p = t.fetchOptions) == null ? void 0 : p.meta) == null ? void 0 : f.fetchMore) == null ? void 0 : h.direction, o = ((g = t.state.data) == null ? void 0 : g.pages) || [], i = ((v = t.state.data) == null ? void 0 : v.pageParams) || [];
202
+ let c = { pages: [], pageParams: [] }, u = 0;
203
+ const d = async () => {
204
+ let m = !1;
205
+ const E = (b) => {
206
+ Object.defineProperty(b, "signal", {
480
207
  enumerable: !0,
481
- get: () => (e.signal.aborted ? f = !0 : e.signal.addEventListener("abort", () => {
482
- f = !0;
483
- }), e.signal)
208
+ get: () => (t.signal.aborted ? m = !0 : t.signal.addEventListener("abort", () => {
209
+ m = !0;
210
+ }), t.signal)
484
211
  });
485
- }, lt = It(e.options, e.fetchOptions), ve = async (w, O, $) => {
486
- if (f)
212
+ }, W = Mt(t.options, t.fetchOptions), $ = async (b, P, K) => {
213
+ if (m)
487
214
  return Promise.reject();
488
- if (O == null && w.pages.length)
489
- return Promise.resolve(w);
490
- const Y = {
491
- queryKey: e.queryKey,
492
- pageParam: O,
493
- direction: $ ? "backward" : "forward",
494
- meta: e.options.meta
215
+ if (P == null && b.pages.length)
216
+ return Promise.resolve(b);
217
+ const X = {
218
+ queryKey: t.queryKey,
219
+ pageParam: P,
220
+ direction: K ? "backward" : "forward",
221
+ meta: t.options.meta
495
222
  };
496
- L(Y);
497
- const ct = await lt(
498
- Y
499
- ), { maxPages: xe } = e.options, be = $ ? Tt : _t;
223
+ E(X);
224
+ const vt = await W(
225
+ X
226
+ ), { maxPages: we } = t.options, Se = K ? Rt : It;
500
227
  return {
501
- pages: be(w.pages, ct, xe),
502
- pageParams: be(w.pageParams, O, xe)
228
+ pages: Se(b.pages, vt, we),
229
+ pageParams: Se(b.pageParams, P, we)
503
230
  };
504
231
  };
505
- if (n && i.length) {
506
- const w = n === "backward", O = w ? Qr : Me, $ = {
507
- pages: i,
508
- pageParams: o
509
- }, Y = O(s, $);
510
- u = await ve($, Y, w);
232
+ if (n && o.length) {
233
+ const b = n === "backward", P = b ? kr : Ie, K = {
234
+ pages: o,
235
+ pageParams: i
236
+ }, X = P(s, K);
237
+ c = await $(K, X, b);
511
238
  } else {
512
- const w = t ?? i.length;
239
+ const b = e ?? o.length;
513
240
  do {
514
- const O = c === 0 ? o[0] ?? s.initialPageParam : Me(s, u);
515
- if (c > 0 && O == null)
241
+ const P = u === 0 ? i[0] ?? s.initialPageParam : Ie(s, c);
242
+ if (u > 0 && P == null)
516
243
  break;
517
- u = await ve(u, O), c++;
518
- } while (c < w);
244
+ c = await $(c, P), u++;
245
+ } while (u < b);
519
246
  }
520
- return u;
247
+ return c;
521
248
  };
522
- e.options.persister ? e.fetchFn = () => {
523
- var f, L;
524
- return (L = (f = e.options).persister) == null ? void 0 : L.call(
525
- f,
249
+ t.options.persister ? t.fetchFn = () => {
250
+ var m, E;
251
+ return (E = (m = t.options).persister) == null ? void 0 : E.call(
526
252
  m,
253
+ d,
527
254
  {
528
- queryKey: e.queryKey,
529
- meta: e.options.meta,
530
- signal: e.signal
255
+ queryKey: t.queryKey,
256
+ meta: t.options.meta,
257
+ signal: t.signal
531
258
  },
532
259
  r
533
260
  );
534
- } : e.fetchFn = m;
261
+ } : t.fetchFn = d;
535
262
  }
536
263
  };
537
264
  }
538
- function Me(t, { pages: e, pageParams: r }) {
539
- const s = e.length - 1;
540
- return e.length > 0 ? t.getNextPageParam(
541
- e[s],
542
- e,
265
+ function Ie(e, { pages: t, pageParams: r }) {
266
+ const s = t.length - 1;
267
+ return t.length > 0 ? e.getNextPageParam(
268
+ t[s],
269
+ t,
543
270
  r[s],
544
271
  r
545
272
  ) : void 0;
546
273
  }
547
- function Qr(t, { pages: e, pageParams: r }) {
274
+ function kr(e, { pages: t, pageParams: r }) {
548
275
  var s;
549
- return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, r[0], r) : void 0;
276
+ return t.length > 0 ? (s = e.getPreviousPageParam) == null ? void 0 : s.call(e, t[0], t, r[0], r) : void 0;
550
277
  }
551
- var d, R, I, H, z, T, q, K, Ie, Br = (Ie = class {
552
- constructor(t = {}) {
553
- y(this, d);
554
- y(this, R);
555
- y(this, I);
556
- y(this, H);
557
- y(this, z);
558
- y(this, T);
559
- y(this, q);
560
- y(this, K);
561
- g(this, d, t.queryCache || new _r()), g(this, R, t.mutationCache || new Fr()), g(this, I, t.defaultOptions || {}), g(this, H, /* @__PURE__ */ new Map()), g(this, z, /* @__PURE__ */ new Map()), g(this, T, 0);
278
+ var x, I, T, B, z, _, H, U, Le, Ar = (Le = class {
279
+ constructor(e = {}) {
280
+ N(this, x);
281
+ N(this, I);
282
+ N(this, T);
283
+ N(this, B);
284
+ N(this, z);
285
+ N(this, _);
286
+ N(this, H);
287
+ N(this, U);
288
+ y(this, x, e.queryCache || new Pr()), y(this, I, e.mutationCache || new Cr()), y(this, T, e.defaultOptions || {}), y(this, B, /* @__PURE__ */ new Map()), y(this, z, /* @__PURE__ */ new Map()), y(this, _, 0);
562
289
  }
563
290
  mount() {
564
- X(this, T)._++, l(this, T) === 1 && (g(this, q, Ft.subscribe(async (t) => {
565
- t && (await this.resumePausedMutations(), l(this, d).onFocus());
566
- })), g(this, K, Se.subscribe(async (t) => {
567
- t && (await this.resumePausedMutations(), l(this, d).onOnline());
291
+ J(this, _)._++, l(this, _) === 1 && (y(this, H, Tt.subscribe(async (e) => {
292
+ e && (await this.resumePausedMutations(), l(this, x).onFocus());
293
+ })), y(this, U, ke.subscribe(async (e) => {
294
+ e && (await this.resumePausedMutations(), l(this, x).onOnline());
568
295
  })));
569
296
  }
570
297
  unmount() {
571
- var t, e;
572
- X(this, T)._--, l(this, T) === 0 && ((t = l(this, q)) == null || t.call(this), g(this, q, void 0), (e = l(this, K)) == null || e.call(this), g(this, K, void 0));
298
+ var e, t;
299
+ J(this, _)._--, l(this, _) === 0 && ((e = l(this, H)) == null || e.call(this), y(this, H, void 0), (t = l(this, U)) == null || t.call(this), y(this, U, void 0));
573
300
  }
574
- isFetching(t) {
575
- return l(this, d).findAll({ ...t, fetchStatus: "fetching" }).length;
301
+ isFetching(e) {
302
+ return l(this, x).findAll({ ...e, fetchStatus: "fetching" }).length;
576
303
  }
577
- isMutating(t) {
578
- return l(this, R).findAll({ ...t, status: "pending" }).length;
304
+ isMutating(e) {
305
+ return l(this, I).findAll({ ...e, status: "pending" }).length;
579
306
  }
580
- getQueryData(t) {
307
+ getQueryData(e) {
581
308
  var r;
582
- const e = this.defaultQueryOptions({ queryKey: t });
583
- return (r = l(this, d).get(e.queryHash)) == null ? void 0 : r.state.data;
309
+ const t = this.defaultQueryOptions({ queryKey: e });
310
+ return (r = l(this, x).get(t.queryHash)) == null ? void 0 : r.state.data;
584
311
  }
585
- ensureQueryData(t) {
586
- const e = this.getQueryData(t.queryKey);
587
- if (e === void 0)
588
- return this.fetchQuery(t);
312
+ ensureQueryData(e) {
313
+ const t = this.getQueryData(e.queryKey);
314
+ if (t === void 0)
315
+ return this.fetchQuery(e);
589
316
  {
590
- const r = this.defaultQueryOptions(t), s = l(this, d).build(this, r);
591
- return t.revalidateIfStale && s.isStaleByTime(Ce(r.staleTime, s)) && this.prefetchQuery(r), Promise.resolve(e);
317
+ const r = this.defaultQueryOptions(e), s = l(this, x).build(this, r);
318
+ return e.revalidateIfStale && s.isStaleByTime(Ae(r.staleTime, s)) && this.prefetchQuery(r), Promise.resolve(t);
592
319
  }
593
320
  }
594
- getQueriesData(t) {
595
- return l(this, d).findAll(t).map(({ queryKey: e, state: r }) => {
321
+ getQueriesData(e) {
322
+ return l(this, x).findAll(e).map(({ queryKey: t, state: r }) => {
596
323
  const s = r.data;
597
- return [e, s];
324
+ return [t, s];
598
325
  });
599
326
  }
600
- setQueryData(t, e, r) {
601
- const s = this.defaultQueryOptions({ queryKey: t }), n = l(this, d).get(
327
+ setQueryData(e, t, r) {
328
+ const s = this.defaultQueryOptions({ queryKey: e }), n = l(this, x).get(
602
329
  s.queryHash
603
- ), i = n == null ? void 0 : n.state.data, o = Qt(e, i);
604
- if (o !== void 0)
605
- return l(this, d).build(this, s).setData(o, { ...r, manual: !0 });
330
+ ), o = n == null ? void 0 : n.state.data, i = _t(t, o);
331
+ if (i !== void 0)
332
+ return l(this, x).build(this, s).setData(i, { ...r, manual: !0 });
606
333
  }
607
- setQueriesData(t, e, r) {
608
- return b.batch(
609
- () => l(this, d).findAll(t).map(({ queryKey: s }) => [
334
+ setQueriesData(e, t, r) {
335
+ return w.batch(
336
+ () => l(this, x).findAll(e).map(({ queryKey: s }) => [
610
337
  s,
611
- this.setQueryData(s, e, r)
338
+ this.setQueryData(s, t, r)
612
339
  ])
613
340
  );
614
341
  }
615
- getQueryState(t) {
342
+ getQueryState(e) {
616
343
  var r;
617
- const e = this.defaultQueryOptions({ queryKey: t });
618
- return (r = l(this, d).get(e.queryHash)) == null ? void 0 : r.state;
619
- }
620
- removeQueries(t) {
621
- const e = l(this, d);
622
- b.batch(() => {
623
- e.findAll(t).forEach((r) => {
624
- e.remove(r);
344
+ const t = this.defaultQueryOptions({ queryKey: e });
345
+ return (r = l(this, x).get(t.queryHash)) == null ? void 0 : r.state;
346
+ }
347
+ removeQueries(e) {
348
+ const t = l(this, x);
349
+ w.batch(() => {
350
+ t.findAll(e).forEach((r) => {
351
+ t.remove(r);
625
352
  });
626
353
  });
627
354
  }
628
- resetQueries(t, e) {
629
- const r = l(this, d), s = {
355
+ resetQueries(e, t) {
356
+ const r = l(this, x), s = {
630
357
  type: "active",
631
- ...t
358
+ ...e
632
359
  };
633
- return b.batch(() => (r.findAll(t).forEach((n) => {
360
+ return w.batch(() => (r.findAll(e).forEach((n) => {
634
361
  n.reset();
635
- }), this.refetchQueries(s, e)));
362
+ }), this.refetchQueries(s, t)));
636
363
  }
637
- cancelQueries(t = {}, e = {}) {
638
- const r = { revert: !0, ...e }, s = b.batch(
639
- () => l(this, d).findAll(t).map((n) => n.cancel(r))
364
+ cancelQueries(e = {}, t = {}) {
365
+ const r = { revert: !0, ...t }, s = w.batch(
366
+ () => l(this, x).findAll(e).map((n) => n.cancel(r))
640
367
  );
641
- return Promise.all(s).then(M).catch(M);
368
+ return Promise.all(s).then(O).catch(O);
642
369
  }
643
- invalidateQueries(t = {}, e = {}) {
644
- return b.batch(() => {
645
- if (l(this, d).findAll(t).forEach((s) => {
370
+ invalidateQueries(e = {}, t = {}) {
371
+ return w.batch(() => {
372
+ if (l(this, x).findAll(e).forEach((s) => {
646
373
  s.invalidate();
647
- }), t.refetchType === "none")
374
+ }), e.refetchType === "none")
648
375
  return Promise.resolve();
649
376
  const r = {
650
- ...t,
651
- type: t.refetchType ?? t.type ?? "active"
377
+ ...e,
378
+ type: e.refetchType ?? e.type ?? "active"
652
379
  };
653
- return this.refetchQueries(r, e);
380
+ return this.refetchQueries(r, t);
654
381
  });
655
382
  }
656
- refetchQueries(t = {}, e) {
383
+ refetchQueries(e = {}, t) {
657
384
  const r = {
658
- ...e,
659
- cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
660
- }, s = b.batch(
661
- () => l(this, d).findAll(t).filter((n) => !n.isDisabled()).map((n) => {
662
- let i = n.fetch(void 0, r);
663
- return r.throwOnError || (i = i.catch(M)), n.state.fetchStatus === "paused" ? Promise.resolve() : i;
385
+ ...t,
386
+ cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
387
+ }, s = w.batch(
388
+ () => l(this, x).findAll(e).filter((n) => !n.isDisabled()).map((n) => {
389
+ let o = n.fetch(void 0, r);
390
+ return r.throwOnError || (o = o.catch(O)), n.state.fetchStatus === "paused" ? Promise.resolve() : o;
664
391
  })
665
392
  );
666
- return Promise.all(s).then(M);
393
+ return Promise.all(s).then(O);
667
394
  }
668
- fetchQuery(t) {
669
- const e = this.defaultQueryOptions(t);
670
- e.retry === void 0 && (e.retry = !1);
671
- const r = l(this, d).build(this, e);
395
+ fetchQuery(e) {
396
+ const t = this.defaultQueryOptions(e);
397
+ t.retry === void 0 && (t.retry = !1);
398
+ const r = l(this, x).build(this, t);
672
399
  return r.isStaleByTime(
673
- Ce(e.staleTime, r)
674
- ) ? r.fetch(e) : Promise.resolve(r.state.data);
400
+ Ae(t.staleTime, r)
401
+ ) ? r.fetch(t) : Promise.resolve(r.state.data);
675
402
  }
676
- prefetchQuery(t) {
677
- return this.fetchQuery(t).then(M).catch(M);
403
+ prefetchQuery(e) {
404
+ return this.fetchQuery(e).then(O).catch(O);
678
405
  }
679
- fetchInfiniteQuery(t) {
680
- return t.behavior = Ae(t.pages), this.fetchQuery(t);
406
+ fetchInfiniteQuery(e) {
407
+ return e.behavior = Re(e.pages), this.fetchQuery(e);
681
408
  }
682
- prefetchInfiniteQuery(t) {
683
- return this.fetchInfiniteQuery(t).then(M).catch(M);
409
+ prefetchInfiniteQuery(e) {
410
+ return this.fetchInfiniteQuery(e).then(O).catch(O);
684
411
  }
685
- ensureInfiniteQueryData(t) {
686
- return t.behavior = Ae(t.pages), this.ensureQueryData(t);
412
+ ensureInfiniteQueryData(e) {
413
+ return e.behavior = Re(e.pages), this.ensureQueryData(e);
687
414
  }
688
415
  resumePausedMutations() {
689
- return Se.isOnline() ? l(this, R).resumePausedMutations() : Promise.resolve();
416
+ return ke.isOnline() ? l(this, I).resumePausedMutations() : Promise.resolve();
690
417
  }
691
418
  getQueryCache() {
692
- return l(this, d);
419
+ return l(this, x);
693
420
  }
694
421
  getMutationCache() {
695
- return l(this, R);
422
+ return l(this, I);
696
423
  }
697
424
  getDefaultOptions() {
698
- return l(this, I);
425
+ return l(this, T);
699
426
  }
700
- setDefaultOptions(t) {
701
- g(this, I, t);
427
+ setDefaultOptions(e) {
428
+ y(this, T, e);
702
429
  }
703
- setQueryDefaults(t, e) {
704
- l(this, H).set(Ee(t), {
705
- queryKey: t,
706
- defaultOptions: e
430
+ setQueryDefaults(e, t) {
431
+ l(this, B).set(De(e), {
432
+ queryKey: e,
433
+ defaultOptions: t
707
434
  });
708
435
  }
709
- getQueryDefaults(t) {
710
- const e = [...l(this, H).values()];
436
+ getQueryDefaults(e) {
437
+ const t = [...l(this, B).values()];
711
438
  let r = {};
712
- return e.forEach((s) => {
713
- ke(t, s.queryKey) && (r = { ...r, ...s.defaultOptions });
439
+ return t.forEach((s) => {
440
+ Oe(e, s.queryKey) && (r = { ...r, ...s.defaultOptions });
714
441
  }), r;
715
442
  }
716
- setMutationDefaults(t, e) {
717
- l(this, z).set(Ee(t), {
718
- mutationKey: t,
719
- defaultOptions: e
443
+ setMutationDefaults(e, t) {
444
+ l(this, z).set(De(e), {
445
+ mutationKey: e,
446
+ defaultOptions: t
720
447
  });
721
448
  }
722
- getMutationDefaults(t) {
723
- const e = [...l(this, z).values()];
449
+ getMutationDefaults(e) {
450
+ const t = [...l(this, z).values()];
724
451
  let r = {};
725
- return e.forEach((s) => {
726
- ke(t, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
452
+ return t.forEach((s) => {
453
+ Oe(e, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
727
454
  }), r;
728
455
  }
729
- defaultQueryOptions(t) {
730
- if (t._defaulted)
731
- return t;
732
- const e = {
733
- ...l(this, I).queries,
734
- ...this.getQueryDefaults(t.queryKey),
735
- ...t,
456
+ defaultQueryOptions(e) {
457
+ if (e._defaulted)
458
+ return e;
459
+ const t = {
460
+ ...l(this, T).queries,
461
+ ...this.getQueryDefaults(e.queryKey),
462
+ ...e,
736
463
  _defaulted: !0
737
464
  };
738
- return e.queryHash || (e.queryHash = qe(
739
- e.queryKey,
740
- e
741
- )), 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.enabled !== !0 && e.queryFn === Bt && (e.enabled = !1), e;
742
- }
743
- defaultMutationOptions(t) {
744
- return t != null && t._defaulted ? t : {
745
- ...l(this, I).mutations,
746
- ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
747
- ...t,
465
+ return t.queryHash || (t.queryHash = Ue(
466
+ t.queryKey,
467
+ t
468
+ )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === Ft && (t.enabled = !1), t;
469
+ }
470
+ defaultMutationOptions(e) {
471
+ return e != null && e._defaulted ? e : {
472
+ ...l(this, T).mutations,
473
+ ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
474
+ ...e,
748
475
  _defaulted: !0
749
476
  };
750
477
  }
751
478
  clear() {
752
- l(this, d).clear(), l(this, R).clear();
753
- }
754
- }, d = new WeakMap(), R = new WeakMap(), I = new WeakMap(), H = new WeakMap(), z = new WeakMap(), T = new WeakMap(), q = new WeakMap(), K = new WeakMap(), Ie);
755
- const Lr = Be(null), ie = {
756
- didCatch: !1,
757
- error: null
758
- };
759
- class Hr extends Et {
760
- constructor(e) {
761
- super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ie;
762
- }
763
- static getDerivedStateFromError(e) {
764
- return {
765
- didCatch: !0,
766
- error: e
767
- };
768
- }
769
- resetErrorBoundary() {
770
- const {
771
- error: e
772
- } = this.state;
773
- if (e !== null) {
774
- for (var r, s, n = arguments.length, i = new Array(n), o = 0; o < n; o++)
775
- i[o] = arguments[o];
776
- (r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
777
- args: i,
778
- reason: "imperative-api"
779
- }), this.setState(ie);
780
- }
781
- }
782
- componentDidCatch(e, r) {
783
- var s, n;
784
- (s = (n = this.props).onError) === null || s === void 0 || s.call(n, e, r);
785
- }
786
- componentDidUpdate(e, r) {
787
- const {
788
- didCatch: s
789
- } = this.state, {
790
- resetKeys: n
791
- } = this.props;
792
- if (s && r.error !== null && zr(e.resetKeys, n)) {
793
- var i, o;
794
- (i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
795
- next: n,
796
- prev: e.resetKeys,
797
- reason: "keys"
798
- }), this.setState(ie);
799
- }
800
- }
801
- render() {
802
- const {
803
- children: e,
804
- fallbackRender: r,
805
- FallbackComponent: s,
806
- fallback: n
807
- } = this.props, {
808
- didCatch: i,
809
- error: o
810
- } = this.state;
811
- let u = e;
812
- if (i) {
813
- const c = {
814
- error: o,
815
- resetErrorBoundary: this.resetErrorBoundary
816
- };
817
- if (typeof r == "function")
818
- u = r(c);
819
- else if (s)
820
- u = we(s, c);
821
- else if (n !== void 0)
822
- u = n;
823
- else
824
- throw o;
825
- }
826
- return we(Lr.Provider, {
827
- value: {
828
- didCatch: i,
829
- error: o,
830
- resetErrorBoundary: this.resetErrorBoundary
831
- }
832
- }, u);
479
+ l(this, x).clear(), l(this, I).clear();
833
480
  }
481
+ }, x = new WeakMap(), I = new WeakMap(), T = new WeakMap(), B = new WeakMap(), z = new WeakMap(), _ = new WeakMap(), H = new WeakMap(), U = new WeakMap(), Le);
482
+ function Dr(e) {
483
+ return e;
834
484
  }
835
- function zr() {
836
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
837
- return t.length !== e.length || t.some((r, s) => !Object.is(r, e[s]));
485
+ function Te(e, t, r) {
486
+ var u, d;
487
+ if (typeof t != "object" || t === null)
488
+ return;
489
+ const s = e.getMutationCache(), n = e.getQueryCache(), o = ((u = r == null ? void 0 : r.defaultOptions) == null ? void 0 : u.deserializeData) ?? ((d = e.getDefaultOptions().hydrate) == null ? void 0 : d.deserializeData) ?? Dr, i = t.mutations || [], c = t.queries || [];
490
+ i.forEach(({ state: p, ...f }) => {
491
+ var h, g;
492
+ s.build(
493
+ e,
494
+ {
495
+ ...(h = e.getDefaultOptions().hydrate) == null ? void 0 : h.mutations,
496
+ ...(g = r == null ? void 0 : r.defaultOptions) == null ? void 0 : g.mutations,
497
+ ...f
498
+ },
499
+ p
500
+ );
501
+ }), c.forEach(({ queryKey: p, state: f, queryHash: h, meta: g, promise: v }) => {
502
+ var W, $;
503
+ let m = n.get(h);
504
+ const E = f.data === void 0 ? f.data : o(f.data);
505
+ if (m) {
506
+ if (m.state.dataUpdatedAt < f.dataUpdatedAt) {
507
+ const { fetchStatus: b, ...P } = f;
508
+ m.setState({
509
+ ...P,
510
+ data: E
511
+ });
512
+ }
513
+ } else
514
+ m = n.build(
515
+ e,
516
+ {
517
+ ...(W = e.getDefaultOptions().hydrate) == null ? void 0 : W.queries,
518
+ ...($ = r == null ? void 0 : r.defaultOptions) == null ? void 0 : $.queries,
519
+ queryKey: p,
520
+ queryHash: h,
521
+ meta: g
522
+ },
523
+ // Reset fetch status to idle to avoid
524
+ // query being stuck in fetching state upon hydration
525
+ {
526
+ ...f,
527
+ data: E,
528
+ fetchStatus: "idle"
529
+ }
530
+ );
531
+ if (v) {
532
+ const b = Promise.resolve(v).then(o);
533
+ m.fetch(void 0, { initialPromise: b });
534
+ }
535
+ });
838
536
  }
839
- const qr = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", Kr = (t) => "getRoutes" in t && typeof t.getRoutes == "function", $r = (t) => "renderSearch" in t && typeof t.renderSearch == "function", Ur = (t) => "initialize" in t && typeof t.initialize == "function", Vr = (t) => "getHead" in t && typeof t.getHead == "function", Wr = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", Yr = (t) => "getIdentities" in t && typeof t.getIdentities == "function", et = new Br();
840
- class Xr {
841
- constructor(e) {
842
- v(this, "plugins");
843
- v(this, "sidebars");
844
- v(this, "topNavigation");
845
- v(this, "meta");
846
- v(this, "page");
847
- v(this, "authentication");
848
- v(this, "navigationPlugins");
849
- v(this, "initialize", async () => {
850
- await Promise.all(
851
- this.plugins.filter(Ur).map((e) => {
852
- var r;
853
- return (r = e.initialize) == null ? void 0 : r.call(e, this);
854
- })
537
+ var Or = ({
538
+ children: e,
539
+ options: t = {},
540
+ state: r,
541
+ queryClient: s
542
+ }) => {
543
+ const n = Qt(s), [o, i] = G.useState(), c = G.useRef(t);
544
+ return c.current = t, G.useMemo(() => {
545
+ if (r) {
546
+ if (typeof r != "object")
547
+ return;
548
+ const u = n.getQueryCache(), d = r.queries || [], p = [], f = [];
549
+ for (const h of d) {
550
+ const g = u.get(h.queryHash);
551
+ if (!g)
552
+ p.push(h);
553
+ else {
554
+ const v = h.state.dataUpdatedAt > g.state.dataUpdatedAt, m = o == null ? void 0 : o.find(
555
+ (E) => E.queryHash === h.queryHash
556
+ );
557
+ v && (!m || h.state.dataUpdatedAt > m.state.dataUpdatedAt) && f.push(h);
558
+ }
559
+ }
560
+ p.length > 0 && Te(n, { queries: p }, c.current), f.length > 0 && i(
561
+ (h) => h ? [...h, ...f] : f
855
562
  );
856
- });
857
- v(this, "invalidateCache", async (e) => {
858
- await et.invalidateQueries({ queryKey: e });
859
- });
860
- v(this, "getApiIdentities", async () => (await Promise.all(
861
- this.plugins.filter(Yr).map((r) => r.getIdentities(this))
862
- )).flat());
863
- v(this, "getPluginSidebar", async (e) => (await Promise.all(
864
- this.navigationPlugins.map(
865
- (s) => {
866
- var n;
867
- return (n = s.getSidebar) == null ? void 0 : n.call(s, B(e));
563
+ }
564
+ }, [n, o, r]), G.useEffect(() => {
565
+ o && (Te(n, { queries: o }, c.current), i(void 0));
566
+ }, [n, o]), e;
567
+ }, Y = {};
568
+ const Mr = /* @__PURE__ */ pe(Wt), Rr = /* @__PURE__ */ pe(Xt), Ir = /* @__PURE__ */ pe(St);
569
+ Object.defineProperty(Y, "__esModule", { value: !0 });
570
+ var Tr = Ve, A = Mr, je = Rr, M = Ir;
571
+ function _r(e) {
572
+ if (e && e.__esModule) return e;
573
+ var t = /* @__PURE__ */ Object.create(null);
574
+ return e && Object.keys(e).forEach(function(r) {
575
+ if (r !== "default") {
576
+ var s = Object.getOwnPropertyDescriptor(e, r);
577
+ Object.defineProperty(t, r, s.get ? s : {
578
+ enumerable: !0,
579
+ get: function() {
580
+ return e[r];
868
581
  }
869
- )
870
- )).flatMap((s) => s ?? []));
871
- v(this, "signRequest", async (e) => {
872
- if (!this.authentication)
873
- throw new Error("No authentication provider configured");
874
- const r = await this.authentication.getAccessToken();
875
- return e.headers.set("Authorization", `Bearer ${r}`), e;
876
- });
877
- this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Kr), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
878
- }
879
- }
880
- function Zr({ error: t, resetErrorBoundary: e }) {
881
- return /* @__PURE__ */ a.jsx(Fe, { error: t });
582
+ });
583
+ }
584
+ }), t.default = e, Object.freeze(t);
882
585
  }
883
- const J = globalThis;
884
- (!J.requestIdleCallback || !J.cancelIdleCallback) && (J.requestIdleCallback = (t) => setTimeout(t, 1), J.cancelIdleCallback = clearTimeout);
885
- const De = {
886
- info: "bg-blue-500",
887
- note: "bg-gray-500",
888
- tip: "bg-green-600",
889
- caution: "bg-orange-500",
890
- danger: "bg-rose-500"
891
- }, Jr = () => {
892
- const { page: t } = F(), [e, r] = Q(!0);
893
- if (!(t != null && t.banner) || !e)
894
- return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
895
- const s = t.banner.color && t.banner.color in De ? De[t.banner.color] : t.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: t.banner.color };
896
- return /* @__PURE__ */ a.jsxs(
897
- "div",
898
- {
899
- className: A(
900
- "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
901
- s
902
- ),
903
- style: n,
904
- children: [
905
- /* @__PURE__ */ a.jsx("div", { className: "w-full", children: t.banner.message }),
906
- t.banner.dismissible && /* @__PURE__ */ a.jsx(
907
- "button",
908
- {
909
- type: "button",
910
- className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
911
- onClick: () => r(!1),
912
- children: /* @__PURE__ */ a.jsx(Xt, { size: 16 })
913
- }
914
- )
915
- ]
586
+ var C = /* @__PURE__ */ _r(Tr);
587
+ function Fr({
588
+ basename: e,
589
+ children: t,
590
+ location: r = "/",
591
+ future: s
592
+ }) {
593
+ typeof r == "string" && (r = M.parsePath(r));
594
+ let n = A.Action.Pop, o = {
595
+ pathname: r.pathname || "/",
596
+ search: r.search || "",
597
+ hash: r.hash || "",
598
+ state: r.state != null ? r.state : null,
599
+ key: r.key || "default"
600
+ }, i = at();
601
+ return /* @__PURE__ */ C.createElement(M.Router, {
602
+ basename: e,
603
+ children: t,
604
+ location: o,
605
+ navigationType: n,
606
+ navigator: i,
607
+ future: s,
608
+ static: !0
609
+ });
610
+ }
611
+ function Qr({
612
+ context: e,
613
+ router: t,
614
+ hydrate: r = !0,
615
+ nonce: s
616
+ }) {
617
+ t && e || (process.env.NODE_ENV !== "production" ? A.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : A.UNSAFE_invariant(!1));
618
+ let n = {
619
+ router: t,
620
+ navigator: at(),
621
+ static: !0,
622
+ staticContext: e,
623
+ basename: e.basename || "/"
624
+ }, o = /* @__PURE__ */ new Map(), i = "";
625
+ if (r !== !1) {
626
+ let u = {
627
+ loaderData: e.loaderData,
628
+ actionData: e.actionData,
629
+ errors: Lr(e.errors)
630
+ };
631
+ i = `window.__staticRouterHydrationData = JSON.parse(${Kr(JSON.stringify(JSON.stringify(u)))});`;
632
+ }
633
+ let {
634
+ state: c
635
+ } = n.router;
636
+ return /* @__PURE__ */ C.createElement(C.Fragment, null, /* @__PURE__ */ C.createElement(M.UNSAFE_DataRouterContext.Provider, {
637
+ value: n
638
+ }, /* @__PURE__ */ C.createElement(M.UNSAFE_DataRouterStateContext.Provider, {
639
+ value: c
640
+ }, /* @__PURE__ */ C.createElement(M.UNSAFE_FetchersContext.Provider, {
641
+ value: o
642
+ }, /* @__PURE__ */ C.createElement(M.UNSAFE_ViewTransitionContext.Provider, {
643
+ value: {
644
+ isTransitioning: !1
916
645
  }
917
- );
918
- }, tt = () => {
919
- const t = F(), [e, r] = Q(!1), s = Le(() => r(!1), []);
920
- _(() => {
921
- if (e)
922
- return;
923
- function i(o) {
924
- o.key === "k" && (o.metaKey || o.ctrlKey) && (o.preventDefault(), r(!0));
646
+ }, /* @__PURE__ */ C.createElement(M.Router, {
647
+ basename: n.basename,
648
+ location: c.location,
649
+ navigationType: c.historyAction,
650
+ navigator: n.navigator,
651
+ static: n.static,
652
+ future: {
653
+ v7_relativeSplatPath: t.future.v7_relativeSplatPath
654
+ }
655
+ }, /* @__PURE__ */ C.createElement(qr, {
656
+ routes: t.routes,
657
+ future: t.future,
658
+ state: c
659
+ })))))), i ? /* @__PURE__ */ C.createElement("script", {
660
+ suppressHydrationWarning: !0,
661
+ nonce: s,
662
+ dangerouslySetInnerHTML: {
663
+ __html: i
925
664
  }
926
- return window.addEventListener("keydown", i), () => {
927
- window.removeEventListener("keydown", i);
665
+ }) : null);
666
+ }
667
+ function qr({
668
+ routes: e,
669
+ future: t,
670
+ state: r
671
+ }) {
672
+ return je.UNSAFE_useRoutesImpl(e, void 0, r, t);
673
+ }
674
+ function Lr(e) {
675
+ if (!e) return null;
676
+ let t = Object.entries(e), r = {};
677
+ for (let [s, n] of t)
678
+ A.isRouteErrorResponse(n) ? r[s] = {
679
+ ...n,
680
+ __type: "RouteErrorResponse"
681
+ } : n instanceof Error ? r[s] = {
682
+ message: n.message,
683
+ __type: "Error",
684
+ // If this is a subclass (i.e., ReferenceError), send up the type so we
685
+ // can re-create the same type during hydration.
686
+ ...n.name !== "Error" ? {
687
+ __subType: n.name
688
+ } : {}
689
+ } : r[s] = n;
690
+ return r;
691
+ }
692
+ function at() {
693
+ return {
694
+ createHref: st,
695
+ encodeLocation: nt,
696
+ push(e) {
697
+ throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
698
+ },
699
+ replace(e) {
700
+ throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`);
701
+ },
702
+ go(e) {
703
+ throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`);
704
+ },
705
+ back() {
706
+ throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.");
707
+ },
708
+ forward() {
709
+ throw new Error("You cannot use navigator.forward() on the server because it is a stateless environment.");
710
+ }
711
+ };
712
+ }
713
+ function Br(e, t) {
714
+ return A.createStaticHandler(e, {
715
+ ...t,
716
+ mapRouteProperties: je.UNSAFE_mapRouteProperties
717
+ });
718
+ }
719
+ function zr(e, t, r = {}) {
720
+ let s = {}, n = A.UNSAFE_convertRoutesToDataRoutes(e, je.UNSAFE_mapRouteProperties, void 0, s), o = t.matches.map((c) => {
721
+ let u = s[c.route.id] || c.route;
722
+ return {
723
+ ...c,
724
+ route: u
928
725
  };
929
- }, [e, r]);
930
- const n = t.plugins.find($r);
931
- return n ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
932
- /* @__PURE__ */ a.jsxs(
933
- "button",
934
- {
935
- type: "button",
936
- onClick: () => r(!0),
937
- 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",
938
- children: [
939
- /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
940
- /* @__PURE__ */ a.jsx(Zt, { size: 14 }),
941
- "Search"
942
- ] }),
943
- /* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
944
- ]
726
+ }), i = (c) => `You cannot use router.${c}() on the server because it is a stateless environment`;
727
+ return {
728
+ get basename() {
729
+ return t.basename;
730
+ },
731
+ get future() {
732
+ var c, u;
733
+ return {
734
+ v7_fetcherPersist: !1,
735
+ v7_normalizeFormMethod: !1,
736
+ v7_partialHydration: ((c = r.future) == null ? void 0 : c.v7_partialHydration) === !0,
737
+ v7_prependBasename: !1,
738
+ v7_relativeSplatPath: ((u = r.future) == null ? void 0 : u.v7_relativeSplatPath) === !0,
739
+ v7_skipActionErrorRevalidation: !1
740
+ };
741
+ },
742
+ get state() {
743
+ return {
744
+ historyAction: A.Action.Pop,
745
+ location: t.location,
746
+ matches: o,
747
+ loaderData: t.loaderData,
748
+ actionData: t.actionData,
749
+ errors: t.errors,
750
+ initialized: !0,
751
+ navigation: A.IDLE_NAVIGATION,
752
+ restoreScrollPosition: null,
753
+ preventScrollReset: !1,
754
+ revalidation: "idle",
755
+ fetchers: /* @__PURE__ */ new Map(),
756
+ blockers: /* @__PURE__ */ new Map()
757
+ };
758
+ },
759
+ get routes() {
760
+ return n;
761
+ },
762
+ get window() {
763
+ },
764
+ initialize() {
765
+ throw i("initialize");
766
+ },
767
+ subscribe() {
768
+ throw i("subscribe");
769
+ },
770
+ enableScrollRestoration() {
771
+ throw i("enableScrollRestoration");
772
+ },
773
+ navigate() {
774
+ throw i("navigate");
775
+ },
776
+ fetch() {
777
+ throw i("fetch");
778
+ },
779
+ revalidate() {
780
+ throw i("revalidate");
781
+ },
782
+ createHref: st,
783
+ encodeLocation: nt,
784
+ getFetcher() {
785
+ return A.IDLE_FETCHER;
786
+ },
787
+ deleteFetcher() {
788
+ throw i("deleteFetcher");
789
+ },
790
+ dispose() {
791
+ throw i("dispose");
792
+ },
793
+ getBlocker() {
794
+ return A.IDLE_BLOCKER;
795
+ },
796
+ deleteBlocker() {
797
+ throw i("deleteBlocker");
798
+ },
799
+ patchRoutes() {
800
+ throw i("patchRoutes");
801
+ },
802
+ _internalFetchControllers: /* @__PURE__ */ new Map(),
803
+ _internalActiveDeferreds: /* @__PURE__ */ new Map(),
804
+ _internalSetRoutes() {
805
+ throw i("_internalSetRoutes");
806
+ }
807
+ };
808
+ }
809
+ function st(e) {
810
+ return typeof e == "string" ? e : M.createPath(e);
811
+ }
812
+ function nt(e) {
813
+ let t = typeof e == "string" ? e : M.createPath(e);
814
+ t = t.replace(/ $/, "%20");
815
+ let r = Hr.test(t) ? new URL(t) : new URL(t, "http://localhost");
816
+ return {
817
+ pathname: r.pathname,
818
+ search: r.search,
819
+ hash: r.hash
820
+ };
821
+ }
822
+ const Hr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ur = {
823
+ "&": "\\u0026",
824
+ ">": "\\u003e",
825
+ "<": "\\u003c",
826
+ "\u2028": "\\u2028",
827
+ "\u2029": "\\u2029"
828
+ }, $r = /[&><\u2028\u2029]/g;
829
+ function Kr(e) {
830
+ return e.replace($r, (t) => Ur[t]);
831
+ }
832
+ Y.StaticRouter = Fr;
833
+ var Vr = Y.StaticRouterProvider = Qr;
834
+ Y.createStaticHandler = Br;
835
+ Y.createStaticRouter = zr;
836
+ const Zr = ({
837
+ router: e,
838
+ hydrate: t = !1
839
+ }) => {
840
+ const [r] = F(
841
+ () => new Ar({
842
+ defaultOptions: {
843
+ queries: {
844
+ staleTime: 3e5
845
+ }
945
846
  }
946
- ),
947
- /* @__PURE__ */ a.jsx(de, { fallback: null, children: n.renderSearch({
948
- isOpen: e,
949
- onClose: s
950
- }) })
951
- ] }) : null;
952
- }, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Gr = () => {
953
- const { topNavigation: t } = F(), { isAuthenticated: e } = ee();
954
- return t.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx(de, { children: /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(ea, { ...r }) }, r.id)) }) }) });
955
- }, ea = ({ id: t, label: e, default: r }) => {
956
- var c;
957
- const { sidebars: s } = F(), n = Ke(), i = s[t], o = r ?? (i ? Lt(i, (m) => {
958
- if (m.type === "doc") return B(m.id);
959
- }) : B(t));
960
- if (!o)
961
- throw new Error(
962
- `No links found in top navigation for top navigation '${t}'. Check that the sidebar isn't empty or that a default link set.`
963
- );
964
- const u = ((c = n.data.topNavItem) == null ? void 0 : c.id) === t;
965
- return /* @__PURE__ */ a.jsx(
966
- te,
847
+ })
848
+ );
849
+ return /* @__PURE__ */ a.jsx(Ze, { children: /* @__PURE__ */ a.jsx($e, { client: r, children: /* @__PURE__ */ a.jsx(Or, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ a.jsx(Be, { children: /* @__PURE__ */ a.jsx(le.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(
850
+ Nt,
967
851
  {
968
- className: Ue(
969
- "block py-3.5 font-medium -mb-px border-b-2",
970
- u ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
971
- ),
972
- to: o,
973
- children: e
852
+ router: e,
853
+ future: { v7_startTransition: !0 }
974
854
  }
975
- );
976
- }, ta = () => {
977
- const { topNavigation: t } = F(), { isAuthenticated: e } = ee();
978
- return /* @__PURE__ */ a.jsxs(Ve, { direction: "right", children: [
979
- /* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(We, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Jt, { size: 22 }) }) }),
980
- /* @__PURE__ */ a.jsxs(
981
- Ye,
982
- {
983
- className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
984
- "aria-describedby": void 0,
985
- children: [
986
- /* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Navigation" }) }),
987
- /* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(tt, {}) }),
988
- /* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
989
- G,
990
- {
991
- className: ({ isActive: s }) => Ue(
992
- "block font-medium border-b-2",
993
- s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
994
- ),
995
- to: r.id,
996
- children: /* @__PURE__ */ a.jsx(pr, { children: r.label })
997
- }
998
- ) }, r.label)) })
999
- ]
1000
- }
1001
- )
1002
- ] });
1003
- }, at = ({ item: t }) => t.children ? /* @__PURE__ */ a.jsxs(ur, { children: [
1004
- /* @__PURE__ */ a.jsx(dr, { children: t.label }),
1005
- /* @__PURE__ */ a.jsx(hr, { children: /* @__PURE__ */ a.jsx(fr, { children: t.children.map((e, r) => (
1006
- // eslint-disable-next-line react/no-array-index-key
1007
- /* @__PURE__ */ a.jsx(at, { item: e }, r)
1008
- )) }) })
1009
- ] }, t.label) : /* @__PURE__ */ a.jsx(te, { to: t.path ?? "", children: /* @__PURE__ */ a.jsx(gr, { children: t.label }, t.label) }), st = He(function() {
1010
- const e = ee(), [r, s] = Ut(), { isAuthenticated: n, profile: i, isAuthEnabled: o } = ee(), u = F(), { page: c, plugins: m } = u, j = m.filter((p) => qr(p)).flatMap((p) => p.getProfileMenuItems(u)).map((p) => /* @__PURE__ */ a.jsx(at, { item: p }, p.label)), N = r ? Gt : er;
1011
- return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
1012
- /* @__PURE__ */ a.jsx(Jr, {}),
1013
- /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
1014
- /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
1015
- /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(te, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
1016
- (c == null ? void 0 : c.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1017
- /* @__PURE__ */ a.jsx(
1018
- "img",
1019
- {
1020
- src: /https?:\/\//.test(c.logo.src.light) ? c.logo.src.light : B(
1021
- "/",
1022
- c.logo.src.light
1023
- ),
1024
- alt: c.logo.alt ?? c.pageTitle,
1025
- style: { width: c.logo.width },
1026
- className: A("h-10", r && "hidden"),
1027
- loading: "lazy"
1028
- }
1029
- ),
1030
- /* @__PURE__ */ a.jsx(
1031
- "img",
1032
- {
1033
- src: /https?:\/\//.test(c.logo.src.dark) ? c.logo.src.dark : B(
1034
- "/",
1035
- c.logo.src.dark
1036
- ),
1037
- alt: c.logo.alt ?? c.pageTitle,
1038
- style: { width: c.logo.width },
1039
- className: A("h-10", !r && "hidden"),
1040
- loading: "lazy"
1041
- }
1042
- )
1043
- ] }),
1044
- /* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: c == null ? void 0 : c.pageTitle })
1045
- ] }) }) }),
1046
- /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
1047
- /* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(tt, {}) }),
1048
- /* @__PURE__ */ a.jsx(ta, {}),
1049
- /* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
1050
- /* @__PURE__ */ a.jsx(k, { name: "head-navigation-start" }),
1051
- o && !n ? /* @__PURE__ */ a.jsx(ae, { variant: "ghost", onClick: () => e.login(), children: "Login" }) : j.length > 0 && /* @__PURE__ */ a.jsxs(nr, { modal: !1, children: [
1052
- /* @__PURE__ */ a.jsx(ir, { asChild: !0, children: /* @__PURE__ */ a.jsx(ae, { variant: "ghost", children: i != null && i.email ? `${i.email}` : "My Account" }) }),
1053
- /* @__PURE__ */ a.jsxs(or, { className: "w-56", children: [
1054
- /* @__PURE__ */ a.jsx(lr, { children: "My Account" }),
1055
- /* @__PURE__ */ a.jsx(cr, {}),
1056
- j
1057
- ] })
1058
- ] }),
1059
- /* @__PURE__ */ a.jsx(
1060
- ae,
1061
- {
1062
- variant: "ghost",
1063
- "aria-label": r ? "Switch to light mode" : "Switch to dark mode",
1064
- className: "p-2.5 -m-2.5 rounded-full",
1065
- onClick: s,
1066
- children: /* @__PURE__ */ a.jsx(N, { size: 18 })
1067
- }
1068
- ),
1069
- /* @__PURE__ */ a.jsx(k, { name: "head-navigation-end" })
1070
- ] })
1071
- ] })
1072
- ] }),
1073
- /* @__PURE__ */ a.jsx(k, { name: "top-navigation-before" }),
1074
- /* @__PURE__ */ a.jsx(Gr, {}),
1075
- /* @__PURE__ */ a.jsx(k, { name: "top-navigation-after" })
1076
- ] })
1077
- ] });
1078
- }), nt = {
1079
- Header: st
1080
- }, ra = Be(nt), aa = ra.Provider, sa = (t) => {
1081
- const [e, r] = Q(!1);
1082
- _(() => {
1083
- const i = localStorage.getItem("theme"), o = window.matchMedia("(prefers-color-scheme: dark)"), u = i === "dark" || !i && o.matches;
1084
- r(u);
1085
- }, [e]);
1086
- const s = Le(() => {
1087
- const i = !e;
1088
- document.documentElement.classList.toggle("dark", i), localStorage.setItem("theme", i ? "dark" : "light"), r(i);
1089
- }, [e]), n = [e, s];
1090
- return /* @__PURE__ */ a.jsx(Vt.Provider, { value: n, ...t });
1091
- }, na = ({
1092
- children: t,
1093
- context: e
1094
- }) => (Ht({
1095
- queryFn: async () => (await e.initialize(), !0),
1096
- queryKey: ["zudoku-initialize"]
1097
- }), /* @__PURE__ */ a.jsx(zt.Provider, { value: e, children: t })), ia = ({
1098
- children: t,
1099
- ...e
1100
- }) => {
1101
- var N, p;
1102
- const r = re(
1103
- () => ({ ...nt, ...e.overrides }),
1104
- [e.overrides]
1105
- ), s = re(() => {
1106
- var h;
1107
- return {
1108
- ...(e.plugins ?? []).filter(Wr).flatMap(
1109
- (f) => f.getMdxComponents ? [f.getMdxComponents()] : []
1110
- ).reduce((f, L) => ({ ...f, ...L }), {}),
1111
- ...Wt,
1112
- ...(h = e.mdx) == null ? void 0 : h.components
855
+ ) }) }) }) }) });
856
+ }, Yr = ({
857
+ router: e,
858
+ context: t,
859
+ queryClient: r,
860
+ helmetContext: s
861
+ }) => /* @__PURE__ */ a.jsx(Ze, { children: /* @__PURE__ */ a.jsx($e, { client: r, children: /* @__PURE__ */ a.jsx(Be, { context: s, children: /* @__PURE__ */ a.jsx(Vr, { router: e, context: t }) }) }) });
862
+ var ue = { exports: {} };
863
+ (function(e, t) {
864
+ (function(r, s) {
865
+ s(t, Ve);
866
+ })(Yt, function(r, s) {
867
+ const n = {
868
+ delay: 500,
869
+ minDuration: 200,
870
+ ssr: !0
1113
871
  };
1114
- }, [(N = e.mdx) == null ? void 0 : N.components, e.plugins]), { stagger: n } = kt(oe), [i, o] = Q(!1), u = re(
1115
- () => i ? { stagger: !0 } : { stagger: n },
1116
- [n, i]
1117
- ), c = xt();
1118
- _(() => {
1119
- i || o(!0);
1120
- }, [i, c.location]);
1121
- const [m] = Q(() => new Xr(e)), j = (p = e.plugins) == null ? void 0 : p.filter(Vr).map((P, h) => {
1122
- var f;
1123
- return /* @__PURE__ */ a.jsx(At, { children: (f = P.getHead) == null ? void 0 : f.call(P) }, h);
872
+ function o() {
873
+ const [c, u] = s.useState(!0);
874
+ return s.useEffect(() => {
875
+ u(!1);
876
+ }, []), c;
877
+ }
878
+ function i(c, u) {
879
+ u = Object.assign({}, n, u);
880
+ const d = o() && u.ssr, p = d && c ? "DISPLAY" : "IDLE", [f, h] = s.useState(p), g = s.useRef(null);
881
+ return s.useEffect(() => {
882
+ if (c && (f === "IDLE" || d)) {
883
+ clearTimeout(g.current);
884
+ const v = d ? 0 : u.delay;
885
+ g.current = setTimeout(() => {
886
+ if (!c)
887
+ return h("IDLE");
888
+ g.current = setTimeout(() => {
889
+ h("EXPIRE");
890
+ }, u.minDuration), h("DISPLAY");
891
+ }, v), d || h("DELAY");
892
+ }
893
+ !c && f !== "DISPLAY" && (clearTimeout(g.current), h("IDLE"));
894
+ }, [c, f, u.delay, u.minDuration, d]), s.useEffect(() => () => clearTimeout(g.current), []), f === "DISPLAY" || f === "EXPIRE";
895
+ }
896
+ r.defaultOptions = n, r.useSpinDelay = i;
1124
897
  });
1125
- return /* @__PURE__ */ a.jsxs(qt, { client: et, children: [
1126
- /* @__PURE__ */ a.jsx(ce, { children: j }),
1127
- /* @__PURE__ */ a.jsx(oe.Provider, { value: u, children: /* @__PURE__ */ a.jsx(na, { context: m, children: /* @__PURE__ */ a.jsx(ht, { components: s, children: /* @__PURE__ */ a.jsx(sa, { children: /* @__PURE__ */ a.jsx(aa, { value: r, children: /* @__PURE__ */ a.jsx(wt, { slotlets: e.slotlets, children: /* @__PURE__ */ a.jsx(Yt, { children: t ?? /* @__PURE__ */ a.jsx(_e, {}) }) }) }) }) }) }) })
1128
- ] });
1129
- }, oa = He(ia), pe = (t) => /* @__PURE__ */ a.jsx(Hr, { FallbackComponent: Zr, children: /* @__PURE__ */ a.jsx(oa, { ...t }) });
1130
- pe.displayName = "DevPortal";
1131
- const la = ({
1132
- category: t,
1133
- level: e
898
+ })(ue, ue.exports);
899
+ var Wr = ue.exports;
900
+ const Xr = ({
901
+ category: e,
902
+ level: t
1134
903
  }) => {
1135
- var p, P;
1136
- const r = Kt(t), [s, n] = Q(!1), i = t.collapsible ?? !0, o = t.collapsed ?? !0, u = !!(!i || !o || r), [c, m] = Q(u), j = bt(((p = t.link) == null ? void 0 : p.id) ?? "");
1137
- _(() => {
1138
- r && m(!0);
904
+ var h, g;
905
+ const r = qt(e), [s, n] = F(!1), o = e.collapsible ?? !0, i = e.collapsed ?? !0, c = !!(!o || !i || r), [u, d] = F(c), p = Jt(((h = e.link) == null ? void 0 : h.id) ?? "");
906
+ L(() => {
907
+ r && d(!0);
1139
908
  }, [r]);
1140
- const N = i && /* @__PURE__ */ a.jsx(
909
+ const f = o && /* @__PURE__ */ a.jsx(
1141
910
  "button",
1142
911
  {
1143
912
  type: "button",
1144
- onClick: (h) => {
1145
- h.preventDefault(), m((f) => !f), n(!0);
913
+ onClick: (v) => {
914
+ v.preventDefault(), d((m) => !m), n(!0);
1146
915
  },
1147
916
  children: /* @__PURE__ */ a.jsx(
1148
- tr,
917
+ Gt,
1149
918
  {
1150
919
  size: 16,
1151
- className: A(
920
+ className: R(
1152
921
  s && "transition",
1153
922
  "shrink-0 group-data-[state=open]:rotate-90"
1154
923
  )
@@ -1157,86 +926,86 @@ const la = ({
1157
926
  }
1158
927
  );
1159
928
  return /* @__PURE__ */ a.jsxs(
1160
- ne.Root,
929
+ ie.Root,
1161
930
  {
1162
931
  className: "flex flex-col",
1163
- defaultOpen: u,
1164
- open: c,
1165
- onOpenChange: () => m(!0),
932
+ defaultOpen: c,
933
+ open: u,
934
+ onOpenChange: () => d(!0),
1166
935
  children: [
1167
- /* @__PURE__ */ a.jsx(ne.Trigger, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
936
+ /* @__PURE__ */ a.jsx(ie.Trigger, { className: "group", asChild: !0, disabled: !o, children: /* @__PURE__ */ a.jsxs(
1168
937
  "div",
1169
938
  {
1170
939
  onClick: () => n(!0),
1171
- className: U({
940
+ className: V({
1172
941
  isActive: !1,
1173
- isTopLevel: e === 0,
942
+ isTopLevel: t === 0,
1174
943
  className: [
1175
944
  "text-start",
1176
- i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
945
+ o ? "cursor-pointer" : "cursor-default hover:bg-transparent"
1177
946
  ]
1178
947
  }),
1179
948
  children: [
1180
- t.icon && /* @__PURE__ */ a.jsx(
1181
- t.icon,
949
+ e.icon && /* @__PURE__ */ a.jsx(
950
+ e.icon,
1182
951
  {
1183
952
  size: 16,
1184
- className: A(
953
+ className: R(
1185
954
  "align-[-0.125em] -translate-x-1",
1186
- j && "text-primary"
955
+ p && "text-primary"
1187
956
  )
1188
957
  }
1189
958
  ),
1190
- ((P = t.link) == null ? void 0 : P.type) === "doc" ? /* @__PURE__ */ a.jsx(
1191
- G,
959
+ ((g = e.link) == null ? void 0 : g.type) === "doc" ? /* @__PURE__ */ a.jsx(
960
+ re,
1192
961
  {
1193
- to: B(t.link.id),
962
+ to: q(e.link.id),
1194
963
  className: "flex-1",
1195
964
  onClick: () => {
1196
- j && !c && m(!0);
965
+ p && !u && d(!0);
1197
966
  },
1198
967
  children: /* @__PURE__ */ a.jsxs(
1199
968
  "div",
1200
969
  {
1201
- className: A(
970
+ className: R(
1202
971
  "flex items-center gap-2 justify-between w-full",
1203
- j ? "text-primary" : "text-foreground/80"
972
+ p ? "text-primary" : "text-foreground/80"
1204
973
  ),
1205
974
  children: [
1206
- /* @__PURE__ */ a.jsx("div", { className: "truncate", children: t.label }),
1207
- N
975
+ /* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
976
+ f
1208
977
  ]
1209
978
  }
1210
979
  )
1211
980
  }
1212
981
  ) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
1213
- /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: t.label }),
1214
- N
982
+ /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
983
+ f
1215
984
  ] })
1216
985
  ]
1217
986
  }
1218
987
  ) }),
1219
988
  /* @__PURE__ */ a.jsx(
1220
- ne.Content,
989
+ ie.Content,
1221
990
  {
1222
- className: A(
991
+ className: R(
1223
992
  // CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
1224
993
  s && "CollapsibleContent"
1225
994
  ),
1226
- children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: t.items.map((h) => /* @__PURE__ */ a.jsx(
1227
- le,
995
+ children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: e.items.map((v) => /* @__PURE__ */ a.jsx(
996
+ de,
1228
997
  {
1229
- level: e + 1,
1230
- item: h
998
+ level: t + 1,
999
+ item: v
1231
1000
  },
1232
- ("id" in h ? h.id : "") + ("href" in h ? h.href : "") + h.label
1001
+ ("id" in v ? v.id : "") + ("href" in v ? v.href : "") + v.label
1233
1002
  )) })
1234
1003
  }
1235
1004
  )
1236
1005
  ]
1237
1006
  }
1238
1007
  );
1239
- }, U = mr(
1008
+ }, V = cr(
1240
1009
  "flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
1241
1010
  {
1242
1011
  variants: {
@@ -1257,212 +1026,606 @@ const la = ({
1257
1026
  isActive: !1
1258
1027
  }
1259
1028
  }
1260
- ), it = "data-anchor", le = ({
1261
- item: t,
1262
- level: e = 0
1029
+ ), it = "data-anchor", de = ({
1030
+ item: e,
1031
+ level: t = 0
1263
1032
  }) => {
1264
- var n, i;
1265
- const { activeAnchor: r } = ge(), [s] = yt();
1266
- switch (t.type) {
1033
+ var n, o;
1034
+ const { activeAnchor: r } = be(), [s] = Et();
1035
+ switch (e.type) {
1267
1036
  case "category":
1268
- return /* @__PURE__ */ a.jsx(la, { category: t, level: e });
1037
+ return /* @__PURE__ */ a.jsx(Xr, { category: e, level: t });
1269
1038
  case "doc":
1270
1039
  return /* @__PURE__ */ a.jsxs(
1271
- G,
1040
+ re,
1272
1041
  {
1273
- className: ({ isActive: o }) => U({ isActive: o, isTopLevel: e === 0 }),
1274
- to: B(t.id),
1042
+ className: ({ isActive: i }) => V({ isActive: i, isTopLevel: t === 0 }),
1043
+ to: q(e.id),
1275
1044
  children: [
1276
- t.icon && /* @__PURE__ */ a.jsx(t.icon, { size: 16, className: "align-[-0.125em]" }),
1277
- t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1278
- /* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: t.label, children: t.label }),
1279
- /* @__PURE__ */ a.jsx(se, { ...t.badge })
1280
- ] }) : t.label
1045
+ e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
1046
+ e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1047
+ /* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: e.label, children: e.label }),
1048
+ /* @__PURE__ */ a.jsx(ne, { ...e.badge })
1049
+ ] }) : e.label
1281
1050
  ]
1282
1051
  }
1283
1052
  );
1284
1053
  case "link":
1285
- return t.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
1286
- ft,
1054
+ return e.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
1055
+ bt,
1287
1056
  {
1288
- to: { hash: t.href, search: s.toString() },
1289
- [it]: t.href.slice(1),
1290
- className: U({
1291
- isActive: t.href.slice(1) === r,
1292
- isTopLevel: e === 0,
1293
- className: ((n = t.badge) == null ? void 0 : n.placement) !== "start" && "justify-between"
1057
+ to: { hash: e.href, search: s.toString() },
1058
+ [it]: e.href.slice(1),
1059
+ className: V({
1060
+ isActive: e.href.slice(1) === r,
1061
+ isTopLevel: t === 0,
1062
+ className: ((n = e.badge) == null ? void 0 : n.placement) !== "start" && "justify-between"
1294
1063
  }),
1295
- children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1296
- /* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
1297
- /* @__PURE__ */ a.jsx(se, { ...t.badge })
1298
- ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
1064
+ children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1065
+ /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
1066
+ /* @__PURE__ */ a.jsx(ne, { ...e.badge })
1067
+ ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
1299
1068
  }
1300
- ) : t.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
1069
+ ) : e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
1301
1070
  "a",
1302
1071
  {
1303
- className: U({ isTopLevel: e === 0 }),
1304
- href: t.href,
1072
+ className: V({ isTopLevel: t === 0 }),
1073
+ href: e.href,
1305
1074
  target: "_blank",
1306
1075
  rel: "noopener noreferrer",
1307
1076
  children: [
1308
- /* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: t.label }),
1309
- /* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(rr, { className: "inline -translate-y-0.5", size: 12 }) })
1077
+ /* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
1078
+ /* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(er, { className: "inline -translate-y-0.5", size: 12 }) })
1310
1079
  ]
1311
1080
  }
1312
1081
  ) : /* @__PURE__ */ a.jsx(
1313
- G,
1082
+ re,
1314
1083
  {
1315
- className: U({
1316
- className: ((i = t.badge) == null ? void 0 : i.placement) !== "start" && "justify-between"
1084
+ className: V({
1085
+ className: ((o = e.badge) == null ? void 0 : o.placement) !== "start" && "justify-between"
1317
1086
  }),
1318
- to: t.href,
1319
- children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1320
- /* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
1321
- /* @__PURE__ */ a.jsx(se, { ...t.badge })
1322
- ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
1087
+ to: e.href,
1088
+ children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1089
+ /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
1090
+ /* @__PURE__ */ a.jsx(ne, { ...e.badge })
1091
+ ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
1323
1092
  }
1324
1093
  );
1325
1094
  }
1326
- }, ca = (t, e = { block: "center" }) => {
1327
- if (!t) return;
1328
- const r = t.getBoundingClientRect();
1329
- r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || t.scrollIntoView(e);
1330
- }, ua = () => {
1331
- const t = ue(), { setActiveAnchor: e } = ge();
1332
- _(() => {
1333
- if (!t.hash) return;
1334
- const r = decodeURIComponent(t.hash.split("/")[0].slice(1)), s = () => {
1335
- const n = document.getElementById(r), i = document.querySelector(`[${it}="${r}"]`);
1336
- return n ? (n.scrollIntoView(), ca(i), requestIdleCallback(() => e(r)), !0) : !1;
1095
+ }, Jr = (e, t = { block: "center" }) => {
1096
+ if (!e) return;
1097
+ const r = e.getBoundingClientRect();
1098
+ r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
1099
+ }, Gr = () => {
1100
+ const e = ve(), { setActiveAnchor: t } = be();
1101
+ L(() => {
1102
+ if (!e.hash) return;
1103
+ const r = decodeURIComponent(e.hash.split("/")[0].slice(1)), s = () => {
1104
+ const n = document.getElementById(r), o = document.querySelector(`[${it}="${r}"]`);
1105
+ return n ? (n.scrollIntoView(), Jr(o), requestIdleCallback(() => t(r)), !0) : !1;
1337
1106
  };
1338
1107
  if (!s()) {
1339
- const n = new MutationObserver((i, o) => {
1340
- s() && o.disconnect();
1108
+ const n = new MutationObserver((o, i) => {
1109
+ s() && i.disconnect();
1341
1110
  });
1342
1111
  return n.observe(document.body, { childList: !0, subtree: !0 }), () => n.disconnect();
1343
1112
  }
1344
- }, [t.hash, e]);
1113
+ }, [e.hash, t]);
1114
+ }, ea = () => {
1115
+ const e = ve(), t = me(e.pathname);
1116
+ L(() => {
1117
+ t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
1118
+ }, [e.pathname]);
1119
+ };
1120
+ function ta({
1121
+ className: e,
1122
+ ...t
1123
+ }) {
1124
+ return /* @__PURE__ */ a.jsx(
1125
+ "div",
1126
+ {
1127
+ className: R("animate-pulse rounded-md bg-muted", e),
1128
+ ...t
1129
+ }
1130
+ );
1131
+ }
1132
+ const ra = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", aa = (e) => "getRoutes" in e && typeof e.getRoutes == "function", sa = (e) => "renderSearch" in e && typeof e.renderSearch == "function", na = (e) => "initialize" in e && typeof e.initialize == "function", ia = (e) => "getHead" in e && typeof e.getHead == "function", oa = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", la = (e) => "getIdentities" in e && typeof e.getIdentities == "function", _e = {
1133
+ info: "bg-blue-500",
1134
+ note: "bg-gray-500",
1135
+ tip: "bg-green-600",
1136
+ caution: "bg-orange-500",
1137
+ danger: "bg-rose-500"
1138
+ }, ca = () => {
1139
+ const { page: e } = Q(), [t, r] = F(!0);
1140
+ if (!(e != null && e.banner) || !t)
1141
+ return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
1142
+ const s = e.banner.color && e.banner.color in _e ? _e[e.banner.color] : e.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: e.banner.color };
1143
+ return /* @__PURE__ */ a.jsxs(
1144
+ "div",
1145
+ {
1146
+ className: R(
1147
+ "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
1148
+ s
1149
+ ),
1150
+ style: n,
1151
+ children: [
1152
+ /* @__PURE__ */ a.jsx("div", { className: "w-full", children: e.banner.message }),
1153
+ e.banner.dismissible && /* @__PURE__ */ a.jsx(
1154
+ "button",
1155
+ {
1156
+ type: "button",
1157
+ className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
1158
+ onClick: () => r(!1),
1159
+ children: /* @__PURE__ */ a.jsx(tr, { size: 16 })
1160
+ }
1161
+ )
1162
+ ]
1163
+ }
1164
+ );
1165
+ }, ot = () => {
1166
+ const e = Q(), [t, r] = F(!1), s = Ut(() => r(!1), []);
1167
+ L(() => {
1168
+ if (t)
1169
+ return;
1170
+ function o(i) {
1171
+ i.key === "k" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), r(!0));
1172
+ }
1173
+ return window.addEventListener("keydown", o), () => {
1174
+ window.removeEventListener("keydown", o);
1175
+ };
1176
+ }, [t, r]);
1177
+ const n = e.plugins.find(sa);
1178
+ return n ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1179
+ /* @__PURE__ */ a.jsxs(
1180
+ "button",
1181
+ {
1182
+ type: "button",
1183
+ onClick: () => r(!0),
1184
+ 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",
1185
+ children: [
1186
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
1187
+ /* @__PURE__ */ a.jsx(rr, { size: 14 }),
1188
+ "Search"
1189
+ ] }),
1190
+ /* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
1191
+ ]
1192
+ }
1193
+ ),
1194
+ /* @__PURE__ */ a.jsx(ge, { fallback: null, children: n.renderSearch({
1195
+ isOpen: t,
1196
+ onClose: s
1197
+ }) })
1198
+ ] }) : null;
1199
+ }, lt = () => {
1200
+ const { resolvedTheme: e, setTheme: t } = jr(), r = e === "dark" ? ar : sr;
1201
+ return /* @__PURE__ */ a.jsx(ye, { children: /* @__PURE__ */ a.jsx(
1202
+ ce,
1203
+ {
1204
+ variant: "ghost",
1205
+ "aria-label": e === "dark" ? "Switch to light mode" : "Switch to dark mode",
1206
+ className: "p-2.5 -m-2.5 rounded-full",
1207
+ onClick: () => t(e === "dark" ? "light" : "dark"),
1208
+ children: /* @__PURE__ */ a.jsx(r, { size: 18 })
1209
+ }
1210
+ ) });
1211
+ }, ct = (e) => (t) => t.display === "auth" && e || t.display === "anon" && !e || !t.display || t.display === "always", ua = () => {
1212
+ const { topNavigation: e } = Q(), { isAuthenticated: t } = ae();
1213
+ return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx(ge, { children: /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.filter(ct(t)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(ut, { ...r }) }, r.id)) }) }) });
1214
+ }, ut = ({
1215
+ id: e,
1216
+ label: t,
1217
+ default: r
1218
+ }) => {
1219
+ var d;
1220
+ const { sidebars: s } = Q(), n = s[e], o = Ke(), i = !!xe().location, c = ((d = o.topNavItem) == null ? void 0 : d.id) === e && !i, u = r ?? (n ? Lt(n, (p) => {
1221
+ if (p.type === "doc") return q(p.id);
1222
+ }) : q(e));
1223
+ if (!u)
1224
+ throw new Sr("Page not found.", {
1225
+ developerHint: `No links found in top navigation for '${e}'. Check that the sidebar isn't empty or that a default link is set.`
1226
+ });
1227
+ return (
1228
+ // We don't use isActive here because it has to be inside the sidebar,
1229
+ // the top nav id doesn't necessarily start with the sidebar id
1230
+ /* @__PURE__ */ a.jsx(
1231
+ re,
1232
+ {
1233
+ className: ({ isPending: p }) => ur(
1234
+ "block lg:py-3.5 font-medium -mb-px border-b-2",
1235
+ c || p ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
1236
+ ),
1237
+ to: u,
1238
+ children: t
1239
+ }
1240
+ )
1241
+ );
1345
1242
  }, da = () => {
1346
- const t = ue(), e = he(t.pathname);
1347
- _(() => {
1348
- e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
1349
- }, [t.pathname]);
1350
- }, ot = Mt(({ children: t, className: e, pushMainContent: r }, s) => /* @__PURE__ */ a.jsx(
1243
+ const { topNavigation: e } = Q(), { isAuthenticated: t } = ae(), [r, s] = F(!1);
1244
+ return /* @__PURE__ */ a.jsxs(
1245
+ Je,
1246
+ {
1247
+ direction: "right",
1248
+ open: r,
1249
+ onOpenChange: (n) => s(n),
1250
+ children: [
1251
+ /* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(Ge, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(nr, { size: 22 }) }) }),
1252
+ /* @__PURE__ */ a.jsxs(
1253
+ et,
1254
+ {
1255
+ className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
1256
+ "aria-describedby": void 0,
1257
+ children: [
1258
+ /* @__PURE__ */ a.jsx(rt, { children: /* @__PURE__ */ a.jsx(tt, { children: "Navigation" }) }),
1259
+ /* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(ot, {}) }),
1260
+ /* @__PURE__ */ a.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
1261
+ /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(lt, {}) }),
1262
+ e.filter(ct(t)).map((n) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx("button", { onClick: () => s(!1), children: /* @__PURE__ */ a.jsx(ut, { ...n }) }) }, n.label))
1263
+ ] })
1264
+ ]
1265
+ }
1266
+ )
1267
+ ]
1268
+ }
1269
+ );
1270
+ }, dt = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(pr, { children: [
1271
+ /* @__PURE__ */ a.jsx(vr, { children: e.label }),
1272
+ /* @__PURE__ */ a.jsx(xr, { children: /* @__PURE__ */ a.jsx(yr, { children: e.children.map((t, r) => (
1273
+ // eslint-disable-next-line react/no-array-index-key
1274
+ /* @__PURE__ */ a.jsx(dt, { item: t }, r)
1275
+ )) }) })
1276
+ ] }, e.label) : /* @__PURE__ */ a.jsx(fe, { to: e.path ?? "", children: /* @__PURE__ */ a.jsx(br, { children: e.label }, e.label) }), ht = Ye(function() {
1277
+ const t = ae(), { isAuthenticated: r, profile: s, isAuthEnabled: n } = ae(), o = Q(), { page: i, plugins: c } = o, u = c.filter((d) => ra(d)).flatMap((d) => d.getProfileMenuItems(o)).map((d) => /* @__PURE__ */ a.jsx(dt, { item: d }, d.label));
1278
+ return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
1279
+ /* @__PURE__ */ a.jsx(ca, {}),
1280
+ /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
1281
+ /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
1282
+ /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(fe, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
1283
+ (i == null ? void 0 : i.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1284
+ /* @__PURE__ */ a.jsx(
1285
+ "img",
1286
+ {
1287
+ src: /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : q(
1288
+ "/",
1289
+ i.logo.src.light
1290
+ ),
1291
+ alt: i.logo.alt ?? i.pageTitle,
1292
+ style: { width: i.logo.width },
1293
+ className: "h-10 dark:hidden",
1294
+ loading: "lazy"
1295
+ }
1296
+ ),
1297
+ /* @__PURE__ */ a.jsx(
1298
+ "img",
1299
+ {
1300
+ "data-hide-on-theme": "light",
1301
+ src: /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : q(
1302
+ "/",
1303
+ i.logo.src.dark
1304
+ ),
1305
+ alt: i.logo.alt ?? i.pageTitle,
1306
+ style: { width: i.logo.width },
1307
+ className: "h-10",
1308
+ loading: "lazy"
1309
+ }
1310
+ )
1311
+ ] }),
1312
+ /* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: i == null ? void 0 : i.pageTitle })
1313
+ ] }) }) }),
1314
+ /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
1315
+ /* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(ot, {}) }),
1316
+ /* @__PURE__ */ a.jsx(da, {}),
1317
+ /* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
1318
+ /* @__PURE__ */ a.jsx(D, { name: "head-navigation-start" }),
1319
+ n && /* @__PURE__ */ a.jsx(
1320
+ ye,
1321
+ {
1322
+ fallback: /* @__PURE__ */ a.jsx(ta, { className: "rounded h-5 w-24 mr-4" }),
1323
+ children: r ? u.length > 0 && /* @__PURE__ */ a.jsxs(dr, { modal: !1, children: [
1324
+ /* @__PURE__ */ a.jsx(hr, { asChild: !0, children: /* @__PURE__ */ a.jsx(ce, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
1325
+ /* @__PURE__ */ a.jsxs(fr, { className: "w-56", children: [
1326
+ /* @__PURE__ */ a.jsx(mr, { children: "My Account" }),
1327
+ /* @__PURE__ */ a.jsx(gr, {}),
1328
+ u
1329
+ ] })
1330
+ ] }) : /* @__PURE__ */ a.jsx(ce, { variant: "ghost", onClick: () => t.login(), children: "Login" })
1331
+ }
1332
+ ),
1333
+ /* @__PURE__ */ a.jsx(lt, {}),
1334
+ /* @__PURE__ */ a.jsx(D, { name: "head-navigation-end" })
1335
+ ] })
1336
+ ] })
1337
+ ] }),
1338
+ /* @__PURE__ */ a.jsx(D, { name: "top-navigation-before" }),
1339
+ /* @__PURE__ */ a.jsx(ua, {}),
1340
+ /* @__PURE__ */ a.jsx(D, { name: "top-navigation-after" })
1341
+ ] })
1342
+ ] });
1343
+ }), ft = $t(({ children: e, className: t, pushMainContent: r }, s) => /* @__PURE__ */ a.jsx(
1351
1344
  "nav",
1352
1345
  {
1353
1346
  "data-navigation": String(r),
1354
- className: A(
1347
+ className: R(
1355
1348
  "scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
1356
1349
  "px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
1357
1350
  "w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
1358
- e
1351
+ t
1359
1352
  ),
1360
1353
  ref: s,
1361
- children: t
1354
+ children: e
1362
1355
  }
1363
1356
  ));
1364
- ot.displayName = "SidebarWrapper";
1357
+ ft.displayName = "SidebarWrapper";
1365
1358
  const ha = () => {
1366
- const t = he(null), e = Ke();
1359
+ const e = me(null), t = Ke();
1367
1360
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1368
1361
  /* @__PURE__ */ a.jsxs(
1369
- ot,
1362
+ ft,
1370
1363
  {
1371
- ref: t,
1372
- pushMainContent: e.data.sidebar.length > 0,
1364
+ ref: e,
1365
+ pushMainContent: t.sidebar.length > 0,
1373
1366
  children: [
1374
- /* @__PURE__ */ a.jsx(k, { name: "zudoku-before-navigation" }),
1375
- e.data.sidebar.map((r) => /* @__PURE__ */ a.jsx(le, { item: r }, r.label)),
1376
- /* @__PURE__ */ a.jsx(k, { name: "zudoku-after-navigation" })
1367
+ /* @__PURE__ */ a.jsx(D, { name: "zudoku-before-navigation" }),
1368
+ t.sidebar.map((r) => /* @__PURE__ */ a.jsx(de, { item: r }, r.label)),
1369
+ /* @__PURE__ */ a.jsx(D, { name: "zudoku-after-navigation" })
1377
1370
  ]
1378
1371
  }
1379
1372
  ),
1380
1373
  /* @__PURE__ */ a.jsxs(
1381
- Ye,
1374
+ et,
1382
1375
  {
1383
1376
  className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none overflow-auto",
1384
1377
  "aria-describedby": void 0,
1385
1378
  children: [
1386
- /* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Sidebar" }) }),
1387
- e.data.sidebar.map((r) => /* @__PURE__ */ a.jsx(le, { item: r }, r.label))
1379
+ /* @__PURE__ */ a.jsx(rt, { children: /* @__PURE__ */ a.jsx(tt, { children: "Sidebar" }) }),
1380
+ t.sidebar.map((r) => /* @__PURE__ */ a.jsx(de, { item: r }, r.label))
1388
1381
  ]
1389
1382
  }
1390
1383
  )
1391
1384
  ] });
1392
- }, fa = ({ children: t }) => {
1393
- const e = ue(), { setActiveAnchor: r } = ge(), { meta: s, authentication: n } = F();
1394
- ua(), da();
1395
- const i = he(e.pathname);
1396
- return _(() => {
1397
- var o;
1398
- (o = n == null ? void 0 : n.pageLoad) == null || o.call(n);
1399
- }, [n]), _(() => {
1400
- e.pathname !== i.current && r(""), i.current = e.pathname;
1401
- }, [e.pathname, r]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1385
+ }, Fe = () => /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(Nr, {}) }), fa = ({ children: e }) => {
1386
+ const t = ve(), { setActiveAnchor: r } = be(), { meta: s, authentication: n } = Q();
1387
+ Gr(), ea();
1388
+ const o = me(t.pathname);
1389
+ L(() => {
1390
+ var u;
1391
+ (u = n == null ? void 0 : n.pageLoad) == null || u.call(n);
1392
+ }, [n]), L(() => {
1393
+ t.pathname !== o.current && r(""), o.current = t.pathname;
1394
+ }, [t.pathname, r]);
1395
+ const i = !!xe().location, c = Wr.useSpinDelay(i, {
1396
+ delay: 300,
1397
+ minDuration: 500
1398
+ });
1399
+ return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1402
1400
  !1,
1403
- /* @__PURE__ */ a.jsxs(ce, { titleTemplate: s == null ? void 0 : s.title, children: [
1401
+ /* @__PURE__ */ a.jsxs(he, { titleTemplate: s == null ? void 0 : s.title, children: [
1404
1402
  (s == null ? void 0 : s.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: s.description }),
1405
1403
  (s == null ? void 0 : s.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: s.favicon })
1406
1404
  ] }),
1407
- /* @__PURE__ */ a.jsx(k, { name: "layout-before-head" }),
1408
- /* @__PURE__ */ a.jsx(st, {}),
1409
- /* @__PURE__ */ a.jsx(k, { name: "layout-after-head" }),
1410
- /* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
1411
- de,
1412
- {
1413
- fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(sr, {}) }),
1414
- children: /* @__PURE__ */ a.jsxs(Ve, { direction: "left", children: [
1415
- /* @__PURE__ */ a.jsx(ha, {}),
1416
- /* @__PURE__ */ a.jsx(
1417
- "div",
1418
- {
1419
- className: A(
1420
- "lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
1421
- "peer-data-[navigation=false]:hidden"
1422
- ),
1423
- children: /* @__PURE__ */ a.jsxs(We, { className: "flex items-center gap-2", children: [
1424
- /* @__PURE__ */ a.jsx(ar, { size: 16, strokeWidth: 1.5 }),
1425
- /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
1426
- ] })
1427
- }
1405
+ /* @__PURE__ */ a.jsx(D, { name: "layout-before-head" }),
1406
+ /* @__PURE__ */ a.jsx(ht, {}),
1407
+ /* @__PURE__ */ a.jsx(D, { name: "layout-after-head" }),
1408
+ /* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: c ? /* @__PURE__ */ a.jsx(Fe, {}) : /* @__PURE__ */ a.jsx(ge, { fallback: /* @__PURE__ */ a.jsx(Fe, {}), children: /* @__PURE__ */ a.jsxs(Je, { direction: "left", children: [
1409
+ /* @__PURE__ */ a.jsx(ha, {}),
1410
+ /* @__PURE__ */ a.jsx(
1411
+ "div",
1412
+ {
1413
+ className: R(
1414
+ "lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
1415
+ "peer-data-[navigation=false]:hidden"
1428
1416
  ),
1429
- /* @__PURE__ */ a.jsxs(
1430
- "main",
1431
- {
1432
- className: A(
1433
- "h-full dark:border-white/10 translate-x-0",
1434
- "lg:overflow-visible",
1435
- // This works in tandem with the `SidebarWrapper` component
1436
- "lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
1437
- "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
1438
- ),
1439
- children: [
1440
- /* @__PURE__ */ a.jsx(k, { name: "zudoku-before-content" }),
1441
- t ?? /* @__PURE__ */ a.jsx(_e, {}),
1442
- /* @__PURE__ */ a.jsx(k, { name: "zudoku-after-content" })
1443
- ]
1444
- }
1445
- )
1446
- ] })
1447
- }
1448
- ) })
1417
+ children: /* @__PURE__ */ a.jsxs(Ge, { className: "flex items-center gap-2", children: [
1418
+ /* @__PURE__ */ a.jsx(ir, { size: 16, strokeWidth: 1.5 }),
1419
+ /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
1420
+ ] })
1421
+ }
1422
+ ),
1423
+ /* @__PURE__ */ a.jsxs(
1424
+ "main",
1425
+ {
1426
+ className: R(
1427
+ "h-full dark:border-white/10 translate-x-0",
1428
+ "lg:overflow-visible",
1429
+ // This works in tandem with the `SidebarWrapper` component
1430
+ "lg:peer-data-[navigation=true]:w-[calc(100%-var(--side-nav-width))]",
1431
+ "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
1432
+ ),
1433
+ children: [
1434
+ /* @__PURE__ */ a.jsx(D, { name: "zudoku-before-content" }),
1435
+ e ?? /* @__PURE__ */ a.jsx(Xe, {}),
1436
+ /* @__PURE__ */ a.jsx(D, { name: "zudoku-after-content" })
1437
+ ]
1438
+ }
1439
+ )
1440
+ ] }) }) })
1449
1441
  ] });
1450
- }, Qa = gt, Ba = pe, La = fa, Ha = Nt, za = vr, qa = Ir, Ka = Tr, $a = ce, Ua = F, Va = jt, Wa = pe, Ya = St, Xa = Ot, Za = Pt, Ja = te;
1442
+ }, ma = We(null), oe = {
1443
+ didCatch: !1,
1444
+ error: null
1445
+ };
1446
+ class ga extends Kt {
1447
+ constructor(t) {
1448
+ super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = oe;
1449
+ }
1450
+ static getDerivedStateFromError(t) {
1451
+ return {
1452
+ didCatch: !0,
1453
+ error: t
1454
+ };
1455
+ }
1456
+ resetErrorBoundary() {
1457
+ const {
1458
+ error: t
1459
+ } = this.state;
1460
+ if (t !== null) {
1461
+ for (var r, s, n = arguments.length, o = new Array(n), i = 0; i < n; i++)
1462
+ o[i] = arguments[i];
1463
+ (r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
1464
+ args: o,
1465
+ reason: "imperative-api"
1466
+ }), this.setState(oe);
1467
+ }
1468
+ }
1469
+ componentDidCatch(t, r) {
1470
+ var s, n;
1471
+ (s = (n = this.props).onError) === null || s === void 0 || s.call(n, t, r);
1472
+ }
1473
+ componentDidUpdate(t, r) {
1474
+ const {
1475
+ didCatch: s
1476
+ } = this.state, {
1477
+ resetKeys: n
1478
+ } = this.props;
1479
+ if (s && r.error !== null && pa(t.resetKeys, n)) {
1480
+ var o, i;
1481
+ (o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
1482
+ next: n,
1483
+ prev: t.resetKeys,
1484
+ reason: "keys"
1485
+ }), this.setState(oe);
1486
+ }
1487
+ }
1488
+ render() {
1489
+ const {
1490
+ children: t,
1491
+ fallbackRender: r,
1492
+ FallbackComponent: s,
1493
+ fallback: n
1494
+ } = this.props, {
1495
+ didCatch: o,
1496
+ error: i
1497
+ } = this.state;
1498
+ let c = t;
1499
+ if (o) {
1500
+ const u = {
1501
+ error: i,
1502
+ resetErrorBoundary: this.resetErrorBoundary
1503
+ };
1504
+ if (typeof r == "function")
1505
+ c = r(u);
1506
+ else if (s)
1507
+ c = Me(s, u);
1508
+ else if (n !== void 0)
1509
+ c = n;
1510
+ else
1511
+ throw i;
1512
+ }
1513
+ return Me(ma.Provider, {
1514
+ value: {
1515
+ didCatch: o,
1516
+ error: i,
1517
+ resetErrorBoundary: this.resetErrorBoundary
1518
+ }
1519
+ }, c);
1520
+ }
1521
+ }
1522
+ function pa() {
1523
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
1524
+ return e.length !== t.length || e.some((r, s) => !Object.is(r, t[s]));
1525
+ }
1526
+ class va {
1527
+ constructor(t) {
1528
+ S(this, "plugins");
1529
+ S(this, "sidebars");
1530
+ S(this, "topNavigation");
1531
+ S(this, "meta");
1532
+ S(this, "page");
1533
+ S(this, "authentication");
1534
+ S(this, "navigationPlugins");
1535
+ S(this, "initialize", async () => {
1536
+ await Promise.all(
1537
+ this.plugins.filter(na).map((t) => {
1538
+ var r;
1539
+ return (r = t.initialize) == null ? void 0 : r.call(t, this);
1540
+ })
1541
+ );
1542
+ });
1543
+ S(this, "getApiIdentities", async () => (await Promise.all(
1544
+ this.plugins.filter(la).map((r) => r.getIdentities(this))
1545
+ )).flat());
1546
+ S(this, "getPluginSidebar", async (t) => (await Promise.all(
1547
+ this.navigationPlugins.map(
1548
+ (s) => {
1549
+ var n;
1550
+ return (n = s.getSidebar) == null ? void 0 : n.call(s, q(t));
1551
+ }
1552
+ )
1553
+ )).flatMap((s) => s ?? []));
1554
+ S(this, "signRequest", async (t) => {
1555
+ if (!this.authentication)
1556
+ throw new Error("No authentication provider configured");
1557
+ const r = await this.authentication.getAccessToken();
1558
+ return t.headers.set("Authorization", `Bearer ${r}`), t;
1559
+ });
1560
+ this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(aa), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
1561
+ }
1562
+ }
1563
+ function xa({ error: e, resetErrorBoundary: t }) {
1564
+ return /* @__PURE__ */ a.jsx(ze, { error: e });
1565
+ }
1566
+ const te = globalThis;
1567
+ (!te.requestIdleCallback || !te.cancelIdleCallback) && (te.requestIdleCallback = (e) => setTimeout(e, 1), te.cancelIdleCallback = clearTimeout);
1568
+ const mt = {
1569
+ Header: ht
1570
+ }, ya = We(mt), ba = ya.Provider, ja = ({
1571
+ children: e,
1572
+ context: t
1573
+ }) => (Bt({
1574
+ queryFn: async () => (await t.initialize(), !0),
1575
+ queryKey: ["zudoku-initialize"]
1576
+ }), /* @__PURE__ */ a.jsx(zt.Provider, { value: t, children: e })), gt = Ye(
1577
+ ({ children: e, ...t }) => {
1578
+ var f, h;
1579
+ const r = se(
1580
+ () => ({ ...mt, ...t.overrides }),
1581
+ [t.overrides]
1582
+ ), s = se(() => {
1583
+ var v;
1584
+ return {
1585
+ ...(t.plugins ?? []).filter(oa).flatMap(
1586
+ (m) => m.getMdxComponents ? [m.getMdxComponents()] : []
1587
+ ).reduce(
1588
+ (m, E) => ({ ...m, ...E }),
1589
+ {}
1590
+ ),
1591
+ ...or,
1592
+ ...(v = t.mdx) == null ? void 0 : v.components
1593
+ };
1594
+ }, [(f = t.mdx) == null ? void 0 : f.components, t.plugins]), { stagger: n } = Vt(le), [o, i] = F(!1), c = se(
1595
+ () => o ? { stagger: !0 } : { stagger: n },
1596
+ [n, o]
1597
+ ), u = xe();
1598
+ L(() => {
1599
+ o || i(!0);
1600
+ }, [o, u.location]);
1601
+ const [d] = F(() => new va(t)), p = (h = t.plugins) == null ? void 0 : h.filter(ia).map((g, v) => {
1602
+ var m;
1603
+ return /* @__PURE__ */ a.jsx(Zt, { children: (m = g.getHead) == null ? void 0 : m.call(g) }, v);
1604
+ });
1605
+ return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1606
+ /* @__PURE__ */ a.jsx(he, { children: p }),
1607
+ /* @__PURE__ */ a.jsx(le.Provider, { value: c, children: /* @__PURE__ */ a.jsx(ja, { context: d, children: /* @__PURE__ */ a.jsx(jt, { components: s, children: /* @__PURE__ */ a.jsx(wr, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ a.jsx(ba, { value: r, children: /* @__PURE__ */ a.jsx(Ct, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(lr, { children: e ?? /* @__PURE__ */ a.jsx(Xe, {}) }) }) }) }) }) }) })
1608
+ ] });
1609
+ }
1610
+ );
1611
+ gt.displayName = "ZudokoInner";
1612
+ const pt = (e) => /* @__PURE__ */ a.jsx(ga, { FallbackComponent: xa, children: /* @__PURE__ */ a.jsx(gt, { ...e }) });
1613
+ pt.displayName = "Zudoku";
1614
+ const Ya = wt, Wa = fa, Xa = kt, Ja = Er, Ga = Zr, es = Yr, ts = he, rs = Q, as = Pt, ss = pt, ns = Dt, is = ye, os = At, ls = fe;
1451
1615
  export {
1452
- qa as Bootstrap,
1453
- Ka as BootstrapStatic,
1454
- Za as Button,
1455
- Ya as Callout,
1456
- Xa as ClientOnly,
1457
- Ba as DevPortal,
1458
- $a as Head,
1459
- La as Layout,
1460
- Ja as Link,
1461
- Ha as RouterError,
1462
- za as ServerError,
1463
- Wa as Zudoku,
1464
- Va as useAuth,
1465
- Qa as useMDXComponents,
1466
- Ua as useZudoku
1616
+ Ga as Bootstrap,
1617
+ es as BootstrapStatic,
1618
+ os as Button,
1619
+ ns as Callout,
1620
+ is as ClientOnly,
1621
+ ts as Head,
1622
+ Wa as Layout,
1623
+ ls as Link,
1624
+ Xa as RouterError,
1625
+ Ja as ServerError,
1626
+ ss as Zudoku,
1627
+ as as useAuth,
1628
+ Ya as useMDXComponents,
1629
+ rs as useZudoku
1467
1630
  };
1468
1631
  //# sourceMappingURL=zudoku.components.js.map