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iFAAGA,CAAH","sources":["webpack://commercial-ultramar/./src/components/richTextImageParagraph/richTextImageParagraph.js","webpack://commercial-ultramar/./src/components/richTextImageParagraph/richTextImageParagraphStyles.js"],"sourcesContent":["import React from 'react';\nimport * as Styled from './richTextImageParagraphStyles';\nimport { documentToReactComponents } from '@contentful/rich-text-react-renderer';\nimport { BLOCKS, INLINES, MARKS } from '@contentful/rich-text-types';\nimport useContentfulAssets from '../../hooks/useContentfulAssets';\nimport isExternalUrl, { addTrailingSlash, isExternalUrlHref } from '../../utils';\n\nconst RichTextImageParagraph = ({ sectionData }) => {\n const optionsMainStyle = {\n renderNode: {\n [BLOCKS.PARAGRAPH]: (node, children) => (\n {children}\n ),\n [BLOCKS.HEADING_2]: (node, children) => (\n {children}\n ),\n [BLOCKS.HEADING_3]: (node, children) => (\n {children}\n ),\n [BLOCKS.UL_LIST]: (node, children) => (\n {children}\n ),\n [BLOCKS.LIST_ITEM]: (node, children) => (\n {children}\n ),\n [INLINES.HYPERLINK]: (node, children) => (\n \n {children}\n \n ),\n [MARKS.ITALIC]: (node, children) => (\n {children}\n ),\n [INLINES.ASSET_HYPERLINK]: (node, children) => (\n \n {children}\n \n ),\n\n [BLOCKS.EMBEDDED_ASSET]: (node) => {\n const asset = useContentfulAssets(node.data.target.sys.id);\n if (asset) {\n return (\n \n );\n }\n },\n },\n renderText: (text) =>\n text.split('\\n').flatMap((text, i) => [i > 0 &&
, text]),\n };\n return (\n \n {sectionData.header && sectionData?.header?.trim() && (\n {sectionData.header}\n )}\n {sectionData.contentDetails &&\n documentToReactComponents(\n JSON.parse(sectionData.contentDetails.raw),\n optionsMainStyle\n )}\n \n );\n};\nexport default RichTextImageParagraph;\n","import styled from 'styled-components';\nimport IconArrowYellowRight from '../../images/icon-arrow-yellow-right.png';\n\nexport const Body = styled.div`\n text-align: center;\n @media (max-width: 991px) {\n padding: 35px;\n }\n`;\nexport const ImageStyle = styled.img`\n width: auto;\n height: 150px;\n border: 0;\n vertical-align: top;\n margin: 0 0 30px 0;\n @media (max-width: 991px) {\n height: 150px;\n }\n`;\nexport const LinkStyle = styled.a`\n font-family: 'HelveticaNeue-Light', arial, sans-serif;\n font-size: 20px;\n line-height: 32px;\n color: rgba(0, 0, 0, 0.6);\n text-decoration: none;\n color: #00a6e8;\n transition: 0.25s ease-out;\n`;\nexport const Header3 = styled.h3`\n margin: 0 0 35px 0;\n font-family: 'HelveticaNeue-Light', sans-serif;\n font-size: 32px;\n line-height: 37px;\n color: #00a6e8;\n @media (max-width: 1439px) {\n font-size: 28px;\n line-height: 32px;\n margin-bottom: 30px;\n }\n @media (max-width: 767px) {\n font-size: 25px;\n line-height: 30px;\n }\n`;\nexport const ParaText = styled.p`\n margin: 0 0 40px 0;\n padding: 0;\n font-family: 'HelveticaNeue-Light', arial, sans-serif;\n font-size: 20px;\n line-height: 32px;\n color: rgba(0, 0, 0, 0.6);\n a > code {\n display: inline-block;\n position: relative;\n top: 0;\n padding: 15px 35px;\n margin-right: 10px;\n margin-bottom: 40px;\n font-family: 'MrAlex', sans-serif;\n font-size: 24px;\n line-height: 28px;\n text-transform: uppercase;\n font-weight: bold;\n color: #00a6e8;\n border: 2px solid #00a6e8;\n box-shadow: 0 0 0 2px rgb(255 255 255 / 0%);\n border-radius: 100px;\n cursor: pointer;\n text-decoration: none;\n /* code {\n font: inherit;\n } */\n @media (max-width: 1399px) {\n font-size: 20px;\n line-height: 24px;\n margin-bottom: 30px;\n }\n @media (max-width: 1199px) {\n font-size: 25px;\n line-height: 25px;\n }\n\n @media (max-width: 767px) {\n font-size: 22px;\n line-height: 25px;\n }\n :hover {\n top: -5px;\n color: #f7991c;\n border-color: #f7991c;\n box-shadow: 0 5px 0 0 #f7991c;\n }\n }\n @media (max-width: 1399px) {\n margin: 0 0 30px 0;\n }\n`;\nexport const ListContainer = styled.ul`\n padding: 0;\n margin: 0 0 30px 0;\n`;\nexport const ListText = styled.li`\n padding: 0 0 15px 30px;\n background: url(${IconArrowYellowRight}) no-repeat 0 9px;\n background-size: 10px auto;\n list-style: none;\n margin: 0;\n ${ParaText} {\n margin: 0;\n }\n @media (max-width: 1399px) {\n background-position: 0 9px;\n }\n @media (max-width: 767px) {\n background-position: 0 5px;\n }\n`;\nexport const HeaderH2 = styled.h2`\n text-align: center;\n position: relative;\n margin: 0 0 35px 0;\n font-family: 'MrAlex', sans-serif;\n font-size: 45px;\n line-height: 50px;\n color: #00539d;\n @media (max-width: 1399px) {\n font-size: 40px;\n line-height: 45px;\n margin-bottom: 30px;\n }\n @media (max-width: 767px) {\n font-size: 30px;\n line-height: 35px;\n }\n`;\nexport const ItalicParaText = styled(ParaText)`\n font-style: italic;\n`;\n\nexport const VideoContainer = styled.div`\n position: relative;\n width: 100%;\n padding-bottom: 56%;\n margin: 40px 0 40px 0;\n`;\n\nexport const Iframe = styled.iframe`\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 100%;\n height: 100%;\n box-shadow: 0 1px 3px #969696;\n`;\nexport const Header = styled.h1`\n font-family: 'MrAlex', sans-serif;\n font-weight: normal !important;\n color: #00539d;\n font-size: 45px;\n line-height: 50px;\n margin-bottom: 10px;\n @media (max-width: 1399px) {\n font-size: 40px;\n line-height: 45px;\n }\n @media (max-width: 767px) {\n font-size: 30px;\n line-height: 35px;\n }\n`;\n"],"names":["sectionData","optionsMainStyle","renderNode","BLOCKS","node","children","INLINES","href","isExternalUrlHref","data","uri","addTrailingSlash","process","target","isExternalUrl","MARKS","asset","useContentfulAssets","sys","id","src","file","url","alt","title","renderText","text","split","flatMap","i","header","trim","contentDetails","documentToReactComponents","JSON","parse","raw","Body","styled","ImageStyle","LinkStyle","Header3","ParaText","ListContainer","ListText","IconArrowYellowRight","HeaderH2","ItalicParaText","VideoContainer","Iframe","Header"],"sourceRoot":""}