zudoku 0.0.0-feat-openapi-docs-redesign.dab3fc6a → 0.0.0-feat-navigation-at-property.z8cd07fa5

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 (656) hide show
  1. package/dist/app/main.d.ts +6 -6
  2. package/dist/app/main.js +1 -1
  3. package/dist/app/main.js.map +1 -1
  4. package/dist/app/sentry.js +1 -1
  5. package/dist/cli/common/version-check.js +12 -3
  6. package/dist/cli/common/version-check.js.map +1 -1
  7. package/dist/config/create-plugin.d.ts +2 -0
  8. package/dist/config/create-plugin.js +55 -0
  9. package/dist/config/create-plugin.js.map +1 -0
  10. package/dist/config/loader.js +3 -1
  11. package/dist/config/loader.js.map +1 -1
  12. package/dist/config/validators/BuildSchema.js +18 -3
  13. package/dist/config/validators/BuildSchema.js.map +1 -1
  14. package/dist/config/validators/InputNavigationSchema.d.ts +133 -45
  15. package/dist/config/validators/InputNavigationSchema.js +30 -0
  16. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  17. package/dist/config/validators/NavigationSchema.d.ts +18 -4
  18. package/dist/config/validators/NavigationSchema.js +15 -5
  19. package/dist/config/validators/NavigationSchema.js.map +1 -1
  20. package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
  21. package/dist/config/validators/validate.d.ts +104 -14
  22. package/dist/config/validators/validate.js +15 -4
  23. package/dist/config/validators/validate.js.map +1 -1
  24. package/dist/config/validators/validate.test.js +43 -0
  25. package/dist/config/validators/validate.test.js.map +1 -1
  26. package/dist/flat-config.d.ts +68 -32
  27. package/dist/index.d.ts +4 -2
  28. package/dist/index.js +3 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/lib/auth/issuer.js +1 -1
  31. package/dist/lib/auth/issuer.js.map +1 -1
  32. package/dist/lib/authentication/authentication.d.ts +3 -2
  33. package/dist/lib/authentication/components/CallbackHandler.js +1 -1
  34. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  35. package/dist/lib/authentication/components/SignIn.js +4 -2
  36. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  37. package/dist/lib/authentication/components/SignUp.js +4 -2
  38. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  39. package/dist/lib/authentication/hook.d.ts +2 -0
  40. package/dist/lib/authentication/hook.js +10 -0
  41. package/dist/lib/authentication/hook.js.map +1 -1
  42. package/dist/lib/authentication/providers/auth0.js +17 -8
  43. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  44. package/dist/lib/authentication/providers/clerk.js +0 -22
  45. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  46. package/dist/lib/authentication/providers/firebase.js +67 -9
  47. package/dist/lib/authentication/providers/firebase.js.map +1 -1
  48. package/dist/lib/authentication/providers/supabase.js +6 -15
  49. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  50. package/dist/lib/authentication/ui/EmailVerificationUi.d.ts +4 -0
  51. package/dist/lib/authentication/ui/EmailVerificationUi.js +34 -0
  52. package/dist/lib/authentication/ui/EmailVerificationUi.js.map +1 -0
  53. package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +7 -2
  54. package/dist/lib/authentication/ui/ZudokuAuthUi.js +48 -12
  55. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -1
  56. package/dist/lib/authentication/utils/relativeRedirectUrl.d.ts +1 -0
  57. package/dist/lib/authentication/utils/relativeRedirectUrl.js +8 -0
  58. package/dist/lib/authentication/utils/relativeRedirectUrl.js.map +1 -0
  59. package/dist/lib/components/Bootstrap.js +1 -2
  60. package/dist/lib/components/Bootstrap.js.map +1 -1
  61. package/dist/lib/components/Heading.d.ts +1 -1
  62. package/dist/lib/components/Mermaid.d.ts +7 -0
  63. package/dist/lib/components/Mermaid.js +42 -0
  64. package/dist/lib/components/Mermaid.js.map +1 -0
  65. package/dist/lib/components/MobileTopNavigation.js +3 -2
  66. package/dist/lib/components/MobileTopNavigation.js.map +1 -1
  67. package/dist/lib/components/PagefindSearchMeta.d.ts +8 -0
  68. package/dist/lib/components/PagefindSearchMeta.js +7 -0
  69. package/dist/lib/components/PagefindSearchMeta.js.map +1 -0
  70. package/dist/lib/components/Pagination.js +2 -2
  71. package/dist/lib/components/Pagination.js.map +1 -1
  72. package/dist/lib/components/Slot.test.js +1 -1
  73. package/dist/lib/components/Slot.test.js.map +1 -1
  74. package/dist/lib/components/TopNavigation.d.ts +7 -1
  75. package/dist/lib/components/TopNavigation.js +8 -3
  76. package/dist/lib/components/TopNavigation.js.map +1 -1
  77. package/dist/lib/components/Zudoku.d.ts +4 -1
  78. package/dist/lib/components/Zudoku.js +5 -11
  79. package/dist/lib/components/Zudoku.js.map +1 -1
  80. package/dist/lib/components/context/ZudokuContext.d.ts +9 -4
  81. package/dist/lib/components/context/ZudokuContext.js +26 -8
  82. package/dist/lib/components/context/ZudokuContext.js.map +1 -1
  83. package/dist/lib/components/context/ZudokuProvider.js +1 -1
  84. package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
  85. package/dist/lib/components/context/ZudokuReactContext.d.ts +11 -0
  86. package/dist/lib/components/context/ZudokuReactContext.js +4 -0
  87. package/dist/lib/components/context/ZudokuReactContext.js.map +1 -0
  88. package/dist/lib/components/index.d.ts +18 -69
  89. package/dist/lib/components/index.js +19 -32
  90. package/dist/lib/components/index.js.map +1 -1
  91. package/dist/lib/components/navigation/Navigation.js +4 -3
  92. package/dist/lib/components/navigation/Navigation.js.map +1 -1
  93. package/dist/lib/components/navigation/NavigationCategory.js +8 -0
  94. package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
  95. package/dist/lib/components/navigation/NavigationFilterContext.d.ts +8 -0
  96. package/dist/lib/components/navigation/NavigationFilterContext.js +12 -0
  97. package/dist/lib/components/navigation/NavigationFilterContext.js.map +1 -0
  98. package/dist/lib/components/navigation/NavigationFilterInput.d.ts +3 -0
  99. package/dist/lib/components/navigation/NavigationFilterInput.js +9 -0
  100. package/dist/lib/components/navigation/NavigationFilterInput.js.map +1 -0
  101. package/dist/lib/components/navigation/NavigationItem.js +13 -3
  102. package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
  103. package/dist/lib/components/navigation/NavigationWrapper.js +1 -1
  104. package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
  105. package/dist/lib/components/navigation/utils.d.ts +6 -1
  106. package/dist/lib/components/navigation/utils.js +26 -2
  107. package/dist/lib/components/navigation/utils.js.map +1 -1
  108. package/dist/lib/core/RouteGuard.js +12 -7
  109. package/dist/lib/core/RouteGuard.js.map +1 -1
  110. package/dist/lib/core/ZudokuContext.d.ts +2 -1
  111. package/dist/lib/core/ZudokuContext.js +3 -1
  112. package/dist/lib/core/ZudokuContext.js.map +1 -1
  113. package/dist/lib/core/__internal.d.ts +1 -0
  114. package/dist/lib/core/__internal.js +2 -0
  115. package/dist/lib/core/__internal.js.map +1 -1
  116. package/dist/lib/core/plugins.d.ts +18 -4
  117. package/dist/lib/core/plugins.js +1 -0
  118. package/dist/lib/core/plugins.js.map +1 -1
  119. package/dist/lib/core/react-query.d.ts +1 -0
  120. package/dist/lib/core/react-query.js +2 -0
  121. package/dist/lib/core/react-query.js.map +1 -0
  122. package/dist/lib/core/transform-config.d.ts +4 -0
  123. package/dist/lib/core/transform-config.js +42 -0
  124. package/dist/lib/core/transform-config.js.map +1 -0
  125. package/dist/lib/core/transform-config.test.d.ts +1 -0
  126. package/dist/lib/core/transform-config.test.js +83 -0
  127. package/dist/lib/core/transform-config.test.js.map +1 -0
  128. package/dist/lib/errors/ErrorAlert.js +1 -2
  129. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  130. package/dist/lib/errors/ErrorMessage.d.ts +3 -0
  131. package/dist/lib/errors/ErrorMessage.js +16 -0
  132. package/dist/lib/errors/ErrorMessage.js.map +1 -0
  133. package/dist/lib/hooks/index.d.ts +7 -28
  134. package/dist/lib/hooks/index.js +7 -15
  135. package/dist/lib/hooks/index.js.map +1 -1
  136. package/dist/lib/hooks/useEvent.test.js +1 -1
  137. package/dist/lib/hooks/useEvent.test.js.map +1 -1
  138. package/dist/lib/navigation/pathMatcher.d.ts +8 -0
  139. package/dist/lib/navigation/pathMatcher.js +62 -0
  140. package/dist/lib/navigation/pathMatcher.js.map +1 -0
  141. package/dist/lib/navigation/pathMatcher.test.d.ts +1 -0
  142. package/dist/lib/navigation/pathMatcher.test.js +115 -0
  143. package/dist/lib/navigation/pathMatcher.test.js.map +1 -0
  144. package/dist/lib/navigation/positionItems.d.ts +10 -0
  145. package/dist/lib/navigation/positionItems.js +54 -0
  146. package/dist/lib/navigation/positionItems.js.map +1 -0
  147. package/dist/lib/navigation/positionItems.test.d.ts +1 -0
  148. package/dist/lib/navigation/positionItems.test.js +229 -0
  149. package/dist/lib/navigation/positionItems.test.js.map +1 -0
  150. package/dist/lib/oas/graphql/circular.d.ts +2 -0
  151. package/dist/lib/oas/graphql/circular.js +21 -16
  152. package/dist/lib/oas/graphql/circular.js.map +1 -1
  153. package/dist/lib/oas/graphql/circular.test.d.ts +1 -0
  154. package/dist/lib/oas/graphql/circular.test.js +183 -0
  155. package/dist/lib/oas/graphql/circular.test.js.map +1 -0
  156. package/dist/lib/oas/graphql/index.js +7 -3
  157. package/dist/lib/oas/graphql/index.js.map +1 -1
  158. package/dist/lib/oas/parser/index.d.ts +1 -0
  159. package/dist/lib/oas/parser/index.js +14 -5
  160. package/dist/lib/oas/parser/index.js.map +1 -1
  161. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +9 -172
  162. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  163. package/dist/lib/plugins/api-keys/index.d.ts +11 -4
  164. package/dist/lib/plugins/api-keys/index.js +36 -22
  165. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  166. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.d.ts +12 -0
  167. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js +133 -0
  168. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js.map +1 -0
  169. package/dist/lib/plugins/api-keys/settings/ApiKeyList.d.ts +4 -0
  170. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js +33 -0
  171. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js.map +1 -0
  172. package/dist/lib/plugins/api-keys/settings/RevealApiKey.d.ts +6 -0
  173. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js +39 -0
  174. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js.map +1 -0
  175. package/dist/lib/plugins/openapi/DownloadSchemaButton.d.ts +3 -0
  176. package/dist/lib/plugins/openapi/DownloadSchemaButton.js +47 -0
  177. package/dist/lib/plugins/openapi/DownloadSchemaButton.js.map +1 -0
  178. package/dist/lib/plugins/openapi/Endpoint.js +3 -6
  179. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  180. package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +1 -1
  181. package/dist/lib/plugins/openapi/OasProvider.js +26 -13
  182. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
  183. package/dist/lib/plugins/openapi/OperationList.js +20 -10
  184. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  185. package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
  186. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  187. package/dist/lib/plugins/openapi/ParamInfos.js +1 -0
  188. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  189. package/dist/lib/plugins/openapi/ParameterList.js +1 -1
  190. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  191. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -1
  192. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +4 -3
  193. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  194. package/dist/lib/plugins/openapi/SchemaList.js +2 -1
  195. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  196. package/dist/lib/plugins/openapi/Sidecar.js +12 -3
  197. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  198. package/dist/lib/plugins/openapi/index.js +11 -5
  199. package/dist/lib/plugins/openapi/index.js.map +1 -1
  200. package/dist/lib/plugins/openapi/interfaces.d.ts +19 -13
  201. package/dist/lib/plugins/openapi/playground/Playground.js +8 -4
  202. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  203. package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +1 -0
  204. package/dist/lib/plugins/openapi/playground/fileUtils.js +3 -0
  205. package/dist/lib/plugins/openapi/playground/fileUtils.js.map +1 -1
  206. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.d.ts +6 -0
  207. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js +20 -0
  208. package/dist/lib/plugins/openapi/playground/result-panel/AudioPlayer.js.map +1 -0
  209. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +7 -2
  210. package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
  211. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
  212. package/dist/lib/plugins/openapi/schema/SchemaView.js +16 -7
  213. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  214. package/dist/lib/plugins/openapi/schema/utils.d.ts +2 -2
  215. package/dist/lib/plugins/openapi/schema/utils.js +11 -3
  216. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  217. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +24 -1
  218. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -1
  219. package/dist/lib/plugins/openapi/util/getRoutes.d.ts +9 -1
  220. package/dist/lib/plugins/openapi/util/getRoutes.js +30 -2
  221. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  222. package/dist/lib/plugins/search-pagefind/IndexingDialog.d.ts +3 -0
  223. package/dist/lib/plugins/search-pagefind/IndexingDialog.js +64 -0
  224. package/dist/lib/plugins/search-pagefind/IndexingDialog.js.map +1 -0
  225. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +22 -5
  226. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  227. package/dist/lib/plugins/search-pagefind/ResultList.js +5 -4
  228. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  229. package/dist/lib/shiki.d.ts +1 -1
  230. package/dist/lib/shiki.js +18 -12
  231. package/dist/lib/shiki.js.map +1 -1
  232. package/dist/lib/ui/Alert.d.ts +3 -2
  233. package/dist/lib/ui/Alert.js +9 -5
  234. package/dist/lib/ui/Alert.js.map +1 -1
  235. package/dist/lib/ui/Button.d.ts +2 -2
  236. package/dist/lib/ui/Button.js +10 -9
  237. package/dist/lib/ui/Button.js.map +1 -1
  238. package/dist/lib/ui/ButtonGroup.d.ts +11 -0
  239. package/dist/lib/ui/ButtonGroup.js +28 -0
  240. package/dist/lib/ui/ButtonGroup.js.map +1 -0
  241. package/dist/lib/ui/Command.d.ts +3 -3
  242. package/dist/lib/ui/Command.js +2 -2
  243. package/dist/lib/ui/Command.js.map +1 -1
  244. package/dist/lib/ui/DropdownMenu.d.ts +21 -23
  245. package/dist/lib/ui/DropdownMenu.js +47 -32
  246. package/dist/lib/ui/DropdownMenu.js.map +1 -1
  247. package/dist/lib/ui/InputGroup.d.ts +16 -0
  248. package/dist/lib/ui/InputGroup.js +65 -0
  249. package/dist/lib/ui/InputGroup.js.map +1 -0
  250. package/dist/lib/ui/Kbd.d.ts +3 -0
  251. package/dist/lib/ui/Kbd.js +10 -0
  252. package/dist/lib/ui/Kbd.js.map +1 -0
  253. package/dist/lib/ui/Secret.js +2 -2
  254. package/dist/lib/ui/Secret.js.map +1 -1
  255. package/dist/lib/util/MdxComponents.d.ts +1 -0
  256. package/dist/lib/util/MdxComponents.js +2 -0
  257. package/dist/lib/util/MdxComponents.js.map +1 -1
  258. package/dist/lib/util/flattenAllOf.d.ts +0 -2
  259. package/dist/lib/util/flattenAllOf.js +0 -23
  260. package/dist/lib/util/flattenAllOf.js.map +1 -1
  261. package/dist/lib/util/flattenAllOf.test.js +69 -13
  262. package/dist/lib/util/flattenAllOf.test.js.map +1 -1
  263. package/dist/lib/util/flattenAllOfProcessor.d.ts +2 -0
  264. package/dist/lib/util/flattenAllOfProcessor.js +48 -0
  265. package/dist/lib/util/flattenAllOfProcessor.js.map +1 -0
  266. package/dist/lib/util/invariant.d.ts +1 -1
  267. package/dist/lib/util/invariant.js +2 -2
  268. package/dist/lib/util/invariant.js.map +1 -1
  269. package/dist/lib/util/readFrontmatter.d.ts +6 -0
  270. package/dist/lib/util/readFrontmatter.js +13 -0
  271. package/dist/lib/util/readFrontmatter.js.map +1 -0
  272. package/dist/vite/api/SchemaManager.d.ts +17 -1
  273. package/dist/vite/api/SchemaManager.js +52 -11
  274. package/dist/vite/api/SchemaManager.js.map +1 -1
  275. package/dist/vite/api/SchemaManager.test.js +111 -0
  276. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  277. package/dist/vite/build.js +91 -73
  278. package/dist/vite/build.js.map +1 -1
  279. package/dist/vite/config.js +16 -1
  280. package/dist/vite/config.js.map +1 -1
  281. package/dist/vite/dev-server.js +25 -0
  282. package/dist/vite/dev-server.js.map +1 -1
  283. package/dist/vite/error-handler.js +1 -5
  284. package/dist/vite/error-handler.js.map +1 -1
  285. package/dist/vite/mdx/remark-inject-filepath.js +5 -1
  286. package/dist/vite/mdx/remark-inject-filepath.js.map +1 -1
  287. package/dist/vite/mdx/remark-last-modified.js +57 -3
  288. package/dist/vite/mdx/remark-last-modified.js.map +1 -1
  289. package/dist/vite/mdx/remark-link-rewrite.js +4 -3
  290. package/dist/vite/mdx/remark-link-rewrite.js.map +1 -1
  291. package/dist/vite/pagefind-dev-index.d.ts +16 -0
  292. package/dist/vite/pagefind-dev-index.js +68 -0
  293. package/dist/vite/pagefind-dev-index.js.map +1 -0
  294. package/dist/vite/plugin-api-keys.js +5 -1
  295. package/dist/vite/plugin-api-keys.js.map +1 -1
  296. package/dist/vite/plugin-api.js +44 -4
  297. package/dist/vite/plugin-api.js.map +1 -1
  298. package/dist/vite/plugin-config.js +16 -4
  299. package/dist/vite/plugin-config.js.map +1 -1
  300. package/dist/vite/plugin-docs.js +9 -7
  301. package/dist/vite/plugin-docs.js.map +1 -1
  302. package/dist/vite/plugin-frontmatter.js +3 -5
  303. package/dist/vite/plugin-frontmatter.js.map +1 -1
  304. package/dist/vite/plugin-markdown-export.js +8 -7
  305. package/dist/vite/plugin-markdown-export.js.map +1 -1
  306. package/dist/vite/plugin-theme.js +2 -1
  307. package/dist/vite/plugin-theme.js.map +1 -1
  308. package/dist/vite/prerender/prerender.js +4 -20
  309. package/dist/vite/prerender/prerender.js.map +1 -1
  310. package/dist/vite/prerender/utils.d.ts +2 -0
  311. package/dist/vite/prerender/utils.js +30 -0
  312. package/dist/vite/prerender/utils.js.map +1 -0
  313. package/dist/vite/prerender/worker.js +6 -1
  314. package/dist/vite/prerender/worker.js.map +1 -1
  315. package/dist/vite/zuplo.d.ts +13 -0
  316. package/dist/vite/zuplo.js +15 -0
  317. package/dist/vite/zuplo.js.map +1 -0
  318. package/lib/ActionButton-B0CXL1Lq.js +25 -0
  319. package/lib/ActionButton-B0CXL1Lq.js.map +1 -0
  320. package/lib/Button-GUVe7pmt.js +54 -0
  321. package/lib/Button-GUVe7pmt.js.map +1 -0
  322. package/lib/{Card-KFniaZn5.js → Card-DCdq37aA.js} +2 -2
  323. package/lib/{Card-KFniaZn5.js.map → Card-DCdq37aA.js.map} +1 -1
  324. package/lib/ClaudeLogo-DoZ7fHHk.js +73 -0
  325. package/lib/ClaudeLogo-DoZ7fHHk.js.map +1 -0
  326. package/lib/{Command-CUcrW3qs.js → Command-N6VujV30.js} +26 -26
  327. package/lib/Command-N6VujV30.js.map +1 -0
  328. package/lib/{Dialog-BQciPiHN.js → Dialog-hlvmmQ_c.js} +2 -2
  329. package/lib/{Dialog-BQciPiHN.js.map → Dialog-hlvmmQ_c.js.map} +1 -1
  330. package/lib/{Drawer-Ci7XwhqT.js → Drawer-Ch7927PF.js} +7 -7
  331. package/lib/{Drawer-Ci7XwhqT.js.map → Drawer-Ch7927PF.js.map} +1 -1
  332. package/lib/DropdownMenu-DN0jNrjj.js +104 -0
  333. package/lib/DropdownMenu-DN0jNrjj.js.map +1 -0
  334. package/lib/Frame-DKlOmSkU.js +205 -0
  335. package/lib/Frame-DKlOmSkU.js.map +1 -0
  336. package/lib/HydrationBoundary-CJu4vUlG.js +601 -0
  337. package/lib/HydrationBoundary-CJu4vUlG.js.map +1 -0
  338. package/lib/IndexingDialog-D0YdGfbn.js +100 -0
  339. package/lib/IndexingDialog-D0YdGfbn.js.map +1 -0
  340. package/lib/Input-Cx-GeKoF.js +22 -0
  341. package/lib/Input-Cx-GeKoF.js.map +1 -0
  342. package/lib/MdxPage-Bc_5OsQ5.js +210 -0
  343. package/lib/MdxPage-Bc_5OsQ5.js.map +1 -0
  344. package/lib/Mermaid-Chx5BPHn.js +104 -0
  345. package/lib/Mermaid-Chx5BPHn.js.map +1 -0
  346. package/lib/{OAuthErrorPage-DnKnq4xK.js → OAuthErrorPage-D-VcZ5cO.js} +26 -23
  347. package/lib/OAuthErrorPage-D-VcZ5cO.js.map +1 -0
  348. package/lib/OasProvider-CZqLHoRo.js +48 -0
  349. package/lib/OasProvider-CZqLHoRo.js.map +1 -0
  350. package/lib/{OperationList-D8EDc9v7.js → OperationList-BmV1XvEY.js} +2136 -2002
  351. package/lib/OperationList-BmV1XvEY.js.map +1 -0
  352. package/lib/RouteGuard-Dns7HD7C.js +77 -0
  353. package/lib/RouteGuard-Dns7HD7C.js.map +1 -0
  354. package/lib/{SchemaList-E6lF7dID.js → SchemaList-D23IyrX5.js} +28 -27
  355. package/lib/SchemaList-D23IyrX5.js.map +1 -0
  356. package/lib/SchemaView-DVbiGPo3.js +438 -0
  357. package/lib/SchemaView-DVbiGPo3.js.map +1 -0
  358. package/lib/Secret-CyhXSA8i.js +263 -0
  359. package/lib/Secret-CyhXSA8i.js.map +1 -0
  360. package/lib/SignUp-DfEe1w5X.js +55 -0
  361. package/lib/SignUp-DfEe1w5X.js.map +1 -0
  362. package/lib/{SyntaxHighlight-C19vH0V_.js → SyntaxHighlight-N2RffYNz.js} +1469 -1411
  363. package/lib/SyntaxHighlight-N2RffYNz.js.map +1 -0
  364. package/lib/{Toc-DbWS75JZ.js → Toc-Cpo_HSYx.js} +3 -3
  365. package/lib/{Toc-DbWS75JZ.js.map → Toc-Cpo_HSYx.js.map} +1 -1
  366. package/lib/{ErrorAlert-_1Zmhr68.js → Zudoku-GbutmWzP.js} +5663 -4482
  367. package/lib/Zudoku-GbutmWzP.js.map +1 -0
  368. package/lib/ZudokuContext-LPkD2SQs.js +250 -0
  369. package/lib/ZudokuContext-LPkD2SQs.js.map +1 -0
  370. package/lib/ZudokuReactContext-DGJAP1sN.js +222 -0
  371. package/lib/ZudokuReactContext-DGJAP1sN.js.map +1 -0
  372. package/lib/chunk-EPOLDU6W-C6C8jAwd.js +8558 -0
  373. package/lib/chunk-EPOLDU6W-C6C8jAwd.js.map +1 -0
  374. package/lib/{circular-BoYo7au5.js → circular-DfSpMuY7.js} +6429 -6019
  375. package/lib/circular-DfSpMuY7.js.map +1 -0
  376. package/lib/{cn-dYga0KKN.js → cn-5-Gd1Dss.js} +531 -498
  377. package/lib/cn-5-Gd1Dss.js.map +1 -0
  378. package/lib/{createServer-B_BZ7xX8.js → createServer-4kaAMuIM.js} +2790 -2737
  379. package/lib/createServer-4kaAMuIM.js.map +1 -0
  380. package/lib/createVariantComponent-Dc0vtOvr.js +18 -0
  381. package/lib/createVariantComponent-Dc0vtOvr.js.map +1 -0
  382. package/lib/{errors-CD873hrG.js → errors-CtZTDEB6.js} +3 -3
  383. package/lib/{errors-CD873hrG.js.map → errors-CtZTDEB6.js.map} +1 -1
  384. package/lib/firebase-D286uF4e.js +7615 -0
  385. package/lib/firebase-D286uF4e.js.map +1 -0
  386. package/lib/hook-DyEn6D2Q.js +53 -0
  387. package/lib/hook-DyEn6D2Q.js.map +1 -0
  388. package/lib/{index-HNVs5cgX.js → index-B7bvsQHg.js} +853 -802
  389. package/lib/index-B7bvsQHg.js.map +1 -0
  390. package/lib/{index-BK0jKRrX.js → index-CVumYRba.js} +2 -2
  391. package/lib/{index-BK0jKRrX.js.map → index-CVumYRba.js.map} +1 -1
  392. package/lib/index-CrcNWbel.js.map +1 -1
  393. package/lib/index-DAWHN3cH.js +86 -0
  394. package/lib/index-DAWHN3cH.js.map +1 -0
  395. package/lib/index.esm-BYObtETB.js.map +1 -1
  396. package/lib/index.esm-BkpWrvLZ.js +34 -0
  397. package/lib/index.esm-BkpWrvLZ.js.map +1 -0
  398. package/lib/{index.esm-BnYHxCYC.js → index.esm-Ca5zvoff.js} +2 -2
  399. package/lib/{index.esm-BnYHxCYC.js.map → index.esm-Ca5zvoff.js.map} +1 -1
  400. package/lib/{invariant-Bm-FVUQE.js → invariant-B_t_F2s_.js} +4 -4
  401. package/lib/invariant-B_t_F2s_.js.map +1 -0
  402. package/lib/jsx-runtime-BzflLqGi.js.map +1 -1
  403. package/lib/{mutation-BSU0xu4m.js → mutation-B7eFBLZY.js} +70 -44
  404. package/lib/mutation-B7eFBLZY.js.map +1 -0
  405. package/lib/ui/Accordion.js +1 -1
  406. package/lib/ui/ActionButton.js +2 -2
  407. package/lib/ui/Alert.js +32 -20
  408. package/lib/ui/Alert.js.map +1 -1
  409. package/lib/ui/AlertDialog.js +1 -1
  410. package/lib/ui/Badge.js +1 -1
  411. package/lib/ui/Breadcrumb.js +1 -1
  412. package/lib/ui/Button.js +27 -25
  413. package/lib/ui/Button.js.map +1 -1
  414. package/lib/ui/ButtonGroup.js +77 -0
  415. package/lib/ui/ButtonGroup.js.map +1 -0
  416. package/lib/ui/Callout.js +1 -1
  417. package/lib/ui/Card.js +1 -1
  418. package/lib/ui/Carousel.js +1 -1
  419. package/lib/ui/Carousel.js.map +1 -1
  420. package/lib/ui/Checkbox.js +1 -1
  421. package/lib/ui/CodeBlock.js +1 -1
  422. package/lib/ui/Command.js +5 -5
  423. package/lib/ui/Command.js.map +1 -1
  424. package/lib/ui/Dialog.js +1 -1
  425. package/lib/ui/Drawer.js +3 -3
  426. package/lib/ui/DropdownMenu.js +227 -140
  427. package/lib/ui/DropdownMenu.js.map +1 -1
  428. package/lib/ui/EmbeddedCodeBlock.js +1 -1
  429. package/lib/ui/Form.js +1 -1
  430. package/lib/ui/Frame.js +1 -1
  431. package/lib/ui/HoverCard.js +1 -1
  432. package/lib/ui/Input.js +1 -1
  433. package/lib/ui/InputGroup.js +155 -0
  434. package/lib/ui/InputGroup.js.map +1 -0
  435. package/lib/ui/Item.js +1 -1
  436. package/lib/ui/Kbd.js +32 -0
  437. package/lib/ui/Kbd.js.map +1 -0
  438. package/lib/ui/Label.js +1 -1
  439. package/lib/ui/NativeSelect.js +1 -1
  440. package/lib/ui/Pagination.js +1 -1
  441. package/lib/ui/Popover.js +1 -1
  442. package/lib/ui/Progress.js +1 -1
  443. package/lib/ui/RadioGroup.js +1 -1
  444. package/lib/ui/ScrollArea.js +1 -1
  445. package/lib/ui/Secret.js +3 -3
  446. package/lib/ui/Secret.js.map +1 -1
  447. package/lib/ui/Separator.js +1 -1
  448. package/lib/ui/Skeleton.js +1 -1
  449. package/lib/ui/Slider.js +1 -1
  450. package/lib/ui/Switch.js +1 -1
  451. package/lib/ui/SyntaxHighlight.js +3 -3
  452. package/lib/ui/Tabs.js +1 -1
  453. package/lib/ui/Textarea.js +1 -1
  454. package/lib/ui/Toggle.js +1 -1
  455. package/lib/ui/ToggleGroup.js +1 -1
  456. package/lib/ui/Value.js +1 -1
  457. package/lib/ui/util.js +1 -1
  458. package/lib/useExposedProps-CzTDfXfq.js +30 -0
  459. package/lib/useExposedProps-CzTDfXfq.js.map +1 -0
  460. package/lib/useMutation-CErliDZ9.js +119 -0
  461. package/lib/useMutation-CErliDZ9.js.map +1 -0
  462. package/lib/useQuery-ht7aWJ3S.js +1212 -0
  463. package/lib/useQuery-ht7aWJ3S.js.map +1 -0
  464. package/lib/useSuspenseQuery-DQH4Bmc2.js +18 -0
  465. package/lib/useSuspenseQuery-DQH4Bmc2.js.map +1 -0
  466. package/lib/zudoku.__internal.js +1540 -1553
  467. package/lib/zudoku.__internal.js.map +1 -1
  468. package/lib/zudoku.auth-auth0.js +19 -18
  469. package/lib/zudoku.auth-auth0.js.map +1 -1
  470. package/lib/zudoku.auth-azureb2c.js +14 -13
  471. package/lib/zudoku.auth-azureb2c.js.map +1 -1
  472. package/lib/zudoku.auth-clerk.js +52 -75
  473. package/lib/zudoku.auth-clerk.js.map +1 -1
  474. package/lib/zudoku.auth-firebase.js +10 -0
  475. package/lib/zudoku.auth-firebase.js.map +1 -0
  476. package/lib/zudoku.auth-openid.js +8 -7
  477. package/lib/zudoku.auth-openid.js.map +1 -1
  478. package/lib/zudoku.auth-supabase.js +31 -40
  479. package/lib/zudoku.auth-supabase.js.map +1 -1
  480. package/lib/zudoku.components.js +29 -25
  481. package/lib/zudoku.components.js.map +1 -1
  482. package/lib/zudoku.hooks.js +20 -20
  483. package/lib/zudoku.hooks.js.map +1 -1
  484. package/lib/zudoku.mermaid.js +11 -0
  485. package/lib/zudoku.mermaid.js.map +1 -0
  486. package/lib/zudoku.plugin-api-catalog.js +42 -37
  487. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  488. package/lib/zudoku.plugin-api-keys.js +617 -550
  489. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  490. package/lib/zudoku.plugin-custom-pages.js +1 -1
  491. package/lib/zudoku.plugin-markdown.js +1 -1
  492. package/lib/zudoku.plugin-openapi.js +3 -3
  493. package/lib/zudoku.plugin-redirect.js +1 -1
  494. package/lib/zudoku.plugin-search-pagefind.js +186 -226
  495. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  496. package/lib/zudoku.plugins.js +9 -8
  497. package/lib/zudoku.plugins.js.map +1 -1
  498. package/lib/zudoku.react-query.js +441 -0
  499. package/lib/zudoku.react-query.js.map +1 -0
  500. package/lib/zudoku.router.js +1130 -1404
  501. package/lib/zudoku.router.js.map +1 -1
  502. package/package.json +63 -37
  503. package/src/app/defaultTheme.css +4 -0
  504. package/src/app/main.css +2 -0
  505. package/src/app/main.tsx +1 -1
  506. package/src/app/sentry.ts +1 -1
  507. package/src/lib/auth/issuer.ts +1 -1
  508. package/src/lib/authentication/authentication.ts +8 -2
  509. package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
  510. package/src/lib/authentication/components/SignIn.tsx +5 -2
  511. package/src/lib/authentication/components/SignUp.tsx +5 -2
  512. package/src/lib/authentication/hook.ts +16 -0
  513. package/src/lib/authentication/providers/auth0.tsx +21 -10
  514. package/src/lib/authentication/providers/clerk.tsx +0 -26
  515. package/src/lib/authentication/providers/firebase.tsx +98 -6
  516. package/src/lib/authentication/providers/supabase.tsx +6 -15
  517. package/src/lib/authentication/ui/EmailVerificationUi.tsx +129 -0
  518. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +181 -39
  519. package/src/lib/authentication/utils/relativeRedirectUrl.ts +12 -0
  520. package/src/lib/components/Bootstrap.tsx +1 -4
  521. package/src/lib/components/Mermaid.tsx +68 -0
  522. package/src/lib/components/MobileTopNavigation.tsx +16 -9
  523. package/src/lib/components/PagefindSearchMeta.tsx +14 -0
  524. package/src/lib/components/Pagination.tsx +4 -5
  525. package/src/lib/components/Slot.test.tsx +1 -1
  526. package/src/lib/components/TopNavigation.tsx +26 -8
  527. package/src/lib/components/Zudoku.tsx +22 -21
  528. package/src/lib/components/context/ZudokuContext.ts +33 -12
  529. package/src/lib/components/context/ZudokuProvider.tsx +1 -1
  530. package/src/lib/components/context/ZudokuReactContext.tsx +17 -0
  531. package/src/lib/components/index.ts +19 -35
  532. package/src/lib/components/navigation/Navigation.tsx +4 -3
  533. package/src/lib/components/navigation/NavigationCategory.tsx +9 -0
  534. package/src/lib/components/navigation/NavigationFilterContext.tsx +28 -0
  535. package/src/lib/components/navigation/NavigationFilterInput.tsx +35 -0
  536. package/src/lib/components/navigation/NavigationItem.tsx +26 -4
  537. package/src/lib/components/navigation/NavigationWrapper.tsx +1 -1
  538. package/src/lib/components/navigation/utils.ts +44 -2
  539. package/src/lib/core/RouteGuard.tsx +30 -24
  540. package/src/lib/core/ZudokuContext.ts +7 -1
  541. package/src/lib/core/__internal.tsx +2 -0
  542. package/src/lib/core/plugins.ts +27 -3
  543. package/src/lib/core/react-query.ts +1 -0
  544. package/src/lib/core/transform-config.test.tsx +99 -0
  545. package/src/lib/core/transform-config.ts +67 -0
  546. package/src/lib/errors/ErrorAlert.tsx +1 -6
  547. package/src/lib/errors/ErrorMessage.tsx +38 -0
  548. package/src/lib/hooks/index.ts +7 -16
  549. package/src/lib/hooks/useEvent.test.tsx +1 -1
  550. package/src/lib/navigation/pathMatcher.test.ts +136 -0
  551. package/src/lib/navigation/pathMatcher.ts +93 -0
  552. package/src/lib/navigation/positionItems.test.ts +265 -0
  553. package/src/lib/navigation/positionItems.ts +111 -0
  554. package/src/lib/oas/graphql/circular.test.ts +221 -0
  555. package/src/lib/oas/graphql/circular.ts +31 -18
  556. package/src/lib/oas/graphql/index.ts +7 -3
  557. package/src/lib/oas/parser/index.ts +19 -6
  558. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +36 -476
  559. package/src/lib/plugins/api-keys/index.tsx +76 -32
  560. package/src/lib/plugins/api-keys/settings/ApiKeyItem.tsx +342 -0
  561. package/src/lib/plugins/api-keys/settings/ApiKeyList.tsx +67 -0
  562. package/src/lib/plugins/api-keys/settings/RevealApiKey.tsx +124 -0
  563. package/src/lib/plugins/openapi/DownloadSchemaButton.tsx +115 -0
  564. package/src/lib/plugins/openapi/Endpoint.tsx +20 -27
  565. package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +1 -1
  566. package/src/lib/plugins/openapi/OasProvider.tsx +38 -17
  567. package/src/lib/plugins/openapi/OperationList.tsx +48 -28
  568. package/src/lib/plugins/openapi/OperationListItem.tsx +5 -5
  569. package/src/lib/plugins/openapi/ParamInfos.tsx +1 -0
  570. package/src/lib/plugins/openapi/ParameterList.tsx +2 -2
  571. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +37 -15
  572. package/src/lib/plugins/openapi/SchemaList.tsx +4 -0
  573. package/src/lib/plugins/openapi/Sidecar.tsx +20 -3
  574. package/src/lib/plugins/openapi/index.tsx +16 -7
  575. package/src/lib/plugins/openapi/interfaces.ts +21 -7
  576. package/src/lib/plugins/openapi/playground/Playground.tsx +8 -4
  577. package/src/lib/plugins/openapi/playground/fileUtils.ts +4 -0
  578. package/src/lib/plugins/openapi/playground/result-panel/AudioPlayer.tsx +50 -0
  579. package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +33 -17
  580. package/src/lib/plugins/openapi/schema/SchemaView.tsx +56 -43
  581. package/src/lib/plugins/openapi/schema/utils.ts +20 -6
  582. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +29 -1
  583. package/src/lib/plugins/openapi/util/getRoutes.tsx +38 -3
  584. package/src/lib/plugins/search-pagefind/IndexingDialog.tsx +163 -0
  585. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +61 -22
  586. package/src/lib/plugins/search-pagefind/ResultList.tsx +8 -3
  587. package/src/lib/shiki.ts +21 -12
  588. package/src/lib/ui/Alert.tsx +17 -5
  589. package/src/lib/ui/Button.tsx +11 -10
  590. package/src/lib/ui/ButtonGroup.tsx +82 -0
  591. package/src/lib/ui/Command.tsx +3 -3
  592. package/src/lib/ui/DropdownMenu.tsx +226 -170
  593. package/src/lib/ui/InputGroup.tsx +168 -0
  594. package/src/lib/ui/Kbd.tsx +28 -0
  595. package/src/lib/ui/Secret.tsx +2 -2
  596. package/src/lib/util/MdxComponents.tsx +2 -0
  597. package/src/lib/util/flattenAllOf.test.ts +73 -20
  598. package/src/lib/util/flattenAllOf.ts +0 -36
  599. package/src/lib/util/flattenAllOfProcessor.ts +58 -0
  600. package/src/lib/util/invariant.ts +2 -1
  601. package/src/lib/util/readFrontmatter.ts +14 -0
  602. package/src/shiki/langs/c3.js +1 -0
  603. package/src/shiki/langs/gn.js +1 -0
  604. package/src/shiki/langs/markdown-nix.js +1 -0
  605. package/src/shiki/langs/moonbit.js +1 -0
  606. package/src/shiki/langs/openscad.js +1 -0
  607. package/src/zuplo/enrich-with-zuplo-mcp.ts +168 -0
  608. package/src/zuplo/enrich-with-zuplo.ts +254 -0
  609. package/src/zuplo/policy-types.ts +46 -0
  610. package/src/zuplo/with-zuplo-processors.ts +35 -0
  611. package/src/zuplo/with-zuplo.ts +14 -0
  612. package/dist/vite/create-pagefind-index.d.ts +0 -4
  613. package/dist/vite/create-pagefind-index.js +0 -12
  614. package/dist/vite/create-pagefind-index.js.map +0 -1
  615. package/lib/Button-B3ucvvQw.js +0 -52
  616. package/lib/Button-B3ucvvQw.js.map +0 -1
  617. package/lib/Command-CUcrW3qs.js.map +0 -1
  618. package/lib/DropdownMenu-BZ2NKQ3K.js +0 -126
  619. package/lib/DropdownMenu-BZ2NKQ3K.js.map +0 -1
  620. package/lib/ErrorAlert-_1Zmhr68.js.map +0 -1
  621. package/lib/MdxPage-B2t1EShN.js +0 -240
  622. package/lib/MdxPage-B2t1EShN.js.map +0 -1
  623. package/lib/OAuthErrorPage-DnKnq4xK.js.map +0 -1
  624. package/lib/OasProvider-BhuIkD4Z.js +0 -36
  625. package/lib/OasProvider-BhuIkD4Z.js.map +0 -1
  626. package/lib/OperationList-D8EDc9v7.js.map +0 -1
  627. package/lib/Pagination-hk-llhpw.js +0 -37
  628. package/lib/Pagination-hk-llhpw.js.map +0 -1
  629. package/lib/RouteGuard-Brz95MSt.js +0 -77
  630. package/lib/RouteGuard-Brz95MSt.js.map +0 -1
  631. package/lib/RouterError-CMaIfdjb.js +0 -42
  632. package/lib/RouterError-CMaIfdjb.js.map +0 -1
  633. package/lib/SchemaList-E6lF7dID.js.map +0 -1
  634. package/lib/SchemaView-CIv-OXgv.js +0 -572
  635. package/lib/SchemaView-CIv-OXgv.js.map +0 -1
  636. package/lib/Select-DFRCS31-.js +0 -399
  637. package/lib/Select-DFRCS31-.js.map +0 -1
  638. package/lib/SignUp-sGYAsj2K.js +0 -50
  639. package/lib/SignUp-sGYAsj2K.js.map +0 -1
  640. package/lib/SyntaxHighlight-C19vH0V_.js.map +0 -1
  641. package/lib/ZudokuContext-BUZ5hkWB.js +0 -1508
  642. package/lib/ZudokuContext-BUZ5hkWB.js.map +0 -1
  643. package/lib/chunk-PVWAREVJ-BMhpCH5D.js +0 -7965
  644. package/lib/chunk-PVWAREVJ-BMhpCH5D.js.map +0 -1
  645. package/lib/circular-BoYo7au5.js.map +0 -1
  646. package/lib/cn-dYga0KKN.js.map +0 -1
  647. package/lib/createServer-B_BZ7xX8.js.map +0 -1
  648. package/lib/hook-CMeoxziF.js +0 -40
  649. package/lib/hook-CMeoxziF.js.map +0 -1
  650. package/lib/index-HNVs5cgX.js.map +0 -1
  651. package/lib/index-pMMX55GH.js +0 -1059
  652. package/lib/index-pMMX55GH.js.map +0 -1
  653. package/lib/invariant-Bm-FVUQE.js.map +0 -1
  654. package/lib/mutation-BSU0xu4m.js.map +0 -1
  655. package/lib/useExposedProps-U3pmsHaG.js +0 -113
  656. package/lib/useExposedProps-U3pmsHaG.js.map +0 -1
