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ACzBA,IAAAA,OACAA,IAAAA,OACAA,IAAAA,UACC8G,WACH+D,MAAO7K,IAAAA,OAAAA,WACPgB,KAAMhB,IAAAA,MAAgBuP,EAAKO,OAC3BN,iBAAkBxP,IAAAA,OAClByP,eAAgBzP,IAAAA,OAChB0P,eAAgB1P,IAAAA,OAChB2P,gBAAiB3P,IAAAA,MAGnBuP,EAAK1P,aAAe,CAClBmB,KAAM,KACNwO,iBAAkB,KAClBC,eAAgB,KAChBC,eAAgB,KAChBC,iBAAiB,GAGnB,S,wFC5DA,EAA4B,0BCI5B,MAAMI,EAAS3Q,IACb,MAAM,SAAEmC,EAAF,cAAYyO,GAAkB5Q,EAEpC,OACEN,EAAAA,cAAAA,KAAAA,CAAIoC,UAAY,GAAEI,KAAoB0O,GAAiB,MACpDlR,EAAAA,SAAAA,IACCyC,GACC0O,GAAWA,GAASnR,EAAAA,cAAAA,KAAAA,CAAI6L,IAAKsF,EAAMpF,OAAQoF,IAAgB,OAMpEF,EAAMhQ,UAAY,CAChBwB,SAAUvB,IAAAA,KAAAA,WACVgQ,cAAehQ,IAAAA,QAGjB+P,EAAMlQ,aAAe,CACnBmQ,cAAe,MAGjB,S","sources":["webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/react-hooks/src/use-safe-state/useSafeState.hook.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/icons/dist/NavigationProfileHighlightedMedium.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/icons/dist/BadgesMulticolorSuperuserSmall.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/icons/dist/BadgesMulticolorSummitSmall.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/icons/dist/BadgesMulticolorProSmall.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/@strava/icons/dist/BadgesMulticolorVerifiedSmall.js","webpack://StravaModern/./node_modules/@strava/ui/Avatar/Avatar.module.scss?3ebc","webpack://StravaModern/./node_modules/@strava/ui/Avatar/Avatar.tsx","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/now.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/_trimmedEndIndex.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/_baseTrim.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/toNumber.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/debounce.js","webpack://StravaModern/./node_modules/@strava/ui/node_modules/lodash-es/throttle.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/area.module.scss?1347","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Area.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/axis.module.scss?8da9","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Axis.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Tooltip/styles.module.scss?cba6","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/Tooltip/index.js","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/styles.module.scss?3232","webpack://StravaModern/./node_modules/@strava/ui/ElevationChart/index.js","webpack://StravaModern/./node_modules/@strava/ui/Stat/styles.module.scss?8842","webpack://StravaModern/./node_modules/@strava/ui/Stat/index.js","webpack://StravaModern/./node_modules/@strava/ui/Stats/styles.module.scss?4754","webpack://StravaModern/./node_modules/@strava/ui/Stats/index.js"],"sourcesContent":["import { useRef, useCallback, useEffect, useState } from 'react';\n\n/**\n * The `useSafeState` hook acts the same as React's `useState`,\n * where we can set the initial state, and it returns (1) the current state,\n * and (2) the state setter.\n *\n * But with `useSafeState`, it will only set the state when the component is mounted\n * in order to prevent memory leaks and avoid this warning:\n * \"Warning: Can’t perform a React state update on an unmounted component.\"\n * When a component is unmounted, we don't want to set the state.\n *\n * This helps when we have async behavior where we call an async API call,\n * then based on the async response, we set the state. But if the component\n * unmounts before the API call resolves, we don't want to set the state.\n * */\nexport const useSafeState = (initialState) => {\n const mountedRef = useRef(false);\n const [state, setState] = useState(initialState);\n\n useEffect(() => {\n mountedRef.current = true;\n return () => {\n mountedRef.current = false;\n };\n }, []);\n\n const setSafeState = useCallback(\n (args) => (mountedRef.current ? setState(args) : () => {}),\n []\n );\n\n return [state, setSafeState];\n};\n\nexport default useSafeState;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgNavigationProfileHighlightedMedium = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n )\n);\nSvgNavigationProfileHighlightedMedium.defaultProps = {\n color: \"currentColor\",\n size: 32,\n title: undefined,\n titleId: undefined,\n};\nSvgNavigationProfileHighlightedMedium.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgNavigationProfileHighlightedMedium;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgBadgesMulticolorSuperuserSmall = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n \n \n \n \n )\n);\nSvgBadgesMulticolorSuperuserSmall.defaultProps = {\n color: \"currentColor\",\n size: 24,\n title: undefined,\n titleId: undefined,\n};\nSvgBadgesMulticolorSuperuserSmall.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgBadgesMulticolorSuperuserSmall;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgBadgesMulticolorSummitSmall = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n \n \n \n \n )\n);\nSvgBadgesMulticolorSummitSmall.defaultProps = {\n color: \"currentColor\",\n size: 24,\n title: undefined,\n titleId: undefined,\n};\nSvgBadgesMulticolorSummitSmall.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgBadgesMulticolorSummitSmall;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgBadgesMulticolorProSmall = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n \n \n \n \n )\n);\nSvgBadgesMulticolorProSmall.defaultProps = {\n color: \"currentColor\",\n size: 24,\n title: undefined,\n titleId: undefined,\n};\nSvgBadgesMulticolorProSmall.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgBadgesMulticolorProSmall;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgBadgesMulticolorVerifiedSmall = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n \n \n \n )\n);\nSvgBadgesMulticolorVerifiedSmall.defaultProps = {\n color: \"currentColor\",\n size: 24,\n title: undefined,\n titleId: undefined,\n};\nSvgBadgesMulticolorVerifiedSmall.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgBadgesMulticolorVerifiedSmall;\n","// extracted by mini-css-extract-plugin\nexport default {\"avatar\":\"Avatar--avatar--EjA+i\",\"imgWrapper\":\"Avatar--imgWrapper--no4rK\",\"badge\":\"Avatar--badge--AGhgx\",\"athlete\":\"Avatar--athlete--swByo\",\"xsmall\":\"Avatar--xsmall--ooxrp\",\"small\":\"Avatar--small--d-InS\",\"large\":\"Avatar--large--yUfy1\",\"xlarge\":\"Avatar--xlarge--Yt5UL\",\"club\":\"Avatar--club--HMeLa\",\"default\":\"Avatar--default--cRgUh\"};","import React, { ComponentPropsWithoutRef } from 'react';\nimport { useSafeState } from '@strava/react-hooks/src/use-safe-state';\nimport AvatarFallback from '@strava/icons/NavigationProfileHighlightedMedium';\nimport EmployeeBadge from '@strava/icons/BadgesMulticolorSuperuserSmall';\nimport SubscriberBadge from '@strava/icons/BadgesMulticolorSummitSmall';\nimport ProBadge from '@strava/icons/BadgesMulticolorProSmall';\nimport VerifiedBadge from '@strava/icons/BadgesMulticolorVerifiedSmall';\nimport clsx from '../clsx';\n\nimport styles from './Avatar.module.scss';\n\ninterface ImgProps {\n src: string;\n alt: string;\n title: string;\n fallback?: React.ReactNode;\n}\n\nconst Img = ({ src, alt, title, fallback = null }: ImgProps) => {\n const [error, setError] = useSafeState(false);\n\n const handleError = () => {\n setError(true);\n };\n\n return error ? (\n <>{fallback}\n ) : (\n {alt}\n );\n};\n\nfunction getBadge(badge: string) {\n switch (badge) {\n case 'ambassador':\n return ;\n case 'employee':\n return ;\n case 'subscriber':\n case 'premium':\n return ;\n case 'pro':\n return ;\n case 'verified':\n return ;\n default:\n return null;\n }\n}\n\nexport type AvatarType = 'athlete' | 'club';\nexport type AvatarSize = 'xsmall' | 'small' | 'default' | 'large' | 'xlarge';\nexport type AvatarBadge =\n | '' // in some cases active has member_type as empty string for default users\n | 'ambassador'\n | 'employee'\n | 'subscriber'\n | 'premium' // legacy name referring to 'subscriber', used in active\n | 'pro'\n | 'verified';\n\ninterface BaseAvatarProps {\n src: string;\n type: AvatarType;\n name?: string;\n alt?: string;\n title?: string;\n size?: AvatarSize;\n badge?: AvatarBadge;\n className?: string;\n}\n\ntype AnchorProps = React.ComponentPropsWithoutRef<'a'> & {\n href?: string;\n};\ntype DivProps = React.ComponentPropsWithoutRef<'div'> & {\n href?: never;\n};\n\n// Guard to check if href exists in props\nconst hasHref = (props: AnchorProps | DivProps): props is AnchorProps =>\n 'href' in props;\n\ntype AvatarProps = BaseAvatarProps & (AnchorProps | DivProps);\n\n/**\n * Prop Deprecation Warning: We are slowly deprecating the `name` prop in favor of the `title` prop\n * so that the React props match up to the element's attribute.\n * */\nconst Avatar = ({\n name = '',\n alt = '',\n title,\n type,\n src,\n size,\n badge,\n className,\n ...otherProps\n}: AvatarProps) => {\n const classNames = clsx([\n styles.avatar,\n styles[type],\n className,\n size && styles[size]\n ]);\n\n // TODO: uncomment when existing Avatar usage is refactored. Otherwise, there will be a lot of warning in the console.\n // if (name || process.env.NODE_ENV !== 'production') {\n // console.warn(\n // '[Prop Deprecation Warning] Deprecating the `name` prop in favor of the `title`.'\n // );\n // }\n\n const children = (\n <>\n {badge &&
{getBadge(badge)}
}\n
\n : null}\n />\n
\n \n );\n\n if (hasHref(otherProps)) {\n return (\n \n {children}\n \n );\n }\n\n return (\n \n {children}\n \n );\n};\n\nexport default Avatar;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","import debounce from './debounce.js';\nimport isObject from './isObject.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nexport default throttle;\n","// extracted by mini-css-extract-plugin\nexport default {\"area\":\"ElevationChart--area--rQlaC\"};","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { area } from 'd3-shape';\nimport styles from './area.module.scss';\n\nconst Area = ({ stream, xScale, yScale, height, clipPath, fill }) => {\n const formatData = stream.convertedElevation.map((elev, index) => ({\n elev,\n dist: stream.convertedDistance[index]\n }));\n\n const drawArea = area()\n .x((d) => xScale(d.dist))\n .y1((d) => yScale(d.elev))\n .y0(height);\n\n return (\n \n \n \n );\n};\n\nArea.propTypes = {\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n height: PropTypes.number.isRequired,\n stream: PropTypes.shape().isRequired,\n clipPath: PropTypes.string,\n fill: PropTypes.string\n};\n\nArea.defaultProps = {\n clipPath: null,\n fill: 'rgba(100, 100, 100, 0.66)'\n};\n\nexport default Area;\n","// extracted by mini-css-extract-plugin\nexport default {\"axis\":\"ElevationChart--axis--kmMnQ\",\"yAxis\":\"ElevationChart--yAxis--ZTl9K\",\"xAxis\":\"ElevationChart--xAxis--Md58V\"};","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { axisBottom, axisLeft } from 'd3-axis';\nimport { select } from 'd3-selection';\nimport styles from './axis.module.scss';\n\nclass Axis extends React.Component {\n xAxisNode = React.createRef();\n\n yAxisNode = React.createRef();\n\n componentDidMount() {\n this.drawAxes();\n }\n\n componentDidUpdate(prevProps) {\n const { scopeTo, width, xScale, yScale } = this.props;\n\n const hasScopeChanged =\n scopeTo &&\n (prevProps.scopeTo[0] !== scopeTo[0] ||\n prevProps.scopeTo[1] !== scopeTo[1]);\n\n const hasScaleChanged =\n !this.scalesAreEqual(xScale, prevProps.xScale) ||\n !this.scalesAreEqual(yScale, prevProps.yScale);\n\n const hasWidthChanged = prevProps.width !== width;\n\n if (hasScopeChanged || hasWidthChanged || hasScaleChanged) {\n this.drawAxes();\n }\n }\n\n scalesAreEqual = (scaleA, scaleB) => {\n return scaleA\n .domain()\n .every((domainElement) => scaleB.domain().includes(domainElement));\n };\n\n drawAxes() {\n const { xScale, yScale, width, formatters } = this.props;\n const { elevationFormatter, distanceFormatter } = formatters;\n const xAxis = axisBottom(xScale);\n const yAxis = axisLeft(yScale);\n const xTickCount = width > 480 ? 8 : 4;\n\n yAxis\n .ticks(4)\n .tickSize(-width)\n .tickFormat((e) =>\n // As e here is converted/formatted value we need to unconver it\n // so that the value does not get converted twice.\n elevationFormatter.formatShort(e / elevationFormatter.convert(1.0))\n );\n\n xAxis.ticks(xTickCount).tickFormat((d) =>\n // As d here is converted/formatted value we need to unconver it\n // so that the value does not get converted twice.\n distanceFormatter.formatShort(d / distanceFormatter.convert(1.0))\n );\n\n yAxis(select(this.yAxisNode.current));\n xAxis(select(this.xAxisNode.current));\n }\n\n render() {\n const { height } = this.props;\n\n return (\n <>\n \n \n \n );\n }\n}\n\nexport default Axis;\n\nAxis.propTypes = {\n xScale: PropTypes.func.isRequired,\n yScale: PropTypes.func.isRequired,\n height: PropTypes.number.isRequired,\n width: PropTypes.number.isRequired,\n formatters: PropTypes.shape().isRequired,\n scopeTo: PropTypes.arrayOf(PropTypes.number)\n};\n\nAxis.defaultProps = {\n scopeTo: null\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"group\":\"Tooltip--group--+mCJX\",\"infoBox\":\"Tooltip--infoBox--QnbSw\",\"value\":\"Tooltip--value--RmlpA\"};","import React, { useLayoutEffect, useRef, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport styles from './styles.module.scss';\n\nconst Tooltip = ({ content, position, clipPath, chartWidth, chartMargin }) => {\n const textRef = useRef([]);\n const [boxWidth, setBoxWidth] = useState(120);\n const padding = 6;\n const lineHeight = 16;\n\n const rightBound = position + boxWidth + padding * 2;\n const currBoxAlign =\n rightBound >= chartWidth ? chartWidth - rightBound + padding : padding;\n\n useLayoutEffect(() => {\n if (textRef.current && Object.keys(content).length !== 0) {\n const widths = textRef.current.map(\n (el) => el.getBoundingClientRect().width\n );\n const maxWidth = Math.max(...widths);\n const newSize = Math.round(maxWidth + padding * 2);\n if (boxWidth !== newSize) {\n setBoxWidth(newSize);\n }\n }\n }, [content, boxWidth]);\n\n const InfoBox = () => {\n const keys = Object.keys(content);\n const contentLength = keys.length;\n const boxHeight = contentLength * lineHeight + padding + 2;\n\n return (\n \n \n {keys.map((stat, index) => {\n const contentItem = content[stat];\n\n function setRef(el) {\n textRef.current[index] = el;\n }\n\n return (\n \n {contentItem.label}\n \n {contentItem.value}\n \n \n );\n })}\n \n );\n };\n\n return (\n \n \n \n \n );\n};\n\nexport default Tooltip;\n\nTooltip.propTypes = {\n content: PropTypes.shape().isRequired,\n position: PropTypes.number.isRequired,\n clipPath: PropTypes.string.isRequired,\n chartWidth: PropTypes.number.isRequired,\n chartMargin: PropTypes.shape({\n top: PropTypes.number,\n right: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number\n }).isRequired\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"hitbox\":\"ElevationChart--hitbox--JJmeG\",\"marker\":\"ElevationChart--marker--dn-WA\"};","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { scaleLinear } from 'd3-scale';\nimport { max, min, bisectLeft } from 'd3-array';\nimport { throttle } from 'lodash-es';\nimport colors from '../colors';\nimport Area from './Area';\nimport Axis from './Axis';\nimport Tooltip from './Tooltip';\nimport styles from './styles.module.scss';\n\nclass ElevationChart extends Component {\n state = {\n stream: null,\n xScale: null,\n yScale: null,\n height: 0,\n width: 0,\n markerPosition: this.props.margin.left,\n tooltipContent: {}\n };\n\n container = React.createRef();\n\n formatters = null;\n\n node = React.createRef();\n\n hitbox = React.createRef();\n\n handleResize = throttle(() => {\n this.buildScales();\n }, 250);\n\n componentDidMount() {\n window.addEventListener('resize', this.handleResize);\n this.updateFormatters();\n this.buildScales();\n }\n\n componentDidUpdate({\n elevation: prevElevation,\n distance: prevDistance,\n units: prevUnits\n }) {\n const { distance, elevation, units } = this.props;\n const elevationChanged = prevElevation.length !== elevation.length;\n const distanceChanged = prevDistance.length !== distance.length;\n const unitsChanged = prevUnits !== units;\n\n if (unitsChanged) {\n this.updateFormatters();\n }\n\n if (elevationChanged || distanceChanged || unitsChanged) {\n this.buildScales();\n }\n }\n\n componentWillUnmount() {\n window.removeEventListener('resize', this.handleResize);\n }\n\n // TODO: hover got really slow on long streams\n updateMarker = (e) => {\n const {\n onUpdateMarker,\n tooltipDistanceLabel,\n tooltipElevationLabel,\n tooltipGradeLabel\n } = this.props;\n const { xScale, stream } = this.state;\n const { elevationFormatter, distanceFormatter } = this.formatters;\n const bounds = this.hitbox.current.getBoundingClientRect();\n const cursorPosition = e.clientX - bounds.left;\n const markerPosition = cursorPosition;\n const distCursor = xScale.invert(cursorPosition);\n const streamIndex = bisectLeft(stream.convertedDistance, distCursor);\n\n const tooltipContent = {\n distance: {\n label: tooltipDistanceLabel,\n value: distanceFormatter.formatShort(stream.distance[streamIndex])\n },\n elevation: {\n label: tooltipElevationLabel,\n value: elevationFormatter.formatShort(stream.elevation[streamIndex])\n },\n grade: {\n label: tooltipGradeLabel,\n value: this.gradeAtIndex(streamIndex)\n }\n };\n\n onUpdateMarker(streamIndex, {\n // distCursor at this point will be in kilometers or miles so convert distance back to meters\n // as stream.distance is in meters so we want to be consistent\n distance: distCursor / distanceFormatter.convert(1)\n });\n\n this.setState({\n markerPosition,\n tooltipContent\n });\n };\n\n handleMouseLeave = (e) => {\n const { onUpdateMarker, onMouseLeave } = this.props;\n onUpdateMarker(null, { distance: null });\n onMouseLeave(e);\n };\n\n updateFormatters() {\n const { units, formatters } = this.props;\n\n this.formatters = {\n elevationFormatter: new formatters.ElevationFormatter(units),\n distanceFormatter: new formatters.DistanceFormatter(units),\n gradePercentFormatter: new formatters.PercentFormatter()\n };\n }\n\n buildScales() {\n const { margin, height: heightProp, elevation, distance } = this.props;\n const { elevationFormatter, distanceFormatter } = this.formatters;\n\n const convertedElevation = elevation.map((elev) =>\n elevationFormatter.convert(elev)\n );\n const convertedDistance = distance.map((dist) =>\n distanceFormatter.convert(dist)\n );\n\n const width =\n this.container.current.offsetWidth - margin.left - margin.right;\n const height = heightProp - margin.top - margin.bottom;\n const yMax = max(convertedElevation);\n const yMin = min(convertedElevation);\n const xScale = scaleLinear().range([0, width]);\n const yScale = scaleLinear().range([height, 0]);\n\n xScale.domain([0, max(convertedDistance)]);\n yScale.domain([yMin, yMax + yMax * 0.02]);\n\n this.setState({\n height,\n width,\n xScale,\n yScale,\n stream: { elevation, convertedElevation, distance, convertedDistance }\n });\n }\n\n gradeAtIndex(index) {\n // Taken from charts.js: 1689 but extending the window to 5 data points\n const { stream } = this.state;\n const { gradePercentFormatter } = this.formatters;\n const { elevation, distance } = stream;\n const maxIndex = distance.length - 1;\n const threshold = 2;\n\n let streamIndex = index;\n\n if (streamIndex < threshold) {\n streamIndex = threshold;\n }\n if (maxIndex - streamIndex < threshold) {\n streamIndex = maxIndex - threshold;\n }\n\n const distanceDiff =\n distance[streamIndex + threshold] - distance[streamIndex - threshold];\n const elevationDiff =\n elevation[streamIndex + threshold] - elevation[streamIndex - threshold];\n const grade = (elevationDiff * 100) / distanceDiff;\n\n return gradePercentFormatter.formatShort(grade);\n }\n\n scopeTo() {\n const { scopeTo } = this.props;\n const { stream, xScale, yScale } = this.state;\n\n if (!stream || !scopeTo) {\n return;\n }\n\n const start = scopeTo[0];\n const end = scopeTo[1];\n\n // Taken from directory/ElevationChart.js.coffee: 263\n const range = end - start;\n // the padding on each side of the selected area should ideally be\n // 1/3 of the area itself, but this can't be the case if the start\n // or the end are too close to the edges\n const padding = parseInt(range / 3, 10);\n const enoughSpaceAtStart = start - padding <= 0;\n const enoughSpaceAtEnd = end + padding > stream.distance.length - 1;\n\n const paddedStart = enoughSpaceAtStart\n ? parseInt(start / 3, 10)\n : start - padding;\n\n const paddedEnd = enoughSpaceAtEnd\n ? parseInt(end + (stream.distance.length - 1 - end) / 3, 10)\n : end + padding;\n\n xScale.domain([\n stream.convertedDistance[paddedStart],\n stream.convertedDistance[paddedEnd]\n ]);\n\n const croppedElevationStream = stream.convertedElevation.slice(\n paddedStart,\n paddedEnd + 1\n );\n const yMax = max(croppedElevationStream);\n const yMin = min(croppedElevationStream);\n\n yScale.domain([yMin, yMax + yMax * 0.02]);\n }\n\n render() {\n const { margin, scopeTo, scopeColor, highlightArea, highlightAreaColor } =\n this.props;\n const {\n stream,\n xScale,\n yScale,\n width,\n height,\n markerPosition,\n tooltipContent\n } = this.state;\n\n if (scopeTo) this.scopeTo();\n\n return (\n
\n {height > 0 && width > 0 && (\n \n \n \n\n \n\n {scopeTo && (\n \n )}\n\n {highlightArea && (\n \n )}\n\n \n \n \n\n \n \n \n \n \n \n )}\n
\n );\n }\n}\n\nElevationChart.propTypes = {\n height: PropTypes.number.isRequired,\n elevation: PropTypes.arrayOf(PropTypes.number).isRequired,\n distance: PropTypes.arrayOf(PropTypes.number).isRequired,\n units: PropTypes.string.isRequired,\n margin: PropTypes.shape({\n top: PropTypes.number.isRequired,\n right: PropTypes.number.isRequired,\n bottom: PropTypes.number.isRequired,\n left: PropTypes.number.isRequired\n }),\n scopeTo: PropTypes.arrayOf(PropTypes.number),\n scopeColor: PropTypes.string,\n highlightArea: PropTypes.arrayOf(PropTypes.number),\n highlightAreaColor: PropTypes.string,\n onUpdateMarker: PropTypes.func,\n onMouseLeave: PropTypes.func,\n formatters: PropTypes.shape().isRequired,\n tooltipDistanceLabel: PropTypes.string,\n tooltipElevationLabel: PropTypes.string,\n tooltipGradeLabel: PropTypes.string\n};\n\nElevationChart.defaultProps = {\n margin: {\n top: 10,\n right: 24,\n bottom: 20,\n left: 45\n },\n scopeTo: null,\n scopeColor: 'rgb(23, 90, 189)',\n highlightArea: null,\n highlightAreaColor: colors.O50_STRAVA_ORANGE,\n onUpdateMarker: () => null,\n onMouseLeave: () => null,\n tooltipDistanceLabel: 'Distance',\n tooltipElevationLabel: 'Elevation',\n tooltipGradeLabel: 'Grade'\n};\n\nexport default ElevationChart;\n","// extracted by mini-css-extract-plugin\nexport default {\"stat\":\"Stat--stat--dhYaU\",\"statLabel\":\"Stat--statLabel--nlWQq\",\"statValue\":\"Stat--statValue--wQLW4\",\"statXs\":\"Stat--statXs--V2KfQ\",\"statSm\":\"Stat--statSm--dJWfF\",\"statLg\":\"Stat--statLg--sLA+5\",\"statXl\":\"Stat--statXl--DTGq3\"};","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport styles from './styles.module.scss';\n\nconst Stat = (props) => {\n const {\n value,\n label,\n type,\n wrapperClassName,\n labelClassName,\n valueClassName,\n labelAfterValue\n } = props;\n\n const labelElement = (\n \n {label}\n \n );\n\n const wrapperClasses = `${styles.stat} ${styles[type] || ''} ${\n wrapperClassName || ''\n }`;\n\n return (\n
\n {!labelAfterValue && labelElement}\n
\n {value}\n
\n {labelAfterValue && labelElement}\n
\n );\n};\n\nStat.TYPES = ['stat-xs', 'stat-sm', 'stat-lg', 'stat-xl'];\n\nStat.propTypes = {\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.element\n ]).isRequired,\n label: PropTypes.string.isRequired,\n type: PropTypes.oneOf(Stat.TYPES),\n wrapperClassName: PropTypes.string,\n labelClassName: PropTypes.string,\n valueClassName: PropTypes.string,\n labelAfterValue: PropTypes.bool\n};\n\nStat.defaultProps = {\n type: null,\n wrapperClassName: null,\n labelClassName: null,\n valueClassName: null,\n labelAfterValue: false\n};\n\nexport default Stat;\n","// extracted by mini-css-extract-plugin\nexport default {\"listStats\":\"Stats--listStats--hRQeq\"};","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport styles from './styles.module.scss';\n\nconst Stats = (props) => {\n const { children, listClassName } = props;\n\n return (\n
    \n {React.Children.map(\n children,\n (child) => (child &&
  • {child}
  • ) || ''\n )}\n
