@konstructio/ui 0.1.2-alpha.107 → 0.1.2-alpha.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/AnimatePresence-C5PSMIZj.js +186 -0
- package/dist/{DropdownButton-D4QlKGg7.js → DropdownButton-LEDrhn1j.js} +8 -8
- package/dist/{Modal-Dq9BHD_9.js → Modal-DL4p692X.js} +1 -1
- package/dist/assets/icons/components/AllSetCheck.js +27 -0
- package/dist/assets/icons/components/Detach.js +20 -0
- package/dist/assets/icons/components/Pause.js +20 -0
- package/dist/assets/icons/components/SpendStatement.js +70 -0
- package/dist/assets/icons/components/Updated.js +20 -0
- package/dist/assets/icons/components/index.js +218 -208
- package/dist/assets/icons/index.js +218 -208
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
- package/dist/components/CopyButton/CopyButton.js +63 -0
- package/dist/components/CopyButton/CopyButton.variants.js +29 -0
- package/dist/components/CopyButton/hooks/index.js +4 -0
- package/dist/components/CopyButton/hooks/useCopyToClipboard/useCopyToClipboard.js +22 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +51 -40
- package/dist/components/DateRangePicker/DateRangePicker.variants.js +5 -6
- package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +56 -54
- package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +36 -35
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +51 -47
- package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.js +27 -12
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +36 -32
- package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +35 -31
- package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +106 -104
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +68 -34
- package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +76 -10
- package/dist/components/DateRangePicker/components/RightPanel/RightPanel.js +38 -0
- package/dist/components/DateRangePicker/components/index.js +3 -1
- package/dist/components/DateRangePicker/constants/index.js +1 -1
- package/dist/components/DateRangePicker/constants/presets/presets.js +42 -0
- package/dist/components/DateRangePicker/contexts/date-range-picker/date-range-picker.provider.js +124 -0
- package/dist/components/DateRangePicker/contexts/index.js +3 -3
- package/dist/components/DateRangePicker/utils/displayed-months/displayed-months.js +12 -0
- package/dist/components/DateRangePicker/utils/index.js +22 -18
- package/dist/components/DateRangePicker/utils/presets/presets.js +5 -0
- package/dist/components/DateRangePicker/utils/right-panel/right-panel.js +9 -0
- package/dist/components/DateRangePicker/utils/{validation.js → validation/validation.js} +26 -26
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/Filter.js +11 -8
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/hooks/index.js +4 -0
- package/dist/components/Filter/components/BadgeDropdown/{BadgeMultiSelect.hook.js → hooks/useBadgeMultiSelect/useBadgeMultiSelect.js} +3 -3
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/CustomDateRangeFilterDropdown.js +10 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Actions/Actions.js +78 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/PanelActions/PanelActions.js +23 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Picker/Picker.js +34 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Trigger/Trigger.js +22 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Wrapper/Wrapper.js +22 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/index.js +4 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/constants/index.js +5 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/constants/presets/presets.js +33 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.context.js +5 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.hook.js +10 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.provider.js +149 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/contexts/index.js +6 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/index.js +20 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useAppliedDateRange/useAppliedDateRange.js +20 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useCalendarVisibility/useCalendarVisibility.js +24 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useDateRangeSelection/useDateRangeSelection.js +22 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFilterDropdownOpenState/useFilterDropdownOpenState.js +18 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFormattedDateRange/useFormattedDateRange.js +25 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePendingDateRange/usePendingDateRange.js +15 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePresetOptions/usePresetOptions.js +22 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useResetKey/useResetKey.js +10 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useSelectedPreset/useSelectedPreset.js +24 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/utils/duration/duration.js +59 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/utils/index.js +8 -0
- package/dist/components/Filter/components/CustomDateRangeFilterDropdown/utils/whole-days/whole-days.js +7 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/hooks/index.js +4 -0
- package/dist/components/Filter/components/DateFilterDropdown/{DateFilterDropdown.hook.js → hooks/useDateFilterDropdown/useDateFilterDropdown.js} +4 -4
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +1 -1
- package/dist/components/Filter/components/DateRangeFilterDropdown/hooks/index.js +4 -0
- package/dist/components/Filter/components/DateRangeFilterDropdown/{DateRangeFilterDropdown.hook.js → hooks/useDateRangeFilterDropdown/useDateRangeFilterDropdown.js} +12 -12
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +1 -1
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +1 -1
- package/dist/components/Filter/components/TimeFilterDropdown/hooks/index.js +4 -0
- package/dist/components/Filter/components/TimeFilterDropdown/{TimeFilterDropdown.hook.js → hooks/useTimeFilterDropdown/useTimeFilterDropdown.js} +4 -4
- package/dist/components/Filter/components/index.js +12 -10
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/Radio/Radio.js +10 -9
- package/dist/components/RadioGroup/RadioGroup.js +5 -5
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +5 -59
- package/dist/components/VirtualizedTable/components/Actions/Actions.variants.js +53 -0
- package/dist/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.js +23 -0
- package/dist/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.js +26 -0
- package/dist/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.js +48 -0
- package/dist/components/VirtualizedTable/components/Actions/components/InlineActions/constants/index.js +5 -0
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.js +46 -0
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/constants/index.js +5 -0
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/index.js +4 -0
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-actions-menu/use-actions-menu.js +41 -0
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.js +72 -0
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-keyboard-navigation/use-menu-keyboard-navigation.js +56 -0
- package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-row-highlight/use-row-highlight.js +13 -0
- package/dist/components/VirtualizedTable/components/Body/Body.js +24 -24
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +78 -65
- package/dist/components/index.js +129 -125
- package/dist/icons.js +218 -208
- package/dist/index.js +141 -137
- package/dist/lib/assets/icons/components/AllSetCheck.d.ts +3 -0
- package/dist/lib/assets/icons/components/Detach.d.ts +3 -0
- package/dist/lib/assets/icons/components/Pause.d.ts +3 -0
- package/dist/lib/assets/icons/components/SpendStatement.d.ts +3 -0
- package/dist/lib/assets/icons/components/Updated.d.ts +3 -0
- package/dist/lib/assets/icons/components/index.d.ts +5 -0
- package/dist/lib/components/CopyButton/CopyButton.d.ts +4 -0
- package/dist/lib/components/CopyButton/CopyButton.types.d.ts +15 -0
- package/dist/lib/components/CopyButton/CopyButton.variants.d.ts +3 -0
- package/dist/lib/components/CopyButton/hooks/index.d.ts +1 -0
- package/dist/lib/components/CopyButton/hooks/useCopyToClipboard/useCopyToClipboard.d.ts +5 -0
- package/dist/lib/components/CopyButton/hooks/useCopyToClipboard/useCopyToClipboard.types.d.ts +5 -0
- package/dist/lib/components/DateRangePicker/DateRangePicker.types.d.ts +54 -3
- package/dist/lib/components/DateRangePicker/DateRangePicker.variants.d.ts +6 -0
- package/dist/lib/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.d.ts +2 -1
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.types.d.ts +2 -4
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.d.ts +8 -1
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.types.d.ts +2 -0
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.types.d.ts +2 -0
- package/dist/lib/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.d.ts +2 -4
- package/dist/lib/components/DateRangePicker/components/PresetPanel/PresetPanel.types.d.ts +4 -0
- package/dist/lib/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.d.ts +38 -1
- package/dist/lib/components/DateRangePicker/components/RightPanel/RightPanel.d.ts +8 -0
- package/dist/lib/components/DateRangePicker/components/RightPanel/RightPanel.types.d.ts +4 -0
- package/dist/lib/components/DateRangePicker/components/index.d.ts +1 -0
- package/dist/lib/components/DateRangePicker/constants/index.d.ts +2 -1
- package/dist/lib/components/DateRangePicker/constants/presets/presets.d.ts +10 -0
- package/dist/lib/components/DateRangePicker/constants/presets/presets.types.d.ts +6 -0
- package/dist/lib/components/DateRangePicker/contexts/{date-range-picker.context.d.ts → date-range-picker/date-range-picker.context.d.ts} +34 -5
- package/dist/lib/components/DateRangePicker/contexts/date-range-picker/date-range-picker.provider.d.ts +3 -0
- package/dist/lib/components/DateRangePicker/contexts/{date-range-picker.provider.d.ts → date-range-picker/date-range-picker.types.d.ts} +20 -18
- package/dist/lib/components/DateRangePicker/contexts/index.d.ts +4 -4
- package/dist/lib/components/DateRangePicker/utils/{disabled-dates.d.ts → disabled-dates/disabled-dates.d.ts} +1 -7
- package/dist/lib/components/DateRangePicker/utils/disabled-dates/disabled-dates.types.d.ts +7 -0
- package/dist/lib/components/DateRangePicker/utils/displayed-months/displayed-months.d.ts +12 -0
- package/dist/lib/components/DateRangePicker/utils/index.d.ts +7 -4
- package/dist/lib/components/DateRangePicker/utils/presets/presets.d.ts +9 -0
- package/dist/lib/components/DateRangePicker/utils/right-panel/right-panel.d.ts +7 -0
- package/dist/lib/components/Filter/Filter.d.ts +2 -2
- package/dist/lib/components/Filter/Filter.types.d.ts +2 -1
- package/dist/lib/components/Filter/components/BadgeDropdown/BadgeMultiSelect.d.ts +2 -2
- package/dist/lib/components/Filter/components/BadgeDropdown/BadgeMultiSelect.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/BadgeDropdown/hooks/index.d.ts +1 -0
- package/dist/lib/components/Filter/components/BadgeDropdown/{BadgeMultiSelect.hook.d.ts → hooks/useBadgeMultiSelect/useBadgeMultiSelect.d.ts} +3 -3
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/CustomDateRangeFilterDropdown.d.ts +3 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/CustomDateRangeFilterDropdown.types.d.ts +55 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/Actions/Actions.d.ts +2 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/PanelActions/PanelActions.d.ts +2 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/Picker/Picker.d.ts +2 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/Trigger/Trigger.d.ts +2 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/Wrapper/Wrapper.d.ts +2 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/index.d.ts +1 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/constants/index.d.ts +2 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/constants/presets/presets.d.ts +4 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/constants/presets/presets.types.d.ts +9 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.context.d.ts +2 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.hook.d.ts +1 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.provider.d.ts +3 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.types.d.ts +28 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/contexts/index.d.ts +2 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/index.d.ts +9 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useAppliedDateRange/useAppliedDateRange.d.ts +7 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useAppliedDateRange/useAppliedDateRange.types.d.ts +5 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useCalendarVisibility/useCalendarVisibility.d.ts +10 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useCalendarVisibility/useCalendarVisibility.types.d.ts +4 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useDateRangeSelection/useDateRangeSelection.d.ts +8 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useDateRangeSelection/useDateRangeSelection.types.d.ts +4 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFilterDropdownOpenState/useFilterDropdownOpenState.d.ts +6 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFormattedDateRange/useFormattedDateRange.d.ts +11 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFormattedDateRange/useFormattedDateRange.types.d.ts +5 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePendingDateRange/usePendingDateRange.d.ts +5 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePendingDateRange/usePendingDateRange.types.d.ts +5 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePresetOptions/usePresetOptions.d.ts +2 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePresetOptions/usePresetOptions.types.d.ts +6 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useResetKey/useResetKey.d.ts +1 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useSelectedPreset/useSelectedPreset.d.ts +10 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useSelectedPreset/useSelectedPreset.types.d.ts +4 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/utils/duration/duration.d.ts +4 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/utils/duration/duration.types.d.ts +5 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/utils/index.d.ts +3 -0
- package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/utils/whole-days/whole-days.d.ts +2 -0
- package/dist/lib/components/Filter/components/DateFilterDropdown/DateFilterDropdown.d.ts +2 -2
- package/dist/lib/components/Filter/components/DateFilterDropdown/DateFilterDropdown.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/DateFilterDropdown/hooks/index.d.ts +1 -0
- package/dist/lib/components/Filter/components/DateFilterDropdown/{DateFilterDropdown.hook.d.ts → hooks/useDateFilterDropdown/useDateFilterDropdown.d.ts} +2 -2
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.d.ts +2 -2
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/hooks/index.d.ts +1 -0
- package/dist/lib/components/Filter/components/DateRangeFilterDropdown/{DateRangeFilterDropdown.hook.d.ts → hooks/useDateRangeFilterDropdown/useDateRangeFilterDropdown.d.ts} +3 -3
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.d.ts +2 -2
- package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/ResetButton/ResetButton.d.ts +2 -2
- package/dist/lib/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/TextMultiSelect/TextMultiSelect.d.ts +2 -2
- package/dist/lib/components/Filter/components/TextMultiSelect/TextMultiSelect.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.d.ts +2 -2
- package/dist/lib/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.types.d.ts +1 -1
- package/dist/lib/components/Filter/components/TimeFilterDropdown/hooks/index.d.ts +1 -0
- package/dist/lib/components/Filter/components/TimeFilterDropdown/{TimeFilterDropdown.hook.d.ts → hooks/useTimeFilterDropdown/useTimeFilterDropdown.d.ts} +2 -2
- package/dist/lib/components/Filter/components/index.d.ts +8 -6
- package/dist/lib/components/RadioGroup/RadioGroup.types.d.ts +2 -2
- package/dist/lib/components/Stepper/Stepper.variants.d.ts +4 -4
- package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +8 -1
- package/dist/lib/components/VirtualizedTable/components/Actions/Actions.d.ts +1 -1
- package/dist/lib/components/VirtualizedTable/components/Actions/Actions.types.d.ts +3 -2
- package/dist/lib/components/VirtualizedTable/components/Actions/Actions.variants.d.ts +5 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.types.d.ts +9 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.d.ts +4 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.types.d.ts +6 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/InlineActions/constants/index.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.d.ts +3 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/constants/index.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/index.d.ts +1 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-actions-menu/use-actions-menu.d.ts +15 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.d.ts +10 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.types.d.ts +7 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-keyboard-navigation/use-menu-keyboard-navigation.d.ts +6 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-keyboard-navigation/use-menu-keyboard-navigation.types.d.ts +8 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-row-highlight/use-row-highlight.d.ts +2 -0
- package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-row-highlight/use-row-highlight.types.d.ts +5 -0
- package/dist/lib/components/index.d.ts +4 -2
- package/dist/lib/icons.d.ts +1 -1
- package/dist/package.json +16 -16
- package/dist/{react-7zQ6bvbE.js → react-DRLuFcbk.js} +1144 -1137
- package/dist/styles.css +1 -1
- package/package.json +16 -16
- package/dist/components/DateRangePicker/constants/presets.js +0 -25
- package/dist/components/DateRangePicker/contexts/date-range-picker.provider.js +0 -119
- package/dist/components/DateRangePicker/utils/presets.js +0 -34
- package/dist/lib/components/DateRangePicker/constants/presets.d.ts +0 -6
- package/dist/lib/components/DateRangePicker/utils/presets.d.ts +0 -5
- /package/dist/components/DateRangePicker/contexts/{date-range-picker.context.js → date-range-picker/date-range-picker.context.js} +0 -0
- /package/dist/components/DateRangePicker/contexts/{date-range-picker.hook.js → date-range-picker/date-range-picker.hook.js} +0 -0
- /package/dist/components/DateRangePicker/utils/{disabled-dates.js → disabled-dates/disabled-dates.js} +0 -0
- /package/dist/lib/components/DateRangePicker/contexts/{date-range-picker.hook.d.ts → date-range-picker/date-range-picker.hook.d.ts} +0 -0
- /package/dist/lib/components/DateRangePicker/utils/{validation.d.ts → validation/validation.d.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Component as
|
|
2
|
-
import { jsx as
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
const e =
|
|
1
|
+
import { Component as Or, Fragment as Zn, createContext as bt, createElement as jr, forwardRef as Nr, useCallback as Jn, useContext as j, useEffect as ni, useId as Ur, useInsertionEffect as Qn, useLayoutEffect as Wr, useMemo as he, useRef as ut } from "react";
|
|
2
|
+
import { jsx as ts, jsxs as $r } from "react/jsx-runtime";
|
|
3
|
+
var es = bt({});
|
|
4
|
+
function Kr(t) {
|
|
5
|
+
const e = ut(null);
|
|
6
6
|
return e.current === null && (e.current = t()), e.current;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var zr = typeof window < "u", Hr = zr ? Wr : ni, si = /* @__PURE__ */ bt(null);
|
|
9
9
|
function ri(t, e) {
|
|
10
10
|
t.indexOf(e) === -1 && t.push(e);
|
|
11
11
|
}
|
|
@@ -13,25 +13,25 @@ function ie(t, e) {
|
|
|
13
13
|
const i = t.indexOf(e);
|
|
14
14
|
i > -1 && t.splice(i, 1);
|
|
15
15
|
}
|
|
16
|
-
var
|
|
16
|
+
var J = (t, e, i) => i > e ? e : i < t ? t : i;
|
|
17
17
|
function Re(t, e) {
|
|
18
18
|
return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
|
|
19
19
|
}
|
|
20
|
-
var
|
|
21
|
-
},
|
|
20
|
+
var At = () => {
|
|
21
|
+
}, Q = () => {
|
|
22
22
|
};
|
|
23
|
-
typeof process < "u" && process.env.NODE_ENV !== "production" && (
|
|
23
|
+
typeof process < "u" && process.env.NODE_ENV !== "production" && (At = (t, e, i) => {
|
|
24
24
|
!t && typeof console < "u" && console.warn(Re(e, i));
|
|
25
|
-
},
|
|
25
|
+
}, Q = (t, e, i) => {
|
|
26
26
|
if (!t) throw new Error(Re(e, i));
|
|
27
27
|
});
|
|
28
|
-
var
|
|
28
|
+
var it = {}, is = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), ns = (t) => typeof t == "object" && t !== null, ss = (t) => /^0[^.\s]+$/u.test(t);
|
|
29
29
|
// @__NO_SIDE_EFFECTS__
|
|
30
|
-
function
|
|
30
|
+
function rs(t) {
|
|
31
31
|
let e;
|
|
32
32
|
return () => (e === void 0 && (e = t()), e);
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var K = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Nt = (...t) => t.reduce((e, i) => (n) => i(e(n))), Ft = /* @__NO_SIDE_EFFECTS__ */ (t, e, i) => {
|
|
35
35
|
const n = e - t;
|
|
36
36
|
return n ? (i - t) / n : 1;
|
|
37
37
|
}, oi = class {
|
|
@@ -56,43 +56,43 @@ var z = /* @__NO_SIDE_EFFECTS__ */ (t) => t, Ut = (...t) => t.reduce((e, i) => (
|
|
|
56
56
|
clear() {
|
|
57
57
|
this.subscriptions.length = 0;
|
|
58
58
|
}
|
|
59
|
-
},
|
|
59
|
+
}, N = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, $ = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3, os = /* @__NO_SIDE_EFFECTS__ */ (t, e) => e ? t * (1e3 / e) : 0, Li = /* @__PURE__ */ new Set();
|
|
60
60
|
function ai(t, e, i) {
|
|
61
|
-
t ||
|
|
61
|
+
t || Li.has(e) || (console.warn(Re(e, i)), Li.add(e));
|
|
62
62
|
}
|
|
63
|
-
var
|
|
64
|
-
function
|
|
63
|
+
var as = (t, e, i) => (((1 - 3 * i + 3 * e) * t + (3 * i - 6 * e)) * t + 3 * e) * t, Gr = 1e-7, _r = 12;
|
|
64
|
+
function Xr(t, e, i, n, s) {
|
|
65
65
|
let o, r, a = 0;
|
|
66
66
|
do
|
|
67
|
-
r = e + (i - e) / 2, o =
|
|
68
|
-
while (Math.abs(o) >
|
|
67
|
+
r = e + (i - e) / 2, o = as(r, n, s) - t, o > 0 ? i = r : e = r;
|
|
68
|
+
while (Math.abs(o) > Gr && ++a < _r);
|
|
69
69
|
return r;
|
|
70
70
|
}
|
|
71
71
|
// @__NO_SIDE_EFFECTS__
|
|
72
|
-
function
|
|
73
|
-
if (t === e && i === n) return
|
|
74
|
-
const s = (o) =>
|
|
75
|
-
return (o) => o === 0 || o === 1 ? o :
|
|
76
|
-
}
|
|
77
|
-
var
|
|
78
|
-
linear:
|
|
79
|
-
easeIn:
|
|
80
|
-
easeInOut:
|
|
81
|
-
easeOut:
|
|
72
|
+
function Ut(t, e, i, n) {
|
|
73
|
+
if (t === e && i === n) return K;
|
|
74
|
+
const s = (o) => Xr(o, 0, 1, t, i);
|
|
75
|
+
return (o) => o === 0 || o === 1 ? o : as(s(o), e, n);
|
|
76
|
+
}
|
|
77
|
+
var ls = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, us = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => 1 - t(1 - e), cs = /* @__PURE__ */ Ut(0.33, 1.53, 0.69, 0.99), li = /* @__PURE__ */ us(cs), hs = /* @__PURE__ */ ls(li), fs = (t) => t >= 1 ? 1 : (t *= 2) < 1 ? 0.5 * li(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), ui = (t) => 1 - Math.sin(Math.acos(t)), ds = us(ui), ps = ls(ui), Yr = /* @__PURE__ */ Ut(0.42, 0, 1, 1), qr = /* @__PURE__ */ Ut(0, 0, 0.58, 1), ms = /* @__PURE__ */ Ut(0.42, 0, 0.58, 1), Zr = /* @__NO_SIDE_EFFECTS__ */ (t) => Array.isArray(t) && typeof t[0] != "number", vs = /* @__NO_SIDE_EFFECTS__ */ (t) => Array.isArray(t) && typeof t[0] == "number", ki = {
|
|
78
|
+
linear: K,
|
|
79
|
+
easeIn: Yr,
|
|
80
|
+
easeInOut: ms,
|
|
81
|
+
easeOut: qr,
|
|
82
82
|
circIn: ui,
|
|
83
|
-
circInOut:
|
|
84
|
-
circOut:
|
|
83
|
+
circInOut: ps,
|
|
84
|
+
circOut: ds,
|
|
85
85
|
backIn: li,
|
|
86
|
-
backInOut:
|
|
87
|
-
backOut:
|
|
88
|
-
anticipate:
|
|
89
|
-
},
|
|
90
|
-
if (
|
|
91
|
-
|
|
86
|
+
backInOut: hs,
|
|
87
|
+
backOut: cs,
|
|
88
|
+
anticipate: fs
|
|
89
|
+
}, Jr = (t) => typeof t == "string", Bi = (t) => {
|
|
90
|
+
if (vs(t)) {
|
|
91
|
+
Q(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
|
|
92
92
|
const [e, i, n, s] = t;
|
|
93
|
-
return /* @__PURE__ */
|
|
94
|
-
} else if (
|
|
95
|
-
return
|
|
93
|
+
return /* @__PURE__ */ Ut(e, i, n, s);
|
|
94
|
+
} else if (Jr(t))
|
|
95
|
+
return Q(ki[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), ki[t];
|
|
96
96
|
return t;
|
|
97
97
|
}, zt = [
|
|
98
98
|
"setup",
|
|
@@ -104,7 +104,7 @@ var as = /* @__NO_SIDE_EFFECTS__ */ (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 -
|
|
|
104
104
|
"render",
|
|
105
105
|
"postRender"
|
|
106
106
|
];
|
|
107
|
-
function
|
|
107
|
+
function Qr(t) {
|
|
108
108
|
let e = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), n = !1, s = !1;
|
|
109
109
|
const o = /* @__PURE__ */ new WeakSet();
|
|
110
110
|
let r = {
|
|
@@ -135,59 +135,59 @@ function to(t) {
|
|
|
135
135
|
};
|
|
136
136
|
return l;
|
|
137
137
|
}
|
|
138
|
-
var
|
|
139
|
-
function
|
|
138
|
+
var to = 40;
|
|
139
|
+
function gs(t, e) {
|
|
140
140
|
let i = !1, n = !0;
|
|
141
141
|
const s = {
|
|
142
142
|
delta: 0,
|
|
143
143
|
timestamp: 0,
|
|
144
144
|
isProcessing: !1
|
|
145
|
-
}, o = () => i = !0, r = zt.reduce((x,
|
|
146
|
-
const x =
|
|
147
|
-
i = !1, x || (s.delta = n ? 1e3 / 60 : Math.max(Math.min(
|
|
148
|
-
},
|
|
149
|
-
i = !0, n = !0, s.isProcessing || t(
|
|
145
|
+
}, o = () => i = !0, r = zt.reduce((x, P) => (x[P] = Qr(o), x), {}), { setup: a, read: l, resolveKeyframes: c, preUpdate: u, update: h, preRender: f, render: p, postRender: d } = r, g = () => {
|
|
146
|
+
const x = it.useManualTiming, P = x ? s.timestamp : performance.now();
|
|
147
|
+
i = !1, x || (s.delta = n ? 1e3 / 60 : Math.max(Math.min(P - s.timestamp, to), 1)), s.timestamp = P, s.isProcessing = !0, a.process(s), l.process(s), c.process(s), u.process(s), h.process(s), f.process(s), p.process(s), d.process(s), s.isProcessing = !1, i && e && (n = !1, t(g));
|
|
148
|
+
}, m = () => {
|
|
149
|
+
i = !0, n = !0, s.isProcessing || t(g);
|
|
150
150
|
};
|
|
151
151
|
return {
|
|
152
|
-
schedule: zt.reduce((x,
|
|
153
|
-
const
|
|
154
|
-
return x[
|
|
152
|
+
schedule: zt.reduce((x, P) => {
|
|
153
|
+
const b = r[P];
|
|
154
|
+
return x[P] = (M, w = !1, S = !1) => (i || m(), b.schedule(M, w, S)), x;
|
|
155
155
|
}, {}),
|
|
156
156
|
cancel: (x) => {
|
|
157
|
-
for (let
|
|
157
|
+
for (let P = 0; P < zt.length; P++) r[zt[P]].cancel(x);
|
|
158
158
|
},
|
|
159
159
|
state: s,
|
|
160
160
|
steps: r
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
var { schedule:
|
|
164
|
-
function
|
|
163
|
+
var { schedule: V, cancel: nt, state: k, steps: ve } = /* @__PURE__ */ gs(typeof requestAnimationFrame < "u" ? requestAnimationFrame : K, !0), Xt;
|
|
164
|
+
function eo() {
|
|
165
165
|
Xt = void 0;
|
|
166
166
|
}
|
|
167
|
-
var
|
|
168
|
-
now: () => (Xt === void 0 &&
|
|
167
|
+
var I = {
|
|
168
|
+
now: () => (Xt === void 0 && I.set(k.isProcessing || it.useManualTiming ? k.timestamp : performance.now()), Xt),
|
|
169
169
|
set: (t) => {
|
|
170
|
-
Xt = t, queueMicrotask(
|
|
170
|
+
Xt = t, queueMicrotask(eo);
|
|
171
171
|
}
|
|
172
|
-
},
|
|
173
|
-
function
|
|
172
|
+
}, ys = (t) => (e) => typeof e == "string" && e.startsWith(t), Ts = /* @__PURE__ */ ys("--"), io = /* @__PURE__ */ ys("var(--"), ci = (t) => io(t) ? no.test(t.split("/*")[0].trim()) : !1, no = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
173
|
+
function Fi(t) {
|
|
174
174
|
return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
|
|
175
175
|
}
|
|
176
|
-
var
|
|
176
|
+
var Vt = {
|
|
177
177
|
test: (t) => typeof t == "number",
|
|
178
178
|
parse: parseFloat,
|
|
179
179
|
transform: (t) => t
|
|
180
|
-
},
|
|
181
|
-
...
|
|
182
|
-
transform: (t) =>
|
|
180
|
+
}, It = {
|
|
181
|
+
...Vt,
|
|
182
|
+
transform: (t) => J(0, 1, t)
|
|
183
183
|
}, Ht = {
|
|
184
|
-
...
|
|
184
|
+
...Vt,
|
|
185
185
|
default: 1
|
|
186
|
-
},
|
|
187
|
-
function
|
|
186
|
+
}, Lt = (t) => Math.round(t * 1e5) / 1e5, hi = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
187
|
+
function so(t) {
|
|
188
188
|
return t == null;
|
|
189
189
|
}
|
|
190
|
-
var
|
|
190
|
+
var ro = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, fi = (t, e) => (i) => !!(typeof i == "string" && ro.test(i) && i.startsWith(t) || e && !so(i) && Object.prototype.hasOwnProperty.call(i, e)), xs = (t, e, i) => (n) => {
|
|
191
191
|
if (typeof n != "string") return n;
|
|
192
192
|
const [s, o, r, a] = n.match(hi);
|
|
193
193
|
return {
|
|
@@ -196,15 +196,15 @@ var oo = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(
|
|
|
196
196
|
[i]: parseFloat(r),
|
|
197
197
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
198
198
|
};
|
|
199
|
-
},
|
|
200
|
-
...
|
|
201
|
-
transform: (t) => Math.round(
|
|
202
|
-
},
|
|
199
|
+
}, oo = (t) => J(0, 255, t), ge = {
|
|
200
|
+
...Vt,
|
|
201
|
+
transform: (t) => Math.round(oo(t))
|
|
202
|
+
}, ct = {
|
|
203
203
|
test: /* @__PURE__ */ fi("rgb", "red"),
|
|
204
|
-
parse: /* @__PURE__ */
|
|
205
|
-
transform: ({ red: t, green: e, blue: i, alpha: n = 1 }) => "rgba(" + ge.transform(t) + ", " + ge.transform(e) + ", " + ge.transform(i) + ", " +
|
|
204
|
+
parse: /* @__PURE__ */ xs("red", "green", "blue"),
|
|
205
|
+
transform: ({ red: t, green: e, blue: i, alpha: n = 1 }) => "rgba(" + ge.transform(t) + ", " + ge.transform(e) + ", " + ge.transform(i) + ", " + Lt(It.transform(n)) + ")"
|
|
206
206
|
};
|
|
207
|
-
function
|
|
207
|
+
function ao(t) {
|
|
208
208
|
let e = "", i = "", n = "", s = "";
|
|
209
209
|
return t.length > 5 ? (e = t.substring(1, 3), i = t.substring(3, 5), n = t.substring(5, 7), s = t.substring(7, 9)) : (e = t.substring(1, 2), i = t.substring(2, 3), n = t.substring(3, 4), s = t.substring(4, 5), e += e, i += i, n += n, s += s), {
|
|
210
210
|
red: parseInt(e, 16),
|
|
@@ -215,34 +215,34 @@ function lo(t) {
|
|
|
215
215
|
}
|
|
216
216
|
var Le = {
|
|
217
217
|
test: /* @__PURE__ */ fi("#"),
|
|
218
|
-
parse:
|
|
219
|
-
transform:
|
|
220
|
-
},
|
|
218
|
+
parse: ao,
|
|
219
|
+
transform: ct.transform
|
|
220
|
+
}, Wt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
|
|
221
221
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
222
222
|
parse: parseFloat,
|
|
223
223
|
transform: (e) => `${e}${t}`
|
|
224
|
-
}),
|
|
225
|
-
...
|
|
226
|
-
parse: (t) =>
|
|
227
|
-
transform: (t) =>
|
|
228
|
-
},
|
|
224
|
+
}), tt = /* @__PURE__ */ Wt("deg"), Z = /* @__PURE__ */ Wt("%"), T = /* @__PURE__ */ Wt("px"), lo = /* @__PURE__ */ Wt("vh"), uo = /* @__PURE__ */ Wt("vw"), Ii = {
|
|
225
|
+
...Z,
|
|
226
|
+
parse: (t) => Z.parse(t) / 100,
|
|
227
|
+
transform: (t) => Z.transform(t * 100)
|
|
228
|
+
}, yt = {
|
|
229
229
|
test: /* @__PURE__ */ fi("hsl", "hue"),
|
|
230
|
-
parse: /* @__PURE__ */
|
|
231
|
-
transform: ({ hue: t, saturation: e, lightness: i, alpha: n = 1 }) => "hsla(" + Math.round(t) + ", " +
|
|
232
|
-
},
|
|
233
|
-
test: (t) =>
|
|
234
|
-
parse: (t) =>
|
|
235
|
-
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ?
|
|
230
|
+
parse: /* @__PURE__ */ xs("hue", "saturation", "lightness"),
|
|
231
|
+
transform: ({ hue: t, saturation: e, lightness: i, alpha: n = 1 }) => "hsla(" + Math.round(t) + ", " + Z.transform(Lt(e)) + ", " + Z.transform(Lt(i)) + ", " + Lt(It.transform(n)) + ")"
|
|
232
|
+
}, E = {
|
|
233
|
+
test: (t) => ct.test(t) || Le.test(t) || yt.test(t),
|
|
234
|
+
parse: (t) => ct.test(t) ? ct.parse(t) : yt.test(t) ? yt.parse(t) : Le.parse(t),
|
|
235
|
+
transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? ct.transform(t) : yt.transform(t),
|
|
236
236
|
getAnimatableNone: (t) => {
|
|
237
|
-
const e =
|
|
238
|
-
return e.alpha = 0,
|
|
237
|
+
const e = E.parse(t);
|
|
238
|
+
return e.alpha = 0, E.transform(e);
|
|
239
239
|
}
|
|
240
|
-
},
|
|
241
|
-
function
|
|
242
|
-
return isNaN(t) && typeof t == "string" && (t.match(hi)?.length || 0) + (t.match(
|
|
240
|
+
}, co = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
241
|
+
function ho(t) {
|
|
242
|
+
return isNaN(t) && typeof t == "string" && (t.match(hi)?.length || 0) + (t.match(co)?.length || 0) > 0;
|
|
243
243
|
}
|
|
244
|
-
var
|
|
245
|
-
function
|
|
244
|
+
var ws = "number", Ps = "color", fo = "var", po = "var(", Oi = "${}", mo = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
245
|
+
function Pt(t) {
|
|
246
246
|
const e = t.toString(), i = [], n = {
|
|
247
247
|
color: [],
|
|
248
248
|
number: [],
|
|
@@ -251,44 +251,44 @@ function bt(t) {
|
|
|
251
251
|
let o = 0;
|
|
252
252
|
return {
|
|
253
253
|
values: i,
|
|
254
|
-
split: e.replace(
|
|
254
|
+
split: e.replace(mo, (r) => (E.test(r) ? (n.color.push(o), s.push(Ps), i.push(E.parse(r))) : r.startsWith(po) ? (n.var.push(o), s.push(fo), i.push(r)) : (n.number.push(o), s.push(ws), i.push(parseFloat(r))), ++o, Oi)).split(Oi),
|
|
255
255
|
indexes: n,
|
|
256
256
|
types: s
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
|
-
function
|
|
260
|
-
return
|
|
259
|
+
function vo(t) {
|
|
260
|
+
return Pt(t).values;
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function Ss({ split: t, types: e }) {
|
|
263
263
|
const i = t.length;
|
|
264
264
|
return (n) => {
|
|
265
265
|
let s = "";
|
|
266
266
|
for (let o = 0; o < i; o++)
|
|
267
267
|
if (s += t[o], n[o] !== void 0) {
|
|
268
268
|
const r = e[o];
|
|
269
|
-
r ===
|
|
269
|
+
r === ws ? s += Lt(n[o]) : r === Ps ? s += E.transform(n[o]) : s += n[o];
|
|
270
270
|
}
|
|
271
271
|
return s;
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
return
|
|
276
|
-
}
|
|
277
|
-
var
|
|
278
|
-
function
|
|
279
|
-
const e =
|
|
280
|
-
return
|
|
281
|
-
}
|
|
282
|
-
var
|
|
283
|
-
test:
|
|
284
|
-
parse:
|
|
285
|
-
createTransformer:
|
|
286
|
-
getAnimatableNone:
|
|
274
|
+
function go(t) {
|
|
275
|
+
return Ss(Pt(t));
|
|
276
|
+
}
|
|
277
|
+
var yo = (t) => typeof t == "number" ? 0 : E.test(t) ? E.getAnimatableNone(t) : t, To = (t, e) => typeof t == "number" ? e?.trim().endsWith("/") ? t : 0 : yo(t);
|
|
278
|
+
function xo(t) {
|
|
279
|
+
const e = Pt(t);
|
|
280
|
+
return Ss(e)(e.values.map((i, n) => To(i, e.split[n])));
|
|
281
|
+
}
|
|
282
|
+
var X = {
|
|
283
|
+
test: ho,
|
|
284
|
+
parse: vo,
|
|
285
|
+
createTransformer: go,
|
|
286
|
+
getAnimatableNone: xo
|
|
287
287
|
};
|
|
288
288
|
function ye(t, e, i) {
|
|
289
289
|
return i < 0 && (i += 1), i > 1 && (i -= 1), i < 1 / 6 ? t + (e - t) * 6 * i : i < 1 / 2 ? e : i < 2 / 3 ? t + (e - t) * (2 / 3 - i) * 6 : t;
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function wo({ hue: t, saturation: e, lightness: i, alpha: n }) {
|
|
292
292
|
t /= 360, e /= 100, i /= 100;
|
|
293
293
|
let s = 0, o = 0, r = 0;
|
|
294
294
|
if (!e) s = o = r = i;
|
|
@@ -306,43 +306,43 @@ function Po({ hue: t, saturation: e, lightness: i, alpha: n }) {
|
|
|
306
306
|
function ne(t, e) {
|
|
307
307
|
return (i) => i > 0 ? e : t;
|
|
308
308
|
}
|
|
309
|
-
var
|
|
309
|
+
var A = (t, e, i) => t + (e - t) * i, Te = (t, e, i) => {
|
|
310
310
|
const n = t * t, s = i * (e * e - n) + n;
|
|
311
311
|
return s < 0 ? 0 : Math.sqrt(s);
|
|
312
|
-
},
|
|
312
|
+
}, Po = [
|
|
313
313
|
Le,
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
],
|
|
317
|
-
function
|
|
318
|
-
const e =
|
|
319
|
-
if (
|
|
314
|
+
ct,
|
|
315
|
+
yt
|
|
316
|
+
], So = (t) => Po.find((e) => e.test(t));
|
|
317
|
+
function ji(t) {
|
|
318
|
+
const e = So(t);
|
|
319
|
+
if (At(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e) return !1;
|
|
320
320
|
let i = e.parse(t);
|
|
321
|
-
return e ===
|
|
321
|
+
return e === yt && (i = wo(i)), i;
|
|
322
322
|
}
|
|
323
|
-
var
|
|
324
|
-
const i =
|
|
323
|
+
var Ni = (t, e) => {
|
|
324
|
+
const i = ji(t), n = ji(e);
|
|
325
325
|
if (!i || !n) return ne(t, e);
|
|
326
326
|
const s = { ...i };
|
|
327
|
-
return (o) => (s.red = Te(i.red, n.red, o), s.green = Te(i.green, n.green, o), s.blue = Te(i.blue, n.blue, o), s.alpha =
|
|
327
|
+
return (o) => (s.red = Te(i.red, n.red, o), s.green = Te(i.green, n.green, o), s.blue = Te(i.blue, n.blue, o), s.alpha = A(i.alpha, n.alpha, o), ct.transform(s));
|
|
328
328
|
}, ke = /* @__PURE__ */ new Set(["none", "hidden"]);
|
|
329
|
-
function
|
|
329
|
+
function bo(t, e) {
|
|
330
330
|
return ke.has(t) ? (i) => i <= 0 ? t : e : (i) => i >= 1 ? e : t;
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
return (i) =>
|
|
332
|
+
function Ao(t, e) {
|
|
333
|
+
return (i) => A(t, e, i);
|
|
334
334
|
}
|
|
335
335
|
function di(t) {
|
|
336
|
-
return typeof t == "number" ?
|
|
336
|
+
return typeof t == "number" ? Ao : typeof t == "string" ? ci(t) ? ne : E.test(t) ? Ni : Co : Array.isArray(t) ? bs : typeof t == "object" ? E.test(t) ? Ni : Vo : ne;
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function bs(t, e) {
|
|
339
339
|
const i = [...t], n = i.length, s = t.map((o, r) => di(o)(o, e[r]));
|
|
340
340
|
return (o) => {
|
|
341
341
|
for (let r = 0; r < n; r++) i[r] = s[r](o);
|
|
342
342
|
return i;
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function Vo(t, e) {
|
|
346
346
|
const i = {
|
|
347
347
|
...t,
|
|
348
348
|
...e
|
|
@@ -353,7 +353,7 @@ function Mo(t, e) {
|
|
|
353
353
|
return i;
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function Mo(t, e) {
|
|
357
357
|
const i = [], n = {
|
|
358
358
|
color: 0,
|
|
359
359
|
var: 0,
|
|
@@ -365,43 +365,41 @@ function Co(t, e) {
|
|
|
365
365
|
}
|
|
366
366
|
return i;
|
|
367
367
|
}
|
|
368
|
-
var
|
|
369
|
-
const i =
|
|
370
|
-
return n.indexes.var.length === s.indexes.var.length && n.indexes.color.length === s.indexes.color.length && n.indexes.number.length >= s.indexes.number.length ? ke.has(t) && !s.values.length || ke.has(e) && !n.values.length ?
|
|
368
|
+
var Co = (t, e) => {
|
|
369
|
+
const i = X.createTransformer(e), n = Pt(t), s = Pt(e);
|
|
370
|
+
return n.indexes.var.length === s.indexes.var.length && n.indexes.color.length === s.indexes.color.length && n.indexes.number.length >= s.indexes.number.length ? ke.has(t) && !s.values.length || ke.has(e) && !n.values.length ? bo(t, e) : Nt(bs(Mo(n, s), s.values), i) : (At(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`, "complex-values-different"), ne(t, e));
|
|
371
371
|
};
|
|
372
|
-
function
|
|
373
|
-
return typeof t == "number" && typeof e == "number" && typeof i == "number" ?
|
|
372
|
+
function As(t, e, i) {
|
|
373
|
+
return typeof t == "number" && typeof e == "number" && typeof i == "number" ? A(t, e, i) : di(t)(t, e);
|
|
374
374
|
}
|
|
375
|
-
var
|
|
375
|
+
var Do = (t) => {
|
|
376
376
|
const e = ({ timestamp: i }) => t(i);
|
|
377
377
|
return {
|
|
378
|
-
start: (i = !0) =>
|
|
379
|
-
stop: () =>
|
|
380
|
-
now: () =>
|
|
378
|
+
start: (i = !0) => V.update(e, i),
|
|
379
|
+
stop: () => nt(e),
|
|
380
|
+
now: () => k.isProcessing ? k.timestamp : I.now()
|
|
381
381
|
};
|
|
382
|
-
},
|
|
382
|
+
}, Vs = (t, e, i = 10) => {
|
|
383
383
|
let n = "";
|
|
384
384
|
const s = Math.max(Math.round(e / i), 2);
|
|
385
385
|
for (let o = 0; o < s; o++) n += Math.round(t(o / (s - 1)) * 1e4) / 1e4 + ", ";
|
|
386
386
|
return `linear(${n.substring(0, n.length - 2)})`;
|
|
387
|
-
},
|
|
388
|
-
function
|
|
389
|
-
let
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}
|
|
396
|
-
function Ro(t, e = 100, i) {
|
|
387
|
+
}, pi = 2e4;
|
|
388
|
+
function mi(t, e = 50, i = pi, n) {
|
|
389
|
+
let s = 0, o = t.next(s);
|
|
390
|
+
for (n?.push(o.value); !o.done && s < i; )
|
|
391
|
+
s += e, o = t.next(s), n?.push(o.value);
|
|
392
|
+
return s >= i ? 1 / 0 : s;
|
|
393
|
+
}
|
|
394
|
+
function Eo(t, e = 100, i) {
|
|
397
395
|
const n = i({
|
|
398
396
|
...t,
|
|
399
397
|
keyframes: [0, e]
|
|
400
|
-
}), s = Math.min(
|
|
398
|
+
}), s = Math.min(mi(n), pi);
|
|
401
399
|
return {
|
|
402
400
|
type: "keyframes",
|
|
403
401
|
ease: (o) => n.next(s * o).value / e,
|
|
404
|
-
duration:
|
|
402
|
+
duration: $(s)
|
|
405
403
|
};
|
|
406
404
|
}
|
|
407
405
|
var C = {
|
|
@@ -428,32 +426,32 @@ var C = {
|
|
|
428
426
|
function Be(t, e) {
|
|
429
427
|
return t * Math.sqrt(1 - e * e);
|
|
430
428
|
}
|
|
431
|
-
var
|
|
432
|
-
function
|
|
429
|
+
var Ro = 12;
|
|
430
|
+
function Lo(t, e, i) {
|
|
433
431
|
let n = i;
|
|
434
|
-
for (let s = 1; s <
|
|
432
|
+
for (let s = 1; s < Ro; s++) n = n - t(n) / e(n);
|
|
435
433
|
return n;
|
|
436
434
|
}
|
|
437
|
-
var
|
|
438
|
-
function
|
|
435
|
+
var Ui = 1e-3;
|
|
436
|
+
function ko({ duration: t = C.duration, bounce: e = C.bounce, velocity: i = C.velocity, mass: n = C.mass }) {
|
|
439
437
|
let s, o;
|
|
440
|
-
|
|
438
|
+
At(t <= N(C.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
|
|
441
439
|
let r = 1 - e;
|
|
442
|
-
r =
|
|
440
|
+
r = J(C.minDamping, C.maxDamping, r), t = J(C.minDuration, C.maxDuration, $(t)), r < 1 ? (s = (c) => {
|
|
443
441
|
const u = c * r, h = u * t, f = u - i, p = Be(c, r), d = Math.exp(-h);
|
|
444
|
-
return
|
|
442
|
+
return Ui - f / p * d;
|
|
445
443
|
}, o = (c) => {
|
|
446
|
-
const u = c * r * t, h = u * i + i, f =
|
|
447
|
-
return (-s(c) +
|
|
444
|
+
const u = c * r * t, h = u * i + i, f = r * r * c * c * t, p = Math.exp(-u), d = Be(c * c, r);
|
|
445
|
+
return (-s(c) + Ui > 0 ? -1 : 1) * ((h - f) * p) / d;
|
|
448
446
|
}) : (s = (c) => -1e-3 + Math.exp(-c * t) * ((c - i) * t + 1), o = (c) => Math.exp(-c * t) * ((i - c) * (t * t)));
|
|
449
|
-
const a = 5 / t, l =
|
|
450
|
-
if (t =
|
|
447
|
+
const a = 5 / t, l = Lo(s, o, a);
|
|
448
|
+
if (t = N(t), isNaN(l)) return {
|
|
451
449
|
stiffness: C.stiffness,
|
|
452
450
|
damping: C.damping,
|
|
453
451
|
duration: t
|
|
454
452
|
};
|
|
455
453
|
{
|
|
456
|
-
const c =
|
|
454
|
+
const c = l * l * n;
|
|
457
455
|
return {
|
|
458
456
|
stiffness: c,
|
|
459
457
|
damping: r * 2 * Math.sqrt(n * c),
|
|
@@ -461,15 +459,15 @@ function Bo({ duration: t = C.duration, bounce: e = C.bounce, velocity: i = C.ve
|
|
|
461
459
|
};
|
|
462
460
|
}
|
|
463
461
|
}
|
|
464
|
-
var
|
|
462
|
+
var Bo = ["duration", "bounce"], Fo = [
|
|
465
463
|
"stiffness",
|
|
466
464
|
"damping",
|
|
467
465
|
"mass"
|
|
468
466
|
];
|
|
469
|
-
function
|
|
467
|
+
function Wi(t, e) {
|
|
470
468
|
return e.some((i) => t[i] !== void 0);
|
|
471
469
|
}
|
|
472
|
-
function
|
|
470
|
+
function Io(t) {
|
|
473
471
|
let e = {
|
|
474
472
|
velocity: C.velocity,
|
|
475
473
|
stiffness: C.stiffness,
|
|
@@ -478,9 +476,9 @@ function Oo(t) {
|
|
|
478
476
|
isResolvedFromDuration: !1,
|
|
479
477
|
...t
|
|
480
478
|
};
|
|
481
|
-
if (!
|
|
479
|
+
if (!Wi(t, Fo) && Wi(t, Bo))
|
|
482
480
|
if (e.velocity = 0, t.visualDuration) {
|
|
483
|
-
const i = t.visualDuration, n = 2 * Math.PI / (i * 1.2), s = n * n, o = 2 *
|
|
481
|
+
const i = t.visualDuration, n = 2 * Math.PI / (i * 1.2), s = n * n, o = 2 * J(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(s);
|
|
484
482
|
e = {
|
|
485
483
|
...e,
|
|
486
484
|
mass: C.mass,
|
|
@@ -488,7 +486,7 @@ function Oo(t) {
|
|
|
488
486
|
damping: o
|
|
489
487
|
};
|
|
490
488
|
} else {
|
|
491
|
-
const i =
|
|
489
|
+
const i = ko({
|
|
492
490
|
...t,
|
|
493
491
|
velocity: 0
|
|
494
492
|
});
|
|
@@ -510,154 +508,156 @@ function se(t = C.visualDuration, e = C.bounce) {
|
|
|
510
508
|
const o = i.keyframes[0], r = i.keyframes[i.keyframes.length - 1], a = {
|
|
511
509
|
done: !1,
|
|
512
510
|
value: o
|
|
513
|
-
}, { stiffness: l, damping: c, mass: u, duration: h, velocity: f, isResolvedFromDuration: p } =
|
|
511
|
+
}, { stiffness: l, damping: c, mass: u, duration: h, velocity: f, isResolvedFromDuration: p } = Io({
|
|
514
512
|
...i,
|
|
515
|
-
velocity:
|
|
516
|
-
}), d = f || 0,
|
|
517
|
-
n || (n =
|
|
518
|
-
let
|
|
519
|
-
if (
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
513
|
+
velocity: -$(i.velocity || 0)
|
|
514
|
+
}), d = f || 0, g = c / (2 * Math.sqrt(l * u)), m = r - o, y = $(Math.sqrt(l / u)), v = g * y, x = Math.abs(m) < 5;
|
|
515
|
+
n || (n = x ? C.restSpeed.granular : C.restSpeed.default), s || (s = x ? C.restDelta.granular : C.restDelta.default);
|
|
516
|
+
let P, b;
|
|
517
|
+
if (g < 1) {
|
|
518
|
+
const w = Be(y, g), S = (d + v * m) / w, R = v * S + m * w, pt = v * m - S * w;
|
|
519
|
+
let z = -1, U = 0, H = 0;
|
|
520
|
+
const Kt = (W) => {
|
|
521
|
+
if (W !== z) {
|
|
522
|
+
z = W;
|
|
523
|
+
const Dt = Math.exp(-v * W), D = Math.sin(w * W), F = Math.cos(w * W);
|
|
524
|
+
U = r - Dt * (S * D + m * F), H = Dt * (R * D + pt * F);
|
|
525
|
+
}
|
|
526
|
+
};
|
|
527
|
+
P = (W) => (Kt(W), U), b = (W) => (Kt(W), H);
|
|
528
|
+
} else if (g === 1) {
|
|
529
|
+
P = (S) => r - Math.exp(-y * S) * (m + (d + y * m) * S);
|
|
530
|
+
const w = d + y * m;
|
|
531
|
+
b = (S) => Math.exp(-y * S) * (y * w * S - d);
|
|
528
532
|
} else {
|
|
529
|
-
const
|
|
530
|
-
|
|
531
|
-
const
|
|
532
|
-
return r -
|
|
533
|
+
const w = y * Math.sqrt(g * g - 1);
|
|
534
|
+
P = (z) => {
|
|
535
|
+
const U = Math.exp(-v * z), H = Math.min(w * z, 300);
|
|
536
|
+
return r - U * ((d + v * m) * Math.sinh(H) + w * m * Math.cosh(H)) / w;
|
|
533
537
|
};
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
const
|
|
537
|
-
return
|
|
538
|
+
const S = (d + v * m) / w, R = v * S - m * w, pt = v * m - S * w;
|
|
539
|
+
b = (z) => {
|
|
540
|
+
const U = Math.exp(-v * z), H = Math.min(w * z, 300);
|
|
541
|
+
return U * (R * Math.sinh(H) + pt * Math.cosh(H));
|
|
538
542
|
};
|
|
539
543
|
}
|
|
540
|
-
const
|
|
544
|
+
const M = {
|
|
541
545
|
calculatedDuration: p && h || null,
|
|
542
|
-
velocity: (
|
|
543
|
-
next: (
|
|
544
|
-
|
|
545
|
-
const N = Math.exp(-m * v * b), at = Math.sin(P * b), X = Math.cos(P * b), et = r - N * (A * at + g * X), Y = W(N * (D * at + S * X));
|
|
546
|
-
return a.done = Math.abs(Y) <= n && Math.abs(r - et) <= s, a.value = a.done ? r : et, a;
|
|
547
|
-
}
|
|
548
|
-
const k = x(b);
|
|
546
|
+
velocity: (w) => N(b(w)),
|
|
547
|
+
next: (w) => {
|
|
548
|
+
const S = P(w);
|
|
549
549
|
if (p)
|
|
550
|
-
a.done =
|
|
550
|
+
a.done = w >= h;
|
|
551
551
|
else {
|
|
552
|
-
const
|
|
553
|
-
a.done = Math.abs(
|
|
552
|
+
const R = N(b(w));
|
|
553
|
+
a.done = Math.abs(R) <= n && Math.abs(r - S) <= s;
|
|
554
554
|
}
|
|
555
|
-
return a.value = a.done ? r :
|
|
555
|
+
return a.value = a.done ? r : S, a;
|
|
556
556
|
},
|
|
557
557
|
toString: () => {
|
|
558
|
-
const
|
|
559
|
-
return
|
|
558
|
+
const w = Math.min(mi(M), pi), S = Vs((R) => M.next(w * R).value, w, 30);
|
|
559
|
+
return w + "ms " + S;
|
|
560
560
|
},
|
|
561
561
|
toTransition: () => {
|
|
562
562
|
}
|
|
563
563
|
};
|
|
564
|
-
return
|
|
564
|
+
return M;
|
|
565
565
|
}
|
|
566
566
|
se.applyToOptions = (t) => {
|
|
567
|
-
const e =
|
|
568
|
-
return t.ease = e.ease, t.duration =
|
|
567
|
+
const e = Eo(t, 100, se);
|
|
568
|
+
return t.ease = e.ease, t.duration = N(e.duration), t.type = "keyframes", t;
|
|
569
569
|
};
|
|
570
|
-
var jo = 5;
|
|
571
|
-
function Ms(t, e, i) {
|
|
572
|
-
const n = Math.max(e - jo, 0);
|
|
573
|
-
return rs(i - t(n), e - n);
|
|
574
|
-
}
|
|
575
570
|
function Fe({ keyframes: t, velocity: e = 0, power: i = 0.8, timeConstant: n = 325, bounceDamping: s = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: c = 0.5, restSpeed: u }) {
|
|
576
571
|
const h = t[0], f = {
|
|
577
572
|
done: !1,
|
|
578
573
|
value: h
|
|
579
|
-
}, p = (
|
|
580
|
-
let
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
const
|
|
584
|
-
const
|
|
585
|
-
f.done = Math.abs(
|
|
574
|
+
}, p = (w) => w < a || w > l, d = (w) => a === void 0 ? l : l === void 0 || Math.abs(a - w) < Math.abs(l - w) ? a : l;
|
|
575
|
+
let g = i * e;
|
|
576
|
+
const m = h + g, y = r === void 0 ? m : r(m);
|
|
577
|
+
y !== m && (g = y - h);
|
|
578
|
+
const v = (w) => -g * Math.exp(-w / n), x = (w) => {
|
|
579
|
+
const S = v(w);
|
|
580
|
+
f.done = Math.abs(S) <= c, f.value = f.done ? y : y + S;
|
|
586
581
|
};
|
|
587
|
-
let P,
|
|
588
|
-
const
|
|
589
|
-
p(f.value) && (P =
|
|
582
|
+
let P, b;
|
|
583
|
+
const M = (w) => {
|
|
584
|
+
p(f.value) && (P = w, b = se({
|
|
590
585
|
keyframes: [f.value, d(f.value)],
|
|
591
|
-
velocity:
|
|
586
|
+
velocity: -v(w) / n * 1e3,
|
|
592
587
|
damping: s,
|
|
593
588
|
stiffness: o,
|
|
594
589
|
restDelta: c,
|
|
595
590
|
restSpeed: u
|
|
596
591
|
}));
|
|
597
592
|
};
|
|
598
|
-
return
|
|
593
|
+
return M(0), {
|
|
599
594
|
calculatedDuration: null,
|
|
600
|
-
next: (
|
|
601
|
-
let
|
|
602
|
-
return !
|
|
595
|
+
next: (w) => {
|
|
596
|
+
let S = !1;
|
|
597
|
+
return !b && P === void 0 && (S = !0, x(w), M(w)), P !== void 0 && w >= P ? b.next(w - P) : (!S && x(w), f);
|
|
603
598
|
}
|
|
604
599
|
};
|
|
605
600
|
}
|
|
606
|
-
function
|
|
607
|
-
const n = [], s = i ||
|
|
601
|
+
function Oo(t, e, i) {
|
|
602
|
+
const n = [], s = i || it.mix || As, o = t.length - 1;
|
|
608
603
|
for (let r = 0; r < o; r++) {
|
|
609
604
|
let a = s(t[r], t[r + 1]);
|
|
610
605
|
if (e) {
|
|
611
|
-
const l = Array.isArray(e) ? e[r] ||
|
|
612
|
-
a =
|
|
606
|
+
const l = Array.isArray(e) ? e[r] || K : e;
|
|
607
|
+
a = Nt(l, a);
|
|
613
608
|
}
|
|
614
609
|
n.push(a);
|
|
615
610
|
}
|
|
616
611
|
return n;
|
|
617
612
|
}
|
|
618
|
-
function
|
|
613
|
+
function jo(t, e, { clamp: i = !0, ease: n, mixer: s } = {}) {
|
|
619
614
|
const o = t.length;
|
|
620
|
-
if (
|
|
615
|
+
if (Q(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1) return () => e[0];
|
|
621
616
|
if (o === 2 && e[0] === e[1]) return () => e[1];
|
|
622
617
|
const r = t[0] === t[1];
|
|
623
618
|
t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
624
|
-
const a =
|
|
619
|
+
const a = Oo(e, n, s), l = a.length, c = (u) => {
|
|
625
620
|
if (r && u < t[0]) return e[0];
|
|
626
621
|
let h = 0;
|
|
627
622
|
if (l > 1)
|
|
628
623
|
for (; h < t.length - 2 && !(u < t[h + 1]); h++) ;
|
|
629
|
-
const f =
|
|
624
|
+
const f = Ft(t[h], t[h + 1], u);
|
|
630
625
|
return a[h](f);
|
|
631
626
|
};
|
|
632
|
-
return i ? (u) => c(
|
|
627
|
+
return i ? (u) => c(J(t[0], t[o - 1], u)) : c;
|
|
633
628
|
}
|
|
634
|
-
function
|
|
629
|
+
function No(t, e) {
|
|
635
630
|
const i = t[t.length - 1];
|
|
636
631
|
for (let n = 1; n <= e; n++) {
|
|
637
|
-
const s =
|
|
638
|
-
t.push(
|
|
632
|
+
const s = Ft(0, e, n);
|
|
633
|
+
t.push(A(i, 1, s));
|
|
639
634
|
}
|
|
640
635
|
}
|
|
641
|
-
function
|
|
636
|
+
function Uo(t) {
|
|
642
637
|
const e = [0];
|
|
643
|
-
return
|
|
638
|
+
return No(e, t.length - 1), e;
|
|
644
639
|
}
|
|
645
|
-
function
|
|
640
|
+
function Wo(t, e) {
|
|
646
641
|
return t.map((i) => i * e);
|
|
647
642
|
}
|
|
648
|
-
function
|
|
649
|
-
return t.map(() => e ||
|
|
643
|
+
function $o(t, e) {
|
|
644
|
+
return t.map(() => e || ms).splice(0, t.length - 1);
|
|
650
645
|
}
|
|
651
|
-
function
|
|
652
|
-
const s =
|
|
646
|
+
function Tt({ duration: t = 300, keyframes: e, times: i, ease: n = "easeInOut" }) {
|
|
647
|
+
const s = Zr(n) ? n.map(Bi) : Bi(n), o = {
|
|
653
648
|
done: !1,
|
|
654
649
|
value: e[0]
|
|
655
|
-
}, r =
|
|
650
|
+
}, r = Wo(i && i.length === e.length ? i : Uo(e), t), a = jo(r, e, { ease: Array.isArray(s) ? s : $o(e, s) });
|
|
656
651
|
return {
|
|
657
652
|
calculatedDuration: t,
|
|
658
653
|
next: (l) => (o.value = a(l), o.done = l >= t, o)
|
|
659
654
|
};
|
|
660
655
|
}
|
|
656
|
+
var Ko = 5;
|
|
657
|
+
function zo(t, e, i) {
|
|
658
|
+
const n = Math.max(e - Ko, 0);
|
|
659
|
+
return os(i - t(n), e - n);
|
|
660
|
+
}
|
|
661
661
|
var Ho = (t) => t !== null;
|
|
662
662
|
function fe(t, { repeat: e, repeatType: i = "loop" }, n, s = 1) {
|
|
663
663
|
const o = t.filter(Ho), r = s < 0 || e && i !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
|
|
@@ -666,14 +666,14 @@ function fe(t, { repeat: e, repeatType: i = "loop" }, n, s = 1) {
|
|
|
666
666
|
var Go = {
|
|
667
667
|
decay: Fe,
|
|
668
668
|
inertia: Fe,
|
|
669
|
-
tween:
|
|
670
|
-
keyframes:
|
|
669
|
+
tween: Tt,
|
|
670
|
+
keyframes: Tt,
|
|
671
671
|
spring: se
|
|
672
672
|
};
|
|
673
|
-
function
|
|
673
|
+
function Ms(t) {
|
|
674
674
|
typeof t.type == "string" && (t.type = Go[t.type]);
|
|
675
675
|
}
|
|
676
|
-
var
|
|
676
|
+
var vi = class {
|
|
677
677
|
constructor() {
|
|
678
678
|
this.updateFinished();
|
|
679
679
|
}
|
|
@@ -691,23 +691,23 @@ var mi = class {
|
|
|
691
691
|
then(t, e) {
|
|
692
692
|
return this.finished.then(t, e);
|
|
693
693
|
}
|
|
694
|
-
}, _o = (t) => t / 100, re = class extends
|
|
694
|
+
}, _o = (t) => t / 100, re = class extends vi {
|
|
695
695
|
constructor(t) {
|
|
696
696
|
super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
|
|
697
697
|
done: !1,
|
|
698
698
|
value: void 0
|
|
699
699
|
}, this.stop = () => {
|
|
700
700
|
const { motionValue: e } = this.options;
|
|
701
|
-
e && e.updatedAt !==
|
|
701
|
+
e && e.updatedAt !== I.now() && this.tick(I.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
|
|
702
702
|
}, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
|
|
703
703
|
}
|
|
704
704
|
initAnimation() {
|
|
705
705
|
const { options: t } = this;
|
|
706
|
-
|
|
707
|
-
const { type: e =
|
|
706
|
+
Ms(t);
|
|
707
|
+
const { type: e = Tt, repeat: i = 0, repeatDelay: n = 0, repeatType: s, velocity: o = 0 } = t;
|
|
708
708
|
let { keyframes: r } = t;
|
|
709
|
-
const a = e ||
|
|
710
|
-
process.env.NODE_ENV !== "production" && a !==
|
|
709
|
+
const a = e || Tt;
|
|
710
|
+
process.env.NODE_ENV !== "production" && a !== Tt && Q(r.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`, "spring-two-frames"), a !== Tt && typeof r[0] != "number" && (this.mixKeyframes = Nt(_o, As(r[0], r[1])), r = [0, 100]);
|
|
711
711
|
const l = a({
|
|
712
712
|
...t,
|
|
713
713
|
keyframes: r
|
|
@@ -716,7 +716,7 @@ var mi = class {
|
|
|
716
716
|
...t,
|
|
717
717
|
keyframes: [...r].reverse(),
|
|
718
718
|
velocity: -o
|
|
719
|
-
})), l.calculatedDuration === null && (l.calculatedDuration =
|
|
719
|
+
})), l.calculatedDuration === null && (l.calculatedDuration = mi(l));
|
|
720
720
|
const { calculatedDuration: c } = l;
|
|
721
721
|
this.calculatedDuration = c, this.resolvedDuration = c + n, this.totalDuration = this.resolvedDuration * (i + 1) - n, this.generator = l;
|
|
722
722
|
}
|
|
@@ -727,62 +727,62 @@ var mi = class {
|
|
|
727
727
|
tick(t, e = !1) {
|
|
728
728
|
const { generator: i, totalDuration: n, mixKeyframes: s, mirroredGenerator: o, resolvedDuration: r, calculatedDuration: a } = this;
|
|
729
729
|
if (this.startTime === null) return i.next(0);
|
|
730
|
-
const { delay: l = 0, keyframes: c, repeat: u, repeatType: h, repeatDelay: f, type: p, onUpdate: d, finalKeyframe:
|
|
730
|
+
const { delay: l = 0, keyframes: c, repeat: u, repeatType: h, repeatDelay: f, type: p, onUpdate: d, finalKeyframe: g } = this.options;
|
|
731
731
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - n / this.speed, this.startTime)), e ? this.currentTime = t : this.updateTime(t);
|
|
732
|
-
const
|
|
733
|
-
this.currentTime = Math.max(
|
|
734
|
-
let
|
|
732
|
+
const m = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), y = this.playbackSpeed >= 0 ? m < 0 : m > n;
|
|
733
|
+
this.currentTime = Math.max(m, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = n);
|
|
734
|
+
let v = this.currentTime, x = i;
|
|
735
735
|
if (u) {
|
|
736
|
-
const
|
|
737
|
-
let S = Math.floor(
|
|
738
|
-
!
|
|
736
|
+
const w = Math.min(this.currentTime, n) / r;
|
|
737
|
+
let S = Math.floor(w), R = w % 1;
|
|
738
|
+
!R && w >= 1 && (R = 1), R === 1 && S--, S = Math.min(S, u + 1), S % 2 && (h === "reverse" ? (R = 1 - R, f && (R -= f / r)) : h === "mirror" && (x = o)), v = J(0, 1, R) * r;
|
|
739
739
|
}
|
|
740
|
-
let
|
|
741
|
-
|
|
742
|
-
let { done:
|
|
743
|
-
!
|
|
744
|
-
const
|
|
745
|
-
return
|
|
740
|
+
let P;
|
|
741
|
+
y ? (this.delayState.value = c[0], P = this.delayState) : P = x.next(v), s && !y && (P.value = s(P.value));
|
|
742
|
+
let { done: b } = P;
|
|
743
|
+
!y && a !== null && (b = this.playbackSpeed >= 0 ? this.currentTime >= n : this.currentTime <= 0);
|
|
744
|
+
const M = this.holdTime === null && (this.state === "finished" || this.state === "running" && b);
|
|
745
|
+
return M && p !== Fe && (P.value = fe(c, this.options, g, this.speed)), d && d(P.value), M && this.finish(), P;
|
|
746
746
|
}
|
|
747
747
|
then(t, e) {
|
|
748
748
|
return this.finished.then(t, e);
|
|
749
749
|
}
|
|
750
750
|
get duration() {
|
|
751
|
-
return
|
|
751
|
+
return $(this.calculatedDuration);
|
|
752
752
|
}
|
|
753
753
|
get iterationDuration() {
|
|
754
754
|
const { delay: t = 0 } = this.options || {};
|
|
755
|
-
return this.duration +
|
|
755
|
+
return this.duration + $(t);
|
|
756
756
|
}
|
|
757
757
|
get time() {
|
|
758
|
-
return
|
|
758
|
+
return $(this.currentTime);
|
|
759
759
|
}
|
|
760
760
|
set time(t) {
|
|
761
|
-
t =
|
|
761
|
+
t = N(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), this.driver ? this.driver.start(!1) : (this.startTime = 0, this.state = "paused", this.holdTime = t, this.tick(t));
|
|
762
762
|
}
|
|
763
763
|
getGeneratorVelocity() {
|
|
764
764
|
const t = this.currentTime;
|
|
765
765
|
if (t <= 0) return this.options.velocity || 0;
|
|
766
766
|
if (this.generator.velocity) return this.generator.velocity(t);
|
|
767
767
|
const e = this.generator.next(t).value;
|
|
768
|
-
return
|
|
768
|
+
return zo((i) => this.generator.next(i).value, t, e);
|
|
769
769
|
}
|
|
770
770
|
get speed() {
|
|
771
771
|
return this.playbackSpeed;
|
|
772
772
|
}
|
|
773
773
|
set speed(t) {
|
|
774
774
|
const e = this.playbackSpeed !== t;
|
|
775
|
-
e && this.driver && this.updateTime(
|
|
775
|
+
e && this.driver && this.updateTime(I.now()), this.playbackSpeed = t, e && this.driver && (this.time = $(this.currentTime));
|
|
776
776
|
}
|
|
777
777
|
play() {
|
|
778
778
|
if (this.isStopped) return;
|
|
779
|
-
const { driver: t =
|
|
779
|
+
const { driver: t = Do, startTime: e } = this.options;
|
|
780
780
|
this.driver || (this.driver = t((n) => this.tick(n))), this.options.onPlay?.();
|
|
781
781
|
const i = this.driver.now();
|
|
782
782
|
this.state === "finished" ? (this.updateFinished(), this.startTime = i) : this.holdTime !== null ? this.startTime = i - this.holdTime : this.startTime || (this.startTime = e ?? i), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
|
|
783
783
|
}
|
|
784
784
|
pause() {
|
|
785
|
-
this.state = "paused", this.updateTime(
|
|
785
|
+
this.state = "paused", this.updateTime(I.now()), this.holdTime = this.currentTime;
|
|
786
786
|
}
|
|
787
787
|
complete() {
|
|
788
788
|
this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
|
|
@@ -809,8 +809,8 @@ var mi = class {
|
|
|
809
809
|
function Xo(t) {
|
|
810
810
|
for (let e = 1; e < t.length; e++) t[e] ?? (t[e] = t[e - 1]);
|
|
811
811
|
}
|
|
812
|
-
var
|
|
813
|
-
const e =
|
|
812
|
+
var ht = (t) => t * 180 / Math.PI, Ie = (t) => {
|
|
813
|
+
const e = ht(Math.atan2(t[1], t[0]));
|
|
814
814
|
return Oe(e);
|
|
815
815
|
}, Yo = {
|
|
816
816
|
x: 4,
|
|
@@ -822,25 +822,25 @@ var pt = (t) => t * 180 / Math.PI, Ie = (t) => {
|
|
|
822
822
|
scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
|
|
823
823
|
rotate: Ie,
|
|
824
824
|
rotateZ: Ie,
|
|
825
|
-
skewX: (t) =>
|
|
826
|
-
skewY: (t) =>
|
|
825
|
+
skewX: (t) => ht(Math.atan(t[1])),
|
|
826
|
+
skewY: (t) => ht(Math.atan(t[2])),
|
|
827
827
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
828
|
-
}, Oe = (t) => (t = t % 360, t < 0 && (t += 360), t),
|
|
828
|
+
}, Oe = (t) => (t = t % 360, t < 0 && (t += 360), t), $i = Ie, Ki = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), zi = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), qo = {
|
|
829
829
|
x: 12,
|
|
830
830
|
y: 13,
|
|
831
831
|
z: 14,
|
|
832
832
|
translateX: 12,
|
|
833
833
|
translateY: 13,
|
|
834
834
|
translateZ: 14,
|
|
835
|
-
scaleX:
|
|
836
|
-
scaleY:
|
|
837
|
-
scale: (t) => (
|
|
838
|
-
rotateX: (t) => Oe(
|
|
839
|
-
rotateY: (t) => Oe(
|
|
840
|
-
rotateZ:
|
|
841
|
-
rotate:
|
|
842
|
-
skewX: (t) =>
|
|
843
|
-
skewY: (t) =>
|
|
835
|
+
scaleX: Ki,
|
|
836
|
+
scaleY: zi,
|
|
837
|
+
scale: (t) => (Ki(t) + zi(t)) / 2,
|
|
838
|
+
rotateX: (t) => Oe(ht(Math.atan2(t[6], t[5]))),
|
|
839
|
+
rotateY: (t) => Oe(ht(Math.atan2(-t[2], t[0]))),
|
|
840
|
+
rotateZ: $i,
|
|
841
|
+
rotate: $i,
|
|
842
|
+
skewX: (t) => ht(Math.atan(t[4])),
|
|
843
|
+
skewY: (t) => ht(Math.atan(t[1])),
|
|
844
844
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
845
845
|
};
|
|
846
846
|
function je(t) {
|
|
@@ -867,7 +867,7 @@ var Zo = (t, e) => {
|
|
|
867
867
|
function Jo(t) {
|
|
868
868
|
return parseFloat(t.trim());
|
|
869
869
|
}
|
|
870
|
-
var
|
|
870
|
+
var Mt = [
|
|
871
871
|
"transformPerspective",
|
|
872
872
|
"x",
|
|
873
873
|
"y",
|
|
@@ -885,11 +885,11 @@ var Dt = [
|
|
|
885
885
|
"skew",
|
|
886
886
|
"skewX",
|
|
887
887
|
"skewY"
|
|
888
|
-
],
|
|
888
|
+
], Ct = /* @__PURE__ */ new Set([...Mt, "pathRotation"]), Hi = (t) => t === Vt || t === T, Qo = /* @__PURE__ */ new Set([
|
|
889
889
|
"x",
|
|
890
890
|
"y",
|
|
891
891
|
"z"
|
|
892
|
-
]), ta =
|
|
892
|
+
]), ta = Mt.filter((t) => !Qo.has(t));
|
|
893
893
|
function ea(t) {
|
|
894
894
|
const e = [];
|
|
895
895
|
return ta.forEach((i) => {
|
|
@@ -897,7 +897,7 @@ function ea(t) {
|
|
|
897
897
|
n !== void 0 && (e.push([i, n.get()]), n.set(i.startsWith("scale") ? 1 : 0));
|
|
898
898
|
}), e;
|
|
899
899
|
}
|
|
900
|
-
var
|
|
900
|
+
var et = {
|
|
901
901
|
width: ({ x: t }, { paddingLeft: e = "0", paddingRight: i = "0", boxSizing: n }) => {
|
|
902
902
|
const s = t.max - t.min;
|
|
903
903
|
return n === "border-box" ? s : s - parseFloat(e) - parseFloat(i);
|
|
@@ -913,12 +913,12 @@ var nt = {
|
|
|
913
913
|
x: (t, { transform: e }) => Ne(e, "x"),
|
|
914
914
|
y: (t, { transform: e }) => Ne(e, "y")
|
|
915
915
|
};
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
var
|
|
919
|
-
function
|
|
916
|
+
et.translateX = et.x;
|
|
917
|
+
et.translateY = et.y;
|
|
918
|
+
var ft = /* @__PURE__ */ new Set(), Ue = !1, We = !1, $e = !1;
|
|
919
|
+
function Cs() {
|
|
920
920
|
if (We) {
|
|
921
|
-
const t = Array.from(
|
|
921
|
+
const t = Array.from(ft).filter((n) => n.needsMeasurement), e = new Set(t.map((n) => n.element)), i = /* @__PURE__ */ new Map();
|
|
922
922
|
e.forEach((n) => {
|
|
923
923
|
const s = ea(n);
|
|
924
924
|
s.length && (i.set(n, s), n.render());
|
|
@@ -932,22 +932,22 @@ function Ds() {
|
|
|
932
932
|
n.suspendedScrollY !== void 0 && window.scrollTo(0, n.suspendedScrollY);
|
|
933
933
|
});
|
|
934
934
|
}
|
|
935
|
-
We = !1, Ue = !1,
|
|
935
|
+
We = !1, Ue = !1, ft.forEach((t) => t.complete($e)), ft.clear();
|
|
936
936
|
}
|
|
937
|
-
function
|
|
938
|
-
|
|
937
|
+
function Ds() {
|
|
938
|
+
ft.forEach((t) => {
|
|
939
939
|
t.readKeyframes(), t.needsMeasurement && (We = !0);
|
|
940
940
|
});
|
|
941
941
|
}
|
|
942
942
|
function ia() {
|
|
943
|
-
$e = !0,
|
|
943
|
+
$e = !0, Ds(), Cs(), $e = !1;
|
|
944
944
|
}
|
|
945
|
-
var
|
|
945
|
+
var gi = class {
|
|
946
946
|
constructor(t, e, i, n, s, o = !1) {
|
|
947
947
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = e, this.name = i, this.motionValue = n, this.element = s, this.isAsync = o;
|
|
948
948
|
}
|
|
949
949
|
scheduleResolve() {
|
|
950
|
-
this.state = "scheduled", this.isAsync ? (
|
|
950
|
+
this.state = "scheduled", this.isAsync ? (ft.add(this), Ue || (Ue = !0, V.read(Ds), V.resolveKeyframes(Cs))) : (this.readKeyframes(), this.complete());
|
|
951
951
|
}
|
|
952
952
|
readKeyframes() {
|
|
953
953
|
const { unresolvedKeyframes: t, name: e, element: i, motionValue: n } = this;
|
|
@@ -971,68 +971,68 @@ var vi = class {
|
|
|
971
971
|
measureEndState() {
|
|
972
972
|
}
|
|
973
973
|
complete(t = !1) {
|
|
974
|
-
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t),
|
|
974
|
+
this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), ft.delete(this);
|
|
975
975
|
}
|
|
976
976
|
cancel() {
|
|
977
|
-
this.state === "scheduled" && (
|
|
977
|
+
this.state === "scheduled" && (ft.delete(this), this.state = "pending");
|
|
978
978
|
}
|
|
979
979
|
resume() {
|
|
980
980
|
this.state === "pending" && this.scheduleResolve();
|
|
981
981
|
}
|
|
982
982
|
}, na = (t) => t.startsWith("--");
|
|
983
|
-
function
|
|
983
|
+
function Es(t, e, i) {
|
|
984
984
|
na(e) ? t.style.setProperty(e, i) : t.style[e] = i;
|
|
985
985
|
}
|
|
986
986
|
var sa = {};
|
|
987
|
-
function
|
|
988
|
-
const i = /* @__PURE__ */
|
|
987
|
+
function Rs(t, e) {
|
|
988
|
+
const i = /* @__PURE__ */ rs(t);
|
|
989
989
|
return () => sa[e] ?? i();
|
|
990
990
|
}
|
|
991
|
-
var ra = /* @__PURE__ */
|
|
991
|
+
var ra = /* @__PURE__ */ Rs(() => window.ScrollTimeline !== void 0, "scrollTimeline"), Ls = /* @__PURE__ */ Rs(() => {
|
|
992
992
|
try {
|
|
993
993
|
document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
|
|
994
994
|
} catch {
|
|
995
995
|
return !1;
|
|
996
996
|
}
|
|
997
997
|
return !0;
|
|
998
|
-
}, "linearEasing"),
|
|
998
|
+
}, "linearEasing"), Rt = ([t, e, i, n]) => `cubic-bezier(${t}, ${e}, ${i}, ${n})`, Gi = {
|
|
999
999
|
linear: "linear",
|
|
1000
1000
|
ease: "ease",
|
|
1001
1001
|
easeIn: "ease-in",
|
|
1002
1002
|
easeOut: "ease-out",
|
|
1003
1003
|
easeInOut: "ease-in-out",
|
|
1004
|
-
circIn: /* @__PURE__ */
|
|
1004
|
+
circIn: /* @__PURE__ */ Rt([
|
|
1005
1005
|
0,
|
|
1006
1006
|
0.65,
|
|
1007
1007
|
0.55,
|
|
1008
1008
|
1
|
|
1009
1009
|
]),
|
|
1010
|
-
circOut: /* @__PURE__ */
|
|
1010
|
+
circOut: /* @__PURE__ */ Rt([
|
|
1011
1011
|
0.55,
|
|
1012
1012
|
0,
|
|
1013
1013
|
1,
|
|
1014
1014
|
0.45
|
|
1015
1015
|
]),
|
|
1016
|
-
backIn: /* @__PURE__ */
|
|
1016
|
+
backIn: /* @__PURE__ */ Rt([
|
|
1017
1017
|
0.31,
|
|
1018
1018
|
0.01,
|
|
1019
1019
|
0.66,
|
|
1020
1020
|
-0.59
|
|
1021
1021
|
]),
|
|
1022
|
-
backOut: /* @__PURE__ */
|
|
1022
|
+
backOut: /* @__PURE__ */ Rt([
|
|
1023
1023
|
0.33,
|
|
1024
1024
|
1.53,
|
|
1025
1025
|
0.69,
|
|
1026
1026
|
0.99
|
|
1027
1027
|
])
|
|
1028
1028
|
};
|
|
1029
|
-
function
|
|
1030
|
-
if (t) return typeof t == "function" ?
|
|
1029
|
+
function ks(t, e) {
|
|
1030
|
+
if (t) return typeof t == "function" ? Ls() ? Vs(t, e) : "ease-out" : vs(t) ? Rt(t) : Array.isArray(t) ? t.map((i) => ks(i, e) || Gi.easeOut) : Gi[t];
|
|
1031
1031
|
}
|
|
1032
1032
|
function oa(t, e, i, { delay: n = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, c = void 0) {
|
|
1033
1033
|
const u = { [e]: i };
|
|
1034
1034
|
l && (u.offset = l);
|
|
1035
|
-
const h =
|
|
1035
|
+
const h = ks(a, s);
|
|
1036
1036
|
Array.isArray(h) && (u.easing = h);
|
|
1037
1037
|
const f = {
|
|
1038
1038
|
delay: n,
|
|
@@ -1044,22 +1044,22 @@ function oa(t, e, i, { delay: n = 0, duration: s = 300, repeat: o = 0, repeatTyp
|
|
|
1044
1044
|
};
|
|
1045
1045
|
return c && (f.pseudoElement = c), t.animate(u, f);
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1047
|
+
function Bs(t) {
|
|
1048
1048
|
return typeof t == "function" && "applyToOptions" in t;
|
|
1049
1049
|
}
|
|
1050
1050
|
function aa({ type: t, ...e }) {
|
|
1051
|
-
return
|
|
1051
|
+
return Bs(t) && Ls() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
|
|
1052
1052
|
}
|
|
1053
|
-
var
|
|
1053
|
+
var Fs = class extends vi {
|
|
1054
1054
|
constructor(t) {
|
|
1055
1055
|
if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t) return;
|
|
1056
1056
|
const { element: e, name: i, keyframes: n, pseudoElement: s, allowFlatten: o = !1, finalKeyframe: r, onComplete: a } = t;
|
|
1057
|
-
this.isPseudoElement = !!s, this.allowFlatten = o, this.options = t,
|
|
1057
|
+
this.isPseudoElement = !!s, this.allowFlatten = o, this.options = t, Q(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
|
|
1058
1058
|
const l = aa(t);
|
|
1059
1059
|
this.animation = oa(e, i, n, l, s), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
|
|
1060
1060
|
if (this.finishedTime = this.time, !s) {
|
|
1061
1061
|
const c = fe(n, this.options, r, this.speed);
|
|
1062
|
-
this.updateMotionValue && this.updateMotionValue(c),
|
|
1062
|
+
this.updateMotionValue && this.updateMotionValue(c), Es(e, i, c), this.animation.cancel();
|
|
1063
1063
|
}
|
|
1064
1064
|
a?.(), this.notifyFinished();
|
|
1065
1065
|
};
|
|
@@ -1091,18 +1091,18 @@ var Is = class extends mi {
|
|
|
1091
1091
|
}
|
|
1092
1092
|
get duration() {
|
|
1093
1093
|
const t = this.animation.effect?.getComputedTiming?.().duration || 0;
|
|
1094
|
-
return
|
|
1094
|
+
return $(Number(t));
|
|
1095
1095
|
}
|
|
1096
1096
|
get iterationDuration() {
|
|
1097
1097
|
const { delay: t = 0 } = this.options || {};
|
|
1098
|
-
return this.duration +
|
|
1098
|
+
return this.duration + $(t);
|
|
1099
1099
|
}
|
|
1100
1100
|
get time() {
|
|
1101
|
-
return
|
|
1101
|
+
return $(Number(this.animation.currentTime) || 0);
|
|
1102
1102
|
}
|
|
1103
1103
|
set time(t) {
|
|
1104
1104
|
const e = this.finishedTime !== null;
|
|
1105
|
-
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime =
|
|
1105
|
+
this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = N(t), e && this.animation.pause();
|
|
1106
1106
|
}
|
|
1107
1107
|
get speed() {
|
|
1108
1108
|
return this.animation.playbackRate;
|
|
@@ -1120,22 +1120,22 @@ var Is = class extends mi {
|
|
|
1120
1120
|
this.manualStartTime = this.animation.startTime = t;
|
|
1121
1121
|
}
|
|
1122
1122
|
attachTimeline({ timeline: t, rangeStart: e, rangeEnd: i, observe: n }) {
|
|
1123
|
-
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && ra() ? (this.animation.timeline = t, e && (this.animation.rangeStart = e), i && (this.animation.rangeEnd = i),
|
|
1123
|
+
return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && ra() ? (this.animation.timeline = t, e && (this.animation.rangeStart = e), i && (this.animation.rangeEnd = i), K) : n(this);
|
|
1124
1124
|
}
|
|
1125
|
-
},
|
|
1126
|
-
anticipate:
|
|
1127
|
-
backInOut:
|
|
1128
|
-
circInOut:
|
|
1125
|
+
}, Is = {
|
|
1126
|
+
anticipate: fs,
|
|
1127
|
+
backInOut: hs,
|
|
1128
|
+
circInOut: ps
|
|
1129
1129
|
};
|
|
1130
1130
|
function la(t) {
|
|
1131
|
-
return t in
|
|
1131
|
+
return t in Is;
|
|
1132
1132
|
}
|
|
1133
1133
|
function ua(t) {
|
|
1134
|
-
typeof t.ease == "string" && la(t.ease) && (t.ease =
|
|
1134
|
+
typeof t.ease == "string" && la(t.ease) && (t.ease = Is[t.ease]);
|
|
1135
1135
|
}
|
|
1136
|
-
var xe = 10, ca = class extends
|
|
1136
|
+
var xe = 10, ca = class extends Fs {
|
|
1137
1137
|
constructor(t) {
|
|
1138
|
-
ua(t),
|
|
1138
|
+
ua(t), Ms(t), super(t), t.startTime !== void 0 && t.autoplay !== !1 && (this.startTime = t.startTime), this.options = t;
|
|
1139
1139
|
}
|
|
1140
1140
|
updateMotionValue(t) {
|
|
1141
1141
|
const { motionValue: e, onUpdate: i, onComplete: n, element: s, ...o } = this.options;
|
|
@@ -1147,10 +1147,10 @@ var xe = 10, ca = class extends Is {
|
|
|
1147
1147
|
const r = new re({
|
|
1148
1148
|
...o,
|
|
1149
1149
|
autoplay: !1
|
|
1150
|
-
}), a = Math.max(xe,
|
|
1151
|
-
s && u &&
|
|
1150
|
+
}), a = Math.max(xe, I.now() - this.startTime), l = J(0, xe, a - xe), c = r.sample(a).value, { name: u } = this.options;
|
|
1151
|
+
s && u && Es(s, u, c), e.setWithVelocity(r.sample(Math.max(0, a - l)).value, c, l), r.stop();
|
|
1152
1152
|
}
|
|
1153
|
-
},
|
|
1153
|
+
}, _i = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && (X.test(t) || t === "0") && !t.startsWith("url("));
|
|
1154
1154
|
function ha(t) {
|
|
1155
1155
|
const e = t[0];
|
|
1156
1156
|
if (t.length === 1) return !0;
|
|
@@ -1160,13 +1160,13 @@ function fa(t, e, i, n) {
|
|
|
1160
1160
|
const s = t[0];
|
|
1161
1161
|
if (s === null) return !1;
|
|
1162
1162
|
if (e === "display" || e === "visibility") return !0;
|
|
1163
|
-
const o = t[t.length - 1], r =
|
|
1164
|
-
return
|
|
1163
|
+
const o = t[t.length - 1], r = _i(s, e), a = _i(o, e);
|
|
1164
|
+
return At(r === a, `You are trying to animate ${e} from "${s}" to "${o}". "${r ? o : s}" is not an animatable value.`, "value-not-animatable"), !r || !a ? !1 : ha(t) || (i === "spring" || Bs(i)) && n;
|
|
1165
1165
|
}
|
|
1166
1166
|
function Ke(t) {
|
|
1167
1167
|
t.duration = 0, t.type = "keyframes";
|
|
1168
1168
|
}
|
|
1169
|
-
var
|
|
1169
|
+
var Os = /* @__PURE__ */ new Set([
|
|
1170
1170
|
"opacity",
|
|
1171
1171
|
"clipPath",
|
|
1172
1172
|
"filter",
|
|
@@ -1188,18 +1188,18 @@ var ma = /* @__PURE__ */ new Set([
|
|
|
1188
1188
|
"borderRightColor",
|
|
1189
1189
|
"borderBottomColor",
|
|
1190
1190
|
"borderLeftColor"
|
|
1191
|
-
]), va = /* @__PURE__ */
|
|
1191
|
+
]), va = /* @__PURE__ */ rs(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
|
|
1192
1192
|
function ga(t) {
|
|
1193
1193
|
const { motionValue: e, name: i, repeatDelay: n, repeatType: s, damping: o, type: r, keyframes: a } = t, l = e?.owner?.current;
|
|
1194
1194
|
if (!(l instanceof HTMLElement) && !(l instanceof SVGElement)) return !1;
|
|
1195
1195
|
const { onUpdate: c, transformTemplate: u } = e.owner.getProps();
|
|
1196
|
-
return va() && i && (
|
|
1196
|
+
return va() && i && (Os.has(i) || ma.has(i) && pa(a)) && (i !== "transform" || !u) && !c && !n && s !== "mirror" && o !== 0 && r !== "inertia";
|
|
1197
1197
|
}
|
|
1198
|
-
var ya = 40, Ta = class extends
|
|
1198
|
+
var ya = 40, Ta = class extends vi {
|
|
1199
1199
|
constructor({ autoplay: t = !0, delay: e = 0, type: i = "keyframes", repeat: n = 0, repeatDelay: s = 0, repeatType: o = "loop", keyframes: r, name: a, motionValue: l, element: c, ...u }) {
|
|
1200
1200
|
super(), this.stop = () => {
|
|
1201
1201
|
this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
|
|
1202
|
-
}, this.createdAt =
|
|
1202
|
+
}, this.createdAt = I.now();
|
|
1203
1203
|
const h = {
|
|
1204
1204
|
autoplay: t,
|
|
1205
1205
|
delay: e,
|
|
@@ -1211,15 +1211,15 @@ var ya = 40, Ta = class extends mi {
|
|
|
1211
1211
|
motionValue: l,
|
|
1212
1212
|
element: c,
|
|
1213
1213
|
...u
|
|
1214
|
-
}, f = c?.KeyframeResolver ||
|
|
1215
|
-
this.keyframeResolver = new f(r, (p, d,
|
|
1214
|
+
}, f = c?.KeyframeResolver || gi;
|
|
1215
|
+
this.keyframeResolver = new f(r, (p, d, g) => this.onKeyframesResolved(p, d, h, !g), a, l, c), this.keyframeResolver?.scheduleResolve();
|
|
1216
1216
|
}
|
|
1217
1217
|
onKeyframesResolved(t, e, i, n) {
|
|
1218
1218
|
this.keyframeResolver = void 0;
|
|
1219
1219
|
const { name: s, type: o, velocity: r, delay: a, isHandoff: l, onUpdate: c } = i;
|
|
1220
|
-
this.resolvedAt =
|
|
1220
|
+
this.resolvedAt = I.now();
|
|
1221
1221
|
let u = !0;
|
|
1222
|
-
fa(t, s, o, r) || (u = !1, (
|
|
1222
|
+
fa(t, s, o, r) || (u = !1, (it.instantAnimations || !a) && c?.(fe(t, i, e)), t[0] = t[t.length - 1], Ke(i), i.repeat = 0);
|
|
1223
1223
|
const h = {
|
|
1224
1224
|
startTime: n ? this.resolvedAt ? this.resolvedAt - this.createdAt > ya ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
|
|
1225
1225
|
finalKeyframe: e,
|
|
@@ -1238,7 +1238,7 @@ var ya = 40, Ta = class extends mi {
|
|
|
1238
1238
|
else d = new re(h);
|
|
1239
1239
|
d.finished.then(() => {
|
|
1240
1240
|
this.notifyFinished();
|
|
1241
|
-
}).catch(
|
|
1241
|
+
}).catch(K), this.pendingTimeline && (this.stopTimeline = d.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = d;
|
|
1242
1242
|
}
|
|
1243
1243
|
get finished() {
|
|
1244
1244
|
return this._animation ? this.animation.finished : this._finished;
|
|
@@ -1290,20 +1290,20 @@ var ya = 40, Ta = class extends mi {
|
|
|
1290
1290
|
this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
|
|
1291
1291
|
}
|
|
1292
1292
|
};
|
|
1293
|
-
function
|
|
1293
|
+
function js(t, e, i, n = 0, s = 1) {
|
|
1294
1294
|
const o = Array.from(t).sort((l, c) => l.sortNodePosition(c)).indexOf(e), r = t.size, a = (r - 1) * n;
|
|
1295
1295
|
return typeof i == "function" ? i(o, r) : s === 1 ? o * n : a - o * n;
|
|
1296
1296
|
}
|
|
1297
|
-
var
|
|
1297
|
+
var Xi = 30, xa = (t) => !isNaN(parseFloat(t)), Yi = { current: void 0 }, wa = class {
|
|
1298
1298
|
constructor(t, e = {}) {
|
|
1299
1299
|
this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (i) => {
|
|
1300
|
-
const n =
|
|
1300
|
+
const n = I.now();
|
|
1301
1301
|
if (this.updatedAt !== n && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(i), this.current !== this.prev && (this.events.change?.notify(this.current), this.dependents))
|
|
1302
1302
|
for (const s of this.dependents) s.dirty();
|
|
1303
1303
|
}, this.hasAnimated = !1, this.setCurrent(t), this.owner = e.owner;
|
|
1304
1304
|
}
|
|
1305
1305
|
setCurrent(t) {
|
|
1306
|
-
this.current = t, this.updatedAt =
|
|
1306
|
+
this.current = t, this.updatedAt = I.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = xa(this.current));
|
|
1307
1307
|
}
|
|
1308
1308
|
setPrevFrameValue(t = this.current) {
|
|
1309
1309
|
this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
|
|
@@ -1315,7 +1315,7 @@ var _i = 30, xa = (t) => !isNaN(parseFloat(t)), Xi = { current: void 0 }, wa = c
|
|
|
1315
1315
|
this.events[t] || (this.events[t] = new oi());
|
|
1316
1316
|
const i = this.events[t].add(e);
|
|
1317
1317
|
return t === "change" ? () => {
|
|
1318
|
-
i(),
|
|
1318
|
+
i(), V.read(() => {
|
|
1319
1319
|
this.events.change.getSize() || this.stop();
|
|
1320
1320
|
});
|
|
1321
1321
|
} : i;
|
|
@@ -1345,16 +1345,16 @@ var _i = 30, xa = (t) => !isNaN(parseFloat(t)), Xi = { current: void 0 }, wa = c
|
|
|
1345
1345
|
this.dependents && this.dependents.delete(t);
|
|
1346
1346
|
}
|
|
1347
1347
|
get() {
|
|
1348
|
-
return
|
|
1348
|
+
return Yi.current && Yi.current.push(this), this.current;
|
|
1349
1349
|
}
|
|
1350
1350
|
getPrevious() {
|
|
1351
1351
|
return this.prev;
|
|
1352
1352
|
}
|
|
1353
1353
|
getVelocity() {
|
|
1354
|
-
const t =
|
|
1355
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt >
|
|
1356
|
-
const e = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
1357
|
-
return
|
|
1354
|
+
const t = I.now();
|
|
1355
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Xi) return 0;
|
|
1356
|
+
const e = Math.min(this.updatedAt - this.prevUpdatedAt, Xi);
|
|
1357
|
+
return os(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
|
|
1358
1358
|
}
|
|
1359
1359
|
start(t) {
|
|
1360
1360
|
return this.stop(), new Promise((e) => {
|
|
@@ -1376,10 +1376,10 @@ var _i = 30, xa = (t) => !isNaN(parseFloat(t)), Xi = { current: void 0 }, wa = c
|
|
|
1376
1376
|
this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
|
|
1377
1377
|
}
|
|
1378
1378
|
};
|
|
1379
|
-
function
|
|
1379
|
+
function St(t, e) {
|
|
1380
1380
|
return new wa(t, e);
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1382
|
+
function Ns(t, e) {
|
|
1383
1383
|
if (t?.inherit && e) {
|
|
1384
1384
|
const { inherit: i, ...n } = t;
|
|
1385
1385
|
return {
|
|
@@ -1389,9 +1389,9 @@ function Us(t, e) {
|
|
|
1389
1389
|
}
|
|
1390
1390
|
return t;
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1392
|
+
function yi(t, e) {
|
|
1393
1393
|
const i = t?.[e] ?? t?.default ?? t;
|
|
1394
|
-
return i !== t ?
|
|
1394
|
+
return i !== t ? Ns(i, t) : i;
|
|
1395
1395
|
}
|
|
1396
1396
|
var Pa = {
|
|
1397
1397
|
type: "spring",
|
|
@@ -1415,7 +1415,7 @@ var Pa = {
|
|
|
1415
1415
|
1
|
|
1416
1416
|
],
|
|
1417
1417
|
duration: 0.3
|
|
1418
|
-
}, Va = (t, { keyframes: e }) => e.length > 2 ? ba :
|
|
1418
|
+
}, Va = (t, { keyframes: e }) => e.length > 2 ? ba : Ct.has(t) ? t.startsWith("scale") ? Sa(e[1]) : Pa : Aa, Ma = /* @__PURE__ */ new Set([
|
|
1419
1419
|
"when",
|
|
1420
1420
|
"delay",
|
|
1421
1421
|
"delayChildren",
|
|
@@ -1431,10 +1431,10 @@ function Ca(t) {
|
|
|
1431
1431
|
for (const e in t) if (!Ma.has(e)) return !0;
|
|
1432
1432
|
return !1;
|
|
1433
1433
|
}
|
|
1434
|
-
var
|
|
1435
|
-
const a =
|
|
1434
|
+
var Ti = (t, e, i, n = {}, s, o) => (r) => {
|
|
1435
|
+
const a = yi(n, t) || {}, l = a.delay || n.delay || 0;
|
|
1436
1436
|
let { elapsed: c = 0 } = n;
|
|
1437
|
-
c = c -
|
|
1437
|
+
c = c - N(l);
|
|
1438
1438
|
const u = {
|
|
1439
1439
|
keyframes: Array.isArray(i) ? i : [null, i],
|
|
1440
1440
|
ease: "easeOut",
|
|
@@ -1451,12 +1451,12 @@ var yi = (t, e, i, n = {}, s, o) => (r) => {
|
|
|
1451
1451
|
motionValue: e,
|
|
1452
1452
|
element: o ? void 0 : s
|
|
1453
1453
|
};
|
|
1454
|
-
Ca(a) || Object.assign(u, Va(t, u)), u.duration && (u.duration =
|
|
1454
|
+
Ca(a) || Object.assign(u, Va(t, u)), u.duration && (u.duration = N(u.duration)), u.repeatDelay && (u.repeatDelay = N(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
|
|
1455
1455
|
let h = !1;
|
|
1456
|
-
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (Ke(u), u.delay === 0 && (h = !0)), (
|
|
1456
|
+
if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && (Ke(u), u.delay === 0 && (h = !0)), (it.instantAnimations || it.skipAnimations || s?.shouldSkipAnimations || a.skipAnimations) && (h = !0, Ke(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
|
|
1457
1457
|
const f = fe(u.keyframes, a);
|
|
1458
1458
|
if (f !== void 0) {
|
|
1459
|
-
|
|
1459
|
+
V.update(() => {
|
|
1460
1460
|
u.onUpdate(f), u.onComplete();
|
|
1461
1461
|
});
|
|
1462
1462
|
return;
|
|
@@ -1471,122 +1471,122 @@ function Ea(t) {
|
|
|
1471
1471
|
return [`--${i ?? n}`, s];
|
|
1472
1472
|
}
|
|
1473
1473
|
var Ra = 4;
|
|
1474
|
-
function
|
|
1475
|
-
|
|
1474
|
+
function Us(t, e, i = 1) {
|
|
1475
|
+
Q(i <= Ra, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
|
|
1476
1476
|
const [n, s] = Ea(t);
|
|
1477
1477
|
if (!n) return;
|
|
1478
1478
|
const o = window.getComputedStyle(e).getPropertyValue(n);
|
|
1479
1479
|
if (o) {
|
|
1480
1480
|
const r = o.trim();
|
|
1481
|
-
return
|
|
1481
|
+
return is(r) ? parseFloat(r) : r;
|
|
1482
1482
|
}
|
|
1483
|
-
return ci(s) ?
|
|
1483
|
+
return ci(s) ? Us(s, e, i + 1) : s;
|
|
1484
1484
|
}
|
|
1485
|
-
function
|
|
1485
|
+
function qi(t) {
|
|
1486
1486
|
const e = [{}, {}];
|
|
1487
1487
|
return t?.values.forEach((i, n) => {
|
|
1488
1488
|
e[0][n] = i.get(), e[1][n] = i.getVelocity();
|
|
1489
1489
|
}), e;
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1491
|
+
function xi(t, e, i, n) {
|
|
1492
1492
|
if (typeof e == "function") {
|
|
1493
|
-
const [s, o] =
|
|
1493
|
+
const [s, o] = qi(n);
|
|
1494
1494
|
e = e(i !== void 0 ? i : t.custom, s, o);
|
|
1495
1495
|
}
|
|
1496
1496
|
if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
|
|
1497
|
-
const [s, o] =
|
|
1497
|
+
const [s, o] = qi(n);
|
|
1498
1498
|
e = e(i !== void 0 ? i : t.custom, s, o);
|
|
1499
1499
|
}
|
|
1500
1500
|
return e;
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function dt(t, e, i) {
|
|
1503
1503
|
const n = t.getProps();
|
|
1504
|
-
return
|
|
1504
|
+
return xi(n, e, i !== void 0 ? i : n.custom, t);
|
|
1505
1505
|
}
|
|
1506
|
-
var
|
|
1506
|
+
var Ws = /* @__PURE__ */ new Set([
|
|
1507
1507
|
"width",
|
|
1508
1508
|
"height",
|
|
1509
1509
|
"top",
|
|
1510
1510
|
"left",
|
|
1511
1511
|
"right",
|
|
1512
1512
|
"bottom",
|
|
1513
|
-
...
|
|
1513
|
+
...Mt
|
|
1514
1514
|
]), ze = (t) => Array.isArray(t);
|
|
1515
1515
|
function La(t, e, i) {
|
|
1516
|
-
t.hasValue(e) ? t.getValue(e).set(i) : t.addValue(e,
|
|
1516
|
+
t.hasValue(e) ? t.getValue(e).set(i) : t.addValue(e, St(i));
|
|
1517
1517
|
}
|
|
1518
1518
|
function ka(t) {
|
|
1519
1519
|
return ze(t) ? t[t.length - 1] || 0 : t;
|
|
1520
1520
|
}
|
|
1521
1521
|
function Ba(t, e) {
|
|
1522
|
-
let { transitionEnd: i = {}, transition: n = {}, ...s } =
|
|
1522
|
+
let { transitionEnd: i = {}, transition: n = {}, ...s } = dt(t, e) || {};
|
|
1523
1523
|
s = {
|
|
1524
1524
|
...s,
|
|
1525
1525
|
...i
|
|
1526
1526
|
};
|
|
1527
1527
|
for (const o in s) La(t, o, ka(s[o]));
|
|
1528
1528
|
}
|
|
1529
|
-
var
|
|
1529
|
+
var B = (t) => !!(t && t.getVelocity);
|
|
1530
1530
|
function Fa(t) {
|
|
1531
|
-
return !!(
|
|
1531
|
+
return !!(B(t) && t.add);
|
|
1532
1532
|
}
|
|
1533
1533
|
function He(t, e) {
|
|
1534
1534
|
const i = t.getValue("willChange");
|
|
1535
1535
|
if (Fa(i)) return i.add(e);
|
|
1536
|
-
if (!i &&
|
|
1537
|
-
const n = new
|
|
1536
|
+
if (!i && it.WillChange) {
|
|
1537
|
+
const n = new it.WillChange("auto");
|
|
1538
1538
|
t.addValue("willChange", n), n.add(e);
|
|
1539
1539
|
}
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function wi(t) {
|
|
1542
1542
|
return t.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
|
|
1543
1543
|
}
|
|
1544
|
-
var Ia = "framerAppearId",
|
|
1545
|
-
function
|
|
1546
|
-
return t.props[
|
|
1544
|
+
var Ia = "framerAppearId", $s = "data-" + wi(Ia);
|
|
1545
|
+
function Ks(t) {
|
|
1546
|
+
return t.props[$s];
|
|
1547
1547
|
}
|
|
1548
1548
|
var Oa = typeof window < "u";
|
|
1549
1549
|
function ja({ protectedKeys: t, needsAnimating: e }, i) {
|
|
1550
1550
|
const n = t.hasOwnProperty(i) && e[i] !== !0;
|
|
1551
1551
|
return e[i] = !1, n;
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1553
|
+
function zs(t, e, { delay: i = 0, transitionOverride: n, type: s } = {}) {
|
|
1554
1554
|
let { transition: o, transitionEnd: r, ...a } = e;
|
|
1555
1555
|
const l = t.getDefaultTransition();
|
|
1556
|
-
o = o ?
|
|
1556
|
+
o = o ? Ns(o, l) : l;
|
|
1557
1557
|
const c = o?.reduceMotion, u = o?.skipAnimations;
|
|
1558
1558
|
n && (o = n);
|
|
1559
1559
|
const h = [], f = s && t.animationState && t.animationState.getState()[s], p = o?.path;
|
|
1560
1560
|
p && p.animateVisualElement(t, a, o, i, h);
|
|
1561
1561
|
for (const d in a) {
|
|
1562
|
-
const
|
|
1563
|
-
if (
|
|
1564
|
-
const
|
|
1562
|
+
const g = t.getValue(d, t.latestValues[d] ?? null), m = a[d];
|
|
1563
|
+
if (m === void 0 || f && ja(f, d)) continue;
|
|
1564
|
+
const y = {
|
|
1565
1565
|
delay: i,
|
|
1566
|
-
...
|
|
1566
|
+
...yi(o || {}, d)
|
|
1567
1567
|
};
|
|
1568
|
-
u && (
|
|
1569
|
-
const
|
|
1570
|
-
if (
|
|
1571
|
-
|
|
1568
|
+
u && (y.skipAnimations = !0);
|
|
1569
|
+
const v = g.get();
|
|
1570
|
+
if (v !== void 0 && !g.isAnimating() && !Array.isArray(m) && m === v && !y.velocity) {
|
|
1571
|
+
V.update(() => g.set(m));
|
|
1572
1572
|
continue;
|
|
1573
1573
|
}
|
|
1574
1574
|
let x = !1;
|
|
1575
1575
|
if (Oa && window.MotionHandoffAnimation) {
|
|
1576
|
-
const
|
|
1577
|
-
if (
|
|
1578
|
-
const
|
|
1579
|
-
|
|
1576
|
+
const M = Ks(t);
|
|
1577
|
+
if (M) {
|
|
1578
|
+
const w = window.MotionHandoffAnimation(M, d, V);
|
|
1579
|
+
w !== null && (y.startTime = w, x = !0);
|
|
1580
1580
|
}
|
|
1581
1581
|
}
|
|
1582
1582
|
He(t, d);
|
|
1583
|
-
const
|
|
1584
|
-
|
|
1585
|
-
const
|
|
1586
|
-
|
|
1583
|
+
const P = c ?? t.shouldReduceMotion;
|
|
1584
|
+
g.start(Ti(d, g, m, P && Ws.has(d) ? { type: !1 } : y, t, x));
|
|
1585
|
+
const b = g.animation;
|
|
1586
|
+
b && h.push(b);
|
|
1587
1587
|
}
|
|
1588
1588
|
if (r) {
|
|
1589
|
-
const d = () =>
|
|
1589
|
+
const d = () => V.update(() => {
|
|
1590
1590
|
r && Ba(t, r);
|
|
1591
1591
|
});
|
|
1592
1592
|
h.length ? Promise.all(h).then(d) : d();
|
|
@@ -1594,10 +1594,10 @@ function Hs(t, e, { delay: i = 0, transitionOverride: n, type: s } = {}) {
|
|
|
1594
1594
|
return h;
|
|
1595
1595
|
}
|
|
1596
1596
|
function Ge(t, e, i = {}) {
|
|
1597
|
-
const n =
|
|
1597
|
+
const n = dt(t, e, i.type === "exit" ? t.presenceContext?.custom : void 0);
|
|
1598
1598
|
let { transition: s = t.getDefaultTransition() || {} } = n || {};
|
|
1599
1599
|
i.transitionOverride && (s = i.transitionOverride);
|
|
1600
|
-
const o = n ? () => Promise.all(
|
|
1600
|
+
const o = n ? () => Promise.all(zs(t, n, i)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (l = 0) => {
|
|
1601
1601
|
const { delayChildren: c = 0, staggerChildren: u, staggerDirection: h } = s;
|
|
1602
1602
|
return Na(t, e, l, c, u, h, i);
|
|
1603
1603
|
} : () => Promise.resolve(), { when: a } = s;
|
|
@@ -1611,7 +1611,7 @@ function Na(t, e, i = 0, n = 0, s = 0, o = 1, r) {
|
|
|
1611
1611
|
for (const l of t.variantChildren)
|
|
1612
1612
|
l.notify("AnimationStart", e), a.push(Ge(l, e, {
|
|
1613
1613
|
...r,
|
|
1614
|
-
delay: i + (typeof n == "function" ? 0 : n) +
|
|
1614
|
+
delay: i + (typeof n == "function" ? 0 : n) + js(t.variantChildren, l, n, s, o)
|
|
1615
1615
|
}).then(() => l.notify("AnimationComplete", e)));
|
|
1616
1616
|
return Promise.all(a);
|
|
1617
1617
|
}
|
|
@@ -1623,8 +1623,8 @@ function Ua(t, e, i = {}) {
|
|
|
1623
1623
|
n = Promise.all(s);
|
|
1624
1624
|
} else if (typeof e == "string") n = Ge(t, e, i);
|
|
1625
1625
|
else {
|
|
1626
|
-
const s = typeof e == "function" ?
|
|
1627
|
-
n = Promise.all(
|
|
1626
|
+
const s = typeof e == "function" ? dt(t, e, i.custom) : e;
|
|
1627
|
+
n = Promise.all(zs(t, s, i));
|
|
1628
1628
|
}
|
|
1629
1629
|
return n.then(() => {
|
|
1630
1630
|
t.notify("AnimationComplete", e);
|
|
@@ -1633,17 +1633,17 @@ function Ua(t, e, i = {}) {
|
|
|
1633
1633
|
var Wa = {
|
|
1634
1634
|
test: (t) => t === "auto",
|
|
1635
1635
|
parse: (t) => t
|
|
1636
|
-
},
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
co,
|
|
1636
|
+
}, Hs = (t) => (e) => e.test(t), Gs = [
|
|
1637
|
+
Vt,
|
|
1638
|
+
T,
|
|
1639
|
+
Z,
|
|
1640
|
+
tt,
|
|
1642
1641
|
uo,
|
|
1642
|
+
lo,
|
|
1643
1643
|
Wa
|
|
1644
|
-
],
|
|
1644
|
+
], Zi = (t) => Gs.find(Hs(t));
|
|
1645
1645
|
function $a(t) {
|
|
1646
|
-
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" ||
|
|
1646
|
+
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || ss(t) : !0;
|
|
1647
1647
|
}
|
|
1648
1648
|
var Ka = /* @__PURE__ */ new Set([
|
|
1649
1649
|
"brightness",
|
|
@@ -1661,125 +1661,125 @@ function za(t) {
|
|
|
1661
1661
|
return n !== i && (o *= 100), e + "(" + o + s + ")";
|
|
1662
1662
|
}
|
|
1663
1663
|
var Ha = /\b([a-z-]*)\(.*?\)/gu, _e = {
|
|
1664
|
-
...
|
|
1664
|
+
...X,
|
|
1665
1665
|
getAnimatableNone: (t) => {
|
|
1666
1666
|
const e = t.match(Ha);
|
|
1667
1667
|
return e ? e.map(za).join(" ") : t;
|
|
1668
1668
|
}
|
|
1669
1669
|
}, Xe = {
|
|
1670
|
-
...
|
|
1670
|
+
...X,
|
|
1671
1671
|
getAnimatableNone: (t) => {
|
|
1672
|
-
const e =
|
|
1673
|
-
return
|
|
1672
|
+
const e = X.parse(t);
|
|
1673
|
+
return X.createTransformer(t)(e.map((i) => typeof i == "number" ? 0 : typeof i == "object" ? {
|
|
1674
1674
|
...i,
|
|
1675
1675
|
alpha: 1
|
|
1676
1676
|
} : i));
|
|
1677
1677
|
}
|
|
1678
|
-
},
|
|
1679
|
-
...
|
|
1678
|
+
}, Ji = {
|
|
1679
|
+
...Vt,
|
|
1680
1680
|
transform: Math.round
|
|
1681
1681
|
}, Ga = {
|
|
1682
|
-
rotate:
|
|
1683
|
-
pathRotation:
|
|
1684
|
-
rotateX:
|
|
1685
|
-
rotateY:
|
|
1686
|
-
rotateZ:
|
|
1682
|
+
rotate: tt,
|
|
1683
|
+
pathRotation: tt,
|
|
1684
|
+
rotateX: tt,
|
|
1685
|
+
rotateY: tt,
|
|
1686
|
+
rotateZ: tt,
|
|
1687
1687
|
scale: Ht,
|
|
1688
1688
|
scaleX: Ht,
|
|
1689
1689
|
scaleY: Ht,
|
|
1690
1690
|
scaleZ: Ht,
|
|
1691
|
-
skew:
|
|
1692
|
-
skewX:
|
|
1693
|
-
skewY:
|
|
1694
|
-
distance:
|
|
1695
|
-
translateX:
|
|
1696
|
-
translateY:
|
|
1697
|
-
translateZ:
|
|
1698
|
-
x:
|
|
1699
|
-
y,
|
|
1700
|
-
z:
|
|
1701
|
-
perspective:
|
|
1702
|
-
transformPerspective:
|
|
1703
|
-
opacity:
|
|
1704
|
-
originX:
|
|
1705
|
-
originY:
|
|
1706
|
-
originZ:
|
|
1691
|
+
skew: tt,
|
|
1692
|
+
skewX: tt,
|
|
1693
|
+
skewY: tt,
|
|
1694
|
+
distance: T,
|
|
1695
|
+
translateX: T,
|
|
1696
|
+
translateY: T,
|
|
1697
|
+
translateZ: T,
|
|
1698
|
+
x: T,
|
|
1699
|
+
y: T,
|
|
1700
|
+
z: T,
|
|
1701
|
+
perspective: T,
|
|
1702
|
+
transformPerspective: T,
|
|
1703
|
+
opacity: It,
|
|
1704
|
+
originX: Ii,
|
|
1705
|
+
originY: Ii,
|
|
1706
|
+
originZ: T
|
|
1707
1707
|
}, oe = {
|
|
1708
|
-
borderWidth:
|
|
1709
|
-
borderTopWidth:
|
|
1710
|
-
borderRightWidth:
|
|
1711
|
-
borderBottomWidth:
|
|
1712
|
-
borderLeftWidth:
|
|
1713
|
-
borderRadius:
|
|
1714
|
-
borderTopLeftRadius:
|
|
1715
|
-
borderTopRightRadius:
|
|
1716
|
-
borderBottomRightRadius:
|
|
1717
|
-
borderBottomLeftRadius:
|
|
1718
|
-
width:
|
|
1719
|
-
maxWidth:
|
|
1720
|
-
height:
|
|
1721
|
-
maxHeight:
|
|
1722
|
-
top:
|
|
1723
|
-
right:
|
|
1724
|
-
bottom:
|
|
1725
|
-
left:
|
|
1726
|
-
inset:
|
|
1727
|
-
insetBlock:
|
|
1728
|
-
insetBlockStart:
|
|
1729
|
-
insetBlockEnd:
|
|
1730
|
-
insetInline:
|
|
1731
|
-
insetInlineStart:
|
|
1732
|
-
insetInlineEnd:
|
|
1733
|
-
padding:
|
|
1734
|
-
paddingTop:
|
|
1735
|
-
paddingRight:
|
|
1736
|
-
paddingBottom:
|
|
1737
|
-
paddingLeft:
|
|
1738
|
-
paddingBlock:
|
|
1739
|
-
paddingBlockStart:
|
|
1740
|
-
paddingBlockEnd:
|
|
1741
|
-
paddingInline:
|
|
1742
|
-
paddingInlineStart:
|
|
1743
|
-
paddingInlineEnd:
|
|
1744
|
-
margin:
|
|
1745
|
-
marginTop:
|
|
1746
|
-
marginRight:
|
|
1747
|
-
marginBottom:
|
|
1748
|
-
marginLeft:
|
|
1749
|
-
marginBlock:
|
|
1750
|
-
marginBlockStart:
|
|
1751
|
-
marginBlockEnd:
|
|
1752
|
-
marginInline:
|
|
1753
|
-
marginInlineStart:
|
|
1754
|
-
marginInlineEnd:
|
|
1755
|
-
fontSize:
|
|
1756
|
-
backgroundPositionX:
|
|
1757
|
-
backgroundPositionY:
|
|
1708
|
+
borderWidth: T,
|
|
1709
|
+
borderTopWidth: T,
|
|
1710
|
+
borderRightWidth: T,
|
|
1711
|
+
borderBottomWidth: T,
|
|
1712
|
+
borderLeftWidth: T,
|
|
1713
|
+
borderRadius: T,
|
|
1714
|
+
borderTopLeftRadius: T,
|
|
1715
|
+
borderTopRightRadius: T,
|
|
1716
|
+
borderBottomRightRadius: T,
|
|
1717
|
+
borderBottomLeftRadius: T,
|
|
1718
|
+
width: T,
|
|
1719
|
+
maxWidth: T,
|
|
1720
|
+
height: T,
|
|
1721
|
+
maxHeight: T,
|
|
1722
|
+
top: T,
|
|
1723
|
+
right: T,
|
|
1724
|
+
bottom: T,
|
|
1725
|
+
left: T,
|
|
1726
|
+
inset: T,
|
|
1727
|
+
insetBlock: T,
|
|
1728
|
+
insetBlockStart: T,
|
|
1729
|
+
insetBlockEnd: T,
|
|
1730
|
+
insetInline: T,
|
|
1731
|
+
insetInlineStart: T,
|
|
1732
|
+
insetInlineEnd: T,
|
|
1733
|
+
padding: T,
|
|
1734
|
+
paddingTop: T,
|
|
1735
|
+
paddingRight: T,
|
|
1736
|
+
paddingBottom: T,
|
|
1737
|
+
paddingLeft: T,
|
|
1738
|
+
paddingBlock: T,
|
|
1739
|
+
paddingBlockStart: T,
|
|
1740
|
+
paddingBlockEnd: T,
|
|
1741
|
+
paddingInline: T,
|
|
1742
|
+
paddingInlineStart: T,
|
|
1743
|
+
paddingInlineEnd: T,
|
|
1744
|
+
margin: T,
|
|
1745
|
+
marginTop: T,
|
|
1746
|
+
marginRight: T,
|
|
1747
|
+
marginBottom: T,
|
|
1748
|
+
marginLeft: T,
|
|
1749
|
+
marginBlock: T,
|
|
1750
|
+
marginBlockStart: T,
|
|
1751
|
+
marginBlockEnd: T,
|
|
1752
|
+
marginInline: T,
|
|
1753
|
+
marginInlineStart: T,
|
|
1754
|
+
marginInlineEnd: T,
|
|
1755
|
+
fontSize: T,
|
|
1756
|
+
backgroundPositionX: T,
|
|
1757
|
+
backgroundPositionY: T,
|
|
1758
1758
|
...Ga,
|
|
1759
|
-
zIndex:
|
|
1760
|
-
fillOpacity:
|
|
1761
|
-
strokeOpacity:
|
|
1762
|
-
numOctaves:
|
|
1759
|
+
zIndex: Ji,
|
|
1760
|
+
fillOpacity: It,
|
|
1761
|
+
strokeOpacity: It,
|
|
1762
|
+
numOctaves: Ji
|
|
1763
1763
|
}, _a = {
|
|
1764
1764
|
...oe,
|
|
1765
|
-
color:
|
|
1766
|
-
backgroundColor:
|
|
1767
|
-
outlineColor:
|
|
1768
|
-
fill:
|
|
1769
|
-
stroke:
|
|
1770
|
-
borderColor:
|
|
1771
|
-
borderTopColor:
|
|
1772
|
-
borderRightColor:
|
|
1773
|
-
borderBottomColor:
|
|
1774
|
-
borderLeftColor:
|
|
1765
|
+
color: E,
|
|
1766
|
+
backgroundColor: E,
|
|
1767
|
+
outlineColor: E,
|
|
1768
|
+
fill: E,
|
|
1769
|
+
stroke: E,
|
|
1770
|
+
borderColor: E,
|
|
1771
|
+
borderTopColor: E,
|
|
1772
|
+
borderRightColor: E,
|
|
1773
|
+
borderBottomColor: E,
|
|
1774
|
+
borderLeftColor: E,
|
|
1775
1775
|
filter: _e,
|
|
1776
1776
|
WebkitFilter: _e,
|
|
1777
1777
|
mask: Xe,
|
|
1778
1778
|
WebkitMask: Xe
|
|
1779
|
-
},
|
|
1780
|
-
function
|
|
1781
|
-
let i =
|
|
1782
|
-
return Xa.has(i) || (i =
|
|
1779
|
+
}, _s = (t) => _a[t], Xa = /* @__PURE__ */ new Set([_e, Xe]);
|
|
1780
|
+
function Xs(t, e) {
|
|
1781
|
+
let i = _s(t);
|
|
1782
|
+
return Xa.has(i) || (i = X), i.getAnimatableNone ? i.getAnimatableNone(e) : void 0;
|
|
1783
1783
|
}
|
|
1784
1784
|
var Ya = /* @__PURE__ */ new Set([
|
|
1785
1785
|
"auto",
|
|
@@ -1790,11 +1790,11 @@ function qa(t, e, i) {
|
|
|
1790
1790
|
let n = 0, s;
|
|
1791
1791
|
for (; n < t.length && !s; ) {
|
|
1792
1792
|
const o = t[n];
|
|
1793
|
-
typeof o == "string" && !Ya.has(o) &&
|
|
1793
|
+
typeof o == "string" && !Ya.has(o) && Pt(o).values.length && (s = t[n]), n++;
|
|
1794
1794
|
}
|
|
1795
|
-
if (s && i) for (const o of e) t[o] =
|
|
1795
|
+
if (s && i) for (const o of e) t[o] = Xs(i, s);
|
|
1796
1796
|
}
|
|
1797
|
-
var Za = class extends
|
|
1797
|
+
var Za = class extends gi {
|
|
1798
1798
|
constructor(t, e, i, n, s) {
|
|
1799
1799
|
super(t, e, i, n, s, !0);
|
|
1800
1800
|
}
|
|
@@ -1805,22 +1805,22 @@ var Za = class extends vi {
|
|
|
1805
1805
|
for (let a = 0; a < t.length; a++) {
|
|
1806
1806
|
let l = t[a];
|
|
1807
1807
|
if (typeof l == "string" && (l = l.trim(), ci(l))) {
|
|
1808
|
-
const c =
|
|
1808
|
+
const c = Us(l, e.current);
|
|
1809
1809
|
c !== void 0 && (t[a] = c), a === t.length - 1 && (this.finalKeyframe = l);
|
|
1810
1810
|
}
|
|
1811
1811
|
}
|
|
1812
|
-
if (this.resolveNoneKeyframes(),
|
|
1813
|
-
const [n, s] = t, o =
|
|
1814
|
-
if (
|
|
1812
|
+
if (this.resolveNoneKeyframes(), !Ws.has(i) || t.length !== 2) return;
|
|
1813
|
+
const [n, s] = t, o = Zi(n), r = Zi(s);
|
|
1814
|
+
if (Fi(n) !== Fi(s) && et[i]) {
|
|
1815
1815
|
this.needsMeasurement = !0;
|
|
1816
1816
|
return;
|
|
1817
1817
|
}
|
|
1818
1818
|
if (o !== r)
|
|
1819
|
-
if (
|
|
1819
|
+
if (Hi(o) && Hi(r)) for (let a = 0; a < t.length; a++) {
|
|
1820
1820
|
const l = t[a];
|
|
1821
1821
|
typeof l == "string" && (t[a] = parseFloat(l));
|
|
1822
1822
|
}
|
|
1823
|
-
else
|
|
1823
|
+
else et[i] && (this.needsMeasurement = !0);
|
|
1824
1824
|
}
|
|
1825
1825
|
resolveNoneKeyframes() {
|
|
1826
1826
|
const { unresolvedKeyframes: t, name: e } = this, i = [];
|
|
@@ -1830,7 +1830,7 @@ var Za = class extends vi {
|
|
|
1830
1830
|
measureInitialState() {
|
|
1831
1831
|
const { element: t, unresolvedKeyframes: e, name: i } = this;
|
|
1832
1832
|
if (!t || !t.current) return;
|
|
1833
|
-
i === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin =
|
|
1833
|
+
i === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = et[i](t.measureViewportBox(), window.getComputedStyle(t.current)), e[0] = this.measuredOrigin;
|
|
1834
1834
|
const n = e[e.length - 1];
|
|
1835
1835
|
n !== void 0 && t.getValue(i, n).jump(n, !1);
|
|
1836
1836
|
}
|
|
@@ -1840,17 +1840,17 @@ var Za = class extends vi {
|
|
|
1840
1840
|
const n = t.getValue(e);
|
|
1841
1841
|
n && n.jump(this.measuredOrigin, !1);
|
|
1842
1842
|
const s = i.length - 1, o = i[s];
|
|
1843
|
-
i[s] =
|
|
1843
|
+
i[s] = et[e](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), this.removedTransforms?.length && this.removedTransforms.forEach(([r, a]) => {
|
|
1844
1844
|
t.getValue(r).set(a);
|
|
1845
1845
|
}), this.resolveNoneKeyframes();
|
|
1846
1846
|
}
|
|
1847
|
-
},
|
|
1847
|
+
}, Pi = [
|
|
1848
1848
|
"borderTopLeftRadius",
|
|
1849
1849
|
"borderTopRightRadius",
|
|
1850
1850
|
"borderBottomRightRadius",
|
|
1851
1851
|
"borderBottomLeftRadius"
|
|
1852
1852
|
];
|
|
1853
|
-
function
|
|
1853
|
+
function Ys(t, e, i) {
|
|
1854
1854
|
if (t == null) return [];
|
|
1855
1855
|
if (t instanceof EventTarget) return [t];
|
|
1856
1856
|
if (typeof t == "string") {
|
|
@@ -1863,24 +1863,24 @@ function qs(t, e, i) {
|
|
|
1863
1863
|
}
|
|
1864
1864
|
var Ye = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
|
|
1865
1865
|
function Ja(t) {
|
|
1866
|
-
return
|
|
1866
|
+
return ns(t) && "offsetHeight" in t && !("ownerSVGElement" in t);
|
|
1867
1867
|
}
|
|
1868
|
-
var { schedule:
|
|
1868
|
+
var { schedule: Si, cancel: Kc } = /* @__PURE__ */ gs(queueMicrotask, !1), _ = {
|
|
1869
1869
|
x: !1,
|
|
1870
1870
|
y: !1
|
|
1871
1871
|
};
|
|
1872
|
-
function
|
|
1873
|
-
return
|
|
1872
|
+
function qs() {
|
|
1873
|
+
return _.x || _.y;
|
|
1874
1874
|
}
|
|
1875
1875
|
function Qa(t) {
|
|
1876
|
-
return t === "x" || t === "y" ?
|
|
1877
|
-
|
|
1878
|
-
}) :
|
|
1879
|
-
|
|
1876
|
+
return t === "x" || t === "y" ? _[t] ? null : (_[t] = !0, () => {
|
|
1877
|
+
_[t] = !1;
|
|
1878
|
+
}) : _.x || _.y ? null : (_.x = _.y = !0, () => {
|
|
1879
|
+
_.x = _.y = !1;
|
|
1880
1880
|
});
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1883
|
-
const i =
|
|
1882
|
+
function Zs(t, e) {
|
|
1883
|
+
const i = Ys(t), n = new AbortController(), s = {
|
|
1884
1884
|
passive: !0,
|
|
1885
1885
|
...e,
|
|
1886
1886
|
signal: n.signal
|
|
@@ -1892,38 +1892,38 @@ function Js(t, e) {
|
|
|
1892
1892
|
];
|
|
1893
1893
|
}
|
|
1894
1894
|
function tl(t) {
|
|
1895
|
-
return !(t.pointerType === "touch" ||
|
|
1895
|
+
return !(t.pointerType === "touch" || qs());
|
|
1896
1896
|
}
|
|
1897
1897
|
function el(t, e, i = {}) {
|
|
1898
|
-
const [n, s, o] =
|
|
1898
|
+
const [n, s, o] = Zs(t, i);
|
|
1899
1899
|
return n.forEach((r) => {
|
|
1900
1900
|
let a = !1, l = !1, c;
|
|
1901
1901
|
const u = () => {
|
|
1902
1902
|
r.removeEventListener("pointerleave", d);
|
|
1903
|
-
}, h = (
|
|
1904
|
-
c && (c(
|
|
1905
|
-
}, f = (
|
|
1906
|
-
a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), l && (l = !1, h(
|
|
1903
|
+
}, h = (m) => {
|
|
1904
|
+
c && (c(m), c = void 0), u();
|
|
1905
|
+
}, f = (m) => {
|
|
1906
|
+
a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), l && (l = !1, h(m));
|
|
1907
1907
|
}, p = () => {
|
|
1908
1908
|
a = !0, window.addEventListener("pointerup", f, s), window.addEventListener("pointercancel", f, s);
|
|
1909
|
-
}, d = (
|
|
1910
|
-
if (
|
|
1909
|
+
}, d = (m) => {
|
|
1910
|
+
if (m.pointerType !== "touch") {
|
|
1911
1911
|
if (a) {
|
|
1912
1912
|
l = !0;
|
|
1913
1913
|
return;
|
|
1914
1914
|
}
|
|
1915
|
-
h(
|
|
1915
|
+
h(m);
|
|
1916
1916
|
}
|
|
1917
|
-
},
|
|
1918
|
-
if (!tl(
|
|
1917
|
+
}, g = (m) => {
|
|
1918
|
+
if (!tl(m)) return;
|
|
1919
1919
|
l = !1;
|
|
1920
|
-
const
|
|
1921
|
-
typeof
|
|
1920
|
+
const y = e(r, m);
|
|
1921
|
+
typeof y == "function" && (c = y, r.addEventListener("pointerleave", d, s));
|
|
1922
1922
|
};
|
|
1923
|
-
r.addEventListener("pointerenter",
|
|
1923
|
+
r.addEventListener("pointerenter", g, s), r.addEventListener("pointerdown", p, s);
|
|
1924
1924
|
}), o;
|
|
1925
1925
|
}
|
|
1926
|
-
var
|
|
1926
|
+
var Js = (t, e) => e ? t === e ? !0 : Js(t, e.parentElement) : !1, bi = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, il = /* @__PURE__ */ new Set([
|
|
1927
1927
|
"BUTTON",
|
|
1928
1928
|
"INPUT",
|
|
1929
1929
|
"SELECT",
|
|
@@ -1942,7 +1942,7 @@ function rl(t) {
|
|
|
1942
1942
|
return sl.has(t.tagName) || t.isContentEditable === !0;
|
|
1943
1943
|
}
|
|
1944
1944
|
var Yt = /* @__PURE__ */ new WeakSet();
|
|
1945
|
-
function
|
|
1945
|
+
function Qi(t) {
|
|
1946
1946
|
return (e) => {
|
|
1947
1947
|
e.key === "Enter" && t(e);
|
|
1948
1948
|
};
|
|
@@ -1956,32 +1956,32 @@ function we(t, e) {
|
|
|
1956
1956
|
var ol = (t, e) => {
|
|
1957
1957
|
const i = t.currentTarget;
|
|
1958
1958
|
if (!i) return;
|
|
1959
|
-
const n =
|
|
1959
|
+
const n = Qi(() => {
|
|
1960
1960
|
if (Yt.has(i)) return;
|
|
1961
1961
|
we(i, "down");
|
|
1962
|
-
const s =
|
|
1962
|
+
const s = Qi(() => {
|
|
1963
1963
|
we(i, "up");
|
|
1964
1964
|
}), o = () => we(i, "cancel");
|
|
1965
1965
|
i.addEventListener("keyup", s, e), i.addEventListener("blur", o, e);
|
|
1966
1966
|
});
|
|
1967
1967
|
i.addEventListener("keydown", n, e), i.addEventListener("blur", () => i.removeEventListener("keydown", n), e);
|
|
1968
1968
|
};
|
|
1969
|
-
function
|
|
1970
|
-
return
|
|
1969
|
+
function tn(t) {
|
|
1970
|
+
return bi(t) && !qs();
|
|
1971
1971
|
}
|
|
1972
|
-
var
|
|
1972
|
+
var en = /* @__PURE__ */ new WeakSet();
|
|
1973
1973
|
function al(t, e, i = {}) {
|
|
1974
|
-
const [n, s, o] =
|
|
1974
|
+
const [n, s, o] = Zs(t, i), r = (a) => {
|
|
1975
1975
|
const l = a.currentTarget;
|
|
1976
|
-
if (!
|
|
1977
|
-
Yt.add(l), i.stopPropagation &&
|
|
1976
|
+
if (!tn(a) || en.has(a)) return;
|
|
1977
|
+
Yt.add(l), i.stopPropagation && en.add(a);
|
|
1978
1978
|
const c = e(l, a), u = {
|
|
1979
1979
|
...s,
|
|
1980
1980
|
capture: !0
|
|
1981
|
-
}, h = (d,
|
|
1982
|
-
window.removeEventListener("pointerup", f, u), window.removeEventListener("pointercancel", p, u), Yt.has(l) && Yt.delete(l),
|
|
1981
|
+
}, h = (d, g) => {
|
|
1982
|
+
window.removeEventListener("pointerup", f, u), window.removeEventListener("pointercancel", p, u), Yt.has(l) && Yt.delete(l), tn(d) && typeof c == "function" && c(d, { success: g });
|
|
1983
1983
|
}, f = (d) => {
|
|
1984
|
-
h(d, l === window || l === document || i.useGlobalTarget ||
|
|
1984
|
+
h(d, l === window || l === document || i.useGlobalTarget || Js(l, d.target));
|
|
1985
1985
|
}, p = (d) => {
|
|
1986
1986
|
h(d, !1);
|
|
1987
1987
|
};
|
|
@@ -1991,10 +1991,10 @@ function al(t, e, i = {}) {
|
|
|
1991
1991
|
(i.useGlobalTarget ? window : a).addEventListener("pointerdown", r, s), Ja(a) && (a.addEventListener("focus", (l) => ol(l, s)), !nl(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
|
|
1992
1992
|
}), o;
|
|
1993
1993
|
}
|
|
1994
|
-
function
|
|
1995
|
-
return
|
|
1994
|
+
function Ai(t) {
|
|
1995
|
+
return ns(t) && "ownerSVGElement" in t;
|
|
1996
1996
|
}
|
|
1997
|
-
var qt = /* @__PURE__ */ new WeakMap(), Zt,
|
|
1997
|
+
var qt = /* @__PURE__ */ new WeakMap(), Zt, Qs = (t, e, i) => (n, s) => s && s[0] ? s[0][t + "Size"] : Ai(n) && "getBBox" in n ? n.getBBox()[e] : n[i], ll = /* @__PURE__ */ Qs("inline", "width", "offsetWidth"), ul = /* @__PURE__ */ Qs("block", "height", "offsetHeight");
|
|
1998
1998
|
function cl({ target: t, borderBoxSize: e }) {
|
|
1999
1999
|
qt.get(t)?.forEach((i) => {
|
|
2000
2000
|
i(t, {
|
|
@@ -2015,7 +2015,7 @@ function fl() {
|
|
|
2015
2015
|
}
|
|
2016
2016
|
function dl(t, e) {
|
|
2017
2017
|
Zt || fl();
|
|
2018
|
-
const i =
|
|
2018
|
+
const i = Ys(t);
|
|
2019
2019
|
return i.forEach((n) => {
|
|
2020
2020
|
let s = qt.get(n);
|
|
2021
2021
|
s || (s = /* @__PURE__ */ new Set(), qt.set(n, s)), s.add(e), Zt?.observe(n);
|
|
@@ -2026,9 +2026,9 @@ function dl(t, e) {
|
|
|
2026
2026
|
});
|
|
2027
2027
|
};
|
|
2028
2028
|
}
|
|
2029
|
-
var Jt = /* @__PURE__ */ new Set(),
|
|
2029
|
+
var Jt = /* @__PURE__ */ new Set(), xt;
|
|
2030
2030
|
function pl() {
|
|
2031
|
-
|
|
2031
|
+
xt = () => {
|
|
2032
2032
|
const t = {
|
|
2033
2033
|
get width() {
|
|
2034
2034
|
return window.innerWidth;
|
|
@@ -2038,49 +2038,49 @@ function pl() {
|
|
|
2038
2038
|
}
|
|
2039
2039
|
};
|
|
2040
2040
|
Jt.forEach((e) => e(t));
|
|
2041
|
-
}, window.addEventListener("resize",
|
|
2041
|
+
}, window.addEventListener("resize", xt);
|
|
2042
2042
|
}
|
|
2043
2043
|
function ml(t) {
|
|
2044
|
-
return Jt.add(t),
|
|
2045
|
-
Jt.delete(t), !Jt.size && typeof
|
|
2044
|
+
return Jt.add(t), xt || pl(), () => {
|
|
2045
|
+
Jt.delete(t), !Jt.size && typeof xt == "function" && (window.removeEventListener("resize", xt), xt = void 0);
|
|
2046
2046
|
};
|
|
2047
2047
|
}
|
|
2048
|
-
function
|
|
2048
|
+
function nn(t, e) {
|
|
2049
2049
|
return typeof t == "function" ? ml(t) : dl(t, e);
|
|
2050
2050
|
}
|
|
2051
|
-
var
|
|
2051
|
+
var vt = {
|
|
2052
2052
|
value: null,
|
|
2053
2053
|
addProjectionMetrics: null
|
|
2054
2054
|
};
|
|
2055
2055
|
function vl(t) {
|
|
2056
|
-
return
|
|
2056
|
+
return Ai(t) && t.tagName === "svg";
|
|
2057
2057
|
}
|
|
2058
2058
|
var gl = [
|
|
2059
|
-
...
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
], yl = (t) => gl.find(
|
|
2059
|
+
...Gs,
|
|
2060
|
+
E,
|
|
2061
|
+
X
|
|
2062
|
+
], yl = (t) => gl.find(Hs(t)), sn = () => ({
|
|
2063
2063
|
translate: 0,
|
|
2064
2064
|
scale: 1,
|
|
2065
2065
|
origin: 0,
|
|
2066
2066
|
originPoint: 0
|
|
2067
|
-
}),
|
|
2068
|
-
x:
|
|
2069
|
-
y:
|
|
2070
|
-
}),
|
|
2067
|
+
}), wt = () => ({
|
|
2068
|
+
x: sn(),
|
|
2069
|
+
y: sn()
|
|
2070
|
+
}), rn = () => ({
|
|
2071
2071
|
min: 0,
|
|
2072
2072
|
max: 0
|
|
2073
2073
|
}), L = () => ({
|
|
2074
|
-
x:
|
|
2075
|
-
y:
|
|
2074
|
+
x: rn(),
|
|
2075
|
+
y: rn()
|
|
2076
2076
|
}), Tl = /* @__PURE__ */ new WeakMap();
|
|
2077
2077
|
function de(t) {
|
|
2078
2078
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
2079
2079
|
}
|
|
2080
|
-
function
|
|
2080
|
+
function Ot(t) {
|
|
2081
2081
|
return typeof t == "string" || Array.isArray(t);
|
|
2082
2082
|
}
|
|
2083
|
-
var
|
|
2083
|
+
var Vi = [
|
|
2084
2084
|
"animate",
|
|
2085
2085
|
"whileInView",
|
|
2086
2086
|
"whileFocus",
|
|
@@ -2088,39 +2088,39 @@ var Ai = [
|
|
|
2088
2088
|
"whileTap",
|
|
2089
2089
|
"whileDrag",
|
|
2090
2090
|
"exit"
|
|
2091
|
-
],
|
|
2091
|
+
], Mi = ["initial", ...Vi];
|
|
2092
2092
|
function pe(t) {
|
|
2093
|
-
return de(t.animate) ||
|
|
2093
|
+
return de(t.animate) || Mi.some((e) => Ot(t[e]));
|
|
2094
2094
|
}
|
|
2095
|
-
function
|
|
2095
|
+
function tr(t) {
|
|
2096
2096
|
return !!(pe(t) || t.variants);
|
|
2097
2097
|
}
|
|
2098
2098
|
function xl(t, e, i) {
|
|
2099
2099
|
for (const n in e) {
|
|
2100
2100
|
const s = e[n], o = i[n];
|
|
2101
|
-
if (
|
|
2102
|
-
else if (
|
|
2101
|
+
if (B(s)) t.addValue(n, s);
|
|
2102
|
+
else if (B(o)) t.addValue(n, St(s, { owner: t }));
|
|
2103
2103
|
else if (o !== s)
|
|
2104
2104
|
if (t.hasValue(n)) {
|
|
2105
2105
|
const r = t.getValue(n);
|
|
2106
2106
|
r.liveStyle === !0 ? r.jump(s) : r.hasAnimated || r.set(s);
|
|
2107
2107
|
} else {
|
|
2108
2108
|
const r = t.getStaticValue(n);
|
|
2109
|
-
t.addValue(n,
|
|
2109
|
+
t.addValue(n, St(r !== void 0 ? r : s, { owner: t }));
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
2112
|
for (const n in i) e[n] === void 0 && t.removeValue(n);
|
|
2113
2113
|
return e;
|
|
2114
2114
|
}
|
|
2115
|
-
var qe = { current: null },
|
|
2115
|
+
var qe = { current: null }, er = { current: !1 }, wl = typeof window < "u";
|
|
2116
2116
|
function Pl() {
|
|
2117
|
-
if (
|
|
2117
|
+
if (er.current = !0, !!wl)
|
|
2118
2118
|
if (window.matchMedia) {
|
|
2119
2119
|
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => qe.current = t.matches;
|
|
2120
2120
|
t.addEventListener("change", e), e();
|
|
2121
2121
|
} else qe.current = !1;
|
|
2122
2122
|
}
|
|
2123
|
-
var
|
|
2123
|
+
var on = [
|
|
2124
2124
|
"AnimationStart",
|
|
2125
2125
|
"AnimationComplete",
|
|
2126
2126
|
"Update",
|
|
@@ -2129,7 +2129,7 @@ var rn = [
|
|
|
2129
2129
|
"LayoutAnimationStart",
|
|
2130
2130
|
"LayoutAnimationComplete"
|
|
2131
2131
|
], ae = {};
|
|
2132
|
-
function
|
|
2132
|
+
function ir(t) {
|
|
2133
2133
|
ae = t;
|
|
2134
2134
|
}
|
|
2135
2135
|
function Sl() {
|
|
@@ -2140,27 +2140,27 @@ var bl = class {
|
|
|
2140
2140
|
return {};
|
|
2141
2141
|
}
|
|
2142
2142
|
constructor({ parent: t, props: e, presenceContext: i, reducedMotionConfig: n, skipAnimations: s, blockInitialAnimation: o, visualState: r }, a = {}) {
|
|
2143
|
-
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
2143
|
+
this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.shouldSkipAnimations = !1, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = gi, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.hasBeenMounted = !1, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
2144
2144
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
2145
2145
|
}, this.renderScheduledAt = 0, this.scheduleRender = () => {
|
|
2146
|
-
const f =
|
|
2147
|
-
this.renderScheduledAt < f && (this.renderScheduledAt = f,
|
|
2146
|
+
const f = I.now();
|
|
2147
|
+
this.renderScheduledAt < f && (this.renderScheduledAt = f, V.render(this.render, !1, !0));
|
|
2148
2148
|
};
|
|
2149
2149
|
const { latestValues: l, renderState: c } = r;
|
|
2150
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = e.initial ? { ...l } : {}, this.renderState = c, this.parent = t, this.props = e, this.presenceContext = i, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = n, this.skipAnimationsConfig = s, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = pe(e), this.isVariantNode =
|
|
2150
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = e.initial ? { ...l } : {}, this.renderState = c, this.parent = t, this.props = e, this.presenceContext = i, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = n, this.skipAnimationsConfig = s, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = pe(e), this.isVariantNode = tr(e), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
|
|
2151
2151
|
const { willChange: u, ...h } = this.scrapeMotionValuesFromProps(e, {}, this);
|
|
2152
2152
|
for (const f in h) {
|
|
2153
2153
|
const p = h[f];
|
|
2154
|
-
l[f] !== void 0 &&
|
|
2154
|
+
l[f] !== void 0 && B(p) && p.set(l[f]);
|
|
2155
2155
|
}
|
|
2156
2156
|
}
|
|
2157
2157
|
mount(t) {
|
|
2158
2158
|
if (this.hasBeenMounted) for (const e in this.initialValues)
|
|
2159
2159
|
this.values.get(e)?.jump(this.initialValues[e]), this.latestValues[e] = this.initialValues[e];
|
|
2160
|
-
this.current = t, Tl.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, i) => this.bindToMotionValue(i, e)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (
|
|
2160
|
+
this.current = t, Tl.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((e, i) => this.bindToMotionValue(i, e)), this.reducedMotionConfig === "never" ? this.shouldReduceMotion = !1 : this.reducedMotionConfig === "always" ? this.shouldReduceMotion = !0 : (er.current || Pl(), this.shouldReduceMotion = qe.current), process.env.NODE_ENV !== "production" && ai(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected.", "reduced-motion-disabled"), this.shouldSkipAnimations = this.skipAnimationsConfig ?? !1, this.parent?.addChild(this), this.update(this.props, this.presenceContext), this.hasBeenMounted = !0;
|
|
2161
2161
|
}
|
|
2162
2162
|
unmount() {
|
|
2163
|
-
this.projection && this.projection.unmount(),
|
|
2163
|
+
this.projection && this.projection.unmount(), nt(this.notifyUpdate), nt(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
|
|
2164
2164
|
for (const t in this.events) this.events[t].clear();
|
|
2165
2165
|
for (const t in this.features) {
|
|
2166
2166
|
const e = this.features[t];
|
|
@@ -2175,24 +2175,24 @@ var bl = class {
|
|
|
2175
2175
|
this.children.delete(t), this.enteringChildren && this.enteringChildren.delete(t);
|
|
2176
2176
|
}
|
|
2177
2177
|
bindToMotionValue(t, e) {
|
|
2178
|
-
if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), e.accelerate &&
|
|
2179
|
-
const { factory: o, keyframes: r, times: a, ease: l, duration: c } = e.accelerate, u = new
|
|
2178
|
+
if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), e.accelerate && Os.has(t) && this.current instanceof HTMLElement) {
|
|
2179
|
+
const { factory: o, keyframes: r, times: a, ease: l, duration: c } = e.accelerate, u = new Fs({
|
|
2180
2180
|
element: this.current,
|
|
2181
2181
|
name: t,
|
|
2182
2182
|
keyframes: r,
|
|
2183
2183
|
times: a,
|
|
2184
2184
|
ease: l,
|
|
2185
|
-
duration:
|
|
2185
|
+
duration: N(c)
|
|
2186
2186
|
}), h = o(u);
|
|
2187
2187
|
this.valueSubscriptions.set(t, () => {
|
|
2188
2188
|
h(), u.cancel();
|
|
2189
2189
|
});
|
|
2190
2190
|
return;
|
|
2191
2191
|
}
|
|
2192
|
-
const i =
|
|
2192
|
+
const i = Ct.has(t);
|
|
2193
2193
|
i && this.onBindTransform && this.onBindTransform();
|
|
2194
2194
|
const n = e.on("change", (o) => {
|
|
2195
|
-
this.latestValues[t] = o, this.props.onUpdate &&
|
|
2195
|
+
this.latestValues[t] = o, this.props.onUpdate && V.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
|
|
2196
2196
|
});
|
|
2197
2197
|
let s;
|
|
2198
2198
|
typeof window < "u" && window.MotionCheckAppearSync && (s = window.MotionCheckAppearSync(this, t, e)), this.valueSubscriptions.set(t, () => {
|
|
@@ -2228,8 +2228,8 @@ var bl = class {
|
|
|
2228
2228
|
}
|
|
2229
2229
|
update(t, e) {
|
|
2230
2230
|
(t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = e;
|
|
2231
|
-
for (let i = 0; i <
|
|
2232
|
-
const n =
|
|
2231
|
+
for (let i = 0; i < on.length; i++) {
|
|
2232
|
+
const n = on[i];
|
|
2233
2233
|
this.propEventSubscriptions[n] && (this.propEventSubscriptions[n](), delete this.propEventSubscriptions[n]);
|
|
2234
2234
|
const s = t["on" + n];
|
|
2235
2235
|
s && (this.propEventSubscriptions[n] = this.on(n, s));
|
|
@@ -2271,11 +2271,11 @@ var bl = class {
|
|
|
2271
2271
|
getValue(t, e) {
|
|
2272
2272
|
if (this.props.values && this.props.values[t]) return this.props.values[t];
|
|
2273
2273
|
let i = this.values.get(t);
|
|
2274
|
-
return i === void 0 && e !== void 0 && (i =
|
|
2274
|
+
return i === void 0 && e !== void 0 && (i = St(e === null ? void 0 : e, { owner: this }), this.addValue(t, i)), i;
|
|
2275
2275
|
}
|
|
2276
2276
|
readValue(t, e) {
|
|
2277
2277
|
let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
|
|
2278
|
-
return i != null && (typeof i == "string" && (
|
|
2278
|
+
return i != null && (typeof i == "string" && (is(i) || ss(i)) ? i = parseFloat(i) : !yl(i) && X.test(e) && (i = Xs(t, e)), this.setBaseTarget(t, B(i) ? i.get() : i)), B(i) ? i.get() : i;
|
|
2279
2279
|
}
|
|
2280
2280
|
setBaseTarget(t, e) {
|
|
2281
2281
|
this.baseTarget[t] = e;
|
|
@@ -2284,12 +2284,12 @@ var bl = class {
|
|
|
2284
2284
|
const { initial: e } = this.props;
|
|
2285
2285
|
let i;
|
|
2286
2286
|
if (typeof e == "string" || typeof e == "object") {
|
|
2287
|
-
const s =
|
|
2287
|
+
const s = xi(this.props, e, this.presenceContext?.custom);
|
|
2288
2288
|
s && (i = s[t]);
|
|
2289
2289
|
}
|
|
2290
2290
|
if (e && i !== void 0) return i;
|
|
2291
2291
|
const n = this.getBaseTargetFromProps(this.props, t);
|
|
2292
|
-
return n !== void 0 && !
|
|
2292
|
+
return n !== void 0 && !B(n) ? n : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
|
|
2293
2293
|
}
|
|
2294
2294
|
on(t, e) {
|
|
2295
2295
|
return this.events[t] || (this.events[t] = new oi()), this.events[t].add(e);
|
|
@@ -2298,9 +2298,9 @@ var bl = class {
|
|
|
2298
2298
|
this.events[t] && this.events[t].notify(...e);
|
|
2299
2299
|
}
|
|
2300
2300
|
scheduleRenderMicrotask() {
|
|
2301
|
-
|
|
2301
|
+
Si.render(this.render);
|
|
2302
2302
|
}
|
|
2303
|
-
},
|
|
2303
|
+
}, nr = class extends bl {
|
|
2304
2304
|
constructor() {
|
|
2305
2305
|
super(...arguments), this.KeyframeResolver = Za;
|
|
2306
2306
|
}
|
|
@@ -2317,18 +2317,18 @@ var bl = class {
|
|
|
2317
2317
|
handleChildMotionValue() {
|
|
2318
2318
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
2319
2319
|
const { children: t } = this.props;
|
|
2320
|
-
|
|
2320
|
+
B(t) && (this.childSubscription = t.on("change", (e) => {
|
|
2321
2321
|
this.current && (this.current.textContent = `${e}`);
|
|
2322
2322
|
}));
|
|
2323
2323
|
}
|
|
2324
|
-
},
|
|
2324
|
+
}, st = class {
|
|
2325
2325
|
constructor(t) {
|
|
2326
2326
|
this.isMounted = !1, this.node = t;
|
|
2327
2327
|
}
|
|
2328
2328
|
update() {
|
|
2329
2329
|
}
|
|
2330
2330
|
};
|
|
2331
|
-
function
|
|
2331
|
+
function sr({ top: t, left: e, right: i, bottom: n }) {
|
|
2332
2332
|
return {
|
|
2333
2333
|
x: {
|
|
2334
2334
|
min: e,
|
|
@@ -2370,28 +2370,28 @@ function Pe(t) {
|
|
|
2370
2370
|
function Ze({ scale: t, scaleX: e, scaleY: i }) {
|
|
2371
2371
|
return !Pe(t) || !Pe(e) || !Pe(i);
|
|
2372
2372
|
}
|
|
2373
|
-
function
|
|
2374
|
-
return Ze(t) ||
|
|
2373
|
+
function at(t) {
|
|
2374
|
+
return Ze(t) || rr(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
2375
2375
|
}
|
|
2376
|
-
function
|
|
2377
|
-
return
|
|
2376
|
+
function rr(t) {
|
|
2377
|
+
return an(t.x) || an(t.y);
|
|
2378
2378
|
}
|
|
2379
|
-
function
|
|
2379
|
+
function an(t) {
|
|
2380
2380
|
return t && t !== "0%";
|
|
2381
2381
|
}
|
|
2382
2382
|
function le(t, e, i) {
|
|
2383
2383
|
return i + e * (t - i);
|
|
2384
2384
|
}
|
|
2385
|
-
function
|
|
2385
|
+
function ln(t, e, i, n, s) {
|
|
2386
2386
|
return s !== void 0 && (t = le(t, s, n)), le(t, i, n) + e;
|
|
2387
2387
|
}
|
|
2388
2388
|
function Je(t, e = 0, i = 1, n, s) {
|
|
2389
|
-
t.min =
|
|
2389
|
+
t.min = ln(t.min, e, i, n, s), t.max = ln(t.max, e, i, n, s);
|
|
2390
2390
|
}
|
|
2391
|
-
function
|
|
2391
|
+
function or(t, { x: e, y: i }) {
|
|
2392
2392
|
Je(t.x, e.translate, e.scale, e.originPoint), Je(t.y, i.translate, i.scale, i.originPoint);
|
|
2393
2393
|
}
|
|
2394
|
-
var
|
|
2394
|
+
var un = 0.999999999999, cn = 1.0000000000001;
|
|
2395
2395
|
function Ml(t, e, i, n = !1) {
|
|
2396
2396
|
const s = i.length;
|
|
2397
2397
|
if (!s) return;
|
|
@@ -2400,40 +2400,40 @@ function Ml(t, e, i, n = !1) {
|
|
|
2400
2400
|
for (let a = 0; a < s; a++) {
|
|
2401
2401
|
o = i[a], r = o.projectionDelta;
|
|
2402
2402
|
const { visualElement: l } = o.options;
|
|
2403
|
-
l && l.props.style && l.props.style.display === "contents" || (n && o.options.layoutScroll && o.scroll && o !== o.root && (
|
|
2403
|
+
l && l.props.style && l.props.style.display === "contents" || (n && o.options.layoutScroll && o.scroll && o !== o.root && (q(t.x, -o.scroll.offset.x), q(t.y, -o.scroll.offset.y)), r && (e.x *= r.x.scale, e.y *= r.y.scale, or(t, r)), n && at(o.latestValues) && Qt(t, o.latestValues, o.layout?.layoutBox));
|
|
2404
2404
|
}
|
|
2405
|
-
e.x <
|
|
2405
|
+
e.x < cn && e.x > un && (e.x = 1), e.y < cn && e.y > un && (e.y = 1);
|
|
2406
2406
|
}
|
|
2407
|
-
function
|
|
2407
|
+
function q(t, e) {
|
|
2408
2408
|
t.min += e, t.max += e;
|
|
2409
2409
|
}
|
|
2410
|
-
function
|
|
2411
|
-
Je(t, e, i,
|
|
2410
|
+
function hn(t, e, i, n, s = 0.5) {
|
|
2411
|
+
Je(t, e, i, A(t.min, t.max, s), n);
|
|
2412
2412
|
}
|
|
2413
|
-
function
|
|
2413
|
+
function fn(t, e) {
|
|
2414
2414
|
return typeof t == "string" ? parseFloat(t) / 100 * (e.max - e.min) : t;
|
|
2415
2415
|
}
|
|
2416
2416
|
function Qt(t, e, i) {
|
|
2417
2417
|
const n = i ?? t;
|
|
2418
|
-
|
|
2418
|
+
hn(t.x, fn(e.x, n.x), e.scaleX, e.scale, e.originX), hn(t.y, fn(e.y, n.y), e.scaleY, e.scale, e.originY);
|
|
2419
2419
|
}
|
|
2420
|
-
function
|
|
2421
|
-
return
|
|
2420
|
+
function ar(t, e) {
|
|
2421
|
+
return sr(Vl(t.getBoundingClientRect(), e));
|
|
2422
2422
|
}
|
|
2423
2423
|
function Cl(t, e, i) {
|
|
2424
|
-
const n =
|
|
2425
|
-
return s && (
|
|
2424
|
+
const n = ar(t, i), { scroll: s } = e;
|
|
2425
|
+
return s && (q(n.x, s.offset.x), q(n.y, s.offset.y)), n;
|
|
2426
2426
|
}
|
|
2427
2427
|
var Dl = {
|
|
2428
2428
|
x: "translateX",
|
|
2429
2429
|
y: "translateY",
|
|
2430
2430
|
z: "translateZ",
|
|
2431
2431
|
transformPerspective: "perspective"
|
|
2432
|
-
}, El =
|
|
2432
|
+
}, El = Mt.length;
|
|
2433
2433
|
function Rl(t, e, i) {
|
|
2434
2434
|
let n = "", s = !0;
|
|
2435
2435
|
for (let r = 0; r < El; r++) {
|
|
2436
|
-
const a =
|
|
2436
|
+
const a = Mt[r], l = t[a];
|
|
2437
2437
|
if (l === void 0) continue;
|
|
2438
2438
|
let c = !0;
|
|
2439
2439
|
if (typeof l == "number") c = l === (a.startsWith("scale") ? 1 : 0);
|
|
@@ -2454,15 +2454,15 @@ function Rl(t, e, i) {
|
|
|
2454
2454
|
const o = t.pathRotation;
|
|
2455
2455
|
return o && (s = !1, n += `rotate(${Ye(o, oe.pathRotation)}) `), n = n.trim(), i ? n = i(e, s ? "" : n) : s && (n = "none"), n;
|
|
2456
2456
|
}
|
|
2457
|
-
function
|
|
2457
|
+
function Ci(t, e, i) {
|
|
2458
2458
|
const { style: n, vars: s, transformOrigin: o } = t;
|
|
2459
2459
|
let r = !1, a = !1;
|
|
2460
2460
|
for (const l in e) {
|
|
2461
2461
|
const c = e[l];
|
|
2462
|
-
if (
|
|
2462
|
+
if (Ct.has(l)) {
|
|
2463
2463
|
r = !0;
|
|
2464
2464
|
continue;
|
|
2465
|
-
} else if (
|
|
2465
|
+
} else if (Ts(l)) {
|
|
2466
2466
|
s[l] = c;
|
|
2467
2467
|
continue;
|
|
2468
2468
|
} else {
|
|
@@ -2475,74 +2475,74 @@ function Mi(t, e, i) {
|
|
|
2475
2475
|
n.transformOrigin = `${l} ${c} ${u}`;
|
|
2476
2476
|
}
|
|
2477
2477
|
}
|
|
2478
|
-
function
|
|
2478
|
+
function lr(t, { style: e, vars: i }, n, s) {
|
|
2479
2479
|
const o = t.style;
|
|
2480
2480
|
let r;
|
|
2481
2481
|
for (r in e) o[r] = e[r];
|
|
2482
2482
|
s?.applyProjectionStyles(o, n);
|
|
2483
2483
|
for (r in i) o.setProperty(r, i[r]);
|
|
2484
2484
|
}
|
|
2485
|
-
function
|
|
2485
|
+
function dn(t, e) {
|
|
2486
2486
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
2487
2487
|
}
|
|
2488
|
-
var
|
|
2488
|
+
var Et = { correct: (t, e) => {
|
|
2489
2489
|
if (!e.target) return t;
|
|
2490
2490
|
if (typeof t == "string")
|
|
2491
|
-
if (
|
|
2491
|
+
if (T.test(t)) t = parseFloat(t);
|
|
2492
2492
|
else return t;
|
|
2493
|
-
return `${
|
|
2493
|
+
return `${dn(t, e.target.x)}% ${dn(t, e.target.y)}%`;
|
|
2494
2494
|
} }, Ll = { correct: (t, { treeScale: e, projectionDelta: i }) => {
|
|
2495
|
-
const n = t, s =
|
|
2495
|
+
const n = t, s = X.parse(t);
|
|
2496
2496
|
if (s.length > 5) return n;
|
|
2497
|
-
const o =
|
|
2497
|
+
const o = X.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = i.x.scale * e.x, l = i.y.scale * e.y;
|
|
2498
2498
|
s[0 + r] /= a, s[1 + r] /= l;
|
|
2499
|
-
const c =
|
|
2499
|
+
const c = A(a, l, 0.5);
|
|
2500
2500
|
return typeof s[2 + r] == "number" && (s[2 + r] /= c), typeof s[3 + r] == "number" && (s[3 + r] /= c), o(s);
|
|
2501
2501
|
} }, Qe = {
|
|
2502
2502
|
borderRadius: {
|
|
2503
|
-
...
|
|
2504
|
-
applyTo: [...
|
|
2503
|
+
...Et,
|
|
2504
|
+
applyTo: [...Pi]
|
|
2505
2505
|
},
|
|
2506
|
-
borderTopLeftRadius:
|
|
2507
|
-
borderTopRightRadius:
|
|
2508
|
-
borderBottomLeftRadius:
|
|
2509
|
-
borderBottomRightRadius:
|
|
2506
|
+
borderTopLeftRadius: Et,
|
|
2507
|
+
borderTopRightRadius: Et,
|
|
2508
|
+
borderBottomLeftRadius: Et,
|
|
2509
|
+
borderBottomRightRadius: Et,
|
|
2510
2510
|
boxShadow: Ll
|
|
2511
2511
|
};
|
|
2512
|
-
function
|
|
2513
|
-
return
|
|
2512
|
+
function ur(t, { layout: e, layoutId: i }) {
|
|
2513
|
+
return Ct.has(t) || t.startsWith("origin") || (e || i !== void 0) && (!!Qe[t] || t === "opacity");
|
|
2514
2514
|
}
|
|
2515
|
-
function
|
|
2515
|
+
function Di(t, e, i) {
|
|
2516
2516
|
const n = t.style, s = e?.style, o = {};
|
|
2517
2517
|
if (!n) return o;
|
|
2518
|
-
for (const r in n) (
|
|
2518
|
+
for (const r in n) (B(n[r]) || s && B(s[r]) || ur(r, t) || i?.getValue(r)?.liveStyle !== void 0) && (o[r] = n[r]);
|
|
2519
2519
|
return o;
|
|
2520
2520
|
}
|
|
2521
2521
|
function kl(t) {
|
|
2522
2522
|
return window.getComputedStyle(t);
|
|
2523
2523
|
}
|
|
2524
|
-
var Bl = class extends
|
|
2524
|
+
var Bl = class extends nr {
|
|
2525
2525
|
constructor() {
|
|
2526
|
-
super(...arguments), this.type = "html", this.renderInstance =
|
|
2526
|
+
super(...arguments), this.type = "html", this.renderInstance = lr;
|
|
2527
2527
|
}
|
|
2528
2528
|
mount(t) {
|
|
2529
|
-
|
|
2529
|
+
Q(!!t.style, "motion.create() components must forward their ref to a HTML or SVG element", "custom-component-ref"), super.mount(t);
|
|
2530
2530
|
}
|
|
2531
2531
|
readValueFromInstance(t, e) {
|
|
2532
|
-
if (
|
|
2532
|
+
if (Ct.has(e)) return this.projection?.isProjecting ? je(e) : Zo(t, e);
|
|
2533
2533
|
{
|
|
2534
|
-
const i = kl(t), n = (
|
|
2534
|
+
const i = kl(t), n = (Ts(e) ? i.getPropertyValue(e) : i[e]) || 0;
|
|
2535
2535
|
return typeof n == "string" ? n.trim() : n;
|
|
2536
2536
|
}
|
|
2537
2537
|
}
|
|
2538
2538
|
measureInstanceViewportBox(t, { transformPagePoint: e }) {
|
|
2539
|
-
return
|
|
2539
|
+
return ar(t, e);
|
|
2540
2540
|
}
|
|
2541
2541
|
build(t, e, i) {
|
|
2542
|
-
|
|
2542
|
+
Ci(t, e, i.transformTemplate);
|
|
2543
2543
|
}
|
|
2544
2544
|
scrapeMotionValuesFromProps(t, e, i) {
|
|
2545
|
-
return
|
|
2545
|
+
return Di(t, e, i);
|
|
2546
2546
|
}
|
|
2547
2547
|
}, Fl = {
|
|
2548
2548
|
offset: "stroke-dashoffset",
|
|
@@ -2556,7 +2556,7 @@ function Ol(t, e, i = 1, n = 0, s = !0) {
|
|
|
2556
2556
|
const o = s ? Fl : Il;
|
|
2557
2557
|
t[o.offset] = `${-n}`, t[o.array] = `${e} ${i}`;
|
|
2558
2558
|
}
|
|
2559
|
-
var
|
|
2559
|
+
var cr = [
|
|
2560
2560
|
"transform",
|
|
2561
2561
|
"opacity",
|
|
2562
2562
|
"offsetDistance",
|
|
@@ -2564,17 +2564,17 @@ var hr = [
|
|
|
2564
2564
|
"offsetRotate",
|
|
2565
2565
|
"offsetAnchor"
|
|
2566
2566
|
];
|
|
2567
|
-
function
|
|
2568
|
-
if (
|
|
2567
|
+
function hr(t, { attrX: e, attrY: i, attrScale: n, pathLength: s, pathSpacing: o = 1, pathOffset: r = 0, ...a }, l, c, u) {
|
|
2568
|
+
if (Ci(t, a, c), l) {
|
|
2569
2569
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
2570
2570
|
return;
|
|
2571
2571
|
}
|
|
2572
2572
|
t.attrs = t.style, t.style = {};
|
|
2573
2573
|
const { attrs: h, style: f } = t;
|
|
2574
|
-
for (const p of
|
|
2574
|
+
for (const p of cr) h[p] !== void 0 && (f[p] = h[p], delete h[p]);
|
|
2575
2575
|
(f.transform || h.transformOrigin) && (f.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), f.transform && (f.transformBox = u?.transformBox ?? "fill-box", delete h.transformBox), e !== void 0 && (h.x = e), i !== void 0 && (h.y = i), n !== void 0 && (h.scale = n), s !== void 0 && Ol(h, s, o, r, !1);
|
|
2576
2576
|
}
|
|
2577
|
-
var
|
|
2577
|
+
var fr = /* @__PURE__ */ new Set([
|
|
2578
2578
|
"baseFrequency",
|
|
2579
2579
|
"diffuseConstant",
|
|
2580
2580
|
"kernelMatrix",
|
|
@@ -2598,20 +2598,20 @@ var dr = /* @__PURE__ */ new Set([
|
|
|
2598
2598
|
"startOffset",
|
|
2599
2599
|
"textLength",
|
|
2600
2600
|
"lengthAdjust"
|
|
2601
|
-
]),
|
|
2601
|
+
]), dr = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
2602
2602
|
function jl(t, e, i, n) {
|
|
2603
|
-
|
|
2604
|
-
for (const s in e.attrs) t.setAttribute(
|
|
2603
|
+
lr(t, e, void 0, n);
|
|
2604
|
+
for (const s in e.attrs) t.setAttribute(fr.has(s) ? s : wi(s), e.attrs[s]);
|
|
2605
2605
|
}
|
|
2606
|
-
function
|
|
2607
|
-
const n =
|
|
2608
|
-
for (const s in t) if (
|
|
2609
|
-
const o =
|
|
2606
|
+
function pr(t, e, i) {
|
|
2607
|
+
const n = Di(t, e, i);
|
|
2608
|
+
for (const s in t) if (B(t[s]) || B(e[s])) {
|
|
2609
|
+
const o = Mt.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
|
|
2610
2610
|
n[o] = t[s];
|
|
2611
2611
|
}
|
|
2612
2612
|
return n;
|
|
2613
2613
|
}
|
|
2614
|
-
var Nl = class extends
|
|
2614
|
+
var Nl = class extends nr {
|
|
2615
2615
|
constructor() {
|
|
2616
2616
|
super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = L;
|
|
2617
2617
|
}
|
|
@@ -2619,62 +2619,62 @@ var Nl = class extends sr {
|
|
|
2619
2619
|
return t[e];
|
|
2620
2620
|
}
|
|
2621
2621
|
readValueFromInstance(t, e) {
|
|
2622
|
-
if (
|
|
2623
|
-
const i =
|
|
2622
|
+
if (Ct.has(e)) {
|
|
2623
|
+
const i = _s(e);
|
|
2624
2624
|
return i && i.default || 0;
|
|
2625
2625
|
}
|
|
2626
|
-
if (
|
|
2626
|
+
if (cr.includes(e)) {
|
|
2627
2627
|
const i = getComputedStyle(t)[e];
|
|
2628
2628
|
if (typeof i == "string" && i) return i.trim();
|
|
2629
2629
|
}
|
|
2630
|
-
return e =
|
|
2630
|
+
return e = fr.has(e) ? e : wi(e), t.getAttribute(e);
|
|
2631
2631
|
}
|
|
2632
2632
|
scrapeMotionValuesFromProps(t, e, i) {
|
|
2633
|
-
return
|
|
2633
|
+
return pr(t, e, i);
|
|
2634
2634
|
}
|
|
2635
2635
|
build(t, e, i) {
|
|
2636
|
-
|
|
2636
|
+
hr(t, e, this.isSVGTag, i.transformTemplate, i.style);
|
|
2637
2637
|
}
|
|
2638
2638
|
renderInstance(t, e, i, n) {
|
|
2639
2639
|
jl(t, e, i, n);
|
|
2640
2640
|
}
|
|
2641
2641
|
mount(t) {
|
|
2642
|
-
this.isSVGTag =
|
|
2642
|
+
this.isSVGTag = dr(t.tagName), super.mount(t);
|
|
2643
2643
|
}
|
|
2644
|
-
}, Ul =
|
|
2645
|
-
function
|
|
2644
|
+
}, Ul = Mi.length;
|
|
2645
|
+
function mr(t) {
|
|
2646
2646
|
if (!t) return;
|
|
2647
2647
|
if (!t.isControllingVariants) {
|
|
2648
|
-
const i = t.parent ?
|
|
2648
|
+
const i = t.parent ? mr(t.parent) || {} : {};
|
|
2649
2649
|
return t.props.initial !== void 0 && (i.initial = t.props.initial), i;
|
|
2650
2650
|
}
|
|
2651
2651
|
const e = {};
|
|
2652
2652
|
for (let i = 0; i < Ul; i++) {
|
|
2653
|
-
const n =
|
|
2654
|
-
(
|
|
2653
|
+
const n = Mi[i], s = t.props[n];
|
|
2654
|
+
(Ot(s) || s === !1) && (e[n] = s);
|
|
2655
2655
|
}
|
|
2656
2656
|
return e;
|
|
2657
2657
|
}
|
|
2658
|
-
function
|
|
2658
|
+
function vr(t, e) {
|
|
2659
2659
|
if (!Array.isArray(e)) return !1;
|
|
2660
2660
|
const i = e.length;
|
|
2661
2661
|
if (i !== t.length) return !1;
|
|
2662
2662
|
for (let n = 0; n < i; n++) if (e[n] !== t[n]) return !1;
|
|
2663
2663
|
return !0;
|
|
2664
2664
|
}
|
|
2665
|
-
var Wl = [...
|
|
2665
|
+
var Wl = [...Vi].reverse(), $l = Vi.length;
|
|
2666
2666
|
function Kl(t) {
|
|
2667
2667
|
return (e) => Promise.all(e.map(({ animation: i, options: n }) => Ua(t, i, n)));
|
|
2668
2668
|
}
|
|
2669
2669
|
function zl(t) {
|
|
2670
|
-
let e = Kl(t), i =
|
|
2670
|
+
let e = Kl(t), i = pn(), n = !0, s = !1;
|
|
2671
2671
|
const o = (c) => (u, h) => {
|
|
2672
|
-
const f =
|
|
2672
|
+
const f = dt(t, h, c === "exit" ? t.presenceContext?.custom : void 0);
|
|
2673
2673
|
if (f) {
|
|
2674
|
-
const { transition: p, transitionEnd: d, ...
|
|
2674
|
+
const { transition: p, transitionEnd: d, ...g } = f;
|
|
2675
2675
|
u = {
|
|
2676
2676
|
...u,
|
|
2677
|
-
...
|
|
2677
|
+
...g,
|
|
2678
2678
|
...d
|
|
2679
2679
|
};
|
|
2680
2680
|
}
|
|
@@ -2684,72 +2684,72 @@ function zl(t) {
|
|
|
2684
2684
|
e = c(t);
|
|
2685
2685
|
}
|
|
2686
2686
|
function a(c) {
|
|
2687
|
-
const { props: u } = t, h =
|
|
2688
|
-
let d = {},
|
|
2689
|
-
for (let
|
|
2690
|
-
const
|
|
2691
|
-
|
|
2692
|
-
let
|
|
2693
|
-
if (
|
|
2694
|
-
if (
|
|
2687
|
+
const { props: u } = t, h = mr(t.parent) || {}, f = [], p = /* @__PURE__ */ new Set();
|
|
2688
|
+
let d = {}, g = 1 / 0;
|
|
2689
|
+
for (let y = 0; y < $l; y++) {
|
|
2690
|
+
const v = Wl[y], x = i[v], P = u[v] !== void 0 ? u[v] : h[v], b = Ot(P), M = v === c ? x.isActive : null;
|
|
2691
|
+
M === !1 && (g = y);
|
|
2692
|
+
let w = P === h[v] && P !== u[v] && b;
|
|
2693
|
+
if (w && (n || s) && t.manuallyAnimateOnMount && (w = !1), x.protectedKeys = { ...d }, !x.isActive && M === null || !P && !x.prevProp || de(P) || typeof P == "boolean") continue;
|
|
2694
|
+
if (v === "exit" && x.isActive && M !== !0) {
|
|
2695
2695
|
x.prevResolvedValues && (d = {
|
|
2696
2696
|
...d,
|
|
2697
2697
|
...x.prevResolvedValues
|
|
2698
2698
|
});
|
|
2699
2699
|
continue;
|
|
2700
2700
|
}
|
|
2701
|
-
const S = Hl(x.prevProp,
|
|
2702
|
-
let
|
|
2703
|
-
const
|
|
2704
|
-
let
|
|
2705
|
-
|
|
2706
|
-
const { prevResolvedValues:
|
|
2707
|
-
...
|
|
2708
|
-
...
|
|
2709
|
-
},
|
|
2710
|
-
|
|
2711
|
-
const
|
|
2712
|
-
|
|
2701
|
+
const S = Hl(x.prevProp, P);
|
|
2702
|
+
let R = S || v === c && x.isActive && !w && b || y > g && b, pt = !1;
|
|
2703
|
+
const z = Array.isArray(P) ? P : [P];
|
|
2704
|
+
let U = z.reduce(o(v), {});
|
|
2705
|
+
M === !1 && (U = {});
|
|
2706
|
+
const { prevResolvedValues: H = {} } = x, Kt = {
|
|
2707
|
+
...H,
|
|
2708
|
+
...U
|
|
2709
|
+
}, W = (D) => {
|
|
2710
|
+
R = !0, p.has(D) && (pt = !0, p.delete(D)), x.needsAnimating[D] = !0;
|
|
2711
|
+
const F = t.getValue(D);
|
|
2712
|
+
F && (F.liveStyle = !1);
|
|
2713
2713
|
};
|
|
2714
|
-
for (const
|
|
2715
|
-
const
|
|
2716
|
-
if (d.hasOwnProperty(
|
|
2717
|
-
let
|
|
2718
|
-
ze(
|
|
2714
|
+
for (const D in Kt) {
|
|
2715
|
+
const F = U[D], rt = H[D];
|
|
2716
|
+
if (d.hasOwnProperty(D)) continue;
|
|
2717
|
+
let mt = !1;
|
|
2718
|
+
ze(F) && ze(rt) ? mt = !vr(F, rt) || S : mt = F !== rt, mt ? F != null ? W(D) : p.add(D) : F !== void 0 && p.has(D) ? W(D) : x.protectedKeys[D] = !0;
|
|
2719
2719
|
}
|
|
2720
|
-
x.prevProp =
|
|
2720
|
+
x.prevProp = P, x.prevResolvedValues = U, x.isActive && (d = {
|
|
2721
2721
|
...d,
|
|
2722
|
-
...
|
|
2723
|
-
}), (n || s) && t.blockInitialAnimation && (
|
|
2724
|
-
const
|
|
2725
|
-
|
|
2726
|
-
const
|
|
2727
|
-
if (typeof
|
|
2728
|
-
const { parent:
|
|
2729
|
-
if (
|
|
2730
|
-
const { delayChildren:
|
|
2731
|
-
|
|
2722
|
+
...U
|
|
2723
|
+
}), (n || s) && t.blockInitialAnimation && (R = !1);
|
|
2724
|
+
const Dt = w && S;
|
|
2725
|
+
R && (!Dt || pt) && f.push(...z.map((D) => {
|
|
2726
|
+
const F = { type: v };
|
|
2727
|
+
if (typeof D == "string" && (n || s) && !Dt && t.manuallyAnimateOnMount && t.parent) {
|
|
2728
|
+
const { parent: rt } = t, mt = dt(rt, D);
|
|
2729
|
+
if (rt.enteringChildren && mt) {
|
|
2730
|
+
const { delayChildren: Ir } = mt.transition || {};
|
|
2731
|
+
F.delay = js(rt.enteringChildren, t, Ir);
|
|
2732
2732
|
}
|
|
2733
2733
|
}
|
|
2734
2734
|
return {
|
|
2735
|
-
animation:
|
|
2736
|
-
options:
|
|
2735
|
+
animation: D,
|
|
2736
|
+
options: F
|
|
2737
2737
|
};
|
|
2738
2738
|
}));
|
|
2739
2739
|
}
|
|
2740
2740
|
if (p.size) {
|
|
2741
|
-
const
|
|
2741
|
+
const y = {};
|
|
2742
2742
|
if (typeof u.initial != "boolean") {
|
|
2743
|
-
const
|
|
2744
|
-
|
|
2743
|
+
const v = dt(t, Array.isArray(u.initial) ? u.initial[0] : u.initial);
|
|
2744
|
+
v && v.transition && (y.transition = v.transition);
|
|
2745
2745
|
}
|
|
2746
|
-
p.forEach((
|
|
2747
|
-
const x = t.getBaseTarget(
|
|
2748
|
-
|
|
2749
|
-
}), f.push({ animation:
|
|
2746
|
+
p.forEach((v) => {
|
|
2747
|
+
const x = t.getBaseTarget(v), P = t.getValue(v);
|
|
2748
|
+
P && (P.liveStyle = !0), y[v] = x ?? null;
|
|
2749
|
+
}), f.push({ animation: y });
|
|
2750
2750
|
}
|
|
2751
|
-
let
|
|
2752
|
-
return n && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (
|
|
2751
|
+
let m = !!f.length;
|
|
2752
|
+
return n && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (m = !1), n = !1, s = !1, m ? e(f) : Promise.resolve();
|
|
2753
2753
|
}
|
|
2754
2754
|
function l(c, u) {
|
|
2755
2755
|
if (i[c].isActive === u) return Promise.resolve();
|
|
@@ -2764,14 +2764,14 @@ function zl(t) {
|
|
|
2764
2764
|
setAnimateFunction: r,
|
|
2765
2765
|
getState: () => i,
|
|
2766
2766
|
reset: () => {
|
|
2767
|
-
i =
|
|
2767
|
+
i = pn(), s = !0;
|
|
2768
2768
|
}
|
|
2769
2769
|
};
|
|
2770
2770
|
}
|
|
2771
2771
|
function Hl(t, e) {
|
|
2772
|
-
return typeof e == "string" ? e !== t : Array.isArray(e) ? !
|
|
2772
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !vr(e, t) : !1;
|
|
2773
2773
|
}
|
|
2774
|
-
function
|
|
2774
|
+
function ot(t = !1) {
|
|
2775
2775
|
return {
|
|
2776
2776
|
isActive: t,
|
|
2777
2777
|
protectedKeys: {},
|
|
@@ -2779,61 +2779,61 @@ function ut(t = !1) {
|
|
|
2779
2779
|
prevResolvedValues: {}
|
|
2780
2780
|
};
|
|
2781
2781
|
}
|
|
2782
|
-
function
|
|
2782
|
+
function pn() {
|
|
2783
2783
|
return {
|
|
2784
|
-
animate:
|
|
2785
|
-
whileInView:
|
|
2786
|
-
whileHover:
|
|
2787
|
-
whileTap:
|
|
2788
|
-
whileDrag:
|
|
2789
|
-
whileFocus:
|
|
2790
|
-
exit:
|
|
2784
|
+
animate: ot(!0),
|
|
2785
|
+
whileInView: ot(),
|
|
2786
|
+
whileHover: ot(),
|
|
2787
|
+
whileTap: ot(),
|
|
2788
|
+
whileDrag: ot(),
|
|
2789
|
+
whileFocus: ot(),
|
|
2790
|
+
exit: ot()
|
|
2791
2791
|
};
|
|
2792
2792
|
}
|
|
2793
2793
|
function ti(t, e) {
|
|
2794
2794
|
t.min = e.min, t.max = e.max;
|
|
2795
2795
|
}
|
|
2796
|
-
function
|
|
2796
|
+
function G(t, e) {
|
|
2797
2797
|
ti(t.x, e.x), ti(t.y, e.y);
|
|
2798
2798
|
}
|
|
2799
|
-
function
|
|
2799
|
+
function mn(t, e) {
|
|
2800
2800
|
t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
|
|
2801
2801
|
}
|
|
2802
2802
|
var Gl = 0.9999, _l = 1.0001, Xl = -0.01, Yl = 0.01;
|
|
2803
|
-
function
|
|
2803
|
+
function O(t) {
|
|
2804
2804
|
return t.max - t.min;
|
|
2805
2805
|
}
|
|
2806
2806
|
function ql(t, e, i) {
|
|
2807
2807
|
return Math.abs(t - e) <= i;
|
|
2808
2808
|
}
|
|
2809
|
-
function
|
|
2810
|
-
t.origin = n, t.originPoint =
|
|
2809
|
+
function vn(t, e, i, n = 0.5) {
|
|
2810
|
+
t.origin = n, t.originPoint = A(e.min, e.max, t.origin), t.scale = O(i) / O(e), t.translate = A(i.min, i.max, t.origin) - t.originPoint, (t.scale >= Gl && t.scale <= _l || isNaN(t.scale)) && (t.scale = 1), (t.translate >= Xl && t.translate <= Yl || isNaN(t.translate)) && (t.translate = 0);
|
|
2811
2811
|
}
|
|
2812
|
-
function
|
|
2813
|
-
|
|
2812
|
+
function kt(t, e, i, n) {
|
|
2813
|
+
vn(t.x, e.x, i.x, n ? n.originX : void 0), vn(t.y, e.y, i.y, n ? n.originY : void 0);
|
|
2814
2814
|
}
|
|
2815
|
-
function
|
|
2816
|
-
t.min = (n ?
|
|
2815
|
+
function gn(t, e, i, n = 0) {
|
|
2816
|
+
t.min = (n ? A(i.min, i.max, n) : i.min) + e.min, t.max = t.min + O(e);
|
|
2817
2817
|
}
|
|
2818
2818
|
function Zl(t, e, i, n) {
|
|
2819
|
-
|
|
2819
|
+
gn(t.x, e.x, i.x, n?.x), gn(t.y, e.y, i.y, n?.y);
|
|
2820
2820
|
}
|
|
2821
|
-
function
|
|
2822
|
-
const s = n ?
|
|
2823
|
-
t.min = e.min - s, t.max = t.min +
|
|
2821
|
+
function yn(t, e, i, n = 0) {
|
|
2822
|
+
const s = n ? A(i.min, i.max, n) : i.min;
|
|
2823
|
+
t.min = e.min - s, t.max = t.min + O(e);
|
|
2824
2824
|
}
|
|
2825
2825
|
function ue(t, e, i, n) {
|
|
2826
|
-
|
|
2826
|
+
yn(t.x, e.x, i.x, n?.x), yn(t.y, e.y, i.y, n?.y);
|
|
2827
2827
|
}
|
|
2828
|
-
function
|
|
2828
|
+
function Tn(t, e, i, n, s) {
|
|
2829
2829
|
return t -= e, t = le(t, 1 / i, n), s !== void 0 && (t = le(t, 1 / s, n)), t;
|
|
2830
2830
|
}
|
|
2831
2831
|
function Jl(t, e = 0, i = 1, n = 0.5, s, o = t, r = t) {
|
|
2832
|
-
if (
|
|
2833
|
-
let a =
|
|
2834
|
-
t === o && (a -= e), t.min =
|
|
2832
|
+
if (Z.test(e) && (e = parseFloat(e), e = A(r.min, r.max, e / 100) - r.min), typeof e != "number") return;
|
|
2833
|
+
let a = A(o.min, o.max, n);
|
|
2834
|
+
t === o && (a -= e), t.min = Tn(t.min, e, i, a, s), t.max = Tn(t.max, e, i, a, s);
|
|
2835
2835
|
}
|
|
2836
|
-
function
|
|
2836
|
+
function xn(t, e, [i, n, s], o, r) {
|
|
2837
2837
|
Jl(t, e[i], e[n], e[s], e.scale, o, r);
|
|
2838
2838
|
}
|
|
2839
2839
|
var Ql = [
|
|
@@ -2845,68 +2845,68 @@ var Ql = [
|
|
|
2845
2845
|
"scaleY",
|
|
2846
2846
|
"originY"
|
|
2847
2847
|
];
|
|
2848
|
-
function
|
|
2849
|
-
|
|
2848
|
+
function wn(t, e, i, n) {
|
|
2849
|
+
xn(t.x, e, Ql, i ? i.x : void 0, n ? n.x : void 0), xn(t.y, e, tu, i ? i.y : void 0, n ? n.y : void 0);
|
|
2850
2850
|
}
|
|
2851
|
-
function
|
|
2851
|
+
function Pn(t) {
|
|
2852
2852
|
return t.translate === 0 && t.scale === 1;
|
|
2853
2853
|
}
|
|
2854
|
-
function
|
|
2855
|
-
return
|
|
2854
|
+
function gr(t) {
|
|
2855
|
+
return Pn(t.x) && Pn(t.y);
|
|
2856
2856
|
}
|
|
2857
|
-
function
|
|
2857
|
+
function Sn(t, e) {
|
|
2858
2858
|
return t.min === e.min && t.max === e.max;
|
|
2859
2859
|
}
|
|
2860
2860
|
function eu(t, e) {
|
|
2861
|
-
return
|
|
2861
|
+
return Sn(t.x, e.x) && Sn(t.y, e.y);
|
|
2862
2862
|
}
|
|
2863
|
-
function
|
|
2863
|
+
function bn(t, e) {
|
|
2864
2864
|
return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
|
|
2865
2865
|
}
|
|
2866
|
-
function
|
|
2867
|
-
return
|
|
2866
|
+
function yr(t, e) {
|
|
2867
|
+
return bn(t.x, e.x) && bn(t.y, e.y);
|
|
2868
2868
|
}
|
|
2869
|
-
function
|
|
2870
|
-
return
|
|
2869
|
+
function An(t) {
|
|
2870
|
+
return O(t.x) / O(t.y);
|
|
2871
2871
|
}
|
|
2872
|
-
function
|
|
2872
|
+
function Vn(t, e) {
|
|
2873
2873
|
return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
|
|
2874
2874
|
}
|
|
2875
|
-
function
|
|
2875
|
+
function Y(t) {
|
|
2876
2876
|
return [t("x"), t("y")];
|
|
2877
2877
|
}
|
|
2878
2878
|
function iu(t, e, i) {
|
|
2879
2879
|
let n = "";
|
|
2880
2880
|
const s = t.x.translate / e.x, o = t.y.translate / e.y, r = i?.z || 0;
|
|
2881
2881
|
if ((s || o || r) && (n = `translate3d(${s}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (n += `scale(${1 / e.x}, ${1 / e.y}) `), i) {
|
|
2882
|
-
const { transformPerspective: c, rotate: u, pathRotation: h, rotateX: f, rotateY: p, skewX: d, skewY:
|
|
2883
|
-
c && (n = `perspective(${c}px) ${n}`), u && (n += `rotate(${u}deg) `), h && (n += `rotate(${h}deg) `), f && (n += `rotateX(${f}deg) `), p && (n += `rotateY(${p}deg) `), d && (n += `skewX(${d}deg) `),
|
|
2882
|
+
const { transformPerspective: c, rotate: u, pathRotation: h, rotateX: f, rotateY: p, skewX: d, skewY: g } = i;
|
|
2883
|
+
c && (n = `perspective(${c}px) ${n}`), u && (n += `rotate(${u}deg) `), h && (n += `rotate(${h}deg) `), f && (n += `rotateX(${f}deg) `), p && (n += `rotateY(${p}deg) `), d && (n += `skewX(${d}deg) `), g && (n += `skewY(${g}deg) `);
|
|
2884
2884
|
}
|
|
2885
2885
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
2886
2886
|
return (a !== 1 || l !== 1) && (n += `scale(${a}, ${l})`), n || "none";
|
|
2887
2887
|
}
|
|
2888
|
-
var nu =
|
|
2888
|
+
var nu = Pi.length, Mn = (t) => typeof t == "string" ? parseFloat(t) : t, Cn = (t) => typeof t == "number" || T.test(t);
|
|
2889
2889
|
function su(t, e, i, n, s, o) {
|
|
2890
|
-
s ? (t.opacity =
|
|
2890
|
+
s ? (t.opacity = A(0, i.opacity ?? 1, ru(n)), t.opacityExit = A(e.opacity ?? 1, 0, ou(n))) : o && (t.opacity = A(e.opacity ?? 1, i.opacity ?? 1, n));
|
|
2891
2891
|
for (let r = 0; r < nu; r++) {
|
|
2892
|
-
const a =
|
|
2893
|
-
let l =
|
|
2894
|
-
l === void 0 && c === void 0 || (l || (l = 0), c || (c = 0), l === 0 || c === 0 ||
|
|
2892
|
+
const a = Pi[r];
|
|
2893
|
+
let l = Dn(e, a), c = Dn(i, a);
|
|
2894
|
+
l === void 0 && c === void 0 || (l || (l = 0), c || (c = 0), l === 0 || c === 0 || Cn(l) === Cn(c) ? (t[a] = Math.max(A(Mn(l), Mn(c), n), 0), (Z.test(c) || Z.test(l)) && (t[a] += "%")) : t[a] = c);
|
|
2895
2895
|
}
|
|
2896
|
-
(e.rotate || i.rotate) && (t.rotate =
|
|
2896
|
+
(e.rotate || i.rotate) && (t.rotate = A(e.rotate || 0, i.rotate || 0, n));
|
|
2897
2897
|
}
|
|
2898
|
-
function
|
|
2898
|
+
function Dn(t, e) {
|
|
2899
2899
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
2900
2900
|
}
|
|
2901
|
-
var ru = /* @__PURE__ */
|
|
2902
|
-
function
|
|
2903
|
-
return (n) => n < t ? 0 : n > e ? 1 : i(
|
|
2901
|
+
var ru = /* @__PURE__ */ Tr(0, 0.5, ds), ou = /* @__PURE__ */ Tr(0.5, 0.95, K);
|
|
2902
|
+
function Tr(t, e, i) {
|
|
2903
|
+
return (n) => n < t ? 0 : n > e ? 1 : i(Ft(t, e, n));
|
|
2904
2904
|
}
|
|
2905
2905
|
function au(t, e, i) {
|
|
2906
|
-
const n =
|
|
2907
|
-
return n.start(
|
|
2906
|
+
const n = B(t) ? t : St(t);
|
|
2907
|
+
return n.start(Ti("", n, e, i)), n.animation;
|
|
2908
2908
|
}
|
|
2909
|
-
function
|
|
2909
|
+
function jt(t, e, i, n = { passive: !0 }) {
|
|
2910
2910
|
return t.addEventListener(e, i, n), () => t.removeEventListener(e, i, n);
|
|
2911
2911
|
}
|
|
2912
2912
|
var lu = (t, e) => t.depth - e.depth, uu = class {
|
|
@@ -2924,14 +2924,14 @@ var lu = (t, e) => t.depth - e.depth, uu = class {
|
|
|
2924
2924
|
}
|
|
2925
2925
|
};
|
|
2926
2926
|
function cu(t, e) {
|
|
2927
|
-
const i =
|
|
2927
|
+
const i = I.now(), n = ({ timestamp: s }) => {
|
|
2928
2928
|
const o = s - i;
|
|
2929
|
-
o >= e && (
|
|
2929
|
+
o >= e && (nt(n), t(o - e));
|
|
2930
2930
|
};
|
|
2931
|
-
return
|
|
2931
|
+
return V.setup(n, !0), () => nt(n);
|
|
2932
2932
|
}
|
|
2933
2933
|
function te(t) {
|
|
2934
|
-
return
|
|
2934
|
+
return B(t) ? t.get() : t;
|
|
2935
2935
|
}
|
|
2936
2936
|
var hu = class {
|
|
2937
2937
|
constructor() {
|
|
@@ -2983,7 +2983,7 @@ var hu = class {
|
|
|
2983
2983
|
}, ee = {
|
|
2984
2984
|
hasAnimatedSinceResize: !0,
|
|
2985
2985
|
hasEverUpdated: !1
|
|
2986
|
-
},
|
|
2986
|
+
}, lt = {
|
|
2987
2987
|
nodes: 0,
|
|
2988
2988
|
calculatedTargetDeltas: 0,
|
|
2989
2989
|
calculatedProjections: 0
|
|
@@ -2997,19 +2997,19 @@ function be(t, e, i, n) {
|
|
|
2997
2997
|
const { latestValues: s } = e;
|
|
2998
2998
|
s[t] && (i[t] = s[t], e.setStaticValue(t, 0), n && (n[t] = 0));
|
|
2999
2999
|
}
|
|
3000
|
-
function
|
|
3000
|
+
function xr(t) {
|
|
3001
3001
|
if (t.hasCheckedOptimisedAppear = !0, t.root === t) return;
|
|
3002
3002
|
const { visualElement: e } = t.options;
|
|
3003
3003
|
if (!e) return;
|
|
3004
|
-
const i =
|
|
3004
|
+
const i = Ks(e);
|
|
3005
3005
|
if (window.MotionHasOptimisedAnimation(i, "transform")) {
|
|
3006
3006
|
const { layout: s, layoutId: o } = t.options;
|
|
3007
|
-
window.MotionCancelOptimisedAnimation(i, "transform",
|
|
3007
|
+
window.MotionCancelOptimisedAnimation(i, "transform", V, !(s || o));
|
|
3008
3008
|
}
|
|
3009
3009
|
const { parent: n } = t;
|
|
3010
|
-
n && !n.hasCheckedOptimisedAppear &&
|
|
3010
|
+
n && !n.hasCheckedOptimisedAppear && xr(n);
|
|
3011
3011
|
}
|
|
3012
|
-
function
|
|
3012
|
+
function wr({ attachResizeListener: t, defaultParent: e, measureScroll: i, checkIsScrollRoot: n, resetTransform: s }) {
|
|
3013
3013
|
return class {
|
|
3014
3014
|
constructor(r = {}, a = e?.()) {
|
|
3015
3015
|
this.id = du++, this.animationId = 0, this.animationCommitId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.hasCheckedOptimisedAppear = !1, this.treeScale = {
|
|
@@ -3018,7 +3018,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3018
3018
|
}, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
3019
3019
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
3020
3020
|
}, this.updateProjection = () => {
|
|
3021
|
-
this.projectionUpdateScheduled = !1,
|
|
3021
|
+
this.projectionUpdateScheduled = !1, vt.value && (lt.nodes = lt.calculatedTargetDeltas = lt.calculatedProjections = 0), this.nodes.forEach(vu), this.nodes.forEach(Pu), this.nodes.forEach(Su), this.nodes.forEach(gu), vt.addProjectionMetrics && vt.addProjectionMetrics(lt);
|
|
3022
3022
|
}, this.resolvedRelativeTargetAt = 0, this.linkedParentVersion = 0, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
3023
3023
|
for (let l = 0; l < this.path.length; l++) this.path[l].shouldResetTransform = !0;
|
|
3024
3024
|
this.root === this && (this.nodes = new uu());
|
|
@@ -3035,16 +3035,16 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3035
3035
|
}
|
|
3036
3036
|
mount(r) {
|
|
3037
3037
|
if (this.instance) return;
|
|
3038
|
-
this.isSVG =
|
|
3038
|
+
this.isSVG = Ai(r) && !vl(r), this.instance = r;
|
|
3039
3039
|
const { layoutId: a, layout: l, visualElement: c } = this.options;
|
|
3040
3040
|
if (c && !c.current && c.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), this.root.hasTreeAnimated && (l || a) && (this.isLayoutDirty = !0), t) {
|
|
3041
3041
|
let u, h = 0;
|
|
3042
3042
|
const f = () => this.root.updateBlockedByResize = !1;
|
|
3043
|
-
|
|
3043
|
+
V.read(() => {
|
|
3044
3044
|
h = window.innerWidth;
|
|
3045
3045
|
}), t(r, () => {
|
|
3046
3046
|
const p = window.innerWidth;
|
|
3047
|
-
p !== h && (h = p, this.root.updateBlockedByResize = !0, u && u(), u = cu(f, 250), ee.hasAnimatedSinceResize && (ee.hasAnimatedSinceResize = !1, this.nodes.forEach(
|
|
3047
|
+
p !== h && (h = p, this.root.updateBlockedByResize = !0, u && u(), u = cu(f, 250), ee.hasAnimatedSinceResize && (ee.hasAnimatedSinceResize = !1, this.nodes.forEach(Ln)));
|
|
3048
3048
|
});
|
|
3049
3049
|
}
|
|
3050
3050
|
a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && c && (a || l) && this.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: p }) => {
|
|
@@ -3052,24 +3052,24 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3052
3052
|
this.target = void 0, this.relativeTarget = void 0;
|
|
3053
3053
|
return;
|
|
3054
3054
|
}
|
|
3055
|
-
const d = this.options.transition || c.getDefaultTransition() || Cu, { onLayoutAnimationStart:
|
|
3056
|
-
if (this.options.layoutRoot || this.resumeFrom ||
|
|
3055
|
+
const d = this.options.transition || c.getDefaultTransition() || Cu, { onLayoutAnimationStart: g, onLayoutAnimationComplete: m } = c.getProps(), y = !this.targetLayout || !yr(this.targetLayout, p), v = !h && f;
|
|
3056
|
+
if (this.options.layoutRoot || this.resumeFrom || v || h && (y || !this.currentAnimation)) {
|
|
3057
3057
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
|
|
3058
3058
|
const x = {
|
|
3059
|
-
...
|
|
3060
|
-
onPlay:
|
|
3061
|
-
onComplete:
|
|
3059
|
+
...yi(d, "layout"),
|
|
3060
|
+
onPlay: g,
|
|
3061
|
+
onComplete: m
|
|
3062
3062
|
};
|
|
3063
|
-
(c.shouldReduceMotion || this.options.layoutRoot) && (x.delay = 0, x.type = !1), this.startAnimation(x), this.setAnimationOrigin(u,
|
|
3063
|
+
(c.shouldReduceMotion || this.options.layoutRoot) && (x.delay = 0, x.type = !1), this.startAnimation(x), this.setAnimationOrigin(u, v, x.path);
|
|
3064
3064
|
} else
|
|
3065
|
-
h ||
|
|
3065
|
+
h || Ln(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
3066
3066
|
this.targetLayout = p;
|
|
3067
3067
|
});
|
|
3068
3068
|
}
|
|
3069
3069
|
unmount() {
|
|
3070
3070
|
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
|
|
3071
3071
|
const r = this.getStack();
|
|
3072
|
-
r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(),
|
|
3072
|
+
r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), nt(this.updateProjection);
|
|
3073
3073
|
}
|
|
3074
3074
|
blockUpdate() {
|
|
3075
3075
|
this.updateManuallyBlocked = !0;
|
|
@@ -3095,7 +3095,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3095
3095
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
3096
3096
|
return;
|
|
3097
3097
|
}
|
|
3098
|
-
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear &&
|
|
3098
|
+
if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && xr(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return;
|
|
3099
3099
|
this.isLayoutDirty = !0;
|
|
3100
3100
|
for (let u = 0; u < this.path.length; u++) {
|
|
3101
3101
|
const h = this.path[u];
|
|
@@ -3109,33 +3109,33 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3109
3109
|
update() {
|
|
3110
3110
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
3111
3111
|
const a = this.updateBlockedByResize;
|
|
3112
|
-
this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), a && this.nodes.forEach(Tu), this.nodes.forEach(
|
|
3112
|
+
this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), a && this.nodes.forEach(Tu), this.nodes.forEach(En);
|
|
3113
3113
|
return;
|
|
3114
3114
|
}
|
|
3115
3115
|
if (this.animationId <= this.animationCommitId) {
|
|
3116
|
-
this.nodes.forEach(
|
|
3116
|
+
this.nodes.forEach(Rn);
|
|
3117
3117
|
return;
|
|
3118
3118
|
}
|
|
3119
|
-
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(xu), this.nodes.forEach(wu), this.nodes.forEach(pu), this.nodes.forEach(mu)) : this.nodes.forEach(
|
|
3120
|
-
const r =
|
|
3121
|
-
|
|
3119
|
+
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(xu), this.nodes.forEach(wu), this.nodes.forEach(pu), this.nodes.forEach(mu)) : this.nodes.forEach(Rn), this.clearAllSnapshots();
|
|
3120
|
+
const r = I.now();
|
|
3121
|
+
k.delta = J(0, 1e3 / 60, r - k.timestamp), k.timestamp = r, k.isProcessing = !0, ve.update.process(k), ve.preRender.process(k), ve.render.process(k), k.isProcessing = !1;
|
|
3122
3122
|
}
|
|
3123
3123
|
didUpdate() {
|
|
3124
|
-
this.updateScheduled || (this.updateScheduled = !0,
|
|
3124
|
+
this.updateScheduled || (this.updateScheduled = !0, Si.read(this.scheduleUpdate));
|
|
3125
3125
|
}
|
|
3126
3126
|
clearAllSnapshots() {
|
|
3127
3127
|
this.nodes.forEach(yu), this.sharedNodes.forEach(Au);
|
|
3128
3128
|
}
|
|
3129
3129
|
scheduleUpdateProjection() {
|
|
3130
|
-
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0,
|
|
3130
|
+
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, V.preRender(this.updateProjection, !1, !0));
|
|
3131
3131
|
}
|
|
3132
3132
|
scheduleCheckAfterUnmount() {
|
|
3133
|
-
|
|
3133
|
+
V.postRender(() => {
|
|
3134
3134
|
this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
|
|
3135
3135
|
});
|
|
3136
3136
|
}
|
|
3137
3137
|
updateSnapshot() {
|
|
3138
|
-
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !
|
|
3138
|
+
this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !O(this.snapshot.measuredBox.x) && !O(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
|
|
3139
3139
|
}
|
|
3140
3140
|
updateLayout() {
|
|
3141
3141
|
if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty)) return;
|
|
@@ -3160,8 +3160,8 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3160
3160
|
}
|
|
3161
3161
|
resetTransform() {
|
|
3162
3162
|
if (!s) return;
|
|
3163
|
-
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !
|
|
3164
|
-
r && this.instance && (a ||
|
|
3163
|
+
const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !gr(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
|
|
3164
|
+
r && this.instance && (a || at(this.latestValues) || u) && (s(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
|
|
3165
3165
|
}
|
|
3166
3166
|
measure(r = !0) {
|
|
3167
3167
|
const a = this.measurePageBox();
|
|
@@ -3180,38 +3180,38 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3180
3180
|
const a = r.measureViewportBox();
|
|
3181
3181
|
if (!(this.scroll?.wasRoot || this.path.some(Eu))) {
|
|
3182
3182
|
const { scroll: l } = this.root;
|
|
3183
|
-
l && (
|
|
3183
|
+
l && (q(a.x, l.offset.x), q(a.y, l.offset.y));
|
|
3184
3184
|
}
|
|
3185
3185
|
return a;
|
|
3186
3186
|
}
|
|
3187
3187
|
removeElementScroll(r) {
|
|
3188
3188
|
const a = L();
|
|
3189
|
-
if (
|
|
3189
|
+
if (G(a, r), this.scroll?.wasRoot) return a;
|
|
3190
3190
|
for (let l = 0; l < this.path.length; l++) {
|
|
3191
3191
|
const c = this.path[l], { scroll: u, options: h } = c;
|
|
3192
|
-
c !== this.root && u && h.layoutScroll && (u.wasRoot &&
|
|
3192
|
+
c !== this.root && u && h.layoutScroll && (u.wasRoot && G(a, r), q(a.x, u.offset.x), q(a.y, u.offset.y));
|
|
3193
3193
|
}
|
|
3194
3194
|
return a;
|
|
3195
3195
|
}
|
|
3196
3196
|
applyTransform(r, a = !1, l) {
|
|
3197
3197
|
const c = l || L();
|
|
3198
|
-
|
|
3198
|
+
G(c, r);
|
|
3199
3199
|
for (let u = 0; u < this.path.length; u++) {
|
|
3200
3200
|
const h = this.path[u];
|
|
3201
|
-
!a && h.options.layoutScroll && h.scroll && h !== h.root && (
|
|
3201
|
+
!a && h.options.layoutScroll && h.scroll && h !== h.root && (q(c.x, -h.scroll.offset.x), q(c.y, -h.scroll.offset.y)), at(h.latestValues) && Qt(c, h.latestValues, h.layout?.layoutBox);
|
|
3202
3202
|
}
|
|
3203
|
-
return
|
|
3203
|
+
return at(this.latestValues) && Qt(c, this.latestValues, this.layout?.layoutBox), c;
|
|
3204
3204
|
}
|
|
3205
3205
|
removeTransform(r) {
|
|
3206
3206
|
const a = L();
|
|
3207
|
-
|
|
3207
|
+
G(a, r);
|
|
3208
3208
|
for (let l = 0; l < this.path.length; l++) {
|
|
3209
3209
|
const c = this.path[l];
|
|
3210
|
-
if (!
|
|
3210
|
+
if (!at(c.latestValues)) continue;
|
|
3211
3211
|
let u;
|
|
3212
|
-
c.instance && (Ze(c.latestValues) && c.updateSnapshot(), u = L(),
|
|
3212
|
+
c.instance && (Ze(c.latestValues) && c.updateSnapshot(), u = L(), G(u, c.measurePageBox())), wn(a, c.latestValues, c.snapshot?.layoutBox, u);
|
|
3213
3213
|
}
|
|
3214
|
-
return
|
|
3214
|
+
return at(this.latestValues) && wn(a, this.latestValues), a;
|
|
3215
3215
|
}
|
|
3216
3216
|
setTargetDelta(r) {
|
|
3217
3217
|
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
@@ -3227,7 +3227,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3227
3227
|
this.scroll = void 0, this.layout = void 0, this.snapshot = void 0, this.prevTransformTemplateValue = void 0, this.targetDelta = void 0, this.target = void 0, this.isLayoutDirty = !1;
|
|
3228
3228
|
}
|
|
3229
3229
|
forceRelativeParentToResolveTarget() {
|
|
3230
|
-
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !==
|
|
3230
|
+
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== k.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
3231
3231
|
}
|
|
3232
3232
|
resolveTargetDelta(r = !1) {
|
|
3233
3233
|
const a = this.getLead();
|
|
@@ -3236,19 +3236,19 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3236
3236
|
if (!(r || l && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize)) return;
|
|
3237
3237
|
const { layout: c, layoutId: u } = this.options;
|
|
3238
3238
|
if (!this.layout || !(c || u)) return;
|
|
3239
|
-
this.resolvedRelativeTargetAt =
|
|
3239
|
+
this.resolvedRelativeTargetAt = k.timestamp;
|
|
3240
3240
|
const h = this.getClosestProjectingParent();
|
|
3241
|
-
h && this.linkedParentVersion !== h.layoutVersion && !h.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && h && h.layout ? this.createRelativeTarget(h, this.layout.layoutBox, h.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = L(), this.targetWithTransforms = L()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Zl(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) :
|
|
3241
|
+
h && this.linkedParentVersion !== h.layoutVersion && !h.options.layoutRoot && this.removeRelativeTarget(), !this.targetDelta && !this.relativeTarget && (this.options.layoutAnchor !== !1 && h && h.layout ? this.createRelativeTarget(h, this.layout.layoutBox, h.layout.layoutBox) : this.removeRelativeTarget()), !(!this.relativeTarget && !this.targetDelta) && (this.target || (this.target = L(), this.targetWithTransforms = L()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Zl(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : G(this.target, this.layout.layoutBox), or(this.target, this.targetDelta)) : G(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget && (this.attemptToResolveRelativeTarget = !1, this.options.layoutAnchor !== !1 && h && !!h.resumingFrom == !!this.resumingFrom && !h.options.layoutScroll && h.target && this.animationProgress !== 1 ? this.createRelativeTarget(h, this.target, h.target) : this.relativeParent = this.relativeTarget = void 0), vt.value && lt.calculatedTargetDeltas++);
|
|
3242
3242
|
}
|
|
3243
3243
|
getClosestProjectingParent() {
|
|
3244
|
-
if (!(!this.parent || Ze(this.parent.latestValues) ||
|
|
3244
|
+
if (!(!this.parent || Ze(this.parent.latestValues) || rr(this.parent.latestValues)))
|
|
3245
3245
|
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
3246
3246
|
}
|
|
3247
3247
|
isProjecting() {
|
|
3248
3248
|
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
|
|
3249
3249
|
}
|
|
3250
3250
|
createRelativeTarget(r, a, l) {
|
|
3251
|
-
this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = L(), this.relativeTargetOrigin = L(), ue(this.relativeTargetOrigin, a, l, this.options.layoutAnchor || void 0),
|
|
3251
|
+
this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = L(), this.relativeTargetOrigin = L(), ue(this.relativeTargetOrigin, a, l, this.options.layoutAnchor || void 0), G(this.relativeTarget, this.relativeTargetOrigin);
|
|
3252
3252
|
}
|
|
3253
3253
|
removeRelativeTarget() {
|
|
3254
3254
|
this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -3256,10 +3256,10 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3256
3256
|
calcProjection() {
|
|
3257
3257
|
const r = this.getLead(), a = !!this.resumingFrom || this !== r;
|
|
3258
3258
|
let l = !0;
|
|
3259
|
-
if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt ===
|
|
3259
|
+
if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === k.timestamp && (l = !1), l) return;
|
|
3260
3260
|
const { layout: c, layoutId: u } = this.options;
|
|
3261
3261
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || u)) return;
|
|
3262
|
-
|
|
3262
|
+
G(this.layoutCorrected, this.layout.layoutBox);
|
|
3263
3263
|
const h = this.treeScale.x, f = this.treeScale.y;
|
|
3264
3264
|
Ml(this.layoutCorrected, this.treeScale, this.path, a), r.layout && !r.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (r.target = r.layout.layoutBox, r.targetWithTransforms = L());
|
|
3265
3265
|
const { target: p } = r;
|
|
@@ -3267,7 +3267,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3267
3267
|
this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
|
|
3268
3268
|
return;
|
|
3269
3269
|
}
|
|
3270
|
-
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (
|
|
3270
|
+
!this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (mn(this.prevProjectionDelta.x, this.projectionDelta.x), mn(this.prevProjectionDelta.y, this.projectionDelta.y)), kt(this.projectionDelta, this.layoutCorrected, p, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== f || !Vn(this.projectionDelta.x, this.prevProjectionDelta.x) || !Vn(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", p)), vt.value && lt.calculatedProjections++;
|
|
3271
3271
|
}
|
|
3272
3272
|
hide() {
|
|
3273
3273
|
this.isVisible = !1;
|
|
@@ -3283,23 +3283,23 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3283
3283
|
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
|
|
3284
3284
|
}
|
|
3285
3285
|
createProjectionDeltas() {
|
|
3286
|
-
this.prevProjectionDelta =
|
|
3286
|
+
this.prevProjectionDelta = wt(), this.projectionDelta = wt(), this.projectionDeltaWithTransform = wt();
|
|
3287
3287
|
}
|
|
3288
3288
|
setAnimationOrigin(r, a = !1, l) {
|
|
3289
|
-
const c = this.snapshot, u = c ? c.latestValues : {}, h = { ...this.latestValues }, f =
|
|
3289
|
+
const c = this.snapshot, u = c ? c.latestValues : {}, h = { ...this.latestValues }, f = wt();
|
|
3290
3290
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
3291
|
-
const p = L(), d = (c ? c.source : void 0) !== (this.layout ? this.layout.source : void 0),
|
|
3291
|
+
const p = L(), d = (c ? c.source : void 0) !== (this.layout ? this.layout.source : void 0), g = this.getStack(), m = !g || g.members.length <= 1, y = !!(d && !m && this.options.crossfade === !0 && !this.path.some(Mu));
|
|
3292
3292
|
this.animationProgress = 0;
|
|
3293
|
-
let
|
|
3293
|
+
let v;
|
|
3294
3294
|
const x = l?.interpolateProjection(r);
|
|
3295
|
-
this.mixTargetDelta = (
|
|
3296
|
-
const
|
|
3297
|
-
|
|
3295
|
+
this.mixTargetDelta = (P) => {
|
|
3296
|
+
const b = P / 1e3, M = x?.(b);
|
|
3297
|
+
M ? (f.x.translate = M.x, f.x.scale = A(r.x.scale, 1, b), f.x.origin = r.x.origin, f.x.originPoint = r.x.originPoint, f.y.translate = M.y, f.y.scale = A(r.y.scale, 1, b), f.y.origin = r.y.origin, f.y.originPoint = r.y.originPoint) : (kn(f.x, r.x, b), kn(f.y, r.y, b)), this.setTargetDelta(f), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ue(p, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), Vu(this.relativeTarget, this.relativeTargetOrigin, p, b), v && eu(this.relativeTarget, v) && (this.isProjectionDirty = !1), v || (v = L()), G(v, this.relativeTarget)), d && (this.animationValues = h, su(h, u, this.latestValues, b, y, m)), M && M.rotate !== void 0 && (this.animationValues || (this.animationValues = h), this.animationValues.pathRotation = M.rotate), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = b;
|
|
3298
3298
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
3299
3299
|
}
|
|
3300
3300
|
startAnimation(r) {
|
|
3301
|
-
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (
|
|
3302
|
-
ee.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue =
|
|
3301
|
+
this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (nt(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = V.update(() => {
|
|
3302
|
+
ee.hasAnimatedSinceResize = !0, this.motionValue || (this.motionValue = St(0)), this.motionValue.jump(0, !1), this.currentAnimation = au(this.motionValue, [0, 1e3], {
|
|
3303
3303
|
...r,
|
|
3304
3304
|
velocity: 0,
|
|
3305
3305
|
isSync: !0,
|
|
@@ -3324,14 +3324,14 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3324
3324
|
const r = this.getLead();
|
|
3325
3325
|
let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = r;
|
|
3326
3326
|
if (!(!a || !l || !c)) {
|
|
3327
|
-
if (this !== r && this.layout && c &&
|
|
3327
|
+
if (this !== r && this.layout && c && Pr(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
|
|
3328
3328
|
l = this.target || L();
|
|
3329
|
-
const h =
|
|
3329
|
+
const h = O(this.layout.layoutBox.x);
|
|
3330
3330
|
l.x.min = r.target.x.min, l.x.max = l.x.min + h;
|
|
3331
|
-
const f =
|
|
3331
|
+
const f = O(this.layout.layoutBox.y);
|
|
3332
3332
|
l.y.min = r.target.y.min, l.y.max = l.y.min + f;
|
|
3333
3333
|
}
|
|
3334
|
-
|
|
3334
|
+
G(a, l), Qt(a, u), kt(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
|
|
3335
3335
|
}
|
|
3336
3336
|
}
|
|
3337
3337
|
registerSharedNode(r, a) {
|
|
@@ -3394,7 +3394,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3394
3394
|
}
|
|
3395
3395
|
const c = this.getLead();
|
|
3396
3396
|
if (!this.projectionDelta || !this.layout || !c.target) {
|
|
3397
|
-
this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = te(a?.pointerEvents) || ""), this.hasProjected && !
|
|
3397
|
+
this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = te(a?.pointerEvents) || ""), this.hasProjected && !at(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
|
|
3398
3398
|
return;
|
|
3399
3399
|
}
|
|
3400
3400
|
r.visibility = "";
|
|
@@ -3406,11 +3406,11 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3406
3406
|
r.transformOrigin = `${f.origin * 100}% ${p.origin * 100}% 0`, c.animationValues ? r.opacity = c === this ? u.opacity ?? this.latestValues.opacity ?? 1 : this.preserveOpacity ? this.latestValues.opacity : u.opacityExit : r.opacity = c === this ? u.opacity !== void 0 ? u.opacity : "" : u.opacityExit !== void 0 ? u.opacityExit : 0;
|
|
3407
3407
|
for (const d in Qe) {
|
|
3408
3408
|
if (u[d] === void 0) continue;
|
|
3409
|
-
const { correct:
|
|
3410
|
-
if (
|
|
3411
|
-
const x =
|
|
3412
|
-
for (let
|
|
3413
|
-
} else
|
|
3409
|
+
const { correct: g, applyTo: m, isCSSVariable: y } = Qe[d], v = h === "none" ? u[d] : g(u[d], c);
|
|
3410
|
+
if (m) {
|
|
3411
|
+
const x = m.length;
|
|
3412
|
+
for (let P = 0; P < x; P++) r[m[P]] = v;
|
|
3413
|
+
} else y ? this.options.visualElement.renderState.vars[d] = v : r[d] = v;
|
|
3414
3414
|
}
|
|
3415
3415
|
this.options.layoutId && (r.pointerEvents = c === this ? te(a?.pointerEvents) || "" : "none");
|
|
3416
3416
|
}
|
|
@@ -3418,7 +3418,7 @@ function Pr({ attachResizeListener: t, defaultParent: e, measureScroll: i, check
|
|
|
3418
3418
|
this.resumeFrom = this.snapshot = void 0;
|
|
3419
3419
|
}
|
|
3420
3420
|
resetTree() {
|
|
3421
|
-
this.root.nodes.forEach((r) => r.currentAnimation?.stop()), this.root.nodes.forEach(
|
|
3421
|
+
this.root.nodes.forEach((r) => r.currentAnimation?.stop()), this.root.nodes.forEach(En), this.root.sharedNodes.clear();
|
|
3422
3422
|
}
|
|
3423
3423
|
};
|
|
3424
3424
|
}
|
|
@@ -3429,22 +3429,22 @@ function mu(t) {
|
|
|
3429
3429
|
const e = t.resumeFrom?.snapshot || t.snapshot;
|
|
3430
3430
|
if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
|
|
3431
3431
|
const { layoutBox: i, measuredBox: n } = t.layout, { animationType: s } = t.options, o = e.source !== t.layout.source;
|
|
3432
|
-
if (s === "size")
|
|
3433
|
-
const h = o ? e.measuredBox[u] : e.layoutBox[u], f =
|
|
3432
|
+
if (s === "size") Y((u) => {
|
|
3433
|
+
const h = o ? e.measuredBox[u] : e.layoutBox[u], f = O(h);
|
|
3434
3434
|
h.min = i[u].min, h.max = h.min + f;
|
|
3435
3435
|
});
|
|
3436
3436
|
else if (s === "x" || s === "y") {
|
|
3437
3437
|
const u = s === "x" ? "y" : "x";
|
|
3438
3438
|
ti(o ? e.measuredBox[u] : e.layoutBox[u], i[u]);
|
|
3439
|
-
} else
|
|
3440
|
-
const h = o ? e.measuredBox[u] : e.layoutBox[u], f =
|
|
3439
|
+
} else Pr(s, e.layoutBox, i) && Y((u) => {
|
|
3440
|
+
const h = o ? e.measuredBox[u] : e.layoutBox[u], f = O(i[u]);
|
|
3441
3441
|
h.max = h.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[u].max = t.relativeTarget[u].min + f);
|
|
3442
3442
|
});
|
|
3443
|
-
const r =
|
|
3444
|
-
|
|
3445
|
-
const a =
|
|
3446
|
-
o ?
|
|
3447
|
-
const l = !
|
|
3443
|
+
const r = wt();
|
|
3444
|
+
kt(r, i, e.layoutBox);
|
|
3445
|
+
const a = wt();
|
|
3446
|
+
o ? kt(a, t.applyTransform(n, !0), e.measuredBox) : kt(a, i, e.layoutBox);
|
|
3447
|
+
const l = !gr(r);
|
|
3448
3448
|
let c = !1;
|
|
3449
3449
|
if (!t.resumeFrom) {
|
|
3450
3450
|
const u = t.getClosestProjectingParent();
|
|
@@ -3453,8 +3453,8 @@ function mu(t) {
|
|
|
3453
3453
|
if (h && f) {
|
|
3454
3454
|
const p = t.options.layoutAnchor || void 0, d = L();
|
|
3455
3455
|
ue(d, e.layoutBox, h.layoutBox, p);
|
|
3456
|
-
const
|
|
3457
|
-
ue(
|
|
3456
|
+
const g = L();
|
|
3457
|
+
ue(g, i, f.layoutBox, p), yr(d, g) || (c = !0), u.options.layoutRoot && (t.relativeTarget = g, t.relativeTargetOrigin = d, t.relativeParent = u);
|
|
3458
3458
|
}
|
|
3459
3459
|
}
|
|
3460
3460
|
}
|
|
@@ -3473,7 +3473,7 @@ function mu(t) {
|
|
|
3473
3473
|
t.options.transition = void 0;
|
|
3474
3474
|
}
|
|
3475
3475
|
function vu(t) {
|
|
3476
|
-
|
|
3476
|
+
vt.value && lt.nodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
3477
3477
|
}
|
|
3478
3478
|
function gu(t) {
|
|
3479
3479
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
@@ -3481,13 +3481,13 @@ function gu(t) {
|
|
|
3481
3481
|
function yu(t) {
|
|
3482
3482
|
t.clearSnapshot();
|
|
3483
3483
|
}
|
|
3484
|
-
function
|
|
3484
|
+
function En(t) {
|
|
3485
3485
|
t.clearMeasurements();
|
|
3486
3486
|
}
|
|
3487
3487
|
function Tu(t) {
|
|
3488
3488
|
t.isLayoutDirty = !0, t.updateLayout();
|
|
3489
3489
|
}
|
|
3490
|
-
function
|
|
3490
|
+
function Rn(t) {
|
|
3491
3491
|
t.isLayoutDirty = !1;
|
|
3492
3492
|
}
|
|
3493
3493
|
function xu(t) {
|
|
@@ -3497,7 +3497,7 @@ function wu(t) {
|
|
|
3497
3497
|
const { visualElement: e } = t.options;
|
|
3498
3498
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
3499
3499
|
}
|
|
3500
|
-
function
|
|
3500
|
+
function Ln(t) {
|
|
3501
3501
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
3502
3502
|
}
|
|
3503
3503
|
function Pu(t) {
|
|
@@ -3512,14 +3512,14 @@ function bu(t) {
|
|
|
3512
3512
|
function Au(t) {
|
|
3513
3513
|
t.removeLeadSnapshot();
|
|
3514
3514
|
}
|
|
3515
|
-
function
|
|
3516
|
-
t.translate =
|
|
3515
|
+
function kn(t, e, i) {
|
|
3516
|
+
t.translate = A(e.translate, 0, i), t.scale = A(e.scale, 1, i), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
3517
3517
|
}
|
|
3518
|
-
function
|
|
3519
|
-
t.min =
|
|
3518
|
+
function Bn(t, e, i, n) {
|
|
3519
|
+
t.min = A(e.min, i.min, n), t.max = A(e.max, i.max, n);
|
|
3520
3520
|
}
|
|
3521
3521
|
function Vu(t, e, i, n) {
|
|
3522
|
-
|
|
3522
|
+
Bn(t.x, e.x, i.x, n), Bn(t.y, e.y, i.y, n);
|
|
3523
3523
|
}
|
|
3524
3524
|
function Mu(t) {
|
|
3525
3525
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
@@ -3532,27 +3532,27 @@ var Cu = {
|
|
|
3532
3532
|
0.1,
|
|
3533
3533
|
1
|
|
3534
3534
|
]
|
|
3535
|
-
},
|
|
3536
|
-
function
|
|
3537
|
-
t.min =
|
|
3535
|
+
}, Fn = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), In = Fn("applewebkit/") && !Fn("chrome/") ? Math.round : K;
|
|
3536
|
+
function On(t) {
|
|
3537
|
+
t.min = In(t.min), t.max = In(t.max);
|
|
3538
3538
|
}
|
|
3539
3539
|
function Du(t) {
|
|
3540
|
-
|
|
3540
|
+
On(t.x), On(t.y);
|
|
3541
3541
|
}
|
|
3542
|
-
function
|
|
3543
|
-
return t === "position" || t === "preserve-aspect" && !ql(
|
|
3542
|
+
function Pr(t, e, i) {
|
|
3543
|
+
return t === "position" || t === "preserve-aspect" && !ql(An(e), An(i), 0.2);
|
|
3544
3544
|
}
|
|
3545
3545
|
function Eu(t) {
|
|
3546
3546
|
return t !== t.root && t.scroll?.wasRoot;
|
|
3547
3547
|
}
|
|
3548
|
-
var Ru =
|
|
3549
|
-
attachResizeListener: (t, e) =>
|
|
3548
|
+
var Ru = wr({
|
|
3549
|
+
attachResizeListener: (t, e) => jt(t, "resize", e),
|
|
3550
3550
|
measureScroll: () => ({
|
|
3551
3551
|
x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
|
|
3552
3552
|
y: document.documentElement.scrollTop || document.body?.scrollTop || 0
|
|
3553
3553
|
}),
|
|
3554
3554
|
checkIsScrollRoot: () => !0
|
|
3555
|
-
}), Ae = { current: void 0 },
|
|
3555
|
+
}), Ae = { current: void 0 }, Sr = wr({
|
|
3556
3556
|
measureScroll: (t) => ({
|
|
3557
3557
|
x: t.scrollLeft,
|
|
3558
3558
|
y: t.scrollTop
|
|
@@ -3568,26 +3568,26 @@ var Ru = Pr({
|
|
|
3568
3568
|
t.style.transform = e !== void 0 ? e : "none";
|
|
3569
3569
|
},
|
|
3570
3570
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
3571
|
-
}),
|
|
3571
|
+
}), br = bt({
|
|
3572
3572
|
transformPagePoint: (t) => t,
|
|
3573
3573
|
isStatic: !1,
|
|
3574
3574
|
reducedMotion: "never"
|
|
3575
3575
|
});
|
|
3576
3576
|
function Lu(t = !0) {
|
|
3577
|
-
const e =
|
|
3577
|
+
const e = j(si);
|
|
3578
3578
|
if (e === null) return [!0, null];
|
|
3579
|
-
const { isPresent: i, onExitComplete: n, register: s } = e, o =
|
|
3579
|
+
const { isPresent: i, onExitComplete: n, register: s } = e, o = Ur();
|
|
3580
3580
|
ni(() => {
|
|
3581
3581
|
if (t) return s(o);
|
|
3582
3582
|
}, [t]);
|
|
3583
|
-
const r =
|
|
3583
|
+
const r = Jn(() => t && n && n(o), [
|
|
3584
3584
|
o,
|
|
3585
3585
|
n,
|
|
3586
3586
|
t
|
|
3587
3587
|
]);
|
|
3588
3588
|
return !i && n ? [!1, r] : [!0];
|
|
3589
3589
|
}
|
|
3590
|
-
var
|
|
3590
|
+
var Ar = bt({ strict: !1 }), jn = {
|
|
3591
3591
|
animation: [
|
|
3592
3592
|
"animate",
|
|
3593
3593
|
"variants",
|
|
@@ -3624,83 +3624,83 @@ var Vr = Vt({ strict: !1 }), On = {
|
|
|
3624
3624
|
"onViewportLeave"
|
|
3625
3625
|
],
|
|
3626
3626
|
layout: ["layout", "layoutId"]
|
|
3627
|
-
},
|
|
3627
|
+
}, Nn = !1;
|
|
3628
3628
|
function ku() {
|
|
3629
|
-
if (
|
|
3629
|
+
if (Nn) return;
|
|
3630
3630
|
const t = {};
|
|
3631
|
-
for (const e in
|
|
3632
|
-
|
|
3631
|
+
for (const e in jn) t[e] = { isEnabled: (i) => jn[e].some((n) => !!i[n]) };
|
|
3632
|
+
ir(t), Nn = !0;
|
|
3633
3633
|
}
|
|
3634
|
-
function
|
|
3634
|
+
function Vr() {
|
|
3635
3635
|
return ku(), Sl();
|
|
3636
3636
|
}
|
|
3637
3637
|
function Bu(t) {
|
|
3638
|
-
const e =
|
|
3638
|
+
const e = Vr();
|
|
3639
3639
|
for (const i in t) e[i] = {
|
|
3640
3640
|
...e[i],
|
|
3641
3641
|
...t[i]
|
|
3642
3642
|
};
|
|
3643
|
-
|
|
3643
|
+
ir(e);
|
|
3644
3644
|
}
|
|
3645
|
-
var me = /* @__PURE__ */
|
|
3645
|
+
var me = /* @__PURE__ */ bt({});
|
|
3646
3646
|
function Fu(t, e) {
|
|
3647
3647
|
if (pe(t)) {
|
|
3648
3648
|
const { initial: i, animate: n } = t;
|
|
3649
3649
|
return {
|
|
3650
|
-
initial: i === !1 ||
|
|
3651
|
-
animate:
|
|
3650
|
+
initial: i === !1 || Ot(i) ? i : void 0,
|
|
3651
|
+
animate: Ot(n) ? n : void 0
|
|
3652
3652
|
};
|
|
3653
3653
|
}
|
|
3654
3654
|
return t.inherit !== !1 ? e : {};
|
|
3655
3655
|
}
|
|
3656
3656
|
function Iu(t) {
|
|
3657
|
-
const { initial: e, animate: i } = Fu(t,
|
|
3657
|
+
const { initial: e, animate: i } = Fu(t, j(me));
|
|
3658
3658
|
return he(() => ({
|
|
3659
3659
|
initial: e,
|
|
3660
3660
|
animate: i
|
|
3661
|
-
}), [
|
|
3661
|
+
}), [Un(e), Un(i)]);
|
|
3662
3662
|
}
|
|
3663
|
-
function
|
|
3663
|
+
function Un(t) {
|
|
3664
3664
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
3665
3665
|
}
|
|
3666
|
-
var
|
|
3666
|
+
var Ei = () => ({
|
|
3667
3667
|
style: {},
|
|
3668
3668
|
transform: {},
|
|
3669
3669
|
transformOrigin: {},
|
|
3670
3670
|
vars: {}
|
|
3671
3671
|
});
|
|
3672
|
-
function
|
|
3673
|
-
for (const n in e) !
|
|
3672
|
+
function Mr(t, e, i) {
|
|
3673
|
+
for (const n in e) !B(e[n]) && !ur(n, i) && (t[n] = e[n]);
|
|
3674
3674
|
}
|
|
3675
3675
|
function Ou({ transformTemplate: t }, e) {
|
|
3676
3676
|
return he(() => {
|
|
3677
|
-
const i =
|
|
3678
|
-
return
|
|
3677
|
+
const i = Ei();
|
|
3678
|
+
return Ci(i, e, t), Object.assign({}, i.vars, i.style);
|
|
3679
3679
|
}, [e]);
|
|
3680
3680
|
}
|
|
3681
3681
|
function ju(t, e) {
|
|
3682
3682
|
const i = t.style || {}, n = {};
|
|
3683
|
-
return
|
|
3683
|
+
return Mr(n, i, t), Object.assign(n, Ou(t, e)), n;
|
|
3684
3684
|
}
|
|
3685
3685
|
function Nu(t, e) {
|
|
3686
3686
|
const i = {}, n = ju(t, e);
|
|
3687
3687
|
return t.drag && t.dragListener !== !1 && (i.draggable = !1, n.userSelect = n.WebkitUserSelect = n.WebkitTouchCallout = "none", n.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (i.tabIndex = 0), i.style = n, i;
|
|
3688
3688
|
}
|
|
3689
|
-
var
|
|
3690
|
-
...
|
|
3689
|
+
var Cr = () => ({
|
|
3690
|
+
...Ei(),
|
|
3691
3691
|
attrs: {}
|
|
3692
3692
|
});
|
|
3693
3693
|
function Uu(t, e, i, n) {
|
|
3694
3694
|
const s = he(() => {
|
|
3695
|
-
const o =
|
|
3696
|
-
return
|
|
3695
|
+
const o = Cr();
|
|
3696
|
+
return hr(o, e, dr(n), t.transformTemplate, t.style), {
|
|
3697
3697
|
...o.attrs,
|
|
3698
3698
|
style: { ...o.style }
|
|
3699
3699
|
};
|
|
3700
3700
|
}, [e]);
|
|
3701
3701
|
if (t.style) {
|
|
3702
3702
|
const o = {};
|
|
3703
|
-
|
|
3703
|
+
Mr(o, t.style, t), s.style = {
|
|
3704
3704
|
...o,
|
|
3705
3705
|
...s.style
|
|
3706
3706
|
};
|
|
@@ -3749,7 +3749,7 @@ function $u(t, e) {
|
|
|
3749
3749
|
function Ku(t, e, i, n) {
|
|
3750
3750
|
const s = {};
|
|
3751
3751
|
for (const o in t)
|
|
3752
|
-
o === "values" && typeof t.values == "object" ||
|
|
3752
|
+
o === "values" && typeof t.values == "object" || B(t[o]) || ($u(o, n) || i === !0 && ce(o) || !e && !ce(o) || t.draggable && o.startsWith("onDrag")) && (s[o] = t[o]);
|
|
3753
3753
|
return s;
|
|
3754
3754
|
}
|
|
3755
3755
|
var zu = [
|
|
@@ -3779,16 +3779,16 @@ var zu = [
|
|
|
3779
3779
|
"use",
|
|
3780
3780
|
"view"
|
|
3781
3781
|
];
|
|
3782
|
-
function
|
|
3782
|
+
function Ri(t) {
|
|
3783
3783
|
return typeof t != "string" || t.includes("-") ? !1 : !!(zu.indexOf(t) > -1 || /[A-Z]/u.test(t));
|
|
3784
3784
|
}
|
|
3785
3785
|
function Hu(t, e, i, { latestValues: n }, s, o = !1, r, a) {
|
|
3786
|
-
const l = (r ??
|
|
3786
|
+
const l = (r ?? Ri(t) ? Uu : Nu)(e, n, s, t), c = Ku(e, typeof t == "string", o, a), u = t !== Zn ? {
|
|
3787
3787
|
...c,
|
|
3788
3788
|
...l,
|
|
3789
3789
|
ref: i
|
|
3790
|
-
} : {}, { children: h } = e, f = he(() =>
|
|
3791
|
-
return
|
|
3790
|
+
} : {}, { children: h } = e, f = he(() => B(h) ? h.get() : h, [h]);
|
|
3791
|
+
return jr(t, {
|
|
3792
3792
|
...u,
|
|
3793
3793
|
children: f
|
|
3794
3794
|
});
|
|
@@ -3803,7 +3803,7 @@ function _u(t, e, i, n) {
|
|
|
3803
3803
|
const s = {}, o = n(t, {});
|
|
3804
3804
|
for (const f in o) s[f] = te(o[f]);
|
|
3805
3805
|
let { initial: r, animate: a } = t;
|
|
3806
|
-
const l = pe(t), c =
|
|
3806
|
+
const l = pe(t), c = tr(t);
|
|
3807
3807
|
e && c && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
|
|
3808
3808
|
let u = i ? i.initial === !1 : !1;
|
|
3809
3809
|
u = u || r === !1;
|
|
@@ -3811,40 +3811,40 @@ function _u(t, e, i, n) {
|
|
|
3811
3811
|
if (h && typeof h != "boolean" && !de(h)) {
|
|
3812
3812
|
const f = Array.isArray(h) ? h : [h];
|
|
3813
3813
|
for (let p = 0; p < f.length; p++) {
|
|
3814
|
-
const d =
|
|
3814
|
+
const d = xi(t, f[p]);
|
|
3815
3815
|
if (d) {
|
|
3816
|
-
const { transitionEnd:
|
|
3817
|
-
for (const
|
|
3818
|
-
let x = v
|
|
3816
|
+
const { transitionEnd: g, transition: m, ...y } = d;
|
|
3817
|
+
for (const v in y) {
|
|
3818
|
+
let x = y[v];
|
|
3819
3819
|
if (Array.isArray(x)) {
|
|
3820
|
-
const
|
|
3821
|
-
x = x[
|
|
3820
|
+
const P = u ? x.length - 1 : 0;
|
|
3821
|
+
x = x[P];
|
|
3822
3822
|
}
|
|
3823
|
-
x !== null && (s[
|
|
3823
|
+
x !== null && (s[v] = x);
|
|
3824
3824
|
}
|
|
3825
|
-
for (const
|
|
3825
|
+
for (const v in g) s[v] = g[v];
|
|
3826
3826
|
}
|
|
3827
3827
|
}
|
|
3828
3828
|
}
|
|
3829
3829
|
return s;
|
|
3830
3830
|
}
|
|
3831
|
-
var
|
|
3832
|
-
const n =
|
|
3833
|
-
return i ? o() :
|
|
3834
|
-
}, Xu = /* @__PURE__ */
|
|
3835
|
-
scrapeMotionValuesFromProps:
|
|
3836
|
-
createRenderState:
|
|
3837
|
-
}), Yu = /* @__PURE__ */
|
|
3838
|
-
scrapeMotionValuesFromProps:
|
|
3839
|
-
createRenderState:
|
|
3831
|
+
var Dr = (t) => (e, i) => {
|
|
3832
|
+
const n = j(me), s = j(si), o = () => Gu(t, e, n, s);
|
|
3833
|
+
return i ? o() : Kr(o);
|
|
3834
|
+
}, Xu = /* @__PURE__ */ Dr({
|
|
3835
|
+
scrapeMotionValuesFromProps: Di,
|
|
3836
|
+
createRenderState: Ei
|
|
3837
|
+
}), Yu = /* @__PURE__ */ Dr({
|
|
3838
|
+
scrapeMotionValuesFromProps: pr,
|
|
3839
|
+
createRenderState: Cr
|
|
3840
3840
|
}), qu = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
|
|
3841
3841
|
function Zu(t, e, i) {
|
|
3842
|
-
const n =
|
|
3843
|
-
|
|
3842
|
+
const n = ut(i);
|
|
3843
|
+
Qn(() => {
|
|
3844
3844
|
n.current = i;
|
|
3845
3845
|
});
|
|
3846
|
-
const s =
|
|
3847
|
-
return
|
|
3846
|
+
const s = ut(null);
|
|
3847
|
+
return Jn((o) => {
|
|
3848
3848
|
o && t.onMount?.(o), e && (o ? e.mount(o) : e.unmount());
|
|
3849
3849
|
const r = n.current;
|
|
3850
3850
|
if (typeof r == "function")
|
|
@@ -3855,12 +3855,12 @@ function Zu(t, e, i) {
|
|
|
3855
3855
|
else r && (r.current = o);
|
|
3856
3856
|
}, [e]);
|
|
3857
3857
|
}
|
|
3858
|
-
var
|
|
3859
|
-
function
|
|
3858
|
+
var Er = bt({});
|
|
3859
|
+
function gt(t) {
|
|
3860
3860
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
3861
3861
|
}
|
|
3862
3862
|
function Ju(t, e, i, n, s, o) {
|
|
3863
|
-
const { visualElement: r } =
|
|
3863
|
+
const { visualElement: r } = j(me), a = j(Ar), l = j(si), c = j(br), u = c.reducedMotion, h = c.skipAnimations, f = ut(null), p = ut(!1);
|
|
3864
3864
|
n = n || a.renderer, !f.current && n && (f.current = n(t, {
|
|
3865
3865
|
visualState: e,
|
|
3866
3866
|
parent: r,
|
|
@@ -3871,27 +3871,27 @@ function Ju(t, e, i, n, s, o) {
|
|
|
3871
3871
|
skipAnimations: h,
|
|
3872
3872
|
isSVG: o
|
|
3873
3873
|
}), p.current && f.current && (f.current.manuallyAnimateOnMount = !0));
|
|
3874
|
-
const d = f.current,
|
|
3875
|
-
d && !d.projection && s && (d.type === "html" || d.type === "svg") && Qu(f.current, i, s,
|
|
3876
|
-
const
|
|
3877
|
-
|
|
3878
|
-
d &&
|
|
3874
|
+
const d = f.current, g = j(Er);
|
|
3875
|
+
d && !d.projection && s && (d.type === "html" || d.type === "svg") && Qu(f.current, i, s, g);
|
|
3876
|
+
const m = ut(!1);
|
|
3877
|
+
Qn(() => {
|
|
3878
|
+
d && m.current && d.update(i, l);
|
|
3879
3879
|
});
|
|
3880
|
-
const
|
|
3881
|
-
return
|
|
3882
|
-
p.current = !0, d && (
|
|
3880
|
+
const y = i[$s], v = ut(!!y && typeof window < "u" && !window.MotionHandoffIsComplete?.(y) && window.MotionHasOptimisedAnimation?.(y));
|
|
3881
|
+
return Hr(() => {
|
|
3882
|
+
p.current = !0, d && (m.current = !0, window.MotionIsMounted = !0, d.updateFeatures(), d.scheduleRenderMicrotask(), v.current && d.animationState && d.animationState.animateChanges());
|
|
3883
3883
|
}), ni(() => {
|
|
3884
|
-
d && (!
|
|
3885
|
-
window.MotionHandoffMarkAsComplete?.(
|
|
3886
|
-
}),
|
|
3884
|
+
d && (!v.current && d.animationState && d.animationState.animateChanges(), v.current && (queueMicrotask(() => {
|
|
3885
|
+
window.MotionHandoffMarkAsComplete?.(y);
|
|
3886
|
+
}), v.current = !1), d.enteringChildren = void 0);
|
|
3887
3887
|
}), d;
|
|
3888
3888
|
}
|
|
3889
3889
|
function Qu(t, e, i, n) {
|
|
3890
3890
|
const { layoutId: s, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: c, layoutAnchor: u, layoutCrossfade: h } = e;
|
|
3891
|
-
t.projection = new i(t.latestValues, e["data-framer-portal-id"] ? void 0 :
|
|
3891
|
+
t.projection = new i(t.latestValues, e["data-framer-portal-id"] ? void 0 : Rr(t.parent)), t.projection.setOptions({
|
|
3892
3892
|
layoutId: s,
|
|
3893
3893
|
layout: o,
|
|
3894
|
-
alwaysMeasureLayout: !!r || a &&
|
|
3894
|
+
alwaysMeasureLayout: !!r || a && gt(a),
|
|
3895
3895
|
visualElement: t,
|
|
3896
3896
|
animationType: typeof o == "string" ? o : "both",
|
|
3897
3897
|
initialPromotionConfig: n,
|
|
@@ -3901,50 +3901,50 @@ function Qu(t, e, i, n) {
|
|
|
3901
3901
|
layoutAnchor: u
|
|
3902
3902
|
});
|
|
3903
3903
|
}
|
|
3904
|
-
function
|
|
3904
|
+
function Rr(t) {
|
|
3905
3905
|
if (t)
|
|
3906
|
-
return t.options.allowProjection !== !1 ? t.projection :
|
|
3906
|
+
return t.options.allowProjection !== !1 ? t.projection : Rr(t.parent);
|
|
3907
3907
|
}
|
|
3908
3908
|
function Ve(t, { forwardMotionProps: e = !1, type: i } = {}, n, s) {
|
|
3909
3909
|
n && Bu(n);
|
|
3910
|
-
const o = i ? i === "svg" :
|
|
3910
|
+
const o = i ? i === "svg" : Ri(t), r = o ? Yu : Xu;
|
|
3911
3911
|
function a(c, u) {
|
|
3912
3912
|
let h;
|
|
3913
3913
|
const f = {
|
|
3914
|
-
...
|
|
3914
|
+
...j(br),
|
|
3915
3915
|
...c,
|
|
3916
3916
|
layoutId: tc(c)
|
|
3917
|
-
}, { isStatic: p, isValidProp: d } = f,
|
|
3917
|
+
}, { isStatic: p, isValidProp: d } = f, g = Iu(c), m = r(c, p);
|
|
3918
3918
|
if (!p && typeof window < "u") {
|
|
3919
3919
|
ec(f, n);
|
|
3920
|
-
const
|
|
3921
|
-
h =
|
|
3920
|
+
const y = ic(f);
|
|
3921
|
+
h = y.MeasureLayout, g.visualElement = Ju(t, m, f, s, y.ProjectionNode, o);
|
|
3922
3922
|
}
|
|
3923
|
-
return
|
|
3924
|
-
value:
|
|
3925
|
-
children: [h &&
|
|
3926
|
-
visualElement:
|
|
3923
|
+
return $r(me.Provider, {
|
|
3924
|
+
value: g,
|
|
3925
|
+
children: [h && g.visualElement ? ts(h, {
|
|
3926
|
+
visualElement: g.visualElement,
|
|
3927
3927
|
...f
|
|
3928
|
-
}) : null, Hu(t, c, Zu(
|
|
3928
|
+
}) : null, Hu(t, c, Zu(m, g.visualElement, u), m, p, e, o, d)]
|
|
3929
3929
|
});
|
|
3930
3930
|
}
|
|
3931
3931
|
a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
|
|
3932
|
-
const l =
|
|
3932
|
+
const l = Nr(a);
|
|
3933
3933
|
return l[qu] = t, l;
|
|
3934
3934
|
}
|
|
3935
3935
|
function tc({ layoutId: t }) {
|
|
3936
|
-
const e =
|
|
3936
|
+
const e = j(es).id;
|
|
3937
3937
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
3938
3938
|
}
|
|
3939
3939
|
function ec(t, e) {
|
|
3940
|
-
const i =
|
|
3940
|
+
const i = j(Ar).strict;
|
|
3941
3941
|
if (process.env.NODE_ENV !== "production" && e && i) {
|
|
3942
3942
|
const n = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
3943
|
-
t.ignoreStrict ?
|
|
3943
|
+
t.ignoreStrict ? At(!1, n, "lazy-strict-mode") : Q(!1, n, "lazy-strict-mode");
|
|
3944
3944
|
}
|
|
3945
3945
|
}
|
|
3946
3946
|
function ic(t) {
|
|
3947
|
-
const { drag: e, layout: i } =
|
|
3947
|
+
const { drag: e, layout: i } = Vr();
|
|
3948
3948
|
if (!e && !i) return {};
|
|
3949
3949
|
const n = {
|
|
3950
3950
|
...e,
|
|
@@ -3960,7 +3960,7 @@ function nc(t, e) {
|
|
|
3960
3960
|
const i = /* @__PURE__ */ new Map(), n = (o, r) => Ve(o, r, t, e), s = (o, r) => (process.env.NODE_ENV !== "production" && ai(!1, "motion() is deprecated. Use motion.create() instead."), n(o, r));
|
|
3961
3961
|
return new Proxy(s, { get: (o, r) => r === "create" ? n : (i.has(r) || i.set(r, Ve(r, void 0, t, e)), i.get(r)) });
|
|
3962
3962
|
}
|
|
3963
|
-
var sc = (t, e) => e.isSVG ??
|
|
3963
|
+
var sc = (t, e) => e.isSVG ?? Ri(t) ? new Nl(e) : new Bl(e, { allowProjection: t !== Zn }), rc = class extends st {
|
|
3964
3964
|
constructor(t) {
|
|
3965
3965
|
super(t), t.animationState || (t.animationState = zl(t));
|
|
3966
3966
|
}
|
|
@@ -3978,7 +3978,7 @@ var sc = (t, e) => e.isSVG ?? Ei(t) ? new Nl(e) : new Bl(e, { allowProjection: t
|
|
|
3978
3978
|
unmount() {
|
|
3979
3979
|
this.node.animationState.reset(), this.unmountControls?.();
|
|
3980
3980
|
}
|
|
3981
|
-
}, oc = 0, ac = class extends
|
|
3981
|
+
}, oc = 0, ac = class extends st {
|
|
3982
3982
|
constructor() {
|
|
3983
3983
|
super(...arguments), this.id = oc++, this.isExitComplete = !1;
|
|
3984
3984
|
}
|
|
@@ -3990,7 +3990,7 @@ var sc = (t, e) => e.isSVG ?? Ei(t) ? new Nl(e) : new Bl(e, { allowProjection: t
|
|
|
3990
3990
|
if (this.isExitComplete) {
|
|
3991
3991
|
const { initial: s, custom: o } = this.node.getProps();
|
|
3992
3992
|
if (typeof s == "string" || typeof s == "object" && s !== null && !Array.isArray(s)) {
|
|
3993
|
-
const r =
|
|
3993
|
+
const r = dt(this.node, s, o);
|
|
3994
3994
|
if (r) {
|
|
3995
3995
|
const { transition: a, transitionEnd: l, ...c } = r;
|
|
3996
3996
|
for (const u in c) this.node.getValue(u)?.jump(c[u]);
|
|
@@ -4016,22 +4016,22 @@ var sc = (t, e) => e.isSVG ?? Ei(t) ? new Nl(e) : new Bl(e, { allowProjection: t
|
|
|
4016
4016
|
animation: { Feature: rc },
|
|
4017
4017
|
exit: { Feature: ac }
|
|
4018
4018
|
};
|
|
4019
|
-
function
|
|
4019
|
+
function $t(t) {
|
|
4020
4020
|
return { point: {
|
|
4021
4021
|
x: t.pageX,
|
|
4022
4022
|
y: t.pageY
|
|
4023
4023
|
} };
|
|
4024
4024
|
}
|
|
4025
|
-
var uc = (t) => (e) =>
|
|
4026
|
-
function
|
|
4027
|
-
return
|
|
4025
|
+
var uc = (t) => (e) => bi(e) && t(e, $t(e));
|
|
4026
|
+
function Bt(t, e, i, n) {
|
|
4027
|
+
return jt(t, e, uc(i), n);
|
|
4028
4028
|
}
|
|
4029
|
-
var
|
|
4029
|
+
var Lr = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Wn = (t, e) => Math.abs(t - e);
|
|
4030
4030
|
function cc(t, e) {
|
|
4031
|
-
const i =
|
|
4031
|
+
const i = Wn(t.x, e.x), n = Wn(t.y, e.y);
|
|
4032
4032
|
return Math.sqrt(i ** 2 + n ** 2);
|
|
4033
4033
|
}
|
|
4034
|
-
var
|
|
4034
|
+
var $n = /* @__PURE__ */ new Set(["auto", "scroll"]), kr = class {
|
|
4035
4035
|
constructor(t, e, { transformPagePoint: i, contextWindow: n = window, dragSnapToOrigin: s = !1, distanceThreshold: o = 3, element: r } = {}) {
|
|
4036
4036
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.lastRawMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.scrollPositions = /* @__PURE__ */ new Map(), this.removeScrollListeners = null, this.onElementScroll = (f) => {
|
|
4037
4037
|
this.handleScroll(f.target);
|
|
@@ -4045,24 +4045,24 @@ var Wn = /* @__PURE__ */ new Set(["auto", "scroll"]), Br = class {
|
|
|
4045
4045
|
y: 0
|
|
4046
4046
|
}) >= this.distanceThreshold;
|
|
4047
4047
|
if (!p && !d) return;
|
|
4048
|
-
const { point:
|
|
4048
|
+
const { point: g } = f, { timestamp: m } = k;
|
|
4049
4049
|
this.history.push({
|
|
4050
|
-
...
|
|
4051
|
-
timestamp:
|
|
4050
|
+
...g,
|
|
4051
|
+
timestamp: m
|
|
4052
4052
|
});
|
|
4053
|
-
const { onStart:
|
|
4054
|
-
p || (
|
|
4053
|
+
const { onStart: y, onMove: v } = this.handlers;
|
|
4054
|
+
p || (y && y(this.lastMoveEvent, f), this.startEvent = this.lastMoveEvent), v && v(this.lastMoveEvent, f);
|
|
4055
4055
|
}, this.handlePointerMove = (f, p) => {
|
|
4056
|
-
this.lastMoveEvent = f, this.lastRawMoveEventInfo = p, this.lastMoveEventInfo = Gt(p, this.transformPagePoint),
|
|
4056
|
+
this.lastMoveEvent = f, this.lastRawMoveEventInfo = p, this.lastMoveEventInfo = Gt(p, this.transformPagePoint), V.update(this.updatePoint, !0);
|
|
4057
4057
|
}, this.handlePointerUp = (f, p) => {
|
|
4058
4058
|
this.end();
|
|
4059
|
-
const { onEnd: d, onSessionEnd:
|
|
4060
|
-
if ((this.dragSnapToOrigin || !this.startEvent) &&
|
|
4061
|
-
const
|
|
4062
|
-
this.startEvent && d && d(f,
|
|
4063
|
-
}, !
|
|
4059
|
+
const { onEnd: d, onSessionEnd: g, resumeAnimation: m } = this.handlers;
|
|
4060
|
+
if ((this.dragSnapToOrigin || !this.startEvent) && m && m(), !(this.lastMoveEvent && this.lastMoveEventInfo)) return;
|
|
4061
|
+
const y = Me(f.type === "pointercancel" ? this.lastMoveEventInfo : Gt(p, this.transformPagePoint), this.history);
|
|
4062
|
+
this.startEvent && d && d(f, y), g && g(f, y);
|
|
4063
|
+
}, !bi(t)) return;
|
|
4064
4064
|
this.dragSnapToOrigin = s, this.handlers = e, this.transformPagePoint = i, this.distanceThreshold = o, this.contextWindow = n || window;
|
|
4065
|
-
const a = Gt(
|
|
4065
|
+
const a = Gt($t(t), this.transformPagePoint), { point: l } = a, { timestamp: c } = k;
|
|
4066
4066
|
this.history = [{
|
|
4067
4067
|
...l,
|
|
4068
4068
|
timestamp: c
|
|
@@ -4073,13 +4073,13 @@ var Wn = /* @__PURE__ */ new Set(["auto", "scroll"]), Br = class {
|
|
|
4073
4073
|
passive: !0,
|
|
4074
4074
|
capture: !0
|
|
4075
4075
|
};
|
|
4076
|
-
this.removeListeners =
|
|
4076
|
+
this.removeListeners = Nt(Bt(this.contextWindow, "pointermove", this.handlePointerMove, h), Bt(this.contextWindow, "pointerup", this.handlePointerUp, h), Bt(this.contextWindow, "pointercancel", this.handlePointerUp, h)), r && this.startScrollTracking(r);
|
|
4077
4077
|
}
|
|
4078
4078
|
startScrollTracking(t) {
|
|
4079
4079
|
let e = t.parentElement;
|
|
4080
4080
|
for (; e; ) {
|
|
4081
4081
|
const i = getComputedStyle(e);
|
|
4082
|
-
(
|
|
4082
|
+
($n.has(i.overflowX) || $n.has(i.overflowY)) && this.scrollPositions.set(e, {
|
|
4083
4083
|
x: e.scrollLeft,
|
|
4084
4084
|
y: e.scrollTop
|
|
4085
4085
|
}), e = e.parentElement;
|
|
@@ -4104,19 +4104,19 @@ var Wn = /* @__PURE__ */ new Set(["auto", "scroll"]), Br = class {
|
|
|
4104
4104
|
x: n.x - e.x,
|
|
4105
4105
|
y: n.y - e.y
|
|
4106
4106
|
};
|
|
4107
|
-
s.x === 0 && s.y === 0 || (i ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += s.x, this.lastMoveEventInfo.point.y += s.y) : this.history.length > 0 && (this.history[0].x -= s.x, this.history[0].y -= s.y), this.scrollPositions.set(t, n),
|
|
4107
|
+
s.x === 0 && s.y === 0 || (i ? this.lastMoveEventInfo && (this.lastMoveEventInfo.point.x += s.x, this.lastMoveEventInfo.point.y += s.y) : this.history.length > 0 && (this.history[0].x -= s.x, this.history[0].y -= s.y), this.scrollPositions.set(t, n), V.update(this.updatePoint, !0));
|
|
4108
4108
|
}
|
|
4109
4109
|
updateHandlers(t) {
|
|
4110
4110
|
this.handlers = t;
|
|
4111
4111
|
}
|
|
4112
4112
|
end() {
|
|
4113
|
-
this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(),
|
|
4113
|
+
this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), nt(this.updatePoint);
|
|
4114
4114
|
}
|
|
4115
4115
|
};
|
|
4116
4116
|
function Gt(t, e) {
|
|
4117
4117
|
return e ? { point: e(t.point) } : t;
|
|
4118
4118
|
}
|
|
4119
|
-
function
|
|
4119
|
+
function Kn(t, e) {
|
|
4120
4120
|
return {
|
|
4121
4121
|
x: t.x - e.x,
|
|
4122
4122
|
y: t.y - e.y
|
|
@@ -4125,15 +4125,15 @@ function $n(t, e) {
|
|
|
4125
4125
|
function Me({ point: t }, e) {
|
|
4126
4126
|
return {
|
|
4127
4127
|
point: t,
|
|
4128
|
-
delta:
|
|
4129
|
-
offset:
|
|
4128
|
+
delta: Kn(t, Br(e)),
|
|
4129
|
+
offset: Kn(t, hc(e)),
|
|
4130
4130
|
velocity: fc(e, 0.1)
|
|
4131
4131
|
};
|
|
4132
4132
|
}
|
|
4133
4133
|
function hc(t) {
|
|
4134
4134
|
return t[0];
|
|
4135
4135
|
}
|
|
4136
|
-
function
|
|
4136
|
+
function Br(t) {
|
|
4137
4137
|
return t[t.length - 1];
|
|
4138
4138
|
}
|
|
4139
4139
|
function fc(t, e) {
|
|
@@ -4142,15 +4142,15 @@ function fc(t, e) {
|
|
|
4142
4142
|
y: 0
|
|
4143
4143
|
};
|
|
4144
4144
|
let i = t.length - 1, n = null;
|
|
4145
|
-
const s =
|
|
4146
|
-
for (; i >= 0 && (n = t[i], !(s.timestamp - n.timestamp >
|
|
4145
|
+
const s = Br(t);
|
|
4146
|
+
for (; i >= 0 && (n = t[i], !(s.timestamp - n.timestamp > N(e))); )
|
|
4147
4147
|
i--;
|
|
4148
4148
|
if (!n) return {
|
|
4149
4149
|
x: 0,
|
|
4150
4150
|
y: 0
|
|
4151
4151
|
};
|
|
4152
|
-
n === t[0] && t.length > 2 && s.timestamp - n.timestamp >
|
|
4153
|
-
const o =
|
|
4152
|
+
n === t[0] && t.length > 2 && s.timestamp - n.timestamp > N(e) * 2 && (n = t[1]);
|
|
4153
|
+
const o = $(s.timestamp - n.timestamp);
|
|
4154
4154
|
if (o === 0) return {
|
|
4155
4155
|
x: 0,
|
|
4156
4156
|
y: 0
|
|
@@ -4162,9 +4162,9 @@ function fc(t, e) {
|
|
|
4162
4162
|
return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
|
|
4163
4163
|
}
|
|
4164
4164
|
function dc(t, { min: e, max: i }, n) {
|
|
4165
|
-
return e !== void 0 && t < e ? t = n ?
|
|
4165
|
+
return e !== void 0 && t < e ? t = n ? A(e, t, n.min) : Math.max(t, e) : i !== void 0 && t > i && (t = n ? A(i, t, n.max) : Math.min(t, i)), t;
|
|
4166
4166
|
}
|
|
4167
|
-
function
|
|
4167
|
+
function zn(t, e, i) {
|
|
4168
4168
|
return {
|
|
4169
4169
|
min: e !== void 0 ? t.min + e : void 0,
|
|
4170
4170
|
max: i !== void 0 ? t.max + i - (t.max - t.min) : void 0
|
|
@@ -4172,11 +4172,11 @@ function Kn(t, e, i) {
|
|
|
4172
4172
|
}
|
|
4173
4173
|
function pc(t, { top: e, left: i, bottom: n, right: s }) {
|
|
4174
4174
|
return {
|
|
4175
|
-
x:
|
|
4176
|
-
y:
|
|
4175
|
+
x: zn(t.x, i, s),
|
|
4176
|
+
y: zn(t.y, e, n)
|
|
4177
4177
|
};
|
|
4178
4178
|
}
|
|
4179
|
-
function
|
|
4179
|
+
function Hn(t, e) {
|
|
4180
4180
|
let i = e.min - t.min, n = e.max - t.max;
|
|
4181
4181
|
return e.max - e.min < t.max - t.min && ([i, n] = [n, i]), {
|
|
4182
4182
|
min: i,
|
|
@@ -4185,14 +4185,14 @@ function zn(t, e) {
|
|
|
4185
4185
|
}
|
|
4186
4186
|
function mc(t, e) {
|
|
4187
4187
|
return {
|
|
4188
|
-
x:
|
|
4189
|
-
y:
|
|
4188
|
+
x: Hn(t.x, e.x),
|
|
4189
|
+
y: Hn(t.y, e.y)
|
|
4190
4190
|
};
|
|
4191
4191
|
}
|
|
4192
4192
|
function vc(t, e) {
|
|
4193
4193
|
let i = 0.5;
|
|
4194
|
-
const n =
|
|
4195
|
-
return s > n ? i =
|
|
4194
|
+
const n = O(t), s = O(e);
|
|
4195
|
+
return s > n ? i = Ft(e.min, e.max - n, t.min) : n > s && (i = Ft(t.min, t.max - s, e.min)), J(0, 1, i);
|
|
4196
4196
|
}
|
|
4197
4197
|
function gc(t, e) {
|
|
4198
4198
|
const i = {};
|
|
@@ -4201,17 +4201,17 @@ function gc(t, e) {
|
|
|
4201
4201
|
var ei = 0.35;
|
|
4202
4202
|
function yc(t = ei) {
|
|
4203
4203
|
return t === !1 ? t = 0 : t === !0 && (t = ei), {
|
|
4204
|
-
x:
|
|
4205
|
-
y:
|
|
4204
|
+
x: Gn(t, "left", "right"),
|
|
4205
|
+
y: Gn(t, "top", "bottom")
|
|
4206
4206
|
};
|
|
4207
4207
|
}
|
|
4208
|
-
function
|
|
4208
|
+
function Gn(t, e, i) {
|
|
4209
4209
|
return {
|
|
4210
|
-
min:
|
|
4211
|
-
max:
|
|
4210
|
+
min: _n(t, e),
|
|
4211
|
+
max: _n(t, i)
|
|
4212
4212
|
};
|
|
4213
4213
|
}
|
|
4214
|
-
function
|
|
4214
|
+
function _n(t, e) {
|
|
4215
4215
|
return typeof t == "number" ? t : t[e] || 0;
|
|
4216
4216
|
}
|
|
4217
4217
|
var Tc = /* @__PURE__ */ new WeakMap(), xc = class {
|
|
@@ -4225,34 +4225,34 @@ var Tc = /* @__PURE__ */ new WeakMap(), xc = class {
|
|
|
4225
4225
|
const { presenceContext: n } = this.visualElement;
|
|
4226
4226
|
if (n && n.isPresent === !1) return;
|
|
4227
4227
|
const s = (u) => {
|
|
4228
|
-
e && this.snapToCursor(
|
|
4228
|
+
e && this.snapToCursor($t(u).point), this.stopAnimation();
|
|
4229
4229
|
}, o = (u, h) => {
|
|
4230
4230
|
const { drag: f, dragPropagation: p, onDragStart: d } = this.getProps();
|
|
4231
4231
|
if (f && !p && (this.openDragLock && this.openDragLock(), this.openDragLock = Qa(f), !this.openDragLock))
|
|
4232
4232
|
return;
|
|
4233
|
-
this.latestPointerEvent = u, this.latestPanInfo = h, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0),
|
|
4234
|
-
let
|
|
4235
|
-
if (
|
|
4236
|
-
const { projection:
|
|
4237
|
-
if (
|
|
4238
|
-
const x =
|
|
4239
|
-
x && (
|
|
4233
|
+
this.latestPointerEvent = u, this.latestPanInfo = h, this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), Y((m) => {
|
|
4234
|
+
let y = this.getAxisMotionValue(m).get() || 0;
|
|
4235
|
+
if (Z.test(y)) {
|
|
4236
|
+
const { projection: v } = this.visualElement;
|
|
4237
|
+
if (v && v.layout) {
|
|
4238
|
+
const x = v.layout.layoutBox[m];
|
|
4239
|
+
x && (y = O(x) * (parseFloat(y) / 100));
|
|
4240
4240
|
}
|
|
4241
4241
|
}
|
|
4242
|
-
this.originPoint[
|
|
4243
|
-
}), d &&
|
|
4244
|
-
const { animationState:
|
|
4245
|
-
|
|
4242
|
+
this.originPoint[m] = y;
|
|
4243
|
+
}), d && V.update(() => d(u, h), !1, !0), He(this.visualElement, "transform");
|
|
4244
|
+
const { animationState: g } = this.visualElement;
|
|
4245
|
+
g && g.setActive("whileDrag", !0);
|
|
4246
4246
|
}, r = (u, h) => {
|
|
4247
4247
|
this.latestPointerEvent = u, this.latestPanInfo = h;
|
|
4248
|
-
const { dragPropagation: f, dragDirectionLock: p, onDirectionLock: d, onDrag:
|
|
4248
|
+
const { dragPropagation: f, dragDirectionLock: p, onDirectionLock: d, onDrag: g } = this.getProps();
|
|
4249
4249
|
if (!f && !this.openDragLock) return;
|
|
4250
|
-
const { offset:
|
|
4250
|
+
const { offset: m } = h;
|
|
4251
4251
|
if (p && this.currentDirection === null) {
|
|
4252
|
-
this.currentDirection = Pc(
|
|
4252
|
+
this.currentDirection = Pc(m), this.currentDirection !== null && d && d(this.currentDirection);
|
|
4253
4253
|
return;
|
|
4254
4254
|
}
|
|
4255
|
-
this.updateAxis("x", h.point,
|
|
4255
|
+
this.updateAxis("x", h.point, m), this.updateAxis("y", h.point, m), this.visualElement.render(), g && V.update(() => g(u, h), !1, !0);
|
|
4256
4256
|
}, a = (u, h) => {
|
|
4257
4257
|
this.latestPointerEvent = u, this.latestPanInfo = h, this.stop(u, h), this.latestPointerEvent = null, this.latestPanInfo = null;
|
|
4258
4258
|
}, l = () => {
|
|
@@ -4262,7 +4262,7 @@ var Tc = /* @__PURE__ */ new WeakMap(), xc = class {
|
|
|
4262
4262
|
y: 0
|
|
4263
4263
|
});
|
|
4264
4264
|
}, { dragSnapToOrigin: c } = this.getProps();
|
|
4265
|
-
this.panSession = new
|
|
4265
|
+
this.panSession = new kr(t, {
|
|
4266
4266
|
onSessionStart: s,
|
|
4267
4267
|
onStart: o,
|
|
4268
4268
|
onMove: r,
|
|
@@ -4272,7 +4272,7 @@ var Tc = /* @__PURE__ */ new WeakMap(), xc = class {
|
|
|
4272
4272
|
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
4273
4273
|
dragSnapToOrigin: c,
|
|
4274
4274
|
distanceThreshold: i,
|
|
4275
|
-
contextWindow:
|
|
4275
|
+
contextWindow: Lr(this.visualElement),
|
|
4276
4276
|
element: this.visualElement.current
|
|
4277
4277
|
});
|
|
4278
4278
|
}
|
|
@@ -4282,7 +4282,7 @@ var Tc = /* @__PURE__ */ new WeakMap(), xc = class {
|
|
|
4282
4282
|
const { velocity: o } = n;
|
|
4283
4283
|
this.startAnimation(o);
|
|
4284
4284
|
const { onDragEnd: r } = this.getProps();
|
|
4285
|
-
r &&
|
|
4285
|
+
r && V.postRender(() => r(i, n));
|
|
4286
4286
|
}
|
|
4287
4287
|
cancel() {
|
|
4288
4288
|
this.isDragging = !1;
|
|
@@ -4303,15 +4303,15 @@ var Tc = /* @__PURE__ */ new WeakMap(), xc = class {
|
|
|
4303
4303
|
}
|
|
4304
4304
|
resolveConstraints() {
|
|
4305
4305
|
const { dragConstraints: t, dragElastic: e } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : this.visualElement.projection?.layout, n = this.constraints;
|
|
4306
|
-
t &&
|
|
4306
|
+
t && gt(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && i ? this.constraints = pc(i.layoutBox, t) : this.constraints = !1, this.elastic = yc(e), n !== this.constraints && !gt(t) && i && this.constraints && !this.hasMutatedConstraints && Y((s) => {
|
|
4307
4307
|
this.constraints !== !1 && this.getAxisMotionValue(s) && (this.constraints[s] = gc(i.layoutBox[s], this.constraints[s]));
|
|
4308
4308
|
});
|
|
4309
4309
|
}
|
|
4310
4310
|
resolveRefConstraints() {
|
|
4311
4311
|
const { dragConstraints: t, onMeasureDragConstraints: e } = this.getProps();
|
|
4312
|
-
if (!t || !
|
|
4312
|
+
if (!t || !gt(t)) return !1;
|
|
4313
4313
|
const i = t.current;
|
|
4314
|
-
|
|
4314
|
+
Q(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
|
|
4315
4315
|
const { projection: n } = this.visualElement;
|
|
4316
4316
|
if (!n || !n.layout) return !1;
|
|
4317
4317
|
n.root && (n.root.scroll = void 0, n.root.updateScroll());
|
|
@@ -4319,12 +4319,12 @@ var Tc = /* @__PURE__ */ new WeakMap(), xc = class {
|
|
|
4319
4319
|
let o = mc(n.layout.layoutBox, s);
|
|
4320
4320
|
if (e) {
|
|
4321
4321
|
const r = e(Al(o));
|
|
4322
|
-
this.hasMutatedConstraints = !!r, r && (o =
|
|
4322
|
+
this.hasMutatedConstraints = !!r, r && (o = sr(r));
|
|
4323
4323
|
}
|
|
4324
4324
|
return o;
|
|
4325
4325
|
}
|
|
4326
4326
|
startAnimation(t) {
|
|
4327
|
-
const { drag: e, dragMomentum: i, dragElastic: n, dragTransition: s, dragSnapToOrigin: o, onDragTransitionEnd: r } = this.getProps(), a = this.constraints || {}, l =
|
|
4327
|
+
const { drag: e, dragMomentum: i, dragElastic: n, dragTransition: s, dragSnapToOrigin: o, onDragTransitionEnd: r } = this.getProps(), a = this.constraints || {}, l = Y((c) => {
|
|
4328
4328
|
if (!_t(c, e, this.currentDirection)) return;
|
|
4329
4329
|
let u = a && a[c] || {};
|
|
4330
4330
|
(o === !0 || o === c) && (u = {
|
|
@@ -4348,36 +4348,36 @@ var Tc = /* @__PURE__ */ new WeakMap(), xc = class {
|
|
|
4348
4348
|
}
|
|
4349
4349
|
startAxisValueAnimation(t, e) {
|
|
4350
4350
|
const i = this.getAxisMotionValue(t);
|
|
4351
|
-
return He(this.visualElement, t), i.start(
|
|
4351
|
+
return He(this.visualElement, t), i.start(Ti(t, i, 0, e, this.visualElement, !1));
|
|
4352
4352
|
}
|
|
4353
4353
|
stopAnimation() {
|
|
4354
|
-
|
|
4354
|
+
Y((t) => this.getAxisMotionValue(t).stop());
|
|
4355
4355
|
}
|
|
4356
4356
|
getAxisMotionValue(t) {
|
|
4357
4357
|
const e = `_drag${t.toUpperCase()}`, i = this.visualElement.getProps()[e];
|
|
4358
4358
|
return i || this.visualElement.getValue(t, this.visualElement.latestValues[t] ?? 0);
|
|
4359
4359
|
}
|
|
4360
4360
|
snapToCursor(t) {
|
|
4361
|
-
|
|
4361
|
+
Y((e) => {
|
|
4362
4362
|
const { drag: i } = this.getProps();
|
|
4363
4363
|
if (!_t(e, i, this.currentDirection)) return;
|
|
4364
4364
|
const { projection: n } = this.visualElement, s = this.getAxisMotionValue(e);
|
|
4365
4365
|
if (n && n.layout) {
|
|
4366
4366
|
const { min: o, max: r } = n.layout.layoutBox[e], a = s.get() || 0;
|
|
4367
|
-
s.set(t[e] -
|
|
4367
|
+
s.set(t[e] - A(o, r, 0.5) + a);
|
|
4368
4368
|
}
|
|
4369
4369
|
});
|
|
4370
4370
|
}
|
|
4371
4371
|
scalePositionWithinConstraints() {
|
|
4372
4372
|
if (!this.visualElement.current) return;
|
|
4373
4373
|
const { drag: t, dragConstraints: e } = this.getProps(), { projection: i } = this.visualElement;
|
|
4374
|
-
if (!
|
|
4374
|
+
if (!gt(e) || !i || !this.constraints) return;
|
|
4375
4375
|
this.stopAnimation();
|
|
4376
4376
|
const n = {
|
|
4377
4377
|
x: 0,
|
|
4378
4378
|
y: 0
|
|
4379
4379
|
};
|
|
4380
|
-
|
|
4380
|
+
Y((o) => {
|
|
4381
4381
|
const r = this.getAxisMotionValue(o);
|
|
4382
4382
|
if (r && this.constraints !== !1) {
|
|
4383
4383
|
const a = r.get();
|
|
@@ -4388,27 +4388,27 @@ var Tc = /* @__PURE__ */ new WeakMap(), xc = class {
|
|
|
4388
4388
|
}
|
|
4389
4389
|
});
|
|
4390
4390
|
const { transformTemplate: s } = this.visualElement.getProps();
|
|
4391
|
-
this.visualElement.current.style.transform = s ? s({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.constraints = !1, this.resolveConstraints(),
|
|
4391
|
+
this.visualElement.current.style.transform = s ? s({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.constraints = !1, this.resolveConstraints(), Y((o) => {
|
|
4392
4392
|
if (!_t(o, t, null)) return;
|
|
4393
4393
|
const r = this.getAxisMotionValue(o), { min: a, max: l } = this.constraints[o];
|
|
4394
|
-
r.set(
|
|
4394
|
+
r.set(A(a, l, n[o]));
|
|
4395
4395
|
}), this.visualElement.render();
|
|
4396
4396
|
}
|
|
4397
4397
|
addListeners() {
|
|
4398
4398
|
if (!this.visualElement.current) return;
|
|
4399
4399
|
Tc.set(this.visualElement, this);
|
|
4400
|
-
const t = this.visualElement.current, e =
|
|
4400
|
+
const t = this.visualElement.current, e = Bt(t, "pointerdown", (l) => {
|
|
4401
4401
|
const { drag: c, dragListener: u = !0 } = this.getProps(), h = l.target, f = h !== t && rl(h);
|
|
4402
4402
|
c && u && !f && this.start(l);
|
|
4403
4403
|
});
|
|
4404
4404
|
let i;
|
|
4405
4405
|
const n = () => {
|
|
4406
4406
|
const { dragConstraints: l } = this.getProps();
|
|
4407
|
-
|
|
4407
|
+
gt(l) && l.current && (this.constraints = this.resolveRefConstraints(), i || (i = wc(t, l.current, () => this.scalePositionWithinConstraints())));
|
|
4408
4408
|
}, { projection: s } = this.visualElement, o = s.addEventListener("measure", n);
|
|
4409
|
-
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()),
|
|
4410
|
-
const r =
|
|
4411
|
-
this.isDragging && c && (
|
|
4409
|
+
s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), V.read(n);
|
|
4410
|
+
const r = jt(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: c }) => {
|
|
4411
|
+
this.isDragging && c && (Y((u) => {
|
|
4412
4412
|
const h = this.getAxisMotionValue(u);
|
|
4413
4413
|
h && (this.originPoint[u] += l[u].translate, h.set(h.get() + l[u].translate));
|
|
4414
4414
|
}), this.visualElement.render());
|
|
@@ -4430,7 +4430,7 @@ var Tc = /* @__PURE__ */ new WeakMap(), xc = class {
|
|
|
4430
4430
|
};
|
|
4431
4431
|
}
|
|
4432
4432
|
};
|
|
4433
|
-
function
|
|
4433
|
+
function Xn(t) {
|
|
4434
4434
|
let e = !0;
|
|
4435
4435
|
return () => {
|
|
4436
4436
|
if (e) {
|
|
@@ -4441,7 +4441,7 @@ function _n(t) {
|
|
|
4441
4441
|
};
|
|
4442
4442
|
}
|
|
4443
4443
|
function wc(t, e, i) {
|
|
4444
|
-
const n =
|
|
4444
|
+
const n = nn(t, Xn(i)), s = nn(e, Xn(i));
|
|
4445
4445
|
return () => {
|
|
4446
4446
|
n(), s();
|
|
4447
4447
|
};
|
|
@@ -4453,13 +4453,13 @@ function Pc(t, e = 10) {
|
|
|
4453
4453
|
let i = null;
|
|
4454
4454
|
return Math.abs(t.y) > e ? i = "y" : Math.abs(t.x) > e && (i = "x"), i;
|
|
4455
4455
|
}
|
|
4456
|
-
var Sc = class extends
|
|
4456
|
+
var Sc = class extends st {
|
|
4457
4457
|
constructor(t) {
|
|
4458
|
-
super(t), this.removeGroupControls =
|
|
4458
|
+
super(t), this.removeGroupControls = K, this.removeListeners = K, this.controls = new xc(t);
|
|
4459
4459
|
}
|
|
4460
4460
|
mount() {
|
|
4461
4461
|
const { dragControls: t } = this.node.getProps();
|
|
4462
|
-
t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() ||
|
|
4462
|
+
t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || K;
|
|
4463
4463
|
}
|
|
4464
4464
|
update() {
|
|
4465
4465
|
const { dragControls: t } = this.node.getProps(), { dragControls: e } = this.node.prevProps || {};
|
|
@@ -4469,15 +4469,15 @@ var Sc = class extends ot {
|
|
|
4469
4469
|
this.removeGroupControls(), this.removeListeners(), this.controls.isDragging || this.controls.endPanSession();
|
|
4470
4470
|
}
|
|
4471
4471
|
}, Ce = (t) => (e, i) => {
|
|
4472
|
-
t &&
|
|
4473
|
-
}, bc = class extends
|
|
4472
|
+
t && V.update(() => t(e, i), !1, !0);
|
|
4473
|
+
}, bc = class extends st {
|
|
4474
4474
|
constructor() {
|
|
4475
|
-
super(...arguments), this.removePointerDownListener =
|
|
4475
|
+
super(...arguments), this.removePointerDownListener = K;
|
|
4476
4476
|
}
|
|
4477
4477
|
onPointerDown(t) {
|
|
4478
|
-
this.session = new
|
|
4478
|
+
this.session = new kr(t, this.createPanHandlers(), {
|
|
4479
4479
|
transformPagePoint: this.node.getTransformPagePoint(),
|
|
4480
|
-
contextWindow:
|
|
4480
|
+
contextWindow: Lr(this.node)
|
|
4481
4481
|
});
|
|
4482
4482
|
}
|
|
4483
4483
|
createPanHandlers() {
|
|
@@ -4487,12 +4487,12 @@ var Sc = class extends ot {
|
|
|
4487
4487
|
onStart: Ce(e),
|
|
4488
4488
|
onMove: Ce(i),
|
|
4489
4489
|
onEnd: (s, o) => {
|
|
4490
|
-
delete this.session, n &&
|
|
4490
|
+
delete this.session, n && V.postRender(() => n(s, o));
|
|
4491
4491
|
}
|
|
4492
4492
|
};
|
|
4493
4493
|
}
|
|
4494
4494
|
mount() {
|
|
4495
|
-
this.removePointerDownListener =
|
|
4495
|
+
this.removePointerDownListener = Bt(this.node.current, "pointerdown", (t) => this.onPointerDown(t));
|
|
4496
4496
|
}
|
|
4497
4497
|
update() {
|
|
4498
4498
|
this.session && this.session.updateHandlers(this.createPanHandlers());
|
|
@@ -4500,7 +4500,7 @@ var Sc = class extends ot {
|
|
|
4500
4500
|
unmount() {
|
|
4501
4501
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
4502
4502
|
}
|
|
4503
|
-
}, De = !1, Ac = class extends
|
|
4503
|
+
}, De = !1, Ac = class extends Or {
|
|
4504
4504
|
componentDidMount() {
|
|
4505
4505
|
const { visualElement: t, layoutGroup: e, switchLayoutGroup: i, layoutId: n } = this.props, { projection: s } = t;
|
|
4506
4506
|
s && (e.group && e.group.add(s), i && i.register && n && i.register(s), De && s.root.didUpdate(), s.addEventListener("animationComplete", () => {
|
|
@@ -4516,14 +4516,14 @@ var Sc = class extends ot {
|
|
|
4516
4516
|
return o && (o.isPresent = s, t.layoutDependency !== e && o.setOptions({
|
|
4517
4517
|
...o.options,
|
|
4518
4518
|
layoutDependency: e
|
|
4519
|
-
}), De = !0, n || t.layoutDependency !== e || e === void 0 || t.isPresent !== s ? o.willUpdate() : this.safeToRemove(), t.isPresent !== s && (s ? o.promote() : o.relegate() ||
|
|
4519
|
+
}), De = !0, n || t.layoutDependency !== e || e === void 0 || t.isPresent !== s ? o.willUpdate() : this.safeToRemove(), t.isPresent !== s && (s ? o.promote() : o.relegate() || V.postRender(() => {
|
|
4520
4520
|
const r = o.getStack();
|
|
4521
4521
|
(!r || !r.members.length) && this.safeToRemove();
|
|
4522
4522
|
}))), null;
|
|
4523
4523
|
}
|
|
4524
4524
|
componentDidUpdate() {
|
|
4525
4525
|
const { visualElement: t, layoutAnchor: e } = this.props, { projection: i } = t;
|
|
4526
|
-
i && (i.options.layoutAnchor = e, i.root.didUpdate(),
|
|
4526
|
+
i && (i.options.layoutAnchor = e, i.root.didUpdate(), Si.postRender(() => {
|
|
4527
4527
|
!i.currentAnimation && i.isLead() && this.safeToRemove();
|
|
4528
4528
|
}));
|
|
4529
4529
|
}
|
|
@@ -4539,12 +4539,12 @@ var Sc = class extends ot {
|
|
|
4539
4539
|
return null;
|
|
4540
4540
|
}
|
|
4541
4541
|
};
|
|
4542
|
-
function
|
|
4543
|
-
const [e, i] = Lu(), n =
|
|
4544
|
-
return
|
|
4542
|
+
function Fr(t) {
|
|
4543
|
+
const [e, i] = Lu(), n = j(es);
|
|
4544
|
+
return ts(Ac, {
|
|
4545
4545
|
...t,
|
|
4546
4546
|
layoutGroup: n,
|
|
4547
|
-
switchLayoutGroup:
|
|
4547
|
+
switchLayoutGroup: j(Er),
|
|
4548
4548
|
isPresent: e,
|
|
4549
4549
|
safeToRemove: i
|
|
4550
4550
|
});
|
|
@@ -4553,24 +4553,24 @@ var Vc = {
|
|
|
4553
4553
|
pan: { Feature: bc },
|
|
4554
4554
|
drag: {
|
|
4555
4555
|
Feature: Sc,
|
|
4556
|
-
ProjectionNode:
|
|
4557
|
-
MeasureLayout:
|
|
4556
|
+
ProjectionNode: Sr,
|
|
4557
|
+
MeasureLayout: Fr
|
|
4558
4558
|
}
|
|
4559
4559
|
};
|
|
4560
|
-
function
|
|
4560
|
+
function Yn(t, e, i) {
|
|
4561
4561
|
const { props: n } = t;
|
|
4562
4562
|
t.animationState && n.whileHover && t.animationState.setActive("whileHover", i === "Start");
|
|
4563
4563
|
const s = n["onHover" + i];
|
|
4564
|
-
s &&
|
|
4564
|
+
s && V.postRender(() => s(e, $t(e)));
|
|
4565
4565
|
}
|
|
4566
|
-
var Mc = class extends
|
|
4566
|
+
var Mc = class extends st {
|
|
4567
4567
|
mount() {
|
|
4568
4568
|
const { current: t } = this.node;
|
|
4569
|
-
t && (this.unmount = el(t, (e, i) => (
|
|
4569
|
+
t && (this.unmount = el(t, (e, i) => (Yn(this.node, i, "Start"), (n) => Yn(this.node, n, "End"))));
|
|
4570
4570
|
}
|
|
4571
4571
|
unmount() {
|
|
4572
4572
|
}
|
|
4573
|
-
}, Cc = class extends
|
|
4573
|
+
}, Cc = class extends st {
|
|
4574
4574
|
constructor() {
|
|
4575
4575
|
super(...arguments), this.isActive = !1;
|
|
4576
4576
|
}
|
|
@@ -4587,24 +4587,24 @@ var Mc = class extends ot {
|
|
|
4587
4587
|
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
4588
4588
|
}
|
|
4589
4589
|
mount() {
|
|
4590
|
-
this.unmount =
|
|
4590
|
+
this.unmount = Nt(jt(this.node.current, "focus", () => this.onFocus()), jt(this.node.current, "blur", () => this.onBlur()));
|
|
4591
4591
|
}
|
|
4592
4592
|
unmount() {
|
|
4593
4593
|
}
|
|
4594
4594
|
};
|
|
4595
|
-
function
|
|
4595
|
+
function qn(t, e, i) {
|
|
4596
4596
|
const { props: n } = t;
|
|
4597
4597
|
if (t.current instanceof HTMLButtonElement && t.current.disabled) return;
|
|
4598
4598
|
t.animationState && n.whileTap && t.animationState.setActive("whileTap", i === "Start");
|
|
4599
4599
|
const s = n["onTap" + (i === "End" ? "" : i)];
|
|
4600
|
-
s &&
|
|
4600
|
+
s && V.postRender(() => s(e, $t(e)));
|
|
4601
4601
|
}
|
|
4602
|
-
var Dc = class extends
|
|
4602
|
+
var Dc = class extends st {
|
|
4603
4603
|
mount() {
|
|
4604
4604
|
const { current: t } = this.node;
|
|
4605
4605
|
if (!t) return;
|
|
4606
4606
|
const { globalTapTarget: e, propagate: i } = this.node.props;
|
|
4607
|
-
this.unmount = al(t, (n, s) => (
|
|
4607
|
+
this.unmount = al(t, (n, s) => (qn(this.node, s, "Start"), (o, { success: r }) => qn(this.node, o, r ? "End" : "Cancel")), {
|
|
4608
4608
|
useGlobalTarget: e,
|
|
4609
4609
|
stopPropagation: i?.tap === !1
|
|
4610
4610
|
});
|
|
@@ -4635,7 +4635,7 @@ function kc(t, e, i) {
|
|
|
4635
4635
|
var Bc = {
|
|
4636
4636
|
some: 0,
|
|
4637
4637
|
all: 1
|
|
4638
|
-
}, Fc = class extends
|
|
4638
|
+
}, Fc = class extends st {
|
|
4639
4639
|
constructor() {
|
|
4640
4640
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
4641
4641
|
}
|
|
@@ -4679,8 +4679,8 @@ var Oc = {
|
|
|
4679
4679
|
focus: { Feature: Cc },
|
|
4680
4680
|
hover: { Feature: Mc }
|
|
4681
4681
|
}, jc = { layout: {
|
|
4682
|
-
ProjectionNode:
|
|
4683
|
-
MeasureLayout:
|
|
4682
|
+
ProjectionNode: Sr,
|
|
4683
|
+
MeasureLayout: Fr
|
|
4684
4684
|
} }, Nc = {
|
|
4685
4685
|
...lc,
|
|
4686
4686
|
...Oc,
|
|
@@ -4688,5 +4688,12 @@ var Oc = {
|
|
|
4688
4688
|
...jc
|
|
4689
4689
|
}, Uc = /* @__PURE__ */ nc(Nc, sc), Hc = Uc;
|
|
4690
4690
|
export {
|
|
4691
|
+
si as a,
|
|
4692
|
+
es as c,
|
|
4693
|
+
Ja as i,
|
|
4694
|
+
Lu as n,
|
|
4695
|
+
Hr as o,
|
|
4696
|
+
br as r,
|
|
4697
|
+
Kr as s,
|
|
4691
4698
|
Hc as t
|
|
4692
4699
|
};
|