storybook
Version:
Storybook: Develop, document, and test UI components in isolation
1,628 lines (1,544 loc) • 774 kB
JavaScript
"use strict";
var nv = Object.create;
var fn = Object.defineProperty;
var ov = Object.getOwnPropertyDescriptor;
var av = Object.getOwnPropertyNames;
var iv = Object.getPrototypeOf, lv = Object.prototype.hasOwnProperty;
var o = (e, t) => fn(e, "name", { value: t, configurable: !0 });
var j = (e, t) => () => (e && (t = e(e = 0)), t);
var I = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), ir = (e, t) => {
for (var r in t)
fn(e, r, { get: t[r], enumerable: !0 });
}, Ys = (e, t, r, n) => {
if (t && typeof t == "object" || typeof t == "function")
for (let a of av(t))
!lv.call(e, a) && a !== r && fn(e, a, { get: () => t[a], enumerable: !(n = ov(t, a)) || n.enumerable });
return e;
};
var M = (e, t, r) => (r = e != null ? nv(iv(e)) : {}, Ys(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
t || !e || !e.__esModule ? fn(r, "default", { value: e, enumerable: !0 }) : r,
e
)), qe = (e) => Ys(fn({}, "__esModule", { value: !0 }), e);
// ../node_modules/@babel/runtime/helpers/extends.js
var go = I((kA, Rt) => {
function Oi() {
return Rt.exports = Oi = Object.assign ? Object.assign.bind() : function(e) {
for (var t = 1; t < arguments.length; t++) {
var r = arguments[t];
for (var n in r) ({}).hasOwnProperty.call(r, n) && (e[n] = r[n]);
}
return e;
}, Rt.exports.__esModule = !0, Rt.exports.default = Rt.exports, Oi.apply(null, arguments);
}
o(Oi, "_extends");
Rt.exports = Oi, Rt.exports.__esModule = !0, Rt.exports.default = Rt.exports;
});
// ../node_modules/@babel/runtime/helpers/assertThisInitialized.js
var Xs = I((OA, pn) => {
function sv(e) {
if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
o(sv, "_assertThisInitialized");
pn.exports = sv, pn.exports.__esModule = !0, pn.exports.default = pn.exports;
});
// ../node_modules/@babel/runtime/helpers/setPrototypeOf.js
var vo = I((_A, Et) => {
function Bi(e, t) {
return Et.exports = Bi = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(r, n) {
return r.__proto__ = n, r;
}, Et.exports.__esModule = !0, Et.exports.default = Et.exports, Bi(e, t);
}
o(Bi, "_setPrototypeOf");
Et.exports = Bi, Et.exports.__esModule = !0, Et.exports.default = Et.exports;
});
// ../node_modules/@babel/runtime/helpers/inheritsLoose.js
var Zs = I((NA, hn) => {
var cv = vo();
function uv(e, t) {
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, cv(e, t);
}
o(uv, "_inheritsLoose");
hn.exports = uv, hn.exports.__esModule = !0, hn.exports.default = hn.exports;
});
// ../node_modules/@babel/runtime/helpers/getPrototypeOf.js
var Ks = I((qA, St) => {
function _i(e) {
return St.exports = _i = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) {
return t.__proto__ || Object.getPrototypeOf(t);
}, St.exports.__esModule = !0, St.exports.default = St.exports, _i(e);
}
o(_i, "_getPrototypeOf");
St.exports = _i, St.exports.__esModule = !0, St.exports.default = St.exports;
});
// ../node_modules/@babel/runtime/helpers/isNativeFunction.js
var Js = I((jA, mn) => {
function dv(e) {
try {
return Function.toString.call(e).indexOf("[native code]") !== -1;
} catch {
return typeof e == "function";
}
}
o(dv, "_isNativeFunction");
mn.exports = dv, mn.exports.__esModule = !0, mn.exports.default = mn.exports;
});
// ../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js
var ec = I((WA, Ct) => {
function Qs() {
try {
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
}));
} catch {
}
return (Ct.exports = Qs = /* @__PURE__ */ o(function() {
return !!e;
}, "_isNativeReflectConstruct"), Ct.exports.__esModule = !0, Ct.exports.default = Ct.exports)();
}
o(Qs, "_isNativeReflectConstruct");
Ct.exports = Qs, Ct.exports.__esModule = !0, Ct.exports.default = Ct.exports;
});
// ../node_modules/@babel/runtime/helpers/construct.js
var tc = I((GA, gn) => {
var fv = ec(), pv = vo();
function hv(e, t, r) {
if (fv()) return Reflect.construct.apply(null, arguments);
var n = [null];
n.push.apply(n, t);
var a = new (e.bind.apply(e, n))();
return r && pv(a, r.prototype), a;
}
o(hv, "_construct");
gn.exports = hv, gn.exports.__esModule = !0, gn.exports.default = gn.exports;
});
// ../node_modules/@babel/runtime/helpers/wrapNativeSuper.js
var rc = I((XA, It) => {
var mv = Ks(), gv = vo(), vv = Js(), wv = tc();
function Di(e) {
var t = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
return It.exports = Di = /* @__PURE__ */ o(function(n) {
if (n === null || !vv(n)) return n;
if (typeof n != "function") throw new TypeError("Super expression must either be null or a function");
if (t !== void 0) {
if (t.has(n)) return t.get(n);
t.set(n, a);
}
function a() {
return wv(n, arguments, mv(this).constructor);
}
return o(a, "Wrapper"), a.prototype = Object.create(n.prototype, {
constructor: {
value: a,
enumerable: !1,
writable: !0,
configurable: !0
}
}), gv(a, n);
}, "_wrapNativeSuper"), It.exports.__esModule = !0, It.exports.default = It.exports, Di(e);
}
o(Di, "_wrapNativeSuper");
It.exports = Di, It.exports.__esModule = !0, It.exports.default = It.exports;
});
// ../node_modules/@babel/runtime/helpers/taggedTemplateLiteralLoose.js
var nc = I((KA, vn) => {
function bv(e, t) {
return t || (t = e.slice(0)), e.raw = t, e;
}
o(bv, "_taggedTemplateLiteralLoose");
vn.exports = bv, vn.exports.__esModule = !0, vn.exports.default = vn.exports;
});
// ../node_modules/polished/dist/polished.cjs.js
var Tr = I((P) => {
"use strict";
Object.defineProperty(P, "__esModule", { value: !0 });
var yv = go(), xv = Xs(), Rv = Zs(), Ev = rc(), Sv = nc();
function xn(e) {
return e && typeof e == "object" && "default" in e ? e : { default: e };
}
o(xn, "_interopDefaultLegacy");
var ee = /* @__PURE__ */ xn(yv), Cv = /* @__PURE__ */ xn(xv), Iv = /* @__PURE__ */ xn(Rv), Av = /* @__PURE__ */ xn(Ev), vc = /* @__PURE__ */ xn(
Sv);
function oc() {
var e;
return e = arguments.length - 1, e < 0 || arguments.length <= e ? void 0 : arguments[e];
}
o(oc, "last");
function Mv(e) {
return -e;
}
o(Mv, "negation");
function Lv(e, t) {
return e + t;
}
o(Lv, "addition");
function Tv(e, t) {
return e - t;
}
o(Tv, "subtraction");
function Pv(e, t) {
return e * t;
}
o(Pv, "multiplication");
function zv(e, t) {
return e / t;
}
o(zv, "division");
function kv() {
return Math.max.apply(Math, arguments);
}
o(kv, "max");
function Hv() {
return Math.min.apply(Math, arguments);
}
o(Hv, "min");
function Ov() {
return Array.of.apply(Array, arguments);
}
o(Ov, "comma");
var Bv = {
symbols: {
"*": {
infix: {
symbol: "*",
f: Pv,
notation: "infix",
precedence: 4,
rightToLeft: 0,
argCount: 2
},
symbol: "*",
regSymbol: "\\*"
},
"/": {
infix: {
symbol: "/",
f: zv,
notation: "infix",
precedence: 4,
rightToLeft: 0,
argCount: 2
},
symbol: "/",
regSymbol: "/"
},
"+": {
infix: {
symbol: "+",
f: Lv,
notation: "infix",
precedence: 2,
rightToLeft: 0,
argCount: 2
},
prefix: {
symbol: "+",
f: oc,
notation: "prefix",
precedence: 3,
rightToLeft: 0,
argCount: 1
},
symbol: "+",
regSymbol: "\\+"
},
"-": {
infix: {
symbol: "-",
f: Tv,
notation: "infix",
precedence: 2,
rightToLeft: 0,
argCount: 2
},
prefix: {
symbol: "-",
f: Mv,
notation: "prefix",
precedence: 3,
rightToLeft: 0,
argCount: 1
},
symbol: "-",
regSymbol: "-"
},
",": {
infix: {
symbol: ",",
f: Ov,
notation: "infix",
precedence: 1,
rightToLeft: 0,
argCount: 2
},
symbol: ",",
regSymbol: ","
},
"(": {
prefix: {
symbol: "(",
f: oc,
notation: "prefix",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: "(",
regSymbol: "\\("
},
")": {
postfix: {
symbol: ")",
f: void 0,
notation: "postfix",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: ")",
regSymbol: "\\)"
},
min: {
func: {
symbol: "min",
f: Hv,
notation: "func",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: "min",
regSymbol: "min\\b"
},
max: {
func: {
symbol: "max",
f: kv,
notation: "func",
precedence: 0,
rightToLeft: 0,
argCount: 1
},
symbol: "max",
regSymbol: "max\\b"
}
}
}, ac = Bv, _v = {
1: `Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation:\
0.4, lightness: 0.75 }).
`,
2: `Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, satu\
ration: 0.4, lightness: 0.75, alpha: 0.7 }).
`,
3: `Passed an incorrect argument to a color function, please pass a string representation of a color.
`,
4: `Couldn't generate valid rgb string from %s, it returned %s.
`,
5: `Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.
`,
6: `Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, \
blue: 100 }).
`,
7: `Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green\
: 205, blue: 100, alpha: 0.75 }).
`,
8: `Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.
`,
9: `Please provide a number of steps to the modularScale helper.
`,
10: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
`,
11: `Invalid value passed as base to modularScale, expected number or em string but got "%s"
`,
12: `Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.
`,
13: `Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.
`,
14: `Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.
`,
15: `Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.
`,
16: `You must provide a template to this method.
`,
17: `You passed an unsupported selector state to this method.
`,
18: `minScreen and maxScreen must be provided as stringified numbers with the same units.
`,
19: `fromSize and toSize must be provided as stringified numbers with the same units.
`,
20: `expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
`,
21: "expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
22: "expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
23: `fontFace expects a name of a font-family.
`,
24: `fontFace expects either the path to the font file(s) or a name of a local copy.
`,
25: `fontFace expects localFonts to be an array.
`,
26: `fontFace expects fileFormats to be an array.
`,
27: `radialGradient requries at least 2 color-stops to properly render.
`,
28: `Please supply a filename to retinaImage() as the first argument.
`,
29: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
`,
30: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
31: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation
`,
32: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])
To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')
`,
33: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation
`,
34: `borderRadius expects a radius value as a string or number as the second argument.
`,
35: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
`,
36: `Property must be a string value.
`,
37: `Syntax Error at %s.
`,
38: `Formula contains a function that needs parentheses at %s.
`,
39: `Formula is missing closing parenthesis at %s.
`,
40: `Formula has too many closing parentheses at %s.
`,
41: `All values in a formula must have the same unit or be unitless.
`,
42: `Please provide a number of steps to the modularScale helper.
`,
43: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
`,
44: `Invalid value passed as base to modularScale, expected number or em/rem string but got %s.
`,
45: `Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.
`,
46: `Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.
`,
47: `minScreen and maxScreen must be provided as stringified numbers with the same units.
`,
48: `fromSize and toSize must be provided as stringified numbers with the same units.
`,
49: `Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
`,
50: `Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.
`,
51: `Expects the first argument object to have the properties prop, fromSize, and toSize.
`,
52: `fontFace expects either the path to the font file(s) or a name of a local copy.
`,
53: `fontFace expects localFonts to be an array.
`,
54: `fontFace expects fileFormats to be an array.
`,
55: `fontFace expects a name of a font-family.
`,
56: `linearGradient requries at least 2 color-stops to properly render.
`,
57: `radialGradient requries at least 2 color-stops to properly render.
`,
58: `Please supply a filename to retinaImage() as the first argument.
`,
59: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
`,
60: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
61: `Property must be a string value.
`,
62: `borderRadius expects a radius value as a string or number as the second argument.
`,
63: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
`,
64: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.
`,
65: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animat\
ion please supply them in simple values, e.g. animation('rotate', '2s').
`,
66: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.
`,
67: `You must provide a template to this method.
`,
68: `You passed an unsupported selector state to this method.
`,
69: `Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.
`,
70: `Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.
`,
71: `Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.
`,
72: `Passed invalid base value %s to %s(), please pass a value like "12px" or 12.
`,
73: `Please provide a valid CSS variable.
`,
74: `CSS variable not found and no default was provided.
`,
75: `important requires a valid style object, got a %s instead.
`,
76: `fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.
`,
77: `remToPx expects a value in "rem" but you provided it in "%s".
`,
78: `base must be set in "px" or "%" but you set it in "%s".
`
};
function Dv() {
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
t[r] = arguments[r];
var n = t[0], a = [], l;
for (l = 1; l < t.length; l += 1)
a.push(t[l]);
return a.forEach(function(c) {
n = n.replace(/%[a-z]/, c);
}), n;
}
o(Dv, "format");
var B = /* @__PURE__ */ function(e) {
Iv.default(t, e);
function t(r) {
var n;
if (process.env.NODE_ENV === "production")
n = e.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + r +
" for more information.") || this;
else {
for (var a = arguments.length, l = new Array(a > 1 ? a - 1 : 0), c = 1; c < a; c++)
l[c - 1] = arguments[c];
n = e.call(this, Dv.apply(void 0, [_v[r]].concat(l))) || this;
}
return Cv.default(n);
}
return o(t, "PolishedError"), t;
}(/* @__PURE__ */ Av.default(Error)), ic = /((?!\w)a|na|hc|mc|dg|me[r]?|xe|ni(?![a-zA-Z])|mm|cp|tp|xp|q(?!s)|hv|xamv|nimv|wv|sm|s(?!\D|$)|ged|darg?|nrut)/g;
function Nv(e) {
var t = {};
return t.symbols = e ? ee.default({}, ac.symbols, e.symbols) : ee.default({}, ac.symbols), t;
}
o(Nv, "mergeSymbolMaps");
function lc(e, t) {
var r, n = e.pop();
return t.push(n.f.apply(n, (r = []).concat.apply(r, t.splice(-n.argCount)))), n.precedence;
}
o(lc, "exec");
function Fv(e, t) {
var r = Nv(t), n, a = [r.symbols["("].prefix], l = [], c = new RegExp(
// Pattern for numbers
"\\d+(?:\\.\\d+)?|" + // ...and patterns for individual operators/function names
Object.keys(r.symbols).map(function(m) {
return r.symbols[m];
}).sort(function(m, b) {
return b.symbol.length - m.symbol.length;
}).map(function(m) {
return m.regSymbol;
}).join("|") + "|(\\S)",
"g"
);
c.lastIndex = 0;
var s = !1;
do {
n = c.exec(e);
var d = n || [")", void 0], u = d[0], f = d[1], p = r.symbols[u], h = p && !p.prefix && !p.func, w = !p || !p.postfix && !p.infix;
if (f || (s ? w : h))
throw new B(37, n ? n.index : e.length, e);
if (s) {
var R = p.postfix || p.infix;
do {
var g = a[a.length - 1];
if ((R.precedence - g.precedence || g.rightToLeft) > 0) break;
} while (lc(a, l));
s = R.notation === "postfix", R.symbol !== ")" && (a.push(R), s && lc(a, l));
} else if (p) {
if (a.push(p.prefix || p.func), p.func && (n = c.exec(e), !n || n[0] !== "("))
throw new B(38, n ? n.index : e.length, e);
} else
l.push(+u), s = !0;
} while (n && a.length);
if (a.length)
throw new B(39, n ? n.index : e.length, e);
if (n)
throw new B(40, n ? n.index : e.length, e);
return l.pop();
}
o(Fv, "calculate");
function Ni(e) {
return e.split("").reverse().join("");
}
o(Ni, "reverseString");
function qv(e, t) {
var r = Ni(e), n = r.match(ic);
if (n && !n.every(function(l) {
return l === n[0];
}))
throw new B(41);
var a = Ni(r.replace(ic, ""));
return "" + Fv(a, t) + (n ? Ni(n[0]) : "");
}
o(qv, "math");
var Vv = /--[\S]*/g;
function jv(e, t) {
if (!e || !e.match(Vv))
throw new B(73);
var r;
if (typeof document < "u" && document.documentElement !== null && (r = getComputedStyle(document.documentElement).getPropertyValue(e)), r)
return r.trim();
if (t)
return t;
throw new B(74);
}
o(jv, "cssVar");
function wn(e) {
return e.charAt(0).toUpperCase() + e.slice(1);
}
o(wn, "capitalizeString");
var $v = ["Top", "Right", "Bottom", "Left"];
function Wv(e, t) {
if (!e) return t.toLowerCase();
var r = e.split("-");
if (r.length > 1)
return r.splice(1, 0, t), r.reduce(function(a, l) {
return "" + a + wn(l);
});
var n = e.replace(/([a-z])([A-Z])/g, "$1" + t + "$2");
return e === n ? "" + e + t : n;
}
o(Wv, "generateProperty");
function Uv(e, t) {
for (var r = {}, n = 0; n < t.length; n += 1)
(t[n] || t[n] === 0) && (r[Wv(e, $v[n])] = t[n]);
return r;
}
o(Uv, "generateStyles");
function Dt(e) {
for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
r[n - 1] = arguments[n];
var a = r[0], l = r[1], c = l === void 0 ? a : l, s = r[2], d = s === void 0 ? a : s, u = r[3], f = u === void 0 ? c : u, p = [a, c, d, f];
return Uv(e, p);
}
o(Dt, "directionalProperty");
function sc(e, t) {
return e.substr(-t.length) === t;
}
o(sc, "endsWith");
var Gv = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
function ji(e) {
if (typeof e != "string") return e;
var t = e.match(Gv);
return t ? parseFloat(e) : e;
}
o(ji, "stripUnit");
var Yv = /* @__PURE__ */ o(function(t) {
return function(r, n) {
n === void 0 && (n = "16px");
var a = r, l = n;
if (typeof r == "string") {
if (!sc(r, "px"))
throw new B(69, t, r);
a = ji(r);
}
if (typeof n == "string") {
if (!sc(n, "px"))
throw new B(70, t, n);
l = ji(n);
}
if (typeof a == "string")
throw new B(71, r, t);
if (typeof l == "string")
throw new B(72, n, t);
return "" + a / l + t;
};
}, "pxtoFactory"), wc = Yv, Xv = wc("em"), Zv = Xv, Kv = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
function ft(e) {
if (typeof e != "string") return [e, ""];
var t = e.match(Kv);
return t ? [parseFloat(e), t[2]] : [e, void 0];
}
o(ft, "getValueAndUnit");
function bc(e, t) {
if (typeof e != "object" || e === null)
throw new B(75, typeof e);
var r = {};
return Object.keys(e).forEach(function(n) {
typeof e[n] == "object" && e[n] !== null ? r[n] = bc(e[n], t) : !t || t && (t === n || t.indexOf(n) >= 0) ? r[n] = e[n] + " !important" :
r[n] = e[n];
}), r;
}
o(bc, "important");
var yc = {
minorSecond: 1.067,
majorSecond: 1.125,
minorThird: 1.2,
majorThird: 1.25,
perfectFourth: 1.333,
augFourth: 1.414,
perfectFifth: 1.5,
minorSixth: 1.6,
goldenSection: 1.618,
majorSixth: 1.667,
minorSeventh: 1.778,
majorSeventh: 1.875,
octave: 2,
majorTenth: 2.5,
majorEleventh: 2.667,
majorTwelfth: 3,
doubleOctave: 4
};
function Jv(e) {
return yc[e];
}
o(Jv, "getRatio");
function Qv(e, t, r) {
if (t === void 0 && (t = "1em"), r === void 0 && (r = 1.333), typeof e != "number")
throw new B(42);
if (typeof r == "string" && !yc[r])
throw new B(43);
var n = typeof t == "string" ? ft(t) : [t, ""], a = n[0], l = n[1], c = typeof r == "string" ? Jv(r) : r;
if (typeof a == "string")
throw new B(44, t);
return "" + a * Math.pow(c, e) + (l || "");
}
o(Qv, "modularScale");
var e2 = wc("rem"), t2 = e2, $i = 16;
function xc(e) {
var t = ft(e);
if (t[1] === "px")
return parseFloat(e);
if (t[1] === "%")
return parseFloat(e) / 100 * $i;
throw new B(78, t[1]);
}
o(xc, "convertBase");
function r2() {
if (typeof document < "u" && document.documentElement !== null) {
var e = getComputedStyle(document.documentElement).fontSize;
return e ? xc(e) : $i;
}
return $i;
}
o(r2, "getBaseFromDoc");
function n2(e, t) {
var r = ft(e);
if (r[1] !== "rem" && r[1] !== "")
throw new B(77, r[1]);
var n = t ? xc(t) : r2();
return r[0] * n + "px";
}
o(n2, "remToPx");
var o2 = {
back: "cubic-bezier(0.600, -0.280, 0.735, 0.045)",
circ: "cubic-bezier(0.600, 0.040, 0.980, 0.335)",
cubic: "cubic-bezier(0.550, 0.055, 0.675, 0.190)",
expo: "cubic-bezier(0.950, 0.050, 0.795, 0.035)",
quad: "cubic-bezier(0.550, 0.085, 0.680, 0.530)",
quart: "cubic-bezier(0.895, 0.030, 0.685, 0.220)",
quint: "cubic-bezier(0.755, 0.050, 0.855, 0.060)",
sine: "cubic-bezier(0.470, 0.000, 0.745, 0.715)"
};
function a2(e) {
return o2[e.toLowerCase().trim()];
}
o(a2, "easeIn");
var i2 = {
back: "cubic-bezier(0.680, -0.550, 0.265, 1.550)",
circ: "cubic-bezier(0.785, 0.135, 0.150, 0.860)",
cubic: "cubic-bezier(0.645, 0.045, 0.355, 1.000)",
expo: "cubic-bezier(1.000, 0.000, 0.000, 1.000)",
quad: "cubic-bezier(0.455, 0.030, 0.515, 0.955)",
quart: "cubic-bezier(0.770, 0.000, 0.175, 1.000)",
quint: "cubic-bezier(0.860, 0.000, 0.070, 1.000)",
sine: "cubic-bezier(0.445, 0.050, 0.550, 0.950)"
};
function l2(e) {
return i2[e.toLowerCase().trim()];
}
o(l2, "easeInOut");
var s2 = {
back: "cubic-bezier(0.175, 0.885, 0.320, 1.275)",
cubic: "cubic-bezier(0.215, 0.610, 0.355, 1.000)",
circ: "cubic-bezier(0.075, 0.820, 0.165, 1.000)",
expo: "cubic-bezier(0.190, 1.000, 0.220, 1.000)",
quad: "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
quart: "cubic-bezier(0.165, 0.840, 0.440, 1.000)",
quint: "cubic-bezier(0.230, 1.000, 0.320, 1.000)",
sine: "cubic-bezier(0.390, 0.575, 0.565, 1.000)"
};
function c2(e) {
return s2[e.toLowerCase().trim()];
}
o(c2, "easeOut");
function Wi(e, t, r, n) {
r === void 0 && (r = "320px"), n === void 0 && (n = "1200px");
var a = ft(e), l = a[0], c = a[1], s = ft(t), d = s[0], u = s[1], f = ft(r), p = f[0], h = f[1], w = ft(n), R = w[0], g = w[1];
if (typeof p != "number" || typeof R != "number" || !h || !g || h !== g)
throw new B(47);
if (typeof l != "number" || typeof d != "number" || c !== u)
throw new B(48);
if (c !== h || u !== g)
throw new B(76);
var m = (l - d) / (p - R), b = d - m * R;
return "calc(" + b.toFixed(2) + (c || "") + " + " + (100 * m).toFixed(2) + "vw)";
}
o(Wi, "between");
function u2(e) {
var t;
e === void 0 && (e = "&");
var r = e + "::after";
return t = {}, t[r] = {
clear: "both",
content: '""',
display: "table"
}, t;
}
o(u2, "clearFix");
function d2(e) {
return e === void 0 && (e = 0), {
position: "absolute",
top: e,
right: e,
bottom: e,
left: e
};
}
o(d2, "cover");
function f2(e, t) {
t === void 0 && (t = 1);
var r = {
display: "inline-block",
maxWidth: e || "100%",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
wordWrap: "normal"
};
return t > 1 ? ee.default({}, r, {
WebkitBoxOrient: "vertical",
WebkitLineClamp: t,
display: "-webkit-box",
whiteSpace: "normal"
}) : r;
}
o(f2, "ellipsis");
function p2(e, t) {
var r = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (r) return (r = r.call(e)).next.bind(r);
if (Array.isArray(e) || (r = h2(e)) || t && e && typeof e.length == "number") {
r && (e = r);
var n = 0;
return function() {
return n >= e.length ? { done: !0 } : { done: !1, value: e[n++] };
};
}
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
o(p2, "_createForOfIteratorHelperLoose");
function h2(e, t) {
if (e) {
if (typeof e == "string") return cc(e, t);
var r = Object.prototype.toString.call(e).slice(8, -1);
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return cc(e, t);
}
}
o(h2, "_unsupportedIterableToArray");
function cc(e, t) {
(t == null || t > e.length) && (t = e.length);
for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
return n;
}
o(cc, "_arrayLikeToArray");
function m2(e, t, r) {
if (t === void 0 && (t = "320px"), r === void 0 && (r = "1200px"), !Array.isArray(e) && typeof e != "object" || e === null)
throw new B(49);
if (Array.isArray(e)) {
for (var n = {}, a = {}, l = p2(e), c; !(c = l()).done; ) {
var s, d, u = c.value;
if (!u.prop || !u.fromSize || !u.toSize)
throw new B(50);
a[u.prop] = u.fromSize, n["@media (min-width: " + t + ")"] = ee.default({}, n["@media (min-width: " + t + ")"], (s = {}, s[u.prop] =
Wi(u.fromSize, u.toSize, t, r), s)), n["@media (min-width: " + r + ")"] = ee.default({}, n["@media (min-width: " + r + ")"], (d = {},
d[u.prop] = u.toSize, d));
}
return ee.default({}, a, n);
} else {
var f, p, h;
if (!e.prop || !e.fromSize || !e.toSize)
throw new B(51);
return h = {}, h[e.prop] = e.fromSize, h["@media (min-width: " + t + ")"] = (f = {}, f[e.prop] = Wi(e.fromSize, e.toSize, t, r), f), h["\
@media (min-width: " + r + ")"] = (p = {}, p[e.prop] = e.toSize, p), h;
}
}
o(m2, "fluidRange");
var g2 = /^\s*data:([a-z]+\/[a-z-]+(;[a-z-]+=[a-z-]+)?)?(;charset=[a-z0-9-]+)?(;base64)?,[a-z0-9!$&',()*+,;=\-._~:@/?%\s]*\s*$/i, v2 = {
woff: "woff",
woff2: "woff2",
ttf: "truetype",
otf: "opentype",
eot: "embedded-opentype",
svg: "svg",
svgz: "svg"
};
function uc(e, t) {
return t ? ' format("' + v2[e] + '")' : "";
}
o(uc, "generateFormatHint");
function w2(e) {
return !!e.replace(/\s+/g, " ").match(g2);
}
o(w2, "isDataURI");
function b2(e, t, r) {
if (w2(e))
return 'url("' + e + '")' + uc(t[0], r);
var n = t.map(function(a) {
return 'url("' + e + "." + a + '")' + uc(a, r);
});
return n.join(", ");
}
o(b2, "generateFileReferences");
function y2(e) {
var t = e.map(function(r) {
return 'local("' + r + '")';
});
return t.join(", ");
}
o(y2, "generateLocalReferences");
function x2(e, t, r, n) {
var a = [];
return t && a.push(y2(t)), e && a.push(b2(e, r, n)), a.join(", ");
}
o(x2, "generateSources");
function R2(e) {
var t = e.fontFamily, r = e.fontFilePath, n = e.fontStretch, a = e.fontStyle, l = e.fontVariant, c = e.fontWeight, s = e.fileFormats, d = s ===
void 0 ? ["eot", "woff2", "woff", "ttf", "svg"] : s, u = e.formatHint, f = u === void 0 ? !1 : u, p = e.localFonts, h = p === void 0 ? [
t] : p, w = e.unicodeRange, R = e.fontDisplay, g = e.fontVariationSettings, m = e.fontFeatureSettings;
if (!t) throw new B(55);
if (!r && !h)
throw new B(52);
if (h && !Array.isArray(h))
throw new B(53);
if (!Array.isArray(d))
throw new B(54);
var b = {
"@font-face": {
fontFamily: t,
src: x2(r, h, d, f),
unicodeRange: w,
fontStretch: n,
fontStyle: a,
fontVariant: l,
fontWeight: c,
fontDisplay: R,
fontVariationSettings: g,
fontFeatureSettings: m
}
};
return JSON.parse(JSON.stringify(b));
}
o(R2, "fontFace");
function E2() {
return {
textIndent: "101%",
overflow: "hidden",
whiteSpace: "nowrap"
};
}
o(E2, "hideText");
function S2() {
return {
border: "0",
clip: "rect(0 0 0 0)",
height: "1px",
margin: "-1px",
overflow: "hidden",
padding: "0",
position: "absolute",
whiteSpace: "nowrap",
width: "1px"
};
}
o(S2, "hideVisually");
function Rc(e) {
return e === void 0 && (e = 1.3), `
@media only screen and (-webkit-min-device-pixel-ratio: ` + e + `),
only screen and (min--moz-device-pixel-ratio: ` + e + `),
only screen and (-o-min-device-pixel-ratio: ` + e + `/1),
only screen and (min-resolution: ` + Math.round(e * 96) + `dpi),
only screen and (min-resolution: ` + e + `dppx)
`;
}
o(Rc, "hiDPI");
function Ec(e) {
for (var t = "", r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
n[a - 1] = arguments[a];
for (var l = 0; l < e.length; l += 1)
if (t += e[l], l === n.length - 1 && n[l]) {
var c = n.filter(function(s) {
return !!s;
});
c.length > 1 ? (t = t.slice(0, -1), t += ", " + n[l]) : c.length === 1 && (t += "" + n[l]);
} else n[l] && (t += n[l] + " ");
return t.trim();
}
o(Ec, "constructGradientValue");
var dc;
function C2(e) {
var t = e.colorStops, r = e.fallback, n = e.toDirection, a = n === void 0 ? "" : n;
if (!t || t.length < 2)
throw new B(56);
return {
backgroundColor: r || t[0].replace(/,\s+/g, ",").split(" ")[0].replace(/,(?=\S)/g, ", "),
backgroundImage: Ec(dc || (dc = vc.default(["linear-gradient(", "", ")"])), a, t.join(", ").replace(/,(?=\S)/g, ", "))
};
}
o(C2, "linearGradient");
function I2() {
var e;
return [(e = {
html: {
lineHeight: "1.15",
textSizeAdjust: "100%"
},
body: {
margin: "0"
},
main: {
display: "block"
},
h1: {
fontSize: "2em",
margin: "0.67em 0"
},
hr: {
boxSizing: "content-box",
height: "0",
overflow: "visible"
},
pre: {
fontFamily: "monospace, monospace",
fontSize: "1em"
},
a: {
backgroundColor: "transparent"
},
"abbr[title]": {
borderBottom: "none",
textDecoration: "underline"
}
}, e[`b,
strong`] = {
fontWeight: "bolder"
}, e[`code,
kbd,
samp`] = {
fontFamily: "monospace, monospace",
fontSize: "1em"
}, e.small = {
fontSize: "80%"
}, e[`sub,
sup`] = {
fontSize: "75%",
lineHeight: "0",
position: "relative",
verticalAlign: "baseline"
}, e.sub = {
bottom: "-0.25em"
}, e.sup = {
top: "-0.5em"
}, e.img = {
borderStyle: "none"
}, e[`button,
input,
optgroup,
select,
textarea`] = {
fontFamily: "inherit",
fontSize: "100%",
lineHeight: "1.15",
margin: "0"
}, e[`button,
input`] = {
overflow: "visible"
}, e[`button,
select`] = {
textTransform: "none"
}, e[`button,
html [type="button"],
[type="reset"],
[type="submit"]`] = {
WebkitAppearance: "button"
}, e[`button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner`] = {
borderStyle: "none",
padding: "0"
}, e[`button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring`] = {
outline: "1px dotted ButtonText"
}, e.fieldset = {
padding: "0.35em 0.625em 0.75em"
}, e.legend = {
boxSizing: "border-box",
color: "inherit",
display: "table",
maxWidth: "100%",
padding: "0",
whiteSpace: "normal"
}, e.progress = {
verticalAlign: "baseline"
}, e.textarea = {
overflow: "auto"
}, e[`[type="checkbox"],
[type="radio"]`] = {
boxSizing: "border-box",
padding: "0"
}, e[`[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button`] = {
height: "auto"
}, e['[type="search"]'] = {
WebkitAppearance: "textfield",
outlineOffset: "-2px"
}, e['[type="search"]::-webkit-search-decoration'] = {
WebkitAppearance: "none"
}, e["::-webkit-file-upload-button"] = {
WebkitAppearance: "button",
font: "inherit"
}, e.details = {
display: "block"
}, e.summary = {
display: "list-item"
}, e.template = {
display: "none"
}, e["[hidden]"] = {
display: "none"
}, e), {
"abbr[title]": {
textDecoration: "underline dotted"
}
}];
}
o(I2, "normalize");
var fc;
function A2(e) {
var t = e.colorStops, r = e.extent, n = r === void 0 ? "" : r, a = e.fallback, l = e.position, c = l === void 0 ? "" : l, s = e.shape, d = s ===
void 0 ? "" : s;
if (!t || t.length < 2)
throw new B(57);
return {
backgroundColor: a || t[0].split(" ")[0],
backgroundImage: Ec(fc || (fc = vc.default(["radial-gradient(", "", "", "", ")"])), c, d, n, t.join(", "))
};
}
o(A2, "radialGradient");
function M2(e, t, r, n, a) {
var l;
if (r === void 0 && (r = "png"), a === void 0 && (a = "_2x"), !e)
throw new B(58);
var c = r.replace(/^\./, ""), s = n ? n + "." + c : "" + e + a + "." + c;
return l = {
backgroundImage: "url(" + e + "." + c + ")"
}, l[Rc()] = ee.default({
backgroundImage: "url(" + s + ")"
}, t ? {
backgroundSize: t
} : {}), l;
}
o(M2, "retinaImage");
var L2 = {
easeInBack: "cubic-bezier(0.600, -0.280, 0.735, 0.045)",
easeInCirc: "cubic-bezier(0.600, 0.040, 0.980, 0.335)",
easeInCubic: "cubic-bezier(0.550, 0.055, 0.675, 0.190)",
easeInExpo: "cubic-bezier(0.950, 0.050, 0.795, 0.035)",
easeInQuad: "cubic-bezier(0.550, 0.085, 0.680, 0.530)",
easeInQuart: "cubic-bezier(0.895, 0.030, 0.685, 0.220)",
easeInQuint: "cubic-bezier(0.755, 0.050, 0.855, 0.060)",
easeInSine: "cubic-bezier(0.470, 0.000, 0.745, 0.715)",
easeOutBack: "cubic-bezier(0.175, 0.885, 0.320, 1.275)",
easeOutCubic: "cubic-bezier(0.215, 0.610, 0.355, 1.000)",
easeOutCirc: "cubic-bezier(0.075, 0.820, 0.165, 1.000)",
easeOutExpo: "cubic-bezier(0.190, 1.000, 0.220, 1.000)",
easeOutQuad: "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
easeOutQuart: "cubic-bezier(0.165, 0.840, 0.440, 1.000)",
easeOutQuint: "cubic-bezier(0.230, 1.000, 0.320, 1.000)",
easeOutSine: "cubic-bezier(0.390, 0.575, 0.565, 1.000)",
easeInOutBack: "cubic-bezier(0.680, -0.550, 0.265, 1.550)",
easeInOutCirc: "cubic-bezier(0.785, 0.135, 0.150, 0.860)",
easeInOutCubic: "cubic-bezier(0.645, 0.045, 0.355, 1.000)",
easeInOutExpo: "cubic-bezier(1.000, 0.000, 0.000, 1.000)",
easeInOutQuad: "cubic-bezier(0.455, 0.030, 0.515, 0.955)",
easeInOutQuart: "cubic-bezier(0.770, 0.000, 0.175, 1.000)",
easeInOutQuint: "cubic-bezier(0.860, 0.000, 0.070, 1.000)",
easeInOutSine: "cubic-bezier(0.445, 0.050, 0.550, 0.950)"
};
function T2(e) {
return L2[e];
}
o(T2, "getTimingFunction");
function P2(e) {
return T2(e);
}
o(P2, "timingFunctions");
var z2 = /* @__PURE__ */ o(function(t, r, n) {
var a = "" + n[0] + (n[1] || ""), l = "" + n[0] / 2 + (n[1] || ""), c = "" + r[0] + (r[1] || ""), s = "" + r[0] / 2 + (r[1] || "");
switch (t) {
case "top":
return "0 " + l + " " + c + " " + l;
case "topLeft":
return a + " " + c + " 0 0";
case "left":
return s + " " + a + " " + s + " 0";
case "bottomLeft":
return a + " 0 0 " + c;
case "bottom":
return c + " " + l + " 0 " + l;
case "bottomRight":
return "0 0 " + a + " " + c;
case "right":
return s + " 0 " + s + " " + a;
case "topRight":
default:
return "0 " + a + " " + c + " 0";
}
}, "getBorderWidth"), k2 = /* @__PURE__ */ o(function(t, r) {
switch (t) {
case "top":
case "bottomRight":
return {
borderBottomColor: r
};
case "right":
case "bottomLeft":
return {
borderLeftColor: r
};
case "bottom":
case "topLeft":
return {
borderTopColor: r
};
case "left":
case "topRight":
return {
borderRightColor: r
};
default:
throw new B(59);
}
}, "getBorderColor");
function H2(e) {
var t = e.pointingDirection, r = e.height, n = e.width, a = e.foregroundColor, l = e.backgroundColor, c = l === void 0 ? "transparent" :
l, s = ft(n), d = ft(r);
if (isNaN(d[0]) || isNaN(s[0]))
throw new B(60);
return ee.default({
width: "0",
height: "0",
borderColor: c
}, k2(t, a), {
borderStyle: "solid",
borderWidth: z2(t, d, s)
});
}
o(H2, "triangle");
function O2(e) {
e === void 0 && (e = "break-word");
var t = e === "break-word" ? "break-all" : e;
return {
overflowWrap: e,
wordWrap: e,
wordBreak: t
};
}
o(O2, "wordWrap");
function Fi(e) {
return Math.round(e * 255);
}
o(Fi, "colorToInt");
function B2(e, t, r) {
return Fi(e) + "," + Fi(t) + "," + Fi(r);
}
o(B2, "convertToInt");
function bn(e, t, r, n) {
if (n === void 0 && (n = B2), t === 0)
return n(r, r, r);
var a = (e % 360 + 360) % 360 / 60, l = (1 - Math.abs(2 * r - 1)) * t, c = l * (1 - Math.abs(a % 2 - 1)), s = 0, d = 0, u = 0;
a >= 0 && a < 1 ? (s = l, d = c) : a >= 1 && a < 2 ? (s = c, d = l) : a >= 2 && a < 3 ? (d = l, u = c) : a >= 3 && a < 4 ? (d = c, u = l) :
a >= 4 && a < 5 ? (s = c, u = l) : a >= 5 && a < 6 && (s = l, u = c);
var f = r - l / 2, p = s + f, h = d + f, w = u + f;
return n(p, h, w);
}
o(bn, "hslToRgb");
var pc = {
aliceblue: "f0f8ff",
antiquewhite: "faebd7",
aqua: "00ffff",
aquamarine: "7fffd4",
azure: "f0ffff",
beige: "f5f5dc",
bisque: "ffe4c4",
black: "000",
blanchedalmond: "ffebcd",
blue: "0000ff",
blueviolet: "8a2be2",
brown: "a52a2a",
burlywood: "deb887",
cadetblue: "5f9ea0",
chartreuse: "7fff00",
chocolate: "d2691e",
coral: "ff7f50",
cornflowerblue: "6495ed",
cornsilk: "fff8dc",
crimson: "dc143c",
cyan: "00ffff",
darkblue: "00008b",
darkcyan: "008b8b",
darkgoldenrod: "b8860b",
darkgray: "a9a9a9",
darkgreen: "006400",
darkgrey: "a9a9a9",
darkkhaki: "bdb76b",
darkmagenta: "8b008b",
darkolivegreen: "556b2f",
darkorange: "ff8c00",
darkorchid: "9932cc",
darkred: "8b0000",
darksalmon: "e9967a",
darkseagreen: "8fbc8f",
darkslateblue: "483d8b",
darkslategray: "2f4f4f",
darkslategrey: "2f4f4f",
darkturquoise: "00ced1",
darkviolet: "9400d3",
deeppink: "ff1493",
deepskyblue: "00bfff",
dimgray: "696969",
dimgrey: "696969",
dodgerblue: "1e90ff",
firebrick: "b22222",
floralwhite: "fffaf0",
forestgreen: "228b22",
fuchsia: "ff00ff",
gainsboro: "dcdcdc",
ghostwhite: "f8f8ff",
gold: "ffd700",
goldenrod: "daa520",
gray: "808080",
green: "008000",
greenyellow: "adff2f",
grey: "808080",
honeydew: "f0fff0",
hotpink: "ff69b4",
indianred: "cd5c5c",
indigo: "4b0082",
ivory: "fffff0",
khaki: "f0e68c",
lavender: "e6e6fa",
lavenderblush: "fff0f5",
lawngreen: "7cfc00",
lemonchiffon: "fffacd",
lightblue: "add8e6",
lightcoral: "f08080",
lightcyan: "e0ffff",
lightgoldenrodyellow: "fafad2",
lightgray: "d3d3d3",
lightgreen: "90ee90",
lightgrey: "d3d3d3",
lightpink: "ffb6c1",
lightsalmon: "ffa07a",
lightseagreen: "20b2aa",
lightskyblue: "87cefa",
lightslategray: "789",
lightslategrey: "789",
lightsteelblue: "b0c4de",
lightyellow: "ffffe0",
lime: "0f0",
limegreen: "32cd32",
linen: "faf0e6",
magenta: "f0f",
maroon: "800000",
mediumaquamarine: "66cdaa",
mediumblue: "0000cd",
mediumorchid: "ba55d3",
mediumpurple: "9370db",
mediumseagreen: "3cb371",
mediumslateblue: "7b68ee",
mediumspringgreen: "00fa9a",
mediumturquoise: "48d1cc",
mediumvioletred: "c71585",
midnightblue: "191970",
mintcream: "f5fffa",
mistyrose: "ffe4e1",
moccasin: "ffe4b5",
navajowhite: "ffdead",
navy: "000080",
oldlace: "fdf5e6",
olive: "808000",
olivedrab: "6b8e23",
orange: "ffa500",
orangered: "ff4500",
orchid: "da70d6",
palegoldenrod: "eee8aa",
palegreen: "98fb98",
paleturquoise: "afeeee",
palevioletred: "db7093",
papayawhip: "ffefd5",
peachpuff: "ffdab9",
peru: "cd853f",
pink: "ffc0cb",
plum: "dda0dd",
powderblue: "b0e0e6",
purple: "800080",
rebeccapurple: "639",
red: "f00",
rosybrown: "bc8f8f",
royalblue: "4169e1",
saddlebrown: "8b4513",
salmon: "fa8072",
sandybrown: "f4a460",
seagreen: "2e8b57",
seashell: "fff5ee",
sienna: "a0522d",
silver: "c0c0c0",
skyblue: "87ceeb",
slateblue: "6a5acd",
slategray: "708090",
slategrey: "708090",
snow: "fffafa",
springgreen: "00ff7f",
steelblue: "4682b4",
tan: "d2b48c",
teal: "008080",
thistle: "d8bfd8",
tomato: "ff6347",
turquoise: "40e0d0",
violet: "ee82ee",
wheat: "f5deb3",
white: "fff",
whitesmoke: "f5f5f5",
yellow: "ff0",
yellowgreen: "9acd32"
};
function _2(e) {
if (typeof e != "string") return e;
var t = e.toLowerCase();
return pc[t] ? "#" + pc[t] : e;
}
o(_2, "nameToHex");
var D2 = /^#[a-fA-F0-9]{6}$/, N2 = /^#[a-fA-F0-9]{8}$/, F2 = /^#[a-fA-F0-9]{3}$/, q2 = /^#[a-fA-F0-9]{4}$/, qi = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,
V2 = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, j2 = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,
$2 = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
function At(e) {
if (typeof e != "string")
throw new B(3);
var t = _2(e);
if (t.match(D2))
return {
red: parseInt("" + t[1] + t[2], 16),
green: parseInt("" + t[3] + t[4], 16),
blue: parseInt("" + t[5] + t[6], 16)
};
if (t.match(N2)) {
var r = parseFloat((parseInt("" + t[7] + t[8], 16) / 255).toFixed(2));
return {
red: parseInt("" + t[1] + t[2], 16),
green: parseInt("" + t[3] + t[4], 16),
blue: parseInt("" + t[5] + t[6], 16),
alpha: r
};
}
if (t.match(F2))
return {
red: parseInt("" + t[1] + t[1], 16),
green: parseInt("" + t[2] + t[2], 16),
blue: parseInt("" + t[3] + t[3], 16)
};
if (t.match(q2)) {
var n = parseFloat((parseInt("" + t[4] + t[4], 16) / 255).toFixed(2));
return {
red: parseInt("" + t[1] + t[1], 16),
green: parseInt("" + t[2] + t[2], 16),
blue: parseInt("" + t[3] + t[3], 16),
alpha: n
};
}
var a = qi.exec(t);
if (a)
return {
red: parseInt("" + a[1], 10),
green: parseInt("" + a[2], 10),
blue: parseInt("" + a[3], 10)
};
var l = V2.exec(t.substring(0, 50));
if (l)
return {
red: parseInt("" + l[1], 10),
green: parseInt("" + l[2], 10),
blue: parseInt("" + l[3], 10),
alpha: parseFloat("" + l[4]) > 1 ? parseFloat("" + l[4]) / 100 : parseFloat("" + l[4])
};
var c = j2.exec(t);
if (c) {
var s = parseInt("" + c[1], 10), d = parseInt("" + c[2], 10) / 100, u = parseInt("" + c[3], 10) / 100, f = "rgb(" + bn(s, d, u) + ")",
p = qi.exec(f);
if (!p)
throw new B(4, t, f);
return {
red: parseInt("" + p[1], 10),
green: parseInt("" + p[2], 10),
blue: parseInt("" + p[3], 10)
};
}
var h = $2.exec(t.substring(0, 50));
if (h) {
var w = parseInt("" + h[1], 10), R = parseInt("" + h[2], 10) / 100, g = parseInt("" + h[3], 10) / 100, m = "rgb(" + bn(w, R, g) + ")",
b = qi.exec(m);
if (!b)
throw new B(4, t, m);
return {
red: parseInt("" + b[1], 10),
green: parseInt("" + b[2], 10),
blue: parseInt("" + b[3], 10),
alpha: parseFloat("" + h[4]) > 1 ? parseFloat("" + h[4]) / 100 : parseFloat("" + h[4])
};
}
throw new B(5);
}
o(At, "parseToRgb");
function W2(e) {
var t = e.red / 255, r = e.green / 255, n = e.blue / 255, a = Math.max(t, r, n), l = Math.min(t, r, n), c = (a + l) / 2;
if (a === l)
return e.alpha !== void 0 ? {
hue: 0,
saturation: 0,
lightness: c,
alpha: e.alpha
} : {
hue: 0,
saturation: 0,
lightness: c
};
var s, d = a - l, u = c > 0.5 ? d / (2 - a - l) : d / (a + l);
switch (a) {
case t:
s = (r - n) / d + (r < n ? 6 : 0);
break;
case r:
s = (n - t) / d + 2;
break;
default:
s = (t - r) / d + 4;
break;
}
return s *= 60, e.alpha !== void 0 ? {
hue: s,
saturation: u,
lightness: c,
alpha: e.alpha
} : {
hue: s,
saturation: u,
lig