\n );\n};\n\nStats.propTypes = {\n children: PropTypes.node.isRequired,\n listClassName: PropTypes.string\n};\n\nStats.defaultProps = {\n listClassName: null\n};\n\nexport default Stats;\n"],"names":["useSafeState","initialState","mountedRef","useRef","state","setState","useState","useEffect","current","useCallback","args","SvgNavigationProfileHighlightedMedium","React","ref","color","size","title","titleId","props","_ref","fill","xmlns","viewBox","width","height","id","d","defaultProps","undefined","propTypes","PropTypes","SvgBadgesMulticolorSuperuserSmall","fillRule","SvgBadgesMulticolorSummitSmall","SvgBadgesMulticolorProSmall","SvgBadgesMulticolorVerifiedSmall","Img","src","alt","fallback","error","setError","onError","handleError","_ref2","name","type","badge","className","otherProps","classNames","clsx","styles","children","ProBadge","EmployeeBadge","SubscriberBadge","VerifiedBadge","getBadge","AvatarFallback","root","reWhitespace","string","index","length","test","charAt","reTrimStart","slice","trimmedEndIndex","replace","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","value","isSymbol","isObject","other","valueOf","baseTrim","isBinary","nativeMax","Math","max","nativeMin","min","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","thisArg","apply","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","now","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","arguments","this","clearTimeout","toNumber","cancel","flush","debounce","Area","stream","xScale","yScale","clipPath","formatData","convertedElevation","map","elev","dist","convertedDistance","drawArea","area","x","y1","y0","isRequired","Axis","xAxisNode","yAxisNode","scalesAreEqual","scaleA","scaleB","domain","every","domainElement","includes","componentDidMount","drawAxes","componentDidUpdate","prevProps","scopeTo","hasScopeChanged","hasScaleChanged","hasWidthChanged","formatters","elevationFormatter","distanceFormatter","xAxis","axisBottom","yAxis","axisLeft","xTickCount","ticks","tickSize","tickFormat","e","formatShort","convert","select","render","transform","Tooltip","content","position","chartWidth","chartMargin","textRef","boxWidth","setBoxWidth","rightBound","padding","currBoxAlign","useLayoutEffect","Object","keys","widths","el","getBoundingClientRect","maxWidth","newSize","round","InfoBox","boxHeight","y","stat","contentItem","key","dy","label","dx","top","y2","x1","x2","right","bottom","left","ElevationChart","Component","markerPosition","margin","tooltipContent","container","node","hitbox","handleResize","throttle","buildScales","updateMarker","onUpdateMarker","tooltipDistanceLabel","tooltipElevationLabel","tooltipGradeLabel","bounds","cursorPosition","clientX","distCursor","invert","streamIndex","bisectLeft","distance","elevation","grade","gradeAtIndex","handleMouseLeave","onMouseLeave","window","addEventListener","updateFormatters","prevElevation","prevDistance","units","prevUnits","elevationChanged","distanceChanged","unitsChanged","componentWillUnmount","removeEventListener","ElevationFormatter","DistanceFormatter","gradePercentFormatter","PercentFormatter","heightProp","offsetWidth","yMax","yMin","scaleLinear","range","maxIndex","distanceDiff","start","end","enoughSpaceAtStart","enoughSpaceAtEnd","paddedStart","paddedEnd","croppedElevationStream","scopeColor","highlightArea","highlightAreaColor","onMouseMove","colors","Stat","wrapperClassName","labelClassName","valueClassName","labelAfterValue","labelElement","wrapperClasses","TYPES","Stats","listClassName","child"],"sourceRoot":""}