/home/techb158/balavpn.abdallabala.com/node_modules/postcss/lib
NameSizeModeActions
at-rule.d.ts28170666editdlrm
at-rule.js4710666editdlrm
comment.d.ts17270666editdlrm
comment.js2030666editdlrm
container.d.ts131570666editdlrm
container.js105020666editdlrm
css-syntax-error.d.ts65030666editdlrm
css-syntax-error.js25240666editdlrm
declaration.d.ts37870666editdlrm
declaration.js4950666editdlrm
document.d.ts19410666editdlrm
document.js6540666editdlrm
fromJSON.d.ts1620666editdlrm
fromJSON.js15060666editdlrm
input.d.ts44240666editdlrm
input.js61900666editdlrm
lazy-result.d.ts50070666editdlrm
lazy-result.js135620666editdlrm
list.d.ts14530666editdlrm
list.js12270666editdlrm
map-generator.js95750666editdlrm
no-work-result.d.ts15730666editdlrm
no-work-result.js25510666editdlrm
node.d.ts138510666editdlrm
node.js87330666editdlrm
parse.d.ts1350666editdlrm
parse.js11470666editdlrm
parser.js147570666editdlrm
postcss.d.mts10530666editdlrm
postcss.d.ts112430666editdlrm
postcss.js28980666editdlrm
postcss.mjs9800666editdlrm
previous-map.d.ts18270666editdlrm
previous-map.js39230666editdlrm
processor.d.ts34060666editdlrm
processor.js18100666editdlrm
result.d.ts44170666editdlrm
result.js7450666editdlrm
root.d.ts22790666editdlrm
root.js12390666editdlrm
rule.d.ts26820666editdlrm
rule.js5690666editdlrm
stringifier.d.ts14110666editdlrm
stringifier.js82200666editdlrm
stringify.d.ts1650666editdlrm
stringify.js2130666editdlrm
symbols.js910666editdlrm
terminal-highlight.js13990666editdlrm
tokenize.js65380666editdlrm
warn-once.js2560666editdlrm
warning.d.ts29940666editdlrm
warning.js7390666editdlrm
Edit: /home/techb158/balavpn.abdallabala.com/node_modules/postcss/lib/previous-map.js (3923B)
'use strict' let { SourceMapConsumer, SourceMapGenerator } = require('source-map-js') let { existsSync, readFileSync } = require('fs') let { dirname, join } = require('path') function fromBase64(str) { if (Buffer) { return Buffer.from(str, 'base64').toString() } else { /* c8 ignore next 2 */ return window.atob(str) } } class PreviousMap { constructor(css, opts) { if (opts.map === false) return this.loadAnnotation(css) 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) { this.mapFile = opts.from } if (this.mapFile) this.root = dirname(this.mapFile) if (text) this.text = text } consumer() { if (!this.consumerCache) { this.consumerCache = new SourceMapConsumer(this.text) } return this.consumerCache } decodeInline(text) { 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() } isMap(map) { if (typeof map !== 'object') return false return ( typeof map.mappings === 'string' || typeof map._mappings === 'string' || Array.isArray(map.sections) ) } loadAnnotation(css) { let comments = css.match(/\/\*\s*# sourceMappingURL=/gm) if (!comments) return // 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)) } } loadFile(path) { this.root = dirname(path) if (existsSync(path)) { this.mapFile = path return readFileSync(path, 'utf-8').toString().trim() } } loadMap(file, prev) { if (prev === false) return false if (prev) { if (typeof prev === 'string') { return prev } else if (typeof prev === 'function') { let prevPath = prev(file) if (prevPath) { let map = this.loadFile(prevPath) if (!map) { throw new Error( 'Unable to load previous source map: ' + prevPath.toString() ) } return map } } else if (prev instanceof SourceMapConsumer) { return SourceMapGenerator.fromSourceMap(prev).toString() } else if (prev instanceof SourceMapGenerator) { return prev.toString() } else if (this.isMap(prev)) { return JSON.stringify(prev) } else { throw new Error( '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 } withContent() { return !!( this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0 ) } } module.exports = PreviousMap PreviousMap.default = PreviousMap