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AASiG,cAAc,IAAIC,MAAM,uBAoBzB,aAAYlI,EAAE,gBACd,UAAQ,oCAERtM,EAAAA,cAAC0C,EAAyB,CAAClC,KAAMN,EAAAA,MAIrCF,EAAAA,cAAAA,MAAAA,CACEyD,IACEkP,GAAU8B,gBAAkBrC,EAAUvG,QAClC6I,EACAC,EAENjR,IAAI,KAGN1D,EAAAA,cAAAA,MAAAA,CAAKoB,UAAWG,GACdvB,EAAAA,cAAAA,MAAAA,KAAK,UACLA,EAAAA,cAAAA,MAAAA,KApEJ,CAACoS,EAAUtG,OAAQsG,EAAUvG,SAAS+I,SAASjC,GAAU8B,eAElDnI,EAAG,OAAMqG,EAAS8B,iBAEpBnI,EAAE,YAkELtM,EAAAA,cAAC6U,EAAU,CACTpH,KAAMqF,EACNzR,QAAQ,iBACRD,UAAWG,EACX,UAAQ,iCACRkN,SAAU9B,EACVzJ,QAASA,IACPuJ,EAAM,CACJW,QAASyF,EAAS,WAAa,eAC/B1F,OAAQ,QACRE,WAAY,CACVyH,IAAKhC,MAKDxG,EAATuG,EAAW,OAAY,kBAQpCH,EAAY3R,aAAe,CACzB4R,SAAU,KACVvR,UAAW,KACXwR,cAAc,GAGhBF,EAAYzR,UAAY,CACtBiM,KAAMhM,IAAAA,OAAiB6T,WACvB9H,SAAU/L,IAAAA,OAAiB6T,WAC3BpC,SAAUzR,IAAAA,OACVE,UAAWF,IAAAA,OACX0R,aAAc1R,IAAAA,MAGhB","sources":["webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/node_modules/@strava/ui/clsx/clsx.ts","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/node_modules/@strava/icons/dist/ActionsCancelNormalXsmall.js","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/node_modules/@strava/ui/Button/styles.module.scss?95b8","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/node_modules/@strava/ui/Button/Button.tsx","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/node_modules/@strava/ui/Modal/Modal.module.scss?ab51","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/node_modules/@strava/ui/Modal/Modal.tsx","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/node_modules/@strava/ui/Button/LinkButton.tsx","webpack://StravaModern/./node_modules/@strava/api/node_modules/@strava/constants/src/httpStatusCodes.js","webpack://StravaModern/./node_modules/@strava/api/node_modules/@strava/constants/src/followingConstants.js","webpack://StravaModern/./node_modules/@strava/api/microfrontends/athlete/athlete.js","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/node_modules/@strava/react-hooks/src/use-safe-state/useSafeState.hook.ts","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/node_modules/@strava/constants/src/appConstants.js","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/node_modules/lodash-es/isNil.js","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/src/components/CPRAComplianceModal/CPRAComplianceModal.module.scss?8389","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/src/components/CPRAComplianceModal/CPRAComplianceModal.tsx","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/src/CPRAComplianceCTA.module.scss?ed07","webpack://StravaModern/./node_modules/@strava/cpra-compliance-cta/src/CPRAComplianceCTA.tsx","webpack://StravaModern/../src/observe.ts","webpack://StravaModern/../src/InView.tsx","webpack://StravaModern/./node_modules/@strava/smart-banner-ui/node_modules/@strava/ui/Button/styles.module.scss?db9d","webpack://StravaModern/./node_modules/@strava/smart-banner-ui/node_modules/@strava/ui/Button/Button.tsx","webpack://StravaModern/./node_modules/@strava/smart-banner-ui/node_modules/@strava/ui/Button/LinkButton.tsx","webpack://StravaModern/./node_modules/@strava/smart-banner-ui/node_modules/@strava/ui/clsx/clsx.ts","webpack://StravaModern/./node_modules/@strava/smart-banner-ui/node_modules/@strava/icons/dist/ActionsCancelNormalXsmall.js","webpack://StravaModern/./node_modules/@strava/smart-banner-ui/node_modules/@strava/constants/src/appConstants.js","webpack://StravaModern/./node_modules/@strava/smart-banner-ui/node_modules/@strava/utils/src/utils.ts","webpack://StravaModern/./node_modules/@strava/smart-banner-ui/SmartBanner.module.scss?b4e9","webpack://StravaModern/./node_modules/@strava/smart-banner-ui/SmartBanner.js","webpack://StravaModern/../src/useInView.tsx"],"sourcesContent":["type Value = string | number | boolean | undefined | null;\ntype MixObject = {\n [key: string]: boolean | Mix | undefined | null;\n};\ntype MixArray = Array;\ntype Mix = Value | MixObject | MixArray;\n\nfunction toVal(mix: Mix): string {\n let k,\n y,\n str = '';\n\n if (typeof mix === 'string' || typeof mix === 'number') {\n str += mix;\n } else if (typeof mix === 'object') {\n if (Array.isArray(mix)) {\n for (k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if ((y = toVal(mix[k]))) {\n str && (str += ' ');\n str += y;\n }\n }\n }\n } else {\n for (k in mix) {\n if (!mix || mix[k]) {\n str && (str += ' ');\n str += k;\n }\n }\n }\n }\n\n return str;\n}\n\nexport function clsx(..._args: Mix[]): string {\n let i = 0,\n tmp,\n x,\n str = '';\n\n while (i < arguments.length) {\n if ((tmp = arguments[i++])) {\n if ((x = toVal(tmp))) {\n str && (str += ' ');\n str += x;\n }\n }\n }\n return str;\n}\n\nexport default clsx;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgActionsCancelNormalXsmall = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n )\n);\nSvgActionsCancelNormalXsmall.defaultProps = {\n color: \"currentColor\",\n size: 16,\n title: undefined,\n titleId: undefined,\n};\nSvgActionsCancelNormalXsmall.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgActionsCancelNormalXsmall;\n","// extracted by mini-css-extract-plugin\nexport default {\"btn\":\"Button--btn--qzt31\",\"default\":\"Button--default--TueBE\",\"primary\":\"Button--primary--xLuUm\",\"primaryOutline\":\"Button--primaryOutline--o8ikY\",\"secondary\":\"Button--secondary--nTxHS\",\"icon\":\"Button--icon--Jo4RT\",\"text\":\"Button--text--XZkQC\"};","import React from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.module.scss';\n\nexport interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n children: React.ReactNode;\n variant?:\n | 'default'\n | 'primary'\n | 'primaryOutline'\n | 'secondary'\n | 'icon'\n | 'text';\n className?: string;\n}\n\nconst Button = React.forwardRef(\n ({ children, className, variant = 'default', ...props }, ref) => (\n \n {children}\n \n )\n);\n\nexport default Button;\n","// extracted by mini-css-extract-plugin\nexport default {\"overlay\":\"Modal--overlay--8jZHE\",\"dialog\":\"Modal--dialog--aSHqe\",\"closeButton\":\"Modal--closeButton--ojx5J\",\"title\":\"Modal--title--+-KBf\",\"heroImage\":\"Modal--heroImage--aGycP\",\"body\":\"Modal--body--PejEr\",\"actions\":\"Modal--actions--MGkUD\"};","import React from 'react';\nimport {\n DialogOverlay,\n DialogOverlayProps,\n DialogContent,\n DialogContentProps\n} from '@reach/dialog';\nimport ActionsCancelNormalXsmall from '@strava/icons/ActionsCancelNormalXsmall';\nimport clsx from '../clsx';\nimport { color as colors } from '@strava/ui-tokens/js';\nimport Button from '../Button/Button';\n\nimport styles from './Modal.module.scss';\nimport './ReachUI.css';\n\n//\n// ModalOverlay\n//\n// Reach UI docs: https://reach.tech/dialog/#dialogoverlay\n// --------------------\n\nexport interface ModalOverlayProps\n extends DialogOverlayProps,\n React.ComponentPropsWithoutRef<'div'> {\n className?: string;\n}\n\nexport function ModalOverlay({\n className,\n children,\n ...otherProps\n}: ModalOverlayProps) {\n return (\n \n {children}\n \n );\n}\n\n//\n// ModalContent\n//\n// Reach UI docs: https://reach.tech/dialog/#dialogcontent\n// --------------------\n\nexport interface ModalContentProps\n extends DialogContentProps,\n React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n className?: string;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n}\n\nexport function ModalContent({\n className,\n children,\n ...otherProps\n}: ModalContentProps) {\n return (\n \n {children}\n \n );\n}\n\n//\n// ModalTitle\n// --------------------\n\nexport interface ModalTitleProps extends React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport function ModalTitle({\n className,\n children,\n ...otherProps\n}: ModalTitleProps) {\n return (\n

\n {children}\n

