@diamondlightsource/davidia 1.0.4 → 1.0.5

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.js CHANGED
@@ -3,40 +3,40 @@ var sn = (e, n, t) => n in e ? an(e, n, { enumerable: !0, configurable: !0, writ
3
3
  var A = (e, n, t) => sn(e, typeof n != "symbol" ? n + "" : n, t);
4
4
  import { jsx as l, Fragment as te, jsxs as v } from "react/jsx-runtime";
5
5
  import At from "afterframe";
6
- import { useRef as Q, useCallback as J, useMemo as N, useEffect as R, useState as M, createContext as ln, useContext as rn, Fragment as Se } from "react";
7
- import { useVisCanvasContext as lt, useModifierKeyPressed as cn, useInteraction as un, MouseButton as dn, useCanvasEvent as Ze, assertDefined as Qe, Box as hn, SvgElement as Je, DataToHtml as mn, ScaleType as Le, ToggleBtn as Ke, ToggleGroup as W, useVisDomain as fn, useSafeDomain as gn, DomainSlider as yn, Histogram as pn, DomainControls as bn, ScaleSelector as Sn, ColorMapSelector as vn, ColorMapGradient as Cn, Btn as Ue, Selector as xn, AXIS_SCALE_TYPES as St, Separator as ke, COLOR_SCALE_TYPES as Pn, Toolbar as rt, HeatmapVis as wn, getVisDomain as ze, RgbVis as Dn, VisCanvas as Mn, DefaultInteractions as _n, TooltipMesh as Tn, ResetZoomButton as Ln, CurveType as et, DataCurve as kn, GlyphType as An, ScatterVis as Vn, SurfaceVis as In, CellWidthInput as On, MatrixVis as $n } from "@h5web/lib";
8
- import { GlyphType as Na, ScaleType as Fa } from "@h5web/lib";
6
+ import { useRef as Q, useCallback as J, useMemo as $, useEffect as R, useState as M, createContext as ln, useContext as rn, Fragment as Se } from "react";
7
+ import { useVisCanvasContext as lt, useModifierKeyPressed as cn, useInteraction as un, MouseButton as dn, useCanvasEvent as Ze, assertDefined as Qe, Box as hn, DataToHtml as mn, SvgElement as Je, ScaleType as Le, ToggleBtn as Ke, ToggleGroup as W, useVisDomain as fn, useSafeDomain as gn, DomainSlider as yn, Histogram as pn, DomainControls as bn, ScaleSelector as Sn, ColorMapSelector as vn, ColorMapGradient as Cn, Btn as Ue, Selector as xn, Toolbar as rt, Separator as ke, AXIS_SCALE_TYPES as St, COLOR_SCALE_TYPES as Pn, HeatmapVis as wn, getVisDomain as ze, RgbVis as Dn, VisCanvas as Mn, DefaultInteractions as Tn, TooltipMesh as _n, ResetZoomButton as Ln, CurveType as et, DataCurve as kn, GlyphType as An, ScatterVis as Vn, SurfaceVis as In, CellWidthInput as On, MatrixVis as Nn } from "@h5web/lib";
8
+ import { GlyphType as Va, ScaleType as Ia } from "@h5web/lib";
9
9
  import Ge from "ndarray";
10
10
  import vt from "ndarray-concat-rows";
11
- import Nn from "cwise";
11
+ import $n from "cwise";
12
12
  import { bin as Fn } from "d3-array";
13
13
  import { scaleLinear as Bn } from "d3-scale";
14
14
  import { Vector3 as w, Matrix3 as Fe } from "three";
15
15
  import { useThree as ct } from "@react-three/fiber";
16
- import { useSyncedRef as Te, useRafState as zn, useKeyboardEvent as Ee, usePrevious as Ct, useToggle as Be, useClickOutside as Vt } from "@react-hookz/web";
16
+ import { useSyncedRef as _e, useRafState as zn, useKeyboardEvent as Ee, usePrevious as Ct, useToggle as Be, useClickOutside as Vt } from "@react-hookz/web";
17
17
  import { Drag as En } from "@visx/drag";
18
18
  import { BsSlashLg as Rn, BsCardHeading as Gn } from "react-icons/bs";
19
- import { MdAspectRatio as Hn, MdHorizontalRule as Kn, MdOutlineRectangle as Un, MdOutlinePolyline as qn, MdOutlineShapeLine as jn, MdGridOn as Wn } from "react-icons/md";
20
- import { TbZoomPan as Yn, TbZoomInArea as Xn, TbPolygon as Zn, TbCircle as Qn, TbOvalVertical as Jn, TbQuestionMark as eo, TbAxisX as to, TbAxisY as no, TbGridDots as oo } from "react-icons/tb";
21
- import "@h5web/lib/dist/styles.css";
22
- import { IoMdUndo as io } from "react-icons/io";
19
+ import { MdAspectRatio as Hn, MdHorizontalRule as Kn, MdOutlinePolyline as Un, MdOutlineRectangle as qn, MdGridOn as jn } from "react-icons/md";
20
+ import { TbZoomPan as Wn, TbZoomInArea as Yn, TbQuestionMark as Xn, TbOvalVertical as Zn, TbCircle as Qn, TbPolygon as Jn, TbGridDots as eo, TbAxisX as to, TbAxisY as no } from "react-icons/tb";
21
+ import "@h5web/lib/styles.css";
22
+ import { IoMdUndo as oo } from "react-icons/io";
23
23
  import It from "react-draggable";
24
- import { format as ao } from "d3-format";
25
- import { HiCursorClick as so } from "react-icons/hi";
26
- import { IoShapesOutline as lo } from "react-icons/io5";
24
+ import { format as io } from "d3-format";
25
+ import { HiCursorClick as ao } from "react-icons/hi";
26
+ import { IoShapesOutline as so } from "react-icons/io5";
27
27
  import { HexColorPicker as Ot } from "react-colorful";
28
- import { FaCircle as ro } from "react-icons/fa";
29
- import { RxCross1 as co } from "react-icons/rx";
30
- import { FaSquareFull as uo } from "react-icons/fa6";
31
- import $t from "react-select";
32
- import { AiOutlineColumnWidth as ho, AiOutlineColumnHeight as mo } from "react-icons/ai";
33
- import { BiCircleQuarter as fo } from "react-icons/bi";
34
- import { ArcballControls as go } from "@react-three/drei";
35
- import { encode as yo, decode as po } from "messagepack";
36
- import bo, { ReadyState as Ne } from "react-use-websocket";
28
+ import { FaCircle as lo } from "react-icons/fa";
29
+ import { RxCross1 as ro } from "react-icons/rx";
30
+ import { FaSquareFull as co } from "react-icons/fa6";
31
+ import Nt from "react-select";
32
+ import { AiOutlineColumnHeight as uo, AiOutlineColumnWidth as ho } from "react-icons/ai";
33
+ import { BiCircleQuarter as mo } from "react-icons/bi";
34
+ import { ArcballControls as fo } from "@react-three/drei";
35
+ import { encode as go, decode as yo } from "messagepack";
36
+ import po, { ReadyState as $e } from "react-use-websocket";
37
37
  import { toast as xt } from "react-toastify";
38
38
  import "react-toastify/dist/ReactToastify.css";
39
- const Nt = Nn({
39
+ const $t = $n({
40
40
  funcName: "nanMinMax",
41
41
  args: ["array"],
42
42
  pre: function() {
@@ -51,7 +51,7 @@ const Nt = Nn({
51
51
  return [this.min, this.max];
52
52
  }
53
53
  });
54
- function So(e, n) {
54
+ function bo(e, n) {
55
55
  if (n == null) {
56
56
  if (e === void 0)
57
57
  throw Error("Cannot call with both arguments falsy");
@@ -68,7 +68,7 @@ function So(e, n) {
68
68
  "x ({$xLength}) and y ({$yLength}) axes must be same length",
69
69
  n
70
70
  ), e;
71
- const s = vt([e.y, n.y]), a = Nt(t), c = [
71
+ const s = vt([e.y, n.y]), a = $t(t), c = [
72
72
  Math.min(e.yDomain[0], n.yDomain[0]),
73
73
  Math.max(e.yDomain[1], n.yDomain[1])
74
74
  ];
@@ -82,15 +82,15 @@ function So(e, n) {
82
82
  yDomain: c
83
83
  };
84
84
  }
85
- function vo(e) {
85
+ function So(e) {
86
86
  const n = e.map((o) => o.xDomain[0]), t = e.map((o) => o.xDomain[1]);
87
87
  return n.length == 1 ? [n[0], t[0]] : [Math.min(...n), Math.max(...t)];
88
88
  }
89
- function Co(e) {
89
+ function vo(e) {
90
90
  const n = e.map((o) => o.yDomain[0]), t = e.map((o) => o.yDomain[1]);
91
91
  return n.length == 1 ? [n[0], t[0]] : [Math.min(...n), Math.max(...t)];
92
92
  }
93
- function xo(e) {
93
+ function Co(e) {
94
94
  const n = e.values, t = ue(n);
95
95
  if (Ft(e)) {
96
96
  const o = e;
@@ -108,7 +108,7 @@ function xo(e) {
108
108
  values: t[0]
109
109
  };
110
110
  }
111
- function Po(e) {
111
+ function xo(e) {
112
112
  const n = e.heightValues, t = ue(n);
113
113
  return {
114
114
  ...e,
@@ -116,7 +116,7 @@ function Po(e) {
116
116
  heightValues: t[0]
117
117
  };
118
118
  }
119
- function wo(e) {
119
+ function Po(e) {
120
120
  const n = e.cellValues, t = ue(n);
121
121
  return {
122
122
  ...e,
@@ -143,7 +143,7 @@ function Pt(e) {
143
143
  yDomain: i[1]
144
144
  };
145
145
  }
146
- function Do(e) {
146
+ function wo(e) {
147
147
  const n = e.pointValues, t = ue(n), o = e.x, i = ue(o), s = e.y, a = ue(s);
148
148
  return {
149
149
  ...e,
@@ -215,15 +215,15 @@ function ue(e, n = !1) {
215
215
  break;
216
216
  }
217
217
  const i = Ge(o, e.shape);
218
- return [i, n ? Nt(i) : [0, 0]];
218
+ return [i, n ? $t(i) : [0, 0]];
219
219
  }
220
220
  function Ft(e) {
221
221
  return "domain" in e && "heatmapScale" in e;
222
222
  }
223
- function Mo(e) {
223
+ function Do(e) {
224
224
  return Ft(e);
225
225
  }
226
- function _o(e) {
226
+ function Mo(e) {
227
227
  return e === "equal" || e === "auto" ? e : "number";
228
228
  }
229
229
  function fe(e) {
@@ -260,7 +260,7 @@ function We(e) {
260
260
  ySelectToZoom: t ? { modifierKey: "Shift" } : !1
261
261
  };
262
262
  }
263
- function Lo(e, n) {
263
+ function _o(e, n) {
264
264
  if (e && e.length != 0) {
265
265
  const t = Fn(), o = n === void 0 ? null : Bn().domain(n).nice(), i = e.length;
266
266
  let s;
@@ -277,7 +277,7 @@ function Lo(e, n) {
277
277
  }
278
278
  }
279
279
  function ut(e, n, t, o) {
280
- return { ...Lo(e, n), colorMap: t, invertColorMap: o };
280
+ return { ..._o(e, n), colorMap: t, invertColorMap: o };
281
281
  }
282
282
  function Et() {
283
283
  const e = performance.now();
@@ -289,7 +289,7 @@ function Et() {
289
289
  };
290
290
  }
291
291
  var oe = /* @__PURE__ */ ((e) => (e.panAndWheelZoom = "panAndWheelZoom", e.selectToZoom = "selectToZoom", e.selectRegion = "selectRegion", e))(oe || {});
292
- function ko(e) {
292
+ function Lo(e) {
293
293
  const {
294
294
  id: n = "MulticlickSelection",
295
295
  minPoints: t = 2,
@@ -311,7 +311,7 @@ function ko(e) {
311
311
  throw new RangeError(
312
312
  `maxPoints must be -1 or >= minPoints, ${o} cf ${t}`
313
313
  );
314
- const S = Te(c), p = Te(r), b = Te(u), D = Te(d), _ = Te(h), L = Te(m), P = ct((B) => B.camera), F = lt(), { canvasBox: k, htmlToWorld: H, worldToData: X } = F, [G, C] = zn(), I = Q(), O = Q(!0), Y = Q(!1), ee = Q(!1), ae = cn(s), $ = un(n, {
314
+ const S = _e(c), p = _e(r), b = _e(u), D = _e(d), T = _e(h), L = _e(m), P = ct((B) => B.camera), F = lt(), { canvasBox: k, htmlToWorld: H, worldToData: X } = F, [G, C] = zn(), I = Q(), O = Q(!0), Y = Q(!1), ee = Q(!1), ae = cn(s), N = un(n, {
315
315
  button: dn.Left,
316
316
  modifierKey: s,
317
317
  disabled: a
@@ -333,12 +333,12 @@ function ko(e) {
333
333
  []
334
334
  );
335
335
  function we(B) {
336
- const { sourceEvent: z } = B, E = z.type === "pointerdown", g = $(z);
336
+ const { sourceEvent: z } = B, E = z.type === "pointerdown", g = N(z);
337
337
  if (E && !g)
338
338
  return;
339
- const { target: y, pointerId: x } = z, T = y, V = I.current, K = k.clampPoint(B.htmlPt);
339
+ const { target: y, pointerId: x } = z, _ = y, V = I.current, K = k.clampPoint(B.htmlPt);
340
340
  if (V === void 0) {
341
- se(T, x, K);
341
+ se(_, x, K);
342
342
  return;
343
343
  }
344
344
  const re = V.length;
@@ -348,16 +348,16 @@ function ko(e) {
348
348
  (re === 1 ? 0 : Math.max(Math.abs(Oe.x - K.x), Math.abs(Oe.y - K.y))) <= i ? be = E && Y.current : (V.push(K), O.current = !1);
349
349
  } else
350
350
  O.current = !0;
351
- (be || re >= t && o > 0 && re === o) && (C(void 0), ve(T, x, E, g));
351
+ (be || re >= t && o > 0 && re === o) && (C(void 0), ve(_, x, E, g));
352
352
  }
353
- function _e(B) {
353
+ function Te(B) {
354
354
  const z = I.current;
355
355
  if (z === void 0)
356
356
  return;
357
357
  const E = z.length, g = k.clampPoint(B.htmlPt);
358
358
  O.current ? (z.push(g), O.current = !1) : z[E - 1] = g, j([...z]);
359
359
  }
360
- Ze("pointerdown", we), Ze("pointermove", _e), Ze("pointerup", we), Ee(
360
+ Ze("pointerdown", we), Ze("pointermove", Te), Ze("pointerup", we), Ee(
361
361
  "Escape",
362
362
  () => {
363
363
  I.current = void 0, C(void 0);
@@ -372,10 +372,10 @@ function ko(e) {
372
372
  [],
373
373
  { event: "keydown" }
374
374
  );
375
- const Z = N(
375
+ const Z = $(
376
376
  () => G && S.current(G, P, F),
377
377
  [G, S, P, F]
378
- ), ye = N(() => {
378
+ ), ye = $(() => {
379
379
  const B = !!Z && p.current(Z);
380
380
  if (B) {
381
381
  const z = Z.html.length;
@@ -395,8 +395,8 @@ function ko(e) {
395
395
  );
396
396
  return;
397
397
  }
398
- le && (Qe(pe), (E = _.current) == null || E.call(
399
- _,
398
+ le && (Qe(pe), (E = T.current) == null || E.call(
399
+ T,
400
400
  ee.current ? le : void 0,
401
401
  // pass `undefined` if Escape pressed or modifier key released
402
402
  pe
@@ -410,13 +410,13 @@ function ko(e) {
410
410
  ae,
411
411
  b,
412
412
  D,
413
- _,
413
+ T,
414
414
  L
415
415
  ]), !Z || !ae ? null : (Qe(G), /* @__PURE__ */ l(te, { children: f(Z, G, ye, Y.current) }));
416
416
  }
417
417
  const it = 8;
418
- function Ao(e) {
419
- const { n, nx: t, ny: o, i, drag: s, ...a } = e, c = N(
418
+ function ko(e) {
419
+ const { n, nx: t, ny: o, i, drag: s, ...a } = e, c = $(
420
420
  () => ({
421
421
  onPointerMove: s == null ? void 0 : s.dragMove,
422
422
  onPointerUp: s && ((u) => {
@@ -427,7 +427,7 @@ function Ao(e) {
427
427
  })
428
428
  }),
429
429
  [s]
430
- ), r = N(() => {
430
+ ), r = $(() => {
431
431
  if ("ref" in a) {
432
432
  const { ref: u, ...d } = a;
433
433
  return d;
@@ -500,7 +500,7 @@ function Rt(e) {
500
500
  },
501
501
  restrict: d,
502
502
  children: (h) => /* @__PURE__ */ l(
503
- Ao,
503
+ ko,
504
504
  {
505
505
  n,
506
506
  i: o,
@@ -513,7 +513,7 @@ function Rt(e) {
513
513
  }
514
514
  );
515
515
  }
516
- function Vo(e) {
516
+ function Ao(e) {
517
517
  const { size: n, coords: t, isFixed: o, axis: i, onHandleChange: s, ...a } = e, c = [t[0].getComponent(i), t[1].getComponent(i)], r = Math.min(c[0], c[1]), u = Math.max(c[0], c[1]);
518
518
  let d;
519
519
  i === 0 ? d = [
@@ -529,7 +529,7 @@ function Vo(e) {
529
529
  new w(0, r),
530
530
  new w(n.width / 2, (r + u) / 2)
531
531
  ];
532
- const h = N(() => d.map((S, p) => {
532
+ const h = $(() => d.map((S, p) => {
533
533
  const b = `'axisbox-drag-${p}`;
534
534
  return /* @__PURE__ */ l(
535
535
  Rt,
@@ -548,7 +548,7 @@ function Vo(e) {
548
548
  );
549
549
  }), [d, n, s, i, a]);
550
550
  d.pop();
551
- const m = N(
551
+ const m = $(
552
552
  () => d.map((f) => `${f.x},${f.y}`).join(" "),
553
553
  [d]
554
554
  );
@@ -605,9 +605,9 @@ function Vo(e) {
605
605
  ] })
606
606
  ] });
607
607
  }
608
- const wt = 10, Io = it * 2 + 4, Oo = new Fe().identity().rotate(Math.PI / 2).multiplyScalar(Math.sin(Math.PI / 3));
609
- function $o(e, n) {
610
- const t = new w().subVectors(n, e), o = Math.hypot(t.x, t.y), i = t.clone().multiplyScalar(0.5 + Io / o);
608
+ const wt = 10, Vo = it * 2 + 4, Io = new Fe().identity().rotate(Math.PI / 2).multiplyScalar(Math.sin(Math.PI / 3));
609
+ function Oo(e, n) {
610
+ const t = new w().subVectors(n, e), o = Math.hypot(t.x, t.y), i = t.clone().multiplyScalar(0.5 + Vo / o);
611
611
  t.multiplyScalar(wt / o);
612
612
  let s, a;
613
613
  if (o > 4 * wt) {
@@ -615,7 +615,7 @@ function $o(e, n) {
615
615
  s = new w().subVectors(r, t), a = r.add(t);
616
616
  } else
617
617
  s = n, a = new w().addVectors(n, t);
618
- const c = t.applyMatrix3(Oo).add(s);
618
+ const c = t.applyMatrix3(Io).add(s);
619
619
  return [s, a, c].map((r) => `${r.x},${r.y}`).join(" ");
620
620
  }
621
621
  function Dt(e) {
@@ -626,7 +626,7 @@ function Dt(e) {
626
626
  isFixed: i,
627
627
  onHandleChange: s,
628
628
  ...a
629
- } = e, c = t.slice(0, -1), r = N(() => t.map((m, f) => {
629
+ } = e, c = t.slice(0, -1), r = $(() => t.map((m, f) => {
630
630
  const S = `${o ? "polygon" : "polyline"}-drag-${f}`;
631
631
  return /* @__PURE__ */ l(
632
632
  Rt,
@@ -641,10 +641,10 @@ function Dt(e) {
641
641
  },
642
642
  S
643
643
  );
644
- }), [t, o, n, s, a]), u = N(
644
+ }), [t, o, n, s, a]), u = $(
645
645
  () => c.map((h) => `${h.x},${h.y}`).join(" "),
646
646
  [c]
647
- ), d = N(() => $o(t[0], t[1]), [t]);
647
+ ), d = $(() => Oo(t[0], t[1]), [t]);
648
648
  return /* @__PURE__ */ v(te, { children: [
649
649
  o ? /* @__PURE__ */ l("polygon", { points: u, ...a }) : /* @__PURE__ */ l("polyline", { points: u, ...a, fill: "none" }),
650
650
  /* @__PURE__ */ l("polygon", { points: d, ...a, fill: a.stroke }),
@@ -1135,7 +1135,7 @@ function No(e) {
1135
1135
  return he.clicks();
1136
1136
  }
1137
1137
  }
1138
- function Fo(e, n, t, o, i) {
1138
+ function $o(e, n, t, o, i) {
1139
1139
  console.debug("Points", n, t);
1140
1140
  const s = Ht(n, [!1, !1], t);
1141
1141
  s.alpha = o;
@@ -1171,7 +1171,7 @@ function Kt(e, n, t, o, i, s, a, c) {
1171
1171
  case "horizontalAxis":
1172
1172
  case "verticalAxis":
1173
1173
  return /* @__PURE__ */ l(Je, { children: /* @__PURE__ */ l(
1174
- Vo,
1174
+ Ao,
1175
1175
  {
1176
1176
  size: o,
1177
1177
  coords: n,
@@ -1203,7 +1203,7 @@ function Kt(e, n, t, o, i, s, a, c) {
1203
1203
  return null;
1204
1204
  }
1205
1205
  }
1206
- function Bo(e, n, t, o, i, s) {
1206
+ function Fo(e, n, t, o, i, s) {
1207
1207
  const a = Ht(e, t, n);
1208
1208
  return Kt(
1209
1209
  e,
@@ -1215,7 +1215,7 @@ function Bo(e, n, t, o, i, s) {
1215
1215
  !0
1216
1216
  );
1217
1217
  }
1218
- function zo(e) {
1218
+ function Bo(e) {
1219
1219
  const { size: n, selection: t, updateSelection: o, showHandles: i } = e, s = ht(t), a = lt(), { htmlToData: c } = a, r = ct((h) => h.camera), u = J(
1220
1220
  (h, m) => {
1221
1221
  const f = c(r, new w(h, m));
@@ -1228,8 +1228,8 @@ function zo(e) {
1228
1228
  return (S, p, b = !0) => {
1229
1229
  const D = u(p[0], p[1]);
1230
1230
  console.debug("UH:", S, p, D);
1231
- const _ = m(S, D);
1232
- return o(_, b), _;
1231
+ const T = m(S, D);
1232
+ return o(T, b), T;
1233
1233
  };
1234
1234
  },
1235
1235
  [o, u]
@@ -1249,9 +1249,9 @@ function zo(e) {
1249
1249
  }
1250
1250
  return console.error("Unknown selection type or has no points getter", t), null;
1251
1251
  }
1252
- function Eo(e, n, t, o) {
1252
+ function zo(e, n, t, o) {
1253
1253
  return o && n.map((i) => /* @__PURE__ */ l(
1254
- zo,
1254
+ Bo,
1255
1255
  {
1256
1256
  size: e,
1257
1257
  selection: i,
@@ -1264,11 +1264,11 @@ function Eo(e, n, t, o) {
1264
1264
  function Ut(e, n) {
1265
1265
  return e !== null ? `${n ? n[ht(e)] : ""} ${e.name} ${e.id}` : "No selection chosen";
1266
1266
  }
1267
- function _t(e, n, t) {
1267
+ function Tt(e, n, t) {
1268
1268
  const o = e.find((i) => i.id === n) ?? null;
1269
1269
  return Ut(o, t);
1270
1270
  }
1271
- function Ro(e, n) {
1271
+ function Eo(e, n) {
1272
1272
  return hn.fromPoints(...e).hasMinSize(
1273
1273
  n === "horizontalAxis" || n === "verticalAxis" ? 0 : 20
1274
1274
  );
@@ -1301,10 +1301,10 @@ function qt(e, n) {
1301
1301
  enableSelect: a
1302
1302
  };
1303
1303
  }
1304
- function Go(e) {
1304
+ function Ro(e) {
1305
1305
  e.asDashed = !1;
1306
1306
  }
1307
- function Tt(e) {
1307
+ function _t(e) {
1308
1308
  e.asDashed = !0;
1309
1309
  }
1310
1310
  function Ye(e) {
@@ -1315,29 +1315,29 @@ function Ye(e) {
1315
1315
  selections: i = [],
1316
1316
  updateSelection: s,
1317
1317
  batonProps: a
1318
- } = e, c = 0.3, { canvasBox: r, dataToHtml: u } = lt(), d = r.size, h = N(() => {
1318
+ } = e, c = 0.3, { canvasBox: r, dataToHtml: u } = lt(), d = r.size, h = $(() => {
1319
1319
  if (s != null)
1320
- return Eo(
1320
+ return zo(
1321
1321
  d,
1322
1322
  i,
1323
1323
  (a == null ? void 0 : a.hasBaton) ?? !0,
1324
1324
  s
1325
1325
  );
1326
- }, [d, i, s, a == null ? void 0 : a.hasBaton]), m = ct((b) => b.camera), f = N(() => {
1326
+ }, [d, i, s, a == null ? void 0 : a.hasBaton]), m = ct((b) => b.camera), f = $(() => {
1327
1327
  const b = u(m, new w(0, 0)), D = u(m, new w(1, 1)).sub(b);
1328
1328
  return [D.x < 0, D.y < 0];
1329
- }, [m, u]), S = N(() => t === 0 ? !1 : i.reduce(
1330
- (D, _) => D + (ht(_) === o ? 1 : 0),
1329
+ }, [m, u]), S = $(() => t === 0 ? !1 : i.reduce(
1330
+ (D, T) => D + (ht(T) === o ? 1 : 0),
1331
1331
  0
1332
- ) >= t, [t, o, i]), p = N(() => No(o), [o]);
1332
+ ) >= t, [t, o, i]), p = $(() => No(o), [o]);
1333
1333
  return /* @__PURE__ */ v(te, { children: [
1334
1334
  s && ((a == null ? void 0 : a.hasBaton) ?? !0) && !n && !S && /* @__PURE__ */ l(
1335
- ko,
1335
+ Lo,
1336
1336
  {
1337
1337
  modifierKey: e.modifierKey,
1338
- validate: ({ html: b }) => Ro(b, o),
1338
+ validate: ({ html: b }) => Eo(b, o),
1339
1339
  onValidSelection: ({ data: b }) => {
1340
- const D = Fo(
1340
+ const D = $o(
1341
1341
  i,
1342
1342
  o,
1343
1343
  b,
@@ -1347,13 +1347,13 @@ function Ye(e) {
1347
1347
  },
1348
1348
  minPoints: p[0],
1349
1349
  maxPoints: p[1],
1350
- children: ({ html: b }, D, _) => Bo(
1350
+ children: ({ html: b }, D, T) => Fo(
1351
1351
  o,
1352
1352
  b,
1353
1353
  f,
1354
1354
  c,
1355
1355
  d,
1356
- _ ? void 0 : "#cc6677"
1356
+ T ? void 0 : "#cc6677"
1357
1357
  // orangered,
1358
1358
  )
1359
1359
  }
@@ -1361,7 +1361,7 @@ function Ye(e) {
1361
1361
  h
1362
1362
  ] });
1363
1363
  }
1364
- const Ho = {
1364
+ const Go = {
1365
1365
  uuid: "",
1366
1366
  batonUuid: "",
1367
1367
  others: [],
@@ -1388,14 +1388,14 @@ function Ve(e) {
1388
1388
  ]), [f, S] = M([
1389
1389
  null,
1390
1390
  null
1391
- ]), [p, b] = M(""), [D, _] = M(""), [L, P] = M(Le.Linear), [F, k] = M(Le.Linear), [H, X] = M([
1391
+ ]), [p, b] = M(""), [D, T] = M(""), [L, P] = M(Le.Linear), [F, k] = M(Le.Linear), [H, X] = M([
1392
1392
  null,
1393
1393
  null
1394
1394
  ]), [G, C] = M(
1395
1395
  Le.Linear
1396
- ), [I, O] = M("equal"), [Y, ee] = M("Greys"), [ae, $] = Be(), [j, se] = Be(), [ve, we] = M(
1396
+ ), [I, O] = M("equal"), [Y, ee] = M("Greys"), [ae, N] = Be(), [j, se] = Be(), [ve, we] = M(
1397
1397
  /* @__PURE__ */ new Map()
1398
- ), [_e, Z] = M(null), [ye, le] = M(), [pe, B] = M(10), z = J(
1398
+ ), [Te, Z] = M(null), [ye, le] = M(), [pe, B] = M(10), z = J(
1399
1399
  (ne) => le(() => ne),
1400
1400
  [le]
1401
1401
  );
@@ -1404,14 +1404,14 @@ function Ve(e) {
1404
1404
  }, [e.plotConfig.title, i]), R(() => {
1405
1405
  e.plotConfig.xLabel && b(e.plotConfig.xLabel);
1406
1406
  }, [e.plotConfig.xLabel, b]), R(() => {
1407
- e.plotConfig.yLabel && _(e.plotConfig.yLabel);
1408
- }, [e.plotConfig.yLabel, _]), R(() => {
1407
+ e.plotConfig.yLabel && T(e.plotConfig.yLabel);
1408
+ }, [e.plotConfig.yLabel, T]), R(() => {
1409
1409
  e.plotConfig.xScale && P(e.plotConfig.xScale);
1410
1410
  }, [e.plotConfig.xScale, P]), R(() => {
1411
1411
  e.plotConfig.yScale && k(e.plotConfig.yScale);
1412
1412
  }, [e.plotConfig.yScale, k]), R(() => {
1413
- const ne = Object.entries(e.selectionOptions ?? {}), [$e, Ce] = ne[0] ?? [];
1414
- $e !== void 0 && Ce !== void 0 && (r(Gt($e)), d(Ce));
1413
+ const ne = Object.entries(e.selectionOptions ?? {}), [Ne, Ce] = ne[0] ?? [];
1414
+ Ne !== void 0 && Ce !== void 0 && (r(Gt(Ne)), d(Ce));
1415
1415
  }, [e.selectionOptions, r, d]);
1416
1416
  const E = J(
1417
1417
  (ne) => {
@@ -1420,16 +1420,16 @@ function Ve(e) {
1420
1420
  Ce !== void 0 && d(Ce);
1421
1421
  },
1422
1422
  [r, d, e.selectionOptions]
1423
- ), g = N(
1424
- () => e.batonProps ?? Ho,
1423
+ ), g = $(
1424
+ () => e.batonProps ?? Go,
1425
1425
  [e.batonProps]
1426
- ), y = N(
1426
+ ), y = $(
1427
1427
  () => e.xDomain ?? tt,
1428
1428
  [e.xDomain]
1429
- ), x = N(
1429
+ ), x = $(
1430
1430
  () => e.yDomain ?? tt,
1431
1431
  [e.yDomain]
1432
- ), T = N(() => e.domain ?? tt, [e.domain]);
1432
+ ), _ = $(() => e.domain ?? tt, [e.domain]);
1433
1433
  let V = "Line";
1434
1434
  "values" in e ? V = e.heatmapScale ? "Heatmap" : "Image" : "pointValues" in e ? V = "Scatter" : "heightValues" in e && (V = "Surface"), R(() => {
1435
1435
  V !== "Line" && (e.heatmapScale && C(e.heatmapScale), e.surfaceScale && C(e.surfaceScale), e.showPoints !== void 0 && se(e.showPoints), e.aspect !== void 0 && O(e.aspect), e.colourMap && ee(e.colourMap));
@@ -1455,7 +1455,7 @@ function Ve(e) {
1455
1455
  R(() => {
1456
1456
  e.selections && be(e.selections);
1457
1457
  }, [e.selections, be]);
1458
- const yt = N(() => {
1458
+ const yt = $(() => {
1459
1459
  if (gt)
1460
1460
  Re(!1);
1461
1461
  else {
@@ -1469,12 +1469,12 @@ function Ve(e) {
1469
1469
  pt && e.pointSize !== void 0 && B(e.pointSize);
1470
1470
  }, [e.pointSize, pt, B]);
1471
1471
  const bt = J(
1472
- (ne, $e) => {
1472
+ (ne, Ne) => {
1473
1473
  const Ce = new Map(ve);
1474
- Ce.set(ne, { ...$e }), we(Ce);
1474
+ Ce.set(ne, { ...Ne }), we(Ce);
1475
1475
  },
1476
1476
  [ve]
1477
- ), on = N(() => ({
1477
+ ), on = $(() => ({
1478
1478
  showGrid: n,
1479
1479
  toggleShowGrid: t,
1480
1480
  title: o,
@@ -1484,7 +1484,7 @@ function Ve(e) {
1484
1484
  xLabel: p,
1485
1485
  setXLabel: b,
1486
1486
  yLabel: D,
1487
- setYLabel: _,
1487
+ setYLabel: T,
1488
1488
  batonProps: g,
1489
1489
  xScaleType: L,
1490
1490
  setXScaleType: P,
@@ -1496,7 +1496,7 @@ function Ve(e) {
1496
1496
  yDomain: x,
1497
1497
  yCustomDomain: f,
1498
1498
  setYCustomDomain: S,
1499
- dDomain: T,
1499
+ dDomain: _,
1500
1500
  dCustomDomain: H,
1501
1501
  setDCustomDomain: X,
1502
1502
  selectionOptions: e.selectionOptions,
@@ -1511,7 +1511,7 @@ function Ve(e) {
1511
1511
  allLineParams: ve,
1512
1512
  setAllLineParams: we,
1513
1513
  updateLineParams: bt,
1514
- currentLineKey: _e,
1514
+ currentLineKey: Te,
1515
1515
  setCurrentLineKey: Z,
1516
1516
  aspect: I,
1517
1517
  setAspect: O,
@@ -1520,7 +1520,7 @@ function Ve(e) {
1520
1520
  colourMap: Y,
1521
1521
  setColourMap: ee,
1522
1522
  invertColourMap: ae,
1523
- toggleInvertColourMap: $,
1523
+ toggleInvertColourMap: N,
1524
1524
  scatterPointSize: pe,
1525
1525
  setScatterPointSize: B,
1526
1526
  showPoints: j,
@@ -1533,9 +1533,9 @@ function Ve(e) {
1533
1533
  g,
1534
1534
  Oe,
1535
1535
  Y,
1536
- _e,
1536
+ Te,
1537
1537
  H,
1538
- T,
1538
+ _,
1539
1539
  G,
1540
1540
  ye,
1541
1541
  z,
@@ -1553,7 +1553,7 @@ function Ve(e) {
1553
1553
  n,
1554
1554
  j,
1555
1555
  o,
1556
- $,
1556
+ N,
1557
1557
  t,
1558
1558
  se,
1559
1559
  bt,
@@ -1568,10 +1568,10 @@ function Ve(e) {
1568
1568
  ]);
1569
1569
  return /* @__PURE__ */ l(jt.Provider, { value: on, children: e.children });
1570
1570
  }
1571
- const Ko = "_top_cq7uz_1", Uo = "_error_cq7uz_6", qo = "_label_cq7uz_14", nt = {
1572
- top: Ko,
1573
- error: Uo,
1574
- label: qo
1571
+ const Ho = "_top_cq7uz_1", Ko = "_error_cq7uz_6", Uo = "_label_cq7uz_14", nt = {
1572
+ top: Ho,
1573
+ error: Ko,
1574
+ label: Uo
1575
1575
  };
1576
1576
  function q(e) {
1577
1577
  const [n, t] = M(
@@ -1615,7 +1615,7 @@ function q(e) {
1615
1615
  var P;
1616
1616
  h && L.key === "Enter" && b((P = m.current) == null ? void 0 : P.value);
1617
1617
  };
1618
- function _() {
1618
+ function T() {
1619
1619
  t(
1620
1620
  0
1621
1621
  /* PENDING */
@@ -1634,7 +1634,7 @@ function q(e) {
1634
1634
  e.label,
1635
1635
  ":"
1636
1636
  ] }),
1637
- d && /* @__PURE__ */ l("button", { onClick: _, disabled: e.disabled, children: /* @__PURE__ */ l(io, {}) }),
1637
+ d && /* @__PURE__ */ l("button", { onClick: T, disabled: e.disabled, children: /* @__PURE__ */ l(oo, {}) }),
1638
1638
  /* @__PURE__ */ l(
1639
1639
  "input",
1640
1640
  {
@@ -1666,16 +1666,16 @@ function q(e) {
1666
1666
  )
1667
1667
  ] }) });
1668
1668
  }
1669
- const jo = "_modal_ftojl_1", Wo = "_modal_content_ftojl_7", Yo = "_modal_header_ftojl_16", Xo = "_modal_footer_ftojl_17", Zo = "_modal_title_ftojl_22", Qo = "_modal_body_ftojl_26", Jo = "_close_button_ftojl_32", ei = "_aspect_ftojl_38", ti = "_btn_ftojl_44", ce = {
1670
- modal: jo,
1671
- modal_content: Wo,
1672
- modal_header: Yo,
1673
- modal_footer: Xo,
1674
- modal_title: Zo,
1675
- modal_body: Qo,
1676
- close_button: Jo,
1677
- aspect: ei,
1678
- btn: ti
1669
+ const qo = "_modal_ftojl_1", jo = "_modal_content_ftojl_7", Wo = "_modal_header_ftojl_16", Yo = "_modal_footer_ftojl_17", Xo = "_modal_title_ftojl_22", Zo = "_modal_body_ftojl_26", Qo = "_close_button_ftojl_32", Jo = "_aspect_ftojl_38", ei = "_btn_ftojl_44", ce = {
1670
+ modal: qo,
1671
+ modal_content: jo,
1672
+ modal_header: Wo,
1673
+ modal_footer: Yo,
1674
+ modal_title: Xo,
1675
+ modal_body: Zo,
1676
+ close_button: Qo,
1677
+ aspect: Jo,
1678
+ btn: ei
1679
1679
  };
1680
1680
  function Xe(e) {
1681
1681
  const n = Q(null), [t, o] = M(!1);
@@ -1698,7 +1698,7 @@ function Xe(e) {
1698
1698
  Ke,
1699
1699
  {
1700
1700
  label: i,
1701
- icon: e.icon,
1701
+ Icon: e.icon,
1702
1702
  onToggle: () => {
1703
1703
  o(!0);
1704
1704
  },
@@ -1739,10 +1739,10 @@ function Xe(e) {
1739
1739
  ) }) }, i)
1740
1740
  ] }, "Modal-" + i);
1741
1741
  }
1742
- function ni(e) {
1742
+ function ti(e) {
1743
1743
  const { aspect: n, setAspect: t, children: o } = e, i = Q("number"), [s, a] = M(2);
1744
1744
  R(() => {
1745
- const r = _o(n);
1745
+ const r = Mo(n);
1746
1746
  console.log("Set initial type", r, n), i.current = r, a(r === "number" ? n : 2);
1747
1747
  }, [n]);
1748
1748
  function c(r) {
@@ -1792,15 +1792,14 @@ function ni(e) {
1792
1792
  ] })
1793
1793
  });
1794
1794
  }
1795
- const oi = "_root_h18us_1", ii = "_sliderContainer_h18us_8", ai = "_slider_h18us_8", si = "_tools_h18us_27", li = "_toolsInner_h18us_37", je = {
1796
- root: oi,
1797
- sliderContainer: ii,
1798
- slider: ai,
1799
- tools: si,
1800
- toolsInner: li
1795
+ const ni = "_root_h18us_1", oi = "_sliderContainer_h18us_8", ii = "_tools_h18us_27", ai = "_toolsInner_h18us_37", je = {
1796
+ root: ni,
1797
+ sliderContainer: oi,
1798
+ tools: ii,
1799
+ toolsInner: ai
1801
1800
  };
1802
- ao(".3~e");
1803
- function ri(e) {
1801
+ io(".3~e");
1802
+ function si(e) {
1804
1803
  const { id: n, domainProps: t, children: o } = e;
1805
1804
  return /* @__PURE__ */ l(
1806
1805
  "div",
@@ -1816,12 +1815,12 @@ function ri(e) {
1816
1815
  }
1817
1816
  );
1818
1817
  }
1819
- const ci = "domain-tools";
1818
+ const li = "domain-tools";
1820
1819
  function Wt(e) {
1821
- const { dataDomain: n, customDomain: t, scaleType: o } = e, { onCustomDomainChange: i, histogramGetter: s } = e, [a, c] = M(!1), r = fn(t, n), u = N(
1820
+ const { dataDomain: n, customDomain: t, scaleType: o } = e, { onCustomDomainChange: i, histogramGetter: s } = e, [a, c] = M(!1), r = fn(t, n), u = $(
1822
1821
  () => s && s(),
1823
1822
  [s]
1824
- ), d = N(() => a ? t : r, [a, t, r]);
1823
+ ), d = $(() => a ? t : r, [a, t, r]);
1825
1824
  R(() => {
1826
1825
  a || i(n);
1827
1826
  }, [n, a, i]);
@@ -1833,9 +1832,9 @@ function Wt(e) {
1833
1832
  R(() => {
1834
1833
  S(r);
1835
1834
  }, [r]);
1836
- const p = d[0] === null, b = d[1] === null, [D, _] = Be(!1), [L, P] = Be(!1), F = D || L;
1835
+ const p = d[0] === null, b = d[1] === null, [D, T] = Be(!1), [L, P] = Be(!1), F = D || L;
1837
1836
  function k(C) {
1838
- _(C), P(C);
1837
+ T(C), P(C);
1839
1838
  }
1840
1839
  function H() {
1841
1840
  F && k(!1);
@@ -1852,7 +1851,7 @@ function Wt(e) {
1852
1851
  isAutoMax: b,
1853
1852
  onAutoMinToggle: () => {
1854
1853
  const C = p ? n[0] : null;
1855
- i([C, d[1]]), p || _(!1);
1854
+ i([C, d[1]]), p || T(!1);
1856
1855
  },
1857
1856
  onAutoMaxToggle: () => {
1858
1857
  const C = b ? n[1] : null;
@@ -1860,7 +1859,7 @@ function Wt(e) {
1860
1859
  },
1861
1860
  isEditingMin: D,
1862
1861
  isEditingMax: L,
1863
- onEditMin: _,
1862
+ onEditMin: T,
1864
1863
  onEditMax: P,
1865
1864
  onChangeMin: (C) => i([C, d[1]]),
1866
1865
  onChangeMax: (C) => i([d[0], C]),
@@ -1888,7 +1887,7 @@ function Wt(e) {
1888
1887
  }
1889
1888
  }
1890
1889
  ) }),
1891
- /* @__PURE__ */ l(ri, { id: ci, domainProps: G, children: u && /* @__PURE__ */ l(
1890
+ /* @__PURE__ */ l(si, { id: li, domainProps: G, children: u && /* @__PURE__ */ l(
1892
1891
  pn,
1893
1892
  {
1894
1893
  dataDomain: n,
@@ -1977,13 +1976,13 @@ function ot(e) {
1977
1976
  ] })
1978
1977
  });
1979
1978
  }
1980
- function ui(e) {
1981
- const { batonUuid: n, uuid: t, others: o, hasBaton: i, offerBaton: s, requestBaton: a } = e, c = n + "*", r = N(() => i ? o.map((u) => /* @__PURE__ */ l("div", { title: "Pass baton on", children: /* @__PURE__ */ l(Ue, { label: u, onClick: () => s(u) }, u) }, u)) : o.map(
1979
+ function ri(e) {
1980
+ const { batonUuid: n, uuid: t, others: o, hasBaton: i, offerBaton: s, requestBaton: a } = e, c = n + "*", r = $(() => i ? o.map((u) => /* @__PURE__ */ l("div", { title: "Pass baton on", children: /* @__PURE__ */ l(Ue, { label: u, onClick: () => s(u) }, u) }, u)) : o.map(
1982
1981
  (u) => n == u ? /* @__PURE__ */ l("div", { title: "Request baton", children: /* @__PURE__ */ l(Ue, { label: c, onClick: () => a() }) }, n) : /* @__PURE__ */ l("p", { children: u }, u)
1983
1982
  ), [c, n, i, s, o, a]);
1984
1983
  return Xe({
1985
1984
  title: "Baton info",
1986
- icon: so,
1985
+ icon: ao,
1987
1986
  hideToggle: !t,
1988
1987
  children: /* @__PURE__ */ v("div", { style: { lineHeight: "80%", width: "10em" }, children: [
1989
1988
  /* @__PURE__ */ l("p", { children: /* @__PURE__ */ v("strong", { children: [
@@ -2002,7 +2001,7 @@ function ui(e) {
2002
2001
  ] })
2003
2002
  });
2004
2003
  }
2005
- function di(e) {
2004
+ function ci(e) {
2006
2005
  function n() {
2007
2006
  e.updateSelection && e.updateSelection(null, !1, !0), e.updateCurrentSelectionID(null);
2008
2007
  }
@@ -2017,7 +2016,7 @@ function di(e) {
2017
2016
  }
2018
2017
  );
2019
2018
  }
2020
- function hi(e) {
2019
+ function ui(e) {
2021
2020
  const { value: n, onModeChange: t, hasBaton: o, canSelect: i } = e;
2022
2021
  return R(() => {
2023
2022
  !o && n === oe.selectRegion && t(oe.panAndWheelZoom);
@@ -2036,7 +2035,7 @@ function hi(e) {
2036
2035
  "pan & wheel zoom%0A alt: x-only%0A shift: y-only"
2037
2036
  ),
2038
2037
  iconOnly: !0,
2039
- icon: Yn,
2038
+ icon: Wn,
2040
2039
  value: oe.panAndWheelZoom
2041
2040
  }
2042
2041
  ),
@@ -2045,7 +2044,7 @@ function hi(e) {
2045
2044
  {
2046
2045
  label: decodeURI("select to zoom%0A alt: x-only%0A shift: y-only"),
2047
2046
  iconOnly: !0,
2048
- icon: Xn,
2047
+ icon: Yn,
2049
2048
  value: oe.selectToZoom
2050
2049
  }
2051
2050
  ),
@@ -2062,7 +2061,7 @@ function hi(e) {
2062
2061
  {
2063
2062
  label: "select region",
2064
2063
  iconOnly: !0,
2065
- icon: lo,
2064
+ icon: so,
2066
2065
  value: oe.selectRegion,
2067
2066
  disabled: !o
2068
2067
  }
@@ -2073,16 +2072,14 @@ function hi(e) {
2073
2072
  }
2074
2073
  ) });
2075
2074
  }
2076
- const mi = "_modeless_1im3t_1", fi = "_modeless_content_1im3t_7", gi = "_modeless_header_1im3t_16", yi = "_modeless_footer_1im3t_17", pi = "_modeless_title_1im3t_22", bi = "_modeless_body_1im3t_26", Si = "_close_button_1im3t_34", vi = "_aspect_1im3t_40", Ci = "_btn_1im3t_46", De = {
2077
- modeless: mi,
2078
- modeless_content: fi,
2079
- modeless_header: gi,
2080
- modeless_footer: yi,
2081
- modeless_title: pi,
2082
- modeless_body: bi,
2083
- close_button: Si,
2084
- aspect: vi,
2085
- btn: Ci
2075
+ const di = "_modeless_1im3t_1", hi = "_modeless_content_1im3t_7", mi = "_modeless_header_1im3t_16", fi = "_modeless_footer_1im3t_17", gi = "_modeless_title_1im3t_22", yi = "_modeless_body_1im3t_26", pi = "_close_button_1im3t_34", De = {
2076
+ modeless: di,
2077
+ modeless_content: hi,
2078
+ modeless_header: mi,
2079
+ modeless_footer: fi,
2080
+ modeless_title: gi,
2081
+ modeless_body: yi,
2082
+ close_button: pi
2086
2083
  };
2087
2084
  function Yt(e) {
2088
2085
  const n = Q(null);
@@ -2125,10 +2122,10 @@ function Yt(e) {
2125
2122
  }
2126
2123
  ) }, e.title) : null];
2127
2124
  }
2128
- const xi = "_colourLabel_1evqd_1", Xt = {
2129
- colourLabel: xi
2125
+ const bi = "_colourLabel_1evqd_1", Xt = {
2126
+ colourLabel: bi
2130
2127
  };
2131
- function Pi(e) {
2128
+ function Si(e) {
2132
2129
  const n = e.value ?? "Circle", t = e.onGlyphTypeChange, o = e.hasBaton;
2133
2130
  return /* @__PURE__ */ l(te, { children: /* @__PURE__ */ v(
2134
2131
  W,
@@ -2143,7 +2140,7 @@ function Pi(e) {
2143
2140
  {
2144
2141
  label: "Circle",
2145
2142
  iconOnly: !0,
2146
- icon: ro,
2143
+ icon: lo,
2147
2144
  value: "Circle",
2148
2145
  disabled: !o
2149
2146
  }
@@ -2153,7 +2150,7 @@ function Pi(e) {
2153
2150
  {
2154
2151
  label: "Cross",
2155
2152
  iconOnly: !0,
2156
- icon: co,
2153
+ icon: ro,
2157
2154
  value: "Cross",
2158
2155
  disabled: !o
2159
2156
  }
@@ -2163,7 +2160,7 @@ function Pi(e) {
2163
2160
  {
2164
2161
  label: "Square",
2165
2162
  iconOnly: !0,
2166
- icon: uo,
2163
+ icon: co,
2167
2164
  value: "Square",
2168
2165
  disabled: !o
2169
2166
  }
@@ -2192,7 +2189,7 @@ function Pi(e) {
2192
2189
  }
2193
2190
  ) });
2194
2191
  }
2195
- function wi(e) {
2192
+ function vi(e) {
2196
2193
  const { currentLineKey: n, allLineParams: t, updateLineParams: o, hasBaton: i } = e;
2197
2194
  console.log("currentLineKey is ", n);
2198
2195
  const s = [];
@@ -2264,7 +2261,7 @@ function wi(e) {
2264
2261
  )
2265
2262
  ), s.push(
2266
2263
  /* @__PURE__ */ l(
2267
- Pi,
2264
+ Si,
2268
2265
  {
2269
2266
  value: a.glyphType,
2270
2267
  onGlyphTypeChange: (r) => {
@@ -2302,7 +2299,7 @@ function wi(e) {
2302
2299
  children: s
2303
2300
  });
2304
2301
  }
2305
- function Di(e) {
2302
+ function Ci(e) {
2306
2303
  const { allLineParams: n, lineKey: t, onLineKeyChange: o } = e, i = [...n.keys()];
2307
2304
  function s() {
2308
2305
  t === "" && i.length > 0 && o(i[0]);
@@ -2334,7 +2331,7 @@ function Di(e) {
2334
2331
  })
2335
2332
  );
2336
2333
  return /* @__PURE__ */ l(
2337
- $t,
2334
+ Nt,
2338
2335
  {
2339
2336
  styles: d,
2340
2337
  value: {
@@ -2352,24 +2349,24 @@ function Di(e) {
2352
2349
  }
2353
2350
  );
2354
2351
  }
2355
- const Mi = "_option_1qhtz_1", _i = "_icon_1qhtz_6", Lt = {
2356
- option: Mi,
2357
- icon: _i
2358
- }, Ti = {
2352
+ const xi = "_option_1qhtz_1", Pi = "_icon_1qhtz_6", Lt = {
2353
+ option: xi,
2354
+ icon: Pi
2355
+ }, wi = {
2359
2356
  [U.line]: {
2360
2357
  Icon: Rn,
2361
2358
  label: "Line"
2362
2359
  },
2363
2360
  [U.rectangle]: {
2364
- Icon: Un,
2361
+ Icon: qn,
2365
2362
  label: "Rectangle"
2366
2363
  },
2367
2364
  [U.polyline]: {
2368
- Icon: qn,
2365
+ Icon: Un,
2369
2366
  label: "Polyline"
2370
2367
  },
2371
2368
  [U.polygon]: {
2372
- Icon: Zn,
2369
+ Icon: Jn,
2373
2370
  label: "Polygon"
2374
2371
  },
2375
2372
  [U.circle]: {
@@ -2377,11 +2374,11 @@ const Mi = "_option_1qhtz_1", _i = "_icon_1qhtz_6", Lt = {
2377
2374
  label: "Circle"
2378
2375
  },
2379
2376
  [U.ellipse]: {
2380
- Icon: Jn,
2377
+ Icon: Zn,
2381
2378
  label: "Ellipse"
2382
2379
  },
2383
2380
  [U.sector]: {
2384
- Icon: fo,
2381
+ Icon: mo,
2385
2382
  label: "Sector"
2386
2383
  },
2387
2384
  [U.horizontalAxis]: {
@@ -2389,22 +2386,22 @@ const Mi = "_option_1qhtz_1", _i = "_icon_1qhtz_6", Lt = {
2389
2386
  label: "Horizontal Axis"
2390
2387
  },
2391
2388
  [U.verticalAxis]: {
2392
- Icon: mo,
2389
+ Icon: uo,
2393
2390
  label: "Vertical Axis"
2394
2391
  },
2395
2392
  [U.unknown]: {
2396
- Icon: eo,
2393
+ Icon: Xn,
2397
2394
  label: "Unknown"
2398
2395
  }
2399
2396
  };
2400
- function Li(e) {
2401
- const { option: n } = e, { Icon: t, label: o } = Ti[n];
2397
+ function Di(e) {
2398
+ const { option: n } = e, { Icon: t, label: o } = wi[n];
2402
2399
  return /* @__PURE__ */ v("div", { className: Lt.option, children: [
2403
2400
  /* @__PURE__ */ l(t, { className: Lt.icon }),
2404
2401
  /* @__PURE__ */ l("span", { children: o })
2405
2402
  ] });
2406
2403
  }
2407
- function ki(e) {
2404
+ function Mi(e) {
2408
2405
  const {
2409
2406
  value: n,
2410
2407
  onSelectionTypeChange: t,
@@ -2424,7 +2421,7 @@ function ki(e) {
2424
2421
  value: n,
2425
2422
  onChange: t,
2426
2423
  options: i,
2427
- renderOption: (s) => /* @__PURE__ */ l(Li, { option: s }),
2424
+ renderOption: (s) => /* @__PURE__ */ l(Di, { option: s }),
2428
2425
  disabled: o
2429
2426
  }
2430
2427
  );
@@ -2481,7 +2478,7 @@ function ft(e) {
2481
2478
  "y"
2482
2479
  );
2483
2480
  }
2484
- function Ai(e) {
2481
+ function Ti(e) {
2485
2482
  const { i: n, point: t, updatePoint: o, disabled: i } = e, s = `x${n}`;
2486
2483
  return /* @__PURE__ */ l(
2487
2484
  q,
@@ -2498,7 +2495,7 @@ function Ai(e) {
2498
2495
  s
2499
2496
  );
2500
2497
  }
2501
- function Vi(e) {
2498
+ function _i(e) {
2502
2499
  const { i: n, point: t, updatePoint: o, disabled: i } = e, s = `y${n}`;
2503
2500
  return /* @__PURE__ */ l(
2504
2501
  q,
@@ -2515,7 +2512,7 @@ function Vi(e) {
2515
2512
  s
2516
2513
  );
2517
2514
  }
2518
- function Ii(e) {
2515
+ function Li(e) {
2519
2516
  const { selection: n, updateSelection: t, disabled: o } = e;
2520
2517
  return n.dimension === 0 ? /* @__PURE__ */ v(Se, { children: [
2521
2518
  /* @__PURE__ */ l(
@@ -2567,7 +2564,7 @@ function Ii(e) {
2567
2564
  )
2568
2565
  ] }, "axis y");
2569
2566
  }
2570
- function Oi(e) {
2567
+ function ki(e) {
2571
2568
  const { selection: n, updateSelection: t, disabled: o } = e;
2572
2569
  return /* @__PURE__ */ v(Se, { children: [
2573
2570
  /* @__PURE__ */ l(
@@ -2613,7 +2610,7 @@ function Oi(e) {
2613
2610
  )
2614
2611
  ] }, "line");
2615
2612
  }
2616
- function $i(e) {
2613
+ function Ai(e) {
2617
2614
  const { selection: n, updateSelection: t, disabled: o } = e;
2618
2615
  return /* @__PURE__ */ v(Se, { children: [
2619
2616
  /* @__PURE__ */ l(
@@ -2673,17 +2670,17 @@ function $i(e) {
2673
2670
  )
2674
2671
  ] }, "rectangle");
2675
2672
  }
2676
- const Ni = "_scrollContainer_a4950_1", Fi = {
2677
- scrollContainer: Ni
2673
+ const Vi = "_scrollContainer_a4950_1", Ii = {
2674
+ scrollContainer: Vi
2678
2675
  };
2679
- function Bi(e) {
2676
+ function Oi(e) {
2680
2677
  const { selection: n, updateSelection: t, disabled: o } = e;
2681
2678
  function i(a, c) {
2682
2679
  n.points[c] = a, t && t(n);
2683
2680
  }
2684
2681
  const s = n.points.map((a, c) => [
2685
2682
  /* @__PURE__ */ l(
2686
- Ai,
2683
+ Ti,
2687
2684
  {
2688
2685
  i: c,
2689
2686
  point: a,
@@ -2693,7 +2690,7 @@ function Bi(e) {
2693
2690
  `px${c}${a[0]}`
2694
2691
  ),
2695
2692
  /* @__PURE__ */ l(
2696
- Vi,
2693
+ _i,
2697
2694
  {
2698
2695
  i: c,
2699
2696
  point: a,
@@ -2703,7 +2700,7 @@ function Bi(e) {
2703
2700
  `py${c}${a[1]}`
2704
2701
  )
2705
2702
  ]);
2706
- return /* @__PURE__ */ l("div", { className: Fi.scrollContainer, children: s.flat() }, "polygon");
2703
+ return /* @__PURE__ */ l("div", { className: Ii.scrollContainer, children: s.flat() }, "polygon");
2707
2704
  }
2708
2705
  const st = {
2709
2706
  line: "—",
@@ -2717,7 +2714,7 @@ const st = {
2717
2714
  verticalAxis: "↕",
2718
2715
  unknown: " "
2719
2716
  };
2720
- function zi(e) {
2717
+ function Ni(e) {
2721
2718
  const {
2722
2719
  currentSelectionID: n,
2723
2720
  updateCurrentSelectionID: t,
@@ -2813,25 +2810,25 @@ function zi(e) {
2813
2810
  `Alpha${a.alpha}`
2814
2811
  )
2815
2812
  ), de.isShape(d) ? u.push(
2816
- Ii({
2813
+ Li({
2817
2814
  selection: d,
2818
2815
  updateSelection: i,
2819
2816
  disabled: h
2820
2817
  })
2821
2818
  ) : he.isShape(d) ? u.push(
2822
- Oi({
2819
+ ki({
2823
2820
  selection: d,
2824
2821
  updateSelection: i,
2825
2822
  disabled: h
2826
2823
  })
2827
2824
  ) : me.isShape(d) ? u.push(
2828
- $i({
2825
+ Ai({
2829
2826
  selection: d,
2830
2827
  updateSelection: i,
2831
2828
  disabled: h
2832
2829
  })
2833
2830
  ) : ie.isShape(d) && u.push(
2834
- Bi({
2831
+ Oi({
2835
2832
  selection: d,
2836
2833
  updateSelection: i,
2837
2834
  disabled: h
@@ -2857,7 +2854,7 @@ function zi(e) {
2857
2854
  children: u
2858
2855
  });
2859
2856
  }
2860
- function Ei(e) {
2857
+ function $i(e) {
2861
2858
  const {
2862
2859
  selectionID: n,
2863
2860
  onSelectionIDChange: t,
@@ -2881,17 +2878,17 @@ function Ei(e) {
2881
2878
  }, c = o.map(
2882
2879
  (r) => ({
2883
2880
  value: r,
2884
- label: _t(e.selections, r, st),
2881
+ label: Tt(e.selections, r, st),
2885
2882
  bgcolour: s(r)
2886
2883
  })
2887
2884
  );
2888
2885
  return /* @__PURE__ */ l(
2889
- $t,
2886
+ Nt,
2890
2887
  {
2891
2888
  styles: a,
2892
2889
  value: {
2893
2890
  value: n,
2894
- label: _t(
2891
+ label: Tt(
2895
2892
  e.selections,
2896
2893
  n,
2897
2894
  st
@@ -2905,7 +2902,7 @@ function Ei(e) {
2905
2902
  }
2906
2903
  );
2907
2904
  }
2908
- function Ri(e) {
2905
+ function Fi(e) {
2909
2906
  return Xe({
2910
2907
  title: "Set title",
2911
2908
  icon: Gn,
@@ -2920,28 +2917,28 @@ function Ri(e) {
2920
2917
  )
2921
2918
  });
2922
2919
  }
2923
- function Gi(e) {
2920
+ function Bi(e) {
2924
2921
  const { children: n } = e, t = Ae(), { plotType: o, updateSelection: i } = t, { selections: s, canSelect: a, setCurrentLineKey: c } = t, [r, u] = M(
2925
2922
  null
2926
- ), d = N(() => a && s.length > 0 ? s[s.length - 1].id : null, [a, s]);
2923
+ ), d = $(() => a && s.length > 0 ? s[s.length - 1].id : null, [a, s]);
2927
2924
  R(() => {
2928
2925
  d && r === null && (console.log("Setting first selection", d), u(d));
2929
2926
  }, [d, r]);
2930
2927
  const [h, m] = M(!1), [f, S] = M(!1), p = t.batonProps.hasBaton, b = a && p;
2931
2928
  R(() => {
2932
2929
  if (a) {
2933
- if (s.map(($) => Go($)), r === null) {
2930
+ if (s.map((N) => Ro(N)), r === null) {
2934
2931
  if (s.length > 0) {
2935
- const $ = s[s.length - 1];
2936
- console.log("Setting current selection", $.id), u($.id), h && Tt($);
2932
+ const N = s[s.length - 1];
2933
+ console.log("Setting current selection", N.id), u(N.id), h && _t(N);
2937
2934
  }
2938
2935
  } else if (h) {
2939
- const $ = s.find((j) => j.id === r);
2940
- $ && Tt($);
2936
+ const N = s.find((j) => j.id === r);
2937
+ N && _t(N);
2941
2938
  }
2942
2939
  }
2943
2940
  }, [a, r, s, h]);
2944
- const D = o === "Line", _ = o === "Heatmap", L = _ || o === "Image", P = o === "Surface", F = o === "Scatter", k = F || _ || P, H = [
2941
+ const D = o === "Line", T = o === "Heatmap", L = T || o === "Image", P = o === "Surface", F = o === "Scatter", k = F || T || P, H = [
2945
2942
  ot({
2946
2943
  title: "X axis",
2947
2944
  icon: to,
@@ -2966,38 +2963,37 @@ function Gi(e) {
2966
2963
  customDomain: t.yCustomDomain,
2967
2964
  setCustomDomain: t.setYCustomDomain
2968
2965
  }),
2969
- ni({
2966
+ ti({
2970
2967
  aspect: t.aspect,
2971
2968
  setAspect: t.setAspect,
2972
2969
  hideToggle: !L
2973
2970
  }),
2974
- Ri({
2971
+ Fi({
2975
2972
  label: t.title,
2976
2973
  setLabel: t.setTitle
2977
2974
  })
2978
- ], X = zi({
2975
+ ], X = Ni({
2979
2976
  selections: s,
2980
2977
  updateSelection: i,
2981
2978
  currentSelectionID: r,
2982
2979
  updateCurrentSelectionID: u,
2983
- icon: jn,
2984
2980
  domain: t.dDomain,
2985
2981
  customDomain: t.dCustomDomain,
2986
2982
  showSelectionConfig: h,
2987
2983
  updateShowSelectionConfig: m,
2988
2984
  hasBaton: b
2989
- }), G = [], C = N(() => {
2990
- const $ = t.selectionOptions;
2991
- if ($ !== void 0)
2992
- return Object.keys($).map((j) => Gt(j));
2985
+ }), G = [], C = $(() => {
2986
+ const N = t.selectionOptions;
2987
+ if (N !== void 0)
2988
+ return Object.keys(N).map((j) => Gt(j));
2993
2989
  }, [t.selectionOptions]), I = C === void 0 || C.length !== 0;
2994
2990
  if (a && t.selectionType !== void 0) {
2995
- let $ = t.selectionType;
2996
- $ === U.unknown && C === void 0 && ($ = U.line), I && G.push(
2991
+ let N = t.selectionType;
2992
+ N === U.unknown && C === void 0 && (N = U.line), I && G.push(
2997
2993
  /* @__PURE__ */ l(
2998
- ki,
2994
+ Mi,
2999
2995
  {
3000
- value: $,
2996
+ value: N,
3001
2997
  onSelectionTypeChange: t.setSelectionType,
3002
2998
  disabled: t.mode !== oe.selectRegion,
3003
2999
  options: C
@@ -3006,7 +3002,7 @@ function Gi(e) {
3006
3002
  )
3007
3003
  );
3008
3004
  }
3009
- const O = t.allLineParams, Y = wi({
3005
+ const O = t.allLineParams, Y = vi({
3010
3006
  allLineParams: O,
3011
3007
  updateLineParams: t.updateLineParams,
3012
3008
  currentLineKey: t.currentLineKey,
@@ -3019,7 +3015,7 @@ function Gi(e) {
3019
3015
  Ke,
3020
3016
  {
3021
3017
  label: "show points",
3022
- icon: oo,
3018
+ Icon: eo,
3023
3019
  iconOnly: !0,
3024
3020
  value: t.showPoints,
3025
3021
  onToggle: t.toggleShowPoints,
@@ -3051,22 +3047,22 @@ function Gi(e) {
3051
3047
  Ke,
3052
3048
  {
3053
3049
  label: "Grid toggle",
3054
- icon: Wn,
3050
+ Icon: jn,
3055
3051
  value: t.showGrid,
3056
3052
  onToggle: t.toggleShowGrid
3057
3053
  },
3058
3054
  "Grid toggle"
3059
3055
  )
3060
- ), H.push(ui({ ...t.batonProps }));
3056
+ ), H.push(ri({ ...t.batonProps }));
3061
3057
  const ee = J(
3062
- ($) => {
3063
- O.has($) && c($), S(!0);
3058
+ (N) => {
3059
+ O.has(N) && c(N), S(!0);
3064
3060
  },
3065
3061
  [O, c]
3066
3062
  );
3067
3063
  O.size && (console.log("Add line key dropdown", [...O.keys()]), H.push(
3068
3064
  /* @__PURE__ */ l(
3069
- Di,
3065
+ Ci,
3070
3066
  {
3071
3067
  allLineParams: O,
3072
3068
  lineKey: t.currentLineKey,
@@ -3076,17 +3072,17 @@ function Gi(e) {
3076
3072
  )
3077
3073
  ));
3078
3074
  const ae = J(
3079
- ($) => {
3075
+ (N) => {
3080
3076
  if (a) {
3081
- const j = s.find((se) => se.id === $);
3082
- j !== void 0 && (u($), a && i(j)), m(!0);
3077
+ const j = s.find((se) => se.id === N);
3078
+ j !== void 0 && (u(N), a && i(j)), m(!0);
3083
3079
  }
3084
3080
  },
3085
3081
  [a, s, i]
3086
3082
  );
3087
3083
  return a && s.length > 0 && (H.push(
3088
3084
  /* @__PURE__ */ l(
3089
- Ei,
3085
+ $i,
3090
3086
  {
3091
3087
  selections: s,
3092
3088
  selectionID: r,
@@ -3096,7 +3092,7 @@ function Gi(e) {
3096
3092
  )
3097
3093
  ), H.push(
3098
3094
  /* @__PURE__ */ l(
3099
- di,
3095
+ ci,
3100
3096
  {
3101
3097
  updateSelection: i,
3102
3098
  updateCurrentSelectionID: u,
@@ -3106,7 +3102,7 @@ function Gi(e) {
3106
3102
  )
3107
3103
  )), /* @__PURE__ */ v(rt, { overflowChildren: H, children: [
3108
3104
  /* @__PURE__ */ l(
3109
- hi,
3105
+ ui,
3110
3106
  {
3111
3107
  value: t.mode,
3112
3108
  onModeChange: t.setMode,
@@ -3123,7 +3119,7 @@ function Gi(e) {
3123
3119
  ] });
3124
3120
  }
3125
3121
  function Ie(e) {
3126
- return e.children !== null && (e.children === void 0 ? /* @__PURE__ */ l(Gi, { children: e.extraChildren }) : /* @__PURE__ */ l(rt, { children: e.children }));
3122
+ return e.children !== null && (e.children === void 0 ? /* @__PURE__ */ l(Bi, { children: e.extraChildren }) : /* @__PURE__ */ l(rt, { children: e.children }));
3127
3123
  }
3128
3124
  function Qt({ xValues: e, yValues: n, values: t }) {
3129
3125
  const {
@@ -3142,19 +3138,19 @@ function Qt({ xValues: e, yValues: n, values: t }) {
3142
3138
  dDomain: p,
3143
3139
  dCustomDomain: b,
3144
3140
  colourMap: D,
3145
- invertColourMap: _,
3141
+ invertColourMap: T,
3146
3142
  dScaleType: L,
3147
3143
  updateHistogramGetter: P
3148
3144
  } = Ae(), F = We(c);
3149
3145
  return R(() => {
3150
- P(() => ut(t.data, p, D, _));
3151
- }, [t.data, p, D, _, P]), /* @__PURE__ */ l(
3146
+ P(() => ut(t.data, p, D, T));
3147
+ }, [t.data, p, D, T, P]), /* @__PURE__ */ l(
3152
3148
  wn,
3153
3149
  {
3154
3150
  dataArray: t,
3155
3151
  domain: ze(b, p),
3156
3152
  colorMap: D,
3157
- invertColorMap: _,
3153
+ invertColorMap: T,
3158
3154
  scaleType: L,
3159
3155
  aspect: r,
3160
3156
  showGrid: i,
@@ -3184,7 +3180,7 @@ function Qt({ xValues: e, yValues: n, values: t }) {
3184
3180
  }
3185
3181
  );
3186
3182
  }
3187
- function Ta(e) {
3183
+ function wa(e) {
3188
3184
  return /* @__PURE__ */ l(
3189
3185
  "div",
3190
3186
  {
@@ -3253,7 +3249,7 @@ function Jt({ xValues: e, yValues: n, values: t }) {
3253
3249
  }
3254
3250
  );
3255
3251
  }
3256
- function La(e) {
3252
+ function Da(e) {
3257
3253
  return /* @__PURE__ */ l(
3258
3254
  "div",
3259
3255
  {
@@ -3275,7 +3271,7 @@ function La(e) {
3275
3271
  }
3276
3272
  );
3277
3273
  }
3278
- function Hi(e, n, t) {
3274
+ function zi(e, n, t) {
3279
3275
  const o = [
3280
3276
  "rgb(0, 0, 0)",
3281
3277
  // #000000, black
@@ -3330,10 +3326,10 @@ function en(e) {
3330
3326
  batonProps: p,
3331
3327
  canSelect: b,
3332
3328
  selectionMax: D,
3333
- selectionType: _,
3329
+ selectionType: T,
3334
3330
  updateSelection: L,
3335
3331
  selections: P
3336
- } = Ae(), F = e.lineData, k = N(() => {
3332
+ } = Ae(), F = e.lineData, k = $(() => {
3337
3333
  const I = /* @__PURE__ */ new Map();
3338
3334
  return F.forEach((O) => {
3339
3335
  I.set(O.key, O.lineParams);
@@ -3350,7 +3346,7 @@ function en(e) {
3350
3346
  I.toPrecision(8),
3351
3347
  ", ",
3352
3348
  O.toPrecision(8)
3353
- ] }), G = N(() => ze(o, i), [o, i]), C = N(() => ze(c, r), [c, r]);
3349
+ ] }), G = $(() => ze(o, i), [o, i]), C = $(() => ze(c, r), [c, r]);
3354
3350
  return /* @__PURE__ */ v(
3355
3351
  Mn,
3356
3352
  {
@@ -3370,12 +3366,12 @@ function en(e) {
3370
3366
  nice: !0
3371
3367
  },
3372
3368
  children: [
3373
- /* @__PURE__ */ l(_n, { ...H }),
3369
+ /* @__PURE__ */ l(Tn, { ...H }),
3374
3370
  F.map((I, O) => {
3375
3371
  const Y = (k == null ? void 0 : k.get(I.key)) ?? I.lineParams;
3376
- return Hi(I, Y, O);
3372
+ return zi(I, Y, O);
3377
3373
  }),
3378
- /* @__PURE__ */ l(Tn, { renderTooltip: X }),
3374
+ /* @__PURE__ */ l(_n, { renderTooltip: X }),
3379
3375
  /* @__PURE__ */ l(Ln, {}),
3380
3376
  b && /* @__PURE__ */ l(
3381
3377
  Ye,
@@ -3384,7 +3380,7 @@ function en(e) {
3384
3380
  batonProps: p,
3385
3381
  disabled: h !== oe.selectRegion,
3386
3382
  selectionMax: D,
3387
- selectionType: _,
3383
+ selectionType: T,
3388
3384
  updateSelection: L,
3389
3385
  selections: P
3390
3386
  }
@@ -3393,7 +3389,7 @@ function en(e) {
3393
3389
  }
3394
3390
  );
3395
3391
  }
3396
- function ka(e) {
3392
+ function Ma(e) {
3397
3393
  return /* @__PURE__ */ l(
3398
3394
  "div",
3399
3395
  {
@@ -3425,20 +3421,20 @@ function tn({ x: e, y: n, values: t }) {
3425
3421
  selections: p,
3426
3422
  dDomain: b,
3427
3423
  dCustomDomain: D,
3428
- colourMap: _,
3424
+ colourMap: T,
3429
3425
  invertColourMap: L,
3430
3426
  dScaleType: P,
3431
3427
  scatterPointSize: F,
3432
3428
  updateHistogramGetter: k
3433
3429
  } = Ae(), H = We(u);
3434
3430
  return R(() => {
3435
- k(() => ut(t.data, b, _, L));
3436
- }, [t.data, b, _, L, k]), /* @__PURE__ */ l(
3431
+ k(() => ut(t.data, b, T, L));
3432
+ }, [t.data, b, T, L, k]), /* @__PURE__ */ l(
3437
3433
  Vn,
3438
3434
  {
3439
3435
  dataArray: t,
3440
3436
  domain: ze(D, b),
3441
- colorMap: _,
3437
+ colorMap: T,
3442
3438
  invertColorMap: L,
3443
3439
  scaleType: P,
3444
3440
  showGrid: i,
@@ -3470,7 +3466,7 @@ function tn({ x: e, y: n, values: t }) {
3470
3466
  }
3471
3467
  );
3472
3468
  }
3473
- function Aa(e) {
3469
+ function Ta(e) {
3474
3470
  return /* @__PURE__ */ l(
3475
3471
  "div",
3476
3472
  {
@@ -3494,7 +3490,7 @@ function nn(e) {
3494
3490
  dScaleType: c,
3495
3491
  showPoints: r,
3496
3492
  updateHistogramGetter: u
3497
- } = Ae(), d = N(
3493
+ } = Ae(), d = $(
3498
3494
  () => ze(i, o),
3499
3495
  [i, o]
3500
3496
  );
@@ -3510,13 +3506,13 @@ function nn(e) {
3510
3506
  scaleType: c,
3511
3507
  showPoints: r,
3512
3508
  children: [
3513
- /* @__PURE__ */ l(go, {}),
3509
+ /* @__PURE__ */ l(fo, {}),
3514
3510
  t
3515
3511
  ]
3516
3512
  }
3517
3513
  );
3518
3514
  }
3519
- function Va(e) {
3515
+ function _a(e) {
3520
3516
  return /* @__PURE__ */ l(
3521
3517
  "div",
3522
3518
  {
@@ -3531,7 +3527,7 @@ function Va(e) {
3531
3527
  }
3532
3528
  );
3533
3529
  }
3534
- function Ki(e) {
3530
+ function Ei(e) {
3535
3531
  var f, S;
3536
3532
  function n(p, b) {
3537
3533
  const D = p === "standard";
@@ -3612,7 +3608,7 @@ function Ki(e) {
3612
3608
  /* @__PURE__ */ l(ke, {})
3613
3609
  ] }),
3614
3610
  /* @__PURE__ */ l(
3615
- $n,
3611
+ Nn,
3616
3612
  {
3617
3613
  cellWidth: a ?? d,
3618
3614
  dims: e.cellValues.shape,
@@ -3623,7 +3619,7 @@ function Ki(e) {
3623
3619
  }
3624
3620
  );
3625
3621
  }
3626
- function Ui(e) {
3622
+ function Ri(e) {
3627
3623
  let n = null;
3628
3624
  return "lineData" in e && e.lineData.length !== 0 ? n = /* @__PURE__ */ l(en, { lineData: e.lineData }) : "values" in e ? "heatmapScale" in e ? n = /* @__PURE__ */ l(
3629
3625
  Qt,
@@ -3641,11 +3637,11 @@ function Ui(e) {
3641
3637
  }
3642
3638
  ) : "heightValues" in e ? n = /* @__PURE__ */ l(nn, { values: e.heightValues }) : "pointValues" in e && (n = /* @__PURE__ */ l(tn, { x: e.x, y: e.y, values: e.pointValues })), n;
3643
3639
  }
3644
- function qi(e) {
3640
+ function Gi(e) {
3645
3641
  const n = Q(0), t = Et();
3646
3642
  return At(() => {
3647
3643
  n.current = t.end();
3648
- }), "cellWidth" in e ? /* @__PURE__ */ l(Ki, { ...e }) : /* @__PURE__ */ l(
3644
+ }), "cellWidth" in e ? /* @__PURE__ */ l(Ei, { ...e }) : /* @__PURE__ */ l(
3649
3645
  "div",
3650
3646
  {
3651
3647
  style: {
@@ -3654,7 +3650,7 @@ function qi(e) {
3654
3650
  },
3655
3651
  children: /* @__PURE__ */ v(Ve, { ...e, children: [
3656
3652
  /* @__PURE__ */ l(Ie, { children: e.customToolbarChildren }),
3657
- /* @__PURE__ */ l(Ui, { ...e })
3653
+ /* @__PURE__ */ l(Ri, { ...e })
3658
3654
  ] })
3659
3655
  }
3660
3656
  );
@@ -3668,7 +3664,7 @@ const kt = {
3668
3664
  yValues: void 0,
3669
3665
  title: void 0
3670
3666
  };
3671
- function Ia({
3667
+ function La({
3672
3668
  plotId: e = "plot_0",
3673
3669
  hostname: n = "127.0.0.1",
3674
3670
  port: t = "80",
@@ -3686,7 +3682,7 @@ function Ia({
3686
3682
  }, { selections: m, updateSelection: f, setSelections: S } = qt(
3687
3683
  void 0,
3688
3684
  h
3689
- ), p = Q(0), b = Q(""), D = `ws://${n}:${t}/plot/${o}/${e}`, { sendMessage: _, lastMessage: L, readyState: P, getWebSocket: F } = bo(
3685
+ ), p = Q(0), b = Q(""), D = `ws://${n}:${t}/plot/${o}/${e}`, { sendMessage: T, lastMessage: L, readyState: P, getWebSocket: F } = po(
3690
3686
  D,
3691
3687
  {
3692
3688
  onOpen: () => {
@@ -3705,13 +3701,13 @@ function Ia({
3705
3701
  }), []);
3706
3702
  const k = J(
3707
3703
  (g, y) => {
3708
- console.log("%s: sending", e, y), _(yo({
3704
+ console.log("%s: sending", e, y), T(go({
3709
3705
  plotId: e,
3710
3706
  type: g,
3711
3707
  params: y
3712
3708
  }));
3713
3709
  },
3714
- [e, _]
3710
+ [e, T]
3715
3711
  ), H = J(
3716
3712
  (g) => {
3717
3713
  k("status", g);
@@ -3730,7 +3726,7 @@ function Ia({
3730
3726
  offerBaton: G
3731
3727
  });
3732
3728
  R(() => {
3733
- if (P === Ne.OPEN) {
3729
+ if (P === $e.OPEN) {
3734
3730
  const g = F();
3735
3731
  g && g.binaryType !== "arraybuffer" && (g.binaryType = "arraybuffer", console.log("%s: WebSocket set binaryType", e)), H("ready");
3736
3732
  }
@@ -3775,55 +3771,55 @@ function Ia({
3775
3771
  theme: "light"
3776
3772
  });
3777
3773
  }, ae = (g, y, x = !0) => {
3778
- const T = a.current;
3774
+ const _ = a.current;
3779
3775
  console.log("Finding old line with key", g);
3780
- const V = T.findIndex((K) => K.key === g);
3776
+ const V = _.findIndex((K) => K.key === g);
3781
3777
  if (V === -1)
3782
- return console.log("Line with key", g, "cannot be found"), T;
3778
+ return console.log("Line with key", g, "cannot be found"), _;
3783
3779
  {
3784
- const K = [...T];
3780
+ const K = [..._];
3785
3781
  return console.debug("Replacing old line params with", y), K[V] = { ...K[V], ...y }, K;
3786
3782
  }
3787
- }, $ = (g, y = !0) => {
3783
+ }, N = (g, y = !0) => {
3788
3784
  u != null && d({ ...u, pointSize: g }), y && k("client_update_scatter_parameters", {
3789
3785
  pointSize: g
3790
3786
  });
3791
3787
  }, j = (g, y) => {
3792
- const x = vo(g), T = Co(g);
3788
+ const x = So(g), _ = vo(g);
3793
3789
  console.log(
3794
3790
  "%s: setting line state with domains",
3795
3791
  e,
3796
3792
  x,
3797
- T
3793
+ _
3798
3794
  );
3799
3795
  const V = y ?? c;
3800
3796
  a.current = g, r(V), s({
3801
3797
  lineData: g,
3802
3798
  xDomain: x,
3803
- yDomain: T,
3799
+ yDomain: _,
3804
3800
  plotConfig: V,
3805
3801
  updateLineParams: ae
3806
3802
  });
3807
3803
  }, se = (g) => {
3808
3804
  const y = g.alData.map((K) => Pt(K));
3809
3805
  console.log("%s: appending line data", e, Object.keys(y));
3810
- const x = a.current, T = Math.max(x.length, y.length), V = [];
3811
- for (let K = 0; K < T; K++)
3812
- V.push(So(x[K], y[K]));
3806
+ const x = a.current, _ = Math.max(x.length, y.length), V = [];
3807
+ for (let K = 0; K < _; K++)
3808
+ V.push(bo(x[K], y[K]));
3813
3809
  j(V);
3814
3810
  }, ve = (g) => {
3815
- const y = He(g.plotConfig), x = g.mlData.map((T) => Pt(T)).filter((T) => T !== null);
3811
+ const y = He(g.plotConfig), x = g.mlData.map((_) => Pt(_)).filter((_) => _ !== null);
3816
3812
  console.log(
3817
3813
  "%s: new line data",
3818
3814
  e,
3819
- x.map((T) => T.key)
3815
+ x.map((_) => _.key)
3820
3816
  ), j(x, y);
3821
3817
  }, we = (g) => {
3822
- const y = xo(g.imData), x = He(g.plotConfig);
3823
- if (Mo(y)) {
3824
- const T = y;
3825
- console.log("%s: new heatmap data", e, Object.keys(T)), s({
3826
- ...T,
3818
+ const y = Co(g.imData), x = He(g.plotConfig);
3819
+ if (Do(y)) {
3820
+ const _ = y;
3821
+ console.log("%s: new heatmap data", e, Object.keys(_)), s({
3822
+ ..._,
3827
3823
  plotConfig: x
3828
3824
  });
3829
3825
  } else
@@ -3831,17 +3827,17 @@ function Ia({
3831
3827
  ...y,
3832
3828
  plotConfig: x
3833
3829
  });
3834
- }, _e = (g) => {
3835
- const y = Do(g.scData);
3830
+ }, Te = (g) => {
3831
+ const y = wo(g.scData);
3836
3832
  console.log("%s: new scatter data", e, Object.keys(y));
3837
3833
  const x = He(g.plotConfig);
3838
3834
  d(y), s({
3839
3835
  ...y,
3840
3836
  plotConfig: x,
3841
- setPointSize: $
3837
+ setPointSize: N
3842
3838
  });
3843
3839
  }, Z = (g) => {
3844
- const y = Po(g.suData);
3840
+ const y = xo(g.suData);
3845
3841
  console.log("%s: new surface data", e, Object.keys(y));
3846
3842
  const x = He(g.plotConfig);
3847
3843
  s({
@@ -3849,27 +3845,27 @@ function Ia({
3849
3845
  plotConfig: x
3850
3846
  });
3851
3847
  }, ye = (g) => {
3852
- const y = wo(g.taData);
3848
+ const y = Po(g.taData);
3853
3849
  console.log("%s: new table data", e, Object.keys(y)), s({
3854
3850
  ...y
3855
3851
  });
3856
3852
  }, le = (g) => {
3857
3853
  const y = g.updateSelections.map((x) => Mt(x)).filter((x) => x !== null);
3858
3854
  console.log("%s: update selections", e, y), S((x) => {
3859
- const T = [...x];
3855
+ const _ = [...x];
3860
3856
  for (const V of y) {
3861
- const K = V.id, re = T.findIndex((be) => be.id === K);
3862
- re === -1 ? T.push(V) : T[re] = V;
3857
+ const K = V.id, re = _.findIndex((be) => be.id === K);
3858
+ re === -1 ? _.push(V) : _[re] = V;
3863
3859
  }
3864
- return T;
3860
+ return _;
3865
3861
  });
3866
3862
  }, pe = (g) => {
3867
3863
  const y = g.selectionIds;
3868
3864
  console.log("%s: clear selections", e, y), y.length === 0 ? S(() => []) : S((x) => {
3869
- const T = [];
3865
+ const _ = [];
3870
3866
  for (const V of x)
3871
- y.includes(V.id) || T.push(V);
3872
- return T;
3867
+ y.includes(V.id) || _.push(V);
3868
+ return _;
3873
3869
  });
3874
3870
  }, B = (g) => {
3875
3871
  const y = g.setSelections.map((x) => Mt(x)).filter((x) => x !== null);
@@ -3880,56 +3876,56 @@ function Ia({
3880
3876
  I((x) => ({
3881
3877
  ...x,
3882
3878
  batonUuid: y,
3883
- others: g.uuids.filter((T) => T !== o),
3879
+ others: g.uuids.filter((_) => _ !== o),
3884
3880
  hasBaton: y === o
3885
3881
  }));
3886
3882
  };
3887
3883
  R(() => {
3888
3884
  if (!L)
3889
3885
  return;
3890
- P !== Ne.OPEN && console.log("%s: still not open", e);
3886
+ P !== $e.OPEN && console.log("%s: still not open", e);
3891
3887
  const g = L.data;
3892
3888
  if (g instanceof Blob) {
3893
3889
  console.log("Message was a blob:", g);
3894
3890
  return;
3895
3891
  }
3896
- const y = po(g);
3892
+ const y = yo(g);
3897
3893
  console.log("%s: decodedMessage", e, Object.keys(y));
3898
3894
  const x = Et();
3899
3895
  At(() => {
3900
3896
  p.current = x.end();
3901
3897
  });
3902
- let T = !0;
3903
- "mlData" in y ? ve(y) : "alData" in y ? se(y) : "imData" in y ? we(y) : "scData" in y ? _e(y) : "suData" in y ? Z(y) : "taData" in y ? ye(y) : "updateSelections" in y ? le(y) : "selectionIds" in y ? pe(y) : "setSelections" in y ? B(y) : "baton" in y ? z(y) : "requester" in y ? ee(y) : "plotId" in y ? O() : (T = !1, console.log("%s: new message type unknown", e)), T && H(`ready ${p.current}`);
3898
+ let _ = !0;
3899
+ "mlData" in y ? ve(y) : "alData" in y ? se(y) : "imData" in y ? we(y) : "scData" in y ? Te(y) : "suData" in y ? Z(y) : "taData" in y ? ye(y) : "updateSelections" in y ? le(y) : "selectionIds" in y ? pe(y) : "setSelections" in y ? B(y) : "baton" in y ? z(y) : "requester" in y ? ee(y) : "plotId" in y ? O() : (_ = !1, console.log("%s: new message type unknown", e)), _ && H(`ready ${p.current}`);
3904
3900
  }, [L, e]);
3905
3901
  let E = i;
3906
- return E && (E = { ...E, batonProps: C, updateSelection: f, selections: m }), E && console.log("%s: plotprops", e, Object.keys(E)), m.length && console.log("%s: selections", e, m.length), !P || P === Ne.UNINSTANTIATED ? /* @__PURE__ */ l("h2", { children: "Waiting for plot server connection" }) : P === Ne.CLOSING ? /* @__PURE__ */ l("h2", { children: "Closing plot server connection" }) : P === Ne.CLOSED ? /* @__PURE__ */ l("h2", { children: "Plot server connection closed" }) : E ? /* @__PURE__ */ l(qi, { ...E }) : /* @__PURE__ */ l("h2", { children: "Awaiting command from plot server" });
3902
+ return E && (E = { ...E, batonProps: C, updateSelection: f, selections: m }), E && console.log("%s: plotprops", e, Object.keys(E)), m.length && console.log("%s: selections", e, m.length), !P || P === $e.UNINSTANTIATED ? /* @__PURE__ */ l("h2", { children: "Waiting for plot server connection" }) : P === $e.CLOSING ? /* @__PURE__ */ l("h2", { children: "Closing plot server connection" }) : P === $e.CLOSED ? /* @__PURE__ */ l("h2", { children: "Plot server connection closed" }) : E ? /* @__PURE__ */ l(Gi, { ...E }) : /* @__PURE__ */ l("h2", { children: "Awaiting command from plot server" });
3907
3903
  }
3908
3904
  export {
3909
- qi as AnyPlot,
3905
+ Gi as AnyPlot,
3910
3906
  Ie as AnyToolbar,
3911
3907
  de as AxialSelection,
3912
3908
  xe as BaseSelection,
3913
3909
  Pe as CircularSectorialSelection,
3914
3910
  ge as CircularSelection,
3915
- Ia as ConnectedPlot,
3911
+ La as ConnectedPlot,
3916
3912
  Me as EllipticalSelection,
3917
- Na as GlyphType,
3918
- Ta as HeatmapPlot,
3919
- La as ImagePlot,
3913
+ Va as GlyphType,
3914
+ wa as HeatmapPlot,
3915
+ Da as ImagePlot,
3920
3916
  oe as InteractionModeType,
3921
- ka as LinePlot,
3917
+ Ma as LinePlot,
3922
3918
  he as LinearSelection,
3923
3919
  dt as OrientableSelection,
3924
3920
  Ve as PlotCustomizationContextProvider,
3925
- Gi as PlotToolbar,
3921
+ Bi as PlotToolbar,
3926
3922
  ie as PolygonalSelection,
3927
3923
  me as RectangularSelection,
3928
- Fa as ScaleType,
3929
- Aa as ScatterPlot,
3924
+ Ia as ScaleType,
3925
+ Ta as ScatterPlot,
3930
3926
  U as SelectionType,
3931
- Va as SurfacePlot,
3932
- Ki as TableDisplay,
3927
+ _a as SurfacePlot,
3928
+ Ei as TableDisplay,
3933
3929
  Ae as usePlotCustomizationContext,
3934
3930
  qt as useSelections
3935
3931
  };