{"version":3,"file":"8127.js","sources":["webpack://frontend/./node_modules/hey-listen/dist/hey-listen.es.js","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/utils/filter-props.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/utils/types.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/features/definitions.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/context/LazyContext.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/features/use-features.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/context/MotionConfigContext.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/context/MotionContext/index.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/utils/use-reduced-motion.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/utils/is-ref-object.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/utils/variants.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/context/MotionContext/create.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/node/state.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/node/id.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/context/SwitchLayoutGroupContext.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/utils/VisualElementHandler.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/svg/lowercase-elements.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/styles/scale-correction.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/html/utils/transform.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/value/utils/is-motion-value.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/html/utils/build-transform.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.mjs","webpack://frontend/./node_modules/style-value-types/dist/es/utils.mjs","webpack://frontend/./node_modules/style-value-types/dist/es/numbers/units.mjs","webpack://frontend/./node_modules/style-value-types/dist/es/numbers/index.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/value-types/type-int.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/value-types/number.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/html/utils/build-styles.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/value-types/get-as-type.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/html/use-props.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/utils/valid-prop.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/svg/utils/path.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/html/utils/render.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/svg/utils/render.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/animation/utils/is-animation-controls.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/utils/resolve-value.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/svg/config-motion.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/html/config-motion.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/events/use-dom-event.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/gestures/utils/event-type.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/events/event-info.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/events/use-pointer-event.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/events/utils.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/gestures/drag/utils/lock.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/gestures/use-hover-gesture.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/pipe.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/utils/warn-once.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/features/viewport/observers.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/features/viewport/use-viewport.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/features/gestures.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/gestures/use-tap-gesture.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/gestures/use-focus-gesture.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/utils/shallow-compare.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/clamp.mjs","webpack://frontend/./node_modules/popmotion/dist/es/animations/utils/find-spring.mjs","webpack://frontend/./node_modules/popmotion/dist/es/animations/generators/spring.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/progress.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/mix.mjs","webpack://frontend/./node_modules/style-value-types/dist/es/color/utils.mjs","webpack://frontend/./node_modules/style-value-types/dist/es/color/rgba.mjs","webpack://frontend/./node_modules/style-value-types/dist/es/color/hex.mjs","webpack://frontend/./node_modules/style-value-types/dist/es/color/hsla.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/hsla-to-rgba.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/mix-color.mjs","webpack://frontend/./node_modules/style-value-types/dist/es/color/index.mjs","webpack://frontend/./node_modules/style-value-types/dist/es/complex/index.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/inc.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/mix-complex.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/interpolate.mjs","webpack://frontend/./node_modules/popmotion/dist/es/easing/utils.mjs","webpack://frontend/./node_modules/popmotion/dist/es/easing/index.mjs","webpack://frontend/./node_modules/popmotion/dist/es/animations/generators/keyframes.mjs","webpack://frontend/./node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.mjs","webpack://frontend/./node_modules/popmotion/dist/es/animations/generators/decay.mjs","webpack://frontend/./node_modules/popmotion/dist/es/animations/utils/elapsed.mjs","webpack://frontend/./node_modules/popmotion/dist/es/animations/index.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/utils/time-conversion.mjs","webpack://frontend/./node_modules/popmotion/dist/es/easing/cubic-bezier.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/animation/utils/easing.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/animation/utils/is-animatable.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/animation/utils/default-transitions.mjs","webpack://frontend/./node_modules/style-value-types/dist/es/complex/filter.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/value-types/defaults.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/value-types/animatable-none.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/utils/use-instant-transition-state.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/animation/utils/transitions.mjs","webpack://frontend/./node_modules/popmotion/dist/es/animations/inertia.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/velocity-per-second.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/utils/array.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/utils/subscription-manager.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/value/index.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/value-types/test.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/value-types/dimensions.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/value-types/type-auto.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/value-types/find.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/utils/animation.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/utils/setters.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/utils/animation-state.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/features/animations.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/is-point.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/is-point-3d.mjs","webpack://frontend/./node_modules/popmotion/dist/es/utils/distance.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/gestures/PanSession.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/geometry/delta-calc.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/geometry/models.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/utils/each-axis.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/geometry/conversion.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/utils/has-transform.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/geometry/delta-apply.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/utils/measure.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/features/drag.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/gestures/use-pan-gesture.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/gestures/drag/use-drag.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/utils/lifecycles.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/index.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/utils/motion-values.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/html/visual-element.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/utils/is-numerical-string.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/utils/is-zero-value-string.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/svg/visual-element.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/create-visual-element.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/styles/scale-border-radius.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/styles/scale-box-shadow.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/animation/mix-values.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/geometry/copy.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/geometry/delta-remove.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/geometry/utils.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/shared/stack.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/styles/transform.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/utils/compare-by-depth.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/utils/flat-tree.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/animation/animate.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/node/DocumentProjectionNode.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/projection/node/HTMLProjectionNode.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/motion.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/features/layout/index.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/motion-proxy.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/index.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/features/use-projection.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/context/MotionContext/utils.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/utils/create-config.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/dom/use-render.mjs","webpack://frontend/./node_modules/framer-motion/dist/es/render/svg/use-props.mjs"],"sourcesContent":["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","import { isValidMotionProp } from '../../../motion/utils/valid-prop.mjs';\n\nvar shouldForward = function (key) { return !isValidMotionProp(key); };\nfunction loadExternalIsValidProp(isValidProp) {\n if (!isValidProp)\n return;\n // Explicitly filter our events\n shouldForward = function (key) {\n return key.startsWith(\"on\") ? !isValidMotionProp(key) : isValidProp(key);\n };\n}\n/**\n * Emotion and Styled Components both allow users to pass through arbitrary props to their components\n * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which\n * of these should be passed to the underlying DOM node.\n *\n * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props\n * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props\n * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of\n * `@emotion/is-prop-valid`, however to fix this problem we need to use it.\n *\n * By making it an optionalDependency we can offer this functionality only in the situations where it's\n * actually required.\n */\ntry {\n /**\n * We attempt to import this package but require won't be defined in esm environments, in that case\n * isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed\n * in favour of explicit injection.\n */\n loadExternalIsValidProp(require(\"@emotion/is-prop-valid\").default);\n}\ncatch (_a) {\n // We don't need to actually do anything here - the fallback is the existing `isPropValid`.\n}\nfunction filterProps(props, isDom, forwardMotionProps) {\n var filteredProps = {};\n for (var key in props) {\n if (shouldForward(key) ||\n (forwardMotionProps === true && isValidMotionProp(key)) ||\n (!isDom && !isValidMotionProp(key)) ||\n // If trying to use native HTML drag events, forward drag listeners\n (props[\"draggable\"] && key.startsWith(\"onDrag\"))) {\n filteredProps[key] = props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps, loadExternalIsValidProp };\n","var AnimationType;\n(function (AnimationType) {\n AnimationType[\"Animate\"] = \"animate\";\n AnimationType[\"Hover\"] = \"whileHover\";\n AnimationType[\"Tap\"] = \"whileTap\";\n AnimationType[\"Drag\"] = \"whileDrag\";\n AnimationType[\"Focus\"] = \"whileFocus\";\n AnimationType[\"InView\"] = \"whileInView\";\n AnimationType[\"Exit\"] = \"exit\";\n})(AnimationType || (AnimationType = {}));\n\nexport { AnimationType };\n","import { __assign, __read } from 'tslib';\nimport { number, px } from 'style-value-types';\nimport { isKeyframesTarget } from '../../../animation/utils/is-keyframes-target.mjs';\nimport { invariant } from 'hey-listen';\nimport { transformProps } from '../../html/utils/transform.mjs';\nimport { findDimensionValueType } from '../value-types/dimensions.mjs';\n\nvar positionalKeys = new Set([\n \"width\",\n \"height\",\n \"top\",\n \"left\",\n \"right\",\n \"bottom\",\n \"x\",\n \"y\",\n]);\nvar isPositionalKey = function (key) { return positionalKeys.has(key); };\nvar hasPositionalKey = function (target) {\n return Object.keys(target).some(isPositionalKey);\n};\nvar setAndResetVelocity = function (value, to) {\n // Looks odd but setting it twice doesn't render, it'll just\n // set both prev and current to the latest value\n value.set(to, false);\n value.set(to);\n};\nvar isNumOrPxType = function (v) {\n return v === number || v === px;\n};\nvar BoundingBoxDimension;\n(function (BoundingBoxDimension) {\n BoundingBoxDimension[\"width\"] = \"width\";\n BoundingBoxDimension[\"height\"] = \"height\";\n BoundingBoxDimension[\"left\"] = \"left\";\n BoundingBoxDimension[\"right\"] = \"right\";\n BoundingBoxDimension[\"top\"] = \"top\";\n BoundingBoxDimension[\"bottom\"] = \"bottom\";\n})(BoundingBoxDimension || (BoundingBoxDimension = {}));\nvar getPosFromMatrix = function (matrix, pos) {\n return parseFloat(matrix.split(\", \")[pos]);\n};\nvar getTranslateFromMatrix = function (pos2, pos3) {\n return function (_bbox, _a) {\n var transform = _a.transform;\n if (transform === \"none\" || !transform)\n return 0;\n var matrix3d = transform.match(/^matrix3d\\((.+)\\)$/);\n if (matrix3d) {\n return getPosFromMatrix(matrix3d[1], pos3);\n }\n else {\n var matrix = transform.match(/^matrix\\((.+)\\)$/);\n if (matrix) {\n return getPosFromMatrix(matrix[1], pos2);\n }\n else {\n return 0;\n }\n }\n };\n};\nvar transformKeys = new Set([\"x\", \"y\", \"z\"]);\nvar nonTranslationalTransformKeys = transformProps.filter(function (key) { return !transformKeys.has(key); });\nfunction removeNonTranslationalTransform(visualElement) {\n var removedTransforms = [];\n nonTranslationalTransformKeys.forEach(function (key) {\n var value = visualElement.getValue(key);\n if (value !== undefined) {\n removedTransforms.push([key, value.get()]);\n value.set(key.startsWith(\"scale\") ? 1 : 0);\n }\n });\n // Apply changes to element before measurement\n if (removedTransforms.length)\n visualElement.syncRender();\n return removedTransforms;\n}\nvar positionalValues = {\n // Dimensions\n width: function (_a, _b) {\n var x = _a.x;\n var _c = _b.paddingLeft, paddingLeft = _c === void 0 ? \"0\" : _c, _d = _b.paddingRight, paddingRight = _d === void 0 ? \"0\" : _d;\n return x.max - x.min - parseFloat(paddingLeft) - parseFloat(paddingRight);\n },\n height: function (_a, _b) {\n var y = _a.y;\n var _c = _b.paddingTop, paddingTop = _c === void 0 ? \"0\" : _c, _d = _b.paddingBottom, paddingBottom = _d === void 0 ? \"0\" : _d;\n return y.max - y.min - parseFloat(paddingTop) - parseFloat(paddingBottom);\n },\n top: function (_bbox, _a) {\n var top = _a.top;\n return parseFloat(top);\n },\n left: function (_bbox, _a) {\n var left = _a.left;\n return parseFloat(left);\n },\n bottom: function (_a, _b) {\n var y = _a.y;\n var top = _b.top;\n return parseFloat(top) + (y.max - y.min);\n },\n right: function (_a, _b) {\n var x = _a.x;\n var left = _b.left;\n return parseFloat(left) + (x.max - x.min);\n },\n // Transform\n x: getTranslateFromMatrix(4, 13),\n y: getTranslateFromMatrix(5, 14),\n};\nvar convertChangedValueTypes = function (target, visualElement, changedKeys) {\n var originBbox = visualElement.measureViewportBox();\n var element = visualElement.getInstance();\n var elementComputedStyle = getComputedStyle(element);\n var display = elementComputedStyle.display;\n var origin = {};\n // If the element is currently set to display: \"none\", make it visible before\n // measuring the target bounding box\n if (display === \"none\") {\n visualElement.setStaticValue(\"display\", target.display || \"block\");\n }\n /**\n * Record origins before we render and update styles\n */\n changedKeys.forEach(function (key) {\n origin[key] = positionalValues[key](originBbox, elementComputedStyle);\n });\n // Apply the latest values (as set in checkAndConvertChangedValueTypes)\n visualElement.syncRender();\n var targetBbox = visualElement.measureViewportBox();\n changedKeys.forEach(function (key) {\n // Restore styles to their **calculated computed style**, not their actual\n // originally set style. This allows us to animate between equivalent pixel units.\n var value = visualElement.getValue(key);\n setAndResetVelocity(value, origin[key]);\n target[key] = positionalValues[key](targetBbox, elementComputedStyle);\n });\n return target;\n};\nvar checkAndConvertChangedValueTypes = function (visualElement, target, origin, transitionEnd) {\n if (origin === void 0) { origin = {}; }\n if (transitionEnd === void 0) { transitionEnd = {}; }\n target = __assign({}, target);\n transitionEnd = __assign({}, transitionEnd);\n var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);\n // We want to remove any transform values that could affect the element's bounding box before\n // it's measured. We'll reapply these later.\n var removedTransformValues = [];\n var hasAttemptedToRemoveTransformValues = false;\n var changedValueTypeKeys = [];\n targetPositionalKeys.forEach(function (key) {\n var value = visualElement.getValue(key);\n if (!visualElement.hasValue(key))\n return;\n var from = origin[key];\n var fromType = findDimensionValueType(from);\n var to = target[key];\n var toType;\n // TODO: The current implementation of this basically throws an error\n // if you try and do value conversion via keyframes. There's probably\n // a way of doing this but the performance implications would need greater scrutiny,\n // as it'd be doing multiple resize-remeasure operations.\n if (isKeyframesTarget(to)) {\n var numKeyframes = to.length;\n var fromIndex = to[0] === null ? 1 : 0;\n from = to[fromIndex];\n fromType = findDimensionValueType(from);\n for (var i = fromIndex; i < numKeyframes; i++) {\n if (!toType) {\n toType = findDimensionValueType(to[i]);\n invariant(toType === fromType ||\n (isNumOrPxType(fromType) && isNumOrPxType(toType)), \"Keyframes must be of the same dimension as the current value\");\n }\n else {\n invariant(findDimensionValueType(to[i]) === toType, \"All keyframes must be of the same type\");\n }\n }\n }\n else {\n toType = findDimensionValueType(to);\n }\n if (fromType !== toType) {\n // If they're both just number or px, convert them both to numbers rather than\n // relying on resize/remeasure to convert (which is wasteful in this situation)\n if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {\n var current = value.get();\n if (typeof current === \"string\") {\n value.set(parseFloat(current));\n }\n if (typeof to === \"string\") {\n target[key] = parseFloat(to);\n }\n else if (Array.isArray(to) && toType === px) {\n target[key] = to.map(parseFloat);\n }\n }\n else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) &&\n (toType === null || toType === void 0 ? void 0 : toType.transform) &&\n (from === 0 || to === 0)) {\n // If one or the other value is 0, it's safe to coerce it to the\n // type of the other without measurement\n if (from === 0) {\n value.set(toType.transform(from));\n }\n else {\n target[key] = fromType.transform(to);\n }\n }\n else {\n // If we're going to do value conversion via DOM measurements, we first\n // need to remove non-positional transform values that could affect the bbox measurements.\n if (!hasAttemptedToRemoveTransformValues) {\n removedTransformValues =\n removeNonTranslationalTransform(visualElement);\n hasAttemptedToRemoveTransformValues = true;\n }\n changedValueTypeKeys.push(key);\n transitionEnd[key] =\n transitionEnd[key] !== undefined\n ? transitionEnd[key]\n : target[key];\n setAndResetVelocity(value, to);\n }\n }\n });\n if (changedValueTypeKeys.length) {\n var scrollY_1 = changedValueTypeKeys.indexOf(\"height\") >= 0\n ? window.pageYOffset\n : null;\n var convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);\n // If we removed transform values, reapply them before the next render\n if (removedTransformValues.length) {\n removedTransformValues.forEach(function (_a) {\n var _b = __read(_a, 2), key = _b[0], value = _b[1];\n visualElement.getValue(key).set(value);\n });\n }\n // Reapply original values\n visualElement.syncRender();\n // Restore scroll position\n if (scrollY_1 !== null)\n window.scrollTo({ top: scrollY_1 });\n return { target: convertedTarget, transitionEnd: transitionEnd };\n }\n else {\n return { target: target, transitionEnd: transitionEnd };\n }\n};\n/**\n * Convert value types for x/y/width/height/top/left/bottom/right\n *\n * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`\n *\n * @internal\n */\nfunction unitConversion(visualElement, target, origin, transitionEnd) {\n return hasPositionalKey(target)\n ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd)\n : { target: target, transitionEnd: transitionEnd };\n}\n\nexport { BoundingBoxDimension, positionalValues, unitConversion };\n","var createDefinition = function (propNames) { return ({\n isEnabled: function (props) { return propNames.some(function (name) { return !!props[name]; }); },\n}); };\nvar featureDefinitions = {\n measureLayout: createDefinition([\"layout\", \"layoutId\", \"drag\"]),\n animation: createDefinition([\n \"animate\",\n \"exit\",\n \"variants\",\n \"whileHover\",\n \"whileTap\",\n \"whileFocus\",\n \"whileDrag\",\n \"whileInView\",\n ]),\n exit: createDefinition([\"exit\"]),\n drag: createDefinition([\"drag\", \"dragControls\"]),\n focus: createDefinition([\"whileFocus\"]),\n hover: createDefinition([\"whileHover\", \"onHoverStart\", \"onHoverEnd\"]),\n tap: createDefinition([\"whileTap\", \"onTap\", \"onTapStart\", \"onTapCancel\"]),\n pan: createDefinition([\n \"onPan\",\n \"onPanStart\",\n \"onPanSessionStart\",\n \"onPanEnd\",\n ]),\n inView: createDefinition([\n \"whileInView\",\n \"onViewportEnter\",\n \"onViewportLeave\",\n ]),\n};\nfunction loadFeatures(features) {\n for (var key in features) {\n if (features[key] === null)\n continue;\n if (key === \"projectionNodeConstructor\") {\n featureDefinitions.projectionNodeConstructor = features[key];\n }\n else {\n featureDefinitions[key].Component = features[key];\n }\n }\n}\n\nexport { featureDefinitions, loadFeatures };\n","import { createContext } from 'react';\n\nvar LazyContext = createContext({ strict: false });\n\nexport { LazyContext };\n","import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { env } from '../../utils/process.mjs';\nimport { featureDefinitions } from './definitions.mjs';\nimport { invariant } from 'hey-listen';\nimport { LazyContext } from '../../context/LazyContext.mjs';\n\nvar featureNames = Object.keys(featureDefinitions);\nvar numFeatures = featureNames.length;\n/**\n * Load features via renderless components based on the provided MotionProps.\n */\nfunction useFeatures(props, visualElement, preloadedFeatures) {\n var features = [];\n var lazyContext = useContext(LazyContext);\n if (!visualElement)\n return null;\n /**\n * If we're in development mode, check to make sure we're not rendering a motion component\n * as a child of LazyMotion, as this will break the file-size benefits of using it.\n */\n if (env !== \"production\" && preloadedFeatures && lazyContext.strict) {\n invariant(false, \"You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.\");\n }\n for (var i = 0; i < numFeatures; i++) {\n var name_1 = featureNames[i];\n var _a = featureDefinitions[name_1], isEnabled = _a.isEnabled, Component = _a.Component;\n /**\n * It might be possible in the future to use this moment to\n * dynamically request functionality. In initial tests this\n * was producing a lot of duplication amongst bundles.\n */\n if (isEnabled(props) && Component) {\n features.push(React.createElement(Component, __assign({ key: name_1 }, props, { visualElement: visualElement })));\n }\n }\n return features;\n}\n\nexport { useFeatures };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nvar MotionConfigContext = createContext({\n transformPagePoint: function (p) { return p; },\n isStatic: false,\n reducedMotion: \"never\",\n});\n\nexport { MotionConfigContext };\n","import { createContext, useContext } from 'react';\n\nvar MotionContext = createContext({});\nfunction useVisualElementContext() {\n return useContext(MotionContext).visualElement;\n}\n\nexport { MotionContext, useVisualElementContext };\n","import { __read } from 'tslib';\nimport { useState, useContext } from 'react';\nimport { MotionConfigContext } from '../context/MotionConfigContext.mjs';\nimport { isBrowser } from './is-browser.mjs';\n\n// Does this device prefer reduced motion? Returns `null` server-side.\nvar prefersReducedMotion = { current: null };\nvar hasDetected = false;\nfunction initPrefersReducedMotion() {\n hasDetected = true;\n if (!isBrowser)\n return;\n if (window.matchMedia) {\n var motionMediaQuery_1 = window.matchMedia(\"(prefers-reduced-motion)\");\n var setReducedMotionPreferences = function () {\n return (prefersReducedMotion.current = motionMediaQuery_1.matches);\n };\n motionMediaQuery_1.addListener(setReducedMotionPreferences);\n setReducedMotionPreferences();\n }\n else {\n prefersReducedMotion.current = false;\n }\n}\n/**\n * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.\n *\n * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing\n * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.\n *\n * It will actively respond to changes and re-render your components with the latest setting.\n *\n * ```jsx\n * export function Sidebar({ isOpen }) {\n * const shouldReduceMotion = useReducedMotion()\n * const closedX = shouldReduceMotion ? 0 : \"-100%\"\n *\n * return (\n *