{"version":3,"sources":["webpack:///./node_modules/framer-motion/dist/es/render/dom/projection/utils.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/AnimateSharedLayout/utils/batcher.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","webpack:///./node_modules/react-spinners/esm/helpers/unitConverter.js","webpack:///./node_modules/react-spinners/esm/helpers/animation.js","webpack:///./node_modules/react-spinners/esm/PuffLoader.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","SharedLayoutContext","FramerTreeLayoutContext","isSharedLayout","context","forceUpdate","unresolvedJobs","Set","pushJob","stack","job","pointer","batchLayout","callback","add","delete","flushLayout","size","reads","writes","setRead","setWrite","clear","numStacks","length","i","executeJob","defaultHandler","layoutReady","notifyLayoutReady","createBatcher","queue","flush","_a","_b","read","write","order","Array","from","element","resetTransform","restoreTransform","isPresent","presence","Present","preRender","render","postRender","assignProjectionToSnapshot","target","presenceId","getPresenceId","id","PresenceChild","initial","onExitComplete","custom","presenceAffectsLayout","presenceChildren","newChildrenMap","childId","set","allComplete","isComplete","register","undefined","_","key","PresenceContext","Provider","value","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","get","insertionIndex","splice","removeIndex","findIndex","presentChild","has","cssUnit","cm","mm","in","px","pt","pc","em","ex","ch","rem","vw","vh","vmin","vmax","cssValue","lengthWithunit","unit","valueString","match","toString","includes","parseFloat","parseInt","console","warn","concat","parseLengthAndUnit","createAnimation","loaderName","frames","suffix","animationName","window","document","styleEl","createElement","head","appendChild","styleSheet","sheet","keyFrames","insertRule","__assign","Object","assign","t","s","n","arguments","p","prototype","hasOwnProperty","call","apply","this","__rest","e","getOwnPropertySymbols","propertyIsEnumerable","puff","loading","color","_d","speedMultiplier","_e","cssOverride","_f","additionalprops","wrapper","display","position","width","height","style","border","borderRadius","opacity","top","left","animationFillMode","animation","animationDuration","animationIterationCount","animationTimingFunction","animationDelay"],"mappings":"uGAAA,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,yBAEl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AGhB,KAAMA,OAAc,IAAP2J,EAAgB,GAAKA,EAAIC,EAAkBZ,EAAOhI,EAAI,CAAC,UAAW,QAAS,kBAAmB,cAAe,SAC9W6I,EAAU1B,EAAS,CAAE2B,QAAS,UAAWC,SAAU,WAAYC,MAAOzD,EAASvG,GAAOiK,OAAQ1D,EAASvG,IAAS0J,GAChHQ,EAAQ,SAAU1J,GAClB,MAAO,CACHuJ,SAAU,WACVE,OAAQ1D,EAASvG,GACjBgK,MAAOzD,EAASvG,GAChBmK,OAAQ,eAAejD,OAAOoC,GAC9Bc,aAAc,MACdC,QAAS,IACTC,IAAK,IACLC,KAAM,IACNC,kBAAmB,OACnBC,UAAW,GAAGvD,OAAOkC,EAAK,GAAI,MAAMlC,OAAOkC,EAAK,IAChDsB,kBAAmB,GAAGxD,OAAO,EAAIsC,EAAiB,KAClDmB,wBAAyB,WACzBC,wBAAyB,wEACzBC,eAAsB,IAANrK,EAAU,MAAQ,OAG1C,OAAK6I,EAGG,gBAAoB,OAAQlB,EAAS,CAAE+B,MAAOL,GAAWD,GAC7D,gBAAoB,OAAQ,CAAEM,MAAOA,EAAM,KAC3C,gBAAoB,OAAQ,CAAEA,MAAOA,EAAM,MAJpC","file":"vendors~NewsDetail-f5d443111712d8cc4885.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","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 { __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 * 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","var cssUnit = {\n cm: true,\n mm: true,\n in: true,\n px: true,\n pt: true,\n pc: true,\n em: true,\n ex: true,\n ch: true,\n rem: true,\n vw: true,\n vh: true,\n vmin: true,\n vmax: true,\n \"%\": true,\n};\n/**\n * If size is a number, append px to the value as default unit.\n * If size is a string, validate against list of valid units.\n * If unit is valid, return size as is.\n * If unit is invalid, console warn issue, replace with px as the unit.\n *\n * @param {(number | string)} size\n * @return {LengthObject} LengthObject\n */\nexport function parseLengthAndUnit(size) {\n if (typeof size === \"number\") {\n return {\n value: size,\n unit: \"px\",\n };\n }\n var value;\n var valueString = (size.match(/^[0-9.]*/) || \"\").toString();\n if (valueString.includes(\".\")) {\n value = parseFloat(valueString);\n }\n else {\n value = parseInt(valueString, 10);\n }\n var unit = (size.match(/[^0-9]*$/) || \"\").toString();\n if (cssUnit[unit]) {\n return {\n value: value,\n unit: unit,\n };\n }\n console.warn(\"React Spinners: \".concat(size, \" is not a valid css value. Defaulting to \").concat(value, \"px.\"));\n return {\n value: value,\n unit: \"px\",\n };\n}\n/**\n * Take value as an input and return valid css value\n *\n * @param {(number | string)} value\n * @return {string} valid css value\n */\nexport function cssValue(value) {\n var lengthWithunit = parseLengthAndUnit(value);\n return \"\".concat(lengthWithunit.value).concat(lengthWithunit.unit);\n}\n","export var createAnimation = function (loaderName, frames, suffix) {\n var animationName = \"react-spinners-\".concat(loaderName, \"-\").concat(suffix);\n if (typeof window == \"undefined\" || !window.document) {\n return animationName;\n }\n var styleEl = document.createElement(\"style\");\n document.head.appendChild(styleEl);\n var styleSheet = styleEl.sheet;\n var keyFrames = \"\\n @keyframes \".concat(animationName, \" {\\n \").concat(frames, \"\\n }\\n \");\n if (styleSheet) {\n styleSheet.insertRule(keyFrames, 0);\n }\n return animationName;\n};\n","var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from \"react\";\nimport { cssValue } from \"./helpers/unitConverter\";\nimport { createAnimation } from \"./helpers/animation\";\nvar puff = [\n createAnimation(\"PuffLoader\", \"0% {transform: scale(0)} 100% {transform: scale(1.0)}\", \"puff-1\"),\n createAnimation(\"PuffLoader\", \"0% {opacity: 1} 100% {opacity: 0}\", \"puff-2\"),\n];\nfunction PuffLoader(_a) {\n var _b = _a.loading, loading = _b === void 0 ? true : _b, _c = _a.color, color = _c === void 0 ? \"#000000\" : _c, _d = _a.speedMultiplier, speedMultiplier = _d === void 0 ? 1 : _d, _e = _a.cssOverride, cssOverride = _e === void 0 ? {} : _e, _f = _a.size, size = _f === void 0 ? 60 : _f, additionalprops = __rest(_a, [\"loading\", \"color\", \"speedMultiplier\", \"cssOverride\", \"size\"]);\n var wrapper = __assign({ display: \"inherit\", position: \"relative\", width: cssValue(size), height: cssValue(size) }, cssOverride);\n var style = function (i) {\n return {\n position: \"absolute\",\n height: cssValue(size),\n width: cssValue(size),\n border: \"thick solid \".concat(color),\n borderRadius: \"50%\",\n opacity: \"1\",\n top: \"0\",\n left: \"0\",\n animationFillMode: \"both\",\n animation: \"\".concat(puff[0], \", \").concat(puff[1]),\n animationDuration: \"\".concat(2 / speedMultiplier, \"s\"),\n animationIterationCount: \"infinite\",\n animationTimingFunction: \"cubic-bezier(0.165, 0.84, 0.44, 1), cubic-bezier(0.3, 0.61, 0.355, 1)\",\n animationDelay: i === 1 ? \"-1s\" : \"0s\",\n };\n };\n if (!loading) {\n return null;\n }\n return (React.createElement(\"span\", __assign({ style: wrapper }, additionalprops),\n React.createElement(\"span\", { style: style(1) }),\n React.createElement(\"span\", { style: style(2) })));\n}\nexport default PuffLoader;\n"],"sourceRoot":""}