@mkbabb/value.js 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/value.js CHANGED
@@ -1,8 +1,8 @@
1
- const ee = 16.666666666666668, sn = (e) => !!e && e.constructor === Object;
2
- function K(e) {
3
- return sn(e) ? Object.entries(e).map(([t, n]) => [t, K(n)]).reduce((t, [n, r]) => (t[n] = r, t), {}) : e != null && typeof e.clone == "function" ? e.clone() : Array.isArray(e) ? e.map(K) : e;
1
+ const he = 16.666666666666668, Jn = (e) => !!e && e.constructor === Object;
2
+ function tt(e) {
3
+ return Jn(e) ? Object.entries(e).map(([t, n]) => [t, tt(n)]).reduce((t, [n, r]) => (t[n] = r, t), {}) : e != null && typeof e.clone == "function" ? e.clone() : Array.isArray(e) ? e.map(tt) : e;
4
4
  }
5
- const vs = (e, t) => {
5
+ const Ji = (e, t) => {
6
6
  if (!e || !t || e.length !== t.length)
7
7
  return !1;
8
8
  for (let n = 0; n < e.length; n++)
@@ -10,10 +10,10 @@ const vs = (e, t) => {
10
10
  return !1;
11
11
  return !0;
12
12
  };
13
- async function Ms(e) {
13
+ async function Qi(e) {
14
14
  return await new Promise((t) => setTimeout(t, e));
15
15
  }
16
- async function Bs(e, t = ee) {
16
+ async function ta(e, t = he) {
17
17
  return await new Promise((n) => {
18
18
  const r = setInterval(() => {
19
19
  if (e())
@@ -21,7 +21,7 @@ async function Bs(e, t = ee) {
21
21
  }, t);
22
22
  });
23
23
  }
24
- function Es(e, t = 100, n = !1) {
24
+ function ea(e, t = 100, n = !1) {
25
25
  let r = null;
26
26
  const o = function(...s) {
27
27
  const i = this, a = function() {
@@ -33,11 +33,11 @@ function Es(e, t = 100, n = !1) {
33
33
  r && (clearTimeout(r), r = null);
34
34
  }, o;
35
35
  }
36
- async function As(e, t) {
36
+ async function na(e, t) {
37
37
  const n = new TextEncoder().encode(t), r = await crypto.subtle.digest(e, n);
38
38
  return Array.from(new Uint8Array(r)).map((s) => s.toString(16).padStart(2, "0")).join("");
39
39
  }
40
- function _t(e, t = {}) {
40
+ function Xt(e, t = {}) {
41
41
  const n = /* @__PURE__ */ new Map(), { maxCacheSize: r = 1 / 0, ttl: o = 1 / 0, keyFn: s = JSON.stringify } = t, i = function(...a) {
42
42
  const c = s.apply(this, a), l = Date.now();
43
43
  if (n.has(c)) {
@@ -46,42 +46,42 @@ function _t(e, t = {}) {
46
46
  return u.value;
47
47
  n.delete(c);
48
48
  }
49
- const m = e.apply(this, a);
50
- if (n.set(c, { value: m, timestamp: l }), n.size > r) {
49
+ const p = e.apply(this, a);
50
+ if (n.set(c, { value: p, timestamp: l }), n.size > r) {
51
51
  const u = n.keys().next().value;
52
52
  n.delete(u);
53
53
  }
54
- return m;
54
+ return p;
55
55
  };
56
56
  return i.cache = n, i;
57
57
  }
58
- const Is = (e) => e.replace(
58
+ const ra = (e) => e.replace(
59
59
  /([-_][a-z])/gi,
60
60
  (t) => t.toUpperCase().replace("-", "").replace("_", "")
61
61
  );
62
- function Rs(e) {
62
+ function oa(e) {
63
63
  return e.replace(/([A-Z])/g, (t) => `-${t[0].toLowerCase()}`);
64
64
  }
65
- function Ps(e, t, n) {
65
+ function sa(e, t, n) {
66
66
  for (let r = e - 1; r >= 0; r--)
67
67
  if (n(t[r]))
68
68
  return r;
69
69
  }
70
- function Os(e) {
70
+ function ia(e) {
71
71
  if (typeof window < "u" && window.requestAnimationFrame)
72
72
  return window.requestAnimationFrame(e);
73
- let t = ee, n = Date.now();
73
+ let t = he, n = Date.now();
74
74
  return setTimeout(() => {
75
75
  let r = Date.now(), o = r - n;
76
- n = r, t = Math.max(0, ee - o), e(r);
76
+ n = r, t = Math.max(0, he - o), e(r);
77
77
  }, t);
78
78
  }
79
- function Ns(e) {
79
+ function aa(e) {
80
80
  if (typeof window < "u" && window.cancelAnimationFrame)
81
81
  return window.cancelAnimationFrame(e);
82
82
  clearTimeout(e);
83
83
  }
84
- const an = ["px", "cm", "mm", "Q", "in", "pc", "pt"], cn = [
84
+ const Qn = ["px", "cm", "mm", "Q", "in", "pc", "pt"], tr = [
85
85
  "em",
86
86
  "ex",
87
87
  "ch",
@@ -100,21 +100,21 @@ const an = ["px", "cm", "mm", "Q", "in", "pc", "pt"], cn = [
100
100
  "lvh",
101
101
  "dvw",
102
102
  "dvh"
103
- ], Mt = [
104
- ...an,
105
- ...cn
106
- ], Bt = ["s", "ms"], Et = ["deg", "rad", "grad", "turn"], ln = ["%"], At = ["dpi", "dpcm", "dppx", "cqw"], ne = ["var", "calc"], ir = ["string"], ar = ["color"], zs = [
107
- ...Mt,
108
- ...Bt,
109
- ...Et,
110
- ...ln,
111
- ...At,
112
- ...ne,
113
- ...ir,
114
- ...ar,
103
+ ], Pt = [
104
+ ...Qn,
105
+ ...tr
106
+ ], Ot = ["s", "ms"], Lt = ["deg", "rad", "grad", "turn"], er = ["%"], zt = ["dpi", "dpcm", "dppx", "cqw"], fe = ["var", "calc"], oo = ["string"], so = ["color"], ca = [
107
+ ...Pt,
108
+ ...Ot,
109
+ ...Lt,
110
+ ...er,
111
+ ...zt,
112
+ ...fe,
113
+ ...oo,
114
+ ...so,
115
115
  "",
116
116
  void 0
117
- ], cr = ["string", "var", "calc"], lr = [
117
+ ], io = ["string", "var", "calc"], ao = [
118
118
  "accentColor",
119
119
  "additiveSymbols",
120
120
  "alignContent",
@@ -746,8 +746,8 @@ const an = ["px", "cm", "mm", "Q", "in", "pc", "pt"], cn = [
746
746
  "y",
747
747
  "zIndex",
748
748
  "zoom"
749
- ], Ye = (e, t = 2) => typeof e == "number" && Number.isNaN(e) ? "none" : String(e?.toFixed?.(t) ?? e).trim().replace(/\.0+$/, ""), je = (e, t, n) => `${e}(${t.join(" ")} / ${n})`;
750
- let U = class {
749
+ ], ln = (e, t = 2) => typeof e == "number" && Number.isNaN(e) ? "none" : String(e?.toFixed?.(t) ?? e).trim().replace(/\.0+$/, ""), un = (e, t, n) => `${e}(${t.join(" ")} / ${n})`;
750
+ let V = class {
751
751
  constructor(t, n = 1) {
752
752
  this.colorSpace = t, this.alpha = n, this.components = /* @__PURE__ */ new Map();
753
753
  }
@@ -756,13 +756,13 @@ let U = class {
756
756
  const t = Array.from(this.components.values()).map(
757
757
  (r) => typeof r == "number" && Number.isNaN(r) ? "none" : r
758
758
  ), n = typeof this.alpha == "number" && Number.isNaN(this.alpha) ? "none" : this.alpha;
759
- return je(this.colorSpace, t, n);
759
+ return un(this.colorSpace, t, n);
760
760
  }
761
761
  toFormattedString(t = 2) {
762
762
  const n = Array.from(this.components.values()).map(
763
- (o) => Ye(o, t)
764
- ), r = Ye(this.alpha, t);
765
- return je(this.colorSpace, n, r);
763
+ (o) => ln(o, t)
764
+ ), r = ln(this.alpha, t);
765
+ return un(this.colorSpace, n, r);
766
766
  }
767
767
  valueOf() {
768
768
  return [...this.values(), this.alpha];
@@ -775,8 +775,8 @@ let U = class {
775
775
  }
776
776
  clone() {
777
777
  const t = this.constructor, n = new t();
778
- return n.alpha = K(this.alpha), this.components.forEach((r, o) => {
779
- n.components.set(o, K(r));
778
+ return n.alpha = tt(this.alpha), this.components.forEach((r, o) => {
779
+ n.components.set(o, tt(r));
780
780
  }), n;
781
781
  }
782
782
  keys() {
@@ -795,12 +795,12 @@ let U = class {
795
795
  this.components.set(t, n);
796
796
  }
797
797
  };
798
- class me extends U {
798
+ class xe extends V {
799
799
  constructor(t, n, r) {
800
800
  super(t, n), this.whitePoint = r;
801
801
  }
802
802
  }
803
- class $ extends U {
803
+ class O extends V {
804
804
  constructor(t, n, r, o) {
805
805
  super("rgb", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
806
806
  }
@@ -823,7 +823,7 @@ class $ extends U {
823
823
  this.setComponent("b", t);
824
824
  }
825
825
  }
826
- class St extends U {
826
+ class yt extends V {
827
827
  constructor(t, n, r, o) {
828
828
  super("hsl", o), this.components.set("h", t), this.components.set("s", n), this.components.set("l", r);
829
829
  }
@@ -846,7 +846,7 @@ class St extends U {
846
846
  this.setComponent("l", t);
847
847
  }
848
848
  }
849
- class pe extends U {
849
+ class Te extends V {
850
850
  constructor(t, n, r, o) {
851
851
  super("hsv", o), this.components.set("h", t), this.components.set("s", n), this.components.set("v", r);
852
852
  }
@@ -869,7 +869,7 @@ class pe extends U {
869
869
  this.setComponent("v", t);
870
870
  }
871
871
  }
872
- class he extends U {
872
+ class Ee extends V {
873
873
  constructor(t, n, r, o) {
874
874
  super("hwb", o), this.components.set("h", t), this.components.set("w", n), this.components.set("b", r);
875
875
  }
@@ -892,7 +892,7 @@ class he extends U {
892
892
  this.setComponent("b", t);
893
893
  }
894
894
  }
895
- class Lt extends me {
895
+ class Wt extends xe {
896
896
  constructor(t, n, r, o) {
897
897
  super("lab", o, "D50"), this.components.set("l", t), this.components.set("a", n), this.components.set("b", r);
898
898
  }
@@ -915,7 +915,7 @@ class Lt extends me {
915
915
  this.setComponent("b", t);
916
916
  }
917
917
  }
918
- class fe extends U {
918
+ class Ae extends V {
919
919
  constructor(t, n, r, o) {
920
920
  super("lch", o), this.components.set("l", t), this.components.set("c", n), this.components.set("h", r);
921
921
  }
@@ -938,7 +938,7 @@ class fe extends U {
938
938
  this.setComponent("h", t);
939
939
  }
940
940
  }
941
- class $t extends me {
941
+ class Ht extends xe {
942
942
  constructor(t, n, r, o) {
943
943
  super("oklab", o, "D50"), this.components.set("l", t), this.components.set("a", n), this.components.set("b", r);
944
944
  }
@@ -961,7 +961,7 @@ class $t extends me {
961
961
  this.setComponent("b", t);
962
962
  }
963
963
  }
964
- class be extends U {
964
+ class Me extends V {
965
965
  constructor(t, n, r, o) {
966
966
  super("oklch", o), this.components.set("l", t), this.components.set("c", n), this.components.set("h", r);
967
967
  }
@@ -984,7 +984,7 @@ class be extends U {
984
984
  this.setComponent("h", t);
985
985
  }
986
986
  }
987
- class D extends me {
987
+ class U extends xe {
988
988
  constructor(t, n, r, o) {
989
989
  super("xyz", o, "D65"), this.components.set("x", t), this.components.set("y", n), this.components.set("z", r);
990
990
  }
@@ -1007,7 +1007,7 @@ class D extends me {
1007
1007
  this.setComponent("z", t);
1008
1008
  }
1009
1009
  }
1010
- class un extends U {
1010
+ class nr extends V {
1011
1011
  constructor(t, n) {
1012
1012
  super("kelvin", n), this.components.set("kelvin", t);
1013
1013
  }
@@ -1018,7 +1018,7 @@ class un extends U {
1018
1018
  this.setComponent("kelvin", t);
1019
1019
  }
1020
1020
  }
1021
- class de extends U {
1021
+ class Ie extends V {
1022
1022
  constructor(t, n, r, o) {
1023
1023
  super("srgb-linear", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
1024
1024
  }
@@ -1041,7 +1041,7 @@ class de extends U {
1041
1041
  this.setComponent("b", t);
1042
1042
  }
1043
1043
  }
1044
- class ge extends U {
1044
+ class Re extends V {
1045
1045
  constructor(t, n, r, o) {
1046
1046
  super("display-p3", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
1047
1047
  }
@@ -1064,7 +1064,7 @@ class ge extends U {
1064
1064
  this.setComponent("b", t);
1065
1065
  }
1066
1066
  }
1067
- class we extends U {
1067
+ class ve extends V {
1068
1068
  constructor(t, n, r, o) {
1069
1069
  super("a98-rgb", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
1070
1070
  }
@@ -1087,7 +1087,7 @@ class we extends U {
1087
1087
  this.setComponent("b", t);
1088
1088
  }
1089
1089
  }
1090
- class ke extends U {
1090
+ class Be extends V {
1091
1091
  constructor(t, n, r, o) {
1092
1092
  super("prophoto-rgb", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
1093
1093
  }
@@ -1110,7 +1110,7 @@ class ke extends U {
1110
1110
  this.setComponent("b", t);
1111
1111
  }
1112
1112
  }
1113
- class ye extends U {
1113
+ class Ne extends V {
1114
1114
  constructor(t, n, r, o) {
1115
1115
  super("rec2020", o), this.components.set("r", t), this.components.set("g", n), this.components.set("b", r);
1116
1116
  }
@@ -1133,19 +1133,19 @@ class ye extends U {
1133
1133
  this.setComponent("b", t);
1134
1134
  }
1135
1135
  }
1136
- function re(e) {
1136
+ function be(e) {
1137
1137
  return e.unit === "color";
1138
1138
  }
1139
- const Ls = (e) => {
1139
+ const ua = (e) => {
1140
1140
  const t = {}, n = (r, o = void 0) => {
1141
1141
  if (Array.isArray(r)) {
1142
1142
  r.forEach((i, a) => n(i, o));
1143
1143
  return;
1144
- } else if (r instanceof at) {
1144
+ } else if (r instanceof mt) {
1145
1145
  let i = r.name;
1146
1146
  o && (o.endsWith(r.name) ? i = o : i = `${o}.${r.name}`), r.values.forEach((a, c) => n(a, i));
1147
1147
  return;
1148
- } else if (sn(r)) {
1148
+ } else if (Jn(r)) {
1149
1149
  for (const [i, a] of Object.entries(r)) {
1150
1150
  const c = o ? `${o}.${i}` : i;
1151
1151
  n(a, c);
@@ -1153,10 +1153,10 @@ const Ls = (e) => {
1153
1153
  return;
1154
1154
  }
1155
1155
  const s = o;
1156
- t[s] == null && (t[s] = new xt()), t[s].push(r), t[s] = t[s].flat();
1156
+ t[s] == null && (t[s] = new vt()), t[s].push(r), t[s] = t[s].flat();
1157
1157
  };
1158
1158
  return n(e), t;
1159
- }, $s = (e) => {
1159
+ }, pa = (e) => {
1160
1160
  const t = {};
1161
1161
  for (const [n, r] of Object.entries(e)) {
1162
1162
  const o = n.split(".");
@@ -1167,22 +1167,22 @@ const Ls = (e) => {
1167
1167
  }
1168
1168
  }
1169
1169
  return t;
1170
- }, Fs = (e) => {
1170
+ }, ma = (e) => {
1171
1171
  const t = {};
1172
1172
  for (const [n, r] of Object.entries(e)) {
1173
1173
  const o = n.split("."), s = o[0];
1174
1174
  let i = t[s] ?? "", a = "", c = "";
1175
- for (let m = 1; m < o.length; m++)
1176
- a += `${o[m]}(`, c += ")";
1175
+ for (let p = 1; p < o.length; p++)
1176
+ a += `${o[p]}(`, c += ")";
1177
1177
  let l = "";
1178
1178
  o.length > 1 && Array.isArray(r) ? l = r.join(", ") : l = r.toString(), i += ` ${a}${l}${c}`, t[s] = i.trim();
1179
1179
  }
1180
1180
  return t;
1181
- }, ur = new Set(lr);
1182
- function Ds(e) {
1183
- return ur.has(e);
1181
+ }, co = new Set(ao);
1182
+ function ha(e) {
1183
+ return co.has(e);
1184
1184
  }
1185
- const mr = (e) => {
1185
+ const lo = (e) => {
1186
1186
  const t = e.name, n = e.valueOf();
1187
1187
  if (!e.name.startsWith("matrix"))
1188
1188
  throw new Error("Input must be a matrix or matrix3d value");
@@ -1253,11 +1253,11 @@ const mr = (e) => {
1253
1253
  }
1254
1254
  throw new Error("Unsupported matrix type or invalid number of values");
1255
1255
  };
1256
- function pr(e, t) {
1256
+ function uo(e, t) {
1257
1257
  let n = e;
1258
1258
  return t === "cm" ? n *= 96 / 2.54 : t === "mm" ? n *= 96 / 25.4 : t === "in" ? n *= 96 : t === "pt" ? n *= 4 / 3 : t === "pc" && (n *= 16), n;
1259
1259
  }
1260
- function mn(e, t, n, r) {
1260
+ function rr(e, t, n, r) {
1261
1261
  if (t === "em" && n)
1262
1262
  e *= parseFloat(getComputedStyle(n).fontSize);
1263
1263
  else if (t === "rem")
@@ -1275,35 +1275,35 @@ function mn(e, t, n, r) {
1275
1275
  getComputedStyle(n.parentElement).getPropertyValue(r)
1276
1276
  );
1277
1277
  e = e / 100 * o;
1278
- } else t === "ex" || t === "ch" ? e *= parseFloat(getComputedStyle(n).fontSize) ?? 16 : e = pr(e, t);
1278
+ } else t === "ex" || t === "ch" ? e *= parseFloat(getComputedStyle(n).fontSize) ?? 16 : e = uo(e, t);
1279
1279
  return e;
1280
1280
  }
1281
- function pn(e, t) {
1281
+ function or(e, t) {
1282
1282
  return t === "s" && (e *= 1e3), e;
1283
1283
  }
1284
- function Se(e, t) {
1284
+ function _e(e, t) {
1285
1285
  return t === "grad" ? e *= 0.9 : t === "rad" ? e *= 180 / Math.PI : t === "turn" && (e *= 360), e;
1286
1286
  }
1287
- function hn(e, t) {
1287
+ function sr(e, t) {
1288
1288
  return t === "dpcm" ? e *= 2.54 : t === "dppx" && (e *= 96), e;
1289
1289
  }
1290
- const hr = {
1291
- length: mn,
1292
- time: pn,
1293
- angle: Se,
1294
- resolution: hn
1290
+ const po = {
1291
+ length: rr,
1292
+ time: or,
1293
+ angle: _e,
1294
+ resolution: sr
1295
1295
  };
1296
- function Ze(e) {
1297
- return Mt.includes(e) ? [Mt, "length"] : Bt.includes(e) ? [Bt, "time"] : Et.includes(e) ? [Et, "angle"] : At.includes(e) ? [At, "resolution"] : null;
1296
+ function pn(e) {
1297
+ return Pt.includes(e) ? [Pt, "length"] : Ot.includes(e) ? [Ot, "time"] : Lt.includes(e) ? [Lt, "angle"] : zt.includes(e) ? [zt, "resolution"] : null;
1298
1298
  }
1299
- function Gs(e, t, n, r) {
1300
- const o = Ze(t), s = Ze(n);
1299
+ function fa(e, t, n, r) {
1300
+ const o = pn(t), s = pn(n);
1301
1301
  if (!o || !s || o[1] !== s[1])
1302
1302
  throw new Error(`Incompatible units: ${t} and ${n}`);
1303
- const [, i] = o, a = hr[i], c = a(e, t, r), l = a(1, n, r);
1303
+ const [, i] = o, a = po[i], c = a(e, t, r), l = a(1, n, r);
1304
1304
  return c / l;
1305
1305
  }
1306
- class k {
1306
+ class S {
1307
1307
  constructor(t, n, r, o, s, i) {
1308
1308
  this.value = t, this.unit = n, this.superType = r, this.subProperty = o, this.property = s, this.targets = i;
1309
1309
  }
@@ -1323,36 +1323,36 @@ class k {
1323
1323
  this.value = t;
1324
1324
  }
1325
1325
  toString() {
1326
- return this.value == null ? "" : this.unit == null || this.unit === "string" ? `${this.value}` : re(this) ? this.value.toString() : this.unit === "var" ? `var(${this.value})` : this.unit === "calc" ? `calc(${this.value})` : `${this.value}${this.unit}`;
1326
+ return this.value == null ? "" : this.unit == null || this.unit === "string" ? `${this.value}` : be(this) ? this.value.toString() : this.unit === "var" ? `var(${this.value})` : this.unit === "calc" ? `calc(${this.value})` : `${this.value}${this.unit}`;
1327
1327
  }
1328
1328
  toJSON() {
1329
1329
  return this.valueOf();
1330
1330
  }
1331
1331
  toFixed(t = 2) {
1332
1332
  const n = Number(this.value).toFixed(t).replace(/\.0+$/, "");
1333
- return new k(n).coalesce(this, !0).toString();
1333
+ return new S(n).coalesce(this, !0).toString();
1334
1334
  }
1335
1335
  clone() {
1336
- return new k(
1337
- K(this.value),
1336
+ return new S(
1337
+ tt(this.value),
1338
1338
  this.unit,
1339
- K(this.superType),
1339
+ tt(this.superType),
1340
1340
  this.subProperty,
1341
1341
  this.property
1342
1342
  );
1343
1343
  }
1344
1344
  coalesce(t, n = !1) {
1345
- return t == null ? this : cr.includes(this.unit) ? this : n ? (this.unit ??= t.unit, this.superType ??= t.superType, this.subProperty ??= t.subProperty, this.property ??= t.property, this.targets ??= t.targets, this) : new k(
1346
- K(this.value),
1345
+ return t == null ? this : io.includes(this.unit) ? this : n ? (this.unit ??= t.unit, this.superType ??= t.superType, this.subProperty ??= t.subProperty, this.property ??= t.property, this.targets ??= t.targets, this) : new S(
1346
+ tt(this.value),
1347
1347
  this.unit ?? t.unit,
1348
- K(this.superType ?? t.superType),
1348
+ tt(this.superType ?? t.superType),
1349
1349
  this.subProperty ?? t.subProperty,
1350
1350
  this.property ?? t.property,
1351
1351
  this.targets ?? t.targets
1352
1352
  );
1353
1353
  }
1354
1354
  }
1355
- class at {
1355
+ class mt {
1356
1356
  constructor(t, n) {
1357
1357
  this.name = t, this.values = n, n.forEach((r) => {
1358
1358
  this.setSubProperty(t);
@@ -1382,13 +1382,13 @@ class at {
1382
1382
  };
1383
1383
  }
1384
1384
  clone() {
1385
- return new at(
1385
+ return new mt(
1386
1386
  this.name,
1387
1387
  this.values.map((t) => t.clone())
1388
1388
  );
1389
1389
  }
1390
1390
  }
1391
- class xt extends Array {
1391
+ class vt extends Array {
1392
1392
  constructor(...t) {
1393
1393
  super(...t);
1394
1394
  }
@@ -1414,28 +1414,28 @@ class xt extends Array {
1414
1414
  return this.map((t) => t.toJSON());
1415
1415
  }
1416
1416
  clone() {
1417
- return new xt(...this.map((t) => t.clone()));
1417
+ return new vt(...this.map((t) => t.clone()));
1418
1418
  }
1419
1419
  }
1420
- const Ke = 4;
1421
- function qe(e, t = "^", n = !1) {
1420
+ const mn = 4;
1421
+ function hn(e, t = "^", n = !1) {
1422
1422
  const r = e.src.split(`
1423
- `), o = Math.min(r.length - 1, e.getLineNumber()), s = Math.max(o - Ke, 0), i = Math.min(o + Ke + 1, r.length), a = r.slice(s, i);
1423
+ `), o = Math.min(r.length - 1, e.getLineNumber()), s = Math.max(o - mn, 0), i = Math.min(o + mn + 1, r.length), a = r.slice(s, i);
1424
1424
  if (t) {
1425
1425
  const l = " ".repeat(e.getColumnNumber()) + t;
1426
1426
  a.splice(o - s + 1, 0, l);
1427
1427
  }
1428
- return a.map((l, m) => ` ${s + m + 1}| ${l}`).join(`
1428
+ return a.map((l, p) => ` ${s + p + 1}| ${l}`).join(`
1429
1429
  `);
1430
1430
  }
1431
- const ot = /* @__PURE__ */ new Map();
1432
- function fn(e) {
1433
- if (ot.has(e.id))
1434
- return ot.get(e.id);
1431
+ const ct = /* @__PURE__ */ new Map();
1432
+ function ir(e) {
1433
+ if (ct.has(e.id))
1434
+ return ct.get(e.id);
1435
1435
  const t = (r, o) => {
1436
- if (ot.has(r.id))
1437
- return ot.get(r.id);
1438
- const { name: s, args: i, parser: a } = r.context, c = a != null ? t(a, o) : "unknown", m = (() => {
1436
+ if (ct.has(r.id))
1437
+ return ct.get(r.id);
1438
+ const { name: s, args: i, parser: a } = r.context, c = a != null ? t(a, o) : "unknown", p = (() => {
1439
1439
  switch (s) {
1440
1440
  case "string":
1441
1441
  return `"${i[0]}"`;
@@ -1445,8 +1445,8 @@ function fn(e) {
1445
1445
  return `${i[0]}`;
1446
1446
  case "wrap":
1447
1447
  case "trim": {
1448
- const [u, d] = i;
1449
- return `${t(u, o)} ${c} ${t(d, o)}`;
1448
+ const [u, f] = i;
1449
+ return `${t(u, o)} ${c} ${t(f, o)}`;
1450
1450
  }
1451
1451
  case "trimWhitespace":
1452
1452
  return `${c}?w`;
@@ -1467,26 +1467,26 @@ function fn(e) {
1467
1467
  case "all":
1468
1468
  case "then":
1469
1469
  return `[${i.map(
1470
- (d) => t(d, o)
1470
+ (f) => t(f, o)
1471
1471
  ).join(", ")}]`;
1472
1472
  case "any":
1473
1473
  case "or":
1474
1474
  return i.map(
1475
- (d) => t(d, o)
1475
+ (f) => t(f, o)
1476
1476
  ).join(" | ");
1477
1477
  case "many": {
1478
- const [u, d] = i, x = d === 1 / 0 ? `${u},` : `${u},${d}`;
1479
- return `${c} {${x}}`;
1478
+ const [u, f] = i, C = f === 1 / 0 ? `${u},` : `${u},${f}`;
1479
+ return `${c} {${C}}`;
1480
1480
  }
1481
1481
  case "sepBy":
1482
1482
  return `${c} sepBy ${t(i[0], o)}`;
1483
1483
  case "lazy": {
1484
- const [u] = i, d = dn(u);
1484
+ const [u] = i, f = cr(u);
1485
1485
  if (o)
1486
1486
  return s;
1487
1487
  {
1488
- const x = t(d, d.id);
1489
- return ot.set(d.id, x), x;
1488
+ const C = t(f, f.id);
1489
+ return ct.set(f.id, C), C;
1490
1490
  }
1491
1491
  }
1492
1492
  case "debug":
@@ -1495,39 +1495,39 @@ function fn(e) {
1495
1495
  return;
1496
1496
  }
1497
1497
  })() ?? s ?? "unknown";
1498
- return o && ot.set(r.id, m), m;
1498
+ return o && ct.set(r.id, p), p;
1499
1499
  }, n = t(e);
1500
- return ot.set(e.id, n), n;
1500
+ return ct.set(e.id, n), n;
1501
1501
  }
1502
- function bn(e, t = "", n = "") {
1503
- const r = String(e.value), o = e.offset >= e.src.length, a = `${`[${e.isError ? "err" : o ? "done" : "ok"}]`} ${t} offset=${e.offset} value=${r}`, c = e.offset >= e.src.length ? qe(e, "", e.isError) : qe(e, "^", e.isError);
1502
+ function ar(e, t = "", n = "") {
1503
+ const r = String(e.value), o = e.offset >= e.src.length, a = `${`[${e.isError ? "err" : o ? "done" : "ok"}]`} ${t} offset=${e.offset} value=${r}`, c = e.offset >= e.src.length ? hn(e, "", e.isError) : hn(e, "^", e.isError);
1504
1504
  return `${a}
1505
1505
  ${c}`;
1506
1506
  }
1507
- function fr(e, t = "", n = !1, r = console.log) {
1507
+ function mo(e, t = "", n = !1, r = console.log) {
1508
1508
  const o = (s) => {
1509
- const i = e.parser(s), a = n ? fn(e) : e.context.name ?? "", c = bn(
1509
+ const i = e.parser(s), a = n ? ir(e) : e.context.name ?? "", c = ar(
1510
1510
  i,
1511
1511
  t,
1512
1512
  a
1513
1513
  );
1514
1514
  return r(c), i;
1515
1515
  };
1516
- return new y(o, v("debug", e, r));
1516
+ return new x(o, M("debug", e, r));
1517
1517
  }
1518
- class It {
1518
+ class $t {
1519
1519
  constructor(t, n = void 0, r = 0, o = !1, s = 0) {
1520
1520
  this.src = t, this.value = n, this.offset = r, this.isError = o, this.furthest = s;
1521
1521
  }
1522
1522
  ok(t, n = 0) {
1523
- return n += this.offset, new It(this.src, t, n, !1);
1523
+ return n += this.offset, new $t(this.src, t, n, !1);
1524
1524
  }
1525
1525
  err(t, n = 0) {
1526
1526
  const r = this.ok(t, n);
1527
1527
  return r.isError = !0, r;
1528
1528
  }
1529
1529
  from(t, n = 0) {
1530
- return n += this.offset, new It(this.src, t, n, this.isError);
1530
+ return n += this.offset, new $t(this.src, t, n, this.isError);
1531
1531
  }
1532
1532
  getColumnNumber() {
1533
1533
  const t = this.offset, n = this.src.lastIndexOf(`
@@ -1541,38 +1541,38 @@ class It {
1541
1541
  `).length : 0;
1542
1542
  }
1543
1543
  toString() {
1544
- return bn(this);
1544
+ return ar(this);
1545
1545
  }
1546
1546
  }
1547
- function v(e, t, ...n) {
1547
+ function M(e, t, ...n) {
1548
1548
  return {
1549
1549
  name: e,
1550
1550
  parser: t,
1551
1551
  args: n
1552
1552
  };
1553
1553
  }
1554
- let br = 0;
1555
- const st = /* @__PURE__ */ new Map(), vt = /* @__PURE__ */ new Map();
1556
- let gt;
1557
- function L(e) {
1558
- return (!gt || e.offset > gt.offset) && (gt = e), gt;
1554
+ let ho = 0;
1555
+ const lt = /* @__PURE__ */ new Map(), _t = /* @__PURE__ */ new Map();
1556
+ let At;
1557
+ function F(e) {
1558
+ return (!At || e.offset > At.offset) && (At = e), At;
1559
1559
  }
1560
- function dn(e) {
1560
+ function cr(e) {
1561
1561
  return e.parser ? e.parser : e.parser = e();
1562
1562
  }
1563
- class y {
1563
+ class x {
1564
1564
  constructor(t, n = {}) {
1565
1565
  this.parser = t, this.context = n;
1566
1566
  }
1567
- id = br++;
1567
+ id = ho++;
1568
1568
  state;
1569
1569
  reset() {
1570
- gt = void 0, st.clear(), vt.clear();
1570
+ At = void 0, lt.clear(), _t.clear();
1571
1571
  }
1572
1572
  parseState(t) {
1573
1573
  this.reset();
1574
- const n = this.parser(new It(t));
1575
- return this.state = L(n), this.state.isError = n.isError, this.state.isError, n;
1574
+ const n = this.parser(new $t(t));
1575
+ return this.state = F(n), this.state.isError = n.isError, this.state.isError, n;
1576
1576
  }
1577
1577
  parse(t) {
1578
1578
  return this.parseState(t).value;
@@ -1581,38 +1581,38 @@ class y {
1581
1581
  return `${this.id}${t.offset}`;
1582
1582
  }
1583
1583
  atLeftRecursionLimit(t) {
1584
- return (vt.get(this.getCijKey(t)) ?? 0) > t.src.length - t.offset;
1584
+ return (_t.get(this.getCijKey(t)) ?? 0) > t.src.length - t.offset;
1585
1585
  }
1586
1586
  memoize() {
1587
1587
  const t = (n) => {
1588
- const r = this.getCijKey(n), o = vt.get(r) ?? 0;
1589
- let s = st.get(this.id);
1588
+ const r = this.getCijKey(n), o = _t.get(r) ?? 0;
1589
+ let s = lt.get(this.id);
1590
1590
  if (s && s.offset >= n.offset)
1591
1591
  return s;
1592
1592
  if (this.atLeftRecursionLimit(n))
1593
1593
  return n.err(void 0);
1594
- vt.set(r, o + 1);
1594
+ _t.set(r, o + 1);
1595
1595
  const i = this.parser(n);
1596
- return s = st.get(this.id), s && s.offset > i.offset ? i.offset = s.offset : s || st.set(this.id, i), i;
1596
+ return s = lt.get(this.id), s && s.offset > i.offset ? i.offset = s.offset : s || lt.set(this.id, i), i;
1597
1597
  };
1598
- return new y(
1598
+ return new x(
1599
1599
  t,
1600
- v("memoize", this)
1600
+ M("memoize", this)
1601
1601
  );
1602
1602
  }
1603
1603
  mergeMemos() {
1604
1604
  const t = (n) => {
1605
- let r = st.get(this.id);
1605
+ let r = lt.get(this.id);
1606
1606
  if (r)
1607
1607
  return r;
1608
1608
  if (this.atLeftRecursionLimit(n))
1609
1609
  return n.err(void 0);
1610
1610
  const o = this.parser(n);
1611
- return r = st.get(this.id), r || st.set(this.id, o), o;
1611
+ return r = lt.get(this.id), r || lt.set(this.id, o), o;
1612
1612
  };
1613
- return new y(
1613
+ return new x(
1614
1614
  t,
1615
- v("mergeMemo", this)
1615
+ M("mergeMemo", this)
1616
1616
  );
1617
1617
  }
1618
1618
  then(t) {
@@ -1623,11 +1623,11 @@ class y {
1623
1623
  if (!s.isError)
1624
1624
  return s.ok([o.value, s.value]);
1625
1625
  }
1626
- return L(r), r.err(void 0);
1626
+ return F(r), r.err(void 0);
1627
1627
  };
1628
- return new y(
1628
+ return new x(
1629
1629
  n,
1630
- v("then", this, this, t)
1630
+ M("then", this, this, t)
1631
1631
  );
1632
1632
  }
1633
1633
  or(t) {
@@ -1635,9 +1635,9 @@ class y {
1635
1635
  const o = this.parser(r);
1636
1636
  return o.isError ? t.parser(r) : o;
1637
1637
  };
1638
- return new y(
1638
+ return new x(
1639
1639
  n,
1640
- v("or", this, this, t)
1640
+ M("or", this, this, t)
1641
1641
  );
1642
1642
  }
1643
1643
  chain(t, n = !1) {
@@ -1645,9 +1645,9 @@ class y {
1645
1645
  const s = this.parser(o);
1646
1646
  return s.isError ? s : s.value || n ? t(s.value).parser(s) : o;
1647
1647
  };
1648
- return new y(
1648
+ return new x(
1649
1649
  r,
1650
- v("chain", this, t)
1650
+ M("chain", this, t)
1651
1651
  );
1652
1652
  }
1653
1653
  map(t, n = !1) {
@@ -1655,9 +1655,9 @@ class y {
1655
1655
  const s = this.parser(o);
1656
1656
  return !s.isError || n ? s.ok(t(s.value)) : s;
1657
1657
  };
1658
- return new y(
1658
+ return new x(
1659
1659
  r,
1660
- v("map", this)
1660
+ M("map", this)
1661
1661
  );
1662
1662
  }
1663
1663
  mapState(t) {
@@ -1665,9 +1665,9 @@ class y {
1665
1665
  const o = this.parser(r);
1666
1666
  return t(o, r);
1667
1667
  };
1668
- return new y(
1668
+ return new x(
1669
1669
  n,
1670
- v("mapState", this)
1670
+ M("mapState", this)
1671
1671
  );
1672
1672
  }
1673
1673
  skip(t) {
@@ -1678,54 +1678,54 @@ class y {
1678
1678
  if (!s.isError)
1679
1679
  return s.ok(o.value);
1680
1680
  }
1681
- return L(r), r.err(void 0);
1681
+ return F(r), r.err(void 0);
1682
1682
  };
1683
- return new y(
1683
+ return new x(
1684
1684
  n,
1685
- v("skip", this, t)
1685
+ M("skip", this, t)
1686
1686
  );
1687
1687
  }
1688
1688
  next(t) {
1689
1689
  const n = this.then(t).map(([, r]) => r);
1690
- return n.context = v("next", this, t), n;
1690
+ return n.context = M("next", this, t), n;
1691
1691
  }
1692
1692
  opt() {
1693
1693
  const t = (n) => {
1694
1694
  const r = this.parser(n);
1695
- return r.isError ? (L(n), n.ok(void 0)) : r;
1695
+ return r.isError ? (F(n), n.ok(void 0)) : r;
1696
1696
  };
1697
- return new y(
1697
+ return new x(
1698
1698
  t,
1699
- v("opt", this)
1699
+ M("opt", this)
1700
1700
  );
1701
1701
  }
1702
1702
  not(t) {
1703
- const n = (o) => this.parser(o).isError ? (L(o), o.ok(o.value)) : o.err(void 0), r = (o) => {
1703
+ const n = (o) => this.parser(o).isError ? (F(o), o.ok(o.value)) : o.err(void 0), r = (o) => {
1704
1704
  const s = this.parser(o);
1705
- return s.isError ? (L(o), s) : t.parser(o).isError ? s : (L(o), o.err(void 0));
1705
+ return s.isError ? (F(o), s) : t.parser(o).isError ? s : (F(o), o.err(void 0));
1706
1706
  };
1707
- return new y(
1707
+ return new x(
1708
1708
  t ? r : n,
1709
- v("not", this, t)
1709
+ M("not", this, t)
1710
1710
  );
1711
1711
  }
1712
1712
  wrap(t, n, r = !0) {
1713
1713
  if (!r)
1714
- return M(t, this, n);
1714
+ return I(t, this, n);
1715
1715
  const o = t.next(this).skip(n);
1716
- return o.context = v("wrap", this, t, n), o;
1716
+ return o.context = M("wrap", this, t, n), o;
1717
1717
  }
1718
1718
  trim(t = g, n = !0) {
1719
1719
  if (!n)
1720
- return M(t, this, t);
1720
+ return I(t, this, t);
1721
1721
  if (t.context?.name === "whitespace") {
1722
1722
  const r = (o) => {
1723
- const s = Qe(o), i = this.parser(s);
1724
- return i.isError ? (L(o), o.err(void 0)) : Qe(i);
1723
+ const s = bn(o), i = this.parser(s);
1724
+ return i.isError ? (F(o), o.err(void 0)) : bn(i);
1725
1725
  };
1726
- return new y(
1726
+ return new x(
1727
1727
  r,
1728
- v("trimWhitespace", this)
1728
+ M("trimWhitespace", this)
1729
1729
  );
1730
1730
  }
1731
1731
  return this.wrap(t, t);
@@ -1740,11 +1740,11 @@ class y {
1740
1740
  break;
1741
1741
  s.push(c.value), i = c;
1742
1742
  }
1743
- return s.length >= t ? i.ok(s) : (L(o), o.err([]));
1743
+ return s.length >= t ? i.ok(s) : (F(o), o.err([]));
1744
1744
  };
1745
- return new y(
1745
+ return new x(
1746
1746
  r,
1747
- v("many", this, t, n)
1747
+ M("many", this, t, n)
1748
1748
  );
1749
1749
  }
1750
1750
  sepBy(t, n = 0, r = 1 / 0) {
@@ -1756,58 +1756,58 @@ class y {
1756
1756
  if (l.isError)
1757
1757
  break;
1758
1758
  a = l, i.push(a.value);
1759
- const m = t.parser(a);
1760
- if (m.isError)
1759
+ const p = t.parser(a);
1760
+ if (p.isError)
1761
1761
  break;
1762
- a = m;
1762
+ a = p;
1763
1763
  }
1764
- return i.length > n ? a.ok(i) : (L(s), s.err([]));
1764
+ return i.length > n ? a.ok(i) : (F(s), s.err([]));
1765
1765
  };
1766
- return new y(
1766
+ return new x(
1767
1767
  o,
1768
- v("sepBy", this, t)
1768
+ M("sepBy", this, t)
1769
1769
  );
1770
1770
  }
1771
1771
  eof() {
1772
- const t = this.skip(dr());
1773
- return t.context = v("eof", this), t;
1772
+ const t = this.skip(fo());
1773
+ return t.context = M("eof", this), t;
1774
1774
  }
1775
1775
  debug(t = "", n = !1, r = console.log) {
1776
- return fr(this, t, n, r);
1776
+ return mo(this, t, n, r);
1777
1777
  }
1778
1778
  toString() {
1779
- return fn(this);
1779
+ return ir(this);
1780
1780
  }
1781
1781
  static lazy(t) {
1782
- const n = (r) => dn(t).parser(r);
1783
- return new y(
1782
+ const n = (r) => cr(t).parser(r);
1783
+ return new x(
1784
1784
  n,
1785
- v("lazy", void 0, t)
1785
+ M("lazy", void 0, t)
1786
1786
  );
1787
1787
  }
1788
1788
  }
1789
- function dr() {
1790
- const e = (t) => t.offset >= t.src.length ? t.ok(void 0) : (L(t), t.err());
1791
- return new y(
1789
+ function fo() {
1790
+ const e = (t) => t.offset >= t.src.length ? t.ok(void 0) : (F(t), t.err());
1791
+ return new x(
1792
1792
  e,
1793
- v("eof", void 0)
1793
+ M("eof", void 0)
1794
1794
  );
1795
1795
  }
1796
- function b(...e) {
1796
+ function d(...e) {
1797
1797
  const t = (n) => {
1798
1798
  for (const r of e) {
1799
1799
  const o = r.parser(n);
1800
1800
  if (!o.isError)
1801
1801
  return o;
1802
1802
  }
1803
- return L(n), n.err(void 0);
1803
+ return F(n), n.err(void 0);
1804
1804
  };
1805
- return new y(
1805
+ return new x(
1806
1806
  e.length === 1 ? e[0].parser : t,
1807
- v("any", void 0, ...e)
1807
+ M("any", void 0, ...e)
1808
1808
  );
1809
1809
  }
1810
- function M(...e) {
1810
+ function I(...e) {
1811
1811
  const t = (n) => {
1812
1812
  const r = [];
1813
1813
  let o = n;
@@ -1817,67 +1817,67 @@ function M(...e) {
1817
1817
  return i;
1818
1818
  i.value !== void 0 && r.push(i.value), o = i;
1819
1819
  }
1820
- return L(o), o.ok(r);
1820
+ return F(o), o.ok(r);
1821
1821
  };
1822
- return new y(
1822
+ return new x(
1823
1823
  e.length === 1 ? e[0].parser : t,
1824
- v("all", void 0, ...e)
1824
+ M("all", void 0, ...e)
1825
1825
  );
1826
1826
  }
1827
- function A(e) {
1827
+ function B(e) {
1828
1828
  const t = (n) => {
1829
1829
  if (n.offset >= n.src.length)
1830
1830
  return n.err(void 0);
1831
1831
  const r = n.src.slice(n.offset, n.offset + e.length);
1832
- return r === e ? n.ok(r, r.length) : (L(n), n.err(void 0));
1832
+ return r === e ? n.ok(r, r.length) : (F(n), n.err(void 0));
1833
1833
  };
1834
- return new y(
1834
+ return new x(
1835
1835
  t,
1836
- v("string", void 0, e)
1836
+ M("string", void 0, e)
1837
1837
  );
1838
1838
  }
1839
- function G(e, t = (n) => n?.[0] ?? null) {
1839
+ function D(e, t = (n) => n?.[0] ?? null) {
1840
1840
  const n = e.flags.replace(/y/g, ""), r = new RegExp(e, n + "y"), o = (s) => {
1841
1841
  if (s.offset >= s.src.length)
1842
1842
  return s.err(void 0);
1843
1843
  r.lastIndex = s.offset;
1844
1844
  const i = t(s.src.match(r));
1845
- return i ? s.ok(i, r.lastIndex - s.offset) : i === "" ? s.ok(void 0) : (L(s), s.err(void 0));
1845
+ return i ? s.ok(i, r.lastIndex - s.offset) : i === "" ? s.ok(void 0) : (F(s), s.err(void 0));
1846
1846
  };
1847
- return new y(
1847
+ return new x(
1848
1848
  o,
1849
- v("regex", void 0, e)
1849
+ M("regex", void 0, e)
1850
1850
  );
1851
1851
  }
1852
- const Je = /\s*/y, Qe = (e) => {
1852
+ const fn = /\s*/y, bn = (e) => {
1853
1853
  if (e.offset >= e.src.length)
1854
1854
  return e;
1855
- Je.lastIndex = e.offset;
1856
- const t = e.src.match(Je)?.[0] ?? "";
1855
+ fn.lastIndex = e.offset;
1856
+ const t = e.src.match(fn)?.[0] ?? "";
1857
1857
  return e.ok(e.value, t.length);
1858
- }, g = G(/\s*/);
1858
+ }, g = D(/\s*/);
1859
1859
  g.context.name = "whitespace";
1860
- const p = (e) => {
1860
+ const m = (e) => {
1861
1861
  const t = new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "i");
1862
- return G(t);
1863
- }, gr = G(/-?[a-zA-Z][a-zA-Z0-9-]*/), xe = p("none"), wr = G(/-?\d+/).map(Number), q = G(/-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/).map(Number);
1864
- function kr(e) {
1865
- return new y((t) => t.ok(e, 0));
1862
+ return D(t);
1863
+ }, bo = D(/-?[a-zA-Z][a-zA-Z0-9-]*/), Pe = m("none"), go = D(/-?\d+/).map(Number), et = D(/-?(0|[1-9]\d*)(\.\d+)?([eE][+-]?\d+)?/).map(Number);
1864
+ function wo(e) {
1865
+ return new x((t) => t.ok(e, 0));
1866
1866
  }
1867
- function yr(e) {
1868
- return new y((t) => t.err(void 0, 0));
1867
+ function ko(e) {
1868
+ return new x((t) => t.err(void 0, 0));
1869
1869
  }
1870
- function Ct(e, t) {
1870
+ function Bt(e, t) {
1871
1871
  const n = e.parseState(t);
1872
1872
  if (n.isError)
1873
1873
  throw new Error(`Parse error at offset ${n.offset}`);
1874
1874
  return n.value;
1875
1875
  }
1876
- function Us(e, t) {
1876
+ function ba(e, t) {
1877
1877
  const n = e.parseState(t);
1878
1878
  return { status: !n.isError, value: n.value };
1879
1879
  }
1880
- function R(e, t) {
1880
+ function N(e, t) {
1881
1881
  const [n, r, o] = e;
1882
1882
  return [
1883
1883
  t[0] * n + t[1] * r + t[2] * o,
@@ -1885,7 +1885,7 @@ function R(e, t) {
1885
1885
  t[6] * n + t[7] * r + t[8] * o
1886
1886
  ];
1887
1887
  }
1888
- function Vs(e) {
1888
+ function da(e) {
1889
1889
  return [
1890
1890
  e[0],
1891
1891
  e[3],
@@ -1898,7 +1898,7 @@ function Vs(e) {
1898
1898
  e[8]
1899
1899
  ];
1900
1900
  }
1901
- function Ws(e, t) {
1901
+ function ga(e, t) {
1902
1902
  return [
1903
1903
  e[0] * t[0] + e[1] * t[3] + e[2] * t[6],
1904
1904
  e[0] * t[1] + e[1] * t[4] + e[2] * t[7],
@@ -1911,54 +1911,54 @@ function Ws(e, t) {
1911
1911
  e[6] * t[2] + e[7] * t[5] + e[8] * t[8]
1912
1912
  ];
1913
1913
  }
1914
- function J(e) {
1915
- const [t, n, r, o, s, i, a, c, l] = e, m = s * l - i * c, u = -(o * l - i * a), d = o * c - s * a, S = 1 / (t * m + n * u + r * d);
1914
+ function nt(e) {
1915
+ const [t, n, r, o, s, i, a, c, l] = e, p = s * l - i * c, u = -(o * l - i * a), f = o * c - s * a, y = 1 / (t * p + n * u + r * f);
1916
1916
  return [
1917
- m * S,
1918
- (r * c - n * l) * S,
1919
- (n * i - r * s) * S,
1920
- u * S,
1921
- (t * l - r * a) * S,
1922
- (r * o - t * i) * S,
1923
- d * S,
1924
- (n * a - t * c) * S,
1925
- (t * s - n * o) * S
1917
+ p * y,
1918
+ (r * c - n * l) * y,
1919
+ (n * i - r * s) * y,
1920
+ u * y,
1921
+ (t * l - r * a) * y,
1922
+ (r * o - t * i) * y,
1923
+ f * y,
1924
+ (n * a - t * c) * y,
1925
+ (t * s - n * o) * y
1926
1926
  ];
1927
1927
  }
1928
- const I = 255, h = {
1928
+ const _ = 255, h = {
1929
1929
  "%": { min: 0, max: 100 },
1930
1930
  number: { min: 0, max: 1 }
1931
- }, jt = {
1931
+ }, oe = {
1932
1932
  "%": h["%"],
1933
- number: { min: 0, max: I }
1933
+ number: { min: 0, max: _ }
1934
1934
  }, z = {
1935
1935
  "%": h["%"],
1936
1936
  number: h.number
1937
- }, dt = {
1937
+ }, Et = {
1938
1938
  deg: { min: 0, max: 360 },
1939
1939
  number: { min: 0, max: 360 },
1940
1940
  "%": h["%"]
1941
- }, f = {
1941
+ }, b = {
1942
1942
  rgb: {
1943
- r: jt,
1944
- g: jt,
1945
- b: jt,
1943
+ r: oe,
1944
+ g: oe,
1945
+ b: oe,
1946
1946
  alpha: h
1947
1947
  },
1948
1948
  hsl: {
1949
- h: dt,
1949
+ h: Et,
1950
1950
  s: { "%": h["%"], number: h.number },
1951
1951
  l: { "%": h["%"], number: h.number },
1952
1952
  alpha: h
1953
1953
  },
1954
1954
  hsv: {
1955
- h: dt,
1955
+ h: Et,
1956
1956
  s: { "%": h["%"], number: h.number },
1957
1957
  v: { "%": h["%"], number: h.number },
1958
1958
  alpha: h
1959
1959
  },
1960
1960
  hwb: {
1961
- h: dt,
1961
+ h: Et,
1962
1962
  w: { "%": h["%"], number: h.number },
1963
1963
  b: { "%": h["%"], number: h.number },
1964
1964
  alpha: h
@@ -1972,7 +1972,7 @@ const I = 255, h = {
1972
1972
  lch: {
1973
1973
  l: { "%": h["%"], number: h["%"] },
1974
1974
  c: { number: { min: 0, max: 150 }, "%": h["%"] },
1975
- h: dt,
1975
+ h: Et,
1976
1976
  alpha: h
1977
1977
  },
1978
1978
  oklab: {
@@ -1984,7 +1984,7 @@ const I = 255, h = {
1984
1984
  oklch: {
1985
1985
  l: { "%": h["%"], number: h["%"] },
1986
1986
  c: { number: { min: 0, max: 0.5 }, "%": h["%"] },
1987
- h: dt,
1987
+ h: Et,
1988
1988
  alpha: h
1989
1989
  },
1990
1990
  xyz: {
@@ -2027,96 +2027,96 @@ const I = 255, h = {
2027
2027
  b: z,
2028
2028
  alpha: h
2029
2029
  }
2030
- }, _ = "%", gn = {
2030
+ }, $ = "%", lr = {
2031
2031
  rgb: {
2032
2032
  r: "",
2033
2033
  g: "",
2034
2034
  b: "",
2035
- alpha: _
2035
+ alpha: $
2036
2036
  },
2037
2037
  hsl: {
2038
2038
  h: "deg",
2039
2039
  s: "%",
2040
2040
  l: "%",
2041
- alpha: _
2041
+ alpha: $
2042
2042
  },
2043
2043
  hsv: {
2044
2044
  h: "deg",
2045
2045
  s: "%",
2046
2046
  v: "%",
2047
- alpha: _
2047
+ alpha: $
2048
2048
  },
2049
2049
  hwb: {
2050
2050
  h: "deg",
2051
2051
  w: "%",
2052
2052
  b: "%",
2053
- alpha: _
2053
+ alpha: $
2054
2054
  },
2055
2055
  lab: {
2056
2056
  l: "%",
2057
2057
  a: "",
2058
2058
  b: "",
2059
- alpha: _
2059
+ alpha: $
2060
2060
  },
2061
2061
  lch: {
2062
2062
  l: "%",
2063
2063
  c: "",
2064
2064
  h: "deg",
2065
- alpha: _
2065
+ alpha: $
2066
2066
  },
2067
2067
  oklab: {
2068
2068
  l: "%",
2069
2069
  a: "",
2070
2070
  b: "",
2071
- alpha: _
2071
+ alpha: $
2072
2072
  },
2073
2073
  oklch: {
2074
2074
  l: "%",
2075
2075
  c: "",
2076
2076
  h: "deg",
2077
- alpha: _
2077
+ alpha: $
2078
2078
  },
2079
2079
  xyz: {
2080
2080
  x: "%",
2081
2081
  y: "%",
2082
2082
  z: "%",
2083
- alpha: _
2083
+ alpha: $
2084
2084
  },
2085
2085
  kelvin: {
2086
2086
  kelvin: "K",
2087
- alpha: _
2087
+ alpha: $
2088
2088
  },
2089
2089
  "srgb-linear": {
2090
2090
  r: "",
2091
2091
  g: "",
2092
2092
  b: "",
2093
- alpha: _
2093
+ alpha: $
2094
2094
  },
2095
2095
  "display-p3": {
2096
2096
  r: "",
2097
2097
  g: "",
2098
2098
  b: "",
2099
- alpha: _
2099
+ alpha: $
2100
2100
  },
2101
2101
  "a98-rgb": {
2102
2102
  r: "",
2103
2103
  g: "",
2104
2104
  b: "",
2105
- alpha: _
2105
+ alpha: $
2106
2106
  },
2107
2107
  "prophoto-rgb": {
2108
2108
  r: "",
2109
2109
  g: "",
2110
2110
  b: "",
2111
- alpha: _
2111
+ alpha: $
2112
2112
  },
2113
2113
  rec2020: {
2114
2114
  r: "",
2115
2115
  g: "",
2116
2116
  b: "",
2117
- alpha: _
2117
+ alpha: $
2118
2118
  }
2119
- }, Xs = {
2119
+ }, wa = {
2120
2120
  rgb: "RGB",
2121
2121
  hsl: "HSL",
2122
2122
  hsv: "HSV",
@@ -2132,15 +2132,15 @@ const I = 255, h = {
2132
2132
  "a98-rgb": "Adobe RGB",
2133
2133
  "prophoto-rgb": "ProPhoto RGB",
2134
2134
  rec2020: "Rec. 2020"
2135
- }, Sr = [
2135
+ }, So = [
2136
2136
  0.3127 / 0.329,
2137
2137
  1,
2138
2138
  (1 - 0.3127 - 0.329) / 0.329
2139
- ], xr = [
2139
+ ], yo = [
2140
2140
  0.3457 / 0.3585,
2141
2141
  1,
2142
2142
  (1 - 0.3457 - 0.3585) / 0.3585
2143
- ], Ce = [
2143
+ ], Oe = [
2144
2144
  1.0479297925449969,
2145
2145
  0.022946870601609652,
2146
2146
  -0.05019226628920524,
@@ -2150,10 +2150,10 @@ const I = 255, h = {
2150
2150
  -0.009243040646204504,
2151
2151
  0.015055191490298152,
2152
2152
  0.7518742814281371
2153
- ], wn = J(Ce), kn = {
2154
- D65: Sr,
2155
- D50: xr
2156
- }, yn = [
2153
+ ], ur = nt(Oe), pr = {
2154
+ D65: So,
2155
+ D50: yo
2156
+ }, mr = [
2157
2157
  0.819022437996703,
2158
2158
  0.3619062600528904,
2159
2159
  -0.1288737815209879,
@@ -2163,7 +2163,7 @@ const I = 255, h = {
2163
2163
  0.0481771893596242,
2164
2164
  0.2642395317527308,
2165
2165
  0.6335478284694309
2166
- ], Cr = J(yn), Sn = [
2166
+ ], Co = nt(mr), hr = [
2167
2167
  0.210454268309314,
2168
2168
  0.7936177747023054,
2169
2169
  -0.0040720430116193,
@@ -2173,7 +2173,7 @@ const I = 255, h = {
2173
2173
  0.0259040424655478,
2174
2174
  0.7827717124575296,
2175
2175
  -0.8086757549230774
2176
- ], Tr = J(Sn), w = [
2176
+ ], xo = nt(hr), k = [
2177
2177
  4.0767416621,
2178
2178
  -3.3077115913,
2179
2179
  0.2309699292,
@@ -2183,7 +2183,7 @@ const I = 255, h = {
2183
2183
  -0.0041960863,
2184
2184
  -0.7034186147,
2185
2185
  1.707614701
2186
- ], Y = [
2186
+ ], j = [
2187
2187
  0.4122214708,
2188
2188
  0.5363325363,
2189
2189
  0.0514459929,
@@ -2193,11 +2193,11 @@ const I = 255, h = {
2193
2193
  0.0883024619,
2194
2194
  0.2817188376,
2195
2195
  0.6299787005
2196
- ], O = {
2196
+ ], P = {
2197
2197
  l: [1, 0.3963377774, 0.2158037573],
2198
2198
  m: [1, -0.1055613458, -0.0638541728],
2199
2199
  s: [1, -0.0894841775, -1.291485548]
2200
- }, vr = [
2200
+ }, To = [
2201
2201
  {
2202
2202
  // Red sector: -1.88170328*a - 0.80936493*b > 1
2203
2203
  test: (e, t) => -1.88170328 * e - 0.80936493 * t > 1,
@@ -2234,7 +2234,7 @@ const I = 255, h = {
2234
2234
  wm: -0.7034186147,
2235
2235
  ws: 1.707614701
2236
2236
  }
2237
- ], tn = {
2237
+ ], dn = {
2238
2238
  aliceblue: "#f0f8ff",
2239
2239
  antiquewhite: "#faebd7",
2240
2240
  aqua: "#00ffff",
@@ -2389,184 +2389,184 @@ const I = 255, h = {
2389
2389
  shadyshroom: "oklch(53% 0.07 21.60deg / 100%)",
2390
2390
  patriarchalplum: "oklch(31.20% 0.11 19.80deg / 100%)"
2391
2391
  };
2392
- function X(e, t, n) {
2392
+ function v(e, t, n) {
2393
2393
  return Math.min(Math.max(e, t), n);
2394
2394
  }
2395
- function B(e, t, n, r = 0, o = 1) {
2395
+ function R(e, t, n, r = 0, o = 1) {
2396
2396
  const s = (o - r) / (n - t);
2397
2397
  if (n === t)
2398
2398
  throw new Error("fromMax and fromMin cannot be equal");
2399
2399
  return (e - t) * s + r;
2400
2400
  }
2401
- function oe(e, t, n) {
2401
+ function de(e, t, n) {
2402
2402
  return (1 - e) * t + e * n;
2403
2403
  }
2404
- function Hs(e, t, n) {
2404
+ function ka(e, t, n) {
2405
2405
  return t = t === 0 ? 1e-9 : t, t * Math.pow(n / t, e);
2406
2406
  }
2407
- function Rt(e, t) {
2407
+ function Ft(e, t) {
2408
2408
  const n = t.length - 1, r = [...t];
2409
2409
  for (let o = 1; o <= n; o++)
2410
2410
  for (let s = 0; s <= n - o; s++)
2411
- r[s] = oe(e, r[s], r[s + 1]);
2411
+ r[s] = de(e, r[s], r[s + 1]);
2412
2412
  return r[0];
2413
2413
  }
2414
- function Mr(e, t, n, r, o) {
2415
- return [Rt(e, [0, t, r, 1]), Rt(e, [0, n, o, 1])];
2414
+ function fr(e, t, n, r, o) {
2415
+ return [Ft(e, [0, t, r, 1]), Ft(e, [0, n, o, 1])];
2416
2416
  }
2417
- function Ys(e, t) {
2417
+ function jt(e, t) {
2418
2418
  const n = t.map((o) => o[0]), r = t.map((o) => o[1]);
2419
- return [Rt(e, n), Rt(e, r)];
2419
+ return [Ft(e, n), Ft(e, r)];
2420
2420
  }
2421
- function js(e, t, n, r) {
2421
+ function Sa(e, t, n, r) {
2422
2422
  let o = "M0 0";
2423
2423
  for (let s = 0; s <= 1; s += 1e-3) {
2424
- const [i, a] = Mr(s, e, t, n, r);
2424
+ const [i, a] = fr(s, e, t, n, r);
2425
2425
  o += ` L${i} ${a}`;
2426
2426
  }
2427
2427
  return `<path d="${o}"/>`;
2428
2428
  }
2429
- function Zs(e, t, n, r) {
2429
+ function ya(e, t, n, r) {
2430
2430
  const o = (s) => s.toFixed(2);
2431
2431
  return `cubic-bezier(${o(e)}, ${o(t)}, ${o(n)}, ${o(r)})`;
2432
2432
  }
2433
- const xn = 2.4, Pt = 0.055, Te = 12.92, Br = 0.04045, Cn = Br / Te;
2434
- function Zt(e) {
2433
+ const br = 2.4, Gt = 0.055, Le = 12.92, Eo = 0.04045, dr = Eo / Le;
2434
+ function se(e) {
2435
2435
  const t = e < 0 ? -1 : 1, n = e * t;
2436
- return n <= Cn ? e / Te : t * ((n + Pt) / (1 + Pt)) ** xn;
2436
+ return n <= dr ? e / Le : t * ((n + Gt) / (1 + Gt)) ** br;
2437
2437
  }
2438
- function Kt(e) {
2438
+ function ie(e) {
2439
2439
  const t = e < 0 ? -1 : 1, n = e * t;
2440
- return n <= Cn ? e * Te : t * ((1 + Pt) * n ** (1 / xn) - Pt);
2440
+ return n <= dr ? e * Le : t * ((1 + Gt) * n ** (1 / br) - Gt);
2441
2441
  }
2442
- function qt(e, t, n) {
2442
+ function ae(e, t, n) {
2443
2443
  return Math.min(Math.max(e, t), n);
2444
2444
  }
2445
- const Ks = 0.02;
2446
- function qs(e, t, n, r, o, s) {
2445
+ const Ca = 0.02;
2446
+ function xa(e, t, n, r, o, s) {
2447
2447
  const i = e - r, a = t - o, c = n - s;
2448
2448
  return Math.sqrt(i * i + a * a + c * c);
2449
2449
  }
2450
- function ve(e, t, n) {
2451
- const r = e + O.l[1] * t + O.l[2] * n, o = e + O.m[1] * t + O.m[2] * n, s = e + O.s[1] * t + O.s[2] * n, i = r * r * r, a = o * o * o, c = s * s * s;
2450
+ function ze(e, t, n) {
2451
+ const r = e + P.l[1] * t + P.l[2] * n, o = e + P.m[1] * t + P.m[2] * n, s = e + P.s[1] * t + P.s[2] * n, i = r * r * r, a = o * o * o, c = s * s * s;
2452
2452
  return [
2453
- w[0] * i + w[1] * a + w[2] * c,
2454
- w[3] * i + w[4] * a + w[5] * c,
2455
- w[6] * i + w[7] * a + w[8] * c
2453
+ k[0] * i + k[1] * a + k[2] * c,
2454
+ k[3] * i + k[4] * a + k[5] * c,
2455
+ k[6] * i + k[7] * a + k[8] * c
2456
2456
  ];
2457
2457
  }
2458
- function Er(e, t, n) {
2458
+ function Ao(e, t, n) {
2459
2459
  return e >= 0 && e <= 1 && t >= 0 && t <= 1 && n >= 0 && n <= 1;
2460
2460
  }
2461
- function Ar(e, t) {
2462
- const n = vr.find((C) => C.test(e, t)), { k0: r, k1: o, k2: s, k3: i, k4: a, wl: c, wm: l, ws: m } = n;
2461
+ function Mo(e, t) {
2462
+ const n = To.find((T) => T.test(e, t)), { k0: r, k1: o, k2: s, k3: i, k4: a, wl: c, wm: l, ws: p } = n;
2463
2463
  let u = r + o * e + s * t + i * e * e + a * e * t;
2464
- const d = O.l[1] * e + O.l[2] * t, x = O.m[1] * e + O.m[2] * t, S = O.s[1] * e + O.s[2] * t;
2464
+ const f = P.l[1] * e + P.l[2] * t, C = P.m[1] * e + P.m[2] * t, y = P.s[1] * e + P.s[2] * t;
2465
2465
  {
2466
- const C = 1 + u * d, P = 1 + u * x, T = 1 + u * S, E = C * C * C, N = P * P * P, V = T * T * T, tt = 3 * d * C * C, et = 3 * x * P * P, nt = 3 * S * T * T, ht = 6 * d * d * C, ft = 6 * x * x * P, bt = 6 * S * S * T, ct = c * E + l * N + m * V, rt = c * tt + l * et + m * nt, Tt = c * ht + l * ft + m * bt;
2467
- u = u - ct * rt / (rt * rt - 0.5 * ct * Tt);
2466
+ const T = 1 + u * f, w = 1 + u * C, E = 1 + u * y, A = T * T * T, L = w * w * w, X = E * E * E, ot = 3 * f * T * T, st = 3 * C * w * w, it = 3 * y * E * E, Ct = 6 * f * f * T, xt = 6 * C * C * w, Tt = 6 * y * y * E, ht = c * A + l * L + p * X, at = c * ot + l * st + p * it, Nt = c * Ct + l * xt + p * Tt;
2467
+ u = u - ht * at / (at * at - 0.5 * ht * Nt);
2468
2468
  }
2469
2469
  return u;
2470
2470
  }
2471
- function Ir(e, t) {
2472
- const n = Ar(e, t), [r, o, s] = ve(1, n * e, n * t), i = Math.cbrt(1 / Math.max(r, o, s)), a = i * n;
2471
+ function Io(e, t) {
2472
+ const n = Mo(e, t), [r, o, s] = ze(1, n * e, n * t), i = Math.cbrt(1 / Math.max(r, o, s)), a = i * n;
2473
2473
  return { L: i, C: a };
2474
2474
  }
2475
- function Rr(e, t, n, r, o, s) {
2475
+ function Ro(e, t, n, r, o, s) {
2476
2476
  let i;
2477
2477
  if ((n - o) * s.C - (s.L - o) * r <= 0)
2478
2478
  i = s.C * o / (r * s.L + s.C * (o - n));
2479
2479
  else {
2480
2480
  i = s.C * (o - 1) / (r * (s.L - 1) + s.C * (o - n));
2481
- const a = n - o, c = r, l = O.l[1] * e + O.l[2] * t, m = O.m[1] * e + O.m[2] * t, u = O.s[1] * e + O.s[2] * t, d = a + c * l, x = a + c * m, S = a + c * u;
2481
+ const a = n - o, c = r, l = P.l[1] * e + P.l[2] * t, p = P.m[1] * e + P.m[2] * t, u = P.s[1] * e + P.s[2] * t, f = a + c * l, C = a + c * p, y = a + c * u;
2482
2482
  {
2483
- const C = o * (1 - i) + i * n, P = i * r, T = C + P * l, E = C + P * m, N = C + P * u, V = T * T * T, tt = E * E * E, et = N * N * N, nt = 3 * d * T * T, ht = 3 * x * E * E, ft = 3 * S * N * N, bt = 6 * d * d * T, ct = 6 * x * x * E, rt = 6 * S * S * N, Tt = w[0] * V + w[1] * tt + w[2] * et - 1, Ut = w[0] * nt + w[1] * ht + w[2] * ft, rr = w[0] * bt + w[1] * ct + w[2] * rt, Ue = Ut / (Ut * Ut - 0.5 * Tt * rr);
2484
- let Vt = -Tt * Ue;
2485
- const Ve = w[3] * V + w[4] * tt + w[5] * et - 1, Wt = w[3] * nt + w[4] * ht + w[5] * ft, or = w[3] * bt + w[4] * ct + w[5] * rt, We = Wt / (Wt * Wt - 0.5 * Ve * or);
2486
- let Xt = -Ve * We;
2487
- const Xe = w[6] * V + w[7] * tt + w[8] * et - 1, Ht = w[6] * nt + w[7] * ht + w[8] * ft, sr = w[6] * bt + w[7] * ct + w[8] * rt, He = Ht / (Ht * Ht - 0.5 * Xe * sr);
2488
- let Yt = -Xe * He;
2489
- Vt = Ue >= 0 ? Vt : 1 / 0, Xt = We >= 0 ? Xt : 1 / 0, Yt = He >= 0 ? Yt : 1 / 0, i += Math.min(Vt, Xt, Yt);
2483
+ const T = o * (1 - i) + i * n, w = i * r, E = T + w * l, A = T + w * p, L = T + w * u, X = E * E * E, ot = A * A * A, st = L * L * L, it = 3 * f * E * E, Ct = 3 * C * A * A, xt = 3 * y * L * L, Tt = 6 * f * f * E, ht = 6 * C * C * A, at = 6 * y * y * L, Nt = k[0] * X + k[1] * ot + k[2] * st - 1, Jt = k[0] * it + k[1] * Ct + k[2] * xt, eo = k[0] * Tt + k[1] * ht + k[2] * at, rn = Jt / (Jt * Jt - 0.5 * Nt * eo);
2484
+ let Qt = -Nt * rn;
2485
+ const on = k[3] * X + k[4] * ot + k[5] * st - 1, te = k[3] * it + k[4] * Ct + k[5] * xt, no = k[3] * Tt + k[4] * ht + k[5] * at, sn = te / (te * te - 0.5 * on * no);
2486
+ let ee = -on * sn;
2487
+ const an = k[6] * X + k[7] * ot + k[8] * st - 1, ne = k[6] * it + k[7] * Ct + k[8] * xt, ro = k[6] * Tt + k[7] * ht + k[8] * at, cn = ne / (ne * ne - 0.5 * an * ro);
2488
+ let re = -an * cn;
2489
+ Qt = rn >= 0 ? Qt : 1 / 0, ee = sn >= 0 ? ee : 1 / 0, re = cn >= 0 ? re : 1 / 0, i += Math.min(Qt, ee, re);
2490
2490
  }
2491
2491
  }
2492
2492
  return i;
2493
2493
  }
2494
- const Pr = 1e-5, Or = 0.05;
2495
- function Nr(e, t, n) {
2496
- const [r, o, s] = ve(e, t, n);
2497
- if (Er(r, o, s))
2494
+ const vo = 1e-5, Bo = 0.05;
2495
+ function No(e, t, n) {
2496
+ const [r, o, s] = ze(e, t, n);
2497
+ if (Ao(r, o, s))
2498
2498
  return [e, t, n];
2499
- const i = Math.max(Pr, Math.sqrt(t * t + n * n)), a = t / i, c = n / i, l = Ir(a, c), m = e - 0.5, u = 0.5 + Math.abs(m) + Or * i, d = 0.5 * (1 + Math.sign(m) * (u - Math.sqrt(u * u - 2 * Math.abs(m)))), x = Rr(a, c, e, i, d, l), S = d * (1 - x) + x * e, C = x * i;
2500
- return [S, C * a, C * c];
2499
+ const i = Math.max(vo, Math.sqrt(t * t + n * n)), a = t / i, c = n / i, l = Io(a, c), p = e - 0.5, u = 0.5 + Math.abs(p) + Bo * i, f = 0.5 * (1 + Math.sign(p) * (u - Math.sqrt(u * u - 2 * Math.abs(p)))), C = Ro(a, c, e, i, f, l), y = f * (1 - C) + C * e, T = C * i;
2500
+ return [y, T * a, T * c];
2501
2501
  }
2502
- function zr(e, t, n) {
2503
- const r = Zt(e), o = Zt(t), s = Zt(n), i = Math.cbrt(Y[0] * r + Y[1] * o + Y[2] * s), a = Math.cbrt(Y[3] * r + Y[4] * o + Y[5] * s), c = Math.cbrt(Y[6] * r + Y[7] * o + Y[8] * s);
2502
+ function _o(e, t, n) {
2503
+ const r = se(e), o = se(t), s = se(n), i = Math.cbrt(j[0] * r + j[1] * o + j[2] * s), a = Math.cbrt(j[3] * r + j[4] * o + j[5] * s), c = Math.cbrt(j[6] * r + j[7] * o + j[8] * s);
2504
2504
  return [
2505
2505
  0.2104542553 * i + 0.793617785 * a - 0.0040720468 * c,
2506
2506
  1.9779984951 * i - 2.428592205 * a + 0.4505937099 * c,
2507
2507
  0.0259040371 * i + 0.7827717662 * a - 0.808675766 * c
2508
2508
  ];
2509
2509
  }
2510
- function _r(e, t, n) {
2510
+ function Po(e, t, n) {
2511
2511
  if (e >= 0 && e <= 1 && t >= 0 && t <= 1 && n >= 0 && n <= 1)
2512
2512
  return [e, t, n];
2513
- const [r, o, s] = zr(e, t, n), [i, a, c] = Nr(r, o, s), [l, m, u] = ve(i, a, c);
2513
+ const [r, o, s] = _o(e, t, n), [i, a, c] = No(r, o, s), [l, p, u] = ze(i, a, c);
2514
2514
  return [
2515
- qt(Kt(l), 0, 1),
2516
- qt(Kt(m), 0, 1),
2517
- qt(Kt(u), 0, 1)
2515
+ ae(ie(l), 0, 1),
2516
+ ae(ie(p), 0, 1),
2517
+ ae(ie(u), 0, 1)
2518
2518
  ];
2519
2519
  }
2520
- const Js = (e) => {
2521
- const t = f[e], n = gn[e];
2520
+ const Ta = (e) => {
2521
+ const t = b[e], n = lr[e];
2522
2522
  return Object.entries(t).reduce((r, [o, s]) => {
2523
2523
  const i = n[o];
2524
2524
  let { min: a, max: c } = s[i] ?? s.number;
2525
2525
  return a = `${a}${i}`, c = `${c}${i}`, r[o] = { min: a, max: c }, r;
2526
2526
  }, {});
2527
- }, j = 16, Lr = (e) => {
2527
+ }, Y = 16, Oo = (e) => {
2528
2528
  if (e = e.slice(1), e.length <= 4) {
2529
- const t = parseInt(e[0] + e[0], j), n = parseInt(e[1] + e[1], j), r = parseInt(e[2] + e[2], j), o = e[3] ? parseInt(e[3] + e[3], j) / I : 1;
2530
- return new $(t, n, r, o);
2529
+ const t = parseInt(e[0] + e[0], Y), n = parseInt(e[1] + e[1], Y), r = parseInt(e[2] + e[2], Y), o = e[3] ? parseInt(e[3] + e[3], Y) / _ : 1;
2530
+ return new O(t, n, r, o);
2531
2531
  } else {
2532
- const t = parseInt(e.slice(0, 2), j), n = parseInt(e.slice(2, 4), j), r = parseInt(e.slice(4, 6), j), o = e.length === 8 ? parseInt(e.slice(6, 8), j) / I : 1;
2533
- return new $(t, n, r, o);
2532
+ const t = parseInt(e.slice(0, 2), Y), n = parseInt(e.slice(2, 4), Y), r = parseInt(e.slice(4, 6), Y), o = e.length === 8 ? parseInt(e.slice(6, 8), Y) / _ : 1;
2533
+ return new O(t, n, r, o);
2534
2534
  }
2535
- }, Qs = ({ r: e, g: t, b: n, alpha: r }) => {
2535
+ }, Ea = ({ r: e, g: t, b: n, alpha: r }) => {
2536
2536
  const o = (s) => {
2537
- const i = s.toString(j);
2537
+ const i = s.toString(Y);
2538
2538
  return i.length === 1 ? "0" + i : i;
2539
2539
  };
2540
- return `#${o(e)}${o(t)}${o(n)}${r < 1 ? o(Math.round(r * I)) : ""}`;
2541
- }, Tn = 1e3, vn = 4e4, Mn = 100, Bn = ({ kelvin: e, alpha: t }) => {
2542
- e = X(e, Tn, vn) / Mn;
2540
+ return `#${o(e)}${o(t)}${o(n)}${r < 1 ? o(Math.round(r * _)) : ""}`;
2541
+ }, gr = 1e3, wr = 4e4, kr = 100, Sr = ({ kelvin: e, alpha: t }) => {
2542
+ e = v(e, gr, wr) / kr;
2543
2543
  let n, r, o;
2544
- return e <= 66 ? n = I : (n = e - 60, n = 329.698727446 * n ** -0.1332047592), n = X(n, 0, I) / I, e <= 66 ? (r = e, r = 99.4708025861 * Math.log(r) - 161.1195681661) : (r = e - 60, r = 288.1221695283 * r ** -0.0755148492), r = X(r, 0, I) / I, e >= 66 ? o = I : e <= 19 ? o = 0 : (o = e - 10, o = 138.5177312231 * Math.log(o) - 305.0447927307), o = X(o, 0, I) / I, new $(n, r, o, t);
2545
- }, $r = ({ r: e, g: t, b: n, alpha: r }) => {
2546
- e = X(e * I, 0, I), t = X(t * I, 0, I), n = X(n * I, 0, I);
2544
+ return e <= 66 ? n = _ : (n = e - 60, n = 329.698727446 * n ** -0.1332047592), n = v(n, 0, _) / _, e <= 66 ? (r = e, r = 99.4708025861 * Math.log(r) - 161.1195681661) : (r = e - 60, r = 288.1221695283 * r ** -0.0755148492), r = v(r, 0, _) / _, e >= 66 ? o = _ : e <= 19 ? o = 0 : (o = e - 10, o = 138.5177312231 * Math.log(o) - 305.0447927307), o = v(o, 0, _) / _, new O(n, r, o, t);
2545
+ }, Lo = ({ r: e, g: t, b: n, alpha: r }) => {
2546
+ e = v(e * _, 0, _), t = v(t * _, 0, _), n = v(n * _, 0, _);
2547
2547
  let o;
2548
- if (n === I ? o = 6600 : n === 0 ? o = 1900 : o = Math.exp((n + 305.0447927307) / 138.5177312231) + 10, e < I) {
2548
+ if (n === _ ? o = 6600 : n === 0 ? o = 1900 : o = Math.exp((n + 305.0447927307) / 138.5177312231) + 10, e < _) {
2549
2549
  const i = (329.698727446 / e) ** -7.507239275877164 + 60;
2550
2550
  o = Math.max(o, i);
2551
2551
  }
2552
2552
  const s = o <= 6600 ? Math.exp((t + 161.1195681661) / 99.4708025861) : (288.1221695283 / t) ** (1 / -0.0755148492) + 60;
2553
- return o = (o + s) / 2, o = X(Math.round(o * Mn), Tn, vn), new un(o, r);
2554
- }, En = ({ h: e, s: t, v: n, alpha: r }) => {
2553
+ return o = (o + s) / 2, o = v(Math.round(o * kr), gr, wr), new nr(o, r);
2554
+ }, yr = ({ h: e, s: t, v: n, alpha: r }) => {
2555
2555
  const o = n - n * t / 2;
2556
2556
  let s;
2557
- return o === 0 || o === 1 ? s = 0 : s = (n - o) / Math.min(o, 1 - o), new St(e, s, o, r);
2558
- }, An = ({ h: e, s: t, l: n, alpha: r }) => {
2557
+ return o === 0 || o === 1 ? s = 0 : s = (n - o) / Math.min(o, 1 - o), new yt(e, s, o, r);
2558
+ }, Cr = ({ h: e, s: t, l: n, alpha: r }) => {
2559
2559
  const o = n + t * Math.min(n, 1 - n);
2560
2560
  let s;
2561
- return o === 0 ? s = 0 : s = 2 * (1 - n / o), new pe(e, s, o, r);
2562
- }, Fr = ({ h: e, w: t, b: n, alpha: r }) => {
2561
+ return o === 0 ? s = 0 : s = 2 * (1 - n / o), new Te(e, s, o, r);
2562
+ }, zo = ({ h: e, w: t, b: n, alpha: r }) => {
2563
2563
  let o, s;
2564
2564
  const i = t + n;
2565
- return i >= 1 ? (s = t / i, o = 0) : (s = 1 - n, o = s === 0 ? 0 : 1 - t / s), En(new pe(e, o, s, r));
2566
- }, Dr = ({ h: e, s: t, l: n, alpha: r }) => {
2567
- const { h: o, s, v: i } = An(new St(e, t, n, r));
2568
- return new he(o, i * (1 - s), 1 - i, r);
2569
- }, Gr = ({ r: e, g: t, b: n, alpha: r }) => {
2565
+ return i >= 1 ? (s = t / i, o = 0) : (s = 1 - n, o = s === 0 ? 0 : 1 - t / s), yr(new Te(e, o, s, r));
2566
+ }, $o = ({ h: e, s: t, l: n, alpha: r }) => {
2567
+ const { h: o, s, v: i } = Cr(new yt(e, t, n, r));
2568
+ return new Ee(o, i * (1 - s), 1 - i, r);
2569
+ }, xr = ({ r: e, g: t, b: n, alpha: r }) => {
2570
2570
  const o = Math.max(e, t, n), s = Math.min(e, t, n);
2571
2571
  let [i, a, c] = [0, 0, (o + s) / 2];
2572
2572
  const l = o - s;
@@ -2581,73 +2581,73 @@ const Js = (e) => {
2581
2581
  i = (e - t) / l + 4;
2582
2582
  break;
2583
2583
  }
2584
- return i /= 6, a < 0 && (i = (i + 0.5) % 1, a = Math.abs(a) % 1), i >= 1 && (i -= 1), new St(i, a, c, r);
2584
+ return i /= 6, a < 0 && (i = (i + 0.5) % 1, a = Math.abs(a) % 1), i >= 1 && (i -= 1), new yt(i, a, c, r);
2585
2585
  };
2586
- function Ur({ h: e, s: t, l: n, alpha: r }) {
2586
+ function Fo({ h: e, s: t, l: n, alpha: r }) {
2587
2587
  const o = (1 - Math.abs(2 * n - 1)) * t, s = o * (1 - Math.abs(e * 6 % 2 - 1)), i = n - o / 2;
2588
2588
  let a, c, l;
2589
- return e < 1 / 6 ? [a, c, l] = [o, s, 0] : e < 2 / 6 ? [a, c, l] = [s, o, 0] : e < 3 / 6 ? [a, c, l] = [0, o, s] : e < 4 / 6 ? [a, c, l] = [0, s, o] : e < 5 / 6 ? [a, c, l] = [s, 0, o] : [a, c, l] = [o, 0, s], new $(a + i, c + i, l + i, r);
2589
+ return e < 1 / 6 ? [a, c, l] = [o, s, 0] : e < 2 / 6 ? [a, c, l] = [s, o, 0] : e < 3 / 6 ? [a, c, l] = [0, o, s] : e < 4 / 6 ? [a, c, l] = [0, s, o] : e < 5 / 6 ? [a, c, l] = [s, 0, o] : [a, c, l] = [o, 0, s], new O(a + i, c + i, l + i, r);
2590
2590
  }
2591
- const Vr = 216 / 24389, Wr = 24 / 116, se = 24389 / 27, Xr = 8, kt = 16, yt = 116, In = 500, Rn = 200;
2592
- function Hr(e) {
2591
+ const Go = 216 / 24389, Uo = 24 / 116, ge = 24389 / 27, Do = 8, It = 16, Rt = 116, Tr = 500, Er = 200;
2592
+ function Vo(e) {
2593
2593
  if (e.whitePoint === "D50") return [e.x, e.y, e.z];
2594
- if (e.whitePoint === "D65") return R([e.x, e.y, e.z], Ce);
2594
+ if (e.whitePoint === "D65") return N([e.x, e.y, e.z], Oe);
2595
2595
  throw new Error(`Unsupported white point: ${e.whitePoint}`);
2596
2596
  }
2597
- function Yr(e) {
2597
+ function Xo(e) {
2598
2598
  if (e.whitePoint === "D65") return [e.x, e.y, e.z];
2599
- if (e.whitePoint === "D50") return R([e.x, e.y, e.z], wn);
2599
+ if (e.whitePoint === "D50") return N([e.x, e.y, e.z], ur);
2600
2600
  throw new Error(`Unsupported white point: ${e.whitePoint}`);
2601
2601
  }
2602
- function Me(e, t = "D50") {
2603
- const n = (T) => T > Vr ? Math.cbrt(T) : (se * T + kt) / yt, r = kn[t], [o, s, i] = Hr(e), a = o / r[0], c = s / r[1], l = i / r[2], m = n(a), u = n(c), d = n(l), x = yt * u - kt, S = In * (m - u), C = Rn * (u - d), P = new Lt(
2604
- B(
2605
- x,
2606
- f.lab.l.number.min,
2607
- f.lab.l.number.max
2602
+ function $e(e, t = "D50") {
2603
+ const n = (E) => E > Go ? Math.cbrt(E) : (ge * E + It) / Rt, r = pr[t], [o, s, i] = Vo(e), a = o / r[0], c = s / r[1], l = i / r[2], p = n(a), u = n(c), f = n(l), C = Rt * u - It, y = Tr * (p - u), T = Er * (u - f), w = new Wt(
2604
+ R(
2605
+ C,
2606
+ b.lab.l.number.min,
2607
+ b.lab.l.number.max
2608
2608
  ),
2609
- B(
2610
- S,
2611
- f.lab.a.number.min,
2612
- f.lab.a.number.max
2609
+ R(
2610
+ y,
2611
+ b.lab.a.number.min,
2612
+ b.lab.a.number.max
2613
2613
  ),
2614
- B(
2615
- C,
2616
- f.lab.b.number.min,
2617
- f.lab.b.number.max
2614
+ R(
2615
+ T,
2616
+ b.lab.b.number.min,
2617
+ b.lab.b.number.max
2618
2618
  ),
2619
2619
  e.alpha
2620
2620
  );
2621
- return P.whitePoint = t, P;
2621
+ return w.whitePoint = t, w;
2622
2622
  }
2623
- function Be(e) {
2624
- const t = (E) => E > Wr ? E ** 3 : (yt * E - kt) / se, n = (E) => E > Xr ? ((E + kt) / yt) ** 3 : E / se, r = kn[e.whitePoint];
2623
+ function Fe(e) {
2624
+ const t = (A) => A > Uo ? A ** 3 : (Rt * A - It) / ge, n = (A) => A > Do ? ((A + It) / Rt) ** 3 : A / ge, r = pr[e.whitePoint];
2625
2625
  let { l: o, a: s, b: i, alpha: a } = e;
2626
- o = B(
2626
+ o = R(
2627
2627
  o,
2628
2628
  0,
2629
2629
  1,
2630
- f.lab.l.number.min,
2631
- f.lab.l.number.max
2632
- ), s = B(
2630
+ b.lab.l.number.min,
2631
+ b.lab.l.number.max
2632
+ ), s = R(
2633
2633
  s,
2634
2634
  0,
2635
2635
  1,
2636
- f.lab.a.number.min,
2637
- f.lab.a.number.max
2638
- ), i = B(
2636
+ b.lab.a.number.min,
2637
+ b.lab.a.number.max
2638
+ ), i = R(
2639
2639
  i,
2640
2640
  0,
2641
2641
  1,
2642
- f.lab.b.number.min,
2643
- f.lab.b.number.max
2642
+ b.lab.b.number.min,
2643
+ b.lab.b.number.max
2644
2644
  );
2645
- const c = (o + kt) / yt, l = s / In + c, m = c - i / Rn, [u, d, x] = [t(l), n(o), t(m)];
2646
- let S = u * r[0], C = d * r[1], P = x * r[2];
2647
- const T = new D(S, C, P, a);
2648
- return T.whitePoint = e.whitePoint, [S, C, P] = Yr(T), T.whitePoint = "D65", T.x = S, T.y = C, T.z = P, T;
2645
+ const c = (o + It) / Rt, l = s / Tr + c, p = c - i / Er, [u, f, C] = [t(l), n(o), t(p)];
2646
+ let y = u * r[0], T = f * r[1], w = C * r[2];
2647
+ const E = new U(y, T, w, a);
2648
+ return E.whitePoint = e.whitePoint, [y, T, w] = Xo(E), E.whitePoint = "D65", E.x = y, E.y = T, E.z = w, E;
2649
2649
  }
2650
- const Ee = [
2650
+ const Ge = [
2651
2651
  0.41239079926595934,
2652
2652
  0.357584339383878,
2653
2653
  0.1804807884018343,
@@ -2657,221 +2657,221 @@ const Ee = [
2657
2657
  0.01933081871559182,
2658
2658
  0.11919477979462598,
2659
2659
  0.9505321522496607
2660
- ], Pn = J(Ee), On = 2.4, Ot = 0.055, Ae = 12.92, jr = 0.04045, Nn = jr / Ae;
2661
- function ut(e) {
2660
+ ], Ar = nt(Ge), Mr = 2.4, Ut = 0.055, Ue = 12.92, Wo = 0.04045, Ir = Wo / Ue;
2661
+ function wt(e) {
2662
2662
  const t = e < 0 ? -1 : 1, n = e * t;
2663
- return n <= Nn ? e / Ae : t * ((n + Ot) / (1 + Ot)) ** On;
2663
+ return n <= Ir ? e / Ue : t * ((n + Ut) / (1 + Ut)) ** Mr;
2664
2664
  }
2665
- function zn(e) {
2665
+ function Rr(e) {
2666
2666
  const t = e < 0 ? -1 : 1, n = e * t;
2667
- return n <= Nn ? e * Ae : t * ((1 + Ot) * n ** (1 / On) - Ot);
2667
+ return n <= Ir ? e * Ue : t * ((1 + Ut) * n ** (1 / Mr) - Ut);
2668
2668
  }
2669
- function Ie({ r: e, g: t, b: n, alpha: r }) {
2670
- const o = [ut(e), ut(t), ut(n)], [s, i, a] = R(o, Ee);
2671
- return new D(s, i, a, r);
2669
+ function De({ r: e, g: t, b: n, alpha: r }) {
2670
+ const o = [wt(e), wt(t), wt(n)], [s, i, a] = N(o, Ge);
2671
+ return new U(s, i, a, r);
2672
2672
  }
2673
- const Re = ({ x: e, y: t, z: n, alpha: r }, o = !0) => {
2674
- const s = R([e, t, n], Pn), [i, a, c] = s.map(zn);
2673
+ const Ve = ({ x: e, y: t, z: n, alpha: r }, o = !0) => {
2674
+ const s = N([e, t, n], Ar), [i, a, c] = s.map(Rr);
2675
2675
  if (o) {
2676
- const l = Bo(new $(i, a, c, r));
2677
- return new $(l.r, l.g, l.b, r);
2676
+ const l = xs(new O(i, a, c, r));
2677
+ return new O(l.r, l.g, l.b, r);
2678
2678
  } else
2679
- return new $(i, a, c, r);
2679
+ return new O(i, a, c, r);
2680
2680
  };
2681
- function Zr({ l: e, c: t, h: n, alpha: r }) {
2682
- t = B(
2681
+ function Ho({ l: e, c: t, h: n, alpha: r }) {
2682
+ t = R(
2683
2683
  t,
2684
2684
  0,
2685
2685
  1,
2686
- f.lch.c.number.min,
2687
- f.lch.c.number.max
2686
+ b.lch.c.number.min,
2687
+ b.lch.c.number.max
2688
2688
  );
2689
2689
  const o = n * 2 * Math.PI, s = Math.cos(o) * t, i = Math.sin(o) * t;
2690
- return new Lt(
2690
+ return new Wt(
2691
2691
  e,
2692
- B(
2692
+ R(
2693
2693
  s,
2694
- f.lab.a.number.min,
2695
- f.lab.a.number.max
2694
+ b.lab.a.number.min,
2695
+ b.lab.a.number.max
2696
2696
  ),
2697
- B(
2697
+ R(
2698
2698
  i,
2699
- f.lab.b.number.min,
2700
- f.lab.b.number.max
2699
+ b.lab.b.number.min,
2700
+ b.lab.b.number.max
2701
2701
  ),
2702
2702
  r
2703
2703
  );
2704
2704
  }
2705
- function Kr({ l: e, a: t, b: n, alpha: r }) {
2706
- t = B(
2705
+ function jo({ l: e, a: t, b: n, alpha: r }) {
2706
+ t = R(
2707
2707
  t,
2708
2708
  0,
2709
2709
  1,
2710
- f.lab.a.number.min,
2711
- f.lab.a.number.max
2712
- ), n = B(
2710
+ b.lab.a.number.min,
2711
+ b.lab.a.number.max
2712
+ ), n = R(
2713
2713
  n,
2714
2714
  0,
2715
2715
  1,
2716
- f.lab.b.number.min,
2717
- f.lab.b.number.max
2716
+ b.lab.b.number.min,
2717
+ b.lab.b.number.max
2718
2718
  );
2719
2719
  const o = Math.hypot(t, n);
2720
2720
  let s = Math.atan2(n, t) / (2 * Math.PI);
2721
- return s < 0 && (s += 1), new fe(
2721
+ return s < 0 && (s += 1), new Ae(
2722
2722
  e,
2723
- B(
2723
+ R(
2724
2724
  o,
2725
- f.lch.c.number.min,
2726
- f.lch.c.number.max
2725
+ b.lch.c.number.min,
2726
+ b.lch.c.number.max
2727
2727
  ),
2728
2728
  s,
2729
2729
  r
2730
2730
  );
2731
2731
  }
2732
- function Pe({ l: e, a: t, b: n, alpha: r }) {
2733
- t = B(
2732
+ function Xe({ l: e, a: t, b: n, alpha: r }) {
2733
+ t = R(
2734
2734
  t,
2735
2735
  0,
2736
2736
  1,
2737
- f.oklab.a.number.min,
2738
- f.oklab.a.number.max
2739
- ), n = B(
2737
+ b.oklab.a.number.min,
2738
+ b.oklab.a.number.max
2739
+ ), n = R(
2740
2740
  n,
2741
2741
  0,
2742
2742
  1,
2743
- f.oklab.b.number.min,
2744
- f.oklab.b.number.max
2743
+ b.oklab.b.number.min,
2744
+ b.oklab.b.number.max
2745
2745
  );
2746
- const o = R([e, t, n], Tr), s = [o[0] * o[0] * o[0], o[1] * o[1] * o[1], o[2] * o[2] * o[2]], [i, a, c] = R(s, Cr);
2747
- return new D(i, a, c, r);
2746
+ const o = N([e, t, n], xo), s = [o[0] * o[0] * o[0], o[1] * o[1] * o[1], o[2] * o[2] * o[2]], [i, a, c] = N(s, Co);
2747
+ return new U(i, a, c, r);
2748
2748
  }
2749
- function Oe(e) {
2750
- const { x: t, y: n, z: r } = e, o = R([t, n, r], yn), s = [Math.cbrt(o[0]), Math.cbrt(o[1]), Math.cbrt(o[2])], [i, a, c] = R(s, Sn);
2751
- return new $t(
2749
+ function We(e) {
2750
+ const { x: t, y: n, z: r } = e, o = N([t, n, r], mr), s = [Math.cbrt(o[0]), Math.cbrt(o[1]), Math.cbrt(o[2])], [i, a, c] = N(s, hr);
2751
+ return new Ht(
2752
2752
  i,
2753
- B(
2753
+ R(
2754
2754
  a,
2755
- f.oklab.a.number.min,
2756
- f.oklab.a.number.max
2755
+ b.oklab.a.number.min,
2756
+ b.oklab.a.number.max
2757
2757
  ),
2758
- B(
2758
+ R(
2759
2759
  c,
2760
- f.oklab.b.number.min,
2761
- f.oklab.b.number.max
2760
+ b.oklab.b.number.min,
2761
+ b.oklab.b.number.max
2762
2762
  ),
2763
2763
  e.alpha
2764
2764
  );
2765
2765
  }
2766
- function qr(e) {
2767
- const t = Pe(e);
2768
- return Me(t);
2766
+ function Yo(e) {
2767
+ const t = Xe(e);
2768
+ return $e(t);
2769
2769
  }
2770
- function Jr(e) {
2771
- const t = Be(e);
2772
- return Oe(t);
2770
+ function Zo(e) {
2771
+ const t = Fe(e);
2772
+ return We(t);
2773
2773
  }
2774
- function _n({ l: e, a: t, b: n, alpha: r }) {
2775
- t = B(t, 0, 1, f.oklab.a.number.min, f.oklab.a.number.max), n = B(n, 0, 1, f.oklab.b.number.min, f.oklab.b.number.max);
2774
+ function vr({ l: e, a: t, b: n, alpha: r }) {
2775
+ t = R(t, 0, 1, b.oklab.a.number.min, b.oklab.a.number.max), n = R(n, 0, 1, b.oklab.b.number.min, b.oklab.b.number.max);
2776
2776
  const o = Math.hypot(t, n);
2777
2777
  let s = Math.atan2(n, t) / (2 * Math.PI);
2778
- return s < 0 && (s += 1), new be(
2778
+ return s < 0 && (s += 1), new Me(
2779
2779
  e,
2780
- B(o, f.oklch.c.number.min, f.oklch.c.number.max),
2780
+ R(o, b.oklch.c.number.min, b.oklch.c.number.max),
2781
2781
  s,
2782
2782
  r
2783
2783
  );
2784
2784
  }
2785
- function Ln({ l: e, c: t, h: n, alpha: r }) {
2786
- t = B(t, 0, 1, f.oklch.c.number.min, f.oklch.c.number.max);
2785
+ function Br({ l: e, c: t, h: n, alpha: r }) {
2786
+ t = R(t, 0, 1, b.oklch.c.number.min, b.oklch.c.number.max);
2787
2787
  const o = n * 2 * Math.PI, s = Math.cos(o) * t, i = Math.sin(o) * t;
2788
- return new $t(
2788
+ return new Ht(
2789
2789
  e,
2790
- B(s, f.oklab.a.number.min, f.oklab.a.number.max),
2791
- B(i, f.oklab.b.number.min, f.oklab.b.number.max),
2790
+ R(s, b.oklab.a.number.min, b.oklab.a.number.max),
2791
+ R(i, b.oklab.b.number.min, b.oklab.b.number.max),
2792
2792
  r
2793
2793
  );
2794
2794
  }
2795
- function ti(e) {
2796
- return qr(Ln(e));
2795
+ function Aa(e) {
2796
+ return Yo(Br(e));
2797
2797
  }
2798
- function ei(e) {
2799
- return _n(Jr(e));
2798
+ function Ma(e) {
2799
+ return vr(Zo(e));
2800
2800
  }
2801
- function Ne(e) {
2802
- const t = Ur(e);
2803
- return Ie(t);
2801
+ function He(e) {
2802
+ const t = Fo(e);
2803
+ return De(t);
2804
2804
  }
2805
- function ze(e) {
2806
- const t = Re(e);
2807
- return Gr(t);
2805
+ function je(e) {
2806
+ const t = Ve(e);
2807
+ return xr(t);
2808
2808
  }
2809
- function Qr(e) {
2810
- const t = En(e);
2811
- return Ne(t);
2809
+ function qo(e) {
2810
+ const t = yr(e);
2811
+ return He(t);
2812
2812
  }
2813
- function to(e) {
2814
- const t = ze(e);
2815
- return An(t);
2813
+ function Ko(e) {
2814
+ const t = je(e);
2815
+ return Cr(t);
2816
2816
  }
2817
- function eo(e) {
2818
- const t = Fr(e);
2819
- return Ne(t);
2817
+ function Jo(e) {
2818
+ const t = zo(e);
2819
+ return He(t);
2820
2820
  }
2821
- function no(e) {
2822
- const t = ze(e);
2823
- return Dr(t);
2821
+ function Qo(e) {
2822
+ const t = je(e);
2823
+ return $o(t);
2824
2824
  }
2825
- function ro(e) {
2826
- const t = Zr(e);
2827
- return Be(t);
2825
+ function ts(e) {
2826
+ const t = Ho(e);
2827
+ return Fe(t);
2828
2828
  }
2829
- function oo(e) {
2830
- const t = Me(e);
2831
- return Kr(t);
2829
+ function es(e) {
2830
+ const t = $e(e);
2831
+ return jo(t);
2832
2832
  }
2833
- function so(e) {
2834
- const t = Ln(e);
2835
- return Pe(t);
2833
+ function ns(e) {
2834
+ const t = Br(e);
2835
+ return Xe(t);
2836
2836
  }
2837
- function io(e) {
2838
- const t = Oe(e);
2839
- return _n(t);
2837
+ function rs(e) {
2838
+ const t = We(e);
2839
+ return vr(t);
2840
2840
  }
2841
- function ao(e) {
2842
- const t = Bn(e);
2843
- return Ie(t);
2841
+ function os(e) {
2842
+ const t = Sr(e);
2843
+ return De(t);
2844
2844
  }
2845
- function co(e) {
2846
- const t = Re(e);
2847
- return $r(t);
2845
+ function ss(e) {
2846
+ const t = Ve(e);
2847
+ return Lo(t);
2848
2848
  }
2849
- const $n = 563 / 256;
2850
- function Jt(e) {
2851
- return (e < 0 ? -1 : 1) * Math.abs(e) ** $n;
2849
+ const Nr = 563 / 256;
2850
+ function ce(e) {
2851
+ return (e < 0 ? -1 : 1) * Math.abs(e) ** Nr;
2852
2852
  }
2853
- function lo(e) {
2854
- return (e < 0 ? -1 : 1) * Math.abs(e) ** (1 / $n);
2853
+ function is(e) {
2854
+ return (e < 0 ? -1 : 1) * Math.abs(e) ** (1 / Nr);
2855
2855
  }
2856
- const Fn = 1 / 512, Dn = 1.8;
2857
- function Qt(e) {
2856
+ const _r = 1 / 512, Pr = 1.8;
2857
+ function le(e) {
2858
2858
  const t = e < 0 ? -1 : 1, n = Math.abs(e);
2859
- return t * (n <= Fn * 16 ? n / 16 : n ** Dn);
2859
+ return t * (n <= _r * 16 ? n / 16 : n ** Pr);
2860
2860
  }
2861
- function uo(e) {
2861
+ function as(e) {
2862
2862
  const t = e < 0 ? -1 : 1, n = Math.abs(e);
2863
- return t * (n >= Fn ? n ** (1 / Dn) : n * 16);
2863
+ return t * (n >= _r ? n ** (1 / Pr) : n * 16);
2864
2864
  }
2865
- const Nt = 1.09929682680944, Gn = 0.018053968510807;
2866
- function te(e) {
2865
+ const Dt = 1.09929682680944, Or = 0.018053968510807;
2866
+ function ue(e) {
2867
2867
  const t = e < 0 ? -1 : 1, n = Math.abs(e);
2868
- return n < Gn * 4.5 ? t * n / 4.5 : t * ((n + Nt - 1) / Nt) ** (1 / 0.45);
2868
+ return n < Or * 4.5 ? t * n / 4.5 : t * ((n + Dt - 1) / Dt) ** (1 / 0.45);
2869
2869
  }
2870
- function mo(e) {
2870
+ function cs(e) {
2871
2871
  const t = e < 0 ? -1 : 1, n = Math.abs(e);
2872
- return n >= Gn ? t * (Nt * n ** 0.45 - (Nt - 1)) : t * 4.5 * n;
2872
+ return n >= Or ? t * (Dt * n ** 0.45 - (Dt - 1)) : t * 4.5 * n;
2873
2873
  }
2874
- const Un = [
2874
+ const Lr = [
2875
2875
  0.4865709486482162,
2876
2876
  0.26566769316909306,
2877
2877
  0.1982172852343625,
@@ -2881,7 +2881,7 @@ const Un = [
2881
2881
  0,
2882
2882
  0.04511338185890264,
2883
2883
  1.043944368900976
2884
- ], po = J(Un), Vn = [
2884
+ ], ls = nt(Lr), zr = [
2885
2885
  0.5766690429101305,
2886
2886
  0.1855582379065463,
2887
2887
  0.1882286462349947,
@@ -2891,7 +2891,7 @@ const Un = [
2891
2891
  0.02703136138641234,
2892
2892
  0.07068885253582723,
2893
2893
  0.9913375368376388
2894
- ], ho = J(Vn), Wn = [
2894
+ ], us = nt(zr), $r = [
2895
2895
  0.7977604896723027,
2896
2896
  0.13518583717574031,
2897
2897
  0.0313493495815248,
@@ -2901,7 +2901,7 @@ const Un = [
2901
2901
  0,
2902
2902
  0,
2903
2903
  0.8251046025104602
2904
- ], fo = J(Wn), Xn = [
2904
+ ], ps = nt($r), Fr = [
2905
2905
  0.6369580483012914,
2906
2906
  0.14461690358620832,
2907
2907
  0.1688809751641721,
@@ -2911,90 +2911,90 @@ const Un = [
2911
2911
  0,
2912
2912
  0.028072693049087428,
2913
2913
  1.0609850577107909
2914
- ], bo = J(Xn);
2915
- function go({ r: e, g: t, b: n, alpha: r }) {
2916
- const [o, s, i] = R([e, t, n], Ee);
2917
- return new D(o, s, i, r);
2918
- }
2919
- function wo({ x: e, y: t, z: n, alpha: r }) {
2920
- const [o, s, i] = R([e, t, n], Pn);
2921
- return new de(o, s, i, r);
2922
- }
2923
- function ko({ r: e, g: t, b: n, alpha: r }) {
2924
- const o = [ut(e), ut(t), ut(n)], [s, i, a] = R(o, Un);
2925
- return new D(s, i, a, r);
2926
- }
2927
- function yo({ x: e, y: t, z: n, alpha: r }) {
2928
- const o = R([e, t, n], po), [s, i, a] = o.map(zn);
2929
- return new ge(s, i, a, r);
2930
- }
2931
- function So({ r: e, g: t, b: n, alpha: r }) {
2932
- const o = [Jt(e), Jt(t), Jt(n)], [s, i, a] = R(o, Vn);
2933
- return new D(s, i, a, r);
2934
- }
2935
- function xo({ x: e, y: t, z: n, alpha: r }) {
2936
- const o = R([e, t, n], ho), [s, i, a] = o.map(lo);
2937
- return new we(s, i, a, r);
2938
- }
2939
- function Co({ r: e, g: t, b: n, alpha: r }) {
2940
- const o = [Qt(e), Qt(t), Qt(n)], s = R(o, Wn), [i, a, c] = R(s, wn);
2941
- return new D(i, a, c, r);
2942
- }
2943
- function To({ x: e, y: t, z: n, alpha: r }) {
2944
- const o = R([e, t, n], Ce), s = R(o, fo), [i, a, c] = s.map(uo);
2945
- return new ke(i, a, c, r);
2946
- }
2947
- function vo({ r: e, g: t, b: n, alpha: r }) {
2948
- const o = [te(e), te(t), te(n)], [s, i, a] = R(o, Xn);
2949
- return new D(s, i, a, r);
2950
- }
2951
- function Mo({ x: e, y: t, z: n, alpha: r }) {
2952
- const o = R([e, t, n], bo), [s, i, a] = o.map(mo);
2953
- return new ye(s, i, a, r);
2954
- }
2955
- const en = {
2956
- rgb: { to: Ie, from: Re },
2957
- hsl: { to: Ne, from: ze },
2958
- hsv: { to: Qr, from: to },
2959
- hwb: { to: eo, from: no },
2960
- lab: { to: Be, from: Me },
2961
- lch: { to: ro, from: oo },
2962
- oklab: { to: Pe, from: Oe },
2963
- oklch: { to: so, from: io },
2964
- kelvin: { to: ao, from: co },
2914
+ ], ms = nt(Fr);
2915
+ function hs({ r: e, g: t, b: n, alpha: r }) {
2916
+ const [o, s, i] = N([e, t, n], Ge);
2917
+ return new U(o, s, i, r);
2918
+ }
2919
+ function fs({ x: e, y: t, z: n, alpha: r }) {
2920
+ const [o, s, i] = N([e, t, n], Ar);
2921
+ return new Ie(o, s, i, r);
2922
+ }
2923
+ function bs({ r: e, g: t, b: n, alpha: r }) {
2924
+ const o = [wt(e), wt(t), wt(n)], [s, i, a] = N(o, Lr);
2925
+ return new U(s, i, a, r);
2926
+ }
2927
+ function ds({ x: e, y: t, z: n, alpha: r }) {
2928
+ const o = N([e, t, n], ls), [s, i, a] = o.map(Rr);
2929
+ return new Re(s, i, a, r);
2930
+ }
2931
+ function gs({ r: e, g: t, b: n, alpha: r }) {
2932
+ const o = [ce(e), ce(t), ce(n)], [s, i, a] = N(o, zr);
2933
+ return new U(s, i, a, r);
2934
+ }
2935
+ function ws({ x: e, y: t, z: n, alpha: r }) {
2936
+ const o = N([e, t, n], us), [s, i, a] = o.map(is);
2937
+ return new ve(s, i, a, r);
2938
+ }
2939
+ function ks({ r: e, g: t, b: n, alpha: r }) {
2940
+ const o = [le(e), le(t), le(n)], s = N(o, $r), [i, a, c] = N(s, ur);
2941
+ return new U(i, a, c, r);
2942
+ }
2943
+ function Ss({ x: e, y: t, z: n, alpha: r }) {
2944
+ const o = N([e, t, n], Oe), s = N(o, ps), [i, a, c] = s.map(as);
2945
+ return new Be(i, a, c, r);
2946
+ }
2947
+ function ys({ r: e, g: t, b: n, alpha: r }) {
2948
+ const o = [ue(e), ue(t), ue(n)], [s, i, a] = N(o, Fr);
2949
+ return new U(s, i, a, r);
2950
+ }
2951
+ function Cs({ x: e, y: t, z: n, alpha: r }) {
2952
+ const o = N([e, t, n], ms), [s, i, a] = o.map(cs);
2953
+ return new Ne(s, i, a, r);
2954
+ }
2955
+ const gn = {
2956
+ rgb: { to: De, from: Ve },
2957
+ hsl: { to: He, from: je },
2958
+ hsv: { to: qo, from: Ko },
2959
+ hwb: { to: Jo, from: Qo },
2960
+ lab: { to: Fe, from: $e },
2961
+ lch: { to: ts, from: es },
2962
+ oklab: { to: Xe, from: We },
2963
+ oklch: { to: ns, from: rs },
2964
+ kelvin: { to: os, from: ss },
2965
2965
  xyz: { to: (e) => e, from: (e) => e },
2966
- "srgb-linear": { to: go, from: wo },
2967
- "display-p3": { to: ko, from: yo },
2968
- "a98-rgb": { to: So, from: xo },
2969
- "prophoto-rgb": { to: Co, from: To },
2970
- rec2020: { to: vo, from: Mo }
2966
+ "srgb-linear": { to: hs, from: fs },
2967
+ "display-p3": { to: bs, from: ds },
2968
+ "a98-rgb": { to: gs, from: ws },
2969
+ "prophoto-rgb": { to: ks, from: Ss },
2970
+ rec2020: { to: ys, from: Cs }
2971
2971
  };
2972
- function it(e, t) {
2972
+ function pt(e, t) {
2973
2973
  if (e.colorSpace === t)
2974
2974
  return e;
2975
- const n = en[e.colorSpace].to, r = n(e), o = en[t].from;
2975
+ const n = gn[e.colorSpace].to, r = n(e), o = gn[t].from;
2976
2976
  return o(r);
2977
2977
  }
2978
- const lt = 1e-6;
2979
- function Bo(e) {
2980
- const t = it(e, "rgb"), n = Number.isNaN(t.r) ? 0 : t.r, r = Number.isNaN(t.g) ? 0 : t.g, o = Number.isNaN(t.b) ? 0 : t.b;
2978
+ const ft = 1e-6;
2979
+ function xs(e) {
2980
+ const t = pt(e, "rgb"), n = Number.isNaN(t.r) ? 0 : t.r, r = Number.isNaN(t.g) ? 0 : t.g, o = Number.isNaN(t.b) ? 0 : t.b;
2981
2981
  if (n >= 0 && n <= 1 && r >= 0 && r <= 1 && o >= 0 && o <= 1)
2982
2982
  return e;
2983
- if (n >= -lt && n <= 1 + lt && r >= -lt && r <= 1 + lt && o >= -lt && o <= 1 + lt) {
2984
- const l = new $(X(n, 0, 1), X(r, 0, 1), X(o, 0, 1), e.alpha);
2985
- return it(l, e.colorSpace);
2983
+ if (n >= -ft && n <= 1 + ft && r >= -ft && r <= 1 + ft && o >= -ft && o <= 1 + ft) {
2984
+ const l = new O(v(n, 0, 1), v(r, 0, 1), v(o, 0, 1), e.alpha);
2985
+ return pt(l, e.colorSpace);
2986
2986
  }
2987
- const [s, i, a] = _r(n, r, o), c = new $(s, i, a, e.alpha);
2988
- return it(c, e.colorSpace);
2987
+ const [s, i, a] = Po(n, r, o), c = new O(s, i, a, e.alpha);
2988
+ return pt(c, e.colorSpace);
2989
2989
  }
2990
- const Eo = {
2990
+ const Ts = {
2991
2991
  hsl: "h",
2992
2992
  hsv: "h",
2993
2993
  hwb: "h",
2994
2994
  lch: "h",
2995
2995
  oklch: "h"
2996
2996
  };
2997
- function Ao(e, t, n, r = "shorter") {
2997
+ function Es(e, t, n, r = "shorter") {
2998
2998
  if (Number.isNaN(e) && Number.isNaN(t)) return 0;
2999
2999
  if (Number.isNaN(e)) return t;
3000
3000
  if (Number.isNaN(t)) return e;
@@ -3016,40 +3016,40 @@ function Ao(e, t, n, r = "shorter") {
3016
3016
  let s = e + n * (t - e);
3017
3017
  return s = (s % 1 + 1) % 1, s;
3018
3018
  }
3019
- function Io(e, t, n, r, o = "oklab", s = "shorter") {
3020
- const i = it(e, o), a = it(t, o);
3019
+ function As(e, t, n, r, o = "oklab", s = "shorter") {
3020
+ const i = pt(e, o), a = pt(t, o);
3021
3021
  n < 0 && (n = 0), r < 0 && (r = 0);
3022
3022
  const c = n + r;
3023
3023
  c === 0 ? (n = 0.5, r = 0.5) : c !== 1 && (n = n / c, r = r / c);
3024
- const l = Math.min(c, 1), m = Eo[o], u = i.keys().filter((E) => E !== "alpha"), d = Number.isNaN(i.alpha) ? a.alpha : i.alpha, x = Number.isNaN(a.alpha) ? i.alpha : a.alpha, S = oe(r, d, x) * l, C = [];
3025
- for (const E of u) {
3026
- let N = i[E], V = a[E];
3027
- if (Number.isNaN(N) && Number.isNaN(V)) {
3028
- C.push(0);
3024
+ const l = Math.min(c, 1), p = Ts[o], u = i.keys().filter((A) => A !== "alpha"), f = Number.isNaN(i.alpha) ? a.alpha : i.alpha, C = Number.isNaN(a.alpha) ? i.alpha : a.alpha, y = de(r, f, C) * l, T = [];
3025
+ for (const A of u) {
3026
+ let L = i[A], X = a[A];
3027
+ if (Number.isNaN(L) && Number.isNaN(X)) {
3028
+ T.push(0);
3029
3029
  continue;
3030
3030
  }
3031
- if (Number.isNaN(N) && (N = V), Number.isNaN(V) && (V = N), E === m)
3032
- C.push(Ao(N, V, r, s));
3031
+ if (Number.isNaN(L) && (L = X), Number.isNaN(X) && (X = L), A === p)
3032
+ T.push(Es(L, X, r, s));
3033
3033
  else {
3034
- const tt = N * d, et = V * x, nt = oe(r, tt, et);
3035
- C.push(S > 0 ? nt / S : 0);
3034
+ const ot = L * f, st = X * C, it = de(r, ot, st);
3035
+ T.push(y > 0 ? it / y : 0);
3036
3036
  }
3037
3037
  }
3038
- const P = i.constructor;
3039
- return new P(...C, S);
3038
+ const w = i.constructor;
3039
+ return new w(...T, y);
3040
3040
  }
3041
- const Ro = (e, t, n) => {
3042
- const r = f[t][n];
3041
+ const Ms = (e, t, n) => {
3042
+ const r = b[t][n];
3043
3043
  return r[e] ?? r.number;
3044
- }, Po = (e, t, n, r, o = !1) => {
3045
- t = o ? gn[n][r] : t;
3046
- const { min: s, max: i } = Ro(t, n, r), [a, c, l, m] = o ? [s, i, 0, 1] : [0, 1, s, i], u = B(e, l, m, a, c);
3047
- return new k(u, o ? t : "");
3048
- }, Oo = (e, t = !1) => {
3044
+ }, Is = (e, t, n, r, o = !1) => {
3045
+ t = o ? lr[n][r] : t;
3046
+ const { min: s, max: i } = Ms(t, n, r), [a, c, l, p] = o ? [s, i, 0, 1] : [0, 1, s, i], u = R(e, l, p, a, c);
3047
+ return new S(u, o ? t : "");
3048
+ }, Rs = (e, t = !1) => {
3049
3049
  const n = e.colorSpace;
3050
3050
  return e.keys().forEach((r) => {
3051
- const o = e[r] instanceof k ? e[r].value : e[r];
3052
- e[r] = Po(
3051
+ const o = e[r] instanceof S ? e[r].value : e[r];
3052
+ e[r] = Is(
3053
3053
  o,
3054
3054
  e[r]?.unit,
3055
3055
  n,
@@ -3057,38 +3057,38 @@ const Ro = (e, t, n) => {
3057
3057
  t
3058
3058
  );
3059
3059
  }), e;
3060
- }, ie = (e, t = !1, n = !1) => {
3060
+ }, we = (e, t = !1, n = !1) => {
3061
3061
  e = n ? e : e.clone();
3062
- const r = Oo(e.value, t);
3063
- return n ? e : new k(r).coalesce(e, !0);
3064
- }, nn = (e, t = "lab", n = !1, r = !1, o = !1) => {
3065
- const s = n ? o ? e : e.clone() : ie(e, !1, o), i = it(s.toJSON(), t);
3062
+ const r = Rs(e.value, t);
3063
+ return n ? e : new S(r).coalesce(e, !0);
3064
+ }, wn = (e, t = "lab", n = !1, r = !1, o = !1) => {
3065
+ const s = n ? o ? e : e.clone() : we(e, !1, o), i = pt(s.toJSON(), t);
3066
3066
  return i.entries().forEach(([a, c]) => {
3067
- i[a] = new k(c);
3068
- }), s.value = i, s.superType[1] = t, r ? ie(s, !0, !0) : s;
3069
- }, No = (e, t, n = "lab", r = !1, o = !1, s = !1) => [
3070
- nn(e, n, r, o, s),
3071
- nn(t, n, r, o, s)
3072
- ], F = (e) => new k(
3067
+ i[a] = new S(c);
3068
+ }), s.value = i, s.superType[1] = t, r ? we(s, !0, !0) : s;
3069
+ }, vs = (e, t, n = "lab", r = !1, o = !1, s = !1) => [
3070
+ wn(e, n, r, o, s),
3071
+ wn(t, n, r, o, s)
3072
+ ], G = (e) => new S(
3073
3073
  e,
3074
3074
  "color",
3075
3075
  ["color", e.colorSpace],
3076
3076
  void 0,
3077
3077
  "color"
3078
3078
  );
3079
- function ae(e) {
3080
- const n = ie(e).value, r = n.clone();
3079
+ function ke(e) {
3080
+ const n = we(e).value, r = n.clone();
3081
3081
  for (const o of n.keys()) {
3082
3082
  const s = n[o];
3083
- r[o] = s instanceof k ? s.value : s;
3083
+ r[o] = s instanceof S ? s.value : s;
3084
3084
  }
3085
3085
  return r;
3086
3086
  }
3087
- function zo(e) {
3087
+ function Bs(e) {
3088
3088
  const t = e.replace(/[^0-9.+\-*/() e]/g, "");
3089
3089
  return new Function(`return (${t})`)();
3090
3090
  }
3091
- function rn(e, t) {
3091
+ function kn(e, t) {
3092
3092
  switch (e.type) {
3093
3093
  case "ref":
3094
3094
  return t[e.name] ?? 0;
@@ -3101,32 +3101,32 @@ function rn(e, t) {
3101
3101
  const r = Object.keys(t).sort((o, s) => s.length - o.length);
3102
3102
  for (const o of r)
3103
3103
  n = n.replace(new RegExp(`\\b${o}\\b`, "g"), String(t[o]));
3104
- return zo(n);
3104
+ return Bs(n);
3105
3105
  }
3106
3106
  }
3107
3107
  }
3108
- function _o(e, t, n, r) {
3109
- const o = ae(e), s = it(o, t), i = {};
3110
- for (const [d, x] of s.entries())
3111
- i[d] = x;
3112
- const a = n.map((d) => rn(d, i)), c = r ? rn(r, i) : i.alpha ?? 1, m = {
3113
- rgb: $,
3114
- hsl: St,
3115
- hwb: he,
3116
- lab: Lt,
3117
- lch: fe,
3118
- oklab: $t,
3119
- oklch: be,
3120
- xyz: D,
3121
- "srgb-linear": de,
3122
- "display-p3": ge,
3123
- "a98-rgb": we,
3124
- "prophoto-rgb": ke,
3125
- rec2020: ye
3126
- }[t] ?? $, u = new m(...a, c);
3127
- return F(u);
3128
- }
3129
- const Lo = {
3108
+ function Ns(e, t, n, r) {
3109
+ const o = ke(e), s = pt(o, t), i = {};
3110
+ for (const [f, C] of s.entries())
3111
+ i[f] = C;
3112
+ const a = n.map((f) => kn(f, i)), c = r ? kn(r, i) : i.alpha ?? 1, p = {
3113
+ rgb: O,
3114
+ hsl: yt,
3115
+ hwb: Ee,
3116
+ lab: Wt,
3117
+ lch: Ae,
3118
+ oklab: Ht,
3119
+ oklch: Me,
3120
+ xyz: U,
3121
+ "srgb-linear": Ie,
3122
+ "display-p3": Re,
3123
+ "a98-rgb": ve,
3124
+ "prophoto-rgb": Be,
3125
+ rec2020: Ne
3126
+ }[t] ?? O, u = new p(...a, c);
3127
+ return G(u);
3128
+ }
3129
+ const _s = {
3130
3130
  srgb: "rgb",
3131
3131
  "srgb-linear": "srgb-linear",
3132
3132
  "display-p3": "display-p3",
@@ -3142,352 +3142,352 @@ const Lo = {
3142
3142
  xyz: "xyz",
3143
3143
  "xyz-d65": "xyz",
3144
3144
  "xyz-d50": "xyz"
3145
- }, $o = {
3146
- srgb: { space: "rgb", ctor: $ },
3147
- "srgb-linear": { space: "srgb-linear", ctor: de },
3148
- "display-p3": { space: "display-p3", ctor: ge },
3149
- "a98-rgb": { space: "a98-rgb", ctor: we },
3150
- "prophoto-rgb": { space: "prophoto-rgb", ctor: ke },
3151
- rec2020: { space: "rec2020", ctor: ye },
3152
- xyz: { space: "xyz", ctor: D },
3153
- "xyz-d65": { space: "xyz", ctor: D },
3154
- "xyz-d50": { space: "xyz", ctor: D }
3155
- }, Fo = A(","), Do = G(/\s+/), Ft = A("/"), Dt = A("("), Gt = A(")"), zt = b(Fo.trim(g), Do), Hn = b(Ft.trim(g), zt), W = y.lazy(() => b(
3145
+ }, Ps = {
3146
+ srgb: { space: "rgb", ctor: O },
3147
+ "srgb-linear": { space: "srgb-linear", ctor: Ie },
3148
+ "display-p3": { space: "display-p3", ctor: Re },
3149
+ "a98-rgb": { space: "a98-rgb", ctor: ve },
3150
+ "prophoto-rgb": { space: "prophoto-rgb", ctor: Be },
3151
+ rec2020: { space: "rec2020", ctor: Ne },
3152
+ xyz: { space: "xyz", ctor: U },
3153
+ "xyz-d65": { space: "xyz", ctor: U },
3154
+ "xyz-d50": { space: "xyz", ctor: U }
3155
+ }, Os = B(","), Ls = D(/\s+/), Yt = B("/"), Zt = B("("), qt = B(")"), Vt = d(Os.trim(g), Ls), Gr = d(Yt.trim(g), Vt), W = x.lazy(() => d(
3156
3156
  H.Percentage,
3157
3157
  H.Angle.map((e) => {
3158
- const t = Se(e.value, e.unit);
3159
- return new k(t, "deg", ["angle"]);
3158
+ const t = _e(e.value, e.unit);
3159
+ return new S(t, "deg", ["angle"]);
3160
3160
  }),
3161
- b(q, wr).map((e) => new k(e)),
3162
- xe.map(() => new k(NaN))
3163
- )), wt = b(
3161
+ d(et, go).map((e) => new S(e)),
3162
+ Pe.map(() => new S(NaN))
3163
+ )), Mt = d(
3164
3164
  // calc(...)
3165
- p("calc").next(
3166
- G(/\(([^)]+)\)/, (e) => e?.[1] ?? null)
3165
+ m("calc").next(
3166
+ D(/\(([^)]+)\)/, (e) => e?.[1] ?? null)
3167
3167
  ).map((e) => ({ type: "calc", expr: e })),
3168
3168
  // none
3169
- xe.map(() => ({ type: "none" })),
3169
+ Pe.map(() => ({ type: "none" })),
3170
3170
  // component reference (alpha must be tried before single 'a')
3171
- G(/\b(alpha|r|g|b|h|s|l|c|w|a|x|y|z)\b/).map(
3171
+ D(/\b(alpha|r|g|b|h|s|l|c|w|a|x|y|z)\b/).map(
3172
3172
  (e) => ({ type: "ref", name: e })
3173
3173
  ),
3174
3174
  // literal number / percentage / angle
3175
3175
  W.map((e) => ({ type: "literal", value: e.value }))
3176
- ), Z = (e) => {
3177
- const t = A(e).skip(p("a").opt()), n = b(
3178
- M(W.skip(Hn), W),
3176
+ ), q = (e) => {
3177
+ const t = B(e).skip(m("a").opt()), n = d(
3178
+ I(W.skip(Gr), W),
3179
3179
  W.map((o) => [o])
3180
- ), r = M(
3181
- W.skip(zt),
3182
- W.skip(zt),
3180
+ ), r = I(
3181
+ W.skip(Vt),
3182
+ W.skip(Vt),
3183
3183
  n
3184
- ).trim(g).wrap(Dt, Gt);
3185
- return t.next(r).map(([o, s, [i, a]]) => [o, s, i, a ?? new k(1)]);
3184
+ ).trim(g).wrap(Zt, qt);
3185
+ return t.next(r).map(([o, s, [i, a]]) => [o, s, i, a ?? new S(1)]);
3186
3186
  };
3187
- function Q(e, t) {
3188
- return A(e).skip(p("a").opt()).next(
3189
- M(
3190
- p("from").skip(g).next(y.lazy(() => _e.Value)),
3191
- g.next(wt),
3192
- g.next(wt),
3193
- g.next(wt),
3194
- Ft.trim(g).next(wt).opt()
3195
- ).trim(g).wrap(Dt, Gt)
3196
- ).map(([n, r, o, s, i]) => _o(n, t, [r, o, s], i));
3197
- }
3198
- const Go = G(/#[0-9a-fA-F]{3,8}/).map((e) => {
3199
- const { r: t, g: n, b: r, alpha: o } = Lr(e);
3200
- return F(new $(t, n, r, o));
3201
- }), Uo = q.skip(p("k")).map((e) => {
3202
- const t = Bn(new un(e));
3203
- return F(t);
3204
- }), Vo = b(
3205
- Q("rgb", "rgb"),
3206
- Z("rgb").map(
3207
- ([e, t, n, r]) => F(new $(e, t, n, r))
3187
+ function rt(e, t) {
3188
+ return B(e).skip(m("a").opt()).next(
3189
+ I(
3190
+ m("from").skip(g).next(x.lazy(() => Ye.Value)),
3191
+ g.next(Mt),
3192
+ g.next(Mt),
3193
+ g.next(Mt),
3194
+ Yt.trim(g).next(Mt).opt()
3195
+ ).trim(g).wrap(Zt, qt)
3196
+ ).map(([n, r, o, s, i]) => Ns(n, t, [r, o, s], i));
3197
+ }
3198
+ const zs = D(/#[0-9a-fA-F]{3,8}/).map((e) => {
3199
+ const { r: t, g: n, b: r, alpha: o } = Oo(e);
3200
+ return G(new O(t, n, r, o));
3201
+ }), $s = et.skip(m("k")).map((e) => {
3202
+ const t = Sr(new nr(e));
3203
+ return G(t);
3204
+ }), Fs = d(
3205
+ rt("rgb", "rgb"),
3206
+ q("rgb").map(
3207
+ ([e, t, n, r]) => G(new O(e, t, n, r))
3208
3208
  )
3209
- ), Wo = b(
3210
- Q("hsl", "hsl"),
3211
- Z("hsl").map(
3212
- ([e, t, n, r]) => F(new St(e, t, n, r))
3209
+ ), Gs = d(
3210
+ rt("hsl", "hsl"),
3211
+ q("hsl").map(
3212
+ ([e, t, n, r]) => G(new yt(e, t, n, r))
3213
3213
  )
3214
- ), Xo = Z("hsv").map(
3215
- ([e, t, n, r]) => F(new pe(e, t, n, r))
3216
- ), Ho = b(
3217
- Q("hwb", "hwb"),
3218
- Z("hwb").map(
3219
- ([e, t, n, r]) => F(new he(e, t, n, r))
3214
+ ), Us = q("hsv").map(
3215
+ ([e, t, n, r]) => G(new Te(e, t, n, r))
3216
+ ), Ds = d(
3217
+ rt("hwb", "hwb"),
3218
+ q("hwb").map(
3219
+ ([e, t, n, r]) => G(new Ee(e, t, n, r))
3220
3220
  )
3221
- ), Yo = b(
3222
- Q("lab", "lab"),
3223
- Z("lab").map(
3224
- ([e, t, n, r]) => F(new Lt(e, t, n, r))
3221
+ ), Vs = d(
3222
+ rt("lab", "lab"),
3223
+ q("lab").map(
3224
+ ([e, t, n, r]) => G(new Wt(e, t, n, r))
3225
3225
  )
3226
- ), jo = b(
3227
- Q("lch", "lch"),
3228
- Z("lch").map(
3229
- ([e, t, n, r]) => F(new fe(e, t, n, r))
3226
+ ), Xs = d(
3227
+ rt("lch", "lch"),
3228
+ q("lch").map(
3229
+ ([e, t, n, r]) => G(new Ae(e, t, n, r))
3230
3230
  )
3231
- ), Zo = b(
3232
- Q("oklab", "oklab"),
3233
- Z("oklab").map(
3234
- ([e, t, n, r]) => F(new $t(e, t, n, r))
3231
+ ), Ws = d(
3232
+ rt("oklab", "oklab"),
3233
+ q("oklab").map(
3234
+ ([e, t, n, r]) => G(new Ht(e, t, n, r))
3235
3235
  )
3236
- ), Ko = b(
3237
- Q("oklch", "oklch"),
3238
- Z("oklch").map(
3239
- ([e, t, n, r]) => F(new be(e, t, n, r))
3236
+ ), Hs = d(
3237
+ rt("oklch", "oklch"),
3238
+ q("oklch").map(
3239
+ ([e, t, n, r]) => G(new Me(e, t, n, r))
3240
3240
  )
3241
- ), qo = b(
3242
- Q("xyz", "xyz"),
3243
- Z("xyz").map(
3244
- ([e, t, n, r]) => F(new D(e, t, n, r))
3241
+ ), js = d(
3242
+ rt("xyz", "xyz"),
3243
+ q("xyz").map(
3244
+ ([e, t, n, r]) => G(new U(e, t, n, r))
3245
3245
  )
3246
- ), Jo = b(
3247
- p("srgb-linear").map(() => "srgb-linear"),
3248
- p("srgb").map(() => "srgb"),
3249
- p("display-p3").map(() => "display-p3"),
3250
- p("a98-rgb").map(() => "a98-rgb"),
3251
- p("prophoto-rgb").map(() => "prophoto-rgb"),
3252
- p("rec2020").map(() => "rec2020"),
3253
- p("oklab").map(() => "oklab"),
3254
- p("oklch").map(() => "oklch"),
3255
- p("lab").map(() => "lab"),
3256
- p("lch").map(() => "lch"),
3257
- p("hsl").map(() => "hsl"),
3258
- p("hwb").map(() => "hwb"),
3259
- p("xyz-d65").map(() => "xyz-d65"),
3260
- p("xyz-d50").map(() => "xyz-d50"),
3261
- p("xyz").map(() => "xyz")
3262
- ), Qo = b(
3263
- p("shorter"),
3264
- p("longer"),
3265
- p("increasing"),
3266
- p("decreasing")
3267
- ).skip(g).skip(p("hue")), on = y.lazy(
3268
- () => M(
3269
- _e.Value,
3246
+ ), Ys = d(
3247
+ m("srgb-linear").map(() => "srgb-linear"),
3248
+ m("srgb").map(() => "srgb"),
3249
+ m("display-p3").map(() => "display-p3"),
3250
+ m("a98-rgb").map(() => "a98-rgb"),
3251
+ m("prophoto-rgb").map(() => "prophoto-rgb"),
3252
+ m("rec2020").map(() => "rec2020"),
3253
+ m("oklab").map(() => "oklab"),
3254
+ m("oklch").map(() => "oklch"),
3255
+ m("lab").map(() => "lab"),
3256
+ m("lch").map(() => "lch"),
3257
+ m("hsl").map(() => "hsl"),
3258
+ m("hwb").map(() => "hwb"),
3259
+ m("xyz-d65").map(() => "xyz-d65"),
3260
+ m("xyz-d50").map(() => "xyz-d50"),
3261
+ m("xyz").map(() => "xyz")
3262
+ ), Zs = d(
3263
+ m("shorter"),
3264
+ m("longer"),
3265
+ m("increasing"),
3266
+ m("decreasing")
3267
+ ).skip(g).skip(m("hue")), Sn = x.lazy(
3268
+ () => I(
3269
+ Ye.Value,
3270
3270
  g.next(H.Percentage).opt()
3271
3271
  )
3272
- ), ts = p("color-mix").next(
3273
- M(
3272
+ ), qs = m("color-mix").next(
3273
+ I(
3274
3274
  // "in <space> [<hueMethod>]"
3275
- p("in").skip(g).next(
3276
- M(
3277
- Jo,
3278
- g.next(Qo).opt()
3275
+ m("in").skip(g).next(
3276
+ I(
3277
+ Ys,
3278
+ g.next(Zs).opt()
3279
3279
  )
3280
3280
  ),
3281
3281
  // ", <color> [<pct>]?"
3282
- A(",").trim(g).next(on),
3282
+ B(",").trim(g).next(Sn),
3283
3283
  // ", <color> [<pct>]?"
3284
- A(",").trim(g).next(on)
3285
- ).trim(g).wrap(Dt, Gt)
3284
+ B(",").trim(g).next(Sn)
3285
+ ).trim(g).wrap(Zt, qt)
3286
3286
  ).map(([[e, t], [n, r], [o, s]]) => {
3287
- const i = Lo[e] ?? "oklab", a = t ?? "shorter";
3287
+ const i = _s[e] ?? "oklab", a = t ?? "shorter";
3288
3288
  let c = r != null ? r.value / 100 : -1, l = s != null ? s.value / 100 : -1;
3289
3289
  c < 0 && l < 0 ? (c = 0.5, l = 0.5) : c < 0 ? c = 1 - l : l < 0 && (l = 1 - c);
3290
- const m = ae(n), u = ae(o), d = Io(m, u, c, l, i, a);
3291
- return F(d);
3292
- }), es = b(
3293
- p("srgb-linear").map(() => "srgb-linear"),
3294
- p("srgb").map(() => "srgb"),
3295
- p("display-p3").map(() => "display-p3"),
3296
- p("a98-rgb").map(() => "a98-rgb"),
3297
- p("prophoto-rgb").map(() => "prophoto-rgb"),
3298
- p("rec2020").map(() => "rec2020"),
3299
- p("xyz-d65").map(() => "xyz-d65"),
3300
- p("xyz-d50").map(() => "xyz-d50"),
3301
- p("xyz").map(() => "xyz")
3302
- ), ns = p("color").next(
3303
- M(
3304
- es.skip(g),
3290
+ const p = ke(n), u = ke(o), f = As(p, u, c, l, i, a);
3291
+ return G(f);
3292
+ }), Ks = d(
3293
+ m("srgb-linear").map(() => "srgb-linear"),
3294
+ m("srgb").map(() => "srgb"),
3295
+ m("display-p3").map(() => "display-p3"),
3296
+ m("a98-rgb").map(() => "a98-rgb"),
3297
+ m("prophoto-rgb").map(() => "prophoto-rgb"),
3298
+ m("rec2020").map(() => "rec2020"),
3299
+ m("xyz-d65").map(() => "xyz-d65"),
3300
+ m("xyz-d50").map(() => "xyz-d50"),
3301
+ m("xyz").map(() => "xyz")
3302
+ ), Js = m("color").next(
3303
+ I(
3304
+ Ks.skip(g),
3305
3305
  W.skip(g),
3306
3306
  W.skip(g),
3307
- b(
3308
- M(
3309
- W.skip(Ft.trim(g)),
3307
+ d(
3308
+ I(
3309
+ W.skip(Yt.trim(g)),
3310
3310
  W
3311
3311
  ),
3312
3312
  W.map((e) => [e, void 0])
3313
3313
  )
3314
- ).trim(g).wrap(Dt, Gt)
3314
+ ).trim(g).wrap(Zt, qt)
3315
3315
  ).map(([e, t, n, [r, o]]) => {
3316
- const s = $o[e];
3316
+ const s = Ps[e];
3317
3317
  if (!s)
3318
3318
  throw new Error(`Unknown color() space: ${e}`);
3319
- const i = o ?? new k(1);
3319
+ const i = o ?? new S(1);
3320
3320
  if (e === "srgb") {
3321
3321
  const c = (l) => l.value * 255;
3322
- return F(new $(c(t), c(n), c(r), i.value));
3322
+ return G(new O(c(t), c(n), c(r), i.value));
3323
3323
  }
3324
3324
  const a = new s.ctor(t, n, r, i);
3325
- return F(a);
3326
- }), rs = b(
3327
- ...Object.keys(tn).sort((e, t) => t.length - e.length).map(p)
3325
+ return G(a);
3326
+ }), Qs = d(
3327
+ ...Object.keys(dn).sort((e, t) => t.length - e.length).map(m)
3328
3328
  ).chain((e) => {
3329
- const t = tn[e.toLowerCase()];
3329
+ const t = dn[e.toLowerCase()];
3330
3330
  if (t) {
3331
- const n = tr(t);
3331
+ const n = Yr(t);
3332
3332
  if (n)
3333
- return kr(n);
3334
- }
3335
- return yr();
3336
- }), Yn = b(
3337
- ts,
3338
- ns,
3339
- Go,
3340
- Uo,
3341
- Vo,
3342
- Wo,
3343
- Xo,
3344
- Ho,
3345
- Yo,
3346
- jo,
3347
- Zo,
3348
- Ko,
3349
- qo,
3350
- rs
3351
- ).trim(g), _e = {
3352
- Value: Yn,
3333
+ return wo(n);
3334
+ }
3335
+ return ko();
3336
+ }), Ur = d(
3337
+ qs,
3338
+ Js,
3339
+ zs,
3340
+ $s,
3341
+ Fs,
3342
+ Gs,
3343
+ Us,
3344
+ Ds,
3345
+ Vs,
3346
+ Xs,
3347
+ Ws,
3348
+ Hs,
3349
+ js,
3350
+ Qs
3351
+ ).trim(g), Ye = {
3352
+ Value: Ur,
3353
3353
  colorValue: W,
3354
- componentExpr: wt,
3355
- sep: zt,
3356
- alphaSep: Hn,
3357
- div: Ft
3354
+ componentExpr: Mt,
3355
+ sep: Vt,
3356
+ alphaSep: Gr,
3357
+ div: Yt
3358
3358
  };
3359
- function ni(e) {
3360
- return Ct(Yn, e);
3359
+ function Ia(e) {
3360
+ return Bt(Ur, e);
3361
3361
  }
3362
- const os = b(...Mt.map(p)), ss = b(...Et.map(p)), is = b(...Bt.map(p)), as = b(...At.map(p)), cs = b(...ln.map(p)), ls = A(","), us = A(" "), ms = b(ls, us).trim(g), jn = M(q, os).map(([e, t]) => {
3362
+ const ti = d(...Pt.map(m)), ei = d(...Lt.map(m)), ni = d(...Ot.map(m)), ri = d(...zt.map(m)), oi = d(...er.map(m)), si = B(","), ii = B(" "), ai = d(si, ii).trim(g), Dr = I(et, ti).map(([e, t]) => {
3363
3363
  const n = ["length"];
3364
- return cn.includes(t) ? n.push("relative") : an.includes(t) && n.push("absolute"), new k(e, t, n);
3365
- }), Zn = M(q, ss).map(([e, t]) => new k(e, t, ["angle"])), Le = M(q, is).map(([e, t]) => new k(e, t, ["time"])), ps = y.lazy(() => b($e, Le)), Kn = M(q, as).map(([e, t]) => new k(e, t, ["resolution"])), $e = b(
3366
- M(q, cs),
3367
- p("from").map(() => [0, "%"]),
3368
- p("to").map(() => [100, "%"])
3369
- ).map(([e, t]) => new k(e, t, ["percentage"])), qn = y.lazy(() => _e.Value), Jn = A("/").trim(g).map(() => new k("/", "string")), Qn = b(
3370
- jn,
3371
- Zn,
3372
- Le,
3373
- Kn,
3374
- $e,
3375
- qn,
3376
- Jn,
3377
- q.map((e) => new k(e)),
3378
- xe.map(() => new k(NaN))
3364
+ return tr.includes(t) ? n.push("relative") : Qn.includes(t) && n.push("absolute"), new S(e, t, n);
3365
+ }), Vr = I(et, ei).map(([e, t]) => new S(e, t, ["angle"])), Ze = I(et, ni).map(([e, t]) => new S(e, t, ["time"])), ci = x.lazy(() => d(qe, Ze)), Xr = I(et, ri).map(([e, t]) => new S(e, t, ["resolution"])), qe = d(
3366
+ I(et, oi),
3367
+ m("from").map(() => [0, "%"]),
3368
+ m("to").map(() => [100, "%"])
3369
+ ).map(([e, t]) => new S(e, t, ["percentage"])), Wr = x.lazy(() => Ye.Value), Hr = B("/").trim(g).map(() => new S("/", "string")), jr = d(
3370
+ Dr,
3371
+ Vr,
3372
+ Ze,
3373
+ Xr,
3374
+ qe,
3375
+ Wr,
3376
+ Hr,
3377
+ et.map((e) => new S(e)),
3378
+ Pe.map(() => new S(NaN))
3379
3379
  ).trim(g), H = {
3380
- Length: jn,
3381
- Angle: Zn,
3382
- Time: Le,
3383
- TimePercentage: ps,
3384
- Resolution: Kn,
3385
- Percentage: $e,
3386
- Color: qn,
3387
- Slash: Jn,
3388
- Value: Qn,
3389
- sep: ms
3380
+ Length: Dr,
3381
+ Angle: Vr,
3382
+ Time: Ze,
3383
+ TimePercentage: ci,
3384
+ Resolution: Xr,
3385
+ Percentage: qe,
3386
+ Color: Wr,
3387
+ Slash: Hr,
3388
+ Value: jr,
3389
+ sep: ai
3390
3390
  };
3391
- function tr(e) {
3392
- return Ct(Qn, e);
3393
- }
3394
- const mt = A("("), pt = A(")"), ce = A(","), er = y.lazy(
3395
- () => Ge.sepBy(b(ce, g)).trim(g).map((e) => new xt(...e))
3396
- ), Fe = (e) => M(
3397
- e || gr,
3398
- er.wrap(mt, pt)
3399
- ), hs = () => {
3400
- const e = G(/[^)]+/);
3401
- return A("var").next(e.trim(g).wrap(mt, pt)).map((t) => new k(t, "var"));
3402
- }, fs = () => {
3403
- const e = y.lazy(
3404
- () => b(
3405
- G(/[^()]+/),
3406
- e.many(1).wrap(mt, pt).map((t) => `(${t.join(" ")})`)
3391
+ function Yr(e) {
3392
+ return Bt(jr, e);
3393
+ }
3394
+ const kt = B("("), St = B(")"), Se = B(","), Zr = x.lazy(
3395
+ () => Qe.sepBy(d(Se, g)).trim(g).map((e) => new vt(...e))
3396
+ ), Ke = (e) => I(
3397
+ e || bo,
3398
+ Zr.wrap(kt, St)
3399
+ ), li = () => {
3400
+ const e = D(/[^)]+/);
3401
+ return B("var").next(e.trim(g).wrap(kt, St)).map((t) => new S(t, "var"));
3402
+ }, ui = () => {
3403
+ const e = x.lazy(
3404
+ () => d(
3405
+ D(/[^()]+/),
3406
+ e.many(1).wrap(kt, St).map((t) => `(${t.join(" ")})`)
3407
3407
  ).many(1)
3408
3408
  );
3409
- return A("calc").next(
3410
- b(
3411
- y.lazy(() => Ge).trim(g).wrap(mt, pt),
3412
- e.wrap(mt, pt).map((t) => t.join(" "))
3409
+ return B("calc").next(
3410
+ d(
3411
+ x.lazy(() => Qe).trim(g).wrap(kt, St),
3412
+ e.wrap(kt, St).map((t) => t.join(" "))
3413
3413
  )
3414
- ).map((t) => t instanceof k ? t : new k(t, "calc"));
3415
- }, bs = ["translate", "scale", "rotate", "skew"], le = ["x", "y", "z"], ds = le.map(p), gs = bs.map(p), ws = () => {
3416
- const e = M(
3417
- b(...gs),
3418
- b(...ds, A(""))
3414
+ ).map((t) => t instanceof S ? t : new S(t, "calc"));
3415
+ }, pi = ["translate", "scale", "rotate", "skew"], ye = ["x", "y", "z"], mi = ye.map(m), hi = pi.map(m), fi = () => {
3416
+ const e = I(
3417
+ d(...hi),
3418
+ d(...mi, B(""))
3419
3419
  ), t = (r, o) => r + o.toUpperCase();
3420
- return Fe(e).map(([[r, o], s]) => {
3420
+ return Ke(e).map(([[r, o], s]) => {
3421
3421
  const i = r.toLowerCase(), a = {};
3422
3422
  if (o) {
3423
3423
  const l = i + o.toUpperCase();
3424
3424
  a[l] = s[0];
3425
- } else s.length === 1 ? le.forEach((l) => {
3426
- const m = t(i, l);
3427
- a[m] = s[0];
3428
- }) : s.forEach((l, m) => {
3429
- const u = t(i, le[m]);
3425
+ } else s.length === 1 ? ye.forEach((l) => {
3426
+ const p = t(i, l);
3427
+ a[p] = s[0];
3428
+ }) : s.forEach((l, p) => {
3429
+ const u = t(i, ye[p]);
3430
3430
  a[u] = l;
3431
3431
  });
3432
- const c = Object.entries(a).map(([l, m]) => new at(l, [m]));
3433
- return new xt(...c);
3432
+ const c = Object.entries(a).map(([l, p]) => new mt(l, [p]));
3433
+ return new vt(...c);
3434
3434
  });
3435
- }, ks = {
3435
+ }, bi = {
3436
3436
  left: "270",
3437
3437
  right: "90",
3438
3438
  top: "0",
3439
3439
  bottom: "180"
3440
- }, ys = () => {
3441
- const e = b(...["linear-gradient", "radial-gradient"].map(p)), t = M(
3442
- A("to").skip(g),
3443
- b(...["left", "right", "top", "bottom"].map(p))
3440
+ }, di = () => {
3441
+ const e = d(...["linear-gradient", "radial-gradient"].map(m)), t = I(
3442
+ B("to").skip(g),
3443
+ d(...["left", "right", "top", "bottom"].map(m))
3444
3444
  ).map(([, a]) => {
3445
- const c = ks[a.toLowerCase()];
3446
- return new k(c, "deg");
3447
- }), n = b(H.Angle, t), r = b(H.Length, H.Percentage), o = M(
3445
+ const c = bi[a.toLowerCase()];
3446
+ return new S(c, "deg");
3447
+ }), n = d(H.Angle, t), r = d(H.Length, H.Percentage), o = I(
3448
3448
  H.Color,
3449
3449
  r.sepBy(g)
3450
- ).map(([a, c]) => !c || c.length === 0 ? [a] : [a, ...c]), s = M(
3450
+ ).map(([a, c]) => !c || c.length === 0 ? [a] : [a, ...c]), s = I(
3451
3451
  o,
3452
- ce.trim(g).next(b(o, r)).many()
3452
+ Se.trim(g).next(d(o, r)).many()
3453
3453
  ).map(([a, c]) => [a, ...c]);
3454
- return M(
3454
+ return I(
3455
3455
  e,
3456
- M(n.skip(ce).opt(), s).trim(g).wrap(mt, pt).map(([a, c]) => a ? [a, ...c].flat() : [c])
3457
- ).map(([a, c]) => new at(a, c));
3458
- }, Ss = () => Fe(A("cubic-bezier")).map((e) => new at("cubic-bezier", e[1])), nr = G(/[^\(\)\{\}\s,;]+/).map((e) => new k(e)), De = b(
3459
- ws(),
3460
- hs(),
3461
- fs(),
3462
- ys(),
3463
- Ss(),
3464
- Fe().map(([e, t]) => new at(e, t))
3465
- ), Ge = b(H.Value, De, nr).trim(g), ri = {
3466
- Function: De,
3467
- Value: Ge,
3468
- FunctionArgs: er
3469
- }, xs = M(A("{"), G(/[^{}]+/), A("}")).map(
3456
+ I(n.skip(Se).opt(), s).trim(g).wrap(kt, St).map(([a, c]) => a ? [a, ...c].flat() : [c])
3457
+ ).map(([a, c]) => new mt(a, c));
3458
+ }, gi = () => Ke(B("cubic-bezier")).map((e) => new mt("cubic-bezier", e[1])), qr = D(/[^\(\)\{\}\s,;]+/).map((e) => new S(e)), Je = d(
3459
+ fi(),
3460
+ li(),
3461
+ ui(),
3462
+ di(),
3463
+ gi(),
3464
+ Ke().map(([e, t]) => new mt(e, t))
3465
+ ), Qe = d(H.Value, Je, qr).trim(g), Ra = {
3466
+ Function: Je,
3467
+ Value: Qe,
3468
+ FunctionArgs: Zr
3469
+ }, wi = I(B("{"), D(/[^{}]+/), B("}")).map(
3470
3470
  (e) => {
3471
3471
  const t = e.join(`
3472
3472
  `);
3473
3473
  let n = JSON.parse(t);
3474
- return new k(n, "json");
3475
- }
3476
- ), ue = b(H.Value, De, xs, nr).trim(g), oi = {
3477
- Value: ue,
3478
- Values: ue.sepBy(g)
3479
- }, Cs = _t((e) => Ct(ue, e)), si = _t(
3480
- (e) => Ct(H.Percentage, String(e)).valueOf()
3481
- ), ii = _t((e) => Ct(
3474
+ return new S(n, "json");
3475
+ }
3476
+ ), Ce = d(H.Value, Je, wi, qr).trim(g), va = {
3477
+ Value: Ce,
3478
+ Values: Ce.sepBy(g)
3479
+ }, ki = Xt((e) => Bt(Ce, e)), Ba = Xt(
3480
+ (e) => Bt(H.Percentage, String(e)).valueOf()
3481
+ ), Na = Xt((e) => Bt(
3482
3482
  H.Time.map((t) => t.unit === "ms" ? t.value : t.unit === "s" ? t.value * 1e3 : t.value),
3483
3483
  e
3484
- )), ai = _t(
3484
+ )), _a = Xt(
3485
3485
  (e, t) => (() => {
3486
3486
  if (!t)
3487
3487
  return e;
3488
3488
  if (e.unit === "var") {
3489
3489
  const o = getComputedStyle(t).getPropertyValue(e.value);
3490
- return tr(o);
3490
+ return Yr(o);
3491
3491
  }
3492
3492
  if (e.unit === "calc" && e.property && e.subProperty && e.value && t) {
3493
3493
  const o = e.property, s = t.style[o], i = e.subProperty ? `${e.subProperty}(${e.toString()})` : e.toString();
@@ -3496,13 +3496,13 @@ const mt = A("("), pt = A(")"), ce = A(","), er = y.lazy(
3496
3496
  o
3497
3497
  );
3498
3498
  t.style[o] = s;
3499
- const c = Cs(a);
3500
- if (c instanceof k)
3499
+ const c = ki(a);
3500
+ if (c instanceof S)
3501
3501
  return c;
3502
3502
  if (c.name.startsWith("matrix")) {
3503
- const m = mr(c)[e.subProperty];
3504
- if (m != null)
3505
- return new k(m, "px", [
3503
+ const p = lo(c)[e.subProperty];
3504
+ if (p != null)
3505
+ return new S(p, "px", [
3506
3506
  "length",
3507
3507
  "absolute"
3508
3508
  ]);
@@ -3511,29 +3511,29 @@ const mt = A("("), pt = A(")"), ce = A(","), er = y.lazy(
3511
3511
  return e;
3512
3512
  })().coalesce(e),
3513
3513
  { keyFn: (e, t) => `${e.toString()}-${JSON.stringify(t)}` }
3514
- ), Ts = (e, t, n = !1) => {
3514
+ ), Si = (e, t, n = !1) => {
3515
3515
  if (e?.superType?.[0] !== t?.superType?.[0])
3516
3516
  return n ? [e, t] : [e.clone(), t.clone()];
3517
3517
  const r = (i) => {
3518
3518
  switch (i?.superType?.[0]) {
3519
3519
  case "length":
3520
3520
  return {
3521
- value: mn(i.value, i.unit, i.targets?.[0]),
3521
+ value: rr(i.value, i.unit, i.targets?.[0]),
3522
3522
  unit: "px"
3523
3523
  };
3524
3524
  case "angle":
3525
3525
  return {
3526
- value: Se(i.value, i.unit),
3526
+ value: _e(i.value, i.unit),
3527
3527
  unit: "deg"
3528
3528
  };
3529
3529
  case "time":
3530
3530
  return {
3531
- value: pn(i.value, i.unit),
3531
+ value: or(i.value, i.unit),
3532
3532
  unit: "ms"
3533
3533
  };
3534
3534
  case "resolution":
3535
3535
  return {
3536
- value: hn(i.value, i.unit),
3536
+ value: sr(i.value, i.unit),
3537
3537
  unit: "dpi"
3538
3538
  };
3539
3539
  default:
@@ -3541,7 +3541,7 @@ const mt = A("("), pt = A(")"), ce = A(","), er = y.lazy(
3541
3541
  }
3542
3542
  }, [o, s] = [r(e), r(t)];
3543
3543
  return n ? (e.value = o.value, e.unit = o.unit, t.value = s.value, t.unit = s.unit, [e, t]) : [
3544
- new k(
3544
+ new S(
3545
3545
  o.value,
3546
3546
  o.unit,
3547
3547
  e.superType,
@@ -3549,7 +3549,7 @@ const mt = A("("), pt = A(")"), ce = A(","), er = y.lazy(
3549
3549
  e.property,
3550
3550
  e.targets
3551
3551
  ),
3552
- new k(
3552
+ new S(
3553
3553
  s.value,
3554
3554
  s.unit,
3555
3555
  t.superType,
@@ -3559,15 +3559,15 @@ const mt = A("("), pt = A(")"), ce = A(","), er = y.lazy(
3559
3559
  )
3560
3560
  ];
3561
3561
  };
3562
- function ci(e, t) {
3562
+ function Pa(e, t) {
3563
3563
  e = e.coalesce(t, !0), t = t.coalesce(e, !0);
3564
3564
  const n = {
3565
3565
  start: e,
3566
3566
  stop: t,
3567
3567
  value: e.clone()
3568
3568
  };
3569
- if (re(e) && re(t)) {
3570
- const [r, o] = No(
3569
+ if (be(e) && be(t)) {
3570
+ const [r, o] = vs(
3571
3571
  e,
3572
3572
  t,
3573
3573
  "lab",
@@ -3576,206 +3576,584 @@ function ci(e, t) {
3576
3576
  n.start = r, n.stop = o, n.value = r.clone();
3577
3577
  }
3578
3578
  if (e.unit !== t.unit) {
3579
- const [r, o] = Ts(
3579
+ const [r, o] = Si(
3580
3580
  e,
3581
3581
  t,
3582
3582
  !0
3583
3583
  );
3584
3584
  n.start = r, n.stop = o, n.value = r.clone();
3585
3585
  }
3586
- return n.computed = ne.includes(e.unit) || ne.includes(t.unit), n;
3586
+ return n.computed = fe.includes(e.unit) || fe.includes(t.unit), n;
3587
+ }
3588
+ function yi(e) {
3589
+ const t = (n, r = 1) => Math.round(e[n] * r);
3590
+ return `invert(${t(0)}%) sepia(${t(1)}%) saturate(${t(2)}%) hue-rotate(${t(3, 3.6)}deg) brightness(${t(4)}%) contrast(${t(5)}%)`;
3591
+ }
3592
+ const tn = (e) => [e.r, e.g, e.b], Kt = (e, t, n) => new O(e, t, n), Ci = (e, t, n) => new yt(e, t, n), Kr = (e) => {
3593
+ const t = xr(e);
3594
+ return Ci(t.h, t.s, t.l);
3595
+ }, xi = 1, Ti = 1 / 6, Ei = 5, Ai = 15, Mi = 100, Ii = 7500, Ri = 200, pe = 360, vi = 50, Bi = 20, Ni = 3750, _i = 50, Pi = 100, Oi = 100, K = 0.2126, J = 0.7152, Q = 0.0722;
3596
+ function Li(e, t = 0) {
3597
+ const n = Math.sin(t * Math.PI / 180), r = Math.cos(t * Math.PI / 180), o = [
3598
+ K + r * (1 - K) - n * K,
3599
+ J - r * J - n * J,
3600
+ Q - r * Q + n * (1 - Q),
3601
+ K - r * K + n * 0.143,
3602
+ J + r * (1 - J) + n * 0.14,
3603
+ Q - r * Q - n * 0.283,
3604
+ K - r * K - n * (1 - K),
3605
+ J - r * J + n * J,
3606
+ Q + r * (1 - Q) + n * Q
3607
+ ];
3608
+ return en(e, o);
3609
+ }
3610
+ const yn = 0.393, Cn = 0.769, xn = 0.189, Tn = 0.349, En = 0.686, An = 0.168, Mn = 0.272, In = 0.534, Rn = 0.131;
3611
+ function zi(e, t = 1) {
3612
+ const n = [
3613
+ yn + (1 - yn) * (1 - t),
3614
+ Cn - Cn * (1 - t),
3615
+ xn - xn * (1 - t),
3616
+ Tn - Tn * (1 - t),
3617
+ En + (1 - En) * (1 - t),
3618
+ An - An * (1 - t),
3619
+ Mn - Mn * (1 - t),
3620
+ In - In * (1 - t),
3621
+ Rn + (1 - Rn) * (1 - t)
3622
+ ];
3623
+ return en(e, n);
3624
+ }
3625
+ const bt = 0.213, dt = 0.715, gt = 0.072;
3626
+ function $i(e, t = 1) {
3627
+ const n = [
3628
+ bt + (1 - bt) * t,
3629
+ dt - dt * t,
3630
+ gt - gt * t,
3631
+ bt - bt * t,
3632
+ dt + (1 - dt) * t,
3633
+ gt - gt * t,
3634
+ bt - bt * t,
3635
+ dt - dt * t,
3636
+ gt + (1 - gt) * t
3637
+ ];
3638
+ return en(e, n);
3587
3639
  }
3640
+ function en(e, t) {
3641
+ const n = N(tn(e), t);
3642
+ return Kt(v(n[0], 0, 255), v(n[1], 0, 255), v(n[2], 0, 255));
3643
+ }
3644
+ function Fi(e, t = 1) {
3645
+ return Jr(e, t);
3646
+ }
3647
+ function Gi(e, t = 1) {
3648
+ return Jr(e, t, -(0.5 * t) + 0.5);
3649
+ }
3650
+ function Jr(e, t = 1, n = 0) {
3651
+ const r = tn(e);
3652
+ return Kt(
3653
+ v(r[0] * t + n * 255, 0, 255),
3654
+ v(r[1] * t + n * 255, 0, 255),
3655
+ v(r[2] * t + n * 255, 0, 255)
3656
+ );
3657
+ }
3658
+ function Ui(e, t = 1) {
3659
+ const n = tn(e);
3660
+ return Kt(
3661
+ v((t + n[0] / 255 * (1 - 2 * t)) * 255, 0, 255),
3662
+ v((t + n[1] / 255 * (1 - 2 * t)) * 255, 0, 255),
3663
+ v((t + n[2] / 255 * (1 - 2 * t)) * 255, 0, 255)
3664
+ );
3665
+ }
3666
+ function me(e, t, n) {
3667
+ let r = Kt(0, 0, 0);
3668
+ r = Ui(r, e[0] / 100), r = zi(r, e[1] / 100), r = $i(r, e[2] / 100), r = Li(r, e[3] * 3.6), r = Fi(r, e[4] / 100), r = Gi(r, e[5] / 100);
3669
+ const o = Kr(r);
3670
+ return Math.abs(r.r - t.r) + Math.abs(r.g - t.g) + Math.abs(r.b - t.b) + Math.abs(o.h - n.h) + Math.abs(o.s - n.s) + Math.abs(o.l - n.l);
3671
+ }
3672
+ function Qr(e, t, n, r, o, s, i) {
3673
+ let a = null, c = 1 / 0;
3674
+ const l = new Array(6), p = new Array(6), u = new Array(6);
3675
+ for (let f = 0; f < o; f++) {
3676
+ const C = n / Math.pow(f + 1, Ti);
3677
+ for (let w = 0; w < 6; w++)
3678
+ l[w] = Math.random() > 0.5 ? 1 : -1, p[w] = r[w] + C * l[w], u[w] = r[w] - C * l[w];
3679
+ const y = me(p, s, i) - me(u, s, i);
3680
+ for (let w = 0; w < 6; w++) {
3681
+ const E = y / (2 * C) * l[w], A = t[w] / Math.pow(e + f + 1, xi);
3682
+ r[w] = Di(r[w] - A * E, w);
3683
+ }
3684
+ const T = me(r, s, i);
3685
+ T < c && (a = [...r], c = T);
3686
+ }
3687
+ return { values: a ?? [...r], loss: c };
3688
+ }
3689
+ function Di(e, t) {
3690
+ let n = Mi;
3691
+ return t === 2 ? n = Ii : (t === 4 || t === 5) && (n = Ri), t === 3 ? (e % pe + pe) % pe : v(e, 0, n);
3692
+ }
3693
+ function Vi(e, t, n) {
3694
+ const r = e.loss, o = 2, s = r + 1, i = [0.25 * s, 0.25 * s, s, 0.25 * s, 0.2 * s, 0.2 * s];
3695
+ return Qr(r, i, o, e.values, 500, t, n);
3696
+ }
3697
+ function Xi(e, t) {
3698
+ const n = [60, 180, 18e3, 600, 1.2, 1.2];
3699
+ let r = { loss: 1 / 0, values: [] };
3700
+ for (let o = 0; o < 3; o++)
3701
+ if (r.loss > 25) {
3702
+ const i = Qr(
3703
+ Ei,
3704
+ n,
3705
+ Ai,
3706
+ [
3707
+ vi,
3708
+ Bi,
3709
+ Ni,
3710
+ _i,
3711
+ Pi,
3712
+ Oi
3713
+ ],
3714
+ 1e3,
3715
+ e,
3716
+ t
3717
+ );
3718
+ i.loss < r.loss && (r = i);
3719
+ }
3720
+ return r;
3721
+ }
3722
+ function Wi(e) {
3723
+ const t = Kr(e), n = Vi(Xi(e, t), e, t);
3724
+ return {
3725
+ values: n.values,
3726
+ loss: n.loss,
3727
+ filter: yi(n.values)
3728
+ };
3729
+ }
3730
+ function Oa(e) {
3731
+ return Wi(e);
3732
+ }
3733
+ function Hi(e) {
3734
+ return e;
3735
+ }
3736
+ function vn(e) {
3737
+ return e * e;
3738
+ }
3739
+ function Bn(e) {
3740
+ return -e * (e - 2);
3741
+ }
3742
+ function Nn(e) {
3743
+ return (e /= 0.5) < 1 ? 0.5 * e * e : -0.5 * (--e * (e - 2) - 1);
3744
+ }
3745
+ function _n(e) {
3746
+ return e * e * e;
3747
+ }
3748
+ function Pn(e) {
3749
+ return (e = e - 1) * e * e + 1;
3750
+ }
3751
+ function On(e) {
3752
+ return (e /= 0.5) < 1 ? 0.5 * e * e * e : 0.5 * ((e -= 2) * e * e + 2);
3753
+ }
3754
+ function Ln(e) {
3755
+ return e * e * (3 - 2 * e);
3756
+ }
3757
+ const Z = (e, t, n, r) => (o) => (o = fr(o, e, t, n, r)[1], o);
3758
+ function zn(e) {
3759
+ return e = Z(0.09, 0.91, 0.5, 1.5)(e), e;
3760
+ }
3761
+ function $n(e) {
3762
+ return e = Z(0.09, 0.91, 0.5, 1.5)(e), e;
3763
+ }
3764
+ function Fn(e) {
3765
+ return e = jt(e, [
3766
+ [0, 0],
3767
+ [0.026, 1.746],
3768
+ [0.633, 1.06],
3769
+ [1, 0]
3770
+ ])[1], e;
3771
+ }
3772
+ function Gn(e) {
3773
+ return e = jt(e, [
3774
+ [0, 0],
3775
+ [0.367, 0.94],
3776
+ [0.974, 0.254],
3777
+ [1, 0]
3778
+ ])[1], e;
3779
+ }
3780
+ function Un(e) {
3781
+ return e = jt(e, [
3782
+ [0, 0],
3783
+ [0.026, 1.746],
3784
+ [0.633, 1.06],
3785
+ [1, 0]
3786
+ ])[1], e;
3787
+ }
3788
+ function Dn(e) {
3789
+ return e = jt(e, [
3790
+ [0, 0],
3791
+ [0.026, 1.746],
3792
+ [0.633, 1.06],
3793
+ [1, 0]
3794
+ ])[1], e;
3795
+ }
3796
+ function Vn(e) {
3797
+ return 1 - Math.cos(e * Math.PI / 2);
3798
+ }
3799
+ function Xn(e) {
3800
+ return Math.sin(e * Math.PI / 2);
3801
+ }
3802
+ function Wn(e) {
3803
+ return -(Math.cos(Math.PI * e) - 1) / 2;
3804
+ }
3805
+ function Hn(e) {
3806
+ return 1 - Math.sqrt(1 - e * e);
3807
+ }
3808
+ function jn(e) {
3809
+ return Math.sqrt(1 - --e * e);
3810
+ }
3811
+ function Yn(e) {
3812
+ return (e /= 0.5) < 1 ? -(Math.sqrt(1 - e * e) - 1) / 2 : (Math.sqrt(1 - (e -= 2) * e) + 1) / 2;
3813
+ }
3814
+ function Zn(e) {
3815
+ return e === 0 ? 0 : Math.pow(2, 10 * (e - 1));
3816
+ }
3817
+ function qn(e) {
3818
+ return e === 1 ? 1 : 1 - Math.pow(2, -10 * e);
3819
+ }
3820
+ function Kn(e) {
3821
+ return e === 0 ? 0 : e === 1 ? 1 : (e /= 0.5) < 1 ? 0.5 * Math.pow(2, 10 * (e - 1)) : 0.5 * (2 - Math.pow(2, -10 * --e));
3822
+ }
3823
+ const La = [
3824
+ "jump-start",
3825
+ "jump-end",
3826
+ "jump-none",
3827
+ "jump-both",
3828
+ "start",
3829
+ "end",
3830
+ "both"
3831
+ ];
3832
+ function to(e, t) {
3833
+ return Math.floor(e * t) / t;
3834
+ }
3835
+ function ji(e, t) {
3836
+ return Math.ceil(e * t) / t;
3837
+ }
3838
+ function Yi(e, t) {
3839
+ return e === 0 || e === 1 ? e : to(e, t);
3840
+ }
3841
+ function Zi(e, t) {
3842
+ return Math.round(e * t) / t;
3843
+ }
3844
+ function nn(e, t = "jump-start") {
3845
+ switch (t) {
3846
+ case "jump-none":
3847
+ return (n) => Zi(n, e);
3848
+ case "jump-start":
3849
+ case "start":
3850
+ return (n) => to(n, e);
3851
+ case "jump-end":
3852
+ case "end":
3853
+ return (n) => ji(n, e);
3854
+ case "jump-both":
3855
+ case "both":
3856
+ return (n) => Yi(n, e);
3857
+ }
3858
+ }
3859
+ function qi() {
3860
+ return nn(1, "jump-start");
3861
+ }
3862
+ function Ki() {
3863
+ return nn(1, "jump-end");
3864
+ }
3865
+ const ut = {
3866
+ ease: [0.25, 0.1, 0.25, 1],
3867
+ "ease-in": [0.42, 0, 1, 1],
3868
+ "ease-out": [0, 0, 0.58, 1],
3869
+ "ease-in-out": [0.42, 0, 0.58, 1],
3870
+ "ease-in-back": [0.6, -0.28, 0.735, 0.045],
3871
+ "ease-out-back": [0.175, 0.885, 0.32, 1.275],
3872
+ "ease-in-out-back": [0.68, -0.55, 0.265, 1.55]
3873
+ }, za = {
3874
+ linear: Hi,
3875
+ easeInQuad: vn,
3876
+ "ease-in-quad": vn,
3877
+ // "easeInQuad",
3878
+ easeOutQuad: Bn,
3879
+ "ease-out-quad": Bn,
3880
+ // "easeOutQuad",
3881
+ easeInOutQuad: Nn,
3882
+ "ease-in-out-quad": Nn,
3883
+ // "easeInOutQuad",
3884
+ easeInCubic: _n,
3885
+ "ease-in-cubic": _n,
3886
+ easeOutCubic: Pn,
3887
+ "ease-out-cubic": Pn,
3888
+ easeInOutCubic: On,
3889
+ "ease-in-out-cubic": On,
3890
+ easeInBounce: zn,
3891
+ "ease-in-bounce": zn,
3892
+ // "easeInBounce",
3893
+ bounceInEase: $n,
3894
+ "bounce-in-ease": $n,
3895
+ bounceInEaseHalf: Fn,
3896
+ "bounce-in-ease-half": Fn,
3897
+ bounceOutEase: Gn,
3898
+ "bounce-out-ease": Gn,
3899
+ bounceOutEaseHalf: Un,
3900
+ "bounce-out-ease-half": Un,
3901
+ bounceInOutEase: Dn,
3902
+ "bounce-in-out-ease": Dn,
3903
+ easeInSine: Vn,
3904
+ "ease-in-sine": Vn,
3905
+ easeOutSine: Xn,
3906
+ "ease-out-sine": Xn,
3907
+ easeInOutSine: Wn,
3908
+ "ease-in-out-sine": Wn,
3909
+ easeInCirc: Hn,
3910
+ "ease-in-circ": Hn,
3911
+ easeOutCirc: jn,
3912
+ "ease-out-circ": jn,
3913
+ easeInOutCirc: Yn,
3914
+ "ease-in-out-circ": Yn,
3915
+ easeInExpo: Zn,
3916
+ "ease-in-expo": Zn,
3917
+ easeOutExpo: qn,
3918
+ "ease-out-expo": qn,
3919
+ easeInOutExpo: Kn,
3920
+ "ease-in-out-expo": Kn,
3921
+ smoothStep3: Ln,
3922
+ "smooth-step-3": Ln,
3923
+ ease: Z(...ut.ease),
3924
+ "ease-in": Z(...ut["ease-in"]),
3925
+ "ease-out": Z(...ut["ease-out"]),
3926
+ "ease-in-out": Z(...ut["ease-in-out"]),
3927
+ "ease-in-back": Z(...ut["ease-in-back"]),
3928
+ "ease-out-back": Z(...ut["ease-out-back"]),
3929
+ "ease-in-out-back": Z(...ut["ease-in-out-back"]),
3930
+ steps: nn,
3931
+ "step-start": qi,
3932
+ "step-end": Ki
3933
+ };
3588
3934
  export {
3589
- an as ABSOLUTE_LENGTH_UNITS,
3590
- _ as ALPHA_DENORM_UNIT,
3935
+ Qn as ABSOLUTE_LENGTH_UNITS,
3936
+ $ as ALPHA_DENORM_UNIT,
3591
3937
  h as ALPHA_RANGE,
3592
- Et as ANGLE_UNITS,
3593
- we as AdobeRGBColor,
3594
- cr as BLACKLISTED_COALESCE_UNITS,
3595
- tn as COLOR_NAMES,
3596
- gn as COLOR_SPACE_DENORM_UNITS,
3597
- Xs as COLOR_SPACE_NAMES,
3598
- f as COLOR_SPACE_RANGES,
3599
- ar as COLOR_UNITS,
3600
- ne as COMPUTED_UNITS,
3601
- _e as CSSColor,
3602
- ri as CSSFunction,
3603
- xs as CSSJSON,
3604
- nr as CSSString,
3938
+ Lt as ANGLE_UNITS,
3939
+ ve as AdobeRGBColor,
3940
+ io as BLACKLISTED_COALESCE_UNITS,
3941
+ dn as COLOR_NAMES,
3942
+ lr as COLOR_SPACE_DENORM_UNITS,
3943
+ wa as COLOR_SPACE_NAMES,
3944
+ b as COLOR_SPACE_RANGES,
3945
+ so as COLOR_UNITS,
3946
+ fe as COMPUTED_UNITS,
3947
+ Ye as CSSColor,
3948
+ Z as CSSCubicBezier,
3949
+ Ra as CSSFunction,
3950
+ wi as CSSJSON,
3951
+ qr as CSSString,
3605
3952
  H as CSSValueUnit,
3606
- oi as CSSValues,
3607
- Eo as CYLINDRICAL_HUE_COMPONENT,
3608
- U as Color,
3609
- Ks as DELTA_E_OK_JND,
3610
- ge as DisplayP3Color,
3611
- ee as FRAME_RATE,
3612
- at as FunctionValue,
3613
- vr as GAMUT_SECTOR_COEFFICIENTS,
3614
- St as HSLColor,
3615
- pe as HSVColor,
3616
- dt as HUE_RANGE,
3617
- he as HWBColor,
3618
- un as KelvinColor,
3619
- Lt as LABColor,
3620
- fe as LCHColor,
3621
- Mt as LENGTH_UNITS,
3622
- Y as LINEAR_SRGB_TO_LMS,
3623
- w as LMS_TO_LINEAR_SRGB,
3624
- Sn as LMS_TO_OKLAB_MATRIX,
3625
- Cr as LMS_TO_XYZ_MATRIX,
3626
- de as LinearSRGBColor,
3627
- $t as OKLABColor,
3628
- O as OKLAB_TO_LMS_COEFF,
3629
- Tr as OKLAB_TO_LMS_MATRIX,
3630
- be as OKLCHColor,
3631
- ln as PERCENTAGE_UNITS,
3632
- ke as ProPhotoRGBColor,
3633
- cn as RELATIVE_LENGTH_UNITS,
3634
- At as RESOLUTION_UNITS,
3635
- I as RGBA_MAX,
3636
- $ as RGBColor,
3637
- jt as RGB_RANGE,
3638
- ye as Rec2020Color,
3639
- ir as STRING_UNITS,
3640
- lr as STYLE_NAMES,
3641
- Bt as TIME_UNITS,
3642
- zs as UNITS,
3953
+ va as CSSValues,
3954
+ Ts as CYLINDRICAL_HUE_COMPONENT,
3955
+ V as Color,
3956
+ Ca as DELTA_E_OK_JND,
3957
+ Re as DisplayP3Color,
3958
+ he as FRAME_RATE,
3959
+ mt as FunctionValue,
3960
+ To as GAMUT_SECTOR_COEFFICIENTS,
3961
+ yt as HSLColor,
3962
+ Te as HSVColor,
3963
+ Et as HUE_RANGE,
3964
+ Ee as HWBColor,
3965
+ nr as KelvinColor,
3966
+ Wt as LABColor,
3967
+ Ae as LCHColor,
3968
+ Pt as LENGTH_UNITS,
3969
+ j as LINEAR_SRGB_TO_LMS,
3970
+ k as LMS_TO_LINEAR_SRGB,
3971
+ hr as LMS_TO_OKLAB_MATRIX,
3972
+ Co as LMS_TO_XYZ_MATRIX,
3973
+ Ie as LinearSRGBColor,
3974
+ Ht as OKLABColor,
3975
+ P as OKLAB_TO_LMS_COEFF,
3976
+ xo as OKLAB_TO_LMS_MATRIX,
3977
+ Me as OKLCHColor,
3978
+ er as PERCENTAGE_UNITS,
3979
+ Be as ProPhotoRGBColor,
3980
+ tr as RELATIVE_LENGTH_UNITS,
3981
+ zt as RESOLUTION_UNITS,
3982
+ _ as RGBA_MAX,
3983
+ O as RGBColor,
3984
+ oe as RGB_RANGE,
3985
+ Ne as Rec2020Color,
3986
+ oo as STRING_UNITS,
3987
+ ao as STYLE_NAMES,
3988
+ Ot as TIME_UNITS,
3989
+ ca as UNITS,
3643
3990
  z as UNIT_RANGE,
3644
- xt as ValueArray,
3645
- k as ValueUnit,
3646
- kn as WHITE_POINTS,
3647
- xr as WHITE_POINT_D50,
3648
- wn as WHITE_POINT_D50_D65,
3649
- Sr as WHITE_POINT_D65,
3650
- Ce as WHITE_POINT_D65_D50,
3651
- D as XYZColor,
3652
- yn as XYZ_TO_LMS_MATRIX,
3653
- So as adobeRgb2xyz,
3654
- Jt as adobeRgbToLinear,
3655
- vs as arrayEquals,
3656
- Rs as camelCaseToHyphen,
3657
- Ns as cancelAnimationFrame,
3658
- X as clamp,
3659
- K as clone,
3660
- it as color2,
3661
- nn as colorUnit2,
3662
- Ar as computeMaxSaturation,
3663
- Gs as convert2,
3664
- pr as convertAbsoluteUnitToPixels,
3665
- hn as convertToDPI,
3666
- Se as convertToDegrees,
3667
- pn as convertToMs,
3668
- mn as convertToPixels,
3669
- As as createHash,
3670
- Mr as cubicBezier,
3671
- js as cubicBezierToSVG,
3672
- Zs as cubicBezierToString,
3673
- Rt as deCasteljau,
3674
- Es as debounce,
3675
- qs as deltaEOK,
3676
- ko as displayP32xyz,
3677
- yr as fail,
3678
- Ir as findCusp,
3679
- Rr as findGamutIntersection,
3680
- Ls as flattenObject,
3681
- Bo as gamutMap,
3682
- Nr as gamutMapOKLab,
3683
- _r as gamutMapSRGB,
3684
- ai as getComputedValue,
3685
- Js as getFormattedColorSpaceRange,
3686
- Lr as hex2rgb,
3687
- An as hsl2hsv,
3688
- Dr as hsl2hwb,
3689
- Ur as hsl2rgb,
3690
- Ne as hsl2xyz,
3691
- En as hsv2hsl,
3692
- Qr as hsv2xyz,
3693
- Fr as hwb2hsl,
3694
- eo as hwb2xyz,
3695
- Is as hyphenToCamelCase,
3696
- gr as identifier,
3697
- wr as integer,
3698
- Ys as interpBezier,
3699
- Ao as interpolateHue,
3700
- J as invertMat3,
3701
- Ds as isCSSStyleName,
3702
- re as isColorUnit,
3703
- Er as isInSRGBGamut,
3704
- sn as isObject,
3705
- p as istring,
3706
- Bn as kelvin2rgb,
3707
- ao as kelvin2xyz,
3708
- Kr as lab2lch,
3709
- Jr as lab2oklab,
3710
- ei as lab2oklch,
3711
- Be as lab2xyz,
3712
- Zr as lch2lab,
3713
- ro as lch2xyz,
3714
- oe as lerp,
3715
- go as linearSrgb2xyz,
3716
- lo as linearToAdobeRgb,
3717
- uo as linearToProPhoto,
3718
- mo as linearToRec2020,
3719
- zn as linearToSrgb,
3720
- Hs as logerp,
3721
- _t as memoize,
3722
- Io as mixColors,
3723
- Ws as multiplyMat3,
3724
- xe as none,
3725
- Oo as normalizeColor,
3726
- ie as normalizeColorUnit,
3727
- Po as normalizeColorUnitComponent,
3728
- No as normalizeColorUnits,
3729
- Ts as normalizeNumericUnits,
3730
- ci as normalizeValueUnits,
3731
- q as number,
3732
- qr as oklab2lab,
3733
- _n as oklab2oklch,
3734
- Pe as oklab2xyz,
3735
- ve as oklabToLinearSRGB,
3736
- ti as oklch2lab,
3737
- Ln as oklch2oklab,
3738
- so as oklch2xyz,
3739
- ni as parseCSSColor,
3740
- si as parseCSSPercent,
3741
- ii as parseCSSTime,
3742
- Cs as parseCSSValue,
3743
- tr as parseCSSValueUnit,
3744
- Us as parseResult,
3745
- Co as proPhoto2xyz,
3746
- Qt as proPhotoToLinear,
3747
- vo as rec20202xyz,
3748
- te as rec2020ToLinear,
3749
- Os as requestAnimationFrame,
3750
- Qs as rgb2hex,
3751
- Gr as rgb2hsl,
3752
- $r as rgb2kelvin,
3753
- Ie as rgb2xyz,
3754
- B as scale,
3755
- Ps as seekPreviousValue,
3756
- Ms as sleep,
3757
- ut as srgbToLinear,
3758
- zr as srgbToOKLab,
3759
- kr as succeed,
3760
- R as transformMat3,
3761
- Vs as transposeMat3,
3762
- Ct as tryParse,
3763
- $s as unflattenObject,
3764
- Fs as unflattenObjectToString,
3765
- mr as unpackMatrixValues,
3766
- Bs as waitUntil,
3767
- xo as xyz2adobeRgb,
3768
- yo as xyz2displayP3,
3769
- ze as xyz2hsl,
3770
- to as xyz2hsv,
3771
- no as xyz2hwb,
3772
- co as xyz2kelvin,
3773
- Me as xyz2lab,
3774
- oo as xyz2lch,
3775
- wo as xyz2linearSrgb,
3776
- Oe as xyz2oklab,
3777
- io as xyz2oklch,
3778
- To as xyz2proPhoto,
3779
- Mo as xyz2rec2020,
3780
- Re as xyz2rgb
3991
+ vt as ValueArray,
3992
+ S as ValueUnit,
3993
+ pr as WHITE_POINTS,
3994
+ yo as WHITE_POINT_D50,
3995
+ ur as WHITE_POINT_D50_D65,
3996
+ So as WHITE_POINT_D65,
3997
+ Oe as WHITE_POINT_D65_D50,
3998
+ U as XYZColor,
3999
+ mr as XYZ_TO_LMS_MATRIX,
4000
+ gs as adobeRgb2xyz,
4001
+ ce as adobeRgbToLinear,
4002
+ Ji as arrayEquals,
4003
+ ut as bezierPresets,
4004
+ $n as bounceInEase,
4005
+ Fn as bounceInEaseHalf,
4006
+ Dn as bounceInOutEase,
4007
+ Gn as bounceOutEase,
4008
+ Un as bounceOutEaseHalf,
4009
+ oa as camelCaseToHyphen,
4010
+ aa as cancelAnimationFrame,
4011
+ v as clamp,
4012
+ tt as clone,
4013
+ pt as color2,
4014
+ wn as colorUnit2,
4015
+ Mo as computeMaxSaturation,
4016
+ fa as convert2,
4017
+ uo as convertAbsoluteUnitToPixels,
4018
+ sr as convertToDPI,
4019
+ _e as convertToDegrees,
4020
+ or as convertToMs,
4021
+ rr as convertToPixels,
4022
+ na as createHash,
4023
+ yi as cssFiltersToString,
4024
+ fr as cubicBezier,
4025
+ Sa as cubicBezierToSVG,
4026
+ ya as cubicBezierToString,
4027
+ Ft as deCasteljau,
4028
+ ea as debounce,
4029
+ xa as deltaEOK,
4030
+ bs as displayP32xyz,
4031
+ zn as easeInBounce,
4032
+ Hn as easeInCirc,
4033
+ _n as easeInCubic,
4034
+ Zn as easeInExpo,
4035
+ Yn as easeInOutCirc,
4036
+ On as easeInOutCubic,
4037
+ Kn as easeInOutExpo,
4038
+ Nn as easeInOutQuad,
4039
+ Wn as easeInOutSine,
4040
+ vn as easeInQuad,
4041
+ Vn as easeInSine,
4042
+ jn as easeOutCirc,
4043
+ Pn as easeOutCubic,
4044
+ qn as easeOutExpo,
4045
+ Bn as easeOutQuad,
4046
+ Xn as easeOutSine,
4047
+ ko as fail,
4048
+ Io as findCusp,
4049
+ Ro as findGamutIntersection,
4050
+ ua as flattenObject,
4051
+ xs as gamutMap,
4052
+ No as gamutMapOKLab,
4053
+ Po as gamutMapSRGB,
4054
+ _a as getComputedValue,
4055
+ Ta as getFormattedColorSpaceRange,
4056
+ Oo as hex2rgb,
4057
+ Cr as hsl2hsv,
4058
+ $o as hsl2hwb,
4059
+ Fo as hsl2rgb,
4060
+ He as hsl2xyz,
4061
+ yr as hsv2hsl,
4062
+ qo as hsv2xyz,
4063
+ zo as hwb2hsl,
4064
+ Jo as hwb2xyz,
4065
+ ra as hyphenToCamelCase,
4066
+ bo as identifier,
4067
+ go as integer,
4068
+ jt as interpBezier,
4069
+ Es as interpolateHue,
4070
+ nt as invertMat3,
4071
+ ha as isCSSStyleName,
4072
+ be as isColorUnit,
4073
+ Ao as isInSRGBGamut,
4074
+ Jn as isObject,
4075
+ m as istring,
4076
+ La as jumpTerms,
4077
+ Sr as kelvin2rgb,
4078
+ os as kelvin2xyz,
4079
+ jo as lab2lch,
4080
+ Zo as lab2oklab,
4081
+ Ma as lab2oklch,
4082
+ Fe as lab2xyz,
4083
+ Ho as lch2lab,
4084
+ ts as lch2xyz,
4085
+ de as lerp,
4086
+ Hi as linear,
4087
+ hs as linearSrgb2xyz,
4088
+ is as linearToAdobeRgb,
4089
+ as as linearToProPhoto,
4090
+ cs as linearToRec2020,
4091
+ Rr as linearToSrgb,
4092
+ ka as logerp,
4093
+ Xt as memoize,
4094
+ As as mixColors,
4095
+ ga as multiplyMat3,
4096
+ Pe as none,
4097
+ Rs as normalizeColor,
4098
+ we as normalizeColorUnit,
4099
+ Is as normalizeColorUnitComponent,
4100
+ vs as normalizeColorUnits,
4101
+ Si as normalizeNumericUnits,
4102
+ Pa as normalizeValueUnits,
4103
+ et as number,
4104
+ Yo as oklab2lab,
4105
+ vr as oklab2oklch,
4106
+ Xe as oklab2xyz,
4107
+ ze as oklabToLinearSRGB,
4108
+ Aa as oklch2lab,
4109
+ Br as oklch2oklab,
4110
+ ns as oklch2xyz,
4111
+ Ia as parseCSSColor,
4112
+ Ba as parseCSSPercent,
4113
+ Na as parseCSSTime,
4114
+ ki as parseCSSValue,
4115
+ Yr as parseCSSValueUnit,
4116
+ ba as parseResult,
4117
+ ks as proPhoto2xyz,
4118
+ le as proPhotoToLinear,
4119
+ ys as rec20202xyz,
4120
+ ue as rec2020ToLinear,
4121
+ ia as requestAnimationFrame,
4122
+ Oa as rgb2ColorFilter,
4123
+ Ea as rgb2hex,
4124
+ xr as rgb2hsl,
4125
+ Lo as rgb2kelvin,
4126
+ De as rgb2xyz,
4127
+ R as scale,
4128
+ sa as seekPreviousValue,
4129
+ Qi as sleep,
4130
+ Ln as smoothStep3,
4131
+ wt as srgbToLinear,
4132
+ _o as srgbToOKLab,
4133
+ Ki as stepEnd,
4134
+ qi as stepStart,
4135
+ nn as steppedEase,
4136
+ wo as succeed,
4137
+ za as timingFunctions,
4138
+ N as transformMat3,
4139
+ da as transposeMat3,
4140
+ Bt as tryParse,
4141
+ pa as unflattenObject,
4142
+ ma as unflattenObjectToString,
4143
+ lo as unpackMatrixValues,
4144
+ ta as waitUntil,
4145
+ ws as xyz2adobeRgb,
4146
+ ds as xyz2displayP3,
4147
+ je as xyz2hsl,
4148
+ Ko as xyz2hsv,
4149
+ Qo as xyz2hwb,
4150
+ ss as xyz2kelvin,
4151
+ $e as xyz2lab,
4152
+ es as xyz2lch,
4153
+ fs as xyz2linearSrgb,
4154
+ We as xyz2oklab,
4155
+ rs as xyz2oklch,
4156
+ Ss as xyz2proPhoto,
4157
+ Cs as xyz2rec2020,
4158
+ Ve as xyz2rgb
3781
4159
  };