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A,cAAoBC,EAAAA,EAAAA,MAAS,CAAEmE,gBAAgB,EAAMhB,eAAgBA,EAAgBiB,YAAY,GAAQpB,EAAMqB,KAAI,CAACC,EAAMC,IAAOxE,EAAAA,cAAoBC,EAAAA,EAAAA,KAAQ,CAAEwE,IAAM,QAAOD,KAIxL,SAAwBD,EAAMG,GAC1B,OAAQxB,GACJ,KAAK7D,EAAAA,EAAAA,KACD,OAAOW,EAAAA,cAAoB2E,EAAAA,EAAa,CAAEF,IAAM,QAAOC,OAAYH,EAAM1E,MAAOA,IACpF,KAAKR,EAAAA,EAAAA,QACD,OAAOW,EAAAA,cAAoB4E,EAAAA,EAAS,CAAEH,IAAM,QAAOC,OAAYH,EAAM1E,MAAOA,IAChF,KAAKR,EAAAA,EAAAA,OACD,OAAOW,EAAAA,cAAoB6E,EAAAA,EAAW,CAAEJ,IAAM,QAAOC,OAAYH,EAAM1E,MAAOA,IAClF,KAAKR,EAAAA,EAAAA,UACL,KAAKA,EAAAA,EAAAA,aACD,OAAQW,EAAAA,cAAoB8E,EAAAA,EAAc,CAAEL,IAAM,QAAOC,OAAYH,EAAM1E,MAAOA,IAE9F,CAhB+LkF,CAAeR,EAAMC,OACxMxE,EAAAA,cAAoBgF,EAAAA,EAAW,MAAOC,GAAcjF,EAAAA,cAAoBC,EAAAA,EAAAA,kBAAqB,KACzFD,EAAAA,cAAoBC,EAAAA,EAAAA,WAAc,KAC9BD,EAAAA,cAAoBkF,EAAAA,EAAe,CAAEC,UAAWhC,EAAqBW,MAAOmB,EAASG,SAAW,EAAGC,MAAOJ,EAASK,YAAaC,SAAWb,GAAUO,EAASO,UAAUd,YAVjL,IAuBX,G","sources":["webpack://royal-geographical-society/./src/core/enums.ts","webpack://royal-geographical-society/./src/stories/Components/Cards/ArticleCard/ArticleCard.tsx","webpack://royal-geographical-society/./src/stories/Components/Cards/CtaCard/CtaCard.tsx","webpack://royal-geographical-society/./src/stories/Components/Cards/ResourceCard/ResourceCard.styles.ts","webpack://royal-geographical-society/./src/stories/Components/Cards/ResourceCard/ResourceCard.tsx","webpack://royal-geographical-society/./src/stories/Widgets/RelatedCards/RelatedCards.tsx"],"sourcesContent":["export var PageType;\r\n(function (PageType) {\r\n PageType[\"Content\"] = \"content\";\r\n PageType[\"Events\"] = \"events\";\r\n PageType[\"News\"] = \"news\";\r\n PageType[\"Resources\"] = \"resources\";\r\n PageType[\"CGeogMembers\"] = \"cGeogMember\";\r\n})(PageType || (PageType = {}));\r\n","import { imageUrl } from '@helpers/image';\r\nimport { getSvgFromSystem, SystemIcon } from '@helpers/systemIcons';\r\nimport React from 'react';\r\nimport { ArticleCardStyles as S } from './ArticleCard.styles';\r\nconst ArticleCard = ({ categoryTag, content, cta, date, featured = false, hideImage = false, image, theme, title, translations, }) => {\r\n return (React.createElement(S.Container, { as: \"a\", href: cta?.url, target: cta?.target ?? '_self', id: cta?.id, title: cta.text ?? translations['translations.global.btn.moreInfo'], \"data-featured\": featured ? '' : null, \"data-component-theme\": theme },\r\n !hideImage && (React.createElement(S.ImageWrapper, null,\r\n categoryTag && React.createElement(S.CategoryTag, null, categoryTag),\r\n React.createElement(S.Image, { alt: image.altText, loading: \"lazy\", role: image.altText ? undefined : 'presentation', src: featured\r\n ? imageUrl(image, { width: 564, height: 330 })\r\n : imageUrl(image, { width: 368, height: 280 }), width: featured ? '564' : '368', height: featured ? '330' : '280' }))),\r\n React.createElement(S.NewsCardContent, null,\r\n React.createElement(S.Title, null, title),\r\n React.createElement(S.Content, null, content),\r\n date && (React.createElement(S.ArticleInfo, null, date && (React.createElement(S.ArticleInfoItem, null,\r\n React.createElement(S.ArticleInfoItemIcon, null, getSvgFromSystem(SystemIcon.Calendar)),\r\n date)))),\r\n React.createElement(S.ArrowIcon, null, getSvgFromSystem(SystemIcon.HoverArrowRight)))));\r\n};\r\nexport default ArticleCard;\r\n","import { ThemeOption } from '@helpers/brand';\r\nimport { imageUrl } from '@helpers/image';\r\nimport { SystemIcon, getSvgFromSystem } from '@helpers/systemIcons';\r\nimport React from 'react';\r\nimport { CtaCardStyles as S } from './CtaCard.styles';\r\nimport { ctaClasses } from '@helpers/trackingClasses';\r\nconst CtaCard = ({ content, cta, firstFeatured = false, image, theme = ThemeOption.Orange, title, }) => {\r\n const defaultImageSize = { width: 348, height: 288 };\r\n const featuredImageSize = { width: 348, height: 368 };\r\n const imageSize = firstFeatured ? featuredImageSize : defaultImageSize;\r\n return (React.createElement(S.Container, { href: cta?.url, target: cta?.target ?? '_self', id: cta?.id, title: title, \"data-component-theme\": theme, className: ctaClasses.cards },\r\n React.createElement(S.Image, { alt: image.altText, loading: \"lazy\", role: image.altText ? undefined : 'presentation', src: imageUrl(image, { ...imageSize }), width: '348', height: firstFeatured ? '368' : '288' }),\r\n React.createElement(S.ContentWrapper, null,\r\n React.createElement(S.Title, null, title),\r\n React.createElement(S.ArrowIcon, null, getSvgFromSystem(SystemIcon.HoverArrowRight)),\r\n content && React.createElement(S.Content, null, content))));\r\n};\r\nexport default CtaCard;\r\n","import brand from '@helpers/brand';\r\nimport { fluid } from '@helpers/fluid';\r\nimport fonts from '@helpers/fonts';\r\nimport { Device, from } from '@helpers/media';\r\nimport { paragraphSmall } from '@helpers/typography';\r\nimport styled from 'styled-components';\r\nimport { ArticleCardStyles } from '../ArticleCard/ArticleCard.styles';\r\nimport { CtaCardStyles } from '../CtaCard/CtaCard.styles';\r\nimport { InformationCardStyles } from '../InformationCard/InformationCard.styles';\r\nconst Container = styled(ArticleCardStyles.Container) `\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n`;\r\nconst ImageWrapper = styled(ArticleCardStyles.ImageWrapper) ``;\r\nconst CategoryTag = styled(ArticleCardStyles.CategoryTag) ``;\r\nconst Image = styled(ArticleCardStyles.Image) ``;\r\nconst CardContent = styled(InformationCardStyles.Content) `\r\n position: relative;\r\n padding-bottom: 79px;\r\n\r\n ${Container}[data-memberOnlyContent=true] & {\r\n padding-bottom: 20px;\r\n }\r\n\r\n ${Container}[data-featured] & {\r\n background-color: var(--themeColor);\r\n padding: 20px 30px 79px;\r\n }\r\n\r\n ${Container}[data-featured][data-memberOnlyContent=true] & {\r\n background-color: var(--themeColor);\r\n padding: 20px 30px 0;\r\n }\r\n`;\r\nconst Title = styled(ArticleCardStyles.Title) ``;\r\nconst Content = styled.p `\r\n ${paragraphSmall};\r\n margin-bottom: 10px;\r\n\r\n ${Container}[data-featured] & {\r\n color: ${brand.white};\r\n }\r\n`;\r\nconst ArticleInfo = styled.div ``;\r\nconst ArticleInfoItem = styled(ArticleCardStyles.ArticleInfoItem) ``;\r\nconst ArticleInfoItemIcon = styled.div `\r\n display: flex;\r\n align-items: center;\r\n width: 16px;\r\n margin-right: 7px;\r\n`;\r\nconst ArrowIcon = styled(CtaCardStyles.ArrowIcon) `\r\n top: auto;\r\n bottom: 10px;\r\n right: 15px;\r\n\r\n @media ${from(Device.MobileLarge)} {\r\n top: auto;\r\n bottom: 10px;\r\n right: 20px;\r\n\r\n ${Container}[data-featured] & {\r\n bottom: 20px;\r\n right: 30px;\r\n }\r\n }\r\n\r\n ${Container}[data-featured] & {\r\n background-color: ${brand.white};\r\n\r\n svg {\r\n path:first-child {\r\n stroke: var(--themeColor);\r\n }\r\n }\r\n }\r\n`;\r\nconst MemberOnlyContent = styled.div `\r\n position: relative;\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n width: 100%;\r\n margin-top: auto;\r\n padding: 10px ${fluid(15, 20)};\r\n color: ${brand.white};\r\n text-transform: uppercase;\r\n background-color: var(--themeColor);\r\n\r\n > span {\r\n ${fonts.agBook.regular};\r\n font-size: ${fluid(16, 18)};\r\n line-height: ${fluid(19, 22)};\r\n margin-left: ${fluid(12, 32)};\r\n }\r\n\r\n ${ArrowIcon} {\r\n position: relative;\r\n bottom: auto;\r\n right: auto;\r\n background-color: ${brand.white};\r\n\r\n @media ${from(Device.MobileLarge)} {\r\n top: auto;\r\n bottom: auto;\r\n }\r\n\r\n svg {\r\n path {\r\n &:first-child {\r\n stroke: var(--themeColor);\r\n }\r\n }\r\n }\r\n }\r\n\r\n ${Container}[data-featured] & {\r\n width: calc(100% + 60px);\r\n margin-left: -30px;\r\n padding: 10px 30px;\r\n background-color: ${brand.white};\r\n color: var(--themeColor);\r\n\r\n ${ArrowIcon} {\r\n position: relative;\r\n bottom: auto;\r\n right: auto;\r\n background-color: var(--themeColor);\r\n\r\n svg {\r\n path {\r\n &:first-child {\r\n stroke: ${brand.white};\r\n }\r\n }\r\n }\r\n }\r\n }\r\n`;\r\nexport const ResourceCardStyles = {\r\n ArrowIcon,\r\n CardContent,\r\n CategoryTag,\r\n Container,\r\n Content,\r\n ArticleInfo,\r\n ArticleInfoItem,\r\n ArticleInfoItemIcon,\r\n Image,\r\n ImageWrapper,\r\n MemberOnlyContent,\r\n Title,\r\n};\r\n","import { imageUrl } from '@helpers/image';\r\nimport { getSvgFromSystem, SystemIcon } from '@helpers/systemIcons';\r\nimport React from 'react';\r\nimport { ResourceCardStyles as S } from './ResourceCard.styles';\r\nconst ResourceCard = ({ categoryTag, content, cta, featured = false, hideImage = false, image, memberOnlyContent = false, theme, title, translations, }) => {\r\n return (React.createElement(S.Container, { as: \"a\", href: cta.url, title: cta.text ?? translations['translations.global.btn.moreInfo'], id: cta.id, \"data-memberOnlyContent\": memberOnlyContent, \"data-featured\": featured ? '' : null, \"data-component-theme\": theme },\r\n !hideImage && (React.createElement(S.ImageWrapper, null,\r\n categoryTag && React.createElement(S.CategoryTag, null, categoryTag),\r\n React.createElement(S.Image, { alt: image.altText, loading: \"lazy\", role: image.altText ? undefined : 'presentation', src: featured\r\n ? imageUrl(image, { width: 564, height: 330 })\r\n : imageUrl(image, { width: 368, height: 280 }), width: featured ? '564' : '368', height: featured ? '330' : '280' }))),\r\n React.createElement(S.CardContent, null,\r\n React.createElement(S.Title, null, title),\r\n React.createElement(S.Content, null, content),\r\n !memberOnlyContent && (React.createElement(S.ArrowIcon, null, getSvgFromSystem(SystemIcon.HoverArrowRight))),\r\n memberOnlyContent && featured && (React.createElement(S.MemberOnlyContent, null,\r\n React.createElement(\"span\", null, translations['translations.global.memberOnlyContent']),\r\n React.createElement(S.ArrowIcon, null, getSvgFromSystem(SystemIcon.HoverArrowRight))))),\r\n memberOnlyContent && !featured && (React.createElement(S.MemberOnlyContent, null,\r\n React.createElement(\"span\", null, translations['translations.global.memberOnlyContent']),\r\n React.createElement(S.ArrowIcon, null, getSvgFromSystem(SystemIcon.HoverArrowRight))))));\r\n};\r\nexport default ResourceCard;\r\n","import { PageType } from '@core/enums';\r\nimport { ThemeOption } from '@helpers/brand';\r\nimport { Device, until } from '@helpers/media';\r\nimport { withMotionMax } from '@hoc/withMotionMax';\r\nimport ArticleCard from '@stories/Components/Cards/ArticleCard/ArticleCard';\r\nimport CtaCard from '@stories/Components/Cards/CtaCard/CtaCard';\r\nimport EventCard from '@stories/Components/Cards/EventCard/EventCard';\r\nimport ResourceCard from '@stories/Components/Cards/ResourceCard/ResourceCard';\r\nimport CarouselProvider from '@stories/Components/Carousels/Carousel/CarouselProvider/CarouselProvider';\r\nimport Connected from '@stories/Components/Carousels/Carousel/Connected/Connected';\r\nimport DotPagination from '@stories/Components/Global/DotPagination/DotPagination';\r\nimport { MotionConfig } from 'framer-motion';\r\nimport React from 'react';\r\nimport { useMedia } from 'react-use';\r\nimport { RelatedCardsStyles as S } from './RelatedCards.styles';\r\nconst RelatedCards = ({ content, id, items, pageType, paginationAriaLabel, theme = ThemeOption.Orange, }) => {\r\n // Only want carousel behavior on mobile layout.\r\n const enableCarousel = useMedia(until(Device.TabletSmall), false);\r\n const wrapper = React.useRef(null);\r\n if (!items.length) {\r\n return null;\r\n }\r\n return (React.createElement(MotionConfig, { transition: { duration: 0.45, ease: 'easeOut' } },\r\n React.createElement(CarouselProvider, { count: items.length },\r\n React.createElement(S.ContentContainer, { id: id, innerWidth: \"narrow\", flush: \"top\" },\r\n React.createElement(S.Content, { dangerouslySetInnerHTML: { __html: content } })),\r\n items && (React.createElement(S.CardsContainer, { ref: wrapper, innerWidth: \"reduced\", \"data-page-type\": pageType },\r\n React.createElement(S.Track, { trackMutations: true, enableCarousel: enableCarousel, mobileOnly: true }, items.map((item, i) => (React.createElement(S.Item, { key: `card-${i}` }, renderCardType(item, i))))),\r\n React.createElement(Connected, null, (carousel) => (React.createElement(S.PaginationWrapper, null,\r\n React.createElement(S.Pagination, null,\r\n React.createElement(DotPagination, { ariaLabel: paginationAriaLabel, count: carousel.maxIndex + 1, value: carousel.activeIndex, onChange: (index) => carousel.goToIndex(index) }))))))))));\r\n function renderCardType(item, index) {\r\n switch (pageType) {\r\n case PageType.News:\r\n return React.createElement(ArticleCard, { key: `item-${index}`, ...item, theme: theme });\r\n case PageType.Content:\r\n return React.createElement(CtaCard, { key: `item-${index}`, ...item, theme: theme });\r\n case PageType.Events:\r\n return React.createElement(EventCard, { key: `item-${index}`, ...item, theme: theme });\r\n case PageType.Resources:\r\n case PageType.CGeogMembers:\r\n return (React.createElement(ResourceCard, { key: `item-${index}`, ...item, theme: theme }));\r\n }\r\n }\r\n};\r\nexport default withMotionMax(RelatedCards);\r\n"],"names":["PageType","categoryTag","content","cta","date","featured","hideImage","image","theme","title","translations","React","S","as","href","url","target","id","text","alt","altText","loading","role","undefined","src","imageUrl","width","height","getSvgFromSystem","SystemIcon","firstFeatured","ThemeOption","imageSize","className","ctaClasses","Container","styled","ArticleCardStyles","ImageWrapper","CategoryTag","Image","CardContent","InformationCardStyles","Title","Content","paragraphSmall","brand","ArticleInfo","ArticleInfoItem","ArticleInfoItemIcon","ArrowIcon","CtaCardStyles","from","Device","ResourceCardStyles","MemberOnlyContent","fluid","fonts","memberOnlyContent","withMotionMax","items","pageType","paginationAriaLabel","enableCarousel","useMedia","until","wrapper","length","MotionConfig","transition","duration","ease","CarouselProvider","count","innerWidth","flush","dangerouslySetInnerHTML","__html","ref","trackMutations","mobileOnly","map","item","i","key","index","ArticleCard","CtaCard","EventCard","ResourceCard","renderCardType","Connected","carousel","DotPagination","ariaLabel","maxIndex","value","activeIndex","onChange","goToIndex"],"sourceRoot":""}