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A7BD,EAA+BlD,MAAM,SAAAoD,CAAAA,EAArCD,EAAuCgB,MAAM,CAAC,EAAE,SAAAd,CAAAA,EAAhDD,EAAkDpD,MAAM,GAAxDqD,EAA0Dc,MAAM,CAACT,GAAG,CAAC,SAACU,CAAS,MAAKC,EAClCC,EAA1CF,CAAAA,MAAAA,EAAS,aAAAC,CAAAA,EAATD,EAAWpE,MAAM,SAAjBqE,EAAmBE,qBAAqB,GACxCH,CAAAA,MAAAA,GAAS,MAAAE,CAAAA,EAATF,EAAWpE,MAAM,GAAjBsE,EAAmBC,qBAAqB,CAACb,GAAG,CAAC,SAACc,CAAO,EAC7CA,EAAQxE,MAAM,CAACgE,eAAe,GAC9BQ,EAAQxE,MAAM,CAACgE,eAAe,CAACC,aAAa,CAAG,GAC3CO,EAAQxE,MAAM,CAACgE,eAAe,CAAChE,MAAM,EACrCwE,CAAAA,EAAQxE,MAAM,CAACgE,eAAe,CAAChE,MAAM,CAACiE,aAAa,CAAG,IAGlE,EAAC,CAET,GACHX,EAAAzF,MAAA,UACM,CAAE,WAAcgC,EAAY,KAAQE,EAAM,MAASE,CAAM,EAAC,0BAAAqD,EAAAxF,IAAA,KAAA2E,EAAA,IACpE,SAAAgC,CAAA,CAAAC,CAAA,SAAAzF,EAAAlB,KAAA,MAAAC,UAAA,MAAAa,CAAA,EAvDoB8F,EAAAA,SAAe,CAsHxC1G,CAAAA,EAAA,QAAeY,yBCjIf,CAAA+F,OAAAC,QAAA,CAAAD,OAAAC,QAAA,MAAAC,IAAA,EACA,cACA,WACA,OAAezG,EAAQ,MACvB,EACA","sources":["webpack://_N_E/./adapters/model/ContentfulClient.js","webpack://_N_E/./pages/collection.js","webpack://_N_E/?3470","webpack://_N_E/ignored|/home/runner/work/mw-mt-oralb-com-es-latam/mw-mt-oralb-com-es-latam/node_modules/object-inspect|./util.inspect"],"sourcesContent":["const contentful = require('contentful');\n\nclass ContentfulClient {\n\n constructor() {\n this.personalAccessToken = process.env.CF_PERSONAL_ACCESS_TOKEN;\n this.deliveryAccessToken = process.env.CF_DELIVERY_ACCESS_TOKEN;\n this.spaceId = process.env.CF_SPACE_ID;\n this.environmentId = process.env.CF_ENVIRONMENT;\n\n if(this.deliveryAccessToken && this.deliveryAccessToken !== '') {\n this.contentfulClient = contentful.createClient({\n space: this.spaceId,\n accessToken: this.deliveryAccessToken,\n environment: this.environmentId\n });\n }\n\n }\n\n static create() {\n return new ContentfulClient();\n }\n getPersonalAccessToken() {\n return this.personalAccessToken;\n }\n getDeliveryAccessToken() {\n return this.deliveryAccessToken;\n }\n getSpaceId() {\n return this.spaceId;\n }\n getEnvironmentId() {\n return this.environmentId;\n }\n\n async getClient() {\n return this.contentfulClient;\n }\n}\n\nexport default new ContentfulClient();","import '@babel/polyfill';\nimport React, { Fragment, Suspense, lazy } from 'react'\nimport PropTypes from 'prop-types'\nimport Router from 'next/router';\nimport Block from '../adapters/helpers/Block';\nimport { addBVScript } from '../adapters/helpers/Utils';\nimport { addBVCollectionPageCallback } from '../adapters/helpers/Utils';\nimport contentfulClient from '../adapters/model/ContentfulClient';\nconst Meta = lazy(() => import('../components/Meta/Meta'));\nconst GTMScriptFunction = lazy(() => import('../components/GTMScriptFunction'));\nconst Loader = lazy(() => import('../adapters/helpers/Loader'));\n\nclass Collection extends React.Component {\n componentDidMount() {\n Router.beforePopState(({ as }) => {\n location.href = as;\n });\n addBVScript();\n addBVCollectionPageCallback();\n }\n\n static async getInitialProps({ asPath, query }) {\n const client = await contentfulClient.getClient();\n const locales = await client.getLocales();\n const defaultLocale = locales.items.find(locale => locale.default);\n const countryCode = defaultLocale.code.slice(-2);\n const languageCode = defaultLocale.code.substring(0, 2);\n const path = query.slug || asPath;\n const baseProps = await this.initPage(path, query);\n baseProps.countryCode = countryCode;\n baseProps.languageCode = languageCode;\n return {\n ...baseProps\n }\n }\n\n static async initPage(slug, query) {\n let collection = undefined;\n if (slug) {\n const { default: collectionDao } = await import('Model/dao/CollectionDao');\n collection = await collectionDao.getActiveCollectionBySlug(slug);\n }\n if (collection?.fields?.series) {\n collection?.fields?.series?.map((allSeries) => {\n if (allSeries?.fields?.backgroundAsset?.fields) {\n allSeries.fields.backgroundAsset.fields.isBannerImage = true;\n }\n if (allSeries?.fields?.mobileBackgroundAsset?.fields) {\n allSeries.fields.mobileBackgroundAsset.fields.isBannerImage = true;\n }\n })\n }\n else {\n collection?.fields?.blocks[0]?.fields?.blocks[1]?.fields?.blocks.map((blocksArr) => {\n if (blocksArr?.fields?.devicesConfigurations) {\n blocksArr?.fields?.devicesConfigurations.map((devices) => {\n if (devices.fields.backgroundAsset) {\n devices.fields.backgroundAsset.isBannerImage = true;\n if (devices.fields.backgroundAsset.fields) {\n devices.fields.backgroundAsset.fields.isBannerImage = true;\n }\n }\n })\n }\n })\n }\n return { 'collection': collection, 'slug': slug, 'query': query };\n }\n\n constructor(props) {\n super(props);\n }\n /**\n * Rendering of the page. This always render the page using a common layout.\n *\n * Override the render method to do otherwise.\n *\n * @returns {*}\n */\n render() {\n let collection = this.getCollection();\n let pagePath = collection.slug.fields.slug;\n const query = this.props.query;\n const selectedSeriesId = query?.series;\n let metaData = this.getMetadata()\n if (metaData) {\n metaData.pageType = 'collection'\n }\n return (\n }>\n \n {!selectedSeriesId ?\n }>\n \n : null}\n
\n }> {this.renderBody()} \n
\n }>\n \n \n
\n
\n )\n }\n\n getCollection() {\n return this.props.collection.fields;\n }\n getMetadata() {\n return this.props.collection.fields.metadata.fields\n }\n /**\n * By default, the page will render the modules of the Product.\n * Can be overridden on the child class to do specific rendering.\n * @returns {*|void}\n */\n renderBody() {\n return new Block(this.props.collection).renderChildBlocks({ extraAttributes: { entity: this.getCollection(), slug: this.props.slug, query: this.props.query } });\n }\n}\n\nCollection.propTypes = {\n collection: PropTypes.object,\n slug: PropTypes.any,\n query: PropTypes.object,\n languageCode: PropTypes.string,\n countryCode: PropTypes.string\n}\n\nexport default Collection\n","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/collection\",\n function () {\n return require(\"private-next-pages/collection.js\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/collection\"])\n });\n }\n ","/* (ignored) */"],"names":["contentful","require","ContentfulClient","_getClient","_classCallCheck","personalAccessToken","process","deliveryAccessToken","spaceId","environmentId","contentfulClient","createClient","space","accessToken","environment","_createClass","key","value","_asyncToGenerator","_regeneratorRuntime","_callee","_context","prev","next","abrupt","stop","apply","arguments","__webpack_exports__","Z","Meta","lazy","__webpack_require__","e","then","bind","GTMScriptFunction","Loader","Promise","resolve","Collection","_React$Component","_inherits","_getInitialProps","_initPage","_super","props","call","Router","_ref","as","location","href","addBVScript","addBVCollectionPageCallback","pagePath","collection","getCollection","slug","fields","query","selectedSeriesId","series","metaData","getMetadata","pageType","_jsx","Suspense","fallback","children","_jsxs","Fragment","metadata","className","renderBody","languageCode","countryCode","Block","renderChildBlocks","extraAttributes","entity","_ref2","asPath","client","defaultLocale","path","baseProps","getClient","sent","getLocales","locales","items","find","locale","code","slice","substring","initPage","_objectSpread","_x","_callee2","_collection","_collection$fields","collectionDao","_collection2","_collection2$fields","_collection2$fields$s","_collection3","_collection3$fields","_collection3$fields$b","_collection3$fields$b2","_collection3$fields$b3","_collection3$fields$b4","_context2","undefined","_yield$import","getActiveCollectionBySlug","map","allSeries","_allSeries$fields","_allSeries$fields$bac","_allSeries$fields2","_allSeries$fields2$mo","backgroundAsset","isBannerImage","mobileBackgroundAsset","blocks","blocksArr","_blocksArr$fields","_blocksArr$fields2","devicesConfigurations","devices","_x2","_x3","React","window","__NEXT_P","push"],"sourceRoot":""}