@konstructio/ui 0.1.2-alpha.6 → 0.1.2-alpha.60

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