zudoku 0.0.0-fed343e → 0.0.0-ff3751f
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.
- package/README.md +121 -0
- package/cli.js +2 -2
- package/dist/app/entry.client.js +2 -2
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.js +3 -0
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.d.ts +1 -0
- package/dist/app/main.js +12 -29
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/cli.js +1 -2
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/common/machine-id/lib.js.map +1 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/utils/box.js.map +1 -1
- package/dist/cli/dev/handler.js +2 -2
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +2 -6
- package/dist/config/validators/InputSidebarSchema.d.ts +21 -5
- package/dist/config/validators/InputSidebarSchema.js +7 -28
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/SidebarSchema.d.ts +24 -1
- package/dist/config/validators/SidebarSchema.js +80 -44
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +590 -311
- package/dist/config/validators/validate.js +42 -19
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js +21 -31
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +1 -1
- package/dist/lib/authentication/hook.js +1 -1
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +16 -0
- package/dist/lib/authentication/state.js +5 -0
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/Banner.js +7 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +1 -2
- package/dist/lib/components/ErrorPage.js.map +1 -1
- package/dist/lib/components/Header.js +6 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/InlineCode.d.ts +2 -1
- package/dist/lib/components/InlineCode.js +9 -1
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +5 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SlotletProvider.d.ts +10 -2
- package/dist/lib/components/SlotletProvider.js +4 -2
- package/dist/lib/components/SlotletProvider.js.map +1 -1
- package/dist/lib/components/SyntaxHighlight.js +4 -1
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +3 -0
- package/dist/lib/components/TopNavigation.js +38 -5
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +6 -10
- package/dist/lib/components/context/ZudokuContext.js +26 -20
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +18 -8
- package/dist/lib/components/index.js +10 -3
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +3 -3
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +18 -9
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +12 -7
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.js +10 -14
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +4 -7
- package/dist/lib/core/DevPortalContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.d.ts +1 -1
- package/dist/lib/errors/ErrorAlert.js +8 -3
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/oas/graphql/index.d.ts +2 -1
- package/dist/lib/oas/graphql/index.js +24 -16
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +1 -0
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js +11 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
- package/dist/lib/plugins/custom-pages/index.d.ts +10 -0
- package/dist/lib/plugins/custom-pages/index.js +11 -0
- package/dist/lib/plugins/custom-pages/index.js.map +1 -0
- package/dist/lib/plugins/markdown/MdxPage.js +2 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +5 -5
- package/dist/lib/plugins/markdown/index.js +31 -3
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +38 -0
- package/dist/lib/plugins/markdown/resolver.js +75 -0
- package/dist/lib/plugins/markdown/resolver.js.map +1 -0
- package/dist/lib/plugins/openapi/Endpoint.d.ts +1 -3
- package/dist/lib/plugins/openapi/Endpoint.js +46 -8
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -2
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +2 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +2 -2
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +1 -1
- package/dist/lib/plugins/openapi/Route.js +1 -1
- package/dist/lib/plugins/openapi/Route.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +17 -6
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.d.ts +2 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createWorkerClient.js +1 -1
- package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/worker.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +10 -2
- package/dist/lib/plugins/openapi/graphql/gql.js +2 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +29 -3
- package/dist/lib/plugins/openapi/graphql/graphql.js +87 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +2 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +15 -6
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ResponseTab.js +1 -1
- package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/createUrl.js +3 -1
- package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +2 -5
- package/dist/lib/plugins/redirect/index.js +1 -1
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/ui/Accordion.d.ts +7 -0
- package/dist/lib/ui/Accordion.js +14 -0
- package/dist/lib/ui/Accordion.js.map +1 -0
- package/dist/lib/ui/Alert.d.ts +8 -0
- package/dist/lib/ui/Alert.js +23 -0
- package/dist/lib/ui/Alert.js.map +1 -0
- package/dist/lib/ui/AlertDialog.d.ts +20 -0
- package/dist/lib/ui/AlertDialog.js +27 -0
- package/dist/lib/ui/AlertDialog.js.map +1 -0
- package/dist/lib/ui/AspectRatio.d.ts +3 -0
- package/dist/lib/ui/AspectRatio.js +4 -0
- package/dist/lib/ui/AspectRatio.js.map +1 -0
- package/dist/lib/ui/Badge.d.ts +9 -0
- package/dist/lib/ui/Badge.js +21 -0
- package/dist/lib/ui/Badge.js.map +1 -0
- package/dist/lib/ui/Breadcrumb.d.ts +19 -0
- package/dist/lib/ui/Breadcrumb.js +24 -0
- package/dist/lib/ui/Breadcrumb.js.map +1 -0
- package/dist/lib/ui/Button.d.ts +2 -3
- package/dist/lib/ui/Button.js +1 -1
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +36 -35
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Carousel.d.ts +18 -0
- package/dist/lib/ui/Carousel.js +99 -0
- package/dist/lib/ui/Carousel.js.map +1 -0
- package/dist/lib/ui/Checkbox.d.ts +4 -0
- package/dist/lib/ui/Checkbox.js +9 -0
- package/dist/lib/ui/Checkbox.js.map +1 -0
- package/dist/lib/ui/Collapsible.d.ts +5 -0
- package/dist/lib/ui/Collapsible.js +6 -0
- package/dist/lib/ui/Collapsible.js.map +1 -0
- package/dist/lib/ui/Command.d.ts +80 -0
- package/dist/lib/ui/Command.js +31 -0
- package/dist/lib/ui/Command.js.map +1 -0
- package/dist/lib/{components → ui}/Dialog.js +2 -2
- package/dist/lib/ui/Dialog.js.map +1 -0
- package/dist/lib/ui/Drawer.d.ts +8 -10
- package/dist/lib/ui/Drawer.js.map +1 -1
- package/dist/lib/ui/Form.d.ts +23 -0
- package/dist/lib/ui/Form.js +63 -0
- package/dist/lib/ui/Form.js.map +1 -0
- package/dist/lib/ui/HoverCard.d.ts +6 -0
- package/dist/lib/ui/HoverCard.js +10 -0
- package/dist/lib/ui/HoverCard.js.map +1 -0
- package/dist/lib/ui/Label.d.ts +5 -0
- package/dist/lib/ui/Label.js +10 -0
- package/dist/lib/ui/Label.js.map +1 -0
- package/dist/lib/ui/Pagination.d.ts +28 -0
- package/dist/lib/ui/Pagination.js +24 -0
- package/dist/lib/ui/Pagination.js.map +1 -0
- package/dist/lib/ui/Popover.d.ts +6 -0
- package/dist/lib/ui/Popover.js +10 -0
- package/dist/lib/ui/Popover.js.map +1 -0
- package/dist/lib/ui/Progress.d.ts +4 -0
- package/dist/lib/ui/Progress.js +8 -0
- package/dist/lib/ui/Progress.js.map +1 -0
- package/dist/lib/ui/RadioGroup.d.ts +5 -0
- package/dist/lib/ui/RadioGroup.js +15 -0
- package/dist/lib/ui/RadioGroup.js.map +1 -0
- package/dist/lib/ui/ScrollArea.d.ts +5 -0
- package/dist/lib/ui/ScrollArea.js +12 -0
- package/dist/lib/ui/ScrollArea.js.map +1 -0
- package/dist/lib/ui/Select.js.map +1 -0
- package/dist/lib/ui/Skeleton.d.ts +2 -0
- package/dist/lib/ui/Skeleton.js +7 -0
- package/dist/lib/ui/Skeleton.js.map +1 -0
- package/dist/lib/ui/Slider.d.ts +4 -0
- package/dist/lib/ui/Slider.js +8 -0
- package/dist/lib/ui/Slider.js.map +1 -0
- package/dist/lib/ui/Switch.d.ts +4 -0
- package/dist/lib/ui/Switch.js +8 -0
- package/dist/lib/ui/Switch.js.map +1 -0
- package/dist/lib/ui/Textarea.d.ts +4 -0
- package/dist/lib/ui/Textarea.js +9 -0
- package/dist/lib/ui/Textarea.js.map +1 -0
- package/dist/lib/ui/Toggle.d.ts +12 -0
- package/dist/lib/ui/Toggle.js +26 -0
- package/dist/lib/ui/Toggle.js.map +1 -0
- package/dist/lib/ui/ToggleGroup.d.ts +12 -0
- package/dist/lib/ui/ToggleGroup.js +21 -0
- package/dist/lib/ui/ToggleGroup.js.map +1 -0
- package/dist/lib/ui/Tooltip.d.ts +7 -0
- package/dist/lib/ui/Tooltip.js +11 -0
- package/dist/lib/ui/Tooltip.js.map +1 -0
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/invariant.d.ts +9 -0
- package/dist/lib/util/invariant.js +7 -3
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/lib/util/useExposedProps.d.ts +2 -0
- package/dist/lib/util/useExposedProps.js +9 -0
- package/dist/lib/util/useExposedProps.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/build.js +12 -3
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +3 -9
- package/dist/vite/config.js +40 -69
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/debug.d.ts +1 -0
- package/dist/vite/debug.js +10 -0
- package/dist/vite/debug.js.map +1 -0
- package/dist/vite/dev-server.d.ts +7 -1
- package/dist/vite/dev-server.js +20 -16
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/output.d.ts +101 -0
- package/dist/vite/output.js +30 -0
- package/dist/vite/output.js.map +1 -0
- package/dist/vite/plugin-api.js +4 -7
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-component.js +17 -8
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.js +7 -4
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +2 -3
- package/dist/vite/plugin-config.js +2 -3
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +4 -0
- package/dist/vite/plugin-custom-pages.js +30 -0
- package/dist/vite/plugin-custom-pages.js.map +1 -0
- package/dist/vite/plugin-docs.js +37 -24
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +3 -0
- package/dist/vite/plugin-frontmatter.js +33 -0
- package/dist/vite/plugin-frontmatter.js.map +1 -0
- package/dist/vite/plugin-mdx.js +17 -0
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +3 -0
- package/dist/vite/plugin-search.js +26 -0
- package/dist/vite/plugin-search.js.map +1 -0
- package/dist/vite/plugin-sidebar.js +21 -7
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin.js +7 -3
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +5 -1
- package/dist/vite/prerender.js +6 -5
- package/dist/vite/prerender.js.map +1 -1
- package/lib/{utils-ByIc_KIM.js → AnchorLink-BbB2q-jx.js} +231 -275
- package/lib/AnchorLink-BbB2q-jx.js.map +1 -0
- package/lib/{AuthenticationPlugin-Bx9FK124.js → AuthenticationPlugin-C9BHGXlE.js} +3 -3
- package/lib/{AuthenticationPlugin-Bx9FK124.js.map → AuthenticationPlugin-C9BHGXlE.js.map} +1 -1
- package/lib/{CategoryHeading-XnFqN2lJ.js → CategoryHeading-Bb9dqxD3.js} +4 -4
- package/lib/{CategoryHeading-XnFqN2lJ.js.map → CategoryHeading-Bb9dqxD3.js.map} +1 -1
- package/lib/ClientOnly-CVN6leDu.js +11 -0
- package/lib/ClientOnly-CVN6leDu.js.map +1 -0
- package/lib/{DeveloperHint-FBb2uXJe.js → DeveloperHint-DHdLXGHA.js} +2 -2
- package/lib/{DeveloperHint-FBb2uXJe.js.map → DeveloperHint-DHdLXGHA.js.map} +1 -1
- package/lib/Dialog-k70Qfukb.js +67 -0
- package/lib/Dialog-k70Qfukb.js.map +1 -0
- package/lib/{Markdown-B4aR03g6.js → Markdown-BDcCAWwm.js} +4298 -6518
- package/lib/Markdown-BDcCAWwm.js.map +1 -0
- package/lib/{MdxPage-BZyQsH8Z.js → MdxPage-DKMH_t0f.js} +25 -23
- package/lib/MdxPage-DKMH_t0f.js.map +1 -0
- package/lib/{OperationList-2NeWEM0u.js → OperationList-Tj7ubW_t.js} +181 -137
- package/lib/OperationList-Tj7ubW_t.js.map +1 -0
- package/lib/{Route-BZPewmrN.js → Route-C3DGB6OS.js} +3 -4
- package/lib/Route-C3DGB6OS.js.map +1 -0
- package/lib/Select-Bagt3Bme.js +223 -0
- package/lib/Select-Bagt3Bme.js.map +1 -0
- package/lib/SlotletProvider-Da7eFgd2.js +241 -0
- package/lib/SlotletProvider-Da7eFgd2.js.map +1 -0
- package/lib/Spinner-C6zroowC.js +40 -0
- package/lib/Spinner-C6zroowC.js.map +1 -0
- package/lib/StaggeredRender-DDHSzQKE.js +17 -0
- package/lib/StaggeredRender-DDHSzQKE.js.map +1 -0
- package/lib/ZudokuContext-BKXGJTmu.js +1222 -0
- package/lib/ZudokuContext-BKXGJTmu.js.map +1 -0
- package/lib/__vite-browser-external-BYRIRx8p.js +9 -0
- package/lib/__vite-browser-external-BYRIRx8p.js.map +1 -0
- package/lib/assets/{index-B9EWVYfo.js → index-B_Jk_Yzp.js} +968 -938
- package/lib/assets/index-B_Jk_Yzp.js.map +1 -0
- package/lib/assets/{worker-BvD7B6MG.js → worker-Bf8vjASY.js} +6769 -4411
- package/lib/assets/worker-Bf8vjASY.js.map +1 -0
- package/lib/cn-BmFQLtkS.js +2279 -0
- package/lib/cn-BmFQLtkS.js.map +1 -0
- package/lib/hook-sn0zMTkE.js +229 -0
- package/lib/hook-sn0zMTkE.js.map +1 -0
- package/lib/{index-Dv2KZuEw.js → index-AjWCJNGC.js} +1681 -1676
- package/lib/index-AjWCJNGC.js.map +1 -0
- package/lib/index-Bn6Lc9tq.js +9 -0
- package/lib/index-Bn6Lc9tq.js.map +1 -0
- package/lib/index-BuAyrJe3.js +46 -0
- package/lib/index-BuAyrJe3.js.map +1 -0
- package/lib/{index-BG0g4WW0.js → index-CRo94sKK.js} +750 -738
- package/lib/index-CRo94sKK.js.map +1 -0
- package/lib/{index-CLd8ycZz.js → index-CkwDvuPt.js} +947 -917
- package/lib/index-CkwDvuPt.js.map +1 -0
- package/lib/index-LNp6rxyU.js +2094 -0
- package/lib/index-LNp6rxyU.js.map +1 -0
- package/lib/index.esm-C5mr_sKO.js +1193 -0
- package/lib/index.esm-C5mr_sKO.js.map +1 -0
- package/lib/invariant-Caa8-XvF.js +26 -0
- package/lib/invariant-Caa8-XvF.js.map +1 -0
- package/lib/router-BsfSoK2j.js +3024 -0
- package/lib/router-BsfSoK2j.js.map +1 -0
- package/lib/state-CsuHT8ZO.js +183 -0
- package/lib/state-CsuHT8ZO.js.map +1 -0
- package/lib/ui/Accordion.js +47 -0
- package/lib/ui/Accordion.js.map +1 -0
- package/lib/ui/Alert.js +51 -0
- package/lib/ui/Alert.js.map +1 -0
- package/lib/ui/AlertDialog.js +114 -0
- package/lib/ui/AlertDialog.js.map +1 -0
- package/lib/ui/AspectRatio.js +6 -0
- package/lib/ui/AspectRatio.js.map +1 -0
- package/lib/ui/Badge.js +27 -0
- package/lib/ui/Badge.js.map +1 -0
- package/lib/ui/Breadcrumb.js +94 -0
- package/lib/ui/Breadcrumb.js.map +1 -0
- package/lib/ui/Button.js +49 -0
- package/lib/ui/Button.js.map +1 -0
- package/lib/ui/Callout.js +77 -0
- package/lib/ui/Callout.js.map +1 -0
- package/lib/ui/Card.js +62 -0
- package/lib/ui/Card.js.map +1 -0
- package/lib/ui/Carousel.js +1410 -0
- package/lib/ui/Carousel.js.map +1 -0
- package/lib/ui/Checkbox.js +28 -0
- package/lib/ui/Checkbox.js.map +1 -0
- package/lib/ui/Collapsible.js +8 -0
- package/lib/ui/Collapsible.js.map +1 -0
- package/lib/ui/Command.js +550 -0
- package/lib/ui/Command.js.map +1 -0
- package/lib/ui/Dialog.js +101 -0
- package/lib/ui/Dialog.js.map +1 -0
- package/lib/ui/Drawer.js +1153 -0
- package/lib/ui/Drawer.js.map +1 -0
- package/lib/ui/DropdownMenu.js +145 -0
- package/lib/ui/DropdownMenu.js.map +1 -0
- package/lib/ui/Form.js +95 -0
- package/lib/ui/Form.js.map +1 -0
- package/lib/ui/HoverCard.js +24 -0
- package/lib/ui/HoverCard.js.map +1 -0
- package/lib/ui/Input.js +22 -0
- package/lib/ui/Input.js.map +1 -0
- package/lib/ui/Label.js +20 -0
- package/lib/ui/Label.js.map +1 -0
- package/lib/ui/Pagination.js +106 -0
- package/lib/ui/Pagination.js.map +1 -0
- package/lib/ui/Popover.js +24 -0
- package/lib/ui/Popover.js.map +1 -0
- package/lib/ui/Progress.js +27 -0
- package/lib/ui/Progress.js.map +1 -0
- package/lib/ui/RadioGroup.js +32 -0
- package/lib/ui/RadioGroup.js.map +1 -0
- package/lib/ui/ScrollArea.js +39 -0
- package/lib/ui/ScrollArea.js.map +1 -0
- package/lib/ui/Select.js +122 -0
- package/lib/ui/Select.js.map +1 -0
- package/lib/ui/Skeleton.js +18 -0
- package/lib/ui/Skeleton.js.map +1 -0
- package/lib/ui/Slider.js +24 -0
- package/lib/ui/Slider.js.map +1 -0
- package/lib/ui/Switch.js +28 -0
- package/lib/ui/Switch.js.map +1 -0
- package/lib/ui/Tabs.js +47 -0
- package/lib/ui/Tabs.js.map +1 -0
- package/lib/ui/Textarea.js +21 -0
- package/lib/ui/Textarea.js.map +1 -0
- package/lib/ui/Toggle.js +38 -0
- package/lib/ui/Toggle.js.map +1 -0
- package/lib/ui/ToggleGroup.js +42 -0
- package/lib/ui/ToggleGroup.js.map +1 -0
- package/lib/ui/Tooltip.js +24 -0
- package/lib/ui/Tooltip.js.map +1 -0
- package/lib/urql-core-KJnLL26g.js +1455 -0
- package/lib/urql-core-KJnLL26g.js.map +1 -0
- package/lib/useExposedProps-ChOIUaS4.js +9 -0
- package/lib/useExposedProps-ChOIUaS4.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +541 -534
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +953 -2849
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +4668 -4380
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +69 -76
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +22 -0
- package/lib/zudoku.plugin-custom-pages.js.map +1 -0
- package/lib/zudoku.plugin-markdown.js +93 -24
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +9 -10
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +2 -2
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +9 -13
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +98 -72
- package/src/app/entry.client.tsx +4 -2
- package/src/app/entry.server.tsx +4 -0
- package/src/app/main.css +4 -1
- package/src/app/main.tsx +15 -33
- package/src/app/standalone.tsx +1 -1
- package/src/lib/authentication/components/CallbackHandler.tsx +20 -51
- package/src/lib/authentication/hook.ts +1 -1
- package/src/lib/authentication/state.ts +17 -0
- package/src/lib/components/Banner.tsx +12 -2
- package/src/lib/components/ErrorPage.tsx +0 -2
- package/src/lib/components/Header.tsx +21 -4
- package/src/lib/components/InlineCode.tsx +10 -0
- package/src/lib/components/Layout.tsx +2 -1
- package/src/lib/components/MobileTopNavigation.tsx +10 -2
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/SlotletProvider.tsx +29 -4
- package/src/lib/components/SyntaxHighlight.tsx +5 -1
- package/src/lib/components/TopNavigation.tsx +70 -23
- package/src/lib/components/context/ZudokuContext.ts +28 -20
- package/src/lib/components/index.ts +13 -4
- package/src/lib/components/navigation/Sidebar.tsx +6 -6
- package/src/lib/components/navigation/SidebarCategory.tsx +35 -29
- package/src/lib/components/navigation/SidebarItem.tsx +17 -20
- package/src/lib/components/navigation/utils.ts +11 -16
- package/src/lib/core/DevPortalContext.ts +4 -3
- package/src/lib/core/plugins.ts +2 -0
- package/src/lib/errors/ErrorAlert.tsx +18 -5
- package/src/lib/oas/graphql/index.ts +36 -24
- package/src/lib/oas/parser/index.ts +1 -0
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +2 -2
- package/src/lib/plugins/custom-pages/CustomPage.tsx +18 -0
- package/src/lib/plugins/custom-pages/index.tsx +24 -0
- package/src/lib/plugins/markdown/MdxPage.tsx +11 -9
- package/src/lib/plugins/markdown/index.tsx +49 -10
- package/src/lib/plugins/markdown/resolver.ts +92 -0
- package/src/lib/plugins/openapi/Endpoint.tsx +86 -22
- package/src/lib/plugins/openapi/OperationList.tsx +4 -2
- package/src/lib/plugins/openapi/OperationListItem.tsx +1 -1
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +3 -0
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/Route.tsx +1 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +21 -6
- package/src/lib/plugins/openapi/SimpleSelect.tsx +10 -2
- package/src/lib/plugins/openapi/client/createMemoryClient.ts +1 -6
- package/src/lib/plugins/openapi/client/createWorkerClient.ts +1 -6
- package/src/lib/plugins/openapi/client/worker.ts +2 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +11 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +116 -4
- package/src/lib/plugins/openapi/index.tsx +2 -6
- package/src/lib/plugins/openapi/interfaces.ts +4 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +42 -7
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -1
- package/src/lib/plugins/openapi/playground/createUrl.ts +6 -1
- package/src/lib/plugins/redirect/index.tsx +3 -7
- package/src/lib/ui/Accordion.tsx +56 -0
- package/src/lib/ui/{Note.tsx → Alert.tsx} +11 -10
- package/src/lib/ui/AlertDialog.tsx +139 -0
- package/src/lib/ui/AspectRatio.tsx +5 -0
- package/src/lib/ui/Badge.tsx +36 -0
- package/src/lib/ui/Breadcrumb.tsx +115 -0
- package/src/lib/ui/Button.tsx +1 -1
- package/src/lib/ui/Callout.tsx +7 -6
- package/src/lib/ui/Carousel.tsx +260 -0
- package/src/lib/ui/Checkbox.tsx +28 -0
- package/src/lib/ui/Collapsible.tsx +9 -0
- package/src/lib/ui/Command.tsx +151 -0
- package/src/lib/{components → ui}/Dialog.tsx +4 -3
- package/src/lib/ui/Drawer.tsx +38 -36
- package/src/lib/ui/Form.tsx +177 -0
- package/src/lib/ui/HoverCard.tsx +27 -0
- package/src/lib/ui/Label.tsx +24 -0
- package/src/lib/ui/Pagination.tsx +117 -0
- package/src/lib/ui/Popover.tsx +29 -0
- package/src/lib/ui/Progress.tsx +26 -0
- package/src/lib/ui/RadioGroup.tsx +42 -0
- package/src/lib/ui/ScrollArea.tsx +46 -0
- package/src/lib/ui/Skeleton.tsx +15 -0
- package/src/lib/ui/Slider.tsx +26 -0
- package/src/lib/ui/Switch.tsx +27 -0
- package/src/lib/ui/Textarea.tsx +23 -0
- package/src/lib/ui/Toggle.tsx +43 -0
- package/src/lib/ui/ToggleGroup.tsx +59 -0
- package/src/lib/ui/Tooltip.tsx +28 -0
- package/src/lib/util/MdxComponents.tsx +0 -1
- package/src/lib/util/invariant.ts +15 -3
- package/src/lib/util/useExposedProps.tsx +16 -0
- package/src/lib/util/useScrollToAnchor.ts +1 -1
- package/dist/internal.d.ts +0 -1
- package/dist/internal.js +0 -2
- package/dist/internal.js.map +0 -1
- package/dist/lib/components/Dialog.js.map +0 -1
- package/dist/lib/components/Select.js.map +0 -1
- package/dist/lib/plugins/custom-page/index.d.ts +0 -8
- package/dist/lib/plugins/custom-page/index.js +0 -12
- package/dist/lib/plugins/custom-page/index.js.map +0 -1
- package/dist/lib/plugins/markdown/generateRoutes.d.ts +0 -3
- package/dist/lib/plugins/markdown/generateRoutes.js +0 -19
- package/dist/lib/plugins/markdown/generateRoutes.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/Editor.d.ts +0 -1
- package/dist/lib/plugins/openapi/playground/Editor.js +0 -5
- package/dist/lib/plugins/openapi/playground/Editor.js.map +0 -1
- package/dist/lib/plugins/openapi/util/urql.d.ts +0 -7
- package/dist/lib/plugins/openapi/util/urql.js +0 -8
- package/dist/lib/plugins/openapi/util/urql.js.map +0 -1
- package/dist/lib/ui/Note.d.ts +0 -8
- package/dist/lib/ui/Note.js +0 -23
- package/dist/lib/ui/Note.js.map +0 -1
- package/dist/lib/util/slugify.d.ts +0 -2
- package/dist/lib/util/slugify.js +0 -3
- package/dist/lib/util/slugify.js.map +0 -1
- package/dist/vite/plugin-icons.d.ts +0 -3
- package/dist/vite/plugin-icons.js +0 -47
- package/dist/vite/plugin-icons.js.map +0 -1
- package/lib/ErrorPage-knunPbKI.js +0 -18
- package/lib/ErrorPage-knunPbKI.js.map +0 -1
- package/lib/Input-BEDZAKw0.js +0 -2198
- package/lib/Input-BEDZAKw0.js.map +0 -1
- package/lib/Markdown-B4aR03g6.js.map +0 -1
- package/lib/MdxPage-BZyQsH8Z.js.map +0 -1
- package/lib/OperationList-2NeWEM0u.js.map +0 -1
- package/lib/Route-BZPewmrN.js.map +0 -1
- package/lib/SidebarBadge-COz0hgfa.js +0 -498
- package/lib/SidebarBadge-COz0hgfa.js.map +0 -1
- package/lib/SlotletProvider-DJMaOUDs.js +0 -238
- package/lib/SlotletProvider-DJMaOUDs.js.map +0 -1
- package/lib/Spinner-3cQDBVGr.js +0 -7
- package/lib/Spinner-3cQDBVGr.js.map +0 -1
- package/lib/ZudokuContext-cr-pTRY1.js +0 -1084
- package/lib/ZudokuContext-cr-pTRY1.js.map +0 -1
- package/lib/assets/index-B9EWVYfo.js.map +0 -1
- package/lib/assets/worker-BvD7B6MG.js.map +0 -1
- package/lib/index-1EDgIO6b.js +0 -124
- package/lib/index-1EDgIO6b.js.map +0 -1
- package/lib/index-BG0g4WW0.js.map +0 -1
- package/lib/index-CLd8ycZz.js.map +0 -1
- package/lib/index-Dv2KZuEw.js.map +0 -1
- package/lib/index-Zezcv0xb.js +0 -2814
- package/lib/index-Zezcv0xb.js.map +0 -1
- package/lib/joinPath-B7kNnUX4.js +0 -8
- package/lib/joinPath-B7kNnUX4.js.map +0 -1
- package/lib/router-D2p7Olpn.js +0 -2971
- package/lib/router-D2p7Olpn.js.map +0 -1
- package/lib/slugify-DbLhpSPt.js +0 -28
- package/lib/slugify-DbLhpSPt.js.map +0 -1
- package/lib/state-lIwt9isb.js +0 -288
- package/lib/state-lIwt9isb.js.map +0 -1
- package/lib/urql-YhcsXYy8.js +0 -1591
- package/lib/urql-YhcsXYy8.js.map +0 -1
- package/lib/utils-ByIc_KIM.js.map +0 -1
- package/lib/zudoku.plugin-custom-page.js +0 -13
- package/lib/zudoku.plugin-custom-page.js.map +0 -1
- package/src/lib/plugins/custom-page/index.tsx +0 -22
- package/src/lib/plugins/markdown/generateRoutes.tsx +0 -35
- package/src/lib/plugins/openapi/playground/Editor.tsx +0 -4
- package/src/lib/plugins/openapi/util/urql.ts +0 -8
- package/src/lib/util/slugify.ts +0 -3
- /package/dist/lib/{components → ui}/Dialog.d.ts +0 -0
- /package/dist/lib/{components → ui}/Select.d.ts +0 -0
- /package/dist/lib/{components → ui}/Select.js +0 -0
- /package/src/lib/{components → ui}/Select.tsx +0 -0
package/lib/zudoku.components.js
CHANGED
|
@@ -1,174 +1,181 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var ut = Object.defineProperty;
|
|
2
|
+
var ye = (t) => {
|
|
3
|
+
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
set _(
|
|
10
|
-
|
|
5
|
+
var dt = (t, e, r) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
|
+
var v = (t, e, r) => dt(t, typeof e != "symbol" ? e + "" : e, r), je = (t, e, r) => e.has(t) || ye("Cannot " + r);
|
|
7
|
+
var l = (t, e, r) => (je(t, e, "read from private field"), r ? r.call(t) : e.get(t)), y = (t, e, r) => e.has(t) ? ye("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), g = (t, e, r, s) => (je(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
|
|
8
|
+
var X = (t, e, r, s) => ({
|
|
9
|
+
set _(n) {
|
|
10
|
+
g(t, e, n, r);
|
|
11
11
|
},
|
|
12
12
|
get _() {
|
|
13
|
-
return
|
|
13
|
+
return l(t, e, s);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import {
|
|
17
|
-
import { e as
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import { a as
|
|
25
|
-
import {
|
|
26
|
-
import { a as
|
|
27
|
-
import {
|
|
28
|
-
import { j as Ft } from "./
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
import { a as Te, H as ce, M as ht, A as ft, u as gt } from "./AnchorLink-BbB2q-jx.js";
|
|
17
|
+
import { e as mt, f as pt, R as vt, L as te, g as G, h as xt, O as _e, i as bt, b as yt, u as ue } from "./index-CRo94sKK.js";
|
|
18
|
+
import { u as jt } from "./state-CsuHT8ZO.js";
|
|
19
|
+
import { E as Fe, S as k, a as wt, R as Nt } from "./SlotletProvider-Da7eFgd2.js";
|
|
20
|
+
import { j as a } from "./jsx-runtime-B6kdoens.js";
|
|
21
|
+
import { Button as ie } from "./ui/Button.js";
|
|
22
|
+
import { Callout as Pt } from "./ui/Callout.js";
|
|
23
|
+
import St, { StrictMode as Qe, createContext as Le, Component as Ct, createElement as we, useState as Q, useCallback as Be, useEffect as _, Suspense as de, memo as He, useMemo as re, useContext as Et, Fragment as kt, useRef as he, forwardRef as At } from "react";
|
|
24
|
+
import { a as fe } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
25
|
+
import { B as Mt } from "./router-BsfSoK2j.js";
|
|
26
|
+
import { a as oe } from "./StaggeredRender-DDHSzQKE.js";
|
|
27
|
+
import { C as Dt } from "./ClientOnly-CVN6leDu.js";
|
|
28
|
+
import { S as ze, i as qe, Q as Ot, n as b, m as Ne, j as Pe, k as M, l as Rt, o as It, p as Tt, q as _t, r as Se, t as Ce, v as Ft, h as Ee, w as ke, x as Qt, y as L, u as F, z as Ke, A as Lt, g as Bt, Z as Ht, B as zt, C as qt } from "./ZudokuContext-BKXGJTmu.js";
|
|
29
|
+
import { M as Kt, u as ee } from "./hook-sn0zMTkE.js";
|
|
30
|
+
import { a as $t, T as Ut, b as Vt, V as Wt, u as ge } from "./Markdown-BDcCAWwm.js";
|
|
31
|
+
import { CircleXIcon as Yt, SearchIcon as Xt, MenuIcon as Zt, MoonStarIcon as Jt, SunIcon as Gt, ChevronRightIcon as er, ExternalLinkIcon as tr, PanelLeftIcon as rr } from "lucide-react";
|
|
32
|
+
import { DropdownMenu as ar, DropdownMenuTrigger as sr, DropdownMenuContent as nr, DropdownMenuLabel as ir, DropdownMenuSeparator as or, DropdownMenuSub as lr, DropdownMenuSubTrigger as cr, DropdownMenuPortal as ur, DropdownMenuSubContent as dr, DropdownMenuItem as hr } from "./ui/DropdownMenu.js";
|
|
33
|
+
import { c as A } from "./cn-BmFQLtkS.js";
|
|
34
|
+
import { VisuallyHidden as $e } from "@radix-ui/react-visually-hidden";
|
|
35
|
+
import { a as Ue, c as fr } from "./index-BuAyrJe3.js";
|
|
36
|
+
import { Drawer as Ve, DrawerTrigger as We, DrawerContent as Ye, DrawerTitle as Xe, DrawerClose as gr } from "./ui/Drawer.js";
|
|
37
|
+
import { S as ae, a as mr } from "./Spinner-C6zroowC.js";
|
|
38
|
+
import * as se from "@radix-ui/react-collapsible";
|
|
39
|
+
function pr({ error: t }) {
|
|
40
|
+
return /* @__PURE__ */ a.jsx(Fe, { error: t });
|
|
34
41
|
}
|
|
35
|
-
var
|
|
36
|
-
const
|
|
37
|
-
Object.defineProperty(
|
|
38
|
-
var
|
|
39
|
-
function
|
|
40
|
-
if (
|
|
41
|
-
var
|
|
42
|
-
return
|
|
43
|
-
if (
|
|
44
|
-
var
|
|
45
|
-
Object.defineProperty(
|
|
42
|
+
var W = {};
|
|
43
|
+
const vr = /* @__PURE__ */ fe(Mt), xr = /* @__PURE__ */ fe(mt), br = /* @__PURE__ */ fe(pt);
|
|
44
|
+
Object.defineProperty(W, "__esModule", { value: !0 });
|
|
45
|
+
var yr = St, E = vr, me = xr, D = br;
|
|
46
|
+
function jr(t) {
|
|
47
|
+
if (t && t.__esModule) return t;
|
|
48
|
+
var e = /* @__PURE__ */ Object.create(null);
|
|
49
|
+
return t && Object.keys(t).forEach(function(r) {
|
|
50
|
+
if (r !== "default") {
|
|
51
|
+
var s = Object.getOwnPropertyDescriptor(t, r);
|
|
52
|
+
Object.defineProperty(e, r, s.get ? s : {
|
|
46
53
|
enumerable: !0,
|
|
47
54
|
get: function() {
|
|
48
|
-
return
|
|
55
|
+
return t[r];
|
|
49
56
|
}
|
|
50
57
|
});
|
|
51
58
|
}
|
|
52
|
-
}),
|
|
59
|
+
}), e.default = t, Object.freeze(e);
|
|
53
60
|
}
|
|
54
|
-
var
|
|
55
|
-
function
|
|
56
|
-
basename:
|
|
57
|
-
children:
|
|
58
|
-
location:
|
|
59
|
-
future:
|
|
61
|
+
var S = /* @__PURE__ */ jr(yr);
|
|
62
|
+
function wr({
|
|
63
|
+
basename: t,
|
|
64
|
+
children: e,
|
|
65
|
+
location: r = "/",
|
|
66
|
+
future: s
|
|
60
67
|
}) {
|
|
61
|
-
typeof
|
|
62
|
-
let
|
|
63
|
-
pathname:
|
|
64
|
-
search:
|
|
65
|
-
hash:
|
|
66
|
-
state:
|
|
67
|
-
key:
|
|
68
|
-
},
|
|
69
|
-
return /* @__PURE__ */
|
|
70
|
-
basename:
|
|
71
|
-
children:
|
|
72
|
-
location:
|
|
73
|
-
navigationType:
|
|
74
|
-
navigator:
|
|
75
|
-
future:
|
|
68
|
+
typeof r == "string" && (r = D.parsePath(r));
|
|
69
|
+
let n = E.Action.Pop, i = {
|
|
70
|
+
pathname: r.pathname || "/",
|
|
71
|
+
search: r.search || "",
|
|
72
|
+
hash: r.hash || "",
|
|
73
|
+
state: r.state != null ? r.state : null,
|
|
74
|
+
key: r.key || "default"
|
|
75
|
+
}, o = Ze();
|
|
76
|
+
return /* @__PURE__ */ S.createElement(D.Router, {
|
|
77
|
+
basename: t,
|
|
78
|
+
children: e,
|
|
79
|
+
location: i,
|
|
80
|
+
navigationType: n,
|
|
81
|
+
navigator: o,
|
|
82
|
+
future: s,
|
|
76
83
|
static: !0
|
|
77
84
|
});
|
|
78
85
|
}
|
|
79
|
-
function
|
|
80
|
-
context:
|
|
81
|
-
router:
|
|
82
|
-
hydrate:
|
|
83
|
-
nonce:
|
|
86
|
+
function Nr({
|
|
87
|
+
context: t,
|
|
88
|
+
router: e,
|
|
89
|
+
hydrate: r = !0,
|
|
90
|
+
nonce: s
|
|
84
91
|
}) {
|
|
85
|
-
|
|
86
|
-
let
|
|
87
|
-
router:
|
|
88
|
-
navigator:
|
|
92
|
+
e && t || (process.env.NODE_ENV !== "production" ? E.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : E.UNSAFE_invariant(!1));
|
|
93
|
+
let n = {
|
|
94
|
+
router: e,
|
|
95
|
+
navigator: Ze(),
|
|
89
96
|
static: !0,
|
|
90
|
-
staticContext:
|
|
91
|
-
basename:
|
|
92
|
-
},
|
|
93
|
-
if (
|
|
94
|
-
let
|
|
95
|
-
loaderData:
|
|
96
|
-
actionData:
|
|
97
|
-
errors:
|
|
97
|
+
staticContext: t,
|
|
98
|
+
basename: t.basename || "/"
|
|
99
|
+
}, i = /* @__PURE__ */ new Map(), o = "";
|
|
100
|
+
if (r !== !1) {
|
|
101
|
+
let c = {
|
|
102
|
+
loaderData: t.loaderData,
|
|
103
|
+
actionData: t.actionData,
|
|
104
|
+
errors: Sr(t.errors)
|
|
98
105
|
};
|
|
99
|
-
|
|
106
|
+
o = `window.__staticRouterHydrationData = JSON.parse(${Dr(JSON.stringify(JSON.stringify(c)))});`;
|
|
100
107
|
}
|
|
101
108
|
let {
|
|
102
|
-
state:
|
|
103
|
-
} =
|
|
104
|
-
return /* @__PURE__ */
|
|
105
|
-
value:
|
|
106
|
-
}, /* @__PURE__ */
|
|
107
|
-
value:
|
|
108
|
-
}, /* @__PURE__ */
|
|
109
|
-
value:
|
|
110
|
-
}, /* @__PURE__ */
|
|
109
|
+
state: u
|
|
110
|
+
} = n.router;
|
|
111
|
+
return /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement(D.UNSAFE_DataRouterContext.Provider, {
|
|
112
|
+
value: n
|
|
113
|
+
}, /* @__PURE__ */ S.createElement(D.UNSAFE_DataRouterStateContext.Provider, {
|
|
114
|
+
value: u
|
|
115
|
+
}, /* @__PURE__ */ S.createElement(D.UNSAFE_FetchersContext.Provider, {
|
|
116
|
+
value: i
|
|
117
|
+
}, /* @__PURE__ */ S.createElement(D.UNSAFE_ViewTransitionContext.Provider, {
|
|
111
118
|
value: {
|
|
112
119
|
isTransitioning: !1
|
|
113
120
|
}
|
|
114
|
-
}, /* @__PURE__ */
|
|
115
|
-
basename:
|
|
116
|
-
location:
|
|
117
|
-
navigationType:
|
|
118
|
-
navigator:
|
|
119
|
-
static:
|
|
121
|
+
}, /* @__PURE__ */ S.createElement(D.Router, {
|
|
122
|
+
basename: n.basename,
|
|
123
|
+
location: u.location,
|
|
124
|
+
navigationType: u.historyAction,
|
|
125
|
+
navigator: n.navigator,
|
|
126
|
+
static: n.static,
|
|
120
127
|
future: {
|
|
121
|
-
v7_relativeSplatPath:
|
|
128
|
+
v7_relativeSplatPath: e.future.v7_relativeSplatPath
|
|
122
129
|
}
|
|
123
|
-
}, /* @__PURE__ */
|
|
124
|
-
routes:
|
|
125
|
-
future:
|
|
126
|
-
state:
|
|
127
|
-
})))))),
|
|
130
|
+
}, /* @__PURE__ */ S.createElement(Pr, {
|
|
131
|
+
routes: e.routes,
|
|
132
|
+
future: e.future,
|
|
133
|
+
state: u
|
|
134
|
+
})))))), o ? /* @__PURE__ */ S.createElement("script", {
|
|
128
135
|
suppressHydrationWarning: !0,
|
|
129
|
-
nonce:
|
|
136
|
+
nonce: s,
|
|
130
137
|
dangerouslySetInnerHTML: {
|
|
131
|
-
__html:
|
|
138
|
+
__html: o
|
|
132
139
|
}
|
|
133
140
|
}) : null);
|
|
134
141
|
}
|
|
135
|
-
function
|
|
136
|
-
routes:
|
|
137
|
-
future:
|
|
138
|
-
state:
|
|
142
|
+
function Pr({
|
|
143
|
+
routes: t,
|
|
144
|
+
future: e,
|
|
145
|
+
state: r
|
|
139
146
|
}) {
|
|
140
|
-
return
|
|
147
|
+
return me.UNSAFE_useRoutesImpl(t, void 0, r, e);
|
|
141
148
|
}
|
|
142
|
-
function
|
|
143
|
-
if (!
|
|
144
|
-
let
|
|
145
|
-
for (let [
|
|
146
|
-
|
|
147
|
-
...
|
|
149
|
+
function Sr(t) {
|
|
150
|
+
if (!t) return null;
|
|
151
|
+
let e = Object.entries(t), r = {};
|
|
152
|
+
for (let [s, n] of e)
|
|
153
|
+
E.isRouteErrorResponse(n) ? r[s] = {
|
|
154
|
+
...n,
|
|
148
155
|
__type: "RouteErrorResponse"
|
|
149
|
-
} :
|
|
150
|
-
message:
|
|
156
|
+
} : n instanceof Error ? r[s] = {
|
|
157
|
+
message: n.message,
|
|
151
158
|
__type: "Error",
|
|
152
159
|
// If this is a subclass (i.e., ReferenceError), send up the type so we
|
|
153
160
|
// can re-create the same type during hydration.
|
|
154
|
-
...
|
|
155
|
-
__subType:
|
|
161
|
+
...n.name !== "Error" ? {
|
|
162
|
+
__subType: n.name
|
|
156
163
|
} : {}
|
|
157
|
-
} :
|
|
158
|
-
return
|
|
164
|
+
} : r[s] = n;
|
|
165
|
+
return r;
|
|
159
166
|
}
|
|
160
|
-
function
|
|
167
|
+
function Ze() {
|
|
161
168
|
return {
|
|
162
|
-
createHref:
|
|
163
|
-
encodeLocation:
|
|
164
|
-
push(
|
|
165
|
-
throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(
|
|
169
|
+
createHref: Je,
|
|
170
|
+
encodeLocation: Ge,
|
|
171
|
+
push(t) {
|
|
172
|
+
throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)})\` somewhere in your app.`);
|
|
166
173
|
},
|
|
167
|
-
replace(
|
|
168
|
-
throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(
|
|
174
|
+
replace(t) {
|
|
175
|
+
throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)}, { replace: true })\` somewhere in your app.`);
|
|
169
176
|
},
|
|
170
|
-
go(
|
|
171
|
-
throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${
|
|
177
|
+
go(t) {
|
|
178
|
+
throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${t})\` somewhere in your app.`);
|
|
172
179
|
},
|
|
173
180
|
back() {
|
|
174
181
|
throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.");
|
|
@@ -178,45 +185,45 @@ function Qn() {
|
|
|
178
185
|
}
|
|
179
186
|
};
|
|
180
187
|
}
|
|
181
|
-
function
|
|
182
|
-
return
|
|
183
|
-
...
|
|
184
|
-
mapRouteProperties:
|
|
188
|
+
function Cr(t, e) {
|
|
189
|
+
return E.createStaticHandler(t, {
|
|
190
|
+
...e,
|
|
191
|
+
mapRouteProperties: me.UNSAFE_mapRouteProperties
|
|
185
192
|
});
|
|
186
193
|
}
|
|
187
|
-
function
|
|
188
|
-
let
|
|
189
|
-
let
|
|
194
|
+
function Er(t, e, r = {}) {
|
|
195
|
+
let s = {}, n = E.UNSAFE_convertRoutesToDataRoutes(t, me.UNSAFE_mapRouteProperties, void 0, s), i = e.matches.map((u) => {
|
|
196
|
+
let c = s[u.route.id] || u.route;
|
|
190
197
|
return {
|
|
191
|
-
...
|
|
192
|
-
route:
|
|
198
|
+
...u,
|
|
199
|
+
route: c
|
|
193
200
|
};
|
|
194
|
-
}),
|
|
201
|
+
}), o = (u) => `You cannot use router.${u}() on the server because it is a stateless environment`;
|
|
195
202
|
return {
|
|
196
203
|
get basename() {
|
|
197
|
-
return
|
|
204
|
+
return e.basename;
|
|
198
205
|
},
|
|
199
206
|
get future() {
|
|
200
|
-
var
|
|
207
|
+
var u, c;
|
|
201
208
|
return {
|
|
202
209
|
v7_fetcherPersist: !1,
|
|
203
210
|
v7_normalizeFormMethod: !1,
|
|
204
|
-
v7_partialHydration: ((
|
|
211
|
+
v7_partialHydration: ((u = r.future) == null ? void 0 : u.v7_partialHydration) === !0,
|
|
205
212
|
v7_prependBasename: !1,
|
|
206
|
-
v7_relativeSplatPath: ((
|
|
213
|
+
v7_relativeSplatPath: ((c = r.future) == null ? void 0 : c.v7_relativeSplatPath) === !0,
|
|
207
214
|
v7_skipActionErrorRevalidation: !1
|
|
208
215
|
};
|
|
209
216
|
},
|
|
210
217
|
get state() {
|
|
211
218
|
return {
|
|
212
|
-
historyAction:
|
|
213
|
-
location:
|
|
214
|
-
matches:
|
|
215
|
-
loaderData:
|
|
216
|
-
actionData:
|
|
217
|
-
errors:
|
|
219
|
+
historyAction: E.Action.Pop,
|
|
220
|
+
location: e.location,
|
|
221
|
+
matches: i,
|
|
222
|
+
loaderData: e.loaderData,
|
|
223
|
+
actionData: e.actionData,
|
|
224
|
+
errors: e.errors,
|
|
218
225
|
initialized: !0,
|
|
219
|
-
navigation:
|
|
226
|
+
navigation: E.IDLE_NAVIGATION,
|
|
220
227
|
restoreScrollPosition: null,
|
|
221
228
|
preventScrollReset: !1,
|
|
222
229
|
revalidation: "idle",
|
|
@@ -225,2922 +232,1016 @@ function us(e, t, n = {}) {
|
|
|
225
232
|
};
|
|
226
233
|
},
|
|
227
234
|
get routes() {
|
|
228
|
-
return
|
|
235
|
+
return n;
|
|
229
236
|
},
|
|
230
237
|
get window() {
|
|
231
238
|
},
|
|
232
239
|
initialize() {
|
|
233
|
-
throw
|
|
240
|
+
throw o("initialize");
|
|
234
241
|
},
|
|
235
242
|
subscribe() {
|
|
236
|
-
throw
|
|
243
|
+
throw o("subscribe");
|
|
237
244
|
},
|
|
238
245
|
enableScrollRestoration() {
|
|
239
|
-
throw
|
|
246
|
+
throw o("enableScrollRestoration");
|
|
240
247
|
},
|
|
241
248
|
navigate() {
|
|
242
|
-
throw
|
|
249
|
+
throw o("navigate");
|
|
243
250
|
},
|
|
244
251
|
fetch() {
|
|
245
|
-
throw
|
|
252
|
+
throw o("fetch");
|
|
246
253
|
},
|
|
247
254
|
revalidate() {
|
|
248
|
-
throw
|
|
255
|
+
throw o("revalidate");
|
|
249
256
|
},
|
|
250
|
-
createHref:
|
|
251
|
-
encodeLocation:
|
|
257
|
+
createHref: Je,
|
|
258
|
+
encodeLocation: Ge,
|
|
252
259
|
getFetcher() {
|
|
253
|
-
return
|
|
260
|
+
return E.IDLE_FETCHER;
|
|
254
261
|
},
|
|
255
262
|
deleteFetcher() {
|
|
256
|
-
throw
|
|
263
|
+
throw o("deleteFetcher");
|
|
257
264
|
},
|
|
258
265
|
dispose() {
|
|
259
|
-
throw
|
|
266
|
+
throw o("dispose");
|
|
260
267
|
},
|
|
261
268
|
getBlocker() {
|
|
262
|
-
return
|
|
269
|
+
return E.IDLE_BLOCKER;
|
|
263
270
|
},
|
|
264
271
|
deleteBlocker() {
|
|
265
|
-
throw
|
|
272
|
+
throw o("deleteBlocker");
|
|
266
273
|
},
|
|
267
274
|
patchRoutes() {
|
|
268
|
-
throw
|
|
275
|
+
throw o("patchRoutes");
|
|
269
276
|
},
|
|
270
277
|
_internalFetchControllers: /* @__PURE__ */ new Map(),
|
|
271
278
|
_internalActiveDeferreds: /* @__PURE__ */ new Map(),
|
|
272
279
|
_internalSetRoutes() {
|
|
273
|
-
throw
|
|
280
|
+
throw o("_internalSetRoutes");
|
|
274
281
|
}
|
|
275
282
|
};
|
|
276
283
|
}
|
|
277
|
-
function
|
|
278
|
-
return typeof
|
|
284
|
+
function Je(t) {
|
|
285
|
+
return typeof t == "string" ? t : D.createPath(t);
|
|
279
286
|
}
|
|
280
|
-
function
|
|
281
|
-
let
|
|
282
|
-
|
|
283
|
-
let
|
|
287
|
+
function Ge(t) {
|
|
288
|
+
let e = typeof t == "string" ? t : D.createPath(t);
|
|
289
|
+
e = e.replace(/ $/, "%20");
|
|
290
|
+
let r = kr.test(e) ? new URL(e) : new URL(e, "http://localhost");
|
|
284
291
|
return {
|
|
285
|
-
pathname:
|
|
286
|
-
search:
|
|
287
|
-
hash:
|
|
292
|
+
pathname: r.pathname,
|
|
293
|
+
search: r.search,
|
|
294
|
+
hash: r.hash
|
|
288
295
|
};
|
|
289
296
|
}
|
|
290
|
-
const
|
|
297
|
+
const kr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ar = {
|
|
291
298
|
"&": "\\u0026",
|
|
292
299
|
">": "\\u003e",
|
|
293
300
|
"<": "\\u003c",
|
|
294
301
|
"\u2028": "\\u2028",
|
|
295
302
|
"\u2029": "\\u2029"
|
|
296
|
-
},
|
|
297
|
-
function
|
|
298
|
-
return
|
|
303
|
+
}, Mr = /[&><\u2028\u2029]/g;
|
|
304
|
+
function Dr(t) {
|
|
305
|
+
return t.replace(Mr, (e) => Ar[e]);
|
|
299
306
|
}
|
|
300
|
-
|
|
301
|
-
var
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const
|
|
305
|
-
router:
|
|
306
|
-
hydrate:
|
|
307
|
-
}) => /* @__PURE__ */
|
|
308
|
-
router:
|
|
309
|
-
context:
|
|
310
|
-
helmetContext:
|
|
311
|
-
}) => /* @__PURE__ */
|
|
312
|
-
var
|
|
313
|
-
constructor(
|
|
307
|
+
W.StaticRouter = wr;
|
|
308
|
+
var Or = W.StaticRouterProvider = Nr;
|
|
309
|
+
W.createStaticHandler = Cr;
|
|
310
|
+
W.createStaticRouter = Er;
|
|
311
|
+
const Rr = ({
|
|
312
|
+
router: t,
|
|
313
|
+
hydrate: e = !1
|
|
314
|
+
}) => /* @__PURE__ */ a.jsx(Qe, { children: /* @__PURE__ */ a.jsx(Te, { children: /* @__PURE__ */ a.jsx(oe.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ a.jsx(vt, { router: t }) }) }) }), Ir = ({
|
|
315
|
+
router: t,
|
|
316
|
+
context: e,
|
|
317
|
+
helmetContext: r
|
|
318
|
+
}) => /* @__PURE__ */ a.jsx(Qe, { children: /* @__PURE__ */ a.jsx(Te, { context: r, children: /* @__PURE__ */ a.jsx(Or, { router: t, context: e }) }) });
|
|
319
|
+
var C, Oe, Tr = (Oe = class extends ze {
|
|
320
|
+
constructor(e = {}) {
|
|
314
321
|
super();
|
|
315
|
-
|
|
316
|
-
this.config =
|
|
322
|
+
y(this, C);
|
|
323
|
+
this.config = e, g(this, C, /* @__PURE__ */ new Map());
|
|
317
324
|
}
|
|
318
|
-
build(
|
|
319
|
-
const
|
|
320
|
-
let
|
|
321
|
-
return
|
|
325
|
+
build(e, r, s) {
|
|
326
|
+
const n = r.queryKey, i = r.queryHash ?? qe(n, r);
|
|
327
|
+
let o = this.get(i);
|
|
328
|
+
return o || (o = new Ot({
|
|
322
329
|
cache: this,
|
|
323
|
-
queryKey:
|
|
324
|
-
queryHash:
|
|
325
|
-
options:
|
|
326
|
-
state:
|
|
327
|
-
defaultOptions:
|
|
328
|
-
}), this.add(
|
|
329
|
-
}
|
|
330
|
-
add(
|
|
331
|
-
|
|
330
|
+
queryKey: n,
|
|
331
|
+
queryHash: i,
|
|
332
|
+
options: e.defaultQueryOptions(r),
|
|
333
|
+
state: s,
|
|
334
|
+
defaultOptions: e.getQueryDefaults(n)
|
|
335
|
+
}), this.add(o)), o;
|
|
336
|
+
}
|
|
337
|
+
add(e) {
|
|
338
|
+
l(this, C).has(e.queryHash) || (l(this, C).set(e.queryHash, e), this.notify({
|
|
332
339
|
type: "added",
|
|
333
|
-
query:
|
|
340
|
+
query: e
|
|
334
341
|
}));
|
|
335
342
|
}
|
|
336
|
-
remove(
|
|
337
|
-
const
|
|
338
|
-
|
|
343
|
+
remove(e) {
|
|
344
|
+
const r = l(this, C).get(e.queryHash);
|
|
345
|
+
r && (e.destroy(), r === e && l(this, C).delete(e.queryHash), this.notify({ type: "removed", query: e }));
|
|
339
346
|
}
|
|
340
347
|
clear() {
|
|
341
|
-
|
|
342
|
-
this.getAll().forEach((
|
|
343
|
-
this.remove(
|
|
348
|
+
b.batch(() => {
|
|
349
|
+
this.getAll().forEach((e) => {
|
|
350
|
+
this.remove(e);
|
|
344
351
|
});
|
|
345
352
|
});
|
|
346
353
|
}
|
|
347
|
-
get(
|
|
348
|
-
return
|
|
354
|
+
get(e) {
|
|
355
|
+
return l(this, C).get(e);
|
|
349
356
|
}
|
|
350
357
|
getAll() {
|
|
351
|
-
return [...
|
|
358
|
+
return [...l(this, C).values()];
|
|
352
359
|
}
|
|
353
|
-
find(
|
|
354
|
-
const
|
|
360
|
+
find(e) {
|
|
361
|
+
const r = { exact: !0, ...e };
|
|
355
362
|
return this.getAll().find(
|
|
356
|
-
(
|
|
363
|
+
(s) => Ne(r, s)
|
|
357
364
|
);
|
|
358
365
|
}
|
|
359
|
-
findAll(
|
|
360
|
-
const
|
|
361
|
-
return Object.keys(
|
|
366
|
+
findAll(e = {}) {
|
|
367
|
+
const r = this.getAll();
|
|
368
|
+
return Object.keys(e).length > 0 ? r.filter((s) => Ne(e, s)) : r;
|
|
362
369
|
}
|
|
363
|
-
notify(
|
|
364
|
-
|
|
365
|
-
this.listeners.forEach((
|
|
366
|
-
|
|
370
|
+
notify(e) {
|
|
371
|
+
b.batch(() => {
|
|
372
|
+
this.listeners.forEach((r) => {
|
|
373
|
+
r(e);
|
|
367
374
|
});
|
|
368
375
|
});
|
|
369
376
|
}
|
|
370
377
|
onFocus() {
|
|
371
|
-
|
|
372
|
-
this.getAll().forEach((
|
|
373
|
-
|
|
378
|
+
b.batch(() => {
|
|
379
|
+
this.getAll().forEach((e) => {
|
|
380
|
+
e.onFocus();
|
|
374
381
|
});
|
|
375
382
|
});
|
|
376
383
|
}
|
|
377
384
|
onOnline() {
|
|
378
|
-
|
|
379
|
-
this.getAll().forEach((
|
|
380
|
-
|
|
385
|
+
b.batch(() => {
|
|
386
|
+
this.getAll().forEach((e) => {
|
|
387
|
+
e.onOnline();
|
|
381
388
|
});
|
|
382
389
|
});
|
|
383
390
|
}
|
|
384
|
-
},
|
|
385
|
-
constructor(
|
|
391
|
+
}, C = new WeakMap(), Oe), x, V, Re, _r = (Re = class extends ze {
|
|
392
|
+
constructor(e = {}) {
|
|
386
393
|
super();
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
this.config =
|
|
394
|
+
y(this, x);
|
|
395
|
+
y(this, V);
|
|
396
|
+
this.config = e, g(this, x, /* @__PURE__ */ new Map()), g(this, V, Date.now());
|
|
390
397
|
}
|
|
391
|
-
build(
|
|
392
|
-
const
|
|
398
|
+
build(e, r, s) {
|
|
399
|
+
const n = new Kt({
|
|
393
400
|
mutationCache: this,
|
|
394
|
-
mutationId: ++
|
|
395
|
-
options:
|
|
396
|
-
state:
|
|
401
|
+
mutationId: ++X(this, V)._,
|
|
402
|
+
options: e.defaultMutationOptions(r),
|
|
403
|
+
state: s
|
|
397
404
|
});
|
|
398
|
-
return this.add(
|
|
399
|
-
}
|
|
400
|
-
add(
|
|
401
|
-
const
|
|
402
|
-
|
|
403
|
-
}
|
|
404
|
-
remove(
|
|
405
|
-
var
|
|
406
|
-
const
|
|
407
|
-
if (
|
|
408
|
-
const
|
|
409
|
-
|
|
405
|
+
return this.add(n), n;
|
|
406
|
+
}
|
|
407
|
+
add(e) {
|
|
408
|
+
const r = Z(e), s = l(this, x).get(r) ?? [];
|
|
409
|
+
s.push(e), l(this, x).set(r, s), this.notify({ type: "added", mutation: e });
|
|
410
|
+
}
|
|
411
|
+
remove(e) {
|
|
412
|
+
var s;
|
|
413
|
+
const r = Z(e);
|
|
414
|
+
if (l(this, x).has(r)) {
|
|
415
|
+
const n = (s = l(this, x).get(r)) == null ? void 0 : s.filter((i) => i !== e);
|
|
416
|
+
n && (n.length === 0 ? l(this, x).delete(r) : l(this, x).set(r, n));
|
|
410
417
|
}
|
|
411
|
-
this.notify({ type: "removed", mutation:
|
|
418
|
+
this.notify({ type: "removed", mutation: e });
|
|
412
419
|
}
|
|
413
|
-
canRun(
|
|
414
|
-
var
|
|
415
|
-
const
|
|
416
|
-
return !
|
|
420
|
+
canRun(e) {
|
|
421
|
+
var s;
|
|
422
|
+
const r = (s = l(this, x).get(Z(e))) == null ? void 0 : s.find((n) => n.state.status === "pending");
|
|
423
|
+
return !r || r === e;
|
|
417
424
|
}
|
|
418
|
-
runNext(
|
|
419
|
-
var
|
|
420
|
-
const
|
|
421
|
-
return (
|
|
425
|
+
runNext(e) {
|
|
426
|
+
var s;
|
|
427
|
+
const r = (s = l(this, x).get(Z(e))) == null ? void 0 : s.find((n) => n !== e && n.state.isPaused);
|
|
428
|
+
return (r == null ? void 0 : r.continue()) ?? Promise.resolve();
|
|
422
429
|
}
|
|
423
430
|
clear() {
|
|
424
|
-
|
|
425
|
-
this.getAll().forEach((
|
|
426
|
-
this.remove(
|
|
431
|
+
b.batch(() => {
|
|
432
|
+
this.getAll().forEach((e) => {
|
|
433
|
+
this.remove(e);
|
|
427
434
|
});
|
|
428
435
|
});
|
|
429
436
|
}
|
|
430
437
|
getAll() {
|
|
431
|
-
return [...
|
|
438
|
+
return [...l(this, x).values()].flat();
|
|
432
439
|
}
|
|
433
|
-
find(
|
|
434
|
-
const
|
|
440
|
+
find(e) {
|
|
441
|
+
const r = { exact: !0, ...e };
|
|
435
442
|
return this.getAll().find(
|
|
436
|
-
(
|
|
443
|
+
(s) => Pe(r, s)
|
|
437
444
|
);
|
|
438
445
|
}
|
|
439
|
-
findAll(
|
|
440
|
-
return this.getAll().filter((
|
|
446
|
+
findAll(e = {}) {
|
|
447
|
+
return this.getAll().filter((r) => Pe(e, r));
|
|
441
448
|
}
|
|
442
|
-
notify(
|
|
443
|
-
|
|
444
|
-
this.listeners.forEach((
|
|
445
|
-
|
|
449
|
+
notify(e) {
|
|
450
|
+
b.batch(() => {
|
|
451
|
+
this.listeners.forEach((r) => {
|
|
452
|
+
r(e);
|
|
446
453
|
});
|
|
447
454
|
});
|
|
448
455
|
}
|
|
449
456
|
resumePausedMutations() {
|
|
450
|
-
const
|
|
451
|
-
return
|
|
457
|
+
const e = this.getAll().filter((r) => r.state.isPaused);
|
|
458
|
+
return b.batch(
|
|
452
459
|
() => Promise.all(
|
|
453
|
-
|
|
460
|
+
e.map((r) => r.continue().catch(M))
|
|
454
461
|
)
|
|
455
462
|
);
|
|
456
463
|
}
|
|
457
|
-
},
|
|
458
|
-
function
|
|
459
|
-
var
|
|
460
|
-
return ((
|
|
464
|
+
}, x = new WeakMap(), V = new WeakMap(), Re);
|
|
465
|
+
function Z(t) {
|
|
466
|
+
var e;
|
|
467
|
+
return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
|
|
461
468
|
}
|
|
462
|
-
function
|
|
469
|
+
function Ae(t) {
|
|
463
470
|
return {
|
|
464
|
-
onFetch: (
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
+
onFetch: (e, r) => {
|
|
472
|
+
var j, N, p, P, h;
|
|
473
|
+
const s = e.options, n = (p = (N = (j = e.fetchOptions) == null ? void 0 : j.meta) == null ? void 0 : N.fetchMore) == null ? void 0 : p.direction, i = ((P = e.state.data) == null ? void 0 : P.pages) || [], o = ((h = e.state.data) == null ? void 0 : h.pageParams) || [];
|
|
474
|
+
let u = { pages: [], pageParams: [] }, c = 0;
|
|
475
|
+
const m = async () => {
|
|
476
|
+
let f = !1;
|
|
477
|
+
const B = (w) => {
|
|
478
|
+
Object.defineProperty(w, "signal", {
|
|
471
479
|
enumerable: !0,
|
|
472
|
-
get: () => (
|
|
473
|
-
|
|
474
|
-
}),
|
|
480
|
+
get: () => (e.signal.aborted ? f = !0 : e.signal.addEventListener("abort", () => {
|
|
481
|
+
f = !0;
|
|
482
|
+
}), e.signal)
|
|
475
483
|
});
|
|
476
|
-
},
|
|
477
|
-
if (
|
|
484
|
+
}, lt = Rt(e.options, e.fetchOptions), ve = async (w, O, $) => {
|
|
485
|
+
if (f)
|
|
478
486
|
return Promise.reject();
|
|
479
|
-
if (
|
|
480
|
-
return Promise.resolve(
|
|
481
|
-
const
|
|
482
|
-
queryKey:
|
|
483
|
-
pageParam:
|
|
484
|
-
direction:
|
|
485
|
-
meta:
|
|
487
|
+
if (O == null && w.pages.length)
|
|
488
|
+
return Promise.resolve(w);
|
|
489
|
+
const Y = {
|
|
490
|
+
queryKey: e.queryKey,
|
|
491
|
+
pageParam: O,
|
|
492
|
+
direction: $ ? "backward" : "forward",
|
|
493
|
+
meta: e.options.meta
|
|
486
494
|
};
|
|
487
|
-
|
|
488
|
-
const
|
|
489
|
-
|
|
490
|
-
), { maxPages:
|
|
495
|
+
B(Y);
|
|
496
|
+
const ct = await lt(
|
|
497
|
+
Y
|
|
498
|
+
), { maxPages: xe } = e.options, be = $ ? It : Tt;
|
|
491
499
|
return {
|
|
492
|
-
pages: w
|
|
493
|
-
pageParams: w
|
|
500
|
+
pages: be(w.pages, ct, xe),
|
|
501
|
+
pageParams: be(w.pageParams, O, xe)
|
|
494
502
|
};
|
|
495
503
|
};
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
const x = s === "backward", p = x ? ys : vn, C = {
|
|
504
|
+
if (n && i.length) {
|
|
505
|
+
const w = n === "backward", O = w ? Fr : Me, $ = {
|
|
499
506
|
pages: i,
|
|
500
|
-
pageParams:
|
|
501
|
-
},
|
|
502
|
-
|
|
507
|
+
pageParams: o
|
|
508
|
+
}, Y = O(s, $);
|
|
509
|
+
u = await ve($, Y, w);
|
|
503
510
|
} else {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
f = await d(f, C);
|
|
512
|
-
}
|
|
511
|
+
const w = t ?? i.length;
|
|
512
|
+
do {
|
|
513
|
+
const O = c === 0 ? o[0] ?? s.initialPageParam : Me(s, u);
|
|
514
|
+
if (c > 0 && O == null)
|
|
515
|
+
break;
|
|
516
|
+
u = await ve(u, O), c++;
|
|
517
|
+
} while (c < w);
|
|
513
518
|
}
|
|
514
|
-
return
|
|
519
|
+
return u;
|
|
515
520
|
};
|
|
516
|
-
|
|
517
|
-
var
|
|
518
|
-
return (
|
|
519
|
-
|
|
520
|
-
|
|
521
|
+
e.options.persister ? e.fetchFn = () => {
|
|
522
|
+
var f, B;
|
|
523
|
+
return (B = (f = e.options).persister) == null ? void 0 : B.call(
|
|
524
|
+
f,
|
|
525
|
+
m,
|
|
521
526
|
{
|
|
522
|
-
queryKey:
|
|
523
|
-
meta:
|
|
524
|
-
signal:
|
|
527
|
+
queryKey: e.queryKey,
|
|
528
|
+
meta: e.options.meta,
|
|
529
|
+
signal: e.signal
|
|
525
530
|
},
|
|
526
|
-
|
|
531
|
+
r
|
|
527
532
|
);
|
|
528
|
-
} :
|
|
533
|
+
} : e.fetchFn = m;
|
|
529
534
|
}
|
|
530
535
|
};
|
|
531
536
|
}
|
|
532
|
-
function
|
|
533
|
-
const
|
|
534
|
-
return e.getNextPageParam(
|
|
535
|
-
|
|
536
|
-
t,
|
|
537
|
-
n[r],
|
|
538
|
-
n
|
|
539
|
-
);
|
|
540
|
-
}
|
|
541
|
-
function ys(e, { pages: t, pageParams: n }) {
|
|
542
|
-
var r;
|
|
543
|
-
return (r = e.getPreviousPageParam) == null ? void 0 : r.call(
|
|
537
|
+
function Me(t, { pages: e, pageParams: r }) {
|
|
538
|
+
const s = e.length - 1;
|
|
539
|
+
return e.length > 0 ? t.getNextPageParam(
|
|
540
|
+
e[s],
|
|
544
541
|
e,
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
n
|
|
549
|
-
);
|
|
542
|
+
r[s],
|
|
543
|
+
r
|
|
544
|
+
) : void 0;
|
|
550
545
|
}
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
546
|
+
function Fr(t, { pages: e, pageParams: r }) {
|
|
547
|
+
var s;
|
|
548
|
+
return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, r[0], r) : void 0;
|
|
549
|
+
}
|
|
550
|
+
var d, R, I, H, z, T, q, K, Ie, Qr = (Ie = class {
|
|
551
|
+
constructor(t = {}) {
|
|
552
|
+
y(this, d);
|
|
553
|
+
y(this, R);
|
|
554
|
+
y(this, I);
|
|
555
|
+
y(this, H);
|
|
556
|
+
y(this, z);
|
|
557
|
+
y(this, T);
|
|
558
|
+
y(this, q);
|
|
559
|
+
y(this, K);
|
|
560
|
+
g(this, d, t.queryCache || new Tr()), g(this, R, t.mutationCache || new _r()), g(this, I, t.defaultOptions || {}), g(this, H, /* @__PURE__ */ new Map()), g(this, z, /* @__PURE__ */ new Map()), g(this, T, 0);
|
|
562
561
|
}
|
|
563
562
|
mount() {
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
})),
|
|
567
|
-
|
|
563
|
+
X(this, T)._++, l(this, T) === 1 && (g(this, q, _t.subscribe(async (t) => {
|
|
564
|
+
t && (await this.resumePausedMutations(), l(this, d).onFocus());
|
|
565
|
+
})), g(this, K, Se.subscribe(async (t) => {
|
|
566
|
+
t && (await this.resumePausedMutations(), l(this, d).onOnline());
|
|
568
567
|
})));
|
|
569
568
|
}
|
|
570
569
|
unmount() {
|
|
571
|
-
var
|
|
572
|
-
|
|
570
|
+
var t, e;
|
|
571
|
+
X(this, T)._--, l(this, T) === 0 && ((t = l(this, q)) == null || t.call(this), g(this, q, void 0), (e = l(this, K)) == null || e.call(this), g(this, K, void 0));
|
|
573
572
|
}
|
|
574
|
-
isFetching(
|
|
575
|
-
return
|
|
573
|
+
isFetching(t) {
|
|
574
|
+
return l(this, d).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
576
575
|
}
|
|
577
|
-
isMutating(
|
|
578
|
-
return
|
|
576
|
+
isMutating(t) {
|
|
577
|
+
return l(this, R).findAll({ ...t, status: "pending" }).length;
|
|
579
578
|
}
|
|
580
|
-
getQueryData(
|
|
581
|
-
var
|
|
582
|
-
const
|
|
583
|
-
return (
|
|
579
|
+
getQueryData(t) {
|
|
580
|
+
var r;
|
|
581
|
+
const e = this.defaultQueryOptions({ queryKey: t });
|
|
582
|
+
return (r = l(this, d).get(e.queryHash)) == null ? void 0 : r.state.data;
|
|
584
583
|
}
|
|
585
|
-
ensureQueryData(
|
|
586
|
-
const
|
|
587
|
-
if (
|
|
588
|
-
return this.fetchQuery(
|
|
584
|
+
ensureQueryData(t) {
|
|
585
|
+
const e = this.getQueryData(t.queryKey);
|
|
586
|
+
if (e === void 0)
|
|
587
|
+
return this.fetchQuery(t);
|
|
589
588
|
{
|
|
590
|
-
const
|
|
591
|
-
return
|
|
589
|
+
const r = this.defaultQueryOptions(t), s = l(this, d).build(this, r);
|
|
590
|
+
return t.revalidateIfStale && s.isStaleByTime(Ce(r.staleTime, s)) && this.prefetchQuery(r), Promise.resolve(e);
|
|
592
591
|
}
|
|
593
592
|
}
|
|
594
|
-
getQueriesData(
|
|
595
|
-
return
|
|
596
|
-
const
|
|
597
|
-
return [
|
|
593
|
+
getQueriesData(t) {
|
|
594
|
+
return l(this, d).findAll(t).map(({ queryKey: e, state: r }) => {
|
|
595
|
+
const s = r.data;
|
|
596
|
+
return [e, s];
|
|
598
597
|
});
|
|
599
598
|
}
|
|
600
|
-
setQueryData(
|
|
601
|
-
const
|
|
602
|
-
|
|
603
|
-
),
|
|
604
|
-
if (
|
|
605
|
-
return
|
|
606
|
-
}
|
|
607
|
-
setQueriesData(
|
|
608
|
-
return
|
|
609
|
-
() =>
|
|
610
|
-
|
|
611
|
-
this.setQueryData(
|
|
599
|
+
setQueryData(t, e, r) {
|
|
600
|
+
const s = this.defaultQueryOptions({ queryKey: t }), n = l(this, d).get(
|
|
601
|
+
s.queryHash
|
|
602
|
+
), i = n == null ? void 0 : n.state.data, o = Ft(e, i);
|
|
603
|
+
if (o !== void 0)
|
|
604
|
+
return l(this, d).build(this, s).setData(o, { ...r, manual: !0 });
|
|
605
|
+
}
|
|
606
|
+
setQueriesData(t, e, r) {
|
|
607
|
+
return b.batch(
|
|
608
|
+
() => l(this, d).findAll(t).map(({ queryKey: s }) => [
|
|
609
|
+
s,
|
|
610
|
+
this.setQueryData(s, e, r)
|
|
612
611
|
])
|
|
613
612
|
);
|
|
614
613
|
}
|
|
615
|
-
getQueryState(
|
|
616
|
-
var
|
|
617
|
-
const
|
|
618
|
-
return (
|
|
619
|
-
}
|
|
620
|
-
removeQueries(
|
|
621
|
-
const
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
614
|
+
getQueryState(t) {
|
|
615
|
+
var r;
|
|
616
|
+
const e = this.defaultQueryOptions({ queryKey: t });
|
|
617
|
+
return (r = l(this, d).get(e.queryHash)) == null ? void 0 : r.state;
|
|
618
|
+
}
|
|
619
|
+
removeQueries(t) {
|
|
620
|
+
const e = l(this, d);
|
|
621
|
+
b.batch(() => {
|
|
622
|
+
e.findAll(t).forEach((r) => {
|
|
623
|
+
e.remove(r);
|
|
625
624
|
});
|
|
626
625
|
});
|
|
627
626
|
}
|
|
628
|
-
resetQueries(
|
|
629
|
-
const
|
|
627
|
+
resetQueries(t, e) {
|
|
628
|
+
const r = l(this, d), s = {
|
|
630
629
|
type: "active",
|
|
631
|
-
...
|
|
630
|
+
...t
|
|
632
631
|
};
|
|
633
|
-
return
|
|
634
|
-
|
|
635
|
-
}), this.refetchQueries(
|
|
632
|
+
return b.batch(() => (r.findAll(t).forEach((n) => {
|
|
633
|
+
n.reset();
|
|
634
|
+
}), this.refetchQueries(s, e)));
|
|
636
635
|
}
|
|
637
|
-
cancelQueries(
|
|
638
|
-
const
|
|
639
|
-
() =>
|
|
636
|
+
cancelQueries(t = {}, e = {}) {
|
|
637
|
+
const r = { revert: !0, ...e }, s = b.batch(
|
|
638
|
+
() => l(this, d).findAll(t).map((n) => n.cancel(r))
|
|
640
639
|
);
|
|
641
|
-
return Promise.all(
|
|
640
|
+
return Promise.all(s).then(M).catch(M);
|
|
642
641
|
}
|
|
643
|
-
invalidateQueries(
|
|
644
|
-
return
|
|
645
|
-
if (
|
|
646
|
-
|
|
647
|
-
}),
|
|
642
|
+
invalidateQueries(t = {}, e = {}) {
|
|
643
|
+
return b.batch(() => {
|
|
644
|
+
if (l(this, d).findAll(t).forEach((s) => {
|
|
645
|
+
s.invalidate();
|
|
646
|
+
}), t.refetchType === "none")
|
|
648
647
|
return Promise.resolve();
|
|
649
|
-
const
|
|
650
|
-
...
|
|
651
|
-
type:
|
|
648
|
+
const r = {
|
|
649
|
+
...t,
|
|
650
|
+
type: t.refetchType ?? t.type ?? "active"
|
|
652
651
|
};
|
|
653
|
-
return this.refetchQueries(
|
|
652
|
+
return this.refetchQueries(r, e);
|
|
654
653
|
});
|
|
655
654
|
}
|
|
656
|
-
refetchQueries(
|
|
657
|
-
const
|
|
658
|
-
...
|
|
659
|
-
cancelRefetch: (
|
|
660
|
-
},
|
|
661
|
-
() =>
|
|
662
|
-
let
|
|
663
|
-
return
|
|
655
|
+
refetchQueries(t = {}, e) {
|
|
656
|
+
const r = {
|
|
657
|
+
...e,
|
|
658
|
+
cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
|
|
659
|
+
}, s = b.batch(
|
|
660
|
+
() => l(this, d).findAll(t).filter((n) => !n.isDisabled()).map((n) => {
|
|
661
|
+
let i = n.fetch(void 0, r);
|
|
662
|
+
return r.throwOnError || (i = i.catch(M)), n.state.fetchStatus === "paused" ? Promise.resolve() : i;
|
|
664
663
|
})
|
|
665
664
|
);
|
|
666
|
-
return Promise.all(
|
|
665
|
+
return Promise.all(s).then(M);
|
|
666
|
+
}
|
|
667
|
+
fetchQuery(t) {
|
|
668
|
+
const e = this.defaultQueryOptions(t);
|
|
669
|
+
e.retry === void 0 && (e.retry = !1);
|
|
670
|
+
const r = l(this, d).build(this, e);
|
|
671
|
+
return r.isStaleByTime(
|
|
672
|
+
Ce(e.staleTime, r)
|
|
673
|
+
) ? r.fetch(e) : Promise.resolve(r.state.data);
|
|
667
674
|
}
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
t.retry === void 0 && (t.retry = !1);
|
|
671
|
-
const n = b(this, $).build(this, t);
|
|
672
|
-
return n.isStaleByTime(
|
|
673
|
-
pn(t.staleTime, n)
|
|
674
|
-
) ? n.fetch(t) : Promise.resolve(n.state.data);
|
|
675
|
+
prefetchQuery(t) {
|
|
676
|
+
return this.fetchQuery(t).then(M).catch(M);
|
|
675
677
|
}
|
|
676
|
-
|
|
677
|
-
return
|
|
678
|
+
fetchInfiniteQuery(t) {
|
|
679
|
+
return t.behavior = Ae(t.pages), this.fetchQuery(t);
|
|
678
680
|
}
|
|
679
|
-
|
|
680
|
-
return
|
|
681
|
+
prefetchInfiniteQuery(t) {
|
|
682
|
+
return this.fetchInfiniteQuery(t).then(M).catch(M);
|
|
681
683
|
}
|
|
682
|
-
|
|
683
|
-
return
|
|
684
|
+
ensureInfiniteQueryData(t) {
|
|
685
|
+
return t.behavior = Ae(t.pages), this.ensureQueryData(t);
|
|
684
686
|
}
|
|
685
687
|
resumePausedMutations() {
|
|
686
|
-
return
|
|
688
|
+
return Se.isOnline() ? l(this, R).resumePausedMutations() : Promise.resolve();
|
|
687
689
|
}
|
|
688
690
|
getQueryCache() {
|
|
689
|
-
return
|
|
691
|
+
return l(this, d);
|
|
690
692
|
}
|
|
691
693
|
getMutationCache() {
|
|
692
|
-
return
|
|
694
|
+
return l(this, R);
|
|
693
695
|
}
|
|
694
696
|
getDefaultOptions() {
|
|
695
|
-
return
|
|
697
|
+
return l(this, I);
|
|
696
698
|
}
|
|
697
|
-
setDefaultOptions(
|
|
698
|
-
|
|
699
|
+
setDefaultOptions(t) {
|
|
700
|
+
g(this, I, t);
|
|
699
701
|
}
|
|
700
|
-
setQueryDefaults(
|
|
701
|
-
|
|
702
|
-
queryKey:
|
|
703
|
-
defaultOptions:
|
|
702
|
+
setQueryDefaults(t, e) {
|
|
703
|
+
l(this, H).set(Ee(t), {
|
|
704
|
+
queryKey: t,
|
|
705
|
+
defaultOptions: e
|
|
704
706
|
});
|
|
705
707
|
}
|
|
706
|
-
getQueryDefaults(
|
|
707
|
-
const
|
|
708
|
-
let
|
|
709
|
-
return
|
|
710
|
-
|
|
711
|
-
}),
|
|
712
|
-
}
|
|
713
|
-
setMutationDefaults(
|
|
714
|
-
|
|
715
|
-
mutationKey:
|
|
716
|
-
defaultOptions:
|
|
708
|
+
getQueryDefaults(t) {
|
|
709
|
+
const e = [...l(this, H).values()];
|
|
710
|
+
let r = {};
|
|
711
|
+
return e.forEach((s) => {
|
|
712
|
+
ke(t, s.queryKey) && (r = { ...r, ...s.defaultOptions });
|
|
713
|
+
}), r;
|
|
714
|
+
}
|
|
715
|
+
setMutationDefaults(t, e) {
|
|
716
|
+
l(this, z).set(Ee(t), {
|
|
717
|
+
mutationKey: t,
|
|
718
|
+
defaultOptions: e
|
|
717
719
|
});
|
|
718
720
|
}
|
|
719
|
-
getMutationDefaults(
|
|
720
|
-
const
|
|
721
|
-
let
|
|
722
|
-
return
|
|
723
|
-
|
|
724
|
-
}),
|
|
725
|
-
}
|
|
726
|
-
defaultQueryOptions(
|
|
727
|
-
if (
|
|
728
|
-
return
|
|
729
|
-
const
|
|
730
|
-
...
|
|
731
|
-
...this.getQueryDefaults(
|
|
732
|
-
...
|
|
721
|
+
getMutationDefaults(t) {
|
|
722
|
+
const e = [...l(this, z).values()];
|
|
723
|
+
let r = {};
|
|
724
|
+
return e.forEach((s) => {
|
|
725
|
+
ke(t, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
|
|
726
|
+
}), r;
|
|
727
|
+
}
|
|
728
|
+
defaultQueryOptions(t) {
|
|
729
|
+
if (t._defaulted)
|
|
730
|
+
return t;
|
|
731
|
+
const e = {
|
|
732
|
+
...l(this, I).queries,
|
|
733
|
+
...this.getQueryDefaults(t.queryKey),
|
|
734
|
+
...t,
|
|
733
735
|
_defaulted: !0
|
|
734
736
|
};
|
|
735
|
-
return
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
)),
|
|
739
|
-
}
|
|
740
|
-
defaultMutationOptions(
|
|
741
|
-
return
|
|
742
|
-
...
|
|
743
|
-
...(
|
|
744
|
-
...
|
|
737
|
+
return e.queryHash || (e.queryHash = qe(
|
|
738
|
+
e.queryKey,
|
|
739
|
+
e
|
|
740
|
+
)), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn === Qt && (e.enabled = !1), e;
|
|
741
|
+
}
|
|
742
|
+
defaultMutationOptions(t) {
|
|
743
|
+
return t != null && t._defaulted ? t : {
|
|
744
|
+
...l(this, I).mutations,
|
|
745
|
+
...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
|
|
746
|
+
...t,
|
|
745
747
|
_defaulted: !0
|
|
746
748
|
};
|
|
747
749
|
}
|
|
748
750
|
clear() {
|
|
749
|
-
|
|
751
|
+
l(this, d).clear(), l(this, R).clear();
|
|
750
752
|
}
|
|
751
|
-
},
|
|
752
|
-
const
|
|
753
|
+
}, d = new WeakMap(), R = new WeakMap(), I = new WeakMap(), H = new WeakMap(), z = new WeakMap(), T = new WeakMap(), q = new WeakMap(), K = new WeakMap(), Ie);
|
|
754
|
+
const Lr = Le(null), ne = {
|
|
753
755
|
didCatch: !1,
|
|
754
756
|
error: null
|
|
755
757
|
};
|
|
756
|
-
class
|
|
757
|
-
constructor(
|
|
758
|
-
super(
|
|
758
|
+
class Br extends Ct {
|
|
759
|
+
constructor(e) {
|
|
760
|
+
super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = ne;
|
|
759
761
|
}
|
|
760
|
-
static getDerivedStateFromError(
|
|
762
|
+
static getDerivedStateFromError(e) {
|
|
761
763
|
return {
|
|
762
764
|
didCatch: !0,
|
|
763
|
-
error:
|
|
765
|
+
error: e
|
|
764
766
|
};
|
|
765
767
|
}
|
|
766
768
|
resetErrorBoundary() {
|
|
767
769
|
const {
|
|
768
|
-
error:
|
|
770
|
+
error: e
|
|
769
771
|
} = this.state;
|
|
770
|
-
if (
|
|
771
|
-
for (var
|
|
772
|
-
|
|
773
|
-
(
|
|
774
|
-
args:
|
|
772
|
+
if (e !== null) {
|
|
773
|
+
for (var r, s, n = arguments.length, i = new Array(n), o = 0; o < n; o++)
|
|
774
|
+
i[o] = arguments[o];
|
|
775
|
+
(r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
|
|
776
|
+
args: i,
|
|
775
777
|
reason: "imperative-api"
|
|
776
|
-
}), this.setState(
|
|
778
|
+
}), this.setState(ne);
|
|
777
779
|
}
|
|
778
780
|
}
|
|
779
|
-
componentDidCatch(
|
|
780
|
-
var
|
|
781
|
-
(
|
|
781
|
+
componentDidCatch(e, r) {
|
|
782
|
+
var s, n;
|
|
783
|
+
(s = (n = this.props).onError) === null || s === void 0 || s.call(n, e, r);
|
|
782
784
|
}
|
|
783
|
-
componentDidUpdate(
|
|
785
|
+
componentDidUpdate(e, r) {
|
|
784
786
|
const {
|
|
785
|
-
didCatch:
|
|
787
|
+
didCatch: s
|
|
786
788
|
} = this.state, {
|
|
787
|
-
resetKeys:
|
|
789
|
+
resetKeys: n
|
|
788
790
|
} = this.props;
|
|
789
|
-
if (
|
|
790
|
-
var
|
|
791
|
-
(
|
|
792
|
-
next:
|
|
793
|
-
prev:
|
|
791
|
+
if (s && r.error !== null && Hr(e.resetKeys, n)) {
|
|
792
|
+
var i, o;
|
|
793
|
+
(i = (o = this.props).onReset) === null || i === void 0 || i.call(o, {
|
|
794
|
+
next: n,
|
|
795
|
+
prev: e.resetKeys,
|
|
794
796
|
reason: "keys"
|
|
795
|
-
}), this.setState(
|
|
797
|
+
}), this.setState(ne);
|
|
796
798
|
}
|
|
797
799
|
}
|
|
798
800
|
render() {
|
|
799
801
|
const {
|
|
800
|
-
children:
|
|
801
|
-
fallbackRender:
|
|
802
|
-
FallbackComponent:
|
|
803
|
-
fallback:
|
|
802
|
+
children: e,
|
|
803
|
+
fallbackRender: r,
|
|
804
|
+
FallbackComponent: s,
|
|
805
|
+
fallback: n
|
|
804
806
|
} = this.props, {
|
|
805
|
-
didCatch:
|
|
806
|
-
error:
|
|
807
|
+
didCatch: i,
|
|
808
|
+
error: o
|
|
807
809
|
} = this.state;
|
|
808
|
-
let
|
|
809
|
-
if (
|
|
810
|
-
const
|
|
811
|
-
error:
|
|
810
|
+
let u = e;
|
|
811
|
+
if (i) {
|
|
812
|
+
const c = {
|
|
813
|
+
error: o,
|
|
812
814
|
resetErrorBoundary: this.resetErrorBoundary
|
|
813
815
|
};
|
|
814
|
-
if (typeof
|
|
815
|
-
|
|
816
|
-
else if (
|
|
817
|
-
|
|
818
|
-
else if (
|
|
819
|
-
|
|
816
|
+
if (typeof r == "function")
|
|
817
|
+
u = r(c);
|
|
818
|
+
else if (s)
|
|
819
|
+
u = we(s, c);
|
|
820
|
+
else if (n !== void 0)
|
|
821
|
+
u = n;
|
|
820
822
|
else
|
|
821
|
-
throw
|
|
823
|
+
throw o;
|
|
822
824
|
}
|
|
823
|
-
return
|
|
825
|
+
return we(Lr.Provider, {
|
|
824
826
|
value: {
|
|
825
|
-
didCatch:
|
|
826
|
-
error:
|
|
827
|
+
didCatch: i,
|
|
828
|
+
error: o,
|
|
827
829
|
resetErrorBoundary: this.resetErrorBoundary
|
|
828
830
|
}
|
|
829
|
-
},
|
|
831
|
+
}, u);
|
|
830
832
|
}
|
|
831
833
|
}
|
|
832
|
-
function
|
|
833
|
-
let
|
|
834
|
-
return
|
|
834
|
+
function Hr() {
|
|
835
|
+
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
836
|
+
return t.length !== e.length || t.some((r, s) => !Object.is(r, e[s]));
|
|
835
837
|
}
|
|
836
|
-
const
|
|
837
|
-
class
|
|
838
|
-
constructor(
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
838
|
+
const zr = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", qr = (t) => "getRoutes" in t && typeof t.getRoutes == "function", Kr = (t) => "renderSearch" in t && typeof t.renderSearch == "function", $r = (t) => "initialize" in t && typeof t.initialize == "function", Ur = (t) => "getHead" in t && typeof t.getHead == "function", Vr = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", Wr = (t) => "getIdentities" in t && typeof t.getIdentities == "function", et = new Qr();
|
|
839
|
+
class Yr {
|
|
840
|
+
constructor(e) {
|
|
841
|
+
v(this, "plugins");
|
|
842
|
+
v(this, "sidebars");
|
|
843
|
+
v(this, "topNavigation");
|
|
844
|
+
v(this, "meta");
|
|
845
|
+
v(this, "page");
|
|
846
|
+
v(this, "authentication");
|
|
847
|
+
v(this, "navigationPlugins");
|
|
848
|
+
v(this, "initialize", async () => {
|
|
847
849
|
await Promise.all(
|
|
848
|
-
this.plugins.filter(
|
|
849
|
-
var
|
|
850
|
-
return (
|
|
850
|
+
this.plugins.filter($r).map((e) => {
|
|
851
|
+
var r;
|
|
852
|
+
return (r = e.initialize) == null ? void 0 : r.call(e, this);
|
|
851
853
|
})
|
|
852
854
|
);
|
|
853
855
|
});
|
|
854
|
-
|
|
855
|
-
await
|
|
856
|
+
v(this, "invalidateCache", async (e) => {
|
|
857
|
+
await et.invalidateQueries({ queryKey: e });
|
|
856
858
|
});
|
|
857
|
-
|
|
858
|
-
this.plugins.filter(
|
|
859
|
+
v(this, "getApiIdentities", async () => (await Promise.all(
|
|
860
|
+
this.plugins.filter(Wr).map((r) => r.getIdentities(this))
|
|
859
861
|
)).flat());
|
|
860
|
-
|
|
862
|
+
v(this, "getPluginSidebar", async (e) => (await Promise.all(
|
|
861
863
|
this.navigationPlugins.map(
|
|
862
|
-
(
|
|
863
|
-
var
|
|
864
|
-
return (
|
|
864
|
+
(s) => {
|
|
865
|
+
var n;
|
|
866
|
+
return (n = s.getSidebar) == null ? void 0 : n.call(s, L(e));
|
|
865
867
|
}
|
|
866
868
|
)
|
|
867
|
-
)).flatMap((
|
|
868
|
-
|
|
869
|
+
)).flatMap((s) => s ?? []));
|
|
870
|
+
v(this, "signRequest", async (e) => {
|
|
869
871
|
if (!this.authentication)
|
|
870
872
|
throw new Error("No authentication provider configured");
|
|
871
|
-
const
|
|
872
|
-
return
|
|
873
|
+
const r = await this.authentication.getAccessToken();
|
|
874
|
+
return e.headers.set("Authorization", `Bearer ${r}`), e;
|
|
873
875
|
});
|
|
874
|
-
this.plugins =
|
|
876
|
+
this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(qr), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
|
|
875
877
|
}
|
|
876
878
|
}
|
|
877
|
-
function
|
|
878
|
-
return /* @__PURE__ */
|
|
879
|
+
function Xr({ error: t, resetErrorBoundary: e }) {
|
|
880
|
+
return /* @__PURE__ */ a.jsx(Fe, { error: t });
|
|
879
881
|
}
|
|
880
|
-
const
|
|
881
|
-
(!
|
|
882
|
-
|
|
883
|
-
ltr: [...jt, "ArrowRight"],
|
|
884
|
-
rtl: [...jt, "ArrowLeft"]
|
|
885
|
-
}, Ls = {
|
|
886
|
-
ltr: ["ArrowLeft"],
|
|
887
|
-
rtl: ["ArrowRight"]
|
|
888
|
-
}, tt = "Menu", [Ye, Fs, Hs] = qo(tt), [_e, Xn] = Nn(tt, [
|
|
889
|
-
Hs,
|
|
890
|
-
Pn,
|
|
891
|
-
Vn
|
|
892
|
-
]), nt = Pn(), Jn = Vn(), [Zn, Re] = _e(tt), [Us, rt] = _e(tt), er = (e) => {
|
|
893
|
-
const { __scopeMenu: t, open: n = !1, children: r, dir: a, onOpenChange: s, modal: i = !0 } = e, l = nt(t), [u, v] = h.useState(null), m = h.useRef(!1), c = At(s), d = oa(a);
|
|
894
|
-
return h.useEffect(() => {
|
|
895
|
-
const f = () => {
|
|
896
|
-
m.current = !0, document.addEventListener("pointerdown", y, { capture: !0, once: !0 }), document.addEventListener("pointermove", y, { capture: !0, once: !0 });
|
|
897
|
-
}, y = () => m.current = !1;
|
|
898
|
-
return document.addEventListener("keydown", f, { capture: !0 }), () => {
|
|
899
|
-
document.removeEventListener("keydown", f, { capture: !0 }), document.removeEventListener("pointerdown", y, { capture: !0 }), document.removeEventListener("pointermove", y, { capture: !0 });
|
|
900
|
-
};
|
|
901
|
-
}, []), /* @__PURE__ */ o.jsx(_n, { ...l, children: /* @__PURE__ */ o.jsx(
|
|
902
|
-
Zn,
|
|
903
|
-
{
|
|
904
|
-
scope: t,
|
|
905
|
-
open: n,
|
|
906
|
-
onOpenChange: c,
|
|
907
|
-
content: u,
|
|
908
|
-
onContentChange: v,
|
|
909
|
-
children: /* @__PURE__ */ o.jsx(
|
|
910
|
-
Us,
|
|
911
|
-
{
|
|
912
|
-
scope: t,
|
|
913
|
-
onClose: h.useCallback(() => c(!1), [c]),
|
|
914
|
-
isUsingKeyboardRef: m,
|
|
915
|
-
dir: d,
|
|
916
|
-
modal: i,
|
|
917
|
-
children: r
|
|
918
|
-
}
|
|
919
|
-
)
|
|
920
|
-
}
|
|
921
|
-
) });
|
|
922
|
-
};
|
|
923
|
-
er.displayName = tt;
|
|
924
|
-
var Bs = "MenuAnchor", Ut = h.forwardRef(
|
|
925
|
-
(e, t) => {
|
|
926
|
-
const { __scopeMenu: n, ...r } = e, a = nt(n);
|
|
927
|
-
return /* @__PURE__ */ o.jsx(Go, { ...a, ...r, ref: t });
|
|
928
|
-
}
|
|
929
|
-
);
|
|
930
|
-
Ut.displayName = Bs;
|
|
931
|
-
var Bt = "MenuPortal", [zs, tr] = _e(Bt, {
|
|
932
|
-
forceMount: void 0
|
|
933
|
-
}), nr = (e) => {
|
|
934
|
-
const { __scopeMenu: t, forceMount: n, children: r, container: a } = e, s = Re(Bt, t);
|
|
935
|
-
return /* @__PURE__ */ o.jsx(zs, { scope: t, forceMount: n, children: /* @__PURE__ */ o.jsx(gt, { present: n || s.open, children: /* @__PURE__ */ o.jsx(aa, { asChild: !0, container: a, children: r }) }) });
|
|
936
|
-
};
|
|
937
|
-
nr.displayName = Bt;
|
|
938
|
-
var se = "MenuContent", [Ks, zt] = _e(se), rr = h.forwardRef(
|
|
939
|
-
(e, t) => {
|
|
940
|
-
const n = tr(se, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, s = Re(se, e.__scopeMenu), i = rt(se, e.__scopeMenu);
|
|
941
|
-
return /* @__PURE__ */ o.jsx(Ye.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(gt, { present: r || s.open, children: /* @__PURE__ */ o.jsx(Ye.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ o.jsx(Vs, { ...a, ref: t }) : /* @__PURE__ */ o.jsx(Qs, { ...a, ref: t }) }) }) });
|
|
942
|
-
}
|
|
943
|
-
), Vs = h.forwardRef(
|
|
944
|
-
(e, t) => {
|
|
945
|
-
const n = Re(se, e.__scopeMenu), r = h.useRef(null), a = Ze(t, r);
|
|
946
|
-
return h.useEffect(() => {
|
|
947
|
-
const s = r.current;
|
|
948
|
-
if (s) return Wo(s);
|
|
949
|
-
}, []), /* @__PURE__ */ o.jsx(
|
|
950
|
-
Kt,
|
|
951
|
-
{
|
|
952
|
-
...e,
|
|
953
|
-
ref: a,
|
|
954
|
-
trapFocus: n.open,
|
|
955
|
-
disableOutsidePointerEvents: n.open,
|
|
956
|
-
disableOutsideScroll: !0,
|
|
957
|
-
onFocusOutside: A(
|
|
958
|
-
e.onFocusOutside,
|
|
959
|
-
(s) => s.preventDefault(),
|
|
960
|
-
{ checkForDefaultPrevented: !1 }
|
|
961
|
-
),
|
|
962
|
-
onDismiss: () => n.onOpenChange(!1)
|
|
963
|
-
}
|
|
964
|
-
);
|
|
965
|
-
}
|
|
966
|
-
), Qs = h.forwardRef((e, t) => {
|
|
967
|
-
const n = Re(se, e.__scopeMenu);
|
|
968
|
-
return /* @__PURE__ */ o.jsx(
|
|
969
|
-
Kt,
|
|
970
|
-
{
|
|
971
|
-
...e,
|
|
972
|
-
ref: t,
|
|
973
|
-
trapFocus: !1,
|
|
974
|
-
disableOutsidePointerEvents: !1,
|
|
975
|
-
disableOutsideScroll: !1,
|
|
976
|
-
onDismiss: () => n.onOpenChange(!1)
|
|
977
|
-
}
|
|
978
|
-
);
|
|
979
|
-
}), Kt = h.forwardRef(
|
|
980
|
-
(e, t) => {
|
|
981
|
-
const {
|
|
982
|
-
__scopeMenu: n,
|
|
983
|
-
loop: r = !1,
|
|
984
|
-
trapFocus: a,
|
|
985
|
-
onOpenAutoFocus: s,
|
|
986
|
-
onCloseAutoFocus: i,
|
|
987
|
-
disableOutsidePointerEvents: l,
|
|
988
|
-
onEntryFocus: u,
|
|
989
|
-
onEscapeKeyDown: v,
|
|
990
|
-
onPointerDownOutside: m,
|
|
991
|
-
onFocusOutside: c,
|
|
992
|
-
onInteractOutside: d,
|
|
993
|
-
onDismiss: f,
|
|
994
|
-
disableOutsideScroll: y,
|
|
995
|
-
...R
|
|
996
|
-
} = e, K = Re(se, n), H = rt(se, n), q = nt(n), x = Jn(n), p = Fs(n), [C, N] = h.useState(null), P = h.useRef(null), _ = Ze(t, P, K.onContentChange), w = h.useRef(0), L = h.useRef(""), te = h.useRef(0), Q = h.useRef(null), V = h.useRef("right"), X = h.useRef(0), Oe = y ? ta : h.Fragment, he = y ? { as: na, allowPinchZoom: !0 } : void 0, Be = (E) => {
|
|
997
|
-
var le, ge;
|
|
998
|
-
const U = L.current + E, Y = p().filter((re) => !re.disabled), ne = document.activeElement, De = (le = Y.find((re) => re.ref.current === ne)) == null ? void 0 : le.textValue, pe = Y.map((re) => re.textValue), ye = oi(pe, U, De), me = (ge = Y.find((re) => re.textValue === ye)) == null ? void 0 : ge.ref.current;
|
|
999
|
-
(function re(M) {
|
|
1000
|
-
L.current = M, window.clearTimeout(w.current), M !== "" && (w.current = window.setTimeout(() => re(""), 1e3));
|
|
1001
|
-
})(U), me && setTimeout(() => me.focus());
|
|
1002
|
-
};
|
|
1003
|
-
h.useEffect(() => () => window.clearTimeout(w.current), []), Yo();
|
|
1004
|
-
const xe = h.useCallback((E) => {
|
|
1005
|
-
var Y, ne;
|
|
1006
|
-
return V.current === ((Y = Q.current) == null ? void 0 : Y.side) && si(E, (ne = Q.current) == null ? void 0 : ne.area);
|
|
1007
|
-
}, []);
|
|
1008
|
-
return /* @__PURE__ */ o.jsx(
|
|
1009
|
-
Ks,
|
|
1010
|
-
{
|
|
1011
|
-
scope: n,
|
|
1012
|
-
searchRef: L,
|
|
1013
|
-
onItemEnter: h.useCallback(
|
|
1014
|
-
(E) => {
|
|
1015
|
-
xe(E) && E.preventDefault();
|
|
1016
|
-
},
|
|
1017
|
-
[xe]
|
|
1018
|
-
),
|
|
1019
|
-
onItemLeave: h.useCallback(
|
|
1020
|
-
(E) => {
|
|
1021
|
-
var U;
|
|
1022
|
-
xe(E) || ((U = P.current) == null || U.focus(), N(null));
|
|
1023
|
-
},
|
|
1024
|
-
[xe]
|
|
1025
|
-
),
|
|
1026
|
-
onTriggerLeave: h.useCallback(
|
|
1027
|
-
(E) => {
|
|
1028
|
-
xe(E) && E.preventDefault();
|
|
1029
|
-
},
|
|
1030
|
-
[xe]
|
|
1031
|
-
),
|
|
1032
|
-
pointerGraceTimerRef: te,
|
|
1033
|
-
onPointerGraceIntentChange: h.useCallback((E) => {
|
|
1034
|
-
Q.current = E;
|
|
1035
|
-
}, []),
|
|
1036
|
-
children: /* @__PURE__ */ o.jsx(Oe, { ...he, children: /* @__PURE__ */ o.jsx(
|
|
1037
|
-
Xo,
|
|
1038
|
-
{
|
|
1039
|
-
asChild: !0,
|
|
1040
|
-
trapped: a,
|
|
1041
|
-
onMountAutoFocus: A(s, (E) => {
|
|
1042
|
-
var U;
|
|
1043
|
-
E.preventDefault(), (U = P.current) == null || U.focus({ preventScroll: !0 });
|
|
1044
|
-
}),
|
|
1045
|
-
onUnmountAutoFocus: i,
|
|
1046
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1047
|
-
Jo,
|
|
1048
|
-
{
|
|
1049
|
-
asChild: !0,
|
|
1050
|
-
disableOutsidePointerEvents: l,
|
|
1051
|
-
onEscapeKeyDown: v,
|
|
1052
|
-
onPointerDownOutside: m,
|
|
1053
|
-
onFocusOutside: c,
|
|
1054
|
-
onInteractOutside: d,
|
|
1055
|
-
onDismiss: f,
|
|
1056
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1057
|
-
Ba,
|
|
1058
|
-
{
|
|
1059
|
-
asChild: !0,
|
|
1060
|
-
...x,
|
|
1061
|
-
dir: H.dir,
|
|
1062
|
-
orientation: "vertical",
|
|
1063
|
-
loop: r,
|
|
1064
|
-
currentTabStopId: C,
|
|
1065
|
-
onCurrentTabStopIdChange: N,
|
|
1066
|
-
onEntryFocus: A(u, (E) => {
|
|
1067
|
-
H.isUsingKeyboardRef.current || E.preventDefault();
|
|
1068
|
-
}),
|
|
1069
|
-
preventScrollOnEntryFocus: !0,
|
|
1070
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1071
|
-
Zo,
|
|
1072
|
-
{
|
|
1073
|
-
role: "menu",
|
|
1074
|
-
"aria-orientation": "vertical",
|
|
1075
|
-
"data-state": xr(K.open),
|
|
1076
|
-
"data-radix-menu-content": "",
|
|
1077
|
-
dir: H.dir,
|
|
1078
|
-
...q,
|
|
1079
|
-
...R,
|
|
1080
|
-
ref: _,
|
|
1081
|
-
style: { outline: "none", ...R.style },
|
|
1082
|
-
onKeyDown: A(R.onKeyDown, (E) => {
|
|
1083
|
-
const Y = E.target.closest("[data-radix-menu-content]") === E.currentTarget, ne = E.ctrlKey || E.altKey || E.metaKey, De = E.key.length === 1;
|
|
1084
|
-
Y && (E.key === "Tab" && E.preventDefault(), !ne && De && Be(E.key));
|
|
1085
|
-
const pe = P.current;
|
|
1086
|
-
if (E.target !== pe || !ks.includes(E.key)) return;
|
|
1087
|
-
E.preventDefault();
|
|
1088
|
-
const me = p().filter((le) => !le.disabled).map((le) => le.ref.current);
|
|
1089
|
-
Yn.includes(E.key) && me.reverse(), ni(me);
|
|
1090
|
-
}),
|
|
1091
|
-
onBlur: A(e.onBlur, (E) => {
|
|
1092
|
-
E.currentTarget.contains(E.target) || (window.clearTimeout(w.current), L.current = "");
|
|
1093
|
-
}),
|
|
1094
|
-
onPointerMove: A(
|
|
1095
|
-
e.onPointerMove,
|
|
1096
|
-
Xe((E) => {
|
|
1097
|
-
const U = E.target, Y = X.current !== E.clientX;
|
|
1098
|
-
if (E.currentTarget.contains(U) && Y) {
|
|
1099
|
-
const ne = E.clientX > X.current ? "right" : "left";
|
|
1100
|
-
V.current = ne, X.current = E.clientX;
|
|
1101
|
-
}
|
|
1102
|
-
})
|
|
1103
|
-
)
|
|
1104
|
-
}
|
|
1105
|
-
)
|
|
1106
|
-
}
|
|
1107
|
-
)
|
|
1108
|
-
}
|
|
1109
|
-
)
|
|
1110
|
-
}
|
|
1111
|
-
) })
|
|
1112
|
-
}
|
|
1113
|
-
);
|
|
1114
|
-
}
|
|
1115
|
-
);
|
|
1116
|
-
rr.displayName = se;
|
|
1117
|
-
var qs = "MenuGroup", Vt = h.forwardRef(
|
|
1118
|
-
(e, t) => {
|
|
1119
|
-
const { __scopeMenu: n, ...r } = e;
|
|
1120
|
-
return /* @__PURE__ */ o.jsx(He.div, { role: "group", ...r, ref: t });
|
|
1121
|
-
}
|
|
1122
|
-
);
|
|
1123
|
-
Vt.displayName = qs;
|
|
1124
|
-
var Gs = "MenuLabel", or = h.forwardRef(
|
|
1125
|
-
(e, t) => {
|
|
1126
|
-
const { __scopeMenu: n, ...r } = e;
|
|
1127
|
-
return /* @__PURE__ */ o.jsx(He.div, { ...r, ref: t });
|
|
1128
|
-
}
|
|
1129
|
-
);
|
|
1130
|
-
or.displayName = Gs;
|
|
1131
|
-
var pt = "MenuItem", wn = "menu.itemSelect", vt = h.forwardRef(
|
|
1132
|
-
(e, t) => {
|
|
1133
|
-
const { disabled: n = !1, onSelect: r, ...a } = e, s = h.useRef(null), i = rt(pt, e.__scopeMenu), l = zt(pt, e.__scopeMenu), u = Ze(t, s), v = h.useRef(!1), m = () => {
|
|
1134
|
-
const c = s.current;
|
|
1135
|
-
if (!n && c) {
|
|
1136
|
-
const d = new CustomEvent(wn, { bubbles: !0, cancelable: !0 });
|
|
1137
|
-
c.addEventListener(wn, (f) => r == null ? void 0 : r(f), { once: !0 }), ra(c, d), d.defaultPrevented ? v.current = !1 : i.onClose();
|
|
1138
|
-
}
|
|
1139
|
-
};
|
|
1140
|
-
return /* @__PURE__ */ o.jsx(
|
|
1141
|
-
ar,
|
|
1142
|
-
{
|
|
1143
|
-
...a,
|
|
1144
|
-
ref: u,
|
|
1145
|
-
disabled: n,
|
|
1146
|
-
onClick: A(e.onClick, m),
|
|
1147
|
-
onPointerDown: (c) => {
|
|
1148
|
-
var d;
|
|
1149
|
-
(d = e.onPointerDown) == null || d.call(e, c), v.current = !0;
|
|
1150
|
-
},
|
|
1151
|
-
onPointerUp: A(e.onPointerUp, (c) => {
|
|
1152
|
-
var d;
|
|
1153
|
-
v.current || (d = c.currentTarget) == null || d.click();
|
|
1154
|
-
}),
|
|
1155
|
-
onKeyDown: A(e.onKeyDown, (c) => {
|
|
1156
|
-
const d = l.searchRef.current !== "";
|
|
1157
|
-
n || d && c.key === " " || jt.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
|
|
1158
|
-
})
|
|
1159
|
-
}
|
|
1160
|
-
);
|
|
1161
|
-
}
|
|
1162
|
-
);
|
|
1163
|
-
vt.displayName = pt;
|
|
1164
|
-
var ar = h.forwardRef(
|
|
1165
|
-
(e, t) => {
|
|
1166
|
-
const { __scopeMenu: n, disabled: r = !1, textValue: a, ...s } = e, i = zt(pt, n), l = Jn(n), u = h.useRef(null), v = Ze(t, u), [m, c] = h.useState(!1), [d, f] = h.useState("");
|
|
1167
|
-
return h.useEffect(() => {
|
|
1168
|
-
const y = u.current;
|
|
1169
|
-
y && f((y.textContent ?? "").trim());
|
|
1170
|
-
}, [s.children]), /* @__PURE__ */ o.jsx(
|
|
1171
|
-
Ye.ItemSlot,
|
|
1172
|
-
{
|
|
1173
|
-
scope: n,
|
|
1174
|
-
disabled: r,
|
|
1175
|
-
textValue: a ?? d,
|
|
1176
|
-
children: /* @__PURE__ */ o.jsx(za, { asChild: !0, ...l, focusable: !r, children: /* @__PURE__ */ o.jsx(
|
|
1177
|
-
He.div,
|
|
1178
|
-
{
|
|
1179
|
-
role: "menuitem",
|
|
1180
|
-
"data-highlighted": m ? "" : void 0,
|
|
1181
|
-
"aria-disabled": r || void 0,
|
|
1182
|
-
"data-disabled": r ? "" : void 0,
|
|
1183
|
-
...s,
|
|
1184
|
-
ref: v,
|
|
1185
|
-
onPointerMove: A(
|
|
1186
|
-
e.onPointerMove,
|
|
1187
|
-
Xe((y) => {
|
|
1188
|
-
r ? i.onItemLeave(y) : (i.onItemEnter(y), y.defaultPrevented || y.currentTarget.focus({ preventScroll: !0 }));
|
|
1189
|
-
})
|
|
1190
|
-
),
|
|
1191
|
-
onPointerLeave: A(
|
|
1192
|
-
e.onPointerLeave,
|
|
1193
|
-
Xe((y) => i.onItemLeave(y))
|
|
1194
|
-
),
|
|
1195
|
-
onFocus: A(e.onFocus, () => c(!0)),
|
|
1196
|
-
onBlur: A(e.onBlur, () => c(!1))
|
|
1197
|
-
}
|
|
1198
|
-
) })
|
|
1199
|
-
}
|
|
1200
|
-
);
|
|
1201
|
-
}
|
|
1202
|
-
), Ws = "MenuCheckboxItem", sr = h.forwardRef(
|
|
1203
|
-
(e, t) => {
|
|
1204
|
-
const { checked: n = !1, onCheckedChange: r, ...a } = e;
|
|
1205
|
-
return /* @__PURE__ */ o.jsx(dr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ o.jsx(
|
|
1206
|
-
vt,
|
|
1207
|
-
{
|
|
1208
|
-
role: "menuitemcheckbox",
|
|
1209
|
-
"aria-checked": mt(n) ? "mixed" : n,
|
|
1210
|
-
...a,
|
|
1211
|
-
ref: t,
|
|
1212
|
-
"data-state": Gt(n),
|
|
1213
|
-
onSelect: A(
|
|
1214
|
-
a.onSelect,
|
|
1215
|
-
() => r == null ? void 0 : r(mt(n) ? !0 : !n),
|
|
1216
|
-
{ checkForDefaultPrevented: !1 }
|
|
1217
|
-
)
|
|
1218
|
-
}
|
|
1219
|
-
) });
|
|
1220
|
-
}
|
|
1221
|
-
);
|
|
1222
|
-
sr.displayName = Ws;
|
|
1223
|
-
var ir = "MenuRadioGroup", [Ys, Xs] = _e(
|
|
1224
|
-
ir,
|
|
1225
|
-
{ value: void 0, onValueChange: () => {
|
|
1226
|
-
} }
|
|
1227
|
-
), lr = h.forwardRef(
|
|
1228
|
-
(e, t) => {
|
|
1229
|
-
const { value: n, onValueChange: r, ...a } = e, s = At(r);
|
|
1230
|
-
return /* @__PURE__ */ o.jsx(Ys, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ o.jsx(Vt, { ...a, ref: t }) });
|
|
1231
|
-
}
|
|
1232
|
-
);
|
|
1233
|
-
lr.displayName = ir;
|
|
1234
|
-
var cr = "MenuRadioItem", ur = h.forwardRef(
|
|
1235
|
-
(e, t) => {
|
|
1236
|
-
const { value: n, ...r } = e, a = Xs(cr, e.__scopeMenu), s = n === a.value;
|
|
1237
|
-
return /* @__PURE__ */ o.jsx(dr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ o.jsx(
|
|
1238
|
-
vt,
|
|
1239
|
-
{
|
|
1240
|
-
role: "menuitemradio",
|
|
1241
|
-
"aria-checked": s,
|
|
1242
|
-
...r,
|
|
1243
|
-
ref: t,
|
|
1244
|
-
"data-state": Gt(s),
|
|
1245
|
-
onSelect: A(
|
|
1246
|
-
r.onSelect,
|
|
1247
|
-
() => {
|
|
1248
|
-
var i;
|
|
1249
|
-
return (i = a.onValueChange) == null ? void 0 : i.call(a, n);
|
|
1250
|
-
},
|
|
1251
|
-
{ checkForDefaultPrevented: !1 }
|
|
1252
|
-
)
|
|
1253
|
-
}
|
|
1254
|
-
) });
|
|
1255
|
-
}
|
|
1256
|
-
);
|
|
1257
|
-
ur.displayName = cr;
|
|
1258
|
-
var Qt = "MenuItemIndicator", [dr, Js] = _e(
|
|
1259
|
-
Qt,
|
|
1260
|
-
{ checked: !1 }
|
|
1261
|
-
), fr = h.forwardRef(
|
|
1262
|
-
(e, t) => {
|
|
1263
|
-
const { __scopeMenu: n, forceMount: r, ...a } = e, s = Js(Qt, n);
|
|
1264
|
-
return /* @__PURE__ */ o.jsx(
|
|
1265
|
-
gt,
|
|
1266
|
-
{
|
|
1267
|
-
present: r || mt(s.checked) || s.checked === !0,
|
|
1268
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1269
|
-
He.span,
|
|
1270
|
-
{
|
|
1271
|
-
...a,
|
|
1272
|
-
ref: t,
|
|
1273
|
-
"data-state": Gt(s.checked)
|
|
1274
|
-
}
|
|
1275
|
-
)
|
|
1276
|
-
}
|
|
1277
|
-
);
|
|
1278
|
-
}
|
|
1279
|
-
);
|
|
1280
|
-
fr.displayName = Qt;
|
|
1281
|
-
var Zs = "MenuSeparator", hr = h.forwardRef(
|
|
1282
|
-
(e, t) => {
|
|
1283
|
-
const { __scopeMenu: n, ...r } = e;
|
|
1284
|
-
return /* @__PURE__ */ o.jsx(
|
|
1285
|
-
He.div,
|
|
1286
|
-
{
|
|
1287
|
-
role: "separator",
|
|
1288
|
-
"aria-orientation": "horizontal",
|
|
1289
|
-
...r,
|
|
1290
|
-
ref: t
|
|
1291
|
-
}
|
|
1292
|
-
);
|
|
1293
|
-
}
|
|
1294
|
-
);
|
|
1295
|
-
hr.displayName = Zs;
|
|
1296
|
-
var ei = "MenuArrow", pr = h.forwardRef(
|
|
1297
|
-
(e, t) => {
|
|
1298
|
-
const { __scopeMenu: n, ...r } = e, a = nt(n);
|
|
1299
|
-
return /* @__PURE__ */ o.jsx(ea, { ...a, ...r, ref: t });
|
|
1300
|
-
}
|
|
1301
|
-
);
|
|
1302
|
-
pr.displayName = ei;
|
|
1303
|
-
var qt = "MenuSub", [ti, mr] = _e(qt), gr = (e) => {
|
|
1304
|
-
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: a } = e, s = Re(qt, t), i = nt(t), [l, u] = h.useState(null), [v, m] = h.useState(null), c = At(a);
|
|
1305
|
-
return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ o.jsx(_n, { ...i, children: /* @__PURE__ */ o.jsx(
|
|
1306
|
-
Zn,
|
|
1307
|
-
{
|
|
1308
|
-
scope: t,
|
|
1309
|
-
open: r,
|
|
1310
|
-
onOpenChange: c,
|
|
1311
|
-
content: v,
|
|
1312
|
-
onContentChange: m,
|
|
1313
|
-
children: /* @__PURE__ */ o.jsx(
|
|
1314
|
-
ti,
|
|
1315
|
-
{
|
|
1316
|
-
scope: t,
|
|
1317
|
-
contentId: ht(),
|
|
1318
|
-
triggerId: ht(),
|
|
1319
|
-
trigger: l,
|
|
1320
|
-
onTriggerChange: u,
|
|
1321
|
-
children: n
|
|
1322
|
-
}
|
|
1323
|
-
)
|
|
1324
|
-
}
|
|
1325
|
-
) });
|
|
1326
|
-
};
|
|
1327
|
-
gr.displayName = qt;
|
|
1328
|
-
var qe = "MenuSubTrigger", vr = h.forwardRef(
|
|
1329
|
-
(e, t) => {
|
|
1330
|
-
const n = Re(qe, e.__scopeMenu), r = rt(qe, e.__scopeMenu), a = mr(qe, e.__scopeMenu), s = zt(qe, e.__scopeMenu), i = h.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, v = { __scopeMenu: e.__scopeMenu }, m = h.useCallback(() => {
|
|
1331
|
-
i.current && window.clearTimeout(i.current), i.current = null;
|
|
1332
|
-
}, []);
|
|
1333
|
-
return h.useEffect(() => m, [m]), h.useEffect(() => {
|
|
1334
|
-
const c = l.current;
|
|
1335
|
-
return () => {
|
|
1336
|
-
window.clearTimeout(c), u(null);
|
|
1337
|
-
};
|
|
1338
|
-
}, [l, u]), /* @__PURE__ */ o.jsx(Ut, { asChild: !0, ...v, children: /* @__PURE__ */ o.jsx(
|
|
1339
|
-
ar,
|
|
1340
|
-
{
|
|
1341
|
-
id: a.triggerId,
|
|
1342
|
-
"aria-haspopup": "menu",
|
|
1343
|
-
"aria-expanded": n.open,
|
|
1344
|
-
"aria-controls": a.contentId,
|
|
1345
|
-
"data-state": xr(n.open),
|
|
1346
|
-
...e,
|
|
1347
|
-
ref: Tn(t, a.onTriggerChange),
|
|
1348
|
-
onClick: (c) => {
|
|
1349
|
-
var d;
|
|
1350
|
-
(d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
1351
|
-
},
|
|
1352
|
-
onPointerMove: A(
|
|
1353
|
-
e.onPointerMove,
|
|
1354
|
-
Xe((c) => {
|
|
1355
|
-
s.onItemEnter(c), !c.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
|
|
1356
|
-
n.onOpenChange(!0), m();
|
|
1357
|
-
}, 100));
|
|
1358
|
-
})
|
|
1359
|
-
),
|
|
1360
|
-
onPointerLeave: A(
|
|
1361
|
-
e.onPointerLeave,
|
|
1362
|
-
Xe((c) => {
|
|
1363
|
-
var f, y;
|
|
1364
|
-
m();
|
|
1365
|
-
const d = (f = n.content) == null ? void 0 : f.getBoundingClientRect();
|
|
1366
|
-
if (d) {
|
|
1367
|
-
const R = (y = n.content) == null ? void 0 : y.dataset.side, K = R === "right", H = K ? -5 : 5, q = d[K ? "left" : "right"], x = d[K ? "right" : "left"];
|
|
1368
|
-
s.onPointerGraceIntentChange({
|
|
1369
|
-
area: [
|
|
1370
|
-
// Apply a bleed on clientX to ensure that our exit point is
|
|
1371
|
-
// consistently within polygon bounds
|
|
1372
|
-
{ x: c.clientX + H, y: c.clientY },
|
|
1373
|
-
{ x: q, y: d.top },
|
|
1374
|
-
{ x, y: d.top },
|
|
1375
|
-
{ x, y: d.bottom },
|
|
1376
|
-
{ x: q, y: d.bottom }
|
|
1377
|
-
],
|
|
1378
|
-
side: R
|
|
1379
|
-
}), window.clearTimeout(l.current), l.current = window.setTimeout(
|
|
1380
|
-
() => s.onPointerGraceIntentChange(null),
|
|
1381
|
-
300
|
|
1382
|
-
);
|
|
1383
|
-
} else {
|
|
1384
|
-
if (s.onTriggerLeave(c), c.defaultPrevented) return;
|
|
1385
|
-
s.onPointerGraceIntentChange(null);
|
|
1386
|
-
}
|
|
1387
|
-
})
|
|
1388
|
-
),
|
|
1389
|
-
onKeyDown: A(e.onKeyDown, (c) => {
|
|
1390
|
-
var f;
|
|
1391
|
-
const d = s.searchRef.current !== "";
|
|
1392
|
-
e.disabled || d && c.key === " " || $s[r.dir].includes(c.key) && (n.onOpenChange(!0), (f = n.content) == null || f.focus(), c.preventDefault());
|
|
1393
|
-
})
|
|
1394
|
-
}
|
|
1395
|
-
) });
|
|
1396
|
-
}
|
|
1397
|
-
);
|
|
1398
|
-
vr.displayName = qe;
|
|
1399
|
-
var wr = "MenuSubContent", br = h.forwardRef(
|
|
1400
|
-
(e, t) => {
|
|
1401
|
-
const n = tr(se, e.__scopeMenu), { forceMount: r = n.forceMount, ...a } = e, s = Re(se, e.__scopeMenu), i = rt(se, e.__scopeMenu), l = mr(wr, e.__scopeMenu), u = h.useRef(null), v = Ze(t, u);
|
|
1402
|
-
return /* @__PURE__ */ o.jsx(Ye.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(gt, { present: r || s.open, children: /* @__PURE__ */ o.jsx(Ye.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ o.jsx(
|
|
1403
|
-
Kt,
|
|
1404
|
-
{
|
|
1405
|
-
id: l.contentId,
|
|
1406
|
-
"aria-labelledby": l.triggerId,
|
|
1407
|
-
...a,
|
|
1408
|
-
ref: v,
|
|
1409
|
-
align: "start",
|
|
1410
|
-
side: i.dir === "rtl" ? "left" : "right",
|
|
1411
|
-
disableOutsidePointerEvents: !1,
|
|
1412
|
-
disableOutsideScroll: !1,
|
|
1413
|
-
trapFocus: !1,
|
|
1414
|
-
onOpenAutoFocus: (m) => {
|
|
1415
|
-
var c;
|
|
1416
|
-
i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), m.preventDefault();
|
|
1417
|
-
},
|
|
1418
|
-
onCloseAutoFocus: (m) => m.preventDefault(),
|
|
1419
|
-
onFocusOutside: A(e.onFocusOutside, (m) => {
|
|
1420
|
-
m.target !== l.trigger && s.onOpenChange(!1);
|
|
1421
|
-
}),
|
|
1422
|
-
onEscapeKeyDown: A(e.onEscapeKeyDown, (m) => {
|
|
1423
|
-
i.onClose(), m.preventDefault();
|
|
1424
|
-
}),
|
|
1425
|
-
onKeyDown: A(e.onKeyDown, (m) => {
|
|
1426
|
-
var f;
|
|
1427
|
-
const c = m.currentTarget.contains(m.target), d = Ls[i.dir].includes(m.key);
|
|
1428
|
-
c && d && (s.onOpenChange(!1), (f = l.trigger) == null || f.focus(), m.preventDefault());
|
|
1429
|
-
})
|
|
1430
|
-
}
|
|
1431
|
-
) }) }) });
|
|
1432
|
-
}
|
|
1433
|
-
);
|
|
1434
|
-
br.displayName = wr;
|
|
1435
|
-
function xr(e) {
|
|
1436
|
-
return e ? "open" : "closed";
|
|
1437
|
-
}
|
|
1438
|
-
function mt(e) {
|
|
1439
|
-
return e === "indeterminate";
|
|
1440
|
-
}
|
|
1441
|
-
function Gt(e) {
|
|
1442
|
-
return mt(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
1443
|
-
}
|
|
1444
|
-
function ni(e) {
|
|
1445
|
-
const t = document.activeElement;
|
|
1446
|
-
for (const n of e)
|
|
1447
|
-
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
1448
|
-
}
|
|
1449
|
-
function ri(e, t) {
|
|
1450
|
-
return e.map((n, r) => e[(t + r) % e.length]);
|
|
1451
|
-
}
|
|
1452
|
-
function oi(e, t, n) {
|
|
1453
|
-
const a = t.length > 1 && Array.from(t).every((v) => v === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
|
|
1454
|
-
let i = ri(e, Math.max(s, 0));
|
|
1455
|
-
a.length === 1 && (i = i.filter((v) => v !== n));
|
|
1456
|
-
const u = i.find(
|
|
1457
|
-
(v) => v.toLowerCase().startsWith(a.toLowerCase())
|
|
1458
|
-
);
|
|
1459
|
-
return u !== n ? u : void 0;
|
|
1460
|
-
}
|
|
1461
|
-
function ai(e, t) {
|
|
1462
|
-
const { x: n, y: r } = e;
|
|
1463
|
-
let a = !1;
|
|
1464
|
-
for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
|
|
1465
|
-
const l = t[s].x, u = t[s].y, v = t[i].x, m = t[i].y;
|
|
1466
|
-
u > r != m > r && n < (v - l) * (r - u) / (m - u) + l && (a = !a);
|
|
1467
|
-
}
|
|
1468
|
-
return a;
|
|
1469
|
-
}
|
|
1470
|
-
function si(e, t) {
|
|
1471
|
-
if (!t) return !1;
|
|
1472
|
-
const n = { x: e.clientX, y: e.clientY };
|
|
1473
|
-
return ai(n, t);
|
|
1474
|
-
}
|
|
1475
|
-
function Xe(e) {
|
|
1476
|
-
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
1477
|
-
}
|
|
1478
|
-
var ii = er, li = Ut, ci = nr, ui = rr, di = Vt, fi = or, hi = vt, pi = sr, mi = lr, gi = ur, vi = fr, wi = hr, bi = pr, xi = gr, yi = vr, Mi = br, Wt = "DropdownMenu", [Si, Jl] = Nn(
|
|
1479
|
-
Wt,
|
|
1480
|
-
[Xn]
|
|
1481
|
-
), W = Xn(), [Ei, yr] = Si(Wt), Mr = (e) => {
|
|
1482
|
-
const {
|
|
1483
|
-
__scopeDropdownMenu: t,
|
|
1484
|
-
children: n,
|
|
1485
|
-
dir: r,
|
|
1486
|
-
open: a,
|
|
1487
|
-
defaultOpen: s,
|
|
1488
|
-
onOpenChange: i,
|
|
1489
|
-
modal: l = !0
|
|
1490
|
-
} = e, u = W(t), v = h.useRef(null), [m = !1, c] = On({
|
|
1491
|
-
prop: a,
|
|
1492
|
-
defaultProp: s,
|
|
1493
|
-
onChange: i
|
|
1494
|
-
});
|
|
1495
|
-
return /* @__PURE__ */ o.jsx(
|
|
1496
|
-
Ei,
|
|
1497
|
-
{
|
|
1498
|
-
scope: t,
|
|
1499
|
-
triggerId: ht(),
|
|
1500
|
-
triggerRef: v,
|
|
1501
|
-
contentId: ht(),
|
|
1502
|
-
open: m,
|
|
1503
|
-
onOpenChange: c,
|
|
1504
|
-
onOpenToggle: h.useCallback(() => c((d) => !d), [c]),
|
|
1505
|
-
modal: l,
|
|
1506
|
-
children: /* @__PURE__ */ o.jsx(ii, { ...u, open: m, onOpenChange: c, dir: r, modal: l, children: n })
|
|
1507
|
-
}
|
|
1508
|
-
);
|
|
1509
|
-
};
|
|
1510
|
-
Mr.displayName = Wt;
|
|
1511
|
-
var Sr = "DropdownMenuTrigger", Er = h.forwardRef(
|
|
1512
|
-
(e, t) => {
|
|
1513
|
-
const { __scopeDropdownMenu: n, disabled: r = !1, ...a } = e, s = yr(Sr, n), i = W(n);
|
|
1514
|
-
return /* @__PURE__ */ o.jsx(li, { asChild: !0, ...i, children: /* @__PURE__ */ o.jsx(
|
|
1515
|
-
He.button,
|
|
1516
|
-
{
|
|
1517
|
-
type: "button",
|
|
1518
|
-
id: s.triggerId,
|
|
1519
|
-
"aria-haspopup": "menu",
|
|
1520
|
-
"aria-expanded": s.open,
|
|
1521
|
-
"aria-controls": s.open ? s.contentId : void 0,
|
|
1522
|
-
"data-state": s.open ? "open" : "closed",
|
|
1523
|
-
"data-disabled": r ? "" : void 0,
|
|
1524
|
-
disabled: r,
|
|
1525
|
-
...a,
|
|
1526
|
-
ref: Tn(t, s.triggerRef),
|
|
1527
|
-
onPointerDown: A(e.onPointerDown, (l) => {
|
|
1528
|
-
!r && l.button === 0 && l.ctrlKey === !1 && (s.onOpenToggle(), s.open || l.preventDefault());
|
|
1529
|
-
}),
|
|
1530
|
-
onKeyDown: A(e.onKeyDown, (l) => {
|
|
1531
|
-
r || (["Enter", " "].includes(l.key) && s.onOpenToggle(), l.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(l.key) && l.preventDefault());
|
|
1532
|
-
})
|
|
1533
|
-
}
|
|
1534
|
-
) });
|
|
1535
|
-
}
|
|
1536
|
-
);
|
|
1537
|
-
Er.displayName = Sr;
|
|
1538
|
-
var Ci = "DropdownMenuPortal", Cr = (e) => {
|
|
1539
|
-
const { __scopeDropdownMenu: t, ...n } = e, r = W(t);
|
|
1540
|
-
return /* @__PURE__ */ o.jsx(ci, { ...r, ...n });
|
|
1541
|
-
};
|
|
1542
|
-
Cr.displayName = Ci;
|
|
1543
|
-
var Rr = "DropdownMenuContent", Dr = h.forwardRef(
|
|
1544
|
-
(e, t) => {
|
|
1545
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = yr(Rr, n), s = W(n), i = h.useRef(!1);
|
|
1546
|
-
return /* @__PURE__ */ o.jsx(
|
|
1547
|
-
ui,
|
|
1548
|
-
{
|
|
1549
|
-
id: a.contentId,
|
|
1550
|
-
"aria-labelledby": a.triggerId,
|
|
1551
|
-
...s,
|
|
1552
|
-
...r,
|
|
1553
|
-
ref: t,
|
|
1554
|
-
onCloseAutoFocus: A(e.onCloseAutoFocus, (l) => {
|
|
1555
|
-
var u;
|
|
1556
|
-
i.current || (u = a.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
|
|
1557
|
-
}),
|
|
1558
|
-
onInteractOutside: A(e.onInteractOutside, (l) => {
|
|
1559
|
-
const u = l.detail.originalEvent, v = u.button === 0 && u.ctrlKey === !0, m = u.button === 2 || v;
|
|
1560
|
-
(!a.modal || m) && (i.current = !0);
|
|
1561
|
-
}),
|
|
1562
|
-
style: {
|
|
1563
|
-
...e.style,
|
|
1564
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1565
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
1566
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
1567
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1568
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1569
|
-
}
|
|
1570
|
-
}
|
|
1571
|
-
);
|
|
1572
|
-
}
|
|
1573
|
-
);
|
|
1574
|
-
Dr.displayName = Rr;
|
|
1575
|
-
var Ri = "DropdownMenuGroup", Di = h.forwardRef(
|
|
1576
|
-
(e, t) => {
|
|
1577
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1578
|
-
return /* @__PURE__ */ o.jsx(di, { ...a, ...r, ref: t });
|
|
1579
|
-
}
|
|
1580
|
-
);
|
|
1581
|
-
Di.displayName = Ri;
|
|
1582
|
-
var ji = "DropdownMenuLabel", jr = h.forwardRef(
|
|
1583
|
-
(e, t) => {
|
|
1584
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1585
|
-
return /* @__PURE__ */ o.jsx(fi, { ...a, ...r, ref: t });
|
|
1586
|
-
}
|
|
1587
|
-
);
|
|
1588
|
-
jr.displayName = ji;
|
|
1589
|
-
var Ni = "DropdownMenuItem", Nr = h.forwardRef(
|
|
1590
|
-
(e, t) => {
|
|
1591
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1592
|
-
return /* @__PURE__ */ o.jsx(hi, { ...a, ...r, ref: t });
|
|
1593
|
-
}
|
|
1594
|
-
);
|
|
1595
|
-
Nr.displayName = Ni;
|
|
1596
|
-
var Pi = "DropdownMenuCheckboxItem", Pr = h.forwardRef((e, t) => {
|
|
1597
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1598
|
-
return /* @__PURE__ */ o.jsx(pi, { ...a, ...r, ref: t });
|
|
1599
|
-
});
|
|
1600
|
-
Pr.displayName = Pi;
|
|
1601
|
-
var Ti = "DropdownMenuRadioGroup", _i = h.forwardRef((e, t) => {
|
|
1602
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1603
|
-
return /* @__PURE__ */ o.jsx(mi, { ...a, ...r, ref: t });
|
|
1604
|
-
});
|
|
1605
|
-
_i.displayName = Ti;
|
|
1606
|
-
var Oi = "DropdownMenuRadioItem", Tr = h.forwardRef((e, t) => {
|
|
1607
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1608
|
-
return /* @__PURE__ */ o.jsx(gi, { ...a, ...r, ref: t });
|
|
1609
|
-
});
|
|
1610
|
-
Tr.displayName = Oi;
|
|
1611
|
-
var Ii = "DropdownMenuItemIndicator", _r = h.forwardRef((e, t) => {
|
|
1612
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1613
|
-
return /* @__PURE__ */ o.jsx(vi, { ...a, ...r, ref: t });
|
|
1614
|
-
});
|
|
1615
|
-
_r.displayName = Ii;
|
|
1616
|
-
var Ai = "DropdownMenuSeparator", Or = h.forwardRef((e, t) => {
|
|
1617
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1618
|
-
return /* @__PURE__ */ o.jsx(wi, { ...a, ...r, ref: t });
|
|
1619
|
-
});
|
|
1620
|
-
Or.displayName = Ai;
|
|
1621
|
-
var ki = "DropdownMenuArrow", $i = h.forwardRef(
|
|
1622
|
-
(e, t) => {
|
|
1623
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1624
|
-
return /* @__PURE__ */ o.jsx(bi, { ...a, ...r, ref: t });
|
|
1625
|
-
}
|
|
1626
|
-
);
|
|
1627
|
-
$i.displayName = ki;
|
|
1628
|
-
var Li = (e) => {
|
|
1629
|
-
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: a, defaultOpen: s } = e, i = W(t), [l = !1, u] = On({
|
|
1630
|
-
prop: r,
|
|
1631
|
-
defaultProp: s,
|
|
1632
|
-
onChange: a
|
|
1633
|
-
});
|
|
1634
|
-
return /* @__PURE__ */ o.jsx(xi, { ...i, open: l, onOpenChange: u, children: n });
|
|
1635
|
-
}, Fi = "DropdownMenuSubTrigger", Ir = h.forwardRef((e, t) => {
|
|
1636
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1637
|
-
return /* @__PURE__ */ o.jsx(yi, { ...a, ...r, ref: t });
|
|
1638
|
-
});
|
|
1639
|
-
Ir.displayName = Fi;
|
|
1640
|
-
var Hi = "DropdownMenuSubContent", Ar = h.forwardRef((e, t) => {
|
|
1641
|
-
const { __scopeDropdownMenu: n, ...r } = e, a = W(n);
|
|
1642
|
-
return /* @__PURE__ */ o.jsx(
|
|
1643
|
-
Mi,
|
|
1644
|
-
{
|
|
1645
|
-
...a,
|
|
1646
|
-
...r,
|
|
1647
|
-
ref: t,
|
|
1648
|
-
style: {
|
|
1649
|
-
...e.style,
|
|
1650
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1651
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
1652
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
1653
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1654
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1655
|
-
}
|
|
1656
|
-
}
|
|
1657
|
-
);
|
|
1658
|
-
});
|
|
1659
|
-
Ar.displayName = Hi;
|
|
1660
|
-
var Ui = Mr, Bi = Er, kr = Cr, $r = Dr, Lr = jr, Fr = Nr, Hr = Pr, Ur = Tr, Br = _r, zr = Or, zi = Li, Kr = Ir, Vr = Ar;
|
|
1661
|
-
const Ki = Ui, Vi = Bi, Qi = kr, qi = zi, Qr = h.forwardRef(({ className: e, inset: t, children: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
|
|
1662
|
-
Kr,
|
|
1663
|
-
{
|
|
1664
|
-
ref: a,
|
|
1665
|
-
className: O(
|
|
1666
|
-
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
1667
|
-
t && "pl-8",
|
|
1668
|
-
e
|
|
1669
|
-
),
|
|
1670
|
-
...r,
|
|
1671
|
-
children: [
|
|
1672
|
-
n,
|
|
1673
|
-
/* @__PURE__ */ o.jsx(Kn, { className: "ml-auto h-4 w-4" })
|
|
1674
|
-
]
|
|
1675
|
-
}
|
|
1676
|
-
));
|
|
1677
|
-
Qr.displayName = Kr.displayName;
|
|
1678
|
-
const qr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
1679
|
-
Vr,
|
|
1680
|
-
{
|
|
1681
|
-
ref: n,
|
|
1682
|
-
className: O(
|
|
1683
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1684
|
-
e
|
|
1685
|
-
),
|
|
1686
|
-
...t
|
|
1687
|
-
}
|
|
1688
|
-
));
|
|
1689
|
-
qr.displayName = Vr.displayName;
|
|
1690
|
-
const Gr = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ o.jsx(kr, { children: /* @__PURE__ */ o.jsx(
|
|
1691
|
-
$r,
|
|
1692
|
-
{
|
|
1693
|
-
ref: r,
|
|
1694
|
-
sideOffset: t,
|
|
1695
|
-
className: O(
|
|
1696
|
-
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1697
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
1698
|
-
e
|
|
1699
|
-
),
|
|
1700
|
-
...n
|
|
1701
|
-
}
|
|
1702
|
-
) }));
|
|
1703
|
-
Gr.displayName = $r.displayName;
|
|
1704
|
-
const Wr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ o.jsx(
|
|
1705
|
-
Fr,
|
|
1706
|
-
{
|
|
1707
|
-
ref: r,
|
|
1708
|
-
className: O(
|
|
1709
|
-
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1710
|
-
t && "pl-8",
|
|
1711
|
-
e
|
|
1712
|
-
),
|
|
1713
|
-
...n
|
|
1714
|
-
}
|
|
1715
|
-
));
|
|
1716
|
-
Wr.displayName = Fr.displayName;
|
|
1717
|
-
const Gi = h.forwardRef(({ className: e, children: t, checked: n, ...r }, a) => /* @__PURE__ */ o.jsxs(
|
|
1718
|
-
Hr,
|
|
1719
|
-
{
|
|
1720
|
-
ref: a,
|
|
1721
|
-
className: O(
|
|
1722
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1723
|
-
e
|
|
1724
|
-
),
|
|
1725
|
-
checked: n,
|
|
1726
|
-
...r,
|
|
1727
|
-
children: [
|
|
1728
|
-
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(Br, { children: /* @__PURE__ */ o.jsx(Oa, { className: "h-4 w-4" }) }) }),
|
|
1729
|
-
t
|
|
1730
|
-
]
|
|
1731
|
-
}
|
|
1732
|
-
));
|
|
1733
|
-
Gi.displayName = Hr.displayName;
|
|
1734
|
-
const Wi = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ o.jsxs(
|
|
1735
|
-
Ur,
|
|
1736
|
-
{
|
|
1737
|
-
ref: r,
|
|
1738
|
-
className: O(
|
|
1739
|
-
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1740
|
-
e
|
|
1741
|
-
),
|
|
1742
|
-
...n,
|
|
1743
|
-
children: [
|
|
1744
|
-
/* @__PURE__ */ o.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ o.jsx(Br, { children: /* @__PURE__ */ o.jsx(Ia, { className: "h-4 w-4 fill-current" }) }) }),
|
|
1745
|
-
t
|
|
1746
|
-
]
|
|
1747
|
-
}
|
|
1748
|
-
));
|
|
1749
|
-
Wi.displayName = Ur.displayName;
|
|
1750
|
-
const Yr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ o.jsx(
|
|
1751
|
-
Lr,
|
|
1752
|
-
{
|
|
1753
|
-
ref: r,
|
|
1754
|
-
className: O(
|
|
1755
|
-
"px-2 py-1.5 text-sm font-semibold",
|
|
1756
|
-
t && "pl-8",
|
|
1757
|
-
e
|
|
1758
|
-
),
|
|
1759
|
-
...n
|
|
1760
|
-
}
|
|
1761
|
-
));
|
|
1762
|
-
Yr.displayName = Lr.displayName;
|
|
1763
|
-
const Xr = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
1764
|
-
zr,
|
|
1765
|
-
{
|
|
1766
|
-
ref: n,
|
|
1767
|
-
className: O("-mx-1 my-1 h-px bg-muted", e),
|
|
1768
|
-
...t
|
|
1769
|
-
}
|
|
1770
|
-
));
|
|
1771
|
-
Xr.displayName = zr.displayName;
|
|
1772
|
-
const Yi = {
|
|
882
|
+
const J = globalThis;
|
|
883
|
+
(!J.requestIdleCallback || !J.cancelIdleCallback) && (J.requestIdleCallback = (t) => setTimeout(t, 1), J.cancelIdleCallback = clearTimeout);
|
|
884
|
+
const De = {
|
|
1773
885
|
info: "bg-blue-500",
|
|
1774
886
|
note: "bg-gray-500",
|
|
1775
887
|
tip: "bg-green-600",
|
|
1776
888
|
caution: "bg-orange-500",
|
|
1777
889
|
danger: "bg-rose-500"
|
|
1778
|
-
},
|
|
1779
|
-
const { page:
|
|
1780
|
-
|
|
890
|
+
}, Zr = () => {
|
|
891
|
+
const { page: t } = F(), [e, r] = Q(!0);
|
|
892
|
+
if (!(t != null && t.banner) || !e)
|
|
893
|
+
return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
|
|
894
|
+
const s = t.banner.color && t.banner.color in De ? De[t.banner.color] : t.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: t.banner.color };
|
|
895
|
+
return /* @__PURE__ */ a.jsxs(
|
|
1781
896
|
"div",
|
|
1782
897
|
{
|
|
1783
|
-
className:
|
|
898
|
+
className: A(
|
|
1784
899
|
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
1785
|
-
|
|
900
|
+
s
|
|
1786
901
|
),
|
|
902
|
+
style: n,
|
|
1787
903
|
children: [
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
|
|
904
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full", children: t.banner.message }),
|
|
905
|
+
t.banner.dismissible && /* @__PURE__ */ a.jsx(
|
|
1790
906
|
"button",
|
|
1791
907
|
{
|
|
1792
908
|
type: "button",
|
|
1793
909
|
className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
|
|
1794
|
-
onClick: () =>
|
|
1795
|
-
children: /* @__PURE__ */
|
|
910
|
+
onClick: () => r(!1),
|
|
911
|
+
children: /* @__PURE__ */ a.jsx(Yt, { size: 16 })
|
|
1796
912
|
}
|
|
1797
913
|
)
|
|
1798
914
|
]
|
|
1799
915
|
}
|
|
1800
916
|
);
|
|
1801
|
-
}
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
|
|
1806
|
-
}
|
|
1807
|
-
const Jr = g.createContext({
|
|
1808
|
-
drawerRef: {
|
|
1809
|
-
current: null
|
|
1810
|
-
},
|
|
1811
|
-
overlayRef: {
|
|
1812
|
-
current: null
|
|
1813
|
-
},
|
|
1814
|
-
scaleBackground: () => {
|
|
1815
|
-
},
|
|
1816
|
-
onPress: () => {
|
|
1817
|
-
},
|
|
1818
|
-
onRelease: () => {
|
|
1819
|
-
},
|
|
1820
|
-
onDrag: () => {
|
|
1821
|
-
},
|
|
1822
|
-
onNestedDrag: () => {
|
|
1823
|
-
},
|
|
1824
|
-
onNestedOpenChange: () => {
|
|
1825
|
-
},
|
|
1826
|
-
onNestedRelease: () => {
|
|
1827
|
-
},
|
|
1828
|
-
openProp: void 0,
|
|
1829
|
-
dismissible: !1,
|
|
1830
|
-
handleOnly: !1,
|
|
1831
|
-
isOpen: !1,
|
|
1832
|
-
isDragging: !1,
|
|
1833
|
-
keyboardIsOpen: {
|
|
1834
|
-
current: !1
|
|
1835
|
-
},
|
|
1836
|
-
snapPointsOffset: null,
|
|
1837
|
-
snapPoints: null,
|
|
1838
|
-
modal: !1,
|
|
1839
|
-
shouldFade: !1,
|
|
1840
|
-
activeSnapPoint: null,
|
|
1841
|
-
onOpenChange: () => {
|
|
1842
|
-
},
|
|
1843
|
-
setActiveSnapPoint: () => {
|
|
1844
|
-
},
|
|
1845
|
-
visible: !1,
|
|
1846
|
-
closeDrawer: () => {
|
|
1847
|
-
},
|
|
1848
|
-
setVisible: () => {
|
|
1849
|
-
},
|
|
1850
|
-
direction: "bottom"
|
|
1851
|
-
}), wt = () => {
|
|
1852
|
-
const e = g.useContext(Jr);
|
|
1853
|
-
if (!e)
|
|
1854
|
-
throw new Error("useDrawerContext must be used within a Drawer.Root");
|
|
1855
|
-
return e;
|
|
1856
|
-
};
|
|
1857
|
-
Ji("[vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1)}[vaul-drawer][vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[vaul-drawer][vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[vaul-drawer][vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[vaul-drawer][vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}.vaul-dragging .vaul-scrollable [vault-drawer-direction=top]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=bottom]{overflow-y:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=left]{overflow-x:hidden!important}.vaul-dragging .vaul-scrollable [vault-drawer-direction=right]{overflow-x:hidden!important}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-drawer][vaul-drawer-visible=true][vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[vaul-overlay]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[vaul-overlay][vaul-drawer-visible=true]{opacity:1}[vaul-drawer]::after{content:'';position:absolute;background:inherit;background-color:inherit}[vaul-drawer][vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[vaul-drawer][vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[vaul-drawer][vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[vaul-handle]{display:block;position:relative;opacity:.8;margin-left:auto;margin-right:auto;height:5px;width:56px;border-radius:1rem;touch-action:pan-y;cursor:grab}[vaul-handle]:active,[vaul-handle]:hover{opacity:1}[vaul-handle]:active{cursor:grabbing}[vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}[vaul-overlay][vaul-snap-points=true]:not([vaul-snap-points-overlay=true]):not([data-state=closed]){opacity:0}[vaul-overlay][vaul-snap-points-overlay=true]:not([vaul-drawer-visible=false]){opacity:1}@media (hover:hover) and (pointer:fine){[vaul-drawer]{user-select:none}}@media (pointer:fine){[vaul-handle-hitarea]:{width:100%;height:100%}}");
|
|
1858
|
-
const Zr = typeof window < "u" ? pa : be;
|
|
1859
|
-
function Nt(...e) {
|
|
1860
|
-
return (...t) => {
|
|
1861
|
-
for (let n of e)
|
|
1862
|
-
typeof n == "function" && n(...t);
|
|
1863
|
-
};
|
|
1864
|
-
}
|
|
1865
|
-
function Zi() {
|
|
1866
|
-
return Yt(/^Mac/);
|
|
1867
|
-
}
|
|
1868
|
-
function el() {
|
|
1869
|
-
return Yt(/^iPhone/);
|
|
1870
|
-
}
|
|
1871
|
-
function tl() {
|
|
1872
|
-
return Yt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
1873
|
-
Zi() && navigator.maxTouchPoints > 1;
|
|
1874
|
-
}
|
|
1875
|
-
function eo() {
|
|
1876
|
-
return el() || tl();
|
|
1877
|
-
}
|
|
1878
|
-
function Yt(e) {
|
|
1879
|
-
return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
|
|
1880
|
-
}
|
|
1881
|
-
const St = typeof document < "u" && window.visualViewport;
|
|
1882
|
-
function bn(e) {
|
|
1883
|
-
let t = window.getComputedStyle(e);
|
|
1884
|
-
return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
|
|
1885
|
-
}
|
|
1886
|
-
function to(e) {
|
|
1887
|
-
for (bn(e) && (e = e.parentElement); e && !bn(e); )
|
|
1888
|
-
e = e.parentElement;
|
|
1889
|
-
return e || document.scrollingElement || document.documentElement;
|
|
1890
|
-
}
|
|
1891
|
-
const nl = /* @__PURE__ */ new Set([
|
|
1892
|
-
"checkbox",
|
|
1893
|
-
"radio",
|
|
1894
|
-
"range",
|
|
1895
|
-
"color",
|
|
1896
|
-
"file",
|
|
1897
|
-
"image",
|
|
1898
|
-
"button",
|
|
1899
|
-
"submit",
|
|
1900
|
-
"reset"
|
|
1901
|
-
]);
|
|
1902
|
-
let ut = 0, Et;
|
|
1903
|
-
function rl(e = {}) {
|
|
1904
|
-
let { isDisabled: t } = e;
|
|
1905
|
-
Zr(() => {
|
|
1906
|
-
if (!t)
|
|
1907
|
-
return ut++, ut === 1 && (eo() ? Et = al() : Et = ol()), () => {
|
|
1908
|
-
ut--, ut === 0 && Et();
|
|
1909
|
-
};
|
|
1910
|
-
}, [
|
|
1911
|
-
t
|
|
1912
|
-
]);
|
|
1913
|
-
}
|
|
1914
|
-
function ol() {
|
|
1915
|
-
return Nt(no(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
1916
|
-
}
|
|
1917
|
-
function al() {
|
|
1918
|
-
let e, t = 0, n = (c) => {
|
|
1919
|
-
e = to(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
|
|
1920
|
-
}, r = (c) => {
|
|
1921
|
-
if (!e || e === document.documentElement || e === document.body) {
|
|
1922
|
-
c.preventDefault();
|
|
1923
|
-
return;
|
|
1924
|
-
}
|
|
1925
|
-
let d = c.changedTouches[0].pageY, f = e.scrollTop, y = e.scrollHeight - e.clientHeight;
|
|
1926
|
-
y !== 0 && ((f <= 0 && d > t || f >= y && d < t) && c.preventDefault(), t = d);
|
|
1927
|
-
}, a = (c) => {
|
|
1928
|
-
let d = c.target;
|
|
1929
|
-
Pt(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
|
|
1930
|
-
d.style.transform = "";
|
|
1931
|
-
}));
|
|
1932
|
-
}, s = (c) => {
|
|
1933
|
-
let d = c.target;
|
|
1934
|
-
Pt(d) && (d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
|
|
1935
|
-
d.style.transform = "", St && (St.height < window.innerHeight ? requestAnimationFrame(() => {
|
|
1936
|
-
xn(d);
|
|
1937
|
-
}) : St.addEventListener("resize", () => xn(d), {
|
|
1938
|
-
once: !0
|
|
1939
|
-
}));
|
|
1940
|
-
}));
|
|
1941
|
-
}, i = () => {
|
|
1942
|
-
window.scrollTo(0, 0);
|
|
1943
|
-
}, l = window.pageXOffset, u = window.pageYOffset, v = Nt(no(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
|
|
1944
|
-
window.scrollTo(0, 0);
|
|
1945
|
-
let m = Nt(Ve(document, "touchstart", n, {
|
|
1946
|
-
passive: !1,
|
|
1947
|
-
capture: !0
|
|
1948
|
-
}), Ve(document, "touchmove", r, {
|
|
1949
|
-
passive: !1,
|
|
1950
|
-
capture: !0
|
|
1951
|
-
}), Ve(document, "touchend", a, {
|
|
1952
|
-
passive: !1,
|
|
1953
|
-
capture: !0
|
|
1954
|
-
}), Ve(document, "focus", s, !0), Ve(window, "scroll", i));
|
|
1955
|
-
return () => {
|
|
1956
|
-
v(), m(), window.scrollTo(l, u);
|
|
1957
|
-
};
|
|
1958
|
-
}
|
|
1959
|
-
function no(e, t, n) {
|
|
1960
|
-
let r = e.style[t];
|
|
1961
|
-
return e.style[t] = n, () => {
|
|
1962
|
-
e.style[t] = r;
|
|
1963
|
-
};
|
|
1964
|
-
}
|
|
1965
|
-
function Ve(e, t, n, r) {
|
|
1966
|
-
return e.addEventListener(t, n, r), () => {
|
|
1967
|
-
e.removeEventListener(t, n, r);
|
|
1968
|
-
};
|
|
1969
|
-
}
|
|
1970
|
-
function xn(e) {
|
|
1971
|
-
let t = document.scrollingElement || document.documentElement;
|
|
1972
|
-
for (; e && e !== t; ) {
|
|
1973
|
-
let n = to(e);
|
|
1974
|
-
if (n !== document.documentElement && n !== document.body && n !== e) {
|
|
1975
|
-
let r = n.getBoundingClientRect().top, a = e.getBoundingClientRect().top, s = e.getBoundingClientRect().bottom;
|
|
1976
|
-
const i = n.getBoundingClientRect().bottom;
|
|
1977
|
-
s > i && (n.scrollTop += a - r);
|
|
1978
|
-
}
|
|
1979
|
-
e = n.parentElement;
|
|
1980
|
-
}
|
|
1981
|
-
}
|
|
1982
|
-
function Pt(e) {
|
|
1983
|
-
return e instanceof HTMLInputElement && !nl.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
|
|
1984
|
-
}
|
|
1985
|
-
function sl(e, t) {
|
|
1986
|
-
typeof e == "function" ? e(t) : e != null && (e.current = t);
|
|
1987
|
-
}
|
|
1988
|
-
function il(...e) {
|
|
1989
|
-
return (t) => e.forEach((n) => sl(n, t));
|
|
1990
|
-
}
|
|
1991
|
-
function ro(...e) {
|
|
1992
|
-
return h.useCallback(il(...e), e);
|
|
1993
|
-
}
|
|
1994
|
-
let Qe = null;
|
|
1995
|
-
function ll({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: a, noBodyStyles: s }) {
|
|
1996
|
-
const [i, l] = g.useState(() => typeof window < "u" ? window.location.href : ""), u = g.useRef(0), v = g.useCallback(() => {
|
|
1997
|
-
if (Qe === null && e && !s) {
|
|
1998
|
-
Qe = {
|
|
1999
|
-
position: document.body.style.position,
|
|
2000
|
-
top: document.body.style.top,
|
|
2001
|
-
left: document.body.style.left,
|
|
2002
|
-
height: document.body.style.height,
|
|
2003
|
-
right: "unset"
|
|
2004
|
-
};
|
|
2005
|
-
const { scrollX: c, innerHeight: d } = window;
|
|
2006
|
-
document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
|
|
2007
|
-
top: `${-u.current}px`,
|
|
2008
|
-
left: `${-c}px`,
|
|
2009
|
-
right: "0px",
|
|
2010
|
-
height: "auto"
|
|
2011
|
-
}), window.setTimeout(() => window.requestAnimationFrame(() => {
|
|
2012
|
-
const f = d - window.innerHeight;
|
|
2013
|
-
f && u.current >= d && (document.body.style.top = `${-(u.current + f)}px`);
|
|
2014
|
-
}), 300);
|
|
2015
|
-
}
|
|
2016
|
-
}, [
|
|
2017
|
-
e
|
|
2018
|
-
]), m = g.useCallback(() => {
|
|
2019
|
-
if (Qe !== null && !s) {
|
|
2020
|
-
const c = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
|
|
2021
|
-
Object.assign(document.body.style, Qe), window.requestAnimationFrame(() => {
|
|
2022
|
-
if (a && i !== window.location.href) {
|
|
2023
|
-
l(window.location.href);
|
|
2024
|
-
return;
|
|
2025
|
-
}
|
|
2026
|
-
window.scrollTo(d, c);
|
|
2027
|
-
}), Qe = null;
|
|
2028
|
-
}
|
|
2029
|
-
}, [
|
|
2030
|
-
i
|
|
2031
|
-
]);
|
|
2032
|
-
return g.useEffect(() => {
|
|
2033
|
-
function c() {
|
|
2034
|
-
u.current = window.scrollY;
|
|
2035
|
-
}
|
|
2036
|
-
return c(), window.addEventListener("scroll", c), () => {
|
|
2037
|
-
window.removeEventListener("scroll", c);
|
|
2038
|
-
};
|
|
2039
|
-
}, []), g.useEffect(() => {
|
|
2040
|
-
n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && v(), t || window.setTimeout(() => {
|
|
2041
|
-
m();
|
|
2042
|
-
}, 500)) : m());
|
|
2043
|
-
}, [
|
|
2044
|
-
e,
|
|
2045
|
-
r,
|
|
2046
|
-
i,
|
|
2047
|
-
t,
|
|
2048
|
-
n,
|
|
2049
|
-
v,
|
|
2050
|
-
m
|
|
2051
|
-
]), {
|
|
2052
|
-
restorePositionSetting: m
|
|
2053
|
-
};
|
|
2054
|
-
}
|
|
2055
|
-
const oo = /* @__PURE__ */ new WeakMap();
|
|
2056
|
-
function I(e, t, n = !1) {
|
|
2057
|
-
if (!e || !(e instanceof HTMLElement)) return;
|
|
2058
|
-
let r = {};
|
|
2059
|
-
Object.entries(t).forEach(([a, s]) => {
|
|
2060
|
-
if (a.startsWith("--")) {
|
|
2061
|
-
e.style.setProperty(a, s);
|
|
2062
|
-
return;
|
|
2063
|
-
}
|
|
2064
|
-
r[a] = e.style[a], e.style[a] = s;
|
|
2065
|
-
}), !n && oo.set(e, r);
|
|
2066
|
-
}
|
|
2067
|
-
function dt(e, t) {
|
|
2068
|
-
if (!e || !(e instanceof HTMLElement)) return;
|
|
2069
|
-
let n = oo.get(e);
|
|
2070
|
-
n && (t ? e.style[t] = n[t] : Object.entries(n).forEach(([r, a]) => {
|
|
2071
|
-
e.style[r] = a;
|
|
2072
|
-
}));
|
|
2073
|
-
}
|
|
2074
|
-
const z = (e) => {
|
|
2075
|
-
switch (e) {
|
|
2076
|
-
case "top":
|
|
2077
|
-
case "bottom":
|
|
2078
|
-
return !0;
|
|
2079
|
-
case "left":
|
|
2080
|
-
case "right":
|
|
2081
|
-
return !1;
|
|
2082
|
-
default:
|
|
2083
|
-
return e;
|
|
2084
|
-
}
|
|
2085
|
-
};
|
|
2086
|
-
function ft(e, t) {
|
|
2087
|
-
if (!e)
|
|
2088
|
-
return null;
|
|
2089
|
-
const n = window.getComputedStyle(e), r = (
|
|
2090
|
-
// @ts-ignore
|
|
2091
|
-
n.transform || n.webkitTransform || n.mozTransform
|
|
2092
|
-
);
|
|
2093
|
-
let a = r.match(/^matrix3d\((.+)\)$/);
|
|
2094
|
-
return a ? parseFloat(a[1].split(", ")[z(t) ? 13 : 12]) : (a = r.match(/^matrix\((.+)\)$/), a ? parseFloat(a[1].split(", ")[z(t) ? 5 : 4]) : null);
|
|
2095
|
-
}
|
|
2096
|
-
function cl(e) {
|
|
2097
|
-
return 8 * (Math.log(e + 1) - 2);
|
|
2098
|
-
}
|
|
2099
|
-
const T = {
|
|
2100
|
-
DURATION: 0.5,
|
|
2101
|
-
EASE: [
|
|
2102
|
-
0.32,
|
|
2103
|
-
0.72,
|
|
2104
|
-
0,
|
|
2105
|
-
1
|
|
2106
|
-
]
|
|
2107
|
-
}, ao = 0.4;
|
|
2108
|
-
function so(e) {
|
|
2109
|
-
const t = g.useRef(e);
|
|
2110
|
-
return g.useEffect(() => {
|
|
2111
|
-
t.current = e;
|
|
2112
|
-
}), g.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
|
|
2113
|
-
}
|
|
2114
|
-
function ul({ defaultProp: e, onChange: t }) {
|
|
2115
|
-
const n = g.useState(e), [r] = n, a = g.useRef(r), s = so(t);
|
|
2116
|
-
return g.useEffect(() => {
|
|
2117
|
-
a.current !== r && (s(r), a.current = r);
|
|
2118
|
-
}, [
|
|
2119
|
-
r,
|
|
2120
|
-
a,
|
|
2121
|
-
s
|
|
2122
|
-
]), n;
|
|
2123
|
-
}
|
|
2124
|
-
function dl({ prop: e, defaultProp: t, onChange: n = () => {
|
|
2125
|
-
} }) {
|
|
2126
|
-
const [r, a] = ul({
|
|
2127
|
-
defaultProp: t,
|
|
2128
|
-
onChange: n
|
|
2129
|
-
}), s = e !== void 0, i = s ? e : r, l = so(n), u = g.useCallback((v) => {
|
|
2130
|
-
if (s) {
|
|
2131
|
-
const c = typeof v == "function" ? v(e) : v;
|
|
2132
|
-
c !== e && l(c);
|
|
2133
|
-
} else
|
|
2134
|
-
a(v);
|
|
2135
|
-
}, [
|
|
2136
|
-
s,
|
|
2137
|
-
e,
|
|
2138
|
-
a,
|
|
2139
|
-
l
|
|
2140
|
-
]);
|
|
2141
|
-
return [
|
|
2142
|
-
i,
|
|
2143
|
-
u
|
|
2144
|
-
];
|
|
2145
|
-
}
|
|
2146
|
-
function fl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: a, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom" }) {
|
|
2147
|
-
const [u, v] = dl({
|
|
2148
|
-
prop: e,
|
|
2149
|
-
defaultProp: n == null ? void 0 : n[0],
|
|
2150
|
-
onChange: t
|
|
2151
|
-
}), m = g.useMemo(() => u === (n == null ? void 0 : n[n.length - 1]) || null, [
|
|
2152
|
-
n,
|
|
2153
|
-
u
|
|
2154
|
-
]), c = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === u || !n, d = g.useMemo(() => n == null ? void 0 : n.findIndex((x) => x === u), [
|
|
2155
|
-
n,
|
|
2156
|
-
u
|
|
2157
|
-
]), f = g.useMemo(() => {
|
|
2158
|
-
var x;
|
|
2159
|
-
return (x = n == null ? void 0 : n.map((p) => {
|
|
2160
|
-
const C = typeof window < "u", N = typeof p == "string";
|
|
2161
|
-
let P = 0;
|
|
2162
|
-
if (N && (P = parseInt(p, 10)), z(l)) {
|
|
2163
|
-
const w = N ? P : C ? p * window.innerHeight : 0;
|
|
2164
|
-
return C ? l === "bottom" ? window.innerHeight - w : -window.innerHeight + w : w;
|
|
2165
|
-
}
|
|
2166
|
-
const _ = N ? P : C ? p * window.innerWidth : 0;
|
|
2167
|
-
return C ? l === "right" ? window.innerWidth - _ : -window.innerWidth + _ : _;
|
|
2168
|
-
})) != null ? x : [];
|
|
2169
|
-
}, [
|
|
2170
|
-
n
|
|
2171
|
-
]), y = g.useMemo(() => d !== null ? f == null ? void 0 : f[d] : null, [
|
|
2172
|
-
f,
|
|
2173
|
-
d
|
|
2174
|
-
]), R = g.useCallback((x) => {
|
|
2175
|
-
var p;
|
|
2176
|
-
const C = (p = f == null ? void 0 : f.findIndex((N) => N === x)) != null ? p : null;
|
|
2177
|
-
i(C), I(r.current, {
|
|
2178
|
-
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2179
|
-
transform: z(l) ? `translate3d(0, ${x}px, 0)` : `translate3d(${x}px, 0, 0)`
|
|
2180
|
-
}), f && C !== f.length - 1 && C !== s ? I(a.current, {
|
|
2181
|
-
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2182
|
-
opacity: "0"
|
|
2183
|
-
}) : I(a.current, {
|
|
2184
|
-
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2185
|
-
opacity: "1"
|
|
2186
|
-
}), v(C !== null ? n == null ? void 0 : n[C] : null);
|
|
2187
|
-
}, [
|
|
2188
|
-
r.current,
|
|
2189
|
-
n,
|
|
2190
|
-
f,
|
|
2191
|
-
s,
|
|
2192
|
-
a,
|
|
2193
|
-
v
|
|
2194
|
-
]);
|
|
2195
|
-
g.useEffect(() => {
|
|
2196
|
-
if (u || e) {
|
|
2197
|
-
var x;
|
|
2198
|
-
const p = (x = n == null ? void 0 : n.findIndex((C) => C === e || C === u)) != null ? x : -1;
|
|
2199
|
-
f && p !== -1 && typeof f[p] == "number" && R(f[p]);
|
|
2200
|
-
}
|
|
2201
|
-
}, [
|
|
2202
|
-
u,
|
|
2203
|
-
e,
|
|
2204
|
-
n,
|
|
2205
|
-
f,
|
|
2206
|
-
R
|
|
2207
|
-
]);
|
|
2208
|
-
function K({ draggedDistance: x, closeDrawer: p, velocity: C, dismissible: N }) {
|
|
2209
|
-
if (s === void 0) return;
|
|
2210
|
-
const P = l === "bottom" || l === "right" ? (y ?? 0) - x : (y ?? 0) + x, _ = d === s - 1, w = d === 0, L = x > 0;
|
|
2211
|
-
if (_ && I(a.current, {
|
|
2212
|
-
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2213
|
-
}), C > 2 && !L) {
|
|
2214
|
-
N ? p() : R(f[0]);
|
|
2215
|
-
return;
|
|
2216
|
-
}
|
|
2217
|
-
if (C > 2 && L && f && n) {
|
|
2218
|
-
R(f[n.length - 1]);
|
|
2219
|
-
return;
|
|
2220
|
-
}
|
|
2221
|
-
const te = f == null ? void 0 : f.reduce((V, X) => typeof V != "number" || typeof X != "number" ? V : Math.abs(X - P) < Math.abs(V - P) ? X : V), Q = z(l) ? window.innerHeight : window.innerWidth;
|
|
2222
|
-
if (C > ao && Math.abs(x) < Q * 0.4) {
|
|
2223
|
-
const V = L ? 1 : -1;
|
|
2224
|
-
if (V > 0 && m) {
|
|
2225
|
-
R(f[n.length - 1]);
|
|
2226
|
-
return;
|
|
2227
|
-
}
|
|
2228
|
-
if (w && V < 0 && N && p(), d === null) return;
|
|
2229
|
-
R(f[d + V]);
|
|
917
|
+
}, tt = () => {
|
|
918
|
+
const t = F(), [e, r] = Q(!1), s = Be(() => r(!1), []);
|
|
919
|
+
_(() => {
|
|
920
|
+
if (e)
|
|
2230
921
|
return;
|
|
922
|
+
function i(o) {
|
|
923
|
+
o.key === "k" && (o.metaKey || o.ctrlKey) && (o.preventDefault(), r(!0));
|
|
2231
924
|
}
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
function H({ draggedDistance: x }) {
|
|
2235
|
-
if (y === null) return;
|
|
2236
|
-
const p = l === "bottom" || l === "right" ? y - x : y + x;
|
|
2237
|
-
(l === "bottom" || l === "right") && p < f[f.length - 1] || (l === "top" || l === "left") && p > f[f.length - 1] || I(r.current, {
|
|
2238
|
-
transform: z(l) ? `translate3d(0, ${p}px, 0)` : `translate3d(${p}px, 0, 0)`
|
|
2239
|
-
});
|
|
2240
|
-
}
|
|
2241
|
-
function q(x, p) {
|
|
2242
|
-
if (!n || typeof d != "number" || !f || s === void 0) return null;
|
|
2243
|
-
const C = d === s - 1;
|
|
2244
|
-
if (d >= s && p)
|
|
2245
|
-
return 0;
|
|
2246
|
-
if (C && !p) return 1;
|
|
2247
|
-
if (!c && !C) return null;
|
|
2248
|
-
const P = C ? d + 1 : d - 1, _ = C ? f[P] - f[P - 1] : f[P + 1] - f[P], w = x / Math.abs(_);
|
|
2249
|
-
return C ? 1 - w : w;
|
|
2250
|
-
}
|
|
2251
|
-
return {
|
|
2252
|
-
isLastSnapPoint: m,
|
|
2253
|
-
activeSnapPoint: u,
|
|
2254
|
-
shouldFade: c,
|
|
2255
|
-
getPercentageDragged: q,
|
|
2256
|
-
setActiveSnapPoint: v,
|
|
2257
|
-
activeSnapPointIndex: d,
|
|
2258
|
-
onRelease: K,
|
|
2259
|
-
onDrag: H,
|
|
2260
|
-
snapPointsOffset: f
|
|
2261
|
-
};
|
|
2262
|
-
}
|
|
2263
|
-
const hl = 0.25, pl = 100, yn = 8, Ne = 16, Mn = 26, Ct = "vaul-dragging";
|
|
2264
|
-
function io({ open: e, onOpenChange: t, children: n, shouldScaleBackground: r, onDrag: a, onRelease: s, snapPoints: i, nested: l = !1, setBackgroundColorOnScale: u = !0, closeThreshold: v = hl, scrollLockTimeout: m = pl, dismissible: c = !0, handleOnly: d = !1, fadeFromIndex: f = i && i.length - 1, activeSnapPoint: y, setActiveSnapPoint: R, fixed: K, modal: H = !0, onClose: q, noBodyStyles: x, direction: p = "bottom", preventScrollRestoration: C = !0, disablePreventScroll: N = !1 }) {
|
|
2265
|
-
var P;
|
|
2266
|
-
const [_ = !1, w] = g.useState(!1), [L, te] = g.useState(!1), [Q, V] = g.useState(!1), [X, Oe] = g.useState(!1), [he, Be] = g.useState(!1), [xe, E] = g.useState(!1), U = g.useRef(null), Y = g.useRef(null), ne = g.useRef(null), De = g.useRef(null), pe = g.useRef(null), ye = g.useRef(!1), me = g.useRef(null), le = g.useRef(0), ge = g.useRef(!1), re = g.useRef(0), M = g.useRef(null), en = g.useRef(((P = M.current) == null ? void 0 : P.getBoundingClientRect().height) || 0), bt = g.useRef(0), xo = g.useCallback((S) => {
|
|
2267
|
-
i && S === Ke.length - 1 && (Y.current = /* @__PURE__ */ new Date());
|
|
2268
|
-
}, []), { activeSnapPoint: yo, activeSnapPointIndex: ze, setActiveSnapPoint: tn, onRelease: Mo, snapPointsOffset: Ke, onDrag: So, shouldFade: nn, getPercentageDragged: Eo } = fl({
|
|
2269
|
-
snapPoints: i,
|
|
2270
|
-
activeSnapPointProp: y,
|
|
2271
|
-
setActiveSnapPointProp: R,
|
|
2272
|
-
drawerRef: M,
|
|
2273
|
-
fadeFromIndex: f,
|
|
2274
|
-
overlayRef: U,
|
|
2275
|
-
onSnapPointChange: xo,
|
|
2276
|
-
direction: p
|
|
2277
|
-
});
|
|
2278
|
-
rl({
|
|
2279
|
-
isDisabled: !_ || he || !H || xe || !L || N
|
|
2280
|
-
});
|
|
2281
|
-
const { restorePositionSetting: Co } = ll({
|
|
2282
|
-
isOpen: _,
|
|
2283
|
-
modal: H,
|
|
2284
|
-
nested: l,
|
|
2285
|
-
hasBeenOpened: L,
|
|
2286
|
-
preventScrollRestoration: C,
|
|
2287
|
-
noBodyStyles: x
|
|
2288
|
-
});
|
|
2289
|
-
function Ie() {
|
|
2290
|
-
return (window.innerWidth - Mn) / window.innerWidth;
|
|
2291
|
-
}
|
|
2292
|
-
function Ro(S) {
|
|
2293
|
-
var D;
|
|
2294
|
-
!c && !i || M.current && !M.current.contains(S.target) || (en.current = ((D = M.current) == null ? void 0 : D.getBoundingClientRect().height) || 0, Be(!0), ne.current = /* @__PURE__ */ new Date(), eo() && window.addEventListener("touchend", () => ye.current = !1, {
|
|
2295
|
-
once: !0
|
|
2296
|
-
}), S.target.setPointerCapture(S.pointerId), le.current = z(p) ? S.clientY : S.clientX);
|
|
2297
|
-
}
|
|
2298
|
-
function rn(S, D) {
|
|
2299
|
-
var k;
|
|
2300
|
-
let j = S;
|
|
2301
|
-
const F = (k = window.getSelection()) == null ? void 0 : k.toString(), B = M.current ? ft(M.current, p) : null, oe = /* @__PURE__ */ new Date();
|
|
2302
|
-
if (j.hasAttribute("data-vaul-no-drag") || j.closest("[data-vaul-no-drag]"))
|
|
2303
|
-
return !1;
|
|
2304
|
-
if (p === "right" || p === "left")
|
|
2305
|
-
return !0;
|
|
2306
|
-
if (Y.current && oe.getTime() - Y.current.getTime() < 500)
|
|
2307
|
-
return !1;
|
|
2308
|
-
if (B !== null && (p === "bottom" ? B > 0 : B < 0))
|
|
2309
|
-
return !0;
|
|
2310
|
-
if (F && F.length > 0)
|
|
2311
|
-
return !1;
|
|
2312
|
-
if (pe.current && oe.getTime() - pe.current.getTime() < m && B === 0 || D)
|
|
2313
|
-
return pe.current = oe, !1;
|
|
2314
|
-
for (; j; ) {
|
|
2315
|
-
if (j.scrollHeight > j.clientHeight) {
|
|
2316
|
-
if (j.scrollTop !== 0)
|
|
2317
|
-
return pe.current = /* @__PURE__ */ new Date(), !1;
|
|
2318
|
-
if (j.getAttribute("role") === "dialog")
|
|
2319
|
-
return !0;
|
|
2320
|
-
}
|
|
2321
|
-
j = j.parentNode;
|
|
2322
|
-
}
|
|
2323
|
-
return !0;
|
|
2324
|
-
}
|
|
2325
|
-
function Do(S) {
|
|
2326
|
-
if (M.current && he) {
|
|
2327
|
-
const D = p === "bottom" || p === "right" ? 1 : -1, k = (le.current - (z(p) ? S.clientY : S.clientX)) * D, j = k > 0, F = i && !c && !j;
|
|
2328
|
-
if (F && ze === 0) return;
|
|
2329
|
-
const B = Math.abs(k), oe = document.querySelector("[vaul-drawer-wrapper]");
|
|
2330
|
-
let ce = B / en.current;
|
|
2331
|
-
const Me = Eo(B, j);
|
|
2332
|
-
if (Me !== null && (ce = Me), F && ce >= 1 || !ye.current && !rn(S.target, j)) return;
|
|
2333
|
-
if (M.current.classList.add(Ct), ye.current = !0, I(M.current, {
|
|
2334
|
-
transition: "none"
|
|
2335
|
-
}), I(U.current, {
|
|
2336
|
-
transition: "none"
|
|
2337
|
-
}), i && So({
|
|
2338
|
-
draggedDistance: k
|
|
2339
|
-
}), j && !i) {
|
|
2340
|
-
const je = cl(k), st = Math.min(je * -1, 0) * D;
|
|
2341
|
-
I(M.current, {
|
|
2342
|
-
transform: z(p) ? `translate3d(0, ${st}px, 0)` : `translate3d(${st}px, 0, 0)`
|
|
2343
|
-
});
|
|
2344
|
-
return;
|
|
2345
|
-
}
|
|
2346
|
-
const at = 1 - ce;
|
|
2347
|
-
if ((nn || f && ze === f - 1) && (a == null || a(S, ce), I(U.current, {
|
|
2348
|
-
opacity: `${at}`,
|
|
2349
|
-
transition: "none"
|
|
2350
|
-
}, !0)), oe && U.current && r) {
|
|
2351
|
-
const je = Math.min(Ie() + ce * (1 - Ie()), 1), st = 8 - ce * 8, an = Math.max(0, 14 - ce * 14);
|
|
2352
|
-
I(oe, {
|
|
2353
|
-
borderRadius: `${st}px`,
|
|
2354
|
-
transform: z(p) ? `scale(${je}) translate3d(0, ${an}px, 0)` : `scale(${je}) translate3d(${an}px, 0, 0)`,
|
|
2355
|
-
transition: "none"
|
|
2356
|
-
}, !0);
|
|
2357
|
-
}
|
|
2358
|
-
if (!i) {
|
|
2359
|
-
const je = B * D;
|
|
2360
|
-
I(M.current, {
|
|
2361
|
-
transform: z(p) ? `translate3d(0, ${je}px, 0)` : `translate3d(${je}px, 0, 0)`
|
|
2362
|
-
});
|
|
2363
|
-
}
|
|
2364
|
-
}
|
|
2365
|
-
}
|
|
2366
|
-
g.useEffect(() => () => {
|
|
2367
|
-
ot(!1), Co();
|
|
2368
|
-
}, []), g.useEffect(() => {
|
|
2369
|
-
var S;
|
|
2370
|
-
function D() {
|
|
2371
|
-
if (!M.current) return;
|
|
2372
|
-
const k = document.activeElement;
|
|
2373
|
-
if (Pt(k) || ge.current) {
|
|
2374
|
-
var j;
|
|
2375
|
-
const F = ((j = window.visualViewport) == null ? void 0 : j.height) || 0;
|
|
2376
|
-
let B = window.innerHeight - F;
|
|
2377
|
-
const oe = M.current.getBoundingClientRect().height || 0;
|
|
2378
|
-
bt.current || (bt.current = oe);
|
|
2379
|
-
const ce = M.current.getBoundingClientRect().top;
|
|
2380
|
-
if (Math.abs(re.current - B) > 60 && (ge.current = !ge.current), i && i.length > 0 && Ke && ze) {
|
|
2381
|
-
const Me = Ke[ze] || 0;
|
|
2382
|
-
B += Me;
|
|
2383
|
-
}
|
|
2384
|
-
if (re.current = B, oe > F || ge.current) {
|
|
2385
|
-
const Me = M.current.getBoundingClientRect().height;
|
|
2386
|
-
let at = Me;
|
|
2387
|
-
Me > F && (at = F - Mn), K ? M.current.style.height = `${Me - Math.max(B, 0)}px` : M.current.style.height = `${Math.max(at, F - ce)}px`;
|
|
2388
|
-
} else
|
|
2389
|
-
M.current.style.height = `${bt.current}px`;
|
|
2390
|
-
i && i.length > 0 && !ge.current ? M.current.style.bottom = "0px" : M.current.style.bottom = `${Math.max(B, 0)}px`;
|
|
2391
|
-
}
|
|
2392
|
-
}
|
|
2393
|
-
return (S = window.visualViewport) == null || S.addEventListener("resize", D), () => {
|
|
2394
|
-
var k;
|
|
2395
|
-
return (k = window.visualViewport) == null ? void 0 : k.removeEventListener("resize", D);
|
|
925
|
+
return window.addEventListener("keydown", i), () => {
|
|
926
|
+
window.removeEventListener("keydown", i);
|
|
2396
927
|
};
|
|
2397
|
-
}, [
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
]);
|
|
2402
|
-
function Ae() {
|
|
2403
|
-
M.current && (jo(), q == null || q(), I(M.current, {
|
|
2404
|
-
transform: z(p) ? `translate3d(0, ${p === "bottom" ? "100%" : "-100%"}, 0)` : `translate3d(${p === "right" ? "100%" : "-100%"}, 0, 0)`,
|
|
2405
|
-
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2406
|
-
}), I(U.current, {
|
|
2407
|
-
opacity: "0",
|
|
2408
|
-
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2409
|
-
}), ot(!1), setTimeout(() => {
|
|
2410
|
-
V(!1), w(!1);
|
|
2411
|
-
}, 300), setTimeout(() => {
|
|
2412
|
-
i && tn(i[0]);
|
|
2413
|
-
}, T.DURATION * 1e3));
|
|
2414
|
-
}
|
|
2415
|
-
g.useEffect(() => {
|
|
2416
|
-
if (!_ && r) {
|
|
2417
|
-
const S = setTimeout(() => {
|
|
2418
|
-
dt(document.body);
|
|
2419
|
-
}, 200);
|
|
2420
|
-
return () => clearTimeout(S);
|
|
2421
|
-
}
|
|
2422
|
-
}, [
|
|
2423
|
-
_,
|
|
2424
|
-
r
|
|
2425
|
-
]), Zr(() => {
|
|
2426
|
-
e ? (w(!0), te(!0)) : Ae();
|
|
2427
|
-
}, [
|
|
2428
|
-
e
|
|
2429
|
-
]), g.useEffect(() => {
|
|
2430
|
-
X && (t == null || t(_));
|
|
2431
|
-
}, [
|
|
2432
|
-
_
|
|
2433
|
-
]), g.useEffect(() => {
|
|
2434
|
-
Oe(!0);
|
|
2435
|
-
}, []);
|
|
2436
|
-
function on() {
|
|
2437
|
-
if (!M.current) return;
|
|
2438
|
-
const S = document.querySelector("[vaul-drawer-wrapper]"), D = ft(M.current, p);
|
|
2439
|
-
I(M.current, {
|
|
2440
|
-
transform: "translate3d(0, 0, 0)",
|
|
2441
|
-
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`
|
|
2442
|
-
}), I(U.current, {
|
|
2443
|
-
transition: `opacity ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2444
|
-
opacity: "1"
|
|
2445
|
-
}), r && D && D > 0 && _ && I(S, {
|
|
2446
|
-
borderRadius: `${yn}px`,
|
|
2447
|
-
overflow: "hidden",
|
|
2448
|
-
...z(p) ? {
|
|
2449
|
-
transform: `scale(${Ie()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2450
|
-
transformOrigin: "top"
|
|
2451
|
-
} : {
|
|
2452
|
-
transform: `scale(${Ie()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
2453
|
-
transformOrigin: "left"
|
|
2454
|
-
},
|
|
2455
|
-
transitionProperty: "transform, border-radius",
|
|
2456
|
-
transitionDuration: `${T.DURATION}s`,
|
|
2457
|
-
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2458
|
-
}, !0);
|
|
2459
|
-
}
|
|
2460
|
-
function jo() {
|
|
2461
|
-
!he || !M.current || (M.current.classList.remove(Ct), ye.current = !1, Be(!1), De.current = /* @__PURE__ */ new Date());
|
|
2462
|
-
}
|
|
2463
|
-
function No(S) {
|
|
2464
|
-
if (!he || !M.current) return;
|
|
2465
|
-
M.current.classList.remove(Ct), ye.current = !1, Be(!1), De.current = /* @__PURE__ */ new Date();
|
|
2466
|
-
const D = ft(M.current, p);
|
|
2467
|
-
if (!rn(S.target, !1) || !D || Number.isNaN(D) || ne.current === null) return;
|
|
2468
|
-
const k = De.current.getTime() - ne.current.getTime(), j = le.current - (z(p) ? S.clientY : S.clientX), F = Math.abs(j) / k;
|
|
2469
|
-
if (F > 0.05 && (E(!0), setTimeout(() => {
|
|
2470
|
-
E(!1);
|
|
2471
|
-
}, 200)), i) {
|
|
2472
|
-
Mo({
|
|
2473
|
-
draggedDistance: j * (p === "bottom" || p === "right" ? 1 : -1),
|
|
2474
|
-
closeDrawer: Ae,
|
|
2475
|
-
velocity: F,
|
|
2476
|
-
dismissible: c
|
|
2477
|
-
}), s == null || s(S, !0);
|
|
2478
|
-
return;
|
|
2479
|
-
}
|
|
2480
|
-
if (p === "bottom" || p === "right" ? j > 0 : j < 0) {
|
|
2481
|
-
on(), s == null || s(S, !0);
|
|
2482
|
-
return;
|
|
2483
|
-
}
|
|
2484
|
-
if (F > ao) {
|
|
2485
|
-
Ae(), s == null || s(S, !1);
|
|
2486
|
-
return;
|
|
2487
|
-
}
|
|
2488
|
-
var B;
|
|
2489
|
-
const oe = Math.min((B = M.current.getBoundingClientRect().height) != null ? B : 0, window.innerHeight);
|
|
2490
|
-
if (D >= oe * v) {
|
|
2491
|
-
Ae(), s == null || s(S, !1);
|
|
2492
|
-
return;
|
|
2493
|
-
}
|
|
2494
|
-
s == null || s(S, !0), on();
|
|
2495
|
-
}
|
|
2496
|
-
g.useEffect(() => {
|
|
2497
|
-
_ && (I(document.documentElement, {
|
|
2498
|
-
scrollBehavior: "auto"
|
|
2499
|
-
}), Y.current = /* @__PURE__ */ new Date(), ot(!0));
|
|
2500
|
-
}, [
|
|
2501
|
-
_
|
|
2502
|
-
]), g.useEffect(() => {
|
|
2503
|
-
if (M.current && Q) {
|
|
2504
|
-
var S;
|
|
2505
|
-
const D = M == null || (S = M.current) == null ? void 0 : S.querySelectorAll("*");
|
|
2506
|
-
D == null || D.forEach((k) => {
|
|
2507
|
-
const j = k;
|
|
2508
|
-
(j.scrollHeight > j.clientHeight || j.scrollWidth > j.clientWidth) && j.classList.add("vaul-scrollable");
|
|
2509
|
-
});
|
|
2510
|
-
}
|
|
2511
|
-
}, [
|
|
2512
|
-
Q
|
|
2513
|
-
]);
|
|
2514
|
-
function ot(S) {
|
|
2515
|
-
const D = document.querySelector("[vaul-drawer-wrapper]");
|
|
2516
|
-
!D || !r || (S ? (u && (x || (I(document.body, {
|
|
2517
|
-
background: document.body.style.backgroundColor || document.body.style.background
|
|
2518
|
-
}), I(document.body, {
|
|
2519
|
-
background: "black"
|
|
2520
|
-
}, !0))), I(D, {
|
|
2521
|
-
borderRadius: `${yn}px`,
|
|
2522
|
-
overflow: "hidden",
|
|
2523
|
-
...z(p) ? {
|
|
2524
|
-
transform: `scale(${Ie()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
|
|
2525
|
-
transformOrigin: "top"
|
|
2526
|
-
} : {
|
|
2527
|
-
transform: `scale(${Ie()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
|
|
2528
|
-
transformOrigin: "left"
|
|
2529
|
-
},
|
|
2530
|
-
transitionProperty: "transform, border-radius",
|
|
2531
|
-
transitionDuration: `${T.DURATION}s`,
|
|
2532
|
-
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2533
|
-
})) : (dt(D, "overflow"), dt(D, "transform"), dt(D, "borderRadius"), I(D, {
|
|
2534
|
-
transitionProperty: "transform, border-radius",
|
|
2535
|
-
transitionDuration: `${T.DURATION}s`,
|
|
2536
|
-
transitionTimingFunction: `cubic-bezier(${T.EASE.join(",")})`
|
|
2537
|
-
})));
|
|
2538
|
-
}
|
|
2539
|
-
function Po(S) {
|
|
2540
|
-
const D = S ? (window.innerWidth - Ne) / window.innerWidth : 1, k = S ? -Ne : 0;
|
|
2541
|
-
me.current && window.clearTimeout(me.current), I(M.current, {
|
|
2542
|
-
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2543
|
-
transform: `scale(${D}) translate3d(0, ${k}px, 0)`
|
|
2544
|
-
}), !S && M.current && (me.current = setTimeout(() => {
|
|
2545
|
-
const j = ft(M.current, p);
|
|
2546
|
-
I(M.current, {
|
|
2547
|
-
transition: "none",
|
|
2548
|
-
transform: z(p) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
|
|
2549
|
-
});
|
|
2550
|
-
}, 500));
|
|
2551
|
-
}
|
|
2552
|
-
function To(S, D) {
|
|
2553
|
-
if (D < 0) return;
|
|
2554
|
-
const k = z(p) ? window.innerHeight : window.innerWidth, j = (k - Ne) / k, F = j + D * (1 - j), B = -Ne + D * Ne;
|
|
2555
|
-
I(M.current, {
|
|
2556
|
-
transform: z(p) ? `scale(${F}) translate3d(0, ${B}px, 0)` : `scale(${F}) translate3d(${B}px, 0, 0)`,
|
|
2557
|
-
transition: "none"
|
|
2558
|
-
});
|
|
2559
|
-
}
|
|
2560
|
-
function _o(S, D) {
|
|
2561
|
-
const k = z(p) ? window.innerHeight : window.innerWidth, j = D ? (k - Ne) / k : 1, F = D ? -Ne : 0;
|
|
2562
|
-
D && I(M.current, {
|
|
2563
|
-
transition: `transform ${T.DURATION}s cubic-bezier(${T.EASE.join(",")})`,
|
|
2564
|
-
transform: z(p) ? `scale(${j}) translate3d(0, ${F}px, 0)` : `scale(${j}) translate3d(${F}px, 0, 0)`
|
|
2565
|
-
});
|
|
2566
|
-
}
|
|
2567
|
-
return /* @__PURE__ */ g.createElement(Xa, {
|
|
2568
|
-
modal: H,
|
|
2569
|
-
onOpenChange: (S) => {
|
|
2570
|
-
if (e !== void 0) {
|
|
2571
|
-
t == null || t(S);
|
|
2572
|
-
return;
|
|
2573
|
-
}
|
|
2574
|
-
S ? (te(!0), w(S)) : Ae();
|
|
2575
|
-
},
|
|
2576
|
-
open: _
|
|
2577
|
-
}, /* @__PURE__ */ g.createElement(Jr.Provider, {
|
|
2578
|
-
value: {
|
|
2579
|
-
visible: Q,
|
|
2580
|
-
activeSnapPoint: yo,
|
|
2581
|
-
snapPoints: i,
|
|
2582
|
-
setActiveSnapPoint: tn,
|
|
2583
|
-
drawerRef: M,
|
|
2584
|
-
overlayRef: U,
|
|
2585
|
-
scaleBackground: ot,
|
|
2586
|
-
onOpenChange: t,
|
|
2587
|
-
onPress: Ro,
|
|
2588
|
-
setVisible: V,
|
|
2589
|
-
onRelease: No,
|
|
2590
|
-
onDrag: Do,
|
|
2591
|
-
dismissible: c,
|
|
2592
|
-
handleOnly: d,
|
|
2593
|
-
isOpen: _,
|
|
2594
|
-
isDragging: he,
|
|
2595
|
-
shouldFade: nn,
|
|
2596
|
-
closeDrawer: Ae,
|
|
2597
|
-
onNestedDrag: To,
|
|
2598
|
-
onNestedOpenChange: Po,
|
|
2599
|
-
onNestedRelease: _o,
|
|
2600
|
-
keyboardIsOpen: ge,
|
|
2601
|
-
openProp: e,
|
|
2602
|
-
modal: H,
|
|
2603
|
-
snapPointsOffset: Ke,
|
|
2604
|
-
direction: p
|
|
2605
|
-
}
|
|
2606
|
-
}, n));
|
|
2607
|
-
}
|
|
2608
|
-
const ml = 250, gl = 120, lo = /* @__PURE__ */ g.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
|
|
2609
|
-
const { visible: a, closeDrawer: s, isDragging: i, snapPoints: l, activeSnapPoint: u, setActiveSnapPoint: v, dismissible: m, handleOnly: c, onPress: d, onDrag: f } = wt(), y = g.useRef(null), R = g.useRef(!1);
|
|
2610
|
-
function K() {
|
|
2611
|
-
if (R.current) {
|
|
2612
|
-
x();
|
|
2613
|
-
return;
|
|
2614
|
-
}
|
|
2615
|
-
window.setTimeout(() => {
|
|
2616
|
-
H();
|
|
2617
|
-
}, gl);
|
|
2618
|
-
}
|
|
2619
|
-
function H() {
|
|
2620
|
-
if (i || e || R.current) {
|
|
2621
|
-
x();
|
|
2622
|
-
return;
|
|
2623
|
-
}
|
|
2624
|
-
if (x(), (!l || l.length === 0) && m) {
|
|
2625
|
-
s();
|
|
2626
|
-
return;
|
|
2627
|
-
}
|
|
2628
|
-
if (u === l[l.length - 1] && m) {
|
|
2629
|
-
s();
|
|
2630
|
-
return;
|
|
2631
|
-
}
|
|
2632
|
-
const C = l.findIndex((P) => P === u);
|
|
2633
|
-
if (C === -1) return;
|
|
2634
|
-
const N = l[C + 1];
|
|
2635
|
-
v(N);
|
|
2636
|
-
}
|
|
2637
|
-
function q() {
|
|
2638
|
-
y.current = window.setTimeout(() => {
|
|
2639
|
-
R.current = !0;
|
|
2640
|
-
}, ml);
|
|
2641
|
-
}
|
|
2642
|
-
function x() {
|
|
2643
|
-
window.clearTimeout(y.current), R.current = !1;
|
|
2644
|
-
}
|
|
2645
|
-
return /* @__PURE__ */ g.createElement("div", {
|
|
2646
|
-
onClick: K,
|
|
2647
|
-
onDoubleClick: () => {
|
|
2648
|
-
R.current = !0, s();
|
|
2649
|
-
},
|
|
2650
|
-
onPointerCancel: x,
|
|
2651
|
-
onPointerDown: (p) => {
|
|
2652
|
-
c && d(p), q();
|
|
2653
|
-
},
|
|
2654
|
-
onPointerMove: (p) => {
|
|
2655
|
-
c && f(p);
|
|
2656
|
-
},
|
|
2657
|
-
// onPointerUp is already handled by the content component
|
|
2658
|
-
ref: r,
|
|
2659
|
-
"vaul-drawer-visible": a ? "true" : "false",
|
|
2660
|
-
"vaul-handle": "",
|
|
2661
|
-
"aria-hidden": "true",
|
|
2662
|
-
...n
|
|
2663
|
-
}, /* @__PURE__ */ g.createElement("span", {
|
|
2664
|
-
"vaul-handle-hitarea": "",
|
|
2665
|
-
"aria-hidden": "true"
|
|
2666
|
-
}, t));
|
|
2667
|
-
});
|
|
2668
|
-
lo.displayName = "Drawer.Handle";
|
|
2669
|
-
const co = /* @__PURE__ */ g.forwardRef(function({ children: e, ...t }, n) {
|
|
2670
|
-
const { overlayRef: r, snapPoints: a, onRelease: s, shouldFade: i, isOpen: l, visible: u } = wt(), v = ro(n, r), m = a && a.length > 0;
|
|
2671
|
-
return /* @__PURE__ */ g.createElement(Ka, {
|
|
2672
|
-
onMouseUp: s,
|
|
2673
|
-
ref: v,
|
|
2674
|
-
"vaul-drawer-visible": u ? "true" : "false",
|
|
2675
|
-
"vaul-overlay": "",
|
|
2676
|
-
"vaul-snap-points": l && m ? "true" : "false",
|
|
2677
|
-
"vaul-snap-points-overlay": l && i ? "true" : "false",
|
|
2678
|
-
...t
|
|
2679
|
-
});
|
|
2680
|
-
});
|
|
2681
|
-
co.displayName = "Drawer.Overlay";
|
|
2682
|
-
const uo = /* @__PURE__ */ g.forwardRef(function({ onOpenAutoFocus: e, onPointerDownOutside: t, onAnimationEnd: n, style: r, ...a }, s) {
|
|
2683
|
-
const { drawerRef: i, onPress: l, onRelease: u, onDrag: v, dismissible: m, keyboardIsOpen: c, snapPointsOffset: d, visible: f, closeDrawer: y, modal: R, openProp: K, onOpenChange: H, setVisible: q, handleOnly: x, direction: p } = wt(), C = ro(s, i), N = g.useRef(null), P = g.useRef(!1), _ = (w, L, te = 0) => {
|
|
2684
|
-
if (P.current) return !0;
|
|
2685
|
-
const Q = Math.abs(w.y), V = Math.abs(w.x), X = V > Q, Oe = [
|
|
2686
|
-
"bottom",
|
|
2687
|
-
"right"
|
|
2688
|
-
].includes(L) ? 1 : -1;
|
|
2689
|
-
if (L === "left" || L === "right") {
|
|
2690
|
-
if (!(w.x * Oe < 0) && V >= 0 && V <= te)
|
|
2691
|
-
return X;
|
|
2692
|
-
} else if (!(w.y * Oe < 0) && Q >= 0 && Q <= te)
|
|
2693
|
-
return !X;
|
|
2694
|
-
return P.current = !0, !0;
|
|
2695
|
-
};
|
|
2696
|
-
return g.useEffect(() => {
|
|
2697
|
-
q(!0);
|
|
2698
|
-
}, []), /* @__PURE__ */ g.createElement(Va, {
|
|
2699
|
-
"vaul-drawer": "",
|
|
2700
|
-
"vaul-drawer-direction": p,
|
|
2701
|
-
"vaul-drawer-visible": f ? "true" : "false",
|
|
2702
|
-
...a,
|
|
2703
|
-
ref: C,
|
|
2704
|
-
style: d && d.length > 0 ? {
|
|
2705
|
-
"--snap-point-height": `${d[0]}px`,
|
|
2706
|
-
...r
|
|
2707
|
-
} : r,
|
|
2708
|
-
onOpenAutoFocus: (w) => {
|
|
2709
|
-
if (e)
|
|
2710
|
-
e(w);
|
|
2711
|
-
else {
|
|
2712
|
-
var L;
|
|
2713
|
-
w.preventDefault(), (L = i.current) == null || L.focus();
|
|
2714
|
-
}
|
|
2715
|
-
},
|
|
2716
|
-
onPointerDown: (w) => {
|
|
2717
|
-
x || (a.onPointerDown == null || a.onPointerDown.call(a, w), N.current = {
|
|
2718
|
-
x: w.clientX,
|
|
2719
|
-
y: w.clientY
|
|
2720
|
-
}, l(w));
|
|
2721
|
-
},
|
|
2722
|
-
onPointerDownOutside: (w) => {
|
|
2723
|
-
if (t == null || t(w), !R || w.defaultPrevented) {
|
|
2724
|
-
w.preventDefault();
|
|
2725
|
-
return;
|
|
2726
|
-
}
|
|
2727
|
-
c.current && (c.current = !1), w.preventDefault(), H == null || H(!1), !(!m || K !== void 0) && y();
|
|
2728
|
-
},
|
|
2729
|
-
onFocusOutside: (w) => {
|
|
2730
|
-
if (!R) {
|
|
2731
|
-
w.preventDefault();
|
|
2732
|
-
return;
|
|
2733
|
-
}
|
|
2734
|
-
},
|
|
2735
|
-
onEscapeKeyDown: (w) => {
|
|
2736
|
-
if (!R) {
|
|
2737
|
-
w.preventDefault();
|
|
2738
|
-
return;
|
|
2739
|
-
}
|
|
2740
|
-
},
|
|
2741
|
-
onPointerMove: (w) => {
|
|
2742
|
-
if (x || (a.onPointerMove == null || a.onPointerMove.call(a, w), !N.current)) return;
|
|
2743
|
-
const L = w.clientY - N.current.y, te = w.clientX - N.current.x, Q = w.pointerType === "touch" ? 10 : 2;
|
|
2744
|
-
_({
|
|
2745
|
-
x: te,
|
|
2746
|
-
y: L
|
|
2747
|
-
}, p, Q) ? v(w) : (Math.abs(te) > Q || Math.abs(L) > Q) && (N.current = null);
|
|
2748
|
-
},
|
|
2749
|
-
onPointerUp: (w) => {
|
|
2750
|
-
a.onPointerUp == null || a.onPointerUp.call(a, w), N.current = null, P.current = !1, u(w);
|
|
2751
|
-
}
|
|
2752
|
-
});
|
|
2753
|
-
});
|
|
2754
|
-
uo.displayName = "Drawer.Content";
|
|
2755
|
-
function vl({ onDrag: e, onOpenChange: t, ...n }) {
|
|
2756
|
-
const { onNestedDrag: r, onNestedOpenChange: a, onNestedRelease: s } = wt();
|
|
2757
|
-
if (!r)
|
|
2758
|
-
throw new Error("Drawer.NestedRoot must be placed in another drawer");
|
|
2759
|
-
return /* @__PURE__ */ g.createElement(io, {
|
|
2760
|
-
nested: !0,
|
|
2761
|
-
onClose: () => {
|
|
2762
|
-
a(!1);
|
|
2763
|
-
},
|
|
2764
|
-
onDrag: (i, l) => {
|
|
2765
|
-
r(i, l), e == null || e(i, l);
|
|
2766
|
-
},
|
|
2767
|
-
onOpenChange: (i) => {
|
|
2768
|
-
i && a(i), t == null || t(i);
|
|
2769
|
-
},
|
|
2770
|
-
onRelease: s,
|
|
2771
|
-
...n
|
|
2772
|
-
});
|
|
2773
|
-
}
|
|
2774
|
-
const ie = {
|
|
2775
|
-
Root: io,
|
|
2776
|
-
NestedRoot: vl,
|
|
2777
|
-
Content: uo,
|
|
2778
|
-
Handle: lo,
|
|
2779
|
-
Overlay: co,
|
|
2780
|
-
Trigger: Qa,
|
|
2781
|
-
Portal: qa,
|
|
2782
|
-
Close: Ga,
|
|
2783
|
-
Title: Wa,
|
|
2784
|
-
Description: Ya
|
|
2785
|
-
}, Xt = ({
|
|
2786
|
-
shouldScaleBackground: e = !0,
|
|
2787
|
-
...t
|
|
2788
|
-
}) => /* @__PURE__ */ o.jsx(
|
|
2789
|
-
ie.Root,
|
|
2790
|
-
{
|
|
2791
|
-
shouldScaleBackground: e,
|
|
2792
|
-
...t
|
|
2793
|
-
}
|
|
2794
|
-
);
|
|
2795
|
-
Xt.displayName = "Drawer";
|
|
2796
|
-
const fo = ie.Trigger, wl = ie.Portal, bl = ie.Close, ho = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
2797
|
-
ie.Overlay,
|
|
2798
|
-
{
|
|
2799
|
-
ref: n,
|
|
2800
|
-
className: O("fixed inset-0 z-50 bg-black/80", e),
|
|
2801
|
-
...t
|
|
2802
|
-
}
|
|
2803
|
-
));
|
|
2804
|
-
ho.displayName = ie.Overlay.displayName;
|
|
2805
|
-
const Jt = h.forwardRef(({ className: e, children: t, hideBar: n = !0, ...r }, a) => /* @__PURE__ */ o.jsxs(wl, { children: [
|
|
2806
|
-
/* @__PURE__ */ o.jsx(ho, {}),
|
|
2807
|
-
/* @__PURE__ */ o.jsxs(
|
|
2808
|
-
ie.Content,
|
|
2809
|
-
{
|
|
2810
|
-
ref: a,
|
|
2811
|
-
className: O(
|
|
2812
|
-
"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
|
|
2813
|
-
e
|
|
2814
|
-
),
|
|
2815
|
-
...r,
|
|
2816
|
-
children: [
|
|
2817
|
-
!n && /* @__PURE__ */ o.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
2818
|
-
t
|
|
2819
|
-
]
|
|
2820
|
-
}
|
|
2821
|
-
)
|
|
2822
|
-
] }));
|
|
2823
|
-
Jt.displayName = "DrawerContent";
|
|
2824
|
-
const Zt = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
2825
|
-
ie.Title,
|
|
2826
|
-
{
|
|
2827
|
-
ref: n,
|
|
2828
|
-
className: O(
|
|
2829
|
-
"text-lg font-semibold leading-none tracking-tight",
|
|
2830
|
-
e
|
|
2831
|
-
),
|
|
2832
|
-
...t
|
|
2833
|
-
}
|
|
2834
|
-
));
|
|
2835
|
-
Zt.displayName = ie.Title.displayName;
|
|
2836
|
-
const xl = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ o.jsx(
|
|
2837
|
-
ie.Description,
|
|
2838
|
-
{
|
|
2839
|
-
ref: n,
|
|
2840
|
-
className: O("text-sm text-muted-foreground", e),
|
|
2841
|
-
...t
|
|
2842
|
-
}
|
|
2843
|
-
));
|
|
2844
|
-
xl.displayName = ie.Description.displayName;
|
|
2845
|
-
const yl = () => {
|
|
2846
|
-
const { topNavigation: e } = Ue();
|
|
2847
|
-
return /* @__PURE__ */ o.jsxs(Xt, { direction: "right", children: [
|
|
2848
|
-
/* @__PURE__ */ o.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ o.jsx(fo, { className: "lg:hidden", children: /* @__PURE__ */ o.jsx(ka, { size: 22 }) }) }),
|
|
2849
|
-
/* @__PURE__ */ o.jsxs(
|
|
2850
|
-
Jt,
|
|
2851
|
-
{
|
|
2852
|
-
className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none",
|
|
2853
|
-
"aria-describedby": void 0,
|
|
2854
|
-
children: [
|
|
2855
|
-
/* @__PURE__ */ o.jsx(In, { children: /* @__PURE__ */ o.jsx(Zt, { children: "Navigation" }) }),
|
|
2856
|
-
/* @__PURE__ */ o.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.map((t) => /* @__PURE__ */ o.jsx("li", { children: /* @__PURE__ */ o.jsx(
|
|
2857
|
-
We,
|
|
2858
|
-
{
|
|
2859
|
-
className: ({ isActive: n }) => An(
|
|
2860
|
-
"block font-medium border-b-2",
|
|
2861
|
-
n ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2862
|
-
),
|
|
2863
|
-
to: t.id,
|
|
2864
|
-
children: /* @__PURE__ */ o.jsx(bl, { children: t.label })
|
|
2865
|
-
}
|
|
2866
|
-
) }, t.label)) })
|
|
2867
|
-
]
|
|
2868
|
-
}
|
|
2869
|
-
)
|
|
2870
|
-
] });
|
|
2871
|
-
}, Ml = () => {
|
|
2872
|
-
const e = Ue(), [t, n] = Te(!1), r = Ln(() => n(!1), []);
|
|
2873
|
-
be(() => {
|
|
2874
|
-
if (t)
|
|
2875
|
-
return;
|
|
2876
|
-
function s(i) {
|
|
2877
|
-
i.key === "k" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), n(!0));
|
|
2878
|
-
}
|
|
2879
|
-
return window.addEventListener("keydown", s), () => {
|
|
2880
|
-
window.removeEventListener("keydown", s);
|
|
2881
|
-
};
|
|
2882
|
-
}, [t, n]);
|
|
2883
|
-
const a = e.plugins.find(js);
|
|
2884
|
-
return a ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
2885
|
-
/* @__PURE__ */ o.jsxs(
|
|
928
|
+
}, [e, r]);
|
|
929
|
+
const n = t.plugins.find(Kr);
|
|
930
|
+
return n ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
931
|
+
/* @__PURE__ */ a.jsxs(
|
|
2886
932
|
"button",
|
|
2887
933
|
{
|
|
2888
934
|
type: "button",
|
|
2889
|
-
onClick: () =>
|
|
2890
|
-
className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-
|
|
935
|
+
onClick: () => r(!0),
|
|
936
|
+
className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
|
|
2891
937
|
children: [
|
|
2892
|
-
/* @__PURE__ */
|
|
2893
|
-
/* @__PURE__ */
|
|
938
|
+
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
|
|
939
|
+
/* @__PURE__ */ a.jsx(Xt, { size: 14 }),
|
|
2894
940
|
"Search"
|
|
2895
941
|
] }),
|
|
2896
|
-
/* @__PURE__ */
|
|
942
|
+
/* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
|
|
2897
943
|
]
|
|
2898
944
|
}
|
|
2899
945
|
),
|
|
2900
|
-
/* @__PURE__ */
|
|
2901
|
-
isOpen:
|
|
2902
|
-
onClose:
|
|
946
|
+
/* @__PURE__ */ a.jsx(de, { fallback: null, children: n.renderSearch({
|
|
947
|
+
isOpen: e,
|
|
948
|
+
onClose: s
|
|
2903
949
|
}) })
|
|
2904
950
|
] }) : null;
|
|
2905
|
-
},
|
|
2906
|
-
const { topNavigation: e } =
|
|
2907
|
-
return
|
|
2908
|
-
|
|
951
|
+
}, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Jr = () => {
|
|
952
|
+
const { topNavigation: t } = F(), { isAuthenticated: e } = ee();
|
|
953
|
+
return t.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx(de, { children: /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(Gr, { ...r }) }, r.id)) }) }) });
|
|
954
|
+
}, Gr = ({ id: t, label: e, default: r }) => {
|
|
955
|
+
var c;
|
|
956
|
+
const { sidebars: s } = F(), n = Ke(), i = s[t], o = r ?? (i ? Lt(i, (m) => {
|
|
957
|
+
if (m.type === "doc") return L(m.id);
|
|
958
|
+
}) : L(t));
|
|
959
|
+
if (!o)
|
|
960
|
+
throw new Error(
|
|
961
|
+
`No links found in top navigation for top navigation '${t}'. Check that the sidebar isn't empty or that a default link set.`
|
|
962
|
+
);
|
|
963
|
+
const u = ((c = n.data.topNavItem) == null ? void 0 : c.id) === t;
|
|
964
|
+
return /* @__PURE__ */ a.jsx(
|
|
965
|
+
te,
|
|
2909
966
|
{
|
|
2910
|
-
className: (
|
|
967
|
+
className: Ue(
|
|
2911
968
|
"block py-3.5 font-medium -mb-px border-b-2",
|
|
2912
|
-
|
|
969
|
+
u ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
2913
970
|
),
|
|
2914
|
-
to:
|
|
2915
|
-
children:
|
|
971
|
+
to: o,
|
|
972
|
+
children: e
|
|
2916
973
|
}
|
|
2917
|
-
)
|
|
2918
|
-
},
|
|
2919
|
-
|
|
2920
|
-
/* @__PURE__ */
|
|
974
|
+
);
|
|
975
|
+
}, ea = () => {
|
|
976
|
+
const { topNavigation: t } = F(), { isAuthenticated: e } = ee();
|
|
977
|
+
return /* @__PURE__ */ a.jsxs(Ve, { direction: "right", children: [
|
|
978
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(We, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Zt, { size: 22 }) }) }),
|
|
979
|
+
/* @__PURE__ */ a.jsxs(
|
|
980
|
+
Ye,
|
|
981
|
+
{
|
|
982
|
+
className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
|
|
983
|
+
"aria-describedby": void 0,
|
|
984
|
+
children: [
|
|
985
|
+
/* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Navigation" }) }),
|
|
986
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(tt, {}) }),
|
|
987
|
+
/* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
988
|
+
G,
|
|
989
|
+
{
|
|
990
|
+
className: ({ isActive: s }) => Ue(
|
|
991
|
+
"block font-medium border-b-2",
|
|
992
|
+
s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
|
|
993
|
+
),
|
|
994
|
+
to: r.id,
|
|
995
|
+
children: /* @__PURE__ */ a.jsx(gr, { children: r.label })
|
|
996
|
+
}
|
|
997
|
+
) }, r.label)) })
|
|
998
|
+
]
|
|
999
|
+
}
|
|
1000
|
+
)
|
|
1001
|
+
] });
|
|
1002
|
+
}, at = ({ item: t }) => t.children ? /* @__PURE__ */ a.jsxs(lr, { children: [
|
|
1003
|
+
/* @__PURE__ */ a.jsx(cr, { children: t.label }),
|
|
1004
|
+
/* @__PURE__ */ a.jsx(ur, { children: /* @__PURE__ */ a.jsx(dr, { children: t.children.map((e, r) => (
|
|
2921
1005
|
// eslint-disable-next-line react/no-array-index-key
|
|
2922
|
-
/* @__PURE__ */
|
|
1006
|
+
/* @__PURE__ */ a.jsx(at, { item: e }, r)
|
|
2923
1007
|
)) }) })
|
|
2924
|
-
] },
|
|
2925
|
-
const
|
|
2926
|
-
return /* @__PURE__ */
|
|
2927
|
-
/* @__PURE__ */
|
|
2928
|
-
/* @__PURE__ */
|
|
2929
|
-
/* @__PURE__ */
|
|
2930
|
-
/* @__PURE__ */
|
|
2931
|
-
(
|
|
2932
|
-
/* @__PURE__ */
|
|
1008
|
+
] }, t.label) : /* @__PURE__ */ a.jsx(te, { to: t.path ?? "", children: /* @__PURE__ */ a.jsx(hr, { children: t.label }, t.label) }), st = He(function() {
|
|
1009
|
+
const e = ee(), [r, s] = $t(), { isAuthenticated: n, profile: i, isAuthEnabled: o } = ee(), u = F(), { page: c, plugins: m } = u, j = m.filter((p) => zr(p)).flatMap((p) => p.getProfileMenuItems(u)).map((p) => /* @__PURE__ */ a.jsx(at, { item: p }, p.label)), N = r ? Jt : Gt;
|
|
1010
|
+
return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
|
|
1011
|
+
/* @__PURE__ */ a.jsx(Zr, {}),
|
|
1012
|
+
/* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
|
|
1013
|
+
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
|
|
1014
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(te, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
|
|
1015
|
+
(c == null ? void 0 : c.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1016
|
+
/* @__PURE__ */ a.jsx(
|
|
2933
1017
|
"img",
|
|
2934
1018
|
{
|
|
2935
|
-
src:
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
1019
|
+
src: /https?:\/\//.test(c.logo.src.light) ? c.logo.src.light : L(
|
|
1020
|
+
"/",
|
|
1021
|
+
c.logo.src.light
|
|
1022
|
+
),
|
|
1023
|
+
alt: c.logo.alt ?? c.pageTitle,
|
|
1024
|
+
style: { width: c.logo.width },
|
|
1025
|
+
className: A("h-10", r && "hidden"),
|
|
2939
1026
|
loading: "lazy"
|
|
2940
1027
|
}
|
|
2941
1028
|
),
|
|
2942
|
-
/* @__PURE__ */
|
|
1029
|
+
/* @__PURE__ */ a.jsx(
|
|
2943
1030
|
"img",
|
|
2944
1031
|
{
|
|
2945
|
-
src:
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
1032
|
+
src: /https?:\/\//.test(c.logo.src.dark) ? c.logo.src.dark : L(
|
|
1033
|
+
"/",
|
|
1034
|
+
c.logo.src.dark
|
|
1035
|
+
),
|
|
1036
|
+
alt: c.logo.alt ?? c.pageTitle,
|
|
1037
|
+
style: { width: c.logo.width },
|
|
1038
|
+
className: A("h-10", !r && "hidden"),
|
|
2949
1039
|
loading: "lazy"
|
|
2950
1040
|
}
|
|
2951
1041
|
)
|
|
2952
1042
|
] }),
|
|
2953
|
-
/* @__PURE__ */
|
|
1043
|
+
/* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: c == null ? void 0 : c.pageTitle })
|
|
2954
1044
|
] }) }) }),
|
|
2955
|
-
/* @__PURE__ */
|
|
2956
|
-
/* @__PURE__ */
|
|
2957
|
-
/* @__PURE__ */
|
|
2958
|
-
/* @__PURE__ */
|
|
2959
|
-
/* @__PURE__ */
|
|
2960
|
-
|
|
2961
|
-
/* @__PURE__ */
|
|
2962
|
-
/* @__PURE__ */
|
|
2963
|
-
/* @__PURE__ */
|
|
2964
|
-
/* @__PURE__ */
|
|
2965
|
-
|
|
1045
|
+
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
|
|
1046
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(tt, {}) }),
|
|
1047
|
+
/* @__PURE__ */ a.jsx(ea, {}),
|
|
1048
|
+
/* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
|
|
1049
|
+
/* @__PURE__ */ a.jsx(k, { name: "head-navigation-start" }),
|
|
1050
|
+
o && !n ? /* @__PURE__ */ a.jsx(ie, { variant: "ghost", onClick: () => e.login(), children: "Login" }) : j.length > 0 && /* @__PURE__ */ a.jsxs(ar, { modal: !1, children: [
|
|
1051
|
+
/* @__PURE__ */ a.jsx(sr, { asChild: !0, children: /* @__PURE__ */ a.jsx(ie, { variant: "ghost", children: i != null && i.email ? `${i.email}` : "My Account" }) }),
|
|
1052
|
+
/* @__PURE__ */ a.jsxs(nr, { className: "w-56", children: [
|
|
1053
|
+
/* @__PURE__ */ a.jsx(ir, { children: "My Account" }),
|
|
1054
|
+
/* @__PURE__ */ a.jsx(or, {}),
|
|
1055
|
+
j
|
|
2966
1056
|
] })
|
|
2967
1057
|
] }),
|
|
2968
|
-
/* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ a.jsx(
|
|
2969
1059
|
"button",
|
|
2970
1060
|
{
|
|
2971
1061
|
type: "button",
|
|
2972
|
-
"aria-label":
|
|
1062
|
+
"aria-label": r ? "Switch to light mode" : "Switch to dark mode",
|
|
2973
1063
|
className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
|
|
2974
|
-
onClick:
|
|
2975
|
-
children: /* @__PURE__ */
|
|
1064
|
+
onClick: s,
|
|
1065
|
+
children: /* @__PURE__ */ a.jsx(N, { size: 18 })
|
|
2976
1066
|
}
|
|
2977
1067
|
),
|
|
2978
|
-
/* @__PURE__ */
|
|
1068
|
+
/* @__PURE__ */ a.jsx(k, { name: "head-navigation-end" })
|
|
2979
1069
|
] })
|
|
2980
1070
|
] })
|
|
2981
1071
|
] }),
|
|
2982
|
-
/* @__PURE__ */
|
|
1072
|
+
/* @__PURE__ */ a.jsx(k, { name: "top-navigation-before" }),
|
|
1073
|
+
/* @__PURE__ */ a.jsx(Jr, {}),
|
|
1074
|
+
/* @__PURE__ */ a.jsx(k, { name: "top-navigation-after" })
|
|
2983
1075
|
] })
|
|
2984
1076
|
] });
|
|
2985
|
-
}),
|
|
2986
|
-
Header:
|
|
2987
|
-
},
|
|
2988
|
-
const [
|
|
2989
|
-
|
|
2990
|
-
const
|
|
2991
|
-
|
|
2992
|
-
}, [
|
|
2993
|
-
const
|
|
2994
|
-
const
|
|
2995
|
-
document.documentElement.classList.toggle("dark",
|
|
2996
|
-
}, [
|
|
2997
|
-
return /* @__PURE__ */
|
|
2998
|
-
},
|
|
2999
|
-
children:
|
|
3000
|
-
context:
|
|
3001
|
-
}) => (
|
|
3002
|
-
queryFn: async () => (await
|
|
1077
|
+
}), nt = {
|
|
1078
|
+
Header: st
|
|
1079
|
+
}, ta = Le(nt), ra = ta.Provider, aa = (t) => {
|
|
1080
|
+
const [e, r] = Q(!1);
|
|
1081
|
+
_(() => {
|
|
1082
|
+
const i = localStorage.getItem("theme"), o = window.matchMedia("(prefers-color-scheme: dark)"), u = i === "dark" || !i && o.matches;
|
|
1083
|
+
r(u);
|
|
1084
|
+
}, [e]);
|
|
1085
|
+
const s = Be(() => {
|
|
1086
|
+
const i = !e;
|
|
1087
|
+
document.documentElement.classList.toggle("dark", i), localStorage.setItem("theme", i ? "dark" : "light"), r(i);
|
|
1088
|
+
}, [e]), n = [e, s];
|
|
1089
|
+
return /* @__PURE__ */ a.jsx(Ut.Provider, { value: n, ...t });
|
|
1090
|
+
}, sa = ({
|
|
1091
|
+
children: t,
|
|
1092
|
+
context: e
|
|
1093
|
+
}) => (Bt({
|
|
1094
|
+
queryFn: async () => (await e.initialize(), !0),
|
|
3003
1095
|
queryKey: ["zudoku-initialize"]
|
|
3004
|
-
}), /* @__PURE__ */
|
|
3005
|
-
children:
|
|
3006
|
-
...
|
|
1096
|
+
}), /* @__PURE__ */ a.jsx(Ht.Provider, { value: e, children: t })), na = ({
|
|
1097
|
+
children: t,
|
|
1098
|
+
...e
|
|
3007
1099
|
}) => {
|
|
3008
|
-
var
|
|
3009
|
-
const
|
|
3010
|
-
() => ({ ...
|
|
3011
|
-
[
|
|
3012
|
-
),
|
|
3013
|
-
var
|
|
1100
|
+
var N, p;
|
|
1101
|
+
const r = re(
|
|
1102
|
+
() => ({ ...nt, ...e.overrides }),
|
|
1103
|
+
[e.overrides]
|
|
1104
|
+
), s = re(() => {
|
|
1105
|
+
var h;
|
|
3014
1106
|
return {
|
|
3015
|
-
...(
|
|
3016
|
-
(
|
|
3017
|
-
).reduce((
|
|
3018
|
-
...
|
|
3019
|
-
...(
|
|
1107
|
+
...(e.plugins ?? []).filter(Vr).flatMap(
|
|
1108
|
+
(f) => f.getMdxComponents ? [f.getMdxComponents()] : []
|
|
1109
|
+
).reduce((f, B) => ({ ...f, ...B }), {}),
|
|
1110
|
+
...Vt,
|
|
1111
|
+
...(h = e.mdx) == null ? void 0 : h.components
|
|
3020
1112
|
};
|
|
3021
|
-
}, [(
|
|
3022
|
-
() =>
|
|
3023
|
-
[
|
|
3024
|
-
),
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
}, [
|
|
3028
|
-
const [
|
|
3029
|
-
var
|
|
3030
|
-
return /* @__PURE__ */
|
|
1113
|
+
}, [(N = e.mdx) == null ? void 0 : N.components, e.plugins]), { stagger: n } = Et(oe), [i, o] = Q(!1), u = re(
|
|
1114
|
+
() => i ? { stagger: !0 } : { stagger: n },
|
|
1115
|
+
[n, i]
|
|
1116
|
+
), c = xt();
|
|
1117
|
+
_(() => {
|
|
1118
|
+
i || o(!0);
|
|
1119
|
+
}, [i, c.location]);
|
|
1120
|
+
const [m] = Q(() => new Yr(e)), j = (p = e.plugins) == null ? void 0 : p.filter(Ur).map((P, h) => {
|
|
1121
|
+
var f;
|
|
1122
|
+
return /* @__PURE__ */ a.jsx(kt, { children: (f = P.getHead) == null ? void 0 : f.call(P) }, h);
|
|
3031
1123
|
});
|
|
3032
|
-
return /* @__PURE__ */
|
|
3033
|
-
/* @__PURE__ */
|
|
3034
|
-
/* @__PURE__ */
|
|
1124
|
+
return /* @__PURE__ */ a.jsxs(zt, { client: et, children: [
|
|
1125
|
+
/* @__PURE__ */ a.jsx(ce, { children: j }),
|
|
1126
|
+
/* @__PURE__ */ a.jsx(oe.Provider, { value: u, children: /* @__PURE__ */ a.jsx(sa, { context: m, children: /* @__PURE__ */ a.jsx(ht, { components: s, children: /* @__PURE__ */ a.jsx(aa, { children: /* @__PURE__ */ a.jsx(ra, { value: r, children: /* @__PURE__ */ a.jsx(wt, { slotlets: e.slotlets, children: /* @__PURE__ */ a.jsx(Wt, { children: t ?? /* @__PURE__ */ a.jsx(_e, {}) }) }) }) }) }) }) })
|
|
3035
1127
|
] });
|
|
3036
|
-
},
|
|
3037
|
-
|
|
3038
|
-
const
|
|
3039
|
-
category:
|
|
3040
|
-
level:
|
|
1128
|
+
}, ia = He(na), pe = (t) => /* @__PURE__ */ a.jsx(Br, { FallbackComponent: Xr, children: /* @__PURE__ */ a.jsx(ia, { ...t }) });
|
|
1129
|
+
pe.displayName = "DevPortal";
|
|
1130
|
+
const oa = ({
|
|
1131
|
+
category: t,
|
|
1132
|
+
level: e
|
|
3041
1133
|
}) => {
|
|
3042
|
-
var
|
|
3043
|
-
const
|
|
3044
|
-
|
|
1134
|
+
var p, P;
|
|
1135
|
+
const r = qt(t), [s, n] = Q(!1), i = t.collapsible ?? !0, o = t.collapsed ?? !0, u = !!(!i || !o || r), [c, m] = Q(u), j = bt(((p = t.link) == null ? void 0 : p.id) ?? "");
|
|
1136
|
+
_(() => {
|
|
3045
1137
|
r && m(!0);
|
|
3046
1138
|
}, [r]);
|
|
3047
|
-
const
|
|
1139
|
+
const N = i && /* @__PURE__ */ a.jsx(
|
|
3048
1140
|
"button",
|
|
3049
1141
|
{
|
|
3050
1142
|
type: "button",
|
|
3051
|
-
onClick: (
|
|
3052
|
-
|
|
1143
|
+
onClick: (h) => {
|
|
1144
|
+
h.preventDefault(), m((f) => !f), n(!0);
|
|
3053
1145
|
},
|
|
3054
|
-
children: /* @__PURE__ */
|
|
3055
|
-
|
|
1146
|
+
children: /* @__PURE__ */ a.jsx(
|
|
1147
|
+
er,
|
|
3056
1148
|
{
|
|
3057
1149
|
size: 16,
|
|
3058
|
-
className:
|
|
3059
|
-
|
|
1150
|
+
className: A(
|
|
1151
|
+
s && "transition",
|
|
3060
1152
|
"shrink-0 group-data-[state=open]:rotate-90"
|
|
3061
1153
|
)
|
|
3062
1154
|
}
|
|
3063
1155
|
)
|
|
3064
1156
|
}
|
|
3065
1157
|
);
|
|
3066
|
-
return /* @__PURE__ */
|
|
3067
|
-
|
|
1158
|
+
return /* @__PURE__ */ a.jsxs(
|
|
1159
|
+
se.Root,
|
|
3068
1160
|
{
|
|
3069
|
-
className:
|
|
1161
|
+
className: "flex flex-col",
|
|
3070
1162
|
defaultOpen: u,
|
|
3071
|
-
open:
|
|
1163
|
+
open: c,
|
|
3072
1164
|
onOpenChange: () => m(!0),
|
|
3073
1165
|
children: [
|
|
3074
|
-
/* @__PURE__ */
|
|
1166
|
+
/* @__PURE__ */ a.jsx(se.Trigger, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
|
|
3075
1167
|
"div",
|
|
3076
1168
|
{
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
1169
|
+
onClick: () => n(!0),
|
|
1170
|
+
className: U({
|
|
1171
|
+
isActive: !1,
|
|
1172
|
+
isTopLevel: e === 0,
|
|
1173
|
+
className: [
|
|
1174
|
+
"text-start",
|
|
1175
|
+
i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
|
|
1176
|
+
]
|
|
1177
|
+
}),
|
|
3082
1178
|
children: [
|
|
3083
|
-
|
|
3084
|
-
|
|
1179
|
+
t.icon && /* @__PURE__ */ a.jsx(
|
|
1180
|
+
t.icon,
|
|
3085
1181
|
{
|
|
3086
1182
|
size: 16,
|
|
3087
|
-
className:
|
|
1183
|
+
className: A(
|
|
1184
|
+
"align-[-0.125em] -translate-x-1",
|
|
1185
|
+
j && "text-primary"
|
|
1186
|
+
)
|
|
3088
1187
|
}
|
|
3089
1188
|
),
|
|
3090
|
-
((
|
|
3091
|
-
|
|
1189
|
+
((P = t.link) == null ? void 0 : P.type) === "doc" ? /* @__PURE__ */ a.jsx(
|
|
1190
|
+
G,
|
|
3092
1191
|
{
|
|
3093
|
-
to:
|
|
1192
|
+
to: L(t.link.id),
|
|
3094
1193
|
className: "flex-1",
|
|
3095
|
-
onClick: () =>
|
|
3096
|
-
|
|
1194
|
+
onClick: () => {
|
|
1195
|
+
j && !c && m(!0);
|
|
1196
|
+
},
|
|
1197
|
+
children: /* @__PURE__ */ a.jsxs(
|
|
3097
1198
|
"div",
|
|
3098
1199
|
{
|
|
3099
|
-
className:
|
|
1200
|
+
className: A(
|
|
3100
1201
|
"flex items-center gap-2 justify-between w-full",
|
|
3101
|
-
|
|
1202
|
+
j ? "text-primary" : "text-foreground/80"
|
|
3102
1203
|
),
|
|
3103
1204
|
children: [
|
|
3104
|
-
/* @__PURE__ */
|
|
3105
|
-
|
|
1205
|
+
/* @__PURE__ */ a.jsx("div", { className: "truncate", children: t.label }),
|
|
1206
|
+
N
|
|
3106
1207
|
]
|
|
3107
1208
|
}
|
|
3108
1209
|
)
|
|
3109
1210
|
}
|
|
3110
|
-
) : /* @__PURE__ */
|
|
3111
|
-
/* @__PURE__ */
|
|
3112
|
-
|
|
1211
|
+
) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
1212
|
+
/* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: t.label }),
|
|
1213
|
+
N
|
|
3113
1214
|
] })
|
|
3114
1215
|
]
|
|
3115
1216
|
}
|
|
3116
1217
|
) }),
|
|
3117
|
-
/* @__PURE__ */
|
|
3118
|
-
|
|
1218
|
+
/* @__PURE__ */ a.jsx(
|
|
1219
|
+
se.Content,
|
|
3119
1220
|
{
|
|
3120
|
-
className:
|
|
1221
|
+
className: A(
|
|
3121
1222
|
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
3122
|
-
|
|
3123
|
-
"ms-[calc(var(--padding-nav-item)*1.125)]"
|
|
1223
|
+
s && "CollapsibleContent"
|
|
3124
1224
|
),
|
|
3125
|
-
children: /* @__PURE__ */
|
|
3126
|
-
|
|
1225
|
+
children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: t.items.map((h) => /* @__PURE__ */ a.jsx(
|
|
1226
|
+
le,
|
|
3127
1227
|
{
|
|
3128
|
-
level:
|
|
3129
|
-
item:
|
|
1228
|
+
level: e + 1,
|
|
1229
|
+
item: h
|
|
3130
1230
|
},
|
|
3131
|
-
("id" in
|
|
1231
|
+
("id" in h ? h.id : "") + ("href" in h ? h.href : "") + h.label
|
|
3132
1232
|
)) })
|
|
3133
1233
|
}
|
|
3134
1234
|
)
|
|
3135
1235
|
]
|
|
3136
1236
|
}
|
|
3137
1237
|
);
|
|
3138
|
-
},
|
|
1238
|
+
}, U = fr(
|
|
3139
1239
|
"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
3140
1240
|
{
|
|
3141
1241
|
variants: {
|
|
3142
1242
|
isTopLevel: {
|
|
3143
|
-
true: "font-
|
|
1243
|
+
true: "font-medium -mx-[--padding-nav-item]",
|
|
1244
|
+
false: "-mr-[--padding-nav-item] ml-[--padding-nav-item]"
|
|
3144
1245
|
},
|
|
3145
1246
|
isActive: {
|
|
3146
1247
|
true: "text-primary font-medium",
|
|
@@ -3150,185 +1251,184 @@ const Pl = ({
|
|
|
3150
1251
|
true: "text-foreground/30",
|
|
3151
1252
|
false: ""
|
|
3152
1253
|
}
|
|
1254
|
+
},
|
|
1255
|
+
defaultVariants: {
|
|
1256
|
+
isActive: !1
|
|
3153
1257
|
}
|
|
3154
1258
|
}
|
|
3155
|
-
),
|
|
3156
|
-
item:
|
|
3157
|
-
level:
|
|
1259
|
+
), it = "data-anchor", le = ({
|
|
1260
|
+
item: t,
|
|
1261
|
+
level: e = 0
|
|
3158
1262
|
}) => {
|
|
3159
|
-
|
|
3160
|
-
|
|
1263
|
+
var n, i;
|
|
1264
|
+
const { activeAnchor: r } = ge(), [s] = yt();
|
|
1265
|
+
switch (t.type) {
|
|
3161
1266
|
case "category":
|
|
3162
|
-
return /* @__PURE__ */
|
|
1267
|
+
return /* @__PURE__ */ a.jsx(oa, { category: t, level: e });
|
|
3163
1268
|
case "doc":
|
|
3164
|
-
return /* @__PURE__ */
|
|
3165
|
-
|
|
1269
|
+
return /* @__PURE__ */ a.jsxs(
|
|
1270
|
+
G,
|
|
3166
1271
|
{
|
|
3167
|
-
className: ({ isActive:
|
|
3168
|
-
to:
|
|
1272
|
+
className: ({ isActive: o }) => U({ isActive: o, isTopLevel: e === 0 }),
|
|
1273
|
+
to: L(t.id),
|
|
3169
1274
|
children: [
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
/* @__PURE__ */
|
|
3173
|
-
/* @__PURE__ */
|
|
3174
|
-
] }) :
|
|
1275
|
+
t.icon && /* @__PURE__ */ a.jsx(t.icon, { size: 16, className: "align-[-0.125em]" }),
|
|
1276
|
+
t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1277
|
+
/* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: t.label, children: t.label }),
|
|
1278
|
+
/* @__PURE__ */ a.jsx(ae, { ...t.badge })
|
|
1279
|
+
] }) : t.label
|
|
3175
1280
|
]
|
|
3176
1281
|
}
|
|
3177
1282
|
);
|
|
3178
1283
|
case "link":
|
|
3179
|
-
return
|
|
3180
|
-
|
|
1284
|
+
return t.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
|
|
1285
|
+
ft,
|
|
3181
1286
|
{
|
|
3182
|
-
to: { hash:
|
|
3183
|
-
[
|
|
3184
|
-
className:
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
/* @__PURE__ */ o.jsx(yt, { ...e.badge })
|
|
3194
|
-
] }) : /* @__PURE__ */ o.jsx("span", { className: "break-all", children: e.label })
|
|
1287
|
+
to: { hash: t.href, search: s.toString() },
|
|
1288
|
+
[it]: t.href.slice(1),
|
|
1289
|
+
className: U({
|
|
1290
|
+
isActive: t.href.slice(1) === r,
|
|
1291
|
+
isTopLevel: e === 0,
|
|
1292
|
+
className: ((n = t.badge) == null ? void 0 : n.placement) !== "start" && "justify-between"
|
|
1293
|
+
}),
|
|
1294
|
+
children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1295
|
+
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
|
|
1296
|
+
/* @__PURE__ */ a.jsx(ae, { ...t.badge })
|
|
1297
|
+
] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
|
|
3195
1298
|
}
|
|
3196
|
-
) :
|
|
1299
|
+
) : t.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
|
|
3197
1300
|
"a",
|
|
3198
1301
|
{
|
|
3199
|
-
className:
|
|
3200
|
-
|
|
3201
|
-
"block"
|
|
3202
|
-
),
|
|
3203
|
-
href: e.href,
|
|
1302
|
+
className: U({ isTopLevel: e === 0 }),
|
|
1303
|
+
href: t.href,
|
|
3204
1304
|
target: "_blank",
|
|
3205
1305
|
rel: "noopener noreferrer",
|
|
3206
1306
|
children: [
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3209
|
-
" ",
|
|
3210
|
-
/* @__PURE__ */ o.jsx(Ha, { className: "inline ml-1", size: 12 })
|
|
3211
|
-
] })
|
|
1307
|
+
/* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: t.label }),
|
|
1308
|
+
/* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(tr, { className: "inline -translate-y-0.5", size: 12 }) })
|
|
3212
1309
|
]
|
|
3213
1310
|
}
|
|
3214
|
-
) : /* @__PURE__ */
|
|
3215
|
-
|
|
1311
|
+
) : /* @__PURE__ */ a.jsx(
|
|
1312
|
+
G,
|
|
3216
1313
|
{
|
|
3217
|
-
className:
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
1314
|
+
className: U({
|
|
1315
|
+
className: ((i = t.badge) == null ? void 0 : i.placement) !== "start" && "justify-between"
|
|
1316
|
+
}),
|
|
1317
|
+
to: t.href,
|
|
1318
|
+
children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1319
|
+
/* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
|
|
1320
|
+
/* @__PURE__ */ a.jsx(ae, { ...t.badge })
|
|
1321
|
+
] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
|
|
3223
1322
|
}
|
|
3224
1323
|
);
|
|
3225
1324
|
}
|
|
3226
|
-
},
|
|
3227
|
-
if (!
|
|
3228
|
-
const
|
|
3229
|
-
|
|
3230
|
-
},
|
|
3231
|
-
const
|
|
3232
|
-
|
|
3233
|
-
if (!
|
|
3234
|
-
const
|
|
3235
|
-
const
|
|
3236
|
-
return
|
|
1325
|
+
}, la = (t, e = { block: "center" }) => {
|
|
1326
|
+
if (!t) return;
|
|
1327
|
+
const r = t.getBoundingClientRect();
|
|
1328
|
+
r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || t.scrollIntoView(e);
|
|
1329
|
+
}, ca = () => {
|
|
1330
|
+
const t = ue(), { setActiveAnchor: e } = ge();
|
|
1331
|
+
_(() => {
|
|
1332
|
+
if (!t.hash) return;
|
|
1333
|
+
const r = decodeURIComponent(t.hash.split("/")[0].slice(1)), s = () => {
|
|
1334
|
+
const n = document.getElementById(r), i = document.querySelector(`[${it}="${r}"]`);
|
|
1335
|
+
return n ? (n.scrollIntoView(), la(i), requestIdleCallback(() => e(r)), !0) : !1;
|
|
3237
1336
|
};
|
|
3238
|
-
if (!
|
|
3239
|
-
const
|
|
3240
|
-
|
|
1337
|
+
if (!s()) {
|
|
1338
|
+
const n = new MutationObserver((i, o) => {
|
|
1339
|
+
s() && o.disconnect();
|
|
3241
1340
|
});
|
|
3242
|
-
return
|
|
1341
|
+
return n.observe(document.body, { childList: !0, subtree: !0 }), () => n.disconnect();
|
|
3243
1342
|
}
|
|
3244
|
-
}, [
|
|
3245
|
-
},
|
|
3246
|
-
const
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
}, [
|
|
3250
|
-
},
|
|
1343
|
+
}, [t.hash, e]);
|
|
1344
|
+
}, ua = () => {
|
|
1345
|
+
const t = ue(), e = he(t.pathname);
|
|
1346
|
+
_(() => {
|
|
1347
|
+
e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
|
|
1348
|
+
}, [t.pathname]);
|
|
1349
|
+
}, ot = At(({ children: t, className: e, pushMainContent: r }, s) => /* @__PURE__ */ a.jsx(
|
|
3251
1350
|
"nav",
|
|
3252
1351
|
{
|
|
3253
|
-
"data-navigation": String(
|
|
3254
|
-
className:
|
|
1352
|
+
"data-navigation": String(r),
|
|
1353
|
+
className: A(
|
|
3255
1354
|
"scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
|
|
3256
1355
|
"px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
|
|
3257
1356
|
"w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
|
|
3258
|
-
|
|
1357
|
+
e
|
|
3259
1358
|
),
|
|
3260
|
-
ref:
|
|
3261
|
-
children:
|
|
1359
|
+
ref: s,
|
|
1360
|
+
children: t
|
|
3262
1361
|
}
|
|
3263
1362
|
));
|
|
3264
|
-
|
|
3265
|
-
const
|
|
3266
|
-
const
|
|
3267
|
-
return /* @__PURE__ */
|
|
3268
|
-
/* @__PURE__ */
|
|
3269
|
-
|
|
1363
|
+
ot.displayName = "SidebarWrapper";
|
|
1364
|
+
const da = () => {
|
|
1365
|
+
const t = he(null), e = Ke();
|
|
1366
|
+
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1367
|
+
/* @__PURE__ */ a.jsxs(
|
|
1368
|
+
ot,
|
|
3270
1369
|
{
|
|
3271
|
-
ref:
|
|
3272
|
-
pushMainContent:
|
|
1370
|
+
ref: t,
|
|
1371
|
+
pushMainContent: e.data.sidebar.length > 0,
|
|
3273
1372
|
children: [
|
|
3274
|
-
/* @__PURE__ */
|
|
3275
|
-
|
|
3276
|
-
/* @__PURE__ */
|
|
1373
|
+
/* @__PURE__ */ a.jsx(k, { name: "zudoku-before-navigation" }),
|
|
1374
|
+
e.data.sidebar.map((r) => /* @__PURE__ */ a.jsx(le, { item: r }, r.label)),
|
|
1375
|
+
/* @__PURE__ */ a.jsx(k, { name: "zudoku-after-navigation" })
|
|
3277
1376
|
]
|
|
3278
1377
|
}
|
|
3279
1378
|
),
|
|
3280
|
-
/* @__PURE__ */
|
|
3281
|
-
|
|
1379
|
+
/* @__PURE__ */ a.jsxs(
|
|
1380
|
+
Ye,
|
|
3282
1381
|
{
|
|
3283
|
-
className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none",
|
|
1382
|
+
className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none overflow-auto",
|
|
3284
1383
|
"aria-describedby": void 0,
|
|
3285
1384
|
children: [
|
|
3286
|
-
/* @__PURE__ */
|
|
3287
|
-
|
|
1385
|
+
/* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Sidebar" }) }),
|
|
1386
|
+
e.data.sidebar.map((r) => /* @__PURE__ */ a.jsx(le, { item: r }, r.label))
|
|
3288
1387
|
]
|
|
3289
1388
|
}
|
|
3290
1389
|
)
|
|
3291
1390
|
] });
|
|
3292
|
-
},
|
|
3293
|
-
const
|
|
3294
|
-
|
|
3295
|
-
const
|
|
3296
|
-
return
|
|
3297
|
-
var
|
|
3298
|
-
(
|
|
3299
|
-
}, [
|
|
3300
|
-
|
|
3301
|
-
}, [
|
|
1391
|
+
}, ha = ({ children: t }) => {
|
|
1392
|
+
const e = ue(), { setActiveAnchor: r } = ge(), { meta: s, authentication: n } = F();
|
|
1393
|
+
ca(), ua();
|
|
1394
|
+
const i = he(e.pathname);
|
|
1395
|
+
return _(() => {
|
|
1396
|
+
var o;
|
|
1397
|
+
(o = n == null ? void 0 : n.pageLoad) == null || o.call(n);
|
|
1398
|
+
}, [n]), _(() => {
|
|
1399
|
+
e.pathname !== i.current && r(""), i.current = e.pathname;
|
|
1400
|
+
}, [e.pathname, r]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3302
1401
|
!1,
|
|
3303
|
-
/* @__PURE__ */
|
|
3304
|
-
(
|
|
3305
|
-
(
|
|
1402
|
+
/* @__PURE__ */ a.jsxs(ce, { titleTemplate: s == null ? void 0 : s.title, children: [
|
|
1403
|
+
(s == null ? void 0 : s.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: s.description }),
|
|
1404
|
+
(s == null ? void 0 : s.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: s.favicon })
|
|
3306
1405
|
] }),
|
|
3307
|
-
/* @__PURE__ */
|
|
3308
|
-
/* @__PURE__ */
|
|
3309
|
-
/* @__PURE__ */
|
|
3310
|
-
|
|
1406
|
+
/* @__PURE__ */ a.jsx(k, { name: "layout-before-head" }),
|
|
1407
|
+
/* @__PURE__ */ a.jsx(st, {}),
|
|
1408
|
+
/* @__PURE__ */ a.jsx(k, { name: "layout-after-head" }),
|
|
1409
|
+
/* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
|
|
1410
|
+
de,
|
|
3311
1411
|
{
|
|
3312
|
-
fallback: /* @__PURE__ */
|
|
3313
|
-
children: /* @__PURE__ */
|
|
3314
|
-
/* @__PURE__ */
|
|
3315
|
-
/* @__PURE__ */
|
|
1412
|
+
fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(mr, {}) }),
|
|
1413
|
+
children: /* @__PURE__ */ a.jsxs(Ve, { direction: "left", children: [
|
|
1414
|
+
/* @__PURE__ */ a.jsx(da, {}),
|
|
1415
|
+
/* @__PURE__ */ a.jsx(
|
|
3316
1416
|
"div",
|
|
3317
1417
|
{
|
|
3318
|
-
className:
|
|
1418
|
+
className: A(
|
|
3319
1419
|
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
3320
1420
|
"peer-data-[navigation=false]:hidden"
|
|
3321
1421
|
),
|
|
3322
|
-
children: /* @__PURE__ */
|
|
3323
|
-
/* @__PURE__ */
|
|
3324
|
-
/* @__PURE__ */
|
|
1422
|
+
children: /* @__PURE__ */ a.jsxs(We, { className: "flex items-center gap-2", children: [
|
|
1423
|
+
/* @__PURE__ */ a.jsx(rr, { size: 16, strokeWidth: 1.5 }),
|
|
1424
|
+
/* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
|
|
3325
1425
|
] })
|
|
3326
1426
|
}
|
|
3327
1427
|
),
|
|
3328
|
-
/* @__PURE__ */
|
|
1428
|
+
/* @__PURE__ */ a.jsxs(
|
|
3329
1429
|
"main",
|
|
3330
1430
|
{
|
|
3331
|
-
className:
|
|
1431
|
+
className: A(
|
|
3332
1432
|
"h-full dark:border-white/10 translate-x-0",
|
|
3333
1433
|
"lg:overflow-visible",
|
|
3334
1434
|
// This works in tandem with the `SidebarWrapper` component
|
|
@@ -3336,9 +1436,9 @@ const Il = () => {
|
|
|
3336
1436
|
"lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
|
|
3337
1437
|
),
|
|
3338
1438
|
children: [
|
|
3339
|
-
/* @__PURE__ */
|
|
3340
|
-
|
|
3341
|
-
/* @__PURE__ */
|
|
1439
|
+
/* @__PURE__ */ a.jsx(k, { name: "zudoku-before-content" }),
|
|
1440
|
+
t ?? /* @__PURE__ */ a.jsx(_e, {}),
|
|
1441
|
+
/* @__PURE__ */ a.jsx(k, { name: "zudoku-after-content" })
|
|
3342
1442
|
]
|
|
3343
1443
|
}
|
|
3344
1444
|
)
|
|
@@ -3346,18 +1446,22 @@ const Il = () => {
|
|
|
3346
1446
|
}
|
|
3347
1447
|
) })
|
|
3348
1448
|
] });
|
|
3349
|
-
},
|
|
1449
|
+
}, _a = gt, Fa = pe, Qa = ha, La = Nt, Ba = pr, Ha = Rr, za = Ir, qa = ce, Ka = F, $a = jt, Ua = pe, Va = Pt, Wa = Dt, Ya = ie, Xa = te;
|
|
3350
1450
|
export {
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
1451
|
+
Ha as Bootstrap,
|
|
1452
|
+
za as BootstrapStatic,
|
|
1453
|
+
Ya as Button,
|
|
1454
|
+
Va as Callout,
|
|
1455
|
+
Wa as ClientOnly,
|
|
1456
|
+
Fa as DevPortal,
|
|
1457
|
+
qa as Head,
|
|
1458
|
+
Qa as Layout,
|
|
1459
|
+
Xa as Link,
|
|
1460
|
+
La as RouterError,
|
|
1461
|
+
Ba as ServerError,
|
|
1462
|
+
Ua as Zudoku,
|
|
1463
|
+
$a as useAuth,
|
|
1464
|
+
_a as useMDXComponents,
|
|
1465
|
+
Ka as useZudoku
|
|
3362
1466
|
};
|
|
3363
1467
|
//# sourceMappingURL=zudoku.components.js.map
|