: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
Container.registerAtRule(AtRule)
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
let Node = __webpack_require__(7490)
class Comment extends Node {
Comment.default = Comment
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
let { isClean, my } = __webpack_require__(1381)
let Declaration = __webpack_require__(1516)
let Comment = __webpack_require__(6589)
let Node = __webpack_require__(7490)
let parse, Rule, AtRule, Root
function cleanSource(nodes) {
if (i.nodes) i.nodes = cleanSource(i.nodes)
function markDirtyUp(node) {
if (node.proxyOf.nodes) {
for (let i of node.proxyOf.nodes) {
class Container extends Node {
for (let child of children) {
let nodes = this.normalize(child, this.last)
for (let node of nodes) this.proxyOf.nodes.push(node)
super.cleanRaws(keepBetween)
for (let node of this.nodes) node.cleanRaws(keepBetween)
if (!this.proxyOf.nodes) return undefined
let iterator = this.getIterator()
while (this.indexes[iterator] < this.proxyOf.nodes.length) {
index = this.indexes[iterator]
result = callback(this.proxyOf.nodes[index], index)
if (result === false) break
this.indexes[iterator] += 1
delete this.indexes[iterator]
return this.nodes.every(condition)
if (!this.lastEach) this.lastEach = 0
if (!this.indexes) this.indexes = {}
let iterator = this.lastEach
this.indexes[iterator] = 0
if (prop === 'proxyOf') {
} else if (!node[prop]) {
(typeof prop === 'string' && prop.startsWith('walk'))
if (typeof i === 'function') {
return (child, index) => i(child.toProxy(), index)
} else if (prop === 'every' || prop === 'some') {
return node[prop]((child, ...other) =>
cb(child.toProxy(), ...other)
} else if (prop === 'root') {
return () => node.root().toProxy()
} else if (prop === 'nodes') {
return node.nodes.map(i => i.toProxy())
} else if (prop === 'first' || prop === 'last') {
return node[prop].toProxy()
if (node[prop] === value) return true
if (prop === 'name' || prop === 'params' || prop === 'selector') {
if (typeof child === 'number') return child
if (child.proxyOf) child = child.proxyOf
return this.proxyOf.nodes.indexOf(child)
insertAfter(exist, add) {
let existIndex = this.index(exist)
let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse()
existIndex = this.index(exist)
for (let node of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node)
for (let id in this.indexes) {
if (existIndex < index) {
this.indexes[id] = index + nodes.length
insertBefore(exist, add) {
let existIndex = this.index(exist)
let type = existIndex === 0 ? 'prepend' : false
let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse()
existIndex = this.index(exist)
for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node)
for (let id in this.indexes) {
if (existIndex <= index) {
this.indexes[id] = index + nodes.length
normalize(nodes, sample) {
if (typeof nodes === 'string') {
nodes = cleanSource(parse(nodes).nodes)
} else if (typeof nodes === 'undefined') {
} else if (Array.isArray(nodes)) {
if (i.parent) i.parent.removeChild(i, 'ignore')
} else if (nodes.type === 'root' && this.type !== 'document') {
nodes = nodes.nodes.slice(0)
if (i.parent) i.parent.removeChild(i, 'ignore')
if (typeof nodes.value === 'undefined') {
throw new Error('Value field is missed in node creation')
} else if (typeof nodes.value !== 'string') {
nodes.value = String(nodes.value)
nodes = [new Declaration(nodes)]
} else if (nodes.selector) {
nodes = [new Rule(nodes)]
nodes = [new AtRule(nodes)]
nodes = [new Comment(nodes)]
throw new Error('Unknown node type in node creation')
let processed = nodes.map(i => {
if (!i[my]) Container.rebuild(i)
if (i.parent) i.parent.removeChild(i)
if (i[isClean]) markDirtyUp(i)
if (typeof i.raws.before === 'undefined') {
if (sample && typeof sample.raws.before !== 'undefined') {
i.raws.before = sample.raws.before.replace(/\S/g, '')
children = children.reverse()
for (let child of children) {
let nodes = this.normalize(child, this.first, 'prepend').reverse()
for (let node of nodes) this.proxyOf.nodes.unshift(node)
for (let id in this.indexes) {
this.indexes[id] = this.indexes[id] + nodes.length
this.proxyOf.nodes.push(child)
for (let node of this.proxyOf.nodes) node.parent = undefined
child = this.index(child)
this.proxyOf.nodes[child].parent = undefined
this.proxyOf.nodes.splice(child, 1)
for (let id in this.indexes) {
this.indexes[id] = index - 1
replaceValues(pattern, opts, callback) {
if (opts.props && !opts.props.includes(decl.prop)) return
if (opts.fast && !decl.value.includes(opts.fast)) return
decl.value = decl.value.replace(pattern, callback)
return this.nodes.some(condition)
return this.each((child, i) => {
result = callback(child, i)
throw child.addToError(e)
if (result !== false && child.walk) {
result = child.walk(callback)
walkAtRules(name, callback) {
return this.walk((child, i) => {
if (child.type === 'atrule') {
return callback(child, i)
if (name instanceof RegExp) {
return this.walk((child, i) => {
if (child.type === 'atrule' && name.test(child.name)) {
return callback(child, i)
return this.walk((child, i) => {
if (child.type === 'atrule' && child.name === name) {
return callback(child, i)
return this.walk((child, i) => {
if (child.type === 'comment') {
return callback(child, i)
walkDecls(prop, callback) {
return this.walk((child, i) => {
if (child.type === 'decl') {
return callback(child, i)
if (prop instanceof RegExp) {
return this.walk((child, i) => {
if (child.type === 'decl' && prop.test(child.prop)) {
return callback(child, i)
return this.walk((child, i) => {
if (child.type === 'decl' && child.prop === prop) {
return callback(child, i)
walkRules(selector, callback) {
return this.walk((child, i) => {
if (child.type === 'rule') {
return callback(child, i)
if (selector instanceof RegExp) {
return this.walk((child, i) => {
if (child.type === 'rule' && selector.test(child.selector)) {
return callback(child, i)
return this.walk((child, i) => {
if (child.type === 'rule' && child.selector === selector) {
return callback(child, i)
if (!this.proxyOf.nodes) return undefined
return this.proxyOf.nodes[0]
if (!this.proxyOf.nodes) return undefined
return this.proxyOf.nodes[this.proxyOf.nodes.length - 1]
Container.registerParse = dependant => {
Container.registerRule = dependant => {
Container.registerAtRule = dependant => {
Container.registerRoot = dependant => {
module.exports = Container
Container.default = Container
Container.rebuild = node => {
if (node.type === 'atrule') {
Object.setPrototypeOf(node, AtRule.prototype)
} else if (node.type === 'rule') {
Object.setPrototypeOf(node, Rule.prototype)
} else if (node.type === 'decl') {
Object.setPrototypeOf(node, Declaration.prototype)
} else if (node.type === 'comment') {
Object.setPrototypeOf(node, Comment.prototype)
} else if (node.type === 'root') {
Object.setPrototypeOf(node, Root.prototype)
node.nodes.forEach(child => {
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
let pico = __webpack_require__(2775)
let terminalHighlight = __webpack_require__(9746)
class CssSyntaxError extends Error {
constructor(message, line, column, source, file, plugin) {
this.name = 'CssSyntaxError'