@mhmo91/schmancy 0.5.43 → 0.5.44

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.
@@ -1,7 +1,7 @@
1
- import { BehaviorSubject as Me, map as ee, distinctUntilChanged as Z, shareReplay as re, switchMap as xe, Observable as je, of as be, fromEvent as ve, takeUntil as se, timer as $e, defaultIfEmpty as Re, tap as ue, Subject as He, debounceTime as Ge } from "rxjs";
1
+ import { BehaviorSubject as Me, map as re, distinctUntilChanged as Z, shareReplay as te, switchMap as xe, Observable as je, of as be, fromEvent as ve, takeUntil as le, timer as $e, defaultIfEmpty as Re, tap as ue, Subject as He, debounceTime as Ge } from "rxjs";
2
2
  import { a as De, T as Ue } from "./theme.events-CPSLaOlR.js";
3
3
  import { c as er } from "./context-create-DCiujzV2.js";
4
- import { property as me, customElement as Le, state as Ce } from "lit/decorators.js";
4
+ import { property as ce, customElement as Le, state as Ce } from "lit/decorators.js";
5
5
  import "rxjs/operators";
6
6
  import { n as rr, e as tr } from "./provide-tcktw8xB.js";
7
7
  import { T as or } from "./tailwind.mixin-Be9DoonS.js";
@@ -27,7 +27,7 @@ function Be(r, e, t) {
27
27
  return (255 << 24 | (255 & r) << 16 | (255 & e) << 8 | 255 & t) >>> 0;
28
28
  }
29
29
  function ze(r) {
30
- return Be(G(r[0]), G(r[1]), G(r[2]));
30
+ return Be(ee(r[0]), ee(r[1]), ee(r[2]));
31
31
  }