@@ -1,552 +1,26 @@
1
- import { a as Ke, H as He } from "./index.esm-BnYHxCYC.js";
2
- import { j as a } from "./jsx-runtime-BzflLqGi.js";
3
- import { S as Ve, r as Je, Q as Zt, n as j, v as ye, w as we, i as I, x as $t, y as jt, z as Pt, A as Ot, B as be, D as ze, E as Et, h as ke, F as xe, G as At, H as Tt, g as St, I as Ge, l as It, a as re, p as Dt, j as Ct } from "./ZudokuContext-BUZ5hkWB.js";
4
- import { M as Nt } from "./mutation-BSU0xu4m.js";
5
- import * as D from "react";
6
- import { StrictMode as Ye, useEffect as oe, useRef as Xe, useState as Rt, Suspense as Ft } from "react";
7
- import { t as Ut, S as qt, d as et, b2 as Mt, O as Qt } from "./chunk-PVWAREVJ-BMhpCH5D.js";
1
+ import { a as De, H as Ce } from "./index.esm-Ca5zvoff.js";
2
+ import { j as c } from "./jsx-runtime-BzflLqGi.js";
3
+ import { b as Ot, H as St } from "./HydrationBoundary-CJu4vUlG.js";
4
+ import { L as Ue, g as Pt } from "./useQuery-ht7aWJ3S.js";
5
+ import * as V from "react";
6
+ import { StrictMode as Fe, useEffect as te, useRef as Je, useState as Tt, Suspense as Et, isValidElement as Nt } from "react";
7
+ import { n as It, S as At, a as Le, b3 as Rt, O as Dt, d as Ct, L as Ut, h as Ft, w as Jt } from "./chunk-EPOLDU6W-C6C8jAwd.js";
8
8
  import * as Lt from "react-dom";
9
- import { a as Bt, u as Wt, P as Kt, H as Ht } from "./index-pMMX55GH.js";
10
- import { B as tt, R as Vt } from "./RouteGuard-Brz95MSt.js";
11
- import { CircleFadingArrowUpIcon as Jt, LoaderCircleIcon as Gt, ExternalLink as Yt, PanelLeftIcon as Xt } from "lucide-react";
12
- import { Button as en } from "./ui/Button.js";
13
- import { a as C, A as tn, s as nn, N as Ze, f as rn, g as on, T as sn, H as an, E as cn } from "./ErrorAlert-_1Zmhr68.js";
14
- import { c as E } from "./cn-dYga0KKN.js";
15
- import { d as A, b as un, c as ln } from "./Drawer-Ci7XwhqT.js";
16
- import { VisuallyHidden as dn } from "@radix-ui/react-visually-hidden";
17
- import { S as hn } from "./Spinner-CI6bRyZw.js";
18
- import { C as fn } from "./CategoryHeading-DhmodDcq.js";
19
- import { N as pn, R as mn } from "./RouterError-CMaIfdjb.js";
20
- var gn = class extends Ve {
21
- constructor(e = {}) {
22
- super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
23
- }
24
- #e;
25
- build(e, t, n) {
26
- const r = t.queryKey, o = t.queryHash ?? Je(r, t);
27
- let s = this.get(o);
28
- return s || (s = new Zt({
29
- client: e,
30
- queryKey: r,
31
- queryHash: o,
32
- options: e.defaultQueryOptions(t),
33
- state: n,
34
- defaultOptions: e.getQueryDefaults(r)
35
- }), this.add(s)), s;
36
- }
37
- add(e) {
38
- this.#e.has(e.queryHash) || (this.#e.set(e.queryHash, e), this.notify({
39
- type: "added",
40
- query: e
41
- }));
42
- }
43
- remove(e) {
44
- const t = this.#e.get(e.queryHash);
45
- t && (e.destroy(), t === e && this.#e.delete(e.queryHash), this.notify({ type: "removed", query: e }));
46
- }
47
- clear() {
48
- j.batch(() => {
49
- this.getAll().forEach((e) => {
50
- this.remove(e);
51
- });
52
- });
53
- }
54
- get(e) {
55
- return this.#e.get(e);
56
- }
57
- getAll() {
58
- return [...this.#e.values()];
59
- }
60
- find(e) {
61
- const t = { exact: !0, ...e };
62
- return this.getAll().find(
63
- (n) => ye(t, n)
64
- );
65
- }
66
- findAll(e = {}) {
67
- const t = this.getAll();
68
- return Object.keys(e).length > 0 ? t.filter((n) => ye(e, n)) : t;
69
- }
70
- notify(e) {
71
- j.batch(() => {
72
- this.listeners.forEach((t) => {
73
- t(e);
74
- });
75
- });
76
- }
77
- onFocus() {
78
- j.batch(() => {
79
- this.getAll().forEach((e) => {
80
- e.onFocus();
81
- });
82
- });
83
- }
84
- onOnline() {
85
- j.batch(() => {
86
- this.getAll().forEach((e) => {
87
- e.onOnline();
88
- });
89
- });
90
- }
91
- }, vn = class extends Ve {
92
- constructor(e = {}) {
93
- super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#n = 0;
94
- }
95
- #e;
96
- #t;
97
- #n;
98
- build(e, t, n) {
99
- const r = new Nt({
100
- mutationCache: this,
101
- mutationId: ++this.#n,
102
- options: e.defaultMutationOptions(t),
103
- state: n
104
- });
105
- return this.add(r), r;
106
- }
107
- add(e) {
108
- this.#e.add(e);
109
- const t = V(e);
110
- if (typeof t == "string") {
111
- const n = this.#t.get(t);
112
- n ? n.push(e) : this.#t.set(t, [e]);
113
- }
114
- this.notify({ type: "added", mutation: e });
115
- }
116
- remove(e) {
117
- if (this.#e.delete(e)) {
118
- const t = V(e);
119
- if (typeof t == "string") {
120
- const n = this.#t.get(t);
121
- if (n)
122
- if (n.length > 1) {
123
- const r = n.indexOf(e);
124
- r !== -1 && n.splice(r, 1);
125
- } else n[0] === e && this.#t.delete(t);
126
- }
127
- }
128
- this.notify({ type: "removed", mutation: e });
129
- }
130
- canRun(e) {
131
- const t = V(e);
132
- if (typeof t == "string") {
133
- const r = this.#t.get(t)?.find(
134
- (o) => o.state.status === "pending"
135
- );
136
- return !r || r === e;
137
- } else
138
- return !0;
139
- }
140
- runNext(e) {
141
- const t = V(e);
142
- return typeof t == "string" ? this.#t.get(t)?.find((r) => r !== e && r.state.isPaused)?.continue() ?? Promise.resolve() : Promise.resolve();
143
- }
144
- clear() {
145
- j.batch(() => {
146
- this.#e.forEach((e) => {
147
- this.notify({ type: "removed", mutation: e });
148
- }), this.#e.clear(), this.#t.clear();
149
- });
150
- }
151
- getAll() {
152
- return Array.from(this.#e);
153
- }
154
- find(e) {
155
- const t = { exact: !0, ...e };
156
- return this.getAll().find(
157
- (n) => we(t, n)
158
- );
159
- }
160
- findAll(e = {}) {
161
- return this.getAll().filter((t) => we(e, t));
162
- }
163
- notify(e) {
164
- j.batch(() => {
165
- this.listeners.forEach((t) => {
166
- t(e);
167
- });
168
- });
169
- }
170
- resumePausedMutations() {
171
- const e = this.getAll().filter((t) => t.state.isPaused);
172
- return j.batch(
173
- () => Promise.all(
174
- e.map((t) => t.continue().catch(I))
175
- )
176
- );
177
- }
178
- };
179
- function V(e) {
180
- return e.options.scope?.id;
181
- }
182
- function $e(e) {
183
- return {
184
- onFetch: (t, n) => {
185
- const r = t.options, o = t.fetchOptions?.meta?.fetchMore?.direction, s = t.state.data?.pages || [], i = t.state.data?.pageParams || [];
186
- let u = { pages: [], pageParams: [] }, d = 0;
187
- const l = async () => {
188
- let f = !1;
189
- const g = (m) => {
190
- Object.defineProperty(m, "signal", {
191
- enumerable: !0,
192
- get: () => (t.signal.aborted ? f = !0 : t.signal.addEventListener("abort", () => {
193
- f = !0;
194
- }), t.signal)
195
- });
196
- }, p = $t(t.options, t.fetchOptions), v = async (m, k, P) => {
197
- if (f)
198
- return Promise.reject();
199
- if (k == null && m.pages.length)
200
- return Promise.resolve(m);
201
- const L = (() => {
202
- const H = {
203
- client: t.client,
204
- queryKey: t.queryKey,
205
- pageParam: k,
206
- direction: P ? "backward" : "forward",
207
- meta: t.options.meta
208
- };
209
- return g(H), H;
210
- })(), $ = await p(L), { maxPages: x } = t.options, S = P ? jt : Pt;
211
- return {
212
- pages: S(m.pages, $, x),
213
- pageParams: S(m.pageParams, k, x)
214
- };
215
- };
216
- if (o && s.length) {
217
- const m = o === "backward", k = m ? _n : je, P = {
218
- pages: s,
219
- pageParams: i
220
- }, Z = k(r, P);
221
- u = await v(P, Z, m);
222
- } else {
223
- const m = e ?? s.length;
224
- do {
225
- const k = d === 0 ? i[0] ?? r.initialPageParam : je(r, u);
226
- if (d > 0 && k == null)
227
- break;
228
- u = await v(u, k), d++;
229
- } while (d < m);
230
- }
231
- return u;
232
- };
233
- t.options.persister ? t.fetchFn = () => t.options.persister?.(
234
- l,
235
- {
236
- client: t.client,
237
- queryKey: t.queryKey,
238
- meta: t.options.meta,
239
- signal: t.signal
240
- },
241
- n
242
- ) : t.fetchFn = l;
243
- }
244
- };
245
- }
246
- function je(e, { pages: t, pageParams: n }) {
247
- const r = t.length - 1;
248
- return t.length > 0 ? e.getNextPageParam(
249
- t[r],
250
- t,
251
- n[r],
252
- n
253
- ) : void 0;
254
- }
255
- function _n(e, { pages: t, pageParams: n }) {
256
- return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, n[0], n) : void 0;
257
- }
258
- var yn = class {
259
- #e;
260
- #t;
261
- #n;
262
- #o;
263
- #s;
264
- #r;
265
- #i;
266
- #a;
267
- constructor(e = {}) {
268
- this.#e = e.queryCache || new gn(), this.#t = e.mutationCache || new vn(), this.#n = e.defaultOptions || {}, this.#o = /* @__PURE__ */ new Map(), this.#s = /* @__PURE__ */ new Map(), this.#r = 0;
269
- }
270
- mount() {
271
- this.#r++, this.#r === 1 && (this.#i = Ot.subscribe(async (e) => {
272
- e && (await this.resumePausedMutations(), this.#e.onFocus());
273
- }), this.#a = be.subscribe(async (e) => {
274
- e && (await this.resumePausedMutations(), this.#e.onOnline());
275
- }));
276
- }
277
- unmount() {
278
- this.#r--, this.#r === 0 && (this.#i?.(), this.#i = void 0, this.#a?.(), this.#a = void 0);
279
- }
280
- isFetching(e) {
281
- return this.#e.findAll({ ...e, fetchStatus: "fetching" }).length;
282
- }
283
- isMutating(e) {
284
- return this.#t.findAll({ ...e, status: "pending" }).length;
285
- }
286
- /**
287
- * Imperative (non-reactive) way to retrieve data for a QueryKey.
288
- * Should only be used in callbacks or functions where reading the latest data is necessary, e.g. for optimistic updates.
289
- *
290
- * Hint: Do not use this function inside a component, because it won't receive updates.
291
- * Use `useQuery` to create a `QueryObserver` that subscribes to changes.
292
- */
293
- getQueryData(e) {
294
- const t = this.defaultQueryOptions({ queryKey: e });
295
- return this.#e.get(t.queryHash)?.state.data;
296
- }
297
- ensureQueryData(e) {
298
- const t = this.defaultQueryOptions(e), n = this.#e.build(this, t), r = n.state.data;
299
- return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && n.isStaleByTime(ze(t.staleTime, n)) && this.prefetchQuery(t), Promise.resolve(r));
300
- }
301
- getQueriesData(e) {
302
- return this.#e.findAll(e).map(({ queryKey: t, state: n }) => {
303
- const r = n.data;
304
- return [t, r];
305
- });
306
- }
307
- setQueryData(e, t, n) {
308
- const r = this.defaultQueryOptions({ queryKey: e }), s = this.#e.get(
309
- r.queryHash
310
- )?.state.data, i = Et(t, s);
311
- if (i !== void 0)
312
- return this.#e.build(this, r).setData(i, { ...n, manual: !0 });
313
- }
314
- setQueriesData(e, t, n) {
315
- return j.batch(
316
- () => this.#e.findAll(e).map(({ queryKey: r }) => [
317
- r,
318
- this.setQueryData(r, t, n)
319
- ])
320
- );
321
- }
322
- getQueryState(e) {
323
- const t = this.defaultQueryOptions({ queryKey: e });
324
- return this.#e.get(
325
- t.queryHash
326
- )?.state;
327
- }
328
- removeQueries(e) {
329
- const t = this.#e;
330
- j.batch(() => {
331
- t.findAll(e).forEach((n) => {
332
- t.remove(n);
333
- });
334
- });
335
- }
336
- resetQueries(e, t) {
337
- const n = this.#e;
338
- return j.batch(() => (n.findAll(e).forEach((r) => {
339
- r.reset();
340
- }), this.refetchQueries(
341
- {
342
- type: "active",
343
- ...e
344
- },
345
- t
346
- )));
347
- }
348
- cancelQueries(e, t = {}) {
349
- const n = { revert: !0, ...t }, r = j.batch(
350
- () => this.#e.findAll(e).map((o) => o.cancel(n))
351
- );
352
- return Promise.all(r).then(I).catch(I);
353
- }
354
- invalidateQueries(e, t = {}) {
355
- return j.batch(() => (this.#e.findAll(e).forEach((n) => {
356
- n.invalidate();
357
- }), e?.refetchType === "none" ? Promise.resolve() : this.refetchQueries(
358
- {
359
- ...e,
360
- type: e?.refetchType ?? e?.type ?? "active"
361
- },
362
- t
363
- )));
364
- }
365
- refetchQueries(e, t = {}) {
366
- const n = {
367
- ...t,
368
- cancelRefetch: t.cancelRefetch ?? !0
369
- }, r = j.batch(
370
- () => this.#e.findAll(e).filter((o) => !o.isDisabled() && !o.isStatic()).map((o) => {
371
- let s = o.fetch(void 0, n);
372
- return n.throwOnError || (s = s.catch(I)), o.state.fetchStatus === "paused" ? Promise.resolve() : s;
373
- })
374
- );
375
- return Promise.all(r).then(I);
376
- }
377
- fetchQuery(e) {
378
- const t = this.defaultQueryOptions(e);
379
- t.retry === void 0 && (t.retry = !1);
380
- const n = this.#e.build(this, t);
381
- return n.isStaleByTime(
382
- ze(t.staleTime, n)
383
- ) ? n.fetch(t) : Promise.resolve(n.state.data);
384
- }
385
- prefetchQuery(e) {
386
- return this.fetchQuery(e).then(I).catch(I);
387
- }
388
- fetchInfiniteQuery(e) {
389
- return e.behavior = $e(e.pages), this.fetchQuery(e);
390
- }
391
- prefetchInfiniteQuery(e) {
392
- return this.fetchInfiniteQuery(e).then(I).catch(I);
393
- }
394
- ensureInfiniteQueryData(e) {
395
- return e.behavior = $e(e.pages), this.ensureQueryData(e);
396
- }
397
- resumePausedMutations() {
398
- return be.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
399
- }
400
- getQueryCache() {
401
- return this.#e;
402
- }
403
- getMutationCache() {
404
- return this.#t;
405
- }
406
- getDefaultOptions() {
407
- return this.#n;
408
- }
409
- setDefaultOptions(e) {
410
- this.#n = e;
411
- }
412
- setQueryDefaults(e, t) {
413
- this.#o.set(ke(e), {
414
- queryKey: e,
415
- defaultOptions: t
416
- });
417
- }
418
- getQueryDefaults(e) {
419
- const t = [...this.#o.values()], n = {};
420
- return t.forEach((r) => {
421
- xe(e, r.queryKey) && Object.assign(n, r.defaultOptions);
422
- }), n;
423
- }
424
- setMutationDefaults(e, t) {
425
- this.#s.set(ke(e), {
426
- mutationKey: e,
427
- defaultOptions: t
428
- });
429
- }
430
- getMutationDefaults(e) {
431
- const t = [...this.#s.values()], n = {};
432
- return t.forEach((r) => {
433
- xe(e, r.mutationKey) && Object.assign(n, r.defaultOptions);
434
- }), n;
435
- }
436
- defaultQueryOptions(e) {
437
- if (e._defaulted)
438
- return e;
439
- const t = {
440
- ...this.#n.queries,
441
- ...this.getQueryDefaults(e.queryKey),
442
- ...e,
443
- _defaulted: !0
444
- };
445
- return t.queryHash || (t.queryHash = Je(
446
- t.queryKey,
447
- t
448
- )), 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 === At && (t.enabled = !1), t;
449
- }
450
- defaultMutationOptions(e) {
451
- return e?._defaulted ? e : {
452
- ...this.#n.mutations,
453
- ...e?.mutationKey && this.getMutationDefaults(e.mutationKey),
454
- ...e,
455
- _defaulted: !0
456
- };
457
- }
458
- clear() {
459
- this.#e.clear(), this.#t.clear();
460
- }
461
- };
462
- function wn(e) {
463
- return e;
464
- }
465
- function Pe(e, t, n) {
466
- if (typeof t != "object" || t === null)
467
- return;
468
- const r = e.getMutationCache(), o = e.getQueryCache(), s = n?.defaultOptions?.deserializeData ?? e.getDefaultOptions().hydrate?.deserializeData ?? wn, i = t.mutations || [], u = t.queries || [];
469
- i.forEach(({ state: d, ...l }) => {
470
- r.build(
471
- e,
472
- {
473
- ...e.getDefaultOptions().hydrate?.mutations,
474
- ...n?.defaultOptions?.mutations,
475
- ...l
476
- },
477
- d
478
- );
479
- }), u.forEach(
480
- ({ queryKey: d, state: l, queryHash: f, meta: g, promise: p, dehydratedAt: v }) => {
481
- const m = p ? Tt(p) : void 0, k = l.data === void 0 ? m?.data : l.data, P = k === void 0 ? k : s(k);
482
- let Z = o.get(f);
483
- const L = Z?.state.status === "pending", $ = Z?.state.fetchStatus === "fetching";
484
- if (Z) {
485
- const x = m && // We only need this undefined check to handle older dehydration
486
- // payloads that might not have dehydratedAt
487
- v !== void 0 && v > Z.state.dataUpdatedAt;
488
- if (l.dataUpdatedAt > Z.state.dataUpdatedAt || x) {
489
- const { fetchStatus: S, ...H } = l;
490
- Z.setState({
491
- ...H,
492
- data: P
493
- });
494
- }
495
- } else
496
- Z = o.build(
497
- e,
498
- {
499
- ...e.getDefaultOptions().hydrate?.queries,
500
- ...n?.defaultOptions?.queries,
501
- queryKey: d,
502
- queryHash: f,
503
- meta: g
504
- },
505
- // Reset fetch status to idle to avoid
506
- // query being stuck in fetching state upon hydration
507
- {
508
- ...l,
509
- data: P,
510
- fetchStatus: "idle",
511
- status: P !== void 0 ? "success" : l.status
512
- }
513
- );
514
- p && !L && !$ && // Only hydrate if dehydration is newer than any existing data,
515
- // this is always true for new queries
516
- (v === void 0 || v > Z.state.dataUpdatedAt) && Z.fetch(void 0, {
517
- // RSC transformed promises are not thenable
518
- initialPromise: Promise.resolve(p).then(s)
519
- });
520
- }
521
- );
522
- }
523
- var bn = ({
524
- children: e,
525
- options: t = {},
526
- state: n,
527
- queryClient: r
528
- }) => {
529
- const o = St(r), s = D.useRef(t);
530
- s.current = t;
531
- const i = D.useMemo(() => {
532
- if (n) {
533
- if (typeof n != "object")
534
- return;
535
- const u = o.getQueryCache(), d = n.queries || [], l = [], f = [];
536
- for (const g of d) {
537
- const p = u.get(g.queryHash);
538
- p ? (g.state.dataUpdatedAt > p.state.dataUpdatedAt || g.promise && p.state.status !== "pending" && p.state.fetchStatus !== "fetching" && g.dehydratedAt !== void 0 && g.dehydratedAt > p.state.dataUpdatedAt) && f.push(g) : l.push(g);
539
- }
540
- if (l.length > 0 && Pe(o, { queries: l }, s.current), f.length > 0)
541
- return f;
542
- }
543
- }, [o, n]);
544
- return D.useEffect(() => {
545
- i && Pe(o, { queries: i }, s.current);
546
- }, [o, i]), e;
547
- };
9
+ import { B as Me, R as Mt } from "./RouteGuard-Dns7HD7C.js";
10
+ import { CircleFadingArrowUpIcon as Bt, LoaderCircleIcon as Vt, ExternalLink as qt, PanelLeftIcon as Wt, UnlinkIcon as Kt } from "lucide-react";
11
+ import { Button as Ht } from "./ui/Button.js";
12
+ import { a as N, A as Gt, s as Yt, P as Qt, N as Xt, d as ge, f as en, g as tn, h as nn, T as Be, H as Ve, D as rn, i as qe } from "./Zudoku-GbutmWzP.js";
13
+ import { c as S } from "./cn-5-Gd1Dss.js";
14
+ import { a as q, d as on, j as sn } from "./ZudokuContext-LPkD2SQs.js";
15
+ import "./index-DAWHN3cH.js";
16
+ import "./ZudokuReactContext-DGJAP1sN.js";
17
+ import { D as T, a as an, b as cn } from "./Drawer-Ch7927PF.js";
18
+ import { VisuallyHidden as un } from "@radix-ui/react-visually-hidden";
19
+ import { S as ln } from "./Spinner-CI6bRyZw.js";
20
+ import { C as We } from "./CategoryHeading-DhmodDcq.js";
21
+ import { isTransformConfigPlugin as dn } from "./zudoku.plugins.js";
548
22
  /**
549
- * react-router v7.8.2
23
+ * react-router v7.12.0
550
24
  *
551
25
  * Copyright (c) Remix Software Inc.
552
26
  *
@@ -555,74 +29,81 @@ var bn = ({
555
29
  *
556
30
  * @license MIT
557
31
  */
