lizaui 3.0.11

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 (348) hide show
  1. package/README.md +54 -0
  2. package/dist/button/index.cjs.js +2 -0
  3. package/dist/button/index.cjs.js.map +1 -0
  4. package/dist/button/index.es.js +5 -0
  5. package/dist/button/index.es.js.map +1 -0
  6. package/dist/button.d.ts +2 -0
  7. package/dist/calendar/index.cjs.js +425 -0
  8. package/dist/calendar/index.cjs.js.map +1 -0
  9. package/dist/calendar/index.es.js +6105 -0
  10. package/dist/calendar/index.es.js.map +1 -0
  11. package/dist/calendar.d.ts +2 -0
  12. package/dist/checkbox/index.cjs.js +2 -0
  13. package/dist/checkbox/index.cjs.js.map +1 -0
  14. package/dist/checkbox/index.es.js +6 -0
  15. package/dist/checkbox/index.es.js.map +1 -0
  16. package/dist/checkbox.d.ts +2 -0
  17. package/dist/chip/index.cjs.js +2 -0
  18. package/dist/chip/index.cjs.js.map +1 -0
  19. package/dist/chip/index.es.js +533 -0
  20. package/dist/chip/index.es.js.map +1 -0
  21. package/dist/chip.d.ts +2 -0
  22. package/dist/chunks/bundle-mjs-JiDEie86.js +2728 -0
  23. package/dist/chunks/bundle-mjs-JiDEie86.js.map +1 -0
  24. package/dist/chunks/bundle-mjs-W341Qwux.js +2 -0
  25. package/dist/chunks/bundle-mjs-W341Qwux.js.map +1 -0
  26. package/dist/chunks/button-CPpIQ7Z7.js +3971 -0
  27. package/dist/chunks/button-CPpIQ7Z7.js.map +1 -0
  28. package/dist/chunks/button-Dr5w6yIW.js +10 -0
  29. package/dist/chunks/button-Dr5w6yIW.js.map +1 -0
  30. package/dist/chunks/checkbox-C71XoTt2.js +2 -0
  31. package/dist/chunks/checkbox-C71XoTt2.js.map +1 -0
  32. package/dist/chunks/checkbox-DN309yjg.js +312 -0
  33. package/dist/chunks/checkbox-DN309yjg.js.map +1 -0
  34. package/dist/chunks/classes-7MXTIFwM.js +52 -0
  35. package/dist/chunks/classes-7MXTIFwM.js.map +1 -0
  36. package/dist/chunks/classes-P14wj2Ze.js +2 -0
  37. package/dist/chunks/classes-P14wj2Ze.js.map +1 -0
  38. package/dist/chunks/clsx-C11secjj.js +2 -0
  39. package/dist/chunks/clsx-C11secjj.js.map +1 -0
  40. package/dist/chunks/clsx-OuTLNxxd.js +17 -0
  41. package/dist/chunks/clsx-OuTLNxxd.js.map +1 -0
  42. package/dist/chunks/floating-ui.dom-9ZI0iiqa.js +2 -0
  43. package/dist/chunks/floating-ui.dom-9ZI0iiqa.js.map +1 -0
  44. package/dist/chunks/floating-ui.dom-PqoU7a4n.js +1134 -0
  45. package/dist/chunks/floating-ui.dom-PqoU7a4n.js.map +1 -0
  46. package/dist/chunks/floating-ui.react-dom-BQpCDpNU.js +2 -0
  47. package/dist/chunks/floating-ui.react-dom-BQpCDpNU.js.map +1 -0
  48. package/dist/chunks/floating-ui.react-dom-CihJ_dlB.js +204 -0
  49. package/dist/chunks/floating-ui.react-dom-CihJ_dlB.js.map +1 -0
  50. package/dist/chunks/iconBase-C4boY5mo.js +2 -0
  51. package/dist/chunks/iconBase-C4boY5mo.js.map +1 -0
  52. package/dist/chunks/iconBase-DSKTHwal.js +113 -0
  53. package/dist/chunks/iconBase-DSKTHwal.js.map +1 -0
  54. package/dist/chunks/index-CBDkd84T.js +2 -0
  55. package/dist/chunks/index-CBDkd84T.js.map +1 -0
  56. package/dist/chunks/index-C_b6-TON.js +78 -0
  57. package/dist/chunks/index-C_b6-TON.js.map +1 -0
  58. package/dist/chunks/jsx-runtime-BYq8_R6m.js +247 -0
  59. package/dist/chunks/jsx-runtime-BYq8_R6m.js.map +1 -0
  60. package/dist/chunks/jsx-runtime-DFswc9zO.js +2 -0
  61. package/dist/chunks/jsx-runtime-DFswc9zO.js.map +1 -0
  62. package/dist/chunks/pattern-CdQavADx.js +5 -0
  63. package/dist/chunks/pattern-CdQavADx.js.map +1 -0
  64. package/dist/chunks/pattern-F8jUniwt.js +2 -0
  65. package/dist/chunks/pattern-F8jUniwt.js.map +1 -0
  66. package/dist/chunks/refs-DLih6QCP.js +2 -0
  67. package/dist/chunks/refs-DLih6QCP.js.map +1 -0
  68. package/dist/chunks/refs-DcCOPvdv.js +35 -0
  69. package/dist/chunks/refs-DcCOPvdv.js.map +1 -0
  70. package/dist/chunks/select-BoiIj-gw.js +7 -0
  71. package/dist/chunks/select-BoiIj-gw.js.map +1 -0
  72. package/dist/chunks/select-Cy78fn6H.js +4267 -0
  73. package/dist/chunks/select-Cy78fn6H.js.map +1 -0
  74. package/dist/chunks/tooltip-BQVohLC7.js +2 -0
  75. package/dist/chunks/tooltip-BQVohLC7.js.map +1 -0
  76. package/dist/chunks/tooltip-CIcTjpF8.js +959 -0
  77. package/dist/chunks/tooltip-CIcTjpF8.js.map +1 -0
  78. package/dist/chunks/tv-ButAo3dF.js +2669 -0
  79. package/dist/chunks/tv-ButAo3dF.js.map +1 -0
  80. package/dist/chunks/tv-C5lw0tnu.js +2 -0
  81. package/dist/chunks/tv-C5lw0tnu.js.map +1 -0
  82. package/dist/chunks/utils-Blo0iNdk.js +15 -0
  83. package/dist/chunks/utils-Blo0iNdk.js.map +1 -0
  84. package/dist/chunks/utils-DuSyQWep.js +2 -0
  85. package/dist/chunks/utils-DuSyQWep.js.map +1 -0
  86. package/dist/chunks/v4-CRLUkzQ6.js +31 -0
  87. package/dist/chunks/v4-CRLUkzQ6.js.map +1 -0
  88. package/dist/chunks/v4-CqU37_Sa.js +2 -0
  89. package/dist/chunks/v4-CqU37_Sa.js.map +1 -0
  90. package/dist/chunks/variants-BUTPDD09.js +2 -0
  91. package/dist/chunks/variants-BUTPDD09.js.map +1 -0
  92. package/dist/chunks/variants-DhZQjbsQ.js +62 -0
  93. package/dist/chunks/variants-DhZQjbsQ.js.map +1 -0
  94. package/dist/components/button/button.d.ts +6 -0
  95. package/dist/components/button/button.d.ts.map +1 -0
  96. package/dist/components/button/index.d.ts +4 -0
  97. package/dist/components/button/index.d.ts.map +1 -0
  98. package/dist/components/button/spinner.d.ts +3 -0
  99. package/dist/components/button/spinner.d.ts.map +1 -0
  100. package/dist/components/button/use-button.d.ts +328 -0
  101. package/dist/components/button/use-button.d.ts.map +1 -0
  102. package/dist/components/calendar/date-picker/date-picker.d.ts +3 -0
  103. package/dist/components/calendar/date-picker/date-picker.d.ts.map +1 -0
  104. package/dist/components/calendar/date-picker/date-picker.style.d.ts +9 -0
  105. package/dist/components/calendar/date-picker/date-picker.style.d.ts.map +1 -0
  106. package/dist/components/calendar/date-picker/interface/date-picker.interface.d.ts +38 -0
  107. package/dist/components/calendar/date-picker/interface/date-picker.interface.d.ts.map +1 -0
  108. package/dist/components/calendar/icon/icon-calendar.d.ts +11 -0
  109. package/dist/components/calendar/icon/icon-calendar.d.ts.map +1 -0
  110. package/dist/components/calendar/index.d.ts +2 -0
  111. package/dist/components/calendar/index.d.ts.map +1 -0
  112. package/dist/components/calendar/interface/calendar-shared.interface.d.ts +4 -0
  113. package/dist/components/calendar/interface/calendar-shared.interface.d.ts.map +1 -0
  114. package/dist/components/checkbox/checkbox-icon.d.ts +9 -0
  115. package/dist/components/checkbox/checkbox-icon.d.ts.map +1 -0
  116. package/dist/components/checkbox/checkbox.d.ts +7 -0
  117. package/dist/components/checkbox/checkbox.d.ts.map +1 -0
  118. package/dist/components/checkbox/index.d.ts +5 -0
  119. package/dist/components/checkbox/index.d.ts.map +1 -0
  120. package/dist/components/checkbox/use-checkbox.d.ts +57 -0
  121. package/dist/components/checkbox/use-checkbox.d.ts.map +1 -0
  122. package/dist/components/chip/chip.d.ts +6 -0
  123. package/dist/components/chip/chip.d.ts.map +1 -0
  124. package/dist/components/chip/index.d.ts +4 -0
  125. package/dist/components/chip/index.d.ts.map +1 -0
  126. package/dist/components/chip/use-chip.d.ts +441 -0
  127. package/dist/components/chip/use-chip.d.ts.map +1 -0
  128. package/dist/components/divider/divider.d.ts +6 -0
  129. package/dist/components/divider/divider.d.ts.map +1 -0
  130. package/dist/components/divider/index.d.ts +4 -0
  131. package/dist/components/divider/index.d.ts.map +1 -0
  132. package/dist/components/divider/use-divider.d.ts +19 -0
  133. package/dist/components/divider/use-divider.d.ts.map +1 -0
  134. package/dist/components/divider/use-separator.d.ts +22 -0
  135. package/dist/components/divider/use-separator.d.ts.map +1 -0
  136. package/dist/components/icons/close-filled.d.ts +3 -0
  137. package/dist/components/icons/close-filled.d.ts.map +1 -0
  138. package/dist/components/index.d.ts +5 -0
  139. package/dist/components/index.d.ts.map +1 -0
  140. package/dist/components/pagination/function/index.d.ts +7 -0
  141. package/dist/components/pagination/function/index.d.ts.map +1 -0
  142. package/dist/components/pagination/hook/use-pagination.d.ts +3 -0
  143. package/dist/components/pagination/hook/use-pagination.d.ts.map +1 -0
  144. package/dist/components/pagination/index.d.ts +4 -0
  145. package/dist/components/pagination/index.d.ts.map +1 -0
  146. package/dist/components/pagination/interface/pagination-share.interface.d.ts +10 -0
  147. package/dist/components/pagination/interface/pagination-share.interface.d.ts.map +1 -0
  148. package/dist/components/pagination/interface/pagination.interface.d.ts +26 -0
  149. package/dist/components/pagination/interface/pagination.interface.d.ts.map +1 -0
  150. package/dist/components/pagination/pagination-item.d.ts +3 -0
  151. package/dist/components/pagination/pagination-item.d.ts.map +1 -0
  152. package/dist/components/pagination/pagination.d.ts +3 -0
  153. package/dist/components/pagination/pagination.d.ts.map +1 -0
  154. package/dist/components/ripple/ripple.d.ts +20 -0
  155. package/dist/components/ripple/ripple.d.ts.map +1 -0
  156. package/dist/components/ripple/use-ripple.d.ts +10 -0
  157. package/dist/components/ripple/use-ripple.d.ts.map +1 -0
  158. package/dist/components/select/autocomplete/autocomplete.d.ts +3 -0
  159. package/dist/components/select/autocomplete/autocomplete.d.ts.map +1 -0
  160. package/dist/components/select/index.d.ts +3 -0
  161. package/dist/components/select/index.d.ts.map +1 -0
  162. package/dist/components/select/select.d.ts +3 -0
  163. package/dist/components/select/select.d.ts.map +1 -0
  164. package/dist/components/select/style/select-theme.style.d.ts +4 -0
  165. package/dist/components/select/style/select-theme.style.d.ts.map +1 -0
  166. package/dist/components/select/sub-component/clear-indicator.d.ts +3 -0
  167. package/dist/components/select/sub-component/clear-indicator.d.ts.map +1 -0
  168. package/dist/components/select/sub-component/control-start.d.ts +3 -0
  169. package/dist/components/select/sub-component/control-start.d.ts.map +1 -0
  170. package/dist/components/select/sub-component/dropdown-indicator.d.ts +3 -0
  171. package/dist/components/select/sub-component/dropdown-indicator.d.ts.map +1 -0
  172. package/dist/components/select/sub-component/index.d.ts +9 -0
  173. package/dist/components/select/sub-component/index.d.ts.map +1 -0
  174. package/dist/components/select/sub-component/input-select.d.ts +3 -0
  175. package/dist/components/select/sub-component/input-select.d.ts.map +1 -0
  176. package/dist/components/select/sub-component/loading-indicator.d.ts +3 -0
  177. package/dist/components/select/sub-component/loading-indicator.d.ts.map +1 -0
  178. package/dist/components/select/sub-component/loading-message.d.ts +3 -0
  179. package/dist/components/select/sub-component/loading-message.d.ts.map +1 -0
  180. package/dist/components/select/sub-component/no-option-message.d.ts +3 -0
  181. package/dist/components/select/sub-component/no-option-message.d.ts.map +1 -0
  182. package/dist/components/select/sub-component/option-item.d.ts +3 -0
  183. package/dist/components/select/sub-component/option-item.d.ts.map +1 -0
  184. package/dist/components/select/sub-component/single-value.d.ts +3 -0
  185. package/dist/components/select/sub-component/single-value.d.ts.map +1 -0
  186. package/dist/components/table/body/table-body-column.d.ts +4 -0
  187. package/dist/components/table/body/table-body-column.d.ts.map +1 -0
  188. package/dist/components/table/body/table-body-row.d.ts +3 -0
  189. package/dist/components/table/body/table-body-row.d.ts.map +1 -0
  190. package/dist/components/table/body/table-body.d.ts +4 -0
  191. package/dist/components/table/body/table-body.d.ts.map +1 -0
  192. package/dist/components/table/context/table.context.d.ts +3 -0
  193. package/dist/components/table/context/table.context.d.ts.map +1 -0
  194. package/dist/components/table/header/table-header-column.d.ts +4 -0
  195. package/dist/components/table/header/table-header-column.d.ts.map +1 -0
  196. package/dist/components/table/header/table-header-row.d.ts +4 -0
  197. package/dist/components/table/header/table-header-row.d.ts.map +1 -0
  198. package/dist/components/table/header/table-header.d.ts +4 -0
  199. package/dist/components/table/header/table-header.d.ts.map +1 -0
  200. package/dist/components/table/hook/use-table-context.d.ts +2 -0
  201. package/dist/components/table/hook/use-table-context.d.ts.map +1 -0
  202. package/dist/components/table/hook/use-table.d.ts +10 -0
  203. package/dist/components/table/hook/use-table.d.ts.map +1 -0
  204. package/dist/components/table/index.d.ts +4 -0
  205. package/dist/components/table/index.d.ts.map +1 -0
  206. package/dist/components/table/interface/table-share.interface.d.ts +9 -0
  207. package/dist/components/table/interface/table-share.interface.d.ts.map +1 -0
  208. package/dist/components/table/interface/table.interface.d.ts +115 -0
  209. package/dist/components/table/interface/table.interface.d.ts.map +1 -0
  210. package/dist/components/table/search/table-search-column.d.ts +4 -0
  211. package/dist/components/table/search/table-search-column.d.ts.map +1 -0
  212. package/dist/components/table/search/table-search-row.d.ts +4 -0
  213. package/dist/components/table/search/table-search-row.d.ts.map +1 -0
  214. package/dist/components/table/table.d.ts +4 -0
  215. package/dist/components/table/table.d.ts.map +1 -0
  216. package/dist/components/tooltip/index.d.ts +2 -0
  217. package/dist/components/tooltip/index.d.ts.map +1 -0
  218. package/dist/components/tooltip/tooltip.d.ts +11 -0
  219. package/dist/components/tooltip/tooltip.d.ts.map +1 -0
  220. package/dist/components/ui/accordion.d.ts +8 -0
  221. package/dist/components/ui/accordion.d.ts.map +1 -0
  222. package/dist/components/ui/alert-dialog.d.ts +15 -0
  223. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  224. package/dist/components/ui/avatar.d.ts +13 -0
  225. package/dist/components/ui/avatar.d.ts.map +1 -0
  226. package/dist/components/ui/badge.d.ts +218 -0
  227. package/dist/components/ui/badge.d.ts.map +1 -0
  228. package/dist/components/ui/card.d.ts +10 -0
  229. package/dist/components/ui/card.d.ts.map +1 -0
  230. package/dist/components/ui/command.d.ts +19 -0
  231. package/dist/components/ui/command.d.ts.map +1 -0
  232. package/dist/components/ui/confirmation.d.ts +17 -0
  233. package/dist/components/ui/confirmation.d.ts.map +1 -0
  234. package/dist/components/ui/dialog.d.ts +16 -0
  235. package/dist/components/ui/dialog.d.ts.map +1 -0
  236. package/dist/components/ui/dropdown-menu.d.ts +26 -0
  237. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  238. package/dist/components/ui/index.d.ts +21 -0
  239. package/dist/components/ui/index.d.ts.map +1 -0
  240. package/dist/components/ui/input-otp.d.ts +12 -0
  241. package/dist/components/ui/input-otp.d.ts.map +1 -0
  242. package/dist/components/ui/input.d.ts +42 -0
  243. package/dist/components/ui/input.d.ts.map +1 -0
  244. package/dist/components/ui/label-error.d.ts +16 -0
  245. package/dist/components/ui/label-error.d.ts.map +1 -0
  246. package/dist/components/ui/label.d.ts +5 -0
  247. package/dist/components/ui/label.d.ts.map +1 -0
  248. package/dist/components/ui/menubar.d.ts +27 -0
  249. package/dist/components/ui/menubar.d.ts.map +1 -0
  250. package/dist/components/ui/modal.d.ts +16 -0
  251. package/dist/components/ui/modal.d.ts.map +1 -0
  252. package/dist/components/ui/navigation-menu.d.ts +15 -0
  253. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  254. package/dist/components/ui/popover.d.ts +8 -0
  255. package/dist/components/ui/popover.d.ts.map +1 -0
  256. package/dist/components/ui/resizable.d.ts +9 -0
  257. package/dist/components/ui/resizable.d.ts.map +1 -0
  258. package/dist/components/ui/skeleton.d.ts +3 -0
  259. package/dist/components/ui/skeleton.d.ts.map +1 -0
  260. package/dist/components/ui/switch.d.ts +13 -0
  261. package/dist/components/ui/switch.d.ts.map +1 -0
  262. package/dist/components/ui/tabs.d.ts +8 -0
  263. package/dist/components/ui/tabs.d.ts.map +1 -0
  264. package/dist/divider/index.cjs.js +2 -0
  265. package/dist/divider/index.cjs.js.map +1 -0
  266. package/dist/divider/index.es.js +67 -0
  267. package/dist/divider/index.es.js.map +1 -0
  268. package/dist/divider.d.ts +2 -0
  269. package/dist/functions/assertion.d.ts +14 -0
  270. package/dist/functions/assertion.d.ts.map +1 -0
  271. package/dist/functions/index.d.ts +5 -0
  272. package/dist/functions/index.d.ts.map +1 -0
  273. package/dist/functions/numbers.d.ts +20 -0
  274. package/dist/functions/numbers.d.ts.map +1 -0
  275. package/dist/functions/pattern.d.ts +3 -0
  276. package/dist/functions/pattern.d.ts.map +1 -0
  277. package/dist/functions/refs.d.ts +20 -0
  278. package/dist/functions/refs.d.ts.map +1 -0
  279. package/dist/hooks/use-confirmation.d.ts +21 -0
  280. package/dist/hooks/use-confirmation.d.ts.map +1 -0
  281. package/dist/hooks/use-modal.d.ts +15 -0
  282. package/dist/hooks/use-modal.d.ts.map +1 -0
  283. package/dist/index.cjs.js +2 -0
  284. package/dist/index.cjs.js.map +1 -0
  285. package/dist/index.d.ts +2 -0
  286. package/dist/index.es.js +386 -0
  287. package/dist/index.es.js.map +1 -0
  288. package/dist/lib/tv.d.ts +21 -0
  289. package/dist/lib/tv.d.ts.map +1 -0
  290. package/dist/lib/utils.d.ts +3 -0
  291. package/dist/lib/utils.d.ts.map +1 -0
  292. package/dist/lizaui.css +1 -0
  293. package/dist/pagination/index.cjs.js +2 -0
  294. package/dist/pagination/index.cjs.js.map +1 -0
  295. package/dist/pagination/index.es.js +170 -0
  296. package/dist/pagination/index.es.js.map +1 -0
  297. package/dist/pagination.d.ts +2 -0
  298. package/dist/select/index.cjs.js +2 -0
  299. package/dist/select/index.cjs.js.map +1 -0
  300. package/dist/select/index.es.js +226 -0
  301. package/dist/select/index.es.js.map +1 -0
  302. package/dist/select.d.ts +2 -0
  303. package/dist/table/index.cjs.js +2 -0
  304. package/dist/table/index.cjs.js.map +1 -0
  305. package/dist/table/index.es.js +233 -0
  306. package/dist/table/index.es.js.map +1 -0
  307. package/dist/table.d.ts +2 -0
  308. package/dist/theme/classes.d.ts +34 -0
  309. package/dist/theme/classes.d.ts.map +1 -0
  310. package/dist/theme/color/button.d.ts +162 -0
  311. package/dist/theme/color/button.d.ts.map +1 -0
  312. package/dist/theme/color/checkbox.d.ts +289 -0
  313. package/dist/theme/color/checkbox.d.ts.map +1 -0
  314. package/dist/theme/color/chip.d.ts +321 -0
  315. package/dist/theme/color/chip.d.ts.map +1 -0
  316. package/dist/theme/color/divider.d.ts +29 -0
  317. package/dist/theme/color/divider.d.ts.map +1 -0
  318. package/dist/theme/index.d.ts +3 -0
  319. package/dist/theme/index.d.ts.map +1 -0
  320. package/dist/theme/variants.d.ts +66 -0
  321. package/dist/theme/variants.d.ts.map +1 -0
  322. package/dist/tooltip/index.cjs.js +2 -0
  323. package/dist/tooltip/index.cjs.js.map +1 -0
  324. package/dist/tooltip/index.es.js +5 -0
  325. package/dist/tooltip/index.es.js.map +1 -0
  326. package/dist/tooltip.d.ts +2 -0
  327. package/dist/types/checkbox.type.d.ts +89 -0
  328. package/dist/types/checkbox.type.d.ts.map +1 -0
  329. package/dist/types/global.d.ts +5 -0
  330. package/dist/types/global.d.ts.map +1 -0
  331. package/dist/types/icon.type.d.ts +3 -0
  332. package/dist/types/icon.type.d.ts.map +1 -0
  333. package/dist/types/index.d.ts +8 -0
  334. package/dist/types/index.d.ts.map +1 -0
  335. package/dist/types/select/select-main.type.d.ts +139 -0
  336. package/dist/types/select/select-main.type.d.ts.map +1 -0
  337. package/dist/types/select/select.type.d.ts +8 -0
  338. package/dist/types/select/select.type.d.ts.map +1 -0
  339. package/dist/types/switch.type.d.ts +78 -0
  340. package/dist/types/switch.type.d.ts.map +1 -0
  341. package/dist/types/theme.d.ts +8 -0
  342. package/dist/types/theme.d.ts.map +1 -0
  343. package/dist/ui/index.cjs.js +71 -0
  344. package/dist/ui/index.cjs.js.map +1 -0
  345. package/dist/ui/index.es.js +8189 -0
  346. package/dist/ui/index.es.js.map +1 -0
  347. package/dist/ui.d.ts +2 -0
  348. package/package.json +135 -0
