@bicharts/chart-host 0.5.107 → 0.5.108

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/index.mjs CHANGED
@@ -30,20 +30,21 @@ import {
30
30
  DARK_TEXT,
31
31
  DIM_OPACITY_DEFAULT,
32
32
  DIM_OPACITY_VAR,
33
+ Ee,
33
34
  FIT_CONTENT_SELECTOR,
34
35
  FLIP_MODE_DEFAULT,
35
36
  GEO_POINT_PRECISIONS,
36
37
  GLYPH_SAMPLE_N,
37
38
  HOST_CONTAINER_CLASS,
38
39
  HOST_CONTRACT_VERSION,
39
- Kt,
40
+ Ie,
40
41
  L3,
41
42
  LABEL_CONTRAST_CAP,
42
43
  LABEL_CONTRAST_DONE_ATTR,
43
44
  LEGEND_MARK_CLASS,
44
45
  LIFT_SELECTED_CLASS,
45
46
  LIGHT_TEXT,
46
- Le,
47
+ M,
47
48
  MARK_CLASS,
48
49
  MARK_SELECTED_CLASS,
49
50
  MAX_FRAME_GROW_FACTOR,
@@ -51,13 +52,11 @@ import {
51
52
  MIN_CONTRAST,
52
53
  MIN_HIT_BAND_PX,
53
54
  MIN_RAMP_FILLS,
54
- Oe,
55
55
  PAGE_MATCH_TOLERANCE,
56
56
  PHANTOM_FRACTION,
57
57
  PILL_MIN_ALPHA,
58
58
  PILL_MIN_COVERAGE,
59
59
  PILL_OPAQUE_ALPHA,
60
- R,
61
60
  ROW_IDX_ATTR,
62
61
  SAME_SHADE_DELTA_E,
63
62
  SCROLL_SLACK_PX,
@@ -65,9 +64,11 @@ import {
65
64
  SELECTION_ACTIVE_CLASS,
66
65
  VALUE_AXIS_BASELINE_DEFAULT,
67
66
  VALUE_AXIS_MIN_FIT,
67
+ Vt,
68
68
  WHITE_TEXT_BG_LUM,
69
69
  XFILTER_REFRESH_EVENT,
70
70
  Yt,
71
+ a,
71
72
  applyLabelContrast,
72
73
  autoRampCanvas,
73
74
  autoRampMinStep,
@@ -100,8 +101,10 @@ import {
100
101
  geoFromCache,
101
102
  glyphSampleGrid,
102
103
  hitBandFlag,
104
+ invalidSentinelReason,
103
105
  isBlankRender,
104
106
  isHorizontalLabelRow,
107
+ isInvalidSentinelError,
105
108
  isPhantomBox,
106
109
  isPillBackdropAlpha,
107
110
  labelBand,
@@ -125,10 +128,9 @@ import {
125
128
  stripEsmExports,
126
129
  svgInkReach,
127
130
  toRGBA,
128
- u,
129
131
  unpinScrolledAxis,
130
132
  valuePlacementFlag
131
- } from "./chunk-HLNXXQA5.mjs";
133
+ } from "./chunk-RHBT4HTP.mjs";
132
134
  import "./chunk-A2GMXZP7.mjs";
133
135
  import "./chunk-GHODWOAL.mjs";
134
136
 
@@ -998,7 +1000,7 @@ var INLINE_FILTER_MIN_ROWS = 8;
998
1000
  function formatSourceDate(raw, opts = {}) {
999
1001
  const d2 = toDate(raw);
1000
1002
  if (!d2) return null;
1001
- const dayFrame = u(d2);
1003
+ const dayFrame = a(d2);
1002
1004
  const frame = dayFrame ?? (opts.dialect === "dotnet" ? "local" : "utc");
1003
1005
  const p3 = partsIn(d2, frame);
1004
1006
  const format = cleanFormat(opts.format, opts.dialect);
@@ -1019,7 +1021,7 @@ var ISO_LIKE_RE = /^\s*\d{4}-\d{2}-\d{2}(?:[T ]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(
1019
1021
  function toDate(raw) {
1020
1022
  if (raw instanceof Date) return isNaN(raw.getTime()) ? null : raw;
1021
1023
  if (typeof raw !== "string" || !ISO_LIKE_RE.test(raw)) return null;
1022
- const d2 = R(raw.trim());
1024
+ const d2 = M(raw.trim());
1023
1025
  return d2 && !isNaN(d2.getTime()) ? d2 : null;
1024
1026
  }
1025
1027
  function partsIn(d2, frame) {
@@ -1416,15 +1418,15 @@ function displayText(col, raw, opts) {
1416
1418
  return String(raw);
1417
1419
  }
1418
1420
  function isSuppressed(col) {
1419
- return Oe(col).suppressed;
1421
+ return Ie(col).suppressed;
1420
1422
  }
1421
1423
  function resolveAgg(col, requested, auto) {
1422
1424
  const fallback = () => {
1423
- const d2 = Yt(col);
1425
+ const d2 = Vt(col);
1424
1426
  return d2 === "first" ? "count" : d2;
1425
1427
  };
1426
1428
  if (auto) return fallback();
1427
- return Le(col).indexOf(requested) >= 0 ? requested : fallback();
1429
+ return Ee(col).indexOf(requested) >= 0 ? requested : fallback();
1428
1430
  }
1429
1431
  function toNumber(v2) {
1430
1432
  if (v2 == null || v2 === "") return null;
@@ -1437,18 +1439,18 @@ function reduce(values, agg, distinctRaw) {
1437
1439
  if (!values.length) return null;
1438
1440
  switch (agg) {
1439
1441
  case "average":
1440
- return values.reduce((a2, b2) => a2 + b2, 0) / values.length;
1442
+ return values.reduce((a3, b2) => a3 + b2, 0) / values.length;
1441
1443
  case "min":
1442
1444
  return Math.min(...values);
1443
1445
  case "max":
1444
1446
  return Math.max(...values);
1445
1447
  case "median": {
1446
- const s2 = [...values].sort((a2, b2) => a2 - b2);
1448
+ const s2 = [...values].sort((a3, b2) => a3 - b2);
1447
1449
  const m2 = s2.length >> 1;
1448
1450
  return s2.length % 2 ? s2[m2] : (s2[m2 - 1] + s2[m2]) / 2;
1449
1451
  }
1450
1452
  default:
1451
- return values.reduce((a2, b2) => a2 + b2, 0);
1453
+ return values.reduce((a3, b2) => a3 + b2, 0);
1452
1454
  }
1453
1455
  }
1454
1456
  function fmtNumber(v2, culture) {
@@ -1527,7 +1529,7 @@ function computeSelectionCard(payload, selectedRowIdxs, opts = {}) {
1527
1529
  }
1528
1530
  const value = reduce(selVals, colAgg, selRaw);
1529
1531
  let sharePct = null;
1530
- if (Kt(col, colAgg) && value != null) {
1532
+ if (Yt(col, colAgg) && value != null) {
1531
1533
  const allVals = [];
1532
1534
  const allRaw = [];
1533
1535
  for (let r2 = 0; r2 < rows.length; r2++) {
@@ -1601,10 +1603,10 @@ function composeSummaryText(codeSummary, warningMsg) {
1601
1603
 
1602
1604
  // ../../node_modules/colorsea/dist/index.esm.js
1603
1605
  function t(t2, r2, n2, e2) {
1604
- var o2, i2 = arguments.length, a2 = i2 < 3 ? r2 : null === e2 ? e2 = Object.getOwnPropertyDescriptor(r2, n2) : e2;
1605
- if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a2 = Reflect.decorate(t2, r2, n2, e2);
1606
- else for (var u3 = t2.length - 1; u3 >= 0; u3--) (o2 = t2[u3]) && (a2 = (i2 < 3 ? o2(a2) : i2 > 3 ? o2(r2, n2, a2) : o2(r2, n2)) || a2);
1607
- return i2 > 3 && a2 && Object.defineProperty(r2, n2, a2), a2;
1606
+ var o2, i2 = arguments.length, a3 = i2 < 3 ? r2 : null === e2 ? e2 = Object.getOwnPropertyDescriptor(r2, n2) : e2;
1607
+ if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) a3 = Reflect.decorate(t2, r2, n2, e2);
1608
+ else for (var u2 = t2.length - 1; u2 >= 0; u2--) (o2 = t2[u2]) && (a3 = (i2 < 3 ? o2(a3) : i2 > 3 ? o2(r2, n2, a3) : o2(r2, n2)) || a3);
1609
+ return i2 > 3 && a3 && Object.defineProperty(r2, n2, a3), a3;
1608
1610
  }
1609
1611
  function r(t2, r2, n2) {
1610
1612
  if (n2 || 2 === arguments.length) for (var e2, o2 = 0, i2 = r2.length; o2 < i2; o2++) !e2 && o2 in r2 || (e2 || (e2 = Array.prototype.slice.call(r2, 0, o2)), e2[o2] = r2[o2]);
@@ -1626,12 +1628,12 @@ var o = function(t2, r2, n2) {
1626
1628
  var i = function(t2, r2) {
1627
1629
  return Math.round((t2 + Number.EPSILON) * Math.pow(10, r2)) / Math.pow(10, r2);
1628
1630
  };
1629
- var a = function(t2, r2) {
1631
+ var a2 = function(t2, r2) {
1630
1632
  return Math.floor(Math.random() * (r2 - t2 + 1) - t2);
1631
1633
  };
1632
- var u2 = function(t2, r2, n2, e2) {
1633
- for (var i2, a2 = [t2, r2, n2], u3 = "#", h2 = 0; h2 < a2.length; h2++) u3 += (i2 = a2[h2], Math.round(o(i2, 0, 255)).toString(16).padStart(2, "0"));
1634
- return null != e2 && (u3 += Math.round(o(e2, 0, 100) / 100 * 255).toString(16).padStart(2, "0")), u3;
1634
+ var u = function(t2, r2, n2, e2) {
1635
+ for (var i2, a3 = [t2, r2, n2], u2 = "#", h2 = 0; h2 < a3.length; h2++) u2 += (i2 = a3[h2], Math.round(o(i2, 0, 255)).toString(16).padStart(2, "0"));
1636
+ return null != e2 && (u2 += Math.round(o(e2, 0, 100) / 100 * 255).toString(16).padStart(2, "0")), u2;
1635
1637
  };
1636
1638
  var h = function(t2) {
1637
1639
  var n2 = t2.length, e2 = (t2 = (function(t3) {
@@ -1671,50 +1673,50 @@ function p(t2, r2, n2, e2) {
1671
1673
  void 0 === e2 && (e2 = "l"), o2 = [t2, r2, n2].map((function(t3) {
1672
1674
  return t3 / 255;
1673
1675
  })), t2 = o2[0], r2 = o2[1], n2 = o2[2];
1674
- var i2 = Math.max(t2, r2, n2), a2 = Math.min(t2, r2, n2), u3 = (function(t3, r3, n3, e3) {
1676
+ var i2 = Math.max(t2, r2, n2), a3 = Math.min(t2, r2, n2), u2 = (function(t3, r3, n3, e3) {
1675
1677
  var o3;
1676
1678
  void 0 === e3 && (e3 = false), o3 = [t3, r3, n3].map((function(t4) {
1677
1679
  return t4 / 255;
1678
1680
  })), t3 = o3[0], r3 = o3[1], n3 = o3[2];
1679
- var i3 = Math.max(t3, r3, n3), a3 = Math.min(t3, r3, n3), u4 = 0;
1680
- if (i3 !== a3) if (e3) u4 = (t3 - r3 + (t3 - n3)) / 2, u4 /= Math.sqrt((t3 - r3) * (t3 - r3) + (t3 - n3) * (r3 - n3)), u4 = Math.acos(u4), n3 > r3 && (u4 = 2 * Math.PI - u4), u4 /= 2 * Math.PI;
1681
+ var i3 = Math.max(t3, r3, n3), a4 = Math.min(t3, r3, n3), u3 = 0;
1682
+ if (i3 !== a4) if (e3) u3 = (t3 - r3 + (t3 - n3)) / 2, u3 /= Math.sqrt((t3 - r3) * (t3 - r3) + (t3 - n3) * (r3 - n3)), u3 = Math.acos(u3), n3 > r3 && (u3 = 2 * Math.PI - u3), u3 /= 2 * Math.PI;
1681
1683
  else {
1682
- var h3 = i3 - a3;
1683
- u4 = i3 === t3 ? (r3 - n3) / h3 + (r3 < n3 ? 6 : 0) : i3 === r3 ? (n3 - t3) / h3 + 2 : (t3 - r3) / h3 + 4, u4 /= 6;
1684
+ var h3 = i3 - a4;
1685
+ u3 = i3 === t3 ? (r3 - n3) / h3 + (r3 < n3 ? 6 : 0) : i3 === r3 ? (n3 - t3) / h3 + 2 : (t3 - r3) / h3 + 4, u3 /= 6;
1684
1686
  }
1685
- else u4 = NaN;
1686
- return 360 * u4;
1687
- })(t2, r2, n2, "i" === e2), h2 = 0, c2 = (i2 + a2) / 2, l2 = i2 - a2, p3 = i2, f2 = (t2 + r2 + n2) / 3;
1688
- return "v" === e2 && (h2 = 0 === i2 ? 0 : l2 / i2), i2 !== a2 && "l" === e2 && (h2 = c2 > 0.5 ? l2 / (2 - i2 - a2) : l2 / (i2 + a2)), "i" === e2 && (h2 = f2 > 0 ? 1 - a2 / f2 : 0), h2 *= 100, c2 *= 100, f2 *= 100, "l" === e2 ? [u3, h2, c2] : "v" === e2 ? [u3, h2, p3 *= 100] : [u3, h2, f2];
1687
+ else u3 = NaN;
1688
+ return 360 * u3;
1689
+ })(t2, r2, n2, "i" === e2), h2 = 0, c2 = (i2 + a3) / 2, l2 = i2 - a3, p3 = i2, f2 = (t2 + r2 + n2) / 3;
1690
+ return "v" === e2 && (h2 = 0 === i2 ? 0 : l2 / i2), i2 !== a3 && "l" === e2 && (h2 = c2 > 0.5 ? l2 / (2 - i2 - a3) : l2 / (i2 + a3)), "i" === e2 && (h2 = f2 > 0 ? 1 - a3 / f2 : 0), h2 *= 100, c2 *= 100, f2 *= 100, "l" === e2 ? [u2, h2, c2] : "v" === e2 ? [u2, h2, p3 *= 100] : [u2, h2, f2];
1689
1691
  }
1690
1692
  var f = function(t2, r2, n2) {
1691
1693
  return p(t2, r2, n2, "l");
1692
1694
  };
1693
1695
  var s = function(t2, r2, n2) {
1694
- var e2, i2, a2 = function(t3) {
1696
+ var e2, i2, a3 = function(t3) {
1695
1697
  return 6 * (t3 = t3 < 0 ? t3 + 1 : t3 > 1 ? t3 - 1 : t3) < 1 ? e2 + (i2 - e2) * t3 * 6 : 2 * t3 < 1 ? i2 : 3 * t3 < 2 ? e2 + (i2 - e2) * (2 / 3 - t3) * 6 : e2;
1696
1698
  };
1697
- return t2 = t2 % 360 / 360, r2 = o(r2 / 100, 0, 1), n2 = o(n2 / 100, 0, 1), e2 = 2 * n2 - (i2 = n2 <= 0.5 ? n2 * (r2 + 1) : n2 + r2 - n2 * r2), [255 * a2(t2 + 1 / 3), 255 * a2(t2), 255 * a2(t2 - 1 / 3)];
1699
+ return t2 = t2 % 360 / 360, r2 = o(r2 / 100, 0, 1), n2 = o(n2 / 100, 0, 1), e2 = 2 * n2 - (i2 = n2 <= 0.5 ? n2 * (r2 + 1) : n2 + r2 - n2 * r2), [255 * a3(t2 + 1 / 3), 255 * a3(t2), 255 * a3(t2 - 1 / 3)];
1698
1700
  };
1699
1701
  var v = function(t2, r2, n2) {
1700
1702
  return p(t2, r2, n2, "v");
1701
1703
  };
1702
1704
  var b = function(t2, r2, n2) {
1703
- var e2, o2, i2 = [n2 /= 100, n2 * (1 - (r2 /= 100)), n2 * (1 - (o2 = (t2 = t2 % 360 / 360 * 360) / 60 - (e2 = Math.floor(t2 / 60 % 6))) * r2), n2 * (1 - (1 - o2) * r2)], a2 = [[0, 3, 1], [2, 0, 1], [1, 0, 3], [1, 2, 0], [3, 1, 0], [0, 1, 2]];
1704
- return [255 * i2[a2[e2][0]], 255 * i2[a2[e2][1]], 255 * i2[a2[e2][2]]];
1705
+ var e2, o2, i2 = [n2 /= 100, n2 * (1 - (r2 /= 100)), n2 * (1 - (o2 = (t2 = t2 % 360 / 360 * 360) / 60 - (e2 = Math.floor(t2 / 60 % 6))) * r2), n2 * (1 - (1 - o2) * r2)], a3 = [[0, 3, 1], [2, 0, 1], [1, 0, 3], [1, 2, 0], [3, 1, 0], [0, 1, 2]];
1706
+ return [255 * i2[a3[e2][0]], 255 * i2[a3[e2][1]], 255 * i2[a3[e2][2]]];
1705
1707
  };
1706
1708
  var y = function(t2, r2, n2) {
1707
1709
  return p(t2, r2, n2, "i");
1708
1710
  };
1709
1711
  var d = function(t2, r2, n2) {
1710
- var e2, i2, a2, u3;
1712
+ var e2, i2, a3, u2;
1711
1713
  r2 /= 100, n2 /= 100, isNaN(t2) && (t2 = 0), isNaN(r2) && (r2 = 0);
1712
1714
  var h2 = function(t3) {
1713
1715
  return (1 + r2 * Math.cos(2 * Math.PI * t3) / Math.cos(Math.PI / 3 - 2 * Math.PI * t3)) / 3;
1714
1716
  };
1715
- return (t2 = (360 + t2) % 360 / 360) < 1 / 3 ? a2 = 1 - ((u3 = (1 - r2) / 3) + (i2 = h2(t2))) : t2 < 2 / 3 ? u3 = 1 - ((i2 = (1 - r2) / 3) + (a2 = h2(t2 -= 1 / 3))) : i2 = 1 - ((a2 = (1 - r2) / 3) + (u3 = h2(t2 -= 2 / 3))), e2 = [i2, a2, u3].map((function(t3) {
1717
+ return (t2 = (360 + t2) % 360 / 360) < 1 / 3 ? a3 = 1 - ((u2 = (1 - r2) / 3) + (i2 = h2(t2))) : t2 < 2 / 3 ? u2 = 1 - ((i2 = (1 - r2) / 3) + (a3 = h2(t2 -= 1 / 3))) : i2 = 1 - ((a3 = (1 - r2) / 3) + (u2 = h2(t2 -= 2 / 3))), e2 = [i2, a3, u2].map((function(t3) {
1716
1718
  return 255 * o(n2 * t3 * 3, 0, 1);
1717
- })), [i2 = e2[0], a2 = e2[1], u3 = e2[2]];
1719
+ })), [i2 = e2[0], a3 = e2[1], u2 = e2[2]];
1718
1720
  };
1719
1721
  var g = function(t2, r2, n2) {
1720
1722
  return [f(t2, r2, n2)[0], 100 * (Math.min(t2, r2, n2) / 255), 100 * (1 - Math.max(t2, r2, n2) / 255)];
@@ -1725,7 +1727,7 @@ function w(t2, r2, n2) {
1725
1727
  }));
1726
1728
  }
1727
1729
  var m = { x: [0.4124564, 0.3575761, 0.1804375], y: [0.2126729, 0.7151522, 0.072175], z: [0.0193339, 0.119192, 0.9503041] };
1728
- var M = { r: [3.2404542, -1.5371385, -0.4985314], g: [-0.969266, 1.8760108, 0.041556], b: [0.0556434, -0.2040259, 1.0572252] };
1730
+ var M2 = { r: [3.2404542, -1.5371385, -0.4985314], g: [-0.969266, 1.8760108, 0.041556], b: [0.0556434, -0.2040259, 1.0572252] };
1729
1731
  var x = 0.95047;
1730
1732
  var _ = 1;
1731
1733
  var C = 1.08883;
@@ -1743,14 +1745,14 @@ var z = function(t2, r2, e2) {
1743
1745
  }), 0)];
1744
1746
  };
1745
1747
  var N = function(t2, r2, n2) {
1746
- var o2 = [t2, r2, n2], i2 = M.r.reduce((function(t3, r3, n3) {
1748
+ var o2 = [t2, r2, n2], i2 = M2.r.reduce((function(t3, r3, n3) {
1747
1749
  return t3 + r3 * o2[n3];
1748
- }), 0) / 100, a2 = M.g.reduce((function(t3, r3, n3) {
1750
+ }), 0) / 100, a3 = M2.g.reduce((function(t3, r3, n3) {
1749
1751
  return t3 + r3 * o2[n3];
1750
- }), 0) / 100, u3 = M.b.reduce((function(t3, r3, n3) {
1752
+ }), 0) / 100, u2 = M2.b.reduce((function(t3, r3, n3) {
1751
1753
  return t3 + r3 * o2[n3];
1752
1754
  }), 0) / 100;
1753
- return e(i2, a2, u3);
1755
+ return e(i2, a3, u2);
1754
1756
  };
1755
1757
  var O = function(t2, r2, n2) {
1756
1758
  var e2;
@@ -1759,10 +1761,10 @@ var O = function(t2, r2, n2) {
1759
1761
  })), t2 = e2[0], r2 = e2[1], n2 = e2[2], [Math.max(0, 116 * r2 - 16), 500 * (t2 - r2), 200 * (r2 - n2)];
1760
1762
  };
1761
1763
  var P = function(t2, r2, n2) {
1762
- var e2, o2 = (t2 + 16) / 116, i2 = isNaN(r2) ? o2 : o2 + r2 / 500, a2 = isNaN(n2) ? o2 : o2 - n2 / 200;
1763
- return e2 = [i2, o2, a2].map((function(t3) {
1764
+ var e2, o2 = (t2 + 16) / 116, i2 = isNaN(r2) ? o2 : o2 + r2 / 500, a3 = isNaN(n2) ? o2 : o2 - n2 / 200;
1765
+ return e2 = [i2, o2, a3].map((function(t3) {
1764
1766
  return t3 > I ? Math.pow(t3, 3) : (116 * t3 - 16) / E;
1765
- })), i2 = e2[0], o2 = e2[1], a2 = e2[2], [i2 * x * 100, o2 * _ * 100, a2 * C * 100];
1767
+ })), i2 = e2[0], o2 = e2[1], a3 = e2[2], [i2 * x * 100, o2 * _ * 100, a3 * C * 100];
1766
1768
  };
1767
1769
  var j = function(t2, r2, n2) {
1768
1770
  return N.apply(void 0, P(t2, r2, n2));
@@ -1782,16 +1784,16 @@ var H = function(t2, r2, n2) {
1782
1784
  var e2 = t2 + r2 + n2, o2 = 0, i2 = 0;
1783
1785
  return e2 > 0 && (o2 = t2 / e2, i2 = r2 / e2), [o2, i2, r2];
1784
1786
  };
1785
- var Y = Object.freeze({ __proto__: null, linear2rgb: e, rgb2linear: n, rgb2hex: u2, hex2rgb: h, rgb2cmyk: c, cmyk2rgb: l, rgb2hsl: f, hsl2rgb: s, rgb2hsv: v, hsv2rgb: b, rgb2hsi: y, hsi2rgb: d, rgb2hwb: g, hwb2rgb: w, rgb2xyz: z, xyz2rgb: N, xyz2lab: O, lab2xyz: P, rgb2lab: function(t2, r2, n2) {
1787
+ var Y = Object.freeze({ __proto__: null, linear2rgb: e, rgb2linear: n, rgb2hex: u, hex2rgb: h, rgb2cmyk: c, cmyk2rgb: l, rgb2hsl: f, hsl2rgb: s, rgb2hsv: v, hsv2rgb: b, rgb2hsi: y, hsi2rgb: d, rgb2hwb: g, hwb2rgb: w, rgb2xyz: z, xyz2rgb: N, xyz2lab: O, lab2xyz: P, rgb2lab: function(t2, r2, n2) {
1786
1788
  return O.apply(void 0, z(t2, r2, n2));
1787
1789
  }, lab2rgb: j, lch2lab: A, lab2lch: S, xyz2lch: function(t2, r2, n2) {
1788
1790
  return S.apply(void 0, O(t2, r2, n2));
1789
1791
  }, lch2xyz: L, xyY2xyz: function(t2, r2, n2) {
1790
1792
  return 0 === r2 ? [0, 0, 0] : [t2 * (n2 / r2), n2, n2 / r2 * (1 - t2 - r2)];
1791
1793
  }, xyz2xyY: H });
1792
- function R2(t2, n2) {
1794
+ function R(t2, n2) {
1793
1795
  return void 0 === n2 && (n2 = false), function(e2, o2, i2) {
1794
- var a2 = i2.value;
1796
+ var a3 = i2.value;
1795
1797
  i2.value = function() {
1796
1798
  for (var e3 = [], o3 = 0; o3 < arguments.length; o3++) e3[o3] = arguments[o3];
1797
1799
  if (e3.length > 0 && n2) {
@@ -1799,17 +1801,17 @@ function R2(t2, n2) {
1799
1801
  t2 += i3;
1800
1802
  }
1801
1803
  if (this.cache.has(t2)) return this.cache.get(t2);
1802
- var u3 = a2.call.apply(a2, r([this], e3, false));
1803
- return this.cache.set(t2, u3), u3;
1804
+ var u2 = a3.call.apply(a3, r([this], e3, false));
1805
+ return this.cache.set(t2, u2), u2;
1804
1806
  };
1805
1807
  };
1806
1808
  }
1807
1809
  function q(t2, n2, e2, o2) {
1808
- return void 0 === t2 && (t2 = [0, 2, 2]), void 0 === n2 && (n2 = 0), void 0 === e2 && (e2 = true), void 0 === o2 && (o2 = 0), function(a2, u3, h2) {
1810
+ return void 0 === t2 && (t2 = [0, 2, 2]), void 0 === n2 && (n2 = 0), void 0 === e2 && (e2 = true), void 0 === o2 && (o2 = 0), function(a3, u2, h2) {
1809
1811
  var c2 = h2.value;
1810
1812
  h2.value = function() {
1811
- for (var a3 = [], u4 = 0; u4 < arguments.length; u4++) a3[u4] = arguments[u4];
1812
- var h3 = void 0 === a3[o2] ? e2 : a3[o2], l2 = c2.call.apply(c2, r([this], a3, false));
1813
+ for (var a4 = [], u3 = 0; u3 < arguments.length; u3++) a4[u3] = arguments[u3];
1814
+ var h3 = void 0 === a4[o2] ? e2 : a4[o2], l2 = c2.call.apply(c2, r([this], a4, false));
1813
1815
  if (false === h3) return l2;
1814
1816
  var p3 = "number" == typeof h3 ? Math.round(h3) : 0, f2 = "number" == typeof t2 ? new Array(l2.length).fill(t2) : t2, s2 = f2.map((function(t3) {
1815
1817
  return 1 === n2 ? "number" == typeof h3 ? p3 : t3 : t3 + p3;
@@ -1821,7 +1823,7 @@ function q(t2, n2, e2, o2) {
1821
1823
  };
1822
1824
  }
1823
1825
  var D = function(t2, r2, n2) {
1824
- var e2 = t2 instanceof ft ? t2 : new ft(t2), i2 = r2 instanceof ft ? r2 : new ft(r2), a2 = o(n2, 0, 100) / 100, u3 = 2 * a2 - 1, h2 = e2.alpha() - i2.alpha(), c2 = ((u3 * h2 == -1 ? u3 : (u3 + h2) / (1 + u3 * h2)) + 1) / 2, l2 = 1 - c2, p3 = [Math.round(o(e2.red() * c2 + i2.red() * l2, 0, 255)), Math.round(o(e2.green() * c2 + i2.green() * l2, 0, 255)), Math.round(o(e2.blue() * c2 + i2.blue() * l2, 0, 255))], f2 = e2.alpha() * a2 + i2.alpha() * (1 - a2);
1826
+ var e2 = t2 instanceof ft ? t2 : new ft(t2), i2 = r2 instanceof ft ? r2 : new ft(r2), a3 = o(n2, 0, 100) / 100, u2 = 2 * a3 - 1, h2 = e2.alpha() - i2.alpha(), c2 = ((u2 * h2 == -1 ? u2 : (u2 + h2) / (1 + u2 * h2)) + 1) / 2, l2 = 1 - c2, p3 = [Math.round(o(e2.red() * c2 + i2.red() * l2, 0, 255)), Math.round(o(e2.green() * c2 + i2.green() * l2, 0, 255)), Math.round(o(e2.blue() * c2 + i2.blue() * l2, 0, 255))], f2 = e2.alpha() * a3 + i2.alpha() * (1 - a3);
1825
1827
  return new ft(p3, f2);
1826
1828
  };
1827
1829
  var F = Math.sqrt;
@@ -1860,50 +1862,50 @@ var et = function(t2, r2, n2, e2) {
1860
1862
  var i2 = Object.assign({}, { l: 1, c: 1 }, e2);
1861
1863
  return (function(t3, r3, n3, e3) {
1862
1864
  void 0 === n3 && (n3 = 1), void 0 === e3 && (e3 = 1);
1863
- var o3 = V(t3, true), i3 = o3[0], a3 = o3[1], u4 = o3[2], h3 = o3[3], c3 = o3[4], l2 = V(r3), p3 = l2[0], f2 = l2[1], s2 = l2[3], v2 = a3 - f2, b2 = i3 - p3, y2 = c3 - l2[4], d2 = F(U(h3 - s2, 2) + U(y2, 2) - U(v2, 2)), g2 = i3 < 16 ? 0.511 : 0.040975 * i3 / (1 + 0.01765 * i3), w2 = 0.0638 * a3 / (1 + 0.0131 * a3) + 0.638, m2 = 164 <= u4 && u4 <= 345 ? 0.56 + J(0.2 * $(Q(u4 + 168))) : 0.36 + J(0.4 * $(Q(u4 + 35))), M2 = F(U(a3, 4) / (U(a3, 4) + 1900)), x2 = w2 * (M2 * m2 + 1 - M2);
1865
+ var o3 = V(t3, true), i3 = o3[0], a4 = o3[1], u3 = o3[2], h3 = o3[3], c3 = o3[4], l2 = V(r3), p3 = l2[0], f2 = l2[1], s2 = l2[3], v2 = a4 - f2, b2 = i3 - p3, y2 = c3 - l2[4], d2 = F(U(h3 - s2, 2) + U(y2, 2) - U(v2, 2)), g2 = i3 < 16 ? 0.511 : 0.040975 * i3 / (1 + 0.01765 * i3), w2 = 0.0638 * a4 / (1 + 0.0131 * a4) + 0.638, m2 = 164 <= u3 && u3 <= 345 ? 0.56 + J(0.2 * $(Q(u3 + 168))) : 0.36 + J(0.4 * $(Q(u3 + 35))), M3 = F(U(a4, 4) / (U(a4, 4) + 1900)), x2 = w2 * (M3 * m2 + 1 - M3);
1864
1866
  return F(U(b2 / (n3 * g2), 2) + U(v2 / (e3 * w2), 2) + U(d2 / x2, 2));
1865
1867
  })(t2, r2, i2.l, i2.c);
1866
1868
  }
1867
1869
  if (o2 === rt) {
1868
- var a2 = { kL: 1, kC: 1, kH: 1, cate: "graphic" }, u3 = Object.assign({}, a2, e2);
1870
+ var a3 = { kL: 1, kC: 1, kH: 1, cate: "graphic" }, u2 = Object.assign({}, a3, e2);
1869
1871
  return (function(t3, r3, n3, e3, o3, i3) {
1870
1872
  void 0 === n3 && (n3 = 1), void 0 === e3 && (e3 = 1), void 0 === o3 && (o3 = 1), void 0 === i3 && (i3 = "graphic");
1871
- var a3 = "textiles" === i3 ? 0.048 : 0.045, u4 = "textiles" === i3 ? 0.014 : 0.015;
1873
+ var a4 = "textiles" === i3 ? 0.048 : 0.045, u3 = "textiles" === i3 ? 0.014 : 0.015;
1872
1874
  n3 = "textiles" === i3 ? 2 : n3;
1873
- var h3 = V(t3), c3 = h3[0], l2 = h3[1], p3 = h3[3], f2 = h3[4], s2 = V(r3), v2 = s2[0], b2 = s2[1], y2 = s2[3], d2 = c3 - v2, g2 = l2 - b2, w2 = f2 - s2[4], m2 = 1 + a3 * l2, M2 = 1 + u4 * l2, x2 = F(U(p3 - y2, 2) + U(w2, 2) - U(g2, 2));
1874
- return F(U(d2 / (1 * n3), 2) + U(g2 / (e3 * m2), 2) + U(x2 / (o3 * M2), 2));
1875
- })(t2, r2, u3.kL, u3.kC, u3.kH, u3.cate);
1875
+ var h3 = V(t3), c3 = h3[0], l2 = h3[1], p3 = h3[3], f2 = h3[4], s2 = V(r3), v2 = s2[0], b2 = s2[1], y2 = s2[3], d2 = c3 - v2, g2 = l2 - b2, w2 = f2 - s2[4], m2 = 1 + a4 * l2, M3 = 1 + u3 * l2, x2 = F(U(p3 - y2, 2) + U(w2, 2) - U(g2, 2));
1876
+ return F(U(d2 / (1 * n3), 2) + U(g2 / (e3 * m2), 2) + U(x2 / (o3 * M3), 2));
1877
+ })(t2, r2, u2.kL, u2.kC, u2.kH, u2.cate);
1876
1878
  }
1877
1879
  if (o2 === nt) return (function(t3, r3) {
1878
- var n3 = t3.lab(false), e3 = n3[0], o3 = n3[1], i3 = n3[2], a3 = r3.lab(false), u4 = a3[0], h3 = a3[1], c3 = a3[2];
1879
- return F(U(e3 - u4, 2) + U(o3 - h3, 2) + U(i3 - c3, 2));
1880
+ var n3 = t3.lab(false), e3 = n3[0], o3 = n3[1], i3 = n3[2], a4 = r3.lab(false), u3 = a4[0], h3 = a4[1], c3 = a4[2];
1881
+ return F(U(e3 - u3, 2) + U(o3 - h3, 2) + U(i3 - c3, 2));
1880
1882
  })(t2, r2);
1881
1883
  var h2 = { kL: 1, kC: 1, kH: 1 }, c2 = Object.assign({}, h2, e2);
1882
1884
  return (function(t3, r3, n3, e3, o3) {
1883
1885
  void 0 === n3 && (n3 = 1), void 0 === e3 && (e3 = 1), void 0 === o3 && (o3 = 1);
1884
- var i3 = V(t3), a3 = i3[0], u4 = i3[1], h3 = i3[3], c3 = i3[4], l2 = V(r3), p3 = l2[0], f2 = l2[1], s2 = l2[3], v2 = l2[4], b2 = (a3 + p3) / 2, y2 = (u4 + f2) / 2, d2 = (1 - F(U(y2, 7) / (U(y2, 7) + U(25, 7)))) / 2, g2 = h3 * (1 + d2), w2 = s2 * (1 + d2), m2 = F(U(g2, 2) + U(c3, 2)), M2 = F(U(w2, 2) + U(v2, 2)), x2 = T(g2, c3, true), _2 = T(w2, v2, true), C2 = (m2 + M2) / 2, I2 = J(x2 - _2) > 180 ? (x2 + _2 + 360) / 2 : (x2 + _2) / 2, k2 = 1 - 0.17 * $(Q(I2 - 30)) + 0.24 * $(Q(2 * I2)) + 0.32 * $(Q(3 * I2 + 6)) - 0.2 * $(Q(4 * I2 - 63)), E2 = J(_2 - x2) <= 180 ? _2 - x2 : J(_2 - x2) > 180 && _2 <= x2 ? _2 - x2 + 360 : _2 - x2 - 360, z2 = p3 - a3, N2 = f2 - u4, O2 = 2 * F(m2 * M2) * Z(Q(E2) / 2), P2 = 1 + 0.015 * U(b2 - 50, 2) / F(20 + U(b2 - 50, 2)), j2 = 1 + 0.045 * C2, S2 = 1 + 0.015 * C2 * k2, A2 = 30 * B(-U((I2 - 275) / 25, 2)), L2 = -2 * F(U(C2, 7) / (U(C2, 7) + U(25, 7))) * Z(2 * Q(A2));
1886
+ var i3 = V(t3), a4 = i3[0], u3 = i3[1], h3 = i3[3], c3 = i3[4], l2 = V(r3), p3 = l2[0], f2 = l2[1], s2 = l2[3], v2 = l2[4], b2 = (a4 + p3) / 2, y2 = (u3 + f2) / 2, d2 = (1 - F(U(y2, 7) / (U(y2, 7) + U(25, 7)))) / 2, g2 = h3 * (1 + d2), w2 = s2 * (1 + d2), m2 = F(U(g2, 2) + U(c3, 2)), M3 = F(U(w2, 2) + U(v2, 2)), x2 = T(g2, c3, true), _2 = T(w2, v2, true), C2 = (m2 + M3) / 2, I2 = J(x2 - _2) > 180 ? (x2 + _2 + 360) / 2 : (x2 + _2) / 2, k2 = 1 - 0.17 * $(Q(I2 - 30)) + 0.24 * $(Q(2 * I2)) + 0.32 * $(Q(3 * I2 + 6)) - 0.2 * $(Q(4 * I2 - 63)), E2 = J(_2 - x2) <= 180 ? _2 - x2 : J(_2 - x2) > 180 && _2 <= x2 ? _2 - x2 + 360 : _2 - x2 - 360, z2 = p3 - a4, N2 = f2 - u3, O2 = 2 * F(m2 * M3) * Z(Q(E2) / 2), P2 = 1 + 0.015 * U(b2 - 50, 2) / F(20 + U(b2 - 50, 2)), j2 = 1 + 0.045 * C2, S2 = 1 + 0.015 * C2 * k2, A2 = 30 * B(-U((I2 - 275) / 25, 2)), L2 = -2 * F(U(C2, 7) / (U(C2, 7) + U(25, 7))) * Z(2 * Q(A2));
1885
1887
  return F(U(z2 / (n3 * P2), 2) + U(N2 / (e3 * j2), 2) + U(O2 / (o3 * S2), 2) + L2 * (N2 / (e3 * j2)) * (O2 / (o3 * S2)));
1886
1888
  })(t2, r2, c2.kL, c2.kC, c2.kH);
1887
1889
  };
1888
1890
  var ot = function(t2, r2, n2) {
1889
- var e2 = Math.abs, o2 = Math.max, i2 = Math.min, a2 = t2 instanceof ft ? t2 : new ft(t2), u3 = r2 instanceof ft ? r2 : new ft(r2), h2 = Object.assign({}, { b: 125, c: 500 }, n2);
1890
- return !(e2(255 * a2.brightness() / 100 - 255 * u3.brightness() / 100) <= h2.b) && !(o2(a2.red(), u3.red()) - i2(a2.red(), u3.red()) + (o2(a2.green(), u3.green()) - i2(a2.green(), u3.green())) + (o2(a2.blue(), u3.blue()) - i2(a2.blue(), u3.blue())) <= h2.c);
1891
+ var e2 = Math.abs, o2 = Math.max, i2 = Math.min, a3 = t2 instanceof ft ? t2 : new ft(t2), u2 = r2 instanceof ft ? r2 : new ft(r2), h2 = Object.assign({}, { b: 125, c: 500 }, n2);
1892
+ return !(e2(255 * a3.brightness() / 100 - 255 * u2.brightness() / 100) <= h2.b) && !(o2(a3.red(), u2.red()) - i2(a3.red(), u2.red()) + (o2(a3.green(), u2.green()) - i2(a3.green(), u2.green())) + (o2(a3.blue(), u2.blue()) - i2(a3.blue(), u2.blue())) <= h2.c);
1891
1893
  };
1892
1894
  var it = function(t2, r2, n2) {
1893
1895
  var e2, i2 = function(t3) {
1894
1896
  return o(t3, 0, 100);
1895
- }, a2 = function(t3) {
1897
+ }, a3 = function(t3) {
1896
1898
  return o(t3, 0, 255);
1897
- }, u3 = { h: [0, function(t3) {
1899
+ }, u2 = { h: [0, function(t3) {
1898
1900
  return t3 % 360;
1899
- }], s: [1, i2], l: [2, i2], r: [0, a2], g: [1, a2], b: [2, a2] }, h2 = u3[r2][0];
1901
+ }], s: [1, i2], l: [2, i2], r: [0, a3], g: [1, a3], b: [2, a3] }, h2 = u2[r2][0];
1900
1902
  if (["h", "s", "l"].includes(r2)) {
1901
1903
  var c2 = t2.hsl();
1902
1904
  if (void 0 === n2) return c2[h2];
1903
- n2 = u3[r2][1](n2), c2[h2] = n2, e2 = s.apply(void 0, c2);
1905
+ n2 = u2[r2][1](n2), c2[h2] = n2, e2 = s.apply(void 0, c2);
1904
1906
  } else {
1905
1907
  if (e2 = t2.rgb(), void 0 === n2) return e2[h2];
1906
- n2 = u3[r2][1](n2), e2[h2] = n2;
1908
+ n2 = u2[r2][1](n2), e2[h2] = n2;
1907
1909
  }
1908
1910
  return new ft(e2, t2.alpha());
1909
1911
  };
@@ -1921,22 +1923,22 @@ var lt = function(t2, r2) {
1921
1923
  var e2 = "rgb", o2 = [0, 0, 0], i2 = 100;
1922
1924
  if (Array.isArray(t2)) {
1923
1925
  if (t2.length < 3) throw new Error("Invalid Color");
1924
- for (var a2 = 0; a2 < t2.length; a2++) if (a2 < 3) o2[a2] = t2[a2];
1926
+ for (var a3 = 0; a3 < t2.length; a3++) if (a3 < 3) o2[a3] = t2[a3];
1925
1927
  else {
1926
- if (3 !== a2 || void 0 === t2[3]) break;
1928
+ if (3 !== a3 || void 0 === t2[3]) break;
1927
1929
  i2 = t2[3];
1928
1930
  }
1929
1931
  } else {
1930
- var u3 = false, c2 = t2.trim().match(ht);
1931
- if (c2 || (u3 = true), c2) {
1932
+ var u2 = false, c2 = t2.trim().match(ht);
1933
+ if (c2 || (u2 = true), c2) {
1932
1934
  var l2 = c2[1].toLocaleLowerCase();
1933
- if (e2 = l2, ut.has(l2) || (u3 = true), c2[2] && !u3) {
1935
+ if (e2 = l2, ut.has(l2) || (u2 = true), c2[2] && !u2) {
1934
1936
  var p3 = c2[2], f2 = -1 !== p3.indexOf(",") ? "," : " ", s2 = p3.split(f2);
1935
- for (a2 = 0; a2 < 3; a2++) void 0 !== s2[a2] && (["lch", "lab"].includes(e2) && 0 === a2 || ["hsl", "hsla", "hsv", "hsva", "hwb", "hwba", "hsi", "hsia"].includes(e2) && a2 > 0 ? o2[a2] = ct(s2[a2]) : o2[a2] = Number(s2[a2].trim()));
1937
+ for (a3 = 0; a3 < 3; a3++) void 0 !== s2[a3] && (["lch", "lab"].includes(e2) && 0 === a3 || ["hsl", "hsla", "hsv", "hsva", "hwb", "hwba", "hsi", "hsia"].includes(e2) && a3 > 0 ? o2[a3] = ct(s2[a3]) : o2[a3] = Number(s2[a3].trim()));
1936
1938
  ["rgba", "hsla", "hsva", "hwba", "hsia"].includes(e2) ? (e2 = e2.slice(0, -1), void 0 !== s2[3] && (i2 = ct(s2[3]))) : "cmyk" === e2 && o2.push(void 0 !== s2[3] ? ct(s2[3]) : 0);
1937
1939
  }
1938
1940
  }
1939
- if (u3) {
1941
+ if (u2) {
1940
1942
  if (!/^#(([a-fA-F\d]{3}){1,2}|[a-fA-F\d]{8})$/.test(t2)) try {
1941
1943
  return t2 = (function(t3, r3) {
1942
1944
  if (void 0 === r3 && (r3 = false), t3 = t3.toLowerCase(), void 0 === at[t3]) {
@@ -1959,21 +1961,21 @@ var ft = (function() {
1959
1961
  this.cache = /* @__PURE__ */ new Map(), this._rgb = [0, 0, 0], this._alpha = 100;
1960
1962
  var e2 = { thowParseError: pt.thowParseError }, i2 = Object.assign({}, e2, null != n3 ? n3 : {});
1961
1963
  try {
1962
- var a2 = (function(t3) {
1963
- var r3, n4 = { lab2rgb: j, hsl2rgb: s, hsv2rgb: b, xyz2rgb: N, hwb2rgb: w, hsi2rgb: d }, e3 = lt(t3), i3 = e3[0], a3 = e3[1], u4 = e3[2];
1964
- if ("rgb" === i3) return [a3, u4];
1965
- "lch" === i3 && (i3 = (r3 = ["xyz", L(a3[0], a3[1], a3[2])])[0], a3 = r3[1]);
1966
- var h3 = a3[0], c2 = a3[1], p3 = a3[2], f2 = a3[3];
1964
+ var a3 = (function(t3) {
1965
+ var r3, n4 = { lab2rgb: j, hsl2rgb: s, hsv2rgb: b, xyz2rgb: N, hwb2rgb: w, hsi2rgb: d }, e3 = lt(t3), i3 = e3[0], a4 = e3[1], u3 = e3[2];
1966
+ if ("rgb" === i3) return [a4, u3];
1967
+ "lch" === i3 && (i3 = (r3 = ["xyz", L(a4[0], a4[1], a4[2])])[0], a4 = r3[1]);
1968
+ var h3 = a4[0], c2 = a4[1], p3 = a4[2], f2 = a4[3];
1967
1969
  if ("cmyk" === i3) return [l(h3, c2, p3, f2).map((function(t4) {
1968
1970
  return o(t4, 0, 255);
1969
- })), u4];
1971
+ })), u3];
1970
1972
  var v2 = "".concat(i3, "2rgb");
1971
1973
  if ("function" == typeof n4[v2]) return [n4[v2](h3, c2, p3).map((function(t4) {
1972
1974
  return o(t4, 0, 255);
1973
- })), u4];
1975
+ })), u3];
1974
1976
  throw new Error("Invalid color");
1975
- })(t2), u3 = a2[0], h2 = a2[1];
1976
- this._alpha = h2, this._rgb = u3;
1977
+ })(t2), u2 = a3[0], h2 = a3[1];
1978
+ this._alpha = h2, this._rgb = u2;
1977
1979
  } catch (t3) {
1978
1980
  if (i2.thowParseError) throw t3;
1979
1981
  }
@@ -2029,18 +2031,18 @@ var ft = (function() {
2029
2031
  void 0 === t2 && (t2 = 2);
2030
2032
  var n3 = 0 === t2 ? void 0 : 1 === t2 ? this._alpha : 100 === this._alpha ? void 0 : this._alpha, e2 = "color:hex:param_".concat(t2);
2031
2033
  if (this.cache.has(e2)) return this.cache.get(e2);
2032
- var o2 = u2.apply(void 0, r(r([], this._rgb, false), [n3], false));
2034
+ var o2 = u.apply(void 0, r(r([], this._rgb, false), [n3], false));
2033
2035
  return this.cache.set(e2, o2), o2;
2034
2036
  }, n2.prototype.lighten = function(t2, r2) {
2035
2037
  void 0 === t2 && (t2 = 5);
2036
- var e2 = this.hsl(false), i2 = e2[0], a2 = e2[1], u3 = e2[2];
2037
- return u3 = o(u3 += void 0 !== r2 && "relative" === r2 ? u3 * (t2 / 100) : t2, 0, 100), new n2(s(i2, a2, u3), this._alpha);
2038
+ var e2 = this.hsl(false), i2 = e2[0], a3 = e2[1], u2 = e2[2];
2039
+ return u2 = o(u2 += void 0 !== r2 && "relative" === r2 ? u2 * (t2 / 100) : t2, 0, 100), new n2(s(i2, a3, u2), this._alpha);
2038
2040
  }, n2.prototype.darken = function(t2, r2) {
2039
2041
  return void 0 === t2 && (t2 = 5), this.lighten(-t2, r2);
2040
2042
  }, n2.prototype.saturate = function(t2, r2) {
2041
2043
  void 0 === t2 && (t2 = 5);
2042
- var e2 = this.hsl(false), i2 = e2[0], a2 = e2[1], u3 = e2[2];
2043
- return a2 = o(a2 += void 0 !== r2 && "relative" === r2 ? a2 * (t2 / 100) : t2, 0, 100), new n2(s(i2, a2, u3), this._alpha);
2044
+ var e2 = this.hsl(false), i2 = e2[0], a3 = e2[1], u2 = e2[2];
2045
+ return a3 = o(a3 += void 0 !== r2 && "relative" === r2 ? a3 * (t2 / 100) : t2, 0, 100), new n2(s(i2, a3, u2), this._alpha);
2044
2046
  }, n2.prototype.desaturate = function(t2, r2) {
2045
2047
  return void 0 === t2 && (t2 = 5), this.saturate(-t2, r2);
2046
2048
  }, n2.prototype.spin = function(t2) {
@@ -2071,7 +2073,7 @@ var ft = (function() {
2071
2073
  return void 0 === r2 && (r2 = "CMC"), et(this, t2, r2, n3);
2072
2074
  }, n2.prototype.visibility = function(t2, r2) {
2073
2075
  return ot(this, t2, r2);
2074
- }, t([q(0, 1, true, 0), R2("color:rgb")], n2.prototype, "rgb", null), t([q(0, 1, true, 0)], n2.prototype, "rgba", null), t([q(0, 1, true, 0), R2("color:cmyk")], n2.prototype, "cmyk", null), t([q(0, 1, true, 0), R2("color:hsl")], n2.prototype, "hsl", null), t([q(0, 1, true, 0)], n2.prototype, "hsla", null), t([q(0, 1, true, 0), R2("color:hsv")], n2.prototype, "hsv", null), t([q(0, 1, true, 0), R2("color:hsi")], n2.prototype, "hsi", null), t([q(0, 1, true, 0), R2("color: hwb")], n2.prototype, "hwb", null), t([q(2, 1, true, 0), R2("color:xyz")], n2.prototype, "xyz", null), t([q(2, 1, true, 0), R2("color:lab")], n2.prototype, "lab", null), t([q(2, 1, true, 0), R2("color:lch")], n2.prototype, "lch", null), t([q(2, 1, true, 0), R2("color:xyY")], n2.prototype, "xyY", null), t([R2("color:luma")], n2.prototype, "luma", null), n2;
2076
+ }, t([q(0, 1, true, 0), R("color:rgb")], n2.prototype, "rgb", null), t([q(0, 1, true, 0)], n2.prototype, "rgba", null), t([q(0, 1, true, 0), R("color:cmyk")], n2.prototype, "cmyk", null), t([q(0, 1, true, 0), R("color:hsl")], n2.prototype, "hsl", null), t([q(0, 1, true, 0)], n2.prototype, "hsla", null), t([q(0, 1, true, 0), R("color:hsv")], n2.prototype, "hsv", null), t([q(0, 1, true, 0), R("color:hsi")], n2.prototype, "hsi", null), t([q(0, 1, true, 0), R("color: hwb")], n2.prototype, "hwb", null), t([q(2, 1, true, 0), R("color:xyz")], n2.prototype, "xyz", null), t([q(2, 1, true, 0), R("color:lab")], n2.prototype, "lab", null), t([q(2, 1, true, 0), R("color:lch")], n2.prototype, "lch", null), t([q(2, 1, true, 0), R("color:xyY")], n2.prototype, "xyY", null), t([R("color:luma")], n2.prototype, "luma", null), n2;
2075
2077
  })();
2076
2078
  var st = function(t2, r2, n2, e2) {
2077
2079
  return new ft([t2, r2, n2], e2);
@@ -2103,15 +2105,15 @@ function Mt(t2, r2, n2) {
2103
2105
  Mt.config = function(t2) {
2104
2106
  Object.assign(pt, t2);
2105
2107
  }, Mt.random = function() {
2106
- var t2 = a(0, 255), r2 = a(0, 255), n2 = a(0, 255);
2108
+ var t2 = a2(0, 255), r2 = a2(0, 255), n2 = a2(0, 255);
2107
2109
  return new ft([t2, r2, n2]);
2108
- }, Mt.convertor = Y, Mt.Color = ft, Mt.rgb = st, Mt.hsl = vt, Mt.hsv = bt, Mt.hsi = yt, Mt.hwb = dt, Mt.xyz = gt, Mt.lab = wt, Mt.lch = mt, Mt.mix = D, Mt.deltaE = et, Mt.utils = { roundDecimal: i, randomRange: a }, Mt.useNames = function(t2, r2) {
2110
+ }, Mt.convertor = Y, Mt.Color = ft, Mt.rgb = st, Mt.hsl = vt, Mt.hsv = bt, Mt.hsi = yt, Mt.hwb = dt, Mt.xyz = gt, Mt.lab = wt, Mt.lch = mt, Mt.mix = D, Mt.deltaE = et, Mt.utils = { roundDecimal: i, randomRange: a2 }, Mt.useNames = function(t2, r2) {
2109
2111
  return (function(t3, r3) {
2110
2112
  if (void 0 !== r3 && "function" == typeof r3) {
2111
2113
  var n2 = {};
2112
2114
  for (var e2 in t3) {
2113
- var o2 = r3(e2, t3[e2]), i2 = o2[0], a2 = o2[1];
2114
- n2[i2] = a2;
2115
+ var o2 = r3(e2, t3[e2]), i2 = o2[0], a3 = o2[1];
2116
+ n2[i2] = a3;
2115
2117
  }
2116
2118
  Object.assign(at, n2);
2117
2119
  } else Object.assign(at, t3);
@@ -2305,10 +2307,10 @@ function servedCorrelationProves(m2, served) {
2305
2307
  if (typeof served !== "string" || served.trim() === "") return false;
2306
2308
  return served.trim().toLowerCase() === m2.c.trim().toLowerCase();
2307
2309
  }
2308
- function sameMarker(a2, b2) {
2309
- if (!a2 || !b2) return false;
2310
- if (typeof a2.c !== "string" || typeof b2.c !== "string") return false;
2311
- const ca = a2.c.trim().toLowerCase(), cb = b2.c.trim().toLowerCase();
2310
+ function sameMarker(a3, b2) {
2311
+ if (!a3 || !b2) return false;
2312
+ if (typeof a3.c !== "string" || typeof b2.c !== "string") return false;
2313
+ const ca = a3.c.trim().toLowerCase(), cb = b2.c.trim().toLowerCase();
2312
2314
  if (ca === "" || cb === "") return false;
2313
2315
  return ca === cb;
2314
2316
  }
@@ -2484,10 +2486,12 @@ export {
2484
2486
  hasRefusalsToShow,
2485
2487
  hitBandFlag,
2486
2488
  inlineFilterGate,
2489
+ invalidSentinelReason,
2487
2490
  isBlankRender,
2488
2491
  isBlindMarker,
2489
2492
  isExcelDateFormat,
2490
2493
  isHorizontalLabelRow,
2494
+ isInvalidSentinelError,
2491
2495
  isPhantomBox,
2492
2496
  isPillBackdropAlpha,
2493
2497
  labelBand,
package/dist/react.mjs CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  createChartHost,
5
5
  geoFromCache,
6
6
  loadGeo
7
- } from "./chunk-HLNXXQA5.mjs";
7
+ } from "./chunk-RHBT4HTP.mjs";
8
8
  import "./chunk-A2GMXZP7.mjs";
9
9
  import "./chunk-GHODWOAL.mjs";
10
10
 
@@ -53,6 +53,7 @@ function BicChart(props) {
53
53
  viewState,
54
54
  labelContrast,
55
55
  onLabelContrast,
56
+ onInvalidSentinel,
56
57
  id,
57
58
  filteredBy,
58
59
  respondsWith,
@@ -78,6 +79,8 @@ function BicChart(props) {
78
79
  onSelectRef.current = onSelect;
79
80
  const onLabelContrastRef = useRef(onLabelContrast);
80
81
  onLabelContrastRef.current = onLabelContrast;
82
+ const onInvalidSentinelRef = useRef(onInvalidSentinel);
83
+ onInvalidSentinelRef.current = onInvalidSentinel;
81
84
  const [geoTick, setGeoTick] = useState(0);
82
85
  useEffect(() => {
83
86
  if (!geoKind || geoFromCache(geoKind)) return;
@@ -104,7 +107,15 @@ function BicChart(props) {
104
107
  geoKind,
105
108
  viewState,
106
109
  labelContrast,
107
- onLabelContrast: (r) => onLabelContrastRef.current?.(r)
110
+ onLabelContrast: (r) => onLabelContrastRef.current?.(r),
111
+ // A GETTER, not a wrapper: the host decides whether to
112
+ // swallow the sentinel throw by whether this is SET, so
113
+ // an always-present wrapper would hide the throw from a
114
+ // page that never asked. Read at throw time, so the
115
+ // newest prop wins without a rebuild.
116
+ get onInvalidSentinel() {
117
+ return onInvalidSentinelRef.current ? (info) => onInvalidSentinelRef.current?.(info) : void 0;
118
+ }
108
119
  });
109
120
  hostRef.current = host;
110
121
  const off = host.selection.onChange((payloadIdxs, source) => {
@@ -165,6 +165,22 @@ export interface ChartHostConfig {
165
165
  labelContrast?: boolean | LabelContrastOptions;
166
166
  /** What the label-contrast pass did after each render - counts, so a host can log them. */
167
167
  onLabelContrast?: (report: LabelContrastReport) => void;
168
+ /**
169
+ * THE CHART SAID THE DATA LACKS SOMETHING IT IS BUILT ON. Generated code has one sanctioned
170
+ * hard stop at runtime: a column the chart needs is gone from `data.columns`, and it throws
171
+ * `new Error('INVALID:column "<name>" not found')`. That is a DATA STATE, not a broken chart -
172
+ * the same code draws again once the column is back - so a host should say what is missing,
173
+ * keep the code, and re-render on the next data change rather than report a crash.
174
+ *
175
+ * Supplied: render() clears the container, calls this with the chart's reason (the text after
176
+ * `INVALID:` on that line) and the full message, and returns normally - nothing was drawn, so
177
+ * no post-render pass (label contrast, hit-target heal, census, fit) runs. Absent: render()
178
+ * throws exactly as it always has, so an existing host is untouched.
179
+ */
180
+ onInvalidSentinel?: (info: {
181
+ reason: string;
182
+ message: string;
183
+ }) => void;
168
184
  }
169
185
  export interface ChartHost {
170
186
  render(): void;
@@ -23,6 +23,7 @@ export { ensureCrossfilterHitTargets, type HitTargetReport } from "./hitTargets"
23
23
  export { applyLabelContrast, LABEL_CONTRAST_DONE_ATTR, LABEL_CONTRAST_CAP, type LabelContrastOptions, type LabelContrastReport, } from "./labelContrastDom";
24
24
  export { decideLabelColor, toRGBA, compositeOver, relativeLuminance, contrastRatio, isPillBackdropAlpha, pillBacksGlyph, backingHoldsGlyph, cellSuppressesNormalize, glyphSampleGrid, DARK_TEXT, LIGHT_TEXT, MIN_CONTRAST, WHITE_TEXT_BG_LUM, PILL_MIN_ALPHA, PILL_OPAQUE_ALPHA, PILL_MIN_COVERAGE, PAGE_MATCH_TOLERANCE, BACKING_MAJORITY, GLYPH_SAMPLE_N, type LabelDecision, } from "./labelContrast";
25
25
  export { censusMarks, isBlankRender, blankRenderFlag, type MarkCensus, type BlankVerdictInput } from "./blankRender";
26
+ export { isInvalidSentinelError, invalidSentinelReason } from "./invalidSentinel";
26
27
  export { censusHitBands, hitBandFlag, MIN_HIT_BAND_PX, type HitBandCensus } from "./hitBands";
27
28
  export { censusColourSpread, colourSpreadFlag, SAME_SHADE_DELTA_E, MIN_RAMP_FILLS, type ColourSpreadCensus } from "./colourSpread";
28
29
  export { censusValuePlacement, valuePlacementFlag, VALUE_AXIS_MIN_FIT, type ValuePlacementCensus } from "./valuePlacement";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * True when an error message, Python traceback or "Error:"-prefixed result carries the generated
3
+ * code's INVALID sentinel. Matches the uppercase marker followed by a colon (space allowed before
4
+ * the colon) anywhere in the text - Python surfaces it inside `ValueError: INVALID:...` at the END
5
+ * of a multi-line traceback; a D3 throw surfaces it directly in `Error.message`. Lowercase
6
+ * "Invalid" and the bare word without a colon are ordinary errors.
7
+ */
8
+ export declare function isInvalidSentinelError(text: string | null | undefined): boolean;
9
+ /**
10
+ * The reason the chart gave: the text after the first `INVALID:` up to the end of that line,
11
+ * trimmed, and capped at `max` characters with an ASCII "..." so a host can put it in a one-line
12
+ * status. Empty string when the text carries no sentinel.
13
+ */
14
+ export declare function invalidSentinelReason(text: string | null | undefined, max?: number): string;