558
- function zn(e) {
559
- return /* @__PURE__ */ D.createElement(Ut, { flushSync: Lt.flushSync, ...e });
32
+ function fn(e) {
33
+ return /* @__PURE__ */ V.createElement(It, { flushSync: Lt.flushSync, ...e });
560
34
  }
561
- const kn = new yn({
35
+ const pn = new Ot({
562
36
  defaultOptions: {
563
37
  queries: {
564
38
  staleTime: 1e3 * 60 * 5
565
39
  }
566
40
  }
567
- }), xn = ({
41
+ }), hn = ({
568
42
  router: e,
569
43
  hydrate: t = !1
570
- }) => /* @__PURE__ */ a.jsx(Ye, { children: /* @__PURE__ */ a.jsx(Ge, { client: kn, children: /* @__PURE__ */ a.jsx(bn, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ a.jsx(tt, { value: !1, children: /* @__PURE__ */ a.jsx(Ke, { children: /* @__PURE__ */ a.jsx(Bt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(zn, { router: e }) }) }) }) }) }) }), Zn = ({
44
+ }) => /* @__PURE__ */ c.jsx(Fe, { children: /* @__PURE__ */ c.jsx(Ue, { client: pn, children: /* @__PURE__ */ c.jsx(St, { state: t ? window.DATA : void 0, children: /* @__PURE__ */ c.jsx(Me, { value: !1, children: /* @__PURE__ */ c.jsx(De, { children: /* @__PURE__ */ c.jsx(fn, { router: e }) }) }) }) }) }), mn = ({
571
45
  router: e,
572
46
  context: t,
573
47
  queryClient: n,
574
48
  helmetContext: r,
575
49
  bypassProtection: o = !1
576
- }) => /* @__PURE__ */ a.jsx(Ye, { children: /* @__PURE__ */ a.jsx(Ge, { client: n, children: /* @__PURE__ */ a.jsx(Ke, { context: r, children: /* @__PURE__ */ a.jsx(tt, { value: o, children: /* @__PURE__ */ a.jsx(qt, { router: e, context: t }) }) }) }) });
577
- function c(e, t, n) {
578
- function r(u, d) {
579
- var l;
580
- Object.defineProperty(u, "_zod", {
581
- value: u._zod ?? {},
50
+ }) => /* @__PURE__ */ c.jsx(Fe, { children: /* @__PURE__ */ c.jsx(Ue, { client: n, children: /* @__PURE__ */ c.jsx(De, { context: r, children: /* @__PURE__ */ c.jsx(Me, { value: o, children: /* @__PURE__ */ c.jsx(At, { router: e, context: t }) }) }) }) });
51
+ function u(e, t, n) {
52
+ function r(a, l) {
53
+ if (a._zod || Object.defineProperty(a, "_zod", {
54
+ value: {
55
+ def: l,
56
+ constr: s,
57
+ traits: /* @__PURE__ */ new Set()
58
+ },
582
59
  enumerable: !1
583
- }), (l = u._zod).traits ?? (l.traits = /* @__PURE__ */ new Set()), u._zod.traits.add(e), t(u, d);
584
- for (const f in i.prototype)
585
- f in u || Object.defineProperty(u, f, { value: i.prototype[f].bind(u) });
586
- u._zod.constr = i, u._zod.def = d;
60
+ }), a._zod.traits.has(e))
61
+ return;
62
+ a._zod.traits.add(e), t(a, l);
63
+ const d = s.prototype, f = Object.keys(d);
64
+ for (let g = 0; g < f.length; g++) {
65
+ const h = f[g];
66
+ h in a || (a[h] = d[h].bind(a));
67
+ }
587
68
  }
588
69
  const o = n?.Parent ?? Object;
589
- class s extends o {
70
+ class i extends o {
590
71
  }
591
- Object.defineProperty(s, "name", { value: e });
592
- function i(u) {
593
- var d;
594
- const l = n?.Parent ? new s() : this;
595
- r(l, u), (d = l._zod).deferred ?? (d.deferred = []);
596
- for (const f of l._zod.deferred)
72
+ Object.defineProperty(i, "name", { value: e });
73
+ function s(a) {
74
+ var l;
75
+ const d = n?.Parent ? new i() : this;
76
+ r(d, a), (l = d._zod).deferred ?? (l.deferred = []);
77
+ for (const f of d._zod.deferred)
597
78
  f();
598
- return l;
79
+ return d;
599
80
  }
600
- return Object.defineProperty(i, "init", { value: r }), Object.defineProperty(i, Symbol.hasInstance, {
601
- value: (u) => n?.Parent && u instanceof n.Parent ? !0 : u?._zod?.traits?.has(e)
602
- }), Object.defineProperty(i, "name", { value: e }), i;
81
+ return Object.defineProperty(s, "init", { value: r }), Object.defineProperty(s, Symbol.hasInstance, {
82
+ value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
83
+ }), Object.defineProperty(s, "name", { value: e }), s;
603
84
  }
604
- class Q extends Error {
85
+ class F extends Error {
605
86
  constructor() {
606
87
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
607
88
  }
608
89
  }
609
- class nt extends Error {
90
+ class Ke extends Error {
610
91
  constructor(t) {
611
92
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
612
93
  }
613
94
  }
614
- const rt = {};
95
+ const He = {};
615
96
  function R(e) {
616
- return rt;
97
+ return He;
617
98
  }
618
- function $n(e) {
99
+ function Ge(e) {
619
100
  const t = Object.values(e).filter((r) => typeof r == "number");
620
101
  return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
621
102
  }
622
- function ue(e, t) {
103
+ function ie(e, t) {
623
104
  return typeof t == "bigint" ? t.toString() : t;
624
105
  }
625
- function he(e) {
106
+ function ue(e) {
626
107
  return {
627
108
  get value() {
628
109
  {
@@ -632,20 +113,20 @@ function he(e) {
632
113
  }
633
114
  };
634
115
  }
635
- function fe(e) {
116
+ function le(e) {
636
117
  return e == null;
637
118
  }
638
- function pe(e) {
119
+ function de(e) {
639
120
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
640
121
  return e.slice(t, n);
641
122
  }
642
- const Oe = Symbol("evaluating");
123
+ const _e = Symbol("evaluating");
643
124
  function _(e, t, n) {
644
125
  let r;
645
126
  Object.defineProperty(e, t, {
646
127
  get() {
647
- if (r !== Oe)
648
- return r === void 0 && (r = Oe, r = n()), r;
128
+ if (r !== _e)
129
+ return r === void 0 && (r = _e, r = n()), r;
649
130
  },
650
131
  set(o) {
651
132
  Object.defineProperty(e, t, {
@@ -656,7 +137,7 @@ function _(e, t, n) {
656
137
  configurable: !0
657
138
  });
658
139
  }
659
- function U(e, t, n) {
140
+ function C(e, t, n) {
660
141
  Object.defineProperty(e, t, {
661
142
  value: n,
662
143
  writable: !0,
@@ -664,7 +145,7 @@ function U(e, t, n) {
664
145
  configurable: !0
665
146
  });
666
147
  }
667
- function q(...e) {
148
+ function I(...e) {
668
149
  const t = {};
669
150
  for (const n of e) {
670
151
  const r = Object.getOwnPropertyDescriptors(n);
@@ -672,15 +153,18 @@ function q(...e) {
672
153
  }
673
154
  return Object.defineProperties({}, t);
674
155
  }
675
- function Ee(e) {
156
+ function ve(e) {
676
157
  return JSON.stringify(e);
677
158
  }
678
- const ot = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
159
+ function gn(e) {
160
+ return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
161
+ }
162
+ const Ye = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
679
163
  };
680
- function ee(e) {
164
+ function Y(e) {
681
165
  return typeof e == "object" && e !== null && !Array.isArray(e);
682
166
  }
683
- const jn = he(() => {
167
+ const _n = ue(() => {
684
168
  if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
685
169
  return !1;
686
170
  try {
@@ -690,27 +174,27 @@ const jn = he(() => {
690
174
  return !1;
691
175
  }
692
176
  });
693
- function B(e) {
694
- if (ee(e) === !1)
177
+ function M(e) {
178
+ if (Y(e) === !1)
695
179
  return !1;
696
180
  const t = e.constructor;
697
- if (t === void 0)
181
+ if (t === void 0 || typeof t != "function")
698
182
  return !0;
699
183
  const n = t.prototype;
700
- return !(ee(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
184
+ return !(Y(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
701
185
  }
702
- function st(e) {
703
- return B(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
186
+ function Qe(e) {
187
+ return M(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
704
188
  }
705
- const Pn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
706
- function se(e) {
189
+ const vn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
190
+ function ne(e) {
707
191
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
708
192
  }
709
- function N(e, t, n) {
193
+ function A(e, t, n) {
710
194
  const r = new e._zod.constr(t ?? e._zod.def);
711
195
  return (!t || n?.parent) && (r._zod.parent = e), r;
712
196
  }
713
- function h(e) {
197
+ function p(e) {
714
198
  const t = e;
715
199
  if (!t)
716
200
  return {};
@@ -723,72 +207,79 @@ function h(e) {
723
207
  }
724
208
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
725
209
  }
726
- function On(e) {
210
+ function yn(e) {
727
211
  return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
728
212
  }
729
- function En(e, t) {
730
- const n = e._zod.def, r = q(e._zod.def, {
213
+ function wn(e, t) {
214
+ const n = e._zod.def, r = n.checks;
215
+ if (r && r.length > 0)
216
+ throw new Error(".pick() cannot be used on object schemas containing refinements");
217
+ const i = I(e._zod.def, {
731
218
  get shape() {
732
- const o = {};
733
- for (const s in t) {
734
- if (!(s in n.shape))
735
- throw new Error(`Unrecognized key: "${s}"`);
736
- t[s] && (o[s] = n.shape[s]);
219
+ const s = {};
220
+ for (const a in t) {
221
+ if (!(a in n.shape))
222
+ throw new Error(`Unrecognized key: "${a}"`);
223
+ t[a] && (s[a] = n.shape[a]);
737
224
  }
738
- return U(this, "shape", o), o;
225
+ return C(this, "shape", s), s;
739
226
  },
740
227
  checks: []
741
228
  });
742
- return N(e, r);
229
+ return A(e, i);
743
230
  }
744
- function An(e, t) {
745
- const n = e._zod.def, r = q(e._zod.def, {
231
+ function zn(e, t) {
232
+ const n = e._zod.def, r = n.checks;
233
+ if (r && r.length > 0)
234
+ throw new Error(".omit() cannot be used on object schemas containing refinements");
235
+ const i = I(e._zod.def, {
746
236
  get shape() {
747
- const o = { ...e._zod.def.shape };
748
- for (const s in t) {
749
- if (!(s in n.shape))
750
- throw new Error(`Unrecognized key: "${s}"`);
751
- t[s] && delete o[s];
237
+ const s = { ...e._zod.def.shape };
238
+ for (const a in t) {
239
+ if (!(a in n.shape))
240
+ throw new Error(`Unrecognized key: "${a}"`);
241
+ t[a] && delete s[a];
752
242
  }
753
- return U(this, "shape", o), o;
243
+ return C(this, "shape", s), s;
754
244
  },
755
245
  checks: []
756
246
  });
757
- return N(e, r);
247
+ return A(e, i);
758
248
  }
759
- function Tn(e, t) {
760
- if (!B(t))
249
+ function bn(e, t) {
250
+ if (!M(t))
761
251
  throw new Error("Invalid input to extend: expected a plain object");
762
252
  const n = e._zod.def.checks;
763
- if (n && n.length > 0)
764
- throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
765
- const o = q(e._zod.def, {
253
+ if (n && n.length > 0) {
254
+ const i = e._zod.def.shape;
255
+ for (const s in t)
256
+ if (Object.getOwnPropertyDescriptor(i, s) !== void 0)
257
+ throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
258
+ }
259
+ const o = I(e._zod.def, {
766
260
  get shape() {
767
- const s = { ...e._zod.def.shape, ...t };
768
- return U(this, "shape", s), s;
769
- },
770
- checks: []
261
+ const i = { ...e._zod.def.shape, ...t };
262
+ return C(this, "shape", i), i;
263
+ }
771
264
  });
772
- return N(e, o);
265
+ return A(e, o);
773
266
  }
774
- function Sn(e, t) {
775
- if (!B(t))
267
+ function kn(e, t) {
268
+ if (!M(t))
776
269
  throw new Error("Invalid input to safeExtend: expected a plain object");
777
- const n = {
778
- ...e._zod.def,
270
+ const n = I(e._zod.def, {
779
271
  get shape() {
780
272
  const r = { ...e._zod.def.shape, ...t };
781
- return U(this, "shape", r), r;
782
- },
783
- checks: e._zod.def.checks
784
- };
785
- return N(e, n);
273
+ return C(this, "shape", r), r;
274
+ }
275
+ });
276
+ return A(e, n);
786
277
  }
787
- function In(e, t) {
788
- const n = q(e._zod.def, {
278
+ function $n(e, t) {
279
+ const n = I(e._zod.def, {
789
280
  get shape() {
790
281
  const r = { ...e._zod.def.shape, ...t._zod.def.shape };
791
- return U(this, "shape", r), r;
282
+ return C(this, "shape", r), r;
792
283
  },
793
284
  get catchall() {
794
285
  return t._zod.def.catchall;
@@ -796,59 +287,61 @@ function In(e, t) {
796
287
  checks: []
797
288
  // delete existing checks
798
289
  });
799
- return N(e, n);
290
+ return A(e, n);
800
291
  }
801
- function Dn(e, t, n) {
802
- const r = q(t._zod.def, {
292
+ function jn(e, t, n) {
293
+ const o = t._zod.def.checks;
294
+ if (o && o.length > 0)
295
+ throw new Error(".partial() cannot be used on object schemas containing refinements");
296
+ const s = I(t._zod.def, {
803
297
  get shape() {
804
- const o = t._zod.def.shape, s = { ...o };
298
+ const a = t._zod.def.shape, l = { ...a };
805
299
  if (n)
806
- for (const i in n) {
807
- if (!(i in o))
808
- throw new Error(`Unrecognized key: "${i}"`);
809
- n[i] && (s[i] = e ? new e({
300
+ for (const d in n) {
301
+ if (!(d in a))
302
+ throw new Error(`Unrecognized key: "${d}"`);
303
+ n[d] && (l[d] = e ? new e({
810
304
  type: "optional",
811
- innerType: o[i]
812
- }) : o[i]);
305
+ innerType: a[d]
306
+ }) : a[d]);
813
307
  }
814
308
  else
815
- for (const i in o)
816
- s[i] = e ? new e({
309
+ for (const d in a)
310
+ l[d] = e ? new e({
817
311
  type: "optional",
818
- innerType: o[i]
819
- }) : o[i];
820
- return U(this, "shape", s), s;
312
+ innerType: a[d]
313
+ }) : a[d];
314
+ return C(this, "shape", l), l;
821
315
  },
822
316
  checks: []
823
317
  });
824
- return N(t, r);
318
+ return A(t, s);
825
319
  }
826
- function Cn(e, t, n) {
827
- const r = q(t._zod.def, {
320
+ function xn(e, t, n) {
321
+ const r = I(t._zod.def, {
828
322
  get shape() {
829
- const o = t._zod.def.shape, s = { ...o };
323
+ const o = t._zod.def.shape, i = { ...o };
830
324
  if (n)
831
- for (const i in n) {
832
- if (!(i in s))
833
- throw new Error(`Unrecognized key: "${i}"`);
834
- n[i] && (s[i] = new e({
325
+ for (const s in n) {
326
+ if (!(s in i))
327
+ throw new Error(`Unrecognized key: "${s}"`);
328
+ n[s] && (i[s] = new e({
835
329
  type: "nonoptional",
836
- innerType: o[i]
330
+ innerType: o[s]
837
331
  }));
838
332
  }
839
333
  else
840
- for (const i in o)
841
- s[i] = new e({
334
+ for (const s in o)
335
+ i[s] = new e({
842
336
  type: "nonoptional",
843
- innerType: o[i]
337
+ innerType: o[s]
844
338
  });
845
- return U(this, "shape", s), s;
846
- },
847
- checks: []
339
+ return C(this, "shape", i), i;
340
+ }
848
341
  });
849
- return N(t, r);
342
+ return A(t, r);
850
343
  }
851
- function M(e, t = 0) {
344
+ function U(e, t = 0) {
852
345
  if (e.aborted === !0)
853
346
  return !0;
854
347
  for (let n = t; n < e.issues.length; n++)
@@ -856,27 +349,27 @@ function M(e, t = 0) {
856
349
  return !0;
857
350
  return !1;
858
351
  }
859
- function it(e, t) {
352
+ function Xe(e, t) {
860
353
  return t.map((n) => {
861
354
  var r;
862
355
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
863
356
  });
864
357
  }
865
- function J(e) {
358
+ function K(e) {
866
359
  return typeof e == "string" ? e : e?.message;
867
360
  }
868
- function F(e, t, n) {
361
+ function D(e, t, n) {
869
362
  const r = { ...e, path: e.path ?? [] };
870
363
  if (!e.message) {
871
- const o = J(e.inst?._zod.def?.error?.(e)) ?? J(t?.error?.(e)) ?? J(n.customError?.(e)) ?? J(n.localeError?.(e)) ?? "Invalid input";
364
+ const o = K(e.inst?._zod.def?.error?.(e)) ?? K(t?.error?.(e)) ?? K(n.customError?.(e)) ?? K(n.localeError?.(e)) ?? "Invalid input";
872
365
  r.message = o;
873
366
  }
874
367
  return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
875
368
  }
876
- function me(e) {
369
+ function fe(e) {
877
370
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
878
371
  }
879
- function W(...e) {
372
+ function B(...e) {
880
373
  const [t, n, r] = e;
881
374
  return typeof t == "string" ? {
882
375
  message: t,
@@ -885,118 +378,118 @@ function W(...e) {
885
378
  inst: r
886
379
  } : { ...t };
887
380
  }
888
- const at = (e, t) => {
381
+ const et = (e, t) => {
889
382
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
890
383
  value: e._zod,
891
384
  enumerable: !1
892
385
  }), Object.defineProperty(e, "issues", {
893
386
  value: t,
894
387
  enumerable: !1
895
- }), e.message = JSON.stringify(t, ue, 2), Object.defineProperty(e, "toString", {
388
+ }), e.message = JSON.stringify(t, ie, 2), Object.defineProperty(e, "toString", {
896
389
  value: () => e.message,
897
390
  enumerable: !1
898
391
  });
899
- }, ct = c("$ZodError", at), ut = c("$ZodError", at, { Parent: Error });
900
- function Nn(e, t = (n) => n.message) {
392
+ }, tt = u("$ZodError", et), nt = u("$ZodError", et, { Parent: Error });
393
+ function Zn(e, t = (n) => n.message) {
901
394
  const n = {}, r = [];
902
395
  for (const o of e.issues)
903
396
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
904
397
  return { formErrors: r, fieldErrors: n };
905
398
  }
906
- function Rn(e, t = (n) => n.message) {
399
+ function On(e, t = (n) => n.message) {
907
400
  const n = { _errors: [] }, r = (o) => {
908
- for (const s of o.issues)
909
- if (s.code === "invalid_union" && s.errors.length)
910
- s.errors.map((i) => r({ issues: i }));
911
- else if (s.code === "invalid_key")
912
- r({ issues: s.issues });
913
- else if (s.code === "invalid_element")
914
- r({ issues: s.issues });
915
- else if (s.path.length === 0)
916
- n._errors.push(t(s));
401
+ for (const i of o.issues)
402
+ if (i.code === "invalid_union" && i.errors.length)
403
+ i.errors.map((s) => r({ issues: s }));
404
+ else if (i.code === "invalid_key")
405
+ r({ issues: i.issues });
406
+ else if (i.code === "invalid_element")
407
+ r({ issues: i.issues });
408
+ else if (i.path.length === 0)
409
+ n._errors.push(t(i));
917
410
  else {
918
- let i = n, u = 0;
919
- for (; u < s.path.length; ) {
920
- const d = s.path[u];
921
- u === s.path.length - 1 ? (i[d] = i[d] || { _errors: [] }, i[d]._errors.push(t(s))) : i[d] = i[d] || { _errors: [] }, i = i[d], u++;
411
+ let s = n, a = 0;
412
+ for (; a < i.path.length; ) {
413
+ const l = i.path[a];
414
+ a === i.path.length - 1 ? (s[l] = s[l] || { _errors: [] }, s[l]._errors.push(t(i))) : s[l] = s[l] || { _errors: [] }, s = s[l], a++;
922
415
  }
923
416
  }
924
417
  };
925
418
  return r(e), n;
926
419
  }
927
- const ge = (e) => (t, n, r, o) => {
928
- const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
929
- if (i instanceof Promise)
930
- throw new Q();
931
- if (i.issues.length) {
932
- const u = new (o?.Err ?? e)(i.issues.map((d) => F(d, s, R())));
933
- throw ot(u, o?.callee), u;
934
- }
935
- return i.value;
936
- }, ve = (e) => async (t, n, r, o) => {
937
- const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
938
- let i = t._zod.run({ value: n, issues: [] }, s);
939
- if (i instanceof Promise && (i = await i), i.issues.length) {
940
- const u = new (o?.Err ?? e)(i.issues.map((d) => F(d, s, R())));
941
- throw ot(u, o?.callee), u;
942
- }
943
- return i.value;
944
- }, ie = (e) => (t, n, r) => {
945
- const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
420
+ const pe = (e) => (t, n, r, o) => {
421
+ const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
946
422
  if (s instanceof Promise)
947
- throw new Q();
948
- return s.issues.length ? {
423
+ throw new F();
424
+ if (s.issues.length) {
425
+ const a = new (o?.Err ?? e)(s.issues.map((l) => D(l, i, R())));
426
+ throw Ye(a, o?.callee), a;
427
+ }
428
+ return s.value;
429
+ }, he = (e) => async (t, n, r, o) => {
430
+ const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
431
+ let s = t._zod.run({ value: n, issues: [] }, i);
432
+ if (s instanceof Promise && (s = await s), s.issues.length) {
433
+ const a = new (o?.Err ?? e)(s.issues.map((l) => D(l, i, R())));
434
+ throw Ye(a, o?.callee), a;
435
+ }
436
+ return s.value;
437
+ }, re = (e) => (t, n, r) => {
438
+ const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
439
+ if (i instanceof Promise)
440
+ throw new F();
441
+ return i.issues.length ? {
949
442
  success: !1,
950
- error: new (e ?? ct)(s.issues.map((i) => F(i, o, R())))
951
- } : { success: !0, data: s.value };
952
- }, Fn = /* @__PURE__ */ ie(ut), ae = (e) => async (t, n, r) => {
443
+ error: new (e ?? tt)(i.issues.map((s) => D(s, o, R())))
444
+ } : { success: !0, data: i.value };
445
+ }, Sn = /* @__PURE__ */ re(nt), oe = (e) => async (t, n, r) => {
953
446
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
954
- let s = t._zod.run({ value: n, issues: [] }, o);
955
- return s instanceof Promise && (s = await s), s.issues.length ? {
447
+ let i = t._zod.run({ value: n, issues: [] }, o);
448
+ return i instanceof Promise && (i = await i), i.issues.length ? {
956
449
  success: !1,
957
- error: new e(s.issues.map((i) => F(i, o, R())))
958
- } : { success: !0, data: s.value };
959
- }, Un = /* @__PURE__ */ ae(ut), qn = (e) => (t, n, r) => {
450
+ error: new e(i.issues.map((s) => D(s, o, R())))
451
+ } : { success: !0, data: i.value };
452
+ }, Pn = /* @__PURE__ */ oe(nt), Tn = (e) => (t, n, r) => {
960
453
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
961
- return ge(e)(t, n, o);
962
- }, Mn = (e) => (t, n, r) => ge(e)(t, n, r), Qn = (e) => async (t, n, r) => {
454
+ return pe(e)(t, n, o);
455
+ }, En = (e) => (t, n, r) => pe(e)(t, n, r), Nn = (e) => async (t, n, r) => {
963
456
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
964
- return ve(e)(t, n, o);
965
- }, Ln = (e) => async (t, n, r) => ve(e)(t, n, r), Bn = (e) => (t, n, r) => {
457
+ return he(e)(t, n, o);
458
+ }, In = (e) => async (t, n, r) => he(e)(t, n, r), An = (e) => (t, n, r) => {
966
459
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
967
- return ie(e)(t, n, o);
968
- }, Wn = (e) => (t, n, r) => ie(e)(t, n, r), Kn = (e) => async (t, n, r) => {
460
+ return re(e)(t, n, o);
461
+ }, Rn = (e) => (t, n, r) => re(e)(t, n, r), Dn = (e) => async (t, n, r) => {
969
462
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
970
- return ae(e)(t, n, o);
971
- }, Hn = (e) => async (t, n, r) => ae(e)(t, n, r), Vn = /^[cC][^\s-]{8,}$/, Jn = /^[0-9a-z]+$/, Gn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Yn = /^[0-9a-vA-V]{20}$/, Xn = /^[A-Za-z0-9]{27}$/, er = /^[a-zA-Z0-9_-]{21}$/, tr = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, nr = /^([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})$/, Ae = (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|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, rr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, or = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
972
- function sr() {
973
- return new RegExp(or, "u");
463
+ return oe(e)(t, n, o);
464
+ }, Cn = (e) => async (t, n, r) => oe(e)(t, n, r), Un = /^[cC][^\s-]{8,}$/, Fn = /^[0-9a-z]+$/, Jn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ln = /^[0-9a-vA-V]{20}$/, Mn = /^[A-Za-z0-9]{27}$/, Bn = /^[a-zA-Z0-9_-]{21}$/, Vn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, qn = /^([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})$/, ye = (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|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Wn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Kn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
465
+ function Hn() {
466
+ return new RegExp(Kn, "u");
974
467
  }
975
- const ir = /^(?:(?: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])$/, ar = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, cr = /^((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])$/, ur = /^(([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])$/, lr = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, lt = /^[A-Za-z0-9_-]*$/, dr = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, hr = /^\+(?:[0-9]){6,14}[0-9]$/, dt = "(?:(?:\\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])))", fr = /* @__PURE__ */ new RegExp(`^${dt}$`);
976
- function ht(e) {
468
+ const Gn = /^(?:(?: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])$/, Yn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Qn = /^((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])$/, Xn = /^(([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])$/, er = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, rt = /^[A-Za-z0-9_-]*$/, tr = /^\+[1-9]\d{6,14}$/, ot = "(?:(?:\\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])))", nr = /* @__PURE__ */ new RegExp(`^${ot}$`);
469
+ function st(e) {
977
470
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
978
471
  return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
979
472
  }
980
- function pr(e) {
981
- return new RegExp(`^${ht(e)}$`);
473
+ function rr(e) {
474
+ return new RegExp(`^${st(e)}$`);
982
475
  }
983
- function mr(e) {
984
- const t = ht({ precision: e.precision }), n = ["Z"];
476
+ function or(e) {
477
+ const t = st({ precision: e.precision }), n = ["Z"];
985
478
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
986
479
  const r = `${t}(?:${n.join("|")})`;
987
- return new RegExp(`^${dt}T(?:${r})$`);
480
+ return new RegExp(`^${ot}T(?:${r})$`);
988
481
  }
989
- const gr = (e) => {
482
+ const sr = (e) => {
990
483
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
991
484
  return new RegExp(`^${t}$`);
992
- }, vr = /^[^A-Z]*$/, _r = /^[^a-z]*$/, T = /* @__PURE__ */ c("$ZodCheck", (e, t) => {
485
+ }, ir = /^[^A-Z]*$/, ar = /^[^a-z]*$/, E = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
993
486
  var n;
994
487
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
995
- }), yr = /* @__PURE__ */ c("$ZodCheckMaxLength", (e, t) => {
488
+ }), cr = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
996
489
  var n;
997
- T.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
490
+ E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
998
491
  const o = r.value;
999
- return !fe(o) && o.length !== void 0;
492
+ return !le(o) && o.length !== void 0;
1000
493
  }), e._zod.onattach.push((r) => {
1001
494
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1002
495
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -1004,9 +497,9 @@ const gr = (e) => {
1004
497
  const o = r.value;
1005
498
  if (o.length <= t.maximum)
1006
499
  return;
1007
- const i = me(o);
500
+ const s = fe(o);
1008
501
  r.issues.push({
1009
- origin: i,
502
+ origin: s,
1010
503
  code: "too_big",
1011
504
  maximum: t.maximum,
1012
505
  inclusive: !0,
@@ -1015,11 +508,11 @@ const gr = (e) => {
1015
508
  continue: !t.abort
1016
509
  });
1017
510
  };
1018
- }), wr = /* @__PURE__ */ c("$ZodCheckMinLength", (e, t) => {
511
+ }), ur = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
1019
512
  var n;
1020
- T.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
513
+ E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1021
514
  const o = r.value;
1022
- return !fe(o) && o.length !== void 0;
515
+ return !le(o) && o.length !== void 0;
1023
516
  }), e._zod.onattach.push((r) => {
1024
517
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1025
518
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -1027,9 +520,9 @@ const gr = (e) => {
1027
520
  const o = r.value;
1028
521
  if (o.length >= t.minimum)
1029
522
  return;
1030
- const i = me(o);
523
+ const s = fe(o);
1031
524
  r.issues.push({
1032
- origin: i,
525
+ origin: s,
1033
526
  code: "too_small",
1034
527
  minimum: t.minimum,
1035
528
  inclusive: !0,
@@ -1038,22 +531,22 @@ const gr = (e) => {
1038
531
  continue: !t.abort
1039
532
  });
1040
533
  };
1041
- }), br = /* @__PURE__ */ c("$ZodCheckLengthEquals", (e, t) => {
534
+ }), lr = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
1042
535
  var n;
1043
- T.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
536
+ E.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1044
537
  const o = r.value;
1045
- return !fe(o) && o.length !== void 0;
538
+ return !le(o) && o.length !== void 0;
1046
539
  }), e._zod.onattach.push((r) => {
1047
540
  const o = r._zod.bag;
1048
541
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
1049
542
  }), e._zod.check = (r) => {
1050
- const o = r.value, s = o.length;
1051
- if (s === t.length)
543
+ const o = r.value, i = o.length;
544
+ if (i === t.length)
1052
545
  return;
1053
- const i = me(o), u = s > t.length;
546
+ const s = fe(o), a = i > t.length;
1054
547
  r.issues.push({
1055
- origin: i,
1056
- ...u ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
548
+ origin: s,
549
+ ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
1057
550
  inclusive: !0,
1058
551
  exact: !0,
1059
552
  input: r.value,
@@ -1061,11 +554,11 @@ const gr = (e) => {
1061
554
  continue: !t.abort
1062
555
  });
1063
556
  };
1064
- }), ce = /* @__PURE__ */ c("$ZodCheckStringFormat", (e, t) => {
557
+ }), se = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
1065
558
  var n, r;
1066
- T.init(e, t), e._zod.onattach.push((o) => {
1067
- const s = o._zod.bag;
1068
- s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
559
+ E.init(e, t), e._zod.onattach.push((o) => {
560
+ const i = o._zod.bag;
561
+ i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
1069
562
  }), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
1070
563
  t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
1071
564
  origin: "string",
@@ -1078,8 +571,8 @@ const gr = (e) => {
1078
571
  });
1079
572
  }) : (r = e._zod).check ?? (r.check = () => {
1080
573
  });
1081
- }), zr = /* @__PURE__ */ c("$ZodCheckRegex", (e, t) => {
1082
- ce.init(e, t), e._zod.check = (n) => {
574
+ }), dr = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
575
+ se.init(e, t), e._zod.check = (n) => {
1083
576
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
1084
577
  origin: "string",
1085
578
  code: "invalid_format",
@@ -1090,16 +583,16 @@ const gr = (e) => {
1090
583
  continue: !t.abort
1091
584
  });
1092
585
  };
1093
- }), kr = /* @__PURE__ */ c("$ZodCheckLowerCase", (e, t) => {
1094
- t.pattern ?? (t.pattern = vr), ce.init(e, t);
1095
- }), xr = /* @__PURE__ */ c("$ZodCheckUpperCase", (e, t) => {
1096
- t.pattern ?? (t.pattern = _r), ce.init(e, t);
1097
- }), Zr = /* @__PURE__ */ c("$ZodCheckIncludes", (e, t) => {
1098
- T.init(e, t);
1099
- const n = se(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
586
+ }), fr = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
587
+ t.pattern ?? (t.pattern = ir), se.init(e, t);
588
+ }), pr = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
589
+ t.pattern ?? (t.pattern = ar), se.init(e, t);
590
+ }), hr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
591
+ E.init(e, t);
592
+ const n = ne(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
1100
593
  t.pattern = r, e._zod.onattach.push((o) => {
1101
- const s = o._zod.bag;
1102
- s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
594
+ const i = o._zod.bag;
595
+ i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
1103
596
  }), e._zod.check = (o) => {
1104
597
  o.value.includes(t.includes, t.position) || o.issues.push({
1105
598
  origin: "string",
@@ -1111,9 +604,9 @@ const gr = (e) => {
1111
604
  continue: !t.abort
1112
605
  });
1113
606
  };
1114
- }), $r = /* @__PURE__ */ c("$ZodCheckStartsWith", (e, t) => {
1115
- T.init(e, t);
1116
- const n = new RegExp(`^${se(t.prefix)}.*`);
607
+ }), mr = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
608
+ E.init(e, t);
609
+ const n = new RegExp(`^${ne(t.prefix)}.*`);
1117
610
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
1118
611
  const o = r._zod.bag;
1119
612
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -1128,9 +621,9 @@ const gr = (e) => {
1128
621
  continue: !t.abort
1129
622
  });
1130
623
  };
1131
- }), jr = /* @__PURE__ */ c("$ZodCheckEndsWith", (e, t) => {
1132
- T.init(e, t);
1133
- const n = new RegExp(`.*${se(t.suffix)}$`);
624
+ }), gr = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
625
+ E.init(e, t);
626
+ const n = new RegExp(`.*${ne(t.suffix)}$`);
1134
627
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
1135
628
  const o = r._zod.bag;
1136
629
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -1145,12 +638,12 @@ const gr = (e) => {
1145
638
  continue: !t.abort
1146
639
  });
1147
640
  };
1148
- }), Pr = /* @__PURE__ */ c("$ZodCheckOverwrite", (e, t) => {
1149
- T.init(e, t), e._zod.check = (n) => {
641
+ }), _r = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
642
+ E.init(e, t), e._zod.check = (n) => {
1150
643
  n.value = t.tx(n.value);
1151
644
  };
1152
645
  });
1153
- class Or {
646
+ class vr {
1154
647
  constructor(t = []) {
1155
648
  this.content = [], this.indent = 0, this && (this.args = t);
1156
649
  }
@@ -1163,96 +656,96 @@ class Or {
1163
656
  return;
1164
657
  }
1165
658
  const r = t.split(`
1166
- `).filter((i) => i), o = Math.min(...r.map((i) => i.length - i.trimStart().length)), s = r.map((i) => i.slice(o)).map((i) => " ".repeat(this.indent * 2) + i);
1167
- for (const i of s)
1168
- this.content.push(i);
659
+ `).filter((s) => s), o = Math.min(...r.map((s) => s.length - s.trimStart().length)), i = r.map((s) => s.slice(o)).map((s) => " ".repeat(this.indent * 2) + s);
660
+ for (const s of i)
661
+ this.content.push(s);
1169
662
  }
1170
663
  compile() {
1171
- const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((s) => ` ${s}`)];
664
+ const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
1172
665
  return new t(...n, o.join(`
1173
666
  `));
1174
667
  }
1175
668
  }
1176
- const Er = {
669
+ const yr = {
1177
670
  major: 4,
1178
- minor: 1,
1179
- patch: 12
1180
- }, b = /* @__PURE__ */ c("$ZodType", (e, t) => {
671
+ minor: 3,
672
+ patch: 6
673
+ }, w = /* @__PURE__ */ u("$ZodType", (e, t) => {
1181
674
  var n;
1182
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Er;
675
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = yr;
1183
676
  const r = [...e._zod.def.checks ?? []];
1184
677
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
1185
678
  for (const o of r)
1186
- for (const s of o._zod.onattach)
1187
- s(e);
679
+ for (const i of o._zod.onattach)
680
+ i(e);
1188
681
  if (r.length === 0)
1189
682
  (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
1190
683
  e._zod.run = e._zod.parse;
1191
684
  });
1192
685
  else {
1193
- const o = (i, u, d) => {
1194
- let l = M(i), f;
1195
- for (const g of u) {
686
+ const o = (s, a, l) => {
687
+ let d = U(s), f;
688
+ for (const g of a) {
1196
689
  if (g._zod.def.when) {
1197
- if (!g._zod.def.when(i))
690
+ if (!g._zod.def.when(s))
1198
691
  continue;
1199
- } else if (l)
692
+ } else if (d)
1200
693
  continue;
1201
- const p = i.issues.length, v = g._zod.check(i);
1202
- if (v instanceof Promise && d?.async === !1)
1203
- throw new Q();
1204
- if (f || v instanceof Promise)
694
+ const h = s.issues.length, m = g._zod.check(s);
695
+ if (m instanceof Promise && l?.async === !1)
696
+ throw new F();
697
+ if (f || m instanceof Promise)
1205
698
  f = (f ?? Promise.resolve()).then(async () => {
1206
- await v, i.issues.length !== p && (l || (l = M(i, p)));
699
+ await m, s.issues.length !== h && (d || (d = U(s, h)));
1207
700
  });
1208
701
  else {
1209
- if (i.issues.length === p)
702
+ if (s.issues.length === h)
1210
703
  continue;
1211
- l || (l = M(i, p));
704
+ d || (d = U(s, h));
1212
705
  }
1213
706
  }
1214
- return f ? f.then(() => i) : i;
1215
- }, s = (i, u, d) => {
1216
- if (M(i))
1217
- return i.aborted = !0, i;
1218
- const l = o(u, r, d);
1219
- if (l instanceof Promise) {
1220
- if (d.async === !1)
1221
- throw new Q();
1222
- return l.then((f) => e._zod.parse(f, d));
707
+ return f ? f.then(() => s) : s;
708
+ }, i = (s, a, l) => {
709
+ if (U(s))
710
+ return s.aborted = !0, s;
711
+ const d = o(a, r, l);
712
+ if (d instanceof Promise) {
713
+ if (l.async === !1)
714
+ throw new F();
715
+ return d.then((f) => e._zod.parse(f, l));
1223
716
  }
1224
- return e._zod.parse(l, d);
717
+ return e._zod.parse(d, l);
1225
718
  };
1226
- e._zod.run = (i, u) => {
1227
- if (u.skipChecks)
1228
- return e._zod.parse(i, u);
1229
- if (u.direction === "backward") {
1230
- const l = e._zod.parse({ value: i.value, issues: [] }, { ...u, skipChecks: !0 });
1231
- return l instanceof Promise ? l.then((f) => s(f, i, u)) : s(l, i, u);
719
+ e._zod.run = (s, a) => {
720
+ if (a.skipChecks)
721
+ return e._zod.parse(s, a);
722
+ if (a.direction === "backward") {
723
+ const d = e._zod.parse({ value: s.value, issues: [] }, { ...a, skipChecks: !0 });
724
+ return d instanceof Promise ? d.then((f) => i(f, s, a)) : i(d, s, a);
1232
725
  }
1233
- const d = e._zod.parse(i, u);
1234
- if (d instanceof Promise) {
1235
- if (u.async === !1)
1236
- throw new Q();
1237
- return d.then((l) => o(l, r, u));
726
+ const l = e._zod.parse(s, a);
727
+ if (l instanceof Promise) {
728
+ if (a.async === !1)
729
+ throw new F();
730
+ return l.then((d) => o(d, r, a));
1238
731
  }
1239
- return o(d, r, u);
732
+ return o(l, r, a);
1240
733
  };
1241
734
  }
1242
- e["~standard"] = {
735
+ _(e, "~standard", () => ({
1243
736
  validate: (o) => {
1244
737
  try {
1245
- const s = Fn(e, o);
1246
- return s.success ? { value: s.data } : { issues: s.error?.issues };
738
+ const i = Sn(e, o);
739
+ return i.success ? { value: i.data } : { issues: i.error?.issues };
1247
740
  } catch {
1248
- return Un(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
741
+ return Pn(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
1249
742
  }
1250
743
  },
1251
744
  vendor: "zod",
1252
745
  version: 1
1253
- };
1254
- }), _e = /* @__PURE__ */ c("$ZodString", (e, t) => {
1255
- b.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? gr(e._zod.bag), e._zod.parse = (n, r) => {
746
+ }));
747
+ }), me = /* @__PURE__ */ u("$ZodString", (e, t) => {
748
+ w.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? sr(e._zod.bag), e._zod.parse = (n, r) => {
1256
749
  if (t.coerce)
1257
750
  try {
1258
751
  n.value = String(n.value);
@@ -1265,11 +758,11 @@ const Er = {
1265
758
  inst: e
1266
759
  }), n;
1267
760
  };
1268
- }), y = /* @__PURE__ */ c("$ZodStringFormat", (e, t) => {
1269
- ce.init(e, t), _e.init(e, t);
1270
- }), Ar = /* @__PURE__ */ c("$ZodGUID", (e, t) => {
1271
- t.pattern ?? (t.pattern = nr), y.init(e, t);
1272
- }), Tr = /* @__PURE__ */ c("$ZodUUID", (e, t) => {
761
+ }), v = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
762
+ se.init(e, t), me.init(e, t);
763
+ }), wr = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
764
+ t.pattern ?? (t.pattern = qn), v.init(e, t);
765
+ }), zr = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
1273
766
  if (t.version) {
1274
767
  const r = {
1275
768
  v1: 1,
@@ -1283,21 +776,21 @@ const Er = {
1283
776
  }[t.version];
1284
777
  if (r === void 0)
1285
778
  throw new Error(`Invalid UUID version: "${t.version}"`);
1286
- t.pattern ?? (t.pattern = Ae(r));
779
+ t.pattern ?? (t.pattern = ye(r));
1287
780
  } else
1288
- t.pattern ?? (t.pattern = Ae());
1289
- y.init(e, t);
1290
- }), Sr = /* @__PURE__ */ c("$ZodEmail", (e, t) => {
1291
- t.pattern ?? (t.pattern = rr), y.init(e, t);
1292
- }), Ir = /* @__PURE__ */ c("$ZodURL", (e, t) => {
1293
- y.init(e, t), e._zod.check = (n) => {
781
+ t.pattern ?? (t.pattern = ye());
782
+ v.init(e, t);
783
+ }), br = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
784
+ t.pattern ?? (t.pattern = Wn), v.init(e, t);
785
+ }), kr = /* @__PURE__ */ u("$ZodURL", (e, t) => {
786
+ v.init(e, t), e._zod.check = (n) => {
1294
787
  try {
1295
788
  const r = n.value.trim(), o = new URL(r);
1296
789
  t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
1297
790
  code: "invalid_format",
1298
791
  format: "url",
1299
792
  note: "Invalid hostname",
1300
- pattern: dr.source,
793
+ pattern: t.hostname.source,
1301
794
  input: n.value,
1302
795
  inst: e,
1303
796
  continue: !t.abort
@@ -1321,38 +814,32 @@ const Er = {
1321
814
  });
1322
815
  }
1323
816
  };
1324
- }), Dr = /* @__PURE__ */ c("$ZodEmoji", (e, t) => {
1325
- t.pattern ?? (t.pattern = sr()), y.init(e, t);
1326
- }), Cr = /* @__PURE__ */ c("$ZodNanoID", (e, t) => {
1327
- t.pattern ?? (t.pattern = er), y.init(e, t);
1328
- }), Nr = /* @__PURE__ */ c("$ZodCUID", (e, t) => {
1329
- t.pattern ?? (t.pattern = Vn), y.init(e, t);
1330
- }), Rr = /* @__PURE__ */ c("$ZodCUID2", (e, t) => {
1331
- t.pattern ?? (t.pattern = Jn), y.init(e, t);
1332
- }), Fr = /* @__PURE__ */ c("$ZodULID", (e, t) => {
1333
- t.pattern ?? (t.pattern = Gn), y.init(e, t);
1334
- }), Ur = /* @__PURE__ */ c("$ZodXID", (e, t) => {
1335
- t.pattern ?? (t.pattern = Yn), y.init(e, t);
1336
- }), qr = /* @__PURE__ */ c("$ZodKSUID", (e, t) => {
1337
- t.pattern ?? (t.pattern = Xn), y.init(e, t);
1338
- }), Mr = /* @__PURE__ */ c("$ZodISODateTime", (e, t) => {
1339
- t.pattern ?? (t.pattern = mr(t)), y.init(e, t);
1340
- }), Qr = /* @__PURE__ */ c("$ZodISODate", (e, t) => {
1341
- t.pattern ?? (t.pattern = fr), y.init(e, t);
1342
- }), Lr = /* @__PURE__ */ c("$ZodISOTime", (e, t) => {
1343
- t.pattern ?? (t.pattern = pr(t)), y.init(e, t);
1344
- }), Br = /* @__PURE__ */ c("$ZodISODuration", (e, t) => {
1345
- t.pattern ?? (t.pattern = tr), y.init(e, t);
1346
- }), Wr = /* @__PURE__ */ c("$ZodIPv4", (e, t) => {
1347
- t.pattern ?? (t.pattern = ir), y.init(e, t), e._zod.onattach.push((n) => {
1348
- const r = n._zod.bag;
1349
- r.format = "ipv4";
1350
- });
1351
- }), Kr = /* @__PURE__ */ c("$ZodIPv6", (e, t) => {
1352
- t.pattern ?? (t.pattern = ar), y.init(e, t), e._zod.onattach.push((n) => {
1353
- const r = n._zod.bag;
1354
- r.format = "ipv6";
1355
- }), e._zod.check = (n) => {
817
+ }), $r = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
818
+ t.pattern ?? (t.pattern = Hn()), v.init(e, t);
819
+ }), jr = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
820
+ t.pattern ?? (t.pattern = Bn), v.init(e, t);
821
+ }), xr = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
822
+ t.pattern ?? (t.pattern = Un), v.init(e, t);
823
+ }), Zr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
824
+ t.pattern ?? (t.pattern = Fn), v.init(e, t);
825
+ }), Or = /* @__PURE__ */ u("$ZodULID", (e, t) => {
826
+ t.pattern ?? (t.pattern = Jn), v.init(e, t);
827
+ }), Sr = /* @__PURE__ */ u("$ZodXID", (e, t) => {
828
+ t.pattern ?? (t.pattern = Ln), v.init(e, t);
829
+ }), Pr = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
830
+ t.pattern ?? (t.pattern = Mn), v.init(e, t);
831
+ }), Tr = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
832
+ t.pattern ?? (t.pattern = or(t)), v.init(e, t);
833
+ }), Er = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
834
+ t.pattern ?? (t.pattern = nr), v.init(e, t);
835
+ }), Nr = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
836
+ t.pattern ?? (t.pattern = rr(t)), v.init(e, t);
837
+ }), Ir = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
838
+ t.pattern ?? (t.pattern = Vn), v.init(e, t);
839
+ }), Ar = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
840
+ t.pattern ?? (t.pattern = Gn), v.init(e, t), e._zod.bag.format = "ipv4";
841
+ }), Rr = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
842
+ t.pattern ?? (t.pattern = Yn), v.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1356
843
  try {
1357
844
  new URL(`http://[${n.value}]`);
1358
845
  } catch {
@@ -1365,21 +852,21 @@ const Er = {
1365
852
  });
1366
853
  }
1367
854
  };
1368
- }), Hr = /* @__PURE__ */ c("$ZodCIDRv4", (e, t) => {
1369
- t.pattern ?? (t.pattern = cr), y.init(e, t);
1370
- }), Vr = /* @__PURE__ */ c("$ZodCIDRv6", (e, t) => {
1371
- t.pattern ?? (t.pattern = ur), y.init(e, t), e._zod.check = (n) => {
855
+ }), Dr = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
856
+ t.pattern ?? (t.pattern = Qn), v.init(e, t);
857
+ }), Cr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
858
+ t.pattern ?? (t.pattern = Xn), v.init(e, t), e._zod.check = (n) => {
1372
859
  const r = n.value.split("/");
1373
860
  try {
1374
861
  if (r.length !== 2)
1375
862
  throw new Error();
1376
- const [o, s] = r;
1377
- if (!s)
863
+ const [o, i] = r;
864
+ if (!i)
1378
865
  throw new Error();
1379
- const i = Number(s);
1380
- if (`${i}` !== s)
866
+ const s = Number(i);
867
+ if (`${s}` !== i)
1381
868
  throw new Error();
1382
- if (i < 0 || i > 128)
869
+ if (s < 0 || s > 128)
1383
870
  throw new Error();
1384
871
  new URL(`http://[${o}]`);
1385
872
  } catch {
@@ -1393,7 +880,7 @@ const Er = {
1393
880
  }
1394
881
  };
1395
882
  });
1396
- function ft(e) {
883
+ function it(e) {
1397
884
  if (e === "")
1398
885
  return !0;
1399
886
  if (e.length % 4 !== 0)
@@ -1404,11 +891,9 @@ function ft(e) {
1404
891
  return !1;
1405
892
  }
1406
893
  }
1407
- const Jr = /* @__PURE__ */ c("$ZodBase64", (e, t) => {
1408
- t.pattern ?? (t.pattern = lr), y.init(e, t), e._zod.onattach.push((n) => {
1409
- n._zod.bag.contentEncoding = "base64";
1410
- }), e._zod.check = (n) => {
1411
- ft(n.value) || n.issues.push({
894
+ const Ur = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
895
+ t.pattern ?? (t.pattern = er), v.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
896
+ it(n.value) || n.issues.push({
1412
897
  code: "invalid_format",
1413
898
  format: "base64",
1414
899
  input: n.value,
@@ -1417,17 +902,15 @@ const Jr = /* @__PURE__ */ c("$ZodBase64", (e, t) => {
1417
902
  });
1418
903
  };
1419
904
  });
1420
- function Gr(e) {
1421
- if (!lt.test(e))
905
+ function Fr(e) {
906
+ if (!rt.test(e))
1422
907
  return !1;
1423
908
  const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1424
- return ft(n);
909
+ return it(n);
1425
910
  }
1426
- const Yr = /* @__PURE__ */ c("$ZodBase64URL", (e, t) => {
1427
- t.pattern ?? (t.pattern = lt), y.init(e, t), e._zod.onattach.push((n) => {
1428
- n._zod.bag.contentEncoding = "base64url";
1429
- }), e._zod.check = (n) => {
1430
- Gr(n.value) || n.issues.push({
911
+ const Jr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
912
+ t.pattern ?? (t.pattern = rt), v.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
913
+ Fr(n.value) || n.issues.push({
1431
914
  code: "invalid_format",
1432
915
  format: "base64url",
1433
916
  input: n.value,
@@ -1435,10 +918,10 @@ const Yr = /* @__PURE__ */ c("$ZodBase64URL", (e, t) => {
1435
918
  continue: !t.abort
1436
919
  });
1437
920
  };
1438
- }), Xr = /* @__PURE__ */ c("$ZodE164", (e, t) => {
1439
- t.pattern ?? (t.pattern = hr), y.init(e, t);
921
+ }), Lr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
922
+ t.pattern ?? (t.pattern = tr), v.init(e, t);
1440
923
  });
1441
- function eo(e, t = null) {
924
+ function Mr(e, t = null) {
1442
925
  try {
1443
926
  const n = e.split(".");
1444
927
  if (n.length !== 3)
@@ -1452,9 +935,9 @@ function eo(e, t = null) {
1452
935
  return !1;
1453
936
  }
1454
937
  }
1455
- const to = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
1456
- y.init(e, t), e._zod.check = (n) => {
1457
- eo(n.value, t.alg) || n.issues.push({
938
+ const Br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
939
+ v.init(e, t), e._zod.check = (n) => {
940
+ Mr(n.value, t.alg) || n.issues.push({
1458
941
  code: "invalid_format",
1459
942
  format: "jwt",
1460
943
  input: n.value,
@@ -1462,21 +945,21 @@ const to = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
1462
945
  continue: !t.abort
1463
946
  });
1464
947
  };
1465
- }), no = /* @__PURE__ */ c("$ZodUnknown", (e, t) => {
1466
- b.init(e, t), e._zod.parse = (n) => n;
1467
- }), ro = /* @__PURE__ */ c("$ZodNever", (e, t) => {
1468
- b.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
948
+ }), Vr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
949
+ w.init(e, t), e._zod.parse = (n) => n;
950
+ }), qr = /* @__PURE__ */ u("$ZodNever", (e, t) => {
951
+ w.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1469
952
  expected: "never",
1470
953
  code: "invalid_type",
1471
954
  input: n.value,
1472
955
  inst: e
1473
956
  }), n);
1474
957
  });
1475
- function Te(e, t, n) {
1476
- e.issues.length && t.issues.push(...it(n, e.issues)), t.value[n] = e.value;
958
+ function we(e, t, n) {
959
+ e.issues.length && t.issues.push(...Xe(n, e.issues)), t.value[n] = e.value;
1477
960
  }
1478
- const oo = /* @__PURE__ */ c("$ZodArray", (e, t) => {
1479
- b.init(e, t), e._zod.parse = (n, r) => {
961
+ const Wr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
962
+ w.init(e, t), e._zod.parse = (n, r) => {
1480
963
  const o = n.value;
1481
964
  if (!Array.isArray(o))
1482
965
  return n.issues.push({
@@ -1486,26 +969,31 @@ const oo = /* @__PURE__ */ c("$ZodArray", (e, t) => {
1486
969
  inst: e
1487
970
  }), n;
1488
971
  n.value = Array(o.length);
1489
- const s = [];
1490
- for (let i = 0; i < o.length; i++) {
1491
- const u = o[i], d = t.element._zod.run({
1492
- value: u,
972
+ const i = [];
973
+ for (let s = 0; s < o.length; s++) {
974
+ const a = o[s], l = t.element._zod.run({
975
+ value: a,
1493
976
  issues: []
1494
977
  }, r);
1495
- d instanceof Promise ? s.push(d.then((l) => Te(l, n, i))) : Te(d, n, i);
978
+ l instanceof Promise ? i.push(l.then((d) => we(d, n, s))) : we(l, n, s);
1496
979
  }
1497
- return s.length ? Promise.all(s).then(() => n) : n;
980
+ return i.length ? Promise.all(i).then(() => n) : n;
1498
981
  };
1499
982
  });
1500
- function te(e, t, n, r) {
1501
- e.issues.length && t.issues.push(...it(n, e.issues)), e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
983
+ function Q(e, t, n, r, o) {
984
+ if (e.issues.length) {
985
+ if (o && !(n in r))
986
+ return;
987
+ t.issues.push(...Xe(n, e.issues));
988
+ }
989
+ e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
1502
990
  }
1503
- function pt(e) {
991
+ function at(e) {
1504
992
  const t = Object.keys(e.shape);
1505
993
  for (const r of t)
1506
994
  if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
1507
995
  throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
1508
- const n = On(e.shape);
996
+ const n = yn(e.shape);
1509
997
  return {
1510
998
  ...e,
1511
999
  keys: t,
@@ -1514,186 +1002,203 @@ function pt(e) {
1514
1002
  optionalKeys: new Set(n)
1515
1003
  };
1516
1004
  }
1517
- function mt(e, t, n, r, o, s) {
1518
- const i = [], u = o.keySet, d = o.catchall._zod, l = d.def.type;
1519
- for (const f of Object.keys(t)) {
1520
- if (u.has(f))
1005
+ function ct(e, t, n, r, o, i) {
1006
+ const s = [], a = o.keySet, l = o.catchall._zod, d = l.def.type, f = l.optout === "optional";
1007
+ for (const g in t) {
1008
+ if (a.has(g))
1521
1009
  continue;
1522
- if (l === "never") {
1523
- i.push(f);
1010
+ if (d === "never") {
1011
+ s.push(g);
1524
1012
  continue;
1525
1013
  }
1526
- const g = d.run({ value: t[f], issues: [] }, r);
1527
- g instanceof Promise ? e.push(g.then((p) => te(p, n, f, t))) : te(g, n, f, t);
1014
+ const h = l.run({ value: t[g], issues: [] }, r);
1015
+ h instanceof Promise ? e.push(h.then((m) => Q(m, n, g, t, f))) : Q(h, n, g, t, f);
1528
1016
  }
1529
- return i.length && n.issues.push({
1017
+ return s.length && n.issues.push({
1530
1018
  code: "unrecognized_keys",
1531
- keys: i,
1019
+ keys: s,
1532
1020
  input: t,
1533
- inst: s
1021
+ inst: i
1534
1022
  }), e.length ? Promise.all(e).then(() => n) : n;
1535
1023
  }
1536
- const so = /* @__PURE__ */ c("$ZodObject", (e, t) => {
1537
- if (b.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1538
- const u = t.shape;
1024
+ const Kr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1025
+ if (w.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1026
+ const a = t.shape;
1539
1027
  Object.defineProperty(t, "shape", {
1540
1028
  get: () => {
1541
- const d = { ...u };
1029
+ const l = { ...a };
1542
1030
  return Object.defineProperty(t, "shape", {
1543
- value: d
1544
- }), d;
1031
+ value: l
1032
+ }), l;
1545
1033
  }
1546
1034
  });
1547
1035
  }
1548
- const r = he(() => pt(t));
1036
+ const r = ue(() => at(t));
1549
1037
  _(e._zod, "propValues", () => {
1550
- const u = t.shape, d = {};
1551
- for (const l in u) {
1552
- const f = u[l]._zod;
1038
+ const a = t.shape, l = {};
1039
+ for (const d in a) {
1040
+ const f = a[d]._zod;
1553
1041
  if (f.values) {
1554
- d[l] ?? (d[l] = /* @__PURE__ */ new Set());
1042
+ l[d] ?? (l[d] = /* @__PURE__ */ new Set());
1555
1043
  for (const g of f.values)
1556
- d[l].add(g);
1044
+ l[d].add(g);
1557
1045
  }
1558
1046
  }
1559
- return d;
1047
+ return l;
1560
1048
  });
1561
- const o = ee, s = t.catchall;
1562
- let i;
1563
- e._zod.parse = (u, d) => {
1564
- i ?? (i = r.value);
1565
- const l = u.value;
1566
- if (!o(l))
1567
- return u.issues.push({
1049
+ const o = Y, i = t.catchall;
1050
+ let s;
1051
+ e._zod.parse = (a, l) => {
1052
+ s ?? (s = r.value);
1053
+ const d = a.value;
1054
+ if (!o(d))
1055
+ return a.issues.push({
1568
1056
  expected: "object",
1569
1057
  code: "invalid_type",
1570
- input: l,
1058
+ input: d,
1571
1059
  inst: e
1572
- }), u;
1573
- u.value = {};
1574
- const f = [], g = i.shape;
1575
- for (const p of i.keys) {
1576
- const m = g[p]._zod.run({ value: l[p], issues: [] }, d);
1577
- m instanceof Promise ? f.push(m.then((k) => te(k, u, p, l))) : te(m, u, p, l);
1060
+ }), a;
1061
+ a.value = {};
1062
+ const f = [], g = s.shape;
1063
+ for (const h of s.keys) {
1064
+ const m = g[h], $ = m._zod.optout === "optional", b = m._zod.run({ value: d[h], issues: [] }, l);
1065
+ b instanceof Promise ? f.push(b.then((W) => Q(W, a, h, d, $))) : Q(b, a, h, d, $);
1578
1066
  }
1579
- return s ? mt(f, l, u, d, r.value, e) : f.length ? Promise.all(f).then(() => u) : u;
1067
+ return i ? ct(f, d, a, l, r.value, e) : f.length ? Promise.all(f).then(() => a) : a;
1580
1068
  };
1581
- }), io = /* @__PURE__ */ c("$ZodObjectJIT", (e, t) => {
1582
- so.init(e, t);
1583
- const n = e._zod.parse, r = he(() => pt(t)), o = (p) => {
1584
- const v = new Or(["shape", "payload", "ctx"]), m = r.value, k = ($) => {
1585
- const x = Ee($);
1069
+ }), Hr = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1070
+ Kr.init(e, t);
1071
+ const n = e._zod.parse, r = ue(() => at(t)), o = (h) => {
1072
+ const m = new vr(["shape", "payload", "ctx"]), $ = r.value, b = (P) => {
1073
+ const x = ve(P);
1586
1074
  return `shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`;
1587
1075
  };
1588
- v.write("const input = payload.value;");
1589
- const P = /* @__PURE__ */ Object.create(null);
1590
- let Z = 0;
1591
- for (const $ of m.keys)
1592
- P[$] = `key_${Z++}`;
1593
- v.write("const newResult = {};");
1594
- for (const $ of m.keys) {
1595
- const x = P[$], S = Ee($);
1596
- v.write(`const ${x} = ${k($)};`), v.write(`
1076
+ m.write("const input = payload.value;");
1077
+ const W = /* @__PURE__ */ Object.create(null);
1078
+ let jt = 0;
1079
+ for (const P of $.keys)
1080
+ W[P] = `key_${jt++}`;
1081
+ m.write("const newResult = {};");
1082
+ for (const P of $.keys) {
1083
+ const x = W[P], O = ve(P), Zt = h[P]?._zod?.optout === "optional";
1084
+ m.write(`const ${x} = ${b(P)};`), Zt ? m.write(`
1085
+ if (${x}.issues.length) {
1086
+ if (${O} in input) {
1087
+ payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
1088
+ ...iss,
1089
+ path: iss.path ? [${O}, ...iss.path] : [${O}]
1090
+ })));
1091
+ }
1092
+ }
1093
+
1094
+ if (${x}.value === undefined) {
1095
+ if (${O} in input) {
1096
+ newResult[${O}] = undefined;
1097
+ }
1098
+ } else {
1099
+ newResult[${O}] = ${x}.value;
1100
+ }
1101
+
1102
+ `) : m.write(`
1597
1103
  if (${x}.issues.length) {
1598
1104
  payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
1599
1105
  ...iss,
1600
- path: iss.path ? [${S}, ...iss.path] : [${S}]
1106
+ path: iss.path ? [${O}, ...iss.path] : [${O}]
1601
1107
  })));
1602
1108
  }
1603
1109
 
1604
-
1605
1110
  if (${x}.value === undefined) {
1606
- if (${S} in input) {
1607
- newResult[${S}] = undefined;
1111
+ if (${O} in input) {
1112
+ newResult[${O}] = undefined;
1608
1113
  }
1609
1114
  } else {
1610
- newResult[${S}] = ${x}.value;
1115
+ newResult[${O}] = ${x}.value;
1611
1116
  }
1612
1117
 
1613
1118
  `);
1614
1119
  }
1615
- v.write("payload.value = newResult;"), v.write("return payload;");
1616
- const L = v.compile();
1617
- return ($, x) => L(p, $, x);
1120
+ m.write("payload.value = newResult;"), m.write("return payload;");
1121
+ const xt = m.compile();
1122
+ return (P, x) => xt(h, P, x);
1618
1123
  };
1619
- let s;
1620
- const i = ee, u = !rt.jitless, l = u && jn.value, f = t.catchall;
1124
+ let i;
1125
+ const s = Y, a = !He.jitless, d = a && _n.value, f = t.catchall;
1621
1126
  let g;
1622
- e._zod.parse = (p, v) => {
1127
+ e._zod.parse = (h, m) => {
1623
1128
  g ?? (g = r.value);
1624
- const m = p.value;
1625
- return i(m) ? u && l && v?.async === !1 && v.jitless !== !0 ? (s || (s = o(t.shape)), p = s(p, v), f ? mt([], m, p, v, g, e) : p) : n(p, v) : (p.issues.push({
1129
+ const $ = h.value;
1130
+ return s($) ? a && d && m?.async === !1 && m.jitless !== !0 ? (i || (i = o(t.shape)), h = i(h, m), f ? ct([], $, h, m, g, e) : h) : n(h, m) : (h.issues.push({
1626
1131
  expected: "object",
1627
1132
  code: "invalid_type",
1628
- input: m,
1133
+ input: $,
1629
1134
  inst: e
1630
- }), p);
1135
+ }), h);
1631
1136
  };
1632
1137
  });
1633
- function Se(e, t, n, r) {
1634
- for (const s of e)
1635
- if (s.issues.length === 0)
1636
- return t.value = s.value, t;
1637
- const o = e.filter((s) => !M(s));
1138
+ function ze(e, t, n, r) {
1139
+ for (const i of e)
1140
+ if (i.issues.length === 0)
1141
+ return t.value = i.value, t;
1142
+ const o = e.filter((i) => !U(i));
1638
1143
  return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
1639
1144
  code: "invalid_union",
1640
1145
  input: t.value,
1641
1146
  inst: n,
1642
- errors: e.map((s) => s.issues.map((i) => F(i, r, R())))
1147
+ errors: e.map((i) => i.issues.map((s) => D(s, r, R())))
1643
1148
  }), t);
1644
1149
  }
1645
- const ao = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
1646
- b.init(e, t), _(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), _(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e._zod, "values", () => {
1150
+ const Gr = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1151
+ w.init(e, t), _(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), _(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e._zod, "values", () => {
1647
1152
  if (t.options.every((o) => o._zod.values))
1648
1153
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
1649
1154
  }), _(e._zod, "pattern", () => {
1650
1155
  if (t.options.every((o) => o._zod.pattern)) {
1651
- const o = t.options.map((s) => s._zod.pattern);
1652
- return new RegExp(`^(${o.map((s) => pe(s.source)).join("|")})$`);
1156
+ const o = t.options.map((i) => i._zod.pattern);
1157
+ return new RegExp(`^(${o.map((i) => de(i.source)).join("|")})$`);
1653
1158
  }
1654
1159
  });
1655
1160
  const n = t.options.length === 1, r = t.options[0]._zod.run;
1656
- e._zod.parse = (o, s) => {
1161
+ e._zod.parse = (o, i) => {
1657
1162
  if (n)
1658
- return r(o, s);
1659
- let i = !1;
1660
- const u = [];
1661
- for (const d of t.options) {
1662
- const l = d._zod.run({
1163
+ return r(o, i);
1164
+ let s = !1;
1165
+ const a = [];
1166
+ for (const l of t.options) {
1167
+ const d = l._zod.run({
1663
1168
  value: o.value,
1664
1169
  issues: []
1665
- }, s);
1666
- if (l instanceof Promise)
1667
- u.push(l), i = !0;
1170
+ }, i);
1171
+ if (d instanceof Promise)
1172
+ a.push(d), s = !0;
1668
1173
  else {
1669
- if (l.issues.length === 0)
1670
- return l;
1671
- u.push(l);
1174
+ if (d.issues.length === 0)
1175
+ return d;
1176
+ a.push(d);
1672
1177
  }
1673
1178
  }
1674
- return i ? Promise.all(u).then((d) => Se(d, o, e, s)) : Se(u, o, e, s);
1179
+ return s ? Promise.all(a).then((l) => ze(l, o, e, i)) : ze(a, o, e, i);
1675
1180
  };
1676
- }), co = /* @__PURE__ */ c("$ZodIntersection", (e, t) => {
1677
- b.init(e, t), e._zod.parse = (n, r) => {
1678
- const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
1679
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([d, l]) => Ie(n, d, l)) : Ie(n, s, i);
1181
+ }), Yr = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1182
+ w.init(e, t), e._zod.parse = (n, r) => {
1183
+ const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
1184
+ return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([l, d]) => be(n, l, d)) : be(n, i, s);
1680
1185
  };
1681
1186
  });
1682
- function le(e, t) {
1187
+ function ae(e, t) {
1683
1188
  if (e === t)
1684
1189
  return { valid: !0, data: e };
1685
1190
  if (e instanceof Date && t instanceof Date && +e == +t)
1686
1191
  return { valid: !0, data: e };
1687
- if (B(e) && B(t)) {
1688
- const n = Object.keys(t), r = Object.keys(e).filter((s) => n.indexOf(s) !== -1), o = { ...e, ...t };
1689
- for (const s of r) {
1690
- const i = le(e[s], t[s]);
1691
- if (!i.valid)
1192
+ if (M(e) && M(t)) {
1193
+ const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
1194
+ for (const i of r) {
1195
+ const s = ae(e[i], t[i]);
1196
+ if (!s.valid)
1692
1197
  return {
1693
1198
  valid: !1,
1694
- mergeErrorPath: [s, ...i.mergeErrorPath]
1199
+ mergeErrorPath: [i, ...s.mergeErrorPath]
1695
1200
  };
1696
- o[s] = i.data;
1201
+ o[i] = s.data;
1697
1202
  }
1698
1203
  return { valid: !0, data: o };
1699
1204
  }
@@ -1702,94 +1207,112 @@ function le(e, t) {
1702
1207
  return { valid: !1, mergeErrorPath: [] };
1703
1208
  const n = [];
1704
1209
  for (let r = 0; r < e.length; r++) {
1705
- const o = e[r], s = t[r], i = le(o, s);
1706
- if (!i.valid)
1210
+ const o = e[r], i = t[r], s = ae(o, i);
1211
+ if (!s.valid)
1707
1212
  return {
1708
1213
  valid: !1,
1709
- mergeErrorPath: [r, ...i.mergeErrorPath]
1214
+ mergeErrorPath: [r, ...s.mergeErrorPath]
1710
1215
  };
1711
- n.push(i.data);
1216
+ n.push(s.data);
1712
1217
  }
1713
1218
  return { valid: !0, data: n };
1714
1219
  }
1715
1220
  return { valid: !1, mergeErrorPath: [] };
1716
1221
  }
1717
- function Ie(e, t, n) {
1718
- if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), M(e))
1222
+ function be(e, t, n) {
1223
+ const r = /* @__PURE__ */ new Map();
1224
+ let o;
1225
+ for (const a of t.issues)
1226
+ if (a.code === "unrecognized_keys") {
1227
+ o ?? (o = a);
1228
+ for (const l of a.keys)
1229
+ r.has(l) || r.set(l, {}), r.get(l).l = !0;
1230
+ } else
1231
+ e.issues.push(a);
1232
+ for (const a of n.issues)
1233
+ if (a.code === "unrecognized_keys")
1234
+ for (const l of a.keys)
1235
+ r.has(l) || r.set(l, {}), r.get(l).r = !0;
1236
+ else
1237
+ e.issues.push(a);
1238
+ const i = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
1239
+ if (i.length && o && e.issues.push({ ...o, keys: i }), U(e))
1719
1240
  return e;
1720
- const r = le(t.value, n.value);
1721
- if (!r.valid)
1722
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
1723
- return e.value = r.data, e;
1724
- }
1725
- const uo = /* @__PURE__ */ c("$ZodEnum", (e, t) => {
1726
- b.init(e, t);
1727
- const n = $n(t.entries), r = new Set(n);
1728
- e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => Pn.has(typeof o)).map((o) => typeof o == "string" ? se(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
1729
- const i = o.value;
1730
- return r.has(i) || o.issues.push({
1241
+ const s = ae(t.value, n.value);
1242
+ if (!s.valid)
1243
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
1244
+ return e.value = s.data, e;
1245
+ }
1246
+ const Qr = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1247
+ w.init(e, t);
1248
+ const n = Ge(t.entries), r = new Set(n);
1249
+ e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => vn.has(typeof o)).map((o) => typeof o == "string" ? ne(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1250
+ const s = o.value;
1251
+ return r.has(s) || o.issues.push({
1731
1252
  code: "invalid_value",
1732
1253
  values: n,
1733
- input: i,
1254
+ input: s,
1734
1255
  inst: e
1735
1256
  }), o;
1736
1257
  };
1737
- }), lo = /* @__PURE__ */ c("$ZodTransform", (e, t) => {
1738
- b.init(e, t), e._zod.parse = (n, r) => {
1258
+ }), Xr = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1259
+ w.init(e, t), e._zod.parse = (n, r) => {
1739
1260
  if (r.direction === "backward")
1740
- throw new nt(e.constructor.name);
1261
+ throw new Ke(e.constructor.name);
1741
1262
  const o = t.transform(n.value, n);
1742
1263
  if (r.async)
1743
- return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (n.value = i, n));
1264
+ return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
1744
1265
  if (o instanceof Promise)
1745
- throw new Q();
1266
+ throw new F();
1746
1267
  return n.value = o, n;
1747
1268
  };
1748
1269
  });
1749
- function De(e, t) {
1270
+ function ke(e, t) {
1750
1271
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1751
1272
  }
1752
- const ho = /* @__PURE__ */ c("$ZodOptional", (e, t) => {
1753
- b.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), _(e._zod, "pattern", () => {
1273
+ const ut = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1274
+ w.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), _(e._zod, "pattern", () => {
1754
1275
  const n = t.innerType._zod.pattern;
1755
- return n ? new RegExp(`^(${pe(n.source)})?$`) : void 0;
1276
+ return n ? new RegExp(`^(${de(n.source)})?$`) : void 0;
1756
1277
  }), e._zod.parse = (n, r) => {
1757
1278
  if (t.innerType._zod.optin === "optional") {
1758
1279
  const o = t.innerType._zod.run(n, r);
1759
- return o instanceof Promise ? o.then((s) => De(s, n.value)) : De(o, n.value);
1280
+ return o instanceof Promise ? o.then((i) => ke(i, n.value)) : ke(o, n.value);
1760
1281
  }
1761
1282
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
1762
1283
  };
1763
- }), fo = /* @__PURE__ */ c("$ZodNullable", (e, t) => {
1764
- b.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "pattern", () => {
1284
+ }), eo = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1285
+ ut.init(e, t), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1286
+ }), to = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1287
+ w.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "pattern", () => {
1765
1288
  const n = t.innerType._zod.pattern;
1766
- return n ? new RegExp(`^(${pe(n.source)}|null)$`) : void 0;
1289
+ return n ? new RegExp(`^(${de(n.source)}|null)$`) : void 0;
1767
1290
  }), _(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
1768
- }), po = /* @__PURE__ */ c("$ZodDefault", (e, t) => {
1769
- b.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1291
+ }), no = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1292
+ w.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1770
1293
  if (r.direction === "backward")
1771
1294
  return t.innerType._zod.run(n, r);
1772
1295
  if (n.value === void 0)
1773
1296
  return n.value = t.defaultValue, n;
1774
1297
  const o = t.innerType._zod.run(n, r);
1775
- return o instanceof Promise ? o.then((s) => Ce(s, t)) : Ce(o, t);
1298
+ return o instanceof Promise ? o.then((i) => $e(i, t)) : $e(o, t);
1776
1299
  };
1777
1300
  });
1778
- function Ce(e, t) {
1301
+ function $e(e, t) {
1779
1302
  return e.value === void 0 && (e.value = t.defaultValue), e;
1780
1303
  }
1781
- const mo = /* @__PURE__ */ c("$ZodPrefault", (e, t) => {
1782
- b.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1783
- }), go = /* @__PURE__ */ c("$ZodNonOptional", (e, t) => {
1784
- b.init(e, t), _(e._zod, "values", () => {
1304
+ const ro = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1305
+ w.init(e, t), e._zod.optin = "optional", _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1306
+ }), oo = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1307
+ w.init(e, t), _(e._zod, "values", () => {
1785
1308
  const n = t.innerType._zod.values;
1786
1309
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
1787
1310
  }), e._zod.parse = (n, r) => {
1788
1311
  const o = t.innerType._zod.run(n, r);
1789
- return o instanceof Promise ? o.then((s) => Ne(s, e)) : Ne(o, e);
1312
+ return o instanceof Promise ? o.then((i) => je(i, e)) : je(o, e);
1790
1313
  };
1791
1314
  });
1792
- function Ne(e, t) {
1315
+ function je(e, t) {
1793
1316
  return !e.issues.length && e.value === void 0 && e.issues.push({
1794
1317
  code: "invalid_type",
1795
1318
  expected: "nonoptional",
@@ -1797,58 +1320,58 @@ function Ne(e, t) {
1797
1320
  inst: t
1798
1321
  }), e;
1799
1322
  }
1800
- const vo = /* @__PURE__ */ c("$ZodCatch", (e, t) => {
1801
- b.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1323
+ const so = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
1324
+ w.init(e, t), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), _(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1802
1325
  if (r.direction === "backward")
1803
1326
  return t.innerType._zod.run(n, r);
1804
1327
  const o = t.innerType._zod.run(n, r);
1805
- return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
1328
+ return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
1806
1329
  ...n,
1807
1330
  error: {
1808
- issues: s.issues.map((i) => F(i, r, R()))
1331
+ issues: i.issues.map((s) => D(s, r, R()))
1809
1332
  },
1810
1333
  input: n.value
1811
1334
  }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
1812
1335
  ...n,
1813
1336
  error: {
1814
- issues: o.issues.map((s) => F(s, r, R()))
1337
+ issues: o.issues.map((i) => D(i, r, R()))
1815
1338
  },
1816
1339
  input: n.value
1817
1340
  }), n.issues = []), n);
1818
1341
  };
1819
- }), _o = /* @__PURE__ */ c("$ZodPipe", (e, t) => {
1820
- b.init(e, t), _(e._zod, "values", () => t.in._zod.values), _(e._zod, "optin", () => t.in._zod.optin), _(e._zod, "optout", () => t.out._zod.optout), _(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1342
+ }), io = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
1343
+ w.init(e, t), _(e._zod, "values", () => t.in._zod.values), _(e._zod, "optin", () => t.in._zod.optin), _(e._zod, "optout", () => t.out._zod.optout), _(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1821
1344
  if (r.direction === "backward") {
1822
- const s = t.out._zod.run(n, r);
1823
- return s instanceof Promise ? s.then((i) => G(i, t.in, r)) : G(s, t.in, r);
1345
+ const i = t.out._zod.run(n, r);
1346
+ return i instanceof Promise ? i.then((s) => H(s, t.in, r)) : H(i, t.in, r);
1824
1347
  }
1825
1348
  const o = t.in._zod.run(n, r);
1826
- return o instanceof Promise ? o.then((s) => G(s, t.out, r)) : G(o, t.out, r);
1349
+ return o instanceof Promise ? o.then((i) => H(i, t.out, r)) : H(o, t.out, r);
1827
1350
  };
1828
1351
  });
1829
- function G(e, t, n) {
1352
+ function H(e, t, n) {
1830
1353
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
1831
1354
  }
1832
- const yo = /* @__PURE__ */ c("$ZodReadonly", (e, t) => {
1833
- b.init(e, t), _(e._zod, "propValues", () => t.innerType._zod.propValues), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "optin", () => t.innerType._zod.optin), _(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (n, r) => {
1355
+ const ao = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1356
+ w.init(e, t), _(e._zod, "propValues", () => t.innerType._zod.propValues), _(e._zod, "values", () => t.innerType._zod.values), _(e._zod, "optin", () => t.innerType?._zod?.optin), _(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1834
1357
  if (r.direction === "backward")
1835
1358
  return t.innerType._zod.run(n, r);
1836
1359
  const o = t.innerType._zod.run(n, r);
1837
- return o instanceof Promise ? o.then(Re) : Re(o);
1360
+ return o instanceof Promise ? o.then(xe) : xe(o);
1838
1361
  };
1839
1362
  });
1840
- function Re(e) {
1363
+ function xe(e) {
1841
1364
  return e.value = Object.freeze(e.value), e;
1842
1365
  }
1843
- const wo = /* @__PURE__ */ c("$ZodCustom", (e, t) => {
1844
- T.init(e, t), b.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1366
+ const co = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
1367
+ E.init(e, t), w.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1845
1368
  const r = n.value, o = t.fn(r);
1846
1369
  if (o instanceof Promise)
1847
- return o.then((s) => Fe(s, n, r, e));
1848
- Fe(o, n, r, e);
1370
+ return o.then((i) => Ze(i, n, r, e));
1371
+ Ze(o, n, r, e);
1849
1372
  };
1850
1373
  });
1851
- function Fe(e, t, n, r) {
1374
+ function Ze(e, t, n, r) {
1852
1375
  if (!e) {
1853
1376
  const o = {
1854
1377
  code: "custom",
@@ -1860,21 +1383,17 @@ function Fe(e, t, n, r) {
1860
1383
  continue: !r._zod.def.abort
1861
1384
  // params: inst._zod.def.params,
1862
1385
  };
1863
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(W(o));
1386
+ r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(B(o));
1864
1387
  }
1865
1388
  }
1866
- class bo {
1389
+ var Oe;
1390
+ class uo {
1867
1391
  constructor() {
1868
1392
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1869
1393
  }
1870
1394
  add(t, ...n) {
1871
1395
  const r = n[0];
1872
- if (this._map.set(t, r), r && typeof r == "object" && "id" in r) {
1873
- if (this._idmap.has(r.id))
1874
- throw new Error(`ID ${r.id} already exists in the registry`);
1875
- this._idmap.set(r.id, t);
1876
- }
1877
- return this;
1396
+ return this._map.set(t, r), r && typeof r == "object" && "id" in r && this._idmap.set(r.id, t), this;
1878
1397
  }
1879
1398
  clear() {
1880
1399
  return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
@@ -1897,218 +1416,243 @@ class bo {
1897
1416
  return this._map.has(t);
1898
1417
  }
1899
1418
  }
1900
- function zo() {
1901
- return new bo();
1419
+ function lo() {
1420
+ return new uo();
1902
1421
  }
1903
- const Y = /* @__PURE__ */ zo();
1904
- function ko(e, t) {
1422
+ (Oe = globalThis).__zod_globalRegistry ?? (Oe.__zod_globalRegistry = lo());
1423
+ const L = globalThis.__zod_globalRegistry;
1424
+ // @__NO_SIDE_EFFECTS__
1425
+ function fo(e, t) {
1905
1426
  return new e({
1906
1427
  type: "string",
1907
- ...h(t)
1428
+ ...p(t)
1908
1429
  });
1909
1430
  }
1910
- function xo(e, t) {
1431
+ // @__NO_SIDE_EFFECTS__
1432
+ function po(e, t) {
1911
1433
  return new e({
1912
1434
  type: "string",
1913
1435
  format: "email",
1914
1436
  check: "string_format",
1915
1437
  abort: !1,
1916
- ...h(t)
1438
+ ...p(t)
1917
1439
  });
1918
1440
  }
1919
- function Ue(e, t) {
1441
+ // @__NO_SIDE_EFFECTS__
1442
+ function Se(e, t) {
1920
1443
  return new e({
1921
1444
  type: "string",
1922
1445
  format: "guid",
1923
1446
  check: "string_format",
1924
1447
  abort: !1,
1925
- ...h(t)
1448
+ ...p(t)
1926
1449
  });
1927
1450
  }
1928
- function Zo(e, t) {
1451
+ // @__NO_SIDE_EFFECTS__
1452
+ function ho(e, t) {
1929
1453
  return new e({
1930
1454
  type: "string",
1931
1455
  format: "uuid",
1932
1456
  check: "string_format",
1933
1457
  abort: !1,
1934
- ...h(t)
1458
+ ...p(t)
1935
1459
  });
1936
1460
  }
1937
- function $o(e, t) {
1461
+ // @__NO_SIDE_EFFECTS__
1462
+ function mo(e, t) {
1938
1463
  return new e({
1939
1464
  type: "string",
1940
1465
  format: "uuid",
1941
1466
  check: "string_format",
1942
1467
  abort: !1,
1943
1468
  version: "v4",
1944
- ...h(t)
1469
+ ...p(t)
1945
1470
  });
1946
1471
  }
1947
- function jo(e, t) {
1472
+ // @__NO_SIDE_EFFECTS__
1473
+ function go(e, t) {
1948
1474
  return new e({
1949
1475
  type: "string",
1950
1476
  format: "uuid",
1951
1477
  check: "string_format",
1952
1478
  abort: !1,
1953
1479
  version: "v6",
1954
- ...h(t)
1480
+ ...p(t)
1955
1481
  });
1956
1482
  }
1957
- function Po(e, t) {
1483
+ // @__NO_SIDE_EFFECTS__
1484
+ function _o(e, t) {
1958
1485
  return new e({
1959
1486
  type: "string",
1960
1487
  format: "uuid",
1961
1488
  check: "string_format",
1962
1489
  abort: !1,
1963
1490
  version: "v7",
1964
- ...h(t)
1491
+ ...p(t)
1965
1492
  });
1966
1493
  }
1967
- function Oo(e, t) {
1494
+ // @__NO_SIDE_EFFECTS__
1495
+ function vo(e, t) {
1968
1496
  return new e({
1969
1497
  type: "string",
1970
1498
  format: "url",
1971
1499
  check: "string_format",
1972
1500
  abort: !1,
1973
- ...h(t)
1501
+ ...p(t)
1974
1502
  });
1975
1503
  }
1976
- function Eo(e, t) {
1504
+ // @__NO_SIDE_EFFECTS__
1505
+ function yo(e, t) {
1977
1506
  return new e({
1978
1507
  type: "string",
1979
1508
  format: "emoji",
1980
1509
  check: "string_format",
1981
1510
  abort: !1,
1982
- ...h(t)
1511
+ ...p(t)
1983
1512
  });
1984
1513
  }
1985
- function Ao(e, t) {
1514
+ // @__NO_SIDE_EFFECTS__
1515
+ function wo(e, t) {
1986
1516
  return new e({
1987
1517
  type: "string",
1988
1518
  format: "nanoid",
1989
1519
  check: "string_format",
1990
1520
  abort: !1,
1991
- ...h(t)
1521
+ ...p(t)
1992
1522
  });
1993
1523
  }
1994
- function To(e, t) {
1524
+ // @__NO_SIDE_EFFECTS__
1525
+ function zo(e, t) {
1995
1526
  return new e({
1996
1527
  type: "string",
1997
1528
  format: "cuid",
1998
1529
  check: "string_format",
1999
1530
  abort: !1,
2000
- ...h(t)
1531
+ ...p(t)
2001
1532
  });
2002
1533
  }
2003
- function So(e, t) {
1534
+ // @__NO_SIDE_EFFECTS__
1535
+ function bo(e, t) {
2004
1536
  return new e({
2005
1537
  type: "string",
2006
1538
  format: "cuid2",
2007
1539
  check: "string_format",
2008
1540
  abort: !1,
2009
- ...h(t)
1541
+ ...p(t)
2010
1542
  });
2011
1543
  }
2012
- function Io(e, t) {
1544
+ // @__NO_SIDE_EFFECTS__
1545
+ function ko(e, t) {
2013
1546
  return new e({
2014
1547
  type: "string",
2015
1548
  format: "ulid",
2016
1549
  check: "string_format",
2017
1550
  abort: !1,
2018
- ...h(t)
1551
+ ...p(t)
2019
1552
  });
2020
1553
  }
2021
- function Do(e, t) {
1554
+ // @__NO_SIDE_EFFECTS__
1555
+ function $o(e, t) {
2022
1556
  return new e({
2023
1557
  type: "string",
2024
1558
  format: "xid",
2025
1559
  check: "string_format",
2026
1560
  abort: !1,
2027
- ...h(t)
1561
+ ...p(t)
2028
1562
  });
2029
1563
  }
2030
- function Co(e, t) {
1564
+ // @__NO_SIDE_EFFECTS__
1565
+ function jo(e, t) {
2031
1566
  return new e({
2032
1567
  type: "string",
2033
1568
  format: "ksuid",
2034
1569
  check: "string_format",
2035
1570
  abort: !1,
2036
- ...h(t)
1571
+ ...p(t)
2037
1572
  });
2038
1573
  }
2039
- function No(e, t) {
1574
+ // @__NO_SIDE_EFFECTS__
1575
+ function xo(e, t) {
2040
1576
  return new e({
2041
1577
  type: "string",
2042
1578
  format: "ipv4",
2043
1579
  check: "string_format",
2044
1580
  abort: !1,
2045
- ...h(t)
1581
+ ...p(t)
2046
1582
  });
2047
1583
  }
2048
- function Ro(e, t) {
1584
+ // @__NO_SIDE_EFFECTS__
1585
+ function Zo(e, t) {
2049
1586
  return new e({
2050
1587
  type: "string",
2051
1588
  format: "ipv6",
2052
1589
  check: "string_format",
2053
1590
  abort: !1,
2054
- ...h(t)
1591
+ ...p(t)
2055
1592
  });
2056
1593
  }
2057
- function Fo(e, t) {
1594
+ // @__NO_SIDE_EFFECTS__
1595
+ function Oo(e, t) {
2058
1596
  return new e({
2059
1597
  type: "string",
2060
1598
  format: "cidrv4",
2061
1599
  check: "string_format",
2062
1600
  abort: !1,
2063
- ...h(t)
1601
+ ...p(t)
2064
1602
  });
2065
1603
  }
2066
- function Uo(e, t) {
1604
+ // @__NO_SIDE_EFFECTS__
1605
+ function So(e, t) {
2067
1606
  return new e({
2068
1607
  type: "string",
2069
1608
  format: "cidrv6",
2070
1609
  check: "string_format",
2071
1610
  abort: !1,
2072
- ...h(t)
1611
+ ...p(t)
2073
1612
  });
2074
1613
  }
2075
- function qo(e, t) {
1614
+ // @__NO_SIDE_EFFECTS__
1615
+ function Po(e, t) {
2076
1616
  return new e({
2077
1617
  type: "string",
2078
1618
  format: "base64",
2079
1619
  check: "string_format",
2080
1620
  abort: !1,
2081
- ...h(t)
1621
+ ...p(t)
2082
1622
  });
2083
1623
  }
2084
- function Mo(e, t) {
1624
+ // @__NO_SIDE_EFFECTS__
1625
+ function To(e, t) {
2085
1626
  return new e({
2086
1627
  type: "string",
2087
1628
  format: "base64url",
2088
1629
  check: "string_format",
2089
1630
  abort: !1,
2090
- ...h(t)
1631
+ ...p(t)
2091
1632
  });
2092
1633
  }
2093
- function Qo(e, t) {
1634
+ // @__NO_SIDE_EFFECTS__
1635
+ function Eo(e, t) {
2094
1636
  return new e({
2095
1637
  type: "string",
2096
1638
  format: "e164",
2097
1639
  check: "string_format",
2098
1640
  abort: !1,
2099
- ...h(t)
1641
+ ...p(t)
2100
1642
  });
2101
1643
  }
2102
- function Lo(e, t) {
1644
+ // @__NO_SIDE_EFFECTS__
1645
+ function No(e, t) {
2103
1646
  return new e({
2104
1647
  type: "string",
2105
1648
  format: "jwt",
2106
1649
  check: "string_format",
2107
1650
  abort: !1,
2108
- ...h(t)
1651
+ ...p(t)
2109
1652
  });
2110
1653
  }
2111
- function Bo(e, t) {
1654
+ // @__NO_SIDE_EFFECTS__
1655
+ function Io(e, t) {
2112
1656
  return new e({
2113
1657
  type: "string",
2114
1658
  format: "datetime",
@@ -2116,209 +1660,584 @@ function Bo(e, t) {
2116
1660
  offset: !1,
2117
1661
  local: !1,
2118
1662
  precision: null,
2119
- ...h(t)
1663
+ ...p(t)
2120
1664
  });
2121
1665
  }
2122
- function Wo(e, t) {
1666
+ // @__NO_SIDE_EFFECTS__
1667
+ function Ao(e, t) {
2123
1668
  return new e({
2124
1669
  type: "string",
2125
1670
  format: "date",
2126
1671
  check: "string_format",
2127
- ...h(t)
1672
+ ...p(t)
2128
1673
  });
2129
1674
  }
2130
- function Ko(e, t) {
1675
+ // @__NO_SIDE_EFFECTS__
1676
+ function Ro(e, t) {
2131
1677
  return new e({
2132
1678
  type: "string",
2133
1679
  format: "time",
2134
1680
  check: "string_format",
2135
1681
  precision: null,
2136
- ...h(t)
1682
+ ...p(t)
2137
1683
  });
2138
1684
  }
2139
- function Ho(e, t) {
1685
+ // @__NO_SIDE_EFFECTS__
1686
+ function Do(e, t) {
2140
1687
  return new e({
2141
1688
  type: "string",
2142
1689
  format: "duration",
2143
1690
  check: "string_format",
2144
- ...h(t)
1691
+ ...p(t)
2145
1692
  });
2146
1693
  }
2147
- function Vo(e) {
1694
+ // @__NO_SIDE_EFFECTS__
1695
+ function Co(e) {
2148
1696
  return new e({
2149
1697
  type: "unknown"
2150
1698
  });
2151
1699
  }
2152
- function Jo(e, t) {
1700
+ // @__NO_SIDE_EFFECTS__
1701
+ function Uo(e, t) {
2153
1702
  return new e({
2154
1703
  type: "never",
2155
- ...h(t)
1704
+ ...p(t)
2156
1705
  });
2157
1706
  }
2158
- function gt(e, t) {
2159
- return new yr({
1707
+ // @__NO_SIDE_EFFECTS__
1708
+ function lt(e, t) {
1709
+ return new cr({
2160
1710
  check: "max_length",
2161
- ...h(t),
1711
+ ...p(t),
2162
1712
  maximum: e
2163
1713
  });
2164
1714
  }
2165
- function ne(e, t) {
2166
- return new wr({
1715
+ // @__NO_SIDE_EFFECTS__
1716
+ function X(e, t) {
1717
+ return new ur({
2167
1718
  check: "min_length",
2168
- ...h(t),
1719
+ ...p(t),
2169
1720
  minimum: e
2170
1721
  });
2171
1722
  }
2172
- function vt(e, t) {
2173
- return new br({
1723
+ // @__NO_SIDE_EFFECTS__
1724
+ function dt(e, t) {
1725
+ return new lr({
2174
1726
  check: "length_equals",
2175
- ...h(t),
1727
+ ...p(t),
2176
1728
  length: e
2177
1729
  });
2178
1730
  }
2179
- function Go(e, t) {
2180
- return new zr({
1731
+ // @__NO_SIDE_EFFECTS__
1732
+ function Fo(e, t) {
1733
+ return new dr({
2181
1734
  check: "string_format",
2182
1735
  format: "regex",
2183
- ...h(t),
1736
+ ...p(t),
2184
1737
  pattern: e
2185
1738
  });
2186
1739
  }
2187
- function Yo(e) {
2188
- return new kr({
1740
+ // @__NO_SIDE_EFFECTS__
1741
+ function Jo(e) {
1742
+ return new fr({
2189
1743
  check: "string_format",
2190
1744
  format: "lowercase",
2191
- ...h(e)
1745
+ ...p(e)
2192
1746
  });
2193
1747
  }
2194
- function Xo(e) {
2195
- return new xr({
1748
+ // @__NO_SIDE_EFFECTS__
1749
+ function Lo(e) {
1750
+ return new pr({
2196
1751
  check: "string_format",
2197
1752
  format: "uppercase",
2198
- ...h(e)
1753
+ ...p(e)
2199
1754
  });
2200
1755
  }
2201
- function es(e, t) {
2202
- return new Zr({
1756
+ // @__NO_SIDE_EFFECTS__
1757
+ function Mo(e, t) {
1758
+ return new hr({
2203
1759
  check: "string_format",
2204
1760
  format: "includes",
2205
- ...h(t),
1761
+ ...p(t),
2206
1762
  includes: e
2207
1763
  });
2208
1764
  }
2209
- function ts(e, t) {
2210
- return new $r({
1765
+ // @__NO_SIDE_EFFECTS__
1766
+ function Bo(e, t) {
1767
+ return new mr({
2211
1768
  check: "string_format",
2212
1769
  format: "starts_with",
2213
- ...h(t),
1770
+ ...p(t),
2214
1771
  prefix: e
2215
1772
  });
2216
1773
  }
2217
- function ns(e, t) {
2218
- return new jr({
1774
+ // @__NO_SIDE_EFFECTS__
1775
+ function Vo(e, t) {
1776
+ return new gr({
2219
1777
  check: "string_format",
2220
1778
  format: "ends_with",
2221
- ...h(t),
1779
+ ...p(t),
2222
1780
  suffix: e
2223
1781
  });
2224
1782
  }
2225
- function K(e) {
2226
- return new Pr({
1783
+ // @__NO_SIDE_EFFECTS__
1784
+ function J(e) {
1785
+ return new _r({
2227
1786
  check: "overwrite",
2228
1787
  tx: e
2229
1788
  });
2230
1789
  }
2231
- function rs(e) {
2232
- return K((t) => t.normalize(e));
1790
+ // @__NO_SIDE_EFFECTS__
1791
+ function qo(e) {
1792
+ return /* @__PURE__ */ J((t) => t.normalize(e));
1793
+ }
1794
+ // @__NO_SIDE_EFFECTS__
1795
+ function Wo() {
1796
+ return /* @__PURE__ */ J((e) => e.trim());
2233
1797
  }
2234
- function os() {
2235
- return K((e) => e.trim());
1798
+ // @__NO_SIDE_EFFECTS__
1799
+ function Ko() {
1800
+ return /* @__PURE__ */ J((e) => e.toLowerCase());
2236
1801
  }
2237
- function ss() {
2238
- return K((e) => e.toLowerCase());
1802
+ // @__NO_SIDE_EFFECTS__
1803
+ function Ho() {
1804
+ return /* @__PURE__ */ J((e) => e.toUpperCase());
2239
1805
  }
2240
- function is() {
2241
- return K((e) => e.toUpperCase());
1806
+ // @__NO_SIDE_EFFECTS__
1807
+ function Go() {
1808
+ return /* @__PURE__ */ J((e) => gn(e));
2242
1809
  }
2243
- function as(e, t, n) {
1810
+ // @__NO_SIDE_EFFECTS__
1811
+ function Yo(e, t, n) {
2244
1812
  return new e({
2245
1813
  type: "array",
2246
1814
  element: t,
2247
1815
  // get element() {
2248
1816
  // return element;
2249
1817
  // },
2250
- ...h(n)
1818
+ ...p(n)
2251
1819
  });
2252
1820
  }
2253
- function cs(e, t, n) {
1821
+ // @__NO_SIDE_EFFECTS__
1822
+ function Qo(e, t, n) {
2254
1823
  return new e({
2255
1824
  type: "custom",
2256
1825
  check: "custom",
2257
1826
  fn: t,
2258
- ...h(n)
1827
+ ...p(n)
2259
1828
  });
2260
1829
  }
2261
- function us(e) {
2262
- const t = ls((n) => (n.addIssue = (r) => {
1830
+ // @__NO_SIDE_EFFECTS__
1831
+ function Xo(e) {
1832
+ const t = /* @__PURE__ */ es((n) => (n.addIssue = (r) => {
2263
1833
  if (typeof r == "string")
2264
- n.issues.push(W(r, n.value, t._zod.def));
1834
+ n.issues.push(B(r, n.value, t._zod.def));
2265
1835
  else {
2266
1836
  const o = r;
2267
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(W(o));
1837
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(B(o));
2268
1838
  }
2269
1839
  }, e(n.value, n)));
2270
1840
  return t;
2271
1841
  }
2272
- function ls(e, t) {
2273
- const n = new T({
1842
+ // @__NO_SIDE_EFFECTS__
1843
+ function es(e, t) {
1844
+ const n = new E({
2274
1845
  check: "custom",
2275
- ...h(t)
1846
+ ...p(t)
2276
1847
  });
2277
1848
  return n._zod.check = e, n;
2278
1849
  }
2279
- const ds = /* @__PURE__ */ c("ZodISODateTime", (e, t) => {
2280
- Mr.init(e, t), w.init(e, t);
1850
+ function ft(e) {
1851
+ let t = e?.target ?? "draft-2020-12";
1852
+ return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
1853
+ processors: e.processors ?? {},
1854
+ metadataRegistry: e?.metadata ?? L,
1855
+ target: t,
1856
+ unrepresentable: e?.unrepresentable ?? "throw",
1857
+ override: e?.override ?? (() => {
1858
+ }),
1859
+ io: e?.io ?? "output",
1860
+ counter: 0,
1861
+ seen: /* @__PURE__ */ new Map(),
1862
+ cycles: e?.cycles ?? "ref",
1863
+ reused: e?.reused ?? "inline",
1864
+ external: e?.external ?? void 0
1865
+ };
1866
+ }
1867
+ function k(e, t, n = { path: [], schemaPath: [] }) {
1868
+ var r;
1869
+ const o = e._zod.def, i = t.seen.get(e);
1870
+ if (i)
1871
+ return i.count++, n.schemaPath.includes(e) && (i.cycle = n.path), i.schema;
1872
+ const s = { schema: {}, count: 1, cycle: void 0, path: n.path };
1873
+ t.seen.set(e, s);
1874
+ const a = e._zod.toJSONSchema?.();
1875
+ if (a)
1876
+ s.schema = a;
1877
+ else {
1878
+ const f = {
1879
+ ...n,
1880
+ schemaPath: [...n.schemaPath, e],
1881
+ path: n.path
1882
+ };
1883
+ if (e._zod.processJSONSchema)
1884
+ e._zod.processJSONSchema(t, s.schema, f);
1885
+ else {
1886
+ const h = s.schema, m = t.processors[o.type];
1887
+ if (!m)
1888
+ throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
1889
+ m(e, t, h, f);
1890
+ }
1891
+ const g = e._zod.parent;
1892
+ g && (s.ref || (s.ref = g), k(g, t, f), t.seen.get(g).isParent = !0);
1893
+ }
1894
+ const l = t.metadataRegistry.get(e);
1895
+ return l && Object.assign(s.schema, l), t.io === "input" && j(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((r = s.schema).default ?? (r.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
1896
+ }
1897
+ function pt(e, t) {
1898
+ const n = e.seen.get(t);
1899
+ if (!n)
1900
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
1901
+ const r = /* @__PURE__ */ new Map();
1902
+ for (const s of e.seen.entries()) {
1903
+ const a = e.metadataRegistry.get(s[0])?.id;
1904
+ if (a) {
1905
+ const l = r.get(a);
1906
+ if (l && l !== s[0])
1907
+ throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
1908
+ r.set(a, s[0]);
1909
+ }
1910
+ }
1911
+ const o = (s) => {
1912
+ const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
1913
+ if (e.external) {
1914
+ const g = e.external.registry.get(s[0])?.id, h = e.external.uri ?? (($) => $);
1915
+ if (g)
1916
+ return { ref: h(g) };
1917
+ const m = s[1].defId ?? s[1].schema.id ?? `schema${e.counter++}`;
1918
+ return s[1].defId = m, { defId: m, ref: `${h("__shared")}#/${a}/${m}` };
1919
+ }
1920
+ if (s[1] === n)
1921
+ return { ref: "#" };
1922
+ const d = `#/${a}/`, f = s[1].schema.id ?? `__schema${e.counter++}`;
1923
+ return { defId: f, ref: d + f };
1924
+ }, i = (s) => {
1925
+ if (s[1].schema.$ref)
1926
+ return;
1927
+ const a = s[1], { ref: l, defId: d } = o(s);
1928
+ a.def = { ...a.schema }, d && (a.defId = d);
1929
+ const f = a.schema;
1930
+ for (const g in f)
1931
+ delete f[g];
1932
+ f.$ref = l;
1933
+ };
1934
+ if (e.cycles === "throw")
1935
+ for (const s of e.seen.entries()) {
1936
+ const a = s[1];
1937
+ if (a.cycle)
1938
+ throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
1939
+
1940
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
1941
+ }
1942
+ for (const s of e.seen.entries()) {
1943
+ const a = s[1];
1944
+ if (t === s[0]) {
1945
+ i(s);
1946
+ continue;
1947
+ }
1948
+ if (e.external) {
1949
+ const d = e.external.registry.get(s[0])?.id;
1950
+ if (t !== s[0] && d) {
1951
+ i(s);
1952
+ continue;
1953
+ }
1954
+ }
1955
+ if (e.metadataRegistry.get(s[0])?.id) {
1956
+ i(s);
1957
+ continue;
1958
+ }
1959
+ if (a.cycle) {
1960
+ i(s);
1961
+ continue;
1962
+ }
1963
+ if (a.count > 1 && e.reused === "ref") {
1964
+ i(s);
1965
+ continue;
1966
+ }
1967
+ }
1968
+ }
1969
+ function ht(e, t) {
1970
+ const n = e.seen.get(t);
1971
+ if (!n)
1972
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
1973
+ const r = (s) => {
1974
+ const a = e.seen.get(s);
1975
+ if (a.ref === null)
1976
+ return;
1977
+ const l = a.def ?? a.schema, d = { ...l }, f = a.ref;
1978
+ if (a.ref = null, f) {
1979
+ r(f);
1980
+ const h = e.seen.get(f), m = h.schema;
1981
+ if (m.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (l.allOf = l.allOf ?? [], l.allOf.push(m)) : Object.assign(l, m), Object.assign(l, d), s._zod.parent === f)
1982
+ for (const b in l)
1983
+ b === "$ref" || b === "allOf" || b in d || delete l[b];
1984
+ if (m.$ref && h.def)
1985
+ for (const b in l)
1986
+ b === "$ref" || b === "allOf" || b in h.def && JSON.stringify(l[b]) === JSON.stringify(h.def[b]) && delete l[b];
1987
+ }
1988
+ const g = s._zod.parent;
1989
+ if (g && g !== f) {
1990
+ r(g);
1991
+ const h = e.seen.get(g);
1992
+ if (h?.schema.$ref && (l.$ref = h.schema.$ref, h.def))
1993
+ for (const m in l)
1994
+ m === "$ref" || m === "allOf" || m in h.def && JSON.stringify(l[m]) === JSON.stringify(h.def[m]) && delete l[m];
1995
+ }
1996
+ e.override({
1997
+ zodSchema: s,
1998
+ jsonSchema: l,
1999
+ path: a.path ?? []
2000
+ });
2001
+ };
2002
+ for (const s of [...e.seen.entries()].reverse())
2003
+ r(s[0]);
2004
+ const o = {};
2005
+ if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
2006
+ const s = e.external.registry.get(t)?.id;
2007
+ if (!s)
2008
+ throw new Error("Schema is missing an `id` property");
2009
+ o.$id = e.external.uri(s);
2010
+ }
2011
+ Object.assign(o, n.def ?? n.schema);
2012
+ const i = e.external?.defs ?? {};
2013
+ for (const s of e.seen.entries()) {
2014
+ const a = s[1];
2015
+ a.def && a.defId && (i[a.defId] = a.def);
2016
+ }
2017
+ e.external || Object.keys(i).length > 0 && (e.target === "draft-2020-12" ? o.$defs = i : o.definitions = i);
2018
+ try {
2019
+ const s = JSON.parse(JSON.stringify(o));
2020
+ return Object.defineProperty(s, "~standard", {
2021
+ value: {
2022
+ ...t["~standard"],
2023
+ jsonSchema: {
2024
+ input: ee(t, "input", e.processors),
2025
+ output: ee(t, "output", e.processors)
2026
+ }
2027
+ },
2028
+ enumerable: !1,
2029
+ writable: !1
2030
+ }), s;
2031
+ } catch {
2032
+ throw new Error("Error converting schema to JSON.");
2033
+ }
2034
+ }
2035
+ function j(e, t) {
2036
+ const n = t ?? { seen: /* @__PURE__ */ new Set() };
2037
+ if (n.seen.has(e))
2038
+ return !1;
2039
+ n.seen.add(e);
2040
+ const r = e._zod.def;
2041
+ if (r.type === "transform")
2042
+ return !0;
2043
+ if (r.type === "array")
2044
+ return j(r.element, n);
2045
+ if (r.type === "set")
2046
+ return j(r.valueType, n);
2047
+ if (r.type === "lazy")
2048
+ return j(r.getter(), n);
2049
+ if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
2050
+ return j(r.innerType, n);
2051
+ if (r.type === "intersection")
2052
+ return j(r.left, n) || j(r.right, n);
2053
+ if (r.type === "record" || r.type === "map")
2054
+ return j(r.keyType, n) || j(r.valueType, n);
2055
+ if (r.type === "pipe")
2056
+ return j(r.in, n) || j(r.out, n);
2057
+ if (r.type === "object") {
2058
+ for (const o in r.shape)
2059
+ if (j(r.shape[o], n))
2060
+ return !0;
2061
+ return !1;
2062
+ }
2063
+ if (r.type === "union") {
2064
+ for (const o of r.options)
2065
+ if (j(o, n))
2066
+ return !0;
2067
+ return !1;
2068
+ }
2069
+ if (r.type === "tuple") {
2070
+ for (const o of r.items)
2071
+ if (j(o, n))
2072
+ return !0;
2073
+ return !!(r.rest && j(r.rest, n));
2074
+ }
2075
+ return !1;
2076
+ }
2077
+ const ts = (e, t = {}) => (n) => {
2078
+ const r = ft({ ...n, processors: t });
2079
+ return k(e, r), pt(r, e), ht(r, e);
2080
+ }, ee = (e, t, n = {}) => (r) => {
2081
+ const { libraryOptions: o, target: i } = r ?? {}, s = ft({ ...o ?? {}, target: i, io: t, processors: n });
2082
+ return k(e, s), pt(s, e), ht(s, e);
2083
+ }, ns = {
2084
+ guid: "uuid",
2085
+ url: "uri",
2086
+ datetime: "date-time",
2087
+ json_string: "json-string",
2088
+ regex: ""
2089
+ // do not set
2090
+ }, rs = (e, t, n, r) => {
2091
+ const o = n;
2092
+ o.type = "string";
2093
+ const { minimum: i, maximum: s, format: a, patterns: l, contentEncoding: d } = e._zod.bag;
2094
+ if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format = ns[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), d && (o.contentEncoding = d), l && l.size > 0) {
2095
+ const f = [...l];
2096
+ f.length === 1 ? o.pattern = f[0].source : f.length > 1 && (o.allOf = [
2097
+ ...f.map((g) => ({
2098
+ ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
2099
+ pattern: g.source
2100
+ }))
2101
+ ]);
2102
+ }
2103
+ }, os = (e, t, n, r) => {
2104
+ n.not = {};
2105
+ }, ss = (e, t, n, r) => {
2106
+ }, is = (e, t, n, r) => {
2107
+ const o = e._zod.def, i = Ge(o.entries);
2108
+ i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
2109
+ }, as = (e, t, n, r) => {
2110
+ if (t.unrepresentable === "throw")
2111
+ throw new Error("Custom types cannot be represented in JSON Schema");
2112
+ }, cs = (e, t, n, r) => {
2113
+ if (t.unrepresentable === "throw")
2114
+ throw new Error("Transforms cannot be represented in JSON Schema");
2115
+ }, us = (e, t, n, r) => {
2116
+ const o = n, i = e._zod.def, { minimum: s, maximum: a } = e._zod.bag;
2117
+ typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = k(i.element, t, { ...r, path: [...r.path, "items"] });
2118
+ }, ls = (e, t, n, r) => {
2119
+ const o = n, i = e._zod.def;
2120
+ o.type = "object", o.properties = {};
2121
+ const s = i.shape;
2122
+ for (const d in s)
2123
+ o.properties[d] = k(s[d], t, {
2124
+ ...r,
2125
+ path: [...r.path, "properties", d]
2126
+ });
2127
+ const a = new Set(Object.keys(s)), l = new Set([...a].filter((d) => {
2128
+ const f = i.shape[d]._zod;
2129
+ return t.io === "input" ? f.optin === void 0 : f.optout === void 0;
2130
+ }));
2131
+ l.size > 0 && (o.required = Array.from(l)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = k(i.catchall, t, {
2132
+ ...r,
2133
+ path: [...r.path, "additionalProperties"]
2134
+ })) : t.io === "output" && (o.additionalProperties = !1);
2135
+ }, ds = (e, t, n, r) => {
2136
+ const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, l) => k(a, t, {
2137
+ ...r,
2138
+ path: [...r.path, i ? "oneOf" : "anyOf", l]
2139
+ }));
2140
+ i ? n.oneOf = s : n.anyOf = s;
2141
+ }, fs = (e, t, n, r) => {
2142
+ const o = e._zod.def, i = k(o.left, t, {
2143
+ ...r,
2144
+ path: [...r.path, "allOf", 0]
2145
+ }), s = k(o.right, t, {
2146
+ ...r,
2147
+ path: [...r.path, "allOf", 1]
2148
+ }), a = (d) => "allOf" in d && Object.keys(d).length === 1, l = [
2149
+ ...a(i) ? i.allOf : [i],
2150
+ ...a(s) ? s.allOf : [s]
2151
+ ];
2152
+ n.allOf = l;
2153
+ }, ps = (e, t, n, r) => {
2154
+ const o = e._zod.def, i = k(o.innerType, t, r), s = t.seen.get(e);
2155
+ t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
2156
+ }, hs = (e, t, n, r) => {
2157
+ const o = e._zod.def;
2158
+ k(o.innerType, t, r);
2159
+ const i = t.seen.get(e);
2160
+ i.ref = o.innerType;
2161
+ }, ms = (e, t, n, r) => {
2162
+ const o = e._zod.def;
2163
+ k(o.innerType, t, r);
2164
+ const i = t.seen.get(e);
2165
+ i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
2166
+ }, gs = (e, t, n, r) => {
2167
+ const o = e._zod.def;
2168
+ k(o.innerType, t, r);
2169
+ const i = t.seen.get(e);
2170
+ i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
2171
+ }, _s = (e, t, n, r) => {
2172
+ const o = e._zod.def;
2173
+ k(o.innerType, t, r);
2174
+ const i = t.seen.get(e);
2175
+ i.ref = o.innerType;
2176
+ let s;
2177
+ try {
2178
+ s = o.catchValue(void 0);
2179
+ } catch {
2180
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
2181
+ }
2182
+ n.default = s;
2183
+ }, vs = (e, t, n, r) => {
2184
+ const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2185
+ k(i, t, r);
2186
+ const s = t.seen.get(e);
2187
+ s.ref = i;
2188
+ }, ys = (e, t, n, r) => {
2189
+ const o = e._zod.def;
2190
+ k(o.innerType, t, r);
2191
+ const i = t.seen.get(e);
2192
+ i.ref = o.innerType, n.readOnly = !0;
2193
+ }, mt = (e, t, n, r) => {
2194
+ const o = e._zod.def;
2195
+ k(o.innerType, t, r);
2196
+ const i = t.seen.get(e);
2197
+ i.ref = o.innerType;
2198
+ }, ws = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2199
+ Tr.init(e, t), y.init(e, t);
2281
2200
  });
2282
- function hs(e) {
2283
- return Bo(ds, e);
2201
+ function zs(e) {
2202
+ return /* @__PURE__ */ Io(ws, e);
2284
2203
  }
2285
- const fs = /* @__PURE__ */ c("ZodISODate", (e, t) => {
2286
- Qr.init(e, t), w.init(e, t);
2204
+ const bs = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2205
+ Er.init(e, t), y.init(e, t);
2287
2206
  });
2288
- function ps(e) {
2289
- return Wo(fs, e);
2207
+ function ks(e) {
2208
+ return /* @__PURE__ */ Ao(bs, e);
2290
2209
  }
2291
- const ms = /* @__PURE__ */ c("ZodISOTime", (e, t) => {
2292
- Lr.init(e, t), w.init(e, t);
2210
+ const $s = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2211
+ Nr.init(e, t), y.init(e, t);
2293
2212
  });
2294
- function gs(e) {
2295
- return Ko(ms, e);
2213
+ function js(e) {
2214
+ return /* @__PURE__ */ Ro($s, e);
2296
2215
  }
2297
- const vs = /* @__PURE__ */ c("ZodISODuration", (e, t) => {
2298
- Br.init(e, t), w.init(e, t);
2216
+ const xs = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2217
+ Ir.init(e, t), y.init(e, t);
2299
2218
  });
2300
- function _s(e) {
2301
- return Ho(vs, e);
2219
+ function Zs(e) {
2220
+ return /* @__PURE__ */ Do(xs, e);
2302
2221
  }
2303
- const ys = (e, t) => {
2304
- ct.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2222
+ const Os = (e, t) => {
2223
+ tt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2305
2224
  format: {
2306
- value: (n) => Rn(e, n)
2225
+ value: (n) => On(e, n)
2307
2226
  // enumerable: false,
2308
2227
  },
2309
2228
  flatten: {
2310
- value: (n) => Nn(e, n)
2229
+ value: (n) => Zn(e, n)
2311
2230
  // enumerable: false,
2312
2231
  },
2313
2232
  addIssue: {
2314
2233
  value: (n) => {
2315
- e.issues.push(n), e.message = JSON.stringify(e.issues, ue, 2);
2234
+ e.issues.push(n), e.message = JSON.stringify(e.issues, ie, 2);
2316
2235
  }
2317
2236
  // enumerable: false,
2318
2237
  },
2319
2238
  addIssues: {
2320
2239
  value: (n) => {
2321
- e.issues.push(...n), e.message = JSON.stringify(e.issues, ue, 2);
2240
+ e.issues.push(...n), e.message = JSON.stringify(e.issues, ie, 2);
2322
2241
  }
2323
2242
  // enumerable: false,
2324
2243
  },
@@ -2329,312 +2248,328 @@ const ys = (e, t) => {
2329
2248
  // enumerable: false,
2330
2249
  }
2331
2250
  });
2332
- }, O = c("ZodError", ys, {
2251
+ }, Z = u("ZodError", Os, {
2333
2252
  Parent: Error
2334
- }), ws = /* @__PURE__ */ ge(O), bs = /* @__PURE__ */ ve(O), zs = /* @__PURE__ */ ie(O), ks = /* @__PURE__ */ ae(O), xs = /* @__PURE__ */ qn(O), Zs = /* @__PURE__ */ Mn(O), $s = /* @__PURE__ */ Qn(O), js = /* @__PURE__ */ Ln(O), Ps = /* @__PURE__ */ Bn(O), Os = /* @__PURE__ */ Wn(O), Es = /* @__PURE__ */ Kn(O), As = /* @__PURE__ */ Hn(O), z = /* @__PURE__ */ c("ZodType", (e, t) => (b.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(q(t, {
2253
+ }), Ss = /* @__PURE__ */ pe(Z), Ps = /* @__PURE__ */ he(Z), Ts = /* @__PURE__ */ re(Z), Es = /* @__PURE__ */ oe(Z), Ns = /* @__PURE__ */ Tn(Z), Is = /* @__PURE__ */ En(Z), As = /* @__PURE__ */ Nn(Z), Rs = /* @__PURE__ */ In(Z), Ds = /* @__PURE__ */ An(Z), Cs = /* @__PURE__ */ Rn(Z), Us = /* @__PURE__ */ Dn(Z), Fs = /* @__PURE__ */ Cn(Z), z = /* @__PURE__ */ u("ZodType", (e, t) => (w.init(e, t), Object.assign(e["~standard"], {
2254
+ jsonSchema: {
2255
+ input: ee(e, "input"),
2256
+ output: ee(e, "output")
2257
+ }
2258
+ }), e.toJSONSchema = ts(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(I(t, {
2335
2259
  checks: [
2336
2260
  ...t.checks ?? [],
2337
2261
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2338
2262
  ]
2339
- })), e.clone = (n, r) => N(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => ws(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => zs(e, n, r), e.parseAsync = async (n, r) => bs(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => ks(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => xs(e, n, r), e.decode = (n, r) => Zs(e, n, r), e.encodeAsync = async (n, r) => $s(e, n, r), e.decodeAsync = async (n, r) => js(e, n, r), e.safeEncode = (n, r) => Ps(e, n, r), e.safeDecode = (n, r) => Os(e, n, r), e.safeEncodeAsync = async (n, r) => Es(e, n, r), e.safeDecodeAsync = async (n, r) => As(e, n, r), e.refine = (n, r) => e.check(bi(n, r)), e.superRefine = (n) => e.check(zi(n)), e.overwrite = (n) => e.check(K(n)), e.optional = () => Le(e), e.nullable = () => Be(e), e.nullish = () => Le(Be(e)), e.nonoptional = (n) => pi(e, n), e.array = () => ei(e), e.or = (n) => oi([e, n]), e.and = (n) => ii(e, n), e.transform = (n) => We(e, ci(n)), e.default = (n) => di(e, n), e.prefault = (n) => fi(e, n), e.catch = (n) => gi(e, n), e.pipe = (n) => We(e, n), e.readonly = () => yi(e), e.describe = (n) => {
2263
+ }), {
2264
+ parent: !0
2265
+ }), e.with = e.check, e.clone = (n, r) => A(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Ss(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Ts(e, n, r), e.parseAsync = async (n, r) => Ps(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Es(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Ns(e, n, r), e.decode = (n, r) => Is(e, n, r), e.encodeAsync = async (n, r) => As(e, n, r), e.decodeAsync = async (n, r) => Rs(e, n, r), e.safeEncode = (n, r) => Ds(e, n, r), e.safeDecode = (n, r) => Cs(e, n, r), e.safeEncodeAsync = async (n, r) => Us(e, n, r), e.safeDecodeAsync = async (n, r) => Fs(e, n, r), e.refine = (n, r) => e.check(Ei(n, r)), e.superRefine = (n) => e.check(Ni(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ J(n)), e.optional = () => Ne(e), e.exactOptional = () => yi(e), e.nullable = () => Ie(e), e.nullish = () => Ne(Ie(e)), e.nonoptional = (n) => ji(e, n), e.array = () => ui(e), e.or = (n) => pi([e, n]), e.and = (n) => mi(e, n), e.transform = (n) => Ae(e, _i(n)), e.default = (n) => bi(e, n), e.prefault = (n) => $i(e, n), e.catch = (n) => Zi(e, n), e.pipe = (n) => Ae(e, n), e.readonly = () => Pi(e), e.describe = (n) => {
2340
2266
  const r = e.clone();
2341
- return Y.add(r, { description: n }), r;
2267
+ return L.add(r, { description: n }), r;
2342
2268
  }, Object.defineProperty(e, "description", {
2343
2269
  get() {
2344
- return Y.get(e)?.description;
2270
+ return L.get(e)?.description;
2345
2271
  },
2346
2272
  configurable: !0
2347
2273
  }), e.meta = (...n) => {
2348
2274
  if (n.length === 0)
2349
- return Y.get(e);
2275
+ return L.get(e);
2350
2276
  const r = e.clone();
2351
- return Y.add(r, n[0]), r;
2352
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), _t = /* @__PURE__ */ c("_ZodString", (e, t) => {
2353
- _e.init(e, t), z.init(e, t);
2277
+ return L.add(r, n[0]), r;
2278
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), gt = /* @__PURE__ */ u("_ZodString", (e, t) => {
2279
+ me.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, i) => rs(e, r, o);
2354
2280
  const n = e._zod.bag;
2355
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(Go(...r)), e.includes = (...r) => e.check(es(...r)), e.startsWith = (...r) => e.check(ts(...r)), e.endsWith = (...r) => e.check(ns(...r)), e.min = (...r) => e.check(ne(...r)), e.max = (...r) => e.check(gt(...r)), e.length = (...r) => e.check(vt(...r)), e.nonempty = (...r) => e.check(ne(1, ...r)), e.lowercase = (r) => e.check(Yo(r)), e.uppercase = (r) => e.check(Xo(r)), e.trim = () => e.check(os()), e.normalize = (...r) => e.check(rs(...r)), e.toLowerCase = () => e.check(ss()), e.toUpperCase = () => e.check(is());
2356
- }), Ts = /* @__PURE__ */ c("ZodString", (e, t) => {
2357
- _e.init(e, t), _t.init(e, t), e.email = (n) => e.check(xo(Ss, n)), e.url = (n) => e.check(Oo(Is, n)), e.jwt = (n) => e.check(Lo(Vs, n)), e.emoji = (n) => e.check(Eo(Ds, n)), e.guid = (n) => e.check(Ue(Me, n)), e.uuid = (n) => e.check(Zo(X, n)), e.uuidv4 = (n) => e.check($o(X, n)), e.uuidv6 = (n) => e.check(jo(X, n)), e.uuidv7 = (n) => e.check(Po(X, n)), e.nanoid = (n) => e.check(Ao(Cs, n)), e.guid = (n) => e.check(Ue(Me, n)), e.cuid = (n) => e.check(To(Ns, n)), e.cuid2 = (n) => e.check(So(Rs, n)), e.ulid = (n) => e.check(Io(Fs, n)), e.base64 = (n) => e.check(qo(Ws, n)), e.base64url = (n) => e.check(Mo(Ks, n)), e.xid = (n) => e.check(Do(Us, n)), e.ksuid = (n) => e.check(Co(qs, n)), e.ipv4 = (n) => e.check(No(Ms, n)), e.ipv6 = (n) => e.check(Ro(Qs, n)), e.cidrv4 = (n) => e.check(Fo(Ls, n)), e.cidrv6 = (n) => e.check(Uo(Bs, n)), e.e164 = (n) => e.check(Qo(Hs, n)), e.datetime = (n) => e.check(hs(n)), e.date = (n) => e.check(ps(n)), e.time = (n) => e.check(gs(n)), e.duration = (n) => e.check(_s(n));
2281
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Fo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Mo(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Bo(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Vo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ X(...r)), e.max = (...r) => e.check(/* @__PURE__ */ lt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ dt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ X(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Jo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Lo(r)), e.trim = () => e.check(/* @__PURE__ */ Wo()), e.normalize = (...r) => e.check(/* @__PURE__ */ qo(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Ko()), e.toUpperCase = () => e.check(/* @__PURE__ */ Ho()), e.slugify = () => e.check(/* @__PURE__ */ Go());
2282
+ }), Js = /* @__PURE__ */ u("ZodString", (e, t) => {
2283
+ me.init(e, t), gt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ po(Ls, n)), e.url = (n) => e.check(/* @__PURE__ */ vo(Ms, n)), e.jwt = (n) => e.check(/* @__PURE__ */ No(oi, n)), e.emoji = (n) => e.check(/* @__PURE__ */ yo(Bs, n)), e.guid = (n) => e.check(/* @__PURE__ */ Se(Te, n)), e.uuid = (n) => e.check(/* @__PURE__ */ ho(G, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ mo(G, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ go(G, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ _o(G, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ wo(Vs, n)), e.guid = (n) => e.check(/* @__PURE__ */ Se(Te, n)), e.cuid = (n) => e.check(/* @__PURE__ */ zo(qs, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ bo(Ws, n)), e.ulid = (n) => e.check(/* @__PURE__ */ ko(Ks, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Po(ti, n)), e.base64url = (n) => e.check(/* @__PURE__ */ To(ni, n)), e.xid = (n) => e.check(/* @__PURE__ */ $o(Hs, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ jo(Gs, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ xo(Ys, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Zo(Qs, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Oo(Xs, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ So(ei, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Eo(ri, n)), e.datetime = (n) => e.check(zs(n)), e.date = (n) => e.check(ks(n)), e.time = (n) => e.check(js(n)), e.duration = (n) => e.check(Zs(n));
2358
2284
  });
2359
- function qe(e) {
2360
- return ko(Ts, e);
2361
- }
2362
- const w = /* @__PURE__ */ c("ZodStringFormat", (e, t) => {
2363
- y.init(e, t), _t.init(e, t);
2364
- }), Ss = /* @__PURE__ */ c("ZodEmail", (e, t) => {
2365
- Sr.init(e, t), w.init(e, t);
2366
- }), Me = /* @__PURE__ */ c("ZodGUID", (e, t) => {
2367
- Ar.init(e, t), w.init(e, t);
2368
- }), X = /* @__PURE__ */ c("ZodUUID", (e, t) => {
2369
- Tr.init(e, t), w.init(e, t);
2370
- }), Is = /* @__PURE__ */ c("ZodURL", (e, t) => {
2371
- Ir.init(e, t), w.init(e, t);
2372
- }), Ds = /* @__PURE__ */ c("ZodEmoji", (e, t) => {
2373
- Dr.init(e, t), w.init(e, t);
2374
- }), Cs = /* @__PURE__ */ c("ZodNanoID", (e, t) => {
2375
- Cr.init(e, t), w.init(e, t);
2376
- }), Ns = /* @__PURE__ */ c("ZodCUID", (e, t) => {
2377
- Nr.init(e, t), w.init(e, t);
2378
- }), Rs = /* @__PURE__ */ c("ZodCUID2", (e, t) => {
2379
- Rr.init(e, t), w.init(e, t);
2380
- }), Fs = /* @__PURE__ */ c("ZodULID", (e, t) => {
2381
- Fr.init(e, t), w.init(e, t);
2382
- }), Us = /* @__PURE__ */ c("ZodXID", (e, t) => {
2383
- Ur.init(e, t), w.init(e, t);
2384
- }), qs = /* @__PURE__ */ c("ZodKSUID", (e, t) => {
2385
- qr.init(e, t), w.init(e, t);
2386
- }), Ms = /* @__PURE__ */ c("ZodIPv4", (e, t) => {
2387
- Wr.init(e, t), w.init(e, t);
2388
- }), Qs = /* @__PURE__ */ c("ZodIPv6", (e, t) => {
2389
- Kr.init(e, t), w.init(e, t);
2390
- }), Ls = /* @__PURE__ */ c("ZodCIDRv4", (e, t) => {
2391
- Hr.init(e, t), w.init(e, t);
2392
- }), Bs = /* @__PURE__ */ c("ZodCIDRv6", (e, t) => {
2393
- Vr.init(e, t), w.init(e, t);
2394
- }), Ws = /* @__PURE__ */ c("ZodBase64", (e, t) => {
2395
- Jr.init(e, t), w.init(e, t);
2396
- }), Ks = /* @__PURE__ */ c("ZodBase64URL", (e, t) => {
2397
- Yr.init(e, t), w.init(e, t);
2398
- }), Hs = /* @__PURE__ */ c("ZodE164", (e, t) => {
2399
- Xr.init(e, t), w.init(e, t);
2400
- }), Vs = /* @__PURE__ */ c("ZodJWT", (e, t) => {
2401
- to.init(e, t), w.init(e, t);
2402
- }), Js = /* @__PURE__ */ c("ZodUnknown", (e, t) => {
2403
- no.init(e, t), z.init(e, t);
2285
+ function Pe(e) {
2286
+ return /* @__PURE__ */ fo(Js, e);
2287
+ }
2288
+ const y = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
2289
+ v.init(e, t), gt.init(e, t);
2290
+ }), Ls = /* @__PURE__ */ u("ZodEmail", (e, t) => {
2291
+ br.init(e, t), y.init(e, t);
2292
+ }), Te = /* @__PURE__ */ u("ZodGUID", (e, t) => {
2293
+ wr.init(e, t), y.init(e, t);
2294
+ }), G = /* @__PURE__ */ u("ZodUUID", (e, t) => {
2295
+ zr.init(e, t), y.init(e, t);
2296
+ }), Ms = /* @__PURE__ */ u("ZodURL", (e, t) => {
2297
+ kr.init(e, t), y.init(e, t);
2298
+ }), Bs = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
2299
+ $r.init(e, t), y.init(e, t);
2300
+ }), Vs = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
2301
+ jr.init(e, t), y.init(e, t);
2302
+ }), qs = /* @__PURE__ */ u("ZodCUID", (e, t) => {
2303
+ xr.init(e, t), y.init(e, t);
2304
+ }), Ws = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2305
+ Zr.init(e, t), y.init(e, t);
2306
+ }), Ks = /* @__PURE__ */ u("ZodULID", (e, t) => {
2307
+ Or.init(e, t), y.init(e, t);
2308
+ }), Hs = /* @__PURE__ */ u("ZodXID", (e, t) => {
2309
+ Sr.init(e, t), y.init(e, t);
2310
+ }), Gs = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2311
+ Pr.init(e, t), y.init(e, t);
2312
+ }), Ys = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
2313
+ Ar.init(e, t), y.init(e, t);
2314
+ }), Qs = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
2315
+ Rr.init(e, t), y.init(e, t);
2316
+ }), Xs = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
2317
+ Dr.init(e, t), y.init(e, t);
2318
+ }), ei = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
2319
+ Cr.init(e, t), y.init(e, t);
2320
+ }), ti = /* @__PURE__ */ u("ZodBase64", (e, t) => {
2321
+ Ur.init(e, t), y.init(e, t);
2322
+ }), ni = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
2323
+ Jr.init(e, t), y.init(e, t);
2324
+ }), ri = /* @__PURE__ */ u("ZodE164", (e, t) => {
2325
+ Lr.init(e, t), y.init(e, t);
2326
+ }), oi = /* @__PURE__ */ u("ZodJWT", (e, t) => {
2327
+ Br.init(e, t), y.init(e, t);
2328
+ }), si = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
2329
+ Vr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ss();
2404
2330
  });
2405
- function Qe() {
2406
- return Vo(Js);
2331
+ function Ee() {
2332
+ return /* @__PURE__ */ Co(si);
2407
2333
  }
2408
- const Gs = /* @__PURE__ */ c("ZodNever", (e, t) => {
2409
- ro.init(e, t), z.init(e, t);
2334
+ const ii = /* @__PURE__ */ u("ZodNever", (e, t) => {
2335
+ qr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => os(e, n, r);
2410
2336
  });
2411
- function Ys(e) {
2412
- return Jo(Gs, e);
2337
+ function ai(e) {
2338
+ return /* @__PURE__ */ Uo(ii, e);
2413
2339
  }
2414
- const Xs = /* @__PURE__ */ c("ZodArray", (e, t) => {
2415
- oo.init(e, t), z.init(e, t), e.element = t.element, e.min = (n, r) => e.check(ne(n, r)), e.nonempty = (n) => e.check(ne(1, n)), e.max = (n, r) => e.check(gt(n, r)), e.length = (n, r) => e.check(vt(n, r)), e.unwrap = () => e.element;
2340
+ const ci = /* @__PURE__ */ u("ZodArray", (e, t) => {
2341
+ Wr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => us(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ X(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ X(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ lt(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ dt(n, r)), e.unwrap = () => e.element;
2416
2342
  });
2417
- function ei(e, t) {
2418
- return as(Xs, e, t);
2343
+ function ui(e, t) {
2344
+ return /* @__PURE__ */ Yo(ci, e, t);
2419
2345
  }
2420
- const ti = /* @__PURE__ */ c("ZodObject", (e, t) => {
2421
- io.init(e, t), z.init(e, t), _(e, "shape", () => t.shape), e.keyof = () => yt(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Qe() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Qe() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ys() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Tn(e, n), e.safeExtend = (n) => Sn(e, n), e.merge = (n) => In(e, n), e.pick = (n) => En(e, n), e.omit = (n) => An(e, n), e.partial = (...n) => Dn(wt, e, n[0]), e.required = (...n) => Cn(bt, e, n[0]);
2346
+ const li = /* @__PURE__ */ u("ZodObject", (e, t) => {
2347
+ Hr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ls(e, n, r, o), _(e, "shape", () => t.shape), e.keyof = () => _t(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ee() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ee() }), e.strict = () => e.clone({ ...e._zod.def, catchall: ai() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => bn(e, n), e.safeExtend = (n) => kn(e, n), e.merge = (n) => $n(e, n), e.pick = (n) => wn(e, n), e.omit = (n) => zn(e, n), e.partial = (...n) => jn(vt, e, n[0]), e.required = (...n) => xn(yt, e, n[0]);
2422
2348
  });
2423
- function ni(e, t) {
2349
+ function di(e, t) {
2424
2350
  const n = {
2425
2351
  type: "object",
2426
2352
  shape: e ?? {},
2427
- ...h(t)
2353
+ ...p(t)
2428
2354
  };
2429
- return new ti(n);
2355
+ return new li(n);
2430
2356
  }
2431
- const ri = /* @__PURE__ */ c("ZodUnion", (e, t) => {
2432
- ao.init(e, t), z.init(e, t), e.options = t.options;
2357
+ const fi = /* @__PURE__ */ u("ZodUnion", (e, t) => {
2358
+ Gr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ds(e, n, r, o), e.options = t.options;
2433
2359
  });
2434
- function oi(e, t) {
2435
- return new ri({
2360
+ function pi(e, t) {
2361
+ return new fi({
2436
2362
  type: "union",
2437
2363
  options: e,
2438
- ...h(t)
2364
+ ...p(t)
2439
2365
  });
2440
2366
  }
2441
- const si = /* @__PURE__ */ c("ZodIntersection", (e, t) => {
2442
- co.init(e, t), z.init(e, t);
2367
+ const hi = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
2368
+ Yr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => fs(e, n, r, o);
2443
2369
  });
2444
- function ii(e, t) {
2445
- return new si({
2370
+ function mi(e, t) {
2371
+ return new hi({
2446
2372
  type: "intersection",
2447
2373
  left: e,
2448
2374
  right: t
2449
2375
  });
2450
2376
  }
2451
- const de = /* @__PURE__ */ c("ZodEnum", (e, t) => {
2452
- uo.init(e, t), z.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
2377
+ const ce = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2378
+ Qr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (r, o, i) => is(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
2453
2379
  const n = new Set(Object.keys(t.entries));
2454
2380
  e.extract = (r, o) => {
2455
- const s = {};
2456
- for (const i of r)
2457
- if (n.has(i))
2458
- s[i] = t.entries[i];
2381
+ const i = {};
2382
+ for (const s of r)
2383
+ if (n.has(s))
2384
+ i[s] = t.entries[s];
2459
2385
  else
2460
- throw new Error(`Key ${i} not found in enum`);
2461
- return new de({
2386
+ throw new Error(`Key ${s} not found in enum`);
2387
+ return new ce({
2462
2388
  ...t,
2463
2389
  checks: [],
2464
- ...h(o),
2465
- entries: s
2390
+ ...p(o),
2391
+ entries: i
2466
2392
  });
2467
2393
  }, e.exclude = (r, o) => {
2468
- const s = { ...t.entries };
2469
- for (const i of r)
2470
- if (n.has(i))
2471
- delete s[i];
2394
+ const i = { ...t.entries };
2395
+ for (const s of r)
2396
+ if (n.has(s))
2397
+ delete i[s];
2472
2398
  else
2473
- throw new Error(`Key ${i} not found in enum`);
2474
- return new de({
2399
+ throw new Error(`Key ${s} not found in enum`);
2400
+ return new ce({
2475
2401
  ...t,
2476
2402
  checks: [],
2477
- ...h(o),
2478
- entries: s
2403
+ ...p(o),
2404
+ entries: i
2479
2405
  });
2480
2406
  };
2481
2407
  });
2482
- function yt(e, t) {
2408
+ function _t(e, t) {
2483
2409
  const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2484
- return new de({
2410
+ return new ce({
2485
2411
  type: "enum",
2486
2412
  entries: n,
2487
- ...h(t)
2413
+ ...p(t)
2488
2414
  });
2489
2415
  }
2490
- const ai = /* @__PURE__ */ c("ZodTransform", (e, t) => {
2491
- lo.init(e, t), z.init(e, t), e._zod.parse = (n, r) => {
2416
+ const gi = /* @__PURE__ */ u("ZodTransform", (e, t) => {
2417
+ Xr.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => cs(e, n), e._zod.parse = (n, r) => {
2492
2418
  if (r.direction === "backward")
2493
- throw new nt(e.constructor.name);
2494
- n.addIssue = (s) => {
2495
- if (typeof s == "string")
2496
- n.issues.push(W(s, n.value, t));
2419
+ throw new Ke(e.constructor.name);
2420
+ n.addIssue = (i) => {
2421
+ if (typeof i == "string")
2422
+ n.issues.push(B(i, n.value, t));
2497
2423
  else {
2498
- const i = s;
2499
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(W(i));
2424
+ const s = i;
2425
+ s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(B(s));
2500
2426
  }
2501
2427
  };
2502
2428
  const o = t.transform(n.value, n);
2503
- return o instanceof Promise ? o.then((s) => (n.value = s, n)) : (n.value = o, n);
2429
+ return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
2504
2430
  };
2505
2431
  });
2506
- function ci(e) {
2507
- return new ai({
2432
+ function _i(e) {
2433
+ return new gi({
2508
2434
  type: "transform",
2509
2435
  transform: e
2510
2436
  });
2511
2437
  }
2512
- const wt = /* @__PURE__ */ c("ZodOptional", (e, t) => {
2513
- ho.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2438
+ const vt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
2439
+ ut.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => mt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2514
2440
  });
2515
- function Le(e) {
2516
- return new wt({
2441
+ function Ne(e) {
2442
+ return new vt({
2517
2443
  type: "optional",
2518
2444
  innerType: e
2519
2445
  });
2520
2446
  }
2521
- const ui = /* @__PURE__ */ c("ZodNullable", (e, t) => {
2522
- fo.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2447
+ const vi = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2448
+ eo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => mt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2523
2449
  });
2524
- function Be(e) {
2525
- return new ui({
2450
+ function yi(e) {
2451
+ return new vi({
2452
+ type: "optional",
2453
+ innerType: e
2454
+ });
2455
+ }
2456
+ const wi = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2457
+ to.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ps(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2458
+ });
2459
+ function Ie(e) {
2460
+ return new wi({
2526
2461
  type: "nullable",
2527
2462
  innerType: e
2528
2463
  });
2529
2464
  }
2530
- const li = /* @__PURE__ */ c("ZodDefault", (e, t) => {
2531
- po.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2465
+ const zi = /* @__PURE__ */ u("ZodDefault", (e, t) => {
2466
+ no.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ms(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2532
2467
  });
2533
- function di(e, t) {
2534
- return new li({
2468
+ function bi(e, t) {
2469
+ return new zi({
2535
2470
  type: "default",
2536
2471
  innerType: e,
2537
2472
  get defaultValue() {
2538
- return typeof t == "function" ? t() : st(t);
2473
+ return typeof t == "function" ? t() : Qe(t);
2539
2474
  }
2540
2475
  });
2541
2476
  }
2542
- const hi = /* @__PURE__ */ c("ZodPrefault", (e, t) => {
2543
- mo.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2477
+ const ki = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
2478
+ ro.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => gs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2544
2479
  });
2545
- function fi(e, t) {
2546
- return new hi({
2480
+ function $i(e, t) {
2481
+ return new ki({
2547
2482
  type: "prefault",
2548
2483
  innerType: e,
2549
2484
  get defaultValue() {
2550
- return typeof t == "function" ? t() : st(t);
2485
+ return typeof t == "function" ? t() : Qe(t);
2551
2486
  }
2552
2487
  });
2553
2488
  }
2554
- const bt = /* @__PURE__ */ c("ZodNonOptional", (e, t) => {
2555
- go.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2489
+ const yt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
2490
+ oo.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => hs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2556
2491
  });
2557
- function pi(e, t) {
2558
- return new bt({
2492
+ function ji(e, t) {
2493
+ return new yt({
2559
2494
  type: "nonoptional",
2560
2495
  innerType: e,
2561
- ...h(t)
2496
+ ...p(t)
2562
2497
  });
2563
2498
  }
2564
- const mi = /* @__PURE__ */ c("ZodCatch", (e, t) => {
2565
- vo.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2499
+ const xi = /* @__PURE__ */ u("ZodCatch", (e, t) => {
2500
+ so.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => _s(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2566
2501
  });
2567
- function gi(e, t) {
2568
- return new mi({
2502
+ function Zi(e, t) {
2503
+ return new xi({
2569
2504
  type: "catch",
2570
2505
  innerType: e,
2571
2506
  catchValue: typeof t == "function" ? t : () => t
2572
2507
  });
2573
2508
  }
2574
- const vi = /* @__PURE__ */ c("ZodPipe", (e, t) => {
2575
- _o.init(e, t), z.init(e, t), e.in = t.in, e.out = t.out;
2509
+ const Oi = /* @__PURE__ */ u("ZodPipe", (e, t) => {
2510
+ io.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => vs(e, n, r, o), e.in = t.in, e.out = t.out;
2576
2511
  });
2577
- function We(e, t) {
2578
- return new vi({
2512
+ function Ae(e, t) {
2513
+ return new Oi({
2579
2514
  type: "pipe",
2580
2515
  in: e,
2581
2516
  out: t
2582
2517
  // ...util.normalizeParams(params),
2583
2518
  });
2584
2519
  }
2585
- const _i = /* @__PURE__ */ c("ZodReadonly", (e, t) => {
2586
- yo.init(e, t), z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2520
+ const Si = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
2521
+ ao.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => ys(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2587
2522
  });
2588
- function yi(e) {
2589
- return new _i({
2523
+ function Pi(e) {
2524
+ return new Si({
2590
2525
  type: "readonly",
2591
2526
  innerType: e
2592
2527
  });
2593
2528
  }
2594
- const wi = /* @__PURE__ */ c("ZodCustom", (e, t) => {
2595
- wo.init(e, t), z.init(e, t);
2529
+ const Ti = /* @__PURE__ */ u("ZodCustom", (e, t) => {
2530
+ co.init(e, t), z.init(e, t), e._zod.processJSONSchema = (n, r, o) => as(e, n);
2596
2531
  });
2597
- function bi(e, t = {}) {
2598
- return cs(wi, e, t);
2532
+ function Ei(e, t = {}) {
2533
+ return /* @__PURE__ */ Qo(Ti, e, t);
2599
2534
  }
2600
- function zi(e) {
2601
- return us(e);
2535
+ function Ni(e) {
2536
+ return /* @__PURE__ */ Xo(e);
2602
2537
  }
2603
- const ki = ni({
2604
- buildId: qe(),
2605
- timestamp: qe(),
2606
- status: yt(["in-progress", "success", "failed"])
2607
- }), xi = ({
2538
+ const Ii = di({
2539
+ buildId: Pe(),
2540
+ timestamp: Pe(),
2541
+ status: _t(["in-progress", "success", "failed"])
2542
+ }), Ai = ({
2608
2543
  buildId: e,
2609
2544
  environmentType: t,
2610
2545
  endpoint: n = "/__zuplo/docs"
2611
2546
  }) => {
2612
- const r = It({
2547
+ const r = Pt({
2613
2548
  queryKey: ["zuplo-build-check", e, n],
2614
2549
  refetchInterval: 3e3,
2615
2550
  enabled: e !== void 0 && t === "WORKING_COPY",
2616
2551
  retry: !1,
2617
- queryFn: () => fetch(n, { signal: AbortSignal.timeout(2e3) }).then((s) => {
2618
- if (!s.ok) throw new Error("Failed to fetch build status");
2619
- return s.json();
2620
- }).then((s) => ki.parse(s))
2552
+ queryFn: () => fetch(n, { signal: AbortSignal.timeout(2e3) }).then((i) => {
2553
+ if (!i.ok) throw new Error("Failed to fetch build status");
2554
+ return i.json();
2555
+ }).then((i) => Ii.parse(i))
2621
2556
  });
2622
- if (oe(() => {
2557
+ if (te(() => {
2623
2558
  r.data?.status === "success" && r.data.buildId && (document.cookie = `zuplo-build=${r.data.buildId}; path=/; max-age=300; secure; SameSite=None`);
2624
2559
  }, [r.data]), r.isError || !r.data || r.data.buildId === e)
2625
2560
  return null;
2626
2561
  const o = r.data.status === "success";
2627
- 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: [
2628
- o ? /* @__PURE__ */ a.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2629
- /* @__PURE__ */ a.jsx(Jt, { size: 16 }),
2630
- /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "New version available" })
2631
- ] }) : /* @__PURE__ */ a.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2632
- /* @__PURE__ */ a.jsx(Gt, { size: 16, className: "animate-spin" }),
2633
- /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Building new version..." })
2562
+ return /* @__PURE__ */ c.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: [
2563
+ o ? /* @__PURE__ */ c.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2564
+ /* @__PURE__ */ c.jsx(Bt, { size: 16 }),
2565
+ /* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "New version available" })
2566
+ ] }) : /* @__PURE__ */ c.jsxs("div", { className: "flex flex-row items-center gap-2", children: [
2567
+ /* @__PURE__ */ c.jsx(Vt, { size: 16, className: "animate-spin" }),
2568
+ /* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "Building new version..." })
2634
2569
  ] }),
2635
- /* @__PURE__ */ a.jsx("span", { className: "text-xs", children: o ? "To see the new version, reload the page now." : "A new version of the developer portal will be available soon." }),
2636
- o && /* @__PURE__ */ a.jsx(
2637
- en,
2570
+ /* @__PURE__ */ c.jsx("span", { className: "text-xs", children: o ? "To see the new version, reload the page now." : "A new version of the developer portal will be available soon." }),
2571
+ o && /* @__PURE__ */ c.jsx(
2572
+ Ht,
2638
2573
  {
2639
2574
  variant: "outline",
2640
2575
  size: "sm",
@@ -2646,52 +2581,52 @@ const ki = ni({
2646
2581
  }
2647
2582
  )
2648
2583
  ] });
2649
- }, Zi = () => {
2650
- const e = et(), t = Xe(e.pathname);
2651
- oe(() => {
2584
+ }, Ri = () => {
2585
+ const e = Le(), t = Je(e.pathname);
2586
+ te(() => {
2652
2587
  const n = t.current !== e.pathname, r = e.hash !== "";
2653
2588
  n && !r && window.scrollTo(0, 0), t.current = e.pathname;
2654
2589
  }, [e.pathname, e.hash]);
2655
- }, $i = ({
2590
+ }, Di = ({
2656
2591
  icon: e
2657
- }) => typeof e == "string" ? /* @__PURE__ */ a.jsx(
2592
+ }) => typeof e == "string" ? /* @__PURE__ */ c.jsx(
2658
2593
  "img",
2659
2594
  {
2660
2595
  src: `https://cdn.simpleicons.org/${e}/000000/ffffff`,
2661
2596
  className: "size-5",
2662
2597
  alt: e
2663
2598
  }
2664
- ) : e, ji = (e) => /^https?:/.test(e), Pi = () => {
2665
- const { site: e } = Wt(), t = e?.footer;
2666
- 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: [
2667
- /* @__PURE__ */ a.jsxs(
2599
+ ) : e, Ci = (e) => /^https?:/.test(e), Ui = () => {
2600
+ const { site: e } = q(), t = e?.footer;
2601
+ return t ? /* @__PURE__ */ c.jsx("footer", { className: "border-t bg-background", children: /* @__PURE__ */ c.jsxs("div", { className: "mx-auto max-w-screen-2xl px-4 lg:px-8 py-8 pt-20", children: [
2602
+ /* @__PURE__ */ c.jsxs(
2668
2603
  "div",
2669
2604
  {
2670
- className: E("flex flex-row gap-8", {
2605
+ className: S("flex flex-row gap-8", {
2671
2606
  "justify-center": !t.position || t.position === "center",
2672
2607
  "justify-start": t.position === "start",
2673
2608
  "justify-end": t.position === "end"
2674
2609
  }),
2675
2610
  children: [
2676
- /* @__PURE__ */ a.jsx(C.Target, { name: "footer-before" }),
2677
- t.columns && /* @__PURE__ */ a.jsx(
2611
+ /* @__PURE__ */ c.jsx(N.Target, { name: "footer-before" }),
2612
+ t.columns && /* @__PURE__ */ c.jsx(
2678
2613
  "div",
2679
2614
  {
2680
2615
  className: "w-full md:max-w-screen-md grid grid-cols-[1fr_1fr] gap-8 md:grid-cols-[repeat(var(--columns),minmax(0,1fr))]",
2681
2616
  style: { "--columns": t.columns.length },
2682
- children: t.columns.map((n) => /* @__PURE__ */ a.jsxs(
2617
+ children: t.columns.map((n) => /* @__PURE__ */ c.jsxs(
2683
2618
  "div",
2684
2619
  {
2685
- className: E({
2620
+ className: S({
2686
2621
  "justify-self-center": !n.position || n.position === "center",
2687
2622
  "justify-self-start": n.position === "start",
2688
2623
  "justify-self-end": n.position === "end"
2689
2624
  }),
2690
2625
  children: [
2691
- /* @__PURE__ */ a.jsx("span", { className: "text-sm font-semibold", children: n.title }),
2692
- /* @__PURE__ */ a.jsx("ul", { className: "mt-4 space-y-2", children: n.links.map((r) => {
2626
+ /* @__PURE__ */ c.jsx("span", { className: "text-sm font-semibold", children: n.title }),
2627
+ /* @__PURE__ */ c.jsx("ul", { className: "mt-4 space-y-2", children: n.links.map((r) => {
2693
2628
  const o = "flex flex-row gap-1 items-center text-sm text-muted-foreground hover:text-accent-foreground";
2694
- return /* @__PURE__ */ a.jsx("li", { children: ji(r.href) ? /* @__PURE__ */ a.jsxs(
2629
+ return /* @__PURE__ */ c.jsx("li", { children: Ci(r.href) ? /* @__PURE__ */ c.jsxs(
2695
2630
  "a",
2696
2631
  {
2697
2632
  href: r.href,
@@ -2699,11 +2634,11 @@ const ki = ni({
2699
2634
  rel: "noopener noreferrer",
2700
2635
  className: o,
2701
2636
  children: [
2702
- /* @__PURE__ */ a.jsx("span", { children: r.label }),
2703
- /* @__PURE__ */ a.jsx(Yt, { size: 12 })
2637
+ /* @__PURE__ */ c.jsx("span", { children: r.label }),
2638
+ /* @__PURE__ */ c.jsx(qt, { size: 12 })
2704
2639
  ]
2705
2640
  }
2706
- ) : /* @__PURE__ */ a.jsx(tn, { to: r.href, className: o, children: /* @__PURE__ */ a.jsx("span", { children: r.label }) }) }, r.href + r.label);
2641
+ ) : /* @__PURE__ */ c.jsx(Gt, { to: r.href, className: o, children: /* @__PURE__ */ c.jsx("span", { children: r.label }) }) }, r.href + r.label);
2707
2642
  }) })
2708
2643
  ]
2709
2644
  },
@@ -2711,20 +2646,20 @@ const ki = ni({
2711
2646
  ))
2712
2647
  }
2713
2648
  ),
2714
- /* @__PURE__ */ a.jsx(C.Target, { name: "footer-after" })
2649
+ /* @__PURE__ */ c.jsx(N.Target, { name: "footer-after" })
2715
2650
  ]
2716
2651
  }
2717
2652
  ),
2718
- /* @__PURE__ */ a.jsxs(
2653
+ /* @__PURE__ */ c.jsxs(
2719
2654
  "div",
2720
2655
  {
2721
- className: E(
2656
+ className: S(
2722
2657
  "flex items-center justify-between",
2723
2658
  t.columns && "border-t mt-8 pt-8"
2724
2659
  ),
2725
2660
  children: [
2726
- t.logo && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2727
- /* @__PURE__ */ a.jsx(
2661
+ t.logo && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2662
+ /* @__PURE__ */ c.jsx(
2728
2663
  "img",
2729
2664
  {
2730
2665
  src: t.logo.src.light,
@@ -2733,7 +2668,7 @@ const ki = ni({
2733
2668
  style: { width: t.logo.width }
2734
2669
  }
2735
2670
  ),
2736
- /* @__PURE__ */ a.jsx(
2671
+ /* @__PURE__ */ c.jsx(
2737
2672
  "img",
2738
2673
  {
2739
2674
  src: t.logo.src.dark,
@@ -2743,8 +2678,8 @@ const ki = ni({
2743
2678
  }
2744
2679
  )
2745
2680
  ] }),
2746
- t.copyright && /* @__PURE__ */ a.jsx("p", { className: "text-sm text-muted-foreground", children: t.copyright }),
2747
- /* @__PURE__ */ a.jsx("div", { className: "flex items-center gap-2", children: t.social?.map((n) => /* @__PURE__ */ a.jsxs(
2681
+ t.copyright && /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: t.copyright }),
2682
+ /* @__PURE__ */ c.jsx("div", { className: "flex items-center gap-2", children: t.social?.map((n) => /* @__PURE__ */ c.jsxs(
2748
2683
  "a",
2749
2684
  {
2750
2685
  href: n.href,
@@ -2752,7 +2687,7 @@ const ki = ni({
2752
2687
  rel: "noopener noreferrer",
2753
2688
  className: "w-auto gap-2 flex text-muted-foreground hover:text-accent-foreground",
2754
2689
  children: [
2755
- /* @__PURE__ */ a.jsx($i, { icon: n.icon }),
2690
+ /* @__PURE__ */ c.jsx(Di, { icon: n.icon }),
2756
2691
  n.label
2757
2692
  ]
2758
2693
  },
@@ -2762,89 +2697,89 @@ const ki = ni({
2762
2697
  }
2763
2698
  )
2764
2699
  ] }) }) : null;
2765
- }, zt = ({
2700
+ }, wt = ({
2766
2701
  shouldScaleBackground: e = !0,
2767
2702
  ...t
2768
- }) => /* @__PURE__ */ a.jsx(
2769
- A.Root,
2703
+ }) => /* @__PURE__ */ c.jsx(
2704
+ T.Root,
2770
2705
  {
2771
2706
  shouldScaleBackground: e,
2772
2707
  ...t
2773
2708
  }
2774
2709
  );
2775
- zt.displayName = "Drawer";
2776
- const Oi = A.Trigger, Ei = A.Portal, kt = D.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2777
- A.Overlay,
2710
+ wt.displayName = "Drawer";
2711
+ const Fi = T.Trigger, Ji = T.Portal, zt = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
2712
+ T.Overlay,
2778
2713
  {
2779
2714
  ref: n,
2780
- className: E("fixed inset-0 z-50 bg-black/80", e),
2715
+ className: S("fixed inset-0 z-50 bg-black/80", e),
2781
2716
  ...t
2782
2717
  }
2783
2718
  ));
2784
- kt.displayName = A.Overlay.displayName;
2785
- const Ai = D.forwardRef(
2786
- ({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(Ei, { children: [
2787
- /* @__PURE__ */ a.jsx(kt, {}),
2788
- /* @__PURE__ */ a.jsxs(
2789
- A.Content,
2719
+ zt.displayName = T.Overlay.displayName;
2720
+ const Li = V.forwardRef(
2721
+ ({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ c.jsxs(Ji, { children: [
2722
+ /* @__PURE__ */ c.jsx(zt, {}),
2723
+ /* @__PURE__ */ c.jsxs(
2724
+ T.Content,
2790
2725
  {
2791
2726
  ref: o,
2792
- className: E(
2727
+ className: S(
2793
2728
  "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
2794
2729
  e
2795
2730
  ),
2796
2731
  ...r,
2797
2732
  children: [
2798
- !n && /* @__PURE__ */ a.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2733
+ !n && /* @__PURE__ */ c.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2799
2734
  t
2800
2735
  ]
2801
2736
  }
2802
2737
  )
2803
2738
  ] })
2804
2739
  );
2805
- Ai.displayName = "DrawerContent";
2806
- const Ti = D.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2807
- A.Title,
2740
+ Li.displayName = "DrawerContent";
2741
+ const Mi = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
2742
+ T.Title,
2808
2743
  {
2809
2744
  ref: n,
2810
- className: E(
2745
+ className: S(
2811
2746
  "text-lg font-semibold leading-none tracking-tight",
2812
2747
  e
2813
2748
  ),
2814
2749
  ...t
2815
2750
  }
2816
2751
  ));
2817
- Ti.displayName = A.Title.displayName;
2818
- const Si = D.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2819
- A.Description,
2752
+ Mi.displayName = T.Title.displayName;
2753
+ const Bi = V.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
2754
+ T.Description,
2820
2755
  {
2821
2756
  ref: n,
2822
- className: E("text-sm text-muted-foreground", e),
2757
+ className: S("text-sm text-muted-foreground", e),
2823
2758
  ...t
2824
2759
  }
2825
2760
  ));
2826
- Si.displayName = A.Description.displayName;
2827
- const xt = ({
2761
+ Bi.displayName = T.Description.displayName;
2762
+ const bt = ({
2828
2763
  children: e,
2829
2764
  className: t
2830
2765
  }) => {
2831
- const { options: n } = re(), r = Xe(null);
2832
- return oe(() => {
2766
+ const { options: n } = q(), r = Je(null);
2767
+ return te(() => {
2833
2768
  const o = r.current?.querySelector('[aria-current="page"]');
2834
- nn(o ?? null);
2835
- }, []), /* @__PURE__ */ a.jsxs(
2769
+ Yt(o ?? null);
2770
+ }, []), /* @__PURE__ */ c.jsxs(
2836
2771
  "div",
2837
2772
  {
2838
2773
  className: "grid sticky top-(--header-height) lg:h-[calc(100vh-var(--header-height))] grid-rows-[1fr_min-content] border-r",
2839
2774
  "data-pagefind-ignore": "all",
2840
2775
  children: [
2841
- /* @__PURE__ */ a.jsx(
2776
+ /* @__PURE__ */ c.jsx(
2842
2777
  "nav",
2843
2778
  {
2844
2779
  ref: r,
2845
- className: E(
2780
+ className: S(
2846
2781
  "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",
2847
- "-mx-(--padding-nav-item) pb-[8vh] pt-(--padding-content-top) scroll-pt-2 gap-1",
2782
+ "-mx-(--padding-nav-item) pb-[8vh] pt-(--padding-content-top) scroll-pt-2",
2848
2783
  // Revert the padding/margin on the first child
2849
2784
  "-mt-2.5",
2850
2785
  t
@@ -2855,36 +2790,36 @@ const xt = ({
2855
2790
  children: e
2856
2791
  }
2857
2792
  ),
2858
- /* @__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: n.site?.showPoweredBy !== !1 && /* @__PURE__ */ a.jsx(Kt, {}) })
2793
+ /* @__PURE__ */ c.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: n.site?.showPoweredBy !== !1 && /* @__PURE__ */ c.jsx(Qt, {}) })
2859
2794
  ]
2860
2795
  }
2861
2796
  );
2862
2797
  };
2863
- xt.displayName = "NavigationWrapper";
2864
- const Ii = ({
2798
+ bt.displayName = "NavigationWrapper";
2799
+ const Vi = ({
2865
2800
  onRequestClose: e,
2866
2801
  navigation: t
2867
- }) => /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2868
- /* @__PURE__ */ a.jsxs(xt, { children: [
2869
- /* @__PURE__ */ a.jsx(C.Target, { name: "navigation-before" }),
2870
- t.map((n) => /* @__PURE__ */ a.jsx(
2871
- Ze,
2802
+ }) => /* @__PURE__ */ c.jsxs(Xt, { children: [
2803
+ /* @__PURE__ */ c.jsxs(bt, { children: [
2804
+ /* @__PURE__ */ c.jsx(N.Target, { name: "navigation-before" }),
2805
+ t.map((n) => /* @__PURE__ */ c.jsx(
2806
+ ge,
2872
2807
  {
2873
2808
  item: n
2874
2809
  },
2875
2810
  n.type + (n.label ?? "") + ("path" in n ? n.path : "") + ("file" in n ? n.file : "") + ("to" in n ? n.to : "")
2876
2811
  )),
2877
- /* @__PURE__ */ a.jsx(C.Target, { name: "navigation-after" })
2812
+ /* @__PURE__ */ c.jsx(N.Target, { name: "navigation-after" })
2878
2813
  ] }),
2879
- /* @__PURE__ */ a.jsx(
2880
- un,
2814
+ /* @__PURE__ */ c.jsx(
2815
+ an,
2881
2816
  {
2882
- className: "lg:hidden h-[100dvh] start-0 w-[320px] rounded-none",
2817
+ className: "lg:hidden h-dvh start-0 w-[320px] rounded-none",
2883
2818
  "aria-describedby": void 0,
2884
- children: /* @__PURE__ */ a.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
2885
- /* @__PURE__ */ a.jsx(dn, { children: /* @__PURE__ */ a.jsx(ln, { children: "Navigation" }) }),
2886
- t.map((n) => /* @__PURE__ */ a.jsx(
2887
- Ze,
2819
+ children: /* @__PURE__ */ c.jsxs("div", { className: "p-4 overflow-y-auto overscroll-none", children: [
2820
+ /* @__PURE__ */ c.jsx(un, { children: /* @__PURE__ */ c.jsx(cn, { children: "Navigation" }) }),
2821
+ t.map((n) => /* @__PURE__ */ c.jsx(
2822
+ ge,
2888
2823
  {
2889
2824
  item: n,
2890
2825
  onRequestClose: e
@@ -2894,102 +2829,128 @@ const Ii = ({
2894
2829
  ] })
2895
2830
  }
2896
2831
  )
2897
- ] }), Di = ({ children: e }) => {
2898
- const [t, n] = Rt(!1), { navigation: r } = Dt(), o = r.length > 0, s = Mt().state === "loading", { options: i } = re();
2899
- return /* @__PURE__ */ a.jsxs(
2900
- zt,
2832
+ ] }), qi = ({ children: e }) => {
2833
+ const [t, n] = Tt(!1), { navigation: r } = on(), o = r.length > 0, i = Rt().state === "loading", { options: s } = q();
2834
+ return /* @__PURE__ */ c.jsxs(
2835
+ wt,
2901
2836
  {
2902
- direction: i.site?.dir === "rtl" ? "right" : "left",
2837
+ direction: s.site?.dir === "rtl" ? "right" : "left",
2903
2838
  open: t,
2904
- onOpenChange: (u) => n(u),
2839
+ onOpenChange: (a) => n(a),
2905
2840
  children: [
2906
- o && /* @__PURE__ */ a.jsx(
2907
- Ii,
2841
+ o && /* @__PURE__ */ c.jsx(
2842
+ Vi,
2908
2843
  {
2909
2844
  onRequestClose: () => n(!1),
2910
2845
  navigation: r
2911
2846
  }
2912
2847
  ),
2913
- o && /* @__PURE__ */ a.jsx("div", { className: "lg:hidden m-0 p-0 md:-mx-4 md: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(Oi, { className: "flex items-center gap-2 px-4", children: [
2914
- /* @__PURE__ */ a.jsx(Xt, { size: 16, strokeWidth: 1.5 }),
2915
- /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
2848
+ o && /* @__PURE__ */ c.jsx("div", { className: "lg:hidden m-0 p-0 md:-mx-4 md:px-4 py-2 sticky bg-background/80 backdrop-blur-xs z-10 top-0 start-0 end-0 border-b", children: /* @__PURE__ */ c.jsxs(Fi, { className: "flex items-center gap-2 px-4", children: [
2849
+ /* @__PURE__ */ c.jsx(Wt, { size: 16, strokeWidth: 1.5 }),
2850
+ /* @__PURE__ */ c.jsx("span", { className: "text-sm", children: "Menu" })
2916
2851
  ] }) }),
2917
- /* @__PURE__ */ a.jsxs(
2852
+ /* @__PURE__ */ c.jsxs(
2918
2853
  "main",
2919
2854
  {
2920
2855
  "data-pagefind-body": !0,
2921
- className: E(
2856
+ className: S(
2922
2857
  "px-4 lg:pe-8 lg:px-8",
2923
2858
  !o && "col-span-full",
2924
- s && "animate-pulse"
2859
+ i && "animate-pulse"
2925
2860
  ),
2926
2861
  children: [
2927
- /* @__PURE__ */ a.jsx(C.Target, { name: "content-before" }),
2862
+ /* @__PURE__ */ c.jsx(N.Target, { name: "content-before" }),
2928
2863
  e,
2929
- /* @__PURE__ */ a.jsx(C.Target, { name: "content-after" })
2864
+ /* @__PURE__ */ c.jsx(N.Target, { name: "content-after" })
2930
2865
  ]
2931
2866
  }
2932
2867
  )
2933
2868
  ]
2934
2869
  }
2935
2870
  );
2936
- }, Ci = () => /* @__PURE__ */ a.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ a.jsx(hn, {}) }), Ni = ({ children: e }) => {
2937
- const { authentication: t } = re();
2938
- return rn(), Zi(), oe(() => {
2871
+ }, Wi = () => /* @__PURE__ */ c.jsx("main", { className: "col-span-full row-span-full grid place-items-center", children: /* @__PURE__ */ c.jsx(ln, {}) }), Ki = ({ children: e }) => {
2872
+ const { authentication: t } = q();
2873
+ return en(), Ri(), te(() => {
2939
2874
  t?.onPageLoad?.();
2940
- }, [t]), /* @__PURE__ */ a.jsxs(on, { children: [
2941
- /* @__PURE__ */ a.jsx(C.Target, { name: "layout-before-head" }),
2942
- /* @__PURE__ */ a.jsx(Ht, {}),
2943
- /* @__PURE__ */ a.jsx(C.Target, { name: "layout-after-head" }),
2944
- /* @__PURE__ */ a.jsx(
2875
+ }, [t]), /* @__PURE__ */ c.jsxs(tn, { children: [
2876
+ /* @__PURE__ */ c.jsx(N.Target, { name: "layout-before-head" }),
2877
+ /* @__PURE__ */ c.jsx(nn, {}),
2878
+ /* @__PURE__ */ c.jsx(N.Target, { name: "layout-after-head" }),
2879
+ /* @__PURE__ */ c.jsx(
2945
2880
  "div",
2946
2881
  {
2947
- className: E(
2882
+ className: S(
2948
2883
  "grid max-w-screen-2xl w-full lg:mx-auto",
2949
2884
  "[&:has(>:only-child)]:grid-rows-1 grid-rows-[0_min-content_1fr] lg:grid-rows-[min-content_1fr]",
2950
2885
  "grid-cols-1 lg:grid-cols-[var(--side-nav-width)_1fr]"
2951
2886
  ),
2952
- children: /* @__PURE__ */ a.jsx(Ft, { fallback: /* @__PURE__ */ a.jsx(Ci, {}), children: /* @__PURE__ */ a.jsx(Di, { children: e ?? /* @__PURE__ */ a.jsx(Qt, {}) }) })
2887
+ children: /* @__PURE__ */ c.jsx(Et, { fallback: /* @__PURE__ */ c.jsx(Wi, {}), children: /* @__PURE__ */ c.jsx(qi, { children: e ?? /* @__PURE__ */ c.jsx(Dt, {}) }) })
2953
2888
  }
2954
2889
  ),
2955
- /* @__PURE__ */ a.jsx(Pi, {})
2890
+ /* @__PURE__ */ c.jsx(Ui, {})
2956
2891
  ] });
2957
- }, Ri = ({ children: e }) => {
2958
- const { meta: t, options: n } = re(), r = et();
2959
- return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2960
- /* @__PURE__ */ a.jsxs(He, { titleTemplate: t?.title, defaultTitle: t?.defaultTitle, children: [
2961
- n.canonicalUrlOrigin && /* @__PURE__ */ a.jsx(
2892
+ }, Hi = ({ children: e }) => {
2893
+ const { meta: t, options: n } = q(), r = Le();
2894
+ return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2895
+ /* @__PURE__ */ c.jsxs(Ce, { titleTemplate: t?.title, defaultTitle: t?.defaultTitle, children: [
2896
+ n.canonicalUrlOrigin && /* @__PURE__ */ c.jsx(
2962
2897
  "link",
2963
2898
  {
2964
2899
  rel: "canonical",
2965
- href: Ct(
2900
+ href: sn(
2966
2901
  n.canonicalUrlOrigin,
2967
2902
  n.basePath,
2968
2903
  r.pathname
2969
2904
  )
2970
2905
  }
2971
2906
  ),
2972
- t?.description && /* @__PURE__ */ a.jsx("meta", { name: "description", content: t.description }),
2973
- t?.favicon && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: t.favicon }),
2974
- t?.generator && /* @__PURE__ */ a.jsx("meta", { name: "generator", content: t.generator }),
2975
- t?.applicationName && /* @__PURE__ */ a.jsx("meta", { name: "application-name", content: t.applicationName }),
2976
- t?.referrer && /* @__PURE__ */ a.jsx("meta", { name: "referrer", content: t.referrer }),
2977
- t?.keywords && t.keywords.length > 0 && /* @__PURE__ */ a.jsx("meta", { name: "keywords", content: t.keywords.join(", ") }),
2978
- t?.authors?.map((o) => /* @__PURE__ */ a.jsx("meta", { name: "author", content: o }, o)),
2979
- t?.creator && /* @__PURE__ */ a.jsx("meta", { name: "creator", content: t.creator }),
2980
- t?.publisher && /* @__PURE__ */ a.jsx("meta", { name: "publisher", content: t.publisher })
2907
+ t?.description && /* @__PURE__ */ c.jsx("meta", { name: "description", content: t.description }),
2908
+ t?.favicon && /* @__PURE__ */ c.jsx("link", { rel: "icon", href: t.favicon }),
2909
+ t?.generator && /* @__PURE__ */ c.jsx("meta", { name: "generator", content: t.generator }),
2910
+ t?.applicationName && /* @__PURE__ */ c.jsx("meta", { name: "application-name", content: t.applicationName }),
2911
+ t?.referrer && /* @__PURE__ */ c.jsx("meta", { name: "referrer", content: t.referrer }),
2912
+ t?.keywords && t.keywords.length > 0 && /* @__PURE__ */ c.jsx("meta", { name: "keywords", content: t.keywords.join(", ") }),
2913
+ t?.authors?.map((o) => /* @__PURE__ */ c.jsx("meta", { name: "author", content: o }, o)),
2914
+ t?.creator && /* @__PURE__ */ c.jsx("meta", { name: "creator", content: t.creator }),
2915
+ t?.publisher && /* @__PURE__ */ c.jsx("meta", { name: "publisher", content: t.publisher })
2981
2916
  ] }),
2982
2917
  e
2983
2918
  ] });
2984
- }, Fi = ({
2919
+ }, Gi = ({
2985
2920
  title: e = "An error occurred",
2986
2921
  message: t,
2987
2922
  category: n
2988
- }) => /* @__PURE__ */ a.jsxs(sn, { className: "h-full pt-(--padding-content-top)", children: [
2989
- n && /* @__PURE__ */ a.jsx(fn, { children: n }),
2990
- e && /* @__PURE__ */ a.jsx(an, { level: 1, className: "flex gap-3.5 items-center", children: e }),
2991
- /* @__PURE__ */ a.jsx("p", { children: t })
2992
- ] }), Ui = (e) => {
2923
+ }) => /* @__PURE__ */ c.jsxs(Be, { className: "h-full pt-(--padding-content-top)", children: [
2924
+ n && /* @__PURE__ */ c.jsx(We, { children: n }),
2925
+ e && /* @__PURE__ */ c.jsx(Ve, { level: 1, className: "flex gap-3.5 items-center", children: e }),
2926
+ /* @__PURE__ */ c.jsx("p", { children: t })
2927
+ ] }), kt = () => {
2928
+ const e = Ct();
2929
+ return /* @__PURE__ */ c.jsxs(Be, { className: "h-full pt-(--padding-content-top)", children: [
2930
+ /* @__PURE__ */ c.jsx(We, { children: "404" }),
2931
+ /* @__PURE__ */ c.jsxs(Ve, { level: 1, className: "flex gap-3.5 items-center", children: [
2932
+ "Page not found",
2933
+ /* @__PURE__ */ c.jsx(Kt, { size: 24 })
2934
+ ] }),
2935
+ /* @__PURE__ */ c.jsxs(rn, { children: [
2936
+ "Start by adding a file at",
2937
+ " ",
2938
+ /* @__PURE__ */ c.jsxs("code", { children: [
2939
+ "{DOCUMENT_ROOT}",
2940
+ "/",
2941
+ e["*"],
2942
+ ".mdx"
2943
+ ] }),
2944
+ " ",
2945
+ "and add some content to make this error go away. By default",
2946
+ " ",
2947
+ /* @__PURE__ */ c.jsx("code", { children: "DOCUMENT_ROOT" }),
2948
+ " is the `pages` directory."
2949
+ ] }),
2950
+ /* @__PURE__ */ c.jsx("p", { children: "It seems that the page you are looking for does not exist or may have been moved. Please check the URL for any typos or use the navigation menu to find the correct page." }),
2951
+ /* @__PURE__ */ c.jsx(Ut, { to: "/", children: "Go back home" })
2952
+ ] });
2953
+ }, Yi = (e) => {
2993
2954
  switch (e) {
2994
2955
  case 400:
2995
2956
  return {
@@ -3052,12 +3013,12 @@ const Ii = ({
3052
3013
  message: "Something went wrong while processing your request."
3053
3014
  };
3054
3015
  }
3055
- }, qi = ({ statusCode: e, message: t }) => {
3016
+ }, Qi = ({ statusCode: e, message: t }) => {
3056
3017
  if (e === 404)
3057
- return /* @__PURE__ */ a.jsx(pn, {});
3058
- const n = Ui(e);
3059
- return /* @__PURE__ */ a.jsx(
3060
- Fi,
3018
+ return /* @__PURE__ */ c.jsx(kt, {});
3019
+ const n = Yi(e);
3020
+ return /* @__PURE__ */ c.jsx(
3021
+ Gi,
3061
3022
  {
3062
3023
  title: n.title,
3063
3024
  message: t ?? n.message,
@@ -3065,20 +3026,46 @@ const Ii = ({
3065
3026
  }
3066
3027
  );
3067
3028
  };
3068
- function Mi({ error: e }) {
3069
- return /* @__PURE__ */ a.jsx(cn, { error: e });
3070
- }
3071
- const ia = Ni, aa = mn, ca = Mi, ua = xn, la = Zn, da = Vt, ha = He, fa = qi, pa = xi, ma = Ri;
3029
+ function Xi({ className: e }) {
3030
+ const t = Ft();
3031
+ return Jt(t) && t.status === 404 ? /* @__PURE__ */ c.jsx(kt, {}) : /* @__PURE__ */ c.jsx("div", { className: S("mx-4 max-w-2xl", e), children: /* @__PURE__ */ c.jsx(qe, { error: t }) });
3032
+ }
3033
+ function ea({ error: e }) {
3034
+ return /* @__PURE__ */ c.jsx(qe, { error: e });
3035
+ }
3036
+ const Re = (e) => typeof e == "object" && e !== null && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype, $t = (e, t) => {
3037
+ const n = { ...e };
3038
+ for (const r of Object.keys(t)) {
3039
+ const o = t[r], i = e[r];
3040
+ Nt(o) || Array.isArray(o) || !Re(o) ? n[r] = o : Re(i) ? n[r] = $t(
3041
+ i,
3042
+ o
3043
+ ) : n[r] = o;
3044
+ }
3045
+ return n;
3046
+ }, ta = async (e) => {
3047
+ const t = e.plugins ?? [];
3048
+ let n = e;
3049
+ for (const r of t.filter(dn)) {
3050
+ const o = (s) => $t(n, s), i = await r.transformConfig?.({
3051
+ config: n,
3052
+ merge: o
3053
+ });
3054
+ i && (n = i);
3055
+ }
3056
+ return n;
3057
+ }, ba = Ki, ka = Xi, $a = ea, ja = hn, xa = mn, Za = Mt, Oa = Ce, Sa = Qi, Pa = Ai, Ta = Hi, Ea = ta;
3072
3058
  export {
3073
- ua as Bootstrap,
3074
- la as BootstrapStatic,
3075
- pa as BuildCheck,
3076
- ha as Head,
3077
- ia as Layout,
3078
- ma as Meta,
3079
- da as RouteGuard,
3080
- aa as RouterError,
3081
- ca as ServerError,
3082
- fa as StatusPage
3059
+ ja as Bootstrap,
3060
+ xa as BootstrapStatic,
3061
+ Pa as BuildCheck,
3062
+ Oa as Head,
3063
+ ba as Layout,
3064
+ Ta as Meta,
3065
+ Za as RouteGuard,
3066
+ ka as RouterError,
3067
+ $a as ServerError,
3068
+ Sa as StatusPage,
3069
+ Ea as runPluginTransformConfig
3083
3070
  };
3084
3071
  //# sourceMappingURL=zudoku.__internal.js.map