zudoku 0.3.0-dev.8 → 0.3.0-dev.80

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 (589) hide show
  1. package/dist/app/App.d.ts +1 -2
  2. package/dist/app/App.js +1 -29
  3. package/dist/app/App.js.map +1 -1
  4. package/dist/app/demo.d.ts +2 -0
  5. package/dist/app/demo.js +32 -0
  6. package/dist/app/demo.js.map +1 -0
  7. package/dist/app/entry.client.d.ts +2 -0
  8. package/dist/app/entry.client.js +35 -0
  9. package/dist/app/entry.client.js.map +1 -0
  10. package/dist/app/entry.server.d.ts +14 -0
  11. package/dist/app/entry.server.js +105 -0
  12. package/dist/app/entry.server.js.map +1 -0
  13. package/dist/app/main.d.ts +6 -1
  14. package/dist/app/main.js +72 -12
  15. package/dist/app/main.js.map +1 -1
  16. package/dist/app/standalone.d.ts +2 -0
  17. package/dist/app/standalone.js +37 -0
  18. package/dist/app/standalone.js.map +1 -0
  19. package/dist/app/tailwind.d.ts +1 -1
  20. package/dist/app/tailwind.js +0 -4
  21. package/dist/app/tailwind.js.map +1 -1
  22. package/dist/cli/cmds/dev.js +5 -0
  23. package/dist/cli/cmds/dev.js.map +1 -1
  24. package/dist/cli/dev/handler.d.ts +1 -0
  25. package/dist/cli/dev/handler.js +3 -1
  26. package/dist/cli/dev/handler.js.map +1 -1
  27. package/dist/config/config.d.ts +19 -45
  28. package/dist/config/validators/validate.d.ts +911 -2
  29. package/dist/config/validators/validate.js +151 -1
  30. package/dist/config/validators/validate.js.map +1 -1
  31. package/dist/internal.d.ts +1 -0
  32. package/dist/internal.js +2 -0
  33. package/dist/internal.js.map +1 -0
  34. package/dist/lib/authentication/AuthenticationPlugin.d.ts +13 -0
  35. package/dist/lib/authentication/AuthenticationPlugin.js +31 -0
  36. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -0
  37. package/dist/lib/authentication/authentication.d.ts +10 -9
  38. package/dist/lib/authentication/components/SignIn.d.ts +1 -0
  39. package/dist/lib/authentication/components/SignIn.js +14 -0
  40. package/dist/lib/authentication/components/SignIn.js.map +1 -0
  41. package/dist/lib/authentication/components/SignOut.d.ts +1 -0
  42. package/dist/lib/authentication/components/SignOut.js +12 -0
  43. package/dist/lib/authentication/components/SignOut.js.map +1 -0
  44. package/dist/lib/authentication/components/SignUp.d.ts +1 -0
  45. package/dist/lib/authentication/components/SignUp.js +10 -0
  46. package/dist/lib/authentication/components/SignUp.js.map +1 -0
  47. package/dist/lib/authentication/hook.js +2 -2
  48. package/dist/lib/authentication/hook.js.map +1 -1
  49. package/dist/lib/authentication/providers/auth0.js +11 -6
  50. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  51. package/dist/lib/authentication/providers/clerk.js +59 -30
  52. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  53. package/dist/lib/authentication/providers/openid.d.ts +30 -7
  54. package/dist/lib/authentication/providers/openid.js +78 -29
  55. package/dist/lib/authentication/providers/openid.js.map +1 -1
  56. package/dist/lib/authentication/state.js +1 -1
  57. package/dist/lib/authentication/state.js.map +1 -1
  58. package/dist/lib/components/Bootstrap.d.ts +13 -0
  59. package/dist/lib/components/Bootstrap.js +12 -0
  60. package/dist/lib/components/Bootstrap.js.map +1 -0
  61. package/dist/lib/components/DevPortal.d.ts +5 -19
  62. package/dist/lib/components/DevPortal.js +57 -15
  63. package/dist/lib/components/DevPortal.js.map +1 -1
  64. package/dist/lib/components/DeveloperHint.d.ts +5 -0
  65. package/dist/lib/components/DeveloperHint.js +10 -0
  66. package/dist/lib/components/DeveloperHint.js.map +1 -0
  67. package/dist/lib/components/ErrorPage.d.ts +6 -0
  68. package/dist/lib/components/ErrorPage.js +9 -0
  69. package/dist/lib/components/ErrorPage.js.map +1 -0
  70. package/dist/lib/components/Header.js +21 -3
  71. package/dist/lib/components/Header.js.map +1 -1
  72. package/dist/lib/components/Heading.d.ts +9 -4
  73. package/dist/lib/components/Heading.js +17 -2
  74. package/dist/lib/components/Heading.js.map +1 -1
  75. package/dist/lib/components/InlineCode.d.ts +5 -0
  76. package/dist/lib/components/InlineCode.js +4 -0
  77. package/dist/lib/components/InlineCode.js.map +1 -0
  78. package/dist/lib/components/Layout.js +4 -2
  79. package/dist/lib/components/Layout.js.map +1 -1
  80. package/dist/lib/components/NotFoundPage.d.ts +1 -0
  81. package/dist/lib/components/NotFoundPage.js +12 -0
  82. package/dist/lib/components/NotFoundPage.js.map +1 -0
  83. package/dist/lib/components/SlotletProvider.d.ts +9 -0
  84. package/dist/lib/components/SlotletProvider.js +11 -0
  85. package/dist/lib/components/SlotletProvider.js.map +1 -0
  86. package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
  87. package/dist/lib/components/SyntaxHighlight.js +24 -22
  88. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  89. package/dist/lib/components/TopNavigation.d.ts +1 -1
  90. package/dist/lib/components/TopNavigation.js +5 -1
  91. package/dist/lib/components/TopNavigation.js.map +1 -1
  92. package/dist/lib/components/context/DevPortalProvider.d.ts +1 -1
  93. package/dist/lib/components/context/DevPortalProvider.js +20 -3
  94. package/dist/lib/components/context/DevPortalProvider.js.map +1 -1
  95. package/dist/lib/components/index.d.ts +32 -3
  96. package/dist/lib/components/index.js +21 -3
  97. package/dist/lib/components/index.js.map +1 -1
  98. package/dist/lib/components/navigation/SideNavigation.js +3 -2
  99. package/dist/lib/components/navigation/SideNavigation.js.map +1 -1
  100. package/dist/lib/components/navigation/SideNavigationCategory.js +3 -3
  101. package/dist/lib/components/navigation/SideNavigationCategory.js.map +1 -1
  102. package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -4
  103. package/dist/lib/components/navigation/SideNavigationItem.js +4 -4
  104. package/dist/lib/components/navigation/SideNavigationItem.js.map +1 -1
  105. package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +4 -1
  106. package/dist/lib/components/navigation/useNavigationCollapsibleState.js +17 -5
  107. package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +1 -1
  108. package/dist/lib/core/DevPortalContext.d.ts +52 -13
  109. package/dist/lib/core/DevPortalContext.js +10 -14
  110. package/dist/lib/core/DevPortalContext.js.map +1 -1
  111. package/dist/lib/core/plugins.d.ts +22 -5
  112. package/dist/lib/core/plugins.js +3 -0
  113. package/dist/lib/core/plugins.js.map +1 -1
  114. package/dist/lib/errors/ErrorAlert.d.ts +3 -0
  115. package/dist/lib/errors/ErrorAlert.js +8 -0
  116. package/dist/lib/errors/ErrorAlert.js.map +1 -0
  117. package/dist/lib/errors/RouterError.d.ts +1 -0
  118. package/dist/lib/errors/RouterError.js +12 -0
  119. package/dist/lib/errors/RouterError.js.map +1 -0
  120. package/dist/lib/errors/ServerError.d.ts +3 -0
  121. package/dist/lib/errors/ServerError.js +6 -0
  122. package/dist/lib/errors/ServerError.js.map +1 -0
  123. package/dist/lib/errors/TopLevelError.d.ts +2 -0
  124. package/dist/lib/errors/TopLevelError.js +7 -0
  125. package/dist/lib/errors/TopLevelError.js.map +1 -0
  126. package/dist/lib/oas/graphql/index.js +8 -5
  127. package/dist/lib/oas/graphql/index.js.map +1 -1
  128. package/dist/lib/oas/parser/index.d.ts +1 -1
  129. package/dist/lib/oas/parser/index.js +38 -12
  130. package/dist/lib/oas/parser/index.js.map +1 -1
  131. package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +2 -2
  132. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  133. package/dist/lib/plugins/api-keys/ProtectedRoute.d.ts +1 -0
  134. package/dist/lib/plugins/api-keys/ProtectedRoute.js +14 -0
  135. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -0
  136. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +40 -0
  137. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  138. package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +4 -5
  139. package/dist/lib/plugins/{api-key → api-keys}/index.js +12 -20
  140. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  141. package/dist/lib/plugins/custom-page/index.d.ts +8 -0
  142. package/dist/lib/plugins/custom-page/index.js +12 -0
  143. package/dist/lib/plugins/custom-page/index.js.map +1 -0
  144. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  145. package/dist/lib/plugins/markdown/MdxPage.js +7 -6
  146. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  147. package/dist/lib/plugins/markdown/Toc.js +17 -9
  148. package/dist/lib/plugins/markdown/Toc.js.map +1 -1
  149. package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
  150. package/dist/lib/plugins/markdown/generateRoutes.js +4 -4
  151. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  152. package/dist/lib/plugins/markdown/index.d.ts +4 -1
  153. package/dist/lib/plugins/markdown/index.js +3 -7
  154. package/dist/lib/plugins/markdown/index.js.map +1 -1
  155. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +2 -1
  156. package/dist/lib/plugins/openapi/ColorizedParam.js +14 -9
  157. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  158. package/dist/lib/plugins/openapi/OperationList.js +17 -5
  159. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  160. package/dist/lib/plugins/openapi/OperationListItem.js +10 -5
  161. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  162. package/dist/lib/plugins/openapi/ParameterList.js +1 -1
  163. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  164. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  165. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  166. package/dist/lib/plugins/openapi/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +2 -1
  167. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +23 -0
  168. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
  169. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +3 -9
  170. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  171. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
  172. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  173. package/dist/lib/plugins/openapi/Route.d.ts +6 -0
  174. package/dist/lib/plugins/openapi/Route.js +8 -0
  175. package/dist/lib/plugins/openapi/Route.js.map +1 -0
  176. package/dist/lib/plugins/openapi/SchemaListView.js +6 -27
  177. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  178. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +7 -0
  179. package/dist/lib/plugins/openapi/SchemaListViewItem.js +19 -0
  180. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  181. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  182. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  183. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  184. package/dist/lib/plugins/openapi/Sidecar.d.ts +4 -0
  185. package/dist/lib/plugins/openapi/Sidecar.js +43 -19
  186. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  187. package/dist/lib/plugins/openapi/SidecarBox.d.ts +1 -0
  188. package/dist/lib/plugins/openapi/SidecarBox.js +3 -2
  189. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  190. package/dist/lib/plugins/openapi/{Select.d.ts → SimpleSelect.d.ts} +3 -2
  191. package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
  192. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
  193. package/dist/lib/plugins/openapi/StaggeredRender.d.ts +8 -0
  194. package/dist/lib/plugins/openapi/StaggeredRender.js +18 -0
  195. package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -0
  196. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
  197. package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
  198. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
  199. package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
  200. package/dist/lib/plugins/openapi/client/createServer.js +30 -0
  201. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
  202. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
  203. package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +15 -2
  204. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
  205. package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
  206. package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
  207. package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
  208. package/dist/lib/plugins/openapi/{worker → client}/worker.js +2 -2
  209. package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
  210. package/dist/lib/plugins/openapi/context.d.ts +5 -0
  211. package/dist/lib/plugins/openapi/context.js +11 -0
  212. package/dist/lib/plugins/openapi/context.js.map +1 -0
  213. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -6
  214. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  215. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  216. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +15 -15
  217. package/dist/lib/plugins/openapi/graphql/graphql.js +67 -67
  218. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  219. package/dist/lib/plugins/openapi/index.d.ts +4 -18
  220. package/dist/lib/plugins/openapi/index.js +62 -21
  221. package/dist/lib/plugins/openapi/index.js.map +1 -1
  222. package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
  223. package/dist/lib/plugins/openapi/interfaces.js +2 -0
  224. package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
  225. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +4 -5
  226. package/dist/lib/plugins/openapi/playground/PathParams.js +9 -13
  227. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  228. package/dist/lib/plugins/openapi/playground/Playground.d.ts +26 -14
  229. package/dist/lib/plugins/openapi/playground/Playground.js +53 -25
  230. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  231. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +5 -0
  232. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +12 -0
  233. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
  234. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +4 -3
  235. package/dist/lib/plugins/openapi/playground/QueryParams.js +21 -12
  236. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  237. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +4 -0
  238. package/dist/lib/plugins/openapi/playground/ResponseTab.js +40 -0
  239. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -0
  240. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
  241. package/dist/lib/plugins/openapi/playground/createUrl.js +5 -9
  242. package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
  243. package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
  244. package/dist/lib/plugins/openapi/util/prose.js +4 -0
  245. package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
  246. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  247. package/dist/lib/plugins/openapi-worker.js +1 -1
  248. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  249. package/dist/lib/plugins/redirect/index.d.ts +0 -1
  250. package/dist/lib/plugins/redirect/index.js +3 -4
  251. package/dist/lib/plugins/redirect/index.js.map +1 -1
  252. package/dist/lib/ui/Button.d.ts +5 -1
  253. package/dist/lib/ui/Button.js +24 -1
  254. package/dist/lib/ui/Button.js.map +1 -1
  255. package/dist/lib/ui/Callout.js +2 -2
  256. package/dist/lib/ui/Callout.js.map +1 -1
  257. package/dist/lib/ui/Card.js +1 -1
  258. package/dist/lib/ui/Card.js.map +1 -1
  259. package/dist/lib/ui/DropdownMenu.d.ts +27 -0
  260. package/dist/lib/ui/DropdownMenu.js +36 -0
  261. package/dist/lib/ui/DropdownMenu.js.map +1 -0
  262. package/dist/lib/ui/Input.js.map +1 -0
  263. package/dist/lib/util/MdxComponents.d.ts +2 -2
  264. package/dist/lib/util/MdxComponents.js +7 -5
  265. package/dist/lib/util/MdxComponents.js.map +1 -1
  266. package/dist/lib/util/fetchTimeout.d.ts +1 -0
  267. package/dist/lib/util/fetchTimeout.js +14 -0
  268. package/dist/lib/util/fetchTimeout.js.map +1 -0
  269. package/dist/lib/util/groupBy.d.ts +1 -6
  270. package/dist/lib/util/groupBy.js +10 -8
  271. package/dist/lib/util/groupBy.js.map +1 -1
  272. package/dist/lib/util/invariant.d.ts +6 -0
  273. package/dist/lib/util/invariant.js +21 -0
  274. package/dist/lib/util/invariant.js.map +1 -0
  275. package/dist/lib/util/joinPath.js +2 -1
  276. package/dist/lib/util/joinPath.js.map +1 -1
  277. package/dist/lib/util/logInit.d.ts +1 -0
  278. package/dist/lib/util/logInit.js +9 -0
  279. package/dist/lib/util/logInit.js.map +1 -0
  280. package/dist/lib/util/objectEntries.d.ts +4 -0
  281. package/dist/lib/util/objectEntries.js +2 -0
  282. package/dist/lib/util/objectEntries.js.map +1 -0
  283. package/dist/lib/util/renderIf.d.ts +1 -0
  284. package/dist/lib/util/renderIf.js +2 -0
  285. package/dist/lib/util/renderIf.js.map +1 -0
  286. package/dist/lib/util/requestIdleCallbackPolyfill.d.ts +1 -0
  287. package/dist/lib/util/requestIdleCallbackPolyfill.js +7 -0
  288. package/dist/lib/util/requestIdleCallbackPolyfill.js.map +1 -0
  289. package/dist/vite/build.js +30 -7
  290. package/dist/vite/build.js.map +1 -1
  291. package/dist/vite/config.d.ts +21 -12
  292. package/dist/vite/config.js +107 -55
  293. package/dist/vite/config.js.map +1 -1
  294. package/dist/vite/config.test.js +6 -3
  295. package/dist/vite/config.test.js.map +1 -1
  296. package/dist/vite/dev-server.d.ts +2 -1
  297. package/dist/vite/dev-server.js +44 -15
  298. package/dist/vite/dev-server.js.map +1 -1
  299. package/dist/vite/html.js +18 -5
  300. package/dist/vite/html.js.map +1 -1
  301. package/dist/vite/plugin-api-keys.js +7 -8
  302. package/dist/vite/plugin-api-keys.js.map +1 -1
  303. package/dist/vite/plugin-api.js +9 -20
  304. package/dist/vite/plugin-api.js.map +1 -1
  305. package/dist/vite/plugin-auth.js +5 -6
  306. package/dist/vite/plugin-auth.js.map +1 -1
  307. package/dist/vite/plugin-component.js +5 -2
  308. package/dist/vite/plugin-component.js.map +1 -1
  309. package/dist/vite/plugin-config.d.ts +0 -2
  310. package/dist/vite/plugin-config.js +2 -13
  311. package/dist/vite/plugin-config.js.map +1 -1
  312. package/dist/vite/plugin-custom-css.d.ts +6 -0
  313. package/dist/vite/plugin-custom-css.js +54 -0
  314. package/dist/vite/plugin-custom-css.js.map +1 -0
  315. package/dist/vite/plugin-docs.js +15 -5
  316. package/dist/vite/plugin-docs.js.map +1 -1
  317. package/dist/vite/plugin-mdx.d.ts +3 -1
  318. package/dist/vite/plugin-mdx.js +5 -5
  319. package/dist/vite/plugin-mdx.js.map +1 -1
  320. package/dist/vite/plugin-metadata.js +1 -1
  321. package/dist/vite/plugin-metadata.js.map +1 -1
  322. package/dist/vite/plugin-redirect.js +10 -10
  323. package/dist/vite/plugin-redirect.js.map +1 -1
  324. package/dist/vite/plugin.js +3 -5
  325. package/dist/vite/plugin.js.map +1 -1
  326. package/dist/vite/prerender.d.ts +17 -0
  327. package/dist/vite/prerender.js +79 -0
  328. package/dist/vite/prerender.js.map +1 -0
  329. package/lib/AnchorLink-BZcpTwOs.js +705 -0
  330. package/lib/AnchorLink-BZcpTwOs.js.map +1 -0
  331. package/lib/AuthenticationPlugin-XS0DoAhE.js +55 -0
  332. package/lib/AuthenticationPlugin-XS0DoAhE.js.map +1 -0
  333. package/lib/CategoryHeading-DCmchnA1.js +10 -0
  334. package/lib/CategoryHeading-DCmchnA1.js.map +1 -0
  335. package/lib/Combination-C442XfGG.js +2789 -0
  336. package/lib/Combination-C442XfGG.js.map +1 -0
  337. package/lib/DevPortalProvider-BWeAysxF.js +1126 -0
  338. package/lib/DevPortalProvider-BWeAysxF.js.map +1 -0
  339. package/lib/DeveloperHint-DQVwIery.js +10 -0
  340. package/lib/DeveloperHint-DQVwIery.js.map +1 -0
  341. package/lib/Input-3IEt27jb.js +2239 -0
  342. package/lib/Input-3IEt27jb.js.map +1 -0
  343. package/lib/Markdown-QsZ-PHET.js +14124 -0
  344. package/lib/Markdown-QsZ-PHET.js.map +1 -0
  345. package/lib/MdxPage-CA1WmW14.js +201 -0
  346. package/lib/MdxPage-CA1WmW14.js.map +1 -0
  347. package/lib/OperationList-rv6Z3wD3.js +431 -0
  348. package/lib/OperationList-rv6Z3wD3.js.map +1 -0
  349. package/lib/Route-Clw81GSR.js +13 -0
  350. package/lib/Route-Clw81GSR.js.map +1 -0
  351. package/lib/SlotletProvider-B71hNEUL.js +82 -0
  352. package/lib/SlotletProvider-B71hNEUL.js.map +1 -0
  353. package/lib/Spinner-Coi7ORUV.js +244 -0
  354. package/lib/Spinner-Coi7ORUV.js.map +1 -0
  355. package/lib/_commonjsHelpers-BVfed4GL.js +29 -0
  356. package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
  357. package/lib/assets/index-BPdJm2ty.js +1 -0
  358. package/lib/assets/index-BPdJm2ty.js.map +1 -0
  359. package/lib/assets/{worker-BCcpCNJ7.js → worker-CyHZIIfE.js} +10727 -10300
  360. package/lib/assets/worker-CyHZIIfE.js.map +1 -0
  361. package/lib/index-BH-Ub36F.js +124 -0
  362. package/lib/index-BH-Ub36F.js.map +1 -0
  363. package/lib/index-CLkuJSxj.js +5950 -0
  364. package/lib/index-CLkuJSxj.js.map +1 -0
  365. package/lib/index-Dt-pU7Vu.js +916 -0
  366. package/lib/index-Dt-pU7Vu.js.map +1 -0
  367. package/lib/index-pI9JkN46.js +4765 -0
  368. package/lib/index-pI9JkN46.js.map +1 -0
  369. package/lib/jsx-runtime-CJBdjYYx.js +1526 -0
  370. package/lib/jsx-runtime-CJBdjYYx.js.map +1 -0
  371. package/lib/prism-bash.min-DadFsM4Z.js +1 -0
  372. package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
  373. package/lib/prism-csharp.min-Yizuc34Y.js +1 -0
  374. package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
  375. package/lib/prism-java.min-d5iT_mOd.js +1 -0
  376. package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
  377. package/lib/prism-json.min-B1GJqK1k.js +1 -0
  378. package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
  379. package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
  380. package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
  381. package/lib/prism-objectivec.min-BXSWqpJJ.js +1 -0
  382. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
  383. package/lib/prism-php.min-o7FpoMP_.js +1 -0
  384. package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
  385. package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
  386. package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
  387. package/lib/router-BiRCp01d.js +2971 -0
  388. package/lib/router-BiRCp01d.js.map +1 -0
  389. package/lib/slugify-CiPVjteN.js +28 -0
  390. package/lib/slugify-CiPVjteN.js.map +1 -0
  391. package/lib/state-DsXXkBLH.js +288 -0
  392. package/lib/state-DsXXkBLH.js.map +1 -0
  393. package/lib/{urql-DMlBWUKL.js → urql-DrBfkb92.js} +2 -2
  394. package/lib/urql-DrBfkb92.js.map +1 -0
  395. package/lib/zudoku.auth-auth0.js +31 -20
  396. package/lib/zudoku.auth-auth0.js.map +1 -0
  397. package/lib/zudoku.auth-clerk.js +59 -29
  398. package/lib/zudoku.auth-clerk.js.map +1 -0
  399. package/lib/zudoku.auth-openid.js +740 -573
  400. package/lib/zudoku.auth-openid.js.map +1 -0
  401. package/lib/zudoku.components.js +1854 -535
  402. package/lib/zudoku.components.js.map +1 -0
  403. package/lib/zudoku.openapi-worker.js +15035 -146
  404. package/lib/zudoku.openapi-worker.js.map +1 -0
  405. package/lib/zudoku.plugin-api-keys.js +303 -0
  406. package/lib/zudoku.plugin-api-keys.js.map +1 -0
  407. package/lib/zudoku.plugin-custom-page.js +13 -0
  408. package/lib/zudoku.plugin-custom-page.js.map +1 -0
  409. package/lib/zudoku.plugin-markdown.js +48 -0
  410. package/lib/zudoku.plugin-markdown.js.map +1 -0
  411. package/lib/zudoku.plugin-openapi.js +12 -0
  412. package/lib/zudoku.plugin-openapi.js.map +1 -0
  413. package/lib/zudoku.plugin-redirect.js +11 -0
  414. package/lib/zudoku.plugin-redirect.js.map +1 -0
  415. package/package.json +60 -25
  416. package/src/app/App.tsx +0 -41
  417. package/src/app/demo-cdn.html +26 -0
  418. package/src/app/demo.html +18 -0
  419. package/src/app/demo.tsx +45 -0
  420. package/src/app/entry.client.tsx +47 -0
  421. package/src/app/entry.server.tsx +160 -0
  422. package/src/app/main.css +85 -5
  423. package/src/app/main.tsx +85 -15
  424. package/src/app/standalone.html +20 -0
  425. package/src/app/standalone.tsx +51 -0
  426. package/src/app/tailwind.ts +2 -6
  427. package/src/lib/authentication/AuthenticationPlugin.tsx +38 -0
  428. package/src/lib/authentication/authentication.ts +6 -12
  429. package/src/lib/authentication/components/SignIn.tsx +15 -0
  430. package/src/lib/authentication/components/SignOut.tsx +13 -0
  431. package/src/lib/authentication/components/SignUp.tsx +11 -0
  432. package/src/lib/authentication/hook.ts +2 -2
  433. package/src/lib/authentication/providers/auth0.tsx +16 -6
  434. package/src/lib/authentication/providers/clerk.tsx +63 -31
  435. package/src/lib/authentication/providers/openid.tsx +105 -34
  436. package/src/lib/authentication/state.ts +1 -1
  437. package/src/lib/components/Bootstrap.tsx +44 -0
  438. package/src/lib/components/DevPortal.tsx +88 -53
  439. package/src/lib/components/DeveloperHint.tsx +25 -0
  440. package/src/lib/components/ErrorPage.tsx +28 -0
  441. package/src/lib/components/Header.tsx +103 -30
  442. package/src/lib/components/Heading.tsx +26 -7
  443. package/src/lib/components/InlineCode.tsx +19 -0
  444. package/src/lib/components/Layout.tsx +12 -7
  445. package/src/lib/components/NotFoundPage.tsx +33 -0
  446. package/src/lib/components/SlotletProvider.tsx +25 -0
  447. package/src/lib/components/SyntaxHighlight.tsx +53 -44
  448. package/src/lib/components/TopNavigation.tsx +6 -1
  449. package/src/lib/components/context/DevPortalProvider.ts +24 -4
  450. package/src/lib/components/index.ts +25 -3
  451. package/src/lib/components/navigation/SideNavigation.tsx +3 -0
  452. package/src/lib/components/navigation/SideNavigationCategory.tsx +5 -9
  453. package/src/lib/components/navigation/SideNavigationItem.tsx +5 -9
  454. package/src/lib/components/navigation/useNavigationCollapsibleState.ts +21 -6
  455. package/src/lib/core/DevPortalContext.ts +64 -28
  456. package/src/lib/core/plugins.ts +37 -6
  457. package/src/lib/errors/ErrorAlert.tsx +21 -0
  458. package/src/lib/errors/RouterError.tsx +13 -0
  459. package/src/lib/errors/ServerError.tsx +5 -0
  460. package/src/lib/errors/TopLevelError.tsx +8 -0
  461. package/src/lib/oas/graphql/index.ts +11 -6
  462. package/src/lib/oas/parser/index.ts +41 -20
  463. package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +2 -2
  464. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +29 -0
  465. package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +21 -9
  466. package/src/lib/plugins/{api-key → api-keys}/index.tsx +17 -41
  467. package/src/lib/plugins/custom-page/index.tsx +22 -0
  468. package/src/lib/plugins/markdown/MdxPage.tsx +51 -34
  469. package/src/lib/plugins/markdown/Toc.tsx +53 -40
  470. package/src/lib/plugins/markdown/generateRoutes.tsx +16 -6
  471. package/src/lib/plugins/markdown/index.tsx +10 -7
  472. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -16
  473. package/src/lib/plugins/openapi/OperationList.tsx +46 -10
  474. package/src/lib/plugins/openapi/OperationListItem.tsx +68 -42
  475. package/src/lib/plugins/openapi/ParameterList.tsx +1 -1
  476. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
  477. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +39 -0
  478. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +3 -15
  479. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -2
  480. package/src/lib/plugins/openapi/Route.tsx +21 -0
  481. package/src/lib/plugins/openapi/SchemaListView.tsx +23 -192
  482. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +113 -0
  483. package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
  484. package/src/lib/plugins/openapi/Sidecar.tsx +62 -28
  485. package/src/lib/plugins/openapi/SidecarBox.tsx +13 -2
  486. package/src/lib/plugins/openapi/{Select.tsx → SimpleSelect.tsx} +6 -3
  487. package/src/lib/plugins/openapi/StaggeredRender.tsx +31 -0
  488. package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
  489. package/src/lib/plugins/openapi/client/createServer.ts +33 -0
  490. package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +21 -2
  491. package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
  492. package/src/lib/plugins/openapi/{worker → client}/worker.ts +3 -3
  493. package/src/lib/plugins/openapi/context.tsx +16 -0
  494. package/src/lib/plugins/openapi/graphql/gql.ts +8 -8
  495. package/src/lib/plugins/openapi/graphql/graphql.ts +80 -80
  496. package/src/lib/plugins/openapi/index.tsx +117 -53
  497. package/src/lib/plugins/openapi/interfaces.ts +9 -0
  498. package/src/lib/plugins/openapi/playground/PathParams.tsx +76 -50
  499. package/src/lib/plugins/openapi/playground/Playground.tsx +239 -229
  500. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +40 -0
  501. package/src/lib/plugins/openapi/playground/QueryParams.tsx +107 -66
  502. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +76 -0
  503. package/src/lib/plugins/openapi/playground/createUrl.ts +12 -15
  504. package/src/lib/plugins/openapi/util/prose.ts +7 -0
  505. package/src/lib/plugins/openapi-worker.ts +1 -1
  506. package/src/lib/plugins/redirect/index.tsx +3 -4
  507. package/src/lib/ui/Button.tsx +32 -2
  508. package/src/lib/ui/Callout.tsx +4 -4
  509. package/src/lib/ui/Card.tsx +1 -1
  510. package/src/lib/ui/DropdownMenu.tsx +199 -0
  511. package/src/lib/util/MdxComponents.tsx +7 -15
  512. package/src/lib/util/fetchTimeout.tsx +21 -0
  513. package/src/lib/util/groupBy.ts +7 -12
  514. package/src/lib/util/invariant.ts +26 -0
  515. package/src/lib/util/joinPath.tsx +2 -1
  516. package/src/lib/util/logInit.ts +9 -0
  517. package/src/lib/util/objectEntries.ts +5 -0
  518. package/src/lib/util/renderIf.ts +4 -0
  519. package/src/lib/util/requestIdleCallbackPolyfill.ts +6 -0
  520. package/dist/lib/authentication/Callback.d.ts +0 -3
  521. package/dist/lib/authentication/Callback.js +0 -34
  522. package/dist/lib/authentication/Callback.js.map +0 -1
  523. package/dist/lib/components/Input.js.map +0 -1
  524. package/dist/lib/components/Link.d.ts +0 -1
  525. package/dist/lib/components/Link.js +0 -2
  526. package/dist/lib/components/Link.js.map +0 -1
  527. package/dist/lib/components/Router.d.ts +0 -4
  528. package/dist/lib/components/Router.js +0 -20
  529. package/dist/lib/components/Router.js.map +0 -1
  530. package/dist/lib/core/helmet.d.ts +0 -4
  531. package/dist/lib/core/helmet.js +0 -5
  532. package/dist/lib/core/helmet.js.map +0 -1
  533. package/dist/lib/core/icons.d.ts +0 -1
  534. package/dist/lib/core/icons.js +0 -2
  535. package/dist/lib/core/icons.js.map +0 -1
  536. package/dist/lib/core/router.d.ts +0 -1
  537. package/dist/lib/core/router.js +0 -2
  538. package/dist/lib/core/router.js.map +0 -1
  539. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  540. package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
  541. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  542. package/dist/lib/plugins/api-key/index.js.map +0 -1
  543. package/dist/lib/plugins/index.d.ts +0 -4
  544. package/dist/lib/plugins/index.js +0 -5
  545. package/dist/lib/plugins/index.js.map +0 -1
  546. package/dist/lib/plugins/openapi/MakeRequest.js +0 -43
  547. package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
  548. package/dist/lib/plugins/openapi/Select.js +0 -5
  549. package/dist/lib/plugins/openapi/Select.js.map +0 -1
  550. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
  551. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
  552. package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
  553. package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
  554. package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
  555. package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
  556. package/dist/lib/ui/button-variants.d.ts +0 -4
  557. package/dist/lib/ui/button-variants.js +0 -24
  558. package/dist/lib/ui/button-variants.js.map +0 -1
  559. package/dist/vite/common.d.ts +0 -1
  560. package/dist/vite/common.js +0 -5
  561. package/dist/vite/common.js.map +0 -1
  562. package/dist/vite/plugin-html.d.ts +0 -3
  563. package/dist/vite/plugin-html.js +0 -47
  564. package/dist/vite/plugin-html.js.map +0 -1
  565. package/dist/vite/plugin-openapi-worker.d.ts +0 -4
  566. package/dist/vite/plugin-openapi-worker.js +0 -28
  567. package/dist/vite/plugin-openapi-worker.js.map +0 -1
  568. package/lib/Spinner-BewqqUU-.js +0 -8413
  569. package/lib/clerk-Wslx_mPo.js +0 -19685
  570. package/lib/index-PyGcnQFX.js +0 -3462
  571. package/lib/loglevel-CoH7VSwE.js +0 -152
  572. package/lib/state-2Hu1renZ.js +0 -313
  573. package/lib/zudoku.plugins.js +0 -19902
  574. package/src/lib/authentication/Callback.tsx +0 -60
  575. package/src/lib/components/Link.tsx +0 -1
  576. package/src/lib/components/Router.tsx +0 -28
  577. package/src/lib/core/helmet.ts +0 -5
  578. package/src/lib/core/icons.tsx +0 -1
  579. package/src/lib/core/router.tsx +0 -1
  580. package/src/lib/plugins/index.ts +0 -4
  581. package/src/lib/plugins/openapi/MakeRequest.tsx +0 -63
  582. package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
  583. package/src/lib/ui/button-variants.ts +0 -31
  584. /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.d.ts +0 -0
  585. /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.d.ts +0 -0
  586. /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
  587. /package/dist/lib/{components → ui}/Input.d.ts +0 -0
  588. /package/dist/lib/{components → ui}/Input.js +0 -0
  589. /package/src/lib/{components → ui}/Input.tsx +0 -0
