{"version":3,"file":"components-dynamic-richTextImageParagraphLeftAligned-richTextImageParagraphLeftAligned-9e785ee17217e65da83e.js","mappings":"iPAuGA,UAhG0C,SAAC,GAA+B,IAAD,IAA5BA,EAA4B,EAA5BA,YAAaC,EAAe,EAAfA,SACxDC,EAAAA,WAAA,iBAAgB,wFACVF,aAAA,EAAAA,EAAaG,cAAcF,SAA3B,UAA2BA,EAAUG,YAArC,aAA2B,EAAgBC,QAAQ,IAAK,KAD9C,gCAEW,IAAIC,SAAQ,SAACC,GAAa,IAAD,GACtC,QAAR,EAAAC,gBAAA,eAAUC,eAAeT,aAAzB,EAAyBA,EAAaG,aAAcI,GAAQ,EAC7D,IAJW,eAMVG,YAAW,WACTC,OAAOV,SAASW,KAAhB,KAA2BZ,aAA3B,EAA2BA,EAAaG,UACzC,GAAE,KARO,2CAWb,CAACH,aAAD,EAACA,EAAaG,YAEjB,IAAMU,EAAmB,CACvBC,YAAU,OACPC,EAAAA,GAAAA,WAAmB,SAACC,EAAMC,GAAP,OAClB,gBAAC,WAAD,KAAkBA,EADA,EADZ,EAIPF,EAAAA,GAAAA,WAAmB,SAACC,EAAMC,GAAP,OAClB,gBAAC,WAAD,KAAkBA,EADA,EAJZ,EAOPF,EAAAA,GAAAA,WAAmB,SAACC,EAAMC,GAAP,OAClB,gBAAC,UAAD,KAAiBA,EADC,EAPZ,EAUPF,EAAAA,GAAAA,WAAmB,SAACC,EAAMC,GAAP,OAClB,gBAAC,WAAD,KAAkBA,EADA,EAVZ,EAaPF,EAAAA,GAAAA,SAAiB,SAACC,EAAMC,GAAP,OAChB,gBAAC,gBAAD,KAAuBA,EADP,EAbV,EAgBPF,EAAAA,GAAAA,WAAmB,SAACC,EAAMC,GAAP,OAClB,gBAAC,WAAD,KAAkBA,EADA,EAhBZ,EAmBPC,EAAAA,GAAAA,WAAoB,SAACF,EAAMC,GAAP,mBACnB,gBAAC,YAAD,CACEL,MACEO,EAAAA,EAAAA,IAAkBH,SAAD,UAACA,EAAMI,Y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,KAAKC,MAAM9C,EAAY2C,eAAeI,KACtClC,GAIT,C,qeCpGYmC,EAAOC,EAAAA,QAAAA,IAAAA,WAAH,wFAAGA,CAAH,wBAGJC,EAAaD,EAAAA,QAAAA,IAAAA,WAAH,8FAAGA,CAAH,mHAWVE,EAAYF,EAAAA,QAAAA,EAAAA,WAAH,6FAAGA,CAAH,yhBA+BTG,EAAUH,EAAAA,QAAAA,GAAAA,WAAH,2FAAGA,CAAH,iPAePI,EAAYJ,EAAAA,QAAAA,IAAAA,WAAH,6FAAGA,CAAH,2GAUTK,EAAWL,EAAAA,QAAAA,GAAAA,WAAH,4FAAGA,CAAH,wVAoBRM,EAAWN,EAAAA,QAAAA,EAAAA,WAAH,4FAAGA,CAAH,wvBAwCRO,EAAgBP,EAAAA,QAAAA,GAAAA,WAAH,iGAAGA,CAAH,kCAIbQ,EAAWR,EAAAA,QAAAA,GAAAA,WAAH,4FAAGA,CAAH,qMAKjBM,GAUSG,EAAWT,EAAAA,QAAAA,GAAAA,WAAH,4FAAGA,CAAH,qRAkBRU,GAAiBV,EAAAA,EAAAA,SAAOM,GAAV,8GAAGN,CAAH,wBAIdW,EAAiBX,EAAAA,QAAAA,IAAAA,WAAH,mGAAGA,CAAH,2EAOdY,EAASZ,EAAAA,QAAAA,OAAAA,WAAH,2FAAGA,CAAH,0GAUNa,EAASb,EAAAA,QAAAA,GAAAA,WAAH,2FAAGA,CAAH,8P","sources":["webpack://the-burnaby-refinery/./src/components/dynamic/richTextImageParagraphLeftAligned/richTextImageParagraphLeftAligned.js","webpack://the-burnaby-refinery/./src/components/dynamic/richTextImageParagraphLeftAligned/richTextImageParagraphLeftAlignedStyles.js"],"sourcesContent":["import React from 'react';\nimport * as Styled from './richTextImageParagraphLeftAlignedStyles';\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 RichTextImageParagraphLeftAligned = ({ sectionData, location }) => {\n React.useEffect(async () => {\n if (sectionData?.elementId === location?.hash?.replace('#', '')) {\n const waitedID = await new Promise((resolve) => {\n document?.getElementById(sectionData?.elementId) && resolve(true);\n });\n if (waitedID) {\n setTimeout(() => {\n window.location.href = `#${sectionData?.elementId}`;\n }, 500);\n }\n }\n }, [sectionData?.elementId]);\n\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.HEADING_4]: (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 \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 RichTextImageParagraphLeftAligned;\n","import styled from 'styled-components';\n\nexport const Body = styled.div`\n text-align: center;\n`;\nexport const ImageStyle = styled.img`\n width: auto;\n height: 120px;\n border: 0;\n vertical-align: top;\n margin: 0 0 30px 0;\n @media (max-width: 991px) {\n height: 150px;\n }\n`;\n\nexport const LinkStyle = styled.a`\n font-family: 'Adelle-Bold', sans-serif;\n font-size: 17px;\n line-height: 32px;\n color: rgba(0, 0, 0, 0.6);\n text-decoration: none;\n color: #55aa4c;\n transition: 0.25s ease-out;\n code {\n display: inline-block;\n position: relative;\n padding: 16px 60px 14px;\n font-family: interstate, sans-serif;\n font-weight: 700;\n font-style: normal;\n font-size: 16px;\n line-height: 24px;\n text-transform: uppercase;\n margin-right: 0px;\n color: rgb(255, 255, 255);\n background-color: rgb(31, 178, 90);\n border-bottom: 4px solid rgb(0, 135, 82);\n text-decoration: none;\n :hover {\n background-color: #55aa4c;\n }\n }\n :hover {\n color: #0397d6;\n }\n`;\nexport const Header3 = styled.h3`\n margin: 0px 0px 40px;\n font-family: interstate, sans-serif;\n font-weight: 400;\n font-style: normal;\n font-size: 35px;\n line-height: 40px;\n color: rgb(0, 105, 170);\n text-align: left;\n @media (max-width: 767px) {\n margin: 0px 0px 30px;\n font-size: 20px;\n line-height: 22px;\n }\n`;\nexport const SpanStyle = styled.div`\n position: absolute;\n top: -75px;\n @media (max-width: 1199px) {\n top: -80px;\n }\n @media (max-width: 767px) {\n top: -90px;\n }\n`;\nexport const HeaderH4 = styled.h4`\n margin: 0px 0px 40px;\n padding: 0px 0px 15px;\n font-family: interstate, sans-serif;\n font-weight: 700;\n font-style: normal;\n font-size: 22px;\n line-height: 26px;\n text-align: left;\n text-transform: uppercase;\n color: rgb(3, 151, 214);\n border-bottom: 2px solid rgba(0, 0, 0, 0.15);\n overflow: hidden;\n @media (max-width: 767px) {\n margin: 0px 0px 30px;\n font-size: 18px;\n line-height: 20px;\n }\n`;\n\nexport const ParaText = styled.p`\n margin: 0 0 40px 0;\n padding: 0;\n text-align: left;\n font-family: 'Gotham-Regular', arial, sans-serif !important;\n font-size: 17px !important;\n line-height: 32px !important;\n color: rgba(0, 0, 0, 0.8) !important;\n a > code {\n display: inline-block;\n position: relative;\n padding: 16px 60px 14px;\n font-family: interstate, sans-serif;\n font-weight: 700;\n font-style: normal;\n font-size: 16px;\n line-height: 24px;\n text-transform: uppercase;\n margin-right: 0px;\n color: rgb(255, 255, 255);\n background-color: rgb(31, 178, 90);\n border-bottom: 4px solid rgb(0, 135, 82);\n text-decoration: none;\n @media (max-width: 767px) {\n font-size: 15px !important;\n line-height: 23px !important;\n }\n :hover {\n background-color: #0397d6;\n }\n }\n\n @media (max-width: 1399px) {\n margin: 0 0 30px 0;\n }\n @media (max-width: 767px) {\n font-size: 15px !important;\n line-height: 23px !important;\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-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: left;\n position: relative;\n margin: 0 0 35px 0;\n font-family: 'Adelle-Bold', sans-serif;\n font-size: 45px;\n line-height: 50px;\n color: #0e4c80;\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: 'Adelle-Bold', sans-serif;\n font-weight: normal !important;\n color: #0e4c80;\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","location","React","elementId","hash","replace","Promise","resolve","document","getElementById","setTimeout","window","href","optionsMainStyle","renderNode","BLOCKS","node","children","INLINES","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","SpanStyle","HeaderH4","ParaText","ListContainer","ListText","HeaderH2","ItalicParaText","VideoContainer","Iframe","Header"],"sourceRoot":""}