@esrf/daiquiri-lib 0.2.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  import { jsxs as l, jsx as r, Fragment as v } from "react/jsx-runtime";
2
- import { map as C, each as ve } from "lodash";
3
- import { Badge as D, ButtonGroup as oe, Button as y, OverlayTrigger as F, Popover as b, Container as $, Row as P, Col as E, Form as N, InputGroup as M, Alert as x, Tab as be, Tabs as te, Tooltip as Ne } from "react-bootstrap";
4
- import { forwardRef as Ce, useRef as R, useState as k, useEffect as j, Component as se, Fragment as U, Children as Oe, isValidElement as Se, cloneElement as Ee, Suspense as ne, useMemo as xe, createElement as Me } from "react";
5
- import T from "classnames";
6
- import Ae from "debug";
7
- function ke(e) {
2
+ import { map as C, each as be } from "lodash";
3
+ import { Badge as F, ButtonGroup as oe, Button as y, OverlayTrigger as R, Popover as b, Container as $, Row as P, Col as E, Form as N, InputGroup as A, Alert as x, Tab as Ne, Tabs as te, Tooltip as Ce } from "react-bootstrap";
4
+ import { forwardRef as Oe, useRef as T, useState as I, useEffect as j, Component as se, Fragment as q, Children as Se, isValidElement as Ee, cloneElement as xe, Suspense as ne, useMemo as Me, createElement as Ae } from "react";
5
+ import H from "classnames";
6
+ import ke from "debug";
7
+ function Ie(e) {
8
8
  const {
9
9
  activeMessage: t = "Online",
10
10
  inactiveMessage: n = "Offline",
@@ -18,14 +18,14 @@ function ke(e) {
18
18
  }
19
19
  );
20
20
  }
21
- function I(e) {
21
+ function D(e) {
22
22
  const { name: t, icon: n } = e;
23
23
  return /* @__PURE__ */ l("div", { className: "icon", title: t, children: [
24
24
  /* @__PURE__ */ r("i", { className: `fa ${n}` }),
25
- /* @__PURE__ */ r(ke, { ...e })
25
+ /* @__PURE__ */ r(Ie, { ...e })
26
26
  ] });
27
27
  }
28
- function Ie(e) {
28
+ function De(e) {
29
29
  const t = {
30
30
  24: "Y",
31
31
  21: "Z",
@@ -59,21 +59,21 @@ function le(e) {
59
59
  const t = Math.round(e / 60), n = t % 60, i = Math.floor(t / 60);
60
60
  return i ? `${i} hr ${n} min` : `${n} min`;
61
61
  }
62
- function De(e) {
62
+ function Fe(e) {
63
63
  return e > 0 ? (662607004e-42 * 299792458 / (e * 1e-10) / 160218e-24 * 1e-3).toFixed(4) : 0;
64
64
  }
65
- function Fe(e, t) {
65
+ function Re(e, t) {
66
66
  return Number.parseFloat(e.toFixed(t));
67
67
  }
68
- const Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
68
+ const _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
69
69
  __proto__: null,
70
- formatEng: Ie,
71
- round: Fe,
72
- toEnergy: De,
70
+ formatEng: De,
71
+ round: Re,
72
+ toEnergy: Fe,
73
73
  toHoursMins: le,
74
74
  ucfirst: $e
75
75
  }, Symbol.toStringTag, { value: "Module" }));
76
- function Re(e) {
76
+ function Te(e) {
77
77
  const { hardware: t } = e;
78
78
  function n(d) {
79
79
  t.requestChange({
@@ -97,7 +97,7 @@ function Re(e) {
97
97
  return !s || typeof s != "string" ? "UNKNOWN" : s;
98
98
  }
99
99
  return /* @__PURE__ */ r(
100
- F,
100
+ R,
101
101
  {
102
102
  trigger: "click",
103
103
  rootClose: !0,
@@ -116,7 +116,7 @@ function Re(e) {
116
116
  ":"
117
117
  ] }),
118
118
  /* @__PURE__ */ r(E, { children: /* @__PURE__ */ r(
119
- D,
119
+ F,
120
120
  {
121
121
  bg: o(d) === "ON" ? "success" : "danger",
122
122
  children: o(d)
@@ -138,7 +138,7 @@ function Re(e) {
138
138
  }
139
139
  );
140
140
  }
141
- function _t(e) {
141
+ function Pt(e) {
142
142
  const { hardware: t, options: n = {} } = e;
143
143
  function i(a) {
144
144
  t.requestChange({
@@ -148,7 +148,7 @@ function _t(e) {
148
148
  return /* @__PURE__ */ l("div", { className: "hw-component", children: [
149
149
  /* @__PURE__ */ l("div", { className: "hw-head", children: [
150
150
  /* @__PURE__ */ r(
151
- I,
151
+ D,
152
152
  {
153
153
  name: "Frontend",
154
154
  icon: "fam-hardware-frontend",
@@ -157,7 +157,7 @@ function _t(e) {
157
157
  ),
158
158
  /* @__PURE__ */ r("div", { className: "name", children: t.name }),
159
159
  /* @__PURE__ */ r(
160
- D,
160
+ F,
161
161
  {
162
162
  bg: t.properties.state === "OPEN" || t.properties.state === "RUNNING" ? "success" : "danger",
163
163
  children: t.properties.state
@@ -174,11 +174,11 @@ function _t(e) {
174
174
  children: t.properties.frontend === "FE open" ? "Close" : "Open"
175
175
  }
176
176
  ),
177
- /* @__PURE__ */ r(Re, { ...e })
177
+ /* @__PURE__ */ r(Te, { ...e })
178
178
  ] }) })
179
179
  ] });
180
180
  }
181
- function Pt(e) {
181
+ function Vt(e) {
182
182
  const { hardware: t, options: n = {} } = e;
183
183
  function i() {
184
184
  const a = n.property;
@@ -218,7 +218,7 @@ function Y(e) {
218
218
  /* @__PURE__ */ r("div", { className: "name", children: /* @__PURE__ */ r(N.Label, { htmlFor: n.id, children: a }) }),
219
219
  e.widgetState,
220
220
  e.hardware.errors && e.hardware.errors.length > 0 && /* @__PURE__ */ r(
221
- F,
221
+ R,
222
222
  {
223
223
  trigger: "click",
224
224
  placement: "bottom",
@@ -251,7 +251,7 @@ function J(e) {
251
251
  display: "inline-block",
252
252
  minWidth: ""
253
253
  };
254
- return e.minWidth && (t.minWidth = `${e.minWidth}em`), /* @__PURE__ */ r("div", { style: t, children: /* @__PURE__ */ r(D, { bg: e.variant, children: e.state }) });
254
+ return e.minWidth && (t.minWidth = `${e.minWidth}em`), /* @__PURE__ */ r("div", { style: t, children: /* @__PURE__ */ r(F, { bg: e.variant, children: e.state }) });
255
255
  }
256
256
  function ce(e) {
257
257
  const { hardware: t } = e;
@@ -302,20 +302,20 @@ function de(e) {
302
302
  }
303
303
  return /* @__PURE__ */ r(J, { state: i, minWidth: 6, variant: a() });
304
304
  }
305
- const Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
305
+ const Lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
306
306
  __proto__: null,
307
307
  HardwareState: J,
308
308
  MotorState: ce,
309
309
  ShutterState: de
310
- }, Symbol.toStringTag, { value: "Module" })), Te = Ce((e, t) => {
311
- const n = R(null), [i, a] = k(e.step), o = (w) => {
312
- const q = t;
310
+ }, Symbol.toStringTag, { value: "Module" })), He = Oe((e, t) => {
311
+ const n = T(null), [i, a] = I(e.step), o = (w) => {
312
+ const z = t;
313
313
  if (n.current === null)
314
314
  return;
315
- let X = Number.parseFloat(q.current.value);
315
+ let X = Number.parseFloat(z.current.value);
316
316
  const ee = Number.parseFloat(n.current.value);
317
- X += w ? ee : -ee, q.current.value = `${X}`, e.onStep && e.onStep({
318
- target: q.current
317
+ X += w ? ee : -ee, z.current.value = `${X}`, e.onStep && e.onStep({
318
+ target: z.current
319
319
  });
320
320
  }, {
321
321
  onStep: d,
@@ -325,8 +325,8 @@ const Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
325
325
  decIcon: c,
326
326
  swapIncDec: f,
327
327
  onKeyDown: m,
328
- horizontalArrows: A,
329
- largeArrows: z,
328
+ horizontalArrows: k,
329
+ largeArrows: K,
330
330
  ...S
331
331
  } = e, Q = (w) => {
332
332
  w.key === "ArrowUp" ? (w.preventDefault(), o(!0)) : w.key === "ArrowDown" ? (w.preventDefault(), o(!1)) : m && m(w);
@@ -342,15 +342,15 @@ const Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
342
342
  ...S
343
343
  }
344
344
  );
345
- const ye = C(e.steps || [e.step], (w) => /* @__PURE__ */ r("option", { value: w, children: w }, w));
345
+ const ve = C(e.steps || [e.step], (w) => /* @__PURE__ */ r("option", { value: w, children: w }, w));
346
346
  return /* @__PURE__ */ r(
347
347
  "div",
348
348
  {
349
- className: T("numeric-step", {
350
- "numeric-step-large": z,
351
- "numeric-step-horizontal": A
349
+ className: H("numeric-step", {
350
+ "numeric-step-large": K,
351
+ "numeric-step-horizontal": k
352
352
  }),
353
- children: /* @__PURE__ */ l(M, { children: [
353
+ children: /* @__PURE__ */ l(A, { children: [
354
354
  /* @__PURE__ */ r(
355
355
  N.Control,
356
356
  {
@@ -363,7 +363,7 @@ const Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
363
363
  ),
364
364
  /* @__PURE__ */ l(v, { children: [
365
365
  h,
366
- !h && /* @__PURE__ */ l(M.Text, { className: "d-flex flex-column", children: [
366
+ !h && /* @__PURE__ */ l(A.Text, { className: "d-flex flex-column", children: [
367
367
  /* @__PURE__ */ r(
368
368
  N.Control,
369
369
  {
@@ -372,7 +372,7 @@ const Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
372
372
  className: "step-size",
373
373
  defaultValue: i,
374
374
  onChange: (w) => a(Number.parseFloat(w.target.value)),
375
- children: ye
375
+ children: ve
376
376
  }
377
377
  ),
378
378
  e.unit && /* @__PURE__ */ r("div", { children: e.unit }),
@@ -402,9 +402,9 @@ const Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
402
402
  ] })
403
403
  }
404
404
  );
405
- }), He = Te;
406
- function _e(e) {
407
- const t = R(null), [n, i] = k(!1), [a, o] = k(!1);
405
+ }), _e = He;
406
+ function Pe(e) {
407
+ const t = T(null), [n, i] = I(!1), [a, o] = I(!1);
408
408
  j(() => {
409
409
  t.current && (e.hardwareValue === null ? t.current.value = "" : t.current.value = e.hardwareValue.toString(), i(!1));
410
410
  }, [e.hardwareValue]);
@@ -428,8 +428,8 @@ function _e(e) {
428
428
  case "Enter":
429
429
  {
430
430
  i(!1);
431
- const m = Number.parseFloat(f.target.value), A = e.onMoveRequested(m);
432
- A && A.catch(() => {
431
+ const m = Number.parseFloat(f.target.value), k = e.onMoveRequested(m);
432
+ k && k.catch(() => {
433
433
  o(!0), setTimeout(() => {
434
434
  d(e.hardwareValue), o(!1);
435
435
  }, 2e3);
@@ -444,10 +444,10 @@ function _e(e) {
444
444
  }
445
445
  }
446
446
  return /* @__PURE__ */ r(
447
- He,
447
+ _e,
448
448
  {
449
449
  id: e.id,
450
- className: T({
450
+ className: H({
451
451
  "form-control-edited": n,
452
452
  "form-control-error": a,
453
453
  "hw-moving": e.hardwareIsMoving
@@ -472,7 +472,7 @@ function _e(e) {
472
472
  );
473
473
  }
474
474
  function re(e) {
475
- const t = R(null), [n, i] = k(!1), [a, o] = k(!1);
475
+ const t = T(null), [n, i] = I(!1), [a, o] = I(!1);
476
476
  function d(c) {
477
477
  return e.precision !== void 0 ? Number.parseFloat(c).toFixed(e.precision) : c;
478
478
  }
@@ -508,7 +508,7 @@ function re(e) {
508
508
  return /* @__PURE__ */ r(
509
509
  N.Control,
510
510
  {
511
- className: T({
511
+ className: H({
512
512
  "form-control-edited": n,
513
513
  "form-control-error": a,
514
514
  "hw-moving": e.hardwareIsMoving
@@ -522,7 +522,7 @@ function re(e) {
522
522
  }
523
523
  );
524
524
  }
525
- function Pe(e) {
525
+ function Ve(e) {
526
526
  function t(a) {
527
527
  return e.hardware.requestChange({
528
528
  property: "velocity",
@@ -537,7 +537,7 @@ function Pe(e) {
537
537
  }
538
538
  let i = "UNKNOWN";
539
539
  return e.hardware.properties.state && ([i] = e.hardware.properties.state), /* @__PURE__ */ r(
540
- F,
540
+ R,
541
541
  {
542
542
  trigger: "click",
543
543
  rootClose: !0,
@@ -581,7 +581,7 @@ function Pe(e) {
581
581
  }
582
582
  );
583
583
  }
584
- function Lt(e) {
584
+ function jt(e) {
585
585
  const { hardware: t, options: n = {} } = e;
586
586
  function i() {
587
587
  t.requestChange({
@@ -597,16 +597,16 @@ function Lt(e) {
597
597
  }
598
598
  let o = "UNKNOWN";
599
599
  e.hardware.properties.state && ([o] = e.hardware.properties.state);
600
- const d = /* @__PURE__ */ r(I, { name: "Motor", icon: "fam-hardware-motor", online: t.online }), s = /* @__PURE__ */ r(ce, { hardware: t }), h = e.options ? e.options.header : "top";
600
+ const d = /* @__PURE__ */ r(D, { name: "Motor", icon: "fam-hardware-motor", online: t.online }), s = /* @__PURE__ */ r(ce, { hardware: t }), h = e.options ? e.options.header : "top";
601
601
  return /* @__PURE__ */ r(
602
602
  Y,
603
603
  {
604
604
  hardware: t,
605
605
  widgetIcon: d,
606
606
  widgetState: s,
607
- widgetContent: /* @__PURE__ */ l(M, { children: [
607
+ widgetContent: /* @__PURE__ */ l(A, { children: [
608
608
  /* @__PURE__ */ r(
609
- _e,
609
+ Pe,
610
610
  {
611
611
  id: t.id,
612
612
  hardwareValue: t.properties.position,
@@ -626,9 +626,9 @@ function Lt(e) {
626
626
  largeArrows: n.largearrows
627
627
  }
628
628
  ),
629
- t.properties.unit && /* @__PURE__ */ r(M.Text, { children: t.properties.unit }),
629
+ t.properties.unit && /* @__PURE__ */ r(A.Text, { children: t.properties.unit }),
630
630
  o !== "MOVING" && n.extended && /* @__PURE__ */ r(
631
- Pe,
631
+ Ve,
632
632
  {
633
633
  hardware: t,
634
634
  disabled: e.disabled,
@@ -641,8 +641,8 @@ function Lt(e) {
641
641
  }
642
642
  );
643
643
  }
644
- function jt(e) {
645
- const { hardware: t, options: n = {} } = e, i = R(null);
644
+ function Yt(e) {
645
+ const { hardware: t, options: n = {} } = e, i = T(null);
646
646
  j(() => {
647
647
  if (!i.current) {
648
648
  console.error("selectionRef ref is unset");
@@ -669,7 +669,7 @@ function jt(e) {
669
669
  return /* @__PURE__ */ l("div", { className: "hw-component", children: [
670
670
  /* @__PURE__ */ l("div", { className: "hw-head", children: [
671
671
  /* @__PURE__ */ r(
672
- I,
672
+ D,
673
673
  {
674
674
  name: "Multiposition",
675
675
  icon: "fam-hardware-multiposition",
@@ -678,14 +678,14 @@ function jt(e) {
678
678
  ),
679
679
  /* @__PURE__ */ r("div", { className: "name", children: t.name }),
680
680
  /* @__PURE__ */ r(
681
- D,
681
+ F,
682
682
  {
683
683
  bg: t.properties.state === "READY" ? "success" : "warning",
684
684
  children: t.properties.state
685
685
  }
686
686
  )
687
687
  ] }),
688
- /* @__PURE__ */ r("div", { className: "hw-content", children: /* @__PURE__ */ l(M, { children: [
688
+ /* @__PURE__ */ r("div", { className: "hw-content", children: /* @__PURE__ */ l(A, { children: [
689
689
  /* @__PURE__ */ l(
690
690
  N.Control,
691
691
  {
@@ -705,15 +705,15 @@ function jt(e) {
705
705
  ] }) })
706
706
  ] });
707
707
  }
708
- const Ve = Ae("daiquiri.components.hardware.NoObject");
709
- function Yt(e) {
708
+ const Le = ke("daiquiri.components.hardware.NoObject");
709
+ function Ut(e) {
710
710
  if (e.options.emptyifnone)
711
- return Ve(
711
+ return Le(
712
712
  'Component id:"%s" name:"%s" not displayed cause setup with emptyifnone.',
713
713
  e.id,
714
714
  e.name
715
715
  ), /* @__PURE__ */ r(v, {});
716
- const t = /* @__PURE__ */ r(I, { name: "NoObject", icon: "fam-hardware-any", online: !1 }), n = /* @__PURE__ */ r(v, {}), i = /* @__PURE__ */ r(v, { children: "Missing" }), a = e.options ? e.options.header : "top", o = {
716
+ const t = /* @__PURE__ */ r(D, { name: "NoObject", icon: "fam-hardware-any", online: !1 }), n = /* @__PURE__ */ r(v, {}), i = /* @__PURE__ */ r(v, { children: "Missing" }), a = e.options ? e.options.header : "top", o = {
717
717
  id: e.id,
718
718
  name: e.name ?? "",
719
719
  alias: null,
@@ -732,12 +732,12 @@ function Yt(e) {
732
732
  }
733
733
  );
734
734
  }
735
- function Le(e) {
735
+ function je(e) {
736
736
  const t = e.online ? "READY" : "OFFLINE";
737
- return /* @__PURE__ */ r(D, { bg: t === "READY" ? "success" : "warning", children: t });
737
+ return /* @__PURE__ */ r(F, { bg: t === "READY" ? "success" : "warning", children: t });
738
738
  }
739
739
  function Kt(e) {
740
- const { hardware: t, options: n = {} } = e, i = /* @__PURE__ */ r(I, { name: "Optic", icon: "fa-cog", online: t.online }), a = /* @__PURE__ */ r(Le, { ...t });
740
+ const { hardware: t, options: n = {} } = e, i = /* @__PURE__ */ r(D, { name: "Optic", icon: "fa-cog", online: t.online }), a = /* @__PURE__ */ r(je, { ...t });
741
741
  function o() {
742
742
  const c = n.property;
743
743
  if (c === void 0)
@@ -762,9 +762,9 @@ function Kt(e) {
762
762
  return null;
763
763
  return `${f}`;
764
764
  }
765
- const s = d(), h = /* @__PURE__ */ l(M, { children: [
765
+ const s = d(), h = /* @__PURE__ */ l(A, { children: [
766
766
  /* @__PURE__ */ r(N.Control, { value: o(), readOnly: !0 }),
767
- s && /* @__PURE__ */ r(M.Text, { children: s })
767
+ s && /* @__PURE__ */ r(A.Text, { children: s })
768
768
  ] }), u = e.options.header || "top";
769
769
  return /* @__PURE__ */ r(
770
770
  Y,
@@ -777,14 +777,14 @@ function Kt(e) {
777
777
  }
778
778
  );
779
779
  }
780
- function je(e) {
780
+ function Ye(e) {
781
781
  const { hardware: t } = e, n = () => {
782
782
  t.requestChange({
783
783
  function: "reset"
784
784
  });
785
785
  };
786
786
  return /* @__PURE__ */ r(
787
- F,
787
+ R,
788
788
  {
789
789
  trigger: "click",
790
790
  rootClose: !0,
@@ -805,7 +805,7 @@ function je(e) {
805
805
  }
806
806
  function zt(e) {
807
807
  const { hardware: t, options: n = {} } = e, i = /* @__PURE__ */ r(
808
- I,
808
+ D,
809
809
  {
810
810
  name: "Shutter",
811
811
  icon: "fam-hardware-shutter",
@@ -832,7 +832,7 @@ function zt(e) {
832
832
  function: u
833
833
  });
834
834
  }
835
- const A = /* @__PURE__ */ l(oe, { className: "d-flex flex-nowrap", children: [
835
+ const k = /* @__PURE__ */ l(oe, { className: "d-flex flex-nowrap", children: [
836
836
  /* @__PURE__ */ r(
837
837
  y,
838
838
  {
@@ -842,16 +842,16 @@ function zt(e) {
842
842
  children: h
843
843
  }
844
844
  ),
845
- n.extended && /* @__PURE__ */ r(je, { ...e })
846
- ] }), z = e.options.header || "top";
845
+ n.extended && /* @__PURE__ */ r(Ye, { ...e })
846
+ ] }), K = e.options.header || "top";
847
847
  return /* @__PURE__ */ r(
848
848
  Y,
849
849
  {
850
850
  hardware: t,
851
851
  widgetIcon: i,
852
852
  widgetState: a,
853
- widgetContent: A,
854
- headerMode: z
853
+ widgetContent: k,
854
+ headerMode: K
855
855
  }
856
856
  );
857
857
  }
@@ -864,8 +864,8 @@ class qt extends se {
864
864
  return this.props.options.variant in this.variants && (t = this.variants[this.props.options.variant]), /* @__PURE__ */ r(t, { ...this.props });
865
865
  }
866
866
  }
867
- function Ye(e) {
868
- const [t, n] = k({}), i = R(null);
867
+ function Ue(e) {
868
+ const [t, n] = I({}), i = T(null);
869
869
  return j(() => {
870
870
  if (i.current) {
871
871
  const a = i.current;
@@ -895,11 +895,6 @@ function Ye(e) {
895
895
  }
896
896
  );
897
897
  }
898
- const Ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
899
- __proto__: null
900
- }, Symbol.toStringTag, { value: "Module" })), Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
901
- __proto__: null
902
- }, Symbol.toStringTag, { value: "Module" }));
903
898
  function Ke(e) {
904
899
  return /* @__PURE__ */ r("div", { className: "panel-header", style: e.style, children: e.children });
905
900
  }
@@ -907,12 +902,16 @@ function ze(e) {
907
902
  return /* @__PURE__ */ r("div", { className: "panel-contents", style: e.style, children: e.children });
908
903
  }
909
904
  function p(e) {
910
- const t = e.scroll ? Ye : U;
905
+ const t = e.scroll ? Ue : q;
911
906
  return /* @__PURE__ */ r("div", { className: `panel ${e.className ?? ""}`, style: e.style, children: /* @__PURE__ */ r(t, { children: e.children }) });
912
907
  }
913
908
  p.Header = Ke;
914
909
  p.Contents = ze;
915
- const _ = {};
910
+ const Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
911
+ __proto__: null
912
+ }, Symbol.toStringTag, { value: "Module" })), Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
913
+ __proto__: null
914
+ }, Symbol.toStringTag, { value: "Module" })), _ = {};
916
915
  function qe(e, t) {
917
916
  _[e] = t;
918
917
  }
@@ -922,15 +921,15 @@ function O(e, t, n = !0) {
922
921
  const { type: i } = e, a = i && i in _ ? _[i] : _.component;
923
922
  return /* @__PURE__ */ r(a, { yamlNode: e, panel: n }, t);
924
923
  }
925
- function Ue({
924
+ function Ge({
926
925
  children: e,
927
926
  key: t,
928
927
  panel: n,
929
928
  options: i
930
929
  }) {
931
- return n ? /* @__PURE__ */ r(p, { style: i.style, scroll: i.scroll, children: /* @__PURE__ */ r(p.Contents, { children: e }) }, t) : /* @__PURE__ */ r(v, { children: Oe.map(
930
+ return n ? /* @__PURE__ */ r(p, { style: i.style, scroll: i.scroll, children: /* @__PURE__ */ r(p.Contents, { children: e }) }, t) : /* @__PURE__ */ r(v, { children: Se.map(
932
931
  e,
933
- (a) => Se(a) ? Ee(a, { key: t, ...a.props }) : void 0
932
+ (a) => Ee(a) ? xe(a, { key: t, ...a.props }) : void 0
934
933
  ) });
935
934
  }
936
935
  function ue(e, t) {
@@ -938,33 +937,33 @@ function ue(e, t) {
938
937
  if (e && Object.keys(a).length > 0)
939
938
  throw new V(e, Object.keys(a));
940
939
  }
941
- class H extends Error {
940
+ class M extends Error {
942
941
  constructor(t, n) {
943
942
  super(t), this.yamlNode = n;
944
943
  }
945
944
  }
946
- class V extends H {
945
+ class V extends M {
947
946
  constructor(t, n) {
948
947
  super(`Unexpected keys: ${n.join(", ")}`, t), this.keys = n;
949
948
  }
950
949
  }
951
- class L extends H {
950
+ class L extends M {
952
951
  constructor(t, n) {
953
952
  super(`Keys ${n.join(", ")} are missing`, t), this.keys = n;
954
953
  }
955
954
  }
956
- class g extends H {
955
+ class g extends M {
957
956
  constructor(t, n, i) {
958
957
  super(`Key ${n} error: ${i}`, t), this.key = n, this.keyMessage = i;
959
958
  }
960
959
  }
961
- function Ge(e) {
960
+ function We(e) {
962
961
  let t = e;
963
962
  for (; t._parentNode; )
964
963
  t = t._parentNode;
965
964
  return t;
966
965
  }
967
- function We(e) {
966
+ function Be(e) {
968
967
  const t = [];
969
968
  let n = e;
970
969
  for (; n; )
@@ -990,15 +989,15 @@ function he(e, t = null, n = null) {
990
989
  }
991
990
  return Object.freeze(i), i;
992
991
  }
993
- function Be(e) {
992
+ function fe(e) {
994
993
  return /* @__PURE__ */ r(x, { variant: "danger", children: e.message });
995
994
  }
996
995
  function Ze(e) {
997
996
  const { error: t } = e;
998
- if (!(t instanceof H))
997
+ if (!(t instanceof M))
999
998
  return /* @__PURE__ */ r(v, {});
1000
999
  function n(o, d = 3) {
1001
- const s = We(o.yamlNode), h = [];
1000
+ const s = Be(o.yamlNode), h = [];
1002
1001
  let u = "";
1003
1002
  for (let c = 1; c < s.length; c++) {
1004
1003
  const { node: f, indexFromParent: m } = s[c];
@@ -1027,7 +1026,7 @@ function Ze(e) {
1027
1026
  ), h.join(`
1028
1027
  `);
1029
1028
  }
1030
- const a = Ge(t.yamlNode).name;
1029
+ const a = We(t.yamlNode).name;
1031
1030
  if (t instanceof V) {
1032
1031
  const o = t.keys.length === 1 ? "key" : "keys";
1033
1032
  return /* @__PURE__ */ l(x, { variant: "danger", children: [
@@ -1075,7 +1074,7 @@ function Ze(e) {
1075
1074
  /* @__PURE__ */ r("br", {}),
1076
1075
  /* @__PURE__ */ r("pre", { className: "mt-3", children: n(t) }),
1077
1076
  /* @__PURE__ */ r("br", {})
1078
- ] }) : /* @__PURE__ */ r(Be, { ...e });
1077
+ ] }) : /* @__PURE__ */ r(fe, { ...e });
1079
1078
  }
1080
1079
  const ie = {
1081
1080
  hasError: !1,
@@ -1092,10 +1091,17 @@ class Je extends se {
1092
1091
  return { hasError: !0 };
1093
1092
  }
1094
1093
  componentDidCatch(t) {
1095
- t instanceof H && this.setState({
1094
+ t instanceof M ? this.setState({
1096
1095
  hasError: !0,
1097
1096
  message: t.message,
1098
1097
  error: t
1098
+ }) : this.props.unhandledComponentDidCatch && this.props.unhandledComponentDidCatch(t, (n) => {
1099
+ this.setState({
1100
+ hasError: !0,
1101
+ message: t.message,
1102
+ error: t,
1103
+ ...n
1104
+ });
1099
1105
  });
1100
1106
  }
1101
1107
  // https://github.com/bvaughn/react-error-boundary/blob/23a4d779744f3079dfe0960acaa4bdfd5dede87b/src/ErrorBoundary.ts#L53
@@ -1103,26 +1109,37 @@ class Je extends se {
1103
1109
  this.state.hasError && n.error !== void 0 && t.resetKey !== this.props.resetKey && this.setState(ie);
1104
1110
  }
1105
1111
  render() {
1106
- return this.state.hasError ? /* @__PURE__ */ l($, { className: "mt-2", children: [
1107
- /* @__PURE__ */ r("h4", { children: "Something went wrong" }),
1108
- /* @__PURE__ */ r(
1109
- Ze,
1110
- {
1111
- message: this.state.message,
1112
- error: this.state.error
1113
- }
1114
- ),
1115
- /* @__PURE__ */ l("p", { children: [
1116
- "This error has been logged. Please",
1117
- " ",
1118
- /* @__PURE__ */ l(y, { size: "sm", onClick: this.reload, children: [
1119
- /* @__PURE__ */ r("i", { className: "fa fa-refresh" }),
1120
- " Reload"
1121
- ] }),
1122
- " ",
1123
- "the application"
1124
- ] })
1125
- ] }) : this.props.children;
1112
+ if (this.state.hasError) {
1113
+ const { UnhandledErrorComponent: t } = this.props, { hasError: n, ...i } = this.state;
1114
+ return /* @__PURE__ */ l($, { className: "mt-2", children: [
1115
+ /* @__PURE__ */ r("h4", { children: "Something went wrong" }),
1116
+ this.state.error instanceof M && /* @__PURE__ */ r(
1117
+ Ze,
1118
+ {
1119
+ message: this.state.message,
1120
+ error: this.state.error
1121
+ }
1122
+ ),
1123
+ !(this.state.error instanceof M) && /* @__PURE__ */ r(v, { children: t ? /* @__PURE__ */ r(t, { ...i }) : /* @__PURE__ */ r(
1124
+ fe,
1125
+ {
1126
+ message: this.state.message,
1127
+ error: this.state.error
1128
+ }
1129
+ ) }),
1130
+ /* @__PURE__ */ l("p", { children: [
1131
+ "This error has been logged. Please",
1132
+ " ",
1133
+ /* @__PURE__ */ l(y, { size: "sm", onClick: this.reload, children: [
1134
+ /* @__PURE__ */ r("i", { className: "fa fa-refresh" }),
1135
+ " Reload"
1136
+ ] }),
1137
+ " ",
1138
+ "the application"
1139
+ ] })
1140
+ ] });
1141
+ }
1142
+ return this.props.children;
1126
1143
  }
1127
1144
  }
1128
1145
  function Qe(e, t, n) {
@@ -1145,7 +1162,7 @@ function G(e, t, n) {
1145
1162
  if (n !== void 0 && typeof n != "boolean")
1146
1163
  throw new g(e, t, "An optional boolean is expected");
1147
1164
  }
1148
- function fe(e, t, n) {
1165
+ function me(e, t, n) {
1149
1166
  if (n !== void 0 && typeof n != "string")
1150
1167
  throw new g(e, t, "An optional string is expected");
1151
1168
  }
@@ -1189,7 +1206,7 @@ function it(e, t, n) {
1189
1206
  });
1190
1207
  }
1191
1208
  }
1192
- function me(e, t, n) {
1209
+ function pe(e, t, n) {
1193
1210
  if (n !== void 0 && typeof n != "number")
1194
1211
  throw new g(e, t, "An optional number is expected");
1195
1212
  }
@@ -1211,7 +1228,7 @@ function at(e, t, n) {
1211
1228
  });
1212
1229
  }
1213
1230
  }
1214
- function K(e, t) {
1231
+ function U(e, t) {
1215
1232
  const { _parentNode: n, _indexFromParent: i, ...a } = t;
1216
1233
  if (e && Object.keys(a).length > 0)
1217
1234
  throw new V(e, Object.keys(a));
@@ -1224,18 +1241,18 @@ function st(e, t, n) {
1224
1241
  if (n !== void 0 && n !== "h5web" && n !== "plotly")
1225
1242
  throw new g(e, t, '"h5web" or "plotly" string is expected');
1226
1243
  }
1227
- const Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1244
+ const Bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1228
1245
  __proto__: null,
1229
1246
  assertBoolean: et,
1230
1247
  assertDataCollectionId: ot,
1231
1248
  assertKeyExpected: Qe,
1232
- assertNoUnknownKeys: K,
1249
+ assertNoUnknownKeys: U,
1233
1250
  assertNumber: tt,
1234
1251
  assertOptionalBackend: st,
1235
1252
  assertOptionalBoolean: G,
1236
- assertOptionalNumber: me,
1253
+ assertOptionalNumber: pe,
1237
1254
  assertOptionalNumberList: at,
1238
- assertOptionalString: fe,
1255
+ assertOptionalString: me,
1239
1256
  assertOptionalStringList: it,
1240
1257
  assertOptionalStringOrStringList: rt,
1241
1258
  assertString: Xe,
@@ -1243,14 +1260,14 @@ const Wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1243
1260
  }, Symbol.toStringTag, { value: "Module" }));
1244
1261
  function lt({ yamlNode: e, panel: t }) {
1245
1262
  const { type: n, style: i, children: a, ...o } = e;
1246
- return K(e, o), /* @__PURE__ */ r(P, { className: "ymllayout-row gx-0", style: i, children: C(a, (d, s) => O(d, s, t)) });
1263
+ return U(e, o), /* @__PURE__ */ r(P, { className: "ymllayout-row gx-0", style: i, children: C(a, (d, s) => O(d, s, t)) });
1247
1264
  }
1248
1265
  function ct({ yamlNode: e, panel: t }) {
1249
1266
  const { type: n, style: i, xs: a, children: o, ...d } = e;
1250
- return K(e, d), me(e, "xs", a), /* @__PURE__ */ r(
1267
+ return U(e, d), pe(e, "xs", a), /* @__PURE__ */ r(
1251
1268
  E,
1252
1269
  {
1253
- className: T("yamymllayout-col", { col: !!a }),
1270
+ className: H("yamymllayout-col", { col: !!a }),
1254
1271
  style: i,
1255
1272
  xs: a,
1256
1273
  children: C(e.children, (s, h) => O(s, h, t))
@@ -1258,7 +1275,7 @@ function ct({ yamlNode: e, panel: t }) {
1258
1275
  );
1259
1276
  }
1260
1277
  const W = {};
1261
- function Bt(e, t) {
1278
+ function Zt(e, t) {
1262
1279
  W[e] = t;
1263
1280
  }
1264
1281
  function dt(e, t) {
@@ -1294,7 +1311,7 @@ function ht(e) {
1294
1311
  nowrap: d,
1295
1312
  ...s
1296
1313
  } = e;
1297
- if (ut(n, "ids", i), fe(n, "groupid", a), G(n, "even", o), G(n, "nowrap", d), K(n, s), !W.HardwareGroup)
1314
+ if (ut(n, "ids", i), me(n, "groupid", a), G(n, "even", o), G(n, "nowrap", d), U(n, s), !W.HardwareGroup)
1298
1315
  return /* @__PURE__ */ r(x, { variant: "warning", children: "No `HardwareGroup` component registered" });
1299
1316
  const h = W.HardwareGroup;
1300
1317
  return /* @__PURE__ */ r(
@@ -1311,10 +1328,15 @@ function ht(e) {
1311
1328
  const B = {
1312
1329
  hardwaregroup: ht
1313
1330
  };
1314
- function Zt(e, t) {
1331
+ function ft(e, t) {
1315
1332
  B[e] = t;
1316
1333
  }
1317
- function ft(e) {
1334
+ function Jt(e) {
1335
+ Object.entries(e).forEach(
1336
+ ([t, n]) => ft(t, n)
1337
+ );
1338
+ }
1339
+ function mt(e) {
1318
1340
  const { yamlNode: t, panel: n } = e, { type: i, style: a, scroll: o, title: d, ...s } = t;
1319
1341
  if (!(i in B))
1320
1342
  return /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(p.Contents, { children: /* @__PURE__ */ l(x, { variant: "warning", children: [
@@ -1328,11 +1350,11 @@ function ft(e) {
1328
1350
  /* @__PURE__ */ r(p.Contents, { children: /* @__PURE__ */ r(h, { ...s, yamlNode: t }) })
1329
1351
  ] }) }) : /* @__PURE__ */ r(ne, { fallback: /* @__PURE__ */ r("p", { children: "Loading..." }), children: /* @__PURE__ */ r(h, { ...s, yamlNode: t }) });
1330
1352
  }
1331
- function mt({ yamlNode: e, panel: t }) {
1353
+ function pt({ yamlNode: e, panel: t }) {
1332
1354
  const n = e.options || {};
1333
1355
  return /* @__PURE__ */ r($, { className: "ymllayout-container", ...n, children: C(e.children, (i, a) => O(i, a, t)) });
1334
1356
  }
1335
- function pt(e) {
1357
+ function gt(e) {
1336
1358
  const { yamlNode: t } = e, n = t.options || {}, i = {};
1337
1359
  return n.centerContent && (i.margin = "auto"), /* @__PURE__ */ l(p, { className: "ymllayout-panel", ...n, children: [
1338
1360
  t.title && /* @__PURE__ */ r(p.Header, { children: t.title }),
@@ -1342,23 +1364,23 @@ function pt(e) {
1342
1364
  ) })
1343
1365
  ] });
1344
1366
  }
1345
- const gt = () => Math.random().toString(36).slice(2, 15) + Math.random().toString(36).slice(2, 15);
1346
- function wt({ yamlNode: e, panel: t }) {
1367
+ const wt = () => Math.random().toString(36).slice(2, 15) + Math.random().toString(36).slice(2, 15);
1368
+ function yt({ yamlNode: e, panel: t }) {
1347
1369
  const n = [];
1348
- return ve(e.children, (i, a) => {
1370
+ return be(e.children, (i, a) => {
1349
1371
  n.push(
1350
- /* @__PURE__ */ r(be, { eventKey: gt(), title: i.title, children: O(i, 0, !1) }, a)
1372
+ /* @__PURE__ */ r(Ne, { eventKey: wt(), title: i.title, children: O(i, 0, !1) }, a)
1351
1373
  );
1352
1374
  }), t ? /* @__PURE__ */ l(p, { className: "ymllayout-tabs", children: [
1353
1375
  e.title && /* @__PURE__ */ r(p.Header, { children: e.title }),
1354
1376
  /* @__PURE__ */ r(p.Contents, { children: /* @__PURE__ */ r(te, { mountOnEnter: !0, children: n }) })
1355
1377
  ] }) : /* @__PURE__ */ r(te, { children: n });
1356
1378
  }
1357
- function yt(e) {
1379
+ function vt(e) {
1358
1380
  const { node: t } = e, { type: n, title: i, ...a } = t;
1359
1381
  return ue(t, a), /* @__PURE__ */ r("div", { style: { gridColumn: "1 / 3" }, children: /* @__PURE__ */ r("h3", { children: i }) });
1360
1382
  }
1361
- function vt(e) {
1383
+ function bt(e) {
1362
1384
  const { node: t, state: n, row: i } = e, { title: a } = t;
1363
1385
  function o() {
1364
1386
  if (t.id)
@@ -1403,7 +1425,7 @@ function vt(e) {
1403
1425
  }
1404
1426
  );
1405
1427
  }
1406
- function bt(e) {
1428
+ function Nt(e) {
1407
1429
  const { node: t, row: n } = e, {
1408
1430
  titlealign: i,
1409
1431
  title: a,
@@ -1438,13 +1460,13 @@ function bt(e) {
1438
1460
  gridColumn: 1,
1439
1461
  alignSelf: i ?? "center"
1440
1462
  },
1441
- children: /* @__PURE__ */ r(vt, { node: t, state: c, row: n })
1463
+ children: /* @__PURE__ */ r(bt, { node: t, state: c, row: n })
1442
1464
  }
1443
1465
  ),
1444
1466
  /* @__PURE__ */ r("div", { style: { gridColumn: 2 }, children: O(u, "k", !1) })
1445
1467
  ] });
1446
1468
  }
1447
- function Nt(e) {
1469
+ function Ct(e) {
1448
1470
  const { yamlNode: t, panel: n } = e, { type: i, children: a, options: o = {}, title: d, ...s } = t;
1449
1471
  return ue(t, s), /* @__PURE__ */ l(p, { className: "ymllayout-form", ...o, children: [
1450
1472
  t.title && /* @__PURE__ */ r(p.Header, { children: t.title }),
@@ -1456,18 +1478,18 @@ function Nt(e) {
1456
1478
  gridTemplateColumns: "min-content auto"
1457
1479
  },
1458
1480
  children: C(a, (h, u) => h.type === "formheader" ? /* @__PURE__ */ r(
1459
- yt,
1481
+ vt,
1460
1482
  {
1461
1483
  node: h,
1462
1484
  row: u
1463
1485
  },
1464
1486
  u
1465
- ) : /* @__PURE__ */ r(bt, { node: h, row: u }, u))
1487
+ ) : /* @__PURE__ */ r(Nt, { node: h, row: u }, u))
1466
1488
  }
1467
1489
  ) })
1468
1490
  ] });
1469
1491
  }
1470
- function Ct(e) {
1492
+ function Ot(e) {
1471
1493
  const { yamlNode: t, panel: n } = e;
1472
1494
  return /* @__PURE__ */ l(
1473
1495
  "div",
@@ -1498,27 +1520,27 @@ function Ct(e) {
1498
1520
  }
1499
1521
  );
1500
1522
  }
1501
- function Ot({ yamlNode: e, panel: t }) {
1523
+ function St({ yamlNode: e, panel: t }) {
1502
1524
  const n = e.options || {};
1503
- return /* @__PURE__ */ r(Ue, { panel: t, options: n, children: /* @__PURE__ */ r("div", { children: e.label }) });
1525
+ return /* @__PURE__ */ r(Ge, { panel: t, options: n, children: /* @__PURE__ */ r("div", { children: e.label }) });
1504
1526
  }
1505
- const St = {
1527
+ const Et = {
1506
1528
  row: lt,
1507
1529
  col: ct,
1508
- container: mt,
1509
- component: ft,
1510
- panel: pt,
1511
- tabs: wt,
1512
- form: Nt,
1513
- grid: Ct,
1514
- label: Ot
1530
+ container: pt,
1531
+ component: mt,
1532
+ panel: gt,
1533
+ tabs: yt,
1534
+ form: Ct,
1535
+ grid: Ot,
1536
+ label: St
1515
1537
  };
1516
- Object.entries(St).forEach(([e, t]) => {
1538
+ Object.entries(Et).forEach(([e, t]) => {
1517
1539
  qe(e, t);
1518
1540
  });
1519
- function Jt(e) {
1541
+ function Qt(e) {
1520
1542
  var n;
1521
- const t = xe(() => he(e.layout), [e.layout]);
1543
+ const t = Me(() => he(e.layout), [e.layout]);
1522
1544
  return t.error ? /* @__PURE__ */ r("div", { className: `${e.className ?? ""} ymllayout-main`, id: e.id, children: /* @__PURE__ */ l(p, { children: [
1523
1545
  /* @__PURE__ */ r(p.Header, { children: "Layout Error" }),
1524
1546
  /* @__PURE__ */ l(p.Contents, { children: [
@@ -1528,17 +1550,25 @@ function Jt(e) {
1528
1550
  ] }),
1529
1551
  /* @__PURE__ */ r(x, { variant: "warning", children: /* @__PURE__ */ r("pre", { className: "mb-0", children: t.error }) })
1530
1552
  ] })
1531
- ] }) }) : /* @__PURE__ */ r("div", { className: `${e.className ?? ""} ymllayout-main`, id: e.id, children: /* @__PURE__ */ r(Je, { resetKey: t, children: (n = t.children) == null ? void 0 : n.map((i, a) => O(i, a)) }) });
1553
+ ] }) }) : /* @__PURE__ */ r("div", { className: `${e.className ?? ""} ymllayout-main`, id: e.id, children: /* @__PURE__ */ r(
1554
+ Je,
1555
+ {
1556
+ resetKey: t,
1557
+ unhandledComponentDidCatch: e.unhandledComponentDidCatch,
1558
+ UnhandledErrorComponent: e.UnhandledErrorComponent,
1559
+ children: (n = t.children) == null ? void 0 : n.map((i, a) => O(i, a))
1560
+ }
1561
+ ) });
1532
1562
  }
1533
- const Qt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1563
+ const Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1534
1564
  __proto__: null
1535
- }, Symbol.toStringTag, { value: "Module" })), pe = {
1536
- hardware: kt
1565
+ }, Symbol.toStringTag, { value: "Module" })), ge = {
1566
+ hardware: It
1537
1567
  };
1538
- function Xt(e, t) {
1539
- pe[e] = t;
1568
+ function en(e, t) {
1569
+ ge[e] = t;
1540
1570
  }
1541
- function Et(e) {
1571
+ function xt(e) {
1542
1572
  return /* @__PURE__ */ l(
1543
1573
  E,
1544
1574
  {
@@ -1551,11 +1581,11 @@ function Et(e) {
1551
1581
  }
1552
1582
  );
1553
1583
  }
1554
- function en(e) {
1584
+ function tn(e) {
1555
1585
  const t = C(e.monitors, (n, i) => {
1556
- const a = n.type ?? "hardware", o = pe[a];
1586
+ const a = n.type ?? "hardware", o = ge[a];
1557
1587
  return o === void 0 ? /* @__PURE__ */ r(
1558
- Et,
1588
+ xt,
1559
1589
  {
1560
1590
  monitor: n,
1561
1591
  message: `Type ${a} unsupported`
@@ -1566,7 +1596,7 @@ function en(e) {
1566
1596
  return /* @__PURE__ */ r(
1567
1597
  "div",
1568
1598
  {
1569
- className: T(
1599
+ className: H(
1570
1600
  { "ms-auto": e.margin === "start" },
1571
1601
  "me-auto",
1572
1602
  "monitor-panel",
@@ -1576,19 +1606,19 @@ function en(e) {
1576
1606
  }
1577
1607
  );
1578
1608
  }
1579
- function xt(e) {
1609
+ function Mt(e) {
1580
1610
  return /* @__PURE__ */ r(E, { className: "monitor-panel-item", children: e.children });
1581
1611
  }
1582
1612
  const Z = {};
1583
- function tn(e, t) {
1613
+ function nn(e, t) {
1584
1614
  Z[e] = t;
1585
1615
  }
1586
- function ge(e) {
1616
+ function we(e) {
1587
1617
  if (!Z.useHardware)
1588
1618
  throw new Error("No `useHardware` hook registered");
1589
1619
  return Z.useHardware(e);
1590
1620
  }
1591
- const Mt = (e, t, n) => {
1621
+ const At = (e, t, n) => {
1592
1622
  const i = {
1593
1623
  ">": (a, o) => a > o,
1594
1624
  "<": (a, o) => a < o,
@@ -1601,36 +1631,36 @@ const Mt = (e, t, n) => {
1601
1631
  if (e in i)
1602
1632
  return i[e](t, n);
1603
1633
  };
1604
- function we(e, t, n) {
1634
+ function ye(e, t, n) {
1605
1635
  const i = e.split(t);
1606
1636
  return n ? [i.slice(0, -n).join(t)].concat(i.slice(-n)) : i;
1607
1637
  }
1608
1638
  function ae(e) {
1609
- const t = e !== void 0 ? we(e, ".", 1) : [null, ""], n = ge(t[0]);
1639
+ const t = e !== void 0 ? ye(e, ".", 1) : [null, ""], n = we(t[0]);
1610
1640
  if (n && n.properties && t[1] !== null)
1611
1641
  return Array.isArray(n.properties[t[1]]) ? n.properties[t[1]][0] : n.properties[t[1]];
1612
1642
  }
1613
- function At(e) {
1614
- const t = e !== void 0 && !e.includes("."), n = e !== void 0 ? we(e, ".", 1) : [null, ""], i = ge(n[0]);
1643
+ function kt(e) {
1644
+ const t = e !== void 0 && !e.includes("."), n = e !== void 0 ? ye(e, ".", 1) : [null, ""], i = we(n[0]);
1615
1645
  if (t)
1616
1646
  return e;
1617
1647
  if (i && i.properties && n[1] !== null)
1618
1648
  return `${i.properties[n[1]]}`;
1619
1649
  }
1620
- function kt(e) {
1650
+ function It(e) {
1621
1651
  const { monitor: t } = e;
1622
1652
  let n = ae(t.value) ?? "-";
1623
- const i = At(t.unit), a = ae(t.overlay), o = Number.parseFloat(`${n}`);
1653
+ const i = kt(t.unit), a = ae(t.overlay), o = Number.parseFloat(`${n}`);
1624
1654
  Number.isNaN(o) || String(o).length > 5 && (n = o.toPrecision(5));
1625
1655
  let d;
1626
- t.comparator && t.comparison && (d = Mt(t.comparator, n, t.comparison) ? "valid" : "invalid"), Number.isNaN(o) || i !== void 0 && (n = `${n} ${i}`);
1627
- let s = U;
1656
+ t.comparator && t.comparison && (d = At(t.comparator, n, t.comparison) ? "valid" : "invalid"), Number.isNaN(o) || i !== void 0 && (n = `${n} ${i}`);
1657
+ let s = q;
1628
1658
  const h = {};
1629
1659
  if (a) {
1630
1660
  const u = `${a}`;
1631
- let c = U;
1661
+ let c = q;
1632
1662
  u.includes(`
1633
- `) && (c = "pre"), s = F, h.placement = "bottom", h.overlay = /* @__PURE__ */ r(Ne, {
1663
+ `) && (c = "pre"), s = R, h.placement = "bottom", h.overlay = /* @__PURE__ */ r(Ce, {
1634
1664
  id: "tooltipid",
1635
1665
  className: "monitor-panel-tooltip",
1636
1666
  // @ts-expect-error
@@ -1639,47 +1669,49 @@ function kt(e) {
1639
1669
  }
1640
1670
  return (
1641
1671
  // @ts-expect-error
1642
- /* @__PURE__ */ Me(s, { ...h, key: t.name }, /* @__PURE__ */ l(xt, { children: [
1672
+ /* @__PURE__ */ Ae(s, { ...h, key: t.name }, /* @__PURE__ */ l(Mt, { children: [
1643
1673
  /* @__PURE__ */ r("h1", { children: t.name }),
1644
1674
  /* @__PURE__ */ r("div", { className: d, children: `${n}` })
1645
1675
  ] }))
1646
1676
  );
1647
1677
  }
1648
1678
  export {
1649
- Ht as Formatting,
1650
- _t as Frontend,
1651
- Ye as FullSizer,
1652
- Qt as HWObject,
1679
+ _t as Formatting,
1680
+ Pt as Frontend,
1681
+ Ue as FullSizer,
1682
+ Xt as HWObject,
1653
1683
  re as HardwareInputNumber,
1654
- _e as HardwareNumericStep,
1655
- Gt as HardwareSchema,
1656
- Vt as HardwareState,
1684
+ Pe as HardwareNumericStep,
1685
+ Wt as HardwareSchema,
1686
+ Lt as HardwareState,
1657
1687
  Y as HardwareTemplate,
1658
- Ut as HardwareTypes,
1688
+ Gt as HardwareTypes,
1659
1689
  qt as HardwareVariant,
1660
- Pt as Info,
1690
+ Vt as Info,
1661
1691
  g as KeyError,
1662
1692
  L as MissingKeysError,
1663
- kt as MonitorHardware,
1664
- en as MonitorPanel,
1665
- xt as MonitorPanelItem,
1666
- Lt as MotorDefault,
1667
- jt as Multiposition,
1668
- Yt as NoObject,
1669
- He as NumericStep,
1693
+ It as MonitorHardware,
1694
+ tn as MonitorPanel,
1695
+ Mt as MonitorPanelItem,
1696
+ jt as MotorDefault,
1697
+ Yt as Multiposition,
1698
+ Ut as NoObject,
1699
+ _e as NumericStep,
1700
+ p as Panel,
1670
1701
  Kt as Property,
1671
1702
  zt as ShutterDefault,
1672
- I as TypeIcon,
1703
+ D as TypeIcon,
1673
1704
  Je as YAMLErrorBoundary,
1674
- Jt as YAMLLayout,
1675
- Wt as YamlAsserts,
1676
- Mt as dynamicOp,
1677
- Bt as registerHardwareComponent,
1678
- Xt as registerMonitorComponent,
1679
- tn as registerRuntimeHook,
1680
- Zt as registerYamlComponent,
1705
+ Qt as YAMLLayout,
1706
+ Bt as YamlAsserts,
1707
+ At as dynamicOp,
1708
+ Zt as registerHardwareComponent,
1709
+ en as registerMonitorComponent,
1710
+ nn as registerRuntimeHook,
1711
+ ft as registerYamlComponent,
1712
+ Jt as registerYamlComponents,
1681
1713
  qe as registerYamlType,
1682
1714
  O as renderYamlNode,
1683
- St as yamlMap
1715
+ Et as yamlMap
1684
1716
  };
1685
- //# sourceMappingURL=index.esm.js.map
1717
+ //# sourceMappingURL=index.mjs.map