| 1 |
(function() { |
| 2 |
var exports = {}; |
| 3 |
exports.id = 820; |
| 4 |
exports.ids = [820]; |
| 5 |
exports.modules = { |
| 6 |
|
| 7 |
/***/ 900: |
| 8 |
/***/ (function(__unused_webpack_module, exports, __webpack_require__) { |
| 9 |
|
| 10 |
"use strict"; |
| 11 |
|
| 12 |
|
| 13 |
var _interopRequireDefault = __webpack_require__(426); |
| 14 |
|
| 15 |
exports.__esModule = true; |
| 16 |
exports.default = void 0; |
| 17 |
|
| 18 |
var _react = _interopRequireDefault(__webpack_require__(297)); |
| 19 |
|
| 20 |
var _head = _interopRequireDefault(__webpack_require__(273)); |
| 21 |
|
| 22 |
const statusCodes = { |
| 23 |
400: 'Bad Request', |
| 24 |
404: 'This page could not be found', |
| 25 |
405: 'Method Not Allowed', |
| 26 |
500: 'Internal Server Error' |
| 27 |
}; |
| 28 |
|
| 29 |
function _getInitialProps({ |
| 30 |
res, |
| 31 |
err |
| 32 |
}) { |
| 33 |
const statusCode = res && res.statusCode ? res.statusCode : err ? err.statusCode : 404; |
| 34 |
return { |
| 35 |
statusCode |
| 36 |
}; |
| 37 |
} |
| 38 |
/** |
| 39 |
* `Error` component used for handling errors. |
| 40 |
*/ |
| 41 |
|
| 42 |
|
| 43 |
class Error extends _react.default.Component { |
| 44 |
render() { |
| 45 |
const { |
| 46 |
statusCode |
| 47 |
} = this.props; |
| 48 |
const title = this.props.title || statusCodes[statusCode] || 'An unexpected error has occurred'; |
| 49 |
return /*#__PURE__*/_react.default.createElement("div", { |
| 50 |
style: styles.error |
| 51 |
}, /*#__PURE__*/_react.default.createElement(_head.default, null, /*#__PURE__*/_react.default.createElement("title", null, statusCode, ": ", title)), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("style", { |
| 52 |
dangerouslySetInnerHTML: { |
| 53 |
__html: 'body { margin: 0 }' |
| 54 |
} |
| 55 |
}), statusCode ? /*#__PURE__*/_react.default.createElement("h1", { |
| 56 |
style: styles.h1 |
| 57 |
}, statusCode) : null, /*#__PURE__*/_react.default.createElement("div", { |
| 58 |
style: styles.desc |
| 59 |
}, /*#__PURE__*/_react.default.createElement("h2", { |
| 60 |
style: styles.h2 |
| 61 |
}, title, ".")))); |
| 62 |
} |
| 63 |
|
| 64 |
} |
| 65 |
|
| 66 |
exports.default = Error; |
| 67 |
Error.displayName = 'ErrorPage'; |
| 68 |
Error.getInitialProps = _getInitialProps; |
| 69 |
Error.origGetInitialProps = _getInitialProps; |
| 70 |
const styles = { |
| 71 |
error: { |
| 72 |
color: '#000', |
| 73 |
background: '#fff', |
| 74 |
fontFamily: '-apple-system, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif', |
| 75 |
height: '100vh', |
| 76 |
textAlign: 'center', |
| 77 |
display: 'flex', |
| 78 |
flexDirection: 'column', |
| 79 |
alignItems: 'center', |
| 80 |
justifyContent: 'center' |
| 81 |
}, |
| 82 |
desc: { |
| 83 |
display: 'inline-block', |
| 84 |
textAlign: 'left', |
| 85 |
lineHeight: '49px', |
| 86 |
height: '49px', |
| 87 |
verticalAlign: 'middle' |
| 88 |
}, |
| 89 |
h1: { |
| 90 |
display: 'inline-block', |
| 91 |
borderRight: '1px solid rgba(0, 0, 0,.3)', |
| 92 |
margin: 0, |
| 93 |
marginRight: '20px', |
| 94 |
padding: '10px 23px 10px 0', |
| 95 |
fontSize: '24px', |
| 96 |
fontWeight: 500, |
| 97 |
verticalAlign: 'top' |
| 98 |
}, |
| 99 |
h2: { |
| 100 |
fontSize: '14px', |
| 101 |
fontWeight: 'normal', |
| 102 |
lineHeight: 'inherit', |
| 103 |
margin: 0, |
| 104 |
padding: 0 |
| 105 |
} |
| 106 |
}; |
| 107 |
|
| 108 |
/***/ }), |
| 109 |
|
| 110 |
/***/ 426: |
| 111 |
/***/ (function(module) { |
| 112 |
|
| 113 |
function _interopRequireDefault(obj) { |
| 114 |
return obj && obj.__esModule ? obj : { |
| 115 |
"default": obj |
| 116 |
}; |
| 117 |
} |
| 118 |
|
| 119 |
module.exports = _interopRequireDefault; |
| 120 |
|
| 121 |
/***/ }), |
| 122 |
|
| 123 |
/***/ 273: |
| 124 |
/***/ (function(module) { |
| 125 |
|
| 126 |
"use strict"; |
| 127 |
module.exports = require("next/dist/next-server/lib/head.js");; |
| 128 |
|
| 129 |
/***/ }), |
| 130 |
|
| 131 |
/***/ 297: |
| 132 |
/***/ (function(module) { |
| 133 |
|
| 134 |
"use strict"; |
| 135 |
module.exports = require("react");; |
| 136 |
|
| 137 |
/***/ }) |
| 138 |
|
| 139 |
}; |
| 140 |
; |
| 141 |
|
| 142 |
// load runtime |
| 143 |
var __webpack_require__ = require("../webpack-runtime.js"); |
| 144 |
__webpack_require__.C(exports); |
| 145 |
var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); } |
| 146 |
var __webpack_exports__ = (__webpack_exec__(900)); |
| 147 |
module.exports = __webpack_exports__; |
| 148 |
|
| 149 |
})(); |