zudoku 0.51.0 → 0.52.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 (312) hide show
  1. package/dist/config/validators/InputNavigationSchema.d.ts +152 -0
  2. package/dist/config/validators/icon-types.d.ts +1 -1
  3. package/dist/config/validators/icon-types.js +38 -0
  4. package/dist/config/validators/icon-types.js.map +1 -1
  5. package/dist/config/validators/validate.d.ts +10 -0
  6. package/dist/config/validators/validate.js +7 -0
  7. package/dist/config/validators/validate.js.map +1 -1
  8. package/dist/flat-config.d.ts +6 -1
  9. package/dist/lib/components/Autocomplete.js +1 -1
  10. package/dist/lib/components/Autocomplete.js.map +1 -1
  11. package/dist/lib/components/ErrorPage.js +2 -2
  12. package/dist/lib/components/ErrorPage.js.map +1 -1
  13. package/dist/lib/components/Markdown.d.ts +0 -1
  14. package/dist/lib/components/Markdown.js +2 -3
  15. package/dist/lib/components/Markdown.js.map +1 -1
  16. package/dist/lib/components/NotFoundPage.js +2 -2
  17. package/dist/lib/components/NotFoundPage.js.map +1 -1
  18. package/dist/lib/components/Pagination.js +1 -1
  19. package/dist/lib/components/Pagination.js.map +1 -1
  20. package/dist/lib/components/Typography.d.ts +5 -0
  21. package/dist/lib/components/Typography.js +8 -0
  22. package/dist/lib/components/Typography.js.map +1 -0
  23. package/dist/lib/components/index.d.ts +4 -0
  24. package/dist/lib/components/index.js +2 -0
  25. package/dist/lib/components/index.js.map +1 -1
  26. package/dist/lib/errors/ErrorAlert.js +2 -3
  27. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  28. package/dist/lib/hooks/useHotkey.d.ts +4 -0
  29. package/dist/lib/hooks/useHotkey.js +58 -0
  30. package/dist/lib/hooks/useHotkey.js.map +1 -0
  31. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +4 -8
  32. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  33. package/dist/lib/plugins/custom-pages/index.d.ts +1 -4
  34. package/dist/lib/plugins/custom-pages/index.js +1 -3
  35. package/dist/lib/plugins/custom-pages/index.js.map +1 -1
  36. package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -2
  37. package/dist/lib/plugins/markdown/MdxPage.js +22 -6
  38. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  39. package/dist/lib/plugins/markdown/index.d.ts +8 -1
  40. package/dist/lib/plugins/markdown/index.js +1 -1
  41. package/dist/lib/plugins/markdown/index.js.map +1 -1
  42. package/dist/lib/plugins/openapi/OperationList.js +2 -3
  43. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  44. package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
  45. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  46. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  47. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  48. package/dist/lib/plugins/openapi/SchemaList.js +2 -3
  49. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  50. package/dist/lib/plugins/openapi/playground/BodyPanel.js +14 -11
  51. package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
  52. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
  53. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
  54. package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
  55. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -2
  56. package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
  57. package/dist/lib/plugins/openapi/playground/Headers.d.ts +3 -2
  58. package/dist/lib/plugins/openapi/playground/Headers.js +52 -30
  59. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  60. package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
  61. package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
  62. package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -2
  63. package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
  64. package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
  65. package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
  66. package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
  67. package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
  68. package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
  69. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  70. package/dist/lib/plugins/openapi/playground/Playground.js +52 -34
  71. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  72. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  73. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  74. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +2 -2
  75. package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
  76. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  77. package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
  78. package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
  79. package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
  80. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
  81. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
  82. package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
  83. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
  84. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
  85. package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
  86. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
  87. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
  88. package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
  89. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +6 -0
  90. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +66 -0
  91. package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
  92. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +7 -4
  93. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +23 -32
  94. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  95. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -2
  96. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
  97. package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
  98. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +3 -3
  99. package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
  100. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -3
  101. package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
  102. package/dist/lib/plugins/openapi/schema/SchemaView.js +4 -4
  103. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  104. package/dist/lib/plugins/openapi/schema/utils.js +3 -2
  105. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  106. package/dist/lib/ui/CodeBlock.js +5 -6
  107. package/dist/lib/ui/CodeBlock.js.map +1 -1
  108. package/dist/lib/ui/Dialog.js +1 -1
  109. package/dist/lib/ui/Dialog.js.map +1 -1
  110. package/dist/lib/ui/Select.js +1 -1
  111. package/dist/lib/util/os.d.ts +2 -0
  112. package/dist/lib/util/os.js +21 -0
  113. package/dist/lib/util/os.js.map +1 -0
  114. package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
  115. package/dist/lib/util/useCopyToClipboard.js +11 -0
  116. package/dist/lib/util/useCopyToClipboard.js.map +1 -0
  117. package/dist/vite/api/SchemaManager.js +6 -2
  118. package/dist/vite/api/SchemaManager.js.map +1 -1
  119. package/dist/vite/api/schema-codegen.js +42 -11
  120. package/dist/vite/api/schema-codegen.js.map +1 -1
  121. package/dist/vite/api/schema-codegen.test.js +82 -0
  122. package/dist/vite/api/schema-codegen.test.js.map +1 -1
  123. package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
  124. package/dist/vite/mdx/remark-last-modified.js +56 -0
  125. package/dist/vite/mdx/remark-last-modified.js.map +1 -0
  126. package/dist/vite/mdx/utils.d.ts +2 -0
  127. package/dist/vite/mdx/utils.js +31 -0
  128. package/dist/vite/mdx/utils.js.map +1 -0
  129. package/dist/vite/plugin-frontmatter.js +4 -2
  130. package/dist/vite/plugin-frontmatter.js.map +1 -1
  131. package/dist/vite/plugin-mdx.js +11 -33
  132. package/dist/vite/plugin-mdx.js.map +1 -1
  133. package/dist/vite/plugin-theme.js +21 -9
  134. package/dist/vite/plugin-theme.js.map +1 -1
  135. package/dist/vite/plugin-theme.test.js +22 -1
  136. package/dist/vite/plugin-theme.test.js.map +1 -1
  137. package/lib/Alert-CT_ViLrJ.js +161 -0
  138. package/lib/Alert-CT_ViLrJ.js.map +1 -0
  139. package/lib/CodeBlock-DAKxs_Tu.js +85 -0
  140. package/lib/CodeBlock-DAKxs_Tu.js.map +1 -0
  141. package/lib/Command-CPtGTZAL.js +140 -0
  142. package/lib/Command-CPtGTZAL.js.map +1 -0
  143. package/lib/{Dialog-BxpuVLh9.js → Dialog-DGlrUTCS.js} +4 -4
  144. package/lib/Dialog-DGlrUTCS.js.map +1 -0
  145. package/lib/MdxPage-D-QSUlMf.js +110 -0
  146. package/lib/MdxPage-D-QSUlMf.js.map +1 -0
  147. package/lib/{OasProvider-BC0q5m3u.js → OasProvider-DS23Ds76.js} +3 -3
  148. package/lib/{OasProvider-BC0q5m3u.js.map → OasProvider-DS23Ds76.js.map} +1 -1
  149. package/lib/{OperationList-Dpip6ozi.js → OperationList-CLidyzBx.js} +578 -567
  150. package/lib/OperationList-CLidyzBx.js.map +1 -0
  151. package/lib/Pagination-ClHXydm9.js +36 -0
  152. package/lib/Pagination-ClHXydm9.js.map +1 -0
  153. package/lib/RouteGuard-Bd-ppFbi.js +737 -0
  154. package/lib/RouteGuard-Bd-ppFbi.js.map +1 -0
  155. package/lib/{SchemaList-t4BIfh6Z.js → SchemaList-AJ8eFhvU.js} +26 -37
  156. package/lib/SchemaList-AJ8eFhvU.js.map +1 -0
  157. package/lib/{SchemaView-CLxthVcA.js → SchemaView-B9MTum2V.js} +94 -103
  158. package/lib/SchemaView-B9MTum2V.js.map +1 -0
  159. package/lib/{SignUp-B6w5AwHM.js → SignUp-CfojO4Pb.js} +13 -13
  160. package/lib/{SignUp-B6w5AwHM.js.map → SignUp-CfojO4Pb.js.map} +1 -1
  161. package/lib/{Markdown-BQ8YqLsz.js → Slot-DwZlQ-vX.js} +3347 -3001
  162. package/lib/Slot-DwZlQ-vX.js.map +1 -0
  163. package/lib/{SyntaxHighlight-C5ja40ix.js → SyntaxHighlight-CrjhGEwT.js} +3 -3
  164. package/lib/{SyntaxHighlight-C5ja40ix.js.map → SyntaxHighlight-CrjhGEwT.js.map} +1 -1
  165. package/lib/{Toc-BS0f4GTe.js → Toc-WCmwFkX-.js} +2 -2
  166. package/lib/{Toc-BS0f4GTe.js.map → Toc-WCmwFkX-.js.map} +1 -1
  167. package/lib/{chunk-DQRVZFIR-BblmKnHy.js → chunk-DQRVZFIR-DHK7_Ilc.js} +7 -7
  168. package/lib/{chunk-DQRVZFIR-BblmKnHy.js.map → chunk-DQRVZFIR-DHK7_Ilc.js.map} +1 -1
  169. package/lib/{circular-DfOaDE_x.js → circular-0wOQ8KUO.js} +2 -2
  170. package/lib/{circular-DfOaDE_x.js.map → circular-0wOQ8KUO.js.map} +1 -1
  171. package/lib/clerk-BDZ31hjU.js +25190 -0
  172. package/lib/clerk-BDZ31hjU.js.map +1 -0
  173. package/lib/{createServer-DjOMygls.js → createServer-Brtv5_hp.js} +4 -4
  174. package/lib/{createServer-DjOMygls.js.map → createServer-Brtv5_hp.js.map} +1 -1
  175. package/lib/{errors-D_5vKvUq.js → errors-BsabiSKg.js} +5 -5
  176. package/lib/{errors-D_5vKvUq.js.map → errors-BsabiSKg.js.map} +1 -1
  177. package/lib/{hook-CHXroBFt.js → hook-Bd0yS8M0.js} +36 -36
  178. package/lib/{hook-CHXroBFt.js.map → hook-Bd0yS8M0.js.map} +1 -1
  179. package/lib/index-BIbCx5Fh.js +3919 -0
  180. package/lib/index-BIbCx5Fh.js.map +1 -0
  181. package/lib/index-BoBGmARR.js +3458 -0
  182. package/lib/index-BoBGmARR.js.map +1 -0
  183. package/lib/{index-BvvmIczU.js → index-CcV90rin.js} +2 -2
  184. package/lib/{index-BvvmIczU.js.map → index-CcV90rin.js.map} +1 -1
  185. package/lib/index-ClhS5TxS.js +107 -0
  186. package/lib/index-ClhS5TxS.js.map +1 -0
  187. package/lib/ui/CodeBlock.js +6 -73
  188. package/lib/ui/CodeBlock.js.map +1 -1
  189. package/lib/ui/Command.js +1 -1
  190. package/lib/ui/Dialog.js +1 -1
  191. package/lib/ui/Dialog.js.map +1 -1
  192. package/lib/ui/Select.js +1 -1
  193. package/lib/ui/Select.js.map +1 -1
  194. package/lib/ui/SyntaxHighlight.js +3 -3
  195. package/lib/{useExposedProps-BZQkZneR.js → useExposedProps-BIYjecPD.js} +2 -2
  196. package/lib/{useExposedProps-BZQkZneR.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
  197. package/lib/zudoku.auth-auth0.js +1 -1
  198. package/lib/zudoku.auth-azureb2c.js +2 -2
  199. package/lib/zudoku.auth-clerk.js +3 -3
  200. package/lib/zudoku.auth-openid.js +2 -2
  201. package/lib/zudoku.components.js +33 -3534
  202. package/lib/zudoku.components.js.map +1 -1
  203. package/lib/zudoku.hooks.js +10 -11
  204. package/lib/zudoku.hooks.js.map +1 -1
  205. package/lib/zudoku.plugin-api-catalog.js +6 -6
  206. package/lib/zudoku.plugin-api-keys.js +268 -321
  207. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  208. package/lib/zudoku.plugin-custom-pages.js +8 -20
  209. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  210. package/lib/zudoku.plugin-markdown.js +4 -5
  211. package/lib/zudoku.plugin-markdown.js.map +1 -1
  212. package/lib/zudoku.plugin-openapi.js +3 -3
  213. package/lib/zudoku.plugin-redirect.js +1 -1
  214. package/lib/zudoku.plugin-search-pagefind.js +201 -111
  215. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  216. package/package.json +5 -4
  217. package/src/lib/components/Autocomplete.tsx +1 -0
  218. package/src/lib/components/ErrorPage.tsx +3 -3
  219. package/src/lib/components/Markdown.tsx +3 -5
  220. package/src/lib/components/NotFoundPage.tsx +3 -3
  221. package/src/lib/components/Pagination.tsx +4 -4
  222. package/src/lib/components/Typography.tsx +14 -0
  223. package/src/lib/components/index.ts +2 -0
  224. package/src/lib/errors/ErrorAlert.tsx +3 -9
  225. package/src/lib/hooks/useHotkey.ts +70 -0
  226. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +5 -9
  227. package/src/lib/plugins/custom-pages/index.tsx +2 -6
  228. package/src/lib/plugins/markdown/MdxPage.tsx +66 -15
  229. package/src/lib/plugins/markdown/index.tsx +10 -2
  230. package/src/lib/plugins/openapi/OperationList.tsx +7 -17
  231. package/src/lib/plugins/openapi/OperationListItem.tsx +2 -2
  232. package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
  233. package/src/lib/plugins/openapi/SchemaList.tsx +3 -9
  234. package/src/lib/plugins/openapi/playground/BodyPanel.tsx +36 -28
  235. package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
  236. package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +7 -3
  237. package/src/lib/plugins/openapi/playground/Headers.tsx +187 -89
  238. package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
  239. package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +7 -12
  240. package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
  241. package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
  242. package/src/lib/plugins/openapi/playground/PathParams.tsx +3 -4
  243. package/src/lib/plugins/openapi/playground/Playground.tsx +196 -136
  244. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  245. package/src/lib/plugins/openapi/playground/QueryParams.tsx +102 -58
  246. package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
  247. package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
  248. package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
  249. package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
  250. package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +104 -0
  251. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +98 -97
  252. package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +62 -92
  253. package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +3 -3
  254. package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -3
  255. package/src/lib/plugins/openapi/schema/SchemaView.tsx +5 -10
  256. package/src/lib/plugins/openapi/schema/utils.ts +3 -2
  257. package/src/lib/ui/CodeBlock.tsx +5 -6
  258. package/src/lib/ui/Dialog.tsx +1 -1
  259. package/src/lib/ui/Select.tsx +1 -1
  260. package/src/lib/util/os.ts +18 -0
  261. package/src/lib/util/useCopyToClipboard.ts +17 -0
  262. package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
  263. package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
  264. package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
  265. package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
  266. package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
  267. package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
  268. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
  269. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
  270. package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
  271. package/lib/Callout-CoVxYafP.js +0 -231
  272. package/lib/Callout-CoVxYafP.js.map +0 -1
  273. package/lib/CategoryHeading-Cu2RwgjC.js +0 -10
  274. package/lib/CategoryHeading-Cu2RwgjC.js.map +0 -1
  275. package/lib/Dialog-BxpuVLh9.js.map +0 -1
  276. package/lib/Markdown-BQ8YqLsz.js.map +0 -1
  277. package/lib/MdxPage-DJvKmI-r.js +0 -84
  278. package/lib/MdxPage-DJvKmI-r.js.map +0 -1
  279. package/lib/OperationList-Dpip6ozi.js.map +0 -1
  280. package/lib/Pagination-CCxhL836.js +0 -36
  281. package/lib/Pagination-CCxhL836.js.map +0 -1
  282. package/lib/RouteGuard-gV7nvzi7.js +0 -55
  283. package/lib/RouteGuard-gV7nvzi7.js.map +0 -1
  284. package/lib/SchemaList-t4BIfh6Z.js.map +0 -1
  285. package/lib/SchemaView-CLxthVcA.js.map +0 -1
  286. package/lib/Slot-CSEIvwwO.js +0 -161
  287. package/lib/Slot-CSEIvwwO.js.map +0 -1
  288. package/lib/clerk-yAKDC3Qz.js +0 -24812
  289. package/lib/clerk-yAKDC3Qz.js.map +0 -1
  290. package/lib/index--oeBayMa.js +0 -86
  291. package/lib/index--oeBayMa.js.map +0 -1
  292. package/lib/index-Bn6Lc9tq.js +0 -9
  293. package/lib/index-Bn6Lc9tq.js.map +0 -1
  294. package/lib/index-DW2qmCJa.js +0 -3227
  295. package/lib/index-DW2qmCJa.js.map +0 -1
  296. package/lib/index-QzXzw_ra.js +0 -24
  297. package/lib/index-QzXzw_ra.js.map +0 -1
  298. package/lib/index.esm-BFcSKCe-.js +0 -683
  299. package/lib/index.esm-BFcSKCe-.js.map +0 -1
  300. package/lib/mutation-BpcyTgWI.js +0 -196
  301. package/lib/mutation-BpcyTgWI.js.map +0 -1
  302. package/lib/objectEntries-yMIkr2mI.js +0 -5
  303. package/lib/objectEntries-yMIkr2mI.js.map +0 -1
  304. package/lib/react-nprogress.esm-C2MPXjiJ.js +0 -389
  305. package/lib/react-nprogress.esm-C2MPXjiJ.js.map +0 -1
  306. package/lib/useLatest-hmRS46UF.js +0 -11
  307. package/lib/useLatest-hmRS46UF.js.map +0 -1
  308. package/lib/useMutation-N4ockVKi.js +0 -97
  309. package/lib/useMutation-N4ockVKi.js.map +0 -1
  310. package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
  311. package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
  312. package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
@@ -0,0 +1,3919 @@
1
+ import { B as Nt, a as At, H as Ne, R as Yr } from "./RouteGuard-Bd-ppFbi.js";
2
+ import { z as Rt, M as Gr, J as Jr, u as Xr } from "./index-ClhS5TxS.js";
3
+ import { R as en, S as tn, u as ye, e as Ae, f as rn, L as Re, O as It } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
4
+ import { S as Dt, v as Mt, Q as nn, n as I, w as We, x as Ve, y as L, z as on, A as sn, B as an, D as cn, E as Ye, F as Ge, G as un, h as Je, H as Xe, I as ln, g as Ft, J as qt, l as dn, d as M, e as ne, K as Ut, L as Lt, j as ee, M as fn, u as hn, c as pn, N as mn, Z as gn, f as vn, C as yn } from "./hook-Bd0yS8M0.js";
5
+ import { h as xn, E as Qt, a as A, A as _n, i as bn, s as wn, N as et, j as jn, T as Bt, C as $n, H as kn, k as zn, l as Pn, V as En, R as Sn, M as Zn } from "./Slot-DwZlQ-vX.js";
6
+ import { j as a } from "./jsx-runtime-C5mzlN2N.js";
7
+ import { Button as Ht } from "./ui/Button.js";
8
+ import { Callout as Tn } from "./ui/Callout.js";
9
+ import * as Q from "react";
10
+ import { createContext as Ie, StrictMode as Kt, useRef as K, useEffect as F, useState as G, useCallback as H, Suspense as De, memo as Wt, Component as Cn, createElement as tt, useMemo as ke, useContext as On } from "react";
11
+ import * as Nn from "react-dom";
12
+ import { CircleFadingArrowUpIcon as An, LoaderCircleIcon as Rn, ExternalLink as In, CircleXIcon as Dn, ChevronRightIcon as Mn, SearchIcon as Fn, SunIcon as qn, MoonIcon as Un, MenuIcon as Ln, PanelLeftIcon as Qn } from "lucide-react";
13
+ import { C as xe } from "./ClientOnly-E7hGysn1.js";
14
+ import { c as N } from "./cn-wvCW-ho6.js";
15
+ import { S as Vt } from "./Spinner-mNLZ6awP.js";
16
+ import { isSearchPlugin as Bn, isProfileMenuPlugin as Hn, isNavigationPlugin as rt, isAuthenticationPlugin as Kn, isEventConsumerPlugin as Wn, needsInitialization as Vn, isApiIdentityPlugin as Yn, isMdxProviderPlugin as Gn, hasHead as Jn } from "./zudoku.plugins.js";
17
+ import { B as Se } from "./Button-BE9IVkWV.js";
18
+ import { DropdownMenu as Xn, DropdownMenuTrigger as eo, DropdownMenuContent as to, DropdownMenuLabel as ro, DropdownMenuSeparator as ze, DropdownMenuSub as no, DropdownMenuSubTrigger as oo, DropdownMenuPortal as so, DropdownMenuSubContent as ao, DropdownMenuItem as io } from "./ui/DropdownMenu.js";
19
+ import { VisuallyHidden as Yt } from "@radix-ui/react-visually-hidden";
20
+ import { D as co, a as uo, b as Gt, c as Jt, d as q } from "./Drawer-BzkOKwgC.js";
21
+ import { a as lo } from "./index-DI5SPFK9.js";
22
+ var fo = class extends Dt {
23
+ constructor(e = {}) {
24
+ super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
25
+ }
26
+ #e;
27
+ build(e, t, r) {
28
+ const n = t.queryKey, o = t.queryHash ?? Mt(n, t);
29
+ let s = this.get(o);
30
+ return s || (s = new nn({
31
+ client: e,
32
+ queryKey: n,
33
+ queryHash: o,
34
+ options: e.defaultQueryOptions(t),
35
+ state: r,
36
+ defaultOptions: e.getQueryDefaults(n)
37
+ }), this.add(s)), s;
38
+ }
39
+ add(e) {
40
+ this.#e.has(e.queryHash) || (this.#e.set(e.queryHash, e), this.notify({
41
+ type: "added",
42
+ query: e
43
+ }));
44
+ }
45
+ remove(e) {
46
+ const t = this.#e.get(e.queryHash);
47
+ t && (e.destroy(), t === e && this.#e.delete(e.queryHash), this.notify({ type: "removed", query: e }));
48
+ }
49
+ clear() {
50
+ I.batch(() => {
51
+ this.getAll().forEach((e) => {
52
+ this.remove(e);
53
+ });
54
+ });
55
+ }
56
+ get(e) {
57
+ return this.#e.get(e);
58
+ }
59
+ getAll() {
60
+ return [...this.#e.values()];
61
+ }
62
+ find(e) {
63
+ const t = { exact: !0, ...e };
64
+ return this.getAll().find(
65
+ (r) => We(t, r)
66
+ );
67
+ }
68
+ findAll(e = {}) {
69
+ const t = this.getAll();
70
+ return Object.keys(e).length > 0 ? t.filter((r) => We(e, r)) : t;
71
+ }
72
+ notify(e) {
73
+ I.batch(() => {
74
+ this.listeners.forEach((t) => {
75
+ t(e);
76
+ });
77
+ });
78
+ }
79
+ onFocus() {
80
+ I.batch(() => {
81
+ this.getAll().forEach((e) => {
82
+ e.onFocus();
83
+ });
84
+ });
85
+ }
86
+ onOnline() {
87
+ I.batch(() => {
88
+ this.getAll().forEach((e) => {
89
+ e.onOnline();
90
+ });
91
+ });
92
+ }
93
+ }, ho = class extends Dt {
94
+ constructor(e = {}) {
95
+ super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#r = 0;
96
+ }
97
+ #e;
98
+ #t;
99
+ #r;
100
+ build(e, t, r) {
101
+ const n = new xn({
102
+ mutationCache: this,
103
+ mutationId: ++this.#r,
104
+ options: e.defaultMutationOptions(t),
105
+ state: r
106
+ });
107
+ return this.add(n), n;
108
+ }
109
+ add(e) {
110
+ this.#e.add(e);
111
+ const t = ce(e);
112
+ if (typeof t == "string") {
113
+ const r = this.#t.get(t);
114
+ r ? r.push(e) : this.#t.set(t, [e]);
115
+ }
116
+ this.notify({ type: "added", mutation: e });
117
+ }
118
+ remove(e) {
119
+ if (this.#e.delete(e)) {
120
+ const t = ce(e);
121
+ if (typeof t == "string") {
122
+ const r = this.#t.get(t);
123
+ if (r)
124
+ if (r.length > 1) {
125
+ const n = r.indexOf(e);
126
+ n !== -1 && r.splice(n, 1);
127
+ } else r[0] === e && this.#t.delete(t);
128
+ }
129
+ }
130
+ this.notify({ type: "removed", mutation: e });
131
+ }
132
+ canRun(e) {
133
+ const t = ce(e);
134
+ if (typeof t == "string") {
135
+ const n = this.#t.get(t)?.find(
136
+ (o) => o.state.status === "pending"
137
+ );
138
+ return !n || n === e;
139
+ } else
140
+ return !0;
141
+ }
142
+ runNext(e) {
143
+ const t = ce(e);
144
+ return typeof t == "string" ? this.#t.get(t)?.find((n) => n !== e && n.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
145
+ }
146
+ clear() {
147
+ I.batch(() => {
148
+ this.#e.forEach((e) => {
149
+ this.notify({ type: "removed", mutation: e });
150
+ }), this.#e.clear(), this.#t.clear();
151
+ });
152
+ }
153
+ getAll() {
154
+ return Array.from(this.#e);
155
+ }
156
+ find(e) {
157
+ const t = { exact: !0, ...e };
158
+ return this.getAll().find(
159
+ (r) => Ve(t, r)
160
+ );
161
+ }
162
+ findAll(e = {}) {
163
+ return this.getAll().filter((t) => Ve(e, t));
164
+ }
165
+ notify(e) {
166
+ I.batch(() => {
167
+ this.listeners.forEach((t) => {
168
+ t(e);
169
+ });
170
+ });
171
+ }
172
+ resumePausedMutations() {
173
+ const e = this.getAll().filter((t) => t.state.isPaused);
174
+ return I.batch(
175
+ () => Promise.all(
176
+ e.map((t) => t.continue().catch(L))
177
+ )
178
+ );
179
+ }
180
+ };
181
+ function ce(e) {
182
+ return e.options.scope?.id;
183
+ }
184
+ function nt(e) {
185
+ return {
186
+ onFetch: (t, r) => {
187
+ const n = t.options, o = t.fetchOptions?.meta?.fetchMore?.direction, s = t.state.data?.pages || [], i = t.state.data?.pageParams || [];
188
+ let u = { pages: [], pageParams: [] }, p = 0;
189
+ const f = async () => {
190
+ let x = !1;
191
+ const m = (g) => {
192
+ Object.defineProperty(g, "signal", {
193
+ enumerable: !0,
194
+ get: () => (t.signal.aborted ? x = !0 : t.signal.addEventListener("abort", () => {
195
+ x = !0;
196
+ }), t.signal)
197
+ });
198
+ }, h = on(t.options, t.fetchOptions), l = async (g, w, P) => {
199
+ if (x)
200
+ return Promise.reject();
201
+ if (w == null && g.pages.length)
202
+ return Promise.resolve(g);
203
+ const Z = {
204
+ client: t.client,
205
+ queryKey: t.queryKey,
206
+ pageParam: w,
207
+ direction: P ? "backward" : "forward",
208
+ meta: t.options.meta
209
+ };
210
+ m(Z);
211
+ const j = await h(
212
+ Z
213
+ ), { maxPages: y } = t.options, b = P ? sn : an;
214
+ return {
215
+ pages: b(g.pages, j, y),
216
+ pageParams: b(g.pageParams, w, y)
217
+ };
218
+ };
219
+ if (o && s.length) {
220
+ const g = o === "backward", w = g ? po : ot, P = {
221
+ pages: s,
222
+ pageParams: i
223
+ }, Z = w(n, P);
224
+ u = await l(P, Z, g);
225
+ } else {
226
+ const g = e ?? s.length;
227
+ do {
228
+ const w = p === 0 ? i[0] ?? n.initialPageParam : ot(n, u);
229
+ if (p > 0 && w == null)
230
+ break;
231
+ u = await l(u, w), p++;
232
+ } while (p < g);
233
+ }
234
+ return u;
235
+ };
236
+ t.options.persister ? t.fetchFn = () => t.options.persister?.(
237
+ f,
238
+ {
239
+ client: t.client,
240
+ queryKey: t.queryKey,
241
+ meta: t.options.meta,
242
+ signal: t.signal
243
+ },
244
+ r
245
+ ) : t.fetchFn = f;
246
+ }
247
+ };
248
+ }
249
+ function ot(e, { pages: t, pageParams: r }) {
250
+ const n = t.length - 1;
251
+ return t.length > 0 ? e.getNextPageParam(
252
+ t[n],
253
+ t,
254
+ r[n],
255
+ r
256
+ ) : void 0;
257
+ }
258
+ function po(e, { pages: t, pageParams: r }) {
259
+ return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, r[0], r) : void 0;
260
+ }
261
+ var mo = class {
262
+ #e;
263
+ #t;
264
+ #r;
265
+ #o;
266
+ #s;
267
+ #n;
268
+ #a;
269
+ #i;
270
+ constructor(e = {}) {
271
+ this.#e = e.queryCache || new fo(), this.#t = e.mutationCache || new ho(), this.#r = e.defaultOptions || {}, this.#o = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#n = 0;
272
+ }
273
+ mount() {
274
+ this.#n++, this.#n === 1 && (this.#a = cn.subscribe(async (e) => {
275
+ e && (await this.resumePausedMutations(), this.#e.onFocus());
276
+ }), this.#i = Ye.subscribe(async (e) => {
277
+ e && (await this.resumePausedMutations(), this.#e.onOnline());
278
+ }));
279
+ }
280
+ unmount() {
281
+ this.#n--, this.#n === 0 && (this.#a?.(), this.#a = void 0, this.#i?.(), this.#i = void 0);
282
+ }
283
+ isFetching(e) {
284
+ return this.#e.findAll({ ...e, fetchStatus: "fetching" }).length;
285
+ }
286
+ isMutating(e) {
287
+ return this.#t.findAll({ ...e, status: "pending" }).length;
288
+ }
289
+ /**
290
+ * Imperative (non-reactive) way to retrieve data for a QueryKey.
291
+ * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
292
+ *
293
+ * Hint: Do not use this function inside a component, because it won't receive updates.
294
+ * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
295
+ */
296
+ getQueryData(e) {
297
+ const t = this.defaultQueryOptions({ queryKey: e });
298
+ return this.#e.get(t.queryHash)?.state.data;
299
+ }
300
+ ensureQueryData(e) {
301
+ const t = this.defaultQueryOptions(e), r = this.#e.build(this, t), n = r.state.data;
302
+ return n === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && r.isStaleByTime(Ge(t.staleTime, r)) && this.prefetchQuery(t), Promise.resolve(n));
303
+ }
304
+ getQueriesData(e) {
305
+ return this.#e.findAll(e).map(({ queryKey: t, state: r }) => {
306
+ const n = r.data;
307
+ return [t, n];
308
+ });
309
+ }
310
+ setQueryData(e, t, r) {
311
+ const n = this.defaultQueryOptions({ queryKey: e }), s = this.#e.get(
312
+ n.queryHash
313
+ )?.state.data, i = un(t, s);
314
+ if (i !== void 0)
315
+ return this.#e.build(this, n).setData(i, { ...r, manual: !0 });
316
+ }
317
+ setQueriesData(e, t, r) {
318
+ return I.batch(
319
+ () => this.#e.findAll(e).map(({ queryKey: n }) => [
320
+ n,
321
+ this.setQueryData(n, t, r)
322
+ ])
323
+ );
324
+ }
325
+ getQueryState(e) {
326
+ const t = this.defaultQueryOptions({ queryKey: e });
327
+ return this.#e.get(
328
+ t.queryHash
329
+ )?.state;
330
+ }
331
+ removeQueries(e) {
332
+ const t = this.#e;
333
+ I.batch(() => {
334
+ t.findAll(e).forEach((r) => {
335
+ t.remove(r);
336
+ });
337
+ });
338
+ }
339
+ resetQueries(e, t) {
340
+ const r = this.#e;
341
+ return I.batch(() => (r.findAll(e).forEach((n) => {
342
+ n.reset();
343
+ }), this.refetchQueries(
344
+ {
345
+ type: "active",
346
+ ...e
347
+ },
348
+ t
349
+ )));
350
+ }
351
+ cancelQueries(e, t = {}) {
352
+ const r = { revert: !0, ...t }, n = I.batch(
353
+ () => this.#e.findAll(e).map((o) => o.cancel(r))
354
+ );
355
+ return Promise.all(n).then(L).catch(L);
356
+ }
357
+ invalidateQueries(e, t = {}) {
358
+ return I.batch(() => (this.#e.findAll(e).forEach((r) => {
359
+ r.invalidate();
360
+ }), e?.refetchType === "none" ? Promise.resolve() : this.refetchQueries(
361
+ {
362
+ ...e,
363
+ type: e?.refetchType ?? e?.type ?? "active"
364
+ },
365
+ t
366
+ )));
367
+ }
368
+ refetchQueries(e, t = {}) {
369
+ const r = {
370
+ ...t,
371
+ cancelRefetch: t.cancelRefetch ?? !0
372
+ }, n = I.batch(
373
+ () => this.#e.findAll(e).filter((o) => !o.isDisabled()).map((o) => {
374
+ let s = o.fetch(void 0, r);
375
+ return r.throwOnError || (s = s.catch(L)), o.state.fetchStatus === "paused" ? Promise.resolve() : s;
376
+ })
377
+ );
378
+ return Promise.all(n).then(L);
379
+ }
380
+ fetchQuery(e) {
381
+ const t = this.defaultQueryOptions(e);
382
+ t.retry === void 0 && (t.retry = !1);
383
+ const r = this.#e.build(this, t);
384
+ return r.isStaleByTime(
385
+ Ge(t.staleTime, r)
386
+ ) ? r.fetch(t) : Promise.resolve(r.state.data);
387
+ }
388
+ prefetchQuery(e) {
389
+ return this.fetchQuery(e).then(L).catch(L);
390
+ }
391
+ fetchInfiniteQuery(e) {
392
+ return e.behavior = nt(e.pages), this.fetchQuery(e);
393
+ }
394
+ prefetchInfiniteQuery(e) {
395
+ return this.fetchInfiniteQuery(e).then(L).catch(L);
396
+ }
397
+ ensureInfiniteQueryData(e) {
398
+ return e.behavior = nt(e.pages), this.ensureQueryData(e);
399
+ }
400
+ resumePausedMutations() {
401
+ return Ye.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
402
+ }
403
+ getQueryCache() {
404
+ return this.#e;
405
+ }
406
+ getMutationCache() {
407
+ return this.#t;
408
+ }
409
+ getDefaultOptions() {
410
+ return this.#r;
411
+ }
412
+ setDefaultOptions(e) {
413
+ this.#r = e;
414
+ }
415
+ setQueryDefaults(e, t) {
416
+ this.#o.set(Je(e), {
417
+ queryKey: e,
418
+ defaultOptions: t
419
+ });
420
+ }
421
+ getQueryDefaults(e) {
422
+ const t = [...this.#o.values()], r = {};
423
+ return t.forEach((n) => {
424
+ Xe(e, n.queryKey) && Object.assign(r, n.defaultOptions);
425
+ }), r;
426
+ }
427
+ setMutationDefaults(e, t) {
428
+ this.#s.set(Je(e), {
429
+ mutationKey: e,
430
+ defaultOptions: t
431
+ });
432
+ }
433
+ getMutationDefaults(e) {
434
+ const t = [...this.#s.values()], r = {};
435
+ return t.forEach((n) => {
436
+ Xe(e, n.mutationKey) && Object.assign(r, n.defaultOptions);
437
+ }), r;
438
+ }
439
+ defaultQueryOptions(e) {
440
+ if (e._defaulted)
441
+ return e;
442
+ const t = {
443
+ ...this.#r.queries,
444
+ ...this.getQueryDefaults(e.queryKey),
445
+ ...e,
446
+ _defaulted: !0
447
+ };
448
+ return t.queryHash || (t.queryHash = Mt(
449
+ t.queryKey,
450
+ t
451
+ )), 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.queryFn === ln && (t.enabled = !1), t;
452
+ }
453
+ defaultMutationOptions(e) {
454
+ return e?._defaulted ? e : {
455
+ ...this.#r.mutations,
456
+ ...e?.mutationKey && this.getMutationDefaults(e.mutationKey),
457
+ ...e,
458
+ _defaulted: !0
459
+ };
460
+ }
461
+ clear() {
462
+ this.#e.clear(), this.#t.clear();
463
+ }
464
+ };
465
+ function go(e) {
466
+ return e;
467
+ }
468
+ function st(e, t, r) {
469
+ if (typeof t != "object" || t === null)
470
+ return;
471
+ const n = e.getMutationCache(), o = e.getQueryCache(), s = r?.defaultOptions?.deserializeData ?? e.getDefaultOptions().hydrate?.deserializeData ?? go, i = t.mutations || [], u = t.queries || [];
472
+ i.forEach(({ state: p, ...f }) => {
473
+ n.build(
474
+ e,
475
+ {
476
+ ...e.getDefaultOptions().hydrate?.mutations,
477
+ ...r?.defaultOptions?.mutations,
478
+ ...f
479
+ },
480
+ p
481
+ );
482
+ }), u.forEach(({ queryKey: p, state: f, queryHash: x, meta: m, promise: h }) => {
483
+ let l = o.get(x);
484
+ const g = f.data === void 0 ? f.data : s(f.data);
485
+ if (l) {
486
+ if (l.state.dataUpdatedAt < f.dataUpdatedAt) {
487
+ const { fetchStatus: w, ...P } = f;
488
+ l.setState({
489
+ ...P,
490
+ data: g
491
+ });
492
+ }
493
+ } else
494
+ l = o.build(
495
+ e,
496
+ {
497
+ ...e.getDefaultOptions().hydrate?.queries,
498
+ ...r?.defaultOptions?.queries,
499
+ queryKey: p,
500
+ queryHash: x,
501
+ meta: m
502
+ },
503
+ // Reset fetch status to idle to avoid
504
+ // query being stuck in fetching state upon hydration
505
+ {
506
+ ...f,
507
+ data: g,
508
+ fetchStatus: "idle"
509
+ }
510
+ );
511
+ if (h) {
512
+ const w = Promise.resolve(h).then(s);
513
+ l.fetch(void 0, { initialPromise: w });
514
+ }
515
+ });
516
+ }
517
+ var at = (e, t) => typeof e == "object" && e !== null && t in e, vo = ({
518
+ children: e,
519
+ options: t = {},
520
+ state: r,
521
+ queryClient: n
522
+ }) => {
523
+ const o = Ft(n), [s, i] = Q.useState(), u = Q.useRef(t);
524
+ return u.current = t, Q.useMemo(() => {
525
+ if (r) {
526
+ if (typeof r != "object")
527
+ return;
528
+ const p = o.getQueryCache(), f = r.queries || [], x = [], m = [];
529
+ for (const h of f) {
530
+ const l = p.get(h.queryHash);
531
+ if (!l)
532
+ x.push(h);
533
+ else {
534
+ const g = h.state.dataUpdatedAt > l.state.dataUpdatedAt || // RSC special serialized then-able chunks
535
+ at(h.promise, "status") && at(l.promise, "status") && h.promise.status !== l.promise.status, w = s?.find(
536
+ (P) => P.queryHash === h.queryHash
537
+ );
538
+ g && (!w || h.state.dataUpdatedAt > w.state.dataUpdatedAt) && m.push(h);
539
+ }
540
+ }
541
+ x.length > 0 && st(o, { queries: x }, u.current), m.length > 0 && i(
542
+ (h) => h ? [...h, ...m] : m
543
+ );
544
+ }
545
+ }, [o, s, r]), Q.useEffect(() => {
546
+ s && (st(o, { queries: s }, u.current), i(void 0));
547
+ }, [o, s]), e;
548
+ };
549
+ function yo({ error: e }) {
550
+ return /* @__PURE__ */ a.jsx(Qt, { error: e });
551
+ }
552
+ /**
553
+ * react-router v7.6.1
554
+ *
555
+ * Copyright (c) Remix Software Inc.
556
+ *
557
+ * This source code is licensed under the MIT license found in the
558
+ * LICENSE.md file in the root directory of this source tree.
559
+ *
560
+ * @license MIT
561
+ */
562
+ function xo(e) {
563
+ return /* @__PURE__ */ Q.createElement(en, { flushSync: Nn.flushSync, ...e });
564
+ }
565
+ const Ze = Ie({ stagger: !1 }), _o = new mo({
566
+ defaultOptions: {
567
+ queries: {
568
+ staleTime: 1e3 * 60 * 5
569
+ }
570
+ }
571
+ }), bo = ({
572
+ router: e,
573
+ hydrate: t = !1
574
+ }) => /* @__PURE__ */ a.jsx(Kt, { children: /* @__PURE__ */ a.jsx(qt, { client: _o, children: /* @__PURE__ */ a.jsx(vo, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ a.jsx(Nt, { value: !1, children: /* @__PURE__ */ a.jsx(At, { children: /* @__PURE__ */ a.jsx(Ze.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(xo, { router: e }) }) }) }) }) }) }), wo = ({
575
+ router: e,
576
+ context: t,
577
+ queryClient: r,
578
+ helmetContext: n,
579
+ bypassProtection: o = !1
580
+ }) => /* @__PURE__ */ a.jsx(Kt, { children: /* @__PURE__ */ a.jsx(qt, { client: r, children: /* @__PURE__ */ a.jsx(At, { context: n, children: /* @__PURE__ */ a.jsx(Nt, { value: o, children: /* @__PURE__ */ a.jsx(tn, { router: e, context: t }) }) }) }) });
581
+ function c(e, t, r) {
582
+ function n(u, p) {
583
+ var f;
584
+ Object.defineProperty(u, "_zod", {
585
+ value: u._zod ?? {},
586
+ enumerable: !1
587
+ }), (f = u._zod).traits ?? (f.traits = /* @__PURE__ */ new Set()), u._zod.traits.add(e), t(u, p);
588
+ for (const x in i.prototype)
589
+ x in u || Object.defineProperty(u, x, { value: i.prototype[x].bind(u) });
590
+ u._zod.constr = i, u._zod.def = p;
591
+ }
592
+ const o = r?.Parent ?? Object;
593
+ class s extends o {
594
+ }
595
+ Object.defineProperty(s, "name", { value: e });
596
+ function i(u) {
597
+ var p;
598
+ const f = r?.Parent ? new s() : this;
599
+ n(f, u), (p = f._zod).deferred ?? (p.deferred = []);
600
+ for (const x of f._zod.deferred)
601
+ x();
602
+ return f;
603
+ }
604
+ return Object.defineProperty(i, "init", { value: n }), Object.defineProperty(i, Symbol.hasInstance, {
605
+ value: (u) => r?.Parent && u instanceof r.Parent ? !0 : u?._zod?.traits?.has(e)
606
+ }), Object.defineProperty(i, "name", { value: e }), i;
607
+ }
608
+ class oe extends Error {
609
+ constructor() {
610
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
611
+ }
612
+ }
613
+ const Xt = {};
614
+ function V(e) {
615
+ return Xt;
616
+ }
617
+ function jo(e) {
618
+ const t = Object.values(e).filter((n) => typeof n == "number");
619
+ return Object.entries(e).filter(([n, o]) => t.indexOf(+n) === -1).map(([n, o]) => o);
620
+ }
621
+ function $o(e, t) {
622
+ return typeof t == "bigint" ? t.toString() : t;
623
+ }
624
+ function er(e) {
625
+ return {
626
+ get value() {
627
+ {
628
+ const t = e();
629
+ return Object.defineProperty(this, "value", { value: t }), t;
630
+ }
631
+ }
632
+ };
633
+ }
634
+ function Me(e) {
635
+ return e == null;
636
+ }
637
+ function Fe(e) {
638
+ const t = e.startsWith("^") ? 1 : 0, r = e.endsWith("$") ? e.length - 1 : e.length;
639
+ return e.slice(t, r);
640
+ }
641
+ function T(e, t, r) {
642
+ Object.defineProperty(e, t, {
643
+ get() {
644
+ {
645
+ const n = r();
646
+ return e[t] = n, n;
647
+ }
648
+ },
649
+ set(n) {
650
+ Object.defineProperty(e, t, {
651
+ value: n
652
+ // configurable: true,
653
+ });
654
+ },
655
+ configurable: !0
656
+ });
657
+ }
658
+ function qe(e, t, r) {
659
+ Object.defineProperty(e, t, {
660
+ value: r,
661
+ writable: !0,
662
+ enumerable: !0,
663
+ configurable: !0
664
+ });
665
+ }
666
+ function tr(e = 10) {
667
+ const t = "abcdefghijklmnopqrstuvwxyz";
668
+ let r = "";
669
+ for (let n = 0; n < e; n++)
670
+ r += t[Math.floor(Math.random() * t.length)];
671
+ return r;
672
+ }
673
+ function te(e) {
674
+ return JSON.stringify(e);
675
+ }
676
+ function Te(e) {
677
+ return typeof e == "object" && e !== null && !Array.isArray(e);
678
+ }
679
+ const ko = er(() => {
680
+ try {
681
+ const e = Function;
682
+ return new e(""), !0;
683
+ } catch {
684
+ return !1;
685
+ }
686
+ });
687
+ function it(e) {
688
+ if (Te(e) === !1)
689
+ return !1;
690
+ const t = e.constructor;
691
+ if (t === void 0)
692
+ return !0;
693
+ const r = t.prototype;
694
+ return !(Te(r) === !1 || Object.prototype.hasOwnProperty.call(r, "isPrototypeOf") === !1);
695
+ }
696
+ const zo = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
697
+ function _e(e) {
698
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
699
+ }
700
+ function J(e, t, r) {
701
+ const n = new e._zod.constr(t ?? e._zod.def);
702
+ return (!t || r?.parent) && (n._zod.parent = e), n;
703
+ }
704
+ function _(e) {
705
+ const t = e;
706
+ if (!t)
707
+ return {};
708
+ if (typeof t == "string")
709
+ return { error: () => t };
710
+ if (t?.message !== void 0) {
711
+ if (t?.error !== void 0)
712
+ throw new Error("Cannot specify both `message` and `error` params");
713
+ t.error = t.message;
714
+ }
715
+ return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
716
+ }
717
+ function Po(e) {
718
+ return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
719
+ }
720
+ function Eo(e, t) {
721
+ const r = {}, n = e._zod.def;
722
+ for (const o in t) {
723
+ if (!(o in n.shape))
724
+ throw new Error(`Unrecognized key: "${o}"`);
725
+ t[o] && (r[o] = n.shape[o]);
726
+ }
727
+ return J(e, {
728
+ ...e._zod.def,
729
+ shape: r,
730
+ checks: []
731
+ });
732
+ }
733
+ function So(e, t) {
734
+ const r = { ...e._zod.def.shape }, n = e._zod.def;
735
+ for (const o in t) {
736
+ if (!(o in n.shape))
737
+ throw new Error(`Unrecognized key: "${o}"`);
738
+ t[o] && delete r[o];
739
+ }
740
+ return J(e, {
741
+ ...e._zod.def,
742
+ shape: r,
743
+ checks: []
744
+ });
745
+ }
746
+ function Zo(e, t) {
747
+ const r = {
748
+ ...e._zod.def,
749
+ get shape() {
750
+ const n = { ...e._zod.def.shape, ...t };
751
+ return qe(this, "shape", n), n;
752
+ },
753
+ checks: []
754
+ // delete existing checks
755
+ };
756
+ return J(e, r);
757
+ }
758
+ function To(e, t) {
759
+ return J(e, {
760
+ ...e._zod.def,
761
+ get shape() {
762
+ const r = { ...e._zod.def.shape, ...t._zod.def.shape };
763
+ return qe(this, "shape", r), r;
764
+ },
765
+ catchall: t._zod.def.catchall,
766
+ checks: []
767
+ // delete existing checks
768
+ });
769
+ }
770
+ function Co(e, t, r) {
771
+ const n = t._zod.def.shape, o = { ...n };
772
+ if (r)
773
+ for (const s in r) {
774
+ if (!(s in n))
775
+ throw new Error(`Unrecognized key: "${s}"`);
776
+ r[s] && (o[s] = e ? new e({
777
+ type: "optional",
778
+ innerType: n[s]
779
+ }) : n[s]);
780
+ }
781
+ else
782
+ for (const s in n)
783
+ o[s] = e ? new e({
784
+ type: "optional",
785
+ innerType: n[s]
786
+ }) : n[s];
787
+ return J(t, {
788
+ ...t._zod.def,
789
+ shape: o,
790
+ checks: []
791
+ });
792
+ }
793
+ function Oo(e, t, r) {
794
+ const n = t._zod.def.shape, o = { ...n };
795
+ if (r)
796
+ for (const s in r) {
797
+ if (!(s in o))
798
+ throw new Error(`Unrecognized key: "${s}"`);
799
+ r[s] && (o[s] = new e({
800
+ type: "nonoptional",
801
+ innerType: n[s]
802
+ }));
803
+ }
804
+ else
805
+ for (const s in n)
806
+ o[s] = new e({
807
+ type: "nonoptional",
808
+ innerType: n[s]
809
+ });
810
+ return J(t, {
811
+ ...t._zod.def,
812
+ shape: o,
813
+ // optional: [],
814
+ checks: []
815
+ });
816
+ }
817
+ function re(e, t = 0) {
818
+ for (let r = t; r < e.issues.length; r++)
819
+ if (e.issues[r].continue !== !0)
820
+ return !0;
821
+ return !1;
822
+ }
823
+ function Ue(e, t) {
824
+ return t.map((r) => {
825
+ var n;
826
+ return (n = r).path ?? (n.path = []), r.path.unshift(e), r;
827
+ });
828
+ }
829
+ function ue(e) {
830
+ return typeof e == "string" ? e : e?.message;
831
+ }
832
+ function Y(e, t, r) {
833
+ const n = { ...e, path: e.path ?? [] };
834
+ if (!e.message) {
835
+ const o = ue(e.inst?._zod.def?.error?.(e)) ?? ue(t?.error?.(e)) ?? ue(r.customError?.(e)) ?? ue(r.localeError?.(e)) ?? "Invalid input";
836
+ n.message = o;
837
+ }
838
+ return delete n.inst, delete n.continue, t?.reportInput || delete n.input, n;
839
+ }
840
+ function Le(e) {
841
+ return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
842
+ }
843
+ function se(...e) {
844
+ const [t, r, n] = e;
845
+ return typeof t == "string" ? {
846
+ message: t,
847
+ code: "custom",
848
+ input: r,
849
+ inst: n
850
+ } : { ...t };
851
+ }
852
+ const rr = (e, t) => {
853
+ e.name = "$ZodError", Object.defineProperty(e, "_zod", {
854
+ value: e._zod,
855
+ enumerable: !1
856
+ }), Object.defineProperty(e, "issues", {
857
+ value: t,
858
+ enumerable: !1
859
+ }), Object.defineProperty(e, "message", {
860
+ get() {
861
+ return JSON.stringify(t, $o, 2);
862
+ },
863
+ enumerable: !0
864
+ // configurable: false,
865
+ });
866
+ }, nr = c("$ZodError", rr), or = c("$ZodError", rr, { Parent: Error });
867
+ function No(e, t = (r) => r.message) {
868
+ const r = {}, n = [];
869
+ for (const o of e.issues)
870
+ o.path.length > 0 ? (r[o.path[0]] = r[o.path[0]] || [], r[o.path[0]].push(t(o))) : n.push(t(o));
871
+ return { formErrors: n, fieldErrors: r };
872
+ }
873
+ function Ao(e, t) {
874
+ const r = t || function(s) {
875
+ return s.message;
876
+ }, n = { _errors: [] }, o = (s) => {
877
+ for (const i of s.issues)
878
+ if (i.code === "invalid_union" && i.errors.length)
879
+ i.errors.map((u) => o({ issues: u }));
880
+ else if (i.code === "invalid_key")
881
+ o({ issues: i.issues });
882
+ else if (i.code === "invalid_element")
883
+ o({ issues: i.issues });
884
+ else if (i.path.length === 0)
885
+ n._errors.push(r(i));
886
+ else {
887
+ let u = n, p = 0;
888
+ for (; p < i.path.length; ) {
889
+ const f = i.path[p];
890
+ p === i.path.length - 1 ? (u[f] = u[f] || { _errors: [] }, u[f]._errors.push(r(i))) : u[f] = u[f] || { _errors: [] }, u = u[f], p++;
891
+ }
892
+ }
893
+ };
894
+ return o(e), n;
895
+ }
896
+ const Ro = (e) => (t, r, n, o) => {
897
+ const s = n ? Object.assign(n, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: r, issues: [] }, s);
898
+ if (i instanceof Promise)
899
+ throw new oe();
900
+ if (i.issues.length) {
901
+ const u = new (o?.Err ?? e)(i.issues.map((p) => Y(p, s, V())));
902
+ throw Error.captureStackTrace(u, o?.callee), u;
903
+ }
904
+ return i.value;
905
+ }, Io = (e) => async (t, r, n, o) => {
906
+ const s = n ? Object.assign(n, { async: !0 }) : { async: !0 };
907
+ let i = t._zod.run({ value: r, issues: [] }, s);
908
+ if (i instanceof Promise && (i = await i), i.issues.length) {
909
+ const u = new (o?.Err ?? e)(i.issues.map((p) => Y(p, s, V())));
910
+ throw Error.captureStackTrace(u, o?.callee), u;
911
+ }
912
+ return i.value;
913
+ }, sr = (e) => (t, r, n) => {
914
+ const o = n ? { ...n, async: !1 } : { async: !1 }, s = t._zod.run({ value: r, issues: [] }, o);
915
+ if (s instanceof Promise)
916
+ throw new oe();
917
+ return s.issues.length ? {
918
+ success: !1,
919
+ error: new (e ?? nr)(s.issues.map((i) => Y(i, o, V())))
920
+ } : { success: !0, data: s.value };
921
+ }, Do = /* @__PURE__ */ sr(or), ar = (e) => async (t, r, n) => {
922
+ const o = n ? Object.assign(n, { async: !0 }) : { async: !0 };
923
+ let s = t._zod.run({ value: r, issues: [] }, o);
924
+ return s instanceof Promise && (s = await s), s.issues.length ? {
925
+ success: !1,
926
+ error: new e(s.issues.map((i) => Y(i, o, V())))
927
+ } : { success: !0, data: s.value };
928
+ }, Mo = /* @__PURE__ */ ar(or), Fo = /^[cC][^\s-]{8,}$/, qo = /^[0-9a-z]+$/, Uo = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Lo = /^[0-9a-vA-V]{20}$/, Qo = /^[A-Za-z0-9]{27}$/, Bo = /^[a-zA-Z0-9_-]{21}$/, Ho = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Ko = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, ct = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/, Wo = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Vo = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
929
+ function Yo() {
930
+ return new RegExp(Vo, "u");
931
+ }
932
+ const Go = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Jo = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/, Xo = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, es = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ts = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ir = /^[A-Za-z0-9_-]*$/, rs = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, ns = /^\+(?:[0-9]){6,14}[0-9]$/, cr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", os = /* @__PURE__ */ new RegExp(`^${cr}$`);
933
+ function ur(e) {
934
+ let t = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
935
+ return e.precision ? t = `${t}\\.\\d{${e.precision}}` : e.precision == null && (t = `${t}(\\.\\d+)?`), t;
936
+ }
937
+ function ss(e) {
938
+ return new RegExp(`^${ur(e)}$`);
939
+ }
940
+ function as(e) {
941
+ let t = `${cr}T${ur(e)}`;
942
+ const r = [];
943
+ return r.push(e.local ? "Z?" : "Z"), e.offset && r.push("([+-]\\d{2}:?\\d{2})"), t = `${t}(${r.join("|")})`, new RegExp(`^${t}$`);
944
+ }
945
+ const is = (e) => {
946
+ const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
947
+ return new RegExp(`^${t}$`);
948
+ }, cs = /^[^A-Z]*$/, us = /^[^a-z]*$/, U = /* @__PURE__ */ c("$ZodCheck", (e, t) => {
949
+ var r;
950
+ e._zod ?? (e._zod = {}), e._zod.def = t, (r = e._zod).onattach ?? (r.onattach = []);
951
+ }), ls = /* @__PURE__ */ c("$ZodCheckMaxLength", (e, t) => {
952
+ U.init(e, t), e._zod.when = (r) => {
953
+ const n = r.value;
954
+ return !Me(n) && n.length !== void 0;
955
+ }, e._zod.onattach.push((r) => {
956
+ const n = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
957
+ t.maximum < n && (r._zod.bag.maximum = t.maximum);
958
+ }), e._zod.check = (r) => {
959
+ const n = r.value;
960
+ if (n.length <= t.maximum)
961
+ return;
962
+ const s = Le(n);
963
+ r.issues.push({
964
+ origin: s,
965
+ code: "too_big",
966
+ maximum: t.maximum,
967
+ inclusive: !0,
968
+ input: n,
969
+ inst: e,
970
+ continue: !t.abort
971
+ });
972
+ };
973
+ }), ds = /* @__PURE__ */ c("$ZodCheckMinLength", (e, t) => {
974
+ U.init(e, t), e._zod.when = (r) => {
975
+ const n = r.value;
976
+ return !Me(n) && n.length !== void 0;
977
+ }, e._zod.onattach.push((r) => {
978
+ const n = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
979
+ t.minimum > n && (r._zod.bag.minimum = t.minimum);
980
+ }), e._zod.check = (r) => {
981
+ const n = r.value;
982
+ if (n.length >= t.minimum)
983
+ return;
984
+ const s = Le(n);
985
+ r.issues.push({
986
+ origin: s,
987
+ code: "too_small",
988
+ minimum: t.minimum,
989
+ inclusive: !0,
990
+ input: n,
991
+ inst: e,
992
+ continue: !t.abort
993
+ });
994
+ };
995
+ }), fs = /* @__PURE__ */ c("$ZodCheckLengthEquals", (e, t) => {
996
+ U.init(e, t), e._zod.when = (r) => {
997
+ const n = r.value;
998
+ return !Me(n) && n.length !== void 0;
999
+ }, e._zod.onattach.push((r) => {
1000
+ const n = r._zod.bag;
1001
+ n.minimum = t.length, n.maximum = t.length, n.length = t.length;
1002
+ }), e._zod.check = (r) => {
1003
+ const n = r.value, o = n.length;
1004
+ if (o === t.length)
1005
+ return;
1006
+ const s = Le(n), i = o > t.length;
1007
+ r.issues.push({
1008
+ origin: s,
1009
+ ...i ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
1010
+ input: r.value,
1011
+ inst: e,
1012
+ continue: !t.abort
1013
+ });
1014
+ };
1015
+ }), be = /* @__PURE__ */ c("$ZodCheckStringFormat", (e, t) => {
1016
+ var r;
1017
+ U.init(e, t), e._zod.onattach.push((n) => {
1018
+ const o = n._zod.bag;
1019
+ o.format = t.format, t.pattern && (o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(t.pattern));
1020
+ }), (r = e._zod).check ?? (r.check = (n) => {
1021
+ if (!t.pattern)
1022
+ throw new Error("Not implemented.");
1023
+ t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
1024
+ origin: "string",
1025
+ code: "invalid_format",
1026
+ format: t.format,
1027
+ input: n.value,
1028
+ ...t.pattern ? { pattern: t.pattern.toString() } : {},
1029
+ inst: e,
1030
+ continue: !t.abort
1031
+ });
1032
+ });
1033
+ }), hs = /* @__PURE__ */ c("$ZodCheckRegex", (e, t) => {
1034
+ be.init(e, t), e._zod.check = (r) => {
1035
+ t.pattern.lastIndex = 0, !t.pattern.test(r.value) && r.issues.push({
1036
+ origin: "string",
1037
+ code: "invalid_format",
1038
+ format: "regex",
1039
+ input: r.value,
1040
+ pattern: t.pattern.toString(),
1041
+ inst: e,
1042
+ continue: !t.abort
1043
+ });
1044
+ };
1045
+ }), ps = /* @__PURE__ */ c("$ZodCheckLowerCase", (e, t) => {
1046
+ t.pattern ?? (t.pattern = cs), be.init(e, t);
1047
+ }), ms = /* @__PURE__ */ c("$ZodCheckUpperCase", (e, t) => {
1048
+ t.pattern ?? (t.pattern = us), be.init(e, t);
1049
+ }), gs = /* @__PURE__ */ c("$ZodCheckIncludes", (e, t) => {
1050
+ U.init(e, t);
1051
+ const r = _e(t.includes), n = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${r}` : r);
1052
+ t.pattern = n, e._zod.onattach.push((o) => {
1053
+ const s = o._zod.bag;
1054
+ s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(n);
1055
+ }), e._zod.check = (o) => {
1056
+ o.value.includes(t.includes, t.position) || o.issues.push({
1057
+ origin: "string",
1058
+ code: "invalid_format",
1059
+ format: "includes",
1060
+ includes: t.includes,
1061
+ input: o.value,
1062
+ inst: e,
1063
+ continue: !t.abort
1064
+ });
1065
+ };
1066
+ }), vs = /* @__PURE__ */ c("$ZodCheckStartsWith", (e, t) => {
1067
+ U.init(e, t);
1068
+ const r = new RegExp(`^${_e(t.prefix)}.*`);
1069
+ t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
1070
+ const o = n._zod.bag;
1071
+ o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(r);
1072
+ }), e._zod.check = (n) => {
1073
+ n.value.startsWith(t.prefix) || n.issues.push({
1074
+ origin: "string",
1075
+ code: "invalid_format",
1076
+ format: "starts_with",
1077
+ prefix: t.prefix,
1078
+ input: n.value,
1079
+ inst: e,
1080
+ continue: !t.abort
1081
+ });
1082
+ };
1083
+ }), ys = /* @__PURE__ */ c("$ZodCheckEndsWith", (e, t) => {
1084
+ U.init(e, t);
1085
+ const r = new RegExp(`.*${_e(t.suffix)}$`);
1086
+ t.pattern ?? (t.pattern = r), e._zod.onattach.push((n) => {
1087
+ const o = n._zod.bag;
1088
+ o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(r);
1089
+ }), e._zod.check = (n) => {
1090
+ n.value.endsWith(t.suffix) || n.issues.push({
1091
+ origin: "string",
1092
+ code: "invalid_format",
1093
+ format: "ends_with",
1094
+ suffix: t.suffix,
1095
+ input: n.value,
1096
+ inst: e,
1097
+ continue: !t.abort
1098
+ });
1099
+ };
1100
+ }), xs = /* @__PURE__ */ c("$ZodCheckOverwrite", (e, t) => {
1101
+ U.init(e, t), e._zod.check = (r) => {
1102
+ r.value = t.tx(r.value);
1103
+ };
1104
+ });
1105
+ class _s {
1106
+ constructor(t = []) {
1107
+ this.content = [], this.indent = 0, this && (this.args = t);
1108
+ }
1109
+ indented(t) {
1110
+ this.indent += 1, t(this), this.indent -= 1;
1111
+ }
1112
+ write(t) {
1113
+ if (typeof t == "function") {
1114
+ t(this, { execution: "sync" }), t(this, { execution: "async" });
1115
+ return;
1116
+ }
1117
+ const n = t.split(`
1118
+ `).filter((i) => i), o = Math.min(...n.map((i) => i.length - i.trimStart().length)), s = n.map((i) => i.slice(o)).map((i) => " ".repeat(this.indent * 2) + i);
1119
+ for (const i of s)
1120
+ this.content.push(i);
1121
+ }
1122
+ compile() {
1123
+ const t = Function, r = this?.args, o = [...(this?.content ?? [""]).map((s) => ` ${s}`)];
1124
+ return new t(...r, o.join(`
1125
+ `));
1126
+ }
1127
+ }
1128
+ const bs = {
1129
+ major: 4,
1130
+ minor: 0,
1131
+ patch: 0
1132
+ }, C = /* @__PURE__ */ c("$ZodType", (e, t) => {
1133
+ var r;
1134
+ e ?? (e = {}), e._zod.id = t.type + "_" + tr(10), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = bs;
1135
+ const n = [...e._zod.def.checks ?? []];
1136
+ e._zod.traits.has("$ZodCheck") && n.unshift(e);
1137
+ for (const o of n)
1138
+ for (const s of o._zod.onattach)
1139
+ s(e);
1140
+ if (n.length === 0)
1141
+ (r = e._zod).deferred ?? (r.deferred = []), e._zod.deferred?.push(() => {
1142
+ e._zod.run = e._zod.parse;
1143
+ });
1144
+ else {
1145
+ const o = (s, i, u) => {
1146
+ let p = re(s), f;
1147
+ for (const x of i) {
1148
+ if (x._zod.when) {
1149
+ if (!x._zod.when(s))
1150
+ continue;
1151
+ } else if (p)
1152
+ continue;
1153
+ const m = s.issues.length, h = x._zod.check(s);
1154
+ if (h instanceof Promise && u?.async === !1)
1155
+ throw new oe();
1156
+ if (f || h instanceof Promise)
1157
+ f = (f ?? Promise.resolve()).then(async () => {
1158
+ await h, s.issues.length !== m && (p || (p = re(s, m)));
1159
+ });
1160
+ else {
1161
+ if (s.issues.length === m)
1162
+ continue;
1163
+ p || (p = re(s, m));
1164
+ }
1165
+ }
1166
+ return f ? f.then(() => s) : s;
1167
+ };
1168
+ e._zod.run = (s, i) => {
1169
+ const u = e._zod.parse(s, i);
1170
+ if (u instanceof Promise) {
1171
+ if (i.async === !1)
1172
+ throw new oe();
1173
+ return u.then((p) => o(p, n, i));
1174
+ }
1175
+ return o(u, n, i);
1176
+ };
1177
+ }
1178
+ e["~standard"] = {
1179
+ validate: (o) => {
1180
+ try {
1181
+ const s = Do(e, o);
1182
+ return s.success ? { value: s.data } : { issues: s.error?.issues };
1183
+ } catch {
1184
+ return Mo(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
1185
+ }
1186
+ },
1187
+ vendor: "zod",
1188
+ version: 1
1189
+ };
1190
+ }), Qe = /* @__PURE__ */ c("$ZodString", (e, t) => {
1191
+ C.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? is(e._zod.bag), e._zod.parse = (r, n) => {
1192
+ if (t.coerce)
1193
+ try {
1194
+ r.value = String(r.value);
1195
+ } catch {
1196
+ }
1197
+ return typeof r.value == "string" || r.issues.push({
1198
+ expected: "string",
1199
+ code: "invalid_type",
1200
+ input: r.value,
1201
+ inst: e
1202
+ }), r;
1203
+ };
1204
+ }), E = /* @__PURE__ */ c("$ZodStringFormat", (e, t) => {
1205
+ be.init(e, t), Qe.init(e, t);
1206
+ }), ws = /* @__PURE__ */ c("$ZodGUID", (e, t) => {
1207
+ t.pattern ?? (t.pattern = Ko), E.init(e, t);
1208
+ }), js = /* @__PURE__ */ c("$ZodUUID", (e, t) => {
1209
+ if (t.version) {
1210
+ const n = {
1211
+ v1: 1,
1212
+ v2: 2,
1213
+ v3: 3,
1214
+ v4: 4,
1215
+ v5: 5,
1216
+ v6: 6,
1217
+ v7: 7,
1218
+ v8: 8
1219
+ }[t.version];
1220
+ if (n === void 0)
1221
+ throw new Error(`Invalid UUID version: "${t.version}"`);
1222
+ t.pattern ?? (t.pattern = ct(n));
1223
+ } else
1224
+ t.pattern ?? (t.pattern = ct());
1225
+ E.init(e, t);
1226
+ }), $s = /* @__PURE__ */ c("$ZodEmail", (e, t) => {
1227
+ t.pattern ?? (t.pattern = Wo), E.init(e, t);
1228
+ }), ks = /* @__PURE__ */ c("$ZodURL", (e, t) => {
1229
+ E.init(e, t), e._zod.check = (r) => {
1230
+ try {
1231
+ const n = new URL(r.value);
1232
+ t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(n.hostname) || r.issues.push({
1233
+ code: "invalid_format",
1234
+ format: "url",
1235
+ note: "Invalid hostname",
1236
+ pattern: rs.source,
1237
+ input: r.value,
1238
+ inst: e,
1239
+ continue: !t.abort
1240
+ })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(n.protocol.endsWith(":") ? n.protocol.slice(0, -1) : n.protocol) || r.issues.push({
1241
+ code: "invalid_format",
1242
+ format: "url",
1243
+ note: "Invalid protocol",
1244
+ pattern: t.protocol.source,
1245
+ input: r.value,
1246
+ inst: e,
1247
+ continue: !t.abort
1248
+ }));
1249
+ return;
1250
+ } catch {
1251
+ r.issues.push({
1252
+ code: "invalid_format",
1253
+ format: "url",
1254
+ input: r.value,
1255
+ inst: e,
1256
+ continue: !t.abort
1257
+ });
1258
+ }
1259
+ };
1260
+ }), zs = /* @__PURE__ */ c("$ZodEmoji", (e, t) => {
1261
+ t.pattern ?? (t.pattern = Yo()), E.init(e, t);
1262
+ }), Ps = /* @__PURE__ */ c("$ZodNanoID", (e, t) => {
1263
+ t.pattern ?? (t.pattern = Bo), E.init(e, t);
1264
+ }), Es = /* @__PURE__ */ c("$ZodCUID", (e, t) => {
1265
+ t.pattern ?? (t.pattern = Fo), E.init(e, t);
1266
+ }), Ss = /* @__PURE__ */ c("$ZodCUID2", (e, t) => {
1267
+ t.pattern ?? (t.pattern = qo), E.init(e, t);
1268
+ }), Zs = /* @__PURE__ */ c("$ZodULID", (e, t) => {
1269
+ t.pattern ?? (t.pattern = Uo), E.init(e, t);
1270
+ }), Ts = /* @__PURE__ */ c("$ZodXID", (e, t) => {
1271
+ t.pattern ?? (t.pattern = Lo), E.init(e, t);
1272
+ }), Cs = /* @__PURE__ */ c("$ZodKSUID", (e, t) => {
1273
+ t.pattern ?? (t.pattern = Qo), E.init(e, t);
1274
+ }), Os = /* @__PURE__ */ c("$ZodISODateTime", (e, t) => {
1275
+ t.pattern ?? (t.pattern = as(t)), E.init(e, t);
1276
+ }), Ns = /* @__PURE__ */ c("$ZodISODate", (e, t) => {
1277
+ t.pattern ?? (t.pattern = os), E.init(e, t);
1278
+ }), As = /* @__PURE__ */ c("$ZodISOTime", (e, t) => {
1279
+ t.pattern ?? (t.pattern = ss(t)), E.init(e, t);
1280
+ }), Rs = /* @__PURE__ */ c("$ZodISODuration", (e, t) => {
1281
+ t.pattern ?? (t.pattern = Ho), E.init(e, t);
1282
+ }), Is = /* @__PURE__ */ c("$ZodIPv4", (e, t) => {
1283
+ t.pattern ?? (t.pattern = Go), E.init(e, t), e._zod.onattach.push((r) => {
1284
+ const n = r._zod.bag;
1285
+ n.format = "ipv4";
1286
+ });
1287
+ }), Ds = /* @__PURE__ */ c("$ZodIPv6", (e, t) => {
1288
+ t.pattern ?? (t.pattern = Jo), E.init(e, t), e._zod.onattach.push((r) => {
1289
+ const n = r._zod.bag;
1290
+ n.format = "ipv6";
1291
+ }), e._zod.check = (r) => {
1292
+ try {
1293
+ new URL(`http://[${r.value}]`);
1294
+ } catch {
1295
+ r.issues.push({
1296
+ code: "invalid_format",
1297
+ format: "ipv6",
1298
+ input: r.value,
1299
+ inst: e,
1300
+ continue: !t.abort
1301
+ });
1302
+ }
1303
+ };
1304
+ }), Ms = /* @__PURE__ */ c("$ZodCIDRv4", (e, t) => {
1305
+ t.pattern ?? (t.pattern = Xo), E.init(e, t);
1306
+ }), Fs = /* @__PURE__ */ c("$ZodCIDRv6", (e, t) => {
1307
+ t.pattern ?? (t.pattern = es), E.init(e, t), e._zod.check = (r) => {
1308
+ const [n, o] = r.value.split("/");
1309
+ try {
1310
+ if (!o)
1311
+ throw new Error();
1312
+ const s = Number(o);
1313
+ if (`${s}` !== o)
1314
+ throw new Error();
1315
+ if (s < 0 || s > 128)
1316
+ throw new Error();
1317
+ new URL(`http://[${n}]`);
1318
+ } catch {
1319
+ r.issues.push({
1320
+ code: "invalid_format",
1321
+ format: "cidrv6",
1322
+ input: r.value,
1323
+ inst: e,
1324
+ continue: !t.abort
1325
+ });
1326
+ }
1327
+ };
1328
+ });
1329
+ function lr(e) {
1330
+ if (e === "")
1331
+ return !0;
1332
+ if (e.length % 4 !== 0)
1333
+ return !1;
1334
+ try {
1335
+ return atob(e), !0;
1336
+ } catch {
1337
+ return !1;
1338
+ }
1339
+ }
1340
+ const qs = /* @__PURE__ */ c("$ZodBase64", (e, t) => {
1341
+ t.pattern ?? (t.pattern = ts), E.init(e, t), e._zod.onattach.push((r) => {
1342
+ r._zod.bag.contentEncoding = "base64";
1343
+ }), e._zod.check = (r) => {
1344
+ lr(r.value) || r.issues.push({
1345
+ code: "invalid_format",
1346
+ format: "base64",
1347
+ input: r.value,
1348
+ inst: e,
1349
+ continue: !t.abort
1350
+ });
1351
+ };
1352
+ });
1353
+ function Us(e) {
1354
+ if (!ir.test(e))
1355
+ return !1;
1356
+ const t = e.replace(/[-_]/g, (n) => n === "-" ? "+" : "/"), r = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1357
+ return lr(r);
1358
+ }
1359
+ const Ls = /* @__PURE__ */ c("$ZodBase64URL", (e, t) => {
1360
+ t.pattern ?? (t.pattern = ir), E.init(e, t), e._zod.onattach.push((r) => {
1361
+ r._zod.bag.contentEncoding = "base64url";
1362
+ }), e._zod.check = (r) => {
1363
+ Us(r.value) || r.issues.push({
1364
+ code: "invalid_format",
1365
+ format: "base64url",
1366
+ input: r.value,
1367
+ inst: e,
1368
+ continue: !t.abort
1369
+ });
1370
+ };
1371
+ }), Qs = /* @__PURE__ */ c("$ZodE164", (e, t) => {
1372
+ t.pattern ?? (t.pattern = ns), E.init(e, t);
1373
+ });
1374
+ function Bs(e, t = null) {
1375
+ try {
1376
+ const r = e.split(".");
1377
+ if (r.length !== 3)
1378
+ return !1;
1379
+ const [n] = r, o = JSON.parse(atob(n));
1380
+ return !("typ" in o && o?.typ !== "JWT" || !o.alg || t && (!("alg" in o) || o.alg !== t));
1381
+ } catch {
1382
+ return !1;
1383
+ }
1384
+ }
1385
+ const Hs = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
1386
+ E.init(e, t), e._zod.check = (r) => {
1387
+ Bs(r.value, t.alg) || r.issues.push({
1388
+ code: "invalid_format",
1389
+ format: "jwt",
1390
+ input: r.value,
1391
+ inst: e,
1392
+ continue: !t.abort
1393
+ });
1394
+ };
1395
+ }), Ks = /* @__PURE__ */ c("$ZodUnknown", (e, t) => {
1396
+ C.init(e, t), e._zod.parse = (r) => r;
1397
+ }), Ws = /* @__PURE__ */ c("$ZodNever", (e, t) => {
1398
+ C.init(e, t), e._zod.parse = (r, n) => (r.issues.push({
1399
+ expected: "never",
1400
+ code: "invalid_type",
1401
+ input: r.value,
1402
+ inst: e
1403
+ }), r);
1404
+ });
1405
+ function ut(e, t, r) {
1406
+ e.issues.length && t.issues.push(...Ue(r, e.issues)), t.value[r] = e.value;
1407
+ }
1408
+ const Vs = /* @__PURE__ */ c("$ZodArray", (e, t) => {
1409
+ C.init(e, t), e._zod.parse = (r, n) => {
1410
+ const o = r.value;
1411
+ if (!Array.isArray(o))
1412
+ return r.issues.push({
1413
+ expected: "array",
1414
+ code: "invalid_type",
1415
+ input: o,
1416
+ inst: e
1417
+ }), r;
1418
+ r.value = Array(o.length);
1419
+ const s = [];
1420
+ for (let i = 0; i < o.length; i++) {
1421
+ const u = o[i], p = t.element._zod.run({
1422
+ value: u,
1423
+ issues: []
1424
+ }, n);
1425
+ p instanceof Promise ? s.push(p.then((f) => ut(f, r, i))) : ut(p, r, i);
1426
+ }
1427
+ return s.length ? Promise.all(s).then(() => r) : r;
1428
+ };
1429
+ });
1430
+ function le(e, t, r) {
1431
+ e.issues.length && t.issues.push(...Ue(r, e.issues)), t.value[r] = e.value;
1432
+ }
1433
+ function lt(e, t, r, n) {
1434
+ e.issues.length ? n[r] === void 0 ? r in n ? t.value[r] = void 0 : t.value[r] = e.value : t.issues.push(...Ue(r, e.issues)) : e.value === void 0 ? r in n && (t.value[r] = void 0) : t.value[r] = e.value;
1435
+ }
1436
+ const Ys = /* @__PURE__ */ c("$ZodObject", (e, t) => {
1437
+ C.init(e, t);
1438
+ const r = er(() => {
1439
+ const m = Object.keys(t.shape);
1440
+ for (const l of m)
1441
+ if (!(t.shape[l] instanceof C))
1442
+ throw new Error(`Invalid element at key "${l}": expected a Zod schema`);
1443
+ const h = Po(t.shape);
1444
+ return {
1445
+ shape: t.shape,
1446
+ keys: m,
1447
+ keySet: new Set(m),
1448
+ numKeys: m.length,
1449
+ optionalKeys: new Set(h)
1450
+ };
1451
+ });
1452
+ T(e._zod, "propValues", () => {
1453
+ const m = t.shape, h = {};
1454
+ for (const l in m) {
1455
+ const g = m[l]._zod;
1456
+ if (g.values) {
1457
+ h[l] ?? (h[l] = /* @__PURE__ */ new Set());
1458
+ for (const w of g.values)
1459
+ h[l].add(w);
1460
+ }
1461
+ }
1462
+ return h;
1463
+ });
1464
+ const n = (m) => {
1465
+ const h = new _s(["shape", "payload", "ctx"]), { keys: l, optionalKeys: g } = r.value, w = (j) => {
1466
+ const y = te(j);
1467
+ return `shape[${y}]._zod.run({ value: input[${y}], issues: [] }, ctx)`;
1468
+ };
1469
+ h.write("const input = payload.value;");
1470
+ const P = /* @__PURE__ */ Object.create(null);
1471
+ for (const j of l)
1472
+ P[j] = tr(15);
1473
+ h.write("const newResult = {}");
1474
+ for (const j of l)
1475
+ if (g.has(j)) {
1476
+ const y = P[j];
1477
+ h.write(`const ${y} = ${w(j)};`);
1478
+ const b = te(j);
1479
+ h.write(`
1480
+ if (${y}.issues.length) {
1481
+ if (input[${b}] === undefined) {
1482
+ if (${b} in input) {
1483
+ newResult[${b}] = undefined;
1484
+ }
1485
+ } else {
1486
+ payload.issues = payload.issues.concat(
1487
+ ${y}.issues.map((iss) => ({
1488
+ ...iss,
1489
+ path: iss.path ? [${b}, ...iss.path] : [${b}],
1490
+ }))
1491
+ );
1492
+ }
1493
+ } else if (${y}.value === undefined) {
1494
+ if (${b} in input) newResult[${b}] = undefined;
1495
+ } else {
1496
+ newResult[${b}] = ${y}.value;
1497
+ }
1498
+ `);
1499
+ } else {
1500
+ const y = P[j];
1501
+ h.write(`const ${y} = ${w(j)};`), h.write(`
1502
+ if (${y}.issues.length) payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
1503
+ ...iss,
1504
+ path: iss.path ? [${te(j)}, ...iss.path] : [${te(j)}]
1505
+ })));`), h.write(`newResult[${te(j)}] = ${y}.value`);
1506
+ }
1507
+ h.write("payload.value = newResult;"), h.write("return payload;");
1508
+ const Z = h.compile();
1509
+ return (j, y) => Z(m, j, y);
1510
+ };
1511
+ let o;
1512
+ const s = Te, i = !Xt.jitless, p = i && ko.value, { catchall: f } = t;
1513
+ let x;
1514
+ e._zod.parse = (m, h) => {
1515
+ x ?? (x = r.value);
1516
+ const l = m.value;
1517
+ if (!s(l))
1518
+ return m.issues.push({
1519
+ expected: "object",
1520
+ code: "invalid_type",
1521
+ input: l,
1522
+ inst: e
1523
+ }), m;
1524
+ const g = [];
1525
+ if (i && p && h?.async === !1 && h.jitless !== !0)
1526
+ o || (o = n(t.shape)), m = o(m, h);
1527
+ else {
1528
+ m.value = {};
1529
+ const y = x.shape;
1530
+ for (const b of x.keys) {
1531
+ const d = y[b], z = d._zod.run({ value: l[b], issues: [] }, h), R = d._zod.optin === "optional" && d._zod.optout === "optional";
1532
+ z instanceof Promise ? g.push(z.then((D) => R ? lt(D, m, b, l) : le(D, m, b))) : R ? lt(z, m, b, l) : le(z, m, b);
1533
+ }
1534
+ }
1535
+ if (!f)
1536
+ return g.length ? Promise.all(g).then(() => m) : m;
1537
+ const w = [], P = x.keySet, Z = f._zod, j = Z.def.type;
1538
+ for (const y of Object.keys(l)) {
1539
+ if (P.has(y))
1540
+ continue;
1541
+ if (j === "never") {
1542
+ w.push(y);
1543
+ continue;
1544
+ }
1545
+ const b = Z.run({ value: l[y], issues: [] }, h);
1546
+ b instanceof Promise ? g.push(b.then((d) => le(d, m, y))) : le(b, m, y);
1547
+ }
1548
+ return w.length && m.issues.push({
1549
+ code: "unrecognized_keys",
1550
+ keys: w,
1551
+ input: l,
1552
+ inst: e
1553
+ }), g.length ? Promise.all(g).then(() => m) : m;
1554
+ };
1555
+ });
1556
+ function dt(e, t, r, n) {
1557
+ for (const o of e)
1558
+ if (o.issues.length === 0)
1559
+ return t.value = o.value, t;
1560
+ return t.issues.push({
1561
+ code: "invalid_union",
1562
+ input: t.value,
1563
+ inst: r,
1564
+ errors: e.map((o) => o.issues.map((s) => Y(s, n, V())))
1565
+ }), t;
1566
+ }
1567
+ const Gs = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
1568
+ C.init(e, t), T(e._zod, "values", () => {
1569
+ if (t.options.every((r) => r._zod.values))
1570
+ return new Set(t.options.flatMap((r) => Array.from(r._zod.values)));
1571
+ }), T(e._zod, "pattern", () => {
1572
+ if (t.options.every((r) => r._zod.pattern)) {
1573
+ const r = t.options.map((n) => n._zod.pattern);
1574
+ return new RegExp(`^(${r.map((n) => Fe(n.source)).join("|")})$`);
1575
+ }
1576
+ }), e._zod.parse = (r, n) => {
1577
+ let o = !1;
1578
+ const s = [];
1579
+ for (const i of t.options) {
1580
+ const u = i._zod.run({
1581
+ value: r.value,
1582
+ issues: []
1583
+ }, n);
1584
+ if (u instanceof Promise)
1585
+ s.push(u), o = !0;
1586
+ else {
1587
+ if (u.issues.length === 0)
1588
+ return u;
1589
+ s.push(u);
1590
+ }
1591
+ }
1592
+ return o ? Promise.all(s).then((i) => dt(i, r, e, n)) : dt(s, r, e, n);
1593
+ };
1594
+ }), Js = /* @__PURE__ */ c("$ZodIntersection", (e, t) => {
1595
+ C.init(e, t), e._zod.parse = (r, n) => {
1596
+ const { value: o } = r, s = t.left._zod.run({ value: o, issues: [] }, n), i = t.right._zod.run({ value: o, issues: [] }, n);
1597
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([p, f]) => ft(r, p, f)) : ft(r, s, i);
1598
+ };
1599
+ });
1600
+ function Ce(e, t) {
1601
+ if (e === t)
1602
+ return { valid: !0, data: e };
1603
+ if (e instanceof Date && t instanceof Date && +e == +t)
1604
+ return { valid: !0, data: e };
1605
+ if (it(e) && it(t)) {
1606
+ const r = Object.keys(t), n = Object.keys(e).filter((s) => r.indexOf(s) !== -1), o = { ...e, ...t };
1607
+ for (const s of n) {
1608
+ const i = Ce(e[s], t[s]);
1609
+ if (!i.valid)
1610
+ return {
1611
+ valid: !1,
1612
+ mergeErrorPath: [s, ...i.mergeErrorPath]
1613
+ };
1614
+ o[s] = i.data;
1615
+ }
1616
+ return { valid: !0, data: o };
1617
+ }
1618
+ if (Array.isArray(e) && Array.isArray(t)) {
1619
+ if (e.length !== t.length)
1620
+ return { valid: !1, mergeErrorPath: [] };
1621
+ const r = [];
1622
+ for (let n = 0; n < e.length; n++) {
1623
+ const o = e[n], s = t[n], i = Ce(o, s);
1624
+ if (!i.valid)
1625
+ return {
1626
+ valid: !1,
1627
+ mergeErrorPath: [n, ...i.mergeErrorPath]
1628
+ };
1629
+ r.push(i.data);
1630
+ }
1631
+ return { valid: !0, data: r };
1632
+ }
1633
+ return { valid: !1, mergeErrorPath: [] };
1634
+ }
1635
+ function ft(e, t, r) {
1636
+ if (t.issues.length && e.issues.push(...t.issues), r.issues.length && e.issues.push(...r.issues), re(e))
1637
+ return e;
1638
+ const n = Ce(t.value, r.value);
1639
+ if (!n.valid)
1640
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);
1641
+ return e.value = n.data, e;
1642
+ }
1643
+ const Xs = /* @__PURE__ */ c("$ZodEnum", (e, t) => {
1644
+ C.init(e, t);
1645
+ const r = jo(t.entries);
1646
+ e._zod.values = new Set(r), e._zod.pattern = new RegExp(`^(${r.filter((n) => zo.has(typeof n)).map((n) => typeof n == "string" ? _e(n) : n.toString()).join("|")})$`), e._zod.parse = (n, o) => {
1647
+ const s = n.value;
1648
+ return e._zod.values.has(s) || n.issues.push({
1649
+ code: "invalid_value",
1650
+ values: r,
1651
+ input: s,
1652
+ inst: e
1653
+ }), n;
1654
+ };
1655
+ }), ea = /* @__PURE__ */ c("$ZodTransform", (e, t) => {
1656
+ C.init(e, t), e._zod.parse = (r, n) => {
1657
+ const o = t.transform(r.value, r);
1658
+ if (n.async)
1659
+ return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (r.value = i, r));
1660
+ if (o instanceof Promise)
1661
+ throw new oe();
1662
+ return r.value = o, r;
1663
+ };
1664
+ }), ta = /* @__PURE__ */ c("$ZodOptional", (e, t) => {
1665
+ C.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", T(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), T(e._zod, "pattern", () => {
1666
+ const r = t.innerType._zod.pattern;
1667
+ return r ? new RegExp(`^(${Fe(r.source)})?$`) : void 0;
1668
+ }), e._zod.parse = (r, n) => r.value === void 0 ? r : t.innerType._zod.run(r, n);
1669
+ }), ra = /* @__PURE__ */ c("$ZodNullable", (e, t) => {
1670
+ C.init(e, t), T(e._zod, "optin", () => t.innerType._zod.optin), T(e._zod, "optout", () => t.innerType._zod.optout), T(e._zod, "pattern", () => {
1671
+ const r = t.innerType._zod.pattern;
1672
+ return r ? new RegExp(`^(${Fe(r.source)}|null)$`) : void 0;
1673
+ }), T(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (r, n) => r.value === null ? r : t.innerType._zod.run(r, n);
1674
+ }), na = /* @__PURE__ */ c("$ZodDefault", (e, t) => {
1675
+ C.init(e, t), e._zod.optin = "optional", T(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
1676
+ if (r.value === void 0)
1677
+ return r.value = t.defaultValue, r;
1678
+ const o = t.innerType._zod.run(r, n);
1679
+ return o instanceof Promise ? o.then((s) => ht(s, t)) : ht(o, t);
1680
+ };
1681
+ });
1682
+ function ht(e, t) {
1683
+ return e.value === void 0 && (e.value = t.defaultValue), e;
1684
+ }
1685
+ const oa = /* @__PURE__ */ c("$ZodPrefault", (e, t) => {
1686
+ C.init(e, t), e._zod.optin = "optional", T(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => (r.value === void 0 && (r.value = t.defaultValue), t.innerType._zod.run(r, n));
1687
+ }), sa = /* @__PURE__ */ c("$ZodNonOptional", (e, t) => {
1688
+ C.init(e, t), T(e._zod, "values", () => {
1689
+ const r = t.innerType._zod.values;
1690
+ return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
1691
+ }), e._zod.parse = (r, n) => {
1692
+ const o = t.innerType._zod.run(r, n);
1693
+ return o instanceof Promise ? o.then((s) => pt(s, e)) : pt(o, e);
1694
+ };
1695
+ });
1696
+ function pt(e, t) {
1697
+ return !e.issues.length && e.value === void 0 && e.issues.push({
1698
+ code: "invalid_type",
1699
+ expected: "nonoptional",
1700
+ input: e.value,
1701
+ inst: t
1702
+ }), e;
1703
+ }
1704
+ const aa = /* @__PURE__ */ c("$ZodCatch", (e, t) => {
1705
+ C.init(e, t), T(e._zod, "optin", () => t.innerType._zod.optin), T(e._zod, "optout", () => t.innerType._zod.optout), T(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (r, n) => {
1706
+ const o = t.innerType._zod.run(r, n);
1707
+ return o instanceof Promise ? o.then((s) => (r.value = s.value, s.issues.length && (r.value = t.catchValue({
1708
+ ...r,
1709
+ error: {
1710
+ issues: s.issues.map((i) => Y(i, n, V()))
1711
+ },
1712
+ input: r.value
1713
+ }), r.issues = []), r)) : (r.value = o.value, o.issues.length && (r.value = t.catchValue({
1714
+ ...r,
1715
+ error: {
1716
+ issues: o.issues.map((s) => Y(s, n, V()))
1717
+ },
1718
+ input: r.value
1719
+ }), r.issues = []), r);
1720
+ };
1721
+ }), ia = /* @__PURE__ */ c("$ZodPipe", (e, t) => {
1722
+ C.init(e, t), T(e._zod, "values", () => t.in._zod.values), T(e._zod, "optin", () => t.in._zod.optin), T(e._zod, "optout", () => t.out._zod.optout), e._zod.parse = (r, n) => {
1723
+ const o = t.in._zod.run(r, n);
1724
+ return o instanceof Promise ? o.then((s) => mt(s, t, n)) : mt(o, t, n);
1725
+ };
1726
+ });
1727
+ function mt(e, t, r) {
1728
+ return re(e) ? e : t.out._zod.run({ value: e.value, issues: e.issues }, r);
1729
+ }
1730
+ const ca = /* @__PURE__ */ c("$ZodReadonly", (e, t) => {
1731
+ C.init(e, t), T(e._zod, "propValues", () => t.innerType._zod.propValues), T(e._zod, "optin", () => t.innerType._zod.optin), T(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (r, n) => {
1732
+ const o = t.innerType._zod.run(r, n);
1733
+ return o instanceof Promise ? o.then(gt) : gt(o);
1734
+ };
1735
+ });
1736
+ function gt(e) {
1737
+ return e.value = Object.freeze(e.value), e;
1738
+ }
1739
+ const ua = /* @__PURE__ */ c("$ZodCustom", (e, t) => {
1740
+ U.init(e, t), C.init(e, t), e._zod.parse = (r, n) => r, e._zod.check = (r) => {
1741
+ const n = r.value, o = t.fn(n);
1742
+ if (o instanceof Promise)
1743
+ return o.then((s) => vt(s, r, n, e));
1744
+ vt(o, r, n, e);
1745
+ };
1746
+ });
1747
+ function vt(e, t, r, n) {
1748
+ if (!e) {
1749
+ const o = {
1750
+ code: "custom",
1751
+ input: r,
1752
+ inst: n,
1753
+ // incorporates params.error into issue reporting
1754
+ path: [...n._zod.def.path ?? []],
1755
+ // incorporates params.error into issue reporting
1756
+ continue: !n._zod.def.abort
1757
+ // params: inst._zod.def.params,
1758
+ };
1759
+ n._zod.def.params && (o.params = n._zod.def.params), t.issues.push(se(o));
1760
+ }
1761
+ }
1762
+ class la {
1763
+ constructor() {
1764
+ this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1765
+ }
1766
+ add(t, ...r) {
1767
+ const n = r[0];
1768
+ if (this._map.set(t, n), n && typeof n == "object" && "id" in n) {
1769
+ if (this._idmap.has(n.id))
1770
+ throw new Error(`ID ${n.id} already exists in the registry`);
1771
+ this._idmap.set(n.id, t);
1772
+ }
1773
+ return this;
1774
+ }
1775
+ remove(t) {
1776
+ return this._map.delete(t), this;
1777
+ }
1778
+ get(t) {
1779
+ const r = t._zod.parent;
1780
+ if (r) {
1781
+ const n = { ...this.get(r) ?? {} };
1782
+ return delete n.id, { ...n, ...this._map.get(t) };
1783
+ }
1784
+ return this._map.get(t);
1785
+ }
1786
+ has(t) {
1787
+ return this._map.has(t);
1788
+ }
1789
+ }
1790
+ function da() {
1791
+ return new la();
1792
+ }
1793
+ const de = /* @__PURE__ */ da();
1794
+ function fa(e, t) {
1795
+ return new e({
1796
+ type: "string",
1797
+ ..._(t)
1798
+ });
1799
+ }
1800
+ function ha(e, t) {
1801
+ return new e({
1802
+ type: "string",
1803
+ format: "email",
1804
+ check: "string_format",
1805
+ abort: !1,
1806
+ ..._(t)
1807
+ });
1808
+ }
1809
+ function yt(e, t) {
1810
+ return new e({
1811
+ type: "string",
1812
+ format: "guid",
1813
+ check: "string_format",
1814
+ abort: !1,
1815
+ ..._(t)
1816
+ });
1817
+ }
1818
+ function pa(e, t) {
1819
+ return new e({
1820
+ type: "string",
1821
+ format: "uuid",
1822
+ check: "string_format",
1823
+ abort: !1,
1824
+ ..._(t)
1825
+ });
1826
+ }
1827
+ function ma(e, t) {
1828
+ return new e({
1829
+ type: "string",
1830
+ format: "uuid",
1831
+ check: "string_format",
1832
+ abort: !1,
1833
+ version: "v4",
1834
+ ..._(t)
1835
+ });
1836
+ }
1837
+ function ga(e, t) {
1838
+ return new e({
1839
+ type: "string",
1840
+ format: "uuid",
1841
+ check: "string_format",
1842
+ abort: !1,
1843
+ version: "v6",
1844
+ ..._(t)
1845
+ });
1846
+ }
1847
+ function va(e, t) {
1848
+ return new e({
1849
+ type: "string",
1850
+ format: "uuid",
1851
+ check: "string_format",
1852
+ abort: !1,
1853
+ version: "v7",
1854
+ ..._(t)
1855
+ });
1856
+ }
1857
+ function ya(e, t) {
1858
+ return new e({
1859
+ type: "string",
1860
+ format: "url",
1861
+ check: "string_format",
1862
+ abort: !1,
1863
+ ..._(t)
1864
+ });
1865
+ }
1866
+ function xa(e, t) {
1867
+ return new e({
1868
+ type: "string",
1869
+ format: "emoji",
1870
+ check: "string_format",
1871
+ abort: !1,
1872
+ ..._(t)
1873
+ });
1874
+ }
1875
+ function _a(e, t) {
1876
+ return new e({
1877
+ type: "string",
1878
+ format: "nanoid",
1879
+ check: "string_format",
1880
+ abort: !1,
1881
+ ..._(t)
1882
+ });
1883
+ }
1884
+ function ba(e, t) {
1885
+ return new e({
1886
+ type: "string",
1887
+ format: "cuid",
1888
+ check: "string_format",
1889
+ abort: !1,
1890
+ ..._(t)
1891
+ });
1892
+ }
1893
+ function wa(e, t) {
1894
+ return new e({
1895
+ type: "string",
1896
+ format: "cuid2",
1897
+ check: "string_format",
1898
+ abort: !1,
1899
+ ..._(t)
1900
+ });
1901
+ }
1902
+ function ja(e, t) {
1903
+ return new e({
1904
+ type: "string",
1905
+ format: "ulid",
1906
+ check: "string_format",
1907
+ abort: !1,
1908
+ ..._(t)
1909
+ });
1910
+ }
1911
+ function $a(e, t) {
1912
+ return new e({
1913
+ type: "string",
1914
+ format: "xid",
1915
+ check: "string_format",
1916
+ abort: !1,
1917
+ ..._(t)
1918
+ });
1919
+ }
1920
+ function ka(e, t) {
1921
+ return new e({
1922
+ type: "string",
1923
+ format: "ksuid",
1924
+ check: "string_format",
1925
+ abort: !1,
1926
+ ..._(t)
1927
+ });
1928
+ }
1929
+ function za(e, t) {
1930
+ return new e({
1931
+ type: "string",
1932
+ format: "ipv4",
1933
+ check: "string_format",
1934
+ abort: !1,
1935
+ ..._(t)
1936
+ });
1937
+ }
1938
+ function Pa(e, t) {
1939
+ return new e({
1940
+ type: "string",
1941
+ format: "ipv6",
1942
+ check: "string_format",
1943
+ abort: !1,
1944
+ ..._(t)
1945
+ });
1946
+ }
1947
+ function Ea(e, t) {
1948
+ return new e({
1949
+ type: "string",
1950
+ format: "cidrv4",
1951
+ check: "string_format",
1952
+ abort: !1,
1953
+ ..._(t)
1954
+ });
1955
+ }
1956
+ function Sa(e, t) {
1957
+ return new e({
1958
+ type: "string",
1959
+ format: "cidrv6",
1960
+ check: "string_format",
1961
+ abort: !1,
1962
+ ..._(t)
1963
+ });
1964
+ }
1965
+ function Za(e, t) {
1966
+ return new e({
1967
+ type: "string",
1968
+ format: "base64",
1969
+ check: "string_format",
1970
+ abort: !1,
1971
+ ..._(t)
1972
+ });
1973
+ }
1974
+ function Ta(e, t) {
1975
+ return new e({
1976
+ type: "string",
1977
+ format: "base64url",
1978
+ check: "string_format",
1979
+ abort: !1,
1980
+ ..._(t)
1981
+ });
1982
+ }
1983
+ function Ca(e, t) {
1984
+ return new e({
1985
+ type: "string",
1986
+ format: "e164",
1987
+ check: "string_format",
1988
+ abort: !1,
1989
+ ..._(t)
1990
+ });
1991
+ }
1992
+ function Oa(e, t) {
1993
+ return new e({
1994
+ type: "string",
1995
+ format: "jwt",
1996
+ check: "string_format",
1997
+ abort: !1,
1998
+ ..._(t)
1999
+ });
2000
+ }
2001
+ function Na(e, t) {
2002
+ return new e({
2003
+ type: "string",
2004
+ format: "datetime",
2005
+ check: "string_format",
2006
+ offset: !1,
2007
+ local: !1,
2008
+ precision: null,
2009
+ ..._(t)
2010
+ });
2011
+ }
2012
+ function Aa(e, t) {
2013
+ return new e({
2014
+ type: "string",
2015
+ format: "date",
2016
+ check: "string_format",
2017
+ ..._(t)
2018
+ });
2019
+ }
2020
+ function Ra(e, t) {
2021
+ return new e({
2022
+ type: "string",
2023
+ format: "time",
2024
+ check: "string_format",
2025
+ precision: null,
2026
+ ..._(t)
2027
+ });
2028
+ }
2029
+ function Ia(e, t) {
2030
+ return new e({
2031
+ type: "string",
2032
+ format: "duration",
2033
+ check: "string_format",
2034
+ ..._(t)
2035
+ });
2036
+ }
2037
+ function Da(e) {
2038
+ return new e({
2039
+ type: "unknown"
2040
+ });
2041
+ }
2042
+ function Ma(e, t) {
2043
+ return new e({
2044
+ type: "never",
2045
+ ..._(t)
2046
+ });
2047
+ }
2048
+ function dr(e, t) {
2049
+ return new ls({
2050
+ check: "max_length",
2051
+ ..._(t),
2052
+ maximum: e
2053
+ });
2054
+ }
2055
+ function ge(e, t) {
2056
+ return new ds({
2057
+ check: "min_length",
2058
+ ..._(t),
2059
+ minimum: e
2060
+ });
2061
+ }
2062
+ function fr(e, t) {
2063
+ return new fs({
2064
+ check: "length_equals",
2065
+ ..._(t),
2066
+ length: e
2067
+ });
2068
+ }
2069
+ function Fa(e, t) {
2070
+ return new hs({
2071
+ check: "string_format",
2072
+ format: "regex",
2073
+ ..._(t),
2074
+ pattern: e
2075
+ });
2076
+ }
2077
+ function qa(e) {
2078
+ return new ps({
2079
+ check: "string_format",
2080
+ format: "lowercase",
2081
+ ..._(e)
2082
+ });
2083
+ }
2084
+ function Ua(e) {
2085
+ return new ms({
2086
+ check: "string_format",
2087
+ format: "uppercase",
2088
+ ..._(e)
2089
+ });
2090
+ }
2091
+ function La(e, t) {
2092
+ return new gs({
2093
+ check: "string_format",
2094
+ format: "includes",
2095
+ ..._(t),
2096
+ includes: e
2097
+ });
2098
+ }
2099
+ function Qa(e, t) {
2100
+ return new vs({
2101
+ check: "string_format",
2102
+ format: "starts_with",
2103
+ ..._(t),
2104
+ prefix: e
2105
+ });
2106
+ }
2107
+ function Ba(e, t) {
2108
+ return new ys({
2109
+ check: "string_format",
2110
+ format: "ends_with",
2111
+ ..._(t),
2112
+ suffix: e
2113
+ });
2114
+ }
2115
+ function ae(e) {
2116
+ return new xs({
2117
+ check: "overwrite",
2118
+ tx: e
2119
+ });
2120
+ }
2121
+ function Ha(e) {
2122
+ return ae((t) => t.normalize(e));
2123
+ }
2124
+ function Ka() {
2125
+ return ae((e) => e.trim());
2126
+ }
2127
+ function Wa() {
2128
+ return ae((e) => e.toLowerCase());
2129
+ }
2130
+ function Va() {
2131
+ return ae((e) => e.toUpperCase());
2132
+ }
2133
+ function Ya(e, t, r) {
2134
+ return new e({
2135
+ type: "array",
2136
+ element: t,
2137
+ // get element() {
2138
+ // return element;
2139
+ // },
2140
+ ..._(r)
2141
+ });
2142
+ }
2143
+ function Ga(e, t, r) {
2144
+ return new e({
2145
+ type: "custom",
2146
+ check: "custom",
2147
+ fn: t,
2148
+ ..._(r)
2149
+ });
2150
+ }
2151
+ const Ja = /* @__PURE__ */ c("ZodISODateTime", (e, t) => {
2152
+ Os.init(e, t), S.init(e, t);
2153
+ });
2154
+ function Xa(e) {
2155
+ return Na(Ja, e);
2156
+ }
2157
+ const ei = /* @__PURE__ */ c("ZodISODate", (e, t) => {
2158
+ Ns.init(e, t), S.init(e, t);
2159
+ });
2160
+ function ti(e) {
2161
+ return Aa(ei, e);
2162
+ }
2163
+ const ri = /* @__PURE__ */ c("ZodISOTime", (e, t) => {
2164
+ As.init(e, t), S.init(e, t);
2165
+ });
2166
+ function ni(e) {
2167
+ return Ra(ri, e);
2168
+ }
2169
+ const oi = /* @__PURE__ */ c("ZodISODuration", (e, t) => {
2170
+ Rs.init(e, t), S.init(e, t);
2171
+ });
2172
+ function si(e) {
2173
+ return Ia(oi, e);
2174
+ }
2175
+ const ai = (e, t) => {
2176
+ nr.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2177
+ format: {
2178
+ value: (r) => Ao(e, r)
2179
+ // enumerable: false,
2180
+ },
2181
+ flatten: {
2182
+ value: (r) => No(e, r)
2183
+ // enumerable: false,
2184
+ },
2185
+ addIssue: {
2186
+ value: (r) => e.issues.push(r)
2187
+ // enumerable: false,
2188
+ },
2189
+ addIssues: {
2190
+ value: (r) => e.issues.push(...r)
2191
+ // enumerable: false,
2192
+ },
2193
+ isEmpty: {
2194
+ get() {
2195
+ return e.issues.length === 0;
2196
+ }
2197
+ // enumerable: false,
2198
+ }
2199
+ });
2200
+ }, we = c("ZodError", ai, {
2201
+ Parent: Error
2202
+ }), ii = /* @__PURE__ */ Ro(we), ci = /* @__PURE__ */ Io(we), ui = /* @__PURE__ */ sr(we), li = /* @__PURE__ */ ar(we), O = /* @__PURE__ */ c("ZodType", (e, t) => (C.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(
2203
+ {
2204
+ ...t,
2205
+ checks: [
2206
+ ...t.checks ?? [],
2207
+ ...r.map((n) => typeof n == "function" ? { _zod: { check: n, def: { check: "custom" }, onattach: [] } } : n)
2208
+ ]
2209
+ }
2210
+ // { parent: true }
2211
+ ), e.clone = (r, n) => J(e, r, n), e.brand = () => e, e.register = (r, n) => (r.add(e, n), e), e.parse = (r, n) => ii(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => ui(e, r, n), e.parseAsync = async (r, n) => ci(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => li(e, r, n), e.spa = e.safeParseAsync, e.refine = (r, n) => e.check(tc(r, n)), e.superRefine = (r) => e.check(rc(r)), e.overwrite = (r) => e.check(ae(r)), e.optional = () => wt(e), e.nullable = () => jt(e), e.nullish = () => wt(jt(e)), e.nonoptional = (r) => Ki(e, r), e.array = () => Oi(e), e.or = (r) => Ii([e, r]), e.and = (r) => Mi(e, r), e.transform = (r) => $t(e, qi(r)), e.default = (r) => Qi(e, r), e.prefault = (r) => Hi(e, r), e.catch = (r) => Vi(e, r), e.pipe = (r) => $t(e, r), e.readonly = () => Ji(e), e.describe = (r) => {
2212
+ const n = e.clone();
2213
+ return de.add(n, { description: r }), n;
2214
+ }, Object.defineProperty(e, "description", {
2215
+ get() {
2216
+ return de.get(e)?.description;
2217
+ },
2218
+ configurable: !0
2219
+ }), e.meta = (...r) => {
2220
+ if (r.length === 0)
2221
+ return de.get(e);
2222
+ const n = e.clone();
2223
+ return de.add(n, r[0]), n;
2224
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), hr = /* @__PURE__ */ c("_ZodString", (e, t) => {
2225
+ Qe.init(e, t), O.init(e, t);
2226
+ const r = e._zod.bag;
2227
+ e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(Fa(...n)), e.includes = (...n) => e.check(La(...n)), e.startsWith = (...n) => e.check(Qa(...n)), e.endsWith = (...n) => e.check(Ba(...n)), e.min = (...n) => e.check(ge(...n)), e.max = (...n) => e.check(dr(...n)), e.length = (...n) => e.check(fr(...n)), e.nonempty = (...n) => e.check(ge(1, ...n)), e.lowercase = (n) => e.check(qa(n)), e.uppercase = (n) => e.check(Ua(n)), e.trim = () => e.check(Ka()), e.normalize = (...n) => e.check(Ha(...n)), e.toLowerCase = () => e.check(Wa()), e.toUpperCase = () => e.check(Va());
2228
+ }), di = /* @__PURE__ */ c("ZodString", (e, t) => {
2229
+ Qe.init(e, t), hr.init(e, t), e.email = (r) => e.check(ha(fi, r)), e.url = (r) => e.check(ya(hi, r)), e.jwt = (r) => e.check(Oa(Ei, r)), e.emoji = (r) => e.check(xa(pi, r)), e.guid = (r) => e.check(yt(_t, r)), e.uuid = (r) => e.check(pa(fe, r)), e.uuidv4 = (r) => e.check(ma(fe, r)), e.uuidv6 = (r) => e.check(ga(fe, r)), e.uuidv7 = (r) => e.check(va(fe, r)), e.nanoid = (r) => e.check(_a(mi, r)), e.guid = (r) => e.check(yt(_t, r)), e.cuid = (r) => e.check(ba(gi, r)), e.cuid2 = (r) => e.check(wa(vi, r)), e.ulid = (r) => e.check(ja(yi, r)), e.base64 = (r) => e.check(Za(ki, r)), e.base64url = (r) => e.check(Ta(zi, r)), e.xid = (r) => e.check($a(xi, r)), e.ksuid = (r) => e.check(ka(_i, r)), e.ipv4 = (r) => e.check(za(bi, r)), e.ipv6 = (r) => e.check(Pa(wi, r)), e.cidrv4 = (r) => e.check(Ea(ji, r)), e.cidrv6 = (r) => e.check(Sa($i, r)), e.e164 = (r) => e.check(Ca(Pi, r)), e.datetime = (r) => e.check(Xa(r)), e.date = (r) => e.check(ti(r)), e.time = (r) => e.check(ni(r)), e.duration = (r) => e.check(si(r));
2230
+ });
2231
+ function xt(e) {
2232
+ return fa(di, e);
2233
+ }
2234
+ const S = /* @__PURE__ */ c("ZodStringFormat", (e, t) => {
2235
+ E.init(e, t), hr.init(e, t);
2236
+ }), fi = /* @__PURE__ */ c("ZodEmail", (e, t) => {
2237
+ $s.init(e, t), S.init(e, t);
2238
+ }), _t = /* @__PURE__ */ c("ZodGUID", (e, t) => {
2239
+ ws.init(e, t), S.init(e, t);
2240
+ }), fe = /* @__PURE__ */ c("ZodUUID", (e, t) => {
2241
+ js.init(e, t), S.init(e, t);
2242
+ }), hi = /* @__PURE__ */ c("ZodURL", (e, t) => {
2243
+ ks.init(e, t), S.init(e, t);
2244
+ }), pi = /* @__PURE__ */ c("ZodEmoji", (e, t) => {
2245
+ zs.init(e, t), S.init(e, t);
2246
+ }), mi = /* @__PURE__ */ c("ZodNanoID", (e, t) => {
2247
+ Ps.init(e, t), S.init(e, t);
2248
+ }), gi = /* @__PURE__ */ c("ZodCUID", (e, t) => {
2249
+ Es.init(e, t), S.init(e, t);
2250
+ }), vi = /* @__PURE__ */ c("ZodCUID2", (e, t) => {
2251
+ Ss.init(e, t), S.init(e, t);
2252
+ }), yi = /* @__PURE__ */ c("ZodULID", (e, t) => {
2253
+ Zs.init(e, t), S.init(e, t);
2254
+ }), xi = /* @__PURE__ */ c("ZodXID", (e, t) => {
2255
+ Ts.init(e, t), S.init(e, t);
2256
+ }), _i = /* @__PURE__ */ c("ZodKSUID", (e, t) => {
2257
+ Cs.init(e, t), S.init(e, t);
2258
+ }), bi = /* @__PURE__ */ c("ZodIPv4", (e, t) => {
2259
+ Is.init(e, t), S.init(e, t);
2260
+ }), wi = /* @__PURE__ */ c("ZodIPv6", (e, t) => {
2261
+ Ds.init(e, t), S.init(e, t);
2262
+ }), ji = /* @__PURE__ */ c("ZodCIDRv4", (e, t) => {
2263
+ Ms.init(e, t), S.init(e, t);
2264
+ }), $i = /* @__PURE__ */ c("ZodCIDRv6", (e, t) => {
2265
+ Fs.init(e, t), S.init(e, t);
2266
+ }), ki = /* @__PURE__ */ c("ZodBase64", (e, t) => {
2267
+ qs.init(e, t), S.init(e, t);
2268
+ }), zi = /* @__PURE__ */ c("ZodBase64URL", (e, t) => {
2269
+ Ls.init(e, t), S.init(e, t);
2270
+ }), Pi = /* @__PURE__ */ c("ZodE164", (e, t) => {
2271
+ Qs.init(e, t), S.init(e, t);
2272
+ }), Ei = /* @__PURE__ */ c("ZodJWT", (e, t) => {
2273
+ Hs.init(e, t), S.init(e, t);
2274
+ }), Si = /* @__PURE__ */ c("ZodUnknown", (e, t) => {
2275
+ Ks.init(e, t), O.init(e, t);
2276
+ });
2277
+ function bt() {
2278
+ return Da(Si);
2279
+ }
2280
+ const Zi = /* @__PURE__ */ c("ZodNever", (e, t) => {
2281
+ Ws.init(e, t), O.init(e, t);
2282
+ });
2283
+ function Ti(e) {
2284
+ return Ma(Zi, e);
2285
+ }
2286
+ const Ci = /* @__PURE__ */ c("ZodArray", (e, t) => {
2287
+ Vs.init(e, t), O.init(e, t), e.element = t.element, e.min = (r, n) => e.check(ge(r, n)), e.nonempty = (r) => e.check(ge(1, r)), e.max = (r, n) => e.check(dr(r, n)), e.length = (r, n) => e.check(fr(r, n)), e.unwrap = () => e.element;
2288
+ });
2289
+ function Oi(e, t) {
2290
+ return Ya(Ci, e, t);
2291
+ }
2292
+ const Ni = /* @__PURE__ */ c("ZodObject", (e, t) => {
2293
+ Ys.init(e, t), O.init(e, t), T(e, "shape", () => Object.fromEntries(Object.entries(e._zod.def.shape))), e.keyof = () => pr(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: bt() }), e.loose = () => e.clone({ ...e._zod.def, catchall: bt() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ti() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => Zo(e, r), e.merge = (r) => To(e, r), e.pick = (r) => Eo(e, r), e.omit = (r) => So(e, r), e.partial = (...r) => Co(mr, e, r[0]), e.required = (...r) => Oo(gr, e, r[0]);
2294
+ });
2295
+ function Ai(e, t) {
2296
+ const r = {
2297
+ type: "object",
2298
+ get shape() {
2299
+ return qe(this, "shape", { ...e }), this.shape;
2300
+ },
2301
+ ..._(t)
2302
+ };
2303
+ return new Ni(r);
2304
+ }
2305
+ const Ri = /* @__PURE__ */ c("ZodUnion", (e, t) => {
2306
+ Gs.init(e, t), O.init(e, t), e.options = t.options;
2307
+ });
2308
+ function Ii(e, t) {
2309
+ return new Ri({
2310
+ type: "union",
2311
+ options: e,
2312
+ ..._(t)
2313
+ });
2314
+ }
2315
+ const Di = /* @__PURE__ */ c("ZodIntersection", (e, t) => {
2316
+ Js.init(e, t), O.init(e, t);
2317
+ });
2318
+ function Mi(e, t) {
2319
+ return new Di({
2320
+ type: "intersection",
2321
+ left: e,
2322
+ right: t
2323
+ });
2324
+ }
2325
+ const Oe = /* @__PURE__ */ c("ZodEnum", (e, t) => {
2326
+ Xs.init(e, t), O.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
2327
+ const r = new Set(Object.keys(t.entries));
2328
+ e.extract = (n, o) => {
2329
+ const s = {};
2330
+ for (const i of n)
2331
+ if (r.has(i))
2332
+ s[i] = t.entries[i];
2333
+ else
2334
+ throw new Error(`Key ${i} not found in enum`);
2335
+ return new Oe({
2336
+ ...t,
2337
+ checks: [],
2338
+ ..._(o),
2339
+ entries: s
2340
+ });
2341
+ }, e.exclude = (n, o) => {
2342
+ const s = { ...t.entries };
2343
+ for (const i of n)
2344
+ if (r.has(i))
2345
+ delete s[i];
2346
+ else
2347
+ throw new Error(`Key ${i} not found in enum`);
2348
+ return new Oe({
2349
+ ...t,
2350
+ checks: [],
2351
+ ..._(o),
2352
+ entries: s
2353
+ });
2354
+ };
2355
+ });
2356
+ function pr(e, t) {
2357
+ const r = Array.isArray(e) ? Object.fromEntries(e.map((n) => [n, n])) : e;
2358
+ return new Oe({
2359
+ type: "enum",
2360
+ entries: r,
2361
+ ..._(t)
2362
+ });
2363
+ }
2364
+ const Fi = /* @__PURE__ */ c("ZodTransform", (e, t) => {
2365
+ ea.init(e, t), O.init(e, t), e._zod.parse = (r, n) => {
2366
+ r.addIssue = (s) => {
2367
+ if (typeof s == "string")
2368
+ r.issues.push(se(s, r.value, t));
2369
+ else {
2370
+ const i = s;
2371
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = r.value), i.inst ?? (i.inst = e), i.continue ?? (i.continue = !0), r.issues.push(se(i));
2372
+ }
2373
+ };
2374
+ const o = t.transform(r.value, r);
2375
+ return o instanceof Promise ? o.then((s) => (r.value = s, r)) : (r.value = o, r);
2376
+ };
2377
+ });
2378
+ function qi(e) {
2379
+ return new Fi({
2380
+ type: "transform",
2381
+ transform: e
2382
+ });
2383
+ }
2384
+ const mr = /* @__PURE__ */ c("ZodOptional", (e, t) => {
2385
+ ta.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType;
2386
+ });
2387
+ function wt(e) {
2388
+ return new mr({
2389
+ type: "optional",
2390
+ innerType: e
2391
+ });
2392
+ }
2393
+ const Ui = /* @__PURE__ */ c("ZodNullable", (e, t) => {
2394
+ ra.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType;
2395
+ });
2396
+ function jt(e) {
2397
+ return new Ui({
2398
+ type: "nullable",
2399
+ innerType: e
2400
+ });
2401
+ }
2402
+ const Li = /* @__PURE__ */ c("ZodDefault", (e, t) => {
2403
+ na.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2404
+ });
2405
+ function Qi(e, t) {
2406
+ return new Li({
2407
+ type: "default",
2408
+ innerType: e,
2409
+ get defaultValue() {
2410
+ return typeof t == "function" ? t() : t;
2411
+ }
2412
+ });
2413
+ }
2414
+ const Bi = /* @__PURE__ */ c("ZodPrefault", (e, t) => {
2415
+ oa.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType;
2416
+ });
2417
+ function Hi(e, t) {
2418
+ return new Bi({
2419
+ type: "prefault",
2420
+ innerType: e,
2421
+ get defaultValue() {
2422
+ return typeof t == "function" ? t() : t;
2423
+ }
2424
+ });
2425
+ }
2426
+ const gr = /* @__PURE__ */ c("ZodNonOptional", (e, t) => {
2427
+ sa.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType;
2428
+ });
2429
+ function Ki(e, t) {
2430
+ return new gr({
2431
+ type: "nonoptional",
2432
+ innerType: e,
2433
+ ..._(t)
2434
+ });
2435
+ }
2436
+ const Wi = /* @__PURE__ */ c("ZodCatch", (e, t) => {
2437
+ aa.init(e, t), O.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2438
+ });
2439
+ function Vi(e, t) {
2440
+ return new Wi({
2441
+ type: "catch",
2442
+ innerType: e,
2443
+ catchValue: typeof t == "function" ? t : () => t
2444
+ });
2445
+ }
2446
+ const Yi = /* @__PURE__ */ c("ZodPipe", (e, t) => {
2447
+ ia.init(e, t), O.init(e, t), e.in = t.in, e.out = t.out;
2448
+ });
2449
+ function $t(e, t) {
2450
+ return new Yi({
2451
+ type: "pipe",
2452
+ in: e,
2453
+ out: t
2454
+ // ...util.normalizeParams(params),
2455
+ });
2456
+ }
2457
+ const Gi = /* @__PURE__ */ c("ZodReadonly", (e, t) => {
2458
+ ca.init(e, t), O.init(e, t);
2459
+ });
2460
+ function Ji(e) {
2461
+ return new Gi({
2462
+ type: "readonly",
2463
+ innerType: e
2464
+ });
2465
+ }
2466
+ const Xi = /* @__PURE__ */ c("ZodCustom", (e, t) => {
2467
+ ua.init(e, t), O.init(e, t);
2468
+ });
2469
+ function ec(e, t) {
2470
+ const r = new U({
2471
+ check: "custom",
2472
+ ..._(t)
2473
+ });
2474
+ return r._zod.check = e, r;
2475
+ }
2476
+ function tc(e, t = {}) {
2477
+ return Ga(Xi, e, t);
2478
+ }
2479
+ function rc(e, t) {
2480
+ const r = ec((n) => (n.addIssue = (o) => {
2481
+ if (typeof o == "string")
2482
+ n.issues.push(se(o, n.value, r._zod.def));
2483
+ else {
2484
+ const s = o;
2485
+ s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = r), s.continue ?? (s.continue = !r._zod.def.abort), n.issues.push(se(s));
2486
+ }
2487
+ }, e(n.value, n)), t);
2488
+ return r;
2489
+ }
2490
+ const nc = Ai({
2491
+ buildId: xt(),
2492
+ timestamp: xt(),
2493
+ status: pr(["in-progress", "success", "failed"])
2494
+ }), oc = ({
2495
+ buildId: e,
2496
+ endpoint: t = "/__zuplo/docs"
2497
+ }) => {
2498
+ const r = dn({
2499
+ queryKey: ["zuplo-build-check", e, t],
2500
+ refetchInterval: 3e3,
2501
+ enabled: typeof e < "u" && !1,
2502
+ retry: !1,
2503
+ queryFn: () => fetch(t, { signal: AbortSignal.timeout(2e3) }).then((o) => {
2504
+ if (!o.ok) throw new Error("Failed to fetch build status");
2505
+ return o.json();
2506
+ }).then((o) => nc.parse(o))
2507
+ });
2508
+ if (r.isError || !r.data || r.data.buildId === e)
2509
+ return null;
2510
+ const n = r.data.status === "success";
2511
+ return /* @__PURE__ */ a.jsxs("div", { className: "fixed flex flex-col gap-3 p-4 rounded-xl w-96 border z-20 bg-background left-0 right-0 top-4 mx-auto shadow-lg", children: [
2512
+ n ? /* @__PURE__ */ a.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2513
+ /* @__PURE__ */ a.jsx(An, { size: 16 }),
2514
+ /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "New version available" })
2515
+ ] }) : /* @__PURE__ */ a.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2516
+ /* @__PURE__ */ a.jsx(Rn, { size: 16, className: "animate-spin" }),
2517
+ /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Building new version..." })
2518
+ ] }),
2519
+ /* @__PURE__ */ a.jsx("span", { className: "text-xs", children: n ? "To see the new version, reload the page now." : "A new version of the developer portal will be available soon." }),
2520
+ /* @__PURE__ */ a.jsx(
2521
+ Ht,
2522
+ {
2523
+ variant: "outline",
2524
+ size: "sm",
2525
+ className: "w-full",
2526
+ onClick: () => {
2527
+ window.location.reload();
2528
+ },
2529
+ children: "Reload"
2530
+ }
2531
+ )
2532
+ ] });
2533
+ }, sc = () => {
2534
+ const e = ye(), t = K(e.pathname);
2535
+ F(() => {
2536
+ const r = t.current !== e.pathname, n = e.hash !== "";
2537
+ r && !n && window.scrollTo(0, 0), t.current = e.pathname;
2538
+ }, [e.pathname, e.hash]);
2539
+ }, ac = ({
2540
+ icon: e
2541
+ }) => typeof e == "string" ? /* @__PURE__ */ a.jsx(
2542
+ "img",
2543
+ {
2544
+ src: `https://cdn.simpleicons.org/${e}/000000/ffffff`,
2545
+ className: "size-5",
2546
+ alt: e
2547
+ }
2548
+ ) : e, ic = (e) => /^https?:/.test(e), cc = () => {
2549
+ const { page: e } = Yc(), t = e?.footer;
2550
+ return t ? /* @__PURE__ */ a.jsx("footer", { className: "border-t bg-background", children: /* @__PURE__ */ a.jsxs("div", { className: "mx-auto max-w-screen-2xl px-4 lg:px-8 py-8 pt-20", children: [
2551
+ /* @__PURE__ */ a.jsxs(
2552
+ "div",
2553
+ {
2554
+ className: N("flex flex-row gap-8", {
2555
+ "justify-center": !t.position || t.position === "center",
2556
+ "justify-start": t.position === "start",
2557
+ "justify-end": t.position === "end"
2558
+ }),
2559
+ children: [
2560
+ /* @__PURE__ */ a.jsx(A.Target, { name: "footer-before" }),
2561
+ t.columns && /* @__PURE__ */ a.jsx(
2562
+ "div",
2563
+ {
2564
+ className: "w-full md:max-w-screen-md grid grid-cols-[1fr_1fr] gap-8 md:grid-cols-[repeat(var(--columns),minmax(0,1fr))]",
2565
+ style: { "--columns": t.columns.length },
2566
+ children: t.columns.map((r) => /* @__PURE__ */ a.jsxs(
2567
+ "div",
2568
+ {
2569
+ className: N({
2570
+ "justify-self-center": !r.position || r.position === "center",
2571
+ "justify-self-start": r.position === "start",
2572
+ "justify-self-end": r.position === "end"
2573
+ }),
2574
+ children: [
2575
+ /* @__PURE__ */ a.jsx("span", { className: "text-sm font-semibold", children: r.title }),
2576
+ /* @__PURE__ */ a.jsx("ul", { className: "mt-4 space-y-2", children: r.links.map((n) => {
2577
+ const o = "flex flex-row gap-1 items-center text-sm text-muted-foreground hover:text-accent-foreground";
2578
+ return /* @__PURE__ */ a.jsx("li", { children: ic(n.href) ? /* @__PURE__ */ a.jsxs(
2579
+ "a",
2580
+ {
2581
+ href: n.href,
2582
+ target: "_blank",
2583
+ rel: "noopener noreferrer",
2584
+ className: o,
2585
+ children: [
2586
+ /* @__PURE__ */ a.jsx("span", { children: n.label }),
2587
+ /* @__PURE__ */ a.jsx(In, { size: 12 })
2588
+ ]
2589
+ }
2590
+ ) : /* @__PURE__ */ a.jsx(_n, { to: n.href, className: o, children: /* @__PURE__ */ a.jsx("span", { children: n.label }) }) }, n.href + n.label);
2591
+ }) })
2592
+ ]
2593
+ },
2594
+ r.title
2595
+ ))
2596
+ }
2597
+ ),
2598
+ /* @__PURE__ */ a.jsx(A.Target, { name: "footer-after" })
2599
+ ]
2600
+ }
2601
+ ),
2602
+ /* @__PURE__ */ a.jsxs(
2603
+ "div",
2604
+ {
2605
+ className: N(
2606
+ "flex items-center justify-between",
2607
+ t.columns && "border-t mt-8 pt-8"
2608
+ ),
2609
+ children: [
2610
+ t.logo && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2611
+ /* @__PURE__ */ a.jsx(
2612
+ "img",
2613
+ {
2614
+ src: t.logo.src.light,
2615
+ alt: t.logo.alt,
2616
+ className: "w-8 dark:hidden",
2617
+ style: { width: t.logo.width }
2618
+ }
2619
+ ),
2620
+ /* @__PURE__ */ a.jsx(
2621
+ "img",
2622
+ {
2623
+ src: t.logo.src.dark,
2624
+ alt: t.logo.alt,
2625
+ className: "w-8 hidden dark:block",
2626
+ style: { width: t.logo.width }
2627
+ }
2628
+ )
2629
+ ] }),
2630
+ t.copyright && /* @__PURE__ */ a.jsx("p", { className: "text-sm text-muted-foreground", children: t.copyright }),
2631
+ /* @__PURE__ */ a.jsx("div", { className: "flex items-center gap-2", children: t.social?.map((r) => /* @__PURE__ */ a.jsxs(
2632
+ "a",
2633
+ {
2634
+ href: r.href,
2635
+ target: "_blank",
2636
+ rel: "noopener noreferrer",
2637
+ className: "w-auto gap-2 flex text-muted-foreground hover:text-accent-foreground",
2638
+ children: [
2639
+ /* @__PURE__ */ a.jsx(ac, { icon: r.icon }),
2640
+ r.label
2641
+ ]
2642
+ },
2643
+ r.href
2644
+ )) })
2645
+ ]
2646
+ }
2647
+ )
2648
+ ] }) }) : null;
2649
+ };
2650
+ function uc({
2651
+ className: e,
2652
+ ...t
2653
+ }) {
2654
+ return /* @__PURE__ */ a.jsx(
2655
+ "div",
2656
+ {
2657
+ className: N("animate-pulse rounded-md bg-muted", e),
2658
+ ...t
2659
+ }
2660
+ );
2661
+ }
2662
+ const kt = {
2663
+ info: "bg-blue-500",
2664
+ note: "bg-gray-500",
2665
+ tip: "bg-green-600",
2666
+ caution: "bg-orange-500",
2667
+ danger: "bg-rose-500"
2668
+ }, lc = () => {
2669
+ const { page: e } = M(), [t, r] = G(!0);
2670
+ if (!e?.banner || !t)
2671
+ return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
2672
+ const n = e.banner.color && e.banner.color in kt ? kt[e.banner.color] : e.banner.color ? void 0 : "bg-primary", o = n ? {} : { backgroundColor: e.banner.color };
2673
+ return /* @__PURE__ */ a.jsxs(
2674
+ "div",
2675
+ {
2676
+ className: N(
2677
+ "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center lg:h-(--banner-height)",
2678
+ n
2679
+ ),
2680
+ "data-pagefind-ignore": "all",
2681
+ style: o,
2682
+ children: [
2683
+ /* @__PURE__ */ a.jsx("div", { className: "w-full", children: e.banner.message }),
2684
+ e.banner.dismissible && /* @__PURE__ */ a.jsx(
2685
+ "button",
2686
+ {
2687
+ type: "button",
2688
+ className: "md:absolute md:end-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
2689
+ onClick: () => r(!1),
2690
+ children: /* @__PURE__ */ a.jsx(Dn, { size: 16 })
2691
+ }
2692
+ )
2693
+ ]
2694
+ }
2695
+ );
2696
+ }, vr = (e) => /* @__PURE__ */ a.jsxs(
2697
+ "svg",
2698
+ {
2699
+ xmlns: "http://www.w3.org/2000/svg",
2700
+ viewBox: "0 0 132 100",
2701
+ fill: "none",
2702
+ ...e,
2703
+ children: [
2704
+ /* @__PURE__ */ a.jsx(
2705
+ "path",
2706
+ {
2707
+ fill: "currentColor",
2708
+ fillRule: "evenodd",
2709
+ d: "M80.092 2.963A4.66 4.66 0 0 1 84.449 0h34.049c6.325 0 10.835 6.135 8.948 12.172L116.653 46.71a4.688 4.688 0 0 1-4.474 3.29H75c-5.178 0-7.813 4.687-9.375 9.374-1.288 3.864-11.07 28.963-14.467 37.662A4.66 4.66 0 0 1 46.801 100H12.75c-6.324 0-10.834-6.134-8.947-12.171l10.793-34.54A4.688 4.688 0 0 1 19.071 50H56.25c5.178 0 7.813-4.687 9.375-9.375 1.288-3.864 11.07-28.962 14.467-37.662Z",
2710
+ clipRule: "evenodd"
2711
+ }
2712
+ ),
2713
+ /* @__PURE__ */ a.jsx(
2714
+ "path",
2715
+ {
2716
+ fill: "currentColor",
2717
+ d: "M83.54 57.813a7.813 7.813 0 0 0-7.316 5.07L63.888 95.777c-.766 2.043.744 4.222 2.926 4.222h36.828c5.211 0 9.875-3.232 11.704-8.11l8.821-23.522c1.915-5.107-1.861-10.555-7.315-10.555H83.539ZM29.17 0a12.5 12.5 0 0 0-11.704 8.111l-8.82 23.521c-1.915 5.107 1.86 10.556 7.315 10.556h33.312a7.813 7.813 0 0 0 7.316-5.07L68.924 4.223C69.691 2.18 68.18 0 65.998 0H29.17Z"
2718
+ }
2719
+ )
2720
+ ]
2721
+ }
2722
+ );
2723
+ vr.displayName = "ZudokuLogo";
2724
+ const yr = ({ className: e }) => /* @__PURE__ */ a.jsxs(
2725
+ "a",
2726
+ {
2727
+ href: "https://zudoku.dev",
2728
+ target: "_blank",
2729
+ rel: "noopener noreferrer",
2730
+ className: N(
2731
+ "flex justify-between items-center w-full border border-transparent hover:border-border rounded-full hover:shadow-xs h-7 px-3 text-nowrap hover:bg-muted/80 transition-all",
2732
+ e
2733
+ ),
2734
+ children: [
2735
+ /* @__PURE__ */ a.jsxs("div", { className: "opacity-70 hover:opacity-100 transition-opacity gap-1.5 text-[11px] font-medium rounded-full h-7 flex items-center text-nowrap", children: [
2736
+ /* @__PURE__ */ a.jsx(vr, { className: "w-3.5 h-3.5 dark:fill-white" }),
2737
+ "powered by ",
2738
+ "Zudoku"
2739
+ ] }),
2740
+ /* @__PURE__ */ a.jsx("div", { className: "text-xs font-medium opacity-70 hover:text-foreground transition-colors cursor-pointer", children: /* @__PURE__ */ a.jsx(
2741
+ Mn,
2742
+ {
2743
+ size: 12,
2744
+ absoluteStrokeWidth: !0,
2745
+ strokeWidth: 1.5,
2746
+ className: "rtl:rotate-180"
2747
+ }
2748
+ ) })
2749
+ ]
2750
+ }
2751
+ );
2752
+ function ve() {
2753
+ return ve = Object.assign ? Object.assign.bind() : function(e) {
2754
+ for (var t = 1; t < arguments.length; t++) {
2755
+ var r = arguments[t];
2756
+ for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
2757
+ }
2758
+ return e;
2759
+ }, ve.apply(null, arguments);
2760
+ }
2761
+ var he = { exports: {} }, $ = {};
2762
+ /** @license React v16.13.1
2763
+ * react-is.production.min.js
2764
+ *
2765
+ * Copyright (c) Facebook, Inc. and its affiliates.
2766
+ *
2767
+ * This source code is licensed under the MIT license found in the
2768
+ * LICENSE file in the root directory of this source tree.
2769
+ */
2770
+ var zt;
2771
+ function dc() {
2772
+ if (zt) return $;
2773
+ zt = 1;
2774
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, p = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, x = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, l = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, w = e ? Symbol.for("react.block") : 60121, P = e ? Symbol.for("react.fundamental") : 60117, Z = e ? Symbol.for("react.responder") : 60118, j = e ? Symbol.for("react.scope") : 60119;
2775
+ function y(d) {
2776
+ if (typeof d == "object" && d !== null) {
2777
+ var z = d.$$typeof;
2778
+ switch (z) {
2779
+ case t:
2780
+ switch (d = d.type, d) {
2781
+ case p:
2782
+ case f:
2783
+ case n:
2784
+ case s:
2785
+ case o:
2786
+ case m:
2787
+ return d;
2788
+ default:
2789
+ switch (d = d && d.$$typeof, d) {
2790
+ case u:
2791
+ case x:
2792
+ case g:
2793
+ case l:
2794
+ case i:
2795
+ return d;
2796
+ default:
2797
+ return z;
2798
+ }
2799
+ }
2800
+ case r:
2801
+ return z;
2802
+ }
2803
+ }
2804
+ }
2805
+ function b(d) {
2806
+ return y(d) === f;
2807
+ }
2808
+ return $.AsyncMode = p, $.ConcurrentMode = f, $.ContextConsumer = u, $.ContextProvider = i, $.Element = t, $.ForwardRef = x, $.Fragment = n, $.Lazy = g, $.Memo = l, $.Portal = r, $.Profiler = s, $.StrictMode = o, $.Suspense = m, $.isAsyncMode = function(d) {
2809
+ return b(d) || y(d) === p;
2810
+ }, $.isConcurrentMode = b, $.isContextConsumer = function(d) {
2811
+ return y(d) === u;
2812
+ }, $.isContextProvider = function(d) {
2813
+ return y(d) === i;
2814
+ }, $.isElement = function(d) {
2815
+ return typeof d == "object" && d !== null && d.$$typeof === t;
2816
+ }, $.isForwardRef = function(d) {
2817
+ return y(d) === x;
2818
+ }, $.isFragment = function(d) {
2819
+ return y(d) === n;
2820
+ }, $.isLazy = function(d) {
2821
+ return y(d) === g;
2822
+ }, $.isMemo = function(d) {
2823
+ return y(d) === l;
2824
+ }, $.isPortal = function(d) {
2825
+ return y(d) === r;
2826
+ }, $.isProfiler = function(d) {
2827
+ return y(d) === s;
2828
+ }, $.isStrictMode = function(d) {
2829
+ return y(d) === o;
2830
+ }, $.isSuspense = function(d) {
2831
+ return y(d) === m;
2832
+ }, $.isValidElementType = function(d) {
2833
+ return typeof d == "string" || typeof d == "function" || d === n || d === f || d === s || d === o || d === m || d === h || typeof d == "object" && d !== null && (d.$$typeof === g || d.$$typeof === l || d.$$typeof === i || d.$$typeof === u || d.$$typeof === x || d.$$typeof === P || d.$$typeof === Z || d.$$typeof === j || d.$$typeof === w);
2834
+ }, $.typeOf = y, $;
2835
+ }
2836
+ var k = {};
2837
+ /** @license React v16.13.1
2838
+ * react-is.development.js
2839
+ *
2840
+ * Copyright (c) Facebook, Inc. and its affiliates.
2841
+ *
2842
+ * This source code is licensed under the MIT license found in the
2843
+ * LICENSE file in the root directory of this source tree.
2844
+ */
2845
+ var Pt;
2846
+ function fc() {
2847
+ return Pt || (Pt = 1, process.env.NODE_ENV !== "production" && function() {
2848
+ var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, s = e ? Symbol.for("react.profiler") : 60114, i = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, p = e ? Symbol.for("react.async_mode") : 60111, f = e ? Symbol.for("react.concurrent_mode") : 60111, x = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, l = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, w = e ? Symbol.for("react.block") : 60121, P = e ? Symbol.for("react.fundamental") : 60117, Z = e ? Symbol.for("react.responder") : 60118, j = e ? Symbol.for("react.scope") : 60119;
2849
+ function y(v) {
2850
+ return typeof v == "string" || typeof v == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
2851
+ v === n || v === f || v === s || v === o || v === m || v === h || typeof v == "object" && v !== null && (v.$$typeof === g || v.$$typeof === l || v.$$typeof === i || v.$$typeof === u || v.$$typeof === x || v.$$typeof === P || v.$$typeof === Z || v.$$typeof === j || v.$$typeof === w);
2852
+ }
2853
+ function b(v) {
2854
+ if (typeof v == "object" && v !== null) {
2855
+ var $e = v.$$typeof;
2856
+ switch ($e) {
2857
+ case t:
2858
+ var ie = v.type;
2859
+ switch (ie) {
2860
+ case p:
2861
+ case f:
2862
+ case n:
2863
+ case s:
2864
+ case o:
2865
+ case m:
2866
+ return ie;
2867
+ default:
2868
+ var Ke = ie && ie.$$typeof;
2869
+ switch (Ke) {
2870
+ case u:
2871
+ case x:
2872
+ case g:
2873
+ case l:
2874
+ case i:
2875
+ return Ke;
2876
+ default:
2877
+ return $e;
2878
+ }
2879
+ }
2880
+ case r:
2881
+ return $e;
2882
+ }
2883
+ }
2884
+ }
2885
+ var d = p, z = f, R = u, D = i, X = t, B = x, je = n, W = g, Or = l, Nr = r, Ar = s, Rr = o, Ir = m, Be = !1;
2886
+ function Dr(v) {
2887
+ return Be || (Be = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), He(v) || b(v) === p;
2888
+ }
2889
+ function He(v) {
2890
+ return b(v) === f;
2891
+ }
2892
+ function Mr(v) {
2893
+ return b(v) === u;
2894
+ }
2895
+ function Fr(v) {
2896
+ return b(v) === i;
2897
+ }
2898
+ function qr(v) {
2899
+ return typeof v == "object" && v !== null && v.$$typeof === t;
2900
+ }
2901
+ function Ur(v) {
2902
+ return b(v) === x;
2903
+ }
2904
+ function Lr(v) {
2905
+ return b(v) === n;
2906
+ }
2907
+ function Qr(v) {
2908
+ return b(v) === g;
2909
+ }
2910
+ function Br(v) {
2911
+ return b(v) === l;
2912
+ }
2913
+ function Hr(v) {
2914
+ return b(v) === r;
2915
+ }
2916
+ function Kr(v) {
2917
+ return b(v) === s;
2918
+ }
2919
+ function Wr(v) {
2920
+ return b(v) === o;
2921
+ }
2922
+ function Vr(v) {
2923
+ return b(v) === m;
2924
+ }
2925
+ k.AsyncMode = d, k.ConcurrentMode = z, k.ContextConsumer = R, k.ContextProvider = D, k.Element = X, k.ForwardRef = B, k.Fragment = je, k.Lazy = W, k.Memo = Or, k.Portal = Nr, k.Profiler = Ar, k.StrictMode = Rr, k.Suspense = Ir, k.isAsyncMode = Dr, k.isConcurrentMode = He, k.isContextConsumer = Mr, k.isContextProvider = Fr, k.isElement = qr, k.isForwardRef = Ur, k.isFragment = Lr, k.isLazy = Qr, k.isMemo = Br, k.isPortal = Hr, k.isProfiler = Kr, k.isStrictMode = Wr, k.isSuspense = Vr, k.isValidElementType = y, k.typeOf = b;
2926
+ }()), k;
2927
+ }
2928
+ var Et;
2929
+ function hc() {
2930
+ return Et || (Et = 1, process.env.NODE_ENV === "production" ? he.exports = dc() : he.exports = fc()), he.exports;
2931
+ }
2932
+ var Pe, St;
2933
+ function pc() {
2934
+ if (St) return Pe;
2935
+ St = 1;
2936
+ var e = hc(), t = {
2937
+ childContextTypes: !0,
2938
+ contextType: !0,
2939
+ contextTypes: !0,
2940
+ defaultProps: !0,
2941
+ displayName: !0,
2942
+ getDefaultProps: !0,
2943
+ getDerivedStateFromError: !0,
2944
+ getDerivedStateFromProps: !0,
2945
+ mixins: !0,
2946
+ propTypes: !0,
2947
+ type: !0
2948
+ }, r = {
2949
+ name: !0,
2950
+ length: !0,
2951
+ prototype: !0,
2952
+ caller: !0,
2953
+ callee: !0,
2954
+ arguments: !0,
2955
+ arity: !0
2956
+ }, n = {
2957
+ $$typeof: !0,
2958
+ render: !0,
2959
+ defaultProps: !0,
2960
+ displayName: !0,
2961
+ propTypes: !0
2962
+ }, o = {
2963
+ $$typeof: !0,
2964
+ compare: !0,
2965
+ defaultProps: !0,
2966
+ displayName: !0,
2967
+ propTypes: !0,
2968
+ type: !0
2969
+ }, s = {};
2970
+ s[e.ForwardRef] = n, s[e.Memo] = o;
2971
+ function i(g) {
2972
+ return e.isMemo(g) ? o : s[g.$$typeof] || t;
2973
+ }
2974
+ var u = Object.defineProperty, p = Object.getOwnPropertyNames, f = Object.getOwnPropertySymbols, x = Object.getOwnPropertyDescriptor, m = Object.getPrototypeOf, h = Object.prototype;
2975
+ function l(g, w, P) {
2976
+ if (typeof w != "string") {
2977
+ if (h) {
2978
+ var Z = m(w);
2979
+ Z && Z !== h && l(g, Z, P);
2980
+ }
2981
+ var j = p(w);
2982
+ f && (j = j.concat(f(w)));
2983
+ for (var y = i(g), b = i(w), d = 0; d < j.length; ++d) {
2984
+ var z = j[d];
2985
+ if (!r[z] && !(P && P[z]) && !(b && b[z]) && !(y && y[z])) {
2986
+ var R = x(w, z);
2987
+ try {
2988
+ u(g, z, R);
2989
+ } catch {
2990
+ }
2991
+ }
2992
+ }
2993
+ }
2994
+ return g;
2995
+ }
2996
+ return Pe = l, Pe;
2997
+ }
2998
+ pc();
2999
+ var xr = function(t, r, n) {
3000
+ return t = t <= n ? t : n, t = t >= r ? t : r, t;
3001
+ }, mc = function() {
3002
+ var t = !1, r = [], n = function() {
3003
+ t = !0;
3004
+ var u = r.shift();
3005
+ if (u)
3006
+ return u(n);
3007
+ t = !1;
3008
+ }, o = function() {
3009
+ t = !1, r = [];
3010
+ }, s = function(u) {
3011
+ r.push(u), !t && r.length === 1 && n();
3012
+ };
3013
+ return {
3014
+ clear: o,
3015
+ enqueue: s
3016
+ };
3017
+ }, gc = function() {
3018
+ var t, r = function() {
3019
+ t && window.cancelAnimationFrame(t);
3020
+ }, n = function(s, i) {
3021
+ var u, p, f = function(m) {
3022
+ if (p = p || m, u = m - p, u > i) {
3023
+ s();
3024
+ return;
3025
+ }
3026
+ t = window.requestAnimationFrame(f);
3027
+ };
3028
+ t = window.requestAnimationFrame(f);
3029
+ };
3030
+ return {
3031
+ cancel: r,
3032
+ schedule: n
3033
+ };
3034
+ }, vc = function(t) {
3035
+ var r = 0;
3036
+ return t >= 0 && t < 0.2 ? r = 0.1 : t >= 0.2 && t < 0.5 ? r = 0.04 : t >= 0.5 && t < 0.8 ? r = 0.02 : t >= 0.8 && t < 0.99 && (r = 5e-3), xr(t + r, 0, 0.994);
3037
+ }, Zt = function(t) {
3038
+ F(t, []);
3039
+ }, yc = function(t) {
3040
+ return ++t % 1e6;
3041
+ }, xc = function() {
3042
+ var t = G(0), r = t[1];
3043
+ return H(function() {
3044
+ return r(yc);
3045
+ }, []);
3046
+ }, _c = function(t) {
3047
+ t === void 0 && (t = {});
3048
+ var r = xc(), n = K(ve({}, t)), o = H(function() {
3049
+ return n.current;
3050
+ }, []), s = H(function(i) {
3051
+ i && (Object.assign(n.current, i), r());
3052
+ }, []);
3053
+ return [o, s];
3054
+ }, bc = function() {
3055
+ var t = K(!0);
3056
+ return t.current ? (t.current = !1, !0) : t.current;
3057
+ }, Tt = function(t, r) {
3058
+ var n = bc();
3059
+ F(function() {
3060
+ if (!n)
3061
+ return t();
3062
+ }, r);
3063
+ }, _r = function() {
3064
+ }, Ct = {
3065
+ isFinished: !0,
3066
+ progress: 0,
3067
+ sideEffect: _r
3068
+ }, wc = function(t) {
3069
+ var r = t === void 0 ? {} : t, n = r.animationDuration, o = n === void 0 ? 200 : n, s = r.incrementDuration, i = s === void 0 ? 800 : s, u = r.isAnimating, p = u === void 0 ? !1 : u, f = r.minimum, x = f === void 0 ? 0.08 : f, m = _c(Ct), h = m[0], l = m[1], g = K(null), w = K(null);
3070
+ Zt(function() {
3071
+ g.current = mc(), w.current = gc();
3072
+ });
3073
+ var P = H(function() {
3074
+ var z, R;
3075
+ (z = w.current) == null || z.cancel(), (R = g.current) == null || R.clear();
3076
+ }, []), Z = H(function(z) {
3077
+ var R;
3078
+ if (z = xr(z, x, 1), z === 1) {
3079
+ var D, X;
3080
+ P(), (D = g.current) == null || D.enqueue(function(B) {
3081
+ l({
3082
+ progress: z,
3083
+ sideEffect: function() {
3084
+ var W;
3085
+ return (W = w.current) == null ? void 0 : W.schedule(B, o);
3086
+ }
3087
+ });
3088
+ }), (X = g.current) == null || X.enqueue(function() {
3089
+ l({
3090
+ isFinished: !0,
3091
+ sideEffect: P
3092
+ });
3093
+ });
3094
+ return;
3095
+ }
3096
+ (R = g.current) == null || R.enqueue(function(B) {
3097
+ l({
3098
+ isFinished: !1,
3099
+ progress: z,
3100
+ sideEffect: function() {
3101
+ var W;
3102
+ return (W = w.current) == null ? void 0 : W.schedule(B, o);
3103
+ }
3104
+ });
3105
+ });
3106
+ }, [o, P, x, g, l, w]), j = H(function() {
3107
+ Z(vc(h().progress));
3108
+ }, [h, Z]), y = H(function() {
3109
+ var z = function() {
3110
+ var D;
3111
+ j(), (D = g.current) == null || D.enqueue(function(X) {
3112
+ var B;
3113
+ (B = w.current) == null || B.schedule(function() {
3114
+ z(), X();
3115
+ }, i);
3116
+ });
3117
+ };
3118
+ z();
3119
+ }, [i, g, w, j]), b = K(_r), d = h().sideEffect;
3120
+ return F(function() {
3121
+ b.current = j;
3122
+ }), Zt(function() {
3123
+ return p && y(), P;
3124
+ }), Tt(function() {
3125
+ h().sideEffect();
3126
+ }, [h, d]), Tt(function() {
3127
+ p ? l(ve({}, Ct, {
3128
+ sideEffect: y
3129
+ })) : Z(1);
3130
+ }, [p, Z, l, y]), {
3131
+ animationDuration: o,
3132
+ isFinished: h().isFinished,
3133
+ progress: h().progress
3134
+ };
3135
+ };
3136
+ const br = () => {
3137
+ const t = Ae().state === "loading", [r, n] = G(!1);
3138
+ F(() => {
3139
+ const i = setTimeout(() => n(t), 200);
3140
+ return () => clearTimeout(i);
3141
+ }, [t]);
3142
+ const { isFinished: o, progress: s } = wc({ isAnimating: r });
3143
+ return /* @__PURE__ */ a.jsx(
3144
+ "div",
3145
+ {
3146
+ className: "absolute w-0 left-0 right-0 bottom-[-1px] h-[2px] bg-primary transition-all duration-300 ease-in-out",
3147
+ style: {
3148
+ opacity: o ? 0 : 1,
3149
+ width: o ? 0 : `${s * 100}%`
3150
+ }
3151
+ }
3152
+ );
3153
+ };
3154
+ function jc() {
3155
+ const e = navigator.userAgent.toLowerCase();
3156
+ if (e.includes("win")) return "Windows";
3157
+ if (e.includes("mac")) return "macOS";
3158
+ if (e.includes("linux")) return "Linux";
3159
+ }
3160
+ const wr = ({ className: e }) => {
3161
+ const t = M(), [r, n] = G(!1), o = H(() => n(!1), []);
3162
+ F(() => {
3163
+ if (r)
3164
+ return;
3165
+ function i(u) {
3166
+ u.key === "k" && (u.metaKey || u.ctrlKey) && (u.preventDefault(), n(!0));
3167
+ }
3168
+ return window.addEventListener("keydown", i), () => {
3169
+ window.removeEventListener("keydown", i);
3170
+ };
3171
+ }, [r, n]);
3172
+ const s = t.plugins.find(Bn);
3173
+ return s ? /* @__PURE__ */ a.jsxs("div", { className: e, children: [
3174
+ /* @__PURE__ */ a.jsxs(
3175
+ "button",
3176
+ {
3177
+ type: "button",
3178
+ onClick: () => n(!0),
3179
+ 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",
3180
+ children: [
3181
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 grow", children: [
3182
+ /* @__PURE__ */ a.jsx(Fn, { size: 14 }),
3183
+ "Search"
3184
+ ] }),
3185
+ /* @__PURE__ */ a.jsx(xe, { children: /* @__PURE__ */ a.jsx($c, {}) })
3186
+ ]
3187
+ }
3188
+ ),
3189
+ /* @__PURE__ */ a.jsx(De, { fallback: null, children: s.renderSearch({
3190
+ isOpen: r,
3191
+ onClose: o
3192
+ }) })
3193
+ ] }) : null;
3194
+ }, $c = () => {
3195
+ const e = jc();
3196
+ return /* @__PURE__ */ a.jsxs("kbd", { className: "absolute end-1.5 hidden h-5 select-none items-center gap-1 rounded-sm border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: [
3197
+ e === "macOS" ? "⌘" : "Ctrl",
3198
+ "+K"
3199
+ ] });
3200
+ }, jr = () => {
3201
+ const { resolvedTheme: e, setTheme: t } = Rt();
3202
+ return /* @__PURE__ */ a.jsx(xe, { fallback: /* @__PURE__ */ a.jsx(Se, { variant: "ghost", size: "icon" }), children: /* @__PURE__ */ a.jsxs(
3203
+ "button",
3204
+ {
3205
+ type: "button",
3206
+ className: "flex rounded-full border p-0.5 gap-0.5 group",
3207
+ onClick: () => t(e === "dark" ? "light" : "dark"),
3208
+ "aria-label": e === "dark" ? "Switch to light mode" : "Switch to dark mode",
3209
+ children: [
3210
+ /* @__PURE__ */ a.jsx(
3211
+ "div",
3212
+ {
3213
+ className: N(
3214
+ "border border-transparent rounded-full p-0.5 [&>svg>circle]:transition-colors [&>svg>path]:transition-transform transition-all [&>svg>path]:duration-200 [&>svg>circle]:duration-500 [&>svg>circle]:fill-transparent",
3215
+ e === "light" && "border-border bg-muted",
3216
+ e === "dark" && "group-hover:[&>svg>path]:scale-110 group-hover:[&>svg>path]:-translate-x-[1px] group-hover:[&>svg>path]:-translate-y-[1px] group-hover:rotate-[15deg] "
3217
+ ),
3218
+ children: /* @__PURE__ */ a.jsx(qn, { size: 16 })
3219
+ }
3220
+ ),
3221
+ /* @__PURE__ */ a.jsx(
3222
+ "div",
3223
+ {
3224
+ className: N(
3225
+ "border border-transparent rounded-full p-0.5 transition-transform transform-gpu duration-500",
3226
+ e === "dark" && "border-border bg-muted [&>svg>path]:fill-white [&>svg>path]:stroke-transparent",
3227
+ e === "light" && "group-hover:rotate-[-10deg] [&>svg>path]:stroke-currentColor"
3228
+ ),
3229
+ children: /* @__PURE__ */ a.jsx(Un, { size: 16 })
3230
+ }
3231
+ )
3232
+ ]
3233
+ }
3234
+ ) });
3235
+ }, kc = () => {
3236
+ const { navigation: e } = M(), { isAuthenticated: t } = ne(), r = e.filter(Ut(t));
3237
+ return r.length === 0 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx(De, { children: /* @__PURE__ */ a.jsxs("div", { className: "items-center justify-between px-8 h-(--top-nav-height) hidden lg:flex text-sm relative", children: [
3238
+ /* @__PURE__ */ a.jsx("nav", { className: "text-sm", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: r.map((n) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(kr, { ...n }) }, n.label + n.type)) }) }),
3239
+ /* @__PURE__ */ a.jsx(A.Target, { name: "top-navigation-side" })
3240
+ ] }) });
3241
+ }, $r = (e) => {
3242
+ switch (e.type) {
3243
+ case "doc":
3244
+ return ee(e.path);
3245
+ case "link":
3246
+ return e.to;
3247
+ case "category":
3248
+ return e.link?.path ? ee(e.link.path) : fn(e, (t) => {
3249
+ if (t.type !== "category")
3250
+ return $r(t);
3251
+ }) ?? "";
3252
+ case "custom-page":
3253
+ return e.path;
3254
+ }
3255
+ }, kr = (e) => {
3256
+ const t = Lt(), r = bn(t.topNavItem, e), n = $r(e);
3257
+ return (
3258
+ // We don't use isActive here because it has to be inside the navigation,
3259
+ // the top nav id doesn't necessarily start with the navigation id
3260
+ /* @__PURE__ */ a.jsxs(
3261
+ rn,
3262
+ {
3263
+ viewTransition: !0,
3264
+ to: n,
3265
+ className: ({ isActive: o, isPending: s }) => {
3266
+ const i = o || r;
3267
+ return lo(
3268
+ "flex items-center gap-2 lg:py-3.5 font-medium -mb-px transition duration-150 delay-75 relative",
3269
+ i || s ? [
3270
+ "text-foreground",
3271
+ // underline with view transition animation
3272
+ "after:content-[''] after:absolute after:bottom-0 after:left-0 after:right-0",
3273
+ "after:h-0.5 after:bg-primary",
3274
+ i && "after:[view-transition-name:top-nav-underline]",
3275
+ s && "after:bg-primary/25"
3276
+ ] : "text-foreground/75 hover:text-foreground"
3277
+ );
3278
+ },
3279
+ children: [
3280
+ e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
3281
+ e.label
3282
+ ]
3283
+ }
3284
+ )
3285
+ );
3286
+ }, zc = () => {
3287
+ const { navigation: e, options: t } = M(), { isAuthenticated: r } = ne(), [n, o] = G(!1), s = e.filter(Ut(r));
3288
+ return /* @__PURE__ */ a.jsxs(
3289
+ co,
3290
+ {
3291
+ direction: t.page?.dir === "rtl" ? "left" : "right",
3292
+ open: n,
3293
+ onOpenChange: (i) => o(i),
3294
+ children: [
3295
+ /* @__PURE__ */ a.jsxs("div", { className: "flex lg:hidden justify-self-end", children: [
3296
+ /* @__PURE__ */ a.jsx(uo, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Ln, { size: 22 }) }),
3297
+ /* @__PURE__ */ a.jsx(br, {})
3298
+ ] }),
3299
+ /* @__PURE__ */ a.jsx(
3300
+ Gt,
3301
+ {
3302
+ className: "lg:hidden h-[100dvh] end-0 start-auto w-[320px] rounded-none",
3303
+ "aria-describedby": void 0,
3304
+ children: /* @__PURE__ */ a.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none h-full flex flex-col justify-between", children: [
3305
+ /* @__PURE__ */ a.jsxs("div", { children: [
3306
+ /* @__PURE__ */ a.jsx(Yt, { children: /* @__PURE__ */ a.jsx(Jt, { children: "Navigation" }) }),
3307
+ /* @__PURE__ */ a.jsx(wr, { className: "flex p-4" }),
3308
+ /* @__PURE__ */ a.jsxs("ul", { className: "flex flex-col items-center gap-4 p-4", children: [
3309
+ /* @__PURE__ */ a.jsx("li", { className: "empty:hidden", children: /* @__PURE__ */ a.jsx(A.Target, { name: "top-navigation-side" }) }),
3310
+ /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(jr, {}) }),
3311
+ s.map((i) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx("button", { type: "button", onClick: () => o(!1), children: /* @__PURE__ */ a.jsx(kr, { ...i }) }) }, i.label))
3312
+ ] })
3313
+ ] }),
3314
+ t.page?.showPoweredBy !== !1 && /* @__PURE__ */ a.jsx(yr, { className: "grow-0 justify-center gap-1" })
3315
+ ] })
3316
+ }
3317
+ )
3318
+ ]
3319
+ }
3320
+ );
3321
+ }, me = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(no, { children: [
3322
+ /* @__PURE__ */ a.jsx(oo, { children: e.label }),
3323
+ /* @__PURE__ */ a.jsx(so, { children: /* @__PURE__ */ a.jsx(ao, { children: e.children.map((t, r) => (
3324
+ // eslint-disable-next-line react/no-array-index-key
3325
+ /* @__PURE__ */ a.jsx(me, { item: t }, r)
3326
+ )) }) })
3327
+ ] }, e.label) : /* @__PURE__ */ a.jsx(Re, { to: e.path ?? "", children: /* @__PURE__ */ a.jsxs(io, { className: "flex gap-2", children: [
3328
+ e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, strokeWidth: 1, absoluteStrokeWidth: !0 }),
3329
+ e.label
3330
+ ] }, e.label) }), zr = Wt(function() {
3331
+ const t = ne(), { isAuthenticated: r, profile: n, isAuthEnabled: o } = ne(), s = M(), { page: i, plugins: u, options: p } = s, f = u.filter((l) => Hn(l)).flatMap((l) => l.getProfileMenuItems(s)).sort((l) => l.weight ?? 0), x = i?.logo ? /https?:\/\//.test(i.logo.src.light) ? i.logo.src.light : ee(p.basePath, i.logo.src.light) : void 0, m = i?.logo ? /https?:\/\//.test(i.logo.src.dark) ? i.logo.src.dark : ee(p.basePath, i.logo.src.dark) : void 0, h = "inset-shadow-[0_-1px_0_0_var(--border)]";
3332
+ return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
3333
+ /* @__PURE__ */ a.jsx(lc, {}),
3334
+ /* @__PURE__ */ a.jsxs("div", { className: N(h, "relative"), children: [
3335
+ /* @__PURE__ */ a.jsx(br, {}),
3336
+ /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto flex items-center justify-between h-(--top-header-height) px-4 lg:px-8 border-transparent", children: [
3337
+ /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(Re, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
3338
+ i?.logo && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3339
+ /* @__PURE__ */ a.jsx(
3340
+ "img",
3341
+ {
3342
+ src: x,
3343
+ alt: i.logo.alt ?? i.pageTitle,
3344
+ style: { width: i.logo.width },
3345
+ className: "max-h-(--top-header-height) dark:hidden",
3346
+ loading: "lazy"
3347
+ }
3348
+ ),
3349
+ /* @__PURE__ */ a.jsx(
3350
+ "img",
3351
+ {
3352
+ src: m,
3353
+ alt: i.logo.alt ?? i.pageTitle,
3354
+ style: { width: i.logo.width },
3355
+ className: "max-h-(--top-header-height) hidden dark:block",
3356
+ loading: "lazy"
3357
+ }
3358
+ )
3359
+ ] }),
3360
+ /* @__PURE__ */ a.jsx("span", { className: "font-semibold text-2xl", children: i?.pageTitle })
3361
+ ] }) }) }),
3362
+ /* @__PURE__ */ a.jsx("div", { className: "absolute inset-x-0 justify-center items-center hidden lg:flex w-full pointer-events-none", children: /* @__PURE__ */ a.jsx(wr, { className: "pointer-events-auto" }) }),
3363
+ /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-8", children: [
3364
+ /* @__PURE__ */ a.jsx(zc, {}),
3365
+ /* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
3366
+ /* @__PURE__ */ a.jsx(A.Target, { name: "head-navigation-start" }),
3367
+ o && /* @__PURE__ */ a.jsx(
3368
+ xe,
3369
+ {
3370
+ fallback: /* @__PURE__ */ a.jsx(uc, { className: "rounded-sm h-5 w-24 mr-4" }),
3371
+ children: r ? Object.values(f).length > 0 && /* @__PURE__ */ a.jsxs(Xn, { modal: !1, children: [
3372
+ /* @__PURE__ */ a.jsx(eo, { asChild: !0, children: /* @__PURE__ */ a.jsx(Se, { variant: "ghost", children: n?.name ?? "My Account" }) }),
3373
+ /* @__PURE__ */ a.jsxs(to, { className: "w-56", children: [
3374
+ /* @__PURE__ */ a.jsxs(ro, { children: [
3375
+ n?.name ? `${n.name}` : "My Account",
3376
+ n?.email && /* @__PURE__ */ a.jsx("div", { className: "font-normal text-muted-foreground", children: n.email })
3377
+ ] }),
3378
+ f.filter((l) => l.category === "top").length > 0 && /* @__PURE__ */ a.jsx(ze, {}),
3379
+ f.filter((l) => l.category === "top").map((l) => /* @__PURE__ */ a.jsx(me, { item: l }, l.label)),
3380
+ f.filter(
3381
+ (l) => !l.category || l.category === "middle"
3382
+ ).length > 0 && /* @__PURE__ */ a.jsx(ze, {}),
3383
+ f.filter(
3384
+ (l) => !l.category || l.category === "middle"
3385
+ ).map((l) => /* @__PURE__ */ a.jsx(me, { item: l }, l.label)),
3386
+ f.filter((l) => l.category === "bottom").length > 0 && /* @__PURE__ */ a.jsx(ze, {}),
3387
+ f.filter((l) => l.category === "bottom").map((l) => /* @__PURE__ */ a.jsx(me, { item: l }, l.label))
3388
+ ] })
3389
+ ] }) : /* @__PURE__ */ a.jsx(Se, { variant: "ghost", onClick: () => t.login(), children: "Login" })
3390
+ }
3391
+ ),
3392
+ /* @__PURE__ */ a.jsx(A.Target, { name: "head-navigation-end" }),
3393
+ /* @__PURE__ */ a.jsx(jr, {})
3394
+ ] })
3395
+ ] })
3396
+ ] })
3397
+ ] }),
3398
+ /* @__PURE__ */ a.jsx("div", { className: N("hidden lg:block", h), children: /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto border-transparent relative", children: [
3399
+ /* @__PURE__ */ a.jsx(A.Target, { name: "top-navigation-before" }),
3400
+ /* @__PURE__ */ a.jsx(kc, {}),
3401
+ /* @__PURE__ */ a.jsx(A.Target, { name: "top-navigation-after" })
3402
+ ] }) })
3403
+ ] });
3404
+ }), Pr = ({
3405
+ shouldScaleBackground: e = !0,
3406
+ ...t
3407
+ }) => /* @__PURE__ */ a.jsx(
3408
+ q.Root,
3409
+ {
3410
+ shouldScaleBackground: e,
3411
+ ...t
3412
+ }
3413
+ );
3414
+ Pr.displayName = "Drawer";
3415
+ const Pc = q.Trigger, Ec = q.Portal, Er = Q.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a.jsx(
3416
+ q.Overlay,
3417
+ {
3418
+ ref: r,
3419
+ className: N("fixed inset-0 z-50 bg-black/80", e),
3420
+ ...t
3421
+ }
3422
+ ));
3423
+ Er.displayName = q.Overlay.displayName;
3424
+ const Sc = Q.forwardRef(
3425
+ ({ className: e, children: t, hideBar: r = !0, ...n }, o) => /* @__PURE__ */ a.jsxs(Ec, { children: [
3426
+ /* @__PURE__ */ a.jsx(Er, {}),
3427
+ /* @__PURE__ */ a.jsxs(
3428
+ q.Content,
3429
+ {
3430
+ ref: o,
3431
+ className: N(
3432
+ "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
3433
+ e
3434
+ ),
3435
+ ...n,
3436
+ children: [
3437
+ !r && /* @__PURE__ */ a.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
3438
+ t
3439
+ ]
3440
+ }
3441
+ )
3442
+ ] })
3443
+ );
3444
+ Sc.displayName = "DrawerContent";
3445
+ const Zc = Q.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a.jsx(
3446
+ q.Title,
3447
+ {
3448
+ ref: r,
3449
+ className: N(
3450
+ "text-lg font-semibold leading-none tracking-tight",
3451
+ e
3452
+ ),
3453
+ ...t
3454
+ }
3455
+ ));
3456
+ Zc.displayName = q.Title.displayName;
3457
+ const Tc = Q.forwardRef(({ className: e, ...t }, r) => /* @__PURE__ */ a.jsx(
3458
+ q.Description,
3459
+ {
3460
+ ref: r,
3461
+ className: N("text-sm text-muted-foreground", e),
3462
+ ...t
3463
+ }
3464
+ ));
3465
+ Tc.displayName = q.Description.displayName;
3466
+ const Sr = ({
3467
+ children: e,
3468
+ className: t
3469
+ }) => {
3470
+ const { options: r } = M(), n = K(null);
3471
+ return F(() => {
3472
+ const o = n.current?.querySelector('[aria-current="page"]');
3473
+ wn(o ?? null);
3474
+ }, []), /* @__PURE__ */ a.jsxs("div", { className: "grid sticky top-(--header-height) lg:h-[calc(100vh-var(--header-height))] grid-rows-[1fr_min-content] border-r", children: [
3475
+ /* @__PURE__ */ a.jsx(
3476
+ "nav",
3477
+ {
3478
+ ref: n,
3479
+ className: N(
3480
+ "hidden max-w-[calc(var(--side-nav-width)+var(--padding-nav-item))] lg:flex scrollbar flex-col overflow-y-auto shrink-0 text-sm pe-3 ps-4 lg:ps-8",
3481
+ "-mx-(--padding-nav-item) pb-[8vh] pt-(--padding-content-top) scroll-pt-2 gap-1",
3482
+ // Revert the padding/margin on the first child
3483
+ "-mt-2.5",
3484
+ t
3485
+ ),
3486
+ style: {
3487
+ maskImage: "linear-gradient(180deg, transparent 1%, rgba(0, 0, 0, 1) 20px, rgba(0, 0, 0, 1) 90%, transparent 99%)"
3488
+ },
3489
+ children: e
3490
+ }
3491
+ ),
3492
+ /* @__PURE__ */ a.jsx("div", { className: "bg-background border-t p-2 mx-5 gap-2 items-center mt-2 drop-shadow-[0_-3px_1px_rgba(0,0,0,0.015)] hidden lg:[&:has(>_:nth-child(1):last-child)]:flex", children: r.page?.showPoweredBy !== !1 && /* @__PURE__ */ a.jsx(yr, {}) })
3493
+ ] });
3494
+ };
3495
+ Sr.displayName = "NavigationWrapper";
3496
+ const Cc = ({
3497
+ onRequestClose: e,
3498
+ navigation: t
3499
+ }) => /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3500
+ /* @__PURE__ */ a.jsxs(Sr, { children: [
3501
+ /* @__PURE__ */ a.jsx(A.Target, { name: "navigation-before" }),
3502
+ t.map((r) => /* @__PURE__ */ a.jsx(
3503
+ et,
3504
+ {
3505
+ item: r
3506
+ },
3507
+ r.type + (r.label ?? "") + ("path" in r ? r.path : "") + ("file" in r ? r.file : "") + ("to" in r ? r.to : "")
3508
+ )),
3509
+ /* @__PURE__ */ a.jsx(A.Target, { name: "navigation-after" })
3510
+ ] }),
3511
+ /* @__PURE__ */ a.jsx(
3512
+ Gt,
3513
+ {
3514
+ className: "lg:hidden h-[100dvh] start-0 w-[320px] rounded-none",
3515
+ "aria-describedby": void 0,
3516
+ children: /* @__PURE__ */ a.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
3517
+ /* @__PURE__ */ a.jsx(Yt, { children: /* @__PURE__ */ a.jsx(Jt, { children: "Navigation" }) }),
3518
+ t.map((r) => /* @__PURE__ */ a.jsx(
3519
+ et,
3520
+ {
3521
+ item: r,
3522
+ onRequestClose: e
3523
+ },
3524
+ r.label
3525
+ ))
3526
+ ] })
3527
+ }
3528
+ )
3529
+ ] }), Oc = ({ children: e }) => {
3530
+ const [t, r] = G(!1), { navigation: n } = Lt(), o = n.length > 0, s = Ae().state === "loading", { options: i } = M();
3531
+ return /* @__PURE__ */ a.jsxs(
3532
+ Pr,
3533
+ {
3534
+ direction: i.page?.dir === "rtl" ? "right" : "left",
3535
+ open: t,
3536
+ onOpenChange: (u) => r(u),
3537
+ children: [
3538
+ o && /* @__PURE__ */ a.jsx(
3539
+ Cc,
3540
+ {
3541
+ onRequestClose: () => r(!1),
3542
+ navigation: n
3543
+ }
3544
+ ),
3545
+ o && /* @__PURE__ */ a.jsx("div", { className: "lg:hidden -mx-4 px-4 py-2 sticky bg-background/80 backdrop-blur-xs z-10 top-0 start-0 end-0 border-b", children: /* @__PURE__ */ a.jsxs(Pc, { className: "flex items-center gap-2 px-4", children: [
3546
+ /* @__PURE__ */ a.jsx(Qn, { size: 16, strokeWidth: 1.5 }),
3547
+ /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
3548
+ ] }) }),
3549
+ /* @__PURE__ */ a.jsxs(
3550
+ "main",
3551
+ {
3552
+ "data-pagefind-body": !0,
3553
+ className: N(
3554
+ "px-4 lg:pe-8 lg:px-8",
3555
+ !o && "col-span-full",
3556
+ s && "animate-pulse"
3557
+ ),
3558
+ children: [
3559
+ /* @__PURE__ */ a.jsx(A.Target, { name: "content-before" }),
3560
+ e,
3561
+ /* @__PURE__ */ a.jsx(A.Target, { name: "content-after" })
3562
+ ]
3563
+ }
3564
+ )
3565
+ ]
3566
+ }
3567
+ );
3568
+ }, Nc = () => /* @__PURE__ */ a.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ a.jsx(Vt, {}) }), Ac = ({ children: e }) => {
3569
+ const { meta: t, authentication: r, options: n } = M(), o = ye();
3570
+ return jn(), sc(), F(() => {
3571
+ r?.onPageLoad?.();
3572
+ }, [r]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3573
+ /* @__PURE__ */ a.jsxs(Ne, { titleTemplate: t?.title, children: [
3574
+ n.canonicalUrlOrigin && /* @__PURE__ */ a.jsx(
3575
+ "link",
3576
+ {
3577
+ rel: "canonical",
3578
+ href: ee(
3579
+ n.canonicalUrlOrigin,
3580
+ n.basePath,
3581
+ o.pathname
3582
+ )
3583
+ }
3584
+ ),
3585
+ t?.description && /* @__PURE__ */ a.jsx("meta", { name: "description", content: t.description }),
3586
+ t?.favicon && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: t.favicon })
3587
+ ] }),
3588
+ /* @__PURE__ */ a.jsx(A.Target, { name: "layout-before-head" }),
3589
+ /* @__PURE__ */ a.jsx(zr, {}),
3590
+ /* @__PURE__ */ a.jsx(A.Target, { name: "layout-after-head" }),
3591
+ /* @__PURE__ */ a.jsx(
3592
+ "div",
3593
+ {
3594
+ className: N(
3595
+ "grid max-w-screen-2xl w-full lg:mx-auto",
3596
+ "[&:has(>:only-child)]:grid-rows-1 grid-rows-[0_min-content_1fr] lg:grid-rows-[min-content_1fr]",
3597
+ "grid-cols-1 lg:grid-cols-[var(--side-nav-width)_1fr]"
3598
+ ),
3599
+ children: /* @__PURE__ */ a.jsx(De, { fallback: /* @__PURE__ */ a.jsx(Nc, {}), children: /* @__PURE__ */ a.jsx(Oc, { children: e ?? /* @__PURE__ */ a.jsx(It, {}) }) })
3600
+ }
3601
+ ),
3602
+ /* @__PURE__ */ a.jsx(cc, {})
3603
+ ] });
3604
+ }, Rc = ({
3605
+ title: e = "An error occurred",
3606
+ message: t,
3607
+ category: r
3608
+ }) => /* @__PURE__ */ a.jsxs(Bt, { className: "h-full pt-(--padding-content-top)", children: [
3609
+ r && /* @__PURE__ */ a.jsx($n, { children: r }),
3610
+ e && /* @__PURE__ */ a.jsx(kn, { level: 1, className: "flex gap-3.5 items-center", children: e }),
3611
+ /* @__PURE__ */ a.jsx("p", { children: t })
3612
+ ] }), Ic = (e) => {
3613
+ switch (e) {
3614
+ case 400:
3615
+ return {
3616
+ title: "Bad Request",
3617
+ message: "The request could not be understood by the server due to malformed syntax."
3618
+ };
3619
+ case 403:
3620
+ return {
3621
+ title: "Forbidden",
3622
+ message: "You don't have permission to access this resource."
3623
+ };
3624
+ case 404:
3625
+ return {
3626
+ title: "Not Found",
3627
+ message: "The requested resource could not be found."
3628
+ };
3629
+ case 405:
3630
+ return {
3631
+ title: "Method Not Allowed",
3632
+ message: "The request method is not supported for the requested resource."
3633
+ };
3634
+ case 414:
3635
+ return {
3636
+ title: "Request URI Too Large",
3637
+ message: "The request URI is too large."
3638
+ };
3639
+ case 416:
3640
+ return {
3641
+ title: "Range Not Satisfiable",
3642
+ message: "The server cannot satisfy the request range."
3643
+ };
3644
+ case 500:
3645
+ return {
3646
+ title: "Internal Server Error",
3647
+ message: "An unexpected error occurred while processing your request."
3648
+ };
3649
+ case 501:
3650
+ return {
3651
+ title: "Not Implemented",
3652
+ message: "The server does not support the functionality required to fulfill the request."
3653
+ };
3654
+ case 502:
3655
+ return {
3656
+ title: "Bad Gateway",
3657
+ message: "The server received an invalid response from the upstream server."
3658
+ };
3659
+ case 503:
3660
+ return {
3661
+ title: "Service Unavailable",
3662
+ message: "The server is temporarily unable to handle the request."
3663
+ };
3664
+ case 504:
3665
+ return {
3666
+ title: "Gateway Timeout",
3667
+ message: "The server did not receive a timely response from the upstream server."
3668
+ };
3669
+ default:
3670
+ return {
3671
+ title: "An error occurred",
3672
+ message: "Something went wrong while processing your request."
3673
+ };
3674
+ }
3675
+ }, Dc = ({ statusCode: e, message: t }) => {
3676
+ const r = Ic(e);
3677
+ return /* @__PURE__ */ a.jsx(
3678
+ Rc,
3679
+ {
3680
+ title: r.title,
3681
+ message: t ?? r.message,
3682
+ category: e
3683
+ }
3684
+ );
3685
+ }, Mc = Ie(null), Ee = {
3686
+ didCatch: !1,
3687
+ error: null
3688
+ };
3689
+ class Fc extends Cn {
3690
+ constructor(t) {
3691
+ super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Ee;
3692
+ }
3693
+ static getDerivedStateFromError(t) {
3694
+ return {
3695
+ didCatch: !0,
3696
+ error: t
3697
+ };
3698
+ }
3699
+ resetErrorBoundary() {
3700
+ const {
3701
+ error: t
3702
+ } = this.state;
3703
+ if (t !== null) {
3704
+ for (var r, n, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
3705
+ s[i] = arguments[i];
3706
+ (r = (n = this.props).onReset) === null || r === void 0 || r.call(n, {
3707
+ args: s,
3708
+ reason: "imperative-api"
3709
+ }), this.setState(Ee);
3710
+ }
3711
+ }
3712
+ componentDidCatch(t, r) {
3713
+ var n, o;
3714
+ (n = (o = this.props).onError) === null || n === void 0 || n.call(o, t, r);
3715
+ }
3716
+ componentDidUpdate(t, r) {
3717
+ const {
3718
+ didCatch: n
3719
+ } = this.state, {
3720
+ resetKeys: o
3721
+ } = this.props;
3722
+ if (n && r.error !== null && qc(t.resetKeys, o)) {
3723
+ var s, i;
3724
+ (s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
3725
+ next: o,
3726
+ prev: t.resetKeys,
3727
+ reason: "keys"
3728
+ }), this.setState(Ee);
3729
+ }
3730
+ }
3731
+ render() {
3732
+ const {
3733
+ children: t,
3734
+ fallbackRender: r,
3735
+ FallbackComponent: n,
3736
+ fallback: o
3737
+ } = this.props, {
3738
+ didCatch: s,
3739
+ error: i
3740
+ } = this.state;
3741
+ let u = t;
3742
+ if (s) {
3743
+ const p = {
3744
+ error: i,
3745
+ resetErrorBoundary: this.resetErrorBoundary
3746
+ };
3747
+ if (typeof r == "function")
3748
+ u = r(p);
3749
+ else if (n)
3750
+ u = tt(n, p);
3751
+ else if (o !== void 0)
3752
+ u = o;
3753
+ else
3754
+ throw i;
3755
+ }
3756
+ return tt(Mc.Provider, {
3757
+ value: {
3758
+ didCatch: s,
3759
+ error: i,
3760
+ resetErrorBoundary: this.resetErrorBoundary
3761
+ }
3762
+ }, u);
3763
+ }
3764
+ }
3765
+ function qc() {
3766
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
3767
+ return e.length !== t.length || e.some((r, n) => !Object.is(r, t[n]));
3768
+ }
3769
+ let Uc = () => ({
3770
+ emit(e, ...t) {
3771
+ for (let r = this.events[e] || [], n = 0, o = r.length; n < o; n++)
3772
+ r[n](...t);
3773
+ },
3774
+ events: {},
3775
+ on(e, t) {
3776
+ return (this.events[e] ||= []).push(t), () => {
3777
+ this.events[e] = this.events[e]?.filter((r) => t !== r);
3778
+ };
3779
+ }
3780
+ });
3781
+ const Lc = (e) => Object.entries(e);
3782
+ class Qc {
3783
+ plugins;
3784
+ navigation;
3785
+ meta;
3786
+ page;
3787
+ authentication;
3788
+ queryClient;
3789
+ options;
3790
+ navigationPlugins;
3791
+ emitter = Uc();
3792
+ constructor(t, r) {
3793
+ const n = (t.protectedRoutes ?? []).concat(
3794
+ t.plugins?.flatMap(
3795
+ (o) => rt(o) ? o.getProtectedRoutes?.() ?? [] : []
3796
+ ) ?? []
3797
+ );
3798
+ this.queryClient = r, this.options = { ...t, protectedRoutes: n }, this.plugins = t.plugins ?? [], this.navigation = t.navigation ?? [], this.navigationPlugins = this.plugins.filter(rt), this.authentication = this.plugins.find(Kn), this.meta = t.metadata, this.page = t.page, this.plugins.forEach((o) => {
3799
+ Wn(o) && Lc(o.events).forEach(([s, i]) => {
3800
+ this.emitter.on(s, i);
3801
+ });
3802
+ }), hn.subscribe((o, s) => {
3803
+ this.emitEvent("auth", {
3804
+ prev: s,
3805
+ next: o
3806
+ });
3807
+ });
3808
+ }
3809
+ initialize = async () => {
3810
+ await Promise.all(
3811
+ this.plugins.filter(Vn).map((t) => t.initialize?.(this))
3812
+ );
3813
+ };
3814
+ getApiIdentities = async () => (await Promise.all(
3815
+ this.plugins.filter(Yn).map((r) => r.getIdentities(this))
3816
+ )).flat();
3817
+ addEventListener(t, r) {
3818
+ return this.emitter.on(t, r);
3819
+ }
3820
+ emitEvent = (t, ...r) => this.emitter.emit(t, ...r);
3821
+ getPluginNavigation = async (t) => (await Promise.all(
3822
+ this.navigationPlugins.map(
3823
+ (n) => n.getNavigation?.(ee(t), this)
3824
+ )
3825
+ )).flatMap((n) => n ?? []);
3826
+ signRequest = async (t) => {
3827
+ if (!this.authentication)
3828
+ throw new Error("No authentication provider configured");
3829
+ return await this.authentication.signRequest(t);
3830
+ };
3831
+ }
3832
+ function Bc({ error: e, resetErrorBoundary: t }) {
3833
+ return /* @__PURE__ */ a.jsx(Qt, { error: e });
3834
+ }
3835
+ const pe = globalThis;
3836
+ (!pe.requestIdleCallback || !pe.cancelIdleCallback) && (pe.requestIdleCallback = (e) => setTimeout(e, 1), pe.cancelIdleCallback = clearTimeout);
3837
+ const Zr = {
3838
+ Header: zr
3839
+ }, Hc = Ie(Zr), Kc = Hc.Provider, Wc = () => {
3840
+ const e = ye(), t = M(), r = K(void 0);
3841
+ return F(() => {
3842
+ t.emitEvent("location", {
3843
+ from: r.current,
3844
+ to: e
3845
+ }), r.current = e;
3846
+ }, [t, e]), null;
3847
+ }, Vc = ({
3848
+ children: e,
3849
+ context: t
3850
+ }) => (pn({
3851
+ queryFn: async () => (await t.initialize(), !0),
3852
+ queryKey: ["zudoku-initialize", mn]
3853
+ }), /* @__PURE__ */ a.jsx(gn.Provider, { value: t, children: e }));
3854
+ let Ot;
3855
+ const Tr = Wt(
3856
+ ({ children: e, ...t }) => {
3857
+ const r = ke(
3858
+ () => ({ ...Zr, ...t.overrides }),
3859
+ [t.overrides]
3860
+ ), n = ye(), o = ke(() => ({
3861
+ ...(t.plugins ?? []).filter(Gn).flatMap(
3862
+ (l) => l.getMdxComponents ? [l.getMdxComponents()] : []
3863
+ ).reduce(
3864
+ (l, g) => ({ ...l, ...g }),
3865
+ {}
3866
+ ),
3867
+ ...zn,
3868
+ ...t.mdx?.components
3869
+ }), [t.mdx?.components, t.plugins]), { stagger: s } = On(Ze), [i, u] = G(!1), p = ke(
3870
+ () => i ? { stagger: !0 } : { stagger: s },
3871
+ [s, i]
3872
+ ), f = Ae(), x = Ft();
3873
+ F(() => {
3874
+ i || u(!0);
3875
+ }, [i, f.location]), Ot ??= new Qc(t, x);
3876
+ const m = t.plugins?.flatMap(
3877
+ (h) => Jn(h) ? h.getHead?.({ location: n }) ?? [] : []
3878
+ ).map((h, l) => /* @__PURE__ */ a.jsx(Ne, { children: h }, l));
3879
+ return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3880
+ m,
3881
+ /* @__PURE__ */ a.jsx(Ze.Provider, { value: p, children: /* @__PURE__ */ a.jsxs(Vc, { context: Ot, children: [
3882
+ /* @__PURE__ */ a.jsx(Wc, {}),
3883
+ /* @__PURE__ */ a.jsx(Pn, { slots: t.slots ?? t.UNSAFE_slotlets, children: /* @__PURE__ */ a.jsx(Gr, { components: o, children: /* @__PURE__ */ a.jsx(Jr, { attribute: "class", disableTransitionOnChange: !0, children: /* @__PURE__ */ a.jsx(Kc, { value: r, children: /* @__PURE__ */ a.jsx(En, { children: e ?? /* @__PURE__ */ a.jsx(It, {}) }) }) }) }) })
3884
+ ] }) })
3885
+ ] });
3886
+ }
3887
+ );
3888
+ Tr.displayName = "ZudokoInner";
3889
+ const Cr = (e) => /* @__PURE__ */ a.jsx(Fc, { FallbackComponent: Bc, children: /* @__PURE__ */ a.jsx(Tr, { ...e }) });
3890
+ Cr.displayName = "Zudoku";
3891
+ const gu = Ac, vu = Sn, yu = yo, xu = bo, _u = wo, bu = Yr, wu = Ne, ju = Dc, $u = Tn, ku = Zn, zu = Vt, Pu = xe, Eu = Ht, Su = Re, Zu = oc, Tu = Cr, Cu = Bt, Ou = Xr, Yc = M, Nu = ne, Au = vn, Ru = yn, Iu = Rt;
3892
+ export {
3893
+ Eu as B,
3894
+ $u as C,
3895
+ wu as H,
3896
+ Su as L,
3897
+ ku as M,
3898
+ vu as R,
3899
+ zu as S,
3900
+ Cu as T,
3901
+ Tu as Z,
3902
+ wc as a,
3903
+ Nu as b,
3904
+ gu as c,
3905
+ yu as d,
3906
+ xu as e,
3907
+ _u as f,
3908
+ bu as g,
3909
+ ju as h,
3910
+ Pu as i,
3911
+ Zu as j,
3912
+ Ou as k,
3913
+ Au as l,
3914
+ Ru as m,
3915
+ Iu as n,
3916
+ Lc as o,
3917
+ Yc as u
3918
+ };
3919
+ //# sourceMappingURL=index-BIbCx5Fh.js.map