@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,2 +0,0 @@
|
|
|
1
|
-
"use strict";const P=require("react");function ki(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const en=ki(P),Ve=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),$t=P.createContext({}),_t=P.createContext(null),we=typeof document<"u",ds=we?P.useLayoutEffect:P.useEffect,ms=P.createContext({strict:!1}),Ae=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Oi="framerAppearId",ps="data-"+Ae(Oi),ji={skipAnimations:!1,useManualTiming:!1};class nn{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Ii(t){let e=new nn,n=new nn,s=0,i=!1,r=!1;const o=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const h=c&&i,f=h?e:n;return u&&o.add(l),f.add(l)&&h&&i&&(s=e.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(i){r=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let u=0;u<s;u++){const c=e.order[u];o.has(c)&&(a.schedule(c),t()),c(l)}i=!1,r&&(r=!1,a.process(l))}};return a}const Dt=["read","resolveKeyframes","update","preRender","render","postRender"],Ni=40;function gs(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=Dt.reduce((h,f)=>(h[f]=Ii(()=>n=!0),h),{}),o=h=>{r[h].process(i)},a=()=>{const h=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(h-i.timestamp,Ni),1),i.timestamp=h,i.isProcessing=!0,Dt.forEach(o),i.isProcessing=!1,n&&e&&(s=!1,t(a))},l=()=>{n=!0,s=!0,i.isProcessing||t(a)};return{schedule:Dt.reduce((h,f)=>{const d=r[f];return h[f]=(m,p=!1,y=!1)=>(n||l(),d.schedule(m,p,y)),h},{}),cancel:h=>Dt.forEach(f=>r[f].cancel(h)),state:i,steps:r}}const{schedule:Ce,cancel:Hl}=gs(queueMicrotask,!1);function Ui(t,e,n,s){const{visualElement:i}=P.useContext($t),r=P.useContext(ms),o=P.useContext(_t),a=P.useContext(Ve).reducedMotion,l=P.useRef();s=s||r.renderer,!l.current&&s&&(l.current=s(t,{visualState:e,parent:i,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;P.useInsertionEffect(()=>{u&&u.update(n,o)});const c=P.useRef(!!(n[ps]&&!window.HandoffComplete));return ds(()=>{u&&(Ce.postRender(u.render),c.current&&u.animationState&&u.animationState.animateChanges())}),P.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),c.current&&(c.current=!1,window.HandoffComplete=!0))}),u}function at(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Ki(t,e,n){return P.useCallback(s=>{s&&t.mount&&t.mount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):at(n)&&(n.current=s))},[e])}function xt(t){return typeof t=="string"||Array.isArray(t)}function Wt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const De=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Me=["initial",...De];function Gt(t){return Wt(t.animate)||Me.some(e=>xt(t[e]))}function ys(t){return!!(Gt(t)||t.variants)}function $i(t,e){if(Gt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||xt(n)?n:void 0,animate:xt(s)?s:void 0}}return t.inherit!==!1?e:{}}function _i(t){const{initial:e,animate:n}=$i(t,P.useContext($t));return P.useMemo(()=>({initial:e,animate:n}),[sn(e),sn(n)])}function sn(t){return Array.isArray(t)?t.join(" "):t}const on={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Tt={};for(const t in on)Tt[t]={isEnabled:e=>on[t].some(n=>!!e[n])};function Wi(t){for(const e in t)Tt[e]={...Tt[e],...t[e]}}const Re=P.createContext({}),vs=P.createContext({}),Gi=Symbol.for("motionComponentSymbol");function Hi({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&Wi(t);function r(a,l){let u;const c={...P.useContext(Ve),...a,layoutId:zi(a)},{isStatic:h}=c,f=_i(a),d=s(a,h);if(!h&&we){f.visualElement=Ui(i,d,c,e);const m=P.useContext(vs),p=P.useContext(ms).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,p,t,m))}return en.createElement($t.Provider,{value:f},u&&f.visualElement?en.createElement(u,{visualElement:f.visualElement,...c}):null,n(i,a,Ki(d,f.visualElement,l),d,h,f.visualElement))}const o=P.forwardRef(r);return o[Gi]=i,o}function zi({layoutId:t}){const e=P.useContext(Re).id;return e&&t!==void 0?e+"-"+t:t}function Yi(t){function e(s,i={}){return Hi(t(s,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(s,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const Xi=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ee(t){return typeof t!="string"||t.includes("-")?!1:!!(Xi.indexOf(t)>-1||/[A-Z]/u.test(t))}const Bt={};function qi(t){Object.assign(Bt,t)}const St=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ot=new Set(St);function xs(t,{layout:e,layoutId:n}){return ot.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Bt[t]||t==="opacity")}const L=t=>!!(t&&t.getVelocity),Zi={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Qi=St.length;function Ji(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let r="";for(let o=0;o<Qi;o++){const a=St[o];if(t[a]!==void 0){const l=Zi[a]||a;r+=`${l}(${t[a]}) `}}return e&&!t.z&&(r+="translateZ(0)"),r=r.trim(),i?r=i(t,s?"":r):n&&s&&(r="none"),r}const Ts=t=>e=>typeof e=="string"&&e.startsWith(t),Ps=Ts("--"),to=Ts("var(--"),Le=t=>to(t)?eo.test(t.split("/*")[0].trim()):!1,eo=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,no=(t,e)=>e&&typeof t=="number"?e.transform(t):t,q=(t,e,n)=>n>e?e:n<t?t:n,ft={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},pt={...ft,transform:t=>q(0,1,t)},Mt={...ft,default:1},gt=t=>Math.round(t*1e5)/1e5,Fe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,so=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,io=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function Vt(t){return typeof t=="string"}const wt=t=>({test:e=>Vt(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),z=wt("deg"),N=wt("%"),x=wt("px"),oo=wt("vh"),ro=wt("vw"),rn={...N,parse:t=>N.parse(t)/100,transform:t=>N.transform(t*100)},an={...ft,transform:Math.round},bs={borderWidth:x,borderTopWidth:x,borderRightWidth:x,borderBottomWidth:x,borderLeftWidth:x,borderRadius:x,radius:x,borderTopLeftRadius:x,borderTopRightRadius:x,borderBottomRightRadius:x,borderBottomLeftRadius:x,width:x,maxWidth:x,height:x,maxHeight:x,size:x,top:x,right:x,bottom:x,left:x,padding:x,paddingTop:x,paddingRight:x,paddingBottom:x,paddingLeft:x,margin:x,marginTop:x,marginRight:x,marginBottom:x,marginLeft:x,rotate:z,rotateX:z,rotateY:z,rotateZ:z,scale:Mt,scaleX:Mt,scaleY:Mt,scaleZ:Mt,skew:z,skewX:z,skewY:z,distance:x,translateX:x,translateY:x,translateZ:x,x,y:x,z:x,perspective:x,transformPerspective:x,opacity:pt,originX:rn,originY:rn,originZ:x,zIndex:an,backgroundPositionX:x,backgroundPositionY:x,fillOpacity:pt,strokeOpacity:pt,numOctaves:an};function Be(t,e,n,s){const{style:i,vars:r,transform:o,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const h in e){const f=e[h];if(Ps(h)){r[h]=f;continue}const d=bs[h],m=no(f,d);if(ot.has(h)){if(l=!0,o[h]=m,!c)continue;f!==(d.default||0)&&(c=!1)}else h.startsWith("origin")?(u=!0,a[h]=m):i[h]=m}if(e.transform||(l||s?i.transform=Ji(t.transform,n,c,s):i.transform&&(i.transform="none")),u){const{originX:h="50%",originY:f="50%",originZ:d=0}=a;i.transformOrigin=`${h} ${f} ${d}`}}const ke=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ss(t,e,n){for(const s in e)!L(e[s])&&!xs(s,n)&&(t[s]=e[s])}function ao({transformTemplate:t},e,n){return P.useMemo(()=>{const s=ke();return Be(s,e,{enableHardwareAcceleration:!n},t),Object.assign({},s.vars,s.style)},[e])}function lo(t,e,n){const s=t.style||{},i={};return Ss(i,s,t),Object.assign(i,ao(t,e,n)),i}function uo(t,e,n){const s={},i=lo(t,e,n);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}const co=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function kt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||co.has(t)}let Vs=t=>!kt(t);function ho(t){t&&(Vs=e=>e.startsWith("on")?!kt(e):t(e))}try{ho(require("@emotion/is-prop-valid").default)}catch{}function fo(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Vs(i)||n===!0&&kt(i)||!e&&!kt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}function ln(t,e,n){return typeof t=="string"?t:x.transform(e+n*t)}function mo(t,e,n){const s=ln(e,t.x,t.width),i=ln(n,t.y,t.height);return`${s} ${i}`}const po={offset:"stroke-dashoffset",array:"stroke-dasharray"},go={offset:"strokeDashoffset",array:"strokeDasharray"};function yo(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?po:go;t[r.offset]=x.transform(-s);const o=x.transform(e),a=x.transform(n);t[r.array]=`${o} ${a}`}function Oe(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:r,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},c,h,f){if(Be(t,u,c,f),h){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:m,dimensions:p}=t;d.transform&&(p&&(m.transform=d.transform),delete d.transform),p&&(i!==void 0||r!==void 0||m.transform)&&(m.transformOrigin=mo(p,i!==void 0?i:.5,r!==void 0?r:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),s!==void 0&&(d.scale=s),o!==void 0&&yo(d,o,a,l,!1)}const ws=()=>({...ke(),attrs:{}}),je=t=>typeof t=="string"&&t.toLowerCase()==="svg";function vo(t,e,n,s){const i=P.useMemo(()=>{const r=ws();return Oe(r,e,{enableHardwareAcceleration:!1},je(s),t.transformTemplate),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};Ss(r,t.style,t),i.style={...r,...i.style}}return i}function xo(t=!1){return(n,s,i,{latestValues:r},o)=>{const l=(Ee(n)?vo:uo)(s,r,o,n),u=fo(s,typeof n=="string",t),c=n!==P.Fragment?{...u,...l,ref:i}:{},{children:h}=s,f=P.useMemo(()=>L(h)?h.get():h,[h]);return P.createElement(n,{...c,children:f})}}function As(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const r in n)t.style.setProperty(r,n[r])}const Cs=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ds(t,e,n,s){As(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Cs.has(i)?i:Ae(i),e.attrs[i])}function Ie(t,e,n){var s;const{style:i}=t,r={};for(const o in i)(L(i[o])||e.style&&L(e.style[o])||xs(o,t)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(r[o]=i[o]);return r}function Ms(t,e,n){const s=Ie(t,e,n);for(const i in t)if(L(t[i])||L(e[i])){const r=St.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}function Ne(t,e,n,s={},i={}){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}function Rs(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const he=t=>Array.isArray(t),To=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),Po=t=>he(t)?t[t.length-1]||0:t;function Et(t){const e=L(t)?t.get():t;return To(e)?e.toValue():e}function bo({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,r){const o={latestValues:So(s,i,r,t),renderState:e()};return n&&(o.mount=a=>n(s,a,o)),o}const Es=t=>(e,n)=>{const s=P.useContext($t),i=P.useContext(_t),r=()=>bo(t,e,s,i);return n?r():Rs(r)};function So(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Et(r[f]);let{initial:o,animate:a}=t;const l=Gt(t),u=ys(t);e&&u&&!l&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;return h&&typeof h!="boolean"&&!Wt(h)&&(Array.isArray(h)?h:[h]).forEach(d=>{const m=Ne(t,d);if(!m)return;const{transitionEnd:p,transition:y,...v}=m;for(const T in v){let g=v[T];if(Array.isArray(g)){const b=c?g.length-1:0;g=g[b]}g!==null&&(i[T]=g)}for(const T in p)i[T]=p[T]}),i}const M=t=>t,{schedule:C,cancel:Z,state:D,steps:Qt}=gs(typeof requestAnimationFrame<"u"?requestAnimationFrame:M,!0),Vo={useVisualState:Es({scrapeMotionValuesFromProps:Ms,createRenderState:ws,onMount:(t,e,{renderState:n,latestValues:s})=>{C.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),C.render(()=>{Oe(n,s,{enableHardwareAcceleration:!1},je(e.tagName),t.transformTemplate),Ds(e,n)})}})},wo={useVisualState:Es({scrapeMotionValuesFromProps:Ie,createRenderState:ke})};function Ao(t,{forwardMotionProps:e=!1},n,s){return{...Ee(t)?Vo:wo,preloadedFeatures:n,useRender:xo(e),createVisualElement:s,Component:t}}function K(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Ls=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Ht(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const Co=t=>e=>Ls(e)&&t(e,Ht(e));function $(t,e,n,s){return K(t,e,Co(n),s)}const Do=(t,e)=>n=>e(t(n)),_=(...t)=>t.reduce(Do);function Fs(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const un=Fs("dragHorizontal"),cn=Fs("dragVertical");function Bs(t){let e=!1;if(t==="y")e=cn();else if(t==="x")e=un();else{const n=un(),s=cn();n&&s?e=()=>{n(),s()}:(n&&n(),s&&s())}return e}function ks(){const t=Bs(!0);return t?(t(),!1):!0}class J{constructor(e){this.isMounted=!1,this.node=e}update(){}}function hn(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End"),i=(r,o)=>{if(r.pointerType==="touch"||ks())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[s]&&a[s](r,o)};return $(t.current,n,i,{passive:!t.getProps()[s]})}class Mo extends J{mount(){this.unmount=_(hn(this.node,!0),hn(this.node,!1))}unmount(){}}class Ro extends J{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_(K(this.node.current,"focus",()=>this.onFocus()),K(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Os=(t,e)=>e?t===e?!0:Os(t,e.parentElement):!1;function Jt(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Ht(n))}class Eo extends J{constructor(){super(...arguments),this.removeStartListeners=M,this.removeEndListeners=M,this.removeAccessibleListeners=M,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const s=this.node.getProps(),r=$(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:h}=this.node.getProps();!h&&!Os(this.node.current,a.target)?c&&c(a,l):u&&u(a,l)},{passive:!(s.onTap||s.onPointerUp)}),o=$(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(s.onTapCancel||s.onPointerCancel)});this.removeEndListeners=_(r,o),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=r=>{if(r.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Jt("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&c(l,u)})};this.removeEndListeners(),this.removeEndListeners=K(this.node.current,"keyup",o),Jt("down",(a,l)=>{this.startPress(a,l)})},n=K(this.node.current,"keydown",e),s=()=>{this.isPressing&&Jt("cancel",(r,o)=>this.cancelPress(r,o))},i=K(this.node.current,"blur",s);this.removeAccessibleListeners=_(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:s,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),s&&s(e,n)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ks()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:s}=this.node.getProps();s&&s(e,n)}mount(){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);this.removeStartListeners=_(n,s)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const fe=new WeakMap,te=new WeakMap,Lo=t=>{const e=fe.get(t.target);e&&e(t)},Fo=t=>{t.forEach(Lo)};function Bo({root:t,...e}){const n=t||document;te.has(n)||te.set(n,{});const s=te.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(Fo,{root:t,...e})),s[i]}function ko(t,e,n){const s=Bo(e);return fe.set(t,n),s.observe(t),()=>{fe.delete(t),s.unobserve(t)}}const Oo={some:0,all:1};class jo extends J{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:Oo[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,r&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=u?c:h;f&&f(l)};return ko(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Io(e,n))&&this.startObserver()}unmount(){}}function Io({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const No={inView:{Feature:jo},tap:{Feature:Eo},focus:{Feature:Ro},hover:{Feature:Mo}};function js(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function Uo(t){const e={};return t.values.forEach((n,s)=>e[s]=n.get()),e}function Ko(t){const e={};return t.values.forEach((n,s)=>e[s]=n.getVelocity()),e}function zt(t,e,n){const s=t.getProps();return Ne(s,e,n!==void 0?n:s.custom,Uo(t),Ko(t))}const W=t=>t*1e3,G=t=>t/1e3,$o={type:"spring",stiffness:500,damping:25,restSpeed:10},_o=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Wo={type:"keyframes",duration:.8},Go={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Ho=(t,{keyframes:e})=>e.length>2?Wo:ot.has(t)?t.startsWith("scale")?_o(e[1]):$o:Go;function zo({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:r,repeatType:o,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function Ue(t,e){return t[e]||t.default||t}const Yo=t=>t!==null;function Yt(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(Yo),r=e&&n!=="loop"&&e%2===1?0:i.length-1;return!r||s===void 0?i[r]:s}let Lt;function Xo(){Lt=void 0}const X={now:()=>(Lt===void 0&&X.set(D.isProcessing||ji.useManualTiming?D.timestamp:performance.now()),Lt),set:t=>{Lt=t,queueMicrotask(Xo)}},Is=t=>/^0[^.\s]+$/u.test(t);function qo(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Is(t):!0}let At=M;exports.invariant=M;process.env.NODE_ENV!=="production"&&(At=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},exports.invariant=(t,e)=>{if(!t)throw new Error(e)});const Ns=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Zo=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Qo(t){const e=Zo.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const Jo=4;function Us(t,e,n=1){exports.invariant(n<=Jo,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[s,i]=Qo(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Ns(o)?parseFloat(o):o}return Le(i)?Us(i,e,n+1):i}const tr=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),fn=t=>t===ft||t===x,dn=(t,e)=>parseFloat(t.split(", ")[e]),mn=(t,e)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/u);if(i)return dn(i[1],e);{const r=s.match(/^matrix\((.+)\)$/u);return r?dn(r[1],t):0}},er=new Set(["x","y","z"]),nr=St.filter(t=>!er.has(t));function pn(t){const e=[];return nr.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const ht={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:mn(4,13),y:mn(5,14)};ht.translateX=ht.x;ht.translateY=ht.y;const Ks=t=>e=>e.test(t),sr={test:t=>t==="auto",parse:t=>t},$s=[ft,x,N,z,ro,oo,sr],gn=t=>$s.find(Ks(t)),it=new Set;let de=!1,me=!1;function _s(){if(me){const t=Array.from(it).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{pn(s).length&&(n.set(s,pn(s)),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render()}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}me=!1,de=!1,it.forEach(t=>t.complete()),it.clear()}function Ws(){it.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(me=!0)})}function ir(){Ws(),_s()}class Ke{constructor(e,n,s,i,r,o=!1){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=r,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(it.add(this),de||(de=!0,C.read(Ws),C.resolveKeyframes(_s))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;for(let r=0;r<e.length;r++)if(e[r]===null)if(r===0){const o=i==null?void 0:i.get(),a=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const l=s.readValue(n,a);l!=null&&(e[0]=l)}e[0]===void 0&&(e[0]=a),i&&o===void 0&&i.set(e[0])}else e[r]=e[r-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),it.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,it.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const $e=(t,e)=>n=>!!(Vt(n)&&io.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Gs=(t,e,n)=>s=>{if(!Vt(s))return s;const[i,r,o,a]=s.match(Fe);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},or=t=>q(0,255,t),ee={...ft,transform:t=>Math.round(or(t))},st={test:$e("rgb","red"),parse:Gs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ee.transform(t)+", "+ee.transform(e)+", "+ee.transform(n)+", "+gt(pt.transform(s))+")"};function rr(t){let e="",n="",s="",i="";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),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const pe={test:$e("#"),parse:rr,transform:st.transform},lt={test:$e("hsl","hue"),parse:Gs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+N.transform(gt(e))+", "+N.transform(gt(n))+", "+gt(pt.transform(s))+")"},E={test:t=>st.test(t)||pe.test(t)||lt.test(t),parse:t=>st.test(t)?st.parse(t):lt.test(t)?lt.parse(t):pe.parse(t),transform:t=>Vt(t)?t:t.hasOwnProperty("red")?st.transform(t):lt.transform(t)};function ar(t){var e,n;return isNaN(t)&&Vt(t)&&(((e=t.match(Fe))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(so))===null||n===void 0?void 0:n.length)||0)>0}const Hs="number",zs="color",lr="var",ur="var(",yn="${}",cr=/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;function Ot(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(cr,l=>(E.test(l)?(s.color.push(r),i.push(zs),n.push(E.parse(l))):l.startsWith(ur)?(s.var.push(r),i.push(lr),n.push(l)):(s.number.push(r),i.push(Hs),n.push(parseFloat(l))),++r,yn)).split(yn);return{values:n,split:a,indexes:s,types:i}}function Ys(t){return Ot(t).values}function Xs(t){const{split:e,types:n}=Ot(t),s=e.length;return i=>{let r="";for(let o=0;o<s;o++)if(r+=e[o],i[o]!==void 0){const a=n[o];a===Hs?r+=gt(i[o]):a===zs?r+=E.transform(i[o]):r+=i[o]}return r}}const hr=t=>typeof t=="number"?0:t;function fr(t){const e=Ys(t);return Xs(t)(e.map(hr))}const Q={test:ar,parse:Ys,createTransformer:Xs,getAnimatableNone:fr},dr=new Set(["brightness","contrast","saturate","opacity"]);function mr(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(Fe)||[];if(!s)return t;const i=n.replace(s,"");let r=dr.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const pr=/\b([a-z-]*)\(.*?\)/gu,ge={...Q,getAnimatableNone:t=>{const e=t.match(pr);return e?e.map(mr).join(" "):t}},gr={...bs,color:E,backgroundColor:E,outlineColor:E,fill:E,stroke:E,borderColor:E,borderTopColor:E,borderRightColor:E,borderBottomColor:E,borderLeftColor:E,filter:ge,WebkitFilter:ge},_e=t=>gr[t];function qs(t,e){let n=_e(t);return n!==ge&&(n=Q),n.getAnimatableNone?n.getAnimatableNone(e):void 0}function yr(t,e,n){let s=0,i;for(;s<t.length&&!i;)typeof t[s]=="string"&&t[s]!=="none"&&t[s]!=="0"&&(i=t[s]),s++;if(i&&n)for(const r of e)t[r]=qs(n,i)}class Zs extends Ke{constructor(e,n,s,i){super(e,n,s,i,i==null?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){const u=e[l];if(typeof u=="string"&&Le(u)){const c=Us(u,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=u)}}if(!tr.has(s)||e.length!==2)return this.resolveNoneKeyframes();const[i,r]=e,o=gn(i),a=gn(r);if(o!==a)if(fn(o)&&fn(a))for(let l=0;l<e.length;l++){const u=e[l];typeof u=="string"&&(e[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)qo(e[i])&&s.push(i);s.length&&yr(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ht[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){var e;const{element:n,name:s,unresolvedKeyframes:i}=this;if(!n.current)return;const r=n.getValue(s);r&&r.jump(this.measuredOrigin,!1);const o=i.length-1,a=i[o];i[o]=ht[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])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function vr(t){let e;return()=>(e===void 0&&(e=t()),e)}const vn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Q.test(t)||t==="0")&&!t.startsWith("url("));function xr(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Tr(t,e,n,s){const i=t[0];if(i===null)return!1;const r=t[t.length-1],o=vn(i,e),a=vn(r,e);return At(o===a,`You are trying to animate ${e} from "${i}" to "${r}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${r} via the \`style\` property.`),!o||!a?!1:xr(t)||n==="spring"&&s}class Qs{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ir(),this._resolved}onKeyframesResolved(e,n){this.hasAttemptedResolve=!0;const{name:s,type:i,velocity:r,delay:o,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!Tr(e,s,i,r))if(o)this.options.duration=0;else{l==null||l(Yt(e,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(e,n);c!==!1&&(this._resolved={keyframes:e,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(e,n){return this.currentFinishedPromise.then(e,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}function Js(t,e){return e?t*(1e3/e):0}const Pr=5;function ti(t,e,n){const s=Math.max(e-Pr,0);return Js(n-t(s),e-s)}const ne=.001,br=.01,xn=10,Sr=.05,Vr=1;function wr({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,r;At(t<=W(xn),"Spring duration must be 10 seconds or less");let o=1-e;o=q(Sr,Vr,o),t=q(br,xn,G(t)),o<1?(i=u=>{const c=u*o,h=c*t,f=c-n,d=ye(u,o),m=Math.exp(-h);return ne-f/d*m},r=u=>{const h=u*o*t,f=h*n+n,d=Math.pow(o,2)*Math.pow(u,2)*t,m=Math.exp(-h),p=ye(Math.pow(u,2),o);return(-i(u)+ne>0?-1:1)*((f-d)*m)/p}):(i=u=>{const c=Math.exp(-u*t),h=(u-n)*t+1;return-ne+c*h},r=u=>{const c=Math.exp(-u*t),h=(n-u)*(t*t);return c*h});const a=5/t,l=Cr(i,r,a);if(t=W(t),isNaN(l))return{stiffness:100,damping:10,duration:t};{const u=Math.pow(l,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:t}}}const Ar=12;function Cr(t,e,n){let s=n;for(let i=1;i<Ar;i++)s=s-t(s)/e(s);return s}function ye(t,e){return t*Math.sqrt(1-e*e)}const Dr=["duration","bounce"],Mr=["stiffness","damping","mass"];function Tn(t,e){return e.some(n=>t[n]!==void 0)}function Rr(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Tn(t,Mr)&&Tn(t,Dr)){const n=wr(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function ei({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],r=t[t.length-1],o={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:f}=Rr({...s,velocity:-G(s.velocity||0)}),d=h||0,m=l/(2*Math.sqrt(a*u)),p=r-i,y=G(Math.sqrt(a/u)),v=Math.abs(p)<5;n||(n=v?.01:2),e||(e=v?.005:.5);let T;if(m<1){const g=ye(y,m);T=b=>{const V=Math.exp(-m*y*b);return r-V*((d+m*y*p)/g*Math.sin(g*b)+p*Math.cos(g*b))}}else if(m===1)T=g=>r-Math.exp(-y*g)*(p+(d+y*p)*g);else{const g=y*Math.sqrt(m*m-1);T=b=>{const V=Math.exp(-m*y*b),R=Math.min(g*b,300);return r-V*((d+m*y*p)*Math.sinh(R)+g*p*Math.cosh(R))/g}}return{calculatedDuration:f&&c||null,next:g=>{const b=T(g);if(f)o.done=g>=c;else{let V=d;g!==0&&(m<1?V=ti(T,g,b):V=0);const R=Math.abs(V)<=n,H=Math.abs(r-b)<=e;o.done=R&&H}return o.value=o.done?r:b,o}}}function Pn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},d=S=>a!==void 0&&S<a||l!==void 0&&S>l,m=S=>a===void 0?l:l===void 0||Math.abs(a-S)<Math.abs(l-S)?a:l;let p=n*e;const y=h+p,v=o===void 0?y:o(y);v!==y&&(p=v-h);const T=S=>-p*Math.exp(-S/s),g=S=>v+T(S),b=S=>{const k=T(S),O=g(S);f.done=Math.abs(k)<=u,f.value=f.done?v:O};let V,R;const H=S=>{d(f.value)&&(V=S,R=ei({keyframes:[f.value,m(f.value)],velocity:ti(g,S,f.value),damping:i,stiffness:r,restDelta:u,restSpeed:c}))};return H(0),{calculatedDuration:null,next:S=>{let k=!1;return!R&&V===void 0&&(k=!0,b(S),H(S)),V!==void 0&&S>=V?R.next(S-V):(!k&&b(S),f)}}}const ni=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Er=1e-7,Lr=12;function Fr(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=ni(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Er&&++a<Lr);return o}function Ct(t,e,n,s){if(t===e&&n===s)return M;const i=r=>Fr(r,0,1,t,n);return r=>r===0||r===1?r:ni(i(r),e,s)}const Br=Ct(.42,0,1,1),kr=Ct(0,0,.58,1),si=Ct(.42,0,.58,1),Or=t=>Array.isArray(t)&&typeof t[0]!="number",ii=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,oi=t=>e=>1-t(1-e),We=t=>1-Math.sin(Math.acos(t)),ri=oi(We),jr=ii(We),ai=Ct(.33,1.53,.69,.99),Ge=oi(ai),Ir=ii(Ge),Nr=t=>(t*=2)<1?.5*Ge(t):.5*(2-Math.pow(2,-10*(t-1))),bn={linear:M,easeIn:Br,easeInOut:si,easeOut:kr,circIn:We,circInOut:jr,circOut:ri,backIn:Ge,backInOut:Ir,backOut:ai,anticipate:Nr},Sn=t=>{if(Array.isArray(t)){exports.invariant(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,s,i]=t;return Ct(e,n,s,i)}else if(typeof t=="string")return exports.invariant(bn[t]!==void 0,`Invalid easing type '${t}'`),bn[t];return t},Pt=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s},w=(t,e,n)=>t+(e-t)*n;function se(t,e,n){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}function Ur({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=se(l,a,t+1/3),r=se(l,a,t),o=se(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}const ie=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Kr=[pe,st,lt],$r=t=>Kr.find(e=>e.test(t));function Vn(t){const e=$r(t);exports.invariant(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`);let n=e.parse(t);return e===lt&&(n=Ur(n)),n}const wn=(t,e)=>{const n=Vn(t),s=Vn(e),i={...n};return r=>(i.red=ie(n.red,s.red,r),i.green=ie(n.green,s.green,r),i.blue=ie(n.blue,s.blue,r),i.alpha=w(n.alpha,s.alpha,r),st.transform(i))};function ve(t,e){return n=>n>0?e:t}function _r(t,e){return n=>w(t,e,n)}function He(t){return typeof t=="number"?_r:typeof t=="string"?Le(t)?ve:E.test(t)?wn:Hr:Array.isArray(t)?li:typeof t=="object"?E.test(t)?wn:Wr:ve}function li(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>He(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function Wr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=He(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function Gr(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const o=e.types[r],a=t.indexes[o][i[o]],l=(n=t.values[a])!==null&&n!==void 0?n:0;s[r]=l,i[o]++}return s}const Hr=(t,e)=>{const n=Q.createTransformer(e),s=Ot(t),i=Ot(e);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?_(li(Gr(s,i),i.values),n):(At(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ve(t,e))};function ui(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?w(t,e,n):He(t)(t,e)}function zr(t,e,n){const s=[],i=n||ui,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const l=Array.isArray(e)?e[o]||M:e;a=_(l,a)}s.push(a)}return s}function Yr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(exports.invariant(r===e.length,"Both input and output ranges must be the same length"),r===1)return()=>e[0];if(r===2&&t[0]===t[1])return()=>e[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const o=zr(e,s,i),a=o.length,l=u=>{let c=0;if(a>1)for(;c<t.length-2&&!(u<t[c+1]);c++);const h=Pt(t[c],t[c+1],u);return o[c](h)};return n?u=>l(q(t[0],t[r-1],u)):l}function Xr(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Pt(0,e,s);t.push(w(n,1,i))}}function qr(t){const e=[0];return Xr(e,t.length-1),e}function Zr(t,e){return t.map(n=>n*e)}function Qr(t,e){return t.map(()=>e||si).splice(0,t.length-1)}function jt({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Or(s)?s.map(Sn):Sn(s),r={done:!1,value:e[0]},o=Zr(n&&n.length===e.length?n:qr(e),t),a=Yr(o,e,{ease:Array.isArray(i)?i:Qr(e,i)});return{calculatedDuration:t,next:l=>(r.value=a(l),r.done=l>=t,r)}}const An=2e4;function Jr(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<An;)e+=n,s=t.next(e);return e>=An?1/0:e}const ta=t=>{const e=({timestamp:n})=>t(n);return{start:()=>C.update(e,!0),stop:()=>Z(e),now:()=>D.isProcessing?D.timestamp:X.now()}},ea={decay:Pn,inertia:Pn,tween:jt,keyframes:jt,spring:ei},na=t=>t/100;class ze extends Qs{constructor({KeyframeResolver:e=Ke,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle";const{name:s,motionValue:i,keyframes:r}=this.options,o=(a,l)=>this.onKeyframesResolved(a,l);s&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(r,o,s,i):this.resolver=new e(r,o,s,i),this.resolver.scheduleResolve()}initPlayback(e){const{type:n="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=this.options,a=ea[n]||jt;let l,u;a!==jt&&typeof e[0]!="number"&&(process.env.NODE_ENV!=="production"&&exports.invariant(e.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${e}`),l=_(na,ui(e[0],e[1])),e=[0,100]);const c=a({...this.options,keyframes:e});r==="mirror"&&(u=a({...this.options,keyframes:[...e].reverse(),velocity:-o})),c.calculatedDuration===null&&(c.calculatedDuration=Jr(c));const{calculatedDuration:h}=c,f=h+i,d=f*(s+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:h,resolvedDuration:f,totalDuration:d}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!e?this.pause():this.state=this.pendingPlayState}tick(e,n=!1){const{resolved:s}=this;if(!s){const{keyframes:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:i,generator:r,mirroredGenerator:o,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:h}=s;if(this.startTime===null)return r.next(0);const{delay:f,repeat:d,repeatType:m,repeatDelay:p,onUpdate:y}=this.options;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;const v=this.currentTime-f*(this.speed>=0?1:-1),T=this.speed>=0?v<0:v>c;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let g=this.currentTime,b=r;if(d){const S=Math.min(this.currentTime,c)/h;let k=Math.floor(S),O=S%1;!O&&S>=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"&&(b=o)),g=q(0,1,O)*h}const V=T?{done:!1,value:l[0]}:b.next(g);a&&(V.value=a(V.value));let{done:R}=V;!T&&u!==null&&(R=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const H=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return H&&i!==void 0&&(V.value=Yt(l,this.options,i)),y&&y(V.value),H&&this.finish(),V}get duration(){const{resolved:e}=this;return e?G(e.calculatedDuration):0}get time(){return G(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=G(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:e=ta,onPlay:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),n&&n();const s=this.driver.now();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()}pause(){var e;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(e=this.currentTime)!==null&&e!==void 0?e:0}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:e}=this.options;e&&e()}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const ci=t=>Array.isArray(t)&&typeof t[0]=="number";function hi(t){return!!(!t||typeof t=="string"&&fi[t]||ci(t)||Array.isArray(t)&&t.every(hi))}const mt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,fi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mt([0,.65,.55,1]),circOut:mt([.55,0,1,.45]),backIn:mt([.31,.01,.66,-.59]),backOut:mt([.33,1.53,.69,.99])};function di(t){if(t)return ci(t)?mt(t):Array.isArray(t)?t.map(di):fi[t]}function sa(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=di(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"})}const ia=vr(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),oa=new Set(["opacity","clipPath","filter","transform"]),It=10,ra=2e4;function aa(t){return t.type==="spring"||t.name==="backgroundColor"||!hi(t.ease)}function la(t,e){const n=new ze({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:t[0]};const i=[];let r=0;for(;!s.done&&r<ra;)s=n.sample(r),i.push(s.value),r+=It;return{times:void 0,keyframes:i,duration:r-It,ease:"linear"}}class Cn extends Qs{constructor(e){super(e);const{name:n,motionValue:s,keyframes:i}=this.options;this.resolver=new Zs(i,(r,o)=>this.onKeyframesResolved(r,o),n,s),this.resolver.scheduleResolve()}initPlayback(e,n){var s;let{duration:i=300,times:r,ease:o,type:a,motionValue:l,name:u}=this.options;if(!(!((s=l.owner)===null||s===void 0)&&s.current))return!1;if(aa(this.options)){const{onComplete:h,onUpdate:f,motionValue:d,...m}=this.options,p=la(e,m);e=p.keyframes,e.length===1&&(e[1]=e[0]),i=p.duration,r=p.times,o=p.ease,a="keyframes"}const c=sa(l.owner.current,u,e,{...this.options,duration:i,times:r,ease:o});return c.startTime=X.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:h}=this.options;l.set(Yt(e,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:r,type:a,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:n}=e;return G(n)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:n}=e;return G(n.currentTime||0)}set time(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=W(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:n}=e;return n.playbackRate}set speed(e){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:n}=e;return n.playState}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{const{resolved:n}=this;if(!n)return M;const{animation:s}=n;s.timeline=e,s.onfinish=null}return M}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:e}=this;if(!e)return;const{animation:n,keyframes:s,duration:i,type:r,ease:o,times:a}=e;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:u,onComplete:c,...h}=this.options,f=new ze({...h,keyframes:s,duration:i,type:r,ease:o,times:a,isGenerator:!0}),d=W(this.time);l.setWithVelocity(f.sample(d-It).value,f.sample(d).value,It)}this.cancel()}}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:n,name:s,repeatDelay:i,repeatType:r,damping:o,type:a}=e;return ia()&&s&&oa.has(s)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&r!=="mirror"&&o!==0&&a!=="inertia"}}const Ye=(t,e,n,s={},i,r)=>o=>{const a=Ue(s,t)||{},l=a.delay||s.delay||0;let{elapsed:u=0}=s;u=u-W(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};zo(a)||(c={...c,...Ho(t,c)}),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(c.duration=0,c.delay===0&&(h=!0)),h&&!r&&e.get()!==void 0){const f=Yt(c.keyframes,a);if(f!==void 0){C.update(()=>{c.onUpdate(f),c.onComplete()});return}}return!r&&Cn.supports(c)?new Cn(c):new ze(c)};function Nt(t){return!!(L(t)&&t.add)}function Xe(t,e){t.indexOf(e)===-1&&t.push(e)}function qe(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Ze{constructor(){this.subscriptions=[]}add(e){return Xe(this.subscriptions,e),()=>qe(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Dn=new Set;function Xt(t,e,n){t||Dn.has(e)||(console.warn(e),n&&console.warn(n),Dn.add(e))}const Mn=30,ua=t=>!isNaN(parseFloat(t));class ca{constructor(e,n={}){this.version="11.0.28",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(s,i=!0)=>{const r=X.now();this.updatedAt!==r&&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)},this.hasAnimated=!1,this.setCurrent(e),this.canTrackVelocity=ua(this.current),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=X.now()}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Xt(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ze);const s=this.events[e].add(n);return e==="change"?()=>{s(),C.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=X.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Mn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Mn);return Js(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function bt(t,e){return new ca(t,e)}function ha(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,bt(n))}function fa(t,e){const n=zt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=Po(r[o]);ha(t,o,a)}}function da({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function mi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){var r;let{transition:o=t.getDefaultTransition(),transitionEnd:a,...l}=e;const u=t.getValue("willChange");s&&(o=s);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const f in l){const d=t.getValue(f,(r=t.latestValues[f])!==null&&r!==void 0?r:null),m=l[f];if(m===void 0||h&&da(h,f))continue;const p={delay:n,elapsed:0,...Ue(o||{},f)};let y=!1;if(window.HandoffAppearAnimations){const T=t.getProps()[ps];if(T){const g=window.HandoffAppearAnimations(T,f);g!==null&&(p.elapsed=g,y=!0)}}d.start(Ye(f,d,m,t.shouldReduceMotion&&ot.has(f)?{type:!1}:p,t,y));const v=d.animation;v&&(Nt(u)&&(u.add(f),v.then(()=>u.remove(f))),c.push(v))}return a&&Promise.all(c).then(()=>{C.update(()=>{a&&fa(t,a)})}),c}function xe(t,e,n={}){var s;const i=zt(t,e,n.type==="exit"?(s=t.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const o=i?()=>Promise.all(mi(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:f}=r;return ma(t,e,c+u,h,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,c]=l==="beforeChildren"?[o,a]:[a,o];return u().then(()=>c())}else return Promise.all([o(),a(n.delay)])}function ma(t,e,n=0,s=0,i=1,r){const o=[],a=(t.variantChildren.size-1)*s,l=i===1?(u=0)=>u*s:(u=0)=>a-u*s;return Array.from(t.variantChildren).sort(pa).forEach((u,c)=>{u.notify("AnimationStart",e),o.push(xe(u,e,{...r,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function pa(t,e){return t.sortNodePosition(e)}function ga(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>xe(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=xe(t,e,n);else{const i=typeof e=="function"?zt(t,e,n.custom):e;s=Promise.all(mi(t,i,n))}return s.then(()=>{C.postRender(()=>{t.notify("AnimationComplete",e)})})}const ya=[...De].reverse(),va=De.length;function xa(t){return e=>Promise.all(e.map(({animation:n,options:s})=>ga(t,n,s)))}function Ta(t){let e=xa(t);const n=ba();let s=!0;const i=l=>(u,c)=>{var h;const f=zt(t,c,l==="exit"?(h=t.presenceContext)===null||h===void 0?void 0:h.custom:void 0);if(f){const{transition:d,transitionEnd:m,...p}=f;u={...u,...p,...m}}return u};function r(l){e=l(t)}function o(l){const u=t.getProps(),c=t.getVariantContext(!0)||{},h=[],f=new Set;let d={},m=1/0;for(let y=0;y<va;y++){const v=ya[y],T=n[v],g=u[v]!==void 0?u[v]:c[v],b=xt(g),V=v===l?T.isActive:null;V===!1&&(m=y);let R=g===c[v]&&g!==u[v]&&b;if(R&&s&&t.manuallyAnimateOnMount&&(R=!1),T.protectedKeys={...d},!T.isActive&&V===null||!g&&!T.prevProp||Wt(g)||typeof g=="boolean")continue;let S=Pa(T.prevProp,g)||v===l&&T.isActive&&!R&&b||y>m&&b,k=!1;const O=Array.isArray(g)?g:[g];let rt=O.reduce(i(v),{});V===!1&&(rt={});const{prevResolvedValues:Je={}}=T,Bi={...Je,...rt},tn=F=>{S=!0,f.has(F)&&(k=!0,f.delete(F)),T.needsAnimating[F]=!0;const U=t.getValue(F);U&&(U.liveStyle=!1)};for(const F in Bi){const U=rt[F],qt=Je[F];if(d.hasOwnProperty(F))continue;let Zt=!1;he(U)&&he(qt)?Zt=!js(U,qt):Zt=U!==qt,Zt?U!=null?tn(F):f.add(F):U!==void 0&&f.has(F)?tn(F):T.protectedKeys[F]=!0}T.prevProp=g,T.prevResolvedValues=rt,T.isActive&&(d={...d,...rt}),s&&t.blockInitialAnimation&&(S=!1),S&&(!R||k)&&h.push(...O.map(F=>({animation:F,options:{type:v}})))}if(f.size){const y={};f.forEach(v=>{const T=t.getBaseTarget(v),g=t.getValue(v);g&&(g.liveStyle=!0),y[v]=T===void 0?null:T}),h.push({animation:y})}let p=!!h.length;return s&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(p=!1),s=!1,p?e(h):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=t.variantChildren)===null||c===void 0||c.forEach(f=>{var d;return(d=f.animationState)===null||d===void 0?void 0:d.setActive(l,u)}),n[l].isActive=u;const h=o(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:r,getState:()=>n}}function Pa(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!js(e,t):!1}function tt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ba(){return{animate:tt(!0),whileInView:tt(),whileHover:tt(),whileTap:tt(),whileDrag:tt(),whileFocus:tt(),exit:tt()}}class Sa extends J{constructor(e){super(e),e.animationState||(e.animationState=Ta(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Wt(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Va=0;class wa extends J{constructor(){super(...arguments),this.id=Va++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Aa={animation:{Feature:Sa},exit:{Feature:wa}},Rn=(t,e)=>Math.abs(t-e);function Ca(t,e){const n=Rn(t.x,e.x),s=Rn(t.y,e.y);return Math.sqrt(n**2+s**2)}class pi{constructor(e,n,{transformPagePoint:s,contextWindow:i,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=re(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Ca(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:p}=D;this.history.push({...m,timestamp:p});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=oe(f,this.transformPagePoint),C.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=re(h.type==="pointercancel"?this.lastMoveEventInfo:oe(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,y),m&&m(h,y)},!Ls(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const o=Ht(e),a=oe(o,this.transformPagePoint),{point:l}=a,{timestamp:u}=D;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(e,re(a,this.history)),this.removeListeners=_($(this.contextWindow,"pointermove",this.handlePointerMove),$(this.contextWindow,"pointerup",this.handlePointerUp),$(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Z(this.updatePoint)}}function oe(t,e){return e?{point:e(t.point)}:t}function En(t,e){return{x:t.x-e.x,y:t.y-e.y}}function re({point:t},e){return{point:t,delta:En(t,gi(e)),offset:En(t,Da(e)),velocity:Ma(e,.1)}}function Da(t){return t[0]}function gi(t){return t[t.length-1]}function Ma(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=gi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};const r=G(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function B(t){return t.max-t.min}function Te(t,e=0,n=.01){return Math.abs(t-e)<=n}function Ln(t,e,n,s=.5){t.origin=s,t.originPoint=w(e.min,e.max,t.origin),t.scale=B(n)/B(e),(Te(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=w(n.min,n.max,t.origin)-t.originPoint,(Te(t.translate)||isNaN(t.translate))&&(t.translate=0)}function yt(t,e,n,s){Ln(t.x,e.x,n.x,s?s.originX:void 0),Ln(t.y,e.y,n.y,s?s.originY:void 0)}function Fn(t,e,n){t.min=n.min+e.min,t.max=t.min+B(e)}function Ra(t,e,n){Fn(t.x,e.x,n.x),Fn(t.y,e.y,n.y)}function Bn(t,e,n){t.min=e.min-n.min,t.max=t.min+B(e)}function vt(t,e,n){Bn(t.x,e.x,n.x),Bn(t.y,e.y,n.y)}function Ea(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?w(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?w(n,t,s.max):Math.min(t,n)),t}function kn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function La(t,{top:e,left:n,bottom:s,right:i}){return{x:kn(t.x,n,i),y:kn(t.y,e,s)}}function On(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function Fa(t,e){return{x:On(t.x,e.x),y:On(t.y,e.y)}}function Ba(t,e){let n=.5;const s=B(t),i=B(e);return i>s?n=Pt(e.min,e.max-s,t.min):s>i&&(n=Pt(t.min,t.max-i,e.min)),q(0,1,n)}function ka(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Pe=.35;function Oa(t=Pe){return t===!1?t=0:t===!0&&(t=Pe),{x:jn(t,"left","right"),y:jn(t,"top","bottom")}}function jn(t,e,n){return{min:In(t,e),max:In(t,n)}}function In(t,e){return typeof t=="number"?t:t[e]||0}const Nn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ut=()=>({x:Nn(),y:Nn()}),Un=()=>({min:0,max:0}),A=()=>({x:Un(),y:Un()});function I(t){return[t("x"),t("y")]}function yi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function ja({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ia(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function ae(t){return t===void 0||t===1}function be({scale:t,scaleX:e,scaleY:n}){return!ae(t)||!ae(e)||!ae(n)}function et(t){return be(t)||vi(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function vi(t){return Kn(t.x)||Kn(t.y)}function Kn(t){return t&&t!=="0%"}function Ut(t,e,n){const s=t-n,i=e*s;return n+i}function $n(t,e,n,s,i){return i!==void 0&&(t=Ut(t,i,s)),Ut(t,n,s)+e}function Se(t,e=0,n=1,s,i){t.min=$n(t.min,e,n,s,i),t.max=$n(t.max,e,n,s,i)}function xi(t,{x:e,y:n}){Se(t.x,e.translate,e.scale,e.originPoint),Se(t.y,n.translate,n.scale,n.originPoint)}function Na(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const l=r.instance;l&&l.style&&l.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ct(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,xi(t,o)),s&&et(r.latestValues)&&ct(t,r.latestValues))}e.x=_n(e.x),e.y=_n(e.y)}function _n(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Y(t,e){t.min=t.min+e,t.max=t.max+e}function Wn(t,e,[n,s,i]){const r=e[i]!==void 0?e[i]:.5,o=w(t.min,t.max,r);Se(t,e[n],e[s],o,e.scale)}const Ua=["x","scaleX","originX"],Ka=["y","scaleY","originY"];function ct(t,e){Wn(t.x,e,Ua),Wn(t.y,e,Ka)}function Ti(t,e){return yi(Ia(t.getBoundingClientRect(),e))}function $a(t,e,n){const s=Ti(t,n),{scroll:i}=e;return i&&(Y(s.x,i.offset.x),Y(s.y,i.offset.y)),s}const Pi=({current:t})=>t?t.ownerDocument.defaultView:null,_a=new WeakMap;class Wa{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=A(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Ht(c,"page").point)},r=(c,h)=>{const{drag:f,dragPropagation:d,onDragStart:m}=this.getProps();if(f&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Bs(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),I(y=>{let v=this.getAxisMotionValue(y).get()||0;if(N.test(v)){const{projection:T}=this.visualElement;if(T&&T.layout){const g=T.layout.layoutBox[y];g&&(v=B(g)*(parseFloat(v)/100))}}this.originPoint[y]=v}),m&&m(c,h);const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},o=(c,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:y}=h;if(d&&this.currentDirection===null){this.currentDirection=Ga(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,y),this.updateAxis("y",h.point,y),this.visualElement.render(),p&&p(c,h)},a=(c,h)=>this.stop(c,h),l=()=>I(c=>{var h;return this.getAnimationState(c)==="paused"&&((h=this.getAxisMotionValue(c).animation)===null||h===void 0?void 0:h.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new pi(e,{onSessionStart:i,onStart:r,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:Pi(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:r}=this.getProps();r&&r(e,n)}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Rt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Ea(o,this.constraints[e],this.elastic[e])),r.set(o)}resolveConstraints(){var e;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,r=this.constraints;n&&at(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=La(i.layoutBox,n):this.constraints=!1,this.elastic=Oa(s),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&I(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=ka(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!at(e))return!1;const s=e.current;exports.invariant(s!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const r=$a(s,i.root,this.visualElement.getTransformPagePoint());let o=Fa(i.layout.layoutBox,r);if(n){const a=n(ja(o));this.hasMutatedConstraints=!!a,a&&(o=yi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=I(c=>{if(!Rt(c,n,this.currentDirection))return;let h=l&&l[c]||{};o&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,m)});return Promise.all(u).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return s.start(Ye(e,s,0,n,this.visualElement))}stopAnimation(){I(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){I(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){I(n=>{const{drag:s}=this.getProps();if(!Rt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n];r.set(e[n]-w(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!at(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};I(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();i[o]=Ba({min:l,max:l},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),I(o=>{if(!Rt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(w(l,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;_a.set(this.visualElement,this);const e=this.visualElement.current,n=$(e,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();at(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,r=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),s();const o=K(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(I(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{o(),n(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Pe,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function Rt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Ga(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ha extends J{constructor(e){super(e),this.removeGroupControls=M,this.removeListeners=M,this.controls=new Wa(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||M}unmount(){this.removeGroupControls(),this.removeListeners()}}const Gn=t=>(e,n)=>{t&&t(e,n)};class za extends J{constructor(){super(...arguments),this.removePointerDownListener=M}onPointerDown(e){this.session=new pi(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Pi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:Gn(e),onStart:Gn(n),onMove:s,onEnd:(r,o)=>{delete this.session,i&&i(r,o)}}}mount(){this.removePointerDownListener=$(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Ya(){const t=P.useContext(_t);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:s}=t,i=P.useId();return P.useEffect(()=>s(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const Ft={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Hn(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const dt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(x.test(t))t=parseFloat(t);else return t;const n=Hn(t,e.target.x),s=Hn(t,e.target.y);return`${n}% ${s}%`}},Xa={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=Q.parse(t);if(i.length>5)return s;const r=Q.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=l;const u=w(a,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),r(i)}};class qa extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;qi(Za),r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,onExitComplete:()=>this.safeToRemove()})),Ft.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,o=s.projection;return o&&(o.isPresent=r,i||e.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||C.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ce.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function bi(t){const[e,n]=Ya(),s=P.useContext(Re);return P.createElement(qa,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(vs),isPresent:e,safeToRemove:n})}const Za={borderRadius:{...dt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:dt,borderTopRightRadius:dt,borderBottomLeftRadius:dt,borderBottomRightRadius:dt,boxShadow:Xa},Si=["TopLeft","TopRight","BottomLeft","BottomRight"],Qa=Si.length,zn=t=>typeof t=="string"?parseFloat(t):t,Yn=t=>typeof t=="number"||x.test(t);function Ja(t,e,n,s,i,r){i?(t.opacity=w(0,n.opacity!==void 0?n.opacity:1,tl(s)),t.opacityExit=w(e.opacity!==void 0?e.opacity:1,0,el(s))):r&&(t.opacity=w(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<Qa;o++){const a=`border${Si[o]}Radius`;let l=Xn(e,a),u=Xn(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||Yn(l)===Yn(u)?(t[a]=Math.max(w(zn(l),zn(u),s),0),(N.test(u)||N.test(l))&&(t[a]+="%")):t[a]=u}(e.rotate||n.rotate)&&(t.rotate=w(e.rotate||0,n.rotate||0,s))}function Xn(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const tl=Vi(0,.5,ri),el=Vi(.5,.95,M);function Vi(t,e,n){return s=>s<t?0:s>e?1:n(Pt(t,e,s))}function qn(t,e){t.min=e.min,t.max=e.max}function j(t,e){qn(t.x,e.x),qn(t.y,e.y)}function Zn(t,e,n,s,i){return t-=e,t=Ut(t,1/n,s),i!==void 0&&(t=Ut(t,1/i,s)),t}function nl(t,e=0,n=1,s=.5,i,r=t,o=t){if(N.test(e)&&(e=parseFloat(e),e=w(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=w(r.min,r.max,s);t===r&&(a-=e),t.min=Zn(t.min,e,n,a,i),t.max=Zn(t.max,e,n,a,i)}function Qn(t,e,[n,s,i],r,o){nl(t,e[n],e[s],e[i],e.scale,r,o)}const sl=["x","scaleX","originX"],il=["y","scaleY","originY"];function Jn(t,e,n,s){Qn(t.x,e,sl,n?n.x:void 0,s?s.x:void 0),Qn(t.y,e,il,n?n.y:void 0,s?s.y:void 0)}function ts(t){return t.translate===0&&t.scale===1}function wi(t){return ts(t.x)&&ts(t.y)}function ol(t,e){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}function Ai(t,e){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)}function es(t){return B(t.x)/B(t.y)}class rl{constructor(){this.members=[]}add(e){Xe(this.members,e),e.scheduleRender()}remove(e){if(qe(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1){s=r;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function ns(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=(n==null?void 0:n.z)||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:u,rotate:c,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;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) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const al=(t,e)=>t.depth-e.depth;class ll{constructor(){this.children=[],this.isDirty=!1}add(e){Xe(this.children,e),this.isDirty=!0}remove(e){qe(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(al),this.isDirty=!1,this.children.forEach(e)}}function ul(t,e){const n=X.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(Z(s),t(r-e))};return C.read(s,!0),()=>Z(s)}function cl(t){window.MotionDebug&&window.MotionDebug.record(t)}function hl(t){return t instanceof SVGElement&&t.tagName!=="svg"}function fl(t,e,n){const s=L(t)?t:bt(t);return s.start(Ye("",s,e,n)),s.animation}const le=["","X","Y","Z"],dl={visibility:"hidden"},ss=1e3;let ml=0;const nt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function ue(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Ci({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e==null?void 0:e()){this.id=ml++,this.animationId=0,this.children=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=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,nt.totalNodes=nt.resolvedTargetDeltas=nt.recalculatedProjection=0,this.nodes.forEach(yl),this.nodes.forEach(bl),this.nodes.forEach(Sl),this.nodes.forEach(vl),cl(nt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new ll)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Ze),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const l=this.eventHandlers.get(o);l&&l.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=hl(o),this.instance=o;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),t){let h;const f=()=>this.root.updateBlockedByResize=!1;t(o,()=>{this.root.updateBlockedByResize=!0,h&&h(),h=ul(f,250),Ft.hasAnimatedSinceResize&&(Ft.hasAnimatedSinceResize=!1,this.nodes.forEach(os))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:h,hasLayoutChanged:f,hasRelativeTargetChanged:d,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const p=this.options.transition||c.getDefaultTransition()||Dl,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=c.getProps(),T=!this.targetLayout||!Ai(this.targetLayout,m)||d,g=!f&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||g||f&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(h,g);const b={...Ue(p,"layout"),onPlay:y,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(b.delay=0,b.type=!1),this.startAnimation(b)}else f||os(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Z(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Vl),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(is);return}this.isUpdating||this.nodes.forEach(Tl),this.isUpdating=!1,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes.forEach(Pl),this.nodes.forEach(pl),this.nodes.forEach(gl),this.clearAllSnapshots();const a=X.now();D.delta=q(0,1e3/60,a-D.timestamp),D.timestamp=a,D.isProcessing=!0,Qt.update.process(D),Qt.preRender.process(D),Qt.render.process(D),D.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ce.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(xl),this.sharedNodes.forEach(wl)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,C.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){C.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=A(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:o,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!wi(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;o&&(a||et(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return o&&(l=this.removeTransform(l)),Ml(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return A();const a=o.measureViewportBox(),{scroll:l}=this.root;return l&&(Y(a.x,l.offset.x),Y(a.y,l.offset.y)),a}removeElementScroll(o){const a=A();j(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:h}=u;if(u!==this.root&&c&&h.layoutScroll){if(c.isRoot){j(a,o);const{scroll:f}=this.root;f&&(Y(a.x,-f.offset.x),Y(a.y,-f.offset.y))}Y(a.x,c.offset.x),Y(a.y,c.offset.y)}}return a}applyTransform(o,a=!1){const l=A();j(l,o);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&ct(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),et(c.latestValues)&&ct(l,c.latestValues)}return et(this.latestValues)&&ct(l,this.latestValues),l}removeTransform(o){const a=A();j(a,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!et(u.latestValues))continue;be(u.latestValues)&&u.updateSnapshot();const c=A(),h=u.measurePageBox();j(c,h),Jn(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return et(this.latestValues)&&Jn(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==D.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:h,layoutId:f}=this.options;if(!(!this.layout||!(h||f))){if(this.resolvedRelativeTargetAt=D.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=A(),this.relativeTargetOrigin=A(),vt(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),j(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=A(),this.targetWithTransforms=A()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Ra(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):j(this.target,this.layout.layoutBox),xi(this.target,this.targetDelta)):j(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=A(),this.relativeTargetOrigin=A(),vt(this.relativeTargetOrigin,this.target,d.target),j(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}nt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||be(this.parent.latestValues)||vi(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===D.timestamp&&(u=!1),u)return;const{layout:c,layoutId:h}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||h))return;j(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,d=this.treeScale.y;Na(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=A());const{target:m}=a;if(!m){this.projectionTransform&&(this.projectionDelta=ut(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=ut(),this.projectionDeltaWithTransform=ut());const p=this.projectionTransform;yt(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=ns(this.projectionDelta,this.treeScale),(this.projectionTransform!==p||this.treeScale.x!==f||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),nt.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(o,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},h=ut();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=A(),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(Cl));this.animationProgress=0;let g;this.mixTargetDelta=b=>{const V=b/1e3;rs(h.x,o.x,V),rs(h.y,o.y,V),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Al(this.relativeTarget,this.relativeTargetOrigin,f,V),g&&ol(this.relativeTarget,g)&&(this.isProjectionDirty=!1),g||(g=A()),j(g,this.relativeTarget)),p&&(this.animationValues=c,Ja(c,u,this.latestValues,V,T,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=C.update(()=>{Ft.hasAnimatedSinceResize=!0,this.currentAnimation=fl(0,ss,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ss),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&Di(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||A();const h=B(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+h;const f=B(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+f}j(a,l),ct(a,c),yt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new rl),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&ue("z",o,u,this.animationValues);for(let c=0;c<le.length;c++)ue(`rotate${le[c]}`,o,u,this.animationValues),ue(`skew${le[c]}`,o,u,this.animationValues);o.render();for(const c in u)o.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);o.scheduleRender()}getProjectionStyles(o){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return dl;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=Et(o==null?void 0:o.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){const p={};return this.options.layoutId&&(p.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,p.pointerEvents=Et(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!et(this.latestValues)&&(p.transform=c?c({},""):"none",this.hasProjected=!1),p}const f=h.animationValues||h.latestValues;this.applyTransformsToTarget(),u.transform=ns(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:d,y:m}=this.projectionDelta;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;for(const p in Bt){if(f[p]===void 0)continue;const{correct:y,applyTo:v}=Bt[p],T=u.transform==="none"?f[p]:y(f[p],h);if(v){const g=v.length;for(let b=0;b<g;b++)u[v[b]]=T}else u[p]=T}return this.options.layoutId&&(u.pointerEvents=h===this?Et(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(is),this.root.sharedNodes.clear()}}}function pl(t){t.updateLayout()}function gl(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:r}=t.options,o=n.source!==t.layout.source;r==="size"?I(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=B(f);f.min=s[h].min,f.max=f.min+d}):Di(r,n.layoutBox,s)&&I(h=>{const f=o?n.measuredBox[h]:n.layoutBox[h],d=B(s[h]);f.max=f.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+d)});const a=ut();yt(a,s,n.layoutBox);const l=ut();o?yt(l,t.applyTransform(i,!0),n.measuredBox):yt(l,s,n.layoutBox);const u=!wi(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:d}=h;if(f&&d){const m=A();vt(m,n.layoutBox,f.layoutBox);const p=A();vt(p,s,d.layoutBox),Ai(m,p)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=p,t.relativeTargetOrigin=m,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function yl(t){nt.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))}function vl(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function xl(t){t.clearSnapshot()}function is(t){t.clearMeasurements()}function Tl(t){t.isLayoutDirty=!1}function Pl(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function os(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function bl(t){t.resolveTargetDelta()}function Sl(t){t.calcProjection()}function Vl(t){t.resetSkewAndRotation()}function wl(t){t.removeLeadSnapshot()}function rs(t,e,n){t.translate=w(e.translate,0,n),t.scale=w(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function as(t,e,n,s){t.min=w(e.min,n.min,s),t.max=w(e.max,n.max,s)}function Al(t,e,n,s){as(t.x,e.x,n.x,s),as(t.y,e.y,n.y,s)}function Cl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Dl={duration:.45,ease:[.4,0,.1,1]},ls=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),us=ls("applewebkit/")&&!ls("chrome/")?Math.round:M;function cs(t){t.min=us(t.min),t.max=us(t.max)}function Ml(t){cs(t.x),cs(t.y)}function Di(t,e,n){return t==="position"||t==="preserve-aspect"&&!Te(es(e),es(n),.2)}const Rl=Ci({attachResizeListener:(t,e)=>K(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ce={current:void 0},Mi=Ci({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ce.current){const t=new Rl({});t.mount(window),t.setOptions({layoutScroll:!0}),ce.current=t}return ce.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),El={pan:{Feature:za},drag:{Feature:Ha,ProjectionNode:Mi,MeasureLayout:bi}},Kt={current:null},Qe={current:!1};function Ri(){if(Qe.current=!0,!!we)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Kt.current=t.matches;t.addListener(e),e()}else Kt.current=!1}function Ll(t,e,n){const{willChange:s}=e;for(const i in e){const r=e[i],o=n[i];if(L(r))t.addValue(i,r),Nt(s)&&s.add(i),process.env.NODE_ENV==="development"&&Xt(r.version==="11.0.28",`Attempting to mix Framer Motion versions ${r.version} with 11.0.28 may not work as expected.`);else if(L(o))t.addValue(i,bt(r,{owner:t})),Nt(s)&&s.remove(i);else if(o!==r)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=t.getStaticValue(i);t.addValue(i,bt(a!==void 0?a:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const hs=new WeakMap,Fl=[...$s,E,Q],Bl=t=>Fl.find(Ks(t)),Ei=Object.keys(Tt),kl=Ei.length,fs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ol=Me.length;function Li(t){if(t)return t.options.allowProjection!==!1?t.projection:Li(t.parent)}class jl{constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:r,visualState:o},a={}){this.resolveKeyframes=(f,d,m,p)=>new this.KeyframeResolver(f,d,m,p,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ke,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>C.render(this.render,!1,!0);const{latestValues:l,renderState:u}=o;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=!!r,this.isControllingVariants=Gt(n),this.isVariantNode=ys(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&L(d)&&(d.set(l[f],!1),Nt(c)&&c.add(f))}}scrapeMotionValuesFromProps(e,n,s){return{}}mount(e){this.current=e,hs.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)),Qe.current||Ri(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Kt.current,process.env.NODE_ENV!=="production"&&Xt(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)}unmount(){hs.delete(this.current),this.projection&&this.projection.unmount(),Z(this.notifyUpdate),Z(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const s=ot.has(e),i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&C.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),r=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},s,i,r){let o,a;if(process.env.NODE_ENV!=="production"&&i&&s){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?At(!1,l):exports.invariant(!1,l)}for(let l=0;l<kl;l++){const u=Ei[l],{isEnabled:c,Feature:h,ProjectionNode:f,MeasureLayout:d}=Tt[u];f&&(o=f),c(n)&&(!this.features[u]&&h&&(this.features[u]=new h(this)),d&&(a=d))}if((this.type==="html"||this.type==="svg")&&!this.projection&&o){this.projection=new o(this.latestValues,Li(this.parent));const{layoutId:l,layout:u,drag:c,dragConstraints:h,layoutScroll:f,layoutRoot:d}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||h&&at(h),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:r,layoutScroll:f,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):A()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<fs.length;s++){const i=fs[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r=e["on"+i];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=Ll(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const s=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(s.initial=this.props.initial),s}const n={};for(let s=0;s<Ol;s++){const i=Me[s],r=this.props[i];(xt(r)||r===!1)&&(n[i]=r)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=bt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){var s;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);return i!=null&&(typeof i=="string"&&(Ns(i)||Is(i))?i=parseFloat(i):!Bl(i)&&Q.test(n)&&(i=qs(e,n)),this.setBaseTarget(e,L(i)?i.get():i)),L(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n,s;const{initial:i}=this.props,r=typeof i=="string"||typeof i=="object"?(s=Ne(this.props,i,(n=this.presenceContext)===null||n===void 0?void 0:n.custom))===null||s===void 0?void 0:s[e]:void 0;if(i&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!L(o)?o:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ze),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Fi extends jl{constructor(){super(...arguments),this.KeyframeResolver=Zs}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}}function Il(t){return window.getComputedStyle(t)}class Nl extends Fi{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(ot.has(n)){const s=_e(n);return s&&s.default||0}else{const s=Il(e),i=(Ps(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ti(e,n)}build(e,n,s,i){Be(e,n,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Ie(e,n,s)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;L(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,s,i){As(e,n,s,i)}}class Ul extends Fi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(ot.has(n)){const s=_e(n);return s&&s.default||0}return n=Cs.has(n)?n:Ae(n),e.getAttribute(n)}measureInstanceViewportBox(){return A()}scrapeMotionValuesFromProps(e,n,s){return Ms(e,n,s)}build(e,n,s,i){Oe(e,n,s,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,s,i){Ds(e,n,s,i)}mount(e){this.isSVGTag=je(e.tagName),super.mount(e)}}const Kl=(t,e)=>Ee(t)?new Ul(e,{enableHardwareAcceleration:!1}):new Nl(e,{allowProjection:t!==P.Fragment,enableHardwareAcceleration:!0}),$l={layout:{ProjectionNode:Mi,MeasureLayout:bi}},_l={...Aa,...No,...El,...$l},Wl=Yi((t,e)=>Ao(t,e,_l,Kl));function Gl(){!Qe.current&&Ri();const[t]=P.useState(Kt.current);return process.env.NODE_ENV!=="production"&&Xt(t!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),t}exports.LayoutGroupContext=Re;exports.MotionConfigContext=Ve;exports.PresenceContext=_t;exports.frame=C;exports.motion=Wl;exports.useConstant=Rs;exports.useIsomorphicLayoutEffect=ds;exports.useReducedMotion=Gl;
|
|
2
|
-
//# sourceMappingURL=use-reduced-motion-162cddef.cjs.map
|