@konstructio/ui 0.1.2-alpha.98 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (894) hide show
  1. package/README.md +119 -38
  2. package/dist/{AdditionalOptions-UEegkZqG.js → AdditionalOptions-ClcR_Kf7.js} +2 -2
  3. package/dist/AlertDialogTrigger-DqPQznFI.js +109 -0
  4. package/dist/Breadcrumb-DzavonoC.js +93 -0
  5. package/dist/Checkbox-DtgzySMh.js +252 -0
  6. package/dist/CollapsedSteps-CkMuzOHx.js +112 -0
  7. package/dist/{Combination-DFcElBFt.js → Combination-CnMM05mt.js} +51 -45
  8. package/dist/{CommandInput-C45ylYPm.js → CommandInput-BrWqUubG.js} +5 -6
  9. package/dist/Counter-QMbqdFuI.js +229 -0
  10. package/dist/{DayPicker-BQlzb5kH.js → DayPicker-D7KFB2bI.js} +1129 -1081
  11. package/dist/DropdownButton-BTrOG4rh.js +124 -0
  12. package/dist/FlagSelectorList-PTBEUWVJ.js +954 -0
  13. package/dist/{HamburgerTrigger-BzCfBWzH.js → HamburgerTrigger-DKxa6_Nb.js} +27 -28
  14. package/dist/{ImageUpload-DebL0hwF.js → ImageUpload-DZH9bDU2.js} +71 -66
  15. package/dist/Input-C1Js3pbF.js +193 -0
  16. package/dist/Loading-DuhcrPrf.js +25 -0
  17. package/dist/Modal-Bwq7Gc0A.js +84 -0
  18. package/dist/Sidebar.css +1 -1
  19. package/dist/Spinner-DeThqPk_.js +47 -0
  20. package/dist/StepIndicatorContent-C6MILk4c.js +36 -0
  21. package/dist/Switch-DUiaVSnE.js +215 -0
  22. package/dist/Wrapper-BwNyImxO.js +113 -0
  23. package/dist/{Wrapper-w8u2Zn4M.js → Wrapper-CTd3eiq3.js} +278 -267
  24. package/dist/Wrapper-CyjvfERI.js +224 -0
  25. package/dist/assets/icons/components/AllSetCheck.js +27 -0
  26. package/dist/assets/icons/components/Detach.js +20 -0
  27. package/dist/assets/icons/components/InformationFilled.js +20 -0
  28. package/dist/assets/icons/components/Pause.js +20 -0
  29. package/dist/assets/icons/components/SpendStatement.js +70 -0
  30. package/dist/assets/icons/components/Updated.js +20 -0
  31. package/dist/assets/icons/components/index.js +220 -208
  32. package/dist/assets/icons/index.js +220 -208
  33. package/dist/chevron-down-BODx0Q7h.js +14 -0
  34. package/dist/chevron-left-B1zWfqll.js +14 -0
  35. package/dist/chevron-right-D4OkgIIT.js +14 -0
  36. package/dist/chevron-up-B8hiVgxZ.js +14 -0
  37. package/dist/components/Alert/Alert.js +44 -40
  38. package/dist/components/Alert/Alert.variants.js +8 -5
  39. package/dist/components/AlertDialog/AlertDialog.js +42 -42
  40. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  41. package/dist/components/AlertDialog/components/index.js +1 -1
  42. package/dist/components/AlertDialog/hooks/useAlertDialog.js +14 -10
  43. package/dist/components/Autocomplete/Autocomplete.js +5 -5
  44. package/dist/components/Autocomplete/Autocomplete.variants.js +1 -1
  45. package/dist/components/Autocomplete/components/List/List.js +22 -26
  46. package/dist/components/Autocomplete/components/List/List.variants.js +11 -20
  47. package/dist/components/Autocomplete/hooks/useAutocomplete.js +42 -35
  48. package/dist/components/Autocomplete/hooks/useNavigationList.js +4 -4
  49. package/dist/components/Avatar/Avatar.js +37 -0
  50. package/dist/components/Avatar/Avatar.variants.js +25 -0
  51. package/dist/components/Avatar/hooks/index.js +5 -0
  52. package/dist/components/Avatar/hooks/use-gravatar-url.js +25 -0
  53. package/dist/components/AvatarGroup/AvatarGroup.js +40 -0
  54. package/dist/components/Badge/Badge.js +37 -36
  55. package/dist/components/Badge/Badge.variants.js +1 -1
  56. package/dist/components/BadgeGroup/BadgeGroup.js +62 -0
  57. package/dist/components/BadgeGroup/hooks/index.js +4 -0
  58. package/dist/components/BadgeGroup/hooks/use-visible-badge-count/use-visible-badge-count.js +50 -0
  59. package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
  60. package/dist/components/Breadcrumb/Breadcrumb.variants.js +1 -1
  61. package/dist/components/Breadcrumb/components/BackButton/BackButton.js +6 -6
  62. package/dist/components/Breadcrumb/components/BackButton/BackButton.variants.js +1 -1
  63. package/dist/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.js +4 -0
  64. package/dist/components/Breadcrumb/components/Item/Item.js +2 -2
  65. package/dist/components/Breadcrumb/components/Item/Item.variants.js +1 -1
  66. package/dist/components/Breadcrumb/components/index.js +2 -0
  67. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
  68. package/dist/components/Button/Button.js +25 -19
  69. package/dist/components/Button/Button.variants.js +13 -3
  70. package/dist/components/ButtonGroup/ButtonGroup.js +64 -59
  71. package/dist/components/ButtonGroup/ButtonGroup.variants.js +1 -1
  72. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +9 -9
  73. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.variants.js +1 -1
  74. package/dist/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.js +10 -9
  75. package/dist/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.js +8 -6
  76. package/dist/components/Card/Card.js +25 -22
  77. package/dist/components/Card/Card.variants.js +1 -1
  78. package/dist/components/Checkbox/Checkbox.js +1 -1
  79. package/dist/components/Checkbox/Checkbox.variants.js +7 -1
  80. package/dist/components/CheckboxCard/CheckboxCard.js +52 -0
  81. package/dist/components/Collapse/Collapse.js +65 -0
  82. package/dist/components/Command/Command.js +16 -16
  83. package/dist/components/Command/Command.variants.js +1 -1
  84. package/dist/components/Command/components/Command.js +6 -6
  85. package/dist/components/Command/components/CommandEmpty.js +1 -1
  86. package/dist/components/Command/components/CommandGroup.js +2 -2
  87. package/dist/components/Command/components/CommandInput.js +1 -1
  88. package/dist/components/Command/components/CommandItem.js +2 -2
  89. package/dist/components/Command/components/CommandList.js +3 -3
  90. package/dist/components/Command/components/CommandSeparator.js +2 -2
  91. package/dist/components/Command/components/CommandShortcut.js +1 -1
  92. package/dist/components/Command/components/DialogContent.js +8 -8
  93. package/dist/components/Command/components/DialogOverlay.js +8 -8
  94. package/dist/components/Command/components/index.js +6 -6
  95. package/dist/components/Command/contexts/Command.provider.js +16 -12
  96. package/dist/components/ConfirmDialog/ConfirmDialog.js +113 -0
  97. package/dist/components/CopyButton/CopyButton.js +63 -0
  98. package/dist/components/CopyButton/CopyButton.variants.js +34 -0
  99. package/dist/components/CopyButton/hooks/index.js +4 -0
  100. package/dist/components/CopyButton/hooks/useCopyToClipboard/useCopyToClipboard.js +22 -0
  101. package/dist/components/Counter/Counter.js +1 -1
  102. package/dist/components/Counter/Counter.variants.js +82 -17
  103. package/dist/components/DateRangePicker/DateRangePicker.js +53 -41
  104. package/dist/components/DateRangePicker/DateRangePicker.variants.js +6 -7
  105. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.js +56 -54
  106. package/dist/components/DateRangePicker/components/CalendarPanel/CalendarPanel.variants.js +10 -6
  107. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarDivider/CalendarDivider.js +1 -1
  108. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/CalendarMonth.js +23 -31
  109. package/dist/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.js +26 -0
  110. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +57 -58
  111. package/dist/components/DateRangePicker/components/CalendarPanel/components/NavigationButton/NavigationButton.js +3 -3
  112. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +42 -43
  113. package/dist/components/DateRangePicker/components/CalendarPanel/components/index.js +4 -4
  114. package/dist/components/DateRangePicker/components/CalendarPanel/constants/dayPickerClassNames.js +1 -1
  115. package/dist/components/DateRangePicker/components/CalendarPanel/constants/index.js +2 -2
  116. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/index.js +2 -2
  117. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useIndependentCarousel.js +58 -64
  118. package/dist/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.js +65 -80
  119. package/dist/components/DateRangePicker/components/CalendarPanel/utils/index.js +1 -1
  120. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.js +53 -47
  121. package/dist/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.js +28 -13
  122. package/dist/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.js +53 -41
  123. package/dist/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.js +54 -42
  124. package/dist/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.js +107 -138
  125. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.js +68 -34
  126. package/dist/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.js +77 -11
  127. package/dist/components/DateRangePicker/components/RightPanel/RightPanel.js +37 -0
  128. package/dist/components/DateRangePicker/components/index.js +3 -1
  129. package/dist/components/DateRangePicker/constants/index.js +1 -1
  130. package/dist/components/DateRangePicker/constants/presets/presets.js +42 -0
  131. package/dist/components/DateRangePicker/contexts/date-range-picker/date-range-picker.provider.js +124 -0
  132. package/dist/components/DateRangePicker/contexts/index.js +3 -3
  133. package/dist/components/DateRangePicker/utils/disabled-dates/disabled-dates.js +31 -0
  134. package/dist/components/DateRangePicker/utils/displayed-months/displayed-months.js +12 -0
  135. package/dist/components/DateRangePicker/utils/index.js +21 -17
  136. package/dist/components/DateRangePicker/utils/presets/presets.js +5 -0
  137. package/dist/components/DateRangePicker/utils/right-panel/right-panel.js +9 -0
  138. package/dist/components/DateRangePicker/utils/{validation.js → validation/validation.js} +26 -26
  139. package/dist/components/Datepicker/DatePicker.js +14 -50
  140. package/dist/components/Datepicker/DatePicker.variants.js +1 -1
  141. package/dist/components/Datepicker/components/DatePickerContent/DatePickerContent.js +51 -0
  142. package/dist/components/Divider/Divider.js +7 -7
  143. package/dist/components/Divider/Divider.variants.js +1 -1
  144. package/dist/components/Drawer/Drawer.js +96 -66
  145. package/dist/components/Drawer/Drawer.variants.js +44 -22
  146. package/dist/components/Drawer/components/Body/Body.js +1 -1
  147. package/dist/components/Drawer/components/Footer/Footer.js +6 -6
  148. package/dist/components/Drawer/components/Header/Header.js +1 -1
  149. package/dist/components/Drawer/constants/index.js +10 -5
  150. package/dist/components/Drawer/hooks/index.js +4 -2
  151. package/dist/components/Drawer/hooks/useDrawer.js +33 -48
  152. package/dist/components/Drawer/hooks/useSwipeToClose.js +49 -0
  153. package/dist/components/DropdownButton/DropdownButton.js +1 -1
  154. package/dist/components/DropdownButton/components/ActionSheet/ActionSheet.js +36 -0
  155. package/dist/components/Filter/Filter.js +28 -23
  156. package/dist/components/Filter/Filter.variants.js +1 -1
  157. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +63 -66
  158. package/dist/components/Filter/components/BadgeDropdown/hooks/index.js +4 -0
  159. package/dist/components/Filter/components/BadgeDropdown/hooks/useBadgeMultiSelect/useBadgeMultiSelect.js +67 -0
  160. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/CustomDateRangeFilterDropdown.js +10 -0
  161. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Actions/Actions.js +77 -0
  162. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/PanelActions/PanelActions.js +23 -0
  163. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Picker/Picker.js +34 -0
  164. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Trigger/Trigger.js +22 -0
  165. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/Wrapper/Wrapper.js +22 -0
  166. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/components/index.js +4 -0
  167. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/constants/index.js +5 -0
  168. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/constants/presets/presets.js +33 -0
  169. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.context.js +5 -0
  170. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.hook.js +10 -0
  171. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.provider.js +149 -0
  172. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/contexts/index.js +6 -0
  173. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/index.js +20 -0
  174. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useAppliedDateRange/useAppliedDateRange.js +20 -0
  175. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useCalendarVisibility/useCalendarVisibility.js +24 -0
  176. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useDateRangeSelection/useDateRangeSelection.js +22 -0
  177. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFilterDropdownOpenState/useFilterDropdownOpenState.js +18 -0
  178. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFormattedDateRange/useFormattedDateRange.js +28 -0
  179. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePendingDateRange/usePendingDateRange.js +15 -0
  180. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePresetOptions/usePresetOptions.js +22 -0
  181. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useResetKey/useResetKey.js +10 -0
  182. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useSelectedPreset/useSelectedPreset.js +24 -0
  183. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/utils/duration/duration.js +59 -0
  184. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/utils/index.js +8 -0
  185. package/dist/components/Filter/components/CustomDateRangeFilterDropdown/utils/whole-days/whole-days.js +7 -0
  186. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +41 -46
  187. package/dist/components/Filter/components/DateFilterDropdown/hooks/index.js +4 -0
  188. package/dist/components/Filter/components/DateFilterDropdown/hooks/useDateFilterDropdown/useDateFilterDropdown.js +37 -0
  189. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.js +45 -51
  190. package/dist/components/Filter/components/DateRangeFilterDropdown/hooks/index.js +4 -0
  191. package/dist/components/Filter/components/DateRangeFilterDropdown/hooks/useDateRangeFilterDropdown/useDateRangeFilterDropdown.js +49 -0
  192. package/dist/components/Filter/components/FilterDropdown/FilterDropdown.js +28 -0
  193. package/dist/components/Filter/components/ResetButton/ResetButton.js +20 -17
  194. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +62 -65
  195. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.js +72 -77
  196. package/dist/components/Filter/components/TimeFilterDropdown/hooks/index.js +4 -0
  197. package/dist/components/Filter/components/TimeFilterDropdown/hooks/useTimeFilterDropdown/useTimeFilterDropdown.js +39 -0
  198. package/dist/components/Filter/components/index.js +12 -10
  199. package/dist/components/Filter/contexts/filter.provider.js +15 -7
  200. package/dist/components/Filter/events/index.js +26 -5
  201. package/dist/components/Filter/hooks/index.js +6 -0
  202. package/dist/components/Filter/hooks/useFilterDropdownSync.js +26 -0
  203. package/dist/components/Filter/hooks/useLocale.js +16 -0
  204. package/dist/components/Filter/utils/index.js +6 -2
  205. package/dist/components/ImageUpload/ImageUpload.js +1 -1
  206. package/dist/components/ImageUpload/ImageUpload.variants.js +1 -1
  207. package/dist/components/Input/Input.js +1 -1
  208. package/dist/components/Input/Input.variants.js +2 -1
  209. package/dist/components/LineChart/LineChart.js +18 -125
  210. package/dist/components/LineChart/components/LineChartContent/LineChartContent.js +127 -0
  211. package/dist/components/Loading/Loading.js +1 -1
  212. package/dist/components/Loading/Loading.variants.js +1 -1
  213. package/dist/components/Modal/Modal.js +1 -1
  214. package/dist/components/Modal/components/Body/Body.js +2 -2
  215. package/dist/components/Modal/components/Footer/Footer.js +2 -2
  216. package/dist/components/Modal/components/Header/Header.js +2 -2
  217. package/dist/components/Modal/components/Wrapper/Wrapper.js +1 -1
  218. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +12 -6
  219. package/dist/components/Modal/components/index.js +1 -1
  220. package/dist/components/Modal/contexts/Modal.provider.js +26 -19
  221. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.js +1 -1
  222. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.variants.js +23 -4
  223. package/dist/components/MultiSelectDropdown/components/Item/Item.js +6 -6
  224. package/dist/components/MultiSelectDropdown/components/Item/Item.variants.js +5 -2
  225. package/dist/components/MultiSelectDropdown/components/List/List.js +1 -1
  226. package/dist/components/MultiSelectDropdown/components/List/List.variants.js +1 -1
  227. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.js +1 -1
  228. package/dist/components/MultiSelectDropdown/components/index.js +1 -1
  229. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.context.js +4 -3
  230. package/dist/components/MultiSelectDropdown/contexts/MultiSelectDropdown.provider.js +75 -72
  231. package/dist/components/MultiSelectDropdown/hooks/useMultiSelectDropdown.js +16 -15
  232. package/dist/components/OtpInput/OtpInput.js +103 -0
  233. package/dist/components/PasswordRules/PasswordRules.js +51 -0
  234. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +39 -10
  235. package/dist/components/PhoneNumberInput/PhoneNumberInput.variants.js +1 -1
  236. package/dist/components/PhoneNumberInput/components/FlagContent/FlagContent.js +9 -7
  237. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +1 -1
  238. package/dist/components/PhoneNumberInput/components/FlagSelectorWrapper/FlagSelectorWrapper.js +15 -15
  239. package/dist/components/PhoneNumberInput/components/PhoneNumberInputContent.js +15 -0
  240. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +16 -16
  241. package/dist/components/PhoneNumberInput/components/Wrapper.js +1 -1
  242. package/dist/components/PhoneNumberInput/components/index.js +2 -2
  243. package/dist/components/PhoneNumberInput/contexts/index.js +1 -1
  244. package/dist/components/PhoneNumberInput/contexts/phone-number.provider.js +1 -1
  245. package/dist/components/PhoneNumberInput/utils/index.js +1 -1
  246. package/dist/components/PieChart/PieChart.js +9 -48
  247. package/dist/components/PieChart/components/PieChartContent/PieChartContent.js +56 -0
  248. package/dist/components/ProgressBar/ProgressBar.js +27 -21
  249. package/dist/components/ProgressBar/ProgressBar.variants.js +1 -1
  250. package/dist/components/Radio/Radio.js +34 -35
  251. package/dist/components/Radio/Radio.variants.js +12 -5
  252. package/dist/components/RadioCard/RadioCard.js +37 -19
  253. package/dist/components/RadioCard/RadioCard.variants.js +9 -3
  254. package/dist/components/RadioCardGroup/RadioCardGroup.js +18 -18
  255. package/dist/components/RadioCardGroup/RadioCardGroup.variants.js +1 -1
  256. package/dist/components/RadioGroup/RadioGroup.js +24 -24
  257. package/dist/components/RadioGroup/RadioGroup.variants.js +1 -1
  258. package/dist/components/Range/Range.js +29 -27
  259. package/dist/components/Range/Range.variants.js +1 -1
  260. package/dist/components/Select/Select.js +44 -36
  261. package/dist/components/Select/Select.variants.js +3 -1
  262. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.js +1 -1
  263. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.variants.js +3 -3
  264. package/dist/components/Select/components/List/List.js +76 -65
  265. package/dist/components/Select/components/List/List.variants.js +1 -1
  266. package/dist/components/Select/components/ListItem/ListItem.js +30 -30
  267. package/dist/components/Select/components/ListItem/ListItem.variants.js +6 -3
  268. package/dist/components/Select/components/Wrapper.js +1 -1
  269. package/dist/components/Select/components/index.js +8 -8
  270. package/dist/components/Select/contexts/select.provider.js +34 -33
  271. package/dist/components/Select/hooks/useNavigationList.js +2 -3
  272. package/dist/components/Select/hooks/useSelect.js +36 -46
  273. package/dist/components/Sheet/Sheet.js +174 -0
  274. package/dist/components/Sheet/utils/index.js +10 -0
  275. package/dist/components/Sidebar/Sidebar.js +27 -24
  276. package/dist/components/Sidebar/Sidebar.variants.js +1 -1
  277. package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.js +30 -0
  278. package/dist/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.js +22 -0
  279. package/dist/components/Sidebar/components/Footer/Footer.js +1 -1
  280. package/dist/components/Sidebar/components/Footer/Footer.variants.js +1 -1
  281. package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.js +1 -1
  282. package/dist/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.variants.js +1 -1
  283. package/dist/components/Sidebar/components/Label/Label.js +6 -6
  284. package/dist/components/Sidebar/components/Logo/Logo.js +14 -10
  285. package/dist/components/Sidebar/components/Logo/Logo.variants.js +14 -4
  286. package/dist/components/Sidebar/components/Navigation/Navigation.js +5 -5
  287. package/dist/components/Sidebar/components/Navigation/Navigation.variants.js +1 -1
  288. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.js +33 -17
  289. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.variants.js +1 -1
  290. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.js +68 -40
  291. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.variants.js +18 -11
  292. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.js +1 -1
  293. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.variants.js +1 -1
  294. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +25 -8
  295. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.js +16 -1
  296. package/dist/components/Sidebar/components/Wrapper/Wrapper.js +114 -84
  297. package/dist/components/Sidebar/components/index.js +16 -14
  298. package/dist/components/Sidebar/contexts/SidebarContext.js +8 -5
  299. package/dist/components/Skeleton/Skeleton.js +18 -0
  300. package/dist/components/Skeleton/Skeleton.variants.js +25 -0
  301. package/dist/components/Slider/Slider.js +21 -19
  302. package/dist/components/Slider/Slider.variants.js +1 -1
  303. package/dist/components/Spinner/Spinner.js +3 -2
  304. package/dist/components/Spinner/Spinner.variants.js +1 -1
  305. package/dist/components/Stepper/Stepper.js +38 -29
  306. package/dist/components/Stepper/Stepper.variants.js +62 -26
  307. package/dist/components/Stepper/components/HorizontalStepItem/HorizontalStepItem.js +18 -18
  308. package/dist/components/Stepper/components/StepConnector/StepConnector.js +1 -1
  309. package/dist/components/Stepper/components/StepIndicatorContent/StepIndicatorContent.js +1 -1
  310. package/dist/components/Stepper/components/VerticalStepItem/VerticalStepItem.js +15 -15
  311. package/dist/components/Stepper/hooks/useStepItemLogic.js +12 -17
  312. package/dist/components/Switch/Switch.js +1 -1
  313. package/dist/components/Switch/Switch.variants.js +20 -8
  314. package/dist/components/Table/Table.js +1 -1
  315. package/dist/components/Table/Table.variants.js +7 -6
  316. package/dist/components/Table/components/Body.js +1 -1
  317. package/dist/components/Table/components/Filter.js +1 -1
  318. package/dist/components/Table/components/Head.js +1 -1
  319. package/dist/components/Table/components/Row.js +1 -1
  320. package/dist/components/Tabs/Tabs.js +52 -24
  321. package/dist/components/Tabs/Tabs.variants.js +21 -9
  322. package/dist/components/Tabs/components/Content.js +5 -5
  323. package/dist/components/Tabs/components/List.js +11 -11
  324. package/dist/components/Tabs/components/Trigger.js +15 -14
  325. package/dist/components/Tag/Tag.js +9 -9
  326. package/dist/components/Tag/Tag.variants.js +18 -18
  327. package/dist/components/TagSelect/TagSelect.js +1 -1
  328. package/dist/components/TagSelect/TagSelect.variants.js +1 -1
  329. package/dist/components/TagSelect/components/Item/Item.js +4 -4
  330. package/dist/components/TagSelect/components/Item/Item.variants.js +6 -4
  331. package/dist/components/TagSelect/components/List/List.js +5 -5
  332. package/dist/components/TagSelect/components/List/List.variants.js +1 -1
  333. package/dist/components/TagSelect/components/Wrapper/Wrapper.js +1 -1
  334. package/dist/components/TagSelect/components/index.js +6 -6
  335. package/dist/components/TagSelect/hooks/useTagSelect.js +15 -14
  336. package/dist/components/TagsInput/TagsInput.js +159 -0
  337. package/dist/components/TextArea/TextArea.js +71 -26
  338. package/dist/components/TextArea/TextArea.variants.js +50 -13
  339. package/dist/components/TimePicker/TimePicker.variants.js +8 -5
  340. package/dist/components/TimePicker/components/HoursList/HoursList.js +26 -28
  341. package/dist/components/TimePicker/components/MeridianList/MeridianList.js +26 -30
  342. package/dist/components/TimePicker/components/MinutesList/MinutesList.js +34 -34
  343. package/dist/components/TimePicker/components/Wrapper/Wrapper.js +113 -102
  344. package/dist/components/TimePicker/components/WrapperList/WrapperList.js +28 -28
  345. package/dist/components/TimePicker/contexts/time-picker.provider.js +10 -10
  346. package/dist/components/Toast/Toast.js +69 -2
  347. package/dist/components/Toast/Toast.variants.js +89 -41
  348. package/dist/components/Toast/ToastProvider.js +19 -0
  349. package/dist/components/Toast/components/ToastCard/ToastCard.js +121 -0
  350. package/dist/components/Toast/components/index.js +4 -0
  351. package/dist/components/Toast/constants/index.js +41 -0
  352. package/dist/components/Toast/contexts/index.js +4 -0
  353. package/dist/components/Toast/contexts/toast-store.context.js +5 -0
  354. package/dist/components/Toast/hooks/index.js +15 -0
  355. package/dist/components/Toast/hooks/useStackExpansion/useStackExpansion.js +45 -0
  356. package/dist/components/Toast/hooks/useToast/useToast.js +17 -0
  357. package/dist/components/Toast/hooks/useToastHeights/useToastHeights.js +23 -0
  358. package/dist/components/Toast/hooks/useToastSource/useToastSource.js +15 -0
  359. package/dist/components/Toast/hooks/useToastStore/useToastStore.js +11 -0
  360. package/dist/components/Toast/hooks/useToastTimer/useToastTimer.js +26 -0
  361. package/dist/components/Toast/store/create-toast-store.js +46 -0
  362. package/dist/components/Toast/store/default-toast-store.js +5 -0
  363. package/dist/components/Toast/store/index.js +6 -0
  364. package/dist/components/Toast/utils/compute-stack-layout/compute-stack-layout.js +24 -0
  365. package/dist/components/Toast/utils/index.js +6 -0
  366. package/dist/components/Toast/utils/should-dismiss-swipe/should-dismiss-swipe.js +5 -0
  367. package/dist/components/Tooltip/Tooltip.js +32 -16
  368. package/dist/components/Typography/Typography.js +19 -16
  369. package/dist/components/Typography/Typography.variants.js +1 -1
  370. package/dist/components/VirtualizedTable/VirtualizedTable.js +40 -94
  371. package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +1 -1
  372. package/dist/components/VirtualizedTable/components/Actions/Actions.js +5 -35
  373. package/dist/components/VirtualizedTable/components/Actions/Actions.variants.js +83 -0
  374. package/dist/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.js +51 -0
  375. package/dist/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.js +26 -0
  376. package/dist/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.js +81 -0
  377. package/dist/components/VirtualizedTable/components/Actions/components/InlineActions/constants/index.js +5 -0
  378. package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.js +48 -0
  379. package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/constants/index.js +5 -0
  380. package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/index.js +4 -0
  381. package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-actions-menu/use-actions-menu.js +44 -0
  382. package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.js +78 -0
  383. package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-keyboard-navigation/use-menu-keyboard-navigation.js +56 -0
  384. package/dist/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-row-highlight/use-row-highlight.js +13 -0
  385. package/dist/components/VirtualizedTable/components/Body/Body.js +54 -49
  386. package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +3 -3
  387. package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +67 -21
  388. package/dist/components/VirtualizedTable/components/EmptyResults/EmptyResults.js +30 -0
  389. package/dist/components/VirtualizedTable/components/EmptyState/EmptyState.js +32 -0
  390. package/dist/components/VirtualizedTable/components/ErrorState/ErrorState.js +35 -0
  391. package/dist/components/VirtualizedTable/components/ExpandableRow/ExpandableRow.js +2 -2
  392. package/dist/components/VirtualizedTable/components/Filter/Filter.js +95 -90
  393. package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +14 -14
  394. package/dist/components/VirtualizedTable/components/Header/Header.js +55 -35
  395. package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +18 -14
  396. package/dist/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.js +75 -0
  397. package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +44 -37
  398. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +46 -39
  399. package/dist/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.js +91 -0
  400. package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +9 -8
  401. package/dist/components/VirtualizedTable/components/index.js +20 -12
  402. package/dist/components/VirtualizedTable/constants/index.js +5 -3
  403. package/dist/components/VirtualizedTable/constants/responsive.js +10 -0
  404. package/dist/components/VirtualizedTable/contexts/index.js +6 -6
  405. package/dist/components/VirtualizedTable/contexts/table.context.js +6 -0
  406. package/dist/components/VirtualizedTable/contexts/table.provider.js +1 -1
  407. package/dist/components/VirtualizedTable/events/filters/filters.js +7 -0
  408. package/dist/components/VirtualizedTable/events/index.js +10 -25
  409. package/dist/components/VirtualizedTable/events/refresh/refresh.js +7 -0
  410. package/dist/components/VirtualizedTable/events/row/row.js +22 -0
  411. package/dist/components/VirtualizedTable/hooks/index.js +4 -0
  412. package/dist/components/VirtualizedTable/hooks/useVirtualizedTableReady/index.js +4 -0
  413. package/dist/components/VirtualizedTable/hooks/useVirtualizedTableReady/useVirtualizedTableReady.js +12 -0
  414. package/dist/components/VirtualizedTable/utils/get-table-id.js +4 -0
  415. package/dist/components/VirtualizedTable/utils/index.js +16 -0
  416. package/dist/components/VirtualizedTable/utils/load-content/index.js +8 -0
  417. package/dist/components/VirtualizedTable/utils/load-content/load-content.js +15 -0
  418. package/dist/components/VirtualizedTable/utils/pagination.js +5 -0
  419. package/dist/components/VirtualizedTable/utils/pinned-columns/index.js +6 -0
  420. package/dist/components/VirtualizedTable/utils/pinned-columns/pinned-columns.js +32 -0
  421. package/dist/components/index.js +188 -133
  422. package/dist/components-DE5uBcFF.js +147 -0
  423. package/dist/constants-q2QnJrOb.js +31 -0
  424. package/dist/contexts/index.js +1 -1
  425. package/dist/contexts/theme.provider.js +1 -1
  426. package/dist/{utils-Cc9GhtYC.js → country-locale-map-BQYYErun.js} +1398 -1399
  427. package/dist/createLucideIcon-C7E_xycG.js +119 -0
  428. package/dist/{debounce-B55BpO1u.js → debounce-DhCY9mXz.js} +17 -17
  429. package/dist/dist-B9GE4SXf.js +34 -0
  430. package/dist/{dist-BHslNQd82.js → dist-BCqfbYE9.js} +1414 -1370
  431. package/dist/dist-BbJP2Efh.js +20 -0
  432. package/dist/dist-Bg6GCX6S.js +465 -0
  433. package/dist/dist-Bh7M0KDN.js +367 -0
  434. package/dist/dist-C0OhTLFV.js +31 -0
  435. package/dist/dist-CK8FUUUn.js +125 -0
  436. package/dist/dist-CYuWoi9I.js +46 -0
  437. package/dist/dist-C_jtUTU9.js +30 -0
  438. package/dist/dist-D0f-mfFj.js +445 -0
  439. package/dist/dist-D52tGbv9.js +1327 -0
  440. package/dist/dist-DPLBSjtu.js +196 -0
  441. package/dist/dist-DWopnVS-.js +209 -0
  442. package/dist/dist-DbeY0Pzx.js +228 -0
  443. package/dist/dist-DeWnSzlM.js +120 -0
  444. package/dist/{dist-CPK4FXV9.js → dist-Dofpb42k.js} +54 -54
  445. package/dist/dist-DsOk4psA.js +365 -0
  446. package/dist/dist-pyzG_Btt.js +195 -0
  447. package/dist/dist-rsFD9q_X.js +484 -0
  448. package/dist/dist-uuWgjOcO.js +99 -0
  449. package/dist/dist-vDSmnSS_.js +41 -0
  450. package/dist/ellipsis-vertical-C_yX7aQe.js +31 -0
  451. package/dist/es2015-B4px8XhV.js +796 -0
  452. package/dist/es2015-ChhQTsb4.js +74 -0
  453. package/dist/events.types-BG1Uh8i6.js +6 -0
  454. package/dist/hooks/index.js +8 -4
  455. package/dist/hooks/useClickOutside.js +14 -0
  456. package/dist/hooks/useIsHydrated/useIsHydrated.js +6 -0
  457. package/dist/hooks/useIsHydrated/utils/index.js +4 -0
  458. package/dist/hooks/useIsHydrated/utils/noop-subscribe/noop-subscribe.js +5 -0
  459. package/dist/hooks/useMediaQuery.js +1 -1
  460. package/dist/icons.js +218 -206
  461. package/dist/index.js +209 -150
  462. package/dist/{isObject-CGNJbB5a.js → isSymbol-CcfkyZfq.js} +20 -20
  463. package/dist/lib/assets/icons/components/AllSetCheck.d.ts +3 -0
  464. package/dist/lib/assets/icons/components/Detach.d.ts +3 -0
  465. package/dist/lib/assets/icons/components/InformationFilled.d.ts +3 -0
  466. package/dist/lib/assets/icons/components/Pause.d.ts +3 -0
  467. package/dist/lib/assets/icons/components/SpendStatement.d.ts +3 -0
  468. package/dist/lib/assets/icons/components/Updated.d.ts +3 -0
  469. package/dist/lib/assets/icons/components/index.d.ts +6 -0
  470. package/dist/lib/components/Alert/Alert.types.d.ts +5 -1
  471. package/dist/lib/components/AlertDialog/AlertDialog.types.d.ts +1 -1
  472. package/dist/lib/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +2 -2
  473. package/dist/lib/components/Autocomplete/Autocomplete.types.d.ts +1 -1
  474. package/dist/lib/components/Autocomplete/components/List/List.variants.d.ts +0 -1
  475. package/dist/lib/components/Avatar/Avatar.d.ts +14 -0
  476. package/dist/lib/components/Avatar/Avatar.types.d.ts +21 -0
  477. package/dist/lib/components/Avatar/Avatar.variants.d.ts +3 -0
  478. package/dist/lib/components/Avatar/hooks/index.d.ts +1 -0
  479. package/dist/lib/components/Avatar/hooks/use-gravatar-url.d.ts +2 -0
  480. package/dist/lib/components/AvatarGroup/AvatarGroup.d.ts +16 -0
  481. package/dist/lib/components/AvatarGroup/AvatarGroup.types.d.ts +19 -0
  482. package/dist/lib/components/BadgeGroup/BadgeGroup.d.ts +15 -0
  483. package/dist/lib/components/BadgeGroup/BadgeGroup.types.d.ts +25 -0
  484. package/dist/lib/components/BadgeGroup/hooks/index.d.ts +1 -0
  485. package/dist/lib/components/BadgeGroup/hooks/use-visible-badge-count/use-visible-badge-count.d.ts +2 -0
  486. package/dist/lib/components/BadgeGroup/hooks/use-visible-badge-count/use-visible-badge-count.types.d.ts +10 -0
  487. package/dist/lib/components/Breadcrumb/Breadcrumb.types.d.ts +5 -1
  488. package/dist/lib/components/Breadcrumb/components/BackButton/BackButton.types.d.ts +1 -1
  489. package/dist/lib/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.d.ts +3 -0
  490. package/dist/lib/components/Breadcrumb/components/CollapsedSteps/CollapsedSteps.types.d.ts +5 -0
  491. package/dist/lib/components/Breadcrumb/components/Item/Item.types.d.ts +1 -1
  492. package/dist/lib/components/Breadcrumb/components/index.d.ts +1 -0
  493. package/dist/lib/components/Button/Button.types.d.ts +1 -1
  494. package/dist/lib/components/Button/Button.variants.d.ts +1 -1
  495. package/dist/lib/components/ButtonGroup/ButtonGroup.types.d.ts +1 -1
  496. package/dist/lib/components/ButtonGroup/components/ButtonGroupLabel/ButtonGroupLabel.types.d.ts +1 -1
  497. package/dist/lib/components/ButtonGroup/components/ButtonGroupMessage/ButtonGroupMessage.types.d.ts +2 -0
  498. package/dist/lib/components/Card/Card.types.d.ts +2 -1
  499. package/dist/lib/components/Checkbox/Checkbox.d.ts +1 -1
  500. package/dist/lib/components/Checkbox/Checkbox.types.d.ts +3 -2
  501. package/dist/lib/components/CheckboxCard/CheckboxCard.d.ts +20 -0
  502. package/dist/lib/components/CheckboxCard/CheckboxCard.types.d.ts +13 -0
  503. package/dist/lib/components/Collapse/Collapse.d.ts +19 -0
  504. package/dist/lib/components/Collapse/Collapse.types.d.ts +17 -0
  505. package/dist/lib/components/Command/Command.types.d.ts +1 -1
  506. package/dist/lib/components/Command/components/CommandShortcut.d.ts +1 -1
  507. package/dist/lib/components/Command/contexts/Command.provider.d.ts +1 -1
  508. package/dist/lib/components/ConfirmDialog/ConfirmDialog.d.ts +23 -0
  509. package/dist/lib/components/ConfirmDialog/ConfirmDialog.types.d.ts +48 -0
  510. package/dist/lib/components/CopyButton/CopyButton.d.ts +4 -0
  511. package/dist/lib/components/CopyButton/CopyButton.types.d.ts +15 -0
  512. package/dist/lib/components/CopyButton/CopyButton.variants.d.ts +3 -0
  513. package/dist/lib/components/CopyButton/hooks/index.d.ts +1 -0
  514. package/dist/lib/components/CopyButton/hooks/useCopyToClipboard/useCopyToClipboard.d.ts +5 -0
  515. package/dist/lib/components/CopyButton/hooks/useCopyToClipboard/useCopyToClipboard.types.d.ts +5 -0
  516. package/dist/lib/components/Counter/Counter.d.ts +7 -4
  517. package/dist/lib/components/Counter/Counter.types.d.ts +26 -1
  518. package/dist/lib/components/Counter/Counter.variants.d.ts +10 -1
  519. package/dist/lib/components/DateRangePicker/DateRangePicker.types.d.ts +61 -4
  520. package/dist/lib/components/DateRangePicker/DateRangePicker.variants.d.ts +6 -0
  521. package/dist/lib/components/DateRangePicker/components/CalendarPanel/components/CalendarMonth/components/CalendarMonthContent/CalendarMonthContent.d.ts +3 -0
  522. package/dist/lib/components/DateRangePicker/components/CalendarPanel/hooks/useTogetherCarousel.d.ts +2 -1
  523. package/dist/lib/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.types.d.ts +5 -4
  524. package/dist/lib/components/DateRangePicker/components/DateTimeInputs/DateTimeInputs.variants.d.ts +8 -1
  525. package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/EndInputFields/EndInputFields.types.d.ts +6 -1
  526. package/dist/lib/components/DateRangePicker/components/DateTimeInputs/components/StartInputFields/StartInputFields.types.d.ts +6 -1
  527. package/dist/lib/components/DateRangePicker/components/DateTimeInputs/hooks/useDateTimeInputs.d.ts +2 -4
  528. package/dist/lib/components/DateRangePicker/components/PresetPanel/PresetPanel.types.d.ts +4 -0
  529. package/dist/lib/components/DateRangePicker/components/PresetPanel/PresetPanel.variants.d.ts +38 -1
  530. package/dist/lib/components/DateRangePicker/components/RightPanel/RightPanel.d.ts +8 -0
  531. package/dist/lib/components/DateRangePicker/components/RightPanel/RightPanel.types.d.ts +4 -0
  532. package/dist/lib/components/DateRangePicker/components/index.d.ts +1 -0
  533. package/dist/lib/components/DateRangePicker/constants/index.d.ts +2 -1
  534. package/dist/lib/components/DateRangePicker/constants/presets/presets.d.ts +10 -0
  535. package/dist/lib/components/DateRangePicker/constants/presets/presets.types.d.ts +6 -0
  536. package/dist/lib/components/DateRangePicker/contexts/{date-range-picker.context.d.ts → date-range-picker/date-range-picker.context.d.ts} +34 -5
  537. package/dist/lib/components/DateRangePicker/contexts/date-range-picker/date-range-picker.provider.d.ts +3 -0
  538. package/dist/lib/components/DateRangePicker/contexts/{date-range-picker.provider.d.ts → date-range-picker/date-range-picker.types.d.ts} +20 -18
  539. package/dist/lib/components/DateRangePicker/contexts/index.d.ts +4 -4
  540. package/dist/lib/components/DateRangePicker/utils/{disabled-dates.d.ts → disabled-dates/disabled-dates.d.ts} +1 -7
  541. package/dist/lib/components/DateRangePicker/utils/disabled-dates/disabled-dates.types.d.ts +7 -0
  542. package/dist/lib/components/DateRangePicker/utils/displayed-months/displayed-months.d.ts +12 -0
  543. package/dist/lib/components/DateRangePicker/utils/index.d.ts +7 -4
  544. package/dist/lib/components/DateRangePicker/utils/presets/presets.d.ts +9 -0
  545. package/dist/lib/components/DateRangePicker/utils/right-panel/right-panel.d.ts +7 -0
  546. package/dist/lib/components/Datepicker/components/DatePickerContent/DatePickerContent.d.ts +3 -0
  547. package/dist/lib/components/Divider/Divider.d.ts +3 -2
  548. package/dist/lib/components/Divider/Divider.types.d.ts +4 -0
  549. package/dist/lib/components/Drawer/Drawer.types.d.ts +15 -1
  550. package/dist/lib/components/Drawer/Drawer.variants.d.ts +1 -0
  551. package/dist/lib/components/Drawer/constants/index.d.ts +5 -0
  552. package/dist/lib/components/Drawer/hooks/index.d.ts +2 -0
  553. package/dist/lib/components/Drawer/hooks/useDrawer.types.d.ts +6 -2
  554. package/dist/lib/components/Drawer/hooks/useSwipeToClose.d.ts +2 -0
  555. package/dist/lib/components/Drawer/hooks/useSwipeToClose.types.d.ts +17 -0
  556. package/dist/lib/components/DropdownButton/DropdownButton.d.ts +6 -6
  557. package/dist/lib/components/DropdownButton/DropdownButton.types.d.ts +44 -0
  558. package/dist/lib/components/DropdownButton/components/ActionSheet/ActionSheet.d.ts +7 -0
  559. package/dist/lib/components/DropdownButton/components/ActionSheet/ActionSheet.types.d.ts +15 -0
  560. package/dist/lib/components/Filter/Filter.d.ts +2 -2
  561. package/dist/lib/components/Filter/Filter.types.d.ts +5 -2
  562. package/dist/lib/components/Filter/components/BadgeDropdown/BadgeMultiSelect.d.ts +2 -2
  563. package/dist/lib/components/Filter/components/BadgeDropdown/BadgeMultiSelect.types.d.ts +1 -1
  564. package/dist/lib/components/Filter/components/BadgeDropdown/hooks/index.d.ts +1 -0
  565. package/dist/lib/components/Filter/components/BadgeDropdown/{BadgeMultiSelect.hook.d.ts → hooks/useBadgeMultiSelect/useBadgeMultiSelect.d.ts} +4 -5
  566. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/CustomDateRangeFilterDropdown.d.ts +3 -0
  567. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/CustomDateRangeFilterDropdown.types.d.ts +55 -0
  568. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/Actions/Actions.d.ts +2 -0
  569. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/PanelActions/PanelActions.d.ts +2 -0
  570. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/Picker/Picker.d.ts +2 -0
  571. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/Trigger/Trigger.d.ts +2 -0
  572. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/Wrapper/Wrapper.d.ts +2 -0
  573. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/components/index.d.ts +1 -0
  574. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/constants/index.d.ts +2 -0
  575. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/constants/presets/presets.d.ts +4 -0
  576. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/constants/presets/presets.types.d.ts +9 -0
  577. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.context.d.ts +2 -0
  578. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.hook.d.ts +1 -0
  579. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.provider.d.ts +3 -0
  580. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/contexts/custom-date-range-filter-dropdown/custom-date-range-filter-dropdown.types.d.ts +28 -0
  581. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/contexts/index.d.ts +2 -0
  582. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/index.d.ts +9 -0
  583. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useAppliedDateRange/useAppliedDateRange.d.ts +7 -0
  584. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useAppliedDateRange/useAppliedDateRange.types.d.ts +5 -0
  585. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useCalendarVisibility/useCalendarVisibility.d.ts +10 -0
  586. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useCalendarVisibility/useCalendarVisibility.types.d.ts +4 -0
  587. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useDateRangeSelection/useDateRangeSelection.d.ts +8 -0
  588. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useDateRangeSelection/useDateRangeSelection.types.d.ts +4 -0
  589. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFilterDropdownOpenState/useFilterDropdownOpenState.d.ts +6 -0
  590. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFormattedDateRange/useFormattedDateRange.d.ts +11 -0
  591. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useFormattedDateRange/useFormattedDateRange.types.d.ts +5 -0
  592. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePendingDateRange/usePendingDateRange.d.ts +5 -0
  593. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePendingDateRange/usePendingDateRange.types.d.ts +5 -0
  594. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePresetOptions/usePresetOptions.d.ts +2 -0
  595. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/usePresetOptions/usePresetOptions.types.d.ts +6 -0
  596. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useResetKey/useResetKey.d.ts +1 -0
  597. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useSelectedPreset/useSelectedPreset.d.ts +10 -0
  598. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/hooks/useSelectedPreset/useSelectedPreset.types.d.ts +4 -0
  599. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/utils/duration/duration.d.ts +4 -0
  600. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/utils/duration/duration.types.d.ts +5 -0
  601. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/utils/index.d.ts +3 -0
  602. package/dist/lib/components/Filter/components/CustomDateRangeFilterDropdown/utils/whole-days/whole-days.d.ts +2 -0
  603. package/dist/lib/components/Filter/components/DateFilterDropdown/DateFilterDropdown.d.ts +2 -2
  604. package/dist/lib/components/Filter/components/DateFilterDropdown/DateFilterDropdown.types.d.ts +1 -1
  605. package/dist/lib/components/Filter/components/DateFilterDropdown/hooks/index.d.ts +1 -0
  606. package/dist/lib/components/Filter/components/DateFilterDropdown/{DateFilterDropdown.hook.d.ts → hooks/useDateFilterDropdown/useDateFilterDropdown.d.ts} +3 -4
  607. package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.d.ts +2 -2
  608. package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.types.d.ts +2 -2
  609. package/dist/lib/components/Filter/components/DateRangeFilterDropdown/hooks/index.d.ts +1 -0
  610. package/dist/lib/components/Filter/components/DateRangeFilterDropdown/hooks/useDateRangeFilterDropdown/useDateRangeFilterDropdown.d.ts +12 -0
  611. package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.d.ts +3 -0
  612. package/dist/lib/components/Filter/components/FilterDropdown/FilterDropdown.types.d.ts +9 -0
  613. package/dist/lib/components/Filter/components/ResetButton/ResetButton.d.ts +2 -2
  614. package/dist/lib/components/Filter/components/ResetButton/ResetButton.types.d.ts +2 -2
  615. package/dist/lib/components/Filter/components/TextMultiSelect/TextMultiSelect.d.ts +2 -2
  616. package/dist/lib/components/Filter/components/TextMultiSelect/TextMultiSelect.types.d.ts +1 -1
  617. package/dist/lib/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.d.ts +2 -2
  618. package/dist/lib/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.types.d.ts +1 -1
  619. package/dist/lib/components/Filter/components/TimeFilterDropdown/hooks/index.d.ts +1 -0
  620. package/dist/lib/components/Filter/components/TimeFilterDropdown/{TimeFilterDropdown.hook.d.ts → hooks/useTimeFilterDropdown/useTimeFilterDropdown.d.ts} +3 -4
  621. package/dist/lib/components/Filter/components/index.d.ts +8 -6
  622. package/dist/lib/components/Filter/contexts/filter.context.d.ts +2 -0
  623. package/dist/lib/components/Filter/events/index.d.ts +10 -2
  624. package/dist/lib/components/Filter/hooks/index.d.ts +2 -0
  625. package/dist/lib/components/Filter/hooks/useFilterDropdownSync.d.ts +2 -0
  626. package/dist/lib/components/Filter/hooks/useFilterDropdownSync.types.d.ts +5 -0
  627. package/dist/lib/components/Filter/hooks/useLocale.d.ts +1 -0
  628. package/dist/lib/components/Filter/utils/index.d.ts +1 -0
  629. package/dist/lib/components/ImageUpload/ImageUpload.d.ts +1 -1
  630. package/dist/lib/components/ImageUpload/ImageUpload.types.d.ts +1 -1
  631. package/dist/lib/components/Input/Input.types.d.ts +5 -1
  632. package/dist/lib/components/LineChart/LineChart.types.d.ts +1 -1
  633. package/dist/lib/components/LineChart/components/LineChartContent/LineChartContent.d.ts +3 -0
  634. package/dist/lib/components/Loading/Loading.types.d.ts +1 -1
  635. package/dist/lib/components/Modal/Modal.types.d.ts +10 -2
  636. package/dist/lib/components/Modal/components/Wrapper/Wrapper.types.d.ts +6 -1
  637. package/dist/lib/components/Modal/contexts/Modal.provider.d.ts +1 -1
  638. package/dist/lib/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +12 -0
  639. package/dist/lib/components/MultiSelectDropdown/MultiSelectDropdown.variants.d.ts +4 -1
  640. package/dist/lib/components/MultiSelectDropdown/components/Item/Item.types.d.ts +1 -1
  641. package/dist/lib/components/MultiSelectDropdown/components/List/List.types.d.ts +1 -1
  642. package/dist/lib/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
  643. package/dist/lib/components/MultiSelectDropdown/contexts/MultiSelectDropdown.types.d.ts +2 -0
  644. package/dist/lib/components/OtpInput/OtpInput.d.ts +19 -0
  645. package/dist/lib/components/OtpInput/OtpInput.types.d.ts +32 -0
  646. package/dist/lib/components/PasswordRules/PasswordRules.d.ts +20 -0
  647. package/dist/lib/components/PasswordRules/PasswordRules.types.d.ts +24 -0
  648. package/dist/lib/components/PhoneNumberInput/components/PhoneNumberInputContent.d.ts +18 -0
  649. package/dist/lib/components/PieChart/PieChart.types.d.ts +4 -4
  650. package/dist/lib/components/PieChart/components/PieChartContent/PieChartContent.d.ts +3 -0
  651. package/dist/lib/components/ProgressBar/ProgressBar.types.d.ts +3 -1
  652. package/dist/lib/components/Radio/Radio.types.d.ts +1 -1
  653. package/dist/lib/components/RadioCard/RadioCard.d.ts +11 -0
  654. package/dist/lib/components/RadioCard/RadioCard.types.d.ts +11 -2
  655. package/dist/lib/components/RadioCard/RadioCard.variants.d.ts +3 -1
  656. package/dist/lib/components/RadioCardGroup/RadioCardGroup.types.d.ts +1 -1
  657. package/dist/lib/components/RadioGroup/RadioGroup.types.d.ts +3 -3
  658. package/dist/lib/components/Range/Range.types.d.ts +1 -1
  659. package/dist/lib/components/Select/Select.types.d.ts +6 -1
  660. package/dist/lib/components/Select/components/List/List.types.d.ts +3 -0
  661. package/dist/lib/components/Select/components/Wrapper.d.ts +2 -0
  662. package/dist/lib/components/Select/contexts/select.provider.d.ts +1 -0
  663. package/dist/lib/components/Select/hooks/useSelect.d.ts +4 -3
  664. package/dist/lib/components/Sheet/Sheet.d.ts +25 -0
  665. package/dist/lib/components/Sheet/Sheet.types.d.ts +43 -0
  666. package/dist/lib/components/Sheet/utils/index.d.ts +11 -0
  667. package/dist/lib/components/Sidebar/Sidebar.d.ts +2 -2
  668. package/dist/lib/components/Sidebar/Sidebar.types.d.ts +23 -7
  669. package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.d.ts +4 -0
  670. package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.types.d.ts +6 -0
  671. package/dist/lib/components/Sidebar/components/CollapseTrigger/CollapseTrigger.variants.d.ts +1 -0
  672. package/dist/lib/components/Sidebar/components/HamburgerTrigger/HamburgerTrigger.types.d.ts +2 -0
  673. package/dist/lib/components/Sidebar/components/Label/Label.types.d.ts +1 -1
  674. package/dist/lib/components/Sidebar/components/Logo/Logo.types.d.ts +8 -0
  675. package/dist/lib/components/Sidebar/components/Logo/Logo.variants.d.ts +3 -1
  676. package/dist/lib/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +11 -0
  677. package/dist/lib/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +6 -0
  678. package/dist/lib/components/Sidebar/components/NavigationOption/NavigationOption.variants.d.ts +1 -0
  679. package/dist/lib/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +5 -0
  680. package/dist/lib/components/Sidebar/components/NavigationTitle/NavigationTitle.variants.d.ts +1 -0
  681. package/dist/lib/components/Sidebar/components/index.d.ts +2 -0
  682. package/dist/lib/components/Sidebar/contexts/SidebarContext.d.ts +12 -0
  683. package/dist/lib/components/Skeleton/Skeleton.d.ts +14 -0
  684. package/dist/lib/components/Skeleton/Skeleton.types.d.ts +16 -0
  685. package/dist/lib/components/Skeleton/Skeleton.variants.d.ts +3 -0
  686. package/dist/lib/components/Slider/Slider.types.d.ts +1 -1
  687. package/dist/lib/components/Spinner/Spinner.types.d.ts +2 -2
  688. package/dist/lib/components/Stepper/Stepper.types.d.ts +3 -1
  689. package/dist/lib/components/Stepper/Stepper.variants.d.ts +7 -4
  690. package/dist/lib/components/Stepper/components/StepItem/StepItem.types.d.ts +1 -1
  691. package/dist/lib/components/Switch/Switch.types.d.ts +8 -1
  692. package/dist/lib/components/Switch/Switch.variants.d.ts +3 -1
  693. package/dist/lib/components/Table/Table.types.d.ts +1 -1
  694. package/dist/lib/components/Tabs/Tabs.d.ts +13 -13
  695. package/dist/lib/components/Tabs/Tabs.types.d.ts +15 -4
  696. package/dist/lib/components/Tabs/Tabs.variants.d.ts +1 -1
  697. package/dist/lib/components/Tag/Tag.types.d.ts +1 -0
  698. package/dist/lib/components/TagSelect/TagSelect.types.d.ts +1 -1
  699. package/dist/lib/components/TagSelect/components/Item/Item.types.d.ts +2 -2
  700. package/dist/lib/components/TagSelect/components/List/List.types.d.ts +1 -1
  701. package/dist/lib/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
  702. package/dist/lib/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
  703. package/dist/lib/components/TagsInput/TagsInput.d.ts +20 -0
  704. package/dist/lib/components/TagsInput/TagsInput.types.d.ts +37 -0
  705. package/dist/lib/components/TextArea/TextArea.d.ts +6 -0
  706. package/dist/lib/components/TextArea/TextArea.types.d.ts +14 -3
  707. package/dist/lib/components/TextArea/TextArea.variants.d.ts +4 -1
  708. package/dist/lib/components/TimePicker/TimePicker.types.d.ts +4 -0
  709. package/dist/lib/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +1 -0
  710. package/dist/lib/components/Toast/Toast.d.ts +20 -14
  711. package/dist/lib/components/Toast/Toast.types.d.ts +68 -36
  712. package/dist/lib/components/Toast/Toast.variants.d.ts +15 -4
  713. package/dist/lib/components/Toast/ToastProvider.d.ts +11 -0
  714. package/dist/lib/components/Toast/ToastProvider.types.d.ts +17 -0
  715. package/dist/lib/components/Toast/components/ToastCard/ToastCard.d.ts +3 -0
  716. package/dist/lib/components/Toast/components/ToastCard/ToastCard.types.d.ts +18 -0
  717. package/dist/lib/components/Toast/components/index.d.ts +1 -0
  718. package/dist/lib/components/Toast/constants/index.d.ts +31 -0
  719. package/dist/lib/components/Toast/contexts/index.d.ts +1 -0
  720. package/dist/lib/components/Toast/contexts/toast-store.context.d.ts +2 -0
  721. package/dist/lib/components/Toast/hooks/index.d.ts +6 -0
  722. package/dist/lib/components/Toast/hooks/useStackExpansion/useStackExpansion.d.ts +2 -0
  723. package/dist/lib/components/Toast/hooks/useStackExpansion/useStackExpansion.types.d.ts +7 -0
  724. package/dist/lib/components/Toast/hooks/useToast/useToast.d.ts +2 -0
  725. package/dist/lib/components/Toast/hooks/useToastHeights/useToastHeights.d.ts +2 -0
  726. package/dist/lib/components/Toast/hooks/useToastHeights/useToastHeights.types.d.ts +6 -0
  727. package/dist/lib/components/Toast/hooks/useToastSource/useToastSource.d.ts +2 -0
  728. package/dist/lib/components/Toast/hooks/useToastSource/useToastSource.types.d.ts +11 -0
  729. package/dist/lib/components/Toast/hooks/useToastStore/useToastStore.d.ts +3 -0
  730. package/dist/lib/components/Toast/hooks/useToastTimer/useToastTimer.d.ts +2 -0
  731. package/dist/lib/components/Toast/hooks/useToastTimer/useToastTimer.types.d.ts +7 -0
  732. package/dist/lib/components/Toast/store/create-toast-store.d.ts +2 -0
  733. package/dist/lib/components/Toast/store/create-toast-store.types.d.ts +24 -0
  734. package/dist/lib/components/Toast/store/default-toast-store.d.ts +1 -0
  735. package/dist/lib/components/Toast/store/index.d.ts +2 -0
  736. package/dist/lib/components/Toast/utils/compute-stack-layout/compute-stack-layout.d.ts +2 -0
  737. package/dist/lib/components/Toast/utils/compute-stack-layout/compute-stack-layout.types.d.ts +12 -0
  738. package/dist/lib/components/Toast/utils/index.d.ts +2 -0
  739. package/dist/lib/components/Toast/utils/should-dismiss-swipe/should-dismiss-swipe.d.ts +2 -0
  740. package/dist/lib/components/Toast/utils/should-dismiss-swipe/should-dismiss-swipe.types.d.ts +5 -0
  741. package/dist/lib/components/Tooltip/Tooltip.d.ts +4 -0
  742. package/dist/lib/components/Tooltip/Tooltip.types.d.ts +10 -0
  743. package/dist/lib/components/Typography/Typography.types.d.ts +1 -1
  744. package/dist/lib/components/VirtualizedTable/VirtualizedTable.d.ts +9 -2
  745. package/dist/lib/components/VirtualizedTable/VirtualizedTable.types.d.ts +46 -6
  746. package/dist/lib/components/VirtualizedTable/components/Actions/Actions.d.ts +1 -1
  747. package/dist/lib/components/VirtualizedTable/components/Actions/Actions.types.d.ts +9 -2
  748. package/dist/lib/components/VirtualizedTable/components/Actions/Actions.variants.d.ts +8 -0
  749. package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.d.ts +3 -0
  750. package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsList/ActionsList.types.d.ts +11 -0
  751. package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.d.ts +4 -0
  752. package/dist/lib/components/VirtualizedTable/components/Actions/components/ActionsTrigger/ActionsTrigger.types.d.ts +6 -0
  753. package/dist/lib/components/VirtualizedTable/components/Actions/components/InlineActions/InlineActions.d.ts +3 -0
  754. package/dist/lib/components/VirtualizedTable/components/Actions/components/InlineActions/constants/index.d.ts +2 -0
  755. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/PortalActions.d.ts +3 -0
  756. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/constants/index.d.ts +2 -0
  757. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/index.d.ts +1 -0
  758. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-actions-menu/use-actions-menu.d.ts +18 -0
  759. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-actions-menu/use-actions-menu.types.d.ts +3 -0
  760. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.d.ts +12 -0
  761. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-interactions/use-menu-interactions.types.d.ts +8 -0
  762. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-keyboard-navigation/use-menu-keyboard-navigation.d.ts +6 -0
  763. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-menu-keyboard-navigation/use-menu-keyboard-navigation.types.d.ts +8 -0
  764. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-row-highlight/use-row-highlight.d.ts +2 -0
  765. package/dist/lib/components/VirtualizedTable/components/Actions/components/PortalActions/hooks/use-row-highlight/use-row-highlight.types.d.ts +5 -0
  766. package/dist/lib/components/VirtualizedTable/components/Body/Body.d.ts +1 -1
  767. package/dist/lib/components/VirtualizedTable/components/Body/Body.types.d.ts +1 -0
  768. package/dist/lib/components/VirtualizedTable/components/DotPaginate/DotPaginate.d.ts +1 -1
  769. package/dist/lib/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.types.d.ts +2 -0
  770. package/dist/lib/components/VirtualizedTable/components/EmptyResults/EmptyResults.d.ts +3 -0
  771. package/dist/lib/components/VirtualizedTable/components/EmptyResults/EmptyResults.types.d.ts +9 -0
  772. package/dist/lib/components/VirtualizedTable/components/EmptyState/EmptyState.d.ts +3 -0
  773. package/dist/lib/components/VirtualizedTable/components/EmptyState/EmptyState.types.d.ts +8 -0
  774. package/dist/lib/components/VirtualizedTable/components/ErrorState/ErrorState.d.ts +3 -0
  775. package/dist/lib/components/VirtualizedTable/components/ErrorState/ErrorState.types.d.ts +9 -0
  776. package/dist/lib/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -1
  777. package/dist/lib/components/VirtualizedTable/components/FormPaginate/FormPaginate.d.ts +1 -1
  778. package/dist/lib/components/VirtualizedTable/components/Header/Header.d.ts +1 -1
  779. package/dist/lib/components/VirtualizedTable/components/Header/Header.types.d.ts +1 -0
  780. package/dist/lib/components/VirtualizedTable/components/Pagination/Pagination.types.d.ts +2 -0
  781. package/dist/lib/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.d.ts +10 -0
  782. package/dist/lib/components/VirtualizedTable/components/ScrollContainer/ScrollContainer.types.d.ts +6 -0
  783. package/dist/lib/components/VirtualizedTable/components/Skeleton/Skeleton.d.ts +1 -1
  784. package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +2 -1
  785. package/dist/lib/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +9 -4
  786. package/dist/lib/components/VirtualizedTable/components/VirtualizedTableContent/VirtualizedTableContent.d.ts +3 -0
  787. package/dist/lib/components/VirtualizedTable/components/index.d.ts +4 -0
  788. package/dist/lib/components/VirtualizedTable/constants/index.d.ts +1 -0
  789. package/dist/lib/components/VirtualizedTable/constants/responsive.d.ts +2 -0
  790. package/dist/lib/components/VirtualizedTable/contexts/table.context.d.ts +7 -0
  791. package/dist/lib/components/VirtualizedTable/contexts/table.provider.d.ts +1 -1
  792. package/dist/lib/components/VirtualizedTable/contexts/table.types.d.ts +3 -1
  793. package/dist/lib/components/VirtualizedTable/events/events.types.d.ts +11 -0
  794. package/dist/lib/components/VirtualizedTable/events/filters/filters.d.ts +1 -0
  795. package/dist/lib/components/VirtualizedTable/events/index.d.ts +4 -14
  796. package/dist/lib/components/VirtualizedTable/events/refresh/refresh.d.ts +2 -0
  797. package/dist/lib/components/VirtualizedTable/events/refresh/refresh.types.d.ts +3 -0
  798. package/dist/lib/components/VirtualizedTable/events/row/row.d.ts +3 -0
  799. package/dist/lib/components/VirtualizedTable/hooks/index.d.ts +1 -0
  800. package/dist/lib/components/VirtualizedTable/hooks/useVirtualizedTableReady/index.d.ts +1 -0
  801. package/dist/lib/components/VirtualizedTable/hooks/useVirtualizedTableReady/useVirtualizedTableReady.d.ts +1 -0
  802. package/dist/lib/components/VirtualizedTable/utils/get-table-id.d.ts +1 -0
  803. package/dist/lib/components/VirtualizedTable/utils/index.d.ts +4 -0
  804. package/dist/lib/components/VirtualizedTable/utils/load-content/index.d.ts +1 -0
  805. package/dist/lib/components/VirtualizedTable/utils/load-content/load-content.d.ts +8 -0
  806. package/dist/lib/components/VirtualizedTable/utils/pagination.d.ts +1 -0
  807. package/dist/lib/components/VirtualizedTable/utils/pinned-columns/index.d.ts +1 -0
  808. package/dist/lib/components/VirtualizedTable/utils/pinned-columns/pinned-columns.d.ts +23 -0
  809. package/dist/lib/components/index.d.ts +28 -4
  810. package/dist/lib/contexts/theme.context.d.ts +1 -1
  811. package/dist/lib/contexts/theme.hook.d.ts +1 -1
  812. package/dist/lib/hooks/index.d.ts +2 -0
  813. package/dist/lib/hooks/useClickOutside.d.ts +4 -0
  814. package/dist/lib/hooks/useIsHydrated/useIsHydrated.d.ts +1 -0
  815. package/dist/lib/hooks/useIsHydrated/utils/index.d.ts +1 -0
  816. package/dist/lib/hooks/useIsHydrated/utils/noop-subscribe/noop-subscribe.d.ts +1 -0
  817. package/dist/lib/icons.d.ts +1 -1
  818. package/dist/lib/utils/index.d.ts +1 -0
  819. package/dist/{libphonenumber-Dy3Kac9j.js → libphonenumber-BIeQOhzl.js} +631 -581
  820. package/dist/package.json +58 -57
  821. package/dist/{phone-number.provider-D3j9sszx.js → phone-number.provider-CJeivoDY.js} +602 -588
  822. package/dist/{prop-types-CE0Kfmwk.js → prop-types-qsAjMBb1.js} +53 -53
  823. package/dist/rolldown-runtime-B28h4lGi.js +38 -0
  824. package/dist/styles.css +1 -1
  825. package/dist/{table.provider-BPlFpIAe.js → table.provider-Dhs7WtwK.js} +582 -497
  826. package/dist/{theme.provider-BC_aCvPM.js → theme.provider-CvL6sqHq.js} +3 -3
  827. package/dist/ui/civo-theme.css +4 -0
  828. package/dist/ui/kubefirst-theme.css +4 -0
  829. package/dist/ui/utilities.css +19 -0
  830. package/dist/{useBreadcrumb-mrkCWjS0.js → useBreadcrumb-Ta3_czcd.js} +627 -535
  831. package/dist/utils/index.js +6 -5
  832. package/dist/{utils-COaoD3PI.js → utils-DnIJruo0.js} +556 -428
  833. package/dist/{x-KjMYhcCb.js → x-BmNOD9Gr.js} +3 -4
  834. package/dist/x-C8O1IsaM.js +17 -0
  835. package/package.json +58 -57
  836. package/dist/AlertDialogTrigger-C2GlLI2j.js +0 -146
  837. package/dist/Breadcrumb-xLKDl92B.js +0 -82
  838. package/dist/Checkbox-BvRmHWxk.js +0 -239
  839. package/dist/Counter-C1o8YZoR.js +0 -191
  840. package/dist/DropdownButton-CWwjA3zI.js +0 -92
  841. package/dist/FlagSelectorList-NMlHNF7N.js +0 -601
  842. package/dist/Input-BZG7N8m1.js +0 -188
  843. package/dist/Loading-DNlO4qxs.js +0 -16
  844. package/dist/Modal-IyDr5vIx.js +0 -76
  845. package/dist/Spinner-BB1muhcJ.js +0 -41
  846. package/dist/StepIndicatorContent-87ASgJsX.js +0 -30
  847. package/dist/Switch-CT2R9JgM.js +0 -136
  848. package/dist/Toast-CWyLcmNX.js +0 -483
  849. package/dist/Wrapper-DimnwFZe.js +0 -161
  850. package/dist/Wrapper-F9NmImqw.js +0 -110
  851. package/dist/chevron-down-T3Rx8Nc7.js +0 -8
  852. package/dist/chevron-left-CeJrJR0U.js +0 -8
  853. package/dist/chevron-right-BFOnP164.js +0 -8
  854. package/dist/chevron-up-BKlxfVX9.js +0 -8
  855. package/dist/chunk-cI0lbGMq.js +0 -31
  856. package/dist/components/DateRangePicker/constants/presets.js +0 -25
  857. package/dist/components/DateRangePicker/contexts/date-range-picker.provider.js +0 -119
  858. package/dist/components/DateRangePicker/utils/disabled-dates.js +0 -27
  859. package/dist/components/DateRangePicker/utils/presets.js +0 -34
  860. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +0 -67
  861. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +0 -58
  862. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +0 -63
  863. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +0 -54
  864. package/dist/components-C_LekSz_.js +0 -120
  865. package/dist/constants-CLe3ZLC_.js +0 -31
  866. package/dist/createLucideIcon-CL4htJAF.js +0 -42
  867. package/dist/dist-AZfrfAUz.js +0 -132
  868. package/dist/dist-B5WmTRxj.js +0 -480
  869. package/dist/dist-Bcn6lMQe.js +0 -34
  870. package/dist/dist-BeLV4B_x.js +0 -1701
  871. package/dist/dist-BfrkYZKI.js +0 -361
  872. package/dist/dist-Br5jSLr2.js +0 -263
  873. package/dist/dist-C4El7dZ5.js +0 -27
  874. package/dist/dist-CMPkuWNy.js +0 -74
  875. package/dist/dist-CQfmhKEs.js +0 -13
  876. package/dist/dist-CZChgJLY.js +0 -120
  877. package/dist/dist-Cf-pDuuw.js +0 -10
  878. package/dist/dist-D6dB-_Oy.js +0 -10
  879. package/dist/dist-DF7Yi2EK.js +0 -67
  880. package/dist/dist-D_9sBzad.js +0 -223
  881. package/dist/dist-DxDE5irg2.js +0 -11
  882. package/dist/dist-EV-1XXQr.js +0 -58
  883. package/dist/dist-X40eHC8j2.js +0 -31
  884. package/dist/ellipsis-vertical-Cm9A6Zu8.js +0 -24
  885. package/dist/lib/components/DateRangePicker/constants/presets.d.ts +0 -6
  886. package/dist/lib/components/DateRangePicker/utils/presets.d.ts +0 -5
  887. package/dist/lib/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.d.ts +0 -13
  888. package/dist/proxy-Cx8v8fok.js +0 -4690
  889. package/dist/x-DBIZFfaM.js +0 -11
  890. /package/dist/{clsx-Dzz4NoNN.js → clsx-Cf23UI1w.js} +0 -0
  891. /package/dist/components/DateRangePicker/contexts/{date-range-picker.context.js → date-range-picker/date-range-picker.context.js} +0 -0
  892. /package/dist/components/DateRangePicker/contexts/{date-range-picker.hook.js → date-range-picker/date-range-picker.hook.js} +0 -0
  893. /package/dist/lib/components/DateRangePicker/contexts/{date-range-picker.hook.d.ts → date-range-picker/date-range-picker.hook.d.ts} +0 -0
  894. /package/dist/lib/components/DateRangePicker/utils/{validation.d.ts → validation/validation.d.ts} +0 -0
