{"version":3,"sources":["webpack:///./node_modules/framer-motion/dist/es/render/dom/projection/utils.js","webpack:///./node_modules/js-cookie/dist/js.cookie.js","webpack:///./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/batcher.js","webpack:///./node_modules/framer-motion/dist/es/context/SharedLayoutContext.js","webpack:///./node_modules/framer-motion/dist/es/render/dom/utils/batch-layout.js","webpack:///./node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js","webpack:///./node_modules/framer-motion/dist/es/components/AnimatePresence/index.js","webpack:///./node_modules/framer-motion/dist/es/utils/use-force-update.js"],"names":["isProjecting","visualElement","projection","isEnabled","shouldResetTransform","collectProjectingAncestors","ancestors","parent","push","collectProjectingChildren","children","addChild","child","forEach","sort","updateLayoutMeasurement","layoutState","getLayoutState","notifyBeforeLayoutMeasure","layout","isHydrated","measureViewportBox","layoutCorrected","notifyLayoutMeasure","prevViewportBox","update","rebaseProjectionTarget","snapshotViewportBox","module","exports","assign","target","i","arguments","length","source","key","init","converter","defaultAttributes","set","value","attributes","document","expires","Date","now","toUTCString","encodeURIComponent","replace","decodeURIComponent","escape","stringifiedAttributes","attributeName","split","cookie","write","Object","create","get","cookies","jar","parts","slice","join","foundKey","read","e","remove","withAttributes","this","withConverter","freeze","path","factory","defaultHandler","layoutReady","notifyLayoutReady","createBatcher","queue","Set","add","flush","_a","_b","order","Array","from","element","resetTransform","restoreTransform","isPresent","presence","Present","preRender","render","postRender","assignProjectionToSnapshot","clear","SharedLayoutContext","FramerTreeLayoutContext","isSharedLayout","context","forceUpdate","unresolvedJobs","pushJob","stack","job","pointer","batchLayout","callback","delete","flushLayout","size","reads","writes","setRead","setWrite","numStacks","executeJob","presenceId","getPresenceId","id","PresenceChild","initial","onExitComplete","custom","presenceAffectsLayout","presenceChildren","newChildrenMap","childId","allComplete","isComplete","register","undefined","_","PresenceContext","Provider","Map","getChildKey","AnimatePresence","exitBeforeEnter","_c","forceRender","unloadingRef","forcedRenderCount","setForcedRenderCount","current","useForceUpdate","layoutContext","isInitialRender","filteredChildren","filtered","onlyElements","presentChildren","allChildren","exiting","updateChildLookup","map","childrenToRender","presentKeys","targetKeys","numPresent","indexOf","insertionIndex","splice","removeIndex","findIndex","presentChild","has"],"mappings":"wFAAA,qKAIA,SAASA,EAAaC,GAElB,OADgBA,EAAcC,WAAWC,WACrBF,EAAcG,uBAEtC,SAASC,EAA2BJ,EAAeK,QAC7B,IAAdA,IAAwBA,EAAY,IACxC,IAAIC,EAASN,EAAcM,OAK3B,OAJIA,GACAF,EAA2BE,EAAQD,GACnCN,EAAaC,IACbK,EAAUE,KAAKP,GACZK,EAEX,SAASG,EAA0BR,GAC/B,IAAIS,EAAW,GACXC,EAAW,SAAUC,GACjBZ,EAAaY,IACbF,EAASF,KAAKI,GAClBA,EAAMF,SAASG,QAAQF,IAG3B,OADAV,EAAcS,SAASG,QAAQF,GACxBD,EAASI,KAAK,KAMzB,SAASC,EAAwBd,GAC7B,IAAIA,EAAcG,uBAAlB,CAEA,IAAIY,EAAcf,EAAcgB,iBAChChB,EAAciB,0BAA0BF,EAAYG,QACpDH,EAAYI,YAAa,EACzBJ,EAAYG,OAASlB,EAAcoB,qBACnCL,EAAYM,gBAAkB,YAAYN,EAAYG,QACtDlB,EAAcsB,oBAAoBP,EAAYG,OAAQlB,EAAcuB,iBAAmBR,EAAYG,QACnG,IAAKM,QAAO,WAAc,OAAOxB,EAAcyB,6BAKnD,SAASC,EAAoB1B,GACrBA,EAAcG,yBAElBH,EAAcuB,gBAAkBvB,EAAcoB,oBAAmB,GAKjEpB,EAAcyB,wBAAuB,EAAOzB,EAAcuB,oB,oBClDGI,EAAOC,QAOhE,WAAe,aAGrB,SAASC,EAAQC,GACf,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GACvB,IAAK,IAAII,KAAOD,EACdJ,EAAOK,GAAOD,EAAOC,GAGzB,OAAOL,EA4HT,OArGA,SAASM,EAAMC,E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B,EAAG,gBAAoBzC,EAAe,CAAEvF,IAAKuG,EAAY/H,GAAQ+E,WAAW,EAAOkC,eAb9G,WACT8B,EAAY5C,OAAO3E,GACnBwH,EAAQ7C,OAAO3E,GAEf,IAAIkI,EAAcZ,EAAgBP,QAAQoB,WAAU,SAAUC,GAAgB,OAAOA,EAAapI,MAAQA,KAC1GsH,EAAgBP,QAAQkB,OAAOC,EAAa,GAEvCV,EAAQ3C,OACTyC,EAAgBP,QAAUI,EAC1BR,IACAlB,GAAkBA,MAGyHC,OAAQA,EAAQC,sBAAuBA,GAAyBnH,SAIvNmJ,EAAmBA,EAAiBD,KAAI,SAAUlJ,GAC9C,IAAIwB,EAAMxB,EAAMwB,IAChB,OAAOwH,EAAQa,IAAIrI,GAAO,EAAW,gBAAoBuF,EAAe,CAAEvF,IAAKuG,EAAY/H,GAAQ+E,WAAW,EAAMoC,sBAAuBA,GAAyBnH,MAExK8I,EAAgBP,QAAUY,EAMlB,gBAAoB,WAAgB,KAAMH,EAAQ3C,KACpD8C,EACAA,EAAiBD,KAAI,SAAUlJ,GAAS,OAAO,uBAAaA","file":"114-84c1306318fbef26abec.js","sourcesContent":["import sync from 'framesync';\nimport { copyAxisBox } from '../../../utils/geometry/index.js';\nimport { compareByDepth } from '../../utils/compare-by-depth.js';\n\nfunction isProjecting(visualElement) {\n var isEnabled = visualElement.projection.isEnabled;\n return isEnabled || visualElement.shouldResetTransform();\n}\nfunction collectProjectingAncestors(visualElement, ancestors) {\n if (ancestors === void 0) { ancestors = []; }\n var parent = visualElement.parent;\n if (parent)\n collectProjectingAncestors(parent, ancestors);\n if (isProjecting(visualElement))\n ancestors.push(visualElement);\n return ancestors;\n}\nfunction collectProjectingChildren(visualElement) {\n var children = [];\n var addChild = function (child) {\n if (isProjecting(child))\n children.push(child);\n child.children.forEach(addChild);\n };\n visualElement.children.forEach(addChild);\n return children.sort(compareByDepth);\n}\n/**\n * Update the layoutState by measuring the DOM layout. This\n * should be called after resetting any layout-affecting transforms.\n */\nfunction updateLayoutMeasurement(visualElement) {\n if (visualElement.shouldResetTransform())\n return;\n var layoutState = visualElement.getLayoutState();\n visualElement.notifyBeforeLayoutMeasure(layoutState.layout);\n layoutState.isHydrated = true;\n layoutState.layout = visualElement.measureViewportBox();\n layoutState.layoutCorrected = copyAxisBox(layoutState.layout);\n visualElement.notifyLayoutMeasure(layoutState.layout, visualElement.prevViewportBox || layoutState.layout);\n sync.update(function () { return visualElement.rebaseProjectionTarget(); });\n}\n/**\n * Record the viewport box as it was before an expected mutation/re-render\n */\nfunction snapshotViewportBox(visualElement) {\n if (visualElement.shouldResetTransform())\n return;\n visualElement.prevViewportBox = visualElement.measureViewportBox(false);\n /**\n * Update targetBox to match the prevViewportBox. This is just to ensure\n * that targetBox is affected by scroll in the same way as the measured box\n */\n visualElement.rebaseProjectionTarget(false, visualElement.prevViewportBox);\n}\n\nexport { collectProjectingAncestors, collectProjectingChildren, snapshotViewportBox, updateLayoutMeasurement };\n","/*! js-cookie v3.0.1 | MIT */\n;\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, (function () {\n var current = global.Cookies;\n var exports = global.Cookies = factory();\n exports.noConflict = function () { global.Cookies = current; return exports; };\n }()));\n}(this, (function () { 'use strict';\n\n /* eslint-disable no-var */\n function assign (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n target[key] = source[key];\n }\n }\n return target\n }\n /* eslint-enable no-var */\n\n /* eslint-disable no-var */\n var defaultConverter = {\n read: function (value) {\n if (value[0] === '\"') {\n value = value.slice(1, -1);\n }\n return value.replace(/(%[\\dA-F]{2})+/gi, decodeURIComponent)\n },\n write: function (value) {\n return encodeURIComponent(value).replace(\n /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,\n decodeURIComponent\n )\n }\n };\n /* eslint-enable no-var */\n\n /* eslint-disable no-var */\n\n function init (converter, defaultAttributes) {\n function set (key, value, attributes) {\n if (typeof document === 'undefined') {\n return\n }\n\n attributes = assign({}, defaultAttributes, attributes);\n\n if (typeof attributes.expires === 'number') {\n attributes.expires = new Date(Date.now() + attributes.expires * 864e5);\n }\n if (attributes.expires) {\n attributes.expires = attributes.expires.toUTCString();\n }\n\n key = encodeURIComponent(key)\n .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)\n .replace(/[()]/g, escape);\n\n var stringifiedAttributes = '';\n for (var attributeName in attributes) {\n if (!attributes[attributeName]) {\n continue\n }\n\n stringifiedAttributes += '; ' + attributeName;\n\n if (attributes[attributeName] === true) {\n continue\n }\n\n // Considers RFC 6265 section 5.2:\n // ...\n // 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n // character:\n // Consume the characters of the unparsed-attributes up to,\n // not including, the first %x3B (\";\") character.\n // ...\n stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n }\n\n return (document.cookie =\n key + '=' + converter.write(value, key) + stringifiedAttributes)\n }\n\n function get (key) {\n if (typeof document === 'undefined' || (arguments.length && !key)) {\n return\n }\n\n // To prevent the for loop in the first place assign an empty array\n // in case there are no cookies at all.\n var cookies = document.cookie ? document.cookie.split('; ') : [];\n var jar = {};\n for (var i = 0; i < cookies.length; i++) {\n var parts = cookies[i].split('=');\n var value = parts.slice(1).join('=');\n\n try {\n var foundKey = decodeURIComponent(parts[0]);\n jar[foundKey] = converter.read(value, foundKey);\n\n if (key === foundKey) {\n break\n }\n } catch (e) {}\n }\n\n return key ? jar[key] : jar\n }\n\n return Object.create(\n {\n set: set,\n get: get,\n remove: function (key, attributes) {\n set(\n key,\n '',\n assign({}, attributes, {\n expires: -1\n })\n );\n },\n withAttributes: function (attributes) {\n return init(this.converter, assign({}, this.attributes, attributes))\n },\n withConverter: function (converter) {\n return init(assign({}, this.converter, converter), this.attributes)\n }\n },\n {\n attributes: { value: Object.freeze(defaultAttributes) },\n converter: { value: Object.freeze(converter) }\n }\n )\n }\n\n var api = init(defaultConverter, { path: '/' });\n /* eslint-enable no-var */\n\n return api;\n\n})));\n","import { __spreadArray, __read } from 'tslib';\nimport sync, { flushSync } from 'framesync';\nimport { collectProjectingAncestors, updateLayoutMeasurement } from '../../../render/dom/projection/utils.js';\nimport { batchLayout, flushLayout } from '../../../render/dom/utils/batch-layout.js';\nimport { compareByDepth } from '../../../render/utils/compare-by-depth.js';\nimport { Presence } from '../types.js';\n\n/**\n * Default handlers for batching VisualElements\n */\nvar defaultHandler = {\n layoutReady: function (child) { return child.notifyLayoutReady(); },\n};\n/**\n * Create a batcher to process VisualElements\n */\nfunction createBatcher() {\n var queue = new Set();\n return {\n add: function (child) { return queue.add(child); },\n flush: function (_a) {\n var _b = _a === void 0 ? defaultHandler : _a, layoutReady = _b.layoutReady, parent = _b.parent;\n batchLayout(function (read, write) {\n var order = Array.from(queue).sort(compareByDepth);\n var ancestors = parent\n ? collectProjectingAncestors(parent)\n : [];\n write(function () {\n var allElements = __spreadArray(__spreadArray([], __read(ancestors)), __read(order));\n allElements.forEach(function (element) { return element.resetTransform(); });\n });\n read(function () {\n order.forEach(updateLayoutMeasurement);\n });\n write(function () {\n ancestors.forEach(function (element) { return element.restoreTransform(); });\n order.forEach(layoutReady);\n });\n read(function () {\n /**\n * After all children have started animating, ensure any Entering components are set to Present.\n * If we add deferred animations (set up all animations and then start them in two loops) this\n * could be moved to the start loop. But it needs to happen after all the animations configs\n * are generated in AnimateSharedLayout as this relies on presence data\n */\n order.forEach(function (child) {\n if (child.isPresent)\n child.presence = Presence.Present;\n });\n });\n write(function () {\n /**\n * Starting these animations will have queued jobs on the frame loop. In some situations,\n * like when removing an element, these will be processed too late after the DOM is manipulated,\n * leaving a flash of incorrectly-projected content. By manually flushing these jobs\n * we ensure there's no flash.\n */\n flushSync.preRender();\n flushSync.render();\n });\n read(function () {\n /**\n * Schedule a callback at the end of the following frame to assign the latest projection\n * box to the prevViewportBox snapshot. Once global batching is in place this could be run\n * synchronously. But for now it ensures that if any nested `AnimateSharedLayout` top-level\n * child attempts to calculate its previous relative position against a prevViewportBox\n * it will be against its latest projection box instead, as the snapshot is useless beyond this\n * render.\n */\n sync.postRender(function () {\n return order.forEach(assignProjectionToSnapshot);\n });\n queue.clear();\n });\n });\n // TODO: Need to find a layout-synchronous way of flushing this\n flushLayout();\n },\n };\n}\nfunction assignProjectionToSnapshot(child) {\n child.prevViewportBox = child.projection.target;\n}\n\nexport { createBatcher };\n","import { createContext } from 'react';\nimport { createBatcher } from '../components/AnimateSharedLayout/utils/batcher.js';\n\nvar SharedLayoutContext = createContext(createBatcher());\n/**\n * @internal\n */\nvar FramerTreeLayoutContext = createContext(createBatcher());\nfunction isSharedLayout(context) {\n return !!context.forceUpdate;\n}\n\nexport { FramerTreeLayoutContext, SharedLayoutContext, isSharedLayout };\n","var unresolvedJobs = new Set();\nfunction pushJob(stack, job, pointer) {\n if (!stack[pointer])\n stack[pointer] = [];\n stack[pointer].push(job);\n}\nfunction batchLayout(callback) {\n unresolvedJobs.add(callback);\n return function () { return unresolvedJobs.delete(callback); };\n}\nfunction flushLayout() {\n if (!unresolvedJobs.size)\n return;\n var pointer = 0;\n var reads = [[]];\n var writes = [];\n var setRead = function (job) { return pushJob(reads, job, pointer); };\n var setWrite = function (job) {\n pushJob(writes, job, pointer);\n pointer++;\n };\n /**\n * Resolve jobs into their array stacks\n */\n unresolvedJobs.forEach(function (callback) {\n callback(setRead, setWrite);\n pointer = 0;\n });\n unresolvedJobs.clear();\n /**\n * Execute jobs\n */\n var numStacks = writes.length;\n for (var i = 0; i <= numStacks; i++) {\n reads[i] && reads[i].forEach(executeJob);\n writes[i] && writes[i].forEach(executeJob);\n }\n}\nvar executeJob = function (job) { return job(); };\n\nexport { batchLayout, flushLayout };\n","import * as React from 'react';\nimport { useMemo } from 'react';\nimport { PresenceContext } from '../../context/PresenceContext.js';\nimport { useConstant } from '../../utils/use-constant.js';\n\nvar presenceId = 0;\nfunction getPresenceId() {\n var id = presenceId;\n presenceId++;\n return id;\n}\nvar PresenceChild = function (_a) {\n var children = _a.children, initial = _a.initial, isPresent = _a.isPresent, onExitComplete = _a.onExitComplete, custom = _a.custom, presenceAffectsLayout = _a.presenceAffectsLayout;\n var presenceChildren = useConstant(newChildrenMap);\n var id = useConstant(getPresenceId);\n var context = useMemo(function () { return ({\n id: id,\n initial: initial,\n isPresent: isPresent,\n custom: custom,\n onExitComplete: function (childId) {\n presenceChildren.set(childId, true);\n var allComplete = true;\n presenceChildren.forEach(function (isComplete) {\n if (!isComplete)\n allComplete = false;\n });\n allComplete && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());\n },\n register: function (childId) {\n presenceChildren.set(childId, false);\n return function () { 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 ? undefined : [isPresent]);\n useMemo(function () {\n presenceChildren.forEach(function (_, key) { return 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(function () {\n !isPresent && !presenceChildren.size && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());\n }, [isPresent]);\n return (React.createElement(PresenceContext.Provider, { value: context }, children));\n};\nfunction newChildrenMap() {\n return new Map();\n}\n\nexport { PresenceChild };\n","import { __spreadArray, __read } from 'tslib';\nimport * as React from 'react';\nimport { useContext, useRef, cloneElement, Children, isValidElement } from 'react';\nimport { useForceUpdate } from '../../utils/use-force-update.js';\nimport { PresenceChild } from './PresenceChild.js';\nimport { SharedLayoutContext, isSharedLayout } from '../../context/SharedLayoutContext.js';\n\nfunction getChildKey(child) {\n return child.key || \"\";\n}\nfunction updateChildLookup(children, allChildren) {\n var seenChildren = process.env.NODE_ENV !== \"production\" ? new Set() : null;\n children.forEach(function (child) {\n var key = getChildKey(child);\n if (process.env.NODE_ENV !== \"production\" && seenChildren) {\n if (seenChildren.has(key)) {\n console.warn(\"Children of AnimatePresence require unique keys. \\\"\" + key + \"\\\" is a duplicate.\");\n }\n seenChildren.add(key);\n }\n allChildren.set(key, child);\n });\n}\nfunction onlyElements(children) {\n var filtered = [];\n // We use forEach here instead of map as map mutates the component key by preprending `.$`\n Children.forEach(children, function (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 * @library\n *\n * Any `Frame` components that have an `exit` property defined will animate out when removed from\n * the tree.\n *\n * ```jsx\n * import { Frame, AnimatePresence } from 'framer'\n *\n * // As items are added and removed from `items`\n * export function Items({ items }) {\n * return (\n * \n * {items.map(item => (\n * \n * ))}\n * \n * )\n * }\n * ```\n *\n * You can sequence exit animations throughout a tree using variants.\n *\n * @motion\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 */\nvar AnimatePresence = function (_a) {\n var children = _a.children, custom = _a.custom, _b = _a.initial, initial = _b === void 0 ? true : _b, onExitComplete = _a.onExitComplete, exitBeforeEnter = _a.exitBeforeEnter, _c = _a.presenceAffectsLayout, presenceAffectsLayout = _c === void 0 ? true : _c;\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 var forceRender = useForceUpdate();\n var layoutContext = useContext(SharedLayoutContext);\n if (isSharedLayout(layoutContext)) {\n forceRender = layoutContext.forceUpdate;\n }\n var isInitialRender = useRef(true);\n // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key\n var filteredChildren = onlyElements(children);\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 var presentChildren = useRef(filteredChildren);\n // A lookup table to quickly reference components by key\n var allChildren = useRef(new Map())\n .current;\n // A living record of all currently exiting components.\n var exiting = useRef(new Set()).current;\n updateChildLookup(filteredChildren, allChildren);\n // If this is the initial component render, just deal with logic surrounding whether\n // we play onMount animations or not.\n if (isInitialRender.current) {\n isInitialRender.current = false;\n return (React.createElement(React.Fragment, null, filteredChildren.map(function (child) { return (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout }, child)); })));\n }\n // If this is a subsequent render, deal with entering and exiting children\n var childrenToRender = __spreadArray([], __read(filteredChildren));\n // Diff the keys of the currently-present and target children to update our\n // exiting list.\n var presentKeys = presentChildren.current.map(getChildKey);\n var targetKeys = filteredChildren.map(getChildKey);\n // Diff the present children with our target children and mark those that are exiting\n var numPresent = presentKeys.length;\n for (var i = 0; i < numPresent; i++) {\n var key = presentKeys[i];\n if (targetKeys.indexOf(key) === -1) {\n exiting.add(key);\n }\n else {\n // In case this key has re-entered, remove from the exiting list\n exiting.delete(key);\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 (exitBeforeEnter && exiting.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 exiting.forEach(function (key) {\n // If this component is actually entering again, early return\n if (targetKeys.indexOf(key) !== -1)\n return;\n var child = allChildren.get(key);\n if (!child)\n return;\n var insertionIndex = presentKeys.indexOf(key);\n var onExit = function () {\n allChildren.delete(key);\n exiting.delete(key);\n // Remove this child from the present children\n var removeIndex = presentChildren.current.findIndex(function (presentChild) { return presentChild.key === key; });\n presentChildren.current.splice(removeIndex, 1);\n // Defer re-rendering until all exiting children have indeed left\n if (!exiting.size) {\n presentChildren.current = filteredChildren;\n forceRender();\n onExitComplete && onExitComplete();\n }\n };\n childrenToRender.splice(insertionIndex, 0, React.createElement(PresenceChild, { key: getChildKey(child), isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout }, child));\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(function (child) {\n var key = child.key;\n return exiting.has(key) ? (child) : (React.createElement(PresenceChild, { key: getChildKey(child), isPresent: true, presenceAffectsLayout: presenceAffectsLayout }, child));\n });\n presentChildren.current = childrenToRender;\n if (process.env.NODE_ENV !== \"production\" &&\n exitBeforeEnter &&\n childrenToRender.length > 1) {\n console.warn(\"You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour.\");\n }\n return (React.createElement(React.Fragment, null, exiting.size\n ? childrenToRender\n : childrenToRender.map(function (child) { return cloneElement(child); })));\n};\n\nexport { AnimatePresence };\n","import { __read } from 'tslib';\nimport { useCallback, useRef, useState } from 'react';\nimport { useUnmountEffect } from './use-unmount-effect.js';\n\nfunction useForceUpdate() {\n var unloadingRef = useRef(false);\n var _a = __read(useState(0), 2), forcedRenderCount = _a[0], setForcedRenderCount = _a[1];\n useUnmountEffect(function () { return (unloadingRef.current = true); });\n return useCallback(function () {\n !unloadingRef.current && setForcedRenderCount(forcedRenderCount + 1);\n }, [forcedRenderCount]);\n}\n\nexport { useForceUpdate };\n"],"sourceRoot":""}