@@ -0,0 +1,3971 @@
1
+ import { j as P } from "./jsx-runtime-BYq8_R6m.js";
2
+ import * as gt from "react";
3
+ import { useState as Ce, useCallback as se, useId as Ee, useMemo as W, cloneElement as Ws, isValidElement as An, createContext as ie, useRef as j, useLayoutEffect as Gs, useEffect as ke, useContext as E, useInsertionEffect as Mn, Children as zs, forwardRef as Cn, Fragment as Pn, createElement as _s } from "react";
4
+ import { u as Us, d as zt } from "./refs-DcCOPvdv.js";
5
+ import { t as Hs } from "./tv-ButAo3dF.js";
6
+ import { d as Ys, c as Q } from "./classes-7MXTIFwM.js";
7
+ import { c as V } from "./variants-DhZQjbsQ.js";
8
+ import { c as Xs } from "./clsx-OuTLNxxd.js";
9
+ import { S as qs } from "./index-C_b6-TON.js";
10
+ function Zs(e, t, n) {
11
+ return Math.min(Math.max(e, t), n);
12
+ }
13
+ function Js(e) {
14
+ return `${e}-${Math.floor(Math.random() * 1e6)}`;
15
+ }
16
+ const Qs = Hs({
17
+ base: [
18
+ "z-0",
19
+ "cursor-pointer",
20
+ "group",
21
+ "relative",
22
+ "inline-flex",
23
+ "items-center",
24
+ "justify-center",
25
+ "box-border",
26
+ "appearance-none",
27
+ "outline-none",
28
+ "select-none",
29
+ "whitespace-nowrap",
30
+ "min-w-max",
31
+ "font-normal",
32
+ "subpixel-antialiased",
33
+ "overflow-hidden",
34
+ "tap-highlight-transparent",
35
+ "transform-gpu data-[pressed=true]:scale-[0.97]",
36
+ // focus ring
37
+ ...Ys
38
+ ],
39
+ variants: {
40
+ variant: {
41
+ solid: "",
42
+ bordered: "border-[2px] bg-transparent",
43
+ light: "bg-transparent",
44
+ flat: "",
45
+ faded: "border-[2px]",
46
+ shadow: "",
47
+ ghost: "border-[2px] bg-transparent"
48
+ },
49
+ size: {
50
+ sm: "px-3 min-w-16 h-8 text-tiny gap-2 rounded-sm",
51
+ md: "px-4 min-w-20 h-10 text-sm gap-2 rounded-md",
52
+ lg: "px-6 min-w-24 h-12 text-md gap-3 rounded-lg"
53
+ },
54
+ color: {
55
+ default: "",
56
+ primary: "",
57
+ secondary: "",
58
+ success: "",
59
+ warning: "",
60
+ danger: ""
61
+ },
62
+ radius: {
63
+ none: "rounded-none",
64
+ sm: "rounded-sm",
65
+ md: "rounded-md",
66
+ lg: "rounded-lg",
67
+ full: "rounded-full"
68
+ },
69
+ fullWidth: {
70
+ true: "w-full"
71
+ },
72
+ isDisabled: {
73
+ true: "opacity-80 pointer-events-none"
74
+ },
75
+ isInGroup: {
76
+ true: "[&:not(:first-child):not(:last-child)]:rounded-none"
77
+ },
78
+ isIconOnly: {
79
+ true: "px-0 !gap-0",
80
+ false: "[&>svg]:max-w-[theme(spacing.8)]"
81
+ },
82
+ disableAnimation: {
83
+ true: "!transition-none data-[pressed=true]:scale-100",
84
+ false: "transition-transform-colors-opacity motion-reduce:transition-none"
85
+ }
86
+ },
87
+ defaultVariants: {
88
+ size: "md",
89
+ variant: "solid",
90
+ color: "default",
91
+ fullWidth: !1,
92
+ isDisabled: !1,
93
+ isInGroup: !1
94
+ },
95
+ compoundVariants: [
96
+ // solid / color
97
+ {
98
+ variant: "solid",
99
+ color: "default",
100
+ class: V.solid.default
101
+ },
102
+ {
103
+ variant: "solid",
104
+ color: "primary",
105
+ class: V.solid.primary
106
+ },
107
+ {
108
+ variant: "solid",
109
+ color: "secondary",
110
+ class: V.solid.secondary
111
+ },
112
+ {
113
+ variant: "solid",
114
+ color: "success",
115
+ class: V.solid.success
116
+ },
117
+ {
118
+ variant: "solid",
119
+ color: "warning",
120
+ class: V.solid.warning
121
+ },
122
+ {
123
+ variant: "solid",
124
+ color: "danger",
125
+ class: V.solid.danger
126
+ },
127
+ // shadow / color
128
+ {
129
+ variant: "shadow",
130
+ color: "default",
131
+ class: V.shadow.default
132
+ },
133
+ {
134
+ variant: "shadow",
135
+ color: "primary",
136
+ class: V.shadow.primary
137
+ },
138
+ {
139
+ variant: "shadow",
140
+ color: "secondary",
141
+ class: V.shadow.secondary
142
+ },
143
+ {
144
+ variant: "shadow",
145
+ color: "success",
146
+ class: V.shadow.success
147
+ },
148
+ {
149
+ variant: "shadow",
150
+ color: "warning",
151
+ class: V.shadow.warning
152
+ },
153
+ {
154
+ variant: "shadow",
155
+ color: "danger",
156
+ class: V.shadow.danger
157
+ },
158
+ // bordered / color
159
+ {
160
+ variant: "bordered",
161
+ color: "default",
162
+ class: V.bordered.default
163
+ },
164
+ {
165
+ variant: "bordered",
166
+ color: "primary",
167
+ class: V.bordered.primary
168
+ },
169
+ {
170
+ variant: "bordered",
171
+ color: "secondary",
172
+ class: V.bordered.secondary
173
+ },
174
+ {
175
+ variant: "bordered",
176
+ color: "success",
177
+ class: V.bordered.success
178
+ },
179
+ {
180
+ variant: "bordered",
181
+ color: "warning",
182
+ class: V.bordered.warning
183
+ },
184
+ {
185
+ variant: "bordered",
186
+ color: "danger",
187
+ class: V.bordered.danger
188
+ },
189
+ // flat / color
190
+ {
191
+ variant: "flat",
192
+ color: "default",
193
+ class: V.flat.default
194
+ },
195
+ {
196
+ variant: "flat",
197
+ color: "primary",
198
+ class: V.flat.primary
199
+ },
200
+ {
201
+ variant: "flat",
202
+ color: "secondary",
203
+ class: V.flat.secondary
204
+ },
205
+ {
206
+ variant: "flat",
207
+ color: "success",
208
+ class: V.flat.success
209
+ },
210
+ {
211
+ variant: "flat",
212
+ color: "warning",
213
+ class: V.flat.warning
214
+ },
215
+ {
216
+ variant: "flat",
217
+ color: "danger",
218
+ class: V.flat.danger
219
+ },
220
+ // faded / color
221
+ {
222
+ variant: "faded",
223
+ color: "default",
224
+ class: V.faded.default
225
+ },
226
+ {
227
+ variant: "faded",
228
+ color: "primary",
229
+ class: V.faded.primary
230
+ },
231
+ {
232
+ variant: "faded",
233
+ color: "secondary",
234
+ class: V.faded.secondary
235
+ },
236
+ {
237
+ variant: "faded",
238
+ color: "success",
239
+ class: V.faded.success
240
+ },
241
+ {
242
+ variant: "faded",
243
+ color: "warning",
244
+ class: V.faded.warning
245
+ },
246
+ {
247
+ variant: "faded",
248
+ color: "danger",
249
+ class: V.faded.danger
250
+ },
251
+ // light / color
252
+ {
253
+ variant: "light",
254
+ color: "default",
255
+ class: [V.light.default, "data-[hover=true]:bg-default/40"]
256
+ },
257
+ {
258
+ variant: "light",
259
+ color: "primary",
260
+ class: [V.light.primary, "data-[hover=true]:bg-primary/20"]
261
+ },
262
+ {
263
+ variant: "light",
264
+ color: "secondary",
265
+ class: [V.light.secondary, "data-[hover=true]:bg-secondary/20"]
266
+ },
267
+ {
268
+ variant: "light",
269
+ color: "success",
270
+ class: [V.light.success, "data-[hover=true]:bg-success/20"]
271
+ },
272
+ {
273
+ variant: "light",
274
+ color: "warning",
275
+ class: [V.light.warning, "data-[hover=true]:bg-warning/20"]
276
+ },
277
+ {
278
+ variant: "light",
279
+ color: "danger",
280
+ class: [V.light.danger, "data-[hover=true]:bg-danger/20"]
281
+ },
282
+ // ghost / color
283
+ {
284
+ variant: "ghost",
285
+ color: "default",
286
+ class: [V.ghost.default, "data-[hover=true]:!bg-default"]
287
+ },
288
+ {
289
+ variant: "ghost",
290
+ color: "primary",
291
+ class: [V.ghost.primary, "data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]
292
+ },
293
+ {
294
+ variant: "ghost",
295
+ color: "secondary",
296
+ class: [V.ghost.secondary, "data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]
297
+ },
298
+ {
299
+ variant: "ghost",
300
+ color: "success",
301
+ class: [V.ghost.success, "data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]
302
+ },
303
+ {
304
+ variant: "ghost",
305
+ color: "warning",
306
+ class: [V.ghost.warning, "data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]
307
+ },
308
+ {
309
+ variant: "ghost",
310
+ color: "danger",
311
+ class: [V.ghost.danger, "data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]
312
+ },
313
+ // isInGroup / radius / size <-- radius not provided
314
+ {
315
+ isInGroup: !0,
316
+ class: "rounded-none first:rounded-s-medium last:rounded-e-medium"
317
+ },
318
+ {
319
+ isInGroup: !0,
320
+ size: "sm",
321
+ class: "rounded-none first:rounded-s-small last:rounded-e-small"
322
+ },
323
+ {
324
+ isInGroup: !0,
325
+ size: "md",
326
+ class: "rounded-none first:rounded-s-medium last:rounded-e-medium"
327
+ },
328
+ {
329
+ isInGroup: !0,
330
+ size: "lg",
331
+ class: "rounded-none first:rounded-s-large last:rounded-e-large"
332
+ },
333
+ {
334
+ isInGroup: !0,
335
+ isRounded: !0,
336
+ class: "rounded-none first:rounded-s-full last:rounded-e-full"
337
+ },
338
+ // isInGroup / radius <-- radius provided
339
+ {
340
+ isInGroup: !0,
341
+ radius: "none",
342
+ class: "rounded-none first:rounded-s-none last:rounded-e-none"
343
+ },
344
+ {
345
+ isInGroup: !0,
346
+ radius: "sm",
347
+ class: "rounded-none first:rounded-s-small last:rounded-e-small"
348
+ },
349
+ {
350
+ isInGroup: !0,
351
+ radius: "md",
352
+ class: "rounded-none first:rounded-s-medium last:rounded-e-medium"
353
+ },
354
+ {
355
+ isInGroup: !0,
356
+ radius: "lg",
357
+ class: "rounded-none first:rounded-s-large last:rounded-e-large"
358
+ },
359
+ {
360
+ isInGroup: !0,
361
+ radius: "full",
362
+ class: "rounded-none first:rounded-s-full last:rounded-e-full"
363
+ },
364
+ // isInGroup / bordered / ghost
365
+ {
366
+ isInGroup: !0,
367
+ variant: ["ghost", "bordered"],
368
+ color: "default",
369
+ className: Q.default
370
+ },
371
+ {
372
+ isInGroup: !0,
373
+ variant: ["ghost", "bordered"],
374
+ color: "primary",
375
+ className: Q.primary
376
+ },
377
+ {
378
+ isInGroup: !0,
379
+ variant: ["ghost", "bordered"],
380
+ color: "secondary",
381
+ className: Q.secondary
382
+ },
383
+ {
384
+ isInGroup: !0,
385
+ variant: ["ghost", "bordered"],
386
+ color: "success",
387
+ className: Q.success
388
+ },
389
+ {
390
+ isInGroup: !0,
391
+ variant: ["ghost", "bordered"],
392
+ color: "warning",
393
+ className: Q.warning
394
+ },
395
+ {
396
+ isInGroup: !0,
397
+ variant: ["ghost", "bordered"],
398
+ color: "danger",
399
+ className: Q.danger
400
+ },
401
+ {
402
+ isIconOnly: !0,
403
+ size: "sm",
404
+ class: "min-w-8 w-8 h-8"
405
+ },
406
+ {
407
+ isIconOnly: !0,
408
+ size: "md",
409
+ class: "min-w-10 w-10 h-10"
410
+ },
411
+ {
412
+ isIconOnly: !0,
413
+ size: "lg",
414
+ class: "min-w-12 w-12 h-12"
415
+ },
416
+ // variant / hover
417
+ {
418
+ variant: ["solid", "faded", "flat", "bordered", "shadow"],
419
+ class: "hover:opacity-80"
420
+ }
421
+ ]
422
+ });
423
+ function er(e = {}) {
424
+ const [t, n] = Ce([]), s = se((i) => {
425
+ const o = i.target, a = Math.max(o.clientWidth, o.clientHeight);
426
+ n((c) => [
427
+ ...c,
428
+ {
429
+ key: Js(c.length.toString()),
430
+ size: a,
431
+ x: i.x - a / 2,
432
+ y: i.y - a / 2
433
+ }
434
+ ]);
435
+ }, []), r = se((i) => {
436
+ n((o) => o.filter((a) => a.key !== i));
437
+ }, []);
438
+ return { ripples: t, onClear: r, onPress: s, ...e };
439
+ }
440
+ function tr(e) {
441
+ const {
442
+ id: t,
443
+ classNames: n,
444
+ className: s,
445
+ asChild: r,
446
+ children: i,
447
+ isLoading: o = !1,
448
+ disabled: a = !1,
449
+ isIconOnly: c = !1,
450
+ onClick: u,
451
+ startContent: l,
452
+ endContent: d,
453
+ spinner: f = null,
454
+ spinnerPlacement: h = "start",
455
+ type: m = "button",
456
+ ...v
457
+ } = e, x = Us(e.ref), p = Ee(), S = t || p, { onPress: y, onClear: A, ripples: g } = er(), w = W(
458
+ () => Qs({
459
+ size: e.size,
460
+ color: e.color,
461
+ variant: e.variant,
462
+ radius: e.radius,
463
+ fullWidth: e.fullWidth,
464
+ isDisabled: a || o,
465
+ disableAnimation: e.disableAnimation,
466
+ isIconOnly: c,
467
+ isInGroup: e.isInGroup,
468
+ className: s
469
+ }),
470
+ [e, s, a, o, c]
471
+ ), M = se(
472
+ (N) => {
473
+ if (a) {
474
+ N.preventDefault();
475
+ return;
476
+ }
477
+ u == null || u(N);
478
+ },
479
+ [u, a]
480
+ ), T = (N) => An(N) ? Ws(N, {
481
+ // "aria-hidden": true,
482
+ // "focusable": false,
483
+ }) : null, F = T(l), D = T(d), z = (N) => {
484
+ const ze = N.currentTarget.getBoundingClientRect(), I = {
485
+ target: N.currentTarget,
486
+ x: N.clientX - ze.left,
487
+ y: N.clientY - ze.top
488
+ };
489
+ y(I);
490
+ }, Te = () => ({
491
+ className: Xs(w, n == null ? void 0 : n.base),
492
+ "data-disabled": zt(a),
493
+ "data-loading": zt(o),
494
+ onClick: M,
495
+ onPointerDown: z,
496
+ "data-slot": "button",
497
+ "aria-disabled": a,
498
+ id: S,
499
+ type: m,
500
+ ...v
501
+ }), We = se(() => ({ ripples: g, onClear: A }), [g, A]);
502
+ return {
503
+ domRef: x,
504
+ isIconOnly: c,
505
+ Component: r ? qs : "button",
506
+ children: i,
507
+ isLoading: o,
508
+ spinner: f,
509
+ spinnerPlacement: h,
510
+ startContent: F,
511
+ endContent: D,
512
+ getButtonProps: Te,
513
+ getRippleProps: We
514
+ };
515
+ }
516
+ const Fn = ie({});
517
+ function yt(e) {
518
+ const t = j(null);
519
+ return t.current === null && (t.current = e()), t.current;
520
+ }
521
+ const bt = typeof window < "u", In = bt ? Gs : ke, Ne = /* @__PURE__ */ ie(null);
522
+ function nr(e, t) {
523
+ e.indexOf(t) === -1 && e.push(t);
524
+ }
525
+ function sr(e, t) {
526
+ const n = e.indexOf(t);
527
+ n > -1 && e.splice(n, 1);
528
+ }
529
+ const Z = (e, t, n) => n > t ? t : n < e ? e : n;
530
+ let be = () => {
531
+ }, J = () => {
532
+ };
533
+ process.env.NODE_ENV !== "production" && (be = (e, t) => {
534
+ }, J = (e, t) => {
535
+ if (!e)
536
+ throw new Error(t);
537
+ });
538
+ const G = {}, Dn = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
539
+ function rr(e) {
540
+ return typeof e == "object" && e !== null;
541
+ }
542
+ const Rn = (e) => /^0[^.\s]+$/u.test(e);
543
+ // @__NO_SIDE_EFFECTS__
544
+ function vt(e) {
545
+ let t;
546
+ return () => (t === void 0 && (t = e()), t);
547
+ }
548
+ const oe = /* @__NO_SIDE_EFFECTS__ */ (e) => e, ir = (e, t) => (n) => t(e(n)), Le = (...e) => e.reduce(ir), On = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
549
+ const s = t - e;
550
+ return s === 0 ? 1 : (n - e) / s;
551
+ };
552
+ class En {
553
+ constructor() {
554
+ this.subscriptions = [];
555
+ }
556
+ add(t) {
557
+ return nr(this.subscriptions, t), () => sr(this.subscriptions, t);
558
+ }
559
+ notify(t, n, s) {
560
+ const r = this.subscriptions.length;
561
+ if (r)
562
+ if (r === 1)
563
+ this.subscriptions[0](t, n, s);
564
+ else
565
+ for (let i = 0; i < r; i++) {
566
+ const o = this.subscriptions[i];
567
+ o && o(t, n, s);
568
+ }
569
+ }
570
+ getSize() {
571
+ return this.subscriptions.length;
572
+ }
573
+ clear() {
574
+ this.subscriptions.length = 0;
575
+ }
576
+ }
577
+ const B = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, $ = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
578
+ function kn(e, t) {
579
+ return t ? e * (1e3 / t) : 0;
580
+ }
581
+ const _t = /* @__PURE__ */ new Set();
582
+ function wt(e, t, n) {
583
+ e || _t.has(t) || _t.add(t);
584
+ }
585
+ const Nn = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, or = 1e-7, ar = 12;
586
+ function lr(e, t, n, s, r) {
587
+ let i, o, a = 0;
588
+ do
589
+ o = t + (n - t) / 2, i = Nn(o, s, r) - e, i > 0 ? n = o : t = o;
590
+ while (Math.abs(i) > or && ++a < ar);
591
+ return o;
592
+ }
593
+ function ve(e, t, n, s) {
594
+ if (e === t && n === s)
595
+ return oe;
596
+ const r = (i) => lr(i, 0, 1, e, n);
597
+ return (i) => i === 0 || i === 1 ? i : Nn(r(i), t, s);
598
+ }
599
+ const Ln = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Bn = (e) => (t) => 1 - e(1 - t), Kn = /* @__PURE__ */ ve(0.33, 1.53, 0.69, 0.99), Tt = /* @__PURE__ */ Bn(Kn), jn = /* @__PURE__ */ Ln(Tt), $n = (e) => (e *= 2) < 1 ? 0.5 * Tt(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), xt = (e) => 1 - Math.sin(Math.acos(e)), cr = Bn(xt), Wn = Ln(xt), ur = /* @__PURE__ */ ve(0.42, 0, 1, 1), dr = /* @__PURE__ */ ve(0, 0, 0.58, 1), Gn = /* @__PURE__ */ ve(0.42, 0, 0.58, 1), fr = (e) => Array.isArray(e) && typeof e[0] != "number", zn = (e) => Array.isArray(e) && typeof e[0] == "number", Ut = {
600
+ linear: oe,
601
+ easeIn: ur,
602
+ easeInOut: Gn,
603
+ easeOut: dr,
604
+ circIn: xt,
605
+ circInOut: Wn,
606
+ circOut: cr,
607
+ backIn: Tt,
608
+ backInOut: jn,
609
+ backOut: Kn,
610
+ anticipate: $n
611
+ }, hr = (e) => typeof e == "string", Ht = (e) => {
612
+ if (zn(e)) {
613
+ J(e.length === 4, "Cubic bezier arrays must contain four numerical values.");
614
+ const [t, n, s, r] = e;
615
+ return ve(t, n, s, r);
616
+ } else if (hr(e))
617
+ return J(Ut[e] !== void 0, `Invalid easing type '${e}'`), Ut[e];
618
+ return e;
619
+ }, xe = [
620
+ "setup",
621
+ // Compute
622
+ "read",
623
+ // Read
624
+ "resolveKeyframes",
625
+ // Write/Read/Write/Read
626
+ "preUpdate",
627
+ // Compute
628
+ "update",
629
+ // Compute
630
+ "preRender",
631
+ // Compute
632
+ "render",
633
+ // Write
634
+ "postRender"
635
+ // Compute
636
+ ];
637
+ function pr(e, t) {
638
+ let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), r = !1, i = !1;
639
+ const o = /* @__PURE__ */ new WeakSet();
640
+ let a = {
641
+ delta: 0,
642
+ timestamp: 0,
643
+ isProcessing: !1
644
+ };
645
+ function c(l) {
646
+ o.has(l) && (u.schedule(l), e()), l(a);
647
+ }
648
+ const u = {
649
+ /**
650
+ * Schedule a process to run on the next frame.
651
+ */
652
+ schedule: (l, d = !1, f = !1) => {
653
+ const m = f && r ? n : s;
654
+ return d && o.add(l), m.has(l) || m.add(l), l;
655
+ },
656
+ /**
657
+ * Cancel the provided callback from running on the next frame.
658
+ */
659
+ cancel: (l) => {
660
+ s.delete(l), o.delete(l);
661
+ },
662
+ /**
663
+ * Execute all schedule callbacks.
664
+ */
665
+ process: (l) => {
666
+ if (a = l, r) {
667
+ i = !0;
668
+ return;
669
+ }
670
+ r = !0, [n, s] = [s, n], n.forEach(c), n.clear(), r = !1, i && (i = !1, u.process(l));
671
+ }
672
+ };
673
+ return u;
674
+ }
675
+ const mr = 40;
676
+ function _n(e, t) {
677
+ let n = !1, s = !0;
678
+ const r = {
679
+ delta: 0,
680
+ timestamp: 0,
681
+ isProcessing: !1
682
+ }, i = () => n = !0, o = xe.reduce((y, A) => (y[A] = pr(i), y), {}), { setup: a, read: c, resolveKeyframes: u, preUpdate: l, update: d, preRender: f, render: h, postRender: m } = o, v = () => {
683
+ const y = G.useManualTiming ? r.timestamp : performance.now();
684
+ n = !1, G.useManualTiming || (r.delta = s ? 1e3 / 60 : Math.max(Math.min(y - r.timestamp, mr), 1)), r.timestamp = y, r.isProcessing = !0, a.process(r), c.process(r), u.process(r), l.process(r), d.process(r), f.process(r), h.process(r), m.process(r), r.isProcessing = !1, n && t && (s = !1, e(v));
685
+ }, x = () => {
686
+ n = !0, s = !0, r.isProcessing || e(v);
687
+ };
688
+ return { schedule: xe.reduce((y, A) => {
689
+ const g = o[A];
690
+ return y[A] = (w, M = !1, T = !1) => (n || x(), g.schedule(w, M, T)), y;
691
+ }, {}), cancel: (y) => {
692
+ for (let A = 0; A < xe.length; A++)
693
+ o[xe[A]].cancel(y);
694
+ }, state: r, steps: o };
695
+ }
696
+ const { schedule: L, cancel: Qe, state: Pe } = /* @__PURE__ */ _n(typeof requestAnimationFrame < "u" ? requestAnimationFrame : oe, !0);
697
+ let Ae;
698
+ function gr() {
699
+ Ae = void 0;
700
+ }
701
+ const k = {
702
+ now: () => (Ae === void 0 && k.set(Pe.isProcessing || G.useManualTiming ? Pe.timestamp : performance.now()), Ae),
703
+ set: (e) => {
704
+ Ae = e, queueMicrotask(gr);
705
+ }
706
+ }, Un = (e) => (t) => typeof t == "string" && t.startsWith(e), Hn = /* @__PURE__ */ Un("--"), yr = /* @__PURE__ */ Un("var(--"), Vt = (e) => yr(e) ? br.test(e.split("/*")[0].trim()) : !1, br = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, ae = {
707
+ test: (e) => typeof e == "number",
708
+ parse: parseFloat,
709
+ transform: (e) => e
710
+ }, pe = {
711
+ ...ae,
712
+ transform: (e) => Z(0, 1, e)
713
+ }, Ve = {
714
+ ...ae,
715
+ default: 1
716
+ }, he = (e) => Math.round(e * 1e5) / 1e5, St = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
717
+ function vr(e) {
718
+ return e == null;
719
+ }
720
+ const wr = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, At = (e, t) => (n) => !!(typeof n == "string" && wr.test(n) && n.startsWith(e) || t && !vr(n) && Object.prototype.hasOwnProperty.call(n, t)), Yn = (e, t, n) => (s) => {
721
+ if (typeof s != "string")
722
+ return s;
723
+ const [r, i, o, a] = s.match(St);
724
+ return {
725
+ [e]: parseFloat(r),
726
+ [t]: parseFloat(i),
727
+ [n]: parseFloat(o),
728
+ alpha: a !== void 0 ? parseFloat(a) : 1
729
+ };
730
+ }, Tr = (e) => Z(0, 255, e), He = {
731
+ ...ae,
732
+ transform: (e) => Math.round(Tr(e))
733
+ }, H = {
734
+ test: /* @__PURE__ */ At("rgb", "red"),
735
+ parse: /* @__PURE__ */ Yn("red", "green", "blue"),
736
+ transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + He.transform(e) + ", " + He.transform(t) + ", " + He.transform(n) + ", " + he(pe.transform(s)) + ")"
737
+ };
738
+ function xr(e) {
739
+ let t = "", n = "", s = "", r = "";
740
+ return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), r = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), r = e.substring(4, 5), t += t, n += n, s += s, r += r), {
741
+ red: parseInt(t, 16),
742
+ green: parseInt(n, 16),
743
+ blue: parseInt(s, 16),
744
+ alpha: r ? parseInt(r, 16) / 255 : 1
745
+ };
746
+ }
747
+ const et = {
748
+ test: /* @__PURE__ */ At("#"),
749
+ parse: xr,
750
+ transform: H.transform
751
+ }, we = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
752
+ test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
753
+ parse: parseFloat,
754
+ transform: (t) => `${t}${e}`
755
+ }), _ = /* @__PURE__ */ we("deg"), ne = /* @__PURE__ */ we("%"), b = /* @__PURE__ */ we("px"), Vr = /* @__PURE__ */ we("vh"), Sr = /* @__PURE__ */ we("vw"), Yt = {
756
+ ...ne,
757
+ parse: (e) => ne.parse(e) / 100,
758
+ transform: (e) => ne.transform(e * 100)
759
+ }, ee = {
760
+ test: /* @__PURE__ */ At("hsl", "hue"),
761
+ parse: /* @__PURE__ */ Yn("hue", "saturation", "lightness"),
762
+ transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + ne.transform(he(t)) + ", " + ne.transform(he(n)) + ", " + he(pe.transform(s)) + ")"
763
+ }, R = {
764
+ test: (e) => H.test(e) || et.test(e) || ee.test(e),
765
+ parse: (e) => H.test(e) ? H.parse(e) : ee.test(e) ? ee.parse(e) : et.parse(e),
766
+ transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? H.transform(e) : ee.transform(e)
767
+ }, Ar = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
768
+ function Mr(e) {
769
+ var t, n;
770
+ return isNaN(e) && typeof e == "string" && (((t = e.match(St)) == null ? void 0 : t.length) || 0) + (((n = e.match(Ar)) == null ? void 0 : n.length) || 0) > 0;
771
+ }
772
+ const Xn = "number", qn = "color", Cr = "var", Pr = "var(", Xt = "${}", Fr = /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;
773
+ function me(e) {
774
+ const t = e.toString(), n = [], s = {
775
+ color: [],
776
+ number: [],
777
+ var: []
778
+ }, r = [];
779
+ let i = 0;
780
+ const a = t.replace(Fr, (c) => (R.test(c) ? (s.color.push(i), r.push(qn), n.push(R.parse(c))) : c.startsWith(Pr) ? (s.var.push(i), r.push(Cr), n.push(c)) : (s.number.push(i), r.push(Xn), n.push(parseFloat(c))), ++i, Xt)).split(Xt);
781
+ return { values: n, split: a, indexes: s, types: r };
782
+ }
783
+ function Zn(e) {
784
+ return me(e).values;
785
+ }
786
+ function Jn(e) {
787
+ const { split: t, types: n } = me(e), s = t.length;
788
+ return (r) => {
789
+ let i = "";
790
+ for (let o = 0; o < s; o++)
791
+ if (i += t[o], r[o] !== void 0) {
792
+ const a = n[o];
793
+ a === Xn ? i += he(r[o]) : a === qn ? i += R.transform(r[o]) : i += r[o];
794
+ }
795
+ return i;
796
+ };
797
+ }
798
+ const Ir = (e) => typeof e == "number" ? 0 : e;
799
+ function Dr(e) {
800
+ const t = Zn(e);
801
+ return Jn(e)(t.map(Ir));
802
+ }
803
+ const le = {
804
+ test: Mr,
805
+ parse: Zn,
806
+ createTransformer: Jn,
807
+ getAnimatableNone: Dr
808
+ };
809
+ function Ye(e, t, n) {
810
+ return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
811
+ }
812
+ function Rr({ hue: e, saturation: t, lightness: n, alpha: s }) {
813
+ e /= 360, t /= 100, n /= 100;
814
+ let r = 0, i = 0, o = 0;
815
+ if (!t)
816
+ r = i = o = n;
817
+ else {
818
+ const a = n < 0.5 ? n * (1 + t) : n + t - n * t, c = 2 * n - a;
819
+ r = Ye(c, a, e + 1 / 3), i = Ye(c, a, e), o = Ye(c, a, e - 1 / 3);
820
+ }
821
+ return {
822
+ red: Math.round(r * 255),
823
+ green: Math.round(i * 255),
824
+ blue: Math.round(o * 255),
825
+ alpha: s
826
+ };
827
+ }
828
+ function Fe(e, t) {
829
+ return (n) => n > 0 ? t : e;
830
+ }
831
+ const Be = (e, t, n) => e + (t - e) * n, Xe = (e, t, n) => {
832
+ const s = e * e, r = n * (t * t - s) + s;
833
+ return r < 0 ? 0 : Math.sqrt(r);
834
+ }, Or = [et, H, ee], Er = (e) => Or.find((t) => t.test(e));
835
+ function qt(e) {
836
+ const t = Er(e);
837
+ if (be(!!t, `'${e}' is not an animatable color. Use the equivalent color code instead.`), !t)
838
+ return !1;
839
+ let n = t.parse(e);
840
+ return t === ee && (n = Rr(n)), n;
841
+ }
842
+ const Zt = (e, t) => {
843
+ const n = qt(e), s = qt(t);
844
+ if (!n || !s)
845
+ return Fe(e, t);
846
+ const r = { ...n };
847
+ return (i) => (r.red = Xe(n.red, s.red, i), r.green = Xe(n.green, s.green, i), r.blue = Xe(n.blue, s.blue, i), r.alpha = Be(n.alpha, s.alpha, i), H.transform(r));
848
+ }, tt = /* @__PURE__ */ new Set(["none", "hidden"]);
849
+ function kr(e, t) {
850
+ return tt.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
851
+ }
852
+ function Nr(e, t) {
853
+ return (n) => Be(e, t, n);
854
+ }
855
+ function Mt(e) {
856
+ return typeof e == "number" ? Nr : typeof e == "string" ? Vt(e) ? Fe : R.test(e) ? Zt : Kr : Array.isArray(e) ? Qn : typeof e == "object" ? R.test(e) ? Zt : Lr : Fe;
857
+ }
858
+ function Qn(e, t) {
859
+ const n = [...e], s = n.length, r = e.map((i, o) => Mt(i)(i, t[o]));
860
+ return (i) => {
861
+ for (let o = 0; o < s; o++)
862
+ n[o] = r[o](i);
863
+ return n;
864
+ };
865
+ }
866
+ function Lr(e, t) {
867
+ const n = { ...e, ...t }, s = {};
868
+ for (const r in n)
869
+ e[r] !== void 0 && t[r] !== void 0 && (s[r] = Mt(e[r])(e[r], t[r]));
870
+ return (r) => {
871
+ for (const i in s)
872
+ n[i] = s[i](r);
873
+ return n;
874
+ };
875
+ }
876
+ function Br(e, t) {
877
+ const n = [], s = { color: 0, var: 0, number: 0 };
878
+ for (let r = 0; r < t.values.length; r++) {
879
+ const i = t.types[r], o = e.indexes[i][s[i]], a = e.values[o] ?? 0;
880
+ n[r] = a, s[i]++;
881
+ }
882
+ return n;
883
+ }
884
+ const Kr = (e, t) => {
885
+ const n = le.createTransformer(t), s = me(e), r = me(t);
886
+ return s.indexes.var.length === r.indexes.var.length && s.indexes.color.length === r.indexes.color.length && s.indexes.number.length >= r.indexes.number.length ? tt.has(e) && !r.values.length || tt.has(t) && !s.values.length ? kr(e, t) : Le(Qn(Br(s, r), r.values), n) : (be(!0, `Complex values '${e}' and '${t}' 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.`), Fe(e, t));
887
+ };
888
+ function es(e, t, n) {
889
+ return typeof e == "number" && typeof t == "number" && typeof n == "number" ? Be(e, t, n) : Mt(e)(e, t);
890
+ }
891
+ const jr = (e) => {
892
+ const t = ({ timestamp: n }) => e(n);
893
+ return {
894
+ start: (n = !0) => L.update(t, n),
895
+ stop: () => Qe(t),
896
+ /**
897
+ * If we're processing this frame we can use the
898
+ * framelocked timestamp to keep things in sync.
899
+ */
900
+ now: () => Pe.isProcessing ? Pe.timestamp : k.now()
901
+ };
902
+ }, ts = (e, t, n = 10) => {
903
+ let s = "";
904
+ const r = Math.max(Math.round(t / n), 2);
905
+ for (let i = 0; i < r; i++)
906
+ s += e(i / (r - 1)) + ", ";
907
+ return `linear(${s.substring(0, s.length - 2)})`;
908
+ }, Ie = 2e4;
909
+ function Ct(e) {
910
+ let t = 0;
911
+ const n = 50;
912
+ let s = e.next(t);
913
+ for (; !s.done && t < Ie; )
914
+ t += n, s = e.next(t);
915
+ return t >= Ie ? 1 / 0 : t;
916
+ }
917
+ function $r(e, t = 100, n) {
918
+ const s = n({ ...e, keyframes: [0, t] }), r = Math.min(Ct(s), Ie);
919
+ return {
920
+ type: "keyframes",
921
+ ease: (i) => s.next(r * i).value / t,
922
+ duration: /* @__PURE__ */ $(r)
923
+ };
924
+ }
925
+ const Wr = 5;
926
+ function ns(e, t, n) {
927
+ const s = Math.max(t - Wr, 0);
928
+ return kn(n - e(s), t - s);
929
+ }
930
+ const C = {
931
+ // Default spring physics
932
+ stiffness: 100,
933
+ damping: 10,
934
+ mass: 1,
935
+ velocity: 0,
936
+ // Default duration/bounce-based options
937
+ duration: 800,
938
+ // in ms
939
+ bounce: 0.3,
940
+ visualDuration: 0.3,
941
+ // in seconds
942
+ // Rest thresholds
943
+ restSpeed: {
944
+ granular: 0.01,
945
+ default: 2
946
+ },
947
+ restDelta: {
948
+ granular: 5e-3,
949
+ default: 0.5
950
+ },
951
+ // Limits
952
+ minDuration: 0.01,
953
+ // in seconds
954
+ maxDuration: 10,
955
+ // in seconds
956
+ minDamping: 0.05,
957
+ maxDamping: 1
958
+ }, Jt = 1e-3;
959
+ function Gr({ duration: e = C.duration, bounce: t = C.bounce, velocity: n = C.velocity, mass: s = C.mass }) {
960
+ let r, i;
961
+ be(e <= /* @__PURE__ */ B(C.maxDuration), "Spring duration must be 10 seconds or less");
962
+ let o = 1 - t;
963
+ o = Z(C.minDamping, C.maxDamping, o), e = Z(C.minDuration, C.maxDuration, /* @__PURE__ */ $(e)), o < 1 ? (r = (u) => {
964
+ const l = u * o, d = l * e, f = l - n, h = nt(u, o), m = Math.exp(-d);
965
+ return Jt - f / h * m;
966
+ }, i = (u) => {
967
+ const d = u * o * e, f = d * n + n, h = Math.pow(o, 2) * Math.pow(u, 2) * e, m = Math.exp(-d), v = nt(Math.pow(u, 2), o);
968
+ return (-r(u) + Jt > 0 ? -1 : 1) * ((f - h) * m) / v;
969
+ }) : (r = (u) => {
970
+ const l = Math.exp(-u * e), d = (u - n) * e + 1;
971
+ return -1e-3 + l * d;
972
+ }, i = (u) => {
973
+ const l = Math.exp(-u * e), d = (n - u) * (e * e);
974
+ return l * d;
975
+ });
976
+ const a = 5 / e, c = _r(r, i, a);
977
+ if (e = /* @__PURE__ */ B(e), isNaN(c))
978
+ return {
979
+ stiffness: C.stiffness,
980
+ damping: C.damping,
981
+ duration: e
982
+ };
983
+ {
984
+ const u = Math.pow(c, 2) * s;
985
+ return {
986
+ stiffness: u,
987
+ damping: o * 2 * Math.sqrt(s * u),
988
+ duration: e
989
+ };
990
+ }
991
+ }
992
+ const zr = 12;
993
+ function _r(e, t, n) {
994
+ let s = n;
995
+ for (let r = 1; r < zr; r++)
996
+ s = s - e(s) / t(s);
997
+ return s;
998
+ }
999
+ function nt(e, t) {
1000
+ return e * Math.sqrt(1 - t * t);
1001
+ }
1002
+ const Ur = ["duration", "bounce"], Hr = ["stiffness", "damping", "mass"];
1003
+ function Qt(e, t) {
1004
+ return t.some((n) => e[n] !== void 0);
1005
+ }
1006
+ function Yr(e) {
1007
+ let t = {
1008
+ velocity: C.velocity,
1009
+ stiffness: C.stiffness,
1010
+ damping: C.damping,
1011
+ mass: C.mass,
1012
+ isResolvedFromDuration: !1,
1013
+ ...e
1014
+ };
1015
+ if (!Qt(e, Hr) && Qt(e, Ur))
1016
+ if (e.visualDuration) {
1017
+ const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), r = s * s, i = 2 * Z(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(r);
1018
+ t = {
1019
+ ...t,
1020
+ mass: C.mass,
1021
+ stiffness: r,
1022
+ damping: i
1023
+ };
1024
+ } else {
1025
+ const n = Gr(e);
1026
+ t = {
1027
+ ...t,
1028
+ ...n,
1029
+ mass: C.mass
1030
+ }, t.isResolvedFromDuration = !0;
1031
+ }
1032
+ return t;
1033
+ }
1034
+ function De(e = C.visualDuration, t = C.bounce) {
1035
+ const n = typeof e != "object" ? {
1036
+ visualDuration: e,
1037
+ keyframes: [0, 1],
1038
+ bounce: t
1039
+ } : e;
1040
+ let { restSpeed: s, restDelta: r } = n;
1041
+ const i = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: i }, { stiffness: c, damping: u, mass: l, duration: d, velocity: f, isResolvedFromDuration: h } = Yr({
1042
+ ...n,
1043
+ velocity: -/* @__PURE__ */ $(n.velocity || 0)
1044
+ }), m = f || 0, v = u / (2 * Math.sqrt(c * l)), x = o - i, p = /* @__PURE__ */ $(Math.sqrt(c / l)), S = Math.abs(x) < 5;
1045
+ s || (s = S ? C.restSpeed.granular : C.restSpeed.default), r || (r = S ? C.restDelta.granular : C.restDelta.default);
1046
+ let y;
1047
+ if (v < 1) {
1048
+ const g = nt(p, v);
1049
+ y = (w) => {
1050
+ const M = Math.exp(-v * p * w);
1051
+ return o - M * ((m + v * p * x) / g * Math.sin(g * w) + x * Math.cos(g * w));
1052
+ };
1053
+ } else if (v === 1)
1054
+ y = (g) => o - Math.exp(-p * g) * (x + (m + p * x) * g);
1055
+ else {
1056
+ const g = p * Math.sqrt(v * v - 1);
1057
+ y = (w) => {
1058
+ const M = Math.exp(-v * p * w), T = Math.min(g * w, 300);
1059
+ return o - M * ((m + v * p * x) * Math.sinh(T) + g * x * Math.cosh(T)) / g;
1060
+ };
1061
+ }
1062
+ const A = {
1063
+ calculatedDuration: h && d || null,
1064
+ next: (g) => {
1065
+ const w = y(g);
1066
+ if (h)
1067
+ a.done = g >= d;
1068
+ else {
1069
+ let M = g === 0 ? m : 0;
1070
+ v < 1 && (M = g === 0 ? /* @__PURE__ */ B(m) : ns(y, g, w));
1071
+ const T = Math.abs(M) <= s, F = Math.abs(o - w) <= r;
1072
+ a.done = T && F;
1073
+ }
1074
+ return a.value = a.done ? o : w, a;
1075
+ },
1076
+ toString: () => {
1077
+ const g = Math.min(Ct(A), Ie), w = ts((M) => A.next(g * M).value, g, 30);
1078
+ return g + "ms " + w;
1079
+ },
1080
+ toTransition: () => {
1081
+ }
1082
+ };
1083
+ return A;
1084
+ }
1085
+ De.applyToOptions = (e) => {
1086
+ const t = $r(e, 100, De);
1087
+ return e.ease = t.ease, e.duration = /* @__PURE__ */ B(t.duration), e.type = "keyframes", e;
1088
+ };
1089
+ function st({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: r = 10, bounceStiffness: i = 500, modifyTarget: o, min: a, max: c, restDelta: u = 0.5, restSpeed: l }) {
1090
+ const d = e[0], f = {
1091
+ done: !1,
1092
+ value: d
1093
+ }, h = (T) => a !== void 0 && T < a || c !== void 0 && T > c, m = (T) => a === void 0 ? c : c === void 0 || Math.abs(a - T) < Math.abs(c - T) ? a : c;
1094
+ let v = n * t;
1095
+ const x = d + v, p = o === void 0 ? x : o(x);
1096
+ p !== x && (v = p - d);
1097
+ const S = (T) => -v * Math.exp(-T / s), y = (T) => p + S(T), A = (T) => {
1098
+ const F = S(T), D = y(T);
1099
+ f.done = Math.abs(F) <= u, f.value = f.done ? p : D;
1100
+ };
1101
+ let g, w;
1102
+ const M = (T) => {
1103
+ h(f.value) && (g = T, w = De({
1104
+ keyframes: [f.value, m(f.value)],
1105
+ velocity: ns(y, T, f.value),
1106
+ // TODO: This should be passing * 1000
1107
+ damping: r,
1108
+ stiffness: i,
1109
+ restDelta: u,
1110
+ restSpeed: l
1111
+ }));
1112
+ };
1113
+ return M(0), {
1114
+ calculatedDuration: null,
1115
+ next: (T) => {
1116
+ let F = !1;
1117
+ return !w && g === void 0 && (F = !0, A(T), M(T)), g !== void 0 && T >= g ? w.next(T - g) : (!F && A(T), f);
1118
+ }
1119
+ };
1120
+ }
1121
+ function Xr(e, t, n) {
1122
+ const s = [], r = n || G.mix || es, i = e.length - 1;
1123
+ for (let o = 0; o < i; o++) {
1124
+ let a = r(e[o], e[o + 1]);
1125
+ if (t) {
1126
+ const c = Array.isArray(t) ? t[o] || oe : t;
1127
+ a = Le(c, a);
1128
+ }
1129
+ s.push(a);
1130
+ }
1131
+ return s;
1132
+ }
1133
+ function qr(e, t, { clamp: n = !0, ease: s, mixer: r } = {}) {
1134
+ const i = e.length;
1135
+ if (J(i === t.length, "Both input and output ranges must be the same length"), i === 1)
1136
+ return () => t[0];
1137
+ if (i === 2 && t[0] === t[1])
1138
+ return () => t[1];
1139
+ const o = e[0] === e[1];
1140
+ e[0] > e[i - 1] && (e = [...e].reverse(), t = [...t].reverse());
1141
+ const a = Xr(t, s, r), c = a.length, u = (l) => {
1142
+ if (o && l < e[0])
1143
+ return t[0];
1144
+ let d = 0;
1145
+ if (c > 1)
1146
+ for (; d < e.length - 2 && !(l < e[d + 1]); d++)
1147
+ ;
1148
+ const f = /* @__PURE__ */ On(e[d], e[d + 1], l);
1149
+ return a[d](f);
1150
+ };
1151
+ return n ? (l) => u(Z(e[0], e[i - 1], l)) : u;
1152
+ }
1153
+ function Zr(e, t) {
1154
+ const n = e[e.length - 1];
1155
+ for (let s = 1; s <= t; s++) {
1156
+ const r = /* @__PURE__ */ On(0, t, s);
1157
+ e.push(Be(n, 1, r));
1158
+ }
1159
+ }
1160
+ function Jr(e) {
1161
+ const t = [0];
1162
+ return Zr(t, e.length - 1), t;
1163
+ }
1164
+ function Qr(e, t) {
1165
+ return e.map((n) => n * t);
1166
+ }
1167
+ function ei(e, t) {
1168
+ return e.map(() => t || Gn).splice(0, e.length - 1);
1169
+ }
1170
+ function te({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
1171
+ const r = fr(s) ? s.map(Ht) : Ht(s), i = {
1172
+ done: !1,
1173
+ value: t[0]
1174
+ }, o = Qr(
1175
+ // Only use the provided offsets if they're the correct length
1176
+ // TODO Maybe we should warn here if there's a length mismatch
1177
+ n && n.length === t.length ? n : Jr(t),
1178
+ e
1179
+ ), a = qr(o, t, {
1180
+ ease: Array.isArray(r) ? r : ei(t, r)
1181
+ });
1182
+ return {
1183
+ calculatedDuration: e,
1184
+ next: (c) => (i.value = a(c), i.done = c >= e, i)
1185
+ };
1186
+ }
1187
+ const ti = (e) => e !== null;
1188
+ function Pt(e, { repeat: t, repeatType: n = "loop" }, s, r = 1) {
1189
+ const i = e.filter(ti), a = r < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
1190
+ return !a || s === void 0 ? i[a] : s;
1191
+ }
1192
+ const ni = {
1193
+ decay: st,
1194
+ inertia: st,
1195
+ tween: te,
1196
+ keyframes: te,
1197
+ spring: De
1198
+ };
1199
+ function ss(e) {
1200
+ typeof e.type == "string" && (e.type = ni[e.type]);
1201
+ }
1202
+ class Ft {
1203
+ constructor() {
1204
+ this.updateFinished();
1205
+ }
1206
+ get finished() {
1207
+ return this._finished;
1208
+ }
1209
+ updateFinished() {
1210
+ this._finished = new Promise((t) => {
1211
+ this.resolve = t;
1212
+ });
1213
+ }
1214
+ notifyFinished() {
1215
+ this.resolve();
1216
+ }
1217
+ /**
1218
+ * Allows the animation to be awaited.
1219
+ *
1220
+ * @deprecated Use `finished` instead.
1221
+ */
1222
+ then(t, n) {
1223
+ return this.finished.then(t, n);
1224
+ }
1225
+ }
1226
+ const si = (e) => e / 100;
1227
+ class It extends Ft {
1228
+ constructor(t) {
1229
+ super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = (n = !0) => {
1230
+ var s, r;
1231
+ if (n) {
1232
+ const { motionValue: i } = this.options;
1233
+ i && i.updatedAt !== k.now() && this.tick(k.now());
1234
+ }
1235
+ this.isStopped = !0, this.state !== "idle" && (this.teardown(), (r = (s = this.options).onStop) == null || r.call(s));
1236
+ }, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
1237
+ }
1238
+ initAnimation() {
1239
+ const { options: t } = this;
1240
+ ss(t);
1241
+ const { type: n = te, repeat: s = 0, repeatDelay: r = 0, repeatType: i, velocity: o = 0 } = t;
1242
+ let { keyframes: a } = t;
1243
+ const c = n || te;
1244
+ process.env.NODE_ENV !== "production" && c !== te && J(a.length <= 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`), c !== te && typeof a[0] != "number" && (this.mixKeyframes = Le(si, es(a[0], a[1])), a = [0, 100]);
1245
+ const u = c({ ...t, keyframes: a });
1246
+ i === "mirror" && (this.mirroredGenerator = c({
1247
+ ...t,
1248
+ keyframes: [...a].reverse(),
1249
+ velocity: -o
1250
+ })), u.calculatedDuration === null && (u.calculatedDuration = Ct(u));
1251
+ const { calculatedDuration: l } = u;
1252
+ this.calculatedDuration = l, this.resolvedDuration = l + r, this.totalDuration = this.resolvedDuration * (s + 1) - r, this.generator = u;
1253
+ }
1254
+ updateTime(t) {
1255
+ const n = Math.round(t - this.startTime) * this.playbackSpeed;
1256
+ this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
1257
+ }
1258
+ tick(t, n = !1) {
1259
+ const { generator: s, totalDuration: r, mixKeyframes: i, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: c } = this;
1260
+ if (this.startTime === null)
1261
+ return s.next(0);
1262
+ const { delay: u = 0, keyframes: l, repeat: d, repeatType: f, repeatDelay: h, type: m, onUpdate: v, finalKeyframe: x } = this.options;
1263
+ this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
1264
+ const p = this.currentTime - u * (this.playbackSpeed >= 0 ? 1 : -1), S = this.playbackSpeed >= 0 ? p < 0 : p > r;
1265
+ this.currentTime = Math.max(p, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
1266
+ let y = this.currentTime, A = s;
1267
+ if (d) {
1268
+ const T = Math.min(this.currentTime, r) / a;
1269
+ let F = Math.floor(T), D = T % 1;
1270
+ !D && T >= 1 && (D = 1), D === 1 && F--, F = Math.min(F, d + 1), !!(F % 2) && (f === "reverse" ? (D = 1 - D, h && (D -= h / a)) : f === "mirror" && (A = o)), y = Z(0, 1, D) * a;
1271
+ }
1272
+ const g = S ? { done: !1, value: l[0] } : A.next(y);
1273
+ i && (g.value = i(g.value));
1274
+ let { done: w } = g;
1275
+ !S && c !== null && (w = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
1276
+ const M = this.holdTime === null && (this.state === "finished" || this.state === "running" && w);
1277
+ return M && m !== st && (g.value = Pt(l, this.options, x, this.speed)), v && v(g.value), M && this.finish(), g;
1278
+ }
1279
+ /**
1280
+ * Allows the returned animation to be awaited or promise-chained. Currently
1281
+ * resolves when the animation finishes at all but in a future update could/should
1282
+ * reject if its cancels.
1283
+ */
1284
+ then(t, n) {
1285
+ return this.finished.then(t, n);
1286
+ }
1287
+ get duration() {
1288
+ return /* @__PURE__ */ $(this.calculatedDuration);
1289
+ }
1290
+ get time() {
1291
+ return /* @__PURE__ */ $(this.currentTime);
1292
+ }
1293
+ set time(t) {
1294
+ var n;
1295
+ t = /* @__PURE__ */ B(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), (n = this.driver) == null || n.start(!1);
1296
+ }
1297
+ get speed() {
1298
+ return this.playbackSpeed;
1299
+ }
1300
+ set speed(t) {
1301
+ this.updateTime(k.now());
1302
+ const n = this.playbackSpeed !== t;
1303
+ this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ $(this.currentTime));
1304
+ }
1305
+ play() {
1306
+ var r, i;
1307
+ if (this.isStopped)
1308
+ return;
1309
+ const { driver: t = jr, startTime: n } = this.options;
1310
+ this.driver || (this.driver = t((o) => this.tick(o))), (i = (r = this.options).onPlay) == null || i.call(r);
1311
+ const s = this.driver.now();
1312
+ 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();
1313
+ }
1314
+ pause() {
1315
+ this.state = "paused", this.updateTime(k.now()), this.holdTime = this.currentTime;
1316
+ }
1317
+ complete() {
1318
+ this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
1319
+ }
1320
+ finish() {
1321
+ var t, n;
1322
+ this.notifyFinished(), this.teardown(), this.state = "finished", (n = (t = this.options).onComplete) == null || n.call(t);
1323
+ }
1324
+ cancel() {
1325
+ var t, n;
1326
+ this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), (n = (t = this.options).onCancel) == null || n.call(t);
1327
+ }
1328
+ teardown() {
1329
+ this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
1330
+ }
1331
+ stopDriver() {
1332
+ this.driver && (this.driver.stop(), this.driver = void 0);
1333
+ }
1334
+ sample(t) {
1335
+ return this.startTime = 0, this.tick(t, !0);
1336
+ }
1337
+ attachTimeline(t) {
1338
+ var n;
1339
+ return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(), t.observe(this);
1340
+ }
1341
+ }
1342
+ function ri(e) {
1343
+ for (let t = 1; t < e.length; t++)
1344
+ e[t] ?? (e[t] = e[t - 1]);
1345
+ }
1346
+ const Y = (e) => e * 180 / Math.PI, rt = (e) => {
1347
+ const t = Y(Math.atan2(e[1], e[0]));
1348
+ return it(t);
1349
+ }, ii = {
1350
+ x: 4,
1351
+ y: 5,
1352
+ translateX: 4,
1353
+ translateY: 5,
1354
+ scaleX: 0,
1355
+ scaleY: 3,
1356
+ scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
1357
+ rotate: rt,
1358
+ rotateZ: rt,
1359
+ skewX: (e) => Y(Math.atan(e[1])),
1360
+ skewY: (e) => Y(Math.atan(e[2])),
1361
+ skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
1362
+ }, it = (e) => (e = e % 360, e < 0 && (e += 360), e), en = rt, tn = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), nn = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), oi = {
1363
+ x: 12,
1364
+ y: 13,
1365
+ z: 14,
1366
+ translateX: 12,
1367
+ translateY: 13,
1368
+ translateZ: 14,
1369
+ scaleX: tn,
1370
+ scaleY: nn,
1371
+ scale: (e) => (tn(e) + nn(e)) / 2,
1372
+ rotateX: (e) => it(Y(Math.atan2(e[6], e[5]))),
1373
+ rotateY: (e) => it(Y(Math.atan2(-e[2], e[0]))),
1374
+ rotateZ: en,
1375
+ rotate: en,
1376
+ skewX: (e) => Y(Math.atan(e[4])),
1377
+ skewY: (e) => Y(Math.atan(e[1])),
1378
+ skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
1379
+ };
1380
+ function ot(e) {
1381
+ return e.includes("scale") ? 1 : 0;
1382
+ }
1383
+ function at(e, t) {
1384
+ if (!e || e === "none")
1385
+ return ot(t);
1386
+ const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
1387
+ let s, r;
1388
+ if (n)
1389
+ s = oi, r = n;
1390
+ else {
1391
+ const a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
1392
+ s = ii, r = a;
1393
+ }
1394
+ if (!r)
1395
+ return ot(t);
1396
+ const i = s[t], o = r[1].split(",").map(li);
1397
+ return typeof i == "function" ? i(o) : o[i];
1398
+ }
1399
+ const ai = (e, t) => {
1400
+ const { transform: n = "none" } = getComputedStyle(e);
1401
+ return at(n, t);
1402
+ };
1403
+ function li(e) {
1404
+ return parseFloat(e.trim());
1405
+ }
1406
+ const ce = [
1407
+ "transformPerspective",
1408
+ "x",
1409
+ "y",
1410
+ "z",
1411
+ "translateX",
1412
+ "translateY",
1413
+ "translateZ",
1414
+ "scale",
1415
+ "scaleX",
1416
+ "scaleY",
1417
+ "rotate",
1418
+ "rotateX",
1419
+ "rotateY",
1420
+ "rotateZ",
1421
+ "skew",
1422
+ "skewX",
1423
+ "skewY"
1424
+ ], ue = new Set(ce), sn = (e) => e === ae || e === b, ci = /* @__PURE__ */ new Set(["x", "y", "z"]), ui = ce.filter((e) => !ci.has(e));
1425
+ function di(e) {
1426
+ const t = [];
1427
+ return ui.forEach((n) => {
1428
+ const s = e.getValue(n);
1429
+ s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
1430
+ }), t;
1431
+ }
1432
+ const X = {
1433
+ // Dimensions
1434
+ width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
1435
+ height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
1436
+ top: (e, { top: t }) => parseFloat(t),
1437
+ left: (e, { left: t }) => parseFloat(t),
1438
+ bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
1439
+ right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
1440
+ // Transform
1441
+ x: (e, { transform: t }) => at(t, "x"),
1442
+ y: (e, { transform: t }) => at(t, "y")
1443
+ };
1444
+ X.translateX = X.x;
1445
+ X.translateY = X.y;
1446
+ const q = /* @__PURE__ */ new Set();
1447
+ let lt = !1, ct = !1, ut = !1;
1448
+ function rs() {
1449
+ if (ct) {
1450
+ const e = Array.from(q).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
1451
+ t.forEach((s) => {
1452
+ const r = di(s);
1453
+ r.length && (n.set(s, r), s.render());
1454
+ }), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
1455
+ s.render();
1456
+ const r = n.get(s);
1457
+ r && r.forEach(([i, o]) => {
1458
+ var a;
1459
+ (a = s.getValue(i)) == null || a.set(o);
1460
+ });
1461
+ }), e.forEach((s) => s.measureEndState()), e.forEach((s) => {
1462
+ s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
1463
+ });
1464
+ }
1465
+ ct = !1, lt = !1, q.forEach((e) => e.complete(ut)), q.clear();
1466
+ }
1467
+ function is() {
1468
+ q.forEach((e) => {
1469
+ e.readKeyframes(), e.needsMeasurement && (ct = !0);
1470
+ });
1471
+ }
1472
+ function fi() {
1473
+ ut = !0, is(), rs(), ut = !1;
1474
+ }
1475
+ class Dt {
1476
+ constructor(t, n, s, r, i, o = !1) {
1477
+ this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = r, this.element = i, this.isAsync = o;
1478
+ }
1479
+ scheduleResolve() {
1480
+ this.state = "scheduled", this.isAsync ? (q.add(this), lt || (lt = !0, L.read(is), L.resolveKeyframes(rs))) : (this.readKeyframes(), this.complete());
1481
+ }
1482
+ readKeyframes() {
1483
+ const { unresolvedKeyframes: t, name: n, element: s, motionValue: r } = this;
1484
+ if (t[0] === null) {
1485
+ const i = r == null ? void 0 : r.get(), o = t[t.length - 1];
1486
+ if (i !== void 0)
1487
+ t[0] = i;
1488
+ else if (s && n) {
1489
+ const a = s.readValue(n, o);
1490
+ a != null && (t[0] = a);
1491
+ }
1492
+ t[0] === void 0 && (t[0] = o), r && i === void 0 && r.set(t[0]);
1493
+ }
1494
+ ri(t);
1495
+ }
1496
+ setFinalKeyframe() {
1497
+ }
1498
+ measureInitialState() {
1499
+ }
1500
+ renderEndStyles() {
1501
+ }
1502
+ measureEndState() {
1503
+ }
1504
+ complete(t = !1) {
1505
+ this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), q.delete(this);
1506
+ }
1507
+ cancel() {
1508
+ this.state === "scheduled" && (q.delete(this), this.state = "pending");
1509
+ }
1510
+ resume() {
1511
+ this.state === "pending" && this.scheduleResolve();
1512
+ }
1513
+ }
1514
+ const hi = (e) => e.startsWith("--");
1515
+ function pi(e, t, n) {
1516
+ hi(t) ? e.style.setProperty(t, n) : e.style[t] = n;
1517
+ }
1518
+ const mi = /* @__PURE__ */ vt(() => window.ScrollTimeline !== void 0), gi = {};
1519
+ function yi(e, t) {
1520
+ const n = /* @__PURE__ */ vt(e);
1521
+ return () => gi[t] ?? n();
1522
+ }
1523
+ const os = /* @__PURE__ */ yi(() => {
1524
+ try {
1525
+ document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1526
+ } catch {
1527
+ return !1;
1528
+ }
1529
+ return !0;
1530
+ }, "linearEasing"), fe = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, rn = {
1531
+ linear: "linear",
1532
+ ease: "ease",
1533
+ easeIn: "ease-in",
1534
+ easeOut: "ease-out",
1535
+ easeInOut: "ease-in-out",
1536
+ circIn: /* @__PURE__ */ fe([0, 0.65, 0.55, 1]),
1537
+ circOut: /* @__PURE__ */ fe([0.55, 0, 1, 0.45]),
1538
+ backIn: /* @__PURE__ */ fe([0.31, 0.01, 0.66, -0.59]),
1539
+ backOut: /* @__PURE__ */ fe([0.33, 1.53, 0.69, 0.99])
1540
+ };
1541
+ function as(e, t) {
1542
+ if (e)
1543
+ return typeof e == "function" ? os() ? ts(e, t) : "ease-out" : zn(e) ? fe(e) : Array.isArray(e) ? e.map((n) => as(n, t) || rn.easeOut) : rn[e];
1544
+ }
1545
+ function bi(e, t, n, { delay: s = 0, duration: r = 300, repeat: i = 0, repeatType: o = "loop", ease: a = "easeOut", times: c } = {}, u = void 0) {
1546
+ const l = {
1547
+ [t]: n
1548
+ };
1549
+ c && (l.offset = c);
1550
+ const d = as(a, r);
1551
+ Array.isArray(d) && (l.easing = d);
1552
+ const f = {
1553
+ delay: s,
1554
+ duration: r,
1555
+ easing: Array.isArray(d) ? "linear" : d,
1556
+ fill: "both",
1557
+ iterations: i + 1,
1558
+ direction: o === "reverse" ? "alternate" : "normal"
1559
+ };
1560
+ return u && (f.pseudoElement = u), e.animate(l, f);
1561
+ }
1562
+ function ls(e) {
1563
+ return typeof e == "function" && "applyToOptions" in e;
1564
+ }
1565
+ function vi({ type: e, ...t }) {
1566
+ return ls(e) && os() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
1567
+ }
1568
+ class wi extends Ft {
1569
+ constructor(t) {
1570
+ if (super(), this.finishedTime = null, this.isStopped = !1, !t)
1571
+ return;
1572
+ const { element: n, name: s, keyframes: r, pseudoElement: i, allowFlatten: o = !1, finalKeyframe: a, onComplete: c } = t;
1573
+ this.isPseudoElement = !!i, this.allowFlatten = o, this.options = t, J(typeof t.type != "string", `animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);
1574
+ const u = vi(t);
1575
+ this.animation = bi(n, s, r, u, i), u.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1576
+ if (this.finishedTime = this.time, !i) {
1577
+ const l = Pt(r, this.options, a, this.speed);
1578
+ this.updateMotionValue ? this.updateMotionValue(l) : pi(n, s, l), this.animation.cancel();
1579
+ }
1580
+ c == null || c(), this.notifyFinished();
1581
+ };
1582
+ }
1583
+ play() {
1584
+ this.isStopped || (this.animation.play(), this.state === "finished" && this.updateFinished());
1585
+ }
1586
+ pause() {
1587
+ this.animation.pause();
1588
+ }
1589
+ complete() {
1590
+ var t, n;
1591
+ (n = (t = this.animation).finish) == null || n.call(t);
1592
+ }
1593
+ cancel() {
1594
+ try {
1595
+ this.animation.cancel();
1596
+ } catch {
1597
+ }
1598
+ }
1599
+ stop() {
1600
+ if (this.isStopped)
1601
+ return;
1602
+ this.isStopped = !0;
1603
+ const { state: t } = this;
1604
+ t === "idle" || t === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
1605
+ }
1606
+ /**
1607
+ * WAAPI doesn't natively have any interruption capabilities.
1608
+ *
1609
+ * In this method, we commit styles back to the DOM before cancelling
1610
+ * the animation.
1611
+ *
1612
+ * This is designed to be overridden by NativeAnimationExtended, which
1613
+ * will create a renderless JS animation and sample it twice to calculate
1614
+ * its current value, "previous" value, and therefore allow
1615
+ * Motion to also correctly calculate velocity for any subsequent animation
1616
+ * while deferring the commit until the next animation frame.
1617
+ */
1618
+ commitStyles() {
1619
+ var t, n;
1620
+ this.isPseudoElement || (n = (t = this.animation).commitStyles) == null || n.call(t);
1621
+ }
1622
+ get duration() {
1623
+ var n, s;
1624
+ const t = ((s = (n = this.animation.effect) == null ? void 0 : n.getComputedTiming) == null ? void 0 : s.call(n).duration) || 0;
1625
+ return /* @__PURE__ */ $(Number(t));
1626
+ }
1627
+ get time() {
1628
+ return /* @__PURE__ */ $(Number(this.animation.currentTime) || 0);
1629
+ }
1630
+ set time(t) {
1631
+ this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ B(t);
1632
+ }
1633
+ /**
1634
+ * The playback speed of the animation.
1635
+ * 1 = normal speed, 2 = double speed, 0.5 = half speed.
1636
+ */
1637
+ get speed() {
1638
+ return this.animation.playbackRate;
1639
+ }
1640
+ set speed(t) {
1641
+ t < 0 && (this.finishedTime = null), this.animation.playbackRate = t;
1642
+ }
1643
+ get state() {
1644
+ return this.finishedTime !== null ? "finished" : this.animation.playState;
1645
+ }
1646
+ get startTime() {
1647
+ return Number(this.animation.startTime);
1648
+ }
1649
+ set startTime(t) {
1650
+ this.animation.startTime = t;
1651
+ }
1652
+ /**
1653
+ * Attaches a timeline to the animation, for instance the `ScrollTimeline`.
1654
+ */
1655
+ attachTimeline({ timeline: t, observe: n }) {
1656
+ var s;
1657
+ return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && mi() ? (this.animation.timeline = t, oe) : n(this);
1658
+ }
1659
+ }
1660
+ const cs = {
1661
+ anticipate: $n,
1662
+ backInOut: jn,
1663
+ circInOut: Wn
1664
+ };
1665
+ function Ti(e) {
1666
+ return e in cs;
1667
+ }
1668
+ function xi(e) {
1669
+ typeof e.ease == "string" && Ti(e.ease) && (e.ease = cs[e.ease]);
1670
+ }
1671
+ const on = 10;
1672
+ class Vi extends wi {
1673
+ constructor(t) {
1674
+ xi(t), ss(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1675
+ }
1676
+ /**
1677
+ * WAAPI doesn't natively have any interruption capabilities.
1678
+ *
1679
+ * Rather than read commited styles back out of the DOM, we can
1680
+ * create a renderless JS animation and sample it twice to calculate
1681
+ * its current value, "previous" value, and therefore allow
1682
+ * Motion to calculate velocity for any subsequent animation.
1683
+ */
1684
+ updateMotionValue(t) {
1685
+ const { motionValue: n, onUpdate: s, onComplete: r, element: i, ...o } = this.options;
1686
+ if (!n)
1687
+ return;
1688
+ if (t !== void 0) {
1689
+ n.set(t);
1690
+ return;
1691
+ }
1692
+ const a = new It({
1693
+ ...o,
1694
+ autoplay: !1
1695
+ }), c = /* @__PURE__ */ B(this.finishedTime ?? this.time);
1696
+ n.setWithVelocity(a.sample(c - on).value, a.sample(c).value, on), a.stop();
1697
+ }
1698
+ }
1699
+ const an = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1700
+ (le.test(e) || e === "0") && // And it contains numbers and/or colors
1701
+ !e.startsWith("url("));
1702
+ function Si(e) {
1703
+ const t = e[0];
1704
+ if (e.length === 1)
1705
+ return !0;
1706
+ for (let n = 0; n < e.length; n++)
1707
+ if (e[n] !== t)
1708
+ return !0;
1709
+ }
1710
+ function Ai(e, t, n, s) {
1711
+ const r = e[0];
1712
+ if (r === null)
1713
+ return !1;
1714
+ if (t === "display" || t === "visibility")
1715
+ return !0;
1716
+ const i = e[e.length - 1], o = an(r, t), a = an(i, t);
1717
+ return be(o === a, `You are trying to animate ${t} from "${r}" to "${i}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${i} via the \`style\` property.`), !o || !a ? !1 : Si(e) || (n === "spring" || ls(n)) && s;
1718
+ }
1719
+ function Rt(e) {
1720
+ return rr(e) && "offsetHeight" in e;
1721
+ }
1722
+ const Mi = /* @__PURE__ */ new Set([
1723
+ "opacity",
1724
+ "clipPath",
1725
+ "filter",
1726
+ "transform"
1727
+ // TODO: Could be re-enabled now we have support for linear() easing
1728
+ // "background-color"
1729
+ ]), Ci = /* @__PURE__ */ vt(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1730
+ function Pi(e) {
1731
+ var u;
1732
+ const { motionValue: t, name: n, repeatDelay: s, repeatType: r, damping: i, type: o } = e;
1733
+ if (!Rt((u = t == null ? void 0 : t.owner) == null ? void 0 : u.current))
1734
+ return !1;
1735
+ const { onUpdate: a, transformTemplate: c } = t.owner.getProps();
1736
+ return Ci() && n && Mi.has(n) && (n !== "transform" || !c) && /**
1737
+ * If we're outputting values to onUpdate then we can't use WAAPI as there's
1738
+ * no way to read the value from WAAPI every frame.
1739
+ */
1740
+ !a && !s && r !== "mirror" && i !== 0 && o !== "inertia";
1741
+ }
1742
+ const Fi = 40;
1743
+ class Ii extends Ft {
1744
+ constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: r = 0, repeatDelay: i = 0, repeatType: o = "loop", keyframes: a, name: c, motionValue: u, element: l, ...d }) {
1745
+ var m;
1746
+ super(), this.stop = () => {
1747
+ var v, x;
1748
+ this._animation && (this._animation.stop(), (v = this.stopTimeline) == null || v.call(this)), (x = this.keyframeResolver) == null || x.cancel();
1749
+ }, this.createdAt = k.now();
1750
+ const f = {
1751
+ autoplay: t,
1752
+ delay: n,
1753
+ type: s,
1754
+ repeat: r,
1755
+ repeatDelay: i,
1756
+ repeatType: o,
1757
+ name: c,
1758
+ motionValue: u,
1759
+ element: l,
1760
+ ...d
1761
+ }, h = (l == null ? void 0 : l.KeyframeResolver) || Dt;
1762
+ this.keyframeResolver = new h(a, (v, x, p) => this.onKeyframesResolved(v, x, f, !p), c, u, l), (m = this.keyframeResolver) == null || m.scheduleResolve();
1763
+ }
1764
+ onKeyframesResolved(t, n, s, r) {
1765
+ this.keyframeResolver = void 0;
1766
+ const { name: i, type: o, velocity: a, delay: c, isHandoff: u, onUpdate: l } = s;
1767
+ this.resolvedAt = k.now(), Ai(t, i, o, a) || ((G.instantAnimations || !c) && (l == null || l(Pt(t, s, n))), t[0] = t[t.length - 1], s.duration = 0, s.repeat = 0);
1768
+ const f = {
1769
+ startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt > Fi ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1770
+ finalKeyframe: n,
1771
+ ...s,
1772
+ keyframes: t
1773
+ }, h = !u && Pi(f) ? new Vi({
1774
+ ...f,
1775
+ element: f.motionValue.owner.current
1776
+ }) : new It(f);
1777
+ h.finished.then(() => this.notifyFinished()).catch(oe), this.pendingTimeline && (this.stopTimeline = h.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = h;
1778
+ }
1779
+ get finished() {
1780
+ return this._animation ? this.animation.finished : this._finished;
1781
+ }
1782
+ then(t, n) {
1783
+ return this.finished.finally(t).then(() => {
1784
+ });
1785
+ }
1786
+ get animation() {
1787
+ var t;
1788
+ return this._animation || ((t = this.keyframeResolver) == null || t.resume(), fi()), this._animation;
1789
+ }
1790
+ get duration() {
1791
+ return this.animation.duration;
1792
+ }
1793
+ get time() {
1794
+ return this.animation.time;
1795
+ }
1796
+ set time(t) {
1797
+ this.animation.time = t;
1798
+ }
1799
+ get speed() {
1800
+ return this.animation.speed;
1801
+ }
1802
+ get state() {
1803
+ return this.animation.state;
1804
+ }
1805
+ set speed(t) {
1806
+ this.animation.speed = t;
1807
+ }
1808
+ get startTime() {
1809
+ return this.animation.startTime;
1810
+ }
1811
+ attachTimeline(t) {
1812
+ return this._animation ? this.stopTimeline = this.animation.attachTimeline(t) : this.pendingTimeline = t, () => this.stop();
1813
+ }
1814
+ play() {
1815
+ this.animation.play();
1816
+ }
1817
+ pause() {
1818
+ this.animation.pause();
1819
+ }
1820
+ complete() {
1821
+ this.animation.complete();
1822
+ }
1823
+ cancel() {
1824
+ var t;
1825
+ this._animation && this.animation.cancel(), (t = this.keyframeResolver) == null || t.cancel();
1826
+ }
1827
+ }
1828
+ const Di = (
1829
+ // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1830
+ /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1831
+ );
1832
+ function Ri(e) {
1833
+ const t = Di.exec(e);
1834
+ if (!t)
1835
+ return [,];
1836
+ const [, n, s, r] = t;
1837
+ return [`--${n ?? s}`, r];
1838
+ }
1839
+ const Oi = 4;
1840
+ function us(e, t, n = 1) {
1841
+ J(n <= Oi, `Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);
1842
+ const [s, r] = Ri(e);
1843
+ if (!s)
1844
+ return;
1845
+ const i = window.getComputedStyle(t).getPropertyValue(s);
1846
+ if (i) {
1847
+ const o = i.trim();
1848
+ return Dn(o) ? parseFloat(o) : o;
1849
+ }
1850
+ return Vt(r) ? us(r, t, n + 1) : r;
1851
+ }
1852
+ function ds(e, t) {
1853
+ return (e == null ? void 0 : e[t]) ?? (e == null ? void 0 : e.default) ?? e;
1854
+ }
1855
+ const fs = /* @__PURE__ */ new Set([
1856
+ "width",
1857
+ "height",
1858
+ "top",
1859
+ "left",
1860
+ "right",
1861
+ "bottom",
1862
+ ...ce
1863
+ ]), Ei = {
1864
+ test: (e) => e === "auto",
1865
+ parse: (e) => e
1866
+ }, hs = (e) => (t) => t.test(e), ps = [ae, b, ne, _, Sr, Vr, Ei], ln = (e) => ps.find(hs(e));
1867
+ function ki(e) {
1868
+ return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || Rn(e) : !0;
1869
+ }
1870
+ const Ni = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1871
+ function Li(e) {
1872
+ const [t, n] = e.slice(0, -1).split("(");
1873
+ if (t === "drop-shadow")
1874
+ return e;
1875
+ const [s] = n.match(St) || [];
1876
+ if (!s)
1877
+ return e;
1878
+ const r = n.replace(s, "");
1879
+ let i = Ni.has(t) ? 1 : 0;
1880
+ return s !== n && (i *= 100), t + "(" + i + r + ")";
1881
+ }
1882
+ const Bi = /\b([a-z-]*)\(.*?\)/gu, dt = {
1883
+ ...le,
1884
+ getAnimatableNone: (e) => {
1885
+ const t = e.match(Bi);
1886
+ return t ? t.map(Li).join(" ") : e;
1887
+ }
1888
+ }, cn = {
1889
+ ...ae,
1890
+ transform: Math.round
1891
+ }, Ki = {
1892
+ rotate: _,
1893
+ rotateX: _,
1894
+ rotateY: _,
1895
+ rotateZ: _,
1896
+ scale: Ve,
1897
+ scaleX: Ve,
1898
+ scaleY: Ve,
1899
+ scaleZ: Ve,
1900
+ skew: _,
1901
+ skewX: _,
1902
+ skewY: _,
1903
+ distance: b,
1904
+ translateX: b,
1905
+ translateY: b,
1906
+ translateZ: b,
1907
+ x: b,
1908
+ y: b,
1909
+ z: b,
1910
+ perspective: b,
1911
+ transformPerspective: b,
1912
+ opacity: pe,
1913
+ originX: Yt,
1914
+ originY: Yt,
1915
+ originZ: b
1916
+ }, Ot = {
1917
+ // Border props
1918
+ borderWidth: b,
1919
+ borderTopWidth: b,
1920
+ borderRightWidth: b,
1921
+ borderBottomWidth: b,
1922
+ borderLeftWidth: b,
1923
+ borderRadius: b,
1924
+ radius: b,
1925
+ borderTopLeftRadius: b,
1926
+ borderTopRightRadius: b,
1927
+ borderBottomRightRadius: b,
1928
+ borderBottomLeftRadius: b,
1929
+ // Positioning props
1930
+ width: b,
1931
+ maxWidth: b,
1932
+ height: b,
1933
+ maxHeight: b,
1934
+ top: b,
1935
+ right: b,
1936
+ bottom: b,
1937
+ left: b,
1938
+ // Spacing props
1939
+ padding: b,
1940
+ paddingTop: b,
1941
+ paddingRight: b,
1942
+ paddingBottom: b,
1943
+ paddingLeft: b,
1944
+ margin: b,
1945
+ marginTop: b,
1946
+ marginRight: b,
1947
+ marginBottom: b,
1948
+ marginLeft: b,
1949
+ // Misc
1950
+ backgroundPositionX: b,
1951
+ backgroundPositionY: b,
1952
+ ...Ki,
1953
+ zIndex: cn,
1954
+ // SVG
1955
+ fillOpacity: pe,
1956
+ strokeOpacity: pe,
1957
+ numOctaves: cn
1958
+ }, ji = {
1959
+ ...Ot,
1960
+ // Color props
1961
+ color: R,
1962
+ backgroundColor: R,
1963
+ outlineColor: R,
1964
+ fill: R,
1965
+ stroke: R,
1966
+ // Border props
1967
+ borderColor: R,
1968
+ borderTopColor: R,
1969
+ borderRightColor: R,
1970
+ borderBottomColor: R,
1971
+ borderLeftColor: R,
1972
+ filter: dt,
1973
+ WebkitFilter: dt
1974
+ }, ms = (e) => ji[e];
1975
+ function gs(e, t) {
1976
+ let n = ms(e);
1977
+ return n !== dt && (n = le), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1978
+ }
1979
+ const $i = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1980
+ function Wi(e, t, n) {
1981
+ let s = 0, r;
1982
+ for (; s < e.length && !r; ) {
1983
+ const i = e[s];
1984
+ typeof i == "string" && !$i.has(i) && me(i).values.length && (r = e[s]), s++;
1985
+ }
1986
+ if (r && n)
1987
+ for (const i of t)
1988
+ e[i] = gs(n, r);
1989
+ }
1990
+ class Gi extends Dt {
1991
+ constructor(t, n, s, r, i) {
1992
+ super(t, n, s, r, i, !0);
1993
+ }
1994
+ readKeyframes() {
1995
+ const { unresolvedKeyframes: t, element: n, name: s } = this;
1996
+ if (!n || !n.current)
1997
+ return;
1998
+ super.readKeyframes();
1999
+ for (let c = 0; c < t.length; c++) {
2000
+ let u = t[c];
2001
+ if (typeof u == "string" && (u = u.trim(), Vt(u))) {
2002
+ const l = us(u, n.current);
2003
+ l !== void 0 && (t[c] = l), c === t.length - 1 && (this.finalKeyframe = u);
2004
+ }
2005
+ }
2006
+ if (this.resolveNoneKeyframes(), !fs.has(s) || t.length !== 2)
2007
+ return;
2008
+ const [r, i] = t, o = ln(r), a = ln(i);
2009
+ if (o !== a)
2010
+ if (sn(o) && sn(a))
2011
+ for (let c = 0; c < t.length; c++) {
2012
+ const u = t[c];
2013
+ typeof u == "string" && (t[c] = parseFloat(u));
2014
+ }
2015
+ else X[s] && (this.needsMeasurement = !0);
2016
+ }
2017
+ resolveNoneKeyframes() {
2018
+ const { unresolvedKeyframes: t, name: n } = this, s = [];
2019
+ for (let r = 0; r < t.length; r++)
2020
+ (t[r] === null || ki(t[r])) && s.push(r);
2021
+ s.length && Wi(t, s, n);
2022
+ }
2023
+ measureInitialState() {
2024
+ const { element: t, unresolvedKeyframes: n, name: s } = this;
2025
+ if (!t || !t.current)
2026
+ return;
2027
+ s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = X[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
2028
+ const r = n[n.length - 1];
2029
+ r !== void 0 && t.getValue(s, r).jump(r, !1);
2030
+ }
2031
+ measureEndState() {
2032
+ var a;
2033
+ const { element: t, name: n, unresolvedKeyframes: s } = this;
2034
+ if (!t || !t.current)
2035
+ return;
2036
+ const r = t.getValue(n);
2037
+ r && r.jump(this.measuredOrigin, !1);
2038
+ const i = s.length - 1, o = s[i];
2039
+ s[i] = X[n](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([c, u]) => {
2040
+ t.getValue(c).set(u);
2041
+ }), this.resolveNoneKeyframes();
2042
+ }
2043
+ }
2044
+ function zi(e, t, n) {
2045
+ if (e instanceof EventTarget)
2046
+ return [e];
2047
+ if (typeof e == "string") {
2048
+ let s = document;
2049
+ const r = (n == null ? void 0 : n[e]) ?? s.querySelectorAll(e);
2050
+ return r ? Array.from(r) : [];
2051
+ }
2052
+ return Array.from(e);
2053
+ }
2054
+ const un = 30, _i = (e) => !isNaN(parseFloat(e));
2055
+ class Ui {
2056
+ /**
2057
+ * @param init - The initiating value
2058
+ * @param config - Optional configuration options
2059
+ *
2060
+ * - `transformer`: A function to transform incoming values with.
2061
+ */
2062
+ constructor(t, n = {}) {
2063
+ this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s, r = !0) => {
2064
+ var o, a;
2065
+ const i = k.now();
2066
+ if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && ((o = this.events.change) == null || o.notify(this.current), this.dependents))
2067
+ for (const c of this.dependents)
2068
+ c.dirty();
2069
+ r && ((a = this.events.renderRequest) == null || a.notify(this.current));
2070
+ }, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
2071
+ }
2072
+ setCurrent(t) {
2073
+ this.current = t, this.updatedAt = k.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = _i(this.current));
2074
+ }
2075
+ setPrevFrameValue(t = this.current) {
2076
+ this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
2077
+ }
2078
+ /**
2079
+ * Adds a function that will be notified when the `MotionValue` is updated.
2080
+ *
2081
+ * It returns a function that, when called, will cancel the subscription.
2082
+ *
2083
+ * When calling `onChange` inside a React component, it should be wrapped with the
2084
+ * `useEffect` hook. As it returns an unsubscribe function, this should be returned
2085
+ * from the `useEffect` function to ensure you don't add duplicate subscribers..
2086
+ *
2087
+ * ```jsx
2088
+ * export const MyComponent = () => {
2089
+ * const x = useMotionValue(0)
2090
+ * const y = useMotionValue(0)
2091
+ * const opacity = useMotionValue(1)
2092
+ *
2093
+ * useEffect(() => {
2094
+ * function updateOpacity() {
2095
+ * const maxXY = Math.max(x.get(), y.get())
2096
+ * const newOpacity = transform(maxXY, [0, 100], [1, 0])
2097
+ * opacity.set(newOpacity)
2098
+ * }
2099
+ *
2100
+ * const unsubscribeX = x.on("change", updateOpacity)
2101
+ * const unsubscribeY = y.on("change", updateOpacity)
2102
+ *
2103
+ * return () => {
2104
+ * unsubscribeX()
2105
+ * unsubscribeY()
2106
+ * }
2107
+ * }, [])
2108
+ *
2109
+ * return <motion.div style={{ x }} />
2110
+ * }
2111
+ * ```
2112
+ *
2113
+ * @param subscriber - A function that receives the latest value.
2114
+ * @returns A function that, when called, will cancel this subscription.
2115
+ *
2116
+ * @deprecated
2117
+ */
2118
+ onChange(t) {
2119
+ return process.env.NODE_ENV !== "production" && wt(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", t);
2120
+ }
2121
+ on(t, n) {
2122
+ this.events[t] || (this.events[t] = new En());
2123
+ const s = this.events[t].add(n);
2124
+ return t === "change" ? () => {
2125
+ s(), L.read(() => {
2126
+ this.events.change.getSize() || this.stop();
2127
+ });
2128
+ } : s;
2129
+ }
2130
+ clearListeners() {
2131
+ for (const t in this.events)
2132
+ this.events[t].clear();
2133
+ }
2134
+ /**
2135
+ * Attaches a passive effect to the `MotionValue`.
2136
+ */
2137
+ attach(t, n) {
2138
+ this.passiveEffect = t, this.stopPassiveEffect = n;
2139
+ }
2140
+ /**
2141
+ * Sets the state of the `MotionValue`.
2142
+ *
2143
+ * @remarks
2144
+ *
2145
+ * ```jsx
2146
+ * const x = useMotionValue(0)
2147
+ * x.set(10)
2148
+ * ```
2149
+ *
2150
+ * @param latest - Latest value to set.
2151
+ * @param render - Whether to notify render subscribers. Defaults to `true`
2152
+ *
2153
+ * @public
2154
+ */
2155
+ set(t, n = !0) {
2156
+ !n || !this.passiveEffect ? this.updateAndNotify(t, n) : this.passiveEffect(t, this.updateAndNotify);
2157
+ }
2158
+ setWithVelocity(t, n, s) {
2159
+ this.set(n), this.prev = void 0, this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt - s;
2160
+ }
2161
+ /**
2162
+ * Set the state of the `MotionValue`, stopping any active animations,
2163
+ * effects, and resets velocity to `0`.
2164
+ */
2165
+ jump(t, n = !0) {
2166
+ this.updateAndNotify(t), this.prev = t, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
2167
+ }
2168
+ dirty() {
2169
+ var t;
2170
+ (t = this.events.change) == null || t.notify(this.current);
2171
+ }
2172
+ addDependent(t) {
2173
+ this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(t);
2174
+ }
2175
+ removeDependent(t) {
2176
+ this.dependents && this.dependents.delete(t);
2177
+ }
2178
+ /**
2179
+ * Returns the latest state of `MotionValue`
2180
+ *
2181
+ * @returns - The latest state of `MotionValue`
2182
+ *
2183
+ * @public
2184
+ */
2185
+ get() {
2186
+ return this.current;
2187
+ }
2188
+ /**
2189
+ * @public
2190
+ */
2191
+ getPrevious() {
2192
+ return this.prev;
2193
+ }
2194
+ /**
2195
+ * Returns the latest velocity of `MotionValue`
2196
+ *
2197
+ * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
2198
+ *
2199
+ * @public
2200
+ */
2201
+ getVelocity() {
2202
+ const t = k.now();
2203
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > un)
2204
+ return 0;
2205
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, un);
2206
+ return kn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
2207
+ }
2208
+ /**
2209
+ * Registers a new animation to control this `MotionValue`. Only one
2210
+ * animation can drive a `MotionValue` at one time.
2211
+ *
2212
+ * ```jsx
2213
+ * value.start()
2214
+ * ```
2215
+ *
2216
+ * @param animation - A function that starts the provided animation
2217
+ */
2218
+ start(t) {
2219
+ return this.stop(), new Promise((n) => {
2220
+ this.hasAnimated = !0, this.animation = t(n), this.events.animationStart && this.events.animationStart.notify();
2221
+ }).then(() => {
2222
+ this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
2223
+ });
2224
+ }
2225
+ /**
2226
+ * Stop the currently active animation.
2227
+ *
2228
+ * @public
2229
+ */
2230
+ stop() {
2231
+ this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
2232
+ }
2233
+ /**
2234
+ * Returns `true` if this value is currently animating.
2235
+ *
2236
+ * @public
2237
+ */
2238
+ isAnimating() {
2239
+ return !!this.animation;
2240
+ }
2241
+ clearAnimation() {
2242
+ delete this.animation;
2243
+ }
2244
+ /**
2245
+ * Destroy and clean up subscribers to this `MotionValue`.
2246
+ *
2247
+ * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
2248
+ * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
2249
+ * created a `MotionValue` via the `motionValue` function.
2250
+ *
2251
+ * @public
2252
+ */
2253
+ destroy() {
2254
+ var t, n;
2255
+ (t = this.dependents) == null || t.clear(), (n = this.events.destroy) == null || n.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
2256
+ }
2257
+ }
2258
+ function Re(e, t) {
2259
+ return new Ui(e, t);
2260
+ }
2261
+ const ys = (e, t) => t && typeof e == "number" ? t.transform(e) : e, { schedule: Hi } = /* @__PURE__ */ _n(queueMicrotask, !1), Yi = {
2262
+ y: !1
2263
+ };
2264
+ function Xi() {
2265
+ return Yi.y;
2266
+ }
2267
+ function bs(e, t) {
2268
+ const n = zi(e), s = new AbortController(), r = {
2269
+ passive: !0,
2270
+ ...t,
2271
+ signal: s.signal
2272
+ };
2273
+ return [n, r, () => s.abort()];
2274
+ }
2275
+ function dn(e) {
2276
+ return !(e.pointerType === "touch" || Xi());
2277
+ }
2278
+ function qi(e, t, n = {}) {
2279
+ const [s, r, i] = bs(e, n), o = (a) => {
2280
+ if (!dn(a))
2281
+ return;
2282
+ const { target: c } = a, u = t(c, a);
2283
+ if (typeof u != "function" || !c)
2284
+ return;
2285
+ const l = (d) => {
2286
+ dn(d) && (u(d), c.removeEventListener("pointerleave", l));
2287
+ };
2288
+ c.addEventListener("pointerleave", l, r);
2289
+ };
2290
+ return s.forEach((a) => {
2291
+ a.addEventListener("pointerenter", o, r);
2292
+ }), i;
2293
+ }
2294
+ const vs = (e, t) => t ? e === t ? !0 : vs(e, t.parentElement) : !1, Zi = (e) => e.pointerType === "mouse" ? typeof e.button != "number" || e.button <= 0 : e.isPrimary !== !1, Ji = /* @__PURE__ */ new Set([
2295
+ "BUTTON",
2296
+ "INPUT",
2297
+ "SELECT",
2298
+ "TEXTAREA",
2299
+ "A"
2300
+ ]);
2301
+ function Qi(e) {
2302
+ return Ji.has(e.tagName) || e.tabIndex !== -1;
2303
+ }
2304
+ const Me = /* @__PURE__ */ new WeakSet();
2305
+ function fn(e) {
2306
+ return (t) => {
2307
+ t.key === "Enter" && e(t);
2308
+ };
2309
+ }
2310
+ function qe(e, t) {
2311
+ e.dispatchEvent(new PointerEvent("pointer" + t, { isPrimary: !0, bubbles: !0 }));
2312
+ }
2313
+ const eo = (e, t) => {
2314
+ const n = e.currentTarget;
2315
+ if (!n)
2316
+ return;
2317
+ const s = fn(() => {
2318
+ if (Me.has(n))
2319
+ return;
2320
+ qe(n, "down");
2321
+ const r = fn(() => {
2322
+ qe(n, "up");
2323
+ }), i = () => qe(n, "cancel");
2324
+ n.addEventListener("keyup", r, t), n.addEventListener("blur", i, t);
2325
+ });
2326
+ n.addEventListener("keydown", s, t), n.addEventListener("blur", () => n.removeEventListener("keydown", s), t);
2327
+ };
2328
+ function hn(e) {
2329
+ return Zi(e) && !0;
2330
+ }
2331
+ function to(e, t, n = {}) {
2332
+ const [s, r, i] = bs(e, n), o = (a) => {
2333
+ const c = a.currentTarget;
2334
+ if (!hn(a))
2335
+ return;
2336
+ Me.add(c);
2337
+ const u = t(c, a), l = (h, m) => {
2338
+ window.removeEventListener("pointerup", d), window.removeEventListener("pointercancel", f), Me.has(c) && Me.delete(c), hn(h) && typeof u == "function" && u(h, { success: m });
2339
+ }, d = (h) => {
2340
+ l(h, c === window || c === document || n.useGlobalTarget || vs(c, h.target));
2341
+ }, f = (h) => {
2342
+ l(h, !1);
2343
+ };
2344
+ window.addEventListener("pointerup", d, r), window.addEventListener("pointercancel", f, r);
2345
+ };
2346
+ return s.forEach((a) => {
2347
+ (n.useGlobalTarget ? window : a).addEventListener("pointerdown", o, r), Rt(a) && (a.addEventListener("focus", (u) => eo(u, r)), !Qi(a) && !a.hasAttribute("tabindex") && (a.tabIndex = 0));
2348
+ }), i;
2349
+ }
2350
+ const O = (e) => !!(e && e.getVelocity), no = [...ps, R, le], so = (e) => no.find(hs(e)), Et = ie({
2351
+ transformPagePoint: (e) => e,
2352
+ isStatic: !1,
2353
+ reducedMotion: "never"
2354
+ });
2355
+ class ro extends gt.Component {
2356
+ getSnapshotBeforeUpdate(t) {
2357
+ const n = this.props.childRef.current;
2358
+ if (n && t.isPresent && !this.props.isPresent) {
2359
+ const s = n.offsetParent, r = Rt(s) && s.offsetWidth || 0, i = this.props.sizeRef.current;
2360
+ i.height = n.offsetHeight || 0, i.width = n.offsetWidth || 0, i.top = n.offsetTop, i.left = n.offsetLeft, i.right = r - i.width - i.left;
2361
+ }
2362
+ return null;
2363
+ }
2364
+ /**
2365
+ * Required with getSnapshotBeforeUpdate to stop React complaining.
2366
+ */
2367
+ componentDidUpdate() {
2368
+ }
2369
+ render() {
2370
+ return this.props.children;
2371
+ }
2372
+ }
2373
+ function io({ children: e, isPresent: t, anchorX: n }) {
2374
+ const s = Ee(), r = j(null), i = j({
2375
+ width: 0,
2376
+ height: 0,
2377
+ top: 0,
2378
+ left: 0,
2379
+ right: 0
2380
+ }), { nonce: o } = E(Et);
2381
+ return Mn(() => {
2382
+ const { width: a, height: c, top: u, left: l, right: d } = i.current;
2383
+ if (t || !r.current || !a || !c)
2384
+ return;
2385
+ const f = n === "left" ? `left: ${l}` : `right: ${d}`;
2386
+ r.current.dataset.motionPopId = s;
2387
+ const h = document.createElement("style");
2388
+ return o && (h.nonce = o), document.head.appendChild(h), h.sheet && h.sheet.insertRule(`
2389
+ [data-motion-pop-id="${s}"] {
2390
+ position: absolute !important;
2391
+ width: ${a}px !important;
2392
+ height: ${c}px !important;
2393
+ ${f}px !important;
2394
+ top: ${u}px !important;
2395
+ }
2396
+ `), () => {
2397
+ document.head.contains(h) && document.head.removeChild(h);
2398
+ };
2399
+ }, [t]), P.jsx(ro, { isPresent: t, childRef: r, sizeRef: i, children: gt.cloneElement(e, { ref: r }) });
2400
+ }
2401
+ const oo = ({ children: e, initial: t, isPresent: n, onExitComplete: s, custom: r, presenceAffectsLayout: i, mode: o, anchorX: a }) => {
2402
+ const c = yt(ao), u = Ee();
2403
+ let l = !0, d = W(() => (l = !1, {
2404
+ id: u,
2405
+ initial: t,
2406
+ isPresent: n,
2407
+ custom: r,
2408
+ onExitComplete: (f) => {
2409
+ c.set(f, !0);
2410
+ for (const h of c.values())
2411
+ if (!h)
2412
+ return;
2413
+ s && s();
2414
+ },
2415
+ register: (f) => (c.set(f, !1), () => c.delete(f))
2416
+ }), [n, c, s]);
2417
+ return i && l && (d = { ...d }), W(() => {
2418
+ c.forEach((f, h) => c.set(h, !1));
2419
+ }, [n]), gt.useEffect(() => {
2420
+ !n && !c.size && s && s();
2421
+ }, [n]), o === "popLayout" && (e = P.jsx(io, { isPresent: n, anchorX: a, children: e })), P.jsx(Ne.Provider, { value: d, children: e });
2422
+ };
2423
+ function ao() {
2424
+ return /* @__PURE__ */ new Map();
2425
+ }
2426
+ function lo(e = !0) {
2427
+ const t = E(Ne);
2428
+ if (t === null)
2429
+ return [!0, null];
2430
+ const { isPresent: n, onExitComplete: s, register: r } = t, i = Ee();
2431
+ ke(() => {
2432
+ if (e)
2433
+ return r(i);
2434
+ }, [e]);
2435
+ const o = se(() => e && s && s(i), [i, s, e]);
2436
+ return !n && s ? [!1, o] : [!0];
2437
+ }
2438
+ const Se = (e) => e.key || "";
2439
+ function pn(e) {
2440
+ const t = [];
2441
+ return zs.forEach(e, (n) => {
2442
+ An(n) && t.push(n);
2443
+ }), t;
2444
+ }
2445
+ const co = ({ children: e, custom: t, initial: n = !0, onExitComplete: s, presenceAffectsLayout: r = !0, mode: i = "sync", propagate: o = !1, anchorX: a = "left" }) => {
2446
+ const [c, u] = lo(o), l = W(() => pn(e), [e]), d = o && !c ? [] : l.map(Se), f = j(!0), h = j(l), m = yt(() => /* @__PURE__ */ new Map()), [v, x] = Ce(l), [p, S] = Ce(l);
2447
+ In(() => {
2448
+ f.current = !1, h.current = l;
2449
+ for (let g = 0; g < p.length; g++) {
2450
+ const w = Se(p[g]);
2451
+ d.includes(w) ? m.delete(w) : m.get(w) !== !0 && m.set(w, !1);
2452
+ }
2453
+ }, [p, d.length, d.join("-")]);
2454
+ const y = [];
2455
+ if (l !== v) {
2456
+ let g = [...l];
2457
+ for (let w = 0; w < p.length; w++) {
2458
+ const M = p[w], T = Se(M);
2459
+ d.includes(T) || (g.splice(w, 0, M), y.push(M));
2460
+ }
2461
+ return i === "wait" && y.length && (g = y), S(pn(g)), x(l), null;
2462
+ }
2463
+ process.env.NODE_ENV !== "production" && i === "wait" && p.length > 1;
2464
+ const { forceRender: A } = E(Fn);
2465
+ return P.jsx(P.Fragment, { children: p.map((g) => {
2466
+ const w = Se(g), M = o && !c ? !1 : l === p || d.includes(w), T = () => {
2467
+ if (m.has(w))
2468
+ m.set(w, !0);
2469
+ else
2470
+ return;
2471
+ let F = !0;
2472
+ m.forEach((D) => {
2473
+ D || (F = !1);
2474
+ }), F && (A == null || A(), S(h.current), o && (u == null || u()), s && s());
2475
+ };
2476
+ return P.jsx(oo, { isPresent: M, initial: !f.current || n ? void 0 : !1, custom: t, presenceAffectsLayout: r, mode: i, onExitComplete: M ? void 0 : T, anchorX: a, children: g }, w);
2477
+ }) });
2478
+ }, kt = ie({ strict: !1 }), mn = {
2479
+ animation: [
2480
+ "animate",
2481
+ "variants",
2482
+ "whileHover",
2483
+ "whileTap",
2484
+ "exit",
2485
+ "whileInView",
2486
+ "whileFocus",
2487
+ "whileDrag"
2488
+ ],
2489
+ exit: ["exit"],
2490
+ drag: ["drag", "dragControls"],
2491
+ focus: ["whileFocus"],
2492
+ hover: ["whileHover", "onHoverStart", "onHoverEnd"],
2493
+ tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
2494
+ pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
2495
+ inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
2496
+ layout: ["layout", "layoutId"]
2497
+ }, re = {};
2498
+ for (const e in mn)
2499
+ re[e] = {
2500
+ isEnabled: (t) => mn[e].some((n) => !!t[n])
2501
+ };
2502
+ function gn(e) {
2503
+ for (const t in e)
2504
+ re[t] = {
2505
+ ...re[t],
2506
+ ...e[t]
2507
+ };
2508
+ }
2509
+ function uo({ children: e, features: t, strict: n = !1 }) {
2510
+ const [, s] = Ce(!Ze(t)), r = j(void 0);
2511
+ if (!Ze(t)) {
2512
+ const { renderer: i, ...o } = t;
2513
+ r.current = i, gn(o);
2514
+ }
2515
+ return ke(() => {
2516
+ Ze(t) && t().then(({ renderer: i, ...o }) => {
2517
+ gn(o), r.current = i, s(!0);
2518
+ });
2519
+ }, []), P.jsx(kt.Provider, { value: { renderer: r.current, strict: n }, children: e });
2520
+ }
2521
+ function Ze(e) {
2522
+ return typeof e == "function";
2523
+ }
2524
+ const fo = /* @__PURE__ */ new Set([
2525
+ "animate",
2526
+ "exit",
2527
+ "variants",
2528
+ "initial",
2529
+ "style",
2530
+ "values",
2531
+ "variants",
2532
+ "transition",
2533
+ "transformTemplate",
2534
+ "custom",
2535
+ "inherit",
2536
+ "onBeforeLayoutMeasure",
2537
+ "onAnimationStart",
2538
+ "onAnimationComplete",
2539
+ "onUpdate",
2540
+ "onDragStart",
2541
+ "onDrag",
2542
+ "onDragEnd",
2543
+ "onMeasureDragConstraints",
2544
+ "onDirectionLock",
2545
+ "onDragTransitionEnd",
2546
+ "_dragX",
2547
+ "_dragY",
2548
+ "onHoverStart",
2549
+ "onHoverEnd",
2550
+ "onViewportEnter",
2551
+ "onViewportLeave",
2552
+ "globalTapTarget",
2553
+ "ignoreStrict",
2554
+ "viewport"
2555
+ ]);
2556
+ function Oe(e) {
2557
+ return e.startsWith("while") || e.startsWith("drag") && e !== "draggable" || e.startsWith("layout") || e.startsWith("onTap") || e.startsWith("onPan") || e.startsWith("onLayout") || fo.has(e);
2558
+ }
2559
+ let ws = (e) => !Oe(e);
2560
+ function ho(e) {
2561
+ e && (ws = (t) => t.startsWith("on") ? !Oe(t) : e(t));
2562
+ }
2563
+ try {
2564
+ ho(require("@emotion/is-prop-valid").default);
2565
+ } catch {
2566
+ }
2567
+ function po(e, t, n) {
2568
+ const s = {};
2569
+ for (const r in e)
2570
+ r === "values" && typeof e.values == "object" || (ws(r) || n === !0 && Oe(r) || !t && !Oe(r) || // If trying to use native HTML drag events, forward drag listeners
2571
+ e.draggable && r.startsWith("onDrag")) && (s[r] = e[r]);
2572
+ return s;
2573
+ }
2574
+ function mo(e) {
2575
+ if (typeof Proxy > "u")
2576
+ return e;
2577
+ const t = /* @__PURE__ */ new Map(), n = (...s) => (process.env.NODE_ENV !== "production" && wt(!1, "motion() is deprecated. Use motion.create() instead."), e(...s));
2578
+ return new Proxy(n, {
2579
+ /**
2580
+ * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
2581
+ * The prop name is passed through as `key` and we can use that to generate a `motion`
2582
+ * DOM component with that name.
2583
+ */
2584
+ get: (s, r) => r === "create" ? e : (t.has(r) || t.set(r, e(r)), t.get(r))
2585
+ });
2586
+ }
2587
+ const Ke = /* @__PURE__ */ ie({});
2588
+ function je(e) {
2589
+ return e !== null && typeof e == "object" && typeof e.start == "function";
2590
+ }
2591
+ function ge(e) {
2592
+ return typeof e == "string" || Array.isArray(e);
2593
+ }
2594
+ const Nt = [
2595
+ "animate",
2596
+ "whileInView",
2597
+ "whileFocus",
2598
+ "whileHover",
2599
+ "whileTap",
2600
+ "whileDrag",
2601
+ "exit"
2602
+ ], Lt = ["initial", ...Nt];
2603
+ function $e(e) {
2604
+ return je(e.animate) || Lt.some((t) => ge(e[t]));
2605
+ }
2606
+ function Ts(e) {
2607
+ return !!($e(e) || e.variants);
2608
+ }
2609
+ function go(e, t) {
2610
+ if ($e(e)) {
2611
+ const { initial: n, animate: s } = e;
2612
+ return {
2613
+ initial: n === !1 || ge(n) ? n : void 0,
2614
+ animate: ge(s) ? s : void 0
2615
+ };
2616
+ }
2617
+ return e.inherit !== !1 ? t : {};
2618
+ }
2619
+ function yo(e) {
2620
+ const { initial: t, animate: n } = go(e, E(Ke));
2621
+ return W(() => ({ initial: t, animate: n }), [yn(t), yn(n)]);
2622
+ }
2623
+ function yn(e) {
2624
+ return Array.isArray(e) ? e.join(" ") : e;
2625
+ }
2626
+ const bo = Symbol.for("motionComponentSymbol");
2627
+ function xs(e) {
2628
+ return e && typeof e == "object" && Object.prototype.hasOwnProperty.call(e, "current");
2629
+ }
2630
+ function vo(e, t, n) {
2631
+ return se(
2632
+ (s) => {
2633
+ s && e.onMount && e.onMount(s), t && (s ? t.mount(s) : t.unmount()), n && (typeof n == "function" ? n(s) : xs(n) && (n.current = s));
2634
+ },
2635
+ /**
2636
+ * Only pass a new ref callback to React if we've received a visual element
2637
+ * factory. Otherwise we'll be mounting/remounting every time externalRef
2638
+ * or other dependencies change.
2639
+ */
2640
+ [t]
2641
+ );
2642
+ }
2643
+ const Bt = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), wo = "framerAppearId", Vs = "data-" + Bt(wo), To = ie({});
2644
+ function xo(e, t, n, s, r) {
2645
+ var v, x;
2646
+ const { visualElement: i } = E(Ke), o = E(kt), a = E(Ne), c = E(Et).reducedMotion, u = j(null);
2647
+ s = s || o.renderer, !u.current && s && (u.current = s(e, {
2648
+ visualState: t,
2649
+ parent: i,
2650
+ props: n,
2651
+ presenceContext: a,
2652
+ blockInitialAnimation: a ? a.initial === !1 : !1,
2653
+ reducedMotionConfig: c
2654
+ }));
2655
+ const l = u.current, d = E(To);
2656
+ l && !l.projection && r && (l.type === "html" || l.type === "svg") && Vo(u.current, n, r, d);
2657
+ const f = j(!1);
2658
+ Mn(() => {
2659
+ l && f.current && l.update(n, a);
2660
+ });
2661
+ const h = n[Vs], m = j(!!h && !((v = window.MotionHandoffIsComplete) != null && v.call(window, h)) && ((x = window.MotionHasOptimisedAnimation) == null ? void 0 : x.call(window, h)));
2662
+ return In(() => {
2663
+ l && (f.current = !0, window.MotionIsMounted = !0, l.updateFeatures(), Hi.render(l.render), m.current && l.animationState && l.animationState.animateChanges());
2664
+ }), ke(() => {
2665
+ l && (!m.current && l.animationState && l.animationState.animateChanges(), m.current && (queueMicrotask(() => {
2666
+ var p;
2667
+ (p = window.MotionHandoffMarkAsComplete) == null || p.call(window, h);
2668
+ }), m.current = !1));
2669
+ }), l;
2670
+ }
2671
+ function Vo(e, t, n, s) {
2672
+ const { layoutId: r, layout: i, drag: o, dragConstraints: a, layoutScroll: c, layoutRoot: u, layoutCrossfade: l } = t;
2673
+ e.projection = new n(e.latestValues, t["data-framer-portal-id"] ? void 0 : Ss(e.parent)), e.projection.setOptions({
2674
+ layoutId: r,
2675
+ layout: i,
2676
+ alwaysMeasureLayout: !!o || a && xs(a),
2677
+ visualElement: e,
2678
+ /**
2679
+ * TODO: Update options in an effect. This could be tricky as it'll be too late
2680
+ * to update by the time layout animations run.
2681
+ * We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
2682
+ * ensuring it gets called if there's no potential layout animations.
2683
+ *
2684
+ */
2685
+ animationType: typeof i == "string" ? i : "both",
2686
+ initialPromotionConfig: s,
2687
+ crossfade: l,
2688
+ layoutScroll: c,
2689
+ layoutRoot: u
2690
+ });
2691
+ }
2692
+ function Ss(e) {
2693
+ if (e)
2694
+ return e.options.allowProjection !== !1 ? e.projection : Ss(e.parent);
2695
+ }
2696
+ function So({ preloadedFeatures: e, createVisualElement: t, useRender: n, useVisualState: s, Component: r }) {
2697
+ function i(a, c) {
2698
+ let u;
2699
+ const l = {
2700
+ ...E(Et),
2701
+ ...a,
2702
+ layoutId: Ao(a)
2703
+ }, { isStatic: d } = l, f = yo(a), h = s(a, d);
2704
+ if (!d && bt) {
2705
+ Mo(l, e);
2706
+ const m = Co(l);
2707
+ u = m.MeasureLayout, f.visualElement = xo(r, h, l, t, m.ProjectionNode);
2708
+ }
2709
+ return P.jsxs(Ke.Provider, { value: f, children: [u && f.visualElement ? P.jsx(u, { visualElement: f.visualElement, ...l }) : null, n(r, a, vo(h, f.visualElement, c), h, d, f.visualElement)] });
2710
+ }
2711
+ i.displayName = `motion.${typeof r == "string" ? r : `create(${r.displayName ?? r.name ?? ""})`}`;
2712
+ const o = Cn(i);
2713
+ return o[bo] = r, o;
2714
+ }
2715
+ function Ao({ layoutId: e }) {
2716
+ const t = E(Fn).id;
2717
+ return t && e !== void 0 ? t + "-" + e : e;
2718
+ }
2719
+ function Mo(e, t) {
2720
+ E(kt).strict, process.env.NODE_ENV;
2721
+ }
2722
+ function Co(e) {
2723
+ const { drag: t, layout: n } = re;
2724
+ if (!t && !n)
2725
+ return {};
2726
+ const s = { ...t, ...n };
2727
+ return {
2728
+ MeasureLayout: t != null && t.isEnabled(e) || n != null && n.isEnabled(e) ? s.MeasureLayout : void 0,
2729
+ ProjectionNode: s.ProjectionNode
2730
+ };
2731
+ }
2732
+ const Po = {};
2733
+ function As(e, { layout: t, layoutId: n }) {
2734
+ return ue.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!Po[e] || e === "opacity");
2735
+ }
2736
+ const Fo = {
2737
+ x: "translateX",
2738
+ y: "translateY",
2739
+ z: "translateZ",
2740
+ transformPerspective: "perspective"
2741
+ }, Io = ce.length;
2742
+ function Do(e, t, n) {
2743
+ let s = "", r = !0;
2744
+ for (let i = 0; i < Io; i++) {
2745
+ const o = ce[i], a = e[o];
2746
+ if (a === void 0)
2747
+ continue;
2748
+ let c = !0;
2749
+ if (typeof a == "number" ? c = a === (o.startsWith("scale") ? 1 : 0) : c = parseFloat(a) === 0, !c || n) {
2750
+ const u = ys(a, Ot[o]);
2751
+ if (!c) {
2752
+ r = !1;
2753
+ const l = Fo[o] || o;
2754
+ s += `${l}(${u}) `;
2755
+ }
2756
+ n && (t[o] = u);
2757
+ }
2758
+ }
2759
+ return s = s.trim(), n ? s = n(t, r ? "" : s) : r && (s = "none"), s;
2760
+ }
2761
+ function Kt(e, t, n) {
2762
+ const { style: s, vars: r, transformOrigin: i } = e;
2763
+ let o = !1, a = !1;
2764
+ for (const c in t) {
2765
+ const u = t[c];
2766
+ if (ue.has(c)) {
2767
+ o = !0;
2768
+ continue;
2769
+ } else if (Hn(c)) {
2770
+ r[c] = u;
2771
+ continue;
2772
+ } else {
2773
+ const l = ys(u, Ot[c]);
2774
+ c.startsWith("origin") ? (a = !0, i[c] = l) : s[c] = l;
2775
+ }
2776
+ }
2777
+ if (t.transform || (o || n ? s.transform = Do(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
2778
+ const { originX: c = "50%", originY: u = "50%", originZ: l = 0 } = i;
2779
+ s.transformOrigin = `${c} ${u} ${l}`;
2780
+ }
2781
+ }
2782
+ const jt = () => ({
2783
+ style: {},
2784
+ transform: {},
2785
+ transformOrigin: {},
2786
+ vars: {}
2787
+ });
2788
+ function Ms(e, t, n) {
2789
+ for (const s in t)
2790
+ !O(t[s]) && !As(s, n) && (e[s] = t[s]);
2791
+ }
2792
+ function Ro({ transformTemplate: e }, t) {
2793
+ return W(() => {
2794
+ const n = jt();
2795
+ return Kt(n, t, e), Object.assign({}, n.vars, n.style);
2796
+ }, [t]);
2797
+ }
2798
+ function Oo(e, t) {
2799
+ const n = e.style || {}, s = {};
2800
+ return Ms(s, n, e), Object.assign(s, Ro(e, t)), s;
2801
+ }
2802
+ function Eo(e, t) {
2803
+ const n = {}, s = Oo(e, t);
2804
+ return e.drag && e.dragListener !== !1 && (n.draggable = !1, s.userSelect = s.WebkitUserSelect = s.WebkitTouchCallout = "none", s.touchAction = e.drag === !0 ? "none" : `pan-${e.drag === "x" ? "y" : "x"}`), e.tabIndex === void 0 && (e.onTap || e.onTapStart || e.whileTap) && (n.tabIndex = 0), n.style = s, n;
2805
+ }
2806
+ const ko = {
2807
+ offset: "stroke-dashoffset",
2808
+ array: "stroke-dasharray"
2809
+ }, No = {
2810
+ offset: "strokeDashoffset",
2811
+ array: "strokeDasharray"
2812
+ };
2813
+ function Lo(e, t, n = 1, s = 0, r = !0) {
2814
+ e.pathLength = 1;
2815
+ const i = r ? ko : No;
2816
+ e[i.offset] = b.transform(-s);
2817
+ const o = b.transform(t), a = b.transform(n);
2818
+ e[i.array] = `${o} ${a}`;
2819
+ }
2820
+ function Cs(e, {
2821
+ attrX: t,
2822
+ attrY: n,
2823
+ attrScale: s,
2824
+ pathLength: r,
2825
+ pathSpacing: i = 1,
2826
+ pathOffset: o = 0,
2827
+ // This is object creation, which we try to avoid per-frame.
2828
+ ...a
2829
+ }, c, u, l) {
2830
+ if (Kt(e, a, u), c) {
2831
+ e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
2832
+ return;
2833
+ }
2834
+ e.attrs = e.style, e.style = {};
2835
+ const { attrs: d, style: f } = e;
2836
+ d.transform && (f.transform = d.transform, delete d.transform), (f.transform || d.transformOrigin) && (f.transformOrigin = d.transformOrigin ?? "50% 50%", delete d.transformOrigin), f.transform && (f.transformBox = (l == null ? void 0 : l.transformBox) ?? "fill-box", delete d.transformBox), t !== void 0 && (d.x = t), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), r !== void 0 && Lo(d, r, i, o, !1);
2837
+ }
2838
+ const Ps = () => ({
2839
+ ...jt(),
2840
+ attrs: {}
2841
+ }), Fs = (e) => typeof e == "string" && e.toLowerCase() === "svg";
2842
+ function Bo(e, t, n, s) {
2843
+ const r = W(() => {
2844
+ const i = Ps();
2845
+ return Cs(i, t, Fs(s), e.transformTemplate, e.style), {
2846
+ ...i.attrs,
2847
+ style: { ...i.style }
2848
+ };
2849
+ }, [t]);
2850
+ if (e.style) {
2851
+ const i = {};
2852
+ Ms(i, e.style, e), r.style = { ...i, ...r.style };
2853
+ }
2854
+ return r;
2855
+ }
2856
+ const Ko = [
2857
+ "animate",
2858
+ "circle",
2859
+ "defs",
2860
+ "desc",
2861
+ "ellipse",
2862
+ "g",
2863
+ "image",
2864
+ "line",
2865
+ "filter",
2866
+ "marker",
2867
+ "mask",
2868
+ "metadata",
2869
+ "path",
2870
+ "pattern",
2871
+ "polygon",
2872
+ "polyline",
2873
+ "rect",
2874
+ "stop",
2875
+ "switch",
2876
+ "symbol",
2877
+ "svg",
2878
+ "text",
2879
+ "tspan",
2880
+ "use",
2881
+ "view"
2882
+ ];
2883
+ function $t(e) {
2884
+ return (
2885
+ /**
2886
+ * If it's not a string, it's a custom React component. Currently we only support
2887
+ * HTML custom React components.
2888
+ */
2889
+ typeof e != "string" || /**
2890
+ * If it contains a dash, the element is a custom HTML webcomponent.
2891
+ */
2892
+ e.includes("-") ? !1 : (
2893
+ /**
2894
+ * If it's in our list of lowercase SVG tags, it's an SVG component
2895
+ */
2896
+ !!(Ko.indexOf(e) > -1 || /**
2897
+ * If it contains a capital letter, it's an SVG component
2898
+ */
2899
+ /[A-Z]/u.test(e))
2900
+ )
2901
+ );
2902
+ }
2903
+ function jo(e = !1) {
2904
+ return (n, s, r, { latestValues: i }, o) => {
2905
+ const c = ($t(n) ? Bo : Eo)(s, i, o, n), u = po(s, typeof n == "string", e), l = n !== Pn ? { ...u, ...c, ref: r } : {}, { children: d } = s, f = W(() => O(d) ? d.get() : d, [d]);
2906
+ return _s(n, {
2907
+ ...l,
2908
+ children: f
2909
+ });
2910
+ };
2911
+ }
2912
+ function bn(e) {
2913
+ const t = [{}, {}];
2914
+ return e == null || e.values.forEach((n, s) => {
2915
+ t[0][s] = n.get(), t[1][s] = n.getVelocity();
2916
+ }), t;
2917
+ }
2918
+ function Wt(e, t, n, s) {
2919
+ if (typeof t == "function") {
2920
+ const [r, i] = bn(s);
2921
+ t = t(n !== void 0 ? n : e.custom, r, i);
2922
+ }
2923
+ if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
2924
+ const [r, i] = bn(s);
2925
+ t = t(n !== void 0 ? n : e.custom, r, i);
2926
+ }
2927
+ return t;
2928
+ }
2929
+ function $o(e) {
2930
+ return O(e) ? e.get() : e;
2931
+ }
2932
+ function Wo({ scrapeMotionValuesFromProps: e, createRenderState: t }, n, s, r) {
2933
+ return {
2934
+ latestValues: Go(n, s, r, e),
2935
+ renderState: t()
2936
+ };
2937
+ }
2938
+ const Is = (e) => (t, n) => {
2939
+ const s = E(Ke), r = E(Ne), i = () => Wo(e, t, s, r);
2940
+ return n ? i() : yt(i);
2941
+ };
2942
+ function Go(e, t, n, s) {
2943
+ const r = {}, i = s(e, {});
2944
+ for (const f in i)
2945
+ r[f] = $o(i[f]);
2946
+ let { initial: o, animate: a } = e;
2947
+ const c = $e(e), u = Ts(e);
2948
+ t && u && !c && e.inherit !== !1 && (o === void 0 && (o = t.initial), a === void 0 && (a = t.animate));
2949
+ let l = n ? n.initial === !1 : !1;
2950
+ l = l || o === !1;
2951
+ const d = l ? a : o;
2952
+ if (d && typeof d != "boolean" && !je(d)) {
2953
+ const f = Array.isArray(d) ? d : [d];
2954
+ for (let h = 0; h < f.length; h++) {
2955
+ const m = Wt(e, f[h]);
2956
+ if (m) {
2957
+ const { transitionEnd: v, transition: x, ...p } = m;
2958
+ for (const S in p) {
2959
+ let y = p[S];
2960
+ if (Array.isArray(y)) {
2961
+ const A = l ? y.length - 1 : 0;
2962
+ y = y[A];
2963
+ }
2964
+ y !== null && (r[S] = y);
2965
+ }
2966
+ for (const S in v)
2967
+ r[S] = v[S];
2968
+ }
2969
+ }
2970
+ }
2971
+ return r;
2972
+ }
2973
+ function Gt(e, t, n) {
2974
+ var i;
2975
+ const { style: s } = e, r = {};
2976
+ for (const o in s)
2977
+ (O(s[o]) || t.style && O(t.style[o]) || As(o, e) || ((i = n == null ? void 0 : n.getValue(o)) == null ? void 0 : i.liveStyle) !== void 0) && (r[o] = s[o]);
2978
+ return r;
2979
+ }
2980
+ const zo = {
2981
+ useVisualState: Is({
2982
+ scrapeMotionValuesFromProps: Gt,
2983
+ createRenderState: jt
2984
+ })
2985
+ };
2986
+ function Ds(e, t, n) {
2987
+ const s = Gt(e, t, n);
2988
+ for (const r in e)
2989
+ if (O(e[r]) || O(t[r])) {
2990
+ const i = ce.indexOf(r) !== -1 ? "attr" + r.charAt(0).toUpperCase() + r.substring(1) : r;
2991
+ s[i] = e[r];
2992
+ }
2993
+ return s;
2994
+ }
2995
+ const _o = {
2996
+ useVisualState: Is({
2997
+ scrapeMotionValuesFromProps: Ds,
2998
+ createRenderState: Ps
2999
+ })
3000
+ };
3001
+ function Uo(e, t) {
3002
+ return function(s, { forwardMotionProps: r } = { forwardMotionProps: !1 }) {
3003
+ const o = {
3004
+ ...$t(s) ? _o : zo,
3005
+ preloadedFeatures: e,
3006
+ useRender: jo(r),
3007
+ createVisualElement: t,
3008
+ Component: s
3009
+ };
3010
+ return So(o);
3011
+ };
3012
+ }
3013
+ const Ho = /* @__PURE__ */ Uo(), Yo = /* @__PURE__ */ mo(Ho);
3014
+ function ye(e, t, n) {
3015
+ const s = e.getProps();
3016
+ return Wt(s, t, n !== void 0 ? n : s.custom, e);
3017
+ }
3018
+ const ft = (e) => Array.isArray(e);
3019
+ function Xo(e, t, n) {
3020
+ e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, Re(n));
3021
+ }
3022
+ function qo(e) {
3023
+ return ft(e) ? e[e.length - 1] || 0 : e;
3024
+ }
3025
+ function Zo(e, t) {
3026
+ const n = ye(e, t);
3027
+ let { transitionEnd: s = {}, transition: r = {}, ...i } = n || {};
3028
+ i = { ...i, ...s };
3029
+ for (const o in i) {
3030
+ const a = qo(i[o]);
3031
+ Xo(e, o, a);
3032
+ }
3033
+ }
3034
+ function Jo(e) {
3035
+ return !!(O(e) && e.add);
3036
+ }
3037
+ function Qo(e, t) {
3038
+ const n = e.getValue("willChange");
3039
+ if (Jo(n))
3040
+ return n.add(t);
3041
+ if (!n && G.WillChange) {
3042
+ const s = new G.WillChange("auto");
3043
+ e.addValue("willChange", s), s.add(t);
3044
+ }
3045
+ }
3046
+ function ea(e) {
3047
+ return e.props[Vs];
3048
+ }
3049
+ const ta = (e) => e !== null;
3050
+ function na(e, { repeat: t, repeatType: n = "loop" }, s) {
3051
+ const r = e.filter(ta), i = t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
3052
+ return r[i];
3053
+ }
3054
+ const sa = {
3055
+ type: "spring",
3056
+ stiffness: 500,
3057
+ damping: 25,
3058
+ restSpeed: 10
3059
+ }, ra = (e) => ({
3060
+ type: "spring",
3061
+ stiffness: 550,
3062
+ damping: e === 0 ? 2 * Math.sqrt(550) : 30,
3063
+ restSpeed: 10
3064
+ }), ia = {
3065
+ type: "keyframes",
3066
+ duration: 0.8
3067
+ }, oa = {
3068
+ type: "keyframes",
3069
+ ease: [0.25, 0.1, 0.35, 1],
3070
+ duration: 0.3
3071
+ }, aa = (e, { keyframes: t }) => t.length > 2 ? ia : ue.has(e) ? e.startsWith("scale") ? ra(t[1]) : sa : oa;
3072
+ function la({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: r, repeat: i, repeatType: o, repeatDelay: a, from: c, elapsed: u, ...l }) {
3073
+ return !!Object.keys(l).length;
3074
+ }
3075
+ const ca = (e, t, n, s = {}, r, i) => (o) => {
3076
+ const a = ds(s, e) || {}, c = a.delay || s.delay || 0;
3077
+ let { elapsed: u = 0 } = s;
3078
+ u = u - /* @__PURE__ */ B(c);
3079
+ const l = {
3080
+ keyframes: Array.isArray(n) ? n : [null, n],
3081
+ ease: "easeOut",
3082
+ velocity: t.getVelocity(),
3083
+ ...a,
3084
+ delay: -u,
3085
+ onUpdate: (f) => {
3086
+ t.set(f), a.onUpdate && a.onUpdate(f);
3087
+ },
3088
+ onComplete: () => {
3089
+ o(), a.onComplete && a.onComplete();
3090
+ },
3091
+ name: e,
3092
+ motionValue: t,
3093
+ element: i ? void 0 : r
3094
+ };
3095
+ la(a) || Object.assign(l, aa(e, l)), l.duration && (l.duration = /* @__PURE__ */ B(l.duration)), l.repeatDelay && (l.repeatDelay = /* @__PURE__ */ B(l.repeatDelay)), l.from !== void 0 && (l.keyframes[0] = l.from);
3096
+ let d = !1;
3097
+ if ((l.type === !1 || l.duration === 0 && !l.repeatDelay) && (l.duration = 0, l.delay === 0 && (d = !0)), (G.instantAnimations || G.skipAnimations) && (d = !0, l.duration = 0, l.delay = 0), l.allowFlatten = !a.type && !a.ease, d && !i && t.get() !== void 0) {
3098
+ const f = na(l.keyframes, a);
3099
+ if (f !== void 0) {
3100
+ L.update(() => {
3101
+ l.onUpdate(f), l.onComplete();
3102
+ });
3103
+ return;
3104
+ }
3105
+ }
3106
+ return a.isSync ? new It(l) : new Ii(l);
3107
+ };
3108
+ function ua({ protectedKeys: e, needsAnimating: t }, n) {
3109
+ const s = e.hasOwnProperty(n) && t[n] !== !0;
3110
+ return t[n] = !1, s;
3111
+ }
3112
+ function Rs(e, t, { delay: n = 0, transitionOverride: s, type: r } = {}) {
3113
+ let { transition: i = e.getDefaultTransition(), transitionEnd: o, ...a } = t;
3114
+ s && (i = s);
3115
+ const c = [], u = r && e.animationState && e.animationState.getState()[r];
3116
+ for (const l in a) {
3117
+ const d = e.getValue(l, e.latestValues[l] ?? null), f = a[l];
3118
+ if (f === void 0 || u && ua(u, l))
3119
+ continue;
3120
+ const h = {
3121
+ delay: n,
3122
+ ...ds(i || {}, l)
3123
+ }, m = d.get();
3124
+ if (m !== void 0 && !d.isAnimating && !Array.isArray(f) && f === m && !h.velocity)
3125
+ continue;
3126
+ let v = !1;
3127
+ if (window.MotionHandoffAnimation) {
3128
+ const p = ea(e);
3129
+ if (p) {
3130
+ const S = window.MotionHandoffAnimation(p, l, L);
3131
+ S !== null && (h.startTime = S, v = !0);
3132
+ }
3133
+ }
3134
+ Qo(e, l), d.start(ca(l, d, f, e.shouldReduceMotion && fs.has(l) ? { type: !1 } : h, e, v));
3135
+ const x = d.animation;
3136
+ x && c.push(x);
3137
+ }
3138
+ return o && Promise.all(c).then(() => {
3139
+ L.update(() => {
3140
+ o && Zo(e, o);
3141
+ });
3142
+ }), c;
3143
+ }
3144
+ function ht(e, t, n = {}) {
3145
+ var c;
3146
+ const s = ye(e, t, n.type === "exit" ? (c = e.presenceContext) == null ? void 0 : c.custom : void 0);
3147
+ let { transition: r = e.getDefaultTransition() || {} } = s || {};
3148
+ n.transitionOverride && (r = n.transitionOverride);
3149
+ const i = s ? () => Promise.all(Rs(e, s, n)) : () => Promise.resolve(), o = e.variantChildren && e.variantChildren.size ? (u = 0) => {
3150
+ const { delayChildren: l = 0, staggerChildren: d, staggerDirection: f } = r;
3151
+ return da(e, t, l + u, d, f, n);
3152
+ } : () => Promise.resolve(), { when: a } = r;
3153
+ if (a) {
3154
+ const [u, l] = a === "beforeChildren" ? [i, o] : [o, i];
3155
+ return u().then(() => l());
3156
+ } else
3157
+ return Promise.all([i(), o(n.delay)]);
3158
+ }
3159
+ function da(e, t, n = 0, s = 0, r = 1, i) {
3160
+ const o = [], a = (e.variantChildren.size - 1) * s, c = r === 1 ? (u = 0) => u * s : (u = 0) => a - u * s;
3161
+ return Array.from(e.variantChildren).sort(fa).forEach((u, l) => {
3162
+ u.notify("AnimationStart", t), o.push(ht(u, t, {
3163
+ ...i,
3164
+ delay: n + c(l)
3165
+ }).then(() => u.notify("AnimationComplete", t)));
3166
+ }), Promise.all(o);
3167
+ }
3168
+ function fa(e, t) {
3169
+ return e.sortNodePosition(t);
3170
+ }
3171
+ function ha(e, t, n = {}) {
3172
+ e.notify("AnimationStart", t);
3173
+ let s;
3174
+ if (Array.isArray(t)) {
3175
+ const r = t.map((i) => ht(e, i, n));
3176
+ s = Promise.all(r);
3177
+ } else if (typeof t == "string")
3178
+ s = ht(e, t, n);
3179
+ else {
3180
+ const r = typeof t == "function" ? ye(e, t, n.custom) : t;
3181
+ s = Promise.all(Rs(e, r, n));
3182
+ }
3183
+ return s.then(() => {
3184
+ e.notify("AnimationComplete", t);
3185
+ });
3186
+ }
3187
+ function Os(e, t) {
3188
+ if (!Array.isArray(t))
3189
+ return !1;
3190
+ const n = t.length;
3191
+ if (n !== e.length)
3192
+ return !1;
3193
+ for (let s = 0; s < n; s++)
3194
+ if (t[s] !== e[s])
3195
+ return !1;
3196
+ return !0;
3197
+ }
3198
+ const pa = Lt.length;
3199
+ function Es(e) {
3200
+ if (!e)
3201
+ return;
3202
+ if (!e.isControllingVariants) {
3203
+ const n = e.parent ? Es(e.parent) || {} : {};
3204
+ return e.props.initial !== void 0 && (n.initial = e.props.initial), n;
3205
+ }
3206
+ const t = {};
3207
+ for (let n = 0; n < pa; n++) {
3208
+ const s = Lt[n], r = e.props[s];
3209
+ (ge(r) || r === !1) && (t[s] = r);
3210
+ }
3211
+ return t;
3212
+ }
3213
+ const ma = [...Nt].reverse(), ga = Nt.length;
3214
+ function ya(e) {
3215
+ return (t) => Promise.all(t.map(({ animation: n, options: s }) => ha(e, n, s)));
3216
+ }
3217
+ function ba(e) {
3218
+ let t = ya(e), n = vn(), s = !0;
3219
+ const r = (c) => (u, l) => {
3220
+ var f;
3221
+ const d = ye(e, l, c === "exit" ? (f = e.presenceContext) == null ? void 0 : f.custom : void 0);
3222
+ if (d) {
3223
+ const { transition: h, transitionEnd: m, ...v } = d;
3224
+ u = { ...u, ...v, ...m };
3225
+ }
3226
+ return u;
3227
+ };
3228
+ function i(c) {
3229
+ t = c(e);
3230
+ }
3231
+ function o(c) {
3232
+ const { props: u } = e, l = Es(e.parent) || {}, d = [], f = /* @__PURE__ */ new Set();
3233
+ let h = {}, m = 1 / 0;
3234
+ for (let x = 0; x < ga; x++) {
3235
+ const p = ma[x], S = n[p], y = u[p] !== void 0 ? u[p] : l[p], A = ge(y), g = p === c ? S.isActive : null;
3236
+ g === !1 && (m = x);
3237
+ let w = y === l[p] && y !== u[p] && A;
3238
+ if (w && s && e.manuallyAnimateOnMount && (w = !1), S.protectedKeys = { ...h }, // If it isn't active and hasn't *just* been set as inactive
3239
+ !S.isActive && g === null || // If we didn't and don't have any defined prop for this animation type
3240
+ !y && !S.prevProp || // Or if the prop doesn't define an animation
3241
+ je(y) || typeof y == "boolean")
3242
+ continue;
3243
+ const M = va(S.prevProp, y);
3244
+ let T = M || // If we're making this variant active, we want to always make it active
3245
+ p === c && S.isActive && !w && A || // If we removed a higher-priority variant (i is in reverse order)
3246
+ x > m && A, F = !1;
3247
+ const D = Array.isArray(y) ? y : [y];
3248
+ let z = D.reduce(r(p), {});
3249
+ g === !1 && (z = {});
3250
+ const { prevResolvedValues: Te = {} } = S, We = {
3251
+ ...Te,
3252
+ ...z
3253
+ }, Ge = (I) => {
3254
+ T = !0, f.has(I) && (F = !0, f.delete(I)), S.needsAnimating[I] = !0;
3255
+ const K = e.getValue(I);
3256
+ K && (K.liveStyle = !1);
3257
+ };
3258
+ for (const I in We) {
3259
+ const K = z[I], _e = Te[I];
3260
+ if (h.hasOwnProperty(I))
3261
+ continue;
3262
+ let Ue = !1;
3263
+ ft(K) && ft(_e) ? Ue = !Os(K, _e) : Ue = K !== _e, Ue ? K != null ? Ge(I) : f.add(I) : K !== void 0 && f.has(I) ? Ge(I) : S.protectedKeys[I] = !0;
3264
+ }
3265
+ S.prevProp = y, S.prevResolvedValues = z, S.isActive && (h = { ...h, ...z }), s && e.blockInitialAnimation && (T = !1), T && (!(w && M) || F) && d.push(...D.map((I) => ({
3266
+ animation: I,
3267
+ options: { type: p }
3268
+ })));
3269
+ }
3270
+ if (f.size) {
3271
+ const x = {};
3272
+ if (typeof u.initial != "boolean") {
3273
+ const p = ye(e, Array.isArray(u.initial) ? u.initial[0] : u.initial);
3274
+ p && p.transition && (x.transition = p.transition);
3275
+ }
3276
+ f.forEach((p) => {
3277
+ const S = e.getBaseTarget(p), y = e.getValue(p);
3278
+ y && (y.liveStyle = !0), x[p] = S ?? null;
3279
+ }), d.push({ animation: x });
3280
+ }
3281
+ let v = !!d.length;
3282
+ return s && (u.initial === !1 || u.initial === u.animate) && !e.manuallyAnimateOnMount && (v = !1), s = !1, v ? t(d) : Promise.resolve();
3283
+ }
3284
+ function a(c, u) {
3285
+ var d;
3286
+ if (n[c].isActive === u)
3287
+ return Promise.resolve();
3288
+ (d = e.variantChildren) == null || d.forEach((f) => {
3289
+ var h;
3290
+ return (h = f.animationState) == null ? void 0 : h.setActive(c, u);
3291
+ }), n[c].isActive = u;
3292
+ const l = o(c);
3293
+ for (const f in n)
3294
+ n[f].protectedKeys = {};
3295
+ return l;
3296
+ }
3297
+ return {
3298
+ animateChanges: o,
3299
+ setActive: a,
3300
+ setAnimateFunction: i,
3301
+ getState: () => n,
3302
+ reset: () => {
3303
+ n = vn(), s = !0;
3304
+ }
3305
+ };
3306
+ }
3307
+ function va(e, t) {
3308
+ return typeof t == "string" ? t !== e : Array.isArray(t) ? !Os(t, e) : !1;
3309
+ }
3310
+ function U(e = !1) {
3311
+ return {
3312
+ isActive: e,
3313
+ protectedKeys: {},
3314
+ needsAnimating: {},
3315
+ prevResolvedValues: {}
3316
+ };
3317
+ }
3318
+ function vn() {
3319
+ return {
3320
+ animate: U(!0),
3321
+ whileInView: U(),
3322
+ whileHover: U(),
3323
+ whileTap: U(),
3324
+ whileDrag: U(),
3325
+ whileFocus: U(),
3326
+ exit: U()
3327
+ };
3328
+ }
3329
+ class de {
3330
+ constructor(t) {
3331
+ this.isMounted = !1, this.node = t;
3332
+ }
3333
+ update() {
3334
+ }
3335
+ }
3336
+ class wa extends de {
3337
+ /**
3338
+ * We dynamically generate the AnimationState manager as it contains a reference
3339
+ * to the underlying animation library. We only want to load that if we load this,
3340
+ * so people can optionally code split it out using the `m` component.
3341
+ */
3342
+ constructor(t) {
3343
+ super(t), t.animationState || (t.animationState = ba(t));
3344
+ }
3345
+ updateAnimationControlsSubscription() {
3346
+ const { animate: t } = this.node.getProps();
3347
+ je(t) && (this.unmountControls = t.subscribe(this.node));
3348
+ }
3349
+ /**
3350
+ * Subscribe any provided AnimationControls to the component's VisualElement
3351
+ */
3352
+ mount() {
3353
+ this.updateAnimationControlsSubscription();
3354
+ }
3355
+ update() {
3356
+ const { animate: t } = this.node.getProps(), { animate: n } = this.node.prevProps || {};
3357
+ t !== n && this.updateAnimationControlsSubscription();
3358
+ }
3359
+ unmount() {
3360
+ var t;
3361
+ this.node.animationState.reset(), (t = this.unmountControls) == null || t.call(this);
3362
+ }
3363
+ }
3364
+ let Ta = 0;
3365
+ class xa extends de {
3366
+ constructor() {
3367
+ super(...arguments), this.id = Ta++;
3368
+ }
3369
+ update() {
3370
+ if (!this.node.presenceContext)
3371
+ return;
3372
+ const { isPresent: t, onExitComplete: n } = this.node.presenceContext, { isPresent: s } = this.node.prevPresenceContext || {};
3373
+ if (!this.node.animationState || t === s)
3374
+ return;
3375
+ const r = this.node.animationState.setActive("exit", !t);
3376
+ n && !t && r.then(() => {
3377
+ n(this.id);
3378
+ });
3379
+ }
3380
+ mount() {
3381
+ const { register: t, onExitComplete: n } = this.node.presenceContext || {};
3382
+ n && n(this.id), t && (this.unmount = t(this.id));
3383
+ }
3384
+ unmount() {
3385
+ }
3386
+ }
3387
+ const Va = {
3388
+ animation: {
3389
+ Feature: wa
3390
+ },
3391
+ exit: {
3392
+ Feature: xa
3393
+ }
3394
+ };
3395
+ function wn(e, t, n, s = { passive: !0 }) {
3396
+ return e.addEventListener(t, n, s), () => e.removeEventListener(t, n);
3397
+ }
3398
+ function ks(e) {
3399
+ return {
3400
+ point: {
3401
+ x: e.pageX,
3402
+ y: e.pageY
3403
+ }
3404
+ };
3405
+ }
3406
+ function Sa({ top: e, left: t, right: n, bottom: s }) {
3407
+ return {
3408
+ x: { min: t, max: n },
3409
+ y: { min: e, max: s }
3410
+ };
3411
+ }
3412
+ function Aa(e, t) {
3413
+ if (!t)
3414
+ return e;
3415
+ const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
3416
+ return {
3417
+ top: n.y,
3418
+ left: n.x,
3419
+ bottom: s.y,
3420
+ right: s.x
3421
+ };
3422
+ }
3423
+ const Tn = () => ({ min: 0, max: 0 }), Ns = () => ({
3424
+ x: Tn(),
3425
+ y: Tn()
3426
+ });
3427
+ function Ma(e, t) {
3428
+ return Sa(Aa(e.getBoundingClientRect(), t));
3429
+ }
3430
+ function xn(e, t, n) {
3431
+ const { props: s } = e;
3432
+ e.animationState && s.whileHover && e.animationState.setActive("whileHover", n === "Start");
3433
+ const r = "onHover" + n, i = s[r];
3434
+ i && L.postRender(() => i(t, ks(t)));
3435
+ }
3436
+ class Ca extends de {
3437
+ mount() {
3438
+ const { current: t } = this.node;
3439
+ t && (this.unmount = qi(t, (n, s) => (xn(this.node, s, "Start"), (r) => xn(this.node, r, "End"))));
3440
+ }
3441
+ unmount() {
3442
+ }
3443
+ }
3444
+ class Pa extends de {
3445
+ constructor() {
3446
+ super(...arguments), this.isActive = !1;
3447
+ }
3448
+ onFocus() {
3449
+ let t = !1;
3450
+ try {
3451
+ t = this.node.current.matches(":focus-visible");
3452
+ } catch {
3453
+ t = !0;
3454
+ }
3455
+ !t || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !0), this.isActive = !0);
3456
+ }
3457
+ onBlur() {
3458
+ !this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
3459
+ }
3460
+ mount() {
3461
+ this.unmount = Le(wn(this.node.current, "focus", () => this.onFocus()), wn(this.node.current, "blur", () => this.onBlur()));
3462
+ }
3463
+ unmount() {
3464
+ }
3465
+ }
3466
+ function Vn(e, t, n) {
3467
+ const { props: s } = e;
3468
+ if (e.current instanceof HTMLButtonElement && e.current.disabled)
3469
+ return;
3470
+ e.animationState && s.whileTap && e.animationState.setActive("whileTap", n === "Start");
3471
+ const r = "onTap" + (n === "End" ? "" : n), i = s[r];
3472
+ i && L.postRender(() => i(t, ks(t)));
3473
+ }
3474
+ class Fa extends de {
3475
+ mount() {
3476
+ const { current: t } = this.node;
3477
+ t && (this.unmount = to(t, (n, s) => (Vn(this.node, s, "Start"), (r, { success: i }) => Vn(this.node, r, i ? "End" : "Cancel")), { useGlobalTarget: this.node.props.globalTapTarget }));
3478
+ }
3479
+ unmount() {
3480
+ }
3481
+ }
3482
+ const pt = /* @__PURE__ */ new WeakMap(), Je = /* @__PURE__ */ new WeakMap(), Ia = (e) => {
3483
+ const t = pt.get(e.target);
3484
+ t && t(e);
3485
+ }, Da = (e) => {
3486
+ e.forEach(Ia);
3487
+ };
3488
+ function Ra({ root: e, ...t }) {
3489
+ const n = e || document;
3490
+ Je.has(n) || Je.set(n, {});
3491
+ const s = Je.get(n), r = JSON.stringify(t);
3492
+ return s[r] || (s[r] = new IntersectionObserver(Da, { root: e, ...t })), s[r];
3493
+ }
3494
+ function Oa(e, t, n) {
3495
+ const s = Ra(t);
3496
+ return pt.set(e, n), s.observe(e), () => {
3497
+ pt.delete(e), s.unobserve(e);
3498
+ };
3499
+ }
3500
+ const Ea = {
3501
+ some: 0,
3502
+ all: 1
3503
+ };
3504
+ class ka extends de {
3505
+ constructor() {
3506
+ super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
3507
+ }
3508
+ startObserver() {
3509
+ this.unmount();
3510
+ const { viewport: t = {} } = this.node.getProps(), { root: n, margin: s, amount: r = "some", once: i } = t, o = {
3511
+ root: n ? n.current : void 0,
3512
+ rootMargin: s,
3513
+ threshold: typeof r == "number" ? r : Ea[r]
3514
+ }, a = (c) => {
3515
+ const { isIntersecting: u } = c;
3516
+ if (this.isInView === u || (this.isInView = u, i && !u && this.hasEnteredView))
3517
+ return;
3518
+ u && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", u);
3519
+ const { onViewportEnter: l, onViewportLeave: d } = this.node.getProps(), f = u ? l : d;
3520
+ f && f(c);
3521
+ };
3522
+ return Oa(this.node.current, o, a);
3523
+ }
3524
+ mount() {
3525
+ this.startObserver();
3526
+ }
3527
+ update() {
3528
+ if (typeof IntersectionObserver > "u")
3529
+ return;
3530
+ const { props: t, prevProps: n } = this.node;
3531
+ ["amount", "margin", "root"].some(Na(t, n)) && this.startObserver();
3532
+ }
3533
+ unmount() {
3534
+ }
3535
+ }
3536
+ function Na({ viewport: e = {} }, { viewport: t = {} } = {}) {
3537
+ return (n) => e[n] !== t[n];
3538
+ }
3539
+ const La = {
3540
+ inView: {
3541
+ Feature: ka
3542
+ },
3543
+ tap: {
3544
+ Feature: Fa
3545
+ },
3546
+ focus: {
3547
+ Feature: Pa
3548
+ },
3549
+ hover: {
3550
+ Feature: Ca
3551
+ }
3552
+ }, mt = { current: null }, Ls = { current: !1 };
3553
+ function Ba() {
3554
+ if (Ls.current = !0, !!bt)
3555
+ if (window.matchMedia) {
3556
+ const e = window.matchMedia("(prefers-reduced-motion)"), t = () => mt.current = e.matches;
3557
+ e.addListener(t), t();
3558
+ } else
3559
+ mt.current = !1;
3560
+ }
3561
+ const Ka = /* @__PURE__ */ new WeakMap();
3562
+ function ja(e, t, n) {
3563
+ for (const s in t) {
3564
+ const r = t[s], i = n[s];
3565
+ if (O(r))
3566
+ e.addValue(s, r);
3567
+ else if (O(i))
3568
+ e.addValue(s, Re(r, { owner: e }));
3569
+ else if (i !== r)
3570
+ if (e.hasValue(s)) {
3571
+ const o = e.getValue(s);
3572
+ o.liveStyle === !0 ? o.jump(r) : o.hasAnimated || o.set(r);
3573
+ } else {
3574
+ const o = e.getStaticValue(s);
3575
+ e.addValue(s, Re(o !== void 0 ? o : r, { owner: e }));
3576
+ }
3577
+ }
3578
+ for (const s in n)
3579
+ t[s] === void 0 && e.removeValue(s);
3580
+ return t;
3581
+ }
3582
+ const Sn = [
3583
+ "AnimationStart",
3584
+ "AnimationComplete",
3585
+ "Update",
3586
+ "BeforeLayoutMeasure",
3587
+ "LayoutMeasure",
3588
+ "LayoutAnimationStart",
3589
+ "LayoutAnimationComplete"
3590
+ ];
3591
+ class $a {
3592
+ /**
3593
+ * This method takes React props and returns found MotionValues. For example, HTML
3594
+ * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
3595
+ *
3596
+ * This isn't an abstract method as it needs calling in the constructor, but it is
3597
+ * intended to be one.
3598
+ */
3599
+ scrapeMotionValuesFromProps(t, n, s) {
3600
+ return {};
3601
+ }
3602
+ constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: r, blockInitialAnimation: i, visualState: o }, a = {}) {
3603
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = Dt, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
3604
+ this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
3605
+ }, this.renderScheduledAt = 0, this.scheduleRender = () => {
3606
+ const f = k.now();
3607
+ this.renderScheduledAt < f && (this.renderScheduledAt = f, L.render(this.render, !1, !0));
3608
+ };
3609
+ const { latestValues: c, renderState: u } = o;
3610
+ this.latestValues = c, this.baseTarget = { ...c }, this.initialValues = n.initial ? { ...c } : {}, this.renderState = u, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.options = a, this.blockInitialAnimation = !!i, this.isControllingVariants = $e(n), this.isVariantNode = Ts(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
3611
+ const { willChange: l, ...d } = this.scrapeMotionValuesFromProps(n, {}, this);
3612
+ for (const f in d) {
3613
+ const h = d[f];
3614
+ c[f] !== void 0 && O(h) && h.set(c[f], !1);
3615
+ }
3616
+ }
3617
+ mount(t) {
3618
+ this.current = t, Ka.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Ls.current || Ba(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : mt.current, process.env.NODE_ENV !== "production" && wt(this.shouldReduceMotion !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
3619
+ }
3620
+ unmount() {
3621
+ this.projection && this.projection.unmount(), Qe(this.notifyUpdate), Qe(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
3622
+ for (const t in this.events)
3623
+ this.events[t].clear();
3624
+ for (const t in this.features) {
3625
+ const n = this.features[t];
3626
+ n && (n.unmount(), n.isMounted = !1);
3627
+ }
3628
+ this.current = null;
3629
+ }
3630
+ bindToMotionValue(t, n) {
3631
+ this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
3632
+ const s = ue.has(t);
3633
+ s && this.onBindTransform && this.onBindTransform();
3634
+ const r = n.on("change", (a) => {
3635
+ this.latestValues[t] = a, this.props.onUpdate && L.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
3636
+ }), i = n.on("renderRequest", this.scheduleRender);
3637
+ let o;
3638
+ window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
3639
+ r(), i(), o && o(), n.owner && n.stop();
3640
+ });
3641
+ }
3642
+ sortNodePosition(t) {
3643
+ return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current);
3644
+ }
3645
+ updateFeatures() {
3646
+ let t = "animation";
3647
+ for (t in re) {
3648
+ const n = re[t];
3649
+ if (!n)
3650
+ continue;
3651
+ const { isEnabled: s, Feature: r } = n;
3652
+ if (!this.features[t] && r && s(this.props) && (this.features[t] = new r(this)), this.features[t]) {
3653
+ const i = this.features[t];
3654
+ i.isMounted ? i.update() : (i.mount(), i.isMounted = !0);
3655
+ }
3656
+ }
3657
+ }
3658
+ triggerBuild() {
3659
+ this.build(this.renderState, this.latestValues, this.props);
3660
+ }
3661
+ /**
3662
+ * Measure the current viewport box with or without transforms.
3663
+ * Only measures axis-aligned boxes, rotate and skew must be manually
3664
+ * removed with a re-render to work.
3665
+ */
3666
+ measureViewportBox() {
3667
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Ns();
3668
+ }
3669
+ getStaticValue(t) {
3670
+ return this.latestValues[t];
3671
+ }
3672
+ setStaticValue(t, n) {
3673
+ this.latestValues[t] = n;
3674
+ }
3675
+ /**
3676
+ * Update the provided props. Ensure any newly-added motion values are
3677
+ * added to our map, old ones removed, and listeners updated.
3678
+ */
3679
+ update(t, n) {
3680
+ (t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
3681
+ for (let s = 0; s < Sn.length; s++) {
3682
+ const r = Sn[s];
3683
+ this.propEventSubscriptions[r] && (this.propEventSubscriptions[r](), delete this.propEventSubscriptions[r]);
3684
+ const i = "on" + r, o = t[i];
3685
+ o && (this.propEventSubscriptions[r] = this.on(r, o));
3686
+ }
3687
+ this.prevMotionValues = ja(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
3688
+ }
3689
+ getProps() {
3690
+ return this.props;
3691
+ }
3692
+ /**
3693
+ * Returns the variant definition with a given name.
3694
+ */
3695
+ getVariant(t) {
3696
+ return this.props.variants ? this.props.variants[t] : void 0;
3697
+ }
3698
+ /**
3699
+ * Returns the defined default transition on this component.
3700
+ */
3701
+ getDefaultTransition() {
3702
+ return this.props.transition;
3703
+ }
3704
+ getTransformPagePoint() {
3705
+ return this.props.transformPagePoint;
3706
+ }
3707
+ getClosestVariantNode() {
3708
+ return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
3709
+ }
3710
+ /**
3711
+ * Add a child visual element to our set of children.
3712
+ */
3713
+ addVariantChild(t) {
3714
+ const n = this.getClosestVariantNode();
3715
+ if (n)
3716
+ return n.variantChildren && n.variantChildren.add(t), () => n.variantChildren.delete(t);
3717
+ }
3718
+ /**
3719
+ * Add a motion value and bind it to this visual element.
3720
+ */
3721
+ addValue(t, n) {
3722
+ const s = this.values.get(t);
3723
+ n !== s && (s && this.removeValue(t), this.bindToMotionValue(t, n), this.values.set(t, n), this.latestValues[t] = n.get());
3724
+ }
3725
+ /**
3726
+ * Remove a motion value and unbind any active subscriptions.
3727
+ */
3728
+ removeValue(t) {
3729
+ this.values.delete(t);
3730
+ const n = this.valueSubscriptions.get(t);
3731
+ n && (n(), this.valueSubscriptions.delete(t)), delete this.latestValues[t], this.removeValueFromRenderState(t, this.renderState);
3732
+ }
3733
+ /**
3734
+ * Check whether we have a motion value for this key
3735
+ */
3736
+ hasValue(t) {
3737
+ return this.values.has(t);
3738
+ }
3739
+ getValue(t, n) {
3740
+ if (this.props.values && this.props.values[t])
3741
+ return this.props.values[t];
3742
+ let s = this.values.get(t);
3743
+ return s === void 0 && n !== void 0 && (s = Re(n === null ? void 0 : n, { owner: this }), this.addValue(t, s)), s;
3744
+ }
3745
+ /**
3746
+ * If we're trying to animate to a previously unencountered value,
3747
+ * we need to check for it in our state and as a last resort read it
3748
+ * directly from the instance (which might have performance implications).
3749
+ */
3750
+ readValue(t, n) {
3751
+ let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
3752
+ return s != null && (typeof s == "string" && (Dn(s) || Rn(s)) ? s = parseFloat(s) : !so(s) && le.test(n) && (s = gs(t, n)), this.setBaseTarget(t, O(s) ? s.get() : s)), O(s) ? s.get() : s;
3753
+ }
3754
+ /**
3755
+ * Set the base target to later animate back to. This is currently
3756
+ * only hydrated on creation and when we first read a value.
3757
+ */
3758
+ setBaseTarget(t, n) {
3759
+ this.baseTarget[t] = n;
3760
+ }
3761
+ /**
3762
+ * Find the base target for a value thats been removed from all animation
3763
+ * props.
3764
+ */
3765
+ getBaseTarget(t) {
3766
+ var i;
3767
+ const { initial: n } = this.props;
3768
+ let s;
3769
+ if (typeof n == "string" || typeof n == "object") {
3770
+ const o = Wt(this.props, n, (i = this.presenceContext) == null ? void 0 : i.custom);
3771
+ o && (s = o[t]);
3772
+ }
3773
+ if (n && s !== void 0)
3774
+ return s;
3775
+ const r = this.getBaseTargetFromProps(this.props, t);
3776
+ return r !== void 0 && !O(r) ? r : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
3777
+ }
3778
+ on(t, n) {
3779
+ return this.events[t] || (this.events[t] = new En()), this.events[t].add(n);
3780
+ }
3781
+ notify(t, ...n) {
3782
+ this.events[t] && this.events[t].notify(...n);
3783
+ }
3784
+ }
3785
+ class Bs extends $a {
3786
+ constructor() {
3787
+ super(...arguments), this.KeyframeResolver = Gi;
3788
+ }
3789
+ sortInstanceNodePosition(t, n) {
3790
+ return t.compareDocumentPosition(n) & 2 ? 1 : -1;
3791
+ }
3792
+ getBaseTargetFromProps(t, n) {
3793
+ return t.style ? t.style[n] : void 0;
3794
+ }
3795
+ removeValueFromRenderState(t, { vars: n, style: s }) {
3796
+ delete n[t], delete s[t];
3797
+ }
3798
+ handleChildMotionValue() {
3799
+ this.childSubscription && (this.childSubscription(), delete this.childSubscription);
3800
+ const { children: t } = this.props;
3801
+ O(t) && (this.childSubscription = t.on("change", (n) => {
3802
+ this.current && (this.current.textContent = `${n}`);
3803
+ }));
3804
+ }
3805
+ }
3806
+ function Ks(e, { style: t, vars: n }, s, r) {
3807
+ Object.assign(e.style, t, r && r.getProjectionStyles(s));
3808
+ for (const i in n)
3809
+ e.style.setProperty(i, n[i]);
3810
+ }
3811
+ function Wa(e) {
3812
+ return window.getComputedStyle(e);
3813
+ }
3814
+ class Ga extends Bs {
3815
+ constructor() {
3816
+ super(...arguments), this.type = "html", this.renderInstance = Ks;
3817
+ }
3818
+ readValueFromInstance(t, n) {
3819
+ var s;
3820
+ if (ue.has(n))
3821
+ return (s = this.projection) != null && s.isProjecting ? ot(n) : ai(t, n);
3822
+ {
3823
+ const r = Wa(t), i = (Hn(n) ? r.getPropertyValue(n) : r[n]) || 0;
3824
+ return typeof i == "string" ? i.trim() : i;
3825
+ }
3826
+ }
3827
+ measureInstanceViewportBox(t, { transformPagePoint: n }) {
3828
+ return Ma(t, n);
3829
+ }
3830
+ build(t, n, s) {
3831
+ Kt(t, n, s.transformTemplate);
3832
+ }
3833
+ scrapeMotionValuesFromProps(t, n, s) {
3834
+ return Gt(t, n, s);
3835
+ }
3836
+ }
3837
+ const js = /* @__PURE__ */ new Set([
3838
+ "baseFrequency",
3839
+ "diffuseConstant",
3840
+ "kernelMatrix",
3841
+ "kernelUnitLength",
3842
+ "keySplines",
3843
+ "keyTimes",
3844
+ "limitingConeAngle",
3845
+ "markerHeight",
3846
+ "markerWidth",
3847
+ "numOctaves",
3848
+ "targetX",
3849
+ "targetY",
3850
+ "surfaceScale",
3851
+ "specularConstant",
3852
+ "specularExponent",
3853
+ "stdDeviation",
3854
+ "tableValues",
3855
+ "viewBox",
3856
+ "gradientTransform",
3857
+ "pathLength",
3858
+ "startOffset",
3859
+ "textLength",
3860
+ "lengthAdjust"
3861
+ ]);
3862
+ function za(e, t, n, s) {
3863
+ Ks(e, t, void 0, s);
3864
+ for (const r in t.attrs)
3865
+ e.setAttribute(js.has(r) ? r : Bt(r), t.attrs[r]);
3866
+ }
3867
+ class _a extends Bs {
3868
+ constructor() {
3869
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Ns;
3870
+ }
3871
+ getBaseTargetFromProps(t, n) {
3872
+ return t[n];
3873
+ }
3874
+ readValueFromInstance(t, n) {
3875
+ if (ue.has(n)) {
3876
+ const s = ms(n);
3877
+ return s && s.default || 0;
3878
+ }
3879
+ return n = js.has(n) ? n : Bt(n), t.getAttribute(n);
3880
+ }
3881
+ scrapeMotionValuesFromProps(t, n, s) {
3882
+ return Ds(t, n, s);
3883
+ }
3884
+ build(t, n, s) {
3885
+ Cs(t, n, this.isSVGTag, s.transformTemplate, s.style);
3886
+ }
3887
+ renderInstance(t, n, s, r) {
3888
+ za(t, n, s, r);
3889
+ }
3890
+ mount(t) {
3891
+ this.isSVGTag = Fs(t.tagName), super.mount(t);
3892
+ }
3893
+ }
3894
+ const Ua = (e, t) => $t(e) ? new _a(t) : new Ga(t, {
3895
+ allowProjection: e !== Pn
3896
+ }), Ha = {
3897
+ renderer: Ua,
3898
+ ...Va,
3899
+ ...La
3900
+ }, $s = (e) => {
3901
+ const { ripples: t = [], motionProps: n, color: s = "currentColor", style: r, onClear: i } = e;
3902
+ return /* @__PURE__ */ P.jsx(P.Fragment, { children: t.map((o) => {
3903
+ const a = Zs(0.01 * o.size, 0.2, o.size > 100 ? 0.75 : 0.5);
3904
+ return /* @__PURE__ */ P.jsx(uo, { features: Ha, children: /* @__PURE__ */ P.jsx(co, { mode: "popLayout", children: /* @__PURE__ */ P.jsx(
3905
+ Yo.span,
3906
+ {
3907
+ animate: { transform: "scale(2)", opacity: 0 },
3908
+ className: "ripple-item-span",
3909
+ exit: { opacity: 0 },
3910
+ initial: { transform: "scale(0)", opacity: 0.35 },
3911
+ style: {
3912
+ position: "absolute",
3913
+ backgroundColor: s,
3914
+ borderRadius: "100%",
3915
+ transformOrigin: "center",
3916
+ pointerEvents: "none",
3917
+ overflow: "hidden",
3918
+ inset: 0,
3919
+ zIndex: 0,
3920
+ top: o.y,
3921
+ left: o.x,
3922
+ width: `${o.size}px`,
3923
+ height: `${o.size}px`,
3924
+ ...r
3925
+ },
3926
+ transition: { duration: a },
3927
+ onAnimationComplete: () => {
3928
+ i(o.key);
3929
+ },
3930
+ ...n
3931
+ }
3932
+ ) }) }, o.key);
3933
+ }) });
3934
+ };
3935
+ $s.displayName = "LizaUI.Ripple";
3936
+ const Ya = () => /* @__PURE__ */ P.jsx("div", { "aria-label": "Loading", className: "relative inline-flex flex-col gap-2 items-center justify-center", children: /* @__PURE__ */ P.jsxs("div", { className: "relative flex w-5 h-5", children: [
3937
+ /* @__PURE__ */ P.jsx("i", { className: "absolute w-full h-full rounded-full border-2 border-b-current animate-spinner-ease-spin border-solid border-t-transparent border-l-transparent border-r-transparent" }),
3938
+ /* @__PURE__ */ P.jsx("i", { className: "absolute w-full h-full rounded-full border-2 border-b-current opacity-75 animate-spinner-linear-spin border-dotted border-t-transparent border-l-transparent border-r-transparent" })
3939
+ ] }) }), Xa = Cn((e, t) => {
3940
+ const {
3941
+ Component: n,
3942
+ domRef: s,
3943
+ children: r,
3944
+ isIconOnly: i,
3945
+ isLoading: o,
3946
+ spinner: a,
3947
+ spinnerPlacement: c,
3948
+ startContent: u,
3949
+ endContent: l,
3950
+ getButtonProps: d,
3951
+ getRippleProps: f
3952
+ } = tr({
3953
+ ...e,
3954
+ ref: t
3955
+ }), h = W(() => /* @__PURE__ */ P.jsx(Ya, {}), []), m = a ?? h;
3956
+ return /* @__PURE__ */ P.jsxs(n, { ...d(), ref: s, children: [
3957
+ u,
3958
+ o && c === "start" && m,
3959
+ o && i ? null : r,
3960
+ o && c === "end" && m,
3961
+ l,
3962
+ /* @__PURE__ */ P.jsx($s, { ...f() })
3963
+ ] });
3964
+ });
3965
+ Xa.displayName = "Custom.Button";
3966
+ export {
3967
+ co as A,
3968
+ Xa as B,
3969
+ Qs as b
3970
+ };
3971
+ //# sourceMappingURL=button-CPpIQ7Z7.js.map