@@ -1,4690 +0,0 @@
1
- import { a as _r, n as Kr, r as $r } from "./chunk-cI0lbGMq.js";
2
- import { Component as zr, Fragment as Yn, createContext as Mt, createElement as Hr, forwardRef as Gr, useCallback as qn, useContext as U, useEffect as ni, useId as Xr, useInsertionEffect as Zn, useLayoutEffect as Yr, useMemo as he, useRef as dt } from "react";
3
- import { jsx as Jn, jsxs as qr } from "react/jsx-runtime";
4
- var Qn = Mt({});
5
- function Zr(t) {
6
- const e = dt(null);
7
- return e.current === null && (e.current = t()), e.current;
8
- }
9
- var Jr = typeof window < "u", Qr = Jr ? Yr : ni, si = /* @__PURE__ */ Mt(null);
10
- function ri(t, e) {
11
- t.indexOf(e) === -1 && t.push(e);
12
- }
13
- function ne(t, e) {
14
- const i = t.indexOf(e);
15
- i > -1 && t.splice(i, 1);
16
- }
17
- var tt = (t, e, i) => i > e ? e : i < t ? t : i;
18
- function Le(t, e) {
19
- return e ? `${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}` : t;
20
- }
21
- var Ct = () => {
22
- }, it = () => {
23
- };
24
- typeof process < "u" && process.env.NODE_ENV !== "production" && (Ct = (t, e, i) => {
25
- !t && typeof console < "u" && console.warn(Le(e, i));
26
- }, it = (t, e, i) => {
27
- if (!t) throw new Error(Le(e, i));
28
- });
29
- var rt = {}, ts = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);
30
- function es(t) {
31
- return typeof t == "object" && t !== null;
32
- }
33
- var is = (t) => /^0[^.\s]+$/u.test(t);
34
- // @__NO_SIDE_EFFECTS__
35
- function ns(t) {
36
- let e;
37
- return () => (e === void 0 && (e = t()), e);
38
- }
39
- var $ = /* @__NO_SIDE_EFFECTS__ */ (t) => t, to = (t, e) => (i) => e(t(i)), Wt = (...t) => t.reduce(to), Ot = /* @__NO_SIDE_EFFECTS__ */ (t, e, i) => {
40
- const n = e - t;
41
- return n === 0 ? 1 : (i - t) / n;
42
- }, oi = class {
43
- constructor() {
44
- this.subscriptions = [];
45
- }
46
- add(t) {
47
- return ri(this.subscriptions, t), () => ne(this.subscriptions, t);
48
- }
49
- notify(t, e, i) {
50
- const n = this.subscriptions.length;
51
- if (n)
52
- if (n === 1) this.subscriptions[0](t, e, i);
53
- else for (let s = 0; s < n; s++) {
54
- const o = this.subscriptions[s];
55
- o && o(t, e, i);
56
- }
57
- }
58
- getSize() {
59
- return this.subscriptions.length;
60
- }
61
- clear() {
62
- this.subscriptions.length = 0;
63
- }
64
- }, W = /* @__NO_SIDE_EFFECTS__ */ (t) => t * 1e3, K = /* @__NO_SIDE_EFFECTS__ */ (t) => t / 1e3;
65
- function ss(t, e) {
66
- return e ? t * (1e3 / e) : 0;
67
- }
68
- var Ri = /* @__PURE__ */ new Set();
69
- function ai(t, e, i) {
70
- t || Ri.has(e) || (console.warn(Le(e, i)), Ri.add(e));
71
- }
72
- var rs = (t, e, i) => (((1 - 3 * i + 3 * e) * t + (3 * i - 6 * e)) * t + 3 * e) * t, eo = 1e-7, io = 12;
73
- function no(t, e, i, n, s) {
74
- let o, r, a = 0;
75
- do
76
- r = e + (i - e) / 2, o = rs(r, n, s) - t, o > 0 ? i = r : e = r;
77
- while (Math.abs(o) > eo && ++a < io);
78
- return r;
79
- }
80
- function _t(t, e, i, n) {
81
- if (t === e && i === n) return $;
82
- const s = (o) => no(o, 0, 1, t, i);
83
- return (o) => o === 0 || o === 1 ? o : rs(s(o), e, n);
84
- }
85
- var os = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, as = (t) => (e) => 1 - t(1 - e), ls = /* @__PURE__ */ _t(0.33, 1.53, 0.69, 0.99), li = /* @__PURE__ */ as(ls), us = /* @__PURE__ */ os(li), cs = (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)), hs = as(ui), fs = os(ui), so = /* @__PURE__ */ _t(0.42, 0, 1, 1), ro = /* @__PURE__ */ _t(0, 0, 0.58, 1), ds = /* @__PURE__ */ _t(0.42, 0, 0.58, 1), oo = (t) => Array.isArray(t) && typeof t[0] != "number", ps = (t) => Array.isArray(t) && typeof t[0] == "number", Li = {
86
- linear: $,
87
- easeIn: so,
88
- easeInOut: ds,
89
- easeOut: ro,
90
- circIn: ui,
91
- circInOut: fs,
92
- circOut: hs,
93
- backIn: li,
94
- backInOut: us,
95
- backOut: ls,
96
- anticipate: cs
97
- }, ao = (t) => typeof t == "string", ki = (t) => {
98
- if (ps(t)) {
99
- it(t.length === 4, "Cubic bezier arrays must contain four numerical values.", "cubic-bezier-length");
100
- const [e, i, n, s] = t;
101
- return _t(e, i, n, s);
102
- } else if (ao(t))
103
- return it(Li[t] !== void 0, `Invalid easing type '${t}'`, "invalid-easing-type"), Li[t];
104
- return t;
105
- }, zt = [
106
- "setup",
107
- "read",
108
- "resolveKeyframes",
109
- "preUpdate",
110
- "update",
111
- "preRender",
112
- "render",
113
- "postRender"
114
- ], J = {
115
- value: null,
116
- addProjectionMetrics: null
117
- };
118
- function lo(t, e) {
119
- let i = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = !1, o = !1;
120
- const r = /* @__PURE__ */ new WeakSet();
121
- let a = {
122
- delta: 0,
123
- timestamp: 0,
124
- isProcessing: !1
125
- }, l = 0;
126
- function c(h) {
127
- r.has(h) && (u.schedule(h), t()), l++, h(a);
128
- }
129
- const u = {
130
- schedule: (h, f = !1, p = !1) => {
131
- const d = p && s ? i : n;
132
- return f && r.add(h), d.add(h), h;
133
- },
134
- cancel: (h) => {
135
- n.delete(h), r.delete(h);
136
- },
137
- process: (h) => {
138
- if (a = h, s) {
139
- o = !0;
140
- return;
141
- }
142
- s = !0;
143
- const f = i;
144
- i = n, n = f, i.forEach(c), e && J.value && J.value.frameloop[e].push(l), l = 0, i.clear(), s = !1, o && (o = !1, u.process(h));
145
- }
146
- };
147
- return u;
148
- }
149
- var uo = 40;
150
- function ms(t, e) {
151
- let i = !1, n = !0;
152
- const s = {
153
- delta: 0,
154
- timestamp: 0,
155
- isProcessing: !1
156
- }, o = () => i = !0, r = zt.reduce((y, w) => (y[w] = lo(o, e ? w : void 0), y), {}), { setup: a, read: l, resolveKeyframes: c, preUpdate: u, update: h, preRender: f, render: p, postRender: d } = r, m = () => {
157
- const y = rt.useManualTiming, w = y ? s.timestamp : performance.now();
158
- i = !1, y || (s.delta = n ? 1e3 / 60 : Math.max(Math.min(w - s.timestamp, uo), 1)), s.timestamp = w, 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(m));
159
- }, g = () => {
160
- i = !0, n = !0, s.isProcessing || t(m);
161
- };
162
- return {
163
- schedule: zt.reduce((y, w) => {
164
- const b = r[w];
165
- return y[w] = (E, L = !1, P = !1) => (i || g(), b.schedule(E, L, P)), y;
166
- }, {}),
167
- cancel: (y) => {
168
- for (let w = 0; w < zt.length; w++) r[zt[w]].cancel(y);
169
- },
170
- state: s,
171
- steps: r
172
- };
173
- }
174
- var { schedule: A, cancel: ot, state: B, steps: ve } = /* @__PURE__ */ ms(typeof requestAnimationFrame < "u" ? requestAnimationFrame : $, !0), Yt;
175
- function co() {
176
- Yt = void 0;
177
- }
178
- var O = {
179
- now: () => (Yt === void 0 && O.set(B.isProcessing || rt.useManualTiming ? B.timestamp : performance.now()), Yt),
180
- set: (t) => {
181
- Yt = t, queueMicrotask(co);
182
- }
183
- }, vt = {
184
- layout: 0,
185
- mainThread: 0,
186
- waapi: 0
187
- }, vs = (t) => (e) => typeof e == "string" && e.startsWith(t), gs = /* @__PURE__ */ vs("--"), ho = /* @__PURE__ */ vs("var(--"), ci = (t) => ho(t) ? fo.test(t.split("/*")[0].trim()) : !1, fo = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
188
- function Bi(t) {
189
- return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
190
- }
191
- var Dt = {
192
- test: (t) => typeof t == "number",
193
- parse: parseFloat,
194
- transform: (t) => t
195
- }, jt = {
196
- ...Dt,
197
- transform: (t) => tt(0, 1, t)
198
- }, Ht = {
199
- ...Dt,
200
- default: 1
201
- }, Bt = (t) => Math.round(t * 1e5) / 1e5, hi = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
202
- function po(t) {
203
- return t == null;
204
- }
205
- var mo = /^(?:#[\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" && mo.test(i) && i.startsWith(t) || e && !po(i) && Object.prototype.hasOwnProperty.call(i, e)), ys = (t, e, i) => (n) => {
206
- if (typeof n != "string") return n;
207
- const [s, o, r, a] = n.match(hi);
208
- return {
209
- [t]: parseFloat(s),
210
- [e]: parseFloat(o),
211
- [i]: parseFloat(r),
212
- alpha: a !== void 0 ? parseFloat(a) : 1
213
- };
214
- }, vo = (t) => tt(0, 255, t), ge = {
215
- ...Dt,
216
- transform: (t) => Math.round(vo(t))
217
- }, pt = {
218
- test: /* @__PURE__ */ fi("rgb", "red"),
219
- parse: /* @__PURE__ */ ys("red", "green", "blue"),
220
- transform: ({ red: t, green: e, blue: i, alpha: n = 1 }) => "rgba(" + ge.transform(t) + ", " + ge.transform(e) + ", " + ge.transform(i) + ", " + Bt(jt.transform(n)) + ")"
221
- };
222
- function go(t) {
223
- let e = "", i = "", n = "", s = "";
224
- 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), {
225
- red: parseInt(e, 16),
226
- green: parseInt(i, 16),
227
- blue: parseInt(n, 16),
228
- alpha: s ? parseInt(s, 16) / 255 : 1
229
- };
230
- }
231
- var ke = {
232
- test: /* @__PURE__ */ fi("#"),
233
- parse: go,
234
- transform: pt.transform
235
- }, Kt = /* @__NO_SIDE_EFFECTS__ */ (t) => ({
236
- test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
237
- parse: parseFloat,
238
- transform: (e) => `${e}${t}`
239
- }), nt = /* @__PURE__ */ Kt("deg"), Q = /* @__PURE__ */ Kt("%"), T = /* @__PURE__ */ Kt("px"), yo = /* @__PURE__ */ Kt("vh"), To = /* @__PURE__ */ Kt("vw"), Ii = {
240
- ...Q,
241
- parse: (t) => Q.parse(t) / 100,
242
- transform: (t) => Q.transform(t * 100)
243
- }, wt = {
244
- test: /* @__PURE__ */ fi("hsl", "hue"),
245
- parse: /* @__PURE__ */ ys("hue", "saturation", "lightness"),
246
- transform: ({ hue: t, saturation: e, lightness: i, alpha: n = 1 }) => "hsla(" + Math.round(t) + ", " + Q.transform(Bt(e)) + ", " + Q.transform(Bt(i)) + ", " + Bt(jt.transform(n)) + ")"
247
- }, D = {
248
- test: (t) => pt.test(t) || ke.test(t) || wt.test(t),
249
- parse: (t) => pt.test(t) ? pt.parse(t) : wt.test(t) ? wt.parse(t) : ke.parse(t),
250
- transform: (t) => typeof t == "string" ? t : t.hasOwnProperty("red") ? pt.transform(t) : wt.transform(t),
251
- getAnimatableNone: (t) => {
252
- const e = D.parse(t);
253
- return e.alpha = 0, D.transform(e);
254
- }
255
- }, xo = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
256
- function wo(t) {
257
- return isNaN(t) && typeof t == "string" && (t.match(hi)?.length || 0) + (t.match(xo)?.length || 0) > 0;
258
- }
259
- var Ts = "number", xs = "color", Po = "var", So = "var(", Fi = "${}", bo = /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;
260
- function At(t) {
261
- const e = t.toString(), i = [], n = {
262
- color: [],
263
- number: [],
264
- var: []
265
- }, s = [];
266
- let o = 0;
267
- return {
268
- values: i,
269
- split: e.replace(bo, (r) => (D.test(r) ? (n.color.push(o), s.push(xs), i.push(D.parse(r))) : r.startsWith(So) ? (n.var.push(o), s.push(Po), i.push(r)) : (n.number.push(o), s.push(Ts), i.push(parseFloat(r))), ++o, Fi)).split(Fi),
270
- indexes: n,
271
- types: s
272
- };
273
- }
274
- function Ao(t) {
275
- return At(t).values;
276
- }
277
- function ws({ split: t, types: e }) {
278
- const i = t.length;
279
- return (n) => {
280
- let s = "";
281
- for (let o = 0; o < i; o++)
282
- if (s += t[o], n[o] !== void 0) {
283
- const r = e[o];
284
- r === Ts ? s += Bt(n[o]) : r === xs ? s += D.transform(n[o]) : s += n[o];
285
- }
286
- return s;
287
- };
288
- }
289
- function Vo(t) {
290
- return ws(At(t));
291
- }
292
- var Mo = (t) => typeof t == "number" ? 0 : D.test(t) ? D.getAnimatableNone(t) : t, Co = (t, e) => typeof t == "number" ? e?.trim().endsWith("/") ? t : 0 : Mo(t);
293
- function Do(t) {
294
- const e = At(t);
295
- return ws(e)(e.values.map((i, n) => Co(i, e.split[n])));
296
- }
297
- var G = {
298
- test: wo,
299
- parse: Ao,
300
- createTransformer: Vo,
301
- getAnimatableNone: Do
302
- };
303
- function ye(t, e, i) {
304
- 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;
305
- }
306
- function Eo({ hue: t, saturation: e, lightness: i, alpha: n }) {
307
- t /= 360, e /= 100, i /= 100;
308
- let s = 0, o = 0, r = 0;
309
- if (!e) s = o = r = i;
310
- else {
311
- const a = i < 0.5 ? i * (1 + e) : i + e - i * e, l = 2 * i - a;
312
- s = ye(l, a, t + 1 / 3), o = ye(l, a, t), r = ye(l, a, t - 1 / 3);
313
- }
314
- return {
315
- red: Math.round(s * 255),
316
- green: Math.round(o * 255),
317
- blue: Math.round(r * 255),
318
- alpha: n
319
- };
320
- }
321
- function se(t, e) {
322
- return (i) => i > 0 ? e : t;
323
- }
324
- var V = (t, e, i) => t + (e - t) * i, Te = (t, e, i) => {
325
- const n = t * t, s = i * (e * e - n) + n;
326
- return s < 0 ? 0 : Math.sqrt(s);
327
- }, Ro = [
328
- ke,
329
- pt,
330
- wt
331
- ], Lo = (t) => Ro.find((e) => e.test(t));
332
- function Oi(t) {
333
- const e = Lo(t);
334
- if (Ct(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`, "color-not-animatable"), !e) return !1;
335
- let i = e.parse(t);
336
- return e === wt && (i = Eo(i)), i;
337
- }
338
- var ji = (t, e) => {
339
- const i = Oi(t), n = Oi(e);
340
- if (!i || !n) return se(t, e);
341
- const s = { ...i };
342
- 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 = V(i.alpha, n.alpha, o), pt.transform(s));
343
- }, Be = /* @__PURE__ */ new Set(["none", "hidden"]);
344
- function ko(t, e) {
345
- return Be.has(t) ? (i) => i <= 0 ? t : e : (i) => i >= 1 ? e : t;
346
- }
347
- function Bo(t, e) {
348
- return (i) => V(t, e, i);
349
- }
350
- function di(t) {
351
- return typeof t == "number" ? Bo : typeof t == "string" ? ci(t) ? se : D.test(t) ? ji : Oo : Array.isArray(t) ? Ps : typeof t == "object" ? D.test(t) ? ji : Io : se;
352
- }
353
- function Ps(t, e) {
354
- const i = [...t], n = i.length, s = t.map((o, r) => di(o)(o, e[r]));
355
- return (o) => {
356
- for (let r = 0; r < n; r++) i[r] = s[r](o);
357
- return i;
358
- };
359
- }
360
- function Io(t, e) {
361
- const i = {
362
- ...t,
363
- ...e
364
- }, n = {};
365
- for (const s in i) t[s] !== void 0 && e[s] !== void 0 && (n[s] = di(t[s])(t[s], e[s]));
366
- return (s) => {
367
- for (const o in n) i[o] = n[o](s);
368
- return i;
369
- };
370
- }
371
- function Fo(t, e) {
372
- const i = [], n = {
373
- color: 0,
374
- var: 0,
375
- number: 0
376
- };
377
- for (let s = 0; s < e.values.length; s++) {
378
- const o = e.types[s], r = t.indexes[o][n[o]];
379
- i[s] = t.values[r] ?? 0, n[o]++;
380
- }
381
- return i;
382
- }
383
- var Oo = (t, e) => {
384
- const i = G.createTransformer(e), n = At(t), s = At(e);
385
- 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 ? Be.has(t) && !s.values.length || Be.has(e) && !n.values.length ? ko(t, e) : Wt(Ps(Fo(n, s), s.values), i) : (Ct(!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"), se(t, e));
386
- };
387
- function Ss(t, e, i) {
388
- return typeof t == "number" && typeof e == "number" && typeof i == "number" ? V(t, e, i) : di(t)(t, e);
389
- }
390
- var jo = (t) => {
391
- const e = ({ timestamp: i }) => t(i);
392
- return {
393
- start: (i = !0) => A.update(e, i),
394
- stop: () => ot(e),
395
- now: () => B.isProcessing ? B.timestamp : O.now()
396
- };
397
- }, bs = (t, e, i = 10) => {
398
- let n = "";
399
- const s = Math.max(Math.round(e / i), 2);
400
- for (let o = 0; o < s; o++) n += Math.round(t(o / (s - 1)) * 1e4) / 1e4 + ", ";
401
- return `linear(${n.substring(0, n.length - 2)})`;
402
- }, As = 2e4;
403
- function pi(t) {
404
- let e = 0;
405
- const i = 50;
406
- let n = t.next(e);
407
- for (; !n.done && e < 2e4; )
408
- e += i, n = t.next(e);
409
- return e >= 2e4 ? 1 / 0 : e;
410
- }
411
- function No(t, e = 100, i) {
412
- const n = i({
413
- ...t,
414
- keyframes: [0, e]
415
- }), s = Math.min(pi(n), As);
416
- return {
417
- type: "keyframes",
418
- ease: (o) => n.next(s * o).value / e,
419
- duration: K(s)
420
- };
421
- }
422
- var M = {
423
- stiffness: 100,
424
- damping: 10,
425
- mass: 1,
426
- velocity: 0,
427
- duration: 800,
428
- bounce: 0.3,
429
- visualDuration: 0.3,
430
- restSpeed: {
431
- granular: 0.01,
432
- default: 2
433
- },
434
- restDelta: {
435
- granular: 5e-3,
436
- default: 0.5
437
- },
438
- minDuration: 0.01,
439
- maxDuration: 10,
440
- minDamping: 0.05,
441
- maxDamping: 1
442
- };
443
- function Ie(t, e) {
444
- return t * Math.sqrt(1 - e * e);
445
- }
446
- var Uo = 12;
447
- function Wo(t, e, i) {
448
- let n = i;
449
- for (let s = 1; s < Uo; s++) n = n - t(n) / e(n);
450
- return n;
451
- }
452
- var xe = 1e-3;
453
- function _o({ duration: t = M.duration, bounce: e = M.bounce, velocity: i = M.velocity, mass: n = M.mass }) {
454
- let s, o;
455
- Ct(t <= W(M.maxDuration), "Spring duration must be 10 seconds or less", "spring-duration-limit");
456
- let r = 1 - e;
457
- r = tt(M.minDamping, M.maxDamping, r), t = tt(M.minDuration, M.maxDuration, K(t)), r < 1 ? (s = (c) => {
458
- const u = c * r, h = u * t, f = u - i, p = Ie(c, r), d = Math.exp(-h);
459
- return xe - f / p * d;
460
- }, o = (c) => {
461
- const u = c * r * t, h = u * i + i, f = Math.pow(r, 2) * Math.pow(c, 2) * t, p = Math.exp(-u), d = Ie(Math.pow(c, 2), r);
462
- return (-s(c) + xe > 0 ? -1 : 1) * ((h - f) * p) / d;
463
- }) : (s = (c) => {
464
- const u = Math.exp(-c * t), h = (c - i) * t + 1;
465
- return -xe + u * h;
466
- }, o = (c) => Math.exp(-c * t) * ((i - c) * (t * t)));
467
- const a = 5 / t, l = Wo(s, o, a);
468
- if (t = W(t), isNaN(l)) return {
469
- stiffness: M.stiffness,
470
- damping: M.damping,
471
- duration: t
472
- };
473
- {
474
- const c = Math.pow(l, 2) * n;
475
- return {
476
- stiffness: c,
477
- damping: r * 2 * Math.sqrt(n * c),
478
- duration: t
479
- };
480
- }
481
- }
482
- var Ko = ["duration", "bounce"], $o = [
483
- "stiffness",
484
- "damping",
485
- "mass"
486
- ];
487
- function Ni(t, e) {
488
- return e.some((i) => t[i] !== void 0);
489
- }
490
- function zo(t) {
491
- let e = {
492
- velocity: M.velocity,
493
- stiffness: M.stiffness,
494
- damping: M.damping,
495
- mass: M.mass,
496
- isResolvedFromDuration: !1,
497
- ...t
498
- };
499
- if (!Ni(t, $o) && Ni(t, Ko))
500
- if (e.velocity = 0, t.visualDuration) {
501
- const i = t.visualDuration, n = 2 * Math.PI / (i * 1.2), s = n * n, o = 2 * tt(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(s);
502
- e = {
503
- ...e,
504
- mass: M.mass,
505
- stiffness: s,
506
- damping: o
507
- };
508
- } else {
509
- const i = _o({
510
- ...t,
511
- velocity: 0
512
- });
513
- e = {
514
- ...e,
515
- ...i,
516
- mass: M.mass
517
- }, e.isResolvedFromDuration = !0;
518
- }
519
- return e;
520
- }
521
- function re(t = M.visualDuration, e = M.bounce) {
522
- const i = typeof t != "object" ? {
523
- visualDuration: t,
524
- keyframes: [0, 1],
525
- bounce: e
526
- } : t;
527
- let { restSpeed: n, restDelta: s } = i;
528
- const o = i.keyframes[0], r = i.keyframes[i.keyframes.length - 1], a = {
529
- done: !1,
530
- value: o
531
- }, { stiffness: l, damping: c, mass: u, duration: h, velocity: f, isResolvedFromDuration: p } = zo({
532
- ...i,
533
- velocity: -K(i.velocity || 0)
534
- }), d = f || 0, m = c / (2 * Math.sqrt(l * u)), g = r - o, v = K(Math.sqrt(l / u)), x = Math.abs(g) < 5;
535
- n || (n = x ? M.restSpeed.granular : M.restSpeed.default), s || (s = x ? M.restDelta.granular : M.restDelta.default);
536
- let y, w, b, E, L, P;
537
- if (m < 1)
538
- b = Ie(v, m), E = (d + m * v * g) / b, y = (S) => r - Math.exp(-m * v * S) * (E * Math.sin(b * S) + g * Math.cos(b * S)), L = m * v * E + g * b, P = m * v * g - E * b, w = (S) => Math.exp(-m * v * S) * (L * Math.sin(b * S) + P * Math.cos(b * S));
539
- else if (m === 1) {
540
- y = (F) => r - Math.exp(-v * F) * (g + (d + v * g) * F);
541
- const S = d + v * g;
542
- w = (F) => Math.exp(-v * F) * (v * S * F - d);
543
- } else {
544
- const S = v * Math.sqrt(m * m - 1);
545
- y = (X) => {
546
- const et = Math.exp(-m * v * X), Y = Math.min(S * X, 300);
547
- return r - et * ((d + m * v * g) * Math.sinh(Y) + S * g * Math.cosh(Y)) / S;
548
- };
549
- const F = (d + m * v * g) / S, N = m * v * F - g * S, lt = m * v * g - F * S;
550
- w = (X) => {
551
- const et = Math.exp(-m * v * X), Y = Math.min(S * X, 300);
552
- return et * (N * Math.sinh(Y) + lt * Math.cosh(Y));
553
- };
554
- }
555
- const C = {
556
- calculatedDuration: p && h || null,
557
- velocity: (S) => W(w(S)),
558
- next: (S) => {
559
- if (!p && m < 1) {
560
- const N = Math.exp(-m * v * S), lt = Math.sin(b * S), X = Math.cos(b * S), et = r - N * (E * lt + g * X), Y = W(N * (L * lt + P * X));
561
- return a.done = Math.abs(Y) <= n && Math.abs(r - et) <= s, a.value = a.done ? r : et, a;
562
- }
563
- const F = y(S);
564
- if (p)
565
- a.done = S >= h;
566
- else {
567
- const N = W(w(S));
568
- a.done = Math.abs(N) <= n && Math.abs(r - F) <= s;
569
- }
570
- return a.value = a.done ? r : F, a;
571
- },
572
- toString: () => {
573
- const S = Math.min(pi(C), As), F = bs((N) => C.next(S * N).value, S, 30);
574
- return S + "ms " + F;
575
- },
576
- toTransition: () => {
577
- }
578
- };
579
- return C;
580
- }
581
- re.applyToOptions = (t) => {
582
- const e = No(t, 100, re);
583
- return t.ease = e.ease, t.duration = W(e.duration), t.type = "keyframes", t;
584
- };
585
- var Ho = 5;
586
- function Vs(t, e, i) {
587
- const n = Math.max(e - Ho, 0);
588
- return ss(i - t(n), e - n);
589
- }
590
- 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 }) {
591
- const h = t[0], f = {
592
- done: !1,
593
- value: h
594
- }, p = (P) => a !== void 0 && P < a || l !== void 0 && P > l, d = (P) => a === void 0 ? l : l === void 0 || Math.abs(a - P) < Math.abs(l - P) ? a : l;
595
- let m = i * e;
596
- const g = h + m, v = r === void 0 ? g : r(g);
597
- v !== g && (m = v - h);
598
- const x = (P) => -m * Math.exp(-P / n), y = (P) => v + x(P), w = (P) => {
599
- const C = x(P), S = y(P);
600
- f.done = Math.abs(C) <= c, f.value = f.done ? v : S;
601
- };
602
- let b, E;
603
- const L = (P) => {
604
- p(f.value) && (b = P, E = re({
605
- keyframes: [f.value, d(f.value)],
606
- velocity: Vs(y, P, f.value),
607
- damping: s,
608
- stiffness: o,
609
- restDelta: c,
610
- restSpeed: u
611
- }));
612
- };
613
- return L(0), {
614
- calculatedDuration: null,
615
- next: (P) => {
616
- let C = !1;
617
- return !E && b === void 0 && (C = !0, w(P), L(P)), b !== void 0 && P >= b ? E.next(P - b) : (!C && w(P), f);
618
- }
619
- };
620
- }
621
- function Go(t, e, i) {
622
- const n = [], s = i || rt.mix || Ss, o = t.length - 1;
623
- for (let r = 0; r < o; r++) {
624
- let a = s(t[r], t[r + 1]);
625
- e && (a = Wt(Array.isArray(e) ? e[r] || $ : e, a)), n.push(a);
626
- }
627
- return n;
628
- }
629
- function Xo(t, e, { clamp: i = !0, ease: n, mixer: s } = {}) {
630
- const o = t.length;
631
- if (it(o === e.length, "Both input and output ranges must be the same length", "range-length"), o === 1) return () => e[0];
632
- if (o === 2 && e[0] === e[1]) return () => e[1];
633
- const r = t[0] === t[1];
634
- t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
635
- const a = Go(e, n, s), l = a.length, c = (u) => {
636
- if (r && u < t[0]) return e[0];
637
- let h = 0;
638
- if (l > 1)
639
- for (; h < t.length - 2 && !(u < t[h + 1]); h++) ;
640
- const f = Ot(t[h], t[h + 1], u);
641
- return a[h](f);
642
- };
643
- return i ? (u) => c(tt(t[0], t[o - 1], u)) : c;
644
- }
645
- function Yo(t, e) {
646
- const i = t[t.length - 1];
647
- for (let n = 1; n <= e; n++) {
648
- const s = Ot(0, e, n);
649
- t.push(V(i, 1, s));
650
- }
651
- }
652
- function qo(t) {
653
- const e = [0];
654
- return Yo(e, t.length - 1), e;
655
- }
656
- function Zo(t, e) {
657
- return t.map((i) => i * e);
658
- }
659
- function Jo(t, e) {
660
- return t.map(() => e || ds).splice(0, t.length - 1);
661
- }
662
- function Pt({ duration: t = 300, keyframes: e, times: i, ease: n = "easeInOut" }) {
663
- const s = oo(n) ? n.map(ki) : ki(n), o = {
664
- done: !1,
665
- value: e[0]
666
- }, r = Xo(Zo(i && i.length === e.length ? i : qo(e), t), e, { ease: Array.isArray(s) ? s : Jo(e, s) });
667
- return {
668
- calculatedDuration: t,
669
- next: (a) => (o.value = r(a), o.done = a >= t, o)
670
- };
671
- }
672
- var Qo = (t) => t !== null;
673
- function fe(t, { repeat: e, repeatType: i = "loop" }, n, s = 1) {
674
- const o = t.filter(Qo), r = s < 0 || e && i !== "loop" && e % 2 === 1 ? 0 : o.length - 1;
675
- return !r || n === void 0 ? o[r] : n;
676
- }
677
- var ta = {
678
- decay: Fe,
679
- inertia: Fe,
680
- tween: Pt,
681
- keyframes: Pt,
682
- spring: re
683
- };
684
- function Ms(t) {
685
- typeof t.type == "string" && (t.type = ta[t.type]);
686
- }
687
- var mi = class {
688
- constructor() {
689
- this.updateFinished();
690
- }
691
- get finished() {
692
- return this._finished;
693
- }
694
- updateFinished() {
695
- this._finished = new Promise((t) => {
696
- this.resolve = t;
697
- });
698
- }
699
- notifyFinished() {
700
- this.resolve();
701
- }
702
- then(t, e) {
703
- return this.finished.then(t, e);
704
- }
705
- }, ea = (t) => t / 100, oe = class extends mi {
706
- constructor(t) {
707
- super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.delayState = {
708
- done: !1,
709
- value: void 0
710
- }, this.stop = () => {
711
- const { motionValue: e } = this.options;
712
- e && e.updatedAt !== O.now() && this.tick(O.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), this.options.onStop?.());
713
- }, vt.mainThread++, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
714
- }
715
- initAnimation() {
716
- const { options: t } = this;
717
- Ms(t);
718
- const { type: e = Pt, repeat: i = 0, repeatDelay: n = 0, repeatType: s, velocity: o = 0 } = t;
719
- let { keyframes: r } = t;
720
- const a = e || Pt;
721
- process.env.NODE_ENV !== "production" && a !== Pt && it(r.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`, "spring-two-frames"), a !== Pt && typeof r[0] != "number" && (this.mixKeyframes = Wt(ea, Ss(r[0], r[1])), r = [0, 100]);
722
- const l = a({
723
- ...t,
724
- keyframes: r
725
- });
726
- s === "mirror" && (this.mirroredGenerator = a({
727
- ...t,
728
- keyframes: [...r].reverse(),
729
- velocity: -o
730
- })), l.calculatedDuration === null && (l.calculatedDuration = pi(l));
731
- const { calculatedDuration: c } = l;
732
- this.calculatedDuration = c, this.resolvedDuration = c + n, this.totalDuration = this.resolvedDuration * (i + 1) - n, this.generator = l;
733
- }
734
- updateTime(t) {
735
- const e = Math.round(t - this.startTime) * this.playbackSpeed;
736
- this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = e;
737
- }
738
- tick(t, e = !1) {
739
- const { generator: i, totalDuration: n, mixKeyframes: s, mirroredGenerator: o, resolvedDuration: r, calculatedDuration: a } = this;
740
- if (this.startTime === null) return i.next(0);
741
- const { delay: l = 0, keyframes: c, repeat: u, repeatType: h, repeatDelay: f, type: p, onUpdate: d, finalKeyframe: m } = this.options;
742
- 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);
743
- const g = this.currentTime - l * (this.playbackSpeed >= 0 ? 1 : -1), v = this.playbackSpeed >= 0 ? g < 0 : g > n;
744
- this.currentTime = Math.max(g, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = n);
745
- let x = this.currentTime, y = i;
746
- if (u) {
747
- const L = Math.min(this.currentTime, n) / r;
748
- let P = Math.floor(L), C = L % 1;
749
- !C && L >= 1 && (C = 1), C === 1 && P--, P = Math.min(P, u + 1), P % 2 && (h === "reverse" ? (C = 1 - C, f && (C -= f / r)) : h === "mirror" && (y = o)), x = tt(0, 1, C) * r;
750
- }
751
- let w;
752
- v ? (this.delayState.value = c[0], w = this.delayState) : w = y.next(x), s && !v && (w.value = s(w.value));
753
- let { done: b } = w;
754
- !v && a !== null && (b = this.playbackSpeed >= 0 ? this.currentTime >= n : this.currentTime <= 0);
755
- const E = this.holdTime === null && (this.state === "finished" || this.state === "running" && b);
756
- return E && p !== Fe && (w.value = fe(c, this.options, m, this.speed)), d && d(w.value), E && this.finish(), w;
757
- }
758
- then(t, e) {
759
- return this.finished.then(t, e);
760
- }
761
- get duration() {
762
- return K(this.calculatedDuration);
763
- }
764
- get iterationDuration() {
765
- const { delay: t = 0 } = this.options || {};
766
- return this.duration + K(t);
767
- }
768
- get time() {
769
- return K(this.currentTime);
770
- }
771
- set time(t) {
772
- t = W(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));
773
- }
774
- getGeneratorVelocity() {
775
- const t = this.currentTime;
776
- if (t <= 0) return this.options.velocity || 0;
777
- if (this.generator.velocity) return this.generator.velocity(t);
778
- const e = this.generator.next(t).value;
779
- return Vs((i) => this.generator.next(i).value, t, e);
780
- }
781
- get speed() {
782
- return this.playbackSpeed;
783
- }
784
- set speed(t) {
785
- const e = this.playbackSpeed !== t;
786
- e && this.driver && this.updateTime(O.now()), this.playbackSpeed = t, e && this.driver && (this.time = K(this.currentTime));
787
- }
788
- play() {
789
- if (this.isStopped) return;
790
- const { driver: t = jo, startTime: e } = this.options;
791
- this.driver || (this.driver = t((n) => this.tick(n))), this.options.onPlay?.();
792
- const i = this.driver.now();
793
- 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();
794
- }
795
- pause() {
796
- this.state = "paused", this.updateTime(O.now()), this.holdTime = this.currentTime;
797
- }
798
- complete() {
799
- this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
800
- }
801
- finish() {
802
- this.notifyFinished(), this.teardown(), this.state = "finished", this.options.onComplete?.();
803
- }
804
- cancel() {
805
- this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), this.options.onCancel?.();
806
- }
807
- teardown() {
808
- this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null, vt.mainThread--;
809
- }
810
- stopDriver() {
811
- this.driver && (this.driver.stop(), this.driver = void 0);
812
- }
813
- sample(t) {
814
- return this.startTime = 0, this.tick(t, !0);
815
- }
816
- attachTimeline(t) {
817
- return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), this.driver?.stop(), t.observe(this);
818
- }
819
- };
820
- function ia(t) {
821
- for (let e = 1; e < t.length; e++) t[e] ?? (t[e] = t[e - 1]);
822
- }
823
- var mt = (t) => t * 180 / Math.PI, Oe = (t) => je(mt(Math.atan2(t[1], t[0]))), na = {
824
- x: 4,
825
- y: 5,
826
- translateX: 4,
827
- translateY: 5,
828
- scaleX: 0,
829
- scaleY: 3,
830
- scale: (t) => (Math.abs(t[0]) + Math.abs(t[3])) / 2,
831
- rotate: Oe,
832
- rotateZ: Oe,
833
- skewX: (t) => mt(Math.atan(t[1])),
834
- skewY: (t) => mt(Math.atan(t[2])),
835
- skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
836
- }, je = (t) => (t = t % 360, t < 0 && (t += 360), t), Ui = Oe, Wi = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), _i = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), sa = {
837
- x: 12,
838
- y: 13,
839
- z: 14,
840
- translateX: 12,
841
- translateY: 13,
842
- translateZ: 14,
843
- scaleX: Wi,
844
- scaleY: _i,
845
- scale: (t) => (Wi(t) + _i(t)) / 2,
846
- rotateX: (t) => je(mt(Math.atan2(t[6], t[5]))),
847
- rotateY: (t) => je(mt(Math.atan2(-t[2], t[0]))),
848
- rotateZ: Ui,
849
- rotate: Ui,
850
- skewX: (t) => mt(Math.atan(t[4])),
851
- skewY: (t) => mt(Math.atan(t[1])),
852
- skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
853
- };
854
- function Ne(t) {
855
- return t.includes("scale") ? 1 : 0;
856
- }
857
- function Ue(t, e) {
858
- if (!t || t === "none") return Ne(e);
859
- const i = t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
860
- let n, s;
861
- if (i)
862
- n = sa, s = i;
863
- else {
864
- const a = t.match(/^matrix\(([-\d.e\s,]+)\)$/u);
865
- n = na, s = a;
866
- }
867
- if (!s) return Ne(e);
868
- const o = n[e], r = s[1].split(",").map(oa);
869
- return typeof o == "function" ? o(r) : r[o];
870
- }
871
- var ra = (t, e) => {
872
- const { transform: i = "none" } = getComputedStyle(t);
873
- return Ue(i, e);
874
- };
875
- function oa(t) {
876
- return parseFloat(t.trim());
877
- }
878
- var Et = [
879
- "transformPerspective",
880
- "x",
881
- "y",
882
- "z",
883
- "translateX",
884
- "translateY",
885
- "translateZ",
886
- "scale",
887
- "scaleX",
888
- "scaleY",
889
- "rotate",
890
- "rotateX",
891
- "rotateY",
892
- "rotateZ",
893
- "skew",
894
- "skewX",
895
- "skewY"
896
- ], Rt = new Set(Et), Ki = (t) => t === Dt || t === T, aa = /* @__PURE__ */ new Set([
897
- "x",
898
- "y",
899
- "z"
900
- ]), la = Et.filter((t) => !aa.has(t));
901
- function ua(t) {
902
- const e = [];
903
- return la.forEach((i) => {
904
- const n = t.getValue(i);
905
- n !== void 0 && (e.push([i, n.get()]), n.set(i.startsWith("scale") ? 1 : 0));
906
- }), e;
907
- }
908
- var st = {
909
- width: ({ x: t }, { paddingLeft: e = "0", paddingRight: i = "0", boxSizing: n }) => {
910
- const s = t.max - t.min;
911
- return n === "border-box" ? s : s - parseFloat(e) - parseFloat(i);
912
- },
913
- height: ({ y: t }, { paddingTop: e = "0", paddingBottom: i = "0", boxSizing: n }) => {
914
- const s = t.max - t.min;
915
- return n === "border-box" ? s : s - parseFloat(e) - parseFloat(i);
916
- },
917
- top: (t, { top: e }) => parseFloat(e),
918
- left: (t, { left: e }) => parseFloat(e),
919
- bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
920
- right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
921
- x: (t, { transform: e }) => Ue(e, "x"),
922
- y: (t, { transform: e }) => Ue(e, "y")
923
- };
924
- st.translateX = st.x;
925
- st.translateY = st.y;
926
- var gt = /* @__PURE__ */ new Set(), We = !1, _e = !1, Ke = !1;
927
- function Cs() {
928
- if (_e) {
929
- const t = Array.from(gt).filter((n) => n.needsMeasurement), e = new Set(t.map((n) => n.element)), i = /* @__PURE__ */ new Map();
930
- e.forEach((n) => {
931
- const s = ua(n);
932
- s.length && (i.set(n, s), n.render());
933
- }), t.forEach((n) => n.measureInitialState()), e.forEach((n) => {
934
- n.render();
935
- const s = i.get(n);
936
- s && s.forEach(([o, r]) => {
937
- n.getValue(o)?.set(r);
938
- });
939
- }), t.forEach((n) => n.measureEndState()), t.forEach((n) => {
940
- n.suspendedScrollY !== void 0 && window.scrollTo(0, n.suspendedScrollY);
941
- });
942
- }
943
- _e = !1, We = !1, gt.forEach((t) => t.complete(Ke)), gt.clear();
944
- }
945
- function Ds() {
946
- gt.forEach((t) => {
947
- t.readKeyframes(), t.needsMeasurement && (_e = !0);
948
- });
949
- }
950
- function ca() {
951
- Ke = !0, Ds(), Cs(), Ke = !1;
952
- }
953
- var vi = class {
954
- constructor(t, e, i, n, s, o = !1) {
955
- 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;
956
- }
957
- scheduleResolve() {
958
- this.state = "scheduled", this.isAsync ? (gt.add(this), We || (We = !0, A.read(Ds), A.resolveKeyframes(Cs))) : (this.readKeyframes(), this.complete());
959
- }
960
- readKeyframes() {
961
- const { unresolvedKeyframes: t, name: e, element: i, motionValue: n } = this;
962
- if (t[0] === null) {
963
- const s = n?.get(), o = t[t.length - 1];
964
- if (s !== void 0) t[0] = s;
965
- else if (i && e) {
966
- const r = i.readValue(e, o);
967
- r != null && (t[0] = r);
968
- }
969
- t[0] === void 0 && (t[0] = o), n && s === void 0 && n.set(t[0]);
970
- }
971
- ia(t);
972
- }
973
- setFinalKeyframe() {
974
- }
975
- measureInitialState() {
976
- }
977
- renderEndStyles() {
978
- }
979
- measureEndState() {
980
- }
981
- complete(t = !1) {
982
- this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), gt.delete(this);
983
- }
984
- cancel() {
985
- this.state === "scheduled" && (gt.delete(this), this.state = "pending");
986
- }
987
- resume() {
988
- this.state === "pending" && this.scheduleResolve();
989
- }
990
- }, ha = (t) => t.startsWith("--");
991
- function Es(t, e, i) {
992
- ha(e) ? t.style.setProperty(e, i) : t.style[e] = i;
993
- }
994
- var fa = {};
995
- function Rs(t, e) {
996
- const i = /* @__PURE__ */ ns(t);
997
- return () => fa[e] ?? i();
998
- }
999
- var da = /* @__PURE__ */ Rs(() => window.ScrollTimeline !== void 0, "scrollTimeline"), Ls = /* @__PURE__ */ Rs(() => {
1000
- try {
1001
- document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1002
- } catch {
1003
- return !1;
1004
- }
1005
- return !0;
1006
- }, "linearEasing"), kt = ([t, e, i, n]) => `cubic-bezier(${t}, ${e}, ${i}, ${n})`, $i = {
1007
- linear: "linear",
1008
- ease: "ease",
1009
- easeIn: "ease-in",
1010
- easeOut: "ease-out",
1011
- easeInOut: "ease-in-out",
1012
- circIn: /* @__PURE__ */ kt([
1013
- 0,
1014
- 0.65,
1015
- 0.55,
1016
- 1
1017
- ]),
1018
- circOut: /* @__PURE__ */ kt([
1019
- 0.55,
1020
- 0,
1021
- 1,
1022
- 0.45
1023
- ]),
1024
- backIn: /* @__PURE__ */ kt([
1025
- 0.31,
1026
- 0.01,
1027
- 0.66,
1028
- -0.59
1029
- ]),
1030
- backOut: /* @__PURE__ */ kt([
1031
- 0.33,
1032
- 1.53,
1033
- 0.69,
1034
- 0.99
1035
- ])
1036
- };
1037
- function ks(t, e) {
1038
- if (t) return typeof t == "function" ? Ls() ? bs(t, e) : "ease-out" : ps(t) ? kt(t) : Array.isArray(t) ? t.map((i) => ks(i, e) || $i.easeOut) : $i[t];
1039
- }
1040
- function pa(t, e, i, { delay: n = 0, duration: s = 300, repeat: o = 0, repeatType: r = "loop", ease: a = "easeOut", times: l } = {}, c = void 0) {
1041
- const u = { [e]: i };
1042
- l && (u.offset = l);
1043
- const h = ks(a, s);
1044
- Array.isArray(h) && (u.easing = h), J.value && vt.waapi++;
1045
- const f = {
1046
- delay: n,
1047
- duration: s,
1048
- easing: Array.isArray(h) ? "linear" : h,
1049
- fill: "both",
1050
- iterations: o + 1,
1051
- direction: r === "reverse" ? "alternate" : "normal"
1052
- };
1053
- c && (f.pseudoElement = c);
1054
- const p = t.animate(u, f);
1055
- return J.value && p.finished.finally(() => {
1056
- vt.waapi--;
1057
- }), p;
1058
- }
1059
- function Bs(t) {
1060
- return typeof t == "function" && "applyToOptions" in t;
1061
- }
1062
- function ma({ type: t, ...e }) {
1063
- return Bs(t) && Ls() ? t.applyToOptions(e) : (e.duration ?? (e.duration = 300), e.ease ?? (e.ease = "easeOut"), e);
1064
- }
1065
- var Is = class extends mi {
1066
- constructor(t) {
1067
- if (super(), this.finishedTime = null, this.isStopped = !1, this.manualStartTime = null, !t) return;
1068
- const { element: e, name: i, keyframes: n, pseudoElement: s, allowFlatten: o = !1, finalKeyframe: r, onComplete: a } = t;
1069
- this.isPseudoElement = !!s, this.allowFlatten = o, this.options = t, it(typeof t.type != "string", `Mini animate() doesn't support "type" as a string.`, "mini-spring");
1070
- const l = ma(t);
1071
- this.animation = pa(e, i, n, l, s), l.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1072
- if (this.finishedTime = this.time, !s) {
1073
- const c = fe(n, this.options, r, this.speed);
1074
- this.updateMotionValue && this.updateMotionValue(c), Es(e, i, c), this.animation.cancel();
1075
- }
1076
- a?.(), this.notifyFinished();
1077
- };
1078
- }
1079
- play() {
1080
- this.isStopped || (this.manualStartTime = null, this.animation.play(), this.state === "finished" && this.updateFinished());
1081
- }
1082
- pause() {
1083
- this.animation.pause();
1084
- }
1085
- complete() {
1086
- this.animation.finish?.();
1087
- }
1088
- cancel() {
1089
- try {
1090
- this.animation.cancel();
1091
- } catch {
1092
- }
1093
- }
1094
- stop() {
1095
- if (this.isStopped) return;
1096
- this.isStopped = !0;
1097
- const { state: t } = this;
1098
- t === "idle" || t === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
1099
- }
1100
- commitStyles() {
1101
- const t = this.options?.element;
1102
- !this.isPseudoElement && t?.isConnected && this.animation.commitStyles?.();
1103
- }
1104
- get duration() {
1105
- const t = this.animation.effect?.getComputedTiming?.().duration || 0;
1106
- return K(Number(t));
1107
- }
1108
- get iterationDuration() {
1109
- const { delay: t = 0 } = this.options || {};
1110
- return this.duration + K(t);
1111
- }
1112
- get time() {
1113
- return K(Number(this.animation.currentTime) || 0);
1114
- }
1115
- set time(t) {
1116
- const e = this.finishedTime !== null;
1117
- this.manualStartTime = null, this.finishedTime = null, this.animation.currentTime = W(t), e && this.animation.pause();
1118
- }
1119
- get speed() {
1120
- return this.animation.playbackRate;
1121
- }
1122
- set speed(t) {
1123
- t < 0 && (this.finishedTime = null), this.animation.playbackRate = t;
1124
- }
1125
- get state() {
1126
- return this.finishedTime !== null ? "finished" : this.animation.playState;
1127
- }
1128
- get startTime() {
1129
- return this.manualStartTime ?? Number(this.animation.startTime);
1130
- }
1131
- set startTime(t) {
1132
- this.manualStartTime = this.animation.startTime = t;
1133
- }
1134
- attachTimeline({ timeline: t, rangeStart: e, rangeEnd: i, observe: n }) {
1135
- return this.allowFlatten && this.animation.effect?.updateTiming({ easing: "linear" }), this.animation.onfinish = null, t && da() ? (this.animation.timeline = t, e && (this.animation.rangeStart = e), i && (this.animation.rangeEnd = i), $) : n(this);
1136
- }
1137
- }, Fs = {
1138
- anticipate: cs,
1139
- backInOut: us,
1140
- circInOut: fs
1141
- };
1142
- function va(t) {
1143
- return t in Fs;
1144
- }
1145
- function ga(t) {
1146
- typeof t.ease == "string" && va(t.ease) && (t.ease = Fs[t.ease]);
1147
- }
1148
- var we = 10, ya = class extends Is {
1149
- constructor(t) {
1150
- ga(t), Ms(t), super(t), t.startTime !== void 0 && t.autoplay !== !1 && (this.startTime = t.startTime), this.options = t;
1151
- }
1152
- updateMotionValue(t) {
1153
- const { motionValue: e, onUpdate: i, onComplete: n, element: s, ...o } = this.options;
1154
- if (!e) return;
1155
- if (t !== void 0) {
1156
- e.set(t);
1157
- return;
1158
- }
1159
- const r = new oe({
1160
- ...o,
1161
- autoplay: !1
1162
- }), a = Math.max(we, O.now() - this.startTime), l = tt(0, we, a - we), c = r.sample(a).value, { name: u } = this.options;
1163
- s && u && Es(s, u, c), e.setWithVelocity(r.sample(Math.max(0, a - l)).value, c, l), r.stop();
1164
- }
1165
- }, zi = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && (G.test(t) || t === "0") && !t.startsWith("url("));
1166
- function Ta(t) {
1167
- const e = t[0];
1168
- if (t.length === 1) return !0;
1169
- for (let i = 0; i < t.length; i++) if (t[i] !== e) return !0;
1170
- }
1171
- function xa(t, e, i, n) {
1172
- const s = t[0];
1173
- if (s === null) return !1;
1174
- if (e === "display" || e === "visibility") return !0;
1175
- const o = t[t.length - 1], r = zi(s, e), a = zi(o, e);
1176
- return Ct(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 : Ta(t) || (i === "spring" || Bs(i)) && n;
1177
- }
1178
- function $e(t) {
1179
- t.duration = 0, t.type = "keyframes";
1180
- }
1181
- var Os = /* @__PURE__ */ new Set([
1182
- "opacity",
1183
- "clipPath",
1184
- "filter",
1185
- "transform"
1186
- ]), wa = /^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;
1187
- function Pa(t) {
1188
- for (let e = 0; e < t.length; e++) if (typeof t[e] == "string" && wa.test(t[e])) return !0;
1189
- return !1;
1190
- }
1191
- var Sa = /* @__PURE__ */ new Set([
1192
- "color",
1193
- "backgroundColor",
1194
- "outlineColor",
1195
- "fill",
1196
- "stroke",
1197
- "borderColor",
1198
- "borderTopColor",
1199
- "borderRightColor",
1200
- "borderBottomColor",
1201
- "borderLeftColor"
1202
- ]), ba = /* @__PURE__ */ ns(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1203
- function Aa(t) {
1204
- const { motionValue: e, name: i, repeatDelay: n, repeatType: s, damping: o, type: r, keyframes: a } = t;
1205
- if (!(e?.owner?.current instanceof HTMLElement)) return !1;
1206
- const { onUpdate: l, transformTemplate: c } = e.owner.getProps();
1207
- return ba() && i && (Os.has(i) || Sa.has(i) && Pa(a)) && (i !== "transform" || !c) && !l && !n && s !== "mirror" && o !== 0 && r !== "inertia";
1208
- }
1209
- var Va = 40, Ma = class extends mi {
1210
- 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 }) {
1211
- super(), this.stop = () => {
1212
- this._animation && (this._animation.stop(), this.stopTimeline?.()), this.keyframeResolver?.cancel();
1213
- }, this.createdAt = O.now();
1214
- const h = {
1215
- autoplay: t,
1216
- delay: e,
1217
- type: i,
1218
- repeat: n,
1219
- repeatDelay: s,
1220
- repeatType: o,
1221
- name: a,
1222
- motionValue: l,
1223
- element: c,
1224
- ...u
1225
- }, f = c?.KeyframeResolver || vi;
1226
- this.keyframeResolver = new f(r, (p, d, m) => this.onKeyframesResolved(p, d, h, !m), a, l, c), this.keyframeResolver?.scheduleResolve();
1227
- }
1228
- onKeyframesResolved(t, e, i, n) {
1229
- this.keyframeResolver = void 0;
1230
- const { name: s, type: o, velocity: r, delay: a, isHandoff: l, onUpdate: c } = i;
1231
- this.resolvedAt = O.now();
1232
- let u = !0;
1233
- xa(t, s, o, r) || (u = !1, (rt.instantAnimations || !a) && c?.(fe(t, i, e)), t[0] = t[t.length - 1], $e(i), i.repeat = 0);
1234
- const h = {
1235
- startTime: n ? this.resolvedAt ? this.resolvedAt - this.createdAt > Va ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1236
- finalKeyframe: e,
1237
- ...i,
1238
- keyframes: t
1239
- }, f = u && !l && Aa(h), p = h.motionValue?.owner?.current;
1240
- let d;
1241
- if (f) try {
1242
- d = new ya({
1243
- ...h,
1244
- element: p
1245
- });
1246
- } catch {
1247
- d = new oe(h);
1248
- }
1249
- else d = new oe(h);
1250
- d.finished.then(() => {
1251
- this.notifyFinished();
1252
- }).catch($), this.pendingTimeline && (this.stopTimeline = d.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = d;
1253
- }
1254
- get finished() {
1255
- return this._animation ? this.animation.finished : this._finished;
1256
- }
1257
- then(t, e) {
1258
- return this.finished.finally(t).then(() => {
1259
- });
1260
- }
1261
- get animation() {
1262
- return this._animation || (this.keyframeResolver?.resume(), ca()), this._animation;
1263
- }
1264
- get duration() {
1265
- return this.animation.duration;
1266
- }
1267
- get iterationDuration() {
1268
- return this.animation.iterationDuration;
1269
- }
1270
- get time() {
1271
- return this.animation.time;
1272
- }
1273
- set time(t) {
1274
- this.animation.time = t;
1275
- }
1276
- get speed() {
1277
- return this.animation.speed;
1278
- }
1279
- get state() {
1280
- return this.animation.state;
1281
- }
1282
- set speed(t) {
1283
- this.animation.speed = t;
1284
- }
1285
- get startTime() {
1286
- return this.animation.startTime;
1287
- }
1288
- attachTimeline(t) {
1289
- return this._animation ? this.stopTimeline = this.animation.attachTimeline(t) : this.pendingTimeline = t, () => this.stop();
1290
- }
1291
- play() {
1292
- this.animation.play();
1293
- }
1294
- pause() {
1295
- this.animation.pause();
1296
- }
1297
- complete() {
1298
- this.animation.complete();
1299
- }
1300
- cancel() {
1301
- this._animation && this.animation.cancel(), this.keyframeResolver?.cancel();
1302
- }
1303
- };
1304
- function js(t, e, i, n = 0, s = 1) {
1305
- const o = Array.from(t).sort((l, c) => l.sortNodePosition(c)).indexOf(e), r = t.size, a = (r - 1) * n;
1306
- return typeof i == "function" ? i(o, r) : s === 1 ? o * n : a - o * n;
1307
- }
1308
- var Ca = /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;
1309
- function Da(t) {
1310
- const e = Ca.exec(t);
1311
- if (!e) return [,];
1312
- const [, i, n, s] = e;
1313
- return [`--${i ?? n}`, s];
1314
- }
1315
- var Ea = 4;
1316
- function Ns(t, e, i = 1) {
1317
- it(i <= Ea, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`, "max-css-var-depth");
1318
- const [n, s] = Da(t);
1319
- if (!n) return;
1320
- const o = window.getComputedStyle(e).getPropertyValue(n);
1321
- if (o) {
1322
- const r = o.trim();
1323
- return ts(r) ? parseFloat(r) : r;
1324
- }
1325
- return ci(s) ? Ns(s, e, i + 1) : s;
1326
- }
1327
- var Ra = {
1328
- type: "spring",
1329
- stiffness: 500,
1330
- damping: 25,
1331
- restSpeed: 10
1332
- }, La = (t) => ({
1333
- type: "spring",
1334
- stiffness: 550,
1335
- damping: t === 0 ? 2 * Math.sqrt(550) : 30,
1336
- restSpeed: 10
1337
- }), ka = {
1338
- type: "keyframes",
1339
- duration: 0.8
1340
- }, Ba = {
1341
- type: "keyframes",
1342
- ease: [
1343
- 0.25,
1344
- 0.1,
1345
- 0.35,
1346
- 1
1347
- ],
1348
- duration: 0.3
1349
- }, Ia = (t, { keyframes: e }) => e.length > 2 ? ka : Rt.has(t) ? t.startsWith("scale") ? La(e[1]) : Ra : Ba;
1350
- function Us(t, e) {
1351
- if (t?.inherit && e) {
1352
- const { inherit: i, ...n } = t;
1353
- return {
1354
- ...e,
1355
- ...n
1356
- };
1357
- }
1358
- return t;
1359
- }
1360
- function gi(t, e) {
1361
- const i = t?.[e] ?? t?.default ?? t;
1362
- return i !== t ? Us(i, t) : i;
1363
- }
1364
- var Fa = /* @__PURE__ */ new Set([
1365
- "when",
1366
- "delay",
1367
- "delayChildren",
1368
- "staggerChildren",
1369
- "staggerDirection",
1370
- "repeat",
1371
- "repeatType",
1372
- "repeatDelay",
1373
- "from",
1374
- "elapsed"
1375
- ]);
1376
- function Oa(t) {
1377
- for (const e in t) if (!Fa.has(e)) return !0;
1378
- return !1;
1379
- }
1380
- var yi = (t, e, i, n = {}, s, o) => (r) => {
1381
- const a = gi(n, t) || {}, l = a.delay || n.delay || 0;
1382
- let { elapsed: c = 0 } = n;
1383
- c = c - W(l);
1384
- const u = {
1385
- keyframes: Array.isArray(i) ? i : [null, i],
1386
- ease: "easeOut",
1387
- velocity: e.getVelocity(),
1388
- ...a,
1389
- delay: -c,
1390
- onUpdate: (f) => {
1391
- e.set(f), a.onUpdate && a.onUpdate(f);
1392
- },
1393
- onComplete: () => {
1394
- r(), a.onComplete && a.onComplete();
1395
- },
1396
- name: t,
1397
- motionValue: e,
1398
- element: o ? void 0 : s
1399
- };
1400
- Oa(a) || Object.assign(u, Ia(t, u)), u.duration && (u.duration = W(u.duration)), u.repeatDelay && (u.repeatDelay = W(u.repeatDelay)), u.from !== void 0 && (u.keyframes[0] = u.from);
1401
- let h = !1;
1402
- if ((u.type === !1 || u.duration === 0 && !u.repeatDelay) && ($e(u), u.delay === 0 && (h = !0)), (rt.instantAnimations || rt.skipAnimations || s?.shouldSkipAnimations) && (h = !0, $e(u), u.delay = 0), u.allowFlatten = !a.type && !a.ease, h && !o && e.get() !== void 0) {
1403
- const f = fe(u.keyframes, a);
1404
- if (f !== void 0) {
1405
- A.update(() => {
1406
- u.onUpdate(f), u.onComplete();
1407
- });
1408
- return;
1409
- }
1410
- }
1411
- return a.isSync ? new oe(u) : new Ma(u);
1412
- };
1413
- function Hi(t) {
1414
- const e = [{}, {}];
1415
- return t?.values.forEach((i, n) => {
1416
- e[0][n] = i.get(), e[1][n] = i.getVelocity();
1417
- }), e;
1418
- }
1419
- function Ti(t, e, i, n) {
1420
- if (typeof e == "function") {
1421
- const [s, o] = Hi(n);
1422
- e = e(i !== void 0 ? i : t.custom, s, o);
1423
- }
1424
- if (typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function") {
1425
- const [s, o] = Hi(n);
1426
- e = e(i !== void 0 ? i : t.custom, s, o);
1427
- }
1428
- return e;
1429
- }
1430
- function yt(t, e, i) {
1431
- const n = t.getProps();
1432
- return Ti(n, e, i !== void 0 ? i : n.custom, t);
1433
- }
1434
- var Ws = /* @__PURE__ */ new Set([
1435
- "width",
1436
- "height",
1437
- "top",
1438
- "left",
1439
- "right",
1440
- "bottom",
1441
- ...Et
1442
- ]), Gi = 30, ja = (t) => !isNaN(parseFloat(t)), Xi = { current: void 0 }, Na = class {
1443
- constructor(t, e = {}) {
1444
- this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (i) => {
1445
- const n = O.now();
1446
- 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))
1447
- for (const s of this.dependents) s.dirty();
1448
- }, this.hasAnimated = !1, this.setCurrent(t), this.owner = e.owner;
1449
- }
1450
- setCurrent(t) {
1451
- this.current = t, this.updatedAt = O.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = ja(this.current));
1452
- }
1453
- setPrevFrameValue(t = this.current) {
1454
- this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
1455
- }
1456
- onChange(t) {
1457
- return process.env.NODE_ENV !== "production" && ai(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
1458
- }
1459
- on(t, e) {
1460
- this.events[t] || (this.events[t] = new oi());
1461
- const i = this.events[t].add(e);
1462
- return t === "change" ? () => {
1463
- i(), A.read(() => {
1464
- this.events.change.getSize() || this.stop();
1465
- });
1466
- } : i;
1467
- }
1468
- clearListeners() {
1469
- for (const t in this.events) this.events[t].clear();
1470
- }
1471
- attach(t, e) {
1472
- this.passiveEffect = t, this.stopPassiveEffect = e;
1473
- }
1474
- set(t) {
1475
- this.passiveEffect ? this.passiveEffect(t, this.updateAndNotify) : this.updateAndNotify(t);
1476
- }
1477
- setWithVelocity(t, e, i) {
1478
- this.set(e), this.prev = void 0, this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt - i;
1479
- }
1480
- jump(t, e = !0) {
1481
- this.updateAndNotify(t), this.prev = t, this.prevUpdatedAt = this.prevFrameValue = void 0, e && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1482
- }
1483
- dirty() {
1484
- this.events.change?.notify(this.current);
1485
- }
1486
- addDependent(t) {
1487
- this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(t);
1488
- }
1489
- removeDependent(t) {
1490
- this.dependents && this.dependents.delete(t);
1491
- }
1492
- get() {
1493
- return Xi.current && Xi.current.push(this), this.current;
1494
- }
1495
- getPrevious() {
1496
- return this.prev;
1497
- }
1498
- getVelocity() {
1499
- const t = O.now();
1500
- if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Gi) return 0;
1501
- const e = Math.min(this.updatedAt - this.prevUpdatedAt, Gi);
1502
- return ss(parseFloat(this.current) - parseFloat(this.prevFrameValue), e);
1503
- }
1504
- start(t) {
1505
- return this.stop(), new Promise((e) => {
1506
- this.hasAnimated = !0, this.animation = t(e), this.events.animationStart && this.events.animationStart.notify();
1507
- }).then(() => {
1508
- this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
1509
- });
1510
- }
1511
- stop() {
1512
- this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
1513
- }
1514
- isAnimating() {
1515
- return !!this.animation;
1516
- }
1517
- clearAnimation() {
1518
- delete this.animation;
1519
- }
1520
- destroy() {
1521
- this.dependents?.clear(), this.events.destroy?.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1522
- }
1523
- };
1524
- function Vt(t, e) {
1525
- return new Na(t, e);
1526
- }
1527
- var ze = (t) => Array.isArray(t);
1528
- function Ua(t, e, i) {
1529
- t.hasValue(e) ? t.getValue(e).set(i) : t.addValue(e, Vt(i));
1530
- }
1531
- function Wa(t) {
1532
- return ze(t) ? t[t.length - 1] || 0 : t;
1533
- }
1534
- function _a(t, e) {
1535
- let { transitionEnd: i = {}, transition: n = {}, ...s } = yt(t, e) || {};
1536
- s = {
1537
- ...s,
1538
- ...i
1539
- };
1540
- for (const o in s) Ua(t, o, Wa(s[o]));
1541
- }
1542
- var I = (t) => !!(t && t.getVelocity);
1543
- function Ka(t) {
1544
- return !!(I(t) && t.add);
1545
- }
1546
- function He(t, e) {
1547
- const i = t.getValue("willChange");
1548
- if (Ka(i)) return i.add(e);
1549
- if (!i && rt.WillChange) {
1550
- const n = new rt.WillChange("auto");
1551
- t.addValue("willChange", n), n.add(e);
1552
- }
1553
- }
1554
- function xi(t) {
1555
- return t.replace(/([A-Z])/g, (e) => `-${e.toLowerCase()}`);
1556
- }
1557
- var $a = "framerAppearId", _s = "data-" + xi($a);
1558
- function Ks(t) {
1559
- return t.props[_s];
1560
- }
1561
- function za({ protectedKeys: t, needsAnimating: e }, i) {
1562
- const n = t.hasOwnProperty(i) && e[i] !== !0;
1563
- return e[i] = !1, n;
1564
- }
1565
- function $s(t, e, { delay: i = 0, transitionOverride: n, type: s } = {}) {
1566
- let { transition: o, transitionEnd: r, ...a } = e;
1567
- const l = t.getDefaultTransition();
1568
- o = o ? Us(o, l) : l;
1569
- const c = o?.reduceMotion;
1570
- n && (o = n);
1571
- const u = [], h = s && t.animationState && t.animationState.getState()[s];
1572
- for (const f in a) {
1573
- const p = t.getValue(f, t.latestValues[f] ?? null), d = a[f];
1574
- if (d === void 0 || h && za(h, f)) continue;
1575
- const m = {
1576
- delay: i,
1577
- ...gi(o || {}, f)
1578
- }, g = p.get();
1579
- if (g !== void 0 && !p.isAnimating() && !Array.isArray(d) && d === g && !m.velocity) {
1580
- A.update(() => p.set(d));
1581
- continue;
1582
- }
1583
- let v = !1;
1584
- if (window.MotionHandoffAnimation) {
1585
- const w = Ks(t);
1586
- if (w) {
1587
- const b = window.MotionHandoffAnimation(w, f, A);
1588
- b !== null && (m.startTime = b, v = !0);
1589
- }
1590
- }
1591
- He(t, f);
1592
- const x = c ?? t.shouldReduceMotion;
1593
- p.start(yi(f, p, d, x && Ws.has(f) ? { type: !1 } : m, t, v));
1594
- const y = p.animation;
1595
- y && u.push(y);
1596
- }
1597
- if (r) {
1598
- const f = () => A.update(() => {
1599
- r && _a(t, r);
1600
- });
1601
- u.length ? Promise.all(u).then(f) : f();
1602
- }
1603
- return u;
1604
- }
1605
- function Ge(t, e, i = {}) {
1606
- const n = yt(t, e, i.type === "exit" ? t.presenceContext?.custom : void 0);
1607
- let { transition: s = t.getDefaultTransition() || {} } = n || {};
1608
- i.transitionOverride && (s = i.transitionOverride);
1609
- const o = n ? () => Promise.all($s(t, n, i)) : () => Promise.resolve(), r = t.variantChildren && t.variantChildren.size ? (l = 0) => {
1610
- const { delayChildren: c = 0, staggerChildren: u, staggerDirection: h } = s;
1611
- return Ha(t, e, l, c, u, h, i);
1612
- } : () => Promise.resolve(), { when: a } = s;
1613
- if (a) {
1614
- const [l, c] = a === "beforeChildren" ? [o, r] : [r, o];
1615
- return l().then(() => c());
1616
- } else return Promise.all([o(), r(i.delay)]);
1617
- }
1618
- function Ha(t, e, i = 0, n = 0, s = 0, o = 1, r) {
1619
- const a = [];
1620
- for (const l of t.variantChildren)
1621
- l.notify("AnimationStart", e), a.push(Ge(l, e, {
1622
- ...r,
1623
- delay: i + (typeof n == "function" ? 0 : n) + js(t.variantChildren, l, n, s, o)
1624
- }).then(() => l.notify("AnimationComplete", e)));
1625
- return Promise.all(a);
1626
- }
1627
- function Ga(t, e, i = {}) {
1628
- t.notify("AnimationStart", e);
1629
- let n;
1630
- if (Array.isArray(e)) {
1631
- const s = e.map((o) => Ge(t, o, i));
1632
- n = Promise.all(s);
1633
- } else if (typeof e == "string") n = Ge(t, e, i);
1634
- else {
1635
- const s = typeof e == "function" ? yt(t, e, i.custom) : e;
1636
- n = Promise.all($s(t, s, i));
1637
- }
1638
- return n.then(() => {
1639
- t.notify("AnimationComplete", e);
1640
- });
1641
- }
1642
- var Xa = {
1643
- test: (t) => t === "auto",
1644
- parse: (t) => t
1645
- }, zs = (t) => (e) => e.test(t), Hs = [
1646
- Dt,
1647
- T,
1648
- Q,
1649
- nt,
1650
- To,
1651
- yo,
1652
- Xa
1653
- ], Yi = (t) => Hs.find(zs(t));
1654
- function Ya(t) {
1655
- return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || is(t) : !0;
1656
- }
1657
- var qa = /* @__PURE__ */ new Set([
1658
- "brightness",
1659
- "contrast",
1660
- "saturate",
1661
- "opacity"
1662
- ]);
1663
- function Za(t) {
1664
- const [e, i] = t.slice(0, -1).split("(");
1665
- if (e === "drop-shadow") return t;
1666
- const [n] = i.match(hi) || [];
1667
- if (!n) return t;
1668
- const s = i.replace(n, "");
1669
- let o = qa.has(e) ? 1 : 0;
1670
- return n !== i && (o *= 100), e + "(" + o + s + ")";
1671
- }
1672
- var Ja = /\b([a-z-]*)\(.*?\)/gu, Xe = {
1673
- ...G,
1674
- getAnimatableNone: (t) => {
1675
- const e = t.match(Ja);
1676
- return e ? e.map(Za).join(" ") : t;
1677
- }
1678
- }, Ye = {
1679
- ...G,
1680
- getAnimatableNone: (t) => {
1681
- const e = G.parse(t);
1682
- return G.createTransformer(t)(e.map((i) => typeof i == "number" ? 0 : typeof i == "object" ? {
1683
- ...i,
1684
- alpha: 1
1685
- } : i));
1686
- }
1687
- }, qi = {
1688
- ...Dt,
1689
- transform: Math.round
1690
- }, Qa = {
1691
- rotate: nt,
1692
- rotateX: nt,
1693
- rotateY: nt,
1694
- rotateZ: nt,
1695
- scale: Ht,
1696
- scaleX: Ht,
1697
- scaleY: Ht,
1698
- scaleZ: Ht,
1699
- skew: nt,
1700
- skewX: nt,
1701
- skewY: nt,
1702
- distance: T,
1703
- translateX: T,
1704
- translateY: T,
1705
- translateZ: T,
1706
- x: T,
1707
- y: T,
1708
- z: T,
1709
- perspective: T,
1710
- transformPerspective: T,
1711
- opacity: jt,
1712
- originX: Ii,
1713
- originY: Ii,
1714
- originZ: T
1715
- }, wi = {
1716
- borderWidth: T,
1717
- borderTopWidth: T,
1718
- borderRightWidth: T,
1719
- borderBottomWidth: T,
1720
- borderLeftWidth: T,
1721
- borderRadius: T,
1722
- borderTopLeftRadius: T,
1723
- borderTopRightRadius: T,
1724
- borderBottomRightRadius: T,
1725
- borderBottomLeftRadius: T,
1726
- width: T,
1727
- maxWidth: T,
1728
- height: T,
1729
- maxHeight: T,
1730
- top: T,
1731
- right: T,
1732
- bottom: T,
1733
- left: T,
1734
- inset: T,
1735
- insetBlock: T,
1736
- insetBlockStart: T,
1737
- insetBlockEnd: T,
1738
- insetInline: T,
1739
- insetInlineStart: T,
1740
- insetInlineEnd: T,
1741
- padding: T,
1742
- paddingTop: T,
1743
- paddingRight: T,
1744
- paddingBottom: T,
1745
- paddingLeft: T,
1746
- paddingBlock: T,
1747
- paddingBlockStart: T,
1748
- paddingBlockEnd: T,
1749
- paddingInline: T,
1750
- paddingInlineStart: T,
1751
- paddingInlineEnd: T,
1752
- margin: T,
1753
- marginTop: T,
1754
- marginRight: T,
1755
- marginBottom: T,
1756
- marginLeft: T,
1757
- marginBlock: T,
1758
- marginBlockStart: T,
1759
- marginBlockEnd: T,
1760
- marginInline: T,
1761
- marginInlineStart: T,
1762
- marginInlineEnd: T,
1763
- fontSize: T,
1764
- backgroundPositionX: T,
1765
- backgroundPositionY: T,
1766
- ...Qa,
1767
- zIndex: qi,
1768
- fillOpacity: jt,
1769
- strokeOpacity: jt,
1770
- numOctaves: qi
1771
- }, tl = {
1772
- ...wi,
1773
- color: D,
1774
- backgroundColor: D,
1775
- outlineColor: D,
1776
- fill: D,
1777
- stroke: D,
1778
- borderColor: D,
1779
- borderTopColor: D,
1780
- borderRightColor: D,
1781
- borderBottomColor: D,
1782
- borderLeftColor: D,
1783
- filter: Xe,
1784
- WebkitFilter: Xe,
1785
- mask: Ye,
1786
- WebkitMask: Ye
1787
- }, Gs = (t) => tl[t], el = /* @__PURE__ */ new Set([Xe, Ye]);
1788
- function Xs(t, e) {
1789
- let i = Gs(t);
1790
- return el.has(i) || (i = G), i.getAnimatableNone ? i.getAnimatableNone(e) : void 0;
1791
- }
1792
- var il = /* @__PURE__ */ new Set([
1793
- "auto",
1794
- "none",
1795
- "0"
1796
- ]);
1797
- function nl(t, e, i) {
1798
- let n = 0, s;
1799
- for (; n < t.length && !s; ) {
1800
- const o = t[n];
1801
- typeof o == "string" && !il.has(o) && At(o).values.length && (s = t[n]), n++;
1802
- }
1803
- if (s && i) for (const o of e) t[o] = Xs(i, s);
1804
- }
1805
- var sl = class extends vi {
1806
- constructor(t, e, i, n, s) {
1807
- super(t, e, i, n, s, !0);
1808
- }
1809
- readKeyframes() {
1810
- const { unresolvedKeyframes: t, element: e, name: i } = this;
1811
- if (!e || !e.current) return;
1812
- super.readKeyframes();
1813
- for (let a = 0; a < t.length; a++) {
1814
- let l = t[a];
1815
- if (typeof l == "string" && (l = l.trim(), ci(l))) {
1816
- const c = Ns(l, e.current);
1817
- c !== void 0 && (t[a] = c), a === t.length - 1 && (this.finalKeyframe = l);
1818
- }
1819
- }
1820
- if (this.resolveNoneKeyframes(), !Ws.has(i) || t.length !== 2) return;
1821
- const [n, s] = t, o = Yi(n), r = Yi(s);
1822
- if (Bi(n) !== Bi(s) && st[i]) {
1823
- this.needsMeasurement = !0;
1824
- return;
1825
- }
1826
- if (o !== r)
1827
- if (Ki(o) && Ki(r)) for (let a = 0; a < t.length; a++) {
1828
- const l = t[a];
1829
- typeof l == "string" && (t[a] = parseFloat(l));
1830
- }
1831
- else st[i] && (this.needsMeasurement = !0);
1832
- }
1833
- resolveNoneKeyframes() {
1834
- const { unresolvedKeyframes: t, name: e } = this, i = [];
1835
- for (let n = 0; n < t.length; n++) (t[n] === null || Ya(t[n])) && i.push(n);
1836
- i.length && nl(t, i, e);
1837
- }
1838
- measureInitialState() {
1839
- const { element: t, unresolvedKeyframes: e, name: i } = this;
1840
- if (!t || !t.current) return;
1841
- i === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = st[i](t.measureViewportBox(), window.getComputedStyle(t.current)), e[0] = this.measuredOrigin;
1842
- const n = e[e.length - 1];
1843
- n !== void 0 && t.getValue(i, n).jump(n, !1);
1844
- }
1845
- measureEndState() {
1846
- const { element: t, name: e, unresolvedKeyframes: i } = this;
1847
- if (!t || !t.current) return;
1848
- const n = t.getValue(e);
1849
- n && n.jump(this.measuredOrigin, !1);
1850
- const s = i.length - 1, o = i[s];
1851
- i[s] = st[e](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), this.removedTransforms?.length && this.removedTransforms.forEach(([r, a]) => {
1852
- t.getValue(r).set(a);
1853
- }), this.resolveNoneKeyframes();
1854
- }
1855
- };
1856
- function Ys(t, e, i) {
1857
- if (t == null) return [];
1858
- if (t instanceof EventTarget) return [t];
1859
- if (typeof t == "string") {
1860
- let n = document;
1861
- e && (n = e.current);
1862
- const s = i?.[t] ?? n.querySelectorAll(t);
1863
- return s ? Array.from(s) : [];
1864
- }
1865
- return Array.from(t).filter((n) => n != null);
1866
- }
1867
- var qs = (t, e) => e && typeof t == "number" ? e.transform(t) : t;
1868
- function rl(t) {
1869
- return es(t) && "offsetHeight" in t && !("ownerSVGElement" in t);
1870
- }
1871
- var { schedule: Pi, cancel: Qc } = /* @__PURE__ */ ms(queueMicrotask, !1), H = {
1872
- x: !1,
1873
- y: !1
1874
- };
1875
- function Zs() {
1876
- return H.x || H.y;
1877
- }
1878
- function ol(t) {
1879
- return t === "x" || t === "y" ? H[t] ? null : (H[t] = !0, () => {
1880
- H[t] = !1;
1881
- }) : H.x || H.y ? null : (H.x = H.y = !0, () => {
1882
- H.x = H.y = !1;
1883
- });
1884
- }
1885
- function Js(t, e) {
1886
- const i = Ys(t), n = new AbortController(), s = {
1887
- passive: !0,
1888
- ...e,
1889
- signal: n.signal
1890
- };
1891
- return [
1892
- i,
1893
- s,
1894
- () => n.abort()
1895
- ];
1896
- }
1897
- function al(t) {
1898
- return !(t.pointerType === "touch" || Zs());
1899
- }
1900
- function ll(t, e, i = {}) {
1901
- const [n, s, o] = Js(t, i);
1902
- return n.forEach((r) => {
1903
- let a = !1, l = !1, c;
1904
- const u = () => {
1905
- r.removeEventListener("pointerleave", d);
1906
- }, h = (g) => {
1907
- c && (c(g), c = void 0), u();
1908
- }, f = (g) => {
1909
- a = !1, window.removeEventListener("pointerup", f), window.removeEventListener("pointercancel", f), l && (l = !1, h(g));
1910
- }, p = () => {
1911
- a = !0, window.addEventListener("pointerup", f, s), window.addEventListener("pointercancel", f, s);
1912
- }, d = (g) => {
1913
- if (g.pointerType !== "touch") {
1914
- if (a) {
1915
- l = !0;
1916
- return;
1917
- }
1918
- h(g);
1919
- }
1920
- }, m = (g) => {
1921
- if (!al(g)) return;
1922
- l = !1;
1923
- const v = e(r, g);
1924
- typeof v == "function" && (c = v, r.addEventListener("pointerleave", d, s));
1925
- };
1926
- r.addEventListener("pointerenter", m, s), r.addEventListener("pointerdown", p, s);
1927
- }), o;
1928
- }
1929
- var Qs = (t, e) => e ? t === e ? !0 : Qs(t, e.parentElement) : !1, Si = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1, ul = /* @__PURE__ */ new Set([
1930
- "BUTTON",
1931
- "INPUT",
1932
- "SELECT",
1933
- "TEXTAREA",
1934
- "A"
1935
- ]);
1936
- function cl(t) {
1937
- return ul.has(t.tagName) || t.isContentEditable === !0;
1938
- }
1939
- var hl = /* @__PURE__ */ new Set([
1940
- "INPUT",
1941
- "SELECT",
1942
- "TEXTAREA"
1943
- ]);
1944
- function fl(t) {
1945
- return hl.has(t.tagName) || t.isContentEditable === !0;
1946
- }
1947
- var qt = /* @__PURE__ */ new WeakSet();
1948
- function Zi(t) {
1949
- return (e) => {
1950
- e.key === "Enter" && t(e);
1951
- };
1952
- }
1953
- function Pe(t, e) {
1954
- t.dispatchEvent(new PointerEvent("pointer" + e, {
1955
- isPrimary: !0,
1956
- bubbles: !0
1957
- }));
1958
- }
1959
- var dl = (t, e) => {
1960
- const i = t.currentTarget;
1961
- if (!i) return;
1962
- const n = Zi(() => {
1963
- if (qt.has(i)) return;
1964
- Pe(i, "down");
1965
- const s = Zi(() => {
1966
- Pe(i, "up");
1967
- }), o = () => Pe(i, "cancel");
1968
- i.addEventListener("keyup", s, e), i.addEventListener("blur", o, e);
1969
- });
1970
- i.addEventListener("keydown", n, e), i.addEventListener("blur", () => i.removeEventListener("keydown", n), e);
1971
- };
1972
- function Ji(t) {
1973
- return Si(t) && !Zs();
1974
- }
1975
- var Qi = /* @__PURE__ */ new WeakSet();
1976
- function pl(t, e, i = {}) {
1977
- const [n, s, o] = Js(t, i), r = (a) => {
1978
- const l = a.currentTarget;
1979
- if (!Ji(a) || Qi.has(a)) return;
1980
- qt.add(l), i.stopPropagation && Qi.add(a);
1981
- const c = e(l, a), u = (p, d) => {
1982
- window.removeEventListener("pointerup", h), window.removeEventListener("pointercancel", f), qt.has(l) && qt.delete(l), Ji(p) && typeof c == "function" && c(p, { success: d });
1983
- }, h = (p) => {
1984
- u(p, l === window || l === document || i.useGlobalTarget || Qs(l, p.target));
1985
- }, f = (p) => {
1986
- u(p, !1);
1987
- };
1988
- window.addEventListener("pointerup", h, s), window.addEventListener("pointercancel", f, s);
1989
- };
1990
- return n.forEach((a) => {
1991
- (i.useGlobalTarget ? window : a).addEventListener("pointerdown", r, s), rl(a) && (a.addEventListener("focus", (l) => dl(l, s)), !cl(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
1992
- }), o;
1993
- }
1994
- function bi(t) {
1995
- return es(t) && "ownerSVGElement" in t;
1996
- }
1997
- var Zt = /* @__PURE__ */ new WeakMap(), Jt, tr = (t, e, i) => (n, s) => s && s[0] ? s[0][t + "Size"] : bi(n) && "getBBox" in n ? n.getBBox()[e] : n[i], ml = /* @__PURE__ */ tr("inline", "width", "offsetWidth"), vl = /* @__PURE__ */ tr("block", "height", "offsetHeight");
1998
- function gl({ target: t, borderBoxSize: e }) {
1999
- Zt.get(t)?.forEach((i) => {
2000
- i(t, {
2001
- get width() {
2002
- return ml(t, e);
2003
- },
2004
- get height() {
2005
- return vl(t, e);
2006
- }
2007
- });
2008
- });
2009
- }
2010
- function yl(t) {
2011
- t.forEach(gl);
2012
- }
2013
- function Tl() {
2014
- typeof ResizeObserver > "u" || (Jt = new ResizeObserver(yl));
2015
- }
2016
- function xl(t, e) {
2017
- Jt || Tl();
2018
- const i = Ys(t);
2019
- return i.forEach((n) => {
2020
- let s = Zt.get(n);
2021
- s || (s = /* @__PURE__ */ new Set(), Zt.set(n, s)), s.add(e), Jt?.observe(n);
2022
- }), () => {
2023
- i.forEach((n) => {
2024
- const s = Zt.get(n);
2025
- s?.delete(e), s?.size || Jt?.unobserve(n);
2026
- });
2027
- };
2028
- }
2029
- var Qt = /* @__PURE__ */ new Set(), St;
2030
- function wl() {
2031
- St = () => {
2032
- const t = {
2033
- get width() {
2034
- return window.innerWidth;
2035
- },
2036
- get height() {
2037
- return window.innerHeight;
2038
- }
2039
- };
2040
- Qt.forEach((e) => e(t));
2041
- }, window.addEventListener("resize", St);
2042
- }
2043
- function Pl(t) {
2044
- return Qt.add(t), St || wl(), () => {
2045
- Qt.delete(t), !Qt.size && typeof St == "function" && (window.removeEventListener("resize", St), St = void 0);
2046
- };
2047
- }
2048
- function tn(t, e) {
2049
- return typeof t == "function" ? Pl(t) : xl(t, e);
2050
- }
2051
- function Sl(t) {
2052
- return bi(t) && t.tagName === "svg";
2053
- }
2054
- var bl = [
2055
- ...Hs,
2056
- D,
2057
- G
2058
- ], Al = (t) => bl.find(zs(t)), en = () => ({
2059
- translate: 0,
2060
- scale: 1,
2061
- origin: 0,
2062
- originPoint: 0
2063
- }), bt = () => ({
2064
- x: en(),
2065
- y: en()
2066
- }), nn = () => ({
2067
- min: 0,
2068
- max: 0
2069
- }), R = () => ({
2070
- x: nn(),
2071
- y: nn()
2072
- }), Vl = /* @__PURE__ */ new WeakMap();
2073
- function de(t) {
2074
- return t !== null && typeof t == "object" && typeof t.start == "function";
2075
- }
2076
- function Nt(t) {
2077
- return typeof t == "string" || Array.isArray(t);
2078
- }
2079
- var Ai = [
2080
- "animate",
2081
- "whileInView",
2082
- "whileFocus",
2083
- "whileHover",
2084
- "whileTap",
2085
- "whileDrag",
2086
- "exit"
2087
- ], Vi = ["initial", ...Ai];
2088
- function pe(t) {
2089
- return de(t.animate) || Vi.some((e) => Nt(t[e]));
2090
- }
2091
- function er(t) {
2092
- return !!(pe(t) || t.variants);
2093
- }
2094
- function Ml(t, e, i) {
2095
- for (const n in e) {
2096
- const s = e[n], o = i[n];
2097
- if (I(s)) t.addValue(n, s);
2098
- else if (I(o)) t.addValue(n, Vt(s, { owner: t }));
2099
- else if (o !== s) if (t.hasValue(n)) {
2100
- const r = t.getValue(n);
2101
- r.liveStyle === !0 ? r.jump(s) : r.hasAnimated || r.set(s);
2102
- } else {
2103
- const r = t.getStaticValue(n);
2104
- t.addValue(n, Vt(r !== void 0 ? r : s, { owner: t }));
2105
- }
2106
- }
2107
- for (const n in i) e[n] === void 0 && t.removeValue(n);
2108
- return e;
2109
- }
2110
- var qe = { current: null }, ir = { current: !1 }, Cl = typeof window < "u";
2111
- function Dl() {
2112
- if (ir.current = !0, !!Cl)
2113
- if (window.matchMedia) {
2114
- const t = window.matchMedia("(prefers-reduced-motion)"), e = () => qe.current = t.matches;
2115
- t.addEventListener("change", e), e();
2116
- } else qe.current = !1;
2117
- }
2118
- var sn = [
2119
- "AnimationStart",
2120
- "AnimationComplete",
2121
- "Update",
2122
- "BeforeLayoutMeasure",
2123
- "LayoutMeasure",
2124
- "LayoutAnimationStart",
2125
- "LayoutAnimationComplete"
2126
- ], ae = {};
2127
- function nr(t) {
2128
- ae = t;
2129
- }
2130
- function El() {
2131
- return ae;
2132
- }
2133
- var Rl = class {
2134
- scrapeMotionValuesFromProps(t, e, i) {
2135
- return {};
2136
- }
2137
- constructor({ parent: t, props: e, presenceContext: i, reducedMotionConfig: n, skipAnimations: s, blockInitialAnimation: o, visualState: r }, a = {}) {
2138
- 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 = vi, 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 = () => {
2139
- this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2140
- }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2141
- const f = O.now();
2142
- this.renderScheduledAt < f && (this.renderScheduledAt = f, A.render(this.render, !1, !0));
2143
- };
2144
- const { latestValues: l, renderState: c } = r;
2145
- 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 = er(e), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2146
- const { willChange: u, ...h } = this.scrapeMotionValuesFromProps(e, {}, this);
2147
- for (const f in h) {
2148
- const p = h[f];
2149
- l[f] !== void 0 && I(p) && p.set(l[f]);
2150
- }
2151
- }
2152
- mount(t) {
2153
- if (this.hasBeenMounted) for (const e in this.initialValues)
2154
- this.values.get(e)?.jump(this.initialValues[e]), this.latestValues[e] = this.initialValues[e];
2155
- this.current = t, Vl.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 : (ir.current || Dl(), 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;
2156
- }
2157
- unmount() {
2158
- this.projection && this.projection.unmount(), ot(this.notifyUpdate), ot(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent?.removeChild(this);
2159
- for (const t in this.events) this.events[t].clear();
2160
- for (const t in this.features) {
2161
- const e = this.features[t];
2162
- e && (e.unmount(), e.isMounted = !1);
2163
- }
2164
- this.current = null;
2165
- }
2166
- addChild(t) {
2167
- this.children.add(t), this.enteringChildren ?? (this.enteringChildren = /* @__PURE__ */ new Set()), this.enteringChildren.add(t);
2168
- }
2169
- removeChild(t) {
2170
- this.children.delete(t), this.enteringChildren && this.enteringChildren.delete(t);
2171
- }
2172
- bindToMotionValue(t, e) {
2173
- if (this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)(), e.accelerate && Os.has(t) && this.current instanceof HTMLElement) {
2174
- const { factory: o, keyframes: r, times: a, ease: l, duration: c } = e.accelerate, u = new Is({
2175
- element: this.current,
2176
- name: t,
2177
- keyframes: r,
2178
- times: a,
2179
- ease: l,
2180
- duration: W(c)
2181
- }), h = o(u);
2182
- this.valueSubscriptions.set(t, () => {
2183
- h(), u.cancel();
2184
- });
2185
- return;
2186
- }
2187
- const i = Rt.has(t);
2188
- i && this.onBindTransform && this.onBindTransform();
2189
- const n = e.on("change", (o) => {
2190
- this.latestValues[t] = o, this.props.onUpdate && A.preRender(this.notifyUpdate), i && this.projection && (this.projection.isTransformDirty = !0), this.scheduleRender();
2191
- });
2192
- let s;
2193
- typeof window < "u" && window.MotionCheckAppearSync && (s = window.MotionCheckAppearSync(this, t, e)), this.valueSubscriptions.set(t, () => {
2194
- n(), s && s(), e.owner && e.stop();
2195
- });
2196
- }
2197
- sortNodePosition(t) {
2198
- return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current);
2199
- }
2200
- updateFeatures() {
2201
- let t = "animation";
2202
- for (t in ae) {
2203
- const e = ae[t];
2204
- if (!e) continue;
2205
- const { isEnabled: i, Feature: n } = e;
2206
- if (!this.features[t] && n && i(this.props) && (this.features[t] = new n(this)), this.features[t]) {
2207
- const s = this.features[t];
2208
- s.isMounted ? s.update() : (s.mount(), s.isMounted = !0);
2209
- }
2210
- }
2211
- }
2212
- triggerBuild() {
2213
- this.build(this.renderState, this.latestValues, this.props);
2214
- }
2215
- measureViewportBox() {
2216
- return this.current ? this.measureInstanceViewportBox(this.current, this.props) : R();
2217
- }
2218
- getStaticValue(t) {
2219
- return this.latestValues[t];
2220
- }
2221
- setStaticValue(t, e) {
2222
- this.latestValues[t] = e;
2223
- }
2224
- update(t, e) {
2225
- (t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = e;
2226
- for (let i = 0; i < sn.length; i++) {
2227
- const n = sn[i];
2228
- this.propEventSubscriptions[n] && (this.propEventSubscriptions[n](), delete this.propEventSubscriptions[n]);
2229
- const s = t["on" + n];
2230
- s && (this.propEventSubscriptions[n] = this.on(n, s));
2231
- }
2232
- this.prevMotionValues = Ml(this, this.scrapeMotionValuesFromProps(t, this.prevProps || {}, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2233
- }
2234
- getProps() {
2235
- return this.props;
2236
- }
2237
- getVariant(t) {
2238
- return this.props.variants ? this.props.variants[t] : void 0;
2239
- }
2240
- getDefaultTransition() {
2241
- return this.props.transition;
2242
- }
2243
- getTransformPagePoint() {
2244
- return this.props.transformPagePoint;
2245
- }
2246
- getClosestVariantNode() {
2247
- return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
2248
- }
2249
- addVariantChild(t) {
2250
- const e = this.getClosestVariantNode();
2251
- if (e)
2252
- return e.variantChildren && e.variantChildren.add(t), () => e.variantChildren.delete(t);
2253
- }
2254
- addValue(t, e) {
2255
- const i = this.values.get(t);
2256
- e !== i && (i && this.removeValue(t), this.bindToMotionValue(t, e), this.values.set(t, e), this.latestValues[t] = e.get());
2257
- }
2258
- removeValue(t) {
2259
- this.values.delete(t);
2260
- const e = this.valueSubscriptions.get(t);
2261
- e && (e(), this.valueSubscriptions.delete(t)), delete this.latestValues[t], this.removeValueFromRenderState(t, this.renderState);
2262
- }
2263
- hasValue(t) {
2264
- return this.values.has(t);
2265
- }
2266
- getValue(t, e) {
2267
- if (this.props.values && this.props.values[t]) return this.props.values[t];
2268
- let i = this.values.get(t);
2269
- return i === void 0 && e !== void 0 && (i = Vt(e === null ? void 0 : e, { owner: this }), this.addValue(t, i)), i;
2270
- }
2271
- readValue(t, e) {
2272
- let i = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
2273
- return i != null && (typeof i == "string" && (ts(i) || is(i)) ? i = parseFloat(i) : !Al(i) && G.test(e) && (i = Xs(t, e)), this.setBaseTarget(t, I(i) ? i.get() : i)), I(i) ? i.get() : i;
2274
- }
2275
- setBaseTarget(t, e) {
2276
- this.baseTarget[t] = e;
2277
- }
2278
- getBaseTarget(t) {
2279
- const { initial: e } = this.props;
2280
- let i;
2281
- if (typeof e == "string" || typeof e == "object") {
2282
- const s = Ti(this.props, e, this.presenceContext?.custom);
2283
- s && (i = s[t]);
2284
- }
2285
- if (e && i !== void 0) return i;
2286
- const n = this.getBaseTargetFromProps(this.props, t);
2287
- return n !== void 0 && !I(n) ? n : this.initialValues[t] !== void 0 && i === void 0 ? void 0 : this.baseTarget[t];
2288
- }
2289
- on(t, e) {
2290
- return this.events[t] || (this.events[t] = new oi()), this.events[t].add(e);
2291
- }
2292
- notify(t, ...e) {
2293
- this.events[t] && this.events[t].notify(...e);
2294
- }
2295
- scheduleRenderMicrotask() {
2296
- Pi.render(this.render);
2297
- }
2298
- }, sr = class extends Rl {
2299
- constructor() {
2300
- super(...arguments), this.KeyframeResolver = sl;
2301
- }
2302
- sortInstanceNodePosition(t, e) {
2303
- return t.compareDocumentPosition(e) & 2 ? 1 : -1;
2304
- }
2305
- getBaseTargetFromProps(t, e) {
2306
- const i = t.style;
2307
- return i ? i[e] : void 0;
2308
- }
2309
- removeValueFromRenderState(t, { vars: e, style: i }) {
2310
- delete e[t], delete i[t];
2311
- }
2312
- handleChildMotionValue() {
2313
- this.childSubscription && (this.childSubscription(), delete this.childSubscription);
2314
- const { children: t } = this.props;
2315
- I(t) && (this.childSubscription = t.on("change", (e) => {
2316
- this.current && (this.current.textContent = `${e}`);
2317
- }));
2318
- }
2319
- }, at = class {
2320
- constructor(t) {
2321
- this.isMounted = !1, this.node = t;
2322
- }
2323
- update() {
2324
- }
2325
- };
2326
- function rr({ top: t, left: e, right: i, bottom: n }) {
2327
- return {
2328
- x: {
2329
- min: e,
2330
- max: i
2331
- },
2332
- y: {
2333
- min: t,
2334
- max: n
2335
- }
2336
- };
2337
- }
2338
- function Ll({ x: t, y: e }) {
2339
- return {
2340
- top: e.min,
2341
- right: t.max,
2342
- bottom: e.max,
2343
- left: t.min
2344
- };
2345
- }
2346
- function kl(t, e) {
2347
- if (!e) return t;
2348
- const i = e({
2349
- x: t.left,
2350
- y: t.top
2351
- }), n = e({
2352
- x: t.right,
2353
- y: t.bottom
2354
- });
2355
- return {
2356
- top: i.y,
2357
- left: i.x,
2358
- bottom: n.y,
2359
- right: n.x
2360
- };
2361
- }
2362
- function Se(t) {
2363
- return t === void 0 || t === 1;
2364
- }
2365
- function Ze({ scale: t, scaleX: e, scaleY: i }) {
2366
- return !Se(t) || !Se(e) || !Se(i);
2367
- }
2368
- function ht(t) {
2369
- return Ze(t) || or(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
2370
- }
2371
- function or(t) {
2372
- return rn(t.x) || rn(t.y);
2373
- }
2374
- function rn(t) {
2375
- return t && t !== "0%";
2376
- }
2377
- function le(t, e, i) {
2378
- return i + e * (t - i);
2379
- }
2380
- function on(t, e, i, n, s) {
2381
- return s !== void 0 && (t = le(t, s, n)), le(t, i, n) + e;
2382
- }
2383
- function Je(t, e = 0, i = 1, n, s) {
2384
- t.min = on(t.min, e, i, n, s), t.max = on(t.max, e, i, n, s);
2385
- }
2386
- function ar(t, { x: e, y: i }) {
2387
- Je(t.x, e.translate, e.scale, e.originPoint), Je(t.y, i.translate, i.scale, i.originPoint);
2388
- }
2389
- var an = 0.999999999999, ln = 1.0000000000001;
2390
- function Bl(t, e, i, n = !1) {
2391
- const s = i.length;
2392
- if (!s) return;
2393
- e.x = e.y = 1;
2394
- let o, r;
2395
- for (let a = 0; a < s; a++) {
2396
- o = i[a], r = o.projectionDelta;
2397
- const { visualElement: l } = o.options;
2398
- l && l.props.style && l.props.style.display === "contents" || (n && o.options.layoutScroll && o.scroll && o !== o.root && (Z(t.x, -o.scroll.offset.x), Z(t.y, -o.scroll.offset.y)), r && (e.x *= r.x.scale, e.y *= r.y.scale, ar(t, r)), n && ht(o.latestValues) && te(t, o.latestValues, o.layout?.layoutBox));
2399
- }
2400
- e.x < ln && e.x > an && (e.x = 1), e.y < ln && e.y > an && (e.y = 1);
2401
- }
2402
- function Z(t, e) {
2403
- t.min += e, t.max += e;
2404
- }
2405
- function un(t, e, i, n, s = 0.5) {
2406
- Je(t, e, i, V(t.min, t.max, s), n);
2407
- }
2408
- function cn(t, e) {
2409
- return typeof t == "string" ? parseFloat(t) / 100 * (e.max - e.min) : t;
2410
- }
2411
- function te(t, e, i) {
2412
- const n = i ?? t;
2413
- un(t.x, cn(e.x, n.x), e.scaleX, e.scale, e.originX), un(t.y, cn(e.y, n.y), e.scaleY, e.scale, e.originY);
2414
- }
2415
- function lr(t, e) {
2416
- return rr(kl(t.getBoundingClientRect(), e));
2417
- }
2418
- function Il(t, e, i) {
2419
- const n = lr(t, i), { scroll: s } = e;
2420
- return s && (Z(n.x, s.offset.x), Z(n.y, s.offset.y)), n;
2421
- }
2422
- var Fl = {
2423
- x: "translateX",
2424
- y: "translateY",
2425
- z: "translateZ",
2426
- transformPerspective: "perspective"
2427
- }, Ol = Et.length;
2428
- function jl(t, e, i) {
2429
- let n = "", s = !0;
2430
- for (let o = 0; o < Ol; o++) {
2431
- const r = Et[o], a = t[r];
2432
- if (a === void 0) continue;
2433
- let l = !0;
2434
- if (typeof a == "number") l = a === (r.startsWith("scale") ? 1 : 0);
2435
- else {
2436
- const c = parseFloat(a);
2437
- l = r.startsWith("scale") ? c === 1 : c === 0;
2438
- }
2439
- if (!l || i) {
2440
- const c = qs(a, wi[r]);
2441
- if (!l) {
2442
- s = !1;
2443
- const u = Fl[r] || r;
2444
- n += `${u}(${c}) `;
2445
- }
2446
- i && (e[r] = c);
2447
- }
2448
- }
2449
- return n = n.trim(), i ? n = i(e, s ? "" : n) : s && (n = "none"), n;
2450
- }
2451
- function Mi(t, e, i) {
2452
- const { style: n, vars: s, transformOrigin: o } = t;
2453
- let r = !1, a = !1;
2454
- for (const l in e) {
2455
- const c = e[l];
2456
- if (Rt.has(l)) {
2457
- r = !0;
2458
- continue;
2459
- } else if (gs(l)) {
2460
- s[l] = c;
2461
- continue;
2462
- } else {
2463
- const u = qs(c, wi[l]);
2464
- l.startsWith("origin") ? (a = !0, o[l] = u) : n[l] = u;
2465
- }
2466
- }
2467
- if (e.transform || (r || i ? n.transform = jl(e, t.transform, i) : n.transform && (n.transform = "none")), a) {
2468
- const { originX: l = "50%", originY: c = "50%", originZ: u = 0 } = o;
2469
- n.transformOrigin = `${l} ${c} ${u}`;
2470
- }
2471
- }
2472
- function ur(t, { style: e, vars: i }, n, s) {
2473
- const o = t.style;
2474
- let r;
2475
- for (r in e) o[r] = e[r];
2476
- s?.applyProjectionStyles(o, n);
2477
- for (r in i) o.setProperty(r, i[r]);
2478
- }
2479
- function hn(t, e) {
2480
- return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
2481
- }
2482
- var Lt = { correct: (t, e) => {
2483
- if (!e.target) return t;
2484
- if (typeof t == "string") if (T.test(t)) t = parseFloat(t);
2485
- else return t;
2486
- return `${hn(t, e.target.x)}% ${hn(t, e.target.y)}%`;
2487
- } }, Nl = { correct: (t, { treeScale: e, projectionDelta: i }) => {
2488
- const n = t, s = G.parse(t);
2489
- if (s.length > 5) return n;
2490
- const o = G.createTransformer(t), r = typeof s[0] != "number" ? 1 : 0, a = i.x.scale * e.x, l = i.y.scale * e.y;
2491
- s[0 + r] /= a, s[1 + r] /= l;
2492
- const c = V(a, l, 0.5);
2493
- return typeof s[2 + r] == "number" && (s[2 + r] /= c), typeof s[3 + r] == "number" && (s[3 + r] /= c), o(s);
2494
- } }, Qe = {
2495
- borderRadius: {
2496
- ...Lt,
2497
- applyTo: [
2498
- "borderTopLeftRadius",
2499
- "borderTopRightRadius",
2500
- "borderBottomLeftRadius",
2501
- "borderBottomRightRadius"
2502
- ]
2503
- },
2504
- borderTopLeftRadius: Lt,
2505
- borderTopRightRadius: Lt,
2506
- borderBottomLeftRadius: Lt,
2507
- borderBottomRightRadius: Lt,
2508
- boxShadow: Nl
2509
- };
2510
- function cr(t, { layout: e, layoutId: i }) {
2511
- return Rt.has(t) || t.startsWith("origin") || (e || i !== void 0) && (!!Qe[t] || t === "opacity");
2512
- }
2513
- function Ci(t, e, i) {
2514
- const n = t.style, s = e?.style, o = {};
2515
- if (!n) return o;
2516
- for (const r in n) (I(n[r]) || s && I(s[r]) || cr(r, t) || i?.getValue(r)?.liveStyle !== void 0) && (o[r] = n[r]);
2517
- return o;
2518
- }
2519
- function Ul(t) {
2520
- return window.getComputedStyle(t);
2521
- }
2522
- var Wl = class extends sr {
2523
- constructor() {
2524
- super(...arguments), this.type = "html", this.renderInstance = ur;
2525
- }
2526
- readValueFromInstance(t, e) {
2527
- if (Rt.has(e)) return this.projection?.isProjecting ? Ne(e) : ra(t, e);
2528
- {
2529
- const i = Ul(t), n = (gs(e) ? i.getPropertyValue(e) : i[e]) || 0;
2530
- return typeof n == "string" ? n.trim() : n;
2531
- }
2532
- }
2533
- measureInstanceViewportBox(t, { transformPagePoint: e }) {
2534
- return lr(t, e);
2535
- }
2536
- build(t, e, i) {
2537
- Mi(t, e, i.transformTemplate);
2538
- }
2539
- scrapeMotionValuesFromProps(t, e, i) {
2540
- return Ci(t, e, i);
2541
- }
2542
- }, _l = {
2543
- offset: "stroke-dashoffset",
2544
- array: "stroke-dasharray"
2545
- }, Kl = {
2546
- offset: "strokeDashoffset",
2547
- array: "strokeDasharray"
2548
- };
2549
- function $l(t, e, i = 1, n = 0, s = !0) {
2550
- t.pathLength = 1;
2551
- const o = s ? _l : Kl;
2552
- t[o.offset] = `${-n}`, t[o.array] = `${e} ${i}`;
2553
- }
2554
- var zl = [
2555
- "offsetDistance",
2556
- "offsetPath",
2557
- "offsetRotate",
2558
- "offsetAnchor"
2559
- ];
2560
- function hr(t, { attrX: e, attrY: i, attrScale: n, pathLength: s, pathSpacing: o = 1, pathOffset: r = 0, ...a }, l, c, u) {
2561
- if (Mi(t, a, c), l) {
2562
- t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
2563
- return;
2564
- }
2565
- t.attrs = t.style, t.style = {};
2566
- const { attrs: h, style: f } = t;
2567
- h.transform && (f.transform = h.transform, delete h.transform), (f.transform || h.transformOrigin) && (f.transformOrigin = h.transformOrigin ?? "50% 50%", delete h.transformOrigin), f.transform && (f.transformBox = u?.transformBox ?? "fill-box", delete h.transformBox);
2568
- for (const p of zl) h[p] !== void 0 && (f[p] = h[p], delete h[p]);
2569
- e !== void 0 && (h.x = e), i !== void 0 && (h.y = i), n !== void 0 && (h.scale = n), s !== void 0 && $l(h, s, o, r, !1);
2570
- }
2571
- var fr = /* @__PURE__ */ new Set([
2572
- "baseFrequency",
2573
- "diffuseConstant",
2574
- "kernelMatrix",
2575
- "kernelUnitLength",
2576
- "keySplines",
2577
- "keyTimes",
2578
- "limitingConeAngle",
2579
- "markerHeight",
2580
- "markerWidth",
2581
- "numOctaves",
2582
- "targetX",
2583
- "targetY",
2584
- "surfaceScale",
2585
- "specularConstant",
2586
- "specularExponent",
2587
- "stdDeviation",
2588
- "tableValues",
2589
- "viewBox",
2590
- "gradientTransform",
2591
- "pathLength",
2592
- "startOffset",
2593
- "textLength",
2594
- "lengthAdjust"
2595
- ]), dr = (t) => typeof t == "string" && t.toLowerCase() === "svg";
2596
- function Hl(t, e, i, n) {
2597
- ur(t, e, void 0, n);
2598
- for (const s in e.attrs) t.setAttribute(fr.has(s) ? s : xi(s), e.attrs[s]);
2599
- }
2600
- function pr(t, e, i) {
2601
- const n = Ci(t, e, i);
2602
- for (const s in t) if (I(t[s]) || I(e[s])) {
2603
- const o = Et.indexOf(s) !== -1 ? "attr" + s.charAt(0).toUpperCase() + s.substring(1) : s;
2604
- n[o] = t[s];
2605
- }
2606
- return n;
2607
- }
2608
- var Gl = class extends sr {
2609
- constructor() {
2610
- super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = R;
2611
- }
2612
- getBaseTargetFromProps(t, e) {
2613
- return t[e];
2614
- }
2615
- readValueFromInstance(t, e) {
2616
- if (Rt.has(e)) {
2617
- const i = Gs(e);
2618
- return i && i.default || 0;
2619
- }
2620
- return e = fr.has(e) ? e : xi(e), t.getAttribute(e);
2621
- }
2622
- scrapeMotionValuesFromProps(t, e, i) {
2623
- return pr(t, e, i);
2624
- }
2625
- build(t, e, i) {
2626
- hr(t, e, this.isSVGTag, i.transformTemplate, i.style);
2627
- }
2628
- renderInstance(t, e, i, n) {
2629
- Hl(t, e, i, n);
2630
- }
2631
- mount(t) {
2632
- this.isSVGTag = dr(t.tagName), super.mount(t);
2633
- }
2634
- }, Xl = Vi.length;
2635
- function mr(t) {
2636
- if (!t) return;
2637
- if (!t.isControllingVariants) {
2638
- const i = t.parent ? mr(t.parent) || {} : {};
2639
- return t.props.initial !== void 0 && (i.initial = t.props.initial), i;
2640
- }
2641
- const e = {};
2642
- for (let i = 0; i < Xl; i++) {
2643
- const n = Vi[i], s = t.props[n];
2644
- (Nt(s) || s === !1) && (e[n] = s);
2645
- }
2646
- return e;
2647
- }
2648
- function vr(t, e) {
2649
- if (!Array.isArray(e)) return !1;
2650
- const i = e.length;
2651
- if (i !== t.length) return !1;
2652
- for (let n = 0; n < i; n++) if (e[n] !== t[n]) return !1;
2653
- return !0;
2654
- }
2655
- var Yl = [...Ai].reverse(), ql = Ai.length;
2656
- function Zl(t) {
2657
- return (e) => Promise.all(e.map(({ animation: i, options: n }) => Ga(t, i, n)));
2658
- }
2659
- function Jl(t) {
2660
- let e = Zl(t), i = fn(), n = !0, s = !1;
2661
- const o = (c) => (u, h) => {
2662
- const f = yt(t, h, c === "exit" ? t.presenceContext?.custom : void 0);
2663
- if (f) {
2664
- const { transition: p, transitionEnd: d, ...m } = f;
2665
- u = {
2666
- ...u,
2667
- ...m,
2668
- ...d
2669
- };
2670
- }
2671
- return u;
2672
- };
2673
- function r(c) {
2674
- e = c(t);
2675
- }
2676
- function a(c) {
2677
- const { props: u } = t, h = mr(t.parent) || {}, f = [], p = /* @__PURE__ */ new Set();
2678
- let d = {}, m = 1 / 0;
2679
- for (let v = 0; v < ql; v++) {
2680
- const x = Yl[v], y = i[x], w = u[x] !== void 0 ? u[x] : h[x], b = Nt(w), E = x === c ? y.isActive : null;
2681
- E === !1 && (m = v);
2682
- let L = w === h[x] && w !== u[x] && b;
2683
- if (L && (n || s) && t.manuallyAnimateOnMount && (L = !1), y.protectedKeys = { ...d }, !y.isActive && E === null || !w && !y.prevProp || de(w) || typeof w == "boolean") continue;
2684
- if (x === "exit" && y.isActive && E !== !0) {
2685
- y.prevResolvedValues && (d = {
2686
- ...d,
2687
- ...y.prevResolvedValues
2688
- });
2689
- continue;
2690
- }
2691
- const P = Ql(y.prevProp, w);
2692
- let C = P || x === c && y.isActive && !L && b || v > m && b, S = !1;
2693
- const F = Array.isArray(w) ? w : [w];
2694
- let N = F.reduce(o(x), {});
2695
- E === !1 && (N = {});
2696
- const { prevResolvedValues: lt = {} } = y, X = {
2697
- ...lt,
2698
- ...N
2699
- }, et = (k) => {
2700
- C = !0, p.has(k) && (S = !0, p.delete(k)), y.needsAnimating[k] = !0;
2701
- const _ = t.getValue(k);
2702
- _ && (_.liveStyle = !1);
2703
- };
2704
- for (const k in X) {
2705
- const _ = N[k], ut = lt[k];
2706
- if (d.hasOwnProperty(k)) continue;
2707
- let Tt = !1;
2708
- ze(_) && ze(ut) ? Tt = !vr(_, ut) : Tt = _ !== ut, Tt ? _ != null ? et(k) : p.add(k) : _ !== void 0 && p.has(k) ? et(k) : y.protectedKeys[k] = !0;
2709
- }
2710
- y.prevProp = w, y.prevResolvedValues = N, y.isActive && (d = {
2711
- ...d,
2712
- ...N
2713
- }), (n || s) && t.blockInitialAnimation && (C = !1);
2714
- const Y = L && P;
2715
- C && (!Y || S) && f.push(...F.map((k) => {
2716
- const _ = { type: x };
2717
- if (typeof k == "string" && (n || s) && !Y && t.manuallyAnimateOnMount && t.parent) {
2718
- const { parent: ut } = t, Tt = yt(ut, k);
2719
- if (ut.enteringChildren && Tt) {
2720
- const { delayChildren: Wr } = Tt.transition || {};
2721
- _.delay = js(ut.enteringChildren, t, Wr);
2722
- }
2723
- }
2724
- return {
2725
- animation: k,
2726
- options: _
2727
- };
2728
- }));
2729
- }
2730
- if (p.size) {
2731
- const v = {};
2732
- if (typeof u.initial != "boolean") {
2733
- const x = yt(t, Array.isArray(u.initial) ? u.initial[0] : u.initial);
2734
- x && x.transition && (v.transition = x.transition);
2735
- }
2736
- p.forEach((x) => {
2737
- const y = t.getBaseTarget(x), w = t.getValue(x);
2738
- w && (w.liveStyle = !0), v[x] = y ?? null;
2739
- }), f.push({ animation: v });
2740
- }
2741
- let g = !!f.length;
2742
- return n && (u.initial === !1 || u.initial === u.animate) && !t.manuallyAnimateOnMount && (g = !1), n = !1, s = !1, g ? e(f) : Promise.resolve();
2743
- }
2744
- function l(c, u) {
2745
- if (i[c].isActive === u) return Promise.resolve();
2746
- t.variantChildren?.forEach((f) => f.animationState?.setActive(c, u)), i[c].isActive = u;
2747
- const h = a(c);
2748
- for (const f in i) i[f].protectedKeys = {};
2749
- return h;
2750
- }
2751
- return {
2752
- animateChanges: a,
2753
- setActive: l,
2754
- setAnimateFunction: r,
2755
- getState: () => i,
2756
- reset: () => {
2757
- i = fn(), s = !0;
2758
- }
2759
- };
2760
- }
2761
- function Ql(t, e) {
2762
- return typeof e == "string" ? e !== t : Array.isArray(e) ? !vr(e, t) : !1;
2763
- }
2764
- function ct(t = !1) {
2765
- return {
2766
- isActive: t,
2767
- protectedKeys: {},
2768
- needsAnimating: {},
2769
- prevResolvedValues: {}
2770
- };
2771
- }
2772
- function fn() {
2773
- return {
2774
- animate: ct(!0),
2775
- whileInView: ct(),
2776
- whileHover: ct(),
2777
- whileTap: ct(),
2778
- whileDrag: ct(),
2779
- whileFocus: ct(),
2780
- exit: ct()
2781
- };
2782
- }
2783
- function ti(t, e) {
2784
- t.min = e.min, t.max = e.max;
2785
- }
2786
- function z(t, e) {
2787
- ti(t.x, e.x), ti(t.y, e.y);
2788
- }
2789
- function dn(t, e) {
2790
- t.translate = e.translate, t.scale = e.scale, t.originPoint = e.originPoint, t.origin = e.origin;
2791
- }
2792
- var gr = 1e-4, tu = 1 - gr, eu = 1 + gr, yr = 0.01, iu = 0 - yr, nu = 0 + yr;
2793
- function j(t) {
2794
- return t.max - t.min;
2795
- }
2796
- function su(t, e, i) {
2797
- return Math.abs(t - e) <= i;
2798
- }
2799
- function pn(t, e, i, n = 0.5) {
2800
- t.origin = n, t.originPoint = V(e.min, e.max, t.origin), t.scale = j(i) / j(e), t.translate = V(i.min, i.max, t.origin) - t.originPoint, (t.scale >= tu && t.scale <= eu || isNaN(t.scale)) && (t.scale = 1), (t.translate >= iu && t.translate <= nu || isNaN(t.translate)) && (t.translate = 0);
2801
- }
2802
- function It(t, e, i, n) {
2803
- pn(t.x, e.x, i.x, n ? n.originX : void 0), pn(t.y, e.y, i.y, n ? n.originY : void 0);
2804
- }
2805
- function mn(t, e, i, n = 0) {
2806
- t.min = (n ? V(i.min, i.max, n) : i.min) + e.min, t.max = t.min + j(e);
2807
- }
2808
- function ru(t, e, i, n) {
2809
- mn(t.x, e.x, i.x, n?.x), mn(t.y, e.y, i.y, n?.y);
2810
- }
2811
- function vn(t, e, i, n = 0) {
2812
- const s = n ? V(i.min, i.max, n) : i.min;
2813
- t.min = e.min - s, t.max = t.min + j(e);
2814
- }
2815
- function ue(t, e, i, n) {
2816
- vn(t.x, e.x, i.x, n?.x), vn(t.y, e.y, i.y, n?.y);
2817
- }
2818
- function gn(t, e, i, n, s) {
2819
- return t -= e, t = le(t, 1 / i, n), s !== void 0 && (t = le(t, 1 / s, n)), t;
2820
- }
2821
- function ou(t, e = 0, i = 1, n = 0.5, s, o = t, r = t) {
2822
- if (Q.test(e) && (e = parseFloat(e), e = V(r.min, r.max, e / 100) - r.min), typeof e != "number") return;
2823
- let a = V(o.min, o.max, n);
2824
- t === o && (a -= e), t.min = gn(t.min, e, i, a, s), t.max = gn(t.max, e, i, a, s);
2825
- }
2826
- function yn(t, e, [i, n, s], o, r) {
2827
- ou(t, e[i], e[n], e[s], e.scale, o, r);
2828
- }
2829
- var au = [
2830
- "x",
2831
- "scaleX",
2832
- "originX"
2833
- ], lu = [
2834
- "y",
2835
- "scaleY",
2836
- "originY"
2837
- ];
2838
- function Tn(t, e, i, n) {
2839
- yn(t.x, e, au, i ? i.x : void 0, n ? n.x : void 0), yn(t.y, e, lu, i ? i.y : void 0, n ? n.y : void 0);
2840
- }
2841
- function xn(t) {
2842
- return t.translate === 0 && t.scale === 1;
2843
- }
2844
- function Tr(t) {
2845
- return xn(t.x) && xn(t.y);
2846
- }
2847
- function wn(t, e) {
2848
- return t.min === e.min && t.max === e.max;
2849
- }
2850
- function uu(t, e) {
2851
- return wn(t.x, e.x) && wn(t.y, e.y);
2852
- }
2853
- function Pn(t, e) {
2854
- return Math.round(t.min) === Math.round(e.min) && Math.round(t.max) === Math.round(e.max);
2855
- }
2856
- function xr(t, e) {
2857
- return Pn(t.x, e.x) && Pn(t.y, e.y);
2858
- }
2859
- function Sn(t) {
2860
- return j(t.x) / j(t.y);
2861
- }
2862
- function bn(t, e) {
2863
- return t.translate === e.translate && t.scale === e.scale && t.originPoint === e.originPoint;
2864
- }
2865
- function q(t) {
2866
- return [t("x"), t("y")];
2867
- }
2868
- function cu(t, e, i) {
2869
- let n = "";
2870
- const s = t.x.translate / e.x, o = t.y.translate / e.y, r = i?.z || 0;
2871
- 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) {
2872
- const { transformPerspective: c, rotate: u, rotateX: h, rotateY: f, skewX: p, skewY: d } = i;
2873
- c && (n = `perspective(${c}px) ${n}`), u && (n += `rotate(${u}deg) `), h && (n += `rotateX(${h}deg) `), f && (n += `rotateY(${f}deg) `), p && (n += `skewX(${p}deg) `), d && (n += `skewY(${d}deg) `);
2874
- }
2875
- const a = t.x.scale * e.x, l = t.y.scale * e.y;
2876
- return (a !== 1 || l !== 1) && (n += `scale(${a}, ${l})`), n || "none";
2877
- }
2878
- var wr = [
2879
- "borderTopLeftRadius",
2880
- "borderTopRightRadius",
2881
- "borderBottomLeftRadius",
2882
- "borderBottomRightRadius"
2883
- ], hu = wr.length, An = (t) => typeof t == "string" ? parseFloat(t) : t, Vn = (t) => typeof t == "number" || T.test(t);
2884
- function fu(t, e, i, n, s, o) {
2885
- s ? (t.opacity = V(0, i.opacity ?? 1, du(n)), t.opacityExit = V(e.opacity ?? 1, 0, pu(n))) : o && (t.opacity = V(e.opacity ?? 1, i.opacity ?? 1, n));
2886
- for (let r = 0; r < hu; r++) {
2887
- const a = wr[r];
2888
- let l = Mn(e, a), c = Mn(i, a);
2889
- l === void 0 && c === void 0 || (l || (l = 0), c || (c = 0), l === 0 || c === 0 || Vn(l) === Vn(c) ? (t[a] = Math.max(V(An(l), An(c), n), 0), (Q.test(c) || Q.test(l)) && (t[a] += "%")) : t[a] = c);
2890
- }
2891
- (e.rotate || i.rotate) && (t.rotate = V(e.rotate || 0, i.rotate || 0, n));
2892
- }
2893
- function Mn(t, e) {
2894
- return t[e] !== void 0 ? t[e] : t.borderRadius;
2895
- }
2896
- var du = /* @__PURE__ */ Pr(0, 0.5, hs), pu = /* @__PURE__ */ Pr(0.5, 0.95, $);
2897
- function Pr(t, e, i) {
2898
- return (n) => n < t ? 0 : n > e ? 1 : i(Ot(t, e, n));
2899
- }
2900
- function mu(t, e, i) {
2901
- const n = I(t) ? t : Vt(t);
2902
- return n.start(yi("", n, e, i)), n.animation;
2903
- }
2904
- function Ut(t, e, i, n = { passive: !0 }) {
2905
- return t.addEventListener(e, i, n), () => t.removeEventListener(e, i);
2906
- }
2907
- var vu = (t, e) => t.depth - e.depth, gu = class {
2908
- constructor() {
2909
- this.children = [], this.isDirty = !1;
2910
- }
2911
- add(t) {
2912
- ri(this.children, t), this.isDirty = !0;
2913
- }
2914
- remove(t) {
2915
- ne(this.children, t), this.isDirty = !0;
2916
- }
2917
- forEach(t) {
2918
- this.isDirty && this.children.sort(vu), this.isDirty = !1, this.children.forEach(t);
2919
- }
2920
- };
2921
- function yu(t, e) {
2922
- const i = O.now(), n = ({ timestamp: s }) => {
2923
- const o = s - i;
2924
- o >= e && (ot(n), t(o - e));
2925
- };
2926
- return A.setup(n, !0), () => ot(n);
2927
- }
2928
- function ee(t) {
2929
- return I(t) ? t.get() : t;
2930
- }
2931
- var Tu = class {
2932
- constructor() {
2933
- this.members = [];
2934
- }
2935
- add(t) {
2936
- ri(this.members, t);
2937
- for (let e = this.members.length - 1; e >= 0; e--) {
2938
- const i = this.members[e];
2939
- if (i === t || i === this.lead || i === this.prevLead) continue;
2940
- const n = i.instance;
2941
- (!n || n.isConnected === !1) && !i.snapshot && (ne(this.members, i), i.unmount());
2942
- }
2943
- t.scheduleRender();
2944
- }
2945
- remove(t) {
2946
- if (ne(this.members, t), t === this.prevLead && (this.prevLead = void 0), t === this.lead) {
2947
- const e = this.members[this.members.length - 1];
2948
- e && this.promote(e);
2949
- }
2950
- }
2951
- relegate(t) {
2952
- for (let e = this.members.indexOf(t) - 1; e >= 0; e--) {
2953
- const i = this.members[e];
2954
- if (i.isPresent !== !1 && i.instance?.isConnected !== !1)
2955
- return this.promote(i), !0;
2956
- }
2957
- return !1;
2958
- }
2959
- promote(t, e) {
2960
- const i = this.lead;
2961
- if (t !== i && (this.prevLead = i, this.lead = t, t.show(), i)) {
2962
- i.updateSnapshot(), t.scheduleRender();
2963
- const { layoutDependency: n } = i.options, { layoutDependency: s } = t.options;
2964
- (n === void 0 || n !== s) && (t.resumeFrom = i, e && (i.preserveOpacity = !0), i.snapshot && (t.snapshot = i.snapshot, t.snapshot.latestValues = i.animationValues || i.latestValues), t.root?.isUpdating && (t.isLayoutDirty = !0)), t.options.crossfade === !1 && i.hide();
2965
- }
2966
- }
2967
- exitAnimationComplete() {
2968
- this.members.forEach((t) => {
2969
- t.options.onExitComplete?.(), t.resumingFrom?.options.onExitComplete?.();
2970
- });
2971
- }
2972
- scheduleRender() {
2973
- this.members.forEach((t) => t.instance && t.scheduleRender(!1));
2974
- }
2975
- removeLeadSnapshot() {
2976
- this.lead?.snapshot && (this.lead.snapshot = void 0);
2977
- }
2978
- }, ie = {
2979
- hasAnimatedSinceResize: !0,
2980
- hasEverUpdated: !1
2981
- }, ft = {
2982
- nodes: 0,
2983
- calculatedTargetDeltas: 0,
2984
- calculatedProjections: 0
2985
- }, be = [
2986
- "",
2987
- "X",
2988
- "Y",
2989
- "Z"
2990
- ], xu = 1e3, wu = 0;
2991
- function Ae(t, e, i, n) {
2992
- const { latestValues: s } = e;
2993
- s[t] && (i[t] = s[t], e.setStaticValue(t, 0), n && (n[t] = 0));
2994
- }
2995
- function Sr(t) {
2996
- if (t.hasCheckedOptimisedAppear = !0, t.root === t) return;
2997
- const { visualElement: e } = t.options;
2998
- if (!e) return;
2999
- const i = Ks(e);
3000
- if (window.MotionHasOptimisedAnimation(i, "transform")) {
3001
- const { layout: s, layoutId: o } = t.options;
3002
- window.MotionCancelOptimisedAnimation(i, "transform", A, !(s || o));
3003
- }
3004
- const { parent: n } = t;
3005
- n && !n.hasCheckedOptimisedAppear && Sr(n);
3006
- }
3007
- function br({ attachResizeListener: t, defaultParent: e, measureScroll: i, checkIsScrollRoot: n, resetTransform: s }) {
3008
- return class {
3009
- constructor(r = {}, a = e?.()) {
3010
- this.id = wu++, 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 = {
3011
- x: 1,
3012
- y: 1
3013
- }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.layoutVersion = 0, this.updateScheduled = !1, this.scheduleUpdate = () => this.update(), this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
3014
- this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
3015
- }, this.updateProjection = () => {
3016
- this.projectionUpdateScheduled = !1, J.value && (ft.nodes = ft.calculatedTargetDeltas = ft.calculatedProjections = 0), this.nodes.forEach(bu), this.nodes.forEach(Eu), this.nodes.forEach(Ru), this.nodes.forEach(Au), J.addProjectionMetrics && J.addProjectionMetrics(ft);
3017
- }, 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;
3018
- for (let l = 0; l < this.path.length; l++) this.path[l].shouldResetTransform = !0;
3019
- this.root === this && (this.nodes = new gu());
3020
- }
3021
- addEventListener(r, a) {
3022
- return this.eventHandlers.has(r) || this.eventHandlers.set(r, new oi()), this.eventHandlers.get(r).add(a);
3023
- }
3024
- notifyListeners(r, ...a) {
3025
- const l = this.eventHandlers.get(r);
3026
- l && l.notify(...a);
3027
- }
3028
- hasListeners(r) {
3029
- return this.eventHandlers.has(r);
3030
- }
3031
- mount(r) {
3032
- if (this.instance) return;
3033
- this.isSVG = bi(r) && !Sl(r), this.instance = r;
3034
- const { layoutId: a, layout: l, visualElement: c } = this.options;
3035
- 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) {
3036
- let u, h = 0;
3037
- const f = () => this.root.updateBlockedByResize = !1;
3038
- A.read(() => {
3039
- h = window.innerWidth;
3040
- }), t(r, () => {
3041
- const p = window.innerWidth;
3042
- p !== h && (h = p, this.root.updateBlockedByResize = !0, u && u(), u = yu(f, 250), ie.hasAnimatedSinceResize && (ie.hasAnimatedSinceResize = !1, this.nodes.forEach(En)));
3043
- });
3044
- }
3045
- a && this.root.registerSharedNode(a, this), this.options.animate !== !1 && c && (a || l) && this.addEventListener("didUpdate", ({ delta: u, hasLayoutChanged: h, hasRelativeLayoutChanged: f, layout: p }) => {
3046
- if (this.isTreeAnimationBlocked()) {
3047
- this.target = void 0, this.relativeTarget = void 0;
3048
- return;
3049
- }
3050
- const d = this.options.transition || c.getDefaultTransition() || Fu, { onLayoutAnimationStart: m, onLayoutAnimationComplete: g } = c.getProps(), v = !this.targetLayout || !xr(this.targetLayout, p), x = !h && f;
3051
- if (this.options.layoutRoot || this.resumeFrom || x || h && (v || !this.currentAnimation)) {
3052
- this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0);
3053
- const y = {
3054
- ...gi(d, "layout"),
3055
- onPlay: m,
3056
- onComplete: g
3057
- };
3058
- (c.shouldReduceMotion || this.options.layoutRoot) && (y.delay = 0, y.type = !1), this.startAnimation(y), this.setAnimationOrigin(u, x);
3059
- } else
3060
- h || En(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
3061
- this.targetLayout = p;
3062
- });
3063
- }
3064
- unmount() {
3065
- this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
3066
- const r = this.getStack();
3067
- r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, this.eventHandlers.clear(), ot(this.updateProjection);
3068
- }
3069
- blockUpdate() {
3070
- this.updateManuallyBlocked = !0;
3071
- }
3072
- unblockUpdate() {
3073
- this.updateManuallyBlocked = !1;
3074
- }
3075
- isUpdateBlocked() {
3076
- return this.updateManuallyBlocked || this.updateBlockedByResize;
3077
- }
3078
- isTreeAnimationBlocked() {
3079
- return this.isAnimationBlocked || this.parent && this.parent.isTreeAnimationBlocked() || !1;
3080
- }
3081
- startUpdate() {
3082
- this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(Lu), this.animationId++);
3083
- }
3084
- getTransformTemplate() {
3085
- const { visualElement: r } = this.options;
3086
- return r && r.getProps().transformTemplate;
3087
- }
3088
- willUpdate(r = !0) {
3089
- if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
3090
- this.options.onExitComplete && this.options.onExitComplete();
3091
- return;
3092
- }
3093
- if (window.MotionCancelOptimisedAnimation && !this.hasCheckedOptimisedAppear && Sr(this), !this.root.isUpdating && this.root.startUpdate(), this.isLayoutDirty) return;
3094
- this.isLayoutDirty = !0;
3095
- for (let u = 0; u < this.path.length; u++) {
3096
- const h = this.path[u];
3097
- h.shouldResetTransform = !0, (typeof h.latestValues.x == "string" || typeof h.latestValues.y == "string") && (h.isLayoutDirty = !0), h.updateScroll("snapshot"), h.options.layoutRoot && h.willUpdate(!1);
3098
- }
3099
- const { layoutId: a, layout: l } = this.options;
3100
- if (a === void 0 && !l) return;
3101
- const c = this.getTransformTemplate();
3102
- this.prevTransformTemplateValue = c ? c(this.latestValues, "") : void 0, this.updateSnapshot(), r && this.notifyListeners("willUpdate");
3103
- }
3104
- update() {
3105
- if (this.updateScheduled = !1, this.isUpdateBlocked()) {
3106
- const a = this.updateBlockedByResize;
3107
- this.unblockUpdate(), this.updateBlockedByResize = !1, this.clearAllSnapshots(), a && this.nodes.forEach(Mu), this.nodes.forEach(Cn);
3108
- return;
3109
- }
3110
- if (this.animationId <= this.animationCommitId) {
3111
- this.nodes.forEach(Dn);
3112
- return;
3113
- }
3114
- this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(Cu), this.nodes.forEach(Du), this.nodes.forEach(Pu), this.nodes.forEach(Su)) : this.nodes.forEach(Dn), this.clearAllSnapshots();
3115
- const r = O.now();
3116
- B.delta = tt(0, 1e3 / 60, r - B.timestamp), B.timestamp = r, B.isProcessing = !0, ve.update.process(B), ve.preRender.process(B), ve.render.process(B), B.isProcessing = !1;
3117
- }
3118
- didUpdate() {
3119
- this.updateScheduled || (this.updateScheduled = !0, Pi.read(this.scheduleUpdate));
3120
- }
3121
- clearAllSnapshots() {
3122
- this.nodes.forEach(Vu), this.sharedNodes.forEach(ku);
3123
- }
3124
- scheduleUpdateProjection() {
3125
- this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, A.preRender(this.updateProjection, !1, !0));
3126
- }
3127
- scheduleCheckAfterUnmount() {
3128
- A.postRender(() => {
3129
- this.isLayoutDirty ? this.root.didUpdate() : this.root.checkUpdateFailed();
3130
- });
3131
- }
3132
- updateSnapshot() {
3133
- this.snapshot || !this.instance || (this.snapshot = this.measure(), this.snapshot && !j(this.snapshot.measuredBox.x) && !j(this.snapshot.measuredBox.y) && (this.snapshot = void 0));
3134
- }
3135
- updateLayout() {
3136
- if (!this.instance || (this.updateScroll(), !(this.options.alwaysMeasureLayout && this.isLead()) && !this.isLayoutDirty)) return;
3137
- if (this.resumeFrom && !this.resumeFrom.instance) for (let l = 0; l < this.path.length; l++) this.path[l].updateScroll();
3138
- const r = this.layout;
3139
- this.layout = this.measure(!1), this.layoutVersion++, this.layoutCorrected || (this.layoutCorrected = R()), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
3140
- const { visualElement: a } = this.options;
3141
- a && a.notify("LayoutMeasure", this.layout.layoutBox, r ? r.layoutBox : void 0);
3142
- }
3143
- updateScroll(r = "measure") {
3144
- let a = !!(this.options.layoutScroll && this.instance);
3145
- if (this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === r && (a = !1), a && this.instance) {
3146
- const l = n(this.instance);
3147
- this.scroll = {
3148
- animationId: this.root.animationId,
3149
- phase: r,
3150
- isRoot: l,
3151
- offset: i(this.instance),
3152
- wasRoot: this.scroll ? this.scroll.isRoot : l
3153
- };
3154
- }
3155
- }
3156
- resetTransform() {
3157
- if (!s) return;
3158
- const r = this.isLayoutDirty || this.shouldResetTransform || this.options.alwaysMeasureLayout, a = this.projectionDelta && !Tr(this.projectionDelta), l = this.getTransformTemplate(), c = l ? l(this.latestValues, "") : void 0, u = c !== this.prevTransformTemplateValue;
3159
- r && this.instance && (a || ht(this.latestValues) || u) && (s(this.instance, c), this.shouldResetTransform = !1, this.scheduleRender());
3160
- }
3161
- measure(r = !0) {
3162
- const a = this.measurePageBox();
3163
- let l = this.removeElementScroll(a);
3164
- return r && (l = this.removeTransform(l)), Ou(l), {
3165
- animationId: this.root.animationId,
3166
- measuredBox: a,
3167
- layoutBox: l,
3168
- latestValues: {},
3169
- source: this.id
3170
- };
3171
- }
3172
- measurePageBox() {
3173
- const { visualElement: r } = this.options;
3174
- if (!r) return R();
3175
- const a = r.measureViewportBox();
3176
- if (!(this.scroll?.wasRoot || this.path.some(ju))) {
3177
- const { scroll: l } = this.root;
3178
- l && (Z(a.x, l.offset.x), Z(a.y, l.offset.y));
3179
- }
3180
- return a;
3181
- }
3182
- removeElementScroll(r) {
3183
- const a = R();
3184
- if (z(a, r), this.scroll?.wasRoot) return a;
3185
- for (let l = 0; l < this.path.length; l++) {
3186
- const c = this.path[l], { scroll: u, options: h } = c;
3187
- c !== this.root && u && h.layoutScroll && (u.wasRoot && z(a, r), Z(a.x, u.offset.x), Z(a.y, u.offset.y));
3188
- }
3189
- return a;
3190
- }
3191
- applyTransform(r, a = !1, l) {
3192
- const c = l || R();
3193
- z(c, r);
3194
- for (let u = 0; u < this.path.length; u++) {
3195
- const h = this.path[u];
3196
- !a && h.options.layoutScroll && h.scroll && h !== h.root && (Z(c.x, -h.scroll.offset.x), Z(c.y, -h.scroll.offset.y)), ht(h.latestValues) && te(c, h.latestValues, h.layout?.layoutBox);
3197
- }
3198
- return ht(this.latestValues) && te(c, this.latestValues, this.layout?.layoutBox), c;
3199
- }
3200
- removeTransform(r) {
3201
- const a = R();
3202
- z(a, r);
3203
- for (let l = 0; l < this.path.length; l++) {
3204
- const c = this.path[l];
3205
- if (!ht(c.latestValues)) continue;
3206
- let u;
3207
- c.instance && (Ze(c.latestValues) && c.updateSnapshot(), u = R(), z(u, c.measurePageBox())), Tn(a, c.latestValues, c.snapshot?.layoutBox, u);
3208
- }
3209
- return ht(this.latestValues) && Tn(a, this.latestValues), a;
3210
- }
3211
- setTargetDelta(r) {
3212
- this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
3213
- }
3214
- setOptions(r) {
3215
- this.options = {
3216
- ...this.options,
3217
- ...r,
3218
- crossfade: r.crossfade !== void 0 ? r.crossfade : !0
3219
- };
3220
- }
3221
- clearMeasurements() {
3222
- 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;
3223
- }
3224
- forceRelativeParentToResolveTarget() {
3225
- this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== B.timestamp && this.relativeParent.resolveTargetDelta(!0);
3226
- }
3227
- resolveTargetDelta(r = !1) {
3228
- const a = this.getLead();
3229
- this.isProjectionDirty || (this.isProjectionDirty = a.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = a.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = a.isSharedProjectionDirty);
3230
- const l = !!this.resumingFrom || this !== a;
3231
- if (!(r || l && this.isSharedProjectionDirty || this.isProjectionDirty || this.parent?.isProjectionDirty || this.attemptToResolveRelativeTarget || this.root.updateBlockedByResize)) return;
3232
- const { layout: c, layoutId: u } = this.options;
3233
- if (!this.layout || !(c || u)) return;
3234
- this.resolvedRelativeTargetAt = B.timestamp;
3235
- const h = this.getClosestProjectingParent();
3236
- 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 = R(), this.targetWithTransforms = R()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), ru(this.target, this.relativeTarget, this.relativeParent.target, this.options.layoutAnchor || void 0)) : this.targetDelta ? (this.resumingFrom ? this.applyTransform(this.layout.layoutBox, !1, this.target) : z(this.target, this.layout.layoutBox), ar(this.target, this.targetDelta)) : z(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), J.value && ft.calculatedTargetDeltas++);
3237
- }
3238
- getClosestProjectingParent() {
3239
- if (!(!this.parent || Ze(this.parent.latestValues) || or(this.parent.latestValues)))
3240
- return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
3241
- }
3242
- isProjecting() {
3243
- return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
3244
- }
3245
- createRelativeTarget(r, a, l) {
3246
- this.relativeParent = r, this.linkedParentVersion = r.layoutVersion, this.forceRelativeParentToResolveTarget(), this.relativeTarget = R(), this.relativeTargetOrigin = R(), ue(this.relativeTargetOrigin, a, l, this.options.layoutAnchor || void 0), z(this.relativeTarget, this.relativeTargetOrigin);
3247
- }
3248
- removeRelativeTarget() {
3249
- this.relativeParent = this.relativeTarget = void 0;
3250
- }
3251
- calcProjection() {
3252
- const r = this.getLead(), a = !!this.resumingFrom || this !== r;
3253
- let l = !0;
3254
- if ((this.isProjectionDirty || this.parent?.isProjectionDirty) && (l = !1), a && (this.isSharedProjectionDirty || this.isTransformDirty) && (l = !1), this.resolvedRelativeTargetAt === B.timestamp && (l = !1), l) return;
3255
- const { layout: c, layoutId: u } = this.options;
3256
- 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;
3257
- z(this.layoutCorrected, this.layout.layoutBox);
3258
- const h = this.treeScale.x, f = this.treeScale.y;
3259
- Bl(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 = R());
3260
- const { target: p } = r;
3261
- if (!p) {
3262
- this.prevProjectionDelta && (this.createProjectionDeltas(), this.scheduleRender());
3263
- return;
3264
- }
3265
- !this.projectionDelta || !this.prevProjectionDelta ? this.createProjectionDeltas() : (dn(this.prevProjectionDelta.x, this.projectionDelta.x), dn(this.prevProjectionDelta.y, this.projectionDelta.y)), It(this.projectionDelta, this.layoutCorrected, p, this.latestValues), (this.treeScale.x !== h || this.treeScale.y !== f || !bn(this.projectionDelta.x, this.prevProjectionDelta.x) || !bn(this.projectionDelta.y, this.prevProjectionDelta.y)) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", p)), J.value && ft.calculatedProjections++;
3266
- }
3267
- hide() {
3268
- this.isVisible = !1;
3269
- }
3270
- show() {
3271
- this.isVisible = !0;
3272
- }
3273
- scheduleRender(r = !0) {
3274
- if (this.options.visualElement?.scheduleRender(), r) {
3275
- const a = this.getStack();
3276
- a && a.scheduleRender();
3277
- }
3278
- this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
3279
- }
3280
- createProjectionDeltas() {
3281
- this.prevProjectionDelta = bt(), this.projectionDelta = bt(), this.projectionDeltaWithTransform = bt();
3282
- }
3283
- setAnimationOrigin(r, a = !1) {
3284
- const l = this.snapshot, c = l ? l.latestValues : {}, u = { ...this.latestValues }, h = bt();
3285
- (!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
3286
- const f = R(), p = (l ? l.source : void 0) !== (this.layout ? this.layout.source : void 0), d = this.getStack(), m = !d || d.members.length <= 1, g = !!(p && !m && this.options.crossfade === !0 && !this.path.some(Iu));
3287
- this.animationProgress = 0;
3288
- let v;
3289
- this.mixTargetDelta = (x) => {
3290
- const y = x / 1e3;
3291
- Rn(h.x, r.x, y), Rn(h.y, r.y, y), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (ue(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox, this.options.layoutAnchor || void 0), Bu(this.relativeTarget, this.relativeTargetOrigin, f, y), v && uu(this.relativeTarget, v) && (this.isProjectionDirty = !1), v || (v = R()), z(v, this.relativeTarget)), p && (this.animationValues = u, fu(u, c, this.latestValues, y, g, m)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = y;
3292
- }, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
3293
- }
3294
- startAnimation(r) {
3295
- this.notifyListeners("animationStart"), this.currentAnimation?.stop(), this.resumingFrom?.currentAnimation?.stop(), this.pendingAnimation && (ot(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = A.update(() => {
3296
- ie.hasAnimatedSinceResize = !0, vt.layout++, this.motionValue || (this.motionValue = Vt(0)), this.motionValue.jump(0, !1), this.currentAnimation = mu(this.motionValue, [0, 1e3], {
3297
- ...r,
3298
- velocity: 0,
3299
- isSync: !0,
3300
- onUpdate: (a) => {
3301
- this.mixTargetDelta(a), r.onUpdate && r.onUpdate(a);
3302
- },
3303
- onStop: () => {
3304
- vt.layout--;
3305
- },
3306
- onComplete: () => {
3307
- vt.layout--, r.onComplete && r.onComplete(), this.completeAnimation();
3308
- }
3309
- }), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
3310
- });
3311
- }
3312
- completeAnimation() {
3313
- this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
3314
- const r = this.getStack();
3315
- r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
3316
- }
3317
- finishAnimation() {
3318
- this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(xu), this.currentAnimation.stop()), this.completeAnimation();
3319
- }
3320
- applyTransformsToTarget() {
3321
- const r = this.getLead();
3322
- let { targetWithTransforms: a, target: l, layout: c, latestValues: u } = r;
3323
- if (!(!a || !l || !c)) {
3324
- if (this !== r && this.layout && c && Ar(this.options.animationType, this.layout.layoutBox, c.layoutBox)) {
3325
- l = this.target || R();
3326
- const h = j(this.layout.layoutBox.x);
3327
- l.x.min = r.target.x.min, l.x.max = l.x.min + h;
3328
- const f = j(this.layout.layoutBox.y);
3329
- l.y.min = r.target.y.min, l.y.max = l.y.min + f;
3330
- }
3331
- z(a, l), te(a, u), It(this.projectionDeltaWithTransform, this.layoutCorrected, a, u);
3332
- }
3333
- }
3334
- registerSharedNode(r, a) {
3335
- this.sharedNodes.has(r) || this.sharedNodes.set(r, new Tu()), this.sharedNodes.get(r).add(a);
3336
- const l = a.options.initialPromotionConfig;
3337
- a.promote({
3338
- transition: l ? l.transition : void 0,
3339
- preserveFollowOpacity: l && l.shouldPreserveFollowOpacity ? l.shouldPreserveFollowOpacity(a) : void 0
3340
- });
3341
- }
3342
- isLead() {
3343
- const r = this.getStack();
3344
- return r ? r.lead === this : !0;
3345
- }
3346
- getLead() {
3347
- const { layoutId: r } = this.options;
3348
- return r ? this.getStack()?.lead || this : this;
3349
- }
3350
- getPrevLead() {
3351
- const { layoutId: r } = this.options;
3352
- return r ? this.getStack()?.prevLead : void 0;
3353
- }
3354
- getStack() {
3355
- const { layoutId: r } = this.options;
3356
- if (r) return this.root.sharedNodes.get(r);
3357
- }
3358
- promote({ needsReset: r, transition: a, preserveFollowOpacity: l } = {}) {
3359
- const c = this.getStack();
3360
- c && c.promote(this, l), r && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
3361
- }
3362
- relegate() {
3363
- const r = this.getStack();
3364
- return r ? r.relegate(this) : !1;
3365
- }
3366
- resetSkewAndRotation() {
3367
- const { visualElement: r } = this.options;
3368
- if (!r) return;
3369
- let a = !1;
3370
- const { latestValues: l } = r;
3371
- if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a) return;
3372
- const c = {};
3373
- l.z && Ae("z", r, c, this.animationValues);
3374
- for (let u = 0; u < be.length; u++)
3375
- Ae(`rotate${be[u]}`, r, c, this.animationValues), Ae(`skew${be[u]}`, r, c, this.animationValues);
3376
- r.render();
3377
- for (const u in c)
3378
- r.setStaticValue(u, c[u]), this.animationValues && (this.animationValues[u] = c[u]);
3379
- r.scheduleRender();
3380
- }
3381
- applyProjectionStyles(r, a) {
3382
- if (!this.instance || this.isSVG) return;
3383
- if (!this.isVisible) {
3384
- r.visibility = "hidden";
3385
- return;
3386
- }
3387
- const l = this.getTransformTemplate();
3388
- if (this.needsReset) {
3389
- this.needsReset = !1, r.visibility = "", r.opacity = "", r.pointerEvents = ee(a?.pointerEvents) || "", r.transform = l ? l(this.latestValues, "") : "none";
3390
- return;
3391
- }
3392
- const c = this.getLead();
3393
- if (!this.projectionDelta || !this.layout || !c.target) {
3394
- this.options.layoutId && (r.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, r.pointerEvents = ee(a?.pointerEvents) || ""), this.hasProjected && !ht(this.latestValues) && (r.transform = l ? l({}, "") : "none", this.hasProjected = !1);
3395
- return;
3396
- }
3397
- r.visibility = "";
3398
- const u = c.animationValues || c.latestValues;
3399
- this.applyTransformsToTarget();
3400
- let h = cu(this.projectionDeltaWithTransform, this.treeScale, u);
3401
- l && (h = l(u, h)), r.transform = h;
3402
- const { x: f, y: p } = this.projectionDelta;
3403
- 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;
3404
- for (const d in Qe) {
3405
- if (u[d] === void 0) continue;
3406
- const { correct: m, applyTo: g, isCSSVariable: v } = Qe[d], x = h === "none" ? u[d] : m(u[d], c);
3407
- if (g) {
3408
- const y = g.length;
3409
- for (let w = 0; w < y; w++) r[g[w]] = x;
3410
- } else v ? this.options.visualElement.renderState.vars[d] = x : r[d] = x;
3411
- }
3412
- this.options.layoutId && (r.pointerEvents = c === this ? ee(a?.pointerEvents) || "" : "none");
3413
- }
3414
- clearSnapshot() {
3415
- this.resumeFrom = this.snapshot = void 0;
3416
- }
3417
- resetTree() {
3418
- this.root.nodes.forEach((r) => r.currentAnimation?.stop()), this.root.nodes.forEach(Cn), this.root.sharedNodes.clear();
3419
- }
3420
- };
3421
- }
3422
- function Pu(t) {
3423
- t.updateLayout();
3424
- }
3425
- function Su(t) {
3426
- const e = t.resumeFrom?.snapshot || t.snapshot;
3427
- if (t.isLead() && t.layout && e && t.hasListeners("didUpdate")) {
3428
- const { layoutBox: i, measuredBox: n } = t.layout, { animationType: s } = t.options, o = e.source !== t.layout.source;
3429
- if (s === "size") q((u) => {
3430
- const h = o ? e.measuredBox[u] : e.layoutBox[u], f = j(h);
3431
- h.min = i[u].min, h.max = h.min + f;
3432
- });
3433
- else if (s === "x" || s === "y") {
3434
- const u = s === "x" ? "y" : "x";
3435
- ti(o ? e.measuredBox[u] : e.layoutBox[u], i[u]);
3436
- } else Ar(s, e.layoutBox, i) && q((u) => {
3437
- const h = o ? e.measuredBox[u] : e.layoutBox[u], f = j(i[u]);
3438
- h.max = h.min + f, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[u].max = t.relativeTarget[u].min + f);
3439
- });
3440
- const r = bt();
3441
- It(r, i, e.layoutBox);
3442
- const a = bt();
3443
- o ? It(a, t.applyTransform(n, !0), e.measuredBox) : It(a, i, e.layoutBox);
3444
- const l = !Tr(r);
3445
- let c = !1;
3446
- if (!t.resumeFrom) {
3447
- const u = t.getClosestProjectingParent();
3448
- if (u && !u.resumeFrom) {
3449
- const { snapshot: h, layout: f } = u;
3450
- if (h && f) {
3451
- const p = t.options.layoutAnchor || void 0, d = R();
3452
- ue(d, e.layoutBox, h.layoutBox, p);
3453
- const m = R();
3454
- ue(m, i, f.layoutBox, p), xr(d, m) || (c = !0), u.options.layoutRoot && (t.relativeTarget = m, t.relativeTargetOrigin = d, t.relativeParent = u);
3455
- }
3456
- }
3457
- }
3458
- t.notifyListeners("didUpdate", {
3459
- layout: i,
3460
- snapshot: e,
3461
- delta: a,
3462
- layoutDelta: r,
3463
- hasLayoutChanged: l,
3464
- hasRelativeLayoutChanged: c
3465
- });
3466
- } else if (t.isLead()) {
3467
- const { onExitComplete: i } = t.options;
3468
- i && i();
3469
- }
3470
- t.options.transition = void 0;
3471
- }
3472
- function bu(t) {
3473
- J.value && ft.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));
3474
- }
3475
- function Au(t) {
3476
- t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
3477
- }
3478
- function Vu(t) {
3479
- t.clearSnapshot();
3480
- }
3481
- function Cn(t) {
3482
- t.clearMeasurements();
3483
- }
3484
- function Mu(t) {
3485
- t.isLayoutDirty = !0, t.updateLayout();
3486
- }
3487
- function Dn(t) {
3488
- t.isLayoutDirty = !1;
3489
- }
3490
- function Cu(t) {
3491
- t.isAnimationBlocked && t.layout && !t.isLayoutDirty && (t.snapshot = t.layout, t.isLayoutDirty = !0);
3492
- }
3493
- function Du(t) {
3494
- const { visualElement: e } = t.options;
3495
- e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
3496
- }
3497
- function En(t) {
3498
- t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
3499
- }
3500
- function Eu(t) {
3501
- t.resolveTargetDelta();
3502
- }
3503
- function Ru(t) {
3504
- t.calcProjection();
3505
- }
3506
- function Lu(t) {
3507
- t.resetSkewAndRotation();
3508
- }
3509
- function ku(t) {
3510
- t.removeLeadSnapshot();
3511
- }
3512
- function Rn(t, e, i) {
3513
- t.translate = V(e.translate, 0, i), t.scale = V(e.scale, 1, i), t.origin = e.origin, t.originPoint = e.originPoint;
3514
- }
3515
- function Ln(t, e, i, n) {
3516
- t.min = V(e.min, i.min, n), t.max = V(e.max, i.max, n);
3517
- }
3518
- function Bu(t, e, i, n) {
3519
- Ln(t.x, e.x, i.x, n), Ln(t.y, e.y, i.y, n);
3520
- }
3521
- function Iu(t) {
3522
- return t.animationValues && t.animationValues.opacityExit !== void 0;
3523
- }
3524
- var Fu = {
3525
- duration: 0.45,
3526
- ease: [
3527
- 0.4,
3528
- 0,
3529
- 0.1,
3530
- 1
3531
- ]
3532
- }, kn = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), Bn = kn("applewebkit/") && !kn("chrome/") ? Math.round : $;
3533
- function In(t) {
3534
- t.min = Bn(t.min), t.max = Bn(t.max);
3535
- }
3536
- function Ou(t) {
3537
- In(t.x), In(t.y);
3538
- }
3539
- function Ar(t, e, i) {
3540
- return t === "position" || t === "preserve-aspect" && !su(Sn(e), Sn(i), 0.2);
3541
- }
3542
- function ju(t) {
3543
- return t !== t.root && t.scroll?.wasRoot;
3544
- }
3545
- var Nu = br({
3546
- attachResizeListener: (t, e) => Ut(t, "resize", e),
3547
- measureScroll: () => ({
3548
- x: document.documentElement.scrollLeft || document.body?.scrollLeft || 0,
3549
- y: document.documentElement.scrollTop || document.body?.scrollTop || 0
3550
- }),
3551
- checkIsScrollRoot: () => !0
3552
- }), Ve = { current: void 0 }, Vr = br({
3553
- measureScroll: (t) => ({
3554
- x: t.scrollLeft,
3555
- y: t.scrollTop
3556
- }),
3557
- defaultParent: () => {
3558
- if (!Ve.current) {
3559
- const t = new Nu({});
3560
- t.mount(window), t.setOptions({ layoutScroll: !0 }), Ve.current = t;
3561
- }
3562
- return Ve.current;
3563
- },
3564
- resetTransform: (t, e) => {
3565
- t.style.transform = e !== void 0 ? e : "none";
3566
- },
3567
- checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
3568
- }), Mr = Mt({
3569
- transformPagePoint: (t) => t,
3570
- isStatic: !1,
3571
- reducedMotion: "never"
3572
- });
3573
- function Uu(t = !0) {
3574
- const e = U(si);
3575
- if (e === null) return [!0, null];
3576
- const { isPresent: i, onExitComplete: n, register: s } = e, o = Xr();
3577
- ni(() => {
3578
- if (t) return s(o);
3579
- }, [t]);
3580
- const r = qn(() => t && n && n(o), [
3581
- o,
3582
- n,
3583
- t
3584
- ]);
3585
- return !i && n ? [!1, r] : [!0];
3586
- }
3587
- var Cr = Mt({ strict: !1 }), Fn = {
3588
- animation: [
3589
- "animate",
3590
- "variants",
3591
- "whileHover",
3592
- "whileTap",
3593
- "exit",
3594
- "whileInView",
3595
- "whileFocus",
3596
- "whileDrag"
3597
- ],
3598
- exit: ["exit"],
3599
- drag: ["drag", "dragControls"],
3600
- focus: ["whileFocus"],
3601
- hover: [
3602
- "whileHover",
3603
- "onHoverStart",
3604
- "onHoverEnd"
3605
- ],
3606
- tap: [
3607
- "whileTap",
3608
- "onTap",
3609
- "onTapStart",
3610
- "onTapCancel"
3611
- ],
3612
- pan: [
3613
- "onPan",
3614
- "onPanStart",
3615
- "onPanSessionStart",
3616
- "onPanEnd"
3617
- ],
3618
- inView: [
3619
- "whileInView",
3620
- "onViewportEnter",
3621
- "onViewportLeave"
3622
- ],
3623
- layout: ["layout", "layoutId"]
3624
- }, On = !1;
3625
- function Wu() {
3626
- if (On) return;
3627
- const t = {};
3628
- for (const e in Fn) t[e] = { isEnabled: (i) => Fn[e].some((n) => !!i[n]) };
3629
- nr(t), On = !0;
3630
- }
3631
- function Dr() {
3632
- return Wu(), El();
3633
- }
3634
- function _u(t) {
3635
- const e = Dr();
3636
- for (const i in t) e[i] = {
3637
- ...e[i],
3638
- ...t[i]
3639
- };
3640
- nr(e);
3641
- }
3642
- var Ku = /* @__PURE__ */ new Set([
3643
- "animate",
3644
- "exit",
3645
- "variants",
3646
- "initial",
3647
- "style",
3648
- "values",
3649
- "variants",
3650
- "transition",
3651
- "transformTemplate",
3652
- "custom",
3653
- "inherit",
3654
- "onBeforeLayoutMeasure",
3655
- "onAnimationStart",
3656
- "onAnimationComplete",
3657
- "onUpdate",
3658
- "onDragStart",
3659
- "onDrag",
3660
- "onDragEnd",
3661
- "onMeasureDragConstraints",
3662
- "onDirectionLock",
3663
- "onDragTransitionEnd",
3664
- "_dragX",
3665
- "_dragY",
3666
- "onHoverStart",
3667
- "onHoverEnd",
3668
- "onViewportEnter",
3669
- "onViewportLeave",
3670
- "globalTapTarget",
3671
- "propagate",
3672
- "ignoreStrict",
3673
- "viewport"
3674
- ]);
3675
- function ce(t) {
3676
- return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Ku.has(t);
3677
- }
3678
- var $u = /* @__PURE__ */ $r({ default: () => Er }), Er, zu = Kr((() => {
3679
- throw Er = {}, new Error('Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?');
3680
- })), Rr = (t) => !ce(t);
3681
- function Hu(t) {
3682
- typeof t == "function" && (Rr = (e) => e.startsWith("on") ? !ce(e) : t(e));
3683
- }
3684
- try {
3685
- Hu((zu(), _r($u)).default);
3686
- } catch {
3687
- }
3688
- function Gu(t, e, i) {
3689
- const n = {};
3690
- for (const s in t)
3691
- s === "values" && typeof t.values == "object" || I(t[s]) || (Rr(s) || i === !0 && ce(s) || !e && !ce(s) || t.draggable && s.startsWith("onDrag")) && (n[s] = t[s]);
3692
- return n;
3693
- }
3694
- var me = /* @__PURE__ */ Mt({});
3695
- function Xu(t, e) {
3696
- if (pe(t)) {
3697
- const { initial: i, animate: n } = t;
3698
- return {
3699
- initial: i === !1 || Nt(i) ? i : void 0,
3700
- animate: Nt(n) ? n : void 0
3701
- };
3702
- }
3703
- return t.inherit !== !1 ? e : {};
3704
- }
3705
- function Yu(t) {
3706
- const { initial: e, animate: i } = Xu(t, U(me));
3707
- return he(() => ({
3708
- initial: e,
3709
- animate: i
3710
- }), [jn(e), jn(i)]);
3711
- }
3712
- function jn(t) {
3713
- return Array.isArray(t) ? t.join(" ") : t;
3714
- }
3715
- var Di = () => ({
3716
- style: {},
3717
- transform: {},
3718
- transformOrigin: {},
3719
- vars: {}
3720
- });
3721
- function Lr(t, e, i) {
3722
- for (const n in e) !I(e[n]) && !cr(n, i) && (t[n] = e[n]);
3723
- }
3724
- function qu({ transformTemplate: t }, e) {
3725
- return he(() => {
3726
- const i = Di();
3727
- return Mi(i, e, t), Object.assign({}, i.vars, i.style);
3728
- }, [e]);
3729
- }
3730
- function Zu(t, e) {
3731
- const i = t.style || {}, n = {};
3732
- return Lr(n, i, t), Object.assign(n, qu(t, e)), n;
3733
- }
3734
- function Ju(t, e) {
3735
- const i = {}, n = Zu(t, e);
3736
- 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;
3737
- }
3738
- var kr = () => ({
3739
- ...Di(),
3740
- attrs: {}
3741
- });
3742
- function Qu(t, e, i, n) {
3743
- const s = he(() => {
3744
- const o = kr();
3745
- return hr(o, e, dr(n), t.transformTemplate, t.style), {
3746
- ...o.attrs,
3747
- style: { ...o.style }
3748
- };
3749
- }, [e]);
3750
- if (t.style) {
3751
- const o = {};
3752
- Lr(o, t.style, t), s.style = {
3753
- ...o,
3754
- ...s.style
3755
- };
3756
- }
3757
- return s;
3758
- }
3759
- var tc = [
3760
- "animate",
3761
- "circle",
3762
- "defs",
3763
- "desc",
3764
- "ellipse",
3765
- "g",
3766
- "image",
3767
- "line",
3768
- "filter",
3769
- "marker",
3770
- "mask",
3771
- "metadata",
3772
- "path",
3773
- "pattern",
3774
- "polygon",
3775
- "polyline",
3776
- "rect",
3777
- "stop",
3778
- "switch",
3779
- "symbol",
3780
- "svg",
3781
- "text",
3782
- "tspan",
3783
- "use",
3784
- "view"
3785
- ];
3786
- function Ei(t) {
3787
- return typeof t != "string" || t.includes("-") ? !1 : !!(tc.indexOf(t) > -1 || /[A-Z]/u.test(t));
3788
- }
3789
- function ec(t, e, i, { latestValues: n }, s, o = !1, r) {
3790
- const a = (r ?? Ei(t) ? Qu : Ju)(e, n, s, t), l = Gu(e, typeof t == "string", o), c = t !== Yn ? {
3791
- ...l,
3792
- ...a,
3793
- ref: i
3794
- } : {}, { children: u } = e, h = he(() => I(u) ? u.get() : u, [u]);
3795
- return Hr(t, {
3796
- ...c,
3797
- children: h
3798
- });
3799
- }
3800
- function ic({ scrapeMotionValuesFromProps: t, createRenderState: e }, i, n, s) {
3801
- return {
3802
- latestValues: nc(i, n, s, t),
3803
- renderState: e()
3804
- };
3805
- }
3806
- function nc(t, e, i, n) {
3807
- const s = {}, o = n(t, {});
3808
- for (const f in o) s[f] = ee(o[f]);
3809
- let { initial: r, animate: a } = t;
3810
- const l = pe(t), c = er(t);
3811
- e && c && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
3812
- let u = i ? i.initial === !1 : !1;
3813
- u = u || r === !1;
3814
- const h = u ? a : r;
3815
- if (h && typeof h != "boolean" && !de(h)) {
3816
- const f = Array.isArray(h) ? h : [h];
3817
- for (let p = 0; p < f.length; p++) {
3818
- const d = Ti(t, f[p]);
3819
- if (d) {
3820
- const { transitionEnd: m, transition: g, ...v } = d;
3821
- for (const x in v) {
3822
- let y = v[x];
3823
- if (Array.isArray(y)) {
3824
- const w = u ? y.length - 1 : 0;
3825
- y = y[w];
3826
- }
3827
- y !== null && (s[x] = y);
3828
- }
3829
- for (const x in m) s[x] = m[x];
3830
- }
3831
- }
3832
- }
3833
- return s;
3834
- }
3835
- var Br = (t) => (e, i) => {
3836
- const n = U(me), s = U(si), o = () => ic(t, e, n, s);
3837
- return i ? o() : Zr(o);
3838
- }, sc = /* @__PURE__ */ Br({
3839
- scrapeMotionValuesFromProps: Ci,
3840
- createRenderState: Di
3841
- }), rc = /* @__PURE__ */ Br({
3842
- scrapeMotionValuesFromProps: pr,
3843
- createRenderState: kr
3844
- }), oc = /* @__PURE__ */ Symbol.for("motionComponentSymbol");
3845
- function ac(t, e, i) {
3846
- const n = dt(i);
3847
- Zn(() => {
3848
- n.current = i;
3849
- });
3850
- const s = dt(null);
3851
- return qn((o) => {
3852
- o && t.onMount?.(o);
3853
- const r = n.current;
3854
- if (typeof r == "function") if (o) {
3855
- const a = r(o);
3856
- typeof a == "function" && (s.current = a);
3857
- } else s.current ? (s.current(), s.current = null) : r(o);
3858
- else r && (r.current = o);
3859
- e && (o ? e.mount(o) : e.unmount());
3860
- }, [e]);
3861
- }
3862
- var Ir = Mt({});
3863
- function xt(t) {
3864
- return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
3865
- }
3866
- function lc(t, e, i, n, s, o) {
3867
- const { visualElement: r } = U(me), a = U(Cr), l = U(si), c = U(Mr), u = c.reducedMotion, h = c.skipAnimations, f = dt(null), p = dt(!1);
3868
- n = n || a.renderer, !f.current && n && (f.current = n(t, {
3869
- visualState: e,
3870
- parent: r,
3871
- props: i,
3872
- presenceContext: l,
3873
- blockInitialAnimation: l ? l.initial === !1 : !1,
3874
- reducedMotionConfig: u,
3875
- skipAnimations: h,
3876
- isSVG: o
3877
- }), p.current && f.current && (f.current.manuallyAnimateOnMount = !0));
3878
- const d = f.current, m = U(Ir);
3879
- d && !d.projection && s && (d.type === "html" || d.type === "svg") && uc(f.current, i, s, m);
3880
- const g = dt(!1);
3881
- Zn(() => {
3882
- d && g.current && d.update(i, l);
3883
- });
3884
- const v = i[_s], x = dt(!!v && typeof window < "u" && !window.MotionHandoffIsComplete?.(v) && window.MotionHasOptimisedAnimation?.(v));
3885
- return Qr(() => {
3886
- p.current = !0, d && (g.current = !0, window.MotionIsMounted = !0, d.updateFeatures(), d.scheduleRenderMicrotask(), x.current && d.animationState && d.animationState.animateChanges());
3887
- }), ni(() => {
3888
- d && (!x.current && d.animationState && d.animationState.animateChanges(), x.current && (queueMicrotask(() => {
3889
- window.MotionHandoffMarkAsComplete?.(v);
3890
- }), x.current = !1), d.enteringChildren = void 0);
3891
- }), d;
3892
- }
3893
- function uc(t, e, i, n) {
3894
- const { layoutId: s, layout: o, drag: r, dragConstraints: a, layoutScroll: l, layoutRoot: c, layoutAnchor: u, layoutCrossfade: h } = e;
3895
- t.projection = new i(t.latestValues, e["data-framer-portal-id"] ? void 0 : Fr(t.parent)), t.projection.setOptions({
3896
- layoutId: s,
3897
- layout: o,
3898
- alwaysMeasureLayout: !!r || a && xt(a),
3899
- visualElement: t,
3900
- animationType: typeof o == "string" ? o : "both",
3901
- initialPromotionConfig: n,
3902
- crossfade: h,
3903
- layoutScroll: l,
3904
- layoutRoot: c,
3905
- layoutAnchor: u
3906
- });
3907
- }
3908
- function Fr(t) {
3909
- if (t)
3910
- return t.options.allowProjection !== !1 ? t.projection : Fr(t.parent);
3911
- }
3912
- function Me(t, { forwardMotionProps: e = !1, type: i } = {}, n, s) {
3913
- n && _u(n);
3914
- const o = i ? i === "svg" : Ei(t), r = o ? rc : sc;
3915
- function a(c, u) {
3916
- let h;
3917
- const f = {
3918
- ...U(Mr),
3919
- ...c,
3920
- layoutId: cc(c)
3921
- }, { isStatic: p } = f, d = Yu(c), m = r(c, p);
3922
- if (!p && typeof window < "u") {
3923
- hc(f, n);
3924
- const g = fc(f);
3925
- h = g.MeasureLayout, d.visualElement = lc(t, m, f, s, g.ProjectionNode, o);
3926
- }
3927
- return qr(me.Provider, {
3928
- value: d,
3929
- children: [h && d.visualElement ? Jn(h, {
3930
- visualElement: d.visualElement,
3931
- ...f
3932
- }) : null, ec(t, c, ac(m, d.visualElement, u), m, p, e, o)]
3933
- });
3934
- }
3935
- a.displayName = `motion.${typeof t == "string" ? t : `create(${t.displayName ?? t.name ?? ""})`}`;
3936
- const l = Gr(a);
3937
- return l[oc] = t, l;
3938
- }
3939
- function cc({ layoutId: t }) {
3940
- const e = U(Qn).id;
3941
- return e && t !== void 0 ? e + "-" + t : t;
3942
- }
3943
- function hc(t, e) {
3944
- const i = U(Cr).strict;
3945
- if (process.env.NODE_ENV !== "production" && e && i) {
3946
- const n = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
3947
- t.ignoreStrict ? Ct(!1, n, "lazy-strict-mode") : it(!1, n, "lazy-strict-mode");
3948
- }
3949
- }
3950
- function fc(t) {
3951
- const { drag: e, layout: i } = Dr();
3952
- if (!e && !i) return {};
3953
- const n = {
3954
- ...e,
3955
- ...i
3956
- };
3957
- return {
3958
- MeasureLayout: e?.isEnabled(t) || i?.isEnabled(t) ? n.MeasureLayout : void 0,
3959
- ProjectionNode: n.ProjectionNode
3960
- };
3961
- }
3962
- function dc(t, e) {
3963
- if (typeof Proxy > "u") return Me;
3964
- const i = /* @__PURE__ */ new Map(), n = (o, r) => Me(o, r, t, e), s = (o, r) => (process.env.NODE_ENV !== "production" && ai(!1, "motion() is deprecated. Use motion.create() instead."), n(o, r));
3965
- return new Proxy(s, { get: (o, r) => r === "create" ? n : (i.has(r) || i.set(r, Me(r, void 0, t, e)), i.get(r)) });
3966
- }
3967
- var pc = (t, e) => e.isSVG ?? Ei(t) ? new Gl(e) : new Wl(e, { allowProjection: t !== Yn }), mc = class extends at {
3968
- constructor(t) {
3969
- super(t), t.animationState || (t.animationState = Jl(t));
3970
- }
3971
- updateAnimationControlsSubscription() {
3972
- const { animate: t } = this.node.getProps();
3973
- de(t) && (this.unmountControls = t.subscribe(this.node));
3974
- }
3975
- mount() {
3976
- this.updateAnimationControlsSubscription();
3977
- }
3978
- update() {
3979
- const { animate: t } = this.node.getProps(), { animate: e } = this.node.prevProps || {};
3980
- t !== e && this.updateAnimationControlsSubscription();
3981
- }
3982
- unmount() {
3983
- this.node.animationState.reset(), this.unmountControls?.();
3984
- }
3985
- }, vc = 0, gc = class extends at {
3986
- constructor() {
3987
- super(...arguments), this.id = vc++, this.isExitComplete = !1;
3988
- }
3989
- update() {
3990
- if (!this.node.presenceContext) return;
3991
- const { isPresent: t, onExitComplete: e } = this.node.presenceContext, { isPresent: i } = this.node.prevPresenceContext || {};
3992
- if (!this.node.animationState || t === i) return;
3993
- if (t && i === !1) {
3994
- if (this.isExitComplete) {
3995
- const { initial: s, custom: o } = this.node.getProps();
3996
- if (typeof s == "string") {
3997
- const r = yt(this.node, s, o);
3998
- if (r) {
3999
- const { transition: a, transitionEnd: l, ...c } = r;
4000
- for (const u in c) this.node.getValue(u)?.jump(c[u]);
4001
- }
4002
- }
4003
- this.node.animationState.reset(), this.node.animationState.animateChanges();
4004
- } else this.node.animationState.setActive("exit", !1);
4005
- this.isExitComplete = !1;
4006
- return;
4007
- }
4008
- const n = this.node.animationState.setActive("exit", !t);
4009
- e && !t && n.then(() => {
4010
- this.isExitComplete = !0, e(this.id);
4011
- });
4012
- }
4013
- mount() {
4014
- const { register: t, onExitComplete: e } = this.node.presenceContext || {};
4015
- e && e(this.id), t && (this.unmount = t(this.id));
4016
- }
4017
- unmount() {
4018
- }
4019
- }, yc = {
4020
- animation: { Feature: mc },
4021
- exit: { Feature: gc }
4022
- };
4023
- function $t(t) {
4024
- return { point: {
4025
- x: t.pageX,
4026
- y: t.pageY
4027
- } };
4028
- }
4029
- var Tc = (t) => (e) => Si(e) && t(e, $t(e));
4030
- function Ft(t, e, i, n) {
4031
- return Ut(t, e, Tc(i), n);
4032
- }
4033
- var Or = ({ current: t }) => t ? t.ownerDocument.defaultView : null, Nn = (t, e) => Math.abs(t - e);
4034
- function xc(t, e) {
4035
- const i = Nn(t.x, e.x), n = Nn(t.y, e.y);
4036
- return Math.sqrt(i ** 2 + n ** 2);
4037
- }
4038
- var Un = /* @__PURE__ */ new Set(["auto", "scroll"]), jr = class {
4039
- constructor(t, e, { transformPagePoint: i, contextWindow: n = window, dragSnapToOrigin: s = !1, distanceThreshold: o = 3, element: r } = {}) {
4040
- 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 = (h) => {
4041
- this.handleScroll(h.target);
4042
- }, this.onWindowScroll = () => {
4043
- this.handleScroll(window);
4044
- }, this.updatePoint = () => {
4045
- if (!(this.lastMoveEvent && this.lastMoveEventInfo)) return;
4046
- this.lastRawMoveEventInfo && (this.lastMoveEventInfo = Gt(this.lastRawMoveEventInfo, this.transformPagePoint));
4047
- const h = Ce(this.lastMoveEventInfo, this.history), f = this.startEvent !== null, p = xc(h.offset, {
4048
- x: 0,
4049
- y: 0
4050
- }) >= this.distanceThreshold;
4051
- if (!f && !p) return;
4052
- const { point: d } = h, { timestamp: m } = B;
4053
- this.history.push({
4054
- ...d,
4055
- timestamp: m
4056
- });
4057
- const { onStart: g, onMove: v } = this.handlers;
4058
- f || (g && g(this.lastMoveEvent, h), this.startEvent = this.lastMoveEvent), v && v(this.lastMoveEvent, h);
4059
- }, this.handlePointerMove = (h, f) => {
4060
- this.lastMoveEvent = h, this.lastRawMoveEventInfo = f, this.lastMoveEventInfo = Gt(f, this.transformPagePoint), A.update(this.updatePoint, !0);
4061
- }, this.handlePointerUp = (h, f) => {
4062
- this.end();
4063
- const { onEnd: p, onSessionEnd: d, resumeAnimation: m } = this.handlers;
4064
- if ((this.dragSnapToOrigin || !this.startEvent) && m && m(), !(this.lastMoveEvent && this.lastMoveEventInfo)) return;
4065
- const g = Ce(h.type === "pointercancel" ? this.lastMoveEventInfo : Gt(f, this.transformPagePoint), this.history);
4066
- this.startEvent && p && p(h, g), d && d(h, g);
4067
- }, !Si(t)) return;
4068
- this.dragSnapToOrigin = s, this.handlers = e, this.transformPagePoint = i, this.distanceThreshold = o, this.contextWindow = n || window;
4069
- const a = Gt($t(t), this.transformPagePoint), { point: l } = a, { timestamp: c } = B;
4070
- this.history = [{
4071
- ...l,
4072
- timestamp: c
4073
- }];
4074
- const { onSessionStart: u } = e;
4075
- u && u(t, Ce(a, this.history)), this.removeListeners = Wt(Ft(this.contextWindow, "pointermove", this.handlePointerMove), Ft(this.contextWindow, "pointerup", this.handlePointerUp), Ft(this.contextWindow, "pointercancel", this.handlePointerUp)), r && this.startScrollTracking(r);
4076
- }
4077
- startScrollTracking(t) {
4078
- let e = t.parentElement;
4079
- for (; e; ) {
4080
- const i = getComputedStyle(e);
4081
- (Un.has(i.overflowX) || Un.has(i.overflowY)) && this.scrollPositions.set(e, {
4082
- x: e.scrollLeft,
4083
- y: e.scrollTop
4084
- }), e = e.parentElement;
4085
- }
4086
- this.scrollPositions.set(window, {
4087
- x: window.scrollX,
4088
- y: window.scrollY
4089
- }), window.addEventListener("scroll", this.onElementScroll, { capture: !0 }), window.addEventListener("scroll", this.onWindowScroll), this.removeScrollListeners = () => {
4090
- window.removeEventListener("scroll", this.onElementScroll, { capture: !0 }), window.removeEventListener("scroll", this.onWindowScroll);
4091
- };
4092
- }
4093
- handleScroll(t) {
4094
- const e = this.scrollPositions.get(t);
4095
- if (!e) return;
4096
- const i = t === window, n = i ? {
4097
- x: window.scrollX,
4098
- y: window.scrollY
4099
- } : {
4100
- x: t.scrollLeft,
4101
- y: t.scrollTop
4102
- }, s = {
4103
- x: n.x - e.x,
4104
- y: n.y - e.y
4105
- };
4106
- 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), A.update(this.updatePoint, !0));
4107
- }
4108
- updateHandlers(t) {
4109
- this.handlers = t;
4110
- }
4111
- end() {
4112
- this.removeListeners && this.removeListeners(), this.removeScrollListeners && this.removeScrollListeners(), this.scrollPositions.clear(), ot(this.updatePoint);
4113
- }
4114
- };
4115
- function Gt(t, e) {
4116
- return e ? { point: e(t.point) } : t;
4117
- }
4118
- function Wn(t, e) {
4119
- return {
4120
- x: t.x - e.x,
4121
- y: t.y - e.y
4122
- };
4123
- }
4124
- function Ce({ point: t }, e) {
4125
- return {
4126
- point: t,
4127
- delta: Wn(t, Nr(e)),
4128
- offset: Wn(t, wc(e)),
4129
- velocity: Pc(e, 0.1)
4130
- };
4131
- }
4132
- function wc(t) {
4133
- return t[0];
4134
- }
4135
- function Nr(t) {
4136
- return t[t.length - 1];
4137
- }
4138
- function Pc(t, e) {
4139
- if (t.length < 2) return {
4140
- x: 0,
4141
- y: 0
4142
- };
4143
- let i = t.length - 1, n = null;
4144
- const s = Nr(t);
4145
- for (; i >= 0 && (n = t[i], !(s.timestamp - n.timestamp > W(e))); )
4146
- i--;
4147
- if (!n) return {
4148
- x: 0,
4149
- y: 0
4150
- };
4151
- n === t[0] && t.length > 2 && s.timestamp - n.timestamp > W(e) * 2 && (n = t[1]);
4152
- const o = K(s.timestamp - n.timestamp);
4153
- if (o === 0) return {
4154
- x: 0,
4155
- y: 0
4156
- };
4157
- const r = {
4158
- x: (s.x - n.x) / o,
4159
- y: (s.y - n.y) / o
4160
- };
4161
- return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
4162
- }
4163
- function Sc(t, { min: e, max: i }, n) {
4164
- return e !== void 0 && t < e ? t = n ? V(e, t, n.min) : Math.max(t, e) : i !== void 0 && t > i && (t = n ? V(i, t, n.max) : Math.min(t, i)), t;
4165
- }
4166
- function _n(t, e, i) {
4167
- return {
4168
- min: e !== void 0 ? t.min + e : void 0,
4169
- max: i !== void 0 ? t.max + i - (t.max - t.min) : void 0
4170
- };
4171
- }
4172
- function bc(t, { top: e, left: i, bottom: n, right: s }) {
4173
- return {
4174
- x: _n(t.x, i, s),
4175
- y: _n(t.y, e, n)
4176
- };
4177
- }
4178
- function Kn(t, e) {
4179
- let i = e.min - t.min, n = e.max - t.max;
4180
- return e.max - e.min < t.max - t.min && ([i, n] = [n, i]), {
4181
- min: i,
4182
- max: n
4183
- };
4184
- }
4185
- function Ac(t, e) {
4186
- return {
4187
- x: Kn(t.x, e.x),
4188
- y: Kn(t.y, e.y)
4189
- };
4190
- }
4191
- function Vc(t, e) {
4192
- let i = 0.5;
4193
- const n = j(t), s = j(e);
4194
- return s > n ? i = Ot(e.min, e.max - n, t.min) : n > s && (i = Ot(t.min, t.max - s, e.min)), tt(0, 1, i);
4195
- }
4196
- function Mc(t, e) {
4197
- const i = {};
4198
- return e.min !== void 0 && (i.min = e.min - t.min), e.max !== void 0 && (i.max = e.max - t.min), i;
4199
- }
4200
- var ei = 0.35;
4201
- function Cc(t = ei) {
4202
- return t === !1 ? t = 0 : t === !0 && (t = ei), {
4203
- x: $n(t, "left", "right"),
4204
- y: $n(t, "top", "bottom")
4205
- };
4206
- }
4207
- function $n(t, e, i) {
4208
- return {
4209
- min: zn(t, e),
4210
- max: zn(t, i)
4211
- };
4212
- }
4213
- function zn(t, e) {
4214
- return typeof t == "number" ? t : t[e] || 0;
4215
- }
4216
- var Dc = /* @__PURE__ */ new WeakMap(), Ec = class {
4217
- constructor(t) {
4218
- this.openDragLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = {
4219
- x: 0,
4220
- y: 0
4221
- }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = R(), this.latestPointerEvent = null, this.latestPanInfo = null, this.visualElement = t;
4222
- }
4223
- start(t, { snapToCursor: e = !1, distanceThreshold: i } = {}) {
4224
- const { presenceContext: n } = this.visualElement;
4225
- if (n && n.isPresent === !1) return;
4226
- const s = (u) => {
4227
- e && this.snapToCursor($t(u).point), this.stopAnimation();
4228
- }, o = (u, h) => {
4229
- const { drag: f, dragPropagation: p, onDragStart: d } = this.getProps();
4230
- if (f && !p && (this.openDragLock && this.openDragLock(), this.openDragLock = ol(f), !this.openDragLock))
4231
- return;
4232
- 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), q((g) => {
4233
- let v = this.getAxisMotionValue(g).get() || 0;
4234
- if (Q.test(v)) {
4235
- const { projection: x } = this.visualElement;
4236
- if (x && x.layout) {
4237
- const y = x.layout.layoutBox[g];
4238
- y && (v = j(y) * (parseFloat(v) / 100));
4239
- }
4240
- }
4241
- this.originPoint[g] = v;
4242
- }), d && A.update(() => d(u, h), !1, !0), He(this.visualElement, "transform");
4243
- const { animationState: m } = this.visualElement;
4244
- m && m.setActive("whileDrag", !0);
4245
- }, r = (u, h) => {
4246
- this.latestPointerEvent = u, this.latestPanInfo = h;
4247
- const { dragPropagation: f, dragDirectionLock: p, onDirectionLock: d, onDrag: m } = this.getProps();
4248
- if (!f && !this.openDragLock) return;
4249
- const { offset: g } = h;
4250
- if (p && this.currentDirection === null) {
4251
- this.currentDirection = Lc(g), this.currentDirection !== null && d && d(this.currentDirection);
4252
- return;
4253
- }
4254
- this.updateAxis("x", h.point, g), this.updateAxis("y", h.point, g), this.visualElement.render(), m && A.update(() => m(u, h), !1, !0);
4255
- }, a = (u, h) => {
4256
- this.latestPointerEvent = u, this.latestPanInfo = h, this.stop(u, h), this.latestPointerEvent = null, this.latestPanInfo = null;
4257
- }, l = () => {
4258
- const { dragSnapToOrigin: u } = this.getProps();
4259
- (u || this.constraints) && this.startAnimation({
4260
- x: 0,
4261
- y: 0
4262
- });
4263
- }, { dragSnapToOrigin: c } = this.getProps();
4264
- this.panSession = new jr(t, {
4265
- onSessionStart: s,
4266
- onStart: o,
4267
- onMove: r,
4268
- onSessionEnd: a,
4269
- resumeAnimation: l
4270
- }, {
4271
- transformPagePoint: this.visualElement.getTransformPagePoint(),
4272
- dragSnapToOrigin: c,
4273
- distanceThreshold: i,
4274
- contextWindow: Or(this.visualElement),
4275
- element: this.visualElement.current
4276
- });
4277
- }
4278
- stop(t, e) {
4279
- const i = t || this.latestPointerEvent, n = e || this.latestPanInfo, s = this.isDragging;
4280
- if (this.cancel(), !s || !n || !i) return;
4281
- const { velocity: o } = n;
4282
- this.startAnimation(o);
4283
- const { onDragEnd: r } = this.getProps();
4284
- r && A.postRender(() => r(i, n));
4285
- }
4286
- cancel() {
4287
- this.isDragging = !1;
4288
- const { projection: t, animationState: e } = this.visualElement;
4289
- t && (t.isAnimationBlocked = !1), this.endPanSession();
4290
- const { dragPropagation: i } = this.getProps();
4291
- !i && this.openDragLock && (this.openDragLock(), this.openDragLock = null), e && e.setActive("whileDrag", !1);
4292
- }
4293
- endPanSession() {
4294
- this.panSession && this.panSession.end(), this.panSession = void 0;
4295
- }
4296
- updateAxis(t, e, i) {
4297
- const { drag: n } = this.getProps();
4298
- if (!i || !Xt(t, n, this.currentDirection)) return;
4299
- const s = this.getAxisMotionValue(t);
4300
- let o = this.originPoint[t] + i[t];
4301
- this.constraints && this.constraints[t] && (o = Sc(o, this.constraints[t], this.elastic[t])), s.set(o);
4302
- }
4303
- resolveConstraints() {
4304
- 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;
4305
- t && xt(t) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : t && i ? this.constraints = bc(i.layoutBox, t) : this.constraints = !1, this.elastic = Cc(e), n !== this.constraints && !xt(t) && i && this.constraints && !this.hasMutatedConstraints && q((s) => {
4306
- this.constraints !== !1 && this.getAxisMotionValue(s) && (this.constraints[s] = Mc(i.layoutBox[s], this.constraints[s]));
4307
- });
4308
- }
4309
- resolveRefConstraints() {
4310
- const { dragConstraints: t, onMeasureDragConstraints: e } = this.getProps();
4311
- if (!t || !xt(t)) return !1;
4312
- const i = t.current;
4313
- it(i !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.", "drag-constraints-ref");
4314
- const { projection: n } = this.visualElement;
4315
- if (!n || !n.layout) return !1;
4316
- const s = Il(i, n.root, this.visualElement.getTransformPagePoint());
4317
- let o = Ac(n.layout.layoutBox, s);
4318
- if (e) {
4319
- const r = e(Ll(o));
4320
- this.hasMutatedConstraints = !!r, r && (o = rr(r));
4321
- }
4322
- return o;
4323
- }
4324
- startAnimation(t) {
4325
- const { drag: e, dragMomentum: i, dragElastic: n, dragTransition: s, dragSnapToOrigin: o, onDragTransitionEnd: r } = this.getProps(), a = this.constraints || {}, l = q((c) => {
4326
- if (!Xt(c, e, this.currentDirection)) return;
4327
- let u = a && a[c] || {};
4328
- (o === !0 || o === c) && (u = {
4329
- min: 0,
4330
- max: 0
4331
- });
4332
- const h = n ? 200 : 1e6, f = n ? 40 : 1e7, p = {
4333
- type: "inertia",
4334
- velocity: i ? t[c] : 0,
4335
- bounceStiffness: h,
4336
- bounceDamping: f,
4337
- timeConstant: 750,
4338
- restDelta: 1,
4339
- restSpeed: 10,
4340
- ...s,
4341
- ...u
4342
- };
4343
- return this.startAxisValueAnimation(c, p);
4344
- });
4345
- return Promise.all(l).then(r);
4346
- }
4347
- startAxisValueAnimation(t, e) {
4348
- const i = this.getAxisMotionValue(t);
4349
- return He(this.visualElement, t), i.start(yi(t, i, 0, e, this.visualElement, !1));
4350
- }
4351
- stopAnimation() {
4352
- q((t) => this.getAxisMotionValue(t).stop());
4353
- }
4354
- getAxisMotionValue(t) {
4355
- const e = `_drag${t.toUpperCase()}`, i = this.visualElement.getProps(), n = i[e];
4356
- return n || this.visualElement.getValue(t, (i.initial ? i.initial[t] : void 0) || 0);
4357
- }
4358
- snapToCursor(t) {
4359
- q((e) => {
4360
- const { drag: i } = this.getProps();
4361
- if (!Xt(e, i, this.currentDirection)) return;
4362
- const { projection: n } = this.visualElement, s = this.getAxisMotionValue(e);
4363
- if (n && n.layout) {
4364
- const { min: o, max: r } = n.layout.layoutBox[e], a = s.get() || 0;
4365
- s.set(t[e] - V(o, r, 0.5) + a);
4366
- }
4367
- });
4368
- }
4369
- scalePositionWithinConstraints() {
4370
- if (!this.visualElement.current) return;
4371
- const { drag: t, dragConstraints: e } = this.getProps(), { projection: i } = this.visualElement;
4372
- if (!xt(e) || !i || !this.constraints) return;
4373
- this.stopAnimation();
4374
- const n = {
4375
- x: 0,
4376
- y: 0
4377
- };
4378
- q((o) => {
4379
- const r = this.getAxisMotionValue(o);
4380
- if (r && this.constraints !== !1) {
4381
- const a = r.get();
4382
- n[o] = Vc({
4383
- min: a,
4384
- max: a
4385
- }, this.constraints[o]);
4386
- }
4387
- });
4388
- const { transformTemplate: s } = this.visualElement.getProps();
4389
- this.visualElement.current.style.transform = s ? s({}, "") : "none", i.root && i.root.updateScroll(), i.updateLayout(), this.constraints = !1, this.resolveConstraints(), q((o) => {
4390
- if (!Xt(o, t, null)) return;
4391
- const r = this.getAxisMotionValue(o), { min: a, max: l } = this.constraints[o];
4392
- r.set(V(a, l, n[o]));
4393
- }), this.visualElement.render();
4394
- }
4395
- addListeners() {
4396
- if (!this.visualElement.current) return;
4397
- Dc.set(this.visualElement, this);
4398
- const t = this.visualElement.current, e = Ft(t, "pointerdown", (l) => {
4399
- const { drag: c, dragListener: u = !0 } = this.getProps(), h = l.target, f = h !== t && fl(h);
4400
- c && u && !f && this.start(l);
4401
- });
4402
- let i;
4403
- const n = () => {
4404
- const { dragConstraints: l } = this.getProps();
4405
- xt(l) && l.current && (this.constraints = this.resolveRefConstraints(), i || (i = Rc(t, l.current, () => this.scalePositionWithinConstraints())));
4406
- }, { projection: s } = this.visualElement, o = s.addEventListener("measure", n);
4407
- s && !s.layout && (s.root && s.root.updateScroll(), s.updateLayout()), A.read(n);
4408
- const r = Ut(window, "resize", () => this.scalePositionWithinConstraints()), a = s.addEventListener("didUpdate", (({ delta: l, hasLayoutChanged: c }) => {
4409
- this.isDragging && c && (q((u) => {
4410
- const h = this.getAxisMotionValue(u);
4411
- h && (this.originPoint[u] += l[u].translate, h.set(h.get() + l[u].translate));
4412
- }), this.visualElement.render());
4413
- }));
4414
- return () => {
4415
- r(), e(), o(), a && a(), i && i();
4416
- };
4417
- }
4418
- getProps() {
4419
- const t = this.visualElement.getProps(), { drag: e = !1, dragDirectionLock: i = !1, dragPropagation: n = !1, dragConstraints: s = !1, dragElastic: o = ei, dragMomentum: r = !0 } = t;
4420
- return {
4421
- ...t,
4422
- drag: e,
4423
- dragDirectionLock: i,
4424
- dragPropagation: n,
4425
- dragConstraints: s,
4426
- dragElastic: o,
4427
- dragMomentum: r
4428
- };
4429
- }
4430
- };
4431
- function Hn(t) {
4432
- let e = !0;
4433
- return () => {
4434
- if (e) {
4435
- e = !1;
4436
- return;
4437
- }
4438
- t();
4439
- };
4440
- }
4441
- function Rc(t, e, i) {
4442
- const n = tn(t, Hn(i)), s = tn(e, Hn(i));
4443
- return () => {
4444
- n(), s();
4445
- };
4446
- }
4447
- function Xt(t, e, i) {
4448
- return (e === !0 || e === t) && (i === null || i === t);
4449
- }
4450
- function Lc(t, e = 10) {
4451
- let i = null;
4452
- return Math.abs(t.y) > e ? i = "y" : Math.abs(t.x) > e && (i = "x"), i;
4453
- }
4454
- var kc = class extends at {
4455
- constructor(t) {
4456
- super(t), this.removeGroupControls = $, this.removeListeners = $, this.controls = new Ec(t);
4457
- }
4458
- mount() {
4459
- const { dragControls: t } = this.node.getProps();
4460
- t && (this.removeGroupControls = t.subscribe(this.controls)), this.removeListeners = this.controls.addListeners() || $;
4461
- }
4462
- update() {
4463
- const { dragControls: t } = this.node.getProps(), { dragControls: e } = this.node.prevProps || {};
4464
- t !== e && (this.removeGroupControls(), t && (this.removeGroupControls = t.subscribe(this.controls)));
4465
- }
4466
- unmount() {
4467
- this.removeGroupControls(), this.removeListeners(), this.controls.isDragging || this.controls.endPanSession();
4468
- }
4469
- }, De = (t) => (e, i) => {
4470
- t && A.update(() => t(e, i), !1, !0);
4471
- }, Bc = class extends at {
4472
- constructor() {
4473
- super(...arguments), this.removePointerDownListener = $;
4474
- }
4475
- onPointerDown(t) {
4476
- this.session = new jr(t, this.createPanHandlers(), {
4477
- transformPagePoint: this.node.getTransformPagePoint(),
4478
- contextWindow: Or(this.node)
4479
- });
4480
- }
4481
- createPanHandlers() {
4482
- const { onPanSessionStart: t, onPanStart: e, onPan: i, onPanEnd: n } = this.node.getProps();
4483
- return {
4484
- onSessionStart: De(t),
4485
- onStart: De(e),
4486
- onMove: De(i),
4487
- onEnd: (s, o) => {
4488
- delete this.session, n && A.postRender(() => n(s, o));
4489
- }
4490
- };
4491
- }
4492
- mount() {
4493
- this.removePointerDownListener = Ft(this.node.current, "pointerdown", (t) => this.onPointerDown(t));
4494
- }
4495
- update() {
4496
- this.session && this.session.updateHandlers(this.createPanHandlers());
4497
- }
4498
- unmount() {
4499
- this.removePointerDownListener(), this.session && this.session.end();
4500
- }
4501
- }, Ee = !1, Ic = class extends zr {
4502
- componentDidMount() {
4503
- const { visualElement: t, layoutGroup: e, switchLayoutGroup: i, layoutId: n } = this.props, { projection: s } = t;
4504
- s && (e.group && e.group.add(s), i && i.register && n && i.register(s), Ee && s.root.didUpdate(), s.addEventListener("animationComplete", () => {
4505
- this.safeToRemove();
4506
- }), s.setOptions({
4507
- ...s.options,
4508
- layoutDependency: this.props.layoutDependency,
4509
- onExitComplete: () => this.safeToRemove()
4510
- })), ie.hasEverUpdated = !0;
4511
- }
4512
- getSnapshotBeforeUpdate(t) {
4513
- const { layoutDependency: e, visualElement: i, drag: n, isPresent: s } = this.props, { projection: o } = i;
4514
- return o && (o.isPresent = s, t.layoutDependency !== e && o.setOptions({
4515
- ...o.options,
4516
- layoutDependency: e
4517
- }), Ee = !0, n || t.layoutDependency !== e || e === void 0 || t.isPresent !== s ? o.willUpdate() : this.safeToRemove(), t.isPresent !== s && (s ? o.promote() : o.relegate() || A.postRender(() => {
4518
- const r = o.getStack();
4519
- (!r || !r.members.length) && this.safeToRemove();
4520
- }))), null;
4521
- }
4522
- componentDidUpdate() {
4523
- const { visualElement: t, layoutAnchor: e } = this.props, { projection: i } = t;
4524
- i && (i.options.layoutAnchor = e, i.root.didUpdate(), Pi.postRender(() => {
4525
- !i.currentAnimation && i.isLead() && this.safeToRemove();
4526
- }));
4527
- }
4528
- componentWillUnmount() {
4529
- const { visualElement: t, layoutGroup: e, switchLayoutGroup: i } = this.props, { projection: n } = t;
4530
- Ee = !0, n && (n.scheduleCheckAfterUnmount(), e && e.group && e.group.remove(n), i && i.deregister && i.deregister(n));
4531
- }
4532
- safeToRemove() {
4533
- const { safeToRemove: t } = this.props;
4534
- t && t();
4535
- }
4536
- render() {
4537
- return null;
4538
- }
4539
- };
4540
- function Ur(t) {
4541
- const [e, i] = Uu(), n = U(Qn);
4542
- return Jn(Ic, {
4543
- ...t,
4544
- layoutGroup: n,
4545
- switchLayoutGroup: U(Ir),
4546
- isPresent: e,
4547
- safeToRemove: i
4548
- });
4549
- }
4550
- var Fc = {
4551
- pan: { Feature: Bc },
4552
- drag: {
4553
- Feature: kc,
4554
- ProjectionNode: Vr,
4555
- MeasureLayout: Ur
4556
- }
4557
- };
4558
- function Gn(t, e, i) {
4559
- const { props: n } = t;
4560
- t.animationState && n.whileHover && t.animationState.setActive("whileHover", i === "Start");
4561
- const s = n["onHover" + i];
4562
- s && A.postRender(() => s(e, $t(e)));
4563
- }
4564
- var Oc = class extends at {
4565
- mount() {
4566
- const { current: t } = this.node;
4567
- t && (this.unmount = ll(t, (e, i) => (Gn(this.node, i, "Start"), (n) => Gn(this.node, n, "End"))));
4568
- }
4569
- unmount() {
4570
- }
4571
- }, jc = class extends at {
4572
- constructor() {
4573
- super(...arguments), this.isActive = !1;
4574
- }
4575
- onFocus() {
4576
- let t = !1;
4577
- try {
4578
- t = this.node.current.matches(":focus-visible");
4579
- } catch {
4580
- t = !0;
4581
- }
4582
- !t || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
4583
- }
4584
- onBlur() {
4585
- !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
4586
- }
4587
- mount() {
4588
- this.unmount = Wt(Ut(this.node.current, "focus", () => this.onFocus()), Ut(this.node.current, "blur", () => this.onBlur()));
4589
- }
4590
- unmount() {
4591
- }
4592
- };
4593
- function Xn(t, e, i) {
4594
- const { props: n } = t;
4595
- if (t.current instanceof HTMLButtonElement && t.current.disabled) return;
4596
- t.animationState && n.whileTap && t.animationState.setActive("whileTap", i === "Start");
4597
- const s = n["onTap" + (i === "End" ? "" : i)];
4598
- s && A.postRender(() => s(e, $t(e)));
4599
- }
4600
- var Nc = class extends at {
4601
- mount() {
4602
- const { current: t } = this.node;
4603
- if (!t) return;
4604
- const { globalTapTarget: e, propagate: i } = this.node.props;
4605
- this.unmount = pl(t, (n, s) => (Xn(this.node, s, "Start"), (o, { success: r }) => Xn(this.node, o, r ? "End" : "Cancel")), {
4606
- useGlobalTarget: e,
4607
- stopPropagation: i?.tap === !1
4608
- });
4609
- }
4610
- unmount() {
4611
- }
4612
- }, ii = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), Uc = (t) => {
4613
- const e = ii.get(t.target);
4614
- e && e(t);
4615
- }, Wc = (t) => {
4616
- t.forEach(Uc);
4617
- };
4618
- function _c({ root: t, ...e }) {
4619
- const i = t || document;
4620
- Re.has(i) || Re.set(i, {});
4621
- const n = Re.get(i), s = JSON.stringify(e);
4622
- return n[s] || (n[s] = new IntersectionObserver(Wc, {
4623
- root: t,
4624
- ...e
4625
- })), n[s];
4626
- }
4627
- function Kc(t, e, i) {
4628
- const n = _c(e);
4629
- return ii.set(t, i), n.observe(t), () => {
4630
- ii.delete(t), n.unobserve(t);
4631
- };
4632
- }
4633
- var $c = {
4634
- some: 0,
4635
- all: 1
4636
- }, zc = class extends at {
4637
- constructor() {
4638
- super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
4639
- }
4640
- startObserver() {
4641
- this.stopObserver?.();
4642
- const { viewport: t = {} } = this.node.getProps(), { root: e, margin: i, amount: n = "some", once: s } = t, o = {
4643
- root: e ? e.current : void 0,
4644
- rootMargin: i,
4645
- threshold: typeof n == "number" ? n : $c[n]
4646
- }, r = (a) => {
4647
- const { isIntersecting: l } = a;
4648
- if (this.isInView === l || (this.isInView = l, s && !l && this.hasEnteredView)) return;
4649
- l && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", l);
4650
- const { onViewportEnter: c, onViewportLeave: u } = this.node.getProps(), h = l ? c : u;
4651
- h && h(a);
4652
- };
4653
- this.stopObserver = Kc(this.node.current, o, r);
4654
- }
4655
- mount() {
4656
- this.startObserver();
4657
- }
4658
- update() {
4659
- if (typeof IntersectionObserver > "u") return;
4660
- const { props: t, prevProps: e } = this.node;
4661
- [
4662
- "amount",
4663
- "margin",
4664
- "root"
4665
- ].some(Hc(t, e)) && this.startObserver();
4666
- }
4667
- unmount() {
4668
- this.stopObserver?.(), this.hasEnteredView = !1, this.isInView = !1;
4669
- }
4670
- };
4671
- function Hc({ viewport: t = {} }, { viewport: e = {} } = {}) {
4672
- return (i) => t[i] !== e[i];
4673
- }
4674
- var Gc = {
4675
- inView: { Feature: zc },
4676
- tap: { Feature: Nc },
4677
- focus: { Feature: jc },
4678
- hover: { Feature: Oc }
4679
- }, Xc = { layout: {
4680
- ProjectionNode: Vr,
4681
- MeasureLayout: Ur
4682
- } }, Yc = {
4683
- ...yc,
4684
- ...Gc,
4685
- ...Fc,
4686
- ...Xc
4687
- }, eh = /* @__PURE__ */ dc(Yc, pc);
4688
- export {
4689
- eh as t
4690
- };