diff --git a/priv/static/live_toast.cjs.js b/priv/static/live_toast.cjs.js index 556f88c..af49de2 100644 --- a/priv/static/live_toast.cjs.js +++ b/priv/static/live_toast.cjs.js @@ -788,7 +788,7 @@ var gap = 15; var lastTS = []; function doAnimations(delayTime, maxItems, elToRemove) { const ts = []; - let toasts = Array.from(document.querySelectorAll("#toast-group > div")).map((t) => { + let toasts = Array.from(document.querySelectorAll('#toast-group [phx-hook="LiveToast"]')).map((t) => { if (isHidden(t)) { return null; } else { diff --git a/priv/static/live_toast.cjs.js.map b/priv/static/live_toast.cjs.js.map index b354438..13489fa 100644 --- a/priv/static/live_toast.cjs.js.map +++ b/priv/static/live_toast.cjs.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../assets/js/live_toast/index.ts", "../../assets/node_modules/@motionone/utils/dist/array.es.js", "../../assets/node_modules/@motionone/utils/dist/clamp.es.js", "../../assets/node_modules/@motionone/utils/dist/defaults.es.js", "../../assets/node_modules/@motionone/utils/dist/is-number.es.js", "../../assets/node_modules/@motionone/utils/dist/is-easing-list.es.js", "../../assets/node_modules/@motionone/utils/dist/wrap.es.js", "../../assets/node_modules/@motionone/utils/dist/easing.es.js", "../../assets/node_modules/@motionone/utils/dist/mix.es.js", "../../assets/node_modules/@motionone/utils/dist/noop.es.js", "../../assets/node_modules/@motionone/utils/dist/progress.es.js", "../../assets/node_modules/@motionone/utils/dist/offset.es.js", "../../assets/node_modules/@motionone/utils/dist/interpolate.es.js", "../../assets/node_modules/@motionone/utils/dist/is-cubic-bezier.es.js", "../../assets/node_modules/@motionone/utils/dist/is-easing-generator.es.js", "../../assets/node_modules/@motionone/utils/dist/is-function.es.js", "../../assets/node_modules/@motionone/utils/dist/is-string.es.js", "../../assets/node_modules/@motionone/utils/dist/time.es.js", "../../assets/node_modules/@motionone/easing/dist/cubic-bezier.es.js", "../../assets/node_modules/@motionone/easing/dist/steps.es.js", "../../assets/node_modules/@motionone/animation/dist/utils/easing.es.js", "../../assets/node_modules/@motionone/animation/dist/Animation.es.js", "../../assets/node_modules/hey-listen/dist/hey-listen.es.js", "../../assets/node_modules/@motionone/types/dist/MotionValue.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/data.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/transforms.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/css-var.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/easing.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/style.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/get-unit.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/animate-style.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/options.es.js", "../../assets/node_modules/@motionone/dom/dist/utils/resolve-elements.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/controls.es.js", "../../assets/node_modules/@motionone/dom/dist/utils/stagger.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/create-animate.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/index.es.js", "../../assets/node_modules/motion/dist/animate.es.js", "../../assets/js/live_toast/live_toast.ts"], - "sourcesContent": ["export * from './live_toast'\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 clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\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 isNumber = (value) => typeof value === \"number\";\n\nexport { isNumber };\n", "import { isNumber } from './is-number.es.js';\n\nconst isEasingList = (easing) => Array.isArray(easing) && !isNumber(easing[0]);\n\nexport { isEasingList };\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 mix = (min, max, progress) => -progress * min + progress * max + min;\n\nexport { mix };\n", "const noop = () => { };\nconst noopReturn = (v) => v;\n\nexport { noop, noopReturn };\n", "const progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min);\n\nexport { progress };\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", "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 { isNumber } from './is-number.es.js';\n\nconst isCubicBezier = (easing) => Array.isArray(easing) && isNumber(easing[0]);\n\nexport { isCubicBezier };\n", "const isEasingGenerator = (easing) => typeof easing === \"object\" &&\n Boolean(easing.createAnimation);\n\nexport { isEasingGenerator };\n", "const isFunction = (value) => typeof value === \"function\";\n\nexport { isFunction };\n", "const isString = (value) => typeof value === \"string\";\n\nexport { isString };\n", "const time = {\n ms: (seconds) => seconds * 1000,\n s: (milliseconds) => milliseconds / 1000,\n};\n\nexport { time };\n", "import { noopReturn } from '@motionone/utils';\n\n/*\n Bezier function generator\n\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\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, isCubicBezier, 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 (isCubicBezier(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\", autoplay = true, } = {}) {\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);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n initialDuration = custom.duration || initialDuration;\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 if (autoplay)\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", "var warning = function () { };\r\nvar invariant = function () { };\r\nif (process.env.NODE_ENV !== 'production') {\r\n warning = function (check, message) {\r\n if (!check && typeof console !== 'undefined') {\r\n console.warn(message);\r\n }\r\n };\r\n invariant = function (check, message) {\r\n if (!check) {\r\n throw new Error(message);\r\n }\r\n };\r\n}\n\nexport { invariant, warning };\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 { 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", "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", "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", "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", "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", "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, isString } from '@motionone/utils';\n\nfunction getUnitConverter(keyframes, definition) {\n var _a;\n let toUnit = (definition === null || definition === void 0 ? void 0 : definition.toDefaultUnit) || noopReturn;\n const finalKeyframe = keyframes[keyframes.length - 1];\n if (isString(finalKeyframe)) {\n const unit = ((_a = finalKeyframe.match(/(-?[\\d.]+)([a-z%]*)/)) === null || _a === void 0 ? void 0 : _a[2]) || \"\";\n if (unit)\n toUnit = (value) => value + unit;\n }\n return toUnit;\n}\n\nexport { getUnitConverter };\n", "import { getAnimationData, getMotionValue } from './data.es.js';\nimport { isCssVar, registerCssVariable } from './utils/css-var.es.js';\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';\nimport { getUnitConverter } from './utils/get-unit.es.js';\n\nfunction getDevToolsRecord() {\n return window.__MOTION_DEV_TOOLS_RECORD;\n}\nfunction animateStyle(element, key, keyframesDefinition, options = {}, AnimationPolyfill) {\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, persist = false, direction, offset, allowWebkitAcceleration = false, autoplay = true, } = 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 /**\n * Detect unit type of keyframes.\n */\n const toUnit = getUnitConverter(keyframes, definition);\n if (isEasingGenerator(easing)) {\n const custom = easing.createAnimation(keyframes, key !== \"opacity\", readInitialValue, name, motionValue);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n duration = custom.duration || 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 if (persist)\n return;\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 (AnimationPolyfill && 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 animation = new AnimationPolyfill((latest) => {\n style.set(element, name, toUnit ? toUnit(latest) : latest);\n }, 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 if (animation && !autoplay)\n animation.pause();\n return animation;\n };\n}\n\nexport { animateStyle };\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 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 { 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 // Fall-through\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", "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", "import { invariant } from 'hey-listen';\nimport { 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 createAnimate(AnimatePolyfill) {\n return function animate(elements, keyframes, options = {}) {\n elements = resolveElements(elements);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid element provided.\");\n invariant(Boolean(keyframes), \"No keyframes defined.\");\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, AnimatePolyfill);\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}\n\nexport { createAnimate };\n", "import { Animation } from '@motionone/animation';\nimport { createAnimate } from './create-animate.es.js';\n\nconst animate = createAnimate(Animation);\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", "import type { ViewHook } from 'phoenix_live_view'\nimport { animate } from 'motion'\n\nfunction isHidden(el: HTMLElement | null) {\n if (el === null) {\n return true\n }\n\n return el.offsetParent === null\n}\n\nfunction isFlash(el: HTMLElement) {\n if (\n ['server-error', 'client-error', 'flash-info', 'flash-error'].includes(\n el.id,\n )\n ) {\n return true\n } else {\n return false\n }\n}\n\n// number of flashes that aren't hidden\nfunction flashCount() {\n let num = 0\n\n if (!isHidden(document.getElementById('server-error'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('client-error'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('flash-info'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('flash-error'))) {\n num += 1\n }\n\n return num\n}\n\n// time in ms to wait before removal, but after animation\nconst removalTime = 5\n// animation time in ms\nconst animationTime = 550\n// whether flashes should be counted in maxItems\nconst maxItemsIgnoresFlashes = true\n// gap in px between toasts\nconst gap = 15\n\nlet lastTS: any[] = []\n\ndeclare global {\n interface HTMLElement {\n order: number\n targetDestination: string\n }\n}\n\nfunction doAnimations(\n this: ViewHook,\n delayTime: number,\n maxItems: number,\n elToRemove?: HTMLElement,\n) {\n const ts = []\n let toasts = Array.from(\n document.querySelectorAll('#toast-group > div'),\n )\n .map((t) => {\n if (isHidden(t)) {\n return null\n } else {\n return t\n }\n })\n .filter(Boolean)\n // reverse\n .reverse()\n\n if (elToRemove) {\n toasts = toasts.filter((t) => t !== elToRemove)\n }\n\n // Traverse through all toasts, in order they appear in the dom, for which they are NOT hidden, and assign el.order to\n // their index\n for (let i = 0; i < toasts.length; i++) {\n const toast = toasts[i]!\n if (isHidden(toast)) {\n continue\n }\n toast.order = i\n\n ts[i] = toast\n }\n\n // now loop through ts and animate each toast to its position\n for (let i = 0; i < ts.length; i++) {\n const max = maxItemsIgnoresFlashes ? maxItems + flashCount() : maxItems\n\n const toast = ts[i]\n\n let direction = ''\n\n if (\n toast.dataset.corner === 'bottom_left' ||\n toast.dataset.corner === 'bottom_right'\n ) {\n direction = '-'\n }\n\n // Calculate the translateY value with gap\n // now that they can be different heights, we need to actually caluclate the real heights and add them up.\n let val = 0\n\n for (let j = 0; j < toast.order; j++) {\n val += ts[j].offsetHeight + gap\n }\n\n // Calculate opacity based on position\n const opacity = toast.order > max ? 0 : 1 - (toast.order - max + 1)\n\n // also if this item moved past the max limit, disable click events on it\n if (toast.order >= max) {\n toast.classList.remove('pointer-events-auto')\n } else {\n toast.classList.add('pointer-events-auto')\n }\n\n let keyframes = { y: [`${direction}${val}px`], opacity: [opacity] }\n\n // if element is entering for the first time, start below the fold\n if (toast.order === 0 && lastTS.includes(toast) === false) {\n const val = toast.offsetHeight + gap\n const oppositeDirection = direction === '-' ? '' : '-'\n keyframes.y.unshift(`${oppositeDirection}${val}px`)\n\n keyframes.opacity.unshift(0)\n }\n\n toast.targetDestination = `${direction}${val}px`\n\n const duration = animationTime / 1000\n\n animate(toast, keyframes, {\n duration,\n easing: [0.22, 1.0, 0.36, 1.0],\n })\n toast.order += 1\n\n // decrease z-index\n toast.style.zIndex = (50 - toast.order).toString()\n\n // if this element moved past the max item limit, send the signal to remove it\n // should this be shorted than delay time?\n // also what about elements moving down when you close one?\n window.setTimeout(() => {\n if (toast.order > max) {\n this.pushEventTo('#toast-group', 'clear', { id: toast.id })\n }\n }, delayTime + removalTime)\n\n lastTS = ts\n }\n}\n\nasync function animateOut(this: ViewHook) {\n const val = (this.el.order - 2) * 100 + (this.el.order - 2) * gap\n\n let direction = ''\n\n if (\n this.el.dataset.corner === 'bottom_left' ||\n this.el.dataset.corner === 'bottom_right'\n ) {\n direction = '-'\n }\n\n const animation = animate(\n this.el,\n { y: `${direction}${val}%`, opacity: 0 },\n {\n opacity: {\n duration: 0.2,\n easing: 'ease-out',\n },\n duration: 0.3,\n easing: 'ease-out',\n },\n )\n\n await animation.finished\n}\n\n// Create the Phoenix Hoook for live_toast.\n// You can set custom animation durations.\nexport function createLiveToastHook(duration = 6000, maxItems = 3) {\n return {\n destroyed(this: ViewHook) {\n doAnimations.bind(this)(duration, maxItems)\n },\n updated(this: ViewHook) {\n // animate to targetDestination in 0ms\n let keyframes = { y: [this.el.targetDestination] }\n animate(this.el, keyframes, { duration: 0 })\n },\n mounted(this: ViewHook) {\n // for the special flashes, check if they are visible, and if not, return early out of here.\n if (['server-error', 'client-error'].includes(this.el.id)) {\n if (isHidden(document.getElementById(this.el.id))) {\n return\n }\n }\n\n window.addEventListener('flash-leave', async (event) => {\n if (event.target === this.el) {\n // animate this flash sliding out\n doAnimations.bind(this, duration, maxItems, this.el)()\n await animateOut.bind(this)()\n }\n })\n\n doAnimations.bind(this)(duration, maxItems)\n\n // skip the removal code if this is a flash\n if (isFlash(this.el)) {\n return\n }\n\n let durationOverride = duration\n if (this.el.dataset.duration !== undefined) {\n durationOverride = parseInt(this.el.dataset.duration)\n }\n\n window.setTimeout(async () => {\n // animate this element sliding down, opacity to 0, with delay time\n await animateOut.bind(this)()\n\n this.pushEventTo('#toast-group', 'clear', { id: this.el.id })\n }, durationOverride + removalTime)\n },\n }\n}\n"], - "mappings": ";;;;;;;;;AAAA;AAAA;AAAA;;;ACAA,uBAAuB,OAAO,MAAM;AAChC,QAAM,QAAQ,UAAU,MAAM,MAAM,KAAK;AAAA;;;ACD7C,IAAM,QAAQ,CAAC,KAAK,KAAK,MAAM,KAAK,IAAI,KAAK,IAAI,GAAG,MAAM;;;ACA1D,IAAM,WAAW;AAAA,EACb,UAAU;AAAA,EACV,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA;;;ACLZ,IAAM,WAAW,CAAC,UAAU,OAAO,UAAU;;;ACE7C,IAAM,eAAe,CAAC,WAAW,MAAM,QAAQ,WAAW,CAAC,SAAS,OAAO;;;ACF3E,IAAM,OAAO,CAAC,KAAK,KAAK,MAAM;AAC1B,QAAM,YAAY,MAAM;AACxB,SAAW,MAAI,OAA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", + "sourcesContent": ["export * from './live_toast'\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 clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\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 isNumber = (value) => typeof value === \"number\";\n\nexport { isNumber };\n", "import { isNumber } from './is-number.es.js';\n\nconst isEasingList = (easing) => Array.isArray(easing) && !isNumber(easing[0]);\n\nexport { isEasingList };\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 mix = (min, max, progress) => -progress * min + progress * max + min;\n\nexport { mix };\n", "const noop = () => { };\nconst noopReturn = (v) => v;\n\nexport { noop, noopReturn };\n", "const progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min);\n\nexport { progress };\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", "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 { isNumber } from './is-number.es.js';\n\nconst isCubicBezier = (easing) => Array.isArray(easing) && isNumber(easing[0]);\n\nexport { isCubicBezier };\n", "const isEasingGenerator = (easing) => typeof easing === \"object\" &&\n Boolean(easing.createAnimation);\n\nexport { isEasingGenerator };\n", "const isFunction = (value) => typeof value === \"function\";\n\nexport { isFunction };\n", "const isString = (value) => typeof value === \"string\";\n\nexport { isString };\n", "const time = {\n ms: (seconds) => seconds * 1000,\n s: (milliseconds) => milliseconds / 1000,\n};\n\nexport { time };\n", "import { noopReturn } from '@motionone/utils';\n\n/*\n Bezier function generator\n\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\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, isCubicBezier, 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 (isCubicBezier(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\", autoplay = true, } = {}) {\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);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n initialDuration = custom.duration || initialDuration;\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 if (autoplay)\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", "var warning = function () { };\r\nvar invariant = function () { };\r\nif (process.env.NODE_ENV !== 'production') {\r\n warning = function (check, message) {\r\n if (!check && typeof console !== 'undefined') {\r\n console.warn(message);\r\n }\r\n };\r\n invariant = function (check, message) {\r\n if (!check) {\r\n throw new Error(message);\r\n }\r\n };\r\n}\n\nexport { invariant, warning };\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 { 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", "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", "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", "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", "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", "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, isString } from '@motionone/utils';\n\nfunction getUnitConverter(keyframes, definition) {\n var _a;\n let toUnit = (definition === null || definition === void 0 ? void 0 : definition.toDefaultUnit) || noopReturn;\n const finalKeyframe = keyframes[keyframes.length - 1];\n if (isString(finalKeyframe)) {\n const unit = ((_a = finalKeyframe.match(/(-?[\\d.]+)([a-z%]*)/)) === null || _a === void 0 ? void 0 : _a[2]) || \"\";\n if (unit)\n toUnit = (value) => value + unit;\n }\n return toUnit;\n}\n\nexport { getUnitConverter };\n", "import { getAnimationData, getMotionValue } from './data.es.js';\nimport { isCssVar, registerCssVariable } from './utils/css-var.es.js';\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';\nimport { getUnitConverter } from './utils/get-unit.es.js';\n\nfunction getDevToolsRecord() {\n return window.__MOTION_DEV_TOOLS_RECORD;\n}\nfunction animateStyle(element, key, keyframesDefinition, options = {}, AnimationPolyfill) {\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, persist = false, direction, offset, allowWebkitAcceleration = false, autoplay = true, } = 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 /**\n * Detect unit type of keyframes.\n */\n const toUnit = getUnitConverter(keyframes, definition);\n if (isEasingGenerator(easing)) {\n const custom = easing.createAnimation(keyframes, key !== \"opacity\", readInitialValue, name, motionValue);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n duration = custom.duration || 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 if (persist)\n return;\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 (AnimationPolyfill && 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 animation = new AnimationPolyfill((latest) => {\n style.set(element, name, toUnit ? toUnit(latest) : latest);\n }, 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 if (animation && !autoplay)\n animation.pause();\n return animation;\n };\n}\n\nexport { animateStyle };\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 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 { 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 // Fall-through\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", "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", "import { invariant } from 'hey-listen';\nimport { 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 createAnimate(AnimatePolyfill) {\n return function animate(elements, keyframes, options = {}) {\n elements = resolveElements(elements);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid element provided.\");\n invariant(Boolean(keyframes), \"No keyframes defined.\");\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, AnimatePolyfill);\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}\n\nexport { createAnimate };\n", "import { Animation } from '@motionone/animation';\nimport { createAnimate } from './create-animate.es.js';\n\nconst animate = createAnimate(Animation);\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", "import type { ViewHook } from 'phoenix_live_view'\nimport { animate } from 'motion'\n\nfunction isHidden(el: HTMLElement | null) {\n if (el === null) {\n return true\n }\n\n return el.offsetParent === null\n}\n\nfunction isFlash(el: HTMLElement) {\n if (\n ['server-error', 'client-error', 'flash-info', 'flash-error'].includes(\n el.id,\n )\n ) {\n return true\n } else {\n return false\n }\n}\n\n// number of flashes that aren't hidden\nfunction flashCount() {\n let num = 0\n\n if (!isHidden(document.getElementById('server-error'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('client-error'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('flash-info'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('flash-error'))) {\n num += 1\n }\n\n return num\n}\n\n// time in ms to wait before removal, but after animation\nconst removalTime = 5\n// animation time in ms\nconst animationTime = 550\n// whether flashes should be counted in maxItems\nconst maxItemsIgnoresFlashes = true\n// gap in px between toasts\nconst gap = 15\n\nlet lastTS: any[] = []\n\ndeclare global {\n interface HTMLElement {\n order: number\n targetDestination: string\n }\n}\n\nfunction doAnimations(\n this: ViewHook,\n delayTime: number,\n maxItems: number,\n elToRemove?: HTMLElement,\n) {\n const ts = []\n let toasts = Array.from(\n document.querySelectorAll(\n '#toast-group [phx-hook=\"LiveToast\"]',\n ),\n )\n .map((t) => {\n if (isHidden(t)) {\n return null\n } else {\n return t\n }\n })\n .filter(Boolean)\n // reverse\n .reverse()\n\n if (elToRemove) {\n toasts = toasts.filter((t) => t !== elToRemove)\n }\n\n // Traverse through all toasts, in order they appear in the dom, for which they are NOT hidden, and assign el.order to\n // their index\n for (let i = 0; i < toasts.length; i++) {\n const toast = toasts[i]!\n if (isHidden(toast)) {\n continue\n }\n toast.order = i\n\n ts[i] = toast\n }\n\n // now loop through ts and animate each toast to its position\n for (let i = 0; i < ts.length; i++) {\n const max = maxItemsIgnoresFlashes ? maxItems + flashCount() : maxItems\n\n const toast = ts[i]\n\n let direction = ''\n\n if (\n toast.dataset.corner === 'bottom_left' ||\n toast.dataset.corner === 'bottom_right'\n ) {\n direction = '-'\n }\n\n // Calculate the translateY value with gap\n // now that they can be different heights, we need to actually caluclate the real heights and add them up.\n let val = 0\n\n for (let j = 0; j < toast.order; j++) {\n val += ts[j].offsetHeight + gap\n }\n\n // Calculate opacity based on position\n const opacity = toast.order > max ? 0 : 1 - (toast.order - max + 1)\n\n // also if this item moved past the max limit, disable click events on it\n if (toast.order >= max) {\n toast.classList.remove('pointer-events-auto')\n } else {\n toast.classList.add('pointer-events-auto')\n }\n\n let keyframes = { y: [`${direction}${val}px`], opacity: [opacity] }\n\n // if element is entering for the first time, start below the fold\n if (toast.order === 0 && lastTS.includes(toast) === false) {\n const val = toast.offsetHeight + gap\n const oppositeDirection = direction === '-' ? '' : '-'\n keyframes.y.unshift(`${oppositeDirection}${val}px`)\n\n keyframes.opacity.unshift(0)\n }\n\n toast.targetDestination = `${direction}${val}px`\n\n const duration = animationTime / 1000\n\n animate(toast, keyframes, {\n duration,\n easing: [0.22, 1.0, 0.36, 1.0],\n })\n toast.order += 1\n\n // decrease z-index\n toast.style.zIndex = (50 - toast.order).toString()\n\n // if this element moved past the max item limit, send the signal to remove it\n // should this be shorted than delay time?\n // also what about elements moving down when you close one?\n window.setTimeout(() => {\n if (toast.order > max) {\n this.pushEventTo('#toast-group', 'clear', { id: toast.id })\n }\n }, delayTime + removalTime)\n\n lastTS = ts\n }\n}\n\nasync function animateOut(this: ViewHook) {\n const val = (this.el.order - 2) * 100 + (this.el.order - 2) * gap\n\n let direction = ''\n\n if (\n this.el.dataset.corner === 'bottom_left' ||\n this.el.dataset.corner === 'bottom_right'\n ) {\n direction = '-'\n }\n\n const animation = animate(\n this.el,\n { y: `${direction}${val}%`, opacity: 0 },\n {\n opacity: {\n duration: 0.2,\n easing: 'ease-out',\n },\n duration: 0.3,\n easing: 'ease-out',\n },\n )\n\n await animation.finished\n}\n\n// Create the Phoenix Hoook for live_toast.\n// You can set custom animation durations.\nexport function createLiveToastHook(duration = 6000, maxItems = 3) {\n return {\n destroyed(this: ViewHook) {\n doAnimations.bind(this)(duration, maxItems)\n },\n updated(this: ViewHook) {\n // animate to targetDestination in 0ms\n let keyframes = { y: [this.el.targetDestination] }\n animate(this.el, keyframes, { duration: 0 })\n },\n mounted(this: ViewHook) {\n // for the special flashes, check if they are visible, and if not, return early out of here.\n if (['server-error', 'client-error'].includes(this.el.id)) {\n if (isHidden(document.getElementById(this.el.id))) {\n return\n }\n }\n\n window.addEventListener('flash-leave', async (event) => {\n if (event.target === this.el) {\n // animate this flash sliding out\n doAnimations.bind(this, duration, maxItems, this.el)()\n await animateOut.bind(this)()\n }\n })\n\n doAnimations.bind(this)(duration, maxItems)\n\n // skip the removal code if this is a flash\n if (isFlash(this.el)) {\n return\n }\n\n let durationOverride = duration\n if (this.el.dataset.duration !== undefined) {\n durationOverride = parseInt(this.el.dataset.duration)\n }\n\n window.setTimeout(async () => {\n // animate this element sliding down, opacity to 0, with delay time\n await animateOut.bind(this)()\n\n this.pushEventTo('#toast-group', 'clear', { id: this.el.id })\n }, durationOverride + removalTime)\n },\n }\n}\n"], + "mappings": ";;;;;;;;;AAAA;AAAA;AAAA;;;ACAA,uBAAuB,OAAO,MAAM;AAChC,QAAM,QAAQ,UAAU,MAAM,MAAM,KAAK;AAAA;;;ACD7C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AAM,UAAU,UAAU,KAAK;AACjD,gBAAM,WAAW,KAAK;AAAA;AAAA;AAI1B,mBAAa,KAAK,MAAM,UAAU;AAGlC,UAAI,QAAQ,KAAK,KAAK;AACpB;AAAA;AAGF,UAAI,mBAAmB;AACvB,UAAI,KAAK,GAAG,QAAQ,aAAa,QAAW;AAC1C,2BAAmB,SAAS,KAAK,GAAG,QAAQ;AAAA;AAG9C,aAAO,WAAW,YAAY;AAE5B,cAAM,WAAW,KAAK;AAEtB,aAAK,YAAY,gBAAgB,SAAS,EAAE,IAAI,KAAK,GAAG;AAAA,SACvD,mBAAmB;AAAA;AAAA;AAAA;", "names": [] } diff --git a/priv/static/live_toast.esm.js b/priv/static/live_toast.esm.js index 1e87513..ed3c41a 100644 --- a/priv/static/live_toast.esm.js +++ b/priv/static/live_toast.esm.js @@ -775,7 +775,7 @@ var gap = 15; var lastTS = []; function doAnimations(delayTime, maxItems, elToRemove) { const ts = []; - let toasts = Array.from(document.querySelectorAll("#toast-group > div")).map((t) => { + let toasts = Array.from(document.querySelectorAll('#toast-group [phx-hook="LiveToast"]')).map((t) => { if (isHidden(t)) { return null; } else { diff --git a/priv/static/live_toast.esm.js.map b/priv/static/live_toast.esm.js.map index df7dbc3..da21ff9 100644 --- a/priv/static/live_toast.esm.js.map +++ b/priv/static/live_toast.esm.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../assets/node_modules/@motionone/utils/dist/array.es.js", "../../assets/node_modules/@motionone/utils/dist/clamp.es.js", "../../assets/node_modules/@motionone/utils/dist/defaults.es.js", "../../assets/node_modules/@motionone/utils/dist/is-number.es.js", "../../assets/node_modules/@motionone/utils/dist/is-easing-list.es.js", "../../assets/node_modules/@motionone/utils/dist/wrap.es.js", "../../assets/node_modules/@motionone/utils/dist/easing.es.js", "../../assets/node_modules/@motionone/utils/dist/mix.es.js", "../../assets/node_modules/@motionone/utils/dist/noop.es.js", "../../assets/node_modules/@motionone/utils/dist/progress.es.js", "../../assets/node_modules/@motionone/utils/dist/offset.es.js", "../../assets/node_modules/@motionone/utils/dist/interpolate.es.js", "../../assets/node_modules/@motionone/utils/dist/is-cubic-bezier.es.js", "../../assets/node_modules/@motionone/utils/dist/is-easing-generator.es.js", "../../assets/node_modules/@motionone/utils/dist/is-function.es.js", "../../assets/node_modules/@motionone/utils/dist/is-string.es.js", "../../assets/node_modules/@motionone/utils/dist/time.es.js", "../../assets/node_modules/@motionone/easing/dist/cubic-bezier.es.js", "../../assets/node_modules/@motionone/easing/dist/steps.es.js", "../../assets/node_modules/@motionone/animation/dist/utils/easing.es.js", "../../assets/node_modules/@motionone/animation/dist/Animation.es.js", "../../assets/node_modules/hey-listen/dist/hey-listen.es.js", "../../assets/node_modules/@motionone/types/dist/MotionValue.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/data.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/transforms.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/css-var.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/feature-detection.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/easing.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/keyframes.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/get-style-name.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/style.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/stop-animation.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/get-unit.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/animate-style.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/options.es.js", "../../assets/node_modules/@motionone/dom/dist/utils/resolve-elements.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/utils/controls.es.js", "../../assets/node_modules/@motionone/dom/dist/utils/stagger.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/create-animate.es.js", "../../assets/node_modules/@motionone/dom/dist/animate/index.es.js", "../../assets/node_modules/motion/dist/animate.es.js", "../../assets/js/live_toast/live_toast.ts"], - "sourcesContent": ["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 clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\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 isNumber = (value) => typeof value === \"number\";\n\nexport { isNumber };\n", "import { isNumber } from './is-number.es.js';\n\nconst isEasingList = (easing) => Array.isArray(easing) && !isNumber(easing[0]);\n\nexport { isEasingList };\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 mix = (min, max, progress) => -progress * min + progress * max + min;\n\nexport { mix };\n", "const noop = () => { };\nconst noopReturn = (v) => v;\n\nexport { noop, noopReturn };\n", "const progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min);\n\nexport { progress };\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", "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 { isNumber } from './is-number.es.js';\n\nconst isCubicBezier = (easing) => Array.isArray(easing) && isNumber(easing[0]);\n\nexport { isCubicBezier };\n", "const isEasingGenerator = (easing) => typeof easing === \"object\" &&\n Boolean(easing.createAnimation);\n\nexport { isEasingGenerator };\n", "const isFunction = (value) => typeof value === \"function\";\n\nexport { isFunction };\n", "const isString = (value) => typeof value === \"string\";\n\nexport { isString };\n", "const time = {\n ms: (seconds) => seconds * 1000,\n s: (milliseconds) => milliseconds / 1000,\n};\n\nexport { time };\n", "import { noopReturn } from '@motionone/utils';\n\n/*\n Bezier function generator\n\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\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, isCubicBezier, 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 (isCubicBezier(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\", autoplay = true, } = {}) {\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);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n initialDuration = custom.duration || initialDuration;\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 if (autoplay)\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", "var warning = function () { };\r\nvar invariant = function () { };\r\nif (process.env.NODE_ENV !== 'production') {\r\n warning = function (check, message) {\r\n if (!check && typeof console !== 'undefined') {\r\n console.warn(message);\r\n }\r\n };\r\n invariant = function (check, message) {\r\n if (!check) {\r\n throw new Error(message);\r\n }\r\n };\r\n}\n\nexport { invariant, warning };\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 { 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", "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", "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", "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", "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", "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, isString } from '@motionone/utils';\n\nfunction getUnitConverter(keyframes, definition) {\n var _a;\n let toUnit = (definition === null || definition === void 0 ? void 0 : definition.toDefaultUnit) || noopReturn;\n const finalKeyframe = keyframes[keyframes.length - 1];\n if (isString(finalKeyframe)) {\n const unit = ((_a = finalKeyframe.match(/(-?[\\d.]+)([a-z%]*)/)) === null || _a === void 0 ? void 0 : _a[2]) || \"\";\n if (unit)\n toUnit = (value) => value + unit;\n }\n return toUnit;\n}\n\nexport { getUnitConverter };\n", "import { getAnimationData, getMotionValue } from './data.es.js';\nimport { isCssVar, registerCssVariable } from './utils/css-var.es.js';\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';\nimport { getUnitConverter } from './utils/get-unit.es.js';\n\nfunction getDevToolsRecord() {\n return window.__MOTION_DEV_TOOLS_RECORD;\n}\nfunction animateStyle(element, key, keyframesDefinition, options = {}, AnimationPolyfill) {\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, persist = false, direction, offset, allowWebkitAcceleration = false, autoplay = true, } = 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 /**\n * Detect unit type of keyframes.\n */\n const toUnit = getUnitConverter(keyframes, definition);\n if (isEasingGenerator(easing)) {\n const custom = easing.createAnimation(keyframes, key !== \"opacity\", readInitialValue, name, motionValue);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n duration = custom.duration || 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 if (persist)\n return;\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 (AnimationPolyfill && 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 animation = new AnimationPolyfill((latest) => {\n style.set(element, name, toUnit ? toUnit(latest) : latest);\n }, 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 if (animation && !autoplay)\n animation.pause();\n return animation;\n };\n}\n\nexport { animateStyle };\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 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 { 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 // Fall-through\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", "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", "import { invariant } from 'hey-listen';\nimport { 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 createAnimate(AnimatePolyfill) {\n return function animate(elements, keyframes, options = {}) {\n elements = resolveElements(elements);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid element provided.\");\n invariant(Boolean(keyframes), \"No keyframes defined.\");\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, AnimatePolyfill);\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}\n\nexport { createAnimate };\n", "import { Animation } from '@motionone/animation';\nimport { createAnimate } from './create-animate.es.js';\n\nconst animate = createAnimate(Animation);\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", "import type { ViewHook } from 'phoenix_live_view'\nimport { animate } from 'motion'\n\nfunction isHidden(el: HTMLElement | null) {\n if (el === null) {\n return true\n }\n\n return el.offsetParent === null\n}\n\nfunction isFlash(el: HTMLElement) {\n if (\n ['server-error', 'client-error', 'flash-info', 'flash-error'].includes(\n el.id,\n )\n ) {\n return true\n } else {\n return false\n }\n}\n\n// number of flashes that aren't hidden\nfunction flashCount() {\n let num = 0\n\n if (!isHidden(document.getElementById('server-error'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('client-error'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('flash-info'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('flash-error'))) {\n num += 1\n }\n\n return num\n}\n\n// time in ms to wait before removal, but after animation\nconst removalTime = 5\n// animation time in ms\nconst animationTime = 550\n// whether flashes should be counted in maxItems\nconst maxItemsIgnoresFlashes = true\n// gap in px between toasts\nconst gap = 15\n\nlet lastTS: any[] = []\n\ndeclare global {\n interface HTMLElement {\n order: number\n targetDestination: string\n }\n}\n\nfunction doAnimations(\n this: ViewHook,\n delayTime: number,\n maxItems: number,\n elToRemove?: HTMLElement,\n) {\n const ts = []\n let toasts = Array.from(\n document.querySelectorAll('#toast-group > div'),\n )\n .map((t) => {\n if (isHidden(t)) {\n return null\n } else {\n return t\n }\n })\n .filter(Boolean)\n // reverse\n .reverse()\n\n if (elToRemove) {\n toasts = toasts.filter((t) => t !== elToRemove)\n }\n\n // Traverse through all toasts, in order they appear in the dom, for which they are NOT hidden, and assign el.order to\n // their index\n for (let i = 0; i < toasts.length; i++) {\n const toast = toasts[i]!\n if (isHidden(toast)) {\n continue\n }\n toast.order = i\n\n ts[i] = toast\n }\n\n // now loop through ts and animate each toast to its position\n for (let i = 0; i < ts.length; i++) {\n const max = maxItemsIgnoresFlashes ? maxItems + flashCount() : maxItems\n\n const toast = ts[i]\n\n let direction = ''\n\n if (\n toast.dataset.corner === 'bottom_left' ||\n toast.dataset.corner === 'bottom_right'\n ) {\n direction = '-'\n }\n\n // Calculate the translateY value with gap\n // now that they can be different heights, we need to actually caluclate the real heights and add them up.\n let val = 0\n\n for (let j = 0; j < toast.order; j++) {\n val += ts[j].offsetHeight + gap\n }\n\n // Calculate opacity based on position\n const opacity = toast.order > max ? 0 : 1 - (toast.order - max + 1)\n\n // also if this item moved past the max limit, disable click events on it\n if (toast.order >= max) {\n toast.classList.remove('pointer-events-auto')\n } else {\n toast.classList.add('pointer-events-auto')\n }\n\n let keyframes = { y: [`${direction}${val}px`], opacity: [opacity] }\n\n // if element is entering for the first time, start below the fold\n if (toast.order === 0 && lastTS.includes(toast) === false) {\n const val = toast.offsetHeight + gap\n const oppositeDirection = direction === '-' ? '' : '-'\n keyframes.y.unshift(`${oppositeDirection}${val}px`)\n\n keyframes.opacity.unshift(0)\n }\n\n toast.targetDestination = `${direction}${val}px`\n\n const duration = animationTime / 1000\n\n animate(toast, keyframes, {\n duration,\n easing: [0.22, 1.0, 0.36, 1.0],\n })\n toast.order += 1\n\n // decrease z-index\n toast.style.zIndex = (50 - toast.order).toString()\n\n // if this element moved past the max item limit, send the signal to remove it\n // should this be shorted than delay time?\n // also what about elements moving down when you close one?\n window.setTimeout(() => {\n if (toast.order > max) {\n this.pushEventTo('#toast-group', 'clear', { id: toast.id })\n }\n }, delayTime + removalTime)\n\n lastTS = ts\n }\n}\n\nasync function animateOut(this: ViewHook) {\n const val = (this.el.order - 2) * 100 + (this.el.order - 2) * gap\n\n let direction = ''\n\n if (\n this.el.dataset.corner === 'bottom_left' ||\n this.el.dataset.corner === 'bottom_right'\n ) {\n direction = '-'\n }\n\n const animation = animate(\n this.el,\n { y: `${direction}${val}%`, opacity: 0 },\n {\n opacity: {\n duration: 0.2,\n easing: 'ease-out',\n },\n duration: 0.3,\n easing: 'ease-out',\n },\n )\n\n await animation.finished\n}\n\n// Create the Phoenix Hoook for live_toast.\n// You can set custom animation durations.\nexport function createLiveToastHook(duration = 6000, maxItems = 3) {\n return {\n destroyed(this: ViewHook) {\n doAnimations.bind(this)(duration, maxItems)\n },\n updated(this: ViewHook) {\n // animate to targetDestination in 0ms\n let keyframes = { y: [this.el.targetDestination] }\n animate(this.el, keyframes, { duration: 0 })\n },\n mounted(this: ViewHook) {\n // for the special flashes, check if they are visible, and if not, return early out of here.\n if (['server-error', 'client-error'].includes(this.el.id)) {\n if (isHidden(document.getElementById(this.el.id))) {\n return\n }\n }\n\n window.addEventListener('flash-leave', async (event) => {\n if (event.target === this.el) {\n // animate this flash sliding out\n doAnimations.bind(this, duration, maxItems, this.el)()\n await animateOut.bind(this)()\n }\n })\n\n doAnimations.bind(this)(duration, maxItems)\n\n // skip the removal code if this is a flash\n if (isFlash(this.el)) {\n return\n }\n\n let durationOverride = duration\n if (this.el.dataset.duration !== undefined) {\n durationOverride = parseInt(this.el.dataset.duration)\n }\n\n window.setTimeout(async () => {\n // animate this element sliding down, opacity to 0, with delay time\n await animateOut.bind(this)()\n\n this.pushEventTo('#toast-group', 'clear', { id: this.el.id })\n }, durationOverride + removalTime)\n },\n }\n}\n"], - "mappings": ";AAAA,uBAAuB,OAAO,MAAM;AAChC,QAAM,QAAQ,UAAU,MAAM,MAAM,KAAK;AAAA;;;ACD7C,IAAM,QAAQ,CAAC,KAAK,KAAK,MAAM,KAAK,IAAI,KAAK,IAAI,GA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AI1B,mBAAa,KAAK,MAAM,UAAU;AAGlC,UAAI,QAAQ,KAAK,KAAK;AACpB;AAAA;AAGF,UAAI,mBAAmB;AACvB,UAAI,KAAK,GAAG,QAAQ,aAAa,QAAW;AAC1C,2BAAmB,SAAS,KAAK,GAAG,QAAQ;AAAA;AAG9C,aAAO,WAAW,YAAY;AAE5B,cAAM,WAAW,KAAK;AAEtB,aAAK,YAAY,gBAAgB,SAAS,EAAE,IAAI,KAAK,GAAG;AAAA,SACvD,mBAAmB;AAAA;AAAA;AAAA;", + "sourcesContent": ["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 clamp = (min, max, v) => Math.min(Math.max(v, min), max);\n\nexport { clamp };\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 isNumber = (value) => typeof value === \"number\";\n\nexport { isNumber };\n", "import { isNumber } from './is-number.es.js';\n\nconst isEasingList = (easing) => Array.isArray(easing) && !isNumber(easing[0]);\n\nexport { isEasingList };\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 mix = (min, max, progress) => -progress * min + progress * max + min;\n\nexport { mix };\n", "const noop = () => { };\nconst noopReturn = (v) => v;\n\nexport { noop, noopReturn };\n", "const progress = (min, max, value) => max - min === 0 ? 1 : (value - min) / (max - min);\n\nexport { progress };\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", "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 { isNumber } from './is-number.es.js';\n\nconst isCubicBezier = (easing) => Array.isArray(easing) && isNumber(easing[0]);\n\nexport { isCubicBezier };\n", "const isEasingGenerator = (easing) => typeof easing === \"object\" &&\n Boolean(easing.createAnimation);\n\nexport { isEasingGenerator };\n", "const isFunction = (value) => typeof value === \"function\";\n\nexport { isFunction };\n", "const isString = (value) => typeof value === \"string\";\n\nexport { isString };\n", "const time = {\n ms: (seconds) => seconds * 1000,\n s: (milliseconds) => milliseconds / 1000,\n};\n\nexport { time };\n", "import { noopReturn } from '@motionone/utils';\n\n/*\n Bezier function generator\n\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\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, isCubicBezier, 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 (isCubicBezier(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\", autoplay = true, } = {}) {\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);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n initialDuration = custom.duration || initialDuration;\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 if (autoplay)\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", "var warning = function () { };\r\nvar invariant = function () { };\r\nif (process.env.NODE_ENV !== 'production') {\r\n warning = function (check, message) {\r\n if (!check && typeof console !== 'undefined') {\r\n console.warn(message);\r\n }\r\n };\r\n invariant = function (check, message) {\r\n if (!check) {\r\n throw new Error(message);\r\n }\r\n };\r\n}\n\nexport { invariant, warning };\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 { 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", "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", "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", "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", "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", "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, isString } from '@motionone/utils';\n\nfunction getUnitConverter(keyframes, definition) {\n var _a;\n let toUnit = (definition === null || definition === void 0 ? void 0 : definition.toDefaultUnit) || noopReturn;\n const finalKeyframe = keyframes[keyframes.length - 1];\n if (isString(finalKeyframe)) {\n const unit = ((_a = finalKeyframe.match(/(-?[\\d.]+)([a-z%]*)/)) === null || _a === void 0 ? void 0 : _a[2]) || \"\";\n if (unit)\n toUnit = (value) => value + unit;\n }\n return toUnit;\n}\n\nexport { getUnitConverter };\n", "import { getAnimationData, getMotionValue } from './data.es.js';\nimport { isCssVar, registerCssVariable } from './utils/css-var.es.js';\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';\nimport { getUnitConverter } from './utils/get-unit.es.js';\n\nfunction getDevToolsRecord() {\n return window.__MOTION_DEV_TOOLS_RECORD;\n}\nfunction animateStyle(element, key, keyframesDefinition, options = {}, AnimationPolyfill) {\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, persist = false, direction, offset, allowWebkitAcceleration = false, autoplay = true, } = 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 /**\n * Detect unit type of keyframes.\n */\n const toUnit = getUnitConverter(keyframes, definition);\n if (isEasingGenerator(easing)) {\n const custom = easing.createAnimation(keyframes, key !== \"opacity\", readInitialValue, name, motionValue);\n easing = custom.easing;\n keyframes = custom.keyframes || keyframes;\n duration = custom.duration || 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 if (persist)\n return;\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 (AnimationPolyfill && 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 animation = new AnimationPolyfill((latest) => {\n style.set(element, name, toUnit ? toUnit(latest) : latest);\n }, 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 if (animation && !autoplay)\n animation.pause();\n return animation;\n };\n}\n\nexport { animateStyle };\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 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 { 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 // Fall-through\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", "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", "import { invariant } from 'hey-listen';\nimport { 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 createAnimate(AnimatePolyfill) {\n return function animate(elements, keyframes, options = {}) {\n elements = resolveElements(elements);\n const numElements = elements.length;\n invariant(Boolean(numElements), \"No valid element provided.\");\n invariant(Boolean(keyframes), \"No keyframes defined.\");\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, AnimatePolyfill);\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}\n\nexport { createAnimate };\n", "import { Animation } from '@motionone/animation';\nimport { createAnimate } from './create-animate.es.js';\n\nconst animate = createAnimate(Animation);\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", "import type { ViewHook } from 'phoenix_live_view'\nimport { animate } from 'motion'\n\nfunction isHidden(el: HTMLElement | null) {\n if (el === null) {\n return true\n }\n\n return el.offsetParent === null\n}\n\nfunction isFlash(el: HTMLElement) {\n if (\n ['server-error', 'client-error', 'flash-info', 'flash-error'].includes(\n el.id,\n )\n ) {\n return true\n } else {\n return false\n }\n}\n\n// number of flashes that aren't hidden\nfunction flashCount() {\n let num = 0\n\n if (!isHidden(document.getElementById('server-error'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('client-error'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('flash-info'))) {\n num += 1\n }\n\n if (!isHidden(document.getElementById('flash-error'))) {\n num += 1\n }\n\n return num\n}\n\n// time in ms to wait before removal, but after animation\nconst removalTime = 5\n// animation time in ms\nconst animationTime = 550\n// whether flashes should be counted in maxItems\nconst maxItemsIgnoresFlashes = true\n// gap in px between toasts\nconst gap = 15\n\nlet lastTS: any[] = []\n\ndeclare global {\n interface HTMLElement {\n order: number\n targetDestination: string\n }\n}\n\nfunction doAnimations(\n this: ViewHook,\n delayTime: number,\n maxItems: number,\n elToRemove?: HTMLElement,\n) {\n const ts = []\n let toasts = Array.from(\n document.querySelectorAll(\n '#toast-group [phx-hook=\"LiveToast\"]',\n ),\n )\n .map((t) => {\n if (isHidden(t)) {\n return null\n } else {\n return t\n }\n })\n .filter(Boolean)\n // reverse\n .reverse()\n\n if (elToRemove) {\n toasts = toasts.filter((t) => t !== elToRemove)\n }\n\n // Traverse through all toasts, in order they appear in the dom, for which they are NOT hidden, and assign el.order to\n // their index\n for (let i = 0; i < toasts.length; i++) {\n const toast = toasts[i]!\n if (isHidden(toast)) {\n continue\n }\n toast.order = i\n\n ts[i] = toast\n }\n\n // now loop through ts and animate each toast to its position\n for (let i = 0; i < ts.length; i++) {\n const max = maxItemsIgnoresFlashes ? maxItems + flashCount() : maxItems\n\n const toast = ts[i]\n\n let direction = ''\n\n if (\n toast.dataset.corner === 'bottom_left' ||\n toast.dataset.corner === 'bottom_right'\n ) {\n direction = '-'\n }\n\n // Calculate the translateY value with gap\n // now that they can be different heights, we need to actually caluclate the real heights and add them up.\n let val = 0\n\n for (let j = 0; j < toast.order; j++) {\n val += ts[j].offsetHeight + gap\n }\n\n // Calculate opacity based on position\n const opacity = toast.order > max ? 0 : 1 - (toast.order - max + 1)\n\n // also if this item moved past the max limit, disable click events on it\n if (toast.order >= max) {\n toast.classList.remove('pointer-events-auto')\n } else {\n toast.classList.add('pointer-events-auto')\n }\n\n let keyframes = { y: [`${direction}${val}px`], opacity: [opacity] }\n\n // if element is entering for the first time, start below the fold\n if (toast.order === 0 && lastTS.includes(toast) === false) {\n const val = toast.offsetHeight + gap\n const oppositeDirection = direction === '-' ? '' : '-'\n keyframes.y.unshift(`${oppositeDirection}${val}px`)\n\n keyframes.opacity.unshift(0)\n }\n\n toast.targetDestination = `${direction}${val}px`\n\n const duration = animationTime / 1000\n\n animate(toast, keyframes, {\n duration,\n easing: [0.22, 1.0, 0.36, 1.0],\n })\n toast.order += 1\n\n // decrease z-index\n toast.style.zIndex = (50 - toast.order).toString()\n\n // if this element moved past the max item limit, send the signal to remove it\n // should this be shorted than delay time?\n // also what about elements moving down when you close one?\n window.setTimeout(() => {\n if (toast.order > max) {\n this.pushEventTo('#toast-group', 'clear', { id: toast.id })\n }\n }, delayTime + removalTime)\n\n lastTS = ts\n }\n}\n\nasync function animateOut(this: ViewHook) {\n const val = (this.el.order - 2) * 100 + (this.el.order - 2) * gap\n\n let direction = ''\n\n if (\n this.el.dataset.corner === 'bottom_left' ||\n this.el.dataset.corner === 'bottom_right'\n ) {\n direction = '-'\n }\n\n const animation = animate(\n this.el,\n { y: `${direction}${val}%`, opacity: 0 },\n {\n opacity: {\n duration: 0.2,\n easing: 'ease-out',\n },\n duration: 0.3,\n easing: 'ease-out',\n },\n )\n\n await animation.finished\n}\n\n// Create the Phoenix Hoook for live_toast.\n// You can set custom animation durations.\nexport function createLiveToastHook(duration = 6000, maxItems = 3) {\n return {\n destroyed(this: ViewHook) {\n doAnimations.bind(this)(duration, maxItems)\n },\n updated(this: ViewHook) {\n // animate to targetDestination in 0ms\n let keyframes = { y: [this.el.targetDestination] }\n animate(this.el, keyframes, { duration: 0 })\n },\n mounted(this: ViewHook) {\n // for the special flashes, check if they are visible, and if not, return early out of here.\n if (['server-error', 'client-error'].includes(this.el.id)) {\n if (isHidden(document.getElementById(this.el.id))) {\n return\n }\n }\n\n window.addEventListener('flash-leave', async (event) => {\n if (event.target === this.el) {\n // animate this flash sliding out\n doAnimations.bind(this, duration, maxItems, this.el)()\n await animateOut.bind(this)()\n }\n })\n\n doAnimations.bind(this)(duration, maxItems)\n\n // skip the removal code if this is a flash\n if (isFlash(this.el)) {\n return\n }\n\n let durationOverride = duration\n if (this.el.dataset.duration !== undefined) {\n durationOverride = parseInt(this.el.dataset.duration)\n }\n\n window.setTimeout(async () => {\n // animate this element sliding down, opacity to 0, with delay time\n await animateOut.bind(this)()\n\n this.pushEventTo('#toast-group', 'clear', { id: this.el.id })\n }, durationOverride + removalTime)\n },\n }\n}\n"], + "mappings": ";AAAA,uBAAuB,OAAO,MAAM;AAChC,QAAM,QAAQ,UAAU,MAAM,MAAM,KAAK;AAAA;;;ACD7C,IAAM,QAAQ,CAAC,KAAK,KAAK,MAAM,KAAK,IAAI,KAAK,IAAI,GAAG,MAAM;;;ACA1D,IAAM,WAAW;AAAA,EACb,UAAU;AAAA,EACV,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AAAA;;;ACLZ,IAAM,WAAW,CAAC,UAAU,OAAO,UAAU;;;ACE7C,IAAM,eAAe,CAAC,WAAW,MAAM,QAAQ,WAAW,CAAC,SAAS,OAAO;;;ACF3E,IAAM,OAAO,CAAC,KAAK,KAAK,MAAM;AAC1B,QAAM,YAAY,MAAM;AACxB,SAAW,MAAI,OAAO,YAAa,aAAa,YAAa;AAAA;;;ACCjE,6BAA6B,QAAQ,GAAG;AACpC,SAAO,aAAa,UACd,OAAO,KAAK,GAAG,OAAO,QAAQ,MAC9B;AAAA;;;ACNV,IAAM,MAAM,CAAC,KAAK,KAAK,cAAa,CAAC,YAAW,MAAM,YAAW,MAAM;;;ACAvE,IAAM,OAAO,MAAM;AAAA;AACnB,IAAM,aAAa,CAAC,MAAM;;;ACD1B,IAAM,WAAW,CAAC,KAAK,KAAK,UAAU,MAAM,QAAQ,IAAI,IAAK,SAAQ,OAAQ,OAAM;;;ACGnF,oBAAoB,QAAQ,WAAW;AACnC,QAAM,MAAM,OAAO,OAAO,SAAS;AACnC,WAAS,IAAI,GAAG,KAAK,WAAW,KAAK;AACjC,UAAM,iBAAiB,SAAS,GAAG,WAAW;AAC9C,WAAO,KAAK,IAAI,KAAK,GAAG;AAAA;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eAAQ,KAAK,IAAI,WAAW,EAAE,UAAU;AAAA;AAAA,IAE1C,UAAwB;AAEtB,UAAI,CAAC,gBAAgB,gBAAgB,SAAS,KAAK,GAAG,KAAK;AACzD,YAAI,SAAS,SAAS,eAAe,KAAK,GAAG,MAAM;AACjD;AAAA;AAAA;AAIJ,aAAO,iBAAiB,eAAe,OAAO,UAAU;AACtD,YAAI,MAAM,WAAW,KAAK,IAAI;AAE5B,uBAAa,KAAK,MAAM,UAAU,UAAU,KAAK;AACjD,gBAAM,WAAW,KAAK;AAAA;AAAA;AAI1B,mBAAa,KAAK,MAAM,UAAU;AAGlC,UAAI,QAAQ,KAAK,KAAK;AACpB;AAAA;AAGF,UAAI,mBAAmB;AACvB,UAAI,KAAK,GAAG,QAAQ,aAAa,QAAW;AAC1C,2BAAmB,SAAS,KAAK,GAAG,QAAQ;AAAA;AAG9C,aAAO,WAAW,YAAY;AAE5B,cAAM,WAAW,KAAK;AAEtB,aAAK,YAAY,gBAAgB,SAAS,EAAE,IAAI,KAAK,GAAG;AAAA,SACvD,mBAAmB;AAAA;AAAA;AAAA;", "names": [] } diff --git a/priv/static/live_toast.js b/priv/static/live_toast.js index 8ac28e0..5bb8118 100644 --- a/priv/static/live_toast.js +++ b/priv/static/live_toast.js @@ -810,7 +810,7 @@ var LiveMotion = (() => { var lastTS = []; function doAnimations(delayTime, maxItems, elToRemove) { const ts = []; - let toasts = Array.from(document.querySelectorAll("#toast-group > div")).map((t) => { + let toasts = Array.from(document.querySelectorAll('#toast-group [phx-hook="LiveToast"]')).map((t) => { if (isHidden(t)) { return null; } else { diff --git a/priv/static/live_toast.min.js b/priv/static/live_toast.min.js index 7993aed..3688d6d 100644 --- a/priv/static/live_toast.min.js +++ b/priv/static/live_toast.min.js @@ -1 +1 @@ -var LiveMotion=(()=>{var vt=Object.defineProperty;var qt=t=>vt(t,"__esModule",{value:!0});var kt=(t,e)=>{qt(t);for(var s in e)vt(t,s,{get:e[s],enumerable:!0})};var J=(t,e,s)=>new Promise((i,n)=>{var r=l=>{try{o(s.next(l))}catch(u){n(u)}},a=l=>{try{o(s.throw(l))}catch(u){n(u)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,a);o((s=s.apply(t,e)).next())});var xe={};kt(xe,{createLiveToastHook:()=>ge});function rt(t,e){t.indexOf(e)===-1&&t.push(e)}var _=(t,e,s)=>Math.min(Math.max(s,t),e);var p={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"};var E=t=>typeof t=="number";var v=t=>Array.isArray(t)&&!E(t[0]);var bt=(t,e,s)=>{let i=e-t;return((s-t)%i+i)%i+t};function Et(t,e){return v(t)?t[bt(0,t.length,e)]:t}var Q=(t,e,s)=>-s*t+s*e+t;var $=()=>{},d=t=>t;var F=(t,e,s)=>e-t==0?1:(s-t)/(e-t);function nt(t,e){let s=t[t.length-1];for(let i=1;i<=e;i++){let n=F(0,e,i);t.push(Q(s,1,n))}}function Tt(t){let e=[0];return nt(e,t-1),e}function at(t,e=Tt(t.length),s=d){let i=t.length,n=i-e.length;return n>0&&nt(e,n),r=>{let a=0;for(;aArray.isArray(t)&&E(t[0]);var P=t=>typeof t=="object"&&Boolean(t.createAnimation);var x=t=>typeof t=="function";var lt=t=>typeof t=="string";var S={ms:t=>t*1e3,s:t=>t/1e3};var wt=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,Kt=1e-7,Gt=12;function Wt(t,e,s,i,n){let r,a,o=0;do a=e+(s-e)/2,r=wt(a,i,n)-t,r>0?s=a:e=a;while(Math.abs(r)>Kt&&++oWt(r,0,1,t,s);return r=>r===0||r===1?r:wt(n(r),e,i)}var ft=(t,e="end")=>s=>{s=e==="end"?Math.min(s,.999):Math.max(s,.001);let i=s*t,n=e==="end"?Math.floor(i):Math.ceil(i);return _(0,1,n/t)};var St={ease:M(.25,.1,.25,1),"ease-in":M(.42,0,1,1),"ease-in-out":M(.42,0,.58,1),"ease-out":M(0,0,.58,1)},Xt=/\((.*?)\)/;function mt(t){if(x(t))return t;if(B(t))return M(...t);if(St[t])return St[t];if(t.startsWith("steps")){let e=Xt.exec(t);if(e){let s=e[1].split(",");return ft(parseFloat(s[0]),s[1].trim())}}return d}var C=class{constructor(e,s=[0,1],{easing:i,duration:n=p.duration,delay:r=p.delay,endDelay:a=p.endDelay,repeat:o=p.repeat,offset:l,direction:u="normal",autoplay:b=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=d,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((f,g)=>{this.resolve=f,this.reject=g}),i=i||p.easing,P(i)){let f=i.createAnimation(s);i=f.easing,s=f.keyframes||s,n=f.duration||n}this.repeat=o,this.easing=v(i)?d:mt(i),this.updateDuration(n);let j=at(s,l,v(i)?i.map(mt):d);this.tick=f=>{var g;r=r;let h=0;this.pauseTime!==void 0?h=this.pauseTime:h=(f-this.startTime)*this.rate,this.t=h,h/=1e3,h=Math.max(h-r,0),this.playState==="finished"&&this.pauseTime===void 0&&(h=this.totalDuration);let I=h/this.duration,G=Math.floor(I),T=I%1;!T&&I>=1&&(T=1),T===1&&G--;let W=G%2;(u==="reverse"||u==="alternate"&&W||u==="alternate-reverse"&&!W)&&(T=1-T);let L=h>=this.totalDuration?1:Math.min(T,1),R=j(this.easing(L));e(R),this.pauseTime===void 0&&(this.playState==="finished"||h>=this.totalDuration+a)?(this.playState="finished",(g=this.resolve)===null||g===void 0||g.call(this,R)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},b&&this.play()}play(){let e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}};var ct=function(){};var Y=class{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}};var ut=new WeakMap;function tt(t){return ut.has(t)||ut.set(t,{transforms:[],values:new Map}),ut.get(t)}function At(t,e){return t.has(e)||t.set(e,new Y),t.get(e)}var Zt=["","X","Y","Z"],Jt=["translate","scale","rotate","skew"],N={x:"translateX",y:"translateY",z:"translateZ"},Ot={syntax:"",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},Qt={translate:{syntax:"",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:Ot,scale:{syntax:"",initialValue:1,toDefaultUnit:d},skew:Ot},A=new Map,et=t=>`--motion-${t}`,st=["x","y","z"];Jt.forEach(t=>{Zt.forEach(e=>{st.push(t+e),A.set(et(t+e),Qt[t])})});var Yt=(t,e)=>st.indexOf(t)-st.indexOf(e),te=new Set(st),it=t=>te.has(t),Dt=(t,e)=>{N[e]&&(e=N[e]);let{transforms:s}=tt(t);rt(s,e),t.style.transform=ee(s)},ee=t=>t.sort(Yt).reduce(se,"").trim(),se=(t,e)=>`${t} ${e}(var(${et(e)}))`;var H=t=>t.startsWith("--"),Ft=new Set;function Mt(t){if(!Ft.has(t)){Ft.add(t);try{let{syntax:e,initialValue:s}=A.has(t)?A.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:s})}catch(e){}}}var pt=(t,e)=>document.createElement("div").animate(t,e),Vt={cssRegisterProperty:()=>typeof CSS!="undefined"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{pt({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(pt({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{pt({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},dt={},O={};for(let t in Vt)O[t]=()=>(dt[t]===void 0&&(dt[t]=Vt[t]()),dt[t]);var ie=.015,oe=(t,e)=>{let s="",i=Math.round(e/ie);for(let n=0;nx(t)?O.linearEasing()?`linear(${oe(t,e)})`:p.easing:B(t)?re(t):t,re=([t,e,s,i])=>`cubic-bezier(${t}, ${e}, ${s}, ${i})`;function It(t,e){for(let s=0;sArray.isArray(t)?t:[t];function U(t){return N[t]&&(t=N[t]),it(t)?et(t):t}var q={get:(t,e)=>{e=U(e);let s=H(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!s&&s!==0){let i=A.get(e);i&&(s=i.initialValue)}return s},set:(t,e,s)=>{e=U(e),H(e)?t.style.setProperty(e,s):t.style[e]=s}};function ot(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(s){}}function Pt(t,e){var s;let i=(e==null?void 0:e.toDefaultUnit)||d,n=t[t.length-1];if(lt(n)){let r=((s=n.match(/(-?[\d.]+)([a-z%]*)/))===null||s===void 0?void 0:s[2])||"";r&&(i=a=>a+r)}return i}function ne(){return window.__MOTION_DEV_TOOLS_RECORD}function Ct(t,e,s,i={},n){let r=ne(),a=i.record!==!1&&r,o,{duration:l=p.duration,delay:u=p.delay,endDelay:b=p.endDelay,repeat:j=p.repeat,easing:f=p.easing,persist:g=!1,direction:h,offset:I,allowWebkitAcceleration:G=!1,autoplay:T=!0}=i,W=tt(t),L=it(e),R=O.waapi();L&&Dt(t,e);let y=U(e),X=At(W.values,y),w=A.get(y);return ot(X.animation,!(P(f)&&X.generator)&&i.record!==!1),()=>{let Z=()=>{var m,z;return(z=(m=q.get(t,y))!==null&&m!==void 0?m:w==null?void 0:w.initialValue)!==null&&z!==void 0?z:0},c=It(Rt(s),Z),jt=Pt(c,w);if(P(f)){let m=f.createAnimation(c,e!=="opacity",Z,y,X);f=m.easing,c=m.keyframes||c,l=m.duration||l}if(H(y)&&(O.cssRegisterProperty()?Mt(y):R=!1),L&&!O.linearEasing()&&(x(f)||v(f)&&f.some(x))&&(R=!1),R){w&&(c=c.map(D=>E(D)?w.toDefaultUnit(D):D)),c.length===1&&(!O.partialKeyframes()||a)&&c.unshift(Z());let m={delay:S.ms(u),duration:S.ms(l),endDelay:S.ms(b),easing:v(f)?void 0:ht(f,l),direction:h,iterations:j+1,fill:"both"};o=t.animate({[y]:c,offset:I,easing:v(f)?f.map(D=>ht(D,l)):void 0},m),o.finished||(o.finished=new Promise((D,Ut)=>{o.onfinish=D,o.oncancel=Ut}));let z=c[c.length-1];o.finished.then(()=>{g||(q.set(t,y,z),o.cancel())}).catch($),G||(o.playbackRate=1.000001)}else if(n&&L)c=c.map(m=>typeof m=="string"?parseFloat(m):m),c.length===1&&c.unshift(parseFloat(Z())),o=new n(m=>{q.set(t,y,jt?jt(m):m)},c,Object.assign(Object.assign({},i),{duration:l,easing:f}));else{let m=c[c.length-1];q.set(t,y,w&&E(m)?w.toDefaultUnit(m):m)}return a&&r(t,e,c,{duration:l,delay:u,easing:f,repeat:j,offset:I},"motion-one"),X.setAnimation(o),o&&!T&&o.pause(),o}}var Lt=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function zt(t,e){var s;return typeof t=="string"?e?((s=e[t])!==null&&s!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}var ae=t=>t(),k=(t,e,s=p.duration)=>new Proxy({animations:t.map(ae).filter(Boolean),duration:s,options:e},fe),le=t=>t.animations[0],fe={get:(t,e)=>{let s=le(t);switch(e){case"duration":return t.duration;case"currentTime":return S.s((s==null?void 0:s[e])||0);case"playbackRate":case"playState":return s==null?void 0:s[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(me)).catch($)),t.finished;case"stop":return()=>{t.animations.forEach(i=>ot(i))};case"forEachNative":return i=>{t.animations.forEach(n=>i(n,t))};default:return typeof(s==null?void 0:s[e])=="undefined"?void 0:()=>t.animations.forEach(i=>i[e]())}},set:(t,e,s)=>{switch(e){case"currentTime":s=S.ms(s);case"playbackRate":for(let i=0;it.finished;function _t(t,e,s){return x(t)?t(e,s):t}function $t(t){return function(s,i,n={}){s=zt(s);let r=s.length;ct(Boolean(r),"No valid element provided."),ct(Boolean(i),"No keyframes defined.");let a=[];for(let o=0;o{let s=new C(t,[0,1],e);return s.finished.catch(()=>{}),s}],e,e.duration)}function K(t,e,s){return(x(t)?ce:gt)(t,e,s)}function V(t){return t===null?!0:t.offsetParent===null}function ue(t){return!!["server-error","client-error","flash-info","flash-error"].includes(t.id)}function pe(){let t=0;return V(document.getElementById("server-error"))||(t+=1),V(document.getElementById("client-error"))||(t+=1),V(document.getElementById("flash-info"))||(t+=1),V(document.getElementById("flash-error"))||(t+=1),t}var Bt=5,de=550,he=!0,xt=15,Nt=[];function yt(t,e,s){let i=[],n=Array.from(document.querySelectorAll("#toast-group > div")).map(r=>V(r)?null:r).filter(Boolean).reverse();s&&(n=n.filter(r=>r!==s));for(let r=0;ra?0:1-(o.order-a+1);o.order>=a?o.classList.remove("pointer-events-auto"):o.classList.add("pointer-events-auto");let j={y:[`${l}${u}px`],opacity:[b]};if(o.order===0&&Nt.includes(o)===!1){let g=o.offsetHeight+xt,h=l==="-"?"":"-";j.y.unshift(`${h}${g}px`),j.opacity.unshift(0)}o.targetDestination=`${l}${u}px`;let f=de/1e3;K(o,j,{duration:f,easing:[.22,1,.36,1]}),o.order+=1,o.style.zIndex=(50-o.order).toString(),window.setTimeout(()=>{o.order>a&&this.pushEventTo("#toast-group","clear",{id:o.id})},t+Bt),Nt=i}}function Ht(){return J(this,null,function*(){let t=(this.el.order-2)*100+(this.el.order-2)*xt,e="";(this.el.dataset.corner==="bottom_left"||this.el.dataset.corner==="bottom_right")&&(e="-"),yield K(this.el,{y:`${e}${t}%`,opacity:0},{opacity:{duration:.2,easing:"ease-out"},duration:.3,easing:"ease-out"}).finished})}function ge(t=6e3,e=3){return{destroyed(){yt.bind(this)(t,e)},updated(){let s={y:[this.el.targetDestination]};K(this.el,s,{duration:0})},mounted(){if(["server-error","client-error"].includes(this.el.id)&&V(document.getElementById(this.el.id))||(window.addEventListener("flash-leave",i=>J(this,null,function*(){i.target===this.el&&(yt.bind(this,t,e,this.el)(),yield Ht.bind(this)())})),yt.bind(this)(t,e),ue(this.el)))return;let s=t;this.el.dataset.duration!==void 0&&(s=parseInt(this.el.dataset.duration)),window.setTimeout(()=>J(this,null,function*(){yield Ht.bind(this)(),this.pushEventTo("#toast-group","clear",{id:this.el.id})}),s+Bt)}}}return xe;})(); +var LiveMotion=(()=>{var vt=Object.defineProperty;var kt=t=>vt(t,"__esModule",{value:!0});var qt=(t,e)=>{kt(t);for(var s in e)vt(t,s,{get:e[s],enumerable:!0})};var J=(t,e,s)=>new Promise((i,n)=>{var r=l=>{try{o(s.next(l))}catch(u){n(u)}},a=l=>{try{o(s.throw(l))}catch(u){n(u)}},o=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,a);o((s=s.apply(t,e)).next())});var xe={};qt(xe,{createLiveToastHook:()=>ge});function rt(t,e){t.indexOf(e)===-1&&t.push(e)}var _=(t,e,s)=>Math.min(Math.max(s,t),e);var p={duration:.3,delay:0,endDelay:0,repeat:0,easing:"ease"};var T=t=>typeof t=="number";var v=t=>Array.isArray(t)&&!T(t[0]);var bt=(t,e,s)=>{let i=e-t;return((s-t)%i+i)%i+t};function Tt(t,e){return v(t)?t[bt(0,t.length,e)]:t}var Q=(t,e,s)=>-s*t+s*e+t;var $=()=>{},d=t=>t;var F=(t,e,s)=>e-t==0?1:(s-t)/(e-t);function nt(t,e){let s=t[t.length-1];for(let i=1;i<=e;i++){let n=F(0,e,i);t.push(Q(s,1,n))}}function Et(t){let e=[0];return nt(e,t-1),e}function at(t,e=Et(t.length),s=d){let i=t.length,n=i-e.length;return n>0&&nt(e,n),r=>{let a=0;for(;aArray.isArray(t)&&T(t[0]);var L=t=>typeof t=="object"&&Boolean(t.createAnimation);var x=t=>typeof t=="function";var lt=t=>typeof t=="string";var S={ms:t=>t*1e3,s:t=>t/1e3};var wt=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,Kt=1e-7,Gt=12;function Wt(t,e,s,i,n){let r,a,o=0;do a=e+(s-e)/2,r=wt(a,i,n)-t,r>0?s=a:e=a;while(Math.abs(r)>Kt&&++oWt(r,0,1,t,s);return r=>r===0||r===1?r:wt(n(r),e,i)}var ft=(t,e="end")=>s=>{s=e==="end"?Math.min(s,.999):Math.max(s,.001);let i=s*t,n=e==="end"?Math.floor(i):Math.ceil(i);return _(0,1,n/t)};var St={ease:M(.25,.1,.25,1),"ease-in":M(.42,0,1,1),"ease-in-out":M(.42,0,.58,1),"ease-out":M(0,0,.58,1)},Xt=/\((.*?)\)/;function mt(t){if(x(t))return t;if(B(t))return M(...t);if(St[t])return St[t];if(t.startsWith("steps")){let e=Xt.exec(t);if(e){let s=e[1].split(",");return ft(parseFloat(s[0]),s[1].trim())}}return d}var P=class{constructor(e,s=[0,1],{easing:i,duration:n=p.duration,delay:r=p.delay,endDelay:a=p.endDelay,repeat:o=p.repeat,offset:l,direction:u="normal",autoplay:b=!0}={}){if(this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=d,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((f,g)=>{this.resolve=f,this.reject=g}),i=i||p.easing,L(i)){let f=i.createAnimation(s);i=f.easing,s=f.keyframes||s,n=f.duration||n}this.repeat=o,this.easing=v(i)?d:mt(i),this.updateDuration(n);let j=at(s,l,v(i)?i.map(mt):d);this.tick=f=>{var g;r=r;let h=0;this.pauseTime!==void 0?h=this.pauseTime:h=(f-this.startTime)*this.rate,this.t=h,h/=1e3,h=Math.max(h-r,0),this.playState==="finished"&&this.pauseTime===void 0&&(h=this.totalDuration);let I=h/this.duration,G=Math.floor(I),E=I%1;!E&&I>=1&&(E=1),E===1&&G--;let W=G%2;(u==="reverse"||u==="alternate"&&W||u==="alternate-reverse"&&!W)&&(E=1-E);let C=h>=this.totalDuration?1:Math.min(E,1),R=j(this.easing(C));e(R),this.pauseTime===void 0&&(this.playState==="finished"||h>=this.totalDuration+a)?(this.playState="finished",(g=this.resolve)===null||g===void 0||g.call(this,R)):this.playState!=="idle"&&(this.frameRequestId=requestAnimationFrame(this.tick))},b&&this.play()}play(){let e=performance.now();this.playState="running",this.pauseTime!==void 0?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}pause(){this.playState="paused",this.pauseTime=this.t}finish(){this.playState="finished",this.tick(0)}stop(){var e;this.playState="idle",this.frameRequestId!==void 0&&cancelAnimationFrame(this.frameRequestId),(e=this.reject)===null||e===void 0||e.call(this,!1)}cancel(){this.stop(),this.tick(this.cancelTimestamp)}reverse(){this.rate*=-1}commitStyles(){}updateDuration(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}get currentTime(){return this.t}set currentTime(e){this.pauseTime!==void 0||this.rate===0?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}get playbackRate(){return this.rate}set playbackRate(e){this.rate=e}};var ct=function(){};var Y=class{setAnimation(e){this.animation=e,e==null||e.finished.then(()=>this.clearAnimation()).catch(()=>{})}clearAnimation(){this.animation=this.generator=void 0}};var ut=new WeakMap;function tt(t){return ut.has(t)||ut.set(t,{transforms:[],values:new Map}),ut.get(t)}function At(t,e){return t.has(e)||t.set(e,new Y),t.get(e)}var Zt=["","X","Y","Z"],Jt=["translate","scale","rotate","skew"],N={x:"translateX",y:"translateY",z:"translateZ"},Ot={syntax:"",initialValue:"0deg",toDefaultUnit:t=>t+"deg"},Qt={translate:{syntax:"",initialValue:"0px",toDefaultUnit:t=>t+"px"},rotate:Ot,scale:{syntax:"",initialValue:1,toDefaultUnit:d},skew:Ot},A=new Map,et=t=>`--motion-${t}`,st=["x","y","z"];Jt.forEach(t=>{Zt.forEach(e=>{st.push(t+e),A.set(et(t+e),Qt[t])})});var Yt=(t,e)=>st.indexOf(t)-st.indexOf(e),te=new Set(st),it=t=>te.has(t),Dt=(t,e)=>{N[e]&&(e=N[e]);let{transforms:s}=tt(t);rt(s,e),t.style.transform=ee(s)},ee=t=>t.sort(Yt).reduce(se,"").trim(),se=(t,e)=>`${t} ${e}(var(${et(e)}))`;var H=t=>t.startsWith("--"),Ft=new Set;function Mt(t){if(!Ft.has(t)){Ft.add(t);try{let{syntax:e,initialValue:s}=A.has(t)?A.get(t):{};CSS.registerProperty({name:t,inherits:!1,syntax:e,initialValue:s})}catch(e){}}}var pt=(t,e)=>document.createElement("div").animate(t,e),Vt={cssRegisterProperty:()=>typeof CSS!="undefined"&&Object.hasOwnProperty.call(CSS,"registerProperty"),waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate"),partialKeyframes:()=>{try{pt({opacity:[1]})}catch(t){return!1}return!0},finished:()=>Boolean(pt({opacity:[0,1]},{duration:.001}).finished),linearEasing:()=>{try{pt({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0}},dt={},O={};for(let t in Vt)O[t]=()=>(dt[t]===void 0&&(dt[t]=Vt[t]()),dt[t]);var ie=.015,oe=(t,e)=>{let s="",i=Math.round(e/ie);for(let n=0;nx(t)?O.linearEasing()?`linear(${oe(t,e)})`:p.easing:B(t)?re(t):t,re=([t,e,s,i])=>`cubic-bezier(${t}, ${e}, ${s}, ${i})`;function It(t,e){for(let s=0;sArray.isArray(t)?t:[t];function U(t){return N[t]&&(t=N[t]),it(t)?et(t):t}var k={get:(t,e)=>{e=U(e);let s=H(e)?t.style.getPropertyValue(e):getComputedStyle(t)[e];if(!s&&s!==0){let i=A.get(e);i&&(s=i.initialValue)}return s},set:(t,e,s)=>{e=U(e),H(e)?t.style.setProperty(e,s):t.style[e]=s}};function ot(t,e=!0){if(!(!t||t.playState==="finished"))try{t.stop?t.stop():(e&&t.commitStyles(),t.cancel())}catch(s){}}function Lt(t,e){var s;let i=(e==null?void 0:e.toDefaultUnit)||d,n=t[t.length-1];if(lt(n)){let r=((s=n.match(/(-?[\d.]+)([a-z%]*)/))===null||s===void 0?void 0:s[2])||"";r&&(i=a=>a+r)}return i}function ne(){return window.__MOTION_DEV_TOOLS_RECORD}function Pt(t,e,s,i={},n){let r=ne(),a=i.record!==!1&&r,o,{duration:l=p.duration,delay:u=p.delay,endDelay:b=p.endDelay,repeat:j=p.repeat,easing:f=p.easing,persist:g=!1,direction:h,offset:I,allowWebkitAcceleration:G=!1,autoplay:E=!0}=i,W=tt(t),C=it(e),R=O.waapi();C&&Dt(t,e);let y=U(e),X=At(W.values,y),w=A.get(y);return ot(X.animation,!(L(f)&&X.generator)&&i.record!==!1),()=>{let Z=()=>{var m,z;return(z=(m=k.get(t,y))!==null&&m!==void 0?m:w==null?void 0:w.initialValue)!==null&&z!==void 0?z:0},c=It(Rt(s),Z),jt=Lt(c,w);if(L(f)){let m=f.createAnimation(c,e!=="opacity",Z,y,X);f=m.easing,c=m.keyframes||c,l=m.duration||l}if(H(y)&&(O.cssRegisterProperty()?Mt(y):R=!1),C&&!O.linearEasing()&&(x(f)||v(f)&&f.some(x))&&(R=!1),R){w&&(c=c.map(D=>T(D)?w.toDefaultUnit(D):D)),c.length===1&&(!O.partialKeyframes()||a)&&c.unshift(Z());let m={delay:S.ms(u),duration:S.ms(l),endDelay:S.ms(b),easing:v(f)?void 0:ht(f,l),direction:h,iterations:j+1,fill:"both"};o=t.animate({[y]:c,offset:I,easing:v(f)?f.map(D=>ht(D,l)):void 0},m),o.finished||(o.finished=new Promise((D,Ut)=>{o.onfinish=D,o.oncancel=Ut}));let z=c[c.length-1];o.finished.then(()=>{g||(k.set(t,y,z),o.cancel())}).catch($),G||(o.playbackRate=1.000001)}else if(n&&C)c=c.map(m=>typeof m=="string"?parseFloat(m):m),c.length===1&&c.unshift(parseFloat(Z())),o=new n(m=>{k.set(t,y,jt?jt(m):m)},c,Object.assign(Object.assign({},i),{duration:l,easing:f}));else{let m=c[c.length-1];k.set(t,y,w&&T(m)?w.toDefaultUnit(m):m)}return a&&r(t,e,c,{duration:l,delay:u,easing:f,repeat:j,offset:I},"motion-one"),X.setAnimation(o),o&&!E&&o.pause(),o}}var Ct=(t,e)=>t[e]?Object.assign(Object.assign({},t),t[e]):Object.assign({},t);function zt(t,e){var s;return typeof t=="string"?e?((s=e[t])!==null&&s!==void 0||(e[t]=document.querySelectorAll(t)),t=e[t]):t=document.querySelectorAll(t):t instanceof Element&&(t=[t]),Array.from(t||[])}var ae=t=>t(),q=(t,e,s=p.duration)=>new Proxy({animations:t.map(ae).filter(Boolean),duration:s,options:e},fe),le=t=>t.animations[0],fe={get:(t,e)=>{let s=le(t);switch(e){case"duration":return t.duration;case"currentTime":return S.s((s==null?void 0:s[e])||0);case"playbackRate":case"playState":return s==null?void 0:s[e];case"finished":return t.finished||(t.finished=Promise.all(t.animations.map(me)).catch($)),t.finished;case"stop":return()=>{t.animations.forEach(i=>ot(i))};case"forEachNative":return i=>{t.animations.forEach(n=>i(n,t))};default:return typeof(s==null?void 0:s[e])=="undefined"?void 0:()=>t.animations.forEach(i=>i[e]())}},set:(t,e,s)=>{switch(e){case"currentTime":s=S.ms(s);case"playbackRate":for(let i=0;it.finished;function _t(t,e,s){return x(t)?t(e,s):t}function $t(t){return function(s,i,n={}){s=zt(s);let r=s.length;ct(Boolean(r),"No valid element provided."),ct(Boolean(i),"No keyframes defined.");let a=[];for(let o=0;o{let s=new P(t,[0,1],e);return s.finished.catch(()=>{}),s}],e,e.duration)}function K(t,e,s){return(x(t)?ce:gt)(t,e,s)}function V(t){return t===null?!0:t.offsetParent===null}function ue(t){return!!["server-error","client-error","flash-info","flash-error"].includes(t.id)}function pe(){let t=0;return V(document.getElementById("server-error"))||(t+=1),V(document.getElementById("client-error"))||(t+=1),V(document.getElementById("flash-info"))||(t+=1),V(document.getElementById("flash-error"))||(t+=1),t}var Bt=5,de=550,he=!0,xt=15,Nt=[];function yt(t,e,s){let i=[],n=Array.from(document.querySelectorAll('#toast-group [phx-hook="LiveToast"]')).map(r=>V(r)?null:r).filter(Boolean).reverse();s&&(n=n.filter(r=>r!==s));for(let r=0;ra?0:1-(o.order-a+1);o.order>=a?o.classList.remove("pointer-events-auto"):o.classList.add("pointer-events-auto");let j={y:[`${l}${u}px`],opacity:[b]};if(o.order===0&&Nt.includes(o)===!1){let g=o.offsetHeight+xt,h=l==="-"?"":"-";j.y.unshift(`${h}${g}px`),j.opacity.unshift(0)}o.targetDestination=`${l}${u}px`;let f=de/1e3;K(o,j,{duration:f,easing:[.22,1,.36,1]}),o.order+=1,o.style.zIndex=(50-o.order).toString(),window.setTimeout(()=>{o.order>a&&this.pushEventTo("#toast-group","clear",{id:o.id})},t+Bt),Nt=i}}function Ht(){return J(this,null,function*(){let t=(this.el.order-2)*100+(this.el.order-2)*xt,e="";(this.el.dataset.corner==="bottom_left"||this.el.dataset.corner==="bottom_right")&&(e="-"),yield K(this.el,{y:`${e}${t}%`,opacity:0},{opacity:{duration:.2,easing:"ease-out"},duration:.3,easing:"ease-out"}).finished})}function ge(t=6e3,e=3){return{destroyed(){yt.bind(this)(t,e)},updated(){let s={y:[this.el.targetDestination]};K(this.el,s,{duration:0})},mounted(){if(["server-error","client-error"].includes(this.el.id)&&V(document.getElementById(this.el.id))||(window.addEventListener("flash-leave",i=>J(this,null,function*(){i.target===this.el&&(yt.bind(this,t,e,this.el)(),yield Ht.bind(this)())})),yt.bind(this)(t,e),ue(this.el)))return;let s=t;this.el.dataset.duration!==void 0&&(s=parseInt(this.el.dataset.duration)),window.setTimeout(()=>J(this,null,function*(){yield Ht.bind(this)(),this.pushEventTo("#toast-group","clear",{id:this.el.id})}),s+Bt)}}}return xe;})();