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B,IACID,GEEoB,GAE3B,MCPyBnB,KACzB,MAAMqB,EAAevF,OAAOkE,IAC5B,IAAAzF,YAAU,KACRmG,ECP8B,gBDOMW,GAC7B,KACLX,ECR8B,kBDQQW,MAEvC,CAACA,KDDJ,CAAmBrB,GACZmB,EAAkC,gBAAoBpB,EAAgB,CAC3EC,OAAQA,GACP5I,GAAY,O,gGGXNkK,EAAe,SAAUC,GAEhC,YADe,IAAXA,IAAqBA,EAAS,IAC3B,CACHvK,MAAO,EACPuK,OAAQA,EACRC,KAAK,WAGFC,EAAUH,IACVI,EAAS,gBAAoBJ,KAC7BK,EAAQ,SAAUD,GAAU,OAAOA,EAAO1K,SAC1C4K,EAAY,SAAUF,GAAU,OAAOA,EAASA,EAAOH,OAAS,K,mECHvEM,EAAc,WAOd,OAAO,YAfiBpF,EAeU,aAAiB,MAd/CqF,EAASrF,GAAW,KAKjB,CAAE+E,IAFLA,GAFS,QAAUM,IACd,QAAMA,GAGIC,IADT,SAAUC,GAAQ,OAAOR,EAAMM,EAAON,IAAIQ,OALtC,IAAUvF,EACpBqF,EAGAN,GAsBGS,EAAS,WAEhB,OADUJ,IAAc,GAAGL,KAiBpBU,EAAa,WAEpB,OADUL,IAAc,GAAGE","sources":["webpack:///./node_modules/@atlaskit/motion/dist/es2019/utils/use-force-render.js","webpack:///./node_modules/@atlaskit/motion/dist/es2019/entering/exiting-persistence.js","webpack:///./node_modules/@atlaskit/motion/dist/es2019/utils/timer-hooks.js","webpack:///./node_modules/@atlaskit/motion/dist/es2019/entering/staggered-entrance.js","webpack:///./node_modules/@atlaskit/motion/dist/es2019/entering/keyframes-motion.js","webpack:///./node_modules/@atlaskit/motion/dist/es2019/utils/use-unique-id.js","webpack:///./node_modules/@atlaskit/motion/dist/es2019/entering/fade-in.js","webpack:///./node_modules/@atlaskit/motion/dist/es2019/utils/accessibility.js","webpack:///./node_modules/@atlaskit/motion/dist/es2019/utils/curves.js","webpack:///./node_modules/@atlaskit/motion/dist/es2019/utils/durations.js","webpack:///./node_modules/@atlaskit/portal/dist/es2019/internal/constants.js","webpack:///./node_modules/@atlaskit/portal/dist/es2019/internal/utils/portal-dom-utils.js","webpack:///./node_modules/@atlaskit/portal/dist/es2019/internal/components/internal-portal.js","webpack:///./node_modules/@atlaskit/portal/dist/es2019/internal/hooks/use-is-subsequent-render.js","webpack:///./node_modules/@atlaskit/portal/dist/es2019/internal/utils/portal-custom-event.js","webpack:///./node_modules/@atlaskit/portal/dist/es2019/portal.js","webpack:///./node_modules/@atlaskit/portal/dist/es2019/internal/hooks/use-portal-event.js","webpack:///./node_modules/@atlaskit/portal/dist/es2019/constants.js","webpack:///./node_modules/react-uid/dist/es2015/context.js","webpack:///./node_modules/react-uid/dist/es2015/hooks.js"],"sourcesContent":["import { useCallback, useState } from 'react';\nexport const useForceRender = () => {\n const [, updateState] = useState({});\n const forceRender = useCallback(() => updateState({}), []);\n return forceRender;\n};","import React, { Children, createContext, memo, useContext, useMemo, useRef } from 'react';\nimport { isReducedMotion } from '../utils/accessibility';\nimport { useForceRender } from '../utils/use-force-render';\n/**\n * Internally we will be playing with an element that will always have a key defined.\n */\n\n// We define empty context here so the object doesn't change.\nconst emptyContext = {\n // Motions will always appear if not inside a exiting persistence component.\n appear: true,\n isExiting: false\n};\nconst ExitingContext = /*#__PURE__*/createContext(emptyContext);\n\nconst isAnyPreviousKeysMissingFromCurrent = (currentMap, previous) => {\n for (let i = 0; i < previous.length; i++) {\n const element = previous[i];\n const key = element.key;\n\n if (!currentMap[key]) {\n return true;\n }\n }\n\n return false;\n};\n/**\n * This method will wrap any React element with a context provider. We're using context (instead of\n * cloneElement) so we can communicate between multiple elements without the need of prop drilling\n * (results in a better API for consumers).\n */\n\n\nconst wrapChildWithContextProvider = (child, value = emptyContext) => {\n return /*#__PURE__*/React.createElement(ExitingContext.Provider, {\n key: `${child.key}-provider`,\n value: value\n }, child);\n};\n\nconst childrenToObj = children => {\n return children.reduce((acc, child) => {\n acc[child.key] = child;\n return acc;\n }, {});\n};\n\nconst spliceNewElementsIntoPrevious = (current, previous) => {\n const splicedChildren = previous.concat([]);\n const previousMap = childrenToObj(previous);\n\n for (let i = 0; i < current.length; i++) {\n const child = current[i];\n const childIsNew = !previousMap[child.key];\n\n if (childIsNew) {\n // This will insert the new element after the previous element.\n splicedChildren.splice(i + 1, 0, child);\n }\n }\n\n return splicedChildren;\n};\n/**\n * This function will convert all children types to an array while also filtering out non-valid React elements.\n */\n\n\nconst childrenToArray = children => {\n const childrenAsArray = []; // We convert children to an array using this helper method as it will add keys to children that do not\n // have them, such as when we have hardcoded children that are conditionally rendered.\n\n Children.toArray(children).forEach(child => {\n // We ignore any boolean children to make our code a little more simple later on,\n // and also filter out any falsies (empty strings, nulls, and undefined).\n if (typeof child !== 'boolean' && Boolean(child)) {\n // Children WILL have a key after being forced into an array using the React.Children helper.\n childrenAsArray.push(child);\n }\n });\n return childrenAsArray;\n};\n/**\n * This handles the case when a render updates during an exit motion.\n * If any child is mounted again we removed them from the exiting children object and return true.\n */\n\n\nconst hasAnyExitingChildMountedAgain = (exitingChildren, children) => {\n let exitingChildMountedAgain = false;\n children.forEach(child => {\n if (exitingChildren.current[child.key]) {\n exitingChildMountedAgain = true;\n delete exitingChildren.current[child.key];\n }\n });\n return exitingChildMountedAgain;\n};\n\nconst ExitingPersistence = /*#__PURE__*/memo(({\n appear: appearFromProp = false,\n children: childs,\n exitThenEnter\n}) => {\n const children = childrenToArray(childs);\n const childrenObj = childrenToObj(children);\n const previousChildren = useRef([]);\n const persistedChildren = useRef([]);\n const forceRender = useForceRender();\n const exitingChildren = useRef({});\n const appear = useRef(appearFromProp);\n const defaultContextValue = useMemo(() => ({\n appear: appear.current,\n isExiting: false\n }), // React rules of hooks says this isn't needed because mutating appear won't cause a re-render.\n // While technically true - it will trigger this to make a new object on the _next_ render which is what we want.\n // Remove this or use appear instead of appear.current and you will notice a test breaks.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [appear.current]);\n\n if (isReducedMotion()) {\n return children;\n }\n\n if (!appear.current) {\n // We always want child motions to appear after the initial mount.\n appear.current = true;\n } // This entire block can't be an effect because we need it to run synchronously during a render\n // else when elements are being removed they will be remounted instead of being updated.\n\n\n if (previousChildren.current.length && isAnyPreviousKeysMissingFromCurrent(childrenObj, previousChildren.current)) {\n if (persistedChildren.current.length === 0 || hasAnyExitingChildMountedAgain(exitingChildren, children)) {\n persistedChildren.current = previousChildren.current;\n } // We have persisted children now set from previous children.\n // Let's update previous children so we have it available next render.\n\n\n previousChildren.current = children;\n return (exitThenEnter ? persistedChildren.current : spliceNewElementsIntoPrevious(children, persistedChildren.current)).map(child => {\n const currentChild = childrenObj[child.key];\n\n if (!currentChild) {\n // We've found an exiting child - mark it!\n exitingChildren.current[child.key] = true;\n return wrapChildWithContextProvider(child, {\n isExiting: true,\n appear: true,\n onFinish: () => {\n delete exitingChildren.current[child.key]; // We will only remove the exiting elements when any subsequent exiting elements have also finished.\n // Think of removing many items from a todo list - when removing a few over a few clicks we don't\n // want the list jumping around when they exit.\n\n if (Object.keys(exitingChildren.current).length === 0) {\n // Set previous children to nothing.\n // This let's us skip the next render check as it's assumed children and previous will be the same.\n previousChildren.current = [];\n persistedChildren.current = []; // Re-render after the element(s) have animated away which will end up rendering the latest children.\n\n forceRender();\n }\n }\n });\n } // This element isn't exiting.\n // Wrap context and let's continue on our way.\n\n\n return wrapChildWithContextProvider(currentChild, defaultContextValue);\n });\n } else {\n previousChildren.current = children;\n }\n\n return children.map(child => wrapChildWithContextProvider(child, defaultContextValue));\n});\nexport const useExitingPersistence = () => {\n return useContext(ExitingContext);\n};\nExitingPersistence.displayName = 'ExitingPersistence';\nexport default ExitingPersistence;","import { useCallback, useEffect, useRef } from 'react';\n\nconst getHookDeps = opts => {\n switch (opts.cleanup) {\n case 'next-effect':\n return undefined;\n\n case 'unmount':\n default:\n return [];\n }\n};\n/**\n * Will return request animation frame as a function which will clean itself up.\n */\n\n\nexport const useRequestAnimationFrame = (opts = {\n cleanup: 'unmount'\n}) => {\n const frames = useRef([]);\n useEffect(() => {\n return () => {\n if (frames.current.length) {\n frames.current.forEach(id => cancelAnimationFrame(id));\n frames.current = [];\n }\n }; // We dynamically set this so we either clean up on the next effect - or on unmount.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, getHookDeps(opts));\n return useCallback(handler => {\n const id = requestAnimationFrame(time => {\n frames.current = frames.current.filter(frameId => frameId !== id);\n handler(time);\n });\n frames.current.push(id);\n }, []);\n};\n/**\n * Will return set timeout as a function which will clean itself up.\n */\n\nexport const useSetTimeout = (opts = {\n cleanup: 'unmount'\n}) => {\n const timeouts = useRef([]);\n useEffect(() => {\n return () => {\n if (timeouts.current.length) {\n timeouts.current.forEach(id => clearTimeout(id));\n timeouts.current = [];\n }\n }; // We dynamically set this so we either clean up on the next effect - or on unmount.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, getHookDeps(opts));\n return useCallback((handler, timeout, ...args) => {\n const id = setTimeout(() => {\n timeouts.current = timeouts.current.filter(timeoutId => timeoutId !== id);\n handler();\n }, timeout, ...args);\n timeouts.current.push(id);\n }, []);\n};","import React, { createContext, useContext, useRef, useState } from 'react';\nimport { useLayoutEffect } from '../utils/use-layout-effect';\nimport { useUniqueId } from '../utils/use-unique-id';\nconst StaggeredEntranceContext = /*#__PURE__*/createContext(() => ({\n isReady: true,\n delay: 0,\n ref: () => {}\n}));\nexport const useStaggeredEntrance = () => {\n const indentifier = useUniqueId();\n const context = useContext(StaggeredEntranceContext);\n return context(indentifier);\n};\n/**\n * For a list of elements that need to animate in,\n * this should be used in conjunction with entering components.\n * This does not need Javascript to execute so it will run immediately for any SSR rendered React apps before the JS has executed.\n *\n * Will dynamically add delay to each child entering component.\n * Unfortunately all entering components _NEED_ to be a direct descendant.\n */\n\nconst StaggeredEntrance = ({\n children,\n column,\n columns = 'responsive',\n delayStep = 50\n}) => {\n const elementRefs = useRef([]);\n const indexes = [];\n const [actualColumns, setActualColumns] = useState(() => {\n if (typeof columns === 'number') {\n // A hardcoded columns is set so bail out and set it to that!\n return columns;\n }\n\n if (typeof column === 'number') {\n // A hardcoded column is set so we will set actualColumns to be 1.\n return 1;\n } // We are in \"responsive\" mode.\n // So we will be calculating when the Javascript executes on the client how many columns there will be.\n\n\n return 0;\n });\n useLayoutEffect(() => {\n // We want to only run this code when we are in \"responsive\" mode.\n // It is assumed we are in responsive mode if `columns` is \"responsive\",\n // we have children element refs ready to be read (i.e. if there are no children this won't run as well)\n // and finally that `actualColumns` is `0` - this is because for the first render cycle `actualColumns` will be `0` (set above)\n // and then after this layout effect runs the value for `actualColumns` will then be calculated and set.\n if (columns === 'responsive' && elementRefs.current.length && actualColumns === 0) {\n let currentTop = 0;\n let numberColumns = 0;\n\n if (elementRefs.current.length <= 1) {\n setActualColumns(1);\n return;\n } // We set the current top to the first elements.\n // We will be comparing this and incrementing the column count\n // until we hit an element that has a different offset top (or we run out of elements).\n\n\n currentTop = elementRefs.current[0] ? elementRefs.current[0].offsetTop : 0;\n\n for (let i = 0; i < elementRefs.current.length; i++) {\n const child = elementRefs.current[i];\n\n if (!child) {\n break;\n }\n\n if (currentTop === child.offsetTop) {\n numberColumns += 1;\n\n if (elementRefs.current.length - 1 === i) {\n setActualColumns(numberColumns);\n }\n\n continue;\n }\n\n setActualColumns(numberColumns);\n break;\n }\n } // We only want this effect to run once - on initial mount.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, []);\n return /*#__PURE__*/React.createElement(StaggeredEntranceContext.Provider, {\n value: id => {\n if (!indexes.includes(id)) {\n indexes.push(id);\n }\n\n const isReady = actualColumns > 0;\n const index = indexes.indexOf(id);\n const currentColumn = column || index % actualColumns;\n const currentRow = Math.floor(index / actualColumns);\n const distanceFromTopLeftElement = currentRow + currentColumn; // We don't want loads of elements to have the same staggered delay as it ends up looking slow for users.\n // To get around that we calculate the logarithm using `distanceFromTopLeftElement` which ends making\n // elements appear faster the further away from the top left element.\n\n const delay = Math.ceil(Math.log(distanceFromTopLeftElement + 1) * delayStep * 1.5) || 0;\n return {\n delay,\n isReady,\n ref: element => elementRefs.current[index] = element\n };\n }\n }, children);\n};\n\nexport default StaggeredEntrance;","import React, { useEffect, useState } from 'react';\nimport { ClassNames, keyframes } from '@emotion/core';\nimport { prefersReducedMotion } from '../utils/accessibility';\nimport { largeDurationMs } from '../utils/durations';\nimport { useSetTimeout } from '../utils/timer-hooks';\nimport { useExitingPersistence } from './exiting-persistence';\nimport { useStaggeredEntrance } from './staggered-entrance';\n\n/**\n * Used to multiply the initial duration for exiting motions.\n */\nconst EXITING_MOTION_MULTIPLIER = 0.5;\n/**\n * This is the base INTERNAL component used for all other entering motions.\n * This does not need Javascript to execute on the client so it will run immediately\n * for any SSR rendered React apps before the JS has executed.\n */\n\nconst EnteringMotion = ({\n children,\n animationTimingFunction,\n enteringAnimation,\n exitingAnimation,\n isPaused,\n onFinish: onFinishMotion,\n duration = largeDurationMs\n}) => {\n const staggered = useStaggeredEntrance();\n const {\n isExiting,\n onFinish: onExitFinished,\n appear\n } = useExitingPersistence();\n const setTimeout = useSetTimeout();\n const paused = isPaused || !staggered.isReady;\n const delay = isExiting ? 0 : staggered.delay;\n const state = isExiting ? 'exiting' : 'entering';\n const [hasAnimationStyles, setHasAnimationStyles] = useState(appear);\n useEffect(() => {\n // Tracking this to prevent changing state on an unmounted component\n let isCancelled = false;\n\n if (paused) {\n return;\n } // On initial mount if elements aren't set to animate on appear, we return early and callback\n\n\n if (!appear) {\n onFinishMotion && onFinishMotion(state);\n return;\n } // Elements may need animation styles back after initial mount (they could animate out)\n\n\n setHasAnimationStyles(true);\n setTimeout(() => {\n if (state === 'exiting') {\n onExitFinished && onExitFinished();\n }\n\n if (!isCancelled) {\n setHasAnimationStyles(false);\n }\n\n onFinishMotion && onFinishMotion(state);\n }, isExiting ? duration * EXITING_MOTION_MULTIPLIER : duration + delay);\n return () => {\n isCancelled = true;\n }; // We ignore this for onFinishMotion as consumers could potentially inline the function\n // which would then trigger this effect every re-render.\n // We want to make it easier for consumers so we go down this path unfortunately.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [onExitFinished, state, isExiting, duration, delay, paused, setTimeout]);\n return /*#__PURE__*/React.createElement(ClassNames, null, ({\n css\n }) => children({\n ref: staggered.ref,\n className: hasAnimationStyles ? css({\n animationName: `${keyframes(isExiting ? exitingAnimation || enteringAnimation : enteringAnimation)}`,\n animationTimingFunction: animationTimingFunction(state),\n animationDelay: `${delay}ms`,\n animationFillMode: isExiting ? 'forwards' : 'backwards',\n animationDuration: `${isExiting ? duration * EXITING_MOTION_MULTIPLIER : duration}ms`,\n animationPlayState: paused ? 'paused' : 'running',\n ...prefersReducedMotion()\n }) : ''\n }, state));\n};\n\nexport default EnteringMotion;","import { useRef } from 'react';\n/**\n * Will return a unique id that does not change between renders.\n * Try not use this to render DOM markup (attributes or otherwise)\n * as you will probably not get the same result on the Server vs. Client.\n */\n\nexport function useUniqueId() {\n const identifier = useRef('');\n\n if (!identifier.current) {\n identifier.current = '_' + (Number(String(Math.random()).slice(2)) + Date.now() + Math.round(performance.now())).toString(36);\n }\n\n return identifier.current;\n}","import _extends from \"@babel/runtime/helpers/extends\";\nimport React from 'react';\nimport { easeInOut } from '../utils/curves';\nimport { largeDurationMs } from '../utils/durations';\nimport KeyframesMotion from './keyframes-motion';\nconst entranceMotions = {\n bottom: 'translate3d(0, calc(5% + 4px), 0)',\n left: 'translate3d(calc(-5% - 4px), 0, 0)',\n right: 'translate3d(calc(5% + 4px), 0, 0)',\n top: 'translate3d(0, calc(-5% - 4px), 0)'\n};\nconst exitMotions = {\n bottom: 'translate3d(0, calc(-5% - 4px), 0)',\n left: 'translate3d(calc(5% + 4px), 0, 0)',\n right: 'translate3d(calc(-5% - 4px), 0, 0)',\n top: 'translate3d(0, calc(5% + 4px), 0)'\n};\nexport const fadeInAnimation = movement => {\n return {\n from: {\n opacity: 0,\n ...(movement !== undefined && {\n transform: entranceMotions[movement]\n })\n },\n '50%': {\n opacity: 1\n },\n to: {\n transform: movement !== undefined ? 'none' : undefined\n }\n };\n};\nexport const fadeOutAnimation = movement => ({\n from: {\n opacity: 1,\n transform: movement !== undefined ? 'translate3d(0, 0, 0)' : undefined\n },\n to: {\n opacity: 0,\n ...(movement !== undefined && {\n transform: exitMotions[movement]\n })\n }\n});\n/**\n * Props for controlling the behaviour of the FadeIn animation\n */\n\nconst FadeIn = ({\n children,\n duration = largeDurationMs,\n entranceDirection: entranceSlideDirection,\n ...props\n}) => {\n return /*#__PURE__*/React.createElement(KeyframesMotion, _extends({\n duration: duration,\n enteringAnimation: fadeInAnimation(entranceSlideDirection),\n exitingAnimation: fadeOutAnimation(entranceSlideDirection),\n animationTimingFunction: () => easeInOut\n }, props), children);\n};\n\nexport default FadeIn;","import { useEffect, useState } from 'react';\nimport { bind } from 'bind-event-listener';\n\nconst isMatchMediaAvailable = () => typeof window !== 'undefined' && 'matchMedia' in window;\n/**\n * Use for any programatic motions needed at runtime.\n * Will return `true` if the current user prefers reduced motion.\n * This is generally set through OS preferences/settings.\n */\n\n\nexport const isReducedMotion = () => {\n if (!isMatchMediaAvailable()) {\n return false;\n }\n\n const {\n matches\n } = window.matchMedia('(prefers-reduced-motion: reduce)');\n return matches;\n};\n/**\n * A React hook version of {@link isReducedMotion}.\n * Useful for React components that need to re-render if the user's motion\n * preference changes at runtime.\n */\n\nexport const useIsReducedMotion = () => {\n const [prefersReducedMotion, setPrefersReducedMotion] = useState(isReducedMotion);\n useEffect(() => {\n if (!isMatchMediaAvailable()) {\n return;\n }\n\n const mediaQueryList = window.matchMedia('(prefers-reduced-motion: reduce)');\n\n const onChange = event => setPrefersReducedMotion(event.matches);\n\n return bind(mediaQueryList, {\n type: 'change',\n listener: onChange\n });\n }, []);\n return prefersReducedMotion;\n};\n/**\n * Use for any CSS based motion (animation or transition).\n * Always put at the end of your declaration for correct use of the cascade.\n * Reduced motion preference is generally set through OS preferences/settings.\n */\n\nexport const prefersReducedMotion = () => ({\n '@media (prefers-reduced-motion: reduce)': {\n animation: 'none',\n transition: 'none'\n }\n});","export const easeInOut = 'cubic-bezier(0.15,1,0.3,1)';\nexport const easeOut = 'cubic-bezier(0.2,0,0,1)';\nexport const easeIn = 'cubic-bezier(0.8,0,0,0.8)';","/**\n * Think of this as the motion equivalent of the @atlaskit/theme `grid()`.\n */\nexport const durationStep = 25;\nexport const smallDurationMs = durationStep * 4;\nexport const mediumDurationMs = durationStep * 14;\nexport const largeDurationMs = durationStep * 28;","export const portalParentClassName = 'atlaskit-portal-container';\nexport const portalParentSelector = 'body > .atlaskit-portal-container';\nexport const portalClassName = 'atlaskit-portal';","import { portalClassName, portalParentClassName, portalParentSelector } from '../constants';\n/**\n * Creates a new portal container element with provided z-index and class name 'atlaskit-portal',\n * it is not be attached to any DOM node at this stage.\n * @param {number | string} zIndex - the z-index value of the newly created portal container element\n * @return {number} - The newly created container element\n */\n\nexport const createContainer = zIndex => {\n const container = document.createElement('div');\n container.className = portalClassName;\n container.style.zIndex = `${zIndex}`;\n return container;\n};\n/**\n * Returns document body element\n * @return {number} - The document body element\n */\n\nconst getBody = () => {\n return document.body;\n};\n/**\n * Returns portal parent container. If no container exists already then it creates a new container with class name 'atlaskit-portal-container'\n * @return {Element} - The portal parent container div element\n */\n\n\nconst getPortalParent = () => {\n const parentElement = document.querySelector(portalParentSelector);\n\n if (!parentElement) {\n const parent = document.createElement('div');\n parent.className = portalParentClassName; // we are setting display to flex because we want each portal to create a new stacking context\n // See https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context\n\n parent.style.display = 'flex';\n getBody().appendChild(parent);\n return parent;\n }\n\n return parentElement;\n};\n/**\n * Removes portal container from portal parent container\n * @param {HTMLDivElement | undefined} container - portal container to be removed from portal parent container\n */\n\n\nexport const removePortalContainer = container => {\n getPortalParent().removeChild(container);\n};\n/**\n * Appends portal container to portal parent container if it hasn't already been done\n * @param {HTMLDivElement | undefined} container - portal container to be added to portal parent container\n */\n\nexport const appendPortalContainerIfNotAppended = container => {\n if (!container.parentElement) {\n getPortalParent().appendChild(container);\n }\n};","import { useEffect, useMemo } from 'react';\nimport { createPortal } from 'react-dom';\nimport { appendPortalContainerIfNotAppended, createContainer, removePortalContainer } from '../utils/portal-dom-utils';\nexport default function InternalPortal(props) {\n const {\n zIndex,\n children\n } = props;\n const container = useMemo(() => createContainer(zIndex), [zIndex]); // This is in the render method instead of useEffect so that\n // the portal will be added to the DOM before the children render.\n // For any further changes, ensure that the container does not have a\n // parent besides the portal parent.\n\n appendPortalContainerIfNotAppended(container);\n useEffect(() => {\n return () => {\n removePortalContainer(container);\n };\n }, [container]);\n return /*#__PURE__*/createPortal(children, container);\n}","import { useEffect, useState } from 'react';\n\nconst useIsSubsequentRender = () => {\n const [isSubsequentRender, setIsSubsequentRender] = useState(false);\n useEffect(() => {\n setIsSubsequentRender(true);\n }, []);\n return isSubsequentRender;\n};\n\nexport default useIsSubsequentRender;","const zIndexToName = {\n 100: 'card',\n 200: 'navigation',\n 300: 'dialog',\n 400: 'layer',\n 500: 'blanket',\n 510: 'modal',\n 600: 'flag',\n 700: 'spotlight',\n 800: 'tooltip'\n};\n/**\n * return layer name in Atlassian design system corresponding to given z-index\n * @param {number} zIndex - z-index value for which layer name is needed\n * @returns {LayerName | null} - The layer name for given z-index. If layer name is not found then null is returned\n */\n\nconst getLayerName = zIndex => {\n return zIndexToName.hasOwnProperty(zIndex) ? zIndexToName[zIndex] : null;\n};\n/**\n * Creates a PortalEvent object with given eventName, given zIndex and corresponding layer\n * @param {string} eventName - either of Mount or Unmount event name\n * @param {number} zIndex - z-index value which will be included in the event to be dispatched\n * @returns {PortalEvent} - The newly created PortalEvent object\n */\n\n\nconst getEvent = (eventName, zIndex) => {\n const detail = {\n layer: getLayerName(Number(zIndex)),\n zIndex\n };\n return new CustomEvent(eventName, {\n detail\n });\n};\n/**\n * Dispatches a custom event on window with given eventName, given zIndex and corresponding layer\n * @param {string} eventName - either of Mount or Unmount event name\n * @param {number} zIndex - z-index value which will be included in the event to be dispatched\n */\n\n\nexport default function firePortalEvent(eventName, zIndex) {\n const event = getEvent(eventName, zIndex);\n window.dispatchEvent(event);\n}","import React from 'react';\nimport InternalPortal from './internal/components/internal-portal';\nimport useIsSubsequentRender from './internal/hooks/use-is-subsequent-render';\nimport useFirePortalEvent from './internal/hooks/use-portal-event';\nexport default function Portal(props) {\n const {\n zIndex = 0,\n children\n } = props;\n const isSubsequentRender = useIsSubsequentRender();\n useFirePortalEvent(zIndex);\n return isSubsequentRender ? /*#__PURE__*/React.createElement(InternalPortal, {\n zIndex: zIndex\n }, children) : null;\n}","import { useEffect } from 'react';\nimport { PORTAL_MOUNT_EVENT, PORTAL_UNMOUNT_EVENT } from '../../constants';\nimport firePortalEvent from '../utils/portal-custom-event';\n\nconst useFirePortalEvent = zIndex => {\n const zIndexNumber = Number(zIndex);\n useEffect(() => {\n firePortalEvent(PORTAL_MOUNT_EVENT, zIndexNumber);\n return () => {\n firePortalEvent(PORTAL_UNMOUNT_EVENT, zIndexNumber);\n };\n }, [zIndexNumber]);\n};\n\nexport default useFirePortalEvent;","export const PORTAL_MOUNT_EVENT = 'akPortalMount';\nexport const PORTAL_UNMOUNT_EVENT = 'akPortalUnmount';","import * as React from 'react';\nimport { generateUID } from \"./uid\";\nexport var createSource = function (prefix) {\n if (prefix === void 0) { prefix = ''; }\n return ({\n value: 1,\n prefix: prefix,\n uid: generateUID()\n });\n};\nexport var counter = createSource();\nexport var source = React.createContext(createSource());\nexport var getId = function (source) { return source.value++; };\nexport var getPrefix = function (source) { return source ? source.prefix : ''; };\n","import * as React from \"react\";\nimport { counter, getId, getPrefix, source } from \"./context\";\nvar generateUID = function (context) {\n var quartz = context || counter;\n var prefix = getPrefix(quartz);\n var id = getId(quartz);\n var uid = prefix + id;\n var gen = function (item) { return uid + quartz.uid(item); };\n return { uid: uid, gen: gen };\n};\nvar useUIDState = function () {\n if (process.env.NODE_ENV !== \"production\") {\n if (!('useContext' in React)) {\n throw new Error('Hooks API requires React 16.8+');\n }\n }\n // @ts-ignore\n return React.useState(generateUID(React.useContext(source)));\n};\n/**\n * returns and unique id. SSR friendly\n * returns {String}\n * @see {@link UIDConsumer}\n * @see https://github.com/thearnica/react-uid#hooks-168\n * @example\n * const id = useUID();\n * id == 1; // for example\n */\nexport var useUID = function () {\n var uid = useUIDState()[0].uid;\n return uid;\n};\n/**\n * returns an uid generator\n * @see {@link UIDConsumer}\n * @see https://github.com/thearnica/react-uid#hooks-168\n * @example\n * const uid = useUIDSeed();\n * return (\n * <>\n * \n * \n * {data.map(item =>
...
\n * \n * )\n */\nexport var useUIDSeed = function () {\n var gen = useUIDState()[0].gen;\n return gen;\n};\n"],"names":["emptyContext","appear","isExiting","ExitingContext","createContext","wrapChildWithContextProvider","child","value","Provider","key","childrenToObj","children","reduce","acc","ExitingPersistence","memo","appearFromProp","childs","exitThenEnter","childrenAsArray","Children","forEach","Boolean","push","childrenToArray","childrenObj","previousChildren","useRef","persistedChildren","forceRender","updateState","useState","useCallback","useForceRender","exitingChildren","defaultContextValue","useMemo","current","length","currentMap","previous","i","isAnyPreviousKeysMissingFromCurrent","exitingChildMountedAgain","hasAnyExitingChildMountedAgain","splicedChildren","concat","previousMap","splice","spliceNewElementsIntoPrevious","map","currentChild","onFinish","Object","keys","useExitingPersistence","useContext","displayName","useSetTimeout","opts","cleanup","timeouts","useEffect","id","clearTimeout","getHookDeps","handler","timeout","args","setTimeout","filter","timeoutId","StaggeredEntranceContext","isReady","delay","ref","animationTimingFunction","enteringAnimation","exitingAnimation","isPaused","onFinishMotion","duration","staggered","indentifier","identifier","Number","String","Math","random","slice","Date","now","round","performance","toString","useUniqueId","context","useStaggeredEntrance","onExitFinished","paused","state","hasAnimationStyles","setHasAnimationStyles","isCancelled","ClassNames","css","className","animationName","keyframes","animationDelay","animationFillMode","animationDuration","animationPlayState","entranceMotions","bottom","left","right","top","exitMotions","fadeOutAnimation","movement","from","opacity","transform","undefined","to","entranceDirection","entranceSlideDirection","props","isReducedMotion","window","matches","matchMedia","prefersReducedMotion","animation","transition","easeInOut","mediumDurationMs","durationStep","largeDurationMs","getPortalParent","parentElement","document","querySelector","parent","createElement","style","display","body","appendChild","InternalPortal","zIndex","container","createContainer","appendPortalContainerIfNotAppended","removeChild","removePortalContainer","createPortal","zIndexToName","getLayerName","hasOwnProperty","firePortalEvent","eventName","event","detail","layer","CustomEvent","getEvent","dispatchEvent","Portal","isSubsequentRender","setIsSubsequentRender","zIndexNumber","createSource","prefix","uid","counter","source","getId","getPrefix","useUIDState","quartz","gen","item","useUID","useUIDSeed"],"sourceRoot":""}