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
19 KiB
JavaScript
25 lines
19 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/inline-style-parser";
|
||
|
|
exports.ids = ["vendor-chunks/inline-style-parser"];
|
||
|
|
exports.modules = {
|
||
|
|
|
||
|
|
/***/ "(ssr)/./node_modules/inline-style-parser/index.js":
|
||
|
|
/*!***************************************************!*\
|
||
|
|
!*** ./node_modules/inline-style-parser/index.js ***!
|
||
|
|
\***************************************************/
|
||
|
|
/***/ ((module) => {
|
||
|
|
|
||
|
|
eval("// http://www.w3.org/TR/CSS21/grammar.html\n// https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027\n\nvar COMMENT_REGEX = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\nvar NEWLINE_REGEX = /\\n/g;\nvar WHITESPACE_REGEX = /^\\s*/;\n// declaration\nvar PROPERTY_REGEX = /^(\\*?[-#/*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/;\nvar COLON_REGEX = /^:\\s*/;\nvar VALUE_REGEX = /^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^)]*?\\)|[^};])+)/;\nvar SEMICOLON_REGEX = /^[;\\s]*/;\n// https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\nvar TRIM_REGEX = /^\\s+|\\s+$/g;\n// strings\nvar NEWLINE = \"\\n\";\nvar FORWARD_SLASH = \"/\";\nvar ASTERISK = \"*\";\nvar EMPTY_STRING = \"\";\n// types\nvar TYPE_COMMENT = \"comment\";\nvar TYPE_DECLARATION = \"declaration\";\n/**\n * @param {String} style\n * @param {Object} [options]\n * @return {Object[]}\n * @throws {TypeError}\n * @throws {Error}\n */ module.exports = function(style, options) {\n if (typeof style !== \"string\") {\n throw new TypeError(\"First argument must be a string\");\n }\n if (!style) return [];\n options = options || {};\n /**\n * Positional.\n */ var lineno = 1;\n var column = 1;\n /**\n * Update lineno and column based on `str`.\n *\n * @param {String} str\n */ function updatePosition(str) {\n var lines = str.match(NEWLINE_REGEX);\n if (lines) lineno += lines.length;\n var i = str.lastIndexOf(NEWLINE);\n column = ~i ? str.length - i : column + str.length;\n }\n /**\n * Mark position and patch `node.position`.\n *\n * @return {Function}\n */ function position() {\n var start = {\n line: lineno,\n column: column\n };\n return function(node) {\n node.position = new Position(start);\n whitespace();\n return node;\n };\n }\n /**\n * Store position information for a node.\n *\n * @constructor\n * @property {Object} start\n * @property {Object} end\n * @property {undefined|String} source\n */ function Position(start) {\n this.start = start;\n this.end = {\n line: lineno,\n column: column\n };\n this.source = options.source;\n }\n /**\n * Non-enumerable source string.\n */ Position.prototype.content = style;\n var errorsList = [];\n /**\n * Error `msg`.\n *\n * @param {String} msg\n * @throws {Error}\n */ function error(msg) {\n var err = new Error(options.source + \":\" + lineno + \":\" + column + \": \" + msg);\n err.reason = msg;\n err.filename = options.source;\n err.line = lineno;\n err.column = column;\n err.source = style;\n if (options.silent) {\n errorsList.push(err);\n } else {\n throw err;\n }\n }\n /**\n * Match `re` and return captures.\n *\n * @param {RegExp} re\n * @return {undefined|Array}\n */ function match(re) {\n var m = re.exec(style);\n if (!m) return;\n var str = m[0];\n updatePosition(str);\n style = style.slice(str.length);\n return m;\n }\n /**\n * Parse whitespace.\n */ function whitespace() {\n match(WHITESPACE_REGEX);\n }\n /**\n * Parse comments.\n *\n * @param {Object[]} [rules]\n * @return {Object[]}\n */ function comments(rules) {\n var c;\n rules = rules || [];\n while(c = comment()){\n if (c !== false) {\n rules.push(c);\n }\n }\n return rules;\n }\n /**\n * Parse comment.\n *\n * @return {Object}\n * @throws {Error}\n */ function comment() {\n var pos = position();\n if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;\n var i = 2;\n while(EMPTY_STRING != style.charAt(i) && (ASTERISK != style.charAt(i) || FORWARD_SLASH != style.charAt(i + 1))){\n ++i;\n }\n i += 2;\n if (EMPTY_STRING ===
|
||
|
|
|
||
|
|
/***/ })
|
||
|
|
|
||
|
|
};
|
||
|
|
;
|