{"version":3,"sources":["webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/clamp.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/interpolate.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/easing/dist/cubic-bezier.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/easing/dist/steps.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/animation/dist/utils/easing.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/animation/dist/Animation.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/utils/css-var.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/is-cubic-bezier.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/utils/easing.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/style.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/animate-style.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/types/dist/MotionValue.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/data.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/utils/controls.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/utils/options.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/utils/transforms.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/utils/resolve-elements.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/utils/stagger.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/array.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/defaults.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/wrap.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/easing.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/is-easing-generator.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/is-easing-list.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/is-function.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/is-number.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/mix.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/noop.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/offset.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/progress.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/utils/dist/time.es.js","webpack://@verndale/toolkit/./node_modules/@motionone/dom/dist/animate/index.es.js","webpack://@verndale/toolkit/./node_modules/motion/dist/animate.es.js"],"names":[],"mappings":"uNAAA,KAAM,GAAQ,CAAC,EAAK,EAAK,IAAM,KAAK,IAAI,KAAK,IAAI,EAAG,GAAM,GCO1D,WAAqB,EAAQ,EAAQ,QAAc,EAAO,QAAS,EAAS,IAAY,CACpF,KAAM,GAAS,EAAO,OAOhB,EAAY,EAAS,EAAM,OACjC,SAAY,GAAK,QAAW,EAAO,GAC3B,GAAM,CACV,GAAI,GAAI,EACR,KAAO,EAAI,EAAS,GACZ,IAAI,EAAM,EAAI,IADC,IACnB,CAGJ,GAAI,GAAkB,EAAM,EAAG,EAAG,QAAS,EAAM,GAAI,EAAM,EAAI,GAAI,IAEnE,SAAkB,GADI,KAAoB,EAAQ,GAClB,GACzB,QAAI,EAAO,GAAI,EAAO,EAAI,GAAI,I,qCCH7C,KAAM,GAAa,CAAC,EAAG,EAAI,IAAU,KAAM,EAAM,EAAK,EAAM,GAAM,EAAK,GAAM,EAAK,EAAM,IAAO,EAAI,EAAM,GAAM,EACzG,EAAuB,KACvB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D,EAAW,QAAgB,GAC3B,KAAM,GAAc,EAAS,OAIvB,EAAqB,GAC3B,OAAS,GAAI,EAAG,EAAI,EAAa,IAAK,CAClC,KAAM,GAAU,EAAS,GACzB,SAAW,KAAO,GAAW,CACzB,KAAM,GAAe,QAAW,EAAS,GACzC,EAAa,MAAQ,SAAc,EAAa,MAAO,EAAG,GAC1D,KAAM,GAAY,QAAa,EAAS,EAAK,EAAU,GAAM,GAC7D,EAAmB,KAAK,IAGhC,MAAO,QAAa,EAAoB,EAUxC,EAAQ,U,0BC5BZ,WAAyB,EAAQ,EAAU,GAAI,CAC3C,MAAO,QAAa,CAChB,IAAM,CACF,KAAM,GAAY,GAAI,KAAU,EAAQ,CAAC,EAAG,GAAI,GAChD,SAAU,SAAS,MAAM,IAAM,IACxB,IAEZ,EAAS,EAAQ,UAExB,WAAiB,EAAQ,EAAoB,EAAS,CAElD,MAAO,C,GADS,KAAW,GAAU,EAAkB,GACxC,EAAQ,EAAoB","file":"scripts/5898.7cbed39f37612d9adf60.js","sourcesContent":["const clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\n","import { mix } from './mix.es.js';\nimport { noopReturn } from './noop.es.js';\nimport { fillOffset, defaultOffset } from './offset.es.js';\nimport { progress } from './progress.es.js';\nimport { getEasingForSegment } from './easing.es.js';\nimport { clamp } from './clamp.es.js';\n\nfunction interpolate(output, input = defaultOffset(output.length), easing = noopReturn) {\n const length = output.length;\n /**\n * If the input length is lower than the output we\n * fill the input to match. This currently assumes the input\n * is an animation progress value so is a good candidate for\n * moving outside the function.\n */\n const remainder = length - input.length;\n remainder > 0 && fillOffset(input, remainder);\n return (t) => {\n let i = 0;\n for (; i < length - 2; i++) {\n if (t < input[i + 1])\n break;\n }\n let progressInRange = clamp(0, 1, progress(input[i], input[i + 1], t));\n const segmentEasing = getEasingForSegment(easing, i);\n progressInRange = segmentEasing(progressInRange);\n return mix(output[i], output[i + 1], progressInRange);\n };\n}\n\nexport { interpolate };\n","import { noopReturn } from '@motionone/utils';\n\n/*\n Bezier function generator\n\n This has been modified from Gaƫtan 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\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\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) * 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 noopReturn;\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","import { clamp } from '@motionone/utils';\n\nconst steps = (steps, direction = \"end\") => (progress) => {\n progress =\n direction === \"end\"\n ? Math.min(progress, 0.999)\n : Math.max(progress, 0.001);\n const expanded = progress * steps;\n const rounded = direction === \"end\" ? Math.floor(expanded) : Math.ceil(expanded);\n return clamp(0, 1, rounded / steps);\n};\n\nexport { steps };\n","import { cubicBezier, steps } from '@motionone/easing';\nimport { isFunction, noopReturn } from '@motionone/utils';\n\nconst namedEasings = {\n ease: cubicBezier(0.25, 0.1, 0.25, 1.0),\n \"ease-in\": cubicBezier(0.42, 0.0, 1.0, 1.0),\n \"ease-in-out\": cubicBezier(0.42, 0.0, 0.58, 1.0),\n \"ease-out\": cubicBezier(0.0, 0.0, 0.58, 1.0),\n};\nconst functionArgsRegex = /\\((.*?)\\)/;\nfunction getEasingFunction(definition) {\n // If already an easing function, return\n if (isFunction(definition))\n return definition;\n // If an easing curve definition, return bezier function\n if (Array.isArray(definition))\n return cubicBezier(...definition);\n // If we have a predefined easing function, return\n if (namedEasings[definition])\n return namedEasings[definition];\n // If this is a steps function, attempt to create easing curve\n if (definition.startsWith(\"steps\")) {\n const args = functionArgsRegex.exec(definition);\n if (args) {\n const argsArray = args[1].split(\",\");\n return steps(parseFloat(argsArray[0]), argsArray[1].trim());\n }\n }\n return noopReturn;\n}\n\nexport { getEasingFunction };\n","import { noopReturn, defaults, isEasingGenerator, isEasingList, interpolate } from '@motionone/utils';\nimport { getEasingFunction } from './utils/easing.es.js';\n\nclass Animation {\n constructor(output, keyframes = [0, 1], { easing, duration: initialDuration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, offset, direction = \"normal\", } = {}) {\n this.startTime = null;\n this.rate = 1;\n this.t = 0;\n this.cancelTimestamp = null;\n this.easing = noopReturn;\n this.duration = 0;\n this.totalDuration = 0;\n this.repeat = 0;\n this.playState = \"idle\";\n this.finished = new Promise((resolve, reject) => {\n this.resolve = resolve;\n this.reject = reject;\n });\n easing = easing || defaults.easing;\n if (isEasingGenerator(easing)) {\n const custom = easing.createAnimation(keyframes, () => \"0\", true);\n easing = custom.easing;\n if (custom.keyframes !== undefined)\n keyframes = custom.keyframes;\n if (custom.duration !== undefined)\n initialDuration = custom.duration;\n }\n this.repeat = repeat;\n this.easing = isEasingList(easing) ? noopReturn : getEasingFunction(easing);\n this.updateDuration(initialDuration);\n const interpolate$1 = interpolate(keyframes, offset, isEasingList(easing) ? easing.map(getEasingFunction) : noopReturn);\n this.tick = (timestamp) => {\n var _a;\n // TODO: Temporary fix for OptionsResolver typing\n delay = delay;\n let t = 0;\n if (this.pauseTime !== undefined) {\n t = this.pauseTime;\n }\n else {\n t = (timestamp - this.startTime) * this.rate;\n }\n this.t = t;\n // Convert to seconds\n t /= 1000;\n // Rebase on delay\n t = Math.max(t - delay, 0);\n /**\n * If this animation has finished, set the current time\n * to the total duration.\n */\n if (this.playState === \"finished\" && this.pauseTime === undefined) {\n t = this.totalDuration;\n }\n /**\n * Get the current progress (0-1) of the animation. If t is >\n * than duration we'll get values like 2.5 (midway through the\n * third iteration)\n */\n const progress = t / this.duration;\n // TODO progress += iterationStart\n /**\n * Get the current iteration (0 indexed). For instance the floor of\n * 2.5 is 2.\n */\n let currentIteration = Math.floor(progress);\n /**\n * Get the current progress of the iteration by taking the remainder\n * so 2.5 is 0.5 through iteration 2\n */\n let iterationProgress = progress % 1.0;\n if (!iterationProgress && progress >= 1) {\n iterationProgress = 1;\n }\n /**\n * If iteration progress is 1 we count that as the end\n * of the previous iteration.\n */\n iterationProgress === 1 && currentIteration--;\n /**\n * Reverse progress if we're not running in \"normal\" direction\n */\n const iterationIsOdd = currentIteration % 2;\n if (direction === \"reverse\" ||\n (direction === \"alternate\" && iterationIsOdd) ||\n (direction === \"alternate-reverse\" && !iterationIsOdd)) {\n iterationProgress = 1 - iterationProgress;\n }\n const p = t >= this.totalDuration ? 1 : Math.min(iterationProgress, 1);\n const latest = interpolate$1(this.easing(p));\n output(latest);\n const isAnimationFinished = this.pauseTime === undefined &&\n (this.playState === \"finished\" || t >= this.totalDuration + endDelay);\n if (isAnimationFinished) {\n this.playState = \"finished\";\n (_a = this.resolve) === null || _a === void 0 ? void 0 : _a.call(this, latest);\n }\n else if (this.playState !== \"idle\") {\n this.frameRequestId = requestAnimationFrame(this.tick);\n }\n };\n this.play();\n }\n play() {\n const now = performance.now();\n this.playState = \"running\";\n if (this.pauseTime !== undefined) {\n this.startTime = now - this.pauseTime;\n }\n else if (!this.startTime) {\n this.startTime = now;\n }\n this.cancelTimestamp = this.startTime;\n this.pauseTime = undefined;\n this.frameRequestId = requestAnimationFrame(this.tick);\n }\n pause() {\n this.playState = \"paused\";\n this.pauseTime = this.t;\n }\n finish() {\n this.playState = \"finished\";\n this.tick(0);\n }\n stop() {\n var _a;\n this.playState = \"idle\";\n if (this.frameRequestId !== undefined) {\n cancelAnimationFrame(this.frameRequestId);\n }\n (_a = this.reject) === null || _a === void 0 ? void 0 : _a.call(this, false);\n }\n cancel() {\n this.stop();\n this.tick(this.cancelTimestamp);\n }\n reverse() {\n this.rate *= -1;\n }\n commitStyles() { }\n updateDuration(duration) {\n this.duration = duration;\n this.totalDuration = duration * (this.repeat + 1);\n }\n get currentTime() {\n return this.t;\n }\n set currentTime(t) {\n if (this.pauseTime !== undefined || this.rate === 0) {\n this.pauseTime = t;\n }\n else {\n this.startTime = performance.now() - t / this.rate;\n }\n }\n get playbackRate() {\n return this.rate;\n }\n set playbackRate(rate) {\n this.rate = rate;\n }\n}\n\nexport { Animation };\n","import { transformDefinitions } from './transforms.es.js';\n\nconst isCssVar = (name) => name.startsWith(\"--\");\nconst registeredProperties = new Set();\nfunction registerCssVariable(name) {\n if (registeredProperties.has(name))\n return;\n registeredProperties.add(name);\n try {\n const { syntax, initialValue } = transformDefinitions.has(name)\n ? transformDefinitions.get(name)\n : {};\n CSS.registerProperty({\n name,\n inherits: false,\n syntax,\n initialValue,\n });\n }\n catch (e) { }\n}\n\nexport { isCssVar, registerCssVariable, registeredProperties };\n","import { isNumber } from './is-number.es.js';\n\nconst isCubicBezier = (easing) => Array.isArray(easing) && isNumber(easing[0]);\n\nexport { isCubicBezier };\n","const testAnimation = (keyframes, options) => document.createElement(\"div\").animate(keyframes, options);\nconst featureTests = {\n cssRegisterProperty: () => typeof CSS !== \"undefined\" &&\n Object.hasOwnProperty.call(CSS, \"registerProperty\"),\n waapi: () => Object.hasOwnProperty.call(Element.prototype, \"animate\"),\n partialKeyframes: () => {\n try {\n testAnimation({ opacity: [1] });\n }\n catch (e) {\n return false;\n }\n return true;\n },\n finished: () => Boolean(testAnimation({ opacity: [0, 1] }, { duration: 0.001 }).finished),\n linearEasing: () => {\n try {\n testAnimation({ opacity: 0 }, { easing: \"linear(0, 1)\" });\n }\n catch (e) {\n return false;\n }\n return true;\n },\n};\nconst results = {};\nconst supports = {};\nfor (const key in featureTests) {\n supports[key] = () => {\n if (results[key] === undefined)\n results[key] = featureTests[key]();\n return results[key];\n };\n}\n\nexport { supports };\n","import { isFunction, defaults, isCubicBezier, progress } from '@motionone/utils';\nimport { supports } from './feature-detection.es.js';\n\n// Create a linear easing point for every x second\nconst resolution = 0.015;\nconst generateLinearEasingPoints = (easing, duration) => {\n let points = \"\";\n const numPoints = Math.round(duration / resolution);\n for (let i = 0; i < numPoints; i++) {\n points += easing(progress(0, numPoints - 1, i)) + \", \";\n }\n return points.substring(0, points.length - 2);\n};\nconst convertEasing = (easing, duration) => {\n if (isFunction(easing)) {\n return supports.linearEasing()\n ? `linear(${generateLinearEasingPoints(easing, duration)})`\n : defaults.easing;\n }\n else {\n return isCubicBezier(easing) ? cubicBezierAsString(easing) : easing;\n }\n};\nconst cubicBezierAsString = ([a, b, c, d]) => `cubic-bezier(${a}, ${b}, ${c}, ${d})`;\n\nexport { convertEasing, cubicBezierAsString, generateLinearEasingPoints };\n","import { isTransform, asTransformCssVar, transformAlias } from './transforms.es.js';\n\nfunction getStyleName(key) {\n if (transformAlias[key])\n key = transformAlias[key];\n return isTransform(key) ? asTransformCssVar(key) : key;\n}\n\nexport { getStyleName };\n","import { isCssVar } from './utils/css-var.es.js';\nimport { getStyleName } from './utils/get-style-name.es.js';\nimport { transformDefinitions } from './utils/transforms.es.js';\n\nconst style = {\n get: (element, name) => {\n name = getStyleName(name);\n let value = isCssVar(name)\n ? element.style.getPropertyValue(name)\n : getComputedStyle(element)[name];\n if (!value && value !== 0) {\n const definition = transformDefinitions.get(name);\n if (definition)\n value = definition.initialValue;\n }\n return value;\n },\n set: (element, name, value) => {\n name = getStyleName(name);\n if (isCssVar(name)) {\n element.style.setProperty(name, value);\n }\n else {\n element.style[name] = value;\n }\n },\n};\n\nexport { style };\n","import { getAnimationData, getMotionValue } from './data.es.js';\nimport { isCssVar, registerCssVariable } from './utils/css-var.es.js';\nimport { Animation } from '@motionone/animation';\nimport { defaults, isEasingGenerator, isFunction, isEasingList, isNumber, time, noop } from '@motionone/utils';\nimport { isTransform, addTransformToElement, transformDefinitions } from './utils/transforms.es.js';\nimport { convertEasing } from './utils/easing.es.js';\nimport { supports } from './utils/feature-detection.es.js';\nimport { hydrateKeyframes, keyframesList } from './utils/keyframes.es.js';\nimport { style } from './style.es.js';\nimport { getStyleName } from './utils/get-style-name.es.js';\nimport { stopAnimation } from './utils/stop-animation.es.js';\n\nfunction getDevToolsRecord() {\n return window.__MOTION_DEV_TOOLS_RECORD;\n}\nfunction animateStyle(element, key, keyframesDefinition, options = {}) {\n const record = getDevToolsRecord();\n const isRecording = options.record !== false && record;\n let animation;\n let { duration = defaults.duration, delay = defaults.delay, endDelay = defaults.endDelay, repeat = defaults.repeat, easing = defaults.easing, direction, offset, allowWebkitAcceleration = false, } = options;\n const data = getAnimationData(element);\n const valueIsTransform = isTransform(key);\n let canAnimateNatively = supports.waapi();\n /**\n * If this is an individual transform, we need to map its\n * key to a CSS variable and update the element's transform style\n */\n valueIsTransform && addTransformToElement(element, key);\n const name = getStyleName(key);\n const motionValue = getMotionValue(data.values, name);\n /**\n * Get definition of value, this will be used to convert numerical\n * keyframes into the default value type.\n */\n const definition = transformDefinitions.get(name);\n /**\n * Stop the current animation, if any. Because this will trigger\n * commitStyles (DOM writes) and we might later trigger DOM reads,\n * this is fired now and we return a factory function to create\n * the actual animation that can get called in batch,\n */\n stopAnimation(motionValue.animation, !(isEasingGenerator(easing) && motionValue.generator) &&\n options.record !== false);\n /**\n * Batchable factory function containing all DOM reads.\n */\n return () => {\n const readInitialValue = () => { var _a, _b; return (_b = (_a = style.get(element, name)) !== null && _a !== void 0 ? _a : definition === null || definition === void 0 ? void 0 : definition.initialValue) !== null && _b !== void 0 ? _b : 0; };\n /**\n * Replace null values with the previous keyframe value, or read\n * it from the DOM if it's the first keyframe.\n */\n let keyframes = hydrateKeyframes(keyframesList(keyframesDefinition), readInitialValue);\n if (isEasingGenerator(easing)) {\n const custom = easing.createAnimation(keyframes, readInitialValue, valueIsTransform, name, motionValue);\n easing = custom.easing;\n if (custom.keyframes !== undefined)\n keyframes = custom.keyframes;\n if (custom.duration !== undefined)\n duration = custom.duration;\n }\n /**\n * If this is a CSS variable we need to register it with the browser\n * before it can be animated natively. We also set it with setProperty\n * rather than directly onto the element.style object.\n */\n if (isCssVar(name)) {\n if (supports.cssRegisterProperty()) {\n registerCssVariable(name);\n }\n else {\n canAnimateNatively = false;\n }\n }\n /**\n * If we've been passed a custom easing function, and this browser\n * does **not** support linear() easing, and the value is a transform\n * (and thus a pure number) we can still support the custom easing\n * by falling back to the animation polyfill.\n */\n if (valueIsTransform &&\n !supports.linearEasing() &&\n (isFunction(easing) || (isEasingList(easing) && easing.some(isFunction)))) {\n canAnimateNatively = false;\n }\n /**\n * If we can animate this value with WAAPI, do so.\n */\n if (canAnimateNatively) {\n /**\n * Convert numbers to default value types. Currently this only supports\n * transforms but it could also support other value types.\n */\n if (definition) {\n keyframes = keyframes.map((value) => isNumber(value) ? definition.toDefaultUnit(value) : value);\n }\n /**\n * If this browser doesn't support partial/implicit keyframes we need to\n * explicitly provide one.\n */\n if (keyframes.length === 1 &&\n (!supports.partialKeyframes() || isRecording)) {\n keyframes.unshift(readInitialValue());\n }\n const animationOptions = {\n delay: time.ms(delay),\n duration: time.ms(duration),\n endDelay: time.ms(endDelay),\n easing: !isEasingList(easing)\n ? convertEasing(easing, duration)\n : undefined,\n direction,\n iterations: repeat + 1,\n fill: \"both\",\n };\n animation = element.animate({\n [name]: keyframes,\n offset,\n easing: isEasingList(easing)\n ? easing.map((thisEasing) => convertEasing(thisEasing, duration))\n : undefined,\n }, animationOptions);\n /**\n * Polyfill finished Promise in browsers that don't support it\n */\n if (!animation.finished) {\n animation.finished = new Promise((resolve, reject) => {\n animation.onfinish = resolve;\n animation.oncancel = reject;\n });\n }\n const target = keyframes[keyframes.length - 1];\n animation.finished\n .then(() => {\n // Apply styles to target\n style.set(element, name, target);\n // Ensure fill modes don't persist\n animation.cancel();\n })\n .catch(noop);\n /**\n * This forces Webkit to run animations on the main thread by exploiting\n * this condition:\n * https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp?rev=281238#L1099\n *\n * This fixes Webkit's timing bugs, like accelerated animations falling\n * out of sync with main thread animations and massive delays in starting\n * accelerated animations in WKWebView.\n */\n if (!allowWebkitAcceleration)\n animation.playbackRate = 1.000001;\n /**\n * If we can't animate the value natively then we can fallback to the numbers-only\n * polyfill for transforms.\n */\n }\n else if (valueIsTransform) {\n /**\n * If any keyframe is a string (because we measured it from the DOM), we need to convert\n * it into a number before passing to the Animation polyfill.\n */\n keyframes = keyframes.map((value) => typeof value === \"string\" ? parseFloat(value) : value);\n /**\n * If we only have a single keyframe, we need to create an initial keyframe by reading\n * the current value from the DOM.\n */\n if (keyframes.length === 1) {\n keyframes.unshift(parseFloat(readInitialValue()));\n }\n const render = (latest) => {\n if (definition)\n latest = definition.toDefaultUnit(latest);\n style.set(element, name, latest);\n };\n animation = new Animation(render, keyframes, Object.assign(Object.assign({}, options), { duration,\n easing }));\n }\n else {\n const target = keyframes[keyframes.length - 1];\n style.set(element, name, definition && isNumber(target)\n ? definition.toDefaultUnit(target)\n : target);\n }\n if (isRecording) {\n record(element, key, keyframes, {\n duration,\n delay: delay,\n easing,\n repeat,\n offset,\n }, \"motion-one\");\n }\n motionValue.setAnimation(animation);\n return animation;\n };\n}\n\nexport { animateStyle };\n","/**\n * The MotionValue tracks the state of a single animatable\n * value. Currently, updatedAt and current are unused. The\n * long term idea is to use this to minimise the number\n * of DOM reads, and to abstract the DOM interactions here.\n */\nclass MotionValue {\n setAnimation(animation) {\n this.animation = animation;\n animation === null || animation === void 0 ? void 0 : animation.finished.then(() => this.clearAnimation()).catch(() => { });\n }\n clearAnimation() {\n this.animation = this.generator = undefined;\n }\n}\n\nexport { MotionValue };\n","import { MotionValue } from '@motionone/types';\n\nconst data = new WeakMap();\nfunction getAnimationData(element) {\n if (!data.has(element)) {\n data.set(element, {\n transforms: [],\n values: new Map(),\n });\n }\n return data.get(element);\n}\nfunction getMotionValue(motionValues, name) {\n if (!motionValues.has(name)) {\n motionValues.set(name, new MotionValue());\n }\n return motionValues.get(name);\n}\n\nexport { getAnimationData, getMotionValue };\n","import { defaults, noop, time } from '@motionone/utils';\nimport { stopAnimation } from './stop-animation.es.js';\n\nconst createAnimation = (factory) => factory();\nconst withControls = (animationFactory, options, duration = defaults.duration) => {\n return new Proxy({\n animations: animationFactory.map(createAnimation).filter(Boolean),\n duration,\n options,\n }, controls);\n};\n/**\n * TODO:\n * Currently this returns the first animation, ideally it would return\n * the first active animation.\n */\nconst getActiveAnimation = (state) => state.animations[0];\nconst controls = {\n get: (target, key) => {\n const activeAnimation = getActiveAnimation(target);\n switch (key) {\n case \"duration\":\n return target.duration;\n case \"currentTime\":\n return time.s((activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) || 0);\n case \"playbackRate\":\n case \"playState\":\n return activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key];\n case \"finished\":\n if (!target.finished) {\n target.finished = Promise.all(target.animations.map(selectFinished)).catch(noop);\n }\n return target.finished;\n case \"stop\":\n return () => {\n target.animations.forEach((animation) => stopAnimation(animation));\n };\n case \"forEachNative\":\n /**\n * This is for internal use only, fire a callback for each\n * underlying animation.\n */\n return (callback) => {\n target.animations.forEach((animation) => callback(animation, target));\n };\n default:\n return typeof (activeAnimation === null || activeAnimation === void 0 ? void 0 : activeAnimation[key]) === \"undefined\"\n ? undefined\n : () => target.animations.forEach((animation) => animation[key]());\n }\n },\n set: (target, key, value) => {\n switch (key) {\n case \"currentTime\":\n value = time.ms(value);\n case \"currentTime\":\n case \"playbackRate\":\n for (let i = 0; i < target.animations.length; i++) {\n target.animations[i][key] = value;\n }\n return true;\n }\n return false;\n },\n};\nconst selectFinished = (animation) => animation.finished;\n\nexport { controls, withControls };\n","function hydrateKeyframes(keyframes, readInitialValue) {\n for (let i = 0; i < keyframes.length; i++) {\n if (keyframes[i] === null) {\n keyframes[i] = i ? keyframes[i - 1] : readInitialValue();\n }\n }\n return keyframes;\n}\nconst keyframesList = (keyframes) => Array.isArray(keyframes) ? keyframes : [keyframes];\n\nexport { hydrateKeyframes, keyframesList };\n","const getOptions = (options, key) => \n/**\n * TODO: Make test for this\n * Always return a new object otherwise delay is overwritten by results of stagger\n * and this results in no stagger\n */\noptions[key] ? Object.assign(Object.assign({}, options), options[key]) : Object.assign({}, options);\n\nexport { getOptions };\n","function stopAnimation(animation, needsCommit = true) {\n if (!animation || animation.playState === \"finished\")\n return;\n // Suppress error thrown by WAAPI\n try {\n if (animation.stop) {\n animation.stop();\n }\n else {\n needsCommit && animation.commitStyles();\n animation.cancel();\n }\n }\n catch (e) { }\n}\n\nexport { stopAnimation };\n","import { noopReturn, addUniqueItem } from '@motionone/utils';\nimport { getAnimationData } from '../data.es.js';\n\n/**\n * A list of all transformable axes. We'll use this list to generated a version\n * of each axes for each transform.\n */\nconst axes = [\"\", \"X\", \"Y\", \"Z\"];\n/**\n * An ordered array of each transformable value. By default, transform values\n * will be sorted to this order.\n */\nconst order = [\"translate\", \"scale\", \"rotate\", \"skew\"];\nconst transformAlias = {\n x: \"translateX\",\n y: \"translateY\",\n z: \"translateZ\",\n};\nconst rotation = {\n syntax: \"\",\n initialValue: \"0deg\",\n toDefaultUnit: (v) => v + \"deg\",\n};\nconst baseTransformProperties = {\n translate: {\n syntax: \"\",\n initialValue: \"0px\",\n toDefaultUnit: (v) => v + \"px\",\n },\n rotate: rotation,\n scale: {\n syntax: \"\",\n initialValue: 1,\n toDefaultUnit: noopReturn,\n },\n skew: rotation,\n};\nconst transformDefinitions = new Map();\nconst asTransformCssVar = (name) => `--motion-${name}`;\n/**\n * Generate a list of every possible transform key\n */\nconst transforms = [\"x\", \"y\", \"z\"];\norder.forEach((name) => {\n axes.forEach((axis) => {\n transforms.push(name + axis);\n transformDefinitions.set(asTransformCssVar(name + axis), baseTransformProperties[name]);\n });\n});\n/**\n * A function to use with Array.sort to sort transform keys by their default order.\n */\nconst compareTransformOrder = (a, b) => transforms.indexOf(a) - transforms.indexOf(b);\n/**\n * Provide a quick way to check if a string is the name of a transform\n */\nconst transformLookup = new Set(transforms);\nconst isTransform = (name) => transformLookup.has(name);\nconst addTransformToElement = (element, name) => {\n // Map x to translateX etc\n if (transformAlias[name])\n name = transformAlias[name];\n const { transforms } = getAnimationData(element);\n addUniqueItem(transforms, name);\n /**\n * TODO: An optimisation here could be to cache the transform in element data\n * and only update if this has changed.\n */\n element.style.transform = buildTransformTemplate(transforms);\n};\nconst buildTransformTemplate = (transforms) => transforms\n .sort(compareTransformOrder)\n .reduce(transformListToString, \"\")\n .trim();\nconst transformListToString = (template, name) => `${template} ${name}(var(${asTransformCssVar(name)}))`;\n\nexport { addTransformToElement, asTransformCssVar, axes, buildTransformTemplate, compareTransformOrder, isTransform, transformAlias, transformDefinitions };\n","function resolveElements(elements, selectorCache) {\n var _a;\n if (typeof elements === \"string\") {\n if (selectorCache) {\n (_a = selectorCache[elements]) !== null && _a !== void 0 ? _a : (selectorCache[elements] = document.querySelectorAll(elements));\n elements = selectorCache[elements];\n }\n else {\n elements = document.querySelectorAll(elements);\n }\n }\n else if (elements instanceof Element) {\n elements = [elements];\n }\n /**\n * Return an empty array\n */\n return Array.from(elements || []);\n}\n\nexport { resolveElements };\n","import { isNumber, isFunction } from '@motionone/utils';\nimport { getEasingFunction } from '@motionone/animation';\n\nfunction stagger(duration = 0.1, { start = 0, from = 0, easing } = {}) {\n return (i, total) => {\n const fromIndex = isNumber(from) ? from : getFromIndex(from, total);\n const distance = Math.abs(fromIndex - i);\n let delay = duration * distance;\n if (easing) {\n const maxDelay = total * duration;\n const easingFunction = getEasingFunction(easing);\n delay = easingFunction(delay / maxDelay) * maxDelay;\n }\n return start + delay;\n };\n}\nfunction getFromIndex(from, total) {\n if (from === \"first\") {\n return 0;\n }\n else {\n const lastIndex = total - 1;\n return from === \"last\" ? lastIndex : lastIndex / 2;\n }\n}\nfunction resolveOption(option, i, total) {\n return isFunction(option) ? option(i, total) : option;\n}\n\nexport { getFromIndex, resolveOption, stagger };\n","function addUniqueItem(array, item) {\n array.indexOf(item) === -1 && array.push(item);\n}\nfunction removeItem(arr, item) {\n const index = arr.indexOf(item);\n index > -1 && arr.splice(index, 1);\n}\n\nexport { addUniqueItem, removeItem };\n","const defaults = {\n duration: 0.3,\n delay: 0,\n endDelay: 0,\n repeat: 0,\n easing: \"ease\",\n};\n\nexport { defaults };\n","const wrap = (min, max, v) => {\n const rangeSize = max - min;\n return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;\n};\n\nexport { wrap };\n","import { isEasingList } from './is-easing-list.es.js';\nimport { wrap } from './wrap.es.js';\n\nfunction getEasingForSegment(easing, i) {\n return isEasingList(easing)\n ? easing[wrap(0, easing.length, i)]\n : easing;\n}\n\nexport { getEasingForSegment };\n","const isEasingGenerator = (easing) => typeof easing === \"object\" &&\n Boolean(easing.createAnimation);\n\nexport { isEasingGenerator };\n","import { isNumber } from './is-number.es.js';\n\nconst isEasingList = (easing) => Array.isArray(easing) && !isNumber(easing[0]);\n\nexport { isEasingList };\n","const isFunction = (value) => typeof value === \"function\";\n\nexport { isFunction };\n","const isNumber = (value) => typeof value === \"number\";\n\nexport { isNumber };\n","const mix = (min, max, progress) => -progress * min + progress * max + min;\n\nexport { mix };\n","const noop = () => { };\nconst noopReturn = (v) => v;\n\nexport { noop, noopReturn };\n","import { mix } from './mix.es.js';\nimport { progress } from './progress.es.js';\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(mix(min, 1, offsetProgress));\n }\n}\nfunction defaultOffset(length) {\n const offset = [0];\n fillOffset(offset, length - 1);\n return offset;\n}\n\nexport { defaultOffset, fillOffset };\n","const progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min);\n\nexport { progress };\n","const time = {\n ms: (seconds) => seconds * 1000,\n s: (milliseconds) => milliseconds / 1000,\n};\n\nexport { time };\n","import { animateStyle } from './animate-style.es.js';\nimport { getOptions } from './utils/options.es.js';\nimport { resolveElements } from '../utils/resolve-elements.es.js';\nimport { withControls } from './utils/controls.es.js';\nimport { resolveOption } from '../utils/stagger.es.js';\n\nfunction animate(elements, keyframes, options = {}) {\n elements = resolveElements(elements);\n const numElements = elements.length;\n /**\n * Create and start new animations\n */\n const animationFactories = [];\n for (let i = 0; i < numElements; i++) {\n const element = elements[i];\n for (const key in keyframes) {\n const valueOptions = getOptions(options, key);\n valueOptions.delay = resolveOption(valueOptions.delay, i, numElements);\n const animation = animateStyle(element, key, keyframes[key], valueOptions);\n animationFactories.push(animation);\n }\n }\n return withControls(animationFactories, options, \n /**\n * TODO:\n * If easing is set to spring or glide, duration will be dynamically\n * generated. Ideally we would dynamically generate this from\n * animation.effect.getComputedTiming().duration but this isn't\n * supported in iOS13 or our number polyfill. Perhaps it's possible\n * to Proxy animations returned from animateStyle that has duration\n * as a getter.\n */\n options.duration);\n}\n\nexport { animate };\n","import { animate as animate$1, withControls } from '@motionone/dom';\nimport { isFunction } from '@motionone/utils';\nimport { Animation } from '@motionone/animation';\n\nfunction animateProgress(target, options = {}) {\n return withControls([\n () => {\n const animation = new Animation(target, [0, 1], options);\n animation.finished.catch(() => { });\n return animation;\n },\n ], options, options.duration);\n}\nfunction animate(target, keyframesOrOptions, options) {\n const factory = isFunction(target) ? animateProgress : animate$1;\n return factory(target, keyframesOrOptions, options);\n}\n\nexport { animate, animateProgress };\n"],"sourceRoot":""}