zudoku 0.3.0-dev.9 → 0.3.0-dev.90

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 (663) hide show
  1. package/cli.js +5 -1
  2. package/dist/app/App.d.ts +1 -2
  3. package/dist/app/App.js +1 -29
  4. package/dist/app/App.js.map +1 -1
  5. package/dist/app/demo.d.ts +2 -0
  6. package/dist/app/demo.js +33 -0
  7. package/dist/app/demo.js.map +1 -0
  8. package/dist/app/entry.client.d.ts +2 -0
  9. package/dist/app/entry.client.js +35 -0
  10. package/dist/app/entry.client.js.map +1 -0
  11. package/dist/app/entry.server.d.ts +14 -0
  12. package/dist/app/entry.server.js +105 -0
  13. package/dist/app/entry.server.js.map +1 -0
  14. package/dist/app/main.d.ts +6 -1
  15. package/dist/app/main.js +74 -12
  16. package/dist/app/main.js.map +1 -1
  17. package/dist/app/standalone.d.ts +2 -0
  18. package/dist/app/standalone.js +38 -0
  19. package/dist/app/standalone.js.map +1 -0
  20. package/dist/app/tailwind.d.ts +1 -1
  21. package/dist/app/tailwind.js +0 -4
  22. package/dist/app/tailwind.js.map +1 -1
  23. package/dist/cli/cmds/dev.js +5 -0
  24. package/dist/cli/cmds/dev.js.map +1 -1
  25. package/dist/cli/dev/handler.d.ts +1 -0
  26. package/dist/cli/dev/handler.js +3 -1
  27. package/dist/cli/dev/handler.js.map +1 -1
  28. package/dist/config/config.d.ts +21 -46
  29. package/dist/config/validators/InputSidebarSchema.d.ts +176 -0
  30. package/dist/config/validators/InputSidebarSchema.js +71 -0
  31. package/dist/config/validators/InputSidebarSchema.js.map +1 -0
  32. package/dist/config/validators/SidebarSchema.d.ts +17 -0
  33. package/dist/config/validators/SidebarSchema.js +76 -0
  34. package/dist/config/validators/SidebarSchema.js.map +1 -0
  35. package/dist/config/validators/validate.d.ts +1263 -2
  36. package/dist/config/validators/validate.js +170 -1
  37. package/dist/config/validators/validate.js.map +1 -1
  38. package/dist/index.d.ts +1 -1
  39. package/dist/internal.d.ts +1 -0
  40. package/dist/internal.js +2 -0
  41. package/dist/internal.js.map +1 -0
  42. package/dist/lib/authentication/AuthenticationPlugin.d.ts +13 -0
  43. package/dist/lib/authentication/AuthenticationPlugin.js +31 -0
  44. package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -0
  45. package/dist/lib/authentication/authentication.d.ts +10 -9
  46. package/dist/lib/authentication/components/SignIn.d.ts +1 -0
  47. package/dist/lib/authentication/components/SignIn.js +14 -0
  48. package/dist/lib/authentication/components/SignIn.js.map +1 -0
  49. package/dist/lib/authentication/components/SignOut.d.ts +1 -0
  50. package/dist/lib/authentication/components/SignOut.js +12 -0
  51. package/dist/lib/authentication/components/SignOut.js.map +1 -0
  52. package/dist/lib/authentication/components/SignUp.d.ts +1 -0
  53. package/dist/lib/authentication/components/SignUp.js +10 -0
  54. package/dist/lib/authentication/components/SignUp.js.map +1 -0
  55. package/dist/lib/authentication/hook.js +4 -4
  56. package/dist/lib/authentication/hook.js.map +1 -1
  57. package/dist/lib/authentication/providers/auth0.js +11 -6
  58. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  59. package/dist/lib/authentication/providers/clerk.js +59 -30
  60. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  61. package/dist/lib/authentication/providers/openid.d.ts +30 -7
  62. package/dist/lib/authentication/providers/openid.js +79 -29
  63. package/dist/lib/authentication/providers/openid.js.map +1 -1
  64. package/dist/lib/authentication/state.js +1 -1
  65. package/dist/lib/authentication/state.js.map +1 -1
  66. package/dist/lib/components/Bootstrap.d.ts +13 -0
  67. package/dist/lib/components/Bootstrap.js +12 -0
  68. package/dist/lib/components/Bootstrap.js.map +1 -0
  69. package/dist/lib/components/DevPortal.d.ts +5 -23
  70. package/dist/lib/components/DevPortal.js +43 -20
  71. package/dist/lib/components/DevPortal.js.map +1 -1
  72. package/dist/lib/components/DeveloperHint.d.ts +5 -0
  73. package/dist/lib/components/DeveloperHint.js +10 -0
  74. package/dist/lib/components/DeveloperHint.js.map +1 -0
  75. package/dist/lib/components/ErrorPage.d.ts +6 -0
  76. package/dist/lib/components/ErrorPage.js +9 -0
  77. package/dist/lib/components/ErrorPage.js.map +1 -0
  78. package/dist/lib/components/Header.js +23 -4
  79. package/dist/lib/components/Header.js.map +1 -1
  80. package/dist/lib/components/Heading.d.ts +9 -4
  81. package/dist/lib/components/Heading.js +17 -2
  82. package/dist/lib/components/Heading.js.map +1 -1
  83. package/dist/lib/components/InlineCode.d.ts +5 -0
  84. package/dist/lib/components/InlineCode.js +4 -0
  85. package/dist/lib/components/InlineCode.js.map +1 -0
  86. package/dist/lib/components/Layout.js +7 -5
  87. package/dist/lib/components/Layout.js.map +1 -1
  88. package/dist/lib/components/NotFoundPage.d.ts +1 -0
  89. package/dist/lib/components/NotFoundPage.js +12 -0
  90. package/dist/lib/components/NotFoundPage.js.map +1 -0
  91. package/dist/lib/components/SlotletProvider.d.ts +9 -0
  92. package/dist/lib/components/SlotletProvider.js +11 -0
  93. package/dist/lib/components/SlotletProvider.js.map +1 -0
  94. package/dist/lib/components/SyntaxHighlight.d.ts +3 -2
  95. package/dist/lib/components/SyntaxHighlight.js +24 -22
  96. package/dist/lib/components/SyntaxHighlight.js.map +1 -1
  97. package/dist/lib/components/TopNavigation.d.ts +1 -1
  98. package/dist/lib/components/TopNavigation.js +8 -4
  99. package/dist/lib/components/TopNavigation.js.map +1 -1
  100. package/dist/lib/components/context/ThemeContext.d.ts +1 -4
  101. package/dist/lib/components/context/ThemeContext.js +3 -29
  102. package/dist/lib/components/context/ThemeContext.js.map +1 -1
  103. package/dist/lib/components/context/ThemeProvider.d.ts +4 -0
  104. package/dist/lib/components/context/ThemeProvider.js +23 -0
  105. package/dist/lib/components/context/ThemeProvider.js.map +1 -0
  106. package/dist/lib/components/context/ZudokuContext.d.ts +15 -0
  107. package/dist/lib/components/context/ZudokuContext.js +43 -0
  108. package/dist/lib/components/context/ZudokuContext.js.map +1 -0
  109. package/dist/lib/components/context/ZudokuProvider.d.ts +5 -0
  110. package/dist/lib/components/context/ZudokuProvider.js +16 -0
  111. package/dist/lib/components/context/ZudokuProvider.js.map +1 -0
  112. package/dist/lib/components/index.d.ts +32 -3
  113. package/dist/lib/components/index.js +21 -3
  114. package/dist/lib/components/index.js.map +1 -1
  115. package/dist/lib/components/navigation/Sidebar.d.ts +1 -0
  116. package/dist/lib/components/navigation/Sidebar.js +12 -0
  117. package/dist/lib/components/navigation/Sidebar.js.map +1 -0
  118. package/dist/lib/components/navigation/SidebarBadge.d.ts +22 -0
  119. package/dist/lib/components/navigation/SidebarBadge.js +24 -0
  120. package/dist/lib/components/navigation/SidebarBadge.js.map +1 -0
  121. package/dist/lib/components/navigation/SidebarCategory.d.ts +5 -0
  122. package/dist/lib/components/navigation/SidebarCategory.js +33 -0
  123. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -0
  124. package/dist/lib/components/navigation/SidebarItem.d.ts +12 -0
  125. package/dist/lib/components/navigation/SidebarItem.js +42 -0
  126. package/dist/lib/components/navigation/SidebarItem.js.map +1 -0
  127. package/dist/lib/components/navigation/{SideNavigationWrapper.d.ts → SidebarWrapper.d.ts} +1 -1
  128. package/dist/lib/components/navigation/{SideNavigationWrapper.js → SidebarWrapper.js} +2 -2
  129. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -0
  130. package/dist/lib/components/navigation/utils.d.ts +16 -0
  131. package/dist/lib/components/navigation/utils.js +85 -0
  132. package/dist/lib/components/navigation/utils.js.map +1 -0
  133. package/dist/lib/core/DevPortalContext.d.ts +58 -42
  134. package/dist/lib/core/DevPortalContext.js +18 -19
  135. package/dist/lib/core/DevPortalContext.js.map +1 -1
  136. package/dist/lib/core/plugins.d.ts +25 -10
  137. package/dist/lib/core/plugins.js +3 -0
  138. package/dist/lib/core/plugins.js.map +1 -1
  139. package/dist/lib/errors/ErrorAlert.d.ts +3 -0
  140. package/dist/lib/errors/ErrorAlert.js +8 -0
  141. package/dist/lib/errors/ErrorAlert.js.map +1 -0
  142. package/dist/lib/errors/RouterError.d.ts +1 -0
  143. package/dist/lib/errors/RouterError.js +12 -0
  144. package/dist/lib/errors/RouterError.js.map +1 -0
  145. package/dist/lib/errors/ServerError.d.ts +3 -0
  146. package/dist/lib/errors/ServerError.js +6 -0
  147. package/dist/lib/errors/ServerError.js.map +1 -0
  148. package/dist/lib/errors/TopLevelError.d.ts +2 -0
  149. package/dist/lib/errors/TopLevelError.js +7 -0
  150. package/dist/lib/errors/TopLevelError.js.map +1 -0
  151. package/dist/lib/oas/graphql/index.js +8 -5
  152. package/dist/lib/oas/graphql/index.js.map +1 -1
  153. package/dist/lib/oas/parser/index.d.ts +1 -1
  154. package/dist/lib/oas/parser/index.js +38 -12
  155. package/dist/lib/oas/parser/index.js.map +1 -1
  156. package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.js +4 -4
  157. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -0
  158. package/dist/lib/plugins/api-keys/ProtectedRoute.d.ts +1 -0
  159. package/dist/lib/plugins/api-keys/ProtectedRoute.js +14 -0
  160. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -0
  161. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +54 -0
  162. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -0
  163. package/dist/lib/plugins/{api-key → api-keys}/index.d.ts +4 -5
  164. package/dist/lib/plugins/{api-key → api-keys}/index.js +18 -20
  165. package/dist/lib/plugins/api-keys/index.js.map +1 -0
  166. package/dist/lib/plugins/custom-page/index.d.ts +8 -0
  167. package/dist/lib/plugins/custom-page/index.js +12 -0
  168. package/dist/lib/plugins/custom-page/index.js.map +1 -0
  169. package/dist/lib/plugins/markdown/MdxPage.d.ts +3 -2
  170. package/dist/lib/plugins/markdown/MdxPage.js +10 -40
  171. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  172. package/dist/lib/plugins/markdown/Toc.js +17 -9
  173. package/dist/lib/plugins/markdown/Toc.js.map +1 -1
  174. package/dist/lib/plugins/markdown/generateRoutes.d.ts +3 -3
  175. package/dist/lib/plugins/markdown/generateRoutes.js +20 -43
  176. package/dist/lib/plugins/markdown/generateRoutes.js.map +1 -1
  177. package/dist/lib/plugins/markdown/index.d.ts +4 -1
  178. package/dist/lib/plugins/markdown/index.js +3 -7
  179. package/dist/lib/plugins/markdown/index.js.map +1 -1
  180. package/dist/lib/plugins/openapi/ColorizedParam.d.ts +2 -1
  181. package/dist/lib/plugins/openapi/ColorizedParam.js +14 -9
  182. package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
  183. package/dist/lib/plugins/openapi/OperationList.js +17 -5
  184. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  185. package/dist/lib/plugins/openapi/OperationListItem.js +11 -5
  186. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  187. package/dist/lib/plugins/openapi/ParameterList.js +2 -1
  188. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  189. package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
  190. package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
  191. package/dist/lib/plugins/openapi/{MakeRequest.d.ts → PlaygroundDialogWrapper.d.ts} +2 -1
  192. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +23 -0
  193. package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -0
  194. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +3 -9
  195. package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
  196. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -1
  197. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  198. package/dist/lib/plugins/openapi/Route.d.ts +6 -0
  199. package/dist/lib/plugins/openapi/Route.js +8 -0
  200. package/dist/lib/plugins/openapi/Route.js.map +1 -0
  201. package/dist/lib/plugins/openapi/SchemaListView.js +10 -26
  202. package/dist/lib/plugins/openapi/SchemaListView.js.map +1 -1
  203. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +8 -0
  204. package/dist/lib/plugins/openapi/SchemaListViewItem.js +25 -0
  205. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +1 -0
  206. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +8 -0
  207. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +17 -0
  208. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +1 -0
  209. package/dist/lib/plugins/openapi/Sidecar.d.ts +4 -0
  210. package/dist/lib/plugins/openapi/Sidecar.js +55 -21
  211. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  212. package/dist/lib/plugins/openapi/SidecarBox.d.ts +1 -0
  213. package/dist/lib/plugins/openapi/SidecarBox.js +3 -2
  214. package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
  215. package/dist/lib/plugins/openapi/{Select.d.ts → SimpleSelect.d.ts} +3 -2
  216. package/dist/lib/plugins/openapi/SimpleSelect.js +5 -0
  217. package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -0
  218. package/dist/lib/plugins/openapi/StaggeredRender.d.ts +8 -0
  219. package/dist/lib/plugins/openapi/StaggeredRender.js +18 -0
  220. package/dist/lib/plugins/openapi/StaggeredRender.js.map +1 -0
  221. package/dist/lib/plugins/openapi/client/createMemoryClient.d.ts +12 -0
  222. package/dist/lib/plugins/openapi/client/createMemoryClient.js +46 -0
  223. package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -0
  224. package/dist/lib/plugins/openapi/client/createServer.d.ts +4 -0
  225. package/dist/lib/plugins/openapi/client/createServer.js +30 -0
  226. package/dist/lib/plugins/openapi/client/createServer.js.map +1 -0
  227. package/dist/lib/plugins/openapi/client/createWorkerClient.d.ts +10 -0
  228. package/dist/lib/plugins/openapi/{worker/createSharedWorkerClient.js → client/createWorkerClient.js} +15 -2
  229. package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -0
  230. package/dist/lib/plugins/openapi/client/interfaces.d.ts +4 -0
  231. package/dist/lib/plugins/openapi/client/interfaces.js +2 -0
  232. package/dist/lib/plugins/openapi/client/interfaces.js.map +1 -0
  233. package/dist/lib/plugins/openapi/{worker → client}/worker.js +2 -2
  234. package/dist/lib/plugins/openapi/client/worker.js.map +1 -0
  235. package/dist/lib/plugins/openapi/context.d.ts +5 -0
  236. package/dist/lib/plugins/openapi/context.js +11 -0
  237. package/dist/lib/plugins/openapi/context.js.map +1 -0
  238. package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -6
  239. package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
  240. package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
  241. package/dist/lib/plugins/openapi/graphql/graphql.d.ts +15 -15
  242. package/dist/lib/plugins/openapi/graphql/graphql.js +67 -67
  243. package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
  244. package/dist/lib/plugins/openapi/index.d.ts +4 -18
  245. package/dist/lib/plugins/openapi/index.js +76 -32
  246. package/dist/lib/plugins/openapi/index.js.map +1 -1
  247. package/dist/lib/plugins/openapi/interfaces.d.ts +15 -0
  248. package/dist/lib/plugins/openapi/interfaces.js +2 -0
  249. package/dist/lib/plugins/openapi/interfaces.js.map +1 -0
  250. package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
  251. package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
  252. package/dist/lib/plugins/openapi/playground/PathParams.d.ts +4 -5
  253. package/dist/lib/plugins/openapi/playground/PathParams.js +9 -13
  254. package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
  255. package/dist/lib/plugins/openapi/playground/Playground.d.ts +26 -14
  256. package/dist/lib/plugins/openapi/playground/Playground.js +54 -26
  257. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  258. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.d.ts +5 -0
  259. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +12 -0
  260. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -0
  261. package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +4 -3
  262. package/dist/lib/plugins/openapi/playground/QueryParams.js +21 -12
  263. package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
  264. package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +4 -0
  265. package/dist/lib/plugins/openapi/playground/ResponseTab.js +40 -0
  266. package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -0
  267. package/dist/lib/plugins/openapi/playground/createUrl.d.ts +1 -1
  268. package/dist/lib/plugins/openapi/playground/createUrl.js +5 -9
  269. package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
  270. package/dist/lib/plugins/openapi/util/prose.d.ts +1 -0
  271. package/dist/lib/plugins/openapi/util/prose.js +4 -0
  272. package/dist/lib/plugins/openapi/util/prose.js.map +1 -0
  273. package/dist/lib/plugins/openapi-worker.d.ts +1 -1
  274. package/dist/lib/plugins/openapi-worker.js +1 -1
  275. package/dist/lib/plugins/openapi-worker.js.map +1 -1
  276. package/dist/lib/plugins/redirect/index.d.ts +0 -1
  277. package/dist/lib/plugins/redirect/index.js +3 -4
  278. package/dist/lib/plugins/redirect/index.js.map +1 -1
  279. package/dist/lib/ui/Button.d.ts +5 -1
  280. package/dist/lib/ui/Button.js +24 -1
  281. package/dist/lib/ui/Button.js.map +1 -1
  282. package/dist/lib/ui/Callout.js +2 -2
  283. package/dist/lib/ui/Callout.js.map +1 -1
  284. package/dist/lib/ui/Card.js +1 -1
  285. package/dist/lib/ui/Card.js.map +1 -1
  286. package/dist/lib/ui/DropdownMenu.d.ts +27 -0
  287. package/dist/lib/ui/DropdownMenu.js +36 -0
  288. package/dist/lib/ui/DropdownMenu.js.map +1 -0
  289. package/dist/lib/ui/Input.js.map +1 -0
  290. package/dist/lib/util/MdxComponents.d.ts +2 -2
  291. package/dist/lib/util/MdxComponents.js +7 -5
  292. package/dist/lib/util/MdxComponents.js.map +1 -1
  293. package/dist/lib/util/fetchTimeout.d.ts +1 -0
  294. package/dist/lib/util/fetchTimeout.js +14 -0
  295. package/dist/lib/util/fetchTimeout.js.map +1 -0
  296. package/dist/lib/util/groupBy.d.ts +1 -6
  297. package/dist/lib/util/groupBy.js +10 -8
  298. package/dist/lib/util/groupBy.js.map +1 -1
  299. package/dist/lib/util/invariant.d.ts +6 -0
  300. package/dist/lib/util/invariant.js +21 -0
  301. package/dist/lib/util/invariant.js.map +1 -0
  302. package/dist/lib/util/joinPath.js +2 -1
  303. package/dist/lib/util/joinPath.js.map +1 -1
  304. package/dist/lib/util/logInit.d.ts +1 -0
  305. package/dist/lib/util/logInit.js +9 -0
  306. package/dist/lib/util/logInit.js.map +1 -0
  307. package/dist/lib/util/objectEntries.d.ts +4 -0
  308. package/dist/lib/util/objectEntries.js +2 -0
  309. package/dist/lib/util/objectEntries.js.map +1 -0
  310. package/dist/lib/util/renderIf.d.ts +1 -0
  311. package/dist/lib/util/renderIf.js +2 -0
  312. package/dist/lib/util/renderIf.js.map +1 -0
  313. package/dist/lib/util/requestIdleCallbackPolyfill.d.ts +1 -0
  314. package/dist/lib/util/requestIdleCallbackPolyfill.js +7 -0
  315. package/dist/lib/util/requestIdleCallbackPolyfill.js.map +1 -0
  316. package/dist/lib/util/useScrollToAnchor.js +31 -17
  317. package/dist/lib/util/useScrollToAnchor.js.map +1 -1
  318. package/dist/vite/build.js +30 -7
  319. package/dist/vite/build.js.map +1 -1
  320. package/dist/vite/config.d.ts +20 -12
  321. package/dist/vite/config.js +107 -55
  322. package/dist/vite/config.js.map +1 -1
  323. package/dist/vite/config.test.js +6 -3
  324. package/dist/vite/config.test.js.map +1 -1
  325. package/dist/vite/dev-server.d.ts +2 -1
  326. package/dist/vite/dev-server.js +44 -15
  327. package/dist/vite/dev-server.js.map +1 -1
  328. package/dist/vite/html.js +18 -5
  329. package/dist/vite/html.js.map +1 -1
  330. package/dist/vite/plugin-api-keys.js +7 -8
  331. package/dist/vite/plugin-api-keys.js.map +1 -1
  332. package/dist/vite/plugin-api.js +9 -20
  333. package/dist/vite/plugin-api.js.map +1 -1
  334. package/dist/vite/plugin-auth.js +5 -6
  335. package/dist/vite/plugin-auth.js.map +1 -1
  336. package/dist/vite/plugin-component.js +5 -2
  337. package/dist/vite/plugin-component.js.map +1 -1
  338. package/dist/vite/plugin-config.d.ts +3 -6
  339. package/dist/vite/plugin-config.js +5 -8
  340. package/dist/vite/plugin-config.js.map +1 -1
  341. package/dist/vite/plugin-custom-css.d.ts +6 -0
  342. package/dist/vite/plugin-custom-css.js +54 -0
  343. package/dist/vite/plugin-custom-css.js.map +1 -0
  344. package/dist/vite/plugin-docs.js +15 -5
  345. package/dist/vite/plugin-docs.js.map +1 -1
  346. package/dist/vite/plugin-mdx.d.ts +3 -1
  347. package/dist/vite/plugin-mdx.js +5 -5
  348. package/dist/vite/plugin-mdx.js.map +1 -1
  349. package/dist/vite/plugin-metadata.js +1 -1
  350. package/dist/vite/plugin-metadata.js.map +1 -1
  351. package/dist/vite/plugin-redirect.js +10 -10
  352. package/dist/vite/plugin-redirect.js.map +1 -1
  353. package/dist/vite/plugin-sidebar.d.ts +3 -0
  354. package/dist/vite/plugin-sidebar.js +23 -0
  355. package/dist/vite/plugin-sidebar.js.map +1 -0
  356. package/dist/vite/plugin.js +5 -5
  357. package/dist/vite/plugin.js.map +1 -1
  358. package/dist/vite/prerender.d.ts +17 -0
  359. package/dist/vite/prerender.js +79 -0
  360. package/dist/vite/prerender.js.map +1 -0
  361. package/lib/AuthenticationPlugin-C3dzfGaA.js +55 -0
  362. package/lib/AuthenticationPlugin-C3dzfGaA.js.map +1 -0
  363. package/lib/CategoryHeading-BWq12Bfa.js +10 -0
  364. package/lib/CategoryHeading-BWq12Bfa.js.map +1 -0
  365. package/lib/Combination-Djh-LWhb.js +2789 -0
  366. package/lib/Combination-Djh-LWhb.js.map +1 -0
  367. package/lib/DeveloperHint-BQSFXH01.js +10 -0
  368. package/lib/DeveloperHint-BQSFXH01.js.map +1 -0
  369. package/lib/Input-SCGD-EvD.js +2239 -0
  370. package/lib/Input-SCGD-EvD.js.map +1 -0
  371. package/lib/Markdown-B_Gax7at.js +14108 -0
  372. package/lib/Markdown-B_Gax7at.js.map +1 -0
  373. package/lib/MdxPage-d02krMBw.js +187 -0
  374. package/lib/MdxPage-d02krMBw.js.map +1 -0
  375. package/lib/OperationList-BQweX28o.js +448 -0
  376. package/lib/OperationList-BQweX28o.js.map +1 -0
  377. package/lib/Route-BPGW1TS_.js +14 -0
  378. package/lib/Route-BPGW1TS_.js.map +1 -0
  379. package/lib/SlotletProvider-CzMAO73_.js +82 -0
  380. package/lib/SlotletProvider-CzMAO73_.js.map +1 -0
  381. package/lib/Spinner-DEgs-1Gu.js +274 -0
  382. package/lib/Spinner-DEgs-1Gu.js.map +1 -0
  383. package/lib/ZudokuContext-C3JtXViU.js +1084 -0
  384. package/lib/ZudokuContext-C3JtXViU.js.map +1 -0
  385. package/lib/_commonjsHelpers-BVfed4GL.js +29 -0
  386. package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
  387. package/lib/assets/index-BPdJm2ty.js +1 -0
  388. package/lib/assets/index-BPdJm2ty.js.map +1 -0
  389. package/lib/assets/{worker-BCcpCNJ7.js → worker-CyHZIIfE.js} +10727 -10300
  390. package/lib/assets/worker-CyHZIIfE.js.map +1 -0
  391. package/lib/index-7kcHaXD6.js +1771 -0
  392. package/lib/index-7kcHaXD6.js.map +1 -0
  393. package/lib/index-B8BCBPkc.js +124 -0
  394. package/lib/index-B8BCBPkc.js.map +1 -0
  395. package/lib/index-DoIWqOG1.js +5934 -0
  396. package/lib/index-DoIWqOG1.js.map +1 -0
  397. package/lib/index-pI9JkN46.js +4765 -0
  398. package/lib/index-pI9JkN46.js.map +1 -0
  399. package/lib/joinPath-VeNuJa7y.js +8 -0
  400. package/lib/joinPath-VeNuJa7y.js.map +1 -0
  401. package/lib/jsx-runtime-B6kdoens.js +635 -0
  402. package/lib/jsx-runtime-B6kdoens.js.map +1 -0
  403. package/lib/prism-bash.min-DadFsM4Z.js +1 -0
  404. package/lib/prism-bash.min-DadFsM4Z.js.map +1 -0
  405. package/lib/prism-csharp.min-Yizuc34Y.js +1 -0
  406. package/lib/prism-csharp.min-Yizuc34Y.js.map +1 -0
  407. package/lib/prism-java.min-d5iT_mOd.js +1 -0
  408. package/lib/prism-java.min-d5iT_mOd.js.map +1 -0
  409. package/lib/prism-json.min-B1GJqK1k.js +1 -0
  410. package/lib/prism-json.min-B1GJqK1k.js.map +1 -0
  411. package/lib/prism-markup-templating-DZrrEs0A.js +1 -0
  412. package/lib/prism-markup-templating-DZrrEs0A.js.map +1 -0
  413. package/lib/prism-objectivec.min-BXSWqpJJ.js +1 -0
  414. package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -0
  415. package/lib/prism-php.min-o7FpoMP_.js +1 -0
  416. package/lib/prism-php.min-o7FpoMP_.js.map +1 -0
  417. package/lib/prism-ruby.min-C7LwcKyz.js +1 -0
  418. package/lib/prism-ruby.min-C7LwcKyz.js.map +1 -0
  419. package/lib/router-BiRCp01d.js +2971 -0
  420. package/lib/router-BiRCp01d.js.map +1 -0
  421. package/lib/slugify-CiPVjteN.js +28 -0
  422. package/lib/slugify-CiPVjteN.js.map +1 -0
  423. package/lib/state-DsXXkBLH.js +288 -0
  424. package/lib/state-DsXXkBLH.js.map +1 -0
  425. package/lib/{urql-DMlBWUKL.js → urql-DrBfkb92.js} +2 -2
  426. package/lib/urql-DrBfkb92.js.map +1 -0
  427. package/lib/utils-D3fcGEot.js +749 -0
  428. package/lib/utils-D3fcGEot.js.map +1 -0
  429. package/lib/zudoku.auth-auth0.js +31 -20
  430. package/lib/zudoku.auth-auth0.js.map +1 -0
  431. package/lib/zudoku.auth-clerk.js +59 -29
  432. package/lib/zudoku.auth-clerk.js.map +1 -0
  433. package/lib/zudoku.auth-openid.js +742 -573
  434. package/lib/zudoku.auth-openid.js.map +1 -0
  435. package/lib/zudoku.components.js +2008 -684
  436. package/lib/zudoku.components.js.map +1 -0
  437. package/lib/zudoku.openapi-worker.js +15035 -146
  438. package/lib/zudoku.openapi-worker.js.map +1 -0
  439. package/lib/zudoku.plugin-api-keys.js +325 -0
  440. package/lib/zudoku.plugin-api-keys.js.map +1 -0
  441. package/lib/zudoku.plugin-custom-page.js +13 -0
  442. package/lib/zudoku.plugin-custom-page.js.map +1 -0
  443. package/lib/zudoku.plugin-markdown.js +31 -0
  444. package/lib/zudoku.plugin-markdown.js.map +1 -0
  445. package/lib/zudoku.plugin-openapi.js +14 -0
  446. package/lib/zudoku.plugin-openapi.js.map +1 -0
  447. package/lib/zudoku.plugin-redirect.js +11 -0
  448. package/lib/zudoku.plugin-redirect.js.map +1 -0
  449. package/package.json +64 -25
  450. package/src/app/App.tsx +0 -41
  451. package/src/app/demo-cdn.html +26 -0
  452. package/src/app/demo.html +18 -0
  453. package/src/app/demo.tsx +46 -0
  454. package/src/app/entry.client.tsx +47 -0
  455. package/src/app/entry.server.tsx +160 -0
  456. package/src/app/main.css +83 -3
  457. package/src/app/main.tsx +87 -15
  458. package/src/app/standalone.html +20 -0
  459. package/src/app/standalone.tsx +52 -0
  460. package/src/app/tailwind.ts +2 -6
  461. package/src/lib/authentication/AuthenticationPlugin.tsx +38 -0
  462. package/src/lib/authentication/authentication.ts +6 -12
  463. package/src/lib/authentication/components/SignIn.tsx +15 -0
  464. package/src/lib/authentication/components/SignOut.tsx +13 -0
  465. package/src/lib/authentication/components/SignUp.tsx +11 -0
  466. package/src/lib/authentication/hook.ts +4 -4
  467. package/src/lib/authentication/providers/auth0.tsx +16 -6
  468. package/src/lib/authentication/providers/clerk.tsx +63 -31
  469. package/src/lib/authentication/providers/openid.tsx +104 -34
  470. package/src/lib/authentication/state.ts +1 -1
  471. package/src/lib/components/Bootstrap.tsx +44 -0
  472. package/src/lib/components/DevPortal.tsx +75 -66
  473. package/src/lib/components/DeveloperHint.tsx +25 -0
  474. package/src/lib/components/ErrorPage.tsx +28 -0
  475. package/src/lib/components/Header.tsx +106 -31
  476. package/src/lib/components/Heading.tsx +26 -7
  477. package/src/lib/components/InlineCode.tsx +19 -0
  478. package/src/lib/components/Layout.tsx +16 -11
  479. package/src/lib/components/NotFoundPage.tsx +33 -0
  480. package/src/lib/components/SlotletProvider.tsx +25 -0
  481. package/src/lib/components/SyntaxHighlight.tsx +53 -44
  482. package/src/lib/components/TopNavigation.tsx +10 -5
  483. package/src/lib/components/context/ThemeContext.tsx +3 -41
  484. package/src/lib/components/context/ThemeProvider.tsx +27 -0
  485. package/src/lib/components/context/ZudokuContext.ts +55 -0
  486. package/src/lib/components/context/ZudokuProvider.tsx +26 -0
  487. package/src/lib/components/index.ts +25 -3
  488. package/src/lib/components/navigation/Sidebar.tsx +24 -0
  489. package/src/lib/components/navigation/SidebarBadge.tsx +40 -0
  490. package/src/lib/components/navigation/SidebarCategory.tsx +105 -0
  491. package/src/lib/components/navigation/SidebarItem.tsx +100 -0
  492. package/src/lib/components/navigation/{SideNavigationWrapper.tsx → SidebarWrapper.tsx} +1 -1
  493. package/src/lib/components/navigation/utils.ts +117 -0
  494. package/src/lib/core/DevPortalContext.ts +72 -68
  495. package/src/lib/core/plugins.ts +40 -16
  496. package/src/lib/errors/ErrorAlert.tsx +21 -0
  497. package/src/lib/errors/RouterError.tsx +13 -0
  498. package/src/lib/errors/ServerError.tsx +5 -0
  499. package/src/lib/errors/TopLevelError.tsx +8 -0
  500. package/src/lib/oas/graphql/index.ts +11 -6
  501. package/src/lib/oas/parser/index.ts +41 -20
  502. package/src/lib/plugins/{api-key → api-keys}/CreateApiKey.tsx +4 -4
  503. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +29 -0
  504. package/src/lib/plugins/{api-key → api-keys}/SettingsApiKeys.tsx +49 -16
  505. package/src/lib/plugins/{api-key → api-keys}/index.tsx +27 -41
  506. package/src/lib/plugins/custom-page/index.tsx +22 -0
  507. package/src/lib/plugins/markdown/MdxPage.tsx +54 -73
  508. package/src/lib/plugins/markdown/Toc.tsx +53 -40
  509. package/src/lib/plugins/markdown/generateRoutes.tsx +35 -53
  510. package/src/lib/plugins/markdown/index.tsx +10 -7
  511. package/src/lib/plugins/openapi/ColorizedParam.tsx +23 -16
  512. package/src/lib/plugins/openapi/OperationList.tsx +46 -10
  513. package/src/lib/plugins/openapi/OperationListItem.tsx +51 -30
  514. package/src/lib/plugins/openapi/ParameterList.tsx +13 -10
  515. package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -4
  516. package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +39 -0
  517. package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +3 -15
  518. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +3 -2
  519. package/src/lib/plugins/openapi/Route.tsx +21 -0
  520. package/src/lib/plugins/openapi/SchemaListView.tsx +39 -192
  521. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +125 -0
  522. package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +63 -0
  523. package/src/lib/plugins/openapi/Sidecar.tsx +77 -30
  524. package/src/lib/plugins/openapi/SidecarBox.tsx +13 -2
  525. package/src/lib/plugins/openapi/{Select.tsx → SimpleSelect.tsx} +6 -3
  526. package/src/lib/plugins/openapi/StaggeredRender.tsx +31 -0
  527. package/src/lib/plugins/openapi/client/createMemoryClient.ts +56 -0
  528. package/src/lib/plugins/openapi/client/createServer.ts +33 -0
  529. package/src/lib/plugins/openapi/{worker/createSharedWorkerClient.ts → client/createWorkerClient.ts} +21 -2
  530. package/src/lib/plugins/openapi/client/interfaces.ts +5 -0
  531. package/src/lib/plugins/openapi/{worker → client}/worker.ts +3 -3
  532. package/src/lib/plugins/openapi/context.tsx +16 -0
  533. package/src/lib/plugins/openapi/graphql/gql.ts +8 -8
  534. package/src/lib/plugins/openapi/graphql/graphql.ts +80 -80
  535. package/src/lib/plugins/openapi/index.tsx +134 -76
  536. package/src/lib/plugins/openapi/interfaces.ts +9 -0
  537. package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
  538. package/src/lib/plugins/openapi/playground/PathParams.tsx +76 -50
  539. package/src/lib/plugins/openapi/playground/Playground.tsx +240 -230
  540. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +40 -0
  541. package/src/lib/plugins/openapi/playground/QueryParams.tsx +107 -66
  542. package/src/lib/plugins/openapi/playground/ResponseTab.tsx +76 -0
  543. package/src/lib/plugins/openapi/playground/createUrl.ts +12 -15
  544. package/src/lib/plugins/openapi/util/prose.ts +7 -0
  545. package/src/lib/plugins/openapi-worker.ts +1 -1
  546. package/src/lib/plugins/redirect/index.tsx +3 -4
  547. package/src/lib/ui/Button.tsx +32 -2
  548. package/src/lib/ui/Callout.tsx +4 -4
  549. package/src/lib/ui/Card.tsx +1 -1
  550. package/src/lib/ui/DropdownMenu.tsx +199 -0
  551. package/src/lib/util/MdxComponents.tsx +7 -15
  552. package/src/lib/util/fetchTimeout.tsx +21 -0
  553. package/src/lib/util/groupBy.ts +7 -12
  554. package/src/lib/util/invariant.ts +26 -0
  555. package/src/lib/util/joinPath.tsx +2 -1
  556. package/src/lib/util/logInit.ts +9 -0
  557. package/src/lib/util/objectEntries.ts +5 -0
  558. package/src/lib/util/renderIf.ts +4 -0
  559. package/src/lib/util/requestIdleCallbackPolyfill.ts +6 -0
  560. package/src/lib/util/useScrollToAnchor.ts +39 -18
  561. package/dist/lib/authentication/Callback.d.ts +0 -3
  562. package/dist/lib/authentication/Callback.js +0 -34
  563. package/dist/lib/authentication/Callback.js.map +0 -1
  564. package/dist/lib/components/Input.js.map +0 -1
  565. package/dist/lib/components/Link.d.ts +0 -1
  566. package/dist/lib/components/Link.js +0 -2
  567. package/dist/lib/components/Link.js.map +0 -1
  568. package/dist/lib/components/Router.d.ts +0 -4
  569. package/dist/lib/components/Router.js +0 -20
  570. package/dist/lib/components/Router.js.map +0 -1
  571. package/dist/lib/components/context/DevPortalProvider.d.ts +0 -9
  572. package/dist/lib/components/context/DevPortalProvider.js +0 -39
  573. package/dist/lib/components/context/DevPortalProvider.js.map +0 -1
  574. package/dist/lib/components/navigation/SideNavigation.d.ts +0 -1
  575. package/dist/lib/components/navigation/SideNavigation.js +0 -11
  576. package/dist/lib/components/navigation/SideNavigation.js.map +0 -1
  577. package/dist/lib/components/navigation/SideNavigationCategory.d.ts +0 -4
  578. package/dist/lib/components/navigation/SideNavigationCategory.js +0 -26
  579. package/dist/lib/components/navigation/SideNavigationCategory.js.map +0 -1
  580. package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -13
  581. package/dist/lib/components/navigation/SideNavigationItem.js +0 -44
  582. package/dist/lib/components/navigation/SideNavigationItem.js.map +0 -1
  583. package/dist/lib/components/navigation/SideNavigationWrapper.js.map +0 -1
  584. package/dist/lib/components/navigation/useNavigationCollapsibleState.d.ts +0 -6
  585. package/dist/lib/components/navigation/useNavigationCollapsibleState.js +0 -16
  586. package/dist/lib/components/navigation/useNavigationCollapsibleState.js.map +0 -1
  587. package/dist/lib/components/navigation/util.d.ts +0 -8
  588. package/dist/lib/components/navigation/util.js +0 -15
  589. package/dist/lib/components/navigation/util.js.map +0 -1
  590. package/dist/lib/core/helmet.d.ts +0 -4
  591. package/dist/lib/core/helmet.js +0 -5
  592. package/dist/lib/core/helmet.js.map +0 -1
  593. package/dist/lib/core/icons.d.ts +0 -1
  594. package/dist/lib/core/icons.js +0 -2
  595. package/dist/lib/core/icons.js.map +0 -1
  596. package/dist/lib/core/router.d.ts +0 -1
  597. package/dist/lib/core/router.js +0 -2
  598. package/dist/lib/core/router.js.map +0 -1
  599. package/dist/lib/plugins/api-key/CreateApiKey.js.map +0 -1
  600. package/dist/lib/plugins/api-key/SettingsApiKeys.js +0 -38
  601. package/dist/lib/plugins/api-key/SettingsApiKeys.js.map +0 -1
  602. package/dist/lib/plugins/api-key/index.js.map +0 -1
  603. package/dist/lib/plugins/index.d.ts +0 -4
  604. package/dist/lib/plugins/index.js +0 -5
  605. package/dist/lib/plugins/index.js.map +0 -1
  606. package/dist/lib/plugins/openapi/MakeRequest.js +0 -43
  607. package/dist/lib/plugins/openapi/MakeRequest.js.map +0 -1
  608. package/dist/lib/plugins/openapi/MethodBadge.d.ts +0 -13
  609. package/dist/lib/plugins/openapi/MethodBadge.js +0 -26
  610. package/dist/lib/plugins/openapi/MethodBadge.js.map +0 -1
  611. package/dist/lib/plugins/openapi/Select.js +0 -5
  612. package/dist/lib/plugins/openapi/Select.js.map +0 -1
  613. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.d.ts +0 -5
  614. package/dist/lib/plugins/openapi/worker/createSharedWorkerClient.js.map +0 -1
  615. package/dist/lib/plugins/openapi/worker/shared-worker.d.ts +0 -1
  616. package/dist/lib/plugins/openapi/worker/shared-worker.js +0 -6
  617. package/dist/lib/plugins/openapi/worker/shared-worker.js.map +0 -1
  618. package/dist/lib/plugins/openapi/worker/worker.js.map +0 -1
  619. package/dist/lib/ui/button-variants.d.ts +0 -4
  620. package/dist/lib/ui/button-variants.js +0 -24
  621. package/dist/lib/ui/button-variants.js.map +0 -1
  622. package/dist/lib/util/traverseNavigation.d.ts +0 -6
  623. package/dist/lib/util/traverseNavigation.js +0 -30
  624. package/dist/lib/util/traverseNavigation.js.map +0 -1
  625. package/dist/vite/common.d.ts +0 -1
  626. package/dist/vite/common.js +0 -5
  627. package/dist/vite/common.js.map +0 -1
  628. package/dist/vite/plugin-html.d.ts +0 -3
  629. package/dist/vite/plugin-html.js +0 -47
  630. package/dist/vite/plugin-html.js.map +0 -1
  631. package/dist/vite/plugin-openapi-worker.d.ts +0 -4
  632. package/dist/vite/plugin-openapi-worker.js +0 -28
  633. package/dist/vite/plugin-openapi-worker.js.map +0 -1
  634. package/lib/Spinner-BewqqUU-.js +0 -8413
  635. package/lib/clerk-Wslx_mPo.js +0 -19685
  636. package/lib/index-PyGcnQFX.js +0 -3462
  637. package/lib/loglevel-CoH7VSwE.js +0 -152
  638. package/lib/state-2Hu1renZ.js +0 -313
  639. package/lib/zudoku.plugins.js +0 -19904
  640. package/src/lib/authentication/Callback.tsx +0 -60
  641. package/src/lib/components/Link.tsx +0 -1
  642. package/src/lib/components/Router.tsx +0 -28
  643. package/src/lib/components/context/DevPortalProvider.ts +0 -54
  644. package/src/lib/components/navigation/SideNavigation.tsx +0 -21
  645. package/src/lib/components/navigation/SideNavigationCategory.tsx +0 -76
  646. package/src/lib/components/navigation/SideNavigationItem.tsx +0 -152
  647. package/src/lib/components/navigation/useNavigationCollapsibleState.ts +0 -27
  648. package/src/lib/components/navigation/util.ts +0 -38
  649. package/src/lib/core/helmet.ts +0 -5
  650. package/src/lib/core/icons.tsx +0 -1
  651. package/src/lib/core/router.tsx +0 -1
  652. package/src/lib/plugins/index.ts +0 -4
  653. package/src/lib/plugins/openapi/MakeRequest.tsx +0 -63
  654. package/src/lib/plugins/openapi/MethodBadge.tsx +0 -36
  655. package/src/lib/plugins/openapi/worker/shared-worker.ts +0 -5
  656. package/src/lib/ui/button-variants.ts +0 -31
  657. package/src/lib/util/traverseNavigation.ts +0 -55
  658. /package/dist/lib/plugins/{api-key → api-keys}/CreateApiKey.d.ts +0 -0
  659. /package/dist/lib/plugins/{api-key → api-keys}/SettingsApiKeys.d.ts +0 -0
  660. /package/dist/lib/plugins/openapi/{worker → client}/worker.d.ts +0 -0
  661. /package/dist/lib/{components → ui}/Input.d.ts +0 -0
  662. /package/dist/lib/{components → ui}/Input.js +0 -0
  663. /package/src/lib/{components → ui}/Input.tsx +0 -0
