@kommo-crm/crm-react-ui-kit 1.1.1-beta.3 → 1.1.1-beta.4
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/dist/Accordion.module-0NEfElzm.mjs +6 -0
- package/dist/ItemRoot.module-DaaOqYPx.mjs +7 -0
- package/dist/ItemRoot.module-fiKLca_h.mjs +7 -0
- package/dist/List-AX0nB9Ji.mjs +141 -0
- package/dist/Tab.module-Bh4dewE1.mjs +7 -0
- package/dist/assets/Accordion.css +1 -0
- package/dist/assets/Arrow.css +1 -0
- package/dist/assets/Arrow2.css +1 -0
- package/dist/assets/BaseClasses.css +1 -0
- package/dist/assets/BaseInput.css +1 -0
- package/dist/assets/Button.css +1 -0
- package/dist/assets/Callout.css +1 -0
- package/dist/assets/Checkbox.css +1 -0
- package/dist/assets/CheckboxGroup.css +1 -0
- package/dist/assets/CheckboxItem.css +1 -0
- package/dist/assets/ContentBlock.css +1 -0
- package/dist/assets/FilterTabs.css +1 -0
- package/dist/assets/Icon.css +1 -0
- package/dist/assets/InlineInput.css +1 -0
- package/dist/assets/Input.css +1 -0
- package/dist/assets/Item.css +1 -0
- package/dist/assets/Item2.css +1 -0
- package/dist/assets/Item3.css +1 -0
- package/dist/assets/ItemIcon.css +1 -0
- package/dist/assets/ItemIndicator.css +1 -0
- package/dist/assets/ItemRightSlot.css +1 -0
- package/dist/assets/ItemRoot.css +1 -0
- package/dist/assets/ItemRoot2.css +1 -0
- package/dist/assets/ItemRoot3.css +1 -0
- package/dist/assets/Label.css +1 -0
- package/dist/assets/Label2.css +1 -0
- package/dist/assets/Link.css +1 -0
- package/dist/assets/List.css +1 -0
- package/dist/assets/Option.css +1 -0
- package/dist/assets/Radio.css +1 -0
- package/dist/assets/RadioGroup.css +1 -0
- package/dist/assets/RadioItem.css +1 -0
- package/dist/assets/Select.css +1 -0
- package/dist/assets/SelectButton.css +1 -0
- package/dist/assets/Separator.css +1 -0
- package/dist/assets/Spinner.css +1 -0
- package/dist/assets/SubContent.css +1 -0
- package/dist/assets/SubTrigger.css +1 -0
- package/dist/assets/Switcher.css +1 -0
- package/dist/assets/Tab.css +1 -0
- package/dist/assets/Text.css +1 -0
- package/dist/assets/TextArea.css +1 -0
- package/dist/assets/VisuallyHiddenInput.css +1 -0
- package/dist/assets/icons.css +1 -0
- package/dist/assets/theme.css +1 -0
- package/dist/assets/useContentPositioning.css +1 -0
- package/dist/components/Accordion/Accordion.context.d.ts +1 -1
- package/dist/components/Accordion/Accordion.context.js +7 -4
- package/dist/components/Accordion/Accordion.js +14 -12
- package/dist/components/Accordion/Accordion.props.js +1 -1
- package/dist/components/Accordion/Accordion.themes.js +5 -2
- package/dist/components/Accordion/components/AccordionMultiple/AccordionMultiple.d.ts +1 -1
- package/dist/components/Accordion/components/AccordionMultiple/AccordionMultiple.js +44 -30
- package/dist/components/Accordion/components/AccordionMultiple/AccordionMultiple.props.js +1 -1
- package/dist/components/Accordion/components/AccordionSingle/AccordionSingle.d.ts +1 -1
- package/dist/components/Accordion/components/AccordionSingle/AccordionSingle.js +45 -30
- package/dist/components/Accordion/components/AccordionSingle/AccordionSingle.props.js +1 -1
- package/dist/components/Accordion/components/Item/Item.d.ts +2 -2
- package/dist/components/Accordion/components/Item/Item.js +58 -30
- package/dist/components/Accordion/components/Item/Item.props.js +1 -1
- package/dist/components/Accordion/components/Item/Item.themes.js +11 -8
- package/dist/components/Accordion/index.js +8 -3
- package/dist/components/BaseInput/BaseInput.d.ts +2 -2
- package/dist/components/BaseInput/BaseInput.js +34 -9
- package/dist/components/BaseInput/BaseInput.props.js +1 -1
- package/dist/components/BaseInput/index.js +4 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.js +91 -55
- package/dist/components/Button/Button.props.d.ts +2 -2
- package/dist/components/Button/Button.props.js +1 -1
- package/dist/components/Button/Button.themes.js +66 -64
- package/dist/components/Button/hooks/index.js +6 -2
- package/dist/components/Button/hooks/useShowInvalidAnimation/useShowInvalidAnimation.js +15 -17
- package/dist/components/Button/hooks/useShowSuccessfulState/useShowSuccessfulState.js +15 -17
- package/dist/components/Button/index.js +8 -2
- package/dist/components/Callout/Callout.d.ts +2 -2
- package/dist/components/Callout/Callout.js +32 -14
- package/dist/components/Callout/Callout.props.js +1 -1
- package/dist/components/Callout/index.js +12 -5
- package/dist/components/Callout/themes/CalloutBase.theme.js +7 -4
- package/dist/components/Callout/themes/CalloutError.theme.js +9 -6
- package/dist/components/Callout/themes/CalloutInfo.theme.js +9 -6
- package/dist/components/Callout/themes/CalloutSuccess.theme.js +9 -6
- package/dist/components/Callout/themes/CalloutWarning.theme.js +9 -6
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +55 -20
- package/dist/components/Checkbox/Checkbox.props.d.ts +3 -3
- package/dist/components/Checkbox/Checkbox.props.js +1 -1
- package/dist/components/Checkbox/Checkbox.themes.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.themes.js +44 -40
- package/dist/components/Checkbox/index.js +10 -2
- package/dist/components/CheckboxGroup/CheckboxGroup.context.d.ts +2 -2
- package/dist/components/CheckboxGroup/CheckboxGroup.context.js +7 -4
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +52 -24
- package/dist/components/CheckboxGroup/CheckboxGroup.props.d.ts +6 -6
- package/dist/components/CheckboxGroup/CheckboxGroup.props.js +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.themes.js +5 -2
- package/dist/components/CheckboxGroup/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/CheckboxGroup/components/Checkbox/Checkbox.js +33 -16
- package/dist/components/CheckboxGroup/components/Checkbox/Checkbox.props.d.ts +1 -1
- package/dist/components/CheckboxGroup/components/Checkbox/Checkbox.props.js +1 -1
- package/dist/components/CheckboxGroup/components/Checkbox/index.js +4 -1
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/CheckboxSelectAll.d.ts +2 -2
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/CheckboxSelectAll.js +34 -23
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/ItemRootSelectAll.context.d.ts +2 -2
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/ItemRootSelectAll.context.js +7 -4
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/ItemRootSelectAll.d.ts +2 -2
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/ItemRootSelectAll.js +40 -21
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/ItemRootSelectAll.props.d.ts +2 -2
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/ItemRootSelectAll.props.js +1 -1
- package/dist/components/CheckboxGroup/components/CheckboxSelectAll/index.js +6 -2
- package/dist/components/CheckboxGroup/components/ItemRoot/ItemRoot.context.d.ts +2 -2
- package/dist/components/CheckboxGroup/components/ItemRoot/ItemRoot.context.js +7 -4
- package/dist/components/CheckboxGroup/components/ItemRoot/ItemRoot.d.ts +2 -2
- package/dist/components/CheckboxGroup/components/ItemRoot/ItemRoot.js +35 -21
- package/dist/components/CheckboxGroup/components/ItemRoot/ItemRoot.props.d.ts +2 -2
- package/dist/components/CheckboxGroup/components/ItemRoot/ItemRoot.props.js +1 -1
- package/dist/components/CheckboxGroup/components/ItemRoot/ItemRoot.themes.js +5 -2
- package/dist/components/CheckboxGroup/components/ItemRoot/index.js +6 -2
- package/dist/components/CheckboxGroup/hooks/index.js +4 -1
- package/dist/components/CheckboxGroup/hooks/useCheckboxGroupState.d.ts +1 -1
- package/dist/components/CheckboxGroup/hooks/useCheckboxGroupState.js +47 -57
- package/dist/components/CheckboxGroup/index.js +12 -4
- package/dist/components/ConfigProvider/ConfigProvider.d.ts +2 -2
- package/dist/components/ConfigProvider/ConfigProvider.js +13 -7
- package/dist/components/ConfigProvider/ConfigProvider.props.d.ts +1 -1
- package/dist/components/ConfigProvider/ConfigProvider.props.js +1 -1
- package/dist/components/ConfigProvider/index.js +4 -1
- package/dist/components/ContentBlock/ContentBlock.d.ts +2 -2
- package/dist/components/ContentBlock/ContentBlock.js +13 -9
- package/dist/components/ContentBlock/ContentBlock.props.js +1 -1
- package/dist/components/ContentBlock/ContentBlock.themes.js +9 -6
- package/dist/components/ContentBlock/index.js +6 -2
- package/dist/components/ContextMenu/ContextMenu.context.d.ts +1 -1
- package/dist/components/ContextMenu/ContextMenu.context.js +7 -4
- package/dist/components/ContextMenu/ContextMenu.enums.js +4 -11
- package/dist/components/ContextMenu/ContextMenu.js +106 -63
- package/dist/components/ContextMenu/ContextMenu.props.d.ts +1 -1
- package/dist/components/ContextMenu/ContextMenu.props.js +1 -1
- package/dist/components/ContextMenu/ContextMenu.types.d.ts +1 -1
- package/dist/components/ContextMenu/ContextMenu.types.js +1 -1
- package/dist/components/ContextMenu/components/Arrow/Arrow.d.ts +2 -2
- package/dist/components/ContextMenu/components/Arrow/Arrow.js +37 -15
- package/dist/components/ContextMenu/components/Arrow/Arrow.props.js +1 -1
- package/dist/components/ContextMenu/components/Arrow/index.js +4 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.js +78 -44
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.props.d.ts +2 -2
- package/dist/components/ContextMenu/components/CheckboxItem/CheckboxItem.props.js +1 -1
- package/dist/components/ContextMenu/components/CheckboxItem/index.js +4 -1
- package/dist/components/ContextMenu/components/Content/Content.d.ts +2 -2
- package/dist/components/ContextMenu/components/Content/Content.enums.js +4 -43
- package/dist/components/ContextMenu/components/Content/Content.js +15 -54
- package/dist/components/ContextMenu/components/Content/Content.props.js +1 -1
- package/dist/components/ContextMenu/components/Content/Content.types.js +1 -1
- package/dist/components/ContextMenu/components/Content/Content.utils.js +13 -10
- package/dist/components/ContextMenu/components/Content/index.js +8 -3
- package/dist/components/ContextMenu/components/Group/Group.d.ts +1 -1
- package/dist/components/ContextMenu/components/Group/Group.js +6 -4
- package/dist/components/ContextMenu/components/Group/index.js +4 -1
- package/dist/components/ContextMenu/components/Item/Item.context.d.ts +1 -1
- package/dist/components/ContextMenu/components/Item/Item.context.js +7 -4
- package/dist/components/ContextMenu/components/Item/Item.d.ts +3 -3
- package/dist/components/ContextMenu/components/Item/Item.js +112 -73
- package/dist/components/ContextMenu/components/Item/Item.props.d.ts +1 -1
- package/dist/components/ContextMenu/components/Item/Item.props.js +1 -1
- package/dist/components/ContextMenu/components/Item/index.js +4 -1
- package/dist/components/ContextMenu/components/ItemIcon/ItemIcon.d.ts +1 -1
- package/dist/components/ContextMenu/components/ItemIcon/ItemIcon.js +25 -21
- package/dist/components/ContextMenu/components/ItemIcon/ItemIcon.props.js +1 -1
- package/dist/components/ContextMenu/components/ItemIcon/index.js +4 -1
- package/dist/components/ContextMenu/components/ItemIndicator/ItemIndicator.d.ts +2 -2
- package/dist/components/ContextMenu/components/ItemIndicator/ItemIndicator.js +29 -19
- package/dist/components/ContextMenu/components/ItemIndicator/ItemIndicator.props.js +1 -1
- package/dist/components/ContextMenu/components/ItemIndicator/index.js +4 -1
- package/dist/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.d.ts +2 -2
- package/dist/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.js +57 -32
- package/dist/components/ContextMenu/components/ItemRightSlot/ItemRightSlot.props.js +1 -1
- package/dist/components/ContextMenu/components/ItemRightSlot/index.js +4 -1
- package/dist/components/ContextMenu/components/Label/Label.d.ts +2 -2
- package/dist/components/ContextMenu/components/Label/Label.js +28 -12
- package/dist/components/ContextMenu/components/Label/Label.props.d.ts +2 -2
- package/dist/components/ContextMenu/components/Label/Label.props.js +1 -1
- package/dist/components/ContextMenu/components/Label/index.js +4 -1
- package/dist/components/ContextMenu/components/Portal/Portal.d.ts +1 -1
- package/dist/components/ContextMenu/components/Portal/Portal.js +6 -4
- package/dist/components/ContextMenu/components/Portal/index.js +4 -1
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.js +13 -14
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.props.d.ts +2 -2
- package/dist/components/ContextMenu/components/RadioGroup/RadioGroup.props.js +1 -1
- package/dist/components/ContextMenu/components/RadioGroup/index.js +4 -1
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts +1 -1
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.js +70 -37
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.props.d.ts +2 -2
- package/dist/components/ContextMenu/components/RadioItem/RadioItem.props.js +1 -1
- package/dist/components/ContextMenu/components/RadioItem/index.js +4 -1
- package/dist/components/ContextMenu/components/Separator/Separator.d.ts +2 -2
- package/dist/components/ContextMenu/components/Separator/Separator.js +21 -9
- package/dist/components/ContextMenu/components/Separator/Separator.props.js +1 -1
- package/dist/components/ContextMenu/components/Separator/index.js +4 -1
- package/dist/components/ContextMenu/components/Sub/Sub.context.d.ts +1 -1
- package/dist/components/ContextMenu/components/Sub/Sub.context.js +7 -4
- package/dist/components/ContextMenu/components/Sub/Sub.d.ts +1 -1
- package/dist/components/ContextMenu/components/Sub/Sub.js +58 -14
- package/dist/components/ContextMenu/components/Sub/Sub.props.js +1 -1
- package/dist/components/ContextMenu/components/Sub/index.js +4 -1
- package/dist/components/ContextMenu/components/SubContent/SubContent.d.ts +2 -2
- package/dist/components/ContextMenu/components/SubContent/SubContent.js +83 -58
- package/dist/components/ContextMenu/components/SubContent/SubContent.props.js +1 -1
- package/dist/components/ContextMenu/components/SubContent/index.js +4 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.js +93 -36
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.d.ts +1 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.props.js +1 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.types.d.ts +1 -1
- package/dist/components/ContextMenu/components/SubRoot/SubRoot.types.js +1 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.d.ts +2 -2
- package/dist/components/ContextMenu/components/SubRoot/components/Content/Content.js +104 -63
- package/dist/components/ContextMenu/components/SubRoot/components/Content/index.js +4 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.d.ts +2 -2
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.js +71 -38
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/Trigger.props.js +1 -1
- package/dist/components/ContextMenu/components/SubRoot/components/Trigger/index.js +4 -1
- package/dist/components/ContextMenu/components/SubRoot/index.js +4 -1
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.d.ts +1 -1
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.js +98 -76
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.props.d.ts +2 -2
- package/dist/components/ContextMenu/components/SubTrigger/SubTrigger.props.js +1 -1
- package/dist/components/ContextMenu/components/SubTrigger/index.js +4 -1
- package/dist/components/ContextMenu/components/Trigger/Trigger.d.ts +2 -2
- package/dist/components/ContextMenu/components/Trigger/Trigger.js +51 -35
- package/dist/components/ContextMenu/components/Trigger/Trigger.props.js +1 -1
- package/dist/components/ContextMenu/components/Trigger/index.js +4 -1
- package/dist/components/ContextMenu/hooks/index.js +16 -7
- package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.js +7 -198
- package/dist/components/ContextMenu/hooks/useContentPositioning/useContentPositioning.types.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.d.ts +2 -2
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.js +72 -209
- package/dist/components/ContextMenu/hooks/useContextMenu/useContextMenu.types.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuItemFocus/useContextMenuItemFocus.js +38 -42
- package/dist/components/ContextMenu/hooks/useContextMenuItemFocus/useContextMenuItemFocus.types.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.d.ts +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.js +65 -186
- package/dist/components/ContextMenu/hooks/useContextMenuSub/useContextMenuSub.types.js +1 -1
- package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.d.ts +2 -2
- package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.js +71 -215
- package/dist/components/ContextMenu/hooks/useContextMenuSubMenu/useContextMenuSubMenu.types.js +1 -1
- package/dist/components/ContextMenu/hooks/useInheritedArrowColor/useInheritedArrowColor.js +57 -110
- package/dist/components/ContextMenu/hooks/useIsTouchDevice/useIsTouchDevice.js +15 -26
- package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.d.ts +9 -9
- package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.js +21 -20
- package/dist/components/ContextMenu/hooks/useStopContextMenuEvents/useStopContextMenuEvents.types.js +1 -1
- package/dist/components/ContextMenu/index.js +10 -3
- package/dist/components/ContextMenu/providers/LevelProvider/LevelProvider.d.ts +1 -1
- package/dist/components/ContextMenu/providers/LevelProvider/LevelProvider.js +6 -9
- package/dist/components/ContextMenu/providers/LevelProvider/LevelProvider.props.js +1 -1
- package/dist/components/ContextMenu/providers/LevelProvider/index.js +5 -1
- package/dist/components/ContextMenu/providers/index.js +5 -1
- package/dist/components/ContextMenu/utils/contextMenuBus/contextMenuBus.js +19 -12
- package/dist/components/ContextMenu/utils/contextMenuBus/contextMenuBus.types.js +1 -1
- package/dist/components/ContextMenu/utils/focusParentItem/focusParentItem.js +11 -8
- package/dist/components/ContextMenu/utils/hasItemIcon/hasItemIcon.d.ts +1 -1
- package/dist/components/ContextMenu/utils/hasItemIcon/hasItemIcon.js +8 -8
- package/dist/components/ContextMenu/utils/index.js +10 -4
- package/dist/components/ContextMenu/utils/isFirstElement/isFirstElement.d.ts +1 -1
- package/dist/components/ContextMenu/utils/isFirstElement/isFirstElement.js +9 -13
- package/dist/components/FilterTabs/FilterTabs.context.d.ts +2 -2
- package/dist/components/FilterTabs/FilterTabs.context.js +7 -4
- package/dist/components/FilterTabs/FilterTabs.d.ts +1 -1
- package/dist/components/FilterTabs/FilterTabs.js +61 -52
- package/dist/components/FilterTabs/FilterTabs.props.d.ts +5 -5
- package/dist/components/FilterTabs/FilterTabs.props.js +1 -1
- package/dist/components/FilterTabs/FilterTabs.themes.js +5 -2
- package/dist/components/FilterTabs/components/ItemRoot/ItemRoot.context.d.ts +2 -2
- package/dist/components/FilterTabs/components/ItemRoot/ItemRoot.context.js +7 -4
- package/dist/components/FilterTabs/components/ItemRoot/ItemRoot.d.ts +2 -2
- package/dist/components/FilterTabs/components/ItemRoot/ItemRoot.js +37 -26
- package/dist/components/FilterTabs/components/ItemRoot/ItemRoot.props.d.ts +2 -2
- package/dist/components/FilterTabs/components/ItemRoot/ItemRoot.props.js +1 -1
- package/dist/components/FilterTabs/components/ItemRoot/ItemRoot.themes.js +5 -2
- package/dist/components/FilterTabs/components/ItemRoot/index.js +6 -2
- package/dist/components/FilterTabs/components/ItemRootReset/ItemRootReset.context.d.ts +1 -1
- package/dist/components/FilterTabs/components/ItemRootReset/ItemRootReset.context.js +7 -4
- package/dist/components/FilterTabs/components/ItemRootReset/ItemRootReset.d.ts +2 -2
- package/dist/components/FilterTabs/components/ItemRootReset/ItemRootReset.js +33 -21
- package/dist/components/FilterTabs/components/ItemRootReset/ItemRootReset.props.d.ts +2 -2
- package/dist/components/FilterTabs/components/ItemRootReset/ItemRootReset.props.js +1 -1
- package/dist/components/FilterTabs/components/ItemRootReset/TabReset.d.ts +2 -2
- package/dist/components/FilterTabs/components/ItemRootReset/TabReset.js +27 -17
- package/dist/components/FilterTabs/components/ItemRootReset/index.js +6 -2
- package/dist/components/FilterTabs/components/Tab/Tab.d.ts +2 -2
- package/dist/components/FilterTabs/components/Tab/Tab.js +34 -20
- package/dist/components/FilterTabs/components/Tab/Tab.props.d.ts +1 -1
- package/dist/components/FilterTabs/components/Tab/Tab.props.js +1 -1
- package/dist/components/FilterTabs/components/Tab/Tab.themes.js +16 -13
- package/dist/components/FilterTabs/components/Tab/index.js +6 -2
- package/dist/components/FilterTabs/index.js +14 -4
- package/dist/components/InlineInput/InlineInput.d.ts +2 -2
- package/dist/components/InlineInput/InlineInput.js +63 -23
- package/dist/components/InlineInput/InlineInput.props.d.ts +2 -2
- package/dist/components/InlineInput/InlineInput.props.js +1 -1
- package/dist/components/InlineInput/InlineInput.themes.d.ts +1 -1
- package/dist/components/InlineInput/InlineInput.themes.js +42 -39
- package/dist/components/InlineInput/index.js +7 -2
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/Input/Input.js +76 -25
- package/dist/components/Input/Input.props.d.ts +2 -2
- package/dist/components/Input/Input.props.js +1 -1
- package/dist/components/Input/Input.themes.d.ts +1 -1
- package/dist/components/Input/Input.themes.js +59 -56
- package/dist/components/Input/index.js +7 -2
- package/dist/components/Label/Label.d.ts +1 -1
- package/dist/components/Label/Label.js +60 -30
- package/dist/components/Label/Label.props.d.ts +1 -1
- package/dist/components/Label/Label.props.js +1 -1
- package/dist/components/Label/Label.theme.js +9 -6
- package/dist/components/Label/index.js +7 -2
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +13 -9
- package/dist/components/Link/Link.props.js +1 -1
- package/dist/components/Link/Link.themes.js +12 -9
- package/dist/components/Link/index.js +6 -2
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.js +10 -24
- package/dist/components/List/List.props.js +1 -1
- package/dist/components/List/List.theme.js +18 -15
- package/dist/components/List/index.js +6 -2
- package/dist/components/Portal/Portal.d.ts +2 -2
- package/dist/components/Portal/Portal.js +10 -8
- package/dist/components/Portal/Portal.props.js +1 -1
- package/dist/components/Portal/index.js +4 -1
- package/dist/components/RadioGroup/RadioGroup.context.d.ts +2 -2
- package/dist/components/RadioGroup/RadioGroup.context.js +7 -4
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +55 -22
- package/dist/components/RadioGroup/RadioGroup.props.d.ts +5 -5
- package/dist/components/RadioGroup/RadioGroup.props.js +1 -1
- package/dist/components/RadioGroup/RadioGroup.themes.js +5 -2
- package/dist/components/RadioGroup/components/ItemRoot/ItemRoot.context.d.ts +2 -2
- package/dist/components/RadioGroup/components/ItemRoot/ItemRoot.context.js +7 -4
- package/dist/components/RadioGroup/components/ItemRoot/ItemRoot.d.ts +2 -2
- package/dist/components/RadioGroup/components/ItemRoot/ItemRoot.js +33 -20
- package/dist/components/RadioGroup/components/ItemRoot/ItemRoot.props.d.ts +2 -2
- package/dist/components/RadioGroup/components/ItemRoot/ItemRoot.props.js +1 -1
- package/dist/components/RadioGroup/components/ItemRoot/ItemRoot.themes.js +5 -2
- package/dist/components/RadioGroup/components/ItemRoot/index.js +6 -2
- package/dist/components/RadioGroup/components/Radio/Radio.d.ts +2 -2
- package/dist/components/RadioGroup/components/Radio/Radio.js +48 -29
- package/dist/components/RadioGroup/components/Radio/Radio.props.d.ts +1 -1
- package/dist/components/RadioGroup/components/Radio/Radio.props.js +1 -1
- package/dist/components/RadioGroup/components/Radio/Radio.themes.js +18 -15
- package/dist/components/RadioGroup/components/Radio/index.js +6 -2
- package/dist/components/RadioGroup/index.js +14 -4
- package/dist/components/Select/Select.context.d.ts +1 -1
- package/dist/components/Select/Select.context.js +7 -4
- package/dist/components/Select/Select.js +77 -52
- package/dist/components/Select/Select.props.d.ts +1 -1
- package/dist/components/Select/Select.props.js +1 -1
- package/dist/components/Select/Select.theme.js +6 -3
- package/dist/components/Select/Select.types.js +1 -1
- package/dist/components/Select/components/Arrow/Arrow.d.ts +1 -1
- package/dist/components/Select/components/Arrow/Arrow.js +18 -13
- package/dist/components/Select/components/Arrow/Arrow.props.js +1 -1
- package/dist/components/Select/components/Arrow/Arrow.theme.js +7 -4
- package/dist/components/Select/components/Arrow/index.js +4 -1
- package/dist/components/Select/components/Button/Button.d.ts +2 -2
- package/dist/components/Select/components/Button/Button.js +27 -25
- package/dist/components/Select/components/Button/index.js +4 -1
- package/dist/components/Select/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Select/components/Icon/Icon.js +13 -10
- package/dist/components/Select/components/Icon/Icon.props.js +1 -1
- package/dist/components/Select/components/Icon/Icon.theme.js +7 -4
- package/dist/components/Select/components/Icon/index.js +4 -1
- package/dist/components/Select/components/Item/Item.d.ts +1 -1
- package/dist/components/Select/components/Item/Item.js +45 -25
- package/dist/components/Select/components/Item/Item.props.js +1 -1
- package/dist/components/Select/components/Item/Item.theme.js +12 -9
- package/dist/components/Select/components/Item/index.js +6 -2
- package/dist/components/Select/components/List/List.d.ts +2 -2
- package/dist/components/Select/components/List/List.js +64 -56
- package/dist/components/Select/components/List/List.props.d.ts +1 -1
- package/dist/components/Select/components/List/List.props.js +1 -1
- package/dist/components/Select/components/List/index.js +4 -1
- package/dist/components/Select/components/Option/Option.d.ts +1 -1
- package/dist/components/Select/components/Option/Option.js +15 -12
- package/dist/components/Select/components/Option/Option.props.js +1 -1
- package/dist/components/Select/components/Option/Option.theme.d.ts +1 -1
- package/dist/components/Select/components/Option/Option.theme.js +8 -4
- package/dist/components/Select/components/Value/Value.d.ts +1 -1
- package/dist/components/Select/components/Value/Value.js +15 -21
- package/dist/components/Select/components/Value/Value.props.js +1 -1
- package/dist/components/Select/index.js +20 -7
- package/dist/components/SelectButton/SelectButton.d.ts +1 -1
- package/dist/components/SelectButton/SelectButton.js +48 -24
- package/dist/components/SelectButton/SelectButton.props.js +1 -1
- package/dist/components/SelectButton/SelectButton.theme.js +28 -26
- package/dist/components/SelectButton/index.js +7 -2
- package/dist/components/Spinner/Spinner.d.ts +1 -1
- package/dist/components/Spinner/Spinner.js +28 -11
- package/dist/components/Spinner/Spinner.props.js +1 -1
- package/dist/components/Spinner/Spinner.themes.js +8 -5
- package/dist/components/Spinner/index.js +6 -2
- package/dist/components/Switcher/Switcher.js +35 -14
- package/dist/components/Switcher/Switcher.props.d.ts +3 -3
- package/dist/components/Switcher/Switcher.props.js +1 -1
- package/dist/components/Switcher/Switcher.themes.js +16 -13
- package/dist/components/Switcher/index.js +6 -2
- package/dist/components/Text/Text.d.ts +2 -2
- package/dist/components/Text/Text.js +58 -32
- package/dist/components/Text/Text.props.d.ts +1 -1
- package/dist/components/Text/Text.props.js +1 -1
- package/dist/components/Text/Text.themes.js +33 -30
- package/dist/components/Text/index.js +9 -2
- package/dist/components/TextArea/TextArea.d.ts +2 -2
- package/dist/components/TextArea/TextArea.js +74 -27
- package/dist/components/TextArea/TextArea.props.js +1 -1
- package/dist/components/TextArea/TextArea.themes.js +34 -32
- package/dist/components/TextArea/hooks/index.js +4 -1
- package/dist/components/TextArea/hooks/useResizeTextArea.d.ts +1 -1
- package/dist/components/TextArea/hooks/useResizeTextArea.js +15 -23
- package/dist/components/TextArea/index.js +7 -2
- package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.d.ts +2 -2
- package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.js +27 -22
- package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.props.d.ts +1 -1
- package/dist/components/VisuallyHiddenInput/VisuallyHiddenInput.props.js +1 -1
- package/dist/components/VisuallyHiddenInput/index.js +4 -1
- package/dist/fonts/PTS55F_W.woff +0 -0
- package/dist/fonts/PTS56F_W.woff +0 -0
- package/dist/fonts/PTS75F_W.woff +0 -0
- package/dist/fonts/PTS76F_W.woff +0 -0
- package/dist/fonts/ptsans.css +34 -0
- package/dist/hooks/useThemeClassName/index.js +4 -1
- package/dist/hooks/useThemeClassName/useThemeClassName.d.ts +1 -1
- package/dist/hooks/useThemeClassName/useThemeClassName.js +21 -27
- package/dist/img/logoDark.svg +17 -0
- package/dist/img/logoLight.svg +17 -0
- package/dist/index-BA3njR2k.mjs +3636 -0
- package/dist/index-L8X2o7IH.mjs +44 -0
- package/dist/index.js +4 -4
- package/dist/lib/appearance/index.js +7 -13
- package/dist/lib/platform/index.js +4 -15
- package/dist/lib/react/createComponentContext/createComponentContext.d.ts +1 -1
- package/dist/lib/react/createComponentContext/createComponentContext.js +18 -16
- package/dist/lib/react/createComponentContext/createComponentContext.props.js +1 -1
- package/dist/lib/react/createComponentContext/index.js +4 -1
- package/dist/lib/react/index.js +4 -1
- package/dist/lib/theme/index.js +1 -1
- package/dist/lib/theme/type.js +1 -1
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +12 -22
- package/dist/react-spring_web.modern-Dnq1lqN5.mjs +2144 -0
- package/dist/stylesheets/utils/BaseClasses/BaseClasses.js +6 -2
- package/dist/stylesheets/utils/BaseClasses/index.js +4 -1
- package/dist/useContentPositioning-BLCC-Xty.mjs +213 -0
- package/dist/utils/index.js +6 -2
- package/dist/utils/noop/noop.js +5 -2
- package/dist/utils/omit/omit.js +8 -6
- package/package.json +1 -1
- package/dist/components/CheckboxGroup/hooks/useCheckboxGroupState.test.js +0 -123
|
@@ -0,0 +1,3636 @@
|
|
|
1
|
+
import * as a from "react";
|
|
2
|
+
import de, { useLayoutEffect as ao, useState as uo } from "react";
|
|
3
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
4
|
+
import * as Cn from "react-dom";
|
|
5
|
+
import lo from "react-dom";
|
|
6
|
+
function O(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
7
|
+
return function(o) {
|
|
8
|
+
if (e == null || e(o), n === !1 || !o.defaultPrevented)
|
|
9
|
+
return t == null ? void 0 : t(o);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function Zt(e, t) {
|
|
13
|
+
if (typeof e == "function")
|
|
14
|
+
return e(t);
|
|
15
|
+
e != null && (e.current = t);
|
|
16
|
+
}
|
|
17
|
+
function it(...e) {
|
|
18
|
+
return (t) => {
|
|
19
|
+
let n = !1;
|
|
20
|
+
const r = e.map((o) => {
|
|
21
|
+
const i = Zt(o, t);
|
|
22
|
+
return !n && typeof i == "function" && (n = !0), i;
|
|
23
|
+
});
|
|
24
|
+
if (n)
|
|
25
|
+
return () => {
|
|
26
|
+
for (let o = 0; o < r.length; o++) {
|
|
27
|
+
const i = r[o];
|
|
28
|
+
typeof i == "function" ? i() : Zt(e[o], null);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function G(...e) {
|
|
34
|
+
return a.useCallback(it(...e), e);
|
|
35
|
+
}
|
|
36
|
+
function Ne(e, t = []) {
|
|
37
|
+
let n = [];
|
|
38
|
+
function r(i, s) {
|
|
39
|
+
const c = a.createContext(s), d = n.length;
|
|
40
|
+
n = [...n, s];
|
|
41
|
+
const l = (u) => {
|
|
42
|
+
var w;
|
|
43
|
+
const { scope: p, children: h, ...g } = u, m = ((w = p == null ? void 0 : p[e]) == null ? void 0 : w[d]) || c, v = a.useMemo(() => g, Object.values(g));
|
|
44
|
+
return /* @__PURE__ */ y(m.Provider, { value: v, children: h });
|
|
45
|
+
};
|
|
46
|
+
l.displayName = i + "Provider";
|
|
47
|
+
function f(u, p) {
|
|
48
|
+
var m;
|
|
49
|
+
const h = ((m = p == null ? void 0 : p[e]) == null ? void 0 : m[d]) || c, g = a.useContext(h);
|
|
50
|
+
if (g) return g;
|
|
51
|
+
if (s !== void 0) return s;
|
|
52
|
+
throw new Error(`\`${u}\` must be used within \`${i}\``);
|
|
53
|
+
}
|
|
54
|
+
return [l, f];
|
|
55
|
+
}
|
|
56
|
+
const o = () => {
|
|
57
|
+
const i = n.map((s) => a.createContext(s));
|
|
58
|
+
return function(c) {
|
|
59
|
+
const d = (c == null ? void 0 : c[e]) || i;
|
|
60
|
+
return a.useMemo(
|
|
61
|
+
() => ({ [`__scope${e}`]: { ...c, [e]: d } }),
|
|
62
|
+
[c, d]
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
return o.scopeName = e, [r, fo(o, ...t)];
|
|
67
|
+
}
|
|
68
|
+
function fo(...e) {
|
|
69
|
+
const t = e[0];
|
|
70
|
+
if (e.length === 1) return t;
|
|
71
|
+
const n = () => {
|
|
72
|
+
const r = e.map((o) => ({
|
|
73
|
+
useScope: o(),
|
|
74
|
+
scopeName: o.scopeName
|
|
75
|
+
}));
|
|
76
|
+
return function(i) {
|
|
77
|
+
const s = r.reduce((c, { useScope: d, scopeName: l }) => {
|
|
78
|
+
const u = d(i)[`__scope${l}`];
|
|
79
|
+
return { ...c, ...u };
|
|
80
|
+
}, {});
|
|
81
|
+
return a.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
return n.scopeName = t.scopeName, n;
|
|
85
|
+
}
|
|
86
|
+
var ce = globalThis != null && globalThis.document ? a.useLayoutEffect : () => {
|
|
87
|
+
}, po = a[" useInsertionEffect ".trim().toString()] || ce;
|
|
88
|
+
function Ot({
|
|
89
|
+
prop: e,
|
|
90
|
+
defaultProp: t,
|
|
91
|
+
onChange: n = () => {
|
|
92
|
+
},
|
|
93
|
+
caller: r
|
|
94
|
+
}) {
|
|
95
|
+
const [o, i, s] = mo({
|
|
96
|
+
defaultProp: t,
|
|
97
|
+
onChange: n
|
|
98
|
+
}), c = e !== void 0, d = c ? e : o;
|
|
99
|
+
{
|
|
100
|
+
const f = a.useRef(e !== void 0);
|
|
101
|
+
a.useEffect(() => {
|
|
102
|
+
const u = f.current;
|
|
103
|
+
u !== c && console.warn(
|
|
104
|
+
`${r} is changing from ${u ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
105
|
+
), f.current = c;
|
|
106
|
+
}, [c, r]);
|
|
107
|
+
}
|
|
108
|
+
const l = a.useCallback(
|
|
109
|
+
(f) => {
|
|
110
|
+
var u;
|
|
111
|
+
if (c) {
|
|
112
|
+
const p = ho(f) ? f(e) : f;
|
|
113
|
+
p !== e && ((u = s.current) == null || u.call(s, p));
|
|
114
|
+
} else
|
|
115
|
+
i(f);
|
|
116
|
+
},
|
|
117
|
+
[c, e, i, s]
|
|
118
|
+
);
|
|
119
|
+
return [d, l];
|
|
120
|
+
}
|
|
121
|
+
function mo({
|
|
122
|
+
defaultProp: e,
|
|
123
|
+
onChange: t
|
|
124
|
+
}) {
|
|
125
|
+
const [n, r] = a.useState(e), o = a.useRef(n), i = a.useRef(t);
|
|
126
|
+
return po(() => {
|
|
127
|
+
i.current = t;
|
|
128
|
+
}, [t]), a.useEffect(() => {
|
|
129
|
+
var s;
|
|
130
|
+
o.current !== n && ((s = i.current) == null || s.call(i, n), o.current = n);
|
|
131
|
+
}, [n, o]), [n, r, i];
|
|
132
|
+
}
|
|
133
|
+
function ho(e) {
|
|
134
|
+
return typeof e == "function";
|
|
135
|
+
}
|
|
136
|
+
// @__NO_SIDE_EFFECTS__
|
|
137
|
+
function Qe(e) {
|
|
138
|
+
const t = /* @__PURE__ */ vo(e), n = a.forwardRef((r, o) => {
|
|
139
|
+
const { children: i, ...s } = r, c = a.Children.toArray(i), d = c.find(wo);
|
|
140
|
+
if (d) {
|
|
141
|
+
const l = d.props.children, f = c.map((u) => u === d ? a.Children.count(l) > 1 ? a.Children.only(null) : a.isValidElement(l) ? l.props.children : null : u);
|
|
142
|
+
return /* @__PURE__ */ y(t, { ...s, ref: o, children: a.isValidElement(l) ? a.cloneElement(l, void 0, f) : null });
|
|
143
|
+
}
|
|
144
|
+
return /* @__PURE__ */ y(t, { ...s, ref: o, children: i });
|
|
145
|
+
});
|
|
146
|
+
return n.displayName = `${e}.Slot`, n;
|
|
147
|
+
}
|
|
148
|
+
// @__NO_SIDE_EFFECTS__
|
|
149
|
+
function vo(e) {
|
|
150
|
+
const t = a.forwardRef((n, r) => {
|
|
151
|
+
const { children: o, ...i } = n;
|
|
152
|
+
if (a.isValidElement(o)) {
|
|
153
|
+
const s = bo(o), c = yo(i, o.props);
|
|
154
|
+
return o.type !== a.Fragment && (c.ref = r ? it(r, s) : s), a.cloneElement(o, c);
|
|
155
|
+
}
|
|
156
|
+
return a.Children.count(o) > 1 ? a.Children.only(null) : null;
|
|
157
|
+
});
|
|
158
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
159
|
+
}
|
|
160
|
+
var go = Symbol("radix.slottable");
|
|
161
|
+
function wo(e) {
|
|
162
|
+
return a.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === go;
|
|
163
|
+
}
|
|
164
|
+
function yo(e, t) {
|
|
165
|
+
const n = { ...t };
|
|
166
|
+
for (const r in t) {
|
|
167
|
+
const o = e[r], i = t[r];
|
|
168
|
+
/^on[A-Z]/.test(r) ? o && i ? n[r] = (...c) => {
|
|
169
|
+
const d = i(...c);
|
|
170
|
+
return o(...c), d;
|
|
171
|
+
} : o && (n[r] = o) : r === "style" ? n[r] = { ...o, ...i } : r === "className" && (n[r] = [o, i].filter(Boolean).join(" "));
|
|
172
|
+
}
|
|
173
|
+
return { ...e, ...n };
|
|
174
|
+
}
|
|
175
|
+
function bo(e) {
|
|
176
|
+
var r, o;
|
|
177
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
178
|
+
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
179
|
+
}
|
|
180
|
+
var Co = [
|
|
181
|
+
"a",
|
|
182
|
+
"button",
|
|
183
|
+
"div",
|
|
184
|
+
"form",
|
|
185
|
+
"h2",
|
|
186
|
+
"h3",
|
|
187
|
+
"img",
|
|
188
|
+
"input",
|
|
189
|
+
"label",
|
|
190
|
+
"li",
|
|
191
|
+
"nav",
|
|
192
|
+
"ol",
|
|
193
|
+
"p",
|
|
194
|
+
"select",
|
|
195
|
+
"span",
|
|
196
|
+
"svg",
|
|
197
|
+
"ul"
|
|
198
|
+
], K = Co.reduce((e, t) => {
|
|
199
|
+
const n = /* @__PURE__ */ Qe(`Primitive.${t}`), r = a.forwardRef((o, i) => {
|
|
200
|
+
const { asChild: s, ...c } = o, d = s ? n : t;
|
|
201
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ y(d, { ...c, ref: i });
|
|
202
|
+
});
|
|
203
|
+
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
204
|
+
}, {});
|
|
205
|
+
function En(e, t) {
|
|
206
|
+
e && Cn.flushSync(() => e.dispatchEvent(t));
|
|
207
|
+
}
|
|
208
|
+
function xn(e) {
|
|
209
|
+
const t = e + "CollectionProvider", [n, r] = Ne(t), [o, i] = n(
|
|
210
|
+
t,
|
|
211
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
212
|
+
), s = (m) => {
|
|
213
|
+
const { scope: v, children: w } = m, C = de.useRef(null), b = de.useRef(/* @__PURE__ */ new Map()).current;
|
|
214
|
+
return /* @__PURE__ */ y(o, { scope: v, itemMap: b, collectionRef: C, children: w });
|
|
215
|
+
};
|
|
216
|
+
s.displayName = t;
|
|
217
|
+
const c = e + "CollectionSlot", d = /* @__PURE__ */ Qe(c), l = de.forwardRef(
|
|
218
|
+
(m, v) => {
|
|
219
|
+
const { scope: w, children: C } = m, b = i(c, w), E = G(v, b.collectionRef);
|
|
220
|
+
return /* @__PURE__ */ y(d, { ref: E, children: C });
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
l.displayName = c;
|
|
224
|
+
const f = e + "CollectionItemSlot", u = "data-radix-collection-item", p = /* @__PURE__ */ Qe(f), h = de.forwardRef(
|
|
225
|
+
(m, v) => {
|
|
226
|
+
const { scope: w, children: C, ...b } = m, E = de.useRef(null), x = G(v, E), M = i(f, w);
|
|
227
|
+
return de.useEffect(() => (M.itemMap.set(E, { ref: E, ...b }), () => void M.itemMap.delete(E))), /* @__PURE__ */ y(p, { [u]: "", ref: x, children: C });
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
h.displayName = f;
|
|
231
|
+
function g(m) {
|
|
232
|
+
const v = i(e + "CollectionConsumer", m);
|
|
233
|
+
return de.useCallback(() => {
|
|
234
|
+
const C = v.collectionRef.current;
|
|
235
|
+
if (!C) return [];
|
|
236
|
+
const b = Array.from(C.querySelectorAll(`[${u}]`));
|
|
237
|
+
return Array.from(v.itemMap.values()).sort(
|
|
238
|
+
(M, S) => b.indexOf(M.ref.current) - b.indexOf(S.ref.current)
|
|
239
|
+
);
|
|
240
|
+
}, [v.collectionRef, v.itemMap]);
|
|
241
|
+
}
|
|
242
|
+
return [
|
|
243
|
+
{ Provider: s, Slot: l, ItemSlot: h },
|
|
244
|
+
g,
|
|
245
|
+
r
|
|
246
|
+
];
|
|
247
|
+
}
|
|
248
|
+
var Eo = a.createContext(void 0);
|
|
249
|
+
function Sn(e) {
|
|
250
|
+
const t = a.useContext(Eo);
|
|
251
|
+
return e || t || "ltr";
|
|
252
|
+
}
|
|
253
|
+
function ee(e) {
|
|
254
|
+
const t = a.useRef(e);
|
|
255
|
+
return a.useEffect(() => {
|
|
256
|
+
t.current = e;
|
|
257
|
+
}), a.useMemo(() => (...n) => {
|
|
258
|
+
var r;
|
|
259
|
+
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
260
|
+
}, []);
|
|
261
|
+
}
|
|
262
|
+
function xo(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
263
|
+
const n = ee(e);
|
|
264
|
+
a.useEffect(() => {
|
|
265
|
+
const r = (o) => {
|
|
266
|
+
o.key === "Escape" && n(o);
|
|
267
|
+
};
|
|
268
|
+
return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
|
|
269
|
+
}, [n, t]);
|
|
270
|
+
}
|
|
271
|
+
var So = "DismissableLayer", Et = "dismissableLayer.update", Ro = "dismissableLayer.pointerDownOutside", Mo = "dismissableLayer.focusOutside", qt, Rn = a.createContext({
|
|
272
|
+
layers: /* @__PURE__ */ new Set(),
|
|
273
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
274
|
+
branches: /* @__PURE__ */ new Set()
|
|
275
|
+
}), Mn = a.forwardRef(
|
|
276
|
+
(e, t) => {
|
|
277
|
+
const {
|
|
278
|
+
disableOutsidePointerEvents: n = !1,
|
|
279
|
+
onEscapeKeyDown: r,
|
|
280
|
+
onPointerDownOutside: o,
|
|
281
|
+
onFocusOutside: i,
|
|
282
|
+
onInteractOutside: s,
|
|
283
|
+
onDismiss: c,
|
|
284
|
+
...d
|
|
285
|
+
} = e, l = a.useContext(Rn), [f, u] = a.useState(null), p = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = a.useState({}), g = G(t, (S) => u(S)), m = Array.from(l.layers), [v] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), w = m.indexOf(v), C = f ? m.indexOf(f) : -1, b = l.layersWithOutsidePointerEventsDisabled.size > 0, E = C >= w, x = Oo((S) => {
|
|
286
|
+
const A = S.target, I = [...l.branches].some((_) => _.contains(A));
|
|
287
|
+
!E || I || (o == null || o(S), s == null || s(S), S.defaultPrevented || c == null || c());
|
|
288
|
+
}, p), M = _o((S) => {
|
|
289
|
+
const A = S.target;
|
|
290
|
+
[...l.branches].some((_) => _.contains(A)) || (i == null || i(S), s == null || s(S), S.defaultPrevented || c == null || c());
|
|
291
|
+
}, p);
|
|
292
|
+
return xo((S) => {
|
|
293
|
+
C === l.layers.size - 1 && (r == null || r(S), !S.defaultPrevented && c && (S.preventDefault(), c()));
|
|
294
|
+
}, p), a.useEffect(() => {
|
|
295
|
+
if (f)
|
|
296
|
+
return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (qt = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), Qt(), () => {
|
|
297
|
+
n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = qt);
|
|
298
|
+
};
|
|
299
|
+
}, [f, p, n, l]), a.useEffect(() => () => {
|
|
300
|
+
f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), Qt());
|
|
301
|
+
}, [f, l]), a.useEffect(() => {
|
|
302
|
+
const S = () => h({});
|
|
303
|
+
return document.addEventListener(Et, S), () => document.removeEventListener(Et, S);
|
|
304
|
+
}, []), /* @__PURE__ */ y(
|
|
305
|
+
K.div,
|
|
306
|
+
{
|
|
307
|
+
...d,
|
|
308
|
+
ref: g,
|
|
309
|
+
style: {
|
|
310
|
+
pointerEvents: b ? E ? "auto" : "none" : void 0,
|
|
311
|
+
...e.style
|
|
312
|
+
},
|
|
313
|
+
onFocusCapture: O(e.onFocusCapture, M.onFocusCapture),
|
|
314
|
+
onBlurCapture: O(e.onBlurCapture, M.onBlurCapture),
|
|
315
|
+
onPointerDownCapture: O(
|
|
316
|
+
e.onPointerDownCapture,
|
|
317
|
+
x.onPointerDownCapture
|
|
318
|
+
)
|
|
319
|
+
}
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
);
|
|
323
|
+
Mn.displayName = So;
|
|
324
|
+
var Ao = "DismissableLayerBranch", Po = a.forwardRef((e, t) => {
|
|
325
|
+
const n = a.useContext(Rn), r = a.useRef(null), o = G(t, r);
|
|
326
|
+
return a.useEffect(() => {
|
|
327
|
+
const i = r.current;
|
|
328
|
+
if (i)
|
|
329
|
+
return n.branches.add(i), () => {
|
|
330
|
+
n.branches.delete(i);
|
|
331
|
+
};
|
|
332
|
+
}, [n.branches]), /* @__PURE__ */ y(K.div, { ...e, ref: o });
|
|
333
|
+
});
|
|
334
|
+
Po.displayName = Ao;
|
|
335
|
+
function Oo(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
336
|
+
const n = ee(e), r = a.useRef(!1), o = a.useRef(() => {
|
|
337
|
+
});
|
|
338
|
+
return a.useEffect(() => {
|
|
339
|
+
const i = (c) => {
|
|
340
|
+
if (c.target && !r.current) {
|
|
341
|
+
let d = function() {
|
|
342
|
+
An(
|
|
343
|
+
Ro,
|
|
344
|
+
n,
|
|
345
|
+
l,
|
|
346
|
+
{ discrete: !0 }
|
|
347
|
+
);
|
|
348
|
+
};
|
|
349
|
+
const l = { originalEvent: c };
|
|
350
|
+
c.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = d, t.addEventListener("click", o.current, { once: !0 })) : d();
|
|
351
|
+
} else
|
|
352
|
+
t.removeEventListener("click", o.current);
|
|
353
|
+
r.current = !1;
|
|
354
|
+
}, s = window.setTimeout(() => {
|
|
355
|
+
t.addEventListener("pointerdown", i);
|
|
356
|
+
}, 0);
|
|
357
|
+
return () => {
|
|
358
|
+
window.clearTimeout(s), t.removeEventListener("pointerdown", i), t.removeEventListener("click", o.current);
|
|
359
|
+
};
|
|
360
|
+
}, [t, n]), {
|
|
361
|
+
// ensures we check React component tree (not just DOM tree)
|
|
362
|
+
onPointerDownCapture: () => r.current = !0
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
function _o(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
366
|
+
const n = ee(e), r = a.useRef(!1);
|
|
367
|
+
return a.useEffect(() => {
|
|
368
|
+
const o = (i) => {
|
|
369
|
+
i.target && !r.current && An(Mo, n, { originalEvent: i }, {
|
|
370
|
+
discrete: !1
|
|
371
|
+
});
|
|
372
|
+
};
|
|
373
|
+
return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
|
|
374
|
+
}, [t, n]), {
|
|
375
|
+
onFocusCapture: () => r.current = !0,
|
|
376
|
+
onBlurCapture: () => r.current = !1
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
function Qt() {
|
|
380
|
+
const e = new CustomEvent(Et);
|
|
381
|
+
document.dispatchEvent(e);
|
|
382
|
+
}
|
|
383
|
+
function An(e, t, n, { discrete: r }) {
|
|
384
|
+
const o = n.originalEvent.target, i = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
385
|
+
t && o.addEventListener(e, t, { once: !0 }), r ? En(o, i) : o.dispatchEvent(i);
|
|
386
|
+
}
|
|
387
|
+
var dt = 0;
|
|
388
|
+
function To() {
|
|
389
|
+
a.useEffect(() => {
|
|
390
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
391
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? Jt()), document.body.insertAdjacentElement("beforeend", e[1] ?? Jt()), dt++, () => {
|
|
392
|
+
dt === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), dt--;
|
|
393
|
+
};
|
|
394
|
+
}, []);
|
|
395
|
+
}
|
|
396
|
+
function Jt() {
|
|
397
|
+
const e = document.createElement("span");
|
|
398
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
399
|
+
}
|
|
400
|
+
var pt = "focusScope.autoFocusOnMount", mt = "focusScope.autoFocusOnUnmount", en = { bubbles: !1, cancelable: !0 }, Io = "FocusScope", Pn = a.forwardRef((e, t) => {
|
|
401
|
+
const {
|
|
402
|
+
loop: n = !1,
|
|
403
|
+
trapped: r = !1,
|
|
404
|
+
onMountAutoFocus: o,
|
|
405
|
+
onUnmountAutoFocus: i,
|
|
406
|
+
...s
|
|
407
|
+
} = e, [c, d] = a.useState(null), l = ee(o), f = ee(i), u = a.useRef(null), p = G(t, (m) => d(m)), h = a.useRef({
|
|
408
|
+
paused: !1,
|
|
409
|
+
pause() {
|
|
410
|
+
this.paused = !0;
|
|
411
|
+
},
|
|
412
|
+
resume() {
|
|
413
|
+
this.paused = !1;
|
|
414
|
+
}
|
|
415
|
+
}).current;
|
|
416
|
+
a.useEffect(() => {
|
|
417
|
+
if (r) {
|
|
418
|
+
let m = function(b) {
|
|
419
|
+
if (h.paused || !c) return;
|
|
420
|
+
const E = b.target;
|
|
421
|
+
c.contains(E) ? u.current = E : se(u.current, { select: !0 });
|
|
422
|
+
}, v = function(b) {
|
|
423
|
+
if (h.paused || !c) return;
|
|
424
|
+
const E = b.relatedTarget;
|
|
425
|
+
E !== null && (c.contains(E) || se(u.current, { select: !0 }));
|
|
426
|
+
}, w = function(b) {
|
|
427
|
+
if (document.activeElement === document.body)
|
|
428
|
+
for (const x of b)
|
|
429
|
+
x.removedNodes.length > 0 && se(c);
|
|
430
|
+
};
|
|
431
|
+
document.addEventListener("focusin", m), document.addEventListener("focusout", v);
|
|
432
|
+
const C = new MutationObserver(w);
|
|
433
|
+
return c && C.observe(c, { childList: !0, subtree: !0 }), () => {
|
|
434
|
+
document.removeEventListener("focusin", m), document.removeEventListener("focusout", v), C.disconnect();
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
}, [r, c, h.paused]), a.useEffect(() => {
|
|
438
|
+
if (c) {
|
|
439
|
+
nn.add(h);
|
|
440
|
+
const m = document.activeElement;
|
|
441
|
+
if (!c.contains(m)) {
|
|
442
|
+
const w = new CustomEvent(pt, en);
|
|
443
|
+
c.addEventListener(pt, l), c.dispatchEvent(w), w.defaultPrevented || (Do($o(On(c)), { select: !0 }), document.activeElement === m && se(c));
|
|
444
|
+
}
|
|
445
|
+
return () => {
|
|
446
|
+
c.removeEventListener(pt, l), setTimeout(() => {
|
|
447
|
+
const w = new CustomEvent(mt, en);
|
|
448
|
+
c.addEventListener(mt, f), c.dispatchEvent(w), w.defaultPrevented || se(m ?? document.body, { select: !0 }), c.removeEventListener(mt, f), nn.remove(h);
|
|
449
|
+
}, 0);
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
}, [c, l, f, h]);
|
|
453
|
+
const g = a.useCallback(
|
|
454
|
+
(m) => {
|
|
455
|
+
if (!n && !r || h.paused) return;
|
|
456
|
+
const v = m.key === "Tab" && !m.altKey && !m.ctrlKey && !m.metaKey, w = document.activeElement;
|
|
457
|
+
if (v && w) {
|
|
458
|
+
const C = m.currentTarget, [b, E] = No(C);
|
|
459
|
+
b && E ? !m.shiftKey && w === E ? (m.preventDefault(), n && se(b, { select: !0 })) : m.shiftKey && w === b && (m.preventDefault(), n && se(E, { select: !0 })) : w === C && m.preventDefault();
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
[n, r, h.paused]
|
|
463
|
+
);
|
|
464
|
+
return /* @__PURE__ */ y(K.div, { tabIndex: -1, ...s, ref: p, onKeyDown: g });
|
|
465
|
+
});
|
|
466
|
+
Pn.displayName = Io;
|
|
467
|
+
function Do(e, { select: t = !1 } = {}) {
|
|
468
|
+
const n = document.activeElement;
|
|
469
|
+
for (const r of e)
|
|
470
|
+
if (se(r, { select: t }), document.activeElement !== n) return;
|
|
471
|
+
}
|
|
472
|
+
function No(e) {
|
|
473
|
+
const t = On(e), n = tn(t, e), r = tn(t.reverse(), e);
|
|
474
|
+
return [n, r];
|
|
475
|
+
}
|
|
476
|
+
function On(e) {
|
|
477
|
+
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
478
|
+
acceptNode: (r) => {
|
|
479
|
+
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
480
|
+
return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
484
|
+
return t;
|
|
485
|
+
}
|
|
486
|
+
function tn(e, t) {
|
|
487
|
+
for (const n of e)
|
|
488
|
+
if (!Lo(n, { upTo: t })) return n;
|
|
489
|
+
}
|
|
490
|
+
function Lo(e, { upTo: t }) {
|
|
491
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
492
|
+
for (; e; ) {
|
|
493
|
+
if (t !== void 0 && e === t) return !1;
|
|
494
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
495
|
+
e = e.parentElement;
|
|
496
|
+
}
|
|
497
|
+
return !1;
|
|
498
|
+
}
|
|
499
|
+
function Fo(e) {
|
|
500
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
501
|
+
}
|
|
502
|
+
function se(e, { select: t = !1 } = {}) {
|
|
503
|
+
if (e && e.focus) {
|
|
504
|
+
const n = document.activeElement;
|
|
505
|
+
e.focus({ preventScroll: !0 }), e !== n && Fo(e) && t && e.select();
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
var nn = ko();
|
|
509
|
+
function ko() {
|
|
510
|
+
let e = [];
|
|
511
|
+
return {
|
|
512
|
+
add(t) {
|
|
513
|
+
const n = e[0];
|
|
514
|
+
t !== n && (n == null || n.pause()), e = rn(e, t), e.unshift(t);
|
|
515
|
+
},
|
|
516
|
+
remove(t) {
|
|
517
|
+
var n;
|
|
518
|
+
e = rn(e, t), (n = e[0]) == null || n.resume();
|
|
519
|
+
}
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
function rn(e, t) {
|
|
523
|
+
const n = [...e], r = n.indexOf(t);
|
|
524
|
+
return r !== -1 && n.splice(r, 1), n;
|
|
525
|
+
}
|
|
526
|
+
function $o(e) {
|
|
527
|
+
return e.filter((t) => t.tagName !== "A");
|
|
528
|
+
}
|
|
529
|
+
var Bo = a[" useId ".trim().toString()] || (() => {
|
|
530
|
+
}), Wo = 0;
|
|
531
|
+
function Oe(e) {
|
|
532
|
+
const [t, n] = a.useState(Bo());
|
|
533
|
+
return ce(() => {
|
|
534
|
+
n((r) => r ?? String(Wo++));
|
|
535
|
+
}, [e]), t ? `radix-${t}` : "";
|
|
536
|
+
}
|
|
537
|
+
const Uo = ["top", "right", "bottom", "left"], ae = Math.min, V = Math.max, Je = Math.round, Ge = Math.floor, J = (e) => ({
|
|
538
|
+
x: e,
|
|
539
|
+
y: e
|
|
540
|
+
}), Ko = {
|
|
541
|
+
left: "right",
|
|
542
|
+
right: "left",
|
|
543
|
+
bottom: "top",
|
|
544
|
+
top: "bottom"
|
|
545
|
+
}, Go = {
|
|
546
|
+
start: "end",
|
|
547
|
+
end: "start"
|
|
548
|
+
};
|
|
549
|
+
function xt(e, t, n) {
|
|
550
|
+
return V(e, ae(t, n));
|
|
551
|
+
}
|
|
552
|
+
function oe(e, t) {
|
|
553
|
+
return typeof e == "function" ? e(t) : e;
|
|
554
|
+
}
|
|
555
|
+
function ie(e) {
|
|
556
|
+
return e.split("-")[0];
|
|
557
|
+
}
|
|
558
|
+
function Ce(e) {
|
|
559
|
+
return e.split("-")[1];
|
|
560
|
+
}
|
|
561
|
+
function _t(e) {
|
|
562
|
+
return e === "x" ? "y" : "x";
|
|
563
|
+
}
|
|
564
|
+
function Tt(e) {
|
|
565
|
+
return e === "y" ? "height" : "width";
|
|
566
|
+
}
|
|
567
|
+
const Vo = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
568
|
+
function Q(e) {
|
|
569
|
+
return Vo.has(ie(e)) ? "y" : "x";
|
|
570
|
+
}
|
|
571
|
+
function It(e) {
|
|
572
|
+
return _t(Q(e));
|
|
573
|
+
}
|
|
574
|
+
function Ho(e, t, n) {
|
|
575
|
+
n === void 0 && (n = !1);
|
|
576
|
+
const r = Ce(e), o = It(e), i = Tt(o);
|
|
577
|
+
let s = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
578
|
+
return t.reference[i] > t.floating[i] && (s = et(s)), [s, et(s)];
|
|
579
|
+
}
|
|
580
|
+
function zo(e) {
|
|
581
|
+
const t = et(e);
|
|
582
|
+
return [St(e), t, St(t)];
|
|
583
|
+
}
|
|
584
|
+
function St(e) {
|
|
585
|
+
return e.replace(/start|end/g, (t) => Go[t]);
|
|
586
|
+
}
|
|
587
|
+
const on = ["left", "right"], sn = ["right", "left"], Yo = ["top", "bottom"], jo = ["bottom", "top"];
|
|
588
|
+
function Xo(e, t, n) {
|
|
589
|
+
switch (e) {
|
|
590
|
+
case "top":
|
|
591
|
+
case "bottom":
|
|
592
|
+
return n ? t ? sn : on : t ? on : sn;
|
|
593
|
+
case "left":
|
|
594
|
+
case "right":
|
|
595
|
+
return t ? Yo : jo;
|
|
596
|
+
default:
|
|
597
|
+
return [];
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
function Zo(e, t, n, r) {
|
|
601
|
+
const o = Ce(e);
|
|
602
|
+
let i = Xo(ie(e), n === "start", r);
|
|
603
|
+
return o && (i = i.map((s) => s + "-" + o), t && (i = i.concat(i.map(St)))), i;
|
|
604
|
+
}
|
|
605
|
+
function et(e) {
|
|
606
|
+
return e.replace(/left|right|bottom|top/g, (t) => Ko[t]);
|
|
607
|
+
}
|
|
608
|
+
function qo(e) {
|
|
609
|
+
return {
|
|
610
|
+
top: 0,
|
|
611
|
+
right: 0,
|
|
612
|
+
bottom: 0,
|
|
613
|
+
left: 0,
|
|
614
|
+
...e
|
|
615
|
+
};
|
|
616
|
+
}
|
|
617
|
+
function _n(e) {
|
|
618
|
+
return typeof e != "number" ? qo(e) : {
|
|
619
|
+
top: e,
|
|
620
|
+
right: e,
|
|
621
|
+
bottom: e,
|
|
622
|
+
left: e
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
function tt(e) {
|
|
626
|
+
const {
|
|
627
|
+
x: t,
|
|
628
|
+
y: n,
|
|
629
|
+
width: r,
|
|
630
|
+
height: o
|
|
631
|
+
} = e;
|
|
632
|
+
return {
|
|
633
|
+
width: r,
|
|
634
|
+
height: o,
|
|
635
|
+
top: n,
|
|
636
|
+
left: t,
|
|
637
|
+
right: t + r,
|
|
638
|
+
bottom: n + o,
|
|
639
|
+
x: t,
|
|
640
|
+
y: n
|
|
641
|
+
};
|
|
642
|
+
}
|
|
643
|
+
function cn(e, t, n) {
|
|
644
|
+
let {
|
|
645
|
+
reference: r,
|
|
646
|
+
floating: o
|
|
647
|
+
} = e;
|
|
648
|
+
const i = Q(t), s = It(t), c = Tt(s), d = ie(t), l = i === "y", f = r.x + r.width / 2 - o.width / 2, u = r.y + r.height / 2 - o.height / 2, p = r[c] / 2 - o[c] / 2;
|
|
649
|
+
let h;
|
|
650
|
+
switch (d) {
|
|
651
|
+
case "top":
|
|
652
|
+
h = {
|
|
653
|
+
x: f,
|
|
654
|
+
y: r.y - o.height
|
|
655
|
+
};
|
|
656
|
+
break;
|
|
657
|
+
case "bottom":
|
|
658
|
+
h = {
|
|
659
|
+
x: f,
|
|
660
|
+
y: r.y + r.height
|
|
661
|
+
};
|
|
662
|
+
break;
|
|
663
|
+
case "right":
|
|
664
|
+
h = {
|
|
665
|
+
x: r.x + r.width,
|
|
666
|
+
y: u
|
|
667
|
+
};
|
|
668
|
+
break;
|
|
669
|
+
case "left":
|
|
670
|
+
h = {
|
|
671
|
+
x: r.x - o.width,
|
|
672
|
+
y: u
|
|
673
|
+
};
|
|
674
|
+
break;
|
|
675
|
+
default:
|
|
676
|
+
h = {
|
|
677
|
+
x: r.x,
|
|
678
|
+
y: r.y
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
switch (Ce(t)) {
|
|
682
|
+
case "start":
|
|
683
|
+
h[s] -= p * (n && l ? -1 : 1);
|
|
684
|
+
break;
|
|
685
|
+
case "end":
|
|
686
|
+
h[s] += p * (n && l ? -1 : 1);
|
|
687
|
+
break;
|
|
688
|
+
}
|
|
689
|
+
return h;
|
|
690
|
+
}
|
|
691
|
+
const Qo = async (e, t, n) => {
|
|
692
|
+
const {
|
|
693
|
+
placement: r = "bottom",
|
|
694
|
+
strategy: o = "absolute",
|
|
695
|
+
middleware: i = [],
|
|
696
|
+
platform: s
|
|
697
|
+
} = n, c = i.filter(Boolean), d = await (s.isRTL == null ? void 0 : s.isRTL(t));
|
|
698
|
+
let l = await s.getElementRects({
|
|
699
|
+
reference: e,
|
|
700
|
+
floating: t,
|
|
701
|
+
strategy: o
|
|
702
|
+
}), {
|
|
703
|
+
x: f,
|
|
704
|
+
y: u
|
|
705
|
+
} = cn(l, r, d), p = r, h = {}, g = 0;
|
|
706
|
+
for (let m = 0; m < c.length; m++) {
|
|
707
|
+
const {
|
|
708
|
+
name: v,
|
|
709
|
+
fn: w
|
|
710
|
+
} = c[m], {
|
|
711
|
+
x: C,
|
|
712
|
+
y: b,
|
|
713
|
+
data: E,
|
|
714
|
+
reset: x
|
|
715
|
+
} = await w({
|
|
716
|
+
x: f,
|
|
717
|
+
y: u,
|
|
718
|
+
initialPlacement: r,
|
|
719
|
+
placement: p,
|
|
720
|
+
strategy: o,
|
|
721
|
+
middlewareData: h,
|
|
722
|
+
rects: l,
|
|
723
|
+
platform: s,
|
|
724
|
+
elements: {
|
|
725
|
+
reference: e,
|
|
726
|
+
floating: t
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
f = C ?? f, u = b ?? u, h = {
|
|
730
|
+
...h,
|
|
731
|
+
[v]: {
|
|
732
|
+
...h[v],
|
|
733
|
+
...E
|
|
734
|
+
}
|
|
735
|
+
}, x && g <= 50 && (g++, typeof x == "object" && (x.placement && (p = x.placement), x.rects && (l = x.rects === !0 ? await s.getElementRects({
|
|
736
|
+
reference: e,
|
|
737
|
+
floating: t,
|
|
738
|
+
strategy: o
|
|
739
|
+
}) : x.rects), {
|
|
740
|
+
x: f,
|
|
741
|
+
y: u
|
|
742
|
+
} = cn(l, p, d)), m = -1);
|
|
743
|
+
}
|
|
744
|
+
return {
|
|
745
|
+
x: f,
|
|
746
|
+
y: u,
|
|
747
|
+
placement: p,
|
|
748
|
+
strategy: o,
|
|
749
|
+
middlewareData: h
|
|
750
|
+
};
|
|
751
|
+
};
|
|
752
|
+
async function _e(e, t) {
|
|
753
|
+
var n;
|
|
754
|
+
t === void 0 && (t = {});
|
|
755
|
+
const {
|
|
756
|
+
x: r,
|
|
757
|
+
y: o,
|
|
758
|
+
platform: i,
|
|
759
|
+
rects: s,
|
|
760
|
+
elements: c,
|
|
761
|
+
strategy: d
|
|
762
|
+
} = e, {
|
|
763
|
+
boundary: l = "clippingAncestors",
|
|
764
|
+
rootBoundary: f = "viewport",
|
|
765
|
+
elementContext: u = "floating",
|
|
766
|
+
altBoundary: p = !1,
|
|
767
|
+
padding: h = 0
|
|
768
|
+
} = oe(t, e), g = _n(h), v = c[p ? u === "floating" ? "reference" : "floating" : u], w = tt(await i.getClippingRect({
|
|
769
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(c.floating)),
|
|
770
|
+
boundary: l,
|
|
771
|
+
rootBoundary: f,
|
|
772
|
+
strategy: d
|
|
773
|
+
})), C = u === "floating" ? {
|
|
774
|
+
x: r,
|
|
775
|
+
y: o,
|
|
776
|
+
width: s.floating.width,
|
|
777
|
+
height: s.floating.height
|
|
778
|
+
} : s.reference, b = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c.floating)), E = await (i.isElement == null ? void 0 : i.isElement(b)) ? await (i.getScale == null ? void 0 : i.getScale(b)) || {
|
|
779
|
+
x: 1,
|
|
780
|
+
y: 1
|
|
781
|
+
} : {
|
|
782
|
+
x: 1,
|
|
783
|
+
y: 1
|
|
784
|
+
}, x = tt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
785
|
+
elements: c,
|
|
786
|
+
rect: C,
|
|
787
|
+
offsetParent: b,
|
|
788
|
+
strategy: d
|
|
789
|
+
}) : C);
|
|
790
|
+
return {
|
|
791
|
+
top: (w.top - x.top + g.top) / E.y,
|
|
792
|
+
bottom: (x.bottom - w.bottom + g.bottom) / E.y,
|
|
793
|
+
left: (w.left - x.left + g.left) / E.x,
|
|
794
|
+
right: (x.right - w.right + g.right) / E.x
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
const Jo = (e) => ({
|
|
798
|
+
name: "arrow",
|
|
799
|
+
options: e,
|
|
800
|
+
async fn(t) {
|
|
801
|
+
const {
|
|
802
|
+
x: n,
|
|
803
|
+
y: r,
|
|
804
|
+
placement: o,
|
|
805
|
+
rects: i,
|
|
806
|
+
platform: s,
|
|
807
|
+
elements: c,
|
|
808
|
+
middlewareData: d
|
|
809
|
+
} = t, {
|
|
810
|
+
element: l,
|
|
811
|
+
padding: f = 0
|
|
812
|
+
} = oe(e, t) || {};
|
|
813
|
+
if (l == null)
|
|
814
|
+
return {};
|
|
815
|
+
const u = _n(f), p = {
|
|
816
|
+
x: n,
|
|
817
|
+
y: r
|
|
818
|
+
}, h = It(o), g = Tt(h), m = await s.getDimensions(l), v = h === "y", w = v ? "top" : "left", C = v ? "bottom" : "right", b = v ? "clientHeight" : "clientWidth", E = i.reference[g] + i.reference[h] - p[h] - i.floating[g], x = p[h] - i.reference[h], M = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l));
|
|
819
|
+
let S = M ? M[b] : 0;
|
|
820
|
+
(!S || !await (s.isElement == null ? void 0 : s.isElement(M))) && (S = c.floating[b] || i.floating[g]);
|
|
821
|
+
const A = E / 2 - x / 2, I = S / 2 - m[g] / 2 - 1, _ = ae(u[w], I), F = ae(u[C], I), k = _, N = S - m[g] - F, D = S / 2 - m[g] / 2 + A, B = xt(k, D, N), T = !d.arrow && Ce(o) != null && D !== B && i.reference[g] / 2 - (D < k ? _ : F) - m[g] / 2 < 0, $ = T ? D < k ? D - k : D - N : 0;
|
|
822
|
+
return {
|
|
823
|
+
[h]: p[h] + $,
|
|
824
|
+
data: {
|
|
825
|
+
[h]: B,
|
|
826
|
+
centerOffset: D - B - $,
|
|
827
|
+
...T && {
|
|
828
|
+
alignmentOffset: $
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
reset: T
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
}), ei = function(e) {
|
|
835
|
+
return e === void 0 && (e = {}), {
|
|
836
|
+
name: "flip",
|
|
837
|
+
options: e,
|
|
838
|
+
async fn(t) {
|
|
839
|
+
var n, r;
|
|
840
|
+
const {
|
|
841
|
+
placement: o,
|
|
842
|
+
middlewareData: i,
|
|
843
|
+
rects: s,
|
|
844
|
+
initialPlacement: c,
|
|
845
|
+
platform: d,
|
|
846
|
+
elements: l
|
|
847
|
+
} = t, {
|
|
848
|
+
mainAxis: f = !0,
|
|
849
|
+
crossAxis: u = !0,
|
|
850
|
+
fallbackPlacements: p,
|
|
851
|
+
fallbackStrategy: h = "bestFit",
|
|
852
|
+
fallbackAxisSideDirection: g = "none",
|
|
853
|
+
flipAlignment: m = !0,
|
|
854
|
+
...v
|
|
855
|
+
} = oe(e, t);
|
|
856
|
+
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
857
|
+
return {};
|
|
858
|
+
const w = ie(o), C = Q(c), b = ie(c) === c, E = await (d.isRTL == null ? void 0 : d.isRTL(l.floating)), x = p || (b || !m ? [et(c)] : zo(c)), M = g !== "none";
|
|
859
|
+
!p && M && x.push(...Zo(c, m, g, E));
|
|
860
|
+
const S = [c, ...x], A = await _e(t, v), I = [];
|
|
861
|
+
let _ = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
862
|
+
if (f && I.push(A[w]), u) {
|
|
863
|
+
const D = Ho(o, s, E);
|
|
864
|
+
I.push(A[D[0]], A[D[1]]);
|
|
865
|
+
}
|
|
866
|
+
if (_ = [..._, {
|
|
867
|
+
placement: o,
|
|
868
|
+
overflows: I
|
|
869
|
+
}], !I.every((D) => D <= 0)) {
|
|
870
|
+
var F, k;
|
|
871
|
+
const D = (((F = i.flip) == null ? void 0 : F.index) || 0) + 1, B = S[D];
|
|
872
|
+
if (B && (!(u === "alignment" ? C !== Q(B) : !1) || // We leave the current main axis only if every placement on that axis
|
|
873
|
+
// overflows the main axis.
|
|
874
|
+
_.every((P) => Q(P.placement) === C ? P.overflows[0] > 0 : !0)))
|
|
875
|
+
return {
|
|
876
|
+
data: {
|
|
877
|
+
index: D,
|
|
878
|
+
overflows: _
|
|
879
|
+
},
|
|
880
|
+
reset: {
|
|
881
|
+
placement: B
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
let T = (k = _.filter(($) => $.overflows[0] <= 0).sort(($, P) => $.overflows[1] - P.overflows[1])[0]) == null ? void 0 : k.placement;
|
|
885
|
+
if (!T)
|
|
886
|
+
switch (h) {
|
|
887
|
+
case "bestFit": {
|
|
888
|
+
var N;
|
|
889
|
+
const $ = (N = _.filter((P) => {
|
|
890
|
+
if (M) {
|
|
891
|
+
const R = Q(P.placement);
|
|
892
|
+
return R === C || // Create a bias to the `y` side axis due to horizontal
|
|
893
|
+
// reading directions favoring greater width.
|
|
894
|
+
R === "y";
|
|
895
|
+
}
|
|
896
|
+
return !0;
|
|
897
|
+
}).map((P) => [P.placement, P.overflows.filter((R) => R > 0).reduce((R, L) => R + L, 0)]).sort((P, R) => P[1] - R[1])[0]) == null ? void 0 : N[0];
|
|
898
|
+
$ && (T = $);
|
|
899
|
+
break;
|
|
900
|
+
}
|
|
901
|
+
case "initialPlacement":
|
|
902
|
+
T = c;
|
|
903
|
+
break;
|
|
904
|
+
}
|
|
905
|
+
if (o !== T)
|
|
906
|
+
return {
|
|
907
|
+
reset: {
|
|
908
|
+
placement: T
|
|
909
|
+
}
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
return {};
|
|
913
|
+
}
|
|
914
|
+
};
|
|
915
|
+
};
|
|
916
|
+
function an(e, t) {
|
|
917
|
+
return {
|
|
918
|
+
top: e.top - t.height,
|
|
919
|
+
right: e.right - t.width,
|
|
920
|
+
bottom: e.bottom - t.height,
|
|
921
|
+
left: e.left - t.width
|
|
922
|
+
};
|
|
923
|
+
}
|
|
924
|
+
function un(e) {
|
|
925
|
+
return Uo.some((t) => e[t] >= 0);
|
|
926
|
+
}
|
|
927
|
+
const ti = function(e) {
|
|
928
|
+
return e === void 0 && (e = {}), {
|
|
929
|
+
name: "hide",
|
|
930
|
+
options: e,
|
|
931
|
+
async fn(t) {
|
|
932
|
+
const {
|
|
933
|
+
rects: n
|
|
934
|
+
} = t, {
|
|
935
|
+
strategy: r = "referenceHidden",
|
|
936
|
+
...o
|
|
937
|
+
} = oe(e, t);
|
|
938
|
+
switch (r) {
|
|
939
|
+
case "referenceHidden": {
|
|
940
|
+
const i = await _e(t, {
|
|
941
|
+
...o,
|
|
942
|
+
elementContext: "reference"
|
|
943
|
+
}), s = an(i, n.reference);
|
|
944
|
+
return {
|
|
945
|
+
data: {
|
|
946
|
+
referenceHiddenOffsets: s,
|
|
947
|
+
referenceHidden: un(s)
|
|
948
|
+
}
|
|
949
|
+
};
|
|
950
|
+
}
|
|
951
|
+
case "escaped": {
|
|
952
|
+
const i = await _e(t, {
|
|
953
|
+
...o,
|
|
954
|
+
altBoundary: !0
|
|
955
|
+
}), s = an(i, n.floating);
|
|
956
|
+
return {
|
|
957
|
+
data: {
|
|
958
|
+
escapedOffsets: s,
|
|
959
|
+
escaped: un(s)
|
|
960
|
+
}
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
default:
|
|
964
|
+
return {};
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
};
|
|
968
|
+
}, Tn = /* @__PURE__ */ new Set(["left", "top"]);
|
|
969
|
+
async function ni(e, t) {
|
|
970
|
+
const {
|
|
971
|
+
placement: n,
|
|
972
|
+
platform: r,
|
|
973
|
+
elements: o
|
|
974
|
+
} = e, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), s = ie(n), c = Ce(n), d = Q(n) === "y", l = Tn.has(s) ? -1 : 1, f = i && d ? -1 : 1, u = oe(t, e);
|
|
975
|
+
let {
|
|
976
|
+
mainAxis: p,
|
|
977
|
+
crossAxis: h,
|
|
978
|
+
alignmentAxis: g
|
|
979
|
+
} = typeof u == "number" ? {
|
|
980
|
+
mainAxis: u,
|
|
981
|
+
crossAxis: 0,
|
|
982
|
+
alignmentAxis: null
|
|
983
|
+
} : {
|
|
984
|
+
mainAxis: u.mainAxis || 0,
|
|
985
|
+
crossAxis: u.crossAxis || 0,
|
|
986
|
+
alignmentAxis: u.alignmentAxis
|
|
987
|
+
};
|
|
988
|
+
return c && typeof g == "number" && (h = c === "end" ? g * -1 : g), d ? {
|
|
989
|
+
x: h * f,
|
|
990
|
+
y: p * l
|
|
991
|
+
} : {
|
|
992
|
+
x: p * l,
|
|
993
|
+
y: h * f
|
|
994
|
+
};
|
|
995
|
+
}
|
|
996
|
+
const ri = function(e) {
|
|
997
|
+
return e === void 0 && (e = 0), {
|
|
998
|
+
name: "offset",
|
|
999
|
+
options: e,
|
|
1000
|
+
async fn(t) {
|
|
1001
|
+
var n, r;
|
|
1002
|
+
const {
|
|
1003
|
+
x: o,
|
|
1004
|
+
y: i,
|
|
1005
|
+
placement: s,
|
|
1006
|
+
middlewareData: c
|
|
1007
|
+
} = t, d = await ni(t, e);
|
|
1008
|
+
return s === ((n = c.offset) == null ? void 0 : n.placement) && (r = c.arrow) != null && r.alignmentOffset ? {} : {
|
|
1009
|
+
x: o + d.x,
|
|
1010
|
+
y: i + d.y,
|
|
1011
|
+
data: {
|
|
1012
|
+
...d,
|
|
1013
|
+
placement: s
|
|
1014
|
+
}
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
};
|
|
1018
|
+
}, oi = function(e) {
|
|
1019
|
+
return e === void 0 && (e = {}), {
|
|
1020
|
+
name: "shift",
|
|
1021
|
+
options: e,
|
|
1022
|
+
async fn(t) {
|
|
1023
|
+
const {
|
|
1024
|
+
x: n,
|
|
1025
|
+
y: r,
|
|
1026
|
+
placement: o
|
|
1027
|
+
} = t, {
|
|
1028
|
+
mainAxis: i = !0,
|
|
1029
|
+
crossAxis: s = !1,
|
|
1030
|
+
limiter: c = {
|
|
1031
|
+
fn: (v) => {
|
|
1032
|
+
let {
|
|
1033
|
+
x: w,
|
|
1034
|
+
y: C
|
|
1035
|
+
} = v;
|
|
1036
|
+
return {
|
|
1037
|
+
x: w,
|
|
1038
|
+
y: C
|
|
1039
|
+
};
|
|
1040
|
+
}
|
|
1041
|
+
},
|
|
1042
|
+
...d
|
|
1043
|
+
} = oe(e, t), l = {
|
|
1044
|
+
x: n,
|
|
1045
|
+
y: r
|
|
1046
|
+
}, f = await _e(t, d), u = Q(ie(o)), p = _t(u);
|
|
1047
|
+
let h = l[p], g = l[u];
|
|
1048
|
+
if (i) {
|
|
1049
|
+
const v = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", C = h + f[v], b = h - f[w];
|
|
1050
|
+
h = xt(C, h, b);
|
|
1051
|
+
}
|
|
1052
|
+
if (s) {
|
|
1053
|
+
const v = u === "y" ? "top" : "left", w = u === "y" ? "bottom" : "right", C = g + f[v], b = g - f[w];
|
|
1054
|
+
g = xt(C, g, b);
|
|
1055
|
+
}
|
|
1056
|
+
const m = c.fn({
|
|
1057
|
+
...t,
|
|
1058
|
+
[p]: h,
|
|
1059
|
+
[u]: g
|
|
1060
|
+
});
|
|
1061
|
+
return {
|
|
1062
|
+
...m,
|
|
1063
|
+
data: {
|
|
1064
|
+
x: m.x - n,
|
|
1065
|
+
y: m.y - r,
|
|
1066
|
+
enabled: {
|
|
1067
|
+
[p]: i,
|
|
1068
|
+
[u]: s
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
};
|
|
1072
|
+
}
|
|
1073
|
+
};
|
|
1074
|
+
}, ii = function(e) {
|
|
1075
|
+
return e === void 0 && (e = {}), {
|
|
1076
|
+
options: e,
|
|
1077
|
+
fn(t) {
|
|
1078
|
+
const {
|
|
1079
|
+
x: n,
|
|
1080
|
+
y: r,
|
|
1081
|
+
placement: o,
|
|
1082
|
+
rects: i,
|
|
1083
|
+
middlewareData: s
|
|
1084
|
+
} = t, {
|
|
1085
|
+
offset: c = 0,
|
|
1086
|
+
mainAxis: d = !0,
|
|
1087
|
+
crossAxis: l = !0
|
|
1088
|
+
} = oe(e, t), f = {
|
|
1089
|
+
x: n,
|
|
1090
|
+
y: r
|
|
1091
|
+
}, u = Q(o), p = _t(u);
|
|
1092
|
+
let h = f[p], g = f[u];
|
|
1093
|
+
const m = oe(c, t), v = typeof m == "number" ? {
|
|
1094
|
+
mainAxis: m,
|
|
1095
|
+
crossAxis: 0
|
|
1096
|
+
} : {
|
|
1097
|
+
mainAxis: 0,
|
|
1098
|
+
crossAxis: 0,
|
|
1099
|
+
...m
|
|
1100
|
+
};
|
|
1101
|
+
if (d) {
|
|
1102
|
+
const b = p === "y" ? "height" : "width", E = i.reference[p] - i.floating[b] + v.mainAxis, x = i.reference[p] + i.reference[b] - v.mainAxis;
|
|
1103
|
+
h < E ? h = E : h > x && (h = x);
|
|
1104
|
+
}
|
|
1105
|
+
if (l) {
|
|
1106
|
+
var w, C;
|
|
1107
|
+
const b = p === "y" ? "width" : "height", E = Tn.has(ie(o)), x = i.reference[u] - i.floating[b] + (E && ((w = s.offset) == null ? void 0 : w[u]) || 0) + (E ? 0 : v.crossAxis), M = i.reference[u] + i.reference[b] + (E ? 0 : ((C = s.offset) == null ? void 0 : C[u]) || 0) - (E ? v.crossAxis : 0);
|
|
1108
|
+
g < x ? g = x : g > M && (g = M);
|
|
1109
|
+
}
|
|
1110
|
+
return {
|
|
1111
|
+
[p]: h,
|
|
1112
|
+
[u]: g
|
|
1113
|
+
};
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
1116
|
+
}, si = function(e) {
|
|
1117
|
+
return e === void 0 && (e = {}), {
|
|
1118
|
+
name: "size",
|
|
1119
|
+
options: e,
|
|
1120
|
+
async fn(t) {
|
|
1121
|
+
var n, r;
|
|
1122
|
+
const {
|
|
1123
|
+
placement: o,
|
|
1124
|
+
rects: i,
|
|
1125
|
+
platform: s,
|
|
1126
|
+
elements: c
|
|
1127
|
+
} = t, {
|
|
1128
|
+
apply: d = () => {
|
|
1129
|
+
},
|
|
1130
|
+
...l
|
|
1131
|
+
} = oe(e, t), f = await _e(t, l), u = ie(o), p = Ce(o), h = Q(o) === "y", {
|
|
1132
|
+
width: g,
|
|
1133
|
+
height: m
|
|
1134
|
+
} = i.floating;
|
|
1135
|
+
let v, w;
|
|
1136
|
+
u === "top" || u === "bottom" ? (v = u, w = p === (await (s.isRTL == null ? void 0 : s.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (w = u, v = p === "end" ? "top" : "bottom");
|
|
1137
|
+
const C = m - f.top - f.bottom, b = g - f.left - f.right, E = ae(m - f[v], C), x = ae(g - f[w], b), M = !t.middlewareData.shift;
|
|
1138
|
+
let S = E, A = x;
|
|
1139
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (A = b), (r = t.middlewareData.shift) != null && r.enabled.y && (S = C), M && !p) {
|
|
1140
|
+
const _ = V(f.left, 0), F = V(f.right, 0), k = V(f.top, 0), N = V(f.bottom, 0);
|
|
1141
|
+
h ? A = g - 2 * (_ !== 0 || F !== 0 ? _ + F : V(f.left, f.right)) : S = m - 2 * (k !== 0 || N !== 0 ? k + N : V(f.top, f.bottom));
|
|
1142
|
+
}
|
|
1143
|
+
await d({
|
|
1144
|
+
...t,
|
|
1145
|
+
availableWidth: A,
|
|
1146
|
+
availableHeight: S
|
|
1147
|
+
});
|
|
1148
|
+
const I = await s.getDimensions(c.floating);
|
|
1149
|
+
return g !== I.width || m !== I.height ? {
|
|
1150
|
+
reset: {
|
|
1151
|
+
rects: !0
|
|
1152
|
+
}
|
|
1153
|
+
} : {};
|
|
1154
|
+
}
|
|
1155
|
+
};
|
|
1156
|
+
};
|
|
1157
|
+
function st() {
|
|
1158
|
+
return typeof window < "u";
|
|
1159
|
+
}
|
|
1160
|
+
function Ee(e) {
|
|
1161
|
+
return In(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1162
|
+
}
|
|
1163
|
+
function H(e) {
|
|
1164
|
+
var t;
|
|
1165
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1166
|
+
}
|
|
1167
|
+
function ne(e) {
|
|
1168
|
+
var t;
|
|
1169
|
+
return (t = (In(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1170
|
+
}
|
|
1171
|
+
function In(e) {
|
|
1172
|
+
return st() ? e instanceof Node || e instanceof H(e).Node : !1;
|
|
1173
|
+
}
|
|
1174
|
+
function j(e) {
|
|
1175
|
+
return st() ? e instanceof Element || e instanceof H(e).Element : !1;
|
|
1176
|
+
}
|
|
1177
|
+
function te(e) {
|
|
1178
|
+
return st() ? e instanceof HTMLElement || e instanceof H(e).HTMLElement : !1;
|
|
1179
|
+
}
|
|
1180
|
+
function ln(e) {
|
|
1181
|
+
return !st() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof H(e).ShadowRoot;
|
|
1182
|
+
}
|
|
1183
|
+
const ci = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1184
|
+
function Le(e) {
|
|
1185
|
+
const {
|
|
1186
|
+
overflow: t,
|
|
1187
|
+
overflowX: n,
|
|
1188
|
+
overflowY: r,
|
|
1189
|
+
display: o
|
|
1190
|
+
} = X(e);
|
|
1191
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !ci.has(o);
|
|
1192
|
+
}
|
|
1193
|
+
const ai = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1194
|
+
function ui(e) {
|
|
1195
|
+
return ai.has(Ee(e));
|
|
1196
|
+
}
|
|
1197
|
+
const li = [":popover-open", ":modal"];
|
|
1198
|
+
function ct(e) {
|
|
1199
|
+
return li.some((t) => {
|
|
1200
|
+
try {
|
|
1201
|
+
return e.matches(t);
|
|
1202
|
+
} catch {
|
|
1203
|
+
return !1;
|
|
1204
|
+
}
|
|
1205
|
+
});
|
|
1206
|
+
}
|
|
1207
|
+
const fi = ["transform", "translate", "scale", "rotate", "perspective"], di = ["transform", "translate", "scale", "rotate", "perspective", "filter"], pi = ["paint", "layout", "strict", "content"];
|
|
1208
|
+
function Dt(e) {
|
|
1209
|
+
const t = Nt(), n = j(e) ? X(e) : e;
|
|
1210
|
+
return fi.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || di.some((r) => (n.willChange || "").includes(r)) || pi.some((r) => (n.contain || "").includes(r));
|
|
1211
|
+
}
|
|
1212
|
+
function mi(e) {
|
|
1213
|
+
let t = ue(e);
|
|
1214
|
+
for (; te(t) && !be(t); ) {
|
|
1215
|
+
if (Dt(t))
|
|
1216
|
+
return t;
|
|
1217
|
+
if (ct(t))
|
|
1218
|
+
return null;
|
|
1219
|
+
t = ue(t);
|
|
1220
|
+
}
|
|
1221
|
+
return null;
|
|
1222
|
+
}
|
|
1223
|
+
function Nt() {
|
|
1224
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1225
|
+
}
|
|
1226
|
+
const hi = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1227
|
+
function be(e) {
|
|
1228
|
+
return hi.has(Ee(e));
|
|
1229
|
+
}
|
|
1230
|
+
function X(e) {
|
|
1231
|
+
return H(e).getComputedStyle(e);
|
|
1232
|
+
}
|
|
1233
|
+
function at(e) {
|
|
1234
|
+
return j(e) ? {
|
|
1235
|
+
scrollLeft: e.scrollLeft,
|
|
1236
|
+
scrollTop: e.scrollTop
|
|
1237
|
+
} : {
|
|
1238
|
+
scrollLeft: e.scrollX,
|
|
1239
|
+
scrollTop: e.scrollY
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
function ue(e) {
|
|
1243
|
+
if (Ee(e) === "html")
|
|
1244
|
+
return e;
|
|
1245
|
+
const t = (
|
|
1246
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
1247
|
+
e.assignedSlot || // DOM Element detected.
|
|
1248
|
+
e.parentNode || // ShadowRoot detected.
|
|
1249
|
+
ln(e) && e.host || // Fallback.
|
|
1250
|
+
ne(e)
|
|
1251
|
+
);
|
|
1252
|
+
return ln(t) ? t.host : t;
|
|
1253
|
+
}
|
|
1254
|
+
function Dn(e) {
|
|
1255
|
+
const t = ue(e);
|
|
1256
|
+
return be(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : te(t) && Le(t) ? t : Dn(t);
|
|
1257
|
+
}
|
|
1258
|
+
function Te(e, t, n) {
|
|
1259
|
+
var r;
|
|
1260
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1261
|
+
const o = Dn(e), i = o === ((r = e.ownerDocument) == null ? void 0 : r.body), s = H(o);
|
|
1262
|
+
if (i) {
|
|
1263
|
+
const c = Rt(s);
|
|
1264
|
+
return t.concat(s, s.visualViewport || [], Le(o) ? o : [], c && n ? Te(c) : []);
|
|
1265
|
+
}
|
|
1266
|
+
return t.concat(o, Te(o, [], n));
|
|
1267
|
+
}
|
|
1268
|
+
function Rt(e) {
|
|
1269
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1270
|
+
}
|
|
1271
|
+
function Nn(e) {
|
|
1272
|
+
const t = X(e);
|
|
1273
|
+
let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
|
|
1274
|
+
const o = te(e), i = o ? e.offsetWidth : n, s = o ? e.offsetHeight : r, c = Je(n) !== i || Je(r) !== s;
|
|
1275
|
+
return c && (n = i, r = s), {
|
|
1276
|
+
width: n,
|
|
1277
|
+
height: r,
|
|
1278
|
+
$: c
|
|
1279
|
+
};
|
|
1280
|
+
}
|
|
1281
|
+
function Lt(e) {
|
|
1282
|
+
return j(e) ? e : e.contextElement;
|
|
1283
|
+
}
|
|
1284
|
+
function we(e) {
|
|
1285
|
+
const t = Lt(e);
|
|
1286
|
+
if (!te(t))
|
|
1287
|
+
return J(1);
|
|
1288
|
+
const n = t.getBoundingClientRect(), {
|
|
1289
|
+
width: r,
|
|
1290
|
+
height: o,
|
|
1291
|
+
$: i
|
|
1292
|
+
} = Nn(t);
|
|
1293
|
+
let s = (i ? Je(n.width) : n.width) / r, c = (i ? Je(n.height) : n.height) / o;
|
|
1294
|
+
return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
1295
|
+
x: s,
|
|
1296
|
+
y: c
|
|
1297
|
+
};
|
|
1298
|
+
}
|
|
1299
|
+
const vi = /* @__PURE__ */ J(0);
|
|
1300
|
+
function Ln(e) {
|
|
1301
|
+
const t = H(e);
|
|
1302
|
+
return !Nt() || !t.visualViewport ? vi : {
|
|
1303
|
+
x: t.visualViewport.offsetLeft,
|
|
1304
|
+
y: t.visualViewport.offsetTop
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1307
|
+
function gi(e, t, n) {
|
|
1308
|
+
return t === void 0 && (t = !1), !n || t && n !== H(e) ? !1 : t;
|
|
1309
|
+
}
|
|
1310
|
+
function pe(e, t, n, r) {
|
|
1311
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1312
|
+
const o = e.getBoundingClientRect(), i = Lt(e);
|
|
1313
|
+
let s = J(1);
|
|
1314
|
+
t && (r ? j(r) && (s = we(r)) : s = we(e));
|
|
1315
|
+
const c = gi(i, n, r) ? Ln(i) : J(0);
|
|
1316
|
+
let d = (o.left + c.x) / s.x, l = (o.top + c.y) / s.y, f = o.width / s.x, u = o.height / s.y;
|
|
1317
|
+
if (i) {
|
|
1318
|
+
const p = H(i), h = r && j(r) ? H(r) : r;
|
|
1319
|
+
let g = p, m = Rt(g);
|
|
1320
|
+
for (; m && r && h !== g; ) {
|
|
1321
|
+
const v = we(m), w = m.getBoundingClientRect(), C = X(m), b = w.left + (m.clientLeft + parseFloat(C.paddingLeft)) * v.x, E = w.top + (m.clientTop + parseFloat(C.paddingTop)) * v.y;
|
|
1322
|
+
d *= v.x, l *= v.y, f *= v.x, u *= v.y, d += b, l += E, g = H(m), m = Rt(g);
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
return tt({
|
|
1326
|
+
width: f,
|
|
1327
|
+
height: u,
|
|
1328
|
+
x: d,
|
|
1329
|
+
y: l
|
|
1330
|
+
});
|
|
1331
|
+
}
|
|
1332
|
+
function Ft(e, t) {
|
|
1333
|
+
const n = at(e).scrollLeft;
|
|
1334
|
+
return t ? t.left + n : pe(ne(e)).left + n;
|
|
1335
|
+
}
|
|
1336
|
+
function Fn(e, t, n) {
|
|
1337
|
+
n === void 0 && (n = !1);
|
|
1338
|
+
const r = e.getBoundingClientRect(), o = r.left + t.scrollLeft - (n ? 0 : (
|
|
1339
|
+
// RTL <body> scrollbar.
|
|
1340
|
+
Ft(e, r)
|
|
1341
|
+
)), i = r.top + t.scrollTop;
|
|
1342
|
+
return {
|
|
1343
|
+
x: o,
|
|
1344
|
+
y: i
|
|
1345
|
+
};
|
|
1346
|
+
}
|
|
1347
|
+
function wi(e) {
|
|
1348
|
+
let {
|
|
1349
|
+
elements: t,
|
|
1350
|
+
rect: n,
|
|
1351
|
+
offsetParent: r,
|
|
1352
|
+
strategy: o
|
|
1353
|
+
} = e;
|
|
1354
|
+
const i = o === "fixed", s = ne(r), c = t ? ct(t.floating) : !1;
|
|
1355
|
+
if (r === s || c && i)
|
|
1356
|
+
return n;
|
|
1357
|
+
let d = {
|
|
1358
|
+
scrollLeft: 0,
|
|
1359
|
+
scrollTop: 0
|
|
1360
|
+
}, l = J(1);
|
|
1361
|
+
const f = J(0), u = te(r);
|
|
1362
|
+
if ((u || !u && !i) && ((Ee(r) !== "body" || Le(s)) && (d = at(r)), te(r))) {
|
|
1363
|
+
const h = pe(r);
|
|
1364
|
+
l = we(r), f.x = h.x + r.clientLeft, f.y = h.y + r.clientTop;
|
|
1365
|
+
}
|
|
1366
|
+
const p = s && !u && !i ? Fn(s, d, !0) : J(0);
|
|
1367
|
+
return {
|
|
1368
|
+
width: n.width * l.x,
|
|
1369
|
+
height: n.height * l.y,
|
|
1370
|
+
x: n.x * l.x - d.scrollLeft * l.x + f.x + p.x,
|
|
1371
|
+
y: n.y * l.y - d.scrollTop * l.y + f.y + p.y
|
|
1372
|
+
};
|
|
1373
|
+
}
|
|
1374
|
+
function yi(e) {
|
|
1375
|
+
return Array.from(e.getClientRects());
|
|
1376
|
+
}
|
|
1377
|
+
function bi(e) {
|
|
1378
|
+
const t = ne(e), n = at(e), r = e.ownerDocument.body, o = V(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = V(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
1379
|
+
let s = -n.scrollLeft + Ft(e);
|
|
1380
|
+
const c = -n.scrollTop;
|
|
1381
|
+
return X(r).direction === "rtl" && (s += V(t.clientWidth, r.clientWidth) - o), {
|
|
1382
|
+
width: o,
|
|
1383
|
+
height: i,
|
|
1384
|
+
x: s,
|
|
1385
|
+
y: c
|
|
1386
|
+
};
|
|
1387
|
+
}
|
|
1388
|
+
function Ci(e, t) {
|
|
1389
|
+
const n = H(e), r = ne(e), o = n.visualViewport;
|
|
1390
|
+
let i = r.clientWidth, s = r.clientHeight, c = 0, d = 0;
|
|
1391
|
+
if (o) {
|
|
1392
|
+
i = o.width, s = o.height;
|
|
1393
|
+
const l = Nt();
|
|
1394
|
+
(!l || l && t === "fixed") && (c = o.offsetLeft, d = o.offsetTop);
|
|
1395
|
+
}
|
|
1396
|
+
return {
|
|
1397
|
+
width: i,
|
|
1398
|
+
height: s,
|
|
1399
|
+
x: c,
|
|
1400
|
+
y: d
|
|
1401
|
+
};
|
|
1402
|
+
}
|
|
1403
|
+
const Ei = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1404
|
+
function xi(e, t) {
|
|
1405
|
+
const n = pe(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = te(e) ? we(e) : J(1), s = e.clientWidth * i.x, c = e.clientHeight * i.y, d = o * i.x, l = r * i.y;
|
|
1406
|
+
return {
|
|
1407
|
+
width: s,
|
|
1408
|
+
height: c,
|
|
1409
|
+
x: d,
|
|
1410
|
+
y: l
|
|
1411
|
+
};
|
|
1412
|
+
}
|
|
1413
|
+
function fn(e, t, n) {
|
|
1414
|
+
let r;
|
|
1415
|
+
if (t === "viewport")
|
|
1416
|
+
r = Ci(e, n);
|
|
1417
|
+
else if (t === "document")
|
|
1418
|
+
r = bi(ne(e));
|
|
1419
|
+
else if (j(t))
|
|
1420
|
+
r = xi(t, n);
|
|
1421
|
+
else {
|
|
1422
|
+
const o = Ln(e);
|
|
1423
|
+
r = {
|
|
1424
|
+
x: t.x - o.x,
|
|
1425
|
+
y: t.y - o.y,
|
|
1426
|
+
width: t.width,
|
|
1427
|
+
height: t.height
|
|
1428
|
+
};
|
|
1429
|
+
}
|
|
1430
|
+
return tt(r);
|
|
1431
|
+
}
|
|
1432
|
+
function kn(e, t) {
|
|
1433
|
+
const n = ue(e);
|
|
1434
|
+
return n === t || !j(n) || be(n) ? !1 : X(n).position === "fixed" || kn(n, t);
|
|
1435
|
+
}
|
|
1436
|
+
function Si(e, t) {
|
|
1437
|
+
const n = t.get(e);
|
|
1438
|
+
if (n)
|
|
1439
|
+
return n;
|
|
1440
|
+
let r = Te(e, [], !1).filter((c) => j(c) && Ee(c) !== "body"), o = null;
|
|
1441
|
+
const i = X(e).position === "fixed";
|
|
1442
|
+
let s = i ? ue(e) : e;
|
|
1443
|
+
for (; j(s) && !be(s); ) {
|
|
1444
|
+
const c = X(s), d = Dt(s);
|
|
1445
|
+
!d && c.position === "fixed" && (o = null), (i ? !d && !o : !d && c.position === "static" && !!o && Ei.has(o.position) || Le(s) && !d && kn(e, s)) ? r = r.filter((f) => f !== s) : o = c, s = ue(s);
|
|
1446
|
+
}
|
|
1447
|
+
return t.set(e, r), r;
|
|
1448
|
+
}
|
|
1449
|
+
function Ri(e) {
|
|
1450
|
+
let {
|
|
1451
|
+
element: t,
|
|
1452
|
+
boundary: n,
|
|
1453
|
+
rootBoundary: r,
|
|
1454
|
+
strategy: o
|
|
1455
|
+
} = e;
|
|
1456
|
+
const s = [...n === "clippingAncestors" ? ct(t) ? [] : Si(t, this._c) : [].concat(n), r], c = s[0], d = s.reduce((l, f) => {
|
|
1457
|
+
const u = fn(t, f, o);
|
|
1458
|
+
return l.top = V(u.top, l.top), l.right = ae(u.right, l.right), l.bottom = ae(u.bottom, l.bottom), l.left = V(u.left, l.left), l;
|
|
1459
|
+
}, fn(t, c, o));
|
|
1460
|
+
return {
|
|
1461
|
+
width: d.right - d.left,
|
|
1462
|
+
height: d.bottom - d.top,
|
|
1463
|
+
x: d.left,
|
|
1464
|
+
y: d.top
|
|
1465
|
+
};
|
|
1466
|
+
}
|
|
1467
|
+
function Mi(e) {
|
|
1468
|
+
const {
|
|
1469
|
+
width: t,
|
|
1470
|
+
height: n
|
|
1471
|
+
} = Nn(e);
|
|
1472
|
+
return {
|
|
1473
|
+
width: t,
|
|
1474
|
+
height: n
|
|
1475
|
+
};
|
|
1476
|
+
}
|
|
1477
|
+
function Ai(e, t, n) {
|
|
1478
|
+
const r = te(t), o = ne(t), i = n === "fixed", s = pe(e, !0, i, t);
|
|
1479
|
+
let c = {
|
|
1480
|
+
scrollLeft: 0,
|
|
1481
|
+
scrollTop: 0
|
|
1482
|
+
};
|
|
1483
|
+
const d = J(0);
|
|
1484
|
+
function l() {
|
|
1485
|
+
d.x = Ft(o);
|
|
1486
|
+
}
|
|
1487
|
+
if (r || !r && !i)
|
|
1488
|
+
if ((Ee(t) !== "body" || Le(o)) && (c = at(t)), r) {
|
|
1489
|
+
const h = pe(t, !0, i, t);
|
|
1490
|
+
d.x = h.x + t.clientLeft, d.y = h.y + t.clientTop;
|
|
1491
|
+
} else o && l();
|
|
1492
|
+
i && !r && o && l();
|
|
1493
|
+
const f = o && !r && !i ? Fn(o, c) : J(0), u = s.left + c.scrollLeft - d.x - f.x, p = s.top + c.scrollTop - d.y - f.y;
|
|
1494
|
+
return {
|
|
1495
|
+
x: u,
|
|
1496
|
+
y: p,
|
|
1497
|
+
width: s.width,
|
|
1498
|
+
height: s.height
|
|
1499
|
+
};
|
|
1500
|
+
}
|
|
1501
|
+
function ht(e) {
|
|
1502
|
+
return X(e).position === "static";
|
|
1503
|
+
}
|
|
1504
|
+
function dn(e, t) {
|
|
1505
|
+
if (!te(e) || X(e).position === "fixed")
|
|
1506
|
+
return null;
|
|
1507
|
+
if (t)
|
|
1508
|
+
return t(e);
|
|
1509
|
+
let n = e.offsetParent;
|
|
1510
|
+
return ne(e) === n && (n = n.ownerDocument.body), n;
|
|
1511
|
+
}
|
|
1512
|
+
function $n(e, t) {
|
|
1513
|
+
const n = H(e);
|
|
1514
|
+
if (ct(e))
|
|
1515
|
+
return n;
|
|
1516
|
+
if (!te(e)) {
|
|
1517
|
+
let o = ue(e);
|
|
1518
|
+
for (; o && !be(o); ) {
|
|
1519
|
+
if (j(o) && !ht(o))
|
|
1520
|
+
return o;
|
|
1521
|
+
o = ue(o);
|
|
1522
|
+
}
|
|
1523
|
+
return n;
|
|
1524
|
+
}
|
|
1525
|
+
let r = dn(e, t);
|
|
1526
|
+
for (; r && ui(r) && ht(r); )
|
|
1527
|
+
r = dn(r, t);
|
|
1528
|
+
return r && be(r) && ht(r) && !Dt(r) ? n : r || mi(e) || n;
|
|
1529
|
+
}
|
|
1530
|
+
const Pi = async function(e) {
|
|
1531
|
+
const t = this.getOffsetParent || $n, n = this.getDimensions, r = await n(e.floating);
|
|
1532
|
+
return {
|
|
1533
|
+
reference: Ai(e.reference, await t(e.floating), e.strategy),
|
|
1534
|
+
floating: {
|
|
1535
|
+
x: 0,
|
|
1536
|
+
y: 0,
|
|
1537
|
+
width: r.width,
|
|
1538
|
+
height: r.height
|
|
1539
|
+
}
|
|
1540
|
+
};
|
|
1541
|
+
};
|
|
1542
|
+
function Oi(e) {
|
|
1543
|
+
return X(e).direction === "rtl";
|
|
1544
|
+
}
|
|
1545
|
+
const _i = {
|
|
1546
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: wi,
|
|
1547
|
+
getDocumentElement: ne,
|
|
1548
|
+
getClippingRect: Ri,
|
|
1549
|
+
getOffsetParent: $n,
|
|
1550
|
+
getElementRects: Pi,
|
|
1551
|
+
getClientRects: yi,
|
|
1552
|
+
getDimensions: Mi,
|
|
1553
|
+
getScale: we,
|
|
1554
|
+
isElement: j,
|
|
1555
|
+
isRTL: Oi
|
|
1556
|
+
};
|
|
1557
|
+
function Bn(e, t) {
|
|
1558
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1559
|
+
}
|
|
1560
|
+
function Ti(e, t) {
|
|
1561
|
+
let n = null, r;
|
|
1562
|
+
const o = ne(e);
|
|
1563
|
+
function i() {
|
|
1564
|
+
var c;
|
|
1565
|
+
clearTimeout(r), (c = n) == null || c.disconnect(), n = null;
|
|
1566
|
+
}
|
|
1567
|
+
function s(c, d) {
|
|
1568
|
+
c === void 0 && (c = !1), d === void 0 && (d = 1), i();
|
|
1569
|
+
const l = e.getBoundingClientRect(), {
|
|
1570
|
+
left: f,
|
|
1571
|
+
top: u,
|
|
1572
|
+
width: p,
|
|
1573
|
+
height: h
|
|
1574
|
+
} = l;
|
|
1575
|
+
if (c || t(), !p || !h)
|
|
1576
|
+
return;
|
|
1577
|
+
const g = Ge(u), m = Ge(o.clientWidth - (f + p)), v = Ge(o.clientHeight - (u + h)), w = Ge(f), b = {
|
|
1578
|
+
rootMargin: -g + "px " + -m + "px " + -v + "px " + -w + "px",
|
|
1579
|
+
threshold: V(0, ae(1, d)) || 1
|
|
1580
|
+
};
|
|
1581
|
+
let E = !0;
|
|
1582
|
+
function x(M) {
|
|
1583
|
+
const S = M[0].intersectionRatio;
|
|
1584
|
+
if (S !== d) {
|
|
1585
|
+
if (!E)
|
|
1586
|
+
return s();
|
|
1587
|
+
S ? s(!1, S) : r = setTimeout(() => {
|
|
1588
|
+
s(!1, 1e-7);
|
|
1589
|
+
}, 1e3);
|
|
1590
|
+
}
|
|
1591
|
+
S === 1 && !Bn(l, e.getBoundingClientRect()) && s(), E = !1;
|
|
1592
|
+
}
|
|
1593
|
+
try {
|
|
1594
|
+
n = new IntersectionObserver(x, {
|
|
1595
|
+
...b,
|
|
1596
|
+
// Handle <iframe>s
|
|
1597
|
+
root: o.ownerDocument
|
|
1598
|
+
});
|
|
1599
|
+
} catch {
|
|
1600
|
+
n = new IntersectionObserver(x, b);
|
|
1601
|
+
}
|
|
1602
|
+
n.observe(e);
|
|
1603
|
+
}
|
|
1604
|
+
return s(!0), i;
|
|
1605
|
+
}
|
|
1606
|
+
function Ii(e, t, n, r) {
|
|
1607
|
+
r === void 0 && (r = {});
|
|
1608
|
+
const {
|
|
1609
|
+
ancestorScroll: o = !0,
|
|
1610
|
+
ancestorResize: i = !0,
|
|
1611
|
+
elementResize: s = typeof ResizeObserver == "function",
|
|
1612
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1613
|
+
animationFrame: d = !1
|
|
1614
|
+
} = r, l = Lt(e), f = o || i ? [...l ? Te(l) : [], ...Te(t)] : [];
|
|
1615
|
+
f.forEach((w) => {
|
|
1616
|
+
o && w.addEventListener("scroll", n, {
|
|
1617
|
+
passive: !0
|
|
1618
|
+
}), i && w.addEventListener("resize", n);
|
|
1619
|
+
});
|
|
1620
|
+
const u = l && c ? Ti(l, n) : null;
|
|
1621
|
+
let p = -1, h = null;
|
|
1622
|
+
s && (h = new ResizeObserver((w) => {
|
|
1623
|
+
let [C] = w;
|
|
1624
|
+
C && C.target === l && h && (h.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1625
|
+
var b;
|
|
1626
|
+
(b = h) == null || b.observe(t);
|
|
1627
|
+
})), n();
|
|
1628
|
+
}), l && !d && h.observe(l), h.observe(t));
|
|
1629
|
+
let g, m = d ? pe(e) : null;
|
|
1630
|
+
d && v();
|
|
1631
|
+
function v() {
|
|
1632
|
+
const w = pe(e);
|
|
1633
|
+
m && !Bn(m, w) && n(), m = w, g = requestAnimationFrame(v);
|
|
1634
|
+
}
|
|
1635
|
+
return n(), () => {
|
|
1636
|
+
var w;
|
|
1637
|
+
f.forEach((C) => {
|
|
1638
|
+
o && C.removeEventListener("scroll", n), i && C.removeEventListener("resize", n);
|
|
1639
|
+
}), u == null || u(), (w = h) == null || w.disconnect(), h = null, d && cancelAnimationFrame(g);
|
|
1640
|
+
};
|
|
1641
|
+
}
|
|
1642
|
+
const Di = ri, Ni = oi, Li = ei, Fi = si, ki = ti, pn = Jo, $i = ii, Bi = (e, t, n) => {
|
|
1643
|
+
const r = /* @__PURE__ */ new Map(), o = {
|
|
1644
|
+
platform: _i,
|
|
1645
|
+
...n
|
|
1646
|
+
}, i = {
|
|
1647
|
+
...o.platform,
|
|
1648
|
+
_c: r
|
|
1649
|
+
};
|
|
1650
|
+
return Qo(e, t, {
|
|
1651
|
+
...o,
|
|
1652
|
+
platform: i
|
|
1653
|
+
});
|
|
1654
|
+
};
|
|
1655
|
+
var Wi = typeof document < "u", Ui = function() {
|
|
1656
|
+
}, Xe = Wi ? ao : Ui;
|
|
1657
|
+
function nt(e, t) {
|
|
1658
|
+
if (e === t)
|
|
1659
|
+
return !0;
|
|
1660
|
+
if (typeof e != typeof t)
|
|
1661
|
+
return !1;
|
|
1662
|
+
if (typeof e == "function" && e.toString() === t.toString())
|
|
1663
|
+
return !0;
|
|
1664
|
+
let n, r, o;
|
|
1665
|
+
if (e && t && typeof e == "object") {
|
|
1666
|
+
if (Array.isArray(e)) {
|
|
1667
|
+
if (n = e.length, n !== t.length) return !1;
|
|
1668
|
+
for (r = n; r-- !== 0; )
|
|
1669
|
+
if (!nt(e[r], t[r]))
|
|
1670
|
+
return !1;
|
|
1671
|
+
return !0;
|
|
1672
|
+
}
|
|
1673
|
+
if (o = Object.keys(e), n = o.length, n !== Object.keys(t).length)
|
|
1674
|
+
return !1;
|
|
1675
|
+
for (r = n; r-- !== 0; )
|
|
1676
|
+
if (!{}.hasOwnProperty.call(t, o[r]))
|
|
1677
|
+
return !1;
|
|
1678
|
+
for (r = n; r-- !== 0; ) {
|
|
1679
|
+
const i = o[r];
|
|
1680
|
+
if (!(i === "_owner" && e.$$typeof) && !nt(e[i], t[i]))
|
|
1681
|
+
return !1;
|
|
1682
|
+
}
|
|
1683
|
+
return !0;
|
|
1684
|
+
}
|
|
1685
|
+
return e !== e && t !== t;
|
|
1686
|
+
}
|
|
1687
|
+
function Wn(e) {
|
|
1688
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1689
|
+
}
|
|
1690
|
+
function mn(e, t) {
|
|
1691
|
+
const n = Wn(e);
|
|
1692
|
+
return Math.round(t * n) / n;
|
|
1693
|
+
}
|
|
1694
|
+
function vt(e) {
|
|
1695
|
+
const t = a.useRef(e);
|
|
1696
|
+
return Xe(() => {
|
|
1697
|
+
t.current = e;
|
|
1698
|
+
}), t;
|
|
1699
|
+
}
|
|
1700
|
+
function Ki(e) {
|
|
1701
|
+
e === void 0 && (e = {});
|
|
1702
|
+
const {
|
|
1703
|
+
placement: t = "bottom",
|
|
1704
|
+
strategy: n = "absolute",
|
|
1705
|
+
middleware: r = [],
|
|
1706
|
+
platform: o,
|
|
1707
|
+
elements: {
|
|
1708
|
+
reference: i,
|
|
1709
|
+
floating: s
|
|
1710
|
+
} = {},
|
|
1711
|
+
transform: c = !0,
|
|
1712
|
+
whileElementsMounted: d,
|
|
1713
|
+
open: l
|
|
1714
|
+
} = e, [f, u] = a.useState({
|
|
1715
|
+
x: 0,
|
|
1716
|
+
y: 0,
|
|
1717
|
+
strategy: n,
|
|
1718
|
+
placement: t,
|
|
1719
|
+
middlewareData: {},
|
|
1720
|
+
isPositioned: !1
|
|
1721
|
+
}), [p, h] = a.useState(r);
|
|
1722
|
+
nt(p, r) || h(r);
|
|
1723
|
+
const [g, m] = a.useState(null), [v, w] = a.useState(null), C = a.useCallback((P) => {
|
|
1724
|
+
P !== M.current && (M.current = P, m(P));
|
|
1725
|
+
}, []), b = a.useCallback((P) => {
|
|
1726
|
+
P !== S.current && (S.current = P, w(P));
|
|
1727
|
+
}, []), E = i || g, x = s || v, M = a.useRef(null), S = a.useRef(null), A = a.useRef(f), I = d != null, _ = vt(d), F = vt(o), k = vt(l), N = a.useCallback(() => {
|
|
1728
|
+
if (!M.current || !S.current)
|
|
1729
|
+
return;
|
|
1730
|
+
const P = {
|
|
1731
|
+
placement: t,
|
|
1732
|
+
strategy: n,
|
|
1733
|
+
middleware: p
|
|
1734
|
+
};
|
|
1735
|
+
F.current && (P.platform = F.current), Bi(M.current, S.current, P).then((R) => {
|
|
1736
|
+
const L = {
|
|
1737
|
+
...R,
|
|
1738
|
+
// The floating element's position may be recomputed while it's closed
|
|
1739
|
+
// but still mounted (such as when transitioning out). To ensure
|
|
1740
|
+
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1741
|
+
// setting it to `true` when `open === false` (must be specified).
|
|
1742
|
+
isPositioned: k.current !== !1
|
|
1743
|
+
};
|
|
1744
|
+
D.current && !nt(A.current, L) && (A.current = L, Cn.flushSync(() => {
|
|
1745
|
+
u(L);
|
|
1746
|
+
}));
|
|
1747
|
+
});
|
|
1748
|
+
}, [p, t, n, F, k]);
|
|
1749
|
+
Xe(() => {
|
|
1750
|
+
l === !1 && A.current.isPositioned && (A.current.isPositioned = !1, u((P) => ({
|
|
1751
|
+
...P,
|
|
1752
|
+
isPositioned: !1
|
|
1753
|
+
})));
|
|
1754
|
+
}, [l]);
|
|
1755
|
+
const D = a.useRef(!1);
|
|
1756
|
+
Xe(() => (D.current = !0, () => {
|
|
1757
|
+
D.current = !1;
|
|
1758
|
+
}), []), Xe(() => {
|
|
1759
|
+
if (E && (M.current = E), x && (S.current = x), E && x) {
|
|
1760
|
+
if (_.current)
|
|
1761
|
+
return _.current(E, x, N);
|
|
1762
|
+
N();
|
|
1763
|
+
}
|
|
1764
|
+
}, [E, x, N, _, I]);
|
|
1765
|
+
const B = a.useMemo(() => ({
|
|
1766
|
+
reference: M,
|
|
1767
|
+
floating: S,
|
|
1768
|
+
setReference: C,
|
|
1769
|
+
setFloating: b
|
|
1770
|
+
}), [C, b]), T = a.useMemo(() => ({
|
|
1771
|
+
reference: E,
|
|
1772
|
+
floating: x
|
|
1773
|
+
}), [E, x]), $ = a.useMemo(() => {
|
|
1774
|
+
const P = {
|
|
1775
|
+
position: n,
|
|
1776
|
+
left: 0,
|
|
1777
|
+
top: 0
|
|
1778
|
+
};
|
|
1779
|
+
if (!T.floating)
|
|
1780
|
+
return P;
|
|
1781
|
+
const R = mn(T.floating, f.x), L = mn(T.floating, f.y);
|
|
1782
|
+
return c ? {
|
|
1783
|
+
...P,
|
|
1784
|
+
transform: "translate(" + R + "px, " + L + "px)",
|
|
1785
|
+
...Wn(T.floating) >= 1.5 && {
|
|
1786
|
+
willChange: "transform"
|
|
1787
|
+
}
|
|
1788
|
+
} : {
|
|
1789
|
+
position: n,
|
|
1790
|
+
left: R,
|
|
1791
|
+
top: L
|
|
1792
|
+
};
|
|
1793
|
+
}, [n, c, T.floating, f.x, f.y]);
|
|
1794
|
+
return a.useMemo(() => ({
|
|
1795
|
+
...f,
|
|
1796
|
+
update: N,
|
|
1797
|
+
refs: B,
|
|
1798
|
+
elements: T,
|
|
1799
|
+
floatingStyles: $
|
|
1800
|
+
}), [f, N, B, T, $]);
|
|
1801
|
+
}
|
|
1802
|
+
const Gi = (e) => {
|
|
1803
|
+
function t(n) {
|
|
1804
|
+
return {}.hasOwnProperty.call(n, "current");
|
|
1805
|
+
}
|
|
1806
|
+
return {
|
|
1807
|
+
name: "arrow",
|
|
1808
|
+
options: e,
|
|
1809
|
+
fn(n) {
|
|
1810
|
+
const {
|
|
1811
|
+
element: r,
|
|
1812
|
+
padding: o
|
|
1813
|
+
} = typeof e == "function" ? e(n) : e;
|
|
1814
|
+
return r && t(r) ? r.current != null ? pn({
|
|
1815
|
+
element: r.current,
|
|
1816
|
+
padding: o
|
|
1817
|
+
}).fn(n) : {} : r ? pn({
|
|
1818
|
+
element: r,
|
|
1819
|
+
padding: o
|
|
1820
|
+
}).fn(n) : {};
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1823
|
+
}, Vi = (e, t) => ({
|
|
1824
|
+
...Di(e),
|
|
1825
|
+
options: [e, t]
|
|
1826
|
+
}), Hi = (e, t) => ({
|
|
1827
|
+
...Ni(e),
|
|
1828
|
+
options: [e, t]
|
|
1829
|
+
}), zi = (e, t) => ({
|
|
1830
|
+
...$i(e),
|
|
1831
|
+
options: [e, t]
|
|
1832
|
+
}), Yi = (e, t) => ({
|
|
1833
|
+
...Li(e),
|
|
1834
|
+
options: [e, t]
|
|
1835
|
+
}), ji = (e, t) => ({
|
|
1836
|
+
...Fi(e),
|
|
1837
|
+
options: [e, t]
|
|
1838
|
+
}), Xi = (e, t) => ({
|
|
1839
|
+
...ki(e),
|
|
1840
|
+
options: [e, t]
|
|
1841
|
+
}), Zi = (e, t) => ({
|
|
1842
|
+
...Gi(e),
|
|
1843
|
+
options: [e, t]
|
|
1844
|
+
});
|
|
1845
|
+
var qi = "Arrow", Un = a.forwardRef((e, t) => {
|
|
1846
|
+
const { children: n, width: r = 10, height: o = 5, ...i } = e;
|
|
1847
|
+
return /* @__PURE__ */ y(
|
|
1848
|
+
K.svg,
|
|
1849
|
+
{
|
|
1850
|
+
...i,
|
|
1851
|
+
ref: t,
|
|
1852
|
+
width: r,
|
|
1853
|
+
height: o,
|
|
1854
|
+
viewBox: "0 0 30 10",
|
|
1855
|
+
preserveAspectRatio: "none",
|
|
1856
|
+
children: e.asChild ? n : /* @__PURE__ */ y("polygon", { points: "0,0 30,0 15,10" })
|
|
1857
|
+
}
|
|
1858
|
+
);
|
|
1859
|
+
});
|
|
1860
|
+
Un.displayName = qi;
|
|
1861
|
+
var Qi = Un;
|
|
1862
|
+
function Ji(e) {
|
|
1863
|
+
const [t, n] = a.useState(void 0);
|
|
1864
|
+
return ce(() => {
|
|
1865
|
+
if (e) {
|
|
1866
|
+
n({ width: e.offsetWidth, height: e.offsetHeight });
|
|
1867
|
+
const r = new ResizeObserver((o) => {
|
|
1868
|
+
if (!Array.isArray(o) || !o.length)
|
|
1869
|
+
return;
|
|
1870
|
+
const i = o[0];
|
|
1871
|
+
let s, c;
|
|
1872
|
+
if ("borderBoxSize" in i) {
|
|
1873
|
+
const d = i.borderBoxSize, l = Array.isArray(d) ? d[0] : d;
|
|
1874
|
+
s = l.inlineSize, c = l.blockSize;
|
|
1875
|
+
} else
|
|
1876
|
+
s = e.offsetWidth, c = e.offsetHeight;
|
|
1877
|
+
n({ width: s, height: c });
|
|
1878
|
+
});
|
|
1879
|
+
return r.observe(e, { box: "border-box" }), () => r.unobserve(e);
|
|
1880
|
+
} else
|
|
1881
|
+
n(void 0);
|
|
1882
|
+
}, [e]), t;
|
|
1883
|
+
}
|
|
1884
|
+
var kt = "Popper", [Kn, Gn] = Ne(kt), [es, Vn] = Kn(kt), Hn = (e) => {
|
|
1885
|
+
const { __scopePopper: t, children: n } = e, [r, o] = a.useState(null);
|
|
1886
|
+
return /* @__PURE__ */ y(es, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
1887
|
+
};
|
|
1888
|
+
Hn.displayName = kt;
|
|
1889
|
+
var zn = "PopperAnchor", Yn = a.forwardRef(
|
|
1890
|
+
(e, t) => {
|
|
1891
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, i = Vn(zn, n), s = a.useRef(null), c = G(t, s);
|
|
1892
|
+
return a.useEffect(() => {
|
|
1893
|
+
i.onAnchorChange((r == null ? void 0 : r.current) || s.current);
|
|
1894
|
+
}), r ? null : /* @__PURE__ */ y(K.div, { ...o, ref: c });
|
|
1895
|
+
}
|
|
1896
|
+
);
|
|
1897
|
+
Yn.displayName = zn;
|
|
1898
|
+
var $t = "PopperContent", [ts, ns] = Kn($t), jn = a.forwardRef(
|
|
1899
|
+
(e, t) => {
|
|
1900
|
+
var re, Re, z, Me, Yt, jt;
|
|
1901
|
+
const {
|
|
1902
|
+
__scopePopper: n,
|
|
1903
|
+
side: r = "bottom",
|
|
1904
|
+
sideOffset: o = 0,
|
|
1905
|
+
align: i = "center",
|
|
1906
|
+
alignOffset: s = 0,
|
|
1907
|
+
arrowPadding: c = 0,
|
|
1908
|
+
avoidCollisions: d = !0,
|
|
1909
|
+
collisionBoundary: l = [],
|
|
1910
|
+
collisionPadding: f = 0,
|
|
1911
|
+
sticky: u = "partial",
|
|
1912
|
+
hideWhenDetached: p = !1,
|
|
1913
|
+
updatePositionStrategy: h = "optimized",
|
|
1914
|
+
onPlaced: g,
|
|
1915
|
+
...m
|
|
1916
|
+
} = e, v = Vn($t, n), [w, C] = a.useState(null), b = G(t, (Ae) => C(Ae)), [E, x] = a.useState(null), M = Ji(E), S = (M == null ? void 0 : M.width) ?? 0, A = (M == null ? void 0 : M.height) ?? 0, I = r + (i !== "center" ? "-" + i : ""), _ = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, F = Array.isArray(l) ? l : [l], k = F.length > 0, N = {
|
|
1917
|
+
padding: _,
|
|
1918
|
+
boundary: F.filter(os),
|
|
1919
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
1920
|
+
altBoundary: k
|
|
1921
|
+
}, { refs: D, floatingStyles: B, placement: T, isPositioned: $, middlewareData: P } = Ki({
|
|
1922
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
1923
|
+
strategy: "fixed",
|
|
1924
|
+
placement: I,
|
|
1925
|
+
whileElementsMounted: (...Ae) => Ii(...Ae, {
|
|
1926
|
+
animationFrame: h === "always"
|
|
1927
|
+
}),
|
|
1928
|
+
elements: {
|
|
1929
|
+
reference: v.anchor
|
|
1930
|
+
},
|
|
1931
|
+
middleware: [
|
|
1932
|
+
Vi({ mainAxis: o + A, alignmentAxis: s }),
|
|
1933
|
+
d && Hi({
|
|
1934
|
+
mainAxis: !0,
|
|
1935
|
+
crossAxis: !1,
|
|
1936
|
+
limiter: u === "partial" ? zi() : void 0,
|
|
1937
|
+
...N
|
|
1938
|
+
}),
|
|
1939
|
+
d && Yi({ ...N }),
|
|
1940
|
+
ji({
|
|
1941
|
+
...N,
|
|
1942
|
+
apply: ({ elements: Ae, rects: Xt, availableWidth: oo, availableHeight: io }) => {
|
|
1943
|
+
const { width: so, height: co } = Xt.reference, Ke = Ae.floating.style;
|
|
1944
|
+
Ke.setProperty("--radix-popper-available-width", `${oo}px`), Ke.setProperty("--radix-popper-available-height", `${io}px`), Ke.setProperty("--radix-popper-anchor-width", `${so}px`), Ke.setProperty("--radix-popper-anchor-height", `${co}px`);
|
|
1945
|
+
}
|
|
1946
|
+
}),
|
|
1947
|
+
E && Zi({ element: E, padding: c }),
|
|
1948
|
+
is({ arrowWidth: S, arrowHeight: A }),
|
|
1949
|
+
p && Xi({ strategy: "referenceHidden", ...N })
|
|
1950
|
+
]
|
|
1951
|
+
}), [R, L] = qn(T), U = ee(g);
|
|
1952
|
+
ce(() => {
|
|
1953
|
+
$ && (U == null || U());
|
|
1954
|
+
}, [$, U]);
|
|
1955
|
+
const Z = (re = P.arrow) == null ? void 0 : re.x, xe = (Re = P.arrow) == null ? void 0 : Re.y, Se = ((z = P.arrow) == null ? void 0 : z.centerOffset) !== 0, [Ue, fe] = a.useState();
|
|
1956
|
+
return ce(() => {
|
|
1957
|
+
w && fe(window.getComputedStyle(w).zIndex);
|
|
1958
|
+
}, [w]), /* @__PURE__ */ y(
|
|
1959
|
+
"div",
|
|
1960
|
+
{
|
|
1961
|
+
ref: D.setFloating,
|
|
1962
|
+
"data-radix-popper-content-wrapper": "",
|
|
1963
|
+
style: {
|
|
1964
|
+
...B,
|
|
1965
|
+
transform: $ ? B.transform : "translate(0, -200%)",
|
|
1966
|
+
// keep off the page when measuring
|
|
1967
|
+
minWidth: "max-content",
|
|
1968
|
+
zIndex: Ue,
|
|
1969
|
+
"--radix-popper-transform-origin": [
|
|
1970
|
+
(Me = P.transformOrigin) == null ? void 0 : Me.x,
|
|
1971
|
+
(Yt = P.transformOrigin) == null ? void 0 : Yt.y
|
|
1972
|
+
].join(" "),
|
|
1973
|
+
// hide the content if using the hide middleware and should be hidden
|
|
1974
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
|
1975
|
+
// as if the PopperContent isn't there at all
|
|
1976
|
+
...((jt = P.hide) == null ? void 0 : jt.referenceHidden) && {
|
|
1977
|
+
visibility: "hidden",
|
|
1978
|
+
pointerEvents: "none"
|
|
1979
|
+
}
|
|
1980
|
+
},
|
|
1981
|
+
dir: e.dir,
|
|
1982
|
+
children: /* @__PURE__ */ y(
|
|
1983
|
+
ts,
|
|
1984
|
+
{
|
|
1985
|
+
scope: n,
|
|
1986
|
+
placedSide: R,
|
|
1987
|
+
onArrowChange: x,
|
|
1988
|
+
arrowX: Z,
|
|
1989
|
+
arrowY: xe,
|
|
1990
|
+
shouldHideArrow: Se,
|
|
1991
|
+
children: /* @__PURE__ */ y(
|
|
1992
|
+
K.div,
|
|
1993
|
+
{
|
|
1994
|
+
"data-side": R,
|
|
1995
|
+
"data-align": L,
|
|
1996
|
+
...m,
|
|
1997
|
+
ref: b,
|
|
1998
|
+
style: {
|
|
1999
|
+
...m.style,
|
|
2000
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
2001
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
2002
|
+
animation: $ ? void 0 : "none"
|
|
2003
|
+
}
|
|
2004
|
+
}
|
|
2005
|
+
)
|
|
2006
|
+
}
|
|
2007
|
+
)
|
|
2008
|
+
}
|
|
2009
|
+
);
|
|
2010
|
+
}
|
|
2011
|
+
);
|
|
2012
|
+
jn.displayName = $t;
|
|
2013
|
+
var Xn = "PopperArrow", rs = {
|
|
2014
|
+
top: "bottom",
|
|
2015
|
+
right: "left",
|
|
2016
|
+
bottom: "top",
|
|
2017
|
+
left: "right"
|
|
2018
|
+
}, Zn = a.forwardRef(function(t, n) {
|
|
2019
|
+
const { __scopePopper: r, ...o } = t, i = ns(Xn, r), s = rs[i.placedSide];
|
|
2020
|
+
return (
|
|
2021
|
+
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
2022
|
+
// doesn't report size as we'd expect on SVG elements.
|
|
2023
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
2024
|
+
/* @__PURE__ */ y(
|
|
2025
|
+
"span",
|
|
2026
|
+
{
|
|
2027
|
+
ref: i.onArrowChange,
|
|
2028
|
+
style: {
|
|
2029
|
+
position: "absolute",
|
|
2030
|
+
left: i.arrowX,
|
|
2031
|
+
top: i.arrowY,
|
|
2032
|
+
[s]: 0,
|
|
2033
|
+
transformOrigin: {
|
|
2034
|
+
top: "",
|
|
2035
|
+
right: "0 0",
|
|
2036
|
+
bottom: "center 0",
|
|
2037
|
+
left: "100% 0"
|
|
2038
|
+
}[i.placedSide],
|
|
2039
|
+
transform: {
|
|
2040
|
+
top: "translateY(100%)",
|
|
2041
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
2042
|
+
bottom: "rotate(180deg)",
|
|
2043
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
2044
|
+
}[i.placedSide],
|
|
2045
|
+
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
2046
|
+
},
|
|
2047
|
+
children: /* @__PURE__ */ y(
|
|
2048
|
+
Qi,
|
|
2049
|
+
{
|
|
2050
|
+
...o,
|
|
2051
|
+
ref: n,
|
|
2052
|
+
style: {
|
|
2053
|
+
...o.style,
|
|
2054
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
|
2055
|
+
display: "block"
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
)
|
|
2059
|
+
}
|
|
2060
|
+
)
|
|
2061
|
+
);
|
|
2062
|
+
});
|
|
2063
|
+
Zn.displayName = Xn;
|
|
2064
|
+
function os(e) {
|
|
2065
|
+
return e !== null;
|
|
2066
|
+
}
|
|
2067
|
+
var is = (e) => ({
|
|
2068
|
+
name: "transformOrigin",
|
|
2069
|
+
options: e,
|
|
2070
|
+
fn(t) {
|
|
2071
|
+
var v, w, C;
|
|
2072
|
+
const { placement: n, rects: r, middlewareData: o } = t, s = ((v = o.arrow) == null ? void 0 : v.centerOffset) !== 0, c = s ? 0 : e.arrowWidth, d = s ? 0 : e.arrowHeight, [l, f] = qn(n), u = { start: "0%", center: "50%", end: "100%" }[f], p = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + c / 2, h = (((C = o.arrow) == null ? void 0 : C.y) ?? 0) + d / 2;
|
|
2073
|
+
let g = "", m = "";
|
|
2074
|
+
return l === "bottom" ? (g = s ? u : `${p}px`, m = `${-d}px`) : l === "top" ? (g = s ? u : `${p}px`, m = `${r.floating.height + d}px`) : l === "right" ? (g = `${-d}px`, m = s ? u : `${h}px`) : l === "left" && (g = `${r.floating.width + d}px`, m = s ? u : `${h}px`), { data: { x: g, y: m } };
|
|
2075
|
+
}
|
|
2076
|
+
});
|
|
2077
|
+
function qn(e) {
|
|
2078
|
+
const [t, n = "center"] = e.split("-");
|
|
2079
|
+
return [t, n];
|
|
2080
|
+
}
|
|
2081
|
+
var Qn = Hn, ss = Yn, cs = jn, as = Zn, us = "Portal", Jn = a.forwardRef((e, t) => {
|
|
2082
|
+
var c;
|
|
2083
|
+
const { container: n, ...r } = e, [o, i] = a.useState(!1);
|
|
2084
|
+
ce(() => i(!0), []);
|
|
2085
|
+
const s = n || o && ((c = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : c.body);
|
|
2086
|
+
return s ? lo.createPortal(/* @__PURE__ */ y(K.div, { ...r, ref: t }), s) : null;
|
|
2087
|
+
});
|
|
2088
|
+
Jn.displayName = us;
|
|
2089
|
+
function ls(e, t) {
|
|
2090
|
+
return a.useReducer((n, r) => t[n][r] ?? n, e);
|
|
2091
|
+
}
|
|
2092
|
+
var Fe = (e) => {
|
|
2093
|
+
const { present: t, children: n } = e, r = fs(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), i = G(r.ref, ds(o));
|
|
2094
|
+
return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: i }) : null;
|
|
2095
|
+
};
|
|
2096
|
+
Fe.displayName = "Presence";
|
|
2097
|
+
function fs(e) {
|
|
2098
|
+
const [t, n] = a.useState(), r = a.useRef(null), o = a.useRef(e), i = a.useRef("none"), s = e ? "mounted" : "unmounted", [c, d] = ls(s, {
|
|
2099
|
+
mounted: {
|
|
2100
|
+
UNMOUNT: "unmounted",
|
|
2101
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
2102
|
+
},
|
|
2103
|
+
unmountSuspended: {
|
|
2104
|
+
MOUNT: "mounted",
|
|
2105
|
+
ANIMATION_END: "unmounted"
|
|
2106
|
+
},
|
|
2107
|
+
unmounted: {
|
|
2108
|
+
MOUNT: "mounted"
|
|
2109
|
+
}
|
|
2110
|
+
});
|
|
2111
|
+
return a.useEffect(() => {
|
|
2112
|
+
const l = Ve(r.current);
|
|
2113
|
+
i.current = c === "mounted" ? l : "none";
|
|
2114
|
+
}, [c]), ce(() => {
|
|
2115
|
+
const l = r.current, f = o.current;
|
|
2116
|
+
if (f !== e) {
|
|
2117
|
+
const p = i.current, h = Ve(l);
|
|
2118
|
+
e ? d("MOUNT") : h === "none" || (l == null ? void 0 : l.display) === "none" ? d("UNMOUNT") : d(f && p !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
|
|
2119
|
+
}
|
|
2120
|
+
}, [e, d]), ce(() => {
|
|
2121
|
+
if (t) {
|
|
2122
|
+
let l;
|
|
2123
|
+
const f = t.ownerDocument.defaultView ?? window, u = (h) => {
|
|
2124
|
+
const m = Ve(r.current).includes(h.animationName);
|
|
2125
|
+
if (h.target === t && m && (d("ANIMATION_END"), !o.current)) {
|
|
2126
|
+
const v = t.style.animationFillMode;
|
|
2127
|
+
t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
|
|
2128
|
+
t.style.animationFillMode === "forwards" && (t.style.animationFillMode = v);
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2131
|
+
}, p = (h) => {
|
|
2132
|
+
h.target === t && (i.current = Ve(r.current));
|
|
2133
|
+
};
|
|
2134
|
+
return t.addEventListener("animationstart", p), t.addEventListener("animationcancel", u), t.addEventListener("animationend", u), () => {
|
|
2135
|
+
f.clearTimeout(l), t.removeEventListener("animationstart", p), t.removeEventListener("animationcancel", u), t.removeEventListener("animationend", u);
|
|
2136
|
+
};
|
|
2137
|
+
} else
|
|
2138
|
+
d("ANIMATION_END");
|
|
2139
|
+
}, [t, d]), {
|
|
2140
|
+
isPresent: ["mounted", "unmountSuspended"].includes(c),
|
|
2141
|
+
ref: a.useCallback((l) => {
|
|
2142
|
+
r.current = l ? getComputedStyle(l) : null, n(l);
|
|
2143
|
+
}, [])
|
|
2144
|
+
};
|
|
2145
|
+
}
|
|
2146
|
+
function Ve(e) {
|
|
2147
|
+
return (e == null ? void 0 : e.animationName) || "none";
|
|
2148
|
+
}
|
|
2149
|
+
function ds(e) {
|
|
2150
|
+
var r, o;
|
|
2151
|
+
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
2152
|
+
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
2153
|
+
}
|
|
2154
|
+
var gt = "rovingFocusGroup.onEntryFocus", ps = { bubbles: !1, cancelable: !0 }, ke = "RovingFocusGroup", [Mt, er, ms] = xn(ke), [hs, tr] = Ne(
|
|
2155
|
+
ke,
|
|
2156
|
+
[ms]
|
|
2157
|
+
), [vs, gs] = hs(ke), nr = a.forwardRef(
|
|
2158
|
+
(e, t) => /* @__PURE__ */ y(Mt.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ y(Mt.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ y(ws, { ...e, ref: t }) }) })
|
|
2159
|
+
);
|
|
2160
|
+
nr.displayName = ke;
|
|
2161
|
+
var ws = a.forwardRef((e, t) => {
|
|
2162
|
+
const {
|
|
2163
|
+
__scopeRovingFocusGroup: n,
|
|
2164
|
+
orientation: r,
|
|
2165
|
+
loop: o = !1,
|
|
2166
|
+
dir: i,
|
|
2167
|
+
currentTabStopId: s,
|
|
2168
|
+
defaultCurrentTabStopId: c,
|
|
2169
|
+
onCurrentTabStopIdChange: d,
|
|
2170
|
+
onEntryFocus: l,
|
|
2171
|
+
preventScrollOnEntryFocus: f = !1,
|
|
2172
|
+
...u
|
|
2173
|
+
} = e, p = a.useRef(null), h = G(t, p), g = Sn(i), [m, v] = Ot({
|
|
2174
|
+
prop: s,
|
|
2175
|
+
defaultProp: c ?? null,
|
|
2176
|
+
onChange: d,
|
|
2177
|
+
caller: ke
|
|
2178
|
+
}), [w, C] = a.useState(!1), b = ee(l), E = er(n), x = a.useRef(!1), [M, S] = a.useState(0);
|
|
2179
|
+
return a.useEffect(() => {
|
|
2180
|
+
const A = p.current;
|
|
2181
|
+
if (A)
|
|
2182
|
+
return A.addEventListener(gt, b), () => A.removeEventListener(gt, b);
|
|
2183
|
+
}, [b]), /* @__PURE__ */ y(
|
|
2184
|
+
vs,
|
|
2185
|
+
{
|
|
2186
|
+
scope: n,
|
|
2187
|
+
orientation: r,
|
|
2188
|
+
dir: g,
|
|
2189
|
+
loop: o,
|
|
2190
|
+
currentTabStopId: m,
|
|
2191
|
+
onItemFocus: a.useCallback(
|
|
2192
|
+
(A) => v(A),
|
|
2193
|
+
[v]
|
|
2194
|
+
),
|
|
2195
|
+
onItemShiftTab: a.useCallback(() => C(!0), []),
|
|
2196
|
+
onFocusableItemAdd: a.useCallback(
|
|
2197
|
+
() => S((A) => A + 1),
|
|
2198
|
+
[]
|
|
2199
|
+
),
|
|
2200
|
+
onFocusableItemRemove: a.useCallback(
|
|
2201
|
+
() => S((A) => A - 1),
|
|
2202
|
+
[]
|
|
2203
|
+
),
|
|
2204
|
+
children: /* @__PURE__ */ y(
|
|
2205
|
+
K.div,
|
|
2206
|
+
{
|
|
2207
|
+
tabIndex: w || M === 0 ? -1 : 0,
|
|
2208
|
+
"data-orientation": r,
|
|
2209
|
+
...u,
|
|
2210
|
+
ref: h,
|
|
2211
|
+
style: { outline: "none", ...e.style },
|
|
2212
|
+
onMouseDown: O(e.onMouseDown, () => {
|
|
2213
|
+
x.current = !0;
|
|
2214
|
+
}),
|
|
2215
|
+
onFocus: O(e.onFocus, (A) => {
|
|
2216
|
+
const I = !x.current;
|
|
2217
|
+
if (A.target === A.currentTarget && I && !w) {
|
|
2218
|
+
const _ = new CustomEvent(gt, ps);
|
|
2219
|
+
if (A.currentTarget.dispatchEvent(_), !_.defaultPrevented) {
|
|
2220
|
+
const F = E().filter((T) => T.focusable), k = F.find((T) => T.active), N = F.find((T) => T.id === m), B = [k, N, ...F].filter(
|
|
2221
|
+
Boolean
|
|
2222
|
+
).map((T) => T.ref.current);
|
|
2223
|
+
ir(B, f);
|
|
2224
|
+
}
|
|
2225
|
+
}
|
|
2226
|
+
x.current = !1;
|
|
2227
|
+
}),
|
|
2228
|
+
onBlur: O(e.onBlur, () => C(!1))
|
|
2229
|
+
}
|
|
2230
|
+
)
|
|
2231
|
+
}
|
|
2232
|
+
);
|
|
2233
|
+
}), rr = "RovingFocusGroupItem", or = a.forwardRef(
|
|
2234
|
+
(e, t) => {
|
|
2235
|
+
const {
|
|
2236
|
+
__scopeRovingFocusGroup: n,
|
|
2237
|
+
focusable: r = !0,
|
|
2238
|
+
active: o = !1,
|
|
2239
|
+
tabStopId: i,
|
|
2240
|
+
children: s,
|
|
2241
|
+
...c
|
|
2242
|
+
} = e, d = Oe(), l = i || d, f = gs(rr, n), u = f.currentTabStopId === l, p = er(n), { onFocusableItemAdd: h, onFocusableItemRemove: g, currentTabStopId: m } = f;
|
|
2243
|
+
return a.useEffect(() => {
|
|
2244
|
+
if (r)
|
|
2245
|
+
return h(), () => g();
|
|
2246
|
+
}, [r, h, g]), /* @__PURE__ */ y(
|
|
2247
|
+
Mt.ItemSlot,
|
|
2248
|
+
{
|
|
2249
|
+
scope: n,
|
|
2250
|
+
id: l,
|
|
2251
|
+
focusable: r,
|
|
2252
|
+
active: o,
|
|
2253
|
+
children: /* @__PURE__ */ y(
|
|
2254
|
+
K.span,
|
|
2255
|
+
{
|
|
2256
|
+
tabIndex: u ? 0 : -1,
|
|
2257
|
+
"data-orientation": f.orientation,
|
|
2258
|
+
...c,
|
|
2259
|
+
ref: t,
|
|
2260
|
+
onMouseDown: O(e.onMouseDown, (v) => {
|
|
2261
|
+
r ? f.onItemFocus(l) : v.preventDefault();
|
|
2262
|
+
}),
|
|
2263
|
+
onFocus: O(e.onFocus, () => f.onItemFocus(l)),
|
|
2264
|
+
onKeyDown: O(e.onKeyDown, (v) => {
|
|
2265
|
+
if (v.key === "Tab" && v.shiftKey) {
|
|
2266
|
+
f.onItemShiftTab();
|
|
2267
|
+
return;
|
|
2268
|
+
}
|
|
2269
|
+
if (v.target !== v.currentTarget) return;
|
|
2270
|
+
const w = Cs(v, f.orientation, f.dir);
|
|
2271
|
+
if (w !== void 0) {
|
|
2272
|
+
if (v.metaKey || v.ctrlKey || v.altKey || v.shiftKey) return;
|
|
2273
|
+
v.preventDefault();
|
|
2274
|
+
let b = p().filter((E) => E.focusable).map((E) => E.ref.current);
|
|
2275
|
+
if (w === "last") b.reverse();
|
|
2276
|
+
else if (w === "prev" || w === "next") {
|
|
2277
|
+
w === "prev" && b.reverse();
|
|
2278
|
+
const E = b.indexOf(v.currentTarget);
|
|
2279
|
+
b = f.loop ? Es(b, E + 1) : b.slice(E + 1);
|
|
2280
|
+
}
|
|
2281
|
+
setTimeout(() => ir(b));
|
|
2282
|
+
}
|
|
2283
|
+
}),
|
|
2284
|
+
children: typeof s == "function" ? s({ isCurrentTabStop: u, hasTabStop: m != null }) : s
|
|
2285
|
+
}
|
|
2286
|
+
)
|
|
2287
|
+
}
|
|
2288
|
+
);
|
|
2289
|
+
}
|
|
2290
|
+
);
|
|
2291
|
+
or.displayName = rr;
|
|
2292
|
+
var ys = {
|
|
2293
|
+
ArrowLeft: "prev",
|
|
2294
|
+
ArrowUp: "prev",
|
|
2295
|
+
ArrowRight: "next",
|
|
2296
|
+
ArrowDown: "next",
|
|
2297
|
+
PageUp: "first",
|
|
2298
|
+
Home: "first",
|
|
2299
|
+
PageDown: "last",
|
|
2300
|
+
End: "last"
|
|
2301
|
+
};
|
|
2302
|
+
function bs(e, t) {
|
|
2303
|
+
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
2304
|
+
}
|
|
2305
|
+
function Cs(e, t, n) {
|
|
2306
|
+
const r = bs(e.key, n);
|
|
2307
|
+
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r)))
|
|
2308
|
+
return ys[r];
|
|
2309
|
+
}
|
|
2310
|
+
function ir(e, t = !1) {
|
|
2311
|
+
const n = document.activeElement;
|
|
2312
|
+
for (const r of e)
|
|
2313
|
+
if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
|
|
2314
|
+
}
|
|
2315
|
+
function Es(e, t) {
|
|
2316
|
+
return e.map((n, r) => e[(t + r) % e.length]);
|
|
2317
|
+
}
|
|
2318
|
+
var xs = nr, Ss = or, Rs = function(e) {
|
|
2319
|
+
if (typeof document > "u")
|
|
2320
|
+
return null;
|
|
2321
|
+
var t = Array.isArray(e) ? e[0] : e;
|
|
2322
|
+
return t.ownerDocument.body;
|
|
2323
|
+
}, he = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), ze = {}, wt = 0, sr = function(e) {
|
|
2324
|
+
return e && (e.host || sr(e.parentNode));
|
|
2325
|
+
}, Ms = function(e, t) {
|
|
2326
|
+
return t.map(function(n) {
|
|
2327
|
+
if (e.contains(n))
|
|
2328
|
+
return n;
|
|
2329
|
+
var r = sr(n);
|
|
2330
|
+
return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
|
|
2331
|
+
}).filter(function(n) {
|
|
2332
|
+
return !!n;
|
|
2333
|
+
});
|
|
2334
|
+
}, As = function(e, t, n, r) {
|
|
2335
|
+
var o = Ms(t, Array.isArray(e) ? e : [e]);
|
|
2336
|
+
ze[n] || (ze[n] = /* @__PURE__ */ new WeakMap());
|
|
2337
|
+
var i = ze[n], s = [], c = /* @__PURE__ */ new Set(), d = new Set(o), l = function(u) {
|
|
2338
|
+
!u || c.has(u) || (c.add(u), l(u.parentNode));
|
|
2339
|
+
};
|
|
2340
|
+
o.forEach(l);
|
|
2341
|
+
var f = function(u) {
|
|
2342
|
+
!u || d.has(u) || Array.prototype.forEach.call(u.children, function(p) {
|
|
2343
|
+
if (c.has(p))
|
|
2344
|
+
f(p);
|
|
2345
|
+
else
|
|
2346
|
+
try {
|
|
2347
|
+
var h = p.getAttribute(r), g = h !== null && h !== "false", m = (he.get(p) || 0) + 1, v = (i.get(p) || 0) + 1;
|
|
2348
|
+
he.set(p, m), i.set(p, v), s.push(p), m === 1 && g && He.set(p, !0), v === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
|
|
2349
|
+
} catch (w) {
|
|
2350
|
+
console.error("aria-hidden: cannot operate on ", p, w);
|
|
2351
|
+
}
|
|
2352
|
+
});
|
|
2353
|
+
};
|
|
2354
|
+
return f(t), c.clear(), wt++, function() {
|
|
2355
|
+
s.forEach(function(u) {
|
|
2356
|
+
var p = he.get(u) - 1, h = i.get(u) - 1;
|
|
2357
|
+
he.set(u, p), i.set(u, h), p || (He.has(u) || u.removeAttribute(r), He.delete(u)), h || u.removeAttribute(n);
|
|
2358
|
+
}), wt--, wt || (he = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap(), ze = {});
|
|
2359
|
+
};
|
|
2360
|
+
}, Ps = function(e, t, n) {
|
|
2361
|
+
n === void 0 && (n = "data-aria-hidden");
|
|
2362
|
+
var r = Array.from(Array.isArray(e) ? e : [e]), o = Rs(e);
|
|
2363
|
+
return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), As(r, o, n, "aria-hidden")) : function() {
|
|
2364
|
+
return null;
|
|
2365
|
+
};
|
|
2366
|
+
}, q = function() {
|
|
2367
|
+
return q = Object.assign || function(t) {
|
|
2368
|
+
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
2369
|
+
n = arguments[r];
|
|
2370
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
|
|
2371
|
+
}
|
|
2372
|
+
return t;
|
|
2373
|
+
}, q.apply(this, arguments);
|
|
2374
|
+
};
|
|
2375
|
+
function cr(e, t) {
|
|
2376
|
+
var n = {};
|
|
2377
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2378
|
+
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
2379
|
+
for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
|
|
2380
|
+
t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
|
|
2381
|
+
return n;
|
|
2382
|
+
}
|
|
2383
|
+
function Os(e, t, n) {
|
|
2384
|
+
if (n || arguments.length === 2) for (var r = 0, o = t.length, i; r < o; r++)
|
|
2385
|
+
(i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
|
|
2386
|
+
return e.concat(i || Array.prototype.slice.call(t));
|
|
2387
|
+
}
|
|
2388
|
+
var Ze = "right-scroll-bar-position", qe = "width-before-scroll-bar", _s = "with-scroll-bars-hidden", Ts = "--removed-body-scroll-bar-size";
|
|
2389
|
+
function yt(e, t) {
|
|
2390
|
+
return typeof e == "function" ? e(t) : e && (e.current = t), e;
|
|
2391
|
+
}
|
|
2392
|
+
function Is(e, t) {
|
|
2393
|
+
var n = uo(function() {
|
|
2394
|
+
return {
|
|
2395
|
+
// value
|
|
2396
|
+
value: e,
|
|
2397
|
+
// last callback
|
|
2398
|
+
callback: t,
|
|
2399
|
+
// "memoized" public interface
|
|
2400
|
+
facade: {
|
|
2401
|
+
get current() {
|
|
2402
|
+
return n.value;
|
|
2403
|
+
},
|
|
2404
|
+
set current(r) {
|
|
2405
|
+
var o = n.value;
|
|
2406
|
+
o !== r && (n.value = r, n.callback(r, o));
|
|
2407
|
+
}
|
|
2408
|
+
}
|
|
2409
|
+
};
|
|
2410
|
+
})[0];
|
|
2411
|
+
return n.callback = t, n.facade;
|
|
2412
|
+
}
|
|
2413
|
+
var Ds = typeof window < "u" ? a.useLayoutEffect : a.useEffect, hn = /* @__PURE__ */ new WeakMap();
|
|
2414
|
+
function Ns(e, t) {
|
|
2415
|
+
var n = Is(null, function(r) {
|
|
2416
|
+
return e.forEach(function(o) {
|
|
2417
|
+
return yt(o, r);
|
|
2418
|
+
});
|
|
2419
|
+
});
|
|
2420
|
+
return Ds(function() {
|
|
2421
|
+
var r = hn.get(n);
|
|
2422
|
+
if (r) {
|
|
2423
|
+
var o = new Set(r), i = new Set(e), s = n.current;
|
|
2424
|
+
o.forEach(function(c) {
|
|
2425
|
+
i.has(c) || yt(c, null);
|
|
2426
|
+
}), i.forEach(function(c) {
|
|
2427
|
+
o.has(c) || yt(c, s);
|
|
2428
|
+
});
|
|
2429
|
+
}
|
|
2430
|
+
hn.set(n, e);
|
|
2431
|
+
}, [e]), n;
|
|
2432
|
+
}
|
|
2433
|
+
function Ls(e) {
|
|
2434
|
+
return e;
|
|
2435
|
+
}
|
|
2436
|
+
function Fs(e, t) {
|
|
2437
|
+
t === void 0 && (t = Ls);
|
|
2438
|
+
var n = [], r = !1, o = {
|
|
2439
|
+
read: function() {
|
|
2440
|
+
if (r)
|
|
2441
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
2442
|
+
return n.length ? n[n.length - 1] : e;
|
|
2443
|
+
},
|
|
2444
|
+
useMedium: function(i) {
|
|
2445
|
+
var s = t(i, r);
|
|
2446
|
+
return n.push(s), function() {
|
|
2447
|
+
n = n.filter(function(c) {
|
|
2448
|
+
return c !== s;
|
|
2449
|
+
});
|
|
2450
|
+
};
|
|
2451
|
+
},
|
|
2452
|
+
assignSyncMedium: function(i) {
|
|
2453
|
+
for (r = !0; n.length; ) {
|
|
2454
|
+
var s = n;
|
|
2455
|
+
n = [], s.forEach(i);
|
|
2456
|
+
}
|
|
2457
|
+
n = {
|
|
2458
|
+
push: function(c) {
|
|
2459
|
+
return i(c);
|
|
2460
|
+
},
|
|
2461
|
+
filter: function() {
|
|
2462
|
+
return n;
|
|
2463
|
+
}
|
|
2464
|
+
};
|
|
2465
|
+
},
|
|
2466
|
+
assignMedium: function(i) {
|
|
2467
|
+
r = !0;
|
|
2468
|
+
var s = [];
|
|
2469
|
+
if (n.length) {
|
|
2470
|
+
var c = n;
|
|
2471
|
+
n = [], c.forEach(i), s = n;
|
|
2472
|
+
}
|
|
2473
|
+
var d = function() {
|
|
2474
|
+
var f = s;
|
|
2475
|
+
s = [], f.forEach(i);
|
|
2476
|
+
}, l = function() {
|
|
2477
|
+
return Promise.resolve().then(d);
|
|
2478
|
+
};
|
|
2479
|
+
l(), n = {
|
|
2480
|
+
push: function(f) {
|
|
2481
|
+
s.push(f), l();
|
|
2482
|
+
},
|
|
2483
|
+
filter: function(f) {
|
|
2484
|
+
return s = s.filter(f), n;
|
|
2485
|
+
}
|
|
2486
|
+
};
|
|
2487
|
+
}
|
|
2488
|
+
};
|
|
2489
|
+
return o;
|
|
2490
|
+
}
|
|
2491
|
+
function ks(e) {
|
|
2492
|
+
e === void 0 && (e = {});
|
|
2493
|
+
var t = Fs(null);
|
|
2494
|
+
return t.options = q({ async: !0, ssr: !1 }, e), t;
|
|
2495
|
+
}
|
|
2496
|
+
var ar = function(e) {
|
|
2497
|
+
var t = e.sideCar, n = cr(e, ["sideCar"]);
|
|
2498
|
+
if (!t)
|
|
2499
|
+
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
2500
|
+
var r = t.read();
|
|
2501
|
+
if (!r)
|
|
2502
|
+
throw new Error("Sidecar medium not found");
|
|
2503
|
+
return a.createElement(r, q({}, n));
|
|
2504
|
+
};
|
|
2505
|
+
ar.isSideCarExport = !0;
|
|
2506
|
+
function $s(e, t) {
|
|
2507
|
+
return e.useMedium(t), ar;
|
|
2508
|
+
}
|
|
2509
|
+
var ur = ks(), bt = function() {
|
|
2510
|
+
}, ut = a.forwardRef(function(e, t) {
|
|
2511
|
+
var n = a.useRef(null), r = a.useState({
|
|
2512
|
+
onScrollCapture: bt,
|
|
2513
|
+
onWheelCapture: bt,
|
|
2514
|
+
onTouchMoveCapture: bt
|
|
2515
|
+
}), o = r[0], i = r[1], s = e.forwardProps, c = e.children, d = e.className, l = e.removeScrollBar, f = e.enabled, u = e.shards, p = e.sideCar, h = e.noRelative, g = e.noIsolation, m = e.inert, v = e.allowPinchZoom, w = e.as, C = w === void 0 ? "div" : w, b = e.gapMode, E = cr(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = p, M = Ns([n, t]), S = q(q({}, E), o);
|
|
2516
|
+
return a.createElement(
|
|
2517
|
+
a.Fragment,
|
|
2518
|
+
null,
|
|
2519
|
+
f && a.createElement(x, { sideCar: ur, removeScrollBar: l, shards: u, noRelative: h, noIsolation: g, inert: m, setCallbacks: i, allowPinchZoom: !!v, lockRef: n, gapMode: b }),
|
|
2520
|
+
s ? a.cloneElement(a.Children.only(c), q(q({}, S), { ref: M })) : a.createElement(C, q({}, S, { className: d, ref: M }), c)
|
|
2521
|
+
);
|
|
2522
|
+
});
|
|
2523
|
+
ut.defaultProps = {
|
|
2524
|
+
enabled: !0,
|
|
2525
|
+
removeScrollBar: !0,
|
|
2526
|
+
inert: !1
|
|
2527
|
+
};
|
|
2528
|
+
ut.classNames = {
|
|
2529
|
+
fullWidth: qe,
|
|
2530
|
+
zeroRight: Ze
|
|
2531
|
+
};
|
|
2532
|
+
var Bs = function() {
|
|
2533
|
+
if (typeof __webpack_nonce__ < "u")
|
|
2534
|
+
return __webpack_nonce__;
|
|
2535
|
+
};
|
|
2536
|
+
function Ws() {
|
|
2537
|
+
if (!document)
|
|
2538
|
+
return null;
|
|
2539
|
+
var e = document.createElement("style");
|
|
2540
|
+
e.type = "text/css";
|
|
2541
|
+
var t = Bs();
|
|
2542
|
+
return t && e.setAttribute("nonce", t), e;
|
|
2543
|
+
}
|
|
2544
|
+
function Us(e, t) {
|
|
2545
|
+
e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
|
|
2546
|
+
}
|
|
2547
|
+
function Ks(e) {
|
|
2548
|
+
var t = document.head || document.getElementsByTagName("head")[0];
|
|
2549
|
+
t.appendChild(e);
|
|
2550
|
+
}
|
|
2551
|
+
var Gs = function() {
|
|
2552
|
+
var e = 0, t = null;
|
|
2553
|
+
return {
|
|
2554
|
+
add: function(n) {
|
|
2555
|
+
e == 0 && (t = Ws()) && (Us(t, n), Ks(t)), e++;
|
|
2556
|
+
},
|
|
2557
|
+
remove: function() {
|
|
2558
|
+
e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
|
|
2559
|
+
}
|
|
2560
|
+
};
|
|
2561
|
+
}, Vs = function() {
|
|
2562
|
+
var e = Gs();
|
|
2563
|
+
return function(t, n) {
|
|
2564
|
+
a.useEffect(function() {
|
|
2565
|
+
return e.add(t), function() {
|
|
2566
|
+
e.remove();
|
|
2567
|
+
};
|
|
2568
|
+
}, [t && n]);
|
|
2569
|
+
};
|
|
2570
|
+
}, lr = function() {
|
|
2571
|
+
var e = Vs(), t = function(n) {
|
|
2572
|
+
var r = n.styles, o = n.dynamic;
|
|
2573
|
+
return e(r, o), null;
|
|
2574
|
+
};
|
|
2575
|
+
return t;
|
|
2576
|
+
}, Hs = {
|
|
2577
|
+
left: 0,
|
|
2578
|
+
top: 0,
|
|
2579
|
+
right: 0,
|
|
2580
|
+
gap: 0
|
|
2581
|
+
}, Ct = function(e) {
|
|
2582
|
+
return parseInt(e || "", 10) || 0;
|
|
2583
|
+
}, zs = function(e) {
|
|
2584
|
+
var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
|
|
2585
|
+
return [Ct(n), Ct(r), Ct(o)];
|
|
2586
|
+
}, Ys = function(e) {
|
|
2587
|
+
if (e === void 0 && (e = "margin"), typeof window > "u")
|
|
2588
|
+
return Hs;
|
|
2589
|
+
var t = zs(e), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
2590
|
+
return {
|
|
2591
|
+
left: t[0],
|
|
2592
|
+
top: t[1],
|
|
2593
|
+
right: t[2],
|
|
2594
|
+
gap: Math.max(0, r - n + t[2] - t[0])
|
|
2595
|
+
};
|
|
2596
|
+
}, js = lr(), ye = "data-scroll-locked", Xs = function(e, t, n, r) {
|
|
2597
|
+
var o = e.left, i = e.top, s = e.right, c = e.gap;
|
|
2598
|
+
return n === void 0 && (n = "margin"), `
|
|
2599
|
+
.`.concat(_s, ` {
|
|
2600
|
+
overflow: hidden `).concat(r, `;
|
|
2601
|
+
padding-right: `).concat(c, "px ").concat(r, `;
|
|
2602
|
+
}
|
|
2603
|
+
body[`).concat(ye, `] {
|
|
2604
|
+
overflow: hidden `).concat(r, `;
|
|
2605
|
+
overscroll-behavior: contain;
|
|
2606
|
+
`).concat([
|
|
2607
|
+
t && "position: relative ".concat(r, ";"),
|
|
2608
|
+
n === "margin" && `
|
|
2609
|
+
padding-left: `.concat(o, `px;
|
|
2610
|
+
padding-top: `).concat(i, `px;
|
|
2611
|
+
padding-right: `).concat(s, `px;
|
|
2612
|
+
margin-left:0;
|
|
2613
|
+
margin-top:0;
|
|
2614
|
+
margin-right: `).concat(c, "px ").concat(r, `;
|
|
2615
|
+
`),
|
|
2616
|
+
n === "padding" && "padding-right: ".concat(c, "px ").concat(r, ";")
|
|
2617
|
+
].filter(Boolean).join(""), `
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
.`).concat(Ze, ` {
|
|
2621
|
+
right: `).concat(c, "px ").concat(r, `;
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
.`).concat(qe, ` {
|
|
2625
|
+
margin-right: `).concat(c, "px ").concat(r, `;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2628
|
+
.`).concat(Ze, " .").concat(Ze, ` {
|
|
2629
|
+
right: 0 `).concat(r, `;
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
.`).concat(qe, " .").concat(qe, ` {
|
|
2633
|
+
margin-right: 0 `).concat(r, `;
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
body[`).concat(ye, `] {
|
|
2637
|
+
`).concat(Ts, ": ").concat(c, `px;
|
|
2638
|
+
}
|
|
2639
|
+
`);
|
|
2640
|
+
}, vn = function() {
|
|
2641
|
+
var e = parseInt(document.body.getAttribute(ye) || "0", 10);
|
|
2642
|
+
return isFinite(e) ? e : 0;
|
|
2643
|
+
}, Zs = function() {
|
|
2644
|
+
a.useEffect(function() {
|
|
2645
|
+
return document.body.setAttribute(ye, (vn() + 1).toString()), function() {
|
|
2646
|
+
var e = vn() - 1;
|
|
2647
|
+
e <= 0 ? document.body.removeAttribute(ye) : document.body.setAttribute(ye, e.toString());
|
|
2648
|
+
};
|
|
2649
|
+
}, []);
|
|
2650
|
+
}, qs = function(e) {
|
|
2651
|
+
var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
|
|
2652
|
+
Zs();
|
|
2653
|
+
var i = a.useMemo(function() {
|
|
2654
|
+
return Ys(o);
|
|
2655
|
+
}, [o]);
|
|
2656
|
+
return a.createElement(js, { styles: Xs(i, !t, o, n ? "" : "!important") });
|
|
2657
|
+
}, At = !1;
|
|
2658
|
+
if (typeof window < "u")
|
|
2659
|
+
try {
|
|
2660
|
+
var Ye = Object.defineProperty({}, "passive", {
|
|
2661
|
+
get: function() {
|
|
2662
|
+
return At = !0, !0;
|
|
2663
|
+
}
|
|
2664
|
+
});
|
|
2665
|
+
window.addEventListener("test", Ye, Ye), window.removeEventListener("test", Ye, Ye);
|
|
2666
|
+
} catch {
|
|
2667
|
+
At = !1;
|
|
2668
|
+
}
|
|
2669
|
+
var ve = At ? { passive: !1 } : !1, Qs = function(e) {
|
|
2670
|
+
return e.tagName === "TEXTAREA";
|
|
2671
|
+
}, fr = function(e, t) {
|
|
2672
|
+
if (!(e instanceof Element))
|
|
2673
|
+
return !1;
|
|
2674
|
+
var n = window.getComputedStyle(e);
|
|
2675
|
+
return (
|
|
2676
|
+
// not-not-scrollable
|
|
2677
|
+
n[t] !== "hidden" && // contains scroll inside self
|
|
2678
|
+
!(n.overflowY === n.overflowX && !Qs(e) && n[t] === "visible")
|
|
2679
|
+
);
|
|
2680
|
+
}, Js = function(e) {
|
|
2681
|
+
return fr(e, "overflowY");
|
|
2682
|
+
}, ec = function(e) {
|
|
2683
|
+
return fr(e, "overflowX");
|
|
2684
|
+
}, gn = function(e, t) {
|
|
2685
|
+
var n = t.ownerDocument, r = t;
|
|
2686
|
+
do {
|
|
2687
|
+
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
2688
|
+
var o = dr(e, r);
|
|
2689
|
+
if (o) {
|
|
2690
|
+
var i = pr(e, r), s = i[1], c = i[2];
|
|
2691
|
+
if (s > c)
|
|
2692
|
+
return !0;
|
|
2693
|
+
}
|
|
2694
|
+
r = r.parentNode;
|
|
2695
|
+
} while (r && r !== n.body);
|
|
2696
|
+
return !1;
|
|
2697
|
+
}, tc = function(e) {
|
|
2698
|
+
var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
|
|
2699
|
+
return [
|
|
2700
|
+
t,
|
|
2701
|
+
n,
|
|
2702
|
+
r
|
|
2703
|
+
];
|
|
2704
|
+
}, nc = function(e) {
|
|
2705
|
+
var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
|
|
2706
|
+
return [
|
|
2707
|
+
t,
|
|
2708
|
+
n,
|
|
2709
|
+
r
|
|
2710
|
+
];
|
|
2711
|
+
}, dr = function(e, t) {
|
|
2712
|
+
return e === "v" ? Js(t) : ec(t);
|
|
2713
|
+
}, pr = function(e, t) {
|
|
2714
|
+
return e === "v" ? tc(t) : nc(t);
|
|
2715
|
+
}, rc = function(e, t) {
|
|
2716
|
+
return e === "h" && t === "rtl" ? -1 : 1;
|
|
2717
|
+
}, oc = function(e, t, n, r, o) {
|
|
2718
|
+
var i = rc(e, window.getComputedStyle(t).direction), s = i * r, c = n.target, d = t.contains(c), l = !1, f = s > 0, u = 0, p = 0;
|
|
2719
|
+
do {
|
|
2720
|
+
if (!c)
|
|
2721
|
+
break;
|
|
2722
|
+
var h = pr(e, c), g = h[0], m = h[1], v = h[2], w = m - v - i * g;
|
|
2723
|
+
(g || w) && dr(e, c) && (u += w, p += g);
|
|
2724
|
+
var C = c.parentNode;
|
|
2725
|
+
c = C && C.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? C.host : C;
|
|
2726
|
+
} while (
|
|
2727
|
+
// portaled content
|
|
2728
|
+
!d && c !== document.body || // self content
|
|
2729
|
+
d && (t.contains(c) || t === c)
|
|
2730
|
+
);
|
|
2731
|
+
return (f && Math.abs(u) < 1 || !f && Math.abs(p) < 1) && (l = !0), l;
|
|
2732
|
+
}, je = function(e) {
|
|
2733
|
+
return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
|
|
2734
|
+
}, wn = function(e) {
|
|
2735
|
+
return [e.deltaX, e.deltaY];
|
|
2736
|
+
}, yn = function(e) {
|
|
2737
|
+
return e && "current" in e ? e.current : e;
|
|
2738
|
+
}, ic = function(e, t) {
|
|
2739
|
+
return e[0] === t[0] && e[1] === t[1];
|
|
2740
|
+
}, sc = function(e) {
|
|
2741
|
+
return `
|
|
2742
|
+
.block-interactivity-`.concat(e, ` {pointer-events: none;}
|
|
2743
|
+
.allow-interactivity-`).concat(e, ` {pointer-events: all;}
|
|
2744
|
+
`);
|
|
2745
|
+
}, cc = 0, ge = [];
|
|
2746
|
+
function ac(e) {
|
|
2747
|
+
var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(cc++)[0], i = a.useState(lr)[0], s = a.useRef(e);
|
|
2748
|
+
a.useEffect(function() {
|
|
2749
|
+
s.current = e;
|
|
2750
|
+
}, [e]), a.useEffect(function() {
|
|
2751
|
+
if (e.inert) {
|
|
2752
|
+
document.body.classList.add("block-interactivity-".concat(o));
|
|
2753
|
+
var m = Os([e.lockRef.current], (e.shards || []).map(yn), !0).filter(Boolean);
|
|
2754
|
+
return m.forEach(function(v) {
|
|
2755
|
+
return v.classList.add("allow-interactivity-".concat(o));
|
|
2756
|
+
}), function() {
|
|
2757
|
+
document.body.classList.remove("block-interactivity-".concat(o)), m.forEach(function(v) {
|
|
2758
|
+
return v.classList.remove("allow-interactivity-".concat(o));
|
|
2759
|
+
});
|
|
2760
|
+
};
|
|
2761
|
+
}
|
|
2762
|
+
}, [e.inert, e.lockRef.current, e.shards]);
|
|
2763
|
+
var c = a.useCallback(function(m, v) {
|
|
2764
|
+
if ("touches" in m && m.touches.length === 2 || m.type === "wheel" && m.ctrlKey)
|
|
2765
|
+
return !s.current.allowPinchZoom;
|
|
2766
|
+
var w = je(m), C = n.current, b = "deltaX" in m ? m.deltaX : C[0] - w[0], E = "deltaY" in m ? m.deltaY : C[1] - w[1], x, M = m.target, S = Math.abs(b) > Math.abs(E) ? "h" : "v";
|
|
2767
|
+
if ("touches" in m && S === "h" && M.type === "range")
|
|
2768
|
+
return !1;
|
|
2769
|
+
var A = gn(S, M);
|
|
2770
|
+
if (!A)
|
|
2771
|
+
return !0;
|
|
2772
|
+
if (A ? x = S : (x = S === "v" ? "h" : "v", A = gn(S, M)), !A)
|
|
2773
|
+
return !1;
|
|
2774
|
+
if (!r.current && "changedTouches" in m && (b || E) && (r.current = x), !x)
|
|
2775
|
+
return !0;
|
|
2776
|
+
var I = r.current || x;
|
|
2777
|
+
return oc(I, v, m, I === "h" ? b : E);
|
|
2778
|
+
}, []), d = a.useCallback(function(m) {
|
|
2779
|
+
var v = m;
|
|
2780
|
+
if (!(!ge.length || ge[ge.length - 1] !== i)) {
|
|
2781
|
+
var w = "deltaY" in v ? wn(v) : je(v), C = t.current.filter(function(x) {
|
|
2782
|
+
return x.name === v.type && (x.target === v.target || v.target === x.shadowParent) && ic(x.delta, w);
|
|
2783
|
+
})[0];
|
|
2784
|
+
if (C && C.should) {
|
|
2785
|
+
v.cancelable && v.preventDefault();
|
|
2786
|
+
return;
|
|
2787
|
+
}
|
|
2788
|
+
if (!C) {
|
|
2789
|
+
var b = (s.current.shards || []).map(yn).filter(Boolean).filter(function(x) {
|
|
2790
|
+
return x.contains(v.target);
|
|
2791
|
+
}), E = b.length > 0 ? c(v, b[0]) : !s.current.noIsolation;
|
|
2792
|
+
E && v.cancelable && v.preventDefault();
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
}, []), l = a.useCallback(function(m, v, w, C) {
|
|
2796
|
+
var b = { name: m, delta: v, target: w, should: C, shadowParent: uc(w) };
|
|
2797
|
+
t.current.push(b), setTimeout(function() {
|
|
2798
|
+
t.current = t.current.filter(function(E) {
|
|
2799
|
+
return E !== b;
|
|
2800
|
+
});
|
|
2801
|
+
}, 1);
|
|
2802
|
+
}, []), f = a.useCallback(function(m) {
|
|
2803
|
+
n.current = je(m), r.current = void 0;
|
|
2804
|
+
}, []), u = a.useCallback(function(m) {
|
|
2805
|
+
l(m.type, wn(m), m.target, c(m, e.lockRef.current));
|
|
2806
|
+
}, []), p = a.useCallback(function(m) {
|
|
2807
|
+
l(m.type, je(m), m.target, c(m, e.lockRef.current));
|
|
2808
|
+
}, []);
|
|
2809
|
+
a.useEffect(function() {
|
|
2810
|
+
return ge.push(i), e.setCallbacks({
|
|
2811
|
+
onScrollCapture: u,
|
|
2812
|
+
onWheelCapture: u,
|
|
2813
|
+
onTouchMoveCapture: p
|
|
2814
|
+
}), document.addEventListener("wheel", d, ve), document.addEventListener("touchmove", d, ve), document.addEventListener("touchstart", f, ve), function() {
|
|
2815
|
+
ge = ge.filter(function(m) {
|
|
2816
|
+
return m !== i;
|
|
2817
|
+
}), document.removeEventListener("wheel", d, ve), document.removeEventListener("touchmove", d, ve), document.removeEventListener("touchstart", f, ve);
|
|
2818
|
+
};
|
|
2819
|
+
}, []);
|
|
2820
|
+
var h = e.removeScrollBar, g = e.inert;
|
|
2821
|
+
return a.createElement(
|
|
2822
|
+
a.Fragment,
|
|
2823
|
+
null,
|
|
2824
|
+
g ? a.createElement(i, { styles: sc(o) }) : null,
|
|
2825
|
+
h ? a.createElement(qs, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
|
|
2826
|
+
);
|
|
2827
|
+
}
|
|
2828
|
+
function uc(e) {
|
|
2829
|
+
for (var t = null; e !== null; )
|
|
2830
|
+
e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
|
|
2831
|
+
return t;
|
|
2832
|
+
}
|
|
2833
|
+
const lc = $s(ur, ac);
|
|
2834
|
+
var mr = a.forwardRef(function(e, t) {
|
|
2835
|
+
return a.createElement(ut, q({}, e, { ref: t, sideCar: lc }));
|
|
2836
|
+
});
|
|
2837
|
+
mr.classNames = ut.classNames;
|
|
2838
|
+
var Pt = ["Enter", " "], fc = ["ArrowDown", "PageUp", "Home"], hr = ["ArrowUp", "PageDown", "End"], dc = [...fc, ...hr], pc = {
|
|
2839
|
+
ltr: [...Pt, "ArrowRight"],
|
|
2840
|
+
rtl: [...Pt, "ArrowLeft"]
|
|
2841
|
+
}, mc = {
|
|
2842
|
+
ltr: ["ArrowLeft"],
|
|
2843
|
+
rtl: ["ArrowRight"]
|
|
2844
|
+
}, $e = "Menu", [Ie, hc, vc] = xn($e), [me, vr] = Ne($e, [
|
|
2845
|
+
vc,
|
|
2846
|
+
Gn,
|
|
2847
|
+
tr
|
|
2848
|
+
]), Be = Gn(), gr = tr(), [wr, le] = me($e), [gc, We] = me($e), yr = (e) => {
|
|
2849
|
+
const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: i, modal: s = !0 } = e, c = Be(t), [d, l] = a.useState(null), f = a.useRef(!1), u = ee(i), p = Sn(o);
|
|
2850
|
+
return a.useEffect(() => {
|
|
2851
|
+
const h = () => {
|
|
2852
|
+
f.current = !0, document.addEventListener("pointerdown", g, { capture: !0, once: !0 }), document.addEventListener("pointermove", g, { capture: !0, once: !0 });
|
|
2853
|
+
}, g = () => f.current = !1;
|
|
2854
|
+
return document.addEventListener("keydown", h, { capture: !0 }), () => {
|
|
2855
|
+
document.removeEventListener("keydown", h, { capture: !0 }), document.removeEventListener("pointerdown", g, { capture: !0 }), document.removeEventListener("pointermove", g, { capture: !0 });
|
|
2856
|
+
};
|
|
2857
|
+
}, []), /* @__PURE__ */ y(Qn, { ...c, children: /* @__PURE__ */ y(
|
|
2858
|
+
wr,
|
|
2859
|
+
{
|
|
2860
|
+
scope: t,
|
|
2861
|
+
open: n,
|
|
2862
|
+
onOpenChange: u,
|
|
2863
|
+
content: d,
|
|
2864
|
+
onContentChange: l,
|
|
2865
|
+
children: /* @__PURE__ */ y(
|
|
2866
|
+
gc,
|
|
2867
|
+
{
|
|
2868
|
+
scope: t,
|
|
2869
|
+
onClose: a.useCallback(() => u(!1), [u]),
|
|
2870
|
+
isUsingKeyboardRef: f,
|
|
2871
|
+
dir: p,
|
|
2872
|
+
modal: s,
|
|
2873
|
+
children: r
|
|
2874
|
+
}
|
|
2875
|
+
)
|
|
2876
|
+
}
|
|
2877
|
+
) });
|
|
2878
|
+
};
|
|
2879
|
+
yr.displayName = $e;
|
|
2880
|
+
var wc = "MenuAnchor", Bt = a.forwardRef(
|
|
2881
|
+
(e, t) => {
|
|
2882
|
+
const { __scopeMenu: n, ...r } = e, o = Be(n);
|
|
2883
|
+
return /* @__PURE__ */ y(ss, { ...o, ...r, ref: t });
|
|
2884
|
+
}
|
|
2885
|
+
);
|
|
2886
|
+
Bt.displayName = wc;
|
|
2887
|
+
var Wt = "MenuPortal", [yc, br] = me(Wt, {
|
|
2888
|
+
forceMount: void 0
|
|
2889
|
+
}), Cr = (e) => {
|
|
2890
|
+
const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, i = le(Wt, t);
|
|
2891
|
+
return /* @__PURE__ */ y(yc, { scope: t, forceMount: n, children: /* @__PURE__ */ y(Fe, { present: n || i.open, children: /* @__PURE__ */ y(Jn, { asChild: !0, container: o, children: r }) }) });
|
|
2892
|
+
};
|
|
2893
|
+
Cr.displayName = Wt;
|
|
2894
|
+
var Y = "MenuContent", [bc, Ut] = me(Y), Er = a.forwardRef(
|
|
2895
|
+
(e, t) => {
|
|
2896
|
+
const n = br(Y, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = le(Y, e.__scopeMenu), s = We(Y, e.__scopeMenu);
|
|
2897
|
+
return /* @__PURE__ */ y(Ie.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ y(Fe, { present: r || i.open, children: /* @__PURE__ */ y(Ie.Slot, { scope: e.__scopeMenu, children: s.modal ? /* @__PURE__ */ y(Cc, { ...o, ref: t }) : /* @__PURE__ */ y(Ec, { ...o, ref: t }) }) }) });
|
|
2898
|
+
}
|
|
2899
|
+
), Cc = a.forwardRef(
|
|
2900
|
+
(e, t) => {
|
|
2901
|
+
const n = le(Y, e.__scopeMenu), r = a.useRef(null), o = G(t, r);
|
|
2902
|
+
return a.useEffect(() => {
|
|
2903
|
+
const i = r.current;
|
|
2904
|
+
if (i) return Ps(i);
|
|
2905
|
+
}, []), /* @__PURE__ */ y(
|
|
2906
|
+
Kt,
|
|
2907
|
+
{
|
|
2908
|
+
...e,
|
|
2909
|
+
ref: o,
|
|
2910
|
+
trapFocus: n.open,
|
|
2911
|
+
disableOutsidePointerEvents: n.open,
|
|
2912
|
+
disableOutsideScroll: !0,
|
|
2913
|
+
onFocusOutside: O(
|
|
2914
|
+
e.onFocusOutside,
|
|
2915
|
+
(i) => i.preventDefault(),
|
|
2916
|
+
{ checkForDefaultPrevented: !1 }
|
|
2917
|
+
),
|
|
2918
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
2919
|
+
}
|
|
2920
|
+
);
|
|
2921
|
+
}
|
|
2922
|
+
), Ec = a.forwardRef((e, t) => {
|
|
2923
|
+
const n = le(Y, e.__scopeMenu);
|
|
2924
|
+
return /* @__PURE__ */ y(
|
|
2925
|
+
Kt,
|
|
2926
|
+
{
|
|
2927
|
+
...e,
|
|
2928
|
+
ref: t,
|
|
2929
|
+
trapFocus: !1,
|
|
2930
|
+
disableOutsidePointerEvents: !1,
|
|
2931
|
+
disableOutsideScroll: !1,
|
|
2932
|
+
onDismiss: () => n.onOpenChange(!1)
|
|
2933
|
+
}
|
|
2934
|
+
);
|
|
2935
|
+
}), xc = /* @__PURE__ */ Qe("MenuContent.ScrollLock"), Kt = a.forwardRef(
|
|
2936
|
+
(e, t) => {
|
|
2937
|
+
const {
|
|
2938
|
+
__scopeMenu: n,
|
|
2939
|
+
loop: r = !1,
|
|
2940
|
+
trapFocus: o,
|
|
2941
|
+
onOpenAutoFocus: i,
|
|
2942
|
+
onCloseAutoFocus: s,
|
|
2943
|
+
disableOutsidePointerEvents: c,
|
|
2944
|
+
onEntryFocus: d,
|
|
2945
|
+
onEscapeKeyDown: l,
|
|
2946
|
+
onPointerDownOutside: f,
|
|
2947
|
+
onFocusOutside: u,
|
|
2948
|
+
onInteractOutside: p,
|
|
2949
|
+
onDismiss: h,
|
|
2950
|
+
disableOutsideScroll: g,
|
|
2951
|
+
...m
|
|
2952
|
+
} = e, v = le(Y, n), w = We(Y, n), C = Be(n), b = gr(n), E = hc(n), [x, M] = a.useState(null), S = a.useRef(null), A = G(t, S, v.onContentChange), I = a.useRef(0), _ = a.useRef(""), F = a.useRef(0), k = a.useRef(null), N = a.useRef("right"), D = a.useRef(0), B = g ? mr : a.Fragment, T = g ? { as: xc, allowPinchZoom: !0 } : void 0, $ = (R) => {
|
|
2953
|
+
var re, Re;
|
|
2954
|
+
const L = _.current + R, U = E().filter((z) => !z.disabled), Z = document.activeElement, xe = (re = U.find((z) => z.ref.current === Z)) == null ? void 0 : re.textValue, Se = U.map((z) => z.textValue), Ue = Lc(Se, L, xe), fe = (Re = U.find((z) => z.textValue === Ue)) == null ? void 0 : Re.ref.current;
|
|
2955
|
+
(function z(Me) {
|
|
2956
|
+
_.current = Me, window.clearTimeout(I.current), Me !== "" && (I.current = window.setTimeout(() => z(""), 1e3));
|
|
2957
|
+
})(L), fe && setTimeout(() => fe.focus());
|
|
2958
|
+
};
|
|
2959
|
+
a.useEffect(() => () => window.clearTimeout(I.current), []), To();
|
|
2960
|
+
const P = a.useCallback((R) => {
|
|
2961
|
+
var U, Z;
|
|
2962
|
+
return N.current === ((U = k.current) == null ? void 0 : U.side) && kc(R, (Z = k.current) == null ? void 0 : Z.area);
|
|
2963
|
+
}, []);
|
|
2964
|
+
return /* @__PURE__ */ y(
|
|
2965
|
+
bc,
|
|
2966
|
+
{
|
|
2967
|
+
scope: n,
|
|
2968
|
+
searchRef: _,
|
|
2969
|
+
onItemEnter: a.useCallback(
|
|
2970
|
+
(R) => {
|
|
2971
|
+
P(R) && R.preventDefault();
|
|
2972
|
+
},
|
|
2973
|
+
[P]
|
|
2974
|
+
),
|
|
2975
|
+
onItemLeave: a.useCallback(
|
|
2976
|
+
(R) => {
|
|
2977
|
+
var L;
|
|
2978
|
+
P(R) || ((L = S.current) == null || L.focus(), M(null));
|
|
2979
|
+
},
|
|
2980
|
+
[P]
|
|
2981
|
+
),
|
|
2982
|
+
onTriggerLeave: a.useCallback(
|
|
2983
|
+
(R) => {
|
|
2984
|
+
P(R) && R.preventDefault();
|
|
2985
|
+
},
|
|
2986
|
+
[P]
|
|
2987
|
+
),
|
|
2988
|
+
pointerGraceTimerRef: F,
|
|
2989
|
+
onPointerGraceIntentChange: a.useCallback((R) => {
|
|
2990
|
+
k.current = R;
|
|
2991
|
+
}, []),
|
|
2992
|
+
children: /* @__PURE__ */ y(B, { ...T, children: /* @__PURE__ */ y(
|
|
2993
|
+
Pn,
|
|
2994
|
+
{
|
|
2995
|
+
asChild: !0,
|
|
2996
|
+
trapped: o,
|
|
2997
|
+
onMountAutoFocus: O(i, (R) => {
|
|
2998
|
+
var L;
|
|
2999
|
+
R.preventDefault(), (L = S.current) == null || L.focus({ preventScroll: !0 });
|
|
3000
|
+
}),
|
|
3001
|
+
onUnmountAutoFocus: s,
|
|
3002
|
+
children: /* @__PURE__ */ y(
|
|
3003
|
+
Mn,
|
|
3004
|
+
{
|
|
3005
|
+
asChild: !0,
|
|
3006
|
+
disableOutsidePointerEvents: c,
|
|
3007
|
+
onEscapeKeyDown: l,
|
|
3008
|
+
onPointerDownOutside: f,
|
|
3009
|
+
onFocusOutside: u,
|
|
3010
|
+
onInteractOutside: p,
|
|
3011
|
+
onDismiss: h,
|
|
3012
|
+
children: /* @__PURE__ */ y(
|
|
3013
|
+
xs,
|
|
3014
|
+
{
|
|
3015
|
+
asChild: !0,
|
|
3016
|
+
...b,
|
|
3017
|
+
dir: w.dir,
|
|
3018
|
+
orientation: "vertical",
|
|
3019
|
+
loop: r,
|
|
3020
|
+
currentTabStopId: x,
|
|
3021
|
+
onCurrentTabStopIdChange: M,
|
|
3022
|
+
onEntryFocus: O(d, (R) => {
|
|
3023
|
+
w.isUsingKeyboardRef.current || R.preventDefault();
|
|
3024
|
+
}),
|
|
3025
|
+
preventScrollOnEntryFocus: !0,
|
|
3026
|
+
children: /* @__PURE__ */ y(
|
|
3027
|
+
cs,
|
|
3028
|
+
{
|
|
3029
|
+
role: "menu",
|
|
3030
|
+
"aria-orientation": "vertical",
|
|
3031
|
+
"data-state": Br(v.open),
|
|
3032
|
+
"data-radix-menu-content": "",
|
|
3033
|
+
dir: w.dir,
|
|
3034
|
+
...C,
|
|
3035
|
+
...m,
|
|
3036
|
+
ref: A,
|
|
3037
|
+
style: { outline: "none", ...m.style },
|
|
3038
|
+
onKeyDown: O(m.onKeyDown, (R) => {
|
|
3039
|
+
const U = R.target.closest("[data-radix-menu-content]") === R.currentTarget, Z = R.ctrlKey || R.altKey || R.metaKey, xe = R.key.length === 1;
|
|
3040
|
+
U && (R.key === "Tab" && R.preventDefault(), !Z && xe && $(R.key));
|
|
3041
|
+
const Se = S.current;
|
|
3042
|
+
if (R.target !== Se || !dc.includes(R.key)) return;
|
|
3043
|
+
R.preventDefault();
|
|
3044
|
+
const fe = E().filter((re) => !re.disabled).map((re) => re.ref.current);
|
|
3045
|
+
hr.includes(R.key) && fe.reverse(), Dc(fe);
|
|
3046
|
+
}),
|
|
3047
|
+
onBlur: O(e.onBlur, (R) => {
|
|
3048
|
+
R.currentTarget.contains(R.target) || (window.clearTimeout(I.current), _.current = "");
|
|
3049
|
+
}),
|
|
3050
|
+
onPointerMove: O(
|
|
3051
|
+
e.onPointerMove,
|
|
3052
|
+
De((R) => {
|
|
3053
|
+
const L = R.target, U = D.current !== R.clientX;
|
|
3054
|
+
if (R.currentTarget.contains(L) && U) {
|
|
3055
|
+
const Z = R.clientX > D.current ? "right" : "left";
|
|
3056
|
+
N.current = Z, D.current = R.clientX;
|
|
3057
|
+
}
|
|
3058
|
+
})
|
|
3059
|
+
)
|
|
3060
|
+
}
|
|
3061
|
+
)
|
|
3062
|
+
}
|
|
3063
|
+
)
|
|
3064
|
+
}
|
|
3065
|
+
)
|
|
3066
|
+
}
|
|
3067
|
+
) })
|
|
3068
|
+
}
|
|
3069
|
+
);
|
|
3070
|
+
}
|
|
3071
|
+
);
|
|
3072
|
+
Er.displayName = Y;
|
|
3073
|
+
var Sc = "MenuGroup", Gt = a.forwardRef(
|
|
3074
|
+
(e, t) => {
|
|
3075
|
+
const { __scopeMenu: n, ...r } = e;
|
|
3076
|
+
return /* @__PURE__ */ y(K.div, { role: "group", ...r, ref: t });
|
|
3077
|
+
}
|
|
3078
|
+
);
|
|
3079
|
+
Gt.displayName = Sc;
|
|
3080
|
+
var Rc = "MenuLabel", xr = a.forwardRef(
|
|
3081
|
+
(e, t) => {
|
|
3082
|
+
const { __scopeMenu: n, ...r } = e;
|
|
3083
|
+
return /* @__PURE__ */ y(K.div, { ...r, ref: t });
|
|
3084
|
+
}
|
|
3085
|
+
);
|
|
3086
|
+
xr.displayName = Rc;
|
|
3087
|
+
var rt = "MenuItem", bn = "menu.itemSelect", lt = a.forwardRef(
|
|
3088
|
+
(e, t) => {
|
|
3089
|
+
const { disabled: n = !1, onSelect: r, ...o } = e, i = a.useRef(null), s = We(rt, e.__scopeMenu), c = Ut(rt, e.__scopeMenu), d = G(t, i), l = a.useRef(!1), f = () => {
|
|
3090
|
+
const u = i.current;
|
|
3091
|
+
if (!n && u) {
|
|
3092
|
+
const p = new CustomEvent(bn, { bubbles: !0, cancelable: !0 });
|
|
3093
|
+
u.addEventListener(bn, (h) => r == null ? void 0 : r(h), { once: !0 }), En(u, p), p.defaultPrevented ? l.current = !1 : s.onClose();
|
|
3094
|
+
}
|
|
3095
|
+
};
|
|
3096
|
+
return /* @__PURE__ */ y(
|
|
3097
|
+
Sr,
|
|
3098
|
+
{
|
|
3099
|
+
...o,
|
|
3100
|
+
ref: d,
|
|
3101
|
+
disabled: n,
|
|
3102
|
+
onClick: O(e.onClick, f),
|
|
3103
|
+
onPointerDown: (u) => {
|
|
3104
|
+
var p;
|
|
3105
|
+
(p = e.onPointerDown) == null || p.call(e, u), l.current = !0;
|
|
3106
|
+
},
|
|
3107
|
+
onPointerUp: O(e.onPointerUp, (u) => {
|
|
3108
|
+
var p;
|
|
3109
|
+
l.current || (p = u.currentTarget) == null || p.click();
|
|
3110
|
+
}),
|
|
3111
|
+
onKeyDown: O(e.onKeyDown, (u) => {
|
|
3112
|
+
const p = c.searchRef.current !== "";
|
|
3113
|
+
n || p && u.key === " " || Pt.includes(u.key) && (u.currentTarget.click(), u.preventDefault());
|
|
3114
|
+
})
|
|
3115
|
+
}
|
|
3116
|
+
);
|
|
3117
|
+
}
|
|
3118
|
+
);
|
|
3119
|
+
lt.displayName = rt;
|
|
3120
|
+
var Sr = a.forwardRef(
|
|
3121
|
+
(e, t) => {
|
|
3122
|
+
const { __scopeMenu: n, disabled: r = !1, textValue: o, ...i } = e, s = Ut(rt, n), c = gr(n), d = a.useRef(null), l = G(t, d), [f, u] = a.useState(!1), [p, h] = a.useState("");
|
|
3123
|
+
return a.useEffect(() => {
|
|
3124
|
+
const g = d.current;
|
|
3125
|
+
g && h((g.textContent ?? "").trim());
|
|
3126
|
+
}, [i.children]), /* @__PURE__ */ y(
|
|
3127
|
+
Ie.ItemSlot,
|
|
3128
|
+
{
|
|
3129
|
+
scope: n,
|
|
3130
|
+
disabled: r,
|
|
3131
|
+
textValue: o ?? p,
|
|
3132
|
+
children: /* @__PURE__ */ y(Ss, { asChild: !0, ...c, focusable: !r, children: /* @__PURE__ */ y(
|
|
3133
|
+
K.div,
|
|
3134
|
+
{
|
|
3135
|
+
role: "menuitem",
|
|
3136
|
+
"data-highlighted": f ? "" : void 0,
|
|
3137
|
+
"aria-disabled": r || void 0,
|
|
3138
|
+
"data-disabled": r ? "" : void 0,
|
|
3139
|
+
...i,
|
|
3140
|
+
ref: l,
|
|
3141
|
+
onPointerMove: O(
|
|
3142
|
+
e.onPointerMove,
|
|
3143
|
+
De((g) => {
|
|
3144
|
+
r ? s.onItemLeave(g) : (s.onItemEnter(g), g.defaultPrevented || g.currentTarget.focus({ preventScroll: !0 }));
|
|
3145
|
+
})
|
|
3146
|
+
),
|
|
3147
|
+
onPointerLeave: O(
|
|
3148
|
+
e.onPointerLeave,
|
|
3149
|
+
De((g) => s.onItemLeave(g))
|
|
3150
|
+
),
|
|
3151
|
+
onFocus: O(e.onFocus, () => u(!0)),
|
|
3152
|
+
onBlur: O(e.onBlur, () => u(!1))
|
|
3153
|
+
}
|
|
3154
|
+
) })
|
|
3155
|
+
}
|
|
3156
|
+
);
|
|
3157
|
+
}
|
|
3158
|
+
), Mc = "MenuCheckboxItem", Rr = a.forwardRef(
|
|
3159
|
+
(e, t) => {
|
|
3160
|
+
const { checked: n = !1, onCheckedChange: r, ...o } = e;
|
|
3161
|
+
return /* @__PURE__ */ y(_r, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ y(
|
|
3162
|
+
lt,
|
|
3163
|
+
{
|
|
3164
|
+
role: "menuitemcheckbox",
|
|
3165
|
+
"aria-checked": ot(n) ? "mixed" : n,
|
|
3166
|
+
...o,
|
|
3167
|
+
ref: t,
|
|
3168
|
+
"data-state": zt(n),
|
|
3169
|
+
onSelect: O(
|
|
3170
|
+
o.onSelect,
|
|
3171
|
+
() => r == null ? void 0 : r(ot(n) ? !0 : !n),
|
|
3172
|
+
{ checkForDefaultPrevented: !1 }
|
|
3173
|
+
)
|
|
3174
|
+
}
|
|
3175
|
+
) });
|
|
3176
|
+
}
|
|
3177
|
+
);
|
|
3178
|
+
Rr.displayName = Mc;
|
|
3179
|
+
var Mr = "MenuRadioGroup", [Ac, Pc] = me(
|
|
3180
|
+
Mr,
|
|
3181
|
+
{ value: void 0, onValueChange: () => {
|
|
3182
|
+
} }
|
|
3183
|
+
), Ar = a.forwardRef(
|
|
3184
|
+
(e, t) => {
|
|
3185
|
+
const { value: n, onValueChange: r, ...o } = e, i = ee(r);
|
|
3186
|
+
return /* @__PURE__ */ y(Ac, { scope: e.__scopeMenu, value: n, onValueChange: i, children: /* @__PURE__ */ y(Gt, { ...o, ref: t }) });
|
|
3187
|
+
}
|
|
3188
|
+
);
|
|
3189
|
+
Ar.displayName = Mr;
|
|
3190
|
+
var Pr = "MenuRadioItem", Or = a.forwardRef(
|
|
3191
|
+
(e, t) => {
|
|
3192
|
+
const { value: n, ...r } = e, o = Pc(Pr, e.__scopeMenu), i = n === o.value;
|
|
3193
|
+
return /* @__PURE__ */ y(_r, { scope: e.__scopeMenu, checked: i, children: /* @__PURE__ */ y(
|
|
3194
|
+
lt,
|
|
3195
|
+
{
|
|
3196
|
+
role: "menuitemradio",
|
|
3197
|
+
"aria-checked": i,
|
|
3198
|
+
...r,
|
|
3199
|
+
ref: t,
|
|
3200
|
+
"data-state": zt(i),
|
|
3201
|
+
onSelect: O(
|
|
3202
|
+
r.onSelect,
|
|
3203
|
+
() => {
|
|
3204
|
+
var s;
|
|
3205
|
+
return (s = o.onValueChange) == null ? void 0 : s.call(o, n);
|
|
3206
|
+
},
|
|
3207
|
+
{ checkForDefaultPrevented: !1 }
|
|
3208
|
+
)
|
|
3209
|
+
}
|
|
3210
|
+
) });
|
|
3211
|
+
}
|
|
3212
|
+
);
|
|
3213
|
+
Or.displayName = Pr;
|
|
3214
|
+
var Vt = "MenuItemIndicator", [_r, Oc] = me(
|
|
3215
|
+
Vt,
|
|
3216
|
+
{ checked: !1 }
|
|
3217
|
+
), Tr = a.forwardRef(
|
|
3218
|
+
(e, t) => {
|
|
3219
|
+
const { __scopeMenu: n, forceMount: r, ...o } = e, i = Oc(Vt, n);
|
|
3220
|
+
return /* @__PURE__ */ y(
|
|
3221
|
+
Fe,
|
|
3222
|
+
{
|
|
3223
|
+
present: r || ot(i.checked) || i.checked === !0,
|
|
3224
|
+
children: /* @__PURE__ */ y(
|
|
3225
|
+
K.span,
|
|
3226
|
+
{
|
|
3227
|
+
...o,
|
|
3228
|
+
ref: t,
|
|
3229
|
+
"data-state": zt(i.checked)
|
|
3230
|
+
}
|
|
3231
|
+
)
|
|
3232
|
+
}
|
|
3233
|
+
);
|
|
3234
|
+
}
|
|
3235
|
+
);
|
|
3236
|
+
Tr.displayName = Vt;
|
|
3237
|
+
var _c = "MenuSeparator", Ir = a.forwardRef(
|
|
3238
|
+
(e, t) => {
|
|
3239
|
+
const { __scopeMenu: n, ...r } = e;
|
|
3240
|
+
return /* @__PURE__ */ y(
|
|
3241
|
+
K.div,
|
|
3242
|
+
{
|
|
3243
|
+
role: "separator",
|
|
3244
|
+
"aria-orientation": "horizontal",
|
|
3245
|
+
...r,
|
|
3246
|
+
ref: t
|
|
3247
|
+
}
|
|
3248
|
+
);
|
|
3249
|
+
}
|
|
3250
|
+
);
|
|
3251
|
+
Ir.displayName = _c;
|
|
3252
|
+
var Tc = "MenuArrow", Dr = a.forwardRef(
|
|
3253
|
+
(e, t) => {
|
|
3254
|
+
const { __scopeMenu: n, ...r } = e, o = Be(n);
|
|
3255
|
+
return /* @__PURE__ */ y(as, { ...o, ...r, ref: t });
|
|
3256
|
+
}
|
|
3257
|
+
);
|
|
3258
|
+
Dr.displayName = Tc;
|
|
3259
|
+
var Ht = "MenuSub", [Ic, Nr] = me(Ht), Lr = (e) => {
|
|
3260
|
+
const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, i = le(Ht, t), s = Be(t), [c, d] = a.useState(null), [l, f] = a.useState(null), u = ee(o);
|
|
3261
|
+
return a.useEffect(() => (i.open === !1 && u(!1), () => u(!1)), [i.open, u]), /* @__PURE__ */ y(Qn, { ...s, children: /* @__PURE__ */ y(
|
|
3262
|
+
wr,
|
|
3263
|
+
{
|
|
3264
|
+
scope: t,
|
|
3265
|
+
open: r,
|
|
3266
|
+
onOpenChange: u,
|
|
3267
|
+
content: l,
|
|
3268
|
+
onContentChange: f,
|
|
3269
|
+
children: /* @__PURE__ */ y(
|
|
3270
|
+
Ic,
|
|
3271
|
+
{
|
|
3272
|
+
scope: t,
|
|
3273
|
+
contentId: Oe(),
|
|
3274
|
+
triggerId: Oe(),
|
|
3275
|
+
trigger: c,
|
|
3276
|
+
onTriggerChange: d,
|
|
3277
|
+
children: n
|
|
3278
|
+
}
|
|
3279
|
+
)
|
|
3280
|
+
}
|
|
3281
|
+
) });
|
|
3282
|
+
};
|
|
3283
|
+
Lr.displayName = Ht;
|
|
3284
|
+
var Pe = "MenuSubTrigger", Fr = a.forwardRef(
|
|
3285
|
+
(e, t) => {
|
|
3286
|
+
const n = le(Pe, e.__scopeMenu), r = We(Pe, e.__scopeMenu), o = Nr(Pe, e.__scopeMenu), i = Ut(Pe, e.__scopeMenu), s = a.useRef(null), { pointerGraceTimerRef: c, onPointerGraceIntentChange: d } = i, l = { __scopeMenu: e.__scopeMenu }, f = a.useCallback(() => {
|
|
3287
|
+
s.current && window.clearTimeout(s.current), s.current = null;
|
|
3288
|
+
}, []);
|
|
3289
|
+
return a.useEffect(() => f, [f]), a.useEffect(() => {
|
|
3290
|
+
const u = c.current;
|
|
3291
|
+
return () => {
|
|
3292
|
+
window.clearTimeout(u), d(null);
|
|
3293
|
+
};
|
|
3294
|
+
}, [c, d]), /* @__PURE__ */ y(Bt, { asChild: !0, ...l, children: /* @__PURE__ */ y(
|
|
3295
|
+
Sr,
|
|
3296
|
+
{
|
|
3297
|
+
id: o.triggerId,
|
|
3298
|
+
"aria-haspopup": "menu",
|
|
3299
|
+
"aria-expanded": n.open,
|
|
3300
|
+
"aria-controls": o.contentId,
|
|
3301
|
+
"data-state": Br(n.open),
|
|
3302
|
+
...e,
|
|
3303
|
+
ref: it(t, o.onTriggerChange),
|
|
3304
|
+
onClick: (u) => {
|
|
3305
|
+
var p;
|
|
3306
|
+
(p = e.onClick) == null || p.call(e, u), !(e.disabled || u.defaultPrevented) && (u.currentTarget.focus(), n.open || n.onOpenChange(!0));
|
|
3307
|
+
},
|
|
3308
|
+
onPointerMove: O(
|
|
3309
|
+
e.onPointerMove,
|
|
3310
|
+
De((u) => {
|
|
3311
|
+
i.onItemEnter(u), !u.defaultPrevented && !e.disabled && !n.open && !s.current && (i.onPointerGraceIntentChange(null), s.current = window.setTimeout(() => {
|
|
3312
|
+
n.onOpenChange(!0), f();
|
|
3313
|
+
}, 100));
|
|
3314
|
+
})
|
|
3315
|
+
),
|
|
3316
|
+
onPointerLeave: O(
|
|
3317
|
+
e.onPointerLeave,
|
|
3318
|
+
De((u) => {
|
|
3319
|
+
var h, g;
|
|
3320
|
+
f();
|
|
3321
|
+
const p = (h = n.content) == null ? void 0 : h.getBoundingClientRect();
|
|
3322
|
+
if (p) {
|
|
3323
|
+
const m = (g = n.content) == null ? void 0 : g.dataset.side, v = m === "right", w = v ? -5 : 5, C = p[v ? "left" : "right"], b = p[v ? "right" : "left"];
|
|
3324
|
+
i.onPointerGraceIntentChange({
|
|
3325
|
+
area: [
|
|
3326
|
+
// Apply a bleed on clientX to ensure that our exit point is
|
|
3327
|
+
// consistently within polygon bounds
|
|
3328
|
+
{ x: u.clientX + w, y: u.clientY },
|
|
3329
|
+
{ x: C, y: p.top },
|
|
3330
|
+
{ x: b, y: p.top },
|
|
3331
|
+
{ x: b, y: p.bottom },
|
|
3332
|
+
{ x: C, y: p.bottom }
|
|
3333
|
+
],
|
|
3334
|
+
side: m
|
|
3335
|
+
}), window.clearTimeout(c.current), c.current = window.setTimeout(
|
|
3336
|
+
() => i.onPointerGraceIntentChange(null),
|
|
3337
|
+
300
|
|
3338
|
+
);
|
|
3339
|
+
} else {
|
|
3340
|
+
if (i.onTriggerLeave(u), u.defaultPrevented) return;
|
|
3341
|
+
i.onPointerGraceIntentChange(null);
|
|
3342
|
+
}
|
|
3343
|
+
})
|
|
3344
|
+
),
|
|
3345
|
+
onKeyDown: O(e.onKeyDown, (u) => {
|
|
3346
|
+
var h;
|
|
3347
|
+
const p = i.searchRef.current !== "";
|
|
3348
|
+
e.disabled || p && u.key === " " || pc[r.dir].includes(u.key) && (n.onOpenChange(!0), (h = n.content) == null || h.focus(), u.preventDefault());
|
|
3349
|
+
})
|
|
3350
|
+
}
|
|
3351
|
+
) });
|
|
3352
|
+
}
|
|
3353
|
+
);
|
|
3354
|
+
Fr.displayName = Pe;
|
|
3355
|
+
var kr = "MenuSubContent", $r = a.forwardRef(
|
|
3356
|
+
(e, t) => {
|
|
3357
|
+
const n = br(Y, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, i = le(Y, e.__scopeMenu), s = We(Y, e.__scopeMenu), c = Nr(kr, e.__scopeMenu), d = a.useRef(null), l = G(t, d);
|
|
3358
|
+
return /* @__PURE__ */ y(Ie.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ y(Fe, { present: r || i.open, children: /* @__PURE__ */ y(Ie.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ y(
|
|
3359
|
+
Kt,
|
|
3360
|
+
{
|
|
3361
|
+
id: c.contentId,
|
|
3362
|
+
"aria-labelledby": c.triggerId,
|
|
3363
|
+
...o,
|
|
3364
|
+
ref: l,
|
|
3365
|
+
align: "start",
|
|
3366
|
+
side: s.dir === "rtl" ? "left" : "right",
|
|
3367
|
+
disableOutsidePointerEvents: !1,
|
|
3368
|
+
disableOutsideScroll: !1,
|
|
3369
|
+
trapFocus: !1,
|
|
3370
|
+
onOpenAutoFocus: (f) => {
|
|
3371
|
+
var u;
|
|
3372
|
+
s.isUsingKeyboardRef.current && ((u = d.current) == null || u.focus()), f.preventDefault();
|
|
3373
|
+
},
|
|
3374
|
+
onCloseAutoFocus: (f) => f.preventDefault(),
|
|
3375
|
+
onFocusOutside: O(e.onFocusOutside, (f) => {
|
|
3376
|
+
f.target !== c.trigger && i.onOpenChange(!1);
|
|
3377
|
+
}),
|
|
3378
|
+
onEscapeKeyDown: O(e.onEscapeKeyDown, (f) => {
|
|
3379
|
+
s.onClose(), f.preventDefault();
|
|
3380
|
+
}),
|
|
3381
|
+
onKeyDown: O(e.onKeyDown, (f) => {
|
|
3382
|
+
var h;
|
|
3383
|
+
const u = f.currentTarget.contains(f.target), p = mc[s.dir].includes(f.key);
|
|
3384
|
+
u && p && (i.onOpenChange(!1), (h = c.trigger) == null || h.focus(), f.preventDefault());
|
|
3385
|
+
})
|
|
3386
|
+
}
|
|
3387
|
+
) }) }) });
|
|
3388
|
+
}
|
|
3389
|
+
);
|
|
3390
|
+
$r.displayName = kr;
|
|
3391
|
+
function Br(e) {
|
|
3392
|
+
return e ? "open" : "closed";
|
|
3393
|
+
}
|
|
3394
|
+
function ot(e) {
|
|
3395
|
+
return e === "indeterminate";
|
|
3396
|
+
}
|
|
3397
|
+
function zt(e) {
|
|
3398
|
+
return ot(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
3399
|
+
}
|
|
3400
|
+
function Dc(e) {
|
|
3401
|
+
const t = document.activeElement;
|
|
3402
|
+
for (const n of e)
|
|
3403
|
+
if (n === t || (n.focus(), document.activeElement !== t)) return;
|
|
3404
|
+
}
|
|
3405
|
+
function Nc(e, t) {
|
|
3406
|
+
return e.map((n, r) => e[(t + r) % e.length]);
|
|
3407
|
+
}
|
|
3408
|
+
function Lc(e, t, n) {
|
|
3409
|
+
const o = t.length > 1 && Array.from(t).every((l) => l === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1;
|
|
3410
|
+
let s = Nc(e, Math.max(i, 0));
|
|
3411
|
+
o.length === 1 && (s = s.filter((l) => l !== n));
|
|
3412
|
+
const d = s.find(
|
|
3413
|
+
(l) => l.toLowerCase().startsWith(o.toLowerCase())
|
|
3414
|
+
);
|
|
3415
|
+
return d !== n ? d : void 0;
|
|
3416
|
+
}
|
|
3417
|
+
function Fc(e, t) {
|
|
3418
|
+
const { x: n, y: r } = e;
|
|
3419
|
+
let o = !1;
|
|
3420
|
+
for (let i = 0, s = t.length - 1; i < t.length; s = i++) {
|
|
3421
|
+
const c = t[i], d = t[s], l = c.x, f = c.y, u = d.x, p = d.y;
|
|
3422
|
+
f > r != p > r && n < (u - l) * (r - f) / (p - f) + l && (o = !o);
|
|
3423
|
+
}
|
|
3424
|
+
return o;
|
|
3425
|
+
}
|
|
3426
|
+
function kc(e, t) {
|
|
3427
|
+
if (!t) return !1;
|
|
3428
|
+
const n = { x: e.clientX, y: e.clientY };
|
|
3429
|
+
return Fc(n, t);
|
|
3430
|
+
}
|
|
3431
|
+
function De(e) {
|
|
3432
|
+
return (t) => t.pointerType === "mouse" ? e(t) : void 0;
|
|
3433
|
+
}
|
|
3434
|
+
var $c = yr, Bc = Bt, Wc = Cr, Uc = Er, Kc = Gt, Gc = xr, Vc = lt, Hc = Rr, zc = Ar, Yc = Or, jc = Tr, Xc = Ir, Zc = Dr, qc = Lr, Qc = Fr, Jc = $r, ft = "DropdownMenu", [ea, wa] = Ne(
|
|
3435
|
+
ft,
|
|
3436
|
+
[vr]
|
|
3437
|
+
), W = vr(), [ta, Wr] = ea(ft), Ur = (e) => {
|
|
3438
|
+
const {
|
|
3439
|
+
__scopeDropdownMenu: t,
|
|
3440
|
+
children: n,
|
|
3441
|
+
dir: r,
|
|
3442
|
+
open: o,
|
|
3443
|
+
defaultOpen: i,
|
|
3444
|
+
onOpenChange: s,
|
|
3445
|
+
modal: c = !0
|
|
3446
|
+
} = e, d = W(t), l = a.useRef(null), [f, u] = Ot({
|
|
3447
|
+
prop: o,
|
|
3448
|
+
defaultProp: i ?? !1,
|
|
3449
|
+
onChange: s,
|
|
3450
|
+
caller: ft
|
|
3451
|
+
});
|
|
3452
|
+
return /* @__PURE__ */ y(
|
|
3453
|
+
ta,
|
|
3454
|
+
{
|
|
3455
|
+
scope: t,
|
|
3456
|
+
triggerId: Oe(),
|
|
3457
|
+
triggerRef: l,
|
|
3458
|
+
contentId: Oe(),
|
|
3459
|
+
open: f,
|
|
3460
|
+
onOpenChange: u,
|
|
3461
|
+
onOpenToggle: a.useCallback(() => u((p) => !p), [u]),
|
|
3462
|
+
modal: c,
|
|
3463
|
+
children: /* @__PURE__ */ y($c, { ...d, open: f, onOpenChange: u, dir: r, modal: c, children: n })
|
|
3464
|
+
}
|
|
3465
|
+
);
|
|
3466
|
+
};
|
|
3467
|
+
Ur.displayName = ft;
|
|
3468
|
+
var Kr = "DropdownMenuTrigger", Gr = a.forwardRef(
|
|
3469
|
+
(e, t) => {
|
|
3470
|
+
const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, i = Wr(Kr, n), s = W(n);
|
|
3471
|
+
return /* @__PURE__ */ y(Bc, { asChild: !0, ...s, children: /* @__PURE__ */ y(
|
|
3472
|
+
K.button,
|
|
3473
|
+
{
|
|
3474
|
+
type: "button",
|
|
3475
|
+
id: i.triggerId,
|
|
3476
|
+
"aria-haspopup": "menu",
|
|
3477
|
+
"aria-expanded": i.open,
|
|
3478
|
+
"aria-controls": i.open ? i.contentId : void 0,
|
|
3479
|
+
"data-state": i.open ? "open" : "closed",
|
|
3480
|
+
"data-disabled": r ? "" : void 0,
|
|
3481
|
+
disabled: r,
|
|
3482
|
+
...o,
|
|
3483
|
+
ref: it(t, i.triggerRef),
|
|
3484
|
+
onPointerDown: O(e.onPointerDown, (c) => {
|
|
3485
|
+
!r && c.button === 0 && c.ctrlKey === !1 && (i.onOpenToggle(), i.open || c.preventDefault());
|
|
3486
|
+
}),
|
|
3487
|
+
onKeyDown: O(e.onKeyDown, (c) => {
|
|
3488
|
+
r || (["Enter", " "].includes(c.key) && i.onOpenToggle(), c.key === "ArrowDown" && i.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(c.key) && c.preventDefault());
|
|
3489
|
+
})
|
|
3490
|
+
}
|
|
3491
|
+
) });
|
|
3492
|
+
}
|
|
3493
|
+
);
|
|
3494
|
+
Gr.displayName = Kr;
|
|
3495
|
+
var na = "DropdownMenuPortal", Vr = (e) => {
|
|
3496
|
+
const { __scopeDropdownMenu: t, ...n } = e, r = W(t);
|
|
3497
|
+
return /* @__PURE__ */ y(Wc, { ...r, ...n });
|
|
3498
|
+
};
|
|
3499
|
+
Vr.displayName = na;
|
|
3500
|
+
var Hr = "DropdownMenuContent", zr = a.forwardRef(
|
|
3501
|
+
(e, t) => {
|
|
3502
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = Wr(Hr, n), i = W(n), s = a.useRef(!1);
|
|
3503
|
+
return /* @__PURE__ */ y(
|
|
3504
|
+
Uc,
|
|
3505
|
+
{
|
|
3506
|
+
id: o.contentId,
|
|
3507
|
+
"aria-labelledby": o.triggerId,
|
|
3508
|
+
...i,
|
|
3509
|
+
...r,
|
|
3510
|
+
ref: t,
|
|
3511
|
+
onCloseAutoFocus: O(e.onCloseAutoFocus, (c) => {
|
|
3512
|
+
var d;
|
|
3513
|
+
s.current || (d = o.triggerRef.current) == null || d.focus(), s.current = !1, c.preventDefault();
|
|
3514
|
+
}),
|
|
3515
|
+
onInteractOutside: O(e.onInteractOutside, (c) => {
|
|
3516
|
+
const d = c.detail.originalEvent, l = d.button === 0 && d.ctrlKey === !0, f = d.button === 2 || l;
|
|
3517
|
+
(!o.modal || f) && (s.current = !0);
|
|
3518
|
+
}),
|
|
3519
|
+
style: {
|
|
3520
|
+
...e.style,
|
|
3521
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
3522
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
3523
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
3524
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
3525
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
3526
|
+
}
|
|
3527
|
+
}
|
|
3528
|
+
);
|
|
3529
|
+
}
|
|
3530
|
+
);
|
|
3531
|
+
zr.displayName = Hr;
|
|
3532
|
+
var ra = "DropdownMenuGroup", Yr = a.forwardRef(
|
|
3533
|
+
(e, t) => {
|
|
3534
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
3535
|
+
return /* @__PURE__ */ y(Kc, { ...o, ...r, ref: t });
|
|
3536
|
+
}
|
|
3537
|
+
);
|
|
3538
|
+
Yr.displayName = ra;
|
|
3539
|
+
var oa = "DropdownMenuLabel", jr = a.forwardRef(
|
|
3540
|
+
(e, t) => {
|
|
3541
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
3542
|
+
return /* @__PURE__ */ y(Gc, { ...o, ...r, ref: t });
|
|
3543
|
+
}
|
|
3544
|
+
);
|
|
3545
|
+
jr.displayName = oa;
|
|
3546
|
+
var ia = "DropdownMenuItem", Xr = a.forwardRef(
|
|
3547
|
+
(e, t) => {
|
|
3548
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
3549
|
+
return /* @__PURE__ */ y(Vc, { ...o, ...r, ref: t });
|
|
3550
|
+
}
|
|
3551
|
+
);
|
|
3552
|
+
Xr.displayName = ia;
|
|
3553
|
+
var sa = "DropdownMenuCheckboxItem", Zr = a.forwardRef((e, t) => {
|
|
3554
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
3555
|
+
return /* @__PURE__ */ y(Hc, { ...o, ...r, ref: t });
|
|
3556
|
+
});
|
|
3557
|
+
Zr.displayName = sa;
|
|
3558
|
+
var ca = "DropdownMenuRadioGroup", qr = a.forwardRef((e, t) => {
|
|
3559
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
3560
|
+
return /* @__PURE__ */ y(zc, { ...o, ...r, ref: t });
|
|
3561
|
+
});
|
|
3562
|
+
qr.displayName = ca;
|
|
3563
|
+
var aa = "DropdownMenuRadioItem", Qr = a.forwardRef((e, t) => {
|
|
3564
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
3565
|
+
return /* @__PURE__ */ y(Yc, { ...o, ...r, ref: t });
|
|
3566
|
+
});
|
|
3567
|
+
Qr.displayName = aa;
|
|
3568
|
+
var ua = "DropdownMenuItemIndicator", Jr = a.forwardRef((e, t) => {
|
|
3569
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
3570
|
+
return /* @__PURE__ */ y(jc, { ...o, ...r, ref: t });
|
|
3571
|
+
});
|
|
3572
|
+
Jr.displayName = ua;
|
|
3573
|
+
var la = "DropdownMenuSeparator", eo = a.forwardRef((e, t) => {
|
|
3574
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
3575
|
+
return /* @__PURE__ */ y(Xc, { ...o, ...r, ref: t });
|
|
3576
|
+
});
|
|
3577
|
+
eo.displayName = la;
|
|
3578
|
+
var fa = "DropdownMenuArrow", to = a.forwardRef(
|
|
3579
|
+
(e, t) => {
|
|
3580
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
3581
|
+
return /* @__PURE__ */ y(Zc, { ...o, ...r, ref: t });
|
|
3582
|
+
}
|
|
3583
|
+
);
|
|
3584
|
+
to.displayName = fa;
|
|
3585
|
+
var da = (e) => {
|
|
3586
|
+
const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: i } = e, s = W(t), [c, d] = Ot({
|
|
3587
|
+
prop: r,
|
|
3588
|
+
defaultProp: i ?? !1,
|
|
3589
|
+
onChange: o,
|
|
3590
|
+
caller: "DropdownMenuSub"
|
|
3591
|
+
});
|
|
3592
|
+
return /* @__PURE__ */ y(qc, { ...s, open: c, onOpenChange: d, children: n });
|
|
3593
|
+
}, pa = "DropdownMenuSubTrigger", no = a.forwardRef((e, t) => {
|
|
3594
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
3595
|
+
return /* @__PURE__ */ y(Qc, { ...o, ...r, ref: t });
|
|
3596
|
+
});
|
|
3597
|
+
no.displayName = pa;
|
|
3598
|
+
var ma = "DropdownMenuSubContent", ro = a.forwardRef((e, t) => {
|
|
3599
|
+
const { __scopeDropdownMenu: n, ...r } = e, o = W(n);
|
|
3600
|
+
return /* @__PURE__ */ y(
|
|
3601
|
+
Jc,
|
|
3602
|
+
{
|
|
3603
|
+
...o,
|
|
3604
|
+
...r,
|
|
3605
|
+
ref: t,
|
|
3606
|
+
style: {
|
|
3607
|
+
...e.style,
|
|
3608
|
+
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
3609
|
+
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
3610
|
+
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
3611
|
+
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
3612
|
+
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
3613
|
+
}
|
|
3614
|
+
}
|
|
3615
|
+
);
|
|
3616
|
+
});
|
|
3617
|
+
ro.displayName = ma;
|
|
3618
|
+
var ya = Ur, ba = Gr, Ca = Vr, Ea = zr, xa = Yr, Sa = jr, Ra = Xr, Ma = Zr, Aa = qr, Pa = Qr, Oa = Jr, _a = eo, Ta = to, Ia = da, Da = no, Na = ro;
|
|
3619
|
+
export {
|
|
3620
|
+
Ta as A,
|
|
3621
|
+
Ea as C,
|
|
3622
|
+
xa as G,
|
|
3623
|
+
Ra as I,
|
|
3624
|
+
Sa as L,
|
|
3625
|
+
Ca as P,
|
|
3626
|
+
ya as R,
|
|
3627
|
+
Ia as S,
|
|
3628
|
+
ba as T,
|
|
3629
|
+
Aa as a,
|
|
3630
|
+
Da as b,
|
|
3631
|
+
Na as c,
|
|
3632
|
+
Ma as d,
|
|
3633
|
+
Oa as e,
|
|
3634
|
+
Pa as f,
|
|
3635
|
+
_a as g
|
|
3636
|
+
};
|