{"version":3,"file":"dynamicComponents-iframeContainer-iframeContainer-3e656e5ce02c74843cf1.js","mappings":"kNAoDA,UA/CwB,SAAH,GAAmC,IAAD,IAA5BA,EAAW,EAAXA,YAAaC,EAAQ,EAARA,SACtCC,EAAAA,WAAe,iBAAC,wFACVF,aAAW,EAAXA,EAAaG,cAAcF,SAAc,QAAN,EAARA,EAAUG,YAAI,WAAN,EAAR,EAAgBC,QAAQ,IAAK,KAAG,gCACtC,IAAIC,SAAQ,SAACC,GAAa,IAAD,GACtC,QAAR,EAAAC,gBAAQ,aAAR,EAAUC,eAAeT,aAAW,EAAXA,EAAaG,aAAcI,GAAQ,EAC9D,IAAG,KAAD,EAFY,QAIZG,YAAW,WACTC,OAAOV,SAASW,KAAI,KAAOZ,aAAW,EAAXA,EAAaG,UAC1C,GAAG,KACJ,2CAEF,CAACH,aAAW,EAAXA,EAAaG,YAEjBD,EAAAA,WAAgB,WACdS,OAAOE,aACL,CAAEC,KAAK,EAAOC,wBAAyB,OACvC,YAEJ,GAAG,IAEH,IAAMC,EAAmB,CACvBC,YAAU,OACPC,EAAAA,QAAAA,WAAoB,SAACC,GAAI,aACxB,gBAAC,OAAW,KACV,gBAAC,SAAa,CACZC,GAAG,WACHC,QAAQ,2FACRC,MAAO,CAAEC,MAAO,OAAQC,OAAQ,OAAQC,OAAQ,SAChDC,IAAKP,SAAU,QAAN,EAAJA,EAAMQ,YAAI,WAAN,EAAJ,EAAYC,IACjBC,YAAY,MAEF,EACd,IAGN,OACE,4BACG7B,aAAW,EAAXA,EAAa8B,kBACZC,EAAAA,EAAAA,GACEC,KAAKC,MAAMjC,SAA2B,QAAhB,EAAXA,EAAa8B,sBAAc,WAAhB,EAAX,EAA6BI,KACxClB,GAIV,C,6GChDamB,EAASC,EAAAA,QAAAA,OAAAA,WAAa,yEAAbA,CAAa,iCAKtBC,EAAOD,EAAAA,QAAAA,IAAAA,WAAU,uEAAVA,CAAU,4G","sources":["webpack://bluewave-energy/./src/dynamicComponents/iframeContainer/iframeContainer.js","webpack://bluewave-energy/./src/dynamicComponents/iframeContainer/iframeContainerStyles.js"],"sourcesContent":["import React from 'react';\nimport * as Styled from './iframeContainerStyles';\nimport { INLINES } from '@contentful/rich-text-types';\nimport { documentToReactComponents } from '@contentful/rich-text-react-renderer';\n\nconst IframeContainer = ({ 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 React.useEffect(() => {\n window.iFrameResize(\n { log: false, heightCalculationMethod: 'max' },\n '#vizi_mjp'\n );\n }, []);\n\n const optionsMainStyle = {\n renderNode: {\n [INLINES.HYPERLINK]: (node) => (\n \n \n \n ),\n },\n };\n return (\n
\n {sectionData?.contentDetails &&\n documentToReactComponents(\n JSON.parse(sectionData?.contentDetails?.raw),\n optionsMainStyle\n )}\n
\n );\n};\n\nexport default IframeContainer;\n","import styled from 'styled-components';\n\nexport const Iframe = styled.iframe`\n min-width: 100%;\n border: none;\n`;\n\nexport const Body = styled.div`\n overflow-y: scroll;\n -webkit-overflow-scrolling:touch;\n height: 650px;\n @media (max-width: 767px) {\n height: 550px;\n }\n`;\n"],"names":["sectionData","location","React","elementId","hash","replace","Promise","resolve","document","getElementById","setTimeout","window","href","iFrameResize","log","heightCalculationMethod","optionsMainStyle","renderNode","INLINES","node","id","sandbox","style","width","border","height","src","data","uri","frameborder","contentDetails","documentToReactComponents","JSON","parse","raw","Iframe","styled","Body"],"sourceRoot":""}