@@ -0,0 +1,916 @@
1
+ import * as o from "react";
2
+ import * as ke from "react-dom";
3
+ import { f as O, g as he, a as ne, u as A, h as V, D as J, i as pe, R as re, k as ae, l as M, m as Ie, n as ve, o as ye, b as we, p as Ee, A as Ve, M as Me, N as He, O as Ke, q as Be, r as je, L as ze, s as We, t as ce, v as Ye, w as qe, x as Ge, y as Je, z as Xe, B as $e, C as Qe, E as Ze, F as et, G as tt, c as nt, H as rt, e as at, I as ot, J as it } from "./jsx-runtime-CJBdjYYx.js";
4
+ import { s as P, w as H, n as q, b as E, j as st, m as te, l as Se, x as be, y as Re, E as ge, z as lt, k as ut, A as ct, o as ft, q as dt, i as mt, t as ht, d as pt, p as vt, a as yt, u as wt, v as Et } from "./router-BiRCp01d.js";
5
+ /**
6
+ * React Router DOM v6.25.1
7
+ *
8
+ * Copyright (c) Remix Software Inc.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE.md file in the root directory of this source tree.
12
+ *
13
+ * @license MIT
14
+ */
15
+ function g() {
16
+ return g = Object.assign ? Object.assign.bind() : function(e) {
17
+ for (var t = 1; t < arguments.length; t++) {
18
+ var n = arguments[t];
19
+ for (var a in n)
20
+ Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
21
+ }
22
+ return e;
23
+ }, g.apply(this, arguments);
24
+ }
25
+ function oe(e, t) {
26
+ if (e == null) return {};
27
+ var n = {}, a = Object.keys(e), r, s;
28
+ for (s = 0; s < a.length; s++)
29
+ r = a[s], !(t.indexOf(r) >= 0) && (n[r] = e[r]);
30
+ return n;
31
+ }
32
+ const W = "get", Y = "application/x-www-form-urlencoded";
33
+ function X(e) {
34
+ return e != null && typeof e.tagName == "string";
35
+ }
36
+ function St(e) {
37
+ return X(e) && e.tagName.toLowerCase() === "button";
38
+ }
39
+ function bt(e) {
40
+ return X(e) && e.tagName.toLowerCase() === "form";
41
+ }
42
+ function Rt(e) {
43
+ return X(e) && e.tagName.toLowerCase() === "input";
44
+ }
45
+ function gt(e) {
46
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
47
+ }
48
+ function _t(e, t) {
49
+ return e.button === 0 && // Ignore everything but left clicks
50
+ (!t || t === "_self") && // Let browser handle "target=_blank" etc.
51
+ !gt(e);
52
+ }
53
+ function G(e) {
54
+ return e === void 0 && (e = ""), new URLSearchParams(typeof e == "string" || Array.isArray(e) || e instanceof URLSearchParams ? e : Object.keys(e).reduce((t, n) => {
55
+ let a = e[n];
56
+ return t.concat(Array.isArray(a) ? a.map((r) => [n, r]) : [[n, a]]);
57
+ }, []));
58
+ }
59
+ function Nt(e, t) {
60
+ let n = G(e);
61
+ return t && t.forEach((a, r) => {
62
+ n.has(r) || t.getAll(r).forEach((s) => {
63
+ n.append(r, s);
64
+ });
65
+ }), n;
66
+ }
67
+ let j = null;
68
+ function Ct() {
69
+ if (j === null)
70
+ try {
71
+ new FormData(
72
+ document.createElement("form"),
73
+ // @ts-expect-error if FormData supports the submitter parameter, this will throw
74
+ 0
75
+ ), j = !1;
76
+ } catch {
77
+ j = !0;
78
+ }
79
+ return j;
80
+ }
81
+ const Tt = /* @__PURE__ */ new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
82
+ function ee(e) {
83
+ return e != null && !Tt.has(e) ? (process.env.NODE_ENV !== "production" && H(!1, '"' + e + '" is not a valid `encType` for `<Form>`/`<fetcher.Form>` ' + ('and will default to "' + Y + '"')), null) : e;
84
+ }
85
+ function Lt(e, t) {
86
+ let n, a, r, s, i;
87
+ if (bt(e)) {
88
+ let u = e.getAttribute("action");
89
+ a = u ? P(u, t) : null, n = e.getAttribute("method") || W, r = ee(e.getAttribute("enctype")) || Y, s = new FormData(e);
90
+ } else if (St(e) || Rt(e) && (e.type === "submit" || e.type === "image")) {
91
+ let u = e.form;
92
+ if (u == null)
93
+ throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');
94
+ let f = e.getAttribute("formaction") || u.getAttribute("action");
95
+ if (a = f ? P(f, t) : null, n = e.getAttribute("formmethod") || u.getAttribute("method") || W, r = ee(e.getAttribute("formenctype")) || ee(u.getAttribute("enctype")) || Y, s = new FormData(u, e), !Ct()) {
96
+ let {
97
+ name: l,
98
+ type: c,
99
+ value: m
100
+ } = e;
101
+ if (c === "image") {
102
+ let h = l ? l + "." : "";
103
+ s.append(h + "x", "0"), s.append(h + "y", "0");
104
+ } else l && s.append(l, m);
105
+ }
106
+ } else {
107
+ if (X(e))
108
+ throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');
109
+ n = W, a = null, r = Y, i = e;
110
+ }
111
+ return s && r === "text/plain" && (i = s, s = void 0), {
112
+ action: a,
113
+ method: n.toLowerCase(),
114
+ encType: r,
115
+ formData: s,
116
+ body: i
117
+ };
118
+ }
119
+ const xt = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "unstable_viewTransition"], Ft = ["aria-current", "caseSensitive", "className", "end", "style", "to", "unstable_viewTransition", "children"], Pt = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "unstable_viewTransition"], Dt = "6";
120
+ try {
121
+ window.__reactRouterVersion = Dt;
122
+ } catch {
123
+ }
124
+ function Ot(e, t) {
125
+ return Se({
126
+ basename: t == null ? void 0 : t.basename,
127
+ future: g({}, t == null ? void 0 : t.future, {
128
+ v7_prependBasename: !0
129
+ }),
130
+ history: be({
131
+ window: t == null ? void 0 : t.window
132
+ }),
133
+ hydrationData: (t == null ? void 0 : t.hydrationData) || _e(),
134
+ routes: e,
135
+ mapRouteProperties: ve,
136
+ unstable_dataStrategy: t == null ? void 0 : t.unstable_dataStrategy,
137
+ unstable_patchRoutesOnMiss: t == null ? void 0 : t.unstable_patchRoutesOnMiss,
138
+ window: t == null ? void 0 : t.window
139
+ }).initialize();
140
+ }
141
+ function At(e, t) {
142
+ return Se({
143
+ basename: t == null ? void 0 : t.basename,
144
+ future: g({}, t == null ? void 0 : t.future, {
145
+ v7_prependBasename: !0
146
+ }),
147
+ history: Re({
148
+ window: t == null ? void 0 : t.window
149
+ }),
150
+ hydrationData: (t == null ? void 0 : t.hydrationData) || _e(),
151
+ routes: e,
152
+ mapRouteProperties: ve,
153
+ unstable_dataStrategy: t == null ? void 0 : t.unstable_dataStrategy,
154
+ unstable_patchRoutesOnMiss: t == null ? void 0 : t.unstable_patchRoutesOnMiss,
155
+ window: t == null ? void 0 : t.window
156
+ }).initialize();
157
+ }
158
+ function _e() {
159
+ var e;
160
+ let t = (e = window) == null ? void 0 : e.__staticRouterHydrationData;
161
+ return t && t.errors && (t = g({}, t, {
162
+ errors: Ut(t.errors)
163
+ })), t;
164
+ }
165
+ function Ut(e) {
166
+ if (!e) return null;
167
+ let t = Object.entries(e), n = {};
168
+ for (let [a, r] of t)
169
+ if (r && r.__type === "RouteErrorResponse")
170
+ n[a] = new ge(r.status, r.statusText, r.data, r.internal === !0);
171
+ else if (r && r.__type === "Error") {
172
+ if (r.__subType) {
173
+ let s = window[r.__subType];
174
+ if (typeof s == "function")
175
+ try {
176
+ let i = new s(r.message);
177
+ i.stack = "", n[a] = i;
178
+ } catch {
179
+ }
180
+ }
181
+ if (n[a] == null) {
182
+ let s = new Error(r.message);
183
+ s.stack = "", n[a] = s;
184
+ }
185
+ } else
186
+ n[a] = r;
187
+ return n;
188
+ }
189
+ const $ = /* @__PURE__ */ o.createContext({
190
+ isTransitioning: !1
191
+ });
192
+ process.env.NODE_ENV !== "production" && ($.displayName = "ViewTransition");
193
+ const Q = /* @__PURE__ */ o.createContext(/* @__PURE__ */ new Map());
194
+ process.env.NODE_ENV !== "production" && (Q.displayName = "Fetchers");
195
+ const kt = "startTransition", L = o[kt], It = "flushSync", fe = ke[It], Vt = "useId", de = o[Vt];
196
+ function Mt(e) {
197
+ L ? L(e) : e();
198
+ }
199
+ function k(e) {
200
+ fe ? fe(e) : e();
201
+ }
202
+ class Ht {
203
+ constructor() {
204
+ this.status = "pending", this.promise = new Promise((t, n) => {
205
+ this.resolve = (a) => {
206
+ this.status === "pending" && (this.status = "resolved", t(a));
207
+ }, this.reject = (a) => {
208
+ this.status === "pending" && (this.status = "rejected", n(a));
209
+ };
210
+ });
211
+ }
212
+ }
213
+ function Kt(e) {
214
+ let {
215
+ fallbackElement: t,
216
+ router: n,
217
+ future: a
218
+ } = e, [r, s] = o.useState(n.state), [i, u] = o.useState(), [f, l] = o.useState({
219
+ isTransitioning: !1
220
+ }), [c, m] = o.useState(), [h, S] = o.useState(), [w, _] = o.useState(), b = o.useRef(/* @__PURE__ */ new Map()), {
221
+ v7_startTransition: N
222
+ } = a || {}, d = o.useCallback((y) => {
223
+ N ? Mt(y) : y();
224
+ }, [N]), p = o.useCallback((y, C) => {
225
+ let {
226
+ deletedFetchers: R,
227
+ unstable_flushSync: B,
228
+ unstable_viewTransitionOpts: x
229
+ } = C;
230
+ R.forEach((F) => b.current.delete(F)), y.fetchers.forEach((F, Ue) => {
231
+ F.data !== void 0 && b.current.set(Ue, F.data);
232
+ });
233
+ let Ae = n.window == null || n.window.document == null || typeof n.window.document.startViewTransition != "function";
234
+ if (!x || Ae) {
235
+ B ? k(() => s(y)) : d(() => s(y));
236
+ return;
237
+ }
238
+ if (B) {
239
+ k(() => {
240
+ h && (c && c.resolve(), h.skipTransition()), l({
241
+ isTransitioning: !0,
242
+ flushSync: !0,
243
+ currentLocation: x.currentLocation,
244
+ nextLocation: x.nextLocation
245
+ });
246
+ });
247
+ let F = n.window.document.startViewTransition(() => {
248
+ k(() => s(y));
249
+ });
250
+ F.finished.finally(() => {
251
+ k(() => {
252
+ m(void 0), S(void 0), u(void 0), l({
253
+ isTransitioning: !1
254
+ });
255
+ });
256
+ }), k(() => S(F));
257
+ return;
258
+ }
259
+ h ? (c && c.resolve(), h.skipTransition(), _({
260
+ state: y,
261
+ currentLocation: x.currentLocation,
262
+ nextLocation: x.nextLocation
263
+ })) : (u(y), l({
264
+ isTransitioning: !0,
265
+ flushSync: !1,
266
+ currentLocation: x.currentLocation,
267
+ nextLocation: x.nextLocation
268
+ }));
269
+ }, [n.window, h, c, b, d]);
270
+ o.useLayoutEffect(() => n.subscribe(p), [n, p]), o.useEffect(() => {
271
+ f.isTransitioning && !f.flushSync && m(new Ht());
272
+ }, [f]), o.useEffect(() => {
273
+ if (c && i && n.window) {
274
+ let y = i, C = c.promise, R = n.window.document.startViewTransition(async () => {
275
+ d(() => s(y)), await C;
276
+ });
277
+ R.finished.finally(() => {
278
+ m(void 0), S(void 0), u(void 0), l({
279
+ isTransitioning: !1
280
+ });
281
+ }), S(R);
282
+ }
283
+ }, [d, i, c, n.window]), o.useEffect(() => {
284
+ c && i && r.location.key === i.location.key && c.resolve();
285
+ }, [c, h, r.location, i]), o.useEffect(() => {
286
+ !f.isTransitioning && w && (u(w.state), l({
287
+ isTransitioning: !0,
288
+ flushSync: !1,
289
+ currentLocation: w.currentLocation,
290
+ nextLocation: w.nextLocation
291
+ }), _(void 0));
292
+ }, [f.isTransitioning, w]), o.useEffect(() => {
293
+ process.env.NODE_ENV !== "production" && H(t == null || !n.future.v7_partialHydration, "`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead");
294
+ }, []);
295
+ let v = o.useMemo(() => ({
296
+ createHref: n.createHref,
297
+ encodeLocation: n.encodeLocation,
298
+ go: (y) => n.navigate(y),
299
+ push: (y, C, R) => n.navigate(y, {
300
+ state: C,
301
+ preventScrollReset: R == null ? void 0 : R.preventScrollReset
302
+ }),
303
+ replace: (y, C, R) => n.navigate(y, {
304
+ replace: !0,
305
+ state: C,
306
+ preventScrollReset: R == null ? void 0 : R.preventScrollReset
307
+ })
308
+ }), [n]), T = n.basename || "/", U = o.useMemo(() => ({
309
+ router: n,
310
+ navigator: v,
311
+ static: !1,
312
+ basename: T
313
+ }), [n, v, T]), K = o.useMemo(() => ({
314
+ v7_relativeSplatPath: n.future.v7_relativeSplatPath
315
+ }), [n.future.v7_relativeSplatPath]);
316
+ return /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement(ae.Provider, {
317
+ value: U
318
+ }, /* @__PURE__ */ o.createElement(J.Provider, {
319
+ value: r
320
+ }, /* @__PURE__ */ o.createElement(Q.Provider, {
321
+ value: b.current
322
+ }, /* @__PURE__ */ o.createElement($.Provider, {
323
+ value: f
324
+ }, /* @__PURE__ */ o.createElement(M, {
325
+ basename: T,
326
+ location: r.location,
327
+ navigationType: r.historyAction,
328
+ navigator: v,
329
+ future: K
330
+ }, r.initialized || n.future.v7_partialHydration ? /* @__PURE__ */ o.createElement(Bt, {
331
+ routes: n.routes,
332
+ future: n.future,
333
+ state: r
334
+ }) : t))))), null);
335
+ }
336
+ const Bt = /* @__PURE__ */ o.memo(jt);
337
+ function jt(e) {
338
+ let {
339
+ routes: t,
340
+ future: n,
341
+ state: a
342
+ } = e;
343
+ return Ie(t, void 0, a, n);
344
+ }
345
+ function zt(e) {
346
+ let {
347
+ basename: t,
348
+ children: n,
349
+ future: a,
350
+ window: r
351
+ } = e, s = o.useRef();
352
+ s.current == null && (s.current = be({
353
+ window: r,
354
+ v5Compat: !0
355
+ }));
356
+ let i = s.current, [u, f] = o.useState({
357
+ action: i.action,
358
+ location: i.location
359
+ }), {
360
+ v7_startTransition: l
361
+ } = a || {}, c = o.useCallback((m) => {
362
+ l && L ? L(() => f(m)) : f(m);
363
+ }, [f, l]);
364
+ return o.useLayoutEffect(() => i.listen(c), [i, c]), /* @__PURE__ */ o.createElement(M, {
365
+ basename: t,
366
+ children: n,
367
+ location: u.location,
368
+ navigationType: u.action,
369
+ navigator: i,
370
+ future: a
371
+ });
372
+ }
373
+ function Wt(e) {
374
+ let {
375
+ basename: t,
376
+ children: n,
377
+ future: a,
378
+ window: r
379
+ } = e, s = o.useRef();
380
+ s.current == null && (s.current = Re({
381
+ window: r,
382
+ v5Compat: !0
383
+ }));
384
+ let i = s.current, [u, f] = o.useState({
385
+ action: i.action,
386
+ location: i.location
387
+ }), {
388
+ v7_startTransition: l
389
+ } = a || {}, c = o.useCallback((m) => {
390
+ l && L ? L(() => f(m)) : f(m);
391
+ }, [f, l]);
392
+ return o.useLayoutEffect(() => i.listen(c), [i, c]), /* @__PURE__ */ o.createElement(M, {
393
+ basename: t,
394
+ children: n,
395
+ location: u.location,
396
+ navigationType: u.action,
397
+ navigator: i,
398
+ future: a
399
+ });
400
+ }
401
+ function Ne(e) {
402
+ let {
403
+ basename: t,
404
+ children: n,
405
+ future: a,
406
+ history: r
407
+ } = e, [s, i] = o.useState({
408
+ action: r.action,
409
+ location: r.location
410
+ }), {
411
+ v7_startTransition: u
412
+ } = a || {}, f = o.useCallback((l) => {
413
+ u && L ? L(() => i(l)) : i(l);
414
+ }, [i, u]);
415
+ return o.useLayoutEffect(() => r.listen(f), [r, f]), /* @__PURE__ */ o.createElement(M, {
416
+ basename: t,
417
+ children: n,
418
+ location: s.location,
419
+ navigationType: s.action,
420
+ navigator: r,
421
+ future: a
422
+ });
423
+ }
424
+ process.env.NODE_ENV !== "production" && (Ne.displayName = "unstable_HistoryRouter");
425
+ const Yt = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", qt = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ie = /* @__PURE__ */ o.forwardRef(function(t, n) {
426
+ let {
427
+ onClick: a,
428
+ relative: r,
429
+ reloadDocument: s,
430
+ replace: i,
431
+ state: u,
432
+ target: f,
433
+ to: l,
434
+ preventScrollReset: c,
435
+ unstable_viewTransition: m
436
+ } = t, h = oe(t, xt), {
437
+ basename: S
438
+ } = o.useContext(O), w, _ = !1;
439
+ if (typeof l == "string" && qt.test(l) && (w = l, Yt))
440
+ try {
441
+ let p = new URL(window.location.href), v = l.startsWith("//") ? new URL(p.protocol + l) : new URL(l), T = P(v.pathname, S);
442
+ v.origin === p.origin && T != null ? l = T + v.search + v.hash : _ = !0;
443
+ } catch {
444
+ process.env.NODE_ENV !== "production" && H(!1, '<Link to="' + l + '"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.');
445
+ }
446
+ let b = he(l, {
447
+ relative: r
448
+ }), N = xe(l, {
449
+ replace: i,
450
+ state: u,
451
+ target: f,
452
+ preventScrollReset: c,
453
+ relative: r,
454
+ unstable_viewTransition: m
455
+ });
456
+ function d(p) {
457
+ a && a(p), p.defaultPrevented || N(p);
458
+ }
459
+ return (
460
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
461
+ /* @__PURE__ */ o.createElement("a", g({}, h, {
462
+ href: w || b,
463
+ onClick: _ || s ? a : d,
464
+ ref: n,
465
+ target: f
466
+ }))
467
+ );
468
+ });
469
+ process.env.NODE_ENV !== "production" && (ie.displayName = "Link");
470
+ const Ce = /* @__PURE__ */ o.forwardRef(function(t, n) {
471
+ let {
472
+ "aria-current": a = "page",
473
+ caseSensitive: r = !1,
474
+ className: s = "",
475
+ end: i = !1,
476
+ style: u,
477
+ to: f,
478
+ unstable_viewTransition: l,
479
+ children: c
480
+ } = t, m = oe(t, Ft), h = V(f, {
481
+ relative: m.relative
482
+ }), S = A(), w = o.useContext(J), {
483
+ navigator: _,
484
+ basename: b
485
+ } = o.useContext(O), N = w != null && // Conditional usage is OK here because the usage of a data router is static
486
+ // eslint-disable-next-line react-hooks/rules-of-hooks
487
+ Oe(h) && l === !0, d = _.encodeLocation ? _.encodeLocation(h).pathname : h.pathname, p = S.pathname, v = w && w.navigation && w.navigation.location ? w.navigation.location.pathname : null;
488
+ r || (p = p.toLowerCase(), v = v ? v.toLowerCase() : null, d = d.toLowerCase()), v && b && (v = P(v, b) || v);
489
+ const T = d !== "/" && d.endsWith("/") ? d.length - 1 : d.length;
490
+ let U = p === d || !i && p.startsWith(d) && p.charAt(T) === "/", K = v != null && (v === d || !i && v.startsWith(d) && v.charAt(d.length) === "/"), y = {
491
+ isActive: U,
492
+ isPending: K,
493
+ isTransitioning: N
494
+ }, C = U ? a : void 0, R;
495
+ typeof s == "function" ? R = s(y) : R = [s, U ? "active" : null, K ? "pending" : null, N ? "transitioning" : null].filter(Boolean).join(" ");
496
+ let B = typeof u == "function" ? u(y) : u;
497
+ return /* @__PURE__ */ o.createElement(ie, g({}, m, {
498
+ "aria-current": C,
499
+ className: R,
500
+ ref: n,
501
+ style: B,
502
+ to: f,
503
+ unstable_viewTransition: l
504
+ }), typeof c == "function" ? c(y) : c);
505
+ });
506
+ process.env.NODE_ENV !== "production" && (Ce.displayName = "NavLink");
507
+ const se = /* @__PURE__ */ o.forwardRef((e, t) => {
508
+ let {
509
+ fetcherKey: n,
510
+ navigate: a,
511
+ reloadDocument: r,
512
+ replace: s,
513
+ state: i,
514
+ method: u = W,
515
+ action: f,
516
+ onSubmit: l,
517
+ relative: c,
518
+ preventScrollReset: m,
519
+ unstable_viewTransition: h
520
+ } = e, S = oe(e, Pt), w = ue(), _ = Pe(f, {
521
+ relative: c
522
+ }), b = u.toLowerCase() === "get" ? "get" : "post", N = (d) => {
523
+ if (l && l(d), d.defaultPrevented) return;
524
+ d.preventDefault();
525
+ let p = d.nativeEvent.submitter, v = (p == null ? void 0 : p.getAttribute("formmethod")) || u;
526
+ w(p || d.currentTarget, {
527
+ fetcherKey: n,
528
+ method: v,
529
+ navigate: a,
530
+ replace: s,
531
+ state: i,
532
+ relative: c,
533
+ preventScrollReset: m,
534
+ unstable_viewTransition: h
535
+ });
536
+ };
537
+ return /* @__PURE__ */ o.createElement("form", g({
538
+ ref: t,
539
+ method: b,
540
+ action: _,
541
+ onSubmit: r ? l : N
542
+ }, S));
543
+ });
544
+ process.env.NODE_ENV !== "production" && (se.displayName = "Form");
545
+ function Te(e) {
546
+ let {
547
+ getKey: t,
548
+ storageKey: n
549
+ } = e;
550
+ return De({
551
+ getKey: t,
552
+ storageKey: n
553
+ }), null;
554
+ }
555
+ process.env.NODE_ENV !== "production" && (Te.displayName = "ScrollRestoration");
556
+ var D;
557
+ (function(e) {
558
+ e.UseScrollRestoration = "useScrollRestoration", e.UseSubmit = "useSubmit", e.UseSubmitFetcher = "useSubmitFetcher", e.UseFetcher = "useFetcher", e.useViewTransitionState = "useViewTransitionState";
559
+ })(D || (D = {}));
560
+ var I;
561
+ (function(e) {
562
+ e.UseFetcher = "useFetcher", e.UseFetchers = "useFetchers", e.UseScrollRestoration = "useScrollRestoration";
563
+ })(I || (I = {}));
564
+ function Le(e) {
565
+ return e + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
566
+ }
567
+ function Z(e) {
568
+ let t = o.useContext(ae);
569
+ return t || (process.env.NODE_ENV !== "production" ? E(!1, Le(e)) : E(!1)), t;
570
+ }
571
+ function le(e) {
572
+ let t = o.useContext(J);
573
+ return t || (process.env.NODE_ENV !== "production" ? E(!1, Le(e)) : E(!1)), t;
574
+ }
575
+ function xe(e, t) {
576
+ let {
577
+ target: n,
578
+ replace: a,
579
+ state: r,
580
+ preventScrollReset: s,
581
+ relative: i,
582
+ unstable_viewTransition: u
583
+ } = t === void 0 ? {} : t, f = ne(), l = A(), c = V(e, {
584
+ relative: i
585
+ });
586
+ return o.useCallback((m) => {
587
+ if (_t(m, n)) {
588
+ m.preventDefault();
589
+ let h = a !== void 0 ? a : q(l) === q(c);
590
+ f(e, {
591
+ replace: h,
592
+ state: r,
593
+ preventScrollReset: s,
594
+ relative: i,
595
+ unstable_viewTransition: u
596
+ });
597
+ }
598
+ }, [l, f, c, a, r, n, e, s, i, u]);
599
+ }
600
+ function Gt(e) {
601
+ process.env.NODE_ENV !== "production" && H(typeof URLSearchParams < "u", "You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");
602
+ let t = o.useRef(G(e)), n = o.useRef(!1), a = A(), r = o.useMemo(() => (
603
+ // Only merge in the defaults if we haven't yet called setSearchParams.
604
+ // Once we call that we want those to take precedence, otherwise you can't
605
+ // remove a param with setSearchParams({}) if it has an initial value
606
+ Nt(a.search, n.current ? null : t.current)
607
+ ), [a.search]), s = ne(), i = o.useCallback((u, f) => {
608
+ const l = G(typeof u == "function" ? u(r) : u);
609
+ n.current = !0, s("?" + l, f);
610
+ }, [s, r]);
611
+ return [r, i];
612
+ }
613
+ function Jt() {
614
+ if (typeof document > "u")
615
+ throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.");
616
+ }
617
+ let Xt = 0, Fe = () => "__" + String(++Xt) + "__";
618
+ function ue() {
619
+ let {
620
+ router: e
621
+ } = Z(D.UseSubmit), {
622
+ basename: t
623
+ } = o.useContext(O), n = pe();
624
+ return o.useCallback(function(a, r) {
625
+ r === void 0 && (r = {}), Jt();
626
+ let {
627
+ action: s,
628
+ method: i,
629
+ encType: u,
630
+ formData: f,
631
+ body: l
632
+ } = Lt(a, t);
633
+ if (r.navigate === !1) {
634
+ let c = r.fetcherKey || Fe();
635
+ e.fetch(c, n, r.action || s, {
636
+ preventScrollReset: r.preventScrollReset,
637
+ formData: f,
638
+ body: l,
639
+ formMethod: r.method || i,
640
+ formEncType: r.encType || u,
641
+ unstable_flushSync: r.unstable_flushSync
642
+ });
643
+ } else
644
+ e.navigate(r.action || s, {
645
+ preventScrollReset: r.preventScrollReset,
646
+ formData: f,
647
+ body: l,
648
+ formMethod: r.method || i,
649
+ formEncType: r.encType || u,
650
+ replace: r.replace,
651
+ state: r.state,
652
+ fromRouteId: n,
653
+ unstable_flushSync: r.unstable_flushSync,
654
+ unstable_viewTransition: r.unstable_viewTransition
655
+ });
656
+ }, [e, t, n]);
657
+ }
658
+ function Pe(e, t) {
659
+ let {
660
+ relative: n
661
+ } = t === void 0 ? {} : t, {
662
+ basename: a
663
+ } = o.useContext(O), r = o.useContext(re);
664
+ r || (process.env.NODE_ENV !== "production" ? E(!1, "useFormAction must be used inside a RouteContext") : E(!1));
665
+ let [s] = r.matches.slice(-1), i = g({}, V(e || ".", {
666
+ relative: n
667
+ })), u = A();
668
+ if (e == null) {
669
+ i.search = u.search;
670
+ let f = new URLSearchParams(i.search);
671
+ f.has("index") && f.get("index") === "" && (f.delete("index"), i.search = f.toString() ? "?" + f.toString() : "");
672
+ }
673
+ return (!e || e === ".") && s.route.index && (i.search = i.search ? i.search.replace(/^\?/, "?index&") : "?index"), a !== "/" && (i.pathname = i.pathname === "/" ? a : st([a, i.pathname])), q(i);
674
+ }
675
+ function $t(e) {
676
+ var t;
677
+ let {
678
+ key: n
679
+ } = e === void 0 ? {} : e, {
680
+ router: a
681
+ } = Z(D.UseFetcher), r = le(I.UseFetcher), s = o.useContext(Q), i = o.useContext(re), u = (t = i.matches[i.matches.length - 1]) == null ? void 0 : t.route.id;
682
+ s || (process.env.NODE_ENV !== "production" ? E(!1, "useFetcher must be used inside a FetchersContext") : E(!1)), i || (process.env.NODE_ENV !== "production" ? E(!1, "useFetcher must be used inside a RouteContext") : E(!1)), u == null && (process.env.NODE_ENV !== "production" ? E(!1, 'useFetcher can only be used on routes that contain a unique "id"') : E(!1));
683
+ let f = de ? de() : "", [l, c] = o.useState(n || f);
684
+ n && n !== l ? c(n) : l || c(Fe()), o.useEffect(() => (a.getFetcher(l), () => {
685
+ a.deleteFetcher(l);
686
+ }), [a, l]);
687
+ let m = o.useCallback((d, p) => {
688
+ u || (process.env.NODE_ENV !== "production" ? E(!1, "No routeId available for fetcher.load()") : E(!1)), a.fetch(l, u, d, p);
689
+ }, [l, u, a]), h = ue(), S = o.useCallback((d, p) => {
690
+ h(d, g({}, p, {
691
+ navigate: !1,
692
+ fetcherKey: l
693
+ }));
694
+ }, [l, h]), w = o.useMemo(() => {
695
+ let d = /* @__PURE__ */ o.forwardRef((p, v) => /* @__PURE__ */ o.createElement(se, g({}, p, {
696
+ navigate: !1,
697
+ fetcherKey: l,
698
+ ref: v
699
+ })));
700
+ return process.env.NODE_ENV !== "production" && (d.displayName = "fetcher.Form"), d;
701
+ }, [l]), _ = r.fetchers.get(l) || lt, b = s.get(l);
702
+ return o.useMemo(() => g({
703
+ Form: w,
704
+ submit: S,
705
+ load: m
706
+ }, _, {
707
+ data: b
708
+ }), [w, S, m, _, b]);
709
+ }
710
+ function Qt() {
711
+ let e = le(I.UseFetchers);
712
+ return Array.from(e.fetchers.entries()).map((t) => {
713
+ let [n, a] = t;
714
+ return g({}, a, {
715
+ key: n
716
+ });
717
+ });
718
+ }
719
+ const me = "react-router-scroll-positions";
720
+ let z = {};
721
+ function De(e) {
722
+ let {
723
+ getKey: t,
724
+ storageKey: n
725
+ } = e === void 0 ? {} : e, {
726
+ router: a
727
+ } = Z(D.UseScrollRestoration), {
728
+ restoreScrollPosition: r,
729
+ preventScrollReset: s
730
+ } = le(I.UseScrollRestoration), {
731
+ basename: i
732
+ } = o.useContext(O), u = A(), f = ye(), l = we();
733
+ o.useEffect(() => (window.history.scrollRestoration = "manual", () => {
734
+ window.history.scrollRestoration = "auto";
735
+ }), []), en(o.useCallback(() => {
736
+ if (l.state === "idle") {
737
+ let c = (t ? t(u, f) : null) || u.key;
738
+ z[c] = window.scrollY;
739
+ }
740
+ try {
741
+ sessionStorage.setItem(n || me, JSON.stringify(z));
742
+ } catch (c) {
743
+ process.env.NODE_ENV !== "production" && H(!1, "Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (" + c + ").");
744
+ }
745
+ window.history.scrollRestoration = "auto";
746
+ }, [n, t, l.state, u, f])), typeof document < "u" && (o.useLayoutEffect(() => {
747
+ try {
748
+ let c = sessionStorage.getItem(n || me);
749
+ c && (z = JSON.parse(c));
750
+ } catch {
751
+ }
752
+ }, [n]), o.useLayoutEffect(() => {
753
+ let c = t && i !== "/" ? (h, S) => t(
754
+ // Strip the basename to match useLocation()
755
+ g({}, h, {
756
+ pathname: P(h.pathname, i) || h.pathname
757
+ }),
758
+ S
759
+ ) : t, m = a == null ? void 0 : a.enableScrollRestoration(z, () => window.scrollY, c);
760
+ return () => m && m();
761
+ }, [a, i, t]), o.useLayoutEffect(() => {
762
+ if (r !== !1) {
763
+ if (typeof r == "number") {
764
+ window.scrollTo(0, r);
765
+ return;
766
+ }
767
+ if (u.hash) {
768
+ let c = document.getElementById(decodeURIComponent(u.hash.slice(1)));
769
+ if (c) {
770
+ c.scrollIntoView();
771
+ return;
772
+ }
773
+ }
774
+ s !== !0 && window.scrollTo(0, 0);
775
+ }
776
+ }, [u, r, s]));
777
+ }
778
+ function Zt(e, t) {
779
+ let {
780
+ capture: n
781
+ } = t || {};
782
+ o.useEffect(() => {
783
+ let a = n != null ? {
784
+ capture: n
785
+ } : void 0;
786
+ return window.addEventListener("beforeunload", e, a), () => {
787
+ window.removeEventListener("beforeunload", e, a);
788
+ };
789
+ }, [e, n]);
790
+ }
791
+ function en(e, t) {
792
+ let {
793
+ capture: n
794
+ } = {};
795
+ o.useEffect(() => {
796
+ let a = n != null ? {
797
+ capture: n
798
+ } : void 0;
799
+ return window.addEventListener("pagehide", e, a), () => {
800
+ window.removeEventListener("pagehide", e, a);
801
+ };
802
+ }, [e, n]);
803
+ }
804
+ function tn(e) {
805
+ let {
806
+ when: t,
807
+ message: n
808
+ } = e, a = Ee(t);
809
+ o.useEffect(() => {
810
+ a.state === "blocked" && (window.confirm(n) ? setTimeout(a.proceed, 0) : a.reset());
811
+ }, [a, n]), o.useEffect(() => {
812
+ a.state === "blocked" && !t && a.reset();
813
+ }, [a, t]);
814
+ }
815
+ function Oe(e, t) {
816
+ t === void 0 && (t = {});
817
+ let n = o.useContext($);
818
+ n == null && (process.env.NODE_ENV !== "production" ? E(!1, "`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?") : E(!1));
819
+ let {
820
+ basename: a
821
+ } = Z(D.useViewTransitionState), r = V(e, {
822
+ relative: t.relative
823
+ });
824
+ if (!n.isTransitioning)
825
+ return !1;
826
+ let s = P(n.currentLocation.pathname, a) || n.currentLocation.pathname, i = P(n.nextLocation.pathname, a) || n.nextLocation.pathname;
827
+ return te(r.pathname, i) != null || te(r.pathname, s) != null;
828
+ }
829
+ const an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
830
+ __proto__: null,
831
+ AbortedDeferredError: ut,
832
+ Await: Ve,
833
+ BrowserRouter: zt,
834
+ Form: se,
835
+ HashRouter: Wt,
836
+ Link: ie,
837
+ MemoryRouter: Me,
838
+ NavLink: Ce,
839
+ Navigate: He,
840
+ get NavigationType() {
841
+ return ct;
842
+ },
843
+ Outlet: Ke,
844
+ Route: Be,
845
+ Router: M,
846
+ RouterProvider: Kt,
847
+ Routes: je,
848
+ ScrollRestoration: Te,
849
+ UNSAFE_DataRouterContext: ae,
850
+ UNSAFE_DataRouterStateContext: J,
851
+ UNSAFE_ErrorResponseImpl: ge,
852
+ UNSAFE_FetchersContext: Q,
853
+ UNSAFE_LocationContext: ze,
854
+ UNSAFE_NavigationContext: O,
855
+ UNSAFE_RouteContext: re,
856
+ UNSAFE_ViewTransitionContext: $,
857
+ UNSAFE_useRouteId: pe,
858
+ UNSAFE_useScrollRestoration: De,
859
+ createBrowserRouter: Ot,
860
+ createHashRouter: At,
861
+ createMemoryRouter: We,
862
+ createPath: q,
863
+ createRoutesFromChildren: ce,
864
+ createRoutesFromElements: ce,
865
+ createSearchParams: G,
866
+ defer: ft,
867
+ generatePath: dt,
868
+ isRouteErrorResponse: mt,
869
+ json: ht,
870
+ matchPath: te,
871
+ matchRoutes: pt,
872
+ parsePath: vt,
873
+ redirect: yt,
874
+ redirectDocument: wt,
875
+ renderMatches: Ye,
876
+ resolvePath: Et,
877
+ unstable_HistoryRouter: Ne,
878
+ unstable_usePrompt: tn,
879
+ unstable_useViewTransitionState: Oe,
880
+ useActionData: qe,
881
+ useAsyncError: Ge,
882
+ useAsyncValue: Je,
883
+ useBeforeUnload: Zt,
884
+ useBlocker: Ee,
885
+ useFetcher: $t,
886
+ useFetchers: Qt,
887
+ useFormAction: Pe,
888
+ useHref: he,
889
+ useInRouterContext: Xe,
890
+ useLinkClickHandler: xe,
891
+ useLoaderData: $e,
892
+ useLocation: A,
893
+ useMatch: Qe,
894
+ useMatches: ye,
895
+ useNavigate: ne,
896
+ useNavigation: we,
897
+ useNavigationType: Ze,
898
+ useOutlet: et,
899
+ useOutletContext: tt,
900
+ useParams: nt,
901
+ useResolvedPath: V,
902
+ useRevalidator: rt,
903
+ useRouteError: at,
904
+ useRouteLoaderData: ot,
905
+ useRoutes: it,
906
+ useSearchParams: Gt,
907
+ useSubmit: ue
908
+ }, Symbol.toStringTag, { value: "Module" }));
909
+ export {
910
+ ie as L,
911
+ Ce as N,
912
+ Kt as R,
913
+ an as d,
914
+ Gt as u
915
+ };
916
+ //# sourceMappingURL=index-Dt-pU7Vu.js.map