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AAS,+BAGb,UAACC,UAAAA,CAAQxB,GAAG,wBACV,UAACqB,EAAAA,cAAcA,CAAAA,CAGbjB,SAAUA,EACVmB,SAAS,sBAET/D,MAAOoD,GADFR,KAIRc,GACC,oBAACG,EAAAA,cAAcA,CAAAA,CACZ,GAAGH,CAAyB,CAC7BI,IAAKlB,EACLA,SAAUA,EACVmB,SAAS,mCAMrB","sources":["webpack://_N_E/?3f7a","webpack://_N_E/./pages/offers/index.tsx","webpack://_N_E/../../node_modules/@apollo/client/react/context/ApolloProvider.js","webpack://_N_E/../../libs/shared/mi-headless-utils/src/components/Layout/index.tsx","webpack://_N_E/../../libs/shared/mi-headless-utils/src/components/PageRendererComponent/index.tsx"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/offers\",\n function () {\n return require(\"private-next-pages/offers/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/offers\"])\n });\n }\n ","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { GetServerSideProps } from 'next';\n\nimport { PageRendererComponent, prePageCall } from '@marriott/mi-headless-utils';\nimport OfferSignatures from '../../signatures/offerSignatures.json';\nimport { updateRobotMetaNames } from '@marriott/mi-offers-components';\nimport { envVarKeys } from '../../_constants/envVarKeys';\n\nfunction pageRenderer(props) {\n console.log('[offers.tsx] props ', props);\n if (\n props.productSpecificResponse === undefined &&\n props?.query?.invalidDealMsg === 'true' &&\n props.model?.metaNames\n ) {\n const mappedMetaNames = updateRobotMetaNames(props.model.metaNames);\n props.model['metaNames'] = mappedMetaNames;\n }\n return <PageRendererComponent {...props} />;\n}\n\n//Any product specific page data apart from common data like session, datalayer\n//can be returned from this function and the same is passed as props to the page Component\nconst offersSpecificData = async () => {\n return { operationSignatures: OfferSignatures, nextPublicEnvKeys: [...Object.keys(envVarKeys)] };\n};\n\n//Make pre page calls like session, datalayer, fetch model.json, producSpecifc data etc\n//at server side and pass the data is passed as props to page component.\nexport const getServerSideProps: GetServerSideProps<any> = prePageCall(offersSpecificData);\nexport default pageRenderer;\n","import { __assign } from \"tslib\";\nimport { invariant } from \"../../utilities/globals/index.js\";\nimport * as React from \"rehackt\";\nimport { getApolloContext } from \"./ApolloContext.js\";\nexport var ApolloProvider = function (_a) {\n var client = _a.client, children = _a.children;\n var ApolloContext = getApolloContext();\n var parentContext = React.useContext(ApolloContext);\n var context = React.useMemo(function () {\n return __assign(__assign({}, parentContext), { client: client || parentContext.client });\n }, [parentContext, client]);\n invariant(context.client, 47);\n return (React.createElement(ApolloContext.Provider, { value: context }, children));\n};\n//# sourceMappingURL=ApolloProvider.js.map","import Head from 'next/head';\nimport React, { ReactElement, useMemo } from 'react';\n\nexport const siteTitle = 'Marriott';\n\nexport function Layout({\n children,\n title,\n metaNames,\n metaProps,\n staticComponentClientLibsCSS,\n staticComponentClientLibsJS,\n gridCss,\n isAuthorMode,\n canonical = '',\n USE_MOCK_MODEL = false,\n hreflangList = [],\n mainID = '',\n}: {\n children?: ReactElement | Array<ReactElement>;\n title?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metaNames: Array<any>;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n metaProps?: Array<any>;\n staticComponentClientLibsCSS?: string;\n staticComponentClientLibsJS?: string;\n gridCss?: string;\n isAuthorMode?: boolean;\n canonical?: string;\n USE_MOCK_MODEL?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hreflangList?: Array<any>;\n mainID?: string;\n}) {\n const generateClientLibsHost = useMemo(() => {\n if (String(process.env['IS_LOCAL_DEV']) === 'true' && !isAuthorMode && !USE_MOCK_MODEL) {\n return process.env['NEXT_PUBLIC_AEM_HOST'];\n } else {\n return '';\n }\n }, []);\n\n return (\n <>\n <Head>\n <meta charSet=\"UTF-8\" />\n <link rel=\"icon\" href=\"/favicon.ico\" />\n <title>{title}</title>\n {metaNames?.map(metaName => (\n <meta key={metaName.name} name={metaName.name} content={metaName.value}></meta>\n ))}\n {metaProps?.map(metaProperty => (\n <meta key={metaProperty.name} property={metaProperty.name} content={metaProperty.value}></meta>\n ))}\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n {canonical && <link rel=\"canonical\" href={canonical} />}\n <link rel=\"preload\" href={`${generateClientLibsHost}${staticComponentClientLibsCSS}`} as=\"style\" />\n <link rel=\"stylesheet\" href={`${generateClientLibsHost}${staticComponentClientLibsCSS}`} />\n <link rel=\"stylesheet\" href={`${generateClientLibsHost}${gridCss}`} />\n {hreflangList?.map((item, index) => (\n <link rel=\"alternate\" href={item?.href} hrefLang={item?.hreflang} key={`href-lang-list-${index}`} />\n ))}\n </Head>\n <main id={mainID}>{children}</main>\n {staticComponentClientLibsJS && (\n <script src={`${generateClientLibsHost}${staticComponentClientLibsJS}`} defer></script>\n )}\n </>\n );\n}\n","//This returns a component which can be rendered in any product specific [[page.tsx]]\n//to return the page template(Head, main, sections) along with the required react Components mentioned in model.json and\n// load the CSS and JS libs required by static components from AEM.\nimport { ResponsiveGrid } from '@adobe/aem-react-editable-components';\nimport { ApolloProvider } from '@apollo/client';\nimport Head from 'next/head';\nimport { ApolloEnvVars, getDeployedEnvType, useNextMiApolloClient } from '@marriott/mi-apollo-client-utils';\nimport { Layout } from '../Layout';\nimport { respGridUtil } from '../../lib/helpers';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport function PageRendererComponent({\n model,\n pagePath,\n operationSignatures,\n isAuthorMode,\n USE_MOCK_MODEL,\n apolloEnvVars,\n}: {\n model?: any;\n pagePath?: string;\n operationSignatures?: Array<any>;\n isAuthorMode?: boolean;\n USE_MOCK_MODEL?: boolean;\n apolloEnvVars?: ApolloEnvVars;\n}) {\n const MiApolloClient = useNextMiApolloClient(\n operationSignatures || [],\n apolloEnvVars?.DEPLOYED_ENV_TYPE || getDeployedEnvType(),\n {},\n {},\n apolloEnvVars\n );\n\n const {\n metaNames,\n metaProperties,\n title,\n staticComponentClientLibsCSS,\n staticComponentClientLibsJS,\n gridCss,\n canonical,\n hreflangList,\n }: {\n metaNames: Array<any>;\n metaProperties: Array<any>;\n title: string;\n staticComponentClientLibsCSS: string;\n staticComponentClientLibsJS: string;\n gridCss: string;\n canonical: string;\n hreflangList: Array<any>;\n } = model;\n const respGridModel = respGridUtil(model?.cqItems?.root?.[':items']?.responsivegrid);\n const responsiveGridHeaderModel = model?.cqItems?.root?.[':items']?.['header-responsivegrid']\n ? respGridUtil(model?.cqItems?.root?.[':items']?.['header-responsivegrid'])\n : false;\n const responsiveGridFooterModel = model?.cqItems?.root?.[':items']?.['footer-responsivegrid']\n ? respGridUtil(model?.cqItems?.root?.[':items']?.['footer-responsivegrid'])\n : false;\n\n return (\n <ApolloProvider client={MiApolloClient}>\n <Layout\n metaNames={metaNames}\n metaProps={metaProperties}\n title={title}\n staticComponentClientLibsCSS={staticComponentClientLibsCSS}\n staticComponentClientLibsJS={staticComponentClientLibsJS}\n gridCss={gridCss}\n isAuthorMode={isAuthorMode}\n USE_MOCK_MODEL={USE_MOCK_MODEL}\n canonical={canonical}\n hreflangList={hreflangList}\n >\n <Head>\n <title>{model.title}</title>\n </Head>\n {responsiveGridHeaderModel && (\n <ResponsiveGrid\n {...responsiveGridHeaderModel}\n pagePath={pagePath}\n key={pagePath}\n itemPath=\"root/header-responsivegrid\"\n />\n )}\n <section id=\"main-content\">\n <ResponsiveGrid\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n pagePath={pagePath}\n itemPath=\"root/responsivegrid\"\n key={pagePath}\n model={respGridModel}\n />\n </section>\n {responsiveGridFooterModel && (\n <ResponsiveGrid\n {...responsiveGridFooterModel}\n key={pagePath}\n pagePath={pagePath}\n itemPath=\"root/footer-responsivegrid\"\n />\n )}\n </Layout>\n </ApolloProvider>\n );\n}\n"],"names":["pageRenderer","props","console","log","undefined","productSpecificResponse","query","invalidDealMsg","model","metaNames","mappedMetaNames","updateRobotMetaNames","PageRendererComponent","Layout","children","title","metaProps","staticComponentClientLibsCSS","staticComponentClientLibsJS","gridCss","isAuthorMode","canonical","USE_MOCK_MODEL","hreflangList","mainID","generateClientLibsHost","useMemo","String","process","Head","meta","charSet","link","rel","href","map","metaName","name","content","value","metaProperty","property","as","item","index","hrefLang","hreflang","main","id","script","src","defer","pagePath","operationSignatures","apolloEnvVars","MiApolloClient","useNextMiApolloClient","DEPLOYED_ENV_TYPE","getDeployedEnvType","metaProperties","respGridModel","respGridUtil","cqItems","root","responsivegrid","responsiveGridHeaderModel","responsiveGridFooterModel","ApolloProvider","client","ResponsiveGrid","key","itemPath","section"],"sourceRoot":"","ignoreList":[2]}