{ "version": 3, "sources": ["../../../../../../node_modules/.pnpm/easing-utils@1.0.0/node_modules/easing-utils/lib/easing.js", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-utils/dist/es/noop.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-utils/dist/es/errors.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-utils/dist/es/memo.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/scroll-timeline.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/animation/controls/BaseGroup.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/animation/controls/Group.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-utils/dist/es/progress.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-utils/dist/es/time-conversion.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/utils/calc-duration.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/animation/generators/utils/is-generator.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/mix/number.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/offsets/fill.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/offsets/default.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/utils/resolve-elements.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/animation/utils/get-value-transition.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/utils/attach-timeline.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/flags.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/memo.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/utils/supports/linear-easing.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/utils/is-bezier-definition.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/utils/linear.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/motion-dom/dist/es/animation/waapi/utils/easing.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/stats/animation-count.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/stats/buffer.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/animation/animators/waapi/index.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/numbers/units.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/value-types/number-browser.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/get-final-keyframe.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/style.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/clamp.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/velocity-per-second.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/GlobalConfig.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/frameloop/order.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/frameloop/render-step.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/frameloop/batcher.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/frameloop/frame.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/easing/cubic-bezier.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/easing/modifiers/mirror.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/easing/modifiers/reverse.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/easing/back.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/easing/circ.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/numbers/index.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/utils/sanitize.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/utils/float-regex.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/utils/is-nullish.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/utils/single-color-regex.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/color/utils.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/color/rgba.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/color/hex.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/color/hsla.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/color/index.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/utils/color-regex.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/value/types/complex/index.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/hsla-to-rgba.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/mix/immediate.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/mix/color.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/pipe.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/mix/visibility.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/mix/complex.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/mix/index.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/easing/ease.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/utils/interpolate.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/scroll/observe.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/resize/handle-element.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/resize/handle-window.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/resize/index.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/scroll/info.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/inset.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/edge.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/offset.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/presets.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/scroll/on-scroll-handler.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/scroll/track.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/scroll/index.mjs", "../../../../../../node_modules/.pnpm/motion@12.4.7/node_modules/motion/dist/es/framer-motion/dist/es/render/dom/viewport/index.mjs", "../../Private/Fusion/Helper/EasingFunctions.ts", "../../Private/Fusion/Helper/index.ts", "../../Private/Fusion/Main.ts"], "sourcesContent": ["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.linear = linear;\nexports.easeInSine = easeInSine;\nexports.easeOutSine = easeOutSine;\nexports.easeInOutSine = easeInOutSine;\nexports.easeInQuad = easeInQuad;\nexports.easeOutQuad = easeOutQuad;\nexports.easeInOutQuad = easeInOutQuad;\nexports.easeInCubic = easeInCubic;\nexports.easeOutCubic = easeOutCubic;\nexports.easeInOutCubic = easeInOutCubic;\nexports.easeInQuart = easeInQuart;\nexports.easeOutQuart = easeOutQuart;\nexports.easeInOutQuart = easeInOutQuart;\nexports.easeInQuint = easeInQuint;\nexports.easeOutQuint = easeOutQuint;\nexports.easeInOutQuint = easeInOutQuint;\nexports.easeInExpo = easeInExpo;\nexports.easeOutExpo = easeOutExpo;\nexports.easeInOutExpo = easeInOutExpo;\nexports.easeInCirc = easeInCirc;\nexports.easeOutCirc = easeOutCirc;\nexports.easeInOutCirc = easeInOutCirc;\nexports.easeInBack = easeInBack;\nexports.easeOutBack = easeOutBack;\nexports.easeInOutBack = easeInOutBack;\nexports.easeInElastic = easeInElastic;\nexports.easeOutElastic = easeOutElastic;\nexports.easeInOutElastic = easeInOutElastic;\nexports.easeOutBounce = easeOutBounce;\nexports.easeInBounce = easeInBounce;\nexports.easeInOutBounce = easeInOutBounce;\n// Based on https://gist.github.com/gre/1650294\n\n// No easing, no acceleration\nfunction linear(t) {\n return t;\n}\n\n// Slight acceleration from zero to full speed\nfunction easeInSine(t) {\n return -1 * Math.cos(t * (Math.PI / 2)) + 1;\n}\n\n// Slight deceleration at the end\nfunction easeOutSine(t) {\n return Math.sin(t * (Math.PI / 2));\n}\n\n// Slight acceleration at beginning and slight deceleration at end\nfunction easeInOutSine(t) {\n return -0.5 * (Math.cos(Math.PI * t) - 1);\n}\n\n// Accelerating from zero velocity\nfunction easeInQuad(t) {\n return t * t;\n}\n\n// Decelerating to zero velocity\nfunction easeOutQuad(t) {\n return t * (2 - t);\n}\n\n// Acceleration until halfway, then deceleration\nfunction easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n}\n\n// Accelerating from zero velocity\nfunction easeInCubic(t) {\n return t * t * t;\n}\n\n// Decelerating to zero velocity\nfunction easeOutCubic(t) {\n var t1 = t - 1;\n return t1 * t1 * t1 + 1;\n}\n\n// Acceleration until halfway, then deceleration\nfunction easeInOutCubic(t) {\n return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n}\n\n// Accelerating from zero velocity\nfunction easeInQuart(t) {\n return t * t * t * t;\n}\n\n// Decelerating to zero velocity\nfunction easeOutQuart(t) {\n var t1 = t - 1;\n return 1 - t1 * t1 * t1 * t1;\n}\n\n// Acceleration until halfway, then deceleration\nfunction easeInOutQuart(t) {\n var t1 = t - 1;\n return t < 0.5 ? 8 * t * t * t * t : 1 - 8 * t1 * t1 * t1 * t1;\n}\n\n// Accelerating from zero velocity\nfunction easeInQuint(t) {\n return t * t * t * t * t;\n}\n\n// Decelerating to zero velocity\nfunction easeOutQuint(t) {\n var t1 = t - 1;\n return 1 + t1 * t1 * t1 * t1 * t1;\n}\n\n// Acceleration until halfway, then deceleration\nfunction easeInOutQuint(t) {\n var t1 = t - 1;\n return t < 0.5 ? 16 * t * t * t * t * t : 1 + 16 * t1 * t1 * t1 * t1 * t1;\n}\n\n// Accelerate exponentially until finish\nfunction easeInExpo(t) {\n\n if (t === 0) {\n return 0;\n }\n\n return Math.pow(2, 10 * (t - 1));\n}\n\n// Initial exponential acceleration slowing to stop\nfunction easeOutExpo(t) {\n\n if (t === 1) {\n return 1;\n }\n\n return -Math.pow(2, -10 * t) + 1;\n}\n\n// Exponential acceleration and deceleration\nfunction easeInOutExpo(t) {\n\n if (t === 0 || t === 1) {\n return t;\n }\n\n var scaledTime = t * 2;\n var scaledTime1 = scaledTime - 1;\n\n if (scaledTime < 1) {\n return 0.5 * Math.pow(2, 10 * scaledTime1);\n }\n\n return 0.5 * (-Math.pow(2, -10 * scaledTime1) + 2);\n}\n\n// Increasing velocity until stop\nfunction easeInCirc(t) {\n\n var scaledTime = t / 1;\n return -1 * (Math.sqrt(1 - scaledTime * t) - 1);\n}\n\n// Start fast, decreasing velocity until stop\nfunction easeOutCirc(t) {\n\n var t1 = t - 1;\n return Math.sqrt(1 - t1 * t1);\n}\n\n// Fast increase in velocity, fast decrease in velocity\nfunction easeInOutCirc(t) {\n\n var scaledTime = t * 2;\n var scaledTime1 = scaledTime - 2;\n\n if (scaledTime < 1) {\n return -0.5 * (Math.sqrt(1 - scaledTime * scaledTime) - 1);\n }\n\n return 0.5 * (Math.sqrt(1 - scaledTime1 * scaledTime1) + 1);\n}\n\n// Slow movement backwards then fast snap to finish\nfunction easeInBack(t) {\n var magnitude = arguments.length <= 1 || arguments[1] === undefined ? 1.70158 : arguments[1];\n\n\n var scaledTime = t / 1;\n return scaledTime * scaledTime * ((magnitude + 1) * scaledTime - magnitude);\n}\n\n// Fast snap to backwards point then slow resolve to finish\nfunction easeOutBack(t) {\n var magnitude = arguments.length <= 1 || arguments[1] === undefined ? 1.70158 : arguments[1];\n\n\n var scaledTime = t / 1 - 1;\n\n return scaledTime * scaledTime * ((magnitude + 1) * scaledTime + magnitude) + 1;\n}\n\n// Slow movement backwards, fast snap to past finish, slow resolve to finish\nfunction easeInOutBack(t) {\n var magnitude = arguments.length <= 1 || arguments[1] === undefined ? 1.70158 : arguments[1];\n\n\n var scaledTime = t * 2;\n var scaledTime2 = scaledTime - 2;\n\n var s = magnitude * 1.525;\n\n if (scaledTime < 1) {\n\n return 0.5 * scaledTime * scaledTime * ((s + 1) * scaledTime - s);\n }\n\n return 0.5 * (scaledTime2 * scaledTime2 * ((s + 1) * scaledTime2 + s) + 2);\n}\n// Bounces slowly then quickly to finish\nfunction easeInElastic(t) {\n var magnitude = arguments.length <= 1 || arguments[1] === undefined ? 0.7 : arguments[1];\n\n\n if (t === 0 || t === 1) {\n return t;\n }\n\n var scaledTime = t / 1;\n var scaledTime1 = scaledTime - 1;\n\n var p = 1 - magnitude;\n var s = p / (2 * Math.PI) * Math.asin(1);\n\n return -(Math.pow(2, 10 * scaledTime1) * Math.sin((scaledTime1 - s) * (2 * Math.PI) / p));\n}\n\n// Fast acceleration, bounces to zero\nfunction easeOutElastic(t) {\n var magnitude = arguments.length <= 1 || arguments[1] === undefined ? 0.7 : arguments[1];\n\n\n var p = 1 - magnitude;\n var scaledTime = t * 2;\n\n if (t === 0 || t === 1) {\n return t;\n }\n\n var s = p / (2 * Math.PI) * Math.asin(1);\n return Math.pow(2, -10 * scaledTime) * Math.sin((scaledTime - s) * (2 * Math.PI) / p) + 1;\n}\n\n// Slow start and end, two bounces sandwich a fast motion\nfunction easeInOutElastic(t) {\n var magnitude = arguments.length <= 1 || arguments[1] === undefined ? 0.65 : arguments[1];\n\n\n var p = 1 - magnitude;\n\n if (t === 0 || t === 1) {\n return t;\n }\n\n var scaledTime = t * 2;\n var scaledTime1 = scaledTime - 1;\n\n var s = p / (2 * Math.PI) * Math.asin(1);\n\n if (scaledTime < 1) {\n return -0.5 * (Math.pow(2, 10 * scaledTime1) * Math.sin((scaledTime1 - s) * (2 * Math.PI) / p));\n }\n\n return Math.pow(2, -10 * scaledTime1) * Math.sin((scaledTime1 - s) * (2 * Math.PI) / p) * 0.5 + 1;\n}\n\n// Bounce to completion\nfunction easeOutBounce(t) {\n\n var scaledTime = t / 1;\n\n if (scaledTime < 1 / 2.75) {\n\n return 7.5625 * scaledTime * scaledTime;\n } else if (scaledTime < 2 / 2.75) {\n\n var scaledTime2 = scaledTime - 1.5 / 2.75;\n return 7.5625 * scaledTime2 * scaledTime2 + 0.75;\n } else if (scaledTime < 2.5 / 2.75) {\n\n var _scaledTime = scaledTime - 2.25 / 2.75;\n return 7.5625 * _scaledTime * _scaledTime + 0.9375;\n } else {\n\n var _scaledTime2 = scaledTime - 2.625 / 2.75;\n return 7.5625 * _scaledTime2 * _scaledTime2 + 0.984375;\n }\n}\n\n// Bounce increasing in velocity until completion\nfunction easeInBounce(t) {\n return 1 - easeOutBounce(1 - t);\n}\n\n// Bounce in and bounce out\nfunction easeInOutBounce(t) {\n\n if (t < 0.5) {\n\n return easeInBounce(t * 2) * 0.5;\n }\n\n return easeOutBounce(t * 2 - 1) * 0.5 + 0.5;\n}\n", "/*#__NO_SIDE_EFFECTS__*/\nconst noop = (any) => any;\n\nexport { noop };\n", "import { noop } from './noop.mjs';\n\nlet warning = noop;\nlet invariant = noop;\nif (process.env.NODE_ENV !== \"production\") {\n warning = (check, message) => {\n if (!check && typeof console !== \"undefined\") {\n console.warn(message);\n }\n };\n invariant = (check, message) => {\n if (!check) {\n throw new Error(message);\n }\n };\n}\n\nexport { invariant, warning };\n", "/*#__NO_SIDE_EFFECTS__*/\nfunction memo(callback) {\n let result;\n return () => {\n if (result === undefined)\n result = callback();\n return result;\n };\n}\n\nexport { memo };\n", "import '../../../../../motion-utils/dist/es/errors.mjs';\nimport { memo } from '../../../../../motion-utils/dist/es/memo.mjs';\n\nconst supportsScrollTimeline = memo(() => window.ScrollTimeline !== undefined);\n\nexport { supportsScrollTimeline };\n", "import { supportsScrollTimeline } from '../../utils/supports/scroll-timeline.mjs';\n\nclass BaseGroupPlaybackControls {\n constructor(animations) {\n // Bound to accomodate common `return animation.stop` pattern\n this.stop = () => this.runAll(\"stop\");\n this.animations = animations.filter(Boolean);\n }\n get finished() {\n // Support for new finished Promise and legacy thennable API\n return Promise.all(this.animations.map((animation) => \"finished\" in animation ? animation.finished : animation));\n }\n /**\n * TODO: Filter out cancelled or stopped animations before returning\n */\n getAll(propName) {\n return this.animations[0][propName];\n }\n setAll(propName, newValue) {\n for (let i = 0; i < this.animations.length; i++) {\n this.animations[i][propName] = newValue;\n }\n }\n attachTimeline(timeline, fallback) {\n const subscriptions = this.animations.map((animation) => {\n if (supportsScrollTimeline() && animation.attachTimeline) {\n return animation.attachTimeline(timeline);\n }\n else if (typeof fallback === \"function\") {\n return fallback(animation);\n }\n });\n return () => {\n subscriptions.forEach((cancel, i) => {\n cancel && cancel();\n this.animations[i].stop();\n });\n };\n }\n get time() {\n return this.getAll(\"time\");\n }\n set time(time) {\n this.setAll(\"time\", time);\n }\n get speed() {\n return this.getAll(\"speed\");\n }\n set speed(speed) {\n this.setAll(\"speed\", speed);\n }\n get startTime() {\n return this.getAll(\"startTime\");\n }\n get duration() {\n let max = 0;\n for (let i = 0; i < this.animations.length; i++) {\n max = Math.max(max, this.animations[i].duration);\n }\n return max;\n }\n runAll(methodName) {\n this.animations.forEach((controls) => controls[methodName]());\n }\n flatten() {\n this.runAll(\"flatten\");\n }\n play() {\n this.runAll(\"play\");\n }\n pause() {\n this.runAll(\"pause\");\n }\n cancel() {\n this.runAll(\"cancel\");\n }\n complete() {\n this.runAll(\"complete\");\n }\n}\n\nexport { BaseGroupPlaybackControls };\n", "import { BaseGroupPlaybackControls } from './BaseGroup.mjs';\n\n/**\n * TODO: This is a temporary class to support the legacy\n * thennable API\n */\nclass GroupPlaybackControls extends BaseGroupPlaybackControls {\n then(onResolve, onReject) {\n return Promise.all(this.animations).then(onResolve).catch(onReject);\n }\n}\n\nexport { GroupPlaybackControls };\n", "/*\n Progress within given range\n\n Given a lower limit and an upper limit, we return the progress\n (expressed as a number 0-1) represented by the given value, and\n limit that progress to within 0-1.\n\n @param [number]: Lower limit\n @param [number]: Upper limit\n @param [number]: Value to find progress within given range\n @return [number]: Progress of value within range as expressed 0-1\n*/\n/*#__NO_SIDE_EFFECTS__*/\nconst progress = (from, to, value) => {\n const toFromDifference = to - from;\n return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;\n};\n\nexport { progress };\n", "/**\n * Converts seconds to milliseconds\n *\n * @param seconds - Time in seconds.\n * @return milliseconds - Converted time in milliseconds.\n */\n/*#__NO_SIDE_EFFECTS__*/\nconst secondsToMilliseconds = (seconds) => seconds * 1000;\n/*#__NO_SIDE_EFFECTS__*/\nconst millisecondsToSeconds = (milliseconds) => milliseconds / 1000;\n\nexport { millisecondsToSeconds, secondsToMilliseconds };\n", "/**\n * Implement a practical max duration for keyframe generation\n * to prevent infinite loops\n */\nconst maxGeneratorDuration = 20000;\nfunction calcGeneratorDuration(generator) {\n let duration = 0;\n const timeStep = 50;\n let state = generator.next(duration);\n while (!state.done && duration < maxGeneratorDuration) {\n duration += timeStep;\n state = generator.next(duration);\n }\n return duration >= maxGeneratorDuration ? Infinity : duration;\n}\n\nexport { calcGeneratorDuration, maxGeneratorDuration };\n", "import '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { millisecondsToSeconds } from '../../../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';\n\n/**\n * Create a progress => progress easing function from a generator.\n */\nfunction createGeneratorEasing(options, scale = 100, createGenerator) {\n const generator = createGenerator({ ...options, keyframes: [0, scale] });\n const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);\n return {\n type: \"keyframes\",\n ease: (progress) => {\n return generator.next(duration * progress).value / scale;\n },\n duration: millisecondsToSeconds(duration),\n };\n}\n\nexport { createGeneratorEasing };\n", "function isGenerator(type) {\n return typeof type === \"function\";\n}\n\nexport { isGenerator };\n", "/*\n Value in range from progress\n\n Given a lower limit and an upper limit, we return the value within\n that range as expressed by progress (usually a number from 0 to 1)\n\n So progress = 0.5 would change\n\n from -------- to\n\n to\n\n from ---- to\n\n E.g. from = 10, to = 20, progress = 0.5 => 15\n\n @param [number]: Lower limit of range\n @param [number]: Upper limit of range\n @param [number]: The progress between lower and upper limits expressed 0-1\n @return [number]: Value as calculated from progress within range (not limited within range)\n*/\nconst mixNumber = (from, to, progress) => {\n return from + (to - from) * progress;\n};\n\nexport { mixNumber };\n", "import '../../../../../motion-utils/dist/es/errors.mjs';\nimport { progress } from '../../../../../motion-utils/dist/es/progress.mjs';\nimport { mixNumber } from '../mix/number.mjs';\n\nfunction fillOffset(offset, remaining) {\n const min = offset[offset.length - 1];\n for (let i = 1; i <= remaining; i++) {\n const offsetProgress = progress(0, remaining, i);\n offset.push(mixNumber(min, 1, offsetProgress));\n }\n}\n\nexport { fillOffset };\n", "import { fillOffset } from './fill.mjs';\n\nfunction defaultOffset(arr) {\n const offset = [0];\n fillOffset(offset, arr.length - 1);\n return offset;\n}\n\nexport { defaultOffset };\n", "function resolveElements(elementOrSelector, scope, selectorCache) {\n var _a;\n if (elementOrSelector instanceof EventTarget) {\n return [elementOrSelector];\n }\n else if (typeof elementOrSelector === \"string\") {\n let root = document;\n if (scope) {\n // TODO: Refactor to utils package\n // invariant(\n // Boolean(scope.current),\n // \"Scope provided, but no element detected.\"\n // )\n root = scope.current;\n }\n const elements = (_a = selectorCache === null || selectorCache === void 0 ? void 0 : selectorCache[elementOrSelector]) !== null && _a !== void 0 ? _a : root.querySelectorAll(elementOrSelector);\n return elements ? Array.from(elements) : [];\n }\n return Array.from(elementOrSelector);\n}\n\nexport { resolveElements };\n", "function getValueTransition(transition, key) {\n return transition\n ? transition[key] ||\n transition[\"default\"] ||\n transition\n : undefined;\n}\n\nexport { getValueTransition };\n", "function attachTimeline(animation, timeline) {\n animation.timeline = timeline;\n animation.onfinish = null;\n}\n\nexport { attachTimeline };\n", "import '../../../../../motion-utils/dist/es/errors.mjs';\nimport { noop } from '../../../../../motion-utils/dist/es/noop.mjs';\nimport { millisecondsToSeconds, secondsToMilliseconds } from '../../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { attachTimeline } from './utils/attach-timeline.mjs';\n\nclass NativeAnimationControls {\n constructor(animation) {\n this.animation = animation;\n }\n get duration() {\n var _a, _b, _c;\n const durationInMs = ((_b = (_a = this.animation) === null || _a === void 0 ? void 0 : _a.effect) === null || _b === void 0 ? void 0 : _b.getComputedTiming().duration) ||\n ((_c = this.options) === null || _c === void 0 ? void 0 : _c.duration) ||\n 300;\n return millisecondsToSeconds(Number(durationInMs));\n }\n get time() {\n var _a;\n if (this.animation) {\n return millisecondsToSeconds(((_a = this.animation) === null || _a === void 0 ? void 0 : _a.currentTime) || 0);\n }\n return 0;\n }\n set time(newTime) {\n if (this.animation) {\n this.animation.currentTime = secondsToMilliseconds(newTime);\n }\n }\n get speed() {\n return this.animation ? this.animation.playbackRate : 1;\n }\n set speed(newSpeed) {\n if (this.animation) {\n this.animation.playbackRate = newSpeed;\n }\n }\n get state() {\n return this.animation ? this.animation.playState : \"finished\";\n }\n get startTime() {\n return this.animation ? this.animation.startTime : null;\n }\n get finished() {\n return this.animation ? this.animation.finished : Promise.resolve();\n }\n play() {\n this.animation && this.animation.play();\n }\n pause() {\n this.animation && this.animation.pause();\n }\n stop() {\n if (!this.animation ||\n this.state === \"idle\" ||\n this.state === \"finished\") {\n return;\n }\n if (this.animation.commitStyles) {\n this.animation.commitStyles();\n }\n this.cancel();\n }\n flatten() {\n var _a;\n if (!this.animation)\n return;\n (_a = this.animation.effect) === null || _a === void 0 ? void 0 : _a.updateTiming({ easing: \"linear\" });\n }\n attachTimeline(timeline) {\n if (this.animation)\n attachTimeline(this.animation, timeline);\n return noop;\n }\n complete() {\n this.animation && this.animation.finish();\n }\n cancel() {\n try {\n this.animation && this.animation.cancel();\n }\n catch (e) { }\n }\n}\n\nexport { NativeAnimationControls };\n", "/**\n * Add the ability for test suites to manually set support flags\n * to better test more environments.\n */\nconst supportsFlags = {\n linearEasing: undefined,\n};\n\nexport { supportsFlags };\n", "import '../../../../../motion-utils/dist/es/errors.mjs';\nimport { memo } from '../../../../../motion-utils/dist/es/memo.mjs';\nimport { supportsFlags } from './flags.mjs';\n\nfunction memoSupports(callback, supportsFlag) {\n const memoized = memo(callback);\n return () => { var _a; return (_a = supportsFlags[supportsFlag]) !== null && _a !== void 0 ? _a : memoized(); };\n}\n\nexport { memoSupports };\n", "import { memoSupports } from './memo.mjs';\n\nconst supportsLinearEasing = /*@__PURE__*/ memoSupports(() => {\n try {\n document\n .createElement(\"div\")\n .animate({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n}, \"linearEasing\");\n\nexport { supportsLinearEasing };\n", "const isBezierDefinition = (easing) => Array.isArray(easing) && typeof easing[0] === \"number\";\n\nexport { isBezierDefinition };\n", "import '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { progress } from '../../../../../../motion-utils/dist/es/progress.mjs';\n\nconst generateLinearEasing = (easing, duration, // as milliseconds\nresolution = 10 // as milliseconds\n) => {\n let points = \"\";\n const numPoints = Math.max(Math.round(duration / resolution), 2);\n for (let i = 0; i < numPoints; i++) {\n points += easing(progress(0, numPoints - 1, i)) + \", \";\n }\n return `linear(${points.substring(0, points.length - 2)})`;\n};\n\nexport { generateLinearEasing };\n", "import { isBezierDefinition } from '../../../utils/is-bezier-definition.mjs';\nimport { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';\nimport { generateLinearEasing } from './linear.mjs';\n\nfunction isWaapiSupportedEasing(easing) {\n return Boolean((typeof easing === \"function\" && supportsLinearEasing()) ||\n !easing ||\n (typeof easing === \"string\" &&\n (easing in supportedWaapiEasing || supportsLinearEasing())) ||\n isBezierDefinition(easing) ||\n (Array.isArray(easing) && easing.every(isWaapiSupportedEasing)));\n}\nconst cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\nconst supportedWaapiEasing = {\n linear: \"linear\",\n ease: \"ease\",\n easeIn: \"ease-in\",\n easeOut: \"ease-out\",\n easeInOut: \"ease-in-out\",\n circIn: /*@__PURE__*/ cubicBezierAsString([0, 0.65, 0.55, 1]),\n circOut: /*@__PURE__*/ cubicBezierAsString([0.55, 0, 1, 0.45]),\n backIn: /*@__PURE__*/ cubicBezierAsString([0.31, 0.01, 0.66, -0.59]),\n backOut: /*@__PURE__*/ cubicBezierAsString([0.33, 1.53, 0.69, 0.99]),\n};\nfunction mapEasingToNativeEasing(easing, duration) {\n if (!easing) {\n return undefined;\n }\n else if (typeof easing === \"function\" && supportsLinearEasing()) {\n return generateLinearEasing(easing, duration);\n }\n else if (isBezierDefinition(easing)) {\n return cubicBezierAsString(easing);\n }\n else if (Array.isArray(easing)) {\n return easing.map((segmentEasing) => mapEasingToNativeEasing(segmentEasing, duration) ||\n supportedWaapiEasing.easeOut);\n }\n else {\n return supportedWaapiEasing[easing];\n }\n}\n\nexport { cubicBezierAsString, isWaapiSupportedEasing, mapEasingToNativeEasing, supportedWaapiEasing };\n", "const activeAnimations = {\n layout: 0,\n mainThread: 0,\n waapi: 0,\n};\n\nexport { activeAnimations };\n", "const statsBuffer = {\n value: null,\n addProjectionMetrics: null,\n};\n\nexport { statsBuffer };\n", "import '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { mapEasingToNativeEasing } from '../../../../../../motion-dom/dist/es/animation/waapi/utils/easing.mjs';\nimport { activeAnimations } from '../../../stats/animation-count.mjs';\nimport { statsBuffer } from '../../../stats/buffer.mjs';\n\nfunction startWaapiAnimation(element, valueName, keyframes, { delay = 0, duration = 300, repeat = 0, repeatType = \"loop\", ease = \"easeInOut\", times, } = {}) {\n const keyframeOptions = { [valueName]: keyframes };\n if (times)\n keyframeOptions.offset = times;\n const easing = mapEasingToNativeEasing(ease, duration);\n /**\n * If this is an easing array, apply to keyframes, not animation as a whole\n */\n if (Array.isArray(easing))\n keyframeOptions.easing = easing;\n if (statsBuffer.value) {\n activeAnimations.waapi++;\n }\n const animation = element.animate(keyframeOptions, {\n delay,\n duration,\n easing: !Array.isArray(easing) ? easing : \"linear\",\n fill: \"both\",\n iterations: repeat + 1,\n direction: repeatType === \"reverse\" ? \"alternate\" : \"normal\",\n });\n if (statsBuffer.value) {\n animation.finished.finally(() => {\n activeAnimations.waapi--;\n });\n }\n return animation;\n}\n\nexport { startWaapiAnimation };\n", "const createUnitType = (unit) => ({\n test: (v) => typeof v === \"string\" && v.endsWith(unit) && v.split(\" \").length === 1,\n parse: parseFloat,\n transform: (v) => `${v}${unit}`,\n});\nconst degrees = /*@__PURE__*/ createUnitType(\"deg\");\nconst percent = /*@__PURE__*/ createUnitType(\"%\");\nconst px = /*@__PURE__*/ createUnitType(\"px\");\nconst vh = /*@__PURE__*/ createUnitType(\"vh\");\nconst vw = /*@__PURE__*/ createUnitType(\"vw\");\nconst progressPercentage = {\n ...percent,\n parse: (v) => percent.parse(v) / 100,\n transform: (v) => percent.transform(v * 100),\n};\n\nexport { degrees, percent, progressPercentage, px, vh, vw };\n", "import { px } from '../../../value/types/numbers/units.mjs';\n\nconst browserNumberValueTypes = {\n // Border props\n borderWidth: px,\n borderTopWidth: px,\n borderRightWidth: px,\n borderBottomWidth: px,\n borderLeftWidth: px,\n borderRadius: px,\n radius: px,\n borderTopLeftRadius: px,\n borderTopRightRadius: px,\n borderBottomRightRadius: px,\n borderBottomLeftRadius: px,\n // Positioning props\n width: px,\n maxWidth: px,\n height: px,\n maxHeight: px,\n top: px,\n right: px,\n bottom: px,\n left: px,\n // Spacing props\n padding: px,\n paddingTop: px,\n paddingRight: px,\n paddingBottom: px,\n paddingLeft: px,\n margin: px,\n marginTop: px,\n marginRight: px,\n marginBottom: px,\n marginLeft: px,\n // Misc\n backgroundPositionX: px,\n backgroundPositionY: px,\n};\n\nexport { browserNumberValueTypes };\n", "const isNotNull = (value) => value !== null;\nfunction getFinalKeyframe(keyframes, { repeat, repeatType = \"loop\" }, finalKeyframe) {\n const resolvedKeyframes = keyframes.filter(isNotNull);\n const index = repeat && repeatType !== \"loop\" && repeat % 2 === 1\n ? 0\n : resolvedKeyframes.length - 1;\n return !index || finalKeyframe === undefined\n ? resolvedKeyframes[index]\n : finalKeyframe;\n}\n\nexport { getFinalKeyframe };\n", "function setCSSVar(element, name, value) {\n element.style.setProperty(name, value);\n}\nfunction setStyle(element, name, value) {\n element.style[name] = value;\n}\n\nexport { setCSSVar, setStyle };\n", "import '../../../../../../../motion-utils/dist/es/errors.mjs';\nimport { memo } from '../../../../../../../motion-utils/dist/es/memo.mjs';\n\nconst supportsPartialKeyframes = /*@__PURE__*/ memo(() => {\n try {\n document.createElement(\"div\").animate({ opacity: [1] });\n }\n catch (e) {\n return false;\n }\n return true;\n});\n\nexport { supportsPartialKeyframes };\n", "import '../../../../../../../motion-utils/dist/es/errors.mjs';\nimport { memo } from '../../../../../../../motion-utils/dist/es/memo.mjs';\n\nconst supportsWaapi = /*@__PURE__*/ memo(() => Object.hasOwnProperty.call(Element.prototype, \"animate\"));\n\nexport { supportsWaapi };\n", "import { invariant } from '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { secondsToMilliseconds } from '../../../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { createGeneratorEasing } from '../../../../../../motion-dom/dist/es/animation/generators/utils/create-generator-easing.mjs';\nimport { isGenerator } from '../../../../../../motion-dom/dist/es/animation/generators/utils/is-generator.mjs';\nimport { NativeAnimationControls } from '../../../../../../motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs';\nimport { supportsLinearEasing } from '../../../../../../motion-dom/dist/es/utils/supports/linear-easing.mjs';\nimport { startWaapiAnimation } from './index.mjs';\nimport { browserNumberValueTypes } from '../../../render/dom/value-types/number-browser.mjs';\nimport { getFinalKeyframe } from './utils/get-final-keyframe.mjs';\nimport { setCSSVar, setStyle } from './utils/style.mjs';\nimport { supportsPartialKeyframes } from './utils/supports-partial-keyframes.mjs';\nimport { supportsWaapi } from './utils/supports-waapi.mjs';\n\nconst state = new WeakMap();\nfunction hydrateKeyframes(valueName, keyframes, read) {\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] === null) {\n keyframes[i] = i === 0 ? read() : keyframes[i - 1];\n }\n if (typeof keyframes[i] === \"number\" &&\n browserNumberValueTypes[valueName]) {\n keyframes[i] = browserNumberValueTypes[valueName].transform(keyframes[i]);\n }\n }\n if (!supportsPartialKeyframes() && keyframes.length < 2) {\n keyframes.unshift(read());\n }\n}\nconst defaultEasing = \"easeOut\";\nfunction getElementAnimationState(element) {\n const animationState = state.get(element) || new Map();\n state.set(element, animationState);\n return state.get(element);\n}\nclass NativeAnimation extends NativeAnimationControls {\n constructor(element, valueName, valueKeyframes, options) {\n const isCSSVar = valueName.startsWith(\"--\");\n invariant(typeof options.type !== \"string\", `animateMini doesn't support \"type\" as a string. Did you mean to import { spring } from \"framer-motion\"?`);\n const existingAnimation = getElementAnimationState(element).get(valueName);\n existingAnimation && existingAnimation.stop();\n const readInitialKeyframe = () => {\n return valueName.startsWith(\"--\")\n ? element.style.getPropertyValue(valueName)\n : window.getComputedStyle(element)[valueName];\n };\n if (!Array.isArray(valueKeyframes)) {\n valueKeyframes = [valueKeyframes];\n }\n hydrateKeyframes(valueName, valueKeyframes, readInitialKeyframe);\n // TODO: Replace this with toString()?\n if (isGenerator(options.type)) {\n const generatorOptions = createGeneratorEasing(options, 100, options.type);\n options.ease = supportsLinearEasing()\n ? generatorOptions.ease\n : defaultEasing;\n options.duration = secondsToMilliseconds(generatorOptions.duration);\n options.type = \"keyframes\";\n }\n else {\n options.ease = options.ease || defaultEasing;\n }\n const onFinish = () => {\n this.setValue(element, valueName, getFinalKeyframe(valueKeyframes, options));\n this.cancel();\n this.resolveFinishedPromise();\n };\n const init = () => {\n this.setValue = isCSSVar ? setCSSVar : setStyle;\n this.options = options;\n this.updateFinishedPromise();\n this.removeAnimation = () => {\n const elementState = state.get(element);\n elementState && elementState.delete(valueName);\n };\n };\n if (!supportsWaapi()) {\n super();\n init();\n onFinish();\n }\n else {\n super(startWaapiAnimation(element, valueName, valueKeyframes, options));\n init();\n if (options.autoplay === false) {\n this.animation.pause();\n }\n this.animation.onfinish = onFinish;\n getElementAnimationState(element).set(valueName, this);\n }\n }\n /**\n * Allows the returned animation to be awaited or promise-chained. Currently\n * resolves when the animation finishes at all but in a future update could/should\n * reject if its cancels.\n */\n then(resolve, reject) {\n return this.currentFinishedPromise.then(resolve, reject);\n }\n updateFinishedPromise() {\n this.currentFinishedPromise = new Promise((resolve) => {\n this.resolveFinishedPromise = resolve;\n });\n }\n play() {\n if (this.state === \"finished\") {\n this.updateFinishedPromise();\n }\n super.play();\n }\n cancel() {\n this.removeAnimation();\n super.cancel();\n }\n}\n\nexport { NativeAnimation };\n", "import { invariant } from '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { secondsToMilliseconds } from '../../../../../../motion-utils/dist/es/time-conversion.mjs';\nimport { getValueTransition } from '../../../../../../motion-dom/dist/es/animation/utils/get-value-transition.mjs';\nimport { resolveElements } from '../../../../../../motion-dom/dist/es/utils/resolve-elements.mjs';\nimport { NativeAnimation } from './NativeAnimation.mjs';\n\nfunction animateElements(elementOrSelector, keyframes, options, scope) {\n const elements = resolveElements(elementOrSelector, scope);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid element provided.\");\n const animations = [];\n for (let i = 0; i < numElements; i++) {\n const element = elements[i];\n const elementTransition = { ...options };\n /**\n * Resolve stagger function if provided.\n */\n if (typeof elementTransition.delay === \"function\") {\n elementTransition.delay = elementTransition.delay(i, numElements);\n }\n for (const valueName in keyframes) {\n const valueKeyframes = keyframes[valueName];\n const valueOptions = {\n ...getValueTransition(elementTransition, valueName),\n };\n valueOptions.duration = valueOptions.duration\n ? secondsToMilliseconds(valueOptions.duration)\n : valueOptions.duration;\n valueOptions.delay = secondsToMilliseconds(valueOptions.delay || 0);\n animations.push(new NativeAnimation(element, valueName, valueKeyframes, valueOptions));\n }\n }\n return animations;\n}\n\nexport { animateElements };\n", "import { GroupPlaybackControls } from '../../../../../../motion-dom/dist/es/animation/controls/Group.mjs';\nimport '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { animateElements } from './animate-elements.mjs';\n\nconst createScopedWaapiAnimate = (scope) => {\n function scopedAnimate(elementOrSelector, keyframes, options) {\n return new GroupPlaybackControls(animateElements(elementOrSelector, keyframes, options, scope));\n }\n return scopedAnimate;\n};\nconst animateMini = /*@__PURE__*/ createScopedWaapiAnimate();\n\nexport { animateMini, createScopedWaapiAnimate };\n", "const clamp = (min, max, v) => {\n if (v > max)\n return max;\n if (v < min)\n return min;\n return v;\n};\n\nexport { clamp };\n", "/*\n Convert velocity into velocity per second\n\n @param [number]: Unit per frame\n @param [number]: Frame duration in ms\n*/\nfunction velocityPerSecond(velocity, frameDuration) {\n return frameDuration ? velocity * (1000 / frameDuration) : 0;\n}\n\nexport { velocityPerSecond };\n", "const MotionGlobalConfig = {\n skipAnimations: false,\n useManualTiming: false,\n};\n\nexport { MotionGlobalConfig };\n", "const stepsOrder = [\n \"read\", // Read\n \"resolveKeyframes\", // Write/Read/Write/Read\n \"update\", // Compute\n \"preRender\", // Compute\n \"render\", // Write\n \"postRender\", // Compute\n];\n\nexport { stepsOrder };\n", "import { statsBuffer } from '../stats/buffer.mjs';\n\nfunction createRenderStep(runNextFrame, stepName) {\n /**\n * We create and reuse two queues, one to queue jobs for the current frame\n * and one for the next. We reuse to avoid triggering GC after x frames.\n */\n let thisFrame = new Set();\n let nextFrame = new Set();\n /**\n * Track whether we're currently processing jobs in this step. This way\n * we can decide whether to schedule new jobs for this frame or next.\n */\n let isProcessing = false;\n let flushNextFrame = false;\n /**\n * A set of processes which were marked keepAlive when scheduled.\n */\n const toKeepAlive = new WeakSet();\n let latestFrameData = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n let numCalls = 0;\n function triggerCallback(callback) {\n if (toKeepAlive.has(callback)) {\n step.schedule(callback);\n runNextFrame();\n }\n numCalls++;\n callback(latestFrameData);\n }\n const step = {\n /**\n * Schedule a process to run on the next frame.\n */\n schedule: (callback, keepAlive = false, immediate = false) => {\n const addToCurrentFrame = immediate && isProcessing;\n const queue = addToCurrentFrame ? thisFrame : nextFrame;\n if (keepAlive)\n toKeepAlive.add(callback);\n if (!queue.has(callback))\n queue.add(callback);\n return callback;\n },\n /**\n * Cancel the provided callback from running on the next frame.\n */\n cancel: (callback) => {\n nextFrame.delete(callback);\n toKeepAlive.delete(callback);\n },\n /**\n * Execute all schedule callbacks.\n */\n process: (frameData) => {\n latestFrameData = frameData;\n /**\n * If we're already processing we've probably been triggered by a flushSync\n * inside an existing process. Instead of executing, mark flushNextFrame\n * as true and ensure we flush the following frame at the end of this one.\n */\n if (isProcessing) {\n flushNextFrame = true;\n return;\n }\n isProcessing = true;\n [thisFrame, nextFrame] = [nextFrame, thisFrame];\n // Execute this frame\n thisFrame.forEach(triggerCallback);\n /**\n * If we're recording stats then\n */\n if (stepName && statsBuffer.value) {\n statsBuffer.value.frameloop[stepName].push(numCalls);\n }\n numCalls = 0;\n // Clear the frame so no callbacks remain. This is to avoid\n // memory leaks should this render step not run for a while.\n thisFrame.clear();\n isProcessing = false;\n if (flushNextFrame) {\n flushNextFrame = false;\n step.process(frameData);\n }\n },\n };\n return step;\n}\n\nexport { createRenderStep };\n", "import { MotionGlobalConfig } from '../utils/GlobalConfig.mjs';\nimport { stepsOrder } from './order.mjs';\nimport { createRenderStep } from './render-step.mjs';\n\nconst maxElapsed = 40;\nfunction createRenderBatcher(scheduleNextBatch, allowKeepAlive) {\n let runNextFrame = false;\n let useDefaultElapsed = true;\n const state = {\n delta: 0.0,\n timestamp: 0.0,\n isProcessing: false,\n };\n const flagRunNextFrame = () => (runNextFrame = true);\n const steps = stepsOrder.reduce((acc, key) => {\n acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined);\n return acc;\n }, {});\n const { read, resolveKeyframes, update, preRender, render, postRender } = steps;\n const processBatch = () => {\n const timestamp = MotionGlobalConfig.useManualTiming\n ? state.timestamp\n : performance.now();\n runNextFrame = false;\n if (!MotionGlobalConfig.useManualTiming) {\n state.delta = useDefaultElapsed\n ? 1000 / 60\n : Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);\n }\n state.timestamp = timestamp;\n state.isProcessing = true;\n // Unrolled render loop for better per-frame performance\n read.process(state);\n resolveKeyframes.process(state);\n update.process(state);\n preRender.process(state);\n render.process(state);\n postRender.process(state);\n state.isProcessing = false;\n if (runNextFrame && allowKeepAlive) {\n useDefaultElapsed = false;\n scheduleNextBatch(processBatch);\n }\n };\n const wake = () => {\n runNextFrame = true;\n useDefaultElapsed = true;\n if (!state.isProcessing) {\n scheduleNextBatch(processBatch);\n }\n };\n const schedule = stepsOrder.reduce((acc, key) => {\n const step = steps[key];\n acc[key] = (process, keepAlive = false, immediate = false) => {\n if (!runNextFrame)\n wake();\n return step.schedule(process, keepAlive, immediate);\n };\n return acc;\n }, {});\n const cancel = (process) => {\n for (let i = 0; i < stepsOrder.length; i++) {\n steps[stepsOrder[i]].cancel(process);\n }\n };\n return { schedule, cancel, state, steps };\n}\n\nexport { createRenderBatcher };\n", "import '../../../../motion-utils/dist/es/errors.mjs';\nimport { noop } from '../../../../motion-utils/dist/es/noop.mjs';\nimport { createRenderBatcher } from './batcher.mjs';\n\nconst { schedule: frame, cancel: cancelFrame, state: frameData, steps: frameSteps, } = createRenderBatcher(typeof requestAnimationFrame !== \"undefined\" ? requestAnimationFrame : noop, true);\n\nexport { cancelFrame, frame, frameData, frameSteps };\n", "import '../../../../motion-utils/dist/es/errors.mjs';\nimport { noop } from '../../../../motion-utils/dist/es/noop.mjs';\n\n/*\n Bezier function generator\n This has been modified from Ga\u00EBtan Renaudeau's BezierEasing\n https://github.com/gre/bezier-easing/blob/master/src/index.js\n https://github.com/gre/bezier-easing/blob/master/LICENSE\n \n I've removed the newtonRaphsonIterate algo because in benchmarking it\n wasn't noticiably faster than binarySubdivision, indeed removing it\n usually improved times, depending on the curve.\n I also removed the lookup table, as for the added bundle size and loop we're\n only cutting ~4 or so subdivision iterations. I bumped the max iterations up\n to 12 to compensate and this still tended to be faster for no perceivable\n loss in accuracy.\n Usage\n const easeOut = cubicBezier(.17,.67,.83,.67);\n const x = easeOut(0.5); // returns 0.627...\n*/\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nconst calcBezier = (t, a1, a2) => (((1.0 - 3.0 * a2 + 3.0 * a1) * t + (3.0 * a2 - 6.0 * a1)) * t + 3.0 * a1) *\n t;\nconst subdivisionPrecision = 0.0000001;\nconst subdivisionMaxIterations = 12;\nfunction binarySubdivide(x, lowerBound, upperBound, mX1, mX2) {\n let currentX;\n let currentT;\n let i = 0;\n do {\n currentT = lowerBound + (upperBound - lowerBound) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - x;\n if (currentX > 0.0) {\n upperBound = currentT;\n }\n else {\n lowerBound = currentT;\n }\n } while (Math.abs(currentX) > subdivisionPrecision &&\n ++i < subdivisionMaxIterations);\n return currentT;\n}\nfunction cubicBezier(mX1, mY1, mX2, mY2) {\n // If this is a linear gradient, return linear easing\n if (mX1 === mY1 && mX2 === mY2)\n return noop;\n const getTForX = (aX) => binarySubdivide(aX, 0, 1, mX1, mX2);\n // If animation is at start/end, return t without easing\n return (t) => t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);\n}\n\nexport { cubicBezier };\n", "// Accepts an easing function and returns a new one that outputs mirrored values for\n// the second half of the animation. Turns easeIn into easeInOut.\nconst mirrorEasing = (easing) => (p) => p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;\n\nexport { mirrorEasing };\n", "// Accepts an easing function and returns a new one that outputs reversed values.\n// Turns easeIn into easeOut.\nconst reverseEasing = (easing) => (p) => 1 - easing(1 - p);\n\nexport { reverseEasing };\n", "import { cubicBezier } from './cubic-bezier.mjs';\nimport { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst backOut = /*@__PURE__*/ cubicBezier(0.33, 1.53, 0.69, 0.99);\nconst backIn = /*@__PURE__*/ reverseEasing(backOut);\nconst backInOut = /*@__PURE__*/ mirrorEasing(backIn);\n\nexport { backIn, backInOut, backOut };\n", "import { mirrorEasing } from './modifiers/mirror.mjs';\nimport { reverseEasing } from './modifiers/reverse.mjs';\n\nconst circIn = (p) => 1 - Math.sin(Math.acos(p));\nconst circOut = reverseEasing(circIn);\nconst circInOut = mirrorEasing(circIn);\n\nexport { circIn, circInOut, circOut };\n", "import { clamp } from '../../../utils/clamp.mjs';\n\nconst number = {\n test: (v) => typeof v === \"number\",\n parse: parseFloat,\n transform: (v) => v,\n};\nconst alpha = {\n ...number,\n transform: (v) => clamp(0, 1, v),\n};\nconst scale = {\n ...number,\n default: 1,\n};\n\nexport { alpha, number, scale };\n", "// If this number is a decimal, make it just five decimal places\n// to avoid exponents\nconst sanitize = (v) => Math.round(v * 100000) / 100000;\n\nexport { sanitize };\n", "const floatRegex = /-?(?:\\d+(?:\\.\\d+)?|\\.\\d+)/gu;\n\nexport { floatRegex };\n", "function isNullish(v) {\n return v == null;\n}\n\nexport { isNullish };\n", "const singleColorRegex = /^(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))$/iu;\n\nexport { singleColorRegex };\n", "import { floatRegex } from '../utils/float-regex.mjs';\nimport { isNullish } from '../utils/is-nullish.mjs';\nimport { singleColorRegex } from '../utils/single-color-regex.mjs';\n\n/**\n * Returns true if the provided string is a color, ie rgba(0,0,0,0) or #000,\n * but false if a number or multiple colors\n */\nconst isColorString = (type, testProp) => (v) => {\n return Boolean((typeof v === \"string\" &&\n singleColorRegex.test(v) &&\n v.startsWith(type)) ||\n (testProp &&\n !isNullish(v) &&\n Object.prototype.hasOwnProperty.call(v, testProp)));\n};\nconst splitColor = (aName, bName, cName) => (v) => {\n if (typeof v !== \"string\")\n return v;\n const [a, b, c, alpha] = v.match(floatRegex);\n return {\n [aName]: parseFloat(a),\n [bName]: parseFloat(b),\n [cName]: parseFloat(c),\n alpha: alpha !== undefined ? parseFloat(alpha) : 1,\n };\n};\n\nexport { isColorString, splitColor };\n", "import { clamp } from '../../../utils/clamp.mjs';\nimport { alpha, number } from '../numbers/index.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst clampRgbUnit = (v) => clamp(0, 255, v);\nconst rgbUnit = {\n ...number,\n transform: (v) => Math.round(clampRgbUnit(v)),\n};\nconst rgba = {\n test: /*@__PURE__*/ isColorString(\"rgb\", \"red\"),\n parse: /*@__PURE__*/ splitColor(\"red\", \"green\", \"blue\"),\n transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => \"rgba(\" +\n rgbUnit.transform(red) +\n \", \" +\n rgbUnit.transform(green) +\n \", \" +\n rgbUnit.transform(blue) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\",\n};\n\nexport { rgbUnit, rgba };\n", "import { rgba } from './rgba.mjs';\nimport { isColorString } from './utils.mjs';\n\nfunction parseHex(v) {\n let r = \"\";\n let g = \"\";\n let b = \"\";\n let a = \"\";\n // If we have 6 characters, ie #FF0000\n if (v.length > 5) {\n r = v.substring(1, 3);\n g = v.substring(3, 5);\n b = v.substring(5, 7);\n a = v.substring(7, 9);\n // Or we have 3 characters, ie #F00\n }\n else {\n r = v.substring(1, 2);\n g = v.substring(2, 3);\n b = v.substring(3, 4);\n a = v.substring(4, 5);\n r += r;\n g += g;\n b += b;\n a += a;\n }\n return {\n red: parseInt(r, 16),\n green: parseInt(g, 16),\n blue: parseInt(b, 16),\n alpha: a ? parseInt(a, 16) / 255 : 1,\n };\n}\nconst hex = {\n test: /*@__PURE__*/ isColorString(\"#\"),\n parse: parseHex,\n transform: rgba.transform,\n};\n\nexport { hex };\n", "import { alpha } from '../numbers/index.mjs';\nimport { percent } from '../numbers/units.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\nimport { isColorString, splitColor } from './utils.mjs';\n\nconst hsla = {\n test: /*@__PURE__*/ isColorString(\"hsl\", \"hue\"),\n parse: /*@__PURE__*/ splitColor(\"hue\", \"saturation\", \"lightness\"),\n transform: ({ hue, saturation, lightness, alpha: alpha$1 = 1 }) => {\n return (\"hsla(\" +\n Math.round(hue) +\n \", \" +\n percent.transform(sanitize(saturation)) +\n \", \" +\n percent.transform(sanitize(lightness)) +\n \", \" +\n sanitize(alpha.transform(alpha$1)) +\n \")\");\n },\n};\n\nexport { hsla };\n", "import { hex } from './hex.mjs';\nimport { hsla } from './hsla.mjs';\nimport { rgba } from './rgba.mjs';\n\nconst color = {\n test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),\n parse: (v) => {\n if (rgba.test(v)) {\n return rgba.parse(v);\n }\n else if (hsla.test(v)) {\n return hsla.parse(v);\n }\n else {\n return hex.parse(v);\n }\n },\n transform: (v) => {\n return typeof v === \"string\"\n ? v\n : v.hasOwnProperty(\"red\")\n ? rgba.transform(v)\n : hsla.transform(v);\n },\n};\n\nexport { color };\n", "const colorRegex = /(?:#[\\da-f]{3,8}|(?:rgb|hsl)a?\\((?:-?[\\d.]+%?[,\\s]+){2}-?[\\d.]+%?\\s*(?:[,/]\\s*)?(?:\\b\\d+(?:\\.\\d+)?|\\.\\d+)?%?\\))/giu;\n\nexport { colorRegex };\n", "import { color } from '../color/index.mjs';\nimport { colorRegex } from '../utils/color-regex.mjs';\nimport { floatRegex } from '../utils/float-regex.mjs';\nimport { sanitize } from '../utils/sanitize.mjs';\n\nfunction test(v) {\n var _a, _b;\n return (isNaN(v) &&\n typeof v === \"string\" &&\n (((_a = v.match(floatRegex)) === null || _a === void 0 ? void 0 : _a.length) || 0) +\n (((_b = v.match(colorRegex)) === null || _b === void 0 ? void 0 : _b.length) || 0) >\n 0);\n}\nconst NUMBER_TOKEN = \"number\";\nconst COLOR_TOKEN = \"color\";\nconst VAR_TOKEN = \"var\";\nconst VAR_FUNCTION_TOKEN = \"var(\";\nconst SPLIT_TOKEN = \"${}\";\n// this regex consists of the `singleCssVariableRegex|rgbHSLValueRegex|digitRegex`\nconst complexRegex = /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;\nfunction analyseComplexValue(value) {\n const originalValue = value.toString();\n const values = [];\n const indexes = {\n color: [],\n number: [],\n var: [],\n };\n const types = [];\n let i = 0;\n const tokenised = originalValue.replace(complexRegex, (parsedValue) => {\n if (color.test(parsedValue)) {\n indexes.color.push(i);\n types.push(COLOR_TOKEN);\n values.push(color.parse(parsedValue));\n }\n else if (parsedValue.startsWith(VAR_FUNCTION_TOKEN)) {\n indexes.var.push(i);\n types.push(VAR_TOKEN);\n values.push(parsedValue);\n }\n else {\n indexes.number.push(i);\n types.push(NUMBER_TOKEN);\n values.push(parseFloat(parsedValue));\n }\n ++i;\n return SPLIT_TOKEN;\n });\n const split = tokenised.split(SPLIT_TOKEN);\n return { values, split, indexes, types };\n}\nfunction parseComplexValue(v) {\n return analyseComplexValue(v).values;\n}\nfunction createTransformer(source) {\n const { split, types } = analyseComplexValue(source);\n const numSections = split.length;\n return (v) => {\n let output = \"\";\n for (let i = 0; i < numSections; i++) {\n output += split[i];\n if (v[i] !== undefined) {\n const type = types[i];\n if (type === NUMBER_TOKEN) {\n output += sanitize(v[i]);\n }\n else if (type === COLOR_TOKEN) {\n output += color.transform(v[i]);\n }\n else {\n output += v[i];\n }\n }\n }\n return output;\n };\n}\nconst convertNumbersToZero = (v) => typeof v === \"number\" ? 0 : v;\nfunction getAnimatableNone(v) {\n const parsed = parseComplexValue(v);\n const transformer = createTransformer(v);\n return transformer(parsed.map(convertNumbersToZero));\n}\nconst complex = {\n test,\n parse: parseComplexValue,\n createTransformer,\n getAnimatableNone,\n};\n\nexport { analyseComplexValue, complex };\n", "const checkStringStartsWith = (token) => (key) => typeof key === \"string\" && key.startsWith(token);\nconst isCSSVariableName = \n/*@__PURE__*/ checkStringStartsWith(\"--\");\nconst startsAsVariableToken = \n/*@__PURE__*/ checkStringStartsWith(\"var(--\");\nconst isCSSVariableToken = (value) => {\n const startsWithToken = startsAsVariableToken(value);\n if (!startsWithToken)\n return false;\n // Ensure any comments are stripped from the value as this can harm performance of the regex.\n return singleCssVariableRegex.test(value.split(\"/*\")[0].trim());\n};\nconst singleCssVariableRegex = /var\\(--(?:[\\w-]+\\s*|[\\w-]+\\s*,(?:\\s*[^)(\\s]|\\s*\\((?:[^)(]|\\([^)(]*\\))*\\))+\\s*)\\)$/iu;\n\nexport { isCSSVariableName, isCSSVariableToken };\n", "// Adapted from https://gist.github.com/mjackson/5311256\nfunction hueToRgb(p, q, t) {\n if (t < 0)\n t += 1;\n if (t > 1)\n t -= 1;\n if (t < 1 / 6)\n return p + (q - p) * 6 * t;\n if (t < 1 / 2)\n return q;\n if (t < 2 / 3)\n return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n}\nfunction hslaToRgba({ hue, saturation, lightness, alpha }) {\n hue /= 360;\n saturation /= 100;\n lightness /= 100;\n let red = 0;\n let green = 0;\n let blue = 0;\n if (!saturation) {\n red = green = blue = lightness;\n }\n else {\n const q = lightness < 0.5\n ? lightness * (1 + saturation)\n : lightness + saturation - lightness * saturation;\n const p = 2 * lightness - q;\n red = hueToRgb(p, q, hue + 1 / 3);\n green = hueToRgb(p, q, hue);\n blue = hueToRgb(p, q, hue - 1 / 3);\n }\n return {\n red: Math.round(red * 255),\n green: Math.round(green * 255),\n blue: Math.round(blue * 255),\n alpha,\n };\n}\n\nexport { hslaToRgba };\n", "function mixImmediate(a, b) {\n return (p) => (p > 0 ? b : a);\n}\n\nexport { mixImmediate };\n", "import { mixNumber } from './number.mjs';\nimport { warning } from '../../../../../motion-utils/dist/es/errors.mjs';\nimport { hslaToRgba } from '../hsla-to-rgba.mjs';\nimport { hex } from '../../value/types/color/hex.mjs';\nimport { rgba } from '../../value/types/color/rgba.mjs';\nimport { hsla } from '../../value/types/color/hsla.mjs';\nimport { mixImmediate } from './immediate.mjs';\n\n// Linear color space blending\n// Explained https://www.youtube.com/watch?v=LKnqECcg6Gw\n// Demonstrated http://codepen.io/osublake/pen/xGVVaN\nconst mixLinearColor = (from, to, v) => {\n const fromExpo = from * from;\n const expo = v * (to * to - fromExpo) + fromExpo;\n return expo < 0 ? 0 : Math.sqrt(expo);\n};\nconst colorTypes = [hex, rgba, hsla];\nconst getColorType = (v) => colorTypes.find((type) => type.test(v));\nfunction asRGBA(color) {\n const type = getColorType(color);\n warning(Boolean(type), `'${color}' is not an animatable color. Use the equivalent color code instead.`);\n if (!Boolean(type))\n return false;\n let model = type.parse(color);\n if (type === hsla) {\n // TODO Remove this cast - needed since Motion's stricter typing\n model = hslaToRgba(model);\n }\n return model;\n}\nconst mixColor = (from, to) => {\n const fromRGBA = asRGBA(from);\n const toRGBA = asRGBA(to);\n if (!fromRGBA || !toRGBA) {\n return mixImmediate(from, to);\n }\n const blended = { ...fromRGBA };\n return (v) => {\n blended.red = mixLinearColor(fromRGBA.red, toRGBA.red, v);\n blended.green = mixLinearColor(fromRGBA.green, toRGBA.green, v);\n blended.blue = mixLinearColor(fromRGBA.blue, toRGBA.blue, v);\n blended.alpha = mixNumber(fromRGBA.alpha, toRGBA.alpha, v);\n return rgba.transform(blended);\n };\n};\n\nexport { mixColor, mixLinearColor };\n", "/**\n * Pipe\n * Compose other transformers to run linearily\n * pipe(min(20), max(40))\n * @param {...functions} transformers\n * @return {function}\n */\nconst combineFunctions = (a, b) => (v) => b(a(v));\nconst pipe = (...transformers) => transformers.reduce(combineFunctions);\n\nexport { pipe };\n", "const invisibleValues = new Set([\"none\", \"hidden\"]);\n/**\n * Returns a function that, when provided a progress value between 0 and 1,\n * will return the \"none\" or \"hidden\" string only when the progress is that of\n * the origin or target.\n */\nfunction mixVisibility(origin, target) {\n if (invisibleValues.has(origin)) {\n return (p) => (p <= 0 ? origin : target);\n }\n else {\n return (p) => (p >= 1 ? target : origin);\n }\n}\n\nexport { invisibleValues, mixVisibility };\n", "import { mixNumber as mixNumber$1 } from './number.mjs';\nimport { mixColor } from './color.mjs';\nimport { pipe } from '../pipe.mjs';\nimport { warning } from '../../../../../motion-utils/dist/es/errors.mjs';\nimport { color } from '../../value/types/color/index.mjs';\nimport { complex, analyseComplexValue } from '../../value/types/complex/index.mjs';\nimport { isCSSVariableToken } from '../../render/dom/utils/is-css-variable.mjs';\nimport { invisibleValues, mixVisibility } from './visibility.mjs';\nimport { mixImmediate } from './immediate.mjs';\n\nfunction mixNumber(a, b) {\n return (p) => mixNumber$1(a, b, p);\n}\nfunction getMixer(a) {\n if (typeof a === \"number\") {\n return mixNumber;\n }\n else if (typeof a === \"string\") {\n return isCSSVariableToken(a)\n ? mixImmediate\n : color.test(a)\n ? mixColor\n : mixComplex;\n }\n else if (Array.isArray(a)) {\n return mixArray;\n }\n else if (typeof a === \"object\") {\n return color.test(a) ? mixColor : mixObject;\n }\n return mixImmediate;\n}\nfunction mixArray(a, b) {\n const output = [...a];\n const numValues = output.length;\n const blendValue = a.map((v, i) => getMixer(v)(v, b[i]));\n return (p) => {\n for (let i = 0; i < numValues; i++) {\n output[i] = blendValue[i](p);\n }\n return output;\n };\n}\nfunction mixObject(a, b) {\n const output = { ...a, ...b };\n const blendValue = {};\n for (const key in output) {\n if (a[key] !== undefined && b[key] !== undefined) {\n blendValue[key] = getMixer(a[key])(a[key], b[key]);\n }\n }\n return (v) => {\n for (const key in blendValue) {\n output[key] = blendValue[key](v);\n }\n return output;\n };\n}\nfunction matchOrder(origin, target) {\n var _a;\n const orderedOrigin = [];\n const pointers = { color: 0, var: 0, number: 0 };\n for (let i = 0; i < target.values.length; i++) {\n const type = target.types[i];\n const originIndex = origin.indexes[type][pointers[type]];\n const originValue = (_a = origin.values[originIndex]) !== null && _a !== void 0 ? _a : 0;\n orderedOrigin[i] = originValue;\n pointers[type]++;\n }\n return orderedOrigin;\n}\nconst mixComplex = (origin, target) => {\n const template = complex.createTransformer(target);\n const originStats = analyseComplexValue(origin);\n const targetStats = analyseComplexValue(target);\n const canInterpolate = originStats.indexes.var.length === targetStats.indexes.var.length &&\n originStats.indexes.color.length === targetStats.indexes.color.length &&\n originStats.indexes.number.length >= targetStats.indexes.number.length;\n if (canInterpolate) {\n if ((invisibleValues.has(origin) &&\n !targetStats.values.length) ||\n (invisibleValues.has(target) &&\n !originStats.values.length)) {\n return mixVisibility(origin, target);\n }\n return pipe(mixArray(matchOrder(originStats, targetStats), targetStats.values), template);\n }\n else {\n warning(true, `Complex values '${origin}' and '${target}' 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.`);\n return mixImmediate(origin, target);\n }\n};\n\nexport { getMixer, mixArray, mixComplex, mixObject };\n", "import { getMixer } from './complex.mjs';\nimport { mixNumber } from './number.mjs';\n\nfunction mix(from, to, p) {\n if (typeof from === \"number\" &&\n typeof to === \"number\" &&\n typeof p === \"number\") {\n return mixNumber(from, to, p);\n }\n const mixer = getMixer(from);\n return mixer(from, to);\n}\n\nexport { mix };\n", "import { cubicBezier } from './cubic-bezier.mjs';\n\nconst easeIn = /*@__PURE__*/ cubicBezier(0.42, 0, 1, 1);\nconst easeOut = /*@__PURE__*/ cubicBezier(0, 0, 0.58, 1);\nconst easeInOut = /*@__PURE__*/ cubicBezier(0.42, 0, 0.58, 1);\n\nexport { easeIn, easeInOut, easeOut };\n", "import { invariant } from '../../../../motion-utils/dist/es/errors.mjs';\nimport { noop } from '../../../../motion-utils/dist/es/noop.mjs';\nimport { progress } from '../../../../motion-utils/dist/es/progress.mjs';\nimport { clamp } from './clamp.mjs';\nimport { mix } from './mix/index.mjs';\nimport { pipe } from './pipe.mjs';\n\nfunction createMixers(output, ease, customMixer) {\n const mixers = [];\n const mixerFactory = customMixer || mix;\n const numMixers = output.length - 1;\n for (let i = 0; i < numMixers; i++) {\n let mixer = mixerFactory(output[i], output[i + 1]);\n if (ease) {\n const easingFunction = Array.isArray(ease) ? ease[i] || noop : ease;\n mixer = pipe(easingFunction, mixer);\n }\n mixers.push(mixer);\n }\n return mixers;\n}\n/**\n * Create a function that maps from a numerical input array to a generic output array.\n *\n * Accepts:\n * - Numbers\n * - Colors (hex, hsl, hsla, rgb, rgba)\n * - Complex (combinations of one or more numbers or strings)\n *\n * ```jsx\n * const mixColor = interpolate([0, 1], ['#fff', '#000'])\n *\n * mixColor(0.5) // 'rgba(128, 128, 128, 1)'\n * ```\n *\n * TODO Revist this approach once we've moved to data models for values,\n * probably not needed to pregenerate mixer functions.\n *\n * @public\n */\nfunction interpolate(input, output, { clamp: isClamp = true, ease, mixer } = {}) {\n const inputLength = input.length;\n invariant(inputLength === output.length, \"Both input and output ranges must be the same length\");\n /**\n * If we're only provided a single input, we can just make a function\n * that returns the output.\n */\n if (inputLength === 1)\n return () => output[0];\n if (inputLength === 2 && output[0] === output[1])\n return () => output[1];\n const isZeroDeltaRange = input[0] === input[1];\n // If input runs highest -> lowest, reverse both arrays\n if (input[0] > input[inputLength - 1]) {\n input = [...input].reverse();\n output = [...output].reverse();\n }\n const mixers = createMixers(output, ease, mixer);\n const numMixers = mixers.length;\n const interpolator = (v) => {\n if (isZeroDeltaRange && v < input[0])\n return output[0];\n let i = 0;\n if (numMixers > 1) {\n for (; i < input.length - 2; i++) {\n if (v < input[i + 1])\n break;\n }\n }\n const progressInRange = progress(input[i], input[i + 1], v);\n return mixers[i](progressInRange);\n };\n return isClamp\n ? (v) => interpolator(clamp(input[0], input[inputLength - 1], v))\n : interpolator;\n}\n\nexport { interpolate };\n", "import { frame, cancelFrame } from '../../../frameloop/frame.mjs';\n\nfunction observeTimeline(update, timeline) {\n let prevProgress;\n const onFrame = () => {\n const { currentTime } = timeline;\n const percentage = currentTime === null ? 0 : currentTime.value;\n const progress = percentage / 100;\n if (prevProgress !== progress) {\n update(progress);\n }\n prevProgress = progress;\n };\n frame.update(onFrame, true);\n return () => cancelFrame(onFrame);\n}\n\nexport { observeTimeline };\n", "import '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { resolveElements } from '../../../../../../motion-dom/dist/es/utils/resolve-elements.mjs';\n\nconst resizeHandlers = new WeakMap();\nlet observer;\nfunction getElementSize(target, borderBoxSize) {\n if (borderBoxSize) {\n const { inlineSize, blockSize } = borderBoxSize[0];\n return { width: inlineSize, height: blockSize };\n }\n else if (target instanceof SVGElement && \"getBBox\" in target) {\n return target.getBBox();\n }\n else {\n return {\n width: target.offsetWidth,\n height: target.offsetHeight,\n };\n }\n}\nfunction notifyTarget({ target, contentRect, borderBoxSize, }) {\n var _a;\n (_a = resizeHandlers.get(target)) === null || _a === void 0 ? void 0 : _a.forEach((handler) => {\n handler({\n target,\n contentSize: contentRect,\n get size() {\n return getElementSize(target, borderBoxSize);\n },\n });\n });\n}\nfunction notifyAll(entries) {\n entries.forEach(notifyTarget);\n}\nfunction createResizeObserver() {\n if (typeof ResizeObserver === \"undefined\")\n return;\n observer = new ResizeObserver(notifyAll);\n}\nfunction resizeElement(target, handler) {\n if (!observer)\n createResizeObserver();\n const elements = resolveElements(target);\n elements.forEach((element) => {\n let elementHandlers = resizeHandlers.get(element);\n if (!elementHandlers) {\n elementHandlers = new Set();\n resizeHandlers.set(element, elementHandlers);\n }\n elementHandlers.add(handler);\n observer === null || observer === void 0 ? void 0 : observer.observe(element);\n });\n return () => {\n elements.forEach((element) => {\n const elementHandlers = resizeHandlers.get(element);\n elementHandlers === null || elementHandlers === void 0 ? void 0 : elementHandlers.delete(handler);\n if (!(elementHandlers === null || elementHandlers === void 0 ? void 0 : elementHandlers.size)) {\n observer === null || observer === void 0 ? void 0 : observer.unobserve(element);\n }\n });\n };\n}\n\nexport { resizeElement };\n", "const windowCallbacks = new Set();\nlet windowResizeHandler;\nfunction createWindowResizeHandler() {\n windowResizeHandler = () => {\n const size = {\n width: window.innerWidth,\n height: window.innerHeight,\n };\n const info = {\n target: window,\n size,\n contentSize: size,\n };\n windowCallbacks.forEach((callback) => callback(info));\n };\n window.addEventListener(\"resize\", windowResizeHandler);\n}\nfunction resizeWindow(callback) {\n windowCallbacks.add(callback);\n if (!windowResizeHandler)\n createWindowResizeHandler();\n return () => {\n windowCallbacks.delete(callback);\n if (!windowCallbacks.size && windowResizeHandler) {\n windowResizeHandler = undefined;\n }\n };\n}\n\nexport { resizeWindow };\n", "import { resizeElement } from './handle-element.mjs';\nimport { resizeWindow } from './handle-window.mjs';\n\nfunction resize(a, b) {\n return typeof a === \"function\" ? resizeWindow(a) : resizeElement(a, b);\n}\n\nexport { resize };\n", "import '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { progress } from '../../../../../../motion-utils/dist/es/progress.mjs';\nimport { velocityPerSecond } from '../../../utils/velocity-per-second.mjs';\n\n/**\n * A time in milliseconds, beyond which we consider the scroll velocity to be 0.\n */\nconst maxElapsed = 50;\nconst createAxisInfo = () => ({\n current: 0,\n offset: [],\n progress: 0,\n scrollLength: 0,\n targetOffset: 0,\n targetLength: 0,\n containerLength: 0,\n velocity: 0,\n});\nconst createScrollInfo = () => ({\n time: 0,\n x: createAxisInfo(),\n y: createAxisInfo(),\n});\nconst keys = {\n x: {\n length: \"Width\",\n position: \"Left\",\n },\n y: {\n length: \"Height\",\n position: \"Top\",\n },\n};\nfunction updateAxisInfo(element, axisName, info, time) {\n const axis = info[axisName];\n const { length, position } = keys[axisName];\n const prev = axis.current;\n const prevTime = info.time;\n axis.current = element[`scroll${position}`];\n axis.scrollLength = element[`scroll${length}`] - element[`client${length}`];\n axis.offset.length = 0;\n axis.offset[0] = 0;\n axis.offset[1] = axis.scrollLength;\n axis.progress = progress(0, axis.scrollLength, axis.current);\n const elapsed = time - prevTime;\n axis.velocity =\n elapsed > maxElapsed\n ? 0\n : velocityPerSecond(axis.current - prev, elapsed);\n}\nfunction updateScrollInfo(element, info, time) {\n updateAxisInfo(element, \"x\", info, time);\n updateAxisInfo(element, \"y\", info, time);\n info.time = time;\n}\n\nexport { createScrollInfo, updateScrollInfo };\n", "function calcInset(element, container) {\n const inset = { x: 0, y: 0 };\n let current = element;\n while (current && current !== container) {\n if (current instanceof HTMLElement) {\n inset.x += current.offsetLeft;\n inset.y += current.offsetTop;\n current = current.offsetParent;\n }\n else if (current.tagName === \"svg\") {\n /**\n * This isn't an ideal approach to measuring the offset of tags.\n * It would be preferable, given they behave like HTMLElements in most ways\n * to use offsetLeft/Top. But these don't exist on . Likewise we\n * can't use .getBBox() like most SVG elements as these provide the offset\n * relative to the SVG itself, which for is usually 0x0.\n */\n const svgBoundingBox = current.getBoundingClientRect();\n current = current.parentElement;\n const parentBoundingBox = current.getBoundingClientRect();\n inset.x += svgBoundingBox.left - parentBoundingBox.left;\n inset.y += svgBoundingBox.top - parentBoundingBox.top;\n }\n else if (current instanceof SVGGraphicsElement) {\n const { x, y } = current.getBBox();\n inset.x += x;\n inset.y += y;\n let svg = null;\n let parent = current.parentNode;\n while (!svg) {\n if (parent.tagName === \"svg\") {\n svg = parent;\n }\n parent = current.parentNode;\n }\n current = svg;\n }\n else {\n break;\n }\n }\n return inset;\n}\n\nexport { calcInset };\n", "const namedEdges = {\n start: 0,\n center: 0.5,\n end: 1,\n};\nfunction resolveEdge(edge, length, inset = 0) {\n let delta = 0;\n /**\n * If we have this edge defined as a preset, replace the definition\n * with the numerical value.\n */\n if (edge in namedEdges) {\n edge = namedEdges[edge];\n }\n /**\n * Handle unit values\n */\n if (typeof edge === \"string\") {\n const asNumber = parseFloat(edge);\n if (edge.endsWith(\"px\")) {\n delta = asNumber;\n }\n else if (edge.endsWith(\"%\")) {\n edge = asNumber / 100;\n }\n else if (edge.endsWith(\"vw\")) {\n delta = (asNumber / 100) * document.documentElement.clientWidth;\n }\n else if (edge.endsWith(\"vh\")) {\n delta = (asNumber / 100) * document.documentElement.clientHeight;\n }\n else {\n edge = asNumber;\n }\n }\n /**\n * If the edge is defined as a number, handle as a progress value.\n */\n if (typeof edge === \"number\") {\n delta = length * edge;\n }\n return inset + delta;\n}\n\nexport { namedEdges, resolveEdge };\n", "import { resolveEdge, namedEdges } from './edge.mjs';\n\nconst defaultOffset = [0, 0];\nfunction resolveOffset(offset, containerLength, targetLength, targetInset) {\n let offsetDefinition = Array.isArray(offset) ? offset : defaultOffset;\n let targetPoint = 0;\n let containerPoint = 0;\n if (typeof offset === \"number\") {\n /**\n * If we're provided offset: [0, 0.5, 1] then each number x should become\n * [x, x], so we default to the behaviour of mapping 0 => 0 of both target\n * and container etc.\n */\n offsetDefinition = [offset, offset];\n }\n else if (typeof offset === \"string\") {\n offset = offset.trim();\n if (offset.includes(\" \")) {\n offsetDefinition = offset.split(\" \");\n }\n else {\n /**\n * If we're provided a definition like \"100px\" then we want to apply\n * that only to the top of the target point, leaving the container at 0.\n * Whereas a named offset like \"end\" should be applied to both.\n */\n offsetDefinition = [offset, namedEdges[offset] ? offset : `0`];\n }\n }\n targetPoint = resolveEdge(offsetDefinition[0], targetLength, targetInset);\n containerPoint = resolveEdge(offsetDefinition[1], containerLength);\n return targetPoint - containerPoint;\n}\n\nexport { resolveOffset };\n", "const ScrollOffset = {\n Enter: [\n [0, 1],\n [1, 1],\n ],\n Exit: [\n [0, 0],\n [1, 0],\n ],\n Any: [\n [1, 0],\n [0, 1],\n ],\n All: [\n [0, 0],\n [1, 1],\n ],\n};\n\nexport { ScrollOffset };\n", "import { clamp } from '../../../../utils/clamp.mjs';\nimport { interpolate } from '../../../../utils/interpolate.mjs';\nimport { defaultOffset } from '../../../../utils/offsets/default.mjs';\nimport { calcInset } from './inset.mjs';\nimport { resolveOffset } from './offset.mjs';\nimport { ScrollOffset } from './presets.mjs';\n\nconst point = { x: 0, y: 0 };\nfunction getTargetSize(target) {\n return \"getBBox\" in target && target.tagName !== \"svg\"\n ? target.getBBox()\n : { width: target.clientWidth, height: target.clientHeight };\n}\nfunction resolveOffsets(container, info, options) {\n const { offset: offsetDefinition = ScrollOffset.All } = options;\n const { target = container, axis = \"y\" } = options;\n const lengthLabel = axis === \"y\" ? \"height\" : \"width\";\n const inset = target !== container ? calcInset(target, container) : point;\n /**\n * Measure the target and container. If they're the same thing then we\n * use the container's scrollWidth/Height as the target, from there\n * all other calculations can remain the same.\n */\n const targetSize = target === container\n ? { width: container.scrollWidth, height: container.scrollHeight }\n : getTargetSize(target);\n const containerSize = {\n width: container.clientWidth,\n height: container.clientHeight,\n };\n /**\n * Reset the length of the resolved offset array rather than creating a new one.\n * TODO: More reusable data structures for targetSize/containerSize would also be good.\n */\n info[axis].offset.length = 0;\n /**\n * Populate the offset array by resolving the user's offset definition into\n * a list of pixel scroll offets.\n */\n let hasChanged = !info[axis].interpolate;\n const numOffsets = offsetDefinition.length;\n for (let i = 0; i < numOffsets; i++) {\n const offset = resolveOffset(offsetDefinition[i], containerSize[lengthLabel], targetSize[lengthLabel], inset[axis]);\n if (!hasChanged && offset !== info[axis].interpolatorOffsets[i]) {\n hasChanged = true;\n }\n info[axis].offset[i] = offset;\n }\n /**\n * If the pixel scroll offsets have changed, create a new interpolator function\n * to map scroll value into a progress.\n */\n if (hasChanged) {\n info[axis].interpolate = interpolate(info[axis].offset, defaultOffset(offsetDefinition), { clamp: false });\n info[axis].interpolatorOffsets = [...info[axis].offset];\n }\n info[axis].progress = clamp(0, 1, info[axis].interpolate(info[axis].current));\n}\n\nexport { resolveOffsets };\n", "import { warnOnce } from '../../../utils/warn-once.mjs';\nimport { updateScrollInfo } from './info.mjs';\nimport { resolveOffsets } from './offsets/index.mjs';\n\nfunction measure(container, target = container, info) {\n /**\n * Find inset of target within scrollable container\n */\n info.x.targetOffset = 0;\n info.y.targetOffset = 0;\n if (target !== container) {\n let node = target;\n while (node && node !== container) {\n info.x.targetOffset += node.offsetLeft;\n info.y.targetOffset += node.offsetTop;\n node = node.offsetParent;\n }\n }\n info.x.targetLength =\n target === container ? target.scrollWidth : target.clientWidth;\n info.y.targetLength =\n target === container ? target.scrollHeight : target.clientHeight;\n info.x.containerLength = container.clientWidth;\n info.y.containerLength = container.clientHeight;\n /**\n * In development mode ensure scroll containers aren't position: static as this makes\n * it difficult to measure their relative positions.\n */\n if (process.env.NODE_ENV !== \"production\") {\n if (container && target && target !== container) {\n warnOnce(getComputedStyle(container).position !== \"static\", \"Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.\");\n }\n }\n}\nfunction createOnScrollHandler(element, onScroll, info, options = {}) {\n return {\n measure: () => measure(element, options.target, info),\n update: (time) => {\n updateScrollInfo(element, info, time);\n if (options.offset || options.target) {\n resolveOffsets(element, info, options);\n }\n },\n notify: () => onScroll(info),\n };\n}\n\nexport { createOnScrollHandler };\n", "import { resize } from '../resize/index.mjs';\nimport { createScrollInfo } from './info.mjs';\nimport { createOnScrollHandler } from './on-scroll-handler.mjs';\nimport { frame, cancelFrame, frameData } from '../../../frameloop/frame.mjs';\n\nconst scrollListeners = new WeakMap();\nconst resizeListeners = new WeakMap();\nconst onScrollHandlers = new WeakMap();\nconst getEventTarget = (element) => element === document.documentElement ? window : element;\nfunction scrollInfo(onScroll, { container = document.documentElement, ...options } = {}) {\n let containerHandlers = onScrollHandlers.get(container);\n /**\n * Get the onScroll handlers for this container.\n * If one isn't found, create a new one.\n */\n if (!containerHandlers) {\n containerHandlers = new Set();\n onScrollHandlers.set(container, containerHandlers);\n }\n /**\n * Create a new onScroll handler for the provided callback.\n */\n const info = createScrollInfo();\n const containerHandler = createOnScrollHandler(container, onScroll, info, options);\n containerHandlers.add(containerHandler);\n /**\n * Check if there's a scroll event listener for this container.\n * If not, create one.\n */\n if (!scrollListeners.has(container)) {\n const measureAll = () => {\n for (const handler of containerHandlers)\n handler.measure();\n };\n const updateAll = () => {\n for (const handler of containerHandlers) {\n handler.update(frameData.timestamp);\n }\n };\n const notifyAll = () => {\n for (const handler of containerHandlers)\n handler.notify();\n };\n const listener = () => {\n frame.read(measureAll, false, true);\n frame.read(updateAll, false, true);\n frame.update(notifyAll, false, true);\n };\n scrollListeners.set(container, listener);\n const target = getEventTarget(container);\n window.addEventListener(\"resize\", listener, { passive: true });\n if (container !== document.documentElement) {\n resizeListeners.set(container, resize(container, listener));\n }\n target.addEventListener(\"scroll\", listener, { passive: true });\n }\n const listener = scrollListeners.get(container);\n frame.read(listener, false, true);\n return () => {\n var _a;\n cancelFrame(listener);\n /**\n * Check if we even have any handlers for this container.\n */\n const currentHandlers = onScrollHandlers.get(container);\n if (!currentHandlers)\n return;\n currentHandlers.delete(containerHandler);\n if (currentHandlers.size)\n return;\n /**\n * If no more handlers, remove the scroll listener too.\n */\n const scrollListener = scrollListeners.get(container);\n scrollListeners.delete(container);\n if (scrollListener) {\n getEventTarget(container).removeEventListener(\"scroll\", scrollListener);\n (_a = resizeListeners.get(container)) === null || _a === void 0 ? void 0 : _a();\n window.removeEventListener(\"resize\", scrollListener);\n }\n };\n}\n\nexport { scrollInfo };\n", "import { supportsScrollTimeline } from '../../../../../../motion-dom/dist/es/utils/supports/scroll-timeline.mjs';\nimport '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { noop } from '../../../../../../motion-utils/dist/es/noop.mjs';\nimport { observeTimeline } from './observe.mjs';\nimport { scrollInfo } from './track.mjs';\n\nfunction scrollTimelineFallback({ source, container, axis = \"y\", }) {\n // Support legacy source argument. Deprecate later.\n if (source)\n container = source;\n // ScrollTimeline records progress as a percentage CSSUnitValue\n const currentTime = { value: 0 };\n const cancel = scrollInfo((info) => {\n currentTime.value = info[axis].progress * 100;\n }, { container, axis });\n return { currentTime, cancel };\n}\nconst timelineCache = new Map();\nfunction getTimeline({ source, container = document.documentElement, axis = \"y\", } = {}) {\n // Support legacy source argument. Deprecate later.\n if (source)\n container = source;\n if (!timelineCache.has(container)) {\n timelineCache.set(container, {});\n }\n const elementCache = timelineCache.get(container);\n if (!elementCache[axis]) {\n elementCache[axis] = supportsScrollTimeline()\n ? new ScrollTimeline({ source: container, axis })\n : scrollTimelineFallback({ source: container, axis });\n }\n return elementCache[axis];\n}\n/**\n * If the onScroll function has two arguments, it's expecting\n * more specific information about the scroll from scrollInfo.\n */\nfunction isOnScrollWithInfo(onScroll) {\n return onScroll.length === 2;\n}\n/**\n * Currently, we only support element tracking with `scrollInfo`, though in\n * the future we can also offer ViewTimeline support.\n */\nfunction needsElementTracking(options) {\n return options && (options.target || options.offset);\n}\nfunction scrollFunction(onScroll, options) {\n if (isOnScrollWithInfo(onScroll) || needsElementTracking(options)) {\n return scrollInfo((info) => {\n onScroll(info[options.axis].progress, info);\n }, options);\n }\n else {\n return observeTimeline(onScroll, getTimeline(options));\n }\n}\nfunction scrollAnimation(animation, options) {\n animation.flatten();\n if (needsElementTracking(options)) {\n animation.pause();\n return scrollInfo((info) => {\n animation.time = animation.duration * info[options.axis].progress;\n }, options);\n }\n else {\n const timeline = getTimeline(options);\n if (animation.attachTimeline) {\n return animation.attachTimeline(timeline, (valueAnimation) => {\n valueAnimation.pause();\n return observeTimeline((progress) => {\n valueAnimation.time = valueAnimation.duration * progress;\n }, timeline);\n });\n }\n else {\n return noop;\n }\n }\n}\nfunction scroll(onScroll, { axis = \"y\", ...options } = {}) {\n const optionsWithDefaults = { axis, ...options };\n return typeof onScroll === \"function\"\n ? scrollFunction(onScroll, optionsWithDefaults)\n : scrollAnimation(onScroll, optionsWithDefaults);\n}\n\nexport { scroll };\n", "import '../../../../../../motion-utils/dist/es/errors.mjs';\nimport { resolveElements } from '../../../../../../motion-dom/dist/es/utils/resolve-elements.mjs';\n\nconst thresholds = {\n some: 0,\n all: 1,\n};\nfunction inView(elementOrSelector, onStart, { root, margin: rootMargin, amount = \"some\" } = {}) {\n const elements = resolveElements(elementOrSelector);\n const activeIntersections = new WeakMap();\n const onIntersectionChange = (entries) => {\n entries.forEach((entry) => {\n const onEnd = activeIntersections.get(entry.target);\n /**\n * If there's no change to the intersection, we don't need to\n * do anything here.\n */\n if (entry.isIntersecting === Boolean(onEnd))\n return;\n if (entry.isIntersecting) {\n const newOnEnd = onStart(entry.target, entry);\n if (typeof newOnEnd === \"function\") {\n activeIntersections.set(entry.target, newOnEnd);\n }\n else {\n observer.unobserve(entry.target);\n }\n }\n else if (typeof onEnd === \"function\") {\n onEnd(entry);\n activeIntersections.delete(entry.target);\n }\n });\n };\n const observer = new IntersectionObserver(onIntersectionChange, {\n root,\n rootMargin,\n threshold: typeof amount === \"number\" ? amount : thresholds[amount],\n });\n elements.forEach((element) => observer.observe(element));\n return () => observer.disconnect();\n}\n\nexport { inView };\n", "import {\n easeInBounce,\n easeInCubic,\n easeInElastic,\n easeInExpo,\n easeInOutCubic,\n easeInOutElastic,\n easeInOutExpo,\n easeInOutQuad,\n easeInOutQuart,\n easeInOutQuint,\n easeInOutSine,\n easeInQuad,\n easeInQuart,\n easeInQuint,\n easeInSine,\n easeOutBounce,\n easeOutCubic,\n easeOutElastic,\n easeOutExpo,\n easeOutQuad,\n easeOutQuart,\n easeOutQuint,\n easeOutSine,\n} from \"easing-utils\";\nimport { easeIn, easeInOut, easeOut, backInOut, backIn, backOut, circIn, circInOut, circOut } from \"motion\";\n\nconst customEasings = {\n easeInBounce,\n easeInCubic,\n easeInElastic,\n easeInExpo,\n easeInOutCubic,\n easeInOutElastic,\n easeInOutExpo,\n easeInOutQuad,\n easeInOutQuart,\n easeInOutQuint,\n easeInOutSine,\n easeInQuad,\n easeInQuart,\n easeInQuint,\n easeInSine,\n easeOutBounce,\n easeOutCubic,\n easeOutElastic,\n easeOutExpo,\n easeOutQuad,\n easeOutQuart,\n easeOutQuint,\n easeOutSine,\n};\n\nconst motionEasings = {\n easeIn,\n easeInOut,\n easeOut,\n backInOut,\n backIn,\n backOut,\n circIn,\n circInOut,\n circOut,\n};\n\nexport { customEasings, motionEasings };\n", "export { customEasings, motionEasings } from \"./EasingFunctions\";\n\nconst convertStringToNumber = (number) => (typeof number == \"number\" ? number : parseFloat(number));\nconst numberIfFloat = (input) =>\n input == null || (\"\" + input).trim() === \"\" || isNaN(+input) ? false : convertStringToNumber(input);\n\nexport function injectCSS(css) {\n if (!css) {\n return;\n }\n const element = document.createElement(\"style\");\n element.innerText = css;\n document.head.appendChild(element);\n return element;\n}\n\nexport function dispatchEvent(element, type, detail) {\n element.dispatchEvent(new CustomEvent(`animation:${type}`, { detail, bubbles: true, cancelable: true }));\n}\n\nfunction stringToValueAndUnit(input) {\n if (typeof input === \"number\") {\n return [input, null];\n }\n const match = input.match(/(\\d*\\.?\\d)(\\D*)/);\n if (!match) {\n return [0, null];\n }\n const number = parseFloat(match[1]);\n const unit = match[2];\n if (unit === \"%\") {\n return [number / 100, null];\n }\n if (!unit) {\n return [number, null];\n }\n return [number, unit];\n}\n\nexport function getOffsetForScroll(input) {\n switch (input) {\n case \"start\":\n return [0, null];\n case \"center\":\n return [0.5, null];\n case \"end\":\n return [1, null];\n }\n const float = numberIfFloat(input);\n if (float !== false) {\n return [float, null];\n }\n return stringToValueAndUnit(input);\n}\n\nexport function getOffsetForScrollFunctionForStagger({ offsetValue, offsetUnit, stagger, section }) {\n if (stagger === true) {\n if (offsetUnit) {\n const lastElementValue = offsetValue;\n return (index, numberOfElements) => {\n const start = index ? `${index * (lastElementValue / (numberOfElements - 1 || 1))}${offsetUnit}` : 1;\n return [\n [0, 1],\n [start, 1],\n ];\n };\n }\n\n let lastElementAddedValue = 0.5;\n if (offsetValue > 1) {\n lastElementAddedValue = offsetValue - 1;\n offsetValue = 1;\n }\n return (index, numberOfElements) => {\n const start = index * (lastElementAddedValue / (numberOfElements - 1 || 1)) + offsetValue;\n return [\n [0, 1],\n [start, 1],\n ];\n };\n }\n\n const [staggerOffset, staggerUnit] = stringToValueAndUnit(stagger);\n if (offsetUnit && staggerUnit && offsetUnit !== staggerUnit) {\n console.error(\n `The unit of the stagger (${staggerUnit}) and the offset (${offsetUnit}) must be the same`,\n section,\n );\n return;\n }\n const unit = offsetUnit || staggerUnit;\n\n // [\"start end\", \"end end\"] is the same as [[0, 1], [1, 1]]\n if (!unit) {\n return (index) => [\n [0, 1],\n [index * staggerOffset + offsetValue, 1],\n ];\n }\n\n return (index) => [\n [0, 1],\n [`${index * staggerOffset + offsetValue}${unit}`, 1],\n ];\n}\n\nexport function observeForChanges(callback, element, once = false) {\n // Create an observer instance linked to the callback function\n const observer = new MutationObserver((mutationList, overserver) => {\n mutationList.forEach((mutation) => {\n if (mutation.type === \"childList\") {\n callback(mutation);\n if (once) {\n overserver.disconnect();\n }\n }\n });\n });\n\n // Start observing the target node for configured mutations\n observer.observe(element, {\n attributes: false,\n childList: true,\n subtree: false,\n });\n}\n", "import { animate } from \"motion/mini\";\nimport { scroll, inView } from \"motion\";\nimport {\n customEasings,\n motionEasings,\n getOffsetForScroll,\n getOffsetForScrollFunctionForStagger,\n observeForChanges,\n injectCSS,\n dispatchEvent,\n} from \"./Helper\";\n\n// These functions can be visualised at http://easings.net\nconst easingTypes = {\n ...motionEasings,\n ...customEasings,\n linear: \"linear\",\n};\n\nconst namespace = \"animation\";\n\n// Settins\nconst defaults: {\n duration: number;\n easing: string | ((t: number) => number);\n showTextAfter: string;\n initClass: string;\n outViewClass: string;\n inViewDelay: number;\n repeatInView: boolean;\n offsetForScroll: any;\n animation: {\n [key: string]: number | string;\n };\n selectors: {\n [key: string]: number | string | null | false;\n };\n} = {\n duration: 1,\n easing: \"easeOut\",\n showTextAfter: \"200px\",\n initClass: `${namespace}-init`,\n outViewClass: `${namespace}-outview`,\n inViewDelay: 0.2,\n repeatInView: false,\n offsetForScroll: [\n [0, 1],\n [1, 1],\n ], // ScrollOffset.Enter [\"start end\", \"end end\"]\n animation: {\n filter: \"none\",\n transform: \"none\",\n },\n selectors: {\n text: 'h1,h2,h3,h4,h5,h6,p,li,table,address,blockquote,.btn[type=\"button\"],a.btn,form',\n media: \"self\",\n elements: false,\n },\n};\n\nconst dataAttribute = `data-${namespace}`;\nlet styles = \"\";\nObject.entries(defaults.selectors).forEach(([type, selectorFromConfig]) => {\n const attributeName = `${dataAttribute}-${type}`;\n const additionalSelectorClass = `${namespace}-${type}`;\n styles += `[${attributeName}].${additionalSelectorClass}-self:not([${dataAttribute}]),[${attributeName}] .${additionalSelectorClass}:not([${dataAttribute}]){visibility:hidden}`;\n\n [...document.querySelectorAll(`[${attributeName}]`)].forEach((section) => {\n const data = section.getAttribute(attributeName) || \"\";\n if (!data) {\n return;\n }\n let trigger: string;\n let config: any = {};\n if (data === \"view\" || data === \"scroll\") {\n // no special settings\n trigger = data;\n } else {\n config = JSON.parse(data);\n trigger = config.trigger;\n }\n\n const triggerIsView = trigger === \"view\";\n const triggerIsScroll = trigger === \"scroll\";\n\n if (!triggerIsView && !triggerIsScroll) {\n return;\n }\n\n const getConfig = (key) => {\n const fromAttribute = section.getAttribute(`${attributeName}-${key}`);\n if (fromAttribute === \"false\") {\n return false;\n }\n if (fromAttribute === \"true\" || fromAttribute === \"\") {\n return true;\n }\n const fallback = fromAttribute || config[key];\n return fallback === false ? false : fallback || null;\n };\n\n let { easing, duration, offsetForScroll, repeatInView } = defaults;\n const animation = getConfig(\"animation\");\n const stagger = getConfig(\"stagger\");\n const easingString = getConfig(\"easing\");\n const rootSelector = getConfig(\"root\");\n const axis = getConfig(\"axis\");\n\n // Set easing\n if (easingString in easingTypes) {\n easing = easingTypes[easingString];\n }\n\n // View has additonal settings duration and repeat\n if (triggerIsView) {\n repeatInView = !!getConfig(\"repeat\");\n duration = parseFloat(getConfig(\"duration\")) || duration;\n }\n\n // Scroll has additonal setting for offset\n if (triggerIsScroll) {\n // Each offset defines where the target will meet the container.\n // So for example, \"start end\" means when the start of the target meets the end of the container.\n // start is 0, center is 0.5, end is 1\n // [\"start end\", \"end end\"] is the same as [[0, 1], [1, 1]]\n\n let [offsetValue, offsetUnit] = type == \"text\" ? getOffsetForScroll(defaults.showTextAfter) : [1, null];\n const offsetConfig = getConfig(\"offset\");\n\n if (offsetConfig) {\n const [value, unit] = getOffsetForScroll(offsetConfig);\n offsetValue = value;\n offsetUnit = unit;\n }\n\n // Stagger returns a function\n if (stagger) {\n const staggerFunction = getOffsetForScrollFunctionForStagger({\n offsetValue,\n offsetUnit,\n stagger,\n section,\n });\n if (staggerFunction) {\n offsetForScroll = staggerFunction;\n }\n }\n\n if (typeof offsetForScroll !== \"function\") {\n if (offsetUnit) {\n offsetForScroll = [\n [0, 1],\n [`${offsetValue}${offsetUnit}`, 1],\n ];\n } else {\n offsetForScroll = [\n [0, 1],\n [offsetValue, 1],\n ];\n }\n }\n }\n\n const watch = getConfig(\"watch\");\n let selector = getConfig(\"selector\");\n if (!selector && selector !== false) {\n selector = selectorFromConfig || \"\";\n }\n const useSectionElement = selector === \"self\" || section.classList.contains(`${additionalSelectorClass}-self`);\n if (!useSectionElement) {\n const hasSelector = selector && selector !== \"false\";\n selector = hasSelector ? `${selector},.${additionalSelectorClass}` : `.${additionalSelectorClass}`;\n }\n\n const options = { useSectionElement, section, selector, animation };\n\n const callFunction = () => {\n let root = rootSelector ? section.querySelector(rootSelector) || section.closest(rootSelector) : null;\n root = root || undefined;\n const elements = getElementsAndAddAttribute(options);\n caller(trigger, {\n elements,\n easing,\n duration,\n stagger,\n offsetForScroll,\n repeatInView,\n root,\n axis,\n section,\n });\n if (!watch || trigger === \"view\") {\n return;\n }\n setTimeout(() => {\n if (root instanceof HTMLElement) {\n root.scrollTop += 1;\n } else {\n window.scrollBy(0, 1);\n }\n }, 100);\n };\n\n // Don't watch for changes\n if (watch === null) {\n callFunction();\n return;\n }\n\n const watchArray = Array.isArray(watch) ? watch : [watch];\n watchArray.forEach((watch) => {\n const once = watch === \"once\";\n if (once || watch === true) {\n observeForChanges(callFunction, section, once);\n return;\n }\n if (typeof watch !== \"string\") {\n console.error(\"Invalid watch value\", watch);\n return;\n }\n\n let options = {};\n if (watch.endsWith(\"#once\")) {\n // Remove #once at the end\n watch = watch.slice(0, -5);\n options = { once: true };\n }\n\n if (watch.endsWith(\"#window\")) {\n // Remove #window at the end\n const eventName = watch.slice(0, -7);\n window.addEventListener(eventName, callFunction, options);\n }\n\n if (watch.endsWith(\"#document\")) {\n // Remove #document at the end\n const eventName = watch.slice(0, -9);\n window.addEventListener(eventName, callFunction, options);\n }\n });\n });\n});\ninjectCSS(styles);\n\nfunction caller(trigger, options) {\n if (trigger == \"scroll\") {\n initOnScroll(options);\n return;\n }\n initOnView(options);\n}\n\nfunction initOnScroll({ elements, easing, offsetForScroll, root, axis, section }) {\n const offsetIsFuntion = typeof offsetForScroll === \"function\";\n const numberOfElements = elements.length;\n elements.forEach((element, index) => {\n scroll(\n animate(element, defaults.animation, {\n ease: easing,\n filter: {\n ease: \"easeOut\",\n },\n }),\n {\n target: element,\n container: root,\n axis: axis || \"y\",\n offset: offsetIsFuntion ? offsetForScroll(index, numberOfElements) : offsetForScroll,\n },\n );\n });\n // Fire event\n dispatchEvent(section, \"init\", { trigger: \"scroll\", elements });\n}\n\nfunction initOnView({ elements, easing, duration, stagger, repeatInView, root, section }) {\n const numberOfElements = elements.length;\n elements.forEach((element) => element.classList.add(defaults.outViewClass));\n let delay = defaults.inViewDelay;\n inView(\n elements,\n (target) => {\n target.classList.remove(defaults.outViewClass);\n if (stagger) {\n const index = elements.findIndex((item) => item == target);\n if (stagger === true) {\n const initDelay = defaults.inViewDelay;\n const step = duration / (numberOfElements - 1 || 1);\n delay = Math.round((index * step + initDelay) * 100) / 100;\n } else {\n delay += index * parseFloat(stagger);\n }\n }\n\n const controls = animate(target, defaults.animation, {\n delay,\n duration,\n ease: easing,\n filter: {\n ease: \"easeOut\",\n },\n });\n if (repeatInView) {\n return ({ target }) => {\n controls.cancel();\n Object.keys(defaults.animation).forEach((key) => {\n (target as HTMLElement).style[key] = \"\";\n });\n };\n }\n },\n {\n amount: 0.3,\n root,\n },\n );\n // Fire event\n dispatchEvent(section, \"init\", { trigger: \"view\", elements });\n}\n\nfunction getElementsAndAddAttribute({ useSectionElement, section, selector, animation }) {\n if (useSectionElement && section.classList.contains(defaults.initClass)) {\n return [];\n }\n\n const elements = useSectionElement\n ? [section]\n : [...section.querySelectorAll(`:is(${selector}):not(.${defaults.initClass})`)].filter((element) => {\n // Filter out elements who have another animation settings\n const elementHasAnimation = Object.keys(defaults.selectors).some((key) => {\n if (element.hasAttribute(`${dataAttribute}-${key}`)) {\n return true;\n }\n return false;\n });\n return !elementHasAnimation;\n });\n\n elements.forEach((element) => {\n if (!element.hasAttribute(dataAttribute)) {\n element.setAttribute(dataAttribute, animation || \"\");\n }\n });\n\n return elements;\n}\n"], "mappings": "giBAAA,IAAAA,GAAAC,GAAAC,GAAA,cAEA,OAAO,eAAeA,EAAS,aAAc,CACzC,MAAO,EACX,CAAC,EACDA,EAAQ,OAASC,GACjBD,EAAQ,WAAaE,GACrBF,EAAQ,YAAcG,GACtBH,EAAQ,cAAgBI,GACxBJ,EAAQ,WAAaK,GACrBL,EAAQ,YAAcM,GACtBN,EAAQ,cAAgBO,GACxBP,EAAQ,YAAcQ,GACtBR,EAAQ,aAAeS,GACvBT,EAAQ,eAAiBU,GACzBV,EAAQ,YAAcW,GACtBX,EAAQ,aAAeY,GACvBZ,EAAQ,eAAiBa,GACzBb,EAAQ,YAAcc,GACtBd,EAAQ,aAAee,GACvBf,EAAQ,eAAiBgB,GACzBhB,EAAQ,WAAaiB,GACrBjB,EAAQ,YAAckB,GACtBlB,EAAQ,cAAgBmB,GACxBnB,EAAQ,WAAaoB,GACrBpB,EAAQ,YAAcqB,GACtBrB,EAAQ,cAAgBsB,GACxBtB,EAAQ,WAAauB,GACrBvB,E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E,QAAS,OAAQ,SAAAiC,CAAS,CAAC,CAChE,CAEA,SAASC,GAA2B,CAAE,kBAAAL,EAAmB,QAAA7B,EAAS,SAAA4B,EAAU,UAAAd,CAAU,EAAG,CACrF,GAAIe,GAAqB7B,EAAQ,UAAU,SAASP,EAAS,SAAS,EAClE,MAAO,CAAC,EAGZ,IAAMwC,EAAWJ,EACX,CAAC7B,CAAO,EACR,CAAC,GAAGA,EAAQ,iBAAiB,OAAO4B,CAAQ,UAAUnC,EAAS,SAAS,GAAG,CAAC,EAAE,OAAQmD,GAQ3E,CANqB,OAAO,KAAKnD,EAAS,SAAS,EAAE,KAAMc,GAC1D,EAAAqC,EAAQ,aAAa,GAAGlD,CAAa,IAAIa,CAAG,EAAE,CAIrD,CAEJ,EAEP,OAAA0B,EAAS,QAASW,GAAY,CACrBA,EAAQ,aAAalD,CAAa,GACnCkD,EAAQ,aAAalD,EAAeoB,GAAa,EAAE,CAE3D,CAAC,EAEMmB,CACX", "names": ["require_easing", "__commonJSMin", "exports", "linear", "easeInSine", "easeOutSine", "easeInOutSine", "easeInQuad", "easeOutQuad", "easeInOutQuad", "easeInCubic", "easeOutCubic", "easeInOutCubic", "easeInQuart", "easeOutQuart", "easeInOutQuart", "easeInQuint", "easeOutQuint", "easeInOutQuint", "easeInExpo", "easeOutExpo", "easeInOutExpo", "easeInCirc", "easeOutCirc", "easeInOutCirc", "easeInBack", "easeOutBack", "easeInOutBack", "easeInElastic", "easeOutElastic", "easeInOutElastic", "easeOutBounce", "easeInBounce", "easeInOutBounce", "t", "t1", "scaledTime", "scaledTime1", "magnitude", "scaledTime2", "s", "p", "_scaledTime", "_scaledTime2", "noop", "any", "warning", "noop", "invariant", "memo", "callback", "result", "supportsScrollTimeline", "memo", "BaseGroupPlaybackControls", "animations", "animation", "propName", "newValue", "i", "timeline", "fallback", "subscriptions", "supportsScrollTimeline", "cancel", "time", "speed", "max", "methodName", "controls", "GroupPlaybackControls", "BaseGroupPlaybackControls", "onResolve", "onReject", "progress", "from", "to", "value", "toFromDifference", "secondsToMilliseconds", "seconds", "millisecondsToSeconds", "milliseconds", "calcGeneratorDuration", "generator", "duration", "timeStep", "state", "createGeneratorEasing", "options", "scale", "createGenerator", "generator", "duration", "calcGeneratorDuration", "progress", "millisecondsToSeconds", "isGenerator", "type", "mixNumber", "from", "to", "progress", "fillOffset", "offset", "remaining", "min", "i", "offsetProgress", "progress", "mixNumber", "defaultOffset", "arr", "offset", "fillOffset", "resolveElements", "elementOrSelector", "scope", "selectorCache", "_a", "root", "elements", "getValueTransition", "transition", "key", "attachTimeline", "animation", "timeline", "NativeAnimationControls", "animation", "_a", "_b", "_c", "durationInMs", "millisecondsToSeconds", "newTime", "secondsToMilliseconds", "newSpeed", "timeline", "attachTimeline", "noop", "supportsFlags", "memoSupports", "callback", "supportsFlag", "memoized", "memo", "_a", "supportsFlags", "supportsLinearEasing", "memoSupports", "isBezierDefinition", "easing", "generateLinearEasing", "easing", "duration", "resolution", "points", "numPoints", "progress", "cubicBezierAsString", "a", "b", "c", "d", "supportedWaapiEasing", "mapEasingToNativeEasing", "easing", "duration", "supportsLinearEasing", "generateLinearEasing", "isBezierDefinition", "segmentEasing", "activeAnimations", "statsBuffer", "startWaapiAnimation", "element", "valueName", "keyframes", "delay", "duration", "repeat", "repeatType", "ease", "times", "keyframeOptions", "easing", "mapEasingToNativeEasing", "statsBuffer", "activeAnimations", "animation", "createUnitType", "unit", "v", "percent", "createUnitType", "px", "progressPercentage", "percent", "v", "browserNumberValueTypes", "px", "isNotNull", "value", "getFinalKeyframe", "keyframes", "repeat", "repeatType", "finalKeyframe", "resolvedKeyframes", "index", "setCSSVar", "element", "name", "value", "setStyle", "supportsPartialKeyframes", "memo", "supportsWaapi", "memo", "state", "hydrateKeyframes", "valueName", "keyframes", "read", "i", "browserNumberValueTypes", "supportsPartialKeyframes", "defaultEasing", "getElementAnimationState", "element", "animationState", "NativeAnimation", "NativeAnimationControls", "valueKeyframes", "options", "isCSSVar", "invariant", "existingAnimation", "readInitialKeyframe", "isGenerator", "generatorOptions", "createGeneratorEasing", "supportsLinearEasing", "secondsToMilliseconds", "onFinish", "getFinalKeyframe", "init", "setCSSVar", "setStyle", "elementState", "supportsWaapi", "startWaapiAnimation", "resolve", "reject", "animateElements", "elementOrSelector", "keyframes", "options", "scope", "elements", "resolveElements", "numElements", "invariant", "animations", "i", "element", "elementTransition", "valueName", "valueKeyframes", "valueOptions", "getValueTransition", "secondsToMilliseconds", "NativeAnimation", "createScopedWaapiAnimate", "scope", "scopedAnimate", "elementOrSelector", "keyframes", "options", "GroupPlaybackControls", "animateElements", "animateMini", "clamp", "min", "max", "v", "velocityPerSecond", "velocity", "frameDuration", "MotionGlobalConfig", "stepsOrder", "createRenderStep", "runNextFrame", "stepName", "thisFrame", "nextFrame", "isProcessing", "flushNextFrame", "toKeepAlive", "latestFrameData", "numCalls", "triggerCallback", "callback", "step", "keepAlive", "immediate", "queue", "frameData", "statsBuffer", "maxElapsed", "createRenderBatcher", "scheduleNextBatch", "allowKeepAlive", "runNextFrame", "useDefaultElapsed", "state", "flagRunNextFrame", "steps", "stepsOrder", "acc", "key", "createRenderStep", "read", "resolveKeyframes", "update", "preRender", "render", "postRender", "processBatch", "timestamp", "MotionGlobalConfig", "wake", "step", "process", "keepAlive", "immediate", "i", "frame", "cancelFrame", "frameData", "frameSteps", "createRenderBatcher", "noop", "calcBezier", "t", "a1", "a2", "subdivisionPrecision", "subdivisionMaxIterations", "binarySubdivide", "x", "lowerBound", "upperBound", "mX1", "mX2", "currentX", "currentT", "i", "cubicBezier", "mY1", "mY2", "noop", "getTForX", "aX", "mirrorEasing", "easing", "p", "reverseEasing", "easing", "p", "backOut", "cubicBezier", "backIn", "reverseEasing", "backInOut", "mirrorEasing", "circIn", "p", "circOut", "reverseEasing", "circInOut", "mirrorEasing", "number", "v", "alpha", "clamp", "scale", "sanitize", "v", "floatRegex", "isNullish", "v", "singleColorRegex", "isColorString", "type", "testProp", "v", "singleColorRegex", "isNullish", "splitColor", "aName", "bName", "cName", "a", "b", "c", "alpha", "floatRegex", "clampRgbUnit", "v", "clamp", "rgbUnit", "number", "rgba", "isColorString", "splitColor", "red", "green", "blue", "alpha$1", "sanitize", "alpha", "parseHex", "v", "r", "g", "b", "a", "hex", "isColorString", "rgba", "hsla", "isColorString", "splitColor", "hue", "saturation", "lightness", "alpha$1", "percent", "sanitize", "alpha", "color", "v", "rgba", "hex", "hsla", "colorRegex", "test", "v", "_a", "_b", "floatRegex", "colorRegex", "NUMBER_TOKEN", "COLOR_TOKEN", "VAR_TOKEN", "VAR_FUNCTION_TOKEN", "SPLIT_TOKEN", "complexRegex", "analyseComplexValue", "value", "originalValue", "values", "indexes", "types", "split", "parsedValue", "color", "parseComplexValue", "createTransformer", "source", "numSections", "output", "i", "type", "sanitize", "convertNumbersToZero", "getAnimatableNone", "parsed", "complex", "checkStringStartsWith", "token", "key", "startsAsVariableToken", "checkStringStartsWith", "isCSSVariableToken", "value", "singleCssVariableRegex", "hueToRgb", "p", "q", "t", "hslaToRgba", "hue", "saturation", "lightness", "alpha", "red", "green", "blue", "mixImmediate", "a", "b", "p", "mixLinearColor", "from", "to", "v", "fromExpo", "expo", "colorTypes", "hex", "rgba", "hsla", "getColorType", "type", "asRGBA", "color", "warning", "model", "hslaToRgba", "mixColor", "fromRGBA", "toRGBA", "mixImmediate", "blended", "mixNumber", "combineFunctions", "a", "b", "v", "pipe", "transformers", "invisibleValues", "mixVisibility", "origin", "target", "p", "mixNumber", "a", "b", "p", "getMixer", "isCSSVariableToken", "mixImmediate", "color", "mixColor", "mixComplex", "mixArray", "mixObject", "output", "numValues", "blendValue", "v", "i", "key", "matchOrder", "origin", "target", "_a", "orderedOrigin", "pointers", "type", "originIndex", "originValue", "template", "complex", "originStats", "analyseComplexValue", "targetStats", "invisibleValues", "mixVisibility", "pipe", "warning", "mix", "from", "to", "p", "mixNumber", "getMixer", "easeIn", "cubicBezier", "easeOut", "easeInOut", "createMixers", "output", "ease", "customMixer", "mixers", "mixerFactory", "mix", "numMixers", "i", "mixer", "easingFunction", "noop", "pipe", "interpolate", "input", "isClamp", "inputLength", "invariant", "isZeroDeltaRange", "interpolator", "v", "progressInRange", "progress", "clamp", "observeTimeline", "update", "timeline", "prevProgress", "onFrame", "currentTime", "progress", "frame", "cancelFrame", "resizeHandlers", "observer", "getElementSize", "target", "borderBoxSize", "inlineSize", "blockSize", "notifyTarget", "contentRect", "_a", "handler", "notifyAll", "entries", "createResizeObserver", "resizeElement", "elements", "resolveElements", "element", "elementHandlers", "windowCallbacks", "windowResizeHandler", "createWindowResizeHandler", "size", "info", "callback", "resizeWindow", "resize", "a", "b", "resizeWindow", "resizeElement", "maxElapsed", "createAxisInfo", "createScrollInfo", "keys", "updateAxisInfo", "element", "axisName", "info", "time", "axis", "length", "position", "prev", "prevTime", "progress", "elapsed", "velocityPerSecond", "updateScrollInfo", "calcInset", "element", "container", "inset", "current", "svgBoundingBox", "parentBoundingBox", "x", "y", "svg", "parent", "namedEdges", "resolveEdge", "edge", "length", "inset", "delta", "asNumber", "defaultOffset", "resolveOffset", "offset", "containerLength", "targetLength", "targetInset", "offsetDefinition", "targetPoint", "containerPoint", "namedEdges", "resolveEdge", "ScrollOffset", "point", "getTargetSize", "target", "resolveOffsets", "container", "info", "options", "offsetDefinition", "ScrollOffset", "axis", "lengthLabel", "inset", "calcInset", "targetSize", "containerSize", "hasChanged", "numOffsets", "i", "offset", "resolveOffset", "interpolate", "defaultOffset", "clamp", "measure", "container", "target", "info", "node", "createOnScrollHandler", "element", "onScroll", "options", "time", "updateScrollInfo", "resolveOffsets", "scrollListeners", "resizeListeners", "onScrollHandlers", "getEventTarget", "element", "scrollInfo", "onScroll", "container", "options", "containerHandlers", "info", "createScrollInfo", "containerHandler", "createOnScrollHandler", "measureAll", "handler", "updateAll", "frameData", "notifyAll", "listener", "frame", "target", "resize", "_a", "cancelFrame", "currentHandlers", "scrollListener", "scrollTimelineFallback", "source", "container", "axis", "currentTime", "cancel", "scrollInfo", "info", "timelineCache", "getTimeline", "elementCache", "supportsScrollTimeline", "isOnScrollWithInfo", "onScroll", "needsElementTracking", "options", "scrollFunction", "observeTimeline", "scrollAnimation", "animation", "timeline", "valueAnimation", "progress", "noop", "scroll", "optionsWithDefaults", "thresholds", "inView", "elementOrSelector", "onStart", "root", "rootMargin", "amount", "elements", "resolveElements", "activeIntersections", "onIntersectionChange", "entries", "entry", "onEnd", "newOnEnd", "observer", "element", "import_easing_utils", "customEasings", "motionEasings", "easeIn", "easeInOut", "easeOut", "backInOut", "backIn", "backOut", "circIn", "circInOut", "circOut", "convertStringToNumber", "number", "numberIfFloat", "input", "injectCSS", "css", "element", "dispatchEvent", "type", "detail", "stringToValueAndUnit", "match", "unit", "getOffsetForScroll", "float", "getOffsetForScrollFunctionForStagger", "offsetValue", "offsetUnit", "stagger", "section", "lastElementValue", "index", "numberOfElements", "start", "lastElementAddedValue", "staggerOffset", "staggerUnit", "observeForChanges", "callback", "once", "mutationList", "overserver", "mutation", "easingTypes", "motionEasings", "customEasings", "namespace", "defaults", "dataAttribute", "styles", "type", "selectorFromConfig", "attributeName", "additionalSelectorClass", "section", "data", "trigger", "config", "triggerIsView", "triggerIsScroll", "getConfig", "key", "fromAttribute", "fallback", "easing", "duration", "offsetForScroll", "repeatInView", "animation", "stagger", "easingString", "rootSelector", "axis", "offsetValue", "offsetUnit", "getOffsetForScroll", "offsetConfig", "value", "unit", "staggerFunction", "getOffsetForScrollFunctionForStagger", "watch", "selector", "useSectionElement", "options", "callFunction", "root", "elements", "getElementsAndAddAttribute", "caller", "once", "observeForChanges", "eventName", "injectCSS", "initOnScroll", "initOnView", "offsetIsFuntion", "numberOfElements", "element", "index", "scroll", "animateMini", "dispatchEvent", "delay", "inView", "target", "item", "initDelay", "step", "controls"] }