\n );\n}\n\n//\n// ModalActions\n// --------------------\n\nexport interface ModalActionsProps\n extends React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport function ModalActions({\n className,\n children,\n ...otherProps\n}: ModalActionsProps) {\n return (\n
\n {children}\n
\n );\n}\n\n//\n// ModalHeroImage\n// --------------------\n\nexport interface ModalHeroImageProps\n extends React.ComponentPropsWithoutRef<'img'> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport function ModalHeroImage({\n className,\n src,\n alt,\n ...otherProps\n}: ModalHeroImageProps) {\n return (\n \n );\n}\n\n//\n// ModalBody\n// --------------------\n\nexport interface ModalBodyProps extends React.ComponentPropsWithoutRef<'div'> {\n children: React.ReactNode;\n className?: string;\n}\n\nexport function ModalBody({ className, ...otherProps }: ModalBodyProps) {\n return
;\n}\n\n//\n// ModalCloseButton\n// --------------------\n\nexport interface ModalCloseButtonProps\n extends React.ComponentPropsWithoutRef<'button'> {\n className?: string;\n color?: string;\n}\n\nexport function ModalCloseButton({\n className,\n color,\n ...otherProps\n}: ModalCloseButtonProps) {\n return (\n \n );\n}\n\n//\n// Modal\n// --------------------\n\nexport interface ModalProps extends React.ComponentPropsWithoutRef<'div'> {\n className?: string;\n isOpen?: boolean;\n onDismiss?: () => void;\n hasClose?: boolean;\n children: React.ReactNode;\n initialFocusRef?: React.RefObject;\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n}\n\nfunction Modal({\n className,\n isOpen = false,\n onDismiss,\n hasClose,\n children,\n initialFocusRef,\n ...otherProps\n}: ModalProps) {\n return (\n \n \n {hasClose && (\n \n )}\n {children}\n \n \n );\n}\n\n// Adding support to use the compound component pattern and have backwards\n// compatibility with the existing pattern. To learn more read,\n// https://www.smashingmagazine.com/2021/08/compound-components-react/\nModal.Overlay = ModalOverlay;\nModal.Content = ModalContent;\nModal.Title = ModalTitle;\nModal.Actions = ModalActions;\nModal.HeroImage = ModalHeroImage;\nModal.Body = ModalBody;\nModal.CloseButton = ModalCloseButton;\n\nexport default Modal;\n","import clsx from 'clsx';\nimport React, { ComponentPropsWithoutRef, forwardRef } from 'react';\n\nimport styles from './styles.module.scss';\nimport { ButtonProps } from './Button';\n\ntype LinkButtonProps = ButtonProps & ComponentPropsWithoutRef<'a'>;\n\nconst LinkButton = forwardRef(\n ({ href, children, className, variant = 'default', ...otherProps }, ref) => {\n return (\n \n {children}\n \n );\n }\n);\n\nexport default LinkButton;\n","export const StatusCodes = Object.freeze({\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.2.1\n *\n * This interim response indicates that everything so far is OK and that the client should continue with the request or ignore it if it is already finished.\n */\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.2.1\n *\n * This interim response indicates that everything so far is OK and that the client should continue with the request or ignore it if it is already finished.\n */\n CONTINUE: 100,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.2.2\n *\n * This code is sent in response to an Upgrade request header by the client, and indicates the protocol the server is switching too.\n */\n SWITCHING_PROTOCOLS: 101,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.1\n *\n * This code indicates that the server has received and is processing the request, but no response is available yet.\n */\n PROCESSING: 102,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.1\n *\n * The request has succeeded. The meaning of a success varies depending on the HTTP method:\n * GET: The resource has been fetched and is transmitted in the message body.\n * HEAD: The entity headers are in the message body.\n * POST: The resource describing the result of the action is transmitted in the message body.\n * TRACE: The message body contains the request message as received by the server\n */\n OK: 200,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.2\n *\n * The request has succeeded and a new resource has been created as a result of it. This is typically the response sent after a PUT request.\n */\n CREATED: 201,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.3\n *\n * The request has been received but not yet acted upon. It is non-committal, meaning that there is no way in HTTP to later send an asynchronous response indicating the outcome of processing the request. It is intended for cases where another process or server handles the request, or for batch processing.\n */\n ACCEPTED: 202,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.4\n *\n * This response code means returned meta-information set is not exact set as available from the origin server, but collected from a local or a third party copy. Except this condition, 200 OK response should be preferred instead of this response.\n */\n NON_AUTHORITATIVE_INFORMATION: 203,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.5\n *\n * There is no content to send for this request, but the headers may be useful. The user-agent may update its cached headers for this resource with the new ones.\n */\n NO_CONTENT: 204,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.3.6\n *\n * This response code is sent after accomplishing request to tell user agent reset document view which sent this request.\n */\n RESET_CONTENT: 205,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7233#section-4.1\n *\n * This response code is used because of range header sent by the client to separate download into multiple streams.\n */\n PARTIAL_CONTENT: 206,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.2\n *\n * A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate.\n */\n MULTI_STATUS: 207,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.1\n *\n * The request has more than one possible responses. User-agent or user should choose one of them. There is no standardized way to choose one of the responses.\n */\n MULTIPLE_CHOICES: 300,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.2\n *\n * This response code means that URI of requested resource has been changed. Probably, new URI would be given in the response.\n */\n MOVED_PERMANENTLY: 301,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.3\n *\n * This response code means that URI of requested resource has been changed temporarily. New changes in the URI might be made in the future. Therefore, this same URI should be used by the client in future requests.\n */\n MOVED_TEMPORARILY: 302,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.4\n *\n * Server sent this response to directing client to get requested resource to another URI with an GET request.\n */\n SEE_OTHER: 303,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7232#section-4.1\n *\n * This is used for caching purposes. It is telling to client that response has not been modified. So, client can continue to use same cached version of response.\n */\n NOT_MODIFIED: 304,\n /**\n * @deprecated\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.6\n *\n * Was defined in a previous version of the HTTP specification to indicate that a requested response must be accessed by a proxy. It has been deprecated due to security concerns regarding in-band configuration of a proxy.\n */\n USE_PROXY: 305,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.4.7\n *\n * Server sent this response to directing client to get requested resource to another URI with same method that used prior request. This has the same semantic than the 302 Found HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.\n */\n TEMPORARY_REDIRECT: 307,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7538#section-3\n *\n * This means that the resource is now permanently located at another URI, specified by the Location: HTTP Response header. This has the same semantics as the 301 Moved Permanently HTTP response code, with the exception that the user agent must not change the HTTP method used: if a POST was used in the first request, a POST must be used in the second request.\n */\n PERMANENT_REDIRECT: 308,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.1\n *\n * This response means that server could not understand the request due to invalid syntax.\n */\n BAD_REQUEST: 400,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7235#section-3.1\n *\n * Although the HTTP standard specifies \"unauthorized\", semantically this response means \"unauthenticated\". That is, the client must authenticate itself to get the requested response.\n */\n UNAUTHORIZED: 401,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.2\n *\n * This response code is reserved for future use. Initial aim for creating this code was using it for digital payment systems however this is not used currently.\n */\n PAYMENT_REQUIRED: 402,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.3\n *\n * The client does not have access rights to the content, i.e. they are unauthorized, so server is rejecting to give proper response. Unlike 401, the client's identity is known to the server.\n */\n FORBIDDEN: 403,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.4\n *\n * The server can not find requested resource. In the browser, this means the URL is not recognized. In an API, this can also mean that the endpoint is valid but the resource itself does not exist. Servers may also send this response instead of 403 to hide the existence of a resource from an unauthorized client. This response code is probably the most famous one due to its frequent occurence on the web.\n */\n NOT_FOUND: 404,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.5\n *\n * The request method is known by the server but has been disabled and cannot be used. For example, an API may forbid DELETE-ing a resource. The two mandatory methods, GET and HEAD, must never be disabled and should not return this error code.\n */\n METHOD_NOT_ALLOWED: 405,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.6\n *\n * This response is sent when the web server, after performing server-driven content negotiation, doesn't find any content following the criteria given by the user agent.\n */\n NOT_ACCEPTABLE: 406,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7235#section-3.2\n *\n * This is similar to 401 but authentication is needed to be done by a proxy.\n */\n PROXY_AUTHENTICATION_REQUIRED: 407,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.7\n *\n * This response is sent on an idle connection by some servers, even without any previous request by the client. It means that the server would like to shut down this unused connection. This response is used much more since some browsers, like Chrome, Firefox 27+, or IE9, use HTTP pre-connection mechanisms to speed up surfing. Also note that some servers merely shut down the connection without sending this message.\n */\n REQUEST_TIMEOUT: 408,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.8\n *\n * This response is sent when a request conflicts with the current state of the server.\n */\n CONFLICT: 409,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.9\n *\n * This response would be sent when the requested content has been permenantly deleted from server, with no forwarding address. Clients are expected to remove their caches and links to the resource. The HTTP specification intends this status code to be used for \"limited-time, promotional services\". APIs should not feel compelled to indicate resources that have been deleted with this status code.\n */\n GONE: 410,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.10\n *\n * The server rejected the request because the Content-Length header field is not defined and the server requires it.\n */\n LENGTH_REQUIRED: 411,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7232#section-4.2\n *\n * The client has indicated preconditions in its headers which the server does not meet.\n */\n PRECONDITION_FAILED: 412,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.11\n *\n * Request entity is larger than limits defined by server; the server might close the connection or return an Retry-After header field.\n */\n REQUEST_TOO_LONG: 413,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.12\n *\n * The URI requested by the client is longer than the server is willing to interpret.\n */\n REQUEST_URI_TOO_LONG: 414,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.13\n *\n * The media format of the requested data is not supported by the server, so the server is rejecting the request.\n */\n UNSUPPORTED_MEDIA_TYPE: 415,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7233#section-4.4\n *\n * The range specified by the Range header field in the request can't be fulfilled; it's possible that the range is outside the size of the target URI's data.\n */\n REQUESTED_RANGE_NOT_SATISFIABLE: 416,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.5.14\n *\n * This response code means the expectation indicated by the Expect request header field can't be met by the server.\n */\n EXPECTATION_FAILED: 417,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2324#section-2.3.2\n *\n * Any attempt to brew coffee with a teapot should result in the error code \"418 I'm a teapot\". The resulting entity body MAY be short and stout.\n */\n IM_A_TEAPOT: 418,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.6\n *\n * The 507 (Insufficient Storage) status code means the method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. This condition is considered to be temporary. If the request which received this status code was the result of a user action, the request MUST NOT be repeated until it is requested by a separate user action.\n */\n INSUFFICIENT_SPACE_ON_RESOURCE: 419,\n /**\n * @deprecated\n * Official Documentation @ https://tools.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-webdav-protocol-06.txt\n *\n * A deprecated response used by the Spring Framework when a method has failed.\n */\n METHOD_FAILURE: 420,\n /**\n * Official Documentation @ https://datatracker.ietf.org/doc/html/rfc7540#section-9.1.2\n *\n * Defined in the specification of HTTP/2 to indicate that a server is not able to produce a response for the combination of scheme and authority that are included in the request URI.\n */\n MISDIRECTED_REQUEST: 421,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.3\n *\n * The request was well-formed but was unable to be followed due to semantic errors.\n */\n UNPROCESSABLE_ENTITY: 422,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.4\n *\n * The resource that is being accessed is locked.\n */\n LOCKED: 423,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.5\n *\n * The request failed due to failure of a previous request.\n */\n FAILED_DEPENDENCY: 424,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-3\n *\n * The origin server requires the request to be conditional. Intended to prevent the 'lost update' problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict.\n */\n PRECONDITION_REQUIRED: 428,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-4\n *\n * The user has sent too many requests in a given amount of time (\"rate limiting\").\n */\n TOO_MANY_REQUESTS: 429,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-5\n *\n * The server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.\n */\n REQUEST_HEADER_FIELDS_TOO_LARGE: 431,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7725\n *\n * The user-agent requested a resource that cannot legally be provided, such as a web page censored by a government.\n */\n UNAVAILABLE_FOR_LEGAL_REASONS: 451,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.1\n *\n * The server encountered an unexpected condition that prevented it from fulfilling the request.\n */\n INTERNAL_SERVER_ERROR: 500,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.2\n *\n * The request method is not supported by the server and cannot be handled. The only methods that servers are required to support (and therefore that must not return this code) are GET and HEAD.\n */\n NOT_IMPLEMENTED: 501,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.3\n *\n * This error response means that the server, while working as a gateway to get a response needed to handle the request, got an invalid response.\n */\n BAD_GATEWAY: 502,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.4\n *\n * The server is not ready to handle the request. Common causes are a server that is down for maintenance or that is overloaded. Note that together with this response, a user-friendly page explaining the problem should be sent. This responses should be used for temporary conditions and the Retry-After: HTTP header should, if possible, contain the estimated time before the recovery of the service. The webmaster must also take care about the caching-related headers that are sent along with this response, as these temporary condition responses should usually not be cached.\n */\n SERVICE_UNAVAILABLE: 503,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.5\n *\n * This error response is given when the server is acting as a gateway and cannot get a response in time.\n */\n GATEWAY_TIMEOUT: 504,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc7231#section-6.6.6\n *\n * The HTTP version used in the request is not supported by the server.\n */\n HTTP_VERSION_NOT_SUPPORTED: 505,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc2518#section-10.6\n *\n * The server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.\n */\n INSUFFICIENT_STORAGE: 507,\n /**\n * Official Documentation @ https://tools.ietf.org/html/rfc6585#section-6\n *\n * The 511 status code indicates that the client needs to authenticate to gain network access.\n */\n NETWORK_AUTHENTICATION_REQUIRED: 511\n});\n\nexport default { StatusCodes };\n","export const FOLLOWING_STATUS = Object.freeze({\n following: 'following',\n pending: 'pending',\n error: 'error',\n canFollow: 'can_follow',\n canRequest: 'can_request'\n});\n\nexport const FOLLOW_ACTIONS = Object.freeze({\n add: 'add',\n followRequested: 'follow_requested',\n following: 'following',\n requestToFollow: 'request_to_follow',\n follow: 'follow'\n});\n\nexport default { FOLLOWING_STATUS, FOLLOW_ACTIONS };\n","import apiClient from '@strava/api/lib/axios-client';\nimport { StatusCodes } from '@strava/constants/src/httpStatusCodes';\nimport { FOLLOWING_STATUS } from '@strava/constants/src/followingConstants';\nimport { convertKeysToCamel } from '@strava/utils';\n\n/**\n * @typedef {Object} CurrentAthlete\n *\n * @property {number} id\n * @property {string} firstname\n * @property {string} lastname\n * @property {number} athleteType\n * @property {boolean} isSubscriber\n * @property {boolean} isSuperUser\n * @property {string} profileMedium\n * @property {string} profileLarge\n * @property {string} measurementUnits\n * @property {string} datePreference\n * @property {string} chartPreference\n * @property {string} viewPreference\n * @property {Object} features\n * @property {Object} experiments\n * @property {Object} preferences\n * @property {boolean} inPreview\n * @property {number} numDaysRemainingInPreview\n * */\n\n/**\n * @description Fetches the current logged in athlete.\n *\n * @returns {Promise.} currentAthlete\n * */\nexport const getCurrentAthlete = async () => {\n const currentAthlete = await apiClient().get(`/frontend/athletes/current`);\n return convertKeysToCamel(currentAthlete.data.currentAthlete);\n};\n\n/**\n * Follows an athlete on strava.\n *\n * @param {Object} param\n * @param {string} param.followerId - id for the athlete who is requesting the follow\n * @param {string} param.followingId - id for the athlete to be followed\n * @returns {Promise} - enum value PENDING or FOLLOWING\n */\nexport const followAthlete = ({ followerId, followingId, logError }) => {\n return new Promise((resolve) => {\n apiClient()\n .post(`/athletes/${followerId}/follows`, {\n follow: {\n follower_id: followerId,\n following_id: followingId\n }\n })\n .then((response) => {\n if (response?.status === StatusCodes.OK) {\n const { data } = response;\n if (data.approved) {\n resolve(FOLLOWING_STATUS.following);\n } else {\n resolve(FOLLOWING_STATUS.pending);\n }\n } else {\n resolve(FOLLOWING_STATUS.error);\n logError(response.error);\n }\n })\n .catch((e) => {\n resolve(FOLLOWING_STATUS.error);\n logError(e);\n });\n });\n};\n\nexport const bulkFollow = ({ followeeIds, logError }) => {\n return new Promise((resolve) => {\n apiClient()\n .post('/athlete/bulk_follow', {\n followee_ids: followeeIds\n })\n .then((response) => {\n const { success, followed_athlete_ids: ids } = response.data;\n resolve({ success, followedAthleteIds: ids || [] });\n })\n .catch((e) => {\n logError(e);\n resolve({ success: false });\n });\n });\n};\n\nexport const unfollowAthlete = ({ followerId, followingId, logError }) => {\n return new Promise((resolve) => {\n apiClient()\n .delete(\n `/athletes/${followerId}/follows/${followingId}`,\n {\n data: {\n follow: {\n follower_id: followerId,\n following_id: followingId\n }\n }\n },\n { headers: { Accept: 'text/javascript' } }\n )\n .then((response) => {\n if (response?.status === StatusCodes.NO_CONTENT) {\n resolve(true);\n } else {\n logError(response);\n resolve(false);\n }\n })\n .catch((e) => {\n logError(e);\n resolve(false);\n });\n });\n};\n\n/**\n * Gets suggested follow list\n *\n * @param {Object} param\n * @param {string} param.callsite - source making the get request\n * @returns {Promise} - list of suggested friends to follow\n */\nexport const getSuggestedFollows = ({ callsite, logError }) => {\n return new Promise((resolve, reject) => {\n apiClient()\n .get('/athlete/suggested_follows', {\n params: { callsite }\n })\n .then((response) => {\n if (response?.status === StatusCodes.OK) {\n const { data } = response;\n resolve(data);\n } else {\n logError(response.error);\n resolve(response.error);\n }\n })\n .catch((e) => {\n logError(e);\n reject(e);\n });\n });\n};\n\nexport const postEmailContactsOnStrava = ({ importedEmails, logError }) => {\n return new Promise((resolve, reject) => {\n apiClient()\n .post('/athletes/email_contacts_on_strava', {\n emails: importedEmails\n })\n .then((response) => {\n if (response?.status === StatusCodes.OK) {\n resolve(response);\n } else {\n logError(response.error);\n resolve(response);\n }\n })\n .catch((e) => {\n logError(e);\n reject(e);\n });\n });\n};\n\nexport const deleteUnderageAthlete = ({ logError, locale }) => {\n return new Promise((resolve, reject) => {\n apiClient({ currentLanguage: locale })\n .delete('/athlete/destroy_u13')\n .then((response) => {\n if (response?.status === StatusCodes.OK) {\n resolve(response);\n } else {\n logError(response.error);\n resolve(response);\n }\n })\n .catch((e) => {\n logError(e);\n reject(e);\n });\n });\n};\n\n/**\n * @param {Object} params\n * @param {string} params.viewingAthleteId\n * @param {string} params.followingId\n * @param {string} params.followerId\n *\n * @return {Promise}\n * */\nexport const postAthleteFollow = ({\n viewingAthleteId,\n followingId,\n followerId\n}) => {\n return apiClient().post(`/athletes/${viewingAthleteId}/follows`, {\n follow: {\n following_id: followingId,\n follower_id: followerId\n }\n });\n};\n\n/**\n * @param {Object} params\n * @param {string} params.viewingAthleteId\n * @param {string} params.followId\n *\n * @return {Promise}\n * */\nexport const deleteAthleteFollow = ({ viewingAthleteId, followId }) =>\n apiClient().delete(`/athletes/${viewingAthleteId}/follows/${followId}`);\n\n/**\n * @param {Object} params\n * @param {string} [params.entity]\n * @param {string} [params.entityId]\n * @param {string} [params.surfaceType]\n *\n * @return {Promise}\n * */\nexport const fetchMentionableEntities = async ({\n entity,\n entityId,\n surfaceType\n}) => {\n let url = '/athlete/mentionable_entities';\n\n const params = new URLSearchParams();\n if (entity && entityId) {\n params.append('parent_type', entity);\n params.append('parent_id', entityId);\n }\n if (surfaceType) {\n params.append('surface_type', surfaceType);\n }\n\n const queryString = params.toString();\n if (queryString) {\n url += `?${queryString}`;\n }\n\n return apiClient().get(url);\n};\n\nexport const putAthleteAttributes = ({ athleteId, attributes, logError }) => {\n return new Promise((resolve) => {\n apiClient({\n options: {\n headers: { accept: 'text/javascript, application/javascript' }\n }\n })\n .put(`/athletes/${athleteId}`, { athlete: attributes })\n .then((response) => {\n if (response?.error) {\n logError(response.error);\n }\n resolve(response);\n })\n .catch((e) => {\n logError(e);\n resolve(e);\n });\n });\n};\n\nexport const updateAthleteSettings = ({ settings, logError }) => {\n return new Promise((resolve, reject) => {\n apiClient()\n .put('/athlete_settings', { settings })\n .then((response) => {\n if (response?.error) {\n logError(response.error);\n }\n resolve(response);\n })\n .catch((e) => {\n logError(e);\n reject(e);\n });\n });\n};\n\nexport const getDataSharingOptOut = ({ logError }) => {\n return new Promise((resolve) => {\n apiClient()\n .get('/athlete_settings/data_sharing')\n .then((response) => {\n if (response?.error) {\n logError(response.error);\n }\n resolve(response);\n })\n .catch((e) => {\n logError(e);\n resolve(e);\n });\n });\n};\n\nexport default {\n postEmailContactsOnStrava,\n followAthlete,\n unfollowAthlete,\n getSuggestedFollows,\n deleteUnderageAthlete,\n putAthleteAttributes,\n updateAthleteSettings,\n getDataSharingOptOut\n};\n","import {\n Dispatch,\n SetStateAction,\n useRef,\n useCallback,\n useEffect,\n useState\n} 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 * */\n// eslint-disable-next-line import/prefer-default-export\nexport const useSafeState = (\n initialState: S | (() => S)\n): [S, Dispatch>] => {\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","export const YOUNGEST_AGE_ON_PLATFORM = 13;\n\nexport const YOUNGEST_AGE_FOR_HEALTH_AND_PROMO = 16;\n\nexport const GENDER = Object.freeze({\n man: 'man',\n woman: 'woman',\n preferNotSay: 'prefer_not_say',\n nonBinary: 'nonbinary'\n});\n\nexport const LOCALE = Object.freeze({\n deDE: 'de-DE',\n enUS: 'en-US',\n enGB: 'en-GB',\n esES: 'es-ES',\n es419: 'es-419',\n frFR: 'fr-FR',\n itIT: 'it-IT',\n jaJP: 'ja-JP',\n koKR: 'ko-KR',\n nlNL: 'nl-NL',\n ptBR: 'pt-BR',\n ptPT: 'pt-PT',\n ruRU: 'ru-RU',\n zhCN: 'zh-CN',\n zhTW: 'zh-TW'\n});\n\n// If a language has more than one locale, the first in the list is the default\nexport const LANGUAGE_LOCALES = Object.freeze({\n de: [LOCALE.deDE],\n // en is intentionally omitted here since English is the global default\n es: [LOCALE.esES, LOCALE.es419],\n fr: [LOCALE.frFR],\n it: [LOCALE.itIT],\n ja: [LOCALE.jaJP],\n ko: [LOCALE.koKR],\n nl: [LOCALE.nlNL],\n pt: [LOCALE.ptPT, LOCALE.ptBR],\n ru: [LOCALE.ruRU],\n zh: [LOCALE.zhCN, LOCALE.zhTW]\n});\n\nexport const EXPERIMENT_COHORTS = Object.freeze({\n control: 'control',\n variantA: 'variant-a',\n variantB: 'variant-b'\n});\n\nexport const MOBILE_OS = Object.freeze({\n android: 'android',\n iPhone: 'iphone',\n iPad: 'ipad'\n});\n\nexport const SUPPORTED_BROWSERS = Object.freeze({\n chrome: 'chrome',\n firefox: 'firefox',\n safari: 'safari'\n});\n\n// universal link paths from 'apple-app-site-association' file in active\nexport const APPLE_APP_LINK_PATHS = [\n '/dashboard',\n '/activities/*',\n '/athletes/*',\n '/segments/*',\n '/challenges/*',\n '/videos/*',\n '/routes/*',\n '/premium/*',\n '/settings/*',\n '/shop/*',\n '/athlete/*',\n '/clubs/*',\n '/summit/join',\n '/summit/perks',\n '/oauth/mobile/authorize'\n];\n\nexport const ATHLETES_VISIBILITY = Object.freeze({\n optedOut: 'opted_out' // Strava::Athletes::Visibility::OPTED_OUT\n});\n\nexport default {\n YOUNGEST_AGE_ON_PLATFORM,\n YOUNGEST_AGE_FOR_HEALTH_AND_PROMO,\n GENDER,\n LOCALE,\n EXPERIMENT_COHORTS,\n MOBILE_OS,\n SUPPORTED_BROWSERS,\n APPLE_APP_LINK_PATHS,\n ATHLETES_VISIBILITY\n};\n","/**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\nfunction isNil(value) {\n return value == null;\n}\n\nexport default isNil;\n","// extracted by mini-css-extract-plugin\nexport default {\"modal\":\"CPRAComplianceModal--modal--8jHck\",\"modalTitle\":\"CPRAComplianceModal--modalTitle--Bu6HQ\",\"modalBody\":\"CPRAComplianceModal--modalBody--rAs+7\",\"modalActions\":\"CPRAComplianceModal--modalActions--tP+CZ\"};","import React, { useEffect } from 'react';\nimport { Markup } from 'interweave';\nimport Modal, { ModalTitle, ModalBody, ModalActions } from '@strava/ui/Modal';\nimport Button from '@strava/ui/Button';\nimport {\n getDataSharingOptOut,\n updateAthleteSettings\n} from '@strava/api/microfrontends/athlete';\nimport {\n useStravaAnalytics,\n useStravaErrorLogging\n} from '@strava/container-context';\nimport { useSafeState } from '@strava/react-hooks/src/use-safe-state';\nimport { ATHLETES_VISIBILITY } from '@strava/constants/src/appConstants';\nimport { isNil } from 'lodash-es';\n\nimport styles from './CPRAComplianceModal.module.scss';\n\ninterface Props {\n onDismiss: () => void;\n isLoggedIn: boolean;\n t: (\n key: string,\n params?: Record\n ) => string;\n dataSharingOptedOut?: boolean;\n}\n\nconst CPRAComplianceModal = ({\n onDismiss,\n isLoggedIn = false,\n t,\n dataSharingOptedOut\n}: Props) => {\n const { logError } = useStravaErrorLogging();\n const { track } = useStravaAnalytics();\n const [isProcessing, setIsProcessing] = useSafeState(false);\n const [isOptedOut, setIsOptedOut] = useSafeState(\n dataSharingOptedOut || false\n );\n\n useEffect(() => {\n // retrieve data sharing opt out status if its not provided as a prop\n if (isNil(dataSharingOptedOut)) {\n setIsProcessing(true);\n (async () => {\n const response = await getDataSharingOptOut({ logError });\n if (response?.data?.['opted_out']) {\n setIsOptedOut(true);\n } else {\n setIsProcessing(false);\n }\n })();\n }\n }, [logError, setIsProcessing, setIsOptedOut, dataSharingOptedOut]);\n\n useEffect(() => {\n track({\n category: 'privacy_compliance',\n page: 'do_not_share_info',\n action: 'screen_enter',\n element: 'modal',\n properties: {\n page_url: window.location.href\n }\n });\n }, [track]);\n\n const handleOptOut = async () => {\n setIsProcessing(true);\n if (isLoggedIn) {\n try {\n await updateAthleteSettings({\n settings: { data_sharing: ATHLETES_VISIBILITY.optedOut },\n logError\n });\n setIsOptedOut(true);\n } catch (error) {\n // let user try again\n setIsProcessing(false);\n }\n } else {\n // domain and cookie expiration logic copied from the cookie banner logic in active\n let domain;\n if (/localhost/.test(window.location.hostname)) {\n domain = 'localhost';\n } else if (/staging\\./.test(window.location.hostname)) {\n domain = '.staging.strava.com';\n } else {\n domain = '.strava.com';\n }\n\n const cookieExpiration = new Date();\n cookieExpiration.setFullYear(cookieExpiration.getFullYear() + 1);\n\n document.cookie =\n `_strava_cpra=${ATHLETES_VISIBILITY.optedOut};` +\n `expires=${cookieExpiration.toUTCString()};` +\n `domain=${domain};` +\n 'path=/;';\n\n setIsOptedOut(true);\n }\n\n track({\n category: 'privacy_compliance',\n page: 'do_not_share_info',\n action: 'click',\n element: 'opt_out'\n });\n };\n\n return (\n \n {t('modal.title')}\n \n \n \n \n \n \n \n {isOptedOut ? t('modal.opted_out') : t('modal.opt_out')}\n \n \n \n );\n};\n\nexport default CPRAComplianceModal;\n","// extracted by mini-css-extract-plugin\nexport default {\"cpraButton\":\"src--cpraButton--YfO7q\"};","import React, { useCallback, useState } from 'react';\nimport { useStravaTranslations } from '@strava/container-context';\nimport clsx from '@strava/ui/clsx';\nimport CPRAComplianceModal from './components/CPRAComplianceModal';\n\nimport styles from './CPRAComplianceCTA.module.scss';\n\nexport interface CPRAComplianceCTAProps {\n isLoggedIn?: boolean;\n className?: string;\n i18nPrefix?: string;\n dataSharingOptedOut?: boolean;\n}\n\nconst CPRAComplianceCTA = ({\n isLoggedIn = false,\n className = '',\n i18nPrefix = '',\n dataSharingOptedOut\n}: CPRAComplianceCTAProps) => {\n const [showModal, setShowModal] = useState(false);\n\n const { t: _t } = useStravaTranslations();\n\n const t = useCallback(\n (\n key: string,\n params?: Record\n ) => _t(`${i18nPrefix}.cpra_compliance_cta.${key}`, { ...params }),\n [_t, i18nPrefix]\n );\n\n return (\n <>\n setShowModal(true)}\n >\n {t('cta')}\n \n {showModal && (\n setShowModal(false)}\n isLoggedIn={isLoggedIn}\n t={t}\n dataSharingOptedOut={dataSharingOptedOut}\n />\n )}\n \n );\n};\n\nexport default CPRAComplianceCTA;\n","import type { ObserverInstanceCallback } from './index';\n\nconst observerMap = new Map<\n string,\n {\n id: string;\n observer: IntersectionObserver;\n elements: Map>;\n }\n>();\n\nconst RootIds: WeakMap = new WeakMap();\nlet rootId = 0;\n\nlet unsupportedValue: boolean | undefined = undefined;\n\n/**\n * What should be the default behavior if the IntersectionObserver is unsupported?\n * Ideally the polyfill has been loaded, you can have the following happen:\n * - `undefined`: Throw an error\n * - `true` or `false`: Set the `inView` value to this regardless of intersection state\n * **/\nexport function defaultFallbackInView(inView: boolean | undefined) {\n unsupportedValue = inView;\n}\n\n/**\n * Generate a unique ID for the root element\n * @param root\n */\nfunction getRootId(root: IntersectionObserverInit['root']) {\n if (!root) return '0';\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\n\n/**\n * Convert the options to a string Id, based on the values.\n * Ensures we can reuse the same observer when observing elements with the same options.\n * @param options\n */\nexport function optionsToId(options: IntersectionObserverInit) {\n return Object.keys(options)\n .sort()\n .filter(\n (key) => options[key as keyof IntersectionObserverInit] !== undefined,\n )\n .map((key) => {\n return `${key}_${\n key === 'root'\n ? getRootId(options.root)\n : options[key as keyof IntersectionObserverInit]\n }`;\n })\n .toString();\n}\n\nfunction createObserver(options: IntersectionObserverInit) {\n // Create a unique ID for this observer instance, based on the root, root margin and threshold.\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n\n if (!instance) {\n // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.\n const elements = new Map>();\n let thresholds: number[] | readonly number[];\n\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.\n // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0\n const inView =\n entry.isIntersecting &&\n thresholds.some((threshold) => entry.intersectionRatio >= threshold);\n\n // @ts-ignore support IntersectionObserver v2\n if (options.trackVisibility && typeof entry.isVisible === 'undefined') {\n // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.\n // @ts-ignore\n entry.isVisible = inView;\n }\n\n elements.get(entry.target)?.forEach((callback) => {\n callback(inView, entry);\n });\n });\n }, options);\n\n // Ensure we have a valid thresholds array. If not, use the threshold from the options\n thresholds =\n observer.thresholds ||\n (Array.isArray(options.threshold)\n ? options.threshold\n : [options.threshold || 0]);\n\n instance = {\n id,\n observer,\n elements,\n };\n\n observerMap.set(id, instance);\n }\n\n return instance;\n}\n\n/**\n * @param element - DOM Element to observe\n * @param callback - Callback function to trigger when intersection status changes\n * @param options - Intersection Observer options\n * @param fallbackInView - Fallback inView value.\n * @return Function - Cleanup function that should be triggered to unregister the observer\n */\nexport function observe(\n element: Element,\n callback: ObserverInstanceCallback,\n options: IntersectionObserverInit = {},\n fallbackInView = unsupportedValue,\n) {\n if (\n typeof window.IntersectionObserver === 'undefined' &&\n fallbackInView !== undefined\n ) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio:\n typeof options.threshold === 'number' ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds,\n });\n return () => {\n // Nothing to cleanup\n };\n }\n // An observer with the same options can be reused, so lets use this fact\n const { id, observer, elements } = createObserver(options);\n\n // Register the callback listener for this element\n let callbacks = elements.get(element) || [];\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n\n callbacks.push(callback);\n observer.observe(element);\n\n return function unobserve() {\n // Remove the callback from the callback list\n callbacks.splice(callbacks.indexOf(callback), 1);\n\n if (callbacks.length === 0) {\n // No more callback exists for element, so destroy it\n elements.delete(element);\n observer.unobserve(element);\n }\n\n if (elements.size === 0) {\n // No more elements are being observer by this instance, so destroy it\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n","import * as React from 'react';\nimport type { IntersectionObserverProps, PlainChildrenProps } from './index';\nimport { observe } from './observe';\n\ntype State = {\n inView: boolean;\n entry?: IntersectionObserverEntry;\n};\n\nfunction isPlainChildren(\n props: IntersectionObserverProps | PlainChildrenProps,\n): props is PlainChildrenProps {\n return typeof props.children !== 'function';\n}\n\n/**\n ## Render props\n\n To use the `` component, you pass it a function. It will be called\n whenever the state changes, with the new value of `inView`. In addition to the\n `inView` prop, children also receive a `ref` that should be set on the\n containing DOM element. This is the element that the IntersectionObserver will\n monitor.\n\n If you need it, you can also access the\n [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)\n on `entry`, giving you access to all the details about the current intersection\n state.\n\n ```jsx\n import { InView } from 'react-intersection-observer';\n\n const Component = () => (\n \n {({ inView, ref, entry }) => (\n
\n

