{"version":3,"sources":["webpack:///./node_modules/framer-motion/dist/es/motion/features/use-features.js","webpack:///./node_modules/framer-motion/dist/es/context/MotionContext/index.js","webpack:///./node_modules/framer-motion/dist/es/context/LayoutGroupContext.js","webpack:///./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js","webpack:///./node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js","webpack:///./node_modules/framer-motion/dist/es/context/MotionContext/create.js","webpack:///./node_modules/framer-motion/dist/es/context/MotionContext/utils.js","webpack:///./node_modules/framer-motion/dist/es/motion/index.js","webpack:///./node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js","webpack:///./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js","webpack:///./node_modules/framer-motion/dist/es/render/html/use-props.js","webpack:///./node_modules/framer-motion/dist/es/motion/utils/valid-prop.js","webpack:///./node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js","webpack:///./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js","webpack:///./node_modules/framer-motion/dist/es/render/svg/use-props.js","webpack:///./node_modules/framer-motion/dist/es/render/dom/use-render.js","webpack:///./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js","webpack:///./node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js","webpack:///./node_modules/framer-motion/dist/es/render/svg/config-motion.js","webpack:///./node_modules/framer-motion/dist/es/render/html/config-motion.js","webpack:///./node_modules/framer-motion/dist/es/render/dom/motion-minimal.js","webpack:///./node_modules/framer-motion/dist/es/render/dom/motion-proxy.js","webpack:///./node_modules/framer-motion/dist/es/render/dom/utils/create-config.js","webpack:///./node_modules/framer-motion/dist/es/utils/is-ref-object.js","webpack:///./node_modules/framer-motion/dist/es/context/MotionConfigContext.js"],"names":["featureNames","Object","keys","numFeatures","length","MotionContext","LayoutGroupContext","useIsomorphicLayoutEffect","useVisualElement","Component","visualState","props","createVisualElement","config","MotionConfigContext","lazyContext","LazyContext","parent","visualElement","presenceContext","PresenceContext","layoutId","_a","layoutGroupId","undefined","useLayoutId","visualElementRef","renderer","current","presenceId","id","blockInitialAnimation","initial","setProps","isPresent","isPresenceRoot","syncRender","animationState","animateChanges","notifyUnmount","useCreateMotionContext","isStatic","context","animate","inherit","getCurrentTreeVariants","variantLabelsAsDependency","prop","Array","isArray","join","createMotionComponent","preloadedFeatures","useRender","useVisualState","externalRef","features","i","name_1","isEnabled","push","key","useFeatures","Provider","value","instance","mount","call","unmount","useMotionRef","createHtmlRenderState","style","transform","transformKeys","transformOrigin","vars","copyRawValuesOnly","target","source","useStyle","assign","transformTemplate","state","enableHardwareAcceleration","useInitialMotionValues","transformValues","useHTMLProps","htmlProps","Boolean","drag","draggable","userSelect","WebkitUserSelect","WebkitTouchCallout","touchAction","validMotionProps","Set","isValidMotionProp","has","shouldForward","emotionIsPropValid_1","default","startsWith","createSvgRenderState","attrs","useSVGProps","visualProps","rawStyles","createUseRender","forwardMotionProps","ref","latestValues","filteredProps","isDom","filterProps","elementProps","makeState","scrapeMotionValuesFromProps","createRenderState","onMount","makeLatestValues","renderState","makeUseVisualState","scrapeMotionValues","unwrappedValue","values","motionValues","get","toValue","isControllingVariants","isVariantNode","variantToSet","forEach","definition","resolved","transitionEnd","transition","svgMotionConfig","dimensions","getBBox","getBoundingClientRect","e","x","y","width","height","tagName","totalPathLength","getTotalLength","render","htmlMotionConfig","m","createConfig","custom","customMotionComponentConfig","componentCache","Map","Proxy","_target","set","createMotionProxy","_b","baseConfig","isRefObject","prototype","hasOwnProperty","transformPagePoint","p"],"mappings":"oKAOIA,EAAeC,OAAOC,KAAK,KAC3BC,EAAcH,EAAaI,O,YCN3BC,EAAgB,wBAAc,I,sBCG9BC,EAAqB,wBAAc,M,SCFnCC,EAA4B,IAAY,kBAAkB,YCc9D,SAASC,EAAiBC,EAAWC,EAAaC,EAAOC,GACrD,IAAIC,EAAS,qBAAWC,EAAA,GACpBC,EAAc,qBAAWC,EAAA,GACzBC,EHhBG,qBAAWZ,GAAea,cGiB7BC,EAAkB,qBAA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C,MAAO,EACPC,OAAQ,GAaG,SAVRhF,EAUJiF,UATHzB,EAAY0B,gBAAkBlF,EAASmF,kBAE3C,YAAc3B,EAAaV,OAAcvF,OAAWA,EAAW,CAAE2D,4BAA4B,GAASxE,EAAMsE,mBAE5G,OAAAoE,EAAA,GAAUpF,EAAUwD,O,IC7B5B6B,EAAmB,CACnBhG,eAAgBoE,EAAmB,CAC/BL,4B,OAA6B,EAC7BC,kBAAmBhD,KCD3B,IAAIiF,ECUJ,SAA2BC,GACvB,SAASC,EAAOhJ,EAAWiJ,GAEvB,YADoC,IAAhCA,IAA0CA,EAA8B,IACrEvG,EAAsBqG,EAAa/I,EAAWiJ,IAMzD,IAAIC,EAAiB,IAAIC,IACzB,OAAO,IAAIC,MAAMJ,EAAQ,CAMrB1B,IAAK,SAAU+B,EAASjG,GAOpB,OAHK8F,EAAezD,IAAIrC,IACpB8F,EAAeI,IAAIlG,EAAK4F,EAAO5F,IAE5B8F,EAAe5B,IAAIlE,MDjC9BmG,EEAR,SAA+BvJ,EAAWa,EAAI8B,EAAmBxC,GAC7D,IAAIqJ,EAAK3I,EAAGuF,mBAAoBA,OAA4B,IAAPoD,GAAwBA,EACzEC,EAAa,YAAezJ,GAC1BgI,EACAa,EACN,OAAO,YAAS,YAAS,GAAIY,GAAa,CAAE9G,kBAAmBA,EAAmBC,UAAWuD,EAAgBC,GAAqBjG,oBAAqBA,EACnJH,UAAWA,Q,iCCZnB,SAAS0J,EAAYrD,GACjB,MAAuB,iBAARA,GACX7G,OAAOmK,UAAUC,eAAelG,KAAK2C,EAAK,WAFlD,mC,gCCAA,6CAKIhG,EAAsB,wBAAc,CACpCwJ,mBAAoB,SAAUC,GAAK,OAAOA,GAC1C9H,UAAU","file":"5-32180b91ad01b747e272.js","sourcesContent":["import { __assign } from 'tslib';\nimport * as React from 'react';\nimport { useContext } from 'react';\nimport { featureDefinitions } from './definitions.js';\nimport { invariant } from 'hey-listen';\nimport { LazyContext } from '../../context/LazyContext.js';\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 (process.env.NODE_ENV !== \"production\" &&\n preloadedFeatures &&\n 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 { useContext, createContext } from 'react';\n\nvar MotionContext = createContext({});\nfunction useVisualElementContext() {\n return useContext(MotionContext).visualElement;\n}\n\nexport { MotionContext, useVisualElementContext };\n","import { createContext } from 'react';\n\n/**\n * @internal\n */\nvar LayoutGroupContext = createContext(null);\n\nexport { LayoutGroupContext };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { isBrowser } from './is-browser.js';\n\nvar useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","import { __assign } from 'tslib';\nimport { useContext, useRef, useEffect } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.js';\nimport { isPresent } from '../../components/AnimatePresence/use-presence.js';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.js';\nimport { useVisualElementContext } from '../../context/MotionContext/index.js';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.js';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.js';\nimport { LazyContext } from '../../context/LazyContext.js';\n\nfunction useLayoutId(_a) {\n var layoutId = _a.layoutId;\n var layoutGroupId = useContext(LayoutGroupContext);\n return layoutGroupId && layoutId !== undefined\n ? layoutGroupId + \"-\" + layoutId\n : layoutId;\n}\nfunction useVisualElement(Component, visualState, props, createVisualElement) {\n var config = useContext(MotionConfigContext);\n var lazyContext = useContext(LazyContext);\n var parent = useVisualElementContext();\n var presenceContext = useContext(PresenceContext);\n var layoutId = useLayoutId(props);\n var visualElementRef = useRef(undefined);\n /**\n * If we haven't preloaded a renderer, check to see if we have one lazy-loaded\n */\n if (!createVisualElement)\n createVisualElement = lazyContext.renderer;\n if (!visualElementRef.current && createVisualElement) {\n visualElementRef.current = createVisualElement(Component, {\n visualState: visualState,\n parent: parent,\n props: __assign(__assign({}, props), { layoutId: layoutId }),\n presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id,\n blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false,\n });\n }\n var visualElement = visualElementRef.current;\n useIsomorphicLayoutEffect(function () {\n if (!visualElement)\n return;\n visualElement.setProps(__assign(__assign(__assign({}, config), props), { layoutId: layoutId }));\n visualElement.isPresent = isPresent(presenceContext);\n visualElement.isPresenceRoot =\n !parent || parent.presenceId !== (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id);\n /**\n * Fire a render to ensure the latest state is reflected on-screen.\n */\n visualElement.syncRender();\n });\n useEffect(function () {\n var _a;\n if (!visualElement)\n return;\n /**\n * In a future refactor we can replace the features-as-components and\n * have this loop through them all firing \"effect\" listeners\n */\n (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges();\n });\n useIsomorphicLayoutEffect(function () { return function () { return visualElement === null || visualElement === void 0 ? void 0 : visualElement.notifyUnmount(); }; }, []);\n return visualElement;\n}\n\nexport { useVisualElement };\n","import { useMemo, useContext } from 'react';\nimport { MotionContext } from './index.js';\nimport { getCurrentTreeVariants } from './utils.js';\n\nfunction useCreateMotionContext(props, isStatic) {\n var _a = getCurrentTreeVariants(props, useContext(MotionContext)), initial = _a.initial, animate = _a.animate;\n return useMemo(function () { return ({ initial: initial, animate: animate }); }, \n /**\n * Only break memoisation in static mode\n */\n isStatic\n ? [\n variantLabelsAsDependency(initial),\n variantLabelsAsDependency(animate),\n ]\n : []);\n}\nfunction variantLabelsAsDependency(prop) {\n return Array.isArray(prop) ? prop.join(\" \") : prop;\n}\n\nexport { useCreateMotionContext };\n","import { checkIfControllingVariants, isVariantLabel } from '../../render/utils/variants.js';\n\nfunction getCurrentTreeVariants(props, context) {\n if (checkIfControllingVariants(props)) {\n var initial = props.initial, animate = props.animate;\n return {\n initial: initial === false || isVariantLabel(initial)\n ? initial\n : undefined,\n animate: isVariantLabel(animate) ? animate : undefined,\n };\n }\n return props.inherit !== false ? context : {};\n}\n\nexport { getCurrentTreeVariants };\n","import * as React from 'react';\nimport { forwardRef, useContext } from 'react';\nimport { useFeatures } from './features/use-features.js';\nimport { MotionConfigContext } from '../context/MotionConfigContext.js';\nimport { MotionContext } from '../context/MotionContext/index.js';\nimport { useVisualElement } from './utils/use-visual-element.js';\nimport { useMotionRef } from './utils/use-motion-ref.js';\nimport { useCreateMotionContext } from '../context/MotionContext/create.js';\nimport { loadFeatures } from './features/definitions.js';\nimport { isBrowser } from '../utils/is-browser.js';\n\n/**\n * Create a `motion` component.\n *\n * This function accepts a Component argument, which can be either a string (ie \"div\"\n * for `motion.div`), or an actual React component.\n *\n * Alongside this is a config option which provides a way of rendering the provided\n * component \"offline\", or outside the React render cycle.\n *\n * @internal\n */\nfunction createMotionComponent(_a) {\n var preloadedFeatures = _a.preloadedFeatures, createVisualElement = _a.createVisualElement, useRender = _a.useRender, useVisualState = _a.useVisualState, Component = _a.Component;\n preloadedFeatures && loadFeatures(preloadedFeatures);\n function MotionComponent(props, externalRef) {\n /**\n * If we're rendering in a static environment, we only visually update the component\n * as a result of a React-rerender rather than interactions or animations. This\n * means we don't need to load additional memory structures like VisualElement,\n * or any gesture/animation features.\n */\n var isStatic = useContext(MotionConfigContext).isStatic;\n var features = null;\n /**\n * Create the tree context. This is memoized and will only trigger renders\n * when the current tree variant changes in static mode.\n */\n var context = useCreateMotionContext(props, isStatic);\n /**\n *\n */\n var visualState = useVisualState(props, isStatic);\n if (!isStatic && isBrowser) {\n /**\n * Create a VisualElement for this component. A VisualElement provides a common\n * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as\n * providing a way of rendering to these APIs outside of the React render loop\n * for more performant animations and interactions\n */\n context.visualElement = useVisualElement(Component, visualState, props, createVisualElement);\n /**\n * Load Motion gesture and animation features. These are rendered as renderless\n * components so each feature can optionally make use of React lifecycle methods.\n *\n * TODO: The intention is to move these away from a React-centric to a\n * VisualElement-centric lifecycle scheme.\n */\n features = useFeatures(props, context.visualElement, preloadedFeatures);\n }\n /**\n * The mount order and hierarchy is specific to ensure our element ref\n * is hydrated by the time features fire their effects.\n */\n return (React.createElement(React.Fragment, null,\n React.createElement(MotionContext.Provider, { value: context }, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic)),\n features));\n }\n return forwardRef(MotionComponent);\n}\n\nexport { createMotionComponent };\n","import { useCallback } from 'react';\nimport { isRefObject } from '../../utils/is-ref-object.js';\n\n/**\n * Creates a ref function that, when called, hydrates the provided\n * external ref and VisualElement.\n */\nfunction useMotionRef(visualState, visualElement, externalRef) {\n return useCallback(function (instance) {\n var _a;\n instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));\n if (visualElement) {\n instance\n ? visualElement.mount(instance)\n : visualElement.unmount();\n }\n if (externalRef) {\n if (typeof externalRef === \"function\") {\n externalRef(instance);\n }\n else if (isRefObject(externalRef)) {\n externalRef.current = instance;\n }\n }\n }, \n /**\n * Only pass a new ref callback to React if we've received a visual element\n * factory. Otherwise we'll be mounting/remounting every time externalRef\n * or other dependencies change.\n */\n [visualElement]);\n}\n\nexport { useMotionRef };\n","var createHtmlRenderState = function () { return ({\n style: {},\n transform: {},\n transformKeys: [],\n transformOrigin: {},\n vars: {},\n}); };\n\nexport { createHtmlRenderState };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { isForcedMotionValue } from '../../motion/utils/is-forced-motion-value.js';\nimport { isMotionValue } from '../../value/utils/is-motion-value.js';\nimport { buildHTMLStyles } from './utils/build-styles.js';\nimport { createHtmlRenderState } from './utils/create-render-state.js';\n\nfunction copyRawValuesOnly(target, source, props) {\n for (var key in source) {\n if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {\n target[key] = source[key];\n }\n }\n}\nfunction useInitialMotionValues(_a, visualState, isStatic) {\n var transformTemplate = _a.transformTemplate;\n return useMemo(function () {\n var state = createHtmlRenderState();\n buildHTMLStyles(state, visualState, undefined, undefined, { enableHardwareAcceleration: !isStatic }, transformTemplate);\n var vars = state.vars, style = state.style;\n return __assign(__assign({}, vars), style);\n }, [visualState]);\n}\nfunction useStyle(props, visualState, isStatic) {\n var styleProp = props.style || {};\n var style = {};\n /**\n * Copy non-Motion Values straight into style\n */\n copyRawValuesOnly(style, styleProp, props);\n Object.assign(style, useInitialMotionValues(props, visualState, isStatic));\n if (props.transformValues) {\n style = props.transformValues(style);\n }\n return style;\n}\nfunction useHTMLProps(props, visualState, isStatic) {\n // The `any` isn't ideal but it is the type of createElement props argument\n var htmlProps = {};\n var style = useStyle(props, visualState, isStatic);\n if (Boolean(props.drag)) {\n // Disable the ghost element when a user drags\n htmlProps.draggable = false;\n // Disable text selection\n style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout =\n \"none\";\n // Disable scrolling on the draggable direction\n style.touchAction =\n props.drag === true\n ? \"none\"\n : \"pan-\" + (props.drag === \"x\" ? \"y\" : \"x\");\n }\n htmlProps.style = style;\n return htmlProps;\n}\n\nexport { copyRawValuesOnly, useHTMLProps, useStyle };\n","/**\n * A list of all valid MotionProps.\n *\n * @internalremarks\n * This doesn't throw if a `MotionProp` name is missing - it should.\n */\nvar validMotionProps = new Set([\n \"initial\",\n \"animate\",\n \"exit\",\n \"style\",\n \"variants\",\n \"transition\",\n \"transformTemplate\",\n \"transformValues\",\n \"custom\",\n \"inherit\",\n \"layout\",\n \"layoutId\",\n \"_layoutResetTransform\",\n \"onLayoutAnimationComplete\",\n \"onViewportBoxUpdate\",\n \"onLayoutMeasure\",\n \"onBeforeLayoutMeasure\",\n \"onAnimationStart\",\n \"onAnimationComplete\",\n \"onUpdate\",\n \"onDragStart\",\n \"onDrag\",\n \"onDragEnd\",\n \"onMeasureDragConstraints\",\n \"onDirectionLock\",\n \"onDragTransitionEnd\",\n \"drag\",\n \"dragControls\",\n \"dragListener\",\n \"dragConstraints\",\n \"dragDirectionLock\",\n \"_dragX\",\n \"_dragY\",\n \"dragElastic\",\n \"dragMomentum\",\n \"dragPropagation\",\n \"dragTransition\",\n \"whileDrag\",\n \"onPan\",\n \"onPanStart\",\n \"onPanEnd\",\n \"onPanSessionStart\",\n \"onTap\",\n \"onTapStart\",\n \"onTapCancel\",\n \"onHoverStart\",\n \"onHoverEnd\",\n \"whileFocus\",\n \"whileTap\",\n \"whileHover\",\n]);\n/**\n * Check whether a prop name is a valid `MotionProp` key.\n *\n * @param key - Name of the property to check\n * @returns `true` is key is a valid `MotionProp`.\n *\n * @public\n */\nfunction isValidMotionProp(key) {\n return validMotionProps.has(key);\n}\n\nexport { isValidMotionProp };\n","import { isValidMotionProp } from '../../../motion/utils/valid-prop.js';\n\nvar shouldForward = function (key) { return !isValidMotionProp(key); };\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 var emotionIsPropValid_1 = require(\"@emotion/is-prop-valid\").default;\n shouldForward = function (key) {\n // Handle events explicitly as Emotion validates them all as true\n if (key.startsWith(\"on\")) {\n return !isValidMotionProp(key);\n }\n else {\n return emotionIsPropValid_1(key);\n }\n };\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 filteredProps[key] = props[key];\n }\n }\n return filteredProps;\n}\n\nexport { filterProps };\n","import { __assign } from 'tslib';\nimport { createHtmlRenderState } from '../../html/utils/create-render-state.js';\n\nvar createSvgRenderState = function () { return (__assign(__assign({}, createHtmlRenderState()), { attrs: {} })); };\n\nexport { createSvgRenderState };\n","import { __assign } from 'tslib';\nimport { useMemo } from 'react';\nimport { copyRawValuesOnly } from '../html/use-props.js';\nimport { buildSVGAttrs } from './utils/build-attrs.js';\nimport { createSvgRenderState } from './utils/create-render-state.js';\n\nfunction useSVGProps(props, visualState) {\n var visualProps = useMemo(function () {\n var state = createSvgRenderState();\n buildSVGAttrs(state, visualState, undefined, undefined, { enableHardwareAcceleration: false }, props.transformTemplate);\n return __assign(__assign({}, state.attrs), { style: __assign({}, state.style) });\n }, [visualState]);\n if (props.style) {\n var rawStyles = {};\n copyRawValuesOnly(rawStyles, props.style, props);\n visualProps.style = __assign(__assign({}, rawStyles), visualProps.style);\n }\n return visualProps;\n}\n\nexport { useSVGProps };\n","import { __assign } from 'tslib';\nimport { createElement } from 'react';\nimport { useHTMLProps } from '../html/use-props.js';\nimport { filterProps } from './utils/filter-props.js';\nimport { isSVGComponent } from './utils/is-svg-component.js';\nimport { useSVGProps } from '../svg/use-props.js';\n\nfunction createUseRender(forwardMotionProps) {\n if (forwardMotionProps === void 0) { forwardMotionProps = false; }\n var useRender = function (Component, props, ref, _a, isStatic) {\n var latestValues = _a.latestValues;\n var useVisualProps = isSVGComponent(Component)\n ? useSVGProps\n : useHTMLProps;\n var visualProps = useVisualProps(props, latestValues, isStatic);\n var filteredProps = filterProps(props, typeof Component === \"string\", forwardMotionProps);\n var elementProps = __assign(__assign(__assign({}, filteredProps), visualProps), { ref: ref });\n return createElement(Component, elementProps);\n };\n return useRender;\n}\n\nexport { createUseRender };\n","import { __rest } from 'tslib';\nimport { useContext } from 'react';\nimport { isAnimationControls } from '../../animation/utils/is-animation-controls.js';\nimport { PresenceContext } from '../../context/PresenceContext.js';\nimport { checkIfControllingVariants, checkIfVariantNode, resolveVariantFromProps } from '../../render/utils/variants.js';\nimport { useConstant } from '../../utils/use-constant.js';\nimport { resolveMotionValue } from '../../value/utils/resolve-motion-value.js';\nimport { MotionContext } from '../../context/MotionContext/index.js';\n\nfunction makeState(_a, props, context, presenceContext) {\n var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps, createRenderState = _a.createRenderState, onMount = _a.onMount;\n var state = {\n latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),\n renderState: createRenderState(),\n };\n if (onMount) {\n state.mount = function (instance) { return onMount(props, instance, state); };\n }\n return state;\n}\nvar makeUseVisualState = function (config) { return function (props, isStatic) {\n var context = useContext(MotionContext);\n var presenceContext = useContext(PresenceContext);\n return isStatic\n ? makeState(config, props, context, presenceContext)\n : useConstant(function () { return makeState(config, props, context, presenceContext); });\n}; };\nfunction makeLatestValues(props, context, presenceContext, scrapeMotionValues) {\n var values = {};\n var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false;\n var motionValues = scrapeMotionValues(props);\n for (var key in motionValues) {\n values[key] = resolveMotionValue(motionValues[key]);\n }\n var initial = props.initial, animate = props.animate;\n var isControllingVariants = checkIfControllingVariants(props);\n var isVariantNode = checkIfVariantNode(props);\n if (context &&\n isVariantNode &&\n !isControllingVariants &&\n props.inherit !== false) {\n initial !== null && initial !== void 0 ? initial : (initial = context.initial);\n animate !== null && animate !== void 0 ? animate : (animate = context.animate);\n }\n var variantToSet = blockInitialAnimation || initial === false ? animate : initial;\n if (variantToSet &&\n typeof variantToSet !== \"boolean\" &&\n !isAnimationControls(variantToSet)) {\n var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];\n list.forEach(function (definition) {\n var resolved = resolveVariantFromProps(props, definition);\n if (!resolved)\n return;\n var transitionEnd = resolved.transitionEnd; resolved.transition; var target = __rest(resolved, [\"transitionEnd\", \"transition\"]);\n for (var key in target)\n values[key] = target[key];\n for (var key in transitionEnd)\n values[key] = transitionEnd[key];\n });\n }\n return values;\n}\n\nexport { makeUseVisualState };\n","import { isCustomValue } from '../../utils/resolve-value.js';\nimport { isMotionValue } from './is-motion-value.js';\n\n/**\n * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself\n *\n * TODO: Remove and move to library\n *\n * @internal\n */\nfunction resolveMotionValue(value) {\n var unwrappedValue = isMotionValue(value) ? value.get() : value;\n return isCustomValue(unwrappedValue)\n ? unwrappedValue.toValue()\n : unwrappedValue;\n}\n\nexport { resolveMotionValue };\n","import { renderSVG } from './utils/render.js';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.js';\nimport { makeUseVisualState } from '../../motion/utils/use-visual-state.js';\nimport { createSvgRenderState } from './utils/create-render-state.js';\nimport { buildSVGAttrs } from './utils/build-attrs.js';\n\nvar svgMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createSvgRenderState,\n onMount: function (props, instance, _a) {\n var renderState = _a.renderState, latestValues = _a.latestValues;\n try {\n renderState.dimensions =\n typeof instance.getBBox ===\n \"function\"\n ? instance.getBBox()\n : instance.getBoundingClientRect();\n }\n catch (e) {\n // Most likely trying to measure an unrendered element under Firefox\n renderState.dimensions = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n if (isPath(instance)) {\n renderState.totalPathLength = instance.getTotalLength();\n }\n buildSVGAttrs(renderState, latestValues, undefined, undefined, { enableHardwareAcceleration: false }, props.transformTemplate);\n // TODO: Replace with direct assignment\n renderSVG(instance, renderState);\n },\n }),\n};\nfunction isPath(element) {\n return element.tagName === \"path\";\n}\n\nexport { svgMotionConfig };\n","import { makeUseVisualState } from '../../motion/utils/use-visual-state.js';\nimport { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.js';\nimport { createHtmlRenderState } from './utils/create-render-state.js';\n\nvar htmlMotionConfig = {\n useVisualState: makeUseVisualState({\n scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,\n createRenderState: createHtmlRenderState,\n }),\n};\n\nexport { htmlMotionConfig };\n","import { createMotionProxy } from './motion-proxy.js';\nimport { createDomMotionConfig } from './utils/create-config.js';\n\n/**\n * @public\n */\nvar m = createMotionProxy(createDomMotionConfig);\n\nexport { m };\n","import { createMotionComponent } from '../../motion/index.js';\n\n/**\n * Convert any React component into a `motion` component. The provided component\n * **must** use `React.forwardRef` to the underlying DOM component you want to animate.\n *\n * ```jsx\n * const Component = React.forwardRef((props, ref) => {\n * return
\n * })\n *\n * const MotionComponent = motion(Component)\n * ```\n *\n * @public\n */\nfunction createMotionProxy(createConfig) {\n function custom(Component, customMotionComponentConfig) {\n if (customMotionComponentConfig === void 0) { customMotionComponentConfig = {}; }\n return createMotionComponent(createConfig(Component, customMotionComponentConfig));\n }\n /**\n * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.\n * Rather than generating them anew every render.\n */\n var componentCache = new Map();\n return new Proxy(custom, {\n /**\n * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.\n * The prop name is passed through as `key` and we can use that to generate a `motion`\n * DOM component with that name.\n */\n get: function (_target, key) {\n /**\n * If this element doesn't exist in the component cache, create it and cache.\n */\n if (!componentCache.has(key)) {\n componentCache.set(key, custom(key));\n }\n return componentCache.get(key);\n },\n });\n}\n\nexport { createMotionProxy };\n","import { __assign } from 'tslib';\nimport { isSVGComponent } from './is-svg-component.js';\nimport { createUseRender } from '../use-render.js';\nimport { svgMotionConfig } from '../../svg/config-motion.js';\nimport { htmlMotionConfig } from '../../html/config-motion.js';\n\nfunction createDomMotionConfig(Component, _a, preloadedFeatures, createVisualElement) {\n var _b = _a.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;\n var baseConfig = isSVGComponent(Component)\n ? svgMotionConfig\n : htmlMotionConfig;\n return __assign(__assign({}, baseConfig), { preloadedFeatures: preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement: createVisualElement,\n Component: Component });\n}\n\nexport { createDomMotionConfig };\n","function isRefObject(ref) {\n return (typeof ref === \"object\" &&\n Object.prototype.hasOwnProperty.call(ref, \"current\"));\n}\n\nexport { isRefObject };\n","import { createContext } from 'react';\n\n/**\n * @public\n */\nvar MotionConfigContext = createContext({\n transformPagePoint: function (p) { return p; },\n isStatic: false,\n});\n\nexport { MotionConfigContext };\n"],"sourceRoot":""}