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AQ,IACpC,OAAOC","sources":["webpack://_N_E/./src/components/LandingBlock/TextBlock/styled.tsx","webpack://_N_E/./src/components/LandingBlock/TextBlock/index.tsx","webpack://_N_E/./src/helpers/getTextWithTag.ts","webpack://_N_E/./src/helpers/isHtmlWithText.ts"],"sourcesContent":["import styled from 'styled-components';\nimport GridContainer from '@r1-frontend/ui-react/components/layouts/gridContainer';\nimport { COLORS } from '@r1-frontend/ui-react/assets/js/constants';\nimport { fonts } from '~/src/helpers/font';\nimport { styleWithBreakPoints, CSSPropWithBreakpoints, blockMargin } from '~/src/components/LandingBlock/styled';\n\nexport interface ITextBlockStyles {\n [key: string]: CSSPropWithBreakpoints;\n}\n\nexport const Wrapper = styled.div<{ [key: string]: string }>`\n position: relative;\n width: 100%;\n background: ${p => p.background ? `url(${p.background}) no-repeat center / cover` : 'transparent'};\n\n ${p => blockMargin(p)}; \n ${p => styleWithBreakPoints(p, 'TextBlock')};\n`;\n\nexport const Grid = styled(GridContainer)`\n max-width: 100%;\n`;\n\nexport const Text = styled.div`\n font: ${fonts.S};\n color: ${COLORS.black};\n white-space: pre-wrap;\n\n ${p => styleWithBreakPoints(p, 'TextBlock.Text')};\n`;\n","import { FlexBoxCol, FlexBoxRow } from '@r1-frontend/ui-react/components/layouts/flexBoxGrid';\nimport { getTextWithTag } from '~/src/helpers/getTextWithTag';\nimport { isHtmlWithText } from '~/src/helpers/isHtmlWithText';\nimport * as ST from './styled';\n\nexport interface ITextBlockProps {\n blockId: string;\n text: string;\n customStyles?: ST.ITextBlockStyles;\n background?: string;\n additionalBlockConfig?: any;\n tag?: string;\n}\n\nconst TextBlock = ({ blockId, text, customStyles, background, additionalBlockConfig, tag }: ITextBlockProps): JSX.Element => {\n const textWithTag = getTextWithTag(text, tag);\n\n return (\n \n \n \n \n {isHtmlWithText(text) && (\n \n )}\n \n \n \n \n );\n};\n\nexport default TextBlock;\n","import { isHtmlWithText } from './isHtmlWithText';\n\nexport const getTextWithTag = (text = '', tag?: string): string => {\n if (!text || !tag) {\n return text;\n }\n return `<${tag}>${isHtmlWithText(text)}`;\n};\n","\nexport const isHtmlWithText = (__html = ''): string => {\n const regExp = /(<([^>]+)>)/ig;\n const html = __html.replace(regExp, '');\n return html;\n};\n"],"names":["Wrapper","styled","p","background","blockMargin","styleWithBreakPoints","Grid","GridContainer","Text","fonts","COLORS","blockId","text","customStyles","additionalBlockConfig","tag","textWithTag","getTextWithTag","ST","id","modeName","FlexBoxRow","FlexBoxCol","xs","isHtmlWithText","dangerouslySetInnerHTML","__html","regExp","html","replace"],"sourceRoot":""}