dhx-react-suite 1.1.2 → 1.1.4

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,6 +1,6 @@
1
- import { jsxs as g, jsx as t, Fragment as Ne } from "react/jsx-runtime";
2
- import { useEffect as H, useRef as q, useCallback as G, useState as C, useMemo as oe, createContext as je, useContext as Pe } from "react";
3
- import { Tooltip as Oe, Legend as Ye, CartesianGrid as Ke, XAxis as Se, YAxis as we, BarChart as Fe, Bar as Ve, LineChart as _e, Line as Xe, AreaChart as qe, Area as Ge, PieChart as Je, Pie as Ue, Cell as Qe, RadarChart as Ze, PolarGrid as et, PolarAngleAxis as tt, Radar as nt, ScatterChart as rt, Scatter as ot, ResponsiveContainer as it } from "recharts";
1
+ import { jsxs as x, jsx as t, Fragment as Ne } from "react/jsx-runtime";
2
+ import { useEffect as F, useRef as U, useCallback as Z, useState as L, useMemo as ue, createContext as Pe, useContext as je } from "react";
3
+ import { Tooltip as Oe, Legend as Ye, CartesianGrid as Fe, XAxis as Se, YAxis as we, BarChart as Ke, Bar as Ve, LineChart as _e, Line as Xe, AreaChart as qe, Area as Ge, PieChart as Je, Pie as Ue, Cell as Qe, RadarChart as Ze, PolarGrid as et, PolarAngleAxis as tt, PolarRadiusAxis as nt, Radar as rt, ScatterChart as ot, Scatter as it, ResponsiveContainer as lt, Treemap as st } from "recharts";
4
4
  const e = {
5
5
  primary: "#0288d1",
6
6
  primaryDk: "#01579b",
@@ -21,7 +21,7 @@ const e = {
21
21
  rMd: "8px",
22
22
  font: "'Segoe UI', system-ui, -apple-system, sans-serif"
23
23
  }, ze = "dhx-react-styles";
24
- function O() {
24
+ function V() {
25
25
  if (typeof document > "u" || document.getElementById(ze)) return;
26
26
  const n = document.createElement("style");
27
27
  n.id = ze, n.textContent = `
@@ -66,108 +66,108 @@ function O() {
66
66
  .dhx-tag-warning{background:#fff3e0;color:#e65100}
67
67
  `, document.head.appendChild(n);
68
68
  }
69
- const lt = {
69
+ const at = {
70
70
  sm: { height: 24, padding: "0 8px", fontSize: 12 },
71
71
  md: {},
72
72
  lg: { height: 38, padding: "0 18px", fontSize: 14 }
73
73
  };
74
- function St({
74
+ function Mt({
75
75
  children: n,
76
76
  variant: i = "primary",
77
77
  size: p = "md",
78
- icon: u,
79
- disabled: x,
80
- onClick: s,
81
- style: f,
82
- className: a = ""
78
+ icon: s,
79
+ disabled: f,
80
+ onClick: a,
81
+ style: h,
82
+ className: d = ""
83
83
  }) {
84
- return H(O, []), /* @__PURE__ */ g(
84
+ return F(V, []), /* @__PURE__ */ x(
85
85
  "button",
86
86
  {
87
- className: `dhx dhx-btn dhx-btn-${i} ${a}`,
88
- style: { ...lt[p], ...f },
89
- disabled: x,
90
- onClick: s,
87
+ className: `dhx dhx-btn dhx-btn-${i} ${d}`,
88
+ style: { ...at[p], ...h },
89
+ disabled: f,
90
+ onClick: a,
91
91
  children: [
92
- u && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: u }),
92
+ s && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: s }),
93
93
  n
94
94
  ]
95
95
  }
96
96
  );
97
97
  }
98
- function ie(n, i) {
99
- H(() => {
100
- const p = (u) => {
101
- n.current && !n.current.contains(u.target) && i(u);
98
+ function he(n, i) {
99
+ F(() => {
100
+ const p = (s) => {
101
+ n.current && !n.current.contains(s.target) && i(s);
102
102
  };
103
103
  return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
104
104
  }, [n, i]);
105
105
  }
106
- function st(n) {
107
- const i = q(!1), p = q({ x: 0, y: 0, ox: 0, oy: 0 });
108
- return G(
109
- (u, x = 0, s = 0) => {
110
- i.current = !0, p.current = { x: u.clientX, y: u.clientY, ox: x, oy: s };
111
- const f = (m) => {
106
+ function dt(n) {
107
+ const i = U(!1), p = U({ x: 0, y: 0, ox: 0, oy: 0 });
108
+ return Z(
109
+ (s, f = 0, a = 0) => {
110
+ i.current = !0, p.current = { x: s.clientX, y: s.clientY, ox: f, oy: a };
111
+ const h = (y) => {
112
112
  if (!i.current) return;
113
- const { x: z, y: r, ox: l, oy: d } = p.current;
114
- n(l + m.clientX - z, d + m.clientY - r);
115
- }, a = () => {
116
- i.current = !1, document.removeEventListener("mousemove", f), document.removeEventListener("mouseup", a);
113
+ const { x: w, y: r, ox: l, oy: c } = p.current;
114
+ n(l + y.clientX - w, c + y.clientY - r);
115
+ }, d = () => {
116
+ i.current = !1, document.removeEventListener("mousemove", h), document.removeEventListener("mouseup", d);
117
117
  };
118
- document.addEventListener("mousemove", f), document.addEventListener("mouseup", a), u.preventDefault();
118
+ document.addEventListener("mousemove", h), document.addEventListener("mouseup", d), s.preventDefault();
119
119
  },
120
120
  [n]
121
121
  );
122
122
  }
123
- function ae({ items: n, onSelect: i, style: p }) {
124
- const [u, x] = C(null);
125
- return /* @__PURE__ */ t("div", { className: "dhx dhx-anim-fade", style: { position: "absolute", top: "calc(100% + 4px)", left: 0, minWidth: 180, background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.r, boxShadow: e.shadowLg, zIndex: 200, padding: "4px 0", ...p }, children: n.map((s, f) => {
126
- var m, z;
127
- if (s.type === "separator") return /* @__PURE__ */ t("div", { style: { height: 1, background: e.border, margin: "4px 0" } }, f);
128
- const a = u === f;
129
- return /* @__PURE__ */ g("div", { style: { position: "relative" }, onMouseEnter: () => x(f), onMouseLeave: () => x(null), children: [
130
- /* @__PURE__ */ g(
123
+ function fe({ items: n, onSelect: i, style: p }) {
124
+ const [s, f] = L(null);
125
+ return /* @__PURE__ */ t("div", { className: "dhx dhx-anim-fade", style: { position: "absolute", top: "calc(100% + 4px)", left: 0, minWidth: 180, background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.r, boxShadow: e.shadowLg, zIndex: 200, padding: "4px 0", ...p }, children: n.map((a, h) => {
126
+ var y, w;
127
+ if (a.type === "separator") return /* @__PURE__ */ t("div", { style: { height: 1, background: e.border, margin: "4px 0" } }, h);
128
+ const d = s === h;
129
+ return /* @__PURE__ */ x("div", { style: { position: "relative" }, onMouseEnter: () => f(h), onMouseLeave: () => f(null), children: [
130
+ /* @__PURE__ */ x(
131
131
  "div",
132
132
  {
133
133
  onClick: () => {
134
134
  var r;
135
- return !s.disabled && !((r = s.items) != null && r.length) && i(s);
135
+ return !a.disabled && !((r = a.items) != null && r.length) && i(a);
136
136
  },
137
- style: { display: "flex", alignItems: "center", gap: 8, padding: "8px 14px", cursor: s.disabled ? "not-allowed" : "pointer", fontSize: 13, color: s.disabled ? e.textMut : e.text, background: a && !s.disabled ? e.bg : "transparent", opacity: s.disabled ? 0.5 : 1 },
137
+ style: { display: "flex", alignItems: "center", gap: 8, padding: "8px 14px", cursor: a.disabled ? "not-allowed" : "pointer", fontSize: 13, color: a.disabled ? e.textMut : e.text, background: d && !a.disabled ? e.bg : "transparent", opacity: a.disabled ? 0.5 : 1 },
138
138
  children: [
139
- s.icon && /* @__PURE__ */ t("span", { style: { fontSize: 15, width: 18, textAlign: "center" }, children: s.icon }),
140
- /* @__PURE__ */ t("span", { style: { flex: 1 }, children: s.value || s.id }),
141
- s.hotkey && /* @__PURE__ */ t("span", { style: { fontSize: 11, color: e.textMut }, children: s.hotkey }),
142
- (m = s.items) != null && m.length ? /* @__PURE__ */ t("span", { style: { fontSize: 10, color: e.textMut }, children: "▶" }) : null
139
+ a.icon && /* @__PURE__ */ t("span", { style: { fontSize: 15, width: 18, textAlign: "center" }, children: a.icon }),
140
+ /* @__PURE__ */ t("span", { style: { flex: 1 }, children: a.value || a.id }),
141
+ a.hotkey && /* @__PURE__ */ t("span", { style: { fontSize: 11, color: e.textMut }, children: a.hotkey }),
142
+ (y = a.items) != null && y.length ? /* @__PURE__ */ t("span", { style: { fontSize: 10, color: e.textMut }, children: "▶" }) : null
143
143
  ]
144
144
  }
145
145
  ),
146
- a && ((z = s.items) != null && z.length) ? /* @__PURE__ */ t(ae, { items: s.items, onSelect: i, style: { position: "absolute", left: "100%", top: -4 } }) : null
147
- ] }, s.id || f);
146
+ d && ((w = a.items) != null && w.length) ? /* @__PURE__ */ t(fe, { items: a.items, onSelect: i, style: { position: "absolute", left: "100%", top: -4 } }) : null
147
+ ] }, a.id || h);
148
148
  }) });
149
149
  }
150
- function wt({ items: n = [], label: i = "Menu", onSelect: p, style: u }) {
151
- const [x, s] = C(!1), f = q(null);
152
- return H(O, []), ie(f, G(() => s(!1), [])), /* @__PURE__ */ g("div", { ref: f, className: "dhx", style: { position: "relative", display: "inline-block", ...u }, children: [
153
- /* @__PURE__ */ g("button", { className: "dhx dhx-btn dhx-btn-secondary", onClick: () => s((a) => !a), children: [
150
+ function $t({ items: n = [], label: i = "Menu", onSelect: p, style: s }) {
151
+ const [f, a] = L(!1), h = U(null);
152
+ return F(V, []), he(h, Z(() => a(!1), [])), /* @__PURE__ */ x("div", { ref: h, className: "dhx", style: { position: "relative", display: "inline-block", ...s }, children: [
153
+ /* @__PURE__ */ x("button", { className: "dhx dhx-btn dhx-btn-secondary", onClick: () => a((d) => !d), children: [
154
154
  i,
155
155
  " ",
156
- /* @__PURE__ */ t("span", { style: { fontSize: 10 }, children: x ? "▲" : "▼" })
156
+ /* @__PURE__ */ t("span", { style: { fontSize: 10 }, children: f ? "▲" : "▼" })
157
157
  ] }),
158
- x && /* @__PURE__ */ t(ae, { items: n, onSelect: (a) => {
159
- p == null || p(a), s(!1);
158
+ f && /* @__PURE__ */ t(fe, { items: n, onSelect: (d) => {
159
+ p == null || p(d), a(!1);
160
160
  } })
161
161
  ] });
162
162
  }
163
- function zt({ items: n = [], onSelect: i, children: p }) {
164
- const [u, x] = C(null), s = q(null);
165
- return H(O, []), ie(s, G(() => x(null), [])), /* @__PURE__ */ g("div", { ref: s, onContextMenu: (a) => {
166
- a.preventDefault(), x({ x: a.clientX, y: a.clientY });
163
+ function Dt({ items: n = [], onSelect: i, children: p }) {
164
+ const [s, f] = L(null), a = U(null);
165
+ return F(V, []), he(a, Z(() => f(null), [])), /* @__PURE__ */ x("div", { ref: a, onContextMenu: (d) => {
166
+ d.preventDefault(), f({ x: d.clientX, y: d.clientY });
167
167
  }, style: { position: "relative", display: "contents" }, children: [
168
168
  p,
169
- u && /* @__PURE__ */ t("div", { style: { position: "fixed", left: u.x, top: u.y, zIndex: 9999 }, children: /* @__PURE__ */ t(ae, { items: n, onSelect: (a) => {
170
- i == null || i(a), x(null);
169
+ s && /* @__PURE__ */ t("div", { style: { position: "fixed", left: s.x, top: s.y, zIndex: 9999 }, children: /* @__PURE__ */ t(fe, { items: n, onSelect: (d) => {
170
+ i == null || i(d), f(null);
171
171
  } }) })
172
172
  ] });
173
173
  }
@@ -191,36 +191,36 @@ function Me({ count: n }) {
191
191
  pointerEvents: "none"
192
192
  }, children: n });
193
193
  }
194
- function Mt({ items: n = [], onAction: i, style: p }) {
195
- const [u, x] = C(null), [s, f] = C(() => {
194
+ function Ct({ items: n = [], onAction: i, style: p }) {
195
+ const [s, f] = L(null), [a, h] = L(() => {
196
196
  const r = {};
197
197
  return n.forEach((l) => {
198
198
  l.id && (l.twoState || l.group) && l.active && (r[l.id] = !0);
199
199
  }), r;
200
- }), a = q(null);
201
- H(O, []), ie(a, G(() => x(null), []));
202
- const m = (r, l) => {
203
- var d, y;
200
+ }), d = U(null);
201
+ F(V, []), he(d, Z(() => f(null), []));
202
+ const y = (r, l) => {
203
+ var c, b;
204
204
  if (!r.disabled) {
205
- if (r.twoState && r.id && f((o) => ({ ...o, [r.id]: !o[r.id] })), r.group && r.id && f((o) => {
206
- const b = { ...o };
207
- return n.forEach((v) => {
208
- v.group === r.group && v.id && (b[v.id] = !1);
209
- }), b[r.id] = !0, b;
210
- }), (d = r.items) != null && d.length) {
211
- x((o) => o === l ? null : l);
205
+ if (r.twoState && r.id && h((o) => ({ ...o, [r.id]: !o[r.id] })), r.group && r.id && h((o) => {
206
+ const g = { ...o };
207
+ return n.forEach((m) => {
208
+ m.group === r.group && m.id && (g[m.id] = !1);
209
+ }), g[r.id] = !0, g;
210
+ }), (c = r.items) != null && c.length) {
211
+ f((o) => o === l ? null : l);
212
212
  return;
213
213
  }
214
- (y = r.onClick) == null || y.call(r, r.id || ""), i == null || i(r.id || "");
214
+ (b = r.onClick) == null || b.call(r, r.id || ""), i == null || i(r.id || "");
215
215
  }
216
- }, z = (r, l) => {
217
- var b, v;
216
+ }, w = (r, l) => {
217
+ var g, m;
218
218
  if (r.hidden) return null;
219
219
  if (r.type === "separator") return /* @__PURE__ */ t("div", { style: { width: 1, background: e.border, margin: "6px 4px", alignSelf: "stretch" } }, l);
220
220
  if (r.type === "spacer") return /* @__PURE__ */ t("div", { style: { flex: 1 } }, l);
221
- if (r.type === "input") return /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
221
+ if (r.type === "input") return /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
222
222
  r.label && /* @__PURE__ */ t("span", { style: { fontSize: 12, color: e.textSec, fontWeight: 500 }, children: r.label }),
223
- /* @__PURE__ */ g("div", { style: { position: "relative", display: "flex", alignItems: "center" }, children: [
223
+ /* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems: "center" }, children: [
224
224
  r.icon && /* @__PURE__ */ t("span", { style: { position: "absolute", left: 8, color: e.textMut, fontSize: 15, pointerEvents: "none", zIndex: 1 }, children: r.icon }),
225
225
  /* @__PURE__ */ t(
226
226
  "input",
@@ -229,15 +229,15 @@ function Mt({ items: n = [], onAction: i, style: p }) {
229
229
  style: { width: r.width || 140, height: 28, paddingLeft: r.icon ? 30 : void 0 },
230
230
  placeholder: r.placeholder,
231
231
  defaultValue: r.value,
232
- onChange: (M) => {
233
- var D;
234
- return (D = r.onChange) == null ? void 0 : D.call(r, M.target.value);
232
+ onChange: ($) => {
233
+ var C;
234
+ return (C = r.onChange) == null ? void 0 : C.call(r, $.target.value);
235
235
  }
236
236
  }
237
237
  )
238
238
  ] })
239
239
  ] }, l);
240
- if (r.type === "select") return /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
240
+ if (r.type === "select") return /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
241
241
  r.label && /* @__PURE__ */ t("span", { style: { fontSize: 12, color: e.textSec, fontWeight: 500 }, children: r.label }),
242
242
  /* @__PURE__ */ t(
243
243
  "select",
@@ -245,15 +245,15 @@ function Mt({ items: n = [], onAction: i, style: p }) {
245
245
  className: "dhx dhx-input",
246
246
  style: { width: r.width || 100, height: 28, cursor: "pointer" },
247
247
  defaultValue: r.value,
248
- onChange: (M) => {
249
- var D;
250
- return (D = r.onChange) == null ? void 0 : D.call(r, M.target.value);
248
+ onChange: ($) => {
249
+ var C;
250
+ return (C = r.onChange) == null ? void 0 : C.call(r, $.target.value);
251
251
  },
252
- children: (b = r.options) == null ? void 0 : b.map((M) => /* @__PURE__ */ t("option", { value: M.value, children: M.label }, M.value))
252
+ children: (g = r.options) == null ? void 0 : g.map(($) => /* @__PURE__ */ t("option", { value: $.value, children: $.label }, $.value))
253
253
  }
254
254
  )
255
255
  ] }, l);
256
- if (r.type === "imageButton") return /* @__PURE__ */ g(
256
+ if (r.type === "imageButton") return /* @__PURE__ */ x(
257
257
  "button",
258
258
  {
259
259
  title: r.tooltip,
@@ -270,7 +270,7 @@ function Mt({ items: n = [], onAction: i, style: p }) {
270
270
  background: "transparent",
271
271
  flexShrink: 0
272
272
  },
273
- onClick: () => m(r, l),
273
+ onClick: () => y(r, l),
274
274
  children: [
275
275
  r.src && /* @__PURE__ */ t("img", { src: r.src, alt: r.value || "", style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "50%" } }),
276
276
  r.count !== void 0 && /* @__PURE__ */ t(Me, { count: r.count })
@@ -278,9 +278,9 @@ function Mt({ items: n = [], onAction: i, style: p }) {
278
278
  },
279
279
  l
280
280
  );
281
- const d = !!(r.id && s[r.id]), y = r.value ?? r.text, o = !!((v = r.items) != null && v.length);
282
- return /* @__PURE__ */ g("div", { style: { position: "relative" }, children: [
283
- /* @__PURE__ */ g(
281
+ const c = !!(r.id && a[r.id]), b = r.value ?? r.text, o = !!((m = r.items) != null && m.length);
282
+ return /* @__PURE__ */ x("div", { style: { position: "relative" }, children: [
283
+ /* @__PURE__ */ x(
284
284
  "button",
285
285
  {
286
286
  className: "dhx dhx-btn dhx-btn-ghost",
@@ -290,25 +290,25 @@ function Mt({ items: n = [], onAction: i, style: p }) {
290
290
  height: 32,
291
291
  gap: 4,
292
292
  position: "relative",
293
- background: d ? e.primaryLt : "transparent",
294
- color: d ? e.primary : r.disabled ? e.textMut : e.text,
293
+ background: c ? e.primaryLt : "transparent",
294
+ color: c ? e.primary : r.disabled ? e.textMut : e.text,
295
295
  opacity: r.disabled ? 0.55 : 1,
296
296
  cursor: r.disabled ? "not-allowed" : "pointer"
297
297
  },
298
- onClick: () => m(r, l),
298
+ onClick: () => y(r, l),
299
299
  children: [
300
300
  r.icon && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: r.icon }),
301
- y && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: y }),
301
+ b && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: b }),
302
302
  o && /* @__PURE__ */ t("span", { style: { fontSize: 9, opacity: 0.55, marginLeft: 2 }, children: "▼" }),
303
303
  r.count !== void 0 && /* @__PURE__ */ t(Me, { count: r.count })
304
304
  ]
305
305
  }
306
306
  ),
307
- o && u === l && /* @__PURE__ */ t(
308
- ae,
307
+ o && s === l && /* @__PURE__ */ t(
308
+ fe,
309
309
  {
310
310
  items: r.items,
311
- onSelect: () => x(null),
311
+ onSelect: () => f(null),
312
312
  style: { top: "100%", left: 0 }
313
313
  }
314
314
  )
@@ -317,7 +317,7 @@ function Mt({ items: n = [], onAction: i, style: p }) {
317
317
  return /* @__PURE__ */ t(
318
318
  "div",
319
319
  {
320
- ref: a,
320
+ ref: d,
321
321
  className: "dhx",
322
322
  style: {
323
323
  display: "flex",
@@ -330,50 +330,50 @@ function Mt({ items: n = [], onAction: i, style: p }) {
330
330
  flexWrap: "wrap",
331
331
  ...p
332
332
  },
333
- children: n.map(z)
333
+ children: n.map(w)
334
334
  }
335
335
  );
336
336
  }
337
- function $t({ items: n = [], width: i = 240, collapsed: p, onSelect: u, header: x, footer: s, style: f }) {
338
- const [a, m] = C(p ?? !1), [z, r] = C(null), [l, d] = C({});
339
- H(O, []);
340
- const y = a ? 56 : i, o = (v) => {
341
- r(v.id), u == null || u(v);
342
- }, b = (v, M = 0) => {
343
- var k;
344
- if (v.type === "separator") return /* @__PURE__ */ t("div", { style: { height: 1, background: e.border, margin: "6px 8px" } }, v.id);
345
- if (v.type === "customHTML") return /* @__PURE__ */ t("div", { style: { padding: "8px 12px" }, dangerouslySetInnerHTML: { __html: v.html || "" } }, v.id);
346
- const D = (((k = v.items) == null ? void 0 : k.length) ?? 0) > 0, T = l[v.id], h = z === v.id;
347
- return /* @__PURE__ */ g("div", { children: [
348
- /* @__PURE__ */ g(
337
+ function It({ items: n = [], width: i = 240, collapsed: p, onSelect: s, header: f, footer: a, style: h }) {
338
+ const [d, y] = L(p ?? !1), [w, r] = L(null), [l, c] = L({});
339
+ F(V, []);
340
+ const b = d ? 56 : i, o = (m) => {
341
+ r(m.id), s == null || s(m);
342
+ }, g = (m, $ = 0) => {
343
+ var M;
344
+ if (m.type === "separator") return /* @__PURE__ */ t("div", { style: { height: 1, background: e.border, margin: "6px 8px" } }, m.id);
345
+ if (m.type === "customHTML") return /* @__PURE__ */ t("div", { style: { padding: "8px 12px" }, dangerouslySetInnerHTML: { __html: m.html || "" } }, m.id);
346
+ const C = (((M = m.items) == null ? void 0 : M.length) ?? 0) > 0, N = l[m.id], k = w === m.id;
347
+ return /* @__PURE__ */ x("div", { children: [
348
+ /* @__PURE__ */ x(
349
349
  "div",
350
350
  {
351
351
  onClick: () => {
352
- D && d((E) => ({ ...E, [v.id]: !E[v.id] })), o(v);
352
+ C && c((W) => ({ ...W, [m.id]: !W[m.id] })), o(m);
353
353
  },
354
- style: { display: "flex", alignItems: "center", gap: 10, padding: `8px ${a ? "0px" : `${12 + M * 16}px`}`, cursor: "pointer", borderRadius: e.r, margin: "1px 6px", justifyContent: a ? "center" : "flex-start", transition: "all .15s", background: h ? e.primaryLt : "transparent", color: h ? e.primary : e.text, userSelect: "none" },
355
- onMouseEnter: (E) => !h && (E.currentTarget.style.background = e.bg),
356
- onMouseLeave: (E) => !h && (E.currentTarget.style.background = "transparent"),
354
+ style: { display: "flex", alignItems: "center", gap: 10, padding: `8px ${d ? "0px" : `${12 + $ * 16}px`}`, cursor: "pointer", borderRadius: e.r, margin: "1px 6px", justifyContent: d ? "center" : "flex-start", transition: "all .15s", background: k ? e.primaryLt : "transparent", color: k ? e.primary : e.text, userSelect: "none" },
355
+ onMouseEnter: (W) => !k && (W.currentTarget.style.background = e.bg),
356
+ onMouseLeave: (W) => !k && (W.currentTarget.style.background = "transparent"),
357
357
  children: [
358
- v.icon && /* @__PURE__ */ t("span", { style: { fontSize: 18, minWidth: 22, textAlign: "center" }, children: v.icon }),
359
- !a && /* @__PURE__ */ t("span", { style: { flex: 1, fontSize: 13, fontWeight: h ? 600 : 400 }, children: v.value }),
360
- !a && v.count !== void 0 && /* @__PURE__ */ t("span", { style: { background: e.primary, color: "#fff", borderRadius: 10, padding: "1px 6px", fontSize: 11, fontWeight: 700 }, children: v.count }),
361
- !a && D && /* @__PURE__ */ t("span", { style: { fontSize: 12, color: e.textMut, transition: "transform .15s", transform: T ? "rotate(90deg)" : "rotate(0deg)" }, children: "▶" })
358
+ m.icon && /* @__PURE__ */ t("span", { style: { fontSize: 18, minWidth: 22, textAlign: "center" }, children: m.icon }),
359
+ !d && /* @__PURE__ */ t("span", { style: { flex: 1, fontSize: 13, fontWeight: k ? 600 : 400 }, children: m.value }),
360
+ !d && m.count !== void 0 && /* @__PURE__ */ t("span", { style: { background: e.primary, color: "#fff", borderRadius: 10, padding: "1px 6px", fontSize: 11, fontWeight: 700 }, children: m.count }),
361
+ !d && C && /* @__PURE__ */ t("span", { style: { fontSize: 12, color: e.textMut, transition: "transform .15s", transform: N ? "rotate(90deg)" : "rotate(0deg)" }, children: "▶" })
362
362
  ]
363
363
  }
364
364
  ),
365
- D && T && !a && v.items.map((E) => b(E, M + 1))
366
- ] }, v.id);
365
+ C && N && !d && m.items.map((W) => g(W, $ + 1))
366
+ ] }, m.id);
367
367
  };
368
- return /* @__PURE__ */ g("div", { className: "dhx", style: { width: y, minWidth: y, background: e.surface, borderRight: `1px solid ${e.border}`, display: "flex", flexDirection: "column", transition: "width .2s ease", overflow: "hidden", ...f }, children: [
369
- x && !a && /* @__PURE__ */ t("div", { style: { padding: "12px 14px", borderBottom: `1px solid ${e.border}`, fontWeight: 700, fontSize: 15 }, children: x }),
370
- /* @__PURE__ */ t("button", { onClick: () => m((v) => !v), style: { margin: "8px 6px", background: "transparent", border: "none", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: a ? "center" : "flex-end", padding: "4px 6px", borderRadius: e.r, color: e.textSec }, children: /* @__PURE__ */ t("span", { style: { fontSize: 18 }, children: a ? "☰" : "✕" }) }),
371
- /* @__PURE__ */ t("div", { className: "dhx-scroll", style: { flex: 1, overflowY: "auto", overflowX: "hidden" }, children: n.map((v) => b(v)) }),
372
- s && !a && /* @__PURE__ */ t("div", { style: { padding: "10px 14px", borderTop: `1px solid ${e.border}` }, children: s })
368
+ return /* @__PURE__ */ x("div", { className: "dhx", style: { width: b, minWidth: b, background: e.surface, borderRight: `1px solid ${e.border}`, display: "flex", flexDirection: "column", transition: "width .2s ease", overflow: "hidden", ...h }, children: [
369
+ f && !d && /* @__PURE__ */ t("div", { style: { padding: "12px 14px", borderBottom: `1px solid ${e.border}`, fontWeight: 700, fontSize: 15 }, children: f }),
370
+ /* @__PURE__ */ t("button", { onClick: () => y((m) => !m), style: { margin: "8px 6px", background: "transparent", border: "none", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: d ? "center" : "flex-end", padding: "4px 6px", borderRadius: e.r, color: e.textSec }, children: /* @__PURE__ */ t("span", { style: { fontSize: 18 }, children: d ? "☰" : "✕" }) }),
371
+ /* @__PURE__ */ t("div", { className: "dhx-scroll", style: { flex: 1, overflowY: "auto", overflowX: "hidden" }, children: n.map((m) => g(m)) }),
372
+ a && !d && /* @__PURE__ */ t("div", { style: { padding: "10px 14px", borderTop: `1px solid ${e.border}` }, children: a })
373
373
  ] });
374
374
  }
375
- function at({ config: n }) {
376
- const [i, p] = C(!1), u = {
375
+ function ct({ config: n }) {
376
+ const [i, p] = L(!1), s = {
377
377
  position: "relative",
378
378
  background: e.surface,
379
379
  border: `1px solid ${e.border}`,
@@ -383,332 +383,421 @@ function at({ config: n }) {
383
383
  ...n.height ? { height: n.height, minHeight: n.height } : { minHeight: 40 },
384
384
  ...i ? { flex: "0 0 auto" } : {}
385
385
  };
386
- return /* @__PURE__ */ g("div", { style: u, children: [
387
- n.header && /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", padding: "6px 12px", background: e.bg, borderBottom: `1px solid ${e.border}`, fontSize: 12, fontWeight: 600, color: e.textSec, userSelect: "none" }, children: [
386
+ return /* @__PURE__ */ x("div", { style: s, children: [
387
+ n.header && /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", padding: "6px 12px", background: e.bg, borderBottom: `1px solid ${e.border}`, fontSize: 12, fontWeight: 600, color: e.textSec, userSelect: "none" }, children: [
388
388
  /* @__PURE__ */ t("span", { children: n.header }),
389
- n.collapsable && /* @__PURE__ */ t("button", { onClick: () => p((x) => !x), style: { background: "none", border: "none", cursor: "pointer", color: e.textMut, fontSize: 16, lineHeight: 1 }, children: i ? "▼" : "▲" })
389
+ n.collapsable && /* @__PURE__ */ t("button", { onClick: () => p((f) => !f), style: { background: "none", border: "none", cursor: "pointer", color: e.textMut, fontSize: 16, lineHeight: 1 }, children: i ? "▼" : "▲" })
390
390
  ] }),
391
- !i && /* @__PURE__ */ g("div", { style: { padding: n.padding || 0, height: n.header ? "calc(100% - 33px)" : "100%", overflow: "auto" }, children: [
391
+ !i && /* @__PURE__ */ x("div", { style: { padding: n.padding || 0, height: n.header ? "calc(100% - 33px)" : "100%", overflow: "auto" }, children: [
392
392
  n.html ? /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: n.html } }) : n.content,
393
- (n.rows || n.cols) && /* @__PURE__ */ t(dt, { rows: n.rows, cols: n.cols, style: { height: "100%" } })
393
+ (n.rows || n.cols) && /* @__PURE__ */ t(pt, { rows: n.rows, cols: n.cols, style: { height: "100%" } })
394
394
  ] })
395
395
  ] });
396
396
  }
397
- function dt({ rows: n, cols: i, type: p = "line", style: u, children: x }) {
398
- H(O, []);
399
- const s = p === "space" ? 12 : p === "wide" ? 8 : 1, f = n || i, a = !!n;
400
- return f ? /* @__PURE__ */ t("div", { className: "dhx", style: { display: "flex", flexDirection: a ? "column" : "row", gap: s, width: "100%", height: "100%", ...u }, children: f.map((m, z) => /* @__PURE__ */ t(at, { config: m }, m.id || z)) }) : /* @__PURE__ */ t("div", { className: "dhx", style: { width: "100%", height: "100%", ...u }, children: x });
397
+ function pt({ rows: n, cols: i, type: p = "line", style: s, children: f }) {
398
+ F(V, []);
399
+ const a = p === "space" ? 12 : p === "wide" ? 8 : 1, h = n || i, d = !!n;
400
+ return h ? /* @__PURE__ */ t("div", { className: "dhx", style: { display: "flex", flexDirection: d ? "column" : "row", gap: a, width: "100%", height: "100%", ...s }, children: h.map((y, w) => /* @__PURE__ */ t(ct, { config: y }, y.id || w)) }) : /* @__PURE__ */ t("div", { className: "dhx", style: { width: "100%", height: "100%", ...s }, children: f });
401
401
  }
402
- function Dt({ views: n = [], mode: i = "top", tabAlign: p = "left", closable: u = [], disabled: x = [], defaultActive: s, onBeforeChange: f, onChange: a, style: m }) {
403
- var h;
404
- const [z, r] = C(s || ((h = n[0]) == null ? void 0 : h.id)), [l, d] = C(n.map((k) => k.id));
405
- H(O, []);
406
- const y = (k, E) => {
407
- k.stopPropagation(), d((c) => c.filter((I) => I !== E)), z === E && r(l.find((c) => c !== E) ?? "");
408
- }, o = (k) => {
409
- x.includes(k) || f && f(k) === !1 || (r(k), a == null || a(k));
410
- }, b = i === "left" || i === "right", v = n.filter((k) => l.includes(k.id)), M = /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: b ? "column" : "row", justifyContent: p === "center" ? "center" : p === "right" ? "flex-end" : "flex-start", background: e.surface, borderBottom: !b && i !== "bottom" ? `2px solid ${e.border}` : "none", borderTop: i === "bottom" ? `2px solid ${e.border}` : "none", borderRight: i === "left" ? `2px solid ${e.border}` : "none", borderLeft: i === "right" ? `2px solid ${e.border}` : "none", overflowX: "auto", flexShrink: 0 }, children: v.map((k) => {
411
- const E = z === k.id, c = x.includes(k.id), I = i === "bottom" ? { borderTop: `2px solid ${e.primary}`, color: e.primary, fontWeight: 600 } : b ? { color: e.primary, fontWeight: 600, background: e.primaryLt, [i === "left" ? "borderRight" : "borderLeft"]: `2px solid ${e.primary}` } : { borderBottom: `2px solid ${e.primary}`, color: e.primary, fontWeight: 600 };
412
- return /* @__PURE__ */ g(
402
+ function Lt({ views: n = [], mode: i = "top", tabAlign: p = "left", closable: s = [], disabled: f = [], defaultActive: a, onBeforeChange: h, onChange: d, style: y }) {
403
+ var k;
404
+ const [w, r] = L(a || ((k = n[0]) == null ? void 0 : k.id)), [l, c] = L(n.map((M) => M.id));
405
+ F(V, []);
406
+ const b = (M, W) => {
407
+ M.stopPropagation(), c((u) => u.filter((I) => I !== W)), w === W && r(l.find((u) => u !== W) ?? "");
408
+ }, o = (M) => {
409
+ f.includes(M) || h && h(M) === !1 || (r(M), d == null || d(M));
410
+ }, g = i === "left" || i === "right", m = n.filter((M) => l.includes(M.id)), $ = /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: g ? "column" : "row", justifyContent: p === "center" ? "center" : p === "right" ? "flex-end" : "flex-start", background: e.surface, borderBottom: !g && i !== "bottom" ? `2px solid ${e.border}` : "none", borderTop: i === "bottom" ? `2px solid ${e.border}` : "none", borderRight: i === "left" ? `2px solid ${e.border}` : "none", borderLeft: i === "right" ? `2px solid ${e.border}` : "none", overflowX: "auto", flexShrink: 0 }, children: m.map((M) => {
411
+ const W = w === M.id, u = f.includes(M.id), I = i === "bottom" ? { borderTop: `2px solid ${e.primary}`, color: e.primary, fontWeight: 600 } : g ? { color: e.primary, fontWeight: 600, background: e.primaryLt, [i === "left" ? "borderRight" : "borderLeft"]: `2px solid ${e.primary}` } : { borderBottom: `2px solid ${e.primary}`, color: e.primary, fontWeight: 600 };
412
+ return /* @__PURE__ */ x(
413
413
  "div",
414
414
  {
415
- onClick: () => o(k.id),
416
- style: { display: "flex", alignItems: "center", gap: 6, padding: "10px 16px", cursor: c ? "not-allowed" : "pointer", whiteSpace: "nowrap", fontSize: 13, transition: "color .15s", userSelect: "none", minWidth: b ? 120 : "auto", ...E ? I : { color: c ? e.textMut : e.textSec } },
415
+ onClick: () => o(M.id),
416
+ style: { display: "flex", alignItems: "center", gap: 6, padding: "10px 16px", cursor: u ? "not-allowed" : "pointer", whiteSpace: "nowrap", fontSize: 13, transition: "color .15s", userSelect: "none", minWidth: g ? 120 : "auto", ...W ? I : { color: u ? e.textMut : e.textSec } },
417
417
  children: [
418
- k.icon && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: k.icon }),
419
- /* @__PURE__ */ t("span", { children: k.tab }),
420
- u.includes(k.id) && /* @__PURE__ */ t("span", { onClick: (S) => y(S, k.id), style: { marginLeft: 4, opacity: 0.6, fontSize: 12, cursor: "pointer" }, children: "✕" })
418
+ M.icon && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: M.icon }),
419
+ /* @__PURE__ */ t("span", { children: M.tab }),
420
+ s.includes(M.id) && /* @__PURE__ */ t("span", { onClick: (v) => b(v, M.id), style: { marginLeft: 4, opacity: 0.6, fontSize: 12, cursor: "pointer" }, children: "✕" })
421
421
  ]
422
422
  },
423
- k.id
423
+ M.id
424
424
  );
425
- }) }), D = v.find((k) => k.id === z), T = /* @__PURE__ */ g("div", { className: "dhx-scroll", style: { flex: 1, overflow: "auto" }, children: [
426
- D == null ? void 0 : D.content,
427
- (D == null ? void 0 : D.html) && /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: D.html }, style: { padding: 16 } })
425
+ }) }), C = m.find((M) => M.id === w), N = /* @__PURE__ */ x("div", { className: "dhx-scroll", style: { flex: 1, overflow: "auto" }, children: [
426
+ C == null ? void 0 : C.content,
427
+ (C == null ? void 0 : C.html) && /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: C.html }, style: { padding: 16 } })
428
428
  ] });
429
- return /* @__PURE__ */ g("div", { className: "dhx", style: { display: "flex", flexDirection: i === "top" ? "column" : i === "bottom" ? "column-reverse" : i === "left" ? "row" : "row-reverse", width: "100%", height: "100%", background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.r, overflow: "hidden", ...m }, children: [
430
- M,
431
- T
429
+ return /* @__PURE__ */ x("div", { className: "dhx", style: { display: "flex", flexDirection: i === "top" ? "column" : i === "bottom" ? "column-reverse" : i === "left" ? "row" : "row-reverse", width: "100%", height: "100%", background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.r, overflow: "hidden", ...y }, children: [
430
+ $,
431
+ N
432
432
  ] });
433
433
  }
434
- const Z = `1px solid ${e.border}`;
435
- function ct({ active: n, dir: i }) {
436
- return /* @__PURE__ */ g("span", { style: { display: "inline-flex", flexDirection: "column", gap: 1, flexShrink: 0, marginLeft: 4 }, children: [
434
+ const se = `1px solid ${e.border}`;
435
+ function ut({ active: n, dir: i }) {
436
+ return /* @__PURE__ */ x("span", { style: { display: "inline-flex", flexDirection: "column", gap: 1, flexShrink: 0, marginLeft: 4 }, children: [
437
437
  /* @__PURE__ */ t("svg", { width: "7", height: "4", viewBox: "0 0 7 4", children: /* @__PURE__ */ t("path", { d: "M3.5 0L7 4H0z", fill: n && i === "asc" ? e.primary : e.borderDk }) }),
438
438
  /* @__PURE__ */ t("svg", { width: "7", height: "4", viewBox: "0 0 7 4", children: /* @__PURE__ */ t("path", { d: "M3.5 4L0 0H7z", fill: n && i === "desc" ? e.primary : e.borderDk }) })
439
439
  ] });
440
440
  }
441
- function It({
441
+ function Tt({
442
442
  columns: n,
443
443
  data: i = [],
444
444
  height: p = 400,
445
- rowHeight: u = 40,
446
- sortable: x = !0,
447
- resizable: s = !0,
448
- editable: f = !1,
449
- stripe: a = !1,
450
- autoWidth: m = !1,
451
- keyNavigation: z = !1,
445
+ rowHeight: s = 40,
446
+ sortable: f = !0,
447
+ resizable: a = !0,
448
+ editable: h = !1,
449
+ stripe: d = !1,
450
+ autoWidth: y = !1,
451
+ keyNavigation: w = !1,
452
452
  selection: r,
453
453
  multiselect: l,
454
- onSelect: d,
455
- onChange: y,
454
+ onSelect: c,
455
+ onChange: b,
456
456
  style: o
457
457
  }) {
458
- const [b, v] = C(null), [M, D] = C("asc"), [T, h] = C({}), [k, E] = C(/* @__PURE__ */ new Set()), [c, I] = C(-1), [S, A] = C(() => n.map((w) => w.width ?? w.minWidth ?? 150)), [F, U] = C(null), [Q, de] = C(""), [le, ce] = C({}), L = q(null), [j, Y] = C(0);
459
- H(O, []), H(() => {
460
- if (!m || !L.current) return;
461
- const w = new ResizeObserver(() => {
462
- var $;
463
- return Y((($ = L.current) == null ? void 0 : $.offsetWidth) ?? 0);
458
+ const [g, m] = L(null), [$, C] = L("asc"), [N, k] = L({}), [M, W] = L(/* @__PURE__ */ new Set()), [u, I] = L(-1), [v, H] = L(() => n.map((S) => S.width ?? S.minWidth ?? 150)), [_, G] = L(null), [Q, re] = L(""), [ee, T] = L({}), z = U(null), [A, P] = L(0);
459
+ F(V, []), F(() => {
460
+ if (!y || !z.current) return;
461
+ const S = new ResizeObserver(() => {
462
+ var D;
463
+ return P(((D = z.current) == null ? void 0 : D.offsetWidth) ?? 0);
464
464
  });
465
- return w.observe(L.current), () => w.disconnect();
466
- }, [m]);
467
- const V = oe(() => {
468
- if (!m || j === 0) return S;
469
- const w = S.reduce((R, N) => R + N, 0);
470
- if (j <= w) return S;
471
- const $ = (j - w) / n.length;
472
- return S.map((R) => R + $);
473
- }, [m, j, S, n.length]), K = oe(() => {
474
- let w = i.map(($, R) => {
475
- const N = String($.id ?? R);
476
- return le[N] ? { ...$, ...le[N] } : $;
465
+ return S.observe(z.current), () => S.disconnect();
466
+ }, [y]);
467
+ const O = ue(() => {
468
+ if (!y || A === 0) return v;
469
+ const S = v.reduce((E, R) => E + R, 0);
470
+ if (A <= S) return v;
471
+ const D = (A - S) / n.length;
472
+ return v.map((E) => E + D);
473
+ }, [y, A, v, n.length]), j = ue(() => {
474
+ let S = i.map((D, E) => {
475
+ const R = String(D.id ?? E);
476
+ return ee[R] ? { ...D, ...ee[R] } : D;
477
477
  }).filter(
478
- ($) => Object.entries(T).every(([R, N]) => !N || String($[R] ?? "").toLowerCase().includes(N.toLowerCase()))
478
+ (D) => Object.entries(N).every(([E, R]) => !R || String(D[E] ?? "").toLowerCase().includes(R.toLowerCase()))
479
479
  );
480
- return b && (w = [...w].sort(($, R) => {
481
- const N = $[b], P = R[b];
482
- if (N == null) return 1;
483
- if (P == null) return -1;
484
- const B = N < P ? -1 : N > P ? 1 : 0;
485
- return M === "asc" ? B : -B;
486
- })), w;
487
- }, [i, b, M, T, le]), J = oe(() => {
488
- const w = {};
489
- return n.forEach(($) => {
490
- var R;
491
- if ((R = $.footer) != null && R.some((N) => N.summary)) {
492
- const N = K.map((B) => Number(B[$.id])).filter((B) => !isNaN(B)), P = N.reduce((B, te) => B + te, 0);
493
- w[$.id] = { sum: P, avg: N.length ? P / N.length : 0, count: K.length, min: N.length ? Math.min(...N) : 0, max: N.length ? Math.max(...N) : 0 };
480
+ return g && (S = [...S].sort((D, E) => {
481
+ const R = D[g], K = E[g];
482
+ if (R == null) return 1;
483
+ if (K == null) return -1;
484
+ const Y = R < K ? -1 : R > K ? 1 : 0;
485
+ return $ === "asc" ? Y : -Y;
486
+ })), S;
487
+ }, [i, g, $, N, ee]), J = ue(() => {
488
+ const S = {};
489
+ return n.forEach((D) => {
490
+ var E;
491
+ if ((E = D.footer) != null && E.some((R) => R.summary)) {
492
+ const R = j.map((Y) => Number(Y[D.id])).filter((Y) => !isNaN(Y)), K = R.reduce((Y, de) => Y + de, 0);
493
+ S[D.id] = { sum: K, avg: R.length ? K / R.length : 0, count: j.length, min: R.length ? Math.min(...R) : 0, max: R.length ? Math.max(...R) : 0 };
494
494
  }
495
- }), w;
496
- }, [K, n]), X = oe(() => {
497
- const w = {};
498
- return n.filter(($) => $.filterType === "select").forEach(($) => {
499
- w[$.id] = [...new Set(i.map((R) => String(R[$.id] ?? "")))].sort();
500
- }), w;
501
- }, [i, n]), pe = n.some((w) => w.filterable), ue = n.some((w) => {
502
- var $;
503
- return ($ = w.footer) == null ? void 0 : $.length;
504
- }), fe = V.reduce((w, $) => w + $, 0), se = (w, $) => w.id ?? $, he = (w) => {
505
- !x || w.sortable === !1 || (D(($) => b === w.id && $ === "asc" ? "desc" : "asc"), v(w.id));
506
- }, W = (w, $) => {
495
+ }), S;
496
+ }, [j, n]), X = ue(() => {
497
+ const S = {};
498
+ return n.filter((D) => D.filterType === "select").forEach((D) => {
499
+ S[D.id] = [...new Set(i.map((E) => String(E[D.id] ?? "")))].sort();
500
+ }), S;
501
+ }, [i, n]), oe = n.some((S) => S.filterable), te = n.some((S) => {
502
+ var D;
503
+ return (D = S.footer) == null ? void 0 : D.length;
504
+ }), ie = O.reduce((S, D) => S + D, 0), le = (S, D) => S.id ?? D, ae = (S) => {
505
+ !f || S.sortable === !1 || (C((D) => g === S.id && D === "asc" ? "desc" : "asc"), m(S.id));
506
+ }, B = (S, D) => {
507
507
  if (!r) return;
508
- const R = se(w, $);
509
- I($), E((N) => {
510
- const P = l ? new Set(N) : /* @__PURE__ */ new Set();
511
- return P.has(R) ? P.delete(R) : P.add(R), P;
512
- }), d == null || d(w);
513
- }, ee = () => {
514
- if (!F) return;
515
- const { key: w, colId: $ } = F;
516
- ce((N) => ({ ...N, [String(w)]: { ...N[String(w)] || {}, [$]: Q } }));
517
- const R = K.find((N, P) => se(N, P) === w);
518
- R && (y == null || y(R, $, Q)), U(null);
519
- }, Ae = (w) => {
520
- if (F && w.key === "Escape") {
521
- U(null);
508
+ const E = le(S, D);
509
+ I(D), W((R) => {
510
+ const K = l ? new Set(R) : /* @__PURE__ */ new Set();
511
+ return K.has(E) ? K.delete(E) : K.add(E), K;
512
+ }), c == null || c(S);
513
+ }, ne = () => {
514
+ if (!_) return;
515
+ const { key: S, colId: D } = _;
516
+ T((R) => ({ ...R, [String(S)]: { ...R[String(S)] || {}, [D]: Q } }));
517
+ const E = j.find((R, K) => le(R, K) === S);
518
+ E && (b == null || b(E, D, Q)), G(null);
519
+ }, Ae = (S) => {
520
+ if (_ && S.key === "Escape") {
521
+ G(null);
522
522
  return;
523
523
  }
524
- if (!(!z || !r)) {
525
- if (w.key === "ArrowDown") {
526
- w.preventDefault();
527
- const $ = Math.min(c + 1, K.length - 1);
528
- $ >= 0 && W(K[$], $);
529
- } else if (w.key === "ArrowUp") {
530
- w.preventDefault();
531
- const $ = Math.max(c - 1, 0);
532
- $ >= 0 && W(K[$], $);
524
+ if (!(!w || !r)) {
525
+ if (S.key === "ArrowDown") {
526
+ S.preventDefault();
527
+ const D = Math.min(u + 1, j.length - 1);
528
+ D >= 0 && B(j[D], D);
529
+ } else if (S.key === "ArrowUp") {
530
+ S.preventDefault();
531
+ const D = Math.max(u - 1, 0);
532
+ D >= 0 && B(j[D], D);
533
533
  }
534
534
  }
535
- }, Be = (w, $) => {
536
- w.preventDefault(), w.stopPropagation();
537
- const R = w.clientX, N = S[$], P = (te) => A((ge) => {
538
- const ne = [...ge];
539
- return ne[$] = Math.max(n[$].minWidth || 50, N + te.clientX - R), ne;
540
- }), B = () => {
541
- document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", B);
535
+ }, Be = (S, D) => {
536
+ S.preventDefault(), S.stopPropagation();
537
+ const E = S.clientX, R = v[D], K = (de) => H((ge) => {
538
+ const ce = [...ge];
539
+ return ce[D] = Math.max(n[D].minWidth || 50, R + de.clientX - E), ce;
540
+ }), Y = () => {
541
+ document.removeEventListener("mousemove", K), document.removeEventListener("mouseup", Y);
542
542
  };
543
- document.addEventListener("mousemove", P), document.addEventListener("mouseup", B);
544
- }, xe = (w, $, R, N) => ({
545
- width: w,
546
- minWidth: w,
543
+ document.addEventListener("mousemove", K), document.addEventListener("mouseup", Y);
544
+ }, xe = (S, D, E, R) => ({
545
+ width: S,
546
+ minWidth: S,
547
547
  flexShrink: 0,
548
548
  boxSizing: "border-box",
549
549
  padding: "0 12px",
550
- height: N,
550
+ height: R,
551
551
  display: "flex",
552
552
  alignItems: "center",
553
553
  overflow: "hidden",
554
554
  textOverflow: "ellipsis",
555
555
  whiteSpace: "nowrap",
556
556
  fontSize: 13,
557
- textAlign: $.align,
558
- justifyContent: $.align === "center" ? "center" : $.align === "right" ? "flex-end" : "flex-start",
559
- borderLeft: R ? "none" : Z
557
+ textAlign: D.align,
558
+ justifyContent: D.align === "center" ? "center" : D.align === "right" ? "flex-end" : "flex-start",
559
+ borderLeft: E ? "none" : se
560
560
  });
561
561
  return /* @__PURE__ */ t(
562
562
  "div",
563
563
  {
564
- ref: L,
564
+ ref: z,
565
565
  className: "dhx",
566
- tabIndex: z ? 0 : void 0,
566
+ tabIndex: w ? 0 : void 0,
567
567
  onKeyDown: Ae,
568
- style: { width: "100%", height: p, display: "flex", flexDirection: "column", border: Z, borderRadius: e.r, overflow: "hidden", outline: "none", ...o },
569
- children: /* @__PURE__ */ t("div", { style: { overflowX: "auto", flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: /* @__PURE__ */ g("div", { style: { minWidth: fe, display: "flex", flexDirection: "column", height: "100%" }, children: [
570
- /* @__PURE__ */ t("div", { style: { display: "flex", background: e.bg, borderBottom: Z, flexShrink: 0, position: "sticky", top: 0, zIndex: 2 }, children: n.map((w, $) => {
571
- var R;
572
- return /* @__PURE__ */ g(
568
+ style: { width: "100%", height: p, display: "flex", flexDirection: "column", border: se, borderRadius: e.r, overflow: "hidden", outline: "none", ...o },
569
+ children: /* @__PURE__ */ t("div", { style: { overflowX: "auto", flex: 1, display: "flex", flexDirection: "column", minHeight: 0 }, children: /* @__PURE__ */ x("div", { style: { minWidth: ie, display: "flex", flexDirection: "column", height: "100%" }, children: [
570
+ /* @__PURE__ */ t("div", { style: { display: "flex", background: e.bg, borderBottom: se, flexShrink: 0, position: "sticky", top: 0, zIndex: 2 }, children: n.map((S, D) => {
571
+ var E;
572
+ return /* @__PURE__ */ x(
573
573
  "div",
574
574
  {
575
- onClick: () => he(w),
575
+ onClick: () => ae(S),
576
576
  style: {
577
- ...xe(V[$], w, $ === 0, 40),
577
+ ...xe(O[D], S, D === 0, 40),
578
578
  position: "relative",
579
579
  fontWeight: 500,
580
580
  color: e.text,
581
- cursor: x && w.sortable !== !1 ? "pointer" : "default",
581
+ cursor: f && S.sortable !== !1 ? "pointer" : "default",
582
582
  userSelect: "none"
583
583
  },
584
584
  children: [
585
- /* @__PURE__ */ t("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: Array.isArray(w.header) ? (R = w.header[0]) == null ? void 0 : R.text : w.header || w.id }),
586
- x && w.sortable !== !1 && /* @__PURE__ */ t(ct, { active: b === w.id, dir: M }),
587
- s && w.resizable !== !1 && $ < n.length - 1 && /* @__PURE__ */ t(
585
+ /* @__PURE__ */ t("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: Array.isArray(S.header) ? (E = S.header[0]) == null ? void 0 : E.text : S.header || S.id }),
586
+ f && S.sortable !== !1 && /* @__PURE__ */ t(ut, { active: g === S.id, dir: $ }),
587
+ a && S.resizable !== !1 && D < n.length - 1 && /* @__PURE__ */ t(
588
588
  "div",
589
589
  {
590
- onMouseDown: (N) => Be(N, $),
591
- onClick: (N) => N.stopPropagation(),
590
+ onMouseDown: (R) => Be(R, D),
591
+ onClick: (R) => R.stopPropagation(),
592
592
  style: { position: "absolute", right: 0, top: 0, bottom: 0, width: 4, cursor: "col-resize", zIndex: 1 },
593
- onMouseEnter: (N) => N.currentTarget.style.background = e.primary + "55",
594
- onMouseLeave: (N) => N.currentTarget.style.background = "transparent"
593
+ onMouseEnter: (R) => R.currentTarget.style.background = e.primary + "55",
594
+ onMouseLeave: (R) => R.currentTarget.style.background = "transparent"
595
595
  }
596
596
  )
597
597
  ]
598
598
  },
599
- w.id
599
+ S.id
600
600
  );
601
601
  }) }),
602
- pe && /* @__PURE__ */ t("div", { style: { display: "flex", borderBottom: Z, background: e.surface, flexShrink: 0 }, children: n.map((w, $) => /* @__PURE__ */ t("div", { style: { width: V[$], minWidth: V[$], flexShrink: 0, padding: "4px 6px", boxSizing: "border-box", borderLeft: $ === 0 ? "none" : Z }, children: w.filterable && w.filterType === "select" ? /* @__PURE__ */ g(
602
+ oe && /* @__PURE__ */ t("div", { style: { display: "flex", borderBottom: se, background: e.surface, flexShrink: 0 }, children: n.map((S, D) => /* @__PURE__ */ t("div", { style: { width: O[D], minWidth: O[D], flexShrink: 0, padding: "4px 6px", boxSizing: "border-box", borderLeft: D === 0 ? "none" : se }, children: S.filterable && S.filterType === "select" ? /* @__PURE__ */ x(
603
603
  "select",
604
604
  {
605
605
  className: "dhx dhx-input",
606
606
  style: { height: 26, fontSize: 12, padding: "0 4px" },
607
- value: T[w.id] || "",
608
- onChange: (R) => h((N) => ({ ...N, [w.id]: R.target.value })),
607
+ value: N[S.id] || "",
608
+ onChange: (E) => k((R) => ({ ...R, [S.id]: E.target.value })),
609
609
  children: [
610
610
  /* @__PURE__ */ t("option", { value: "", children: "All" }),
611
- (X[w.id] || []).map((R) => /* @__PURE__ */ t("option", { value: R, children: R }, R))
611
+ (X[S.id] || []).map((E) => /* @__PURE__ */ t("option", { value: E, children: E }, E))
612
612
  ]
613
613
  }
614
- ) : w.filterable ? /* @__PURE__ */ t(
614
+ ) : S.filterable ? /* @__PURE__ */ t(
615
615
  "input",
616
616
  {
617
617
  className: "dhx dhx-input",
618
618
  style: { height: 26, fontSize: 12 },
619
619
  placeholder: "Filter...",
620
- value: T[w.id] || "",
621
- onChange: (R) => h((N) => ({ ...N, [w.id]: R.target.value }))
620
+ value: N[S.id] || "",
621
+ onChange: (E) => k((R) => ({ ...R, [S.id]: E.target.value }))
622
622
  }
623
- ) : null }, w.id)) }),
624
- /* @__PURE__ */ g("div", { className: "dhx-scroll", style: { flex: 1, overflowY: "auto", minHeight: 0 }, children: [
625
- K.map((w, $) => {
626
- const R = se(w, $), N = k.has(R), P = N ? e.primaryLt : a && $ % 2 !== 0 ? e.bg : e.surface;
623
+ ) : null }, S.id)) }),
624
+ /* @__PURE__ */ x("div", { className: "dhx-scroll", style: { flex: 1, overflowY: "auto", minHeight: 0 }, children: [
625
+ j.map((S, D) => {
626
+ const E = le(S, D), R = M.has(E), K = R ? e.primaryLt : d && D % 2 !== 0 ? e.bg : e.surface;
627
627
  return /* @__PURE__ */ t(
628
628
  "div",
629
629
  {
630
- style: { display: "flex", height: u, borderBottom: Z, flexShrink: 0, background: P, transition: "background .1s", cursor: r ? "pointer" : "default" },
631
- onMouseEnter: (B) => !N && (B.currentTarget.style.background = e.primaryLt + "80"),
632
- onMouseLeave: (B) => !N && (B.currentTarget.style.background = P),
633
- children: n.map((B, te) => {
634
- const ge = (F == null ? void 0 : F.key) === R && (F == null ? void 0 : F.colId) === B.id, ne = w[B.id], He = B.template ? B.template(ne, w) : String(ne ?? "");
630
+ style: { display: "flex", height: s, borderBottom: se, flexShrink: 0, background: K, transition: "background .1s", cursor: r ? "pointer" : "default" },
631
+ onMouseEnter: (Y) => !R && (Y.currentTarget.style.background = e.primaryLt + "80"),
632
+ onMouseLeave: (Y) => !R && (Y.currentTarget.style.background = K),
633
+ children: n.map((Y, de) => {
634
+ const ge = (_ == null ? void 0 : _.key) === E && (_ == null ? void 0 : _.colId) === Y.id, ce = S[Y.id], He = Y.template ? Y.template(ce, S) : String(ce ?? "");
635
635
  return /* @__PURE__ */ t(
636
636
  "div",
637
637
  {
638
638
  onClick: () => {
639
- W(w, $), f && B.editable !== !1 && (U({ key: R, colId: B.id }), de(String(ne ?? "")));
639
+ B(S, D), h && Y.editable !== !1 && (G({ key: E, colId: Y.id }), re(String(ce ?? "")));
640
640
  },
641
- style: xe(V[te], B, te === 0, u),
641
+ style: xe(O[de], Y, de === 0, s),
642
642
  children: ge ? /* @__PURE__ */ t(
643
643
  "input",
644
644
  {
645
645
  autoFocus: !0,
646
646
  value: Q,
647
- onChange: (re) => de(re.target.value),
648
- onBlur: ee,
649
- onKeyDown: (re) => {
650
- re.key === "Enter" && ee(), re.key === "Escape" && U(null);
647
+ onChange: (pe) => re(pe.target.value),
648
+ onBlur: ne,
649
+ onKeyDown: (pe) => {
650
+ pe.key === "Enter" && ne(), pe.key === "Escape" && G(null);
651
651
  },
652
- onClick: (re) => re.stopPropagation(),
652
+ onClick: (pe) => pe.stopPropagation(),
653
653
  style: { width: "100%", border: "none", outline: `2px solid ${e.primary}`, borderRadius: 2, fontSize: 13, padding: "2px 4px", background: e.surface, color: e.text }
654
654
  }
655
655
  ) : He
656
656
  },
657
- B.id
657
+ Y.id
658
658
  );
659
659
  })
660
660
  },
661
- String(R)
661
+ String(E)
662
662
  );
663
663
  }),
664
- K.length === 0 && /* @__PURE__ */ t("div", { style: { textAlign: "center", padding: 40, color: e.textMut, fontSize: 13 }, children: "No data" })
664
+ j.length === 0 && /* @__PURE__ */ t("div", { style: { textAlign: "center", padding: 40, color: e.textMut, fontSize: 13 }, children: "No data" })
665
665
  ] }),
666
- ue && /* @__PURE__ */ t("div", { style: { display: "flex", borderTop: Z, background: e.bg, flexShrink: 0 }, children: n.map((w, $) => {
667
- var B;
668
- const R = (B = w.footer) == null ? void 0 : B[0], N = J[w.id] ?? { sum: 0, avg: 0, count: 0, min: 0, max: 0 };
669
- let P = "";
670
- return R && (typeof R.text == "function" ? P = R.text(N) : R.text ? P = R.text : R.summary && (P = String(Math.round(N[R.summary] * 100) / 100))), /* @__PURE__ */ t("div", { style: { ...xe(V[$], w, $ === 0, 40), fontWeight: 600, color: e.text }, children: P }, w.id);
666
+ te && /* @__PURE__ */ t("div", { style: { display: "flex", borderTop: se, background: e.bg, flexShrink: 0 }, children: n.map((S, D) => {
667
+ var Y;
668
+ const E = (Y = S.footer) == null ? void 0 : Y[0], R = J[S.id] ?? { sum: 0, avg: 0, count: 0, min: 0, max: 0 };
669
+ let K = "";
670
+ return E && (typeof E.text == "function" ? K = E.text(R) : E.text ? K = E.text : E.summary && (K = String(Math.round(R[E.summary] * 100) / 100))), /* @__PURE__ */ t("div", { style: { ...xe(O[D], S, D === 0, 40), fontWeight: 600, color: e.text }, children: K }, S.id);
671
671
  }) })
672
672
  ] }) })
673
673
  }
674
674
  );
675
675
  }
676
- const _ = ["#0288d1", "#43a047", "#f57c00", "#e53935", "#8e24aa", "#00838f", "#ef6c00", "#2e7d32"];
677
- function Ct({ type: n = "bar", data: i = [], series: p = [], scales: u = {}, legend: x, height: s = 280, style: f }) {
678
- var b, v, M, D, T;
679
- H(O, []);
680
- const a = ((b = u.bottom) == null ? void 0 : b.text) || i[0] && Object.keys(i[0])[0] || "x", m = /* @__PURE__ */ t(Oe, { contentStyle: { fontSize: 12, borderRadius: e.r, border: `1px solid ${e.border}` } }), z = x ? /* @__PURE__ */ t(Ye, { iconSize: 10, wrapperStyle: { fontSize: 12 }, verticalAlign: x.valign, align: x.halign }) : null, r = /* @__PURE__ */ t(Ke, { strokeDasharray: "3 3", stroke: e.border }), l = /* @__PURE__ */ t(Se, { dataKey: a, tick: { fontSize: 11, fill: e.textSec }, axisLine: { stroke: e.border }, tickLine: !1 }), d = /* @__PURE__ */ t(we, { tick: { fontSize: 11, fill: e.textSec }, axisLine: !1, tickLine: !1, domain: [((v = u.left) == null ? void 0 : v.min) ?? "auto", ((M = u.left) == null ? void 0 : M.max) ?? "auto"] }), y = { data: i, margin: { top: 10, right: 20, left: 0, bottom: 0 } };
681
- let o;
676
+ const q = ["#0288d1", "#43a047", "#f57c00", "#e53935", "#8e24aa", "#00838f", "#ef6c00", "#2e7d32"];
677
+ function ht(n, i, p) {
678
+ const s = n.filter((a) => !a.parent), f = n.filter((a) => !!a.parent);
679
+ return s.map((a) => ({
680
+ name: a[p],
681
+ children: f.filter((h) => h.parent === a.id).map((h) => ({ name: h[p], value: Number(h[i] ?? 0) }))
682
+ }));
683
+ }
684
+ function Nt({
685
+ type: n = "bar",
686
+ data: i = [],
687
+ series: p = [],
688
+ scales: s = {},
689
+ legend: f,
690
+ height: a = 280,
691
+ style: h
692
+ }) {
693
+ var m, $, C, N, k, M, W, u, I, v, H, _, G, Q, re, ee;
694
+ F(V, []);
695
+ const d = ((m = s.bottom) == null ? void 0 : m.text) || i[0] && Object.keys(i[0])[0] || "x", y = /* @__PURE__ */ t(
696
+ Oe,
697
+ {
698
+ contentStyle: { fontSize: 12, borderRadius: e.r, border: `1px solid ${e.border}` }
699
+ }
700
+ ), w = f ? /* @__PURE__ */ t(
701
+ Ye,
702
+ {
703
+ iconSize: 10,
704
+ wrapperStyle: { fontSize: 12 },
705
+ verticalAlign: f.valign === "bottom" ? "bottom" : f.valign === "middle" ? "middle" : "top",
706
+ align: f.halign ?? "center"
707
+ }
708
+ ) : null, r = /* @__PURE__ */ t(Fe, { strokeDasharray: "3 3", stroke: e.border }), l = /* @__PURE__ */ t(
709
+ Se,
710
+ {
711
+ dataKey: d,
712
+ tick: { fontSize: 11, fill: e.textSec },
713
+ axisLine: { stroke: e.border },
714
+ tickLine: !1,
715
+ label: ($ = s.bottom) != null && $.title ? { value: s.bottom.title, position: "insideBottom", offset: -4, fontSize: 11 } : void 0
716
+ }
717
+ ), c = /* @__PURE__ */ t(
718
+ we,
719
+ {
720
+ tick: { fontSize: 11, fill: e.textSec },
721
+ axisLine: !1,
722
+ tickLine: !1,
723
+ domain: [((C = s.left) == null ? void 0 : C.min) ?? "auto", ((N = s.left) == null ? void 0 : N.max) ?? "auto"],
724
+ tickCount: (k = s.left) == null ? void 0 : k.maxTicks,
725
+ label: (M = s.left) != null && M.title ? { value: s.left.title, angle: -90, position: "insideLeft", fontSize: 11 } : void 0
726
+ }
727
+ ), b = {
728
+ top: 10,
729
+ right: 20,
730
+ left: 0,
731
+ bottom: (W = s.bottom) != null && W.title ? 20 : 0
732
+ }, o = { data: i, margin: b };
733
+ let g;
682
734
  if (n === "bar")
683
- o = /* @__PURE__ */ g(Fe, { ...y, children: [
735
+ g = /* @__PURE__ */ x(Ke, { ...o, children: [
684
736
  r,
685
737
  l,
686
- d,
687
- m,
688
- z,
689
- p.map((h, k) => /* @__PURE__ */ t(Ve, { dataKey: h.value || h.id, name: h.label || h.id, fill: h.fill || _[k % _.length], radius: [3, 3, 0, 0] }, h.id))
738
+ c,
739
+ y,
740
+ w,
741
+ p.map((T, z) => /* @__PURE__ */ t(
742
+ Ve,
743
+ {
744
+ dataKey: T.value || T.id || "",
745
+ name: T.label || T.id,
746
+ fill: T.fill || T.color || q[z % q.length],
747
+ radius: [3, 3, 0, 0]
748
+ },
749
+ T.id ?? z
750
+ ))
690
751
  ] });
691
752
  else if (n === "line")
692
- o = /* @__PURE__ */ g(_e, { ...y, children: [
753
+ g = /* @__PURE__ */ x(_e, { ...o, children: [
693
754
  r,
694
755
  l,
695
- d,
696
- m,
697
- z,
698
- p.map((h, k) => /* @__PURE__ */ t(Xe, { type: "monotone", dataKey: h.value || h.id, name: h.label || h.id, stroke: h.color || _[k % _.length], strokeWidth: 2, dot: { r: 3, fill: h.color || _[k % _.length] } }, h.id))
756
+ c,
757
+ y,
758
+ w,
759
+ p.map((T, z) => {
760
+ const A = T.color || q[z % q.length];
761
+ return /* @__PURE__ */ t(
762
+ Xe,
763
+ {
764
+ type: "monotone",
765
+ dataKey: T.value || T.id || "",
766
+ name: T.label || T.id,
767
+ stroke: A,
768
+ strokeWidth: T.strokeWidth ?? 2,
769
+ dot: { r: 3, fill: A }
770
+ },
771
+ T.id ?? z
772
+ );
773
+ })
699
774
  ] });
700
775
  else if (n === "area")
701
- o = /* @__PURE__ */ g(qe, { ...y, children: [
776
+ g = /* @__PURE__ */ x(qe, { ...o, children: [
702
777
  r,
703
778
  l,
704
- d,
705
- m,
706
- z,
707
- p.map((h, k) => /* @__PURE__ */ t(Ge, { type: "monotone", dataKey: h.value || h.id, name: h.label || h.id, stroke: h.color || _[k % _.length], fill: (h.fill || _[k % _.length]) + "33", strokeWidth: 2 }, h.id))
779
+ c,
780
+ y,
781
+ w,
782
+ p.map((T, z) => {
783
+ const A = T.color || q[z % q.length];
784
+ return /* @__PURE__ */ t(
785
+ Ge,
786
+ {
787
+ type: "monotone",
788
+ dataKey: T.value || T.id || "",
789
+ name: T.label || T.id,
790
+ stroke: A,
791
+ fill: (T.fill || A) + "33",
792
+ strokeWidth: T.strokeWidth ?? 2
793
+ },
794
+ T.id ?? z
795
+ );
796
+ })
708
797
  ] });
709
798
  else if (n === "pie" || n === "donut") {
710
- const h = i[0] || {}, k = Object.keys(h).find((c) => typeof h[c] == "number") || "value", E = Object.keys(h).find((c) => typeof h[c] == "string") || "x";
711
- o = /* @__PURE__ */ g(Je, { children: [
799
+ const T = p[0] || {}, z = T.value || "value", A = T.text || "name", P = T.color && i[0] && T.color in i[0] ? T.color : null;
800
+ g = /* @__PURE__ */ x(Je, { children: [
712
801
  /* @__PURE__ */ t(
713
802
  Ue,
714
803
  {
@@ -717,213 +806,328 @@ function Ct({ type: n = "bar", data: i = [], series: p = [], scales: u = {}, leg
717
806
  cy: "50%",
718
807
  outerRadius: n === "donut" ? "70%" : "80%",
719
808
  innerRadius: n === "donut" ? "40%" : 0,
720
- dataKey: k,
721
- nameKey: E,
722
- label: ({ name: c, percent: I }) => `${c ?? ""} ${((I ?? 0) * 100).toFixed(0)}%`,
809
+ dataKey: z,
810
+ nameKey: A,
811
+ stroke: T.stroke || "none",
812
+ strokeWidth: T.strokeWidth ?? 0,
813
+ label: ({ name: O, percent: j }) => `${O ?? ""} ${((j ?? 0) * 100).toFixed(0)}%`,
723
814
  labelLine: !0,
724
815
  paddingAngle: 2,
725
- children: i.map((c, I) => /* @__PURE__ */ t(Qe, { fill: _[I % _.length] }, I))
816
+ children: i.map((O, j) => /* @__PURE__ */ t(
817
+ Qe,
818
+ {
819
+ fill: P ? O[P] : q[j % q.length]
820
+ },
821
+ j
822
+ ))
726
823
  }
727
824
  ),
728
- m,
729
- z
825
+ y,
826
+ w
730
827
  ] });
731
- } else n === "radar" ? o = /* @__PURE__ */ g(Ze, { ...y, cx: "50%", cy: "50%", children: [
732
- /* @__PURE__ */ t(et, {}),
733
- /* @__PURE__ */ t(tt, { dataKey: a, tick: { fontSize: 11 } }),
734
- p.map((h, k) => /* @__PURE__ */ t(nt, { dataKey: h.value || h.id, name: h.label || h.id, stroke: h.color || _[k], fill: (h.fill || _[k]) + "44" }, h.id)),
735
- m,
736
- z
737
- ] }) : n === "scatter" && (o = /* @__PURE__ */ g(rt, { ...y, children: [
738
- r,
739
- /* @__PURE__ */ t(Se, { dataKey: ((D = p[0]) == null ? void 0 : D.xValue) || "x", type: "number", tick: { fontSize: 11, fill: e.textSec } }),
740
- /* @__PURE__ */ t(we, { dataKey: ((T = p[0]) == null ? void 0 : T.yValue) || "y", tick: { fontSize: 11, fill: e.textSec } }),
741
- m,
742
- p.map((h, k) => /* @__PURE__ */ t(ot, { data: h.data || i, name: h.label || h.id, fill: h.color || _[k] }, h.id))
743
- ] }));
744
- return /* @__PURE__ */ t("div", { className: "dhx", style: { width: "100%", height: s, padding: 12, background: e.surface, borderRadius: e.rMd, ...f }, children: /* @__PURE__ */ t(it, { width: "100%", height: "100%", children: o }) });
828
+ } else if (n === "radar") {
829
+ const T = ((u = s.radial) == null ? void 0 : u.value) || d;
830
+ g = /* @__PURE__ */ x(Ze, { ...o, cx: "50%", cy: "50%", children: [
831
+ /* @__PURE__ */ t(et, {}),
832
+ /* @__PURE__ */ t(tt, { dataKey: T, tick: { fontSize: 11 } }),
833
+ /* @__PURE__ */ t(nt, { tick: { fontSize: 9, fill: e.textMut }, axisLine: !1 }),
834
+ p.map((z, A) => {
835
+ const P = z.color || z.pointColor || q[A % q.length];
836
+ return /* @__PURE__ */ t(
837
+ rt,
838
+ {
839
+ dataKey: z.value || z.id || "",
840
+ name: z.label || z.id,
841
+ stroke: P,
842
+ fill: P + "44"
843
+ },
844
+ z.id ?? A
845
+ );
846
+ }),
847
+ y,
848
+ w
849
+ ] });
850
+ } else if (n === "scatter")
851
+ g = /* @__PURE__ */ x(ot, { margin: b, children: [
852
+ r,
853
+ /* @__PURE__ */ t(
854
+ Se,
855
+ {
856
+ type: "number",
857
+ dataKey: "x",
858
+ name: ((I = s.bottom) == null ? void 0 : I.title) || "x",
859
+ tick: { fontSize: 11, fill: e.textSec },
860
+ tickLine: !1,
861
+ domain: [((v = s.bottom) == null ? void 0 : v.min) ?? "auto", ((H = s.bottom) == null ? void 0 : H.max) ?? "auto"],
862
+ label: (_ = s.bottom) != null && _.title ? { value: s.bottom.title, position: "insideBottom", offset: -4, fontSize: 11 } : void 0
863
+ }
864
+ ),
865
+ /* @__PURE__ */ t(
866
+ we,
867
+ {
868
+ type: "number",
869
+ dataKey: "y",
870
+ name: ((G = s.left) == null ? void 0 : G.title) || "y",
871
+ tick: { fontSize: 11, fill: e.textSec },
872
+ tickLine: !1,
873
+ axisLine: !1,
874
+ domain: [((Q = s.left) == null ? void 0 : Q.min) ?? "auto", ((re = s.left) == null ? void 0 : re.max) ?? "auto"],
875
+ label: (ee = s.left) != null && ee.title ? { value: s.left.title, angle: -90, position: "insideLeft", fontSize: 11 } : void 0
876
+ }
877
+ ),
878
+ y,
879
+ w,
880
+ p.map((T, z) => {
881
+ const A = T.value || "x", P = T.valueY || "y", O = (T.data || i).map((j) => ({
882
+ x: j[A],
883
+ y: j[P]
884
+ }));
885
+ return /* @__PURE__ */ t(
886
+ it,
887
+ {
888
+ data: O,
889
+ name: T.label || T.id,
890
+ fill: T.color || q[z % q.length]
891
+ },
892
+ T.id ?? z
893
+ );
894
+ })
895
+ ] });
896
+ else if (n === "treeMap") {
897
+ const T = p[0] || {}, z = T.value || "value", A = T.text || "name", P = ht(i, z, A), O = T.stroke || e.surface, j = T.strokeWidth ?? 2;
898
+ g = /* @__PURE__ */ t(
899
+ st,
900
+ {
901
+ data: P,
902
+ dataKey: "value",
903
+ aspectRatio: 4 / 3,
904
+ stroke: O,
905
+ content: (J) => {
906
+ const { x: X, y: oe, width: te, height: ie, depth: le, index: ae, name: B } = J;
907
+ if (le === 0) return null;
908
+ const ne = q[ae % q.length];
909
+ return /* @__PURE__ */ x("g", { children: [
910
+ /* @__PURE__ */ t(
911
+ "rect",
912
+ {
913
+ x: X,
914
+ y: oe,
915
+ width: te,
916
+ height: ie,
917
+ fill: ne,
918
+ stroke: O,
919
+ strokeWidth: j,
920
+ style: { borderRadius: 3 }
921
+ }
922
+ ),
923
+ te > 40 && ie > 20 && /* @__PURE__ */ t(
924
+ "text",
925
+ {
926
+ x: X + te / 2,
927
+ y: oe + ie / 2,
928
+ textAnchor: "middle",
929
+ dominantBaseline: "middle",
930
+ fill: "#fff",
931
+ fontSize: 11,
932
+ pointerEvents: "none",
933
+ children: B
934
+ }
935
+ )
936
+ ] });
937
+ }
938
+ }
939
+ );
940
+ }
941
+ return /* @__PURE__ */ t(
942
+ "div",
943
+ {
944
+ className: "dhx",
945
+ style: { width: "100%", height: a, padding: 12, background: e.surface, borderRadius: e.rMd, ...h },
946
+ children: /* @__PURE__ */ t(lt, { width: "100%", height: "100%", children: g })
947
+ }
948
+ );
745
949
  }
746
- const pt = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], ut = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
747
- function Lt({ value: n, range: i = !1, timepicker: p = !1, onChange: u, style: x }) {
748
- const s = /* @__PURE__ */ new Date(), f = n ? new Date(Array.isArray(n) ? n[0] : n) : s, [a, m] = C(f), [z, r] = C(n ?? (i ? [null, null] : null)), [l, d] = C(null), [y, o] = C({ h: 0, m: 0 });
749
- H(O, []);
750
- const b = a.getFullYear(), v = a.getMonth(), M = new Date(b, v, 1).getDay(), D = new Date(b, v + 1, 0).getDate(), T = [];
751
- for (let c = 0; c < M; c++) T.push(null);
752
- for (let c = 1; c <= D; c++) T.push(new Date(b, v, c));
753
- const h = (c) => c.toDateString() === s.toDateString(), k = (c) => {
754
- if (!z) return !1;
755
- if (i && Array.isArray(z)) {
756
- const [I, S] = z;
950
+ const ft = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], xt = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
951
+ function Rt({ value: n, range: i = !1, timepicker: p = !1, onChange: s, style: f }) {
952
+ const a = /* @__PURE__ */ new Date(), h = n ? new Date(Array.isArray(n) ? n[0] : n) : a, [d, y] = L(h), [w, r] = L(n ?? (i ? [null, null] : null)), [l, c] = L(null), [b, o] = L({ h: 0, m: 0 });
953
+ F(V, []);
954
+ const g = d.getFullYear(), m = d.getMonth(), $ = new Date(g, m, 1).getDay(), C = new Date(g, m + 1, 0).getDate(), N = [];
955
+ for (let u = 0; u < $; u++) N.push(null);
956
+ for (let u = 1; u <= C; u++) N.push(new Date(g, m, u));
957
+ const k = (u) => u.toDateString() === a.toDateString(), M = (u) => {
958
+ if (!w) return !1;
959
+ if (i && Array.isArray(w)) {
960
+ const [I, v] = w;
757
961
  if (!I) return !1;
758
- const A = c.getTime();
759
- return S ? A >= I.getTime() && A <= S.getTime() : c.toDateString() === I.toDateString();
962
+ const H = u.getTime();
963
+ return v ? H >= I.getTime() && H <= v.getTime() : u.toDateString() === I.toDateString();
760
964
  }
761
- return c.toDateString() === z.toDateString();
762
- }, E = (c) => {
965
+ return u.toDateString() === w.toDateString();
966
+ }, W = (u) => {
763
967
  if (i) {
764
- const [I, S] = Array.isArray(z) ? z : [null, null];
765
- if (!I || S)
766
- r([c, null]);
968
+ const [I, v] = Array.isArray(w) ? w : [null, null];
969
+ if (!I || v)
970
+ r([u, null]);
767
971
  else {
768
- const A = c < I ? [c, I] : [I, c];
769
- r(A), u == null || u(A);
972
+ const H = u < I ? [u, I] : [I, u];
973
+ r(H), s == null || s(H);
770
974
  }
771
975
  } else
772
- r(c), u == null || u(c);
976
+ r(u), s == null || s(u);
773
977
  };
774
- return /* @__PURE__ */ g("div", { className: "dhx", style: { background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, padding: 16, display: "inline-block", boxShadow: e.shadow, ...x }, children: [
775
- /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 12 }, children: [
776
- /* @__PURE__ */ t("button", { onClick: () => m((c) => new Date(c.getFullYear(), c.getMonth() - 1, 1)), className: "dhx dhx-btn dhx-btn-ghost", style: { height: 28, padding: "0 8px", fontSize: 16 }, children: "‹" }),
777
- /* @__PURE__ */ g("div", { style: { fontWeight: 700, fontSize: 14 }, children: [
778
- pt[v],
978
+ return /* @__PURE__ */ x("div", { className: "dhx", style: { background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, padding: 16, display: "inline-block", boxShadow: e.shadow, ...f }, children: [
979
+ /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", marginBottom: 12 }, children: [
980
+ /* @__PURE__ */ t("button", { onClick: () => y((u) => new Date(u.getFullYear(), u.getMonth() - 1, 1)), className: "dhx dhx-btn dhx-btn-ghost", style: { height: 28, padding: "0 8px", fontSize: 16 }, children: "‹" }),
981
+ /* @__PURE__ */ x("div", { style: { fontWeight: 700, fontSize: 14 }, children: [
982
+ ft[m],
779
983
  " ",
780
- b
984
+ g
781
985
  ] }),
782
- /* @__PURE__ */ t("button", { onClick: () => m((c) => new Date(c.getFullYear(), c.getMonth() + 1, 1)), className: "dhx dhx-btn dhx-btn-ghost", style: { height: 28, padding: "0 8px", fontSize: 16 }, children: "›" })
986
+ /* @__PURE__ */ t("button", { onClick: () => y((u) => new Date(u.getFullYear(), u.getMonth() + 1, 1)), className: "dhx dhx-btn dhx-btn-ghost", style: { height: 28, padding: "0 8px", fontSize: 16 }, children: "›" })
783
987
  ] }),
784
- /* @__PURE__ */ g("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 32px)", gap: 2 }, children: [
785
- ut.map((c) => /* @__PURE__ */ t("div", { style: { textAlign: "center", fontSize: 11, fontWeight: 600, color: e.textMut, paddingBottom: 4 }, children: c }, c)),
786
- T.map((c, I) => {
787
- const S = c ? k(c) : !1, A = c && l && c.toDateString() === l.toDateString();
988
+ /* @__PURE__ */ x("div", { style: { display: "grid", gridTemplateColumns: "repeat(7, 32px)", gap: 2 }, children: [
989
+ xt.map((u) => /* @__PURE__ */ t("div", { style: { textAlign: "center", fontSize: 11, fontWeight: 600, color: e.textMut, paddingBottom: 4 }, children: u }, u)),
990
+ N.map((u, I) => {
991
+ const v = u ? M(u) : !1, H = u && l && u.toDateString() === l.toDateString();
788
992
  return /* @__PURE__ */ t(
789
993
  "div",
790
994
  {
791
- onClick: () => c && E(c),
792
- onMouseEnter: () => c && d(c),
793
- onMouseLeave: () => d(null),
794
- style: { width: 32, height: 32, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: e.r, cursor: c ? "pointer" : "default", fontSize: 12, fontWeight: c && h(c) ? 700 : 400, background: S ? e.primary : A ? e.bg : "transparent", color: S ? "#fff" : c && h(c) ? e.primary : c ? e.text : "transparent", border: c && h(c) && !S ? `1px solid ${e.primary}` : "1px solid transparent", transition: "all .1s" },
795
- children: c == null ? void 0 : c.getDate()
995
+ onClick: () => u && W(u),
996
+ onMouseEnter: () => u && c(u),
997
+ onMouseLeave: () => c(null),
998
+ style: { width: 32, height: 32, display: "flex", alignItems: "center", justifyContent: "center", borderRadius: e.r, cursor: u ? "pointer" : "default", fontSize: 12, fontWeight: u && k(u) ? 700 : 400, background: v ? e.primary : H ? e.bg : "transparent", color: v ? "#fff" : u && k(u) ? e.primary : u ? e.text : "transparent", border: u && k(u) && !v ? `1px solid ${e.primary}` : "1px solid transparent", transition: "all .1s" },
999
+ children: u == null ? void 0 : u.getDate()
796
1000
  },
797
1001
  I
798
1002
  );
799
1003
  })
800
1004
  ] }),
801
- p && /* @__PURE__ */ g("div", { style: { borderTop: `1px solid ${e.border}`, marginTop: 12, paddingTop: 12, display: "flex", alignItems: "center", justifyContent: "center", gap: 8 }, children: [
802
- /* @__PURE__ */ t("input", { type: "number", min: 0, max: 23, value: y.h, onChange: (c) => o((I) => ({ ...I, h: +c.target.value })), className: "dhx dhx-input", style: { width: 50, textAlign: "center" } }),
1005
+ p && /* @__PURE__ */ x("div", { style: { borderTop: `1px solid ${e.border}`, marginTop: 12, paddingTop: 12, display: "flex", alignItems: "center", justifyContent: "center", gap: 8 }, children: [
1006
+ /* @__PURE__ */ t("input", { type: "number", min: 0, max: 23, value: b.h, onChange: (u) => o((I) => ({ ...I, h: +u.target.value })), className: "dhx dhx-input", style: { width: 50, textAlign: "center" } }),
803
1007
  /* @__PURE__ */ t("span", { style: { fontWeight: 700, color: e.textSec }, children: ":" }),
804
- /* @__PURE__ */ t("input", { type: "number", min: 0, max: 59, value: y.m, onChange: (c) => o((I) => ({ ...I, m: +c.target.value })), className: "dhx dhx-input", style: { width: 50, textAlign: "center" } })
1008
+ /* @__PURE__ */ t("input", { type: "number", min: 0, max: 59, value: b.m, onChange: (u) => o((I) => ({ ...I, m: +u.target.value })), className: "dhx dhx-input", style: { width: 50, textAlign: "center" } })
805
1009
  ] })
806
1010
  ] });
807
1011
  }
808
- function ht({ value: n, onChange: i, timeFormat: p = 12, controls: u = !1, minuteStep: x = 5, style: s }) {
809
- const [f, a] = C((n == null ? void 0 : n.h) ?? (p === 24 ? 0 : 12)), [m, z] = C((n == null ? void 0 : n.m) ?? 0), [r, l] = C((n == null ? void 0 : n.ampm) ?? "AM"), [d, y] = C(null);
810
- H(O, []);
811
- const o = p === 24 ? Array.from({ length: 24 }, (h, k) => k) : Array.from({ length: 12 }, (h, k) => k + 1), b = Array.from({ length: Math.ceil(60 / x) }, (h, k) => k * x), v = (h, k, E) => {
812
- const c = p === 24 ? { h, m: k } : { h, m: k, ampm: E };
813
- u ? y(c) : i == null || i(c);
814
- }, M = () => {
815
- y(null), a((n == null ? void 0 : n.h) ?? (p === 24 ? 0 : 12)), z((n == null ? void 0 : n.m) ?? 0), l((n == null ? void 0 : n.ampm) ?? "AM");
816
- }, D = { display: "flex", flexDirection: "column", alignItems: "center", gap: 4 }, T = (h) => ({
1012
+ function gt({ value: n, onChange: i, timeFormat: p = 12, controls: s = !1, minuteStep: f = 5, style: a }) {
1013
+ const [h, d] = L((n == null ? void 0 : n.h) ?? (p === 24 ? 0 : 12)), [y, w] = L((n == null ? void 0 : n.m) ?? 0), [r, l] = L((n == null ? void 0 : n.ampm) ?? "AM"), [c, b] = L(null);
1014
+ F(V, []);
1015
+ const o = p === 24 ? Array.from({ length: 24 }, (k, M) => M) : Array.from({ length: 12 }, (k, M) => M + 1), g = Array.from({ length: Math.ceil(60 / f) }, (k, M) => M * f), m = (k, M, W) => {
1016
+ const u = p === 24 ? { h: k, m: M } : { h: k, m: M, ampm: W };
1017
+ s ? b(u) : i == null || i(u);
1018
+ }, $ = () => {
1019
+ b(null), d((n == null ? void 0 : n.h) ?? (p === 24 ? 0 : 12)), w((n == null ? void 0 : n.m) ?? 0), l((n == null ? void 0 : n.ampm) ?? "AM");
1020
+ }, C = { display: "flex", flexDirection: "column", alignItems: "center", gap: 4 }, N = (k) => ({
817
1021
  height: 32,
818
1022
  display: "flex",
819
1023
  alignItems: "center",
820
1024
  justifyContent: "center",
821
1025
  cursor: "pointer",
822
1026
  fontSize: 13,
823
- fontWeight: h ? 700 : 400,
824
- background: h ? e.primaryLt : "transparent",
825
- color: h ? e.primary : e.text
1027
+ fontWeight: k ? 700 : 400,
1028
+ background: k ? e.primaryLt : "transparent",
1029
+ color: k ? e.primary : e.text
826
1030
  });
827
- return /* @__PURE__ */ g("div", { className: "dhx", style: { background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, padding: 16, display: "inline-block", boxShadow: e.shadow, ...s }, children: [
828
- /* @__PURE__ */ g("div", { style: { display: "flex", gap: 8, alignItems: "stretch" }, children: [
829
- /* @__PURE__ */ g("div", { style: D, children: [
1031
+ return /* @__PURE__ */ x("div", { className: "dhx", style: { background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, padding: 16, display: "inline-block", boxShadow: e.shadow, ...a }, children: [
1032
+ /* @__PURE__ */ x("div", { style: { display: "flex", gap: 8, alignItems: "stretch" }, children: [
1033
+ /* @__PURE__ */ x("div", { style: C, children: [
830
1034
  /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: e.textMut }, children: "Hours" }),
831
- /* @__PURE__ */ t("div", { className: "dhx-scroll", style: { height: 160, overflowY: "auto", width: 48, border: `1px solid ${e.border}`, borderRadius: e.r }, children: o.map((h) => /* @__PURE__ */ t(
1035
+ /* @__PURE__ */ t("div", { className: "dhx-scroll", style: { height: 160, overflowY: "auto", width: 48, border: `1px solid ${e.border}`, borderRadius: e.r }, children: o.map((k) => /* @__PURE__ */ t(
832
1036
  "div",
833
1037
  {
834
1038
  onClick: () => {
835
- a(h), v(h, m, r);
1039
+ d(k), m(k, y, r);
836
1040
  },
837
- style: T(f === h),
838
- onMouseEnter: (k) => f !== h && (k.currentTarget.style.background = e.bg),
839
- onMouseLeave: (k) => f !== h && (k.currentTarget.style.background = "transparent"),
840
- children: String(h).padStart(2, "0")
1041
+ style: N(h === k),
1042
+ onMouseEnter: (M) => h !== k && (M.currentTarget.style.background = e.bg),
1043
+ onMouseLeave: (M) => h !== k && (M.currentTarget.style.background = "transparent"),
1044
+ children: String(k).padStart(2, "0")
841
1045
  },
842
- h
1046
+ k
843
1047
  )) })
844
1048
  ] }),
845
- /* @__PURE__ */ g("div", { style: D, children: [
1049
+ /* @__PURE__ */ x("div", { style: C, children: [
846
1050
  /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: e.textMut }, children: "Minutes" }),
847
- /* @__PURE__ */ t("div", { className: "dhx-scroll", style: { height: 160, overflowY: "auto", width: 48, border: `1px solid ${e.border}`, borderRadius: e.r }, children: b.map((h) => /* @__PURE__ */ t(
1051
+ /* @__PURE__ */ t("div", { className: "dhx-scroll", style: { height: 160, overflowY: "auto", width: 48, border: `1px solid ${e.border}`, borderRadius: e.r }, children: g.map((k) => /* @__PURE__ */ t(
848
1052
  "div",
849
1053
  {
850
1054
  onClick: () => {
851
- z(h), v(f, h, r);
1055
+ w(k), m(h, k, r);
852
1056
  },
853
- style: T(m === h),
854
- onMouseEnter: (k) => m !== h && (k.currentTarget.style.background = e.bg),
855
- onMouseLeave: (k) => m !== h && (k.currentTarget.style.background = "transparent"),
856
- children: String(h).padStart(2, "0")
1057
+ style: N(y === k),
1058
+ onMouseEnter: (M) => y !== k && (M.currentTarget.style.background = e.bg),
1059
+ onMouseLeave: (M) => y !== k && (M.currentTarget.style.background = "transparent"),
1060
+ children: String(k).padStart(2, "0")
857
1061
  },
858
- h
1062
+ k
859
1063
  )) })
860
1064
  ] }),
861
- p === 12 && /* @__PURE__ */ g("div", { style: D, children: [
1065
+ p === 12 && /* @__PURE__ */ x("div", { style: C, children: [
862
1066
  /* @__PURE__ */ t("span", { style: { fontSize: 11, fontWeight: 600, color: e.textMut }, children: "AM/PM" }),
863
- /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", border: `1px solid ${e.border}`, borderRadius: e.r, overflow: "hidden" }, children: ["AM", "PM"].map((h) => /* @__PURE__ */ t(
1067
+ /* @__PURE__ */ t("div", { style: { display: "flex", flexDirection: "column", border: `1px solid ${e.border}`, borderRadius: e.r, overflow: "hidden" }, children: ["AM", "PM"].map((k) => /* @__PURE__ */ t(
864
1068
  "div",
865
1069
  {
866
1070
  onClick: () => {
867
- l(h), v(f, m, h);
1071
+ l(k), m(h, y, k);
868
1072
  },
869
- style: { height: 40, display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", padding: "0 12px", fontSize: 13, fontWeight: r === h ? 700 : 400, background: r === h ? e.primary : e.surface, color: r === h ? "#fff" : e.text },
870
- children: h
1073
+ style: { height: 40, display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", padding: "0 12px", fontSize: 13, fontWeight: r === k ? 700 : 400, background: r === k ? e.primary : e.surface, color: r === k ? "#fff" : e.text },
1074
+ children: k
871
1075
  },
872
- h
1076
+ k
873
1077
  )) })
874
1078
  ] })
875
1079
  ] }),
876
- /* @__PURE__ */ g("div", { style: { textAlign: "center", marginTop: 12, fontSize: 22, fontWeight: 700, color: e.primary, letterSpacing: 2 }, children: [
877
- String(f).padStart(2, "0"),
1080
+ /* @__PURE__ */ x("div", { style: { textAlign: "center", marginTop: 12, fontSize: 22, fontWeight: 700, color: e.primary, letterSpacing: 2 }, children: [
1081
+ String(h).padStart(2, "0"),
878
1082
  ":",
879
- String(m).padStart(2, "0"),
1083
+ String(y).padStart(2, "0"),
880
1084
  p === 12 ? ` ${r}` : ""
881
1085
  ] }),
882
- u && /* @__PURE__ */ g("div", { style: { display: "flex", gap: 8, justifyContent: "flex-end", marginTop: 12 }, children: [
883
- /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-secondary", onClick: M, children: "Cancel" }),
884
- /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-primary", onClick: () => d && (i == null ? void 0 : i(d)), children: "Apply" })
1086
+ s && /* @__PURE__ */ x("div", { style: { display: "flex", gap: 8, justifyContent: "flex-end", marginTop: 12 }, children: [
1087
+ /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-secondary", onClick: $, children: "Cancel" }),
1088
+ /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-primary", onClick: () => c && (i == null ? void 0 : i(c)), children: "Apply" })
885
1089
  ] })
886
1090
  ] });
887
1091
  }
888
- const ft = ({ open: n }) => /* @__PURE__ */ t("svg", { width: "12", height: "12", viewBox: "0 0 12 12", style: { flexShrink: 0, transition: "transform .15s", transform: n ? "rotate(180deg)" : "rotate(0deg)" }, children: /* @__PURE__ */ t("path", { d: "M2 4l4 4 4-4", stroke: e.textMut, strokeWidth: "1.5", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }) });
889
- function $e({ data: n = [], value: i, placeholder: p = "Select or type...", multiselection: u = !1, label: x, onChange: s, style: f }) {
890
- var E;
891
- const [a, m] = C(!1), [z, r] = C(""), [l, d] = C(
892
- u ? i ? [].concat(i) : [] : i || null
893
- ), y = q(null), o = q(null);
894
- H(O, []), ie(y, G(() => {
895
- m(!1), r("");
1092
+ const yt = ({ open: n }) => /* @__PURE__ */ t("svg", { width: "12", height: "12", viewBox: "0 0 12 12", style: { flexShrink: 0, transition: "transform .15s", transform: n ? "rotate(180deg)" : "rotate(0deg)" }, children: /* @__PURE__ */ t("path", { d: "M2 4l4 4 4-4", stroke: e.textMut, strokeWidth: "1.5", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }) });
1093
+ function $e({ data: n = [], value: i, placeholder: p = "Select or type...", multiselection: s = !1, label: f, onChange: a, style: h }) {
1094
+ var W;
1095
+ const [d, y] = L(!1), [w, r] = L(""), [l, c] = L(
1096
+ s ? i ? [].concat(i) : [] : i || null
1097
+ ), b = U(null), o = U(null);
1098
+ F(V, []), he(b, Z(() => {
1099
+ y(!1), r("");
896
1100
  }, []));
897
- const b = oe(
898
- () => n.filter((c) => !z || c.value.toLowerCase().includes(z.toLowerCase())),
899
- [n, z]
900
- ), v = (c) => u ? (l || []).includes(c) : l === c, M = (c) => {
901
- const I = c.id || c.value;
902
- if (u) {
903
- const S = v(I) ? l.filter((A) => A !== I) : [...l || [], I];
904
- d(S), s == null || s(S);
1101
+ const g = ue(
1102
+ () => n.filter((u) => !w || u.value.toLowerCase().includes(w.toLowerCase())),
1103
+ [n, w]
1104
+ ), m = (u) => s ? (l || []).includes(u) : l === u, $ = (u) => {
1105
+ const I = u.id || u.value;
1106
+ if (s) {
1107
+ const v = m(I) ? l.filter((H) => H !== I) : [...l || [], I];
1108
+ c(v), a == null || a(v);
905
1109
  } else
906
- d(I), r(""), m(!1), s == null || s(I);
907
- }, D = (c) => {
908
- const I = l.filter((S) => S !== c);
909
- d(I), s == null || s(I);
910
- }, T = () => {
911
- m(!0), setTimeout(() => {
912
- var c;
913
- return (c = o.current) == null ? void 0 : c.focus();
1110
+ c(I), r(""), y(!1), a == null || a(I);
1111
+ }, C = (u) => {
1112
+ const I = l.filter((v) => v !== u);
1113
+ c(I), a == null || a(I);
1114
+ }, N = () => {
1115
+ y(!0), setTimeout(() => {
1116
+ var u;
1117
+ return (u = o.current) == null ? void 0 : u.focus();
914
1118
  }, 0);
915
- }, h = ((E = n.find((c) => (c.id || c.value) === l)) == null ? void 0 : E.value) || "", k = u ? l || [] : [];
916
- return /* @__PURE__ */ g("div", { ref: y, className: "dhx", style: { position: "relative", ...f }, children: [
917
- x && /* @__PURE__ */ t("label", { className: "dhx dhx-label", children: x }),
918
- /* @__PURE__ */ g(
1119
+ }, k = ((W = n.find((u) => (u.id || u.value) === l)) == null ? void 0 : W.value) || "", M = s ? l || [] : [];
1120
+ return /* @__PURE__ */ x("div", { ref: b, className: "dhx", style: { position: "relative", ...h }, children: [
1121
+ f && /* @__PURE__ */ t("label", { className: "dhx dhx-label", children: f }),
1122
+ /* @__PURE__ */ x(
919
1123
  "div",
920
1124
  {
921
- onClick: T,
1125
+ onClick: N,
922
1126
  style: {
923
1127
  display: "flex",
924
1128
  alignItems: "center",
925
- flexWrap: u ? "wrap" : "nowrap",
926
- border: `1px solid ${a ? e.primary : e.border}`,
1129
+ flexWrap: s ? "wrap" : "nowrap",
1130
+ border: `1px solid ${d ? e.primary : e.border}`,
927
1131
  borderRadius: e.r,
928
1132
  minHeight: 34,
929
1133
  padding: "4px 8px",
@@ -931,13 +1135,13 @@ function $e({ data: n = [], value: i, placeholder: p = "Select or type...", mult
931
1135
  background: e.surface,
932
1136
  gap: 4,
933
1137
  transition: "border-color .15s",
934
- boxShadow: a ? `0 0 0 3px ${e.primary}22` : "none"
1138
+ boxShadow: d ? `0 0 0 3px ${e.primary}22` : "none"
935
1139
  },
936
1140
  children: [
937
- u && /* @__PURE__ */ g(Ne, { children: [
938
- k.map((c) => {
1141
+ s && /* @__PURE__ */ x(Ne, { children: [
1142
+ M.map((u) => {
939
1143
  var I;
940
- return /* @__PURE__ */ g("span", { style: {
1144
+ return /* @__PURE__ */ x("span", { style: {
941
1145
  display: "inline-flex",
942
1146
  alignItems: "center",
943
1147
  gap: 4,
@@ -949,55 +1153,55 @@ function $e({ data: n = [], value: i, placeholder: p = "Select or type...", mult
949
1153
  lineHeight: 1.5,
950
1154
  whiteSpace: "nowrap"
951
1155
  }, children: [
952
- ((I = n.find((S) => (S.id || S.value) === c)) == null ? void 0 : I.value) || c,
1156
+ ((I = n.find((v) => (v.id || v.value) === u)) == null ? void 0 : I.value) || u,
953
1157
  /* @__PURE__ */ t(
954
1158
  "span",
955
1159
  {
956
- onClick: (S) => {
957
- S.stopPropagation(), D(c);
1160
+ onClick: (v) => {
1161
+ v.stopPropagation(), C(u);
958
1162
  },
959
1163
  style: { cursor: "pointer", fontSize: 15, lineHeight: 1, opacity: 0.75, marginLeft: 2 },
960
1164
  children: "×"
961
1165
  }
962
1166
  )
963
- ] }, c);
1167
+ ] }, u);
964
1168
  }),
965
1169
  /* @__PURE__ */ t(
966
1170
  "input",
967
1171
  {
968
1172
  ref: o,
969
- value: z,
970
- onChange: (c) => {
971
- r(c.target.value), m(!0);
1173
+ value: w,
1174
+ onChange: (u) => {
1175
+ r(u.target.value), y(!0);
972
1176
  },
973
- onFocus: () => m(!0),
974
- onClick: (c) => c.stopPropagation(),
975
- placeholder: k.length ? "" : p,
1177
+ onFocus: () => y(!0),
1178
+ onClick: (u) => u.stopPropagation(),
1179
+ placeholder: M.length ? "" : p,
976
1180
  style: { flex: 1, minWidth: 60, border: "none", outline: "none", fontSize: 13, background: "transparent", color: e.text, padding: 0 }
977
1181
  }
978
1182
  )
979
1183
  ] }),
980
- !u && /* @__PURE__ */ t(
1184
+ !s && /* @__PURE__ */ t(
981
1185
  "input",
982
1186
  {
983
1187
  ref: o,
984
- value: a ? z : h,
985
- onChange: (c) => {
986
- r(c.target.value), m(!0);
1188
+ value: d ? w : k,
1189
+ onChange: (u) => {
1190
+ r(u.target.value), y(!0);
987
1191
  },
988
1192
  onFocus: () => {
989
- m(!0), r("");
1193
+ y(!0), r("");
990
1194
  },
991
- onClick: (c) => c.stopPropagation(),
1195
+ onClick: (u) => u.stopPropagation(),
992
1196
  placeholder: p,
993
1197
  style: { flex: 1, border: "none", outline: "none", fontSize: 13, background: "transparent", color: e.text, padding: 0 }
994
1198
  }
995
1199
  ),
996
- /* @__PURE__ */ t(ft, { open: a })
1200
+ /* @__PURE__ */ t(yt, { open: d })
997
1201
  ]
998
1202
  }
999
1203
  ),
1000
- a && /* @__PURE__ */ t("div", { className: "dhx dhx-anim-fade", style: {
1204
+ d && /* @__PURE__ */ t("div", { className: "dhx dhx-anim-fade", style: {
1001
1205
  position: "absolute",
1002
1206
  top: "calc(100% + 4px)",
1003
1207
  left: 0,
@@ -1007,13 +1211,13 @@ function $e({ data: n = [], value: i, placeholder: p = "Select or type...", mult
1007
1211
  borderRadius: e.r,
1008
1212
  boxShadow: e.shadowLg,
1009
1213
  zIndex: 100
1010
- }, children: /* @__PURE__ */ g("div", { className: "dhx-scroll", style: { maxHeight: 220, overflowY: "auto" }, children: [
1011
- b.map((c) => {
1012
- const I = c.id || c.value, S = v(I);
1013
- return /* @__PURE__ */ g(
1214
+ }, children: /* @__PURE__ */ x("div", { className: "dhx-scroll", style: { maxHeight: 220, overflowY: "auto" }, children: [
1215
+ g.map((u) => {
1216
+ const I = u.id || u.value, v = m(I);
1217
+ return /* @__PURE__ */ x(
1014
1218
  "div",
1015
1219
  {
1016
- onClick: () => M(c),
1220
+ onClick: () => $(u),
1017
1221
  style: {
1018
1222
  padding: "8px 12px",
1019
1223
  cursor: "pointer",
@@ -1021,28 +1225,28 @@ function $e({ data: n = [], value: i, placeholder: p = "Select or type...", mult
1021
1225
  alignItems: "center",
1022
1226
  gap: 8,
1023
1227
  fontSize: 13,
1024
- background: S ? e.primaryLt : "transparent",
1025
- color: S ? e.primary : e.text
1228
+ background: v ? e.primaryLt : "transparent",
1229
+ color: v ? e.primary : e.text
1026
1230
  },
1027
- onMouseEnter: (A) => !S && (A.currentTarget.style.background = e.bg),
1028
- onMouseLeave: (A) => !S && (A.currentTarget.style.background = "transparent"),
1231
+ onMouseEnter: (H) => !v && (H.currentTarget.style.background = e.bg),
1232
+ onMouseLeave: (H) => !v && (H.currentTarget.style.background = "transparent"),
1029
1233
  children: [
1030
- u && /* @__PURE__ */ t("span", { style: {
1234
+ s && /* @__PURE__ */ t("span", { style: {
1031
1235
  width: 14,
1032
1236
  height: 14,
1033
1237
  flexShrink: 0,
1034
- border: `2px solid ${S ? e.primary : e.borderDk}`,
1238
+ border: `2px solid ${v ? e.primary : e.borderDk}`,
1035
1239
  borderRadius: 3,
1036
1240
  display: "flex",
1037
1241
  alignItems: "center",
1038
1242
  justifyContent: "center",
1039
- background: S ? e.primary : "transparent"
1040
- }, children: S && /* @__PURE__ */ t("span", { style: { color: "#fff", fontSize: 9, lineHeight: 1 }, children: "✓" }) }),
1041
- /* @__PURE__ */ t("span", { style: { flex: 1 }, children: c.value }),
1042
- !u && S && /* @__PURE__ */ t("span", { style: { color: e.primary, fontSize: 12, fontWeight: 700 }, children: "✓" }),
1043
- c.count !== void 0 && /* @__PURE__ */ g("span", { style: { fontSize: 11, color: e.textMut }, children: [
1243
+ background: v ? e.primary : "transparent"
1244
+ }, children: v && /* @__PURE__ */ t("span", { style: { color: "#fff", fontSize: 9, lineHeight: 1 }, children: "✓" }) }),
1245
+ /* @__PURE__ */ t("span", { style: { flex: 1 }, children: u.value }),
1246
+ !s && v && /* @__PURE__ */ t("span", { style: { color: e.primary, fontSize: 12, fontWeight: 700 }, children: "✓" }),
1247
+ u.count !== void 0 && /* @__PURE__ */ x("span", { style: { fontSize: 11, color: e.textMut }, children: [
1044
1248
  "(",
1045
- c.count,
1249
+ u.count,
1046
1250
  ")"
1047
1251
  ] })
1048
1252
  ]
@@ -1050,248 +1254,248 @@ function $e({ data: n = [], value: i, placeholder: p = "Select or type...", mult
1050
1254
  I
1051
1255
  );
1052
1256
  }),
1053
- b.length === 0 && /* @__PURE__ */ t("div", { style: { padding: 16, textAlign: "center", color: e.textMut, fontSize: 13 }, children: "No matches" })
1257
+ g.length === 0 && /* @__PURE__ */ t("div", { style: { padding: 16, textAlign: "center", color: e.textMut, fontSize: 13 }, children: "No matches" })
1054
1258
  ] }) })
1055
1259
  ] });
1056
1260
  }
1057
- function De({ min: n = 0, max: i = 100, step: p = 1, value: u, range: x = !1, label: s, tick: f, disabled: a = !1, onChange: m, style: z }) {
1058
- const [r, l] = C(u ?? (x ? [n, i] : n));
1059
- H(O, []);
1060
- const d = (M, D) => {
1061
- if (!a)
1062
- if (x) {
1063
- const T = [...r];
1064
- T[M] = D, l(T), m == null || m(T);
1261
+ function De({ min: n = 0, max: i = 100, step: p = 1, value: s, range: f = !1, label: a, tick: h, disabled: d = !1, onChange: y, style: w }) {
1262
+ const [r, l] = L(s ?? (f ? [n, i] : n));
1263
+ F(V, []);
1264
+ const c = ($, C) => {
1265
+ if (!d)
1266
+ if (f) {
1267
+ const N = [...r];
1268
+ N[$] = C, l(N), y == null || y(N);
1065
1269
  } else
1066
- l(D), m == null || m(D);
1067
- }, y = (M) => (M - n) / (i - n) * 100, o = x ? r : [r], b = x ? { left: `${y(o[0])}%`, width: `${y(o[1]) - y(o[0])}%` } : { left: 0, width: `${y(o[0])}%` }, v = a ? e.border : e.primary;
1068
- return /* @__PURE__ */ g("div", { className: "dhx", style: { width: "100%", opacity: a ? 0.5 : 1, ...z }, children: [
1069
- s && /* @__PURE__ */ t("label", { className: "dhx dhx-label", children: s }),
1070
- /* @__PURE__ */ t("div", { style: { position: "relative", height: 36, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ g("div", { style: { position: "relative", flex: 1, height: 4, background: e.border, borderRadius: 2 }, children: [
1071
- /* @__PURE__ */ t("div", { style: { position: "absolute", ...b, height: "100%", background: v, borderRadius: 2 } }),
1072
- o.map((M, D) => /* @__PURE__ */ t(
1270
+ l(C), y == null || y(C);
1271
+ }, b = ($) => ($ - n) / (i - n) * 100, o = f ? r : [r], g = f ? { left: `${b(o[0])}%`, width: `${b(o[1]) - b(o[0])}%` } : { left: 0, width: `${b(o[0])}%` }, m = d ? e.border : e.primary;
1272
+ return /* @__PURE__ */ x("div", { className: "dhx", style: { width: "100%", opacity: d ? 0.5 : 1, ...w }, children: [
1273
+ a && /* @__PURE__ */ t("label", { className: "dhx dhx-label", children: a }),
1274
+ /* @__PURE__ */ t("div", { style: { position: "relative", height: 36, display: "flex", alignItems: "center" }, children: /* @__PURE__ */ x("div", { style: { position: "relative", flex: 1, height: 4, background: e.border, borderRadius: 2 }, children: [
1275
+ /* @__PURE__ */ t("div", { style: { position: "absolute", ...g, height: "100%", background: m, borderRadius: 2 } }),
1276
+ o.map(($, C) => /* @__PURE__ */ t(
1073
1277
  "input",
1074
1278
  {
1075
1279
  type: "range",
1076
1280
  min: n,
1077
1281
  max: i,
1078
1282
  step: p,
1079
- value: M,
1080
- disabled: a,
1081
- onChange: (T) => {
1082
- const h = +T.target.value;
1083
- x && D === 0 && h >= r[1] || x && D === 1 && h <= r[0] || d(D, h);
1283
+ value: $,
1284
+ disabled: d,
1285
+ onChange: (N) => {
1286
+ const k = +N.target.value;
1287
+ f && C === 0 && k >= r[1] || f && C === 1 && k <= r[0] || c(C, k);
1084
1288
  },
1085
- style: { position: "absolute", width: "100%", height: "100%", opacity: 0, cursor: a ? "not-allowed" : "pointer", top: 0, left: 0, margin: 0 }
1289
+ style: { position: "absolute", width: "100%", height: "100%", opacity: 0, cursor: d ? "not-allowed" : "pointer", top: 0, left: 0, margin: 0 }
1086
1290
  },
1087
- D
1291
+ C
1088
1292
  )),
1089
- o.map((M, D) => /* @__PURE__ */ t("div", { style: { position: "absolute", left: `${y(M)}%`, top: "50%", transform: "translate(-50%, -50%)", width: 16, height: 16, borderRadius: "50%", background: e.surface, border: `2px solid ${v}`, boxShadow: "0 1px 4px rgba(0,0,0,.2)", pointerEvents: "none" }, children: /* @__PURE__ */ t("div", { style: { position: "absolute", bottom: "calc(100% + 6px)", left: "50%", transform: "translateX(-50%)", background: a ? e.textMut : e.primaryDk, color: "#fff", padding: "2px 6px", borderRadius: e.r, fontSize: 11, fontWeight: 700, whiteSpace: "nowrap" }, children: M }) }, D))
1293
+ o.map(($, C) => /* @__PURE__ */ t("div", { style: { position: "absolute", left: `${b($)}%`, top: "50%", transform: "translate(-50%, -50%)", width: 16, height: 16, borderRadius: "50%", background: e.surface, border: `2px solid ${m}`, boxShadow: "0 1px 4px rgba(0,0,0,.2)", pointerEvents: "none" }, children: /* @__PURE__ */ t("div", { style: { position: "absolute", bottom: "calc(100% + 6px)", left: "50%", transform: "translateX(-50%)", background: d ? e.textMut : e.primaryDk, color: "#fff", padding: "2px 6px", borderRadius: e.r, fontSize: 11, fontWeight: 700, whiteSpace: "nowrap" }, children: $ }) }, C))
1090
1294
  ] }) }),
1091
- f && /* @__PURE__ */ t("div", { style: { display: "flex", justifyContent: "space-between", marginTop: 2 }, children: [n, Math.round((i + n) / 2), i].map((M) => /* @__PURE__ */ t("span", { style: { fontSize: 10, color: e.textMut }, children: M }, M)) })
1295
+ h && /* @__PURE__ */ t("div", { style: { display: "flex", justifyContent: "space-between", marginTop: 2 }, children: [n, Math.round((i + n) / 2), i].map(($) => /* @__PURE__ */ t("span", { style: { fontSize: 10, color: e.textMut }, children: $ }, $)) })
1092
1296
  ] });
1093
1297
  }
1094
- const xt = ["#f44336", "#e91e63", "#9c27b0", "#673ab7", "#3f51b5", "#2196f3", "#03a9f4", "#00bcd4", "#009688", "#4caf50", "#8bc34a", "#cddc39", "#ffeb3b", "#ffc107", "#ff9800", "#ff5722", "#795548", "#607d8b", "#9e9e9e", "#000000", "#ffffff", "#0288d1", "#01579b", "#43a047", "#e53935", "#f57c00"];
1298
+ const bt = ["#f44336", "#e91e63", "#9c27b0", "#673ab7", "#3f51b5", "#2196f3", "#03a9f4", "#00bcd4", "#009688", "#4caf50", "#8bc34a", "#cddc39", "#ffeb3b", "#ffc107", "#ff9800", "#ff5722", "#795548", "#607d8b", "#9e9e9e", "#000000", "#ffffff", "#0288d1", "#01579b", "#43a047", "#e53935", "#f57c00"];
1095
1299
  function ye(n) {
1096
- const i = parseInt(n.slice(1, 3), 16) / 255, p = parseInt(n.slice(3, 5), 16) / 255, u = parseInt(n.slice(5, 7), 16) / 255, x = Math.max(i, p, u), s = Math.min(i, p, u);
1097
- let f = 0, a = 0;
1098
- const m = (x + s) / 2;
1099
- if (x !== s) {
1100
- const z = x - s;
1101
- a = m > 0.5 ? z / (2 - x - s) : z / (x + s), f = x === i ? ((p - u) / z + (p < u ? 6 : 0)) / 6 : x === p ? ((u - i) / z + 2) / 6 : ((i - p) / z + 4) / 6;
1300
+ const i = parseInt(n.slice(1, 3), 16) / 255, p = parseInt(n.slice(3, 5), 16) / 255, s = parseInt(n.slice(5, 7), 16) / 255, f = Math.max(i, p, s), a = Math.min(i, p, s);
1301
+ let h = 0, d = 0;
1302
+ const y = (f + a) / 2;
1303
+ if (f !== a) {
1304
+ const w = f - a;
1305
+ d = y > 0.5 ? w / (2 - f - a) : w / (f + a), h = f === i ? ((p - s) / w + (p < s ? 6 : 0)) / 6 : f === p ? ((s - i) / w + 2) / 6 : ((i - p) / w + 4) / 6;
1102
1306
  }
1103
- return [Math.round(f * 360), Math.round(a * 100), Math.round(m * 100)];
1307
+ return [Math.round(h * 360), Math.round(d * 100), Math.round(y * 100)];
1104
1308
  }
1105
- function Ie(n, i, p) {
1309
+ function Ce(n, i, p) {
1106
1310
  i /= 100, p /= 100;
1107
- const u = i * Math.min(p, 1 - p), x = (s) => {
1108
- const f = (s + n / 30) % 12, a = p - u * Math.max(Math.min(f - 3, 9 - f, 1), -1);
1109
- return Math.round(255 * a).toString(16).padStart(2, "0");
1311
+ const s = i * Math.min(p, 1 - p), f = (a) => {
1312
+ const h = (a + n / 30) % 12, d = p - s * Math.max(Math.min(h - 3, 9 - h, 1), -1);
1313
+ return Math.round(255 * d).toString(16).padStart(2, "0");
1110
1314
  };
1111
- return "#" + x(0) + x(8) + x(4);
1315
+ return "#" + f(0) + f(8) + f(4);
1112
1316
  }
1113
- function Tt({ value: n = "#0288d1", onChange: i, style: p }) {
1114
- const [u, x] = C(() => ye(n)), s = Ie(...u);
1115
- H(O, []);
1116
- const f = (a) => {
1117
- x(a), i == null || i(Ie(...a));
1317
+ function Et({ value: n = "#0288d1", onChange: i, style: p }) {
1318
+ const [s, f] = L(() => ye(n)), a = Ce(...s);
1319
+ F(V, []);
1320
+ const h = (d) => {
1321
+ f(d), i == null || i(Ce(...d));
1118
1322
  };
1119
- return /* @__PURE__ */ g("div", { className: "dhx", style: { background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, padding: 16, display: "inline-block", boxShadow: e.shadow, ...p }, children: [
1120
- /* @__PURE__ */ t("div", { style: { width: 200, height: 120, borderRadius: e.r, marginBottom: 12, background: `linear-gradient(to bottom, transparent, black), linear-gradient(to right, white, hsl(${u[0]},100%,50%))`, cursor: "crosshair" } }),
1121
- [["Hue", 0, 360, u[0]], ["Saturation", 0, 100, u[1]], ["Lightness", 0, 100, u[2]]].map(([a, m, z, r], l) => /* @__PURE__ */ g("div", { style: { marginBottom: l < 2 ? 8 : 12 }, children: [
1122
- /* @__PURE__ */ g("div", { className: "dhx dhx-label", children: [
1123
- a,
1323
+ return /* @__PURE__ */ x("div", { className: "dhx", style: { background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, padding: 16, display: "inline-block", boxShadow: e.shadow, ...p }, children: [
1324
+ /* @__PURE__ */ t("div", { style: { width: 200, height: 120, borderRadius: e.r, marginBottom: 12, background: `linear-gradient(to bottom, transparent, black), linear-gradient(to right, white, hsl(${s[0]},100%,50%))`, cursor: "crosshair" } }),
1325
+ [["Hue", 0, 360, s[0]], ["Saturation", 0, 100, s[1]], ["Lightness", 0, 100, s[2]]].map(([d, y, w, r], l) => /* @__PURE__ */ x("div", { style: { marginBottom: l < 2 ? 8 : 12 }, children: [
1326
+ /* @__PURE__ */ x("div", { className: "dhx dhx-label", children: [
1327
+ d,
1124
1328
  l > 0 ? ` (${r}%)` : ""
1125
1329
  ] }),
1126
- /* @__PURE__ */ t("input", { type: "range", min: m, max: z, value: r, onChange: (d) => {
1127
- const y = [...u];
1128
- y[l] = +d.target.value, f(y);
1330
+ /* @__PURE__ */ t("input", { type: "range", min: y, max: w, value: r, onChange: (c) => {
1331
+ const b = [...s];
1332
+ b[l] = +c.target.value, h(b);
1129
1333
  }, style: { width: "100%", accentColor: e.primary } })
1130
- ] }, a)),
1131
- /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 12 }, children: [
1132
- /* @__PURE__ */ t("div", { style: { width: 36, height: 36, borderRadius: e.r, background: s, border: `1px solid ${e.border}`, flexShrink: 0 } }),
1334
+ ] }, d)),
1335
+ /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 12 }, children: [
1336
+ /* @__PURE__ */ t("div", { style: { width: 36, height: 36, borderRadius: e.r, background: a, border: `1px solid ${e.border}`, flexShrink: 0 } }),
1133
1337
  /* @__PURE__ */ t(
1134
1338
  "input",
1135
1339
  {
1136
1340
  className: "dhx dhx-input",
1137
1341
  style: { flex: 1, fontFamily: "monospace", fontSize: 12 },
1138
- value: s,
1139
- onChange: (a) => {
1342
+ value: a,
1343
+ onChange: (d) => {
1140
1344
  try {
1141
- f(ye(a.target.value)), i == null || i(a.target.value);
1345
+ h(ye(d.target.value)), i == null || i(d.target.value);
1142
1346
  } catch {
1143
1347
  }
1144
1348
  }
1145
1349
  }
1146
1350
  )
1147
1351
  ] }),
1148
- /* @__PURE__ */ t("div", { style: { display: "grid", gridTemplateColumns: "repeat(13, 1fr)", gap: 3 }, children: xt.map((a) => /* @__PURE__ */ t(
1352
+ /* @__PURE__ */ t("div", { style: { display: "grid", gridTemplateColumns: "repeat(13, 1fr)", gap: 3 }, children: bt.map((d) => /* @__PURE__ */ t(
1149
1353
  "div",
1150
1354
  {
1151
1355
  onClick: () => {
1152
- x(ye(a)), i == null || i(a);
1356
+ f(ye(d)), i == null || i(d);
1153
1357
  },
1154
- style: { width: 14, height: 14, borderRadius: 2, background: a, cursor: "pointer", border: s === a ? `2px solid ${e.text}` : "1px solid rgba(0,0,0,.15)", transition: "transform .1s" },
1155
- onMouseEnter: (m) => m.currentTarget.style.transform = "scale(1.3)",
1156
- onMouseLeave: (m) => m.currentTarget.style.transform = "scale(1)"
1358
+ style: { width: 14, height: 14, borderRadius: 2, background: d, cursor: "pointer", border: a === d ? `2px solid ${e.text}` : "1px solid rgba(0,0,0,.15)", transition: "transform .1s" },
1359
+ onMouseEnter: (y) => y.currentTarget.style.transform = "scale(1.3)",
1360
+ onMouseLeave: (y) => y.currentTarget.style.transform = "scale(1)"
1157
1361
  },
1158
- a
1362
+ d
1159
1363
  )) })
1160
1364
  ] });
1161
1365
  }
1162
- function Nt({ trigger: n, children: i, placement: p = "bottom-start", style: u }) {
1163
- const [x, s] = C(!1), [f, a] = C({ top: "100%", left: 0 }), m = q(null), z = q(null);
1164
- return H(O, []), ie(m, G(() => s(!1), [])), /* @__PURE__ */ g("div", { ref: m, className: "dhx", style: { position: "relative", display: "inline-block" }, children: [
1165
- /* @__PURE__ */ t("div", { ref: z, onClick: () => {
1166
- s((l) => {
1167
- if (!l && z.current) {
1168
- const d = z.current.getBoundingClientRect(), y = {
1169
- "bottom-start": { top: d.height + 4, left: 0 },
1170
- "bottom-end": { top: d.height + 4, right: 0, left: "auto" },
1171
- "top-start": { bottom: d.height + 4, top: "auto", left: 0 }
1366
+ function Wt({ trigger: n, children: i, placement: p = "bottom-start", style: s }) {
1367
+ const [f, a] = L(!1), [h, d] = L({ top: "100%", left: 0 }), y = U(null), w = U(null);
1368
+ return F(V, []), he(y, Z(() => a(!1), [])), /* @__PURE__ */ x("div", { ref: y, className: "dhx", style: { position: "relative", display: "inline-block" }, children: [
1369
+ /* @__PURE__ */ t("div", { ref: w, onClick: () => {
1370
+ a((l) => {
1371
+ if (!l && w.current) {
1372
+ const c = w.current.getBoundingClientRect(), b = {
1373
+ "bottom-start": { top: c.height + 4, left: 0 },
1374
+ "bottom-end": { top: c.height + 4, right: 0, left: "auto" },
1375
+ "top-start": { bottom: c.height + 4, top: "auto", left: 0 }
1172
1376
  };
1173
- a(y[p] || y["bottom-start"]);
1377
+ d(b[p] || b["bottom-start"]);
1174
1378
  }
1175
1379
  return !l;
1176
1380
  });
1177
1381
  }, children: n }),
1178
- x && /* @__PURE__ */ t("div", { className: "dhx dhx-anim-fade", style: { position: "absolute", ...f, zIndex: 200, background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, boxShadow: e.shadowLg, ...u }, children: i })
1382
+ f && /* @__PURE__ */ t("div", { className: "dhx dhx-anim-fade", style: { position: "absolute", ...h, zIndex: 200, background: e.surface, border: `1px solid ${e.border}`, borderRadius: e.rMd, boxShadow: e.shadowLg, ...s }, children: i })
1179
1383
  ] });
1180
1384
  }
1181
- function Rt({ title: n, children: i, width: p = 480, height: u, closable: x = !0, movable: s = !0, modal: f = !1, defaultOpen: a = !0, footer: m, onClose: z, style: r }) {
1182
- const [l, d] = C(a), [y, o] = C({ x: 0, y: 0 });
1183
- H(O, []);
1184
- const b = st(G((M, D) => s && o({ x: M, y: D }), [s])), v = () => {
1185
- d(!1), z == null || z();
1385
+ function At({ title: n, children: i, width: p = 480, height: s, closable: f = !0, movable: a = !0, modal: h = !1, defaultOpen: d = !0, footer: y, onClose: w, style: r }) {
1386
+ const [l, c] = L(d), [b, o] = L({ x: 0, y: 0 });
1387
+ F(V, []);
1388
+ const g = dt(Z(($, C) => a && o({ x: $, y: C }), [a])), m = () => {
1389
+ c(!1), w == null || w();
1186
1390
  };
1187
- return l ? /* @__PURE__ */ g(Ne, { children: [
1188
- f && /* @__PURE__ */ t("div", { style: { position: "fixed", inset: 0, background: "rgba(0,0,0,.45)", zIndex: 900 }, onClick: x ? v : void 0 }),
1189
- /* @__PURE__ */ g("div", { className: "dhx", style: { position: f ? "fixed" : "absolute", left: "50%", top: "50%", transform: `translate(calc(-50% + ${y.x}px), calc(-50% + ${y.y}px))`, width: p, ...u ? { height: u } : {}, background: e.surface, borderRadius: e.rMd, boxShadow: e.shadowLg, zIndex: 901, display: "flex", flexDirection: "column", overflow: "hidden", ...r }, children: [
1190
- /* @__PURE__ */ g("div", { onMouseDown: (M) => b(M, y.x, y.y), style: { display: "flex", alignItems: "center", padding: "12px 16px", borderBottom: `1px solid ${e.border}`, cursor: s ? "grab" : "default", background: e.bg, gap: 8, userSelect: "none" }, children: [
1391
+ return l ? /* @__PURE__ */ x(Ne, { children: [
1392
+ h && /* @__PURE__ */ t("div", { style: { position: "fixed", inset: 0, background: "rgba(0,0,0,.45)", zIndex: 900 }, onClick: f ? m : void 0 }),
1393
+ /* @__PURE__ */ x("div", { className: "dhx", style: { position: h ? "fixed" : "absolute", left: "50%", top: "50%", transform: `translate(calc(-50% + ${b.x}px), calc(-50% + ${b.y}px))`, width: p, ...s ? { height: s } : {}, background: e.surface, borderRadius: e.rMd, boxShadow: e.shadowLg, zIndex: 901, display: "flex", flexDirection: "column", overflow: "hidden", ...r }, children: [
1394
+ /* @__PURE__ */ x("div", { onMouseDown: ($) => g($, b.x, b.y), style: { display: "flex", alignItems: "center", padding: "12px 16px", borderBottom: `1px solid ${e.border}`, cursor: a ? "grab" : "default", background: e.bg, gap: 8, userSelect: "none" }, children: [
1191
1395
  /* @__PURE__ */ t("span", { style: { flex: 1, fontWeight: 700, fontSize: 15 }, children: n }),
1192
- x && /* @__PURE__ */ t(
1396
+ f && /* @__PURE__ */ t(
1193
1397
  "button",
1194
1398
  {
1195
- onClick: v,
1399
+ onClick: m,
1196
1400
  style: { background: "none", border: "none", cursor: "pointer", width: 28, height: 28, borderRadius: e.r, display: "flex", alignItems: "center", justifyContent: "center", fontSize: 18, color: e.textSec },
1197
- onMouseEnter: (M) => M.currentTarget.style.background = e.border,
1198
- onMouseLeave: (M) => M.currentTarget.style.background = "none",
1401
+ onMouseEnter: ($) => $.currentTarget.style.background = e.border,
1402
+ onMouseLeave: ($) => $.currentTarget.style.background = "none",
1199
1403
  children: "×"
1200
1404
  }
1201
1405
  )
1202
1406
  ] }),
1203
1407
  /* @__PURE__ */ t("div", { className: "dhx-scroll", style: { flex: 1, minHeight: 0, padding: 20, overflowY: "auto" }, children: i }),
1204
- m && /* @__PURE__ */ t("div", { style: { padding: "12px 16px", borderTop: `1px solid ${e.border}`, display: "flex", justifyContent: "flex-end", gap: 8, background: e.bg }, children: m })
1408
+ y && /* @__PURE__ */ t("div", { style: { padding: "12px 16px", borderTop: `1px solid ${e.border}`, display: "flex", justifyContent: "flex-end", gap: 8, background: e.bg }, children: y })
1205
1409
  ] })
1206
1410
  ] }) : null;
1207
1411
  }
1208
- const Re = je(null), gt = { success: "✓", error: "✕", warning: "⚠", info: "ℹ" }, Ce = { success: e.success, error: e.danger, warning: e.warning, info: e.primary };
1209
- function Et({ children: n }) {
1210
- const [i, p] = C([]);
1211
- H(O, []);
1212
- const u = G((f) => p((a) => a.filter((m) => m.id !== f)), []), x = G((f) => {
1213
- const a = Date.now();
1214
- return p((m) => [...m, { id: a, ...f }]), f.duration !== 0 && setTimeout(() => u(a), f.duration || 4e3), a;
1215
- }, [u]), s = {
1216
- message: x,
1217
- alert: (f, a) => x({ type: "info", title: f, ...a }),
1218
- confirm: (f, a, m) => x({ type: "warning", title: f, confirm: a, ...m })
1412
+ const Re = Pe(null), mt = { success: "✓", error: "✕", warning: "⚠", info: "ℹ" }, Ie = { success: e.success, error: e.danger, warning: e.warning, info: e.primary };
1413
+ function Bt({ children: n }) {
1414
+ const [i, p] = L([]);
1415
+ F(V, []);
1416
+ const s = Z((h) => p((d) => d.filter((y) => y.id !== h)), []), f = Z((h) => {
1417
+ const d = Date.now();
1418
+ return p((y) => [...y, { id: d, ...h }]), h.duration !== 0 && setTimeout(() => s(d), h.duration || 4e3), d;
1419
+ }, [s]), a = {
1420
+ message: f,
1421
+ alert: (h, d) => f({ type: "info", title: h, ...d }),
1422
+ confirm: (h, d, y) => f({ type: "warning", title: h, confirm: d, ...y })
1219
1423
  };
1220
- return /* @__PURE__ */ g(Re.Provider, { value: s, children: [
1424
+ return /* @__PURE__ */ x(Re.Provider, { value: a, children: [
1221
1425
  n,
1222
- /* @__PURE__ */ t("div", { style: { position: "fixed", top: 20, right: 20, zIndex: 9999, display: "flex", flexDirection: "column", gap: 8, pointerEvents: "none" }, children: i.map((f) => {
1223
- const a = f.type || "info";
1224
- return /* @__PURE__ */ g("div", { style: { background: e.surface, border: `1px solid ${e.border}`, borderLeft: `4px solid ${Ce[a]}`, borderRadius: e.r, boxShadow: e.shadowLg, padding: "12px 16px", minWidth: 280, maxWidth: 380, pointerEvents: "all", display: "flex", gap: 10, alignItems: "flex-start", animation: "dhx-toast .3s ease" }, children: [
1225
- /* @__PURE__ */ t("span", { style: { fontSize: 18, color: Ce[a], lineHeight: 1 }, children: gt[a] }),
1226
- /* @__PURE__ */ g("div", { style: { flex: 1 }, children: [
1227
- f.title && /* @__PURE__ */ t("div", { style: { fontWeight: 600, fontSize: 13, marginBottom: f.text ? 3 : 0 }, children: f.title }),
1228
- f.text && /* @__PURE__ */ t("div", { style: { fontSize: 12, color: e.textSec, lineHeight: 1.5 }, children: f.text }),
1229
- f.confirm && /* @__PURE__ */ g("div", { style: { display: "flex", gap: 6, marginTop: 8 }, children: [
1426
+ /* @__PURE__ */ t("div", { style: { position: "fixed", top: 20, right: 20, zIndex: 9999, display: "flex", flexDirection: "column", gap: 8, pointerEvents: "none" }, children: i.map((h) => {
1427
+ const d = h.type || "info";
1428
+ return /* @__PURE__ */ x("div", { style: { background: e.surface, border: `1px solid ${e.border}`, borderLeft: `4px solid ${Ie[d]}`, borderRadius: e.r, boxShadow: e.shadowLg, padding: "12px 16px", minWidth: 280, maxWidth: 380, pointerEvents: "all", display: "flex", gap: 10, alignItems: "flex-start", animation: "dhx-toast .3s ease" }, children: [
1429
+ /* @__PURE__ */ t("span", { style: { fontSize: 18, color: Ie[d], lineHeight: 1 }, children: mt[d] }),
1430
+ /* @__PURE__ */ x("div", { style: { flex: 1 }, children: [
1431
+ h.title && /* @__PURE__ */ t("div", { style: { fontWeight: 600, fontSize: 13, marginBottom: h.text ? 3 : 0 }, children: h.title }),
1432
+ h.text && /* @__PURE__ */ t("div", { style: { fontSize: 12, color: e.textSec, lineHeight: 1.5 }, children: h.text }),
1433
+ h.confirm && /* @__PURE__ */ x("div", { style: { display: "flex", gap: 6, marginTop: 8 }, children: [
1230
1434
  /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-primary", style: { height: 26, fontSize: 12 }, onClick: () => {
1231
- f.confirm(!0), u(f.id);
1435
+ h.confirm(!0), s(h.id);
1232
1436
  }, children: "Confirm" }),
1233
1437
  /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-secondary", style: { height: 26, fontSize: 12 }, onClick: () => {
1234
- f.confirm(!1), u(f.id);
1438
+ h.confirm(!1), s(h.id);
1235
1439
  }, children: "Cancel" })
1236
1440
  ] })
1237
1441
  ] }),
1238
- /* @__PURE__ */ t("button", { onClick: () => u(f.id), style: { background: "none", border: "none", cursor: "pointer", color: e.textMut, fontSize: 14, lineHeight: 1, padding: 0 }, children: "×" })
1239
- ] }, f.id);
1442
+ /* @__PURE__ */ t("button", { onClick: () => s(h.id), style: { background: "none", border: "none", cursor: "pointer", color: e.textMut, fontSize: 14, lineHeight: 1, padding: 0 }, children: "×" })
1443
+ ] }, h.id);
1240
1444
  }) })
1241
1445
  ] });
1242
1446
  }
1243
- function Wt() {
1244
- const n = Pe(Re);
1447
+ function Ht() {
1448
+ const n = je(Re);
1245
1449
  if (!n) throw new Error("useMessage must be used inside <MessageProvider>");
1246
1450
  return n;
1247
1451
  }
1248
- function At({ data: n = [], template: i, keyNavigation: p = !0, multiselection: u = !1, editable: x = !1, height: s = 400, onSelect: f, onEdit: a, style: m }) {
1249
- const [z, r] = C(/* @__PURE__ */ new Set()), [l, d] = C(null), [y, o] = C(""), [b, v] = C(null);
1250
- H(O, []);
1251
- const M = (T, h) => {
1252
- const k = T.id ?? h;
1253
- r((E) => {
1254
- const c = u ? new Set(E) : /* @__PURE__ */ new Set();
1255
- return c.has(k) ? c.delete(k) : c.add(k), c;
1256
- }), v(h), f == null || f(T);
1257
- }, D = (T, h) => {
1258
- a == null || a({ ...T, value: y }, h), d(null);
1452
+ function Pt({ data: n = [], template: i, keyNavigation: p = !0, multiselection: s = !1, editable: f = !1, height: a = 400, onSelect: h, onEdit: d, style: y }) {
1453
+ const [w, r] = L(/* @__PURE__ */ new Set()), [l, c] = L(null), [b, o] = L(""), [g, m] = L(null);
1454
+ F(V, []);
1455
+ const $ = (N, k) => {
1456
+ const M = N.id ?? k;
1457
+ r((W) => {
1458
+ const u = s ? new Set(W) : /* @__PURE__ */ new Set();
1459
+ return u.has(M) ? u.delete(M) : u.add(M), u;
1460
+ }), m(k), h == null || h(N);
1461
+ }, C = (N, k) => {
1462
+ d == null || d({ ...N, value: b }, k), c(null);
1259
1463
  };
1260
- return /* @__PURE__ */ g(
1464
+ return /* @__PURE__ */ x(
1261
1465
  "div",
1262
1466
  {
1263
1467
  className: "dhx dhx-scroll",
1264
- style: { height: s, overflowY: "auto", border: `1px solid ${e.border}`, borderRadius: e.r, background: e.surface, ...m },
1468
+ style: { height: a, overflowY: "auto", border: `1px solid ${e.border}`, borderRadius: e.r, background: e.surface, ...y },
1265
1469
  tabIndex: 0,
1266
- onKeyDown: (T) => {
1267
- p && (T.key === "ArrowDown" && v((h) => Math.min((h ?? -1) + 1, n.length - 1)), T.key === "ArrowUp" && v((h) => Math.max((h ?? 1) - 1, 0)));
1470
+ onKeyDown: (N) => {
1471
+ p && (N.key === "ArrowDown" && m((k) => Math.min((k ?? -1) + 1, n.length - 1)), N.key === "ArrowUp" && m((k) => Math.max((k ?? 1) - 1, 0)));
1268
1472
  },
1269
1473
  children: [
1270
- n.map((T, h) => {
1271
- const k = T.id ?? h, E = z.has(k), c = b === h;
1474
+ n.map((N, k) => {
1475
+ const M = N.id ?? k, W = w.has(M), u = g === k;
1272
1476
  return /* @__PURE__ */ t(
1273
1477
  "div",
1274
1478
  {
1275
- onClick: () => M(T, h),
1276
- onDoubleClick: () => x && (d(h), o(String(T.value || ""))),
1277
- style: { display: "flex", alignItems: "center", padding: "0 12px", height: 40, cursor: "pointer", fontSize: 13, borderBottom: `1px solid ${e.border}`, background: E ? e.primaryLt : c ? e.bg : e.surface, color: E ? e.primary : e.text, outline: c ? `2px solid ${e.primary}44` : "none", transition: "background .1s" },
1278
- children: l === h ? /* @__PURE__ */ t(
1479
+ onClick: () => $(N, k),
1480
+ onDoubleClick: () => f && (c(k), o(String(N.value || ""))),
1481
+ style: { display: "flex", alignItems: "center", padding: "0 12px", height: 40, cursor: "pointer", fontSize: 13, borderBottom: `1px solid ${e.border}`, background: W ? e.primaryLt : u ? e.bg : e.surface, color: W ? e.primary : e.text, outline: u ? `2px solid ${e.primary}44` : "none", transition: "background .1s" },
1482
+ children: l === k ? /* @__PURE__ */ t(
1279
1483
  "input",
1280
1484
  {
1281
1485
  autoFocus: !0,
1282
1486
  className: "dhx dhx-input",
1283
1487
  style: { height: 28, flex: 1 },
1284
- value: y,
1488
+ value: b,
1285
1489
  onChange: (I) => o(I.target.value),
1286
- onBlur: () => D(T, h),
1490
+ onBlur: () => C(N, k),
1287
1491
  onKeyDown: (I) => {
1288
- I.key === "Enter" && D(T, h), I.key === "Escape" && d(null);
1492
+ I.key === "Enter" && C(N, k), I.key === "Escape" && c(null);
1289
1493
  },
1290
1494
  onClick: (I) => I.stopPropagation()
1291
1495
  }
1292
- ) : i ? /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: i(T) }, style: { flex: 1 } }) : /* @__PURE__ */ t("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: String(T.value ?? "") })
1496
+ ) : i ? /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: i(N) }, style: { flex: 1 } }) : /* @__PURE__ */ t("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: String(N.value ?? "") })
1293
1497
  },
1294
- String(k)
1498
+ String(M)
1295
1499
  );
1296
1500
  }),
1297
1501
  n.length === 0 && /* @__PURE__ */ t("div", { style: { padding: 24, textAlign: "center", color: e.textMut }, children: "No items" })
@@ -1299,36 +1503,36 @@ function At({ data: n = [], template: i, keyNavigation: p = !0, multiselection:
1299
1503
  }
1300
1504
  );
1301
1505
  }
1302
- function Bt({ data: n = [], template: i, itemsInRow: p = 3, gap: u = 12, multiselection: x = !1, onSelect: s, style: f }) {
1303
- const [a, m] = C(/* @__PURE__ */ new Set());
1304
- H(O, []);
1305
- const z = (r) => {
1506
+ function jt({ data: n = [], template: i, itemsInRow: p = 3, gap: s = 12, multiselection: f = !1, onSelect: a, style: h }) {
1507
+ const [d, y] = L(/* @__PURE__ */ new Set());
1508
+ F(V, []);
1509
+ const w = (r) => {
1306
1510
  const l = r.id ?? String(r.title);
1307
- m((d) => {
1308
- const y = x ? new Set(d) : /* @__PURE__ */ new Set();
1309
- return y.has(l) ? y.delete(l) : y.add(l), y;
1310
- }), s == null || s(r);
1511
+ y((c) => {
1512
+ const b = f ? new Set(c) : /* @__PURE__ */ new Set();
1513
+ return b.has(l) ? b.delete(l) : b.add(l), b;
1514
+ }), a == null || a(r);
1311
1515
  };
1312
- return /* @__PURE__ */ t("div", { className: "dhx", style: { display: "grid", gridTemplateColumns: `repeat(${p}, 1fr)`, gap: u, padding: u, ...f }, children: n.map((r, l) => {
1313
- const d = r.id ?? l, y = a.has(d);
1516
+ return /* @__PURE__ */ t("div", { className: "dhx", style: { display: "grid", gridTemplateColumns: `repeat(${p}, 1fr)`, gap: s, padding: s, ...h }, children: n.map((r, l) => {
1517
+ const c = r.id ?? l, b = d.has(c);
1314
1518
  return /* @__PURE__ */ t(
1315
1519
  "div",
1316
1520
  {
1317
- onClick: () => z(r),
1318
- style: { background: e.surface, border: `2px solid ${y ? e.primary : e.border}`, borderRadius: e.rMd, overflow: "hidden", cursor: "pointer", transition: "all .15s", boxShadow: y ? `0 0 0 3px ${e.primary}33` : e.shadow, transform: y ? "translateY(-2px)" : "none" },
1521
+ onClick: () => w(r),
1522
+ style: { background: e.surface, border: `2px solid ${b ? e.primary : e.border}`, borderRadius: e.rMd, overflow: "hidden", cursor: "pointer", transition: "all .15s", boxShadow: b ? `0 0 0 3px ${e.primary}33` : e.shadow, transform: b ? "translateY(-2px)" : "none" },
1319
1523
  onMouseEnter: (o) => {
1320
1524
  o.currentTarget.style.boxShadow = e.shadowLg, o.currentTarget.style.transform = "translateY(-2px)";
1321
1525
  },
1322
1526
  onMouseLeave: (o) => {
1323
- o.currentTarget.style.boxShadow = y ? `0 0 0 3px ${e.primary}33` : e.shadow, o.currentTarget.style.transform = y ? "translateY(-2px)" : "none";
1527
+ o.currentTarget.style.boxShadow = b ? `0 0 0 3px ${e.primary}33` : e.shadow, o.currentTarget.style.transform = b ? "translateY(-2px)" : "none";
1324
1528
  },
1325
- children: i ? /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: i(r) } }) : /* @__PURE__ */ g("div", { style: { padding: 16 }, children: [
1529
+ children: i ? /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: i(r) } }) : /* @__PURE__ */ x("div", { style: { padding: 16 }, children: [
1326
1530
  r.img && /* @__PURE__ */ t("img", { src: r.img, alt: r.title || "", style: { width: "100%", borderRadius: e.r, marginBottom: 8, display: "block" } }),
1327
1531
  /* @__PURE__ */ t("div", { style: { fontWeight: 600, fontSize: 14, marginBottom: 4 }, children: r.title || r.value }),
1328
1532
  r.subtitle && /* @__PURE__ */ t("div", { style: { fontSize: 12, color: e.textSec }, children: r.subtitle })
1329
1533
  ] })
1330
1534
  },
1331
- String(d)
1535
+ String(c)
1332
1536
  );
1333
1537
  }) });
1334
1538
  }
@@ -1342,276 +1546,276 @@ function me(n, i = {}) {
1342
1546
  }
1343
1547
  function Ee(n, i) {
1344
1548
  let p = null;
1345
- return [n.filter((x) => x.id === i ? (p = x, !1) : !0).map((x) => {
1346
- if (x.items) {
1347
- const [s, f] = Ee(x.items, i);
1348
- return f && (p = f), { ...x, items: s };
1549
+ return [n.filter((f) => f.id === i ? (p = f, !1) : !0).map((f) => {
1550
+ if (f.items) {
1551
+ const [a, h] = Ee(f.items, i);
1552
+ return h && (p = h), { ...f, items: a };
1349
1553
  }
1350
- return x;
1554
+ return f;
1351
1555
  }), p];
1352
1556
  }
1353
- function ve(n, i, p, u) {
1354
- if (u === "inside")
1355
- return n.map((s) => s.id === i ? { ...s, items: [...s.items || [], p] } : s.items ? { ...s, items: ve(s.items, i, p, u) } : s);
1356
- if (n.some((s) => s.id === i)) {
1357
- const s = [];
1358
- for (const f of n)
1359
- f.id === i ? u === "before" ? (s.push(p), s.push(f)) : (s.push(f), s.push(p)) : s.push(f);
1360
- return s;
1557
+ function ve(n, i, p, s) {
1558
+ if (s === "inside")
1559
+ return n.map((a) => a.id === i ? { ...a, items: [...a.items || [], p] } : a.items ? { ...a, items: ve(a.items, i, p, s) } : a);
1560
+ if (n.some((a) => a.id === i)) {
1561
+ const a = [];
1562
+ for (const h of n)
1563
+ h.id === i ? s === "before" ? (a.push(p), a.push(h)) : (a.push(h), a.push(p)) : a.push(h);
1564
+ return a;
1361
1565
  }
1362
- return n.map((s) => s.items ? { ...s, items: ve(s.items, i, p, u) } : s);
1566
+ return n.map((a) => a.items ? { ...a, items: ve(a.items, i, p, s) } : a);
1363
1567
  }
1364
- function yt(n, i, p) {
1365
- function u(x) {
1366
- var s, f;
1367
- if (x.id === i) {
1368
- const a = (m) => {
1369
- var z;
1370
- return m.id === p || (((z = m.items) == null ? void 0 : z.some(a)) ?? !1);
1568
+ function vt(n, i, p) {
1569
+ function s(f) {
1570
+ var a, h;
1571
+ if (f.id === i) {
1572
+ const d = (y) => {
1573
+ var w;
1574
+ return y.id === p || (((w = y.items) == null ? void 0 : w.some(d)) ?? !1);
1371
1575
  };
1372
- return ((s = x.items) == null ? void 0 : s.some(a)) ?? !1;
1576
+ return ((a = f.items) == null ? void 0 : a.some(d)) ?? !1;
1373
1577
  }
1374
- return ((f = x.items) == null ? void 0 : f.some(u)) ?? !1;
1578
+ return ((h = f.items) == null ? void 0 : h.some(s)) ?? !1;
1375
1579
  }
1376
- return n.some(u);
1580
+ return n.some(s);
1377
1581
  }
1378
1582
  function We(n, i, p) {
1379
1583
  return n.map(
1380
- (u) => u.id === i ? { ...u, value: p } : { ...u, items: u.items ? We(u.items, i, p) : void 0 }
1584
+ (s) => s.id === i ? { ...s, value: p } : { ...s, items: s.items ? We(s.items, i, p) : void 0 }
1381
1585
  );
1382
1586
  }
1383
- function bt(n, i) {
1384
- var s;
1385
- let p = 0, u = 0;
1386
- const x = (f) => {
1387
- var a;
1388
- p++, i[f.id] && u++, (a = f.items) == null || a.forEach(x);
1587
+ function kt(n, i) {
1588
+ var a;
1589
+ let p = 0, s = 0;
1590
+ const f = (h) => {
1591
+ var d;
1592
+ p++, i[h.id] && s++, (d = h.items) == null || d.forEach(f);
1389
1593
  };
1390
- return (s = n.items) == null || s.forEach(x), { total: p, checkedCount: u };
1594
+ return (a = n.items) == null || a.forEach(f), { total: p, checkedCount: s };
1391
1595
  }
1392
- function Ht({
1596
+ function Ot({
1393
1597
  data: n = [],
1394
1598
  checkbox: i = !1,
1395
1599
  editable: p = !1,
1396
- dragMode: u,
1397
- tooltip: x,
1398
- onSelect: s,
1399
- onCheck: f,
1400
- onChange: a,
1401
- style: m
1600
+ dragMode: s,
1601
+ tooltip: f,
1602
+ onSelect: a,
1603
+ onCheck: h,
1604
+ onChange: d,
1605
+ style: y
1402
1606
  }) {
1403
- const [z, r] = C(() => be(n)), [l, d] = C(() => me(n)), [y, o] = C(null), [b, v] = C({}), [M, D] = C(null), [T, h] = C(""), [k, E] = C(null), [c, I] = C(null);
1404
- H(O, []), H(() => {
1405
- r(be(n)), d((L) => ({ ...me(n), ...L }));
1607
+ const [w, r] = L(() => be(n)), [l, c] = L(() => me(n)), [b, o] = L(null), [g, m] = L({}), [$, C] = L(null), [N, k] = L(""), [M, W] = L(null), [u, I] = L(null);
1608
+ F(V, []), F(() => {
1609
+ r(be(n)), c((z) => ({ ...me(n), ...z }));
1406
1610
  }, [n]);
1407
- const S = (L) => d((j) => ({ ...j, [L]: !j[L] })), A = (L, j) => {
1408
- v((Y) => ({ ...Y, [L]: j })), f == null || f(L, j);
1409
- }, F = () => {
1410
- if (!M) return;
1411
- const L = M, j = T;
1412
- D(null), r((Y) => {
1413
- const V = We(Y, L, j);
1414
- return a == null || a(V), V;
1611
+ const v = (z) => c((A) => ({ ...A, [z]: !A[z] })), H = (z, A) => {
1612
+ m((P) => ({ ...P, [z]: A })), h == null || h(z, A);
1613
+ }, _ = () => {
1614
+ if (!$) return;
1615
+ const z = $, A = N;
1616
+ C(null), r((P) => {
1617
+ const O = We(P, z, A);
1618
+ return d == null || d(O), O;
1415
1619
  });
1416
- }, U = (L, j) => {
1417
- L.dataTransfer.effectAllowed = "move", E(j);
1418
- }, Q = (L, j) => {
1419
- if (!k || k === j || yt(z, k, j)) return;
1420
- L.preventDefault();
1421
- const Y = L.currentTarget.getBoundingClientRect(), V = L.clientY - Y.top, K = Y.height, J = V < K * 0.25 ? "before" : V > K * 0.75 ? "after" : "inside";
1422
- I((X) => (X == null ? void 0 : X.id) === j && (X == null ? void 0 : X.pos) === J ? X : { id: j, pos: J });
1423
- }, de = (L, j) => {
1424
- if (L.preventDefault(), !k || !c || k === j) {
1425
- I(null), E(null);
1620
+ }, G = (z, A) => {
1621
+ z.dataTransfer.effectAllowed = "move", W(A);
1622
+ }, Q = (z, A) => {
1623
+ if (!M || M === A || vt(w, M, A)) return;
1624
+ z.preventDefault();
1625
+ const P = z.currentTarget.getBoundingClientRect(), O = z.clientY - P.top, j = P.height, J = O < j * 0.25 ? "before" : O > j * 0.75 ? "after" : "inside";
1626
+ I((X) => (X == null ? void 0 : X.id) === A && (X == null ? void 0 : X.pos) === J ? X : { id: A, pos: J });
1627
+ }, re = (z, A) => {
1628
+ if (z.preventDefault(), !M || !u || M === A) {
1629
+ I(null), W(null);
1426
1630
  return;
1427
1631
  }
1428
- r((Y) => {
1429
- const [V, K] = Ee(Y, k);
1430
- if (!K) return Y;
1431
- const J = ve(V, j, K, c.pos);
1432
- return a == null || a(J), J;
1433
- }), c.pos === "inside" && d((Y) => ({ ...Y, [j]: !0 })), I(null), E(null);
1434
- }, le = () => {
1435
- E(null), I(null);
1436
- }, ce = (L, j = 0) => {
1437
- var he;
1438
- const Y = (((he = L.items) == null ? void 0 : he.length) ?? 0) > 0, V = l[L.id], K = y === L.id, J = k === L.id, X = (c == null ? void 0 : c.id) === L.id;
1439
- let pe = !!b[L.id], ue = !1;
1440
- if (i && Y) {
1441
- const { total: W, checkedCount: ee } = bt(L, b);
1442
- ee > 0 && ee < W ? ue = !0 : W > 0 && ee === W && (pe = !0);
1632
+ r((P) => {
1633
+ const [O, j] = Ee(P, M);
1634
+ if (!j) return P;
1635
+ const J = ve(O, A, j, u.pos);
1636
+ return d == null || d(J), J;
1637
+ }), u.pos === "inside" && c((P) => ({ ...P, [A]: !0 })), I(null), W(null);
1638
+ }, ee = () => {
1639
+ W(null), I(null);
1640
+ }, T = (z, A = 0) => {
1641
+ var ae;
1642
+ const P = (((ae = z.items) == null ? void 0 : ae.length) ?? 0) > 0, O = l[z.id], j = b === z.id, J = M === z.id, X = (u == null ? void 0 : u.id) === z.id;
1643
+ let oe = !!g[z.id], te = !1;
1644
+ if (i && P) {
1645
+ const { total: B, checkedCount: ne } = kt(z, g);
1646
+ ne > 0 && ne < B ? te = !0 : B > 0 && ne === B && (oe = !0);
1443
1647
  }
1444
- const fe = X && c.pos !== "inside" ? { boxShadow: c.pos === "before" ? `inset 0 2px 0 0 ${e.primary}` : `inset 0 -2px 0 0 ${e.primary}` } : {}, se = X && c.pos === "inside" || K ? e.primaryLt : "transparent";
1445
- return /* @__PURE__ */ g("div", { style: { opacity: J ? 0.4 : 1 }, children: [
1446
- /* @__PURE__ */ g(
1648
+ const ie = X && u.pos !== "inside" ? { boxShadow: u.pos === "before" ? `inset 0 2px 0 0 ${e.primary}` : `inset 0 -2px 0 0 ${e.primary}` } : {}, le = X && u.pos === "inside" || j ? e.primaryLt : "transparent";
1649
+ return /* @__PURE__ */ x("div", { style: { opacity: J ? 0.4 : 1 }, children: [
1650
+ /* @__PURE__ */ x(
1447
1651
  "div",
1448
1652
  {
1449
- draggable: !!u,
1450
- onDragStart: u ? (W) => U(W, L.id) : void 0,
1451
- onDragOver: u ? (W) => Q(W, L.id) : void 0,
1452
- onDrop: u ? (W) => de(W, L.id) : void 0,
1453
- onDragEnd: u ? le : void 0,
1454
- title: x == null ? void 0 : x(L),
1653
+ draggable: !!s,
1654
+ onDragStart: s ? (B) => G(B, z.id) : void 0,
1655
+ onDragOver: s ? (B) => Q(B, z.id) : void 0,
1656
+ onDrop: s ? (B) => re(B, z.id) : void 0,
1657
+ onDragEnd: s ? ee : void 0,
1658
+ title: f == null ? void 0 : f(z),
1455
1659
  onClick: () => {
1456
- o(L.id), s == null || s(L), Y && S(L.id);
1660
+ o(z.id), a == null || a(z), P && v(z.id);
1457
1661
  },
1458
1662
  onDoubleClick: () => {
1459
- p && (D(L.id), h(L.value || ""));
1663
+ p && (C(z.id), k(z.value || ""));
1460
1664
  },
1461
1665
  style: {
1462
1666
  display: "flex",
1463
1667
  alignItems: "center",
1464
1668
  gap: 4,
1465
- padding: `5px 8px 5px ${12 + j * 18}px`,
1466
- cursor: u ? "grab" : "pointer",
1669
+ padding: `5px 8px 5px ${12 + A * 18}px`,
1670
+ cursor: s ? "grab" : "pointer",
1467
1671
  borderRadius: e.r,
1468
1672
  margin: "1px 4px",
1469
- background: se,
1470
- color: K ? e.primary : e.text,
1673
+ background: le,
1674
+ color: j ? e.primary : e.text,
1471
1675
  userSelect: "none",
1472
1676
  fontSize: 13,
1473
- ...fe
1677
+ ...ie
1474
1678
  },
1475
- onMouseEnter: (W) => !K && !X && (W.currentTarget.style.background = e.bg),
1476
- onMouseLeave: (W) => !K && !X && (W.currentTarget.style.background = "transparent"),
1679
+ onMouseEnter: (B) => !j && !X && (B.currentTarget.style.background = e.bg),
1680
+ onMouseLeave: (B) => !j && !X && (B.currentTarget.style.background = "transparent"),
1477
1681
  children: [
1478
1682
  /* @__PURE__ */ t(
1479
1683
  "span",
1480
1684
  {
1481
1685
  style: { width: 16, textAlign: "center", fontSize: 11, color: e.textMut, flexShrink: 0 },
1482
- onClick: (W) => {
1483
- W.stopPropagation(), Y && S(L.id);
1686
+ onClick: (B) => {
1687
+ B.stopPropagation(), P && v(z.id);
1484
1688
  },
1485
- children: Y ? V ? "▾" : "▸" : ""
1689
+ children: P ? O ? "▾" : "▸" : ""
1486
1690
  }
1487
1691
  ),
1488
- /* @__PURE__ */ t("span", { style: { fontSize: 15, flexShrink: 0 }, children: Y ? V ? "📂" : "📁" : "📄" }),
1692
+ /* @__PURE__ */ t("span", { style: { fontSize: 15, flexShrink: 0 }, children: P ? O ? "📂" : "📁" : "📄" }),
1489
1693
  i && /* @__PURE__ */ t(
1490
1694
  "input",
1491
1695
  {
1492
- ref: (W) => {
1493
- W && (W.indeterminate = ue);
1696
+ ref: (B) => {
1697
+ B && (B.indeterminate = te);
1494
1698
  },
1495
1699
  type: "checkbox",
1496
- checked: pe,
1497
- onChange: (W) => {
1498
- W.stopPropagation(), A(L.id, W.target.checked);
1700
+ checked: oe,
1701
+ onChange: (B) => {
1702
+ B.stopPropagation(), H(z.id, B.target.checked);
1499
1703
  },
1500
1704
  style: { cursor: "pointer", accentColor: e.primary, flexShrink: 0 },
1501
- onClick: (W) => W.stopPropagation()
1705
+ onClick: (B) => B.stopPropagation()
1502
1706
  }
1503
1707
  ),
1504
- M === L.id ? /* @__PURE__ */ t(
1708
+ $ === z.id ? /* @__PURE__ */ t(
1505
1709
  "input",
1506
1710
  {
1507
1711
  autoFocus: !0,
1508
1712
  className: "dhx dhx-input",
1509
1713
  style: { height: 24, fontSize: 12, flex: 1 },
1510
- value: T,
1511
- onChange: (W) => h(W.target.value),
1512
- onBlur: F,
1513
- onKeyDown: (W) => {
1514
- W.key === "Enter" && F(), W.key === "Escape" && D(null);
1714
+ value: N,
1715
+ onChange: (B) => k(B.target.value),
1716
+ onBlur: _,
1717
+ onKeyDown: (B) => {
1718
+ B.key === "Enter" && _(), B.key === "Escape" && C(null);
1515
1719
  },
1516
- onClick: (W) => W.stopPropagation()
1720
+ onClick: (B) => B.stopPropagation()
1517
1721
  }
1518
- ) : /* @__PURE__ */ t("span", { style: { flex: 1 }, children: L.value }),
1519
- L.count !== void 0 && /* @__PURE__ */ g("span", { style: { fontSize: 11, color: e.textMut }, children: [
1722
+ ) : /* @__PURE__ */ t("span", { style: { flex: 1 }, children: z.value }),
1723
+ z.count !== void 0 && /* @__PURE__ */ x("span", { style: { fontSize: 11, color: e.textMut }, children: [
1520
1724
  "(",
1521
- L.count,
1725
+ z.count,
1522
1726
  ")"
1523
1727
  ] })
1524
1728
  ]
1525
1729
  }
1526
1730
  ),
1527
- Y && V && /* @__PURE__ */ t("div", { children: L.items.map((W) => ce(W, j + 1)) })
1528
- ] }, L.id);
1731
+ P && O && /* @__PURE__ */ t("div", { children: z.items.map((B) => T(B, A + 1)) })
1732
+ ] }, z.id);
1529
1733
  };
1530
1734
  return /* @__PURE__ */ t(
1531
1735
  "div",
1532
1736
  {
1533
1737
  className: "dhx dhx-scroll",
1534
- style: { overflowY: "auto", ...m },
1535
- onDragOver: u ? (L) => L.preventDefault() : void 0,
1536
- onDrop: u ? (L) => {
1537
- L.preventDefault(), I(null), E(null);
1738
+ style: { overflowY: "auto", ...y },
1739
+ onDragOver: s ? (z) => z.preventDefault() : void 0,
1740
+ onDrop: s ? (z) => {
1741
+ z.preventDefault(), I(null), W(null);
1538
1742
  } : void 0,
1539
- children: z.map((L) => ce(L))
1743
+ children: w.map((z) => T(z))
1540
1744
  }
1541
1745
  );
1542
1746
  }
1543
- function jt({ total: n, pageSize: i = 10, page: p, onChange: u, style: x }) {
1544
- const [s, f] = C(p || 1), a = Math.ceil(n / i);
1545
- H(O, []);
1546
- const m = (r) => {
1547
- const l = Math.min(Math.max(1, r), a);
1548
- f(l), u == null || u(l);
1549
- }, z = oe(() => {
1747
+ function Yt({ total: n, pageSize: i = 10, page: p, onChange: s, style: f }) {
1748
+ const [a, h] = L(p || 1), d = Math.ceil(n / i);
1749
+ F(V, []);
1750
+ const y = (r) => {
1751
+ const l = Math.min(Math.max(1, r), d);
1752
+ h(l), s == null || s(l);
1753
+ }, w = ue(() => {
1550
1754
  const r = [];
1551
- for (let d = Math.max(1, s - 2); d <= Math.min(a, s + 2); d++) r.push(d);
1552
- return r[0] > 1 && (r[0] > 2 && r.unshift("..."), r.unshift(1)), r[r.length - 1] < a && (r[r.length - 1] < a - 1 && r.push("..."), r.push(a)), r;
1553
- }, [s, a]);
1554
- return /* @__PURE__ */ g("div", { className: "dhx", style: { display: "flex", alignItems: "center", gap: 4, padding: "8px 12px", ...x }, children: [
1555
- /* @__PURE__ */ g("span", { style: { fontSize: 12, color: e.textSec, marginRight: 8 }, children: [
1556
- (s - 1) * i + 1,
1755
+ for (let c = Math.max(1, a - 2); c <= Math.min(d, a + 2); c++) r.push(c);
1756
+ return r[0] > 1 && (r[0] > 2 && r.unshift("..."), r.unshift(1)), r[r.length - 1] < d && (r[r.length - 1] < d - 1 && r.push("..."), r.push(d)), r;
1757
+ }, [a, d]);
1758
+ return /* @__PURE__ */ x("div", { className: "dhx", style: { display: "flex", alignItems: "center", gap: 4, padding: "8px 12px", ...f }, children: [
1759
+ /* @__PURE__ */ x("span", { style: { fontSize: 12, color: e.textSec, marginRight: 8 }, children: [
1760
+ (a - 1) * i + 1,
1557
1761
  "–",
1558
- Math.min(s * i, n),
1762
+ Math.min(a * i, n),
1559
1763
  " of ",
1560
1764
  n
1561
1765
  ] }),
1562
- [["«", 1], ["‹", s - 1]].map(([r, l]) => /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-ghost", style: { height: 30, padding: "0 8px", fontSize: 14 }, disabled: s === 1, onClick: () => m(l), children: r }, r)),
1563
- z.map((r, l) => /* @__PURE__ */ t("button", { onClick: () => typeof r == "number" && m(r), className: `dhx dhx-btn ${r === s ? "dhx-btn-primary" : "dhx-btn-ghost"}`, style: { height: 30, minWidth: 30, padding: "0 8px", fontSize: 13 }, disabled: r === "...", children: r }, l)),
1564
- [["›", s + 1], ["»", a]].map(([r, l]) => /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-ghost", style: { height: 30, padding: "0 8px", fontSize: 14 }, disabled: s === a, onClick: () => m(l), children: r }, r))
1766
+ [["«", 1], ["‹", a - 1]].map(([r, l]) => /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-ghost", style: { height: 30, padding: "0 8px", fontSize: 14 }, disabled: a === 1, onClick: () => y(l), children: r }, r)),
1767
+ w.map((r, l) => /* @__PURE__ */ t("button", { onClick: () => typeof r == "number" && y(r), className: `dhx dhx-btn ${r === a ? "dhx-btn-primary" : "dhx-btn-ghost"}`, style: { height: 30, minWidth: 30, padding: "0 8px", fontSize: 13 }, disabled: r === "...", children: r }, l)),
1768
+ [["›", a + 1], ["»", d]].map(([r, l]) => /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-ghost", style: { height: 30, padding: "0 8px", fontSize: 14 }, disabled: a === d, onClick: () => y(l), children: r }, r))
1565
1769
  ] });
1566
1770
  }
1567
- function Pt({ config: n = {}, defaultValues: i = {}, onSubmit: p, style: u }) {
1568
- const [x, s] = C(i), [f, a] = C({}), [m, z] = C(null);
1569
- H(O, []);
1570
- const r = (o, b) => {
1571
- s((v) => ({ ...v, [o]: b })), a((v) => ({ ...v, [o]: null }));
1771
+ function Ft({ config: n = {}, defaultValues: i = {}, onSubmit: p, style: s }) {
1772
+ const [f, a] = L(i), [h, d] = L({}), [y, w] = L(null);
1773
+ F(V, []);
1774
+ const r = (o, g) => {
1775
+ a((m) => ({ ...m, [o]: g })), d((m) => ({ ...m, [o]: null }));
1572
1776
  }, l = () => {
1573
1777
  const o = {};
1574
- return (n.rows || []).flat().forEach((b) => {
1575
- b && typeof b == "object" && "name" in b && b.required && !x[b.name] && (o[b.name] = `${b.label || b.name} is required`);
1576
- }), a(o), Object.keys(o).length === 0;
1577
- }, d = (o) => {
1578
- const b = x[o.name] ?? o.value ?? "", v = f[o.name], M = o.labelWidth ?? n.labelWidth, D = M !== void 0 || o.labelPosition === "left";
1579
- if (o.type === "fieldset") return /* @__PURE__ */ g("fieldset", { style: { border: `1px solid ${e.border}`, borderRadius: e.r, padding: "12px 16px", marginBottom: 14 }, children: [
1778
+ return (n.rows || []).flat().forEach((g) => {
1779
+ g && typeof g == "object" && "name" in g && g.required && !f[g.name] && (o[g.name] = `${g.label || g.name} is required`);
1780
+ }), d(o), Object.keys(o).length === 0;
1781
+ }, c = (o) => {
1782
+ const g = f[o.name] ?? o.value ?? "", m = h[o.name], $ = o.labelWidth ?? n.labelWidth, C = $ !== void 0 || o.labelPosition === "left";
1783
+ if (o.type === "fieldset") return /* @__PURE__ */ x("fieldset", { style: { border: `1px solid ${e.border}`, borderRadius: e.r, padding: "12px 16px", marginBottom: 14 }, children: [
1580
1784
  /* @__PURE__ */ t("legend", { style: { fontSize: 12, fontWeight: 700, color: e.textSec, padding: "0 6px" }, children: o.label }),
1581
- (o.rows || []).map((S) => d(S))
1785
+ (o.rows || []).map((v) => c(v))
1582
1786
  ] }, o.name);
1583
1787
  if (o.type === "spacer") return /* @__PURE__ */ t("div", { style: { height: o.height || 16 } }, o.name);
1584
- const T = M ? { minWidth: M, width: M, flexShrink: 0, paddingTop: 8, boxSizing: "border-box" } : {}, h = o.label ? /* @__PURE__ */ g("label", { className: "dhx dhx-label", style: { display: "flex", gap: 4, ...T }, children: [
1788
+ const N = $ ? { minWidth: $, width: $, flexShrink: 0, paddingTop: 8, boxSizing: "border-box" } : {}, k = o.label ? /* @__PURE__ */ x("label", { className: "dhx dhx-label", style: { display: "flex", gap: 4, ...N }, children: [
1585
1789
  o.label,
1586
1790
  o.required && /* @__PURE__ */ t("span", { style: { color: e.danger }, children: "*" })
1587
- ] }, "lbl") : null, k = v ? /* @__PURE__ */ t("div", { style: { fontSize: 11, color: e.danger, marginTop: 3 }, children: v }) : null, E = o.helpMessage ? /* @__PURE__ */ g("div", { style: { fontSize: 11, color: e.textMut, marginTop: 3 }, children: [
1791
+ ] }, "lbl") : null, M = m ? /* @__PURE__ */ t("div", { style: { fontSize: 11, color: e.danger, marginTop: 3 }, children: m }) : null, W = o.helpMessage ? /* @__PURE__ */ x("div", { style: { fontSize: 11, color: e.textMut, marginTop: 3 }, children: [
1588
1792
  "ⓘ ",
1589
1793
  o.helpMessage
1590
- ] }) : null, c = { key: o.name, className: "dhx-form-group" }, I = (S) => D ? /* @__PURE__ */ g("div", { ...c, style: { display: "flex", alignItems: "flex-start", gap: 8 }, children: [
1591
- h,
1592
- /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
1593
- S,
1594
- k,
1595
- E
1794
+ ] }) : null, u = { key: o.name, className: "dhx-form-group" }, I = (v) => C ? /* @__PURE__ */ x("div", { ...u, style: { display: "flex", alignItems: "flex-start", gap: 8 }, children: [
1795
+ k,
1796
+ /* @__PURE__ */ x("div", { style: { flex: 1, minWidth: 0 }, children: [
1797
+ v,
1798
+ M,
1799
+ W
1596
1800
  ] })
1597
- ] }) : /* @__PURE__ */ g("div", { ...c, children: [
1598
- h,
1599
- S,
1801
+ ] }) : /* @__PURE__ */ x("div", { ...u, children: [
1600
1802
  k,
1601
- E
1803
+ v,
1804
+ M,
1805
+ W
1602
1806
  ] });
1603
1807
  if (!o.type || o.type === "input") return I(
1604
- /* @__PURE__ */ g("div", { className: "dhx-input-wrap", children: [
1808
+ /* @__PURE__ */ x("div", { className: "dhx-input-wrap", children: [
1605
1809
  o.icon && /* @__PURE__ */ t("span", { className: "dhx-input-icon", children: o.icon }),
1606
1810
  /* @__PURE__ */ t(
1607
1811
  "input",
1608
1812
  {
1609
1813
  className: `dhx dhx-input${o.icon ? " dhx-input--with-icon" : ""}`,
1610
- style: { borderColor: v ? e.danger : void 0 },
1814
+ style: { borderColor: m ? e.danger : void 0 },
1611
1815
  type: o.inputType || "text",
1612
1816
  placeholder: o.placeholder,
1613
- value: b,
1614
- onChange: (S) => r(o.name, S.target.value),
1817
+ value: g,
1818
+ onChange: (v) => r(o.name, v.target.value),
1615
1819
  disabled: o.disabled
1616
1820
  }
1617
1821
  )
@@ -1624,106 +1828,106 @@ function Pt({ config: n = {}, defaultValues: i = {}, onSubmit: p, style: u }) {
1624
1828
  className: "dhx dhx-input",
1625
1829
  style: { height: 80, resize: "vertical", padding: "8px 10px" },
1626
1830
  placeholder: o.placeholder,
1627
- value: b,
1628
- onChange: (S) => r(o.name, S.target.value)
1831
+ value: g,
1832
+ onChange: (v) => r(o.name, v.target.value)
1629
1833
  }
1630
1834
  )
1631
1835
  );
1632
1836
  if (o.type === "select") return I(
1633
- /* @__PURE__ */ g("select", { className: "dhx dhx-input", value: b, onChange: (S) => r(o.name, S.target.value), style: { cursor: "pointer" }, children: [
1837
+ /* @__PURE__ */ x("select", { className: "dhx dhx-input", value: g, onChange: (v) => r(o.name, v.target.value), style: { cursor: "pointer" }, children: [
1634
1838
  /* @__PURE__ */ t("option", { value: "", children: "— Select —" }),
1635
- (o.options || []).map((S) => /* @__PURE__ */ t("option", { value: S.value, children: S.label || S.value }, S.value))
1839
+ (o.options || []).map((v) => /* @__PURE__ */ t("option", { value: v.value, children: v.label || v.value }, v.value))
1636
1840
  ] })
1637
1841
  );
1638
1842
  if (o.type === "datepicker") return I(
1639
- /* @__PURE__ */ t("input", { type: "date", className: "dhx dhx-input", value: b, onChange: (S) => r(o.name, S.target.value) })
1843
+ /* @__PURE__ */ t("input", { type: "date", className: "dhx dhx-input", value: g, onChange: (v) => r(o.name, v.target.value) })
1640
1844
  );
1641
1845
  if (o.type === "timepicker") {
1642
- const S = x[o.name] ?? { h: 12, m: 0, ampm: "AM" }, A = !!x[o.name], F = A ? `${String(S.h).padStart(2, "0")}:${String(S.m).padStart(2, "0")}${S.ampm ? " " + S.ampm : ""}` : o.placeholder || "Click to select", U = /* @__PURE__ */ g("div", { style: { position: "relative" }, children: [
1643
- /* @__PURE__ */ g(
1846
+ const v = f[o.name] ?? { h: 12, m: 0, ampm: "AM" }, H = !!f[o.name], _ = H ? `${String(v.h).padStart(2, "0")}:${String(v.m).padStart(2, "0")}${v.ampm ? " " + v.ampm : ""}` : o.placeholder || "Click to select", G = /* @__PURE__ */ x("div", { style: { position: "relative" }, children: [
1847
+ /* @__PURE__ */ x(
1644
1848
  "div",
1645
1849
  {
1646
1850
  className: "dhx dhx-input",
1647
1851
  style: { cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "space-between" },
1648
- onClick: () => z(m === o.name ? null : o.name),
1852
+ onClick: () => w(y === o.name ? null : o.name),
1649
1853
  children: [
1650
- /* @__PURE__ */ t("span", { style: { color: A ? e.text : e.textMut }, children: F }),
1854
+ /* @__PURE__ */ t("span", { style: { color: H ? e.text : e.textMut }, children: _ }),
1651
1855
  /* @__PURE__ */ t("span", { style: { fontSize: 13, color: e.textSec }, children: "🕐" })
1652
1856
  ]
1653
1857
  }
1654
1858
  ),
1655
- m === o.name && /* @__PURE__ */ t("div", { style: { position: "absolute", zIndex: 100, top: "calc(100% + 4px)", left: 0 }, children: /* @__PURE__ */ t(ht, { value: S, controls: !0, onChange: (Q) => {
1656
- r(o.name, Q), z(null);
1859
+ y === o.name && /* @__PURE__ */ t("div", { style: { position: "absolute", zIndex: 100, top: "calc(100% + 4px)", left: 0 }, children: /* @__PURE__ */ t(gt, { value: v, controls: !0, onChange: (Q) => {
1860
+ r(o.name, Q), w(null);
1657
1861
  } }) })
1658
1862
  ] });
1659
- return I(U);
1863
+ return I(G);
1660
1864
  }
1661
1865
  if (o.type === "colorpicker") return I(
1662
- /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
1866
+ /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
1663
1867
  /* @__PURE__ */ t(
1664
1868
  "input",
1665
1869
  {
1666
1870
  type: "color",
1667
- value: b || "#000000",
1668
- onChange: (S) => r(o.name, S.target.value),
1871
+ value: g || "#000000",
1872
+ onChange: (v) => r(o.name, v.target.value),
1669
1873
  style: { width: 36, height: 36, padding: 2, border: `1px solid ${e.border}`, borderRadius: e.r, cursor: "pointer", background: "none" }
1670
1874
  }
1671
1875
  ),
1672
- /* @__PURE__ */ t("span", { style: { fontSize: 12, color: e.textSec, fontFamily: "monospace" }, children: b || "#000000" })
1876
+ /* @__PURE__ */ t("span", { style: { fontSize: 12, color: e.textSec, fontFamily: "monospace" }, children: g || "#000000" })
1673
1877
  ] })
1674
1878
  );
1675
1879
  if (o.type === "text") return I(
1676
1880
  /* @__PURE__ */ t("p", { style: { margin: "6px 0", fontSize: 13, color: e.text }, children: o.value })
1677
1881
  );
1678
- if (o.type === "checkbox") return /* @__PURE__ */ g("div", { ...c, children: [
1679
- D ? /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
1680
- M && /* @__PURE__ */ t("div", { style: { width: M, flexShrink: 0 } }),
1681
- /* @__PURE__ */ g("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer" }, children: [
1682
- /* @__PURE__ */ t("input", { type: "checkbox", checked: !!b, onChange: (S) => r(o.name, S.target.checked), style: { width: 16, height: 16, accentColor: e.primary, cursor: "pointer" } }),
1882
+ if (o.type === "checkbox") return /* @__PURE__ */ x("div", { ...u, children: [
1883
+ C ? /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
1884
+ $ && /* @__PURE__ */ t("div", { style: { width: $, flexShrink: 0 } }),
1885
+ /* @__PURE__ */ x("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer" }, children: [
1886
+ /* @__PURE__ */ t("input", { type: "checkbox", checked: !!g, onChange: (v) => r(o.name, v.target.checked), style: { width: 16, height: 16, accentColor: e.primary, cursor: "pointer" } }),
1683
1887
  /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: o.label })
1684
1888
  ] })
1685
- ] }) : /* @__PURE__ */ g("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer" }, children: [
1686
- /* @__PURE__ */ t("input", { type: "checkbox", checked: !!b, onChange: (S) => r(o.name, S.target.checked), style: { width: 16, height: 16, accentColor: e.primary, cursor: "pointer" } }),
1889
+ ] }) : /* @__PURE__ */ x("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer" }, children: [
1890
+ /* @__PURE__ */ t("input", { type: "checkbox", checked: !!g, onChange: (v) => r(o.name, v.target.checked), style: { width: 16, height: 16, accentColor: e.primary, cursor: "pointer" } }),
1687
1891
  /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: o.label })
1688
1892
  ] }),
1689
- E
1893
+ W
1690
1894
  ] });
1691
1895
  if (o.type === "radio") {
1692
- const S = (o.options || []).map((A) => /* @__PURE__ */ g("label", { style: { display: "flex", alignItems: "center", gap: 6, cursor: "pointer", fontSize: 13 }, children: [
1896
+ const v = (o.options || []).map((H) => /* @__PURE__ */ x("label", { style: { display: "flex", alignItems: "center", gap: 6, cursor: "pointer", fontSize: 13 }, children: [
1693
1897
  /* @__PURE__ */ t(
1694
1898
  "input",
1695
1899
  {
1696
1900
  type: "radio",
1697
1901
  name: o.name,
1698
- value: A.value,
1699
- checked: b === A.value,
1700
- onChange: () => r(o.name, A.value),
1902
+ value: H.value,
1903
+ checked: g === H.value,
1904
+ onChange: () => r(o.name, H.value),
1701
1905
  style: { accentColor: e.primary, cursor: "pointer" }
1702
1906
  }
1703
1907
  ),
1704
- A.label || A.value
1705
- ] }, A.value));
1908
+ H.label || H.value
1909
+ ] }, H.value));
1706
1910
  return I(
1707
- /* @__PURE__ */ t("div", { style: { display: "flex", gap: 16, flexWrap: "wrap", paddingTop: 8 }, children: S })
1911
+ /* @__PURE__ */ t("div", { style: { display: "flex", gap: 16, flexWrap: "wrap", paddingTop: 8 }, children: v })
1708
1912
  );
1709
1913
  }
1710
- if (o.type === "slider") return D ? /* @__PURE__ */ g("div", { ...c, style: { display: "flex", alignItems: "flex-start", gap: 8 }, children: [
1711
- h,
1712
- /* @__PURE__ */ g("div", { style: { flex: 1 }, children: [
1914
+ if (o.type === "slider") return C ? /* @__PURE__ */ x("div", { ...u, style: { display: "flex", alignItems: "flex-start", gap: 8 }, children: [
1915
+ k,
1916
+ /* @__PURE__ */ x("div", { style: { flex: 1 }, children: [
1713
1917
  /* @__PURE__ */ t(
1714
1918
  De,
1715
1919
  {
1716
1920
  min: o.min,
1717
1921
  max: o.max,
1718
1922
  step: o.step,
1719
- value: b || o.min,
1923
+ value: g || o.min,
1720
1924
  range: o.range,
1721
- onChange: (S) => r(o.name, S)
1925
+ onChange: (v) => r(o.name, v)
1722
1926
  }
1723
1927
  ),
1724
- E
1928
+ W
1725
1929
  ] })
1726
- ] }) : /* @__PURE__ */ g("div", { ...c, children: [
1930
+ ] }) : /* @__PURE__ */ x("div", { ...u, children: [
1727
1931
  /* @__PURE__ */ t(
1728
1932
  De,
1729
1933
  {
@@ -1731,30 +1935,30 @@ function Pt({ config: n = {}, defaultValues: i = {}, onSubmit: p, style: u }) {
1731
1935
  min: o.min,
1732
1936
  max: o.max,
1733
1937
  step: o.step,
1734
- value: b || o.min,
1938
+ value: g || o.min,
1735
1939
  range: o.range,
1736
- onChange: (S) => r(o.name, S)
1940
+ onChange: (v) => r(o.name, v)
1737
1941
  }
1738
1942
  ),
1739
- E
1943
+ W
1740
1944
  ] });
1741
- if (o.type === "combo") return D ? /* @__PURE__ */ g("div", { ...c, style: { display: "flex", alignItems: "flex-start", gap: 8 }, children: [
1742
- h,
1743
- /* @__PURE__ */ g("div", { style: { flex: 1 }, children: [
1945
+ if (o.type === "combo") return C ? /* @__PURE__ */ x("div", { ...u, style: { display: "flex", alignItems: "flex-start", gap: 8 }, children: [
1946
+ k,
1947
+ /* @__PURE__ */ x("div", { style: { flex: 1 }, children: [
1744
1948
  /* @__PURE__ */ t(
1745
1949
  $e,
1746
1950
  {
1747
1951
  data: o.data || [],
1748
1952
  multiselection: o.multiselection,
1749
1953
  placeholder: o.placeholder || "Select...",
1750
- value: b || (o.multiselection ? [] : null),
1751
- onChange: (S) => r(o.name, S)
1954
+ value: g || (o.multiselection ? [] : null),
1955
+ onChange: (v) => r(o.name, v)
1752
1956
  }
1753
1957
  ),
1754
- k,
1755
- E
1958
+ M,
1959
+ W
1756
1960
  ] })
1757
- ] }) : /* @__PURE__ */ g("div", { ...c, children: [
1961
+ ] }) : /* @__PURE__ */ x("div", { ...u, children: [
1758
1962
  /* @__PURE__ */ t(
1759
1963
  $e,
1760
1964
  {
@@ -1762,48 +1966,48 @@ function Pt({ config: n = {}, defaultValues: i = {}, onSubmit: p, style: u }) {
1762
1966
  data: o.data || [],
1763
1967
  multiselection: o.multiselection,
1764
1968
  placeholder: o.placeholder || "Select...",
1765
- value: b || (o.multiselection ? [] : null),
1766
- onChange: (S) => r(o.name, S)
1969
+ value: g || (o.multiselection ? [] : null),
1970
+ onChange: (v) => r(o.name, v)
1767
1971
  }
1768
1972
  ),
1769
- k,
1770
- E
1973
+ M,
1974
+ W
1771
1975
  ] });
1772
1976
  if (o.type === "toggle") {
1773
- const S = !!b, A = S ? o.icon : o.offIcon || o.icon, F = S ? o.text || o.label : o.offText || o.text || o.label;
1774
- return /* @__PURE__ */ g("div", { ...c, children: [
1775
- D && M && /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
1776
- /* @__PURE__ */ t("div", { style: { width: M, flexShrink: 0 } }),
1777
- /* @__PURE__ */ g("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer" }, children: [
1778
- /* @__PURE__ */ t(Le, { on: S, onClick: () => r(o.name, !b) }),
1779
- A && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: A }),
1780
- F && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: F })
1977
+ const v = !!g, H = v ? o.icon : o.offIcon || o.icon, _ = v ? o.text || o.label : o.offText || o.text || o.label;
1978
+ return /* @__PURE__ */ x("div", { ...u, children: [
1979
+ C && $ && /* @__PURE__ */ x("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
1980
+ /* @__PURE__ */ t("div", { style: { width: $, flexShrink: 0 } }),
1981
+ /* @__PURE__ */ x("label", { style: { display: "flex", alignItems: "center", gap: 8, cursor: "pointer" }, children: [
1982
+ /* @__PURE__ */ t(Le, { on: v, onClick: () => r(o.name, !g) }),
1983
+ H && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: H }),
1984
+ _ && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: _ })
1781
1985
  ] })
1782
1986
  ] }),
1783
- !D && /* @__PURE__ */ g("label", { style: { display: "flex", alignItems: "center", gap: 10, cursor: "pointer" }, children: [
1784
- /* @__PURE__ */ t(Le, { on: S, onClick: () => r(o.name, !b) }),
1785
- A && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: A }),
1786
- F && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: F })
1987
+ !C && /* @__PURE__ */ x("label", { style: { display: "flex", alignItems: "center", gap: 10, cursor: "pointer" }, children: [
1988
+ /* @__PURE__ */ t(Le, { on: v, onClick: () => r(o.name, !g) }),
1989
+ H && /* @__PURE__ */ t("span", { style: { fontSize: 16 }, children: H }),
1990
+ _ && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: _ })
1787
1991
  ] }),
1788
- E
1992
+ W
1789
1993
  ] });
1790
1994
  }
1791
1995
  return null;
1792
- }, y = (o) => o.map(
1793
- (b, v) => Array.isArray(b) ? /* @__PURE__ */ t("div", { style: { display: "flex", gap: 12, alignItems: "flex-start" }, children: b.map(d) }, v) : d(b)
1996
+ }, b = (o) => o.map(
1997
+ (g, m) => Array.isArray(g) ? /* @__PURE__ */ t("div", { style: { display: "flex", gap: 12, alignItems: "flex-start" }, children: g.map(c) }, m) : c(g)
1794
1998
  );
1795
- return /* @__PURE__ */ g("div", { className: "dhx", style: { padding: n.padding || 0, width: n.width || "100%", ...u }, children: [
1796
- y(n.rows || []),
1797
- (n.buttons || p) && /* @__PURE__ */ g("div", { style: { display: "flex", gap: 8, justifyContent: n.buttonAlign || "flex-start", marginTop: 8 }, children: [
1798
- /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-primary", onClick: () => l() && (p == null ? void 0 : p(x)), children: n.submitText || "Submit" }),
1999
+ return /* @__PURE__ */ x("div", { className: "dhx", style: { padding: n.padding || 0, width: n.width || "100%", ...s }, children: [
2000
+ b(n.rows || []),
2001
+ (n.buttons || p) && /* @__PURE__ */ x("div", { style: { display: "flex", gap: 8, justifyContent: n.buttonAlign || "flex-start", marginTop: 8 }, children: [
2002
+ /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-primary", onClick: () => l() && (p == null ? void 0 : p(f)), children: n.submitText || "Submit" }),
1799
2003
  n.resetButton !== !1 && /* @__PURE__ */ t("button", { className: "dhx dhx-btn dhx-btn-secondary", onClick: () => {
1800
- s(i), a({});
2004
+ a(i), d({});
1801
2005
  }, children: n.resetText || "Reset" })
1802
2006
  ] })
1803
2007
  ] });
1804
2008
  }
1805
2009
  function Le({ on: n, onClick: i }) {
1806
- return /* @__PURE__ */ g("div", { style: { position: "relative", width: 40, height: 22, flexShrink: 0 }, onClick: i, children: [
2010
+ return /* @__PURE__ */ x("div", { style: { position: "relative", width: 40, height: 22, flexShrink: 0 }, onClick: i, children: [
1807
2011
  /* @__PURE__ */ t("div", { style: { width: 40, height: 22, borderRadius: 11, background: n ? e.primary : e.border, transition: "background 0.2s" } }),
1808
2012
  /* @__PURE__ */ t("div", { style: { position: "absolute", top: 3, left: n ? 21 : 3, width: 16, height: 16, borderRadius: "50%", background: "#fff", transition: "left 0.2s", boxShadow: "0 1px 3px rgba(0,0,0,.3)" } })
1809
2013
  ] });
@@ -1814,34 +2018,34 @@ function ke(n) {
1814
2018
  p.type === "block" ? i.push(...ke(p.items || [])) : i.push(p);
1815
2019
  return i;
1816
2020
  }
1817
- function Ot({ items: n = [], onAction: i, style: p }) {
1818
- H(O, []);
1819
- const [u, x] = C(() => {
2021
+ function Kt({ items: n = [], onAction: i, style: p }) {
2022
+ F(V, []);
2023
+ const [s, f] = L(() => {
1820
2024
  const l = {};
1821
- for (const d of ke(n))
1822
- d.id && (l[d.id] = !!d.active);
2025
+ for (const c of ke(n))
2026
+ c.id && (l[c.id] = !!c.active);
1823
2027
  return l;
1824
- }), s = ke(n), f = (l) => {
1825
- var d;
2028
+ }), a = ke(n), h = (l) => {
2029
+ var c;
1826
2030
  if (!l.disabled) {
1827
2031
  if (l.id)
1828
2032
  if (l.group) {
1829
- const y = s.filter((o) => o.group === l.group && o.id);
1830
- x((o) => {
1831
- const b = { ...o };
1832
- for (const v of y) b[v.id] = !1;
1833
- return b[l.id] = !0, b;
2033
+ const b = a.filter((o) => o.group === l.group && o.id);
2034
+ f((o) => {
2035
+ const g = { ...o };
2036
+ for (const m of b) g[m.id] = !1;
2037
+ return g[l.id] = !0, g;
1834
2038
  });
1835
- } else l.twoState && x((y) => ({ ...y, [l.id]: !y[l.id] }));
1836
- (d = l.onClick) == null || d.call(l, l), l.id && (i == null || i(l.id, l));
2039
+ } else l.twoState && f((b) => ({ ...b, [l.id]: !b[l.id] }));
2040
+ (c = l.onClick) == null || c.call(l, l), l.id && (i == null || i(l.id, l));
1837
2041
  }
1838
- }, a = (l, d) => {
1839
- var v;
2042
+ }, d = (l, c) => {
2043
+ var m;
1840
2044
  if (l.hidden) return null;
1841
- const y = l.value ?? l.text, o = l.size === "auto", b = l.id !== void 0 ? u[l.id] ?? !!l.active : !!l.active;
1842
- return l.type === "separator" || l.type === "sep" ? /* @__PURE__ */ t("div", { style: { width: 1, background: e.border, margin: "4px 2px", alignSelf: "stretch" } }, d) : l.type === "input" ? /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start", justifyContent: "center", padding: "2px 4px", gap: 2 }, children: [
2045
+ const b = l.value ?? l.text, o = l.size === "auto", g = l.id !== void 0 ? s[l.id] ?? !!l.active : !!l.active;
2046
+ return l.type === "separator" || l.type === "sep" ? /* @__PURE__ */ t("div", { style: { width: 1, background: e.border, margin: "4px 2px", alignSelf: "stretch" } }, c) : l.type === "input" ? /* @__PURE__ */ x("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-start", justifyContent: "center", padding: "2px 4px", gap: 2 }, children: [
1843
2047
  l.label && /* @__PURE__ */ t("span", { style: { fontSize: 10, color: e.textMut }, children: l.label }),
1844
- /* @__PURE__ */ g("div", { style: { position: "relative", display: "flex", alignItems: "center" }, children: [
2048
+ /* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems: "center" }, children: [
1845
2049
  l.icon && /* @__PURE__ */ t("span", { style: { position: "absolute", left: 6, fontSize: 13, color: e.textMut, pointerEvents: "none", zIndex: 1 }, children: l.icon }),
1846
2050
  /* @__PURE__ */ t(
1847
2051
  "input",
@@ -1850,27 +2054,27 @@ function Ot({ items: n = [], onAction: i, style: p }) {
1850
2054
  style: { width: l.width || 110, height: 26, fontSize: 12, paddingLeft: l.icon ? 24 : void 0 },
1851
2055
  placeholder: l.placeholder,
1852
2056
  defaultValue: l.value,
1853
- onChange: (M) => {
1854
- var D;
1855
- return (D = l.onChange) == null ? void 0 : D.call(l, M.target.value);
2057
+ onChange: ($) => {
2058
+ var C;
2059
+ return (C = l.onChange) == null ? void 0 : C.call(l, $.target.value);
1856
2060
  }
1857
2061
  }
1858
2062
  )
1859
2063
  ] })
1860
- ] }, d) : l.type === "selectButton" ? /* @__PURE__ */ t(
2064
+ ] }, c) : l.type === "selectButton" ? /* @__PURE__ */ t(
1861
2065
  "select",
1862
2066
  {
1863
2067
  className: "dhx dhx-input",
1864
2068
  style: { height: 26, fontSize: 12, cursor: "pointer", margin: 2, width: l.width },
1865
2069
  defaultValue: l.value,
1866
- onChange: (M) => {
1867
- var D;
1868
- return (D = l.onChange) == null ? void 0 : D.call(l, M.target.value);
2070
+ onChange: ($) => {
2071
+ var C;
2072
+ return (C = l.onChange) == null ? void 0 : C.call(l, $.target.value);
1869
2073
  },
1870
- children: (v = l.items) == null ? void 0 : v.map((M) => /* @__PURE__ */ t("option", { value: M.value, children: M.value }, M.value))
2074
+ children: (m = l.items) == null ? void 0 : m.map(($) => /* @__PURE__ */ t("option", { value: $.value, children: $.value }, $.value))
1871
2075
  },
1872
- d
1873
- ) : /* @__PURE__ */ g(
2076
+ c
2077
+ ) : /* @__PURE__ */ x(
1874
2078
  "button",
1875
2079
  {
1876
2080
  title: l.tooltip,
@@ -1884,21 +2088,21 @@ function Ot({ items: n = [], onAction: i, style: p }) {
1884
2088
  padding: o ? "6px 10px" : "0 8px",
1885
2089
  gap: o ? 4 : 5,
1886
2090
  position: "relative",
1887
- background: b ? e.primaryLt : "transparent",
1888
- color: b ? e.primary : l.disabled ? e.textMut : e.text,
2091
+ background: g ? e.primaryLt : "transparent",
2092
+ color: g ? e.primary : l.disabled ? e.textMut : e.text,
1889
2093
  opacity: l.disabled ? 0.55 : 1,
1890
2094
  cursor: l.disabled ? "not-allowed" : "pointer"
1891
2095
  },
1892
- onClick: () => f(l),
2096
+ onClick: () => h(l),
1893
2097
  children: [
1894
2098
  l.icon && /* @__PURE__ */ t("span", { style: { fontSize: o ? 22 : 15, lineHeight: 1, flexShrink: 0 }, children: l.icon }),
1895
- y && /* @__PURE__ */ t("span", { style: {
2099
+ b && /* @__PURE__ */ t("span", { style: {
1896
2100
  fontSize: 10,
1897
2101
  maxWidth: o ? 64 : void 0,
1898
2102
  textAlign: o ? "center" : "left",
1899
2103
  lineHeight: 1.2,
1900
2104
  whiteSpace: o ? "normal" : "nowrap"
1901
- }, children: y }),
2105
+ }, children: b }),
1902
2106
  l.count !== void 0 && /* @__PURE__ */ t("span", { style: {
1903
2107
  position: "absolute",
1904
2108
  top: 2,
@@ -1918,22 +2122,22 @@ function Ot({ items: n = [], onAction: i, style: p }) {
1918
2122
  }, children: l.count })
1919
2123
  ]
1920
2124
  },
1921
- d
2125
+ c
1922
2126
  );
1923
- }, m = (l, d) => {
1924
- var y;
2127
+ }, y = (l, c) => {
2128
+ var b;
1925
2129
  return /* @__PURE__ */ t("div", { style: {
1926
2130
  display: "flex",
1927
2131
  flexDirection: l.direction === "col" ? "column" : "row",
1928
2132
  alignItems: l.direction === "col" ? "flex-start" : "center",
1929
2133
  gap: 2
1930
- }, children: (y = l.items) == null ? void 0 : y.map(
1931
- (o, b) => o.type === "block" ? m(o, `${d}-${b}`) : a(o, `${d}-${b}`)
1932
- ) }, d);
1933
- }, z = (l, d) => {
2134
+ }, children: (b = l.items) == null ? void 0 : b.map(
2135
+ (o, g) => o.type === "block" ? y(o, `${c}-${g}`) : d(o, `${c}-${g}`)
2136
+ ) }, c);
2137
+ }, w = (l, c) => {
1934
2138
  var o;
1935
- const y = l.title || l.label;
1936
- return /* @__PURE__ */ g("div", { style: {
2139
+ const b = l.title || l.label;
2140
+ return /* @__PURE__ */ x("div", { style: {
1937
2141
  display: "flex",
1938
2142
  flexDirection: "column",
1939
2143
  alignItems: "stretch",
@@ -1948,18 +2152,18 @@ function Ot({ items: n = [], onAction: i, style: p }) {
1948
2152
  gap: 2,
1949
2153
  flex: 1
1950
2154
  }, children: (o = l.items) == null ? void 0 : o.map(
1951
- (b, v) => b.type === "block" ? m(b, v) : a(b, v)
2155
+ (g, m) => g.type === "block" ? y(g, m) : d(g, m)
1952
2156
  ) }),
1953
- y && /* @__PURE__ */ t("div", { style: {
2157
+ b && /* @__PURE__ */ t("div", { style: {
1954
2158
  fontSize: 10,
1955
2159
  color: e.textMut,
1956
2160
  textAlign: "center",
1957
2161
  padding: "3px 0 4px",
1958
2162
  marginTop: 2,
1959
2163
  borderTop: `1px solid ${e.border}`
1960
- }, children: y })
1961
- ] }, d);
1962
- }, r = (l, d) => l.type === "block" ? z(l, d) : a(l, d);
2164
+ }, children: b })
2165
+ ] }, c);
2166
+ }, r = (l, c) => l.type === "block" ? w(l, c) : d(l, c);
1963
2167
  return /* @__PURE__ */ t("div", { className: "dhx", style: {
1964
2168
  display: "flex",
1965
2169
  alignItems: "stretch",
@@ -1991,53 +2195,53 @@ function Te({ count: n }) {
1991
2195
  pointerEvents: "none"
1992
2196
  }, children: n });
1993
2197
  }
1994
- function Yt({ logo: n, items: i = [], vertical: p = !1, onAction: u, style: x }) {
1995
- const [s, f] = C(null), [a, m] = C(() => {
1996
- const d = {};
1997
- return i.forEach((y) => {
1998
- y.id && y.twoState && y.active && (d[y.id] = !0);
1999
- }), d;
2000
- }), z = q(null);
2001
- H(O, []), ie(z, G(() => f(null), []));
2002
- const r = (d, y) => {
2003
- var o, b;
2004
- if (!d.disabled) {
2005
- if (d.twoState && d.id && m((v) => ({ ...v, [d.id]: !v[d.id] })), (o = d.items) != null && o.length) {
2006
- f((v) => v === y ? null : y);
2198
+ function Vt({ logo: n, items: i = [], vertical: p = !1, onAction: s, style: f }) {
2199
+ const [a, h] = L(null), [d, y] = L(() => {
2200
+ const c = {};
2201
+ return i.forEach((b) => {
2202
+ b.id && b.twoState && b.active && (c[b.id] = !0);
2203
+ }), c;
2204
+ }), w = U(null);
2205
+ F(V, []), he(w, Z(() => h(null), []));
2206
+ const r = (c, b) => {
2207
+ var o, g;
2208
+ if (!c.disabled) {
2209
+ if (c.twoState && c.id && y((m) => ({ ...m, [c.id]: !m[c.id] })), (o = c.items) != null && o.length) {
2210
+ h((m) => m === b ? null : b);
2007
2211
  return;
2008
2212
  }
2009
- (b = d.onClick) == null || b.call(d, d.id || ""), u == null || u(d.id || "");
2213
+ (g = c.onClick) == null || g.call(c, c.id || ""), s == null || s(c.id || "");
2010
2214
  }
2011
- }, l = (d, y) => {
2012
- var M;
2013
- if (d.hidden) return null;
2014
- if (d.type === "separator") return /* @__PURE__ */ t("div", { style: {
2215
+ }, l = (c, b) => {
2216
+ var $;
2217
+ if (c.hidden) return null;
2218
+ if (c.type === "separator") return /* @__PURE__ */ t("div", { style: {
2015
2219
  [p ? "height" : "width"]: 1,
2016
2220
  background: e.border,
2017
2221
  margin: p ? "4px 8px" : "0 6px",
2018
2222
  alignSelf: "stretch"
2019
- } }, y);
2020
- if (d.type === "spacer") return /* @__PURE__ */ t("div", { style: { flex: 1 } }, y);
2021
- if (d.type === "input") return /* @__PURE__ */ g("div", { style: { position: "relative", display: "flex", alignItems: "center", margin: "0 4px" }, children: [
2022
- d.icon && /* @__PURE__ */ t("span", { style: { position: "absolute", left: 8, color: e.textMut, fontSize: 15, pointerEvents: "none", zIndex: 1 }, children: d.icon }),
2223
+ } }, b);
2224
+ if (c.type === "spacer") return /* @__PURE__ */ t("div", { style: { flex: 1 } }, b);
2225
+ if (c.type === "input") return /* @__PURE__ */ x("div", { style: { position: "relative", display: "flex", alignItems: "center", margin: "0 4px" }, children: [
2226
+ c.icon && /* @__PURE__ */ t("span", { style: { position: "absolute", left: 8, color: e.textMut, fontSize: 15, pointerEvents: "none", zIndex: 1 }, children: c.icon }),
2023
2227
  /* @__PURE__ */ t(
2024
2228
  "input",
2025
2229
  {
2026
2230
  className: "dhx dhx-input",
2027
- style: { width: d.width || 200, height: 28, paddingLeft: d.icon ? 30 : void 0 },
2028
- placeholder: d.placeholder,
2029
- onChange: (D) => {
2030
- var T;
2031
- return (T = d.onChange) == null ? void 0 : T.call(d, D.target.value);
2231
+ style: { width: c.width || 200, height: 28, paddingLeft: c.icon ? 30 : void 0 },
2232
+ placeholder: c.placeholder,
2233
+ onChange: (C) => {
2234
+ var N;
2235
+ return (N = c.onChange) == null ? void 0 : N.call(c, C.target.value);
2032
2236
  }
2033
2237
  }
2034
2238
  )
2035
- ] }, y);
2036
- if (d.type === "imageButton") return /* @__PURE__ */ g(
2239
+ ] }, b);
2240
+ if (c.type === "imageButton") return /* @__PURE__ */ x(
2037
2241
  "button",
2038
2242
  {
2039
- title: d.tooltip,
2040
- disabled: d.disabled,
2243
+ title: c.tooltip,
2244
+ disabled: c.disabled,
2041
2245
  style: {
2042
2246
  position: "relative",
2043
2247
  width: 36,
@@ -2046,26 +2250,26 @@ function Yt({ logo: n, items: i = [], vertical: p = !1, onAction: u, style: x })
2046
2250
  border: "none",
2047
2251
  borderRadius: "50%",
2048
2252
  overflow: "hidden",
2049
- cursor: d.disabled ? "not-allowed" : "pointer",
2253
+ cursor: c.disabled ? "not-allowed" : "pointer",
2050
2254
  background: "transparent",
2051
2255
  flexShrink: 0
2052
2256
  },
2053
- onClick: () => r(d, y),
2257
+ onClick: () => r(c, b),
2054
2258
  children: [
2055
- d.src && /* @__PURE__ */ t("img", { src: d.src, alt: d.value || "", style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "50%" } }),
2056
- d.count !== void 0 && /* @__PURE__ */ t(Te, { count: d.count })
2259
+ c.src && /* @__PURE__ */ t("img", { src: c.src, alt: c.value || "", style: { width: "100%", height: "100%", objectFit: "cover", borderRadius: "50%" } }),
2260
+ c.count !== void 0 && /* @__PURE__ */ t(Te, { count: c.count })
2057
2261
  ]
2058
2262
  },
2059
- y
2263
+ b
2060
2264
  );
2061
- const o = !!(d.twoState && d.id && a[d.id]), b = !!((M = d.items) != null && M.length), v = {
2265
+ const o = !!(c.twoState && c.id && d[c.id]), g = !!(($ = c.items) != null && $.length), m = {
2062
2266
  position: "relative",
2063
2267
  height: p ? 40 : 36,
2064
2268
  gap: 6,
2065
2269
  background: o ? e.primaryLt : "transparent",
2066
- color: o ? e.primary : d.disabled ? e.textMut : e.text,
2067
- opacity: d.disabled ? 0.55 : 1,
2068
- cursor: d.disabled ? "not-allowed" : "pointer",
2270
+ color: o ? e.primary : c.disabled ? e.textMut : e.text,
2271
+ opacity: c.disabled ? 0.55 : 1,
2272
+ cursor: c.disabled ? "not-allowed" : "pointer",
2069
2273
  ...p ? {
2070
2274
  width: "100%",
2071
2275
  justifyContent: "flex-start",
@@ -2073,37 +2277,37 @@ function Yt({ logo: n, items: i = [], vertical: p = !1, onAction: u, style: x })
2073
2277
  borderRadius: 0
2074
2278
  } : {}
2075
2279
  };
2076
- return /* @__PURE__ */ g("div", { style: { position: "relative" }, children: [
2077
- /* @__PURE__ */ g(
2280
+ return /* @__PURE__ */ x("div", { style: { position: "relative" }, children: [
2281
+ /* @__PURE__ */ x(
2078
2282
  "button",
2079
2283
  {
2080
2284
  className: "dhx dhx-btn dhx-btn-ghost",
2081
- title: d.tooltip,
2082
- disabled: d.disabled,
2083
- style: v,
2084
- onClick: () => r(d, y),
2285
+ title: c.tooltip,
2286
+ disabled: c.disabled,
2287
+ style: m,
2288
+ onClick: () => r(c, b),
2085
2289
  children: [
2086
- d.icon && /* @__PURE__ */ t("span", { style: { fontSize: 16, flexShrink: 0 }, children: d.icon }),
2087
- d.value && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: d.value }),
2088
- b && /* @__PURE__ */ t("span", { style: { fontSize: 9, opacity: 0.55, marginLeft: 2 }, children: "▼" }),
2089
- d.count !== void 0 && /* @__PURE__ */ t(Te, { count: d.count })
2290
+ c.icon && /* @__PURE__ */ t("span", { style: { fontSize: 16, flexShrink: 0 }, children: c.icon }),
2291
+ c.value && /* @__PURE__ */ t("span", { style: { fontSize: 13 }, children: c.value }),
2292
+ g && /* @__PURE__ */ t("span", { style: { fontSize: 9, opacity: 0.55, marginLeft: 2 }, children: "▼" }),
2293
+ c.count !== void 0 && /* @__PURE__ */ t(Te, { count: c.count })
2090
2294
  ]
2091
2295
  }
2092
2296
  ),
2093
- b && s === y && /* @__PURE__ */ t(
2094
- ae,
2297
+ g && a === b && /* @__PURE__ */ t(
2298
+ fe,
2095
2299
  {
2096
- items: d.items,
2097
- onSelect: () => f(null),
2300
+ items: c.items,
2301
+ onSelect: () => h(null),
2098
2302
  style: p ? { left: "100%", top: 0 } : { top: "100%" }
2099
2303
  }
2100
2304
  )
2101
- ] }, y);
2305
+ ] }, b);
2102
2306
  };
2103
- return /* @__PURE__ */ g(
2307
+ return /* @__PURE__ */ x(
2104
2308
  "nav",
2105
2309
  {
2106
- ref: z,
2310
+ ref: w,
2107
2311
  className: "dhx",
2108
2312
  style: {
2109
2313
  display: "flex",
@@ -2115,7 +2319,7 @@ function Yt({ logo: n, items: i = [], vertical: p = !1, onAction: u, style: x })
2115
2319
  padding: p ? "8px 0" : "0 12px",
2116
2320
  minHeight: p ? void 0 : 48,
2117
2321
  gap: 2,
2118
- ...x
2322
+ ...f
2119
2323
  },
2120
2324
  children: [
2121
2325
  n && /* @__PURE__ */ t("div", { style: {
@@ -2135,35 +2339,35 @@ function Yt({ logo: n, items: i = [], vertical: p = !1, onAction: u, style: x })
2135
2339
  );
2136
2340
  }
2137
2341
  export {
2138
- St as Button,
2139
- Lt as Calendar,
2140
- Ct as Chart,
2141
- Tt as Colorpicker,
2342
+ Mt as Button,
2343
+ Rt as Calendar,
2344
+ Nt as Chart,
2345
+ Et as Colorpicker,
2142
2346
  $e as Combobox,
2143
- zt as ContextMenu,
2144
- Bt as DataView,
2145
- Pt as Form,
2146
- It as Grid,
2147
- dt as Layout,
2148
- At as List,
2149
- wt as Menu,
2150
- ae as MenuDropdown,
2347
+ Dt as ContextMenu,
2348
+ jt as DataView,
2349
+ Ft as Form,
2350
+ Tt as Grid,
2351
+ pt as Layout,
2352
+ Pt as List,
2353
+ $t as Menu,
2354
+ fe as MenuDropdown,
2151
2355
  Re as MessageContext,
2152
- Et as MessageProvider,
2153
- Yt as Navbar,
2154
- jt as Pagination,
2155
- Nt as Popup,
2156
- Ot as Ribbon,
2157
- $t as Sidebar,
2356
+ Bt as MessageProvider,
2357
+ Vt as Navbar,
2358
+ Yt as Pagination,
2359
+ Wt as Popup,
2360
+ Kt as Ribbon,
2361
+ It as Sidebar,
2158
2362
  De as Slider,
2159
- Dt as Tabbar,
2160
- ht as Timepicker,
2161
- Mt as Toolbar,
2162
- Ht as Tree,
2163
- Rt as Window,
2363
+ Lt as Tabbar,
2364
+ gt as Timepicker,
2365
+ Ct as Toolbar,
2366
+ Ot as Tree,
2367
+ At as Window,
2164
2368
  e as tokens,
2165
- ie as useClickOutside,
2166
- st as useDrag,
2167
- Wt as useMessage
2369
+ he as useClickOutside,
2370
+ dt as useDrag,
2371
+ Ht as useMessage
2168
2372
  };
2169
2373
  //# sourceMappingURL=dhx-react-suite.js.map