You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			25 lines
		
	
	
		
			17 KiB
		
	
	
	
		
			JavaScript
		
	
		
		
			
		
	
	
			25 lines
		
	
	
		
			17 KiB
		
	
	
	
		
			JavaScript
		
	
| 
											9 months ago
										 | "use strict"; | ||
|  | /* | ||
|  |  * ATTENTION: An "eval-source-map" devtool has been used. | ||
|  |  * This devtool is neither made for production nor for readable output files. | ||
|  |  * It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools. | ||
|  |  * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 | ||
|  |  * or disable the default devtool with "devtool: false". | ||
|  |  * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 | ||
|  |  */ | ||
|  | exports.id = "vendor-chunks/css-box-model"; | ||
|  | exports.ids = ["vendor-chunks/css-box-model"]; | ||
|  | exports.modules = { | ||
|  | 
 | ||
|  | /***/ "(ssr)/./node_modules/css-box-model/dist/css-box-model.esm.js": | ||
|  | /*!**************************************************************!*\ | ||
|  |   !*** ./node_modules/css-box-model/dist/css-box-model.esm.js ***! | ||
|  |   \**************************************************************/ | ||
|  | /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | ||
|  | 
 | ||
|  | eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */   calculateBox: () => (/* binding */ calculateBox),\n/* harmony export */   createBox: () => (/* binding */ createBox),\n/* harmony export */   expand: () => (/* binding */ expand),\n/* harmony export */   getBox: () => (/* binding */ getBox),\n/* harmony export */   getRect: () => (/* binding */ getRect),\n/* harmony export */   offset: () => (/* binding */ offset),\n/* harmony export */   shrink: () => (/* binding */ shrink),\n/* harmony export */   withScroll: () => (/* binding */ withScroll)\n/* harmony export */ });\n/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tiny-invariant */ \"(ssr)/./node_modules/tiny-invariant/dist/esm/tiny-invariant.js\");\n\nvar getRect = function getRect(_ref) {\n    var top = _ref.top, right = _ref.right, bottom = _ref.bottom, left = _ref.left;\n    var width = right - left;\n    var height = bottom - top;\n    var rect = {\n        top: top,\n        right: right,\n        bottom: bottom,\n        left: left,\n        width: width,\n        height: height,\n        x: left,\n        y: top,\n        center: {\n            x: (right + left) / 2,\n            y: (bottom + top) / 2\n        }\n    };\n    return rect;\n};\nvar expand = function expand(target, expandBy) {\n    return {\n        top: target.top - expandBy.top,\n        left: target.left - expandBy.left,\n        bottom: target.bottom + expandBy.bottom,\n        right: target.right + expandBy.right\n    };\n};\nvar shrink = function shrink(target, shrinkBy) {\n    return {\n        top: target.top + shrinkBy.top,\n        left: target.left + shrinkBy.left,\n        bottom: target.bottom - shrinkBy.bottom,\n        right: target.right - shrinkBy.right\n    };\n};\nvar shift = function shift(target, shiftBy) {\n    return {\n        top: target.top + shiftBy.y,\n        left: target.left + shiftBy.x,\n        bottom: target.bottom + shiftBy.y,\n        right: target.right + shiftBy.x\n    };\n};\nvar noSpacing = {\n    top: 0,\n    right: 0,\n    bottom: 0,\n    left: 0\n};\nvar createBox = function createBox(_ref2) {\n    var borderBox = _ref2.borderBox, _ref2$margin = _ref2.margin, margin = _ref2$margin === void 0 ? noSpacing : _ref2$margin, _ref2$border = _ref2.border, border = _ref2$border === void 0 ? noSpacing : _ref2$border, _ref2$padding = _ref2.padding, padding = _ref2$padding === void 0 ? noSpacing : _ref2$padding;\n    var marginBox = getRect(expand(borderBox, margin));\n    var paddingBox = getRect(shrink(borderBox, border));\n    var contentBox = getRect(shrink(paddingBox, padding));\n    return {\n        marginBox: marginBox,\n        borderBox: getRect(borderBox),\n        paddingBox: paddingBox,\n        contentBox: contentBox,\n        margin: margin,\n        border: border,\n        padding: padding\n    };\n};\nvar parse = function parse(raw) {\n    var value = raw.slice(0, -2);\n    var suffix = raw.slice(-2);\n    if (suffix !== \"px\") {\n        return 0;\n    }\n    var result = Number(value);\n    !!isNaN(result) ?  true ? (0,tiny_invariant__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(false, \"Could not parse value [raw: \" + raw + \", without suffix: \" + value + \"]\") : 0 : void 0;\n    return result;\n};\nvar getWindowScroll = function getWindowScroll() {\n    return {\n        x: window.pageXOffset,\n        y: window.pageYOffset\n    };\n};\nvar offset = function offset(original, change) {\n    var borderBox = original.borderBox, border = original.border, margin = original.margin, padding = original.padding;\n    var shifted = shift(borderBox, change);\n    return createBox({\n        borderBox: shifted,\n        border: border,\n        margin: margin,\n        padding: padding\n    });\n};\nvar withScroll = function withScroll(original, scroll) {\n    if (scroll === void 0) {\n        scroll = getWindowScroll();\n    }\n    return offset(original, scroll);\n};\nvar calculateBox = function calculateBox(borderBox | ||
|  | 
 | ||
|  | /***/ }) | ||
|  | 
 | ||
|  | }; | ||
|  | ; |