@servicetitan/anvil2 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{Alert-ac9a1bcd.js → Alert-6c7fe683.js} +34 -31
- package/Alert-6c7fe683.js.map +1 -0
- package/Alert-d282381d.cjs +2 -0
- package/Alert-d282381d.cjs.map +1 -0
- package/Alert.cjs +1 -1
- package/Alert.js +1 -1
- package/Announcement-0d1097c0.cjs +2 -0
- package/Announcement-0d1097c0.cjs.map +1 -0
- package/{Announcement-b9468739.js → Announcement-fa1a5266.js} +34 -31
- package/Announcement-fa1a5266.js.map +1 -0
- package/Announcement.cjs +1 -1
- package/Announcement.js +1 -1
- package/{Avatar-97b575d8.js → Avatar-2bbf623d.js} +18 -18
- package/Avatar-2bbf623d.js.map +1 -0
- package/Avatar-d474138f.cjs +2 -0
- package/Avatar-d474138f.cjs.map +1 -0
- package/Avatar.cjs +1 -1
- package/Avatar.js +1 -1
- package/{Badge-dbafadd5.js → Badge-2c63f232.js} +11 -10
- package/Badge-2c63f232.js.map +1 -0
- package/Badge-a5267e61.cjs +2 -0
- package/Badge-a5267e61.cjs.map +1 -0
- package/Badge.cjs +1 -1
- package/Badge.js +1 -1
- package/{Button-dc48bb3a.js → Button-1837beaf.js} +85 -83
- package/Button-1837beaf.js.map +1 -0
- package/Button-d7338178.cjs +2 -0
- package/Button-d7338178.cjs.map +1 -0
- package/Button.cjs +1 -1
- package/Button.js +1 -1
- package/ButtonCompound.cjs +1 -1
- package/ButtonCompound.js +1 -1
- package/ButtonLink.cjs +1 -1
- package/ButtonLink.js +1 -1
- package/ButtonToggle.cjs +1 -1
- package/ButtonToggle.js +1 -1
- package/Calendar-6170a262.cjs +2 -0
- package/Calendar-6170a262.cjs.map +1 -0
- package/{Calendar-83436bb1.js → Calendar-94a2af59.js} +528 -539
- package/Calendar-94a2af59.js.map +1 -0
- package/Calendar.cjs +1 -1
- package/Calendar.js +1 -1
- package/Card-9ee8218c.cjs +2 -0
- package/Card-9ee8218c.cjs.map +1 -0
- package/Card-cc1e0def.js +52 -0
- package/Card-cc1e0def.js.map +1 -0
- package/Card.cjs +1 -1
- package/Card.d.ts +7 -1
- package/Card.js +1 -1
- package/Checkbox-49324efd.cjs +2 -0
- package/Checkbox-49324efd.cjs.map +1 -0
- package/{Checkbox-a250869f.js → Checkbox-74836b15.js} +22 -20
- package/Checkbox-74836b15.js.map +1 -0
- package/Checkbox.cjs +1 -1
- package/Checkbox.js +1 -1
- package/Chip-2c19dfc4.cjs +2 -0
- package/Chip-2c19dfc4.cjs.map +1 -0
- package/Chip-c309468f.js +71 -0
- package/Chip-c309468f.js.map +1 -0
- package/Chip.cjs +1 -1
- package/Chip.css +1 -1
- package/Chip.d.ts +1 -0
- package/Chip.js +1 -1
- package/Combobox.cjs +1 -1
- package/Combobox.js +7 -7
- package/{Details-c6f10fa4.js → Details-2730bddb.js} +47 -45
- package/Details-2730bddb.js.map +1 -0
- package/Details-fdd49b05.cjs +2 -0
- package/Details-fdd49b05.cjs.map +1 -0
- package/Details.cjs +1 -1
- package/Details.js +1 -1
- package/Dialog-2a957ffe.cjs +2 -0
- package/Dialog-2a957ffe.cjs.map +1 -0
- package/{Dialog-fd3430f5.js → Dialog-da7cf1ae.js} +56 -55
- package/Dialog-da7cf1ae.js.map +1 -0
- package/Dialog.cjs +1 -1
- package/Dialog.cjs.map +1 -1
- package/Dialog.d.ts +6 -0
- package/Dialog.js +21 -17
- package/Dialog.js.map +1 -1
- package/Divider-7ef2a224.cjs +2 -0
- package/Divider-7ef2a224.cjs.map +1 -0
- package/{Divider-394d2459.js → Divider-a686c1f1.js} +7 -6
- package/Divider-a686c1f1.js.map +1 -0
- package/Divider.cjs +1 -1
- package/Divider.d.ts +1 -1
- package/Divider.js +1 -1
- package/{Drawer-99157473.cjs → Drawer-150c1703.cjs} +2 -2
- package/{Drawer-99157473.cjs.map → Drawer-150c1703.cjs.map} +1 -1
- package/{Drawer-46932ce0.js → Drawer-de9f3da9.js} +3 -3
- package/{Drawer-46932ce0.js.map → Drawer-de9f3da9.js.map} +1 -1
- package/Drawer.cjs +1 -1
- package/Drawer.js +1 -1
- package/Flex-29c4ffce.cjs +2 -0
- package/Flex-29c4ffce.cjs.map +1 -0
- package/{Flex-12077c9d.js → Flex-9956f1b3.js} +16 -15
- package/Flex-9956f1b3.js.map +1 -0
- package/Flex.cjs +1 -1
- package/Flex.js +1 -1
- package/Grid-5fbf04d4.cjs +2 -0
- package/Grid-5fbf04d4.cjs.map +1 -0
- package/{Grid-107fc6b6.js → Grid-9c813cf7.js} +9 -8
- package/Grid-9c813cf7.js.map +1 -0
- package/Grid.cjs +1 -1
- package/Grid.js +1 -1
- package/Helper-74a1f07f-12dff0ad.js +91 -0
- package/Helper-74a1f07f-12dff0ad.js.map +1 -0
- package/Helper-74a1f07f-1bd5ec70.cjs +2 -0
- package/Helper-74a1f07f-1bd5ec70.cjs.map +1 -0
- package/{Label.css → Helper-74a1f07f.css} +1 -1
- package/Icon-38342b79.cjs +2 -0
- package/Icon-38342b79.cjs.map +1 -0
- package/Icon-4fb5288e.js +48 -0
- package/Icon-4fb5288e.js.map +1 -0
- package/Icon.cjs +2 -0
- package/Icon.cjs.map +1 -0
- package/{index-cb7af0c9.css → Icon.css} +1 -1
- package/Icon.d.ts +21 -0
- package/Icon.js +11 -0
- package/Icon.js.map +1 -0
- package/Layout.cjs +1 -1
- package/Layout.js +109 -109
- package/Link-0ee242d1.cjs +2 -0
- package/Link-0ee242d1.cjs.map +1 -0
- package/{Link-c6b4090e.js → Link-3d4ebd58.js} +20 -18
- package/Link-3d4ebd58.js.map +1 -0
- package/Link.cjs +1 -1
- package/Link.js +1 -1
- package/ListView-3f377300.cjs +2 -0
- package/ListView-3f377300.cjs.map +1 -0
- package/{ListView-e895e6a8.js → ListView-6652d49f.js} +32 -31
- package/ListView-6652d49f.js.map +1 -0
- package/ListView.cjs +1 -1
- package/ListView.js +4 -4
- package/{Listbox-39c32ced.js → Listbox-97e11191.js} +35 -33
- package/Listbox-97e11191.js.map +1 -0
- package/Listbox-b5f4e327.cjs +2 -0
- package/Listbox-b5f4e327.cjs.map +1 -0
- package/Listbox.cjs +1 -1
- package/Listbox.js +5 -5
- package/Menu-d5956ea2.cjs +2 -0
- package/Menu-d5956ea2.cjs.map +1 -0
- package/{Menu-cc458844.js → Menu-dbe0fd3a.js} +30 -30
- package/Menu-dbe0fd3a.js.map +1 -0
- package/Menu.cjs +1 -1
- package/Menu.js +1 -1
- package/Overflow.cjs +1 -1
- package/Overflow.cjs.map +1 -1
- package/Overflow.js +24 -23
- package/Overflow.js.map +1 -1
- package/Page.cjs +1 -1
- package/Page.cjs.map +1 -1
- package/Page.js +64 -64
- package/{Popover-16e123eb.cjs → Popover-20b9a021.cjs} +2 -2
- package/{Popover-16e123eb.cjs.map → Popover-20b9a021.cjs.map} +1 -1
- package/{Popover-bbf3a937.js → Popover-5d8c0428.js} +2 -2
- package/{Popover-bbf3a937.js.map → Popover-5d8c0428.js.map} +1 -1
- package/Popover.cjs +1 -1
- package/Popover.js +1 -1
- package/{ProgressBar-b002f299.js → ProgressBar-8bc6ae09.js} +30 -28
- package/ProgressBar-8bc6ae09.js.map +1 -0
- package/ProgressBar-df4d363c.cjs +2 -0
- package/ProgressBar-df4d363c.cjs.map +1 -0
- package/ProgressBar.cjs +1 -1
- package/ProgressBar.js +1 -1
- package/{Radio-45648d07.js → Radio-bab9334f.js} +14 -12
- package/Radio-bab9334f.js.map +1 -0
- package/Radio-c14a8ea0.cjs +2 -0
- package/Radio-c14a8ea0.cjs.map +1 -0
- package/Radio.cjs +1 -1
- package/Radio.js +1 -1
- package/{SideNav-430e523d.js → SideNav-2760a049.js} +45 -43
- package/SideNav-2760a049.js.map +1 -0
- package/SideNav-3e46e3c4.cjs +2 -0
- package/SideNav-3e46e3c4.cjs.map +1 -0
- package/SideNav.cjs +5 -5
- package/SideNav.cjs.map +1 -1
- package/SideNav.js +63 -62
- package/SideNav.js.map +1 -1
- package/Spinner-e6a0837b-9a5e00e0.js +17 -0
- package/Spinner-e6a0837b-9a5e00e0.js.map +1 -0
- package/Spinner-e6a0837b-a4cbf304.cjs +2 -0
- package/Spinner-e6a0837b-a4cbf304.cjs.map +1 -0
- package/Spinner.css +1 -0
- package/Stepper-114de1c0.js +388 -0
- package/Stepper-114de1c0.js.map +1 -0
- package/Stepper-26ff6dd3.cjs +2 -0
- package/Stepper-26ff6dd3.cjs.map +1 -0
- package/Stepper.cjs +1 -1
- package/Stepper.css +1 -1
- package/Stepper.js +4 -4
- package/{Switch-681bcdd4.js → Switch-48443bc7.js} +20 -18
- package/Switch-48443bc7.js.map +1 -0
- package/Switch-c6a36b99.cjs +2 -0
- package/Switch-c6a36b99.cjs.map +1 -0
- package/Switch.cjs +1 -1
- package/Switch.js +1 -1
- package/Tab-51af7435.cjs +10 -0
- package/Tab-51af7435.cjs.map +1 -0
- package/{Tab-93702f1d.js → Tab-a5d9cec6.js} +24 -21
- package/Tab-a5d9cec6.js.map +1 -0
- package/Tab.cjs +1 -1
- package/Tab.js +1 -1
- package/Text-317031b1.cjs +2 -0
- package/Text-317031b1.cjs.map +1 -0
- package/{Text-dbff9cb7.js → Text-796fd2cb.js} +29 -28
- package/Text-796fd2cb.js.map +1 -0
- package/Text.cjs +1 -1
- package/Text.js +1 -1
- package/TextField-57bb98f0.cjs +2 -0
- package/TextField-57bb98f0.cjs.map +1 -0
- package/{TextField-0b30ba31.js → TextField-7823e2ff.js} +23 -22
- package/TextField-7823e2ff.js.map +1 -0
- package/TextField.cjs +1 -1
- package/TextField.js +1 -1
- package/Textarea-03f882d5.cjs +2 -0
- package/Textarea-03f882d5.cjs.map +1 -0
- package/Textarea-6ca5ebf5.js +244 -0
- package/Textarea-6ca5ebf5.js.map +1 -0
- package/Textarea.cjs +1 -1
- package/Textarea.js +6 -6
- package/Toast-c7f439ad.cjs +9 -0
- package/Toast-c7f439ad.cjs.map +1 -0
- package/Toast-e171c00b.js +551 -0
- package/Toast-e171c00b.js.map +1 -0
- package/Toast.cjs +2 -0
- package/Toast.cjs.map +1 -0
- package/Toast.d.ts +41 -0
- package/Toast.js +12 -0
- package/Toast.js.map +1 -0
- package/anvil2.cjs +1 -1
- package/anvil2.d.ts +112 -57
- package/anvil2.js +175 -167
- package/anvil2.js.map +1 -1
- package/extends-135d7828.js +23 -0
- package/extends-135d7828.js.map +1 -0
- package/extends-fcb402fe.cjs +2 -0
- package/extends-fcb402fe.cjs.map +1 -0
- package/index-09d89a47.js +678 -0
- package/index-09d89a47.js.map +1 -0
- package/index-67ae73fa-45a2ebfb.cjs +23 -0
- package/{index-56139b56-2d7be688.cjs.map → index-67ae73fa-45a2ebfb.cjs.map} +1 -1
- package/{index-56139b56-cfb3b366.js → index-67ae73fa-8e31624a.js} +18 -15
- package/{index-56139b56-cfb3b366.js.map → index-67ae73fa-8e31624a.js.map} +1 -1
- package/index-92baae54.cjs +21 -0
- package/index-92baae54.cjs.map +1 -0
- package/index.css +1 -1
- package/index3.css +1 -1
- package/{use-reduced-motion-68bea567.js → motion-1dee7c9a.js} +1217 -1234
- package/motion-1dee7c9a.js.map +1 -0
- package/motion-f7215751.cjs +2 -0
- package/motion-f7215751.cjs.map +1 -0
- package/package.json +30 -30
- package/use-reduced-motion-00575ab2.cjs +2 -0
- package/use-reduced-motion-00575ab2.cjs.map +1 -0
- package/use-reduced-motion-fa02c531.js +28 -0
- package/use-reduced-motion-fa02c531.js.map +1 -0
- package/useAccessibleColor.cjs +1 -8
- package/useAccessibleColor.cjs.map +1 -1
- package/useAccessibleColor.js +41 -577
- package/useAccessibleColor.js.map +1 -1
- package/useLayoutPropsUtil-4361a49d-a262cd66.cjs +2 -0
- package/useLayoutPropsUtil-4361a49d-a262cd66.cjs.map +1 -0
- package/useLayoutPropsUtil-4361a49d-f9f6e64c.js +99 -0
- package/useLayoutPropsUtil-4361a49d-f9f6e64c.js.map +1 -0
- package/usePrefersColorScheme.cjs +1 -1
- package/usePrefersColorScheme.js +33 -33
- package/useSwipe-82769b09-835234e6.js +17 -0
- package/useSwipe-82769b09-835234e6.js.map +1 -0
- package/useSwipe-82769b09-dba26ed2.cjs +2 -0
- package/useSwipe-82769b09-dba26ed2.cjs.map +1 -0
- package/useSwipe.cjs +1 -1
- package/useSwipe.js +36 -35
- package/useSwipe.js.map +1 -1
- package/warning-412414f5-31461705.cjs +2 -0
- package/warning-412414f5-31461705.cjs.map +1 -0
- package/warning-412414f5-36733091.js +6 -0
- package/warning-412414f5-36733091.js.map +1 -0
- package/Alert-ac9a1bcd.js.map +0 -1
- package/Alert-c7461f76.cjs +0 -2
- package/Alert-c7461f76.cjs.map +0 -1
- package/Announcement-546f0bd9.cjs +0 -2
- package/Announcement-546f0bd9.cjs.map +0 -1
- package/Announcement-b9468739.js.map +0 -1
- package/Avatar-97b575d8.js.map +0 -1
- package/Avatar-97f653b7.cjs +0 -2
- package/Avatar-97f653b7.cjs.map +0 -1
- package/Badge-3adb51a5.cjs +0 -2
- package/Badge-3adb51a5.cjs.map +0 -1
- package/Badge-dbafadd5.js.map +0 -1
- package/Button-1a56b573.cjs +0 -2
- package/Button-1a56b573.cjs.map +0 -1
- package/Button-dc48bb3a.js.map +0 -1
- package/Calendar-0659f8b4.cjs +0 -2
- package/Calendar-0659f8b4.cjs.map +0 -1
- package/Calendar-83436bb1.js.map +0 -1
- package/Card-67e4a72d.js +0 -48
- package/Card-67e4a72d.js.map +0 -1
- package/Card-da5a5c50.cjs +0 -2
- package/Card-da5a5c50.cjs.map +0 -1
- package/Checkbox-92a6dd20.cjs +0 -2
- package/Checkbox-92a6dd20.cjs.map +0 -1
- package/Checkbox-a250869f.js.map +0 -1
- package/Chip-467cb19a.js +0 -59
- package/Chip-467cb19a.js.map +0 -1
- package/Chip-e7800a85.cjs +0 -2
- package/Chip-e7800a85.cjs.map +0 -1
- package/Details-44527230.cjs +0 -2
- package/Details-44527230.cjs.map +0 -1
- package/Details-c6f10fa4.js.map +0 -1
- package/Dialog-fbc91a0e.cjs +0 -2
- package/Dialog-fbc91a0e.cjs.map +0 -1
- package/Dialog-fd3430f5.js.map +0 -1
- package/Divider-063f94ad.cjs +0 -2
- package/Divider-063f94ad.cjs.map +0 -1
- package/Divider-394d2459.js.map +0 -1
- package/Flex-12077c9d.js.map +0 -1
- package/Flex-d3632e09.cjs +0 -2
- package/Flex-d3632e09.cjs.map +0 -1
- package/Grid-107fc6b6.js.map +0 -1
- package/Grid-f506406d.cjs +0 -2
- package/Grid-f506406d.cjs.map +0 -1
- package/Label-cc07cfc5.js +0 -47
- package/Label-cc07cfc5.js.map +0 -1
- package/Label-de03a1de.cjs +0 -2
- package/Label-de03a1de.cjs.map +0 -1
- package/Link-3b673823.cjs +0 -2
- package/Link-3b673823.cjs.map +0 -1
- package/Link-c6b4090e.js.map +0 -1
- package/ListView-2b4699a6.cjs +0 -2
- package/ListView-2b4699a6.cjs.map +0 -1
- package/ListView-e895e6a8.js.map +0 -1
- package/Listbox-39c32ced.js.map +0 -1
- package/Listbox-5ffb93f8.cjs +0 -2
- package/Listbox-5ffb93f8.cjs.map +0 -1
- package/Menu-3d2a2077.cjs +0 -2
- package/Menu-3d2a2077.cjs.map +0 -1
- package/Menu-cc458844.js.map +0 -1
- package/ProgressBar-b002f299.js.map +0 -1
- package/ProgressBar-dfd1189e.cjs +0 -2
- package/ProgressBar-dfd1189e.cjs.map +0 -1
- package/Radio-45648d07.js.map +0 -1
- package/Radio-941f3286.cjs +0 -2
- package/Radio-941f3286.cjs.map +0 -1
- package/SideNav-430e523d.js.map +0 -1
- package/SideNav-7228b784.cjs +0 -2
- package/SideNav-7228b784.cjs.map +0 -1
- package/Spinner-2bb1850c-00c03d61.cjs +0 -2
- package/Spinner-2bb1850c-00c03d61.cjs.map +0 -1
- package/Spinner-2bb1850c-d70e6345.js +0 -13
- package/Spinner-2bb1850c-d70e6345.js.map +0 -1
- package/Stepper-7182de9a.cjs +0 -2
- package/Stepper-7182de9a.cjs.map +0 -1
- package/Stepper-a9bc37e2.js +0 -373
- package/Stepper-a9bc37e2.js.map +0 -1
- package/Switch-5007f230.cjs +0 -2
- package/Switch-5007f230.cjs.map +0 -1
- package/Switch-681bcdd4.js.map +0 -1
- package/Tab-920f6aad.cjs +0 -10
- package/Tab-920f6aad.cjs.map +0 -1
- package/Tab-93702f1d.js.map +0 -1
- package/Text-96a3b0cb.cjs +0 -2
- package/Text-96a3b0cb.cjs.map +0 -1
- package/Text-dbff9cb7.js.map +0 -1
- package/TextField-0b30ba31.js.map +0 -1
- package/TextField-58320cef.cjs +0 -2
- package/TextField-58320cef.cjs.map +0 -1
- package/Textarea-6573a847.cjs +0 -2
- package/Textarea-6573a847.cjs.map +0 -1
- package/Textarea-b387b2d7.js +0 -114
- package/Textarea-b387b2d7.js.map +0 -1
- package/index-064ddc3d.js +0 -698
- package/index-064ddc3d.js.map +0 -1
- package/index-56139b56-2d7be688.cjs +0 -23
- package/index-910707bd.cjs +0 -21
- package/index-910707bd.cjs.map +0 -1
- package/index-cb7af0c9-2d919802.cjs +0 -2
- package/index-cb7af0c9-2d919802.cjs.map +0 -1
- package/index-cb7af0c9-4f28e075.js +0 -193
- package/index-cb7af0c9-4f28e075.js.map +0 -1
- package/use-reduced-motion-162cddef.cjs +0 -2
- package/use-reduced-motion-162cddef.cjs.map +0 -1
- package/use-reduced-motion-68bea567.js.map +0 -1
- /package/{index4.css → Toast.css} +0 -0
- /package/{index-56139b56.css → index-67ae73fa.css} +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import * as en from "react";
|
|
2
|
+
import fs, { createContext as dt, useLayoutEffect as Oi, useEffect as we, useContext as F, useRef as he, useInsertionEffect as ji, useCallback as Ii, useMemo as Wt, forwardRef as Ni, Fragment as ds, createElement as Ui, useId as Ki } from "react";
|
|
3
|
+
import { i as ms, w as Ae, h as $i, a as Wi, p as _i } from "./use-reduced-motion-fa02c531.js";
|
|
4
|
+
const ps = dt({
|
|
4
5
|
transformPagePoint: (t) => t,
|
|
5
6
|
isStatic: !1,
|
|
6
7
|
reducedMotion: "never"
|
|
7
|
-
}),
|
|
8
|
+
}), _t = dt({}), Ce = dt(null), Gi = ms ? Oi : we, gs = dt({ strict: !1 }), De = (t) => t.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), Hi = "framerAppearId", ys = "data-" + De(Hi), zi = {
|
|
8
9
|
skipAnimations: !1,
|
|
9
10
|
useManualTiming: !1
|
|
10
11
|
};
|
|
11
|
-
class
|
|
12
|
+
class nn {
|
|
12
13
|
constructor() {
|
|
13
14
|
this.order = [], this.scheduled = /* @__PURE__ */ new Set();
|
|
14
15
|
}
|
|
@@ -24,36 +25,36 @@ class rn {
|
|
|
24
25
|
this.order.length = 0, this.scheduled.clear();
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
-
let e = new
|
|
29
|
-
const
|
|
28
|
+
function Yi(t) {
|
|
29
|
+
let e = new nn(), n = new nn(), s = 0, i = !1, o = !1;
|
|
30
|
+
const r = /* @__PURE__ */ new WeakSet(), a = {
|
|
30
31
|
/**
|
|
31
32
|
* Schedule a process to run on the next frame.
|
|
32
33
|
*/
|
|
33
34
|
schedule: (l, u = !1, c = !1) => {
|
|
34
35
|
const h = c && i, f = h ? e : n;
|
|
35
|
-
return u &&
|
|
36
|
+
return u && r.add(l), f.add(l) && h && i && (s = e.order.length), l;
|
|
36
37
|
},
|
|
37
38
|
/**
|
|
38
39
|
* Cancel the provided callback from running on the next frame.
|
|
39
40
|
*/
|
|
40
41
|
cancel: (l) => {
|
|
41
|
-
n.remove(l),
|
|
42
|
+
n.remove(l), r.delete(l);
|
|
42
43
|
},
|
|
43
44
|
/**
|
|
44
45
|
* Execute all schedule callbacks.
|
|
45
46
|
*/
|
|
46
47
|
process: (l) => {
|
|
47
48
|
if (i) {
|
|
48
|
-
|
|
49
|
+
o = !0;
|
|
49
50
|
return;
|
|
50
51
|
}
|
|
51
52
|
if (i = !0, [e, n] = [n, e], n.clear(), s = e.order.length, s)
|
|
52
53
|
for (let u = 0; u < s; u++) {
|
|
53
54
|
const c = e.order[u];
|
|
54
|
-
|
|
55
|
+
r.has(c) && (a.schedule(c), t()), c(l);
|
|
55
56
|
}
|
|
56
|
-
i = !1,
|
|
57
|
+
i = !1, o && (o = !1, a.process(l));
|
|
57
58
|
}
|
|
58
59
|
};
|
|
59
60
|
return a;
|
|
@@ -66,53 +67,53 @@ const Rt = [
|
|
|
66
67
|
"render",
|
|
67
68
|
"postRender"
|
|
68
69
|
// Compute
|
|
69
|
-
],
|
|
70
|
-
function
|
|
70
|
+
], Xi = 40;
|
|
71
|
+
function vs(t, e) {
|
|
71
72
|
let n = !1, s = !0;
|
|
72
73
|
const i = {
|
|
73
74
|
delta: 0,
|
|
74
75
|
timestamp: 0,
|
|
75
76
|
isProcessing: !1
|
|
76
|
-
},
|
|
77
|
-
|
|
77
|
+
}, o = Rt.reduce((h, f) => (h[f] = Yi(() => n = !0), h), {}), r = (h) => {
|
|
78
|
+
o[h].process(i);
|
|
78
79
|
}, a = () => {
|
|
79
80
|
const h = performance.now();
|
|
80
|
-
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(h - i.timestamp,
|
|
81
|
+
n = !1, i.delta = s ? 1e3 / 60 : Math.max(Math.min(h - i.timestamp, Xi), 1), i.timestamp = h, i.isProcessing = !0, Rt.forEach(r), i.isProcessing = !1, n && e && (s = !1, t(a));
|
|
81
82
|
}, l = () => {
|
|
82
83
|
n = !0, s = !0, i.isProcessing || t(a);
|
|
83
84
|
};
|
|
84
85
|
return { schedule: Rt.reduce((h, f) => {
|
|
85
|
-
const d =
|
|
86
|
+
const d = o[f];
|
|
86
87
|
return h[f] = (m, p = !1, y = !1) => (n || l(), d.schedule(m, p, y)), h;
|
|
87
|
-
}, {}), cancel: (h) => Rt.forEach((f) =>
|
|
88
|
+
}, {}), cancel: (h) => Rt.forEach((f) => o[f].cancel(h)), state: i, steps: o };
|
|
88
89
|
}
|
|
89
|
-
const { schedule:
|
|
90
|
-
function
|
|
91
|
-
const { visualElement: i } = F(
|
|
92
|
-
s = s ||
|
|
90
|
+
const { schedule: Me, cancel: su } = vs(queueMicrotask, !1);
|
|
91
|
+
function qi(t, e, n, s) {
|
|
92
|
+
const { visualElement: i } = F(_t), o = F(gs), r = F(Ce), a = F(ps).reducedMotion, l = he();
|
|
93
|
+
s = s || o.renderer, !l.current && s && (l.current = s(t, {
|
|
93
94
|
visualState: e,
|
|
94
95
|
parent: i,
|
|
95
96
|
props: n,
|
|
96
|
-
presenceContext:
|
|
97
|
-
blockInitialAnimation:
|
|
97
|
+
presenceContext: r,
|
|
98
|
+
blockInitialAnimation: r ? r.initial === !1 : !1,
|
|
98
99
|
reducedMotionConfig: a
|
|
99
100
|
}));
|
|
100
101
|
const u = l.current;
|
|
101
|
-
|
|
102
|
-
u && u.update(n,
|
|
102
|
+
ji(() => {
|
|
103
|
+
u && u.update(n, r);
|
|
103
104
|
});
|
|
104
|
-
const c =
|
|
105
|
-
return
|
|
106
|
-
u && (
|
|
107
|
-
}),
|
|
105
|
+
const c = he(!!(n[ys] && !window.HandoffComplete));
|
|
106
|
+
return Gi(() => {
|
|
107
|
+
u && (Me.postRender(u.render), c.current && u.animationState && u.animationState.animateChanges());
|
|
108
|
+
}), we(() => {
|
|
108
109
|
u && (u.updateFeatures(), !c.current && u.animationState && u.animationState.animateChanges(), c.current && (c.current = !1, window.HandoffComplete = !0));
|
|
109
110
|
}), u;
|
|
110
111
|
}
|
|
111
112
|
function lt(t) {
|
|
112
113
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
-
return
|
|
115
|
+
function Zi(t, e, n) {
|
|
116
|
+
return Ii(
|
|
116
117
|
(s) => {
|
|
117
118
|
s && t.mount && t.mount(s), e && (s ? e.mount(s) : e.unmount()), n && (typeof n == "function" ? n(s) : lt(n) && (n.current = s));
|
|
118
119
|
},
|
|
@@ -127,10 +128,10 @@ function Ji(t, e, n) {
|
|
|
127
128
|
function Pt(t) {
|
|
128
129
|
return typeof t == "string" || Array.isArray(t);
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
+
function Gt(t) {
|
|
131
132
|
return t !== null && typeof t == "object" && typeof t.start == "function";
|
|
132
133
|
}
|
|
133
|
-
const
|
|
134
|
+
const Re = [
|
|
134
135
|
"animate",
|
|
135
136
|
"whileInView",
|
|
136
137
|
"whileFocus",
|
|
@@ -138,15 +139,15 @@ const Le = [
|
|
|
138
139
|
"whileTap",
|
|
139
140
|
"whileDrag",
|
|
140
141
|
"exit"
|
|
141
|
-
],
|
|
142
|
-
function
|
|
143
|
-
return
|
|
142
|
+
], Ee = ["initial", ...Re];
|
|
143
|
+
function Ht(t) {
|
|
144
|
+
return Gt(t.animate) || Ee.some((e) => Pt(t[e]));
|
|
144
145
|
}
|
|
145
|
-
function
|
|
146
|
-
return !!(
|
|
146
|
+
function xs(t) {
|
|
147
|
+
return !!(Ht(t) || t.variants);
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
-
if (
|
|
149
|
+
function Ji(t, e) {
|
|
150
|
+
if (Ht(t)) {
|
|
150
151
|
const { initial: n, animate: s } = t;
|
|
151
152
|
return {
|
|
152
153
|
initial: n === !1 || Pt(n) ? n : void 0,
|
|
@@ -155,14 +156,14 @@ function to(t, e) {
|
|
|
155
156
|
}
|
|
156
157
|
return t.inherit !== !1 ? e : {};
|
|
157
158
|
}
|
|
158
|
-
function
|
|
159
|
-
const { initial: e, animate: n } =
|
|
160
|
-
return Wt(() => ({ initial: e, animate: n }), [
|
|
159
|
+
function Qi(t) {
|
|
160
|
+
const { initial: e, animate: n } = Ji(t, F(_t));
|
|
161
|
+
return Wt(() => ({ initial: e, animate: n }), [sn(e), sn(n)]);
|
|
161
162
|
}
|
|
162
|
-
function
|
|
163
|
+
function sn(t) {
|
|
163
164
|
return Array.isArray(t) ? t.join(" ") : t;
|
|
164
165
|
}
|
|
165
|
-
const
|
|
166
|
+
const rn = {
|
|
166
167
|
animation: [
|
|
167
168
|
"animate",
|
|
168
169
|
"variants",
|
|
@@ -182,30 +183,30 @@ const ln = {
|
|
|
182
183
|
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
183
184
|
layout: ["layout", "layoutId"]
|
|
184
185
|
}, bt = {};
|
|
185
|
-
for (const t in
|
|
186
|
+
for (const t in rn)
|
|
186
187
|
bt[t] = {
|
|
187
|
-
isEnabled: (e) =>
|
|
188
|
+
isEnabled: (e) => rn[t].some((n) => !!e[n])
|
|
188
189
|
};
|
|
189
|
-
function
|
|
190
|
+
function tr(t) {
|
|
190
191
|
for (const e in t)
|
|
191
192
|
bt[e] = {
|
|
192
193
|
...bt[e],
|
|
193
194
|
...t[e]
|
|
194
195
|
};
|
|
195
196
|
}
|
|
196
|
-
const
|
|
197
|
-
function
|
|
198
|
-
t &&
|
|
199
|
-
function
|
|
197
|
+
const Ts = dt({}), Ps = dt({}), er = Symbol.for("motionComponentSymbol");
|
|
198
|
+
function nr({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVisualState: s, Component: i }) {
|
|
199
|
+
t && tr(t);
|
|
200
|
+
function o(a, l) {
|
|
200
201
|
let u;
|
|
201
202
|
const c = {
|
|
202
|
-
...F(
|
|
203
|
+
...F(ps),
|
|
203
204
|
...a,
|
|
204
|
-
layoutId:
|
|
205
|
-
}, { isStatic: h } = c, f =
|
|
206
|
-
if (!h &&
|
|
207
|
-
f.visualElement =
|
|
208
|
-
const m = F(
|
|
205
|
+
layoutId: sr(a)
|
|
206
|
+
}, { isStatic: h } = c, f = Qi(a), d = s(a, h);
|
|
207
|
+
if (!h && ms) {
|
|
208
|
+
f.visualElement = qi(i, d, c, e);
|
|
209
|
+
const m = F(Ps), p = F(gs).strict;
|
|
209
210
|
f.visualElement && (u = f.visualElement.loadFeatures(
|
|
210
211
|
// Note: Pass the full new combined props to correctly re-render dynamic feature components.
|
|
211
212
|
c,
|
|
@@ -214,23 +215,23 @@ function io({ preloadedFeatures: t, createVisualElement: e, useRender: n, useVis
|
|
|
214
215
|
m
|
|
215
216
|
));
|
|
216
217
|
}
|
|
217
|
-
return
|
|
218
|
-
|
|
218
|
+
return en.createElement(
|
|
219
|
+
_t.Provider,
|
|
219
220
|
{ value: f },
|
|
220
|
-
u && f.visualElement ?
|
|
221
|
-
n(i, a,
|
|
221
|
+
u && f.visualElement ? en.createElement(u, { visualElement: f.visualElement, ...c }) : null,
|
|
222
|
+
n(i, a, Zi(d, f.visualElement, l), d, h, f.visualElement)
|
|
222
223
|
);
|
|
223
224
|
}
|
|
224
|
-
const
|
|
225
|
-
return
|
|
225
|
+
const r = Ni(o);
|
|
226
|
+
return r[er] = i, r;
|
|
226
227
|
}
|
|
227
|
-
function
|
|
228
|
-
const e = F(
|
|
228
|
+
function sr({ layoutId: t }) {
|
|
229
|
+
const e = F(Ts).id;
|
|
229
230
|
return e && t !== void 0 ? e + "-" + t : t;
|
|
230
231
|
}
|
|
231
|
-
function
|
|
232
|
+
function ir(t) {
|
|
232
233
|
function e(s, i = {}) {
|
|
233
|
-
return
|
|
234
|
+
return nr(t(s, i));
|
|
234
235
|
}
|
|
235
236
|
if (typeof Proxy > "u")
|
|
236
237
|
return e;
|
|
@@ -244,7 +245,7 @@ function ro(t) {
|
|
|
244
245
|
get: (s, i) => (n.has(i) || n.set(i, e(i)), n.get(i))
|
|
245
246
|
});
|
|
246
247
|
}
|
|
247
|
-
const
|
|
248
|
+
const rr = [
|
|
248
249
|
"animate",
|
|
249
250
|
"circle",
|
|
250
251
|
"defs",
|
|
@@ -271,7 +272,7 @@ const ao = [
|
|
|
271
272
|
"use",
|
|
272
273
|
"view"
|
|
273
274
|
];
|
|
274
|
-
function
|
|
275
|
+
function Le(t) {
|
|
275
276
|
return (
|
|
276
277
|
/**
|
|
277
278
|
* If it's not a string, it's a custom React component. Currently we only support
|
|
@@ -284,7 +285,7 @@ function Be(t) {
|
|
|
284
285
|
/**
|
|
285
286
|
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
286
287
|
*/
|
|
287
|
-
!!(
|
|
288
|
+
!!(rr.indexOf(t) > -1 || /**
|
|
288
289
|
* If it contains a capital letter, it's an SVG component
|
|
289
290
|
*/
|
|
290
291
|
/[A-Z]/u.test(t))
|
|
@@ -292,7 +293,7 @@ function Be(t) {
|
|
|
292
293
|
);
|
|
293
294
|
}
|
|
294
295
|
const Ot = {};
|
|
295
|
-
function
|
|
296
|
+
function or(t) {
|
|
296
297
|
Object.assign(Ot, t);
|
|
297
298
|
}
|
|
298
299
|
const wt = [
|
|
@@ -313,28 +314,28 @@ const wt = [
|
|
|
313
314
|
"skew",
|
|
314
315
|
"skewX",
|
|
315
316
|
"skewY"
|
|
316
|
-
],
|
|
317
|
-
function
|
|
318
|
-
return
|
|
317
|
+
], ot = new Set(wt);
|
|
318
|
+
function bs(t, { layout: e, layoutId: n }) {
|
|
319
|
+
return ot.has(t) || t.startsWith("origin") || (e || n !== void 0) && (!!Ot[t] || t === "opacity");
|
|
319
320
|
}
|
|
320
|
-
const E = (t) => !!(t && t.getVelocity),
|
|
321
|
+
const E = (t) => !!(t && t.getVelocity), ar = {
|
|
321
322
|
x: "translateX",
|
|
322
323
|
y: "translateY",
|
|
323
324
|
z: "translateZ",
|
|
324
325
|
transformPerspective: "perspective"
|
|
325
|
-
},
|
|
326
|
-
function
|
|
327
|
-
let
|
|
328
|
-
for (let
|
|
329
|
-
const a = wt[
|
|
326
|
+
}, lr = wt.length;
|
|
327
|
+
function ur(t, { enableHardwareAcceleration: e = !0, allowTransformNone: n = !0 }, s, i) {
|
|
328
|
+
let o = "";
|
|
329
|
+
for (let r = 0; r < lr; r++) {
|
|
330
|
+
const a = wt[r];
|
|
330
331
|
if (t[a] !== void 0) {
|
|
331
|
-
const l =
|
|
332
|
-
|
|
332
|
+
const l = ar[a] || a;
|
|
333
|
+
o += `${l}(${t[a]}) `;
|
|
333
334
|
}
|
|
334
335
|
}
|
|
335
|
-
return e && !t.z && (
|
|
336
|
+
return e && !t.z && (o += "translateZ(0)"), o = o.trim(), i ? o = i(t, s ? "" : o) : n && s && (o = "none"), o;
|
|
336
337
|
}
|
|
337
|
-
const
|
|
338
|
+
const Ss = (t) => (e) => typeof e == "string" && e.startsWith(t), Vs = Ss("--"), cr = Ss("var(--"), Fe = (t) => cr(t) ? hr.test(t.split("/*")[0].trim()) : !1, hr = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, fr = (t, e) => e && typeof t == "number" ? e.transform(t) : t, Z = (t, e, n) => n > e ? e : n < t ? t : n, mt = {
|
|
338
339
|
test: (t) => typeof t == "number",
|
|
339
340
|
parse: parseFloat,
|
|
340
341
|
transform: (t) => t
|
|
@@ -344,7 +345,7 @@ const As = (t) => (e) => typeof e == "string" && e.startsWith(t), Cs = As("--"),
|
|
|
344
345
|
}, Et = {
|
|
345
346
|
...mt,
|
|
346
347
|
default: 1
|
|
347
|
-
}, vt = (t) => Math.round(t * 1e5) / 1e5,
|
|
348
|
+
}, vt = (t) => Math.round(t * 1e5) / 1e5, Be = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu, dr = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu, mr = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;
|
|
348
349
|
function At(t) {
|
|
349
350
|
return typeof t == "string";
|
|
350
351
|
}
|
|
@@ -352,14 +353,14 @@ const Ct = (t) => ({
|
|
|
352
353
|
test: (e) => At(e) && e.endsWith(t) && e.split(" ").length === 1,
|
|
353
354
|
parse: parseFloat,
|
|
354
355
|
transform: (e) => `${e}${t}`
|
|
355
|
-
}), Y = Ct("deg"), N = Ct("%"), x = Ct("px"),
|
|
356
|
+
}), Y = Ct("deg"), N = Ct("%"), x = Ct("px"), pr = Ct("vh"), gr = Ct("vw"), on = {
|
|
356
357
|
...N,
|
|
357
358
|
parse: (t) => N.parse(t) / 100,
|
|
358
359
|
transform: (t) => N.transform(t * 100)
|
|
359
|
-
},
|
|
360
|
+
}, an = {
|
|
360
361
|
...mt,
|
|
361
362
|
transform: Math.round
|
|
362
|
-
},
|
|
363
|
+
}, ws = {
|
|
363
364
|
// Border props
|
|
364
365
|
borderWidth: x,
|
|
365
366
|
borderTopWidth: x,
|
|
@@ -415,65 +416,65 @@ const Ct = (t) => ({
|
|
|
415
416
|
perspective: x,
|
|
416
417
|
transformPerspective: x,
|
|
417
418
|
opacity: yt,
|
|
418
|
-
originX:
|
|
419
|
-
originY:
|
|
419
|
+
originX: on,
|
|
420
|
+
originY: on,
|
|
420
421
|
originZ: x,
|
|
421
422
|
// Misc
|
|
422
|
-
zIndex:
|
|
423
|
+
zIndex: an,
|
|
423
424
|
backgroundPositionX: x,
|
|
424
425
|
backgroundPositionY: x,
|
|
425
426
|
// SVG
|
|
426
427
|
fillOpacity: yt,
|
|
427
428
|
strokeOpacity: yt,
|
|
428
|
-
numOctaves:
|
|
429
|
+
numOctaves: an
|
|
429
430
|
};
|
|
430
|
-
function
|
|
431
|
-
const { style: i, vars:
|
|
431
|
+
function ke(t, e, n, s) {
|
|
432
|
+
const { style: i, vars: o, transform: r, transformOrigin: a } = t;
|
|
432
433
|
let l = !1, u = !1, c = !0;
|
|
433
434
|
for (const h in e) {
|
|
434
435
|
const f = e[h];
|
|
435
|
-
if (
|
|
436
|
-
|
|
436
|
+
if (Vs(h)) {
|
|
437
|
+
o[h] = f;
|
|
437
438
|
continue;
|
|
438
439
|
}
|
|
439
|
-
const d =
|
|
440
|
-
if (
|
|
441
|
-
if (l = !0,
|
|
440
|
+
const d = ws[h], m = fr(f, d);
|
|
441
|
+
if (ot.has(h)) {
|
|
442
|
+
if (l = !0, r[h] = m, !c)
|
|
442
443
|
continue;
|
|
443
444
|
f !== (d.default || 0) && (c = !1);
|
|
444
445
|
} else
|
|
445
446
|
h.startsWith("origin") ? (u = !0, a[h] = m) : i[h] = m;
|
|
446
447
|
}
|
|
447
|
-
if (e.transform || (l || s ? i.transform =
|
|
448
|
+
if (e.transform || (l || s ? i.transform = ur(t.transform, n, c, s) : i.transform && (i.transform = "none")), u) {
|
|
448
449
|
const { originX: h = "50%", originY: f = "50%", originZ: d = 0 } = a;
|
|
449
450
|
i.transformOrigin = `${h} ${f} ${d}`;
|
|
450
451
|
}
|
|
451
452
|
}
|
|
452
|
-
const
|
|
453
|
+
const Oe = () => ({
|
|
453
454
|
style: {},
|
|
454
455
|
transform: {},
|
|
455
456
|
transformOrigin: {},
|
|
456
457
|
vars: {}
|
|
457
458
|
});
|
|
458
|
-
function
|
|
459
|
+
function As(t, e, n) {
|
|
459
460
|
for (const s in e)
|
|
460
|
-
!E(e[s]) && !
|
|
461
|
+
!E(e[s]) && !bs(s, n) && (t[s] = e[s]);
|
|
461
462
|
}
|
|
462
|
-
function
|
|
463
|
+
function yr({ transformTemplate: t }, e, n) {
|
|
463
464
|
return Wt(() => {
|
|
464
|
-
const s =
|
|
465
|
-
return
|
|
465
|
+
const s = Oe();
|
|
466
|
+
return ke(s, e, { enableHardwareAcceleration: !n }, t), Object.assign({}, s.vars, s.style);
|
|
466
467
|
}, [e]);
|
|
467
468
|
}
|
|
468
|
-
function
|
|
469
|
+
function vr(t, e, n) {
|
|
469
470
|
const s = t.style || {}, i = {};
|
|
470
|
-
return
|
|
471
|
+
return As(i, s, t), Object.assign(i, yr(t, e, n)), i;
|
|
471
472
|
}
|
|
472
|
-
function
|
|
473
|
-
const s = {}, i =
|
|
473
|
+
function xr(t, e, n) {
|
|
474
|
+
const s = {}, i = vr(t, e, n);
|
|
474
475
|
return t.drag && t.dragListener !== !1 && (s.draggable = !1, i.userSelect = i.WebkitUserSelect = i.WebkitTouchCallout = "none", i.touchAction = t.drag === !0 ? "none" : `pan-${t.drag === "x" ? "y" : "x"}`), t.tabIndex === void 0 && (t.onTap || t.onTapStart || t.whileTap) && (s.tabIndex = 0), s.style = i, s;
|
|
475
476
|
}
|
|
476
|
-
const
|
|
477
|
+
const Tr = /* @__PURE__ */ new Set([
|
|
477
478
|
"animate",
|
|
478
479
|
"exit",
|
|
479
480
|
"variants",
|
|
@@ -506,97 +507,97 @@ const So = /* @__PURE__ */ new Set([
|
|
|
506
507
|
"viewport"
|
|
507
508
|
]);
|
|
508
509
|
function jt(t) {
|
|
509
|
-
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") ||
|
|
510
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || Tr.has(t);
|
|
510
511
|
}
|
|
511
|
-
let
|
|
512
|
-
function
|
|
513
|
-
t && (
|
|
512
|
+
let Cs = (t) => !jt(t);
|
|
513
|
+
function Pr(t) {
|
|
514
|
+
t && (Cs = (e) => e.startsWith("on") ? !jt(e) : t(e));
|
|
514
515
|
}
|
|
515
516
|
try {
|
|
516
|
-
|
|
517
|
+
Pr(require("@emotion/is-prop-valid").default);
|
|
517
518
|
} catch {
|
|
518
519
|
}
|
|
519
|
-
function
|
|
520
|
+
function br(t, e, n) {
|
|
520
521
|
const s = {};
|
|
521
522
|
for (const i in t)
|
|
522
|
-
i === "values" && typeof t.values == "object" || (
|
|
523
|
+
i === "values" && typeof t.values == "object" || (Cs(i) || n === !0 && jt(i) || !e && !jt(i) || // If trying to use native HTML drag events, forward drag listeners
|
|
523
524
|
t.draggable && i.startsWith("onDrag")) && (s[i] = t[i]);
|
|
524
525
|
return s;
|
|
525
526
|
}
|
|
526
|
-
function
|
|
527
|
+
function ln(t, e, n) {
|
|
527
528
|
return typeof t == "string" ? t : x.transform(e + n * t);
|
|
528
529
|
}
|
|
529
|
-
function
|
|
530
|
-
const s =
|
|
530
|
+
function Sr(t, e, n) {
|
|
531
|
+
const s = ln(e, t.x, t.width), i = ln(n, t.y, t.height);
|
|
531
532
|
return `${s} ${i}`;
|
|
532
533
|
}
|
|
533
|
-
const
|
|
534
|
+
const Vr = {
|
|
534
535
|
offset: "stroke-dashoffset",
|
|
535
536
|
array: "stroke-dasharray"
|
|
536
|
-
},
|
|
537
|
+
}, wr = {
|
|
537
538
|
offset: "strokeDashoffset",
|
|
538
539
|
array: "strokeDasharray"
|
|
539
540
|
};
|
|
540
|
-
function
|
|
541
|
+
function Ar(t, e, n = 1, s = 0, i = !0) {
|
|
541
542
|
t.pathLength = 1;
|
|
542
|
-
const
|
|
543
|
-
t[
|
|
544
|
-
const
|
|
545
|
-
t[
|
|
543
|
+
const o = i ? Vr : wr;
|
|
544
|
+
t[o.offset] = x.transform(-s);
|
|
545
|
+
const r = x.transform(e), a = x.transform(n);
|
|
546
|
+
t[o.array] = `${r} ${a}`;
|
|
546
547
|
}
|
|
547
|
-
function
|
|
548
|
+
function je(t, {
|
|
548
549
|
attrX: e,
|
|
549
550
|
attrY: n,
|
|
550
551
|
attrScale: s,
|
|
551
552
|
originX: i,
|
|
552
|
-
originY:
|
|
553
|
-
pathLength:
|
|
553
|
+
originY: o,
|
|
554
|
+
pathLength: r,
|
|
554
555
|
pathSpacing: a = 1,
|
|
555
556
|
pathOffset: l = 0,
|
|
556
557
|
// This is object creation, which we try to avoid per-frame.
|
|
557
558
|
...u
|
|
558
559
|
}, c, h, f) {
|
|
559
|
-
if (
|
|
560
|
+
if (ke(t, u, c, f), h) {
|
|
560
561
|
t.style.viewBox && (t.attrs.viewBox = t.style.viewBox);
|
|
561
562
|
return;
|
|
562
563
|
}
|
|
563
564
|
t.attrs = t.style, t.style = {};
|
|
564
565
|
const { attrs: d, style: m, dimensions: p } = t;
|
|
565
|
-
d.transform && (p && (m.transform = d.transform), delete d.transform), p && (i !== void 0 ||
|
|
566
|
+
d.transform && (p && (m.transform = d.transform), delete d.transform), p && (i !== void 0 || o !== void 0 || m.transform) && (m.transformOrigin = Sr(p, i !== void 0 ? i : 0.5, o !== void 0 ? o : 0.5)), e !== void 0 && (d.x = e), n !== void 0 && (d.y = n), s !== void 0 && (d.scale = s), r !== void 0 && Ar(d, r, a, l, !1);
|
|
566
567
|
}
|
|
567
|
-
const
|
|
568
|
-
...
|
|
568
|
+
const Ds = () => ({
|
|
569
|
+
...Oe(),
|
|
569
570
|
attrs: {}
|
|
570
|
-
}),
|
|
571
|
-
function
|
|
571
|
+
}), Ie = (t) => typeof t == "string" && t.toLowerCase() === "svg";
|
|
572
|
+
function Cr(t, e, n, s) {
|
|
572
573
|
const i = Wt(() => {
|
|
573
|
-
const
|
|
574
|
-
return
|
|
575
|
-
...
|
|
576
|
-
style: { ...
|
|
574
|
+
const o = Ds();
|
|
575
|
+
return je(o, e, { enableHardwareAcceleration: !1 }, Ie(s), t.transformTemplate), {
|
|
576
|
+
...o.attrs,
|
|
577
|
+
style: { ...o.style }
|
|
577
578
|
};
|
|
578
579
|
}, [e]);
|
|
579
580
|
if (t.style) {
|
|
580
|
-
const
|
|
581
|
-
|
|
581
|
+
const o = {};
|
|
582
|
+
As(o, t.style, t), i.style = { ...o, ...i.style };
|
|
582
583
|
}
|
|
583
584
|
return i;
|
|
584
585
|
}
|
|
585
|
-
function
|
|
586
|
-
return (n, s, i, { latestValues:
|
|
587
|
-
const l = (
|
|
588
|
-
return
|
|
586
|
+
function Dr(t = !1) {
|
|
587
|
+
return (n, s, i, { latestValues: o }, r) => {
|
|
588
|
+
const l = (Le(n) ? Cr : xr)(s, o, r, n), u = br(s, typeof n == "string", t), c = n !== ds ? { ...u, ...l, ref: i } : {}, { children: h } = s, f = Wt(() => E(h) ? h.get() : h, [h]);
|
|
589
|
+
return Ui(n, {
|
|
589
590
|
...c,
|
|
590
591
|
children: f
|
|
591
592
|
});
|
|
592
593
|
};
|
|
593
594
|
}
|
|
594
|
-
function
|
|
595
|
+
function Ms(t, { style: e, vars: n }, s, i) {
|
|
595
596
|
Object.assign(t.style, e, i && i.getProjectionStyles(s));
|
|
596
|
-
for (const
|
|
597
|
-
t.style.setProperty(
|
|
597
|
+
for (const o in n)
|
|
598
|
+
t.style.setProperty(o, n[o]);
|
|
598
599
|
}
|
|
599
|
-
const
|
|
600
|
+
const Rs = /* @__PURE__ */ new Set([
|
|
600
601
|
"baseFrequency",
|
|
601
602
|
"diffuseConstant",
|
|
602
603
|
"kernelMatrix",
|
|
@@ -621,62 +622,62 @@ const Fs = /* @__PURE__ */ new Set([
|
|
|
621
622
|
"textLength",
|
|
622
623
|
"lengthAdjust"
|
|
623
624
|
]);
|
|
624
|
-
function
|
|
625
|
-
|
|
625
|
+
function Es(t, e, n, s) {
|
|
626
|
+
Ms(t, e, void 0, s);
|
|
626
627
|
for (const i in e.attrs)
|
|
627
|
-
t.setAttribute(
|
|
628
|
+
t.setAttribute(Rs.has(i) ? i : De(i), e.attrs[i]);
|
|
628
629
|
}
|
|
629
|
-
function
|
|
630
|
+
function Ne(t, e, n) {
|
|
630
631
|
var s;
|
|
631
|
-
const { style: i } = t,
|
|
632
|
-
for (const
|
|
633
|
-
(E(i[
|
|
634
|
-
return
|
|
632
|
+
const { style: i } = t, o = {};
|
|
633
|
+
for (const r in i)
|
|
634
|
+
(E(i[r]) || e.style && E(e.style[r]) || bs(r, t) || ((s = n == null ? void 0 : n.getValue(r)) === null || s === void 0 ? void 0 : s.liveStyle) !== void 0) && (o[r] = i[r]);
|
|
635
|
+
return o;
|
|
635
636
|
}
|
|
636
|
-
function
|
|
637
|
-
const s =
|
|
637
|
+
function Ls(t, e, n) {
|
|
638
|
+
const s = Ne(t, e, n);
|
|
638
639
|
for (const i in t)
|
|
639
640
|
if (E(t[i]) || E(e[i])) {
|
|
640
|
-
const
|
|
641
|
-
s[
|
|
641
|
+
const o = wt.indexOf(i) !== -1 ? "attr" + i.charAt(0).toUpperCase() + i.substring(1) : i;
|
|
642
|
+
s[o] = t[i];
|
|
642
643
|
}
|
|
643
644
|
return s;
|
|
644
645
|
}
|
|
645
|
-
function
|
|
646
|
+
function Ue(t, e, n, s = {}, i = {}) {
|
|
646
647
|
return typeof e == "function" && (e = e(n !== void 0 ? n : t.custom, s, i)), typeof e == "string" && (e = t.variants && t.variants[e]), typeof e == "function" && (e = e(n !== void 0 ? n : t.custom, s, i)), e;
|
|
647
648
|
}
|
|
648
|
-
function
|
|
649
|
-
const e =
|
|
649
|
+
function Mr(t) {
|
|
650
|
+
const e = he(null);
|
|
650
651
|
return e.current === null && (e.current = t()), e.current;
|
|
651
652
|
}
|
|
652
|
-
const
|
|
653
|
+
const fe = (t) => Array.isArray(t), Rr = (t) => !!(t && typeof t == "object" && t.mix && t.toValue), Er = (t) => fe(t) ? t[t.length - 1] || 0 : t;
|
|
653
654
|
function Ft(t) {
|
|
654
655
|
const e = E(t) ? t.get() : t;
|
|
655
|
-
return
|
|
656
|
+
return Rr(e) ? e.toValue() : e;
|
|
656
657
|
}
|
|
657
|
-
function
|
|
658
|
-
const
|
|
659
|
-
latestValues:
|
|
658
|
+
function Lr({ scrapeMotionValuesFromProps: t, createRenderState: e, onMount: n }, s, i, o) {
|
|
659
|
+
const r = {
|
|
660
|
+
latestValues: Fr(s, i, o, t),
|
|
660
661
|
renderState: e()
|
|
661
662
|
};
|
|
662
|
-
return n && (
|
|
663
|
+
return n && (r.mount = (a) => n(s, a, r)), r;
|
|
663
664
|
}
|
|
664
|
-
const
|
|
665
|
-
const s = F(
|
|
666
|
-
return n ?
|
|
665
|
+
const Fs = (t) => (e, n) => {
|
|
666
|
+
const s = F(_t), i = F(Ce), o = () => Lr(t, e, s, i);
|
|
667
|
+
return n ? o() : Mr(o);
|
|
667
668
|
};
|
|
668
|
-
function
|
|
669
|
-
const i = {},
|
|
670
|
-
for (const f in
|
|
671
|
-
i[f] = Ft(
|
|
672
|
-
let { initial:
|
|
673
|
-
const l =
|
|
674
|
-
e && u && !l && t.inherit !== !1 && (
|
|
669
|
+
function Fr(t, e, n, s) {
|
|
670
|
+
const i = {}, o = s(t, {});
|
|
671
|
+
for (const f in o)
|
|
672
|
+
i[f] = Ft(o[f]);
|
|
673
|
+
let { initial: r, animate: a } = t;
|
|
674
|
+
const l = Ht(t), u = xs(t);
|
|
675
|
+
e && u && !l && t.inherit !== !1 && (r === void 0 && (r = e.initial), a === void 0 && (a = e.animate));
|
|
675
676
|
let c = n ? n.initial === !1 : !1;
|
|
676
|
-
c = c ||
|
|
677
|
-
const h = c ? a :
|
|
678
|
-
return h && typeof h != "boolean" && !
|
|
679
|
-
const m =
|
|
677
|
+
c = c || r === !1;
|
|
678
|
+
const h = c ? a : r;
|
|
679
|
+
return h && typeof h != "boolean" && !Gt(h) && (Array.isArray(h) ? h : [h]).forEach((d) => {
|
|
680
|
+
const m = Ue(t, d);
|
|
680
681
|
if (!m)
|
|
681
682
|
return;
|
|
682
683
|
const { transitionEnd: p, transition: y, ...v } = m;
|
|
@@ -692,10 +693,10 @@ function Oo(t, e, n, s) {
|
|
|
692
693
|
i[T] = p[T];
|
|
693
694
|
}), i;
|
|
694
695
|
}
|
|
695
|
-
const C = (t) => t, { schedule: D, cancel:
|
|
696
|
-
useVisualState:
|
|
697
|
-
scrapeMotionValuesFromProps:
|
|
698
|
-
createRenderState:
|
|
696
|
+
const C = (t) => t, { schedule: D, cancel: J, state: A, steps: Jt } = vs(typeof requestAnimationFrame < "u" ? requestAnimationFrame : C, !0), Br = {
|
|
697
|
+
useVisualState: Fs({
|
|
698
|
+
scrapeMotionValuesFromProps: Ls,
|
|
699
|
+
createRenderState: Ds,
|
|
699
700
|
onMount: (t, e, { renderState: n, latestValues: s }) => {
|
|
700
701
|
D.read(() => {
|
|
701
702
|
try {
|
|
@@ -709,21 +710,21 @@ const C = (t) => t, { schedule: D, cancel: Q, state: A, steps: te } = Ps(typeof
|
|
|
709
710
|
};
|
|
710
711
|
}
|
|
711
712
|
}), D.render(() => {
|
|
712
|
-
|
|
713
|
+
je(n, s, { enableHardwareAcceleration: !1 }, Ie(e.tagName), t.transformTemplate), Es(e, n);
|
|
713
714
|
});
|
|
714
715
|
}
|
|
715
716
|
})
|
|
716
|
-
},
|
|
717
|
-
useVisualState:
|
|
718
|
-
scrapeMotionValuesFromProps:
|
|
719
|
-
createRenderState:
|
|
717
|
+
}, kr = {
|
|
718
|
+
useVisualState: Fs({
|
|
719
|
+
scrapeMotionValuesFromProps: Ne,
|
|
720
|
+
createRenderState: Oe
|
|
720
721
|
})
|
|
721
722
|
};
|
|
722
|
-
function
|
|
723
|
+
function Or(t, { forwardMotionProps: e = !1 }, n, s) {
|
|
723
724
|
return {
|
|
724
|
-
...
|
|
725
|
+
...Le(t) ? Br : kr,
|
|
725
726
|
preloadedFeatures: n,
|
|
726
|
-
useRender:
|
|
727
|
+
useRender: Dr(e),
|
|
727
728
|
createVisualElement: s,
|
|
728
729
|
Component: t
|
|
729
730
|
};
|
|
@@ -731,8 +732,8 @@ function No(t, { forwardMotionProps: e = !1 }, n, s) {
|
|
|
731
732
|
function K(t, e, n, s = { passive: !0 }) {
|
|
732
733
|
return t.addEventListener(e, n, s), () => t.removeEventListener(e, n);
|
|
733
734
|
}
|
|
734
|
-
const
|
|
735
|
-
function
|
|
735
|
+
const Bs = (t) => t.pointerType === "mouse" ? typeof t.button != "number" || t.button <= 0 : t.isPrimary !== !1;
|
|
736
|
+
function zt(t, e = "page") {
|
|
736
737
|
return {
|
|
737
738
|
point: {
|
|
738
739
|
x: t[e + "X"],
|
|
@@ -740,12 +741,12 @@ function Yt(t, e = "page") {
|
|
|
740
741
|
}
|
|
741
742
|
};
|
|
742
743
|
}
|
|
743
|
-
const
|
|
744
|
+
const jr = (t) => (e) => Bs(e) && t(e, zt(e));
|
|
744
745
|
function $(t, e, n, s) {
|
|
745
|
-
return K(t, e,
|
|
746
|
+
return K(t, e, jr(n), s);
|
|
746
747
|
}
|
|
747
|
-
const
|
|
748
|
-
function
|
|
748
|
+
const Ir = (t, e) => (n) => e(t(n)), W = (...t) => t.reduce(Ir);
|
|
749
|
+
function ks(t) {
|
|
749
750
|
let e = null;
|
|
750
751
|
return () => {
|
|
751
752
|
const n = () => {
|
|
@@ -754,23 +755,23 @@ function Is(t) {
|
|
|
754
755
|
return e === null ? (e = t, n) : !1;
|
|
755
756
|
};
|
|
756
757
|
}
|
|
757
|
-
const
|
|
758
|
-
function
|
|
758
|
+
const un = ks("dragHorizontal"), cn = ks("dragVertical");
|
|
759
|
+
function Os(t) {
|
|
759
760
|
let e = !1;
|
|
760
761
|
if (t === "y")
|
|
761
|
-
e =
|
|
762
|
+
e = cn();
|
|
762
763
|
else if (t === "x")
|
|
763
|
-
e =
|
|
764
|
+
e = un();
|
|
764
765
|
else {
|
|
765
|
-
const n =
|
|
766
|
+
const n = un(), s = cn();
|
|
766
767
|
n && s ? e = () => {
|
|
767
768
|
n(), s();
|
|
768
769
|
} : (n && n(), s && s());
|
|
769
770
|
}
|
|
770
771
|
return e;
|
|
771
772
|
}
|
|
772
|
-
function
|
|
773
|
-
const t =
|
|
773
|
+
function js() {
|
|
774
|
+
const t = Os(!0);
|
|
774
775
|
return t ? (t(), !1) : !0;
|
|
775
776
|
}
|
|
776
777
|
class tt {
|
|
@@ -780,25 +781,25 @@ class tt {
|
|
|
780
781
|
update() {
|
|
781
782
|
}
|
|
782
783
|
}
|
|
783
|
-
function
|
|
784
|
-
const n = "pointer" + (e ? "enter" : "leave"), s = "onHover" + (e ? "Start" : "End"), i = (
|
|
785
|
-
if (
|
|
784
|
+
function hn(t, e) {
|
|
785
|
+
const n = "pointer" + (e ? "enter" : "leave"), s = "onHover" + (e ? "Start" : "End"), i = (o, r) => {
|
|
786
|
+
if (o.pointerType === "touch" || js())
|
|
786
787
|
return;
|
|
787
788
|
const a = t.getProps();
|
|
788
|
-
t.animationState && a.whileHover && t.animationState.setActive("whileHover", e), a[s] && a[s](
|
|
789
|
+
t.animationState && a.whileHover && t.animationState.setActive("whileHover", e), a[s] && a[s](o, r);
|
|
789
790
|
};
|
|
790
791
|
return $(t.current, n, i, {
|
|
791
792
|
passive: !t.getProps()[s]
|
|
792
793
|
});
|
|
793
794
|
}
|
|
794
|
-
class
|
|
795
|
+
class Nr extends tt {
|
|
795
796
|
mount() {
|
|
796
|
-
this.unmount =
|
|
797
|
+
this.unmount = W(hn(this.node, !0), hn(this.node, !1));
|
|
797
798
|
}
|
|
798
799
|
unmount() {
|
|
799
800
|
}
|
|
800
801
|
}
|
|
801
|
-
class
|
|
802
|
+
class Ur extends tt {
|
|
802
803
|
constructor() {
|
|
803
804
|
super(...arguments), this.isActive = !1;
|
|
804
805
|
}
|
|
@@ -815,48 +816,48 @@ class _o extends tt {
|
|
|
815
816
|
!this.isActive || !this.node.animationState || (this.node.animationState.setActive("whileFocus", !1), this.isActive = !1);
|
|
816
817
|
}
|
|
817
818
|
mount() {
|
|
818
|
-
this.unmount =
|
|
819
|
+
this.unmount = W(K(this.node.current, "focus", () => this.onFocus()), K(this.node.current, "blur", () => this.onBlur()));
|
|
819
820
|
}
|
|
820
821
|
unmount() {
|
|
821
822
|
}
|
|
822
823
|
}
|
|
823
|
-
const
|
|
824
|
-
function
|
|
824
|
+
const Is = (t, e) => e ? t === e ? !0 : Is(t, e.parentElement) : !1;
|
|
825
|
+
function Qt(t, e) {
|
|
825
826
|
if (!e)
|
|
826
827
|
return;
|
|
827
828
|
const n = new PointerEvent("pointer" + t);
|
|
828
|
-
e(n,
|
|
829
|
+
e(n, zt(n));
|
|
829
830
|
}
|
|
830
|
-
class
|
|
831
|
+
class Kr extends tt {
|
|
831
832
|
constructor() {
|
|
832
833
|
super(...arguments), this.removeStartListeners = C, this.removeEndListeners = C, this.removeAccessibleListeners = C, this.startPointerPress = (e, n) => {
|
|
833
834
|
if (this.isPressing)
|
|
834
835
|
return;
|
|
835
836
|
this.removeEndListeners();
|
|
836
|
-
const s = this.node.getProps(),
|
|
837
|
+
const s = this.node.getProps(), o = $(window, "pointerup", (a, l) => {
|
|
837
838
|
if (!this.checkPressEnd())
|
|
838
839
|
return;
|
|
839
840
|
const { onTap: u, onTapCancel: c, globalTapTarget: h } = this.node.getProps();
|
|
840
|
-
!h && !
|
|
841
|
-
}, { passive: !(s.onTap || s.onPointerUp) }),
|
|
842
|
-
this.removeEndListeners =
|
|
841
|
+
!h && !Is(this.node.current, a.target) ? c && c(a, l) : u && u(a, l);
|
|
842
|
+
}, { passive: !(s.onTap || s.onPointerUp) }), r = $(window, "pointercancel", (a, l) => this.cancelPress(a, l), { passive: !(s.onTapCancel || s.onPointerCancel) });
|
|
843
|
+
this.removeEndListeners = W(o, r), this.startPress(e, n);
|
|
843
844
|
}, this.startAccessiblePress = () => {
|
|
844
|
-
const e = (
|
|
845
|
-
if (
|
|
845
|
+
const e = (o) => {
|
|
846
|
+
if (o.key !== "Enter" || this.isPressing)
|
|
846
847
|
return;
|
|
847
|
-
const
|
|
848
|
-
a.key !== "Enter" || !this.checkPressEnd() ||
|
|
848
|
+
const r = (a) => {
|
|
849
|
+
a.key !== "Enter" || !this.checkPressEnd() || Qt("up", (l, u) => {
|
|
849
850
|
const { onTap: c } = this.node.getProps();
|
|
850
851
|
c && c(l, u);
|
|
851
852
|
});
|
|
852
853
|
};
|
|
853
|
-
this.removeEndListeners(), this.removeEndListeners = K(this.node.current, "keyup",
|
|
854
|
+
this.removeEndListeners(), this.removeEndListeners = K(this.node.current, "keyup", r), Qt("down", (a, l) => {
|
|
854
855
|
this.startPress(a, l);
|
|
855
856
|
});
|
|
856
857
|
}, n = K(this.node.current, "keydown", e), s = () => {
|
|
857
|
-
this.isPressing &&
|
|
858
|
+
this.isPressing && Qt("cancel", (o, r) => this.cancelPress(o, r));
|
|
858
859
|
}, i = K(this.node.current, "blur", s);
|
|
859
|
-
this.removeAccessibleListeners =
|
|
860
|
+
this.removeAccessibleListeners = W(n, i);
|
|
860
861
|
};
|
|
861
862
|
}
|
|
862
863
|
startPress(e, n) {
|
|
@@ -865,7 +866,7 @@ class Wo extends tt {
|
|
|
865
866
|
i && this.node.animationState && this.node.animationState.setActive("whileTap", !0), s && s(e, n);
|
|
866
867
|
}
|
|
867
868
|
checkPressEnd() {
|
|
868
|
-
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !
|
|
869
|
+
return this.removeEndListeners(), this.isPressing = !1, this.node.getProps().whileTap && this.node.animationState && this.node.animationState.setActive("whileTap", !1), !js();
|
|
869
870
|
}
|
|
870
871
|
cancelPress(e, n) {
|
|
871
872
|
if (!this.checkPressEnd())
|
|
@@ -875,53 +876,53 @@ class Wo extends tt {
|
|
|
875
876
|
}
|
|
876
877
|
mount() {
|
|
877
878
|
const e = this.node.getProps(), n = $(e.globalTapTarget ? window : this.node.current, "pointerdown", this.startPointerPress, { passive: !(e.onTapStart || e.onPointerStart) }), s = K(this.node.current, "focus", this.startAccessiblePress);
|
|
878
|
-
this.removeStartListeners =
|
|
879
|
+
this.removeStartListeners = W(n, s);
|
|
879
880
|
}
|
|
880
881
|
unmount() {
|
|
881
882
|
this.removeStartListeners(), this.removeEndListeners(), this.removeAccessibleListeners();
|
|
882
883
|
}
|
|
883
884
|
}
|
|
884
|
-
const
|
|
885
|
-
const e =
|
|
885
|
+
const de = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), $r = (t) => {
|
|
886
|
+
const e = de.get(t.target);
|
|
886
887
|
e && e(t);
|
|
887
|
-
},
|
|
888
|
-
t.forEach(
|
|
888
|
+
}, Wr = (t) => {
|
|
889
|
+
t.forEach($r);
|
|
889
890
|
};
|
|
890
|
-
function
|
|
891
|
+
function _r({ root: t, ...e }) {
|
|
891
892
|
const n = t || document;
|
|
892
|
-
|
|
893
|
-
const s =
|
|
894
|
-
return s[i] || (s[i] = new IntersectionObserver(
|
|
895
|
-
}
|
|
896
|
-
function
|
|
897
|
-
const s =
|
|
898
|
-
return
|
|
899
|
-
|
|
893
|
+
te.has(n) || te.set(n, {});
|
|
894
|
+
const s = te.get(n), i = JSON.stringify(e);
|
|
895
|
+
return s[i] || (s[i] = new IntersectionObserver(Wr, { root: t, ...e })), s[i];
|
|
896
|
+
}
|
|
897
|
+
function Gr(t, e, n) {
|
|
898
|
+
const s = _r(e);
|
|
899
|
+
return de.set(t, n), s.observe(t), () => {
|
|
900
|
+
de.delete(t), s.unobserve(t);
|
|
900
901
|
};
|
|
901
902
|
}
|
|
902
|
-
const
|
|
903
|
+
const Hr = {
|
|
903
904
|
some: 0,
|
|
904
905
|
all: 1
|
|
905
906
|
};
|
|
906
|
-
class
|
|
907
|
+
class zr extends tt {
|
|
907
908
|
constructor() {
|
|
908
909
|
super(...arguments), this.hasEnteredView = !1, this.isInView = !1;
|
|
909
910
|
}
|
|
910
911
|
startObserver() {
|
|
911
912
|
this.unmount();
|
|
912
|
-
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once:
|
|
913
|
+
const { viewport: e = {} } = this.node.getProps(), { root: n, margin: s, amount: i = "some", once: o } = e, r = {
|
|
913
914
|
root: n ? n.current : void 0,
|
|
914
915
|
rootMargin: s,
|
|
915
|
-
threshold: typeof i == "number" ? i :
|
|
916
|
+
threshold: typeof i == "number" ? i : Hr[i]
|
|
916
917
|
}, a = (l) => {
|
|
917
918
|
const { isIntersecting: u } = l;
|
|
918
|
-
if (this.isInView === u || (this.isInView = u,
|
|
919
|
+
if (this.isInView === u || (this.isInView = u, o && !u && this.hasEnteredView))
|
|
919
920
|
return;
|
|
920
921
|
u && (this.hasEnteredView = !0), this.node.animationState && this.node.animationState.setActive("whileInView", u);
|
|
921
922
|
const { onViewportEnter: c, onViewportLeave: h } = this.node.getProps(), f = u ? c : h;
|
|
922
923
|
f && f(l);
|
|
923
924
|
};
|
|
924
|
-
return
|
|
925
|
+
return Gr(this.node.current, r, a);
|
|
925
926
|
}
|
|
926
927
|
mount() {
|
|
927
928
|
this.startObserver();
|
|
@@ -930,29 +931,29 @@ class qo extends tt {
|
|
|
930
931
|
if (typeof IntersectionObserver > "u")
|
|
931
932
|
return;
|
|
932
933
|
const { props: e, prevProps: n } = this.node;
|
|
933
|
-
["amount", "margin", "root"].some(
|
|
934
|
+
["amount", "margin", "root"].some(Yr(e, n)) && this.startObserver();
|
|
934
935
|
}
|
|
935
936
|
unmount() {
|
|
936
937
|
}
|
|
937
938
|
}
|
|
938
|
-
function
|
|
939
|
+
function Yr({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
939
940
|
return (n) => t[n] !== e[n];
|
|
940
941
|
}
|
|
941
|
-
const
|
|
942
|
+
const Xr = {
|
|
942
943
|
inView: {
|
|
943
|
-
Feature:
|
|
944
|
+
Feature: zr
|
|
944
945
|
},
|
|
945
946
|
tap: {
|
|
946
|
-
Feature:
|
|
947
|
+
Feature: Kr
|
|
947
948
|
},
|
|
948
949
|
focus: {
|
|
949
|
-
Feature:
|
|
950
|
+
Feature: Ur
|
|
950
951
|
},
|
|
951
952
|
hover: {
|
|
952
|
-
Feature:
|
|
953
|
+
Feature: Nr
|
|
953
954
|
}
|
|
954
955
|
};
|
|
955
|
-
function
|
|
956
|
+
function Ns(t, e) {
|
|
956
957
|
if (!Array.isArray(e))
|
|
957
958
|
return !1;
|
|
958
959
|
const n = e.length;
|
|
@@ -963,59 +964,59 @@ function $s(t, e) {
|
|
|
963
964
|
return !1;
|
|
964
965
|
return !0;
|
|
965
966
|
}
|
|
966
|
-
function
|
|
967
|
+
function qr(t) {
|
|
967
968
|
const e = {};
|
|
968
969
|
return t.values.forEach((n, s) => e[s] = n.get()), e;
|
|
969
970
|
}
|
|
970
|
-
function
|
|
971
|
+
function Zr(t) {
|
|
971
972
|
const e = {};
|
|
972
973
|
return t.values.forEach((n, s) => e[s] = n.getVelocity()), e;
|
|
973
974
|
}
|
|
974
|
-
function
|
|
975
|
+
function Yt(t, e, n) {
|
|
975
976
|
const s = t.getProps();
|
|
976
|
-
return
|
|
977
|
+
return Ue(s, e, n !== void 0 ? n : s.custom, qr(t), Zr(t));
|
|
977
978
|
}
|
|
978
|
-
const
|
|
979
|
+
const _ = (t) => t * 1e3, G = (t) => t / 1e3, Jr = {
|
|
979
980
|
type: "spring",
|
|
980
981
|
stiffness: 500,
|
|
981
982
|
damping: 25,
|
|
982
983
|
restSpeed: 10
|
|
983
|
-
},
|
|
984
|
+
}, Qr = (t) => ({
|
|
984
985
|
type: "spring",
|
|
985
986
|
stiffness: 550,
|
|
986
987
|
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
987
988
|
restSpeed: 10
|
|
988
|
-
}),
|
|
989
|
+
}), to = {
|
|
989
990
|
type: "keyframes",
|
|
990
991
|
duration: 0.8
|
|
991
|
-
},
|
|
992
|
+
}, eo = {
|
|
992
993
|
type: "keyframes",
|
|
993
994
|
ease: [0.25, 0.1, 0.35, 1],
|
|
994
995
|
duration: 0.3
|
|
995
|
-
},
|
|
996
|
-
function
|
|
996
|
+
}, no = (t, { keyframes: e }) => e.length > 2 ? to : ot.has(t) ? t.startsWith("scale") ? Qr(e[1]) : Jr : eo;
|
|
997
|
+
function so({ when: t, delay: e, delayChildren: n, staggerChildren: s, staggerDirection: i, repeat: o, repeatType: r, repeatDelay: a, from: l, elapsed: u, ...c }) {
|
|
997
998
|
return !!Object.keys(c).length;
|
|
998
999
|
}
|
|
999
|
-
function
|
|
1000
|
+
function Ke(t, e) {
|
|
1000
1001
|
return t[e] || t.default || t;
|
|
1001
1002
|
}
|
|
1002
|
-
const
|
|
1003
|
-
function
|
|
1004
|
-
const i = t.filter(
|
|
1005
|
-
return !
|
|
1003
|
+
const io = (t) => t !== null;
|
|
1004
|
+
function Xt(t, { repeat: e, repeatType: n = "loop" }, s) {
|
|
1005
|
+
const i = t.filter(io), o = e && n !== "loop" && e % 2 === 1 ? 0 : i.length - 1;
|
|
1006
|
+
return !o || s === void 0 ? i[o] : s;
|
|
1006
1007
|
}
|
|
1007
1008
|
let Bt;
|
|
1008
|
-
function
|
|
1009
|
+
function ro() {
|
|
1009
1010
|
Bt = void 0;
|
|
1010
1011
|
}
|
|
1011
1012
|
const q = {
|
|
1012
|
-
now: () => (Bt === void 0 && q.set(A.isProcessing ||
|
|
1013
|
+
now: () => (Bt === void 0 && q.set(A.isProcessing || zi.useManualTiming ? A.timestamp : performance.now()), Bt),
|
|
1013
1014
|
set: (t) => {
|
|
1014
|
-
Bt = t, queueMicrotask(
|
|
1015
|
+
Bt = t, queueMicrotask(ro);
|
|
1015
1016
|
}
|
|
1016
|
-
},
|
|
1017
|
-
function
|
|
1018
|
-
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" ||
|
|
1017
|
+
}, Us = (t) => /^0[^.\s]+$/u.test(t);
|
|
1018
|
+
function oo(t) {
|
|
1019
|
+
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Us(t) : !0;
|
|
1019
1020
|
}
|
|
1020
1021
|
let Dt = C, H = C;
|
|
1021
1022
|
process.env.NODE_ENV !== "production" && (Dt = (t, e) => {
|
|
@@ -1024,31 +1025,31 @@ process.env.NODE_ENV !== "production" && (Dt = (t, e) => {
|
|
|
1024
1025
|
if (!t)
|
|
1025
1026
|
throw new Error(e);
|
|
1026
1027
|
});
|
|
1027
|
-
const
|
|
1028
|
+
const Ks = (t) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t), ao = (
|
|
1028
1029
|
// eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
|
|
1029
1030
|
/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
|
|
1030
1031
|
);
|
|
1031
|
-
function
|
|
1032
|
-
const e =
|
|
1032
|
+
function lo(t) {
|
|
1033
|
+
const e = ao.exec(t);
|
|
1033
1034
|
if (!e)
|
|
1034
1035
|
return [,];
|
|
1035
1036
|
const [, n, s, i] = e;
|
|
1036
1037
|
return [`--${n ?? s}`, i];
|
|
1037
1038
|
}
|
|
1038
|
-
const
|
|
1039
|
-
function
|
|
1040
|
-
H(n <=
|
|
1041
|
-
const [s, i] =
|
|
1039
|
+
const uo = 4;
|
|
1040
|
+
function $s(t, e, n = 1) {
|
|
1041
|
+
H(n <= uo, `Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);
|
|
1042
|
+
const [s, i] = lo(t);
|
|
1042
1043
|
if (!s)
|
|
1043
1044
|
return;
|
|
1044
|
-
const
|
|
1045
|
-
if (
|
|
1046
|
-
const
|
|
1047
|
-
return
|
|
1045
|
+
const o = window.getComputedStyle(e).getPropertyValue(s);
|
|
1046
|
+
if (o) {
|
|
1047
|
+
const r = o.trim();
|
|
1048
|
+
return Ks(r) ? parseFloat(r) : r;
|
|
1048
1049
|
}
|
|
1049
|
-
return
|
|
1050
|
+
return Fe(i) ? $s(i, e, n + 1) : i;
|
|
1050
1051
|
}
|
|
1051
|
-
const
|
|
1052
|
+
const co = /* @__PURE__ */ new Set([
|
|
1052
1053
|
"width",
|
|
1053
1054
|
"height",
|
|
1054
1055
|
"top",
|
|
@@ -1059,20 +1060,20 @@ const dr = /* @__PURE__ */ new Set([
|
|
|
1059
1060
|
"y",
|
|
1060
1061
|
"translateX",
|
|
1061
1062
|
"translateY"
|
|
1062
|
-
]),
|
|
1063
|
+
]), fn = (t) => t === mt || t === x, dn = (t, e) => parseFloat(t.split(", ")[e]), mn = (t, e) => (n, { transform: s }) => {
|
|
1063
1064
|
if (s === "none" || !s)
|
|
1064
1065
|
return 0;
|
|
1065
1066
|
const i = s.match(/^matrix3d\((.+)\)$/u);
|
|
1066
1067
|
if (i)
|
|
1067
|
-
return
|
|
1068
|
+
return dn(i[1], e);
|
|
1068
1069
|
{
|
|
1069
|
-
const
|
|
1070
|
-
return
|
|
1070
|
+
const o = s.match(/^matrix\((.+)\)$/u);
|
|
1071
|
+
return o ? dn(o[1], t) : 0;
|
|
1071
1072
|
}
|
|
1072
|
-
},
|
|
1073
|
-
function
|
|
1073
|
+
}, ho = /* @__PURE__ */ new Set(["x", "y", "z"]), fo = wt.filter((t) => !ho.has(t));
|
|
1074
|
+
function pn(t) {
|
|
1074
1075
|
const e = [];
|
|
1075
|
-
return
|
|
1076
|
+
return fo.forEach((n) => {
|
|
1076
1077
|
const s = t.getValue(n);
|
|
1077
1078
|
s !== void 0 && (e.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
|
|
1078
1079
|
}), e;
|
|
@@ -1086,59 +1087,59 @@ const ft = {
|
|
|
1086
1087
|
bottom: ({ y: t }, { top: e }) => parseFloat(e) + (t.max - t.min),
|
|
1087
1088
|
right: ({ x: t }, { left: e }) => parseFloat(e) + (t.max - t.min),
|
|
1088
1089
|
// Transform
|
|
1089
|
-
x:
|
|
1090
|
-
y:
|
|
1090
|
+
x: mn(4, 13),
|
|
1091
|
+
y: mn(5, 14)
|
|
1091
1092
|
};
|
|
1092
1093
|
ft.translateX = ft.x;
|
|
1093
1094
|
ft.translateY = ft.y;
|
|
1094
|
-
const
|
|
1095
|
+
const Ws = (t) => (e) => e.test(t), mo = {
|
|
1095
1096
|
test: (t) => t === "auto",
|
|
1096
1097
|
parse: (t) => t
|
|
1097
|
-
},
|
|
1098
|
-
let
|
|
1099
|
-
function
|
|
1100
|
-
if (
|
|
1101
|
-
const t = Array.from(
|
|
1098
|
+
}, _s = [mt, x, N, Y, gr, pr, mo], gn = (t) => _s.find(Ws(t)), rt = /* @__PURE__ */ new Set();
|
|
1099
|
+
let me = !1, pe = !1;
|
|
1100
|
+
function Gs() {
|
|
1101
|
+
if (pe) {
|
|
1102
|
+
const t = Array.from(rt).filter((s) => s.needsMeasurement), e = new Set(t.map((s) => s.element)), n = /* @__PURE__ */ new Map();
|
|
1102
1103
|
e.forEach((s) => {
|
|
1103
|
-
|
|
1104
|
+
pn(s).length && (n.set(s, pn(s)), s.render());
|
|
1104
1105
|
}), t.forEach((s) => s.measureInitialState()), e.forEach((s) => {
|
|
1105
1106
|
s.render();
|
|
1106
1107
|
}), t.forEach((s) => s.measureEndState()), t.forEach((s) => {
|
|
1107
1108
|
s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
|
|
1108
1109
|
});
|
|
1109
1110
|
}
|
|
1110
|
-
|
|
1111
|
+
pe = !1, me = !1, rt.forEach((t) => t.complete()), rt.clear();
|
|
1111
1112
|
}
|
|
1112
|
-
function
|
|
1113
|
-
|
|
1114
|
-
t.readKeyframes(), t.needsMeasurement && (
|
|
1113
|
+
function Hs() {
|
|
1114
|
+
rt.forEach((t) => {
|
|
1115
|
+
t.readKeyframes(), t.needsMeasurement && (pe = !0);
|
|
1115
1116
|
});
|
|
1116
1117
|
}
|
|
1117
|
-
function
|
|
1118
|
-
|
|
1118
|
+
function po() {
|
|
1119
|
+
Hs(), Gs();
|
|
1119
1120
|
}
|
|
1120
|
-
class
|
|
1121
|
-
constructor(e, n, s, i,
|
|
1122
|
-
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element =
|
|
1121
|
+
class $e {
|
|
1122
|
+
constructor(e, n, s, i, o, r = !1) {
|
|
1123
|
+
this.isComplete = !1, this.isAsync = !1, this.needsMeasurement = !1, this.isScheduled = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = s, this.motionValue = i, this.element = o, this.isAsync = r;
|
|
1123
1124
|
}
|
|
1124
1125
|
scheduleResolve() {
|
|
1125
|
-
this.isScheduled = !0, this.isAsync ? (
|
|
1126
|
+
this.isScheduled = !0, this.isAsync ? (rt.add(this), me || (me = !0, D.read(Hs), D.resolveKeyframes(Gs))) : (this.readKeyframes(), this.complete());
|
|
1126
1127
|
}
|
|
1127
1128
|
readKeyframes() {
|
|
1128
1129
|
const { unresolvedKeyframes: e, name: n, element: s, motionValue: i } = this;
|
|
1129
|
-
for (let
|
|
1130
|
-
if (e[
|
|
1131
|
-
if (
|
|
1132
|
-
const
|
|
1133
|
-
if (
|
|
1134
|
-
e[0] =
|
|
1130
|
+
for (let o = 0; o < e.length; o++)
|
|
1131
|
+
if (e[o] === null)
|
|
1132
|
+
if (o === 0) {
|
|
1133
|
+
const r = i == null ? void 0 : i.get(), a = e[e.length - 1];
|
|
1134
|
+
if (r !== void 0)
|
|
1135
|
+
e[0] = r;
|
|
1135
1136
|
else if (s && n) {
|
|
1136
1137
|
const l = s.readValue(n, a);
|
|
1137
1138
|
l != null && (e[0] = l);
|
|
1138
1139
|
}
|
|
1139
|
-
e[0] === void 0 && (e[0] = a), i &&
|
|
1140
|
+
e[0] === void 0 && (e[0] = a), i && r === void 0 && i.set(e[0]);
|
|
1140
1141
|
} else
|
|
1141
|
-
e[
|
|
1142
|
+
e[o] = e[o - 1];
|
|
1142
1143
|
}
|
|
1143
1144
|
setFinalKeyframe() {
|
|
1144
1145
|
}
|
|
@@ -1149,34 +1150,34 @@ class We {
|
|
|
1149
1150
|
measureEndState() {
|
|
1150
1151
|
}
|
|
1151
1152
|
complete() {
|
|
1152
|
-
this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe),
|
|
1153
|
+
this.isComplete = !0, this.onComplete(this.unresolvedKeyframes, this.finalKeyframe), rt.delete(this);
|
|
1153
1154
|
}
|
|
1154
1155
|
cancel() {
|
|
1155
|
-
this.isComplete || (this.isScheduled = !1,
|
|
1156
|
+
this.isComplete || (this.isScheduled = !1, rt.delete(this));
|
|
1156
1157
|
}
|
|
1157
1158
|
resume() {
|
|
1158
1159
|
this.isComplete || this.scheduleResolve();
|
|
1159
1160
|
}
|
|
1160
1161
|
}
|
|
1161
|
-
const
|
|
1162
|
+
const We = (t, e) => (n) => !!(At(n) && mr.test(n) && n.startsWith(t) || e && Object.prototype.hasOwnProperty.call(n, e)), zs = (t, e, n) => (s) => {
|
|
1162
1163
|
if (!At(s))
|
|
1163
1164
|
return s;
|
|
1164
|
-
const [i,
|
|
1165
|
+
const [i, o, r, a] = s.match(Be);
|
|
1165
1166
|
return {
|
|
1166
1167
|
[t]: parseFloat(i),
|
|
1167
|
-
[e]: parseFloat(
|
|
1168
|
-
[n]: parseFloat(
|
|
1168
|
+
[e]: parseFloat(o),
|
|
1169
|
+
[n]: parseFloat(r),
|
|
1169
1170
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
1170
1171
|
};
|
|
1171
|
-
},
|
|
1172
|
+
}, go = (t) => Z(0, 255, t), ee = {
|
|
1172
1173
|
...mt,
|
|
1173
|
-
transform: (t) => Math.round(
|
|
1174
|
+
transform: (t) => Math.round(go(t))
|
|
1174
1175
|
}, it = {
|
|
1175
|
-
test:
|
|
1176
|
-
parse:
|
|
1177
|
-
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" +
|
|
1176
|
+
test: We("rgb", "red"),
|
|
1177
|
+
parse: zs("red", "green", "blue"),
|
|
1178
|
+
transform: ({ red: t, green: e, blue: n, alpha: s = 1 }) => "rgba(" + ee.transform(t) + ", " + ee.transform(e) + ", " + ee.transform(n) + ", " + vt(yt.transform(s)) + ")"
|
|
1178
1179
|
};
|
|
1179
|
-
function
|
|
1180
|
+
function yo(t) {
|
|
1180
1181
|
let e = "", n = "", s = "", i = "";
|
|
1181
1182
|
return t.length > 5 ? (e = t.substring(1, 3), n = t.substring(3, 5), s = t.substring(5, 7), i = t.substring(7, 9)) : (e = t.substring(1, 2), n = t.substring(2, 3), s = t.substring(3, 4), i = t.substring(4, 5), e += e, n += n, s += s, i += i), {
|
|
1182
1183
|
red: parseInt(e, 16),
|
|
@@ -1185,79 +1186,79 @@ function xr(t) {
|
|
|
1185
1186
|
alpha: i ? parseInt(i, 16) / 255 : 1
|
|
1186
1187
|
};
|
|
1187
1188
|
}
|
|
1188
|
-
const
|
|
1189
|
-
test:
|
|
1190
|
-
parse:
|
|
1189
|
+
const ge = {
|
|
1190
|
+
test: We("#"),
|
|
1191
|
+
parse: yo,
|
|
1191
1192
|
transform: it.transform
|
|
1192
1193
|
}, ut = {
|
|
1193
|
-
test:
|
|
1194
|
-
parse:
|
|
1194
|
+
test: We("hsl", "hue"),
|
|
1195
|
+
parse: zs("hue", "saturation", "lightness"),
|
|
1195
1196
|
transform: ({ hue: t, saturation: e, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(t) + ", " + N.transform(vt(e)) + ", " + N.transform(vt(n)) + ", " + vt(yt.transform(s)) + ")"
|
|
1196
1197
|
}, R = {
|
|
1197
|
-
test: (t) => it.test(t) ||
|
|
1198
|
-
parse: (t) => it.test(t) ? it.parse(t) : ut.test(t) ? ut.parse(t) :
|
|
1198
|
+
test: (t) => it.test(t) || ge.test(t) || ut.test(t),
|
|
1199
|
+
parse: (t) => it.test(t) ? it.parse(t) : ut.test(t) ? ut.parse(t) : ge.parse(t),
|
|
1199
1200
|
transform: (t) => At(t) ? t : t.hasOwnProperty("red") ? it.transform(t) : ut.transform(t)
|
|
1200
1201
|
};
|
|
1201
|
-
function
|
|
1202
|
+
function vo(t) {
|
|
1202
1203
|
var e, n;
|
|
1203
|
-
return isNaN(t) && At(t) && (((e = t.match(
|
|
1204
|
+
return isNaN(t) && At(t) && (((e = t.match(Be)) === null || e === void 0 ? void 0 : e.length) || 0) + (((n = t.match(dr)) === null || n === void 0 ? void 0 : n.length) || 0) > 0;
|
|
1204
1205
|
}
|
|
1205
|
-
const
|
|
1206
|
+
const Ys = "number", Xs = "color", xo = "var", To = "var(", yn = "${}", Po = /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;
|
|
1206
1207
|
function It(t) {
|
|
1207
1208
|
const e = t.toString(), n = [], s = {
|
|
1208
1209
|
color: [],
|
|
1209
1210
|
number: [],
|
|
1210
1211
|
var: []
|
|
1211
1212
|
}, i = [];
|
|
1212
|
-
let
|
|
1213
|
-
const a = e.replace(
|
|
1213
|
+
let o = 0;
|
|
1214
|
+
const a = e.replace(Po, (l) => (R.test(l) ? (s.color.push(o), i.push(Xs), n.push(R.parse(l))) : l.startsWith(To) ? (s.var.push(o), i.push(xo), n.push(l)) : (s.number.push(o), i.push(Ys), n.push(parseFloat(l))), ++o, yn)).split(yn);
|
|
1214
1215
|
return { values: n, split: a, indexes: s, types: i };
|
|
1215
1216
|
}
|
|
1216
|
-
function
|
|
1217
|
+
function qs(t) {
|
|
1217
1218
|
return It(t).values;
|
|
1218
1219
|
}
|
|
1219
|
-
function
|
|
1220
|
+
function Zs(t) {
|
|
1220
1221
|
const { split: e, types: n } = It(t), s = e.length;
|
|
1221
1222
|
return (i) => {
|
|
1222
|
-
let
|
|
1223
|
-
for (let
|
|
1224
|
-
if (
|
|
1225
|
-
const a = n[
|
|
1226
|
-
a ===
|
|
1223
|
+
let o = "";
|
|
1224
|
+
for (let r = 0; r < s; r++)
|
|
1225
|
+
if (o += e[r], i[r] !== void 0) {
|
|
1226
|
+
const a = n[r];
|
|
1227
|
+
a === Ys ? o += vt(i[r]) : a === Xs ? o += R.transform(i[r]) : o += i[r];
|
|
1227
1228
|
}
|
|
1228
|
-
return
|
|
1229
|
+
return o;
|
|
1229
1230
|
};
|
|
1230
1231
|
}
|
|
1231
|
-
const
|
|
1232
|
-
function
|
|
1233
|
-
const e =
|
|
1234
|
-
return
|
|
1235
|
-
}
|
|
1236
|
-
const
|
|
1237
|
-
test:
|
|
1238
|
-
parse:
|
|
1239
|
-
createTransformer:
|
|
1240
|
-
getAnimatableNone:
|
|
1241
|
-
},
|
|
1242
|
-
function
|
|
1232
|
+
const bo = (t) => typeof t == "number" ? 0 : t;
|
|
1233
|
+
function So(t) {
|
|
1234
|
+
const e = qs(t);
|
|
1235
|
+
return Zs(t)(e.map(bo));
|
|
1236
|
+
}
|
|
1237
|
+
const Q = {
|
|
1238
|
+
test: vo,
|
|
1239
|
+
parse: qs,
|
|
1240
|
+
createTransformer: Zs,
|
|
1241
|
+
getAnimatableNone: So
|
|
1242
|
+
}, Vo = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
|
|
1243
|
+
function wo(t) {
|
|
1243
1244
|
const [e, n] = t.slice(0, -1).split("(");
|
|
1244
1245
|
if (e === "drop-shadow")
|
|
1245
1246
|
return t;
|
|
1246
|
-
const [s] = n.match(
|
|
1247
|
+
const [s] = n.match(Be) || [];
|
|
1247
1248
|
if (!s)
|
|
1248
1249
|
return t;
|
|
1249
1250
|
const i = n.replace(s, "");
|
|
1250
|
-
let
|
|
1251
|
-
return s !== n && (
|
|
1251
|
+
let o = Vo.has(e) ? 1 : 0;
|
|
1252
|
+
return s !== n && (o *= 100), e + "(" + o + i + ")";
|
|
1252
1253
|
}
|
|
1253
|
-
const
|
|
1254
|
-
...
|
|
1254
|
+
const Ao = /\b([a-z-]*)\(.*?\)/gu, ye = {
|
|
1255
|
+
...Q,
|
|
1255
1256
|
getAnimatableNone: (t) => {
|
|
1256
|
-
const e = t.match(
|
|
1257
|
-
return e ? e.map(
|
|
1257
|
+
const e = t.match(Ao);
|
|
1258
|
+
return e ? e.map(wo).join(" ") : t;
|
|
1258
1259
|
}
|
|
1259
|
-
},
|
|
1260
|
-
...
|
|
1260
|
+
}, Co = {
|
|
1261
|
+
...ws,
|
|
1261
1262
|
// Color props
|
|
1262
1263
|
color: R,
|
|
1263
1264
|
backgroundColor: R,
|
|
@@ -1270,22 +1271,22 @@ const Dr = /\b([a-z-]*)\(.*?\)/gu, xe = {
|
|
|
1270
1271
|
borderRightColor: R,
|
|
1271
1272
|
borderBottomColor: R,
|
|
1272
1273
|
borderLeftColor: R,
|
|
1273
|
-
filter:
|
|
1274
|
-
WebkitFilter:
|
|
1275
|
-
},
|
|
1276
|
-
function
|
|
1277
|
-
let n =
|
|
1278
|
-
return n !==
|
|
1279
|
-
}
|
|
1280
|
-
function
|
|
1274
|
+
filter: ye,
|
|
1275
|
+
WebkitFilter: ye
|
|
1276
|
+
}, _e = (t) => Co[t];
|
|
1277
|
+
function Js(t, e) {
|
|
1278
|
+
let n = _e(t);
|
|
1279
|
+
return n !== ye && (n = Q), n.getAnimatableNone ? n.getAnimatableNone(e) : void 0;
|
|
1280
|
+
}
|
|
1281
|
+
function Do(t, e, n) {
|
|
1281
1282
|
let s = 0, i;
|
|
1282
1283
|
for (; s < t.length && !i; )
|
|
1283
1284
|
typeof t[s] == "string" && t[s] !== "none" && t[s] !== "0" && (i = t[s]), s++;
|
|
1284
1285
|
if (i && n)
|
|
1285
|
-
for (const
|
|
1286
|
-
t[
|
|
1286
|
+
for (const o of e)
|
|
1287
|
+
t[o] = Js(n, i);
|
|
1287
1288
|
}
|
|
1288
|
-
class
|
|
1289
|
+
class Qs extends $e {
|
|
1289
1290
|
constructor(e, n, s, i) {
|
|
1290
1291
|
super(e, n, s, i, i == null ? void 0 : i.owner, !0);
|
|
1291
1292
|
}
|
|
@@ -1296,16 +1297,16 @@ class ni extends We {
|
|
|
1296
1297
|
super.readKeyframes();
|
|
1297
1298
|
for (let l = 0; l < e.length; l++) {
|
|
1298
1299
|
const u = e[l];
|
|
1299
|
-
if (typeof u == "string" &&
|
|
1300
|
-
const c =
|
|
1300
|
+
if (typeof u == "string" && Fe(u)) {
|
|
1301
|
+
const c = $s(u, n.current);
|
|
1301
1302
|
c !== void 0 && (e[l] = c), l === e.length - 1 && (this.finalKeyframe = u);
|
|
1302
1303
|
}
|
|
1303
1304
|
}
|
|
1304
|
-
if (!
|
|
1305
|
+
if (!co.has(s) || e.length !== 2)
|
|
1305
1306
|
return this.resolveNoneKeyframes();
|
|
1306
|
-
const [i,
|
|
1307
|
-
if (
|
|
1308
|
-
if (
|
|
1307
|
+
const [i, o] = e, r = gn(i), a = gn(o);
|
|
1308
|
+
if (r !== a)
|
|
1309
|
+
if (fn(r) && fn(a))
|
|
1309
1310
|
for (let l = 0; l < e.length; l++) {
|
|
1310
1311
|
const u = e[l];
|
|
1311
1312
|
typeof u == "string" && (e[l] = parseFloat(u));
|
|
@@ -1316,8 +1317,8 @@ class ni extends We {
|
|
|
1316
1317
|
resolveNoneKeyframes() {
|
|
1317
1318
|
const { unresolvedKeyframes: e, name: n } = this, s = [];
|
|
1318
1319
|
for (let i = 0; i < e.length; i++)
|
|
1319
|
-
|
|
1320
|
-
s.length &&
|
|
1320
|
+
oo(e[i]) && s.push(i);
|
|
1321
|
+
s.length && Do(e, s, n);
|
|
1321
1322
|
}
|
|
1322
1323
|
measureInitialState() {
|
|
1323
1324
|
const { element: e, unresolvedKeyframes: n, name: s } = this;
|
|
@@ -1332,22 +1333,22 @@ class ni extends We {
|
|
|
1332
1333
|
const { element: n, name: s, unresolvedKeyframes: i } = this;
|
|
1333
1334
|
if (!n.current)
|
|
1334
1335
|
return;
|
|
1335
|
-
const
|
|
1336
|
-
|
|
1337
|
-
const
|
|
1338
|
-
i[
|
|
1336
|
+
const o = n.getValue(s);
|
|
1337
|
+
o && o.jump(this.measuredOrigin, !1);
|
|
1338
|
+
const r = i.length - 1, a = i[r];
|
|
1339
|
+
i[r] = ft[s](n.measureViewportBox(), window.getComputedStyle(n.current)), a !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = a), !((e = this.removedTransforms) === null || e === void 0) && e.length && this.removedTransforms.forEach(([l, u]) => {
|
|
1339
1340
|
n.getValue(l).set(u);
|
|
1340
1341
|
}), this.resolveNoneKeyframes();
|
|
1341
1342
|
}
|
|
1342
1343
|
}
|
|
1343
|
-
function
|
|
1344
|
+
function Mo(t) {
|
|
1344
1345
|
let e;
|
|
1345
1346
|
return () => (e === void 0 && (e = t()), e);
|
|
1346
1347
|
}
|
|
1347
|
-
const
|
|
1348
|
-
(
|
|
1348
|
+
const vn = (t, e) => e === "zIndex" ? !1 : !!(typeof t == "number" || Array.isArray(t) || typeof t == "string" && // It's animatable if we have a string
|
|
1349
|
+
(Q.test(t) || t === "0") && // And it contains numbers and/or colors
|
|
1349
1350
|
!t.startsWith("url("));
|
|
1350
|
-
function
|
|
1351
|
+
function Ro(t) {
|
|
1351
1352
|
const e = t[0];
|
|
1352
1353
|
if (t.length === 1)
|
|
1353
1354
|
return !0;
|
|
@@ -1355,22 +1356,22 @@ function Lr(t) {
|
|
|
1355
1356
|
if (t[n] !== e)
|
|
1356
1357
|
return !0;
|
|
1357
1358
|
}
|
|
1358
|
-
function
|
|
1359
|
+
function Eo(t, e, n, s) {
|
|
1359
1360
|
const i = t[0];
|
|
1360
1361
|
if (i === null)
|
|
1361
1362
|
return !1;
|
|
1362
|
-
const
|
|
1363
|
-
return Dt(
|
|
1363
|
+
const o = t[t.length - 1], r = vn(i, e), a = vn(o, e);
|
|
1364
|
+
return Dt(r === a, `You are trying to animate ${e} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`), !r || !a ? !1 : Ro(t) || n === "spring" && s;
|
|
1364
1365
|
}
|
|
1365
|
-
class
|
|
1366
|
-
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay:
|
|
1366
|
+
class ti {
|
|
1367
|
+
constructor({ autoplay: e = !0, delay: n = 0, type: s = "keyframes", repeat: i = 0, repeatDelay: o = 0, repeatType: r = "loop", ...a }) {
|
|
1367
1368
|
this.isStopped = !1, this.hasAttemptedResolve = !1, this.options = {
|
|
1368
1369
|
autoplay: e,
|
|
1369
1370
|
delay: n,
|
|
1370
1371
|
type: s,
|
|
1371
1372
|
repeat: i,
|
|
1372
|
-
repeatDelay:
|
|
1373
|
-
repeatType:
|
|
1373
|
+
repeatDelay: o,
|
|
1374
|
+
repeatType: r,
|
|
1374
1375
|
...a
|
|
1375
1376
|
}, this.updateFinishedPromise();
|
|
1376
1377
|
}
|
|
@@ -1380,7 +1381,7 @@ class si {
|
|
|
1380
1381
|
* This is a deoptimisation, but at its worst still batches read/writes.
|
|
1381
1382
|
*/
|
|
1382
1383
|
get resolved() {
|
|
1383
|
-
return !this._resolved && !this.hasAttemptedResolve &&
|
|
1384
|
+
return !this._resolved && !this.hasAttemptedResolve && po(), this._resolved;
|
|
1384
1385
|
}
|
|
1385
1386
|
/**
|
|
1386
1387
|
* A method to be called when the keyframes resolver completes. This method
|
|
@@ -1389,12 +1390,12 @@ class si {
|
|
|
1389
1390
|
*/
|
|
1390
1391
|
onKeyframesResolved(e, n) {
|
|
1391
1392
|
this.hasAttemptedResolve = !0;
|
|
1392
|
-
const { name: s, type: i, velocity:
|
|
1393
|
-
if (!u && !
|
|
1394
|
-
if (
|
|
1393
|
+
const { name: s, type: i, velocity: o, delay: r, onComplete: a, onUpdate: l, isGenerator: u } = this.options;
|
|
1394
|
+
if (!u && !Eo(e, s, i, o))
|
|
1395
|
+
if (r)
|
|
1395
1396
|
this.options.duration = 0;
|
|
1396
1397
|
else {
|
|
1397
|
-
l == null || l(
|
|
1398
|
+
l == null || l(Xt(e, this.options, n)), a == null || a(), this.resolveFinishedPromise();
|
|
1398
1399
|
return;
|
|
1399
1400
|
}
|
|
1400
1401
|
const c = this.initPlayback(e, n);
|
|
@@ -1420,34 +1421,34 @@ class si {
|
|
|
1420
1421
|
});
|
|
1421
1422
|
}
|
|
1422
1423
|
}
|
|
1423
|
-
function
|
|
1424
|
+
function ei(t, e) {
|
|
1424
1425
|
return e ? t * (1e3 / e) : 0;
|
|
1425
1426
|
}
|
|
1426
|
-
const
|
|
1427
|
-
function
|
|
1428
|
-
const s = Math.max(e -
|
|
1429
|
-
return
|
|
1430
|
-
}
|
|
1431
|
-
const
|
|
1432
|
-
function
|
|
1433
|
-
let i,
|
|
1434
|
-
Dt(t <=
|
|
1435
|
-
let
|
|
1436
|
-
|
|
1437
|
-
const c = u *
|
|
1438
|
-
return
|
|
1439
|
-
},
|
|
1440
|
-
const h = u *
|
|
1441
|
-
return (-i(u) +
|
|
1427
|
+
const Lo = 5;
|
|
1428
|
+
function ni(t, e, n) {
|
|
1429
|
+
const s = Math.max(e - Lo, 0);
|
|
1430
|
+
return ei(n - t(s), e - s);
|
|
1431
|
+
}
|
|
1432
|
+
const ne = 1e-3, Fo = 0.01, xn = 10, Bo = 0.05, ko = 1;
|
|
1433
|
+
function Oo({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: s = 1 }) {
|
|
1434
|
+
let i, o;
|
|
1435
|
+
Dt(t <= _(xn), "Spring duration must be 10 seconds or less");
|
|
1436
|
+
let r = 1 - e;
|
|
1437
|
+
r = Z(Bo, ko, r), t = Z(Fo, xn, G(t)), r < 1 ? (i = (u) => {
|
|
1438
|
+
const c = u * r, h = c * t, f = c - n, d = ve(u, r), m = Math.exp(-h);
|
|
1439
|
+
return ne - f / d * m;
|
|
1440
|
+
}, o = (u) => {
|
|
1441
|
+
const h = u * r * t, f = h * n + n, d = Math.pow(r, 2) * Math.pow(u, 2) * t, m = Math.exp(-h), p = ve(Math.pow(u, 2), r);
|
|
1442
|
+
return (-i(u) + ne > 0 ? -1 : 1) * ((f - d) * m) / p;
|
|
1442
1443
|
}) : (i = (u) => {
|
|
1443
1444
|
const c = Math.exp(-u * t), h = (u - n) * t + 1;
|
|
1444
|
-
return -
|
|
1445
|
-
},
|
|
1445
|
+
return -ne + c * h;
|
|
1446
|
+
}, o = (u) => {
|
|
1446
1447
|
const c = Math.exp(-u * t), h = (n - u) * (t * t);
|
|
1447
1448
|
return c * h;
|
|
1448
1449
|
});
|
|
1449
|
-
const a = 5 / t, l =
|
|
1450
|
-
if (t =
|
|
1450
|
+
const a = 5 / t, l = Io(i, o, a);
|
|
1451
|
+
if (t = _(t), isNaN(l))
|
|
1451
1452
|
return {
|
|
1452
1453
|
stiffness: 100,
|
|
1453
1454
|
damping: 10,
|
|
@@ -1457,26 +1458,26 @@ function Ir({ duration: t = 800, bounce: e = 0.25, velocity: n = 0, mass: s = 1
|
|
|
1457
1458
|
const u = Math.pow(l, 2) * s;
|
|
1458
1459
|
return {
|
|
1459
1460
|
stiffness: u,
|
|
1460
|
-
damping:
|
|
1461
|
+
damping: r * 2 * Math.sqrt(s * u),
|
|
1461
1462
|
duration: t
|
|
1462
1463
|
};
|
|
1463
1464
|
}
|
|
1464
1465
|
}
|
|
1465
|
-
const
|
|
1466
|
-
function
|
|
1466
|
+
const jo = 12;
|
|
1467
|
+
function Io(t, e, n) {
|
|
1467
1468
|
let s = n;
|
|
1468
|
-
for (let i = 1; i <
|
|
1469
|
+
for (let i = 1; i < jo; i++)
|
|
1469
1470
|
s = s - t(s) / e(s);
|
|
1470
1471
|
return s;
|
|
1471
1472
|
}
|
|
1472
|
-
function
|
|
1473
|
+
function ve(t, e) {
|
|
1473
1474
|
return t * Math.sqrt(1 - e * e);
|
|
1474
1475
|
}
|
|
1475
|
-
const
|
|
1476
|
-
function
|
|
1476
|
+
const No = ["duration", "bounce"], Uo = ["stiffness", "damping", "mass"];
|
|
1477
|
+
function Tn(t, e) {
|
|
1477
1478
|
return e.some((n) => t[n] !== void 0);
|
|
1478
1479
|
}
|
|
1479
|
-
function
|
|
1480
|
+
function Ko(t) {
|
|
1480
1481
|
let e = {
|
|
1481
1482
|
velocity: 0,
|
|
1482
1483
|
stiffness: 100,
|
|
@@ -1485,8 +1486,8 @@ function _r(t) {
|
|
|
1485
1486
|
isResolvedFromDuration: !1,
|
|
1486
1487
|
...t
|
|
1487
1488
|
};
|
|
1488
|
-
if (!
|
|
1489
|
-
const n =
|
|
1489
|
+
if (!Tn(t, Uo) && Tn(t, No)) {
|
|
1490
|
+
const n = Oo(t);
|
|
1490
1491
|
e = {
|
|
1491
1492
|
...e,
|
|
1492
1493
|
...n,
|
|
@@ -1495,26 +1496,26 @@ function _r(t) {
|
|
|
1495
1496
|
}
|
|
1496
1497
|
return e;
|
|
1497
1498
|
}
|
|
1498
|
-
function
|
|
1499
|
-
const i = t[0],
|
|
1499
|
+
function si({ keyframes: t, restDelta: e, restSpeed: n, ...s }) {
|
|
1500
|
+
const i = t[0], o = t[t.length - 1], r = { done: !1, value: i }, { stiffness: a, damping: l, mass: u, duration: c, velocity: h, isResolvedFromDuration: f } = Ko({
|
|
1500
1501
|
...s,
|
|
1501
1502
|
velocity: -G(s.velocity || 0)
|
|
1502
|
-
}), d = h || 0, m = l / (2 * Math.sqrt(a * u)), p =
|
|
1503
|
+
}), d = h || 0, m = l / (2 * Math.sqrt(a * u)), p = o - i, y = G(Math.sqrt(a / u)), v = Math.abs(p) < 5;
|
|
1503
1504
|
n || (n = v ? 0.01 : 2), e || (e = v ? 5e-3 : 0.5);
|
|
1504
1505
|
let T;
|
|
1505
1506
|
if (m < 1) {
|
|
1506
|
-
const g =
|
|
1507
|
+
const g = ve(y, m);
|
|
1507
1508
|
T = (P) => {
|
|
1508
1509
|
const S = Math.exp(-m * y * P);
|
|
1509
|
-
return
|
|
1510
|
+
return o - S * ((d + m * y * p) / g * Math.sin(g * P) + p * Math.cos(g * P));
|
|
1510
1511
|
};
|
|
1511
1512
|
} else if (m === 1)
|
|
1512
|
-
T = (g) =>
|
|
1513
|
+
T = (g) => o - Math.exp(-y * g) * (p + (d + y * p) * g);
|
|
1513
1514
|
else {
|
|
1514
1515
|
const g = y * Math.sqrt(m * m - 1);
|
|
1515
1516
|
T = (P) => {
|
|
1516
1517
|
const S = Math.exp(-m * y * P), M = Math.min(g * P, 300);
|
|
1517
|
-
return
|
|
1518
|
+
return o - S * ((d + m * y * p) * Math.sinh(M) + g * p * Math.cosh(M)) / g;
|
|
1518
1519
|
};
|
|
1519
1520
|
}
|
|
1520
1521
|
return {
|
|
@@ -1522,24 +1523,24 @@ function ri({ keyframes: t, restDelta: e, restSpeed: n, ...s }) {
|
|
|
1522
1523
|
next: (g) => {
|
|
1523
1524
|
const P = T(g);
|
|
1524
1525
|
if (f)
|
|
1525
|
-
|
|
1526
|
+
r.done = g >= c;
|
|
1526
1527
|
else {
|
|
1527
1528
|
let S = d;
|
|
1528
|
-
g !== 0 && (m < 1 ? S =
|
|
1529
|
-
const M = Math.abs(S) <= n, z = Math.abs(
|
|
1530
|
-
|
|
1529
|
+
g !== 0 && (m < 1 ? S = ni(T, g, P) : S = 0);
|
|
1530
|
+
const M = Math.abs(S) <= n, z = Math.abs(o - P) <= e;
|
|
1531
|
+
r.done = M && z;
|
|
1531
1532
|
}
|
|
1532
|
-
return
|
|
1533
|
+
return r.value = r.done ? o : P, r;
|
|
1533
1534
|
}
|
|
1534
1535
|
};
|
|
1535
1536
|
}
|
|
1536
|
-
function
|
|
1537
|
+
function Pn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: i = 10, bounceStiffness: o = 500, modifyTarget: r, min: a, max: l, restDelta: u = 0.5, restSpeed: c }) {
|
|
1537
1538
|
const h = t[0], f = {
|
|
1538
1539
|
done: !1,
|
|
1539
1540
|
value: h
|
|
1540
1541
|
}, d = (b) => a !== void 0 && b < a || l !== void 0 && b > l, m = (b) => a === void 0 ? l : l === void 0 || Math.abs(a - b) < Math.abs(l - b) ? a : l;
|
|
1541
1542
|
let p = n * e;
|
|
1542
|
-
const y = h + p, v =
|
|
1543
|
+
const y = h + p, v = r === void 0 ? y : r(y);
|
|
1543
1544
|
v !== y && (p = v - h);
|
|
1544
1545
|
const T = (b) => -p * Math.exp(-b / s), g = (b) => v + T(b), P = (b) => {
|
|
1545
1546
|
const k = T(b), O = g(b);
|
|
@@ -1547,11 +1548,11 @@ function Vn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
1547
1548
|
};
|
|
1548
1549
|
let S, M;
|
|
1549
1550
|
const z = (b) => {
|
|
1550
|
-
d(f.value) && (S = b, M =
|
|
1551
|
+
d(f.value) && (S = b, M = si({
|
|
1551
1552
|
keyframes: [f.value, m(f.value)],
|
|
1552
|
-
velocity:
|
|
1553
|
+
velocity: ni(g, b, f.value),
|
|
1553
1554
|
damping: i,
|
|
1554
|
-
stiffness:
|
|
1555
|
+
stiffness: o,
|
|
1555
1556
|
restDelta: u,
|
|
1556
1557
|
restSpeed: c
|
|
1557
1558
|
}));
|
|
@@ -1564,226 +1565,226 @@ function Vn({ keyframes: t, velocity: e = 0, power: n = 0.8, timeConstant: s = 3
|
|
|
1564
1565
|
}
|
|
1565
1566
|
};
|
|
1566
1567
|
}
|
|
1567
|
-
const
|
|
1568
|
-
function
|
|
1569
|
-
let
|
|
1568
|
+
const ii = (t, e, n) => (((1 - 3 * n + 3 * e) * t + (3 * n - 6 * e)) * t + 3 * e) * t, $o = 1e-7, Wo = 12;
|
|
1569
|
+
function _o(t, e, n, s, i) {
|
|
1570
|
+
let o, r, a = 0;
|
|
1570
1571
|
do
|
|
1571
|
-
|
|
1572
|
-
while (Math.abs(
|
|
1573
|
-
return
|
|
1572
|
+
r = e + (n - e) / 2, o = ii(r, s, i) - t, o > 0 ? n = r : e = r;
|
|
1573
|
+
while (Math.abs(o) > $o && ++a < Wo);
|
|
1574
|
+
return r;
|
|
1574
1575
|
}
|
|
1575
1576
|
function Mt(t, e, n, s) {
|
|
1576
1577
|
if (t === e && n === s)
|
|
1577
1578
|
return C;
|
|
1578
|
-
const i = (
|
|
1579
|
-
return (
|
|
1579
|
+
const i = (o) => _o(o, 0, 1, t, n);
|
|
1580
|
+
return (o) => o === 0 || o === 1 ? o : ii(i(o), e, s);
|
|
1580
1581
|
}
|
|
1581
|
-
const
|
|
1582
|
+
const Go = Mt(0.42, 0, 1, 1), Ho = Mt(0, 0, 0.58, 1), ri = Mt(0.42, 0, 0.58, 1), zo = (t) => Array.isArray(t) && typeof t[0] != "number", oi = (t) => (e) => e <= 0.5 ? t(2 * e) / 2 : (2 - t(2 * (1 - e))) / 2, ai = (t) => (e) => 1 - t(1 - e), Ge = (t) => 1 - Math.sin(Math.acos(t)), li = ai(Ge), Yo = oi(Ge), ui = Mt(0.33, 1.53, 0.69, 0.99), He = ai(ui), Xo = oi(He), qo = (t) => (t *= 2) < 1 ? 0.5 * He(t) : 0.5 * (2 - Math.pow(2, -10 * (t - 1))), bn = {
|
|
1582
1583
|
linear: C,
|
|
1583
|
-
easeIn:
|
|
1584
|
-
easeInOut:
|
|
1585
|
-
easeOut:
|
|
1586
|
-
circIn:
|
|
1587
|
-
circInOut:
|
|
1588
|
-
circOut:
|
|
1589
|
-
backIn:
|
|
1590
|
-
backInOut:
|
|
1591
|
-
backOut:
|
|
1592
|
-
anticipate:
|
|
1593
|
-
},
|
|
1584
|
+
easeIn: Go,
|
|
1585
|
+
easeInOut: ri,
|
|
1586
|
+
easeOut: Ho,
|
|
1587
|
+
circIn: Ge,
|
|
1588
|
+
circInOut: Yo,
|
|
1589
|
+
circOut: li,
|
|
1590
|
+
backIn: He,
|
|
1591
|
+
backInOut: Xo,
|
|
1592
|
+
backOut: ui,
|
|
1593
|
+
anticipate: qo
|
|
1594
|
+
}, Sn = (t) => {
|
|
1594
1595
|
if (Array.isArray(t)) {
|
|
1595
1596
|
H(t.length === 4, "Cubic bezier arrays must contain four numerical values.");
|
|
1596
1597
|
const [e, n, s, i] = t;
|
|
1597
1598
|
return Mt(e, n, s, i);
|
|
1598
1599
|
} else if (typeof t == "string")
|
|
1599
|
-
return H(
|
|
1600
|
+
return H(bn[t] !== void 0, `Invalid easing type '${t}'`), bn[t];
|
|
1600
1601
|
return t;
|
|
1601
1602
|
}, St = (t, e, n) => {
|
|
1602
1603
|
const s = e - t;
|
|
1603
1604
|
return s === 0 ? 1 : (n - t) / s;
|
|
1604
1605
|
}, V = (t, e, n) => t + (e - t) * n;
|
|
1605
|
-
function
|
|
1606
|
+
function se(t, e, n) {
|
|
1606
1607
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
|
|
1607
1608
|
}
|
|
1608
|
-
function
|
|
1609
|
+
function Zo({ hue: t, saturation: e, lightness: n, alpha: s }) {
|
|
1609
1610
|
t /= 360, e /= 100, n /= 100;
|
|
1610
|
-
let i = 0,
|
|
1611
|
+
let i = 0, o = 0, r = 0;
|
|
1611
1612
|
if (!e)
|
|
1612
|
-
i =
|
|
1613
|
+
i = o = r = n;
|
|
1613
1614
|
else {
|
|
1614
1615
|
const a = n < 0.5 ? n * (1 + e) : n + e - n * e, l = 2 * n - a;
|
|
1615
|
-
i =
|
|
1616
|
+
i = se(l, a, t + 1 / 3), o = se(l, a, t), r = se(l, a, t - 1 / 3);
|
|
1616
1617
|
}
|
|
1617
1618
|
return {
|
|
1618
1619
|
red: Math.round(i * 255),
|
|
1619
|
-
green: Math.round(
|
|
1620
|
-
blue: Math.round(
|
|
1620
|
+
green: Math.round(o * 255),
|
|
1621
|
+
blue: Math.round(r * 255),
|
|
1621
1622
|
alpha: s
|
|
1622
1623
|
};
|
|
1623
1624
|
}
|
|
1624
|
-
const
|
|
1625
|
+
const ie = (t, e, n) => {
|
|
1625
1626
|
const s = t * t, i = n * (e * e - s) + s;
|
|
1626
1627
|
return i < 0 ? 0 : Math.sqrt(i);
|
|
1627
|
-
},
|
|
1628
|
-
function
|
|
1629
|
-
const e =
|
|
1628
|
+
}, Jo = [ge, it, ut], Qo = (t) => Jo.find((e) => e.test(t));
|
|
1629
|
+
function Vn(t) {
|
|
1630
|
+
const e = Qo(t);
|
|
1630
1631
|
H(!!e, `'${t}' is not an animatable color. Use the equivalent color code instead.`);
|
|
1631
1632
|
let n = e.parse(t);
|
|
1632
|
-
return e === ut && (n =
|
|
1633
|
+
return e === ut && (n = Zo(n)), n;
|
|
1633
1634
|
}
|
|
1634
|
-
const
|
|
1635
|
-
const n =
|
|
1636
|
-
return (
|
|
1635
|
+
const wn = (t, e) => {
|
|
1636
|
+
const n = Vn(t), s = Vn(e), i = { ...n };
|
|
1637
|
+
return (o) => (i.red = ie(n.red, s.red, o), i.green = ie(n.green, s.green, o), i.blue = ie(n.blue, s.blue, o), i.alpha = V(n.alpha, s.alpha, o), it.transform(i));
|
|
1637
1638
|
};
|
|
1638
|
-
function
|
|
1639
|
+
function xe(t, e) {
|
|
1639
1640
|
return (n) => n > 0 ? e : t;
|
|
1640
1641
|
}
|
|
1641
|
-
function
|
|
1642
|
+
function ta(t, e) {
|
|
1642
1643
|
return (n) => V(t, e, n);
|
|
1643
1644
|
}
|
|
1644
|
-
function
|
|
1645
|
-
return typeof t == "number" ?
|
|
1645
|
+
function ze(t) {
|
|
1646
|
+
return typeof t == "number" ? ta : typeof t == "string" ? Fe(t) ? xe : R.test(t) ? wn : sa : Array.isArray(t) ? ci : typeof t == "object" ? R.test(t) ? wn : ea : xe;
|
|
1646
1647
|
}
|
|
1647
|
-
function
|
|
1648
|
-
const n = [...t], s = n.length, i = t.map((
|
|
1649
|
-
return (
|
|
1650
|
-
for (let
|
|
1651
|
-
n[
|
|
1648
|
+
function ci(t, e) {
|
|
1649
|
+
const n = [...t], s = n.length, i = t.map((o, r) => ze(o)(o, e[r]));
|
|
1650
|
+
return (o) => {
|
|
1651
|
+
for (let r = 0; r < s; r++)
|
|
1652
|
+
n[r] = i[r](o);
|
|
1652
1653
|
return n;
|
|
1653
1654
|
};
|
|
1654
1655
|
}
|
|
1655
|
-
function
|
|
1656
|
+
function ea(t, e) {
|
|
1656
1657
|
const n = { ...t, ...e }, s = {};
|
|
1657
1658
|
for (const i in n)
|
|
1658
|
-
t[i] !== void 0 && e[i] !== void 0 && (s[i] =
|
|
1659
|
+
t[i] !== void 0 && e[i] !== void 0 && (s[i] = ze(t[i])(t[i], e[i]));
|
|
1659
1660
|
return (i) => {
|
|
1660
|
-
for (const
|
|
1661
|
-
n[
|
|
1661
|
+
for (const o in s)
|
|
1662
|
+
n[o] = s[o](i);
|
|
1662
1663
|
return n;
|
|
1663
1664
|
};
|
|
1664
1665
|
}
|
|
1665
|
-
function
|
|
1666
|
+
function na(t, e) {
|
|
1666
1667
|
var n;
|
|
1667
1668
|
const s = [], i = { color: 0, var: 0, number: 0 };
|
|
1668
|
-
for (let
|
|
1669
|
-
const
|
|
1670
|
-
s[
|
|
1669
|
+
for (let o = 0; o < e.values.length; o++) {
|
|
1670
|
+
const r = e.types[o], a = t.indexes[r][i[r]], l = (n = t.values[a]) !== null && n !== void 0 ? n : 0;
|
|
1671
|
+
s[o] = l, i[r]++;
|
|
1671
1672
|
}
|
|
1672
1673
|
return s;
|
|
1673
1674
|
}
|
|
1674
|
-
const
|
|
1675
|
-
const n =
|
|
1676
|
-
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ?
|
|
1675
|
+
const sa = (t, e) => {
|
|
1676
|
+
const n = Q.createTransformer(e), s = It(t), i = It(e);
|
|
1677
|
+
return s.indexes.var.length === i.indexes.var.length && s.indexes.color.length === i.indexes.color.length && s.indexes.number.length >= i.indexes.number.length ? W(ci(na(s, i), i.values), n) : (Dt(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), xe(t, e));
|
|
1677
1678
|
};
|
|
1678
|
-
function
|
|
1679
|
-
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? V(t, e, n) :
|
|
1679
|
+
function hi(t, e, n) {
|
|
1680
|
+
return typeof t == "number" && typeof e == "number" && typeof n == "number" ? V(t, e, n) : ze(t)(t, e);
|
|
1680
1681
|
}
|
|
1681
|
-
function
|
|
1682
|
-
const s = [], i = n ||
|
|
1683
|
-
for (let
|
|
1684
|
-
let a = i(t[
|
|
1682
|
+
function ia(t, e, n) {
|
|
1683
|
+
const s = [], i = n || hi, o = t.length - 1;
|
|
1684
|
+
for (let r = 0; r < o; r++) {
|
|
1685
|
+
let a = i(t[r], t[r + 1]);
|
|
1685
1686
|
if (e) {
|
|
1686
|
-
const l = Array.isArray(e) ? e[
|
|
1687
|
-
a =
|
|
1687
|
+
const l = Array.isArray(e) ? e[r] || C : e;
|
|
1688
|
+
a = W(l, a);
|
|
1688
1689
|
}
|
|
1689
1690
|
s.push(a);
|
|
1690
1691
|
}
|
|
1691
1692
|
return s;
|
|
1692
1693
|
}
|
|
1693
|
-
function
|
|
1694
|
-
const
|
|
1695
|
-
if (H(
|
|
1694
|
+
function ra(t, e, { clamp: n = !0, ease: s, mixer: i } = {}) {
|
|
1695
|
+
const o = t.length;
|
|
1696
|
+
if (H(o === e.length, "Both input and output ranges must be the same length"), o === 1)
|
|
1696
1697
|
return () => e[0];
|
|
1697
|
-
if (
|
|
1698
|
+
if (o === 2 && t[0] === t[1])
|
|
1698
1699
|
return () => e[1];
|
|
1699
|
-
t[0] > t[
|
|
1700
|
-
const
|
|
1700
|
+
t[0] > t[o - 1] && (t = [...t].reverse(), e = [...e].reverse());
|
|
1701
|
+
const r = ia(e, s, i), a = r.length, l = (u) => {
|
|
1701
1702
|
let c = 0;
|
|
1702
1703
|
if (a > 1)
|
|
1703
1704
|
for (; c < t.length - 2 && !(u < t[c + 1]); c++)
|
|
1704
1705
|
;
|
|
1705
1706
|
const h = St(t[c], t[c + 1], u);
|
|
1706
|
-
return
|
|
1707
|
+
return r[c](h);
|
|
1707
1708
|
};
|
|
1708
|
-
return n ? (u) => l(Z(t[0], t[
|
|
1709
|
+
return n ? (u) => l(Z(t[0], t[o - 1], u)) : l;
|
|
1709
1710
|
}
|
|
1710
|
-
function
|
|
1711
|
+
function oa(t, e) {
|
|
1711
1712
|
const n = t[t.length - 1];
|
|
1712
1713
|
for (let s = 1; s <= e; s++) {
|
|
1713
1714
|
const i = St(0, e, s);
|
|
1714
1715
|
t.push(V(n, 1, i));
|
|
1715
1716
|
}
|
|
1716
1717
|
}
|
|
1717
|
-
function
|
|
1718
|
+
function aa(t) {
|
|
1718
1719
|
const e = [0];
|
|
1719
|
-
return
|
|
1720
|
+
return oa(e, t.length - 1), e;
|
|
1720
1721
|
}
|
|
1721
|
-
function
|
|
1722
|
+
function la(t, e) {
|
|
1722
1723
|
return t.map((n) => n * e);
|
|
1723
1724
|
}
|
|
1724
|
-
function
|
|
1725
|
-
return t.map(() => e ||
|
|
1725
|
+
function ua(t, e) {
|
|
1726
|
+
return t.map(() => e || ri).splice(0, t.length - 1);
|
|
1726
1727
|
}
|
|
1727
1728
|
function Nt({ duration: t = 300, keyframes: e, times: n, ease: s = "easeInOut" }) {
|
|
1728
|
-
const i =
|
|
1729
|
+
const i = zo(s) ? s.map(Sn) : Sn(s), o = {
|
|
1729
1730
|
done: !1,
|
|
1730
1731
|
value: e[0]
|
|
1731
|
-
},
|
|
1732
|
+
}, r = la(
|
|
1732
1733
|
// Only use the provided offsets if they're the correct length
|
|
1733
1734
|
// TODO Maybe we should warn here if there's a length mismatch
|
|
1734
|
-
n && n.length === e.length ? n :
|
|
1735
|
+
n && n.length === e.length ? n : aa(e),
|
|
1735
1736
|
t
|
|
1736
|
-
), a =
|
|
1737
|
-
ease: Array.isArray(i) ? i :
|
|
1737
|
+
), a = ra(r, e, {
|
|
1738
|
+
ease: Array.isArray(i) ? i : ua(e, i)
|
|
1738
1739
|
});
|
|
1739
1740
|
return {
|
|
1740
1741
|
calculatedDuration: t,
|
|
1741
|
-
next: (l) => (
|
|
1742
|
+
next: (l) => (o.value = a(l), o.done = l >= t, o)
|
|
1742
1743
|
};
|
|
1743
1744
|
}
|
|
1744
|
-
const
|
|
1745
|
-
function
|
|
1745
|
+
const An = 2e4;
|
|
1746
|
+
function ca(t) {
|
|
1746
1747
|
let e = 0;
|
|
1747
1748
|
const n = 50;
|
|
1748
1749
|
let s = t.next(e);
|
|
1749
|
-
for (; !s.done && e <
|
|
1750
|
+
for (; !s.done && e < An; )
|
|
1750
1751
|
e += n, s = t.next(e);
|
|
1751
|
-
return e >=
|
|
1752
|
+
return e >= An ? 1 / 0 : e;
|
|
1752
1753
|
}
|
|
1753
|
-
const
|
|
1754
|
+
const ha = (t) => {
|
|
1754
1755
|
const e = ({ timestamp: n }) => t(n);
|
|
1755
1756
|
return {
|
|
1756
1757
|
start: () => D.update(e, !0),
|
|
1757
|
-
stop: () =>
|
|
1758
|
+
stop: () => J(e),
|
|
1758
1759
|
/**
|
|
1759
1760
|
* If we're processing this frame we can use the
|
|
1760
1761
|
* framelocked timestamp to keep things in sync.
|
|
1761
1762
|
*/
|
|
1762
1763
|
now: () => A.isProcessing ? A.timestamp : q.now()
|
|
1763
1764
|
};
|
|
1764
|
-
},
|
|
1765
|
-
decay:
|
|
1766
|
-
inertia:
|
|
1765
|
+
}, fa = {
|
|
1766
|
+
decay: Pn,
|
|
1767
|
+
inertia: Pn,
|
|
1767
1768
|
tween: Nt,
|
|
1768
1769
|
keyframes: Nt,
|
|
1769
|
-
spring:
|
|
1770
|
-
},
|
|
1771
|
-
class
|
|
1772
|
-
constructor({ KeyframeResolver: e =
|
|
1770
|
+
spring: si
|
|
1771
|
+
}, da = (t) => t / 100;
|
|
1772
|
+
class Ye extends ti {
|
|
1773
|
+
constructor({ KeyframeResolver: e = $e, ...n }) {
|
|
1773
1774
|
super(n), this.holdTime = null, this.startTime = null, this.cancelTime = null, this.currentTime = 0, this.playbackSpeed = 1, this.pendingPlayState = "running", this.state = "idle";
|
|
1774
|
-
const { name: s, motionValue: i, keyframes:
|
|
1775
|
-
s && i && i.owner ? this.resolver = i.owner.resolveKeyframes(
|
|
1775
|
+
const { name: s, motionValue: i, keyframes: o } = this.options, r = (a, l) => this.onKeyframesResolved(a, l);
|
|
1776
|
+
s && i && i.owner ? this.resolver = i.owner.resolveKeyframes(o, r, s, i) : this.resolver = new e(o, r, s, i), this.resolver.scheduleResolve();
|
|
1776
1777
|
}
|
|
1777
1778
|
initPlayback(e) {
|
|
1778
|
-
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType:
|
|
1779
|
+
const { type: n = "keyframes", repeat: s = 0, repeatDelay: i = 0, repeatType: o, velocity: r = 0 } = this.options, a = fa[n] || Nt;
|
|
1779
1780
|
let l, u;
|
|
1780
|
-
a !== Nt && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && H(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l =
|
|
1781
|
+
a !== Nt && typeof e[0] != "number" && (process.env.NODE_ENV !== "production" && H(e.length === 2, `Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`), l = W(da, hi(e[0], e[1])), e = [0, 100]);
|
|
1781
1782
|
const c = a({ ...this.options, keyframes: e });
|
|
1782
|
-
|
|
1783
|
+
o === "mirror" && (u = a({
|
|
1783
1784
|
...this.options,
|
|
1784
1785
|
keyframes: [...e].reverse(),
|
|
1785
|
-
velocity: -
|
|
1786
|
-
})), c.calculatedDuration === null && (c.calculatedDuration =
|
|
1786
|
+
velocity: -r
|
|
1787
|
+
})), c.calculatedDuration === null && (c.calculatedDuration = ca(c));
|
|
1787
1788
|
const { calculatedDuration: h } = c, f = h + i, d = f * (s + 1) - i;
|
|
1788
1789
|
return {
|
|
1789
1790
|
generator: c,
|
|
@@ -1804,25 +1805,25 @@ class qe extends si {
|
|
|
1804
1805
|
const { keyframes: b } = this.options;
|
|
1805
1806
|
return { done: !0, value: b[b.length - 1] };
|
|
1806
1807
|
}
|
|
1807
|
-
const { finalKeyframe: i, generator:
|
|
1808
|
+
const { finalKeyframe: i, generator: o, mirroredGenerator: r, mapPercentToKeyframes: a, keyframes: l, calculatedDuration: u, totalDuration: c, resolvedDuration: h } = s;
|
|
1808
1809
|
if (this.startTime === null)
|
|
1809
|
-
return
|
|
1810
|
+
return o.next(0);
|
|
1810
1811
|
const { delay: f, repeat: d, repeatType: m, repeatDelay: p, onUpdate: y } = this.options;
|
|
1811
1812
|
this.speed > 0 ? this.startTime = Math.min(this.startTime, e) : this.speed < 0 && (this.startTime = Math.min(e - c / this.speed, this.startTime)), n ? this.currentTime = e : this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = Math.round(e - this.startTime) * this.speed;
|
|
1812
1813
|
const v = this.currentTime - f * (this.speed >= 0 ? 1 : -1), T = this.speed >= 0 ? v < 0 : v > c;
|
|
1813
1814
|
this.currentTime = Math.max(v, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = c);
|
|
1814
|
-
let g = this.currentTime, P =
|
|
1815
|
+
let g = this.currentTime, P = o;
|
|
1815
1816
|
if (d) {
|
|
1816
1817
|
const b = Math.min(this.currentTime, c) / h;
|
|
1817
1818
|
let k = Math.floor(b), O = b % 1;
|
|
1818
|
-
!O && b >= 1 && (O = 1), O === 1 && k--, k = Math.min(k, d + 1), !!(k % 2) && (m === "reverse" ? (O = 1 - O, p && (O -= p / h)) : m === "mirror" && (P =
|
|
1819
|
+
!O && b >= 1 && (O = 1), O === 1 && k--, k = Math.min(k, d + 1), !!(k % 2) && (m === "reverse" ? (O = 1 - O, p && (O -= p / h)) : m === "mirror" && (P = r)), g = Z(0, 1, O) * h;
|
|
1819
1820
|
}
|
|
1820
1821
|
const S = T ? { done: !1, value: l[0] } : P.next(g);
|
|
1821
1822
|
a && (S.value = a(S.value));
|
|
1822
1823
|
let { done: M } = S;
|
|
1823
1824
|
!T && u !== null && (M = this.speed >= 0 ? this.currentTime >= c : this.currentTime <= 0);
|
|
1824
1825
|
const z = this.holdTime === null && (this.state === "finished" || this.state === "running" && M);
|
|
1825
|
-
return z && i !== void 0 && (S.value =
|
|
1826
|
+
return z && i !== void 0 && (S.value = Xt(l, this.options, i)), y && y(S.value), z && this.finish(), S;
|
|
1826
1827
|
}
|
|
1827
1828
|
get duration() {
|
|
1828
1829
|
const { resolved: e } = this;
|
|
@@ -1832,7 +1833,7 @@ class qe extends si {
|
|
|
1832
1833
|
return G(this.currentTime);
|
|
1833
1834
|
}
|
|
1834
1835
|
set time(e) {
|
|
1835
|
-
e =
|
|
1836
|
+
e = _(e), this.currentTime = e, this.holdTime !== null || this.speed === 0 ? this.holdTime = e : this.driver && (this.startTime = this.driver.now() - e / this.speed);
|
|
1836
1837
|
}
|
|
1837
1838
|
get speed() {
|
|
1838
1839
|
return this.playbackSpeed;
|
|
@@ -1848,7 +1849,7 @@ class qe extends si {
|
|
|
1848
1849
|
}
|
|
1849
1850
|
if (this.isStopped)
|
|
1850
1851
|
return;
|
|
1851
|
-
const { driver: e =
|
|
1852
|
+
const { driver: e = ha, onPlay: n } = this.options;
|
|
1852
1853
|
this.driver || (this.driver = e((i) => this.tick(i))), n && n();
|
|
1853
1854
|
const s = this.driver.now();
|
|
1854
1855
|
this.holdTime !== null ? this.startTime = s - this.holdTime : (!this.startTime || this.state === "finished") && (this.startTime = s), this.state === "finished" && this.updateFinishedPromise(), this.cancelTime = this.startTime, this.holdTime = null, this.state = "running", this.driver.start();
|
|
@@ -1889,11 +1890,11 @@ class qe extends si {
|
|
|
1889
1890
|
return this.startTime = 0, this.tick(e, !0);
|
|
1890
1891
|
}
|
|
1891
1892
|
}
|
|
1892
|
-
const
|
|
1893
|
-
function
|
|
1894
|
-
return !!(!t || typeof t == "string" &&
|
|
1893
|
+
const fi = (t) => Array.isArray(t) && typeof t[0] == "number";
|
|
1894
|
+
function di(t) {
|
|
1895
|
+
return !!(!t || typeof t == "string" && mi[t] || fi(t) || Array.isArray(t) && t.every(di));
|
|
1895
1896
|
}
|
|
1896
|
-
const gt = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`,
|
|
1897
|
+
const gt = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, mi = {
|
|
1897
1898
|
linear: "linear",
|
|
1898
1899
|
ease: "ease",
|
|
1899
1900
|
easeIn: "ease-in",
|
|
@@ -1904,24 +1905,24 @@ const gt = ([t, e, n, s]) => `cubic-bezier(${t}, ${e}, ${n}, ${s})`, yi = {
|
|
|
1904
1905
|
backIn: gt([0.31, 0.01, 0.66, -0.59]),
|
|
1905
1906
|
backOut: gt([0.33, 1.53, 0.69, 0.99])
|
|
1906
1907
|
};
|
|
1907
|
-
function
|
|
1908
|
+
function pi(t) {
|
|
1908
1909
|
if (t)
|
|
1909
|
-
return
|
|
1910
|
+
return fi(t) ? gt(t) : Array.isArray(t) ? t.map(pi) : mi[t];
|
|
1910
1911
|
}
|
|
1911
|
-
function
|
|
1912
|
+
function ma(t, e, n, { delay: s = 0, duration: i = 300, repeat: o = 0, repeatType: r = "loop", ease: a, times: l } = {}) {
|
|
1912
1913
|
const u = { [e]: n };
|
|
1913
1914
|
l && (u.offset = l);
|
|
1914
|
-
const c =
|
|
1915
|
+
const c = pi(a);
|
|
1915
1916
|
return Array.isArray(c) && (u.easing = c), t.animate(u, {
|
|
1916
1917
|
delay: s,
|
|
1917
1918
|
duration: i,
|
|
1918
1919
|
easing: Array.isArray(c) ? "linear" : c,
|
|
1919
1920
|
fill: "both",
|
|
1920
|
-
iterations:
|
|
1921
|
-
direction:
|
|
1921
|
+
iterations: o + 1,
|
|
1922
|
+
direction: r === "reverse" ? "alternate" : "normal"
|
|
1922
1923
|
});
|
|
1923
1924
|
}
|
|
1924
|
-
const
|
|
1925
|
+
const pa = Mo(() => Object.hasOwnProperty.call(Element.prototype, "animate")), ga = /* @__PURE__ */ new Set([
|
|
1925
1926
|
"opacity",
|
|
1926
1927
|
"clipPath",
|
|
1927
1928
|
"filter",
|
|
@@ -1929,12 +1930,12 @@ const ya = Er(() => Object.hasOwnProperty.call(Element.prototype, "animate")), v
|
|
|
1929
1930
|
// TODO: Can be accelerated but currently disabled until https://issues.chromium.org/issues/41491098 is resolved
|
|
1930
1931
|
// or until we implement support for linear() easing.
|
|
1931
1932
|
// "background-color"
|
|
1932
|
-
]), Ut = 10,
|
|
1933
|
-
function
|
|
1934
|
-
return t.type === "spring" || t.name === "backgroundColor" || !
|
|
1933
|
+
]), Ut = 10, ya = 2e4;
|
|
1934
|
+
function va(t) {
|
|
1935
|
+
return t.type === "spring" || t.name === "backgroundColor" || !di(t.ease);
|
|
1935
1936
|
}
|
|
1936
|
-
function
|
|
1937
|
-
const n = new
|
|
1937
|
+
function xa(t, e) {
|
|
1938
|
+
const n = new Ye({
|
|
1938
1939
|
...e,
|
|
1939
1940
|
keyframes: t,
|
|
1940
1941
|
repeat: 0,
|
|
@@ -1943,41 +1944,41 @@ function Pa(t, e) {
|
|
|
1943
1944
|
});
|
|
1944
1945
|
let s = { done: !1, value: t[0] };
|
|
1945
1946
|
const i = [];
|
|
1946
|
-
let
|
|
1947
|
-
for (; !s.done &&
|
|
1948
|
-
s = n.sample(
|
|
1947
|
+
let o = 0;
|
|
1948
|
+
for (; !s.done && o < ya; )
|
|
1949
|
+
s = n.sample(o), i.push(s.value), o += Ut;
|
|
1949
1950
|
return {
|
|
1950
1951
|
times: void 0,
|
|
1951
1952
|
keyframes: i,
|
|
1952
|
-
duration:
|
|
1953
|
+
duration: o - Ut,
|
|
1953
1954
|
ease: "linear"
|
|
1954
1955
|
};
|
|
1955
1956
|
}
|
|
1956
|
-
class
|
|
1957
|
+
class Cn extends ti {
|
|
1957
1958
|
constructor(e) {
|
|
1958
1959
|
super(e);
|
|
1959
1960
|
const { name: n, motionValue: s, keyframes: i } = this.options;
|
|
1960
|
-
this.resolver = new
|
|
1961
|
+
this.resolver = new Qs(i, (o, r) => this.onKeyframesResolved(o, r), n, s), this.resolver.scheduleResolve();
|
|
1961
1962
|
}
|
|
1962
1963
|
initPlayback(e, n) {
|
|
1963
1964
|
var s;
|
|
1964
|
-
let { duration: i = 300, times:
|
|
1965
|
+
let { duration: i = 300, times: o, ease: r, type: a, motionValue: l, name: u } = this.options;
|
|
1965
1966
|
if (!(!((s = l.owner) === null || s === void 0) && s.current))
|
|
1966
1967
|
return !1;
|
|
1967
|
-
if (
|
|
1968
|
-
const { onComplete: h, onUpdate: f, motionValue: d, ...m } = this.options, p =
|
|
1969
|
-
e = p.keyframes, e.length === 1 && (e[1] = e[0]), i = p.duration,
|
|
1968
|
+
if (va(this.options)) {
|
|
1969
|
+
const { onComplete: h, onUpdate: f, motionValue: d, ...m } = this.options, p = xa(e, m);
|
|
1970
|
+
e = p.keyframes, e.length === 1 && (e[1] = e[0]), i = p.duration, o = p.times, r = p.ease, a = "keyframes";
|
|
1970
1971
|
}
|
|
1971
|
-
const c =
|
|
1972
|
+
const c = ma(l.owner.current, u, e, { ...this.options, duration: i, times: o, ease: r });
|
|
1972
1973
|
return c.startTime = q.now(), this.pendingTimeline ? (c.timeline = this.pendingTimeline, this.pendingTimeline = void 0) : c.onfinish = () => {
|
|
1973
1974
|
const { onComplete: h } = this.options;
|
|
1974
|
-
l.set(
|
|
1975
|
+
l.set(Xt(e, this.options, n)), h && h(), this.cancel(), this.resolveFinishedPromise();
|
|
1975
1976
|
}, {
|
|
1976
1977
|
animation: c,
|
|
1977
1978
|
duration: i,
|
|
1978
|
-
times:
|
|
1979
|
+
times: o,
|
|
1979
1980
|
type: a,
|
|
1980
|
-
ease:
|
|
1981
|
+
ease: r,
|
|
1981
1982
|
keyframes: e
|
|
1982
1983
|
};
|
|
1983
1984
|
}
|
|
@@ -2000,7 +2001,7 @@ class Rn extends si {
|
|
|
2000
2001
|
if (!n)
|
|
2001
2002
|
return;
|
|
2002
2003
|
const { animation: s } = n;
|
|
2003
|
-
s.currentTime =
|
|
2004
|
+
s.currentTime = _(e);
|
|
2004
2005
|
}
|
|
2005
2006
|
get speed() {
|
|
2006
2007
|
const { resolved: e } = this;
|
|
@@ -2061,18 +2062,18 @@ class Rn extends si {
|
|
|
2061
2062
|
const { resolved: e } = this;
|
|
2062
2063
|
if (!e)
|
|
2063
2064
|
return;
|
|
2064
|
-
const { animation: n, keyframes: s, duration: i, type:
|
|
2065
|
+
const { animation: n, keyframes: s, duration: i, type: o, ease: r, times: a } = e;
|
|
2065
2066
|
if (!(n.playState === "idle" || n.playState === "finished")) {
|
|
2066
2067
|
if (this.time) {
|
|
2067
|
-
const { motionValue: l, onUpdate: u, onComplete: c, ...h } = this.options, f = new
|
|
2068
|
+
const { motionValue: l, onUpdate: u, onComplete: c, ...h } = this.options, f = new Ye({
|
|
2068
2069
|
...h,
|
|
2069
2070
|
keyframes: s,
|
|
2070
2071
|
duration: i,
|
|
2071
|
-
type:
|
|
2072
|
-
ease:
|
|
2072
|
+
type: o,
|
|
2073
|
+
ease: r,
|
|
2073
2074
|
times: a,
|
|
2074
2075
|
isGenerator: !0
|
|
2075
|
-
}), d =
|
|
2076
|
+
}), d = _(this.time);
|
|
2076
2077
|
l.setWithVelocity(f.sample(d - Ut).value, f.sample(d).value, Ut);
|
|
2077
2078
|
}
|
|
2078
2079
|
this.cancel();
|
|
@@ -2087,18 +2088,18 @@ class Rn extends si {
|
|
|
2087
2088
|
e && e.animation.cancel();
|
|
2088
2089
|
}
|
|
2089
2090
|
static supports(e) {
|
|
2090
|
-
const { motionValue: n, name: s, repeatDelay: i, repeatType:
|
|
2091
|
-
return
|
|
2091
|
+
const { motionValue: n, name: s, repeatDelay: i, repeatType: o, damping: r, type: a } = e;
|
|
2092
|
+
return pa() && s && ga.has(s) && n && n.owner && n.owner.current instanceof HTMLElement && /**
|
|
2092
2093
|
* If we're outputting values to onUpdate then we can't use WAAPI as there's
|
|
2093
2094
|
* no way to read the value from WAAPI every frame.
|
|
2094
2095
|
*/
|
|
2095
|
-
!n.owner.getProps().onUpdate && !i &&
|
|
2096
|
+
!n.owner.getProps().onUpdate && !i && o !== "mirror" && r !== 0 && a !== "inertia";
|
|
2096
2097
|
}
|
|
2097
2098
|
}
|
|
2098
|
-
const
|
|
2099
|
-
const a =
|
|
2099
|
+
const Xe = (t, e, n, s = {}, i, o) => (r) => {
|
|
2100
|
+
const a = Ke(s, t) || {}, l = a.delay || s.delay || 0;
|
|
2100
2101
|
let { elapsed: u = 0 } = s;
|
|
2101
|
-
u = u -
|
|
2102
|
+
u = u - _(l);
|
|
2102
2103
|
let c = {
|
|
2103
2104
|
keyframes: Array.isArray(n) ? n : [null, n],
|
|
2104
2105
|
ease: "easeOut",
|
|
@@ -2109,19 +2110,19 @@ const Ze = (t, e, n, s = {}, i, r) => (o) => {
|
|
|
2109
2110
|
e.set(f), a.onUpdate && a.onUpdate(f);
|
|
2110
2111
|
},
|
|
2111
2112
|
onComplete: () => {
|
|
2112
|
-
|
|
2113
|
+
r(), a.onComplete && a.onComplete();
|
|
2113
2114
|
},
|
|
2114
2115
|
name: t,
|
|
2115
2116
|
motionValue: e,
|
|
2116
|
-
element:
|
|
2117
|
+
element: o ? void 0 : i
|
|
2117
2118
|
};
|
|
2118
|
-
|
|
2119
|
+
so(a) || (c = {
|
|
2119
2120
|
...c,
|
|
2120
|
-
...
|
|
2121
|
-
}), c.duration && (c.duration =
|
|
2121
|
+
...no(t, c)
|
|
2122
|
+
}), c.duration && (c.duration = _(c.duration)), c.repeatDelay && (c.repeatDelay = _(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
|
|
2122
2123
|
let h = !1;
|
|
2123
|
-
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (h = !0)), h && !
|
|
2124
|
-
const f =
|
|
2124
|
+
if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (h = !0)), h && !o && e.get() !== void 0) {
|
|
2125
|
+
const f = Xt(c.keyframes, a);
|
|
2125
2126
|
if (f !== void 0) {
|
|
2126
2127
|
D.update(() => {
|
|
2127
2128
|
c.onUpdate(f), c.onComplete();
|
|
@@ -2129,24 +2130,24 @@ const Ze = (t, e, n, s = {}, i, r) => (o) => {
|
|
|
2129
2130
|
return;
|
|
2130
2131
|
}
|
|
2131
2132
|
}
|
|
2132
|
-
return !
|
|
2133
|
+
return !o && Cn.supports(c) ? new Cn(c) : new Ye(c);
|
|
2133
2134
|
};
|
|
2134
2135
|
function Kt(t) {
|
|
2135
2136
|
return !!(E(t) && t.add);
|
|
2136
2137
|
}
|
|
2137
|
-
function
|
|
2138
|
+
function qe(t, e) {
|
|
2138
2139
|
t.indexOf(e) === -1 && t.push(e);
|
|
2139
2140
|
}
|
|
2140
|
-
function
|
|
2141
|
+
function Ze(t, e) {
|
|
2141
2142
|
const n = t.indexOf(e);
|
|
2142
2143
|
n > -1 && t.splice(n, 1);
|
|
2143
2144
|
}
|
|
2144
|
-
class
|
|
2145
|
+
class Je {
|
|
2145
2146
|
constructor() {
|
|
2146
2147
|
this.subscriptions = [];
|
|
2147
2148
|
}
|
|
2148
2149
|
add(e) {
|
|
2149
|
-
return
|
|
2150
|
+
return qe(this.subscriptions, e), () => Ze(this.subscriptions, e);
|
|
2150
2151
|
}
|
|
2151
2152
|
notify(e, n, s) {
|
|
2152
2153
|
const i = this.subscriptions.length;
|
|
@@ -2154,9 +2155,9 @@ class tn {
|
|
|
2154
2155
|
if (i === 1)
|
|
2155
2156
|
this.subscriptions[0](e, n, s);
|
|
2156
2157
|
else
|
|
2157
|
-
for (let
|
|
2158
|
-
const
|
|
2159
|
-
|
|
2158
|
+
for (let o = 0; o < i; o++) {
|
|
2159
|
+
const r = this.subscriptions[o];
|
|
2160
|
+
r && r(e, n, s);
|
|
2160
2161
|
}
|
|
2161
2162
|
}
|
|
2162
2163
|
getSize() {
|
|
@@ -2166,12 +2167,8 @@ class tn {
|
|
|
2166
2167
|
this.subscriptions.length = 0;
|
|
2167
2168
|
}
|
|
2168
2169
|
}
|
|
2169
|
-
const
|
|
2170
|
-
|
|
2171
|
-
t || En.has(e) || (console.warn(e), n && console.warn(n), En.add(e));
|
|
2172
|
-
}
|
|
2173
|
-
const Ln = 30, ba = (t) => !isNaN(parseFloat(t));
|
|
2174
|
-
class Sa {
|
|
2170
|
+
const Dn = 30, Ta = (t) => !isNaN(parseFloat(t));
|
|
2171
|
+
class Pa {
|
|
2175
2172
|
/**
|
|
2176
2173
|
* @param init - The initiating value
|
|
2177
2174
|
* @param config - Optional configuration options
|
|
@@ -2182,9 +2179,9 @@ class Sa {
|
|
|
2182
2179
|
*/
|
|
2183
2180
|
constructor(e, n = {}) {
|
|
2184
2181
|
this.version = "11.0.28", this.canTrackVelocity = !1, this.events = {}, this.updateAndNotify = (s, i = !0) => {
|
|
2185
|
-
const
|
|
2186
|
-
this.updatedAt !==
|
|
2187
|
-
}, this.hasAnimated = !1, this.setCurrent(e), this.canTrackVelocity =
|
|
2182
|
+
const o = q.now();
|
|
2183
|
+
this.updatedAt !== o && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && this.events.change && this.events.change.notify(this.current), i && this.events.renderRequest && this.events.renderRequest.notify(this.current);
|
|
2184
|
+
}, this.hasAnimated = !1, this.setCurrent(e), this.canTrackVelocity = Ta(this.current), this.owner = n.owner;
|
|
2188
2185
|
}
|
|
2189
2186
|
setCurrent(e) {
|
|
2190
2187
|
this.current = e, this.updatedAt = q.now();
|
|
@@ -2233,10 +2230,10 @@ class Sa {
|
|
|
2233
2230
|
* @deprecated
|
|
2234
2231
|
*/
|
|
2235
2232
|
onChange(e) {
|
|
2236
|
-
return process.env.NODE_ENV !== "production" &&
|
|
2233
|
+
return process.env.NODE_ENV !== "production" && Ae(!1, 'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'), this.on("change", e);
|
|
2237
2234
|
}
|
|
2238
2235
|
on(e, n) {
|
|
2239
|
-
this.events[e] || (this.events[e] = new
|
|
2236
|
+
this.events[e] || (this.events[e] = new Je());
|
|
2240
2237
|
const s = this.events[e].add(n);
|
|
2241
2238
|
return e === "change" ? () => {
|
|
2242
2239
|
s(), D.read(() => {
|
|
@@ -2309,10 +2306,10 @@ class Sa {
|
|
|
2309
2306
|
*/
|
|
2310
2307
|
getVelocity() {
|
|
2311
2308
|
const e = q.now();
|
|
2312
|
-
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt >
|
|
2309
|
+
if (!this.canTrackVelocity || this.prevFrameValue === void 0 || e - this.updatedAt > Dn)
|
|
2313
2310
|
return 0;
|
|
2314
|
-
const n = Math.min(this.updatedAt - this.prevUpdatedAt,
|
|
2315
|
-
return
|
|
2311
|
+
const n = Math.min(this.updatedAt - this.prevUpdatedAt, Dn);
|
|
2312
|
+
return ei(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
|
|
2316
2313
|
}
|
|
2317
2314
|
/**
|
|
2318
2315
|
* Registers a new animation to control this `MotionValue`. Only one
|
|
@@ -2366,95 +2363,95 @@ class Sa {
|
|
|
2366
2363
|
}
|
|
2367
2364
|
}
|
|
2368
2365
|
function Vt(t, e) {
|
|
2369
|
-
return new
|
|
2366
|
+
return new Pa(t, e);
|
|
2370
2367
|
}
|
|
2371
|
-
function
|
|
2368
|
+
function ba(t, e, n) {
|
|
2372
2369
|
t.hasValue(e) ? t.getValue(e).set(n) : t.addValue(e, Vt(n));
|
|
2373
2370
|
}
|
|
2374
|
-
function
|
|
2375
|
-
const n =
|
|
2376
|
-
let { transitionEnd: s = {}, transition: i = {}, ...
|
|
2377
|
-
|
|
2378
|
-
for (const
|
|
2379
|
-
const a =
|
|
2380
|
-
|
|
2371
|
+
function Sa(t, e) {
|
|
2372
|
+
const n = Yt(t, e);
|
|
2373
|
+
let { transitionEnd: s = {}, transition: i = {}, ...o } = n || {};
|
|
2374
|
+
o = { ...o, ...s };
|
|
2375
|
+
for (const r in o) {
|
|
2376
|
+
const a = Er(o[r]);
|
|
2377
|
+
ba(t, r, a);
|
|
2381
2378
|
}
|
|
2382
2379
|
}
|
|
2383
|
-
function
|
|
2380
|
+
function Va({ protectedKeys: t, needsAnimating: e }, n) {
|
|
2384
2381
|
const s = t.hasOwnProperty(n) && e[n] !== !0;
|
|
2385
2382
|
return e[n] = !1, s;
|
|
2386
2383
|
}
|
|
2387
|
-
function
|
|
2388
|
-
var
|
|
2389
|
-
let { transition:
|
|
2384
|
+
function gi(t, e, { delay: n = 0, transitionOverride: s, type: i } = {}) {
|
|
2385
|
+
var o;
|
|
2386
|
+
let { transition: r = t.getDefaultTransition(), transitionEnd: a, ...l } = e;
|
|
2390
2387
|
const u = t.getValue("willChange");
|
|
2391
|
-
s && (
|
|
2388
|
+
s && (r = s);
|
|
2392
2389
|
const c = [], h = i && t.animationState && t.animationState.getState()[i];
|
|
2393
2390
|
for (const f in l) {
|
|
2394
|
-
const d = t.getValue(f, (
|
|
2395
|
-
if (m === void 0 || h &&
|
|
2391
|
+
const d = t.getValue(f, (o = t.latestValues[f]) !== null && o !== void 0 ? o : null), m = l[f];
|
|
2392
|
+
if (m === void 0 || h && Va(h, f))
|
|
2396
2393
|
continue;
|
|
2397
2394
|
const p = {
|
|
2398
2395
|
delay: n,
|
|
2399
2396
|
elapsed: 0,
|
|
2400
|
-
...
|
|
2397
|
+
...Ke(r || {}, f)
|
|
2401
2398
|
};
|
|
2402
2399
|
let y = !1;
|
|
2403
2400
|
if (window.HandoffAppearAnimations) {
|
|
2404
|
-
const T = t.getProps()[
|
|
2401
|
+
const T = t.getProps()[ys];
|
|
2405
2402
|
if (T) {
|
|
2406
2403
|
const g = window.HandoffAppearAnimations(T, f);
|
|
2407
2404
|
g !== null && (p.elapsed = g, y = !0);
|
|
2408
2405
|
}
|
|
2409
2406
|
}
|
|
2410
|
-
d.start(
|
|
2407
|
+
d.start(Xe(f, d, m, t.shouldReduceMotion && ot.has(f) ? { type: !1 } : p, t, y));
|
|
2411
2408
|
const v = d.animation;
|
|
2412
2409
|
v && (Kt(u) && (u.add(f), v.then(() => u.remove(f))), c.push(v));
|
|
2413
2410
|
}
|
|
2414
2411
|
return a && Promise.all(c).then(() => {
|
|
2415
2412
|
D.update(() => {
|
|
2416
|
-
a &&
|
|
2413
|
+
a && Sa(t, a);
|
|
2417
2414
|
});
|
|
2418
2415
|
}), c;
|
|
2419
2416
|
}
|
|
2420
|
-
function
|
|
2417
|
+
function Te(t, e, n = {}) {
|
|
2421
2418
|
var s;
|
|
2422
|
-
const i =
|
|
2423
|
-
let { transition:
|
|
2424
|
-
n.transitionOverride && (
|
|
2425
|
-
const
|
|
2426
|
-
const { delayChildren: c = 0, staggerChildren: h, staggerDirection: f } =
|
|
2427
|
-
return
|
|
2428
|
-
} : () => Promise.resolve(), { when: l } =
|
|
2419
|
+
const i = Yt(t, e, n.type === "exit" ? (s = t.presenceContext) === null || s === void 0 ? void 0 : s.custom : void 0);
|
|
2420
|
+
let { transition: o = t.getDefaultTransition() || {} } = i || {};
|
|
2421
|
+
n.transitionOverride && (o = n.transitionOverride);
|
|
2422
|
+
const r = i ? () => Promise.all(gi(t, i, n)) : () => Promise.resolve(), a = t.variantChildren && t.variantChildren.size ? (u = 0) => {
|
|
2423
|
+
const { delayChildren: c = 0, staggerChildren: h, staggerDirection: f } = o;
|
|
2424
|
+
return wa(t, e, c + u, h, f, n);
|
|
2425
|
+
} : () => Promise.resolve(), { when: l } = o;
|
|
2429
2426
|
if (l) {
|
|
2430
|
-
const [u, c] = l === "beforeChildren" ? [
|
|
2427
|
+
const [u, c] = l === "beforeChildren" ? [r, a] : [a, r];
|
|
2431
2428
|
return u().then(() => c());
|
|
2432
2429
|
} else
|
|
2433
|
-
return Promise.all([
|
|
2430
|
+
return Promise.all([r(), a(n.delay)]);
|
|
2434
2431
|
}
|
|
2435
|
-
function
|
|
2436
|
-
const
|
|
2437
|
-
return Array.from(t.variantChildren).sort(
|
|
2438
|
-
u.notify("AnimationStart", e),
|
|
2439
|
-
...
|
|
2432
|
+
function wa(t, e, n = 0, s = 0, i = 1, o) {
|
|
2433
|
+
const r = [], a = (t.variantChildren.size - 1) * s, l = i === 1 ? (u = 0) => u * s : (u = 0) => a - u * s;
|
|
2434
|
+
return Array.from(t.variantChildren).sort(Aa).forEach((u, c) => {
|
|
2435
|
+
u.notify("AnimationStart", e), r.push(Te(u, e, {
|
|
2436
|
+
...o,
|
|
2440
2437
|
delay: n + l(c)
|
|
2441
2438
|
}).then(() => u.notify("AnimationComplete", e)));
|
|
2442
|
-
}), Promise.all(
|
|
2439
|
+
}), Promise.all(r);
|
|
2443
2440
|
}
|
|
2444
|
-
function
|
|
2441
|
+
function Aa(t, e) {
|
|
2445
2442
|
return t.sortNodePosition(e);
|
|
2446
2443
|
}
|
|
2447
|
-
function
|
|
2444
|
+
function Ca(t, e, n = {}) {
|
|
2448
2445
|
t.notify("AnimationStart", e);
|
|
2449
2446
|
let s;
|
|
2450
2447
|
if (Array.isArray(e)) {
|
|
2451
|
-
const i = e.map((
|
|
2448
|
+
const i = e.map((o) => Te(t, o, n));
|
|
2452
2449
|
s = Promise.all(i);
|
|
2453
2450
|
} else if (typeof e == "string")
|
|
2454
|
-
s =
|
|
2451
|
+
s = Te(t, e, n);
|
|
2455
2452
|
else {
|
|
2456
|
-
const i = typeof e == "function" ?
|
|
2457
|
-
s = Promise.all(
|
|
2453
|
+
const i = typeof e == "function" ? Yt(t, e, n.custom) : e;
|
|
2454
|
+
s = Promise.all(gi(t, i, n));
|
|
2458
2455
|
}
|
|
2459
2456
|
return s.then(() => {
|
|
2460
2457
|
D.postRender(() => {
|
|
@@ -2462,58 +2459,58 @@ function Ma(t, e, n = {}) {
|
|
|
2462
2459
|
});
|
|
2463
2460
|
});
|
|
2464
2461
|
}
|
|
2465
|
-
const
|
|
2466
|
-
function
|
|
2467
|
-
return (e) => Promise.all(e.map(({ animation: n, options: s }) =>
|
|
2462
|
+
const Da = [...Re].reverse(), Ma = Re.length;
|
|
2463
|
+
function Ra(t) {
|
|
2464
|
+
return (e) => Promise.all(e.map(({ animation: n, options: s }) => Ca(t, n, s)));
|
|
2468
2465
|
}
|
|
2469
|
-
function
|
|
2470
|
-
let e =
|
|
2471
|
-
const n =
|
|
2466
|
+
function Ea(t) {
|
|
2467
|
+
let e = Ra(t);
|
|
2468
|
+
const n = Fa();
|
|
2472
2469
|
let s = !0;
|
|
2473
2470
|
const i = (l) => (u, c) => {
|
|
2474
2471
|
var h;
|
|
2475
|
-
const f =
|
|
2472
|
+
const f = Yt(t, c, l === "exit" ? (h = t.presenceContext) === null || h === void 0 ? void 0 : h.custom : void 0);
|
|
2476
2473
|
if (f) {
|
|
2477
2474
|
const { transition: d, transitionEnd: m, ...p } = f;
|
|
2478
2475
|
u = { ...u, ...p, ...m };
|
|
2479
2476
|
}
|
|
2480
2477
|
return u;
|
|
2481
2478
|
};
|
|
2482
|
-
function
|
|
2479
|
+
function o(l) {
|
|
2483
2480
|
e = l(t);
|
|
2484
2481
|
}
|
|
2485
|
-
function
|
|
2482
|
+
function r(l) {
|
|
2486
2483
|
const u = t.getProps(), c = t.getVariantContext(!0) || {}, h = [], f = /* @__PURE__ */ new Set();
|
|
2487
2484
|
let d = {}, m = 1 / 0;
|
|
2488
|
-
for (let y = 0; y <
|
|
2489
|
-
const v =
|
|
2485
|
+
for (let y = 0; y < Ma; y++) {
|
|
2486
|
+
const v = Da[y], T = n[v], g = u[v] !== void 0 ? u[v] : c[v], P = Pt(g), S = v === l ? T.isActive : null;
|
|
2490
2487
|
S === !1 && (m = y);
|
|
2491
2488
|
let M = g === c[v] && g !== u[v] && P;
|
|
2492
2489
|
if (M && s && t.manuallyAnimateOnMount && (M = !1), T.protectedKeys = { ...d }, // If it isn't active and hasn't *just* been set as inactive
|
|
2493
2490
|
!T.isActive && S === null || // If we didn't and don't have any defined prop for this animation type
|
|
2494
2491
|
!g && !T.prevProp || // Or if the prop doesn't define an animation
|
|
2495
|
-
|
|
2492
|
+
Gt(g) || typeof g == "boolean")
|
|
2496
2493
|
continue;
|
|
2497
|
-
let b =
|
|
2494
|
+
let b = La(T.prevProp, g) || // If we're making this variant active, we want to always make it active
|
|
2498
2495
|
v === l && T.isActive && !M && P || // If we removed a higher-priority variant (i is in reverse order)
|
|
2499
2496
|
y > m && P, k = !1;
|
|
2500
2497
|
const O = Array.isArray(g) ? g : [g];
|
|
2501
2498
|
let at = O.reduce(i(v), {});
|
|
2502
2499
|
S === !1 && (at = {});
|
|
2503
|
-
const { prevResolvedValues:
|
|
2504
|
-
...
|
|
2500
|
+
const { prevResolvedValues: Qe = {} } = T, ki = {
|
|
2501
|
+
...Qe,
|
|
2505
2502
|
...at
|
|
2506
|
-
},
|
|
2503
|
+
}, tn = (L) => {
|
|
2507
2504
|
b = !0, f.has(L) && (k = !0, f.delete(L)), T.needsAnimating[L] = !0;
|
|
2508
2505
|
const U = t.getValue(L);
|
|
2509
2506
|
U && (U.liveStyle = !1);
|
|
2510
2507
|
};
|
|
2511
|
-
for (const L in
|
|
2512
|
-
const U = at[L],
|
|
2508
|
+
for (const L in ki) {
|
|
2509
|
+
const U = at[L], qt = Qe[L];
|
|
2513
2510
|
if (d.hasOwnProperty(L))
|
|
2514
2511
|
continue;
|
|
2515
|
-
let
|
|
2516
|
-
|
|
2512
|
+
let Zt = !1;
|
|
2513
|
+
fe(U) && fe(qt) ? Zt = !Ns(U, qt) : Zt = U !== qt, Zt ? U != null ? tn(L) : f.add(L) : U !== void 0 && f.has(L) ? tn(L) : T.protectedKeys[L] = !0;
|
|
2517
2514
|
}
|
|
2518
2515
|
T.prevProp = g, T.prevResolvedValues = at, T.isActive && (d = { ...d, ...at }), s && t.blockInitialAnimation && (b = !1), b && (!M || k) && h.push(...O.map((L) => ({
|
|
2519
2516
|
animation: L,
|
|
@@ -2538,20 +2535,20 @@ function Fa(t) {
|
|
|
2538
2535
|
var d;
|
|
2539
2536
|
return (d = f.animationState) === null || d === void 0 ? void 0 : d.setActive(l, u);
|
|
2540
2537
|
}), n[l].isActive = u;
|
|
2541
|
-
const h =
|
|
2538
|
+
const h = r(l);
|
|
2542
2539
|
for (const f in n)
|
|
2543
2540
|
n[f].protectedKeys = {};
|
|
2544
2541
|
return h;
|
|
2545
2542
|
}
|
|
2546
2543
|
return {
|
|
2547
|
-
animateChanges:
|
|
2544
|
+
animateChanges: r,
|
|
2548
2545
|
setActive: a,
|
|
2549
|
-
setAnimateFunction:
|
|
2546
|
+
setAnimateFunction: o,
|
|
2550
2547
|
getState: () => n
|
|
2551
2548
|
};
|
|
2552
2549
|
}
|
|
2553
|
-
function
|
|
2554
|
-
return typeof e == "string" ? e !== t : Array.isArray(e) ?
|
|
2550
|
+
function La(t, e) {
|
|
2551
|
+
return typeof e == "string" ? e !== t : Array.isArray(e) ? !Ns(e, t) : !1;
|
|
2555
2552
|
}
|
|
2556
2553
|
function et(t = !1) {
|
|
2557
2554
|
return {
|
|
@@ -2561,7 +2558,7 @@ function et(t = !1) {
|
|
|
2561
2558
|
prevResolvedValues: {}
|
|
2562
2559
|
};
|
|
2563
2560
|
}
|
|
2564
|
-
function
|
|
2561
|
+
function Fa() {
|
|
2565
2562
|
return {
|
|
2566
2563
|
animate: et(!0),
|
|
2567
2564
|
whileInView: et(),
|
|
@@ -2572,18 +2569,18 @@ function ka() {
|
|
|
2572
2569
|
exit: et()
|
|
2573
2570
|
};
|
|
2574
2571
|
}
|
|
2575
|
-
class
|
|
2572
|
+
class Ba extends tt {
|
|
2576
2573
|
/**
|
|
2577
2574
|
* We dynamically generate the AnimationState manager as it contains a reference
|
|
2578
2575
|
* to the underlying animation library. We only want to load that if we load this,
|
|
2579
2576
|
* so people can optionally code split it out using the `m` component.
|
|
2580
2577
|
*/
|
|
2581
2578
|
constructor(e) {
|
|
2582
|
-
super(e), e.animationState || (e.animationState =
|
|
2579
|
+
super(e), e.animationState || (e.animationState = Ea(e));
|
|
2583
2580
|
}
|
|
2584
2581
|
updateAnimationControlsSubscription() {
|
|
2585
2582
|
const { animate: e } = this.node.getProps();
|
|
2586
|
-
this.unmount(),
|
|
2583
|
+
this.unmount(), Gt(e) && (this.unmount = e.subscribe(this.node));
|
|
2587
2584
|
}
|
|
2588
2585
|
/**
|
|
2589
2586
|
* Subscribe any provided AnimationControls to the component's VisualElement
|
|
@@ -2598,10 +2595,10 @@ class Oa extends tt {
|
|
|
2598
2595
|
unmount() {
|
|
2599
2596
|
}
|
|
2600
2597
|
}
|
|
2601
|
-
let
|
|
2602
|
-
class
|
|
2598
|
+
let ka = 0;
|
|
2599
|
+
class Oa extends tt {
|
|
2603
2600
|
constructor() {
|
|
2604
|
-
super(...arguments), this.id =
|
|
2601
|
+
super(...arguments), this.id = ka++;
|
|
2605
2602
|
}
|
|
2606
2603
|
update() {
|
|
2607
2604
|
if (!this.node.presenceContext)
|
|
@@ -2619,24 +2616,24 @@ class Ia extends tt {
|
|
|
2619
2616
|
unmount() {
|
|
2620
2617
|
}
|
|
2621
2618
|
}
|
|
2622
|
-
const
|
|
2619
|
+
const ja = {
|
|
2623
2620
|
animation: {
|
|
2624
|
-
Feature:
|
|
2621
|
+
Feature: Ba
|
|
2625
2622
|
},
|
|
2626
2623
|
exit: {
|
|
2627
|
-
Feature:
|
|
2624
|
+
Feature: Oa
|
|
2628
2625
|
}
|
|
2629
|
-
},
|
|
2630
|
-
function
|
|
2631
|
-
const n =
|
|
2626
|
+
}, Mn = (t, e) => Math.abs(t - e);
|
|
2627
|
+
function Ia(t, e) {
|
|
2628
|
+
const n = Mn(t.x, e.x), s = Mn(t.y, e.y);
|
|
2632
2629
|
return Math.sqrt(n ** 2 + s ** 2);
|
|
2633
2630
|
}
|
|
2634
|
-
class
|
|
2635
|
-
constructor(e, n, { transformPagePoint: s, contextWindow: i, dragSnapToOrigin:
|
|
2631
|
+
class yi {
|
|
2632
|
+
constructor(e, n, { transformPagePoint: s, contextWindow: i, dragSnapToOrigin: o = !1 } = {}) {
|
|
2636
2633
|
if (this.startEvent = null, this.lastMoveEvent = null, this.lastMoveEventInfo = null, this.handlers = {}, this.contextWindow = window, this.updatePoint = () => {
|
|
2637
2634
|
if (!(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
2638
2635
|
return;
|
|
2639
|
-
const h =
|
|
2636
|
+
const h = oe(this.lastMoveEventInfo, this.history), f = this.startEvent !== null, d = Ia(h.offset, { x: 0, y: 0 }) >= 3;
|
|
2640
2637
|
if (!f && !d)
|
|
2641
2638
|
return;
|
|
2642
2639
|
const { point: m } = h, { timestamp: p } = A;
|
|
@@ -2644,166 +2641,166 @@ class Ti {
|
|
|
2644
2641
|
const { onStart: y, onMove: v } = this.handlers;
|
|
2645
2642
|
f || (y && y(this.lastMoveEvent, h), this.startEvent = this.lastMoveEvent), v && v(this.lastMoveEvent, h);
|
|
2646
2643
|
}, this.handlePointerMove = (h, f) => {
|
|
2647
|
-
this.lastMoveEvent = h, this.lastMoveEventInfo =
|
|
2644
|
+
this.lastMoveEvent = h, this.lastMoveEventInfo = re(f, this.transformPagePoint), D.update(this.updatePoint, !0);
|
|
2648
2645
|
}, this.handlePointerUp = (h, f) => {
|
|
2649
2646
|
this.end();
|
|
2650
2647
|
const { onEnd: d, onSessionEnd: m, resumeAnimation: p } = this.handlers;
|
|
2651
2648
|
if (this.dragSnapToOrigin && p && p(), !(this.lastMoveEvent && this.lastMoveEventInfo))
|
|
2652
2649
|
return;
|
|
2653
|
-
const y =
|
|
2650
|
+
const y = oe(h.type === "pointercancel" ? this.lastMoveEventInfo : re(f, this.transformPagePoint), this.history);
|
|
2654
2651
|
this.startEvent && d && d(h, y), m && m(h, y);
|
|
2655
|
-
}, !
|
|
2652
|
+
}, !Bs(e))
|
|
2656
2653
|
return;
|
|
2657
|
-
this.dragSnapToOrigin =
|
|
2658
|
-
const
|
|
2654
|
+
this.dragSnapToOrigin = o, this.handlers = n, this.transformPagePoint = s, this.contextWindow = i || window;
|
|
2655
|
+
const r = zt(e), a = re(r, this.transformPagePoint), { point: l } = a, { timestamp: u } = A;
|
|
2659
2656
|
this.history = [{ ...l, timestamp: u }];
|
|
2660
2657
|
const { onSessionStart: c } = n;
|
|
2661
|
-
c && c(e,
|
|
2658
|
+
c && c(e, oe(a, this.history)), this.removeListeners = W($(this.contextWindow, "pointermove", this.handlePointerMove), $(this.contextWindow, "pointerup", this.handlePointerUp), $(this.contextWindow, "pointercancel", this.handlePointerUp));
|
|
2662
2659
|
}
|
|
2663
2660
|
updateHandlers(e) {
|
|
2664
2661
|
this.handlers = e;
|
|
2665
2662
|
}
|
|
2666
2663
|
end() {
|
|
2667
|
-
this.removeListeners && this.removeListeners(),
|
|
2664
|
+
this.removeListeners && this.removeListeners(), J(this.updatePoint);
|
|
2668
2665
|
}
|
|
2669
2666
|
}
|
|
2670
|
-
function
|
|
2667
|
+
function re(t, e) {
|
|
2671
2668
|
return e ? { point: e(t.point) } : t;
|
|
2672
2669
|
}
|
|
2673
|
-
function
|
|
2670
|
+
function Rn(t, e) {
|
|
2674
2671
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
2675
2672
|
}
|
|
2676
|
-
function
|
|
2673
|
+
function oe({ point: t }, e) {
|
|
2677
2674
|
return {
|
|
2678
2675
|
point: t,
|
|
2679
|
-
delta:
|
|
2680
|
-
offset:
|
|
2681
|
-
velocity:
|
|
2676
|
+
delta: Rn(t, vi(e)),
|
|
2677
|
+
offset: Rn(t, Na(e)),
|
|
2678
|
+
velocity: Ua(e, 0.1)
|
|
2682
2679
|
};
|
|
2683
2680
|
}
|
|
2684
|
-
function
|
|
2681
|
+
function Na(t) {
|
|
2685
2682
|
return t[0];
|
|
2686
2683
|
}
|
|
2687
|
-
function
|
|
2684
|
+
function vi(t) {
|
|
2688
2685
|
return t[t.length - 1];
|
|
2689
2686
|
}
|
|
2690
|
-
function
|
|
2687
|
+
function Ua(t, e) {
|
|
2691
2688
|
if (t.length < 2)
|
|
2692
2689
|
return { x: 0, y: 0 };
|
|
2693
2690
|
let n = t.length - 1, s = null;
|
|
2694
|
-
const i =
|
|
2695
|
-
for (; n >= 0 && (s = t[n], !(i.timestamp - s.timestamp >
|
|
2691
|
+
const i = vi(t);
|
|
2692
|
+
for (; n >= 0 && (s = t[n], !(i.timestamp - s.timestamp > _(e))); )
|
|
2696
2693
|
n--;
|
|
2697
2694
|
if (!s)
|
|
2698
2695
|
return { x: 0, y: 0 };
|
|
2699
|
-
const
|
|
2700
|
-
if (
|
|
2696
|
+
const o = G(i.timestamp - s.timestamp);
|
|
2697
|
+
if (o === 0)
|
|
2701
2698
|
return { x: 0, y: 0 };
|
|
2702
|
-
const
|
|
2703
|
-
x: (i.x - s.x) /
|
|
2704
|
-
y: (i.y - s.y) /
|
|
2699
|
+
const r = {
|
|
2700
|
+
x: (i.x - s.x) / o,
|
|
2701
|
+
y: (i.y - s.y) / o
|
|
2705
2702
|
};
|
|
2706
|
-
return
|
|
2703
|
+
return r.x === 1 / 0 && (r.x = 0), r.y === 1 / 0 && (r.y = 0), r;
|
|
2707
2704
|
}
|
|
2708
2705
|
function B(t) {
|
|
2709
2706
|
return t.max - t.min;
|
|
2710
2707
|
}
|
|
2711
|
-
function
|
|
2708
|
+
function Pe(t, e = 0, n = 0.01) {
|
|
2712
2709
|
return Math.abs(t - e) <= n;
|
|
2713
2710
|
}
|
|
2714
|
-
function
|
|
2715
|
-
t.origin = s, t.originPoint = V(e.min, e.max, t.origin), t.scale = B(n) / B(e), (
|
|
2711
|
+
function En(t, e, n, s = 0.5) {
|
|
2712
|
+
t.origin = s, t.originPoint = V(e.min, e.max, t.origin), t.scale = B(n) / B(e), (Pe(t.scale, 1, 1e-4) || isNaN(t.scale)) && (t.scale = 1), t.translate = V(n.min, n.max, t.origin) - t.originPoint, (Pe(t.translate) || isNaN(t.translate)) && (t.translate = 0);
|
|
2716
2713
|
}
|
|
2717
2714
|
function xt(t, e, n, s) {
|
|
2718
|
-
|
|
2715
|
+
En(t.x, e.x, n.x, s ? s.originX : void 0), En(t.y, e.y, n.y, s ? s.originY : void 0);
|
|
2719
2716
|
}
|
|
2720
|
-
function
|
|
2717
|
+
function Ln(t, e, n) {
|
|
2721
2718
|
t.min = n.min + e.min, t.max = t.min + B(e);
|
|
2722
2719
|
}
|
|
2723
|
-
function
|
|
2724
|
-
|
|
2720
|
+
function Ka(t, e, n) {
|
|
2721
|
+
Ln(t.x, e.x, n.x), Ln(t.y, e.y, n.y);
|
|
2725
2722
|
}
|
|
2726
|
-
function
|
|
2723
|
+
function Fn(t, e, n) {
|
|
2727
2724
|
t.min = e.min - n.min, t.max = t.min + B(e);
|
|
2728
2725
|
}
|
|
2729
2726
|
function Tt(t, e, n) {
|
|
2730
|
-
|
|
2727
|
+
Fn(t.x, e.x, n.x), Fn(t.y, e.y, n.y);
|
|
2731
2728
|
}
|
|
2732
|
-
function
|
|
2729
|
+
function $a(t, { min: e, max: n }, s) {
|
|
2733
2730
|
return e !== void 0 && t < e ? t = s ? V(e, t, s.min) : Math.max(t, e) : n !== void 0 && t > n && (t = s ? V(n, t, s.max) : Math.min(t, n)), t;
|
|
2734
2731
|
}
|
|
2735
|
-
function
|
|
2732
|
+
function Bn(t, e, n) {
|
|
2736
2733
|
return {
|
|
2737
2734
|
min: e !== void 0 ? t.min + e : void 0,
|
|
2738
2735
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
2739
2736
|
};
|
|
2740
2737
|
}
|
|
2741
|
-
function
|
|
2738
|
+
function Wa(t, { top: e, left: n, bottom: s, right: i }) {
|
|
2742
2739
|
return {
|
|
2743
|
-
x:
|
|
2744
|
-
y:
|
|
2740
|
+
x: Bn(t.x, n, i),
|
|
2741
|
+
y: Bn(t.y, e, s)
|
|
2745
2742
|
};
|
|
2746
2743
|
}
|
|
2747
|
-
function
|
|
2744
|
+
function kn(t, e) {
|
|
2748
2745
|
let n = e.min - t.min, s = e.max - t.max;
|
|
2749
2746
|
return e.max - e.min < t.max - t.min && ([n, s] = [s, n]), { min: n, max: s };
|
|
2750
2747
|
}
|
|
2751
|
-
function
|
|
2748
|
+
function _a(t, e) {
|
|
2752
2749
|
return {
|
|
2753
|
-
x:
|
|
2754
|
-
y:
|
|
2750
|
+
x: kn(t.x, e.x),
|
|
2751
|
+
y: kn(t.y, e.y)
|
|
2755
2752
|
};
|
|
2756
2753
|
}
|
|
2757
|
-
function
|
|
2754
|
+
function Ga(t, e) {
|
|
2758
2755
|
let n = 0.5;
|
|
2759
2756
|
const s = B(t), i = B(e);
|
|
2760
2757
|
return i > s ? n = St(e.min, e.max - s, t.min) : s > i && (n = St(t.min, t.max - i, e.min)), Z(0, 1, n);
|
|
2761
2758
|
}
|
|
2762
|
-
function
|
|
2759
|
+
function Ha(t, e) {
|
|
2763
2760
|
const n = {};
|
|
2764
2761
|
return e.min !== void 0 && (n.min = e.min - t.min), e.max !== void 0 && (n.max = e.max - t.min), n;
|
|
2765
2762
|
}
|
|
2766
|
-
const
|
|
2767
|
-
function
|
|
2768
|
-
return t === !1 ? t = 0 : t === !0 && (t =
|
|
2769
|
-
x:
|
|
2770
|
-
y:
|
|
2763
|
+
const be = 0.35;
|
|
2764
|
+
function za(t = be) {
|
|
2765
|
+
return t === !1 ? t = 0 : t === !0 && (t = be), {
|
|
2766
|
+
x: On(t, "left", "right"),
|
|
2767
|
+
y: On(t, "top", "bottom")
|
|
2771
2768
|
};
|
|
2772
2769
|
}
|
|
2773
|
-
function
|
|
2770
|
+
function On(t, e, n) {
|
|
2774
2771
|
return {
|
|
2775
|
-
min:
|
|
2776
|
-
max:
|
|
2772
|
+
min: jn(t, e),
|
|
2773
|
+
max: jn(t, n)
|
|
2777
2774
|
};
|
|
2778
2775
|
}
|
|
2779
|
-
function
|
|
2776
|
+
function jn(t, e) {
|
|
2780
2777
|
return typeof t == "number" ? t : t[e] || 0;
|
|
2781
2778
|
}
|
|
2782
|
-
const
|
|
2779
|
+
const In = () => ({
|
|
2783
2780
|
translate: 0,
|
|
2784
2781
|
scale: 1,
|
|
2785
2782
|
origin: 0,
|
|
2786
2783
|
originPoint: 0
|
|
2787
2784
|
}), ct = () => ({
|
|
2788
|
-
x:
|
|
2789
|
-
y:
|
|
2790
|
-
}),
|
|
2791
|
-
x:
|
|
2792
|
-
y:
|
|
2785
|
+
x: In(),
|
|
2786
|
+
y: In()
|
|
2787
|
+
}), Nn = () => ({ min: 0, max: 0 }), w = () => ({
|
|
2788
|
+
x: Nn(),
|
|
2789
|
+
y: Nn()
|
|
2793
2790
|
});
|
|
2794
2791
|
function I(t) {
|
|
2795
2792
|
return [t("x"), t("y")];
|
|
2796
2793
|
}
|
|
2797
|
-
function
|
|
2794
|
+
function xi({ top: t, left: e, right: n, bottom: s }) {
|
|
2798
2795
|
return {
|
|
2799
2796
|
x: { min: e, max: n },
|
|
2800
2797
|
y: { min: t, max: s }
|
|
2801
2798
|
};
|
|
2802
2799
|
}
|
|
2803
|
-
function
|
|
2800
|
+
function Ya({ x: t, y: e }) {
|
|
2804
2801
|
return { top: e.min, right: t.max, bottom: e.max, left: t.min };
|
|
2805
2802
|
}
|
|
2806
|
-
function
|
|
2803
|
+
function Xa(t, e) {
|
|
2807
2804
|
if (!e)
|
|
2808
2805
|
return t;
|
|
2809
2806
|
const n = e({ x: t.left, y: t.top }), s = e({ x: t.right, y: t.bottom });
|
|
@@ -2814,73 +2811,73 @@ function Za(t, e) {
|
|
|
2814
2811
|
right: s.x
|
|
2815
2812
|
};
|
|
2816
2813
|
}
|
|
2817
|
-
function
|
|
2814
|
+
function ae(t) {
|
|
2818
2815
|
return t === void 0 || t === 1;
|
|
2819
2816
|
}
|
|
2820
|
-
function
|
|
2821
|
-
return !
|
|
2817
|
+
function Se({ scale: t, scaleX: e, scaleY: n }) {
|
|
2818
|
+
return !ae(t) || !ae(e) || !ae(n);
|
|
2822
2819
|
}
|
|
2823
2820
|
function nt(t) {
|
|
2824
|
-
return
|
|
2821
|
+
return Se(t) || Ti(t) || t.z || t.rotate || t.rotateX || t.rotateY || t.skewX || t.skewY;
|
|
2825
2822
|
}
|
|
2826
|
-
function
|
|
2827
|
-
return
|
|
2823
|
+
function Ti(t) {
|
|
2824
|
+
return Un(t.x) || Un(t.y);
|
|
2828
2825
|
}
|
|
2829
|
-
function
|
|
2826
|
+
function Un(t) {
|
|
2830
2827
|
return t && t !== "0%";
|
|
2831
2828
|
}
|
|
2832
2829
|
function $t(t, e, n) {
|
|
2833
2830
|
const s = t - n, i = e * s;
|
|
2834
2831
|
return n + i;
|
|
2835
2832
|
}
|
|
2836
|
-
function
|
|
2833
|
+
function Kn(t, e, n, s, i) {
|
|
2837
2834
|
return i !== void 0 && (t = $t(t, i, s)), $t(t, n, s) + e;
|
|
2838
2835
|
}
|
|
2839
|
-
function
|
|
2840
|
-
t.min =
|
|
2836
|
+
function Ve(t, e = 0, n = 1, s, i) {
|
|
2837
|
+
t.min = Kn(t.min, e, n, s, i), t.max = Kn(t.max, e, n, s, i);
|
|
2841
2838
|
}
|
|
2842
|
-
function
|
|
2843
|
-
|
|
2839
|
+
function Pi(t, { x: e, y: n }) {
|
|
2840
|
+
Ve(t.x, e.translate, e.scale, e.originPoint), Ve(t.y, n.translate, n.scale, n.originPoint);
|
|
2844
2841
|
}
|
|
2845
|
-
function
|
|
2842
|
+
function qa(t, e, n, s = !1) {
|
|
2846
2843
|
const i = n.length;
|
|
2847
2844
|
if (!i)
|
|
2848
2845
|
return;
|
|
2849
2846
|
e.x = e.y = 1;
|
|
2850
|
-
let
|
|
2847
|
+
let o, r;
|
|
2851
2848
|
for (let a = 0; a < i; a++) {
|
|
2852
|
-
|
|
2853
|
-
const l =
|
|
2854
|
-
l && l.style && l.style.display === "contents" || (s &&
|
|
2855
|
-
x: -
|
|
2856
|
-
y: -
|
|
2857
|
-
}),
|
|
2849
|
+
o = n[a], r = o.projectionDelta;
|
|
2850
|
+
const l = o.instance;
|
|
2851
|
+
l && l.style && l.style.display === "contents" || (s && o.options.layoutScroll && o.scroll && o !== o.root && ht(t, {
|
|
2852
|
+
x: -o.scroll.offset.x,
|
|
2853
|
+
y: -o.scroll.offset.y
|
|
2854
|
+
}), r && (e.x *= r.x.scale, e.y *= r.y.scale, Pi(t, r)), s && nt(o.latestValues) && ht(t, o.latestValues));
|
|
2858
2855
|
}
|
|
2859
|
-
e.x =
|
|
2856
|
+
e.x = $n(e.x), e.y = $n(e.y);
|
|
2860
2857
|
}
|
|
2861
|
-
function
|
|
2858
|
+
function $n(t) {
|
|
2862
2859
|
return Number.isInteger(t) || t > 1.0000000000001 || t < 0.999999999999 ? t : 1;
|
|
2863
2860
|
}
|
|
2864
2861
|
function X(t, e) {
|
|
2865
2862
|
t.min = t.min + e, t.max = t.max + e;
|
|
2866
2863
|
}
|
|
2867
|
-
function
|
|
2868
|
-
const
|
|
2869
|
-
|
|
2864
|
+
function Wn(t, e, [n, s, i]) {
|
|
2865
|
+
const o = e[i] !== void 0 ? e[i] : 0.5, r = V(t.min, t.max, o);
|
|
2866
|
+
Ve(t, e[n], e[s], r, e.scale);
|
|
2870
2867
|
}
|
|
2871
|
-
const
|
|
2868
|
+
const Za = ["x", "scaleX", "originX"], Ja = ["y", "scaleY", "originY"];
|
|
2872
2869
|
function ht(t, e) {
|
|
2873
|
-
|
|
2870
|
+
Wn(t.x, e, Za), Wn(t.y, e, Ja);
|
|
2874
2871
|
}
|
|
2875
|
-
function
|
|
2876
|
-
return
|
|
2872
|
+
function bi(t, e) {
|
|
2873
|
+
return xi(Xa(t.getBoundingClientRect(), e));
|
|
2877
2874
|
}
|
|
2878
|
-
function
|
|
2879
|
-
const s =
|
|
2875
|
+
function Qa(t, e, n) {
|
|
2876
|
+
const s = bi(t, n), { scroll: i } = e;
|
|
2880
2877
|
return i && (X(s.x, i.offset.x), X(s.y, i.offset.y)), s;
|
|
2881
2878
|
}
|
|
2882
|
-
const
|
|
2883
|
-
class
|
|
2879
|
+
const Si = ({ current: t }) => t ? t.ownerDocument.defaultView : null, tl = /* @__PURE__ */ new WeakMap();
|
|
2880
|
+
class el {
|
|
2884
2881
|
constructor(e) {
|
|
2885
2882
|
this.openGlobalLock = null, this.isDragging = !1, this.currentDirection = null, this.originPoint = { x: 0, y: 0 }, this.constraints = !1, this.hasMutatedConstraints = !1, this.elastic = w(), this.visualElement = e;
|
|
2886
2883
|
}
|
|
@@ -2890,10 +2887,10 @@ class sl {
|
|
|
2890
2887
|
return;
|
|
2891
2888
|
const i = (c) => {
|
|
2892
2889
|
const { dragSnapToOrigin: h } = this.getProps();
|
|
2893
|
-
h ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(
|
|
2894
|
-
},
|
|
2890
|
+
h ? this.pauseAnimation() : this.stopAnimation(), n && this.snapToCursor(zt(c, "page").point);
|
|
2891
|
+
}, o = (c, h) => {
|
|
2895
2892
|
const { drag: f, dragPropagation: d, onDragStart: m } = this.getProps();
|
|
2896
|
-
if (f && !d && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock =
|
|
2893
|
+
if (f && !d && (this.openGlobalLock && this.openGlobalLock(), this.openGlobalLock = Os(f), !this.openGlobalLock))
|
|
2897
2894
|
return;
|
|
2898
2895
|
this.isDragging = !0, this.currentDirection = null, this.resolveConstraints(), this.visualElement.projection && (this.visualElement.projection.isAnimationBlocked = !0, this.visualElement.projection.target = void 0), I((y) => {
|
|
2899
2896
|
let v = this.getAxisMotionValue(y).get() || 0;
|
|
@@ -2908,13 +2905,13 @@ class sl {
|
|
|
2908
2905
|
}), m && m(c, h);
|
|
2909
2906
|
const { animationState: p } = this.visualElement;
|
|
2910
2907
|
p && p.setActive("whileDrag", !0);
|
|
2911
|
-
},
|
|
2908
|
+
}, r = (c, h) => {
|
|
2912
2909
|
const { dragPropagation: f, dragDirectionLock: d, onDirectionLock: m, onDrag: p } = this.getProps();
|
|
2913
2910
|
if (!f && !this.openGlobalLock)
|
|
2914
2911
|
return;
|
|
2915
2912
|
const { offset: y } = h;
|
|
2916
2913
|
if (d && this.currentDirection === null) {
|
|
2917
|
-
this.currentDirection =
|
|
2914
|
+
this.currentDirection = nl(y), this.currentDirection !== null && m && m(this.currentDirection);
|
|
2918
2915
|
return;
|
|
2919
2916
|
}
|
|
2920
2917
|
this.updateAxis("x", h.point, y), this.updateAxis("y", h.point, y), this.visualElement.render(), p && p(c, h);
|
|
@@ -2922,16 +2919,16 @@ class sl {
|
|
|
2922
2919
|
var h;
|
|
2923
2920
|
return this.getAnimationState(c) === "paused" && ((h = this.getAxisMotionValue(c).animation) === null || h === void 0 ? void 0 : h.play());
|
|
2924
2921
|
}), { dragSnapToOrigin: u } = this.getProps();
|
|
2925
|
-
this.panSession = new
|
|
2922
|
+
this.panSession = new yi(e, {
|
|
2926
2923
|
onSessionStart: i,
|
|
2927
|
-
onStart:
|
|
2928
|
-
onMove:
|
|
2924
|
+
onStart: o,
|
|
2925
|
+
onMove: r,
|
|
2929
2926
|
onSessionEnd: a,
|
|
2930
2927
|
resumeAnimation: l
|
|
2931
2928
|
}, {
|
|
2932
2929
|
transformPagePoint: this.visualElement.getTransformPagePoint(),
|
|
2933
2930
|
dragSnapToOrigin: u,
|
|
2934
|
-
contextWindow:
|
|
2931
|
+
contextWindow: Si(this.visualElement)
|
|
2935
2932
|
});
|
|
2936
2933
|
}
|
|
2937
2934
|
stop(e, n) {
|
|
@@ -2940,8 +2937,8 @@ class sl {
|
|
|
2940
2937
|
return;
|
|
2941
2938
|
const { velocity: i } = n;
|
|
2942
2939
|
this.startAnimation(i);
|
|
2943
|
-
const { onDragEnd:
|
|
2944
|
-
|
|
2940
|
+
const { onDragEnd: o } = this.getProps();
|
|
2941
|
+
o && o(e, n);
|
|
2945
2942
|
}
|
|
2946
2943
|
cancel() {
|
|
2947
2944
|
this.isDragging = !1;
|
|
@@ -2954,15 +2951,15 @@ class sl {
|
|
|
2954
2951
|
const { drag: i } = this.getProps();
|
|
2955
2952
|
if (!s || !Lt(e, i, this.currentDirection))
|
|
2956
2953
|
return;
|
|
2957
|
-
const
|
|
2958
|
-
let
|
|
2959
|
-
this.constraints && this.constraints[e] && (
|
|
2954
|
+
const o = this.getAxisMotionValue(e);
|
|
2955
|
+
let r = this.originPoint[e] + s[e];
|
|
2956
|
+
this.constraints && this.constraints[e] && (r = $a(r, this.constraints[e], this.elastic[e])), o.set(r);
|
|
2960
2957
|
}
|
|
2961
2958
|
resolveConstraints() {
|
|
2962
2959
|
var e;
|
|
2963
|
-
const { dragConstraints: n, dragElastic: s } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection) === null || e === void 0 ? void 0 : e.layout,
|
|
2964
|
-
n && lt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && i ? this.constraints =
|
|
2965
|
-
this.getAxisMotionValue(
|
|
2960
|
+
const { dragConstraints: n, dragElastic: s } = this.getProps(), i = this.visualElement.projection && !this.visualElement.projection.layout ? this.visualElement.projection.measure(!1) : (e = this.visualElement.projection) === null || e === void 0 ? void 0 : e.layout, o = this.constraints;
|
|
2961
|
+
n && lt(n) ? this.constraints || (this.constraints = this.resolveRefConstraints()) : n && i ? this.constraints = Wa(i.layoutBox, n) : this.constraints = !1, this.elastic = za(s), o !== this.constraints && i && this.constraints && !this.hasMutatedConstraints && I((r) => {
|
|
2962
|
+
this.getAxisMotionValue(r) && (this.constraints[r] = Ha(i.layoutBox[r], this.constraints[r]));
|
|
2966
2963
|
});
|
|
2967
2964
|
}
|
|
2968
2965
|
resolveRefConstraints() {
|
|
@@ -2974,20 +2971,20 @@ class sl {
|
|
|
2974
2971
|
const { projection: i } = this.visualElement;
|
|
2975
2972
|
if (!i || !i.layout)
|
|
2976
2973
|
return !1;
|
|
2977
|
-
const
|
|
2978
|
-
let
|
|
2974
|
+
const o = Qa(s, i.root, this.visualElement.getTransformPagePoint());
|
|
2975
|
+
let r = _a(i.layout.layoutBox, o);
|
|
2979
2976
|
if (n) {
|
|
2980
|
-
const a = n(
|
|
2981
|
-
this.hasMutatedConstraints = !!a, a && (
|
|
2977
|
+
const a = n(Ya(r));
|
|
2978
|
+
this.hasMutatedConstraints = !!a, a && (r = xi(a));
|
|
2982
2979
|
}
|
|
2983
|
-
return
|
|
2980
|
+
return r;
|
|
2984
2981
|
}
|
|
2985
2982
|
startAnimation(e) {
|
|
2986
|
-
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition:
|
|
2983
|
+
const { drag: n, dragMomentum: s, dragElastic: i, dragTransition: o, dragSnapToOrigin: r, onDragTransitionEnd: a } = this.getProps(), l = this.constraints || {}, u = I((c) => {
|
|
2987
2984
|
if (!Lt(c, n, this.currentDirection))
|
|
2988
2985
|
return;
|
|
2989
2986
|
let h = l && l[c] || {};
|
|
2990
|
-
|
|
2987
|
+
r && (h = { min: 0, max: 0 });
|
|
2991
2988
|
const f = i ? 200 : 1e6, d = i ? 40 : 1e7, m = {
|
|
2992
2989
|
type: "inertia",
|
|
2993
2990
|
velocity: s ? e[c] : 0,
|
|
@@ -2996,7 +2993,7 @@ class sl {
|
|
|
2996
2993
|
timeConstant: 750,
|
|
2997
2994
|
restDelta: 1,
|
|
2998
2995
|
restSpeed: 10,
|
|
2999
|
-
...
|
|
2996
|
+
...o,
|
|
3000
2997
|
...h
|
|
3001
2998
|
};
|
|
3002
2999
|
return this.startAxisValueAnimation(c, m);
|
|
@@ -3005,7 +3002,7 @@ class sl {
|
|
|
3005
3002
|
}
|
|
3006
3003
|
startAxisValueAnimation(e, n) {
|
|
3007
3004
|
const s = this.getAxisMotionValue(e);
|
|
3008
|
-
return s.start(
|
|
3005
|
+
return s.start(Xe(e, s, 0, n, this.visualElement));
|
|
3009
3006
|
}
|
|
3010
3007
|
stopAnimation() {
|
|
3011
3008
|
I((e) => this.getAxisMotionValue(e).stop());
|
|
@@ -3035,10 +3032,10 @@ class sl {
|
|
|
3035
3032
|
const { drag: s } = this.getProps();
|
|
3036
3033
|
if (!Lt(n, s, this.currentDirection))
|
|
3037
3034
|
return;
|
|
3038
|
-
const { projection: i } = this.visualElement,
|
|
3035
|
+
const { projection: i } = this.visualElement, o = this.getAxisMotionValue(n);
|
|
3039
3036
|
if (i && i.layout) {
|
|
3040
|
-
const { min:
|
|
3041
|
-
|
|
3037
|
+
const { min: r, max: a } = i.layout.layoutBox[n];
|
|
3038
|
+
o.set(e[n] - V(r, a, 0.5));
|
|
3042
3039
|
}
|
|
3043
3040
|
});
|
|
3044
3041
|
}
|
|
@@ -3055,52 +3052,52 @@ class sl {
|
|
|
3055
3052
|
return;
|
|
3056
3053
|
this.stopAnimation();
|
|
3057
3054
|
const i = { x: 0, y: 0 };
|
|
3058
|
-
I((
|
|
3059
|
-
const a = this.getAxisMotionValue(
|
|
3055
|
+
I((r) => {
|
|
3056
|
+
const a = this.getAxisMotionValue(r);
|
|
3060
3057
|
if (a) {
|
|
3061
3058
|
const l = a.get();
|
|
3062
|
-
i[
|
|
3059
|
+
i[r] = Ga({ min: l, max: l }, this.constraints[r]);
|
|
3063
3060
|
}
|
|
3064
3061
|
});
|
|
3065
|
-
const { transformTemplate:
|
|
3066
|
-
this.visualElement.current.style.transform =
|
|
3067
|
-
if (!Lt(
|
|
3062
|
+
const { transformTemplate: o } = this.visualElement.getProps();
|
|
3063
|
+
this.visualElement.current.style.transform = o ? o({}, "") : "none", s.root && s.root.updateScroll(), s.updateLayout(), this.resolveConstraints(), I((r) => {
|
|
3064
|
+
if (!Lt(r, e, null))
|
|
3068
3065
|
return;
|
|
3069
|
-
const a = this.getAxisMotionValue(
|
|
3070
|
-
a.set(V(l, u, i[
|
|
3066
|
+
const a = this.getAxisMotionValue(r), { min: l, max: u } = this.constraints[r];
|
|
3067
|
+
a.set(V(l, u, i[r]));
|
|
3071
3068
|
});
|
|
3072
3069
|
}
|
|
3073
3070
|
addListeners() {
|
|
3074
3071
|
if (!this.visualElement.current)
|
|
3075
3072
|
return;
|
|
3076
|
-
|
|
3073
|
+
tl.set(this.visualElement, this);
|
|
3077
3074
|
const e = this.visualElement.current, n = $(e, "pointerdown", (l) => {
|
|
3078
3075
|
const { drag: u, dragListener: c = !0 } = this.getProps();
|
|
3079
3076
|
u && c && this.start(l);
|
|
3080
3077
|
}), s = () => {
|
|
3081
3078
|
const { dragConstraints: l } = this.getProps();
|
|
3082
3079
|
lt(l) && (this.constraints = this.resolveRefConstraints());
|
|
3083
|
-
}, { projection: i } = this.visualElement,
|
|
3080
|
+
}, { projection: i } = this.visualElement, o = i.addEventListener("measure", s);
|
|
3084
3081
|
i && !i.layout && (i.root && i.root.updateScroll(), i.updateLayout()), s();
|
|
3085
|
-
const
|
|
3082
|
+
const r = K(window, "resize", () => this.scalePositionWithinConstraints()), a = i.addEventListener("didUpdate", ({ delta: l, hasLayoutChanged: u }) => {
|
|
3086
3083
|
this.isDragging && u && (I((c) => {
|
|
3087
3084
|
const h = this.getAxisMotionValue(c);
|
|
3088
3085
|
h && (this.originPoint[c] += l[c].translate, h.set(h.get() + l[c].translate));
|
|
3089
3086
|
}), this.visualElement.render());
|
|
3090
3087
|
});
|
|
3091
3088
|
return () => {
|
|
3092
|
-
|
|
3089
|
+
r(), n(), o(), a && a();
|
|
3093
3090
|
};
|
|
3094
3091
|
}
|
|
3095
3092
|
getProps() {
|
|
3096
|
-
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints:
|
|
3093
|
+
const e = this.visualElement.getProps(), { drag: n = !1, dragDirectionLock: s = !1, dragPropagation: i = !1, dragConstraints: o = !1, dragElastic: r = be, dragMomentum: a = !0 } = e;
|
|
3097
3094
|
return {
|
|
3098
3095
|
...e,
|
|
3099
3096
|
drag: n,
|
|
3100
3097
|
dragDirectionLock: s,
|
|
3101
3098
|
dragPropagation: i,
|
|
3102
|
-
dragConstraints:
|
|
3103
|
-
dragElastic:
|
|
3099
|
+
dragConstraints: o,
|
|
3100
|
+
dragElastic: r,
|
|
3104
3101
|
dragMomentum: a
|
|
3105
3102
|
};
|
|
3106
3103
|
}
|
|
@@ -3108,13 +3105,13 @@ class sl {
|
|
|
3108
3105
|
function Lt(t, e, n) {
|
|
3109
3106
|
return (e === !0 || e === t) && (n === null || n === t);
|
|
3110
3107
|
}
|
|
3111
|
-
function
|
|
3108
|
+
function nl(t, e = 10) {
|
|
3112
3109
|
let n = null;
|
|
3113
3110
|
return Math.abs(t.y) > e ? n = "y" : Math.abs(t.x) > e && (n = "x"), n;
|
|
3114
3111
|
}
|
|
3115
|
-
class
|
|
3112
|
+
class sl extends tt {
|
|
3116
3113
|
constructor(e) {
|
|
3117
|
-
super(e), this.removeGroupControls = C, this.removeListeners = C, this.controls = new
|
|
3114
|
+
super(e), this.removeGroupControls = C, this.removeListeners = C, this.controls = new el(e);
|
|
3118
3115
|
}
|
|
3119
3116
|
mount() {
|
|
3120
3117
|
const { dragControls: e } = this.node.getProps();
|
|
@@ -3124,27 +3121,27 @@ class ol extends tt {
|
|
|
3124
3121
|
this.removeGroupControls(), this.removeListeners();
|
|
3125
3122
|
}
|
|
3126
3123
|
}
|
|
3127
|
-
const
|
|
3124
|
+
const _n = (t) => (e, n) => {
|
|
3128
3125
|
t && t(e, n);
|
|
3129
3126
|
};
|
|
3130
|
-
class
|
|
3127
|
+
class il extends tt {
|
|
3131
3128
|
constructor() {
|
|
3132
3129
|
super(...arguments), this.removePointerDownListener = C;
|
|
3133
3130
|
}
|
|
3134
3131
|
onPointerDown(e) {
|
|
3135
|
-
this.session = new
|
|
3132
|
+
this.session = new yi(e, this.createPanHandlers(), {
|
|
3136
3133
|
transformPagePoint: this.node.getTransformPagePoint(),
|
|
3137
|
-
contextWindow:
|
|
3134
|
+
contextWindow: Si(this.node)
|
|
3138
3135
|
});
|
|
3139
3136
|
}
|
|
3140
3137
|
createPanHandlers() {
|
|
3141
3138
|
const { onPanSessionStart: e, onPanStart: n, onPan: s, onPanEnd: i } = this.node.getProps();
|
|
3142
3139
|
return {
|
|
3143
|
-
onSessionStart:
|
|
3144
|
-
onStart:
|
|
3140
|
+
onSessionStart: _n(e),
|
|
3141
|
+
onStart: _n(n),
|
|
3145
3142
|
onMove: s,
|
|
3146
|
-
onEnd: (
|
|
3147
|
-
delete this.session, i && i(
|
|
3143
|
+
onEnd: (o, r) => {
|
|
3144
|
+
delete this.session, i && i(o, r);
|
|
3148
3145
|
}
|
|
3149
3146
|
};
|
|
3150
3147
|
}
|
|
@@ -3158,12 +3155,12 @@ class rl extends tt {
|
|
|
3158
3155
|
this.removePointerDownListener(), this.session && this.session.end();
|
|
3159
3156
|
}
|
|
3160
3157
|
}
|
|
3161
|
-
function
|
|
3162
|
-
const t = F(
|
|
3158
|
+
function rl() {
|
|
3159
|
+
const t = F(Ce);
|
|
3163
3160
|
if (t === null)
|
|
3164
3161
|
return [!0, null];
|
|
3165
|
-
const { isPresent: e, onExitComplete: n, register: s } = t, i =
|
|
3166
|
-
return
|
|
3162
|
+
const { isPresent: e, onExitComplete: n, register: s } = t, i = Ki();
|
|
3163
|
+
return we(() => s(i), []), !e && n ? [!1, () => n && n(i)] : [!0];
|
|
3167
3164
|
}
|
|
3168
3165
|
const kt = {
|
|
3169
3166
|
/**
|
|
@@ -3177,7 +3174,7 @@ const kt = {
|
|
|
3177
3174
|
*/
|
|
3178
3175
|
hasEverUpdated: !1
|
|
3179
3176
|
};
|
|
3180
|
-
function
|
|
3177
|
+
function Gn(t, e) {
|
|
3181
3178
|
return e.max === e.min ? 0 : t / (e.max - e.min) * 100;
|
|
3182
3179
|
}
|
|
3183
3180
|
const pt = {
|
|
@@ -3189,45 +3186,45 @@ const pt = {
|
|
|
3189
3186
|
t = parseFloat(t);
|
|
3190
3187
|
else
|
|
3191
3188
|
return t;
|
|
3192
|
-
const n =
|
|
3189
|
+
const n = Gn(t, e.target.x), s = Gn(t, e.target.y);
|
|
3193
3190
|
return `${n}% ${s}%`;
|
|
3194
3191
|
}
|
|
3195
|
-
},
|
|
3192
|
+
}, ol = {
|
|
3196
3193
|
correct: (t, { treeScale: e, projectionDelta: n }) => {
|
|
3197
|
-
const s = t, i =
|
|
3194
|
+
const s = t, i = Q.parse(t);
|
|
3198
3195
|
if (i.length > 5)
|
|
3199
3196
|
return s;
|
|
3200
|
-
const
|
|
3201
|
-
i[0 +
|
|
3197
|
+
const o = Q.createTransformer(t), r = typeof i[0] != "number" ? 1 : 0, a = n.x.scale * e.x, l = n.y.scale * e.y;
|
|
3198
|
+
i[0 + r] /= a, i[1 + r] /= l;
|
|
3202
3199
|
const u = V(a, l, 0.5);
|
|
3203
|
-
return typeof i[2 +
|
|
3200
|
+
return typeof i[2 + r] == "number" && (i[2 + r] /= u), typeof i[3 + r] == "number" && (i[3 + r] /= u), o(i);
|
|
3204
3201
|
}
|
|
3205
3202
|
};
|
|
3206
|
-
class
|
|
3203
|
+
class al extends fs.Component {
|
|
3207
3204
|
/**
|
|
3208
3205
|
* This only mounts projection nodes for components that
|
|
3209
3206
|
* need measuring, we might want to do it for all components
|
|
3210
3207
|
* in order to incorporate transforms
|
|
3211
3208
|
*/
|
|
3212
3209
|
componentDidMount() {
|
|
3213
|
-
const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection:
|
|
3214
|
-
|
|
3210
|
+
const { visualElement: e, layoutGroup: n, switchLayoutGroup: s, layoutId: i } = this.props, { projection: o } = e;
|
|
3211
|
+
or(ll), o && (n.group && n.group.add(o), s && s.register && i && s.register(o), o.root.didUpdate(), o.addEventListener("animationComplete", () => {
|
|
3215
3212
|
this.safeToRemove();
|
|
3216
|
-
}),
|
|
3217
|
-
...
|
|
3213
|
+
}), o.setOptions({
|
|
3214
|
+
...o.options,
|
|
3218
3215
|
onExitComplete: () => this.safeToRemove()
|
|
3219
3216
|
})), kt.hasEverUpdated = !0;
|
|
3220
3217
|
}
|
|
3221
3218
|
getSnapshotBeforeUpdate(e) {
|
|
3222
|
-
const { layoutDependency: n, visualElement: s, drag: i, isPresent:
|
|
3223
|
-
return
|
|
3224
|
-
const a =
|
|
3219
|
+
const { layoutDependency: n, visualElement: s, drag: i, isPresent: o } = this.props, r = s.projection;
|
|
3220
|
+
return r && (r.isPresent = o, i || e.layoutDependency !== n || n === void 0 ? r.willUpdate() : this.safeToRemove(), e.isPresent !== o && (o ? r.promote() : r.relegate() || D.postRender(() => {
|
|
3221
|
+
const a = r.getStack();
|
|
3225
3222
|
(!a || !a.members.length) && this.safeToRemove();
|
|
3226
3223
|
}))), null;
|
|
3227
3224
|
}
|
|
3228
3225
|
componentDidUpdate() {
|
|
3229
3226
|
const { projection: e } = this.props.visualElement;
|
|
3230
|
-
e && (e.root.didUpdate(),
|
|
3227
|
+
e && (e.root.didUpdate(), Me.postRender(() => {
|
|
3231
3228
|
!e.currentAnimation && e.isLead() && this.safeToRemove();
|
|
3232
3229
|
}));
|
|
3233
3230
|
}
|
|
@@ -3243,11 +3240,11 @@ class ul extends gs.Component {
|
|
|
3243
3240
|
return null;
|
|
3244
3241
|
}
|
|
3245
3242
|
}
|
|
3246
|
-
function
|
|
3247
|
-
const [e, n] =
|
|
3248
|
-
return
|
|
3243
|
+
function Vi(t) {
|
|
3244
|
+
const [e, n] = rl(), s = F(Ts);
|
|
3245
|
+
return fs.createElement(al, { ...t, layoutGroup: s, switchLayoutGroup: F(Ps), isPresent: e, safeToRemove: n });
|
|
3249
3246
|
}
|
|
3250
|
-
const
|
|
3247
|
+
const ll = {
|
|
3251
3248
|
borderRadius: {
|
|
3252
3249
|
...pt,
|
|
3253
3250
|
applyTo: [
|
|
@@ -3261,77 +3258,77 @@ const cl = {
|
|
|
3261
3258
|
borderTopRightRadius: pt,
|
|
3262
3259
|
borderBottomLeftRadius: pt,
|
|
3263
3260
|
borderBottomRightRadius: pt,
|
|
3264
|
-
boxShadow:
|
|
3265
|
-
},
|
|
3266
|
-
function
|
|
3261
|
+
boxShadow: ol
|
|
3262
|
+
}, wi = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], ul = wi.length, Hn = (t) => typeof t == "string" ? parseFloat(t) : t, zn = (t) => typeof t == "number" || x.test(t);
|
|
3263
|
+
function cl(t, e, n, s, i, o) {
|
|
3267
3264
|
i ? (t.opacity = V(
|
|
3268
3265
|
0,
|
|
3269
3266
|
// TODO Reinstate this if only child
|
|
3270
3267
|
n.opacity !== void 0 ? n.opacity : 1,
|
|
3271
|
-
|
|
3272
|
-
), t.opacityExit = V(e.opacity !== void 0 ? e.opacity : 1, 0,
|
|
3273
|
-
for (let
|
|
3274
|
-
const a = `border${
|
|
3275
|
-
let l =
|
|
3268
|
+
hl(s)
|
|
3269
|
+
), t.opacityExit = V(e.opacity !== void 0 ? e.opacity : 1, 0, fl(s))) : o && (t.opacity = V(e.opacity !== void 0 ? e.opacity : 1, n.opacity !== void 0 ? n.opacity : 1, s));
|
|
3270
|
+
for (let r = 0; r < ul; r++) {
|
|
3271
|
+
const a = `border${wi[r]}Radius`;
|
|
3272
|
+
let l = Yn(e, a), u = Yn(n, a);
|
|
3276
3273
|
if (l === void 0 && u === void 0)
|
|
3277
3274
|
continue;
|
|
3278
|
-
l || (l = 0), u || (u = 0), l === 0 || u === 0 ||
|
|
3275
|
+
l || (l = 0), u || (u = 0), l === 0 || u === 0 || zn(l) === zn(u) ? (t[a] = Math.max(V(Hn(l), Hn(u), s), 0), (N.test(u) || N.test(l)) && (t[a] += "%")) : t[a] = u;
|
|
3279
3276
|
}
|
|
3280
3277
|
(e.rotate || n.rotate) && (t.rotate = V(e.rotate || 0, n.rotate || 0, s));
|
|
3281
3278
|
}
|
|
3282
|
-
function
|
|
3279
|
+
function Yn(t, e) {
|
|
3283
3280
|
return t[e] !== void 0 ? t[e] : t.borderRadius;
|
|
3284
3281
|
}
|
|
3285
|
-
const
|
|
3286
|
-
function
|
|
3282
|
+
const hl = Ai(0, 0.5, li), fl = Ai(0.5, 0.95, C);
|
|
3283
|
+
function Ai(t, e, n) {
|
|
3287
3284
|
return (s) => s < t ? 0 : s > e ? 1 : n(St(t, e, s));
|
|
3288
3285
|
}
|
|
3289
|
-
function
|
|
3286
|
+
function Xn(t, e) {
|
|
3290
3287
|
t.min = e.min, t.max = e.max;
|
|
3291
3288
|
}
|
|
3292
3289
|
function j(t, e) {
|
|
3293
|
-
|
|
3290
|
+
Xn(t.x, e.x), Xn(t.y, e.y);
|
|
3294
3291
|
}
|
|
3295
|
-
function
|
|
3292
|
+
function qn(t, e, n, s, i) {
|
|
3296
3293
|
return t -= e, t = $t(t, 1 / n, s), i !== void 0 && (t = $t(t, 1 / i, s)), t;
|
|
3297
3294
|
}
|
|
3298
|
-
function
|
|
3299
|
-
if (N.test(e) && (e = parseFloat(e), e = V(
|
|
3295
|
+
function dl(t, e = 0, n = 1, s = 0.5, i, o = t, r = t) {
|
|
3296
|
+
if (N.test(e) && (e = parseFloat(e), e = V(r.min, r.max, e / 100) - r.min), typeof e != "number")
|
|
3300
3297
|
return;
|
|
3301
|
-
let a = V(
|
|
3302
|
-
t ===
|
|
3298
|
+
let a = V(o.min, o.max, s);
|
|
3299
|
+
t === o && (a -= e), t.min = qn(t.min, e, n, a, i), t.max = qn(t.max, e, n, a, i);
|
|
3303
3300
|
}
|
|
3304
|
-
function
|
|
3305
|
-
|
|
3301
|
+
function Zn(t, e, [n, s, i], o, r) {
|
|
3302
|
+
dl(t, e[n], e[s], e[i], e.scale, o, r);
|
|
3306
3303
|
}
|
|
3307
|
-
const
|
|
3308
|
-
function
|
|
3309
|
-
|
|
3304
|
+
const ml = ["x", "scaleX", "originX"], pl = ["y", "scaleY", "originY"];
|
|
3305
|
+
function Jn(t, e, n, s) {
|
|
3306
|
+
Zn(t.x, e, ml, n ? n.x : void 0, s ? s.x : void 0), Zn(t.y, e, pl, n ? n.y : void 0, s ? s.y : void 0);
|
|
3310
3307
|
}
|
|
3311
|
-
function
|
|
3308
|
+
function Qn(t) {
|
|
3312
3309
|
return t.translate === 0 && t.scale === 1;
|
|
3313
3310
|
}
|
|
3314
|
-
function
|
|
3315
|
-
return
|
|
3311
|
+
function Ci(t) {
|
|
3312
|
+
return Qn(t.x) && Qn(t.y);
|
|
3316
3313
|
}
|
|
3317
|
-
function
|
|
3314
|
+
function gl(t, e) {
|
|
3318
3315
|
return t.x.min === e.x.min && t.x.max === e.x.max && t.y.min === e.y.min && t.y.max === e.y.max;
|
|
3319
3316
|
}
|
|
3320
|
-
function
|
|
3317
|
+
function Di(t, e) {
|
|
3321
3318
|
return Math.round(t.x.min) === Math.round(e.x.min) && Math.round(t.x.max) === Math.round(e.x.max) && Math.round(t.y.min) === Math.round(e.y.min) && Math.round(t.y.max) === Math.round(e.y.max);
|
|
3322
3319
|
}
|
|
3323
|
-
function
|
|
3320
|
+
function ts(t) {
|
|
3324
3321
|
return B(t.x) / B(t.y);
|
|
3325
3322
|
}
|
|
3326
|
-
class
|
|
3323
|
+
class yl {
|
|
3327
3324
|
constructor() {
|
|
3328
3325
|
this.members = [];
|
|
3329
3326
|
}
|
|
3330
3327
|
add(e) {
|
|
3331
|
-
|
|
3328
|
+
qe(this.members, e), e.scheduleRender();
|
|
3332
3329
|
}
|
|
3333
3330
|
remove(e) {
|
|
3334
|
-
if (
|
|
3331
|
+
if (Ze(this.members, e), e === this.prevLead && (this.prevLead = void 0), e === this.lead) {
|
|
3335
3332
|
const n = this.members[this.members.length - 1];
|
|
3336
3333
|
n && this.promote(n);
|
|
3337
3334
|
}
|
|
@@ -3342,9 +3339,9 @@ class xl {
|
|
|
3342
3339
|
return !1;
|
|
3343
3340
|
let s;
|
|
3344
3341
|
for (let i = n; i >= 0; i--) {
|
|
3345
|
-
const
|
|
3346
|
-
if (
|
|
3347
|
-
s =
|
|
3342
|
+
const o = this.members[i];
|
|
3343
|
+
if (o.isPresent !== !1) {
|
|
3344
|
+
s = o;
|
|
3348
3345
|
break;
|
|
3349
3346
|
}
|
|
3350
3347
|
}
|
|
@@ -3377,95 +3374,95 @@ class xl {
|
|
|
3377
3374
|
this.lead && this.lead.snapshot && (this.lead.snapshot = void 0);
|
|
3378
3375
|
}
|
|
3379
3376
|
}
|
|
3380
|
-
function
|
|
3377
|
+
function es(t, e, n) {
|
|
3381
3378
|
let s = "";
|
|
3382
|
-
const i = t.x.translate / e.x,
|
|
3383
|
-
if ((i ||
|
|
3379
|
+
const i = t.x.translate / e.x, o = t.y.translate / e.y, r = (n == null ? void 0 : n.z) || 0;
|
|
3380
|
+
if ((i || o || r) && (s = `translate3d(${i}px, ${o}px, ${r}px) `), (e.x !== 1 || e.y !== 1) && (s += `scale(${1 / e.x}, ${1 / e.y}) `), n) {
|
|
3384
3381
|
const { transformPerspective: u, rotate: c, rotateX: h, rotateY: f, skewX: d, skewY: m } = n;
|
|
3385
3382
|
u && (s = `perspective(${u}px) ${s}`), c && (s += `rotate(${c}deg) `), h && (s += `rotateX(${h}deg) `), f && (s += `rotateY(${f}deg) `), d && (s += `skewX(${d}deg) `), m && (s += `skewY(${m}deg) `);
|
|
3386
3383
|
}
|
|
3387
3384
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
3388
3385
|
return (a !== 1 || l !== 1) && (s += `scale(${a}, ${l})`), s || "none";
|
|
3389
3386
|
}
|
|
3390
|
-
const
|
|
3391
|
-
class
|
|
3387
|
+
const vl = (t, e) => t.depth - e.depth;
|
|
3388
|
+
class xl {
|
|
3392
3389
|
constructor() {
|
|
3393
3390
|
this.children = [], this.isDirty = !1;
|
|
3394
3391
|
}
|
|
3395
3392
|
add(e) {
|
|
3396
|
-
|
|
3393
|
+
qe(this.children, e), this.isDirty = !0;
|
|
3397
3394
|
}
|
|
3398
3395
|
remove(e) {
|
|
3399
|
-
|
|
3396
|
+
Ze(this.children, e), this.isDirty = !0;
|
|
3400
3397
|
}
|
|
3401
3398
|
forEach(e) {
|
|
3402
|
-
this.isDirty && this.children.sort(
|
|
3399
|
+
this.isDirty && this.children.sort(vl), this.isDirty = !1, this.children.forEach(e);
|
|
3403
3400
|
}
|
|
3404
3401
|
}
|
|
3405
|
-
function
|
|
3402
|
+
function Tl(t, e) {
|
|
3406
3403
|
const n = q.now(), s = ({ timestamp: i }) => {
|
|
3407
|
-
const
|
|
3408
|
-
|
|
3404
|
+
const o = i - n;
|
|
3405
|
+
o >= e && (J(s), t(o - e));
|
|
3409
3406
|
};
|
|
3410
|
-
return D.read(s, !0), () =>
|
|
3407
|
+
return D.read(s, !0), () => J(s);
|
|
3411
3408
|
}
|
|
3412
|
-
function
|
|
3409
|
+
function Pl(t) {
|
|
3413
3410
|
window.MotionDebug && window.MotionDebug.record(t);
|
|
3414
3411
|
}
|
|
3415
|
-
function
|
|
3412
|
+
function bl(t) {
|
|
3416
3413
|
return t instanceof SVGElement && t.tagName !== "svg";
|
|
3417
3414
|
}
|
|
3418
|
-
function
|
|
3415
|
+
function Sl(t, e, n) {
|
|
3419
3416
|
const s = E(t) ? t : Vt(t);
|
|
3420
|
-
return s.start(
|
|
3417
|
+
return s.start(Xe("", s, e, n)), s.animation;
|
|
3421
3418
|
}
|
|
3422
|
-
const
|
|
3423
|
-
let
|
|
3419
|
+
const le = ["", "X", "Y", "Z"], Vl = { visibility: "hidden" }, ns = 1e3;
|
|
3420
|
+
let wl = 0;
|
|
3424
3421
|
const st = {
|
|
3425
3422
|
type: "projectionFrame",
|
|
3426
3423
|
totalNodes: 0,
|
|
3427
3424
|
resolvedTargetDeltas: 0,
|
|
3428
3425
|
recalculatedProjection: 0
|
|
3429
3426
|
};
|
|
3430
|
-
function
|
|
3427
|
+
function ue(t, e, n, s) {
|
|
3431
3428
|
const { latestValues: i } = e;
|
|
3432
3429
|
i[t] && (n[t] = i[t], e.setStaticValue(t, 0), s && (s[t] = 0));
|
|
3433
3430
|
}
|
|
3434
|
-
function
|
|
3431
|
+
function Mi({ attachResizeListener: t, defaultParent: e, measureScroll: n, checkIsScrollRoot: s, resetTransform: i }) {
|
|
3435
3432
|
return class {
|
|
3436
|
-
constructor(
|
|
3437
|
-
this.id =
|
|
3433
|
+
constructor(r = {}, a = e == null ? void 0 : e()) {
|
|
3434
|
+
this.id = wl++, this.animationId = 0, this.children = /* @__PURE__ */ new Set(), this.options = {}, this.isTreeAnimating = !1, this.isAnimationBlocked = !1, this.isLayoutDirty = !1, this.isProjectionDirty = !1, this.isSharedProjectionDirty = !1, this.isTransformDirty = !1, this.updateManuallyBlocked = !1, this.updateBlockedByResize = !1, this.isUpdating = !1, this.isSVG = !1, this.needsReset = !1, this.shouldResetTransform = !1, this.treeScale = { x: 1, y: 1 }, this.eventHandlers = /* @__PURE__ */ new Map(), this.hasTreeAnimated = !1, this.updateScheduled = !1, this.projectionUpdateScheduled = !1, this.checkUpdateFailed = () => {
|
|
3438
3435
|
this.isUpdating && (this.isUpdating = !1, this.clearAllSnapshots());
|
|
3439
3436
|
}, this.updateProjection = () => {
|
|
3440
|
-
this.projectionUpdateScheduled = !1, st.totalNodes = st.resolvedTargetDeltas = st.recalculatedProjection = 0, this.nodes.forEach(
|
|
3441
|
-
}, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues =
|
|
3437
|
+
this.projectionUpdateScheduled = !1, st.totalNodes = st.resolvedTargetDeltas = st.recalculatedProjection = 0, this.nodes.forEach(Dl), this.nodes.forEach(Fl), this.nodes.forEach(Bl), this.nodes.forEach(Ml), Pl(st);
|
|
3438
|
+
}, this.hasProjected = !1, this.isVisible = !0, this.animationProgress = 0, this.sharedNodes = /* @__PURE__ */ new Map(), this.latestValues = r, this.root = a ? a.root || a : this, this.path = a ? [...a.path, a] : [], this.parent = a, this.depth = a ? a.depth + 1 : 0;
|
|
3442
3439
|
for (let l = 0; l < this.path.length; l++)
|
|
3443
3440
|
this.path[l].shouldResetTransform = !0;
|
|
3444
|
-
this.root === this && (this.nodes = new
|
|
3441
|
+
this.root === this && (this.nodes = new xl());
|
|
3445
3442
|
}
|
|
3446
|
-
addEventListener(
|
|
3447
|
-
return this.eventHandlers.has(
|
|
3443
|
+
addEventListener(r, a) {
|
|
3444
|
+
return this.eventHandlers.has(r) || this.eventHandlers.set(r, new Je()), this.eventHandlers.get(r).add(a);
|
|
3448
3445
|
}
|
|
3449
|
-
notifyListeners(
|
|
3450
|
-
const l = this.eventHandlers.get(
|
|
3446
|
+
notifyListeners(r, ...a) {
|
|
3447
|
+
const l = this.eventHandlers.get(r);
|
|
3451
3448
|
l && l.notify(...a);
|
|
3452
3449
|
}
|
|
3453
|
-
hasListeners(
|
|
3454
|
-
return this.eventHandlers.has(
|
|
3450
|
+
hasListeners(r) {
|
|
3451
|
+
return this.eventHandlers.has(r);
|
|
3455
3452
|
}
|
|
3456
3453
|
/**
|
|
3457
3454
|
* Lifecycles
|
|
3458
3455
|
*/
|
|
3459
|
-
mount(
|
|
3456
|
+
mount(r, a = this.root.hasTreeAnimated) {
|
|
3460
3457
|
if (this.instance)
|
|
3461
3458
|
return;
|
|
3462
|
-
this.isSVG =
|
|
3459
|
+
this.isSVG = bl(r), this.instance = r;
|
|
3463
3460
|
const { layoutId: l, layout: u, visualElement: c } = this.options;
|
|
3464
|
-
if (c && !c.current && c.mount(
|
|
3461
|
+
if (c && !c.current && c.mount(r), this.root.nodes.add(this), this.parent && this.parent.children.add(this), a && (u || l) && (this.isLayoutDirty = !0), t) {
|
|
3465
3462
|
let h;
|
|
3466
3463
|
const f = () => this.root.updateBlockedByResize = !1;
|
|
3467
|
-
t(
|
|
3468
|
-
this.root.updateBlockedByResize = !0, h && h(), h =
|
|
3464
|
+
t(r, () => {
|
|
3465
|
+
this.root.updateBlockedByResize = !0, h && h(), h = Tl(f, 250), kt.hasAnimatedSinceResize && (kt.hasAnimatedSinceResize = !1, this.nodes.forEach(is));
|
|
3469
3466
|
});
|
|
3470
3467
|
}
|
|
3471
3468
|
l && this.root.registerSharedNode(l, this), this.options.animate !== !1 && c && (l || u) && this.addEventListener("didUpdate", ({ delta: h, hasLayoutChanged: f, hasRelativeTargetChanged: d, layout: m }) => {
|
|
@@ -3473,24 +3470,24 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3473
3470
|
this.target = void 0, this.relativeTarget = void 0;
|
|
3474
3471
|
return;
|
|
3475
3472
|
}
|
|
3476
|
-
const p = this.options.transition || c.getDefaultTransition() ||
|
|
3473
|
+
const p = this.options.transition || c.getDefaultTransition() || Nl, { onLayoutAnimationStart: y, onLayoutAnimationComplete: v } = c.getProps(), T = !this.targetLayout || !Di(this.targetLayout, m) || d, g = !f && d;
|
|
3477
3474
|
if (this.options.layoutRoot || this.resumeFrom && this.resumeFrom.instance || g || f && (T || !this.currentAnimation)) {
|
|
3478
3475
|
this.resumeFrom && (this.resumingFrom = this.resumeFrom, this.resumingFrom.resumingFrom = void 0), this.setAnimationOrigin(h, g);
|
|
3479
3476
|
const P = {
|
|
3480
|
-
...
|
|
3477
|
+
...Ke(p, "layout"),
|
|
3481
3478
|
onPlay: y,
|
|
3482
3479
|
onComplete: v
|
|
3483
3480
|
};
|
|
3484
3481
|
(c.shouldReduceMotion || this.options.layoutRoot) && (P.delay = 0, P.type = !1), this.startAnimation(P);
|
|
3485
3482
|
} else
|
|
3486
|
-
f ||
|
|
3483
|
+
f || is(this), this.isLead() && this.options.onExitComplete && this.options.onExitComplete();
|
|
3487
3484
|
this.targetLayout = m;
|
|
3488
3485
|
});
|
|
3489
3486
|
}
|
|
3490
3487
|
unmount() {
|
|
3491
3488
|
this.options.layoutId && this.willUpdate(), this.root.nodes.remove(this);
|
|
3492
|
-
const
|
|
3493
|
-
|
|
3489
|
+
const r = this.getStack();
|
|
3490
|
+
r && r.remove(this), this.parent && this.parent.children.delete(this), this.instance = void 0, J(this.updateProjection);
|
|
3494
3491
|
}
|
|
3495
3492
|
// only on the root
|
|
3496
3493
|
blockUpdate() {
|
|
@@ -3507,13 +3504,13 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3507
3504
|
}
|
|
3508
3505
|
// Note: currently only running on root node
|
|
3509
3506
|
startUpdate() {
|
|
3510
|
-
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(
|
|
3507
|
+
this.isUpdateBlocked() || (this.isUpdating = !0, this.nodes && this.nodes.forEach(kl), this.animationId++);
|
|
3511
3508
|
}
|
|
3512
3509
|
getTransformTemplate() {
|
|
3513
|
-
const { visualElement:
|
|
3514
|
-
return
|
|
3510
|
+
const { visualElement: r } = this.options;
|
|
3511
|
+
return r && r.getProps().transformTemplate;
|
|
3515
3512
|
}
|
|
3516
|
-
willUpdate(
|
|
3513
|
+
willUpdate(r = !0) {
|
|
3517
3514
|
if (this.root.hasTreeAnimated = !0, this.root.isUpdateBlocked()) {
|
|
3518
3515
|
this.options.onExitComplete && this.options.onExitComplete();
|
|
3519
3516
|
return;
|
|
@@ -3529,22 +3526,22 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3529
3526
|
if (a === void 0 && !l)
|
|
3530
3527
|
return;
|
|
3531
3528
|
const u = this.getTransformTemplate();
|
|
3532
|
-
this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0, this.updateSnapshot(),
|
|
3529
|
+
this.prevTransformTemplateValue = u ? u(this.latestValues, "") : void 0, this.updateSnapshot(), r && this.notifyListeners("willUpdate");
|
|
3533
3530
|
}
|
|
3534
3531
|
update() {
|
|
3535
3532
|
if (this.updateScheduled = !1, this.isUpdateBlocked()) {
|
|
3536
|
-
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(
|
|
3533
|
+
this.unblockUpdate(), this.clearAllSnapshots(), this.nodes.forEach(ss);
|
|
3537
3534
|
return;
|
|
3538
3535
|
}
|
|
3539
|
-
this.isUpdating || this.nodes.forEach(
|
|
3536
|
+
this.isUpdating || this.nodes.forEach(El), this.isUpdating = !1, window.HandoffCancelAllAnimations && window.HandoffCancelAllAnimations(), this.nodes.forEach(Ll), this.nodes.forEach(Al), this.nodes.forEach(Cl), this.clearAllSnapshots();
|
|
3540
3537
|
const a = q.now();
|
|
3541
|
-
A.delta = Z(0, 1e3 / 60, a - A.timestamp), A.timestamp = a, A.isProcessing = !0,
|
|
3538
|
+
A.delta = Z(0, 1e3 / 60, a - A.timestamp), A.timestamp = a, A.isProcessing = !0, Jt.update.process(A), Jt.preRender.process(A), Jt.render.process(A), A.isProcessing = !1;
|
|
3542
3539
|
}
|
|
3543
3540
|
didUpdate() {
|
|
3544
|
-
this.updateScheduled || (this.updateScheduled = !0,
|
|
3541
|
+
this.updateScheduled || (this.updateScheduled = !0, Me.read(() => this.update()));
|
|
3545
3542
|
}
|
|
3546
3543
|
clearAllSnapshots() {
|
|
3547
|
-
this.nodes.forEach(
|
|
3544
|
+
this.nodes.forEach(Rl), this.sharedNodes.forEach(Ol);
|
|
3548
3545
|
}
|
|
3549
3546
|
scheduleUpdateProjection() {
|
|
3550
3547
|
this.projectionUpdateScheduled || (this.projectionUpdateScheduled = !0, D.preRender(this.updateProjection, !1, !0));
|
|
@@ -3566,16 +3563,16 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3566
3563
|
if (this.resumeFrom && !this.resumeFrom.instance)
|
|
3567
3564
|
for (let l = 0; l < this.path.length; l++)
|
|
3568
3565
|
this.path[l].updateScroll();
|
|
3569
|
-
const
|
|
3566
|
+
const r = this.layout;
|
|
3570
3567
|
this.layout = this.measure(!1), this.layoutCorrected = w(), this.isLayoutDirty = !1, this.projectionDelta = void 0, this.notifyListeners("measure", this.layout.layoutBox);
|
|
3571
3568
|
const { visualElement: a } = this.options;
|
|
3572
|
-
a && a.notify("LayoutMeasure", this.layout.layoutBox,
|
|
3569
|
+
a && a.notify("LayoutMeasure", this.layout.layoutBox, r ? r.layoutBox : void 0);
|
|
3573
3570
|
}
|
|
3574
|
-
updateScroll(
|
|
3571
|
+
updateScroll(r = "measure") {
|
|
3575
3572
|
let a = !!(this.options.layoutScroll && this.instance);
|
|
3576
|
-
this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase ===
|
|
3573
|
+
this.scroll && this.scroll.animationId === this.root.animationId && this.scroll.phase === r && (a = !1), a && (this.scroll = {
|
|
3577
3574
|
animationId: this.root.animationId,
|
|
3578
|
-
phase:
|
|
3575
|
+
phase: r,
|
|
3579
3576
|
isRoot: s(this.instance),
|
|
3580
3577
|
offset: n(this.instance)
|
|
3581
3578
|
});
|
|
@@ -3583,13 +3580,13 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3583
3580
|
resetTransform() {
|
|
3584
3581
|
if (!i)
|
|
3585
3582
|
return;
|
|
3586
|
-
const
|
|
3587
|
-
|
|
3583
|
+
const r = this.isLayoutDirty || this.shouldResetTransform, a = this.projectionDelta && !Ci(this.projectionDelta), l = this.getTransformTemplate(), u = l ? l(this.latestValues, "") : void 0, c = u !== this.prevTransformTemplateValue;
|
|
3584
|
+
r && (a || nt(this.latestValues) || c) && (i(this.instance, u), this.shouldResetTransform = !1, this.scheduleRender());
|
|
3588
3585
|
}
|
|
3589
|
-
measure(
|
|
3586
|
+
measure(r = !0) {
|
|
3590
3587
|
const a = this.measurePageBox();
|
|
3591
3588
|
let l = this.removeElementScroll(a);
|
|
3592
|
-
return
|
|
3589
|
+
return r && (l = this.removeTransform(l)), Ul(l), {
|
|
3593
3590
|
animationId: this.root.animationId,
|
|
3594
3591
|
measuredBox: a,
|
|
3595
3592
|
layoutBox: l,
|
|
@@ -3598,20 +3595,20 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3598
3595
|
};
|
|
3599
3596
|
}
|
|
3600
3597
|
measurePageBox() {
|
|
3601
|
-
const { visualElement:
|
|
3602
|
-
if (!
|
|
3598
|
+
const { visualElement: r } = this.options;
|
|
3599
|
+
if (!r)
|
|
3603
3600
|
return w();
|
|
3604
|
-
const a =
|
|
3601
|
+
const a = r.measureViewportBox(), { scroll: l } = this.root;
|
|
3605
3602
|
return l && (X(a.x, l.offset.x), X(a.y, l.offset.y)), a;
|
|
3606
3603
|
}
|
|
3607
|
-
removeElementScroll(
|
|
3604
|
+
removeElementScroll(r) {
|
|
3608
3605
|
const a = w();
|
|
3609
|
-
j(a,
|
|
3606
|
+
j(a, r);
|
|
3610
3607
|
for (let l = 0; l < this.path.length; l++) {
|
|
3611
3608
|
const u = this.path[l], { scroll: c, options: h } = u;
|
|
3612
3609
|
if (u !== this.root && c && h.layoutScroll) {
|
|
3613
3610
|
if (c.isRoot) {
|
|
3614
|
-
j(a,
|
|
3611
|
+
j(a, r);
|
|
3615
3612
|
const { scroll: f } = this.root;
|
|
3616
3613
|
f && (X(a.x, -f.offset.x), X(a.y, -f.offset.y));
|
|
3617
3614
|
}
|
|
@@ -3620,9 +3617,9 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3620
3617
|
}
|
|
3621
3618
|
return a;
|
|
3622
3619
|
}
|
|
3623
|
-
applyTransform(
|
|
3620
|
+
applyTransform(r, a = !1) {
|
|
3624
3621
|
const l = w();
|
|
3625
|
-
j(l,
|
|
3622
|
+
j(l, r);
|
|
3626
3623
|
for (let u = 0; u < this.path.length; u++) {
|
|
3627
3624
|
const c = this.path[u];
|
|
3628
3625
|
!a && c.options.layoutScroll && c.scroll && c !== c.root && ht(l, {
|
|
@@ -3632,27 +3629,27 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3632
3629
|
}
|
|
3633
3630
|
return nt(this.latestValues) && ht(l, this.latestValues), l;
|
|
3634
3631
|
}
|
|
3635
|
-
removeTransform(
|
|
3632
|
+
removeTransform(r) {
|
|
3636
3633
|
const a = w();
|
|
3637
|
-
j(a,
|
|
3634
|
+
j(a, r);
|
|
3638
3635
|
for (let l = 0; l < this.path.length; l++) {
|
|
3639
3636
|
const u = this.path[l];
|
|
3640
3637
|
if (!u.instance || !nt(u.latestValues))
|
|
3641
3638
|
continue;
|
|
3642
|
-
|
|
3639
|
+
Se(u.latestValues) && u.updateSnapshot();
|
|
3643
3640
|
const c = w(), h = u.measurePageBox();
|
|
3644
|
-
j(c, h),
|
|
3641
|
+
j(c, h), Jn(a, u.latestValues, u.snapshot ? u.snapshot.layoutBox : void 0, c);
|
|
3645
3642
|
}
|
|
3646
|
-
return nt(this.latestValues) &&
|
|
3643
|
+
return nt(this.latestValues) && Jn(a, this.latestValues), a;
|
|
3647
3644
|
}
|
|
3648
|
-
setTargetDelta(
|
|
3649
|
-
this.targetDelta =
|
|
3645
|
+
setTargetDelta(r) {
|
|
3646
|
+
this.targetDelta = r, this.root.scheduleUpdateProjection(), this.isProjectionDirty = !0;
|
|
3650
3647
|
}
|
|
3651
|
-
setOptions(
|
|
3648
|
+
setOptions(r) {
|
|
3652
3649
|
this.options = {
|
|
3653
3650
|
...this.options,
|
|
3654
|
-
...
|
|
3655
|
-
crossfade:
|
|
3651
|
+
...r,
|
|
3652
|
+
crossfade: r.crossfade !== void 0 ? r.crossfade : !0
|
|
3656
3653
|
};
|
|
3657
3654
|
}
|
|
3658
3655
|
clearMeasurements() {
|
|
@@ -3661,12 +3658,12 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3661
3658
|
forceRelativeParentToResolveTarget() {
|
|
3662
3659
|
this.relativeParent && this.relativeParent.resolvedRelativeTargetAt !== A.timestamp && this.relativeParent.resolveTargetDelta(!0);
|
|
3663
3660
|
}
|
|
3664
|
-
resolveTargetDelta(
|
|
3661
|
+
resolveTargetDelta(r = !1) {
|
|
3665
3662
|
var a;
|
|
3666
3663
|
const l = this.getLead();
|
|
3667
3664
|
this.isProjectionDirty || (this.isProjectionDirty = l.isProjectionDirty), this.isTransformDirty || (this.isTransformDirty = l.isTransformDirty), this.isSharedProjectionDirty || (this.isSharedProjectionDirty = l.isSharedProjectionDirty);
|
|
3668
3665
|
const u = !!this.resumingFrom || this !== l;
|
|
3669
|
-
if (!(
|
|
3666
|
+
if (!(r || u && this.isSharedProjectionDirty || this.isProjectionDirty || !((a = this.parent) === null || a === void 0) && a.isProjectionDirty || this.attemptToResolveRelativeTarget))
|
|
3670
3667
|
return;
|
|
3671
3668
|
const { layout: h, layoutId: f } = this.options;
|
|
3672
3669
|
if (!(!this.layout || !(h || f))) {
|
|
@@ -3675,7 +3672,7 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3675
3672
|
d && d.layout && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = w(), this.relativeTargetOrigin = w(), Tt(this.relativeTargetOrigin, this.layout.layoutBox, d.layout.layoutBox), j(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
3676
3673
|
}
|
|
3677
3674
|
if (!(!this.relativeTarget && !this.targetDelta)) {
|
|
3678
|
-
if (this.target || (this.target = w(), this.targetWithTransforms = w()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(),
|
|
3675
|
+
if (this.target || (this.target = w(), this.targetWithTransforms = w()), this.relativeTarget && this.relativeTargetOrigin && this.relativeParent && this.relativeParent.target ? (this.forceRelativeParentToResolveTarget(), Ka(this.target, this.relativeTarget, this.relativeParent.target)) : this.targetDelta ? (this.resumingFrom ? this.target = this.applyTransform(this.layout.layoutBox) : j(this.target, this.layout.layoutBox), Pi(this.target, this.targetDelta)) : j(this.target, this.layout.layoutBox), this.attemptToResolveRelativeTarget) {
|
|
3679
3676
|
this.attemptToResolveRelativeTarget = !1;
|
|
3680
3677
|
const d = this.getClosestProjectingParent();
|
|
3681
3678
|
d && !!d.resumingFrom == !!this.resumingFrom && !d.options.layoutScroll && d.target && this.animationProgress !== 1 ? (this.relativeParent = d, this.forceRelativeParentToResolveTarget(), this.relativeTarget = w(), this.relativeTargetOrigin = w(), Tt(this.relativeTargetOrigin, this.target, d.target), j(this.relativeTarget, this.relativeTargetOrigin)) : this.relativeParent = this.relativeTarget = void 0;
|
|
@@ -3685,24 +3682,24 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3685
3682
|
}
|
|
3686
3683
|
}
|
|
3687
3684
|
getClosestProjectingParent() {
|
|
3688
|
-
if (!(!this.parent ||
|
|
3685
|
+
if (!(!this.parent || Se(this.parent.latestValues) || Ti(this.parent.latestValues)))
|
|
3689
3686
|
return this.parent.isProjecting() ? this.parent : this.parent.getClosestProjectingParent();
|
|
3690
3687
|
}
|
|
3691
3688
|
isProjecting() {
|
|
3692
3689
|
return !!((this.relativeTarget || this.targetDelta || this.options.layoutRoot) && this.layout);
|
|
3693
3690
|
}
|
|
3694
3691
|
calcProjection() {
|
|
3695
|
-
var
|
|
3692
|
+
var r;
|
|
3696
3693
|
const a = this.getLead(), l = !!this.resumingFrom || this !== a;
|
|
3697
3694
|
let u = !0;
|
|
3698
|
-
if ((this.isProjectionDirty || !((
|
|
3695
|
+
if ((this.isProjectionDirty || !((r = this.parent) === null || r === void 0) && r.isProjectionDirty) && (u = !1), l && (this.isSharedProjectionDirty || this.isTransformDirty) && (u = !1), this.resolvedRelativeTargetAt === A.timestamp && (u = !1), u)
|
|
3699
3696
|
return;
|
|
3700
3697
|
const { layout: c, layoutId: h } = this.options;
|
|
3701
3698
|
if (this.isTreeAnimating = !!(this.parent && this.parent.isTreeAnimating || this.currentAnimation || this.pendingAnimation), this.isTreeAnimating || (this.targetDelta = this.relativeTarget = void 0), !this.layout || !(c || h))
|
|
3702
3699
|
return;
|
|
3703
3700
|
j(this.layoutCorrected, this.layout.layoutBox);
|
|
3704
3701
|
const f = this.treeScale.x, d = this.treeScale.y;
|
|
3705
|
-
|
|
3702
|
+
qa(this.layoutCorrected, this.treeScale, this.path, l), a.layout && !a.target && (this.treeScale.x !== 1 || this.treeScale.y !== 1) && (a.target = a.layout.layoutBox, a.targetWithTransforms = w());
|
|
3706
3703
|
const { target: m } = a;
|
|
3707
3704
|
if (!m) {
|
|
3708
3705
|
this.projectionTransform && (this.projectionDelta = ct(), this.projectionTransform = "none", this.scheduleRender());
|
|
@@ -3710,7 +3707,7 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3710
3707
|
}
|
|
3711
3708
|
this.projectionDelta || (this.projectionDelta = ct(), this.projectionDeltaWithTransform = ct());
|
|
3712
3709
|
const p = this.projectionTransform;
|
|
3713
|
-
xt(this.projectionDelta, this.layoutCorrected, m, this.latestValues), this.projectionTransform =
|
|
3710
|
+
xt(this.projectionDelta, this.layoutCorrected, m, this.latestValues), this.projectionTransform = es(this.projectionDelta, this.treeScale), (this.projectionTransform !== p || this.treeScale.x !== f || this.treeScale.y !== d) && (this.hasProjected = !0, this.scheduleRender(), this.notifyListeners("projectionUpdate", m)), st.recalculatedProjection++;
|
|
3714
3711
|
}
|
|
3715
3712
|
hide() {
|
|
3716
3713
|
this.isVisible = !1;
|
|
@@ -3718,61 +3715,61 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3718
3715
|
show() {
|
|
3719
3716
|
this.isVisible = !0;
|
|
3720
3717
|
}
|
|
3721
|
-
scheduleRender(
|
|
3722
|
-
if (this.options.scheduleRender && this.options.scheduleRender(),
|
|
3718
|
+
scheduleRender(r = !0) {
|
|
3719
|
+
if (this.options.scheduleRender && this.options.scheduleRender(), r) {
|
|
3723
3720
|
const a = this.getStack();
|
|
3724
3721
|
a && a.scheduleRender();
|
|
3725
3722
|
}
|
|
3726
3723
|
this.resumingFrom && !this.resumingFrom.instance && (this.resumingFrom = void 0);
|
|
3727
3724
|
}
|
|
3728
|
-
setAnimationOrigin(
|
|
3725
|
+
setAnimationOrigin(r, a = !1) {
|
|
3729
3726
|
const l = this.snapshot, u = l ? l.latestValues : {}, c = { ...this.latestValues }, h = ct();
|
|
3730
3727
|
(!this.relativeParent || !this.relativeParent.options.layoutRoot) && (this.relativeTarget = this.relativeTargetOrigin = void 0), this.attemptToResolveRelativeTarget = !a;
|
|
3731
|
-
const f = w(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, p = d !== m, y = this.getStack(), v = !y || y.members.length <= 1, T = !!(p && !v && this.options.crossfade === !0 && !this.path.some(
|
|
3728
|
+
const f = w(), d = l ? l.source : void 0, m = this.layout ? this.layout.source : void 0, p = d !== m, y = this.getStack(), v = !y || y.members.length <= 1, T = !!(p && !v && this.options.crossfade === !0 && !this.path.some(Il));
|
|
3732
3729
|
this.animationProgress = 0;
|
|
3733
3730
|
let g;
|
|
3734
3731
|
this.mixTargetDelta = (P) => {
|
|
3735
3732
|
const S = P / 1e3;
|
|
3736
|
-
|
|
3733
|
+
rs(h.x, r.x, S), rs(h.y, r.y, S), this.setTargetDelta(h), this.relativeTarget && this.relativeTargetOrigin && this.layout && this.relativeParent && this.relativeParent.layout && (Tt(f, this.layout.layoutBox, this.relativeParent.layout.layoutBox), jl(this.relativeTarget, this.relativeTargetOrigin, f, S), g && gl(this.relativeTarget, g) && (this.isProjectionDirty = !1), g || (g = w()), j(g, this.relativeTarget)), p && (this.animationValues = c, cl(c, u, this.latestValues, S, T, v)), this.root.scheduleUpdateProjection(), this.scheduleRender(), this.animationProgress = S;
|
|
3737
3734
|
}, this.mixTargetDelta(this.options.layoutRoot ? 1e3 : 0);
|
|
3738
3735
|
}
|
|
3739
|
-
startAnimation(
|
|
3740
|
-
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (
|
|
3741
|
-
kt.hasAnimatedSinceResize = !0, this.currentAnimation =
|
|
3742
|
-
...
|
|
3736
|
+
startAnimation(r) {
|
|
3737
|
+
this.notifyListeners("animationStart"), this.currentAnimation && this.currentAnimation.stop(), this.resumingFrom && this.resumingFrom.currentAnimation && this.resumingFrom.currentAnimation.stop(), this.pendingAnimation && (J(this.pendingAnimation), this.pendingAnimation = void 0), this.pendingAnimation = D.update(() => {
|
|
3738
|
+
kt.hasAnimatedSinceResize = !0, this.currentAnimation = Sl(0, ns, {
|
|
3739
|
+
...r,
|
|
3743
3740
|
onUpdate: (a) => {
|
|
3744
|
-
this.mixTargetDelta(a),
|
|
3741
|
+
this.mixTargetDelta(a), r.onUpdate && r.onUpdate(a);
|
|
3745
3742
|
},
|
|
3746
3743
|
onComplete: () => {
|
|
3747
|
-
|
|
3744
|
+
r.onComplete && r.onComplete(), this.completeAnimation();
|
|
3748
3745
|
}
|
|
3749
3746
|
}), this.resumingFrom && (this.resumingFrom.currentAnimation = this.currentAnimation), this.pendingAnimation = void 0;
|
|
3750
3747
|
});
|
|
3751
3748
|
}
|
|
3752
3749
|
completeAnimation() {
|
|
3753
3750
|
this.resumingFrom && (this.resumingFrom.currentAnimation = void 0, this.resumingFrom.preserveOpacity = void 0);
|
|
3754
|
-
const
|
|
3755
|
-
|
|
3751
|
+
const r = this.getStack();
|
|
3752
|
+
r && r.exitAnimationComplete(), this.resumingFrom = this.currentAnimation = this.animationValues = void 0, this.notifyListeners("animationComplete");
|
|
3756
3753
|
}
|
|
3757
3754
|
finishAnimation() {
|
|
3758
|
-
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(
|
|
3755
|
+
this.currentAnimation && (this.mixTargetDelta && this.mixTargetDelta(ns), this.currentAnimation.stop()), this.completeAnimation();
|
|
3759
3756
|
}
|
|
3760
3757
|
applyTransformsToTarget() {
|
|
3761
|
-
const
|
|
3762
|
-
let { targetWithTransforms: a, target: l, layout: u, latestValues: c } =
|
|
3758
|
+
const r = this.getLead();
|
|
3759
|
+
let { targetWithTransforms: a, target: l, layout: u, latestValues: c } = r;
|
|
3763
3760
|
if (!(!a || !l || !u)) {
|
|
3764
|
-
if (this !==
|
|
3761
|
+
if (this !== r && this.layout && u && Ri(this.options.animationType, this.layout.layoutBox, u.layoutBox)) {
|
|
3765
3762
|
l = this.target || w();
|
|
3766
3763
|
const h = B(this.layout.layoutBox.x);
|
|
3767
|
-
l.x.min =
|
|
3764
|
+
l.x.min = r.target.x.min, l.x.max = l.x.min + h;
|
|
3768
3765
|
const f = B(this.layout.layoutBox.y);
|
|
3769
|
-
l.y.min =
|
|
3766
|
+
l.y.min = r.target.y.min, l.y.max = l.y.min + f;
|
|
3770
3767
|
}
|
|
3771
3768
|
j(a, l), ht(a, c), xt(this.projectionDeltaWithTransform, this.layoutCorrected, a, c);
|
|
3772
3769
|
}
|
|
3773
3770
|
}
|
|
3774
|
-
registerSharedNode(
|
|
3775
|
-
this.sharedNodes.has(
|
|
3771
|
+
registerSharedNode(r, a) {
|
|
3772
|
+
this.sharedNodes.has(r) || this.sharedNodes.set(r, new yl()), this.sharedNodes.get(r).add(a);
|
|
3776
3773
|
const u = a.options.initialPromotionConfig;
|
|
3777
3774
|
a.promote({
|
|
3778
3775
|
transition: u ? u.transition : void 0,
|
|
@@ -3780,67 +3777,67 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3780
3777
|
});
|
|
3781
3778
|
}
|
|
3782
3779
|
isLead() {
|
|
3783
|
-
const
|
|
3784
|
-
return
|
|
3780
|
+
const r = this.getStack();
|
|
3781
|
+
return r ? r.lead === this : !0;
|
|
3785
3782
|
}
|
|
3786
3783
|
getLead() {
|
|
3787
|
-
var
|
|
3784
|
+
var r;
|
|
3788
3785
|
const { layoutId: a } = this.options;
|
|
3789
|
-
return a ? ((
|
|
3786
|
+
return a ? ((r = this.getStack()) === null || r === void 0 ? void 0 : r.lead) || this : this;
|
|
3790
3787
|
}
|
|
3791
3788
|
getPrevLead() {
|
|
3792
|
-
var
|
|
3789
|
+
var r;
|
|
3793
3790
|
const { layoutId: a } = this.options;
|
|
3794
|
-
return a ? (
|
|
3791
|
+
return a ? (r = this.getStack()) === null || r === void 0 ? void 0 : r.prevLead : void 0;
|
|
3795
3792
|
}
|
|
3796
3793
|
getStack() {
|
|
3797
|
-
const { layoutId:
|
|
3798
|
-
if (
|
|
3799
|
-
return this.root.sharedNodes.get(
|
|
3794
|
+
const { layoutId: r } = this.options;
|
|
3795
|
+
if (r)
|
|
3796
|
+
return this.root.sharedNodes.get(r);
|
|
3800
3797
|
}
|
|
3801
|
-
promote({ needsReset:
|
|
3798
|
+
promote({ needsReset: r, transition: a, preserveFollowOpacity: l } = {}) {
|
|
3802
3799
|
const u = this.getStack();
|
|
3803
|
-
u && u.promote(this, l),
|
|
3800
|
+
u && u.promote(this, l), r && (this.projectionDelta = void 0, this.needsReset = !0), a && this.setOptions({ transition: a });
|
|
3804
3801
|
}
|
|
3805
3802
|
relegate() {
|
|
3806
|
-
const
|
|
3807
|
-
return
|
|
3803
|
+
const r = this.getStack();
|
|
3804
|
+
return r ? r.relegate(this) : !1;
|
|
3808
3805
|
}
|
|
3809
3806
|
resetSkewAndRotation() {
|
|
3810
|
-
const { visualElement:
|
|
3811
|
-
if (!
|
|
3807
|
+
const { visualElement: r } = this.options;
|
|
3808
|
+
if (!r)
|
|
3812
3809
|
return;
|
|
3813
3810
|
let a = !1;
|
|
3814
|
-
const { latestValues: l } =
|
|
3811
|
+
const { latestValues: l } = r;
|
|
3815
3812
|
if ((l.z || l.rotate || l.rotateX || l.rotateY || l.rotateZ || l.skewX || l.skewY) && (a = !0), !a)
|
|
3816
3813
|
return;
|
|
3817
3814
|
const u = {};
|
|
3818
|
-
l.z &&
|
|
3819
|
-
for (let c = 0; c <
|
|
3820
|
-
|
|
3821
|
-
|
|
3815
|
+
l.z && ue("z", r, u, this.animationValues);
|
|
3816
|
+
for (let c = 0; c < le.length; c++)
|
|
3817
|
+
ue(`rotate${le[c]}`, r, u, this.animationValues), ue(`skew${le[c]}`, r, u, this.animationValues);
|
|
3818
|
+
r.render();
|
|
3822
3819
|
for (const c in u)
|
|
3823
|
-
|
|
3824
|
-
|
|
3820
|
+
r.setStaticValue(c, u[c]), this.animationValues && (this.animationValues[c] = u[c]);
|
|
3821
|
+
r.scheduleRender();
|
|
3825
3822
|
}
|
|
3826
|
-
getProjectionStyles(
|
|
3823
|
+
getProjectionStyles(r) {
|
|
3827
3824
|
var a, l;
|
|
3828
3825
|
if (!this.instance || this.isSVG)
|
|
3829
3826
|
return;
|
|
3830
3827
|
if (!this.isVisible)
|
|
3831
|
-
return
|
|
3828
|
+
return Vl;
|
|
3832
3829
|
const u = {
|
|
3833
3830
|
visibility: ""
|
|
3834
3831
|
}, c = this.getTransformTemplate();
|
|
3835
3832
|
if (this.needsReset)
|
|
3836
|
-
return this.needsReset = !1, u.opacity = "", u.pointerEvents = Ft(
|
|
3833
|
+
return this.needsReset = !1, u.opacity = "", u.pointerEvents = Ft(r == null ? void 0 : r.pointerEvents) || "", u.transform = c ? c(this.latestValues, "") : "none", u;
|
|
3837
3834
|
const h = this.getLead();
|
|
3838
3835
|
if (!this.projectionDelta || !this.layout || !h.target) {
|
|
3839
3836
|
const p = {};
|
|
3840
|
-
return this.options.layoutId && (p.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, p.pointerEvents = Ft(
|
|
3837
|
+
return this.options.layoutId && (p.opacity = this.latestValues.opacity !== void 0 ? this.latestValues.opacity : 1, p.pointerEvents = Ft(r == null ? void 0 : r.pointerEvents) || ""), this.hasProjected && !nt(this.latestValues) && (p.transform = c ? c({}, "") : "none", this.hasProjected = !1), p;
|
|
3841
3838
|
}
|
|
3842
3839
|
const f = h.animationValues || h.latestValues;
|
|
3843
|
-
this.applyTransformsToTarget(), u.transform =
|
|
3840
|
+
this.applyTransformsToTarget(), u.transform = es(this.projectionDeltaWithTransform, this.treeScale, f), c && (u.transform = c(f, u.transform));
|
|
3844
3841
|
const { x: d, y: m } = this.projectionDelta;
|
|
3845
3842
|
u.transformOrigin = `${d.origin * 100}% ${m.origin * 100}% 0`, h.animationValues ? u.opacity = h === this ? (l = (a = f.opacity) !== null && a !== void 0 ? a : this.latestValues.opacity) !== null && l !== void 0 ? l : 1 : this.preserveOpacity ? this.latestValues.opacity : f.opacityExit : u.opacity = h === this ? f.opacity !== void 0 ? f.opacity : "" : f.opacityExit !== void 0 ? f.opacityExit : 0;
|
|
3846
3843
|
for (const p in Ot) {
|
|
@@ -3854,40 +3851,40 @@ function Li({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3854
3851
|
} else
|
|
3855
3852
|
u[p] = T;
|
|
3856
3853
|
}
|
|
3857
|
-
return this.options.layoutId && (u.pointerEvents = h === this ? Ft(
|
|
3854
|
+
return this.options.layoutId && (u.pointerEvents = h === this ? Ft(r == null ? void 0 : r.pointerEvents) || "" : "none"), u;
|
|
3858
3855
|
}
|
|
3859
3856
|
clearSnapshot() {
|
|
3860
3857
|
this.resumeFrom = this.snapshot = void 0;
|
|
3861
3858
|
}
|
|
3862
3859
|
// Only run on root
|
|
3863
3860
|
resetTree() {
|
|
3864
|
-
this.root.nodes.forEach((
|
|
3861
|
+
this.root.nodes.forEach((r) => {
|
|
3865
3862
|
var a;
|
|
3866
|
-
return (a =
|
|
3867
|
-
}), this.root.nodes.forEach(
|
|
3863
|
+
return (a = r.currentAnimation) === null || a === void 0 ? void 0 : a.stop();
|
|
3864
|
+
}), this.root.nodes.forEach(ss), this.root.sharedNodes.clear();
|
|
3868
3865
|
}
|
|
3869
3866
|
};
|
|
3870
3867
|
}
|
|
3871
|
-
function
|
|
3868
|
+
function Al(t) {
|
|
3872
3869
|
t.updateLayout();
|
|
3873
3870
|
}
|
|
3874
|
-
function
|
|
3871
|
+
function Cl(t) {
|
|
3875
3872
|
var e;
|
|
3876
3873
|
const n = ((e = t.resumeFrom) === null || e === void 0 ? void 0 : e.snapshot) || t.snapshot;
|
|
3877
3874
|
if (t.isLead() && t.layout && n && t.hasListeners("didUpdate")) {
|
|
3878
|
-
const { layoutBox: s, measuredBox: i } = t.layout, { animationType:
|
|
3879
|
-
|
|
3880
|
-
const f =
|
|
3875
|
+
const { layoutBox: s, measuredBox: i } = t.layout, { animationType: o } = t.options, r = n.source !== t.layout.source;
|
|
3876
|
+
o === "size" ? I((h) => {
|
|
3877
|
+
const f = r ? n.measuredBox[h] : n.layoutBox[h], d = B(f);
|
|
3881
3878
|
f.min = s[h].min, f.max = f.min + d;
|
|
3882
|
-
}) :
|
|
3883
|
-
const f =
|
|
3879
|
+
}) : Ri(o, n.layoutBox, s) && I((h) => {
|
|
3880
|
+
const f = r ? n.measuredBox[h] : n.layoutBox[h], d = B(s[h]);
|
|
3884
3881
|
f.max = f.min + d, t.relativeTarget && !t.currentAnimation && (t.isProjectionDirty = !0, t.relativeTarget[h].max = t.relativeTarget[h].min + d);
|
|
3885
3882
|
});
|
|
3886
3883
|
const a = ct();
|
|
3887
3884
|
xt(a, s, n.layoutBox);
|
|
3888
3885
|
const l = ct();
|
|
3889
|
-
|
|
3890
|
-
const u = !
|
|
3886
|
+
r ? xt(l, t.applyTransform(i, !0), n.measuredBox) : xt(l, s, n.layoutBox);
|
|
3887
|
+
const u = !Ci(a);
|
|
3891
3888
|
let c = !1;
|
|
3892
3889
|
if (!t.resumeFrom) {
|
|
3893
3890
|
const h = t.getClosestProjectingParent();
|
|
@@ -3897,7 +3894,7 @@ function Ml(t) {
|
|
|
3897
3894
|
const m = w();
|
|
3898
3895
|
Tt(m, n.layoutBox, f.layoutBox);
|
|
3899
3896
|
const p = w();
|
|
3900
|
-
Tt(p, s, d.layoutBox),
|
|
3897
|
+
Tt(p, s, d.layoutBox), Di(m, p) || (c = !0), h.options.layoutRoot && (t.relativeTarget = p, t.relativeTargetOrigin = m, t.relativeParent = h);
|
|
3901
3898
|
}
|
|
3902
3899
|
}
|
|
3903
3900
|
}
|
|
@@ -3915,130 +3912,122 @@ function Ml(t) {
|
|
|
3915
3912
|
}
|
|
3916
3913
|
t.options.transition = void 0;
|
|
3917
3914
|
}
|
|
3918
|
-
function
|
|
3915
|
+
function Dl(t) {
|
|
3919
3916
|
st.totalNodes++, t.parent && (t.isProjecting() || (t.isProjectionDirty = t.parent.isProjectionDirty), t.isSharedProjectionDirty || (t.isSharedProjectionDirty = !!(t.isProjectionDirty || t.parent.isProjectionDirty || t.parent.isSharedProjectionDirty)), t.isTransformDirty || (t.isTransformDirty = t.parent.isTransformDirty));
|
|
3920
3917
|
}
|
|
3921
|
-
function
|
|
3918
|
+
function Ml(t) {
|
|
3922
3919
|
t.isProjectionDirty = t.isSharedProjectionDirty = t.isTransformDirty = !1;
|
|
3923
3920
|
}
|
|
3924
|
-
function
|
|
3921
|
+
function Rl(t) {
|
|
3925
3922
|
t.clearSnapshot();
|
|
3926
3923
|
}
|
|
3927
|
-
function
|
|
3924
|
+
function ss(t) {
|
|
3928
3925
|
t.clearMeasurements();
|
|
3929
3926
|
}
|
|
3930
|
-
function
|
|
3927
|
+
function El(t) {
|
|
3931
3928
|
t.isLayoutDirty = !1;
|
|
3932
3929
|
}
|
|
3933
|
-
function
|
|
3930
|
+
function Ll(t) {
|
|
3934
3931
|
const { visualElement: e } = t.options;
|
|
3935
3932
|
e && e.getProps().onBeforeLayoutMeasure && e.notify("BeforeLayoutMeasure"), t.resetTransform();
|
|
3936
3933
|
}
|
|
3937
|
-
function
|
|
3934
|
+
function is(t) {
|
|
3938
3935
|
t.finishAnimation(), t.targetDelta = t.relativeTarget = t.target = void 0, t.isProjectionDirty = !0;
|
|
3939
3936
|
}
|
|
3940
|
-
function
|
|
3937
|
+
function Fl(t) {
|
|
3941
3938
|
t.resolveTargetDelta();
|
|
3942
3939
|
}
|
|
3943
|
-
function
|
|
3940
|
+
function Bl(t) {
|
|
3944
3941
|
t.calcProjection();
|
|
3945
3942
|
}
|
|
3946
|
-
function
|
|
3943
|
+
function kl(t) {
|
|
3947
3944
|
t.resetSkewAndRotation();
|
|
3948
3945
|
}
|
|
3949
|
-
function
|
|
3946
|
+
function Ol(t) {
|
|
3950
3947
|
t.removeLeadSnapshot();
|
|
3951
3948
|
}
|
|
3952
|
-
function
|
|
3949
|
+
function rs(t, e, n) {
|
|
3953
3950
|
t.translate = V(e.translate, 0, n), t.scale = V(e.scale, 1, n), t.origin = e.origin, t.originPoint = e.originPoint;
|
|
3954
3951
|
}
|
|
3955
|
-
function
|
|
3952
|
+
function os(t, e, n, s) {
|
|
3956
3953
|
t.min = V(e.min, n.min, s), t.max = V(e.max, n.max, s);
|
|
3957
3954
|
}
|
|
3958
|
-
function
|
|
3959
|
-
|
|
3955
|
+
function jl(t, e, n, s) {
|
|
3956
|
+
os(t.x, e.x, n.x, s), os(t.y, e.y, n.y, s);
|
|
3960
3957
|
}
|
|
3961
|
-
function
|
|
3958
|
+
function Il(t) {
|
|
3962
3959
|
return t.animationValues && t.animationValues.opacityExit !== void 0;
|
|
3963
3960
|
}
|
|
3964
|
-
const
|
|
3961
|
+
const Nl = {
|
|
3965
3962
|
duration: 0.45,
|
|
3966
3963
|
ease: [0.4, 0, 0.1, 1]
|
|
3967
|
-
},
|
|
3968
|
-
function
|
|
3969
|
-
t.min =
|
|
3964
|
+
}, as = (t) => typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().includes(t), ls = as("applewebkit/") && !as("chrome/") ? Math.round : C;
|
|
3965
|
+
function us(t) {
|
|
3966
|
+
t.min = ls(t.min), t.max = ls(t.max);
|
|
3970
3967
|
}
|
|
3971
|
-
function
|
|
3972
|
-
|
|
3968
|
+
function Ul(t) {
|
|
3969
|
+
us(t.x), us(t.y);
|
|
3973
3970
|
}
|
|
3974
|
-
function
|
|
3975
|
-
return t === "position" || t === "preserve-aspect" && !
|
|
3971
|
+
function Ri(t, e, n) {
|
|
3972
|
+
return t === "position" || t === "preserve-aspect" && !Pe(ts(e), ts(n), 0.2);
|
|
3976
3973
|
}
|
|
3977
|
-
const
|
|
3974
|
+
const Kl = Mi({
|
|
3978
3975
|
attachResizeListener: (t, e) => K(t, "resize", e),
|
|
3979
3976
|
measureScroll: () => ({
|
|
3980
3977
|
x: document.documentElement.scrollLeft || document.body.scrollLeft,
|
|
3981
3978
|
y: document.documentElement.scrollTop || document.body.scrollTop
|
|
3982
3979
|
}),
|
|
3983
3980
|
checkIsScrollRoot: () => !0
|
|
3984
|
-
}),
|
|
3981
|
+
}), ce = {
|
|
3985
3982
|
current: void 0
|
|
3986
|
-
},
|
|
3983
|
+
}, Ei = Mi({
|
|
3987
3984
|
measureScroll: (t) => ({
|
|
3988
3985
|
x: t.scrollLeft,
|
|
3989
3986
|
y: t.scrollTop
|
|
3990
3987
|
}),
|
|
3991
3988
|
defaultParent: () => {
|
|
3992
|
-
if (!
|
|
3993
|
-
const t = new
|
|
3994
|
-
t.mount(window), t.setOptions({ layoutScroll: !0 }),
|
|
3989
|
+
if (!ce.current) {
|
|
3990
|
+
const t = new Kl({});
|
|
3991
|
+
t.mount(window), t.setOptions({ layoutScroll: !0 }), ce.current = t;
|
|
3995
3992
|
}
|
|
3996
|
-
return
|
|
3993
|
+
return ce.current;
|
|
3997
3994
|
},
|
|
3998
3995
|
resetTransform: (t, e) => {
|
|
3999
3996
|
t.style.transform = e !== void 0 ? e : "none";
|
|
4000
3997
|
},
|
|
4001
3998
|
checkIsScrollRoot: (t) => window.getComputedStyle(t).position === "fixed"
|
|
4002
|
-
}),
|
|
3999
|
+
}), $l = {
|
|
4003
4000
|
pan: {
|
|
4004
|
-
Feature:
|
|
4001
|
+
Feature: il
|
|
4005
4002
|
},
|
|
4006
4003
|
drag: {
|
|
4007
|
-
Feature:
|
|
4008
|
-
ProjectionNode:
|
|
4009
|
-
MeasureLayout:
|
|
4010
|
-
}
|
|
4011
|
-
}
|
|
4012
|
-
function
|
|
4013
|
-
if (en.current = !0, !!Me)
|
|
4014
|
-
if (window.matchMedia) {
|
|
4015
|
-
const t = window.matchMedia("(prefers-reduced-motion)"), e = () => _t.current = t.matches;
|
|
4016
|
-
t.addListener(e), e();
|
|
4017
|
-
} else
|
|
4018
|
-
_t.current = !1;
|
|
4019
|
-
}
|
|
4020
|
-
function Gl(t, e, n) {
|
|
4004
|
+
Feature: sl,
|
|
4005
|
+
ProjectionNode: Ei,
|
|
4006
|
+
MeasureLayout: Vi
|
|
4007
|
+
}
|
|
4008
|
+
};
|
|
4009
|
+
function Wl(t, e, n) {
|
|
4021
4010
|
const { willChange: s } = e;
|
|
4022
4011
|
for (const i in e) {
|
|
4023
|
-
const
|
|
4024
|
-
if (E(
|
|
4025
|
-
t.addValue(i,
|
|
4026
|
-
else if (E(
|
|
4027
|
-
t.addValue(i, Vt(
|
|
4028
|
-
else if (
|
|
4012
|
+
const o = e[i], r = n[i];
|
|
4013
|
+
if (E(o))
|
|
4014
|
+
t.addValue(i, o), Kt(s) && s.add(i), process.env.NODE_ENV === "development" && Ae(o.version === "11.0.28", `Attempting to mix Framer Motion versions ${o.version} with 11.0.28 may not work as expected.`);
|
|
4015
|
+
else if (E(r))
|
|
4016
|
+
t.addValue(i, Vt(o, { owner: t })), Kt(s) && s.remove(i);
|
|
4017
|
+
else if (r !== o)
|
|
4029
4018
|
if (t.hasValue(i)) {
|
|
4030
4019
|
const a = t.getValue(i);
|
|
4031
|
-
a.liveStyle === !0 ? a.jump(
|
|
4020
|
+
a.liveStyle === !0 ? a.jump(o) : a.hasAnimated || a.set(o);
|
|
4032
4021
|
} else {
|
|
4033
4022
|
const a = t.getStaticValue(i);
|
|
4034
|
-
t.addValue(i, Vt(a !== void 0 ? a :
|
|
4023
|
+
t.addValue(i, Vt(a !== void 0 ? a : o, { owner: t }));
|
|
4035
4024
|
}
|
|
4036
4025
|
}
|
|
4037
4026
|
for (const i in n)
|
|
4038
4027
|
e[i] === void 0 && t.removeValue(i);
|
|
4039
4028
|
return e;
|
|
4040
4029
|
}
|
|
4041
|
-
const
|
|
4030
|
+
const cs = /* @__PURE__ */ new WeakMap(), _l = [..._s, R, Q], Gl = (t) => _l.find(Ws(t)), Li = Object.keys(bt), Hl = Li.length, hs = [
|
|
4042
4031
|
"AnimationStart",
|
|
4043
4032
|
"AnimationComplete",
|
|
4044
4033
|
"Update",
|
|
@@ -4046,18 +4035,18 @@ const ms = /* @__PURE__ */ new WeakMap(), Hl = [...zs, R, J], zl = (t) => Hl.fin
|
|
|
4046
4035
|
"LayoutMeasure",
|
|
4047
4036
|
"LayoutAnimationStart",
|
|
4048
4037
|
"LayoutAnimationComplete"
|
|
4049
|
-
],
|
|
4050
|
-
function
|
|
4038
|
+
], zl = Ee.length;
|
|
4039
|
+
function Fi(t) {
|
|
4051
4040
|
if (t)
|
|
4052
|
-
return t.options.allowProjection !== !1 ? t.projection :
|
|
4041
|
+
return t.options.allowProjection !== !1 ? t.projection : Fi(t.parent);
|
|
4053
4042
|
}
|
|
4054
|
-
class
|
|
4055
|
-
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation:
|
|
4056
|
-
this.resolveKeyframes = (f, d, m, p) => new this.KeyframeResolver(f, d, m, p, this), this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver =
|
|
4043
|
+
class Yl {
|
|
4044
|
+
constructor({ parent: e, props: n, presenceContext: s, reducedMotionConfig: i, blockInitialAnimation: o, visualState: r }, a = {}) {
|
|
4045
|
+
this.resolveKeyframes = (f, d, m, p) => new this.KeyframeResolver(f, d, m, p, this), this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = $e, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
|
|
4057
4046
|
this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
|
|
4058
4047
|
}, this.scheduleRender = () => D.render(this.render, !1, !0);
|
|
4059
|
-
const { latestValues: l, renderState: u } =
|
|
4060
|
-
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!
|
|
4048
|
+
const { latestValues: l, renderState: u } = r;
|
|
4049
|
+
this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = u, this.parent = e, this.props = n, this.presenceContext = s, this.depth = e ? e.depth + 1 : 0, this.reducedMotionConfig = i, this.options = a, this.blockInitialAnimation = !!o, this.isControllingVariants = Ht(n), this.isVariantNode = xs(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(e && e.current);
|
|
4061
4050
|
const { willChange: c, ...h } = this.scrapeMotionValuesFromProps(n, {}, this);
|
|
4062
4051
|
for (const f in h) {
|
|
4063
4052
|
const d = h[f];
|
|
@@ -4075,10 +4064,10 @@ class ql {
|
|
|
4075
4064
|
return {};
|
|
4076
4065
|
}
|
|
4077
4066
|
mount(e) {
|
|
4078
|
-
this.current = e,
|
|
4067
|
+
this.current = e, cs.set(e, this), this.projection && !this.projection.instance && this.projection.mount(e), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), $i.current || Wi(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : _i.current, process.env.NODE_ENV !== "production" && Ae(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);
|
|
4079
4068
|
}
|
|
4080
4069
|
unmount() {
|
|
4081
|
-
|
|
4070
|
+
cs.delete(this.current), this.projection && this.projection.unmount(), J(this.notifyUpdate), J(this.render), this.valueSubscriptions.forEach((e) => e()), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
|
|
4082
4071
|
for (const e in this.events)
|
|
4083
4072
|
this.events[e].clear();
|
|
4084
4073
|
for (const e in this.features)
|
|
@@ -4086,28 +4075,28 @@ class ql {
|
|
|
4086
4075
|
this.current = null;
|
|
4087
4076
|
}
|
|
4088
4077
|
bindToMotionValue(e, n) {
|
|
4089
|
-
const s =
|
|
4090
|
-
this.latestValues[e] =
|
|
4091
|
-
}),
|
|
4078
|
+
const s = ot.has(e), i = n.on("change", (r) => {
|
|
4079
|
+
this.latestValues[e] = r, this.props.onUpdate && D.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
|
|
4080
|
+
}), o = n.on("renderRequest", this.scheduleRender);
|
|
4092
4081
|
this.valueSubscriptions.set(e, () => {
|
|
4093
|
-
i(),
|
|
4082
|
+
i(), o(), n.owner && n.stop();
|
|
4094
4083
|
});
|
|
4095
4084
|
}
|
|
4096
4085
|
sortNodePosition(e) {
|
|
4097
4086
|
return !this.current || !this.sortInstanceNodePosition || this.type !== e.type ? 0 : this.sortInstanceNodePosition(this.current, e.current);
|
|
4098
4087
|
}
|
|
4099
|
-
loadFeatures({ children: e, ...n }, s, i,
|
|
4100
|
-
let
|
|
4088
|
+
loadFeatures({ children: e, ...n }, s, i, o) {
|
|
4089
|
+
let r, a;
|
|
4101
4090
|
if (process.env.NODE_ENV !== "production" && i && s) {
|
|
4102
4091
|
const l = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
4103
4092
|
n.ignoreStrict ? Dt(!1, l) : H(!1, l);
|
|
4104
4093
|
}
|
|
4105
|
-
for (let l = 0; l <
|
|
4106
|
-
const u =
|
|
4107
|
-
f && (
|
|
4094
|
+
for (let l = 0; l < Hl; l++) {
|
|
4095
|
+
const u = Li[l], { isEnabled: c, Feature: h, ProjectionNode: f, MeasureLayout: d } = bt[u];
|
|
4096
|
+
f && (r = f), c(n) && (!this.features[u] && h && (this.features[u] = new h(this)), d && (a = d));
|
|
4108
4097
|
}
|
|
4109
|
-
if ((this.type === "html" || this.type === "svg") && !this.projection &&
|
|
4110
|
-
this.projection = new
|
|
4098
|
+
if ((this.type === "html" || this.type === "svg") && !this.projection && r) {
|
|
4099
|
+
this.projection = new r(this.latestValues, Fi(this.parent));
|
|
4111
4100
|
const { layoutId: l, layout: u, drag: c, dragConstraints: h, layoutScroll: f, layoutRoot: d } = n;
|
|
4112
4101
|
this.projection.setOptions({
|
|
4113
4102
|
layoutId: l,
|
|
@@ -4123,7 +4112,7 @@ class ql {
|
|
|
4123
4112
|
*
|
|
4124
4113
|
*/
|
|
4125
4114
|
animationType: typeof u == "string" ? u : "both",
|
|
4126
|
-
initialPromotionConfig:
|
|
4115
|
+
initialPromotionConfig: o,
|
|
4127
4116
|
layoutScroll: f,
|
|
4128
4117
|
layoutRoot: d
|
|
4129
4118
|
});
|
|
@@ -4159,13 +4148,13 @@ class ql {
|
|
|
4159
4148
|
*/
|
|
4160
4149
|
update(e, n) {
|
|
4161
4150
|
(e.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = e, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
|
|
4162
|
-
for (let s = 0; s <
|
|
4163
|
-
const i =
|
|
4151
|
+
for (let s = 0; s < hs.length; s++) {
|
|
4152
|
+
const i = hs[s];
|
|
4164
4153
|
this.propEventSubscriptions[i] && (this.propEventSubscriptions[i](), delete this.propEventSubscriptions[i]);
|
|
4165
|
-
const
|
|
4166
|
-
|
|
4154
|
+
const o = e["on" + i];
|
|
4155
|
+
o && (this.propEventSubscriptions[i] = this.on(i, o));
|
|
4167
4156
|
}
|
|
4168
|
-
this.prevMotionValues =
|
|
4157
|
+
this.prevMotionValues = Wl(this, this.scrapeMotionValuesFromProps(e, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
|
|
4169
4158
|
}
|
|
4170
4159
|
getProps() {
|
|
4171
4160
|
return this.props;
|
|
@@ -4196,9 +4185,9 @@ class ql {
|
|
|
4196
4185
|
return this.props.initial !== void 0 && (s.initial = this.props.initial), s;
|
|
4197
4186
|
}
|
|
4198
4187
|
const n = {};
|
|
4199
|
-
for (let s = 0; s <
|
|
4200
|
-
const i =
|
|
4201
|
-
(Pt(
|
|
4188
|
+
for (let s = 0; s < zl; s++) {
|
|
4189
|
+
const i = Ee[s], o = this.props[i];
|
|
4190
|
+
(Pt(o) || o === !1) && (n[i] = o);
|
|
4202
4191
|
}
|
|
4203
4192
|
return n;
|
|
4204
4193
|
}
|
|
@@ -4244,7 +4233,7 @@ class ql {
|
|
|
4244
4233
|
readValue(e, n) {
|
|
4245
4234
|
var s;
|
|
4246
4235
|
let i = this.latestValues[e] !== void 0 || !this.current ? this.latestValues[e] : (s = this.getBaseTargetFromProps(this.props, e)) !== null && s !== void 0 ? s : this.readValueFromInstance(this.current, e, this.options);
|
|
4247
|
-
return i != null && (typeof i == "string" && (
|
|
4236
|
+
return i != null && (typeof i == "string" && (Ks(i) || Us(i)) ? i = parseFloat(i) : !Gl(i) && Q.test(n) && (i = Js(e, n)), this.setBaseTarget(e, E(i) ? i.get() : i)), E(i) ? i.get() : i;
|
|
4248
4237
|
}
|
|
4249
4238
|
/**
|
|
4250
4239
|
* Set the base target to later animate back to. This is currently
|
|
@@ -4259,22 +4248,22 @@ class ql {
|
|
|
4259
4248
|
*/
|
|
4260
4249
|
getBaseTarget(e) {
|
|
4261
4250
|
var n, s;
|
|
4262
|
-
const { initial: i } = this.props,
|
|
4263
|
-
if (i &&
|
|
4264
|
-
return
|
|
4265
|
-
const
|
|
4266
|
-
return
|
|
4251
|
+
const { initial: i } = this.props, o = typeof i == "string" || typeof i == "object" ? (s = Ue(this.props, i, (n = this.presenceContext) === null || n === void 0 ? void 0 : n.custom)) === null || s === void 0 ? void 0 : s[e] : void 0;
|
|
4252
|
+
if (i && o !== void 0)
|
|
4253
|
+
return o;
|
|
4254
|
+
const r = this.getBaseTargetFromProps(this.props, e);
|
|
4255
|
+
return r !== void 0 && !E(r) ? r : this.initialValues[e] !== void 0 && o === void 0 ? void 0 : this.baseTarget[e];
|
|
4267
4256
|
}
|
|
4268
4257
|
on(e, n) {
|
|
4269
|
-
return this.events[e] || (this.events[e] = new
|
|
4258
|
+
return this.events[e] || (this.events[e] = new Je()), this.events[e].add(n);
|
|
4270
4259
|
}
|
|
4271
4260
|
notify(e, ...n) {
|
|
4272
4261
|
this.events[e] && this.events[e].notify(...n);
|
|
4273
4262
|
}
|
|
4274
4263
|
}
|
|
4275
|
-
class
|
|
4264
|
+
class Bi extends Yl {
|
|
4276
4265
|
constructor() {
|
|
4277
|
-
super(...arguments), this.KeyframeResolver =
|
|
4266
|
+
super(...arguments), this.KeyframeResolver = Qs;
|
|
4278
4267
|
}
|
|
4279
4268
|
sortInstanceNodePosition(e, n) {
|
|
4280
4269
|
return e.compareDocumentPosition(n) & 2 ? 1 : -1;
|
|
@@ -4286,30 +4275,30 @@ class Ii extends ql {
|
|
|
4286
4275
|
delete n[e], delete s[e];
|
|
4287
4276
|
}
|
|
4288
4277
|
}
|
|
4289
|
-
function
|
|
4278
|
+
function Xl(t) {
|
|
4290
4279
|
return window.getComputedStyle(t);
|
|
4291
4280
|
}
|
|
4292
|
-
class
|
|
4281
|
+
class ql extends Bi {
|
|
4293
4282
|
constructor() {
|
|
4294
4283
|
super(...arguments), this.type = "html";
|
|
4295
4284
|
}
|
|
4296
4285
|
readValueFromInstance(e, n) {
|
|
4297
|
-
if (
|
|
4298
|
-
const s =
|
|
4286
|
+
if (ot.has(n)) {
|
|
4287
|
+
const s = _e(n);
|
|
4299
4288
|
return s && s.default || 0;
|
|
4300
4289
|
} else {
|
|
4301
|
-
const s =
|
|
4290
|
+
const s = Xl(e), i = (Vs(n) ? s.getPropertyValue(n) : s[n]) || 0;
|
|
4302
4291
|
return typeof i == "string" ? i.trim() : i;
|
|
4303
4292
|
}
|
|
4304
4293
|
}
|
|
4305
4294
|
measureInstanceViewportBox(e, { transformPagePoint: n }) {
|
|
4306
|
-
return
|
|
4295
|
+
return bi(e, n);
|
|
4307
4296
|
}
|
|
4308
4297
|
build(e, n, s, i) {
|
|
4309
|
-
|
|
4298
|
+
ke(e, n, s, i.transformTemplate);
|
|
4310
4299
|
}
|
|
4311
4300
|
scrapeMotionValuesFromProps(e, n, s) {
|
|
4312
|
-
return
|
|
4301
|
+
return Ne(e, n, s);
|
|
4313
4302
|
}
|
|
4314
4303
|
handleChildMotionValue() {
|
|
4315
4304
|
this.childSubscription && (this.childSubscription(), delete this.childSubscription);
|
|
@@ -4319,10 +4308,10 @@ class Ql extends Ii {
|
|
|
4319
4308
|
}));
|
|
4320
4309
|
}
|
|
4321
4310
|
renderInstance(e, n, s, i) {
|
|
4322
|
-
|
|
4311
|
+
Ms(e, n, s, i);
|
|
4323
4312
|
}
|
|
4324
4313
|
}
|
|
4325
|
-
class
|
|
4314
|
+
class Zl extends Bi {
|
|
4326
4315
|
constructor() {
|
|
4327
4316
|
super(...arguments), this.type = "svg", this.isSVGTag = !1;
|
|
4328
4317
|
}
|
|
@@ -4330,56 +4319,50 @@ class Jl extends Ii {
|
|
|
4330
4319
|
return e[n];
|
|
4331
4320
|
}
|
|
4332
4321
|
readValueFromInstance(e, n) {
|
|
4333
|
-
if (
|
|
4334
|
-
const s =
|
|
4322
|
+
if (ot.has(n)) {
|
|
4323
|
+
const s = _e(n);
|
|
4335
4324
|
return s && s.default || 0;
|
|
4336
4325
|
}
|
|
4337
|
-
return n =
|
|
4326
|
+
return n = Rs.has(n) ? n : De(n), e.getAttribute(n);
|
|
4338
4327
|
}
|
|
4339
4328
|
measureInstanceViewportBox() {
|
|
4340
4329
|
return w();
|
|
4341
4330
|
}
|
|
4342
4331
|
scrapeMotionValuesFromProps(e, n, s) {
|
|
4343
|
-
return
|
|
4332
|
+
return Ls(e, n, s);
|
|
4344
4333
|
}
|
|
4345
4334
|
build(e, n, s, i) {
|
|
4346
|
-
|
|
4335
|
+
je(e, n, s, this.isSVGTag, i.transformTemplate);
|
|
4347
4336
|
}
|
|
4348
4337
|
renderInstance(e, n, s, i) {
|
|
4349
|
-
|
|
4338
|
+
Es(e, n, s, i);
|
|
4350
4339
|
}
|
|
4351
4340
|
mount(e) {
|
|
4352
|
-
this.isSVGTag =
|
|
4341
|
+
this.isSVGTag = Ie(e.tagName), super.mount(e);
|
|
4353
4342
|
}
|
|
4354
4343
|
}
|
|
4355
|
-
const
|
|
4356
|
-
allowProjection: t !==
|
|
4344
|
+
const Jl = (t, e) => Le(t) ? new Zl(e, { enableHardwareAcceleration: !1 }) : new ql(e, {
|
|
4345
|
+
allowProjection: t !== ds,
|
|
4357
4346
|
enableHardwareAcceleration: !0
|
|
4358
|
-
}),
|
|
4347
|
+
}), Ql = {
|
|
4359
4348
|
layout: {
|
|
4360
|
-
ProjectionNode:
|
|
4361
|
-
MeasureLayout:
|
|
4362
|
-
}
|
|
4363
|
-
},
|
|
4364
|
-
...
|
|
4365
|
-
...
|
|
4366
|
-
|
|
4367
|
-
...
|
|
4368
|
-
}, ru = /* @__PURE__ */
|
|
4369
|
-
function au() {
|
|
4370
|
-
!en.current && ki();
|
|
4371
|
-
const [t] = Hi(_t.current);
|
|
4372
|
-
return process.env.NODE_ENV !== "production" && Zt(t !== !0, "You have Reduced Motion enabled on your device. Animations may not appear as expected."), t;
|
|
4373
|
-
}
|
|
4349
|
+
ProjectionNode: Ei,
|
|
4350
|
+
MeasureLayout: Vi
|
|
4351
|
+
}
|
|
4352
|
+
}, tu = {
|
|
4353
|
+
...ja,
|
|
4354
|
+
...Xr,
|
|
4355
|
+
...$l,
|
|
4356
|
+
...Ql
|
|
4357
|
+
}, ru = /* @__PURE__ */ ir((t, e) => Or(t, e, tu, Jl));
|
|
4374
4358
|
export {
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
Lo as b,
|
|
4359
|
+
Ts as L,
|
|
4360
|
+
ps as M,
|
|
4361
|
+
Ce as P,
|
|
4362
|
+
Mr as a,
|
|
4380
4363
|
D as f,
|
|
4381
4364
|
H as i,
|
|
4382
4365
|
ru as m,
|
|
4383
|
-
|
|
4366
|
+
Gi as u
|
|
4384
4367
|
};
|
|
4385
|
-
//# sourceMappingURL=
|
|
4368
|
+
//# sourceMappingURL=motion-1dee7c9a.js.map
|