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leBody/ArticleBody.js","webpack://_N_E/"],"sourcesContent":["import React, {Fragment, Suspense} from 'react'\nimport componentFactory from '../../components/ComponentFactory';\nimport { customSuperJsonParse, customSuperJsonStringify } from './Utils';\nimport LazyLoad from 'react-lazyload';\nimport Loader from '../../adapters/helpers/Loader'\nimport DOMPurify from 'isomorphic-dompurify';\n\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 \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 \n {\n new ArticleBlock(props)\n .renderBlockFromDocument(currentExtraAttributes, onClickCallback, customEvent, index)\n }\n \n }\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, {Suspense} from 'react';\nimport dynamic from 'next/dynamic';\nimport PropTypes from 'prop-types';\nimport ArticleBlock from '../../adapters/helpers/ArticleBlock';\nconst BiographyContent = dynamic(() => import('../BiographyContent/BiographyContent'));\nimport Loader from '../../adapters/helpers/Loader'\nimport LazyLoad from 'react-lazyload';\n\nexport default function ArticleBody(props) {\n const extraAttributes = props.extraAttributes || {};\n const article = extraAttributes.entity;\n const classAttribute = extraAttributes.entity?.className;\n const articleBlock = new ArticleBlock({document: props.document, article });\n\n const children = articleBlock.renderChildBlocks({ extraAttributes }, props.onClickCallback, props.customEvent);\n\n const biographyContent = articleBlock?.article?.biographyContent?.fields || null;\n const biographyModalArticleList = articleBlock?.article?.articleListsForBiographyModal || null\n\n return (\n
\n \n }>\n {children}\n \n \n }>\n {biographyContent && }\n \n \n \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\";\n(self[\"webpackChunk_N_E\"] = self[\"webpackChunk_N_E\"] || []).push([[7725],{\n\n/***/ 57725:\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": function() { return /* binding */ ArticleBody; }\n});\n\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js\nvar es_object_to_string = __webpack_require__(41539);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js\nvar es_promise = __webpack_require__(88674);\n// EXTERNAL MODULE: ./node_modules/react/index.js\nvar react = __webpack_require__(67294);\n// EXTERNAL MODULE: ./node_modules/next/dynamic.js\nvar dynamic = __webpack_require__(5152);\nvar dynamic_default = /*#__PURE__*/__webpack_require__.n(dynamic);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js\nvar es_object_keys = __webpack_require__(47941);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js\nvar es_symbol = __webpack_require__(82526);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js\nvar es_array_filter = __webpack_require__(57327);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\nvar es_object_get_own_property_descriptor = __webpack_require__(38880);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.for-each.js\nvar es_array_for_each = __webpack_require__(89554);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js\nvar web_dom_collections_for_each = __webpack_require__(54747);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\nvar es_object_get_own_property_descriptors = __webpack_require__(49337);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.define-properties.js\nvar es_object_define_properties = __webpack_require__(33321);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.define-property.js\nvar es_object_define_property = __webpack_require__(69070);\n// EXTERNAL MODULE: ./node_modules/next/dist/compiled/@babel/runtime/helpers/defineProperty.js\nvar defineProperty = __webpack_require__(930);\nvar defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);\n// EXTERNAL MODULE: ./node_modules/next/dist/compiled/@babel/runtime/helpers/classCallCheck.js\nvar classCallCheck = __webpack_require__(33227);\nvar classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);\n// EXTERNAL MODULE: ./node_modules/next/dist/compiled/@babel/runtime/helpers/createClass.js\nvar createClass = __webpack_require__(88361);\nvar createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js\nvar es_function_name = __webpack_require__(68309);\n// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js\nvar es_array_map = __webpack_require__(21249);\n// EXTERNAL MODULE: ./components/ComponentFactory.js\nvar ComponentFactory = __webpack_require__(93613);\n// EXTERNAL MODULE: ./adapters/helpers/Utils.js\nvar Utils = __webpack_require__(8996);\n// EXTERNAL MODULE: ./node_modules/react-lazyload/lib/index.js\nvar lib = __webpack_require__(1216);\n// EXTERNAL MODULE: ./adapters/helpers/Loader.js\nvar Loader = __webpack_require__(47322);\n// EXTERNAL MODULE: ./node_modules/isomorphic-dompurify/browser.js\nvar browser = __webpack_require__(29238);\nvar browser_default = /*#__PURE__*/__webpack_require__.n(browser);\n// EXTERNAL MODULE: ./node_modules/react/jsx-runtime.js\nvar jsx_runtime = __webpack_require__(85893);\n;// CONCATENATED MODULE: ./adapters/helpers/ArticleBlock.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { defineProperty_default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\n\n\n\n\n\n\n\n\n\n\nvar ArticleBlock = /*#__PURE__*/function () {\n function ArticleBlock(props) {\n var _this$article, _this$article2;\n\n classCallCheck_default()(this, ArticleBlock);\n\n this.props = props;\n this.article = props.article;\n this.contents = props.contents || ((_this$article = this.article) == null ? void 0 : _this$article.contents) || [];\n this.contentIndex = props.contentIndex || 0;\n this.promotions = props.promotions || ((_this$article2 = this.article) == null ? void 0 : _this$article2.relatedPromotions) || [];\n this.promotionIndex = props.promotionIndex || 0;\n }\n\n createClass_default()(ArticleBlock, [{\n key: \"renderBlock\",\n value: function renderBlock(moduleClass, attributes, moduleBody) {\n var moduleDefinition = ComponentFactory/* default.getModule */.Z.getModule(moduleClass);\n\n if (moduleDefinition) {\n var module = /*#__PURE__*/react.createElement(moduleDefinition, attributes, moduleBody);\n return module;\n } else {\n console.info('Unsupported module type : ' + moduleClass);\n }\n }\n }, {\n key: \"renderHtmlBlock\",\n value: function renderHtmlBlock(attributes) {\n var _attributes$extraAttr = attributes.extraAttributes.richTextBlock.fields,\n classNames = _attributes$extraAttr.classNames,\n anchorId = _attributes$extraAttr.anchorId,\n textContent = _attributes$extraAttr.textContent;\n return /*#__PURE__*/(0,jsx_runtime.jsx)(\"div\", {\n id: anchorId,\n className: \"ob-html-block \".concat(classNames),\n dangerouslySetInnerHTML: {\n __html: browser_default().sanitize(textContent)\n }\n });\n }\n }, {\n key: \"renderBlockFromDocument\",\n value: function renderBlockFromDocument(extraAttributes, onClickCallback, customEvent, index) {\n var document = this.getDocument();\n\n if (document && document.fields && document.fields.contentType) {\n var _attributes$extraAttr2, _attributes$extraAttr3, _attributes$extraAttr4;\n\n var contentType = document.fields.contentType;\n var blockName = document.fields.name;\n var className = document.fields.classNames;\n\n var attributes = _objectSpread({\n name: blockName,\n document: document,\n className: className,\n onClickCallback: onClickCallback,\n customEvent: customEvent,\n key: blockName,\n index: index\n }, extraAttributes);\n\n if (attributes == null ? void 0 : (_attributes$extraAttr2 = attributes.extraAttributes) == null ? void 0 : (_attributes$extraAttr3 = _attributes$extraAttr2.richTextBlock) == null ? void 0 : (_attributes$extraAttr4 = _attributes$extraAttr3.fields) == null ? void 0 : _attributes$extraAttr4.textContent) {\n return this.renderHtmlBlock(attributes);\n } else {\n return this.renderBlock(contentType, attributes, null);\n }\n } else {\n var _this$props, _this$props$page, _this$props$page$fiel;\n\n console.error('Unsupported block is currently assign to page:' + ((_this$props = this.props) == null ? void 0 : (_this$props$page = _this$props.page) == null ? void 0 : (_this$props$page$fiel = _this$props$page.fields) == null ? void 0 : _this$props$page$fiel.name));\n }\n }\n /**\n * Render the modules assigned to the page.\n * @returns {*}\n */\n\n }, {\n key: \"renderChildBlocks\",\n value: function renderChildBlocks(extraAttributes, onClickCallback, customEvent) {\n var _this = this;\n\n var doc = this.getDocument();\n return doc.fields && doc.fields.blocks ? /*#__PURE__*/(0,jsx_runtime.jsx)(react.Suspense, {\n fallback: /*#__PURE__*/(0,jsx_runtime.jsx)(Loader[\"default\"], {}),\n children: /*#__PURE__*/(0,jsx_runtime.jsx)(react.Fragment, {\n children: doc.fields.blocks.map(function (child, index) {\n if (_this.isRenderable(child)) {\n var extraAttributesClone = (0,Utils/* customSuperJsonParse */.Cp)((0,Utils/* customSuperJsonStringify */.hD)(extraAttributes));\n\n var currentExtraAttributes = _this.reassignExtraAttributes(extraAttributesClone, child);\n\n var 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 return /*#__PURE__*/(0,jsx_runtime.jsx)(lib[\"default\"], {\n offset: 100,\n unmountIfInvisible: true,\n children: new ArticleBlock(props).renderBlockFromDocument(currentExtraAttributes, onClickCallback, customEvent, index)\n });\n }\n })\n })\n }) : null;\n }\n }, {\n key: \"getDocument\",\n value: function getDocument() {\n var 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 key: \"isRenderable\",\n value: function 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 key: \"reassignExtraAttributes\",\n value: function reassignExtraAttributes(extraAttributes, document) {\n if (document.fields.contentType == 'promoBlock' && this.promotions.length > 0) {\n extraAttributes['extraAttributes']['promo'] = this.promotions[this.promotionIndex];\n\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\n if (this.contentIndex < this.contents.length) {\n this.contentIndex++;\n }\n }\n\n return extraAttributes;\n }\n }]);\n\n return ArticleBlock;\n}();\n\n/* harmony default export */ var helpers_ArticleBlock = (ArticleBlock);\n;// CONCATENATED MODULE: ./components/ArticleBody/ArticleBody.js\n\n\n\n\n\nvar BiographyContent = dynamic_default()(function () {\n return Promise.all(/* import() */[__webpack_require__.e(3253), __webpack_require__.e(2919)]).then(__webpack_require__.bind(__webpack_require__, 16066));\n}, {\n loadableGenerated: {\n webpack: function webpack() {\n return [/*require.resolve*/(16066)];\n }\n }\n});\n\n\n\n\nfunction ArticleBody(props) {\n var _extraAttributes$enti, _articleBlock$article, _articleBlock$article2, _articleBlock$article3;\n\n var extraAttributes = props.extraAttributes || {};\n var article = extraAttributes.entity;\n var classAttribute = (_extraAttributes$enti = extraAttributes.entity) == null ? void 0 : _extraAttributes$enti.className;\n var articleBlock = new helpers_ArticleBlock({\n document: props.document,\n article: article\n });\n var children = articleBlock.renderChildBlocks({\n extraAttributes: extraAttributes\n }, props.onClickCallback, props.customEvent);\n var biographyContent = (articleBlock == null ? void 0 : (_articleBlock$article = articleBlock.article) == null ? void 0 : (_articleBlock$article2 = _articleBlock$article.biographyContent) == null ? void 0 : _articleBlock$article2.fields) || null;\n var biographyModalArticleList = (articleBlock == null ? void 0 : (_articleBlock$article3 = articleBlock.article) == null ? void 0 : _articleBlock$article3.articleListsForBiographyModal) || null;\n return /*#__PURE__*/(0,jsx_runtime.jsx)(\"div\", {\n className: \"ob-article-body \".concat(classAttribute),\n children: /*#__PURE__*/(0,jsx_runtime.jsxs)(lib[\"default\"], {\n offset: 100,\n children: [/*#__PURE__*/(0,jsx_runtime.jsx)(react.Suspense, {\n fallback: /*#__PURE__*/(0,jsx_runtime.jsx)(Loader[\"default\"], {}),\n children: children\n }), /*#__PURE__*/(0,jsx_runtime.jsx)(react.Fragment, {\n children: /*#__PURE__*/(0,jsx_runtime.jsx)(react.Suspense, {\n fallback: /*#__PURE__*/(0,jsx_runtime.jsx)(Loader[\"default\"], {}),\n children: biographyContent && /*#__PURE__*/(0,jsx_runtime.jsx)(BiographyContent, {\n biographyContent: biographyContent,\n biographyModalArticleList: biographyModalArticleList\n })\n })\n })]\n })\n });\n}\n\n/***/ })\n\n}]);"],"names":["self","push","__unused_webpack_module","__webpack_exports__","__webpack_require__","r","d","ArticleBody","react","dynamic","dynamic_default","n","defineProperty","defineProperty_default","classCallCheck","classCallCheck_default","createClass","createClass_default","ComponentFactory","Utils","lib","Loader","browser","browser_default","jsx_runtime","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","apply","ArticleBlock","props","_this$article","_this$article2","article","contents","contentIndex","promotions","relatedPromotions","promotionIndex","key","value","moduleClass","attributes","moduleBody","moduleDefinition","Z","getModule","createElement","console","info","_attributes$extraAttr","extraAttributes","richTextBlock","fields","classNames","anchorId","textContent","jsx","id","className","concat","dangerouslySetInnerHTML","__html","sanitize","onClickCallback","customEvent","index","_this$props","_this$props$page","_this$props$page$fiel","document","getDocument","contentType","_attributes$extraAttr2","_attributes$extraAttr3","_attributes$extraAttr4","blockName","name","_objectSpread","target","i","arguments","length","source","forEach","getOwnPropertyDescriptors","defineProperties","renderHtmlBlock","renderBlock","error","page","_this","doc","blocks","Suspense","fallback","children","Fragment","map","child","isRenderable","extraAttributesClone","Cp","hD","currentExtraAttributes","reassignExtraAttributes","offset","unmountIfInvisible","renderBlockFromDocument","BiographyContent","Promise","all","e","then","bind","loadableGenerated","webpack","_extraAttributes$enti","_articleBlock$article","_articleBlock$article2","_articleBlock$article3","entity","classAttribute","articleBlock","renderChildBlocks","biographyContent","biographyModalArticleList","articleListsForBiographyModal","jsxs"],"sourceRoot":""}