{"ast":null,"code":"import { jsxDEV as _jsxDEV } from \"react/jsx-dev-runtime\";\nvar _jsxFileName = \"/home/gkkdzdg/www/src/pages/_app.js\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n//import '../styles/index.css'\nimport App from 'next/app';\nimport LocaleContextProvider from 'contexts/LocaleContextProvider';\nimport Layout from 'layouts/Layout';\nimport 'styles/general/reset.scss';\nimport 'styles/general/grid.scss';\nimport 'styles/general/fonts.scss';\nimport 'styles/general/base.scss';\nimport 'styles/general/media.scss';\nimport 'styles/general/text.scss';\nimport 'styles/general/links.scss';\nimport globalData from 'global/globalData';\n\nconst MyApp = ({\n  Component,\n  pageProps,\n  router\n}) => {\n  // console.log('_app.js::19 MyApp render', typeof window === 'undefined' ? 'SS' : 'CS')\n  // console.log('_app.js::20 MyApp appProps', appProps)\n  // console.log('_app.js::21 MyApp pageProps', pageProps)\n  // console.log('_app.js::21 MyApp router', router, router.asPath)\n  // console.log('_app.js::21 MyApp router.query', router.query)\n  console.log('_app.js::26 process.env.NODE_ENV', \"development\");\n\n  const {\n    layoutProps\n  } = pageProps,\n        pagePropsRest = _objectWithoutProperties(pageProps, [\"layoutProps\"]);\n\n  return /*#__PURE__*/_jsxDEV(LocaleContextProvider, {\n    strings: globalData.localisations,\n    lang: pageProps && pageProps.lang || 'fr',\n    children: /*#__PURE__*/_jsxDEV(Layout //{...appProps}\n    , _objectSpread(_objectSpread({\n      pageId: router.asPath,\n      pageProps: pagePropsRest,\n      preview: pageProps && pageProps.preview\n    }, layoutProps), {}, {\n      children: /*#__PURE__*/_jsxDEV(Component, _objectSpread(_objectSpread({}, pagePropsRest), {}, {\n        path: router.asPath\n      }), void 0, false, {\n        fileName: _jsxFileName,\n        lineNumber: 41,\n        columnNumber: 5\n      }, this)\n    }), void 0, false, {\n      fileName: _jsxFileName,\n      lineNumber: 34,\n      columnNumber: 4\n    }, this)\n  }, void 0, false, {\n    fileName: _jsxFileName,\n    lineNumber: 31,\n    columnNumber: 3\n  }, this);\n}; // Only uncomment this method if you have blocking data requirements for\n// every single page in your application. This disables the ability to\n// perform automatic static optimization, causing every page in your app to\n// be server-side rendered.\n\n/*\nMyApp.getInitialProps = async (appContext) => {\n\tconsole.log('_app.js::87 MyApp.getInitialProps', typeof window === 'undefined' ? 'SS' : 'CS')\n\n\tif (typeof window === 'undefined') { // -> ONLY if being rendered server side\n\n\t\tconst appProps = await App.getInitialProps(appContext)\n\t\tconsole.log('_app.js::94 MyApp.getInitialProps appProps', appProps)\n\t\tappProps.statusCode = appContext.ctx.res.statusCode\n\n\t\ttry {\n\t\t\t// const [settings, localisation] = await Promise.all([getSettings(), getLocalisation()])\n\n\t\t\t// if (settings) {\n\t\t\t//   settings.forEach(element => {\n\t\t\t//\t appProps[element._type] = element\n\t\t\t//   })\n\t\t\t// }\n\t\t\t// appProps.localisation = localisation\n\n\t\t\tappProps.meta = {\n\t\t\t\ttitle: 'compose - {pageTitle}',\n\t\t\t\tdescription: 'Description of compose website (TODO)',\n\t\t\t}\n\n\t\t\tif (appContext.router.asPath != '/') {\n\t\t\t\t// lang specific pages (=> not onBoarding @ '/')\n\t\t\t\tconst lang = appContext.router.asPath.split('/')[1]\n\t\t\t\tappProps.lang = lang\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error('_app.js::43 error', error)\n\t\t}\n\t\treturn { appProps }\n\t}\n}\n*/\n\n\nexport default MyApp;","map":{"version":3,"sources":["/home/gkkdzdg/www/src/pages/_app.js"],"names":["App","LocaleContextProvider","Layout","globalData","MyApp","Component","pageProps","router","console","log","layoutProps","pagePropsRest","localisations","lang","asPath","preview"],"mappings":";;;;;;;;;;;;;AAAA;AAEA,OAAOA,GAAP,MAAgB,UAAhB;AAEA,OAAOC,qBAAP,MAAkC,gCAAlC;AACA,OAAOC,MAAP,MAAmB,gBAAnB;AAEA,OAAO,2BAAP;AACA,OAAO,0BAAP;AACA,OAAO,2BAAP;AACA,OAAO,0BAAP;AACA,OAAO,2BAAP;AACA,OAAO,0BAAP;AACA,OAAO,2BAAP;AAEA,OAAOC,UAAP,MAAuB,mBAAvB;;AAEA,MAAMC,KAAK,GAAG,CAAC;AAAEC,EAAAA,SAAF;AAAaC,EAAAA,SAAb;AAAwBC,EAAAA;AAAxB,CAAD,KAAuC;AAEpD;AACA;AACA;AACA;AACA;AAEAC,EAAAA,OAAO,CAACC,GAAR,CAAY,kCAAZ;;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAoCJ,SAA1C;AAAA,QAAwBK,aAAxB,4BAA0CL,SAA1C;;AAEA,sBACC,QAAC,qBAAD;AACC,IAAA,OAAO,EAAEH,UAAU,CAACS,aADrB;AAEC,IAAA,IAAI,EAAEN,SAAS,IAAIA,SAAS,CAACO,IAAvB,IAA+B,IAFtC;AAAA,2BAGC,QAAC,MAAD,CACC;AADD;AAEC,MAAA,MAAM,EAAEN,MAAM,CAACO,MAFhB;AAGC,MAAA,SAAS,EAAEH,aAHZ;AAIC,MAAA,OAAO,EAAEL,SAAS,IAAIA,SAAS,CAACS;AAJjC,OAKKL,WALL;AAAA,6BAOC,QAAC,SAAD,kCAAeC,aAAf;AAA8B,QAAA,IAAI,EAAEJ,MAAM,CAACO;AAA3C;AAAA;AAAA;AAAA;AAAA;AAPD;AAAA;AAAA;AAAA;AAAA;AAHD;AAAA;AAAA;AAAA;AAAA,UADD;AAeA,CA3BD,C,CA8BA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA,eAAeV,KAAf","sourcesContent":["//import '../styles/index.css'\n\nimport App from 'next/app'\n\nimport LocaleContextProvider from 'contexts/LocaleContextProvider'\nimport Layout from 'layouts/Layout'\n\nimport 'styles/general/reset.scss'\nimport 'styles/general/grid.scss'\nimport 'styles/general/fonts.scss'\nimport 'styles/general/base.scss'\nimport 'styles/general/media.scss'\nimport 'styles/general/text.scss'\nimport 'styles/general/links.scss'\n\nimport globalData from 'global/globalData'\n\nconst MyApp = ({ Component, pageProps, router, }) => {\n\n\t// console.log('_app.js::19 MyApp render', typeof window === 'undefined' ? 'SS' : 'CS')\n\t// console.log('_app.js::20 MyApp appProps', appProps)\n\t// console.log('_app.js::21 MyApp pageProps', pageProps)\n\t// console.log('_app.js::21 MyApp router', router, router.asPath)\n\t// console.log('_app.js::21 MyApp router.query', router.query)\n\n\tconsole.log('_app.js::26 process.env.NODE_ENV', process.env.NODE_ENV)\n\n\tconst { layoutProps, ...pagePropsRest } = pageProps\n\n\treturn (\n\t\t<LocaleContextProvider\n\t\t\tstrings={globalData.localisations}\n\t\t\tlang={pageProps && pageProps.lang || 'fr'}>\n\t\t\t<Layout\n\t\t\t\t//{...appProps}\n\t\t\t\tpageId={router.asPath}\n\t\t\t\tpageProps={pagePropsRest}\n\t\t\t\tpreview={pageProps && pageProps.preview}\n\t\t\t\t{...layoutProps}\n\t\t\t>\n\t\t\t\t<Component {...pagePropsRest} path={router.asPath} />\n\t\t\t</Layout>\n\t\t</LocaleContextProvider>\n\t)\n}\n\n\n// Only uncomment this method if you have blocking data requirements for\n// every single page in your application. This disables the ability to\n// perform automatic static optimization, causing every page in your app to\n// be server-side rendered.\n\n/*\nMyApp.getInitialProps = async (appContext) => {\n\tconsole.log('_app.js::87 MyApp.getInitialProps', typeof window === 'undefined' ? 'SS' : 'CS')\n\n\tif (typeof window === 'undefined') { // -> ONLY if being rendered server side\n\n\t\tconst appProps = await App.getInitialProps(appContext)\n\t\tconsole.log('_app.js::94 MyApp.getInitialProps appProps', appProps)\n\t\tappProps.statusCode = appContext.ctx.res.statusCode\n\n\t\ttry {\n\t\t\t// const [settings, localisation] = await Promise.all([getSettings(), getLocalisation()])\n\n\t\t\t// if (settings) {\n\t\t\t//   settings.forEach(element => {\n\t\t\t//\t appProps[element._type] = element\n\t\t\t//   })\n\t\t\t// }\n\t\t\t// appProps.localisation = localisation\n\n\t\t\tappProps.meta = {\n\t\t\t\ttitle: 'compose - {pageTitle}',\n\t\t\t\tdescription: 'Description of compose website (TODO)',\n\t\t\t}\n\n\t\t\tif (appContext.router.asPath != '/') {\n\t\t\t\t// lang specific pages (=> not onBoarding @ '/')\n\t\t\t\tconst lang = appContext.router.asPath.split('/')[1]\n\t\t\t\tappProps.lang = lang\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconsole.error('_app.js::43 error', error)\n\t\t}\n\t\treturn { appProps }\n\t}\n}\n*/\n\nexport default MyApp\n"]},"metadata":{},"sourceType":"module"}