framer-motion 12.23.26 → 12.23.28
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/dist/cjs/client.js +2 -1
- package/dist/cjs/client.js.map +1 -0
- package/dist/cjs/debug.js +1 -0
- package/dist/cjs/debug.js.map +1 -0
- package/dist/cjs/dom-mini.js +1 -0
- package/dist/cjs/dom-mini.js.map +1 -0
- package/dist/cjs/dom.js +1 -0
- package/dist/cjs/dom.js.map +1 -0
- package/dist/cjs/{feature-bundle-kvRbMDEA.js → feature-bundle-Dt2VtvSZ.js} +3 -2
- package/dist/cjs/feature-bundle-Dt2VtvSZ.js.map +1 -0
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/m.js +1 -0
- package/dist/cjs/m.js.map +1 -0
- package/dist/cjs/mini.js +1 -0
- package/dist/cjs/mini.js.map +1 -0
- package/dist/dom-mini.js +1 -1
- package/dist/dom.js +1 -1
- package/dist/es/animation/animate/index.mjs +1 -0
- package/dist/es/animation/animate/index.mjs.map +1 -0
- package/dist/es/animation/animate/resolve-subjects.mjs +1 -0
- package/dist/es/animation/animate/resolve-subjects.mjs.map +1 -0
- package/dist/es/animation/animate/sequence.mjs +1 -0
- package/dist/es/animation/animate/sequence.mjs.map +1 -0
- package/dist/es/animation/animate/single-value.mjs +1 -0
- package/dist/es/animation/animate/single-value.mjs.map +1 -0
- package/dist/es/animation/animate/subject.mjs +1 -0
- package/dist/es/animation/animate/subject.mjs.map +1 -0
- package/dist/es/animation/animators/waapi/animate-elements.mjs +1 -0
- package/dist/es/animation/animators/waapi/animate-elements.mjs.map +1 -0
- package/dist/es/animation/animators/waapi/animate-sequence.mjs +1 -0
- package/dist/es/animation/animators/waapi/animate-sequence.mjs.map +1 -0
- package/dist/es/animation/animators/waapi/animate-style.mjs +1 -0
- package/dist/es/animation/animators/waapi/animate-style.mjs.map +1 -0
- package/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs +1 -0
- package/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs.map +1 -0
- package/dist/es/animation/hooks/animation-controls.mjs +1 -0
- package/dist/es/animation/hooks/animation-controls.mjs.map +1 -0
- package/dist/es/animation/hooks/use-animate-style.mjs +1 -0
- package/dist/es/animation/hooks/use-animate-style.mjs.map +1 -0
- package/dist/es/animation/hooks/use-animate.mjs +1 -0
- package/dist/es/animation/hooks/use-animate.mjs.map +1 -0
- package/dist/es/animation/hooks/use-animated-state.mjs +1 -0
- package/dist/es/animation/hooks/use-animated-state.mjs.map +1 -0
- package/dist/es/animation/hooks/use-animation.mjs +1 -0
- package/dist/es/animation/hooks/use-animation.mjs.map +1 -0
- package/dist/es/animation/interfaces/motion-value.mjs +1 -0
- package/dist/es/animation/interfaces/motion-value.mjs.map +1 -0
- package/dist/es/animation/interfaces/visual-element-target.mjs +1 -0
- package/dist/es/animation/interfaces/visual-element-target.mjs.map +1 -0
- package/dist/es/animation/interfaces/visual-element-variant.mjs +1 -0
- package/dist/es/animation/interfaces/visual-element-variant.mjs.map +1 -0
- package/dist/es/animation/interfaces/visual-element.mjs +1 -0
- package/dist/es/animation/interfaces/visual-element.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/data-id.mjs +1 -0
- package/dist/es/animation/optimized-appear/data-id.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/get-appear-id.mjs +1 -0
- package/dist/es/animation/optimized-appear/get-appear-id.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/handoff.mjs +1 -0
- package/dist/es/animation/optimized-appear/handoff.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/start.mjs +1 -0
- package/dist/es/animation/optimized-appear/start.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/store-id.mjs +1 -0
- package/dist/es/animation/optimized-appear/store-id.mjs.map +1 -0
- package/dist/es/animation/optimized-appear/store.mjs +1 -0
- package/dist/es/animation/optimized-appear/store.mjs.map +1 -0
- package/dist/es/animation/sequence/create.mjs +1 -0
- package/dist/es/animation/sequence/create.mjs.map +1 -0
- package/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +1 -0
- package/dist/es/animation/sequence/utils/calc-repeat-duration.mjs.map +1 -0
- package/dist/es/animation/sequence/utils/calc-time.mjs +1 -0
- package/dist/es/animation/sequence/utils/calc-time.mjs.map +1 -0
- package/dist/es/animation/sequence/utils/edit.mjs +1 -0
- package/dist/es/animation/sequence/utils/edit.mjs.map +1 -0
- package/dist/es/animation/sequence/utils/normalize-times.mjs +1 -0
- package/dist/es/animation/sequence/utils/normalize-times.mjs.map +1 -0
- package/dist/es/animation/sequence/utils/sort.mjs +1 -0
- package/dist/es/animation/sequence/utils/sort.mjs.map +1 -0
- package/dist/es/animation/utils/calc-child-stagger.mjs +1 -0
- package/dist/es/animation/utils/calc-child-stagger.mjs.map +1 -0
- package/dist/es/animation/utils/create-visual-element.mjs +1 -0
- package/dist/es/animation/utils/create-visual-element.mjs.map +1 -0
- package/dist/es/animation/utils/default-transitions.mjs +1 -0
- package/dist/es/animation/utils/default-transitions.mjs.map +1 -0
- package/dist/es/animation/utils/is-animation-controls.mjs +1 -0
- package/dist/es/animation/utils/is-animation-controls.mjs.map +1 -0
- package/dist/es/animation/utils/is-dom-keyframes.mjs +1 -0
- package/dist/es/animation/utils/is-dom-keyframes.mjs.map +1 -0
- package/dist/es/animation/utils/is-keyframes-target.mjs +1 -0
- package/dist/es/animation/utils/is-keyframes-target.mjs.map +1 -0
- package/dist/es/animation/utils/is-transition-defined.mjs +1 -0
- package/dist/es/animation/utils/is-transition-defined.mjs.map +1 -0
- package/dist/es/client.mjs +1 -0
- package/dist/es/client.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/PopChild.mjs +1 -0
- package/dist/es/components/AnimatePresence/PopChild.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/PresenceChild.mjs +1 -0
- package/dist/es/components/AnimatePresence/PresenceChild.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/index.mjs +1 -0
- package/dist/es/components/AnimatePresence/index.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/use-presence-data.mjs +1 -0
- package/dist/es/components/AnimatePresence/use-presence-data.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/use-presence.mjs +1 -0
- package/dist/es/components/AnimatePresence/use-presence.mjs.map +1 -0
- package/dist/es/components/AnimatePresence/utils.mjs +1 -0
- package/dist/es/components/AnimatePresence/utils.mjs.map +1 -0
- package/dist/es/components/AnimateSharedLayout.mjs +1 -0
- package/dist/es/components/AnimateSharedLayout.mjs.map +1 -0
- package/dist/es/components/LayoutGroup/index.mjs +1 -0
- package/dist/es/components/LayoutGroup/index.mjs.map +1 -0
- package/dist/es/components/LazyMotion/index.mjs +1 -0
- package/dist/es/components/LazyMotion/index.mjs.map +1 -0
- package/dist/es/components/MotionConfig/index.mjs +1 -0
- package/dist/es/components/MotionConfig/index.mjs.map +1 -0
- package/dist/es/components/Reorder/Group.mjs +1 -0
- package/dist/es/components/Reorder/Group.mjs.map +1 -0
- package/dist/es/components/Reorder/Item.mjs +1 -0
- package/dist/es/components/Reorder/Item.mjs.map +1 -0
- package/dist/es/components/Reorder/namespace.mjs +1 -0
- package/dist/es/components/Reorder/namespace.mjs.map +1 -0
- package/dist/es/components/Reorder/utils/check-reorder.mjs +1 -0
- package/dist/es/components/Reorder/utils/check-reorder.mjs.map +1 -0
- package/dist/es/context/DeprecatedLayoutGroupContext.mjs +1 -0
- package/dist/es/context/DeprecatedLayoutGroupContext.mjs.map +1 -0
- package/dist/es/context/LayoutGroupContext.mjs +1 -0
- package/dist/es/context/LayoutGroupContext.mjs.map +1 -0
- package/dist/es/context/LazyContext.mjs +1 -0
- package/dist/es/context/LazyContext.mjs.map +1 -0
- package/dist/es/context/MotionConfigContext.mjs +1 -0
- package/dist/es/context/MotionConfigContext.mjs.map +1 -0
- package/dist/es/context/MotionContext/create.mjs +1 -0
- package/dist/es/context/MotionContext/create.mjs.map +1 -0
- package/dist/es/context/MotionContext/index.mjs +1 -0
- package/dist/es/context/MotionContext/index.mjs.map +1 -0
- package/dist/es/context/MotionContext/utils.mjs +1 -0
- package/dist/es/context/MotionContext/utils.mjs.map +1 -0
- package/dist/es/context/PresenceContext.mjs +1 -0
- package/dist/es/context/PresenceContext.mjs.map +1 -0
- package/dist/es/context/ReorderContext.mjs +1 -0
- package/dist/es/context/ReorderContext.mjs.map +1 -0
- package/dist/es/context/SwitchLayoutGroupContext.mjs +1 -0
- package/dist/es/context/SwitchLayoutGroupContext.mjs.map +1 -0
- package/dist/es/debug.mjs +1 -0
- package/dist/es/debug.mjs.map +1 -0
- package/dist/es/dom-mini.mjs +1 -0
- package/dist/es/dom-mini.mjs.map +1 -0
- package/dist/es/dom.mjs +1 -0
- package/dist/es/dom.mjs.map +1 -0
- package/dist/es/events/add-dom-event.mjs +1 -0
- package/dist/es/events/add-dom-event.mjs.map +1 -0
- package/dist/es/events/add-pointer-event.mjs +1 -0
- package/dist/es/events/add-pointer-event.mjs.map +1 -0
- package/dist/es/events/event-info.mjs +1 -0
- package/dist/es/events/event-info.mjs.map +1 -0
- package/dist/es/events/use-dom-event.mjs +1 -0
- package/dist/es/events/use-dom-event.mjs.map +1 -0
- package/dist/es/gestures/drag/VisualElementDragControls.mjs +1 -0
- package/dist/es/gestures/drag/VisualElementDragControls.mjs.map +1 -0
- package/dist/es/gestures/drag/index.mjs +1 -0
- package/dist/es/gestures/drag/index.mjs.map +1 -0
- package/dist/es/gestures/drag/use-drag-controls.mjs +1 -0
- package/dist/es/gestures/drag/use-drag-controls.mjs.map +1 -0
- package/dist/es/gestures/drag/utils/constraints.mjs +1 -0
- package/dist/es/gestures/drag/utils/constraints.mjs.map +1 -0
- package/dist/es/gestures/focus.mjs +1 -0
- package/dist/es/gestures/focus.mjs.map +1 -0
- package/dist/es/gestures/hover.mjs +1 -0
- package/dist/es/gestures/hover.mjs.map +1 -0
- package/dist/es/gestures/pan/PanSession.mjs +1 -0
- package/dist/es/gestures/pan/PanSession.mjs.map +1 -0
- package/dist/es/gestures/pan/index.mjs +1 -0
- package/dist/es/gestures/pan/index.mjs.map +1 -0
- package/dist/es/gestures/press.mjs +1 -0
- package/dist/es/gestures/press.mjs.map +1 -0
- package/dist/es/index.mjs +1 -0
- package/dist/es/index.mjs.map +1 -0
- package/dist/es/m.mjs +1 -0
- package/dist/es/m.mjs.map +1 -0
- package/dist/es/mini.mjs +1 -0
- package/dist/es/mini.mjs.map +1 -0
- package/dist/es/motion/features/Feature.mjs +1 -0
- package/dist/es/motion/features/Feature.mjs.map +1 -0
- package/dist/es/motion/features/animation/exit.mjs +1 -0
- package/dist/es/motion/features/animation/exit.mjs.map +1 -0
- package/dist/es/motion/features/animation/index.mjs +1 -0
- package/dist/es/motion/features/animation/index.mjs.map +1 -0
- package/dist/es/motion/features/animations.mjs +1 -0
- package/dist/es/motion/features/animations.mjs.map +1 -0
- package/dist/es/motion/features/definitions.mjs +1 -0
- package/dist/es/motion/features/definitions.mjs.map +1 -0
- package/dist/es/motion/features/drag.mjs +1 -0
- package/dist/es/motion/features/drag.mjs.map +1 -0
- package/dist/es/motion/features/gestures.mjs +1 -0
- package/dist/es/motion/features/gestures.mjs.map +1 -0
- package/dist/es/motion/features/layout/MeasureLayout.mjs +1 -0
- package/dist/es/motion/features/layout/MeasureLayout.mjs.map +1 -0
- package/dist/es/motion/features/layout.mjs +1 -0
- package/dist/es/motion/features/layout.mjs.map +1 -0
- package/dist/es/motion/features/load-features.mjs +1 -0
- package/dist/es/motion/features/load-features.mjs.map +1 -0
- package/dist/es/motion/features/viewport/index.mjs +1 -0
- package/dist/es/motion/features/viewport/index.mjs.map +1 -0
- package/dist/es/motion/features/viewport/observers.mjs +1 -0
- package/dist/es/motion/features/viewport/observers.mjs.map +1 -0
- package/dist/es/motion/index.mjs +1 -0
- package/dist/es/motion/index.mjs.map +1 -0
- package/dist/es/motion/utils/is-forced-motion-value.mjs +1 -0
- package/dist/es/motion/utils/is-forced-motion-value.mjs.map +1 -0
- package/dist/es/motion/utils/is-motion-component.mjs +1 -0
- package/dist/es/motion/utils/is-motion-component.mjs.map +1 -0
- package/dist/es/motion/utils/symbol.mjs +1 -0
- package/dist/es/motion/utils/symbol.mjs.map +1 -0
- package/dist/es/motion/utils/unwrap-motion-component.mjs +1 -0
- package/dist/es/motion/utils/unwrap-motion-component.mjs.map +1 -0
- package/dist/es/motion/utils/use-motion-ref.mjs +1 -0
- package/dist/es/motion/utils/use-motion-ref.mjs.map +1 -0
- package/dist/es/motion/utils/use-visual-element.mjs +1 -0
- package/dist/es/motion/utils/use-visual-element.mjs.map +1 -0
- package/dist/es/motion/utils/use-visual-state.mjs +1 -0
- package/dist/es/motion/utils/use-visual-state.mjs.map +1 -0
- package/dist/es/motion/utils/valid-prop.mjs +1 -0
- package/dist/es/motion/utils/valid-prop.mjs.map +1 -0
- package/dist/es/projection/animation/mix-values.mjs +1 -0
- package/dist/es/projection/animation/mix-values.mjs.map +1 -0
- package/dist/es/projection/geometry/conversion.mjs +1 -0
- package/dist/es/projection/geometry/conversion.mjs.map +1 -0
- package/dist/es/projection/geometry/copy.mjs +1 -0
- package/dist/es/projection/geometry/copy.mjs.map +1 -0
- package/dist/es/projection/geometry/delta-apply.mjs +2 -1
- package/dist/es/projection/geometry/delta-apply.mjs.map +1 -0
- package/dist/es/projection/geometry/delta-calc.mjs +1 -0
- package/dist/es/projection/geometry/delta-calc.mjs.map +1 -0
- package/dist/es/projection/geometry/delta-remove.mjs +1 -0
- package/dist/es/projection/geometry/delta-remove.mjs.map +1 -0
- package/dist/es/projection/geometry/models.mjs +1 -0
- package/dist/es/projection/geometry/models.mjs.map +1 -0
- package/dist/es/projection/geometry/utils.mjs +1 -0
- package/dist/es/projection/geometry/utils.mjs.map +1 -0
- package/dist/es/projection/node/DocumentProjectionNode.mjs +1 -0
- package/dist/es/projection/node/DocumentProjectionNode.mjs.map +1 -0
- package/dist/es/projection/node/HTMLProjectionNode.mjs +1 -0
- package/dist/es/projection/node/HTMLProjectionNode.mjs.map +1 -0
- package/dist/es/projection/node/create-projection-node.mjs +2 -1
- package/dist/es/projection/node/create-projection-node.mjs.map +1 -0
- package/dist/es/projection/node/group.mjs +1 -0
- package/dist/es/projection/node/group.mjs.map +1 -0
- package/dist/es/projection/node/state.mjs +1 -0
- package/dist/es/projection/node/state.mjs.map +1 -0
- package/dist/es/projection/shared/stack.mjs +1 -0
- package/dist/es/projection/shared/stack.mjs.map +1 -0
- package/dist/es/projection/styles/scale-border-radius.mjs +1 -0
- package/dist/es/projection/styles/scale-border-radius.mjs.map +1 -0
- package/dist/es/projection/styles/scale-box-shadow.mjs +1 -0
- package/dist/es/projection/styles/scale-box-shadow.mjs.map +1 -0
- package/dist/es/projection/styles/scale-correction.mjs +1 -0
- package/dist/es/projection/styles/scale-correction.mjs.map +1 -0
- package/dist/es/projection/styles/transform.mjs +1 -0
- package/dist/es/projection/styles/transform.mjs.map +1 -0
- package/dist/es/projection/use-instant-layout-transition.mjs +1 -0
- package/dist/es/projection/use-instant-layout-transition.mjs.map +1 -0
- package/dist/es/projection/use-reset-projection.mjs +1 -0
- package/dist/es/projection/use-reset-projection.mjs.map +1 -0
- package/dist/es/projection/utils/each-axis.mjs +1 -0
- package/dist/es/projection/utils/each-axis.mjs.map +1 -0
- package/dist/es/projection/utils/has-transform.mjs +1 -0
- package/dist/es/projection/utils/has-transform.mjs.map +1 -0
- package/dist/es/projection/utils/measure.mjs +1 -0
- package/dist/es/projection/utils/measure.mjs.map +1 -0
- package/dist/es/projection.mjs +1 -0
- package/dist/es/projection.mjs.map +1 -0
- package/dist/es/render/VisualElement.mjs +1 -0
- package/dist/es/render/VisualElement.mjs.map +1 -0
- package/dist/es/render/components/create-proxy.mjs +1 -0
- package/dist/es/render/components/create-proxy.mjs.map +1 -0
- package/dist/es/render/components/m/create.mjs +1 -0
- package/dist/es/render/components/m/create.mjs.map +1 -0
- package/dist/es/render/components/m/elements.mjs +1 -0
- package/dist/es/render/components/m/elements.mjs.map +1 -0
- package/dist/es/render/components/m/proxy.mjs +1 -0
- package/dist/es/render/components/m/proxy.mjs.map +1 -0
- package/dist/es/render/components/motion/create.mjs +1 -0
- package/dist/es/render/components/motion/create.mjs.map +1 -0
- package/dist/es/render/components/motion/elements.mjs +1 -0
- package/dist/es/render/components/motion/elements.mjs.map +1 -0
- package/dist/es/render/components/motion/feature-bundle.mjs +1 -0
- package/dist/es/render/components/motion/feature-bundle.mjs.map +1 -0
- package/dist/es/render/components/motion/proxy.mjs +1 -0
- package/dist/es/render/components/motion/proxy.mjs.map +1 -0
- package/dist/es/render/dom/DOMVisualElement.mjs +1 -0
- package/dist/es/render/dom/DOMVisualElement.mjs.map +1 -0
- package/dist/es/render/dom/create-visual-element.mjs +1 -0
- package/dist/es/render/dom/create-visual-element.mjs.map +1 -0
- package/dist/es/render/dom/features-animation.mjs +1 -0
- package/dist/es/render/dom/features-animation.mjs.map +1 -0
- package/dist/es/render/dom/features-max.mjs +1 -0
- package/dist/es/render/dom/features-max.mjs.map +1 -0
- package/dist/es/render/dom/features-min.mjs +1 -0
- package/dist/es/render/dom/features-min.mjs.map +1 -0
- package/dist/es/render/dom/scroll/attach-animation.mjs +1 -0
- package/dist/es/render/dom/scroll/attach-animation.mjs.map +1 -0
- package/dist/es/render/dom/scroll/attach-function.mjs +1 -0
- package/dist/es/render/dom/scroll/attach-function.mjs.map +1 -0
- package/dist/es/render/dom/scroll/index.mjs +1 -0
- package/dist/es/render/dom/scroll/index.mjs.map +1 -0
- package/dist/es/render/dom/scroll/info.mjs +1 -0
- package/dist/es/render/dom/scroll/info.mjs.map +1 -0
- package/dist/es/render/dom/scroll/offsets/edge.mjs +1 -0
- package/dist/es/render/dom/scroll/offsets/edge.mjs.map +1 -0
- package/dist/es/render/dom/scroll/offsets/index.mjs +1 -0
- package/dist/es/render/dom/scroll/offsets/index.mjs.map +1 -0
- package/dist/es/render/dom/scroll/offsets/inset.mjs +1 -0
- package/dist/es/render/dom/scroll/offsets/inset.mjs.map +1 -0
- package/dist/es/render/dom/scroll/offsets/offset.mjs +1 -0
- package/dist/es/render/dom/scroll/offsets/offset.mjs.map +1 -0
- package/dist/es/render/dom/scroll/offsets/presets.mjs +1 -0
- package/dist/es/render/dom/scroll/offsets/presets.mjs.map +1 -0
- package/dist/es/render/dom/scroll/on-scroll-handler.mjs +1 -0
- package/dist/es/render/dom/scroll/on-scroll-handler.mjs.map +1 -0
- package/dist/es/render/dom/scroll/track.mjs +1 -0
- package/dist/es/render/dom/scroll/track.mjs.map +1 -0
- package/dist/es/render/dom/scroll/utils/get-timeline.mjs +1 -0
- package/dist/es/render/dom/scroll/utils/get-timeline.mjs.map +1 -0
- package/dist/es/render/dom/use-render.mjs +1 -0
- package/dist/es/render/dom/use-render.mjs.map +1 -0
- package/dist/es/render/dom/utils/camel-to-dash.mjs +1 -0
- package/dist/es/render/dom/utils/camel-to-dash.mjs.map +1 -0
- package/dist/es/render/dom/utils/filter-props.mjs +1 -0
- package/dist/es/render/dom/utils/filter-props.mjs.map +1 -0
- package/dist/es/render/dom/utils/is-svg-component.mjs +1 -0
- package/dist/es/render/dom/utils/is-svg-component.mjs.map +1 -0
- package/dist/es/render/dom/viewport/index.mjs +1 -0
- package/dist/es/render/dom/viewport/index.mjs.map +1 -0
- package/dist/es/render/html/HTMLVisualElement.mjs +1 -0
- package/dist/es/render/html/HTMLVisualElement.mjs.map +1 -0
- package/dist/es/render/html/use-html-visual-state.mjs +1 -0
- package/dist/es/render/html/use-html-visual-state.mjs.map +1 -0
- package/dist/es/render/html/use-props.mjs +1 -0
- package/dist/es/render/html/use-props.mjs.map +1 -0
- package/dist/es/render/html/utils/build-styles.mjs +1 -0
- package/dist/es/render/html/utils/build-styles.mjs.map +1 -0
- package/dist/es/render/html/utils/build-transform.mjs +1 -0
- package/dist/es/render/html/utils/build-transform.mjs.map +1 -0
- package/dist/es/render/html/utils/create-render-state.mjs +1 -0
- package/dist/es/render/html/utils/create-render-state.mjs.map +1 -0
- package/dist/es/render/html/utils/render.mjs +1 -0
- package/dist/es/render/html/utils/render.mjs.map +1 -0
- package/dist/es/render/html/utils/scrape-motion-values.mjs +1 -0
- package/dist/es/render/html/utils/scrape-motion-values.mjs.map +1 -0
- package/dist/es/render/object/ObjectVisualElement.mjs +1 -0
- package/dist/es/render/object/ObjectVisualElement.mjs.map +1 -0
- package/dist/es/render/store.mjs +1 -0
- package/dist/es/render/store.mjs.map +1 -0
- package/dist/es/render/svg/SVGVisualElement.mjs +1 -0
- package/dist/es/render/svg/SVGVisualElement.mjs.map +1 -0
- package/dist/es/render/svg/lowercase-elements.mjs +1 -0
- package/dist/es/render/svg/lowercase-elements.mjs.map +1 -0
- package/dist/es/render/svg/use-props.mjs +1 -0
- package/dist/es/render/svg/use-props.mjs.map +1 -0
- package/dist/es/render/svg/use-svg-visual-state.mjs +1 -0
- package/dist/es/render/svg/use-svg-visual-state.mjs.map +1 -0
- package/dist/es/render/svg/utils/build-attrs.mjs +1 -0
- package/dist/es/render/svg/utils/build-attrs.mjs.map +1 -0
- package/dist/es/render/svg/utils/camel-case-attrs.mjs +1 -0
- package/dist/es/render/svg/utils/camel-case-attrs.mjs.map +1 -0
- package/dist/es/render/svg/utils/create-render-state.mjs +1 -0
- package/dist/es/render/svg/utils/create-render-state.mjs.map +1 -0
- package/dist/es/render/svg/utils/is-svg-tag.mjs +1 -0
- package/dist/es/render/svg/utils/is-svg-tag.mjs.map +1 -0
- package/dist/es/render/svg/utils/path.mjs +1 -0
- package/dist/es/render/svg/utils/path.mjs.map +1 -0
- package/dist/es/render/svg/utils/render.mjs +1 -0
- package/dist/es/render/svg/utils/render.mjs.map +1 -0
- package/dist/es/render/svg/utils/scrape-motion-values.mjs +1 -0
- package/dist/es/render/svg/utils/scrape-motion-values.mjs.map +1 -0
- package/dist/es/render/utils/animation-state.mjs +1 -0
- package/dist/es/render/utils/animation-state.mjs.map +1 -0
- package/dist/es/render/utils/compare-by-depth.mjs +1 -0
- package/dist/es/render/utils/compare-by-depth.mjs.map +1 -0
- package/dist/es/render/utils/flat-tree.mjs +1 -0
- package/dist/es/render/utils/flat-tree.mjs.map +1 -0
- package/dist/es/render/utils/get-variant-context.mjs +1 -0
- package/dist/es/render/utils/get-variant-context.mjs.map +1 -0
- package/dist/es/render/utils/is-controlling-variants.mjs +1 -0
- package/dist/es/render/utils/is-controlling-variants.mjs.map +1 -0
- package/dist/es/render/utils/is-variant-label.mjs +1 -0
- package/dist/es/render/utils/is-variant-label.mjs.map +1 -0
- package/dist/es/render/utils/motion-values.mjs +1 -0
- package/dist/es/render/utils/motion-values.mjs.map +1 -0
- package/dist/es/render/utils/resolve-dynamic-variants.mjs +1 -0
- package/dist/es/render/utils/resolve-dynamic-variants.mjs.map +1 -0
- package/dist/es/render/utils/resolve-variants.mjs +1 -0
- package/dist/es/render/utils/resolve-variants.mjs.map +1 -0
- package/dist/es/render/utils/setters.mjs +1 -0
- package/dist/es/render/utils/setters.mjs.map +1 -0
- package/dist/es/render/utils/variant-props.mjs +1 -0
- package/dist/es/render/utils/variant-props.mjs.map +1 -0
- package/dist/es/utils/delay.mjs +1 -0
- package/dist/es/utils/delay.mjs.map +1 -0
- package/dist/es/utils/distance.mjs +1 -0
- package/dist/es/utils/distance.mjs.map +1 -0
- package/dist/es/utils/get-context-window.mjs +1 -0
- package/dist/es/utils/get-context-window.mjs.map +1 -0
- package/dist/es/utils/is-browser.mjs +1 -0
- package/dist/es/utils/is-browser.mjs.map +1 -0
- package/dist/es/utils/is-ref-object.mjs +1 -0
- package/dist/es/utils/is-ref-object.mjs.map +1 -0
- package/dist/es/utils/reduced-motion/index.mjs +1 -0
- package/dist/es/utils/reduced-motion/index.mjs.map +1 -0
- package/dist/es/utils/reduced-motion/state.mjs +1 -0
- package/dist/es/utils/reduced-motion/state.mjs.map +1 -0
- package/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs +1 -0
- package/dist/es/utils/reduced-motion/use-reduced-motion-config.mjs.map +1 -0
- package/dist/es/utils/reduced-motion/use-reduced-motion.mjs +1 -0
- package/dist/es/utils/reduced-motion/use-reduced-motion.mjs.map +1 -0
- package/dist/es/utils/shallow-compare.mjs +1 -0
- package/dist/es/utils/shallow-compare.mjs.map +1 -0
- package/dist/es/utils/use-animation-frame.mjs +1 -0
- package/dist/es/utils/use-animation-frame.mjs.map +1 -0
- package/dist/es/utils/use-composed-ref.mjs +1 -0
- package/dist/es/utils/use-composed-ref.mjs.map +1 -0
- package/dist/es/utils/use-constant.mjs +1 -0
- package/dist/es/utils/use-constant.mjs.map +1 -0
- package/dist/es/utils/use-cycle.mjs +1 -0
- package/dist/es/utils/use-cycle.mjs.map +1 -0
- package/dist/es/utils/use-force-update.mjs +1 -0
- package/dist/es/utils/use-force-update.mjs.map +1 -0
- package/dist/es/utils/use-in-view.mjs +1 -0
- package/dist/es/utils/use-in-view.mjs.map +1 -0
- package/dist/es/utils/use-instant-transition.mjs +1 -0
- package/dist/es/utils/use-instant-transition.mjs.map +1 -0
- package/dist/es/utils/use-is-mounted.mjs +1 -0
- package/dist/es/utils/use-is-mounted.mjs.map +1 -0
- package/dist/es/utils/use-isomorphic-effect.mjs +1 -0
- package/dist/es/utils/use-isomorphic-effect.mjs.map +1 -0
- package/dist/es/utils/use-motion-value-event.mjs +1 -0
- package/dist/es/utils/use-motion-value-event.mjs.map +1 -0
- package/dist/es/utils/use-page-in-view.mjs +1 -0
- package/dist/es/utils/use-page-in-view.mjs.map +1 -0
- package/dist/es/utils/use-unmount-effect.mjs +1 -0
- package/dist/es/utils/use-unmount-effect.mjs.map +1 -0
- package/dist/es/value/scroll/use-element-scroll.mjs +1 -0
- package/dist/es/value/scroll/use-element-scroll.mjs.map +1 -0
- package/dist/es/value/scroll/use-viewport-scroll.mjs +1 -0
- package/dist/es/value/scroll/use-viewport-scroll.mjs.map +1 -0
- package/dist/es/value/use-combine-values.mjs +1 -0
- package/dist/es/value/use-combine-values.mjs.map +1 -0
- package/dist/es/value/use-computed.mjs +1 -0
- package/dist/es/value/use-computed.mjs.map +1 -0
- package/dist/es/value/use-inverted-scale.mjs +1 -0
- package/dist/es/value/use-inverted-scale.mjs.map +1 -0
- package/dist/es/value/use-motion-template.mjs +1 -0
- package/dist/es/value/use-motion-template.mjs.map +1 -0
- package/dist/es/value/use-motion-value.mjs +1 -0
- package/dist/es/value/use-motion-value.mjs.map +1 -0
- package/dist/es/value/use-scroll.mjs +1 -0
- package/dist/es/value/use-scroll.mjs.map +1 -0
- package/dist/es/value/use-spring.mjs +1 -0
- package/dist/es/value/use-spring.mjs.map +1 -0
- package/dist/es/value/use-time.mjs +1 -0
- package/dist/es/value/use-time.mjs.map +1 -0
- package/dist/es/value/use-transform.mjs +1 -0
- package/dist/es/value/use-transform.mjs.map +1 -0
- package/dist/es/value/use-velocity.mjs +1 -0
- package/dist/es/value/use-velocity.mjs.map +1 -0
- package/dist/es/value/use-will-change/WillChangeMotionValue.mjs +1 -0
- package/dist/es/value/use-will-change/WillChangeMotionValue.mjs.map +1 -0
- package/dist/es/value/use-will-change/add-will-change.mjs +1 -0
- package/dist/es/value/use-will-change/add-will-change.mjs.map +1 -0
- package/dist/es/value/use-will-change/index.mjs +1 -0
- package/dist/es/value/use-will-change/index.mjs.map +1 -0
- package/dist/es/value/use-will-change/is.mjs +1 -0
- package/dist/es/value/use-will-change/is.mjs.map +1 -0
- package/dist/es/value/utils/resolve-motion-value.mjs +1 -0
- package/dist/es/value/utils/resolve-motion-value.mjs.map +1 -0
- package/dist/framer-motion.dev.js +28 -5
- package/dist/framer-motion.js +1 -1
- package/dist/m.d.ts +1 -1
- package/dist/mini.js +1 -1
- package/dist/size-rollup-animate.js +2 -1
- package/dist/size-rollup-animate.js.map +1 -0
- package/dist/size-rollup-dom-animation-assets.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max-assets.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-m.js +1 -0
- package/dist/size-rollup-m.js.map +1 -0
- package/dist/size-rollup-motion.js +2 -1
- package/dist/size-rollup-motion.js.map +1 -0
- package/dist/size-rollup-scroll.js +2 -1
- package/dist/size-rollup-scroll.js.map +1 -0
- package/dist/size-rollup-waapi-animate.js +2 -1
- package/dist/size-rollup-waapi-animate.js.map +1 -0
- package/dist/types/client.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/{types.d-DagZKalS.d.ts → types.d-C8SDx5n-.d.ts} +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as t,t as e,u as i,v as n,w as s,x as o,y as r,z as a,A as l,B as h,C as u,D as c,E as d,F as p,G as m,H as f,I as y,J as g,K as v,b as x,m as T,o as P,r as w,M as S,n as A,i as V,h as E,p as b,k as M,N as D,d as C,s as k,P as R,L,S as j,a as B,O as F,j as I,Q as O,R as U,l as N,e as K,f as W,g as z}from"./size-rollup-dom-max-assets.js";import{jsx as $}from"react/jsx-runtime";import{useContext as Y,useId as X,useEffect as H,useCallback as G,Component as q,Fragment as _}from"react";function Z(t,e){-1===t.indexOf(e)&&t.push(e)}function J(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}const Q={},tt=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function et(t){return"object"==typeof t&&null!==t}const it=t=>/^0[^.\s]+$/u.test(t);function nt(t){let e;return()=>(void 0===e&&(e=t()),e)}const st=t=>t,ot=(t,e)=>i=>e(t(i)),rt=(...t)=>t.reduce(ot),at=(t,e,i)=>{const n=e-t;return 0===n?1:(i-t)/n};class lt{constructor(){this.subscriptions=[]}add(t){return Z(this.subscriptions,t),()=>J(this.subscriptions,t)}notify(t,e,i){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,i);else for(let s=0;s<n;s++){const n=this.subscriptions[s];n&&n(t,e,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ht=t=>1e3*t,ut=t=>t/1e3;function ct(t,e){return e?t*(1e3/e):0}const dt=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function pt(t,e,i,n){if(t===e&&i===n)return st;const s=e=>function(t,e,i,n,s){let o,r,a=0;do{r=e+(i-e)/2,o=dt(r,n,s)-t,o>0?i=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,i);return t=>0===t||1===t?t:dt(s(t),e,n)}const mt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ft=t=>e=>1-t(1-e),yt=pt(.33,1.53,.69,.99),gt=ft(yt),vt=mt(gt),xt=t=>(t*=2)<1?.5*gt(t):.5*(2-Math.pow(2,-10*(t-1))),Tt=t=>1-Math.sin(Math.acos(t)),Pt=ft(Tt),wt=mt(Tt),St=pt(.42,0,1,1),At=pt(0,0,.58,1),Vt=pt(.42,0,.58,1),Et=t=>Array.isArray(t)&&"number"==typeof t[0],bt={linear:st,easeIn:St,easeInOut:Vt,easeOut:At,circIn:Tt,circInOut:wt,circOut:Pt,backIn:gt,backInOut:vt,backOut:yt,anticipate:xt},Mt=t=>{if(Et(t)){t.length;const[e,i,n,s]=t;return pt(e,i,n,s)}return"string"==typeof t?bt[t]:t},Dt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Ct={value:null,addProjectionMetrics:null};function kt(t,e){let i=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>i=!0,r=Dt.reduce((t,i)=>(t[i]=function(t,e){let i=new Set,n=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function h(e){r.has(e)&&(u.schedule(e),t()),l++,e(a)}const u={schedule:(t,e=!1,o=!1)=>{const a=o&&s?i:n;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[i,n]=[n,i],i.forEach(h),e&&Ct.value&&Ct.value.frameloop[e].push(l),l=0,i.clear(),s=!1,o&&(o=!1,u.process(t)))}};return u}(o,e?i:void 0),t),{}),{setup:a,read:l,resolveKeyframes:h,preUpdate:u,update:c,preRender:d,render:p,postRender:m}=r,f=()=>{const o=Q.useManualTiming?s.timestamp:performance.now();i=!1,Q.useManualTiming||(s.delta=n?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),h.process(s),u.process(s),c.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,i&&e&&(n=!1,t(f))};return{schedule:Dt.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(i||(i=!0,n=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<Dt.length;e++)r[Dt[e]].cancel(t)},state:s,steps:r}}const{schedule:Rt,cancel:Lt,state:jt,steps:Bt}=kt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:st,!0);let Ft;function It(){Ft=void 0}const Ot={now:()=>(void 0===Ft&&Ot.set(jt.isProcessing||Q.useManualTiming?jt.timestamp:performance.now()),Ft),set:t=>{Ft=t,queueMicrotask(It)}};function Ut(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function Nt(t,e){return i=>i>0?e:t}const Kt=(t,e,i)=>{const n=t*t,s=i*(e*e-n)+n;return s<0?0:Math.sqrt(s)},Wt=[n,e,i];function zt(t){const e=(n=t,Wt.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let s=e.parse(t);return e===i&&(s=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let s=0,o=0,r=0;if(e/=100){const n=i<.5?i*(1+e):i+e-i*e,a=2*i-n;s=Ut(a,n,t+1/3),o=Ut(a,n,t),r=Ut(a,n,t-1/3)}else s=o=r=i;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:n}}(s)),s}const $t=(i,n)=>{const s=zt(i),o=zt(n);if(!s||!o)return Nt(i,n);const r={...s};return i=>(r.red=Kt(s.red,o.red,i),r.green=Kt(s.green,o.green,i),r.blue=Kt(s.blue,o.blue,i),r.alpha=t(s.alpha,o.alpha,i),e.transform(r))},Yt=new Set(["none","hidden"]);function Xt(e,i){return n=>t(e,i,n)}function Ht(t){return"number"==typeof t?Xt:"string"==typeof t?s(t)?Nt:o.test(t)?$t:_t:Array.isArray(t)?Gt:"object"==typeof t?o.test(t)?$t:qt:Nt}function Gt(t,e){const i=[...t],n=i.length,s=t.map((t,i)=>Ht(t)(t,e[i]));return t=>{for(let e=0;e<n;e++)i[e]=s[e](t);return i}}function qt(t,e){const i={...t,...e},n={};for(const s in i)void 0!==t[s]&&void 0!==e[s]&&(n[s]=Ht(t[s])(t[s],e[s]));return t=>{for(const e in n)i[e]=n[e](t);return i}}const _t=(t,e)=>{const i=r.createTransformer(e),n=a(t),s=a(e);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?Yt.has(t)&&!s.values.length||Yt.has(e)&&!n.values.length?function(t,e){return Yt.has(t)?i=>i<=0?t:e:i=>i>=1?e:t}(t,e):rt(Gt(function(t,e){const i=[],n={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][n[o]],a=t.values[r]??0;i[s]=a,n[o]++}return i}(n,s),s.values),i):Nt(t,e)};function Zt(e,i,n){if("number"==typeof e&&"number"==typeof i&&"number"==typeof n)return t(e,i,n);return Ht(e)(e,i)}const Jt=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Rt.update(e,t),stop:()=>Lt(e),now:()=>jt.isProcessing?jt.timestamp:Ot.now()}},Qt=(t,e,i=10)=>{let n="";const s=Math.max(Math.round(e/i),2);for(let e=0;e<s;e++)n+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},te=2e4;function ee(t){let e=0;let i=t.next(e);for(;!i.done&&e<te;)e+=50,i=t.next(e);return e>=te?1/0:e}function ie(t,e,i){const n=Math.max(e-5,0);return ct(i-t(n),e-n)}const ne=100,se=10,oe=1,re=0,ae=800,le=.3,he=.3,ue={granular:.01,default:2},ce={granular:.005,default:.5},de=.01,pe=10,me=.05,fe=1,ye=.001;function ge({duration:t=ae,bounce:e=le,velocity:i=re,mass:n=oe}){let s,o,r=1-e;r=l(me,fe,r),t=l(de,pe,ut(t)),r<1?(s=e=>{const n=e*r,s=n*t,o=n-i,a=xe(e,r),l=Math.exp(-s);return ye-o/a*l},o=e=>{const n=e*r*t,o=n*i+i,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-n),h=xe(Math.pow(e,2),r);return(-s(e)+ye>0?-1:1)*((o-a)*l)/h}):(s=e=>Math.exp(-e*t)*((e-i)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(i-e)));const a=function(t,e,i){let n=i;for(let i=1;i<ve;i++)n-=t(n)/e(n);return n}(s,o,5/t);if(t=ht(t),isNaN(a))return{stiffness:ne,damping:se,duration:t};{const e=Math.pow(a,2)*n;return{stiffness:e,damping:2*r*Math.sqrt(n*e),duration:t}}}const ve=12;function xe(t,e){return t*Math.sqrt(1-e*e)}const Te=["duration","bounce"],Pe=["stiffness","damping","mass"];function we(t,e){return e.some(e=>void 0!==t[e])}function Se(t=he,e=le){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:n,restDelta:s}=i;const o=i.keyframes[0],r=i.keyframes[i.keyframes.length-1],a={done:!1,value:o},{stiffness:h,damping:u,mass:c,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:re,stiffness:ne,damping:se,mass:oe,isResolvedFromDuration:!1,...t};if(!we(t,Pe)&&we(t,Te))if(t.visualDuration){const i=t.visualDuration,n=2*Math.PI/(1.2*i),s=n*n,o=2*l(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:oe,stiffness:s,damping:o}}else{const i=ge(t);e={...e,...i,mass:oe},e.isResolvedFromDuration=!0}return e}({...i,velocity:-ut(i.velocity||0)}),f=p||0,y=u/(2*Math.sqrt(h*c)),g=r-o,v=ut(Math.sqrt(h/c)),x=Math.abs(g)<5;let T;if(n||(n=x?ue.granular:ue.default),s||(s=x?ce.granular:ce.default),y<1){const t=xe(v,y);T=e=>{const i=Math.exp(-y*v*e);return r-i*((f+y*v*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===y)T=t=>r-Math.exp(-v*t)*(g+(f+v*g)*t);else{const t=v*Math.sqrt(y*y-1);T=e=>{const i=Math.exp(-y*v*e),n=Math.min(t*e,300);return r-i*((f+y*v*g)*Math.sinh(n)+t*g*Math.cosh(n))/t}}const P={calculatedDuration:m&&d||null,next:t=>{const e=T(t);if(m)a.done=t>=d;else{let i=0===t?f:0;y<1&&(i=0===t?ht(f):ie(T,t,e));const o=Math.abs(i)<=n,l=Math.abs(r-e)<=s;a.done=o&&l}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(ee(P),te),e=Qt(e=>P.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return P}function Ae({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:h=.5,restSpeed:u}){const c=t[0],d={done:!1,value:c},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=i*e;const f=c+m,y=void 0===r?f:r(f);y!==f&&(m=y-c);const g=t=>-m*Math.exp(-t/n),v=t=>y+g(t),x=t=>{const e=g(t),i=v(t);d.done=Math.abs(e)<=h,d.value=d.done?y:i};let T,P;const w=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(T=t,P=Se({keyframes:[d.value,p(d.value)],velocity:ie(v,t,d.value),damping:s,stiffness:o,restDelta:h,restSpeed:u}))};return w(0),{calculatedDuration:null,next:t=>{let e=!1;return P||void 0!==T||(e=!0,x(t),w(t)),void 0!==T&&t>=T?P.next(t-T):(!e&&x(t),d)}}}function Ve(t,e,{clamp:i=!0,ease:n,mixer:s}={}){const o=t.length;if(e.length,1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,i){const n=[],s=i||Q.mix||Zt,o=t.length-1;for(let i=0;i<o;i++){let o=s(t[i],t[i+1]);if(e){const t=Array.isArray(e)?e[i]||st:e;o=rt(t,o)}n.push(o)}return n}(e,n,s),h=a.length,u=i=>{if(r&&i<t[0])return e[0];let n=0;if(h>1)for(;n<t.length-2&&!(i<t[n+1]);n++);const s=at(t[n],t[n+1],i);return a[n](s)};return i?e=>u(l(t[0],t[o-1],e)):u}function Ee(e){const i=[0];return function(e,i){const n=e[e.length-1];for(let s=1;s<=i;s++){const o=at(0,i,s);e.push(t(n,1,o))}}(i,e.length-1),i}function be({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(n)?n.map(Mt):Mt(n),o={done:!1,value:e[0]},r=function(t,e){return t.map(t=>t*e)}(i&&i.length===e.length?i:Ee(e),t),a=Ve(r,e,{ease:Array.isArray(s)?s:(l=e,h=s,l.map(()=>h||Vt).splice(0,l.length-1))});var l,h;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}Se.applyToOptions=t=>{const e=function(t,e=100,i){const n=i({...t,keyframes:[0,e]}),s=Math.min(ee(n),te);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:ut(s)}}(t,100,Se);return t.ease=e.ease,t.duration=ht(e.duration),t.type="keyframes",t};const Me=t=>null!==t;function De(t,{repeat:e,repeatType:i="loop"},n,s=1){const o=t.filter(Me),r=s<0||e&&"loop"!==i&&e%2==1?0:o.length-1;return r&&void 0!==n?n:o[r]}const Ce={decay:Ae,inertia:Ae,tween:be,keyframes:be,spring:Se};function ke(t){"string"==typeof t.type&&(t.type=Ce[t.type])}class Re{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Le=t=>t/100;class je extends Re{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==Ot.now()&&this.tick(Ot.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;ke(t);const{type:e=be,repeat:i=0,repeatDelay:n=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||be;a!==be&&"number"!=typeof r[0]&&(this.mixKeyframes=rt(Le,Zt(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=ee(l));const{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:i,totalDuration:n,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return i.next(0);const{delay:h=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-h*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>n;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let x=this.currentTime,T=i;if(c){const t=Math.min(this.currentTime,n)/r;let e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===d?(i=1-i,p&&(i-=p/r)):"mirror"===d&&(T=o)),x=l(0,1,i)*r}const P=v?{done:!1,value:u[0]}:T.next(x);s&&(P.value=s(P.value));let{done:w}=P;v||null===a||(w=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&m!==Ae&&(P.value=De(u,this.options,y,this.speed)),f&&f(P.value),S&&this.finish(),P}then(t,e){return this.finished.then(t,e)}get duration(){return ut(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ut(t)}get time(){return ut(this.currentTime)}set time(t){t=ht(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Ot.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=ut(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Jt,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Ot.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Be=t=>180*t/Math.PI,Fe=t=>{const e=Be(Math.atan2(t[1],t[0]));return Oe(e)},Ie={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Fe,rotateZ:Fe,skewX:t=>Be(Math.atan(t[1])),skewY:t=>Be(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Oe=t=>((t%=360)<0&&(t+=360),t),Ue=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ne=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ke={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ue,scaleY:Ne,scale:t=>(Ue(t)+Ne(t))/2,rotateX:t=>Oe(Be(Math.atan2(t[6],t[5]))),rotateY:t=>Oe(Be(Math.atan2(-t[2],t[0]))),rotateZ:Fe,rotate:Fe,skewX:t=>Be(Math.atan(t[4])),skewY:t=>Be(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function We(t){return t.includes("scale")?1:0}function ze(t,e){if(!t||"none"===t)return We(e);const i=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(i)n=Ke,s=i;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=Ie,s=e}if(!s)return We(e);const o=n[e],r=s[1].split(",").map($e);return"function"==typeof o?o(r):r[o]}function $e(t){return parseFloat(t.trim())}const Ye=t=>t===h||t===u,Xe=new Set(["x","y","z"]),He=c.filter(t=>!Xe.has(t));const Ge={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),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:(t,{transform:e})=>ze(e,"x"),y:(t,{transform:e})=>ze(e,"y")};Ge.translateX=Ge.x,Ge.translateY=Ge.y;const qe=new Set;let _e=!1,Ze=!1,Je=!1;function Qe(){if(Ze){const t=Array.from(qe).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{const e=function(t){const e=[];return He.forEach(i=>{const n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(i.startsWith("scale")?1:0))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}Ze=!1,_e=!1,qe.forEach(t=>t.complete(Je)),qe.clear()}function ti(){qe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ze=!0)})}class ei{constructor(t,e,i,n,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(qe.add(this),_e||(_e=!0,Rt.read(ti),Rt.resolveKeyframes(Qe))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;if(null===t[0]){const s=n?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(i&&e){const n=i.readValue(e,o);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=o),n&&void 0===s&&n.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),qe.delete(this)}cancel(){"scheduled"===this.state&&(qe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const ii=nt(()=>void 0!==window.ScrollTimeline),ni={};function si(t,e){const i=nt(t);return()=>ni[e]??i()}const oi=si(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),ri=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`,ai={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ri([0,.65,.55,1]),circOut:ri([.55,0,1,.45]),backIn:ri([.31,.01,.66,-.59]),backOut:ri([.33,1.53,.69,.99])};function li(t,e){return t?"function"==typeof t?oi()?Qt(t,e):"ease-out":Et(t)?ri(t):Array.isArray(t)?t.map(t=>li(t,e)||ai.easeOut):ai[t]:void 0}function hi(t,e,i,{delay:n=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},h=void 0){const u={[e]:i};l&&(u.offset=l);const c=li(a,s);Array.isArray(c)&&(u.easing=c);const d={delay:n,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};h&&(d.pseudoElement=h);return t.animate(u,d)}function ui(t){return"function"==typeof t&&"applyToOptions"in t}class ci extends Re{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:i,keyframes:n,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,t.type;const l=function({type:t,...e}){return ui(t)&&oi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=hi(e,i,n,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=De(n,this.options,r,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,i){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,i):t.style[e]=i}(e,i,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ut(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ut(t)}get time(){return ut(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ht(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ii()?(this.animation.timeline=t,st):e(this)}}const di={anticipate:xt,backInOut:vt,circInOut:wt};function pi(t){"string"==typeof t.ease&&t.ease in di&&(t.ease=di[t.ease])}class mi extends ci{constructor(t){pi(t),ke(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:i,onComplete:n,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new je({...o,autoplay:!1}),a=ht(this.finishedTime??this.time);e.setWithVelocity(r.sample(a-10).value,r.sample(a).value,10),r.stop()}}const fi=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!r.test(t)&&"0"!==t||t.startsWith("url(")));function yi(t){t.duration=0,t.type="keyframes"}const gi=new Set(["opacity","clipPath","filter","transform"]),vi=nt(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class xi extends Re{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:h,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ot.now();const c={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:h,...u},d=h?.KeyframeResolver||ei;this.keyframeResolver=new d(r,(t,e,i)=>this.onKeyframesResolved(t,e,c,!i),a,l,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,n){this.keyframeResolver=void 0;const{name:s,type:o,velocity:r,delay:a,isHandoff:l,onUpdate:h}=i;this.resolvedAt=Ot.now(),function(t,e,i,n){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=fi(s,e),a=fi(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let i=0;i<t.length;i++)if(t[i]!==e)return!0}(t)||("spring"===i||ui(i))&&n)}(t,s,o,r)||(!Q.instantAnimations&&a||h?.(De(t,i,e)),t[0]=t[t.length-1],yi(i),i.repeat=0);const u={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},c=!l&&function(t){const{motionValue:e,name:i,repeatDelay:n,repeatType:s,damping:o,type:r}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:h}=e.owner.getProps();return vi()&&i&&gi.has(i)&&("transform"!==i||!h)&&!l&&!n&&"mirror"!==s&&0!==o&&"inertia"!==r}(u)?new mi({...u,element:u.motionValue.owner.current}):new je(u);c.finished.then(()=>this.notifyFinished()).catch(st),this.pendingTimeline&&(this.stopTimeline=c.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=c}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Je=!0,ti(),Qe(),Je=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Ti=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Pi(t,e,i=1){const[n,o]=function(t){const e=Ti.exec(t);if(!e)return[,];const[,i,n,s]=e;return[`--${i??n}`,s]}(t);if(!n)return;const r=window.getComputedStyle(e).getPropertyValue(n);if(r){const t=r.trim();return tt(t)?parseFloat(t):t}return s(o)?Pi(o,e,i+1):o}function wi(t,e){return t?.[e]??t?.default??t}const Si=new Set(["width","height","top","left","right","bottom",...c]),Ai=t=>e=>e.test(t),Vi=[h,u,d,p,m,f,{test:t=>"auto"===t,parse:t=>t}],Ei=t=>Vi.find(Ai(t));function bi(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||it(t))}const Mi=new Set(["brightness","contrast","saturate","opacity"]);function Di(t){const[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=i.match(y)||[];if(!n)return t;const s=i.replace(n,"");let o=Mi.has(e)?1:0;return n!==i&&(o*=100),e+"("+o+s+")"}const Ci=/\b([a-z-]*)\(.*?\)/gu,ki={...r,getAnimatableNone:t=>{const e=t.match(Ci);return e?e.map(Di).join(" "):t}},Ri={...g,color:o,backgroundColor:o,outlineColor:o,fill:o,stroke:o,borderColor:o,borderTopColor:o,borderRightColor:o,borderBottomColor:o,borderLeftColor:o,filter:ki,WebkitFilter:ki},Li=t=>Ri[t];function ji(t,e){let i=Li(t);return i!==ki&&(i=r),i.getAnimatableNone?i.getAnimatableNone(e):void 0}const Bi=new Set(["auto","none","0"]);class Fi extends ei{constructor(t,e,i,n,s){super(t,e,i,n,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i<t.length;i++){let n=t[i];if("string"==typeof n&&(n=n.trim(),s(n))){const s=Pi(n,e.current);void 0!==s&&(t[i]=s),i===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Si.has(i)||2!==t.length)return;const[n,o]=t,r=Ei(n),a=Ei(o);if(r!==a)if(Ye(r)&&Ye(a))for(let e=0;e<t.length;e++){const i=t[e];"string"==typeof i&&(t[e]=parseFloat(i))}else Ge[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,i=[];for(let e=0;e<t.length;e++)(null===t[e]||bi(t[e]))&&i.push(e);i.length&&function(t,e,i){let n,s=0;for(;s<t.length&&!n;){const e=t[s];"string"==typeof e&&!Bi.has(e)&&a(e).values.length&&(n=t[s]),s++}if(n&&i)for(const s of e)t[s]=ji(i,n)}(t,i,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:i}=this;if(!t||!t.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ge[i](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const n=e[e.length-1];void 0!==n&&t.getValue(i,n).jump(n,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const n=t.getValue(e);n&&n.jump(this.measuredOrigin,!1);const s=i.length-1,o=i[s];i[s]=Ge[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,i])=>{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}class Ii{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=Ot.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Ot.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new lt);const i=this.events[t].add(e);return"change"===t?()=>{i(),Rt.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ot.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ct(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Oi(t,e){return new Ii(t,e)}const{schedule:Ui,cancel:Ni}=kt(queueMicrotask,!1),Ki={x:!1,y:!1};function Wi(){return Ki.x||Ki.y}function zi(t,e){const i=function(t){if(t instanceof EventTarget)return[t];if("string"==typeof t){const e=document.querySelectorAll(t);return e?Array.from(e):[]}return Array.from(t)}(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},()=>n.abort()]}function $i(t){return!("touch"===t.pointerType||Wi())}const Yi=(t,e)=>!!e&&(t===e||Yi(t,e.parentElement)),Xi=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Hi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Gi=new WeakSet;function qi(t){return e=>{"Enter"===e.key&&t(e)}}function _i(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function Zi(t){return Xi(t)&&!Wi()}function Ji(t,e,i={}){const[n,s,o]=zi(t,i),r=t=>{const n=t.currentTarget;if(!Zi(t))return;Gi.add(n);const o=e(n,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Gi.has(n)&&Gi.delete(n),Zi(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,n===window||n===document||i.useGlobalTarget||Yi(n,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return n.forEach(t=>{var e;(i.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),et(e=t)&&"offsetHeight"in e&&(t.addEventListener("focus",t=>((t,e)=>{const i=t.currentTarget;if(!i)return;const n=qi(()=>{if(Gi.has(i))return;_i(i,"down");const t=qi(()=>{_i(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>_i(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)})(t,s)),function(t){return Hi.has(t.tagName)||-1!==t.tabIndex}(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function Qi(t){return et(t)&&"ownerSVGElement"in t}const tn=[...Vi,o,r];class en{constructor(t){this.isMounted=!1,this.node=t}update(){}}const nn=t=>null!==t;const sn={type:"spring",stiffness:500,damping:25,restSpeed:10},on={type:"keyframes",duration:.8},rn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},an=(t,{keyframes:e})=>e.length>2?on:v.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:sn:rn;const ln=(t,e,i,n={},s,o)=>r=>{const a=wi(n,t)||{},l=a.delay||n.delay||0;let{elapsed:h=0}=n;h-=ht(l);const u={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:i,staggerChildren:n,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:h,...u}){return!!Object.keys(u).length})(a)||Object.assign(u,an(t,u)),u.duration&&(u.duration=ht(u.duration)),u.repeatDelay&&(u.repeatDelay=ht(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let c=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(yi(u),0===u.delay&&(c=!0)),(Q.instantAnimations||Q.skipAnimations)&&(c=!0,yi(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,c&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:i="loop"},n){const s=t.filter(nn),o=e&&"loop"!==i&&e%2==1?0:s.length-1;return o&&void 0!==n?n:s[o]}(u.keyframes,a);if(void 0!==t)return void Rt.update(()=>{u.onUpdate(t),u.onComplete()})}return a.isSync?new je(u):new xi(u)};function hn(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}function un(t){return{point:{x:t.pageX,y:t.pageY}}}function cn(t,e,i,n){return hn(t,e,(t=>e=>Xi(e)&&t(e,un(e)))(i),n)}function dn({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function pn(t){return t.max-t.min}function mn(e,i,n,s=.5){e.origin=s,e.originPoint=t(i.min,i.max,e.origin),e.scale=pn(n)/pn(i),e.translate=t(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function fn(t,e,i,n){mn(t.x,e.x,i.x,n?n.originX:void 0),mn(t.y,e.y,i.y,n?n.originY:void 0)}function yn(t,e,i){t.min=i.min+e.min,t.max=t.min+pn(e)}function gn(t,e,i){t.min=e.min-i.min,t.max=t.min+pn(e)}function vn(t,e,i){gn(t.x,e.x,i.x),gn(t.y,e.y,i.y)}const xn=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Tn(t){return[t("x"),t("y")]}function Pn(t){return void 0===t||1===t}function wn({scale:t,scaleX:e,scaleY:i}){return!Pn(t)||!Pn(e)||!Pn(i)}function Sn(t){return wn(t)||An(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function An(t){return Vn(t.x)||Vn(t.y)}function Vn(t){return t&&"0%"!==t}function En(t,e,i){return i+e*(t-i)}function bn(t,e,i,n,s){return void 0!==s&&(t=En(t,s,n)),En(t,i,n)+e}function Mn(t,e=0,i=1,n,s){t.min=bn(t.min,e,i,n,s),t.max=bn(t.max,e,i,n,s)}function Dn(t,{x:e,y:i}){Mn(t.x,e.translate,e.scale,e.originPoint),Mn(t.y,i.translate,i.scale,i.originPoint)}const Cn=.999999999999,kn=1.0000000000001;function Rn(t,e){t.min=t.min+e,t.max=t.max+e}function Ln(e,i,n,s,o=.5){Mn(e,i,n,t(e.min,e.max,o),s)}function jn(t,e){Ln(t.x,e.x,e.scaleX,e.scale,e.originX),Ln(t.y,e.y,e.scaleY,e.scale,e.originY)}function Bn(t,e){return dn(function(t,e){if(!e)return t;const i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}const Fn=({current:t})=>t?t.ownerDocument.defaultView:null;function In(t,e){const i=t.getValue("willChange");if(n=i,Boolean(x(n)&&n.add))return i.add(e);if(!i&&Q.WillChange){const i=new Q.WillChange("auto");t.addValue("willChange",i),i.add(e)}var n}const On=(t,e)=>Math.abs(t-e);class Un{constructor(t,e,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Wn(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,i=function(t,e){const i=On(t.x,e.x),n=On(t.y,e.y);return Math.sqrt(i**2+n**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!i)return;const{point:n}=t,{timestamp:s}=jt;this.history.push({...n,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Nn(e,this.transformPagePoint),Rt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:i,onSessionEnd:n,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Wn("pointercancel"===t.type?this.lastMoveEventInfo:Nn(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,o),n&&n(t,o)},!Xi(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=n||window;const r=Nn(un(t),this.transformPagePoint),{point:a}=r,{timestamp:l}=jt;this.history=[{...a,timestamp:l}];const{onSessionStart:h}=e;h&&h(t,Wn(r,this.history)),this.removeListeners=rt(cn(this.contextWindow,"pointermove",this.handlePointerMove),cn(this.contextWindow,"pointerup",this.handlePointerUp),cn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Lt(this.updatePoint)}}function Nn(t,e){return e?{point:e(t.point)}:t}function Kn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Wn({point:t},e){return{point:t,delta:Kn(t,$n(e)),offset:Kn(t,zn(e)),velocity:Yn(e,.1)}}function zn(t){return t[0]}function $n(t){return t[t.length-1]}function Yn(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null;const s=$n(t);for(;i>=0&&(n=t[i],!(s.timestamp-n.timestamp>ht(e)));)i--;if(!n)return{x:0,y:0};const o=ut(s.timestamp-n.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-n.x)/o,y:(s.y-n.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Xn(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function Hn(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,n]=[n,i]),{min:i,max:n}}const Gn=.35;function qn(t,e,i){return{min:_n(t,e),max:_n(t,i)}}function _n(t,e){return"number"==typeof t?t:t[e]||0}const Zn=new WeakMap;class Jn{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:i}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new Un(t,{onSessionStart:t=>{const{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(un(t).point)},onStart:(t,e)=>{const{drag:i,dragPropagation:n,onDragStart:s}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=i)||"y"===o?Ki[o]?null:(Ki[o]=!0,()=>{Ki[o]=!1}):Ki.x||Ki.y?null:(Ki.x=Ki.y=!0,()=>{Ki.x=Ki.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Tn(t=>{let e=this.getAxisMotionValue(t).get()||0;if(d.test(e)){const{projection:i}=this.visualElement;if(i&&i.layout){const n=i.layout.layoutBox[t];if(n){e=pn(n)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&Rt.postRender(()=>s(t,e)),In(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:i,dragDirectionLock:n,onDirectionLock:s,onDrag:o}=this.getProps();if(!i&&!this.openDragLock)return;const{offset:r}=e;if(n&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let i=null;Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x");return i}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>Tn(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:i,contextWindow:Fn(this.visualElement)})}stop(t,e){const i=t||this.latestPointerEvent,n=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!n||!i)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&Rt.postRender(()=>r(i,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(e,i,n){const{drag:s}=this.getProps();if(!n||!Qn(e,s,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(r=function(e,{min:i,max:n},s){return void 0!==i&&e<i?e=s?t(i,e,s.min):Math.max(e,i):void 0!==n&&e>n&&(e=s?t(n,e,s.max):Math.min(e,n)),e}(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&T(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(t,{top:e,left:i,bottom:n,right:s}){return{x:Xn(t.x,i,s),y:Xn(t.y,e,n)}}(i.layoutBox,t),this.elastic=function(t=Gn){return!1===t?t=0:!0===t&&(t=Gn),{x:qn(t,"left","right"),y:qn(t,"top","bottom")}}(e),n!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Tn(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!T(t))return!1;const i=t.current,{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const s=function(t,e,i){const n=Bn(t,i),{scroll:s}=e;return s&&(Rn(n.x,s.offset.x),Rn(n.y,s.offset.y)),n}(i,n.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Hn(t.x,e.x),y:Hn(t.y,e.y)}}(n.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=dn(t))}return o}startAnimation(t){const{drag:e,dragMomentum:i,dragElastic:n,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Tn(r=>{if(!Qn(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const h=n?200:1e6,u=n?40:1e7,c={type:"inertia",velocity:i?t[r]:0,bounceStiffness:h,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,c)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const i=this.getAxisMotionValue(t);return In(this.visualElement,t),i.start(ln(t,i,0,e,this.visualElement,!1))}stopAnimation(){Tn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Tn(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),n=i[e];return n||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(e){Tn(i=>{const{drag:n}=this.getProps();if(!Qn(i,n,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(i);if(s&&s.layout){const{min:n,max:r}=s.layout.layoutBox[i];o.set(e[i]-t(n,r,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:i}=this.getProps(),{projection:n}=this.visualElement;if(!T(i)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};Tn(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const i=e.get();s[t]=function(t,e){let i=.5;const n=pn(t),s=pn(e);return s>n?i=at(e.min,e.max-n,t.min):n>s&&(i=at(t.min,t.max-s,e.min)),l(0,1,i)}({min:i,max:i},this.constraints[t])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Tn(i=>{if(!Qn(i,e,null))return;const n=this.getAxisMotionValue(i),{min:o,max:r}=this.constraints[i];n.set(t(o,r,s[i]))})}addListeners(){if(!this.visualElement.current)return;Zn.set(this.visualElement,this);const t=cn(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();T(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,n=i.addEventListener("measure",e);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Rt.read(e);const s=hn(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Tn(e=>{const i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),n(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:s=!1,dragElastic:o=Gn,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Qn(t,e,i){return!(!0!==e&&e!==t||null!==i&&i!==t)}const ts=t=>(e,i)=>{t&&Rt.postRender(()=>t(e,i))};function es(t){return t.props[P]}const is=(t,e)=>t.depth-e.depth;class ns{constructor(){this.children=[],this.isDirty=!1}add(t){Z(this.children,t),this.isDirty=!0}remove(t){J(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(is),this.isDirty=!1,this.children.forEach(t)}}const ss=["TopLeft","TopRight","BottomLeft","BottomRight"],os=ss.length,rs=t=>"string"==typeof t?parseFloat(t):t,as=t=>"number"==typeof t||u.test(t);function ls(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const hs=cs(0,.5,Pt),us=cs(.5,.95,st);function cs(t,e,i){return n=>n<t?0:n>e?1:i(at(t,e,n))}function ds(t,e){t.min=e.min,t.max=e.max}function ps(t,e){ds(t.x,e.x),ds(t.y,e.y)}function ms(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function fs(t,e,i,n,s){return t=En(t-=e,1/i,n),void 0!==s&&(t=En(t,1/s,n)),t}function ys(e,i,[n,s,o],r,a){!function(e,i=0,n=1,s=.5,o,r=e,a=e){d.test(i)&&(i=parseFloat(i),i=t(a.min,a.max,i/100)-a.min);if("number"!=typeof i)return;let l=t(r.min,r.max,s);e===r&&(l-=i),e.min=fs(e.min,i,n,l,o),e.max=fs(e.max,i,n,l,o)}(e,i[n],i[s],i[o],i.scale,r,a)}const gs=["x","scaleX","originX"],vs=["y","scaleY","originY"];function xs(t,e,i,n){ys(t.x,e,gs,i?i.x:void 0,n?n.x:void 0),ys(t.y,e,vs,i?i.y:void 0,n?n.y:void 0)}function Ts(t){return 0===t.translate&&1===t.scale}function Ps(t){return Ts(t.x)&&Ts(t.y)}function ws(t,e){return t.min===e.min&&t.max===e.max}function Ss(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function As(t,e){return Ss(t.x,e.x)&&Ss(t.y,e.y)}function Vs(t){return pn(t.x)/pn(t.y)}function Es(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class bs{constructor(){this.members=[]}add(t){Z(this.members,t),t.scheduleRender()}remove(t){if(J(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let i;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){i=e;break}}return!!i&&(this.promote(i),!0)}promote(t,e){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:n}=t.options;!1===n&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Ms={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ds=["","X","Y","Z"];let Cs=0;function ks(t,e,i,n){const{latestValues:s}=e;s[t]&&(i[t]=s[t],e.setStaticValue(t,0),n&&(n[t]=0))}function Rs(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const i=es(e);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(i,"transform",Rt,!(e||n))}const{parent:n}=t;n&&!n.hasCheckedOptimisedAppear&&Rs(n)}function Ls({attachResizeListener:e,defaultParent:i,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},e=i?.()){this.id=Cs++,this.animationId=0,this.animationCommitId=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.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Fs),this.nodes.forEach(zs),this.nodes.forEach($s),this.nodes.forEach(Is)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ns)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new lt),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(t){if(this.instance)return;var i;this.isSVG=Qi(t)&&!(Qi(i=t)&&"svg"===i.tagName),this.instance=t;const{layoutId:n,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||n)&&(this.isLayoutDirty=!0),e){let i,n=0;const s=()=>this.root.updateBlockedByResize=!1;Rt.read(()=>{n=window.innerWidth}),e(t,()=>{const t=window.innerWidth;t!==n&&(n=t,this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){const i=Ot.now(),n=({timestamp:s})=>{const o=s-i;o>=e&&(Lt(n),t(o-e))};return Rt.setup(n,!0),()=>Lt(n)}(s,250),Ms.hasAnimatedSinceResize&&(Ms.hasAnimatedSinceResize=!1,this.nodes.forEach(Ws)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&o&&(n||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||_s,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!As(this.targetLayout,n),h=!e&&i;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...wi(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h)}else e||Ws(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Lt(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(Ys),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Rs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;const n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Us);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Ns);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ks),this.nodes.forEach(js),this.nodes.forEach(Bs)):this.nodes.forEach(Ns),this.clearAllSnapshots();const t=Ot.now();jt.delta=l(0,1e3/60,t-jt.timestamp),jt.timestamp=t,jt.isProcessing=!0,Bt.update.process(jt),Bt.preRender.process(jt),Bt.render.process(jt),jt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ui.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Os),this.sharedNodes.forEach(Xs)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||pn(this.snapshot.measuredBox.x)||pn(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!Ps(this.projectionDelta),i=this.getTransformTemplate(),n=i?i(this.latestValues,""):void 0,s=n!==this.prevTransformTemplateValue;t&&this.instance&&(e||Sn(this.latestValues)||s)&&(o(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let i=this.removeElementScroll(e);var n;return t&&(i=this.removeTransform(i)),Qs((n=i).x),Qs(n.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:i,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(eo))){const{scroll:t}=this.root;t&&(Rn(e.x,t.offset.x),Rn(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(ps(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){const n=this.path[i],{scroll:s,options:o}=n;n!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&ps(e,t),Rn(e.x,s.offset.x),Rn(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const i={x:{min:0,max:0},y:{min:0,max:0}};ps(i,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&jn(i,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),Sn(n.latestValues)&&jn(i,n.latestValues)}return Sn(this.latestValues)&&jn(i,this.latestValues),i}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};ps(e,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];if(!i.instance)continue;if(!Sn(i.latestValues))continue;wn(i.latestValues)&&i.updateSnapshot();const n=xn();ps(n,i.measurePageBox()),xs(e,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,n)}return Sn(this.latestValues)&&xs(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}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!==jt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:n,layoutId:s}=this.options;if(!this.layout||!n&&!s)return;this.resolvedRelativeTargetAt=jt.timestamp;const o=this.getClosestProjectingParent();var r,a,l;(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,yn(r.x,a.x,l.x),yn(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ps(this.target,this.layout.layoutBox),Dn(this.target,this.targetDelta)):ps(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!wn(this.parent.latestValues)&&!An(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,i){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},vn(this.relativeTargetOrigin,e,i),ps(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===jt.timestamp&&(i=!1),i)return;const{layout:n,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!n&&!s)return;ps(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(t,e,i,n=!1){const s=i.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=i[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&jn(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Dn(t,r)),n&&Sn(o.latestValues)&&jn(t,o.latestValues))}e.x<kn&&e.x>Cn&&(e.x=1),e.y<kn&&e.y>Cn&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(ms(this.prevProjectionDelta.x,this.projectionDelta.x),ms(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),fn(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Es(this.projectionDelta.x,this.prevProjectionDelta.x)&&Es(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,i=!1){const n=this.snapshot,s=n?n.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const a={x:{min:0,max:0},y:{min:0,max:0}},l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,c=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(qs));let p;this.animationProgress=0,this.mixTargetDelta=i=>{const n=i/1e3;var h,m,f,y,g,v;Hs(r.x,e.x,n),Hs(r.y,e.y,n),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(vn(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f=this.relativeTarget,y=this.relativeTargetOrigin,g=a,v=n,Gs(f.x,y.x,g.x,v),Gs(f.y,y.y,g.y,v),p&&(h=this.relativeTarget,m=p,ws(h.x,m.x)&&ws(h.y,m.y))&&(this.isProjectionDirty=!1),p||(p={x:{min:0,max:0},y:{min:0,max:0}}),ps(p,this.relativeTarget)),l&&(this.animationValues=o,function(e,i,n,s,o,r){o?(e.opacity=t(0,n.opacity??1,hs(s)),e.opacityExit=t(i.opacity??1,0,us(s))):r&&(e.opacity=t(i.opacity??1,n.opacity??1,s));for(let o=0;o<os;o++){const r=`border${ss[o]}Radius`;let a=ls(i,r),l=ls(n,r);void 0===a&&void 0===l||(a||(a=0),l||(l=0),0===a||0===l||as(a)===as(l)?(e[r]=Math.max(t(rs(a),rs(l),s),0),(d.test(l)||d.test(a))&&(e[r]+="%")):e[r]=l)}(i.rotate||n.rotate)&&(e.rotate=t(i.rotate||0,n.rotate||0,s))}(o,s,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Lt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Rt.update(()=>{Ms.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Oi(0)),this.currentAnimation=function(t,e,i){const n=x(t)?t:Oi(t);return n.start(ln("",n,e,i)),n.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:i,layout:n,latestValues:s}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&to(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=pn(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;const n=pn(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}ps(e,i),jn(e,s),fn(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new bs);this.sharedNodes.get(t).add(e);const i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){const n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;const n={};i.z&&ks("z",t,n,this.animationValues);for(let e=0;e<Ds.length;e++)ks(`rotate${Ds[e]}`,t,n,this.animationValues),ks(`skew${Ds[e]}`,t,n,this.animationValues);t.render();for(const e in n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=w(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");const n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=w(e?.pointerEvents)||""),void(this.hasProjected&&!Sn(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=function(t,e,i){let n="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=i?.z||0;if((s||o||r)&&(n=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(n+=`scale(${1/e.x}, ${1/e.y}) `),i){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=i;t&&(n=`perspective(${t}px) ${n}`),e&&(n+=`rotate(${e}deg) `),s&&(n+=`rotateX(${s}deg) `),o&&(n+=`rotateY(${o}deg) `),r&&(n+=`skewX(${r}deg) `),a&&(n+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(n+=`scale(${a}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,s);i&&(o=i(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in S){if(void 0===s[e])continue;const{correct:i,applyTo:r,isCSSVariable:a}=S[e],l="none"===o?s[e]:i(s[e],n);if(r){const e=r.length;for(let i=0;i<e;i++)t[r[i]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=n===this?w(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Us),this.root.sharedNodes.clear()}}}function js(t){t.updateLayout()}function Bs(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:n}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?Tn(t=>{const n=o?e.measuredBox[t]:e.layoutBox[t],s=pn(n);n.min=i[t].min,n.max=n.min+s}):to(s,e.layoutBox,i)&&Tn(n=>{const s=o?e.measuredBox[n]:e.layoutBox[n],r=pn(i[n]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};fn(r,i,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?fn(a,t.applyTransform(n,!0),e.measuredBox):fn(a,i,e.layoutBox);const l=!Ps(r);let h=!1;if(!t.resumeFrom){const n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:s,layout:o}=n;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};vn(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};vn(a,i,o.layoutBox),As(r,a)||(h=!0),n.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Fs(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Is(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Os(t){t.clearSnapshot()}function Us(t){t.clearMeasurements()}function Ns(t){t.isLayoutDirty=!1}function Ks(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ws(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function zs(t){t.resolveTargetDelta()}function $s(t){t.calcProjection()}function Ys(t){t.resetSkewAndRotation()}function Xs(t){t.removeLeadSnapshot()}function Hs(e,i,n){e.translate=t(i.translate,0,n),e.scale=t(i.scale,1,n),e.origin=i.origin,e.originPoint=i.originPoint}function Gs(e,i,n,s){e.min=t(i.min,n.min,s),e.max=t(i.max,n.max,s)}function qs(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const _s={duration:.45,ease:[.4,0,.1,1]},Zs=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Js=Zs("applewebkit/")&&!Zs("chrome/")?Math.round:st;function Qs(t){t.min=Js(t.min),t.max=Js(t.max)}function to(t,e,i){return"position"===t||"preserve-aspect"===t&&(n=Vs(e),s=Vs(i),o=.2,!(Math.abs(n-s)<=o));var n,s,o}function eo(t){return t!==t.root&&t.scroll?.wasRoot}const io=Ls({attachResizeListener:(t,e)=>hn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),no={current:void 0},so=Ls({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!no.current){const t=new io({});t.mount(window),t.setOptions({layoutScroll:!0}),no.current=t}return no.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),oo={current:null},ro={current:!1};const ao=new WeakMap;const lo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class ho{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ei,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.renderScheduledAt=0,this.scheduleRender=()=>{const t=Ot.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Rt.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=V(e),this.isVariantNode=E(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:h,...u}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in u){const e=u[t];void 0!==a[t]&&x(e)&&e.set(a[t])}}mount(t){this.current=t,ao.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),ro.current||function(){if(ro.current=!0,A)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>oo.current=t.matches;t.addEventListener("change",e),e()}else oo.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||oo.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Lt(this.notifyUpdate),Lt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=v.has(t);i&&this.onBindTransform&&this.onBindTransform();const n=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Rt.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in b){const e=b[t];if(!e)continue;const{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<lo.length;e++){const i=lo[e];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const n=t["on"+i];n&&(this.propEventSubscriptions[i]=this.on(i,n))}this.prevMotionValues=function(t,e,i){for(const n in e){const s=e[n],o=i[n];if(x(s))t.addValue(n,s);else if(x(o))t.addValue(n,Oi(s,{owner:t}));else if(o!==s)if(t.hasValue(n)){const e=t.getValue(n);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(n);t.addValue(n,Oi(void 0!==e?e:s,{owner:t}))}}for(const n in i)void 0===e[n]&&t.removeValue(n);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=Oi(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var n;return null!=i&&("string"==typeof i&&(tt(i)||it(i))?i=parseFloat(i):(n=i,!tn.find(Ai(n))&&r.test(e)&&(i=ji(t,e))),this.setBaseTarget(t,x(i)?i.get():i)),x(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let i;if("string"==typeof e||"object"==typeof e){const n=M(this.props,e,this.presenceContext?.custom);n&&(i=n[t])}if(e&&void 0!==i)return i;const n=this.getBaseTargetFromProps(this.props,t);return void 0===n||x(n)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new lt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Ui.render(this.render)}}class uo extends ho{constructor(){super(...arguments),this.KeyframeResolver=Fi}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;x(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function co(t,{style:e,vars:i},n,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,n),i)o.setProperty(r,i[r])}class po extends uo{constructor(){super(...arguments),this.type="html",this.renderInstance=co}readValueFromInstance(t,e){if(v.has(e))return this.projection?.isProjecting?We(e):((t,e)=>{const{transform:i="none"}=getComputedStyle(t);return ze(i,e)})(t,e);{const n=(i=t,window.getComputedStyle(i)),s=(D(e)?n.getPropertyValue(e):n[e])||0;return"string"==typeof s?s.trim():s}var i}measureInstanceViewportBox(t,{transformPagePoint:e}){return Bn(t,e)}build(t,e,i){C(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return k(t,e,i)}}let mo=!1;class fo extends q{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),i&&i.register&&n&&i.register(s),mo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ms.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:i,drag:n,isPresent:s}=this.props,{projection:o}=i;return o?(o.isPresent=s,mo=!0,n||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Rt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ui.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;mo=!0,n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function yo(t){const[e,i]=function(t=!0){const e=Y(R);if(null===e)return[!0,null];const{isPresent:i,onExitComplete:n,register:s}=e,o=X();H(()=>{if(t)return s(o)},[t]);const r=G(()=>t&&n&&n(o),[o,n,t]);return!i&&n?[!1,r]:[!0]}(),n=Y(L);return $(fo,{...t,layoutGroup:n,switchLayoutGroup:Y(j),isPresent:e,safeToRemove:i})}const go={pan:{Feature:class extends en{constructor(){super(...arguments),this.removePointerDownListener=st}onPointerDown(t){this.session=new Un(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Fn(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:ts(t),onStart:ts(e),onMove:i,onEnd:(t,e)=>{delete this.session,n&&Rt.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=cn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends en{constructor(t){super(t),this.removeGroupControls=st,this.removeListeners=st,this.controls=new Jn(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||st}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:so,MeasureLayout:yo}},vo={layout:{ProjectionNode:so,MeasureLayout:yo}};function xo(t,e,i){const n=t.getProps();return M(n,e,void 0!==i?i:n.custom,t)}const To=t=>Array.isArray(t);function Po(t,e,i){t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,Oi(i))}function wo(t){return To(t)?t[t.length-1]||0:t}function So({protectedKeys:t,needsAnimating:e},i){const n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}function Ao(t,e,{delay:i=0,transitionOverride:n,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;n&&(o=n);const l=[],h=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const n=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||h&&So(h,e))continue;const r={delay:i,...wi(o||{},e)},u=n.get();if(void 0!==u&&!n.isAnimating&&!Array.isArray(s)&&s===u&&!r.velocity)continue;let c=!1;if(window.MotionHandoffAnimation){const i=es(t);if(i){const t=window.MotionHandoffAnimation(i,e,Rt);null!==t&&(r.startTime=t,c=!0)}}In(t,e),n.start(ln(e,n,s,t.shouldReduceMotion&&Si.has(e)?{type:!1}:r,t,c));const d=n.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{Rt.update(()=>{r&&function(t,e){const i=xo(t,e);let{transitionEnd:n={},transition:s={},...o}=i||{};o={...o,...n};for(const e in o)Po(t,e,wo(o[e]))}(t,r)})}),l}function Vo(t,e,i,n=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*n;return"function"==typeof i?i(o,r):1===s?o*n:a-o*n}function Eo(t,e,i={}){const n=xo(t,e,"exit"===i.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(s=i.transitionOverride);const o=n?()=>Promise.all(Ao(t,n,i)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(n=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,i=0,n=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Eo(l,e,{...r,delay:i+("function"==typeof n?0:n)+Vo(t.variantChildren,l,n,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,n,o,r,a,i)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(i.delay)])}function bo(t,e){if(!Array.isArray(e))return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}const Mo=F.length;function Do(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Do(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let i=0;i<Mo;i++){const n=F[i],s=t.props[n];(B(s)||!1===s)&&(e[n]=s)}return e}const Co=[...O].reverse(),ko=O.length;function Ro(t){return e=>Promise.all(e.map(({animation:e,options:i})=>function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Eo(t,e,i));n=Promise.all(s)}else if("string"==typeof e)n=Eo(t,e,i);else{const s="function"==typeof e?xo(t,e,i.custom):e;n=Promise.all(Ao(t,s,i))}return n.then(()=>{t.notify("AnimationComplete",e)})}(t,e,i)))}function Lo(t){let e=Ro(t),i=Fo(),n=!0;const s=e=>(i,n)=>{const s=xo(t,n,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...n}=s;i={...i,...n,...e}}return i};function o(o){const{props:r}=t,a=Do(t.parent)||{},l=[],h=new Set;let u={},c=1/0;for(let e=0;e<ko;e++){const d=Co[e],p=i[d],m=void 0!==r[d]?r[d]:a[d],f=B(m),y=d===o?p.isActive:null;!1===y&&(c=e);let g=m===a[d]&&m!==r[d]&&f;if(g&&n&&t.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...u},!p.isActive&&null===y||!m&&!p.prevProp||I(m)||"boolean"==typeof m)continue;const v=jo(p.prevProp,m);let x=v||d===o&&p.isActive&&!g&&f||e>c&&f,T=!1;const P=Array.isArray(m)?m:[m];let w=P.reduce(s(d),{});!1===y&&(w={});const{prevResolvedValues:S={}}=p,A={...S,...w},V=e=>{x=!0,h.has(e)&&(T=!0,h.delete(e)),p.needsAnimating[e]=!0;const i=t.getValue(e);i&&(i.liveStyle=!1)};for(const t in A){const e=w[t],i=S[t];if(u.hasOwnProperty(t))continue;let n=!1;n=To(e)&&To(i)?!bo(e,i):e!==i,n?null!=e?V(t):h.add(t):void 0!==e&&h.has(t)?V(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=w,p.isActive&&(u={...u,...w}),n&&t.blockInitialAnimation&&(x=!1);const E=g&&v;x&&(!E||T)&&l.push(...P.map(e=>{const i={type:d};if("string"==typeof e&&n&&!E&&t.manuallyAnimateOnMount&&t.parent){const{parent:n}=t,s=xo(n,e);if(n.enteringChildren&&s){const{delayChildren:e}=s.transition||{};i.delay=Vo(n.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(h.size){const e={};if("boolean"!=typeof r.initial){const i=xo(t,Array.isArray(r.initial)?r.initial[0]:r.initial);i&&i.transition&&(e.transition=i.transition)}h.forEach(i=>{const n=t.getBaseTarget(i),s=t.getValue(i);s&&(s.liveStyle=!0),e[i]=n??null}),l.push({animation:e})}let d=Boolean(l.length);return!n||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),n=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;const s=o(e);for(const t in i)i[t].protectedKeys={};return s},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=Fo()}}}function jo(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!bo(e,t)}function Bo(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Fo(){return{animate:Bo(!0),whileInView:Bo(),whileHover:Bo(),whileTap:Bo(),whileDrag:Bo(),whileFocus:Bo(),exit:Bo()}}let Io=0;const Oo={animation:{Feature:class extends en{constructor(t){super(t),t.animationState||(t.animationState=Lo(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();I(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends en{constructor(){super(...arguments),this.id=Io++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Uo(t,e,i){const{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);const s=n["onHover"+i];s&&Rt.postRender(()=>s(e,un(e)))}function No(t,e,i){const{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);const s=n["onTap"+("End"===i?"":i)];s&&Rt.postRender(()=>s(e,un(e)))}const Ko=new WeakMap,Wo=new WeakMap,zo=t=>{const e=Ko.get(t.target);e&&e(t)},$o=t=>{t.forEach(zo)};function Yo(t,e,i){const n=function({root:t,...e}){const i=t||document;Wo.has(i)||Wo.set(i,{});const n=Wo.get(i),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver($o,{root:t,...e})),n[s]}(e);return Ko.set(t,i),n.observe(t),()=>{Ko.delete(t),n.unobserve(t)}}const Xo={some:0,all:1};const Ho={inView:{Feature:class extends en{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof n?n:Xo[n]};return Yo(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),o=e?i:n;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends en{mount(){const{current:t}=this.node;t&&(this.unmount=Ji(t,(t,e)=>(No(this.node,e,"Start"),(t,{success:e})=>No(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends en{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&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=rt(hn(this.node.current,"focus",()=>this.onFocus()),hn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends en{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){const[n,s,o]=zi(t,i),r=t=>{if(!$i(t))return;const{target:i}=t,n=e(i,t);if("function"!=typeof n||!i)return;const o=t=>{$i(t)&&(n(t),i.removeEventListener("pointerleave",o))};i.addEventListener("pointerleave",o,s)};return n.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}(t,(t,e)=>(Uo(this.node,e,"Start"),t=>Uo(this.node,t,"End"))))}unmount(){}}}},Go=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"]);class qo extends uo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=xn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(v.has(e)){const t=Li(e);return t&&t.default||0}return e=Go.has(e)?e:U(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return N(t,e,i)}build(t,e,i){K(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){!function(t,e,i,n){co(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(Go.has(i)?i:U(i),e.attrs[i])}(t,e,0,n)}mount(t){this.isSVGTag=W(t.tagName),super.mount(t)}}const _o={renderer:(t,e)=>z(t)?new qo(e):new po(e,{allowProjection:t!==_}),...Oo,...Ho},Zo={..._o,...go,...vo};export{Zo as domMax};
|
|
1
|
+
import{q as t,t as e,u as i,v as n,w as s,x as o,y as r,z as a,A as l,B as h,C as u,D as c,E as d,F as p,G as m,H as f,I as y,J as g,K as v,M as x,b as T,m as P,o as w,r as S,N as A,n as b,i as E,h as V,p as M,k as D,O as C,d as k,s as R,P as L,L as j,S as B,a as F,Q as I,j as O,R as U,T as N,l as $,e as K,f as W,g as z}from"./size-rollup-dom-max-assets.js";import{jsx as Y}from"react/jsx-runtime";import{useContext as X,useId as H,useEffect as G,useCallback as q,Component as _,Fragment as Z}from"react";function J(t,e){-1===t.indexOf(e)&&t.push(e)}function Q(t,e){const i=t.indexOf(e);i>-1&&t.splice(i,1)}function tt(t,e){return e?`${t}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${e}`:t}let et=()=>{},it=()=>{};"undefined"!=typeof process&&"production"!==process.env?.NODE_ENV&&(et=(t,e,i)=>{t||"undefined"==typeof console||console.warn(tt(e,i))},it=(t,e,i)=>{if(!t)throw new Error(tt(e,i))});const nt={},st=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function ot(t){return"object"==typeof t&&null!==t}const rt=t=>/^0[^.\s]+$/u.test(t);function at(t){let e;return()=>(void 0===e&&(e=t()),e)}const lt=t=>t,ht=(t,e)=>i=>e(t(i)),ut=(...t)=>t.reduce(ht),ct=(t,e,i)=>{const n=e-t;return 0===n?1:(i-t)/n};class dt{constructor(){this.subscriptions=[]}add(t){return J(this.subscriptions,t),()=>Q(this.subscriptions,t)}notify(t,e,i){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](t,e,i);else for(let s=0;s<n;s++){const n=this.subscriptions[s];n&&n(t,e,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const pt=t=>1e3*t,mt=t=>t/1e3;function ft(t,e){return e?t*(1e3/e):0}const yt=(t,e,i)=>(((1-3*i+3*e)*t+(3*i-6*e))*t+3*e)*t;function gt(t,e,i,n){if(t===e&&i===n)return lt;const s=e=>function(t,e,i,n,s){let o,r,a=0;do{r=e+(i-e)/2,o=yt(r,n,s)-t,o>0?i=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,i);return t=>0===t||1===t?t:yt(s(t),e,n)}const vt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,xt=t=>e=>1-t(1-e),Tt=gt(.33,1.53,.69,.99),Pt=xt(Tt),wt=vt(Pt),St=t=>(t*=2)<1?.5*Pt(t):.5*(2-Math.pow(2,-10*(t-1))),At=t=>1-Math.sin(Math.acos(t)),bt=xt(At),Et=vt(At),Vt=gt(.42,0,1,1),Mt=gt(0,0,.58,1),Dt=gt(.42,0,.58,1),Ct=t=>Array.isArray(t)&&"number"==typeof t[0],kt={linear:lt,easeIn:Vt,easeInOut:Dt,easeOut:Mt,circIn:At,circInOut:Et,circOut:bt,backIn:Pt,backInOut:wt,backOut:Tt,anticipate:St},Rt=t=>{if(Ct(t)){it(4===t.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[e,i,n,s]=t;return gt(e,i,n,s)}return"string"==typeof t?(it(void 0!==kt[t],`Invalid easing type '${t}'`,"invalid-easing-type"),kt[t]):t},Lt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],jt={value:null,addProjectionMetrics:null};function Bt(t,e){let i=!1,n=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>i=!0,r=Lt.reduce((t,i)=>(t[i]=function(t,e){let i=new Set,n=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function h(e){r.has(e)&&(u.schedule(e),t()),l++,e(a)}const u={schedule:(t,e=!1,o=!1)=>{const a=o&&s?i:n;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{n.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[i,n]=[n,i],i.forEach(h),e&&jt.value&&jt.value.frameloop[e].push(l),l=0,i.clear(),s=!1,o&&(o=!1,u.process(t)))}};return u}(o,e?i:void 0),t),{}),{setup:a,read:l,resolveKeyframes:h,preUpdate:u,update:c,preRender:d,render:p,postRender:m}=r,f=()=>{const o=nt.useManualTiming?s.timestamp:performance.now();i=!1,nt.useManualTiming||(s.delta=n?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),h.process(s),u.process(s),c.process(s),d.process(s),p.process(s),m.process(s),s.isProcessing=!1,i&&e&&(n=!1,t(f))};return{schedule:Lt.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(i||(i=!0,n=!0,s.isProcessing||t(f)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<Lt.length;e++)r[Lt[e]].cancel(t)},state:s,steps:r}}const{schedule:Ft,cancel:It,state:Ot,steps:Ut}=Bt("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:lt,!0);let Nt;function $t(){Nt=void 0}const Kt={now:()=>(void 0===Nt&&Kt.set(Ot.isProcessing||nt.useManualTiming?Ot.timestamp:performance.now()),Nt),set:t=>{Nt=t,queueMicrotask($t)}};function Wt(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function zt(t,e){return i=>i>0?e:t}const Yt=(t,e,i)=>{const n=t*t,s=i*(e*e-n)+n;return s<0?0:Math.sqrt(s)},Xt=[n,e,i];function Ht(t){const e=(n=t,Xt.find(t=>t.test(n)));var n;if(et(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!Boolean(e))return!1;let s=e.parse(t);return e===i&&(s=function({hue:t,saturation:e,lightness:i,alpha:n}){t/=360,i/=100;let s=0,o=0,r=0;if(e/=100){const n=i<.5?i*(1+e):i+e-i*e,a=2*i-n;s=Wt(a,n,t+1/3),o=Wt(a,n,t),r=Wt(a,n,t-1/3)}else s=o=r=i;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:n}}(s)),s}const Gt=(i,n)=>{const s=Ht(i),o=Ht(n);if(!s||!o)return zt(i,n);const r={...s};return i=>(r.red=Yt(s.red,o.red,i),r.green=Yt(s.green,o.green,i),r.blue=Yt(s.blue,o.blue,i),r.alpha=t(s.alpha,o.alpha,i),e.transform(r))},qt=new Set(["none","hidden"]);function _t(e,i){return n=>t(e,i,n)}function Zt(t){return"number"==typeof t?_t:"string"==typeof t?s(t)?zt:o.test(t)?Gt:te:Array.isArray(t)?Jt:"object"==typeof t?o.test(t)?Gt:Qt:zt}function Jt(t,e){const i=[...t],n=i.length,s=t.map((t,i)=>Zt(t)(t,e[i]));return t=>{for(let e=0;e<n;e++)i[e]=s[e](t);return i}}function Qt(t,e){const i={...t,...e},n={};for(const s in i)void 0!==t[s]&&void 0!==e[s]&&(n[s]=Zt(t[s])(t[s],e[s]));return t=>{for(const e in n)i[e]=n[e](t);return i}}const te=(t,e)=>{const i=r.createTransformer(e),n=a(t),s=a(e);return n.indexes.var.length===s.indexes.var.length&&n.indexes.color.length===s.indexes.color.length&&n.indexes.number.length>=s.indexes.number.length?qt.has(t)&&!s.values.length||qt.has(e)&&!n.values.length?function(t,e){return qt.has(t)?i=>i<=0?t:e:i=>i>=1?e:t}(t,e):ut(Jt(function(t,e){const i=[],n={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const o=e.types[s],r=t.indexes[o][n[o]],a=t.values[r]??0;i[s]=a,n[o]++}return i}(n,s),s.values),i):(et(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),zt(t,e))};function ee(e,i,n){if("number"==typeof e&&"number"==typeof i&&"number"==typeof n)return t(e,i,n);return Zt(e)(e,i)}const ie=t=>{const e=({timestamp:e})=>t(e);return{start:(t=!0)=>Ft.update(e,t),stop:()=>It(e),now:()=>Ot.isProcessing?Ot.timestamp:Kt.now()}},ne=(t,e,i=10)=>{let n="";const s=Math.max(Math.round(e/i),2);for(let e=0;e<s;e++)n+=Math.round(1e4*t(e/(s-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},se=2e4;function oe(t){let e=0;let i=t.next(e);for(;!i.done&&e<se;)e+=50,i=t.next(e);return e>=se?1/0:e}function re(t,e,i){const n=Math.max(e-5,0);return ft(i-t(n),e-n)}const ae=100,le=10,he=1,ue=0,ce=800,de=.3,pe=.3,me={granular:.01,default:2},fe={granular:.005,default:.5},ye=.01,ge=10,ve=.05,xe=1,Te=.001;function Pe({duration:t=ce,bounce:e=de,velocity:i=ue,mass:n=he}){let s,o;et(t<=pt(ge),"Spring duration must be 10 seconds or less","spring-duration-limit");let r=1-e;r=l(ve,xe,r),t=l(ye,ge,mt(t)),r<1?(s=e=>{const n=e*r,s=n*t,o=n-i,a=Se(e,r),l=Math.exp(-s);return Te-o/a*l},o=e=>{const n=e*r*t,o=n*i+i,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-n),h=Se(Math.pow(e,2),r);return(-s(e)+Te>0?-1:1)*((o-a)*l)/h}):(s=e=>Math.exp(-e*t)*((e-i)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(i-e)));const a=function(t,e,i){let n=i;for(let i=1;i<we;i++)n-=t(n)/e(n);return n}(s,o,5/t);if(t=pt(t),isNaN(a))return{stiffness:ae,damping:le,duration:t};{const e=Math.pow(a,2)*n;return{stiffness:e,damping:2*r*Math.sqrt(n*e),duration:t}}}const we=12;function Se(t,e){return t*Math.sqrt(1-e*e)}const Ae=["duration","bounce"],be=["stiffness","damping","mass"];function Ee(t,e){return e.some(e=>void 0!==t[e])}function Ve(t=pe,e=de){const i="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:n,restDelta:s}=i;const o=i.keyframes[0],r=i.keyframes[i.keyframes.length-1],a={done:!1,value:o},{stiffness:h,damping:u,mass:c,duration:d,velocity:p,isResolvedFromDuration:m}=function(t){let e={velocity:ue,stiffness:ae,damping:le,mass:he,isResolvedFromDuration:!1,...t};if(!Ee(t,be)&&Ee(t,Ae))if(t.visualDuration){const i=t.visualDuration,n=2*Math.PI/(1.2*i),s=n*n,o=2*l(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:he,stiffness:s,damping:o}}else{const i=Pe(t);e={...e,...i,mass:he},e.isResolvedFromDuration=!0}return e}({...i,velocity:-mt(i.velocity||0)}),f=p||0,y=u/(2*Math.sqrt(h*c)),g=r-o,v=mt(Math.sqrt(h/c)),x=Math.abs(g)<5;let T;if(n||(n=x?me.granular:me.default),s||(s=x?fe.granular:fe.default),y<1){const t=Se(v,y);T=e=>{const i=Math.exp(-y*v*e);return r-i*((f+y*v*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===y)T=t=>r-Math.exp(-v*t)*(g+(f+v*g)*t);else{const t=v*Math.sqrt(y*y-1);T=e=>{const i=Math.exp(-y*v*e),n=Math.min(t*e,300);return r-i*((f+y*v*g)*Math.sinh(n)+t*g*Math.cosh(n))/t}}const P={calculatedDuration:m&&d||null,next:t=>{const e=T(t);if(m)a.done=t>=d;else{let i=0===t?f:0;y<1&&(i=0===t?pt(f):re(T,t,e));const o=Math.abs(i)<=n,l=Math.abs(r-e)<=s;a.done=o&&l}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min(oe(P),se),e=ne(e=>P.next(t*e).value,t,30);return t+"ms "+e},toTransition:()=>{}};return P}function Me({keyframes:t,velocity:e=0,power:i=.8,timeConstant:n=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:h=.5,restSpeed:u}){const c=t[0],d={done:!1,value:c},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=i*e;const f=c+m,y=void 0===r?f:r(f);y!==f&&(m=y-c);const g=t=>-m*Math.exp(-t/n),v=t=>y+g(t),x=t=>{const e=g(t),i=v(t);d.done=Math.abs(e)<=h,d.value=d.done?y:i};let T,P;const w=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(T=t,P=Ve({keyframes:[d.value,p(d.value)],velocity:re(v,t,d.value),damping:s,stiffness:o,restDelta:h,restSpeed:u}))};return w(0),{calculatedDuration:null,next:t=>{let e=!1;return P||void 0!==T||(e=!0,x(t),w(t)),void 0!==T&&t>=T?P.next(t-T):(!e&&x(t),d)}}}function De(t,e,{clamp:i=!0,ease:n,mixer:s}={}){const o=t.length;if(it(o===e.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,i){const n=[],s=i||nt.mix||ee,o=t.length-1;for(let i=0;i<o;i++){let o=s(t[i],t[i+1]);if(e){const t=Array.isArray(e)?e[i]||lt:e;o=ut(t,o)}n.push(o)}return n}(e,n,s),h=a.length,u=i=>{if(r&&i<t[0])return e[0];let n=0;if(h>1)for(;n<t.length-2&&!(i<t[n+1]);n++);const s=ct(t[n],t[n+1],i);return a[n](s)};return i?e=>u(l(t[0],t[o-1],e)):u}function Ce(e){const i=[0];return function(e,i){const n=e[e.length-1];for(let s=1;s<=i;s++){const o=ct(0,i,s);e.push(t(n,1,o))}}(i,e.length-1),i}function ke({duration:t=300,keyframes:e,times:i,ease:n="easeInOut"}){const s=(t=>Array.isArray(t)&&"number"!=typeof t[0])(n)?n.map(Rt):Rt(n),o={done:!1,value:e[0]},r=function(t,e){return t.map(t=>t*e)}(i&&i.length===e.length?i:Ce(e),t),a=De(r,e,{ease:Array.isArray(s)?s:(l=e,h=s,l.map(()=>h||Dt).splice(0,l.length-1))});var l,h;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}Ve.applyToOptions=t=>{const e=function(t,e=100,i){const n=i({...t,keyframes:[0,e]}),s=Math.min(oe(n),se);return{type:"keyframes",ease:t=>n.next(s*t).value/e,duration:mt(s)}}(t,100,Ve);return t.ease=e.ease,t.duration=pt(e.duration),t.type="keyframes",t};const Re=t=>null!==t;function Le(t,{repeat:e,repeatType:i="loop"},n,s=1){const o=t.filter(Re),r=s<0||e&&"loop"!==i&&e%2==1?0:o.length-1;return r&&void 0!==n?n:o[r]}const je={decay:Me,inertia:Me,tween:ke,keyframes:ke,spring:Ve};function Be(t){"string"==typeof t.type&&(t.type=je[t.type])}class Fe{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,e){return this.finished.then(t,e)}}const Ie=t=>t/100;class Oe extends Fe{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:t}=this.options;t&&t.updatedAt!==Kt.now()&&this.tick(Kt.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),!1===t.autoplay&&this.pause()}initAnimation(){const{options:t}=this;Be(t);const{type:e=ke,repeat:i=0,repeatDelay:n=0,repeatType:s,velocity:o=0}=t;let{keyframes:r}=t;const a=e||ke;a!==ke&&"number"!=typeof r[0]&&(this.mixKeyframes=ut(Ie,ee(r[0],r[1])),r=[0,100]);const l=a({...t,keyframes:r});"mirror"===s&&(this.mirroredGenerator=a({...t,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=oe(l));const{calculatedDuration:h}=l;this.calculatedDuration=h,this.resolvedDuration=h+n,this.totalDuration=this.resolvedDuration*(i+1)-n,this.generator=l}updateTime(t){const e=Math.round(t-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=e}tick(t,e=!1){const{generator:i,totalDuration:n,mixKeyframes:s,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:a}=this;if(null===this.startTime)return i.next(0);const{delay:h=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:p,type:m,onUpdate:f,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),e?this.currentTime=t:this.updateTime(t);const g=this.currentTime-h*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>n;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let x=this.currentTime,T=i;if(c){const t=Math.min(this.currentTime,n)/r;let e=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),1===i&&e--,e=Math.min(e,c+1);Boolean(e%2)&&("reverse"===d?(i=1-i,p&&(i-=p/r)):"mirror"===d&&(T=o)),x=l(0,1,i)*r}const P=v?{done:!1,value:u[0]}:T.next(x);s&&(P.value=s(P.value));let{done:w}=P;v||null===a||(w=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return S&&m!==Me&&(P.value=Le(u,this.options,y,this.speed)),f&&f(P.value),S&&this.finish(),P}then(t,e){return this.finished.then(t,e)}get duration(){return mt(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+mt(t)}get time(){return mt(this.currentTime)}set time(t){t=pt(t),this.currentTime=t,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Kt.now());const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=mt(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=ie,startTime:e}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),this.options.onPlay?.();const i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=e??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Kt.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const Ue=t=>180*t/Math.PI,Ne=t=>{const e=Ue(Math.atan2(t[1],t[0]));return Ke(e)},$e={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ne,rotateZ:Ne,skewX:t=>Ue(Math.atan(t[1])),skewY:t=>Ue(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Ke=t=>((t%=360)<0&&(t+=360),t),We=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ze=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ye={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:We,scaleY:ze,scale:t=>(We(t)+ze(t))/2,rotateX:t=>Ke(Ue(Math.atan2(t[6],t[5]))),rotateY:t=>Ke(Ue(Math.atan2(-t[2],t[0]))),rotateZ:Ne,rotate:Ne,skewX:t=>Ue(Math.atan(t[4])),skewY:t=>Ue(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Xe(t){return t.includes("scale")?1:0}function He(t,e){if(!t||"none"===t)return Xe(e);const i=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,s;if(i)n=Ye,s=i;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=$e,s=e}if(!s)return Xe(e);const o=n[e],r=s[1].split(",").map(Ge);return"function"==typeof o?o(r):r[o]}function Ge(t){return parseFloat(t.trim())}const qe=t=>t===h||t===u,_e=new Set(["x","y","z"]),Ze=c.filter(t=>!_e.has(t));const Je={width:({x:t},{paddingLeft:e="0",paddingRight:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),height:({y:t},{paddingTop:e="0",paddingBottom:i="0"})=>t.max-t.min-parseFloat(e)-parseFloat(i),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:(t,{transform:e})=>He(e,"x"),y:(t,{transform:e})=>He(e,"y")};Je.translateX=Je.x,Je.translateY=Je.y;const Qe=new Set;let ti=!1,ei=!1,ii=!1;function ni(){if(ei){const t=Array.from(Qe).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),i=new Map;e.forEach(t=>{const e=function(t){const e=[];return Ze.forEach(i=>{const n=t.getValue(i);void 0!==n&&(e.push([i,n.get()]),n.set(i.startsWith("scale")?1:0))}),e}(t);e.length&&(i.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=i.get(t);e&&e.forEach(([e,i])=>{t.getValue(e)?.set(i)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}ei=!1,ti=!1,Qe.forEach(t=>t.complete(ii)),Qe.clear()}function si(){Qe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ei=!0)})}class oi{constructor(t,e,i,n,s,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=i,this.motionValue=n,this.element=s,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(Qe.add(this),ti||(ti=!0,Ft.read(si),Ft.resolveKeyframes(ni))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:i,motionValue:n}=this;if(null===t[0]){const s=n?.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(i&&e){const n=i.readValue(e,o);null!=n&&(t[0]=n)}void 0===t[0]&&(t[0]=o),n&&void 0===s&&n.set(t[0])}!function(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Qe.delete(this)}cancel(){"scheduled"===this.state&&(Qe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const ri=at(()=>void 0!==window.ScrollTimeline),ai={};function li(t,e){const i=at(t);return()=>ai[e]??i()}const hi=li(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),ui=([t,e,i,n])=>`cubic-bezier(${t}, ${e}, ${i}, ${n})`,ci={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ui([0,.65,.55,1]),circOut:ui([.55,0,1,.45]),backIn:ui([.31,.01,.66,-.59]),backOut:ui([.33,1.53,.69,.99])};function di(t,e){return t?"function"==typeof t?hi()?ne(t,e):"ease-out":Ct(t)?ui(t):Array.isArray(t)?t.map(t=>di(t,e)||ci.easeOut):ci[t]:void 0}function pi(t,e,i,{delay:n=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},h=void 0){const u={[e]:i};l&&(u.offset=l);const c=di(a,s);Array.isArray(c)&&(u.easing=c);const d={delay:n,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};h&&(d.pseudoElement=h);return t.animate(u,d)}function mi(t){return"function"==typeof t&&"applyToOptions"in t}class fi extends Fe{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:e,name:i,keyframes:n,pseudoElement:s,allowFlatten:o=!1,finalKeyframe:r,onComplete:a}=t;this.isPseudoElement=Boolean(s),this.allowFlatten=o,this.options=t,it("string"!=typeof t.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const l=function({type:t,...e}){return mi(t)&&hi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}(t);this.animation=pi(e,i,n,l,s),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const t=Le(n,this.options,r,this.speed);this.updateMotionValue?this.updateMotionValue(t):function(t,e,i){(t=>t.startsWith("--"))(e)?t.style.setProperty(e,i):t.style[e]=i}(e,i,t),this.animation.cancel()}a?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(t){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;"idle"!==t&&"finished"!==t&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return mt(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+mt(t)}get time(){return mt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=pt(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:e}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&ri()?(this.animation.timeline=t,lt):e(this)}}const yi={anticipate:St,backInOut:wt,circInOut:Et};function gi(t){"string"==typeof t.ease&&t.ease in yi&&(t.ease=yi[t.ease])}class vi extends fi{constructor(t){gi(t),Be(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:e,onUpdate:i,onComplete:n,element:s,...o}=this.options;if(!e)return;if(void 0!==t)return void e.set(t);const r=new Oe({...o,autoplay:!1}),a=pt(this.finishedTime??this.time);e.setWithVelocity(r.sample(a-10).value,r.sample(a).value,10),r.stop()}}const xi=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!r.test(t)&&"0"!==t||t.startsWith("url(")));function Ti(t){t.duration=0,t.type="keyframes"}const Pi=new Set(["opacity","clipPath","filter","transform"]),wi=at(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Si extends Fe{constructor({autoplay:t=!0,delay:e=0,type:i="keyframes",repeat:n=0,repeatDelay:s=0,repeatType:o="loop",keyframes:r,name:a,motionValue:l,element:h,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Kt.now();const c={autoplay:t,delay:e,type:i,repeat:n,repeatDelay:s,repeatType:o,name:a,motionValue:l,element:h,...u},d=h?.KeyframeResolver||oi;this.keyframeResolver=new d(r,(t,e,i)=>this.onKeyframesResolved(t,e,c,!i),a,l,h),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,e,i,n){this.keyframeResolver=void 0;const{name:s,type:o,velocity:r,delay:a,isHandoff:l,onUpdate:h}=i;this.resolvedAt=Kt.now(),function(t,e,i,n){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=xi(s,e),a=xi(o,e);return et(r===a,`You are trying to animate ${e} from "${s}" to "${o}". "${r?o:s}" is not an animatable value.`,"value-not-animatable"),!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let i=0;i<t.length;i++)if(t[i]!==e)return!0}(t)||("spring"===i||mi(i))&&n)}(t,s,o,r)||(!nt.instantAnimations&&a||h?.(Le(t,i,e)),t[0]=t[t.length-1],Ti(i),i.repeat=0);const u={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:e,...i,keyframes:t},c=!l&&function(t){const{motionValue:e,name:i,repeatDelay:n,repeatType:s,damping:o,type:r}=t,a=e?.owner?.current;if(!(a instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:h}=e.owner.getProps();return wi()&&i&&Pi.has(i)&&("transform"!==i||!h)&&!l&&!n&&"mirror"!==s&&0!==o&&"inertia"!==r}(u)?new vi({...u,element:u.motionValue.owner.current}):new Oe(u);c.finished.then(()=>this.notifyFinished()).catch(lt),this.pendingTimeline&&(this.stopTimeline=c.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=c}get finished(){return this._animation?this.animation.finished:this._finished}then(t,e){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ii=!0,si(),ni(),ii=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const Ai=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function bi(t,e,i=1){it(i<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[n,o]=function(t){const e=Ai.exec(t);if(!e)return[,];const[,i,n,s]=e;return[`--${i??n}`,s]}(t);if(!n)return;const r=window.getComputedStyle(e).getPropertyValue(n);if(r){const t=r.trim();return st(t)?parseFloat(t):t}return s(o)?bi(o,e,i+1):o}function Ei(t,e){return t?.[e]??t?.default??t}const Vi=new Set(["width","height","top","left","right","bottom",...c]),Mi=t=>e=>e.test(t),Di=[h,u,d,p,m,f,{test:t=>"auto"===t,parse:t=>t}],Ci=t=>Di.find(Mi(t));function ki(t){return"number"==typeof t?0===t:null===t||("none"===t||"0"===t||rt(t))}const Ri=new Set(["brightness","contrast","saturate","opacity"]);function Li(t){const[e,i]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[n]=i.match(y)||[];if(!n)return t;const s=i.replace(n,"");let o=Ri.has(e)?1:0;return n!==i&&(o*=100),e+"("+o+s+")"}const ji=/\b([a-z-]*)\(.*?\)/gu,Bi={...r,getAnimatableNone:t=>{const e=t.match(ji);return e?e.map(Li).join(" "):t}},Fi={...g,color:o,backgroundColor:o,outlineColor:o,fill:o,stroke:o,borderColor:o,borderTopColor:o,borderRightColor:o,borderBottomColor:o,borderLeftColor:o,filter:Bi,WebkitFilter:Bi},Ii=t=>Fi[t];function Oi(t,e){let i=Ii(t);return i!==Bi&&(i=r),i.getAnimatableNone?i.getAnimatableNone(e):void 0}const Ui=new Set(["auto","none","0"]);class Ni extends oi{constructor(t,e,i,n,s){super(t,e,i,n,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:i}=this;if(!e||!e.current)return;super.readKeyframes();for(let i=0;i<t.length;i++){let n=t[i];if("string"==typeof n&&(n=n.trim(),s(n))){const s=bi(n,e.current);void 0!==s&&(t[i]=s),i===t.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!Vi.has(i)||2!==t.length)return;const[n,o]=t,r=Ci(n),a=Ci(o);if(v(n)!==v(o)&&Je[i])this.needsMeasurement=!0;else if(r!==a)if(qe(r)&&qe(a))for(let e=0;e<t.length;e++){const i=t[e];"string"==typeof i&&(t[e]=parseFloat(i))}else Je[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,i=[];for(let e=0;e<t.length;e++)(null===t[e]||ki(t[e]))&&i.push(e);i.length&&function(t,e,i){let n,s=0;for(;s<t.length&&!n;){const e=t[s];"string"==typeof e&&!Ui.has(e)&&a(e).values.length&&(n=t[s]),s++}if(n&&i)for(const s of e)t[s]=Oi(i,n)}(t,i,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:i}=this;if(!t||!t.current)return;"height"===i&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Je[i](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const n=e[e.length-1];void 0!==n&&t.getValue(i,n).jump(n,!1)}measureEndState(){const{element:t,name:e,unresolvedKeyframes:i}=this;if(!t||!t.current)return;const n=t.getValue(e);n&&n.jump(this.measuredOrigin,!1);const s=i.length-1,o=i[s];i[s]=Je[e](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==o&&void 0===this.finalKeyframe&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([e,i])=>{t.getValue(e).set(i)}),this.resolveNoneKeyframes()}}class $i{constructor(t,e={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=t=>{const e=Kt.now();if(this.updatedAt!==e&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const t of this.dependents)t.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=Kt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new dt);const i=this.events[t].add(e);return"change"===t?()=>{i(),Ft.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,e,i){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-i}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Kt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return ft(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ki(t,e){return new $i(t,e)}const{schedule:Wi,cancel:zi}=Bt(queueMicrotask,!1),Yi={x:!1,y:!1};function Xi(){return Yi.x||Yi.y}function Hi(t,e){const i=function(t){if(t instanceof EventTarget)return[t];if("string"==typeof t){const e=document.querySelectorAll(t);return e?Array.from(e):[]}return Array.from(t)}(t),n=new AbortController;return[i,{passive:!0,...e,signal:n.signal},()=>n.abort()]}function Gi(t){return!("touch"===t.pointerType||Xi())}const qi=(t,e)=>!!e&&(t===e||qi(t,e.parentElement)),_i=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Zi=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Ji=new WeakSet;function Qi(t){return e=>{"Enter"===e.key&&t(e)}}function tn(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function en(t){return _i(t)&&!Xi()}function nn(t,e,i={}){const[n,s,o]=Hi(t,i),r=t=>{const n=t.currentTarget;if(!en(t))return;Ji.add(n);const o=e(n,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Ji.has(n)&&Ji.delete(n),en(t)&&"function"==typeof o&&o(t,{success:e})},a=t=>{r(t,n===window||n===document||i.useGlobalTarget||qi(n,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return n.forEach(t=>{var e;(i.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),ot(e=t)&&"offsetHeight"in e&&(t.addEventListener("focus",t=>((t,e)=>{const i=t.currentTarget;if(!i)return;const n=Qi(()=>{if(Ji.has(i))return;tn(i,"down");const t=Qi(()=>{tn(i,"up")});i.addEventListener("keyup",t,e),i.addEventListener("blur",()=>tn(i,"cancel"),e)});i.addEventListener("keydown",n,e),i.addEventListener("blur",()=>i.removeEventListener("keydown",n),e)})(t,s)),function(t){return Zi.has(t.tagName)||-1!==t.tabIndex}(t)||t.hasAttribute("tabindex")||(t.tabIndex=0))}),o}function sn(t){return ot(t)&&"ownerSVGElement"in t}const on=[...Di,o,r];class rn{constructor(t){this.isMounted=!1,this.node=t}update(){}}const an=t=>null!==t;const ln={type:"spring",stiffness:500,damping:25,restSpeed:10},hn={type:"keyframes",duration:.8},un={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},cn=(t,{keyframes:e})=>e.length>2?hn:x.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ln:un;const dn=(t,e,i,n={},s,o)=>r=>{const a=Ei(n,t)||{},l=a.delay||n.delay||0;let{elapsed:h=0}=n;h-=pt(l);const u={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:i,staggerChildren:n,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:h,...u}){return!!Object.keys(u).length})(a)||Object.assign(u,cn(t,u)),u.duration&&(u.duration=pt(u.duration)),u.repeatDelay&&(u.repeatDelay=pt(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let c=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(Ti(u),0===u.delay&&(c=!0)),(nt.instantAnimations||nt.skipAnimations)&&(c=!0,Ti(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,c&&!o&&void 0!==e.get()){const t=function(t,{repeat:e,repeatType:i="loop"},n){const s=t.filter(an),o=e&&"loop"!==i&&e%2==1?0:s.length-1;return o&&void 0!==n?n:s[o]}(u.keyframes,a);if(void 0!==t)return void Ft.update(()=>{u.onUpdate(t),u.onComplete()})}return a.isSync?new Oe(u):new Si(u)};function pn(t,e,i,n={passive:!0}){return t.addEventListener(e,i,n),()=>t.removeEventListener(e,i)}function mn(t){return{point:{x:t.pageX,y:t.pageY}}}function fn(t,e,i,n){return pn(t,e,(t=>e=>_i(e)&&t(e,mn(e)))(i),n)}function yn({top:t,left:e,right:i,bottom:n}){return{x:{min:e,max:i},y:{min:t,max:n}}}function gn(t){return t.max-t.min}function vn(e,i,n,s=.5){e.origin=s,e.originPoint=t(i.min,i.max,e.origin),e.scale=gn(n)/gn(i),e.translate=t(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function xn(t,e,i,n){vn(t.x,e.x,i.x,n?n.originX:void 0),vn(t.y,e.y,i.y,n?n.originY:void 0)}function Tn(t,e,i){t.min=i.min+e.min,t.max=t.min+gn(e)}function Pn(t,e,i){t.min=e.min-i.min,t.max=t.min+gn(e)}function wn(t,e,i){Pn(t.x,e.x,i.x),Pn(t.y,e.y,i.y)}const Sn=()=>({x:{min:0,max:0},y:{min:0,max:0}});function An(t){return[t("x"),t("y")]}function bn(t){return void 0===t||1===t}function En({scale:t,scaleX:e,scaleY:i}){return!bn(t)||!bn(e)||!bn(i)}function Vn(t){return En(t)||Mn(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Mn(t){return Dn(t.x)||Dn(t.y)}function Dn(t){return t&&"0%"!==t}function Cn(t,e,i){return i+e*(t-i)}function kn(t,e,i,n,s){return void 0!==s&&(t=Cn(t,s,n)),Cn(t,i,n)+e}function Rn(t,e=0,i=1,n,s){t.min=kn(t.min,e,i,n,s),t.max=kn(t.max,e,i,n,s)}function Ln(t,{x:e,y:i}){Rn(t.x,e.translate,e.scale,e.originPoint),Rn(t.y,i.translate,i.scale,i.originPoint)}const jn=.999999999999,Bn=1.0000000000001;function Fn(t,e){t.min=t.min+e,t.max=t.max+e}function In(e,i,n,s,o=.5){Rn(e,i,n,t(e.min,e.max,o),s)}function On(t,e){In(t.x,e.x,e.scaleX,e.scale,e.originX),In(t.y,e.y,e.scaleY,e.scale,e.originY)}function Un(t,e){return yn(function(t,e){if(!e)return t;const i=e({x:t.left,y:t.top}),n=e({x:t.right,y:t.bottom});return{top:i.y,left:i.x,bottom:n.y,right:n.x}}(t.getBoundingClientRect(),e))}const Nn=({current:t})=>t?t.ownerDocument.defaultView:null;function $n(t,e){const i=t.getValue("willChange");if(n=i,Boolean(T(n)&&n.add))return i.add(e);if(!i&&nt.WillChange){const i=new nt.WillChange("auto");t.addValue("willChange",i),i.add(e)}var n}const Kn=(t,e)=>Math.abs(t-e);class Wn{constructor(t,e,{transformPagePoint:i,contextWindow:n=window,dragSnapToOrigin:s=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Xn(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,i=function(t,e){const i=Kn(t.x,e.x),n=Kn(t.y,e.y);return Math.sqrt(i**2+n**2)}(t.offset,{x:0,y:0})>=this.distanceThreshold;if(!e&&!i)return;const{point:n}=t,{timestamp:s}=Ot;this.history.push({...n,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=zn(e,this.transformPagePoint),Ft.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:i,onSessionEnd:n,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Xn("pointercancel"===t.type?this.lastMoveEventInfo:zn(e,this.transformPagePoint),this.history);this.startEvent&&i&&i(t,o),n&&n(t,o)},!_i(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=i,this.distanceThreshold=o,this.contextWindow=n||window;const r=zn(mn(t),this.transformPagePoint),{point:a}=r,{timestamp:l}=Ot;this.history=[{...a,timestamp:l}];const{onSessionStart:h}=e;h&&h(t,Xn(r,this.history)),this.removeListeners=ut(fn(this.contextWindow,"pointermove",this.handlePointerMove),fn(this.contextWindow,"pointerup",this.handlePointerUp),fn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),It(this.updatePoint)}}function zn(t,e){return e?{point:e(t.point)}:t}function Yn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Xn({point:t},e){return{point:t,delta:Yn(t,Gn(e)),offset:Yn(t,Hn(e)),velocity:qn(e,.1)}}function Hn(t){return t[0]}function Gn(t){return t[t.length-1]}function qn(t,e){if(t.length<2)return{x:0,y:0};let i=t.length-1,n=null;const s=Gn(t);for(;i>=0&&(n=t[i],!(s.timestamp-n.timestamp>pt(e)));)i--;if(!n)return{x:0,y:0};const o=mt(s.timestamp-n.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-n.x)/o,y:(s.y-n.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function _n(t,e,i){return{min:void 0!==e?t.min+e:void 0,max:void 0!==i?t.max+i-(t.max-t.min):void 0}}function Zn(t,e){let i=e.min-t.min,n=e.max-t.max;return e.max-e.min<t.max-t.min&&([i,n]=[n,i]),{min:i,max:n}}const Jn=.35;function Qn(t,e,i){return{min:ts(t,e),max:ts(t,i)}}function ts(t,e){return"number"==typeof t?t:t[e]||0}const es=new WeakMap;class is{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:e=!1,distanceThreshold:i}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new Wn(t,{onSessionStart:t=>{const{dragSnapToOrigin:i}=this.getProps();i?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(mn(t).point)},onStart:(t,e)=>{const{drag:i,dragPropagation:n,onDragStart:s}=this.getProps();if(i&&!n&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=i)||"y"===o?Yi[o]?null:(Yi[o]=!0,()=>{Yi[o]=!1}):Yi.x||Yi.y?null:(Yi.x=Yi.y=!0,()=>{Yi.x=Yi.y=!1}),!this.openDragLock))return;var o;this.latestPointerEvent=t,this.latestPanInfo=e,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),An(t=>{let e=this.getAxisMotionValue(t).get()||0;if(d.test(e)){const{projection:i}=this.visualElement;if(i&&i.layout){const n=i.layout.layoutBox[t];if(n){e=gn(n)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&Ft.postRender(()=>s(t,e)),$n(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e;const{dragPropagation:i,dragDirectionLock:n,onDirectionLock:s,onDrag:o}=this.getProps();if(!i&&!this.openDragLock)return;const{offset:r}=e;if(n&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let i=null;Math.abs(t.y)>e?i="y":Math.abs(t.x)>e&&(i="x");return i}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>{this.latestPointerEvent=t,this.latestPanInfo=e,this.stop(t,e),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>An(t=>"paused"===this.getAnimationState(t)&&this.getAxisMotionValue(t).animation?.play())},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,distanceThreshold:i,contextWindow:Nn(this.visualElement)})}stop(t,e){const i=t||this.latestPointerEvent,n=e||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!n||!i)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:r}=this.getProps();r&&Ft.postRender(()=>r(i,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(e,i,n){const{drag:s}=this.getProps();if(!n||!ns(e,s,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(r=function(e,{min:i,max:n},s){return void 0!==i&&e<i?e=s?t(i,e,s.min):Math.max(e,i):void 0!==n&&e>n&&(e=s?t(n,e,s.max):Math.min(e,n)),e}(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&P(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!i)&&function(t,{top:e,left:i,bottom:n,right:s}){return{x:_n(t.x,i,s),y:_n(t.y,e,n)}}(i.layoutBox,t),this.elastic=function(t=Jn){return!1===t?t=0:!0===t&&(t=Jn),{x:Qn(t,"left","right"),y:Qn(t,"top","bottom")}}(e),n!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&An(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const i={};return void 0!==e.min&&(i.min=e.min-t.min),void 0!==e.max&&(i.max=e.max-t.min),i}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!P(t))return!1;const i=t.current;it(null!==i,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const s=function(t,e,i){const n=Un(t,i),{scroll:s}=e;return s&&(Fn(n.x,s.offset.x),Fn(n.y,s.offset.y)),n}(i,n.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Zn(t.x,e.x),y:Zn(t.y,e.y)}}(n.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=yn(t))}return o}startAnimation(t){const{drag:e,dragMomentum:i,dragElastic:n,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=An(r=>{if(!ns(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const h=n?200:1e6,u=n?40:1e7,c={type:"inertia",velocity:i?t[r]:0,bounceStiffness:h,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,c)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const i=this.getAxisMotionValue(t);return $n(this.visualElement,t),i.start(dn(t,i,0,e,this.visualElement,!1))}stopAnimation(){An(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){An(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){const e=`_drag${t.toUpperCase()}`,i=this.visualElement.getProps(),n=i[e];return n||this.visualElement.getValue(t,(i.initial?i.initial[t]:void 0)||0)}snapToCursor(e){An(i=>{const{drag:n}=this.getProps();if(!ns(i,n,this.currentDirection))return;const{projection:s}=this.visualElement,o=this.getAxisMotionValue(i);if(s&&s.layout){const{min:n,max:r}=s.layout.layoutBox[i];o.set(e[i]-t(n,r,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:i}=this.getProps(),{projection:n}=this.visualElement;if(!P(i)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};An(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const i=e.get();s[t]=function(t,e){let i=.5;const n=gn(t),s=gn(e);return s>n?i=ct(e.min,e.max-n,t.min):n>s&&(i=ct(t.min,t.max-s,e.min)),l(0,1,i)}({min:i,max:i},this.constraints[t])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),An(i=>{if(!ns(i,e,null))return;const n=this.getAxisMotionValue(i),{min:o,max:r}=this.constraints[i];n.set(t(o,r,s[i]))})}addListeners(){if(!this.visualElement.current)return;es.set(this.visualElement,this);const t=fn(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:i=!0}=this.getProps();e&&i&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();P(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,n=i.addEventListener("measure",e);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ft.read(e);const s=pn(window,"resize",()=>this.scalePositionWithinConstraints()),o=i.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(An(e=>{const i=this.getAxisMotionValue(e);i&&(this.originPoint[e]+=t[e].translate,i.set(i.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),n(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:i=!1,dragPropagation:n=!1,dragConstraints:s=!1,dragElastic:o=Jn,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:i,dragPropagation:n,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function ns(t,e,i){return!(!0!==e&&e!==t||null!==i&&i!==t)}const ss=t=>(e,i)=>{t&&Ft.postRender(()=>t(e,i))};function os(t){return t.props[w]}const rs=(t,e)=>t.depth-e.depth;class as{constructor(){this.children=[],this.isDirty=!1}add(t){J(this.children,t),this.isDirty=!0}remove(t){Q(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rs),this.isDirty=!1,this.children.forEach(t)}}const ls=["TopLeft","TopRight","BottomLeft","BottomRight"],hs=ls.length,us=t=>"string"==typeof t?parseFloat(t):t,cs=t=>"number"==typeof t||u.test(t);function ds(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const ps=fs(0,.5,bt),ms=fs(.5,.95,lt);function fs(t,e,i){return n=>n<t?0:n>e?1:i(ct(t,e,n))}function ys(t,e){t.min=e.min,t.max=e.max}function gs(t,e){ys(t.x,e.x),ys(t.y,e.y)}function vs(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function xs(t,e,i,n,s){return t=Cn(t-=e,1/i,n),void 0!==s&&(t=Cn(t,1/s,n)),t}function Ts(e,i,[n,s,o],r,a){!function(e,i=0,n=1,s=.5,o,r=e,a=e){d.test(i)&&(i=parseFloat(i),i=t(a.min,a.max,i/100)-a.min);if("number"!=typeof i)return;let l=t(r.min,r.max,s);e===r&&(l-=i),e.min=xs(e.min,i,n,l,o),e.max=xs(e.max,i,n,l,o)}(e,i[n],i[s],i[o],i.scale,r,a)}const Ps=["x","scaleX","originX"],ws=["y","scaleY","originY"];function Ss(t,e,i,n){Ts(t.x,e,Ps,i?i.x:void 0,n?n.x:void 0),Ts(t.y,e,ws,i?i.y:void 0,n?n.y:void 0)}function As(t){return 0===t.translate&&1===t.scale}function bs(t){return As(t.x)&&As(t.y)}function Es(t,e){return t.min===e.min&&t.max===e.max}function Vs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ms(t,e){return Vs(t.x,e.x)&&Vs(t.y,e.y)}function Ds(t){return gn(t.x)/gn(t.y)}function Cs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class ks{constructor(){this.members=[]}add(t){J(this.members,t),t.scheduleRender()}remove(t){if(Q(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let i;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){i=e;break}}return!!i&&(this.promote(i),!0)}promote(t,e){const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,e&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:n}=t.options;!1===n&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:i}=t;e.onExitComplete&&e.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Rs={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ls=["","X","Y","Z"];let js=0;function Bs(t,e,i,n){const{latestValues:s}=e;s[t]&&(i[t]=s[t],e.setStaticValue(t,0),n&&(n[t]=0))}function Fs(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const i=os(e);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:e,layoutId:n}=t.options;window.MotionCancelOptimisedAnimation(i,"transform",Ft,!(e||n))}const{parent:n}=t;n&&!n.hasCheckedOptimisedAppear&&Fs(n)}function Is({attachResizeListener:e,defaultParent:i,measureScroll:n,checkIsScrollRoot:s,resetTransform:o}){return class{constructor(t={},e=i?.()){this.id=js++,this.animationId=0,this.animationCommitId=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.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Ns),this.nodes.forEach(Hs),this.nodes.forEach(Gs),this.nodes.forEach($s)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=e?e.root||e:this,this.path=e?[...e.path,e]:[],this.parent=e,this.depth=e?e.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new as)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new dt),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const i=this.eventHandlers.get(t);i&&i.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(t){if(this.instance)return;var i;this.isSVG=sn(t)&&!(sn(i=t)&&"svg"===i.tagName),this.instance=t;const{layoutId:n,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(s||n)&&(this.isLayoutDirty=!0),e){let i,n=0;const s=()=>this.root.updateBlockedByResize=!1;Ft.read(()=>{n=window.innerWidth}),e(t,()=>{const t=window.innerWidth;t!==n&&(n=t,this.root.updateBlockedByResize=!0,i&&i(),i=function(t,e){const i=Kt.now(),n=({timestamp:s})=>{const o=s-i;o>=e&&(It(n),t(o-e))};return Ft.setup(n,!0),()=>It(n)}(s,250),Rs.hasAnimatedSinceResize&&(Rs.hasAnimatedSinceResize=!1,this.nodes.forEach(Xs)))})}n&&this.root.registerSharedNode(n,this),!1!==this.options.animate&&o&&(n||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:i,layout:n})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||to,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Ms(this.targetLayout,n),h=!e&&i;if(this.options.layoutRoot||this.resumeFrom||h||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e={...Ei(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,h)}else e||Xs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),It(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(qs),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Fs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:i}=this.options;if(void 0===e&&!i)return;const n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ws);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(zs);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Ys),this.nodes.forEach(Os),this.nodes.forEach(Us)):this.nodes.forEach(zs),this.clearAllSnapshots();const t=Kt.now();Ot.delta=l(0,1e3/60,t-Ot.timestamp),Ot.timestamp=t,Ot.isProcessing=!0,Ut.update.process(Ot),Ut.preRender.process(Ot),Ut.render.process(Ot),Ot.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Ks),this.sharedNodes.forEach(_s)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ft.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ft.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||gn(this.snapshot.measuredBox.x)||gn(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&this.instance){const e=s(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!o)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!bs(this.projectionDelta),i=this.getTransformTemplate(),n=i?i(this.latestValues,""):void 0,s=n!==this.prevTransformTemplateValue;t&&this.instance&&(e||Vn(this.latestValues)||s)&&(o(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let i=this.removeElementScroll(e);var n;return t&&(i=this.removeTransform(i)),no((n=i).x),no(n.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:i,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const e=t.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(oo))){const{scroll:t}=this.root;t&&(Fn(e.x,t.offset.x),Fn(e.y,t.offset.y))}return e}removeElementScroll(t){const e={x:{min:0,max:0},y:{min:0,max:0}};if(gs(e,t),this.scroll?.wasRoot)return e;for(let i=0;i<this.path.length;i++){const n=this.path[i],{scroll:s,options:o}=n;n!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&gs(e,t),Fn(e.x,s.offset.x),Fn(e.y,s.offset.y))}return e}applyTransform(t,e=!1){const i={x:{min:0,max:0},y:{min:0,max:0}};gs(i,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];!e&&n.options.layoutScroll&&n.scroll&&n!==n.root&&On(i,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),Vn(n.latestValues)&&On(i,n.latestValues)}return Vn(this.latestValues)&&On(i,this.latestValues),i}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};gs(e,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];if(!i.instance)continue;if(!Vn(i.latestValues))continue;En(i.latestValues)&&i.updateSnapshot();const n=Sn();gs(n,i.measurePageBox()),Ss(e,i.latestValues,i.snapshot?i.snapshot.layoutBox:void 0,n)}return Vn(this.latestValues)&&Ss(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}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!==Ot.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){const e=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=e.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=e.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=e.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==e;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:n,layoutId:s}=this.options;if(!this.layout||!n&&!s)return;this.resolvedRelativeTargetAt=Ot.timestamp;const o=this.getClosestProjectingParent();var r,a,l;(o&&this.linkedParentVersion!==o.layoutVersion&&!o.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(o&&o.layout?this.createRelativeTarget(o,this.layout.layoutBox,o.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,Tn(r.x,a.x,l.x),Tn(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):gs(this.target,this.layout.layoutBox),Ln(this.target,this.targetDelta)):gs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,o&&Boolean(o.resumingFrom)===Boolean(this.resumingFrom)&&!o.options.layoutScroll&&o.target&&1!==this.animationProgress?this.createRelativeTarget(o,this.target,o.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!En(this.parent.latestValues)&&!Mn(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(t,e,i){this.relativeParent=t,this.linkedParentVersion=t.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},wn(this.relativeTargetOrigin,e,i),gs(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const t=this.getLead(),e=Boolean(this.resumingFrom)||this!==t;let i=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(i=!1),e&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===Ot.timestamp&&(i=!1),i)return;const{layout:n,layoutId:s}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!n&&!s)return;gs(this.layoutCorrected,this.layout.layoutBox);const o=this.treeScale.x,r=this.treeScale.y;!function(t,e,i,n=!1){const s=i.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=i[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&On(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ln(t,r)),n&&Vn(o.latestValues)&&On(t,o.latestValues))}e.x<Bn&&e.x>jn&&(e.x=1),e.y<Bn&&e.y>jn&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,e),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:a}=t;a?(this.projectionDelta&&this.prevProjectionDelta?(vs(this.prevProjectionDelta.x,this.projectionDelta.x),vs(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),xn(this.projectionDelta,this.layoutCorrected,a,this.latestValues),this.treeScale.x===o&&this.treeScale.y===r&&Cs(this.projectionDelta.x,this.prevProjectionDelta.x)&&Cs(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",a))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.visualElement?.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,i=!1){const n=this.snapshot,s=n?n.latestValues:{},o={...this.latestValues},r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;const a={x:{min:0,max:0},y:{min:0,max:0}},l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),h=this.getStack(),u=!h||h.members.length<=1,c=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(Qs));let p;this.animationProgress=0,this.mixTargetDelta=i=>{const n=i/1e3;var h,m,f,y,g,v;Zs(r.x,e.x,n),Zs(r.y,e.y,n),this.setTargetDelta(r),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wn(a,this.layout.layoutBox,this.relativeParent.layout.layoutBox),f=this.relativeTarget,y=this.relativeTargetOrigin,g=a,v=n,Js(f.x,y.x,g.x,v),Js(f.y,y.y,g.y,v),p&&(h=this.relativeTarget,m=p,Es(h.x,m.x)&&Es(h.y,m.y))&&(this.isProjectionDirty=!1),p||(p={x:{min:0,max:0},y:{min:0,max:0}}),gs(p,this.relativeTarget)),l&&(this.animationValues=o,function(e,i,n,s,o,r){o?(e.opacity=t(0,n.opacity??1,ps(s)),e.opacityExit=t(i.opacity??1,0,ms(s))):r&&(e.opacity=t(i.opacity??1,n.opacity??1,s));for(let o=0;o<hs;o++){const r=`border${ls[o]}Radius`;let a=ds(i,r),l=ds(n,r);void 0===a&&void 0===l||(a||(a=0),l||(l=0),0===a||0===l||cs(a)===cs(l)?(e[r]=Math.max(t(us(a),us(l),s),0),(d.test(l)||d.test(a))&&(e[r]+="%")):e[r]=l)}(i.rotate||n.rotate)&&(e.rotate=t(i.rotate||0,n.rotate||0,s))}(o,s,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(It(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ft.update(()=>{Rs.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ki(0)),this.currentAnimation=function(t,e,i){const n=T(t)?t:Ki(t);return n.start(dn("",n,e,i)),n.animation}(this.motionValue,[0,1e3],{...t,velocity:0,isSync:!0,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:i,layout:n,latestValues:s}=t;if(e&&i&&n){if(this!==t&&this.layout&&n&&so(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=gn(this.layout.layoutBox.x);i.x.min=t.target.x.min,i.x.max=i.x.min+e;const n=gn(this.layout.layoutBox.y);i.y.min=t.target.y.min,i.y.max=i.y.min+n}gs(e,i),On(e,s),xn(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new ks);this.sharedNodes.get(t).add(e);const i=e.options.initialPromotionConfig;e.promote({transition:i?i.transition:void 0,preserveFollowOpacity:i&&i.shouldPreserveFollowOpacity?i.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){const{layoutId:t}=this.options;return t&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:t}=this.options;return t?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:i}={}){const n=this.getStack();n&&n.promote(this,i),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:i}=t;if((i.z||i.rotate||i.rotateX||i.rotateY||i.rotateZ||i.skewX||i.skewY)&&(e=!0),!e)return;const n={};i.z&&Bs("z",t,n,this.animationValues);for(let e=0;e<Ls.length;e++)Bs(`rotate${Ls[e]}`,t,n,this.animationValues),Bs(`skew${Ls[e]}`,t,n,this.animationValues);t.render();for(const e in n)t.setStaticValue(e,n[e]),this.animationValues&&(this.animationValues[e]=n[e]);t.scheduleRender()}applyProjectionStyles(t,e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(t.visibility="hidden");const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.visibility="",t.opacity="",t.pointerEvents=S(e?.pointerEvents)||"",void(t.transform=i?i(this.latestValues,""):"none");const n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target)return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=S(e?.pointerEvents)||""),void(this.hasProjected&&!Vn(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1));t.visibility="";const s=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=function(t,e,i){let n="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=i?.z||0;if((s||o||r)&&(n=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(n+=`scale(${1/e.x}, ${1/e.y}) `),i){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=i;t&&(n=`perspective(${t}px) ${n}`),e&&(n+=`rotate(${e}deg) `),s&&(n+=`rotateX(${s}deg) `),o&&(n+=`rotateY(${o}deg) `),r&&(n+=`skewX(${r}deg) `),a&&(n+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(n+=`scale(${a}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,s);i&&(o=i(s,o)),t.transform=o;const{x:r,y:a}=this.projectionDelta;t.transformOrigin=`${100*r.origin}% ${100*a.origin}% 0`,n.animationValues?t.opacity=n===this?s.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:t.opacity=n===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in A){if(void 0===s[e])continue;const{correct:i,applyTo:r,isCSSVariable:a}=A[e],l="none"===o?s[e]:i(s[e],n);if(r){const e=r.length;for(let i=0;i<e;i++)t[r[i]]=l}else a?this.options.visualElement.renderState.vars[e]=l:t[e]=l}this.options.layoutId&&(t.pointerEvents=n===this?S(e?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>t.currentAnimation?.stop()),this.root.nodes.forEach(Ws),this.root.sharedNodes.clear()}}}function Os(t){t.updateLayout()}function Us(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:n}=t.layout,{animationType:s}=t.options,o=e.source!==t.layout.source;"size"===s?An(t=>{const n=o?e.measuredBox[t]:e.layoutBox[t],s=gn(n);n.min=i[t].min,n.max=n.min+s}):so(s,e.layoutBox,i)&&An(n=>{const s=o?e.measuredBox[n]:e.layoutBox[n],r=gn(i[n]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[n].max=t.relativeTarget[n].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};xn(r,i,e.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?xn(a,t.applyTransform(n,!0),e.measuredBox):xn(a,i,e.layoutBox);const l=!bs(r);let h=!1;if(!t.resumeFrom){const n=t.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:s,layout:o}=n;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};wn(r,e.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};wn(a,i,o.layoutBox),Ms(r,a)||(h=!0),n.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=n)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:h})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Ns(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function $s(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Ks(t){t.clearSnapshot()}function Ws(t){t.clearMeasurements()}function zs(t){t.isLayoutDirty=!1}function Ys(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Xs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Hs(t){t.resolveTargetDelta()}function Gs(t){t.calcProjection()}function qs(t){t.resetSkewAndRotation()}function _s(t){t.removeLeadSnapshot()}function Zs(e,i,n){e.translate=t(i.translate,0,n),e.scale=t(i.scale,1,n),e.origin=i.origin,e.originPoint=i.originPoint}function Js(e,i,n,s){e.min=t(i.min,n.min,s),e.max=t(i.max,n.max,s)}function Qs(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const to={duration:.45,ease:[.4,0,.1,1]},eo=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),io=eo("applewebkit/")&&!eo("chrome/")?Math.round:lt;function no(t){t.min=io(t.min),t.max=io(t.max)}function so(t,e,i){return"position"===t||"preserve-aspect"===t&&(n=Ds(e),s=Ds(i),o=.2,!(Math.abs(n-s)<=o));var n,s,o}function oo(t){return t!==t.root&&t.scroll?.wasRoot}const ro=Is({attachResizeListener:(t,e)=>pn(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ao={current:void 0},lo=Is({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ao.current){const t=new ro({});t.mount(window),t.setOptions({layoutScroll:!0}),ao.current=t}return ao.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),ho={current:null},uo={current:!1};const co=new WeakMap;const po=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class mo{scrapeMotionValuesFromProps(t,e,i){return{}}constructor({parent:t,props:e,presenceContext:i,reducedMotionConfig:n,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=oi,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.renderScheduledAt=0,this.scheduleRender=()=>{const t=Kt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,Ft.render(this.render,!1,!0))};const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=i,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=E(e),this.isVariantNode=V(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:h,...u}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in u){const e=u[t];void 0!==a[t]&&T(e)&&e.set(a[t])}}mount(t){this.current=t,co.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,e)=>this.bindToMotionValue(e,t)),uo.current||function(){if(uo.current=!0,b)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ho.current=t.matches;t.addEventListener("change",e),e()}else ho.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ho.current),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),It(this.notifyUpdate),It(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const i=x.has(t);i&&this.onBindTransform&&this.onBindTransform();const n=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&Ft.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{n(),s&&s(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in M){const e=M[t];if(!e)continue;const{isEnabled:i,Feature:n}=e;if(!this.features[t]&&n&&i(this.props)&&(this.features[t]=new n(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<po.length;e++){const i=po[e];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const n=t["on"+i];n&&(this.propEventSubscriptions[i]=this.on(i,n))}this.prevMotionValues=function(t,e,i){for(const n in e){const s=e[n],o=i[n];if(T(s))t.addValue(n,s);else if(T(o))t.addValue(n,Ki(s,{owner:t}));else if(o!==s)if(t.hasValue(n)){const e=t.getValue(n);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(n);t.addValue(n,Ki(void 0!==e?e:s,{owner:t}))}}for(const n in i)void 0===e[n]&&t.removeValue(n);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const i=this.values.get(t);e!==i&&(i&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let i=this.values.get(t);return void 0===i&&void 0!==e&&(i=Ki(null===e?void 0:e,{owner:this}),this.addValue(t,i)),i}readValue(t,e){let i=void 0===this.latestValues[t]&&this.current?this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var n;return null!=i&&("string"==typeof i&&(st(i)||rt(i))?i=parseFloat(i):(n=i,!on.find(Mi(n))&&r.test(e)&&(i=Oi(t,e))),this.setBaseTarget(t,T(i)?i.get():i)),T(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){const{initial:e}=this.props;let i;if("string"==typeof e||"object"==typeof e){const n=D(this.props,e,this.presenceContext?.custom);n&&(i=n[t])}if(e&&void 0!==i)return i;const n=this.getBaseTargetFromProps(this.props,t);return void 0===n||T(n)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:n}on(t,e){return this.events[t]||(this.events[t]=new dt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}scheduleRenderMicrotask(){Wi.render(this.render)}}class fo extends mo{constructor(){super(...arguments),this.KeyframeResolver=Ni}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:i}){delete e[t],delete i[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;T(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}}function yo(t,{style:e,vars:i},n,s){const o=t.style;let r;for(r in e)o[r]=e[r];for(r in s?.applyProjectionStyles(o,n),i)o.setProperty(r,i[r])}class go extends fo{constructor(){super(...arguments),this.type="html",this.renderInstance=yo}readValueFromInstance(t,e){if(x.has(e))return this.projection?.isProjecting?Xe(e):((t,e)=>{const{transform:i="none"}=getComputedStyle(t);return He(i,e)})(t,e);{const n=(i=t,window.getComputedStyle(i)),s=(C(e)?n.getPropertyValue(e):n[e])||0;return"string"==typeof s?s.trim():s}var i}measureInstanceViewportBox(t,{transformPagePoint:e}){return Un(t,e)}build(t,e,i){k(t,e,i.transformTemplate)}scrapeMotionValuesFromProps(t,e,i){return R(t,e,i)}}let vo=!1;class xo extends _{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:i,layoutId:n}=this.props,{projection:s}=t;s&&(e.group&&e.group.add(s),i&&i.register&&n&&i.register(s),vo&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Rs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:i,drag:n,isPresent:s}=this.props,{projection:o}=i;return o?(o.isPresent=s,vo=!0,n||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Ft.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Wi.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:i}=this.props,{projection:n}=t;vo=!0,n&&(n.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(n),i&&i.deregister&&i.deregister(n))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function To(t){const[e,i]=function(t=!0){const e=X(L);if(null===e)return[!0,null];const{isPresent:i,onExitComplete:n,register:s}=e,o=H();G(()=>{if(t)return s(o)},[t]);const r=q(()=>t&&n&&n(o),[o,n,t]);return!i&&n?[!1,r]:[!0]}(),n=X(j);return Y(xo,{...t,layoutGroup:n,switchLayoutGroup:X(B),isPresent:e,safeToRemove:i})}const Po={pan:{Feature:class extends rn{constructor(){super(...arguments),this.removePointerDownListener=lt}onPointerDown(t){this.session=new Wn(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Nn(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:i,onPanEnd:n}=this.node.getProps();return{onSessionStart:ss(t),onStart:ss(e),onMove:i,onEnd:(t,e)=>{delete this.session,n&&Ft.postRender(()=>n(t,e))}}}mount(){this.removePointerDownListener=fn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends rn{constructor(t){super(t),this.removeGroupControls=lt,this.removeListeners=lt,this.controls=new is(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||lt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:lo,MeasureLayout:To}},wo={layout:{ProjectionNode:lo,MeasureLayout:To}};function So(t,e,i){const n=t.getProps();return D(n,e,void 0!==i?i:n.custom,t)}const Ao=t=>Array.isArray(t);function bo(t,e,i){t.hasValue(e)?t.getValue(e).set(i):t.addValue(e,Ki(i))}function Eo(t){return Ao(t)?t[t.length-1]||0:t}function Vo({protectedKeys:t,needsAnimating:e},i){const n=t.hasOwnProperty(i)&&!0!==e[i];return e[i]=!1,n}function Mo(t,e,{delay:i=0,transitionOverride:n,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;n&&(o=n);const l=[],h=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const n=t.getValue(e,t.latestValues[e]??null),s=a[e];if(void 0===s||h&&Vo(h,e))continue;const r={delay:i,...Ei(o||{},e)},u=n.get();if(void 0!==u&&!n.isAnimating&&!Array.isArray(s)&&s===u&&!r.velocity)continue;let c=!1;if(window.MotionHandoffAnimation){const i=os(t);if(i){const t=window.MotionHandoffAnimation(i,e,Ft);null!==t&&(r.startTime=t,c=!0)}}$n(t,e),n.start(dn(e,n,s,t.shouldReduceMotion&&Vi.has(e)?{type:!1}:r,t,c));const d=n.animation;d&&l.push(d)}return r&&Promise.all(l).then(()=>{Ft.update(()=>{r&&function(t,e){const i=So(t,e);let{transitionEnd:n={},transition:s={},...o}=i||{};o={...o,...n};for(const e in o)bo(t,e,Eo(o[e]))}(t,r)})}),l}function Do(t,e,i,n=0,s=1){const o=Array.from(t).sort((t,e)=>t.sortNodePosition(e)).indexOf(e),r=t.size,a=(r-1)*n;return"function"==typeof i?i(o,r):1===s?o*n:a-o*n}function Co(t,e,i={}){const n=So(t,e,"exit"===i.type?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=n||{};i.transitionOverride&&(s=i.transitionOverride);const o=n?()=>Promise.all(Mo(t,n,i)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(n=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;return function(t,e,i=0,n=0,s=0,o=1,r){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(Co(l,e,{...r,delay:i+("function"==typeof n?0:n)+Do(t.variantChildren,l,n,s,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}(t,e,n,o,r,a,i)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then(()=>e())}return Promise.all([o(),r(i.delay)])}function ko(t,e){if(!Array.isArray(e))return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n<i;n++)if(e[n]!==t[n])return!1;return!0}const Ro=I.length;function Lo(t){if(!t)return;if(!t.isControllingVariants){const e=t.parent&&Lo(t.parent)||{};return void 0!==t.props.initial&&(e.initial=t.props.initial),e}const e={};for(let i=0;i<Ro;i++){const n=I[i],s=t.props[n];(F(s)||!1===s)&&(e[n]=s)}return e}const jo=[...U].reverse(),Bo=U.length;function Fo(t){return e=>Promise.all(e.map(({animation:e,options:i})=>function(t,e,i={}){let n;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>Co(t,e,i));n=Promise.all(s)}else if("string"==typeof e)n=Co(t,e,i);else{const s="function"==typeof e?So(t,e,i.custom):e;n=Promise.all(Mo(t,s,i))}return n.then(()=>{t.notify("AnimationComplete",e)})}(t,e,i)))}function Io(t){let e=Fo(t),i=No(),n=!0;const s=e=>(i,n)=>{const s=So(t,n,"exit"===e?t.presenceContext?.custom:void 0);if(s){const{transition:t,transitionEnd:e,...n}=s;i={...i,...n,...e}}return i};function o(o){const{props:r}=t,a=Lo(t.parent)||{},l=[],h=new Set;let u={},c=1/0;for(let e=0;e<Bo;e++){const d=jo[e],p=i[d],m=void 0!==r[d]?r[d]:a[d],f=F(m),y=d===o?p.isActive:null;!1===y&&(c=e);let g=m===a[d]&&m!==r[d]&&f;if(g&&n&&t.manuallyAnimateOnMount&&(g=!1),p.protectedKeys={...u},!p.isActive&&null===y||!m&&!p.prevProp||O(m)||"boolean"==typeof m)continue;const v=Oo(p.prevProp,m);let x=v||d===o&&p.isActive&&!g&&f||e>c&&f,T=!1;const P=Array.isArray(m)?m:[m];let w=P.reduce(s(d),{});!1===y&&(w={});const{prevResolvedValues:S={}}=p,A={...S,...w},b=e=>{x=!0,h.has(e)&&(T=!0,h.delete(e)),p.needsAnimating[e]=!0;const i=t.getValue(e);i&&(i.liveStyle=!1)};for(const t in A){const e=w[t],i=S[t];if(u.hasOwnProperty(t))continue;let n=!1;n=Ao(e)&&Ao(i)?!ko(e,i):e!==i,n?null!=e?b(t):h.add(t):void 0!==e&&h.has(t)?b(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=w,p.isActive&&(u={...u,...w}),n&&t.blockInitialAnimation&&(x=!1);const E=g&&v;x&&(!E||T)&&l.push(...P.map(e=>{const i={type:d};if("string"==typeof e&&n&&!E&&t.manuallyAnimateOnMount&&t.parent){const{parent:n}=t,s=So(n,e);if(n.enteringChildren&&s){const{delayChildren:e}=s.transition||{};i.delay=Do(n.enteringChildren,t,e)}}return{animation:e,options:i}}))}if(h.size){const e={};if("boolean"!=typeof r.initial){const i=So(t,Array.isArray(r.initial)?r.initial[0]:r.initial);i&&i.transition&&(e.transition=i.transition)}h.forEach(i=>{const n=t.getBaseTarget(i),s=t.getValue(i);s&&(s.liveStyle=!0),e[i]=n??null}),l.push({animation:e})}let d=Boolean(l.length);return!n||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),n=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,n){if(i[e].isActive===n)return Promise.resolve();t.variantChildren?.forEach(t=>t.animationState?.setActive(e,n)),i[e].isActive=n;const s=o(e);for(const t in i)i[t].protectedKeys={};return s},setAnimateFunction:function(i){e=i(t)},getState:()=>i,reset:()=>{i=No()}}}function Oo(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!ko(e,t)}function Uo(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function No(){return{animate:Uo(!0),whileInView:Uo(),whileHover:Uo(),whileTap:Uo(),whileDrag:Uo(),whileFocus:Uo(),exit:Uo()}}let $o=0;const Ko={animation:{Feature:class extends rn{constructor(t){super(t),t.animationState||(t.animationState=Io(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();O(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends rn{constructor(){super(...arguments),this.id=$o++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const n=this.node.animationState.setActive("exit",!t);e&&!t&&n.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function Wo(t,e,i){const{props:n}=t;t.animationState&&n.whileHover&&t.animationState.setActive("whileHover","Start"===i);const s=n["onHover"+i];s&&Ft.postRender(()=>s(e,mn(e)))}function zo(t,e,i){const{props:n}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&n.whileTap&&t.animationState.setActive("whileTap","Start"===i);const s=n["onTap"+("End"===i?"":i)];s&&Ft.postRender(()=>s(e,mn(e)))}const Yo=new WeakMap,Xo=new WeakMap,Ho=t=>{const e=Yo.get(t.target);e&&e(t)},Go=t=>{t.forEach(Ho)};function qo(t,e,i){const n=function({root:t,...e}){const i=t||document;Xo.has(i)||Xo.set(i,{});const n=Xo.get(i),s=JSON.stringify(e);return n[s]||(n[s]=new IntersectionObserver(Go,{root:t,...e})),n[s]}(e);return Yo.set(t,i),n.observe(t),()=>{Yo.delete(t),n.unobserve(t)}}const _o={some:0,all:1};const Zo={inView:{Feature:class extends rn{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:i,amount:n="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:i,threshold:"number"==typeof n?n:_o[n]};return qo(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:i,onViewportLeave:n}=this.node.getProps(),o=e?i:n;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return i=>t[i]!==e[i]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends rn{mount(){const{current:t}=this.node;t&&(this.unmount=nn(t,(t,e)=>(zo(this.node,e,"Start"),(t,{success:e})=>zo(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends rn{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){t=!0}t&&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=ut(pn(this.node.current,"focus",()=>this.onFocus()),pn(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends rn{mount(){const{current:t}=this.node;t&&(this.unmount=function(t,e,i={}){const[n,s,o]=Hi(t,i),r=t=>{if(!Gi(t))return;const{target:i}=t,n=e(i,t);if("function"!=typeof n||!i)return;const o=t=>{Gi(t)&&(n(t),i.removeEventListener("pointerleave",o))};i.addEventListener("pointerleave",o,s)};return n.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}(t,(t,e)=>(Wo(this.node,e,"Start"),t=>Wo(this.node,t,"End"))))}unmount(){}}}},Jo=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"]);class Qo extends fo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Sn}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(x.has(e)){const t=Ii(e);return t&&t.default||0}return e=Jo.has(e)?e:N(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,i){return $(t,e,i)}build(t,e,i){K(t,e,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(t,e,i,n){!function(t,e,i,n){yo(t,e,void 0,n);for(const i in e.attrs)t.setAttribute(Jo.has(i)?i:N(i),e.attrs[i])}(t,e,0,n)}mount(t){this.isSVGTag=W(t.tagName),super.mount(t)}}const tr={renderer:(t,e)=>z(t)?new Qo(e):new go(e,{allowProjection:t!==Z}),...Ko,...Zo},er={...tr,...Po,...wo};export{er as domMax};
|
package/dist/size-rollup-m.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
import{jsxs as t,jsx as r}from"react/jsx-runtime";import{createContext as n,useContext as e,useMemo as o,Fragment as a,createElement as s,useRef as i,useCallback as u,useLayoutEffect as l,useEffect as c,useInsertionEffect as f,forwardRef as d}from"react";const p=(t,r,n)=>n>r?r:n<t?t:n,m=n({}),g=n({strict:!1}),h=n({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),y=n({});function v(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function b(t){return"string"==typeof t||Array.isArray(t)}const w=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function x(t){return v(t.animate)||w.some(r=>b(t[r]))}function S(t){const{initial:r,animate:n}=function(t,r){if(x(t)){const{initial:r,animate:n}=t;return{initial:!1===r||b(r)?r:void 0,animate:b(n)?n:void 0}}return!1!==t.inherit?r:{}}(t,e(y));return o(()=>({initial:r,animate:n}),[T(r),T(n)])}function T(t){return Array.isArray(t)?t.join(" "):t}const R=(t=>r=>"string"==typeof r&&r.startsWith(t))("--"),M={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},O={...M,transform:t=>p(0,1,t)},P={...M,default:1},L=t=>Math.round(1e5*t)/1e5,W=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const k=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,A=(t,r)=>n=>Boolean("string"==typeof n&&k.test(n)&&n.startsWith(t)||r&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,r)),B=(t,r,n)=>e=>{if("string"!=typeof e)return e;const[o,a,s,i]=e.match(W);return{[t]:parseFloat(o),[r]:parseFloat(a),[n]:parseFloat(s),alpha:void 0!==i?parseFloat(i):1}},I={...M,transform:t=>Math.round((t=>p(0,255,t))(t))},C={test:A("rgb","red"),parse:B("red","green","blue"),transform:({red:t,green:r,blue:n,alpha:e=1})=>"rgba("+I.transform(t)+", "+I.transform(r)+", "+I.transform(n)+", "+L(O.transform(e))+")"};const j={test:A("#"),parse:function(t){let r="",n="",e="",o="";return t.length>5?(r=t.substring(1,3),n=t.substring(3,5),e=t.substring(5,7),o=t.substring(7,9)):(r=t.substring(1,2),n=t.substring(2,3),e=t.substring(3,4),o=t.substring(4,5),r+=r,n+=n,e+=e,o+=o),{red:parseInt(r,16),green:parseInt(n,16),blue:parseInt(e,16),alpha:o?parseInt(o,16)/255:1}},transform:C.transform},E=t=>({test:r=>"string"==typeof r&&r.endsWith(t)&&1===r.split(" ").length,parse:parseFloat,transform:r=>`${r}${t}`}),$=E("deg"),F=E("%"),V=E("px"),X=(()=>({...F,parse:t=>F.parse(t)/100,transform:t=>F.transform(100*t)}))(),Y={test:A("hsl","hue"),parse:B("hue","saturation","lightness"),transform:({hue:t,saturation:r,lightness:n,alpha:e=1})=>"hsla("+Math.round(t)+", "+F.transform(L(r))+", "+F.transform(L(n))+", "+L(O.transform(e))+")"},D={test:t=>C.test(t)||j.test(t)||Y.test(t),parse:t=>C.test(t)?C.parse(t):Y.test(t)?Y.parse(t):j.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?C.transform(t):Y.transform(t),getAnimatableNone:t=>{const r=D.parse(t);return r.alpha=0,D.transform(r)}},H=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const N="number",Z="color",z=/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 U(t){const r=t.toString(),n=[],e={color:[],number:[],var:[]},o=[];let a=0;const s=r.replace(z,t=>(D.test(t)?(e.color.push(a),o.push(Z),n.push(D.parse(t))):t.startsWith("var(")?(e.var.push(a),o.push("var"),n.push(t)):(e.number.push(a),o.push(N),n.push(parseFloat(t))),++a,"${}")).split("${}");return{values:n,split:s,indexes:e,types:o}}function q(t){return U(t).values}function _(t){const{split:r,types:n}=U(t),e=r.length;return t=>{let o="";for(let a=0;a<e;a++)if(o+=r[a],void 0!==t[a]){const r=n[a];o+=r===N?L(t[a]):r===Z?D.transform(t[a]):t[a]}return o}}const G=t=>"number"==typeof t?0:D.test(t)?D.getAnimatableNone(t):t;const J={test:function(t){return isNaN(t)&&"string"==typeof t&&(t.match(W)?.length||0)+(t.match(H)?.length||0)>0},parse:q,createTransformer:_,getAnimatableNone:function(t){const r=q(t);return _(t)(r.map(G))}},K=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Q=(()=>new Set(K))(),tt={...M,transform:Math.round},rt={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,radius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,backgroundPositionX:V,backgroundPositionY:V,...{rotate:$,rotateX:$,rotateY:$,rotateZ:$,scale:P,scaleX:P,scaleY:P,scaleZ:P,skew:$,skewX:$,skewY:$,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:O,originX:X,originY:X,originZ:V},zIndex:tt,fillOpacity:O,strokeOpacity:O,numOctaves:tt},nt=(t,r)=>r&&"number"==typeof t?r.transform(t):t,et=t=>Boolean(t&&t.getVelocity);function ot(t,r){return r.max===r.min?0:t/(r.max-r.min)*100}const at={correct:(t,r)=>{if(!r.target)return t;if("string"==typeof t){if(!V.test(t))return t;t=parseFloat(t)}return`${ot(t,r.target.x)}% ${ot(t,r.target.y)}%`}},st={correct:(t,{treeScale:r,projectionDelta:n})=>{const e=t,o=J.parse(t);if(o.length>5)return e;const a=J.createTransformer(t),s="number"!=typeof o[0]?1:0,i=n.x.scale*r.x,u=n.y.scale*r.y;o[0+s]/=i,o[1+s]/=u;const l=(c=i)+(u-c)*.5;var c;return"number"==typeof o[2+s]&&(o[2+s]/=l),"number"==typeof o[3+s]&&(o[3+s]/=l),a(o)}},it={borderRadius:{...at,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:at,borderTopRightRadius:at,borderBottomLeftRadius:at,borderBottomRightRadius:at,boxShadow:st};function ut(t,{layout:r,layoutId:n}){return Q.has(t)||t.startsWith("origin")||(r||void 0!==n)&&(!!it[t]||"opacity"===t)}const lt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ct=K.length;function ft(t,r,n){const{style:e,vars:o,transformOrigin:a}=t;let s=!1,i=!1;for(const t in r){const n=r[t];if(Q.has(t))s=!0;else if(R(t))o[t]=n;else{const r=nt(n,rt[t]);t.startsWith("origin")?(i=!0,a[t]=r):e[t]=r}}if(r.transform||(s||n?e.transform=function(t,r,n){let e="",o=!0;for(let a=0;a<ct;a++){const s=K[a],i=t[s];if(void 0===i)continue;let u=!0;if(u="number"==typeof i?i===(s.startsWith("scale")?1:0):0===parseFloat(i),!u||n){const t=nt(i,rt[s]);u||(o=!1,e+=`${lt[s]||s}(${t}) `),n&&(r[s]=t)}}return e=e.trim(),n?e=n(r,o?"":e):o&&(e="none"),e}(r,t.transform,n):e.transform&&(e.transform="none")),i){const{originX:t="50%",originY:r="50%",originZ:n=0}=a;e.transformOrigin=`${t} ${r} ${n}`}}const dt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pt(t,r,n){for(const e in r)et(r[e])||ut(e,n)||(t[e]=r[e])}function mt(t,r){const n={};return pt(n,t.style||{},t),Object.assign(n,function({transformTemplate:t},r){return o(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return ft(n,r,t),Object.assign({},n.vars,n.style)},[r])}(t,r)),n}function gt(t,r){const n={},e=mt(t,r);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,e.userSelect=e.WebkitUserSelect=e.WebkitTouchCallout="none",e.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=e,n}const ht={offset:"stroke-dashoffset",array:"stroke-dasharray"},yt={offset:"strokeDashoffset",array:"strokeDasharray"};function vt(t,{attrX:r,attrY:n,attrScale:e,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...i},u,l,c){if(ft(t,i,l),u)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:f,style:d}=t;f.transform&&(d.transform=f.transform,delete f.transform),(d.transform||f.transformOrigin)&&(d.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),d.transform&&(d.transformBox=c?.transformBox??"fill-box",delete f.transformBox),void 0!==r&&(f.x=r),void 0!==n&&(f.y=n),void 0!==e&&(f.scale=e),void 0!==o&&function(t,r,n=1,e=0,o=!0){t.pathLength=1;const a=o?ht:yt;t[a.offset]=V.transform(-e);const s=V.transform(r),i=V.transform(n);t[a.array]=`${s} ${i}`}(f,o,a,s,!1)}const bt=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function wt(t,r,n,e){const a=o(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};var o;return vt(n,r,"string"==typeof(o=e)&&"svg"===o.toLowerCase(),t.transformTemplate,t.style),{...n.attrs,style:{...n.style}}},[r]);if(t.style){const r={};pt(r,t.style,t),a.style={...r,...a.style}}return a}const xt=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 St(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||xt.has(t)}let Tt=t=>!St(t);try{"function"==typeof(Rt=require("@emotion/is-prop-valid").default)&&(Tt=t=>t.startsWith("on")?!St(t):Rt(t))}catch{}var Rt;const Mt=["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 Ot(t){return"string"==typeof t&&!t.includes("-")&&!!(Mt.indexOf(t)>-1||/[A-Z]/u.test(t))}function Pt(t,r,n,{latestValues:e},i,u=!1){const l=(Ot(t)?wt:gt)(r,e,i,t),c=function(t,r,n){const e={};for(const o in t)"values"===o&&"object"==typeof t.values||(Tt(o)||!0===n&&St(o)||!r&&!St(o)||t.draggable&&o.startsWith("onDrag"))&&(e[o]=t[o]);return e}(r,"string"==typeof t,u),f=t!==a?{...c,...l,ref:n}:{},{children:d}=r,p=o(()=>et(d)?d.get():d,[d]);return s(t,{...f,children:p})}const Lt=n(null);function Wt(t,r,n,e){if("function"==typeof r){const[n,e]=[{},{}];r=r(t.custom,n,e)}if("string"==typeof r&&(r=t.variants&&t.variants[r]),"function"==typeof r){const[n,e]=[{},{}];r=r(t.custom,n,e)}return r}function kt(t){return et(t)?t.get():t}function At(t,r,n,e){const o={},a=e(t,{});for(const t in a)o[t]=kt(a[t]);let{initial:s,animate:i}=t;const u=x(t),l=function(t){return Boolean(x(t)||t.variants)}(t);r&&l&&!u&&!1!==t.inherit&&(void 0===s&&(s=r.initial),void 0===i&&(i=r.animate));let c=!!n&&!1===n.initial;c=c||!1===s;const f=c?i:s;if(f&&"boolean"!=typeof f&&!v(f)){const r=Array.isArray(f)?f:[f];for(let n=0;n<r.length;n++){const e=Wt(t,r[n]);if(e){const{transitionEnd:t,transition:r,...n}=e;for(const t in n){let r=n[t];if(Array.isArray(r)){r=r[c?r.length-1:0]}null!==r&&(o[t]=r)}for(const r in t)o[r]=t[r]}}}return o}const Bt=t=>(r,n)=>{const o=e(y),a=e(Lt),s=()=>function({scrapeMotionValuesFromProps:t,createRenderState:r},n,e,o){return{latestValues:At(n,e,o,t),renderState:r()}}(t,r,o,a);return n?s():function(t){const r=i(null);return null===r.current&&(r.current=t()),r.current}(s)};function It(t,r,n){const{style:e}=t,o={};for(const a in e)(et(e[a])||r.style&&et(r.style[a])||ut(a,t)||void 0!==n?.getValue(a)?.liveStyle)&&(o[a]=e[a]);return o}const Ct=Bt({scrapeMotionValuesFromProps:It,createRenderState:dt});const jt=Bt({scrapeMotionValuesFromProps:function(t,r,n){const e=It(t,r,n);for(const n in t)if(et(t[n])||et(r[n])){e[-1!==K.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return e},createRenderState:bt}),Et="undefined"!=typeof window,$t={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"]},Ft={};for(const t in $t)Ft[t]={isEnabled:r=>$t[t].some(t=>!!r[t])};const Vt=Symbol.for("motionComponentSymbol");function Xt(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function Yt(t,r,n){return u(e=>{e&&t.onMount&&t.onMount(e),r&&(e?r.mount(e):r.unmount()),n&&("function"==typeof n?n(e):Xt(n)&&(n.current=e))},[r])}const Dt="data-"+"framerAppearId".replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();const Ht=n({}),Nt=Et?l:c;function Zt(t,r,n,o,a){const{visualElement:s}=e(y),u=e(g),l=e(Lt),d=e(h).reducedMotion,p=i(null);o=o||u.renderer,!p.current&&o&&(p.current=o(t,{visualState:r,parent:s,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:d}));const m=p.current,v=e(Ht);!m||m.projection||!a||"html"!==m.type&&"svg"!==m.type||function(t,r,n,e){const{layoutId:o,layout:a,drag:s,dragConstraints:i,layoutScroll:u,layoutRoot:l,layoutCrossfade:c}=r;t.projection=new n(t.latestValues,r["data-framer-portal-id"]?void 0:zt(t.parent)),t.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:Boolean(s)||i&&Xt(i),visualElement:t,animationType:"string"==typeof a?a:"both",initialPromotionConfig:e,crossfade:c,layoutScroll:u,layoutRoot:l})}(p.current,n,a,v);const b=i(!1);f(()=>{m&&b.current&&m.update(n,l)});const w=n[Dt],x=i(Boolean(w)&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return Nt(()=>{m&&(b.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),x.current&&m.animationState&&m.animationState.animateChanges())}),c(()=>{m&&(!x.current&&m.animationState&&m.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),x.current=!1),m.enteringChildren=void 0)}),m}function zt(t){if(t)return!1!==t.options.allowProjection?t.projection:zt(t.parent)}function Ut(n,{forwardMotionProps:o=!1}={},a,s){const i=Ot(n)?jt:Ct;function u(a,u){let l;const c={...e(h),...a,layoutId:qt(a)},{isStatic:f}=c,d=S(a),p=i(a,f);if(!f&&Et){e(g).strict;const t=function(t){const{drag:r,layout:n}=Ft;if(!r&&!n)return{};const e={...r,...n};return{MeasureLayout:r?.isEnabled(t)||n?.isEnabled(t)?e.MeasureLayout:void 0,ProjectionNode:e.ProjectionNode}}(c);l=t.MeasureLayout,d.visualElement=Zt(n,p,c,s,t.ProjectionNode)}return t(y.Provider,{value:d,children:[l&&d.visualElement?r(l,{visualElement:d.visualElement,...c}):null,Pt(n,a,Yt(p,d.visualElement,u),p,f,o)]})}u.displayName=`motion.${"string"==typeof n?n:`create(${n.displayName??n.name??""})`}`;const l=d(u);return l[Vt]=n,l}function qt({layoutId:t}){const r=e(m).id;return r&&void 0!==t?r+"-"+t:t}function _t(t,r){return Ut(t,r)}const Gt=_t("div");export{Gt as MotionDiv};
|
|
2
|
+
//# sourceMappingURL=size-rollup-m.js.map
|