var csstree = (() => { var rs = Object.create; var wt = Object.defineProperty; var ns = Object.getOwnPropertyDescriptor; var os = Object.getOwnPropertyNames; var is = Object.getPrototypeOf, as = Object.prototype.hasOwnProperty; var ze = (e, t) => () => ( t || e((t = { exports: {} }).exports, t), t.exports ), b = (e, t) => { for (var r in t) wt(e, r, { get: t[r], enumerable: !0 }); }, jo = (e, t, r, n) => { if ((t && typeof t == 'object') || typeof t == 'function') for (let o of os(t)) !as.call(e, o) && o !== r && wt(e, o, { get: () => t[o], enumerable: !(n = ns(t, o)) || n.enumerable, }); return e; }; var ss = (e, t, r) => ( (r = e != null ? rs(is(e)) : {}), jo( t || !e || !e.__esModule ? wt(r, 'default', { value: e, enumerable: !0 }) : r, e ) ), ls = (e) => jo(wt({}, '__esModule', { value: !0 }), e); var ti = ze((br) => { var ei = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split( '' ); br.encode = function (e) { if (0 <= e && e < ei.length) return ei[e]; throw new TypeError('Must be between 0 and 63: ' + e); }; br.decode = function (e) { var t = 65, r = 90, n = 97, o = 122, i = 48, s = 57, u = 43, c = 47, a = 26, l = 52; return ( t <= e && e <= r ? e - t : n <= e && e <= o ? e - n + a : i <= e && e <= s ? e - i + l : e == u ? 62 : e == c ? 63 : -1 ); }; }); var ai = ze((yr) => { var ri = ti(), xr = 5, ni = 1 << xr, oi = ni - 1, ii = ni; function ks(e) { return e < 0 ? (-e << 1) + 1 : (e << 1) + 0; } function ws(e) { var t = (e & 1) === 1, r = e >> 1; return t ? -r : r; } yr.encode = function (t) { var r = '', n, o = ks(t); do (n = o & oi), (o >>>= xr), o > 0 && (n |= ii), (r += ri.encode(n)); while (o > 0); return r; }; yr.decode = function (t, r, n) { var o = t.length, i = 0, s = 0, u, c; do { if (r >= o) throw new Error('Expected more digits in base 64 VLQ value.'); if (((c = ri.decode(t.charCodeAt(r++))), c === -1)) throw new Error('Invalid base64 digit: ' + t.charAt(r - 1)); (u = !!(c & ii)), (c &= oi), (i = i + (c << s)), (s += xr); } while (u); (n.value = ws(i)), (n.rest = r); }; }); var Dt = ze((K) => { function vs(e, t, r) { if (t in e) return e[t]; if (arguments.length === 3) return r; throw new Error('"' + t + '" is a required argument.'); } K.getArg = vs; var si = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/, Ss = /^data:.+\,.+$/; function ot(e) { var t = e.match(si); return t ? { scheme: t[1], auth: t[2], host: t[3], port: t[4], path: t[5] } : null; } K.urlParse = ot; function qe(e) { var t = ''; return ( e.scheme && (t += e.scheme + ':'), (t += '//'), e.auth && (t += e.auth + '@'), e.host && (t += e.host), e.port && (t += ':' + e.port), e.path && (t += e.path), t ); } K.urlGenerate = qe; var Cs = 32; function As(e) { var t = []; return function (r) { for (var n = 0; n < t.length; n++) if (t[n].input === r) { var o = t[0]; return (t[0] = t[n]), (t[n] = o), t[0].result; } var i = e(r); return t.unshift({ input: r, result: i }), t.length > Cs && t.pop(), i; }; } var kr = As(function (t) { var r = t, n = ot(t); if (n) { if (!n.path) return t; r = n.path; } for (var o = K.isAbsolute(r), i = [], s = 0, u = 0; ; ) if (((s = u), (u = r.indexOf('/', s)), u === -1)) { i.push(r.slice(s)); break; } else for (i.push(r.slice(s, u)); u < r.length && r[u] === '/'; ) u++; for (var c, a = 0, u = i.length - 1; u >= 0; u--) (c = i[u]), c === '.' ? i.splice(u, 1) : c === '..' ? a++ : a > 0 && (c === '' ? (i.splice(u + 1, a), (a = 0)) : (i.splice(u, 2), a--)); return ( (r = i.join('/')), r === '' && (r = o ? '/' : '.'), n ? ((n.path = r), qe(n)) : r ); }); K.normalize = kr; function li(e, t) { e === '' && (e = '.'), t === '' && (t = '.'); var r = ot(t), n = ot(e); if ((n && (e = n.path || '/'), r && !r.scheme)) return n && (r.scheme = n.scheme), qe(r); if (r || t.match(Ss)) return t; if (n && !n.host && !n.path) return (n.host = t), qe(n); var o = t.charAt(0) === '/' ? t : kr(e.replace(/\/+$/, '') + '/' + t); return n ? ((n.path = o), qe(n)) : o; } K.join = li; K.isAbsolute = function (e) { return e.charAt(0) === '/' || si.test(e); }; function Ts(e, t) { e === '' && (e = '.'), (e = e.replace(/\/$/, '')); for (var r = 0; t.indexOf(e + '/') !== 0; ) { var n = e.lastIndexOf('/'); if (n < 0 || ((e = e.slice(0, n)), e.match(/^([^\/]+:\/)?\/*$/))) return t; ++r; } return Array(r + 1).join('../') + t.substr(e.length + 1); } K.relative = Ts; var ci = (function () { var e = Object.create(null); return !('__proto__' in e); })(); function ui(e) { return e; } function Es(e) { return pi(e) ? '$' + e : e; } K.toSetString = ci ? ui : Es; function Ls(e) { return pi(e) ? e.slice(1) : e; } K.fromSetString = ci ? ui : Ls; function pi(e) { if (!e) return !1; var t = e.length; if ( t < 9 || e.charCodeAt(t - 1) !== 95 || e.charCodeAt(t - 2) !== 95 || e.charCodeAt(t - 3) !== 111 || e.charCodeAt(t - 4) !== 116 || e.charCodeAt(t - 5) !== 111 || e.charCodeAt(t - 6) !== 114 || e.charCodeAt(t - 7) !== 112 || e.charCodeAt(t - 8) !== 95 || e.charCodeAt(t - 9) !== 95 ) return !1; for (var r = t - 10; r >= 0; r--) if (e.charCodeAt(r) !== 36) return !1; return !0; } function Ps(e, t, r) { var n = be(e.source, t.source); return ( n !== 0 || ((n = e.originalLine - t.originalLine), n !== 0) || ((n = e.originalColumn - t.originalColumn), n !== 0 || r) || ((n = e.generatedColumn - t.generatedColumn), n !== 0) || ((n = e.generatedLine - t.generatedLine), n !== 0) ) ? n : be(e.name, t.name); } K.compareByOriginalPositions = Ps; function Is(e, t, r) { var n; return ( (n = e.originalLine - t.originalLine), ( n !== 0 || ((n = e.originalColumn - t.originalColumn), n !== 0 || r) || ((n = e.generatedColumn - t.generatedColumn), n !== 0) || ((n = e.generatedLine - t.generatedLine), n !== 0) ) ? n : be(e.name, t.name) ); } K.compareByOriginalPositionsNoSource = Is; function Ds(e, t, r) { var n = e.generatedLine - t.generatedLine; return ( n !== 0 || ((n = e.generatedColumn - t.generatedColumn), n !== 0 || r) || ((n = be(e.source, t.source)), n !== 0) || ((n = e.originalLine - t.originalLine), n !== 0) || ((n = e.originalColumn - t.originalColumn), n !== 0) ) ? n : be(e.name, t.name); } K.compareByGeneratedPositionsDeflated = Ds; function Os(e, t, r) { var n = e.generatedColumn - t.generatedColumn; return ( n !== 0 || r || ((n = be(e.source, t.source)), n !== 0) || ((n = e.originalLine - t.originalLine), n !== 0) || ((n = e.originalColumn - t.originalColumn), n !== 0) ) ? n : be(e.name, t.name); } K.compareByGeneratedPositionsDeflatedNoLine = Os; function be(e, t) { return ( e === t ? 0 : e === null ? 1 : t === null ? -1 : e > t ? 1 : -1 ); } function Ns(e, t) { var r = e.generatedLine - t.generatedLine; return ( r !== 0 || ((r = e.generatedColumn - t.generatedColumn), r !== 0) || ((r = be(e.source, t.source)), r !== 0) || ((r = e.originalLine - t.originalLine), r !== 0) || ((r = e.originalColumn - t.originalColumn), r !== 0) ) ? r : be(e.name, t.name); } K.compareByGeneratedPositionsInflated = Ns; function zs(e) { return JSON.parse(e.replace(/^\)]}'[^\n]*\n/, '')); } K.parseSourceMapInput = zs; function Ms(e, t, r) { if ( ((t = t || ''), e && (e[e.length - 1] !== '/' && t[0] !== '/' && (e += '/'), (t = e + t)), r) ) { var n = ot(r); if (!n) throw new Error('sourceMapURL could not be parsed'); if (n.path) { var o = n.path.lastIndexOf('/'); o >= 0 && (n.path = n.path.substring(0, o + 1)); } t = li(qe(n), t); } return kr(t); } K.computeSourceURL = Ms; }); var mi = ze((hi) => { var wr = Dt(), vr = Object.prototype.hasOwnProperty, Pe = typeof Map < 'u'; function xe() { (this._array = []), (this._set = Pe ? new Map() : Object.create(null)); } xe.fromArray = function (t, r) { for (var n = new xe(), o = 0, i = t.length; o < i; o++) n.add(t[o], r); return n; }; xe.prototype.size = function () { return Pe ? this._set.size : Object.getOwnPropertyNames(this._set).length; }; xe.prototype.add = function (t, r) { var n = Pe ? t : wr.toSetString(t), o = Pe ? this.has(t) : vr.call(this._set, n), i = this._array.length; (!o || r) && this._array.push(t), o || (Pe ? this._set.set(t, i) : (this._set[n] = i)); }; xe.prototype.has = function (t) { if (Pe) return this._set.has(t); var r = wr.toSetString(t); return vr.call(this._set, r); }; xe.prototype.indexOf = function (t) { if (Pe) { var r = this._set.get(t); if (r >= 0) return r; } else { var n = wr.toSetString(t); if (vr.call(this._set, n)) return this._set[n]; } throw new Error('"' + t + '" is not in the set.'); }; xe.prototype.at = function (t) { if (t >= 0 && t < this._array.length) return this._array[t]; throw new Error('No element indexed by ' + t); }; xe.prototype.toArray = function () { return this._array.slice(); }; hi.ArraySet = xe; }); var gi = ze((di) => { var fi = Dt(); function Rs(e, t) { var r = e.generatedLine, n = t.generatedLine, o = e.generatedColumn, i = t.generatedColumn; return ( n > r || (n == r && i >= o) || fi.compareByGeneratedPositionsInflated(e, t) <= 0 ); } function Ot() { (this._array = []), (this._sorted = !0), (this._last = { generatedLine: -1, generatedColumn: 0 }); } Ot.prototype.unsortedForEach = function (t, r) { this._array.forEach(t, r); }; Ot.prototype.add = function (t) { Rs(this._last, t) ? ((this._last = t), this._array.push(t)) : ((this._sorted = !1), this._array.push(t)); }; Ot.prototype.toArray = function () { return ( this._sorted || (this._array.sort(fi.compareByGeneratedPositionsInflated), (this._sorted = !0)), this._array ); }; di.MappingList = Ot; }); var xi = ze((bi) => { var it = ai(), H = Dt(), Nt = mi().ArraySet, Fs = gi().MappingList; function oe(e) { e || (e = {}), (this._file = H.getArg(e, 'file', null)), (this._sourceRoot = H.getArg(e, 'sourceRoot', null)), (this._skipValidation = H.getArg(e, 'skipValidation', !1)), (this._sources = new Nt()), (this._names = new Nt()), (this._mappings = new Fs()), (this._sourcesContents = null); } oe.prototype._version = 3; oe.fromSourceMap = function (t) { var r = t.sourceRoot, n = new oe({ file: t.file, sourceRoot: r }); return ( t.eachMapping(function (o) { var i = { generated: { line: o.generatedLine, column: o.generatedColumn }, }; o.source != null && ((i.source = o.source), r != null && (i.source = H.relative(r, i.source)), (i.original = { line: o.originalLine, column: o.originalColumn }), o.name != null && (i.name = o.name)), n.addMapping(i); }), t.sources.forEach(function (o) { var i = o; r !== null && (i = H.relative(r, o)), n._sources.has(i) || n._sources.add(i); var s = t.sourceContentFor(o); s != null && n.setSourceContent(o, s); }), n ); }; oe.prototype.addMapping = function (t) { var r = H.getArg(t, 'generated'), n = H.getArg(t, 'original', null), o = H.getArg(t, 'source', null), i = H.getArg(t, 'name', null); this._skipValidation || this._validateMapping(r, n, o, i), o != null && ((o = String(o)), this._sources.has(o) || this._sources.add(o)), i != null && ((i = String(i)), this._names.has(i) || this._names.add(i)), this._mappings.add({ generatedLine: r.line, generatedColumn: r.column, originalLine: n != null && n.line, originalColumn: n != null && n.column, source: o, name: i, }); }; oe.prototype.setSourceContent = function (t, r) { var n = t; this._sourceRoot != null && (n = H.relative(this._sourceRoot, n)), r != null ? (this._sourcesContents || (this._sourcesContents = Object.create(null)), (this._sourcesContents[H.toSetString(n)] = r)) : this._sourcesContents && (delete this._sourcesContents[H.toSetString(n)], Object.keys(this._sourcesContents).length === 0 && (this._sourcesContents = null)); }; oe.prototype.applySourceMap = function (t, r, n) { var o = r; if (r == null) { if (t.file == null) throw new Error( `SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.` ); o = t.file; } var i = this._sourceRoot; i != null && (o = H.relative(i, o)); var s = new Nt(), u = new Nt(); this._mappings.unsortedForEach(function (c) { if (c.source === o && c.originalLine != null) { var a = t.originalPositionFor({ line: c.originalLine, column: c.originalColumn, }); a.source != null && ((c.source = a.source), n != null && (c.source = H.join(n, c.source)), i != null && (c.source = H.relative(i, c.source)), (c.originalLine = a.line), (c.originalColumn = a.column), a.name != null && (c.name = a.name)); } var l = c.source; l != null && !s.has(l) && s.add(l); var p = c.name; p != null && !u.has(p) && u.add(p); }, this), (this._sources = s), (this._names = u), t.sources.forEach(function (c) { var a = t.sourceContentFor(c); a != null && (n != null && (c = H.join(n, c)), i != null && (c = H.relative(i, c)), this.setSourceContent(c, a)); }, this); }; oe.prototype._validateMapping = function (t, r, n, o) { if (r && typeof r.line != 'number' && typeof r.column != 'number') throw new Error( 'original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.' ); if ( !( t && 'line' in t && 'column' in t && t.line > 0 && t.column >= 0 && !r && !n && !o ) ) { if ( t && 'line' in t && 'column' in t && r && 'line' in r && 'column' in r && t.line > 0 && t.column >= 0 && r.line > 0 && r.column >= 0 && n ) return; throw new Error( 'Invalid mapping: ' + JSON.stringify({ generated: t, source: n, original: r, name: o }) ); } }; oe.prototype._serializeMappings = function () { for ( var t = 0, r = 1, n = 0, o = 0, i = 0, s = 0, u = '', c, a, l, p, m = this._mappings.toArray(), f = 0, P = m.length; f < P; f++ ) { if (((a = m[f]), (c = ''), a.generatedLine !== r)) for (t = 0; a.generatedLine !== r; ) (c += ';'), r++; else if (f > 0) { if (!H.compareByGeneratedPositionsInflated(a, m[f - 1])) continue; c += ','; } (c += it.encode(a.generatedColumn - t)), (t = a.generatedColumn), a.source != null && ((p = this._sources.indexOf(a.source)), (c += it.encode(p - s)), (s = p), (c += it.encode(a.originalLine - 1 - o)), (o = a.originalLine - 1), (c += it.encode(a.originalColumn - n)), (n = a.originalColumn), a.name != null && ((l = this._names.indexOf(a.name)), (c += it.encode(l - i)), (i = l))), (u += c); } return u; }; oe.prototype._generateSourcesContent = function (t, r) { return t.map(function (n) { if (!this._sourcesContents) return null; r != null && (n = H.relative(r, n)); var o = H.toSetString(n); return Object.prototype.hasOwnProperty.call(this._sourcesContents, o) ? this._sourcesContents[o] : null; }, this); }; oe.prototype.toJSON = function () { var t = { version: this._version, sources: this._sources.toArray(), names: this._names.toArray(), mappings: this._serializeMappings(), }; return ( this._file != null && (t.file = this._file), this._sourceRoot != null && (t.sourceRoot = this._sourceRoot), this._sourcesContents && (t.sourcesContent = this._generateSourcesContent( t.sources, t.sourceRoot )), t ); }; oe.prototype.toString = function () { return JSON.stringify(this.toJSON()); }; bi.SourceMapGenerator = oe; }); var tm = {}; b(tm, { Lexer: () => De, List: () => I, TokenStream: () => je, clone: () => lr, createLexer: () => Vh, createSyntax: () => er, definitionSyntax: () => qr, find: () => Qh, findAll: () => $h, findLast: () => Xh, fork: () => em, fromPlainObject: () => Jh, generate: () => Yh, ident: () => Uo, isCustomProperty: () => ct, keyword: () => lt, lexer: () => Gh, parse: () => Wh, property: () => Bt, string: () => or, toPlainObject: () => Zh, tokenNames: () => Ee, tokenTypes: () => Me, tokenize: () => qh, url: () => ar, vendorPrefix: () => Zs, version: () => Uh, walk: () => Kh, }); var Me = {}; b(Me, { AtKeyword: () => D, BadString: () => Ae, BadUrl: () => Y, CDC: () => j, CDO: () => ue, Colon: () => O, Comma: () => G, Comment: () => E, Delim: () => g, Dimension: () => y, EOF: () => Je, Function: () => x, Hash: () => v, Ident: () => h, LeftCurlyBracket: () => M, LeftParenthesis: () => T, LeftSquareBracket: () => U, Number: () => d, Percentage: () => A, RightCurlyBracket: () => W, RightParenthesis: () => w, RightSquareBracket: () => V, Semicolon: () => _, String: () => q, Url: () => F, WhiteSpace: () => k, }); var Je = 0, h = 1, x = 2, D = 3, v = 4, q = 5, Ae = 6, F = 7, Y = 8, g = 9, d = 10, A = 11, y = 12, k = 13, ue = 14, j = 15, O = 16, _ = 17, G = 18, U = 19, V = 20, T = 21, w = 22, M = 23, W = 24, E = 25; function B(e) { return e >= 48 && e <= 57; } function ee(e) { return B(e) || (e >= 65 && e <= 70) || (e >= 97 && e <= 102); } function St(e) { return e >= 65 && e <= 90; } function cs(e) { return e >= 97 && e <= 122; } function us(e) { return St(e) || cs(e); } function ps(e) { return e >= 128; } function vt(e) { return us(e) || ps(e) || e === 95; } function Re(e) { return vt(e) || B(e) || e === 45; } function hs(e) { return (e >= 0 && e <= 8) || e === 11 || (e >= 14 && e <= 31) || e === 127; } function et(e) { return e === 10 || e === 13 || e === 12; } function pe(e) { return et(e) || e === 32 || e === 9; } function $(e, t) { return !(e !== 92 || et(t) || t === 0); } function Fe(e, t, r) { return ( e === 45 ? vt(t) || t === 45 || $(t, r) : vt(e) ? !0 : e === 92 ? $(e, t) : !1 ); } function Ct(e, t, r) { return ( e === 43 || e === 45 ? B(t) ? 2 : t === 46 && B(r) ? 3 : 0 : e === 46 ? B(t) ? 2 : 0 : B(e) ? 1 : 0 ); } function At(e) { return e === 65279 || e === 65534 ? 1 : 0; } var cr = new Array(128), ms = 128, tt = 130, ur = 131, Tt = 132, pr = 133; for (let e = 0; e < cr.length; e++) cr[e] = (pe(e) && tt) || (B(e) && ur) || (vt(e) && Tt) || (hs(e) && pr) || e || ms; function Et(e) { return e < 128 ? cr[e] : Tt; } function Be(e, t) { return t < e.length ? e.charCodeAt(t) : 0; } function Lt(e, t, r) { return r === 13 && Be(e, t + 1) === 10 ? 2 : 1; } function de(e, t, r) { let n = e.charCodeAt(t); return St(n) && (n = n | 32), n === r; } function ge(e, t, r, n) { if (r - t !== n.length || t < 0 || r > e.length) return !1; for (let o = t; o < r; o++) { let i = n.charCodeAt(o - t), s = e.charCodeAt(o); if ((St(s) && (s = s | 32), s !== i)) return !1; } return !0; } function Ho(e, t) { for (; t >= 0 && pe(e.charCodeAt(t)); t--); return t + 1; } function rt(e, t) { for (; t < e.length && pe(e.charCodeAt(t)); t++); return t; } function hr(e, t) { for (; t < e.length && B(e.charCodeAt(t)); t++); return t; } function se(e, t) { if (((t += 2), ee(Be(e, t - 1)))) { for (let n = Math.min(e.length, t + 5); t < n && ee(Be(e, t)); t++); let r = Be(e, t); pe(r) && (t += Lt(e, t, r)); } return t; } function nt(e, t) { for (; t < e.length; t++) { let r = e.charCodeAt(t); if (!Re(r)) { if ($(r, Be(e, t + 1))) { t = se(e, t) - 1; continue; } break; } } return t; } function Te(e, t) { let r = e.charCodeAt(t); if ( ((r === 43 || r === 45) && (r = e.charCodeAt((t += 1))), B(r) && ((t = hr(e, t + 1)), (r = e.charCodeAt(t))), r === 46 && B(e.charCodeAt(t + 1)) && ((t += 2), (t = hr(e, t))), de(e, t, 101)) ) { let n = 0; (r = e.charCodeAt(t + 1)), (r === 45 || r === 43) && ((n = 1), (r = e.charCodeAt(t + 2))), B(r) && (t = hr(e, t + 1 + n + 1)); } return t; } function Pt(e, t) { for (; t < e.length; t++) { let r = e.charCodeAt(t); if (r === 41) { t++; break; } $(r, Be(e, t + 1)) && (t = se(e, t)); } return t; } function _e(e) { if (e.length === 1 && !ee(e.charCodeAt(0))) return e[0]; let t = parseInt(e, 16); return ( (t === 0 || (t >= 55296 && t <= 57343) || t > 1114111) && (t = 65533), String.fromCodePoint(t) ); } var Ee = [ 'EOF-token', 'ident-token', 'function-token', 'at-keyword-token', 'hash-token', 'string-token', 'bad-string-token', 'url-token', 'bad-url-token', 'delim-token', 'number-token', 'percentage-token', 'dimension-token', 'whitespace-token', 'CDO-token', 'CDC-token', 'colon-token', 'semicolon-token', 'comma-token', '[-token', ']-token', '(-token', ')-token', '{-token', '}-token', ]; function Ue(e = null, t) { return e === null || e.length < t ? new Uint32Array(Math.max(t + 1024, 16384)) : e; } var qo = 10, fs = 12, Wo = 13; function Yo(e) { let t = e.source, r = t.length, n = t.length > 0 ? At(t.charCodeAt(0)) : 0, o = Ue(e.lines, r), i = Ue(e.columns, r), s = e.startLine, u = e.startColumn; for (let c = n; c < r; c++) { let a = t.charCodeAt(c); (o[c] = s), (i[c] = u++), (a === qo || a === Wo || a === fs) && (a === Wo && c + 1 < r && t.charCodeAt(c + 1) === qo && (c++, (o[c] = s), (i[c] = u)), s++, (u = 1)); } (o[r] = s), (i[r] = u), (e.lines = o), (e.columns = i), (e.computed = !0); } var It = class { constructor() { (this.lines = null), (this.columns = null), (this.computed = !1); } setSource(t, r = 0, n = 1, o = 1) { (this.source = t), (this.startOffset = r), (this.startLine = n), (this.startColumn = o), (this.computed = !1); } getLocation(t, r) { return ( this.computed || Yo(this), { source: r, offset: this.startOffset + t, line: this.lines[t], column: this.columns[t], } ); } getLocationRange(t, r, n) { return ( this.computed || Yo(this), { source: n, start: { offset: this.startOffset + t, line: this.lines[t], column: this.columns[t], }, end: { offset: this.startOffset + r, line: this.lines[r], column: this.columns[r], }, } ); } }; var ne = 16777215, we = 24, ds = new Map([ [2, 22], [21, 22], [19, 20], [23, 24], ]), je = class { constructor(t, r) { this.setSource(t, r); } reset() { (this.eof = !1), (this.tokenIndex = -1), (this.tokenType = 0), (this.tokenStart = this.firstCharOffset), (this.tokenEnd = this.firstCharOffset); } setSource(t = '', r = () => {}) { t = String(t || ''); let n = t.length, o = Ue(this.offsetAndType, t.length + 1), i = Ue(this.balance, t.length + 1), s = 0, u = 0, c = 0, a = -1; for ( this.offsetAndType = null, this.balance = null, r(t, (l, p, m) => { switch (l) { default: i[s] = n; break; case u: { let f = c & ne; for (c = i[f], u = c >> we, i[s] = f, i[f++] = s; f < s; f++) i[f] === n && (i[f] = s); break; } case 21: case 2: case 19: case 23: (i[s] = c), (u = ds.get(l)), (c = (u << we) | s); break; } (o[s++] = (l << we) | m), a === -1 && (a = p); }), o[s] = (0 << we) | n, i[s] = n, i[n] = n; c !== 0; ) { let l = c & ne; (c = i[l]), (i[l] = n); } (this.source = t), (this.firstCharOffset = a === -1 ? 0 : a), (this.tokenCount = s), (this.offsetAndType = o), (this.balance = i), this.reset(), this.next(); } lookupType(t) { return ( (t += this.tokenIndex), t < this.tokenCount ? this.offsetAndType[t] >> we : 0 ); } lookupOffset(t) { return ( (t += this.tokenIndex), t < this.tokenCount ? this.offsetAndType[t - 1] & ne : this.source.length ); } lookupValue(t, r) { return ( (t += this.tokenIndex), t < this.tokenCount ? ge( this.source, this.offsetAndType[t - 1] & ne, this.offsetAndType[t] & ne, r ) : !1 ); } getTokenStart(t) { return ( t === this.tokenIndex ? this.tokenStart : t > 0 ? t < this.tokenCount ? this.offsetAndType[t - 1] & ne : this.offsetAndType[this.tokenCount] & ne : this.firstCharOffset ); } substrToCursor(t) { return this.source.substring(t, this.tokenStart); } isBalanceEdge(t) { return this.balance[this.tokenIndex] < t; } isDelim(t, r) { return r ? this.lookupType(r) === 9 && this.source.charCodeAt(this.lookupOffset(r)) === t : this.tokenType === 9 && this.source.charCodeAt(this.tokenStart) === t; } skip(t) { let r = this.tokenIndex + t; r < this.tokenCount ? ((this.tokenIndex = r), (this.tokenStart = this.offsetAndType[r - 1] & ne), (r = this.offsetAndType[r]), (this.tokenType = r >> we), (this.tokenEnd = r & ne)) : ((this.tokenIndex = this.tokenCount), this.next()); } next() { let t = this.tokenIndex + 1; t < this.tokenCount ? ((this.tokenIndex = t), (this.tokenStart = this.tokenEnd), (t = this.offsetAndType[t]), (this.tokenType = t >> we), (this.tokenEnd = t & ne)) : ((this.eof = !0), (this.tokenIndex = this.tokenCount), (this.tokenType = 0), (this.tokenStart = this.tokenEnd = this.source.length)); } skipSC() { for (; this.tokenType === 13 || this.tokenType === 25; ) this.next(); } skipUntilBalanced(t, r) { let n = t, o, i; e: for (; n < this.tokenCount; n++) { if (((o = this.balance[n]), o < t)) break e; switch ( ((i = n > 0 ? this.offsetAndType[n - 1] & ne : this.firstCharOffset), r(this.source.charCodeAt(i))) ) { case 1: break e; case 2: n++; break e; default: this.balance[o] === n && (n = o); } } this.skip(n - this.tokenIndex); } forEachToken(t) { for (let r = 0, n = this.firstCharOffset; r < this.tokenCount; r++) { let o = n, i = this.offsetAndType[r], s = i & ne, u = i >> we; (n = s), t(u, o, s, r); } } dump() { let t = new Array(this.tokenCount); return ( this.forEachToken((r, n, o, i) => { t[i] = { idx: i, type: Ee[r], chunk: this.source.substring(n, o), balance: this.balance[i], }; }), t ); } }; function ve(e, t) { function r(p) { return p < u ? e.charCodeAt(p) : 0; } function n() { if (((a = Te(e, a)), Fe(r(a), r(a + 1), r(a + 2)))) { (l = 12), (a = nt(e, a)); return; } if (r(a) === 37) { (l = 11), a++; return; } l = 10; } function o() { let p = a; if (((a = nt(e, a)), ge(e, p, a, 'url') && r(a) === 40)) { if (((a = rt(e, a + 1)), r(a) === 34 || r(a) === 39)) { (l = 2), (a = p + 4); return; } s(); return; } if (r(a) === 40) { (l = 2), a++; return; } l = 1; } function i(p) { for (p || (p = r(a++)), l = 5; a < e.length; a++) { let m = e.charCodeAt(a); switch (Et(m)) { case p: a++; return; case tt: if (et(m)) { (a += Lt(e, a, m)), (l = 6); return; } break; case 92: if (a === e.length - 1) break; let f = r(a + 1); et(f) ? (a += Lt(e, a + 1, f)) : $(m, f) && (a = se(e, a) - 1); break; } } } function s() { for (l = 7, a = rt(e, a); a < e.length; a++) { let p = e.charCodeAt(a); switch (Et(p)) { case 41: a++; return; case tt: if (((a = rt(e, a)), r(a) === 41 || a >= e.length)) { a < e.length && a++; return; } (a = Pt(e, a)), (l = 8); return; case 34: case 39: case 40: case pr: (a = Pt(e, a)), (l = 8); return; case 92: if ($(p, r(a + 1))) { a = se(e, a) - 1; break; } (a = Pt(e, a)), (l = 8); return; } } } e = String(e || ''); let u = e.length, c = At(r(0)), a = c, l; for (; a < u; ) { let p = e.charCodeAt(a); switch (Et(p)) { case tt: (l = 13), (a = rt(e, a + 1)); break; case 34: i(); break; case 35: Re(r(a + 1)) || $(r(a + 1), r(a + 2)) ? ((l = 4), (a = nt(e, a + 1))) : ((l = 9), a++); break; case 39: i(); break; case 40: (l = 21), a++; break; case 41: (l = 22), a++; break; case 43: Ct(p, r(a + 1), r(a + 2)) ? n() : ((l = 9), a++); break; case 44: (l = 18), a++; break; case 45: Ct(p, r(a + 1), r(a + 2)) ? n() : r(a + 1) === 45 && r(a + 2) === 62 ? ((l = 15), (a = a + 3)) : Fe(p, r(a + 1), r(a + 2)) ? o() : ((l = 9), a++); break; case 46: Ct(p, r(a + 1), r(a + 2)) ? n() : ((l = 9), a++); break; case 47: r(a + 1) === 42 ? ((l = 25), (a = e.indexOf('*/', a + 2)), (a = a === -1 ? e.length : a + 2)) : ((l = 9), a++); break; case 58: (l = 16), a++; break; case 59: (l = 17), a++; break; case 60: r(a + 1) === 33 && r(a + 2) === 45 && r(a + 3) === 45 ? ((l = 14), (a = a + 4)) : ((l = 9), a++); break; case 64: Fe(r(a + 1), r(a + 2), r(a + 3)) ? ((l = 3), (a = nt(e, a + 1))) : ((l = 9), a++); break; case 91: (l = 19), a++; break; case 92: $(p, r(a + 1)) ? o() : ((l = 9), a++); break; case 93: (l = 20), a++; break; case 123: (l = 23), a++; break; case 125: (l = 24), a++; break; case ur: n(); break; case Tt: o(); break; default: (l = 9), a++; } t(l, c, (c = a)); } } var He = null, I = class { static createItem(t) { return { prev: null, next: null, data: t }; } constructor() { (this.head = null), (this.tail = null), (this.cursor = null); } createItem(t) { return I.createItem(t); } allocateCursor(t, r) { let n; return ( He !== null ? ((n = He), (He = He.cursor), (n.prev = t), (n.next = r), (n.cursor = this.cursor)) : (n = { prev: t, next: r, cursor: this.cursor }), (this.cursor = n), n ); } releaseCursor() { let { cursor: t } = this; (this.cursor = t.cursor), (t.prev = null), (t.next = null), (t.cursor = He), (He = t); } updateCursors(t, r, n, o) { let { cursor: i } = this; for (; i !== null; ) i.prev === t && (i.prev = r), i.next === n && (i.next = o), (i = i.cursor); } *[Symbol.iterator]() { for (let t = this.head; t !== null; t = t.next) yield t.data; } get size() { let t = 0; for (let r = this.head; r !== null; r = r.next) t++; return t; } get isEmpty() { return this.head === null; } get first() { return this.head && this.head.data; } get last() { return this.tail && this.tail.data; } fromArray(t) { let r = null; this.head = null; for (let n of t) { let o = I.createItem(n); r !== null ? (r.next = o) : (this.head = o), (o.prev = r), (r = o); } return (this.tail = r), this; } toArray() { return [...this]; } toJSON() { return [...this]; } forEach(t, r = this) { let n = this.allocateCursor(null, this.head); for (; n.next !== null; ) { let o = n.next; (n.next = o.next), t.call(r, o.data, o, this); } this.releaseCursor(); } forEachRight(t, r = this) { let n = this.allocateCursor(this.tail, null); for (; n.prev !== null; ) { let o = n.prev; (n.prev = o.prev), t.call(r, o.data, o, this); } this.releaseCursor(); } reduce(t, r, n = this) { let o = this.allocateCursor(null, this.head), i = r, s; for (; o.next !== null; ) (s = o.next), (o.next = s.next), (i = t.call(n, i, s.data, s, this)); return this.releaseCursor(), i; } reduceRight(t, r, n = this) { let o = this.allocateCursor(this.tail, null), i = r, s; for (; o.prev !== null; ) (s = o.prev), (o.prev = s.prev), (i = t.call(n, i, s.data, s, this)); return this.releaseCursor(), i; } some(t, r = this) { for (let n = this.head; n !== null; n = n.next) if (t.call(r, n.data, n, this)) return !0; return !1; } map(t, r = this) { let n = new I(); for (let o = this.head; o !== null; o = o.next) n.appendData(t.call(r, o.data, o, this)); return n; } filter(t, r = this) { let n = new I(); for (let o = this.head; o !== null; o = o.next) t.call(r, o.data, o, this) && n.appendData(o.data); return n; } nextUntil(t, r, n = this) { if (t === null) return; let o = this.allocateCursor(null, t); for (; o.next !== null; ) { let i = o.next; if (((o.next = i.next), r.call(n, i.data, i, this))) break; } this.releaseCursor(); } prevUntil(t, r, n = this) { if (t === null) return; let o = this.allocateCursor(t, null); for (; o.prev !== null; ) { let i = o.prev; if (((o.prev = i.prev), r.call(n, i.data, i, this))) break; } this.releaseCursor(); } clear() { (this.head = null), (this.tail = null); } copy() { let t = new I(); for (let r of this) t.appendData(r); return t; } prepend(t) { return ( this.updateCursors(null, t, this.head, t), this.head !== null ? ((this.head.prev = t), (t.next = this.head)) : (this.tail = t), (this.head = t), this ); } prependData(t) { return this.prepend(I.createItem(t)); } append(t) { return this.insert(t); } appendData(t) { return this.insert(I.createItem(t)); } insert(t, r = null) { if (r !== null) if ((this.updateCursors(r.prev, t, r, t), r.prev === null)) { if (this.head !== r) throw new Error("before doesn't belong to list"); (this.head = t), (r.prev = t), (t.next = r), this.updateCursors(null, t); } else (r.prev.next = t), (t.prev = r.prev), (r.prev = t), (t.next = r); else this.updateCursors(this.tail, t, null, t), this.tail !== null ? ((this.tail.next = t), (t.prev = this.tail)) : (this.head = t), (this.tail = t); return this; } insertData(t, r) { return this.insert(I.createItem(t), r); } remove(t) { if ((this.updateCursors(t, t.prev, t, t.next), t.prev !== null)) t.prev.next = t.next; else { if (this.head !== t) throw new Error("item doesn't belong to list"); this.head = t.next; } if (t.next !== null) t.next.prev = t.prev; else { if (this.tail !== t) throw new Error("item doesn't belong to list"); this.tail = t.prev; } return (t.prev = null), (t.next = null), t; } push(t) { this.insert(I.createItem(t)); } pop() { return this.tail !== null ? this.remove(this.tail) : null; } unshift(t) { this.prepend(I.createItem(t)); } shift() { return this.head !== null ? this.remove(this.head) : null; } prependList(t) { return this.insertList(t, this.head); } appendList(t) { return this.insertList(t); } insertList(t, r) { return t.head === null ? this : (r != null ? (this.updateCursors(r.prev, t.tail, r, t.head), r.prev !== null ? ((r.prev.next = t.head), (t.head.prev = r.prev)) : (this.head = t.head), (r.prev = t.tail), (t.tail.next = r)) : (this.updateCursors(this.tail, t.tail, null, t.head), this.tail !== null ? ((this.tail.next = t.head), (t.head.prev = this.tail)) : (this.head = t.head), (this.tail = t.tail)), (t.head = null), (t.tail = null), this); } replace(t, r) { 'head' in r ? this.insertList(r, t) : this.insert(r, t), this.remove(t); } }; function Le(e, t) { let r = Object.create(SyntaxError.prototype), n = new Error(); return Object.assign(r, { name: e, message: t, get stack() { return (n.stack || '').replace( /^(.+\n){1,3}/, `${e}: ${t} ` ); }, }); } var mr = 100, Go = 60, Vo = ' '; function Ko({ source: e, line: t, column: r }, n) { function o(l, p) { return i .slice(l, p) .map((m, f) => String(l + f + 1).padStart(c) + ' |' + m).join(` `); } let i = e.split(/\r\n?|\n|\f/), s = Math.max(1, t - n) - 1, u = Math.min(t + n, i.length + 1), c = Math.max(4, String(u).length) + 1, a = 0; (r += (Vo.length - 1) * (i[t - 1].substr(0, r - 1).match(/\t/g) || []).length), r > mr && ((a = r - Go + 3), (r = Go - 2)); for (let l = s; l <= u; l++) l >= 0 && l < i.length && ((i[l] = i[l].replace(/\t/g, Vo)), (i[l] = (a > 0 && i[l].length > a ? '\u2026' : '') + i[l].substr(a, mr - 2) + (i[l].length > a + mr - 1 ? '\u2026' : ''))); return [o(s, t), new Array(r + c + 2).join('-') + '^', o(t, u)].filter( Boolean ).join(` `); } function fr(e, t, r, n, o) { return Object.assign(Le('SyntaxError', e), { source: t, offset: r, line: n, column: o, sourceFragment(s) { return Ko({ source: t, line: n, column: o }, isNaN(s) ? 0 : s); }, get formattedMessage() { return ( `Parse error: ${e} ` + Ko({ source: t, line: n, column: o }, 2) ); }, }); } function Qo(e) { let t = this.createList(), r = !1, n = { recognizer: e }; for (; !this.eof; ) { switch (this.tokenType) { case 25: this.next(); continue; case 13: (r = !0), this.next(); continue; } let o = e.getNode.call(this, n); if (o === void 0) break; r && (e.onWhiteSpace && e.onWhiteSpace.call(this, o, t, n), (r = !1)), t.push(o); } return r && e.onWhiteSpace && e.onWhiteSpace.call(this, null, t, n), t; } var Xo = () => {}, gs = 33, bs = 35, dr = 59, $o = 123, Zo = 0; function xs(e) { return function () { return this[e](); }; } function gr(e) { let t = Object.create(null); for (let r in e) { let n = e[r], o = n.parse || n; o && (t[r] = o); } return t; } function ys(e) { let t = { context: Object.create(null), scope: Object.assign(Object.create(null), e.scope), atrule: gr(e.atrule), pseudo: gr(e.pseudo), node: gr(e.node), }; for (let r in e.parseContext) switch (typeof e.parseContext[r]) { case 'function': t.context[r] = e.parseContext[r]; break; case 'string': t.context[r] = xs(e.parseContext[r]); break; } return { config: t, ...t, ...t.node }; } function Jo(e) { let t = '', r = '', n = !1, o = Xo, i = !1, s = new It(), u = Object.assign(new je(), ys(e || {}), { parseAtrulePrelude: !0, parseRulePrelude: !0, parseValue: !0, parseCustomProperty: !1, readSequence: Qo, consumeUntilBalanceEnd: () => 0, consumeUntilLeftCurlyBracket(a) { return a === $o ? 1 : 0; }, consumeUntilLeftCurlyBracketOrSemicolon(a) { return a === $o || a === dr ? 1 : 0; }, consumeUntilExclamationMarkOrSemicolon(a) { return a === gs || a === dr ? 1 : 0; }, consumeUntilSemicolonIncluded(a) { return a === dr ? 2 : 0; }, createList() { return new I(); }, createSingleNodeList(a) { return new I().appendData(a); }, getFirstListNode(a) { return a && a.first; }, getLastListNode(a) { return a && a.last; }, parseWithFallback(a, l) { let p = this.tokenIndex; try { return a.call(this); } catch (m) { if (i) throw m; let f = l.call(this, p); return (i = !0), o(m, f), (i = !1), f; } }, lookupNonWSType(a) { let l; do if (((l = this.lookupType(a++)), l !== 13)) return l; while (l !== Zo); return Zo; }, charCodeAt(a) { return a >= 0 && a < t.length ? t.charCodeAt(a) : 0; }, substring(a, l) { return t.substring(a, l); }, substrToCursor(a) { return this.source.substring(a, this.tokenStart); }, cmpChar(a, l) { return de(t, a, l); }, cmpStr(a, l, p) { return ge(t, a, l, p); }, consume(a) { let l = this.tokenStart; return this.eat(a), this.substrToCursor(l); }, consumeFunctionName() { let a = t.substring(this.tokenStart, this.tokenEnd - 1); return this.eat(2), a; }, consumeNumber(a) { let l = t.substring(this.tokenStart, Te(t, this.tokenStart)); return this.eat(a), l; }, eat(a) { if (this.tokenType !== a) { let l = Ee[a] .slice(0, -6) .replace(/-/g, ' ') .replace(/^./, (f) => f.toUpperCase()), p = `${/[[\](){}]/.test(l) ? `"${l}"` : l} is expected`, m = this.tokenStart; switch (a) { case 1: this.tokenType === 2 || this.tokenType === 7 ? ((m = this.tokenEnd - 1), (p = 'Identifier is expected but function found')) : (p = 'Identifier is expected'); break; case 4: this.isDelim(bs) && (this.next(), m++, (p = 'Name is expected')); break; case 11: this.tokenType === 10 && ((m = this.tokenEnd), (p = 'Percent sign is expected')); break; } this.error(p, m); } this.next(); }, eatIdent(a) { (this.tokenType !== 1 || this.lookupValue(0, a) === !1) && this.error(`Identifier "${a}" is expected`), this.next(); }, eatDelim(a) { this.isDelim(a) || this.error(`Delim "${String.fromCharCode(a)}" is expected`), this.next(); }, getLocation(a, l) { return n ? s.getLocationRange(a, l, r) : null; }, getLocationFromList(a) { if (n) { let l = this.getFirstListNode(a), p = this.getLastListNode(a); return s.getLocationRange( l !== null ? l.loc.start.offset - s.startOffset : this.tokenStart, p !== null ? p.loc.end.offset - s.startOffset : this.tokenStart, r ); } return null; }, error(a, l) { let p = typeof l < 'u' && l < t.length ? s.getLocation(l) : this.eof ? s.getLocation(Ho(t, t.length - 1)) : s.getLocation(this.tokenStart); throw new fr(a || 'Unexpected input', t, p.offset, p.line, p.column); }, }); return Object.assign( function (a, l) { (t = a), (l = l || {}), u.setSource(t, ve), s.setSource(t, l.offset, l.line, l.column), (r = l.filename || ''), (n = Boolean(l.positions)), (o = typeof l.onParseError == 'function' ? l.onParseError : Xo), (i = !1), (u.parseAtrulePrelude = 'parseAtrulePrelude' in l ? Boolean(l.parseAtrulePrelude) : !0), (u.parseRulePrelude = 'parseRulePrelude' in l ? Boolean(l.parseRulePrelude) : !0), (u.parseValue = 'parseValue' in l ? Boolean(l.parseValue) : !0), (u.parseCustomProperty = 'parseCustomProperty' in l ? Boolean(l.parseCustomProperty) : !1); let { context: p = 'default', onComment: m } = l; if (!(p in u.context)) throw new Error('Unknown context `' + p + '`'); typeof m == 'function' && u.forEachToken((P, te, X) => { if (P === 25) { let S = u.getLocation(te, X), R = ge(t, X - 2, X, '*/') ? t.slice(te + 2, X - 2) : t.slice(te + 2, X); m(R, S); } }); let f = u.context[p].call(u, l); return u.eof || u.error(), f; }, { SyntaxError: fr, config: u.config } ); } var ki = ss(xi(), 1), yi = new Set(['Atrule', 'Selector', 'Declaration']); function wi(e) { let t = new ki.SourceMapGenerator(), r = { line: 1, column: 0 }, n = { line: 0, column: 0 }, o = { line: 1, column: 0 }, i = { generated: o }, s = 1, u = 0, c = !1, a = e.node; e.node = function (m) { if (m.loc && m.loc.start && yi.has(m.type)) { let f = m.loc.start.line, P = m.loc.start.column - 1; (n.line !== f || n.column !== P) && ((n.line = f), (n.column = P), (r.line = s), (r.column = u), c && ((c = !1), (r.line !== o.line || r.column !== o.column) && t.addMapping(i)), (c = !0), t.addMapping({ source: m.loc.source, original: n, generated: r })); } a.call(this, m), c && yi.has(m.type) && ((o.line = s), (o.column = u)); }; let l = e.emit; e.emit = function (m, f, P) { for (let te = 0; te < m.length; te++) m.charCodeAt(te) === 10 ? (s++, (u = 0)) : u++; l(m, f, P); }; let p = e.result; return ( (e.result = function () { return c && t.addMapping(i), { css: p(), map: t }; }), e ); } var zt = {}; b(zt, { safe: () => Cr, spec: () => js }); var Bs = 43, _s = 45, Sr = (e, t) => { if ((e === 9 && (e = t), typeof e == 'string')) { let r = e.charCodeAt(0); return r > 127 ? 32768 : r << 8; } return e; }, vi = [ [1, 1], [1, 2], [1, 7], [1, 8], [1, '-'], [1, 10], [1, 11], [1, 12], [1, 15], [1, 21], [3, 1], [3, 2], [3, 7], [3, 8], [3, '-'], [3, 10], [3, 11], [3, 12], [3, 15], [4, 1], [4, 2], [4, 7], [4, 8], [4, '-'], [4, 10], [4, 11], [4, 12], [4, 15], [12, 1], [12, 2], [12, 7], [12, 8], [12, '-'], [12, 10], [12, 11], [12, 12], [12, 15], ['#', 1], ['#', 2], ['#', 7], ['#', 8], ['#', '-'], ['#', 10], ['#', 11], ['#', 12], ['#', 15], ['-', 1], ['-', 2], ['-', 7], ['-', 8], ['-', '-'], ['-', 10], ['-', 11], ['-', 12], ['-', 15], [10, 1], [10, 2], [10, 7], [10, 8], [10, 10], [10, 11], [10, 12], [10, '%'], [10, 15], ['@', 1], ['@', 2], ['@', 7], ['@', 8], ['@', '-'], ['@', 15], ['.', 10], ['.', 11], ['.', 12], ['+', 10], ['+', 11], ['+', 12], ['/', '*'], ], Us = vi.concat([ [1, 4], [12, 4], [4, 4], [3, 21], [3, 5], [3, 16], [11, 11], [11, 12], [11, 2], [11, '-'], [22, 1], [22, 2], [22, 11], [22, 12], [22, 4], [22, '-'], ]); function Si(e) { let t = new Set(e.map(([r, n]) => (Sr(r) << 16) | Sr(n))); return function (r, n, o) { let i = Sr(n, o), s = o.charCodeAt(0); return ( ((s === _s && n !== 1 && n !== 2 && n !== 15) || s === Bs ? t.has((r << 16) | (s << 8)) : t.has((r << 16) | i)) && this.emit(' ', 13, !0), i ); }; } var js = Si(vi), Cr = Si(Us); var Hs = 92; function qs(e, t) { if (typeof t == 'function') { let r = null; e.children.forEach((n) => { r !== null && t.call(this, r), this.node(n), (r = n); }); return; } e.children.forEach(this.node, this); } function Ws(e) { ve(e, (t, r, n) => { this.token(t, e.slice(r, n)); }); } function Ci(e) { let t = new Map(); for (let r in e.node) { let n = e.node[r]; typeof (n.generate || n) == 'function' && t.set(r, n.generate || n); } return function (r, n) { let o = '', i = 0, s = { node(c) { if (t.has(c.type)) t.get(c.type).call(u, c); else throw new Error('Unknown node type: ' + c.type); }, tokenBefore: Cr, token(c, a) { (i = this.tokenBefore(i, c, a)), this.emit(a, c, !1), c === 9 && a.charCodeAt(0) === Hs && this.emit( ` `, 13, !0 ); }, emit(c) { o += c; }, result() { return o; }, }; n && (typeof n.decorator == 'function' && (s = n.decorator(s)), n.sourceMap && (s = wi(s)), n.mode in zt && (s.tokenBefore = zt[n.mode])); let u = { node: (c) => s.node(c), children: qs, token: (c, a) => s.token(c, a), tokenize: Ws, }; return s.node(r), s.result(); }; } function Ai(e) { return { fromPlainObject(t) { return ( e(t, { enter(r) { r.children && !(r.children instanceof I) && (r.children = new I().fromArray(r.children)); }, }), t ); }, toPlainObject(t) { return ( e(t, { leave(r) { r.children && r.children instanceof I && (r.children = r.children.toArray()); }, }), t ); }, }; } var { hasOwnProperty: Ar } = Object.prototype, at = function () {}; function Ti(e) { return typeof e == 'function' ? e : at; } function Ei(e, t) { return function (r, n, o) { r.type === t && e.call(this, r, n, o); }; } function Ys(e, t) { let r = t.structure, n = []; for (let o in r) { if (Ar.call(r, o) === !1) continue; let i = r[o], s = { name: o, type: !1, nullable: !1 }; Array.isArray(i) || (i = [i]); for (let u of i) u === null ? (s.nullable = !0) : typeof u == 'string' ? (s.type = 'node') : Array.isArray(u) && (s.type = 'list'); s.type && n.push(s); } return n.length ? { context: t.walkContext, fields: n } : null; } function Gs(e) { let t = {}; for (let r in e.node) if (Ar.call(e.node, r)) { let n = e.node[r]; if (!n.structure) throw new Error( 'Missed `structure` field in `' + r + '` node type definition' ); t[r] = Ys(r, n); } return t; } function Li(e, t) { let r = e.fields.slice(), n = e.context, o = typeof n == 'string'; return ( t && r.reverse(), function (i, s, u, c) { let a; o && ((a = s[n]), (s[n] = i)); for (let l of r) { let p = i[l.name]; if (!l.nullable || p) { if (l.type === 'list') { if (t ? p.reduceRight(c, !1) : p.reduce(c, !1)) return !0; } else if (u(p)) return !0; } } o && (s[n] = a); } ); } function Pi({ StyleSheet: e, Atrule: t, Rule: r, Block: n, DeclarationList: o, }) { return { Atrule: { StyleSheet: e, Atrule: t, Rule: r, Block: n }, Rule: { StyleSheet: e, Atrule: t, Rule: r, Block: n }, Declaration: { StyleSheet: e, Atrule: t, Rule: r, Block: n, DeclarationList: o, }, }; } function Ii(e) { let t = Gs(e), r = {}, n = {}, o = Symbol('break-walk'), i = Symbol('skip-node'); for (let a in t) Ar.call(t, a) && t[a] !== null && ((r[a] = Li(t[a], !1)), (n[a] = Li(t[a], !0))); let s = Pi(r), u = Pi(n), c = function (a, l) { function p(S, R, ke) { let z = m.call(X, S, R, ke); return ( z === o ? !0 : z === i ? !1 : !!( (P.hasOwnProperty(S.type) && P[S.type](S, X, p, te)) || f.call(X, S, R, ke) === o ) ); } let m = at, f = at, P = r, te = (S, R, ke, z) => S || p(R, ke, z), X = { break: o, skip: i, root: a, stylesheet: null, atrule: null, atrulePrelude: null, rule: null, selector: null, block: null, declaration: null, function: null, }; if (typeof l == 'function') m = l; else if ( l && ((m = Ti(l.enter)), (f = Ti(l.leave)), l.reverse && (P = n), l.visit) ) { if (s.hasOwnProperty(l.visit)) P = l.reverse ? u[l.visit] : s[l.visit]; else if (!t.hasOwnProperty(l.visit)) throw new Error( 'Bad value `' + l.visit + '` for `visit` option (should be: ' + Object.keys(t).sort().join(', ') + ')' ); (m = Ei(m, l.visit)), (f = Ei(f, l.visit)); } if (m === at && f === at) throw new Error( "Neither `enter` nor `leave` walker handler is set or both aren't a function" ); p(a); }; return ( (c.break = o), (c.skip = i), (c.find = function (a, l) { let p = null; return ( c(a, function (m, f, P) { if (l.call(this, m, f, P)) return (p = m), o; }), p ); }), (c.findLast = function (a, l) { let p = null; return ( c(a, { reverse: !0, enter(m, f, P) { if (l.call(this, m, f, P)) return (p = m), o; }, }), p ); }), (c.findAll = function (a, l) { let p = []; return ( c(a, function (m, f, P) { l.call(this, m, f, P) && p.push(m); }), p ); }), c ); } function Vs(e) { return e; } function Ks(e) { let { min: t, max: r, comma: n } = e; return ( t === 0 && r === 0 ? n ? '#?' : '*' : t === 0 && r === 1 ? '?' : t === 1 && r === 0 ? n ? '#' : '+' : t === 1 && r === 1 ? '' : (n ? '#' : '') + (t === r ? '{' + t + '}' : '{' + t + ',' + (r !== 0 ? r : '') + '}') ); } function Qs(e) { switch (e.type) { case 'Range': return ( ' [' + (e.min === null ? '-\u221E' : e.min) + ',' + (e.max === null ? '\u221E' : e.max) + ']' ); default: throw new Error('Unknown node type `' + e.type + '`'); } } function Xs(e, t, r, n) { let o = e.combinator === ' ' || n ? e.combinator : ' ' + e.combinator + ' ', i = e.terms.map((s) => Tr(s, t, r, n)).join(o); return e.explicit || r ? (n || i[0] === ',' ? '[' : '[ ') + i + (n ? ']' : ' ]') : i; } function Tr(e, t, r, n) { let o; switch (e.type) { case 'Group': o = Xs(e, t, r, n) + (e.disallowEmpty ? '!' : ''); break; case 'Multiplier': return Tr(e.term, t, r, n) + t(Ks(e), e); case 'Type': o = '<' + e.name + (e.opts ? t(Qs(e.opts), e.opts) : '') + '>'; break; case 'Property': o = "<'" + e.name + "'>"; break; case 'Keyword': o = e.name; break; case 'AtKeyword': o = '@' + e.name; break; case 'Function': o = e.name + '('; break; case 'String': case 'Token': o = e.value; break; case 'Comma': o = ','; break; default: throw new Error('Unknown node type `' + e.type + '`'); } return t(o, e); } function Ie(e, t) { let r = Vs, n = !1, o = !1; return ( typeof t == 'function' ? (r = t) : t && ((n = Boolean(t.forceBraces)), (o = Boolean(t.compact)), typeof t.decorate == 'function' && (r = t.decorate)), Tr(e, r, n, o) ); } var Di = { offset: 0, line: 1, column: 1 }; function $s(e, t) { let r = e.tokens, n = e.longestMatch, o = (n < r.length && r[n].node) || null, i = o !== t ? o : null, s = 0, u = 0, c = 0, a = '', l, p; for (let m = 0; m < r.length; m++) { let f = r[m].value; m === n && ((u = f.length), (s = a.length)), i !== null && r[m].node === i && (m <= n ? c++ : (c = 0)), (a += f); } return ( n === r.length || c > 1 ? ((l = Mt(i || t, 'end') || st(Di, a)), (p = st(l))) : ((l = Mt(i, 'start') || st(Mt(t, 'start') || Di, a.slice(0, s))), (p = Mt(i, 'end') || st(l, a.substr(s, u)))), { css: a, mismatchOffset: s, mismatchLength: u, start: l, end: p } ); } function Mt(e, t) { let r = e && e.loc && e.loc[t]; return ( r ? 'line' in r ? st(r) : r : null ); } function st({ offset: e, line: t, column: r }, n) { let o = { offset: e, line: t, column: r }; if (n) { let i = n.split(/\n|\r\n?|\f/); (o.offset += n.length), (o.line += i.length - 1), (o.column = i.length === 1 ? o.column + n.length : i.pop().length + 1); } return o; } var We = function (e, t) { let r = Le('SyntaxReferenceError', e + (t ? ' `' + t + '`' : '')); return (r.reference = t), r; }, Oi = function (e, t, r, n) { let o = Le('SyntaxMatchError', e), { css: i, mismatchOffset: s, mismatchLength: u, start: c, end: a, } = $s(n, r); return ( (o.rawMessage = e), (o.syntax = t ? Ie(t) : ''), (o.css = i), (o.mismatchOffset = s), (o.mismatchLength = u), (o.message = e + ` syntax: ` + o.syntax + ` value: ` + (i || '') + ` --------` + new Array(o.mismatchOffset + 1).join('-') + '^'), Object.assign(o, c), (o.loc = { source: (r && r.loc && r.loc.source) || '', start: c, end: a, }), o ); }; var Rt = new Map(), Ye = new Map(), Ft = 45, lt = Js, Bt = el, Zs = Er; function ct(e, t) { return ( (t = t || 0), e.length - t >= 2 && e.charCodeAt(t) === Ft && e.charCodeAt(t + 1) === Ft ); } function Er(e, t) { if ( ((t = t || 0), e.length - t >= 3 && e.charCodeAt(t) === Ft && e.charCodeAt(t + 1) !== Ft) ) { let r = e.indexOf('-', t + 2); if (r !== -1) return e.substring(t, r + 1); } return ''; } function Js(e) { if (Rt.has(e)) return Rt.get(e); let t = e.toLowerCase(), r = Rt.get(t); if (r === void 0) { let n = ct(t, 0), o = n ? '' : Er(t, 0); r = Object.freeze({ basename: t.substr(o.length), name: t, prefix: o, vendor: o, custom: n, }); } return Rt.set(e, r), r; } function el(e) { if (Ye.has(e)) return Ye.get(e); let t = e, r = e[0]; r === '/' ? (r = e[1] === '/' ? '//' : '/') : r !== '_' && r !== '*' && r !== '$' && r !== '#' && r !== '+' && r !== '&' && (r = ''); let n = ct(t, r.length); if (!n && ((t = t.toLowerCase()), Ye.has(t))) { let u = Ye.get(t); return Ye.set(e, u), u; } let o = n ? '' : Er(t, r.length), i = t.substr(0, r.length + o.length), s = Object.freeze({ basename: t.substr(i.length), name: t.substr(r.length), hack: r, vendor: o, prefix: i, custom: n, }); return Ye.set(e, s), s; } var _t = ['initial', 'inherit', 'unset', 'revert', 'revert-layer']; var pt = 43, he = 45, Lr = 110, Ge = !0, rl = !1; function Ir(e, t) { return e !== null && e.type === 9 && e.value.charCodeAt(0) === t; } function ut(e, t, r) { for (; e !== null && (e.type === 13 || e.type === 25); ) e = r(++t); return t; } function Se(e, t, r, n) { if (!e) return 0; let o = e.value.charCodeAt(t); if (o === pt || o === he) { if (r) return 0; t++; } for (; t < e.value.length; t++) if (!B(e.value.charCodeAt(t))) return 0; return n + 1; } function Pr(e, t, r) { let n = !1, o = ut(e, t, r); if (((e = r(o)), e === null)) return t; if (e.type !== 10) if (Ir(e, pt) || Ir(e, he)) { if ( ((n = !0), (o = ut(r(++o), o, r)), (e = r(o)), e === null || e.type !== 10) ) return 0; } else return t; if (!n) { let i = e.value.charCodeAt(0); if (i !== pt && i !== he) return 0; } return Se(e, n ? 0 : 1, n, o); } function Dr(e, t) { let r = 0; if (!e) return 0; if (e.type === 10) return Se(e, 0, rl, r); if (e.type === 1 && e.value.charCodeAt(0) === he) { if (!de(e.value, 1, Lr)) return 0; switch (e.value.length) { case 2: return Pr(t(++r), r, t); case 3: return e.value.charCodeAt(2) !== he ? 0 : ((r = ut(t(++r), r, t)), (e = t(r)), Se(e, 0, Ge, r)); default: return e.value.charCodeAt(2) !== he ? 0 : Se(e, 3, Ge, r); } } else if (e.type === 1 || (Ir(e, pt) && t(r + 1).type === 1)) { if ((e.type !== 1 && (e = t(++r)), e === null || !de(e.value, 0, Lr))) return 0; switch (e.value.length) { case 1: return Pr(t(++r), r, t); case 2: return e.value.charCodeAt(1) !== he ? 0 : ((r = ut(t(++r), r, t)), (e = t(r)), Se(e, 0, Ge, r)); default: return e.value.charCodeAt(1) !== he ? 0 : Se(e, 2, Ge, r); } } else if (e.type === 12) { let n = e.value.charCodeAt(0), o = n === pt || n === he ? 1 : 0, i = o; for (; i < e.value.length && B(e.value.charCodeAt(i)); i++); return ( i === o || !de(e.value, i, Lr) ? 0 : i + 1 === e.value.length ? Pr(t(++r), r, t) : e.value.charCodeAt(i + 1) !== he ? 0 : i + 2 === e.value.length ? ((r = ut(t(++r), r, t)), (e = t(r)), Se(e, 0, Ge, r)) : Se(e, i + 2, Ge, r) ); } return 0; } var nl = 43, Ni = 45, zi = 63, ol = 117; function Or(e, t) { return e !== null && e.type === 9 && e.value.charCodeAt(0) === t; } function il(e, t) { return e.value.charCodeAt(0) === t; } function ht(e, t, r) { let n = 0; for (let o = t; o < e.value.length; o++) { let i = e.value.charCodeAt(o); if (i === Ni && r && n !== 0) return ht(e, t + n + 1, !1), 6; if (!ee(i) || ++n > 6) return 0; } return n; } function Ut(e, t, r) { if (!e) return 0; for (; Or(r(t), zi); ) { if (++e > 6) return 0; t++; } return t; } function Nr(e, t) { let r = 0; if ( e === null || e.type !== 1 || !de(e.value, 0, ol) || ((e = t(++r)), e === null) ) return 0; if (Or(e, nl)) return ( (e = t(++r)), e === null ? 0 : e.type === 1 ? Ut(ht(e, 0, !0), ++r, t) : Or(e, zi) ? Ut(1, ++r, t) : 0 ); if (e.type === 10) { let n = ht(e, 1, !0); return n === 0 ? 0 : ( ((e = t(++r)), e === null ? r : e.type === 12 || e.type === 10 ? !il(e, Ni) || !ht(e, 1, !1) ? 0 : r + 1 : Ut(n, r, t)) ); } return e.type === 12 ? Ut(ht(e, 1, !0), ++r, t) : 0; } var al = ['calc(', '-moz-calc(', '-webkit-calc('], zr = new Map([ [2, 22], [21, 22], [19, 20], [23, 24], ]), sl = [ 'cm', 'mm', 'q', 'in', 'pt', 'pc', 'px', 'em', 'rem', 'ex', 'rex', 'cap', 'rcap', 'ch', 'rch', 'ic', 'ric', 'lh', 'rlh', 'vw', 'svw', 'lvw', 'dvw', 'vh', 'svh', 'lvh', 'dvh', 'vi', 'svi', 'lvi', 'dvi', 'vb', 'svb', 'lvb', 'dvb', 'vmin', 'svmin', 'lvmin', 'dvmin', 'vmax', 'svmax', 'lvmax', 'dvmax', 'cqw', 'cqh', 'cqi', 'cqb', 'cqmin', 'cqmax', ], ll = ['deg', 'grad', 'rad', 'turn'], cl = ['s', 'ms'], ul = ['hz', 'khz'], pl = ['dpi', 'dpcm', 'dppx', 'x'], hl = ['fr'], ml = ['db'], fl = ['st']; function le(e, t) { return t < e.length ? e.charCodeAt(t) : 0; } function Ri(e, t) { return ge(e, 0, e.length, t); } function Fi(e, t) { for (let r = 0; r < t.length; r++) if (Ri(e, t[r])) return !0; return !1; } function Bi(e, t) { return t !== e.length - 2 ? !1 : le(e, t) === 92 && B(le(e, t + 1)); } function jt(e, t, r) { if (e && e.type === 'Range') { let n = Number(r !== void 0 && r !== t.length ? t.substr(0, r) : t); if ( isNaN(n) || (e.min !== null && n < e.min && typeof e.min != 'string') || (e.max !== null && n > e.max && typeof e.max != 'string') ) return !0; } return !1; } function dl(e, t) { let r = 0, n = [], o = 0; e: do { switch (e.type) { case 24: case 22: case 20: if (e.type !== r) break e; if (((r = n.pop()), n.length === 0)) { o++; break e; } break; case 2: case 21: case 19: case 23: n.push(r), (r = zr.get(e.type)); break; } o++; } while ((e = t(o))); return o; } function ie(e) { return function (t, r, n) { return ( t === null ? 0 : t.type === 2 && Fi(t.value, al) ? dl(t, r) : e(t, r, n) ); }; } function N(e) { return function (t) { return t === null || t.type !== e ? 0 : 1; }; } function gl(e) { if (e === null || e.type !== 1) return 0; let t = e.value.toLowerCase(); return Fi(t, _t) || Ri(t, 'default') ? 0 : 1; } function bl(e) { return ( e === null || e.type !== 1 || le(e.value, 0) !== 45 || le(e.value, 1) !== 45 ) ? 0 : 1; } function xl(e) { if (e === null || e.type !== 4) return 0; let t = e.value.length; if (t !== 4 && t !== 5 && t !== 7 && t !== 9) return 0; for (let r = 1; r < t; r++) if (!ee(le(e.value, r))) return 0; return 1; } function yl(e) { return ( e === null || e.type !== 4 || !Fe(le(e.value, 1), le(e.value, 2), le(e.value, 3)) ) ? 0 : 1; } function kl(e, t) { if (!e) return 0; let r = 0, n = [], o = 0; e: do { switch (e.type) { case 6: case 8: break e; case 24: case 22: case 20: if (e.type !== r) break e; r = n.pop(); break; case 17: if (r === 0) break e; break; case 9: if (r === 0 && e.value === '!') break e; break; case 2: case 21: case 19: case 23: n.push(r), (r = zr.get(e.type)); break; } o++; } while ((e = t(o))); return o; } function wl(e, t) { if (!e) return 0; let r = 0, n = [], o = 0; e: do { switch (e.type) { case 6: case 8: break e; case 24: case 22: case 20: if (e.type !== r) break e; r = n.pop(); break; case 2: case 21: case 19: case 23: n.push(r), (r = zr.get(e.type)); break; } o++; } while ((e = t(o))); return o; } function ye(e) { return ( e && (e = new Set(e)), function (t, r, n) { if (t === null || t.type !== 12) return 0; let o = Te(t.value, 0); if (e !== null) { let i = t.value.indexOf('\\', o), s = i === -1 || !Bi(t.value, i) ? t.value.substr(o) : t.value.substring(o, i); if (e.has(s.toLowerCase()) === !1) return 0; } return jt(n, t.value, o) ? 0 : 1; } ); } function vl(e, t, r) { return e === null || e.type !== 11 || jt(r, e.value, e.value.length - 1) ? 0 : 1; } function Mi(e) { return ( typeof e != 'function' && (e = function () { return 0; }), function (t, r, n) { return t !== null && t.type === 10 && Number(t.value) === 0 ? 1 : e(t, r, n); } ); } function Sl(e, t, r) { if (e === null) return 0; let n = Te(e.value, 0); return (!(n === e.value.length) && !Bi(e.value, n)) || jt(r, e.value, n) ? 0 : 1; } function Cl(e, t, r) { if (e === null || e.type !== 10) return 0; let n = le(e.value, 0) === 43 || le(e.value, 0) === 45 ? 1 : 0; for (; n < e.value.length; n++) if (!B(le(e.value, n))) return 0; return jt(r, e.value, n) ? 0 : 1; } var Mr = { 'ident-token': N(1), 'function-token': N(2), 'at-keyword-token': N(3), 'hash-token': N(4), 'string-token': N(5), 'bad-string-token': N(6), 'url-token': N(7), 'bad-url-token': N(8), 'delim-token': N(9), 'number-token': N(10), 'percentage-token': N(11), 'dimension-token': N(12), 'whitespace-token': N(13), 'CDO-token': N(14), 'CDC-token': N(15), 'colon-token': N(16), 'semicolon-token': N(17), 'comma-token': N(18), '[-token': N(19), ']-token': N(20), '(-token': N(21), ')-token': N(22), '{-token': N(23), '}-token': N(24), string: N(5), ident: N(1), 'custom-ident': gl, 'custom-property-name': bl, 'hex-color': xl, 'id-selector': yl, 'an-plus-b': Dr, urange: Nr, 'declaration-value': kl, 'any-value': wl, dimension: ie(ye(null)), angle: ie(ye(ll)), decibel: ie(ye(ml)), frequency: ie(ye(ul)), flex: ie(ye(hl)), length: ie(Mi(ye(sl))), resolution: ie(ye(pl)), semitones: ie(ye(fl)), time: ie(ye(cl)), percentage: ie(vl), zero: Mi(), number: ie(Sl), integer: ie(Cl), }; var qr = {}; b(qr, { SyntaxError: () => Ht, generate: () => Ie, parse: () => Qe, walk: () => Qt, }); function Ht(e, t, r) { return Object.assign(Le('SyntaxError', e), { input: t, offset: r, rawMessage: e, message: e + ` ` + t + ` --` + new Array((r || t.length) + 1).join('-') + '^', }); } var Al = 9, Tl = 10, El = 12, Ll = 13, Pl = 32, qt = class { constructor(t) { (this.str = t), (this.pos = 0); } charCodeAt(t) { return t < this.str.length ? this.str.charCodeAt(t) : 0; } charCode() { return this.charCodeAt(this.pos); } nextCharCode() { return this.charCodeAt(this.pos + 1); } nextNonWsCode(t) { return this.charCodeAt(this.findWsEnd(t)); } findWsEnd(t) { for (; t < this.str.length; t++) { let r = this.str.charCodeAt(t); if (r !== Ll && r !== Tl && r !== El && r !== Pl && r !== Al) break; } return t; } substringToPos(t) { return this.str.substring(this.pos, (this.pos = t)); } eat(t) { this.charCode() !== t && this.error('Expect `' + String.fromCharCode(t) + '`'), this.pos++; } peek() { return this.pos < this.str.length ? this.str.charAt(this.pos++) : ''; } error(t) { throw new Ht(t, this.str, this.pos); } }; var Il = 9, Dl = 10, Ol = 12, Nl = 13, zl = 32, Gi = 33, Br = 35, _i = 38, Wt = 39, Vi = 40, Ml = 41, Ki = 42, _r = 43, Ur = 44, Ui = 45, jr = 60, Qi = 62, Fr = 63, Rl = 64, Kt = 91, Hr = 93, Yt = 123, ji = 124, Hi = 125, qi = 8734, mt = new Uint8Array(128).map((e, t) => /[a-zA-Z0-9\-]/.test(String.fromCharCode(t)) ? 1 : 0 ), Wi = { ' ': 1, '&&': 2, '||': 3, '|': 4 }; function Gt(e) { return e.substringToPos(e.findWsEnd(e.pos)); } function Ve(e) { let t = e.pos; for (; t < e.str.length; t++) { let r = e.str.charCodeAt(t); if (r >= 128 || mt[r] === 0) break; } return e.pos === t && e.error('Expect a keyword'), e.substringToPos(t); } function Vt(e) { let t = e.pos; for (; t < e.str.length; t++) { let r = e.str.charCodeAt(t); if (r < 48 || r > 57) break; } return e.pos === t && e.error('Expect a number'), e.substringToPos(t); } function Fl(e) { let t = e.str.indexOf("'", e.pos + 1); return ( t === -1 && ((e.pos = e.str.length), e.error('Expect an apostrophe')), e.substringToPos(t + 1) ); } function Yi(e) { let t = null, r = null; return ( e.eat(Yt), (t = Vt(e)), e.charCode() === Ur ? (e.pos++, e.charCode() !== Hi && (r = Vt(e))) : (r = t), e.eat(Hi), { min: Number(t), max: r ? Number(r) : 0 } ); } function Bl(e) { let t = null, r = !1; switch (e.charCode()) { case Ki: e.pos++, (t = { min: 0, max: 0 }); break; case _r: e.pos++, (t = { min: 1, max: 0 }); break; case Fr: e.pos++, (t = { min: 0, max: 1 }); break; case Br: e.pos++, (r = !0), e.charCode() === Yt ? (t = Yi(e)) : e.charCode() === Fr ? (e.pos++, (t = { min: 0, max: 0 })) : (t = { min: 1, max: 0 }); break; case Yt: t = Yi(e); break; default: return null; } return { type: 'Multiplier', comma: r, min: t.min, max: t.max, term: null }; } function Ke(e, t) { let r = Bl(e); return r !== null ? ((r.term = t), e.charCode() === Br && e.charCodeAt(e.pos - 1) === _r ? Ke(e, r) : r) : t; } function Rr(e) { let t = e.peek(); return t === '' ? null : { type: 'Token', value: t }; } function _l(e) { let t; return ( e.eat(jr), e.eat(Wt), (t = Ve(e)), e.eat(Wt), e.eat(Qi), Ke(e, { type: 'Property', name: t }) ); } function Ul(e) { let t = null, r = null, n = 1; return ( e.eat(Kt), e.charCode() === Ui && (e.peek(), (n = -1)), n == -1 && e.charCode() === qi ? e.peek() : ((t = n * Number(Vt(e))), mt[e.charCode()] !== 0 && (t += Ve(e))), Gt(e), e.eat(Ur), Gt(e), e.charCode() === qi ? e.peek() : ((n = 1), e.charCode() === Ui && (e.peek(), (n = -1)), (r = n * Number(Vt(e))), mt[e.charCode()] !== 0 && (r += Ve(e))), e.eat(Hr), { type: 'Range', min: t, max: r } ); } function jl(e) { let t, r = null; return ( e.eat(jr), (t = Ve(e)), e.charCode() === Vi && e.nextCharCode() === Ml && ((e.pos += 2), (t += '()')), e.charCodeAt(e.findWsEnd(e.pos)) === Kt && (Gt(e), (r = Ul(e))), e.eat(Qi), Ke(e, { type: 'Type', name: t, opts: r }) ); } function Hl(e) { let t = Ve(e); return e.charCode() === Vi ? (e.pos++, { type: 'Function', name: t }) : Ke(e, { type: 'Keyword', name: t }); } function ql(e, t) { function r(o, i) { return { type: 'Group', terms: o, combinator: i, disallowEmpty: !1, explicit: !1, }; } let n; for (t = Object.keys(t).sort((o, i) => Wi[o] - Wi[i]); t.length > 0; ) { n = t.shift(); let o = 0, i = 0; for (; o < e.length; o++) { let s = e[o]; s.type === 'Combinator' && (s.value === n ? (i === -1 && (i = o - 1), e.splice(o, 1), o--) : (i !== -1 && o - i > 1 && (e.splice(i, o - i, r(e.slice(i, o), n)), (o = i + 1)), (i = -1))); } i !== -1 && t.length && e.splice(i, o - i, r(e.slice(i, o), n)); } return n; } function Xi(e) { let t = [], r = {}, n, o = null, i = e.pos; for (; (n = Yl(e)); ) n.type !== 'Spaces' && (n.type === 'Combinator' ? ((o === null || o.type === 'Combinator') && ((e.pos = i), e.error('Unexpected combinator')), (r[n.value] = !0)) : o !== null && o.type !== 'Combinator' && ((r[' '] = !0), t.push({ type: 'Combinator', value: ' ' })), t.push(n), (o = n), (i = e.pos)); return ( o !== null && o.type === 'Combinator' && ((e.pos -= i), e.error('Unexpected combinator')), { type: 'Group', terms: t, combinator: ql(t, r) || ' ', disallowEmpty: !1, explicit: !1, } ); } function Wl(e) { let t; return ( e.eat(Kt), (t = Xi(e)), e.eat(Hr), (t.explicit = !0), e.charCode() === Gi && (e.pos++, (t.disallowEmpty = !0)), t ); } function Yl(e) { let t = e.charCode(); if (t < 128 && mt[t] === 1) return Hl(e); switch (t) { case Hr: break; case Kt: return Ke(e, Wl(e)); case jr: return e.nextCharCode() === Wt ? _l(e) : jl(e); case ji: return { type: 'Combinator', value: e.substringToPos(e.pos + (e.nextCharCode() === ji ? 2 : 1)), }; case _i: return e.pos++, e.eat(_i), { type: 'Combinator', value: '&&' }; case Ur: return e.pos++, { type: 'Comma' }; case Wt: return Ke(e, { type: 'String', value: Fl(e) }); case zl: case Il: case Dl: case Nl: case Ol: return { type: 'Spaces', value: Gt(e) }; case Rl: return ( (t = e.nextCharCode()), t < 128 && mt[t] === 1 ? (e.pos++, { type: 'AtKeyword', name: Ve(e) }) : Rr(e) ); case Ki: case _r: case Fr: case Br: case Gi: break; case Yt: if (((t = e.nextCharCode()), t < 48 || t > 57)) return Rr(e); break; default: return Rr(e); } } function Qe(e) { let t = new qt(e), r = Xi(t); return ( t.pos !== e.length && t.error('Unexpected input'), r.terms.length === 1 && r.terms[0].type === 'Group' ? r.terms[0] : r ); } var ft = function () {}; function $i(e) { return typeof e == 'function' ? e : ft; } function Qt(e, t, r) { function n(s) { switch ((o.call(r, s), s.type)) { case 'Group': s.terms.forEach(n); break; case 'Multiplier': n(s.term); break; case 'Type': case 'Property': case 'Keyword': case 'AtKeyword': case 'Function': case 'String': case 'Token': case 'Comma': break; default: throw new Error('Unknown type: ' + s.type); } i.call(r, s); } let o = ft, i = ft; if ( (typeof t == 'function' ? (o = t) : t && ((o = $i(t.enter)), (i = $i(t.leave))), o === ft && i === ft) ) throw new Error( "Neither `enter` nor `leave` walker handler is set or both aren't a function" ); n(e, r); } var Gl = { decorator(e) { let t = [], r = null; return { ...e, node(n) { let o = r; (r = n), e.node.call(this, n), (r = o); }, emit(n, o, i) { t.push({ type: o, value: n, node: i ? null : r }); }, result() { return t; }, }; }, }; function Vl(e) { let t = []; return ( ve(e, (r, n, o) => t.push({ type: r, value: e.slice(n, o), node: null })), t ); } function Zi(e, t) { return typeof e == 'string' ? Vl(e) : t.generate(e, Gl); } var C = { type: 'Match' }, L = { type: 'Mismatch' }, Xt = { type: 'DisallowEmpty' }, Kl = 40, Ql = 41; function Z(e, t, r) { return (t === C && r === L) || (e === C && t === C && r === C) ? e : (e.type === 'If' && e.else === L && t === C && ((t = e.then), (e = e.match)), { type: 'If', match: e, then: t, else: r }); } function ea(e) { return ( e.length > 2 && e.charCodeAt(e.length - 2) === Kl && e.charCodeAt(e.length - 1) === Ql ); } function Ji(e) { return ( e.type === 'Keyword' || e.type === 'AtKeyword' || e.type === 'Function' || (e.type === 'Type' && ea(e.name)) ); } function Wr(e, t, r) { switch (e) { case ' ': { let n = C; for (let o = t.length - 1; o >= 0; o--) { let i = t[o]; n = Z(i, n, L); } return n; } case '|': { let n = L, o = null; for (let i = t.length - 1; i >= 0; i--) { let s = t[i]; if ( Ji(s) && (o === null && i > 0 && Ji(t[i - 1]) && ((o = Object.create(null)), (n = Z({ type: 'Enum', map: o }, C, n))), o !== null) ) { let u = (ea(s.name) ? s.name.slice(0, -1) : s.name).toLowerCase(); if (!(u in o)) { o[u] = s; continue; } } (o = null), (n = Z(s, C, n)); } return n; } case '&&': { if (t.length > 5) return { type: 'MatchOnce', terms: t, all: !0 }; let n = L; for (let o = t.length - 1; o >= 0; o--) { let i = t[o], s; t.length > 1 ? (s = Wr( e, t.filter(function (u) { return u !== i; }), !1 )) : (s = C), (n = Z(i, s, n)); } return n; } case '||': { if (t.length > 5) return { type: 'MatchOnce', terms: t, all: !1 }; let n = r ? C : L; for (let o = t.length - 1; o >= 0; o--) { let i = t[o], s; t.length > 1 ? (s = Wr( e, t.filter(function (u) { return u !== i; }), !0 )) : (s = C), (n = Z(i, s, n)); } return n; } } } function Xl(e) { let t = C, r = Yr(e.term); if (e.max === 0) (r = Z(r, Xt, L)), (t = Z(r, null, L)), (t.then = Z(C, C, t)), e.comma && (t.then.else = Z({ type: 'Comma', syntax: e }, t, L)); else for (let n = e.min || 1; n <= e.max; n++) e.comma && t !== C && (t = Z({ type: 'Comma', syntax: e }, t, L)), (t = Z(r, Z(C, C, t), L)); if (e.min === 0) t = Z(C, C, t); else for (let n = 0; n < e.min - 1; n++) e.comma && t !== C && (t = Z({ type: 'Comma', syntax: e }, t, L)), (t = Z(r, t, L)); return t; } function Yr(e) { if (typeof e == 'function') return { type: 'Generic', fn: e }; switch (e.type) { case 'Group': { let t = Wr(e.combinator, e.terms.map(Yr), !1); return e.disallowEmpty && (t = Z(t, Xt, L)), t; } case 'Multiplier': return Xl(e); case 'Type': case 'Property': return { type: e.type, name: e.name, syntax: e }; case 'Keyword': return { type: e.type, name: e.name.toLowerCase(), syntax: e }; case 'AtKeyword': return { type: e.type, name: '@' + e.name.toLowerCase(), syntax: e }; case 'Function': return { type: e.type, name: e.name.toLowerCase() + '(', syntax: e }; case 'String': return e.value.length === 3 ? { type: 'Token', value: e.value.charAt(1), syntax: e } : { type: e.type, value: e.value.substr(1, e.value.length - 2).replace(/\\'/g, "'"), syntax: e, }; case 'Token': return { type: e.type, value: e.value, syntax: e }; case 'Comma': return { type: e.type, syntax: e }; default: throw new Error('Unknown node type:', e.type); } } function $t(e, t) { return ( typeof e == 'string' && (e = Qe(e)), { type: 'MatchGraph', match: Yr(e), syntax: t || null, source: e } ); } var { hasOwnProperty: ta } = Object.prototype, $l = 0, Zl = 1, Vr = 2, aa = 3, ra = 'Match', Jl = 'Mismatch', ec = 'Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)', na = 15e3, tc = 0; function rc(e) { let t = null, r = null, n = e; for (; n !== null; ) (r = n.prev), (n.prev = t), (t = n), (n = r); return t; } function Gr(e, t) { if (e.length !== t.length) return !1; for (let r = 0; r < e.length; r++) { let n = t.charCodeAt(r), o = e.charCodeAt(r); if ((o >= 65 && o <= 90 && (o = o | 32), o !== n)) return !1; } return !0; } function nc(e) { return e.type !== 9 ? !1 : e.value !== '?'; } function oa(e) { return e === null ? !0 : ( e.type === 18 || e.type === 2 || e.type === 21 || e.type === 19 || e.type === 23 || nc(e) ); } function ia(e) { return e === null ? !0 : ( e.type === 22 || e.type === 20 || e.type === 24 || (e.type === 9 && e.value === '/') ); } function oc(e, t, r) { function n() { do R++, (S = R < e.length ? e[R] : null); while (S !== null && (S.type === 13 || S.type === 25)); } function o(ae) { let fe = R + ae; return fe < e.length ? e[fe] : null; } function i(ae, fe) { return { nextState: ae, matchStack: z, syntaxStack: p, thenStack: m, tokenIndex: R, prev: fe, }; } function s(ae) { m = { nextState: ae, matchStack: z, syntaxStack: p, prev: m }; } function u(ae) { f = i(ae, f); } function c() { (z = { type: Zl, syntax: t.syntax, token: S, prev: z }), n(), (P = null), R > ke && (ke = R); } function a() { (p = { syntax: t.syntax, opts: t.syntax.opts || (p !== null && p.opts) || null, prev: p, }), (z = { type: Vr, syntax: t.syntax, token: z.token, prev: z }); } function l() { z.type === Vr ? (z = z.prev) : (z = { type: aa, syntax: p.syntax, token: z.token, prev: z }), (p = p.prev); } let p = null, m = null, f = null, P = null, te = 0, X = null, S = null, R = -1, ke = 0, z = { type: $l, syntax: null, token: null, prev: null }; for (n(); X === null && ++te < na; ) switch (t.type) { case 'Match': if (m === null) { if ( S !== null && (R !== e.length - 1 || (S.value !== '\\0' && S.value !== '\\9')) ) { t = L; break; } X = ra; break; } if (((t = m.nextState), t === Xt)) if (m.matchStack === z) { t = L; break; } else t = C; for (; m.syntaxStack !== p; ) l(); m = m.prev; break; case 'Mismatch': if (P !== null && P !== !1) (f === null || R > f.tokenIndex) && ((f = P), (P = !1)); else if (f === null) { X = Jl; break; } (t = f.nextState), (m = f.thenStack), (p = f.syntaxStack), (z = f.matchStack), (R = f.tokenIndex), (S = R < e.length ? e[R] : null), (f = f.prev); break; case 'MatchGraph': t = t.match; break; case 'If': t.else !== L && u(t.else), t.then !== C && s(t.then), (t = t.match); break; case 'MatchOnce': t = { type: 'MatchOnceBuffer', syntax: t, index: 0, mask: 0 }; break; case 'MatchOnceBuffer': { let Q = t.syntax.terms; if (t.index === Q.length) { if (t.mask === 0 || t.syntax.all) { t = L; break; } t = C; break; } if (t.mask === (1 << Q.length) - 1) { t = C; break; } for (; t.index < Q.length; t.index++) { let J = 1 << t.index; if ((t.mask & J) === 0) { u(t), s({ type: 'AddMatchOnce', syntax: t.syntax, mask: t.mask | J }), (t = Q[t.index++]); break; } } break; } case 'AddMatchOnce': t = { type: 'MatchOnceBuffer', syntax: t.syntax, index: 0, mask: t.mask, }; break; case 'Enum': if (S !== null) { let Q = S.value.toLowerCase(); if ( (Q.indexOf('\\') !== -1 && (Q = Q.replace(/\\[09].*$/, '')), ta.call(t.map, Q)) ) { t = t.map[Q]; break; } } t = L; break; case 'Generic': { let Q = p !== null ? p.opts : null, J = R + Math.floor(t.fn(S, o, Q)); if (!isNaN(J) && J > R) { for (; R < J; ) c(); t = C; } else t = L; break; } case 'Type': case 'Property': { let Q = t.type === 'Type' ? 'types' : 'properties', J = ta.call(r, Q) ? r[Q][t.name] : null; if (!J || !J.match) throw new Error( 'Bad syntax reference: ' + (t.type === 'Type' ? '<' + t.name + '>' : "<'" + t.name + "'>") ); if ( P !== !1 && S !== null && t.type === 'Type' && ((t.name === 'custom-ident' && S.type === 1) || (t.name === 'length' && S.value === '0')) ) { P === null && (P = i(t, f)), (t = L); break; } a(), (t = J.match); break; } case 'Keyword': { let Q = t.name; if (S !== null) { let J = S.value; if ( (J.indexOf('\\') !== -1 && (J = J.replace(/\\[09].*$/, '')), Gr(J, Q)) ) { c(), (t = C); break; } } t = L; break; } case 'AtKeyword': case 'Function': if (S !== null && Gr(S.value, t.name)) { c(), (t = C); break; } t = L; break; case 'Token': if (S !== null && S.value === t.value) { c(), (t = C); break; } t = L; break; case 'Comma': S !== null && S.type === 18 ? oa(z.token) ? (t = L) : (c(), (t = ia(S) ? L : C)) : (t = oa(z.token) || ia(S) ? C : L); break; case 'String': let ae = '', fe = R; for (; fe < e.length && ae.length < t.value.length; fe++) ae += e[fe].value; if (Gr(ae, t.value)) { for (; R < fe; ) c(); t = C; } else t = L; break; default: throw new Error('Unknown node type: ' + t.type); } switch (((tc += te), X)) { case null: console.warn('[csstree-match] BREAK after ' + na + ' iterations'), (X = ec), (z = null); break; case ra: for (; p !== null; ) l(); break; default: z = null; } return { tokens: e, reason: X, iterations: te, match: z, longestMatch: ke }; } function Kr(e, t, r) { let n = oc(e, t, r || {}); if (n.match === null) return n; let o = n.match, i = (n.match = { syntax: t.syntax || null, match: [] }), s = [i]; for (o = rc(o).prev; o !== null; ) { switch (o.type) { case Vr: i.match.push((i = { syntax: o.syntax, match: [] })), s.push(i); break; case aa: s.pop(), (i = s[s.length - 1]); break; default: i.match.push({ syntax: o.syntax || null, token: o.token.value, node: o.token.node, }); } o = o.prev; } return n; } var Xr = {}; b(Xr, { getTrace: () => sa, isKeyword: () => sc, isProperty: () => ac, isType: () => ic, }); function sa(e) { function t(o) { return o === null ? !1 : ( o.type === 'Type' || o.type === 'Property' || o.type === 'Keyword' ); } function r(o) { if (Array.isArray(o.match)) { for (let i = 0; i < o.match.length; i++) if (r(o.match[i])) return t(o.syntax) && n.unshift(o.syntax), !0; } else if (o.node === e) return (n = t(o.syntax) ? [o.syntax] : []), !0; return !1; } let n = null; return this.matched !== null && r(this.matched), n; } function ic(e, t) { return Qr(this, e, (r) => r.type === 'Type' && r.name === t); } function ac(e, t) { return Qr(this, e, (r) => r.type === 'Property' && r.name === t); } function sc(e) { return Qr(this, e, (t) => t.type === 'Keyword'); } function Qr(e, t, r) { let n = sa.call(e, t); return n === null ? !1 : n.some(r); } function la(e) { return 'node' in e ? e.node : la(e.match[0]); } function ca(e) { return 'node' in e ? e.node : ca(e.match[e.match.length - 1]); } function $r(e, t, r, n, o) { function i(u) { if (u.syntax !== null && u.syntax.type === n && u.syntax.name === o) { let c = la(u), a = ca(u); e.syntax.walk(t, function (l, p, m) { if (l === c) { let f = new I(); do { if ((f.appendData(p.data), p.data === a)) break; p = p.next; } while (p !== null); s.push({ parent: m, nodes: f }); } }); } Array.isArray(u.match) && u.match.forEach(i); } let s = []; return r.matched !== null && i(r.matched), s; } var { hasOwnProperty: dt } = Object.prototype; function Zr(e) { return typeof e == 'number' && isFinite(e) && Math.floor(e) === e && e >= 0; } function ua(e) { return Boolean(e) && Zr(e.offset) && Zr(e.line) && Zr(e.column); } function lc(e, t) { return function (n, o) { if (!n || n.constructor !== Object) return o(n, 'Type of node should be an Object'); for (let i in n) { let s = !0; if (dt.call(n, i) !== !1) { if (i === 'type') n.type !== e && o(n, 'Wrong node type `' + n.type + '`, expected `' + e + '`'); else if (i === 'loc') { if (n.loc === null) continue; if (n.loc && n.loc.constructor === Object) if (typeof n.loc.source != 'string') i += '.source'; else if (!ua(n.loc.start)) i += '.start'; else if (!ua(n.loc.end)) i += '.end'; else continue; s = !1; } else if (t.hasOwnProperty(i)) { s = !1; for (let u = 0; !s && u < t[i].length; u++) { let c = t[i][u]; switch (c) { case String: s = typeof n[i] == 'string'; break; case Boolean: s = typeof n[i] == 'boolean'; break; case null: s = n[i] === null; break; default: typeof c == 'string' ? (s = n[i] && n[i].type === c) : Array.isArray(c) && (s = n[i] instanceof I); } } } else o(n, 'Unknown field `' + i + '` for ' + e + ' node type'); s || o(n, 'Bad value for `' + e + '.' + i + '`'); } } for (let i in t) dt.call(t, i) && dt.call(n, i) === !1 && o(n, 'Field `' + e + '.' + i + '` is missed'); }; } function cc(e, t) { let r = t.structure, n = { type: String, loc: !0 }, o = { type: '"' + e + '"' }; for (let i in r) { if (dt.call(r, i) === !1) continue; let s = [], u = (n[i] = Array.isArray(r[i]) ? r[i].slice() : [r[i]]); for (let c = 0; c < u.length; c++) { let a = u[c]; if (a === String || a === Boolean) s.push(a.name); else if (a === null) s.push('null'); else if (typeof a == 'string') s.push('<' + a + '>'); else if (Array.isArray(a)) s.push('List'); else throw new Error( 'Wrong value `' + a + '` in `' + e + '.' + i + '` structure definition' ); } o[i] = s.join(' | '); } return { docs: o, check: lc(e, n) }; } function pa(e) { let t = {}; if (e.node) { for (let r in e.node) if (dt.call(e.node, r)) { let n = e.node[r]; if (n.structure) t[r] = cc(r, n); else throw new Error( 'Missed `structure` field in `' + r + '` node type definition' ); } } return t; } var uc = $t(_t.join(' | ')); function Jr(e, t, r) { let n = {}; for (let o in e) e[o].syntax && (n[o] = r ? e[o].syntax : Ie(e[o].syntax, { compact: t })); return n; } function pc(e, t, r) { let n = {}; for (let [o, i] of Object.entries(e)) n[o] = { prelude: i.prelude && (r ? i.prelude.syntax : Ie(i.prelude.syntax, { compact: t })), descriptors: i.descriptors && Jr(i.descriptors, t, r), }; return n; } function hc(e) { for (let t = 0; t < e.length; t++) if (e[t].value.toLowerCase() === 'var(') return !0; return !1; } function ce(e, t, r) { return { matched: e, iterations: r, error: t, ...Xr }; } function Xe(e, t, r, n) { let o = Zi(r, e.syntax), i; return hc(o) ? ce(null, new Error('Matching for a tree with var() is not supported')) : (n && (i = Kr(o, e.cssWideKeywordsSyntax, e)), (!n || !i.match) && ((i = Kr(o, t.match, e)), !i.match) ? ce(null, new Oi(i.reason, t.syntax, r, i), i.iterations) : ce(i.match, null, i.iterations)); } var De = class { constructor(t, r, n) { if ( ((this.cssWideKeywordsSyntax = uc), (this.syntax = r), (this.generic = !1), (this.atrules = Object.create(null)), (this.properties = Object.create(null)), (this.types = Object.create(null)), (this.structure = n || pa(t)), t) ) { if (t.types) for (let o in t.types) this.addType_(o, t.types[o]); if (t.generic) { this.generic = !0; for (let o in Mr) this.addType_(o, Mr[o]); } if (t.atrules) for (let o in t.atrules) this.addAtrule_(o, t.atrules[o]); if (t.properties) for (let o in t.properties) this.addProperty_(o, t.properties[o]); } } checkStructure(t) { function r(i, s) { o.push({ node: i, message: s }); } let n = this.structure, o = []; return ( this.syntax.walk(t, function (i) { n.hasOwnProperty(i.type) ? n[i.type].check(i, r) : r(i, 'Unknown node type `' + i.type + '`'); }), o.length ? o : !1 ); } createDescriptor(t, r, n, o = null) { let i = { type: r, name: n }, s = { type: r, name: n, parent: o, serializable: typeof t == 'string' || (t && typeof t.type == 'string'), syntax: null, match: null, }; return ( typeof t == 'function' ? (s.match = $t(t, i)) : (typeof t == 'string' ? Object.defineProperty(s, 'syntax', { get() { return ( Object.defineProperty(s, 'syntax', { value: Qe(t) }), s.syntax ); }, }) : (s.syntax = t), Object.defineProperty(s, 'match', { get() { return ( Object.defineProperty(s, 'match', { value: $t(s.syntax, i) }), s.match ); }, })), s ); } addAtrule_(t, r) { !r || (this.atrules[t] = { type: 'Atrule', name: t, prelude: r.prelude ? this.createDescriptor(r.prelude, 'AtrulePrelude', t) : null, descriptors: r.descriptors ? Object.keys(r.descriptors).reduce( (n, o) => ( (n[o] = this.createDescriptor( r.descriptors[o], 'AtruleDescriptor', o, t )), n ), Object.create(null) ) : null, }); } addProperty_(t, r) { !r || (this.properties[t] = this.createDescriptor(r, 'Property', t)); } addType_(t, r) { !r || (this.types[t] = this.createDescriptor(r, 'Type', t)); } checkAtruleName(t) { if (!this.getAtrule(t)) return new We('Unknown at-rule', '@' + t); } checkAtrulePrelude(t, r) { let n = this.checkAtruleName(t); if (n) return n; let o = this.getAtrule(t); if (!o.prelude && r) return new SyntaxError( 'At-rule `@' + t + '` should not contain a prelude' ); if (o.prelude && !r && !Xe(this, o.prelude, '', !1).matched) return new SyntaxError('At-rule `@' + t + '` should contain a prelude'); } checkAtruleDescriptorName(t, r) { let n = this.checkAtruleName(t); if (n) return n; let o = this.getAtrule(t), i = lt(r); if (!o.descriptors) return new SyntaxError('At-rule `@' + t + '` has no known descriptors'); if (!o.descriptors[i.name] && !o.descriptors[i.basename]) return new We('Unknown at-rule descriptor', r); } checkPropertyName(t) { if (!this.getProperty(t)) return new We('Unknown property', t); } matchAtrulePrelude(t, r) { let n = this.checkAtrulePrelude(t, r); if (n) return ce(null, n); let o = this.getAtrule(t); return o.prelude ? Xe(this, o.prelude, r || '', !1) : ce(null, null); } matchAtruleDescriptor(t, r, n) { let o = this.checkAtruleDescriptorName(t, r); if (o) return ce(null, o); let i = this.getAtrule(t), s = lt(r); return Xe( this, i.descriptors[s.name] || i.descriptors[s.basename], n, !1 ); } matchDeclaration(t) { return t.type !== 'Declaration' ? ce(null, new Error('Not a Declaration node')) : this.matchProperty(t.property, t.value); } matchProperty(t, r) { if (Bt(t).custom) return ce( null, new Error("Lexer matching doesn't applicable for custom properties") ); let n = this.checkPropertyName(t); return n ? ce(null, n) : Xe(this, this.getProperty(t), r, !0); } matchType(t, r) { let n = this.getType(t); return n ? Xe(this, n, r, !1) : ce(null, new We('Unknown type', t)); } match(t, r) { return typeof t != 'string' && (!t || !t.type) ? ce(null, new We('Bad syntax')) : ((typeof t == 'string' || !t.match) && (t = this.createDescriptor(t, 'Type', 'anonymous')), Xe(this, t, r, !1)); } findValueFragments(t, r, n, o) { return $r(this, r, this.matchProperty(t, r), n, o); } findDeclarationValueFragments(t, r, n) { return $r(this, t.value, this.matchDeclaration(t), r, n); } findAllFragments(t, r, n) { let o = []; return ( this.syntax.walk(t, { visit: 'Declaration', enter: (i) => { o.push.apply(o, this.findDeclarationValueFragments(i, r, n)); }, }), o ); } getAtrule(t, r = !0) { let n = lt(t); return ( (n.vendor && r ? this.atrules[n.name] || this.atrules[n.basename] : this.atrules[n.name]) || null ); } getAtrulePrelude(t, r = !0) { let n = this.getAtrule(t, r); return (n && n.prelude) || null; } getAtruleDescriptor(t, r) { return ( (this.atrules.hasOwnProperty(t) && this.atrules.declarators && this.atrules[t].declarators[r]) || null ); } getProperty(t, r = !0) { let n = Bt(t); return ( (n.vendor && r ? this.properties[n.name] || this.properties[n.basename] : this.properties[n.name]) || null ); } getType(t) { return hasOwnProperty.call(this.types, t) ? this.types[t] : null; } validate() { function t(o, i, s, u) { if (s.has(i)) return s.get(i); s.set(i, !1), u.syntax !== null && Qt( u.syntax, function (c) { if (c.type !== 'Type' && c.type !== 'Property') return; let a = c.type === 'Type' ? o.types : o.properties, l = c.type === 'Type' ? r : n; (!hasOwnProperty.call(a, c.name) || t(o, c.name, l, a[c.name])) && s.set(i, !0); }, this ); } let r = new Map(), n = new Map(); for (let o in this.types) t(this, o, r, this.types[o]); for (let o in this.properties) t(this, o, n, this.properties[o]); return ( (r = [...r.keys()].filter((o) => r.get(o))), (n = [...n.keys()].filter((o) => n.get(o))), r.length || n.length ? { types: r, properties: n } : null ); } dump(t, r) { return { generic: this.generic, types: Jr(this.types, !r, t), properties: Jr(this.properties, !r, t), atrules: pc(this.atrules, !r, t), }; } toString() { return JSON.stringify(this.dump()); } }; var { hasOwnProperty: $e } = Object.prototype, mc = { generic: !0, types: en, atrules: { prelude: ma, descriptors: ma }, properties: en, parseContext: fc, scope: da, atrule: ['parse'], pseudo: ['parse'], node: ['name', 'structure', 'parse', 'generate', 'walkContext'], }; function Zt(e) { return e && e.constructor === Object; } function fa(e) { return Zt(e) ? { ...e } : e; } function fc(e, t) { return Object.assign(e, t); } function da(e, t) { for (let r in t) $e.call(t, r) && (Zt(e[r]) ? da(e[r], t[r]) : (e[r] = fa(t[r]))); return e; } function ha(e, t) { return ( typeof t == 'string' && /^\s*\|/.test(t) ? typeof e == 'string' ? e + t : t.replace(/^\s*\|\s*/, '') : t || null ); } function en(e, t) { if (typeof t == 'string') return ha(e, t); let r = { ...e }; for (let n in t) $e.call(t, n) && (r[n] = ha($e.call(e, n) ? e[n] : void 0, t[n])); return r; } function ma(e, t) { let r = en(e, t); return !Zt(r) || Object.keys(r).length ? r : null; } function gt(e, t, r) { for (let n in r) if ($e.call(r, n) !== !1) { if (r[n] === !0) $e.call(t, n) && (e[n] = fa(t[n])); else if (r[n]) { if (typeof r[n] == 'function') { let o = r[n]; (e[n] = o({}, e[n])), (e[n] = o(e[n] || {}, t[n])); } else if (Zt(r[n])) { let o = {}; for (let i in e[n]) o[i] = gt({}, e[n][i], r[n]); for (let i in t[n]) o[i] = gt(o[i] || {}, t[n][i], r[n]); e[n] = o; } else if (Array.isArray(r[n])) { let o = {}, i = r[n].reduce(function (s, u) { return (s[u] = !0), s; }, {}); for (let [s, u] of Object.entries(e[n] || {})) (o[s] = {}), u && gt(o[s], u, i); for (let s in t[n]) $e.call(t[n], s) && (o[s] || (o[s] = {}), t[n] && t[n][s] && gt(o[s], t[n][s], i)); e[n] = o; } } } return e; } var Jt = (e, t) => gt(e, t, mc); function ga(e) { let t = Jo(e), r = Ii(e), n = Ci(e), { fromPlainObject: o, toPlainObject: i } = Ai(r), s = { lexer: null, createLexer: (u) => new De(u, s, s.lexer.structure), tokenize: ve, parse: t, generate: n, walk: r, find: r.find, findLast: r.findLast, findAll: r.findAll, fromPlainObject: o, toPlainObject: i, fork(u) { let c = Jt({}, e); return ga(typeof u == 'function' ? u(c, Object.assign) : Jt(c, u)); }, }; return ( (s.lexer = new De( { generic: !0, types: e.types, atrules: e.atrules, properties: e.properties, node: e.node, }, s )), s ); } var er = (e) => ga(Jt({}, e)); var ba = { generic: !0, types: { 'absolute-size': 'xx-small|x-small|small|medium|large|x-large|xx-large|xxx-large', 'alpha-value': '|', 'angle-percentage': '|', 'angular-color-hint': '', 'angular-color-stop': '&&?', 'angular-color-stop-list': '[ [, ]?]# , ', 'animateable-feature': 'scroll-position|contents|', attachment: 'scroll|fixed|local', 'attr()': 'attr( ? [, ]? )', 'attr-matcher': "['~'|'|'|'^'|'$'|'*']? '='", 'attr-modifier': 'i|s', 'attribute-selector': "'[' ']'|'[' [|] ? ']'", 'auto-repeat': 'repeat( [auto-fill|auto-fit] , [? ]+ ? )', 'auto-track-list': '[? [|]]* ? [? [|]]* ?', 'baseline-position': '[first|last]? baseline', 'basic-shape': '||||', 'bg-image': 'none|', 'bg-layer': '|| [/ ]?||||||||', 'bg-position': '[[left|center|right|top|bottom|]|[left|center|right|] [top|center|bottom|]|[center|[left|right] ?]&&[center|[top|bottom] ?]]', 'bg-size': '[|auto]{1,2}|cover|contain', 'blur()': 'blur( )', 'blend-mode': 'normal|multiply|screen|overlay|darken|lighten|color-dodge|color-burn|hard-light|soft-light|difference|exclusion|hue|saturation|color|luminosity', box: 'border-box|padding-box|content-box', 'brightness()': 'brightness( )', 'calc()': 'calc( )', 'calc-sum': " [['+'|'-'] ]*", 'calc-product': " ['*' |'/' ]*", 'calc-value': '|||( )', 'cf-final-image': '|', 'cf-mixing-image': '?&&', 'circle()': 'circle( []? [at ]? )', 'clamp()': 'clamp( #{3} )', 'class-selector': "'.' ", 'clip-source': '', color: '|||||||||currentcolor|', 'color-stop': '|', 'color-stop-angle': '{1,2}', 'color-stop-length': '{1,2}', 'color-stop-list': '[ [, ]?]# , ', combinator: "'>'|'+'|'~'|['||']", 'common-lig-values': '[common-ligatures|no-common-ligatures]', 'compat-auto': 'searchfield|textarea|push-button|slider-horizontal|checkbox|radio|square-button|menulist|listbox|meter|progress-bar|button', 'composite-style': 'clear|copy|source-over|source-in|source-out|source-atop|destination-over|destination-in|destination-out|destination-atop|xor', 'compositing-operator': 'add|subtract|intersect|exclude', 'compound-selector': '[? * [ *]*]!', 'compound-selector-list': '#', 'complex-selector': ' [? ]*', 'complex-selector-list': '#', 'conic-gradient()': 'conic-gradient( [from ]? [at ]? , )', 'contextual-alt-values': '[contextual|no-contextual]', 'content-distribution': 'space-between|space-around|space-evenly|stretch', 'content-list': '[|contents||||||]+', 'content-position': 'center|start|end|flex-start|flex-end', 'content-replacement': '', 'contrast()': 'contrast( [] )', counter: '|', 'counter()': 'counter( , ? )', 'counter-name': '', 'counter-style': '|symbols( )', 'counter-style-name': '', 'counters()': 'counters( , , ? )', 'cross-fade()': 'cross-fade( , ? )', 'cubic-bezier-timing-function': 'ease|ease-in|ease-out|ease-in-out|cubic-bezier( , , , )', 'deprecated-system-color': 'ActiveBorder|ActiveCaption|AppWorkspace|Background|ButtonFace|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText', 'discretionary-lig-values': '[discretionary-ligatures|no-discretionary-ligatures]', 'display-box': 'contents|none', 'display-inside': 'flow|flow-root|table|flex|grid|ruby', 'display-internal': 'table-row-group|table-header-group|table-footer-group|table-row|table-cell|table-column-group|table-column|table-caption|ruby-base|ruby-text|ruby-base-container|ruby-text-container', 'display-legacy': 'inline-block|inline-list-item|inline-table|inline-flex|inline-grid', 'display-listitem': '?&&[flow|flow-root]?&&list-item', 'display-outside': 'block|inline|run-in', 'drop-shadow()': 'drop-shadow( {2,3} ? )', 'east-asian-variant-values': '[jis78|jis83|jis90|jis04|simplified|traditional]', 'east-asian-width-values': '[full-width|proportional-width]', 'element()': 'element( , [first|start|last|first-except]? )|element( )', 'ellipse()': 'ellipse( [{2}]? [at ]? )', 'ending-shape': 'circle|ellipse', 'env()': 'env( , ? )', 'explicit-track-list': '[? ]+ ?', 'family-name': '|+', 'feature-tag-value': ' [|on|off]?', 'feature-type': '@stylistic|@historical-forms|@styleset|@character-variant|@swash|@ornaments|@annotation', 'feature-value-block': " '{' '}'", 'feature-value-block-list': '+', 'feature-value-declaration': ' : + ;', 'feature-value-declaration-list': '', 'feature-value-name': '', 'fill-rule': 'nonzero|evenodd', 'filter-function': '|||||||||', 'filter-function-list': '[|]+', 'final-bg-layer': "<'background-color'>|||| [/ ]?||||||||", 'fit-content()': 'fit-content( [|] )', 'fixed-breadth': '', 'fixed-repeat': 'repeat( [] , [? ]+ ? )', 'fixed-size': '|minmax( , )|minmax( , )', 'font-stretch-absolute': 'normal|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|', 'font-variant-css21': '[normal|small-caps]', 'font-weight-absolute': 'normal|bold|', 'frequency-percentage': '|', 'general-enclosed': '[ )]|( )', 'generic-family': 'serif|sans-serif|cursive|fantasy|monospace|-apple-system', 'generic-name': 'serif|sans-serif|cursive|fantasy|monospace', 'geometry-box': '|fill-box|stroke-box|view-box', gradient: '||||||<-legacy-gradient>', 'grayscale()': 'grayscale( )', 'grid-line': 'auto||[&&?]|[span&&[||]]', 'historical-lig-values': '[historical-ligatures|no-historical-ligatures]', 'hsl()': 'hsl( [/ ]? )|hsl( , , , ? )', 'hsla()': 'hsla( [/ ]? )|hsla( , , , ? )', hue: '|', 'hue-rotate()': 'hue-rotate( )', 'hwb()': 'hwb( [|none] [|none] [|none] [/ [|none]]? )', image: '||||||', 'image()': 'image( ? [? , ?]! )', 'image-set()': 'image-set( # )', 'image-set-option': '[|] [||type( )]', 'image-src': '|', 'image-tags': 'ltr|rtl', 'inflexible-breadth': '||min-content|max-content|auto', 'inset()': "inset( {1,4} [round <'border-radius'>]? )", 'invert()': 'invert( )', 'keyframes-name': '|', 'keyframe-block': '# { }', 'keyframe-block-list': '+', 'keyframe-selector': 'from|to|', 'layer()': 'layer( )', 'layer-name': " ['.' ]*", 'leader()': 'leader( )', 'leader-type': 'dotted|solid|space|', 'length-percentage': '|', 'line-names': "'[' * ']'", 'line-name-list': '[|]+', 'line-style': 'none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset', 'line-width': '|thin|medium|thick', 'linear-color-hint': '', 'linear-color-stop': ' ?', 'linear-gradient()': 'linear-gradient( [|to ]? , )', 'mask-layer': '|| [/ ]?||||||[|no-clip]||||', 'mask-position': '[|left|center|right] [|top|center|bottom]?', 'mask-reference': 'none||', 'mask-source': '', 'masking-mode': 'alpha|luminance|match-source', 'matrix()': 'matrix( #{6} )', 'matrix3d()': 'matrix3d( #{16} )', 'max()': 'max( # )', 'media-and': ' [and ]+', 'media-condition': '|||', 'media-condition-without-or': '||', 'media-feature': '( [||] )', 'media-in-parens': '( )||', 'media-not': 'not ', 'media-or': ' [or ]+', 'media-query': '|[not|only]? [and ]?', 'media-query-list': '#', 'media-type': '', 'mf-boolean': '', 'mf-name': '', 'mf-plain': ' : ', 'mf-range': " ['<'|'>']? '='? | ['<'|'>']? '='? | '<' '='? '<' '='? | '>' '='? '>' '='? ", 'mf-value': '|||', 'min()': 'min( # )', 'minmax()': 'minmax( [||min-content|max-content|auto] , [|||min-content|max-content|auto] )', 'name-repeat': 'repeat( [|auto-fill] , + )', 'named-color': 'transparent|aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen|<-non-standard-color>', 'namespace-prefix': '', 'ns-prefix': "[|'*']? '|'", 'number-percentage': '|', 'numeric-figure-values': '[lining-nums|oldstyle-nums]', 'numeric-fraction-values': '[diagonal-fractions|stacked-fractions]', 'numeric-spacing-values': '[proportional-nums|tabular-nums]', nth: '|even|odd', 'opacity()': 'opacity( [] )', 'overflow-position': 'unsafe|safe', 'outline-radius': '|', 'page-body': '? [; ]?| ', 'page-margin-box': " '{' '}'", 'page-margin-box-type': '@top-left-corner|@top-left|@top-center|@top-right|@top-right-corner|@bottom-left-corner|@bottom-left|@bottom-center|@bottom-right|@bottom-right-corner|@left-top|@left-middle|@left-bottom|@right-top|@right-middle|@right-bottom', 'page-selector-list': '[#]?', 'page-selector': '+| *', 'page-size': 'A5|A4|A3|B5|B4|JIS-B5|JIS-B4|letter|legal|ledger', 'path()': 'path( [ ,]? )', 'paint()': 'paint( , ? )', 'perspective()': 'perspective( )', 'polygon()': 'polygon( ? , [ ]# )', position: '[[left|center|right]||[top|center|bottom]|[left|center|right|] [top|center|bottom|]?|[[left|right] ]&&[[top|bottom] ]]', 'pseudo-class-selector': "':' |':' ')'", 'pseudo-element-selector': "':' ", 'pseudo-page': ': [left|right|first|blank]', quote: 'open-quote|close-quote|no-open-quote|no-close-quote', 'radial-gradient()': 'radial-gradient( [||]? [at ]? , )', 'relative-selector': '? ', 'relative-selector-list': '#', 'relative-size': 'larger|smaller', 'repeat-style': 'repeat-x|repeat-y|[repeat|space|round|no-repeat]{1,2}', 'repeating-conic-gradient()': 'repeating-conic-gradient( [from ]? [at ]? , )', 'repeating-linear-gradient()': 'repeating-linear-gradient( [|to ]? , )', 'repeating-radial-gradient()': 'repeating-radial-gradient( [||]? [at ]? , )', 'rgb()': 'rgb( {3} [/ ]? )|rgb( {3} [/ ]? )|rgb( #{3} , ? )|rgb( #{3} , ? )', 'rgba()': 'rgba( {3} [/ ]? )|rgba( {3} [/ ]? )|rgba( #{3} , ? )|rgba( #{3} , ? )', 'rotate()': 'rotate( [|] )', 'rotate3d()': 'rotate3d( , , , [|] )', 'rotateX()': 'rotateX( [|] )', 'rotateY()': 'rotateY( [|] )', 'rotateZ()': 'rotateZ( [|] )', 'saturate()': 'saturate( )', 'scale()': 'scale( , ? )', 'scale3d()': 'scale3d( , , )', 'scaleX()': 'scaleX( )', 'scaleY()': 'scaleY( )', 'scaleZ()': 'scaleZ( )', 'self-position': 'center|start|end|self-start|self-end|flex-start|flex-end', 'shape-radius': '|closest-side|farthest-side', 'skew()': 'skew( [|] , [|]? )', 'skewX()': 'skewX( [|] )', 'skewY()': 'skewY( [|] )', 'sepia()': 'sepia( )', shadow: 'inset?&&{2,4}&&?', 'shadow-t': '[{2,3}&&?]', shape: 'rect( , , , )|rect( )', 'shape-box': '|margin-box', 'side-or-corner': '[left|right]||[top|bottom]', 'single-animation': '