: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
Container.registerParse(parse)
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
let Declaration = __webpack_require__(1516)
let tokenizer = __webpack_require__(2327)
let Comment = __webpack_require__(6589)
let AtRule = __webpack_require__(1326)
let Root = __webpack_require__(9434)
let Rule = __webpack_require__(4092)
const SAFE_COMMENT_NEIGHBOR = {
function findLastWithPosition(tokens) {
for (let i = tokens.length - 1; i >= 0; i--) {
let pos = token[3] || token[2]
this.root.source = { input, start: { column: 1, line: 1, offset: 0 } }
node.name = token[1].slice(1)
this.unnamedAtrule(node, token)
this.init(node, token[2])
while (!this.tokenizer.endOfFile()) {
token = this.tokenizer.nextToken()
if (type === '(' || type === '[') {
brackets.push(type === '(' ? ')' : ']')
} else if (type === '{' && brackets.length > 0) {
} else if (type === brackets[brackets.length - 1]) {
if (brackets.length === 0) {
node.source.end = this.getPosition(token[2])
} else if (type === '{') {
} else if (type === '}') {
shift = params.length - 1
while (prev && prev[0] === 'space') {
node.source.end = this.getPosition(prev[3] || prev[2])
if (this.tokenizer.endOfFile()) {
node.raws.between = this.spacesAndCommentsFromEnd(params)
node.raws.afterName = this.spacesAndCommentsFromStart(params)
this.raw(node, 'params', params)
token = params[params.length - 1]
node.source.end = this.getPosition(token[3] || token[2])
this.spaces = node.raws.between
checkMissedSemicolon(tokens) {
let colon = this.colon(tokens)
if (colon === false) return
for (let j = colon - 1; j >= 0; j--) {
if (token[0] !== 'space') {
// If the token is a word, e.g. `!important`, `red` or any other valid property's value.
// Then we need to return the colon after that word token. [3] is the "end" colon of that word.
// And because we need it after that one we do +1 to get the next one.
token[0] === 'word' ? token[3] + 1 : token[2]
for (let [i, element] of tokens.entries()) {
if (brackets === 0 && type === ':') {
} else if (prev[0] === 'word' && prev[1] === 'progid') {
this.init(node, token[2])
node.source.end = this.getPosition(token[3] || token[2])
let text = token[1].slice(2, -2)
if (/^\s*$/.test(text)) {
let match = text.match(/^(\s*)([^]*\S)(\s*)$/)
node.raws.left = match[1]
node.raws.right = match[3]
this.tokenizer = tokenizer(this.input)
decl(tokens, customProperty) {
let node = new Declaration()
this.init(node, tokens[0][2])
let last = tokens[tokens.length - 1]
node.source.end = this.getPosition(
last[3] || last[2] || findLastWithPosition(tokens)
while (tokens[0][0] !== 'word') {
if (tokens.length === 1) this.unknownWord(tokens)
node.raws.before += tokens.shift()[1]
node.source.start = this.getPosition(tokens[0][2])
if (type === ':' || type === 'space' || type === 'comment') {
node.prop += tokens.shift()[1]
node.raws.between += token[1]
if (token[0] === 'word' && /\w/.test(token[1])) {
this.unknownWord([token])
node.raws.between += token[1]
if (node.prop[0] === '_' || node.prop[0] === '*') {
node.raws.before += node.prop[0]
node.prop = node.prop.slice(1)
if (next !== 'space' && next !== 'comment') break
firstSpaces.push(tokens.shift())
this.precheckMissedSemicolon(tokens)
for (let i = tokens.length - 1; i >= 0; i--) {
if (token[1].toLowerCase() === '!important') {
let string = this.stringFrom(tokens, i)
string = this.spacesFromEnd(tokens) + string
if (string !== ' !important') node.raws.important = string
} else if (token[1].toLowerCase() === 'important') {
let cache = tokens.slice(0)
for (let j = i; j > 0; j--) {
if (str.trim().indexOf('!') === 0 && type !== 'space') {
str = cache.pop()[1] + str
if (str.trim().indexOf('!') === 0) {
node.raws.important = str
if (token[0] !== 'space' && token[0] !== 'comment') {
let hasWord = tokens.some(i => i[0] !== 'space' && i[0] !== 'comment')
node.raws.between += firstSpaces.map(i => i[1]).join('')
this.raw(node, 'value', firstSpaces.concat(tokens), customProperty)
if (node.value.includes(':') && !customProperty) {
this.checkMissedSemicolon(tokens)
{ offset: token[2] + token[1].length }
this.init(node, token[2])
if (this.current.nodes && this.current.nodes.length) {
this.current.raws.semicolon = this.semicolon
this.current.raws.after = (this.current.raws.after || '') + this.spaces
if (this.current.parent) {
this.current.source.end = this.getPosition(token[2])
this.current.source.end.offset++
this.current = this.current.parent
this.unexpectedClose(token)
if (this.current.parent) this.unclosedBlock()
if (this.current.nodes && this.current.nodes.length) {
this.current.raws.semicolon = this.semicolon
this.current.raws.after = (this.current.raws.after || '') + this.spaces
this.root.source.end = this.getPosition(this.tokenizer.position())
if (this.current.nodes) {
let prev = this.current.nodes[this.current.nodes.length - 1]
if (prev && prev.type === 'rule' && !prev.raws.ownSemicolon) {
prev.raws.ownSemicolon = this.spaces
let pos = this.input.fromOffset(offset)
start: this.getPosition(offset)
node.raws.before = this.spaces
if (node.type !== 'comment') this.semicolon = false
let customProperty = start[1].startsWith('--')
if (type === '(' || type === '[') {
if (!bracket) bracket = token
brackets.push(type === '(' ? ')' : ']')
} else if (customProperty && colon && type === '{') {
if (!bracket) bracket = token
} else if (brackets.length === 0) {
this.decl(tokens, customProperty)
} else if (type === '{') {
} else if (type === '}') {
this.tokenizer.back(tokens.pop())
} else if (type === ':') {
} else if (type === brackets[brackets.length - 1]) {
if (brackets.length === 0) bracket = null
token = this.tokenizer.nextToken()
if (this.tokenizer.endOfFile()) end = true
if (brackets.length > 0) this.unclosedBracket(bracket)
token = tokens[tokens.length - 1][0]
if (token !== 'space' && token !== 'comment') break
this.tokenizer.back(tokens.pop())
this.decl(tokens, customProperty)
while (!this.tokenizer.endOfFile()) {
token = this.tokenizer.nextToken()
this.freeSemicolon(token)
precheckMissedSemicolon(/* tokens */) {
raw(node, prop, tokens, customProperty) {
let length = tokens.length
for (let i = 0; i < length; i += 1) {