{`Header inside viewport ${inView}.`}

\n
\n )}\n
\n );\n\n export default Component;\n ```\n\n ## Plain children\n\n You can pass any element to the ``, and it will handle creating the\n wrapping DOM element. Add a handler to the `onChange` method, and control the\n state in your own component. Any extra props you add to `` will be\n passed to the HTML element, allowing you set the `className`, `style`, etc.\n\n ```jsx\n import { InView } from 'react-intersection-observer';\n\n const Component = () => (\n console.log('Inview:', inView)}>\n

Plain children are always rendered. Use onChange to monitor state.

\n
\n );\n\n export default Component;\n ```\n */\nexport class InView extends React.Component<\n IntersectionObserverProps | PlainChildrenProps,\n State\n> {\n constructor(props: IntersectionObserverProps | PlainChildrenProps) {\n super(props);\n this.state = {\n inView: !!props.initialInView,\n entry: undefined,\n };\n }\n\n componentDidUpdate(prevProps: IntersectionObserverProps) {\n // If a IntersectionObserver option changed, reinit the observer\n if (\n prevProps.rootMargin !== this.props.rootMargin ||\n prevProps.root !== this.props.root ||\n prevProps.threshold !== this.props.threshold ||\n prevProps.skip !== this.props.skip ||\n prevProps.trackVisibility !== this.props.trackVisibility ||\n prevProps.delay !== this.props.delay\n ) {\n this.unobserve();\n this.observeNode();\n }\n }\n\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n\n node: Element | null = null;\n _unobserveCb: (() => void) | null = null;\n\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView,\n } = this.props;\n\n this._unobserveCb = observe(\n this.node,\n this.handleChange,\n {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay,\n },\n fallbackInView,\n );\n }\n\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n this._unobserveCb = null;\n }\n }\n\n handleNode = (node?: Element | null) => {\n if (this.node) {\n // Clear the old observer, before we start observing a new element\n this.unobserve();\n\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n // Reset the state if we get a new node, and we aren't ignoring updates\n this.setState({ inView: !!this.props.initialInView, entry: undefined });\n }\n }\n\n this.node = node ? node : null;\n this.observeNode();\n };\n\n handleChange = (inView: boolean, entry: IntersectionObserverEntry) => {\n if (inView && this.props.triggerOnce) {\n // If `triggerOnce` is true, we should stop observing the element.\n this.unobserve();\n }\n if (!isPlainChildren(this.props)) {\n // Store the current State, so we can pass it to the children in the next render update\n // There's no reason to update the state for plain children, since it's not used in the rendering.\n this.setState({ inView, entry });\n }\n if (this.props.onChange) {\n // If the user is actively listening for onChange, always trigger it\n this.props.onChange(inView, entry);\n }\n };\n\n render() {\n const { children } = this.props;\n if (typeof children === 'function') {\n const { inView, entry } = this.state;\n return children({ inView, entry, ref: this.handleNode });\n }\n\n const {\n as,\n triggerOnce,\n threshold,\n root,\n rootMargin,\n onChange,\n skip,\n trackVisibility,\n delay,\n initialInView,\n fallbackInView,\n ...props\n } = this.props as PlainChildrenProps;\n\n return React.createElement(\n as || 'div',\n { ref: this.handleNode, ...props },\n children,\n );\n }\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"btn\":\"Button--btn--ioOdD\",\"default\":\"Button--default--BRVHD\",\"primary\":\"Button--primary--i3WKp\",\"primaryOutline\":\"Button--primaryOutline--0VEUP\",\"secondary\":\"Button--secondary--Hqzix\",\"icon\":\"Button--icon--M+ZI8\",\"text\":\"Button--text--dGDlJ\"};","import React from 'react';\nimport clsx from 'clsx';\n\nimport styles from './styles.module.scss';\n\nexport interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n children: React.ReactNode;\n variant?:\n | 'default'\n | 'primary'\n | 'primaryOutline'\n | 'secondary'\n | 'icon'\n | 'text';\n className?: string;\n}\n\nconst Button = React.forwardRef(\n ({ children, className, variant = 'default', ...props }, ref) => (\n \n {children}\n \n )\n);\n\nexport default Button;\n","import clsx from 'clsx';\nimport React, { ComponentPropsWithoutRef, forwardRef } from 'react';\n\nimport styles from './styles.module.scss';\nimport { ButtonProps } from './Button';\n\nexport type LinkButtonProps = ButtonProps & ComponentPropsWithoutRef<'a'>;\n\nconst LinkButton = forwardRef(\n ({ href, children, className, variant = 'default', ...otherProps }, ref) => {\n return (\n \n {children}\n \n );\n }\n);\n\nexport default LinkButton;\n","type Value = string | number | boolean | undefined | null;\ntype MixObject = {\n [key: string]: boolean | Mix | undefined | null;\n};\ntype MixArray = Array;\ntype Mix = Value | MixObject | MixArray;\n\nfunction toVal(mix: Mix): string {\n let k,\n y,\n str = '';\n\n if (typeof mix === 'string' || typeof mix === 'number') {\n str += mix;\n } else if (typeof mix === 'object') {\n if (Array.isArray(mix)) {\n for (k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if ((y = toVal(mix[k]))) {\n str && (str += ' ');\n str += y;\n }\n }\n }\n } else {\n for (k in mix) {\n if (!mix || mix[k]) {\n str && (str += ' ');\n str += k;\n }\n }\n }\n }\n\n return str;\n}\n\nexport function clsx(..._args: Mix[]): string {\n let i = 0,\n tmp,\n x,\n str = '';\n\n while (i < arguments.length) {\n if ((tmp = arguments[i++])) {\n if ((x = toVal(tmp))) {\n str && (str += ' ');\n str += x;\n }\n }\n }\n return str;\n}\n\nexport default clsx;\n","import * as React from \"react\";\nimport PropTypes from \"prop-types\";\nconst SvgActionsCancelNormalXsmall = React.forwardRef(\n ({ color, size, title, titleId, ...props }, ref) => (\n \n {title ? {title} : null}\n \n \n )\n);\nSvgActionsCancelNormalXsmall.defaultProps = {\n color: \"currentColor\",\n size: 16,\n title: undefined,\n titleId: undefined,\n};\nSvgActionsCancelNormalXsmall.propTypes = {\n color: PropTypes.string,\n size: PropTypes.number,\n title: PropTypes.string,\n titleId: PropTypes.string,\n};\nexport default SvgActionsCancelNormalXsmall;\n","export const YOUNGEST_AGE_ON_PLATFORM = 13;\n\nexport const YOUNGEST_AGE_FOR_HEALTH_AND_PROMO = 16;\n\nexport const GENDER = Object.freeze({\n man: 'man',\n woman: 'woman',\n preferNotSay: 'prefer_not_say',\n nonBinary: 'nonbinary'\n});\n\nexport const LOCALE = Object.freeze({\n deDE: 'de-DE',\n enUS: 'en-US',\n enGB: 'en-GB',\n esES: 'es-ES',\n es419: 'es-419',\n frFR: 'fr-FR',\n itIT: 'it-IT',\n jaJP: 'ja-JP',\n koKR: 'ko-KR',\n nlNL: 'nl-NL',\n ptBR: 'pt-BR',\n ptPT: 'pt-PT',\n ruRU: 'ru-RU',\n zhCN: 'zh-CN',\n zhTW: 'zh-TW'\n});\n\n// If a language has more than one locale, the first in the list is the default\nexport const LANGUAGE_LOCALES = Object.freeze({\n de: [LOCALE.deDE],\n // en is intentionally omitted here since English is the global default\n es: [LOCALE.esES, LOCALE.es419],\n fr: [LOCALE.frFR],\n it: [LOCALE.itIT],\n ja: [LOCALE.jaJP],\n ko: [LOCALE.koKR],\n nl: [LOCALE.nlNL],\n pt: [LOCALE.ptPT, LOCALE.ptBR],\n ru: [LOCALE.ruRU],\n zh: [LOCALE.zhCN, LOCALE.zhTW]\n});\n\nexport const EXPERIMENT_COHORTS = Object.freeze({\n control: 'control',\n variantA: 'variant-a',\n variantB: 'variant-b'\n});\n\nexport const MOBILE_OS = Object.freeze({\n android: 'android',\n iPhone: 'iphone',\n iPad: 'ipad'\n});\n\nexport const SUPPORTED_BROWSERS = Object.freeze({\n chrome: 'chrome',\n firefox: 'firefox',\n safari: 'safari'\n});\n\n// universal link paths from 'apple-app-site-association' file in active\nexport const APPLE_APP_LINK_PATHS = [\n '/dashboard',\n '/activities/*',\n '/athletes/*',\n '/segments/*',\n '/challenges/*',\n '/videos/*',\n '/routes/*',\n '/premium/*',\n '/settings/*',\n '/shop/*',\n '/athlete/*',\n '/clubs/*',\n '/summit/join',\n '/summit/perks',\n '/oauth/mobile/authorize'\n];\n\nexport const ATHLETES_VISIBILITY = Object.freeze({\n optedOut: 'opted_out' // Strava::Athletes::Visibility::OPTED_OUT\n});\n\nexport default {\n YOUNGEST_AGE_ON_PLATFORM,\n YOUNGEST_AGE_FOR_HEALTH_AND_PROMO,\n GENDER,\n LOCALE,\n EXPERIMENT_COHORTS,\n MOBILE_OS,\n SUPPORTED_BROWSERS,\n APPLE_APP_LINK_PATHS,\n ATHLETES_VISIBILITY\n};\n","import {\n MOBILE_OS,\n SUPPORTED_BROWSERS,\n APPLE_APP_LINK_PATHS\n} from '@strava/constants/src/appConstants';\nimport { isString } from 'lodash-es';\nimport camelCase from 'lodash-es/camelCase';\nimport snakeCase from 'lodash-es/snakeCase';\nimport isObject from 'lodash-es/isObject';\nimport { CamelCasedPropertiesDeep, SnakeCasedPropertiesDeep } from 'type-fest';\n\nexport const generateRandomId = () => Math.random().toString(36).substring(2);\n\n// Capitalizes all the words and replaces some characters in the string to create a nicer looking title.\n// eg. 'man from the boondocks' => 'Man From The Boondocks'\nexport const titleize = (sentence: string) => {\n return sentence\n .split(' ')\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n};\n\nexport const displayName = (\n { firstName = '', lastName = '' },\n options = { forceAnonymize: false, maxLength: 100 }\n) => {\n const { maxLength, forceAnonymize } = options;\n const fullName = `${firstName} ${lastName}`;\n\n if (forceAnonymize || fullName.length > maxLength) {\n if (firstName.length > maxLength - 3) {\n return `${titleize(firstName.substring(0, maxLength - 4))}... ${lastName\n .charAt(0)\n .toUpperCase()}.`;\n }\n return `${titleize(firstName)} ${lastName.charAt(0).toUpperCase()}.`;\n }\n return fullName.trim();\n};\n\n/**\n * Checks to see if device is mobile\n * @param {string} userAgent - user agent string for the current browser. For next-js apps (SSR),\n * this value can be retrieved from request.headers['user-agent']\n * @returns {boolean} - true if the device is mobile\n */\nexport const isMobile = (userAgent = window?.navigator?.userAgent) => {\n if (isString(userAgent)) {\n // ref - https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#mobile_tablet_or_desktop\n return userAgent.toLowerCase().includes('mobi');\n }\n return false;\n};\n\n/**\n * Determines the OS for mobile devices\n * @param {string} userAgent - user agent string for the current browser. For next-js apps (SSR),\n * this value can be retrieved from request.headers['user-agent']\n * @returns {(string|null)} - one of ['android', 'ipad', 'iphone'] or null for unknown\n */\nexport const getMobileOS = (userAgent = window?.navigator?.userAgent) => {\n if (isString(userAgent)) {\n if (userAgent.includes('Android')) {\n return MOBILE_OS.android;\n }\n if (userAgent.includes('iPad')) {\n return MOBILE_OS.iPad;\n }\n if (userAgent.includes('iPhone')) {\n return MOBILE_OS.iPhone;\n }\n }\n return null;\n};\n\n/**\n * Determines, in a limited fashion, the browser according to the user agent.\n * NOTE: UAs are notoriously difficult to parse. This is meant as a bare-bones, noncomprehensive parser,\n * based on https://www.whatismybrowser.com/guides/the-latest-user-agent/.\n *\n * The order of conditionals is important, bc some Chrome & Firefox UAs include 'Safari', too.\n * Some Edge UAs may be recognized as Chrome for now, since they can include 'Chrome'. We don't\n * officially support Edge (yet?).\n *\n * @param {string} userAgent - user agent string for the current browser. For next-js apps (SSR),\n * this value can be retrieved from request.headers['user-agent']\n * @returns {(string|null)} - one of ['chrome', 'firefox', 'safari'] or null for unknown/unsupported browser\n */\nexport const getBrowser = (userAgent = window?.navigator?.userAgent) => {\n if (isString(userAgent)) {\n if (userAgent.includes('Chrome') || userAgent.includes('CriOS')) {\n return SUPPORTED_BROWSERS.chrome;\n }\n if (userAgent.includes('Firefox') || userAgent.includes('FxiOS'))\n return SUPPORTED_BROWSERS.firefox;\n if (userAgent.includes('Safari')) {\n return SUPPORTED_BROWSERS.safari;\n }\n }\n\n return null;\n};\n\n/**\n * Universal links are determined by the paths described in `apple-app-site-association` in active.\n * @param {string} pathname - window.location.pathname or nextjs equivalent\n * @returns {boolean} - whether the pathname string matches\n */\nexport const isUniversalLinkPage = (pathname: string) => {\n if (isString(pathname)) {\n return APPLE_APP_LINK_PATHS.some((path: string) => {\n const pathWithoutAsterisk = path.replace('/*', '');\n return pathname.startsWith(pathWithoutAsterisk);\n });\n }\n return false;\n};\n\n// eg. given,\n// \"urls\": {\n// \"100\": \"https://photo_url_1\",\n// \"1800\": \"https://photo_url_2\"\n// }\n// returns https://photo_url_2\nexport const getPhotoWithMaxDimension = (\n photoUrlHash: Record\n) => {\n if (!isObject(photoUrlHash)) {\n return '';\n }\n const key = Object.keys(photoUrlHash).reduce((a, b) => (a > b ? a : b));\n return photoUrlHash[key];\n};\n\n/**\n * Immutably merges a payload into an item in an array of objects\n * @param {array} array - An array of objects\n * @param {string|number} id - The unique id of the item in the array to update\n * @param {object} payload - the value to merge into the matched item\n * @param {object} options\n * @param {string} [options.idName=id] - the key of the unique identifier\n * @param {bool} [options.upsert=false] - if true, will insert the payload into the array as a new item if no matching item is found\n * @return {array} - A copy of the original array with the matching item updated\n */\nexport function arrayUpdateItemById(\n array: T[],\n id: string | number,\n payload: Partial,\n { idName, upsert }: { idName?: keyof T; upsert?: boolean } = {}\n): T[] {\n let itemFound = false;\n const property = idName || ('id' as keyof T);\n const mappedArray = array.map((item) => {\n itemFound = itemFound || item[property] === id;\n return item[property] === id ? { ...item, ...payload } : item;\n });\n\n return itemFound || !upsert ? mappedArray : ([...array, payload] as T[]);\n}\n\n/**\n * Immutably removes an item from an array by index\n * @param {array} array\n * @param {number} index - the index of the item to remove\n * @return {array} - A copy of the original array with the matching item removed\n */\nexport function arrayRemoveByIndex(array: T[], index: number): T[] {\n return index === -1\n ? array\n : [...array.slice(0, index), ...array.slice(index + 1)];\n}\n\n/**\n * Immutably removes an item from an array of objects\n * @param {array} array - An array of objects\n * @param {string|number} id - The unique id of the item in the array to remove\n * @param {string} [idName=id] - the key of the unique identifier\n * @return {array} - A copy of the original array with the matching item removed\n */\n\nexport function arrayRemoveItemById(\n array: T[],\n propertyValue: string | number,\n idName = 'id'\n): T[] {\n const index = array.findIndex(\n (item) => item[idName as keyof T] === propertyValue\n );\n return arrayRemoveByIndex(array, index);\n}\n\nexport const capitalizeFirstLetter = (string: string) =>\n `${string.charAt(0).toUpperCase()}${string.slice(1)}`;\n\n/**\n * @description Converts Object keys from string of any case to camelCase.\n * Handles nested objects and arrays.\n * */\nexport function convertKeysToCamel(object: T): CamelCasedPropertiesDeep {\n if (Array.isArray(object)) {\n return (object as unknown[]).map((item) =>\n convertKeysToCamel(item)\n ) as CamelCasedPropertiesDeep;\n }\n\n if (isObject(object)) {\n return Object.keys(object).reduce((o, k) => {\n const key = camelCase(k);\n const value = object[\n k as keyof typeof object\n ] as CamelCasedPropertiesDeep;\n\n if (isObject(value)) {\n return {\n ...o,\n [key]: convertKeysToCamel(value)\n };\n }\n\n if (Array.isArray(value)) {\n return {\n ...o,\n [key]: (value as unknown[]).map((item) => convertKeysToCamel(item))\n };\n }\n\n return {\n ...o,\n [key]: value\n };\n }, {} as CamelCasedPropertiesDeep);\n }\n\n return object as CamelCasedPropertiesDeep;\n}\n\n/**\n * @description Converts Object keys from string of any case to snakeCase.\n * Handles nested objects and arrays.\n * */\nexport function convertKeysToSnake(object: T): SnakeCasedPropertiesDeep {\n if (Array.isArray(object)) {\n return (object as unknown[]).map((item) =>\n convertKeysToSnake(item)\n ) as SnakeCasedPropertiesDeep;\n }\n\n if (isObject(object)) {\n return Object.keys(object).reduce((o, k) => {\n const key = snakeCase(k);\n const value = object[\n k as keyof typeof object\n ] as SnakeCasedPropertiesDeep;\n\n if (isObject(value)) {\n return {\n ...o,\n [key]: convertKeysToSnake(value)\n };\n }\n\n if (Array.isArray(value)) {\n return {\n ...o,\n [key]: (value as unknown[]).map((item) => convertKeysToSnake(item))\n };\n }\n\n return {\n ...o,\n [key]: value\n };\n }, {} as SnakeCasedPropertiesDeep);\n }\n\n return object as SnakeCasedPropertiesDeep;\n}\n\n/**\n * Checks to see if localStorage is available\n *\n * @return {boolean} - true if localStorage can be used\n */\nexport const isLocalStorageAvailable = () => {\n const test = 'test';\n try {\n localStorage.setItem(test, test);\n localStorage.removeItem(test);\n return true;\n } catch (e) {\n return false;\n }\n};\n\n/**\n * Appends querystring params to a URL\n *\n * @param {string} originalUrl - The original URL to append params to\n * @param {object} params - An object of key value parameters to append to URL\n * @return {string} - URL with params appended\n */\nexport const addParamsToURL = (originalUrl: string, params: object) => {\n const url = new URL(originalUrl);\n\n Object.entries(params).forEach(([key, value]) => {\n url.searchParams.append(key, value);\n });\n\n return url.toString();\n};\n\n/**\n * Some of our logged-out pages have a full-screen image background.\n * This util helps with setting the background image on the `` element, and\n * just requires passing in the image to be used.\n * @param {string} background\n */\nexport const setFullScreenBackgroundImage = (background: string) => {\n // apply background image directly to ``\n const body = document.querySelector('body');\n if (body) {\n body.style.setProperty('background-image', `url(${background})`);\n body.style.setProperty('background-size', 'cover');\n body.style.setProperty('background-position', 'center');\n }\n};\n\n/**\n * Uses the host to determine if a page is being loaded in staging or localhost.\n *\n * This util function is helpful for apps that run on nextJS which has node process\n * defined as production in both staging and production.\n *\n * @param host - host name\n * @returns {boolean} - true if app is running in staging or local\n */\nexport const isStagingOrLocal = (host: string) =>\n ['staging', 'localhost'].some((_host) => host.includes(_host));\n\n/**\n * Adds an id property to each object in an array. Uses the object's index as the value for the id\n * @param {array} objects - An array of objects\n * @return {array} - A copy of the original array with id property added to each object\n */\nexport const arrayAddIndexAsId = (objects: Array) =>\n objects.map((object, index) => ({ ...object, id: index }));\n\n/**\n * Uses the host to determine if the protocol should be http or https\n *\n * @param host - host name\n * @returns {string} - Protocol (http / https)\n */\nexport const getProtocolForHost = (host: string) => {\n return host.includes('localhost') ? 'http' : 'https';\n};\n\n/**\n * Constructs the site root URL\n *\n * @param host - host name\n * @returns {string} - Root URL with protocol\n */\nexport const getRootUrl = (host: string) => {\n return `${getProtocolForHost(host)}://${host}`;\n};\n\n/**\n * Constructs the athlete URL for pro and non-pro athletes, i.e.\n * https://www.strava.com/athletes/[athlete_id] or\n * https://www.strava.com/pros/[athlete_id]\n *\n * @param isPro - boolean indicating if the athlete is a pro or not\n * @param athleteId - athlete unique identifier\n * @param host - host name\n * @returns {string} - Root URL with protocol\n */\nexport const getAthleteUrl = (\n isPro: boolean,\n athleteId: number,\n host: string\n) => {\n return `${getProtocolForHost(host)}://${host}/${\n isPro ? 'pros' : 'athletes'\n }/${athleteId.toString()}`;\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"wrapper\":\"smart-banner-ui--wrapper--8LVP-\",\"smartBanner\":\"smart-banner-ui--smartBanner--a9rNI\",\"appInfo\":\"smart-banner-ui--appInfo--5Nk-F\",\"btn\":\"smart-banner-ui--btn--JwtOK\",\"closeBtn\":\"smart-banner-ui--closeBtn--kuyi3\"};","import React, {\n useEffect,\n useState,\n useCallback,\n useMemo,\n forwardRef\n} from 'react';\nimport PropTypes from 'prop-types';\nimport { useInView } from 'react-intersection-observer';\nimport Button, { LinkButton } from '@strava/ui/Button';\nimport clsx from '@strava/ui/clsx';\nimport {\n useStravaAnalytics,\n useStravaTranslations,\n useStravaBranch\n} from '@strava/container-context';\n\nimport ActionsCancelNormalXsmall from '@strava/icons/ActionsCancelNormalXsmall';\nimport { color } from '@strava/ui-tokens/js';\nimport { MOBILE_OS } from '@strava/constants/src/appConstants';\nimport { isLocalStorageAvailable } from '@strava/utils/src/utils';\nimport styles from './SmartBanner.module.scss';\n\nimport iOSIcon from './assets/icon-ios-app.svg';\nimport androidIcon from './assets/icon-android-app.svg';\n\nexport const I18N_PREFIX = 'microfrontends.mobile_app_download_banner';\nexport const HIDE_BANNER_STORAGE_KEY = 'hide-mobile-app-download-banner';\n\nconst SmartBanner = forwardRef(\n ({ page, category, mobileOS, showCloseBtn, className }, ref) => {\n const { hasApp, appLink, isProcessing } = useStravaBranch();\n const { track: _track } = useStravaAnalytics();\n const { t: _t } = useStravaTranslations();\n\n const [inViewRef, inView] = useInView({ threshold: 0 });\n\n const [hideBanner, setHideBanner] = useState(false);\n\n const track = useCallback(\n (fields = {}) => {\n _track({\n category,\n page,\n ...fields,\n properties: {\n ...fields.properties\n }\n });\n },\n [_track, category, page]\n );\n\n const t = useMemo(\n () => (key, params) => _t(`${I18N_PREFIX}.${key}`, { ...params }),\n [_t]\n );\n\n const getAppInfoCopy = () => {\n if (\n [MOBILE_OS.iPhone, MOBILE_OS.android].includes(mobileOS?.toLowerCase())\n ) {\n return t(`app.${mobileOS.toLowerCase()}`);\n }\n return t('no_app');\n };\n\n useEffect(() => {\n let hide = false;\n if (isLocalStorageAvailable()) {\n hide = localStorage?.getItem(HIDE_BANNER_STORAGE_KEY) === 'true';\n }\n\n if (!hide && inView) {\n track({ element: 'smartbanner', action: 'screen_enter' });\n }\n setHideBanner(hide);\n }, [track, inView]);\n\n const handleCloseBanner = () => {\n track({\n element: 'dismiss_smartbanner',\n action: 'click'\n });\n setHideBanner(true);\n if (isLocalStorageAvailable()) {\n localStorage?.setItem(HIDE_BANNER_STORAGE_KEY, true);\n }\n\n // allows active to remove placeholder spacing when smartbanner is hidden\n document.dispatchEvent(new Event('removeSmartbanner'));\n };\n\n if (hideBanner) {\n return null;\n }\n\n return (\n \n
\n {showCloseBtn && (\n \n \n \n )}\n\n \n\n
\n
Strava
\n
{getAppInfoCopy()}
\n
\n \n track({\n element: hasApp ? 'open_app' : 'download_app',\n action: 'click',\n properties: {\n url: appLink\n }\n })\n }\n >\n {hasApp ? t('open') : t('download')}\n \n
\n \n );\n }\n);\n\nSmartBanner.defaultProps = {\n mobileOS: null,\n className: null,\n showCloseBtn: true\n};\n\nSmartBanner.propTypes = {\n page: PropTypes.string.isRequired,\n category: PropTypes.string.isRequired,\n mobileOS: PropTypes.string,\n className: PropTypes.string,\n showCloseBtn: PropTypes.bool\n};\n\nexport default SmartBanner;\n","import * as React from 'react';\nimport type { InViewHookResponse, IntersectionOptions } from './index';\nimport { observe } from './observe';\n\ntype State = {\n inView: boolean;\n entry?: IntersectionObserverEntry;\n};\n\n/**\n * React Hooks make it easy to monitor the `inView` state of your components. Call\n * the `useInView` hook with the (optional) [options](#options) you need. It will\n * return an array containing a `ref`, the `inView` status and the current\n * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).\n * Assign the `ref` to the DOM element you want to monitor, and the hook will\n * report the status.\n *\n * @example\n * ```jsx\n * import React from 'react';\n * import { useInView } from 'react-intersection-observer';\n *\n * const Component = () => {\n * const { ref, inView, entry } = useInView({\n * threshold: 0,\n * });\n *\n * return (\n *
\n *

{`Header inside viewport ${inView}.`}

\n *
\n * );\n * };\n * ```\n */\nexport function useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange,\n}: IntersectionOptions = {}): InViewHookResponse {\n const [ref, setRef] = React.useState(null);\n const callback = React.useRef();\n const [state, setState] = React.useState({\n inView: !!initialInView,\n entry: undefined,\n });\n\n // Store the onChange callback in a `ref`, so we can access the latest instance\n // inside the `useEffect`, but without triggering a rerender.\n callback.current = onChange;\n\n React.useEffect(\n () => {\n // Ensure we have node ref, and that we shouldn't skip observing\n if (skip || !ref) return;\n\n let unobserve: (() => void) | undefined;\n unobserve = observe(\n ref,\n (inView, entry) => {\n setState({\n inView,\n entry,\n });\n if (callback.current) callback.current(inView, entry);\n\n if (entry.isIntersecting && triggerOnce && unobserve) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve();\n unobserve = undefined;\n }\n },\n {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay,\n },\n fallbackInView,\n );\n\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n },\n // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n // If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold,\n ref,\n root,\n rootMargin,\n triggerOnce,\n skip,\n trackVisibility,\n fallbackInView,\n delay,\n ],\n );\n\n const entryTarget = state.entry?.target;\n const previousEntryTarget = React.useRef();\n if (\n !ref &&\n entryTarget &&\n !triggerOnce &&\n !skip &&\n previousEntryTarget.current !== entryTarget\n ) {\n // If we don't have a node ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)\n // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: undefined,\n });\n }\n\n const result = [setRef, state.inView, state.entry] as InViewHookResponse;\n\n // Support object destructuring, by adding the specific values.\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n\n return result;\n}\n"],"names":["toVal","mix","k","y","str","Array","isArray","length","_args","_key","arguments","tmp","x","i","SvgActionsCancelNormalXsmall","React","ref","color","size","title","titleId","props","_ref","fill","xmlns","viewBox","width","height","id","d","defaultProps","undefined","propTypes","PropTypes","children","className","variant","clsx","styles","btn","ModalOverlay","otherProps","DialogOverlay","_extends","ModalContent","_ref2","DialogContent","ModalTitle","_ref3","ModalActions","_ref4","ModalBody","_ref6","ModalCloseButton","_ref7","Button","type","ActionsCancelNormalXsmall","colors","Modal","_ref8","isOpen","onDismiss","hasClose","initialFocusRef","onClick","Overlay","Content","Title","Actions","HeroImage","_ref5","src","alt","Body","CloseButton","Object","freeze","CONTINUE","SWITCHING_PROTOCOLS","PROCESSING","OK","CREATED","ACCEPTED","NON_AUTHORITATIVE_INFORMATION","NO_CONTENT","RESET_CONTENT","PARTIAL_CONTENT","MULTI_STATUS","MULTIPLE_CHOICES","MOVED_PERMANENTLY","MOVED_TEMPORARILY","SEE_OTHER","NOT_MODIFIED","USE_PROXY","TEMPORARY_REDIRECT","PERMANENT_REDIRECT","BAD_REQUEST","UNAUTHORIZED","PAYMENT_REQUIRED","FORBIDDEN","NOT_FOUND","METHOD_NOT_ALLOWED","NOT_ACCEPTABLE","PROXY_AUTHENTICATION_REQUIRED","REQUEST_TIMEOUT","CONFLICT","GONE","LENGTH_REQUIRED","PRECONDITION_FAILED","REQUEST_TOO_LONG","REQUEST_URI_TOO_LONG","UNSUPPORTED_MEDIA_TYPE","REQUESTED_RANGE_NOT_SATISFIABLE","EXPECTATION_FAILED","IM_A_TEAPOT","INSUFFICIENT_SPACE_ON_RESOURCE","METHOD_FAILURE","MISDIRECTED_REQUEST","UNPROCESSABLE_ENTITY","LOCKED","FAILED_DEPENDENCY","PRECONDITION_REQUIRED","TOO_MANY_REQUESTS","REQUEST_HEADER_FIELDS_TOO_LARGE","UNAVAILABLE_FOR_LEGAL_REASONS","INTERNAL_SERVER_ERROR","NOT_IMPLEMENTED","BAD_GATEWAY","SERVICE_UNAVAILABLE","GATEWAY_TIMEOUT","HTTP_VERSION_NOT_SUPPORTED","INSUFFICIENT_STORAGE","NETWORK_AUTHENTICATION_REQUIRED","following","pending","error","canFollow","canRequest","add","followRequested","requestToFollow","follow","updateAthleteSettings","_ref11","settings","logError","Promise","resolve","reject","apiClient","put","then","response","catch","e","getDataSharingOptOut","_ref12","get","useSafeState","initialState","mountedRef","useRef","state","setState","useState","useEffect","current","useCallback","args","LOCALE","man","woman","preferNotSay","nonBinary","deDE","enUS","enGB","esES","es419","frFR","itIT","jaJP","koKR","nlNL","ptBR","ptPT","ruRU","zhCN","zhTW","ATHLETES_VISIBILITY","de","es","fr","it","ja","ko","nl","pt","ru","zh","control","variantA","variantB","android","iPhone","iPad","chrome","firefox","safari","optedOut","value","isLoggedIn","t","dataSharingOptedOut","useStravaErrorLogging","track","useStravaAnalytics","isProcessing","setIsProcessing","isOptedOut","setIsOptedOut","isNil","data","category","page","action","element","properties","page_url","window","location","href","Markup","tagName","content","async","data_sharing","domain","test","hostname","cookieExpiration","Date","setFullYear","getFullYear","document","cookie","toUTCString","disabled","i18nPrefix","showModal","setShowModal","_t","useStravaTranslations","key","params","CPRAComplianceModal","observerMap","Map","RootIds","WeakMap","rootId","unsupportedValue","optionsToId","options","keys","sort","filter","map","root","has","set","toString","observe","callback","fallbackInView","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","target","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","observer","elements","instance","thresholds","entries","forEach","entry","inView","some","trackVisibility","isVisible","createObserver","callbacks","push","splice","indexOf","delete","unobserve","disconnect","forwardRef","MOBILE_OS","isLocalStorageAvailable","localStorage","setItem","removeItem","HIDE_BANNER_STORAGE_KEY","SmartBanner","mobileOS","showCloseBtn","hasApp","appLink","useStravaBranch","_track","inViewRef","_temp","delay","rootMargin","triggerOnce","skip","initialInView","onChange","setRef","React2","entryTarget","_a","previousEntryTarget","result","useInView","hideBanner","setHideBanner","fields","useMemo","hide","getItem","handleCloseBanner","dispatchEvent","Event","toLowerCase","androidIcon","iOSIcon","includes","LinkButton","url","isRequired"],"sourceRoot":""}