_document.js 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. "use strict";
  2. (() => {
  3. var exports = {};
  4. exports.id = 30660;
  5. exports.ids = [30660];
  6. exports.modules = {
  7. /***/ 56414:
  8. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9. __webpack_require__.r(__webpack_exports__);
  10. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11. /* harmony export */ "default": () => (/* binding */ pageWrapperTemplate),
  12. /* harmony export */ "getServerSideProps": () => (/* binding */ getServerSideProps),
  13. /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps)
  14. /* harmony export */ });
  15. /* harmony import */ var _sentry_server_config_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(96270);
  16. /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58097);
  17. /* harmony import */ var _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__);
  18. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20997);
  19. /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
  20. /* harmony import */ var next_document__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21927);
  21. /* harmony import */ var _utils_locale__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(24709);
  22. const DEFAULT_LOCALE = "en";
  23. class MyDocument extends next_document__WEBPACK_IMPORTED_MODULE_3__["default"] {
  24. static async getInitialProps(ctx) {
  25. const initialProps = await next_document__WEBPACK_IMPORTED_MODULE_3__["default"].getInitialProps(ctx);
  26. return {
  27. ...initialProps,
  28. locale: ctx?.locale || DEFAULT_LOCALE
  29. };
  30. }
  31. render = ()=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)(next_document__WEBPACK_IMPORTED_MODULE_3__.Html, {
  32. dir: (0,_utils_locale__WEBPACK_IMPORTED_MODULE_4__/* .getDir */ .XP)(this.props.locale),
  33. lang: this.props.locale,
  34. children: [
  35. /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(next_document__WEBPACK_IMPORTED_MODULE_3__.Head, {}),
  36. /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsxs)("body", {
  37. children: [
  38. /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(next_document__WEBPACK_IMPORTED_MODULE_3__.Main, {}),
  39. /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(next_document__WEBPACK_IMPORTED_MODULE_3__.NextScript, {})
  40. ]
  41. })
  42. ]
  43. });
  44. }
  45. var serverComponentModule = /*#__PURE__*/Object.freeze({
  46. __proto__: null,
  47. 'default': MyDocument
  48. });
  49. /*
  50. * This file is a template for the code which will be substituted when our webpack loader handles non-API files in the
  51. * `pages/` directory.
  52. *
  53. * We use `__SENTRY_WRAPPING_TARGET_FILE__.cjs` as a placeholder for the path to the file being wrapped. Because it's not a real package,
  54. * this causes both TS and ESLint to complain, hence the pragma comments below.
  55. */
  56. const userPageModule = serverComponentModule ;
  57. const pageComponent = userPageModule ? userPageModule.default : undefined;
  58. const origGetInitialProps = pageComponent ? pageComponent.getInitialProps : undefined;
  59. const origGetStaticProps = userPageModule ? userPageModule.getStaticProps : undefined;
  60. const origGetServerSideProps = userPageModule ? userPageModule.getServerSideProps : undefined;
  61. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  62. const getInitialPropsWrappers = {
  63. '/_app': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapAppGetInitialPropsWithSentry,
  64. '/_document': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapDocumentGetInitialPropsWithSentry,
  65. '/_error': _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapErrorGetInitialPropsWithSentry,
  66. };
  67. const getInitialPropsWrapper = getInitialPropsWrappers['/_document'] || _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetInitialPropsWithSentry;
  68. if (pageComponent && typeof origGetInitialProps === 'function') {
  69. pageComponent.getInitialProps = getInitialPropsWrapper(origGetInitialProps) ;
  70. }
  71. const getStaticProps =
  72. typeof origGetStaticProps === 'function'
  73. ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetStaticPropsWithSentry(origGetStaticProps, '/_document')
  74. : undefined;
  75. const getServerSideProps =
  76. typeof origGetServerSideProps === 'function'
  77. ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapGetServerSidePropsWithSentry(origGetServerSideProps, '/_document')
  78. : undefined;
  79. const pageWrapperTemplate = pageComponent ? _sentry_nextjs__WEBPACK_IMPORTED_MODULE_1__.wrapPageComponentWithSentry(pageComponent ) : pageComponent;
  80. /***/ }),
  81. /***/ 58097:
  82. /***/ ((module) => {
  83. module.exports = require("@sentry/nextjs");
  84. /***/ }),
  85. /***/ 12372:
  86. /***/ ((module) => {
  87. module.exports = require("lodash/findKey");
  88. /***/ }),
  89. /***/ 94140:
  90. /***/ ((module) => {
  91. module.exports = require("next/dist/server/get-page-files.js");
  92. /***/ }),
  93. /***/ 89716:
  94. /***/ ((module) => {
  95. module.exports = require("next/dist/server/htmlescape.js");
  96. /***/ }),
  97. /***/ 76368:
  98. /***/ ((module) => {
  99. module.exports = require("next/dist/server/utils.js");
  100. /***/ }),
  101. /***/ 56724:
  102. /***/ ((module) => {
  103. module.exports = require("next/dist/shared/lib/constants.js");
  104. /***/ }),
  105. /***/ 18743:
  106. /***/ ((module) => {
  107. module.exports = require("next/dist/shared/lib/html-context.js");
  108. /***/ }),
  109. /***/ 78524:
  110. /***/ ((module) => {
  111. module.exports = require("next/dist/shared/lib/is-plain-object.js");
  112. /***/ }),
  113. /***/ 16689:
  114. /***/ ((module) => {
  115. module.exports = require("react");
  116. /***/ }),
  117. /***/ 20997:
  118. /***/ ((module) => {
  119. module.exports = require("react/jsx-runtime");
  120. /***/ })
  121. };
  122. ;
  123. // load runtime
  124. var __webpack_require__ = require("../webpack-runtime.js");
  125. __webpack_require__.C(exports);
  126. var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
  127. var __webpack_exports__ = __webpack_require__.X(0, [11497,21927,96270,24709], () => (__webpack_exec__(56414)));
  128. module.exports = __webpack_exports__;
  129. })();
  130. //# sourceMappingURL=_document.js.map