32
32
  function qe(r) {
33
33
  return r >> 16 & 255;
@@ -40,7 +40,7 @@ function Ye(r) {
40
40
  }
41
41
  function Te(r) {
42
42
  const e = function(t) {
43
- return Fe([ce(qe(t)), ce(Je(t)), ce(Ye(t))], cr);
43
+ return Fe([ie(qe(t)), ie(Je(t)), ie(Ye(t))], cr);
44
44
  }(r)[1];
45
45
  return 116 * We(e / 100) - 16;
46
46
  }
@@ -53,11 +53,11 @@ function K(r) {
53
53
  function Ie(r) {
54
54
  return 116 * We(r / 100) - 16;
55
55
  }
56
- function ce(r) {
56
+ function ie(r) {
57
57
  const e = r / 255;
58
58
  return e <= 0.040449936 ? e / 12.92 * 100 : 100 * Math.pow((e + 0.055) / 1.055, 2.4);
59
59
  }
60
- function G(r) {
60
+ function ee(r) {
61
61
  const e = r / 100;
62
62
  let t = 0;
63
63
  return t = e <= 31308e-7 ? 12.92 * e : 1.055 * Math.pow(e, 1 / 2.4) - 0.055, o = 0, n = 255, (a = Math.round(255 * t)) < o ? o : a > n ? n : a;
@@ -81,7 +81,7 @@ class U {
81
81
  }
82
82
  }
83
83
  U.DEFAULT = U.make();
84
- class O {
84
+ class V {
85
85
  constructor(e, t, o, n, a, s, i, m, h) {
86
86
  this.hue = e, this.chroma = t, this.j = o, this.q = n, this.m = a, this.s = s, this.jstar = i, this.astar = m, this.bstar = h;
87
87
  }
@@ -90,28 +90,28 @@ class O {
90
90
  return 1.41 * Math.pow(a, 0.63);
91
91
  }
92
92
  static fromInt(e) {
93
- return O.fromIntInViewingConditions(e, U.DEFAULT);
93
+ return V.fromIntInViewingConditions(e, U.DEFAULT);
94
94
  }
95
95
  static fromIntInViewingConditions(e, t) {
96
- const o = (65280 & e) >> 8, n = 255 & e, a = ce((16711680 & e) >> 16), s = ce(o), i = ce(n), m = 0.41233895 * a + 0.35762064 * s + 0.18051042 * i, h = 0.2126 * a + 0.7152 * s + 0.0722 * i, u = 0.01932141 * a + 0.11916382 * s + 0.95034478 * i, k = 0.401288 * m + 0.650173 * h - 0.051461 * u, C = -0.250268 * m + 1.204414 * h + 0.045854 * u, l = -2079e-6 * m + 0.048952 * h + 0.953127 * u, g = t.rgbD[0] * k, w = t.rgbD[1] * C, P = t.rgbD[2] * l, F = Math.pow(t.fl * Math.abs(g) / 100, 0.42), x = Math.pow(t.fl * Math.abs(w) / 100, 0.42), A = Math.pow(t.fl * Math.abs(P) / 100, 0.42), b = 400 * H(g) * F / (F + 27.13), v = 400 * H(w) * x / (x + 27.13), B = 400 * H(P) * A / (A + 27.13), D = (11 * b + -12 * v + B) / 11, I = (b + v - 2 * B) / 9, T = (20 * b + 20 * v + 21 * B) / 20, pe = (40 * b + 20 * v + B) / 20, z = 180 * Math.atan2(I, D) / Math.PI, N = z < 0 ? z + 360 : z >= 360 ? z - 360 : z, q = N * Math.PI / 180, $ = pe * t.nbb, _ = 100 * Math.pow($ / t.aw, t.c * t.z), ie = 4 / t.c * Math.sqrt(_ / 100) * (t.aw + 4) * t.fLRoot, le = N < 20.14 ? N + 360 : N, fe = 5e4 / 13 * (0.25 * (Math.cos(le * Math.PI / 180 + 2) + 3.8)) * t.nc * t.ncb * Math.sqrt(D * D + I * I) / (T + 0.305), ge = Math.pow(fe, 0.9) * Math.pow(1.64 - Math.pow(0.29, t.n), 0.73), ke = ge * Math.sqrt(_ / 100), Ae = ke * t.fLRoot, Xe = 50 * Math.sqrt(ge * t.c / (t.aw + 4)), Ke = (1 + 100 * 7e-3) * _ / (1 + 7e-3 * _), Ee = 1 / 0.0228 * Math.log(1 + 0.0228 * Ae), Ze = Ee * Math.cos(q), Qe = Ee * Math.sin(q);
97
- return new O(N, ke, _, ie, Ae, Xe, Ke, Ze, Qe);
96
+ const o = (65280 & e) >> 8, n = 255 & e, a = ie((16711680 & e) >> 16), s = ie(o), i = ie(n), m = 0.41233895 * a + 0.35762064 * s + 0.18051042 * i, h = 0.2126 * a + 0.7152 * s + 0.0722 * i, u = 0.01932141 * a + 0.11916382 * s + 0.95034478 * i, k = 0.401288 * m + 0.650173 * h - 0.051461 * u, C = -0.250268 * m + 1.204414 * h + 0.045854 * u, l = -2079e-6 * m + 0.048952 * h + 0.953127 * u, g = t.rgbD[0] * k, w = t.rgbD[1] * C, P = t.rgbD[2] * l, F = Math.pow(t.fl * Math.abs(g) / 100, 0.42), x = Math.pow(t.fl * Math.abs(w) / 100, 0.42), A = Math.pow(t.fl * Math.abs(P) / 100, 0.42), b = 400 * H(g) * F / (F + 27.13), v = 400 * H(w) * x / (x + 27.13), B = 400 * H(P) * A / (A + 27.13), D = (11 * b + -12 * v + B) / 11, I = (b + v - 2 * B) / 9, T = (20 * b + 20 * v + 21 * B) / 20, pe = (40 * b + 20 * v + B) / 20, z = 180 * Math.atan2(I, D) / Math.PI, N = z < 0 ? z + 360 : z >= 360 ? z - 360 : z, q = N * Math.PI / 180, $ = pe * t.nbb, _ = 100 * Math.pow($ / t.aw, t.c * t.z), he = 4 / t.c * Math.sqrt(_ / 100) * (t.aw + 4) * t.fLRoot, me = N < 20.14 ? N + 360 : N, fe = 5e4 / 13 * (0.25 * (Math.cos(me * Math.PI / 180 + 2) + 3.8)) * t.nc * t.ncb * Math.sqrt(D * D + I * I) / (T + 0.305), ge = Math.pow(fe, 0.9) * Math.pow(1.64 - Math.pow(0.29, t.n), 0.73), ke = ge * Math.sqrt(_ / 100), Ae = ke * t.fLRoot, Xe = 50 * Math.sqrt(ge * t.c / (t.aw + 4)), Ke = (1 + 100 * 7e-3) * _ / (1 + 7e-3 * _), Ee = 1 / 0.0228 * Math.log(1 + 0.0228 * Ae), Ze = Ee * Math.cos(q), Qe = Ee * Math.sin(q);
97
+ return new V(N, ke, _, he, Ae, Xe, Ke, Ze, Qe);
98
98
  }
99
99
  static fromJch(e, t, o) {
100
- return O.fromJchInViewingConditions(e, t, o, U.DEFAULT);
100
+ return V.fromJchInViewingConditions(e, t, o, U.DEFAULT);
101
101
  }
102
102
  static fromJchInViewingConditions(e, t, o, n) {
103
103
  const a = 4 / n.c * Math.sqrt(e / 100) * (n.aw + 4) * n.fLRoot, s = t * n.fLRoot, i = t / Math.sqrt(e / 100), m = 50 * Math.sqrt(i * n.c / (n.aw + 4)), h = o * Math.PI / 180, u = (1 + 100 * 7e-3) * e / (1 + 7e-3 * e), k = 1 / 0.0228 * Math.log(1 + 0.0228 * s), C = k * Math.cos(h), l = k * Math.sin(h);
104
- return new O(o, t, e, a, s, m, u, C, l);
104
+ return new V(o, t, e, a, s, m, u, C, l);
105
105
  }
106
106
  static fromUcs(e, t, o) {
107
- return O.fromUcsInViewingConditions(e, t, o, U.DEFAULT);
107
+ return V.fromUcsInViewingConditions(e, t, o, U.DEFAULT);
108
108
  }
109
109
  static fromUcsInViewingConditions(e, t, o, n) {
110
110
  const a = t, s = o, i = Math.sqrt(a * a + s * s), m = (Math.exp(0.0228 * i) - 1) / 0.0228 / n.fLRoot;
111
111
  let h = Math.atan2(s, a) * (180 / Math.PI);
112
112
  h < 0 && (h += 360);
113
113
  const u = e / (1 - 7e-3 * (e - 100));
114
- return O.fromJchInViewingConditions(u, m, h, n);
114
+ return V.fromJchInViewingConditions(u, m, h, n);
115
115
  }
116
116
  toInt() {
117
117
  return this.viewed(U.DEFAULT);
@@ -119,13 +119,13 @@ class O {
119
119
  viewed(e) {
120
120
  const t = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100), o = Math.pow(t / Math.pow(1.64 - Math.pow(0.29, e.n), 0.73), 1 / 0.9), n = this.hue * Math.PI / 180, a = 0.25 * (Math.cos(n + 2) + 3.8), s = e.aw * Math.pow(this.j / 100, 1 / e.c / e.z), i = a * (5e4 / 13) * e.nc * e.ncb, m = s / e.nbb, h = Math.sin(n), u = Math.cos(n), k = 23 * (m + 0.305) * o / (23 * i + 11 * o * u + 108 * o * h), C = k * u, l = k * h, g = (460 * m + 451 * C + 288 * l) / 1403, w = (460 * m - 891 * C - 261 * l) / 1403, P = (460 * m - 220 * C - 6300 * l) / 1403, F = Math.max(0, 27.13 * Math.abs(g) / (400 - Math.abs(g))), x = H(g) * (100 / e.fl) * Math.pow(F, 1 / 0.42), A = Math.max(0, 27.13 * Math.abs(w) / (400 - Math.abs(w))), b = H(w) * (100 / e.fl) * Math.pow(A, 1 / 0.42), v = Math.max(0, 27.13 * Math.abs(P) / (400 - Math.abs(P))), B = H(P) * (100 / e.fl) * Math.pow(v, 1 / 0.42), D = x / e.rgbD[0], I = b / e.rgbD[1], T = B / e.rgbD[2];
121
121
  return function(z, N, q) {
122
- const $ = sr, _ = $[0][0] * z + $[0][1] * N + $[0][2] * q, ie = $[1][0] * z + $[1][1] * N + $[1][2] * q, le = $[2][0] * z + $[2][1] * N + $[2][2] * q;
123
- return Be(G(_), G(ie), G(le));
122
+ const $ = sr, _ = $[0][0] * z + $[0][1] * N + $[0][2] * q, he = $[1][0] * z + $[1][1] * N + $[1][2] * q, me = $[2][0] * z + $[2][1] * N + $[2][2] * q;
123
+ return Be(ee(_), ee(he), ee(me));
124
124
  }(1.86206786 * D - 1.01125463 * I + 0.14918677 * T, 0.38752654 * D + 0.62144744 * I - 897398e-8 * T, -0.0158415 * D - 0.03412294 * I + 1.04996444 * T);
125
125
  }
126
126
  static fromXyzInViewingConditions(e, t, o, n) {
127
- const a = 0.401288 * e + 0.650173 * t - 0.051461 * o, s = -0.250268 * e + 1.204414 * t + 0.045854 * o, i = -2079e-6 * e + 0.048952 * t + 0.953127 * o, m = n.rgbD[0] * a, h = n.rgbD[1] * s, u = n.rgbD[2] * i, k = Math.pow(n.fl * Math.abs(m) / 100, 0.42), C = Math.pow(n.fl * Math.abs(h) / 100, 0.42), l = Math.pow(n.fl * Math.abs(u) / 100, 0.42), g = 400 * H(m) * k / (k + 27.13), w = 400 * H(h) * C / (C + 27.13), P = 400 * H(u) * l / (l + 27.13), F = (11 * g + -12 * w + P) / 11, x = (g + w - 2 * P) / 9, A = (20 * g + 20 * w + 21 * P) / 20, b = (40 * g + 20 * w + P) / 20, v = 180 * Math.atan2(x, F) / Math.PI, B = v < 0 ? v + 360 : v >= 360 ? v - 360 : v, D = B * Math.PI / 180, I = b * n.nbb, T = 100 * Math.pow(I / n.aw, n.c * n.z), pe = 4 / n.c * Math.sqrt(T / 100) * (n.aw + 4) * n.fLRoot, z = B < 20.14 ? B + 360 : B, N = 5e4 / 13 * (1 / 4 * (Math.cos(z * Math.PI / 180 + 2) + 3.8)) * n.nc * n.ncb * Math.sqrt(F * F + x * x) / (A + 0.305), q = Math.pow(N, 0.9) * Math.pow(1.64 - Math.pow(0.29, n.n), 0.73), $ = q * Math.sqrt(T / 100), _ = $ * n.fLRoot, ie = 50 * Math.sqrt(q * n.c / (n.aw + 4)), le = (1 + 100 * 7e-3) * T / (1 + 7e-3 * T), fe = Math.log(1 + 0.0228 * _) / 0.0228, ge = fe * Math.cos(D), ke = fe * Math.sin(D);
128
- return new O(B, $, T, pe, _, ie, le, ge, ke);
127
+ const a = 0.401288 * e + 0.650173 * t - 0.051461 * o, s = -0.250268 * e + 1.204414 * t + 0.045854 * o, i = -2079e-6 * e + 0.048952 * t + 0.953127 * o, m = n.rgbD[0] * a, h = n.rgbD[1] * s, u = n.rgbD[2] * i, k = Math.pow(n.fl * Math.abs(m) / 100, 0.42), C = Math.pow(n.fl * Math.abs(h) / 100, 0.42), l = Math.pow(n.fl * Math.abs(u) / 100, 0.42), g = 400 * H(m) * k / (k + 27.13), w = 400 * H(h) * C / (C + 27.13), P = 400 * H(u) * l / (l + 27.13), F = (11 * g + -12 * w + P) / 11, x = (g + w - 2 * P) / 9, A = (20 * g + 20 * w + 21 * P) / 20, b = (40 * g + 20 * w + P) / 20, v = 180 * Math.atan2(x, F) / Math.PI, B = v < 0 ? v + 360 : v >= 360 ? v - 360 : v, D = B * Math.PI / 180, I = b * n.nbb, T = 100 * Math.pow(I / n.aw, n.c * n.z), pe = 4 / n.c * Math.sqrt(T / 100) * (n.aw + 4) * n.fLRoot, z = B < 20.14 ? B + 360 : B, N = 5e4 / 13 * (1 / 4 * (Math.cos(z * Math.PI / 180 + 2) + 3.8)) * n.nc * n.ncb * Math.sqrt(F * F + x * x) / (A + 0.305), q = Math.pow(N, 0.9) * Math.pow(1.64 - Math.pow(0.29, n.n), 0.73), $ = q * Math.sqrt(T / 100), _ = $ * n.fLRoot, he = 50 * Math.sqrt(q * n.c / (n.aw + 4)), me = (1 + 100 * 7e-3) * T / (1 + 7e-3 * T), fe = Math.log(1 + 0.0228 * _) / 0.0228, ge = fe * Math.cos(D), ke = fe * Math.sin(D);
128
+ return new V(B, $, T, pe, _, he, me, ge, ke);
129
129
  }
130
130
  xyzInViewingConditions(e) {
131
131
  const t = this.chroma === 0 || this.j === 0 ? 0 : this.chroma / Math.sqrt(this.j / 100), o = Math.pow(t / Math.pow(1.64 - Math.pow(0.29, e.n), 0.73), 1 / 0.9), n = this.hue * Math.PI / 180, a = 0.25 * (Math.cos(n + 2) + 3.8), s = e.aw * Math.pow(this.j / 100, 1 / e.c / e.z), i = a * (5e4 / 13) * e.nc * e.ncb, m = s / e.nbb, h = Math.sin(n), u = Math.cos(n), k = 23 * (m + 0.305) * o / (23 * i + 11 * o * u + 108 * o * h), C = k * u, l = k * h, g = (460 * m + 451 * C + 288 * l) / 1403, w = (460 * m - 891 * C - 261 * l) / 1403, P = (460 * m - 220 * C - 6300 * l) / 1403, F = Math.max(0, 27.13 * Math.abs(g) / (400 - Math.abs(g))), x = H(g) * (100 / e.fl) * Math.pow(F, 1 / 0.42), A = Math.max(0, 27.13 * Math.abs(w) / (400 - Math.abs(w))), b = H(w) * (100 / e.fl) * Math.pow(A, 1 / 0.42), v = Math.max(0, 27.13 * Math.abs(P) / (400 - Math.abs(P))), B = H(P) * (100 / e.fl) * Math.pow(v, 1 / 0.42), D = x / e.rgbD[0], I = b / e.rgbD[1], T = B / e.rgbD[2];
@@ -231,14 +231,14 @@ class p {
231
231
  }
232
232
  static solveToInt(e, t, o) {
233
233
  if (t < 1e-4 || o < 1e-4 || o > 99.9999) return function(i) {
234
- const m = G(K(i));
234
+ const m = ee(K(i));
235
235
  return Be(m, m, m);
236
236
  }(o);
237
237
  const n = (e = Se(e)) / 180 * Math.PI, a = K(o), s = p.findResultByJ(n, t, a);
238
238
  return s !== 0 ? s : ze(p.bisectToLimit(a, n));
239
239
  }
240
240
  static solveToCam(e, t, o) {
241
- return O.fromInt(p.solveToInt(e, t, o));
241
+ return V.fromInt(p.solveToInt(e, t, o));
242
242
  }
243
243
  }
244
244
  p.SCALED_DISCOUNT_FROM_LINRGB = [[0.001200833568784504, 0.002389694492170889, 2795742885861124e-19], [5891086651375999e-19, 0.0029785502573438758, 3270666104008398e-19], [10146692491640572e-20, 5364214359186694e-19, 0.0032979401770712076]], p.LINRGB_FROM_SCALED_DISCOUNT = [[1373.2198709594231, -1100.4251190754821, -7.278681089101213], [-271.815969077903, 559.6580465940733, -32.46047482791194], [1.9622899599665666, -57.173814538844006, 308.7233197812385]], p.Y_FROM_LINRGB = [0.2126, 0.7152, 0.0722], p.CRITICAL_PLANES = [0.015176349177441876, 0.045529047532325624, 0.07588174588720938, 0.10623444424209313, 0.13658714259697685, 0.16693984095186062, 0.19729253930674434, 0.2276452376616281, 0.2579979360165119, 0.28835063437139563, 0.3188300904430532, 0.350925934958123, 0.3848314933096426, 0.42057480301049466, 0.458183274052838, 0.4976837250274023, 0.5391024159806381, 0.5824650784040898, 0.6277969426914107, 0.6751227633498623, 0.7244668422128921, 0.775853049866786, 0.829304845476233, 0.8848452951698498, 0.942497089126609, 1.0022825574869039, 1.0642236851973577, 1.1283421258858297, 1.1946592148522128, 1.2631959812511864, 1.3339731595349034, 1.407011200216447, 1.4823302800086415, 1.5599503113873272, 1.6398909516233677, 1.7221716113234105, 1.8068114625156377, 1.8938294463134073, 1.9832442801866852, 2.075074464868551, 2.1693382909216234, 2.2660538449872063, 2.36523901573795, 2.4669114995532007, 2.5710888059345764, 2.6777882626779785, 2.7870270208169257, 2.898822059350997, 3.0131901897720907, 3.1301480604002863, 3.2497121605402226, 3.3718988244681087, 3.4967242352587946, 3.624204428461639, 3.754355295633311, 3.887192587735158, 4.022731918402185, 4.160988767090289, 4.301978482107941, 4.445716283538092, 4.592217266055746, 4.741496401646282, 4.893568542229298, 5.048448422192488, 5.20615066083972, 5.3666897647573375, 5.5300801301023865, 5.696336044816294, 5.865471690767354, 6.037501145825082, 6.212438385869475, 6.390297286737924, 6.571091626112461, 6.7548350853498045, 6.941541251256611, 7.131223617812143, 7.323895587840543, 7.5195704746346665, 7.7182615035334345, 7.919981813454504, 8.124744458384042, 8.332562408825165, 8.543448553206703, 8.757415699253682, 8.974476575321063, 9.194643831691977, 9.417930041841839, 9.644347703669503, 9.873909240696694, 10.106627003236781, 10.342513269534024, 10.58158024687427, 10.8238400726681, 11.069304815507364, 11.317986476196008, 11.569896988756009, 11.825048221409341, 12.083451977536606, 12.345119996613247, 12.610063955123938, 12.878295467455942, 13.149826086772048, 13.42466730586372, 13.702830557985108, 13.984327217668513, 14.269168601521828, 14.55736596900856, 14.848930523210871, 15.143873411576273, 15.44220572664832, 15.743938506781891, 16.04908273684337, 16.35764934889634, 16.66964922287304, 16.985093187232053, 17.30399201960269, 17.62635644741625, 17.95219714852476, 18.281524751807332, 18.614349837764564, 18.95068293910138, 19.290534541298456, 19.633915083172692, 19.98083495742689, 20.331304511189067, 20.685334046541502, 21.042933821039977, 21.404114048223256, 21.76888489811322, 22.137256497705877, 22.50923893145328, 22.884842241736916, 23.264076429332462, 23.6469514538663, 24.033477234264016, 24.42366364919083, 24.817520537484558, 25.21505769858089, 25.61628489293138, 26.021211842414342, 26.429848230738664, 26.842203703840827, 27.258287870275353, 27.678110301598522, 28.10168053274597, 28.529008062403893, 28.96010235337422, 29.39497283293396, 29.83362889318845, 30.276079891419332, 30.722335150426627, 31.172403958865512, 31.62629557157785, 32.08401920991837, 32.54558406207592, 33.010999283389665, 33.4802739966603, 33.953417292456834, 34.430438229418264, 34.911345834551085, 35.39614910352207, 35.88485700094671, 36.37747846067349, 36.87402238606382, 37.37449765026789, 37.87891309649659, 38.38727753828926, 38.89959975977785, 39.41588851594697, 39.93615253289054, 40.460400508064545, 40.98864111053629, 41.520882981230194, 42.05713473317016, 42.597404951718396, 43.141702194811224, 43.6900349931913, 44.24241185063697, 44.798841244188324, 45.35933162437017, 45.92389141541209, 46.49252901546552, 47.065252796817916, 47.64207110610409, 48.22299226451468, 48.808024568002054, 49.3971762874833, 49.9904556690408, 50.587870934119984, 51.189430279724725, 51.79514187861014, 52.40501387947288, 53.0190544071392, 53.637271562750364, 54.259673423945976, 54.88626804504493, 55.517063457223934, 56.15206766869424, 56.79128866487574, 57.43473440856916, 58.08241284012621, 58.734331877617365, 59.39049941699807, 60.05092333227251, 60.715611475655585, 61.38457167773311, 62.057811747619894, 62.7353394731159, 63.417162620860914, 64.10328893648692, 64.79372614476921, 65.48848194977529, 66.18756403501224, 66.89098006357258, 67.59873767827808, 68.31084450182222, 69.02730813691093, 69.74813616640164, 70.47333615344107, 71.20291564160104, 71.93688215501312, 72.67524319850172, 73.41800625771542, 74.16517879925733, 74.9167682708136, 75.67278210128072, 76.43322770089146, 77.1981124613393, 77.96744375590167, 78.74122893956174, 79.51947534912904, 80.30219030335869, 81.08938110306934, 81.88105503125999, 82.67721935322541, 83.4778813166706, 84.28304815182372, 85.09272707154808, 85.90692527145302, 86.72564993000343, 87.54890820862819, 88.3767072518277, 89.2090541872801, 90.04595612594655, 90.88742016217518, 91.73345337380438, 92.58406282226491, 93.43925555268066, 94.29903859396902, 95.16341895893969, 96.03240364439274, 96.9059996312159, 97.78421388448044, 98.6670533535366, 99.55452497210776];
@@ -272,19 +272,19 @@ class L {
272
272
  }
273
273
  constructor(e) {
274
274
  this.argb = e;
275
- const t = O.fromInt(e);
275
+ const t = V.fromInt(e);
276
276
  this.internalHue = t.hue, this.internalChroma = t.chroma, this.internalTone = Te(e), this.argb = e;
277
277
  }
278
278
  setInternalState(e) {
279
- const t = O.fromInt(e);
279
+ const t = V.fromInt(e);
280
280
  this.internalHue = t.hue, this.internalChroma = t.chroma, this.internalTone = Te(e), this.argb = e;
281
281
  }
282
282
  inViewingConditions(e) {
283
- const t = O.fromInt(this.toInt()).xyzInViewingConditions(e), o = O.fromXyzInViewingConditions(t[0], t[1], t[2], U.make());
283
+ const t = V.fromInt(this.toInt()).xyzInViewingConditions(e), o = V.fromXyzInViewingConditions(t[0], t[1], t[2], U.make());
284
284
  return L.from(o.hue, o.chroma, Ie(t[1]));
285
285
  }
286
286
  }
287
- class Ve {
287
+ class Oe {
288
288
  static harmonize(e, t) {
289
289
  const o = L.fromInt(e), n = L.fromInt(t), a = (s = o.hue, i = n.hue, 180 - Math.abs(Math.abs(s - i) - 180));
290
290
  var s, i;
@@ -293,17 +293,17 @@ class Ve {
293
293
  return L.from(h, o.chroma, o.tone).toInt();
294
294
  }
295
295
  static hctHue(e, t, o) {
296
- const n = Ve.cam16Ucs(e, t, o), a = O.fromInt(n), s = O.fromInt(e);
296
+ const n = Oe.cam16Ucs(e, t, o), a = V.fromInt(n), s = V.fromInt(e);
297
297
  return L.from(a.hue, s.chroma, Te(e)).toInt();
298
298
  }
299
299
  static cam16Ucs(e, t, o) {
300
- const n = O.fromInt(e), a = O.fromInt(t), s = n.jstar, i = n.astar, m = n.bstar, h = s + (a.jstar - s) * o, u = i + (a.astar - i) * o, k = m + (a.bstar - m) * o;
301
- return O.fromUcs(h, u, k).toInt();
300
+ const n = V.fromInt(e), a = V.fromInt(t), s = n.jstar, i = n.astar, m = n.bstar, h = s + (a.jstar - s) * o, u = i + (a.astar - i) * o, k = m + (a.bstar - m) * o;
301
+ return V.fromUcs(h, u, k).toInt();
302
302
  }
303
303
  }
304
- class V {
304
+ class O {
305
305
  static ratioOfTones(e, t) {
306
- return e = Pe(0, 100, e), t = Pe(0, 100, t), V.ratioOfYs(K(e), K(t));
306
+ return e = Pe(0, 100, e), t = Pe(0, 100, t), O.ratioOfYs(K(e), K(t));
307
307
  }
308
308
  static ratioOfYs(e, t) {
309
309
  const o = e > t ? e : t;
@@ -311,34 +311,34 @@ class V {
311
311
  }
312
312
  static lighter(e, t) {
313
313
  if (e < 0 || e > 100) return -1;
314
- const o = K(e), n = t * (o + 5) - 5, a = V.ratioOfYs(n, o), s = Math.abs(a - t);
314
+ const o = K(e), n = t * (o + 5) - 5, a = O.ratioOfYs(n, o), s = Math.abs(a - t);
315
315
  if (a < t && s > 0.04) return -1;
316
316
  const i = Ie(n) + 0.4;
317
317
  return i < 0 || i > 100 ? -1 : i;
318
318
  }
319
319
  static darker(e, t) {
320
320
  if (e < 0 || e > 100) return -1;
321
- const o = K(e), n = (o + 5) / t - 5, a = V.ratioOfYs(o, n), s = Math.abs(a - t);
321
+ const o = K(e), n = (o + 5) / t - 5, a = O.ratioOfYs(o, n), s = Math.abs(a - t);
322
322
  if (a < t && s > 0.04) return -1;
323
323
  const i = Ie(n) - 0.4;
324
324
  return i < 0 || i > 100 ? -1 : i;
325
325
  }
326
326
  static lighterUnsafe(e, t) {
327
- const o = V.lighter(e, t);
327
+ const o = O.lighter(e, t);
328
328
  return o < 0 ? 100 : o;
329
329
  }
330
330
  static darkerUnsafe(e, t) {
331
- const o = V.darker(e, t);
331
+ const o = O.darker(e, t);
332
332
  return o < 0 ? 0 : o;
333
333
  }
334
334
  }
335
- class Oe {
335
+ class Ve {
336
336
  static isDisliked(e) {
337
337
  const t = Math.round(e.hue) >= 90 && Math.round(e.hue) <= 111, o = Math.round(e.chroma) > 16, n = Math.round(e.tone) < 65;
338
338
  return t && o && n;
339
339
  }
340
340
  static fixIfDisliked(e) {
341
- return Oe.isDisliked(e) ? L.from(e.hue, e.chroma, 70) : e;
341
+ return Ve.isDisliked(e) ? L.from(e.hue, e.chroma, 70) : e;
342
342
  }
343
343
  }
344
344
  class d {
@@ -363,26 +363,26 @@ class d {
363
363
  const t = e.contrastLevel < 0;
364
364
  if (this.toneDeltaPair) {
365
365
  const o = this.toneDeltaPair(e), n = o.roleA, a = o.roleB, s = o.delta, i = o.polarity, m = o.stayTogether, h = this.background(e).getTone(e), u = i === "nearer" || i === "lighter" && !e.isDark || i === "darker" && e.isDark, k = u ? n : a, C = u ? a : n, l = this.name === k.name, g = e.isDark ? 1 : -1, w = k.contrastCurve.get(e.contrastLevel), P = C.contrastCurve.get(e.contrastLevel), F = k.tone(e);
366
- let x = V.ratioOfTones(h, F) >= w ? F : d.foregroundTone(h, w);
366
+ let x = O.ratioOfTones(h, F) >= w ? F : d.foregroundTone(h, w);
367
367
  const A = C.tone(e);
368
- let b = V.ratioOfTones(h, A) >= P ? A : d.foregroundTone(h, P);
368
+ let b = O.ratioOfTones(h, A) >= P ? A : d.foregroundTone(h, P);
369
369
  return t && (x = d.foregroundTone(h, w), b = d.foregroundTone(h, P)), (b - x) * g >= s || (b = Pe(0, 100, x + s * g), (b - x) * g >= s || (x = Pe(0, 100, b - s * g))), 50 <= x && x < 60 ? g > 0 ? (x = 60, b = Math.max(b, x + s * g)) : (x = 49, b = Math.min(b, x + s * g)) : 50 <= b && b < 60 && (m ? g > 0 ? (x = 60, b = Math.max(b, x + s * g)) : (x = 49, b = Math.min(b, x + s * g)) : b = g > 0 ? 60 : 49), l ? x : b;
370
370
  }
371
371
  {
372
372
  let o = this.tone(e);
373
373
  if (this.background == null) return o;
374
374
  const n = this.background(e).getTone(e), a = this.contrastCurve.get(e.contrastLevel);
375
- if (V.ratioOfTones(n, o) >= a || (o = d.foregroundTone(n, a)), t && (o = d.foregroundTone(n, a)), this.isBackground && 50 <= o && o < 60 && (o = V.ratioOfTones(49, n) >= a ? 49 : 60), this.secondBackground) {
375
+ if (O.ratioOfTones(n, o) >= a || (o = d.foregroundTone(n, a)), t && (o = d.foregroundTone(n, a)), this.isBackground && 50 <= o && o < 60 && (o = O.ratioOfTones(49, n) >= a ? 49 : 60), this.secondBackground) {
376
376
  const [s, i] = [this.background, this.secondBackground], [m, h] = [s(e).getTone(e), i(e).getTone(e)], [u, k] = [Math.max(m, h), Math.min(m, h)];
377
- if (V.ratioOfTones(u, o) >= a && V.ratioOfTones(k, o) >= a) return o;
378
- const C = V.lighter(u, a), l = V.darker(k, a), g = [];
377
+ if (O.ratioOfTones(u, o) >= a && O.ratioOfTones(k, o) >= a) return o;
378
+ const C = O.lighter(u, a), l = O.darker(k, a), g = [];
379
379
  return C !== -1 && g.push(C), l !== -1 && g.push(l), d.tonePrefersLightForeground(m) || d.tonePrefersLightForeground(h) ? C < 0 ? 100 : C : g.length === 1 ? g[0] : l < 0 ? 0 : l;
380
380
  }
381
381
  return o;
382
382
  }
383
383
  }
384
384
  static foregroundTone(e, t) {
385
- const o = V.lighterUnsafe(e, t), n = V.darkerUnsafe(e, t), a = V.ratioOfTones(o, e), s = V.ratioOfTones(n, e);
385
+ const o = O.lighterUnsafe(e, t), n = O.darkerUnsafe(e, t), a = O.ratioOfTones(o, e), s = O.ratioOfTones(n, e);
386
386
  if (d.tonePrefersLightForeground(e)) {
387
387
  const i = Math.abs(a - s) < 0.1 && a < t && s < t;
388
388
  return a >= t || a >= s || i ? o : n;
@@ -459,7 +459,7 @@ class R {
459
459
  }
460
460
  }
461
461
  var ye;
462
- function te(r) {
462
+ function oe(r) {
463
463
  return r.variant === ye.FIDELITY || r.variant === ye.CONTENT;
464
464
  }
465
465
  function S(r) {
@@ -473,9 +473,9 @@ class c {
473
473
  return e.isDark ? c.surfaceBright : c.surfaceDim;
474
474
  }
475
475
  }
476
- c.contentAccentToneDelta = 15, c.primaryPaletteKeyColor = d.fromPalette({ name: "primary_palette_key_color", palette: (r) => r.primaryPalette, tone: (r) => r.primaryPalette.keyColor.tone }), c.secondaryPaletteKeyColor = d.fromPalette({ name: "secondary_palette_key_color", palette: (r) => r.secondaryPalette, tone: (r) => r.secondaryPalette.keyColor.tone }), c.tertiaryPaletteKeyColor = d.fromPalette({ name: "tertiary_palette_key_color", palette: (r) => r.tertiaryPalette, tone: (r) => r.tertiaryPalette.keyColor.tone }), c.neutralPaletteKeyColor = d.fromPalette({ name: "neutral_palette_key_color", palette: (r) => r.neutralPalette, tone: (r) => r.neutralPalette.keyColor.tone }), c.neutralVariantPaletteKeyColor = d.fromPalette({ name: "neutral_variant_palette_key_color", palette: (r) => r.neutralVariantPalette, tone: (r) => r.neutralVariantPalette.keyColor.tone }), c.background = d.fromPalette({ name: "background", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 6 : 98, isBackground: !0 }), c.onBackground = d.fromPalette({ name: "on_background", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 90 : 10, background: (r) => c.background, contrastCurve: new f(3, 3, 4.5, 7) }), c.surface = d.fromPalette({ name: "surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 6 : 98, isBackground: !0 }), c.surfaceDim = d.fromPalette({ name: "surface_dim", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 6 : new f(87, 87, 80, 75).get(r.contrastLevel), isBackground: !0 }), c.surfaceBright = d.fromPalette({ name: "surface_bright", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(24, 24, 29, 34).get(r.contrastLevel) : 98, isBackground: !0 }), c.surfaceContainerLowest = d.fromPalette({ name: "surface_container_lowest", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(4, 4, 2, 0).get(r.contrastLevel) : 100, isBackground: !0 }), c.surfaceContainerLow = d.fromPalette({ name: "surface_container_low", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(10, 10, 11, 12).get(r.contrastLevel) : new f(96, 96, 96, 95).get(r.contrastLevel), isBackground: !0 }), c.surfaceContainer = d.fromPalette({ name: "surface_container", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(12, 12, 16, 20).get(r.contrastLevel) : new f(94, 94, 92, 90).get(r.contrastLevel), isBackground: !0 }), c.surfaceContainerHigh = d.fromPalette({ name: "surface_container_high", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(17, 17, 21, 25).get(r.contrastLevel) : new f(92, 92, 88, 85).get(r.contrastLevel), isBackground: !0 }), c.surfaceContainerHighest = d.fromPalette({ name: "surface_container_highest", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(22, 22, 26, 30).get(r.contrastLevel) : new f(90, 90, 84, 80).get(r.contrastLevel), isBackground: !0 }), c.onSurface = d.fromPalette({ name: "on_surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 90 : 10, background: (r) => c.highestSurface(r), contrastCurve: new f(4.5, 7, 11, 21) }), c.surfaceVariant = d.fromPalette({ name: "surface_variant", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 30 : 90, isBackground: !0 }), c.onSurfaceVariant = d.fromPalette({ name: "on_surface_variant", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 80 : 30, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 11) }), c.inverseSurface = d.fromPalette({ name: "inverse_surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 90 : 20 }), c.inverseOnSurface = d.fromPalette({ name: "inverse_on_surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 20 : 95, background: (r) => c.inverseSurface, contrastCurve: new f(4.5, 7, 11, 21) }), c.outline = d.fromPalette({ name: "outline", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 60 : 50, background: (r) => c.highestSurface(r), contrastCurve: new f(1.5, 3, 4.5, 7) }), c.outlineVariant = d.fromPalette({ name: "outline_variant", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 30 : 80, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5) }), c.shadow = d.fromPalette({ name: "shadow", palette: (r) => r.neutralPalette, tone: (r) => 0 }), c.scrim = d.fromPalette({ name: "scrim", palette: (r) => r.neutralPalette, tone: (r) => 0 }), c.surfaceTint = d.fromPalette({ name: "surface_tint", palette: (r) => r.primaryPalette, tone: (r) => r.isDark ? 80 : 40, isBackground: !0 }), c.primary = d.fromPalette({ name: "primary", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? r.isDark ? 100 : 0 : r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.primaryContainer, c.primary, 10, "nearer", !1) }), c.onPrimary = d.fromPalette({ name: "on_primary", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? r.isDark ? 10 : 90 : r.isDark ? 20 : 100, background: (r) => c.primary, contrastCurve: new f(4.5, 7, 11, 21) }), c.primaryContainer = d.fromPalette({ name: "primary_container", palette: (r) => r.primaryPalette, tone: (r) => te(r) ? r.sourceColorHct.tone : S(r) ? r.isDark ? 85 : 25 : r.isDark ? 30 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.primaryContainer, c.primary, 10, "nearer", !1) }), c.onPrimaryContainer = d.fromPalette({ name: "on_primary_container", palette: (r) => r.primaryPalette, tone: (r) => te(r) ? d.foregroundTone(c.primaryContainer.tone(r), 4.5) : S(r) ? r.isDark ? 0 : 100 : r.isDark ? 90 : 30, background: (r) => c.primaryContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.inversePrimary = d.fromPalette({ name: "inverse_primary", palette: (r) => r.primaryPalette, tone: (r) => r.isDark ? 40 : 80, background: (r) => c.inverseSurface, contrastCurve: new f(3, 4.5, 7, 7) }), c.secondary = d.fromPalette({ name: "secondary", palette: (r) => r.secondaryPalette, tone: (r) => r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.secondaryContainer, c.secondary, 10, "nearer", !1) }), c.onSecondary = d.fromPalette({ name: "on_secondary", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? r.isDark ? 10 : 100 : r.isDark ? 20 : 100, background: (r) => c.secondary, contrastCurve: new f(4.5, 7, 11, 21) }), c.secondaryContainer = d.fromPalette({ name: "secondary_container", palette: (r) => r.secondaryPalette, tone: (r) => {
476
+ c.contentAccentToneDelta = 15, c.primaryPaletteKeyColor = d.fromPalette({ name: "primary_palette_key_color", palette: (r) => r.primaryPalette, tone: (r) => r.primaryPalette.keyColor.tone }), c.secondaryPaletteKeyColor = d.fromPalette({ name: "secondary_palette_key_color", palette: (r) => r.secondaryPalette, tone: (r) => r.secondaryPalette.keyColor.tone }), c.tertiaryPaletteKeyColor = d.fromPalette({ name: "tertiary_palette_key_color", palette: (r) => r.tertiaryPalette, tone: (r) => r.tertiaryPalette.keyColor.tone }), c.neutralPaletteKeyColor = d.fromPalette({ name: "neutral_palette_key_color", palette: (r) => r.neutralPalette, tone: (r) => r.neutralPalette.keyColor.tone }), c.neutralVariantPaletteKeyColor = d.fromPalette({ name: "neutral_variant_palette_key_color", palette: (r) => r.neutralVariantPalette, tone: (r) => r.neutralVariantPalette.keyColor.tone }), c.background = d.fromPalette({ name: "background", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 6 : 98, isBackground: !0 }), c.onBackground = d.fromPalette({ name: "on_background", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 90 : 10, background: (r) => c.background, contrastCurve: new f(3, 3, 4.5, 7) }), c.surface = d.fromPalette({ name: "surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 6 : 98, isBackground: !0 }), c.surfaceDim = d.fromPalette({ name: "surface_dim", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 6 : new f(87, 87, 80, 75).get(r.contrastLevel), isBackground: !0 }), c.surfaceBright = d.fromPalette({ name: "surface_bright", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(24, 24, 29, 34).get(r.contrastLevel) : 98, isBackground: !0 }), c.surfaceContainerLowest = d.fromPalette({ name: "surface_container_lowest", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(4, 4, 2, 0).get(r.contrastLevel) : 100, isBackground: !0 }), c.surfaceContainerLow = d.fromPalette({ name: "surface_container_low", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(10, 10, 11, 12).get(r.contrastLevel) : new f(96, 96, 96, 95).get(r.contrastLevel), isBackground: !0 }), c.surfaceContainer = d.fromPalette({ name: "surface_container", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(12, 12, 16, 20).get(r.contrastLevel) : new f(94, 94, 92, 90).get(r.contrastLevel), isBackground: !0 }), c.surfaceContainerHigh = d.fromPalette({ name: "surface_container_high", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(17, 17, 21, 25).get(r.contrastLevel) : new f(92, 92, 88, 85).get(r.contrastLevel), isBackground: !0 }), c.surfaceContainerHighest = d.fromPalette({ name: "surface_container_highest", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? new f(22, 22, 26, 30).get(r.contrastLevel) : new f(90, 90, 84, 80).get(r.contrastLevel), isBackground: !0 }), c.onSurface = d.fromPalette({ name: "on_surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 90 : 10, background: (r) => c.highestSurface(r), contrastCurve: new f(4.5, 7, 11, 21) }), c.surfaceVariant = d.fromPalette({ name: "surface_variant", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 30 : 90, isBackground: !0 }), c.onSurfaceVariant = d.fromPalette({ name: "on_surface_variant", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 80 : 30, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 11) }), c.inverseSurface = d.fromPalette({ name: "inverse_surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 90 : 20 }), c.inverseOnSurface = d.fromPalette({ name: "inverse_on_surface", palette: (r) => r.neutralPalette, tone: (r) => r.isDark ? 20 : 95, background: (r) => c.inverseSurface, contrastCurve: new f(4.5, 7, 11, 21) }), c.outline = d.fromPalette({ name: "outline", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 60 : 50, background: (r) => c.highestSurface(r), contrastCurve: new f(1.5, 3, 4.5, 7) }), c.outlineVariant = d.fromPalette({ name: "outline_variant", palette: (r) => r.neutralVariantPalette, tone: (r) => r.isDark ? 30 : 80, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5) }), c.shadow = d.fromPalette({ name: "shadow", palette: (r) => r.neutralPalette, tone: (r) => 0 }), c.scrim = d.fromPalette({ name: "scrim", palette: (r) => r.neutralPalette, tone: (r) => 0 }), c.surfaceTint = d.fromPalette({ name: "surface_tint", palette: (r) => r.primaryPalette, tone: (r) => r.isDark ? 80 : 40, isBackground: !0 }), c.primary = d.fromPalette({ name: "primary", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? r.isDark ? 100 : 0 : r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.primaryContainer, c.primary, 10, "nearer", !1) }), c.onPrimary = d.fromPalette({ name: "on_primary", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? r.isDark ? 10 : 90 : r.isDark ? 20 : 100, background: (r) => c.primary, contrastCurve: new f(4.5, 7, 11, 21) }), c.primaryContainer = d.fromPalette({ name: "primary_container", palette: (r) => r.primaryPalette, tone: (r) => oe(r) ? r.sourceColorHct.tone : S(r) ? r.isDark ? 85 : 25 : r.isDark ? 30 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.primaryContainer, c.primary, 10, "nearer", !1) }), c.onPrimaryContainer = d.fromPalette({ name: "on_primary_container", palette: (r) => r.primaryPalette, tone: (r) => oe(r) ? d.foregroundTone(c.primaryContainer.tone(r), 4.5) : S(r) ? r.isDark ? 0 : 100 : r.isDark ? 90 : 30, background: (r) => c.primaryContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.inversePrimary = d.fromPalette({ name: "inverse_primary", palette: (r) => r.primaryPalette, tone: (r) => r.isDark ? 40 : 80, background: (r) => c.inverseSurface, contrastCurve: new f(3, 4.5, 7, 7) }), c.secondary = d.fromPalette({ name: "secondary", palette: (r) => r.secondaryPalette, tone: (r) => r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.secondaryContainer, c.secondary, 10, "nearer", !1) }), c.onSecondary = d.fromPalette({ name: "on_secondary", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? r.isDark ? 10 : 100 : r.isDark ? 20 : 100, background: (r) => c.secondary, contrastCurve: new f(4.5, 7, 11, 21) }), c.secondaryContainer = d.fromPalette({ name: "secondary_container", palette: (r) => r.secondaryPalette, tone: (r) => {
477
477
  const e = r.isDark ? 30 : 90;
478
- return S(r) ? r.isDark ? 30 : 85 : te(r) ? function(t, o, n, a) {
478
+ return S(r) ? r.isDark ? 30 : 85 : oe(r) ? function(t, o, n, a) {
479
479
  let s = n, i = L.from(t, o, n);
480
480
  if (i.chroma < o) {
481
481
  let m = i.chroma;
@@ -488,12 +488,12 @@ c.contentAccentToneDelta = 15, c.primaryPaletteKeyColor = d.fromPalette({ name:
488
488
  }
489
489
  return s;
490
490
  }(r.secondaryPalette.hue, r.secondaryPalette.chroma, e, !r.isDark) : e;
491
- }, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.secondaryContainer, c.secondary, 10, "nearer", !1) }), c.onSecondaryContainer = d.fromPalette({ name: "on_secondary_container", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? r.isDark ? 90 : 10 : te(r) ? d.foregroundTone(c.secondaryContainer.tone(r), 4.5) : r.isDark ? 90 : 30, background: (r) => c.secondaryContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.tertiary = d.fromPalette({ name: "tertiary", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? r.isDark ? 90 : 25 : r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.tertiaryContainer, c.tertiary, 10, "nearer", !1) }), c.onTertiary = d.fromPalette({ name: "on_tertiary", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? r.isDark ? 10 : 90 : r.isDark ? 20 : 100, background: (r) => c.tertiary, contrastCurve: new f(4.5, 7, 11, 21) }), c.tertiaryContainer = d.fromPalette({ name: "tertiary_container", palette: (r) => r.tertiaryPalette, tone: (r) => {
491
+ }, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.secondaryContainer, c.secondary, 10, "nearer", !1) }), c.onSecondaryContainer = d.fromPalette({ name: "on_secondary_container", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? r.isDark ? 90 : 10 : oe(r) ? d.foregroundTone(c.secondaryContainer.tone(r), 4.5) : r.isDark ? 90 : 30, background: (r) => c.secondaryContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.tertiary = d.fromPalette({ name: "tertiary", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? r.isDark ? 90 : 25 : r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.tertiaryContainer, c.tertiary, 10, "nearer", !1) }), c.onTertiary = d.fromPalette({ name: "on_tertiary", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? r.isDark ? 10 : 90 : r.isDark ? 20 : 100, background: (r) => c.tertiary, contrastCurve: new f(4.5, 7, 11, 21) }), c.tertiaryContainer = d.fromPalette({ name: "tertiary_container", palette: (r) => r.tertiaryPalette, tone: (r) => {
492
492
  if (S(r)) return r.isDark ? 60 : 49;
493
- if (!te(r)) return r.isDark ? 30 : 90;
493
+ if (!oe(r)) return r.isDark ? 30 : 90;
494
494
  const e = r.tertiaryPalette.getHct(r.sourceColorHct.tone);
495
- return Oe.fixIfDisliked(e).tone;
496
- }, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.tertiaryContainer, c.tertiary, 10, "nearer", !1) }), c.onTertiaryContainer = d.fromPalette({ name: "on_tertiary_container", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? r.isDark ? 0 : 100 : te(r) ? d.foregroundTone(c.tertiaryContainer.tone(r), 4.5) : r.isDark ? 90 : 30, background: (r) => c.tertiaryContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.error = d.fromPalette({ name: "error", palette: (r) => r.errorPalette, tone: (r) => r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.errorContainer, c.error, 10, "nearer", !1) }), c.onError = d.fromPalette({ name: "on_error", palette: (r) => r.errorPalette, tone: (r) => r.isDark ? 20 : 100, background: (r) => c.error, contrastCurve: new f(4.5, 7, 11, 21) }), c.errorContainer = d.fromPalette({ name: "error_container", palette: (r) => r.errorPalette, tone: (r) => r.isDark ? 30 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.errorContainer, c.error, 10, "nearer", !1) }), c.onErrorContainer = d.fromPalette({ name: "on_error_container", palette: (r) => r.errorPalette, tone: (r) => S(r) ? r.isDark ? 90 : 10 : r.isDark ? 90 : 30, background: (r) => c.errorContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.primaryFixed = d.fromPalette({ name: "primary_fixed", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 40 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.primaryFixed, c.primaryFixedDim, 10, "lighter", !0) }), c.primaryFixedDim = d.fromPalette({ name: "primary_fixed_dim", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 30 : 80, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.primaryFixed, c.primaryFixedDim, 10, "lighter", !0) }), c.onPrimaryFixed = d.fromPalette({ name: "on_primary_fixed", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 100 : 10, background: (r) => c.primaryFixedDim, secondBackground: (r) => c.primaryFixed, contrastCurve: new f(4.5, 7, 11, 21) }), c.onPrimaryFixedVariant = d.fromPalette({ name: "on_primary_fixed_variant", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 90 : 30, background: (r) => c.primaryFixedDim, secondBackground: (r) => c.primaryFixed, contrastCurve: new f(3, 4.5, 7, 11) }), c.secondaryFixed = d.fromPalette({ name: "secondary_fixed", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? 80 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.secondaryFixed, c.secondaryFixedDim, 10, "lighter", !0) }), c.secondaryFixedDim = d.fromPalette({ name: "secondary_fixed_dim", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? 70 : 80, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.secondaryFixed, c.secondaryFixedDim, 10, "lighter", !0) }), c.onSecondaryFixed = d.fromPalette({ name: "on_secondary_fixed", palette: (r) => r.secondaryPalette, tone: (r) => 10, background: (r) => c.secondaryFixedDim, secondBackground: (r) => c.secondaryFixed, contrastCurve: new f(4.5, 7, 11, 21) }), c.onSecondaryFixedVariant = d.fromPalette({ name: "on_secondary_fixed_variant", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? 25 : 30, background: (r) => c.secondaryFixedDim, secondBackground: (r) => c.secondaryFixed, contrastCurve: new f(3, 4.5, 7, 11) }), c.tertiaryFixed = d.fromPalette({ name: "tertiary_fixed", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 40 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.tertiaryFixed, c.tertiaryFixedDim, 10, "lighter", !0) }), c.tertiaryFixedDim = d.fromPalette({ name: "tertiary_fixed_dim", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 30 : 80, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.tertiaryFixed, c.tertiaryFixedDim, 10, "lighter", !0) }), c.onTertiaryFixed = d.fromPalette({ name: "on_tertiary_fixed", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 100 : 10, background: (r) => c.tertiaryFixedDim, secondBackground: (r) => c.tertiaryFixed, contrastCurve: new f(4.5, 7, 11, 21) }), c.onTertiaryFixedVariant = d.fromPalette({ name: "on_tertiary_fixed_variant", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 90 : 30, background: (r) => c.tertiaryFixedDim, secondBackground: (r) => c.tertiaryFixed, contrastCurve: new f(3, 4.5, 7, 11) });
495
+ return Ve.fixIfDisliked(e).tone;
496
+ }, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.tertiaryContainer, c.tertiary, 10, "nearer", !1) }), c.onTertiaryContainer = d.fromPalette({ name: "on_tertiary_container", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? r.isDark ? 0 : 100 : oe(r) ? d.foregroundTone(c.tertiaryContainer.tone(r), 4.5) : r.isDark ? 90 : 30, background: (r) => c.tertiaryContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.error = d.fromPalette({ name: "error", palette: (r) => r.errorPalette, tone: (r) => r.isDark ? 80 : 40, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(3, 4.5, 7, 7), toneDeltaPair: (r) => new R(c.errorContainer, c.error, 10, "nearer", !1) }), c.onError = d.fromPalette({ name: "on_error", palette: (r) => r.errorPalette, tone: (r) => r.isDark ? 20 : 100, background: (r) => c.error, contrastCurve: new f(4.5, 7, 11, 21) }), c.errorContainer = d.fromPalette({ name: "error_container", palette: (r) => r.errorPalette, tone: (r) => r.isDark ? 30 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.errorContainer, c.error, 10, "nearer", !1) }), c.onErrorContainer = d.fromPalette({ name: "on_error_container", palette: (r) => r.errorPalette, tone: (r) => S(r) ? r.isDark ? 90 : 10 : r.isDark ? 90 : 30, background: (r) => c.errorContainer, contrastCurve: new f(3, 4.5, 7, 11) }), c.primaryFixed = d.fromPalette({ name: "primary_fixed", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 40 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.primaryFixed, c.primaryFixedDim, 10, "lighter", !0) }), c.primaryFixedDim = d.fromPalette({ name: "primary_fixed_dim", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 30 : 80, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.primaryFixed, c.primaryFixedDim, 10, "lighter", !0) }), c.onPrimaryFixed = d.fromPalette({ name: "on_primary_fixed", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 100 : 10, background: (r) => c.primaryFixedDim, secondBackground: (r) => c.primaryFixed, contrastCurve: new f(4.5, 7, 11, 21) }), c.onPrimaryFixedVariant = d.fromPalette({ name: "on_primary_fixed_variant", palette: (r) => r.primaryPalette, tone: (r) => S(r) ? 90 : 30, background: (r) => c.primaryFixedDim, secondBackground: (r) => c.primaryFixed, contrastCurve: new f(3, 4.5, 7, 11) }), c.secondaryFixed = d.fromPalette({ name: "secondary_fixed", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? 80 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.secondaryFixed, c.secondaryFixedDim, 10, "lighter", !0) }), c.secondaryFixedDim = d.fromPalette({ name: "secondary_fixed_dim", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? 70 : 80, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.secondaryFixed, c.secondaryFixedDim, 10, "lighter", !0) }), c.onSecondaryFixed = d.fromPalette({ name: "on_secondary_fixed", palette: (r) => r.secondaryPalette, tone: (r) => 10, background: (r) => c.secondaryFixedDim, secondBackground: (r) => c.secondaryFixed, contrastCurve: new f(4.5, 7, 11, 21) }), c.onSecondaryFixedVariant = d.fromPalette({ name: "on_secondary_fixed_variant", palette: (r) => r.secondaryPalette, tone: (r) => S(r) ? 25 : 30, background: (r) => c.secondaryFixedDim, secondBackground: (r) => c.secondaryFixed, contrastCurve: new f(3, 4.5, 7, 11) }), c.tertiaryFixed = d.fromPalette({ name: "tertiary_fixed", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 40 : 90, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.tertiaryFixed, c.tertiaryFixedDim, 10, "lighter", !0) }), c.tertiaryFixedDim = d.fromPalette({ name: "tertiary_fixed_dim", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 30 : 80, isBackground: !0, background: (r) => c.highestSurface(r), contrastCurve: new f(1, 1, 3, 4.5), toneDeltaPair: (r) => new R(c.tertiaryFixed, c.tertiaryFixedDim, 10, "lighter", !0) }), c.onTertiaryFixed = d.fromPalette({ name: "on_tertiary_fixed", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 100 : 10, background: (r) => c.tertiaryFixedDim, secondBackground: (r) => c.tertiaryFixed, contrastCurve: new f(4.5, 7, 11, 21) }), c.onTertiaryFixedVariant = d.fromPalette({ name: "on_tertiary_fixed_variant", palette: (r) => r.tertiaryPalette, tone: (r) => S(r) ? 90 : 30, background: (r) => c.tertiaryFixedDim, secondBackground: (r) => c.tertiaryFixed, contrastCurve: new f(3, 4.5, 7, 11) });
497
497
  class E {
498
498
  static of(e) {
499
499
  return new E(e, !1);
@@ -649,7 +649,7 @@ class W {
649
649
  return { ...this.props };
650
650
  }
651
651
  }
652
- function Q(r) {
652
+ function G(r) {
653
653
  const e = (r = r.replace("#", "")).length === 3, t = r.length === 6, o = r.length === 8;
654
654
  if (!e && !t && !o) throw new Error("unexpected hex " + r);
655
655
  let n = 0, a = 0, s = 0;
@@ -663,7 +663,7 @@ function hr(r, e = []) {
663
663
  return { source: r, schemes: { light: W.light(r), dark: W.dark(r) }, palettes: { primary: t.a1, secondary: t.a2, tertiary: t.a3, neutral: t.n1, neutralVariant: t.n2, error: t.error }, customColors: e.map((o) => function(n, a) {
664
664
  let s = a.value;
665
665
  const i = s, m = n;
666
- a.blend && (s = Ve.harmonize(i, m));
666
+ a.blend && (s = Oe.harmonize(i, m));
667
667
  const h = E.of(s), u = h.a1;
668
668
  return { color: a, value: s, light: { color: u.tone(40), onColor: u.tone(100), colorContainer: u.tone(90), onColorContainer: u.tone(10) }, dark: { color: u.tone(80), onColor: u.tone(20), colorContainer: u.tone(30), onColorContainer: u.tone(90) } };
669
669
  }(r, o)) };
@@ -680,7 +680,7 @@ function Y(r) {
680
680
  return { 0: y(t.tone(0)), 10: y(t.tone(10)), 20: y(t.tone(20)), 30: y(t.tone(30)), 40: y(t.tone(40)), 50: y(t.tone(50)), 60: y(t.tone(60)), 70: y(t.tone(70)), 80: y(t.tone(80)), 90: y(t.tone(90)), 95: y(t.tone(95)), 99: y(t.tone(99)), 100: y(t.tone(100)) };
681
681
  }
682
682
  function mr(r, e = !1, t) {
683
- const o = e ? r.schemes.dark : r.schemes.light, n = M.fromHueAndChroma(r.palettes.primary.hue, r.palettes.primary.chroma), a = M.fromHueAndChroma(r.palettes.secondary.hue, r.palettes.secondary.chroma), s = M.fromHueAndChroma(r.palettes.tertiary.hue, r.palettes.tertiary.chroma), i = M.fromHueAndChroma(r.palettes.neutral.hue, r.palettes.neutral.chroma), m = M.fromHueAndChroma(r.palettes.neutralVariant.hue, r.palettes.neutralVariant.chroma), h = M.fromHueAndChroma(r.palettes.error.hue, r.palettes.error.chroma), u = Y(t?.success ? t.success : Q("#00C853")), k = Y(t?.warning ? t.warning : Q("#FFD600")), C = Y(t?.info ? t.info : Q("#2979FF")), l = { primary: e ? 80 : 40, onPrimary: e ? 20 : 100, primaryContainer: e ? 30 : 90, onPrimaryContainer: e ? 90 : 10, primaryFixed: 90, primaryFixedDim: 80, onPrimaryFixed: 10, onPrimaryFixedVariant: 30, inversePrimary: e ? 40 : 80, secondary: e ? 80 : 40, onSecondary: e ? 20 : 100, secondaryContainer: e ? 30 : 90, onSecondaryContainer: e ? 90 : 10, secondaryFixed: 90, secondaryFixedDim: 80, onSecondaryFixed: 10, onSecondaryFixedVariant: 30, tertiary: e ? 80 : 40, onTertiary: e ? 20 : 100, tertiaryContainer: e ? 30 : 90, onTertiaryContainer: e ? 90 : 10, tertiaryFixed: 90, tertiaryFixedDim: 80, onTertiaryFixed: 10, onTertiaryFixedVariant: 30, error: e ? 80 : 40, onError: e ? 20 : 100, errorContainer: e ? 30 : 90, onErrorContainer: e ? 90 : 10, surface: e ? 6 : 98, surfaceDim: e ? 6 : 87, surfaceBright: e ? 24 : 98, surfaceContainerLowest: e ? 4 : 100, surfaceContainerLow: e ? 10 : 96, surfaceContainer: e ? 12 : 94, surfaceContainerHigh: e ? 17 : 92, surfaceContainerHighest: e ? 22 : 90, onSurface: e ? 90 : 10, onSurfaceVariant: e ? 80 : 30, surfaceTint: e ? 80 : 40, inverseSurface: e ? 90 : 20, inverseOnSurface: e ? 20 : 95, outline: e ? 60 : 50, outlineVariant: e ? 30 : 80, shadow: 0 };
683
+ const o = e ? r.schemes.dark : r.schemes.light, n = M.fromHueAndChroma(r.palettes.primary.hue, r.palettes.primary.chroma), a = M.fromHueAndChroma(r.palettes.secondary.hue, r.palettes.secondary.chroma), s = M.fromHueAndChroma(r.palettes.tertiary.hue, r.palettes.tertiary.chroma), i = M.fromHueAndChroma(r.palettes.neutral.hue, r.palettes.neutral.chroma), m = M.fromHueAndChroma(r.palettes.neutralVariant.hue, r.palettes.neutralVariant.chroma), h = M.fromHueAndChroma(r.palettes.error.hue, r.palettes.error.chroma), u = Y(t?.success ? t.success : G("#00C853")), k = Y(t?.warning ? t.warning : G("#FFD600")), C = Y(t?.info ? t.info : G("#2979FF")), l = { primary: e ? 80 : 40, onPrimary: e ? 20 : 100, primaryContainer: e ? 30 : 90, onPrimaryContainer: e ? 90 : 10, primaryFixed: 90, primaryFixedDim: 80, onPrimaryFixed: 10, onPrimaryFixedVariant: 30, inversePrimary: e ? 40 : 80, secondary: e ? 80 : 40, onSecondary: e ? 20 : 100, secondaryContainer: e ? 30 : 90, onSecondaryContainer: e ? 90 : 10, secondaryFixed: 90, secondaryFixedDim: 80, onSecondaryFixed: 10, onSecondaryFixedVariant: 30, tertiary: e ? 80 : 40, onTertiary: e ? 20 : 100, tertiaryContainer: e ? 30 : 90, onTertiaryContainer: e ? 90 : 10, tertiaryFixed: 90, tertiaryFixedDim: 80, onTertiaryFixed: 10, onTertiaryFixedVariant: 30, error: e ? 80 : 40, onError: e ? 20 : 100, errorContainer: e ? 30 : 90, onErrorContainer: e ? 90 : 10, surface: e ? 6 : 98, surfaceDim: e ? 6 : 87, surfaceBright: e ? 24 : 98, surfaceContainerLowest: e ? 4 : 100, surfaceContainerLow: e ? 10 : 96, surfaceContainer: e ? 12 : 94, surfaceContainerHigh: e ? 17 : 92, surfaceContainerHighest: e ? 22 : 90, onSurface: e ? 90 : 10, onSurfaceVariant: e ? 80 : 30, surfaceTint: e ? 80 : 40, inverseSurface: e ? 90 : 20, inverseOnSurface: e ? 20 : 95, outline: e ? 60 : 50, outlineVariant: e ? 30 : 80, shadow: 0 };
684
684
  return { sys: { color: { scrim: y(o.scrim), outline: y(m.tone(l.outline)), outlineVariant: y(m.tone(l.outlineVariant)), shadow: y(i.tone(l.shadow)), surface: { default: y(i.tone(l.surface)), dim: y(i.tone(l.surfaceDim)), bright: y(i.tone(l.surfaceBright)), container: y(i.tone(l.surfaceContainer)), containerLow: y(i.tone(l.surfaceContainerLow)), containerLowest: y(i.tone(l.surfaceContainerLowest)), containerHigh: y(i.tone(l.surfaceContainerHigh)), containerHighest: y(i.tone(l.surfaceContainerHighest)), on: y(i.tone(l.onSurface)), onVariant: y(m.tone(l.onSurfaceVariant)), tint: y(n.tone(l.surfaceTint)), inverse: y(i.tone(l.inverseSurface)), inverseOn: y(i.tone(l.inverseOnSurface)), low: y(i.tone(l.surfaceContainerLow)), high: y(i.tone(l.surfaceContainerHigh)), highest: y(i.tone(l.surfaceContainerHighest)), lowest: y(i.tone(l.surfaceContainerLowest)) }, primary: { default: y(n.tone(l.primary)), on: y(n.tone(l.onPrimary)), container: y(n.tone(l.primaryContainer)), onContainer: y(n.tone(l.onPrimaryContainer)), fixed: y(n.tone(l.primaryFixed)), fixedDim: y(n.tone(l.primaryFixedDim)), onFixed: y(n.tone(l.onPrimaryFixed)), onFixedVariant: y(n.tone(l.onPrimaryFixedVariant)), inverse: y(n.tone(l.inversePrimary)) }, secondary: { default: y(a.tone(l.secondary)), on: y(a.tone(l.onSecondary)), container: y(a.tone(l.secondaryContainer)), onContainer: y(a.tone(l.onSecondaryContainer)), fixed: y(a.tone(l.secondaryFixed)), fixedDim: y(a.tone(l.secondaryFixedDim)), onFixed: y(a.tone(l.onSecondaryFixed)), onFixedVariant: y(a.tone(l.onSecondaryFixedVariant)) }, tertiary: { default: y(s.tone(l.tertiary)), on: y(s.tone(l.onTertiary)), container: y(s.tone(l.tertiaryContainer)), onContainer: y(s.tone(l.onTertiaryContainer)), fixed: y(s.tone(l.tertiaryFixed)), fixedDim: y(s.tone(l.tertiaryFixedDim)), onFixed: y(s.tone(l.onTertiaryFixed)), onFixedVariant: y(s.tone(l.onTertiaryFixedVariant)) }, error: { default: y(h.tone(l.error)), on: y(h.tone(l.onError)), container: y(h.tone(l.errorContainer)), onContainer: y(h.tone(l.onErrorContainer)) }, success: { default: u[e ? "80" : "40"], on: u[e ? "20" : "100"], container: u[e ? "30" : "90"], onContainer: u[e ? "90" : "10"] }, warning: { default: k[e ? "80" : "40"], on: k[e ? "20" : "100"], container: k[e ? "30" : "90"], onContainer: k[e ? "90" : "10"] }, info: { default: C[e ? "80" : "40"], on: C[e ? "20" : "100"], container: C[e ? "30" : "90"], onContainer: C[e ? "90" : "10"] } }, typography: { display: { large: "display-large", medium: "display-medium", small: "display-small" }, headline: { large: "headline-large", medium: "headline-medium", small: "headline-small" }, title: { large: "title-large", medium: "title-medium", small: "title-small" }, body: { large: "body-large", medium: "body-medium", small: "body-small" }, label: { large: "label-large", medium: "label-medium", small: "label-small" } }, shape: { corner: { none: "0", extraSmall: "4px", small: "8px", medium: "12px", large: "16px", extraLarge: "28px", full: "9999px" } }, elevation: { 0: "0 0 0 0 rgba(0, 0, 0, 0)", 1: `0px 1px 2px rgba(0, 0, 0, ${e ? "0.3" : "0.15"}), 0px 1px 3px 1px rgba(0, 0, 0, ${e ? "0.15" : "0.1"})`, 2: `0px 1px 2px rgba(0, 0, 0, ${e ? "0.3" : "0.15"}), 0px 2px 6px 2px rgba(0, 0, 0, ${e ? "0.15" : "0.1"})`, 3: `0px 1px 3px rgba(0, 0, 0, ${e ? "0.3" : "0.15"}), 0px 4px 8px 3px rgba(0, 0, 0, ${e ? "0.15" : "0.1"})`, 4: `0px 2px 3px rgba(0, 0, 0, ${e ? "0.3" : "0.15"}), 0px 6px 10px 4px rgba(0, 0, 0, ${e ? "0.15" : "0.1"})`, 5: `0px 4px 4px rgba(0, 0, 0, ${e ? "0.3" : "0.15"}), 0px 8px 12px 6px rgba(0, 0, 0, ${e ? "0.15" : "0.1"})` }, motion: { easing: { emphasized: "cubic-bezier(0.2, 0.0, 0, 1.0)", emphasizedDecelerate: "cubic-bezier(0.05, 0.7, 0.1, 1.0)", emphasizedAccelerate: "cubic-bezier(0.3, 0.0, 0.8, 0.15)", standard: "cubic-bezier(0.2, 0.0, 0, 1.0)", standardDecelerate: "cubic-bezier(0, 0, 0, 1)", standardAccelerate: "cubic-bezier(0.3, 0, 1, 1)", legacy: "cubic-bezier(0.4, 0, 0.2, 1)", linear: "linear" }, duration: { short1: "50ms", short2: "100ms", short3: "150ms", short4: "200ms", medium1: "250ms", medium2: "300ms", medium3: "350ms", medium4: "400ms", long1: "450ms", long2: "500ms", long3: "550ms", long4: "600ms", extraLong1: "700ms", extraLong2: "800ms", extraLong3: "900ms", extraLong4: "1000ms" } }, state: { opacity: { hover: "0.08", focus: "0.12", pressed: "0.12", dragged: "0.16", disabled: "0.38", disabledContainer: "0.12" } }, spacing: { 0: "0", 1: "4px", 2: "8px", 3: "12px", 4: "16px", 5: "20px", 6: "24px", 7: "28px", 8: "32px", 9: "36px", 10: "40px", 11: "44px", 12: "48px" }, outline: { 1: "1px" } }, ref: { palette: { primary: Y(n.tone(40)), secondary: Y(a.tone(40)), tertiary: Y(s.tone(40)), neutral: Y(i.tone(40)), neutralVariant: Y(m.tone(40)), error: Y(h.tone(40)) } } };
685
685
  }
686
686
  function Ir(r, e) {
@@ -692,9 +692,9 @@ function Lr(r, e) {
692
692
  return { cLowest: t.tone(4), cLow: t.tone(10), c: t.tone(12), cHigh: t.tone(17), cHighest: t.tone(22), sDim: t.tone(6), s: t.tone(6), sBright: t.tone(24) };
693
693
  }
694
694
  const j = er({ scheme: "auto", color: "#6200ee" }, "local", "schmancy-theme-settings");
695
- class ae {
695
+ class se {
696
696
  constructor() {
697
- this._theme$ = new Me({}), this._themeComponent$ = new Me(null), this._fullscreen$ = new Me(!1), this.scheme$ = j.$.pipe(ee((e) => e.scheme), Z(), re(1)), this.color$ = j.$.pipe(ee((e) => e.color), Z(), re(1)), this.theme$ = this._theme$.asObservable().pipe(Z((e, t) => JSON.stringify(e) === JSON.stringify(t)), re(1)), this.themeComponent$ = this._themeComponent$.asObservable().pipe(Z(), re(1)), this.fullscreen$ = this._fullscreen$.asObservable().pipe(Z(), re(1)), this.resolvedScheme$ = this.scheme$.pipe(xe((e) => {
697
+ this._theme$ = new Me({}), this._themeComponent$ = new Me(null), this._fullscreen$ = new Me(!1), this.scheme$ = j.$.pipe(re((e) => e.scheme), Z(), te(1)), this.color$ = j.$.pipe(re((e) => e.color), Z(), te(1)), this.theme$ = this._theme$.asObservable().pipe(Z((e, t) => JSON.stringify(e) === JSON.stringify(t)), te(1)), this.themeComponent$ = this._themeComponent$.asObservable().pipe(Z(), te(1)), this.fullscreen$ = this._fullscreen$.asObservable().pipe(Z(), te(1)), this.resolvedScheme$ = this.scheme$.pipe(xe((e) => {
698
698
  if (e === "auto") {
699
699
  const t = window.matchMedia("(prefers-color-scheme: dark)");
700
700
  return new je((o) => {
@@ -705,7 +705,7 @@ class ae {
705
705
  });
706
706
  }
707
707
  return be(e);
708
- }), Z(), re(1)), this.discoverTheme();
708
+ }), Z(), te(1)), this.discoverTheme();
709
709
  }
710
710
  get scheme() {
711
711
  return j.value.scheme;
@@ -723,11 +723,11 @@ class ae {
723
723
  return this._fullscreen$.getValue();
724
724
  }
725
725
  discoverTheme() {
726
- return ve(window, De).pipe(se($e(100)), ee((e) => e.detail.theme), Re(null), ue((e) => {
726
+ return ve(window, De).pipe(le($e(100)), re((e) => e.detail.theme), Re(null), ue((e) => {
727
727
  e && this.registerThemeComponent(e);
728
728
  })).pipe(ue(() => {
729
729
  window.dispatchEvent(new CustomEvent(Ue, { bubbles: !0, composed: !0 }));
730
- }), xe(() => ve(window, De).pipe(se($e(100)), ee((e) => e.detail.theme), Re(null), ue((e) => {
730
+ }), xe(() => ve(window, De).pipe(le($e(100)), re((e) => e.detail.theme), Re(null), ue((e) => {
731
731
  e && this.registerThemeComponent(e);
732
732
  }))));
733
733
  }
@@ -747,7 +747,7 @@ class ae {
747
747
  t ? (t.color = e, j.set({ color: e })) : j.set({ color: e });
748
748
  }
749
749
  isDarkMode() {
750
- return this.resolvedScheme$.pipe(ee((e) => e === "dark"));
750
+ return this.resolvedScheme$.pipe(re((e) => e === "dark"));
751
751
  }
752
752
  toggleScheme() {
753
753
  const e = this.scheme, t = e === "dark" ? "light" : e === "light" ? "dark" : "light";
@@ -762,7 +762,7 @@ class ae {
762
762
  return "";
763
763
  }
764
764
  watchCSSVariable(e) {
765
- return this.theme$.pipe(ee(() => this.getCSSVariable(e)), Z());
765
+ return this.theme$.pipe(re(() => this.getCSSVariable(e)), Z());
766
766
  }
767
767
  setFullscreen(e) {
768
768
  this._fullscreen$.next(e), window.dispatchEvent(new CustomEvent("fullscreen", { detail: e, bubbles: !0, composed: !0 }));
@@ -774,11 +774,11 @@ class ae {
774
774
  e.fullscreen !== void 0 && this.setFullscreen(e.fullscreen), e.scheme !== void 0 && this.setScheme(e.scheme), e.color !== void 0 && this.setColor(e.color);
775
775
  }
776
776
  static getInstance() {
777
- return ae.instance || (ae.instance = new ae()), ae.instance;
777
+ return se.instance || (se.instance = new se()), se.instance;
778
778
  }
779
779
  }
780
- const ur = ae.getInstance(), Br = ur, dr = rr("theme-context");
781
- var yr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, he = (r, e, t, o) => {
780
+ const ur = se.getInstance(), Br = ur, dr = rr("theme-context");
781
+ var yr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, ne = (r, e, t, o) => {
782
782
  for (var n, a = o > 1 ? void 0 : o ? pr(e, t) : e, s = r.length - 1; s >= 0; s--) (n = r[s]) && (a = (o ? n(e, t, a) : n(a)) || a);
783
783
  return o && a && yr(e, t, a), a;
784
784
  };
@@ -791,22 +791,26 @@ const fr = nr(':host,:root{--md-ref-typeface-brand: "Josefin Sans", sans-serif;-
791
791
  });
792
792
  return () => t.unsubscribe();
793
793
  });
794
- let oe = class extends or(fr) {
794
+ let Q = class extends or(fr) {
795
795
  constructor() {
796
796
  super(...arguments), this.scheme = "auto", this.root = !1, this.theme = {};
797
797
  }
798
798
  connectedCallback() {
799
- super.connectedCallback(), this.color || (this.color = this.generateRandomColor()), be(this.scheme).pipe(xe((r) => r === "auto" ? gr : be(r)), se(this.disconnecting)).subscribe((r) => {
800
- this.scheme = r, this.registerTheme();
801
- }), ve(this, Ue).pipe(se(this.disconnecting)).subscribe((r) => {
802
- r.stopPropagation(), r.preventDefault(), window.dispatchEvent(new CustomEvent(De, { detail: { theme: this }, bubbles: !0, composed: !0 }));
799
+ super.connectedCallback();
800
+ const r = this.generateThemeName(), e = sessionStorage.getItem(`schmancy-theme-${r}-color`), t = sessionStorage.getItem(`schmancy-theme-${r}-scheme`);
801
+ this.color || (this.color = e || this.generateRandomColor(), sessionStorage.setItem(`schmancy-theme-${r}-color`, this.color)), !this.hasAttribute("scheme") && t && (this.scheme = t), be(this.scheme).pipe(xe((o) => o === "auto" ? gr : be(o)), le(this.disconnecting)).subscribe((o) => {
802
+ this.scheme = o, this.registerTheme(), sessionStorage.setItem(`schmancy-theme-${r}-scheme`, this.scheme);
803
+ }), ve(this, Ue).pipe(le(this.disconnecting)).subscribe((o) => {
804
+ o.stopPropagation(), o.preventDefault(), window.dispatchEvent(new CustomEvent(De, { detail: { theme: this }, bubbles: !0, composed: !0 }));
803
805
  });
804
806
  }
805
807
  updated(r) {
806
- super.updated(r), (r.has("color") || r.has("scheme") || r.has("theme")) && this.registerTheme();
808
+ super.updated(r);
809
+ const e = this.generateThemeName();
810
+ r.has("color") && (sessionStorage.setItem(`schmancy-theme-${e}-color`, this.color), this.registerTheme()), r.has("scheme") && (sessionStorage.setItem(`schmancy-theme-${e}-scheme`, this.scheme), this.registerTheme()), r.has("theme") && this.registerTheme();
807
811
  }
808
812
  registerTheme() {
809
- let r = mr(hr(Q(typeof this.color == "string" ? this.color : "#6200ee")), this.scheme === "dark", { success: Q("#34B334"), warning: Q("#FFA726"), info: Q("#29B6F6") });
813
+ let r = mr(hr(G(typeof this.color == "string" ? this.color : "#6200ee")), this.scheme === "dark", { success: G("#34B334"), warning: G("#FFA726"), info: G("#29B6F6") });
810
814
  r = { ...r, ...this.theme }, this.registerThemeValues("schmancy", "", r);
811
815
  const e = this.root ? document.body : this.shadowRoot.host, t = (o) => e.style.getPropertyValue(o);
812
816
  e.style.setProperty("--schmancy-sys-color-surface-low", t("--schmancy-sys-color-surface-containerLow")), e.style.setProperty("--schmancy-sys-color-surface-high", t("--schmancy-sys-color-surface-containerHigh")), e.style.setProperty("--schmancy-sys-color-surface-highest", t("--schmancy-sys-color-surface-containerHighest")), e.style.setProperty("--schmancy-sys-color-surface-lowest", t("--schmancy-sys-color-surface-containerLowest")), e.style.colorScheme = this.scheme === "dark" ? "dark" : "light";
@@ -818,12 +822,26 @@ let oe = class extends or(fr) {
818
822
  generateRandomColor() {
819
823
  return "#" + Math.floor(16777215 * Math.random()).toString(16).padStart(6, "0");
820
824
  }
825
+ generateThemeName() {
826
+ if (this.name) return this.name;
827
+ const r = [];
828
+ let e = this;
829
+ for (; e && e !== document.body; ) {
830
+ const t = e.parentElement;
831
+ if (t) {
832
+ const o = Array.from(t.children).indexOf(e), n = e.tagName.toLowerCase();
833
+ r.unshift(`${n}[${o}]`);
834
+ }
835
+ e = t;
836
+ }
837
+ return r.join(">");
838
+ }
821
839
  render() {
822
840
  return we`<slot></slot>`;
823
841
  }
824
842
  };
825
- he([me({ type: String, reflect: !0 })], oe.prototype, "color", 2), he([me({ type: String })], oe.prototype, "scheme", 2), he([me({ type: Boolean })], oe.prototype, "root", 2), he([tr({ context: dr }), me({ type: Object })], oe.prototype, "theme", 2), oe = he([Le("schmancy-theme")], oe);
826
- var kr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, ne = (r, e, t, o) => {
843
+ ne([ce({ type: String, reflect: !0 })], Q.prototype, "color", 2), ne([ce({ type: String })], Q.prototype, "scheme", 2), ne([ce({ type: Boolean })], Q.prototype, "root", 2), ne([ce({ type: String })], Q.prototype, "name", 2), ne([tr({ context: dr }), ce({ type: Object })], Q.prototype, "theme", 2), Q = ne([Le("schmancy-theme")], Q);
844
+ var kr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, ae = (r, e, t, o) => {
827
845
  for (var n, a = o > 1 ? void 0 : o ? Cr(e, t) : e, s = r.length - 1; s >= 0; s--) (n = r[s]) && (a = (o ? n(e, t, a) : n(a)) || a);
828
846
  return o && a && kr(e, t, a), a;
829
847
  };
@@ -837,9 +855,9 @@ let X = class extends ar() {
837
855
  connectedCallback() {
838
856
  super.connectedCallback(), this.discover("schmancy-theme").pipe(xe((r) => r ? (this.themeComponent = r, this.currentScheme = r.scheme, this.currentColor = r.color, new He().pipe(ue(() => {
839
857
  this.themeComponent && (this.currentScheme = this.themeComponent.scheme, this.currentColor = this.themeComponent.color);
840
- }))) : be(null)), se(this.disconnecting)).subscribe(), this.colorInput$.pipe(Ge(150), ue((r) => {
858
+ }))) : be(null)), le(this.disconnecting)).subscribe(), this.colorInput$.pipe(Ge(150), ue((r) => {
841
859
  this.themeComponent && (this.themeComponent.color = r);
842
- }), se(this.disconnecting)).subscribe();
860
+ }), le(this.disconnecting)).subscribe();
843
861
  }
844
862
  setScheme(r) {
845
863
  this.themeComponent && (this.themeComponent.scheme = r, this.currentScheme = r);
@@ -915,7 +933,7 @@ let X = class extends ar() {
915
933
  `;
916
934
  }
917
935
  };
918
- ne([Ce()], X.prototype, "currentScheme", 2), ne([Ce()], X.prototype, "currentColor", 2), ne([Ce()], X.prototype, "resolvedScheme", 2), ne([Ce()], X.prototype, "themeComponent", 2), ne([me({ type: Array })], X.prototype, "customColors", 2), X = ne([Le("schmancy-theme-controller")], X);
936
+ ae([Ce()], X.prototype, "currentScheme", 2), ae([Ce()], X.prototype, "currentColor", 2), ae([Ce()], X.prototype, "resolvedScheme", 2), ae([Ce()], X.prototype, "themeComponent", 2), ae([ce({ type: Array })], X.prototype, "customColors", 2), X = ae([Le("schmancy-theme-controller")], X);
919
937
  var xr = Object.getOwnPropertyDescriptor;
920
938
  let _e = class extends X {
921
939
  render() {
@@ -935,7 +953,7 @@ _e = ((r, e, t, o) => {
935
953
  return a;
936
954
  })([Le("schmancy-theme-controller-boat")], _e);
937
955
  export {
938
- oe as S,
956
+ Q as S,
939
957
  Lr as a,
940
958
  fr as b,
941
959
  Ir as c,
@@ -946,4 +964,4 @@ export {
946
964
  Br as s,
947
965
  ur as t
948
966
  };
949
- //# sourceMappingURL=theme-controller-boat-DYGa2z20.js.map
967
+ //# sourceMappingURL=theme-controller-boat-C_6tVWSS.js.map