@@ -0,0 +1,2789 @@
1
+ var wt = (e) => {
2
+ throw TypeError(e);
3
+ };
4
+ var He = (e, t, n) => t.has(e) || wt("Cannot " + n);
5
+ var L = (e, t, n) => (He(e, t, "read from private field"), n ? n.call(e) : t.get(e)), we = (e, t, n) => t.has(e) ? wt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), xe = (e, t, n, r) => (He(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), q = (e, t, n) => (He(e, t, "access private method"), n);
6
+ import { j as P } from "./jsx-runtime-B6kdoens.js";
7
+ import { a as Nn, e as Dn } from "./Markdown-B_Gax7at.js";
8
+ import * as f from "react";
9
+ import oe, { useLayoutEffect as kn, useEffect as Fn, useState as In } from "react";
10
+ import { R as Wn, A as _n, n as Bn, u as jn } from "./ZudokuContext-C3JtXViU.js";
11
+ import { u as $n } from "./state-DsXXkBLH.js";
12
+ import * as Ht from "react-dom";
13
+ import Hn from "react-dom";
14
+ function Vn(e, t) {
15
+ typeof e == "function" ? e(t) : e != null && (e.current = t);
16
+ }
17
+ function Vt(...e) {
18
+ return (t) => e.forEach((n) => Vn(n, t));
19
+ }
20
+ function se(...e) {
21
+ return f.useCallback(Vt(...e), e);
22
+ }
23
+ var be = f.forwardRef((e, t) => {
24
+ const { children: n, ...r } = e, o = f.Children.toArray(n), i = o.find(Un);
25
+ if (i) {
26
+ const s = i.props.children, c = o.map((a) => a === i ? f.Children.count(s) > 1 ? f.Children.only(null) : f.isValidElement(s) ? s.props.children : null : a);
27
+ return /* @__PURE__ */ P.jsx(Qe, { ...r, ref: t, children: f.isValidElement(s) ? f.cloneElement(s, void 0, c) : null });
28
+ }
29
+ return /* @__PURE__ */ P.jsx(Qe, { ...r, ref: t, children: n });
30
+ });
31
+ be.displayName = "Slot";
32
+ var Qe = f.forwardRef((e, t) => {
33
+ const { children: n, ...r } = e;
34
+ if (f.isValidElement(n)) {
35
+ const o = Xn(n);
36
+ return f.cloneElement(n, {
37
+ ...Yn(r, n.props),
38
+ // @ts-ignore
39
+ ref: t ? Vt(t, o) : o
40
+ });
41
+ }
42
+ return f.Children.count(n) > 1 ? f.Children.only(null) : null;
43
+ });
44
+ Qe.displayName = "SlotClone";
45
+ var zn = ({ children: e }) => /* @__PURE__ */ P.jsx(P.Fragment, { children: e });
46
+ function Un(e) {
47
+ return f.isValidElement(e) && e.type === zn;
48
+ }
49
+ function Yn(e, t) {
50
+ const n = { ...t };
51
+ for (const r in t) {
52
+ const o = e[r], i = t[r];
53
+ /^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
54
+ i(...c), o(...c);
55
+ } : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
56
+ }
57
+ return { ...e, ...n };
58
+ }
59
+ function Xn(e) {
60
+ var r, o;
61
+ let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
62
+ return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
63
+ }
64
+ const Kn = Dn(
65
+ "not-prose inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
66
+ {
67
+ variants: {
68
+ variant: {
69
+ default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
70
+ destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
71
+ outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
72
+ secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
73
+ ghost: "hover:bg-accent hover:text-accent-foreground",
74
+ link: "text-primary underline-offset-4 hover:underline"
75
+ },
76
+ size: {
77
+ default: "h-9 px-4 py-2",
78
+ sm: "h-8 rounded-md px-3 text-xs",
79
+ lg: "h-10 rounded-md px-8",
80
+ xl: "h-14 rounded-lg px-10 text-lg",
81
+ icon: "h-9 w-9"
82
+ }
83
+ },
84
+ defaultVariants: {
85
+ variant: "default",
86
+ size: "default"
87
+ }
88
+ }
89
+ ), Gn = f.forwardRef(
90
+ ({ className: e, variant: t, size: n, asChild: r = !1, ...o }, i) => {
91
+ const s = r ? be : "button";
92
+ return /* @__PURE__ */ P.jsx(
93
+ s,
94
+ {
95
+ className: Nn(Kn({ variant: t, size: n, className: e })),
96
+ ref: i,
97
+ ...o
98
+ }
99
+ );
100
+ }
101
+ );
102
+ Gn.displayName = "Button";
103
+ var H, F, ie, V, Q, $t, gi = ($t = class extends Wn {
104
+ constructor(t) {
105
+ super();
106
+ we(this, V);
107
+ we(this, H);
108
+ we(this, F);
109
+ we(this, ie);
110
+ this.mutationId = t.mutationId, xe(this, F, t.mutationCache), xe(this, H, []), this.state = t.state || Zn(), this.setOptions(t.options), this.scheduleGc();
111
+ }
112
+ setOptions(t) {
113
+ this.options = t, this.updateGcTime(this.options.gcTime);
114
+ }
115
+ get meta() {
116
+ return this.options.meta;
117
+ }
118
+ addObserver(t) {
119
+ L(this, H).includes(t) || (L(this, H).push(t), this.clearGcTimeout(), L(this, F).notify({
120
+ type: "observerAdded",
121
+ mutation: this,
122
+ observer: t
123
+ }));
124
+ }
125
+ removeObserver(t) {
126
+ xe(this, H, L(this, H).filter((n) => n !== t)), this.scheduleGc(), L(this, F).notify({
127
+ type: "observerRemoved",
128
+ mutation: this,
129
+ observer: t
130
+ });
131
+ }
132
+ optionalRemove() {
133
+ L(this, H).length || (this.state.status === "pending" ? this.scheduleGc() : L(this, F).remove(this));
134
+ }
135
+ continue() {
136
+ var t;
137
+ return ((t = L(this, ie)) == null ? void 0 : t.continue()) ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
138
+ this.execute(this.state.variables);
139
+ }
140
+ async execute(t) {
141
+ var o, i, s, c, a, l, h, d, p, m, g, u, v, y, w, b, x, E, C, S;
142
+ xe(this, ie, _n({
143
+ fn: () => this.options.mutationFn ? this.options.mutationFn(t) : Promise.reject(new Error("No mutationFn found")),
144
+ onFail: (A, O) => {
145
+ q(this, V, Q).call(this, { type: "failed", failureCount: A, error: O });
146
+ },
147
+ onPause: () => {
148
+ q(this, V, Q).call(this, { type: "pause" });
149
+ },
150
+ onContinue: () => {
151
+ q(this, V, Q).call(this, { type: "continue" });
152
+ },
153
+ retry: this.options.retry ?? 0,
154
+ retryDelay: this.options.retryDelay,
155
+ networkMode: this.options.networkMode,
156
+ canRun: () => L(this, F).canRun(this)
157
+ }));
158
+ const n = this.state.status === "pending", r = !L(this, ie).canStart();
159
+ try {
160
+ if (!n) {
161
+ q(this, V, Q).call(this, { type: "pending", variables: t, isPaused: r }), await ((i = (o = L(this, F).config).onMutate) == null ? void 0 : i.call(
162
+ o,
163
+ t,
164
+ this
165
+ ));
166
+ const O = await ((c = (s = this.options).onMutate) == null ? void 0 : c.call(s, t));
167
+ O !== this.state.context && q(this, V, Q).call(this, {
168
+ type: "pending",
169
+ context: O,
170
+ variables: t,
171
+ isPaused: r
172
+ });
173
+ }
174
+ const A = await L(this, ie).start();
175
+ return await ((l = (a = L(this, F).config).onSuccess) == null ? void 0 : l.call(
176
+ a,
177
+ A,
178
+ t,
179
+ this.state.context,
180
+ this
181
+ )), await ((d = (h = this.options).onSuccess) == null ? void 0 : d.call(h, A, t, this.state.context)), await ((m = (p = L(this, F).config).onSettled) == null ? void 0 : m.call(
182
+ p,
183
+ A,
184
+ null,
185
+ this.state.variables,
186
+ this.state.context,
187
+ this
188
+ )), await ((u = (g = this.options).onSettled) == null ? void 0 : u.call(g, A, null, t, this.state.context)), q(this, V, Q).call(this, { type: "success", data: A }), A;
189
+ } catch (A) {
190
+ try {
191
+ throw await ((y = (v = L(this, F).config).onError) == null ? void 0 : y.call(
192
+ v,
193
+ A,
194
+ t,
195
+ this.state.context,
196
+ this
197
+ )), await ((b = (w = this.options).onError) == null ? void 0 : b.call(
198
+ w,
199
+ A,
200
+ t,
201
+ this.state.context
202
+ )), await ((E = (x = L(this, F).config).onSettled) == null ? void 0 : E.call(
203
+ x,
204
+ void 0,
205
+ A,
206
+ this.state.variables,
207
+ this.state.context,
208
+ this
209
+ )), await ((S = (C = this.options).onSettled) == null ? void 0 : S.call(
210
+ C,
211
+ void 0,
212
+ A,
213
+ t,
214
+ this.state.context
215
+ )), A;
216
+ } finally {
217
+ q(this, V, Q).call(this, { type: "error", error: A });
218
+ }
219
+ } finally {
220
+ L(this, F).runNext(this);
221
+ }
222
+ }
223
+ }, H = new WeakMap(), F = new WeakMap(), ie = new WeakMap(), V = new WeakSet(), Q = function(t) {
224
+ const n = (r) => {
225
+ switch (t.type) {
226
+ case "failed":
227
+ return {
228
+ ...r,
229
+ failureCount: t.failureCount,
230
+ failureReason: t.error
231
+ };
232
+ case "pause":
233
+ return {
234
+ ...r,
235
+ isPaused: !0
236
+ };
237
+ case "continue":
238
+ return {
239
+ ...r,
240
+ isPaused: !1
241
+ };
242
+ case "pending":
243
+ return {
244
+ ...r,
245
+ context: t.context,
246
+ data: void 0,
247
+ failureCount: 0,
248
+ failureReason: null,
249
+ error: null,
250
+ isPaused: t.isPaused,
251
+ status: "pending",
252
+ variables: t.variables,
253
+ submittedAt: Date.now()
254
+ };
255
+ case "success":
256
+ return {
257
+ ...r,
258
+ data: t.data,
259
+ failureCount: 0,
260
+ failureReason: null,
261
+ error: null,
262
+ status: "success",
263
+ isPaused: !1
264
+ };
265
+ case "error":
266
+ return {
267
+ ...r,
268
+ data: void 0,
269
+ error: t.error,
270
+ failureCount: r.failureCount + 1,
271
+ failureReason: t.error,
272
+ isPaused: !1,
273
+ status: "error"
274
+ };
275
+ }
276
+ };
277
+ this.state = n(this.state), Bn.batch(() => {
278
+ L(this, H).forEach((r) => {
279
+ r.onMutationUpdate(t);
280
+ }), L(this, F).notify({
281
+ mutation: this,
282
+ type: "updated",
283
+ action: t
284
+ });
285
+ });
286
+ }, $t);
287
+ function Zn() {
288
+ return {
289
+ context: void 0,
290
+ data: void 0,
291
+ error: null,
292
+ failureCount: 0,
293
+ failureReason: null,
294
+ isPaused: !1,
295
+ status: "idle",
296
+ variables: void 0,
297
+ submittedAt: 0
298
+ };
299
+ }
300
+ const yi = () => {
301
+ const { authentication: e } = jn(), t = $n(), n = typeof e < "u";
302
+ return {
303
+ isAuthEnabled: n,
304
+ isPending: t.isPending,
305
+ profile: t.profile,
306
+ isAuthenticated: t.profile,
307
+ login: async () => {
308
+ if (!n)
309
+ throw new Error("Authentication is not enabled.");
310
+ await e.signIn();
311
+ },
312
+ logout: async () => {
313
+ if (!n)
314
+ throw new Error("Authentication is not enabled.");
315
+ await e.signOut(), window.location.href = "/";
316
+ }
317
+ };
318
+ };
319
+ function Ve(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
320
+ return function(o) {
321
+ if (e == null || e(o), n === !1 || !o.defaultPrevented)
322
+ return t == null ? void 0 : t(o);
323
+ };
324
+ }
325
+ function wi(e, t) {
326
+ const n = f.createContext(t);
327
+ function r(i) {
328
+ const { children: s, ...c } = i, a = f.useMemo(() => c, Object.values(c));
329
+ return /* @__PURE__ */ P.jsx(n.Provider, { value: a, children: s });
330
+ }
331
+ function o(i) {
332
+ const s = f.useContext(n);
333
+ if (s) return s;
334
+ if (t !== void 0) return t;
335
+ throw new Error(`\`${i}\` must be used within \`${e}\``);
336
+ }
337
+ return r.displayName = e + "Provider", [r, o];
338
+ }
339
+ function zt(e, t = []) {
340
+ let n = [];
341
+ function r(i, s) {
342
+ const c = f.createContext(s), a = n.length;
343
+ n = [...n, s];
344
+ function l(d) {
345
+ const { scope: p, children: m, ...g } = d, u = (p == null ? void 0 : p[e][a]) || c, v = f.useMemo(() => g, Object.values(g));
346
+ return /* @__PURE__ */ P.jsx(u.Provider, { value: v, children: m });
347
+ }
348
+ function h(d, p) {
349
+ const m = (p == null ? void 0 : p[e][a]) || c, g = f.useContext(m);
350
+ if (g) return g;
351
+ if (s !== void 0) return s;
352
+ throw new Error(`\`${d}\` must be used within \`${i}\``);
353
+ }
354
+ return l.displayName = i + "Provider", [l, h];
355
+ }
356
+ const o = () => {
357
+ const i = n.map((s) => f.createContext(s));
358
+ return function(c) {
359
+ const a = (c == null ? void 0 : c[e]) || i;
360
+ return f.useMemo(
361
+ () => ({ [`__scope${e}`]: { ...c, [e]: a } }),
362
+ [c, a]
363
+ );
364
+ };
365
+ };
366
+ return o.scopeName = e, [r, qn(o, ...t)];
367
+ }
368
+ function qn(...e) {
369
+ const t = e[0];
370
+ if (e.length === 1) return t;
371
+ const n = () => {
372
+ const r = e.map((o) => ({
373
+ useScope: o(),
374
+ scopeName: o.scopeName
375
+ }));
376
+ return function(i) {
377
+ const s = r.reduce((c, { useScope: a, scopeName: l }) => {
378
+ const d = a(i)[`__scope${l}`];
379
+ return { ...c, ...d };
380
+ }, {});
381
+ return f.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
382
+ };
383
+ };
384
+ return n.scopeName = t.scopeName, n;
385
+ }
386
+ function ee(e) {
387
+ const t = f.useRef(e);
388
+ return f.useEffect(() => {
389
+ t.current = e;
390
+ }), f.useMemo(() => (...n) => {
391
+ var r;
392
+ return (r = t.current) == null ? void 0 : r.call(t, ...n);
393
+ }, []);
394
+ }
395
+ function xi({
396
+ prop: e,
397
+ defaultProp: t,
398
+ onChange: n = () => {
399
+ }
400
+ }) {
401
+ const [r, o] = Qn({ defaultProp: t, onChange: n }), i = e !== void 0, s = i ? e : r, c = ee(n), a = f.useCallback(
402
+ (l) => {
403
+ if (i) {
404
+ const d = typeof l == "function" ? l(e) : l;
405
+ d !== e && c(d);
406
+ } else
407
+ o(l);
408
+ },
409
+ [i, e, o, c]
410
+ );
411
+ return [s, a];
412
+ }
413
+ function Qn({
414
+ defaultProp: e,
415
+ onChange: t
416
+ }) {
417
+ const n = f.useState(e), [r] = n, o = f.useRef(r), i = ee(t);
418
+ return f.useEffect(() => {
419
+ o.current !== r && (i(r), o.current = r);
420
+ }, [r, o, i]), n;
421
+ }
422
+ var Jn = [
423
+ "a",
424
+ "button",
425
+ "div",
426
+ "form",
427
+ "h2",
428
+ "h3",
429
+ "img",
430
+ "input",
431
+ "label",
432
+ "li",
433
+ "nav",
434
+ "ol",
435
+ "p",
436
+ "span",
437
+ "svg",
438
+ "ul"
439
+ ], ae = Jn.reduce((e, t) => {
440
+ const n = f.forwardRef((r, o) => {
441
+ const { asChild: i, ...s } = r, c = i ? be : t;
442
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ P.jsx(c, { ...s, ref: o });
443
+ });
444
+ return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
445
+ }, {});
446
+ function er(e, t) {
447
+ e && Ht.flushSync(() => e.dispatchEvent(t));
448
+ }
449
+ function bi(e) {
450
+ const t = e + "CollectionProvider", [n, r] = zt(t), [o, i] = n(
451
+ t,
452
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
453
+ ), s = (m) => {
454
+ const { scope: g, children: u } = m, v = oe.useRef(null), y = oe.useRef(/* @__PURE__ */ new Map()).current;
455
+ return /* @__PURE__ */ P.jsx(o, { scope: g, itemMap: y, collectionRef: v, children: u });
456
+ };
457
+ s.displayName = t;
458
+ const c = e + "CollectionSlot", a = oe.forwardRef(
459
+ (m, g) => {
460
+ const { scope: u, children: v } = m, y = i(c, u), w = se(g, y.collectionRef);
461
+ return /* @__PURE__ */ P.jsx(be, { ref: w, children: v });
462
+ }
463
+ );
464
+ a.displayName = c;
465
+ const l = e + "CollectionItemSlot", h = "data-radix-collection-item", d = oe.forwardRef(
466
+ (m, g) => {
467
+ const { scope: u, children: v, ...y } = m, w = oe.useRef(null), b = se(g, w), x = i(l, u);
468
+ return oe.useEffect(() => (x.itemMap.set(w, { ref: w, ...y }), () => void x.itemMap.delete(w))), /* @__PURE__ */ P.jsx(be, { [h]: "", ref: b, children: v });
469
+ }
470
+ );
471
+ d.displayName = l;
472
+ function p(m) {
473
+ const g = i(e + "CollectionConsumer", m);
474
+ return oe.useCallback(() => {
475
+ const v = g.collectionRef.current;
476
+ if (!v) return [];
477
+ const y = Array.from(v.querySelectorAll(`[${h}]`));
478
+ return Array.from(g.itemMap.values()).sort(
479
+ (x, E) => y.indexOf(x.ref.current) - y.indexOf(E.ref.current)
480
+ );
481
+ }, [g.collectionRef, g.itemMap]);
482
+ }
483
+ return [
484
+ { Provider: s, Slot: a, ItemSlot: d },
485
+ p,
486
+ r
487
+ ];
488
+ }
489
+ var tr = f.createContext(void 0);
490
+ function Ei(e) {
491
+ const t = f.useContext(tr);
492
+ return e || t || "ltr";
493
+ }
494
+ function nr(e, t = globalThis == null ? void 0 : globalThis.document) {
495
+ const n = ee(e);
496
+ f.useEffect(() => {
497
+ const r = (o) => {
498
+ o.key === "Escape" && n(o);
499
+ };
500
+ return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
501
+ }, [n, t]);
502
+ }
503
+ var rr = "DismissableLayer", Je = "dismissableLayer.update", or = "dismissableLayer.pointerDownOutside", ir = "dismissableLayer.focusOutside", xt, Ut = f.createContext({
504
+ layers: /* @__PURE__ */ new Set(),
505
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
506
+ branches: /* @__PURE__ */ new Set()
507
+ }), sr = f.forwardRef(
508
+ (e, t) => {
509
+ const {
510
+ disableOutsidePointerEvents: n = !1,
511
+ onEscapeKeyDown: r,
512
+ onPointerDownOutside: o,
513
+ onFocusOutside: i,
514
+ onInteractOutside: s,
515
+ onDismiss: c,
516
+ ...a
517
+ } = e, l = f.useContext(Ut), [h, d] = f.useState(null), p = (h == null ? void 0 : h.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, m] = f.useState({}), g = se(t, (S) => d(S)), u = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), y = u.indexOf(v), w = h ? u.indexOf(h) : -1, b = l.layersWithOutsidePointerEventsDisabled.size > 0, x = w >= y, E = lr((S) => {
518
+ const A = S.target, O = [...l.branches].some((D) => D.contains(A));
519
+ !x || O || (o == null || o(S), s == null || s(S), S.defaultPrevented || c == null || c());
520
+ }, p), C = ur((S) => {
521
+ const A = S.target;
522
+ [...l.branches].some((D) => D.contains(A)) || (i == null || i(S), s == null || s(S), S.defaultPrevented || c == null || c());
523
+ }, p);
524
+ return nr((S) => {
525
+ w === l.layers.size - 1 && (r == null || r(S), !S.defaultPrevented && c && (S.preventDefault(), c()));
526
+ }, p), f.useEffect(() => {
527
+ if (h)
528
+ return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (xt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(h)), l.layers.add(h), bt(), () => {
529
+ n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = xt);
530
+ };
531
+ }, [h, p, n, l]), f.useEffect(() => () => {
532
+ h && (l.layers.delete(h), l.layersWithOutsidePointerEventsDisabled.delete(h), bt());
533
+ }, [h, l]), f.useEffect(() => {
534
+ const S = () => m({});
535
+ return document.addEventListener(Je, S), () => document.removeEventListener(Je, S);
536
+ }, []), /* @__PURE__ */ P.jsx(
537
+ ae.div,
538
+ {
539
+ ...a,
540
+ ref: g,
541
+ style: {
542
+ pointerEvents: b ? x ? "auto" : "none" : void 0,
543
+ ...e.style
544
+ },
545
+ onFocusCapture: Ve(e.onFocusCapture, C.onFocusCapture),
546
+ onBlurCapture: Ve(e.onBlurCapture, C.onBlurCapture),
547
+ onPointerDownCapture: Ve(
548
+ e.onPointerDownCapture,
549
+ E.onPointerDownCapture
550
+ )
551
+ }
552
+ );
553
+ }
554
+ );
555
+ sr.displayName = rr;
556
+ var cr = "DismissableLayerBranch", ar = f.forwardRef((e, t) => {
557
+ const n = f.useContext(Ut), r = f.useRef(null), o = se(t, r);
558
+ return f.useEffect(() => {
559
+ const i = r.current;
560
+ if (i)
561
+ return n.branches.add(i), () => {
562
+ n.branches.delete(i);
563
+ };
564
+ }, [n.branches]), /* @__PURE__ */ P.jsx(ae.div, { ...e, ref: o });
565
+ });
566
+ ar.displayName = cr;
567
+ function lr(e, t = globalThis == null ? void 0 : globalThis.document) {
568
+ const n = ee(e), r = f.useRef(!1), o = f.useRef(() => {
569
+ });
570
+ return f.useEffect(() => {
571
+ const i = (c) => {
572
+ if (c.target && !r.current) {
573
+ let a = function() {
574
+ Yt(
575
+ or,
576
+ n,
577
+ l,
578
+ { discrete: !0 }
579
+ );
580
+ };
581
+ const l = { originalEvent: c };
582
+ c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = a, t.addEventListener("click", o.current, { once: !0 })) : a();
583
+ } else
584
+ t.removeEventListener("click", o.current);
585
+ r.current = !1;
586
+ }, s = window.setTimeout(() => {
587
+ t.addEventListener("pointerdown", i);
588
+ }, 0);
589
+ return () => {
590
+ window.clearTimeout(s), t.removeEventListener("pointerdown", i), t.removeEventListener("click", o.current);
591
+ };
592
+ }, [t, n]), {
593
+ // ensures we check React component tree (not just DOM tree)
594
+ onPointerDownCapture: () => r.current = !0
595
+ };
596
+ }
597
+ function ur(e, t = globalThis == null ? void 0 : globalThis.document) {
598
+ const n = ee(e), r = f.useRef(!1);
599
+ return f.useEffect(() => {
600
+ const o = (i) => {
601
+ i.target && !r.current && Yt(ir, n, { originalEvent: i }, {
602
+ discrete: !1
603
+ });
604
+ };
605
+ return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
606
+ }, [t, n]), {
607
+ onFocusCapture: () => r.current = !0,
608
+ onBlurCapture: () => r.current = !1
609
+ };
610
+ }
611
+ function bt() {
612
+ const e = new CustomEvent(Je);
613
+ document.dispatchEvent(e);
614
+ }
615
+ function Yt(e, t, n, { discrete: r }) {
616
+ const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
617
+ t && o.addEventListener(e, t, { once: !0 }), r ? er(o, i) : o.dispatchEvent(i);
618
+ }
619
+ var ze = 0;
620
+ function Ci() {
621
+ f.useEffect(() => {
622
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
623
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? Et()), document.body.insertAdjacentElement("beforeend", e[1] ?? Et()), ze++, () => {
624
+ ze === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ze--;
625
+ };
626
+ }, []);
627
+ }
628
+ function Et() {
629
+ const e = document.createElement("span");
630
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
631
+ }
632
+ var Ue = "focusScope.autoFocusOnMount", Ye = "focusScope.autoFocusOnUnmount", Ct = { bubbles: !1, cancelable: !0 }, fr = "FocusScope", dr = f.forwardRef((e, t) => {
633
+ const {
634
+ loop: n = !1,
635
+ trapped: r = !1,
636
+ onMountAutoFocus: o,
637
+ onUnmountAutoFocus: i,
638
+ ...s
639
+ } = e, [c, a] = f.useState(null), l = ee(o), h = ee(i), d = f.useRef(null), p = se(t, (u) => a(u)), m = f.useRef({
640
+ paused: !1,
641
+ pause() {
642
+ this.paused = !0;
643
+ },
644
+ resume() {
645
+ this.paused = !1;
646
+ }
647
+ }).current;
648
+ f.useEffect(() => {
649
+ if (r) {
650
+ let u = function(b) {
651
+ if (m.paused || !c) return;
652
+ const x = b.target;
653
+ c.contains(x) ? d.current = x : J(d.current, { select: !0 });
654
+ }, v = function(b) {
655
+ if (m.paused || !c) return;
656
+ const x = b.relatedTarget;
657
+ x !== null && (c.contains(x) || J(d.current, { select: !0 }));
658
+ }, y = function(b) {
659
+ if (document.activeElement === document.body)
660
+ for (const E of b)
661
+ E.removedNodes.length > 0 && J(c);
662
+ };
663
+ document.addEventListener("focusin", u), document.addEventListener("focusout", v);
664
+ const w = new MutationObserver(y);
665
+ return c && w.observe(c, { childList: !0, subtree: !0 }), () => {
666
+ document.removeEventListener("focusin", u), document.removeEventListener("focusout", v), w.disconnect();
667
+ };
668
+ }
669
+ }, [r, c, m.paused]), f.useEffect(() => {
670
+ if (c) {
671
+ At.add(m);
672
+ const u = document.activeElement;
673
+ if (!c.contains(u)) {
674
+ const y = new CustomEvent(Ue, Ct);
675
+ c.addEventListener(Ue, l), c.dispatchEvent(y), y.defaultPrevented || (hr(yr(Xt(c)), { select: !0 }), document.activeElement === u && J(c));
676
+ }
677
+ return () => {
678
+ c.removeEventListener(Ue, l), setTimeout(() => {
679
+ const y = new CustomEvent(Ye, Ct);
680
+ c.addEventListener(Ye, h), c.dispatchEvent(y), y.defaultPrevented || J(u ?? document.body, { select: !0 }), c.removeEventListener(Ye, h), At.remove(m);
681
+ }, 0);
682
+ };
683
+ }
684
+ }, [c, l, h, m]);
685
+ const g = f.useCallback(
686
+ (u) => {
687
+ if (!n && !r || m.paused) return;
688
+ const v = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, y = document.activeElement;
689
+ if (v && y) {
690
+ const w = u.currentTarget, [b, x] = mr(w);
691
+ b && x ? !u.shiftKey && y === x ? (u.preventDefault(), n && J(b, { select: !0 })) : u.shiftKey && y === b && (u.preventDefault(), n && J(x, { select: !0 })) : y === w && u.preventDefault();
692
+ }
693
+ },
694
+ [n, r, m.paused]
695
+ );
696
+ return /* @__PURE__ */ P.jsx(ae.div, { tabIndex: -1, ...s, ref: p, onKeyDown: g });
697
+ });
698
+ dr.displayName = fr;
699
+ function hr(e, { select: t = !1 } = {}) {
700
+ const n = document.activeElement;
701
+ for (const r of e)
702
+ if (J(r, { select: t }), document.activeElement !== n) return;
703
+ }
704
+ function mr(e) {
705
+ const t = Xt(e), n = St(t, e), r = St(t.reverse(), e);
706
+ return [n, r];
707
+ }
708
+ function Xt(e) {
709
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
710
+ acceptNode: (r) => {
711
+ const o = r.tagName === "INPUT" && r.type === "hidden";
712
+ return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
713
+ }
714
+ });
715
+ for (; n.nextNode(); ) t.push(n.currentNode);
716
+ return t;
717
+ }
718
+ function St(e, t) {
719
+ for (const n of e)
720
+ if (!pr(n, { upTo: t })) return n;
721
+ }
722
+ function pr(e, { upTo: t }) {
723
+ if (getComputedStyle(e).visibility === "hidden") return !0;
724
+ for (; e; ) {
725
+ if (t !== void 0 && e === t) return !1;
726
+ if (getComputedStyle(e).display === "none") return !0;
727
+ e = e.parentElement;
728
+ }
729
+ return !1;
730
+ }
731
+ function vr(e) {
732
+ return e instanceof HTMLInputElement && "select" in e;
733
+ }
734
+ function J(e, { select: t = !1 } = {}) {
735
+ if (e && e.focus) {
736
+ const n = document.activeElement;
737
+ e.focus({ preventScroll: !0 }), e !== n && vr(e) && t && e.select();
738
+ }
739
+ }
740
+ var At = gr();
741
+ function gr() {
742
+ let e = [];
743
+ return {
744
+ add(t) {
745
+ const n = e[0];
746
+ t !== n && (n == null || n.pause()), e = Rt(e, t), e.unshift(t);
747
+ },
748
+ remove(t) {
749
+ var n;
750
+ e = Rt(e, t), (n = e[0]) == null || n.resume();
751
+ }
752
+ };
753
+ }
754
+ function Rt(e, t) {
755
+ const n = [...e], r = n.indexOf(t);
756
+ return r !== -1 && n.splice(r, 1), n;
757
+ }
758
+ function yr(e) {
759
+ return e.filter((t) => t.tagName !== "A");
760
+ }
761
+ var Ee = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
762
+ }, wr = f.useId || (() => {
763
+ }), xr = 0;
764
+ function Si(e) {
765
+ const [t, n] = f.useState(wr());
766
+ return Ee(() => {
767
+ n((r) => r ?? String(xr++));
768
+ }, [e]), t ? `radix-${t}` : "";
769
+ }
770
+ const br = ["top", "right", "bottom", "left"], te = Math.min, _ = Math.max, Ie = Math.round, Oe = Math.floor, ne = (e) => ({
771
+ x: e,
772
+ y: e
773
+ }), Er = {
774
+ left: "right",
775
+ right: "left",
776
+ bottom: "top",
777
+ top: "bottom"
778
+ }, Cr = {
779
+ start: "end",
780
+ end: "start"
781
+ };
782
+ function et(e, t, n) {
783
+ return _(e, te(t, n));
784
+ }
785
+ function K(e, t) {
786
+ return typeof e == "function" ? e(t) : e;
787
+ }
788
+ function G(e) {
789
+ return e.split("-")[0];
790
+ }
791
+ function pe(e) {
792
+ return e.split("-")[1];
793
+ }
794
+ function rt(e) {
795
+ return e === "x" ? "y" : "x";
796
+ }
797
+ function ot(e) {
798
+ return e === "y" ? "height" : "width";
799
+ }
800
+ function ve(e) {
801
+ return ["top", "bottom"].includes(G(e)) ? "y" : "x";
802
+ }
803
+ function it(e) {
804
+ return rt(ve(e));
805
+ }
806
+ function Sr(e, t, n) {
807
+ n === void 0 && (n = !1);
808
+ const r = pe(e), o = it(e), i = ot(o);
809
+ let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
810
+ return t.reference[i] > t.floating[i] && (s = We(s)), [s, We(s)];
811
+ }
812
+ function Ar(e) {
813
+ const t = We(e);
814
+ return [tt(e), t, tt(t)];
815
+ }
816
+ function tt(e) {
817
+ return e.replace(/start|end/g, (t) => Cr[t]);
818
+ }
819
+ function Rr(e, t, n) {
820
+ const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], s = ["bottom", "top"];
821
+ switch (e) {
822
+ case "top":
823
+ case "bottom":
824
+ return n ? t ? o : r : t ? r : o;
825
+ case "left":
826
+ case "right":
827
+ return t ? i : s;
828
+ default:
829
+ return [];
830
+ }
831
+ }
832
+ function Pr(e, t, n, r) {
833
+ const o = pe(e);
834
+ let i = Rr(G(e), n === "start", r);
835
+ return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(tt)))), i;
836
+ }
837
+ function We(e) {
838
+ return e.replace(/left|right|bottom|top/g, (t) => Er[t]);
839
+ }
840
+ function Or(e) {
841
+ return {
842
+ top: 0,
843
+ right: 0,
844
+ bottom: 0,
845
+ left: 0,
846
+ ...e
847
+ };
848
+ }
849
+ function Kt(e) {
850
+ return typeof e != "number" ? Or(e) : {
851
+ top: e,
852
+ right: e,
853
+ bottom: e,
854
+ left: e
855
+ };
856
+ }
857
+ function _e(e) {
858
+ const {
859
+ x: t,
860
+ y: n,
861
+ width: r,
862
+ height: o
863
+ } = e;
864
+ return {
865
+ width: r,
866
+ height: o,
867
+ top: n,
868
+ left: t,
869
+ right: t + r,
870
+ bottom: n + o,
871
+ x: t,
872
+ y: n
873
+ };
874
+ }
875
+ function Pt(e, t, n) {
876
+ let {
877
+ reference: r,
878
+ floating: o
879
+ } = e;
880
+ const i = ve(t), s = it(t), c = ot(s), a = G(t), l = i === "y", h = r.x + r.width / 2 - o.width / 2, d = r.y + r.height / 2 - o.height / 2, p = r[c] / 2 - o[c] / 2;
881
+ let m;
882
+ switch (a) {
883
+ case "top":
884
+ m = {
885
+ x: h,
886
+ y: r.y - o.height
887
+ };
888
+ break;
889
+ case "bottom":
890
+ m = {
891
+ x: h,
892
+ y: r.y + r.height
893
+ };
894
+ break;
895
+ case "right":
896
+ m = {
897
+ x: r.x + r.width,
898
+ y: d
899
+ };
900
+ break;
901
+ case "left":
902
+ m = {
903
+ x: r.x - o.width,
904
+ y: d
905
+ };
906
+ break;
907
+ default:
908
+ m = {
909
+ x: r.x,
910
+ y: r.y
911
+ };
912
+ }
913
+ switch (pe(t)) {
914
+ case "start":
915
+ m[s] -= p * (n && l ? -1 : 1);
916
+ break;
917
+ case "end":
918
+ m[s] += p * (n && l ? -1 : 1);
919
+ break;
920
+ }
921
+ return m;
922
+ }
923
+ const Tr = async (e, t, n) => {
924
+ const {
925
+ placement: r = "bottom",
926
+ strategy: o = "absolute",
927
+ middleware: i = [],
928
+ platform: s
929
+ } = n, c = i.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(t));
930
+ let l = await s.getElementRects({
931
+ reference: e,
932
+ floating: t,
933
+ strategy: o
934
+ }), {
935
+ x: h,
936
+ y: d
937
+ } = Pt(l, r, a), p = r, m = {}, g = 0;
938
+ for (let u = 0; u < c.length; u++) {
939
+ const {
940
+ name: v,
941
+ fn: y
942
+ } = c[u], {
943
+ x: w,
944
+ y: b,
945
+ data: x,
946
+ reset: E
947
+ } = await y({
948
+ x: h,
949
+ y: d,
950
+ initialPlacement: r,
951
+ placement: p,
952
+ strategy: o,
953
+ middlewareData: m,
954
+ rects: l,
955
+ platform: s,
956
+ elements: {
957
+ reference: e,
958
+ floating: t
959
+ }
960
+ });
961
+ h = w ?? h, d = b ?? d, m = {
962
+ ...m,
963
+ [v]: {
964
+ ...m[v],
965
+ ...x
966
+ }
967
+ }, E && g <= 50 && (g++, typeof E == "object" && (E.placement && (p = E.placement), E.rects && (l = E.rects === !0 ? await s.getElementRects({
968
+ reference: e,
969
+ floating: t,
970
+ strategy: o
971
+ }) : E.rects), {
972
+ x: h,
973
+ y: d
974
+ } = Pt(l, p, a)), u = -1);
975
+ }
976
+ return {
977
+ x: h,
978
+ y: d,
979
+ placement: p,
980
+ strategy: o,
981
+ middlewareData: m
982
+ };
983
+ };
984
+ async function Ce(e, t) {
985
+ var n;
986
+ t === void 0 && (t = {});
987
+ const {
988
+ x: r,
989
+ y: o,
990
+ platform: i,
991
+ rects: s,
992
+ elements: c,
993
+ strategy: a
994
+ } = e, {
995
+ boundary: l = "clippingAncestors",
996
+ rootBoundary: h = "viewport",
997
+ elementContext: d = "floating",
998
+ altBoundary: p = !1,
999
+ padding: m = 0
1000
+ } = K(t, e), g = Kt(m), v = c[p ? d === "floating" ? "reference" : "floating" : d], y = _e(await i.getClippingRect({
1001
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
1002
+ boundary: l,
1003
+ rootBoundary: h,
1004
+ strategy: a
1005
+ })), w = d === "floating" ? {
1006
+ x: r,
1007
+ y: o,
1008
+ width: s.floating.width,
1009
+ height: s.floating.height
1010
+ } : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), x = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
1011
+ x: 1,
1012
+ y: 1
1013
+ } : {
1014
+ x: 1,
1015
+ y: 1
1016
+ }, E = _e(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
1017
+ elements: c,
1018
+ rect: w,
1019
+ offsetParent: b,
1020
+ strategy: a
1021
+ }) : w);
1022
+ return {
1023
+ top: (y.top - E.top + g.top) / x.y,
1024
+ bottom: (E.bottom - y.bottom + g.bottom) / x.y,
1025
+ left: (y.left - E.left + g.left) / x.x,
1026
+ right: (E.right - y.right + g.right) / x.x
1027
+ };
1028
+ }
1029
+ const Mr = (e) => ({
1030
+ name: "arrow",
1031
+ options: e,
1032
+ async fn(t) {
1033
+ const {
1034
+ x: n,
1035
+ y: r,
1036
+ placement: o,
1037
+ rects: i,
1038
+ platform: s,
1039
+ elements: c,
1040
+ middlewareData: a
1041
+ } = t, {
1042
+ element: l,
1043
+ padding: h = 0
1044
+ } = K(e, t) || {};
1045
+ if (l == null)
1046
+ return {};
1047
+ const d = Kt(h), p = {
1048
+ x: n,
1049
+ y: r
1050
+ }, m = it(o), g = ot(m), u = await s.getDimensions(l), v = m === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", b = v ? "clientHeight" : "clientWidth", x = i.reference[g] + i.reference[m] - p[m] - i.floating[g], E = p[m] - i.reference[m], C = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
1051
+ let S = C ? C[b] : 0;
1052
+ (!S || !await (s.isElement == null ? void 0 : s.isElement(C))) && (S = c.floating[b] || i.floating[g]);
1053
+ const A = x / 2 - E / 2, O = S / 2 - u[g] / 2 - 1, D = te(d[y], O), j = te(d[w], O), M = D, I = S - u[g] - j, N = S / 2 - u[g] / 2 + A, T = et(M, N, I), k = !a.arrow && pe(o) != null && N !== T && i.reference[g] / 2 - (N < M ? D : j) - u[g] / 2 < 0, R = k ? N < M ? N - M : N - I : 0;
1054
+ return {
1055
+ [m]: p[m] + R,
1056
+ data: {
1057
+ [m]: T,
1058
+ centerOffset: N - T - R,
1059
+ ...k && {
1060
+ alignmentOffset: R
1061
+ }
1062
+ },
1063
+ reset: k
1064
+ };
1065
+ }
1066
+ }), Lr = function(e) {
1067
+ return e === void 0 && (e = {}), {
1068
+ name: "flip",
1069
+ options: e,
1070
+ async fn(t) {
1071
+ var n, r;
1072
+ const {
1073
+ placement: o,
1074
+ middlewareData: i,
1075
+ rects: s,
1076
+ initialPlacement: c,
1077
+ platform: a,
1078
+ elements: l
1079
+ } = t, {
1080
+ mainAxis: h = !0,
1081
+ crossAxis: d = !0,
1082
+ fallbackPlacements: p,
1083
+ fallbackStrategy: m = "bestFit",
1084
+ fallbackAxisSideDirection: g = "none",
1085
+ flipAlignment: u = !0,
1086
+ ...v
1087
+ } = K(e, t);
1088
+ if ((n = i.arrow) != null && n.alignmentOffset)
1089
+ return {};
1090
+ const y = G(o), w = G(c) === c, b = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), x = p || (w || !u ? [We(c)] : Ar(c));
1091
+ !p && g !== "none" && x.push(...Pr(c, u, g, b));
1092
+ const E = [c, ...x], C = await Ce(t, v), S = [];
1093
+ let A = ((r = i.flip) == null ? void 0 : r.overflows) || [];
1094
+ if (h && S.push(C[y]), d) {
1095
+ const M = Sr(o, s, b);
1096
+ S.push(C[M[0]], C[M[1]]);
1097
+ }
1098
+ if (A = [...A, {
1099
+ placement: o,
1100
+ overflows: S
1101
+ }], !S.every((M) => M <= 0)) {
1102
+ var O, D;
1103
+ const M = (((O = i.flip) == null ? void 0 : O.index) || 0) + 1, I = E[M];
1104
+ if (I)
1105
+ return {
1106
+ data: {
1107
+ index: M,
1108
+ overflows: A
1109
+ },
1110
+ reset: {
1111
+ placement: I
1112
+ }
1113
+ };
1114
+ let N = (D = A.filter((T) => T.overflows[0] <= 0).sort((T, k) => T.overflows[1] - k.overflows[1])[0]) == null ? void 0 : D.placement;
1115
+ if (!N)
1116
+ switch (m) {
1117
+ case "bestFit": {
1118
+ var j;
1119
+ const T = (j = A.map((k) => [k.placement, k.overflows.filter((R) => R > 0).reduce((R, W) => R + W, 0)]).sort((k, R) => k[1] - R[1])[0]) == null ? void 0 : j[0];
1120
+ T && (N = T);
1121
+ break;
1122
+ }
1123
+ case "initialPlacement":
1124
+ N = c;
1125
+ break;
1126
+ }
1127
+ if (o !== N)
1128
+ return {
1129
+ reset: {
1130
+ placement: N
1131
+ }
1132
+ };
1133
+ }
1134
+ return {};
1135
+ }
1136
+ };
1137
+ };
1138
+ function Ot(e, t) {
1139
+ return {
1140
+ top: e.top - t.height,
1141
+ right: e.right - t.width,
1142
+ bottom: e.bottom - t.height,
1143
+ left: e.left - t.width
1144
+ };
1145
+ }
1146
+ function Tt(e) {
1147
+ return br.some((t) => e[t] >= 0);
1148
+ }
1149
+ const Nr = function(e) {
1150
+ return e === void 0 && (e = {}), {
1151
+ name: "hide",
1152
+ options: e,
1153
+ async fn(t) {
1154
+ const {
1155
+ rects: n
1156
+ } = t, {
1157
+ strategy: r = "referenceHidden",
1158
+ ...o
1159
+ } = K(e, t);
1160
+ switch (r) {
1161
+ case "referenceHidden": {
1162
+ const i = await Ce(t, {
1163
+ ...o,
1164
+ elementContext: "reference"
1165
+ }), s = Ot(i, n.reference);
1166
+ return {
1167
+ data: {
1168
+ referenceHiddenOffsets: s,
1169
+ referenceHidden: Tt(s)
1170
+ }
1171
+ };
1172
+ }
1173
+ case "escaped": {
1174
+ const i = await Ce(t, {
1175
+ ...o,
1176
+ altBoundary: !0
1177
+ }), s = Ot(i, n.floating);
1178
+ return {
1179
+ data: {
1180
+ escapedOffsets: s,
1181
+ escaped: Tt(s)
1182
+ }
1183
+ };
1184
+ }
1185
+ default:
1186
+ return {};
1187
+ }
1188
+ }
1189
+ };
1190
+ };
1191
+ async function Dr(e, t) {
1192
+ const {
1193
+ placement: n,
1194
+ platform: r,
1195
+ elements: o
1196
+ } = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = G(n), c = pe(n), a = ve(n) === "y", l = ["left", "top"].includes(s) ? -1 : 1, h = i && a ? -1 : 1, d = K(t, e);
1197
+ let {
1198
+ mainAxis: p,
1199
+ crossAxis: m,
1200
+ alignmentAxis: g
1201
+ } = typeof d == "number" ? {
1202
+ mainAxis: d,
1203
+ crossAxis: 0,
1204
+ alignmentAxis: null
1205
+ } : {
1206
+ mainAxis: 0,
1207
+ crossAxis: 0,
1208
+ alignmentAxis: null,
1209
+ ...d
1210
+ };
1211
+ return c && typeof g == "number" && (m = c === "end" ? g * -1 : g), a ? {
1212
+ x: m * h,
1213
+ y: p * l
1214
+ } : {
1215
+ x: p * l,
1216
+ y: m * h
1217
+ };
1218
+ }
1219
+ const kr = function(e) {
1220
+ return e === void 0 && (e = 0), {
1221
+ name: "offset",
1222
+ options: e,
1223
+ async fn(t) {
1224
+ var n, r;
1225
+ const {
1226
+ x: o,
1227
+ y: i,
1228
+ placement: s,
1229
+ middlewareData: c
1230
+ } = t, a = await Dr(t, e);
1231
+ return s === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
1232
+ x: o + a.x,
1233
+ y: i + a.y,
1234
+ data: {
1235
+ ...a,
1236
+ placement: s
1237
+ }
1238
+ };
1239
+ }
1240
+ };
1241
+ }, Fr = function(e) {
1242
+ return e === void 0 && (e = {}), {
1243
+ name: "shift",
1244
+ options: e,
1245
+ async fn(t) {
1246
+ const {
1247
+ x: n,
1248
+ y: r,
1249
+ placement: o
1250
+ } = t, {
1251
+ mainAxis: i = !0,
1252
+ crossAxis: s = !1,
1253
+ limiter: c = {
1254
+ fn: (v) => {
1255
+ let {
1256
+ x: y,
1257
+ y: w
1258
+ } = v;
1259
+ return {
1260
+ x: y,
1261
+ y: w
1262
+ };
1263
+ }
1264
+ },
1265
+ ...a
1266
+ } = K(e, t), l = {
1267
+ x: n,
1268
+ y: r
1269
+ }, h = await Ce(t, a), d = ve(G(o)), p = rt(d);
1270
+ let m = l[p], g = l[d];
1271
+ if (i) {
1272
+ const v = p === "y" ? "top" : "left", y = p === "y" ? "bottom" : "right", w = m + h[v], b = m - h[y];
1273
+ m = et(w, m, b);
1274
+ }
1275
+ if (s) {
1276
+ const v = d === "y" ? "top" : "left", y = d === "y" ? "bottom" : "right", w = g + h[v], b = g - h[y];
1277
+ g = et(w, g, b);
1278
+ }
1279
+ const u = c.fn({
1280
+ ...t,
1281
+ [p]: m,
1282
+ [d]: g
1283
+ });
1284
+ return {
1285
+ ...u,
1286
+ data: {
1287
+ x: u.x - n,
1288
+ y: u.y - r
1289
+ }
1290
+ };
1291
+ }
1292
+ };
1293
+ }, Ir = function(e) {
1294
+ return e === void 0 && (e = {}), {
1295
+ options: e,
1296
+ fn(t) {
1297
+ const {
1298
+ x: n,
1299
+ y: r,
1300
+ placement: o,
1301
+ rects: i,
1302
+ middlewareData: s
1303
+ } = t, {
1304
+ offset: c = 0,
1305
+ mainAxis: a = !0,
1306
+ crossAxis: l = !0
1307
+ } = K(e, t), h = {
1308
+ x: n,
1309
+ y: r
1310
+ }, d = ve(o), p = rt(d);
1311
+ let m = h[p], g = h[d];
1312
+ const u = K(c, t), v = typeof u == "number" ? {
1313
+ mainAxis: u,
1314
+ crossAxis: 0
1315
+ } : {
1316
+ mainAxis: 0,
1317
+ crossAxis: 0,
1318
+ ...u
1319
+ };
1320
+ if (a) {
1321
+ const b = p === "y" ? "height" : "width", x = i.reference[p] - i.floating[b] + v.mainAxis, E = i.reference[p] + i.reference[b] - v.mainAxis;
1322
+ m < x ? m = x : m > E && (m = E);
1323
+ }
1324
+ if (l) {
1325
+ var y, w;
1326
+ const b = p === "y" ? "width" : "height", x = ["top", "left"].includes(G(o)), E = i.reference[d] - i.floating[b] + (x && ((y = s.offset) == null ? void 0 : y[d]) || 0) + (x ? 0 : v.crossAxis), C = i.reference[d] + i.reference[b] + (x ? 0 : ((w = s.offset) == null ? void 0 : w[d]) || 0) - (x ? v.crossAxis : 0);
1327
+ g < E ? g = E : g > C && (g = C);
1328
+ }
1329
+ return {
1330
+ [p]: m,
1331
+ [d]: g
1332
+ };
1333
+ }
1334
+ };
1335
+ }, Wr = function(e) {
1336
+ return e === void 0 && (e = {}), {
1337
+ name: "size",
1338
+ options: e,
1339
+ async fn(t) {
1340
+ const {
1341
+ placement: n,
1342
+ rects: r,
1343
+ platform: o,
1344
+ elements: i
1345
+ } = t, {
1346
+ apply: s = () => {
1347
+ },
1348
+ ...c
1349
+ } = K(e, t), a = await Ce(t, c), l = G(n), h = pe(n), d = ve(n) === "y", {
1350
+ width: p,
1351
+ height: m
1352
+ } = r.floating;
1353
+ let g, u;
1354
+ l === "top" || l === "bottom" ? (g = l, u = h === (await (o.isRTL == null ? void 0 : o.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (u = l, g = h === "end" ? "top" : "bottom");
1355
+ const v = m - a[g], y = p - a[u], w = !t.middlewareData.shift;
1356
+ let b = v, x = y;
1357
+ if (d) {
1358
+ const C = p - a.left - a.right;
1359
+ x = h || w ? te(y, C) : C;
1360
+ } else {
1361
+ const C = m - a.top - a.bottom;
1362
+ b = h || w ? te(v, C) : C;
1363
+ }
1364
+ if (w && !h) {
1365
+ const C = _(a.left, 0), S = _(a.right, 0), A = _(a.top, 0), O = _(a.bottom, 0);
1366
+ d ? x = p - 2 * (C !== 0 || S !== 0 ? C + S : _(a.left, a.right)) : b = m - 2 * (A !== 0 || O !== 0 ? A + O : _(a.top, a.bottom));
1367
+ }
1368
+ await s({
1369
+ ...t,
1370
+ availableWidth: x,
1371
+ availableHeight: b
1372
+ });
1373
+ const E = await o.getDimensions(i.floating);
1374
+ return p !== E.width || m !== E.height ? {
1375
+ reset: {
1376
+ rects: !0
1377
+ }
1378
+ } : {};
1379
+ }
1380
+ };
1381
+ };
1382
+ function ge(e) {
1383
+ return Gt(e) ? (e.nodeName || "").toLowerCase() : "#document";
1384
+ }
1385
+ function B(e) {
1386
+ var t;
1387
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
1388
+ }
1389
+ function Z(e) {
1390
+ var t;
1391
+ return (t = (Gt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
1392
+ }
1393
+ function Gt(e) {
1394
+ return e instanceof Node || e instanceof B(e).Node;
1395
+ }
1396
+ function U(e) {
1397
+ return e instanceof Element || e instanceof B(e).Element;
1398
+ }
1399
+ function Y(e) {
1400
+ return e instanceof HTMLElement || e instanceof B(e).HTMLElement;
1401
+ }
1402
+ function Mt(e) {
1403
+ return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof B(e).ShadowRoot;
1404
+ }
1405
+ function Ae(e) {
1406
+ const {
1407
+ overflow: t,
1408
+ overflowX: n,
1409
+ overflowY: r,
1410
+ display: o
1411
+ } = $(e);
1412
+ return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !["inline", "contents"].includes(o);
1413
+ }
1414
+ function _r(e) {
1415
+ return ["table", "td", "th"].includes(ge(e));
1416
+ }
1417
+ function st(e) {
1418
+ const t = ct(), n = $(e);
1419
+ return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((r) => (n.willChange || "").includes(r)) || ["paint", "layout", "strict", "content"].some((r) => (n.contain || "").includes(r));
1420
+ }
1421
+ function Br(e) {
1422
+ let t = re(e);
1423
+ for (; Y(t) && !me(t); ) {
1424
+ if (st(t))
1425
+ return t;
1426
+ t = re(t);
1427
+ }
1428
+ return null;
1429
+ }
1430
+ function ct() {
1431
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1432
+ }
1433
+ function me(e) {
1434
+ return ["html", "body", "#document"].includes(ge(e));
1435
+ }
1436
+ function $(e) {
1437
+ return B(e).getComputedStyle(e);
1438
+ }
1439
+ function je(e) {
1440
+ return U(e) ? {
1441
+ scrollLeft: e.scrollLeft,
1442
+ scrollTop: e.scrollTop
1443
+ } : {
1444
+ scrollLeft: e.pageXOffset,
1445
+ scrollTop: e.pageYOffset
1446
+ };
1447
+ }
1448
+ function re(e) {
1449
+ if (ge(e) === "html")
1450
+ return e;
1451
+ const t = (
1452
+ // Step into the shadow DOM of the parent of a slotted node.
1453
+ e.assignedSlot || // DOM Element detected.
1454
+ e.parentNode || // ShadowRoot detected.
1455
+ Mt(e) && e.host || // Fallback.
1456
+ Z(e)
1457
+ );
1458
+ return Mt(t) ? t.host : t;
1459
+ }
1460
+ function Zt(e) {
1461
+ const t = re(e);
1462
+ return me(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Y(t) && Ae(t) ? t : Zt(t);
1463
+ }
1464
+ function Se(e, t, n) {
1465
+ var r;
1466
+ t === void 0 && (t = []), n === void 0 && (n = !0);
1467
+ const o = Zt(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = B(o);
1468
+ return i ? t.concat(s, s.visualViewport || [], Ae(o) ? o : [], s.frameElement && n ? Se(s.frameElement) : []) : t.concat(o, Se(o, [], n));
1469
+ }
1470
+ function qt(e) {
1471
+ const t = $(e);
1472
+ let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
1473
+ const o = Y(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = Ie(n) !== i || Ie(r) !== s;
1474
+ return c && (n = i, r = s), {
1475
+ width: n,
1476
+ height: r,
1477
+ $: c
1478
+ };
1479
+ }
1480
+ function at(e) {
1481
+ return U(e) ? e : e.contextElement;
1482
+ }
1483
+ function de(e) {
1484
+ const t = at(e);
1485
+ if (!Y(t))
1486
+ return ne(1);
1487
+ const n = t.getBoundingClientRect(), {
1488
+ width: r,
1489
+ height: o,
1490
+ $: i
1491
+ } = qt(t);
1492
+ let s = (i ? Ie(n.width) : n.width) / r, c = (i ? Ie(n.height) : n.height) / o;
1493
+ return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
1494
+ x: s,
1495
+ y: c
1496
+ };
1497
+ }
1498
+ const jr = /* @__PURE__ */ ne(0);
1499
+ function Qt(e) {
1500
+ const t = B(e);
1501
+ return !ct() || !t.visualViewport ? jr : {
1502
+ x: t.visualViewport.offsetLeft,
1503
+ y: t.visualViewport.offsetTop
1504
+ };
1505
+ }
1506
+ function $r(e, t, n) {
1507
+ return t === void 0 && (t = !1), !n || t && n !== B(e) ? !1 : t;
1508
+ }
1509
+ function ce(e, t, n, r) {
1510
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
1511
+ const o = e.getBoundingClientRect(), i = at(e);
1512
+ let s = ne(1);
1513
+ t && (r ? U(r) && (s = de(r)) : s = de(e));
1514
+ const c = $r(i, n, r) ? Qt(i) : ne(0);
1515
+ let a = (o.left + c.x) / s.x, l = (o.top + c.y) / s.y, h = o.width / s.x, d = o.height / s.y;
1516
+ if (i) {
1517
+ const p = B(i), m = r && U(r) ? B(r) : r;
1518
+ let g = p, u = g.frameElement;
1519
+ for (; u && r && m !== g; ) {
1520
+ const v = de(u), y = u.getBoundingClientRect(), w = $(u), b = y.left + (u.clientLeft + parseFloat(w.paddingLeft)) * v.x, x = y.top + (u.clientTop + parseFloat(w.paddingTop)) * v.y;
1521
+ a *= v.x, l *= v.y, h *= v.x, d *= v.y, a += b, l += x, g = B(u), u = g.frameElement;
1522
+ }
1523
+ }
1524
+ return _e({
1525
+ width: h,
1526
+ height: d,
1527
+ x: a,
1528
+ y: l
1529
+ });
1530
+ }
1531
+ const Hr = [":popover-open", ":modal"];
1532
+ function lt(e) {
1533
+ return Hr.some((t) => {
1534
+ try {
1535
+ return e.matches(t);
1536
+ } catch {
1537
+ return !1;
1538
+ }
1539
+ });
1540
+ }
1541
+ function Vr(e) {
1542
+ let {
1543
+ elements: t,
1544
+ rect: n,
1545
+ offsetParent: r,
1546
+ strategy: o
1547
+ } = e;
1548
+ const i = o === "fixed", s = Z(r), c = t ? lt(t.floating) : !1;
1549
+ if (r === s || c && i)
1550
+ return n;
1551
+ let a = {
1552
+ scrollLeft: 0,
1553
+ scrollTop: 0
1554
+ }, l = ne(1);
1555
+ const h = ne(0), d = Y(r);
1556
+ if ((d || !d && !i) && ((ge(r) !== "body" || Ae(s)) && (a = je(r)), Y(r))) {
1557
+ const p = ce(r);
1558
+ l = de(r), h.x = p.x + r.clientLeft, h.y = p.y + r.clientTop;
1559
+ }
1560
+ return {
1561
+ width: n.width * l.x,
1562
+ height: n.height * l.y,
1563
+ x: n.x * l.x - a.scrollLeft * l.x + h.x,
1564
+ y: n.y * l.y - a.scrollTop * l.y + h.y
1565
+ };
1566
+ }
1567
+ function zr(e) {
1568
+ return Array.from(e.getClientRects());
1569
+ }
1570
+ function Jt(e) {
1571
+ return ce(Z(e)).left + je(e).scrollLeft;
1572
+ }
1573
+ function Ur(e) {
1574
+ const t = Z(e), n = je(e), r = e.ownerDocument.body, o = _(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = _(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
1575
+ let s = -n.scrollLeft + Jt(e);
1576
+ const c = -n.scrollTop;
1577
+ return $(r).direction === "rtl" && (s += _(t.clientWidth, r.clientWidth) - o), {
1578
+ width: o,
1579
+ height: i,
1580
+ x: s,
1581
+ y: c
1582
+ };
1583
+ }
1584
+ function Yr(e, t) {
1585
+ const n = B(e), r = Z(e), o = n.visualViewport;
1586
+ let i = r.clientWidth, s = r.clientHeight, c = 0, a = 0;
1587
+ if (o) {
1588
+ i = o.width, s = o.height;
1589
+ const l = ct();
1590
+ (!l || l && t === "fixed") && (c = o.offsetLeft, a = o.offsetTop);
1591
+ }
1592
+ return {
1593
+ width: i,
1594
+ height: s,
1595
+ x: c,
1596
+ y: a
1597
+ };
1598
+ }
1599
+ function Xr(e, t) {
1600
+ const n = ce(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Y(e) ? de(e) : ne(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, a = o * i.x, l = r * i.y;
1601
+ return {
1602
+ width: s,
1603
+ height: c,
1604
+ x: a,
1605
+ y: l
1606
+ };
1607
+ }
1608
+ function Lt(e, t, n) {
1609
+ let r;
1610
+ if (t === "viewport")
1611
+ r = Yr(e, n);
1612
+ else if (t === "document")
1613
+ r = Ur(Z(e));
1614
+ else if (U(t))
1615
+ r = Xr(t, n);
1616
+ else {
1617
+ const o = Qt(e);
1618
+ r = {
1619
+ ...t,
1620
+ x: t.x - o.x,
1621
+ y: t.y - o.y
1622
+ };
1623
+ }
1624
+ return _e(r);
1625
+ }
1626
+ function en(e, t) {
1627
+ const n = re(e);
1628
+ return n === t || !U(n) || me(n) ? !1 : $(n).position === "fixed" || en(n, t);
1629
+ }
1630
+ function Kr(e, t) {
1631
+ const n = t.get(e);
1632
+ if (n)
1633
+ return n;
1634
+ let r = Se(e, [], !1).filter((c) => U(c) && ge(c) !== "body"), o = null;
1635
+ const i = $(e).position === "fixed";
1636
+ let s = i ? re(e) : e;
1637
+ for (; U(s) && !me(s); ) {
1638
+ const c = $(s), a = st(s);
1639
+ !a && c.position === "fixed" && (o = null), (i ? !a && !o : !a && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || Ae(s) && !a && en(e, s)) ? r = r.filter((h) => h !== s) : o = c, s = re(s);
1640
+ }
1641
+ return t.set(e, r), r;
1642
+ }
1643
+ function Gr(e) {
1644
+ let {
1645
+ element: t,
1646
+ boundary: n,
1647
+ rootBoundary: r,
1648
+ strategy: o
1649
+ } = e;
1650
+ const s = [...n === "clippingAncestors" ? lt(t) ? [] : Kr(t, this._c) : [].concat(n), r], c = s[0], a = s.reduce((l, h) => {
1651
+ const d = Lt(t, h, o);
1652
+ return l.top = _(d.top, l.top), l.right = te(d.right, l.right), l.bottom = te(d.bottom, l.bottom), l.left = _(d.left, l.left), l;
1653
+ }, Lt(t, c, o));
1654
+ return {
1655
+ width: a.right - a.left,
1656
+ height: a.bottom - a.top,
1657
+ x: a.left,
1658
+ y: a.top
1659
+ };
1660
+ }
1661
+ function Zr(e) {
1662
+ const {
1663
+ width: t,
1664
+ height: n
1665
+ } = qt(e);
1666
+ return {
1667
+ width: t,
1668
+ height: n
1669
+ };
1670
+ }
1671
+ function qr(e, t, n) {
1672
+ const r = Y(t), o = Z(t), i = n === "fixed", s = ce(e, !0, i, t);
1673
+ let c = {
1674
+ scrollLeft: 0,
1675
+ scrollTop: 0
1676
+ };
1677
+ const a = ne(0);
1678
+ if (r || !r && !i)
1679
+ if ((ge(t) !== "body" || Ae(o)) && (c = je(t)), r) {
1680
+ const d = ce(t, !0, i, t);
1681
+ a.x = d.x + t.clientLeft, a.y = d.y + t.clientTop;
1682
+ } else o && (a.x = Jt(o));
1683
+ const l = s.left + c.scrollLeft - a.x, h = s.top + c.scrollTop - a.y;
1684
+ return {
1685
+ x: l,
1686
+ y: h,
1687
+ width: s.width,
1688
+ height: s.height
1689
+ };
1690
+ }
1691
+ function Xe(e) {
1692
+ return $(e).position === "static";
1693
+ }
1694
+ function Nt(e, t) {
1695
+ return !Y(e) || $(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
1696
+ }
1697
+ function tn(e, t) {
1698
+ const n = B(e);
1699
+ if (lt(e))
1700
+ return n;
1701
+ if (!Y(e)) {
1702
+ let o = re(e);
1703
+ for (; o && !me(o); ) {
1704
+ if (U(o) && !Xe(o))
1705
+ return o;
1706
+ o = re(o);
1707
+ }
1708
+ return n;
1709
+ }
1710
+ let r = Nt(e, t);
1711
+ for (; r && _r(r) && Xe(r); )
1712
+ r = Nt(r, t);
1713
+ return r && me(r) && Xe(r) && !st(r) ? n : r || Br(e) || n;
1714
+ }
1715
+ const Qr = async function(e) {
1716
+ const t = this.getOffsetParent || tn, n = this.getDimensions, r = await n(e.floating);
1717
+ return {
1718
+ reference: qr(e.reference, await t(e.floating), e.strategy),
1719
+ floating: {
1720
+ x: 0,
1721
+ y: 0,
1722
+ width: r.width,
1723
+ height: r.height
1724
+ }
1725
+ };
1726
+ };
1727
+ function Jr(e) {
1728
+ return $(e).direction === "rtl";
1729
+ }
1730
+ const eo = {
1731
+ convertOffsetParentRelativeRectToViewportRelativeRect: Vr,
1732
+ getDocumentElement: Z,
1733
+ getClippingRect: Gr,
1734
+ getOffsetParent: tn,
1735
+ getElementRects: Qr,
1736
+ getClientRects: zr,
1737
+ getDimensions: Zr,
1738
+ getScale: de,
1739
+ isElement: U,
1740
+ isRTL: Jr
1741
+ };
1742
+ function to(e, t) {
1743
+ let n = null, r;
1744
+ const o = Z(e);
1745
+ function i() {
1746
+ var c;
1747
+ clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
1748
+ }
1749
+ function s(c, a) {
1750
+ c === void 0 && (c = !1), a === void 0 && (a = 1), i();
1751
+ const {
1752
+ left: l,
1753
+ top: h,
1754
+ width: d,
1755
+ height: p
1756
+ } = e.getBoundingClientRect();
1757
+ if (c || t(), !d || !p)
1758
+ return;
1759
+ const m = Oe(h), g = Oe(o.clientWidth - (l + d)), u = Oe(o.clientHeight - (h + p)), v = Oe(l), w = {
1760
+ rootMargin: -m + "px " + -g + "px " + -u + "px " + -v + "px",
1761
+ threshold: _(0, te(1, a)) || 1
1762
+ };
1763
+ let b = !0;
1764
+ function x(E) {
1765
+ const C = E[0].intersectionRatio;
1766
+ if (C !== a) {
1767
+ if (!b)
1768
+ return s();
1769
+ C ? s(!1, C) : r = setTimeout(() => {
1770
+ s(!1, 1e-7);
1771
+ }, 1e3);
1772
+ }
1773
+ b = !1;
1774
+ }
1775
+ try {
1776
+ n = new IntersectionObserver(x, {
1777
+ ...w,
1778
+ // Handle <iframe>s
1779
+ root: o.ownerDocument
1780
+ });
1781
+ } catch {
1782
+ n = new IntersectionObserver(x, w);
1783
+ }
1784
+ n.observe(e);
1785
+ }
1786
+ return s(!0), i;
1787
+ }
1788
+ function no(e, t, n, r) {
1789
+ r === void 0 && (r = {});
1790
+ const {
1791
+ ancestorScroll: o = !0,
1792
+ ancestorResize: i = !0,
1793
+ elementResize: s = typeof ResizeObserver == "function",
1794
+ layoutShift: c = typeof IntersectionObserver == "function",
1795
+ animationFrame: a = !1
1796
+ } = r, l = at(e), h = o || i ? [...l ? Se(l) : [], ...Se(t)] : [];
1797
+ h.forEach((y) => {
1798
+ o && y.addEventListener("scroll", n, {
1799
+ passive: !0
1800
+ }), i && y.addEventListener("resize", n);
1801
+ });
1802
+ const d = l && c ? to(l, n) : null;
1803
+ let p = -1, m = null;
1804
+ s && (m = new ResizeObserver((y) => {
1805
+ let [w] = y;
1806
+ w && w.target === l && m && (m.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
1807
+ var b;
1808
+ (b = m) == null || b.observe(t);
1809
+ })), n();
1810
+ }), l && !a && m.observe(l), m.observe(t));
1811
+ let g, u = a ? ce(e) : null;
1812
+ a && v();
1813
+ function v() {
1814
+ const y = ce(e);
1815
+ u && (y.x !== u.x || y.y !== u.y || y.width !== u.width || y.height !== u.height) && n(), u = y, g = requestAnimationFrame(v);
1816
+ }
1817
+ return n(), () => {
1818
+ var y;
1819
+ h.forEach((w) => {
1820
+ o && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
1821
+ }), d == null || d(), (y = m) == null || y.disconnect(), m = null, a && cancelAnimationFrame(g);
1822
+ };
1823
+ }
1824
+ const ro = kr, oo = Fr, io = Lr, so = Wr, co = Nr, Dt = Mr, ao = Ir, lo = (e, t, n) => {
1825
+ const r = /* @__PURE__ */ new Map(), o = {
1826
+ platform: eo,
1827
+ ...n
1828
+ }, i = {
1829
+ ...o.platform,
1830
+ _c: r
1831
+ };
1832
+ return Tr(e, t, {
1833
+ ...o,
1834
+ platform: i
1835
+ });
1836
+ }, uo = (e) => {
1837
+ function t(n) {
1838
+ return {}.hasOwnProperty.call(n, "current");
1839
+ }
1840
+ return {
1841
+ name: "arrow",
1842
+ options: e,
1843
+ fn(n) {
1844
+ const {
1845
+ element: r,
1846
+ padding: o
1847
+ } = typeof e == "function" ? e(n) : e;
1848
+ return r && t(r) ? r.current != null ? Dt({
1849
+ element: r.current,
1850
+ padding: o
1851
+ }).fn(n) : {} : r ? Dt({
1852
+ element: r,
1853
+ padding: o
1854
+ }).fn(n) : {};
1855
+ }
1856
+ };
1857
+ };
1858
+ var De = typeof document < "u" ? kn : Fn;
1859
+ function Be(e, t) {
1860
+ if (e === t)
1861
+ return !0;
1862
+ if (typeof e != typeof t)
1863
+ return !1;
1864
+ if (typeof e == "function" && e.toString() === t.toString())
1865
+ return !0;
1866
+ let n, r, o;
1867
+ if (e && t && typeof e == "object") {
1868
+ if (Array.isArray(e)) {
1869
+ if (n = e.length, n !== t.length) return !1;
1870
+ for (r = n; r-- !== 0; )
1871
+ if (!Be(e[r], t[r]))
1872
+ return !1;
1873
+ return !0;
1874
+ }
1875
+ if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
1876
+ return !1;
1877
+ for (r = n; r-- !== 0; )
1878
+ if (!{}.hasOwnProperty.call(t, o[r]))
1879
+ return !1;
1880
+ for (r = n; r-- !== 0; ) {
1881
+ const i = o[r];
1882
+ if (!(i === "_owner" && e.$$typeof) && !Be(e[i], t[i]))
1883
+ return !1;
1884
+ }
1885
+ return !0;
1886
+ }
1887
+ return e !== e && t !== t;
1888
+ }
1889
+ function nn(e) {
1890
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1891
+ }
1892
+ function kt(e, t) {
1893
+ const n = nn(e);
1894
+ return Math.round(t * n) / n;
1895
+ }
1896
+ function Ft(e) {
1897
+ const t = f.useRef(e);
1898
+ return De(() => {
1899
+ t.current = e;
1900
+ }), t;
1901
+ }
1902
+ function fo(e) {
1903
+ e === void 0 && (e = {});
1904
+ const {
1905
+ placement: t = "bottom",
1906
+ strategy: n = "absolute",
1907
+ middleware: r = [],
1908
+ platform: o,
1909
+ elements: {
1910
+ reference: i,
1911
+ floating: s
1912
+ } = {},
1913
+ transform: c = !0,
1914
+ whileElementsMounted: a,
1915
+ open: l
1916
+ } = e, [h, d] = f.useState({
1917
+ x: 0,
1918
+ y: 0,
1919
+ strategy: n,
1920
+ placement: t,
1921
+ middlewareData: {},
1922
+ isPositioned: !1
1923
+ }), [p, m] = f.useState(r);
1924
+ Be(p, r) || m(r);
1925
+ const [g, u] = f.useState(null), [v, y] = f.useState(null), w = f.useCallback((R) => {
1926
+ R !== C.current && (C.current = R, u(R));
1927
+ }, []), b = f.useCallback((R) => {
1928
+ R !== S.current && (S.current = R, y(R));
1929
+ }, []), x = i || g, E = s || v, C = f.useRef(null), S = f.useRef(null), A = f.useRef(h), O = a != null, D = Ft(a), j = Ft(o), M = f.useCallback(() => {
1930
+ if (!C.current || !S.current)
1931
+ return;
1932
+ const R = {
1933
+ placement: t,
1934
+ strategy: n,
1935
+ middleware: p
1936
+ };
1937
+ j.current && (R.platform = j.current), lo(C.current, S.current, R).then((W) => {
1938
+ const X = {
1939
+ ...W,
1940
+ isPositioned: !0
1941
+ };
1942
+ I.current && !Be(A.current, X) && (A.current = X, Ht.flushSync(() => {
1943
+ d(X);
1944
+ }));
1945
+ });
1946
+ }, [p, t, n, j]);
1947
+ De(() => {
1948
+ l === !1 && A.current.isPositioned && (A.current.isPositioned = !1, d((R) => ({
1949
+ ...R,
1950
+ isPositioned: !1
1951
+ })));
1952
+ }, [l]);
1953
+ const I = f.useRef(!1);
1954
+ De(() => (I.current = !0, () => {
1955
+ I.current = !1;
1956
+ }), []), De(() => {
1957
+ if (x && (C.current = x), E && (S.current = E), x && E) {
1958
+ if (D.current)
1959
+ return D.current(x, E, M);
1960
+ M();
1961
+ }
1962
+ }, [x, E, M, D, O]);
1963
+ const N = f.useMemo(() => ({
1964
+ reference: C,
1965
+ floating: S,
1966
+ setReference: w,
1967
+ setFloating: b
1968
+ }), [w, b]), T = f.useMemo(() => ({
1969
+ reference: x,
1970
+ floating: E
1971
+ }), [x, E]), k = f.useMemo(() => {
1972
+ const R = {
1973
+ position: n,
1974
+ left: 0,
1975
+ top: 0
1976
+ };
1977
+ if (!T.floating)
1978
+ return R;
1979
+ const W = kt(T.floating, h.x), X = kt(T.floating, h.y);
1980
+ return c ? {
1981
+ ...R,
1982
+ transform: "translate(" + W + "px, " + X + "px)",
1983
+ ...nn(T.floating) >= 1.5 && {
1984
+ willChange: "transform"
1985
+ }
1986
+ } : {
1987
+ position: n,
1988
+ left: W,
1989
+ top: X
1990
+ };
1991
+ }, [n, c, T.floating, h.x, h.y]);
1992
+ return f.useMemo(() => ({
1993
+ ...h,
1994
+ update: M,
1995
+ refs: N,
1996
+ elements: T,
1997
+ floatingStyles: k
1998
+ }), [h, M, N, T, k]);
1999
+ }
2000
+ var ho = "Arrow", rn = f.forwardRef((e, t) => {
2001
+ const { children: n, width: r = 10, height: o = 5, ...i } = e;
2002
+ return /* @__PURE__ */ P.jsx(
2003
+ ae.svg,
2004
+ {
2005
+ ...i,
2006
+ ref: t,
2007
+ width: r,
2008
+ height: o,
2009
+ viewBox: "0 0 30 10",
2010
+ preserveAspectRatio: "none",
2011
+ children: e.asChild ? n : /* @__PURE__ */ P.jsx("polygon", { points: "0,0 30,0 15,10" })
2012
+ }
2013
+ );
2014
+ });
2015
+ rn.displayName = ho;
2016
+ var mo = rn;
2017
+ function po(e) {
2018
+ const [t, n] = f.useState(void 0);
2019
+ return Ee(() => {
2020
+ if (e) {
2021
+ n({ width: e.offsetWidth, height: e.offsetHeight });
2022
+ const r = new ResizeObserver((o) => {
2023
+ if (!Array.isArray(o) || !o.length)
2024
+ return;
2025
+ const i = o[0];
2026
+ let s, c;
2027
+ if ("borderBoxSize" in i) {
2028
+ const a = i.borderBoxSize, l = Array.isArray(a) ? a[0] : a;
2029
+ s = l.inlineSize, c = l.blockSize;
2030
+ } else
2031
+ s = e.offsetWidth, c = e.offsetHeight;
2032
+ n({ width: s, height: c });
2033
+ });
2034
+ return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
2035
+ } else
2036
+ n(void 0);
2037
+ }, [e]), t;
2038
+ }
2039
+ var ut = "Popper", [on, Ai] = zt(ut), [vo, sn] = on(ut), cn = (e) => {
2040
+ const { __scopePopper: t, children: n } = e, [r, o] = f.useState(null);
2041
+ return /* @__PURE__ */ P.jsx(vo, { scope: t, anchor: r, onAnchorChange: o, children: n });
2042
+ };
2043
+ cn.displayName = ut;
2044
+ var an = "PopperAnchor", ln = f.forwardRef(
2045
+ (e, t) => {
2046
+ const { __scopePopper: n, virtualRef: r, ...o } = e, i = sn(an, n), s = f.useRef(null), c = se(t, s);
2047
+ return f.useEffect(() => {
2048
+ i.onAnchorChange((r == null ? void 0 : r.current) || s.current);
2049
+ }), r ? null : /* @__PURE__ */ P.jsx(ae.div, { ...o, ref: c });
2050
+ }
2051
+ );
2052
+ ln.displayName = an;
2053
+ var ft = "PopperContent", [go, yo] = on(ft), un = f.forwardRef(
2054
+ (e, t) => {
2055
+ var dt, ht, mt, pt, vt, gt;
2056
+ const {
2057
+ __scopePopper: n,
2058
+ side: r = "bottom",
2059
+ sideOffset: o = 0,
2060
+ align: i = "center",
2061
+ alignOffset: s = 0,
2062
+ arrowPadding: c = 0,
2063
+ avoidCollisions: a = !0,
2064
+ collisionBoundary: l = [],
2065
+ collisionPadding: h = 0,
2066
+ sticky: d = "partial",
2067
+ hideWhenDetached: p = !1,
2068
+ updatePositionStrategy: m = "optimized",
2069
+ onPlaced: g,
2070
+ ...u
2071
+ } = e, v = sn(ft, n), [y, w] = f.useState(null), b = se(t, (ye) => w(ye)), [x, E] = f.useState(null), C = po(x), S = (C == null ? void 0 : C.width) ?? 0, A = (C == null ? void 0 : C.height) ?? 0, O = r + (i !== "center" ? "-" + i : ""), D = typeof h == "number" ? h : { top: 0, right: 0, bottom: 0, left: 0, ...h }, j = Array.isArray(l) ? l : [l], M = j.length > 0, I = {
2072
+ padding: D,
2073
+ boundary: j.filter(xo),
2074
+ // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
2075
+ altBoundary: M
2076
+ }, { refs: N, floatingStyles: T, placement: k, isPositioned: R, middlewareData: W } = fo({
2077
+ // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
2078
+ strategy: "fixed",
2079
+ placement: O,
2080
+ whileElementsMounted: (...ye) => no(...ye, {
2081
+ animationFrame: m === "always"
2082
+ }),
2083
+ elements: {
2084
+ reference: v.anchor
2085
+ },
2086
+ middleware: [
2087
+ ro({ mainAxis: o + A, alignmentAxis: s }),
2088
+ a && oo({
2089
+ mainAxis: !0,
2090
+ crossAxis: !1,
2091
+ limiter: d === "partial" ? ao() : void 0,
2092
+ ...I
2093
+ }),
2094
+ a && io({ ...I }),
2095
+ so({
2096
+ ...I,
2097
+ apply: ({ elements: ye, rects: yt, availableWidth: On, availableHeight: Tn }) => {
2098
+ const { width: Mn, height: Ln } = yt.reference, Pe = ye.floating.style;
2099
+ Pe.setProperty("--radix-popper-available-width", `${On}px`), Pe.setProperty("--radix-popper-available-height", `${Tn}px`), Pe.setProperty("--radix-popper-anchor-width", `${Mn}px`), Pe.setProperty("--radix-popper-anchor-height", `${Ln}px`);
2100
+ }
2101
+ }),
2102
+ x && uo({ element: x, padding: c }),
2103
+ bo({ arrowWidth: S, arrowHeight: A }),
2104
+ p && co({ strategy: "referenceHidden", ...I })
2105
+ ]
2106
+ }), [X, En] = hn(k), Re = ee(g);
2107
+ Ee(() => {
2108
+ R && (Re == null || Re());
2109
+ }, [R, Re]);
2110
+ const Cn = (dt = W.arrow) == null ? void 0 : dt.x, Sn = (ht = W.arrow) == null ? void 0 : ht.y, An = ((mt = W.arrow) == null ? void 0 : mt.centerOffset) !== 0, [Rn, Pn] = f.useState();
2111
+ return Ee(() => {
2112
+ y && Pn(window.getComputedStyle(y).zIndex);
2113
+ }, [y]), /* @__PURE__ */ P.jsx(
2114
+ "div",
2115
+ {
2116
+ ref: N.setFloating,
2117
+ "data-radix-popper-content-wrapper": "",
2118
+ style: {
2119
+ ...T,
2120
+ transform: R ? T.transform : "translate(0, -200%)",
2121
+ // keep off the page when measuring
2122
+ minWidth: "max-content",
2123
+ zIndex: Rn,
2124
+ "--radix-popper-transform-origin": [
2125
+ (pt = W.transformOrigin) == null ? void 0 : pt.x,
2126
+ (vt = W.transformOrigin) == null ? void 0 : vt.y
2127
+ ].join(" "),
2128
+ // hide the content if using the hide middleware and should be hidden
2129
+ // set visibility to hidden and disable pointer events so the UI behaves
2130
+ // as if the PopperContent isn't there at all
2131
+ ...((gt = W.hide) == null ? void 0 : gt.referenceHidden) && {
2132
+ visibility: "hidden",
2133
+ pointerEvents: "none"
2134
+ }
2135
+ },
2136
+ dir: e.dir,
2137
+ children: /* @__PURE__ */ P.jsx(
2138
+ go,
2139
+ {
2140
+ scope: n,
2141
+ placedSide: X,
2142
+ onArrowChange: E,
2143
+ arrowX: Cn,
2144
+ arrowY: Sn,
2145
+ shouldHideArrow: An,
2146
+ children: /* @__PURE__ */ P.jsx(
2147
+ ae.div,
2148
+ {
2149
+ "data-side": X,
2150
+ "data-align": En,
2151
+ ...u,
2152
+ ref: b,
2153
+ style: {
2154
+ ...u.style,
2155
+ // if the PopperContent hasn't been placed yet (not all measurements done)
2156
+ // we prevent animations so that users's animation don't kick in too early referring wrong sides
2157
+ animation: R ? void 0 : "none"
2158
+ }
2159
+ }
2160
+ )
2161
+ }
2162
+ )
2163
+ }
2164
+ );
2165
+ }
2166
+ );
2167
+ un.displayName = ft;
2168
+ var fn = "PopperArrow", wo = {
2169
+ top: "bottom",
2170
+ right: "left",
2171
+ bottom: "top",
2172
+ left: "right"
2173
+ }, dn = f.forwardRef(function(t, n) {
2174
+ const { __scopePopper: r, ...o } = t, i = yo(fn, r), s = wo[i.placedSide];
2175
+ return (
2176
+ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
2177
+ // doesn't report size as we'd expect on SVG elements.
2178
+ // it reports their bounding box which is effectively the largest path inside the SVG.
2179
+ /* @__PURE__ */ P.jsx(
2180
+ "span",
2181
+ {
2182
+ ref: i.onArrowChange,
2183
+ style: {
2184
+ position: "absolute",
2185
+ left: i.arrowX,
2186
+ top: i.arrowY,
2187
+ [s]: 0,
2188
+ transformOrigin: {
2189
+ top: "",
2190
+ right: "0 0",
2191
+ bottom: "center 0",
2192
+ left: "100% 0"
2193
+ }[i.placedSide],
2194
+ transform: {
2195
+ top: "translateY(100%)",
2196
+ right: "translateY(50%) rotate(90deg) translateX(-50%)",
2197
+ bottom: "rotate(180deg)",
2198
+ left: "translateY(50%) rotate(-90deg) translateX(50%)"
2199
+ }[i.placedSide],
2200
+ visibility: i.shouldHideArrow ? "hidden" : void 0
2201
+ },
2202
+ children: /* @__PURE__ */ P.jsx(
2203
+ mo,
2204
+ {
2205
+ ...o,
2206
+ ref: n,
2207
+ style: {
2208
+ ...o.style,
2209
+ // ensures the element can be measured correctly (mostly for if SVG)
2210
+ display: "block"
2211
+ }
2212
+ }
2213
+ )
2214
+ }
2215
+ )
2216
+ );
2217
+ });
2218
+ dn.displayName = fn;
2219
+ function xo(e) {
2220
+ return e !== null;
2221
+ }
2222
+ var bo = (e) => ({
2223
+ name: "transformOrigin",
2224
+ options: e,
2225
+ fn(t) {
2226
+ var v, y, w;
2227
+ const { placement: n, rects: r, middlewareData: o } = t, s = ((v = o.arrow) == null ? void 0 : v.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, a = s ? 0 : e.arrowHeight, [l, h] = hn(n), d = { start: "0%", center: "50%", end: "100%" }[h], p = (((y = o.arrow) == null ? void 0 : y.x) ?? 0) + c / 2, m = (((w = o.arrow) == null ? void 0 : w.y) ?? 0) + a / 2;
2228
+ let g = "", u = "";
2229
+ return l === "bottom" ? (g = s ? d : `${p}px`, u = `${-a}px`) : l === "top" ? (g = s ? d : `${p}px`, u = `${r.floating.height + a}px`) : l === "right" ? (g = `${-a}px`, u = s ? d : `${m}px`) : l === "left" && (g = `${r.floating.width + a}px`, u = s ? d : `${m}px`), { data: { x: g, y: u } };
2230
+ }
2231
+ });
2232
+ function hn(e) {
2233
+ const [t, n = "center"] = e.split("-");
2234
+ return [t, n];
2235
+ }
2236
+ var Ri = cn, Pi = ln, Oi = un, Ti = dn, Eo = "Portal", Co = f.forwardRef((e, t) => {
2237
+ var c;
2238
+ const { container: n, ...r } = e, [o, i] = f.useState(!1);
2239
+ Ee(() => i(!0), []);
2240
+ const s = n || o && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
2241
+ return s ? Hn.createPortal(/* @__PURE__ */ P.jsx(ae.div, { ...r, ref: t }), s) : null;
2242
+ });
2243
+ Co.displayName = Eo;
2244
+ var So = function(e) {
2245
+ if (typeof document > "u")
2246
+ return null;
2247
+ var t = Array.isArray(e) ? e[0] : e;
2248
+ return t.ownerDocument.body;
2249
+ }, le = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Me = {}, Ke = 0, mn = function(e) {
2250
+ return e && (e.host || mn(e.parentNode));
2251
+ }, Ao = function(e, t) {
2252
+ return t.map(function(n) {
2253
+ if (e.contains(n))
2254
+ return n;
2255
+ var r = mn(n);
2256
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
2257
+ }).filter(function(n) {
2258
+ return !!n;
2259
+ });
2260
+ }, Ro = function(e, t, n, r) {
2261
+ var o = Ao(t, Array.isArray(e) ? e : [e]);
2262
+ Me[n] || (Me[n] = /* @__PURE__ */ new WeakMap());
2263
+ var i = Me[n], s = [], c = /* @__PURE__ */ new Set(), a = new Set(o), l = function(d) {
2264
+ !d || c.has(d) || (c.add(d), l(d.parentNode));
2265
+ };
2266
+ o.forEach(l);
2267
+ var h = function(d) {
2268
+ !d || a.has(d) || Array.prototype.forEach.call(d.children, function(p) {
2269
+ if (c.has(p))
2270
+ h(p);
2271
+ else
2272
+ try {
2273
+ var m = p.getAttribute(r), g = m !== null && m !== "false", u = (le.get(p) || 0) + 1, v = (i.get(p) || 0) + 1;
2274
+ le.set(p, u), i.set(p, v), s.push(p), u === 1 && g && Te.set(p, !0), v === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
2275
+ } catch (y) {
2276
+ console.error("aria-hidden: cannot operate on ", p, y);
2277
+ }
2278
+ });
2279
+ };
2280
+ return h(t), c.clear(), Ke++, function() {
2281
+ s.forEach(function(d) {
2282
+ var p = le.get(d) - 1, m = i.get(d) - 1;
2283
+ le.set(d, p), i.set(d, m), p || (Te.has(d) || d.removeAttribute(r), Te.delete(d)), m || d.removeAttribute(n);
2284
+ }), Ke--, Ke || (le = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Me = {});
2285
+ };
2286
+ }, Mi = function(e, t, n) {
2287
+ n === void 0 && (n = "data-aria-hidden");
2288
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = So(e);
2289
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live]"))), Ro(r, o, n, "aria-hidden")) : function() {
2290
+ return null;
2291
+ };
2292
+ }, z = function() {
2293
+ return z = Object.assign || function(t) {
2294
+ for (var n, r = 1, o = arguments.length; r < o; r++) {
2295
+ n = arguments[r];
2296
+ for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
2297
+ }
2298
+ return t;
2299
+ }, z.apply(this, arguments);
2300
+ };
2301
+ function pn(e, t) {
2302
+ var n = {};
2303
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2304
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
2305
+ for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
2306
+ t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
2307
+ return n;
2308
+ }
2309
+ function Po(e, t, n) {
2310
+ if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
2311
+ (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
2312
+ return e.concat(i || Array.prototype.slice.call(t));
2313
+ }
2314
+ var ke = "right-scroll-bar-position", Fe = "width-before-scroll-bar", Oo = "with-scroll-bars-hidden", To = "--removed-body-scroll-bar-size";
2315
+ function Ge(e, t) {
2316
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
2317
+ }
2318
+ function Mo(e, t) {
2319
+ var n = In(function() {
2320
+ return {
2321
+ // value
2322
+ value: e,
2323
+ // last callback
2324
+ callback: t,
2325
+ // "memoized" public interface
2326
+ facade: {
2327
+ get current() {
2328
+ return n.value;
2329
+ },
2330
+ set current(r) {
2331
+ var o = n.value;
2332
+ o !== r && (n.value = r, n.callback(r, o));
2333
+ }
2334
+ }
2335
+ };
2336
+ })[0];
2337
+ return n.callback = t, n.facade;
2338
+ }
2339
+ var Lo = typeof window < "u" ? f.useLayoutEffect : f.useEffect, It = /* @__PURE__ */ new WeakMap();
2340
+ function No(e, t) {
2341
+ var n = Mo(null, function(r) {
2342
+ return e.forEach(function(o) {
2343
+ return Ge(o, r);
2344
+ });
2345
+ });
2346
+ return Lo(function() {
2347
+ var r = It.get(n);
2348
+ if (r) {
2349
+ var o = new Set(r), i = new Set(e), s = n.current;
2350
+ o.forEach(function(c) {
2351
+ i.has(c) || Ge(c, null);
2352
+ }), i.forEach(function(c) {
2353
+ o.has(c) || Ge(c, s);
2354
+ });
2355
+ }
2356
+ It.set(n, e);
2357
+ }, [e]), n;
2358
+ }
2359
+ function Do(e) {
2360
+ return e;
2361
+ }
2362
+ function ko(e, t) {
2363
+ t === void 0 && (t = Do);
2364
+ var n = [], r = !1, o = {
2365
+ read: function() {
2366
+ if (r)
2367
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
2368
+ return n.length ? n[n.length - 1] : e;
2369
+ },
2370
+ useMedium: function(i) {
2371
+ var s = t(i, r);
2372
+ return n.push(s), function() {
2373
+ n = n.filter(function(c) {
2374
+ return c !== s;
2375
+ });
2376
+ };
2377
+ },
2378
+ assignSyncMedium: function(i) {
2379
+ for (r = !0; n.length; ) {
2380
+ var s = n;
2381
+ n = [], s.forEach(i);
2382
+ }
2383
+ n = {
2384
+ push: function(c) {
2385
+ return i(c);
2386
+ },
2387
+ filter: function() {
2388
+ return n;
2389
+ }
2390
+ };
2391
+ },
2392
+ assignMedium: function(i) {
2393
+ r = !0;
2394
+ var s = [];
2395
+ if (n.length) {
2396
+ var c = n;
2397
+ n = [], c.forEach(i), s = n;
2398
+ }
2399
+ var a = function() {
2400
+ var h = s;
2401
+ s = [], h.forEach(i);
2402
+ }, l = function() {
2403
+ return Promise.resolve().then(a);
2404
+ };
2405
+ l(), n = {
2406
+ push: function(h) {
2407
+ s.push(h), l();
2408
+ },
2409
+ filter: function(h) {
2410
+ return s = s.filter(h), n;
2411
+ }
2412
+ };
2413
+ }
2414
+ };
2415
+ return o;
2416
+ }
2417
+ function Fo(e) {
2418
+ e === void 0 && (e = {});
2419
+ var t = ko(null);
2420
+ return t.options = z({ async: !0, ssr: !1 }, e), t;
2421
+ }
2422
+ var vn = function(e) {
2423
+ var t = e.sideCar, n = pn(e, ["sideCar"]);
2424
+ if (!t)
2425
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
2426
+ var r = t.read();
2427
+ if (!r)
2428
+ throw new Error("Sidecar medium not found");
2429
+ return f.createElement(r, z({}, n));
2430
+ };
2431
+ vn.isSideCarExport = !0;
2432
+ function Io(e, t) {
2433
+ return e.useMedium(t), vn;
2434
+ }
2435
+ var gn = Fo(), Ze = function() {
2436
+ }, $e = f.forwardRef(function(e, t) {
2437
+ var n = f.useRef(null), r = f.useState({
2438
+ onScrollCapture: Ze,
2439
+ onWheelCapture: Ze,
2440
+ onTouchMoveCapture: Ze
2441
+ }), o = r[0], i = r[1], s = e.forwardProps, c = e.children, a = e.className, l = e.removeScrollBar, h = e.enabled, d = e.shards, p = e.sideCar, m = e.noIsolation, g = e.inert, u = e.allowPinchZoom, v = e.as, y = v === void 0 ? "div" : v, w = e.gapMode, b = pn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = p, E = No([n, t]), C = z(z({}, b), o);
2442
+ return f.createElement(
2443
+ f.Fragment,
2444
+ null,
2445
+ h && f.createElement(x, { sideCar: gn, removeScrollBar: l, shards: d, noIsolation: m, inert: g, setCallbacks: i, allowPinchZoom: !!u, lockRef: n, gapMode: w }),
2446
+ s ? f.cloneElement(f.Children.only(c), z(z({}, C), { ref: E })) : f.createElement(y, z({}, C, { className: a, ref: E }), c)
2447
+ );
2448
+ });
2449
+ $e.defaultProps = {
2450
+ enabled: !0,
2451
+ removeScrollBar: !0,
2452
+ inert: !1
2453
+ };
2454
+ $e.classNames = {
2455
+ fullWidth: Fe,
2456
+ zeroRight: ke
2457
+ };
2458
+ var Wo = function() {
2459
+ if (typeof __webpack_nonce__ < "u")
2460
+ return __webpack_nonce__;
2461
+ };
2462
+ function _o() {
2463
+ if (!document)
2464
+ return null;
2465
+ var e = document.createElement("style");
2466
+ e.type = "text/css";
2467
+ var t = Wo();
2468
+ return t && e.setAttribute("nonce", t), e;
2469
+ }
2470
+ function Bo(e, t) {
2471
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
2472
+ }
2473
+ function jo(e) {
2474
+ var t = document.head || document.getElementsByTagName("head")[0];
2475
+ t.appendChild(e);
2476
+ }
2477
+ var $o = function() {
2478
+ var e = 0, t = null;
2479
+ return {
2480
+ add: function(n) {
2481
+ e == 0 && (t = _o()) && (Bo(t, n), jo(t)), e++;
2482
+ },
2483
+ remove: function() {
2484
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
2485
+ }
2486
+ };
2487
+ }, Ho = function() {
2488
+ var e = $o();
2489
+ return function(t, n) {
2490
+ f.useEffect(function() {
2491
+ return e.add(t), function() {
2492
+ e.remove();
2493
+ };
2494
+ }, [t && n]);
2495
+ };
2496
+ }, yn = function() {
2497
+ var e = Ho(), t = function(n) {
2498
+ var r = n.styles, o = n.dynamic;
2499
+ return e(r, o), null;
2500
+ };
2501
+ return t;
2502
+ }, Vo = {
2503
+ left: 0,
2504
+ top: 0,
2505
+ right: 0,
2506
+ gap: 0
2507
+ }, qe = function(e) {
2508
+ return parseInt(e || "", 10) || 0;
2509
+ }, zo = function(e) {
2510
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
2511
+ return [qe(n), qe(r), qe(o)];
2512
+ }, Uo = function(e) {
2513
+ if (e === void 0 && (e = "margin"), typeof window > "u")
2514
+ return Vo;
2515
+ var t = zo(e), n = document.documentElement.clientWidth, r = window.innerWidth;
2516
+ return {
2517
+ left: t[0],
2518
+ top: t[1],
2519
+ right: t[2],
2520
+ gap: Math.max(0, r - n + t[2] - t[0])
2521
+ };
2522
+ }, Yo = yn(), he = "data-scroll-locked", Xo = function(e, t, n, r) {
2523
+ var o = e.left, i = e.top, s = e.right, c = e.gap;
2524
+ return n === void 0 && (n = "margin"), `
2525
+ .`.concat(Oo, ` {
2526
+ overflow: hidden `).concat(r, `;
2527
+ padding-right: `).concat(c, "px ").concat(r, `;
2528
+ }
2529
+ body[`).concat(he, `] {
2530
+ overflow: hidden `).concat(r, `;
2531
+ overscroll-behavior: contain;
2532
+ `).concat([
2533
+ t && "position: relative ".concat(r, ";"),
2534
+ n === "margin" && `
2535
+ padding-left: `.concat(o, `px;
2536
+ padding-top: `).concat(i, `px;
2537
+ padding-right: `).concat(s, `px;
2538
+ margin-left:0;
2539
+ margin-top:0;
2540
+ margin-right: `).concat(c, "px ").concat(r, `;
2541
+ `),
2542
+ n === "padding" && "padding-right: ".concat(c, "px ").concat(r, ";")
2543
+ ].filter(Boolean).join(""), `
2544
+ }
2545
+
2546
+ .`).concat(ke, ` {
2547
+ right: `).concat(c, "px ").concat(r, `;
2548
+ }
2549
+
2550
+ .`).concat(Fe, ` {
2551
+ margin-right: `).concat(c, "px ").concat(r, `;
2552
+ }
2553
+
2554
+ .`).concat(ke, " .").concat(ke, ` {
2555
+ right: 0 `).concat(r, `;
2556
+ }
2557
+
2558
+ .`).concat(Fe, " .").concat(Fe, ` {
2559
+ margin-right: 0 `).concat(r, `;
2560
+ }
2561
+
2562
+ body[`).concat(he, `] {
2563
+ `).concat(To, ": ").concat(c, `px;
2564
+ }
2565
+ `);
2566
+ }, Wt = function() {
2567
+ var e = parseInt(document.body.getAttribute(he) || "0", 10);
2568
+ return isFinite(e) ? e : 0;
2569
+ }, Ko = function() {
2570
+ f.useEffect(function() {
2571
+ return document.body.setAttribute(he, (Wt() + 1).toString()), function() {
2572
+ var e = Wt() - 1;
2573
+ e <= 0 ? document.body.removeAttribute(he) : document.body.setAttribute(he, e.toString());
2574
+ };
2575
+ }, []);
2576
+ }, Go = function(e) {
2577
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
2578
+ Ko();
2579
+ var i = f.useMemo(function() {
2580
+ return Uo(o);
2581
+ }, [o]);
2582
+ return f.createElement(Yo, { styles: Xo(i, !t, o, n ? "" : "!important") });
2583
+ }, nt = !1;
2584
+ if (typeof window < "u")
2585
+ try {
2586
+ var Le = Object.defineProperty({}, "passive", {
2587
+ get: function() {
2588
+ return nt = !0, !0;
2589
+ }
2590
+ });
2591
+ window.addEventListener("test", Le, Le), window.removeEventListener("test", Le, Le);
2592
+ } catch {
2593
+ nt = !1;
2594
+ }
2595
+ var ue = nt ? { passive: !1 } : !1, Zo = function(e) {
2596
+ return e.tagName === "TEXTAREA";
2597
+ }, wn = function(e, t) {
2598
+ var n = window.getComputedStyle(e);
2599
+ return (
2600
+ // not-not-scrollable
2601
+ n[t] !== "hidden" && // contains scroll inside self
2602
+ !(n.overflowY === n.overflowX && !Zo(e) && n[t] === "visible")
2603
+ );
2604
+ }, qo = function(e) {
2605
+ return wn(e, "overflowY");
2606
+ }, Qo = function(e) {
2607
+ return wn(e, "overflowX");
2608
+ }, _t = function(e, t) {
2609
+ var n = t.ownerDocument, r = t;
2610
+ do {
2611
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
2612
+ var o = xn(e, r);
2613
+ if (o) {
2614
+ var i = bn(e, r), s = i[1], c = i[2];
2615
+ if (s > c)
2616
+ return !0;
2617
+ }
2618
+ r = r.parentNode;
2619
+ } while (r && r !== n.body);
2620
+ return !1;
2621
+ }, Jo = function(e) {
2622
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
2623
+ return [
2624
+ t,
2625
+ n,
2626
+ r
2627
+ ];
2628
+ }, ei = function(e) {
2629
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
2630
+ return [
2631
+ t,
2632
+ n,
2633
+ r
2634
+ ];
2635
+ }, xn = function(e, t) {
2636
+ return e === "v" ? qo(t) : Qo(t);
2637
+ }, bn = function(e, t) {
2638
+ return e === "v" ? Jo(t) : ei(t);
2639
+ }, ti = function(e, t) {
2640
+ return e === "h" && t === "rtl" ? -1 : 1;
2641
+ }, ni = function(e, t, n, r, o) {
2642
+ var i = ti(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, a = t.contains(c), l = !1, h = s > 0, d = 0, p = 0;
2643
+ do {
2644
+ var m = bn(e, c), g = m[0], u = m[1], v = m[2], y = u - v - i * g;
2645
+ (g || y) && xn(e, c) && (d += y, p += g), c instanceof ShadowRoot ? c = c.host : c = c.parentNode;
2646
+ } while (
2647
+ // portaled content
2648
+ !a && c !== document.body || // self content
2649
+ a && (t.contains(c) || t === c)
2650
+ );
2651
+ return (h && (Math.abs(d) < 1 || !o) || !h && (Math.abs(p) < 1 || !o)) && (l = !0), l;
2652
+ }, Ne = function(e) {
2653
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
2654
+ }, Bt = function(e) {
2655
+ return [e.deltaX, e.deltaY];
2656
+ }, jt = function(e) {
2657
+ return e && "current" in e ? e.current : e;
2658
+ }, ri = function(e, t) {
2659
+ return e[0] === t[0] && e[1] === t[1];
2660
+ }, oi = function(e) {
2661
+ return `
2662
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
2663
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
2664
+ `);
2665
+ }, ii = 0, fe = [];
2666
+ function si(e) {
2667
+ var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(ii++)[0], i = f.useState(yn)[0], s = f.useRef(e);
2668
+ f.useEffect(function() {
2669
+ s.current = e;
2670
+ }, [e]), f.useEffect(function() {
2671
+ if (e.inert) {
2672
+ document.body.classList.add("block-interactivity-".concat(o));
2673
+ var u = Po([e.lockRef.current], (e.shards || []).map(jt), !0).filter(Boolean);
2674
+ return u.forEach(function(v) {
2675
+ return v.classList.add("allow-interactivity-".concat(o));
2676
+ }), function() {
2677
+ document.body.classList.remove("block-interactivity-".concat(o)), u.forEach(function(v) {
2678
+ return v.classList.remove("allow-interactivity-".concat(o));
2679
+ });
2680
+ };
2681
+ }
2682
+ }, [e.inert, e.lockRef.current, e.shards]);
2683
+ var c = f.useCallback(function(u, v) {
2684
+ if ("touches" in u && u.touches.length === 2)
2685
+ return !s.current.allowPinchZoom;
2686
+ var y = Ne(u), w = n.current, b = "deltaX" in u ? u.deltaX : w[0] - y[0], x = "deltaY" in u ? u.deltaY : w[1] - y[1], E, C = u.target, S = Math.abs(b) > Math.abs(x) ? "h" : "v";
2687
+ if ("touches" in u && S === "h" && C.type === "range")
2688
+ return !1;
2689
+ var A = _t(S, C);
2690
+ if (!A)
2691
+ return !0;
2692
+ if (A ? E = S : (E = S === "v" ? "h" : "v", A = _t(S, C)), !A)
2693
+ return !1;
2694
+ if (!r.current && "changedTouches" in u && (b || x) && (r.current = E), !E)
2695
+ return !0;
2696
+ var O = r.current || E;
2697
+ return ni(O, v, u, O === "h" ? b : x, !0);
2698
+ }, []), a = f.useCallback(function(u) {
2699
+ var v = u;
2700
+ if (!(!fe.length || fe[fe.length - 1] !== i)) {
2701
+ var y = "deltaY" in v ? Bt(v) : Ne(v), w = t.current.filter(function(E) {
2702
+ return E.name === v.type && (E.target === v.target || v.target === E.shadowParent) && ri(E.delta, y);
2703
+ })[0];
2704
+ if (w && w.should) {
2705
+ v.cancelable && v.preventDefault();
2706
+ return;
2707
+ }
2708
+ if (!w) {
2709
+ var b = (s.current.shards || []).map(jt).filter(Boolean).filter(function(E) {
2710
+ return E.contains(v.target);
2711
+ }), x = b.length > 0 ? c(v, b[0]) : !s.current.noIsolation;
2712
+ x && v.cancelable && v.preventDefault();
2713
+ }
2714
+ }
2715
+ }, []), l = f.useCallback(function(u, v, y, w) {
2716
+ var b = { name: u, delta: v, target: y, should: w, shadowParent: ci(y) };
2717
+ t.current.push(b), setTimeout(function() {
2718
+ t.current = t.current.filter(function(x) {
2719
+ return x !== b;
2720
+ });
2721
+ }, 1);
2722
+ }, []), h = f.useCallback(function(u) {
2723
+ n.current = Ne(u), r.current = void 0;
2724
+ }, []), d = f.useCallback(function(u) {
2725
+ l(u.type, Bt(u), u.target, c(u, e.lockRef.current));
2726
+ }, []), p = f.useCallback(function(u) {
2727
+ l(u.type, Ne(u), u.target, c(u, e.lockRef.current));
2728
+ }, []);
2729
+ f.useEffect(function() {
2730
+ return fe.push(i), e.setCallbacks({
2731
+ onScrollCapture: d,
2732
+ onWheelCapture: d,
2733
+ onTouchMoveCapture: p
2734
+ }), document.addEventListener("wheel", a, ue), document.addEventListener("touchmove", a, ue), document.addEventListener("touchstart", h, ue), function() {
2735
+ fe = fe.filter(function(u) {
2736
+ return u !== i;
2737
+ }), document.removeEventListener("wheel", a, ue), document.removeEventListener("touchmove", a, ue), document.removeEventListener("touchstart", h, ue);
2738
+ };
2739
+ }, []);
2740
+ var m = e.removeScrollBar, g = e.inert;
2741
+ return f.createElement(
2742
+ f.Fragment,
2743
+ null,
2744
+ g ? f.createElement(i, { styles: oi(o) }) : null,
2745
+ m ? f.createElement(Go, { gapMode: e.gapMode }) : null
2746
+ );
2747
+ }
2748
+ function ci(e) {
2749
+ for (var t = null; e !== null; )
2750
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
2751
+ return t;
2752
+ }
2753
+ const ai = Io(gn, si);
2754
+ var li = f.forwardRef(function(e, t) {
2755
+ return f.createElement($e, z({}, e, { ref: t, sideCar: ai }));
2756
+ });
2757
+ li.classNames = $e.classNames;
2758
+ export {
2759
+ Pi as A,
2760
+ Gn as B,
2761
+ Oi as C,
2762
+ sr as D,
2763
+ dr as F,
2764
+ gi as M,
2765
+ ae as P,
2766
+ li as R,
2767
+ be as S,
2768
+ zt as a,
2769
+ Ai as b,
2770
+ bi as c,
2771
+ Ve as d,
2772
+ Ci as e,
2773
+ ee as f,
2774
+ Ti as g,
2775
+ Mi as h,
2776
+ Vt as i,
2777
+ er as j,
2778
+ Ei as k,
2779
+ Ri as l,
2780
+ Co as m,
2781
+ Si as n,
2782
+ xi as o,
2783
+ yi as p,
2784
+ wi as q,
2785
+ Ee as r,
2786
+ Zn as s,
2787
+ se as u
2788
+ };
2789
+ //# sourceMappingURL=Combination-Djh-LWhb.js.map