@g4rcez/components 4.1.3 → 5.0.0
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/ai/docs/AnimatedList.md +1 -1
- package/ai/docs/Autocomplete.md +2 -2
- package/ai/docs/Button.md +1 -1
- package/ai/docs/Card.md +7 -7
- package/ai/docs/DatePicker.md +2 -2
- package/ai/docs/Dropdown.md +7 -7
- package/ai/docs/Expand.md +5 -5
- package/ai/docs/Input.md +3 -3
- package/ai/docs/InputField.md +24 -14
- package/ai/docs/List.md +1 -1
- package/ai/docs/Modal.md +4 -4
- package/ai/docs/MultiSelect.md +2 -2
- package/ai/docs/PageCalendar.md +2 -2
- package/ai/docs/Polymorph.md +1 -1
- package/ai/docs/Resizable.md +3 -3
- package/ai/docs/Select.md +2 -2
- package/ai/docs/Skeleton.md +1 -1
- package/ai/docs/Slot.md +3 -3
- package/ai/docs/Spinner.md +1 -1
- package/ai/docs/Stats.md +1 -1
- package/ai/docs/Step.md +1 -1
- package/ai/docs/Tabs.md +1 -1
- package/ai/docs/Tag.md +1 -1
- package/ai/docs/TaskList.md +3 -3
- package/ai/docs/Textarea.md +2 -2
- package/ai/docs/Tooltip.md +13 -9
- package/ai/docs/Typography.md +1 -1
- package/ai/docs/index.md +17 -17
- package/dist/CaretDown.es-BXl0Ixp3.js +23 -0
- package/dist/CaretDown.es-BXl0Ixp3.js.map +1 -0
- package/dist/CaretRight.es-B2mpMfqU.js +23 -0
- package/dist/CaretRight.es-B2mpMfqU.js.map +1 -0
- package/dist/CheckCircle.es-BB91gLT-.js +23 -0
- package/dist/CheckCircle.es-BB91gLT-.js.map +1 -0
- package/dist/File.es-CjNVQ00B.js +23 -0
- package/dist/File.es-CjNVQ00B.js.map +1 -0
- package/dist/IconBase.es-BlJQ9IXo.js +27 -0
- package/dist/IconBase.es-BlJQ9IXo.js.map +1 -0
- package/dist/Info.es-Dvln8pws.js +23 -0
- package/dist/Info.es-Dvln8pws.js.map +1 -0
- package/dist/MotionConfig-BLwtdAWy.js +27 -0
- package/dist/MotionConfig-BLwtdAWy.js.map +1 -0
- package/dist/MotionConfigContext-BORpSKe8.js +2571 -0
- package/dist/MotionConfigContext-BORpSKe8.js.map +1 -0
- package/dist/Warning.es-B_xCn-P5.js +23 -0
- package/dist/Warning.es-B_xCn-P5.js.map +1 -0
- package/dist/X.es-Cjq2a_OA.js +23 -0
- package/dist/X.es-Cjq2a_OA.js.map +1 -0
- package/dist/animate-BNYgkk_j.js +387 -0
- package/dist/animate-BNYgkk_j.js.map +1 -0
- package/dist/autocomplete-DVKTP0Il.js +415 -0
- package/dist/autocomplete-DVKTP0Il.js.map +1 -0
- package/dist/calendar-_DZjphH8.js +1678 -0
- package/dist/calendar-_DZjphH8.js.map +1 -0
- package/dist/components/core/button.js +75 -75
- package/dist/components/core/button.js.map +1 -1
- package/dist/components/core/tag.js +66 -66
- package/dist/components/core/tag.js.map +1 -1
- package/dist/components/display/alert.js +133 -95
- package/dist/components/display/alert.js.map +1 -1
- package/dist/components/display/calendar.js +3 -15
- package/dist/components/display/card.js +73 -82
- package/dist/components/display/card.js.map +1 -1
- package/dist/components/display/list.js +153 -93
- package/dist/components/display/list.js.map +1 -1
- package/dist/components/display/notifications.js +3 -15
- package/dist/components/display/stats.js +30 -16
- package/dist/components/display/stats.js.map +1 -1
- package/dist/components/display/tabs.js +3 -12
- package/dist/components/display/timeline.js +47 -28
- package/dist/components/display/timeline.js.map +1 -1
- package/dist/components/floating/dropdown.js +76 -65
- package/dist/components/floating/dropdown.js.map +1 -1
- package/dist/components/floating/expand.js +62 -40
- package/dist/components/floating/expand.js.map +1 -1
- package/dist/components/floating/menu.js +195 -177
- package/dist/components/floating/menu.js.map +1 -1
- package/dist/components/floating/modal.js +3 -301
- package/dist/components/floating/tooltip.js +63 -73
- package/dist/components/floating/tooltip.js.map +1 -1
- package/dist/components/form/autocomplete.js +3 -16
- package/dist/components/form/checkbox.js +34 -44
- package/dist/components/form/checkbox.js.map +1 -1
- package/dist/components/form/date-picker.js +3 -12
- package/dist/components/form/file-upload.js +3 -11
- package/dist/components/form/form.js +16 -7
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/form/input.js +3 -5
- package/dist/components/form/radiobox.js +19 -30
- package/dist/components/form/radiobox.js.map +1 -1
- package/dist/components/form/select.js +77 -106
- package/dist/components/form/select.js.map +1 -1
- package/dist/components/form/switch.js +73 -64
- package/dist/components/form/switch.js.map +1 -1
- package/dist/components/form/task-list.js +3 -68
- package/dist/components/table/table.js +3 -10
- package/dist/date-picker-9q_Ki5Vu.js +1498 -0
- package/dist/date-picker-9q_Ki5Vu.js.map +1 -0
- package/dist/dist-BHFtgf5x.js +2593 -0
- package/dist/dist-BHFtgf5x.js.map +1 -0
- package/dist/dist-Buc00Zls.js +177 -0
- package/dist/dist-Buc00Zls.js.map +1 -0
- package/dist/dist-NmFtbuK4.js +35 -0
- package/dist/dist-NmFtbuK4.js.map +1 -0
- package/dist/dom-Bn4wY_Zx.js +2168 -0
- package/dist/dom-Bn4wY_Zx.js.map +1 -0
- package/dist/file-upload-COk6_Bs5.js +2966 -0
- package/dist/file-upload-COk6_Bs5.js.map +1 -0
- package/dist/floating-ui.react-CwXtBJ_y.js +3381 -0
- package/dist/floating-ui.react-CwXtBJ_y.js.map +1 -0
- package/dist/floating-ui.utils-CUrVRSbA.js +204 -0
- package/dist/floating-ui.utils-CUrVRSbA.js.map +1 -0
- package/dist/fns-KbsWlOTG.js +29 -0
- package/dist/fns-KbsWlOTG.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +7933 -20
- package/dist/index.js.map +1 -1
- package/dist/input-B7jqwPG4.js +473 -0
- package/dist/input-B7jqwPG4.js.map +1 -0
- package/dist/input-field-B_whI66Q.js +137 -0
- package/dist/input-field-B_whI66Q.js.map +1 -0
- package/dist/modal-Cn-OaKRp.js +373 -0
- package/dist/modal-Cn-OaKRp.js.map +1 -0
- package/dist/notifications-l_B9J4Gx.js +2202 -0
- package/dist/notifications-l_B9J4Gx.js.map +1 -0
- package/dist/polymorph-BLXhrn9n.js +14 -0
- package/dist/polymorph-BLXhrn9n.js.map +1 -0
- package/dist/preset/preset.tailwind.d.ts.map +1 -1
- package/dist/preset/preset.tailwind.js +40 -4
- package/dist/preset/src/styles/common.d.ts +0 -2
- package/dist/preset/src/styles/common.d.ts.map +1 -1
- package/dist/preset/src/styles/common.js +0 -9
- package/dist/preset/src/styles/components.d.ts +3 -0
- package/dist/preset/src/styles/components.d.ts.map +1 -0
- package/dist/preset/src/styles/components.js +400 -0
- package/dist/preset/src/styles/dark.d.ts.map +1 -1
- package/dist/preset/src/styles/dark.js +5 -3
- package/dist/preset/src/styles/default-tokens.d.ts +74 -0
- package/dist/preset/src/styles/default-tokens.d.ts.map +1 -0
- package/dist/preset/src/styles/default-tokens.js +44 -0
- package/dist/preset/src/styles/design-tokens.d.ts +1 -1
- package/dist/preset/src/styles/design-tokens.d.ts.map +1 -1
- package/dist/preset/src/styles/design-tokens.js +6 -2
- package/dist/preset/src/styles/light.d.ts.map +1 -1
- package/dist/preset/src/styles/light.js +22 -20
- package/dist/preset/src/styles/theme.types.d.ts +433 -8
- package/dist/preset/src/styles/theme.types.d.ts.map +1 -1
- package/dist/proxy-Drpz0Avo.js +2533 -0
- package/dist/proxy-Drpz0Avo.js.map +1 -0
- package/dist/skeleton-CBYEq3lM.js +26 -0
- package/dist/skeleton-CBYEq3lM.js.map +1 -0
- package/dist/slot-pC8kH9De.js +96 -0
- package/dist/slot-pC8kH9De.js.map +1 -0
- package/dist/{components → src/components}/core/button.d.ts +1 -1
- package/dist/src/components/core/button.d.ts.map +1 -0
- package/dist/{components → src/components}/core/button.jsx +10 -10
- package/dist/src/components/core/heading.d.ts.map +1 -0
- package/dist/src/components/core/polymorph.d.ts.map +1 -0
- package/dist/src/components/core/render-on-view.d.ts.map +1 -0
- package/dist/{components → src/components}/core/render-on-view.jsx +1 -1
- package/dist/src/components/core/resizable.d.ts.map +1 -0
- package/dist/{components → src/components}/core/resizable.jsx +2 -2
- package/dist/src/components/core/slot.d.ts.map +1 -0
- package/dist/src/components/core/tag.d.ts.map +1 -0
- package/dist/{components → src/components}/core/tag.jsx +10 -8
- package/dist/src/components/core/typography.d.ts.map +1 -0
- package/dist/{components → src/components}/core/typography.jsx +8 -6
- package/dist/src/components/display/alert.d.ts.map +1 -0
- package/dist/{components → src/components}/display/alert.jsx +6 -6
- package/dist/src/components/display/calendar.d.ts.map +1 -0
- package/dist/{components → src/components}/display/calendar.jsx +40 -21
- package/dist/src/components/display/card.d.ts.map +1 -0
- package/dist/{components → src/components}/display/card.jsx +10 -10
- package/dist/src/components/display/empty.d.ts.map +1 -0
- package/dist/{components → src/components}/display/empty.jsx +1 -1
- package/dist/src/components/display/list.d.ts.map +1 -0
- package/dist/{components → src/components}/display/list.jsx +15 -11
- package/dist/{components → src/components}/display/notifications.d.ts +1 -1
- package/dist/src/components/display/notifications.d.ts.map +1 -0
- package/dist/{components → src/components}/display/notifications.jsx +13 -9
- package/dist/{components → src/components}/display/progress.d.ts +4 -1
- package/dist/src/components/display/progress.d.ts.map +1 -0
- package/dist/src/components/display/progress.jsx +21 -0
- package/dist/src/components/display/shortcut.d.ts.map +1 -0
- package/dist/{components → src/components}/display/shortcut.jsx +1 -1
- package/dist/src/components/display/skeleton.d.ts.map +1 -0
- package/dist/{components → src/components}/display/skeleton.jsx +3 -3
- package/dist/src/components/display/spinner.d.ts.map +1 -0
- package/dist/{components → src/components}/display/spinner.jsx +2 -2
- package/dist/src/components/display/stats.d.ts.map +1 -0
- package/dist/src/components/display/stats.jsx +16 -0
- package/dist/src/components/display/step.d.ts.map +1 -0
- package/dist/{components → src/components}/display/step.jsx +23 -9
- package/dist/src/components/display/tabs.d.ts.map +1 -0
- package/dist/{components → src/components}/display/tabs.jsx +3 -3
- package/dist/src/components/display/timeline.d.ts.map +1 -0
- package/dist/{components → src/components}/display/timeline.jsx +4 -4
- package/dist/src/components/floating/command-palette.d.ts.map +1 -0
- package/dist/{components → src/components}/floating/command-palette.jsx +49 -23
- package/dist/src/components/floating/dropdown.d.ts.map +1 -0
- package/dist/{components → src/components}/floating/dropdown.jsx +4 -4
- package/dist/src/components/floating/expand.d.ts.map +1 -0
- package/dist/src/components/floating/menu.d.ts.map +1 -0
- package/dist/{components → src/components}/floating/menu.jsx +24 -6
- package/dist/src/components/floating/modal.d.ts.map +1 -0
- package/dist/{components → src/components}/floating/modal.jsx +61 -26
- package/dist/src/components/floating/toolbar.d.ts.map +1 -0
- package/dist/{components → src/components}/floating/toolbar.jsx +1 -1
- package/dist/src/components/floating/tooltip.d.ts.map +1 -0
- package/dist/{components → src/components}/floating/tooltip.jsx +14 -5
- package/dist/src/components/floating/wizard.d.ts.map +1 -0
- package/dist/{components → src/components}/floating/wizard.jsx +10 -6
- package/dist/src/components/form/autocomplete.d.ts.map +1 -0
- package/dist/{components → src/components}/form/autocomplete.jsx +28 -16
- package/dist/src/components/form/checkbox.d.ts.map +1 -0
- package/dist/{components → src/components}/form/checkbox.jsx +3 -3
- package/dist/src/components/form/date-picker.d.ts.map +1 -0
- package/dist/{components → src/components}/form/date-picker.jsx +2 -2
- package/dist/src/components/form/file-upload.d.ts.map +1 -0
- package/dist/{components → src/components}/form/file-upload.jsx +18 -14
- package/dist/src/components/form/form.d.ts.map +1 -0
- package/dist/src/components/form/formReset.d.ts.map +1 -0
- package/dist/src/components/form/free-text.d.ts.map +1 -0
- package/dist/{components → src/components}/form/free-text.jsx +1 -1
- package/dist/src/components/form/input-field.d.ts.map +1 -0
- package/dist/{components → src/components}/form/input-field.jsx +7 -7
- package/dist/src/components/form/input.d.ts.map +1 -0
- package/dist/src/components/form/multi-select.d.ts.map +1 -0
- package/dist/{components → src/components}/form/multi-select.jsx +24 -16
- package/dist/{components → src/components}/form/radiobox.d.ts +1 -1
- package/dist/src/components/form/radiobox.d.ts.map +1 -0
- package/dist/src/components/form/radiobox.jsx +6 -0
- package/dist/src/components/form/select.d.ts.map +1 -0
- package/dist/{components → src/components}/form/select.jsx +5 -3
- package/dist/src/components/form/slider.d.ts.map +1 -0
- package/dist/{components → src/components}/form/slider.jsx +3 -3
- package/dist/src/components/form/switch.d.ts.map +1 -0
- package/dist/{components → src/components}/form/switch.jsx +5 -5
- package/dist/src/components/form/task-list.d.ts.map +1 -0
- package/dist/{components → src/components}/form/task-list.jsx +1 -1
- package/dist/src/components/form/textarea.d.ts +5 -0
- package/dist/src/components/form/textarea.d.ts.map +1 -0
- package/dist/src/components/form/textarea.jsx +26 -0
- package/dist/src/components/index.d.ts.map +1 -0
- package/dist/src/components/page-calendar/calendar-header.d.ts.map +1 -0
- package/dist/{components → src/components}/page-calendar/calendar-header.jsx +14 -14
- package/dist/src/components/page-calendar/day-view.d.ts.map +1 -0
- package/dist/{components → src/components}/page-calendar/day-view.jsx +14 -19
- package/dist/src/components/page-calendar/event-pill.d.ts.map +1 -0
- package/dist/{components → src/components}/page-calendar/event-pill.jsx +2 -2
- package/dist/src/components/page-calendar/index.d.ts.map +1 -0
- package/dist/src/components/page-calendar/month-view.d.ts.map +1 -0
- package/dist/{components → src/components}/page-calendar/month-view.jsx +6 -6
- package/dist/src/components/page-calendar/page-calendar.d.ts.map +1 -0
- package/dist/{components → src/components}/page-calendar/page-calendar.jsx +2 -2
- package/dist/src/components/page-calendar/page-calendar.types.d.ts.map +1 -0
- package/dist/src/components/page-calendar/page-calendar.utils.d.ts.map +1 -0
- package/dist/src/components/page-calendar/week-view.d.ts.map +1 -0
- package/dist/{components → src/components}/page-calendar/week-view.jsx +8 -13
- package/dist/src/components/table/filter.d.ts.map +1 -0
- package/dist/{components → src/components}/table/filter.jsx +39 -11
- package/dist/src/components/table/group.d.ts.map +1 -0
- package/dist/{components → src/components}/table/group.jsx +12 -5
- package/dist/src/components/table/index.d.ts.map +1 -0
- package/dist/{components → src/components}/table/index.jsx +5 -2
- package/dist/src/components/table/inner-table.d.ts.map +1 -0
- package/dist/{components → src/components}/table/inner-table.jsx +5 -5
- package/dist/src/components/table/metadata.d.ts.map +1 -0
- package/dist/{components → src/components}/table/metadata.jsx +7 -7
- package/dist/src/components/table/pagination.d.ts.map +1 -0
- package/dist/{components → src/components}/table/pagination.jsx +4 -4
- package/dist/src/components/table/row.d.ts.map +1 -0
- package/dist/{components → src/components}/table/row.jsx +2 -2
- package/dist/src/components/table/sort.d.ts.map +1 -0
- package/dist/{components → src/components}/table/sort.jsx +4 -4
- package/dist/src/components/table/table-lib.d.ts.map +1 -0
- package/dist/src/components/table/table.context.d.ts.map +1 -0
- package/dist/{components → src/components}/table/table.context.jsx +1 -0
- package/dist/src/components/table/thead.d.ts.map +1 -0
- package/dist/{components → src/components}/table/thead.jsx +7 -7
- package/dist/src/config/context.d.ts.map +1 -0
- package/dist/src/config/default-translations.d.ts.map +1 -0
- package/dist/src/config/default-tweaks.d.ts.map +1 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/hooks/use-click-outside.d.ts.map +1 -0
- package/dist/src/hooks/use-color-parser.d.ts.map +1 -0
- package/dist/src/hooks/use-components-provider.d.ts.map +1 -0
- package/dist/src/hooks/use-debounce.d.ts.map +1 -0
- package/dist/src/hooks/use-floating-ref.d.ts.map +1 -0
- package/dist/src/hooks/use-form.d.ts.map +1 -0
- package/dist/{hooks → src/hooks}/use-form.js +2 -2
- package/dist/src/hooks/use-hover.d.ts.map +1 -0
- package/dist/{hooks → src/hooks}/use-hover.js +1 -1
- package/dist/src/hooks/use-input-id.d.ts.map +1 -0
- package/dist/src/hooks/use-is-coarse-device.d.ts.map +1 -0
- package/dist/src/hooks/use-locale.d.ts.map +1 -0
- package/dist/src/hooks/use-media-query.d.ts.map +1 -0
- package/dist/{hooks → src/hooks}/use-media-query.js +1 -1
- package/dist/src/hooks/use-on-event.d.ts.map +1 -0
- package/dist/src/hooks/use-on-event.js +10 -0
- package/dist/src/hooks/use-parent.d.ts.map +1 -0
- package/dist/{hooks → src/hooks}/use-parent.js +1 -1
- package/dist/src/hooks/use-preferences.d.ts.map +1 -0
- package/dist/src/hooks/use-previous.d.ts.map +1 -0
- package/dist/src/hooks/use-reactive.d.ts.map +1 -0
- package/dist/src/hooks/use-remove-scroll.d.ts.map +1 -0
- package/dist/src/hooks/use-resize-observer.d.ts.map +1 -0
- package/dist/src/hooks/use-stable-ref.d.ts.map +1 -0
- package/dist/src/hooks/use-swipe.d.ts.map +1 -0
- package/dist/src/hooks/use-translations.d.ts.map +1 -0
- package/dist/src/hooks/use-tweaks.d.ts.map +1 -0
- package/dist/src/hooks/use-window-size.d.ts.map +1 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +20 -0
- package/dist/src/lib/combi-keys.d.ts.map +1 -0
- package/dist/src/lib/dict.d.ts.map +1 -0
- package/dist/src/lib/dom.d.ts.map +1 -0
- package/dist/src/lib/dom.js +185 -0
- package/dist/src/lib/fns.d.ts.map +1 -0
- package/dist/src/lib/fzf.d.ts.map +1 -0
- package/dist/src/lib/keyboard-area.d.ts.map +1 -0
- package/dist/src/styles/common.d.ts +8 -0
- package/dist/src/styles/common.d.ts.map +1 -0
- package/dist/src/styles/common.js +20 -0
- package/dist/src/styles/components.d.ts +3 -0
- package/dist/src/styles/components.d.ts.map +1 -0
- package/dist/src/styles/components.js +397 -0
- package/dist/src/styles/dark.d.ts +3 -0
- package/dist/src/styles/dark.d.ts.map +1 -0
- package/dist/src/styles/dark.js +217 -0
- package/dist/src/styles/default-tokens.d.ts +74 -0
- package/dist/src/styles/default-tokens.d.ts.map +1 -0
- package/dist/src/styles/default-tokens.js +41 -0
- package/dist/src/styles/design-tokens.d.ts +29 -0
- package/dist/src/styles/design-tokens.d.ts.map +1 -0
- package/dist/src/styles/design-tokens.js +73 -0
- package/dist/src/styles/light.d.ts +3 -0
- package/dist/src/styles/light.d.ts.map +1 -0
- package/dist/src/styles/light.js +217 -0
- package/dist/src/styles/theme.d.ts +3 -0
- package/dist/src/styles/theme.d.ts.map +1 -0
- package/dist/src/styles/theme.js +4 -0
- package/dist/src/styles/theme.types.d.ts +540 -0
- package/dist/src/styles/theme.types.d.ts.map +1 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +1 -0
- package/dist/styles/common.d.ts +0 -2
- package/dist/styles/common.d.ts.map +1 -1
- package/dist/styles/common.js +0 -9
- package/dist/styles/components.d.ts +3 -0
- package/dist/styles/components.d.ts.map +1 -0
- package/dist/styles/components.js +400 -0
- package/dist/styles/dark.d.ts.map +1 -1
- package/dist/styles/dark.js +5 -3
- package/dist/styles/default-tokens.d.ts +74 -0
- package/dist/styles/default-tokens.d.ts.map +1 -0
- package/dist/styles/default-tokens.js +44 -0
- package/dist/styles/design-tokens.d.ts +1 -1
- package/dist/styles/design-tokens.d.ts.map +1 -1
- package/dist/styles/design-tokens.js +6 -2
- package/dist/styles/light.d.ts.map +1 -1
- package/dist/styles/light.js +22 -20
- package/dist/styles/theme.types.d.ts +433 -8
- package/dist/styles/theme.types.d.ts.map +1 -1
- package/dist/table-Dql6Yzag.js +1914 -0
- package/dist/table-Dql6Yzag.js.map +1 -0
- package/dist/tabs-Ciy0l9OF.js +122 -0
- package/dist/tabs-Ciy0l9OF.js.map +1 -0
- package/dist/task-list-tKumO4WH.js +96 -0
- package/dist/task-list-tKumO4WH.js.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/use-motion-value-BqPF1j90.js +15 -0
- package/dist/use-motion-value-BqPF1j90.js.map +1 -0
- package/dist/use-stable-ref-D5LFCx0u.js +12 -0
- package/dist/use-stable-ref-D5LFCx0u.js.map +1 -0
- package/dist/use-translations-DTLfPE3_.js +177 -0
- package/dist/use-translations-DTLfPE3_.js.map +1 -0
- package/dist/with-selector-BAUQ-vKK.js +187 -0
- package/dist/with-selector-BAUQ-vKK.js.map +1 -0
- package/package.json +17 -17
- package/dist/CaretDown.es-Cj7klWI3.js +0 -33
- package/dist/CaretDown.es-Cj7klWI3.js.map +0 -1
- package/dist/CaretRight.es-0-M8D9y8.js +0 -33
- package/dist/CaretRight.es-0-M8D9y8.js.map +0 -1
- package/dist/CheckCircle.es-C6QWLfk_.js +0 -33
- package/dist/CheckCircle.es-C6QWLfk_.js.map +0 -1
- package/dist/File.es-CA-vuPED.js +0 -33
- package/dist/File.es-CA-vuPED.js.map +0 -1
- package/dist/IconBase.es-DJ1oCtpo.js +0 -50
- package/dist/IconBase.es-DJ1oCtpo.js.map +0 -1
- package/dist/Info.es-CrZKs4q4.js +0 -33
- package/dist/Info.es-CrZKs4q4.js.map +0 -1
- package/dist/MotionConfigContext-C7MqlSdv.js +0 -2713
- package/dist/MotionConfigContext-C7MqlSdv.js.map +0 -1
- package/dist/Warning.es-D_eI6tLe.js +0 -39
- package/dist/Warning.es-D_eI6tLe.js.map +0 -1
- package/dist/X.es-BJ1O93El.js +0 -39
- package/dist/X.es-BJ1O93El.js.map +0 -1
- package/dist/autocomplete-DcTNOwyg.js +0 -393
- package/dist/autocomplete-DcTNOwyg.js.map +0 -1
- package/dist/calendar-BJMHRoy2.js +0 -1746
- package/dist/calendar-BJMHRoy2.js.map +0 -1
- package/dist/components/core/button.d.ts.map +0 -1
- package/dist/components/core/heading.d.ts.map +0 -1
- package/dist/components/core/polymorph.d.ts.map +0 -1
- package/dist/components/core/render-on-view.d.ts.map +0 -1
- package/dist/components/core/resizable.d.ts.map +0 -1
- package/dist/components/core/slot.d.ts.map +0 -1
- package/dist/components/core/tag.d.ts.map +0 -1
- package/dist/components/core/typography.d.ts.map +0 -1
- package/dist/components/display/alert.d.ts.map +0 -1
- package/dist/components/display/calendar.d.ts.map +0 -1
- package/dist/components/display/calendar.js.map +0 -1
- package/dist/components/display/card.d.ts.map +0 -1
- package/dist/components/display/empty.d.ts.map +0 -1
- package/dist/components/display/list.d.ts.map +0 -1
- package/dist/components/display/notifications.d.ts.map +0 -1
- package/dist/components/display/notifications.js.map +0 -1
- package/dist/components/display/progress.d.ts.map +0 -1
- package/dist/components/display/progress.jsx +0 -11
- package/dist/components/display/shortcut.d.ts.map +0 -1
- package/dist/components/display/skeleton.d.ts.map +0 -1
- package/dist/components/display/spinner.d.ts.map +0 -1
- package/dist/components/display/stats.d.ts.map +0 -1
- package/dist/components/display/stats.jsx +0 -20
- package/dist/components/display/step.d.ts.map +0 -1
- package/dist/components/display/tabs.d.ts.map +0 -1
- package/dist/components/display/tabs.js.map +0 -1
- package/dist/components/display/timeline.d.ts.map +0 -1
- package/dist/components/floating/command-palette.d.ts.map +0 -1
- package/dist/components/floating/dropdown.d.ts.map +0 -1
- package/dist/components/floating/expand.d.ts.map +0 -1
- package/dist/components/floating/menu.d.ts.map +0 -1
- package/dist/components/floating/modal.d.ts.map +0 -1
- package/dist/components/floating/modal.js.map +0 -1
- package/dist/components/floating/toolbar.d.ts.map +0 -1
- package/dist/components/floating/tooltip.d.ts.map +0 -1
- package/dist/components/floating/wizard.d.ts.map +0 -1
- package/dist/components/form/autocomplete.d.ts.map +0 -1
- package/dist/components/form/autocomplete.js.map +0 -1
- package/dist/components/form/checkbox.d.ts.map +0 -1
- package/dist/components/form/date-picker.d.ts.map +0 -1
- package/dist/components/form/date-picker.js.map +0 -1
- package/dist/components/form/file-upload.d.ts.map +0 -1
- package/dist/components/form/file-upload.js.map +0 -1
- package/dist/components/form/form.d.ts.map +0 -1
- package/dist/components/form/formReset.d.ts.map +0 -1
- package/dist/components/form/free-text.d.ts.map +0 -1
- package/dist/components/form/input-field.d.ts.map +0 -1
- package/dist/components/form/input.d.ts.map +0 -1
- package/dist/components/form/input.js.map +0 -1
- package/dist/components/form/multi-select.d.ts.map +0 -1
- package/dist/components/form/radiobox.d.ts.map +0 -1
- package/dist/components/form/radiobox.jsx +0 -6
- package/dist/components/form/select.d.ts.map +0 -1
- package/dist/components/form/slider.d.ts.map +0 -1
- package/dist/components/form/switch.d.ts.map +0 -1
- package/dist/components/form/task-list.d.ts.map +0 -1
- package/dist/components/form/task-list.js.map +0 -1
- package/dist/components/form/textarea.d.ts +0 -6
- package/dist/components/form/textarea.d.ts.map +0 -1
- package/dist/components/form/textarea.jsx +0 -12
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/page-calendar/calendar-header.d.ts.map +0 -1
- package/dist/components/page-calendar/day-view.d.ts.map +0 -1
- package/dist/components/page-calendar/event-pill.d.ts.map +0 -1
- package/dist/components/page-calendar/index.d.ts.map +0 -1
- package/dist/components/page-calendar/month-view.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.types.d.ts.map +0 -1
- package/dist/components/page-calendar/page-calendar.utils.d.ts.map +0 -1
- package/dist/components/page-calendar/week-view.d.ts.map +0 -1
- package/dist/components/table/filter.d.ts.map +0 -1
- package/dist/components/table/group.d.ts.map +0 -1
- package/dist/components/table/index.d.ts.map +0 -1
- package/dist/components/table/inner-table.d.ts.map +0 -1
- package/dist/components/table/metadata.d.ts.map +0 -1
- package/dist/components/table/pagination.d.ts.map +0 -1
- package/dist/components/table/row.d.ts.map +0 -1
- package/dist/components/table/sort.d.ts.map +0 -1
- package/dist/components/table/table-lib.d.ts.map +0 -1
- package/dist/components/table/table.context.d.ts.map +0 -1
- package/dist/components/table/table.js.map +0 -1
- package/dist/components/table/thead.d.ts.map +0 -1
- package/dist/config/context.d.ts.map +0 -1
- package/dist/config/default-translations.d.ts.map +0 -1
- package/dist/config/default-tweaks.d.ts.map +0 -1
- package/dist/constants-r-AHn273.js +0 -6
- package/dist/constants-r-AHn273.js.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/date-picker-Bnl07nd8.js +0 -1628
- package/dist/date-picker-Bnl07nd8.js.map +0 -1
- package/dist/dom-CyQHY7ID.js +0 -2838
- package/dist/dom-CyQHY7ID.js.map +0 -1
- package/dist/file-upload-93d5DR4q.js +0 -3255
- package/dist/file-upload-93d5DR4q.js.map +0 -1
- package/dist/floating-ui.react-M2PGXLDp.js +0 -3706
- package/dist/floating-ui.react-M2PGXLDp.js.map +0 -1
- package/dist/fns-C7Dt27Qd.js +0 -33
- package/dist/fns-C7Dt27Qd.js.map +0 -1
- package/dist/hooks/use-click-outside.d.ts.map +0 -1
- package/dist/hooks/use-color-parser.d.ts.map +0 -1
- package/dist/hooks/use-components-provider.d.ts.map +0 -1
- package/dist/hooks/use-debounce.d.ts.map +0 -1
- package/dist/hooks/use-floating-ref.d.ts.map +0 -1
- package/dist/hooks/use-form.d.ts.map +0 -1
- package/dist/hooks/use-hover.d.ts.map +0 -1
- package/dist/hooks/use-input-id.d.ts.map +0 -1
- package/dist/hooks/use-is-coarse-device.d.ts.map +0 -1
- package/dist/hooks/use-locale.d.ts.map +0 -1
- package/dist/hooks/use-media-query.d.ts.map +0 -1
- package/dist/hooks/use-on-event.d.ts.map +0 -1
- package/dist/hooks/use-on-event.js +0 -7
- package/dist/hooks/use-parent.d.ts.map +0 -1
- package/dist/hooks/use-preferences.d.ts.map +0 -1
- package/dist/hooks/use-previous.d.ts.map +0 -1
- package/dist/hooks/use-reactive.d.ts.map +0 -1
- package/dist/hooks/use-remove-scroll.d.ts.map +0 -1
- package/dist/hooks/use-resize-observer.d.ts.map +0 -1
- package/dist/hooks/use-stable-ref.d.ts.map +0 -1
- package/dist/hooks/use-swipe.d.ts.map +0 -1
- package/dist/hooks/use-translations.d.ts.map +0 -1
- package/dist/hooks/use-tweaks.d.ts.map +0 -1
- package/dist/hooks/use-window-size.d.ts.map +0 -1
- package/dist/index-0YMC-_Lt.js +0 -20
- package/dist/index-0YMC-_Lt.js.map +0 -1
- package/dist/index-BJ1ayTam.js +0 -126
- package/dist/index-BJ1ayTam.js.map +0 -1
- package/dist/index-C-PuFUZi.js +0 -3416
- package/dist/index-C-PuFUZi.js.map +0 -1
- package/dist/index-DDeQW0JW.js +0 -1816
- package/dist/index-DDeQW0JW.js.map +0 -1
- package/dist/index-DE4shK8D.js +0 -215
- package/dist/index-DE4shK8D.js.map +0 -1
- package/dist/index-DlJ_2RBL.js +0 -35
- package/dist/index-DlJ_2RBL.js.map +0 -1
- package/dist/index-t1qLJTt5.js +0 -351
- package/dist/index-t1qLJTt5.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.esm-BaIwleSE.js +0 -343
- package/dist/index.esm-BaIwleSE.js.map +0 -1
- package/dist/input-_MVxmIpu.js +0 -443
- package/dist/input-_MVxmIpu.js.map +0 -1
- package/dist/input-field-CDCOODOl.js +0 -182
- package/dist/input-field-CDCOODOl.js.map +0 -1
- package/dist/lib/combi-keys.d.ts.map +0 -1
- package/dist/lib/dict.d.ts.map +0 -1
- package/dist/lib/dom.d.ts.map +0 -1
- package/dist/lib/dom.js +0 -66
- package/dist/lib/fns.d.ts.map +0 -1
- package/dist/lib/fzf.d.ts.map +0 -1
- package/dist/lib/keyboard-area.d.ts.map +0 -1
- package/dist/notifications-Dp0ydKJS.js +0 -2576
- package/dist/notifications-Dp0ydKJS.js.map +0 -1
- package/dist/polymorph-B5n9fs_K.js +0 -10
- package/dist/polymorph-B5n9fs_K.js.map +0 -1
- package/dist/proxy-BZcQiBrp.js +0 -2495
- package/dist/proxy-BZcQiBrp.js.map +0 -1
- package/dist/skeleton-BjJobYYf.js +0 -24
- package/dist/skeleton-BjJobYYf.js.map +0 -1
- package/dist/slot-CRyweuj0.js +0 -79
- package/dist/slot-CRyweuj0.js.map +0 -1
- package/dist/tabs-B0g7YtQv.js +0 -123
- package/dist/tabs-B0g7YtQv.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/use-motion-value-eGwNuWuw.js +0 -14
- package/dist/use-motion-value-eGwNuWuw.js.map +0 -1
- package/dist/use-stable-ref-CYh-YkID.js +0 -11
- package/dist/use-stable-ref-CYh-YkID.js.map +0 -1
- package/dist/use-translations-DSltA7H_.js +0 -169
- package/dist/use-translations-DSltA7H_.js.map +0 -1
- /package/dist/{components → src/components}/core/heading.d.ts +0 -0
- /package/dist/{components → src/components}/core/heading.jsx +0 -0
- /package/dist/{components → src/components}/core/polymorph.d.ts +0 -0
- /package/dist/{components → src/components}/core/polymorph.jsx +0 -0
- /package/dist/{components → src/components}/core/render-on-view.d.ts +0 -0
- /package/dist/{components → src/components}/core/resizable.d.ts +0 -0
- /package/dist/{components → src/components}/core/slot.d.ts +0 -0
- /package/dist/{components → src/components}/core/slot.jsx +0 -0
- /package/dist/{components → src/components}/core/tag.d.ts +0 -0
- /package/dist/{components → src/components}/core/typography.d.ts +0 -0
- /package/dist/{components → src/components}/display/alert.d.ts +0 -0
- /package/dist/{components → src/components}/display/calendar.d.ts +0 -0
- /package/dist/{components → src/components}/display/card.d.ts +0 -0
- /package/dist/{components → src/components}/display/empty.d.ts +0 -0
- /package/dist/{components → src/components}/display/list.d.ts +0 -0
- /package/dist/{components → src/components}/display/shortcut.d.ts +0 -0
- /package/dist/{components → src/components}/display/skeleton.d.ts +0 -0
- /package/dist/{components → src/components}/display/spinner.d.ts +0 -0
- /package/dist/{components → src/components}/display/stats.d.ts +0 -0
- /package/dist/{components → src/components}/display/step.d.ts +0 -0
- /package/dist/{components → src/components}/display/tabs.d.ts +0 -0
- /package/dist/{components → src/components}/display/timeline.d.ts +0 -0
- /package/dist/{components → src/components}/floating/command-palette.d.ts +0 -0
- /package/dist/{components → src/components}/floating/dropdown.d.ts +0 -0
- /package/dist/{components → src/components}/floating/expand.d.ts +0 -0
- /package/dist/{components → src/components}/floating/expand.jsx +0 -0
- /package/dist/{components → src/components}/floating/menu.d.ts +0 -0
- /package/dist/{components → src/components}/floating/modal.d.ts +0 -0
- /package/dist/{components → src/components}/floating/toolbar.d.ts +0 -0
- /package/dist/{components → src/components}/floating/tooltip.d.ts +0 -0
- /package/dist/{components → src/components}/floating/wizard.d.ts +0 -0
- /package/dist/{components → src/components}/form/autocomplete.d.ts +0 -0
- /package/dist/{components → src/components}/form/checkbox.d.ts +0 -0
- /package/dist/{components → src/components}/form/date-picker.d.ts +0 -0
- /package/dist/{components → src/components}/form/file-upload.d.ts +0 -0
- /package/dist/{components → src/components}/form/form.d.ts +0 -0
- /package/dist/{components → src/components}/form/form.jsx +0 -0
- /package/dist/{components → src/components}/form/formReset.d.ts +0 -0
- /package/dist/{components → src/components}/form/formReset.jsx +0 -0
- /package/dist/{components → src/components}/form/free-text.d.ts +0 -0
- /package/dist/{components → src/components}/form/input-field.d.ts +0 -0
- /package/dist/{components → src/components}/form/input.d.ts +0 -0
- /package/dist/{components → src/components}/form/input.jsx +0 -0
- /package/dist/{components → src/components}/form/multi-select.d.ts +0 -0
- /package/dist/{components → src/components}/form/select.d.ts +0 -0
- /package/dist/{components → src/components}/form/slider.d.ts +0 -0
- /package/dist/{components → src/components}/form/switch.d.ts +0 -0
- /package/dist/{components → src/components}/form/task-list.d.ts +0 -0
- /package/dist/{components → src/components}/index.d.ts +0 -0
- /package/dist/{components → src/components}/index.js +0 -0
- /package/dist/{components → src/components}/page-calendar/calendar-header.d.ts +0 -0
- /package/dist/{components → src/components}/page-calendar/day-view.d.ts +0 -0
- /package/dist/{components → src/components}/page-calendar/event-pill.d.ts +0 -0
- /package/dist/{components → src/components}/page-calendar/index.d.ts +0 -0
- /package/dist/{components → src/components}/page-calendar/index.js +0 -0
- /package/dist/{components → src/components}/page-calendar/month-view.d.ts +0 -0
- /package/dist/{components → src/components}/page-calendar/page-calendar.d.ts +0 -0
- /package/dist/{components → src/components}/page-calendar/page-calendar.types.d.ts +0 -0
- /package/dist/{components → src/components}/page-calendar/page-calendar.types.js +0 -0
- /package/dist/{components → src/components}/page-calendar/page-calendar.utils.d.ts +0 -0
- /package/dist/{components → src/components}/page-calendar/page-calendar.utils.js +0 -0
- /package/dist/{components → src/components}/page-calendar/week-view.d.ts +0 -0
- /package/dist/{components → src/components}/table/filter.d.ts +0 -0
- /package/dist/{components → src/components}/table/group.d.ts +0 -0
- /package/dist/{components → src/components}/table/index.d.ts +0 -0
- /package/dist/{components → src/components}/table/inner-table.d.ts +0 -0
- /package/dist/{components → src/components}/table/metadata.d.ts +0 -0
- /package/dist/{components → src/components}/table/pagination.d.ts +0 -0
- /package/dist/{components → src/components}/table/row.d.ts +0 -0
- /package/dist/{components → src/components}/table/sort.d.ts +0 -0
- /package/dist/{components → src/components}/table/table-lib.d.ts +0 -0
- /package/dist/{components → src/components}/table/table-lib.js +0 -0
- /package/dist/{components → src/components}/table/table.context.d.ts +0 -0
- /package/dist/{components → src/components}/table/thead.d.ts +0 -0
- /package/dist/{config → src/config}/context.d.ts +0 -0
- /package/dist/{config → src/config}/context.js +0 -0
- /package/dist/{config → src/config}/default-translations.d.ts +0 -0
- /package/dist/{config → src/config}/default-translations.jsx +0 -0
- /package/dist/{config → src/config}/default-tweaks.d.ts +0 -0
- /package/dist/{config → src/config}/default-tweaks.js +0 -0
- /package/dist/{constants.d.ts → src/constants.d.ts} +0 -0
- /package/dist/{constants.js → src/constants.js} +0 -0
- /package/dist/{hooks → src/hooks}/use-click-outside.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-click-outside.js +0 -0
- /package/dist/{hooks → src/hooks}/use-color-parser.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-color-parser.js +0 -0
- /package/dist/{hooks → src/hooks}/use-components-provider.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-components-provider.jsx +0 -0
- /package/dist/{hooks → src/hooks}/use-debounce.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-debounce.js +0 -0
- /package/dist/{hooks → src/hooks}/use-floating-ref.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-floating-ref.js +0 -0
- /package/dist/{hooks → src/hooks}/use-form.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-hover.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-input-id.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-input-id.js +0 -0
- /package/dist/{hooks → src/hooks}/use-is-coarse-device.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-is-coarse-device.js +0 -0
- /package/dist/{hooks → src/hooks}/use-locale.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-locale.js +0 -0
- /package/dist/{hooks → src/hooks}/use-media-query.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-on-event.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-parent.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-preferences.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-preferences.js +0 -0
- /package/dist/{hooks → src/hooks}/use-previous.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-previous.js +0 -0
- /package/dist/{hooks → src/hooks}/use-reactive.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-reactive.js +0 -0
- /package/dist/{hooks → src/hooks}/use-remove-scroll.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-remove-scroll.js +0 -0
- /package/dist/{hooks → src/hooks}/use-resize-observer.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-resize-observer.js +0 -0
- /package/dist/{hooks → src/hooks}/use-stable-ref.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-stable-ref.js +0 -0
- /package/dist/{hooks → src/hooks}/use-swipe.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-swipe.js +0 -0
- /package/dist/{hooks → src/hooks}/use-translations.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-translations.js +0 -0
- /package/dist/{hooks → src/hooks}/use-tweaks.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-tweaks.js +0 -0
- /package/dist/{hooks → src/hooks}/use-window-size.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/use-window-size.js +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/dist/{lib → src/lib}/combi-keys.d.ts +0 -0
- /package/dist/{lib → src/lib}/combi-keys.js +0 -0
- /package/dist/{lib → src/lib}/dict.d.ts +0 -0
- /package/dist/{lib → src/lib}/dict.js +0 -0
- /package/dist/{lib → src/lib}/dom.d.ts +0 -0
- /package/dist/{lib → src/lib}/fns.d.ts +0 -0
- /package/dist/{lib → src/lib}/fns.js +0 -0
- /package/dist/{lib → src/lib}/fzf.d.ts +0 -0
- /package/dist/{lib → src/lib}/fzf.js +0 -0
- /package/dist/{lib → src/lib}/keyboard-area.d.ts +0 -0
- /package/dist/{lib → src/lib}/keyboard-area.js +0 -0
- /package/dist/{types.js → src/styles/theme.types.js} +0 -0
- /package/dist/{types.d.ts → src/types.d.ts} +0 -0
|
@@ -0,0 +1,3381 @@
|
|
|
1
|
+
import { A as e, B as t, C as n, D as r, E as i, F as a, I as o, L as s, M as c, N as l, O as u, P as d, R as f, S as p, T as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, i as C, j as w, k as T, l as E, m as D, n as O, o as k, p as A, r as j, s as M, t as N, u as P, v as F, w as I, x as L, y as R, z } from "./floating-ui.utils-CUrVRSbA.js";
|
|
2
|
+
import * as B from "react";
|
|
3
|
+
import { useLayoutEffect as V } from "react";
|
|
4
|
+
import { Fragment as ee, jsx as H, jsxs as te } from "react/jsx-runtime";
|
|
5
|
+
import * as U from "react-dom";
|
|
6
|
+
var W = /* @__PURE__ */ [
|
|
7
|
+
"input:not([inert]):not([inert] *)",
|
|
8
|
+
"select:not([inert]):not([inert] *)",
|
|
9
|
+
"textarea:not([inert]):not([inert] *)",
|
|
10
|
+
"a[href]:not([inert]):not([inert] *)",
|
|
11
|
+
"button:not([inert]):not([inert] *)",
|
|
12
|
+
"[tabindex]:not(slot):not([inert]):not([inert] *)",
|
|
13
|
+
"audio[controls]:not([inert]):not([inert] *)",
|
|
14
|
+
"video[controls]:not([inert]):not([inert] *)",
|
|
15
|
+
"[contenteditable]:not([contenteditable=\"false\"]):not([inert]):not([inert] *)",
|
|
16
|
+
"details>summary:first-of-type:not([inert]):not([inert] *)",
|
|
17
|
+
"details:not([inert]):not([inert] *)"
|
|
18
|
+
].join(","), ne = typeof Element > "u", re = ne ? function() {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, ie = !ne && Element.prototype.getRootNode ? function(e) {
|
|
19
|
+
return e?.getRootNode?.call(e);
|
|
20
|
+
} : function(e) {
|
|
21
|
+
return e?.ownerDocument;
|
|
22
|
+
}, ae = function(e, t) {
|
|
23
|
+
t === void 0 && (t = !0);
|
|
24
|
+
var n = e?.getAttribute?.call(e, "inert");
|
|
25
|
+
return n === "" || n === "true" || t && e && (typeof e.closest == "function" ? e.closest("[inert]") : ae(e.parentNode));
|
|
26
|
+
}, oe = function(e) {
|
|
27
|
+
var t = e?.getAttribute?.call(e, "contenteditable");
|
|
28
|
+
return t === "" || t === "true";
|
|
29
|
+
}, se = function(e, t, n) {
|
|
30
|
+
if (ae(e)) return [];
|
|
31
|
+
var r = Array.prototype.slice.apply(e.querySelectorAll(W));
|
|
32
|
+
return t && re.call(e, W) && r.unshift(e), r = r.filter(n), r;
|
|
33
|
+
}, ce = function(e, t, n) {
|
|
34
|
+
for (var r = [], i = Array.from(e); i.length;) {
|
|
35
|
+
var a = i.shift();
|
|
36
|
+
if (!ae(a, !1)) if (a.tagName === "SLOT") {
|
|
37
|
+
var o = a.assignedElements(), s = ce(o.length ? o : a.children, !0, n);
|
|
38
|
+
n.flatten ? r.push.apply(r, s) : r.push({
|
|
39
|
+
scopeParent: a,
|
|
40
|
+
candidates: s
|
|
41
|
+
});
|
|
42
|
+
} else {
|
|
43
|
+
re.call(a, W) && n.filter(a) && (t || !e.includes(a)) && r.push(a);
|
|
44
|
+
var c = a.shadowRoot || typeof n.getShadowRoot == "function" && n.getShadowRoot(a), l = !ae(c, !1) && (!n.shadowRootFilter || n.shadowRootFilter(a));
|
|
45
|
+
if (c && l) {
|
|
46
|
+
var u = ce(c === !0 ? a.children : c.children, !0, n);
|
|
47
|
+
n.flatten ? r.push.apply(r, u) : r.push({
|
|
48
|
+
scopeParent: a,
|
|
49
|
+
candidates: u
|
|
50
|
+
});
|
|
51
|
+
} else i.unshift.apply(i, a.children);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return r;
|
|
55
|
+
}, le = function(e) {
|
|
56
|
+
return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
|
|
57
|
+
}, ue = function(e) {
|
|
58
|
+
if (!e) throw Error("No node provided");
|
|
59
|
+
return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || oe(e)) && !le(e) ? 0 : e.tabIndex;
|
|
60
|
+
}, de = function(e, t) {
|
|
61
|
+
var n = ue(e);
|
|
62
|
+
return n < 0 && t && !le(e) ? 0 : n;
|
|
63
|
+
}, fe = function(e, t) {
|
|
64
|
+
return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
|
|
65
|
+
}, pe = function(e) {
|
|
66
|
+
return e.tagName === "INPUT";
|
|
67
|
+
}, me = function(e) {
|
|
68
|
+
return pe(e) && e.type === "hidden";
|
|
69
|
+
}, he = function(e) {
|
|
70
|
+
return e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(e) {
|
|
71
|
+
return e.tagName === "SUMMARY";
|
|
72
|
+
});
|
|
73
|
+
}, ge = function(e, t) {
|
|
74
|
+
for (var n = 0; n < e.length; n++) if (e[n].checked && e[n].form === t) return e[n];
|
|
75
|
+
}, _e = function(e) {
|
|
76
|
+
if (!e.name) return !0;
|
|
77
|
+
var t = e.form || ie(e), n = function(e) {
|
|
78
|
+
return t.querySelectorAll("input[type=\"radio\"][name=\"" + e + "\"]");
|
|
79
|
+
}, r;
|
|
80
|
+
if (typeof window < "u" && window.CSS !== void 0 && typeof window.CSS.escape == "function") r = n(window.CSS.escape(e.name));
|
|
81
|
+
else try {
|
|
82
|
+
r = n(e.name);
|
|
83
|
+
} catch (e) {
|
|
84
|
+
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", e.message), !1;
|
|
85
|
+
}
|
|
86
|
+
var i = ge(r, e.form);
|
|
87
|
+
return !i || i === e;
|
|
88
|
+
}, ve = function(e) {
|
|
89
|
+
return pe(e) && e.type === "radio";
|
|
90
|
+
}, ye = function(e) {
|
|
91
|
+
return ve(e) && !_e(e);
|
|
92
|
+
}, be = function(e) {
|
|
93
|
+
var t = e && ie(e), n = t?.host, r = !1;
|
|
94
|
+
if (t && t !== e) {
|
|
95
|
+
var i, a, o;
|
|
96
|
+
for (r = !!((i = n) != null && (a = i.ownerDocument) != null && a.contains(n) || e != null && (o = e.ownerDocument) != null && o.contains(e)); !r && n;) {
|
|
97
|
+
var s, c;
|
|
98
|
+
t = ie(n), n = t?.host, r = !!((s = n) != null && (c = s.ownerDocument) != null && c.contains(n));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return r;
|
|
102
|
+
}, xe = function(e) {
|
|
103
|
+
var t = e.getBoundingClientRect(), n = t.width, r = t.height;
|
|
104
|
+
return n === 0 && r === 0;
|
|
105
|
+
}, Se = function(e, t) {
|
|
106
|
+
var n = t.displayCheck, r = t.getShadowRoot;
|
|
107
|
+
if (n === "full-native" && "checkVisibility" in e) return !e.checkVisibility({
|
|
108
|
+
checkOpacity: !1,
|
|
109
|
+
opacityProperty: !1,
|
|
110
|
+
contentVisibilityAuto: !0,
|
|
111
|
+
visibilityProperty: !0,
|
|
112
|
+
checkVisibilityCSS: !0
|
|
113
|
+
});
|
|
114
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
115
|
+
var i = re.call(e, "details>summary:first-of-type") ? e.parentElement : e;
|
|
116
|
+
if (re.call(i, "details:not([open]) *")) return !0;
|
|
117
|
+
if (!n || n === "full" || n === "full-native" || n === "legacy-full") {
|
|
118
|
+
if (typeof r == "function") {
|
|
119
|
+
for (var a = e; e;) {
|
|
120
|
+
var o = e.parentElement, s = ie(e);
|
|
121
|
+
if (o && !o.shadowRoot && r(o) === !0) return xe(e);
|
|
122
|
+
e = e.assignedSlot ? e.assignedSlot : !o && s !== e.ownerDocument ? s.host : o;
|
|
123
|
+
}
|
|
124
|
+
e = a;
|
|
125
|
+
}
|
|
126
|
+
if (be(e)) return !e.getClientRects().length;
|
|
127
|
+
if (n !== "legacy-full") return !0;
|
|
128
|
+
} else if (n === "non-zero-area") return xe(e);
|
|
129
|
+
return !1;
|
|
130
|
+
}, Ce = function(e) {
|
|
131
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName)) for (var t = e.parentElement; t;) {
|
|
132
|
+
if (t.tagName === "FIELDSET" && t.disabled) {
|
|
133
|
+
for (var n = 0; n < t.children.length; n++) {
|
|
134
|
+
var r = t.children.item(n);
|
|
135
|
+
if (r.tagName === "LEGEND") return re.call(t, "fieldset[disabled] *") ? !0 : !r.contains(e);
|
|
136
|
+
}
|
|
137
|
+
return !0;
|
|
138
|
+
}
|
|
139
|
+
t = t.parentElement;
|
|
140
|
+
}
|
|
141
|
+
return !1;
|
|
142
|
+
}, we = function(e, t) {
|
|
143
|
+
return !(t.disabled || me(t) || Se(t, e) || he(t) || Ce(t));
|
|
144
|
+
}, Te = function(e, t) {
|
|
145
|
+
return !(ye(t) || ue(t) < 0 || !we(e, t));
|
|
146
|
+
}, Ee = function(e) {
|
|
147
|
+
var t = parseInt(e.getAttribute("tabindex"), 10);
|
|
148
|
+
return !!(isNaN(t) || t >= 0);
|
|
149
|
+
}, De = function(e) {
|
|
150
|
+
var t = [], n = [];
|
|
151
|
+
return e.forEach(function(e, r) {
|
|
152
|
+
var i = !!e.scopeParent, a = i ? e.scopeParent : e, o = de(a, i), s = i ? De(e.candidates) : a;
|
|
153
|
+
o === 0 ? i ? t.push.apply(t, s) : t.push(a) : n.push({
|
|
154
|
+
documentOrder: r,
|
|
155
|
+
tabIndex: o,
|
|
156
|
+
item: e,
|
|
157
|
+
isScope: i,
|
|
158
|
+
content: s
|
|
159
|
+
});
|
|
160
|
+
}), n.sort(fe).reduce(function(e, t) {
|
|
161
|
+
return t.isScope ? e.push.apply(e, t.content) : e.push(t.content), e;
|
|
162
|
+
}, []).concat(t);
|
|
163
|
+
}, Oe = function(e, t) {
|
|
164
|
+
return t ||= {}, De(t.getShadowRoot ? ce([e], t.includeContainer, {
|
|
165
|
+
filter: Te.bind(null, t),
|
|
166
|
+
flatten: !1,
|
|
167
|
+
getShadowRoot: t.getShadowRoot,
|
|
168
|
+
shadowRootFilter: Ee
|
|
169
|
+
}) : se(e, t.includeContainer, Te.bind(null, t)));
|
|
170
|
+
}, ke = function(e, t) {
|
|
171
|
+
return t ||= {}, t.getShadowRoot ? ce([e], t.includeContainer, {
|
|
172
|
+
filter: we.bind(null, t),
|
|
173
|
+
flatten: !0,
|
|
174
|
+
getShadowRoot: t.getShadowRoot
|
|
175
|
+
}) : se(e, t.includeContainer, we.bind(null, t));
|
|
176
|
+
}, Ae = function(e, t) {
|
|
177
|
+
if (t ||= {}, !e) throw Error("No node provided");
|
|
178
|
+
return re.call(e, W) === !1 ? !1 : Te(t, e);
|
|
179
|
+
};
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region ../../node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@floating-ui/react/dist/floating-ui.react.utils.mjs
|
|
182
|
+
function je() {
|
|
183
|
+
let e = navigator.userAgentData;
|
|
184
|
+
return e != null && e.platform ? e.platform : navigator.platform;
|
|
185
|
+
}
|
|
186
|
+
function Me() {
|
|
187
|
+
let e = navigator.userAgentData;
|
|
188
|
+
return e && Array.isArray(e.brands) ? e.brands.map((e) => {
|
|
189
|
+
let { brand: t, version: n } = e;
|
|
190
|
+
return t + "/" + n;
|
|
191
|
+
}).join(" ") : navigator.userAgent;
|
|
192
|
+
}
|
|
193
|
+
function Ne() {
|
|
194
|
+
return /apple/i.test(navigator.vendor);
|
|
195
|
+
}
|
|
196
|
+
function Pe() {
|
|
197
|
+
let e = /android/i;
|
|
198
|
+
return e.test(je()) || e.test(Me());
|
|
199
|
+
}
|
|
200
|
+
function Fe() {
|
|
201
|
+
return je().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
|
|
202
|
+
}
|
|
203
|
+
function Ie() {
|
|
204
|
+
return Me().includes("jsdom/");
|
|
205
|
+
}
|
|
206
|
+
var Le = "data-floating-ui-focusable", Re = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", ze = "ArrowLeft", Be = "ArrowRight", Ve = "ArrowUp", He = "ArrowDown";
|
|
207
|
+
function G(e) {
|
|
208
|
+
let t = e.activeElement;
|
|
209
|
+
for (; ((n = t) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null;) {
|
|
210
|
+
var n;
|
|
211
|
+
t = t.shadowRoot.activeElement;
|
|
212
|
+
}
|
|
213
|
+
return t;
|
|
214
|
+
}
|
|
215
|
+
function K(e, t) {
|
|
216
|
+
if (!e || !t) return !1;
|
|
217
|
+
let n = t.getRootNode == null ? void 0 : t.getRootNode();
|
|
218
|
+
if (e.contains(t)) return !0;
|
|
219
|
+
if (n && s(n)) {
|
|
220
|
+
let n = t;
|
|
221
|
+
for (; n;) {
|
|
222
|
+
if (e === n) return !0;
|
|
223
|
+
n = n.parentNode || n.host;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
return !1;
|
|
227
|
+
}
|
|
228
|
+
function Ue(e) {
|
|
229
|
+
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
230
|
+
}
|
|
231
|
+
function We(e, t) {
|
|
232
|
+
if (t == null) return !1;
|
|
233
|
+
if ("composedPath" in e) return e.composedPath().includes(t);
|
|
234
|
+
let n = e;
|
|
235
|
+
return n.target != null && t.contains(n.target);
|
|
236
|
+
}
|
|
237
|
+
function Ge(e) {
|
|
238
|
+
return e.matches("html,body");
|
|
239
|
+
}
|
|
240
|
+
function q(e) {
|
|
241
|
+
return e?.ownerDocument || document;
|
|
242
|
+
}
|
|
243
|
+
function Ke(e) {
|
|
244
|
+
return l(e) && e.matches(Re);
|
|
245
|
+
}
|
|
246
|
+
function qe(e) {
|
|
247
|
+
return e ? e.getAttribute("role") === "combobox" && Ke(e) : !1;
|
|
248
|
+
}
|
|
249
|
+
function Je(e) {
|
|
250
|
+
if (!e || Ie()) return !0;
|
|
251
|
+
try {
|
|
252
|
+
return e.matches(":focus-visible");
|
|
253
|
+
} catch {
|
|
254
|
+
return !0;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
function Ye(e) {
|
|
258
|
+
return e ? e.hasAttribute(Le) ? e : e.querySelector("[data-floating-ui-focusable]") || e : null;
|
|
259
|
+
}
|
|
260
|
+
function Xe(e, t, n) {
|
|
261
|
+
return n === void 0 && (n = !0), e.filter((e) => e.parentId === t && (!n || e.context?.open)).flatMap((t) => [t, ...Xe(e, t.id, n)]);
|
|
262
|
+
}
|
|
263
|
+
function Ze(e, t) {
|
|
264
|
+
let n, r = -1;
|
|
265
|
+
function i(t, a) {
|
|
266
|
+
a > r && (n = t, r = a), Xe(e, t).forEach((e) => {
|
|
267
|
+
i(e.id, a + 1);
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
return i(t, 0), e.find((e) => e.id === n);
|
|
271
|
+
}
|
|
272
|
+
function Qe(e, t) {
|
|
273
|
+
let n = [], r = e.find((e) => e.id === t)?.parentId;
|
|
274
|
+
for (; r;) {
|
|
275
|
+
let t = e.find((e) => e.id === r);
|
|
276
|
+
r = t?.parentId, t && (n = n.concat(t));
|
|
277
|
+
}
|
|
278
|
+
return n;
|
|
279
|
+
}
|
|
280
|
+
function J(e) {
|
|
281
|
+
e.preventDefault(), e.stopPropagation();
|
|
282
|
+
}
|
|
283
|
+
function $e(e) {
|
|
284
|
+
return "nativeEvent" in e;
|
|
285
|
+
}
|
|
286
|
+
function et(e) {
|
|
287
|
+
return e.mozInputSource === 0 && e.isTrusted ? !0 : Pe() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
288
|
+
}
|
|
289
|
+
function tt(e) {
|
|
290
|
+
return Ie() ? !1 : !Pe() && e.width === 0 && e.height === 0 || Pe() && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
|
|
291
|
+
}
|
|
292
|
+
function nt(e, t) {
|
|
293
|
+
let n = ["mouse", "pen"];
|
|
294
|
+
return t || n.push("", void 0), n.includes(e);
|
|
295
|
+
}
|
|
296
|
+
var Y = typeof document < "u" ? V : function() {}, rt = { ...B };
|
|
297
|
+
function X(e) {
|
|
298
|
+
let t = B.useRef(e);
|
|
299
|
+
return Y(() => {
|
|
300
|
+
t.current = e;
|
|
301
|
+
}), t;
|
|
302
|
+
}
|
|
303
|
+
var it = rt.useInsertionEffect || ((e) => e());
|
|
304
|
+
function Z(e) {
|
|
305
|
+
let t = B.useRef(() => {
|
|
306
|
+
if (process.env.NODE_ENV !== "production") throw Error("Cannot call an event handler while rendering.");
|
|
307
|
+
});
|
|
308
|
+
return it(() => {
|
|
309
|
+
t.current = e;
|
|
310
|
+
}), B.useCallback(function() {
|
|
311
|
+
var e = [...arguments];
|
|
312
|
+
return t.current == null ? void 0 : t.current(...e);
|
|
313
|
+
}, []);
|
|
314
|
+
}
|
|
315
|
+
function at(e, t, n) {
|
|
316
|
+
return Math.floor(e / t) !== n;
|
|
317
|
+
}
|
|
318
|
+
function ot(e, t) {
|
|
319
|
+
return t < 0 || t >= e.current.length;
|
|
320
|
+
}
|
|
321
|
+
function st(e, t) {
|
|
322
|
+
return Q(e, { disabledIndices: t });
|
|
323
|
+
}
|
|
324
|
+
function ct(e, t) {
|
|
325
|
+
return Q(e, {
|
|
326
|
+
decrement: !0,
|
|
327
|
+
startingIndex: e.current.length,
|
|
328
|
+
disabledIndices: t
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
function Q(e, t) {
|
|
332
|
+
let { startingIndex: n = -1, decrement: r = !1, disabledIndices: i, amount: a = 1 } = t === void 0 ? {} : t, o = n;
|
|
333
|
+
do
|
|
334
|
+
o += r ? -a : a;
|
|
335
|
+
while (o >= 0 && o <= e.current.length - 1 && pt(e, o, i));
|
|
336
|
+
return o;
|
|
337
|
+
}
|
|
338
|
+
function lt(e, t) {
|
|
339
|
+
let { event: n, orientation: r, loop: i, rtl: a, cols: o, disabledIndices: s, minIndex: c, maxIndex: l, prevIndex: u, stopEvent: d = !1 } = t, f = u;
|
|
340
|
+
if (n.key === Ve) {
|
|
341
|
+
if (d && J(n), u === -1) f = l;
|
|
342
|
+
else if (f = Q(e, {
|
|
343
|
+
startingIndex: f,
|
|
344
|
+
amount: o,
|
|
345
|
+
decrement: !0,
|
|
346
|
+
disabledIndices: s
|
|
347
|
+
}), i && (u - o < c || f < 0)) {
|
|
348
|
+
let e = u % o, t = l % o, n = l - (t - e);
|
|
349
|
+
f = t === e ? l : t > e ? n : n - o;
|
|
350
|
+
}
|
|
351
|
+
ot(e, f) && (f = u);
|
|
352
|
+
}
|
|
353
|
+
if (n.key === He && (d && J(n), u === -1 ? f = c : (f = Q(e, {
|
|
354
|
+
startingIndex: u,
|
|
355
|
+
amount: o,
|
|
356
|
+
disabledIndices: s
|
|
357
|
+
}), i && u + o > l && (f = Q(e, {
|
|
358
|
+
startingIndex: u % o - o,
|
|
359
|
+
amount: o,
|
|
360
|
+
disabledIndices: s
|
|
361
|
+
}))), ot(e, f) && (f = u)), r === "both") {
|
|
362
|
+
let t = C(u / o);
|
|
363
|
+
n.key === (a ? ze : Be) && (d && J(n), u % o === o - 1 ? i && (f = Q(e, {
|
|
364
|
+
startingIndex: u - u % o - 1,
|
|
365
|
+
disabledIndices: s
|
|
366
|
+
})) : (f = Q(e, {
|
|
367
|
+
startingIndex: u,
|
|
368
|
+
disabledIndices: s
|
|
369
|
+
}), i && at(f, o, t) && (f = Q(e, {
|
|
370
|
+
startingIndex: u - u % o - 1,
|
|
371
|
+
disabledIndices: s
|
|
372
|
+
}))), at(f, o, t) && (f = u)), n.key === (a ? Be : ze) && (d && J(n), u % o === 0 ? i && (f = Q(e, {
|
|
373
|
+
startingIndex: u + (o - u % o),
|
|
374
|
+
decrement: !0,
|
|
375
|
+
disabledIndices: s
|
|
376
|
+
})) : (f = Q(e, {
|
|
377
|
+
startingIndex: u,
|
|
378
|
+
decrement: !0,
|
|
379
|
+
disabledIndices: s
|
|
380
|
+
}), i && at(f, o, t) && (f = Q(e, {
|
|
381
|
+
startingIndex: u + (o - u % o),
|
|
382
|
+
decrement: !0,
|
|
383
|
+
disabledIndices: s
|
|
384
|
+
}))), at(f, o, t) && (f = u));
|
|
385
|
+
let r = C(l / o) === t;
|
|
386
|
+
ot(e, f) && (f = i && r ? n.key === (a ? Be : ze) ? l : Q(e, {
|
|
387
|
+
startingIndex: u - u % o - 1,
|
|
388
|
+
disabledIndices: s
|
|
389
|
+
}) : u);
|
|
390
|
+
}
|
|
391
|
+
return f;
|
|
392
|
+
}
|
|
393
|
+
function ut(e, t, n) {
|
|
394
|
+
let r = [], i = 0;
|
|
395
|
+
return e.forEach((e, a) => {
|
|
396
|
+
let { width: o, height: s } = e;
|
|
397
|
+
if (o > t && process.env.NODE_ENV !== "production") throw Error("[Floating UI]: Invalid grid - item width at index " + a + " is greater than grid columns");
|
|
398
|
+
let c = !1;
|
|
399
|
+
for (n && (i = 0); !c;) {
|
|
400
|
+
let e = [];
|
|
401
|
+
for (let n = 0; n < o; n++) for (let r = 0; r < s; r++) e.push(i + n + r * t);
|
|
402
|
+
i % t + o <= t && e.every((e) => r[e] == null) ? (e.forEach((e) => {
|
|
403
|
+
r[e] = a;
|
|
404
|
+
}), c = !0) : i++;
|
|
405
|
+
}
|
|
406
|
+
}), [...r];
|
|
407
|
+
}
|
|
408
|
+
function dt(e, t, n, r, i) {
|
|
409
|
+
if (e === -1) return -1;
|
|
410
|
+
let a = n.indexOf(e), o = t[e];
|
|
411
|
+
switch (i) {
|
|
412
|
+
case "tl": return a;
|
|
413
|
+
case "tr": return o ? a + o.width - 1 : a;
|
|
414
|
+
case "bl": return o ? a + (o.height - 1) * r : a;
|
|
415
|
+
case "br": return n.lastIndexOf(e);
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
function ft(e, t) {
|
|
419
|
+
return t.flatMap((t, n) => e.includes(t) ? [n] : []);
|
|
420
|
+
}
|
|
421
|
+
function pt(e, t, n) {
|
|
422
|
+
if (typeof n == "function") return n(t);
|
|
423
|
+
if (n) return n.includes(t);
|
|
424
|
+
let r = e.current[t];
|
|
425
|
+
return r == null || r.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true";
|
|
426
|
+
}
|
|
427
|
+
var mt = () => ({
|
|
428
|
+
getShadowRoot: !0,
|
|
429
|
+
displayCheck: typeof ResizeObserver == "function" && ResizeObserver.toString().includes("[native code]") ? "full" : "none"
|
|
430
|
+
});
|
|
431
|
+
function ht(e, t) {
|
|
432
|
+
let n = Oe(e, mt()), r = n.length;
|
|
433
|
+
if (r === 0) return;
|
|
434
|
+
let i = G(q(e)), a = n.indexOf(i);
|
|
435
|
+
return n[a === -1 ? t === 1 ? 0 : r - 1 : a + t];
|
|
436
|
+
}
|
|
437
|
+
function gt(e) {
|
|
438
|
+
return ht(q(e).body, 1) || e;
|
|
439
|
+
}
|
|
440
|
+
function _t(e) {
|
|
441
|
+
return ht(q(e).body, -1) || e;
|
|
442
|
+
}
|
|
443
|
+
function vt(e, t) {
|
|
444
|
+
let n = t || e.currentTarget, r = e.relatedTarget;
|
|
445
|
+
return !r || !K(n, r);
|
|
446
|
+
}
|
|
447
|
+
function yt(e) {
|
|
448
|
+
Oe(e, mt()).forEach((e) => {
|
|
449
|
+
e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
function bt(e) {
|
|
453
|
+
e.querySelectorAll("[data-tabindex]").forEach((e) => {
|
|
454
|
+
let t = e.dataset.tabindex;
|
|
455
|
+
delete e.dataset.tabindex, t ? e.setAttribute("tabindex", t) : e.removeAttribute("tabindex");
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
//#endregion
|
|
459
|
+
//#region ../../node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
460
|
+
function xt(e, t, n) {
|
|
461
|
+
let { reference: r, floating: i } = e, a = x(t), o = k(t), s = v(o), c = S(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
462
|
+
switch (c) {
|
|
463
|
+
case "top":
|
|
464
|
+
p = {
|
|
465
|
+
x: u,
|
|
466
|
+
y: r.y - i.height
|
|
467
|
+
};
|
|
468
|
+
break;
|
|
469
|
+
case "bottom":
|
|
470
|
+
p = {
|
|
471
|
+
x: u,
|
|
472
|
+
y: r.y + r.height
|
|
473
|
+
};
|
|
474
|
+
break;
|
|
475
|
+
case "right":
|
|
476
|
+
p = {
|
|
477
|
+
x: r.x + r.width,
|
|
478
|
+
y: d
|
|
479
|
+
};
|
|
480
|
+
break;
|
|
481
|
+
case "left":
|
|
482
|
+
p = {
|
|
483
|
+
x: r.x - i.width,
|
|
484
|
+
y: d
|
|
485
|
+
};
|
|
486
|
+
break;
|
|
487
|
+
default: p = {
|
|
488
|
+
x: r.x,
|
|
489
|
+
y: r.y
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
switch (g(t)) {
|
|
493
|
+
case "start":
|
|
494
|
+
p[o] -= f * (n && l ? -1 : 1);
|
|
495
|
+
break;
|
|
496
|
+
case "end":
|
|
497
|
+
p[o] += f * (n && l ? -1 : 1);
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
return p;
|
|
501
|
+
}
|
|
502
|
+
async function St(e, t) {
|
|
503
|
+
t === void 0 && (t = {});
|
|
504
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = j(t, e), p = D(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = _(await i.getClippingRect({
|
|
505
|
+
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
506
|
+
boundary: c,
|
|
507
|
+
rootBoundary: l,
|
|
508
|
+
strategy: s
|
|
509
|
+
})), g = u === "floating" ? {
|
|
510
|
+
x: n,
|
|
511
|
+
y: r,
|
|
512
|
+
width: a.floating.width,
|
|
513
|
+
height: a.floating.height
|
|
514
|
+
} : a.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), y = await (i.isElement == null ? void 0 : i.isElement(v)) && await (i.getScale == null ? void 0 : i.getScale(v)) || {
|
|
515
|
+
x: 1,
|
|
516
|
+
y: 1
|
|
517
|
+
}, b = _(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
518
|
+
elements: o,
|
|
519
|
+
rect: g,
|
|
520
|
+
offsetParent: v,
|
|
521
|
+
strategy: s
|
|
522
|
+
}) : g);
|
|
523
|
+
return {
|
|
524
|
+
top: (h.top - b.top + p.top) / y.y,
|
|
525
|
+
bottom: (b.bottom - h.bottom + p.bottom) / y.y,
|
|
526
|
+
left: (h.left - b.left + p.left) / y.x,
|
|
527
|
+
right: (b.right - h.right + p.right) / y.x
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
var Ct = 50, wt = async (e, t, n) => {
|
|
531
|
+
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
532
|
+
...o,
|
|
533
|
+
detectOverflow: St
|
|
534
|
+
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
535
|
+
reference: e,
|
|
536
|
+
floating: t,
|
|
537
|
+
strategy: i
|
|
538
|
+
}), { x: u, y: d } = xt(l, r, c), f = r, p = 0, m = {};
|
|
539
|
+
for (let n = 0; n < a.length; n++) {
|
|
540
|
+
let h = a[n];
|
|
541
|
+
if (!h) continue;
|
|
542
|
+
let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
|
|
543
|
+
x: u,
|
|
544
|
+
y: d,
|
|
545
|
+
initialPlacement: r,
|
|
546
|
+
placement: f,
|
|
547
|
+
strategy: i,
|
|
548
|
+
middlewareData: m,
|
|
549
|
+
rects: l,
|
|
550
|
+
platform: s,
|
|
551
|
+
elements: {
|
|
552
|
+
reference: e,
|
|
553
|
+
floating: t
|
|
554
|
+
}
|
|
555
|
+
});
|
|
556
|
+
u = v ?? u, d = y ?? d, m[g] = {
|
|
557
|
+
...m[g],
|
|
558
|
+
...b
|
|
559
|
+
}, x && p < Ct && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
560
|
+
reference: e,
|
|
561
|
+
floating: t,
|
|
562
|
+
strategy: i
|
|
563
|
+
}) : x.rects), {x: u, y: d} = xt(l, f, c)), n = -1);
|
|
564
|
+
}
|
|
565
|
+
return {
|
|
566
|
+
x: u,
|
|
567
|
+
y: d,
|
|
568
|
+
placement: f,
|
|
569
|
+
strategy: i,
|
|
570
|
+
middlewareData: m
|
|
571
|
+
};
|
|
572
|
+
}, Tt = (e) => ({
|
|
573
|
+
name: "arrow",
|
|
574
|
+
options: e,
|
|
575
|
+
async fn(t) {
|
|
576
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = j(e, t) || {};
|
|
577
|
+
if (l == null) return {};
|
|
578
|
+
let d = D(u), f = {
|
|
579
|
+
x: n,
|
|
580
|
+
y: r
|
|
581
|
+
}, p = k(i), m = v(p), h = await o.getDimensions(l), _ = p === "y", y = _ ? "top" : "left", b = _ ? "bottom" : "right", x = _ ? "clientHeight" : "clientWidth", S = a.reference[m] + a.reference[p] - f[p] - a.floating[m], C = f[p] - a.reference[p], w = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), T = w ? w[x] : 0;
|
|
582
|
+
(!T || !await (o.isElement == null ? void 0 : o.isElement(w))) && (T = s.floating[x] || a.floating[m]);
|
|
583
|
+
let E = S / 2 - C / 2, O = T / 2 - h[m] / 2 - 1, A = F(d[y], O), M = F(d[b], O), P = A, I = T - h[m] - M, L = T / 2 - h[m] / 2 + E, R = N(P, L, I), z = !c.arrow && g(i) != null && L !== R && a.reference[m] / 2 - (L < P ? A : M) - h[m] / 2 < 0, B = z ? L < P ? L - P : L - I : 0;
|
|
584
|
+
return {
|
|
585
|
+
[p]: f[p] + B,
|
|
586
|
+
data: {
|
|
587
|
+
[p]: R,
|
|
588
|
+
centerOffset: L - R - B,
|
|
589
|
+
...z && { alignmentOffset: B }
|
|
590
|
+
},
|
|
591
|
+
reset: z
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
function Et(e, t, n) {
|
|
596
|
+
return (e ? [...n.filter((t) => g(t) === e), ...n.filter((t) => g(t) !== e)] : n.filter((e) => S(e) === e)).filter((n) => e ? g(n) === e || (t ? P(n) !== n : !1) : !0);
|
|
597
|
+
}
|
|
598
|
+
var Dt = function(e) {
|
|
599
|
+
return e === void 0 && (e = {}), {
|
|
600
|
+
name: "autoPlacement",
|
|
601
|
+
options: e,
|
|
602
|
+
async fn(t) {
|
|
603
|
+
let { rects: n, middlewareData: r, placement: i, platform: a, elements: o } = t, { crossAxis: s = !1, alignment: c, allowedPlacements: l = R, autoAlignment: u = !0, ...d } = j(e, t), f = c !== void 0 || l === R ? Et(c || null, u, l) : l, p = await a.detectOverflow(t, d), m = r.autoPlacement?.index || 0, h = f[m];
|
|
604
|
+
if (h == null) return {};
|
|
605
|
+
let _ = M(h, n, await (a.isRTL == null ? void 0 : a.isRTL(o.floating)));
|
|
606
|
+
if (i !== h) return { reset: { placement: f[0] } };
|
|
607
|
+
let v = [
|
|
608
|
+
p[S(h)],
|
|
609
|
+
p[_[0]],
|
|
610
|
+
p[_[1]]
|
|
611
|
+
], y = [...r.autoPlacement?.overflows || [], {
|
|
612
|
+
placement: h,
|
|
613
|
+
overflows: v
|
|
614
|
+
}], b = f[m + 1];
|
|
615
|
+
if (b) return {
|
|
616
|
+
data: {
|
|
617
|
+
index: m + 1,
|
|
618
|
+
overflows: y
|
|
619
|
+
},
|
|
620
|
+
reset: { placement: b }
|
|
621
|
+
};
|
|
622
|
+
let x = y.map((e) => {
|
|
623
|
+
let t = g(e.placement);
|
|
624
|
+
return [
|
|
625
|
+
e.placement,
|
|
626
|
+
t && s ? e.overflows.slice(0, 2).reduce((e, t) => e + t, 0) : e.overflows[0],
|
|
627
|
+
e.overflows
|
|
628
|
+
];
|
|
629
|
+
}).sort((e, t) => e[1] - t[1]), C = x.filter((e) => e[2].slice(0, g(e[0]) ? 2 : 3).every((e) => e <= 0))[0]?.[0] || x[0][0];
|
|
630
|
+
return C === i ? {} : {
|
|
631
|
+
data: {
|
|
632
|
+
index: m + 1,
|
|
633
|
+
overflows: y
|
|
634
|
+
},
|
|
635
|
+
reset: { placement: C }
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
}, Ot = function(e) {
|
|
640
|
+
return e === void 0 && (e = {}), {
|
|
641
|
+
name: "flip",
|
|
642
|
+
options: e,
|
|
643
|
+
async fn(t) {
|
|
644
|
+
var n;
|
|
645
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = j(e, t);
|
|
646
|
+
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
647
|
+
let g = S(r), _ = x(o), v = S(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), C = d || (v || !m ? [A(o)] : E(o)), w = p !== "none";
|
|
648
|
+
!d && w && C.push(...b(o, m, p, y));
|
|
649
|
+
let T = [o, ...C], D = await s.detectOverflow(t, h), O = [], k = i.flip?.overflows || [];
|
|
650
|
+
if (l && O.push(D[g]), u) {
|
|
651
|
+
let e = M(r, a, y);
|
|
652
|
+
O.push(D[e[0]], D[e[1]]);
|
|
653
|
+
}
|
|
654
|
+
if (k = [...k, {
|
|
655
|
+
placement: r,
|
|
656
|
+
overflows: O
|
|
657
|
+
}], !O.every((e) => e <= 0)) {
|
|
658
|
+
let e = (i.flip?.index || 0) + 1, t = T[e];
|
|
659
|
+
if (t && (!(u === "alignment" && _ !== x(t)) || k.every((e) => x(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
|
|
660
|
+
data: {
|
|
661
|
+
index: e,
|
|
662
|
+
overflows: k
|
|
663
|
+
},
|
|
664
|
+
reset: { placement: t }
|
|
665
|
+
};
|
|
666
|
+
let n = k.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
667
|
+
if (!n) switch (f) {
|
|
668
|
+
case "bestFit": {
|
|
669
|
+
let e = k.filter((e) => {
|
|
670
|
+
if (w) {
|
|
671
|
+
let t = x(e.placement);
|
|
672
|
+
return t === _ || t === "y";
|
|
673
|
+
}
|
|
674
|
+
return !0;
|
|
675
|
+
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
|
|
676
|
+
e && (n = e);
|
|
677
|
+
break;
|
|
678
|
+
}
|
|
679
|
+
case "initialPlacement":
|
|
680
|
+
n = o;
|
|
681
|
+
break;
|
|
682
|
+
}
|
|
683
|
+
if (r !== n) return { reset: { placement: n } };
|
|
684
|
+
}
|
|
685
|
+
return {};
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
}, kt = /* @__PURE__ */ new Set(["left", "top"]);
|
|
689
|
+
async function At(e, t) {
|
|
690
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = S(n), s = g(n), c = x(n) === "y", l = kt.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = j(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
691
|
+
mainAxis: d,
|
|
692
|
+
crossAxis: 0,
|
|
693
|
+
alignmentAxis: null
|
|
694
|
+
} : {
|
|
695
|
+
mainAxis: d.mainAxis || 0,
|
|
696
|
+
crossAxis: d.crossAxis || 0,
|
|
697
|
+
alignmentAxis: d.alignmentAxis
|
|
698
|
+
};
|
|
699
|
+
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
|
|
700
|
+
x: p * u,
|
|
701
|
+
y: f * l
|
|
702
|
+
} : {
|
|
703
|
+
x: f * l,
|
|
704
|
+
y: p * u
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
var jt = function(e) {
|
|
708
|
+
return e === void 0 && (e = 0), {
|
|
709
|
+
name: "offset",
|
|
710
|
+
options: e,
|
|
711
|
+
async fn(t) {
|
|
712
|
+
var n;
|
|
713
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await At(t, e);
|
|
714
|
+
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
715
|
+
x: r + s.x,
|
|
716
|
+
y: i + s.y,
|
|
717
|
+
data: {
|
|
718
|
+
...s,
|
|
719
|
+
placement: a
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
}, Mt = function(e) {
|
|
725
|
+
return e === void 0 && (e = {}), {
|
|
726
|
+
name: "shift",
|
|
727
|
+
options: e,
|
|
728
|
+
async fn(t) {
|
|
729
|
+
let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
|
|
730
|
+
let { x: t, y: n } = e;
|
|
731
|
+
return {
|
|
732
|
+
x: t,
|
|
733
|
+
y: n
|
|
734
|
+
};
|
|
735
|
+
} }, ...l } = j(e, t), u = {
|
|
736
|
+
x: n,
|
|
737
|
+
y: r
|
|
738
|
+
}, d = await a.detectOverflow(t, l), f = x(S(i)), p = y(f), m = u[p], h = u[f];
|
|
739
|
+
if (o) {
|
|
740
|
+
let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
|
|
741
|
+
m = N(n, m, r);
|
|
742
|
+
}
|
|
743
|
+
if (s) {
|
|
744
|
+
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
|
|
745
|
+
h = N(n, h, r);
|
|
746
|
+
}
|
|
747
|
+
let g = c.fn({
|
|
748
|
+
...t,
|
|
749
|
+
[p]: m,
|
|
750
|
+
[f]: h
|
|
751
|
+
});
|
|
752
|
+
return {
|
|
753
|
+
...g,
|
|
754
|
+
data: {
|
|
755
|
+
x: g.x - n,
|
|
756
|
+
y: g.y - r,
|
|
757
|
+
enabled: {
|
|
758
|
+
[p]: o,
|
|
759
|
+
[f]: s
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
};
|
|
765
|
+
}, Nt = function(e) {
|
|
766
|
+
return e === void 0 && (e = {}), {
|
|
767
|
+
name: "size",
|
|
768
|
+
options: e,
|
|
769
|
+
async fn(t) {
|
|
770
|
+
var n, r;
|
|
771
|
+
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = j(e, t), u = await o.detectOverflow(t, l), d = S(i), f = g(i), p = x(i) === "y", { width: m, height: _ } = a.floating, v, y;
|
|
772
|
+
d === "top" || d === "bottom" ? (v = d, y = f === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (y = d, v = f === "end" ? "top" : "bottom");
|
|
773
|
+
let b = _ - u.top - u.bottom, C = m - u.left - u.right, w = F(_ - u[v], b), T = F(m - u[y], C), E = !t.middlewareData.shift, D = w, O = T;
|
|
774
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (O = C), (r = t.middlewareData.shift) != null && r.enabled.y && (D = b), E && !f) {
|
|
775
|
+
let e = h(u.left, 0), t = h(u.right, 0), n = h(u.top, 0), r = h(u.bottom, 0);
|
|
776
|
+
p ? O = m - 2 * (e !== 0 || t !== 0 ? e + t : h(u.left, u.right)) : D = _ - 2 * (n !== 0 || r !== 0 ? n + r : h(u.top, u.bottom));
|
|
777
|
+
}
|
|
778
|
+
await c({
|
|
779
|
+
...t,
|
|
780
|
+
availableWidth: O,
|
|
781
|
+
availableHeight: D
|
|
782
|
+
});
|
|
783
|
+
let k = await o.getDimensions(s.floating);
|
|
784
|
+
return m !== k.width || _ !== k.height ? { reset: { rects: !0 } } : {};
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
};
|
|
788
|
+
//#endregion
|
|
789
|
+
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
790
|
+
function Pt(e) {
|
|
791
|
+
let t = p(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = l(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = L(n) !== a || L(r) !== o;
|
|
792
|
+
return s && (n = a, r = o), {
|
|
793
|
+
width: n,
|
|
794
|
+
height: r,
|
|
795
|
+
$: s
|
|
796
|
+
};
|
|
797
|
+
}
|
|
798
|
+
function Ft(e) {
|
|
799
|
+
return c(e) ? e : e.contextElement;
|
|
800
|
+
}
|
|
801
|
+
function It(e) {
|
|
802
|
+
let t = Ft(e);
|
|
803
|
+
if (!l(t)) return O(1);
|
|
804
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Pt(t), o = (a ? L(n.width) : n.width) / r, s = (a ? L(n.height) : n.height) / i;
|
|
805
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
806
|
+
x: o,
|
|
807
|
+
y: s
|
|
808
|
+
};
|
|
809
|
+
}
|
|
810
|
+
var Lt = /* @__PURE__ */ O(0);
|
|
811
|
+
function Rt(n) {
|
|
812
|
+
let r = e(n);
|
|
813
|
+
return !t() || !r.visualViewport ? Lt : {
|
|
814
|
+
x: r.visualViewport.offsetLeft,
|
|
815
|
+
y: r.visualViewport.offsetTop
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
function zt(t, n, r) {
|
|
819
|
+
return n === void 0 && (n = !1), !r || n && r !== e(t) ? !1 : n;
|
|
820
|
+
}
|
|
821
|
+
function Bt(t, n, r, i) {
|
|
822
|
+
n === void 0 && (n = !1), r === void 0 && (r = !1);
|
|
823
|
+
let a = t.getBoundingClientRect(), o = Ft(t), s = O(1);
|
|
824
|
+
n && (i ? c(i) && (s = It(i)) : s = It(t));
|
|
825
|
+
let l = zt(o, r, i) ? Rt(o) : O(0), u = (a.left + l.x) / s.x, d = (a.top + l.y) / s.y, f = a.width / s.x, h = a.height / s.y;
|
|
826
|
+
if (o) {
|
|
827
|
+
let t = e(o), n = i && c(i) ? e(i) : i, r = t, a = m(r);
|
|
828
|
+
for (; a && i && n !== r;) {
|
|
829
|
+
let t = It(a), n = a.getBoundingClientRect(), i = p(a), o = n.left + (a.clientLeft + parseFloat(i.paddingLeft)) * t.x, s = n.top + (a.clientTop + parseFloat(i.paddingTop)) * t.y;
|
|
830
|
+
u *= t.x, d *= t.y, f *= t.x, h *= t.y, u += o, d += s, r = e(a), a = m(r);
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
return _({
|
|
834
|
+
width: f,
|
|
835
|
+
height: h,
|
|
836
|
+
x: u,
|
|
837
|
+
y: d
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
function Vt(e, t) {
|
|
841
|
+
let n = r(e).scrollLeft;
|
|
842
|
+
return t ? t.left + n : Bt(I(e)).left + n;
|
|
843
|
+
}
|
|
844
|
+
function Ht(e, t) {
|
|
845
|
+
let n = e.getBoundingClientRect();
|
|
846
|
+
return {
|
|
847
|
+
x: n.left + t.scrollLeft - Vt(e, n),
|
|
848
|
+
y: n.top + t.scrollTop
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
function Ut(e) {
|
|
852
|
+
let { elements: t, rect: n, offsetParent: a, strategy: s } = e, c = s === "fixed", u = I(a), d = t ? z(t.floating) : !1;
|
|
853
|
+
if (a === u || d && c) return n;
|
|
854
|
+
let f = {
|
|
855
|
+
scrollLeft: 0,
|
|
856
|
+
scrollTop: 0
|
|
857
|
+
}, p = O(1), m = O(0), h = l(a);
|
|
858
|
+
if ((h || !h && !c) && ((i(a) !== "body" || o(u)) && (f = r(a)), h)) {
|
|
859
|
+
let e = Bt(a);
|
|
860
|
+
p = It(a), m.x = e.x + a.clientLeft, m.y = e.y + a.clientTop;
|
|
861
|
+
}
|
|
862
|
+
let g = u && !h && !c ? Ht(u, f) : O(0);
|
|
863
|
+
return {
|
|
864
|
+
width: n.width * p.x,
|
|
865
|
+
height: n.height * p.y,
|
|
866
|
+
x: n.x * p.x - f.scrollLeft * p.x + m.x + g.x,
|
|
867
|
+
y: n.y * p.y - f.scrollTop * p.y + m.y + g.y
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
function Wt(e) {
|
|
871
|
+
return Array.from(e.getClientRects());
|
|
872
|
+
}
|
|
873
|
+
function Gt(e) {
|
|
874
|
+
let t = I(e), n = r(e), i = e.ownerDocument.body, a = h(t.scrollWidth, t.clientWidth, i.scrollWidth, i.clientWidth), o = h(t.scrollHeight, t.clientHeight, i.scrollHeight, i.clientHeight), s = -n.scrollLeft + Vt(e), c = -n.scrollTop;
|
|
875
|
+
return p(i).direction === "rtl" && (s += h(t.clientWidth, i.clientWidth) - a), {
|
|
876
|
+
width: a,
|
|
877
|
+
height: o,
|
|
878
|
+
x: s,
|
|
879
|
+
y: c
|
|
880
|
+
};
|
|
881
|
+
}
|
|
882
|
+
var Kt = 25;
|
|
883
|
+
function qt(n, r) {
|
|
884
|
+
let i = e(n), a = I(n), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
|
|
885
|
+
if (o) {
|
|
886
|
+
s = o.width, c = o.height;
|
|
887
|
+
let e = t();
|
|
888
|
+
(!e || e && r === "fixed") && (l = o.offsetLeft, u = o.offsetTop);
|
|
889
|
+
}
|
|
890
|
+
let d = Vt(a);
|
|
891
|
+
if (d <= 0) {
|
|
892
|
+
let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r);
|
|
893
|
+
i <= Kt && (s -= i);
|
|
894
|
+
} else d <= Kt && (s += d);
|
|
895
|
+
return {
|
|
896
|
+
width: s,
|
|
897
|
+
height: c,
|
|
898
|
+
x: l,
|
|
899
|
+
y: u
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
function Jt(e, t) {
|
|
903
|
+
let n = Bt(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = l(e) ? It(e) : O(1);
|
|
904
|
+
return {
|
|
905
|
+
width: e.clientWidth * a.x,
|
|
906
|
+
height: e.clientHeight * a.y,
|
|
907
|
+
x: i * a.x,
|
|
908
|
+
y: r * a.y
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
function Yt(e, t, n) {
|
|
912
|
+
let r;
|
|
913
|
+
if (t === "viewport") r = qt(e, n);
|
|
914
|
+
else if (t === "document") r = Gt(I(e));
|
|
915
|
+
else if (c(t)) r = Jt(t, n);
|
|
916
|
+
else {
|
|
917
|
+
let n = Rt(e);
|
|
918
|
+
r = {
|
|
919
|
+
x: t.x - n.x,
|
|
920
|
+
y: t.y - n.y,
|
|
921
|
+
width: t.width,
|
|
922
|
+
height: t.height
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
return _(r);
|
|
926
|
+
}
|
|
927
|
+
function Xt(e, t) {
|
|
928
|
+
let n = T(e);
|
|
929
|
+
return n === t || !c(n) || d(n) ? !1 : p(n).position === "fixed" || Xt(n, t);
|
|
930
|
+
}
|
|
931
|
+
function Zt(e, t) {
|
|
932
|
+
let n = t.get(e);
|
|
933
|
+
if (n) return n;
|
|
934
|
+
let r = u(e, [], !1).filter((e) => c(e) && i(e) !== "body"), a = null, s = p(e).position === "fixed", l = s ? T(e) : e;
|
|
935
|
+
for (; c(l) && !d(l);) {
|
|
936
|
+
let t = p(l), n = w(l);
|
|
937
|
+
!n && t.position === "fixed" && (a = null), (s ? !n && !a : !n && t.position === "static" && a && (a.position === "absolute" || a.position === "fixed") || o(l) && !n && Xt(e, l)) ? r = r.filter((e) => e !== l) : a = t, l = T(l);
|
|
938
|
+
}
|
|
939
|
+
return t.set(e, r), r;
|
|
940
|
+
}
|
|
941
|
+
function Qt(e) {
|
|
942
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? z(t) ? [] : Zt(t, this._c) : [].concat(n), r], o = Yt(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
943
|
+
for (let e = 1; e < a.length; e++) {
|
|
944
|
+
let n = Yt(t, a[e], i);
|
|
945
|
+
s = h(n.top, s), c = F(n.right, c), l = F(n.bottom, l), u = h(n.left, u);
|
|
946
|
+
}
|
|
947
|
+
return {
|
|
948
|
+
width: c - u,
|
|
949
|
+
height: l - s,
|
|
950
|
+
x: u,
|
|
951
|
+
y: s
|
|
952
|
+
};
|
|
953
|
+
}
|
|
954
|
+
function $t(e) {
|
|
955
|
+
let { width: t, height: n } = Pt(e);
|
|
956
|
+
return {
|
|
957
|
+
width: t,
|
|
958
|
+
height: n
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
function en(e, t, n) {
|
|
962
|
+
let a = l(t), s = I(t), c = n === "fixed", u = Bt(e, !0, c, t), d = {
|
|
963
|
+
scrollLeft: 0,
|
|
964
|
+
scrollTop: 0
|
|
965
|
+
}, f = O(0);
|
|
966
|
+
function p() {
|
|
967
|
+
f.x = Vt(s);
|
|
968
|
+
}
|
|
969
|
+
if (a || !a && !c) if ((i(t) !== "body" || o(s)) && (d = r(t)), a) {
|
|
970
|
+
let e = Bt(t, !0, c, t);
|
|
971
|
+
f.x = e.x + t.clientLeft, f.y = e.y + t.clientTop;
|
|
972
|
+
} else s && p();
|
|
973
|
+
c && !a && s && p();
|
|
974
|
+
let m = s && !a && !c ? Ht(s, d) : O(0);
|
|
975
|
+
return {
|
|
976
|
+
x: u.left + d.scrollLeft - f.x - m.x,
|
|
977
|
+
y: u.top + d.scrollTop - f.y - m.y,
|
|
978
|
+
width: u.width,
|
|
979
|
+
height: u.height
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
function tn(e) {
|
|
983
|
+
return p(e).position === "static";
|
|
984
|
+
}
|
|
985
|
+
function nn(e, t) {
|
|
986
|
+
if (!l(e) || p(e).position === "fixed") return null;
|
|
987
|
+
if (t) return t(e);
|
|
988
|
+
let n = e.offsetParent;
|
|
989
|
+
return I(e) === n && (n = n.ownerDocument.body), n;
|
|
990
|
+
}
|
|
991
|
+
function rn(t, r) {
|
|
992
|
+
let i = e(t);
|
|
993
|
+
if (z(t)) return i;
|
|
994
|
+
if (!l(t)) {
|
|
995
|
+
let e = T(t);
|
|
996
|
+
for (; e && !d(e);) {
|
|
997
|
+
if (c(e) && !tn(e)) return e;
|
|
998
|
+
e = T(e);
|
|
999
|
+
}
|
|
1000
|
+
return i;
|
|
1001
|
+
}
|
|
1002
|
+
let a = nn(t, r);
|
|
1003
|
+
for (; a && f(a) && tn(a);) a = nn(a, r);
|
|
1004
|
+
return a && d(a) && tn(a) && !w(a) ? i : a || n(t) || i;
|
|
1005
|
+
}
|
|
1006
|
+
var an = async function(e) {
|
|
1007
|
+
let t = this.getOffsetParent || rn, n = this.getDimensions, r = await n(e.floating);
|
|
1008
|
+
return {
|
|
1009
|
+
reference: en(e.reference, await t(e.floating), e.strategy),
|
|
1010
|
+
floating: {
|
|
1011
|
+
x: 0,
|
|
1012
|
+
y: 0,
|
|
1013
|
+
width: r.width,
|
|
1014
|
+
height: r.height
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
};
|
|
1018
|
+
function on(e) {
|
|
1019
|
+
return p(e).direction === "rtl";
|
|
1020
|
+
}
|
|
1021
|
+
var sn = {
|
|
1022
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ut,
|
|
1023
|
+
getDocumentElement: I,
|
|
1024
|
+
getClippingRect: Qt,
|
|
1025
|
+
getOffsetParent: rn,
|
|
1026
|
+
getElementRects: an,
|
|
1027
|
+
getClientRects: Wt,
|
|
1028
|
+
getDimensions: $t,
|
|
1029
|
+
getScale: It,
|
|
1030
|
+
isElement: c,
|
|
1031
|
+
isRTL: on
|
|
1032
|
+
};
|
|
1033
|
+
function cn(e, t) {
|
|
1034
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1035
|
+
}
|
|
1036
|
+
function ln(e, t) {
|
|
1037
|
+
let n = null, r, i = I(e);
|
|
1038
|
+
function a() {
|
|
1039
|
+
var e;
|
|
1040
|
+
clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
|
|
1041
|
+
}
|
|
1042
|
+
function o(s, c) {
|
|
1043
|
+
s === void 0 && (s = !1), c === void 0 && (c = 1), a();
|
|
1044
|
+
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
1045
|
+
if (s || t(), !f || !p) return;
|
|
1046
|
+
let m = C(d), g = C(i.clientWidth - (u + f)), _ = C(i.clientHeight - (d + p)), v = C(u), y = {
|
|
1047
|
+
rootMargin: -m + "px " + -g + "px " + -_ + "px " + -v + "px",
|
|
1048
|
+
threshold: h(0, F(1, c)) || 1
|
|
1049
|
+
}, b = !0;
|
|
1050
|
+
function x(t) {
|
|
1051
|
+
let n = t[0].intersectionRatio;
|
|
1052
|
+
if (n !== c) {
|
|
1053
|
+
if (!b) return o();
|
|
1054
|
+
n ? o(!1, n) : r = setTimeout(() => {
|
|
1055
|
+
o(!1, 1e-7);
|
|
1056
|
+
}, 1e3);
|
|
1057
|
+
}
|
|
1058
|
+
n === 1 && !cn(l, e.getBoundingClientRect()) && o(), b = !1;
|
|
1059
|
+
}
|
|
1060
|
+
try {
|
|
1061
|
+
n = new IntersectionObserver(x, {
|
|
1062
|
+
...y,
|
|
1063
|
+
root: i.ownerDocument
|
|
1064
|
+
});
|
|
1065
|
+
} catch {
|
|
1066
|
+
n = new IntersectionObserver(x, y);
|
|
1067
|
+
}
|
|
1068
|
+
n.observe(e);
|
|
1069
|
+
}
|
|
1070
|
+
return o(!0), a;
|
|
1071
|
+
}
|
|
1072
|
+
function un(e, t, n, r) {
|
|
1073
|
+
r === void 0 && (r = {});
|
|
1074
|
+
let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = Ft(e), d = i || a ? [...l ? u(l) : [], ...t ? u(t) : []] : [];
|
|
1075
|
+
d.forEach((e) => {
|
|
1076
|
+
i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
|
|
1077
|
+
});
|
|
1078
|
+
let f = l && s ? ln(l, n) : null, p = -1, m = null;
|
|
1079
|
+
o && (m = new ResizeObserver((e) => {
|
|
1080
|
+
let [r] = e;
|
|
1081
|
+
r && r.target === l && m && t && (m.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1082
|
+
var e;
|
|
1083
|
+
(e = m) == null || e.observe(t);
|
|
1084
|
+
})), n();
|
|
1085
|
+
}), l && !c && m.observe(l), t && m.observe(t));
|
|
1086
|
+
let h, g = c ? Bt(e) : null;
|
|
1087
|
+
c && _();
|
|
1088
|
+
function _() {
|
|
1089
|
+
let t = Bt(e);
|
|
1090
|
+
g && !cn(g, t) && n(), g = t, h = requestAnimationFrame(_);
|
|
1091
|
+
}
|
|
1092
|
+
return n(), () => {
|
|
1093
|
+
var e;
|
|
1094
|
+
d.forEach((e) => {
|
|
1095
|
+
i && e.removeEventListener("scroll", n), a && e.removeEventListener("resize", n);
|
|
1096
|
+
}), f?.(), (e = m) == null || e.disconnect(), m = null, c && cancelAnimationFrame(h);
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
var dn = jt, fn = Dt, pn = Mt, mn = Ot, hn = Nt, gn = Tt, _n = (e, t, n) => {
|
|
1100
|
+
let r = /* @__PURE__ */ new Map(), i = {
|
|
1101
|
+
platform: sn,
|
|
1102
|
+
...n
|
|
1103
|
+
}, a = {
|
|
1104
|
+
...i.platform,
|
|
1105
|
+
_c: r
|
|
1106
|
+
};
|
|
1107
|
+
return wt(e, t, {
|
|
1108
|
+
...i,
|
|
1109
|
+
platform: a
|
|
1110
|
+
});
|
|
1111
|
+
}, vn = typeof document < "u" ? V : function() {};
|
|
1112
|
+
function yn(e, t) {
|
|
1113
|
+
if (e === t) return !0;
|
|
1114
|
+
if (typeof e != typeof t) return !1;
|
|
1115
|
+
if (typeof e == "function" && e.toString() === t.toString()) return !0;
|
|
1116
|
+
let n, r, i;
|
|
1117
|
+
if (e && t && typeof e == "object") {
|
|
1118
|
+
if (Array.isArray(e)) {
|
|
1119
|
+
if (n = e.length, n !== t.length) return !1;
|
|
1120
|
+
for (r = n; r-- !== 0;) if (!yn(e[r], t[r])) return !1;
|
|
1121
|
+
return !0;
|
|
1122
|
+
}
|
|
1123
|
+
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
|
|
1124
|
+
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
|
|
1125
|
+
for (r = n; r-- !== 0;) {
|
|
1126
|
+
let n = i[r];
|
|
1127
|
+
if (!(n === "_owner" && e.$$typeof) && !yn(e[n], t[n])) return !1;
|
|
1128
|
+
}
|
|
1129
|
+
return !0;
|
|
1130
|
+
}
|
|
1131
|
+
return e !== e && t !== t;
|
|
1132
|
+
}
|
|
1133
|
+
function bn(e) {
|
|
1134
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1135
|
+
}
|
|
1136
|
+
function xn(e, t) {
|
|
1137
|
+
let n = bn(e);
|
|
1138
|
+
return Math.round(t * n) / n;
|
|
1139
|
+
}
|
|
1140
|
+
function Sn(e) {
|
|
1141
|
+
let t = B.useRef(e);
|
|
1142
|
+
return vn(() => {
|
|
1143
|
+
t.current = e;
|
|
1144
|
+
}), t;
|
|
1145
|
+
}
|
|
1146
|
+
function Cn(e) {
|
|
1147
|
+
e === void 0 && (e = {});
|
|
1148
|
+
let { placement: t = "bottom", strategy: n = "absolute", middleware: r = [], platform: i, elements: { reference: a, floating: o } = {}, transform: s = !0, whileElementsMounted: c, open: l } = e, [u, d] = B.useState({
|
|
1149
|
+
x: 0,
|
|
1150
|
+
y: 0,
|
|
1151
|
+
strategy: n,
|
|
1152
|
+
placement: t,
|
|
1153
|
+
middlewareData: {},
|
|
1154
|
+
isPositioned: !1
|
|
1155
|
+
}), [f, p] = B.useState(r);
|
|
1156
|
+
yn(f, r) || p(r);
|
|
1157
|
+
let [m, h] = B.useState(null), [g, _] = B.useState(null), v = B.useCallback((e) => {
|
|
1158
|
+
e !== S.current && (S.current = e, h(e));
|
|
1159
|
+
}, []), y = B.useCallback((e) => {
|
|
1160
|
+
e !== C.current && (C.current = e, _(e));
|
|
1161
|
+
}, []), b = a || m, x = o || g, S = B.useRef(null), C = B.useRef(null), w = B.useRef(u), T = c != null, E = Sn(c), D = Sn(i), O = Sn(l), k = B.useCallback(() => {
|
|
1162
|
+
if (!S.current || !C.current) return;
|
|
1163
|
+
let e = {
|
|
1164
|
+
placement: t,
|
|
1165
|
+
strategy: n,
|
|
1166
|
+
middleware: f
|
|
1167
|
+
};
|
|
1168
|
+
D.current && (e.platform = D.current), _n(S.current, C.current, e).then((e) => {
|
|
1169
|
+
let t = {
|
|
1170
|
+
...e,
|
|
1171
|
+
isPositioned: O.current !== !1
|
|
1172
|
+
};
|
|
1173
|
+
A.current && !yn(w.current, t) && (w.current = t, U.flushSync(() => {
|
|
1174
|
+
d(t);
|
|
1175
|
+
}));
|
|
1176
|
+
});
|
|
1177
|
+
}, [
|
|
1178
|
+
f,
|
|
1179
|
+
t,
|
|
1180
|
+
n,
|
|
1181
|
+
D,
|
|
1182
|
+
O
|
|
1183
|
+
]);
|
|
1184
|
+
vn(() => {
|
|
1185
|
+
l === !1 && w.current.isPositioned && (w.current.isPositioned = !1, d((e) => ({
|
|
1186
|
+
...e,
|
|
1187
|
+
isPositioned: !1
|
|
1188
|
+
})));
|
|
1189
|
+
}, [l]);
|
|
1190
|
+
let A = B.useRef(!1);
|
|
1191
|
+
vn(() => (A.current = !0, () => {
|
|
1192
|
+
A.current = !1;
|
|
1193
|
+
}), []), vn(() => {
|
|
1194
|
+
if (b && (S.current = b), x && (C.current = x), b && x) {
|
|
1195
|
+
if (E.current) return E.current(b, x, k);
|
|
1196
|
+
k();
|
|
1197
|
+
}
|
|
1198
|
+
}, [
|
|
1199
|
+
b,
|
|
1200
|
+
x,
|
|
1201
|
+
k,
|
|
1202
|
+
E,
|
|
1203
|
+
T
|
|
1204
|
+
]);
|
|
1205
|
+
let j = B.useMemo(() => ({
|
|
1206
|
+
reference: S,
|
|
1207
|
+
floating: C,
|
|
1208
|
+
setReference: v,
|
|
1209
|
+
setFloating: y
|
|
1210
|
+
}), [v, y]), M = B.useMemo(() => ({
|
|
1211
|
+
reference: b,
|
|
1212
|
+
floating: x
|
|
1213
|
+
}), [b, x]), N = B.useMemo(() => {
|
|
1214
|
+
let e = {
|
|
1215
|
+
position: n,
|
|
1216
|
+
left: 0,
|
|
1217
|
+
top: 0
|
|
1218
|
+
};
|
|
1219
|
+
if (!M.floating) return e;
|
|
1220
|
+
let t = xn(M.floating, u.x), r = xn(M.floating, u.y);
|
|
1221
|
+
return s ? {
|
|
1222
|
+
...e,
|
|
1223
|
+
transform: "translate(" + t + "px, " + r + "px)",
|
|
1224
|
+
...bn(M.floating) >= 1.5 && { willChange: "transform" }
|
|
1225
|
+
} : {
|
|
1226
|
+
position: n,
|
|
1227
|
+
left: t,
|
|
1228
|
+
top: r
|
|
1229
|
+
};
|
|
1230
|
+
}, [
|
|
1231
|
+
n,
|
|
1232
|
+
s,
|
|
1233
|
+
M.floating,
|
|
1234
|
+
u.x,
|
|
1235
|
+
u.y
|
|
1236
|
+
]);
|
|
1237
|
+
return B.useMemo(() => ({
|
|
1238
|
+
...u,
|
|
1239
|
+
update: k,
|
|
1240
|
+
refs: j,
|
|
1241
|
+
elements: M,
|
|
1242
|
+
floatingStyles: N
|
|
1243
|
+
}), [
|
|
1244
|
+
u,
|
|
1245
|
+
k,
|
|
1246
|
+
j,
|
|
1247
|
+
M,
|
|
1248
|
+
N
|
|
1249
|
+
]);
|
|
1250
|
+
}
|
|
1251
|
+
var wn = (e) => {
|
|
1252
|
+
function t(e) {
|
|
1253
|
+
return {}.hasOwnProperty.call(e, "current");
|
|
1254
|
+
}
|
|
1255
|
+
return {
|
|
1256
|
+
name: "arrow",
|
|
1257
|
+
options: e,
|
|
1258
|
+
fn(n) {
|
|
1259
|
+
let { element: r, padding: i } = typeof e == "function" ? e(n) : e;
|
|
1260
|
+
return r && t(r) ? r.current == null ? {} : gn({
|
|
1261
|
+
element: r.current,
|
|
1262
|
+
padding: i
|
|
1263
|
+
}).fn(n) : r ? gn({
|
|
1264
|
+
element: r,
|
|
1265
|
+
padding: i
|
|
1266
|
+
}).fn(n) : {};
|
|
1267
|
+
}
|
|
1268
|
+
};
|
|
1269
|
+
}, Tn = (e, t) => {
|
|
1270
|
+
let n = dn(e);
|
|
1271
|
+
return {
|
|
1272
|
+
name: n.name,
|
|
1273
|
+
fn: n.fn,
|
|
1274
|
+
options: [e, t]
|
|
1275
|
+
};
|
|
1276
|
+
}, En = (e, t) => {
|
|
1277
|
+
let n = pn(e);
|
|
1278
|
+
return {
|
|
1279
|
+
name: n.name,
|
|
1280
|
+
fn: n.fn,
|
|
1281
|
+
options: [e, t]
|
|
1282
|
+
};
|
|
1283
|
+
}, Dn = (e, t) => {
|
|
1284
|
+
let n = mn(e);
|
|
1285
|
+
return {
|
|
1286
|
+
name: n.name,
|
|
1287
|
+
fn: n.fn,
|
|
1288
|
+
options: [e, t]
|
|
1289
|
+
};
|
|
1290
|
+
}, On = (e, t) => {
|
|
1291
|
+
let n = hn(e);
|
|
1292
|
+
return {
|
|
1293
|
+
name: n.name,
|
|
1294
|
+
fn: n.fn,
|
|
1295
|
+
options: [e, t]
|
|
1296
|
+
};
|
|
1297
|
+
}, kn = (e, t) => {
|
|
1298
|
+
let n = fn(e);
|
|
1299
|
+
return {
|
|
1300
|
+
name: n.name,
|
|
1301
|
+
fn: n.fn,
|
|
1302
|
+
options: [e, t]
|
|
1303
|
+
};
|
|
1304
|
+
}, An = (e, t) => {
|
|
1305
|
+
let n = wn(e);
|
|
1306
|
+
return {
|
|
1307
|
+
name: n.name,
|
|
1308
|
+
fn: n.fn,
|
|
1309
|
+
options: [e, t]
|
|
1310
|
+
};
|
|
1311
|
+
};
|
|
1312
|
+
//#endregion
|
|
1313
|
+
//#region ../../node_modules/.pnpm/@floating-ui+react@0.27.19_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@floating-ui/react/dist/floating-ui.react.mjs
|
|
1314
|
+
function jn(e, t) {
|
|
1315
|
+
let n = e.compareDocumentPosition(t);
|
|
1316
|
+
return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
|
|
1317
|
+
}
|
|
1318
|
+
var Mn = /* @__PURE__ */ B.createContext({
|
|
1319
|
+
register: () => {},
|
|
1320
|
+
unregister: () => {},
|
|
1321
|
+
map: /* @__PURE__ */ new Map(),
|
|
1322
|
+
elementsRef: { current: [] }
|
|
1323
|
+
});
|
|
1324
|
+
function Nn(e) {
|
|
1325
|
+
let { children: t, elementsRef: n, labelsRef: r } = e, [i, a] = B.useState(() => /* @__PURE__ */ new Set()), o = B.useCallback((e) => {
|
|
1326
|
+
a((t) => new Set(t).add(e));
|
|
1327
|
+
}, []), s = B.useCallback((e) => {
|
|
1328
|
+
a((t) => {
|
|
1329
|
+
let n = new Set(t);
|
|
1330
|
+
return n.delete(e), n;
|
|
1331
|
+
});
|
|
1332
|
+
}, []), c = B.useMemo(() => {
|
|
1333
|
+
let e = /* @__PURE__ */ new Map();
|
|
1334
|
+
return Array.from(i.keys()).sort(jn).forEach((t, n) => {
|
|
1335
|
+
e.set(t, n);
|
|
1336
|
+
}), e;
|
|
1337
|
+
}, [i]);
|
|
1338
|
+
return /* @__PURE__ */ H(Mn.Provider, {
|
|
1339
|
+
value: B.useMemo(() => ({
|
|
1340
|
+
register: o,
|
|
1341
|
+
unregister: s,
|
|
1342
|
+
map: c,
|
|
1343
|
+
elementsRef: n,
|
|
1344
|
+
labelsRef: r
|
|
1345
|
+
}), [
|
|
1346
|
+
o,
|
|
1347
|
+
s,
|
|
1348
|
+
c,
|
|
1349
|
+
n,
|
|
1350
|
+
r
|
|
1351
|
+
]),
|
|
1352
|
+
children: t
|
|
1353
|
+
});
|
|
1354
|
+
}
|
|
1355
|
+
function Pn(e) {
|
|
1356
|
+
e === void 0 && (e = {});
|
|
1357
|
+
let { label: t } = e, { register: n, unregister: r, map: i, elementsRef: a, labelsRef: o } = B.useContext(Mn), [s, c] = B.useState(null), l = B.useRef(null), u = B.useCallback((e) => {
|
|
1358
|
+
if (l.current = e, s !== null && (a.current[s] = e, o)) {
|
|
1359
|
+
let n = t !== void 0;
|
|
1360
|
+
o.current[s] = n ? t : e?.textContent ?? null;
|
|
1361
|
+
}
|
|
1362
|
+
}, [
|
|
1363
|
+
s,
|
|
1364
|
+
a,
|
|
1365
|
+
o,
|
|
1366
|
+
t
|
|
1367
|
+
]);
|
|
1368
|
+
return Y(() => {
|
|
1369
|
+
let e = l.current;
|
|
1370
|
+
if (e) return n(e), () => {
|
|
1371
|
+
r(e);
|
|
1372
|
+
};
|
|
1373
|
+
}, [n, r]), Y(() => {
|
|
1374
|
+
let e = l.current ? i.get(l.current) : null;
|
|
1375
|
+
e != null && c(e);
|
|
1376
|
+
}, [i]), B.useMemo(() => ({
|
|
1377
|
+
ref: u,
|
|
1378
|
+
index: s ?? -1
|
|
1379
|
+
}), [s, u]);
|
|
1380
|
+
}
|
|
1381
|
+
var Fn = "data-floating-ui-focusable", In = "active", Ln = "selected", Rn = "ArrowLeft", zn = "ArrowRight", Bn = "ArrowUp", Vn = "ArrowDown", Hn = [Rn, zn], Un = [Bn, Vn];
|
|
1382
|
+
[...Hn, ...Un];
|
|
1383
|
+
var Wn = { ...B }, Gn = !1, Kn = 0, qn = () => "floating-ui-" + Math.random().toString(36).slice(2, 6) + Kn++;
|
|
1384
|
+
function Jn() {
|
|
1385
|
+
let [e, t] = B.useState(() => Gn ? qn() : void 0);
|
|
1386
|
+
return Y(() => {
|
|
1387
|
+
e ?? t(qn());
|
|
1388
|
+
}, []), B.useEffect(() => {
|
|
1389
|
+
Gn = !0;
|
|
1390
|
+
}, []), e;
|
|
1391
|
+
}
|
|
1392
|
+
var Yn = Wn.useId || Jn, Xn;
|
|
1393
|
+
process.env.NODE_ENV !== "production" && (Xn = /* @__PURE__ */ new Set());
|
|
1394
|
+
function Zn() {
|
|
1395
|
+
var e;
|
|
1396
|
+
let t = "Floating UI: " + [...arguments].join(" ");
|
|
1397
|
+
if (!((e = Xn) != null && e.has(t))) {
|
|
1398
|
+
var n;
|
|
1399
|
+
(n = Xn) == null || n.add(t), console.warn(t);
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
function Qn() {
|
|
1403
|
+
var e;
|
|
1404
|
+
let t = "Floating UI: " + [...arguments].join(" ");
|
|
1405
|
+
if (!((e = Xn) != null && e.has(t))) {
|
|
1406
|
+
var n;
|
|
1407
|
+
(n = Xn) == null || n.add(t), console.error(t);
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
var $n = /* @__PURE__ */ B.forwardRef(function(e, t) {
|
|
1411
|
+
let { context: { placement: n, elements: { floating: r }, middlewareData: { arrow: i, shift: a } }, width: o = 14, height: s = 7, tipRadius: c = 0, strokeWidth: l = 0, staticOffset: u, stroke: d, d: f, style: { transform: m, ...h } = {}, ...g } = e;
|
|
1412
|
+
process.env.NODE_ENV !== "production" && (t || Zn("The `ref` prop is required for `FloatingArrow`."));
|
|
1413
|
+
let _ = Yn(), [v, y] = B.useState(!1);
|
|
1414
|
+
if (Y(() => {
|
|
1415
|
+
r && p(r).direction === "rtl" && y(!0);
|
|
1416
|
+
}, [r]), !r) return null;
|
|
1417
|
+
let [b, x] = n.split("-"), S = b === "top" || b === "bottom", C = u;
|
|
1418
|
+
(S && a != null && a.x || !S && a != null && a.y) && (C = null);
|
|
1419
|
+
let w = l * 2, T = w / 2, E = o / 2 * (c / -8 + 1), D = s / 2 * c / 4, O = !!f, k = C && x === "end" ? "bottom" : "top", A = C && x === "end" ? "right" : "left";
|
|
1420
|
+
C && v && (A = x === "end" ? "left" : "right");
|
|
1421
|
+
let j = i?.x == null ? "" : C || i.x, M = i?.y == null ? "" : C || i.y, N = f || "M0,0" + (" H" + o) + (" L" + (o - E) + "," + (s - D)) + (" Q" + o / 2 + "," + s + " " + E + "," + (s - D)) + " Z", P = {
|
|
1422
|
+
top: O ? "rotate(180deg)" : "",
|
|
1423
|
+
left: O ? "rotate(90deg)" : "rotate(-90deg)",
|
|
1424
|
+
bottom: O ? "" : "rotate(180deg)",
|
|
1425
|
+
right: O ? "rotate(-90deg)" : "rotate(90deg)"
|
|
1426
|
+
}[b];
|
|
1427
|
+
return /* @__PURE__ */ te("svg", {
|
|
1428
|
+
...g,
|
|
1429
|
+
"aria-hidden": !0,
|
|
1430
|
+
ref: t,
|
|
1431
|
+
width: O ? o : o + w,
|
|
1432
|
+
height: o,
|
|
1433
|
+
viewBox: "0 0 " + o + " " + (s > o ? s : o),
|
|
1434
|
+
style: {
|
|
1435
|
+
position: "absolute",
|
|
1436
|
+
pointerEvents: "none",
|
|
1437
|
+
[A]: j,
|
|
1438
|
+
[k]: M,
|
|
1439
|
+
[b]: S || O ? "100%" : "calc(100% - " + w / 2 + "px)",
|
|
1440
|
+
transform: [P, m].filter((e) => !!e).join(" "),
|
|
1441
|
+
...h
|
|
1442
|
+
},
|
|
1443
|
+
children: [
|
|
1444
|
+
w > 0 && /* @__PURE__ */ H("path", {
|
|
1445
|
+
clipPath: "url(#" + _ + ")",
|
|
1446
|
+
fill: "none",
|
|
1447
|
+
stroke: d,
|
|
1448
|
+
strokeWidth: w + +!f,
|
|
1449
|
+
d: N
|
|
1450
|
+
}),
|
|
1451
|
+
/* @__PURE__ */ H("path", {
|
|
1452
|
+
stroke: w && !f ? g.fill : "none",
|
|
1453
|
+
d: N
|
|
1454
|
+
}),
|
|
1455
|
+
/* @__PURE__ */ H("clipPath", {
|
|
1456
|
+
id: _,
|
|
1457
|
+
children: /* @__PURE__ */ H("rect", {
|
|
1458
|
+
x: -T,
|
|
1459
|
+
y: T * (O ? -1 : 1),
|
|
1460
|
+
width: o + w,
|
|
1461
|
+
height: o
|
|
1462
|
+
})
|
|
1463
|
+
})
|
|
1464
|
+
]
|
|
1465
|
+
});
|
|
1466
|
+
});
|
|
1467
|
+
function er() {
|
|
1468
|
+
let e = /* @__PURE__ */ new Map();
|
|
1469
|
+
return {
|
|
1470
|
+
emit(t, n) {
|
|
1471
|
+
var r;
|
|
1472
|
+
(r = e.get(t)) == null || r.forEach((e) => e(n));
|
|
1473
|
+
},
|
|
1474
|
+
on(t, n) {
|
|
1475
|
+
e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t).add(n);
|
|
1476
|
+
},
|
|
1477
|
+
off(t, n) {
|
|
1478
|
+
var r;
|
|
1479
|
+
(r = e.get(t)) == null || r.delete(n);
|
|
1480
|
+
}
|
|
1481
|
+
};
|
|
1482
|
+
}
|
|
1483
|
+
var tr = /* @__PURE__ */ B.createContext(null), nr = /* @__PURE__ */ B.createContext(null), rr = () => B.useContext(tr)?.id || null, ir = () => B.useContext(nr);
|
|
1484
|
+
function ar(e) {
|
|
1485
|
+
let t = Yn(), n = ir(), r = rr(), i = e || r;
|
|
1486
|
+
return Y(() => {
|
|
1487
|
+
if (!t) return;
|
|
1488
|
+
let e = {
|
|
1489
|
+
id: t,
|
|
1490
|
+
parentId: i
|
|
1491
|
+
};
|
|
1492
|
+
return n?.addNode(e), () => {
|
|
1493
|
+
n?.removeNode(e);
|
|
1494
|
+
};
|
|
1495
|
+
}, [
|
|
1496
|
+
n,
|
|
1497
|
+
t,
|
|
1498
|
+
i
|
|
1499
|
+
]), t;
|
|
1500
|
+
}
|
|
1501
|
+
function or(e) {
|
|
1502
|
+
let { children: t, id: n } = e, r = rr();
|
|
1503
|
+
return /* @__PURE__ */ H(tr.Provider, {
|
|
1504
|
+
value: B.useMemo(() => ({
|
|
1505
|
+
id: n,
|
|
1506
|
+
parentId: r
|
|
1507
|
+
}), [n, r]),
|
|
1508
|
+
children: t
|
|
1509
|
+
});
|
|
1510
|
+
}
|
|
1511
|
+
function sr(e) {
|
|
1512
|
+
let { children: t } = e, n = B.useRef([]), r = B.useCallback((e) => {
|
|
1513
|
+
n.current = [...n.current, e];
|
|
1514
|
+
}, []), i = B.useCallback((e) => {
|
|
1515
|
+
n.current = n.current.filter((t) => t !== e);
|
|
1516
|
+
}, []), [a] = B.useState(() => er());
|
|
1517
|
+
return /* @__PURE__ */ H(nr.Provider, {
|
|
1518
|
+
value: B.useMemo(() => ({
|
|
1519
|
+
nodesRef: n,
|
|
1520
|
+
addNode: r,
|
|
1521
|
+
removeNode: i,
|
|
1522
|
+
events: a
|
|
1523
|
+
}), [
|
|
1524
|
+
r,
|
|
1525
|
+
i,
|
|
1526
|
+
a
|
|
1527
|
+
]),
|
|
1528
|
+
children: t
|
|
1529
|
+
});
|
|
1530
|
+
}
|
|
1531
|
+
function cr(e) {
|
|
1532
|
+
return "data-floating-ui-" + e;
|
|
1533
|
+
}
|
|
1534
|
+
function $(e) {
|
|
1535
|
+
e.current !== -1 && (clearTimeout(e.current), e.current = -1);
|
|
1536
|
+
}
|
|
1537
|
+
var lr = /* @__PURE__ */ cr("safe-polygon");
|
|
1538
|
+
function ur(e, t, n) {
|
|
1539
|
+
if (n && !nt(n)) return 0;
|
|
1540
|
+
if (typeof e == "number") return e;
|
|
1541
|
+
if (typeof e == "function") {
|
|
1542
|
+
let n = e();
|
|
1543
|
+
return typeof n == "number" ? n : n?.[t];
|
|
1544
|
+
}
|
|
1545
|
+
return e?.[t];
|
|
1546
|
+
}
|
|
1547
|
+
function dr(e) {
|
|
1548
|
+
return typeof e == "function" ? e() : e;
|
|
1549
|
+
}
|
|
1550
|
+
function fr(e, t) {
|
|
1551
|
+
t === void 0 && (t = {});
|
|
1552
|
+
let { open: n, onOpenChange: r, dataRef: i, events: a, elements: o } = e, { enabled: s = !0, delay: l = 0, handleClose: u = null, mouseOnly: d = !1, restMs: f = 0, move: p = !0 } = t, m = ir(), h = rr(), g = X(u), _ = X(l), v = X(n), y = X(f), b = B.useRef(), x = B.useRef(-1), S = B.useRef(), C = B.useRef(-1), w = B.useRef(!0), T = B.useRef(!1), E = B.useRef(() => {}), D = B.useRef(!1), O = Z(() => {
|
|
1553
|
+
let e = i.current.openEvent?.type;
|
|
1554
|
+
return e?.includes("mouse") && e !== "mousedown";
|
|
1555
|
+
});
|
|
1556
|
+
B.useEffect(() => {
|
|
1557
|
+
if (!s) return;
|
|
1558
|
+
function e(e) {
|
|
1559
|
+
let { open: t } = e;
|
|
1560
|
+
t || ($(x), $(C), w.current = !0, D.current = !1);
|
|
1561
|
+
}
|
|
1562
|
+
return a.on("openchange", e), () => {
|
|
1563
|
+
a.off("openchange", e);
|
|
1564
|
+
};
|
|
1565
|
+
}, [s, a]), B.useEffect(() => {
|
|
1566
|
+
if (!s || !g.current || !n) return;
|
|
1567
|
+
function e(e) {
|
|
1568
|
+
O() && r(!1, e, "hover");
|
|
1569
|
+
}
|
|
1570
|
+
let t = q(o.floating).documentElement;
|
|
1571
|
+
return t.addEventListener("mouseleave", e), () => {
|
|
1572
|
+
t.removeEventListener("mouseleave", e);
|
|
1573
|
+
};
|
|
1574
|
+
}, [
|
|
1575
|
+
o.floating,
|
|
1576
|
+
n,
|
|
1577
|
+
r,
|
|
1578
|
+
s,
|
|
1579
|
+
g,
|
|
1580
|
+
O
|
|
1581
|
+
]);
|
|
1582
|
+
let k = B.useCallback(function(e, t, n) {
|
|
1583
|
+
t === void 0 && (t = !0), n === void 0 && (n = "hover");
|
|
1584
|
+
let i = ur(_.current, "close", b.current);
|
|
1585
|
+
i && !S.current ? ($(x), x.current = window.setTimeout(() => r(!1, e, n), i)) : t && ($(x), r(!1, e, n));
|
|
1586
|
+
}, [_, r]), A = Z(() => {
|
|
1587
|
+
E.current(), S.current = void 0;
|
|
1588
|
+
}), j = Z(() => {
|
|
1589
|
+
if (T.current) {
|
|
1590
|
+
let e = q(o.floating).body;
|
|
1591
|
+
e.style.pointerEvents = "", e.removeAttribute(lr), T.current = !1;
|
|
1592
|
+
}
|
|
1593
|
+
}), M = Z(() => i.current.openEvent ? ["click", "mousedown"].includes(i.current.openEvent.type) : !1);
|
|
1594
|
+
B.useEffect(() => {
|
|
1595
|
+
if (!s) return;
|
|
1596
|
+
function e(e) {
|
|
1597
|
+
if ($(x), w.current = !1, d && !nt(b.current) || dr(y.current) > 0 && !ur(_.current, "open")) return;
|
|
1598
|
+
let t = ur(_.current, "open", b.current);
|
|
1599
|
+
t ? x.current = window.setTimeout(() => {
|
|
1600
|
+
v.current || r(!0, e, "hover");
|
|
1601
|
+
}, t) : n || r(!0, e, "hover");
|
|
1602
|
+
}
|
|
1603
|
+
function t(e) {
|
|
1604
|
+
if (M()) {
|
|
1605
|
+
j();
|
|
1606
|
+
return;
|
|
1607
|
+
}
|
|
1608
|
+
E.current();
|
|
1609
|
+
let t = q(o.floating);
|
|
1610
|
+
if ($(C), D.current = !1, g.current && i.current.floatingContext) {
|
|
1611
|
+
n || $(x), S.current = g.current({
|
|
1612
|
+
...i.current.floatingContext,
|
|
1613
|
+
tree: m,
|
|
1614
|
+
x: e.clientX,
|
|
1615
|
+
y: e.clientY,
|
|
1616
|
+
onClose() {
|
|
1617
|
+
j(), A(), M() || k(e, !0, "safe-polygon");
|
|
1618
|
+
}
|
|
1619
|
+
});
|
|
1620
|
+
let r = S.current;
|
|
1621
|
+
t.addEventListener("mousemove", r), E.current = () => {
|
|
1622
|
+
t.removeEventListener("mousemove", r);
|
|
1623
|
+
};
|
|
1624
|
+
return;
|
|
1625
|
+
}
|
|
1626
|
+
(b.current !== "touch" || !K(o.floating, e.relatedTarget)) && k(e);
|
|
1627
|
+
}
|
|
1628
|
+
function a(e) {
|
|
1629
|
+
M() || i.current.floatingContext && (g.current == null || g.current({
|
|
1630
|
+
...i.current.floatingContext,
|
|
1631
|
+
tree: m,
|
|
1632
|
+
x: e.clientX,
|
|
1633
|
+
y: e.clientY,
|
|
1634
|
+
onClose() {
|
|
1635
|
+
j(), A(), M() || k(e);
|
|
1636
|
+
}
|
|
1637
|
+
})(e));
|
|
1638
|
+
}
|
|
1639
|
+
function l() {
|
|
1640
|
+
$(x);
|
|
1641
|
+
}
|
|
1642
|
+
function u(e) {
|
|
1643
|
+
M() || k(e, !1);
|
|
1644
|
+
}
|
|
1645
|
+
if (c(o.domReference)) {
|
|
1646
|
+
let r = o.domReference, i = o.floating;
|
|
1647
|
+
return n && r.addEventListener("mouseleave", a), p && r.addEventListener("mousemove", e, { once: !0 }), r.addEventListener("mouseenter", e), r.addEventListener("mouseleave", t), i && (i.addEventListener("mouseleave", a), i.addEventListener("mouseenter", l), i.addEventListener("mouseleave", u)), () => {
|
|
1648
|
+
n && r.removeEventListener("mouseleave", a), p && r.removeEventListener("mousemove", e), r.removeEventListener("mouseenter", e), r.removeEventListener("mouseleave", t), i && (i.removeEventListener("mouseleave", a), i.removeEventListener("mouseenter", l), i.removeEventListener("mouseleave", u));
|
|
1649
|
+
};
|
|
1650
|
+
}
|
|
1651
|
+
}, [
|
|
1652
|
+
o,
|
|
1653
|
+
s,
|
|
1654
|
+
e,
|
|
1655
|
+
d,
|
|
1656
|
+
p,
|
|
1657
|
+
k,
|
|
1658
|
+
A,
|
|
1659
|
+
j,
|
|
1660
|
+
r,
|
|
1661
|
+
n,
|
|
1662
|
+
v,
|
|
1663
|
+
m,
|
|
1664
|
+
_,
|
|
1665
|
+
g,
|
|
1666
|
+
i,
|
|
1667
|
+
M,
|
|
1668
|
+
y
|
|
1669
|
+
]), Y(() => {
|
|
1670
|
+
var e;
|
|
1671
|
+
if (s && n && (e = g.current) != null && (e = e.__options) != null && e.blockPointerEvents && O()) {
|
|
1672
|
+
T.current = !0;
|
|
1673
|
+
let e = o.floating;
|
|
1674
|
+
if (c(o.domReference) && e) {
|
|
1675
|
+
var t;
|
|
1676
|
+
let n = q(o.floating).body;
|
|
1677
|
+
n.setAttribute(lr, "");
|
|
1678
|
+
let r = o.domReference, i = m == null || (t = m.nodesRef.current.find((e) => e.id === h)) == null || (t = t.context) == null ? void 0 : t.elements.floating;
|
|
1679
|
+
return i && (i.style.pointerEvents = ""), n.style.pointerEvents = "none", r.style.pointerEvents = "auto", e.style.pointerEvents = "auto", () => {
|
|
1680
|
+
n.style.pointerEvents = "", r.style.pointerEvents = "", e.style.pointerEvents = "";
|
|
1681
|
+
};
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
}, [
|
|
1685
|
+
s,
|
|
1686
|
+
n,
|
|
1687
|
+
h,
|
|
1688
|
+
o,
|
|
1689
|
+
m,
|
|
1690
|
+
g,
|
|
1691
|
+
O
|
|
1692
|
+
]), Y(() => {
|
|
1693
|
+
n || (b.current = void 0, D.current = !1, A(), j());
|
|
1694
|
+
}, [
|
|
1695
|
+
n,
|
|
1696
|
+
A,
|
|
1697
|
+
j
|
|
1698
|
+
]), B.useEffect(() => () => {
|
|
1699
|
+
A(), $(x), $(C), j();
|
|
1700
|
+
}, [
|
|
1701
|
+
s,
|
|
1702
|
+
o.domReference,
|
|
1703
|
+
A,
|
|
1704
|
+
j
|
|
1705
|
+
]);
|
|
1706
|
+
let N = B.useMemo(() => {
|
|
1707
|
+
function e(e) {
|
|
1708
|
+
b.current = e.pointerType;
|
|
1709
|
+
}
|
|
1710
|
+
return {
|
|
1711
|
+
onPointerDown: e,
|
|
1712
|
+
onPointerEnter: e,
|
|
1713
|
+
onMouseMove(e) {
|
|
1714
|
+
let { nativeEvent: t } = e;
|
|
1715
|
+
function i() {
|
|
1716
|
+
!w.current && !v.current && r(!0, t, "hover");
|
|
1717
|
+
}
|
|
1718
|
+
d && !nt(b.current) || n || dr(y.current) === 0 || D.current && e.movementX ** 2 + e.movementY ** 2 < 2 || ($(C), b.current === "touch" ? i() : (D.current = !0, C.current = window.setTimeout(i, dr(y.current))));
|
|
1719
|
+
}
|
|
1720
|
+
};
|
|
1721
|
+
}, [
|
|
1722
|
+
d,
|
|
1723
|
+
r,
|
|
1724
|
+
n,
|
|
1725
|
+
v,
|
|
1726
|
+
y
|
|
1727
|
+
]);
|
|
1728
|
+
return B.useMemo(() => s ? { reference: N } : {}, [s, N]);
|
|
1729
|
+
}
|
|
1730
|
+
var pr = 0;
|
|
1731
|
+
function mr(e, t) {
|
|
1732
|
+
t === void 0 && (t = {});
|
|
1733
|
+
let { preventScroll: n = !1, cancelPrevious: r = !0, sync: i = !1 } = t;
|
|
1734
|
+
r && cancelAnimationFrame(pr);
|
|
1735
|
+
let a = () => e?.focus({ preventScroll: n });
|
|
1736
|
+
i ? a() : pr = requestAnimationFrame(a);
|
|
1737
|
+
}
|
|
1738
|
+
function hr(e, t) {
|
|
1739
|
+
if (!e || !t) return !1;
|
|
1740
|
+
let n = t.getRootNode == null ? void 0 : t.getRootNode();
|
|
1741
|
+
if (e.contains(t)) return !0;
|
|
1742
|
+
if (n && s(n)) {
|
|
1743
|
+
let n = t;
|
|
1744
|
+
for (; n;) {
|
|
1745
|
+
if (e === n) return !0;
|
|
1746
|
+
n = n.parentNode || n.host;
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
return !1;
|
|
1750
|
+
}
|
|
1751
|
+
function gr(e) {
|
|
1752
|
+
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
1753
|
+
}
|
|
1754
|
+
function _r(e) {
|
|
1755
|
+
return e?.ownerDocument || document;
|
|
1756
|
+
}
|
|
1757
|
+
var vr = {
|
|
1758
|
+
inert: /* @__PURE__ */ new WeakMap(),
|
|
1759
|
+
"aria-hidden": /* @__PURE__ */ new WeakMap(),
|
|
1760
|
+
none: /* @__PURE__ */ new WeakMap()
|
|
1761
|
+
};
|
|
1762
|
+
function yr(e) {
|
|
1763
|
+
return e === "inert" ? vr.inert : e === "aria-hidden" ? vr["aria-hidden"] : vr.none;
|
|
1764
|
+
}
|
|
1765
|
+
var br = /* @__PURE__ */ new WeakSet(), xr = {}, Sr = 0, Cr = () => typeof HTMLElement < "u" && "inert" in HTMLElement.prototype;
|
|
1766
|
+
function wr(e) {
|
|
1767
|
+
return e ? s(e) ? e.host : wr(e.parentNode) : null;
|
|
1768
|
+
}
|
|
1769
|
+
var Tr = (e, t) => t.map((t) => {
|
|
1770
|
+
if (e.contains(t)) return t;
|
|
1771
|
+
let n = wr(t);
|
|
1772
|
+
return e.contains(n) ? n : null;
|
|
1773
|
+
}).filter((e) => e != null);
|
|
1774
|
+
function Er(e, t, n, r) {
|
|
1775
|
+
let a = "data-floating-ui-inert", o = r ? "inert" : n ? "aria-hidden" : null, s = Tr(t, e), c = /* @__PURE__ */ new Set(), l = new Set(s), u = [];
|
|
1776
|
+
xr[a] || (xr[a] = /* @__PURE__ */ new WeakMap());
|
|
1777
|
+
let d = xr[a];
|
|
1778
|
+
s.forEach(f), p(t), c.clear();
|
|
1779
|
+
function f(e) {
|
|
1780
|
+
!e || c.has(e) || (c.add(e), e.parentNode && f(e.parentNode));
|
|
1781
|
+
}
|
|
1782
|
+
function p(e) {
|
|
1783
|
+
!e || l.has(e) || [].forEach.call(e.children, (e) => {
|
|
1784
|
+
if (i(e) !== "script") if (c.has(e)) p(e);
|
|
1785
|
+
else {
|
|
1786
|
+
let t = o ? e.getAttribute(o) : null, n = t !== null && t !== "false", r = yr(o), i = (r.get(e) || 0) + 1, s = (d.get(e) || 0) + 1;
|
|
1787
|
+
r.set(e, i), d.set(e, s), u.push(e), i === 1 && n && br.add(e), s === 1 && e.setAttribute(a, ""), !n && o && e.setAttribute(o, o === "inert" ? "" : "true");
|
|
1788
|
+
}
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1791
|
+
return Sr++, () => {
|
|
1792
|
+
u.forEach((e) => {
|
|
1793
|
+
let t = yr(o), n = (t.get(e) || 0) - 1, r = (d.get(e) || 0) - 1;
|
|
1794
|
+
t.set(e, n), d.set(e, r), n || (!br.has(e) && o && e.removeAttribute(o), br.delete(e)), r || e.removeAttribute(a);
|
|
1795
|
+
}), Sr--, Sr || (vr.inert = /* @__PURE__ */ new WeakMap(), vr["aria-hidden"] = /* @__PURE__ */ new WeakMap(), vr.none = /* @__PURE__ */ new WeakMap(), br = /* @__PURE__ */ new WeakSet(), xr = {});
|
|
1796
|
+
};
|
|
1797
|
+
}
|
|
1798
|
+
function Dr(e, t, n) {
|
|
1799
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1800
|
+
let r = _r(e[0]).body;
|
|
1801
|
+
return Er(e.concat(Array.from(r.querySelectorAll("[aria-live],[role=\"status\"],output"))), r, t, n);
|
|
1802
|
+
}
|
|
1803
|
+
var Or = {
|
|
1804
|
+
border: 0,
|
|
1805
|
+
clip: "rect(0 0 0 0)",
|
|
1806
|
+
height: "1px",
|
|
1807
|
+
margin: "-1px",
|
|
1808
|
+
overflow: "hidden",
|
|
1809
|
+
padding: 0,
|
|
1810
|
+
position: "fixed",
|
|
1811
|
+
whiteSpace: "nowrap",
|
|
1812
|
+
width: "1px",
|
|
1813
|
+
top: 0,
|
|
1814
|
+
left: 0
|
|
1815
|
+
}, kr = /* @__PURE__ */ B.forwardRef(function(e, t) {
|
|
1816
|
+
let [n, r] = B.useState();
|
|
1817
|
+
Y(() => {
|
|
1818
|
+
Ne() && r("button");
|
|
1819
|
+
}, []);
|
|
1820
|
+
let i = {
|
|
1821
|
+
ref: t,
|
|
1822
|
+
tabIndex: 0,
|
|
1823
|
+
role: n,
|
|
1824
|
+
"aria-hidden": n ? void 0 : !0,
|
|
1825
|
+
[cr("focus-guard")]: "",
|
|
1826
|
+
style: Or
|
|
1827
|
+
};
|
|
1828
|
+
return /* @__PURE__ */ H("span", {
|
|
1829
|
+
...e,
|
|
1830
|
+
...i
|
|
1831
|
+
});
|
|
1832
|
+
}), Ar = {
|
|
1833
|
+
clipPath: "inset(50%)",
|
|
1834
|
+
position: "fixed",
|
|
1835
|
+
top: 0,
|
|
1836
|
+
left: 0
|
|
1837
|
+
}, jr = /* @__PURE__ */ B.createContext(null), Mr = /* @__PURE__ */ cr("portal");
|
|
1838
|
+
function Nr(e) {
|
|
1839
|
+
e === void 0 && (e = {});
|
|
1840
|
+
let { id: t, root: n } = e, r = Yn(), i = Fr(), [o, s] = B.useState(null), c = B.useRef(null);
|
|
1841
|
+
return Y(() => () => {
|
|
1842
|
+
o?.remove(), queueMicrotask(() => {
|
|
1843
|
+
c.current = null;
|
|
1844
|
+
});
|
|
1845
|
+
}, [o]), Y(() => {
|
|
1846
|
+
if (!r || c.current) return;
|
|
1847
|
+
let e = t ? document.getElementById(t) : null;
|
|
1848
|
+
if (!e) return;
|
|
1849
|
+
let n = document.createElement("div");
|
|
1850
|
+
n.id = r, n.setAttribute(Mr, ""), e.appendChild(n), c.current = n, s(n);
|
|
1851
|
+
}, [t, r]), Y(() => {
|
|
1852
|
+
if (n === null || !r || c.current) return;
|
|
1853
|
+
let e = n || i?.portalNode;
|
|
1854
|
+
e && !a(e) && (e = e.current), e ||= document.body;
|
|
1855
|
+
let o = null;
|
|
1856
|
+
t && (o = document.createElement("div"), o.id = t, e.appendChild(o));
|
|
1857
|
+
let l = document.createElement("div");
|
|
1858
|
+
l.id = r, l.setAttribute(Mr, ""), e = o || e, e.appendChild(l), c.current = l, s(l);
|
|
1859
|
+
}, [
|
|
1860
|
+
t,
|
|
1861
|
+
n,
|
|
1862
|
+
r,
|
|
1863
|
+
i
|
|
1864
|
+
]), o;
|
|
1865
|
+
}
|
|
1866
|
+
function Pr(e) {
|
|
1867
|
+
let { children: t, id: n, root: r, preserveTabOrder: i = !0 } = e, a = Nr({
|
|
1868
|
+
id: n,
|
|
1869
|
+
root: r
|
|
1870
|
+
}), [o, s] = B.useState(null), c = B.useRef(null), l = B.useRef(null), u = B.useRef(null), d = B.useRef(null), f = o?.modal, p = o?.open, m = !!o && !o.modal && o.open && i && !!(r || a);
|
|
1871
|
+
return B.useEffect(() => {
|
|
1872
|
+
if (!a || !i || f) return;
|
|
1873
|
+
function e(e) {
|
|
1874
|
+
a && vt(e) && (e.type === "focusin" ? bt : yt)(a);
|
|
1875
|
+
}
|
|
1876
|
+
return a.addEventListener("focusin", e, !0), a.addEventListener("focusout", e, !0), () => {
|
|
1877
|
+
a.removeEventListener("focusin", e, !0), a.removeEventListener("focusout", e, !0);
|
|
1878
|
+
};
|
|
1879
|
+
}, [
|
|
1880
|
+
a,
|
|
1881
|
+
i,
|
|
1882
|
+
f
|
|
1883
|
+
]), B.useEffect(() => {
|
|
1884
|
+
a && (p || bt(a));
|
|
1885
|
+
}, [p, a]), /* @__PURE__ */ te(jr.Provider, {
|
|
1886
|
+
value: B.useMemo(() => ({
|
|
1887
|
+
preserveTabOrder: i,
|
|
1888
|
+
beforeOutsideRef: c,
|
|
1889
|
+
afterOutsideRef: l,
|
|
1890
|
+
beforeInsideRef: u,
|
|
1891
|
+
afterInsideRef: d,
|
|
1892
|
+
portalNode: a,
|
|
1893
|
+
setFocusManagerState: s
|
|
1894
|
+
}), [i, a]),
|
|
1895
|
+
children: [
|
|
1896
|
+
m && a && /* @__PURE__ */ H(kr, {
|
|
1897
|
+
"data-type": "outside",
|
|
1898
|
+
ref: c,
|
|
1899
|
+
onFocus: (e) => {
|
|
1900
|
+
if (vt(e, a)) {
|
|
1901
|
+
var t;
|
|
1902
|
+
(t = u.current) == null || t.focus();
|
|
1903
|
+
} else _t(o ? o.domReference : null)?.focus();
|
|
1904
|
+
}
|
|
1905
|
+
}),
|
|
1906
|
+
m && a && /* @__PURE__ */ H("span", {
|
|
1907
|
+
"aria-owns": a.id,
|
|
1908
|
+
style: Ar
|
|
1909
|
+
}),
|
|
1910
|
+
a && /* @__PURE__ */ U.createPortal(t, a),
|
|
1911
|
+
m && a && /* @__PURE__ */ H(kr, {
|
|
1912
|
+
"data-type": "outside",
|
|
1913
|
+
ref: l,
|
|
1914
|
+
onFocus: (e) => {
|
|
1915
|
+
if (vt(e, a)) {
|
|
1916
|
+
var t;
|
|
1917
|
+
(t = d.current) == null || t.focus();
|
|
1918
|
+
} else gt(o ? o.domReference : null)?.focus(), o != null && o.closeOnFocusOut && o?.onOpenChange(!1, e.nativeEvent, "focus-out");
|
|
1919
|
+
}
|
|
1920
|
+
})
|
|
1921
|
+
]
|
|
1922
|
+
});
|
|
1923
|
+
}
|
|
1924
|
+
var Fr = () => B.useContext(jr);
|
|
1925
|
+
function Ir(e) {
|
|
1926
|
+
return B.useMemo(() => (t) => {
|
|
1927
|
+
e.forEach((e) => {
|
|
1928
|
+
e && (e.current = t);
|
|
1929
|
+
});
|
|
1930
|
+
}, e);
|
|
1931
|
+
}
|
|
1932
|
+
var Lr = 20, Rr = [];
|
|
1933
|
+
function zr() {
|
|
1934
|
+
Rr = Rr.filter((e) => e.deref()?.isConnected);
|
|
1935
|
+
}
|
|
1936
|
+
function Br(e) {
|
|
1937
|
+
zr(), e && i(e) !== "body" && (Rr.push(new WeakRef(e)), Rr.length > Lr && (Rr = Rr.slice(-20)));
|
|
1938
|
+
}
|
|
1939
|
+
function Vr() {
|
|
1940
|
+
return zr(), Rr[Rr.length - 1]?.deref();
|
|
1941
|
+
}
|
|
1942
|
+
function Hr(e) {
|
|
1943
|
+
let t = mt();
|
|
1944
|
+
return Ae(e, t) ? e : Oe(e, t)[0] || e;
|
|
1945
|
+
}
|
|
1946
|
+
function Ur(e, t) {
|
|
1947
|
+
var n;
|
|
1948
|
+
if (!t.current.includes("floating") && !((n = e.getAttribute("role")) != null && n.includes("dialog"))) return;
|
|
1949
|
+
let r = mt(), i = ke(e, r).filter((e) => {
|
|
1950
|
+
let t = e.getAttribute("data-tabindex") || "";
|
|
1951
|
+
return Ae(e, r) || e.hasAttribute("data-tabindex") && !t.startsWith("-");
|
|
1952
|
+
}), a = e.getAttribute("tabindex");
|
|
1953
|
+
t.current.includes("floating") || i.length === 0 ? a !== "0" && e.setAttribute("tabindex", "0") : (a !== "-1" || e.hasAttribute("data-tabindex") && e.getAttribute("data-tabindex") !== "-1") && (e.setAttribute("tabindex", "-1"), e.setAttribute("data-tabindex", "-1"));
|
|
1954
|
+
}
|
|
1955
|
+
var Wr = /* @__PURE__ */ B.forwardRef(function(e, t) {
|
|
1956
|
+
return /* @__PURE__ */ H("button", {
|
|
1957
|
+
...e,
|
|
1958
|
+
type: "button",
|
|
1959
|
+
ref: t,
|
|
1960
|
+
tabIndex: -1,
|
|
1961
|
+
style: Or
|
|
1962
|
+
});
|
|
1963
|
+
});
|
|
1964
|
+
function Gr(e) {
|
|
1965
|
+
let { context: t, children: n, disabled: r = !1, order: i = ["content"], guards: a = !0, initialFocus: o = 0, returnFocus: s = !0, restoreFocus: c = !1, modal: u = !0, visuallyHiddenDismiss: d = !1, closeOnFocusOut: f = !0, outsideElementsInert: p = !1, getInsideElements: m = () => [] } = e, { open: h, onOpenChange: g, events: _, dataRef: v, elements: { domReference: y, floating: b } } = t, x = Z(() => v.current.floatingContext?.nodeId), S = Z(m), C = typeof o == "number" && o < 0, w = qe(y) && C, T = Cr(), E = T ? a : !0, D = !E || T && p, O = X(i), k = X(o), A = X(s), j = ir(), M = Fr(), N = B.useRef(null), P = B.useRef(null), F = B.useRef(!1), I = B.useRef(!1), L = B.useRef(-1), R = B.useRef(-1), z = M != null, V = Ye(b), U = Z(function(e) {
|
|
1966
|
+
return e === void 0 && (e = V), e ? Oe(e, mt()) : [];
|
|
1967
|
+
}), W = Z((e) => {
|
|
1968
|
+
let t = U(e);
|
|
1969
|
+
return O.current.map((e) => y && e === "reference" ? y : V && e === "floating" ? V : t).filter(Boolean).flat();
|
|
1970
|
+
});
|
|
1971
|
+
B.useEffect(() => {
|
|
1972
|
+
if (r || !u) return;
|
|
1973
|
+
function e(e) {
|
|
1974
|
+
if (e.key === "Tab") {
|
|
1975
|
+
K(V, G(q(V))) && U().length === 0 && !w && J(e);
|
|
1976
|
+
let t = W(), n = Ue(e);
|
|
1977
|
+
O.current[0] === "reference" && n === y && (J(e), e.shiftKey ? mr(t[t.length - 1]) : mr(t[1])), O.current[1] === "floating" && n === V && e.shiftKey && (J(e), mr(t[0]));
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
let t = q(V);
|
|
1981
|
+
return t.addEventListener("keydown", e), () => {
|
|
1982
|
+
t.removeEventListener("keydown", e);
|
|
1983
|
+
};
|
|
1984
|
+
}, [
|
|
1985
|
+
r,
|
|
1986
|
+
y,
|
|
1987
|
+
V,
|
|
1988
|
+
u,
|
|
1989
|
+
O,
|
|
1990
|
+
w,
|
|
1991
|
+
U,
|
|
1992
|
+
W
|
|
1993
|
+
]), B.useEffect(() => {
|
|
1994
|
+
if (r || !b) return;
|
|
1995
|
+
function e(e) {
|
|
1996
|
+
let t = Ue(e), n = U().indexOf(t);
|
|
1997
|
+
n !== -1 && (L.current = n);
|
|
1998
|
+
}
|
|
1999
|
+
return b.addEventListener("focusin", e), () => {
|
|
2000
|
+
b.removeEventListener("focusin", e);
|
|
2001
|
+
};
|
|
2002
|
+
}, [
|
|
2003
|
+
r,
|
|
2004
|
+
b,
|
|
2005
|
+
U
|
|
2006
|
+
]), B.useEffect(() => {
|
|
2007
|
+
if (r || !f) return;
|
|
2008
|
+
function e() {
|
|
2009
|
+
I.current = !0, setTimeout(() => {
|
|
2010
|
+
I.current = !1;
|
|
2011
|
+
});
|
|
2012
|
+
}
|
|
2013
|
+
function t(e) {
|
|
2014
|
+
let t = e.relatedTarget, n = e.currentTarget, r = Ue(e);
|
|
2015
|
+
queueMicrotask(() => {
|
|
2016
|
+
let i = x(), a = !(K(y, t) || K(b, t) || K(t, b) || K(M?.portalNode, t) || t != null && t.hasAttribute(cr("focus-guard")) || j && (Xe(j.nodesRef.current, i).find((e) => K(e.context?.elements.floating, t) || K(e.context?.elements.domReference, t)) || Qe(j.nodesRef.current, i).find((e) => [e.context?.elements.floating, Ye(e.context?.elements.floating)].includes(t) || e.context?.elements.domReference === t)));
|
|
2017
|
+
if (n === y && V && Ur(V, O), c && n !== y && !(r != null && r.isConnected) && G(q(V)) === q(V).body) {
|
|
2018
|
+
l(V) && V.focus();
|
|
2019
|
+
let e = L.current, t = U(), n = t[e] || t[t.length - 1] || V;
|
|
2020
|
+
l(n) && n.focus();
|
|
2021
|
+
}
|
|
2022
|
+
if (v.current.insideReactTree) {
|
|
2023
|
+
v.current.insideReactTree = !1;
|
|
2024
|
+
return;
|
|
2025
|
+
}
|
|
2026
|
+
(w || !u) && t && a && !I.current && t !== Vr() && (F.current = !0, g(!1, e, "focus-out"));
|
|
2027
|
+
});
|
|
2028
|
+
}
|
|
2029
|
+
let n = !!(!j && M);
|
|
2030
|
+
function i() {
|
|
2031
|
+
$(R), v.current.insideReactTree = !0, R.current = window.setTimeout(() => {
|
|
2032
|
+
v.current.insideReactTree = !1;
|
|
2033
|
+
});
|
|
2034
|
+
}
|
|
2035
|
+
if (b && l(y)) return y.addEventListener("focusout", t), y.addEventListener("pointerdown", e), b.addEventListener("focusout", t), n && b.addEventListener("focusout", i, !0), () => {
|
|
2036
|
+
y.removeEventListener("focusout", t), y.removeEventListener("pointerdown", e), b.removeEventListener("focusout", t), n && b.removeEventListener("focusout", i, !0);
|
|
2037
|
+
};
|
|
2038
|
+
}, [
|
|
2039
|
+
r,
|
|
2040
|
+
y,
|
|
2041
|
+
b,
|
|
2042
|
+
V,
|
|
2043
|
+
u,
|
|
2044
|
+
j,
|
|
2045
|
+
M,
|
|
2046
|
+
g,
|
|
2047
|
+
f,
|
|
2048
|
+
c,
|
|
2049
|
+
U,
|
|
2050
|
+
w,
|
|
2051
|
+
x,
|
|
2052
|
+
O,
|
|
2053
|
+
v
|
|
2054
|
+
]);
|
|
2055
|
+
let ne = B.useRef(null), re = B.useRef(null), ie = Ir([ne, M?.beforeInsideRef]), ae = Ir([re, M?.afterInsideRef]);
|
|
2056
|
+
B.useEffect(() => {
|
|
2057
|
+
var e, t;
|
|
2058
|
+
if (r || !b) return;
|
|
2059
|
+
let n = Array.from((M == null || (e = M.portalNode) == null ? void 0 : e.querySelectorAll("[" + cr("portal") + "]")) || []), i = [
|
|
2060
|
+
b,
|
|
2061
|
+
(t = (j ? Qe(j.nodesRef.current, x()) : []).find((e) => qe(e.context?.elements.domReference || null))) == null || (t = t.context) == null ? void 0 : t.elements.domReference,
|
|
2062
|
+
...n,
|
|
2063
|
+
...S(),
|
|
2064
|
+
N.current,
|
|
2065
|
+
P.current,
|
|
2066
|
+
ne.current,
|
|
2067
|
+
re.current,
|
|
2068
|
+
M?.beforeOutsideRef.current,
|
|
2069
|
+
M?.afterOutsideRef.current,
|
|
2070
|
+
O.current.includes("reference") || w ? y : null
|
|
2071
|
+
].filter((e) => e != null), a = u || w ? Dr(i, !D, D) : Dr(i);
|
|
2072
|
+
return () => {
|
|
2073
|
+
a();
|
|
2074
|
+
};
|
|
2075
|
+
}, [
|
|
2076
|
+
r,
|
|
2077
|
+
y,
|
|
2078
|
+
b,
|
|
2079
|
+
u,
|
|
2080
|
+
O,
|
|
2081
|
+
M,
|
|
2082
|
+
w,
|
|
2083
|
+
E,
|
|
2084
|
+
D,
|
|
2085
|
+
j,
|
|
2086
|
+
x,
|
|
2087
|
+
S
|
|
2088
|
+
]), Y(() => {
|
|
2089
|
+
if (r || !l(V)) return;
|
|
2090
|
+
let e = G(q(V));
|
|
2091
|
+
queueMicrotask(() => {
|
|
2092
|
+
let t = W(V), n = k.current, r = (typeof n == "number" ? t[n] : n.current) || V, i = K(V, e);
|
|
2093
|
+
!C && !i && h && mr(r, { preventScroll: r === V });
|
|
2094
|
+
});
|
|
2095
|
+
}, [
|
|
2096
|
+
r,
|
|
2097
|
+
h,
|
|
2098
|
+
V,
|
|
2099
|
+
C,
|
|
2100
|
+
W,
|
|
2101
|
+
k
|
|
2102
|
+
]), Y(() => {
|
|
2103
|
+
if (r || !V) return;
|
|
2104
|
+
let e = q(V);
|
|
2105
|
+
Br(G(e));
|
|
2106
|
+
function t(e) {
|
|
2107
|
+
let { reason: t, event: n, nested: r } = e;
|
|
2108
|
+
if (["hover", "safe-polygon"].includes(t) && n.type === "mouseleave" && (F.current = !0), t === "outside-press") if (r) F.current = !1;
|
|
2109
|
+
else if (et(n) || tt(n)) F.current = !1;
|
|
2110
|
+
else {
|
|
2111
|
+
let e = !1;
|
|
2112
|
+
document.createElement("div").focus({ get preventScroll() {
|
|
2113
|
+
return e = !0, !1;
|
|
2114
|
+
} }), e ? F.current = !1 : F.current = !0;
|
|
2115
|
+
}
|
|
2116
|
+
}
|
|
2117
|
+
_.on("openchange", t);
|
|
2118
|
+
let n = e.createElement("span");
|
|
2119
|
+
n.setAttribute("tabindex", "-1"), n.setAttribute("aria-hidden", "true"), Object.assign(n.style, Or), z && y && y.insertAdjacentElement("afterend", n);
|
|
2120
|
+
function i() {
|
|
2121
|
+
if (typeof A.current == "boolean") {
|
|
2122
|
+
let e = y || Vr();
|
|
2123
|
+
return e && e.isConnected ? e : n;
|
|
2124
|
+
}
|
|
2125
|
+
return A.current.current || n;
|
|
2126
|
+
}
|
|
2127
|
+
return () => {
|
|
2128
|
+
_.off("openchange", t);
|
|
2129
|
+
let r = G(e), a = K(b, r) || j && Xe(j.nodesRef.current, x(), !1).some((e) => K(e.context?.elements.floating, r)), o = i();
|
|
2130
|
+
queueMicrotask(() => {
|
|
2131
|
+
let t = Hr(o);
|
|
2132
|
+
A.current && !F.current && l(t) && (!(t !== r && r !== e.body) || a) && t.focus({ preventScroll: !0 }), n.remove();
|
|
2133
|
+
});
|
|
2134
|
+
};
|
|
2135
|
+
}, [
|
|
2136
|
+
r,
|
|
2137
|
+
b,
|
|
2138
|
+
V,
|
|
2139
|
+
A,
|
|
2140
|
+
v,
|
|
2141
|
+
_,
|
|
2142
|
+
j,
|
|
2143
|
+
z,
|
|
2144
|
+
y,
|
|
2145
|
+
x
|
|
2146
|
+
]), B.useEffect(() => (queueMicrotask(() => {
|
|
2147
|
+
F.current = !1;
|
|
2148
|
+
}), () => {
|
|
2149
|
+
queueMicrotask(zr);
|
|
2150
|
+
}), [r]), Y(() => {
|
|
2151
|
+
if (!r && M) return M.setFocusManagerState({
|
|
2152
|
+
modal: u,
|
|
2153
|
+
closeOnFocusOut: f,
|
|
2154
|
+
open: h,
|
|
2155
|
+
onOpenChange: g,
|
|
2156
|
+
domReference: y
|
|
2157
|
+
}), () => {
|
|
2158
|
+
M.setFocusManagerState(null);
|
|
2159
|
+
};
|
|
2160
|
+
}, [
|
|
2161
|
+
r,
|
|
2162
|
+
M,
|
|
2163
|
+
u,
|
|
2164
|
+
h,
|
|
2165
|
+
g,
|
|
2166
|
+
f,
|
|
2167
|
+
y
|
|
2168
|
+
]), Y(() => {
|
|
2169
|
+
r || V && Ur(V, O);
|
|
2170
|
+
}, [
|
|
2171
|
+
r,
|
|
2172
|
+
V,
|
|
2173
|
+
O
|
|
2174
|
+
]);
|
|
2175
|
+
function oe(e) {
|
|
2176
|
+
return r || !d || !u ? null : /* @__PURE__ */ H(Wr, {
|
|
2177
|
+
ref: e === "start" ? N : P,
|
|
2178
|
+
onClick: (e) => g(!1, e.nativeEvent),
|
|
2179
|
+
children: typeof d == "string" ? d : "Dismiss"
|
|
2180
|
+
});
|
|
2181
|
+
}
|
|
2182
|
+
let se = !r && E && (u ? !w : !0) && (z || u);
|
|
2183
|
+
return /* @__PURE__ */ te(ee, { children: [
|
|
2184
|
+
se && /* @__PURE__ */ H(kr, {
|
|
2185
|
+
"data-type": "inside",
|
|
2186
|
+
ref: ie,
|
|
2187
|
+
onFocus: (e) => {
|
|
2188
|
+
if (u) {
|
|
2189
|
+
let e = W();
|
|
2190
|
+
mr(i[0] === "reference" ? e[0] : e[e.length - 1]);
|
|
2191
|
+
} else if (M != null && M.preserveTabOrder && M.portalNode) if (F.current = !1, vt(e, M.portalNode)) gt(y)?.focus();
|
|
2192
|
+
else {
|
|
2193
|
+
var t;
|
|
2194
|
+
(t = M.beforeOutsideRef.current) == null || t.focus();
|
|
2195
|
+
}
|
|
2196
|
+
}
|
|
2197
|
+
}),
|
|
2198
|
+
!w && oe("start"),
|
|
2199
|
+
n,
|
|
2200
|
+
oe("end"),
|
|
2201
|
+
se && /* @__PURE__ */ H(kr, {
|
|
2202
|
+
"data-type": "inside",
|
|
2203
|
+
ref: ae,
|
|
2204
|
+
onFocus: (e) => {
|
|
2205
|
+
if (u) mr(W()[0]);
|
|
2206
|
+
else if (M != null && M.preserveTabOrder && M.portalNode) if (f && (F.current = !0), vt(e, M.portalNode)) _t(y)?.focus();
|
|
2207
|
+
else {
|
|
2208
|
+
var t;
|
|
2209
|
+
(t = M.afterOutsideRef.current) == null || t.focus();
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
})
|
|
2213
|
+
] });
|
|
2214
|
+
}
|
|
2215
|
+
var Kr = 0, qr = "--floating-ui-scrollbar-width";
|
|
2216
|
+
function Jr() {
|
|
2217
|
+
let e = je(), t = /iP(hone|ad|od)|iOS/.test(e) || e === "MacIntel" && navigator.maxTouchPoints > 1, n = document.body.style, r = Math.round(document.documentElement.getBoundingClientRect().left) + document.documentElement.scrollLeft ? "paddingLeft" : "paddingRight", i = window.innerWidth - document.documentElement.clientWidth, a = n.left ? parseFloat(n.left) : window.scrollX, o = n.top ? parseFloat(n.top) : window.scrollY;
|
|
2218
|
+
if (n.overflow = "hidden", n.setProperty(qr, i + "px"), i && (n[r] = i + "px"), t) {
|
|
2219
|
+
let e = window.visualViewport?.offsetLeft || 0, t = window.visualViewport?.offsetTop || 0;
|
|
2220
|
+
Object.assign(n, {
|
|
2221
|
+
position: "fixed",
|
|
2222
|
+
top: -(o - Math.floor(t)) + "px",
|
|
2223
|
+
left: -(a - Math.floor(e)) + "px",
|
|
2224
|
+
right: "0"
|
|
2225
|
+
});
|
|
2226
|
+
}
|
|
2227
|
+
return () => {
|
|
2228
|
+
Object.assign(n, {
|
|
2229
|
+
overflow: "",
|
|
2230
|
+
[r]: ""
|
|
2231
|
+
}), n.removeProperty(qr), t && (Object.assign(n, {
|
|
2232
|
+
position: "",
|
|
2233
|
+
top: "",
|
|
2234
|
+
left: "",
|
|
2235
|
+
right: ""
|
|
2236
|
+
}), window.scrollTo(a, o));
|
|
2237
|
+
};
|
|
2238
|
+
}
|
|
2239
|
+
var Yr = () => {}, Xr = /* @__PURE__ */ B.forwardRef(function(e, t) {
|
|
2240
|
+
let { lockScroll: n = !1, ...r } = e;
|
|
2241
|
+
return Y(() => {
|
|
2242
|
+
if (n) return Kr++, Kr === 1 && (Yr = Jr()), () => {
|
|
2243
|
+
Kr--, Kr === 0 && Yr();
|
|
2244
|
+
};
|
|
2245
|
+
}, [n]), /* @__PURE__ */ H("div", {
|
|
2246
|
+
ref: t,
|
|
2247
|
+
...r,
|
|
2248
|
+
style: {
|
|
2249
|
+
position: "fixed",
|
|
2250
|
+
overflow: "auto",
|
|
2251
|
+
top: 0,
|
|
2252
|
+
right: 0,
|
|
2253
|
+
bottom: 0,
|
|
2254
|
+
left: 0,
|
|
2255
|
+
...r.style
|
|
2256
|
+
}
|
|
2257
|
+
});
|
|
2258
|
+
});
|
|
2259
|
+
function Zr(e) {
|
|
2260
|
+
return l(e.target) && e.target.tagName === "BUTTON";
|
|
2261
|
+
}
|
|
2262
|
+
function Qr(e) {
|
|
2263
|
+
return l(e.target) && e.target.tagName === "A";
|
|
2264
|
+
}
|
|
2265
|
+
function $r(e) {
|
|
2266
|
+
return Ke(e);
|
|
2267
|
+
}
|
|
2268
|
+
function ei(e, t) {
|
|
2269
|
+
t === void 0 && (t = {});
|
|
2270
|
+
let { open: n, onOpenChange: r, dataRef: i, elements: { domReference: a } } = e, { enabled: o = !0, event: s = "click", toggle: c = !0, ignoreMouse: l = !1, keyboardHandlers: u = !0, stickIfOpen: d = !0 } = t, f = B.useRef(), p = B.useRef(!1), m = B.useMemo(() => ({
|
|
2271
|
+
onPointerDown(e) {
|
|
2272
|
+
f.current = e.pointerType;
|
|
2273
|
+
},
|
|
2274
|
+
onMouseDown(e) {
|
|
2275
|
+
let t = f.current;
|
|
2276
|
+
e.button === 0 && s !== "click" && (nt(t, !0) && l || (n && c && (!(i.current.openEvent && d) || i.current.openEvent.type === "mousedown") ? r(!1, e.nativeEvent, "click") : (e.preventDefault(), r(!0, e.nativeEvent, "click"))));
|
|
2277
|
+
},
|
|
2278
|
+
onClick(e) {
|
|
2279
|
+
let t = f.current;
|
|
2280
|
+
if (s === "mousedown" && f.current) {
|
|
2281
|
+
f.current = void 0;
|
|
2282
|
+
return;
|
|
2283
|
+
}
|
|
2284
|
+
nt(t, !0) && l || (n && c && (!(i.current.openEvent && d) || i.current.openEvent.type === "click") ? r(!1, e.nativeEvent, "click") : r(!0, e.nativeEvent, "click"));
|
|
2285
|
+
},
|
|
2286
|
+
onKeyDown(e) {
|
|
2287
|
+
f.current = void 0, !(e.defaultPrevented || !u || Zr(e)) && (e.key === " " && !$r(a) && (e.preventDefault(), p.current = !0), !Qr(e) && e.key === "Enter" && r(!(n && c), e.nativeEvent, "click"));
|
|
2288
|
+
},
|
|
2289
|
+
onKeyUp(e) {
|
|
2290
|
+
e.defaultPrevented || !u || Zr(e) || $r(a) || e.key === " " && p.current && (p.current = !1, r(!(n && c), e.nativeEvent, "click"));
|
|
2291
|
+
}
|
|
2292
|
+
}), [
|
|
2293
|
+
i,
|
|
2294
|
+
a,
|
|
2295
|
+
s,
|
|
2296
|
+
l,
|
|
2297
|
+
u,
|
|
2298
|
+
r,
|
|
2299
|
+
n,
|
|
2300
|
+
d,
|
|
2301
|
+
c
|
|
2302
|
+
]);
|
|
2303
|
+
return B.useMemo(() => o ? { reference: m } : {}, [o, m]);
|
|
2304
|
+
}
|
|
2305
|
+
function ti(e, t) {
|
|
2306
|
+
let n = null, r = null, i = !1;
|
|
2307
|
+
return {
|
|
2308
|
+
contextElement: e || void 0,
|
|
2309
|
+
getBoundingClientRect() {
|
|
2310
|
+
let a = e?.getBoundingClientRect() || {
|
|
2311
|
+
width: 0,
|
|
2312
|
+
height: 0,
|
|
2313
|
+
x: 0,
|
|
2314
|
+
y: 0
|
|
2315
|
+
}, o = t.axis === "x" || t.axis === "both", s = t.axis === "y" || t.axis === "both", c = ["mouseenter", "mousemove"].includes(t.dataRef.current.openEvent?.type || "") && t.pointerType !== "touch", l = a.width, u = a.height, d = a.x, f = a.y;
|
|
2316
|
+
return n == null && t.x && o && (n = a.x - t.x), r == null && t.y && s && (r = a.y - t.y), d -= n || 0, f -= r || 0, l = 0, u = 0, !i || c ? (l = t.axis === "y" ? a.width : 0, u = t.axis === "x" ? a.height : 0, d = o && t.x != null ? t.x : d, f = s && t.y != null ? t.y : f) : i && !c && (u = t.axis === "x" ? a.height : u, l = t.axis === "y" ? a.width : l), i = !0, {
|
|
2317
|
+
width: l,
|
|
2318
|
+
height: u,
|
|
2319
|
+
x: d,
|
|
2320
|
+
y: f,
|
|
2321
|
+
top: f,
|
|
2322
|
+
right: d + l,
|
|
2323
|
+
bottom: f + u,
|
|
2324
|
+
left: d
|
|
2325
|
+
};
|
|
2326
|
+
}
|
|
2327
|
+
};
|
|
2328
|
+
}
|
|
2329
|
+
function ni(e) {
|
|
2330
|
+
return e != null && e.clientX != null;
|
|
2331
|
+
}
|
|
2332
|
+
function ri(t, n) {
|
|
2333
|
+
n === void 0 && (n = {});
|
|
2334
|
+
let { open: r, dataRef: i, elements: { floating: a, domReference: o }, refs: s } = t, { enabled: c = !0, axis: l = "both", x: u = null, y: d = null } = n, f = B.useRef(!1), p = B.useRef(null), [m, h] = B.useState(), [g, _] = B.useState([]), v = Z((e, t) => {
|
|
2335
|
+
f.current || i.current.openEvent && !ni(i.current.openEvent) || s.setPositionReference(ti(o, {
|
|
2336
|
+
x: e,
|
|
2337
|
+
y: t,
|
|
2338
|
+
axis: l,
|
|
2339
|
+
dataRef: i,
|
|
2340
|
+
pointerType: m
|
|
2341
|
+
}));
|
|
2342
|
+
}), y = Z((e) => {
|
|
2343
|
+
u != null || d != null || (r ? p.current || _([]) : v(e.clientX, e.clientY));
|
|
2344
|
+
}), b = nt(m) ? a : r, x = B.useCallback(() => {
|
|
2345
|
+
if (!b || !c || u != null || d != null) return;
|
|
2346
|
+
let t = e(a);
|
|
2347
|
+
function n(e) {
|
|
2348
|
+
K(a, Ue(e)) ? (t.removeEventListener("mousemove", n), p.current = null) : v(e.clientX, e.clientY);
|
|
2349
|
+
}
|
|
2350
|
+
if (!i.current.openEvent || ni(i.current.openEvent)) {
|
|
2351
|
+
t.addEventListener("mousemove", n);
|
|
2352
|
+
let e = () => {
|
|
2353
|
+
t.removeEventListener("mousemove", n), p.current = null;
|
|
2354
|
+
};
|
|
2355
|
+
return p.current = e, e;
|
|
2356
|
+
}
|
|
2357
|
+
s.setPositionReference(o);
|
|
2358
|
+
}, [
|
|
2359
|
+
b,
|
|
2360
|
+
c,
|
|
2361
|
+
u,
|
|
2362
|
+
d,
|
|
2363
|
+
a,
|
|
2364
|
+
i,
|
|
2365
|
+
s,
|
|
2366
|
+
o,
|
|
2367
|
+
v
|
|
2368
|
+
]);
|
|
2369
|
+
B.useEffect(() => x(), [x, g]), B.useEffect(() => {
|
|
2370
|
+
c && !a && (f.current = !1);
|
|
2371
|
+
}, [c, a]), B.useEffect(() => {
|
|
2372
|
+
!c && r && (f.current = !0);
|
|
2373
|
+
}, [c, r]), Y(() => {
|
|
2374
|
+
c && (u != null || d != null) && (f.current = !1, v(u, d));
|
|
2375
|
+
}, [
|
|
2376
|
+
c,
|
|
2377
|
+
u,
|
|
2378
|
+
d,
|
|
2379
|
+
v
|
|
2380
|
+
]);
|
|
2381
|
+
let S = B.useMemo(() => {
|
|
2382
|
+
function e(e) {
|
|
2383
|
+
let { pointerType: t } = e;
|
|
2384
|
+
h(t);
|
|
2385
|
+
}
|
|
2386
|
+
return {
|
|
2387
|
+
onPointerDown: e,
|
|
2388
|
+
onPointerEnter: e,
|
|
2389
|
+
onMouseMove: y,
|
|
2390
|
+
onMouseEnter: y
|
|
2391
|
+
};
|
|
2392
|
+
}, [y]);
|
|
2393
|
+
return B.useMemo(() => c ? { reference: S } : {}, [c, S]);
|
|
2394
|
+
}
|
|
2395
|
+
var ii = {
|
|
2396
|
+
pointerdown: "onPointerDown",
|
|
2397
|
+
mousedown: "onMouseDown",
|
|
2398
|
+
click: "onClick"
|
|
2399
|
+
}, ai = {
|
|
2400
|
+
pointerdown: "onPointerDownCapture",
|
|
2401
|
+
mousedown: "onMouseDownCapture",
|
|
2402
|
+
click: "onClickCapture"
|
|
2403
|
+
}, oi = (e) => ({
|
|
2404
|
+
escapeKey: typeof e == "boolean" ? e : e?.escapeKey ?? !1,
|
|
2405
|
+
outsidePress: typeof e == "boolean" ? e : e?.outsidePress ?? !0
|
|
2406
|
+
});
|
|
2407
|
+
function si(e, n) {
|
|
2408
|
+
n === void 0 && (n = {});
|
|
2409
|
+
let { open: r, onOpenChange: i, elements: a, dataRef: o } = e, { enabled: s = !0, escapeKey: f = !0, outsidePress: m = !0, outsidePressEvent: h = "pointerdown", referencePress: g = !1, referencePressEvent: _ = "pointerdown", ancestorScroll: v = !1, bubbles: y, capture: b } = n, x = ir(), S = Z(typeof m == "function" ? m : () => !1), C = typeof m == "function" ? S : m, w = B.useRef(!1), { escapeKey: E, outsidePress: D } = oi(y), { escapeKey: O, outsidePress: k } = oi(b), A = B.useRef(!1), j = Z((e) => {
|
|
2410
|
+
if (!r || !s || !f || e.key !== "Escape" || A.current) return;
|
|
2411
|
+
let t = o.current.floatingContext?.nodeId, n = x ? Xe(x.nodesRef.current, t) : [];
|
|
2412
|
+
if (!E && (e.stopPropagation(), n.length > 0)) {
|
|
2413
|
+
let e = !0;
|
|
2414
|
+
if (n.forEach((t) => {
|
|
2415
|
+
var n;
|
|
2416
|
+
if ((n = t.context) != null && n.open && !t.context.dataRef.current.__escapeKeyBubbles) {
|
|
2417
|
+
e = !1;
|
|
2418
|
+
return;
|
|
2419
|
+
}
|
|
2420
|
+
}), !e) return;
|
|
2421
|
+
}
|
|
2422
|
+
i(!1, $e(e) ? e.nativeEvent : e, "escape-key");
|
|
2423
|
+
}), M = Z((e) => {
|
|
2424
|
+
var t;
|
|
2425
|
+
let n = () => {
|
|
2426
|
+
var t;
|
|
2427
|
+
j(e), (t = Ue(e)) == null || t.removeEventListener("keydown", n);
|
|
2428
|
+
};
|
|
2429
|
+
(t = Ue(e)) == null || t.addEventListener("keydown", n);
|
|
2430
|
+
}), N = Z((e) => {
|
|
2431
|
+
let t = o.current.insideReactTree;
|
|
2432
|
+
o.current.insideReactTree = !1;
|
|
2433
|
+
let n = w.current;
|
|
2434
|
+
if (w.current = !1, h === "click" && n || t || typeof C == "function" && !C(e)) return;
|
|
2435
|
+
let r = Ue(e), s = "[" + cr("inert") + "]", u = q(a.floating).querySelectorAll(s), f = c(r) ? r : null;
|
|
2436
|
+
for (; f && !d(f);) {
|
|
2437
|
+
let e = T(f);
|
|
2438
|
+
if (d(e) || !c(e)) break;
|
|
2439
|
+
f = e;
|
|
2440
|
+
}
|
|
2441
|
+
if (u.length && c(r) && !Ge(r) && !K(r, a.floating) && Array.from(u).every((e) => !K(f, e))) return;
|
|
2442
|
+
if (l(r) && I) {
|
|
2443
|
+
let t = d(r), n = p(r), i = /auto|scroll/, a = t || i.test(n.overflowX), o = t || i.test(n.overflowY), s = a && r.clientWidth > 0 && r.scrollWidth > r.clientWidth, c = o && r.clientHeight > 0 && r.scrollHeight > r.clientHeight, l = n.direction === "rtl", u = c && (l ? e.offsetX <= r.offsetWidth - r.clientWidth : e.offsetX > r.clientWidth), f = s && e.offsetY > r.clientHeight;
|
|
2444
|
+
if (u || f) return;
|
|
2445
|
+
}
|
|
2446
|
+
let m = o.current.floatingContext?.nodeId, g = x && Xe(x.nodesRef.current, m).some((t) => We(e, t.context?.elements.floating));
|
|
2447
|
+
if (We(e, a.floating) || We(e, a.domReference) || g) return;
|
|
2448
|
+
let _ = x ? Xe(x.nodesRef.current, m) : [];
|
|
2449
|
+
if (_.length > 0) {
|
|
2450
|
+
let e = !0;
|
|
2451
|
+
if (_.forEach((t) => {
|
|
2452
|
+
var n;
|
|
2453
|
+
if ((n = t.context) != null && n.open && !t.context.dataRef.current.__outsidePressBubbles) {
|
|
2454
|
+
e = !1;
|
|
2455
|
+
return;
|
|
2456
|
+
}
|
|
2457
|
+
}), !e) return;
|
|
2458
|
+
}
|
|
2459
|
+
i(!1, e, "outside-press");
|
|
2460
|
+
}), P = Z((e) => {
|
|
2461
|
+
var t;
|
|
2462
|
+
let n = () => {
|
|
2463
|
+
var t;
|
|
2464
|
+
N(e), (t = Ue(e)) == null || t.removeEventListener(h, n);
|
|
2465
|
+
};
|
|
2466
|
+
(t = Ue(e)) == null || t.addEventListener(h, n);
|
|
2467
|
+
});
|
|
2468
|
+
B.useEffect(() => {
|
|
2469
|
+
if (!r || !s) return;
|
|
2470
|
+
o.current.__escapeKeyBubbles = E, o.current.__outsidePressBubbles = D;
|
|
2471
|
+
let e = -1;
|
|
2472
|
+
function n(e) {
|
|
2473
|
+
i(!1, e, "ancestor-scroll");
|
|
2474
|
+
}
|
|
2475
|
+
function l() {
|
|
2476
|
+
window.clearTimeout(e), A.current = !0;
|
|
2477
|
+
}
|
|
2478
|
+
function d() {
|
|
2479
|
+
e = window.setTimeout(() => {
|
|
2480
|
+
A.current = !1;
|
|
2481
|
+
}, t() ? 5 : 0);
|
|
2482
|
+
}
|
|
2483
|
+
let p = q(a.floating);
|
|
2484
|
+
f && (p.addEventListener("keydown", O ? M : j, O), p.addEventListener("compositionstart", l), p.addEventListener("compositionend", d)), C && p.addEventListener(h, k ? P : N, k);
|
|
2485
|
+
let m = [];
|
|
2486
|
+
return v && (c(a.domReference) && (m = u(a.domReference)), c(a.floating) && (m = m.concat(u(a.floating))), !c(a.reference) && a.reference && a.reference.contextElement && (m = m.concat(u(a.reference.contextElement)))), m = m.filter((e) => e !== p.defaultView?.visualViewport), m.forEach((e) => {
|
|
2487
|
+
e.addEventListener("scroll", n, { passive: !0 });
|
|
2488
|
+
}), () => {
|
|
2489
|
+
f && (p.removeEventListener("keydown", O ? M : j, O), p.removeEventListener("compositionstart", l), p.removeEventListener("compositionend", d)), C && p.removeEventListener(h, k ? P : N, k), m.forEach((e) => {
|
|
2490
|
+
e.removeEventListener("scroll", n);
|
|
2491
|
+
}), window.clearTimeout(e);
|
|
2492
|
+
};
|
|
2493
|
+
}, [
|
|
2494
|
+
o,
|
|
2495
|
+
a,
|
|
2496
|
+
f,
|
|
2497
|
+
C,
|
|
2498
|
+
h,
|
|
2499
|
+
r,
|
|
2500
|
+
i,
|
|
2501
|
+
v,
|
|
2502
|
+
s,
|
|
2503
|
+
E,
|
|
2504
|
+
D,
|
|
2505
|
+
j,
|
|
2506
|
+
O,
|
|
2507
|
+
M,
|
|
2508
|
+
N,
|
|
2509
|
+
k,
|
|
2510
|
+
P
|
|
2511
|
+
]), B.useEffect(() => {
|
|
2512
|
+
o.current.insideReactTree = !1;
|
|
2513
|
+
}, [
|
|
2514
|
+
o,
|
|
2515
|
+
C,
|
|
2516
|
+
h
|
|
2517
|
+
]);
|
|
2518
|
+
let F = B.useMemo(() => ({
|
|
2519
|
+
onKeyDown: j,
|
|
2520
|
+
...g && {
|
|
2521
|
+
[ii[_]]: (e) => {
|
|
2522
|
+
i(!1, e.nativeEvent, "reference-press");
|
|
2523
|
+
},
|
|
2524
|
+
..._ !== "click" && { onClick(e) {
|
|
2525
|
+
i(!1, e.nativeEvent, "reference-press");
|
|
2526
|
+
} }
|
|
2527
|
+
}
|
|
2528
|
+
}), [
|
|
2529
|
+
j,
|
|
2530
|
+
i,
|
|
2531
|
+
g,
|
|
2532
|
+
_
|
|
2533
|
+
]), I = B.useMemo(() => {
|
|
2534
|
+
function e(e) {
|
|
2535
|
+
e.button === 0 && (w.current = !0);
|
|
2536
|
+
}
|
|
2537
|
+
return {
|
|
2538
|
+
onKeyDown: j,
|
|
2539
|
+
onMouseDown: e,
|
|
2540
|
+
onMouseUp: e,
|
|
2541
|
+
[ai[h]]: () => {
|
|
2542
|
+
o.current.insideReactTree = !0;
|
|
2543
|
+
}
|
|
2544
|
+
};
|
|
2545
|
+
}, [
|
|
2546
|
+
j,
|
|
2547
|
+
h,
|
|
2548
|
+
o
|
|
2549
|
+
]);
|
|
2550
|
+
return B.useMemo(() => s ? {
|
|
2551
|
+
reference: F,
|
|
2552
|
+
floating: I
|
|
2553
|
+
} : {}, [
|
|
2554
|
+
s,
|
|
2555
|
+
F,
|
|
2556
|
+
I
|
|
2557
|
+
]);
|
|
2558
|
+
}
|
|
2559
|
+
function ci(e) {
|
|
2560
|
+
let { open: t = !1, onOpenChange: n, elements: r } = e, i = Yn(), a = B.useRef({}), [o] = B.useState(() => er()), s = rr() != null;
|
|
2561
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2562
|
+
let e = r.reference;
|
|
2563
|
+
e && !c(e) && Qn("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
2564
|
+
}
|
|
2565
|
+
let [l, u] = B.useState(r.reference), d = Z((e, t, r) => {
|
|
2566
|
+
a.current.openEvent = e ? t : void 0, o.emit("openchange", {
|
|
2567
|
+
open: e,
|
|
2568
|
+
event: t,
|
|
2569
|
+
reason: r,
|
|
2570
|
+
nested: s
|
|
2571
|
+
}), n?.(e, t, r);
|
|
2572
|
+
}), f = B.useMemo(() => ({ setPositionReference: u }), []), p = B.useMemo(() => ({
|
|
2573
|
+
reference: l || r.reference || null,
|
|
2574
|
+
floating: r.floating || null,
|
|
2575
|
+
domReference: r.reference
|
|
2576
|
+
}), [
|
|
2577
|
+
l,
|
|
2578
|
+
r.reference,
|
|
2579
|
+
r.floating
|
|
2580
|
+
]);
|
|
2581
|
+
return B.useMemo(() => ({
|
|
2582
|
+
dataRef: a,
|
|
2583
|
+
open: t,
|
|
2584
|
+
onOpenChange: d,
|
|
2585
|
+
elements: p,
|
|
2586
|
+
events: o,
|
|
2587
|
+
floatingId: i,
|
|
2588
|
+
refs: f
|
|
2589
|
+
}), [
|
|
2590
|
+
t,
|
|
2591
|
+
d,
|
|
2592
|
+
p,
|
|
2593
|
+
o,
|
|
2594
|
+
i,
|
|
2595
|
+
f
|
|
2596
|
+
]);
|
|
2597
|
+
}
|
|
2598
|
+
function li(e) {
|
|
2599
|
+
e === void 0 && (e = {});
|
|
2600
|
+
let { nodeId: t } = e, n = ci({
|
|
2601
|
+
...e,
|
|
2602
|
+
elements: {
|
|
2603
|
+
reference: null,
|
|
2604
|
+
floating: null,
|
|
2605
|
+
...e.elements
|
|
2606
|
+
}
|
|
2607
|
+
}), r = e.rootContext || n, i = r.elements, [a, o] = B.useState(null), [s, l] = B.useState(null), u = i?.domReference || a, d = B.useRef(null), f = ir();
|
|
2608
|
+
Y(() => {
|
|
2609
|
+
u && (d.current = u);
|
|
2610
|
+
}, [u]);
|
|
2611
|
+
let p = Cn({
|
|
2612
|
+
...e,
|
|
2613
|
+
elements: {
|
|
2614
|
+
...i,
|
|
2615
|
+
...s && { reference: s }
|
|
2616
|
+
}
|
|
2617
|
+
}), m = B.useCallback((e) => {
|
|
2618
|
+
let t = c(e) ? {
|
|
2619
|
+
getBoundingClientRect: () => e.getBoundingClientRect(),
|
|
2620
|
+
getClientRects: () => e.getClientRects(),
|
|
2621
|
+
contextElement: e
|
|
2622
|
+
} : e;
|
|
2623
|
+
l(t), p.refs.setReference(t);
|
|
2624
|
+
}, [p.refs]), h = B.useCallback((e) => {
|
|
2625
|
+
(c(e) || e === null) && (d.current = e, o(e)), (c(p.refs.reference.current) || p.refs.reference.current === null || e !== null && !c(e)) && p.refs.setReference(e);
|
|
2626
|
+
}, [p.refs]), g = B.useMemo(() => ({
|
|
2627
|
+
...p.refs,
|
|
2628
|
+
setReference: h,
|
|
2629
|
+
setPositionReference: m,
|
|
2630
|
+
domReference: d
|
|
2631
|
+
}), [
|
|
2632
|
+
p.refs,
|
|
2633
|
+
h,
|
|
2634
|
+
m
|
|
2635
|
+
]), _ = B.useMemo(() => ({
|
|
2636
|
+
...p.elements,
|
|
2637
|
+
domReference: u
|
|
2638
|
+
}), [p.elements, u]), v = B.useMemo(() => ({
|
|
2639
|
+
...p,
|
|
2640
|
+
...r,
|
|
2641
|
+
refs: g,
|
|
2642
|
+
elements: _,
|
|
2643
|
+
nodeId: t
|
|
2644
|
+
}), [
|
|
2645
|
+
p,
|
|
2646
|
+
g,
|
|
2647
|
+
_,
|
|
2648
|
+
t,
|
|
2649
|
+
r
|
|
2650
|
+
]);
|
|
2651
|
+
return Y(() => {
|
|
2652
|
+
r.dataRef.current.floatingContext = v;
|
|
2653
|
+
let e = f?.nodesRef.current.find((e) => e.id === t);
|
|
2654
|
+
e && (e.context = v);
|
|
2655
|
+
}), B.useMemo(() => ({
|
|
2656
|
+
...p,
|
|
2657
|
+
context: v,
|
|
2658
|
+
refs: g,
|
|
2659
|
+
elements: _
|
|
2660
|
+
}), [
|
|
2661
|
+
p,
|
|
2662
|
+
g,
|
|
2663
|
+
_,
|
|
2664
|
+
v
|
|
2665
|
+
]);
|
|
2666
|
+
}
|
|
2667
|
+
function ui() {
|
|
2668
|
+
return Fe() && Ne();
|
|
2669
|
+
}
|
|
2670
|
+
function di(t, n) {
|
|
2671
|
+
n === void 0 && (n = {});
|
|
2672
|
+
let { open: r, onOpenChange: i, events: a, dataRef: o, elements: s } = t, { enabled: u = !0, visibleOnly: d = !0 } = n, f = B.useRef(!1), p = B.useRef(-1), m = B.useRef(!0);
|
|
2673
|
+
B.useEffect(() => {
|
|
2674
|
+
if (!u) return;
|
|
2675
|
+
let t = e(s.domReference);
|
|
2676
|
+
function n() {
|
|
2677
|
+
!r && l(s.domReference) && s.domReference === G(q(s.domReference)) && (f.current = !0);
|
|
2678
|
+
}
|
|
2679
|
+
function i() {
|
|
2680
|
+
m.current = !0;
|
|
2681
|
+
}
|
|
2682
|
+
function a() {
|
|
2683
|
+
m.current = !1;
|
|
2684
|
+
}
|
|
2685
|
+
return t.addEventListener("blur", n), ui() && (t.addEventListener("keydown", i, !0), t.addEventListener("pointerdown", a, !0)), () => {
|
|
2686
|
+
t.removeEventListener("blur", n), ui() && (t.removeEventListener("keydown", i, !0), t.removeEventListener("pointerdown", a, !0));
|
|
2687
|
+
};
|
|
2688
|
+
}, [
|
|
2689
|
+
s.domReference,
|
|
2690
|
+
r,
|
|
2691
|
+
u
|
|
2692
|
+
]), B.useEffect(() => {
|
|
2693
|
+
if (!u) return;
|
|
2694
|
+
function e(e) {
|
|
2695
|
+
let { reason: t } = e;
|
|
2696
|
+
(t === "reference-press" || t === "escape-key") && (f.current = !0);
|
|
2697
|
+
}
|
|
2698
|
+
return a.on("openchange", e), () => {
|
|
2699
|
+
a.off("openchange", e);
|
|
2700
|
+
};
|
|
2701
|
+
}, [a, u]), B.useEffect(() => () => {
|
|
2702
|
+
$(p);
|
|
2703
|
+
}, []);
|
|
2704
|
+
let h = B.useMemo(() => ({
|
|
2705
|
+
onMouseLeave() {
|
|
2706
|
+
f.current = !1;
|
|
2707
|
+
},
|
|
2708
|
+
onFocus(e) {
|
|
2709
|
+
if (f.current) return;
|
|
2710
|
+
let t = Ue(e.nativeEvent);
|
|
2711
|
+
if (d && c(t)) {
|
|
2712
|
+
if (ui() && !e.relatedTarget) {
|
|
2713
|
+
if (!m.current && !Ke(t)) return;
|
|
2714
|
+
} else if (!Je(t)) return;
|
|
2715
|
+
}
|
|
2716
|
+
i(!0, e.nativeEvent, "focus");
|
|
2717
|
+
},
|
|
2718
|
+
onBlur(e) {
|
|
2719
|
+
f.current = !1;
|
|
2720
|
+
let t = e.relatedTarget, n = e.nativeEvent, r = c(t) && t.hasAttribute(cr("focus-guard")) && t.getAttribute("data-type") === "outside";
|
|
2721
|
+
p.current = window.setTimeout(() => {
|
|
2722
|
+
let e = G(s.domReference ? s.domReference.ownerDocument : document);
|
|
2723
|
+
!t && e === s.domReference || K(o.current.floatingContext?.refs.floating.current, e) || K(s.domReference, e) || r || i(!1, n, "focus");
|
|
2724
|
+
});
|
|
2725
|
+
}
|
|
2726
|
+
}), [
|
|
2727
|
+
o,
|
|
2728
|
+
s.domReference,
|
|
2729
|
+
i,
|
|
2730
|
+
d
|
|
2731
|
+
]);
|
|
2732
|
+
return B.useMemo(() => u ? { reference: h } : {}, [u, h]);
|
|
2733
|
+
}
|
|
2734
|
+
function fi(e, t, n) {
|
|
2735
|
+
let r = /* @__PURE__ */ new Map(), i = n === "item", a = e;
|
|
2736
|
+
if (i && e) {
|
|
2737
|
+
let { [In]: t, [Ln]: n, ...r } = e;
|
|
2738
|
+
a = r;
|
|
2739
|
+
}
|
|
2740
|
+
return {
|
|
2741
|
+
...n === "floating" && {
|
|
2742
|
+
tabIndex: -1,
|
|
2743
|
+
[Fn]: ""
|
|
2744
|
+
},
|
|
2745
|
+
...a,
|
|
2746
|
+
...t.map((t) => {
|
|
2747
|
+
let r = t ? t[n] : null;
|
|
2748
|
+
return typeof r == "function" ? e ? r(e) : null : r;
|
|
2749
|
+
}).concat(e).reduce((e, t) => (t && Object.entries(t).forEach((t) => {
|
|
2750
|
+
let [n, a] = t;
|
|
2751
|
+
if (!(i && [In, Ln].includes(n))) if (n.indexOf("on") === 0) {
|
|
2752
|
+
if (r.has(n) || r.set(n, []), typeof a == "function") {
|
|
2753
|
+
var o;
|
|
2754
|
+
(o = r.get(n)) == null || o.push(a), e[n] = function() {
|
|
2755
|
+
var e = [...arguments];
|
|
2756
|
+
return r.get(n)?.map((t) => t(...e)).find((e) => e !== void 0);
|
|
2757
|
+
};
|
|
2758
|
+
}
|
|
2759
|
+
} else e[n] = a;
|
|
2760
|
+
}), e), {})
|
|
2761
|
+
};
|
|
2762
|
+
}
|
|
2763
|
+
function pi(e) {
|
|
2764
|
+
e === void 0 && (e = []);
|
|
2765
|
+
let t = e.map((e) => e?.reference), n = e.map((e) => e?.floating), r = e.map((e) => e?.item), i = B.useCallback((t) => fi(t, e, "reference"), t), a = B.useCallback((t) => fi(t, e, "floating"), n), o = B.useCallback((t) => fi(t, e, "item"), r);
|
|
2766
|
+
return B.useMemo(() => ({
|
|
2767
|
+
getReferenceProps: i,
|
|
2768
|
+
getFloatingProps: a,
|
|
2769
|
+
getItemProps: o
|
|
2770
|
+
}), [
|
|
2771
|
+
i,
|
|
2772
|
+
a,
|
|
2773
|
+
o
|
|
2774
|
+
]);
|
|
2775
|
+
}
|
|
2776
|
+
var mi = "Escape";
|
|
2777
|
+
function hi(e, t, n) {
|
|
2778
|
+
switch (e) {
|
|
2779
|
+
case "vertical": return t;
|
|
2780
|
+
case "horizontal": return n;
|
|
2781
|
+
default: return t || n;
|
|
2782
|
+
}
|
|
2783
|
+
}
|
|
2784
|
+
function gi(e, t) {
|
|
2785
|
+
return hi(t, e === Bn || e === Vn, e === Rn || e === zn);
|
|
2786
|
+
}
|
|
2787
|
+
function _i(e, t, n) {
|
|
2788
|
+
return hi(t, e === Vn, n ? e === Rn : e === zn) || e === "Enter" || e === " " || e === "";
|
|
2789
|
+
}
|
|
2790
|
+
function vi(e, t, n) {
|
|
2791
|
+
return hi(t, n ? e === Rn : e === zn, e === Vn);
|
|
2792
|
+
}
|
|
2793
|
+
function yi(e, t, n, r) {
|
|
2794
|
+
return t === "both" || t === "horizontal" && r && r > 1 ? e === mi : hi(t, n ? e === zn : e === Rn, e === Bn);
|
|
2795
|
+
}
|
|
2796
|
+
function bi(e, t) {
|
|
2797
|
+
let { open: n, onOpenChange: r, elements: i, floatingId: a } = e, { listRef: o, activeIndex: s, onNavigate: c = () => {}, enabled: u = !0, selectedIndex: d = null, allowEscape: f = !1, loop: p = !1, nested: m = !1, rtl: h = !1, virtual: g = !1, focusItemOnOpen: _ = "auto", focusItemOnHover: v = !0, openOnArrowKeyDown: y = !0, disabledIndices: b = void 0, orientation: x = "vertical", parentOrientation: S, cols: C = 1, scrollItemIntoView: w = !0, virtualItemRef: T, itemSizes: E, dense: D = !1 } = t;
|
|
2798
|
+
process.env.NODE_ENV !== "production" && (f && (p || Zn("`useListNavigation` looping must be enabled to allow escaping."), g || Zn("`useListNavigation` must be virtual to allow escaping.")), x === "vertical" && C > 1 && Zn("In grid list navigation mode (`cols` > 1), the `orientation` should", "be either \"horizontal\" or \"both\"."));
|
|
2799
|
+
let O = X(Ye(i.floating)), k = rr(), A = ir();
|
|
2800
|
+
Y(() => {
|
|
2801
|
+
e.dataRef.current.orientation = x;
|
|
2802
|
+
}, [e, x]);
|
|
2803
|
+
let j = Z(() => {
|
|
2804
|
+
c(P.current === -1 ? null : P.current);
|
|
2805
|
+
}), M = qe(i.domReference), N = B.useRef(_), P = B.useRef(d ?? -1), F = B.useRef(null), I = B.useRef(!0), L = B.useRef(j), R = B.useRef(!!i.floating), z = B.useRef(n), V = B.useRef(!1), ee = B.useRef(!1), H = X(b), te = X(n), U = X(w), W = X(d), [ne, re] = B.useState(), [ie, ae] = B.useState(), oe = Z(() => {
|
|
2806
|
+
function e(e) {
|
|
2807
|
+
if (g) {
|
|
2808
|
+
var t;
|
|
2809
|
+
(t = e.id) != null && t.endsWith("-fui-option") && (e.id = a + "-" + Math.random().toString(16).slice(2, 10)), re(e.id), A?.events.emit("virtualfocus", e), T && (T.current = e);
|
|
2810
|
+
} else mr(e, {
|
|
2811
|
+
sync: V.current,
|
|
2812
|
+
preventScroll: !0
|
|
2813
|
+
});
|
|
2814
|
+
}
|
|
2815
|
+
let t = o.current[P.current], n = ee.current;
|
|
2816
|
+
t && e(t), (V.current ? (e) => e() : requestAnimationFrame)(() => {
|
|
2817
|
+
let r = o.current[P.current] || t;
|
|
2818
|
+
if (!r) return;
|
|
2819
|
+
t || e(r);
|
|
2820
|
+
let i = U.current;
|
|
2821
|
+
i && ce && (n || !I.current) && (r.scrollIntoView == null || r.scrollIntoView(typeof i == "boolean" ? {
|
|
2822
|
+
block: "nearest",
|
|
2823
|
+
inline: "nearest"
|
|
2824
|
+
} : i));
|
|
2825
|
+
});
|
|
2826
|
+
});
|
|
2827
|
+
Y(() => {
|
|
2828
|
+
u && (n && i.floating ? N.current && d != null && (ee.current = !0, P.current = d, j()) : R.current && (P.current = -1, L.current()));
|
|
2829
|
+
}, [
|
|
2830
|
+
u,
|
|
2831
|
+
n,
|
|
2832
|
+
i.floating,
|
|
2833
|
+
d,
|
|
2834
|
+
j
|
|
2835
|
+
]), Y(() => {
|
|
2836
|
+
if (u && n && i.floating) if (s == null) {
|
|
2837
|
+
if (V.current = !1, W.current != null) return;
|
|
2838
|
+
if (R.current && (P.current = -1, oe()), (!z.current || !R.current) && N.current && (F.current != null || N.current === !0 && F.current == null)) {
|
|
2839
|
+
let e = 0, t = () => {
|
|
2840
|
+
o.current[0] == null ? (e < 2 && (e ? requestAnimationFrame : queueMicrotask)(t), e++) : (P.current = F.current == null || _i(F.current, x, h) || m ? st(o, H.current) : ct(o, H.current), F.current = null, j());
|
|
2841
|
+
};
|
|
2842
|
+
t();
|
|
2843
|
+
}
|
|
2844
|
+
} else ot(o, s) || (P.current = s, oe(), ee.current = !1);
|
|
2845
|
+
}, [
|
|
2846
|
+
u,
|
|
2847
|
+
n,
|
|
2848
|
+
i.floating,
|
|
2849
|
+
s,
|
|
2850
|
+
W,
|
|
2851
|
+
m,
|
|
2852
|
+
o,
|
|
2853
|
+
x,
|
|
2854
|
+
h,
|
|
2855
|
+
j,
|
|
2856
|
+
oe,
|
|
2857
|
+
H
|
|
2858
|
+
]), Y(() => {
|
|
2859
|
+
var e;
|
|
2860
|
+
if (!u || i.floating || !A || g || !R.current) return;
|
|
2861
|
+
let t = A.nodesRef.current, n = (e = t.find((e) => e.id === k)) == null || (e = e.context) == null ? void 0 : e.elements.floating, r = G(q(i.floating)), a = t.some((e) => e.context && K(e.context.elements.floating, r));
|
|
2862
|
+
n && !a && I.current && n.focus({ preventScroll: !0 });
|
|
2863
|
+
}, [
|
|
2864
|
+
u,
|
|
2865
|
+
i.floating,
|
|
2866
|
+
A,
|
|
2867
|
+
k,
|
|
2868
|
+
g
|
|
2869
|
+
]), Y(() => {
|
|
2870
|
+
if (!u || !A || !g || k) return;
|
|
2871
|
+
function e(e) {
|
|
2872
|
+
ae(e.id), T && (T.current = e);
|
|
2873
|
+
}
|
|
2874
|
+
return A.events.on("virtualfocus", e), () => {
|
|
2875
|
+
A.events.off("virtualfocus", e);
|
|
2876
|
+
};
|
|
2877
|
+
}, [
|
|
2878
|
+
u,
|
|
2879
|
+
A,
|
|
2880
|
+
g,
|
|
2881
|
+
k,
|
|
2882
|
+
T
|
|
2883
|
+
]), Y(() => {
|
|
2884
|
+
L.current = j, z.current = n, R.current = !!i.floating;
|
|
2885
|
+
}), Y(() => {
|
|
2886
|
+
n || (F.current = null, N.current = _);
|
|
2887
|
+
}, [n, _]);
|
|
2888
|
+
let se = s != null, ce = B.useMemo(() => {
|
|
2889
|
+
function e(e) {
|
|
2890
|
+
if (!te.current) return;
|
|
2891
|
+
let t = o.current.indexOf(e);
|
|
2892
|
+
t !== -1 && P.current !== t && (P.current = t, j());
|
|
2893
|
+
}
|
|
2894
|
+
return {
|
|
2895
|
+
onFocus(t) {
|
|
2896
|
+
let { currentTarget: n } = t;
|
|
2897
|
+
V.current = !0, e(n);
|
|
2898
|
+
},
|
|
2899
|
+
onClick: (e) => {
|
|
2900
|
+
let { currentTarget: t } = e;
|
|
2901
|
+
return t.focus({ preventScroll: !0 });
|
|
2902
|
+
},
|
|
2903
|
+
onMouseMove(t) {
|
|
2904
|
+
let { currentTarget: n } = t;
|
|
2905
|
+
V.current = !0, ee.current = !1, v && e(n);
|
|
2906
|
+
},
|
|
2907
|
+
onPointerLeave(e) {
|
|
2908
|
+
let { pointerType: t } = e;
|
|
2909
|
+
if (!(!I.current || t === "touch") && (V.current = !0, v && (P.current = -1, j(), !g))) {
|
|
2910
|
+
var n;
|
|
2911
|
+
(n = O.current) == null || n.focus({ preventScroll: !0 });
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
};
|
|
2915
|
+
}, [
|
|
2916
|
+
te,
|
|
2917
|
+
O,
|
|
2918
|
+
v,
|
|
2919
|
+
o,
|
|
2920
|
+
j,
|
|
2921
|
+
g
|
|
2922
|
+
]), le = B.useCallback(() => {
|
|
2923
|
+
var e;
|
|
2924
|
+
return S ?? (A == null || (e = A.nodesRef.current.find((e) => e.id === k)) == null || (e = e.context) == null || (e = e.dataRef) == null ? void 0 : e.current.orientation);
|
|
2925
|
+
}, [
|
|
2926
|
+
k,
|
|
2927
|
+
A,
|
|
2928
|
+
S
|
|
2929
|
+
]), ue = Z((e) => {
|
|
2930
|
+
if (I.current = !1, V.current = !0, e.which === 229 || !te.current && e.currentTarget === O.current) return;
|
|
2931
|
+
if (m && yi(e.key, x, h, C)) {
|
|
2932
|
+
gi(e.key, le()) || J(e), r(!1, e.nativeEvent, "list-navigation"), l(i.domReference) && (g ? A?.events.emit("virtualfocus", i.domReference) : i.domReference.focus());
|
|
2933
|
+
return;
|
|
2934
|
+
}
|
|
2935
|
+
let t = P.current, a = st(o, b), s = ct(o, b);
|
|
2936
|
+
if (M || (e.key === "Home" && (J(e), P.current = a, j()), e.key === "End" && (J(e), P.current = s, j())), C > 1) {
|
|
2937
|
+
let t = E || Array.from({ length: o.current.length }, () => ({
|
|
2938
|
+
width: 1,
|
|
2939
|
+
height: 1
|
|
2940
|
+
})), n = ut(t, C, D), r = n.findIndex((e) => e != null && !pt(o, e, b)), i = n.reduce((e, t, n) => t != null && !pt(o, t, b) ? n : e, -1), c = n[lt({ current: n.map((e) => e == null ? null : o.current[e]) }, {
|
|
2941
|
+
event: e,
|
|
2942
|
+
orientation: x,
|
|
2943
|
+
loop: p,
|
|
2944
|
+
rtl: h,
|
|
2945
|
+
cols: C,
|
|
2946
|
+
disabledIndices: ft([...(typeof b == "function" ? null : b) || o.current.map((e, t) => pt(o, t, b) ? t : void 0), void 0], n),
|
|
2947
|
+
minIndex: r,
|
|
2948
|
+
maxIndex: i,
|
|
2949
|
+
prevIndex: dt(P.current > s ? a : P.current, t, n, C, e.key === Vn ? "bl" : e.key === (h ? Rn : zn) ? "tr" : "tl"),
|
|
2950
|
+
stopEvent: !0
|
|
2951
|
+
})];
|
|
2952
|
+
if (c != null && (P.current = c, j()), x === "both") return;
|
|
2953
|
+
}
|
|
2954
|
+
if (gi(e.key, x)) {
|
|
2955
|
+
if (J(e), n && !g && G(e.currentTarget.ownerDocument) === e.currentTarget) {
|
|
2956
|
+
P.current = _i(e.key, x, h) ? a : s, j();
|
|
2957
|
+
return;
|
|
2958
|
+
}
|
|
2959
|
+
_i(e.key, x, h) ? p ? P.current = t >= s ? f && t !== o.current.length ? -1 : a : Q(o, {
|
|
2960
|
+
startingIndex: t,
|
|
2961
|
+
disabledIndices: b
|
|
2962
|
+
}) : P.current = Math.min(s, Q(o, {
|
|
2963
|
+
startingIndex: t,
|
|
2964
|
+
disabledIndices: b
|
|
2965
|
+
})) : p ? P.current = t <= a ? f && t !== -1 ? o.current.length : s : Q(o, {
|
|
2966
|
+
startingIndex: t,
|
|
2967
|
+
decrement: !0,
|
|
2968
|
+
disabledIndices: b
|
|
2969
|
+
}) : P.current = Math.max(a, Q(o, {
|
|
2970
|
+
startingIndex: t,
|
|
2971
|
+
decrement: !0,
|
|
2972
|
+
disabledIndices: b
|
|
2973
|
+
})), ot(o, P.current) && (P.current = -1), j();
|
|
2974
|
+
}
|
|
2975
|
+
}), de = B.useMemo(() => g && n && se && { "aria-activedescendant": ie || ne }, [
|
|
2976
|
+
g,
|
|
2977
|
+
n,
|
|
2978
|
+
se,
|
|
2979
|
+
ie,
|
|
2980
|
+
ne
|
|
2981
|
+
]), fe = B.useMemo(() => ({
|
|
2982
|
+
"aria-orientation": x === "both" ? void 0 : x,
|
|
2983
|
+
...M ? {} : de,
|
|
2984
|
+
onKeyDown: ue,
|
|
2985
|
+
onPointerMove() {
|
|
2986
|
+
I.current = !0;
|
|
2987
|
+
}
|
|
2988
|
+
}), [
|
|
2989
|
+
de,
|
|
2990
|
+
ue,
|
|
2991
|
+
x,
|
|
2992
|
+
M
|
|
2993
|
+
]), pe = B.useMemo(() => {
|
|
2994
|
+
function e(e) {
|
|
2995
|
+
_ === "auto" && et(e.nativeEvent) && (N.current = !0);
|
|
2996
|
+
}
|
|
2997
|
+
function t(e) {
|
|
2998
|
+
N.current = _, _ === "auto" && tt(e.nativeEvent) && (N.current = !0);
|
|
2999
|
+
}
|
|
3000
|
+
return {
|
|
3001
|
+
...de,
|
|
3002
|
+
onKeyDown(e) {
|
|
3003
|
+
I.current = !1;
|
|
3004
|
+
let t = e.key.startsWith("Arrow"), i = ["Home", "End"].includes(e.key), a = t || i, s = vi(e.key, x, h), c = yi(e.key, x, h, C), l = vi(e.key, le(), h), u = gi(e.key, x), f = (m ? l : u) || e.key === "Enter" || e.key.trim() === "";
|
|
3005
|
+
if (g && n) {
|
|
3006
|
+
let t = A?.nodesRef.current.find((e) => e.parentId == null), n = A && t ? Ze(A.nodesRef.current, t.id) : null;
|
|
3007
|
+
if (a && n && T) {
|
|
3008
|
+
let t = new KeyboardEvent("keydown", {
|
|
3009
|
+
key: e.key,
|
|
3010
|
+
bubbles: !0
|
|
3011
|
+
});
|
|
3012
|
+
if (s || c) {
|
|
3013
|
+
let r = n.context?.elements.domReference === e.currentTarget, i = c && !r ? n.context?.elements.domReference : s ? o.current.find((e) => e?.id === ne) : null;
|
|
3014
|
+
i && (J(e), i.dispatchEvent(t), ae(void 0));
|
|
3015
|
+
}
|
|
3016
|
+
if ((u || i) && n.context && n.context.open && n.parentId && e.currentTarget !== n.context.elements.domReference) {
|
|
3017
|
+
var p;
|
|
3018
|
+
J(e), (p = n.context.elements.domReference) == null || p.dispatchEvent(t);
|
|
3019
|
+
return;
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
return ue(e);
|
|
3023
|
+
}
|
|
3024
|
+
if (!(!n && !y && t)) {
|
|
3025
|
+
if (f) {
|
|
3026
|
+
let t = gi(e.key, le());
|
|
3027
|
+
F.current = m && t ? null : e.key;
|
|
3028
|
+
}
|
|
3029
|
+
if (m) {
|
|
3030
|
+
l && (J(e), n ? (P.current = st(o, H.current), j()) : r(!0, e.nativeEvent, "list-navigation"));
|
|
3031
|
+
return;
|
|
3032
|
+
}
|
|
3033
|
+
u && (d != null && (P.current = d), J(e), !n && y ? r(!0, e.nativeEvent, "list-navigation") : ue(e), n && j());
|
|
3034
|
+
}
|
|
3035
|
+
},
|
|
3036
|
+
onFocus() {
|
|
3037
|
+
n && !g && (P.current = -1, j());
|
|
3038
|
+
},
|
|
3039
|
+
onPointerDown: t,
|
|
3040
|
+
onPointerEnter: t,
|
|
3041
|
+
onMouseDown: e,
|
|
3042
|
+
onClick: e
|
|
3043
|
+
};
|
|
3044
|
+
}, [
|
|
3045
|
+
ne,
|
|
3046
|
+
de,
|
|
3047
|
+
C,
|
|
3048
|
+
ue,
|
|
3049
|
+
H,
|
|
3050
|
+
_,
|
|
3051
|
+
o,
|
|
3052
|
+
m,
|
|
3053
|
+
j,
|
|
3054
|
+
r,
|
|
3055
|
+
n,
|
|
3056
|
+
y,
|
|
3057
|
+
x,
|
|
3058
|
+
le,
|
|
3059
|
+
h,
|
|
3060
|
+
d,
|
|
3061
|
+
A,
|
|
3062
|
+
g,
|
|
3063
|
+
T
|
|
3064
|
+
]);
|
|
3065
|
+
return B.useMemo(() => u ? {
|
|
3066
|
+
reference: pe,
|
|
3067
|
+
floating: fe,
|
|
3068
|
+
item: ce
|
|
3069
|
+
} : {}, [
|
|
3070
|
+
u,
|
|
3071
|
+
pe,
|
|
3072
|
+
fe,
|
|
3073
|
+
ce
|
|
3074
|
+
]);
|
|
3075
|
+
}
|
|
3076
|
+
var xi = /* @__PURE__ */ new Map([
|
|
3077
|
+
["select", "listbox"],
|
|
3078
|
+
["combobox", "listbox"],
|
|
3079
|
+
["label", !1]
|
|
3080
|
+
]);
|
|
3081
|
+
function Si(e, t) {
|
|
3082
|
+
t === void 0 && (t = {});
|
|
3083
|
+
let { open: n, elements: r, floatingId: i } = e, { enabled: a = !0, role: o = "dialog" } = t, s = Yn(), c = r.domReference?.id || s, l = B.useMemo(() => Ye(r.floating)?.id || i, [r.floating, i]), u = xi.get(o) ?? o, d = rr() != null, f = B.useMemo(() => u === "tooltip" || o === "label" ? { ["aria-" + (o === "label" ? "labelledby" : "describedby")]: n ? l : void 0 } : {
|
|
3084
|
+
"aria-expanded": n ? "true" : "false",
|
|
3085
|
+
"aria-haspopup": u === "alertdialog" ? "dialog" : u,
|
|
3086
|
+
"aria-controls": n ? l : void 0,
|
|
3087
|
+
...u === "listbox" && { role: "combobox" },
|
|
3088
|
+
...u === "menu" && { id: c },
|
|
3089
|
+
...u === "menu" && d && { role: "menuitem" },
|
|
3090
|
+
...o === "select" && { "aria-autocomplete": "none" },
|
|
3091
|
+
...o === "combobox" && { "aria-autocomplete": "list" }
|
|
3092
|
+
}, [
|
|
3093
|
+
u,
|
|
3094
|
+
l,
|
|
3095
|
+
d,
|
|
3096
|
+
n,
|
|
3097
|
+
c,
|
|
3098
|
+
o
|
|
3099
|
+
]), p = B.useMemo(() => {
|
|
3100
|
+
let e = {
|
|
3101
|
+
id: l,
|
|
3102
|
+
...u && { role: u }
|
|
3103
|
+
};
|
|
3104
|
+
return u === "tooltip" || o === "label" ? e : {
|
|
3105
|
+
...e,
|
|
3106
|
+
...u === "menu" && { "aria-labelledby": c }
|
|
3107
|
+
};
|
|
3108
|
+
}, [
|
|
3109
|
+
u,
|
|
3110
|
+
l,
|
|
3111
|
+
c,
|
|
3112
|
+
o
|
|
3113
|
+
]), m = B.useCallback((e) => {
|
|
3114
|
+
let { active: t, selected: n } = e, r = {
|
|
3115
|
+
role: "option",
|
|
3116
|
+
...t && { id: l + "-fui-option" }
|
|
3117
|
+
};
|
|
3118
|
+
switch (o) {
|
|
3119
|
+
case "select":
|
|
3120
|
+
case "combobox": return {
|
|
3121
|
+
...r,
|
|
3122
|
+
"aria-selected": n
|
|
3123
|
+
};
|
|
3124
|
+
}
|
|
3125
|
+
return {};
|
|
3126
|
+
}, [l, o]);
|
|
3127
|
+
return B.useMemo(() => a ? {
|
|
3128
|
+
reference: f,
|
|
3129
|
+
floating: p,
|
|
3130
|
+
item: m
|
|
3131
|
+
} : {}, [
|
|
3132
|
+
a,
|
|
3133
|
+
f,
|
|
3134
|
+
p,
|
|
3135
|
+
m
|
|
3136
|
+
]);
|
|
3137
|
+
}
|
|
3138
|
+
var Ci = (e) => e.replace(/[A-Z]+(?![a-z])|[A-Z]/g, (e, t) => (t ? "-" : "") + e.toLowerCase());
|
|
3139
|
+
function wi(e, t) {
|
|
3140
|
+
return typeof e == "function" ? e(t) : e;
|
|
3141
|
+
}
|
|
3142
|
+
function Ti(e, t) {
|
|
3143
|
+
let [n, r] = B.useState(e);
|
|
3144
|
+
return e && !n && r(!0), B.useEffect(() => {
|
|
3145
|
+
if (!e && n) {
|
|
3146
|
+
let e = setTimeout(() => r(!1), t);
|
|
3147
|
+
return () => clearTimeout(e);
|
|
3148
|
+
}
|
|
3149
|
+
}, [
|
|
3150
|
+
e,
|
|
3151
|
+
n,
|
|
3152
|
+
t
|
|
3153
|
+
]), n;
|
|
3154
|
+
}
|
|
3155
|
+
function Ei(e, t) {
|
|
3156
|
+
t === void 0 && (t = {});
|
|
3157
|
+
let { open: n, elements: { floating: r } } = e, { duration: i = 250 } = t, a = (typeof i == "number" ? i : i.close) || 0, [o, s] = B.useState("unmounted"), c = Ti(n, a);
|
|
3158
|
+
return !c && o === "close" && s("unmounted"), Y(() => {
|
|
3159
|
+
if (r) {
|
|
3160
|
+
if (n) {
|
|
3161
|
+
s("initial");
|
|
3162
|
+
let e = requestAnimationFrame(() => {
|
|
3163
|
+
U.flushSync(() => {
|
|
3164
|
+
s("open");
|
|
3165
|
+
});
|
|
3166
|
+
});
|
|
3167
|
+
return () => {
|
|
3168
|
+
cancelAnimationFrame(e);
|
|
3169
|
+
};
|
|
3170
|
+
}
|
|
3171
|
+
s("close");
|
|
3172
|
+
}
|
|
3173
|
+
}, [n, r]), {
|
|
3174
|
+
isMounted: c,
|
|
3175
|
+
status: o
|
|
3176
|
+
};
|
|
3177
|
+
}
|
|
3178
|
+
function Di(e, t) {
|
|
3179
|
+
t === void 0 && (t = {});
|
|
3180
|
+
let { initial: n = { opacity: 0 }, open: r, close: i, common: a, duration: o = 250 } = t, s = e.placement, c = s.split("-")[0], l = B.useMemo(() => ({
|
|
3181
|
+
side: c,
|
|
3182
|
+
placement: s
|
|
3183
|
+
}), [c, s]), u = typeof o == "number", d = (u ? o : o.open) || 0, f = (u ? o : o.close) || 0, [p, m] = B.useState(() => ({
|
|
3184
|
+
...wi(a, l),
|
|
3185
|
+
...wi(n, l)
|
|
3186
|
+
})), { isMounted: h, status: g } = Ei(e, { duration: o }), _ = X(n), v = X(r), y = X(i), b = X(a);
|
|
3187
|
+
return Y(() => {
|
|
3188
|
+
let e = wi(_.current, l), t = wi(y.current, l), n = wi(b.current, l), r = wi(v.current, l) || Object.keys(e).reduce((e, t) => (e[t] = "", e), {});
|
|
3189
|
+
if (g === "initial" && m((t) => ({
|
|
3190
|
+
transitionProperty: t.transitionProperty,
|
|
3191
|
+
...n,
|
|
3192
|
+
...e
|
|
3193
|
+
})), g === "open" && m({
|
|
3194
|
+
transitionProperty: Object.keys(r).map(Ci).join(","),
|
|
3195
|
+
transitionDuration: d + "ms",
|
|
3196
|
+
...n,
|
|
3197
|
+
...r
|
|
3198
|
+
}), g === "close") {
|
|
3199
|
+
let r = t || e;
|
|
3200
|
+
m({
|
|
3201
|
+
transitionProperty: Object.keys(r).map(Ci).join(","),
|
|
3202
|
+
transitionDuration: f + "ms",
|
|
3203
|
+
...n,
|
|
3204
|
+
...r
|
|
3205
|
+
});
|
|
3206
|
+
}
|
|
3207
|
+
}, [
|
|
3208
|
+
f,
|
|
3209
|
+
y,
|
|
3210
|
+
_,
|
|
3211
|
+
v,
|
|
3212
|
+
b,
|
|
3213
|
+
d,
|
|
3214
|
+
g,
|
|
3215
|
+
l
|
|
3216
|
+
]), {
|
|
3217
|
+
isMounted: h,
|
|
3218
|
+
styles: p
|
|
3219
|
+
};
|
|
3220
|
+
}
|
|
3221
|
+
function Oi(e, t) {
|
|
3222
|
+
let { open: n, dataRef: r } = e, { listRef: i, activeIndex: a, onMatch: o, onTypingChange: s, enabled: c = !0, findMatch: l = null, resetMs: u = 750, ignoreKeys: d = [], selectedIndex: f = null } = t, p = B.useRef(-1), m = B.useRef(""), h = B.useRef(f ?? a ?? -1), g = B.useRef(null), _ = Z(o), v = Z(s), y = X(l), b = X(d);
|
|
3223
|
+
Y(() => {
|
|
3224
|
+
n && ($(p), g.current = null, m.current = "");
|
|
3225
|
+
}, [n]), Y(() => {
|
|
3226
|
+
n && m.current === "" && (h.current = f ?? a ?? -1);
|
|
3227
|
+
}, [
|
|
3228
|
+
n,
|
|
3229
|
+
f,
|
|
3230
|
+
a
|
|
3231
|
+
]);
|
|
3232
|
+
let x = Z((e) => {
|
|
3233
|
+
e ? r.current.typing || (r.current.typing = e, v(e)) : r.current.typing && (r.current.typing = e, v(e));
|
|
3234
|
+
}), S = Z((e) => {
|
|
3235
|
+
function t(e, t, n) {
|
|
3236
|
+
let r = y.current ? y.current(t, n) : t.find((e) => e?.toLocaleLowerCase().indexOf(n.toLocaleLowerCase()) === 0);
|
|
3237
|
+
return r ? e.indexOf(r) : -1;
|
|
3238
|
+
}
|
|
3239
|
+
let r = i.current;
|
|
3240
|
+
if (m.current.length > 0 && m.current[0] !== " " && (t(r, r, m.current) === -1 ? x(!1) : e.key === " " && J(e)), r == null || b.current.includes(e.key) || e.key.length !== 1 || e.ctrlKey || e.metaKey || e.altKey) return;
|
|
3241
|
+
n && e.key !== " " && (J(e), x(!0)), r.every((e) => e ? e[0]?.toLocaleLowerCase() !== e[1]?.toLocaleLowerCase() : !0) && m.current === e.key && (m.current = "", h.current = g.current), m.current += e.key, $(p), p.current = window.setTimeout(() => {
|
|
3242
|
+
m.current = "", h.current = g.current, x(!1);
|
|
3243
|
+
}, u);
|
|
3244
|
+
let a = h.current, o = t(r, [...r.slice((a || 0) + 1), ...r.slice(0, (a || 0) + 1)], m.current);
|
|
3245
|
+
o === -1 ? e.key !== " " && (m.current = "", x(!1)) : (_(o), g.current = o);
|
|
3246
|
+
}), C = B.useMemo(() => ({ onKeyDown: S }), [S]), w = B.useMemo(() => ({
|
|
3247
|
+
onKeyDown: S,
|
|
3248
|
+
onKeyUp(e) {
|
|
3249
|
+
e.key === " " && x(!1);
|
|
3250
|
+
}
|
|
3251
|
+
}), [S, x]);
|
|
3252
|
+
return B.useMemo(() => c ? {
|
|
3253
|
+
reference: C,
|
|
3254
|
+
floating: w
|
|
3255
|
+
} : {}, [
|
|
3256
|
+
c,
|
|
3257
|
+
C,
|
|
3258
|
+
w
|
|
3259
|
+
]);
|
|
3260
|
+
}
|
|
3261
|
+
function ki(e, t, n) {
|
|
3262
|
+
return n === void 0 && (n = !0), e.filter((e) => e.parentId === t && (!n || e.context?.open)).flatMap((t) => [t, ...ki(e, t.id, n)]);
|
|
3263
|
+
}
|
|
3264
|
+
function Ai(e, t) {
|
|
3265
|
+
let [n, r] = e, i = !1, a = t.length;
|
|
3266
|
+
for (let e = 0, o = a - 1; e < a; o = e++) {
|
|
3267
|
+
let [a, s] = t[e] || [0, 0], [c, l] = t[o] || [0, 0];
|
|
3268
|
+
s >= r != l >= r && n <= (c - a) * (r - s) / (l - s) + a && (i = !i);
|
|
3269
|
+
}
|
|
3270
|
+
return i;
|
|
3271
|
+
}
|
|
3272
|
+
function ji(e, t) {
|
|
3273
|
+
return e[0] >= t.x && e[0] <= t.x + t.width && e[1] >= t.y && e[1] <= t.y + t.height;
|
|
3274
|
+
}
|
|
3275
|
+
function Mi(e) {
|
|
3276
|
+
e === void 0 && (e = {});
|
|
3277
|
+
let { buffer: t = .5, blockPointerEvents: n = !1, requireIntent: r = !0 } = e, i = { current: -1 }, a = !1, o = null, s = null, l = typeof performance < "u" ? performance.now() : 0;
|
|
3278
|
+
function u(e, t) {
|
|
3279
|
+
let n = performance.now(), r = n - l;
|
|
3280
|
+
if (o === null || s === null || r === 0) return o = e, s = t, l = n, null;
|
|
3281
|
+
let i = e - o, a = t - s, c = Math.sqrt(i * i + a * a) / r;
|
|
3282
|
+
return o = e, s = t, l = n, c;
|
|
3283
|
+
}
|
|
3284
|
+
let d = (e) => {
|
|
3285
|
+
let { x: n, y: o, placement: s, elements: l, onClose: d, nodeId: f, tree: p } = e;
|
|
3286
|
+
return function(e) {
|
|
3287
|
+
function m() {
|
|
3288
|
+
$(i), d();
|
|
3289
|
+
}
|
|
3290
|
+
if ($(i), !l.domReference || !l.floating || s == null || n == null || o == null) return;
|
|
3291
|
+
let { clientX: h, clientY: g } = e, _ = [h, g], v = gr(e), y = e.type === "mouseleave", b = hr(l.floating, v), x = hr(l.domReference, v), S = l.domReference.getBoundingClientRect(), C = l.floating.getBoundingClientRect(), w = s.split("-")[0], T = n > C.right - C.width / 2, E = o > C.bottom - C.height / 2, D = ji(_, S), O = C.width > S.width, k = C.height > S.height, A = (O ? S : C).left, j = (O ? S : C).right, M = (k ? S : C).top, N = (k ? S : C).bottom;
|
|
3292
|
+
if (b && (a = !0, !y)) return;
|
|
3293
|
+
if (x && (a = !1), x && !y) {
|
|
3294
|
+
a = !0;
|
|
3295
|
+
return;
|
|
3296
|
+
}
|
|
3297
|
+
if (y && c(e.relatedTarget) && hr(l.floating, e.relatedTarget) || p && ki(p.nodesRef.current, f).length) return;
|
|
3298
|
+
if (w === "top" && o >= S.bottom - 1 || w === "bottom" && o <= S.top + 1 || w === "left" && n >= S.right - 1 || w === "right" && n <= S.left + 1) return m();
|
|
3299
|
+
let P = [];
|
|
3300
|
+
switch (w) {
|
|
3301
|
+
case "top":
|
|
3302
|
+
P = [
|
|
3303
|
+
[A, S.top + 1],
|
|
3304
|
+
[A, C.bottom - 1],
|
|
3305
|
+
[j, C.bottom - 1],
|
|
3306
|
+
[j, S.top + 1]
|
|
3307
|
+
];
|
|
3308
|
+
break;
|
|
3309
|
+
case "bottom":
|
|
3310
|
+
P = [
|
|
3311
|
+
[A, C.top + 1],
|
|
3312
|
+
[A, S.bottom - 1],
|
|
3313
|
+
[j, S.bottom - 1],
|
|
3314
|
+
[j, C.top + 1]
|
|
3315
|
+
];
|
|
3316
|
+
break;
|
|
3317
|
+
case "left":
|
|
3318
|
+
P = [
|
|
3319
|
+
[C.right - 1, N],
|
|
3320
|
+
[C.right - 1, M],
|
|
3321
|
+
[S.left + 1, M],
|
|
3322
|
+
[S.left + 1, N]
|
|
3323
|
+
];
|
|
3324
|
+
break;
|
|
3325
|
+
case "right":
|
|
3326
|
+
P = [
|
|
3327
|
+
[S.right - 1, N],
|
|
3328
|
+
[S.right - 1, M],
|
|
3329
|
+
[C.left + 1, M],
|
|
3330
|
+
[C.left + 1, N]
|
|
3331
|
+
];
|
|
3332
|
+
break;
|
|
3333
|
+
}
|
|
3334
|
+
function F(e) {
|
|
3335
|
+
let [n, r] = e;
|
|
3336
|
+
switch (w) {
|
|
3337
|
+
case "top": return [
|
|
3338
|
+
[O ? n + t / 2 : T ? n + t * 4 : n - t * 4, r + t + 1],
|
|
3339
|
+
[O ? n - t / 2 : T ? n + t * 4 : n - t * 4, r + t + 1],
|
|
3340
|
+
[C.left, T || O ? C.bottom - t : C.top],
|
|
3341
|
+
[C.right, T ? O ? C.bottom - t : C.top : C.bottom - t]
|
|
3342
|
+
];
|
|
3343
|
+
case "bottom": return [
|
|
3344
|
+
[O ? n + t / 2 : T ? n + t * 4 : n - t * 4, r - t],
|
|
3345
|
+
[O ? n - t / 2 : T ? n + t * 4 : n - t * 4, r - t],
|
|
3346
|
+
[C.left, T || O ? C.top + t : C.bottom],
|
|
3347
|
+
[C.right, T ? O ? C.top + t : C.bottom : C.top + t]
|
|
3348
|
+
];
|
|
3349
|
+
case "left": {
|
|
3350
|
+
let e = [n + t + 1, k ? r + t / 2 : E ? r + t * 4 : r - t * 4], i = [n + t + 1, k ? r - t / 2 : E ? r + t * 4 : r - t * 4];
|
|
3351
|
+
return [
|
|
3352
|
+
[E || k ? C.right - t : C.left, C.top],
|
|
3353
|
+
[E ? k ? C.right - t : C.left : C.right - t, C.bottom],
|
|
3354
|
+
e,
|
|
3355
|
+
i
|
|
3356
|
+
];
|
|
3357
|
+
}
|
|
3358
|
+
case "right": return [
|
|
3359
|
+
[n - t, k ? r + t / 2 : E ? r + t * 4 : r - t * 4],
|
|
3360
|
+
[n - t, k ? r - t / 2 : E ? r + t * 4 : r - t * 4],
|
|
3361
|
+
[E || k ? C.left + t : C.right, C.top],
|
|
3362
|
+
[E ? k ? C.left + t : C.right : C.left + t, C.bottom]
|
|
3363
|
+
];
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3366
|
+
if (!Ai([h, g], P)) {
|
|
3367
|
+
if (a && !D) return m();
|
|
3368
|
+
if (!y && r) {
|
|
3369
|
+
let t = u(e.clientX, e.clientY);
|
|
3370
|
+
if (t !== null && t < .1) return m();
|
|
3371
|
+
}
|
|
3372
|
+
Ai([h, g], F([n, o])) ? !a && r && (i.current = window.setTimeout(m, 40)) : m();
|
|
3373
|
+
}
|
|
3374
|
+
};
|
|
3375
|
+
};
|
|
3376
|
+
return d.__options = { blockPointerEvents: n }, d;
|
|
3377
|
+
}
|
|
3378
|
+
//#endregion
|
|
3379
|
+
export { un as A, Oi as C, Tn as D, Dn as E, En as O, Di as S, kn as T, fr as _, Xr as a, bi as b, Mi as c, si as d, li as f, di as g, ir as h, or as i, On as k, ei as l, rr as m, Gr as n, Pr as o, ar as p, Nn as r, sr as s, $n as t, ri as u, pi as v, An as w, Si as x, Pn as y };
|
|
3380
|
+
|
|
3381
|
+
//# sourceMappingURL=floating-ui.react-CwXtBJ_y.js.map
|