: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if (type === 'space' && i === length - 1 && !customProperty) {
} else if (type === 'comment') {
prev = tokens[i - 1] ? tokens[i - 1][0] : 'empty'
next = tokens[i + 1] ? tokens[i + 1][0] : 'empty'
if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {
if (value.slice(-1) === ',') {
let raw = tokens.reduce((all, i) => all + i[1], '')
node.raws[prop] = { raw, value }
this.init(node, tokens[0][2])
node.raws.between = this.spacesAndCommentsFromEnd(tokens)
this.raw(node, 'selector', tokens)
spacesAndCommentsFromEnd(tokens) {
lastTokenType = tokens[tokens.length - 1][0]
if (lastTokenType !== 'space' && lastTokenType !== 'comment') break
spaces = tokens.pop()[1] + spaces
spacesAndCommentsFromStart(tokens) {
if (next !== 'space' && next !== 'comment') break
spaces += tokens.shift()[1]
lastTokenType = tokens[tokens.length - 1][0]
if (lastTokenType !== 'space') break
spaces = tokens.pop()[1] + spaces
stringFrom(tokens, from) {
for (let i = from; i < tokens.length; i++) {
tokens.splice(from, tokens.length - from)
let pos = this.current.source.start
throw this.input.error('Unclosed block', pos.line, pos.column)
unclosedBracket(bracket) {
{ offset: bracket[2] + 1 }
{ offset: tokens[0][2] },
{ offset: tokens[0][2] + tokens[0][1].length }
unnamedAtrule(node, token) {
{ offset: token[2] + token[1].length }
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
let CssSyntaxError = __webpack_require__(356)
let Declaration = __webpack_require__(1516)
let LazyResult = __webpack_require__(448)
let Container = __webpack_require__(683)
let Processor = __webpack_require__(9656)
let stringify = __webpack_require__(633)
let fromJSON = __webpack_require__(8940)
let Document = __webpack_require__(271)
let Warning = __webpack_require__(5776)
let Comment = __webpack_require__(6589)
let AtRule = __webpack_require__(1326)
let Result = __webpack_require__(9055)
let Input = __webpack_require__(5380)
let parse = __webpack_require__(4295)
let list = __webpack_require__(7374)
let Rule = __webpack_require__(4092)
let Root = __webpack_require__(9434)
let Node = __webpack_require__(7490)
function postcss(...plugins) {
if (plugins.length === 1 && Array.isArray(plugins[0])) {
return new Processor(plugins)
postcss.plugin = function plugin(name, initializer) {
let warningPrinted = false
function creator(...args) {
// eslint-disable-next-line no-console
if (console && console.warn && !warningPrinted) {
// eslint-disable-next-line no-console
': postcss.plugin was deprecated. Migration guide:\n' +
'https://evilmartians.com/chronicles/postcss-8-plugin-migration'
if (process.env.LANG && process.env.LANG.startsWith('cn')) {
// eslint-disable-next-line no-console
': 里面 postcss.plugin 被弃用. 迁移指南:\n' +
'https://www.w3ctech.com/topic/2226'
let transformer = initializer(...args)
transformer.postcssPlugin = name
transformer.postcssVersion = new Processor().version
Object.defineProperty(creator, 'postcss', {
if (!cache) cache = creator()
creator.process = function (css, processOpts, pluginOpts) {
return postcss([creator(pluginOpts)]).process(css, processOpts)
postcss.stringify = stringify
postcss.fromJSON = fromJSON
postcss.comment = defaults => new Comment(defaults)
postcss.atRule = defaults => new AtRule(defaults)
postcss.decl = defaults => new Declaration(defaults)
postcss.rule = defaults => new Rule(defaults)
postcss.root = defaults => new Root(defaults)
postcss.document = defaults => new Document(defaults)
postcss.CssSyntaxError = CssSyntaxError
postcss.Declaration = Declaration
postcss.Container = Container
postcss.Processor = Processor
postcss.Document = Document
postcss.Comment = Comment
postcss.Warning = Warning
LazyResult.registerPostcss(postcss)
postcss.default = postcss
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
let { SourceMapConsumer, SourceMapGenerator } = __webpack_require__(1866)
let { existsSync, readFileSync } = __webpack_require__(9977)
let { dirname, join } = __webpack_require__(197)
function fromBase64(str) {
return Buffer.from(str, 'base64').toString()
if (opts.map === false) return
this.inline = this.startWith(this.annotation, 'data:')
let prev = opts.map ? opts.map.prev : undefined
let text = this.loadMap(opts.from, prev)
if (!this.mapFile && opts.from) {
if (this.mapFile) this.root = dirname(this.mapFile)
if (text) this.text = text
if (!this.consumerCache) {
this.consumerCache = new SourceMapConsumer(this.text)
return this.consumerCache
let baseCharsetUri = /^data:application\/json;charset=utf-?8;base64,/
let baseUri = /^data:application\/json;base64,/
let charsetUri = /^data:application\/json;charset=utf-?8,/
let uri = /^data:application\/json,/
if (charsetUri.test(text) || uri.test(text)) {
return decodeURIComponent(text.substr(RegExp.lastMatch.length))
if (baseCharsetUri.test(text) || baseUri.test(text)) {
return fromBase64(text.substr(RegExp.lastMatch.length))
let encoding = text.match(/data:application\/json;([^,]+),/)[1]
throw new Error('Unsupported source map encoding ' + encoding)
getAnnotationURL(sourceMapString) {
return sourceMapString.replace(/^\/\*\s*# sourceMappingURL=/, '').trim()
if (typeof map !== 'object') return false
typeof map.mappings === 'string' ||
typeof map._mappings === 'string' ||
Array.isArray(map.sections)
let comments = css.match(/\/\*\s*# sourceMappingURL=/gm)
// sourceMappingURLs from comments, strings, etc.
let start = css.lastIndexOf(comments.pop())
let end = css.indexOf('*/', start)
if (start > -1 && end > -1) {
// Locate the last sourceMappingURL to avoid pickin
this.annotation = this.getAnnotationURL(css.substring(start, end))
this.root = dirname(path)
return readFileSync(path, 'utf-8').toString().trim()
if (prev === false) return false
if (typeof prev === 'string') {
} else if (typeof prev === 'function') {
let prevPath = prev(file)
let map = this.loadFile(prevPath)
'Unable to load previous source map: ' + prevPath.toString()
} else if (prev instanceof SourceMapConsumer) {
return SourceMapGenerator.fromSourceMap(prev).toString()
} else if (prev instanceof SourceMapGenerator) {
} else if (this.isMap(prev)) {
return JSON.stringify(prev)
'Unsupported previous source map format: ' + prev.toString()
} else if (this.inline) {
return this.decodeInline(this.annotation)
} else if (this.annotation) {
let map = this.annotation
if (file) map = join(dirname(file), map)
return this.loadFile(map)
startWith(string, start) {
if (!string) return false
return string.substr(0, start.length) === start
this.consumer().sourcesContent &&
this.consumer().sourcesContent.length > 0
module.exports = PreviousMap
PreviousMap.default = PreviousMap
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
let NoWorkResult = __webpack_require__(7661)
let LazyResult = __webpack_require__(448)
let Document = __webpack_require__(271)
let Root = __webpack_require__(9434)
constructor(plugins = []) {
this.plugins = this.normalize(plugins)
if (i.postcss === true) {
if (typeof i === 'object' && Array.isArray(i.plugins)) {
normalized = normalized.concat(i.plugins)
} else if (typeof i === 'object' && i.postcssPlugin) {
} else if (typeof i === 'function') {
} else if (typeof i === 'object' && (i.parse || i.stringify)) {
throw new Error(i + ' is not a PostCSS plugin')
process(css, opts = {}) {
return new NoWorkResult(this, css, opts)
return new LazyResult(this, css, opts)
this.plugins = this.plugins.concat(this.normalize([plugin]))
module.exports = Processor
Processor.default = Processor
Root.registerProcessor(Processor)
Document.registerProcessor(Processor)
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
let Warning = __webpack_require__(5776)
constructor(processor, root, opts) {
this.processor = processor
if (this.lastPlugin && this.lastPlugin.postcssPlugin) {
opts.plugin = this.lastPlugin.postcssPlugin
let warning = new Warning(text, opts)
this.messages.push(warning)
return this.messages.filter(i => i.type === 'warning')