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AAAC,EAAAC,EAAAC,EAAAK,EAAAR,EAAA0C,eAAA,KAAAjC,EAAAD,EAAA+E,MAAA,CAAA7E,EAAA,IAAAiB,EAAA,CAAAqC,SAAAhE,EAAAgE,QAAA,CAAAnC,QAAApB,CAAA,GAAAE,EAAAD,EAAA8E,iBAAA,EAAA9C,gBAAAlC,CAAA,EAAAR,EAAAiE,eAAA,CAAAjE,EAAAkE,WAAA,EAAAtD,EAAA,OAAAF,GAAA,MAAAT,CAAAA,EAAAS,EAAAmB,OAAA,SAAA3B,CAAAA,EAAAD,EAAAwF,gBAAA,SAAAvF,EAAA0C,MAAA,QAAA/B,EAAA,OAAAH,GAAA,MAAAP,CAAAA,EAAAO,EAAAmB,OAAA,SAAA1B,EAAAuF,6BAAA,iBAAAxE,EAAAyE,IAAA,SAAAzC,UAAA,kBAAAwB,SAAA,CAAA/D,EAAA,GAAAO,EAAA8B,GAAA,EAAAzC,EAAAkE,QAAA,EAAAC,SAAA9D,GAAA,GAAAM,EAAA8B,GAAA,EAAAkC,EAAA,CAAAO,iBAAA7E,EAAAgF,0BAAA/E,CAAA","sources":["webpack://_N_E/./adapters/helpers/ArticleBlock.js","webpack://_N_E/./components/ArticleBody/ArticleBody.js","webpack://_N_E/"],"sourcesContent":["import React, {Fragment} from 'react'\nimport componentFactory from '../../components/ComponentFactory';\nimport { customSuperJsonParse, customSuperJsonStringify } from './Utils';\nimport DOMPurify from 'isomorphic-dompurify';\nclass ArticleBlock {\n\n constructor(props) {\n this.props = props;\n this.article = props.article;\n this.contents = props.contents || this.article?.contents || [];\n this.contentIndex = props.contentIndex || 0;\n this.promotions = props.promotions || this.article?.relatedPromotions || [];\n this.promotionIndex = props.promotionIndex || 0;\n }\n\n renderBlock(moduleClass, attributes, moduleBody) {\n const moduleDefinition = componentFactory.getModule(moduleClass);\n if (moduleDefinition) {\n const module = React.createElement(moduleDefinition, attributes, moduleBody);\n return module;\n } else {\n console.info('Unsupported module type : ' + moduleClass);\n }\n }\n\n renderHtmlBlock(attributes) {\n let { classNames, anchorId, textContent } = attributes.extraAttributes.richTextBlock.fields;\n return ();\n }\n\n renderBlockFromDocument(extraAttributes, onClickCallback, customEvent, index) {\n const document = this.getDocument();\n if (document && document.fields && document.fields.contentType) {\n let contentType = document.fields.contentType;\n let blockName = document.fields.name;\n let className = document.fields.classNames;\n\n let attributes = {\n name: blockName,\n document: document,\n className: className,\n onClickCallback,\n customEvent,\n key: blockName,\n index,\n ...extraAttributes\n };\n\n if(attributes?.extraAttributes?.richTextBlock?.fields?.textContent) {\n return this.renderHtmlBlock(attributes);\n } else {\n return this.renderBlock(contentType, attributes, null);\n }\n\n } else {\n console.error('Unsupported block is currently assign to page:' + this.props?.page?.fields?.name);\n }\n }\n\n /**\n * Render the modules assigned to the page.\n * @returns {*}\n */\n renderChildBlocks(extraAttributes, onClickCallback, customEvent) {\n const doc = this.getDocument();\n return ((doc. fields && doc.fields.blocks) ?\n \n { doc.fields.blocks.map((child, index) => {\n if(this.isRenderable(child)) {\n let extraAttributesClone = customSuperJsonParse(customSuperJsonStringify(extraAttributes));\n let currentExtraAttributes = this.reassignExtraAttributes(extraAttributesClone, child);\n\n const props = {\n document: child,\n article: this.article,\n contents:this.contents,\n contentIndex: this.contentIndex,\n promotions:this.promotions,\n promotionIndex: this.promotionIndex\n };\n\n return new ArticleBlock(props)\n .renderBlockFromDocument(currentExtraAttributes, onClickCallback, customEvent, index)\n }\n })}\n \n :\n null\n );\n }\n\n getDocument() {\n let doc = this.props.document;\n\n if (doc == null) {\n doc = this.props;\n }\n\n if (!doc) {\n doc = {};\n }\n\n return doc;\n }\n\n isRenderable(document) {\n if(document.fields.contentType == 'promoBlock' ){\n return (this.promotionIndex < this.promotions.length);\n } else if(document.fields.contentType == 'richTextBlock') {\n return (this.contentIndex < this.contents.length);\n } else {\n return true;\n }\n }\n\n reassignExtraAttributes(extraAttributes, document) {\n if(document.fields.contentType == 'promoBlock' && this.promotions.length > 0){\n extraAttributes['extraAttributes']['promo'] = this.promotions[this.promotionIndex];\n if(this.promotionIndex < this.promotions.length) {\n this.promotionIndex++;\n }\n }\n\n if(document.fields.contentType == 'richTextBlock' && this.contents.length > 0){\n extraAttributes['extraAttributes']['richTextBlock'] = this.contents[this.contentIndex];\n if(this.contentIndex < this.contents.length) {\n this.contentIndex++;\n }\n }\n return extraAttributes;\n }\n}\n\nexport default ArticleBlock","import React from 'react';\nimport PropTypes from 'prop-types';\nimport dynamic from 'next/dynamic';\nimport ArticleBlock from '../../adapters/helpers/ArticleBlock';\nconst BiographyContent = dynamic(()=>import('../BiographyContent/BiographyContent'))\n\nexport default function ArticleBody(props) {\n const extraAttributes = props.extraAttributes || {};\n const article = extraAttributes.entity;\n\n const articleBlock = new ArticleBlock({document: props.document, article });\n\n const children = articleBlock.renderChildBlocks({ extraAttributes }, props.onClickCallback, props.customEvent);\n const biographyContent = articleBlock?.article?.biographyContent?.fields || null;\n const biographyModalArticleList = articleBlock?.article?.articleListsForBiographyModal || null\n\n return (\n
\n {children}\n {biographyContent && }\n
\n );\n}\n\nArticleBody.propTypes = {\n className: PropTypes.string,\n extraAttributes: PropTypes.object,\n document: PropTypes.object,\n onClickCallback: PropTypes.func,\n customEvent: PropTypes.object\n};\n","\"use strict\";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7725],{57725:function(t,e,n){n.r(e),n.d(e,{default:function(){return v}});var o=n(67294),r=n(5152),i=n.n(r),l=n(930),s=n.n(l),c=n(33227),u=n.n(c),a=n(88361),d=n.n(a),h=n(17940),p=n(8996),m=n(29238),f=n.n(m),b=n(85893);function k(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}var x=function(){function t(e){var n,o;u()(this,t),this.props=e,this.article=e.article,this.contents=e.contents||(null==(n=this.article)?void 0:n.contents)||[],this.contentIndex=e.contentIndex||0,this.promotions=e.promotions||(null==(o=this.article)?void 0:o.relatedPromotions)||[],this.promotionIndex=e.promotionIndex||0}return d()(t,[{key:\"renderBlock\",value:function(t,e,n){var r=h.Z.getModule(t);if(r)return o.createElement(r,e,n);console.info(\"Unsupported module type : \"+t)}},{key:\"renderHtmlBlock\",value:function(t){var e=t.extraAttributes.richTextBlock.fields,n=e.classNames,o=e.anchorId,r=e.textContent;return(0,b.jsx)(\"div\",{id:o,className:\"ob-html-block \".concat(n),dangerouslySetInnerHTML:{__html:f().sanitize(r)}})}},{key:\"renderBlockFromDocument\",value:function(t,e,n,o){var r,i,l,c=this.getDocument();if(c&&c.fields&&c.fields.contentType){var u,a,d,h=c.fields.contentType,p=c.fields.name,m=function(t){for(var e=1;e0&&(t.extraAttributes.promo=this.promotions[this.promotionIndex],this.promotionIndex0&&(t.extraAttributes.richTextBlock=this.contents[this.contentIndex],this.contentIndex