) => {\n const { replace, href, onClick, target, history } = this.props\n\n if (isContactLink(href)) return null // let browser handle contact links\n\n if (onClick) {\n onClick(event)\n }\n\n if (\n !isExternalLink(href) &&\n !event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n target !== '_blank' && // let browser handle \"target=_blank\" etc.\n !Link.isModifiedEvent(event) && // ignore clicks with modifier keys\n !!history &&\n !!history.push\n ) {\n // Block the normal anchor event\n event.preventDefault()\n if (replace && !!history.replace) {\n history.replace(href)\n } else {\n history.push(href)\n }\n }\n }\n render() {\n const {\n history,\n replace,\n location,\n underline,\n active,\n children,\n label,\n href,\n target,\n invert,\n fontColor,\n ...rest\n } = this.props\n\n let controlledTarget = target\n if (!target) {\n controlledTarget = isExternalLink(href) ? '_blank' : '_self'\n }\n\n return (\n \n {children}\n \n )\n }\n}\n\nexport const RouterLink = withRouter(Link)\n","// @flow\nimport * as React from 'react'\nimport styled, { ThemeContext } from 'styled-components'\nimport { rem } from 'polished'\nimport { durations } from '../../styles/animations'\nimport { focusOutline, getFontSize } from '../../styles/style-helpers'\n\nimport type { LinkViewModel } from '../../types/LinkViewModel'\nimport type { ButtonTypes } from '../../types/enums/ButtonTypes'\nimport type { AreaTypes } from '../../types/enums/AreaTypes'\nimport BaseButton from './BaseButton'\n\ntype Props = LinkViewModel & {\n children?: React.Node,\n buttonType?: string,\n /** Always render as anchor tag, don't fall back to button */\n isAnchor?: boolean,\n disabled?: boolean,\n icon?: React.Node,\n iconRightSide?: boolean,\n type: ButtonTypes, // todo: this prop should not be called type, it is a native html property!\n negative?: boolean,\n /** Fill the container width */\n fill?: boolean,\n fluid?: boolean,\n /** To indicate a loading state visually */\n loading?: boolean,\n area?: AreaTypes,\n}\n\n/**\n * Create variations of the Button based on the Button Class\n **/\nconst Base = styled(BaseButton)`\n && {\n min-width: ${rem(110)};\n text-align: center;\n font-size: ${({ theme }) =>\n theme.name === 'kids' || theme.name === 'lgbt'\n ? rem(theme.bodyFontSize)\n : getFontSize('small')};\n font-weight: bold;\n letter-spacing: 0.5px;\n padding: ${rem(12)} ${rem(32)} ${rem(11)};\n border-radius: ${rem(25)};\n transition: all ${durations.fast} ease-out;\n\n ${props => (props.fill ? 'display: block' : 'display: inline-block')};\n ${({ fluid }) =>\n fluid &&\n `\n width: 100%;\n `};\n\n & > a {\n text-align: center;\n }\n }\n`\n\nconst Icon = styled.span`\n flex: 0 0 ${rem(40)};\n display: flex;\n justify-content: center;\n align-items: center;\n width: ${rem(40)};\n height: 100%;\n padding-left: ${({ iconRightSide }) => !iconRightSide && rem(4)};\n padding-right: ${({ iconRightSide }) => iconRightSide && rem(4)};\n`\nconst Inner = styled.span`\n ${({ hasIcon, iconRightSide }) =>\n hasIcon &&\n `\n margin-left: ${iconRightSide ? 0 : rem(32)}\n margin-right: ${iconRightSide ? rem(32) : 0}\n `};\n`\n\nexport const PrimaryButton = styled(Base)`\n && {\n background-image: ${({ theme }) =>\n `linear-gradient(\n to top,\n ${theme.primaryButtonMainColor},\n ${theme.primaryButtonAlternativeColor}\n )`}};\n color: ${({ theme }) => theme.buttonPrimaryTextColor};\n ${({ theme }) => focusOutline(theme.body)};\n\n &:hover {\n background-image: ${({ theme }) =>\n `linear-gradient(\n to top,\n ${theme.primaryButtonAlternativeColor},\n ${theme.primaryButtonAlternativeColor}\n )`};\n color: ${({ theme }) => theme.buttonPrimaryTextColor};\n }\n\n &:active {\n background-image: ${({ theme }) => {\n if (theme.name !== 'lgbt') {\n return `linear-gradient(\n to top,\n ${theme.primaryButtonMainColor},\n ${theme.primaryButtonMainColor}\n )`\n } else {\n return `linear-gradient(\n to top,\n ${theme.primaryButtonAlternativeColor},\n ${theme.primaryButtonAlternativeColor}\n )`\n }\n }};\n color: ${({ theme }) => theme.buttonPrimaryTextColor};\n }\n\n &[disabled] {\n opacity: 0.5;\n }\n }\n\n ${Icon} {\n position: absolute;\n width: ${rem(40)};\n top: 0;\n bottom: 0;\n\n ${({ iconRightSide }) =>\n iconRightSide &&\n `\n right: 0;\n `}\n }\n`\n\nexport const SecondaryButton = styled(Base)`\n && {\n background-image: ${({ theme }) =>\n `linear-gradient(\n to top,\n ${theme.secondaryButtonMainColor},\n ${theme.secondaryButtonAlternativeColor}\n )`};\n color: ${({ theme }) => theme.buttonSecondaryTextColor};\n ${({ theme }) => focusOutline(theme.body)};\n\n &:hover {\n color: ${({ theme }) => theme.buttonSecondaryTextColorHover};\n background-image: ${({ theme }) =>\n `linear-gradient(\n to top,\n ${theme.secondaryButtonAlternativeColor},\n ${theme.secondaryButtonAlternativeColor}\n )`};\n }\n\n &:active {\n color: ${({ theme }) => theme.buttonSecondaryTextColor};\n background-image: ${({ theme }) =>\n `linear-gradient(\n to bottom,\n ${theme.secondaryButtonMainColor},\n ${theme.secondaryButtonMainColor}\n )`};\n }\n\n &[disabled] {\n opacity: 0.5;\n }\n\n ${Icon} {\n position: absolute;\n width: ${rem(40)};\n top: 0;\n bottom: 0;\n }\n }\n`\n\nexport const NormalButton = styled(Base)`\n && {\n border-width: ${rem(2)};\n border-style: solid;\n //TODO: It's missing to use the colors from the specific themes here instead of the shared ones that come from color\n ${props =>\n props.negative\n ? `\n color: ${props.theme.buttonPrimaryColor};\n border-color: ${props.theme.buttonPrimaryColor};\n `\n : `\n color: ${props.theme.buttonSecondaryColor};\n border-color: ${props.theme.buttonSecondaryColor};\n `}\n //TODO\n &:hover,\n &:active {\n ${props =>\n props.negative\n ? `\n color: ${props.theme.buttonSecondaryTextColorNegativeHover};\n border-color: ${props.theme.buttonPrimaryColor};\n background-color: ${props.theme.buttonPrimaryColor};\n `\n : `\n color: ${props.theme.buttonPrimaryTextColor};\n border-color: ${props.theme.buttonSecondaryColor};\n background-color: ${props.theme.buttonSecondaryColor};\n `}\n }\n\n &[disabled] {\n opacity: 0.5;\n }\n }\n\n ${Icon} {\n position: absolute;\n width: ${rem(40)};\n top: 0;\n bottom: 0;\n }\n`\n\nexport const FilterButton = styled(Base)`\n && {\n border-radius: ${rem(62)};\n\n background-color: #c4e1e4;\n color: #003851;\n padding: 8px 16px;\n flex: none;\n max-width: 100%;\n\n //TODO\n &:hover,\n &:active {\n ${props =>\n props.negative\n ? `\n color: ${props.theme.buttonSecondaryTextColorNegativeHover};\n border-color: ${props.theme.buttonPrimaryColor};\n background-color: ${props.theme.buttonPrimaryColor};\n `\n : `\n color: ${props.theme.buttonPrimaryTextColor};\n border-color: ${props.theme.buttonSecondaryColor};\n background-color: ${props.theme.buttonSecondaryColor};\n `}\n }\n\n &[disabled] {\n opacity: 0.5;\n }\n }\n\n ${Icon} {\n position: absolute;\n width: ${rem(40)};\n top: 0;\n bottom: 0;\n }\n`\n\nfunction getButton(type: ButtonTypes) {\n switch (type) {\n case 'primary':\n return PrimaryButton\n case 'secondary':\n return SecondaryButton\n case 'filter':\n return FilterButton\n case 'normal':\n default:\n return NormalButton\n }\n}\n\nconst Button = ({\n children,\n label,\n icon,\n iconRightSide,\n type,\n loading,\n ...rest\n}: Props) => {\n const ButtonType = getButton(type)\n const theme = React.useContext(ThemeContext)\n\n return (\n \n {icon && {icon}}\n \n {loading ? null : children || label}\n \n \n )\n}\n\nButton.displayName = 'Button'\n\nexport default Button\n","// @flow\nimport * as React from 'react'\nimport styled, { ThemeContext } from 'styled-components'\nimport { rem } from 'polished'\n\nimport { getFontSize, getLineHeight } from '../../styles/style-helpers'\nimport type { FontSizes } from '../../styles/fonts'\nimport { mediaOnly } from '../../styles/media'\n\ntype Props = {\n children?: React.Node,\n marginBottom?: boolean,\n truncate?: boolean,\n /** Don't split the children into multiple paragraphs */\n noBreaks?: boolean,\n /** Size corresponding to the body styles in the styleguide */\n size?: FontSizes,\n weight?: 300 | 400 | 500 | 700,\n /** Limit the width of the paragraph to a readable 550px*/\n maxWidth?: boolean,\n /** The HTML tag to output - Defaults to */\n tag?: any, // Not sure if right approach\n color?: string,\n invert?: boolean,\n}\n\nconst P = styled.p`\n font-size: ${p => getFontSize(p.size)};\n line-height: ${p => getLineHeight(p.size)};\n ${p =>\n p.size === 'large' &&\n mediaOnly.xs`\n font-size: 1rem\n `};\n text-align: left;\n margin-top: 0;\n margin-bottom: ${(props: Props) => (props.marginBottom ? '2rem' : 0)};\n font-weight: ${(props: Props) => props.weight || 300};\n max-width: ${(props: Props) => (props.maxWidth ? '680px' : undefined)};\n\n color: ${(props: Props) => (props.color ? props.color : 'currentColor')};\n\n ${({ theme, size }) =>\n (theme.name === 'kids' || theme.name === 'lgbt') &&\n size === 'normal' &&\n `\n font-size: ${rem(theme.bodyFontSize)};\n font-weight: ${theme.bodyFontWeight};\n `}\n`\n\nfunction Paragraph({ children, noBreaks, tag, ...rest }: Props) {\n const theme = React.useContext(ThemeContext)\n const Tag = tag && tag !== 'p' ? P.withComponent(tag) : P\n\n if (React.Children.count(children) > 1 && !noBreaks) {\n const last = React.Children.count(children) - 1\n return React.Children.map(children, (child, index) => (\n \n {child}\n \n ))\n }\n return (\n \n {children}\n \n )\n}\n\nParagraph.displayName = 'Paragraph'\nParagraph.defaultProps = {\n size: 'normal',\n}\n\nexport default Paragraph\n","// @flow\nimport styled from 'styled-components'\nimport { mediaQuery } from '../../styles/media'\n\nconst WhiteEdge = styled.div`\n display: none;\n position: absolute;\n z-index: 20;\n background: white;\n height: 100%;\n width: 40px;\n top: 0;\n bottom: 0;\n\n ${mediaQuery.md`\n display: block;\n `}\n`\n\nexport default WhiteEdge\n","// @flow\nimport * as React from 'react'\nimport styled from 'styled-components'\nimport WhiteEdge from '../../components/WhiteEdge/WhiteEdge'\n\ntype Props = {\n hasHero?: boolean,\n children?: React.Node,\n}\n\nconst MainWrapper = styled.main.attrs({\n id: 'main',\n})`\n position: relative;\n background-color: ${({ theme }) => theme.bgColor};\n grid-area: main;\n z-index: 5;\n height: 100%;\n padding-bottom: 78px;\n overflow: hidden;\n`\nconst Main = (props: Props) => (\n \n \n \n\n {props.children && props.children}\n \n)\n\nexport default Main\n","// @flow\nimport * as React from 'react'\nimport styled from 'styled-components'\nimport { rem } from 'polished'\nimport { AreaProvider } from '../AreaContext/AreaContext'\nimport { mediaQuery, mediaOnly } from '../../styles/media'\n\nimport Ribbon from '../../components/Ribbon/Ribbon'\n\ntype Props = {\n children?: React.Node,\n hasHero?: boolean,\n hasPrint?: boolean,\n printText?: string,\n wizard?: React.Node,\n breadcrumbs?: React.Node,\n date?: React.Node,\n printButton?: React.Node,\n}\n\nconst ArticleEl = styled.article`\n position: relative;\n\n border-radius: ${({ theme }) =>\n theme.borderRadius ? `${rem(theme.borderRadius)}` : rem(8)};\n\n margin: 0 auto;\n margin-bottom: ${({ hasWizard }) => !hasWizard && rem(80)};\n\n ${mediaQuery.lg`\n margin-bottom: 0;\n `};\n\n ${mediaOnly.xs`\n border-radius: 0;\n margin-left: -${rem(30)};\n margin-right: -${rem(30)};\n `}\n\n & > :last-child {\n margin-bottom: 0;\n }\n`\n\nconst Wrapper = styled.div`\n position: relative;\n padding-top: ${rem(96)};\n margin-bottom: ${rem(48)};\n z-index: 1; /* In order to stay on top of Hero */\n transition: margin-top .3s ease-in-out;\n\n ${mediaOnly.xs`\n padding-top: 0;\n margin-bottom: ${rem(64)};\n `}\n\n ${mediaQuery.sm`\n ${({ hasHero }) => (hasHero ? 'margin-top: -160px;' : null)}\n `}\n\n ${mediaQuery.lg`\n ${({ hasHero }) => (hasHero ? 'margin-top: -182px;' : null)}\n `}\n`\n\nconst BackgroundMask = styled.div`\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n height: 40vh;\n background: ${({ theme }) => theme.articleBackground};\n\n ${mediaOnly.xs`\n display: none;\n `}\n\n @media print {\n display: none;\n }\n`\n\nconst WizardWrapper = styled.div`\n margin-top: ${rem(40)};\n`\n\nconst Library = ({\n children,\n hasHero,\n hasPrint,\n printText,\n wizard,\n date,\n breadcrumbs,\n printButton,\n ...rest\n}: Props) => {\n const hasWizard = !!wizard\n\n return (\n \n \n \n {printButton}\n {breadcrumbs}\n {date}\n {children}\n \n {hasWizard && {wizard}}\n \n \n )\n}\n\nexport default Library\n","// @flow\nimport * as React from 'react'\nimport image from './previewModeBadge.png'\nimport type { LinkViewModel } from '../../types/LinkViewModel'\nimport styled from 'styled-components'\n\ntype Props = {\n currentUrl: string,\n link: LinkViewModel,\n}\n\ntype State = {}\n\nconst Badge = styled.a`\n position: absolute;\n top: 0;\n right: 0;\n border: 0;\n width: 120px;\n height: 120px;\n background: url(${image}) no-repeat;\n background-size: 120px 120px;\n z-index: 3;\n`\n\nclass PreviewBadge extends React.Component {\n static displayName = 'PreviewBadge'\n static defaultProps = {}\n\n render() {\n const { link, currentUrl } = this.props\n if (!link || !link.href) return null\n\n return (\n \n )\n }\n}\n\nexport default PreviewBadge\n","// @flow\nimport * as React from 'react'\nimport type { ModuleInstance } from '../modules/modules-utils'\n\ntype Props = {\n modules: Array,\n}\n\ntype State = {}\n\n/**\n * When the page is changed, we reset the focus to the top of the page using the component\n * */\nclass PageFocus extends React.PureComponent {\n static displayName = 'PageFocus'\n\n focusRef: { current: null | HTMLDivElement } = React.createRef()\n\n componentDidUpdate(prevProps: Props) {\n if (this.props.modules !== prevProps.modules && this.focusRef.current) {\n this.focusRef.current.focus()\n }\n }\n\n render() {\n return \n }\n}\n\nexport default PageFocus\n","// @flow\nimport * as React from 'react'\nimport styled from 'styled-components'\nimport { rem } from 'polished'\n\nimport { mediaQuery } from '../../styles/media'\nimport { AreaProvider } from '../AreaContext/AreaContext'\n\ntype Props = {\n children?: React.Node,\n}\n\nconst StickyEl = styled.aside`\n /* @TODO - Get header height with JS */\n position: sticky;\n top: ${rem(176)};\n align-self: flex-start;\n height: auto;\n margin: 0 auto;\n\n ${mediaQuery.md`\n margin: 0 0;\n `};\n\n @media print {\n display: none;\n }\n`\n\nconst Sidebar = ({ children, ...rest }: Props) => (\n \n \n {children}
\n \n \n)\n\nexport default Sidebar\n","// @flow\nimport * as React from 'react'\nimport styled from 'styled-components'\nimport { rem } from 'polished'\nimport consecutive from 'consecutive'\nimport { Link } from 'react-scroll'\n\nimport type { AreaTypes } from '../../types/enums/AreaTypes'\nimport type { AccordionViewModel } from '../../types/AccordionViewModel'\n\nimport { color, effects } from '../../styles/theme'\nimport Ribbon from '../../components/Ribbon/Ribbon'\nimport Sidebar from '../../components/Sidebar/Sidebar'\nimport Heading from '../../components/Heading/Heading'\nimport MediaQuery from '../../components/MediaQuery/MediaQuery'\nimport { getFontSize } from '../../styles/style-helpers'\nimport { mediaQuery } from '../../styles/media'\n\nexport type Props = {\n area?: AreaTypes,\n children?: React.Node,\n sidebar?: Array,\n anchorItems?: Array,\n}\n\ntype State = {}\n\nconst keyGen = consecutive()\n\nconst NarrowWrapper = styled.div`\n background-color: ${color.white};\n margin: 0 -30px;\n padding: ${rem(64)} ${rem(30)};\n ${mediaQuery.sm`\n margin: 0; \n border-radius: ${rem(8)};\n padding: ${rem(96)} ${rem(80)} ${rem(120)} ${rem(96)};\n `}\n\n @media print {\n margin: 0;\n }\n`\n\nconst NarrowWrapperInner = styled.div`\n display: flex;\n flex-direction: column-reverse;\n\n @media only screen and (min-width: 1025px) {\n flex-direction: row;\n }\n`\n\nconst NarrowContent = styled.div`\n width: 100%;\n ${mediaQuery.md`\n margin-right: ${rem(64)};\n `}\n`\n\nconst NarrowSidebar = styled.div`\n margin: 0;\n max-width: ${rem(224)};\n min-width: ${rem(224)};\n`\n\nconst NarrowSidebarDevice = styled.div`\n margin-bottom: ${rem(64)};\n`\n\nconst NarrowNavigation = styled.div`\n margin-bottom: ${rem(40)};\n\n & > a,\n & > button {\n margin-bottom: ${rem(16)};\n }\n`\n\nconst NarrowNavigationTitle = styled(Heading)`\n font-size: ${getFontSize('normal')};\n`\n\nconst NarrowNavigationList = styled.ul`\n margin: 0;\n padding: 0;\n list-style: none;\n`\n\nconst NarrowNavigationListItem = styled.li`\n margin: 0 0 ${rem(24)};\n padding: 0;\n color: ${({ theme }) => theme.primary};\n`\n\nconst NarrowNavigationListLink = styled(Link)`\n text-decoration: none;\n cursor: pointer;\n transition: ${effects().linkHoverTransition};\n color: ${({ theme }) => theme.primary};\n\n &:hover {\n color: ${color.accent};\n }\n`\n\nclass Narrow extends React.Component {\n static displayName = 'Narrow'\n static defaultProps = {}\n\n render() {\n const { children, sidebar, anchorItems } = this.props\n\n return (\n \n \n \n \n {sidebar && sidebar}\n \n {children && children}\n \n {sidebar && sidebar.length ? (\n \n \n {anchorItems && anchorItems.length && (\n \n \n Indhold\n \n \n {anchorItems.map((item, index) => {\n return (\n \n \n {item.anchor && item.anchor.label}\n \n \n )\n })}\n \n \n )}\n {sidebar && sidebar}\n \n \n ) : null}\n \n \n \n \n )\n }\n}\n\nexport default Narrow\n","// @flow\nimport * as React from 'react'\nimport styled from 'styled-components'\nimport { rem } from 'polished'\nimport { animated } from 'react-spring/web.cjs'\n\nimport { color, effects } from '../../styles/theme'\nimport { getFontSize } from '../../styles/style-helpers'\nimport { mediaOnly } from '../../styles/media'\n\nimport BaseButton from '../Button/BaseButton'\nimport InfoIcon from '../../icons/InfoIcon'\nimport RemoveIcon from '../../icons/RemoveIcon'\n\nconst TOAST_TYPES = {\n ERROR: {\n color: 'red',\n },\n WARNING: {\n color: 'yellow',\n },\n INFO: {\n color: 'blue',\n },\n}\n\ntype Props = {\n message: string,\n actions?: Array,\n onClick?: Function,\n style?: Object,\n type?: string,\n contentRef?: Function,\n}\n\ntype Action = {\n label: string,\n handleClick: Function,\n closeOnClick?: boolean,\n}\n\nconst ToastContainer = styled(animated.div)`\n z-index: 20;\n pointer-events: all;\n width: 385px;\n\n ${mediaOnly.xs`\n width: 100%;\n `}\n`\n\nconst StyledInfoIcon = styled(InfoIcon)`\n transition: opacity 0.1s ease-in-out;\n`\nconst StyledRemoveIcon = styled(RemoveIcon)`\n transition: opacity 0.1s ease-in-out;\n margin-left: -24px;\n`\n\nconst Content = styled.div`\n overflow: hidden;\n background: ${({ typeColor }) => color[typeColor]};\n display: flex;\n flex-direction: row;\n align-items: center;\n color: white;\n padding: ${rem(10)} ${rem(15)};\n border-radius: ${({ theme }) =>\n theme.borderRadius ? `${rem(theme.borderRadius)}` : rem(8)};\n opacity: 0.8;\n transition: opacity 0.1s ease-in-out;\n cursor: pointer;\n\n ${StyledRemoveIcon} {\n opacity: 0;\n }\n\n &:hover {\n opacity: 1;\n\n ${StyledInfoIcon} {\n opacity: 0;\n }\n\n ${StyledRemoveIcon} {\n opacity: 1;\n }\n }\n\n ${mediaOnly.xs`\n opacity: 1;\n\n ${StyledInfoIcon} {\n opacity: 0;\n }\n\n ${StyledRemoveIcon} {\n opacity: 1;\n }\n `}\n\n p {\n margin: 0;\n }\n`\n\nconst Message = styled.div`\n flex: 2;\n margin-left: ${rem(15)};\n margin-right: ${rem(10)};\n font-size: ${getFontSize('small')};\n`\n\nconst ActionBar = styled.div`\n display: flex;\n max-width: 30%;\n height: 100%;\n padding-left: ${rem(10)};\n border-left: ${({ theme }) => effects(theme).borderNegative};\n`\n\nconst ActionButton = styled(BaseButton)`\n font-size: ${getFontSize('small')};\n transition: all 0.1s ease-in-out;\n text-transform: uppercase;\n\n :active {\n transform: scale(0.9);\n }\n`\n\nconst Toast = React.forwardRef(\n (\n {\n message,\n type = 'WARNING',\n actions = [],\n onClick,\n style,\n contentRef,\n ...rest\n }: Props,\n ref,\n ) => {\n return (\n \n \n \n \n\n \n {message}
\n \n {actions.length > 0 && (\n \n {actions.map((action, index) => (\n {\n if (!action.closeOnClick) {\n e.stopPropagation()\n }\n action.handleClick()\n }}\n >\n {action.label}\n \n ))}\n \n )}\n \n \n )\n },\n)\n\nToast.displayName = 'Toast'\n\nexport default Toast\n","// @flow\nimport * as React from 'react'\nimport styled from 'styled-components'\nimport { useTransition } from 'react-spring/web.cjs'\n\nimport { NotificationsContext } from '../NotificationsContext/NotificationsContext'\nimport Toast from '../Toast/Toast'\n\ntype Props = {\n children?: React.Node,\n}\n\nexport const Container = styled('div')`\n position: fixed;\n z-index: 1000;\n width: 0 auto;\n top: ${props => (props.top ? '30px' : 'unset')};\n bottom: ${props => (props.top ? 'unset' : '30px')};\n margin: 0 auto;\n left: 30px;\n right: 30px;\n display: flex;\n flex-direction: ${props => (props.top ? 'column-reverse' : 'column')};\n pointer-events: none;\n align-items: ${props =>\n props.position === 'center' ? 'center' : `flex-${props.position || 'end'}`};\n @media (max-width: 680px) {\n align-items: center;\n }\n`\n\nfunction ToastContainer({ children, ...rest }: Props) {\n const { notifications, removeNotification } = React.useContext(\n NotificationsContext,\n )\n\n const [refMap] = React.useState(() => new WeakMap())\n const transitions = useTransition(notifications, item => item.id, {\n from: {\n height: '0px',\n opacity: 1,\n marginTop: '0px',\n filter: 'blur(50px)',\n },\n enter: item => async next => {\n await next({\n // $FlowFixMe\n height: `${refMap.get(item).offsetHeight}px`,\n marginTop: '10px',\n filter: 'blur(0px)',\n opacity: 1,\n })\n },\n leave: item => async next => {\n await next({\n opacity: 0,\n filter: 'blur(50px)',\n })\n await next({\n height: '0px',\n marginTop: '0px',\n })\n },\n config: {\n tension: 210,\n friction: 24,\n },\n })\n\n return (\n \n {transitions.map(({ item, props, key }) => {\n return (\n ref && refMap.set(item, ref)}\n type={item.type}\n message={item.message}\n actions={item.actions}\n onClick={() => removeNotification(item.id)}\n style={props}\n />\n )\n })}\n \n )\n}\n\nToastContainer.displayName = 'ToastContainer'\nToastContainer.defaultProps = {\n position: 'center',\n}\n\nexport default ToastContainer\n","// @flow\nimport * as React from 'react'\nimport DocumentTitle from 'react-document-title'\nimport { ThemeProvider } from 'styled-components'\n\nimport { themes, DEFAULT_THEME } from '../styles/theme'\nimport { splitModules } from '../modules/modules-utils'\n\nimport type { ThemeViewModel } from '../types/ThemeViewModel'\nimport type { ThemeTypes } from '../types/enums/ThemeTypes'\nimport type { ModuleInstance } from '../modules/modules-utils'\nimport type { HtmlConfigViewModel } from '../types/HtmlConfigViewModel'\nimport type { MetaViewModel } from '../types/MetaViewModel'\n\nimport ErrorBoundary from './ErrorBoundary'\nimport Main from '../components/Main/Main'\nimport Article from '../components/Article/Article'\nimport Library from '../components/Library/Library'\nimport PreviewBadge from '../components/PreviewBadge/PreviewBadge'\nimport PageFocus from './PageFocus'\nimport Narrow from '../components/Narrow/Narrow'\nimport NotificationsProvider from '../components/NotificationsContext/NotificationsContext'\nimport ToastContainer from '../components/ToastContainer/ToastContainer'\n\nexport const ConfigContext: React.Context<{\n imgixDomain?: string,\n googleTagManagerId?: string,\n meta: MetaViewModel,\n theme?: string,\n}> = React.createContext({ meta: {} })\n\ntype Props = HtmlConfigViewModel & {\n modules: Array,\n meta: MetaViewModel,\n pathname: string,\n isLoading: boolean,\n}\n\ntype State = {}\n\nclass AppShell extends React.PureComponent {\n static displayName = 'AppShell'\n\n static renderModule(\n module: ?ModuleInstance,\n id?: string,\n debug: boolean = false,\n ) {\n if (!module || !module.module) return null\n return React.createElement(\n ErrorBoundary,\n { debug, module: module.name, key: id },\n React.createElement(module.module, module.props),\n )\n }\n\n getCurrentTheme = (themeName?: ThemeTypes): ThemeViewModel => {\n if (!themeName) return themes[DEFAULT_THEME]\n\n return themes[themeName] || themes[DEFAULT_THEME]\n }\n\n render() {\n const {\n meta,\n modules,\n pathname,\n debug,\n previewLink,\n theme,\n imgixDomain,\n googleTagManagerId,\n } = this.props\n const split = splitModules(modules)\n const hasHero = modules.some(item => {\n if (item.name === 'Hero') {\n const { image, video } = item.props\n const hasMedia = (image && image.src) || (video && video.src)\n return hasMedia\n } else {\n return false\n }\n })\n\n const activeTheme = this.getCurrentTheme(theme)\n\n return (\n \n \n \n \n <>\n {meta.title && (\n \n )}\n {AppShell.renderModule(\n split.cookieDisclaimerModule,\n 'cookieDisclaimer',\n debug,\n )}\n {AppShell.renderModule(split.cookieBanner, 'cookie', debug)}\n {AppShell.renderModule(split.header, 'header', debug)}\n \n {split.preModules.map((module, index) =>\n AppShell.renderModule(\n module,\n `${pathname}_pre_${index}`,\n debug,\n ),\n )}\n\n {/* Render article area content */}\n {split.article.length ? (\n \n {split.article.map((module, index) =>\n AppShell.renderModule(\n module,\n `${pathname}_main_${index}`,\n debug,\n ),\n )}\n \n ) : null}\n\n {/* Render library area content */}\n {split.library.length ? (\n \n {split.library.map((module, index) =>\n AppShell.renderModule(\n module,\n `${pathname}_main_${index}`,\n debug,\n ),\n )}\n \n ) : null}\n\n {/* Render narrow content */}\n {split.narrow.length ? (\n \n AppShell.renderModule(\n module,\n `${pathname}_sidebar_${index}`,\n debug,\n ),\n )}\n anchorItems={split.narrow\n .filter(\n module =>\n module.name === 'Accordion' ||\n module.name === 'ActionTextModule',\n )\n .map(module => module.props)}\n >\n {/* Render narrow area content */}\n {split.narrow.map((module, index) =>\n AppShell.renderModule(\n module,\n `${pathname}_main_${index}`,\n debug,\n ),\n )}\n \n ) : null}\n\n {/* Render wide content */}\n {split.modules.map((module, index) =>\n AppShell.renderModule(module, `${pathname}_${index}`, debug),\n )}\n \n {AppShell.renderModule(split.footer, 'footer', debug)}\n {previewLink ? (\n \n ) : null}\n \n >\n \n \n \n )\n }\n}\n\nexport default AppShell\n","// @flow\nimport * as React from 'react'\n\nconst RemoveIcon = ({ style, color = 'currentColor', ...rest }: Object) => (\n \n)\n\nexport default RemoveIcon\n","// @flow\nexport { RouterLink as default } from './Link'\n","// @flow\nimport * as React from 'react'\nimport withHover from '../hoc/withHover'\n\nconst InfoIcon = ({ style, invert = false, ...rest }: Object) => (\n \n)\n\nexport default withHover>(InfoIcon)\n","// @flow\nimport * as React from 'react'\n\ntype Props = {\n hoverStyle: Object,\n}\n\ntype State = {\n hover: boolean,\n}\n\n// This function takes a component...\nfunction withHover(\n WrappedComponent: React.AbstractComponent,\n): React.AbstractComponent {\n return class extends React.Component