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EA,CAAAxB,EAAA1E,IAAA,EACA,GAAAxD,CAAA,IAAAA,EAAAQ,OAAA,CACA,OACA2G,IACA5B,GAAAA,GACA,CACA,EACqDC,OAAAA,EAAAC,sBAAAA,EAAAC,KAAAA,EAAAlG,SAAAiD,CAAA,EAAqIoE,EAAApE,IAC1LyF,EAAAjC,GAAA,CAAA1D,EAAA2G,IAEAjB,EAAA2B,MAAA,CAAAX,EAAA,EAAAC,EACA,GAGAjB,EAAAA,EAAA/F,GAAA,KACA,IAAAK,EAAAE,EAAAF,GAAA,CACA,OAAA2F,EAAAY,GAAA,CAAAvG,GAAAE,EAAqD,GAAAyC,EAAAC,GAAA,EAAIE,EAAa,CAAI9B,UAAA,GAAAkC,sBAAAA,EAAAC,KAAAA,EAAAlG,SAAAiD,CAAA,EAA4FoE,EAAApE,GACtK,GAMY,GAAAyC,EAAAC,GAAA,EAAID,EAAA5C,QAAQ,EAAI9C,SAAA0I,EAAA1E,IAAA,CAC5ByE,EACAA,EAAA/F,GAAA,IAA8C,GAAAW,EAAAuC,YAAA,EAAY3C,GAAA,EAC1D","sources":["webpack://_N_E/./node_modules/next/dist/api/navigation.js","webpack://_N_E/../src/components/Marquee.tsx","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/use-is-mounted.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/use-force-update.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/utils/use-unmount-effect.mjs","webpack://_N_E/./node_modules/framer-motion/dist/es/components/AnimatePresence/index.mjs"],"sourcesContent":["export * from \"../client/components/navigation\";\n\n//# sourceMappingURL=navigation.js.map","import React, {\n Fragment,\n useEffect,\n useState,\n useRef,\n useCallback,\n useMemo,\n ReactNode,\n CSSProperties,\n FC,\n forwardRef,\n Children,\n MutableRefObject,\n RefAttributes,\n} from \"react\";\nimport \"./Marquee.scss\";\n\nexport type MarqueeProps = {\n /**\n * @description Inline style for the container div\n * @type {CSSProperties}\n * @default {}\n */\n style?: CSSProperties;\n /**\n * @description Class name to style the container div\n * @type {string}\n * @default \"\"\n */\n className?: string;\n /**\n * @description Whether to automatically fill blank space in the marquee with copies of the children or not\n * @type {boolean}\n * @default false\n */\n autoFill?: boolean;\n /**\n * @description Whether to play or pause the marquee\n * @type {boolean}\n * @default true\n */\n play?: boolean;\n /**\n * @description Whether to pause the marquee when hovered\n * @type {boolean}\n * @default false\n */\n pauseOnHover?: boolean;\n /**\n * @description Whether to pause the marquee when clicked\n * @type {boolean}\n * @default false\n */\n pauseOnClick?: boolean;\n /**\n * @description The direction the marquee is sliding\n * @type {\"left\" | \"right\" | \"up\" | \"down\"}\n * @default \"left\"\n */\n direction?: \"left\" | \"right\" | \"up\" | \"down\";\n /**\n * @description Speed calculated as pixels/second\n * @type {number}\n * @default 50\n */\n speed?: number;\n /**\n * @description Duration to delay the animation after render, in seconds\n * @type {number}\n * @default 0\n */\n delay?: number;\n /**\n * @description The number of times the marquee should loop, 0 is equivalent to infinite\n * @type {number}\n * @default 0\n */\n loop?: number;\n /**\n * @description Whether to show the gradient or not\n * @type {boolean}\n * @default false\n */\n gradient?: boolean;\n /**\n * @description The color of the gradient\n * @type {string}\n * @default \"white\"\n */\n gradientColor?: string;\n /**\n * @description The width of the gradient on either side\n * @type {number | string}\n * @default 200\n */\n gradientWidth?: number | string;\n /**\n * @description A callback for when the marquee finishes scrolling and stops. Only calls if loop is non-zero.\n * @type {() => void}\n * @default null\n */\n onFinish?: () => void;\n /**\n * @description A callback for when the marquee finishes a loop. Does not call if maximum loops are reached (use onFinish instead).\n * @type {() => void}\n * @default null\n */\n onCycleComplete?: () => void;\n /**\n * @description: A callback function that is invoked once the marquee has finished mounting. It can be utilized to recalculate the page size, if necessary.\n * @type {() => void}\n * @default null\n */\n onMount?: () => void;\n /**\n * @description The children rendered inside the marquee\n * @type {ReactNode}\n * @default null\n */\n children?: ReactNode;\n} & RefAttributes;\n\nconst Marquee: FC = forwardRef(function Marquee(\n {\n style = {},\n className = \"\",\n autoFill = false,\n play = true,\n pauseOnHover = false,\n pauseOnClick = false,\n direction = \"left\",\n speed = 50,\n delay = 0,\n loop = 0,\n gradient = false,\n gradientColor = \"white\",\n gradientWidth = 200,\n onFinish,\n onCycleComplete,\n onMount,\n children,\n },\n ref\n) {\n // React Hooks\n const [containerWidth, setContainerWidth] = useState(0);\n const [marqueeWidth, setMarqueeWidth] = useState(0);\n const [multiplier, setMultiplier] = useState(1);\n const [isMounted, setIsMounted] = useState(false);\n const rootRef = useRef(null);\n const containerRef = (ref as MutableRefObject) || rootRef;\n const marqueeRef = useRef(null);\n\n // Calculate width of container and marquee and set multiplier\n const calculateWidth = useCallback(() => {\n if (marqueeRef.current && containerRef.current) {\n const containerRect = containerRef.current.getBoundingClientRect();\n const marqueeRect = marqueeRef.current.getBoundingClientRect();\n let containerWidth = containerRect.width;\n let marqueeWidth = marqueeRect.width;\n\n // Swap width and height if direction is up or down\n if (direction === \"up\" || direction === \"down\") {\n containerWidth = containerRect.height;\n marqueeWidth = marqueeRect.height;\n }\n\n if (autoFill && containerWidth && marqueeWidth) {\n setMultiplier(\n marqueeWidth < containerWidth\n ? Math.ceil(containerWidth / marqueeWidth)\n : 1\n );\n } else {\n setMultiplier(1);\n }\n\n setContainerWidth(containerWidth);\n setMarqueeWidth(marqueeWidth);\n }\n }, [autoFill, containerRef, direction]);\n\n // Calculate width and multiplier on mount and on window resize\n useEffect(() => {\n if (!isMounted) return;\n\n calculateWidth();\n if (marqueeRef.current && containerRef.current) {\n const resizeObserver = new ResizeObserver(() => calculateWidth());\n resizeObserver.observe(containerRef.current);\n resizeObserver.observe(marqueeRef.current);\n return () => {\n if (!resizeObserver) return;\n resizeObserver.disconnect();\n };\n }\n }, [calculateWidth, containerRef, isMounted]);\n\n // Recalculate width when children change\n useEffect(() => {\n calculateWidth();\n }, [calculateWidth, children]);\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n // Runs the onMount callback, if it is a function, when Marquee is mounted.\n useEffect(() => {\n if (typeof onMount === \"function\") {\n onMount();\n }\n }, []);\n\n // Animation duration\n const duration = useMemo(() => {\n if (autoFill) {\n return (marqueeWidth * multiplier) / speed;\n } else {\n return marqueeWidth < containerWidth\n ? containerWidth / speed\n : marqueeWidth / speed;\n }\n }, [autoFill, containerWidth, marqueeWidth, multiplier, speed]);\n\n const containerStyle = useMemo(\n () => ({\n ...style,\n [\"--pause-on-hover\" as string]:\n !play || pauseOnHover ? \"paused\" : \"running\",\n [\"--pause-on-click\" as string]:\n !play || (pauseOnHover && !pauseOnClick) || pauseOnClick\n ? \"paused\"\n : \"running\",\n [\"--width\" as string]:\n direction === \"up\" || direction === \"down\" ? `100vh` : \"100%\",\n [\"--transform\" as string]:\n direction === \"up\"\n ? \"rotate(-90deg)\"\n : direction === \"down\"\n ? \"rotate(90deg)\"\n : \"none\",\n }),\n [style, play, pauseOnHover, pauseOnClick, direction]\n );\n\n const gradientStyle = useMemo(\n () => ({\n [\"--gradient-color\" as string]: gradientColor,\n [\"--gradient-width\" as string]:\n typeof gradientWidth === \"number\"\n ? `${gradientWidth}px`\n : gradientWidth,\n }),\n [gradientColor, gradientWidth]\n );\n\n const marqueeStyle = useMemo(\n () => ({\n [\"--play\" as string]: play ? \"running\" : \"paused\",\n [\"--direction\" as string]: direction === \"left\" ? \"normal\" : \"reverse\",\n [\"--duration\" as string]: `${duration}s`,\n [\"--delay\" as string]: `${delay}s`,\n [\"--iteration-count\" as string]: !!loop ? `${loop}` : \"infinite\",\n [\"--min-width\" as string]: autoFill ? `auto` : \"100%\",\n }),\n [play, direction, duration, delay, loop, autoFill]\n );\n\n const childStyle = useMemo(\n () => ({\n [\"--transform\" as string]:\n direction === \"up\"\n ? \"rotate(90deg)\"\n : direction === \"down\"\n ? \"rotate(-90deg)\"\n : \"none\",\n }),\n [direction]\n );\n\n // Render {multiplier} number of children\n const multiplyChildren = useCallback(\n (multiplier: number) => {\n return [\n ...Array(\n Number.isFinite(multiplier) && multiplier >= 0 ? multiplier : 0\n ),\n ].map((_, i) => (\n \n {Children.map(children, (child) => {\n return (\n
\n {child}\n
\n );\n })}\n
\n ));\n },\n [childStyle, children]\n );\n\n return !isMounted ? null : (\n \n {gradient &&
}\n \n
\n {Children.map(children, (child) => {\n return (\n
\n {child}\n
\n );\n })}\n
\n {multiplyChildren(multiplier - 1)}\n
\n
\n {multiplyChildren(multiplier)}\n
\n \n );\n});\n\nexport default Marquee;\n","import { useRef } from 'react';\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-effect.mjs';\n\nfunction useIsMounted() {\n const isMounted = useRef(false);\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true;\n return () => {\n isMounted.current = false;\n };\n }, []);\n return isMounted;\n}\n\nexport { useIsMounted };\n","import { useState, useCallback } from 'react';\nimport { useIsMounted } from './use-is-mounted.mjs';\nimport { frame } from '../frameloop/frame.mjs';\n\nfunction useForceUpdate() {\n const isMounted = useIsMounted();\n const [forcedRenderCount, setForcedRenderCount] = useState(0);\n const forceRender = useCallback(() => {\n isMounted.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n /**\n * Defer this to the end of the next animation frame in case there are multiple\n * synchronous calls.\n */\n const deferredForceRender = useCallback(() => frame.postRender(forceRender), [forceRender]);\n return [deferredForceRender, forcedRenderCount];\n}\n\nexport { useForceUpdate };\n","import { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useRef, useContext, useInsertionEffect } from 'react';\nimport { MotionConfigContext } from '../../context/MotionConfigContext.mjs';\n\n/**\n * Measurement functionality has to be within a separate component\n * to leverage snapshot lifecycle.\n */\nclass PopChildMeasure extends React.Component {\n getSnapshotBeforeUpdate(prevProps) {\n const element = this.props.childRef.current;\n if (element && prevProps.isPresent && !this.props.isPresent) {\n const size = this.props.sizeRef.current;\n size.height = element.offsetHeight || 0;\n size.width = element.offsetWidth || 0;\n size.top = element.offsetTop;\n size.left = element.offsetLeft;\n }\n return null;\n }\n /**\n * Required with getSnapshotBeforeUpdate to stop React complaining.\n */\n componentDidUpdate() { }\n render() {\n return this.props.children;\n }\n}\nfunction PopChild({ children, isPresent }) {\n const id = useId();\n const ref = useRef(null);\n const size = useRef({\n width: 0,\n height: 0,\n top: 0,\n left: 0,\n });\n const { nonce } = useContext(MotionConfigContext);\n /**\n * We create and inject a style block so we can apply this explicit\n * sizing in a non-destructive manner by just deleting the style block.\n *\n * We can't apply size via render as the measurement happens\n * in getSnapshotBeforeUpdate (post-render), likewise if we apply the\n * styles directly on the DOM node, we might be overwriting\n * styles set via the style prop.\n */\n useInsertionEffect(() => {\n const { width, height, top, left } = size.current;\n if (isPresent || !ref.current || !width || !height)\n return;\n ref.current.dataset.motionPopId = id;\n const style = document.createElement(\"style\");\n if (nonce)\n style.nonce = nonce;\n document.head.appendChild(style);\n if (style.sheet) {\n style.sheet.insertRule(`\n [data-motion-pop-id=\"${id}\"] {\n position: absolute !important;\n width: ${width}px !important;\n height: ${height}px !important;\n top: ${top}px !important;\n left: ${left}px !important;\n }\n `);\n }\n return () => {\n document.head.removeChild(style);\n };\n }, [isPresent]);\n return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, children: React.cloneElement(children, { ref }) }));\n}\n\nexport { PopChild };\n","import { jsx } from 'react/jsx-runtime';\nimport * as React from 'react';\nimport { useId, useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.mjs';\nimport { useConstant } from '../../utils/use-constant.mjs';\nimport { PopChild } from './PopChild.mjs';\n\nconst PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, presenceAffectsLayout, mode, }) => {\n const presenceChildren = useConstant(newChildrenMap);\n const id = useId();\n const context = useMemo(() => ({\n id,\n initial,\n isPresent,\n custom,\n onExitComplete: (childId) => {\n presenceChildren.set(childId, true);\n for (const isComplete of presenceChildren.values()) {\n if (!isComplete)\n return; // can stop searching when any is incomplete\n }\n onExitComplete && onExitComplete();\n },\n register: (childId) => {\n presenceChildren.set(childId, false);\n return () => presenceChildren.delete(childId);\n },\n }), \n /**\n * If the presence of a child affects the layout of the components around it,\n * we want to make a new context value to ensure they get re-rendered\n * so they can detect that layout change.\n */\n presenceAffectsLayout ? [Math.random()] : [isPresent]);\n useMemo(() => {\n presenceChildren.forEach((_, key) => presenceChildren.set(key, false));\n }, [isPresent]);\n /**\n * If there's no `motion` components to fire exit animations, we want to remove this\n * component immediately.\n */\n React.useEffect(() => {\n !isPresent &&\n !presenceChildren.size &&\n onExitComplete &&\n onExitComplete();\n }, [isPresent]);\n if (mode === \"popLayout\") {\n children = jsx(PopChild, { isPresent: isPresent, children: children });\n }\n return (jsx(PresenceContext.Provider, { value: context, children: children }));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n","import { useEffect } from 'react';\n\nfunction useUnmountEffect(callback) {\n return useEffect(() => () => callback(), []);\n}\n\nexport { useUnmountEffect };\n","import { jsx, Fragment } from 'react/jsx-runtime';\nimport { useContext, useRef, cloneElement, Children, isValidElement } from 'react';\nimport { useForceUpdate } from '../../utils/use-force-update.mjs';\nimport { useIsMounted } from '../../utils/use-is-mounted.mjs';\nimport { PresenceChild } from './PresenceChild.mjs';\nimport { LayoutGroupContext } from '../../context/LayoutGroupContext.mjs';\nimport { useIsomorphicLayoutEffect } from '../../utils/use-isomorphic-effect.mjs';\nimport { useUnmountEffect } from '../../utils/use-unmount-effect.mjs';\nimport { invariant } from '../../utils/errors.mjs';\n\nconst getChildKey = (child) => child.key || \"\";\nfunction updateChildLookup(children, allChildren) {\n children.forEach((child) => {\n const key = getChildKey(child);\n allChildren.set(key, child);\n });\n}\nfunction onlyElements(children) {\n const filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, (child) => {\n if (isValidElement(child))\n filtered.push(child);\n });\n return filtered;\n}\n/**\n * `AnimatePresence` enables the animation of components that have been removed from the tree.\n *\n * When adding/removing more than a single child, every child **must** be given a unique `key` prop.\n *\n * Any `motion` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { motion, AnimatePresence } from 'framer-motion'\n *\n * export const Items = ({ items }) => (\n * \n * {items.map(item => (\n * \n * ))}\n * \n * )\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * If a child contains multiple `motion` components with `exit` props, it will only unmount the child\n * once all `motion` components have finished animating out. Likewise, any components using\n * `usePresence` all need to call `safeToRemove`.\n *\n * @public\n */\nconst AnimatePresence = ({ children, custom, initial = true, onExitComplete, exitBeforeEnter, presenceAffectsLayout = true, mode = \"sync\", }) => {\n invariant(!exitBeforeEnter, \"Replace exitBeforeEnter with mode='wait'\");\n // We want to force a re-render once all exiting animations have finished. We\n // either use a local forceRender function, or one from a parent context if it exists.\n const forceRender = useContext(LayoutGroupContext).forceRender || useForceUpdate()[0];\n const isMounted = useIsMounted();\n // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key\n const filteredChildren = onlyElements(children);\n let childrenToRender = filteredChildren;\n const exitingChildren = useRef(new Map()).current;\n // Keep a living record of the children we're actually rendering so we\n // can diff to figure out which are entering and exiting\n const presentChildren = useRef(childrenToRender);\n // A lookup table to quickly reference components by key\n const allChildren = useRef(new Map()).current;\n // If this is the initial component render, just deal with logic surrounding whether\n // we play onMount animations or not.\n const isInitialRender = useRef(true);\n useIsomorphicLayoutEffect(() => {\n isInitialRender.current = false;\n updateChildLookup(filteredChildren, allChildren);\n presentChildren.current = childrenToRender;\n });\n useUnmountEffect(() => {\n isInitialRender.current = true;\n allChildren.clear();\n exitingChildren.clear();\n });\n if (isInitialRender.current) {\n return (jsx(Fragment, { children: childrenToRender.map((child) => (jsx(PresenceChild, { isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)))) }));\n }\n // If this is a subsequent render, deal with entering and exiting children\n childrenToRender = [...childrenToRender];\n // Diff the keys of the currently-present and target children to update our\n // exiting list.\n const presentKeys = presentChildren.current.map(getChildKey);\n const targetKeys = filteredChildren.map(getChildKey);\n // Diff the present children with our target children and mark those that are exiting\n const numPresent = presentKeys.length;\n for (let i = 0; i < numPresent; i++) {\n const key = presentKeys[i];\n if (targetKeys.indexOf(key) === -1 && !exitingChildren.has(key)) {\n exitingChildren.set(key, undefined);\n }\n }\n // If we currently have exiting children, and we're deferring rendering incoming children\n // until after all current children have exiting, empty the childrenToRender array\n if (mode === \"wait\" && exitingChildren.size) {\n childrenToRender = [];\n }\n // Loop through all currently exiting components and clone them to overwrite `animate`\n // with any `exit` prop they might have defined.\n exitingChildren.forEach((component, key) => {\n // If this component is actually entering again, early return\n if (targetKeys.indexOf(key) !== -1)\n return;\n const child = allChildren.get(key);\n if (!child)\n return;\n const insertionIndex = presentKeys.indexOf(key);\n let exitingComponent = component;\n if (!exitingComponent) {\n const onExit = () => {\n // clean up the exiting children map\n exitingChildren.delete(key);\n // compute the keys of children that were rendered once but are no longer present\n // this could happen in case of too many fast consequent renderings\n // @link https://github.com/framer/motion/issues/2023\n const leftOverKeys = Array.from(allChildren.keys()).filter((childKey) => !targetKeys.includes(childKey));\n // clean up the all children map\n leftOverKeys.forEach((leftOverKey) => allChildren.delete(leftOverKey));\n // make sure to render only the children that are actually visible\n presentChildren.current = filteredChildren.filter((presentChild) => {\n const presentChildKey = getChildKey(presentChild);\n return (\n // filter out the node exiting\n presentChildKey === key ||\n // filter out the leftover children\n leftOverKeys.includes(presentChildKey));\n });\n // Defer re-rendering until all exiting children have indeed left\n if (!exitingChildren.size) {\n if (isMounted.current === false)\n return;\n forceRender();\n onExitComplete && onExitComplete();\n }\n };\n exitingComponent = (jsx(PresenceChild, { isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)));\n exitingChildren.set(key, exitingComponent);\n }\n childrenToRender.splice(insertionIndex, 0, exitingComponent);\n });\n // Add `MotionContext` even to children that don't need it to ensure we're rendering\n // the same tree between renders\n childrenToRender = childrenToRender.map((child) => {\n const key = child.key;\n return exitingChildren.has(key) ? (child) : (jsx(PresenceChild, { isPresent: true, presenceAffectsLayout: presenceAffectsLayout, mode: mode, children: child }, getChildKey(child)));\n });\n if (process.env.NODE_ENV !== \"production\" &&\n mode === \"wait\" &&\n childrenToRender.length > 1) {\n console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to \"wait\". This will lead to odd visual behaviour.`);\n }\n return (jsx(Fragment, { children: exitingChildren.size\n ? childrenToRender\n : childrenToRender.map((child) => cloneElement(child)) }));\n};\n\nexport { AnimatePresence };\n"],"names":["Marquee","forwardRef","param","ref","style","className","autoFill","play","pauseOnHover","pauseOnClick","direction","speed","delay","loop","gradient","gradientColor","gradientWidth","onFinish","onCycleComplete","onMount","children","containerWidth","setContainerWidth","useState","marqueeWidth","setMarqueeWidth","multiplier","setMultiplier","isMounted","setIsMounted","rootRef","useRef","containerRef","marqueeRef","calculateWidth","useCallback","current","containerRect","getBoundingClientRect","marqueeRect","width","height","Math","ceil","useEffect","resizeObserver","ResizeObserver","observe","disconnect","duration","useMemo","containerStyle","Object","assign","gradientStyle","concat","marqueeStyle","childStyle","multiplyChildren","Array","Number","isFinite","map","_","i","React","Fragment","key","Children","child","onAnimationIteration","onAnimationEnd","useIsMounted","react","use_isomorphic_effect","L","PopChildMeasure","Component","getSnapshotBeforeUpdate","prevProps","element","props","childRef","isPresent","size","sizeRef","offsetHeight","offsetWidth","top","offsetTop","left","offsetLeft","componentDidUpdate","render","PopChild","id","useId","nonce","useContext","MotionConfigContext","useInsertionEffect","dataset","motionPopId","document","createElement","head","appendChild","sheet","insertRule","removeChild","jsx_runtime","jsx","cloneElement","PresenceChild","initial","onExitComplete","custom","presenceAffectsLayout","mode","presenceChildren","use_constant","h","newChildrenMap","context","isComplete","set","childId","values","register","delete","random","forEach","PresenceContext","O","Provider","value","Map","getChildKey","AnimatePresence","exitBeforeEnter","callback","errors","k","forceRender","LayoutGroupContext","p","useForceUpdate","forcedRenderCount","setForcedRenderCount","frameloop_frame","Wi","postRender","filteredChildren","onlyElements","filtered","isValidElement","push","childrenToRender","exitingChildren","presentChildren","allChildren","isInitialRender","updateChildLookup","clear","undefined","presentKeys","targetKeys","numPresent","length","indexOf","has","component","get","insertionIndex","exitingComponent","leftOverKeys","from","keys","filter","includes","childKey","leftOverKey","presentChildKey","presentChild","splice"],"sourceRoot":""}