vite
Version:
Native-ESM powered web dev build tool
1 lines • 799 kB
Source Map (JSON)
{"version":3,"file":"dep-cb9bf5e2.js","sources":["../../../../../node_modules/clean-css/lib/optimizer/level-0/optimize.js","../../../../../node_modules/clean-css/lib/utils/natural-compare.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/sort-selectors.js","../../../../../node_modules/clean-css/lib/utils/override.js","../../../../../node_modules/clean-css/lib/options/format.js","../../../../../node_modules/clean-css/lib/tokenizer/marker.js","../../../../../node_modules/clean-css/lib/utils/format-position.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/tidy-rules.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/tidy-block.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/tidy-at-rule.js","../../../../../node_modules/clean-css/lib/optimizer/hack.js","../../../../../node_modules/clean-css/lib/optimizer/remove-unused.js","../../../../../node_modules/clean-css/lib/optimizer/restore-from-optimizing.js","../../../../../node_modules/clean-css/lib/tokenizer/token.js","../../../../../node_modules/clean-css/lib/optimizer/wrap-for-optimizing.js","../../../../../node_modules/clean-css/lib/optimizer/invalid-property-error.js","../../../../../node_modules/clean-css/lib/optimizer/configuration/break-up.js","../../../../../node_modules/clean-css/lib/optimizer/vendor-prefixes.js","../../../../../node_modules/clean-css/lib/optimizer/configuration/properties/understandable.js","../../../../../node_modules/clean-css/lib/optimizer/configuration/can-override.js","../../../../../node_modules/clean-css/lib/optimizer/clone.js","../../../../../node_modules/clean-css/lib/optimizer/configuration/restore.js","../../../../../node_modules/clean-css/lib/options/rounding-precision.js","../../../../../node_modules/clean-css/lib/options/optimization-level.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/background.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/box-shadow.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/border-radius.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/filter.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/font-weight.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/margin.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/outline.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers/padding.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/property-optimizers.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-hex.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-hsl.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color/shorten-rgb.js","../../../../../node_modules/clean-css/lib/utils/split.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/color.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/degrees.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/starts-as-url.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/fraction.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/precision.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/text-quotes.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/time.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/unit.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-prefix.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-quotes.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/url-whitespace.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/whitespace.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers/zero.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/value-optimizers.js","../../../../../node_modules/clean-css/lib/optimizer/configuration.js","../../../../../node_modules/clean-css/lib/writer/helpers.js","../../../../../node_modules/clean-css/lib/writer/one-time.js","../../../../../node_modules/clean-css/lib/optimizer/level-1/optimize.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/is-mergeable.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/every-values-pair.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/has-inherit.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/has-same-values.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/populate-components.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/restore-with-components.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/merge-into-shorthands.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/has-unset.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/find-component-in.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/is-component-of.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/is-mergeable-shorthand.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/overrides-non-component-shorthand.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/override-properties.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/properties/optimize.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/merge-adjacent.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/rules-overlap.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/specificity.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/specificities-overlap.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/reorderable.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/extract-properties.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/merge-media-queries.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/merge-non-adjacent-by-body.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/merge-non-adjacent-by-selector.js","../../../../../node_modules/clean-css/lib/utils/clone-array.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/reduce-non-adjacent.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/remove-duplicate-font-at-rules.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/remove-duplicate-media-queries.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/remove-duplicates.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/remove-unused-at-rules.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/tidy-rule-duplicates.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/restructure.js","../../../../../node_modules/clean-css/lib/optimizer/level-2/optimize.js","../../../../../node_modules/clean-css/lib/optimizer/validator.js","../../../../../node_modules/clean-css/lib/options/compatibility.js","../../../../../node_modules/clean-css/lib/utils/is-http-resource.js","../../../../../node_modules/clean-css/lib/utils/is-https-resource.js","../../../../../node_modules/clean-css/lib/reader/load-remote-resource.js","../../../../../node_modules/clean-css/lib/options/fetch.js","../../../../../node_modules/clean-css/lib/options/inline.js","../../../../../node_modules/clean-css/lib/options/inline-request.js","../../../../../node_modules/clean-css/lib/options/inline-timeout.js","../../../../../node_modules/clean-css/lib/options/plugins.js","../../../../../node_modules/clean-css/lib/options/rebase.js","../../../../../node_modules/clean-css/lib/options/rebase-to.js","../../../../../node_modules/clean-css/lib/reader/input-source-map-tracker.js","../../../../../node_modules/clean-css/lib/utils/is-remote-resource.js","../../../../../node_modules/clean-css/lib/utils/has-protocol.js","../../../../../node_modules/clean-css/lib/reader/is-allowed-resource.js","../../../../../node_modules/clean-css/lib/reader/match-data-uri.js","../../../../../node_modules/clean-css/lib/reader/rebase-local-map.js","../../../../../node_modules/clean-css/lib/reader/rebase-remote-map.js","../../../../../node_modules/clean-css/lib/utils/is-data-uri-resource.js","../../../../../node_modules/clean-css/lib/reader/apply-source-maps.js","../../../../../node_modules/clean-css/lib/reader/extract-import-url-and-media.js","../../../../../node_modules/clean-css/lib/reader/load-original-sources.js","../../../../../node_modules/clean-css/lib/reader/normalize-path.js","../../../../../node_modules/clean-css/lib/reader/restore-import.js","../../../../../node_modules/clean-css/lib/reader/rewrite-url.js","../../../../../node_modules/clean-css/lib/utils/is-import.js","../../../../../node_modules/clean-css/lib/reader/rebase.js","../../../../../node_modules/clean-css/lib/tokenizer/tokenize.js","../../../../../node_modules/clean-css/lib/reader/read-sources.js","../../../../../node_modules/clean-css/lib/writer/simple.js","../../../../../node_modules/clean-css/lib/writer/source-maps.js","../../../../../node_modules/clean-css/lib/clean.js","../../../../../node_modules/clean-css/index.js"],"sourcesContent":["function level0Optimize(tokens) {\n // noop as level 0 means no optimizations!\n return tokens;\n}\n\nmodule.exports = level0Optimize;\n","// adapted from http://nedbatchelder.com/blog/200712.html#e20071211T054956\n\nvar NUMBER_PATTERN = /([0-9]+)/;\n\nfunction naturalCompare(value1, value2) {\n var keys1 = ('' + value1).split(NUMBER_PATTERN).map(tryParseInt);\n var keys2 = ('' + value2).split(NUMBER_PATTERN).map(tryParseInt);\n var key1;\n var key2;\n var compareFirst = Math.min(keys1.length, keys2.length);\n var i, l;\n\n for (i = 0, l = compareFirst; i < l; i++) {\n key1 = keys1[i];\n key2 = keys2[i];\n\n if (key1 != key2) {\n return key1 > key2 ? 1 : -1;\n }\n }\n\n return keys1.length > keys2.length ? 1 : (keys1.length == keys2.length ? 0 : -1);\n}\n\nfunction tryParseInt(value) {\n return ('' + parseInt(value)) == value ?\n parseInt(value) :\n value;\n}\n\nmodule.exports = naturalCompare;\n","var naturalCompare = require('../../utils/natural-compare');\n\nfunction naturalSorter(scope1, scope2) {\n return naturalCompare(scope1[1], scope2[1]);\n}\n\nfunction standardSorter(scope1, scope2) {\n return scope1[1] > scope2[1] ? 1 : -1;\n}\n\nfunction sortSelectors(selectors, method) {\n switch (method) {\n case 'natural':\n return selectors.sort(naturalSorter);\n case 'standard':\n return selectors.sort(standardSorter);\n case 'none':\n case false:\n return selectors;\n }\n}\n\nmodule.exports = sortSelectors;\n","function override(source1, source2) {\n var target = {};\n var key1;\n var key2;\n var item;\n\n for (key1 in source1) {\n item = source1[key1];\n\n if (Array.isArray(item)) {\n target[key1] = item.slice(0);\n } else if (typeof item == 'object' && item !== null) {\n target[key1] = override(item, {});\n } else {\n target[key1] = item;\n }\n }\n\n for (key2 in source2) {\n item = source2[key2];\n\n if (key2 in target && Array.isArray(item)) {\n target[key2] = item.slice(0);\n } else if (key2 in target && typeof item == 'object' && item !== null) {\n target[key2] = override(target[key2], item);\n } else {\n target[key2] = item;\n }\n }\n\n return target;\n}\n\nmodule.exports = override;\n","var systemLineBreak = require('os').EOL;\n\nvar override = require('../utils/override');\n\nvar Breaks = {\n AfterAtRule: 'afterAtRule',\n AfterBlockBegins: 'afterBlockBegins',\n AfterBlockEnds: 'afterBlockEnds',\n AfterComment: 'afterComment',\n AfterProperty: 'afterProperty',\n AfterRuleBegins: 'afterRuleBegins',\n AfterRuleEnds: 'afterRuleEnds',\n BeforeBlockEnds: 'beforeBlockEnds',\n BetweenSelectors: 'betweenSelectors'\n};\n\nvar BreakWith = {\n CarriageReturnLineFeed: '\\r\\n',\n LineFeed: '\\n',\n System: systemLineBreak\n};\n\nvar IndentWith = {\n Space: ' ',\n Tab: '\\t'\n};\n\nvar Spaces = {\n AroundSelectorRelation: 'aroundSelectorRelation',\n BeforeBlockBegins: 'beforeBlockBegins',\n BeforeValue: 'beforeValue'\n};\n\nvar DEFAULTS = {\n breaks: breaks(false),\n breakWith: BreakWith.System,\n indentBy: 0,\n indentWith: IndentWith.Space,\n spaces: spaces(false),\n wrapAt: false,\n semicolonAfterLastProperty: false\n};\n\nvar BEAUTIFY_ALIAS = 'beautify';\nvar KEEP_BREAKS_ALIAS = 'keep-breaks';\n\nvar OPTION_SEPARATOR = ';';\nvar OPTION_NAME_VALUE_SEPARATOR = ':';\nvar HASH_VALUES_OPTION_SEPARATOR = ',';\nvar HASH_VALUES_NAME_VALUE_SEPARATOR = '=';\n\nvar FALSE_KEYWORD_1 = 'false';\nvar FALSE_KEYWORD_2 = 'off';\nvar TRUE_KEYWORD_1 = 'true';\nvar TRUE_KEYWORD_2 = 'on';\n\nfunction breaks(value) {\n var breakOptions = {};\n\n breakOptions[Breaks.AfterAtRule] = value;\n breakOptions[Breaks.AfterBlockBegins] = value;\n breakOptions[Breaks.AfterBlockEnds] = value;\n breakOptions[Breaks.AfterComment] = value;\n breakOptions[Breaks.AfterProperty] = value;\n breakOptions[Breaks.AfterRuleBegins] = value;\n breakOptions[Breaks.AfterRuleEnds] = value;\n breakOptions[Breaks.BeforeBlockEnds] = value;\n breakOptions[Breaks.BetweenSelectors] = value;\n\n return breakOptions;\n}\n\nfunction spaces(value) {\n var spaceOptions = {};\n\n spaceOptions[Spaces.AroundSelectorRelation] = value;\n spaceOptions[Spaces.BeforeBlockBegins] = value;\n spaceOptions[Spaces.BeforeValue] = value;\n\n return spaceOptions;\n}\n\nfunction formatFrom(source) {\n if (source === undefined || source === false) {\n return false;\n }\n\n if (typeof source == 'object' && 'breakWith' in source) {\n source = override(source, { breakWith: mapBreakWith(source.breakWith) });\n }\n\n if (typeof source == 'object' && 'indentBy' in source) {\n source = override(source, { indentBy: parseInt(source.indentBy) });\n }\n\n if (typeof source == 'object' && 'indentWith' in source) {\n source = override(source, { indentWith: mapIndentWith(source.indentWith) });\n }\n\n if (typeof source == 'object') {\n return remapBreaks(override(DEFAULTS, source));\n }\n\n if (typeof source == 'string' && source == BEAUTIFY_ALIAS) {\n return remapBreaks(\n override(DEFAULTS, {\n breaks: breaks(true),\n indentBy: 2,\n spaces: spaces(true)\n })\n );\n }\n\n if (typeof source == 'string' && source == KEEP_BREAKS_ALIAS) {\n return remapBreaks(\n override(DEFAULTS, {\n breaks: {\n afterAtRule: true,\n afterBlockBegins: true,\n afterBlockEnds: true,\n afterComment: true,\n afterRuleEnds: true,\n beforeBlockEnds: true\n }\n })\n );\n }\n\n if (typeof source == 'string') {\n return remapBreaks(override(DEFAULTS, toHash(source)));\n }\n\n return DEFAULTS;\n}\n\nfunction toHash(string) {\n return string\n .split(OPTION_SEPARATOR)\n .reduce(function (accumulator, directive) {\n var parts = directive.split(OPTION_NAME_VALUE_SEPARATOR);\n var name = parts[0];\n var value = parts[1];\n\n if (name == 'breaks' || name == 'spaces') {\n accumulator[name] = hashValuesToHash(value);\n } else if (name == 'indentBy' || name == 'wrapAt') {\n accumulator[name] = parseInt(value);\n } else if (name == 'indentWith') {\n accumulator[name] = mapIndentWith(value);\n } else if (name == 'breakWith') {\n accumulator[name] = mapBreakWith(value);\n }\n\n return accumulator;\n }, {});\n}\n\nfunction hashValuesToHash(string) {\n return string\n .split(HASH_VALUES_OPTION_SEPARATOR)\n .reduce(function (accumulator, directive) {\n var parts = directive.split(HASH_VALUES_NAME_VALUE_SEPARATOR);\n var name = parts[0];\n var value = parts[1];\n\n accumulator[name] = normalizeValue(value);\n\n return accumulator;\n }, {});\n}\n\n\nfunction normalizeValue(value) {\n switch (value) {\n case FALSE_KEYWORD_1:\n case FALSE_KEYWORD_2:\n return false;\n case TRUE_KEYWORD_1:\n case TRUE_KEYWORD_2:\n return true;\n default:\n return value;\n }\n}\n\nfunction mapBreakWith(value) {\n switch (value) {\n case 'windows':\n case 'crlf':\n case BreakWith.CarriageReturnLineFeed:\n return BreakWith.CarriageReturnLineFeed;\n case 'unix':\n case 'lf':\n case BreakWith.LineFeed:\n return BreakWith.LineFeed;\n default:\n return systemLineBreak;\n }\n}\n\nfunction mapIndentWith(value) {\n switch (value) {\n case 'space':\n return IndentWith.Space;\n case 'tab':\n return IndentWith.Tab;\n default:\n return value;\n }\n}\n\nfunction remapBreaks(source) {\n for (var key in Breaks) {\n var breakName = Breaks[key];\n var breakValue = source.breaks[breakName];\n\n if (breakValue === true) {\n source.breaks[breakName] = source.breakWith;\n } else if (breakValue === false) {\n source.breaks[breakName] = '';\n } else {\n source.breaks[breakName] = source.breakWith.repeat(parseInt(breakValue));\n }\n }\n\n return source;\n}\n\nmodule.exports = {\n Breaks: Breaks,\n Spaces: Spaces,\n formatFrom: formatFrom\n};\n","var Marker = {\n ASTERISK: '*',\n AT: '@',\n BACK_SLASH: '\\\\',\n CARRIAGE_RETURN: '\\r',\n CLOSE_CURLY_BRACKET: '}',\n CLOSE_ROUND_BRACKET: ')',\n CLOSE_SQUARE_BRACKET: ']',\n COLON: ':',\n COMMA: ',',\n DOUBLE_QUOTE: '\"',\n EXCLAMATION: '!',\n FORWARD_SLASH: '/',\n INTERNAL: '-clean-css-',\n NEW_LINE_NIX: '\\n',\n OPEN_CURLY_BRACKET: '{',\n OPEN_ROUND_BRACKET: '(',\n OPEN_SQUARE_BRACKET: '[',\n SEMICOLON: ';',\n SINGLE_QUOTE: '\\'',\n SPACE: ' ',\n TAB: '\\t',\n UNDERSCORE: '_'\n};\n\nmodule.exports = Marker;\n","function formatPosition(metadata) {\n var line = metadata[0];\n var column = metadata[1];\n var source = metadata[2];\n\n return source ?\n source + ':' + line + ':' + column :\n line + ':' + column;\n}\n\nmodule.exports = formatPosition;\n","var Spaces = require('../../options/format').Spaces;\nvar Marker = require('../../tokenizer/marker');\nvar formatPosition = require('../../utils/format-position');\n\nvar CASE_ATTRIBUTE_PATTERN = /[\\s\"'][iI]\\s*\\]/;\nvar CASE_RESTORE_PATTERN = /([\\d\\w])([iI])\\]/g;\nvar DOUBLE_QUOTE_CASE_PATTERN = /=\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"([iI])/g;\nvar DOUBLE_QUOTE_PATTERN = /=\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"(\\s|\\])/g;\nvar HTML_COMMENT_PATTERN = /^(?:(?:<!--|-->)\\s*)+/;\nvar SINGLE_QUOTE_CASE_PATTERN = /='([a-zA-Z][a-zA-Z\\d\\-_]+)'([iI])/g;\nvar SINGLE_QUOTE_PATTERN = /='([a-zA-Z][a-zA-Z\\d\\-_]+)'(\\s|\\])/g;\nvar RELATION_PATTERN = /[>\\+~]/;\nvar WHITESPACE_PATTERN = /\\s/;\n\nvar ASTERISK_PLUS_HTML_HACK = '*+html ';\nvar ASTERISK_FIRST_CHILD_PLUS_HTML_HACK = '*:first-child+html ';\nvar LESS_THAN = '<';\n\nvar PSEUDO_CLASSES_WITH_SELECTORS = [\n ':current',\n ':future',\n ':has',\n ':host',\n ':host-context',\n ':is',\n ':not',\n ':past',\n ':where'\n];\n\nfunction hasInvalidCharacters(value) {\n var isEscaped;\n var isInvalid = false;\n var character;\n var isQuote = false;\n var i, l;\n\n for (i = 0, l = value.length; i < l; i++) {\n character = value[i];\n\n if (isEscaped) {\n // continue as always\n } else if (character == Marker.SINGLE_QUOTE || character == Marker.DOUBLE_QUOTE) {\n isQuote = !isQuote;\n } else if (!isQuote && (character == Marker.CLOSE_CURLY_BRACKET || character == Marker.EXCLAMATION || character == LESS_THAN || character == Marker.SEMICOLON)) {\n isInvalid = true;\n break;\n } else if (!isQuote && i === 0 && RELATION_PATTERN.test(character)) {\n isInvalid = true;\n break;\n }\n\n isEscaped = character == Marker.BACK_SLASH;\n }\n\n return isInvalid;\n}\n\nfunction removeWhitespace(value, format) {\n var stripped = [];\n var character;\n var isNewLineNix;\n var isNewLineWin;\n var isEscaped;\n var wasEscaped;\n var isQuoted;\n var isSingleQuoted;\n var isDoubleQuoted;\n var isAttribute;\n var isRelation;\n var isWhitespace;\n var isSpaceAwarePseudoClass;\n var roundBracketLevel = 0;\n var wasComma = false;\n var wasRelation = false;\n var wasWhitespace = false;\n var withCaseAttribute = CASE_ATTRIBUTE_PATTERN.test(value);\n var spaceAroundRelation = format && format.spaces[Spaces.AroundSelectorRelation];\n var i, l;\n\n for (i = 0, l = value.length; i < l; i++) {\n character = value[i];\n\n isNewLineNix = character == Marker.NEW_LINE_NIX;\n isNewLineWin = character == Marker.NEW_LINE_NIX && value[i - 1] == Marker.CARRIAGE_RETURN;\n isQuoted = isSingleQuoted || isDoubleQuoted;\n isRelation = !isAttribute && !isEscaped && roundBracketLevel === 0 && RELATION_PATTERN.test(character);\n isWhitespace = WHITESPACE_PATTERN.test(character);\n isSpaceAwarePseudoClass = roundBracketLevel == 1 && character == Marker.CLOSE_ROUND_BRACKET ?\n false :\n isSpaceAwarePseudoClass || (roundBracketLevel === 0 && character == Marker.COLON && isPseudoClassWithSelectors(value, i));\n\n if (wasEscaped && isQuoted && isNewLineWin) {\n // swallow escaped new windows lines in comments\n stripped.pop();\n stripped.pop();\n } else if (isEscaped && isQuoted && isNewLineNix) {\n // swallow escaped new *nix lines in comments\n stripped.pop();\n } else if (isEscaped) {\n stripped.push(character);\n } else if (character == Marker.OPEN_SQUARE_BRACKET && !isQuoted) {\n stripped.push(character);\n isAttribute = true;\n } else if (character == Marker.CLOSE_SQUARE_BRACKET && !isQuoted) {\n stripped.push(character);\n isAttribute = false;\n } else if (character == Marker.OPEN_ROUND_BRACKET && !isQuoted) {\n stripped.push(character);\n roundBracketLevel++;\n } else if (character == Marker.CLOSE_ROUND_BRACKET && !isQuoted) {\n stripped.push(character);\n roundBracketLevel--;\n } else if (character == Marker.SINGLE_QUOTE && !isQuoted) {\n stripped.push(character);\n isSingleQuoted = true;\n } else if (character == Marker.DOUBLE_QUOTE && !isQuoted) {\n stripped.push(character);\n isDoubleQuoted = true;\n } else if (character == Marker.SINGLE_QUOTE && isQuoted) {\n stripped.push(character);\n isSingleQuoted = false;\n } else if (character == Marker.DOUBLE_QUOTE && isQuoted) {\n stripped.push(character);\n isDoubleQuoted = false;\n } else if (isWhitespace && wasRelation && !spaceAroundRelation) {\n continue;\n } else if (!isWhitespace && wasRelation && spaceAroundRelation) {\n stripped.push(Marker.SPACE);\n stripped.push(character);\n } else if (isWhitespace && !wasWhitespace && wasComma && roundBracketLevel > 0 && isSpaceAwarePseudoClass) {\n // skip space\n } else if (isWhitespace && !wasWhitespace && roundBracketLevel > 0 && isSpaceAwarePseudoClass) {\n stripped.push(character);\n } else if (isWhitespace && (isAttribute || roundBracketLevel > 0) && !isQuoted) {\n // skip space\n } else if (isWhitespace && wasWhitespace && !isQuoted) {\n // skip extra space\n } else if ((isNewLineWin || isNewLineNix) && (isAttribute || roundBracketLevel > 0) && isQuoted) {\n // skip newline\n } else if (isRelation && wasWhitespace && !spaceAroundRelation) {\n stripped.pop();\n stripped.push(character);\n } else if (isRelation && !wasWhitespace && spaceAroundRelation) {\n stripped.push(Marker.SPACE);\n stripped.push(character);\n } else if (isWhitespace) {\n stripped.push(Marker.SPACE);\n } else {\n stripped.push(character);\n }\n\n wasEscaped = isEscaped;\n isEscaped = character == Marker.BACK_SLASH;\n wasRelation = isRelation;\n wasWhitespace = isWhitespace;\n wasComma = character == Marker.COMMA;\n }\n\n return withCaseAttribute ?\n stripped.join('').replace(CASE_RESTORE_PATTERN, '$1 $2]') :\n stripped.join('');\n}\n\nfunction isPseudoClassWithSelectors(value, colonPosition) {\n var pseudoClass = value.substring(colonPosition, value.indexOf(Marker.OPEN_ROUND_BRACKET, colonPosition));\n\n return PSEUDO_CLASSES_WITH_SELECTORS.indexOf(pseudoClass) > -1;\n}\n\nfunction removeQuotes(value) {\n if (value.indexOf('\\'') == -1 && value.indexOf('\"') == -1) {\n return value;\n }\n\n return value\n .replace(SINGLE_QUOTE_CASE_PATTERN, '=$1 $2')\n .replace(SINGLE_QUOTE_PATTERN, '=$1$2')\n .replace(DOUBLE_QUOTE_CASE_PATTERN, '=$1 $2')\n .replace(DOUBLE_QUOTE_PATTERN, '=$1$2');\n}\n\nfunction tidyRules(rules, removeUnsupported, adjacentSpace, format, warnings) {\n var list = [];\n var repeated = [];\n\n function removeHTMLComment(rule, match) {\n warnings.push('HTML comment \\'' + match + '\\' at ' + formatPosition(rule[2][0]) + '. Removing.');\n return '';\n }\n\n for (var i = 0, l = rules.length; i < l; i++) {\n var rule = rules[i];\n var reduced = rule[1];\n\n reduced = reduced.replace(HTML_COMMENT_PATTERN, removeHTMLComment.bind(null, rule));\n\n if (hasInvalidCharacters(reduced)) {\n warnings.push('Invalid selector \\'' + rule[1] + '\\' at ' + formatPosition(rule[2][0]) + '. Ignoring.');\n continue;\n }\n\n reduced = removeWhitespace(reduced, format);\n reduced = removeQuotes(reduced);\n\n if (adjacentSpace && reduced.indexOf('nav') > 0) {\n reduced = reduced.replace(/\\+nav(\\S|$)/, '+ nav$1');\n }\n\n if (removeUnsupported && reduced.indexOf(ASTERISK_PLUS_HTML_HACK) > -1) {\n continue;\n }\n\n if (removeUnsupported && reduced.indexOf(ASTERISK_FIRST_CHILD_PLUS_HTML_HACK) > -1) {\n continue;\n }\n\n if (reduced.indexOf('*') > -1) {\n reduced = reduced\n .replace(/\\*([:#\\.\\[])/g, '$1')\n .replace(/^(\\:first\\-child)?\\+html/, '*$1+html');\n }\n\n if (repeated.indexOf(reduced) > -1) {\n continue;\n }\n\n rule[1] = reduced;\n repeated.push(reduced);\n list.push(rule);\n }\n\n if (list.length == 1 && list[0][1].length === 0) {\n warnings.push('Empty selector \\'' + list[0][1] + '\\' at ' + formatPosition(list[0][2][0]) + '. Ignoring.');\n list = [];\n }\n\n return list;\n}\n\nmodule.exports = tidyRules;\n","var SUPPORTED_COMPACT_BLOCK_MATCHER = /^@media\\W/;\nvar SUPPORTED_QUOTE_REMOVAL_MATCHER = /^@(?:keyframes|-moz-keyframes|-o-keyframes|-webkit-keyframes)\\W/;\n\nfunction tidyBlock(values, spaceAfterClosingBrace) {\n var withoutSpaceAfterClosingBrace;\n var withoutQuotes;\n var i;\n\n for (i = values.length - 1; i >= 0; i--) {\n withoutSpaceAfterClosingBrace = !spaceAfterClosingBrace && SUPPORTED_COMPACT_BLOCK_MATCHER.test(values[i][1]);\n withoutQuotes = SUPPORTED_QUOTE_REMOVAL_MATCHER.test(values[i][1]);\n\n values[i][1] = values[i][1]\n .replace(/\\n|\\r\\n/g, ' ')\n .replace(/\\s+/g, ' ')\n .replace(/(,|:|\\() /g, '$1')\n .replace(/ \\)/g, ')');\n\n if (withoutQuotes) {\n values[i][1] = values[i][1]\n .replace(/'([a-zA-Z][a-zA-Z\\d\\-_]+)'/, '$1')\n .replace(/\"([a-zA-Z][a-zA-Z\\d\\-_]+)\"/, '$1');\n }\n\n if (withoutSpaceAfterClosingBrace) {\n values[i][1] = values[i][1]\n .replace(/\\) /g, ')');\n }\n }\n\n return values;\n}\n\nmodule.exports = tidyBlock;\n","function tidyAtRule(value) {\n return value\n .replace(/\\s+/g, ' ')\n .replace(/url\\(\\s+/g, 'url(')\n .replace(/\\s+\\)/g, ')')\n .trim();\n}\n\nmodule.exports = tidyAtRule;\n","var Hack = {\n ASTERISK: 'asterisk',\n BANG: 'bang',\n BACKSLASH: 'backslash',\n UNDERSCORE: 'underscore'\n};\n\nmodule.exports = Hack;\n","function removeUnused(properties) {\n for (var i = properties.length - 1; i >= 0; i--) {\n var property = properties[i];\n\n if (property.unused) {\n property.all.splice(property.position, 1);\n }\n }\n}\n\nmodule.exports = removeUnused;\n","var Hack = require('./hack');\n\nvar Marker = require('../tokenizer/marker');\n\nvar ASTERISK_HACK = '*';\nvar BACKSLASH_HACK = '\\\\';\nvar IMPORTANT_TOKEN = '!important';\nvar UNDERSCORE_HACK = '_';\nvar BANG_HACK = '!ie';\n\nfunction restoreFromOptimizing(properties, restoreCallback) {\n var property;\n var restored;\n var current;\n var i;\n\n for (i = properties.length - 1; i >= 0; i--) {\n property = properties[i];\n\n if (property.dynamic && property.important) {\n restoreImportant(property);\n continue;\n }\n\n if (property.dynamic) {\n continue;\n }\n\n if (property.unused) {\n continue;\n }\n\n if (!property.dirty && !property.important && !property.hack) {\n continue;\n }\n\n if (property.optimizable && restoreCallback) {\n restored = restoreCallback(property);\n property.value = restored;\n } else {\n restored = property.value;\n }\n\n if (property.important) {\n restoreImportant(property);\n }\n\n if (property.hack) {\n restoreHack(property);\n }\n\n if ('all' in property) {\n current = property.all[property.position];\n current[1][1] = property.name;\n\n current.splice(2, current.length - 1);\n Array.prototype.push.apply(current, restored);\n }\n }\n}\n\nfunction restoreImportant(property) {\n property.value[property.value.length - 1][1] += IMPORTANT_TOKEN;\n}\n\nfunction restoreHack(property) {\n if (property.hack[0] == Hack.UNDERSCORE) {\n property.name = UNDERSCORE_HACK + property.name;\n } else if (property.hack[0] == Hack.ASTERISK) {\n property.name = ASTERISK_HACK + property.name;\n } else if (property.hack[0] == Hack.BACKSLASH) {\n property.value[property.value.length - 1][1] += BACKSLASH_HACK + property.hack[1];\n } else if (property.hack[0] == Hack.BANG) {\n property.value[property.value.length - 1][1] += Marker.SPACE + BANG_HACK;\n }\n}\n\nmodule.exports = restoreFromOptimizing;\n","var Token = {\n AT_RULE: 'at-rule', // e.g. `@import`, `@charset`\n AT_RULE_BLOCK: 'at-rule-block', // e.g. `@font-face{...}`\n AT_RULE_BLOCK_SCOPE: 'at-rule-block-scope', // e.g. `@font-face`\n COMMENT: 'comment', // e.g. `/* comment */`\n NESTED_BLOCK: 'nested-block', // e.g. `@media screen{...}`, `@keyframes animation {...}`\n NESTED_BLOCK_SCOPE: 'nested-block-scope', // e.g. `@media`, `@keyframes`\n PROPERTY: 'property', // e.g. `color:red`\n PROPERTY_BLOCK: 'property-block', // e.g. `--var:{color:red}`\n PROPERTY_NAME: 'property-name', // e.g. `color`\n PROPERTY_VALUE: 'property-value', // e.g. `red`\n RAW: 'raw', // e.g. anything between /* clean-css ignore:start */ and /* clean-css ignore:end */ comments\n RULE: 'rule', // e.g `div > a{...}`\n RULE_SCOPE: 'rule-scope' // e.g `div > a`\n};\n\nmodule.exports = Token;\n","var Hack = require('./hack');\n\nvar Marker = require('../tokenizer/marker');\nvar Token = require('../tokenizer/token');\n\nvar Match = {\n ASTERISK: '*',\n BACKSLASH: '\\\\',\n BANG: '!',\n BANG_SUFFIX_PATTERN: /!\\w+$/,\n IMPORTANT_TOKEN: '!important',\n IMPORTANT_TOKEN_PATTERN: new RegExp('!important$', 'i'),\n IMPORTANT_WORD: 'important',\n IMPORTANT_WORD_PATTERN: new RegExp('important$', 'i'),\n SUFFIX_BANG_PATTERN: /!$/,\n UNDERSCORE: '_',\n VARIABLE_REFERENCE_PATTERN: /var\\(--.+\\)$/\n};\n\nfunction wrapAll(properties, skipProperties) {\n var wrapped = [];\n var single;\n var property;\n var i;\n\n for (i = properties.length - 1; i >= 0; i--) {\n property = properties[i];\n\n if (property[0] != Token.PROPERTY) {\n continue;\n }\n\n if (skipProperties && skipProperties.indexOf(property[1][1]) > -1) {\n continue;\n }\n\n single = wrapSingle(property);\n single.all = properties;\n single.position = i;\n wrapped.unshift(single);\n }\n\n return wrapped;\n}\n\nfunction someVariableReferences(property) {\n var i, l;\n var value;\n\n // skipping `property` and property name tokens\n for (i = 2, l = property.length; i < l; i++) {\n value = property[i];\n\n if (value[0] != Token.PROPERTY_VALUE) {\n continue;\n }\n\n if (isVariableReference(value[1])) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction isVariableReference(value) {\n return Match.VARIABLE_REFERENCE_PATTERN.test(value);\n}\n\nfunction isMultiplex(property) {\n var value;\n var i, l;\n\n for (i = 3, l = property.length; i < l; i++) {\n value = property[i];\n\n if (value[0] == Token.PROPERTY_VALUE && (value[1] == Marker.COMMA || value[1] == Marker.FORWARD_SLASH)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction hackFrom(property) {\n var match = false;\n var name = property[1][1];\n var lastValue = property[property.length - 1];\n\n if (name[0] == Match.UNDERSCORE) {\n match = [Hack.UNDERSCORE];\n } else if (name[0] == Match.ASTERISK) {\n match = [Hack.ASTERISK];\n } else if (lastValue[1][0] == Match.BANG && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN)) {\n match = [Hack.BANG];\n } else if (lastValue[1].indexOf(Match.BANG) > 0 && !lastValue[1].match(Match.IMPORTANT_WORD_PATTERN) && Match.BANG_SUFFIX_PATTERN.test(lastValue[1])) {\n match = [Hack.BANG];\n } else if (lastValue[1].indexOf(Match.BACKSLASH) > 0 && lastValue[1].indexOf(Match.BACKSLASH) == lastValue[1].length - Match.BACKSLASH.length - 1) {\n match = [Hack.BACKSLASH, lastValue[1].substring(lastValue[1].indexOf(Match.BACKSLASH) + 1)];\n } else if (lastValue[1].indexOf(Match.BACKSLASH) === 0 && lastValue[1].length == 2) {\n match = [Hack.BACKSLASH, lastValue[1].substring(1)];\n }\n\n return match;\n}\n\nfunction isImportant(property) {\n if (property.length < 3)\n return false;\n\n var lastValue = property[property.length - 1];\n if (Match.IMPORTANT_TOKEN_PATTERN.test(lastValue[1])) {\n return true;\n } else if (Match.IMPORTANT_WORD_PATTERN.test(lastValue[1]) && Match.SUFFIX_BANG_PATTERN.test(property[property.length - 2][1])) {\n return true;\n }\n\n return false;\n}\n\nfunction stripImportant(property) {\n var lastValue = property[property.length - 1];\n var oneButLastValue = property[property.length - 2];\n\n if (Match.IMPORTANT_TOKEN_PATTERN.test(lastValue[1])) {\n lastValue[1] = lastValue[1].replace(Match.IMPORTANT_TOKEN_PATTERN, '');\n } else {\n lastValue[1] = lastValue[1].replace(Match.IMPORTANT_WORD_PATTERN, '');\n oneButLastValue[1] = oneButLastValue[1].replace(Match.SUFFIX_BANG_PATTERN, '');\n }\n\n if (lastValue[1].length === 0) {\n property.pop();\n }\n\n if (oneButLastValue[1].length === 0) {\n property.pop();\n }\n}\n\nfunction stripPrefixHack(property) {\n property[1][1] = property[1][1].substring(1);\n}\n\nfunction stripSuffixHack(property, hackFrom) {\n var lastValue = property[property.length - 1];\n lastValue[1] = lastValue[1]\n .substring(0, lastValue[1].indexOf(hackFrom[0] == Hack.BACKSLASH ? Match.BACKSLASH : Match.BANG))\n .trim();\n\n if (lastValue[1].length === 0) {\n property.pop();\n }\n}\n\nfunction wrapSingle(property) {\n var importantProperty = isImportant(property);\n if (importantProperty) {\n stripImportant(property);\n }\n\n var whichHack = hackFrom(property);\n if (whichHack[0] == Hack.ASTERISK || whichHack[0] == Hack.UNDERSCORE) {\n stripPrefixHack(property);\n } else if (whichHack[0] == Hack.BACKSLASH || whichHack[0] == Hack.BANG) {\n stripSuffixHack(property, whichHack);\n }\n\n return {\n block: property[2] && property[2][0] == Token.PROPERTY_BLOCK,\n components: [],\n dirty: false,\n dynamic: someVariableReferences(property),\n hack: whichHack,\n important: importantProperty,\n name: property[1][1],\n multiplex: property.length > 3 ? isMultiplex(property) : false,\n optimizable: true,\n position: 0,\n shorthand: false,\n unused: false,\n value: property.slice(2)\n };\n}\n\nmodule.exports = {\n all: wrapAll,\n single: wrapSingle\n};\n","function InvalidPropertyError(message) {\n this.name = 'InvalidPropertyError';\n this.message = message;\n this.stack = (new Error()).stack;\n}\n\nInvalidPropertyError.prototype = Object.create(Error.prototype);\nInvalidPropertyError.prototype.constructor = InvalidPropertyError;\n\nmodule.exports = InvalidPropertyError;\n","var InvalidPropertyError = require('../invalid-property-error');\n\nvar wrapSingle = require('../wrap-for-optimizing').single;\n\nvar Token = require('../../tokenizer/token');\nvar Marker = require('../../tokenizer/marker');\n\nvar formatPosition = require('../../utils/format-position');\n\nfunction _anyIsInherit(values) {\n var i, l;\n\n for (i = 0, l = values.length; i < l; i++) {\n if (values[i][1] == 'inherit') {\n return true;\n }\n }\n\n return false;\n}\n\nfunction _colorFilter(validator) {\n return function (value) {\n return value[1] == 'invert' || validator.isColor(value[1]) || validator.isPrefixed(value[1]);\n };\n}\n\nfunction _styleFilter(validator) {\n return function (value) {\n return value[1] != 'inherit' && validator.isStyleKeyword(value[1]) && !validator.isColorFunction(value[1]);\n };\n}\n\nfunction _wrapDefault(name, property, configuration) {\n var descriptor = configuration[name];\n if (descriptor.doubleValues && descriptor.defaultValue.length == 2) {\n return wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, name],\n [Token.PROPERTY_VALUE, descriptor.defaultValue[0]],\n [Token.PROPERTY_VALUE, descriptor.defaultValue[1]]\n ]);\n } else if (descriptor.doubleValues && descriptor.defaultValue.length == 1) {\n return wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, name],\n [Token.PROPERTY_VALUE, descriptor.defaultValue[0]]\n ]);\n } else {\n return wrapSingle([\n Token.PROPERTY,\n [Token.PROPERTY_NAME, name],\n [Token.PROPERTY_VALUE, descriptor.defaultValue]\n ]);\n }\n}\n\nfunction _widthFilter(validator) {\n return function (value) {\n return value[1] != 'inherit' &&\n (validator.isWidth(value[1]) || validator.isUnit(value[1]) || validator.isDynamicUnit(value[1])) &&\n !validator.isStyleKeyword(value[1]) &&\n !validator.isColorFunction(value[1]);\n };\n}\n\nfunction animation(property, configuration, validator) {\n var duration = _wrapDefault(property.name + '-duration', property, configuration);\n var timing = _wrapDefault(property.name + '-timing-function', property, configuration);\n var delay = _wrapDefault(property.name + '-delay', property, configuration);\n var iteration = _wrapDefault(property.name + '-iteration-count', property, configuration);\n var direction = _wrapDefault(property.name + '-direction', property, configuration);\n var fill = _wrapDefault(property.name + '-fill-mode', property, configuration);\n var play = _wrapDefault(property.name + '-play-state', property, configuration);\n var name = _wrapDefault(property.name + '-name', property, configuration);\n var components = [duration, timing, delay, iteration, direction, fill, play, name];\n var values = property.value;\n var value;\n var durationSet = false;\n var timingSet = false;\n var delaySet = false;\n var iterationSet = false;\n var directionSet = false;\n var fillSet = false;\n var playSet = false;\n var nameSet = false;\n var i;\n var l;\n\n if (property.value.length == 1 && property.value[0][1] == 'inherit') {\n duration.value = timing.value = delay.value = iteration.value = direction.value = fill.value = play.value = name.value = property.value;\n return components;\n }\n\n if (values.length > 1 && _anyIsInherit(values)) {\n throw new InvalidPropertyError('Invalid animation values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n for (i = 0, l = values.length; i < l; i++) {\n value = values[i];\n\n if (validator.isTime(value[1]) && !durationSet) {\n duration.value = [value];\n durationSet = true;\n } else if (validator.isTime(value[1]) && !delaySet) {\n delay.value = [value];\n delaySet = true;\n } else if ((validator.isGlobal(value[1]) || validator.isTimingFunction(value[1])) && !timingSet) {\n timing.value = [value];\n timingSet = true;\n } else if ((validator.isAnimationIterationCountKeyword(value[1]) || validator.isPositiveNumber(value[1])) && !iterationSet) {\n iteration.value = [value];\n iterationSet = true;\n } else if (validator.isAnimationDirectionKeyword(value[1]) && !directionSet) {\n direction.value = [value];\n directionSet = true;\n } else if (validator.isAnimationFillModeKeyword(value[1]) && !fillSet) {\n fill.value = [value];\n fillSet = true;\n } else if (validator.isAnimationPlayStateKeyword(value[1]) && !playSet) {\n play.value = [value];\n playSet = true;\n } else if ((validator.isAnimationNameKeyword(value[1]) || validator.isIdentifier(value[1])) && !nameSet) {\n name.value = [value];\n nameSet = true;\n } else {\n throw new InvalidPropertyError('Invalid animation value at ' + formatPosition(value[2][0]) + '. Ignoring.');\n }\n }\n\n return components;\n}\n\nfunction background(property, configuration, validator) {\n var image = _wrapDefault('background-image', property, configuration);\n var position = _wrapDefault('background-position', property, configuration);\n var size = _wrapDefault('background-size', property, configuration);\n var repeat = _wrapDefault('background-repeat', property, configuration);\n var attachment = _wrapDefault('background-attachment', property, configuration);\n var origin = _wrapDefault('background-origin', property, configuration);\n var clip = _wrapDefault('background-clip', property, configuration);\n var color = _wrapDefault('background-color', property, configuration);\n var components = [image, position, size, repeat, attachment, origin, clip, color];\n var values = property.value;\n\n var positionSet = false;\n var clipSet = false;\n var originSet = false;\n var repeatSet = false;\n\n var anyValueSet = false;\n\n if (property.value.length == 1 && property.value[0][1] == 'inherit') {\n // NOTE: 'inherit' is not a valid value for background-attachment\n color.value = image.value = repeat.value = position.value = size.value = origin.value = clip.value = property.value;\n return components;\n }\n\n if (property.value.length == 1 && property.value[0][1] == '0 0') {\n return components;\n }\n\n for (var i = values.length - 1; i >= 0; i--) {\n var value = values[i];\n\n if (validator.isBackgroundAttachmentKeyword(value[1])) {\n attachment.value = [value];\n anyValueSet = true;\n } else if (validator.isBackgroundClipKeyword(value[1]) || validator.isBackgroundOriginKeyword(value[1])) {\n if (clipSet) {\n origin.value = [value];\n originSet = true;\n } else {\n clip.value = [value];\n clipSet = true;\n }\n anyValueSet = true;\n } else if (validator.isBackgroundRepeatKeyword(value[1])) {\n if (repeatSet) {\n repeat.value.unshift(value);\n } else {\n repeat.value = [value];\n repeatSet = true;\n }\n anyValueSet = true;\n } else if (validator.isBackgroundPositionKeyword(value[1]) || validator.isBackgroundSizeKeyword(value[1]) || validator.isUnit(value[1]) || validator.isDynamicUnit(value[1])) {\n if (i > 0) {\n var previousValue = values[i - 1];\n\n if (previousValue[1] == Marker.FORWARD_SLASH) {\n size.value = [value];\n } else if (i > 1 && values[i - 2][1] == Marker.FORWARD_SLASH) {\n size.value = [previousValue, value];\n i -= 2;\n } else {\n if (!positionSet)\n position.value = [];\n\n position.value.unshift(value);\n positionSet = true;\n }\n } else {\n if (!positionSet)\n position.value = [];\n\n position.value.unshift(value);\n positionSet = true;\n }\n anyValueSet = true;\n } else if ((color.value[0][1] == configuration[color.name].defaultValue || color.value[0][1] == 'none') && (validator.isColor(value[1]) || validator.isPrefixed(value[1]))) {\n color.value = [value];\n anyValueSet = true;\n } else if (validator.isUrl(value[1]) || validator.isFunction(value[1])) {\n image.value = [value];\n anyValueSet = true;\n }\n }\n\n if (clipSet && !originSet)\n origin.value = clip.value.slice(0);\n\n if (!anyValueSet) {\n throw new InvalidPropertyError('Invalid background value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n return components;\n}\n\nfunction borderRadius(property, configuration) {\n var values = property.value;\n var splitAt = -1;\n\n for (var i = 0, l = values.length; i < l; i++) {\n if (values[i][1] == Marker.FORWARD_SLASH) {\n splitAt = i;\n break;\n }\n }\n\n if (splitAt === 0 || splitAt === values.length - 1) {\n throw new InvalidPropertyError('Invalid border-radius value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n var target = _wrapDefault(property.name, property, configuration);\n target.value = splitAt > -1 ?\n values.slice(0, splitAt) :\n values.slice(0);\n target.components = fourValues(target, configuration);\n\n var remainder = _wrapDefault(property.name, property, configuration);\n remainder.value = splitAt > -1 ?\n values.slice(splitAt + 1) :\n values.slice(0);\n remainder.components = fourValues(remainder, configuration);\n\n for (var j = 0; j < 4; j++) {\n target.components[j].multiplex = true;\n target.components[j].value = target.components[j].value.concat(remainder.components[j].value);\n }\n\n return target.components;\n}\n\nfunction font(property, configuration, validator) {\n var style = _wrapDefault('font-style', property, configuration);\n var variant = _wrapDefault('font-variant', property, configuration);\n var weight = _wrapDefault('font-weight', property, configuration);\n var stretch = _wrapDefault('font-stretch', property, configuration);\n var size = _wrapDefault('font-size', property, configuration);\n var height = _wrapDefault('line-height', property, configuration);\n var family = _wrapDefault('font-family', property, configuration);\n var components = [style, variant, weight, stretch, size, height, family];\n var values = property.value;\n var fuzzyMatched = 4; // style, variant, weight, and stretch\n var index = 0;\n var isStretchSet = false;\n var isStretchValid;\n var isStyleSet = false;\n var isStyleValid;\n var isVariantSet = false;\n var isVariantValid;\n var isWeightSet = false;\n var isWeightValid;\n var isSizeSet = false;\n var appendableFamilyName = false;\n\n if (!values[index]) {\n throw new InvalidPropertyError('Missing font values at ' + formatPosition(property.all[property.position][1][2][0]) + '. Ignoring.');\n }\n\n if (values.length == 1 && values[0][1] == 'inherit') {\n style.value = variant.value = weight.value = stretch.value = size.value = height.value = family.value = values;\n return components;\n }\n\n if (values.length == 1 && (validator.isFontKeyword(values[0][1]) || validator.isGlobal(values[0][1]) || validator.isPrefixed(values[0][1]))) {\n values[0][1] = Marker.INTERNAL + values[0][1];\n style.value = variant.value = weight.value = stretch.value = size.value = height.value = family.value = values;\n return components;\n }\n\n if (values.length < 2 || !_anyIsFontSize(values, validator) || !_anyIsFontFamily(values, validator)) {\n throw new InvalidPropertyError('Invalid font values at ' + formatPosition(property.all[property.position][1][2][0]) + '. Ignoring.');\n }\n\n if (values.length > 1 && _anyIsInherit(values)) {\n throw new InvalidPropertyError('Invalid font values at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n }\n\n // fuzzy match style, variant, weight, and stretch on first elements\n while (index < fuzzyMatched) {\n isStretchValid = validator.isFontStretchKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n isStyleValid = validator.isFontStyleKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n isVariantValid = validator.isFontVariantKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n isWeightValid = validator.isFontWeightKeyword(values[index][1]) || validator.isGlobal(values[index][1]);\n\n if (isStyleValid && !isStyleSet) {\n style.value = [values[index]];\n isStyleSet = true;\n } else if (isVariantValid && !isVariantSet) {\n variant.value = [values[index]];\n isVariantSet = true;\n } else if (isWeightValid && !isWeightSet) {\n weight.value = [values[index]];\n isWeightSet = true;\n } else if (isStretchValid && !isStretchSet) {\n stretch.value = [values[index]];\n isStretchSet = true;\n } else if (isStyleValid && isStyleSet || isVariantValid && isVariantSet || isWeightValid && isWeightSet || isStretchValid && isStretchSet) {\n throw new InvalidPropertyError('Invalid font style / variant / weight / stretch value at ' + formatPosition(values[0][2][0]) + '. Ignoring.');\n } else {\n break;\n }\n\n index++;\n }\n\n // now comes font-size ...\n if (validator.isFontSizeKeyword(values[index][1]) || validator.isUnit(values[index][1]) && !validator.isDynamicUnit(values[index][1])) {\n size.value = [value