@tenorlab/react-dashboard 1.2.5 → 1.2.8

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.
Files changed (25) hide show
  1. package/dist/components/DynamicWidgetLoader.d.ts +2 -1
  2. package/dist/components/WidgetContainer.d.ts +1 -1
  3. package/dist/components/WidgetsCatalogFlyout.d.ts +3 -2
  4. package/dist/components/dashboard-primitives/index.d.ts +0 -4
  5. package/dist/components/index.d.ts +0 -2
  6. package/dist/components/interfaces/core-react.interfaces.d.ts +1 -1
  7. package/dist/components/interfaces/index.d.ts +0 -4
  8. package/dist/components/use-dashboard-store.d.ts +1 -1
  9. package/dist/components/use-dashboard-undo-service.d.ts +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/react-dashboard.es.js +1586 -1593
  12. package/package.json +2 -1
  13. package/dist/components/dashboard-primitives/color-utils.d.ts +0 -12
  14. package/dist/components/dashboard-primitives/css-vars-utils.d.ts +0 -6
  15. package/dist/components/dashboard-primitives/parse-container-title.d.ts +0 -2
  16. package/dist/components/dashboard-primitives/use-distinct-css-classes.d.ts +0 -1
  17. package/dist/components/dashboard-settings/dashboard-settings-utils.d.ts +0 -4
  18. package/dist/components/dashboard-settings/dashboard-settings.d.ts +0 -2
  19. package/dist/components/dashboard-settings/index.d.ts +0 -2
  20. package/dist/components/interfaces/core.base.d.ts +0 -73
  21. package/dist/components/interfaces/core.interfaces.d.ts +0 -39
  22. package/dist/components/interfaces/core.utils.d.ts +0 -66
  23. package/dist/components/interfaces/storage-service.interfaces.d.ts +0 -8
  24. package/dist/components/use-dashboard-storage-service.d.ts +0 -2
  25. package/dist/react-dashboard.css +0 -1
@@ -1,7 +1,7 @@
1
- import ae, { useState as ce, useCallback as ue, useMemo as st, forwardRef as le, useRef as Ct, Suspense as St, useEffect as Dt } from "react";
2
- import { jsxs as W, jsx as s } from "react/jsx-runtime";
3
- import ct from "react-dom";
4
- const Tt = [
1
+ import ae, { useState as se, useCallback as ce, useMemo as ot, forwardRef as le, useRef as wt, Suspense as Ct, useEffect as St } from "react";
2
+ import { jsxs as $, jsx as s } from "react/jsx-runtime";
3
+ import st from "react-dom";
4
+ const Dt = [
5
5
  {
6
6
  key: "grid-gap",
7
7
  name: "Gap",
@@ -79,15 +79,67 @@ const Tt = [
79
79
  defaultValue: "1.0rem",
80
80
  value: "1.0rem"
81
81
  }
82
- ], Et = ["rem", "pc", "cm", "in", "em", "vh", "vw", "%"], Nt = (e, n) => Et.includes(e) ? n : 1, _t = {
82
+ ], Tt = ["rem", "pc", "cm", "in", "em", "vh", "vw", "%"], Et = (e, n) => Tt.includes(e) ? n : 1, Nt = {
83
83
  incrementOrDecrementValue: (e, n) => {
84
- const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0, i = e.value.match(/([^\d.]+)/), o = i ? i[1] : e.defaultUnit, a = Nt(o, e.step) * n, b = `${Math.max(r + a, e.minValue).toFixed(1)}${o}`;
84
+ const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0, a = e.value.match(/([^\d.]+)/), i = a ? a[1] : e.defaultUnit, o = Et(i, e.step) * n, u = `${Math.max(r + o, e.minValue).toFixed(1)}${i}`;
85
85
  return {
86
86
  ...e,
87
- value: b
87
+ value: u
88
88
  };
89
89
  }
90
- }, Ce = {
90
+ }, lt = (e, n) => `dashboards_${n}_${e}`, _t = async (e, n, t, r) => {
91
+ const a = localStorage.getItem(lt(e, n));
92
+ if (a)
93
+ try {
94
+ const i = JSON.parse(a);
95
+ return i.length < 1 ? [r] : (i.forEach((o) => {
96
+ o.dashboardId || (o.dashboardId = "default"), o.dashboardName || (o.dashboardName = `Dashboard ${o.dashboardId}`), o.responsiveGrid = o.responsiveGrid ?? !1, (o.widgets || []).length < 1 && (o.widgets = r.widgets);
97
+ const u = (o.cssSettings || []).filter(
98
+ (y) => r.cssSettings.some((p) => p.key === y.key)
99
+ );
100
+ if (u.length < 1)
101
+ o.cssSettings = [...r.cssSettings];
102
+ else {
103
+ u.forEach((p) => {
104
+ p.value = (p.value || "").replace(/NaN/g, "");
105
+ const g = r.cssSettings.find(
106
+ (c) => c.key === p.key
107
+ );
108
+ g && (Object.keys(g).forEach((c) => {
109
+ c in p || (p[c] = g[c]);
110
+ }), p.step = g.step, p.minValue = g.minValue, p.defaultValue = g.defaultValue, p.defaultUnit = g.defaultUnit, /\d+/g.test(p.value) === !1 && (p.value = g ? g.value : "1.0rem"));
111
+ });
112
+ const y = r.cssSettings.filter((p) => !u.some(
113
+ (g) => g.key === p.key
114
+ ));
115
+ o.cssSettings = [...u, ...y];
116
+ }
117
+ o.widgets = o.widgets.filter(
118
+ (y) => y.includes("WidgetContainer") || t.has(y)
119
+ ), o.childWidgetsConfig = o.childWidgetsConfig.filter(
120
+ (y) => t.has(y.widgetKey)
121
+ ), o.zoomScale ? o.zoomScale < 0.7 && (o.zoomScale = 0.7) : o.zoomScale = 1;
122
+ }), i);
123
+ } catch (i) {
124
+ console.warn("Error parsing saved dashboard config:", i);
125
+ }
126
+ return [r];
127
+ }, Mt = async (e, n, t, r) => {
128
+ t.forEach((i) => {
129
+ if (i.userID = e, i.clientAppKey = n, i.responsiveGrid = i.responsiveGrid ?? !1, typeof i != "object")
130
+ throw new Error("Invalid dashboard configuration");
131
+ i.widgets = i.widgets.filter(
132
+ (o) => o.includes("WidgetContainer") || r.has(o)
133
+ ), i.childWidgetsConfig = i.childWidgetsConfig.filter(
134
+ (o) => r.has(o.widgetKey)
135
+ ), i.zoomScale ? i.zoomScale < 0.7 && (i.zoomScale = 0.7) : i.zoomScale = 1;
136
+ });
137
+ const a = JSON.stringify(t);
138
+ return localStorage.setItem(lt(e, n), a), !0;
139
+ }, Pt = {
140
+ getSavedDashboards: _t,
141
+ saveDashboards: Mt
142
+ }, Mn = () => Pt, we = {
91
143
  userID: 0,
92
144
  clientAppKey: "",
93
145
  dashboardId: "default",
@@ -96,13 +148,16 @@ const Tt = [
96
148
  responsiveGrid: !1,
97
149
  widgets: [],
98
150
  childWidgetsConfig: [],
99
- cssSettings: [...Tt]
100
- }, Ae = 0.7, Fe = 1, Mt = 0.05, lt = (e) => {
151
+ cssSettings: [...Dt]
152
+ }, dt = (e) => {
153
+ const n = `${e}`.split("_");
154
+ return n.length > 1 ? n[1].replace(/(\D)(\d+)/, "$1 $2") : "Container";
155
+ }, je = 0.7, Ae = 1, $t = 0.05, ct = (e) => {
101
156
  let n = Number(e || 0);
102
- return n < Ae && (n = Ae), n > Fe && (n = Fe), n;
157
+ return n < je && (n = je), n > Ae && (n = Ae), n;
103
158
  }, Pn = (e, n) => {
104
- let t = Number(Number((Mt * n).toFixed(2)).toFixed(2)), r = Number((Number(e) + t).toFixed(2));
105
- return lt(r);
159
+ let t = Number(Number(($t * n).toFixed(2)).toFixed(2)), r = Number((Number(e) + t).toFixed(2));
160
+ return ct(r);
106
161
  }, $n = (e) => {
107
162
  let n = {
108
163
  ...e
@@ -110,48 +165,42 @@ const Tt = [
110
165
  return n.widgets = n.widgets.filter((t) => {
111
166
  if (`${t}`.includes("WidgetContainer")) {
112
167
  const r = n.childWidgetsConfig.filter(
113
- (i) => i.parentWidgetKey === t
168
+ (a) => a.parentWidgetKey === t
114
169
  );
115
170
  if (!r || r.length === 0)
116
171
  return n.widgets = n.widgets.filter(
117
- (i) => i !== t
172
+ (a) => a !== t
118
173
  ), !1;
119
174
  }
120
175
  return !0;
121
176
  }), n;
122
- }, Pt = (e) => {
177
+ }, Wt = (e) => {
123
178
  const n = e.widgets.filter(
124
179
  (r) => r.includes("WidgetContainer")
125
180
  ), t = {};
126
- return n.forEach((r, i) => {
127
- const d = `${r.split("_container")[0]}_container${i + 1}`;
128
- t[r] = d;
181
+ return n.forEach((r, a) => {
182
+ const i = `${r.split("_container")[0]}_container${a + 1}`;
183
+ t[r] = i;
129
184
  }), e.widgets = e.widgets.map((r) => t[r] || r), e.childWidgetsConfig = e.childWidgetsConfig.map((r) => {
130
- const i = r.parentWidgetKey, o = t[i];
185
+ const a = r.parentWidgetKey, i = t[a];
131
186
  return {
132
187
  ...r,
133
188
  // If a new key exists, use it. If not, keep the original key.
134
- parentWidgetKey: o || i
189
+ parentWidgetKey: i || a
135
190
  };
136
191
  }), e;
137
- }, ge = (e, n) => {
138
- const t = `${e}`.includes("Container"), r = t ? ["Container"] : ["Widget"], i = n?.name || e, o = n?.description || (t ? "Container" : "Unknown");
192
+ }, he = (e, n) => {
193
+ const t = `${e}`.includes("Container"), r = t ? ["Container"] : ["Widget"], a = n?.name || e, i = n?.description || (t ? "Container" : "Unknown");
139
194
  return {
140
- name: i,
141
- description: o,
195
+ name: a,
196
+ description: i,
142
197
  categories: r,
143
198
  noDuplicatedWidgets: !0,
144
199
  icon: void 0,
145
200
  externalDependencies: []
146
201
  };
147
- }, Wn = (e, n, t) => {
148
- const r = n[e];
149
- return r || ge(e, t);
150
- }, $t = (e, n) => {
151
- const r = n.get(e)?.meta;
152
- return r || ge(e);
153
- }, Wt = (e, n, t) => {
154
- const r = t || ge(e);
202
+ }, Wn = (e, n, t) => n[e] || he(e, t), It = (e, n) => n.get(e)?.meta || he(e), Rt = (e, n, t) => {
203
+ const r = t || he(e);
155
204
  return [
156
205
  e,
157
206
  {
@@ -162,8 +211,8 @@ const Tt = [
162
211
  component: n
163
212
  }
164
213
  ];
165
- }, dt = (e, n, t) => {
166
- const r = t || ge(e);
214
+ }, ut = (e, n, t) => {
215
+ const r = t || he(e);
167
216
  return [
168
217
  e,
169
218
  {
@@ -174,86 +223,129 @@ const Tt = [
174
223
  loader: n
175
224
  }
176
225
  ];
177
- }, It = (e) => {
226
+ }, Ot = (e) => {
178
227
  const n = e.match(/\/widget-([a-zA-Z0-9-]+)\/index\.ts$/);
179
228
  if (n && n[1]) {
180
- const t = n[1], r = t.split("-"), i = `Widget${r.map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join("")}`, o = r.map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ");
229
+ const t = n[1], r = t.split("-"), a = `Widget${r.map((o) => o.charAt(0).toUpperCase() + o.slice(1)).join("")}`, i = r.map((o) => o.charAt(0).toUpperCase() + o.slice(1)).join(" ");
181
230
  return {
182
- key: i,
183
- title: o,
231
+ key: a,
232
+ title: i,
184
233
  folder: t
185
234
  };
186
235
  }
187
236
  return null;
188
- }, Ot = (e, n, t, r) => {
189
- const i = `${n}/widget-${t}/meta.ts`, o = e[i];
190
- if (!o)
237
+ }, kt = (e, n, t, r) => {
238
+ const a = `${n}/widget-${t}/meta.ts`, i = e[a];
239
+ if (!i)
191
240
  return;
192
- const a = `${r}Meta`;
193
- return o[a] || void 0;
241
+ const o = `${r}Meta`;
242
+ return i[o] || void 0;
194
243
  }, In = async (e) => new Promise(async (n, t) => {
195
244
  const r = [];
196
245
  try {
197
- const o = await (await fetch(`${e}?${Math.random()}`)).json();
198
- for (const a in o) {
199
- const d = o[a], b = () => import(
246
+ const a = await (await fetch(`${e}?${Math.random()}`)).json();
247
+ for (const i in a) {
248
+ const o = a[i], u = () => import(
200
249
  /* @vite-ignore */
201
- d.url
202
- ), m = {
203
- name: d.meta?.name || "Unknown",
204
- description: d.meta?.description || "Remote Plugin",
205
- categories: d.meta?.categories || ["Widget"],
206
- noDuplicatedWidgets: d.meta?.noDuplicatedWidgets ?? !0,
250
+ o.url
251
+ ), y = {
252
+ name: o.meta?.name || "Unknown",
253
+ description: o.meta?.description || "Remote Plugin",
254
+ categories: o.meta?.categories || ["Widget"],
255
+ noDuplicatedWidgets: o.meta?.noDuplicatedWidgets ?? !0,
207
256
  icon: void 0,
208
257
  // Or a logic to map a string name to a Lucide component
209
- externalDependencies: d.meta?.externalDependencies || []
258
+ externalDependencies: o.meta?.externalDependencies || []
210
259
  };
211
- r.push(dt(a, b, m));
260
+ r.push(ut(i, u, y));
212
261
  }
213
262
  n({
214
263
  entries: r,
215
264
  message: "",
216
265
  details: ""
217
266
  });
218
- } catch (i) {
219
- console.error("Remote plugin discovery failed:", i), t({
267
+ } catch (a) {
268
+ console.error("Remote plugin discovery failed:", a), t({
220
269
  entries: [],
221
270
  message: "Remote plugin discovery failed:",
222
- details: typeof i == "object" ? JSON.stringify(i) : i
271
+ details: typeof a == "object" ? JSON.stringify(a) : a
223
272
  });
224
273
  }
225
- }), On = (e, n, t, r = !0) => {
226
- const i = [];
227
- for (const o in n) {
228
- const a = n[o], d = It(o);
229
- if (d && a) {
230
- const { key: b, title: m, folder: h } = d;
231
- let u = Ot(t, e, h, b);
232
- if (u || (u = ge(b, {
274
+ }), Rn = (e, n, t, r = !0) => {
275
+ const a = [];
276
+ for (const i in n) {
277
+ const o = n[i], u = Ot(i);
278
+ if (u && o) {
279
+ const { key: y, title: p, folder: g } = u;
280
+ let c = kt(t, e, g, y);
281
+ if (c || (c = he(y, {
233
282
  description: `Local ${r ? "dynamic" : "static"} widget`
234
283
  })), r)
235
- i.push(
236
- dt(b, a, u)
284
+ a.push(
285
+ ut(y, o, c)
237
286
  );
238
287
  else {
239
- const p = a.default || a;
240
- i.push(Wt(b, p, u));
288
+ const b = o.default || o;
289
+ a.push(Rt(y, b, c));
241
290
  }
242
291
  }
243
292
  }
244
- return i;
245
- }, Le = (e) => {
293
+ return a;
294
+ }, On = (e, n = "color") => {
295
+ if (typeof window > "u") return "#FFFFFF";
296
+ const t = document.createElement("div");
297
+ Array.isArray(e) ? e.forEach((a) => t.classList.add(a)) : e.split(" ").forEach((a) => t.classList.add(a)), t.style.display = "none", document.body.appendChild(t);
298
+ const r = window.getComputedStyle(t)[n];
299
+ return document.body.removeChild(t), r;
300
+ }, kn = {
301
+ /**
302
+ * @name getCssVariableValue
303
+ * @description Return the value of a CSS custom property from the current HTML document
304
+ * @param cssPropertyName
305
+ * @returns
306
+ */
307
+ getCssVariableValue: (e) => {
308
+ const n = document.documentElement;
309
+ return getComputedStyle(n).getPropertyValue(e).trim() || null;
310
+ },
311
+ /**
312
+ * @name setCssVariableValue
313
+ * @description Sets the value of a CSS custom property on the current HTML document
314
+ * @param cssPropertyName
315
+ * @param value
316
+ */
317
+ setCssVariableValue: (e, n) => {
318
+ document.documentElement.style.setProperty(e, n);
319
+ },
320
+ /**
321
+ * @name restoreCssVarsFromSettings
322
+ * @description
323
+ * Sets the values of many CSS custom properties on the current HTML document
324
+ * from the list of dashboard settings provided
325
+ * @param settings, an array of IDashboardSettingEntry
326
+ */
327
+ restoreCssVarsFromSettings: (e) => {
328
+ const n = document.documentElement;
329
+ e.forEach((t) => {
330
+ n.style.setProperty(t.cssProperty, t.value);
331
+ });
332
+ }
333
+ }, G = (e, ...n) => [
334
+ ...new Set(
335
+ [e || "", ...n].join(" ").trim().replace(/\n+/gi, " ").replace(/\s+/gi, " ").split(" ")
336
+ )
337
+ ].join(" ").trim(), Fe = (e) => {
246
338
  let n;
247
- const t = /* @__PURE__ */ new Set(), r = (m, h) => {
248
- const u = typeof m == "function" ? m(n) : m;
249
- if (!Object.is(u, n)) {
250
- const p = n;
251
- n = h ?? (typeof u != "object" || u === null) ? u : Object.assign({}, n, u), t.forEach((y) => y(n, p));
252
- }
253
- }, i = () => n, d = { setState: r, getState: i, getInitialState: () => b, subscribe: (m) => (t.add(m), () => t.delete(m)) }, b = n = e(r, i, d);
254
- return d;
255
- }, Rt = ((e) => e ? Le(e) : Le), kt = (e) => e;
256
- function jt(e, n = kt) {
339
+ const t = /* @__PURE__ */ new Set(), r = (p, g) => {
340
+ const c = typeof p == "function" ? p(n) : p;
341
+ if (!Object.is(c, n)) {
342
+ const b = n;
343
+ n = g ?? (typeof c != "object" || c === null) ? c : Object.assign({}, n, c), t.forEach((v) => v(n, b));
344
+ }
345
+ }, a = () => n, u = { setState: r, getState: a, getInitialState: () => y, subscribe: (p) => (t.add(p), () => t.delete(p)) }, y = n = e(r, a, u);
346
+ return u;
347
+ }, jt = ((e) => e ? Fe(e) : Fe), At = (e) => e;
348
+ function Ft(e, n = At) {
257
349
  const t = ae.useSyncExternalStore(
258
350
  e.subscribe,
259
351
  ae.useCallback(() => n(e.getState()), [e, n]),
@@ -261,27 +353,27 @@ function jt(e, n = kt) {
261
353
  );
262
354
  return ae.useDebugValue(t), t;
263
355
  }
264
- const At = (e) => {
265
- const n = Rt(e), t = (r) => jt(n, r);
356
+ const Lt = (e) => {
357
+ const n = jt(e), t = (r) => Ft(n, r);
266
358
  return Object.assign(t, n), t;
267
- }, Ft = ((e) => At), Lt = (e) => {
359
+ }, Ut = ((e) => Lt), Vt = (e) => {
268
360
  const n = e.widgets.filter((r) => r.includes("WidgetContainer")).map((r) => Number(r.split("_")[1].replace("container", "")));
269
361
  return `container${n.length > 0 ? Math.max(...n) + 1 : 1}`;
270
- }, Vt = (e, n) => {
271
- const t = Lt(e);
362
+ }, qt = (e, n) => {
363
+ const t = Vt(e);
272
364
  return `${n}_${t}`;
273
- }, Ut = (e) => {
274
- const { dashboardConfig: n, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets: i } = e;
365
+ }, zt = (e) => {
366
+ const { dashboardConfig: n, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets: a } = e;
275
367
  if (r) {
276
- if (i && n.childWidgetsConfig.find(
277
- (a) => a.parentWidgetKey === r && a.widgetKey === t
368
+ if (a && n.childWidgetsConfig.find(
369
+ (o) => o.parentWidgetKey === r && o.widgetKey === t
278
370
  ))
279
371
  return {
280
372
  success: !1,
281
373
  message: `DashboardStore: addWidget: Widget already added (${t})`,
282
374
  updatedDashboardConfig: n
283
375
  };
284
- const o = [
376
+ const i = [
285
377
  ...n.childWidgetsConfig,
286
378
  { parentWidgetKey: r, widgetKey: t }
287
379
  // new entry
@@ -290,102 +382,102 @@ const At = (e) => {
290
382
  success: !0,
291
383
  updatedDashboardConfig: {
292
384
  ...n,
293
- childWidgetsConfig: o
385
+ childWidgetsConfig: i
294
386
  }
295
387
  };
296
388
  } else {
297
- if (i && n.widgets.includes(t))
389
+ if (a && n.widgets.includes(t))
298
390
  return {
299
391
  success: !1,
300
392
  message: `DashboardStore: addWidget: Widget already added (${t})`,
301
393
  updatedDashboardConfig: n
302
394
  };
303
- const o = [...n.widgets, t];
395
+ const i = [...n.widgets, t];
304
396
  return {
305
397
  success: !0,
306
398
  updatedDashboardConfig: {
307
399
  ...n,
308
- widgets: o
400
+ widgets: i
309
401
  }
310
402
  };
311
403
  }
312
- }, qt = (e, n, t) => {
404
+ }, Yt = (e, n, t) => {
313
405
  if ((t || "").trim().length > 0) {
314
406
  const r = e.childWidgetsConfig.filter(
315
- (b) => b.parentWidgetKey !== t
316
- ), i = e.childWidgetsConfig.filter(
317
- (b) => b.parentWidgetKey === t && b.widgetKey !== n
318
- ), o = [...r, ...i];
319
- let a = {
407
+ (y) => y.parentWidgetKey !== t
408
+ ), a = e.childWidgetsConfig.filter(
409
+ (y) => y.parentWidgetKey === t && y.widgetKey !== n
410
+ ), i = [...r, ...a];
411
+ let o = {
320
412
  ...e,
321
- childWidgetsConfig: o
413
+ childWidgetsConfig: i
322
414
  };
323
- return `${n}`.includes("Container") && (a = Pt(a)), {
415
+ return `${n}`.includes("Container") && (o = Wt(o)), {
324
416
  success: !0,
325
- updatedDashboardConfig: a
417
+ updatedDashboardConfig: o
326
418
  };
327
419
  } else {
328
- const r = e.widgets.filter((o) => o !== n), i = e.childWidgetsConfig.filter(
329
- (o) => o.parentWidgetKey !== n
420
+ const r = e.widgets.filter((i) => i !== n), a = e.childWidgetsConfig.filter(
421
+ (i) => i.parentWidgetKey !== n
330
422
  );
331
423
  return {
332
424
  success: !0,
333
425
  updatedDashboardConfig: {
334
426
  ...e,
335
427
  widgets: r,
336
- childWidgetsConfig: i
428
+ childWidgetsConfig: a
337
429
  }
338
430
  };
339
431
  }
340
- }, Yt = (e, n, t, r) => {
432
+ }, Kt = (e, n, t, r) => {
341
433
  if ((r || "").trim().length > 0) {
342
- const i = e.childWidgetsConfig.filter(
343
- (h) => h.parentWidgetKey !== r
434
+ const a = e.childWidgetsConfig.filter(
435
+ (g) => g.parentWidgetKey !== r
344
436
  );
345
- let o = e.childWidgetsConfig.filter(
346
- (h) => h.parentWidgetKey === r
437
+ let i = e.childWidgetsConfig.filter(
438
+ (g) => g.parentWidgetKey === r
347
439
  );
348
- const a = o.indexOf(t);
349
- let d = a + n;
350
- if (d = Math.max(0, d), d = Math.min(o.length - 1, d), d === a)
440
+ const o = i.indexOf(t);
441
+ let u = o + n;
442
+ if (u = Math.max(0, u), u = Math.min(i.length - 1, u), u === o)
351
443
  return {
352
444
  success: !1,
353
445
  message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
354
446
  updatedDashboardConfig: e
355
447
  };
356
- const b = [...o], [m] = b.splice(a, 1);
357
- return b.splice(d, 0, m), {
448
+ const y = [...i], [p] = y.splice(o, 1);
449
+ return y.splice(u, 0, p), {
358
450
  success: !0,
359
451
  updatedDashboardConfig: {
360
452
  ...e,
361
- childWidgetsConfig: [...i, ...b]
453
+ childWidgetsConfig: [...a, ...y]
362
454
  }
363
455
  };
364
456
  } else {
365
- const i = e.widgets || [], o = i.indexOf(t);
366
- let a = o + n;
367
- if (a = Math.max(0, a), a = Math.min(i.length - 1, a), a === o)
457
+ const a = e.widgets || [], i = a.indexOf(t);
458
+ let o = i + n;
459
+ if (o = Math.max(0, o), o = Math.min(a.length - 1, o), o === i)
368
460
  return {
369
461
  success: !1,
370
462
  message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
371
463
  updatedDashboardConfig: e
372
464
  };
373
- const d = [...i], [b] = d.splice(o, 1);
374
- return d.splice(a, 0, b), {
465
+ const u = [...a], [y] = u.splice(i, 1);
466
+ return u.splice(o, 0, y), {
375
467
  success: !0,
376
468
  updatedDashboardConfig: {
377
469
  ...e,
378
- widgets: d
470
+ widgets: u
379
471
  }
380
472
  };
381
473
  }
382
- }, zt = (e, n) => ({
474
+ }, Bt = (e, n) => ({
383
475
  isLoading: !1,
384
476
  isEditing: !1,
385
- allDashboardConfigs: [Ce],
386
- currentDashboardConfig: Ce,
477
+ allDashboardConfigs: [we],
478
+ currentDashboardConfig: we,
387
479
  targetContainerKey: void 0,
388
- getNextContainerKey: (t) => Vt(n().currentDashboardConfig, t),
480
+ getNextContainerKey: (t) => qt(n().currentDashboardConfig, t),
389
481
  setIsLoading: (t) => (e(() => ({ isLoading: t })), t),
390
482
  setIsEditing: (t) => {
391
483
  let r = n().targetContainerKey;
@@ -394,50 +486,65 @@ const At = (e) => {
394
486
  setTargetContainerKey: (t) => (e(() => ({ targetContainerKey: t })), t),
395
487
  setAllDashboardConfigs: (t) => (e(() => ({ allDashboardConfigs: t })), n().allDashboardConfigs),
396
488
  setCurrentDashboardConfig: (t) => {
397
- const r = n(), i = [
398
- ...r.allDashboardConfigs.filter((o) => o.dashboardId !== t.dashboardId),
489
+ const r = n(), a = [
490
+ ...r.allDashboardConfigs.filter((i) => i.dashboardId !== t.dashboardId),
399
491
  t
400
492
  ];
401
493
  return e(() => ({
402
494
  ...r,
403
- allDashboardConfigs: i,
495
+ allDashboardConfigs: a,
404
496
  currentDashboardConfig: t
405
- })), i;
497
+ })), a;
406
498
  },
407
499
  addDashboardConfig: (t) => {
408
- const r = n(), i = [
409
- ...r.allDashboardConfigs.filter((o) => o.dashboardId !== t.dashboardId),
500
+ const r = n(), a = [
501
+ ...r.allDashboardConfigs.filter((i) => i.dashboardId !== t.dashboardId),
410
502
  t
411
503
  ];
412
504
  return e(() => ({
413
505
  ...r,
414
- allDashboardConfigs: i,
506
+ allDashboardConfigs: a,
415
507
  currentDashboardConfig: t
416
- })), i;
508
+ })), a;
417
509
  },
418
510
  deleteDashboardConfigById: (t) => {
419
- const r = n(), i = [...r.allDashboardConfigs.filter((o) => o.dashboardId !== t)];
511
+ const r = n(), a = [...r.allDashboardConfigs.filter((i) => i.dashboardId !== t)];
420
512
  return e(() => ({
421
513
  ...r,
422
- allDashboardConfigs: i,
423
- currentDashboardConfig: i[0] || Ce
424
- })), i;
514
+ allDashboardConfigs: a,
515
+ currentDashboardConfig: a[0] || we
516
+ })), a;
425
517
  },
426
518
  selectDashboardById: (t) => (e(() => {
427
- const r = n(), i = r.allDashboardConfigs.find((o) => o.dashboardId === t);
428
- return i ? {
429
- currentDashboardConfig: i
519
+ const r = n(), a = r.allDashboardConfigs.find((i) => i.dashboardId === t);
520
+ return a ? {
521
+ currentDashboardConfig: a
430
522
  } : {
431
523
  ...r
432
524
  };
433
525
  }), n().currentDashboardConfig),
434
526
  addWidget: (t) => {
435
- const r = n(), i = Ut({
527
+ const r = n(), a = zt({
436
528
  dashboardConfig: r.currentDashboardConfig,
437
529
  ...t
438
- }), o = [
530
+ }), i = [
439
531
  ...r.allDashboardConfigs.filter(
440
- (a) => a.dashboardId !== i.updatedDashboardConfig.dashboardId
532
+ (o) => o.dashboardId !== a.updatedDashboardConfig.dashboardId
533
+ ),
534
+ a.updatedDashboardConfig
535
+ ];
536
+ return a.success && e(() => ({
537
+ allDashboardConfigs: i,
538
+ currentDashboardConfig: a.updatedDashboardConfig
539
+ })), {
540
+ ...a,
541
+ allUpdatedDashboardConfigs: i
542
+ };
543
+ },
544
+ removeWidget: (t, r) => {
545
+ const a = n(), i = Yt(a.currentDashboardConfig, t, r), o = [
546
+ ...a.allDashboardConfigs.filter(
547
+ (u) => u.dashboardId !== i.updatedDashboardConfig.dashboardId
441
548
  ),
442
549
  i.updatedDashboardConfig
443
550
  ];
@@ -449,151 +556,84 @@ const At = (e) => {
449
556
  allUpdatedDashboardConfigs: o
450
557
  };
451
558
  },
452
- removeWidget: (t, r) => {
453
- const i = n(), o = qt(i.currentDashboardConfig, t, r), a = [
559
+ moveWidget: (t, r, a) => {
560
+ const i = n(), o = Kt(i.currentDashboardConfig, t, r, a), u = [
454
561
  ...i.allDashboardConfigs.filter(
455
- (d) => d.dashboardId !== o.updatedDashboardConfig.dashboardId
562
+ (y) => y.dashboardId !== o.updatedDashboardConfig.dashboardId
456
563
  ),
457
564
  o.updatedDashboardConfig
458
565
  ];
459
566
  return o.success && e(() => ({
460
- allDashboardConfigs: a,
567
+ allDashboardConfigs: u,
461
568
  currentDashboardConfig: o.updatedDashboardConfig
462
569
  })), {
463
570
  ...o,
464
- allUpdatedDashboardConfigs: a
465
- };
466
- },
467
- moveWidget: (t, r, i) => {
468
- const o = n(), a = Yt(o.currentDashboardConfig, t, r, i), d = [
469
- ...o.allDashboardConfigs.filter(
470
- (b) => b.dashboardId !== a.updatedDashboardConfig.dashboardId
471
- ),
472
- a.updatedDashboardConfig
473
- ];
474
- return a.success && e(() => ({
475
- allDashboardConfigs: d,
476
- currentDashboardConfig: a.updatedDashboardConfig
477
- })), {
478
- ...a,
479
- allUpdatedDashboardConfigs: d
571
+ allUpdatedDashboardConfigs: u
480
572
  };
481
573
  }
482
- }), Rn = Ft()((...e) => ({
483
- ...zt(...e)
484
- })), ut = (e, n) => `dashboards_${n}_${e}`, Bt = async (e, n, t, r) => {
485
- const i = localStorage.getItem(ut(e, n));
486
- if (i)
487
- try {
488
- const o = JSON.parse(i);
489
- return o.length < 1 ? [r] : (o.forEach((a) => {
490
- a.dashboardId || (a.dashboardId = "default"), a.dashboardName || (a.dashboardName = `Dashboard ${a.dashboardId}`), a.responsiveGrid = a.responsiveGrid ?? !1, (a.widgets || []).length < 1 && (a.widgets = r.widgets);
491
- const d = (a.cssSettings || []).filter(
492
- (b) => r.cssSettings.some((m) => m.key === b.key)
493
- );
494
- if (d.length < 1)
495
- a.cssSettings = [...r.cssSettings];
496
- else {
497
- d.forEach((m) => {
498
- m.value = (m.value || "").replace(/NaN/g, "");
499
- const h = r.cssSettings.find(
500
- (u) => u.key === m.key
501
- );
502
- h && (Object.keys(h).forEach((u) => {
503
- u in m || (m[u] = h[u]);
504
- }), m.step = h.step, m.minValue = h.minValue, m.defaultValue = h.defaultValue, m.defaultUnit = h.defaultUnit, /\d+/g.test(m.value) === !1 && (m.value = h ? h.value : "1.0rem"));
505
- });
506
- const b = r.cssSettings.filter((m) => !d.some(
507
- (h) => h.key === m.key
508
- ));
509
- a.cssSettings = [...d, ...b];
510
- }
511
- a.widgets = a.widgets.filter(
512
- (b) => b.includes("WidgetContainer") || t.has(b)
513
- ), a.childWidgetsConfig = a.childWidgetsConfig.filter(
514
- (b) => t.has(b.widgetKey)
515
- ), a.zoomScale ? a.zoomScale < 0.7 && (a.zoomScale = 0.7) : a.zoomScale = 1;
516
- }), o);
517
- } catch (o) {
518
- console.warn("Error parsing saved dashboard config:", o);
519
- }
520
- return [r];
521
- }, Ht = async (e, n, t, r) => {
522
- t.forEach((o) => {
523
- if (o.userID = e, o.clientAppKey = n, o.responsiveGrid = o.responsiveGrid ?? !1, typeof o != "object")
524
- throw new Error("Invalid dashboard configuration");
525
- o.widgets = o.widgets.filter(
526
- (a) => a.includes("WidgetContainer") || r.has(a)
527
- ), o.childWidgetsConfig = o.childWidgetsConfig.filter(
528
- (a) => r.has(a.widgetKey)
529
- ), o.zoomScale ? o.zoomScale < 0.7 && (o.zoomScale = 0.7) : o.zoomScale = 1;
530
- });
531
- const i = JSON.stringify(t);
532
- return localStorage.setItem(ut(e, n), i), !0;
533
- }, Kt = {
534
- getSavedDashboards: Bt,
535
- saveDashboards: Ht
536
- }, kn = () => Kt, jn = () => {
537
- const [e, n] = ce({}), [t, r] = ce({}), i = ue((h) => {
538
- const u = h.dashboardId;
539
- n((p) => {
540
- const y = {
574
+ }), jn = Ut()((...e) => ({
575
+ ...Bt(...e)
576
+ })), An = () => {
577
+ const [e, n] = se({}), [t, r] = se({}), a = ce((g) => {
578
+ const c = g.dashboardId;
579
+ n((b) => {
580
+ const v = {
541
581
  undoIndex: 0,
542
- config: h
582
+ config: g
543
583
  };
544
- return r((D) => ({
545
- ...D,
546
- [u]: 0
584
+ return r((T) => ({
585
+ ...T,
586
+ [c]: 0
547
587
  })), {
548
- ...p,
549
- [u]: [y]
588
+ ...b,
589
+ [c]: [v]
550
590
  // Forces a reset to just this one entry
551
591
  };
552
592
  });
553
- }, []), o = ue(
554
- (h) => {
555
- n((u) => {
556
- const p = h.dashboardId, y = u[p] || [], D = t[p] ?? -1, g = y.slice(0, D + 1), v = {
557
- undoIndex: g.length,
593
+ }, []), i = ce(
594
+ (g) => {
595
+ n((c) => {
596
+ const b = g.dashboardId, v = c[b] || [], T = t[b] ?? -1, m = v.slice(0, T + 1), x = {
597
+ undoIndex: m.length,
558
598
  // New index based on trimmed length
559
- config: h
560
- }, w = [...g, v];
561
- return r((T) => ({
562
- ...T,
563
- [p]: w.length - 1
599
+ config: g
600
+ }, C = [...m, x];
601
+ return r((E) => ({
602
+ ...E,
603
+ [b]: C.length - 1
564
604
  // Index is now the last element's index
565
605
  })), {
566
- ...u,
567
- [p]: w
606
+ ...c,
607
+ [b]: C
568
608
  };
569
609
  });
570
610
  },
571
611
  [t]
572
- ), a = ue((h) => {
573
- n((u) => {
574
- if (!u[h])
575
- return u;
576
- const { [h]: p, ...y } = u;
577
- return y;
578
- }), r((u) => {
579
- const { [h]: p, ...y } = u;
580
- return y;
612
+ ), o = ce((g) => {
613
+ n((c) => {
614
+ if (!c[g])
615
+ return c;
616
+ const { [g]: b, ...v } = c;
617
+ return v;
618
+ }), r((c) => {
619
+ const { [g]: b, ...v } = c;
620
+ return v;
581
621
  });
582
- }, []), d = ue(
583
- (h) => {
584
- r((u) => {
585
- const p = u[h] ?? -1, y = Math.max(0, p - 1);
586
- return y !== p ? { ...u, [h]: y } : u;
622
+ }, []), u = ce(
623
+ (g) => {
624
+ r((c) => {
625
+ const b = c[g] ?? -1, v = Math.max(0, b - 1);
626
+ return v !== b ? { ...c, [g]: v } : c;
587
627
  });
588
628
  },
589
629
  [
590
630
  //loadConfigFromHistory
591
631
  ]
592
- ), b = ue(
593
- (h) => {
594
- r((u) => {
595
- const p = e[h]?.length || 0, y = u[h] ?? -1, D = Math.min(p - 1, y + 1);
596
- return D !== y ? { ...u, [h]: D } : u;
632
+ ), y = ce(
633
+ (g) => {
634
+ r((c) => {
635
+ const b = e[g]?.length || 0, v = c[g] ?? -1, T = Math.min(b - 1, v + 1);
636
+ return T !== v ? { ...c, [g]: T } : c;
597
637
  });
598
638
  },
599
639
  [
@@ -602,22 +642,22 @@ const At = (e) => {
602
642
  ]
603
643
  );
604
644
  return {
605
- initializeHistoryForDashboard: i,
645
+ initializeHistoryForDashboard: a,
606
646
  resetAllHistory: () => n({}),
607
- addUndoEntry: o,
608
- removeUndoHistoryForDashboard: a,
609
- undo: d,
610
- redo: b,
611
- getUndoStatus: (h) => {
612
- const u = t[h] ?? -1, p = e[h]?.length || 0, y = u <= 0, D = u >= p - 1;
613
- return { isUndoDisabled: y, isRedoDisabled: D };
647
+ addUndoEntry: i,
648
+ removeUndoHistoryForDashboard: o,
649
+ undo: u,
650
+ redo: y,
651
+ getUndoStatus: (g) => {
652
+ const c = t[g] ?? -1, b = e[g]?.length || 0, v = c <= 0, T = c >= b - 1;
653
+ return { isUndoDisabled: v, isRedoDisabled: T };
614
654
  },
615
655
  undoHistory: e,
616
656
  historyIndex: t
617
657
  // (Optional: You might expose undoHistory and historyIndex if needed for debugging)
618
658
  };
619
659
  };
620
- function H({
660
+ function Y({
621
661
  children: e,
622
662
  className: n
623
663
  }) {
@@ -638,15 +678,15 @@ function H({
638
678
  }
639
679
  );
640
680
  }
641
- function An({ className: e }) {
642
- return /* @__PURE__ */ W(H, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
681
+ function Fn({ className: e }) {
682
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
643
683
  /* @__PURE__ */ s("circle", { cx: "12", cy: "12", r: "10" }),
644
684
  /* @__PURE__ */ s("path", { d: "M8 12h8" }),
645
685
  /* @__PURE__ */ s("path", { d: "M12 8v8" })
646
686
  ] });
647
687
  }
648
- function Fn({ className: e }) {
649
- return /* @__PURE__ */ W(H, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
688
+ function Ln({ className: e }) {
689
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
650
690
  /* @__PURE__ */ s("path", { d: "M10 11v6" }),
651
691
  /* @__PURE__ */ s("path", { d: "M14 11v6" }),
652
692
  /* @__PURE__ */ s("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
@@ -654,14 +694,14 @@ function Fn({ className: e }) {
654
694
  /* @__PURE__ */ s("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
655
695
  ] });
656
696
  }
657
- function Ln({ className: e }) {
658
- return /* @__PURE__ */ W(H, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
697
+ function Un({ className: e }) {
698
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
659
699
  /* @__PURE__ */ s("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
660
700
  /* @__PURE__ */ s("path", { d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" })
661
701
  ] });
662
702
  }
663
703
  function Vn({ className: e }) {
664
- return /* @__PURE__ */ W(H, { className: `lucide lucide-grid3x3-icon lucide-grid-3x3 ${e}`, children: [
704
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-grid3x3-icon lucide-grid-3x3 ${e}`, children: [
665
705
  /* @__PURE__ */ s("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
666
706
  /* @__PURE__ */ s("path", { d: "M3 9h18" }),
667
707
  /* @__PURE__ */ s("path", { d: "M3 15h18" }),
@@ -669,16 +709,16 @@ function Vn({ className: e }) {
669
709
  /* @__PURE__ */ s("path", { d: "M15 3v18" })
670
710
  ] });
671
711
  }
672
- function Un({ className: e }) {
673
- return /* @__PURE__ */ W(H, { className: `lucide lucide-monitor-icon lucide-monitor ${e}`, children: [
712
+ function qn({ className: e }) {
713
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-monitor-icon lucide-monitor ${e}`, children: [
674
714
  /* @__PURE__ */ s("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
675
715
  /* @__PURE__ */ s("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
676
716
  /* @__PURE__ */ s("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
677
717
  ] });
678
718
  }
679
- function qn({ className: e }) {
680
- return /* @__PURE__ */ W(
681
- H,
719
+ function zn({ className: e }) {
720
+ return /* @__PURE__ */ $(
721
+ Y,
682
722
  {
683
723
  className: `lucide lucide-monitor-smartphone-icon lucide-monitor-smartphone ${e}`,
684
724
  children: [
@@ -691,8 +731,8 @@ function qn({ className: e }) {
691
731
  );
692
732
  }
693
733
  function ft({ className: e }) {
694
- return /* @__PURE__ */ W(
695
- H,
734
+ return /* @__PURE__ */ $(
735
+ Y,
696
736
  {
697
737
  className: `lucide lucide-circle-arrow-left-icon lucide-circle-arrow-left ${e}`,
698
738
  children: [
@@ -704,8 +744,8 @@ function ft({ className: e }) {
704
744
  );
705
745
  }
706
746
  function ht({ className: e }) {
707
- return /* @__PURE__ */ W(
708
- H,
747
+ return /* @__PURE__ */ $(
748
+ Y,
709
749
  {
710
750
  className: `lucide lucide-circle-arrow-right-icon lucide-circle-arrow-right ${e}`,
711
751
  children: [
@@ -716,15 +756,15 @@ function ht({ className: e }) {
716
756
  }
717
757
  );
718
758
  }
719
- function Xt({ className: e }) {
720
- return /* @__PURE__ */ W(H, { className: `lucide lucide-settings-icon lucide-settings ${e}`, children: [
759
+ function Ht({ className: e }) {
760
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-settings-icon lucide-settings ${e}`, children: [
721
761
  /* @__PURE__ */ s("path", { d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }),
722
762
  /* @__PURE__ */ s("circle", { cx: "12", cy: "12", r: "3" })
723
763
  ] });
724
764
  }
725
765
  function Yn({ className: e }) {
726
- return /* @__PURE__ */ W(
727
- H,
766
+ return /* @__PURE__ */ $(
767
+ Y,
728
768
  {
729
769
  className: `lucide lucide-tablet-smartphone-icon lucide-tablet-smartphone ${e}`,
730
770
  children: [
@@ -736,14 +776,14 @@ function Yn({ className: e }) {
736
776
  );
737
777
  }
738
778
  function gt({ className: e }) {
739
- return /* @__PURE__ */ W(H, { className: `lucide lucide-circle-x-icon lucide-circle-x ${e}`, children: [
779
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-circle-x-icon lucide-circle-x ${e}`, children: [
740
780
  /* @__PURE__ */ s("circle", { cx: "12", cy: "12", r: "10" }),
741
781
  /* @__PURE__ */ s("path", { d: "m15 9-6 6" }),
742
782
  /* @__PURE__ */ s("path", { d: "m9 9 6 6" })
743
783
  ] });
744
784
  }
745
- function zn({ className: e }) {
746
- return /* @__PURE__ */ W(H, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
785
+ function Kn({ className: e }) {
786
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
747
787
  /* @__PURE__ */ s("circle", { cx: "11", cy: "11", r: "8" }),
748
788
  /* @__PURE__ */ s("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
749
789
  /* @__PURE__ */ s("line", { x1: "11", x2: "11", y1: "8", y2: "14" }),
@@ -751,42 +791,42 @@ function zn({ className: e }) {
751
791
  ] });
752
792
  }
753
793
  function Bn({ className: e }) {
754
- return /* @__PURE__ */ W(H, { className: `lucide lucide-zoom-out-icon lucide-zoom-out ${e}`, children: [
794
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-zoom-out-icon lucide-zoom-out ${e}`, children: [
755
795
  /* @__PURE__ */ s("circle", { cx: "11", cy: "11", r: "8" }),
756
796
  /* @__PURE__ */ s("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
757
797
  /* @__PURE__ */ s("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
758
798
  ] });
759
799
  }
760
- function Gt({ className: e }) {
761
- return /* @__PURE__ */ W(H, { className: `lucide lucide-timer-reset-icon lucide-timer-reset ${e}`, children: [
800
+ function Xt({ className: e }) {
801
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-timer-reset-icon lucide-timer-reset ${e}`, children: [
762
802
  /* @__PURE__ */ s("path", { d: "M10 2h4" }),
763
803
  /* @__PURE__ */ s("path", { d: "M12 14v-4" }),
764
804
  /* @__PURE__ */ s("path", { d: "M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6" }),
765
805
  /* @__PURE__ */ s("path", { d: "M9 17H4v5" })
766
806
  ] });
767
807
  }
768
- function Zt({ className: e }) {
769
- return /* @__PURE__ */ W(H, { className: `lucide lucide-undo-icon lucide-undo ${e}`, children: [
808
+ function Gt({ className: e }) {
809
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-undo-icon lucide-undo ${e}`, children: [
770
810
  /* @__PURE__ */ s("path", { d: "M3 7v6h6" }),
771
811
  /* @__PURE__ */ s("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" })
772
812
  ] });
773
813
  }
774
- function Jt({ className: e }) {
775
- return /* @__PURE__ */ W(H, { className: `lucide lucide-redo-icon lucide-redo ${e}`, children: [
814
+ function Zt({ className: e }) {
815
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-redo-icon lucide-redo ${e}`, children: [
776
816
  /* @__PURE__ */ s("path", { d: "M21 7v6h-6" }),
777
817
  /* @__PURE__ */ s("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" })
778
818
  ] });
779
819
  }
780
- function Qt({ className: e }) {
781
- return /* @__PURE__ */ W(H, { className: `lucide lucide-hand-icon lucide-hand ${e}`, children: [
820
+ function Jt({ className: e }) {
821
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-hand-icon lucide-hand ${e}`, children: [
782
822
  /* @__PURE__ */ s("path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
783
823
  /* @__PURE__ */ s("path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
784
824
  /* @__PURE__ */ s("path", { d: "M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8" }),
785
825
  /* @__PURE__ */ s("path", { d: "M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15" })
786
826
  ] });
787
827
  }
788
- function en({ className: e }) {
789
- return /* @__PURE__ */ W(H, { className: `lucide lucide-hand-grab-icon lucide-hand-grab ${e}`, children: [
828
+ function Qt({ className: e }) {
829
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-hand-grab-icon lucide-hand-grab ${e}`, children: [
790
830
  /* @__PURE__ */ s("path", { d: "M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4" }),
791
831
  /* @__PURE__ */ s("path", { d: "M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
792
832
  /* @__PURE__ */ s("path", { d: "M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5" }),
@@ -794,8 +834,8 @@ function en({ className: e }) {
794
834
  /* @__PURE__ */ s("path", { d: "M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0" })
795
835
  ] });
796
836
  }
797
- function tn({ className: e }) {
798
- return /* @__PURE__ */ W(H, { className: `lucide lucide-crosshair-icon lucide-crosshair ${e}`, children: [
837
+ function en({ className: e }) {
838
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-crosshair-icon lucide-crosshair ${e}`, children: [
799
839
  /* @__PURE__ */ s("line", { x1: "22", x2: "18", y1: "12", y2: "12" }),
800
840
  /* @__PURE__ */ s("line", { x1: "6", x2: "2", y1: "12", y2: "12" }),
801
841
  /* @__PURE__ */ s("line", { x1: "12", x2: "12", y1: "6", y2: "2" }),
@@ -803,15 +843,15 @@ function tn({ className: e }) {
803
843
  ] });
804
844
  }
805
845
  function Hn({ className: e }) {
806
- return /* @__PURE__ */ W(H, { className: `lucide lucide-target-icon lucide-target ${e}`, children: [
846
+ return /* @__PURE__ */ $(Y, { className: `lucide lucide-target-icon lucide-target ${e}`, children: [
807
847
  /* @__PURE__ */ s("circle", { cx: "12", cy: "12", r: "10" }),
808
848
  /* @__PURE__ */ s("circle", { cx: "12", cy: "12", r: "6" }),
809
849
  /* @__PURE__ */ s("circle", { cx: "12", cy: "12", r: "2" })
810
850
  ] });
811
851
  }
812
- function nn({ className: e }) {
813
- return /* @__PURE__ */ W(
814
- H,
852
+ function tn({ className: e }) {
853
+ return /* @__PURE__ */ $(
854
+ Y,
815
855
  {
816
856
  className: `lucide lucide-file-question-mark-icon lucide-file-question-mark ${e}`,
817
857
  children: [
@@ -822,60 +862,23 @@ function nn({ className: e }) {
822
862
  }
823
863
  );
824
864
  }
825
- const G = (e, ...n) => [
826
- ...new Set(
827
- [e || "", ...n].join(" ").trim().replace(/\n+/gi, " ").replace(/\s+/gi, " ").split(" ")
828
- )
829
- ].join(" ").trim(), re = (e, n = "color") => {
830
- if (typeof window > "u") return "#FFFFFF";
831
- const t = document.createElement("div");
832
- Array.isArray(e) ? e.forEach((i) => t.classList.add(i)) : e.split(" ").forEach((i) => t.classList.add(i)), t.style.display = "none", document.body.appendChild(t);
833
- const r = window.getComputedStyle(t)[n];
834
- return document.body.removeChild(t), r;
835
- }, Kn = {
836
- primary: re("text-primary", "color"),
837
- secondary: re("text-secondary", "color"),
838
- success: re("text-success", "color"),
839
- danger: re("text-danger", "color"),
840
- warning: re("text-warning", "color"),
841
- info: re("text-info", "color"),
842
- disabled: re("text-disabled", "color"),
843
- neutral: re("text-neutral", "color"),
844
- body: re("text-body", "color")
845
- }, Xn = {
846
- getCssVariableValue: (e) => {
847
- const n = document.documentElement;
848
- return getComputedStyle(n).getPropertyValue(e).trim() || null;
849
- },
850
- setCssVariableValue: (e, n) => {
851
- document.documentElement.style.setProperty(e, n);
852
- },
853
- restoreCssVarsFromSettings: (e) => {
854
- const n = document.documentElement;
855
- e.forEach((t) => {
856
- n.style.setProperty(t.cssProperty, t.value);
857
- });
858
- }
859
- }, mt = (e) => {
860
- const n = `${e}`.split("_");
861
- return n.length > 1 ? n[1].replace(/(\D)(\d+)/, "$1 $2") : "Container";
862
- }, pt = ({
865
+ const mt = ({
863
866
  label: e,
864
867
  className: n,
865
868
  size: t = "medium",
866
869
  value: r,
867
- onChange: i,
868
- onKeyDown: o,
869
- placeholder: a = ""
870
+ onChange: a,
871
+ onKeyDown: i,
872
+ placeholder: o = ""
870
873
  }) => {
871
- const d = st(() => t === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [t]), b = G("flex flex-col mb-4", n || ""), h = `${G(`
874
+ const u = ot(() => t === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [t]), y = G("flex flex-col mb-4", n || ""), g = `${G(`
872
875
  block w-full rounded-md px-3 py-1.5 text-base
873
876
  bg-formfield content-formfield
874
877
  outline-1 -outline-offset-1 outline-primary
875
878
  placeholder:text-disabled
876
879
  focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-200 sm:text-sm/6
877
- `)} ${d}`;
878
- return /* @__PURE__ */ W("div", { className: b, children: [
880
+ `)} ${u}`;
881
+ return /* @__PURE__ */ $("div", { className: y, children: [
879
882
  /* @__PURE__ */ s("label", { htmlFor: e, className: "block text-sm/6 font-medium mb-1.5", children: e }),
880
883
  /* @__PURE__ */ s(
881
884
  "input",
@@ -883,15 +886,15 @@ const G = (e, ...n) => [
883
886
  id: e,
884
887
  type: "text",
885
888
  value: r,
886
- onChange: i,
887
- onKeyDown: (u) => o && o(u),
888
- placeholder: a,
889
- className: h,
889
+ onChange: a,
890
+ onKeyDown: (c) => i && i(c),
891
+ placeholder: o,
892
+ className: g,
890
893
  "aria-label": e
891
894
  }
892
895
  )
893
896
  ] });
894
- }, Se = /* @__PURE__ */ new Map([
897
+ }, Ce = /* @__PURE__ */ new Map([
895
898
  [
896
899
  "normal",
897
900
  "group bg-[category] content-[category] hover:bg-[category] group-hover:bg-[category] focus:outline-[category] focus:outline-offset-[category]"
@@ -906,64 +909,64 @@ function J(e) {
906
909
  tooltip: n,
907
910
  disabled: t,
908
911
  isIconButton: r,
909
- className: i,
910
- buttonType: o,
911
- category: a,
912
- px: d,
913
- py: b,
914
- children: m,
915
- ...h
916
- } = e, u = () => {
917
- const y = e.isIconButton || !1, D = e.category || "primary", g = e.buttonType || "normal", v = e.disabled || !1, w = e.className || "", T = e.font || "semibold", C = Number((e.border || 0) > 0 ? e.border : 0);
918
- let S = (e.borderColor || "").trim();
919
- S = S.length > 0 ? S : "";
920
- const l = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), N = e.shadow || "sm", c = e.shadowHover || "md", f = (e.addCss || "").trim(), M = e.justifyCss || "justify-center";
921
- if (y)
912
+ className: a,
913
+ buttonType: i,
914
+ category: o,
915
+ px: u,
916
+ py: y,
917
+ children: p,
918
+ ...g
919
+ } = e, c = () => {
920
+ const v = e.isIconButton || !1, T = e.category || "primary", m = e.buttonType || "normal", x = e.disabled || !1, C = e.className || "", E = e.font || "semibold", S = Number((e.border || 0) > 0 ? e.border : 0);
921
+ let D = (e.borderColor || "").trim();
922
+ D = D.length > 0 ? D : "";
923
+ const d = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), M = e.shadow || "sm", l = e.shadowHover || "md", h = (e.addCss || "").trim(), f = e.justifyCss || "justify-center";
924
+ if (v)
922
925
  return G(
923
926
  "flex flex-row items-center",
924
- v ? "text-disabled" : `text-${D} hover:brightness-110 cursor-pointer`,
925
- w || ""
927
+ x ? "text-disabled" : `text-${T} hover:brightness-110 cursor-pointer`,
928
+ C || ""
926
929
  );
927
- const $ = [
930
+ const _ = [
928
931
  "relative cursor-pointer",
929
932
  "rounded-sm focus:outline-none focus:ring focus:ring-offset",
930
933
  "transition-all duration-150",
931
934
  "text-sm",
932
- `font-${T}`
935
+ `font-${E}`
933
936
  ];
934
- if (v)
935
- g === "ghost" ? $.push("text-disabled border-disabled cursor-not-allowed") : $.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
937
+ if (x)
938
+ m === "ghost" ? _.push("text-disabled border-disabled cursor-not-allowed") : _.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
936
939
  else {
937
- $.push("cursor-pointer");
938
- let I = "";
939
- Se.has(g) ? I = `${Se.get(g)}` : I = `${Se.get("normal")}`, C < 1 && (I = I.replace("border-[category]", ""));
940
- const E = I.replace(/\[category\]/g, D).trim();
941
- $.push(E);
942
- }
943
- return C > 0 ? ($.push(`border-[${C}px]`), $.push(`border-${S}`)) : ($.push("border-[1px]"), $.push("border-transparent")), l > 0 ? ($.push(`hover:border-[${l}px] group-hover:border-[${l}px]`), $.push(`hover:border-${S} group-hover:border-${S}`)) : $.push("hover:border-[1px] group-hover:border-[1px]"), $.push(`shadow-${N}`), $.push(`hover:shadow-${c} group-hover:shadow-${c}`), f.length > 0 && $.push(f), f.indexOf("hidden") === -1 && $.push("inline-flex"), $.push(M), $.join(" ").trim();
944
- }, p = () => {
945
- const y = e.px || 0.7, D = e.py || 0.25;
940
+ _.push("cursor-pointer");
941
+ let W = "";
942
+ Ce.has(m) ? W = `${Ce.get(m)}` : W = `${Ce.get("normal")}`, S < 1 && (W = W.replace("border-[category]", ""));
943
+ const B = W.replace(/\[category\]/g, T).trim();
944
+ _.push(B);
945
+ }
946
+ return S > 0 ? (_.push(`border-[${S}px]`), _.push(`border-${D}`)) : (_.push("border-[1px]"), _.push("border-transparent")), d > 0 ? (_.push(`hover:border-[${d}px] group-hover:border-[${d}px]`), _.push(`hover:border-${D} group-hover:border-${D}`)) : _.push("hover:border-[1px] group-hover:border-[1px]"), _.push(`shadow-${M}`), _.push(`hover:shadow-${l} group-hover:shadow-${l}`), h.length > 0 && _.push(h), h.indexOf("hidden") === -1 && _.push("inline-flex"), _.push(f), _.join(" ").trim();
947
+ }, b = () => {
948
+ const v = e.px || 0.7, T = e.py || 0.25;
946
949
  return {
947
- padding: r ? 0 : `${D}rem ${y}rem `
950
+ padding: r ? 0 : `${T}rem ${v}rem `
948
951
  };
949
952
  };
950
- return /* @__PURE__ */ s("button", { type: "button", disabled: t, className: u(), style: p(), ...h, children: m });
953
+ return /* @__PURE__ */ s("button", { type: "button", disabled: t, className: c(), style: b(), ...g, children: p });
951
954
  }
952
- const rn = (e) => e.direction === "row" ? G("flex flex-row items-center gap-2", e.classNames || "") : G("flex flex-col gap-2 w-full", e.classNames || "");
953
- function on(e) {
954
- const { children: n, testId: t, classNames: r, direction: i, ...o } = e, a = rn(e);
955
- return /* @__PURE__ */ s("div", { "data-testid": t || "not-set", className: a, ...o, children: n });
955
+ const nn = (e) => e.direction === "row" ? G("flex flex-row items-center gap-2", e.classNames || "") : G("flex flex-col gap-2 w-full", e.classNames || "");
956
+ function rn(e) {
957
+ const { children: n, testId: t, classNames: r, direction: a, ...i } = e, o = nn(e);
958
+ return /* @__PURE__ */ s("div", { "data-testid": t || "not-set", className: o, ...i, children: n });
956
959
  }
957
- const Gn = le(
960
+ const Xn = le(
958
961
  (e, n) => {
959
- const { classNames: t, innerClass: r, ...i } = e, o = G(t || "", "w-full"), a = G(
962
+ const { classNames: t, innerClass: r, ...a } = e, i = G(t || "", "w-full"), o = G(
960
963
  `w-full flex overflow-hidden justify-between items-center gap-0
961
964
  rounded-md border`,
962
965
  r || ""
963
966
  );
964
- return /* @__PURE__ */ s(on, { direction: "row", classNames: o, ...i, children: /* @__PURE__ */ s("div", { className: a, children: e.children }) });
967
+ return /* @__PURE__ */ s(rn, { direction: "row", classNames: i, ...a, children: /* @__PURE__ */ s("div", { className: o, children: e.children }) });
965
968
  }
966
- ), Zn = le((e, n) => /* @__PURE__ */ s(
969
+ ), Gn = le((e, n) => /* @__PURE__ */ s(
967
970
  "div",
968
971
  {
969
972
  "data-testid": e.testId || "not-set",
@@ -974,7 +977,7 @@ const Gn = le(
974
977
  },
975
978
  children: e.children
976
979
  }
977
- )), Jn = le(
980
+ )), Zn = le(
978
981
  (e, n) => /* @__PURE__ */ s(
979
982
  "div",
980
983
  {
@@ -983,7 +986,7 @@ const Gn = le(
983
986
  children: e.children
984
987
  }
985
988
  )
986
- ), Qn = le((e, n) => /* @__PURE__ */ s(
989
+ ), Jn = le((e, n) => /* @__PURE__ */ s(
987
990
  "div",
988
991
  {
989
992
  "data-testid": e.testId || "not-set",
@@ -998,105 +1001,105 @@ const Gn = le(
998
1001
  function an(e) {
999
1002
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1000
1003
  }
1001
- var fe = { exports: {} }, De = {}, pe = { exports: {} }, ye = { exports: {} }, U = {};
1002
- var Ve;
1003
- function sn() {
1004
- if (Ve) return U;
1005
- Ve = 1;
1006
- var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
1007
- function C(l) {
1008
- if (typeof l == "object" && l !== null) {
1009
- var N = l.$$typeof;
1010
- switch (N) {
1004
+ var ue = { exports: {} }, Se = {}, me = { exports: {} }, pe = { exports: {} }, U = {};
1005
+ var Le;
1006
+ function on() {
1007
+ if (Le) return U;
1008
+ Le = 1;
1009
+ var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, o = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, u = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, y = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, p = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, c = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, b = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, v = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, T = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, m = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, x = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, E = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
1010
+ function S(d) {
1011
+ if (typeof d == "object" && d !== null) {
1012
+ var M = d.$$typeof;
1013
+ switch (M) {
1011
1014
  case n:
1012
- switch (l = l.type, l) {
1013
- case b:
1014
- case m:
1015
+ switch (d = d.type, d) {
1016
+ case y:
1017
+ case p:
1015
1018
  case r:
1016
- case o:
1017
1019
  case i:
1018
- case u:
1019
- return l;
1020
+ case a:
1021
+ case c:
1022
+ return d;
1020
1023
  default:
1021
- switch (l = l && l.$$typeof, l) {
1022
- case d:
1023
- case h:
1024
- case D:
1025
- case y:
1026
- case a:
1027
- return l;
1024
+ switch (d = d && d.$$typeof, d) {
1025
+ case u:
1026
+ case g:
1027
+ case T:
1028
+ case v:
1029
+ case o:
1030
+ return d;
1028
1031
  default:
1029
- return N;
1032
+ return M;
1030
1033
  }
1031
1034
  }
1032
1035
  case t:
1033
- return N;
1036
+ return M;
1034
1037
  }
1035
1038
  }
1036
1039
  }
1037
- function S(l) {
1038
- return C(l) === m;
1039
- }
1040
- return U.AsyncMode = b, U.ConcurrentMode = m, U.ContextConsumer = d, U.ContextProvider = a, U.Element = n, U.ForwardRef = h, U.Fragment = r, U.Lazy = D, U.Memo = y, U.Portal = t, U.Profiler = o, U.StrictMode = i, U.Suspense = u, U.isAsyncMode = function(l) {
1041
- return S(l) || C(l) === b;
1042
- }, U.isConcurrentMode = S, U.isContextConsumer = function(l) {
1043
- return C(l) === d;
1044
- }, U.isContextProvider = function(l) {
1045
- return C(l) === a;
1046
- }, U.isElement = function(l) {
1047
- return typeof l == "object" && l !== null && l.$$typeof === n;
1048
- }, U.isForwardRef = function(l) {
1049
- return C(l) === h;
1050
- }, U.isFragment = function(l) {
1051
- return C(l) === r;
1052
- }, U.isLazy = function(l) {
1053
- return C(l) === D;
1054
- }, U.isMemo = function(l) {
1055
- return C(l) === y;
1056
- }, U.isPortal = function(l) {
1057
- return C(l) === t;
1058
- }, U.isProfiler = function(l) {
1059
- return C(l) === o;
1060
- }, U.isStrictMode = function(l) {
1061
- return C(l) === i;
1062
- }, U.isSuspense = function(l) {
1063
- return C(l) === u;
1064
- }, U.isValidElementType = function(l) {
1065
- return typeof l == "string" || typeof l == "function" || l === r || l === m || l === o || l === i || l === u || l === p || typeof l == "object" && l !== null && (l.$$typeof === D || l.$$typeof === y || l.$$typeof === a || l.$$typeof === d || l.$$typeof === h || l.$$typeof === v || l.$$typeof === w || l.$$typeof === T || l.$$typeof === g);
1066
- }, U.typeOf = C, U;
1040
+ function D(d) {
1041
+ return S(d) === p;
1042
+ }
1043
+ return U.AsyncMode = y, U.ConcurrentMode = p, U.ContextConsumer = u, U.ContextProvider = o, U.Element = n, U.ForwardRef = g, U.Fragment = r, U.Lazy = T, U.Memo = v, U.Portal = t, U.Profiler = i, U.StrictMode = a, U.Suspense = c, U.isAsyncMode = function(d) {
1044
+ return D(d) || S(d) === y;
1045
+ }, U.isConcurrentMode = D, U.isContextConsumer = function(d) {
1046
+ return S(d) === u;
1047
+ }, U.isContextProvider = function(d) {
1048
+ return S(d) === o;
1049
+ }, U.isElement = function(d) {
1050
+ return typeof d == "object" && d !== null && d.$$typeof === n;
1051
+ }, U.isForwardRef = function(d) {
1052
+ return S(d) === g;
1053
+ }, U.isFragment = function(d) {
1054
+ return S(d) === r;
1055
+ }, U.isLazy = function(d) {
1056
+ return S(d) === T;
1057
+ }, U.isMemo = function(d) {
1058
+ return S(d) === v;
1059
+ }, U.isPortal = function(d) {
1060
+ return S(d) === t;
1061
+ }, U.isProfiler = function(d) {
1062
+ return S(d) === i;
1063
+ }, U.isStrictMode = function(d) {
1064
+ return S(d) === a;
1065
+ }, U.isSuspense = function(d) {
1066
+ return S(d) === c;
1067
+ }, U.isValidElementType = function(d) {
1068
+ return typeof d == "string" || typeof d == "function" || d === r || d === p || d === i || d === a || d === c || d === b || typeof d == "object" && d !== null && (d.$$typeof === T || d.$$typeof === v || d.$$typeof === o || d.$$typeof === u || d.$$typeof === g || d.$$typeof === x || d.$$typeof === C || d.$$typeof === E || d.$$typeof === m);
1069
+ }, U.typeOf = S, U;
1067
1070
  }
1068
- var q = {};
1071
+ var V = {};
1069
1072
  var Ue;
1070
- function cn() {
1073
+ function sn() {
1071
1074
  return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && (function() {
1072
- var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, i = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, o = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, a = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, m = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, g = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, T = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
1073
- function C(_) {
1074
- return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1075
- _ === r || _ === m || _ === o || _ === i || _ === u || _ === p || typeof _ == "object" && _ !== null && (_.$$typeof === D || _.$$typeof === y || _.$$typeof === a || _.$$typeof === d || _.$$typeof === h || _.$$typeof === v || _.$$typeof === w || _.$$typeof === T || _.$$typeof === g);
1076
- }
1077
- function S(_) {
1078
- if (typeof _ == "object" && _ !== null) {
1079
- var te = _.$$typeof;
1075
+ var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, a = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, o = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, u = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, y = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, p = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, c = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, b = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, v = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, T = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, m = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, x = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, E = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
1076
+ function S(N) {
1077
+ return typeof N == "string" || typeof N == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1078
+ N === r || N === p || N === i || N === a || N === c || N === b || typeof N == "object" && N !== null && (N.$$typeof === T || N.$$typeof === v || N.$$typeof === o || N.$$typeof === u || N.$$typeof === g || N.$$typeof === x || N.$$typeof === C || N.$$typeof === E || N.$$typeof === m);
1079
+ }
1080
+ function D(N) {
1081
+ if (typeof N == "object" && N !== null) {
1082
+ var te = N.$$typeof;
1080
1083
  switch (te) {
1081
1084
  case n:
1082
- var me = _.type;
1083
- switch (me) {
1084
- case b:
1085
- case m:
1085
+ var ge = N.type;
1086
+ switch (ge) {
1087
+ case y:
1088
+ case p:
1086
1089
  case r:
1087
- case o:
1088
1090
  case i:
1089
- case u:
1090
- return me;
1091
+ case a:
1092
+ case c:
1093
+ return ge;
1091
1094
  default:
1092
- var je = me && me.$$typeof;
1093
- switch (je) {
1094
- case d:
1095
- case h:
1096
- case D:
1097
- case y:
1098
- case a:
1099
- return je;
1095
+ var ke = ge && ge.$$typeof;
1096
+ switch (ke) {
1097
+ case u:
1098
+ case g:
1099
+ case T:
1100
+ case v:
1101
+ case o:
1102
+ return ke;
1100
1103
  default:
1101
1104
  return te;
1102
1105
  }
@@ -1106,432 +1109,432 @@ function cn() {
1106
1109
  }
1107
1110
  }
1108
1111
  }
1109
- var l = b, N = m, c = d, f = a, M = n, $ = h, I = r, E = D, z = y, X = t, Q = o, K = i, ee = u, se = !1;
1110
- function de(_) {
1111
- return se || (se = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), x(_) || S(_) === b;
1112
+ var d = y, M = p, l = u, h = o, f = n, _ = g, W = r, B = T, H = v, X = t, Q = i, K = a, ee = c, oe = !1;
1113
+ function de(N) {
1114
+ return oe || (oe = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), w(N) || D(N) === y;
1112
1115
  }
1113
- function x(_) {
1114
- return S(_) === m;
1116
+ function w(N) {
1117
+ return D(N) === p;
1115
1118
  }
1116
- function P(_) {
1117
- return S(_) === d;
1119
+ function P(N) {
1120
+ return D(N) === u;
1118
1121
  }
1119
- function A(_) {
1120
- return S(_) === a;
1122
+ function j(N) {
1123
+ return D(N) === o;
1121
1124
  }
1122
- function k(_) {
1123
- return typeof _ == "object" && _ !== null && _.$$typeof === n;
1125
+ function O(N) {
1126
+ return typeof N == "object" && N !== null && N.$$typeof === n;
1124
1127
  }
1125
- function O(_) {
1126
- return S(_) === h;
1128
+ function I(N) {
1129
+ return D(N) === g;
1127
1130
  }
1128
- function F(_) {
1129
- return S(_) === r;
1131
+ function A(N) {
1132
+ return D(N) === r;
1130
1133
  }
1131
- function R(_) {
1132
- return S(_) === D;
1134
+ function R(N) {
1135
+ return D(N) === T;
1133
1136
  }
1134
- function j(_) {
1135
- return S(_) === y;
1137
+ function k(N) {
1138
+ return D(N) === v;
1136
1139
  }
1137
- function L(_) {
1138
- return S(_) === t;
1140
+ function F(N) {
1141
+ return D(N) === t;
1139
1142
  }
1140
- function Y(_) {
1141
- return S(_) === o;
1143
+ function q(N) {
1144
+ return D(N) === i;
1142
1145
  }
1143
- function V(_) {
1144
- return S(_) === i;
1146
+ function L(N) {
1147
+ return D(N) === a;
1145
1148
  }
1146
- function Z(_) {
1147
- return S(_) === u;
1149
+ function Z(N) {
1150
+ return D(N) === c;
1148
1151
  }
1149
- q.AsyncMode = l, q.ConcurrentMode = N, q.ContextConsumer = c, q.ContextProvider = f, q.Element = M, q.ForwardRef = $, q.Fragment = I, q.Lazy = E, q.Memo = z, q.Portal = X, q.Profiler = Q, q.StrictMode = K, q.Suspense = ee, q.isAsyncMode = de, q.isConcurrentMode = x, q.isContextConsumer = P, q.isContextProvider = A, q.isElement = k, q.isForwardRef = O, q.isFragment = F, q.isLazy = R, q.isMemo = j, q.isPortal = L, q.isProfiler = Y, q.isStrictMode = V, q.isSuspense = Z, q.isValidElementType = C, q.typeOf = S;
1150
- })()), q;
1152
+ V.AsyncMode = d, V.ConcurrentMode = M, V.ContextConsumer = l, V.ContextProvider = h, V.Element = f, V.ForwardRef = _, V.Fragment = W, V.Lazy = B, V.Memo = H, V.Portal = X, V.Profiler = Q, V.StrictMode = K, V.Suspense = ee, V.isAsyncMode = de, V.isConcurrentMode = w, V.isContextConsumer = P, V.isContextProvider = j, V.isElement = O, V.isForwardRef = I, V.isFragment = A, V.isLazy = R, V.isMemo = k, V.isPortal = F, V.isProfiler = q, V.isStrictMode = L, V.isSuspense = Z, V.isValidElementType = S, V.typeOf = D;
1153
+ })()), V;
1151
1154
  }
1152
- var qe;
1153
- function yt() {
1154
- return qe || (qe = 1, process.env.NODE_ENV === "production" ? ye.exports = sn() : ye.exports = cn()), ye.exports;
1155
+ var Ve;
1156
+ function pt() {
1157
+ return Ve || (Ve = 1, process.env.NODE_ENV === "production" ? pe.exports = on() : pe.exports = sn()), pe.exports;
1155
1158
  }
1156
- var Te, Ye;
1159
+ var De, qe;
1157
1160
  function ln() {
1158
- if (Ye) return Te;
1159
- Ye = 1;
1161
+ if (qe) return De;
1162
+ qe = 1;
1160
1163
  var e = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
1161
- function r(o) {
1162
- if (o == null)
1164
+ function r(i) {
1165
+ if (i == null)
1163
1166
  throw new TypeError("Object.assign cannot be called with null or undefined");
1164
- return Object(o);
1167
+ return Object(i);
1165
1168
  }
1166
- function i() {
1169
+ function a() {
1167
1170
  try {
1168
1171
  if (!Object.assign)
1169
1172
  return !1;
1170
- var o = new String("abc");
1171
- if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
1173
+ var i = new String("abc");
1174
+ if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
1172
1175
  return !1;
1173
- for (var a = {}, d = 0; d < 10; d++)
1174
- a["_" + String.fromCharCode(d)] = d;
1175
- var b = Object.getOwnPropertyNames(a).map(function(h) {
1176
- return a[h];
1176
+ for (var o = {}, u = 0; u < 10; u++)
1177
+ o["_" + String.fromCharCode(u)] = u;
1178
+ var y = Object.getOwnPropertyNames(o).map(function(g) {
1179
+ return o[g];
1177
1180
  });
1178
- if (b.join("") !== "0123456789")
1181
+ if (y.join("") !== "0123456789")
1179
1182
  return !1;
1180
- var m = {};
1181
- return "abcdefghijklmnopqrst".split("").forEach(function(h) {
1182
- m[h] = h;
1183
- }), Object.keys(Object.assign({}, m)).join("") === "abcdefghijklmnopqrst";
1183
+ var p = {};
1184
+ return "abcdefghijklmnopqrst".split("").forEach(function(g) {
1185
+ p[g] = g;
1186
+ }), Object.keys(Object.assign({}, p)).join("") === "abcdefghijklmnopqrst";
1184
1187
  } catch {
1185
1188
  return !1;
1186
1189
  }
1187
1190
  }
1188
- return Te = i() ? Object.assign : function(o, a) {
1189
- for (var d, b = r(o), m, h = 1; h < arguments.length; h++) {
1190
- d = Object(arguments[h]);
1191
- for (var u in d)
1192
- n.call(d, u) && (b[u] = d[u]);
1191
+ return De = a() ? Object.assign : function(i, o) {
1192
+ for (var u, y = r(i), p, g = 1; g < arguments.length; g++) {
1193
+ u = Object(arguments[g]);
1194
+ for (var c in u)
1195
+ n.call(u, c) && (y[c] = u[c]);
1193
1196
  if (e) {
1194
- m = e(d);
1195
- for (var p = 0; p < m.length; p++)
1196
- t.call(d, m[p]) && (b[m[p]] = d[m[p]]);
1197
+ p = e(u);
1198
+ for (var b = 0; b < p.length; b++)
1199
+ t.call(u, p[b]) && (y[p[b]] = u[p[b]]);
1197
1200
  }
1198
1201
  }
1199
- return b;
1200
- }, Te;
1202
+ return y;
1203
+ }, De;
1201
1204
  }
1202
- var Ee, ze;
1203
- function Oe() {
1204
- if (ze) return Ee;
1205
+ var Te, ze;
1206
+ function Ie() {
1207
+ if (ze) return Te;
1205
1208
  ze = 1;
1206
1209
  var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
1207
- return Ee = e, Ee;
1210
+ return Te = e, Te;
1208
1211
  }
1209
- var Ne, Be;
1210
- function bt() {
1211
- return Be || (Be = 1, Ne = Function.call.bind(Object.prototype.hasOwnProperty)), Ne;
1212
+ var Ee, Ye;
1213
+ function yt() {
1214
+ return Ye || (Ye = 1, Ee = Function.call.bind(Object.prototype.hasOwnProperty)), Ee;
1212
1215
  }
1213
- var _e, He;
1216
+ var Ne, Ke;
1214
1217
  function dn() {
1215
- if (He) return _e;
1216
- He = 1;
1218
+ if (Ke) return Ne;
1219
+ Ke = 1;
1217
1220
  var e = function() {
1218
1221
  };
1219
1222
  if (process.env.NODE_ENV !== "production") {
1220
- var n = /* @__PURE__ */ Oe(), t = {}, r = /* @__PURE__ */ bt();
1221
- e = function(o) {
1222
- var a = "Warning: " + o;
1223
- typeof console < "u" && console.error(a);
1223
+ var n = /* @__PURE__ */ Ie(), t = {}, r = /* @__PURE__ */ yt();
1224
+ e = function(i) {
1225
+ var o = "Warning: " + i;
1226
+ typeof console < "u" && console.error(o);
1224
1227
  try {
1225
- throw new Error(a);
1228
+ throw new Error(o);
1226
1229
  } catch {
1227
1230
  }
1228
1231
  };
1229
1232
  }
1230
- function i(o, a, d, b, m) {
1233
+ function a(i, o, u, y, p) {
1231
1234
  if (process.env.NODE_ENV !== "production") {
1232
- for (var h in o)
1233
- if (r(o, h)) {
1234
- var u;
1235
+ for (var g in i)
1236
+ if (r(i, g)) {
1237
+ var c;
1235
1238
  try {
1236
- if (typeof o[h] != "function") {
1237
- var p = Error(
1238
- (b || "React class") + ": " + d + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
1239
+ if (typeof i[g] != "function") {
1240
+ var b = Error(
1241
+ (y || "React class") + ": " + u + " type `" + g + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[g] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
1239
1242
  );
1240
- throw p.name = "Invariant Violation", p;
1243
+ throw b.name = "Invariant Violation", b;
1241
1244
  }
1242
- u = o[h](a, h, b, d, null, n);
1243
- } catch (D) {
1244
- u = D;
1245
+ c = i[g](o, g, y, u, null, n);
1246
+ } catch (T) {
1247
+ c = T;
1245
1248
  }
1246
- if (u && !(u instanceof Error) && e(
1247
- (b || "React class") + ": type specification of " + d + " `" + h + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
1248
- ), u instanceof Error && !(u.message in t)) {
1249
- t[u.message] = !0;
1250
- var y = m ? m() : "";
1249
+ if (c && !(c instanceof Error) && e(
1250
+ (y || "React class") + ": type specification of " + u + " `" + g + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof c + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
1251
+ ), c instanceof Error && !(c.message in t)) {
1252
+ t[c.message] = !0;
1253
+ var v = p ? p() : "";
1251
1254
  e(
1252
- "Failed " + d + " type: " + u.message + (y ?? "")
1255
+ "Failed " + u + " type: " + c.message + (v ?? "")
1253
1256
  );
1254
1257
  }
1255
1258
  }
1256
1259
  }
1257
1260
  }
1258
- return i.resetWarningCache = function() {
1261
+ return a.resetWarningCache = function() {
1259
1262
  process.env.NODE_ENV !== "production" && (t = {});
1260
- }, _e = i, _e;
1263
+ }, Ne = a, Ne;
1261
1264
  }
1262
- var Me, Ke;
1263
- function un() {
1264
- if (Ke) return Me;
1265
- Ke = 1;
1266
- var e = yt(), n = ln(), t = /* @__PURE__ */ Oe(), r = /* @__PURE__ */ bt(), i = /* @__PURE__ */ dn(), o = function() {
1265
+ var _e, Be;
1266
+ function cn() {
1267
+ if (Be) return _e;
1268
+ Be = 1;
1269
+ var e = pt(), n = ln(), t = /* @__PURE__ */ Ie(), r = /* @__PURE__ */ yt(), a = /* @__PURE__ */ dn(), i = function() {
1267
1270
  };
1268
- process.env.NODE_ENV !== "production" && (o = function(d) {
1269
- var b = "Warning: " + d;
1270
- typeof console < "u" && console.error(b);
1271
+ process.env.NODE_ENV !== "production" && (i = function(u) {
1272
+ var y = "Warning: " + u;
1273
+ typeof console < "u" && console.error(y);
1271
1274
  try {
1272
- throw new Error(b);
1275
+ throw new Error(y);
1273
1276
  } catch {
1274
1277
  }
1275
1278
  });
1276
- function a() {
1279
+ function o() {
1277
1280
  return null;
1278
1281
  }
1279
- return Me = function(d, b) {
1280
- var m = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
1281
- function u(x) {
1282
- var P = x && (m && x[m] || x[h]);
1282
+ return _e = function(u, y) {
1283
+ var p = typeof Symbol == "function" && Symbol.iterator, g = "@@iterator";
1284
+ function c(w) {
1285
+ var P = w && (p && w[p] || w[g]);
1283
1286
  if (typeof P == "function")
1284
1287
  return P;
1285
1288
  }
1286
- var p = "<<anonymous>>", y = {
1287
- array: w("array"),
1288
- bigint: w("bigint"),
1289
- bool: w("boolean"),
1290
- func: w("function"),
1291
- number: w("number"),
1292
- object: w("object"),
1293
- string: w("string"),
1294
- symbol: w("symbol"),
1295
- any: T(),
1296
- arrayOf: C,
1297
- element: S(),
1298
- elementType: l(),
1299
- instanceOf: N,
1300
- node: $(),
1301
- objectOf: f,
1302
- oneOf: c,
1303
- oneOfType: M,
1304
- shape: E,
1305
- exact: z
1289
+ var b = "<<anonymous>>", v = {
1290
+ array: C("array"),
1291
+ bigint: C("bigint"),
1292
+ bool: C("boolean"),
1293
+ func: C("function"),
1294
+ number: C("number"),
1295
+ object: C("object"),
1296
+ string: C("string"),
1297
+ symbol: C("symbol"),
1298
+ any: E(),
1299
+ arrayOf: S,
1300
+ element: D(),
1301
+ elementType: d(),
1302
+ instanceOf: M,
1303
+ node: _(),
1304
+ objectOf: h,
1305
+ oneOf: l,
1306
+ oneOfType: f,
1307
+ shape: B,
1308
+ exact: H
1306
1309
  };
1307
- function D(x, P) {
1308
- return x === P ? x !== 0 || 1 / x === 1 / P : x !== x && P !== P;
1310
+ function T(w, P) {
1311
+ return w === P ? w !== 0 || 1 / w === 1 / P : w !== w && P !== P;
1309
1312
  }
1310
- function g(x, P) {
1311
- this.message = x, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
1313
+ function m(w, P) {
1314
+ this.message = w, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
1312
1315
  }
1313
- g.prototype = Error.prototype;
1314
- function v(x) {
1316
+ m.prototype = Error.prototype;
1317
+ function x(w) {
1315
1318
  if (process.env.NODE_ENV !== "production")
1316
- var P = {}, A = 0;
1317
- function k(F, R, j, L, Y, V, Z) {
1318
- if (L = L || p, V = V || j, Z !== t) {
1319
- if (b) {
1320
- var _ = new Error(
1319
+ var P = {}, j = 0;
1320
+ function O(A, R, k, F, q, L, Z) {
1321
+ if (F = F || b, L = L || k, Z !== t) {
1322
+ if (y) {
1323
+ var N = new Error(
1321
1324
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
1322
1325
  );
1323
- throw _.name = "Invariant Violation", _;
1326
+ throw N.name = "Invariant Violation", N;
1324
1327
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
1325
- var te = L + ":" + j;
1328
+ var te = F + ":" + k;
1326
1329
  !P[te] && // Avoid spamming the console because they are often not actionable except for lib authors
1327
- A < 3 && (o(
1328
- "You are manually calling a React.PropTypes validation function for the `" + V + "` prop on `" + L + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
1329
- ), P[te] = !0, A++);
1330
+ j < 3 && (i(
1331
+ "You are manually calling a React.PropTypes validation function for the `" + L + "` prop on `" + F + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
1332
+ ), P[te] = !0, j++);
1330
1333
  }
1331
1334
  }
1332
- return R[j] == null ? F ? R[j] === null ? new g("The " + Y + " `" + V + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new g("The " + Y + " `" + V + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : x(R, j, L, Y, V);
1335
+ return R[k] == null ? A ? R[k] === null ? new m("The " + q + " `" + L + "` is marked as required " + ("in `" + F + "`, but its value is `null`.")) : new m("The " + q + " `" + L + "` is marked as required in " + ("`" + F + "`, but its value is `undefined`.")) : null : w(R, k, F, q, L);
1333
1336
  }
1334
- var O = k.bind(null, !1);
1335
- return O.isRequired = k.bind(null, !0), O;
1336
- }
1337
- function w(x) {
1338
- function P(A, k, O, F, R, j) {
1339
- var L = A[k], Y = K(L);
1340
- if (Y !== x) {
1341
- var V = ee(L);
1342
- return new g(
1343
- "Invalid " + F + " `" + R + "` of type " + ("`" + V + "` supplied to `" + O + "`, expected ") + ("`" + x + "`."),
1344
- { expectedType: x }
1337
+ var I = O.bind(null, !1);
1338
+ return I.isRequired = O.bind(null, !0), I;
1339
+ }
1340
+ function C(w) {
1341
+ function P(j, O, I, A, R, k) {
1342
+ var F = j[O], q = K(F);
1343
+ if (q !== w) {
1344
+ var L = ee(F);
1345
+ return new m(
1346
+ "Invalid " + A + " `" + R + "` of type " + ("`" + L + "` supplied to `" + I + "`, expected ") + ("`" + w + "`."),
1347
+ { expectedType: w }
1345
1348
  );
1346
1349
  }
1347
1350
  return null;
1348
1351
  }
1349
- return v(P);
1350
- }
1351
- function T() {
1352
- return v(a);
1353
- }
1354
- function C(x) {
1355
- function P(A, k, O, F, R) {
1356
- if (typeof x != "function")
1357
- return new g("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside arrayOf.");
1358
- var j = A[k];
1359
- if (!Array.isArray(j)) {
1360
- var L = K(j);
1361
- return new g("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an array."));
1352
+ return x(P);
1353
+ }
1354
+ function E() {
1355
+ return x(o);
1356
+ }
1357
+ function S(w) {
1358
+ function P(j, O, I, A, R) {
1359
+ if (typeof w != "function")
1360
+ return new m("Property `" + R + "` of component `" + I + "` has invalid PropType notation inside arrayOf.");
1361
+ var k = j[O];
1362
+ if (!Array.isArray(k)) {
1363
+ var F = K(k);
1364
+ return new m("Invalid " + A + " `" + R + "` of type " + ("`" + F + "` supplied to `" + I + "`, expected an array."));
1362
1365
  }
1363
- for (var Y = 0; Y < j.length; Y++) {
1364
- var V = x(j, Y, O, F, R + "[" + Y + "]", t);
1365
- if (V instanceof Error)
1366
- return V;
1366
+ for (var q = 0; q < k.length; q++) {
1367
+ var L = w(k, q, I, A, R + "[" + q + "]", t);
1368
+ if (L instanceof Error)
1369
+ return L;
1367
1370
  }
1368
1371
  return null;
1369
1372
  }
1370
- return v(P);
1371
- }
1372
- function S() {
1373
- function x(P, A, k, O, F) {
1374
- var R = P[A];
1375
- if (!d(R)) {
1376
- var j = K(R);
1377
- return new g("Invalid " + O + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement."));
1373
+ return x(P);
1374
+ }
1375
+ function D() {
1376
+ function w(P, j, O, I, A) {
1377
+ var R = P[j];
1378
+ if (!u(R)) {
1379
+ var k = K(R);
1380
+ return new m("Invalid " + I + " `" + A + "` of type " + ("`" + k + "` supplied to `" + O + "`, expected a single ReactElement."));
1378
1381
  }
1379
1382
  return null;
1380
1383
  }
1381
- return v(x);
1384
+ return x(w);
1382
1385
  }
1383
- function l() {
1384
- function x(P, A, k, O, F) {
1385
- var R = P[A];
1386
+ function d() {
1387
+ function w(P, j, O, I, A) {
1388
+ var R = P[j];
1386
1389
  if (!e.isValidElementType(R)) {
1387
- var j = K(R);
1388
- return new g("Invalid " + O + " `" + F + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement type."));
1390
+ var k = K(R);
1391
+ return new m("Invalid " + I + " `" + A + "` of type " + ("`" + k + "` supplied to `" + O + "`, expected a single ReactElement type."));
1389
1392
  }
1390
1393
  return null;
1391
1394
  }
1392
- return v(x);
1395
+ return x(w);
1393
1396
  }
1394
- function N(x) {
1395
- function P(A, k, O, F, R) {
1396
- if (!(A[k] instanceof x)) {
1397
- var j = x.name || p, L = de(A[k]);
1398
- return new g("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected ") + ("instance of `" + j + "`."));
1397
+ function M(w) {
1398
+ function P(j, O, I, A, R) {
1399
+ if (!(j[O] instanceof w)) {
1400
+ var k = w.name || b, F = de(j[O]);
1401
+ return new m("Invalid " + A + " `" + R + "` of type " + ("`" + F + "` supplied to `" + I + "`, expected ") + ("instance of `" + k + "`."));
1399
1402
  }
1400
1403
  return null;
1401
1404
  }
1402
- return v(P);
1405
+ return x(P);
1403
1406
  }
1404
- function c(x) {
1405
- if (!Array.isArray(x))
1406
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
1407
+ function l(w) {
1408
+ if (!Array.isArray(w))
1409
+ return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
1407
1410
  "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
1408
- ) : o("Invalid argument supplied to oneOf, expected an array.")), a;
1409
- function P(A, k, O, F, R) {
1410
- for (var j = A[k], L = 0; L < x.length; L++)
1411
- if (D(j, x[L]))
1411
+ ) : i("Invalid argument supplied to oneOf, expected an array.")), o;
1412
+ function P(j, O, I, A, R) {
1413
+ for (var k = j[O], F = 0; F < w.length; F++)
1414
+ if (T(k, w[F]))
1412
1415
  return null;
1413
- var Y = JSON.stringify(x, function(Z, _) {
1414
- var te = ee(_);
1415
- return te === "symbol" ? String(_) : _;
1416
+ var q = JSON.stringify(w, function(Z, N) {
1417
+ var te = ee(N);
1418
+ return te === "symbol" ? String(N) : N;
1416
1419
  });
1417
- return new g("Invalid " + F + " `" + R + "` of value `" + String(j) + "` " + ("supplied to `" + O + "`, expected one of " + Y + "."));
1420
+ return new m("Invalid " + A + " `" + R + "` of value `" + String(k) + "` " + ("supplied to `" + I + "`, expected one of " + q + "."));
1418
1421
  }
1419
- return v(P);
1420
- }
1421
- function f(x) {
1422
- function P(A, k, O, F, R) {
1423
- if (typeof x != "function")
1424
- return new g("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside objectOf.");
1425
- var j = A[k], L = K(j);
1426
- if (L !== "object")
1427
- return new g("Invalid " + F + " `" + R + "` of type " + ("`" + L + "` supplied to `" + O + "`, expected an object."));
1428
- for (var Y in j)
1429
- if (r(j, Y)) {
1430
- var V = x(j, Y, O, F, R + "." + Y, t);
1431
- if (V instanceof Error)
1432
- return V;
1422
+ return x(P);
1423
+ }
1424
+ function h(w) {
1425
+ function P(j, O, I, A, R) {
1426
+ if (typeof w != "function")
1427
+ return new m("Property `" + R + "` of component `" + I + "` has invalid PropType notation inside objectOf.");
1428
+ var k = j[O], F = K(k);
1429
+ if (F !== "object")
1430
+ return new m("Invalid " + A + " `" + R + "` of type " + ("`" + F + "` supplied to `" + I + "`, expected an object."));
1431
+ for (var q in k)
1432
+ if (r(k, q)) {
1433
+ var L = w(k, q, I, A, R + "." + q, t);
1434
+ if (L instanceof Error)
1435
+ return L;
1433
1436
  }
1434
1437
  return null;
1435
1438
  }
1436
- return v(P);
1437
- }
1438
- function M(x) {
1439
- if (!Array.isArray(x))
1440
- return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), a;
1441
- for (var P = 0; P < x.length; P++) {
1442
- var A = x[P];
1443
- if (typeof A != "function")
1444
- return o(
1445
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + se(A) + " at index " + P + "."
1446
- ), a;
1439
+ return x(P);
1440
+ }
1441
+ function f(w) {
1442
+ if (!Array.isArray(w))
1443
+ return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), o;
1444
+ for (var P = 0; P < w.length; P++) {
1445
+ var j = w[P];
1446
+ if (typeof j != "function")
1447
+ return i(
1448
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + oe(j) + " at index " + P + "."
1449
+ ), o;
1447
1450
  }
1448
- function k(O, F, R, j, L) {
1449
- for (var Y = [], V = 0; V < x.length; V++) {
1450
- var Z = x[V], _ = Z(O, F, R, j, L, t);
1451
- if (_ == null)
1451
+ function O(I, A, R, k, F) {
1452
+ for (var q = [], L = 0; L < w.length; L++) {
1453
+ var Z = w[L], N = Z(I, A, R, k, F, t);
1454
+ if (N == null)
1452
1455
  return null;
1453
- _.data && r(_.data, "expectedType") && Y.push(_.data.expectedType);
1456
+ N.data && r(N.data, "expectedType") && q.push(N.data.expectedType);
1454
1457
  }
1455
- var te = Y.length > 0 ? ", expected one of type [" + Y.join(", ") + "]" : "";
1456
- return new g("Invalid " + j + " `" + L + "` supplied to " + ("`" + R + "`" + te + "."));
1458
+ var te = q.length > 0 ? ", expected one of type [" + q.join(", ") + "]" : "";
1459
+ return new m("Invalid " + k + " `" + F + "` supplied to " + ("`" + R + "`" + te + "."));
1457
1460
  }
1458
- return v(k);
1461
+ return x(O);
1459
1462
  }
1460
- function $() {
1461
- function x(P, A, k, O, F) {
1462
- return X(P[A]) ? null : new g("Invalid " + O + " `" + F + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
1463
+ function _() {
1464
+ function w(P, j, O, I, A) {
1465
+ return X(P[j]) ? null : new m("Invalid " + I + " `" + A + "` supplied to " + ("`" + O + "`, expected a ReactNode."));
1463
1466
  }
1464
- return v(x);
1467
+ return x(w);
1465
1468
  }
1466
- function I(x, P, A, k, O) {
1467
- return new g(
1468
- (x || "React class") + ": " + P + " type `" + A + "." + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + O + "`."
1469
+ function W(w, P, j, O, I) {
1470
+ return new m(
1471
+ (w || "React class") + ": " + P + " type `" + j + "." + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + I + "`."
1469
1472
  );
1470
1473
  }
1471
- function E(x) {
1472
- function P(A, k, O, F, R) {
1473
- var j = A[k], L = K(j);
1474
- if (L !== "object")
1475
- return new g("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
1476
- for (var Y in x) {
1477
- var V = x[Y];
1478
- if (typeof V != "function")
1479
- return I(O, F, R, Y, ee(V));
1480
- var Z = V(j, Y, O, F, R + "." + Y, t);
1474
+ function B(w) {
1475
+ function P(j, O, I, A, R) {
1476
+ var k = j[O], F = K(k);
1477
+ if (F !== "object")
1478
+ return new m("Invalid " + A + " `" + R + "` of type `" + F + "` " + ("supplied to `" + I + "`, expected `object`."));
1479
+ for (var q in w) {
1480
+ var L = w[q];
1481
+ if (typeof L != "function")
1482
+ return W(I, A, R, q, ee(L));
1483
+ var Z = L(k, q, I, A, R + "." + q, t);
1481
1484
  if (Z)
1482
1485
  return Z;
1483
1486
  }
1484
1487
  return null;
1485
1488
  }
1486
- return v(P);
1487
- }
1488
- function z(x) {
1489
- function P(A, k, O, F, R) {
1490
- var j = A[k], L = K(j);
1491
- if (L !== "object")
1492
- return new g("Invalid " + F + " `" + R + "` of type `" + L + "` " + ("supplied to `" + O + "`, expected `object`."));
1493
- var Y = n({}, A[k], x);
1494
- for (var V in Y) {
1495
- var Z = x[V];
1496
- if (r(x, V) && typeof Z != "function")
1497
- return I(O, F, R, V, ee(Z));
1489
+ return x(P);
1490
+ }
1491
+ function H(w) {
1492
+ function P(j, O, I, A, R) {
1493
+ var k = j[O], F = K(k);
1494
+ if (F !== "object")
1495
+ return new m("Invalid " + A + " `" + R + "` of type `" + F + "` " + ("supplied to `" + I + "`, expected `object`."));
1496
+ var q = n({}, j[O], w);
1497
+ for (var L in q) {
1498
+ var Z = w[L];
1499
+ if (r(w, L) && typeof Z != "function")
1500
+ return W(I, A, R, L, ee(Z));
1498
1501
  if (!Z)
1499
- return new g(
1500
- "Invalid " + F + " `" + R + "` key `" + V + "` supplied to `" + O + "`.\nBad object: " + JSON.stringify(A[k], null, " ") + `
1501
- Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
1502
+ return new m(
1503
+ "Invalid " + A + " `" + R + "` key `" + L + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(j[O], null, " ") + `
1504
+ Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
1502
1505
  );
1503
- var _ = Z(j, V, O, F, R + "." + V, t);
1504
- if (_)
1505
- return _;
1506
+ var N = Z(k, L, I, A, R + "." + L, t);
1507
+ if (N)
1508
+ return N;
1506
1509
  }
1507
1510
  return null;
1508
1511
  }
1509
- return v(P);
1512
+ return x(P);
1510
1513
  }
1511
- function X(x) {
1512
- switch (typeof x) {
1514
+ function X(w) {
1515
+ switch (typeof w) {
1513
1516
  case "number":
1514
1517
  case "string":
1515
1518
  case "undefined":
1516
1519
  return !0;
1517
1520
  case "boolean":
1518
- return !x;
1521
+ return !w;
1519
1522
  case "object":
1520
- if (Array.isArray(x))
1521
- return x.every(X);
1522
- if (x === null || d(x))
1523
+ if (Array.isArray(w))
1524
+ return w.every(X);
1525
+ if (w === null || u(w))
1523
1526
  return !0;
1524
- var P = u(x);
1527
+ var P = c(w);
1525
1528
  if (P) {
1526
- var A = P.call(x), k;
1527
- if (P !== x.entries) {
1528
- for (; !(k = A.next()).done; )
1529
- if (!X(k.value))
1529
+ var j = P.call(w), O;
1530
+ if (P !== w.entries) {
1531
+ for (; !(O = j.next()).done; )
1532
+ if (!X(O.value))
1530
1533
  return !1;
1531
1534
  } else
1532
- for (; !(k = A.next()).done; ) {
1533
- var O = k.value;
1534
- if (O && !X(O[1]))
1535
+ for (; !(O = j.next()).done; ) {
1536
+ var I = O.value;
1537
+ if (I && !X(I[1]))
1535
1538
  return !1;
1536
1539
  }
1537
1540
  } else
@@ -1541,27 +1544,27 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
1541
1544
  return !1;
1542
1545
  }
1543
1546
  }
1544
- function Q(x, P) {
1545
- return x === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
1547
+ function Q(w, P) {
1548
+ return w === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
1546
1549
  }
1547
- function K(x) {
1548
- var P = typeof x;
1549
- return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : Q(P, x) ? "symbol" : P;
1550
+ function K(w) {
1551
+ var P = typeof w;
1552
+ return Array.isArray(w) ? "array" : w instanceof RegExp ? "object" : Q(P, w) ? "symbol" : P;
1550
1553
  }
1551
- function ee(x) {
1552
- if (typeof x > "u" || x === null)
1553
- return "" + x;
1554
- var P = K(x);
1554
+ function ee(w) {
1555
+ if (typeof w > "u" || w === null)
1556
+ return "" + w;
1557
+ var P = K(w);
1555
1558
  if (P === "object") {
1556
- if (x instanceof Date)
1559
+ if (w instanceof Date)
1557
1560
  return "date";
1558
- if (x instanceof RegExp)
1561
+ if (w instanceof RegExp)
1559
1562
  return "regexp";
1560
1563
  }
1561
1564
  return P;
1562
1565
  }
1563
- function se(x) {
1564
- var P = ee(x);
1566
+ function oe(w) {
1567
+ var P = ee(w);
1565
1568
  switch (P) {
1566
1569
  case "array":
1567
1570
  case "object":
@@ -1574,35 +1577,35 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
1574
1577
  return P;
1575
1578
  }
1576
1579
  }
1577
- function de(x) {
1578
- return !x.constructor || !x.constructor.name ? p : x.constructor.name;
1580
+ function de(w) {
1581
+ return !w.constructor || !w.constructor.name ? b : w.constructor.name;
1579
1582
  }
1580
- return y.checkPropTypes = i, y.resetWarningCache = i.resetWarningCache, y.PropTypes = y, y;
1581
- }, Me;
1583
+ return v.checkPropTypes = a, v.resetWarningCache = a.resetWarningCache, v.PropTypes = v, v;
1584
+ }, _e;
1582
1585
  }
1583
- var Pe, Xe;
1584
- function fn() {
1585
- if (Xe) return Pe;
1586
- Xe = 1;
1587
- var e = /* @__PURE__ */ Oe();
1586
+ var Me, He;
1587
+ function un() {
1588
+ if (He) return Me;
1589
+ He = 1;
1590
+ var e = /* @__PURE__ */ Ie();
1588
1591
  function n() {
1589
1592
  }
1590
1593
  function t() {
1591
1594
  }
1592
- return t.resetWarningCache = n, Pe = function() {
1593
- function r(a, d, b, m, h, u) {
1594
- if (u !== e) {
1595
- var p = new Error(
1595
+ return t.resetWarningCache = n, Me = function() {
1596
+ function r(o, u, y, p, g, c) {
1597
+ if (c !== e) {
1598
+ var b = new Error(
1596
1599
  "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
1597
1600
  );
1598
- throw p.name = "Invariant Violation", p;
1601
+ throw b.name = "Invariant Violation", b;
1599
1602
  }
1600
1603
  }
1601
1604
  r.isRequired = r;
1602
- function i() {
1605
+ function a() {
1603
1606
  return r;
1604
1607
  }
1605
- var o = {
1608
+ var i = {
1606
1609
  array: r,
1607
1610
  bigint: r,
1608
1611
  bool: r,
@@ -1612,394 +1615,394 @@ function fn() {
1612
1615
  string: r,
1613
1616
  symbol: r,
1614
1617
  any: r,
1615
- arrayOf: i,
1618
+ arrayOf: a,
1616
1619
  element: r,
1617
1620
  elementType: r,
1618
- instanceOf: i,
1621
+ instanceOf: a,
1619
1622
  node: r,
1620
- objectOf: i,
1621
- oneOf: i,
1622
- oneOfType: i,
1623
- shape: i,
1624
- exact: i,
1623
+ objectOf: a,
1624
+ oneOf: a,
1625
+ oneOfType: a,
1626
+ shape: a,
1627
+ exact: a,
1625
1628
  checkPropTypes: t,
1626
1629
  resetWarningCache: n
1627
1630
  };
1628
- return o.PropTypes = o, o;
1629
- }, Pe;
1631
+ return i.PropTypes = i, i;
1632
+ }, Me;
1630
1633
  }
1631
- var Ge;
1632
- function vt() {
1633
- if (Ge) return pe.exports;
1634
- if (Ge = 1, process.env.NODE_ENV !== "production") {
1635
- var e = yt(), n = !0;
1636
- pe.exports = /* @__PURE__ */ un()(e.isElement, n);
1634
+ var Xe;
1635
+ function bt() {
1636
+ if (Xe) return me.exports;
1637
+ if (Xe = 1, process.env.NODE_ENV !== "production") {
1638
+ var e = pt(), n = !0;
1639
+ me.exports = /* @__PURE__ */ cn()(e.isElement, n);
1637
1640
  } else
1638
- pe.exports = /* @__PURE__ */ fn()();
1639
- return pe.exports;
1641
+ me.exports = /* @__PURE__ */ un()();
1642
+ return me.exports;
1640
1643
  }
1641
- var be = { exports: {} }, Ze;
1642
- function hn() {
1643
- if (Ze) return be.exports;
1644
- Ze = 1;
1644
+ var ye = { exports: {} }, Ge;
1645
+ function fn() {
1646
+ if (Ge) return ye.exports;
1647
+ Ge = 1;
1645
1648
  function e(t) {
1646
- var r, i, o = "";
1647
- if (typeof t == "string" || typeof t == "number") o += t;
1649
+ var r, a, i = "";
1650
+ if (typeof t == "string" || typeof t == "number") i += t;
1648
1651
  else if (typeof t == "object") if (Array.isArray(t)) {
1649
- var a = t.length;
1650
- for (r = 0; r < a; r++) t[r] && (i = e(t[r])) && (o && (o += " "), o += i);
1651
- } else for (i in t) t[i] && (o && (o += " "), o += i);
1652
- return o;
1652
+ var o = t.length;
1653
+ for (r = 0; r < o; r++) t[r] && (a = e(t[r])) && (i && (i += " "), i += a);
1654
+ } else for (a in t) t[a] && (i && (i += " "), i += a);
1655
+ return i;
1653
1656
  }
1654
1657
  function n() {
1655
- for (var t, r, i = 0, o = "", a = arguments.length; i < a; i++) (t = arguments[i]) && (r = e(t)) && (o && (o += " "), o += r);
1656
- return o;
1658
+ for (var t, r, a = 0, i = "", o = arguments.length; a < o; a++) (t = arguments[a]) && (r = e(t)) && (i && (i += " "), i += r);
1659
+ return i;
1657
1660
  }
1658
- return be.exports = n, be.exports.clsx = n, be.exports;
1661
+ return ye.exports = n, ye.exports.clsx = n, ye.exports;
1659
1662
  }
1660
- var B = {}, oe = {}, Je;
1661
- function we() {
1662
- if (Je) return oe;
1663
- Je = 1, Object.defineProperty(oe, "__esModule", {
1663
+ var z = {}, re = {}, Ze;
1664
+ function xe() {
1665
+ if (Ze) return re;
1666
+ Ze = 1, Object.defineProperty(re, "__esModule", {
1664
1667
  value: !0
1665
- }), oe.dontSetMe = i, oe.findInArray = e, oe.int = r, oe.isFunction = n, oe.isNum = t;
1666
- function e(o, a) {
1667
- for (let d = 0, b = o.length; d < b; d++)
1668
- if (a.apply(a, [o[d], d, o])) return o[d];
1668
+ }), re.dontSetMe = a, re.findInArray = e, re.int = r, re.isFunction = n, re.isNum = t;
1669
+ function e(i, o) {
1670
+ for (let u = 0, y = i.length; u < y; u++)
1671
+ if (o.apply(o, [i[u], u, i])) return i[u];
1669
1672
  }
1670
- function n(o) {
1671
- return typeof o == "function" || Object.prototype.toString.call(o) === "[object Function]";
1673
+ function n(i) {
1674
+ return typeof i == "function" || Object.prototype.toString.call(i) === "[object Function]";
1672
1675
  }
1673
- function t(o) {
1674
- return typeof o == "number" && !isNaN(o);
1676
+ function t(i) {
1677
+ return typeof i == "number" && !isNaN(i);
1675
1678
  }
1676
- function r(o) {
1677
- return parseInt(o, 10);
1679
+ function r(i) {
1680
+ return parseInt(i, 10);
1678
1681
  }
1679
- function i(o, a, d) {
1680
- if (o[a])
1681
- return new Error(`Invalid prop ${a} passed to ${d} - do not set this, set it on the child.`);
1682
+ function a(i, o, u) {
1683
+ if (i[o])
1684
+ return new Error(`Invalid prop ${o} passed to ${u} - do not set this, set it on the child.`);
1682
1685
  }
1683
- return oe;
1686
+ return re;
1684
1687
  }
1685
- var ie = {}, Qe;
1686
- function gn() {
1687
- if (Qe) return ie;
1688
- Qe = 1, Object.defineProperty(ie, "__esModule", {
1688
+ var ie = {}, Je;
1689
+ function hn() {
1690
+ if (Je) return ie;
1691
+ Je = 1, Object.defineProperty(ie, "__esModule", {
1689
1692
  value: !0
1690
1693
  }), ie.browserPrefixToKey = t, ie.browserPrefixToStyle = r, ie.default = void 0, ie.getPrefix = n;
1691
1694
  const e = ["Moz", "Webkit", "O", "ms"];
1692
1695
  function n() {
1693
- let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
1696
+ let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
1694
1697
  if (typeof window > "u") return "";
1695
- const a = window.document?.documentElement?.style;
1696
- if (!a || o in a) return "";
1697
- for (let d = 0; d < e.length; d++)
1698
- if (t(o, e[d]) in a) return e[d];
1698
+ const o = window.document?.documentElement?.style;
1699
+ if (!o || i in o) return "";
1700
+ for (let u = 0; u < e.length; u++)
1701
+ if (t(i, e[u]) in o) return e[u];
1699
1702
  return "";
1700
1703
  }
1701
- function t(o, a) {
1702
- return a ? `${a}${i(o)}` : o;
1704
+ function t(i, o) {
1705
+ return o ? `${o}${a(i)}` : i;
1703
1706
  }
1704
- function r(o, a) {
1705
- return a ? `-${a.toLowerCase()}-${o}` : o;
1707
+ function r(i, o) {
1708
+ return o ? `-${o.toLowerCase()}-${i}` : i;
1706
1709
  }
1707
- function i(o) {
1708
- let a = "", d = !0;
1709
- for (let b = 0; b < o.length; b++)
1710
- d ? (a += o[b].toUpperCase(), d = !1) : o[b] === "-" ? d = !0 : a += o[b];
1711
- return a;
1710
+ function a(i) {
1711
+ let o = "", u = !0;
1712
+ for (let y = 0; y < i.length; y++)
1713
+ u ? (o += i[y].toUpperCase(), u = !1) : i[y] === "-" ? u = !0 : o += i[y];
1714
+ return o;
1712
1715
  }
1713
1716
  return ie.default = n(), ie;
1714
1717
  }
1715
- var et;
1718
+ var Qe;
1716
1719
  function Re() {
1717
- if (et) return B;
1718
- et = 1, Object.defineProperty(B, "__esModule", {
1720
+ if (Qe) return z;
1721
+ Qe = 1, Object.defineProperty(z, "__esModule", {
1719
1722
  value: !0
1720
- }), B.addClassName = l, B.addEvent = a, B.addUserSelectStyles = T, B.createCSSTransform = y, B.createSVGTransform = D, B.getTouch = v, B.getTouchIdentifier = w, B.getTranslation = g, B.innerHeight = h, B.innerWidth = u, B.matchesSelector = i, B.matchesSelectorAndParentsTo = o, B.offsetXYFromParent = p, B.outerHeight = b, B.outerWidth = m, B.removeClassName = N, B.removeEvent = d, B.scheduleRemoveUserSelectStyles = C;
1721
- var e = we(), n = t(gn());
1722
- function t(c, f) {
1723
- if (typeof WeakMap == "function") var M = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap();
1724
- return (t = function(I, E) {
1725
- if (!E && I && I.__esModule) return I;
1726
- var z, X, Q = { __proto__: null, default: I };
1727
- if (I === null || typeof I != "object" && typeof I != "function") return Q;
1728
- if (z = E ? $ : M) {
1729
- if (z.has(I)) return z.get(I);
1730
- z.set(I, Q);
1723
+ }), z.addClassName = d, z.addEvent = o, z.addUserSelectStyles = E, z.createCSSTransform = v, z.createSVGTransform = T, z.getTouch = x, z.getTouchIdentifier = C, z.getTranslation = m, z.innerHeight = g, z.innerWidth = c, z.matchesSelector = a, z.matchesSelectorAndParentsTo = i, z.offsetXYFromParent = b, z.outerHeight = y, z.outerWidth = p, z.removeClassName = M, z.removeEvent = u, z.scheduleRemoveUserSelectStyles = S;
1724
+ var e = xe(), n = t(hn());
1725
+ function t(l, h) {
1726
+ if (typeof WeakMap == "function") var f = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap();
1727
+ return (t = function(W, B) {
1728
+ if (!B && W && W.__esModule) return W;
1729
+ var H, X, Q = { __proto__: null, default: W };
1730
+ if (W === null || typeof W != "object" && typeof W != "function") return Q;
1731
+ if (H = B ? _ : f) {
1732
+ if (H.has(W)) return H.get(W);
1733
+ H.set(W, Q);
1731
1734
  }
1732
- for (const K in I) K !== "default" && {}.hasOwnProperty.call(I, K) && ((X = (z = Object.defineProperty) && Object.getOwnPropertyDescriptor(I, K)) && (X.get || X.set) ? z(Q, K, X) : Q[K] = I[K]);
1735
+ for (const K in W) K !== "default" && {}.hasOwnProperty.call(W, K) && ((X = (H = Object.defineProperty) && Object.getOwnPropertyDescriptor(W, K)) && (X.get || X.set) ? H(Q, K, X) : Q[K] = W[K]);
1733
1736
  return Q;
1734
- })(c, f);
1737
+ })(l, h);
1735
1738
  }
1736
1739
  let r = "";
1737
- function i(c, f) {
1738
- return r || (r = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(M) {
1739
- return (0, e.isFunction)(c[M]);
1740
- })), (0, e.isFunction)(c[r]) ? c[r](f) : !1;
1740
+ function a(l, h) {
1741
+ return r || (r = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(f) {
1742
+ return (0, e.isFunction)(l[f]);
1743
+ })), (0, e.isFunction)(l[r]) ? l[r](h) : !1;
1741
1744
  }
1742
- function o(c, f, M) {
1743
- let $ = c;
1745
+ function i(l, h, f) {
1746
+ let _ = l;
1744
1747
  do {
1745
- if (i($, f)) return !0;
1746
- if ($ === M) return !1;
1747
- $ = $.parentNode;
1748
- } while ($);
1748
+ if (a(_, h)) return !0;
1749
+ if (_ === f) return !1;
1750
+ _ = _.parentNode;
1751
+ } while (_);
1749
1752
  return !1;
1750
1753
  }
1751
- function a(c, f, M, $) {
1752
- if (!c) return;
1753
- const I = {
1754
+ function o(l, h, f, _) {
1755
+ if (!l) return;
1756
+ const W = {
1754
1757
  capture: !0,
1755
- ...$
1758
+ ..._
1756
1759
  };
1757
- c.addEventListener ? c.addEventListener(f, M, I) : c.attachEvent ? c.attachEvent("on" + f, M) : c["on" + f] = M;
1760
+ l.addEventListener ? l.addEventListener(h, f, W) : l.attachEvent ? l.attachEvent("on" + h, f) : l["on" + h] = f;
1758
1761
  }
1759
- function d(c, f, M, $) {
1760
- if (!c) return;
1761
- const I = {
1762
+ function u(l, h, f, _) {
1763
+ if (!l) return;
1764
+ const W = {
1762
1765
  capture: !0,
1763
- ...$
1766
+ ..._
1764
1767
  };
1765
- c.removeEventListener ? c.removeEventListener(f, M, I) : c.detachEvent ? c.detachEvent("on" + f, M) : c["on" + f] = null;
1766
- }
1767
- function b(c) {
1768
- let f = c.clientHeight;
1769
- const M = c.ownerDocument.defaultView.getComputedStyle(c);
1770
- return f += (0, e.int)(M.borderTopWidth), f += (0, e.int)(M.borderBottomWidth), f;
1771
- }
1772
- function m(c) {
1773
- let f = c.clientWidth;
1774
- const M = c.ownerDocument.defaultView.getComputedStyle(c);
1775
- return f += (0, e.int)(M.borderLeftWidth), f += (0, e.int)(M.borderRightWidth), f;
1776
- }
1777
- function h(c) {
1778
- let f = c.clientHeight;
1779
- const M = c.ownerDocument.defaultView.getComputedStyle(c);
1780
- return f -= (0, e.int)(M.paddingTop), f -= (0, e.int)(M.paddingBottom), f;
1781
- }
1782
- function u(c) {
1783
- let f = c.clientWidth;
1784
- const M = c.ownerDocument.defaultView.getComputedStyle(c);
1785
- return f -= (0, e.int)(M.paddingLeft), f -= (0, e.int)(M.paddingRight), f;
1786
- }
1787
- function p(c, f, M) {
1788
- const I = f === f.ownerDocument.body ? {
1768
+ l.removeEventListener ? l.removeEventListener(h, f, W) : l.detachEvent ? l.detachEvent("on" + h, f) : l["on" + h] = null;
1769
+ }
1770
+ function y(l) {
1771
+ let h = l.clientHeight;
1772
+ const f = l.ownerDocument.defaultView.getComputedStyle(l);
1773
+ return h += (0, e.int)(f.borderTopWidth), h += (0, e.int)(f.borderBottomWidth), h;
1774
+ }
1775
+ function p(l) {
1776
+ let h = l.clientWidth;
1777
+ const f = l.ownerDocument.defaultView.getComputedStyle(l);
1778
+ return h += (0, e.int)(f.borderLeftWidth), h += (0, e.int)(f.borderRightWidth), h;
1779
+ }
1780
+ function g(l) {
1781
+ let h = l.clientHeight;
1782
+ const f = l.ownerDocument.defaultView.getComputedStyle(l);
1783
+ return h -= (0, e.int)(f.paddingTop), h -= (0, e.int)(f.paddingBottom), h;
1784
+ }
1785
+ function c(l) {
1786
+ let h = l.clientWidth;
1787
+ const f = l.ownerDocument.defaultView.getComputedStyle(l);
1788
+ return h -= (0, e.int)(f.paddingLeft), h -= (0, e.int)(f.paddingRight), h;
1789
+ }
1790
+ function b(l, h, f) {
1791
+ const W = h === h.ownerDocument.body ? {
1789
1792
  left: 0,
1790
1793
  top: 0
1791
- } : f.getBoundingClientRect(), E = (c.clientX + f.scrollLeft - I.left) / M, z = (c.clientY + f.scrollTop - I.top) / M;
1794
+ } : h.getBoundingClientRect(), B = (l.clientX + h.scrollLeft - W.left) / f, H = (l.clientY + h.scrollTop - W.top) / f;
1792
1795
  return {
1793
- x: E,
1794
- y: z
1796
+ x: B,
1797
+ y: H
1795
1798
  };
1796
1799
  }
1797
- function y(c, f) {
1798
- const M = g(c, f, "px");
1800
+ function v(l, h) {
1801
+ const f = m(l, h, "px");
1799
1802
  return {
1800
- [(0, n.browserPrefixToKey)("transform", n.default)]: M
1803
+ [(0, n.browserPrefixToKey)("transform", n.default)]: f
1801
1804
  };
1802
1805
  }
1803
- function D(c, f) {
1804
- return g(c, f, "");
1806
+ function T(l, h) {
1807
+ return m(l, h, "");
1805
1808
  }
1806
- function g(c, f, M) {
1809
+ function m(l, h, f) {
1807
1810
  let {
1808
- x: $,
1809
- y: I
1810
- } = c, E = `translate(${$}${M},${I}${M})`;
1811
- if (f) {
1812
- const z = `${typeof f.x == "string" ? f.x : f.x + M}`, X = `${typeof f.y == "string" ? f.y : f.y + M}`;
1813
- E = `translate(${z}, ${X})` + E;
1811
+ x: _,
1812
+ y: W
1813
+ } = l, B = `translate(${_}${f},${W}${f})`;
1814
+ if (h) {
1815
+ const H = `${typeof h.x == "string" ? h.x : h.x + f}`, X = `${typeof h.y == "string" ? h.y : h.y + f}`;
1816
+ B = `translate(${H}, ${X})` + B;
1814
1817
  }
1815
- return E;
1818
+ return B;
1816
1819
  }
1817
- function v(c, f) {
1818
- return c.targetTouches && (0, e.findInArray)(c.targetTouches, (M) => f === M.identifier) || c.changedTouches && (0, e.findInArray)(c.changedTouches, (M) => f === M.identifier);
1820
+ function x(l, h) {
1821
+ return l.targetTouches && (0, e.findInArray)(l.targetTouches, (f) => h === f.identifier) || l.changedTouches && (0, e.findInArray)(l.changedTouches, (f) => h === f.identifier);
1819
1822
  }
1820
- function w(c) {
1821
- if (c.targetTouches && c.targetTouches[0]) return c.targetTouches[0].identifier;
1822
- if (c.changedTouches && c.changedTouches[0]) return c.changedTouches[0].identifier;
1823
+ function C(l) {
1824
+ if (l.targetTouches && l.targetTouches[0]) return l.targetTouches[0].identifier;
1825
+ if (l.changedTouches && l.changedTouches[0]) return l.changedTouches[0].identifier;
1823
1826
  }
1824
- function T(c) {
1825
- if (!c) return;
1826
- let f = c.getElementById("react-draggable-style-el");
1827
- f || (f = c.createElement("style"), f.type = "text/css", f.id = "react-draggable-style-el", f.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
1828
- `, f.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
1829
- `, c.getElementsByTagName("head")[0].appendChild(f)), c.body && l(c.body, "react-draggable-transparent-selection");
1827
+ function E(l) {
1828
+ if (!l) return;
1829
+ let h = l.getElementById("react-draggable-style-el");
1830
+ h || (h = l.createElement("style"), h.type = "text/css", h.id = "react-draggable-style-el", h.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
1831
+ `, h.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
1832
+ `, l.getElementsByTagName("head")[0].appendChild(h)), l.body && d(l.body, "react-draggable-transparent-selection");
1830
1833
  }
1831
- function C(c) {
1834
+ function S(l) {
1832
1835
  window.requestAnimationFrame ? window.requestAnimationFrame(() => {
1833
- S(c);
1834
- }) : S(c);
1836
+ D(l);
1837
+ }) : D(l);
1835
1838
  }
1836
- function S(c) {
1837
- if (c)
1839
+ function D(l) {
1840
+ if (l)
1838
1841
  try {
1839
- if (c.body && N(c.body, "react-draggable-transparent-selection"), c.selection)
1840
- c.selection.empty();
1842
+ if (l.body && M(l.body, "react-draggable-transparent-selection"), l.selection)
1843
+ l.selection.empty();
1841
1844
  else {
1842
- const f = (c.defaultView || window).getSelection();
1843
- f && f.type !== "Caret" && f.removeAllRanges();
1845
+ const h = (l.defaultView || window).getSelection();
1846
+ h && h.type !== "Caret" && h.removeAllRanges();
1844
1847
  }
1845
1848
  } catch {
1846
1849
  }
1847
1850
  }
1848
- function l(c, f) {
1849
- c.classList ? c.classList.add(f) : c.className.match(new RegExp(`(?:^|\\s)${f}(?!\\S)`)) || (c.className += ` ${f}`);
1851
+ function d(l, h) {
1852
+ l.classList ? l.classList.add(h) : l.className.match(new RegExp(`(?:^|\\s)${h}(?!\\S)`)) || (l.className += ` ${h}`);
1850
1853
  }
1851
- function N(c, f) {
1852
- c.classList ? c.classList.remove(f) : c.className = c.className.replace(new RegExp(`(?:^|\\s)${f}(?!\\S)`, "g"), "");
1854
+ function M(l, h) {
1855
+ l.classList ? l.classList.remove(h) : l.className = l.className.replace(new RegExp(`(?:^|\\s)${h}(?!\\S)`, "g"), "");
1853
1856
  }
1854
- return B;
1857
+ return z;
1855
1858
  }
1856
- var ne = {}, tt;
1857
- function xt() {
1858
- if (tt) return ne;
1859
- tt = 1, Object.defineProperty(ne, "__esModule", {
1859
+ var ne = {}, et;
1860
+ function vt() {
1861
+ if (et) return ne;
1862
+ et = 1, Object.defineProperty(ne, "__esModule", {
1860
1863
  value: !0
1861
- }), ne.canDragX = i, ne.canDragY = o, ne.createCoreData = d, ne.createDraggableData = b, ne.getBoundPosition = t, ne.getControlPosition = a, ne.snapToGrid = r;
1862
- var e = we(), n = Re();
1863
- function t(u, p, y) {
1864
- if (!u.props.bounds) return [p, y];
1864
+ }), ne.canDragX = a, ne.canDragY = i, ne.createCoreData = u, ne.createDraggableData = y, ne.getBoundPosition = t, ne.getControlPosition = o, ne.snapToGrid = r;
1865
+ var e = xe(), n = Re();
1866
+ function t(c, b, v) {
1867
+ if (!c.props.bounds) return [b, v];
1865
1868
  let {
1866
- bounds: D
1867
- } = u.props;
1868
- D = typeof D == "string" ? D : m(D);
1869
- const g = h(u);
1870
- if (typeof D == "string") {
1869
+ bounds: T
1870
+ } = c.props;
1871
+ T = typeof T == "string" ? T : p(T);
1872
+ const m = g(c);
1873
+ if (typeof T == "string") {
1871
1874
  const {
1872
- ownerDocument: v
1873
- } = g, w = v.defaultView;
1874
- let T;
1875
- if (D === "parent" ? T = g.parentNode : T = g.getRootNode().querySelector(D), !(T instanceof w.HTMLElement))
1876
- throw new Error('Bounds selector "' + D + '" could not find an element.');
1877
- const C = T, S = w.getComputedStyle(g), l = w.getComputedStyle(C);
1878
- D = {
1879
- left: -g.offsetLeft + (0, e.int)(l.paddingLeft) + (0, e.int)(S.marginLeft),
1880
- top: -g.offsetTop + (0, e.int)(l.paddingTop) + (0, e.int)(S.marginTop),
1881
- right: (0, n.innerWidth)(C) - (0, n.outerWidth)(g) - g.offsetLeft + (0, e.int)(l.paddingRight) - (0, e.int)(S.marginRight),
1882
- bottom: (0, n.innerHeight)(C) - (0, n.outerHeight)(g) - g.offsetTop + (0, e.int)(l.paddingBottom) - (0, e.int)(S.marginBottom)
1875
+ ownerDocument: x
1876
+ } = m, C = x.defaultView;
1877
+ let E;
1878
+ if (T === "parent" ? E = m.parentNode : E = m.getRootNode().querySelector(T), !(E instanceof C.HTMLElement))
1879
+ throw new Error('Bounds selector "' + T + '" could not find an element.');
1880
+ const S = E, D = C.getComputedStyle(m), d = C.getComputedStyle(S);
1881
+ T = {
1882
+ left: -m.offsetLeft + (0, e.int)(d.paddingLeft) + (0, e.int)(D.marginLeft),
1883
+ top: -m.offsetTop + (0, e.int)(d.paddingTop) + (0, e.int)(D.marginTop),
1884
+ right: (0, n.innerWidth)(S) - (0, n.outerWidth)(m) - m.offsetLeft + (0, e.int)(d.paddingRight) - (0, e.int)(D.marginRight),
1885
+ bottom: (0, n.innerHeight)(S) - (0, n.outerHeight)(m) - m.offsetTop + (0, e.int)(d.paddingBottom) - (0, e.int)(D.marginBottom)
1883
1886
  };
1884
1887
  }
1885
- return (0, e.isNum)(D.right) && (p = Math.min(p, D.right)), (0, e.isNum)(D.bottom) && (y = Math.min(y, D.bottom)), (0, e.isNum)(D.left) && (p = Math.max(p, D.left)), (0, e.isNum)(D.top) && (y = Math.max(y, D.top)), [p, y];
1888
+ return (0, e.isNum)(T.right) && (b = Math.min(b, T.right)), (0, e.isNum)(T.bottom) && (v = Math.min(v, T.bottom)), (0, e.isNum)(T.left) && (b = Math.max(b, T.left)), (0, e.isNum)(T.top) && (v = Math.max(v, T.top)), [b, v];
1886
1889
  }
1887
- function r(u, p, y) {
1888
- const D = Math.round(p / u[0]) * u[0], g = Math.round(y / u[1]) * u[1];
1889
- return [D, g];
1890
+ function r(c, b, v) {
1891
+ const T = Math.round(b / c[0]) * c[0], m = Math.round(v / c[1]) * c[1];
1892
+ return [T, m];
1890
1893
  }
1891
- function i(u) {
1892
- return u.props.axis === "both" || u.props.axis === "x";
1894
+ function a(c) {
1895
+ return c.props.axis === "both" || c.props.axis === "x";
1893
1896
  }
1894
- function o(u) {
1895
- return u.props.axis === "both" || u.props.axis === "y";
1897
+ function i(c) {
1898
+ return c.props.axis === "both" || c.props.axis === "y";
1896
1899
  }
1897
- function a(u, p, y) {
1898
- const D = typeof p == "number" ? (0, n.getTouch)(u, p) : null;
1899
- if (typeof p == "number" && !D) return null;
1900
- const g = h(y), v = y.props.offsetParent || g.offsetParent || g.ownerDocument.body;
1901
- return (0, n.offsetXYFromParent)(D || u, v, y.props.scale);
1900
+ function o(c, b, v) {
1901
+ const T = typeof b == "number" ? (0, n.getTouch)(c, b) : null;
1902
+ if (typeof b == "number" && !T) return null;
1903
+ const m = g(v), x = v.props.offsetParent || m.offsetParent || m.ownerDocument.body;
1904
+ return (0, n.offsetXYFromParent)(T || c, x, v.props.scale);
1902
1905
  }
1903
- function d(u, p, y) {
1904
- const D = !(0, e.isNum)(u.lastX), g = h(u);
1905
- return D ? {
1906
- node: g,
1906
+ function u(c, b, v) {
1907
+ const T = !(0, e.isNum)(c.lastX), m = g(c);
1908
+ return T ? {
1909
+ node: m,
1907
1910
  deltaX: 0,
1908
1911
  deltaY: 0,
1909
- lastX: p,
1910
- lastY: y,
1911
- x: p,
1912
- y
1912
+ lastX: b,
1913
+ lastY: v,
1914
+ x: b,
1915
+ y: v
1913
1916
  } : {
1914
- node: g,
1915
- deltaX: p - u.lastX,
1916
- deltaY: y - u.lastY,
1917
- lastX: u.lastX,
1918
- lastY: u.lastY,
1919
- x: p,
1920
- y
1917
+ node: m,
1918
+ deltaX: b - c.lastX,
1919
+ deltaY: v - c.lastY,
1920
+ lastX: c.lastX,
1921
+ lastY: c.lastY,
1922
+ x: b,
1923
+ y: v
1921
1924
  };
1922
1925
  }
1923
- function b(u, p) {
1924
- const y = u.props.scale;
1926
+ function y(c, b) {
1927
+ const v = c.props.scale;
1925
1928
  return {
1926
- node: p.node,
1927
- x: u.state.x + p.deltaX / y,
1928
- y: u.state.y + p.deltaY / y,
1929
- deltaX: p.deltaX / y,
1930
- deltaY: p.deltaY / y,
1931
- lastX: u.state.x,
1932
- lastY: u.state.y
1929
+ node: b.node,
1930
+ x: c.state.x + b.deltaX / v,
1931
+ y: c.state.y + b.deltaY / v,
1932
+ deltaX: b.deltaX / v,
1933
+ deltaY: b.deltaY / v,
1934
+ lastX: c.state.x,
1935
+ lastY: c.state.y
1933
1936
  };
1934
1937
  }
1935
- function m(u) {
1938
+ function p(c) {
1936
1939
  return {
1937
- left: u.left,
1938
- top: u.top,
1939
- right: u.right,
1940
- bottom: u.bottom
1940
+ left: c.left,
1941
+ top: c.top,
1942
+ right: c.right,
1943
+ bottom: c.bottom
1941
1944
  };
1942
1945
  }
1943
- function h(u) {
1944
- const p = u.findDOMNode();
1945
- if (!p)
1946
+ function g(c) {
1947
+ const b = c.findDOMNode();
1948
+ if (!b)
1946
1949
  throw new Error("<DraggableCore>: Unmounted during event!");
1947
- return p;
1950
+ return b;
1948
1951
  }
1949
1952
  return ne;
1950
1953
  }
1951
- var he = {}, ve = {}, nt;
1952
- function wt() {
1953
- if (nt) return ve;
1954
- nt = 1, Object.defineProperty(ve, "__esModule", {
1954
+ var fe = {}, be = {}, tt;
1955
+ function xt() {
1956
+ if (tt) return be;
1957
+ tt = 1, Object.defineProperty(be, "__esModule", {
1955
1958
  value: !0
1956
- }), ve.default = e;
1959
+ }), be.default = e;
1957
1960
  function e() {
1958
1961
  }
1959
- return ve;
1962
+ return be;
1960
1963
  }
1961
- var rt;
1962
- function mn() {
1963
- if (rt) return he;
1964
- rt = 1, Object.defineProperty(he, "__esModule", {
1964
+ var nt;
1965
+ function gn() {
1966
+ if (nt) return fe;
1967
+ nt = 1, Object.defineProperty(fe, "__esModule", {
1965
1968
  value: !0
1966
- }), he.default = void 0;
1967
- var e = b(ae), n = d(/* @__PURE__ */ vt()), t = d(ct), r = Re(), i = xt(), o = we(), a = d(wt());
1968
- function d(g) {
1969
- return g && g.__esModule ? g : { default: g };
1970
- }
1971
- function b(g, v) {
1972
- if (typeof WeakMap == "function") var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap();
1973
- return (b = function(C, S) {
1974
- if (!S && C && C.__esModule) return C;
1975
- var l, N, c = { __proto__: null, default: C };
1976
- if (C === null || typeof C != "object" && typeof C != "function") return c;
1977
- if (l = S ? T : w) {
1978
- if (l.has(C)) return l.get(C);
1979
- l.set(C, c);
1969
+ }), fe.default = void 0;
1970
+ var e = y(ae), n = u(/* @__PURE__ */ bt()), t = u(st), r = Re(), a = vt(), i = xe(), o = u(xt());
1971
+ function u(m) {
1972
+ return m && m.__esModule ? m : { default: m };
1973
+ }
1974
+ function y(m, x) {
1975
+ if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap();
1976
+ return (y = function(S, D) {
1977
+ if (!D && S && S.__esModule) return S;
1978
+ var d, M, l = { __proto__: null, default: S };
1979
+ if (S === null || typeof S != "object" && typeof S != "function") return l;
1980
+ if (d = D ? E : C) {
1981
+ if (d.has(S)) return d.get(S);
1982
+ d.set(S, l);
1980
1983
  }
1981
- for (const f in C) f !== "default" && {}.hasOwnProperty.call(C, f) && ((N = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(C, f)) && (N.get || N.set) ? l(c, f, N) : c[f] = C[f]);
1982
- return c;
1983
- })(g, v);
1984
- }
1985
- function m(g, v, w) {
1986
- return (v = h(v)) in g ? Object.defineProperty(g, v, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : g[v] = w, g;
1987
- }
1988
- function h(g) {
1989
- var v = u(g, "string");
1990
- return typeof v == "symbol" ? v : v + "";
1991
- }
1992
- function u(g, v) {
1993
- if (typeof g != "object" || !g) return g;
1994
- var w = g[Symbol.toPrimitive];
1995
- if (w !== void 0) {
1996
- var T = w.call(g, v);
1997
- if (typeof T != "object") return T;
1984
+ for (const h in S) h !== "default" && {}.hasOwnProperty.call(S, h) && ((M = (d = Object.defineProperty) && Object.getOwnPropertyDescriptor(S, h)) && (M.get || M.set) ? d(l, h, M) : l[h] = S[h]);
1985
+ return l;
1986
+ })(m, x);
1987
+ }
1988
+ function p(m, x, C) {
1989
+ return (x = g(x)) in m ? Object.defineProperty(m, x, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : m[x] = C, m;
1990
+ }
1991
+ function g(m) {
1992
+ var x = c(m, "string");
1993
+ return typeof x == "symbol" ? x : x + "";
1994
+ }
1995
+ function c(m, x) {
1996
+ if (typeof m != "object" || !m) return m;
1997
+ var C = m[Symbol.toPrimitive];
1998
+ if (C !== void 0) {
1999
+ var E = C.call(m, x);
2000
+ if (typeof E != "object") return E;
1998
2001
  throw new TypeError("@@toPrimitive must return a primitive value.");
1999
2002
  }
2000
- return (v === "string" ? String : Number)(g);
2003
+ return (x === "string" ? String : Number)(m);
2001
2004
  }
2002
- const p = {
2005
+ const b = {
2003
2006
  touch: {
2004
2007
  start: "touchstart",
2005
2008
  move: "touchmove",
@@ -2011,86 +2014,86 @@ function mn() {
2011
2014
  stop: "mouseup"
2012
2015
  }
2013
2016
  };
2014
- let y = p.mouse, D = class extends e.Component {
2017
+ let v = b.mouse, T = class extends e.Component {
2015
2018
  constructor() {
2016
- super(...arguments), m(this, "dragging", !1), m(this, "lastX", NaN), m(this, "lastY", NaN), m(this, "touchIdentifier", null), m(this, "mounted", !1), m(this, "handleDragStart", (v) => {
2017
- if (this.props.onMouseDown(v), !this.props.allowAnyClick && typeof v.button == "number" && v.button !== 0) return !1;
2018
- const w = this.findDOMNode();
2019
- if (!w || !w.ownerDocument || !w.ownerDocument.body)
2019
+ super(...arguments), p(this, "dragging", !1), p(this, "lastX", NaN), p(this, "lastY", NaN), p(this, "touchIdentifier", null), p(this, "mounted", !1), p(this, "handleDragStart", (x) => {
2020
+ if (this.props.onMouseDown(x), !this.props.allowAnyClick && typeof x.button == "number" && x.button !== 0) return !1;
2021
+ const C = this.findDOMNode();
2022
+ if (!C || !C.ownerDocument || !C.ownerDocument.body)
2020
2023
  throw new Error("<DraggableCore> not mounted on DragStart!");
2021
2024
  const {
2022
- ownerDocument: T
2023
- } = w;
2024
- if (this.props.disabled || !(v.target instanceof T.defaultView.Node) || this.props.handle && !(0, r.matchesSelectorAndParentsTo)(v.target, this.props.handle, w) || this.props.cancel && (0, r.matchesSelectorAndParentsTo)(v.target, this.props.cancel, w))
2025
+ ownerDocument: E
2026
+ } = C;
2027
+ if (this.props.disabled || !(x.target instanceof E.defaultView.Node) || this.props.handle && !(0, r.matchesSelectorAndParentsTo)(x.target, this.props.handle, C) || this.props.cancel && (0, r.matchesSelectorAndParentsTo)(x.target, this.props.cancel, C))
2025
2028
  return;
2026
- v.type === "touchstart" && !this.props.allowMobileScroll && v.preventDefault();
2027
- const C = (0, r.getTouchIdentifier)(v);
2028
- this.touchIdentifier = C;
2029
- const S = (0, i.getControlPosition)(v, C, this);
2030
- if (S == null) return;
2029
+ x.type === "touchstart" && !this.props.allowMobileScroll && x.preventDefault();
2030
+ const S = (0, r.getTouchIdentifier)(x);
2031
+ this.touchIdentifier = S;
2032
+ const D = (0, a.getControlPosition)(x, S, this);
2033
+ if (D == null) return;
2031
2034
  const {
2032
- x: l,
2033
- y: N
2034
- } = S, c = (0, i.createCoreData)(this, l, N);
2035
- (0, a.default)("DraggableCore: handleDragStart: %j", c), (0, a.default)("calling", this.props.onStart), !(this.props.onStart(v, c) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(T), this.dragging = !0, this.lastX = l, this.lastY = N, (0, r.addEvent)(T, y.move, this.handleDrag), (0, r.addEvent)(T, y.stop, this.handleDragStop));
2036
- }), m(this, "handleDrag", (v) => {
2037
- const w = (0, i.getControlPosition)(v, this.touchIdentifier, this);
2038
- if (w == null) return;
2035
+ x: d,
2036
+ y: M
2037
+ } = D, l = (0, a.createCoreData)(this, d, M);
2038
+ (0, o.default)("DraggableCore: handleDragStart: %j", l), (0, o.default)("calling", this.props.onStart), !(this.props.onStart(x, l) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(E), this.dragging = !0, this.lastX = d, this.lastY = M, (0, r.addEvent)(E, v.move, this.handleDrag), (0, r.addEvent)(E, v.stop, this.handleDragStop));
2039
+ }), p(this, "handleDrag", (x) => {
2040
+ const C = (0, a.getControlPosition)(x, this.touchIdentifier, this);
2041
+ if (C == null) return;
2039
2042
  let {
2040
- x: T,
2041
- y: C
2042
- } = w;
2043
+ x: E,
2044
+ y: S
2045
+ } = C;
2043
2046
  if (Array.isArray(this.props.grid)) {
2044
- let N = T - this.lastX, c = C - this.lastY;
2045
- if ([N, c] = (0, i.snapToGrid)(this.props.grid, N, c), !N && !c) return;
2046
- T = this.lastX + N, C = this.lastY + c;
2047
+ let M = E - this.lastX, l = S - this.lastY;
2048
+ if ([M, l] = (0, a.snapToGrid)(this.props.grid, M, l), !M && !l) return;
2049
+ E = this.lastX + M, S = this.lastY + l;
2047
2050
  }
2048
- const S = (0, i.createCoreData)(this, T, C);
2049
- if ((0, a.default)("DraggableCore: handleDrag: %j", S), this.props.onDrag(v, S) === !1 || this.mounted === !1) {
2051
+ const D = (0, a.createCoreData)(this, E, S);
2052
+ if ((0, o.default)("DraggableCore: handleDrag: %j", D), this.props.onDrag(x, D) === !1 || this.mounted === !1) {
2050
2053
  try {
2051
2054
  this.handleDragStop(new MouseEvent("mouseup"));
2052
2055
  } catch {
2053
- const c = document.createEvent("MouseEvents");
2054
- c.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(c);
2056
+ const l = document.createEvent("MouseEvents");
2057
+ l.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(l);
2055
2058
  }
2056
2059
  return;
2057
2060
  }
2058
- this.lastX = T, this.lastY = C;
2059
- }), m(this, "handleDragStop", (v) => {
2061
+ this.lastX = E, this.lastY = S;
2062
+ }), p(this, "handleDragStop", (x) => {
2060
2063
  if (!this.dragging) return;
2061
- const w = (0, i.getControlPosition)(v, this.touchIdentifier, this);
2062
- if (w == null) return;
2064
+ const C = (0, a.getControlPosition)(x, this.touchIdentifier, this);
2065
+ if (C == null) return;
2063
2066
  let {
2064
- x: T,
2065
- y: C
2066
- } = w;
2067
+ x: E,
2068
+ y: S
2069
+ } = C;
2067
2070
  if (Array.isArray(this.props.grid)) {
2068
- let c = T - this.lastX || 0, f = C - this.lastY || 0;
2069
- [c, f] = (0, i.snapToGrid)(this.props.grid, c, f), T = this.lastX + c, C = this.lastY + f;
2071
+ let l = E - this.lastX || 0, h = S - this.lastY || 0;
2072
+ [l, h] = (0, a.snapToGrid)(this.props.grid, l, h), E = this.lastX + l, S = this.lastY + h;
2070
2073
  }
2071
- const S = (0, i.createCoreData)(this, T, C);
2072
- if (this.props.onStop(v, S) === !1 || this.mounted === !1) return !1;
2073
- const N = this.findDOMNode();
2074
- N && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(N.ownerDocument), (0, a.default)("DraggableCore: handleDragStop: %j", S), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, N && ((0, a.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(N.ownerDocument, y.move, this.handleDrag), (0, r.removeEvent)(N.ownerDocument, y.stop, this.handleDragStop));
2075
- }), m(this, "onMouseDown", (v) => (y = p.mouse, this.handleDragStart(v))), m(this, "onMouseUp", (v) => (y = p.mouse, this.handleDragStop(v))), m(this, "onTouchStart", (v) => (y = p.touch, this.handleDragStart(v))), m(this, "onTouchEnd", (v) => (y = p.touch, this.handleDragStop(v)));
2074
+ const D = (0, a.createCoreData)(this, E, S);
2075
+ if (this.props.onStop(x, D) === !1 || this.mounted === !1) return !1;
2076
+ const M = this.findDOMNode();
2077
+ M && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(M.ownerDocument), (0, o.default)("DraggableCore: handleDragStop: %j", D), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, M && ((0, o.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(M.ownerDocument, v.move, this.handleDrag), (0, r.removeEvent)(M.ownerDocument, v.stop, this.handleDragStop));
2078
+ }), p(this, "onMouseDown", (x) => (v = b.mouse, this.handleDragStart(x))), p(this, "onMouseUp", (x) => (v = b.mouse, this.handleDragStop(x))), p(this, "onTouchStart", (x) => (v = b.touch, this.handleDragStart(x))), p(this, "onTouchEnd", (x) => (v = b.touch, this.handleDragStop(x)));
2076
2079
  }
2077
2080
  componentDidMount() {
2078
2081
  this.mounted = !0;
2079
- const v = this.findDOMNode();
2080
- v && (0, r.addEvent)(v, p.touch.start, this.onTouchStart, {
2082
+ const x = this.findDOMNode();
2083
+ x && (0, r.addEvent)(x, b.touch.start, this.onTouchStart, {
2081
2084
  passive: !1
2082
2085
  });
2083
2086
  }
2084
2087
  componentWillUnmount() {
2085
2088
  this.mounted = !1;
2086
- const v = this.findDOMNode();
2087
- if (v) {
2089
+ const x = this.findDOMNode();
2090
+ if (x) {
2088
2091
  const {
2089
- ownerDocument: w
2090
- } = v;
2091
- (0, r.removeEvent)(w, p.mouse.move, this.handleDrag), (0, r.removeEvent)(w, p.touch.move, this.handleDrag), (0, r.removeEvent)(w, p.mouse.stop, this.handleDragStop), (0, r.removeEvent)(w, p.touch.stop, this.handleDragStop), (0, r.removeEvent)(v, p.touch.start, this.onTouchStart, {
2092
+ ownerDocument: C
2093
+ } = x;
2094
+ (0, r.removeEvent)(C, b.mouse.move, this.handleDrag), (0, r.removeEvent)(C, b.touch.move, this.handleDrag), (0, r.removeEvent)(C, b.mouse.stop, this.handleDragStop), (0, r.removeEvent)(C, b.touch.stop, this.handleDragStop), (0, r.removeEvent)(x, b.touch.start, this.onTouchStart, {
2092
2095
  passive: !1
2093
- }), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(w);
2096
+ }), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(C);
2094
2097
  }
2095
2098
  }
2096
2099
  // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
@@ -2111,7 +2114,7 @@ function mn() {
2111
2114
  });
2112
2115
  }
2113
2116
  };
2114
- return he.default = D, m(D, "displayName", "DraggableCore"), m(D, "propTypes", {
2117
+ return fe.default = T, p(T, "displayName", "DraggableCore"), p(T, "propTypes", {
2115
2118
  /**
2116
2119
  * `allowAnyClick` allows dragging using any mouse button.
2117
2120
  * By default, we only accept the left button.
@@ -2143,8 +2146,8 @@ function mn() {
2143
2146
  * `offsetParent`, if set, uses the passed DOM node to compute drag offsets
2144
2147
  * instead of using the parent node.
2145
2148
  */
2146
- offsetParent: function(g, v) {
2147
- if (g[v] && g[v].nodeType !== 1)
2149
+ offsetParent: function(m, x) {
2150
+ if (m[x] && m[x].nodeType !== 1)
2148
2151
  throw new Error("Draggable's offsetParent must be a DOM Node.");
2149
2152
  },
2150
2153
  /**
@@ -2238,10 +2241,10 @@ function mn() {
2238
2241
  /**
2239
2242
  * These properties should be defined on the child, not here.
2240
2243
  */
2241
- className: o.dontSetMe,
2242
- style: o.dontSetMe,
2243
- transform: o.dontSetMe
2244
- }), m(D, "defaultProps", {
2244
+ className: i.dontSetMe,
2245
+ style: i.dontSetMe,
2246
+ transform: i.dontSetMe
2247
+ }), p(T, "defaultProps", {
2245
2248
  allowAnyClick: !1,
2246
2249
  // by default only accept left click
2247
2250
  allowMobileScroll: !1,
@@ -2256,143 +2259,143 @@ function mn() {
2256
2259
  onMouseDown: function() {
2257
2260
  },
2258
2261
  scale: 1
2259
- }), he;
2262
+ }), fe;
2260
2263
  }
2261
- var ot;
2262
- function pn() {
2263
- return ot || (ot = 1, (function(e) {
2264
+ var rt;
2265
+ function mn() {
2266
+ return rt || (rt = 1, (function(e) {
2264
2267
  Object.defineProperty(e, "__esModule", {
2265
2268
  value: !0
2266
2269
  }), Object.defineProperty(e, "DraggableCore", {
2267
2270
  enumerable: !0,
2268
2271
  get: function() {
2269
- return b.default;
2272
+ return y.default;
2270
2273
  }
2271
2274
  }), e.default = void 0;
2272
- var n = u(ae), t = h(/* @__PURE__ */ vt()), r = h(ct), i = hn(), o = Re(), a = xt(), d = we(), b = h(mn()), m = h(wt());
2273
- function h(w) {
2274
- return w && w.__esModule ? w : { default: w };
2275
- }
2276
- function u(w, T) {
2277
- if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap();
2278
- return (u = function(l, N) {
2279
- if (!N && l && l.__esModule) return l;
2280
- var c, f, M = { __proto__: null, default: l };
2281
- if (l === null || typeof l != "object" && typeof l != "function") return M;
2282
- if (c = N ? S : C) {
2283
- if (c.has(l)) return c.get(l);
2284
- c.set(l, M);
2275
+ var n = c(ae), t = g(/* @__PURE__ */ bt()), r = g(st), a = fn(), i = Re(), o = vt(), u = xe(), y = g(gn()), p = g(xt());
2276
+ function g(C) {
2277
+ return C && C.__esModule ? C : { default: C };
2278
+ }
2279
+ function c(C, E) {
2280
+ if (typeof WeakMap == "function") var S = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap();
2281
+ return (c = function(d, M) {
2282
+ if (!M && d && d.__esModule) return d;
2283
+ var l, h, f = { __proto__: null, default: d };
2284
+ if (d === null || typeof d != "object" && typeof d != "function") return f;
2285
+ if (l = M ? D : S) {
2286
+ if (l.has(d)) return l.get(d);
2287
+ l.set(d, f);
2285
2288
  }
2286
- for (const $ in l) $ !== "default" && {}.hasOwnProperty.call(l, $) && ((f = (c = Object.defineProperty) && Object.getOwnPropertyDescriptor(l, $)) && (f.get || f.set) ? c(M, $, f) : M[$] = l[$]);
2287
- return M;
2288
- })(w, T);
2289
- }
2290
- function p() {
2291
- return p = Object.assign ? Object.assign.bind() : function(w) {
2292
- for (var T = 1; T < arguments.length; T++) {
2293
- var C = arguments[T];
2294
- for (var S in C) ({}).hasOwnProperty.call(C, S) && (w[S] = C[S]);
2289
+ for (const _ in d) _ !== "default" && {}.hasOwnProperty.call(d, _) && ((h = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(d, _)) && (h.get || h.set) ? l(f, _, h) : f[_] = d[_]);
2290
+ return f;
2291
+ })(C, E);
2292
+ }
2293
+ function b() {
2294
+ return b = Object.assign ? Object.assign.bind() : function(C) {
2295
+ for (var E = 1; E < arguments.length; E++) {
2296
+ var S = arguments[E];
2297
+ for (var D in S) ({}).hasOwnProperty.call(S, D) && (C[D] = S[D]);
2295
2298
  }
2296
- return w;
2297
- }, p.apply(null, arguments);
2298
- }
2299
- function y(w, T, C) {
2300
- return (T = D(T)) in w ? Object.defineProperty(w, T, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : w[T] = C, w;
2301
- }
2302
- function D(w) {
2303
- var T = g(w, "string");
2304
- return typeof T == "symbol" ? T : T + "";
2305
- }
2306
- function g(w, T) {
2307
- if (typeof w != "object" || !w) return w;
2308
- var C = w[Symbol.toPrimitive];
2309
- if (C !== void 0) {
2310
- var S = C.call(w, T);
2311
- if (typeof S != "object") return S;
2299
+ return C;
2300
+ }, b.apply(null, arguments);
2301
+ }
2302
+ function v(C, E, S) {
2303
+ return (E = T(E)) in C ? Object.defineProperty(C, E, { value: S, enumerable: !0, configurable: !0, writable: !0 }) : C[E] = S, C;
2304
+ }
2305
+ function T(C) {
2306
+ var E = m(C, "string");
2307
+ return typeof E == "symbol" ? E : E + "";
2308
+ }
2309
+ function m(C, E) {
2310
+ if (typeof C != "object" || !C) return C;
2311
+ var S = C[Symbol.toPrimitive];
2312
+ if (S !== void 0) {
2313
+ var D = S.call(C, E);
2314
+ if (typeof D != "object") return D;
2312
2315
  throw new TypeError("@@toPrimitive must return a primitive value.");
2313
2316
  }
2314
- return (T === "string" ? String : Number)(w);
2317
+ return (E === "string" ? String : Number)(C);
2315
2318
  }
2316
- class v extends n.Component {
2319
+ class x extends n.Component {
2317
2320
  // React 16.3+
2318
2321
  // Arity (props, state)
2319
- static getDerivedStateFromProps(T, C) {
2322
+ static getDerivedStateFromProps(E, S) {
2320
2323
  let {
2321
- position: S
2322
- } = T, {
2323
- prevPropsPosition: l
2324
- } = C;
2325
- return S && (!l || S.x !== l.x || S.y !== l.y) ? ((0, m.default)("Draggable: getDerivedStateFromProps %j", {
2326
- position: S,
2327
- prevPropsPosition: l
2324
+ position: D
2325
+ } = E, {
2326
+ prevPropsPosition: d
2327
+ } = S;
2328
+ return D && (!d || D.x !== d.x || D.y !== d.y) ? ((0, p.default)("Draggable: getDerivedStateFromProps %j", {
2329
+ position: D,
2330
+ prevPropsPosition: d
2328
2331
  }), {
2329
- x: S.x,
2330
- y: S.y,
2332
+ x: D.x,
2333
+ y: D.y,
2331
2334
  prevPropsPosition: {
2332
- ...S
2335
+ ...D
2333
2336
  }
2334
2337
  }) : null;
2335
2338
  }
2336
- constructor(T) {
2337
- super(T), y(this, "onDragStart", (C, S) => {
2338
- if ((0, m.default)("Draggable: onDragStart: %j", S), this.props.onStart(C, (0, a.createDraggableData)(this, S)) === !1) return !1;
2339
+ constructor(E) {
2340
+ super(E), v(this, "onDragStart", (S, D) => {
2341
+ if ((0, p.default)("Draggable: onDragStart: %j", D), this.props.onStart(S, (0, o.createDraggableData)(this, D)) === !1) return !1;
2339
2342
  this.setState({
2340
2343
  dragging: !0,
2341
2344
  dragged: !0
2342
2345
  });
2343
- }), y(this, "onDrag", (C, S) => {
2346
+ }), v(this, "onDrag", (S, D) => {
2344
2347
  if (!this.state.dragging) return !1;
2345
- (0, m.default)("Draggable: onDrag: %j", S);
2346
- const l = (0, a.createDraggableData)(this, S), N = {
2347
- x: l.x,
2348
- y: l.y,
2348
+ (0, p.default)("Draggable: onDrag: %j", D);
2349
+ const d = (0, o.createDraggableData)(this, D), M = {
2350
+ x: d.x,
2351
+ y: d.y,
2349
2352
  slackX: 0,
2350
2353
  slackY: 0
2351
2354
  };
2352
2355
  if (this.props.bounds) {
2353
2356
  const {
2354
- x: f,
2355
- y: M
2356
- } = N;
2357
- N.x += this.state.slackX, N.y += this.state.slackY;
2358
- const [$, I] = (0, a.getBoundPosition)(this, N.x, N.y);
2359
- N.x = $, N.y = I, N.slackX = this.state.slackX + (f - N.x), N.slackY = this.state.slackY + (M - N.y), l.x = N.x, l.y = N.y, l.deltaX = N.x - this.state.x, l.deltaY = N.y - this.state.y;
2357
+ x: h,
2358
+ y: f
2359
+ } = M;
2360
+ M.x += this.state.slackX, M.y += this.state.slackY;
2361
+ const [_, W] = (0, o.getBoundPosition)(this, M.x, M.y);
2362
+ M.x = _, M.y = W, M.slackX = this.state.slackX + (h - M.x), M.slackY = this.state.slackY + (f - M.y), d.x = M.x, d.y = M.y, d.deltaX = M.x - this.state.x, d.deltaY = M.y - this.state.y;
2360
2363
  }
2361
- if (this.props.onDrag(C, l) === !1) return !1;
2362
- this.setState(N);
2363
- }), y(this, "onDragStop", (C, S) => {
2364
- if (!this.state.dragging || this.props.onStop(C, (0, a.createDraggableData)(this, S)) === !1) return !1;
2365
- (0, m.default)("Draggable: onDragStop: %j", S);
2366
- const N = {
2364
+ if (this.props.onDrag(S, d) === !1) return !1;
2365
+ this.setState(M);
2366
+ }), v(this, "onDragStop", (S, D) => {
2367
+ if (!this.state.dragging || this.props.onStop(S, (0, o.createDraggableData)(this, D)) === !1) return !1;
2368
+ (0, p.default)("Draggable: onDragStop: %j", D);
2369
+ const M = {
2367
2370
  dragging: !1,
2368
2371
  slackX: 0,
2369
2372
  slackY: 0
2370
2373
  };
2371
2374
  if (!!this.props.position) {
2372
2375
  const {
2373
- x: f,
2374
- y: M
2376
+ x: h,
2377
+ y: f
2375
2378
  } = this.props.position;
2376
- N.x = f, N.y = M;
2379
+ M.x = h, M.y = f;
2377
2380
  }
2378
- this.setState(N);
2381
+ this.setState(M);
2379
2382
  }), this.state = {
2380
2383
  // Whether or not we are currently dragging.
2381
2384
  dragging: !1,
2382
2385
  // Whether or not we have been dragged before.
2383
2386
  dragged: !1,
2384
2387
  // Current transform x and y.
2385
- x: T.position ? T.position.x : T.defaultPosition.x,
2386
- y: T.position ? T.position.y : T.defaultPosition.y,
2388
+ x: E.position ? E.position.x : E.defaultPosition.x,
2389
+ y: E.position ? E.position.y : E.defaultPosition.y,
2387
2390
  prevPropsPosition: {
2388
- ...T.position
2391
+ ...E.position
2389
2392
  },
2390
2393
  // Used for compensating for out-of-bounds drags
2391
2394
  slackX: 0,
2392
2395
  slackY: 0,
2393
2396
  // Can only determine if SVG after mounting
2394
2397
  isElementSVG: !1
2395
- }, T.position && !(T.onDrag || T.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
2398
+ }, E.position && !(E.onDrag || E.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
2396
2399
  }
2397
2400
  componentDidMount() {
2398
2401
  typeof window.SVGElement < "u" && this.findDOMNode() instanceof window.SVGElement && this.setState({
@@ -2411,47 +2414,47 @@ function pn() {
2411
2414
  }
2412
2415
  render() {
2413
2416
  const {
2414
- axis: T,
2415
- bounds: C,
2416
- children: S,
2417
- defaultPosition: l,
2418
- defaultClassName: N,
2419
- defaultClassNameDragging: c,
2420
- defaultClassNameDragged: f,
2421
- position: M,
2422
- positionOffset: $,
2423
- scale: I,
2424
- ...E
2417
+ axis: E,
2418
+ bounds: S,
2419
+ children: D,
2420
+ defaultPosition: d,
2421
+ defaultClassName: M,
2422
+ defaultClassNameDragging: l,
2423
+ defaultClassNameDragged: h,
2424
+ position: f,
2425
+ positionOffset: _,
2426
+ scale: W,
2427
+ ...B
2425
2428
  } = this.props;
2426
- let z = {}, X = null;
2427
- const K = !!!M || this.state.dragging, ee = M || l, se = {
2429
+ let H = {}, X = null;
2430
+ const K = !!!f || this.state.dragging, ee = f || d, oe = {
2428
2431
  // Set left if horizontal drag is enabled
2429
- x: (0, a.canDragX)(this) && K ? this.state.x : ee.x,
2432
+ x: (0, o.canDragX)(this) && K ? this.state.x : ee.x,
2430
2433
  // Set top if vertical drag is enabled
2431
- y: (0, a.canDragY)(this) && K ? this.state.y : ee.y
2434
+ y: (0, o.canDragY)(this) && K ? this.state.y : ee.y
2432
2435
  };
2433
- this.state.isElementSVG ? X = (0, o.createSVGTransform)(se, $) : z = (0, o.createCSSTransform)(se, $);
2434
- const de = (0, i.clsx)(S.props.className || "", N, {
2435
- [c]: this.state.dragging,
2436
- [f]: this.state.dragged
2436
+ this.state.isElementSVG ? X = (0, i.createSVGTransform)(oe, _) : H = (0, i.createCSSTransform)(oe, _);
2437
+ const de = (0, a.clsx)(D.props.className || "", M, {
2438
+ [l]: this.state.dragging,
2439
+ [h]: this.state.dragged
2437
2440
  });
2438
- return /* @__PURE__ */ n.createElement(b.default, p({}, E, {
2441
+ return /* @__PURE__ */ n.createElement(y.default, b({}, B, {
2439
2442
  onStart: this.onDragStart,
2440
2443
  onDrag: this.onDrag,
2441
2444
  onStop: this.onDragStop
2442
- }), /* @__PURE__ */ n.cloneElement(n.Children.only(S), {
2445
+ }), /* @__PURE__ */ n.cloneElement(n.Children.only(D), {
2443
2446
  className: de,
2444
2447
  style: {
2445
- ...S.props.style,
2446
- ...z
2448
+ ...D.props.style,
2449
+ ...H
2447
2450
  },
2448
2451
  transform: X
2449
2452
  }));
2450
2453
  }
2451
2454
  }
2452
- e.default = v, y(v, "displayName", "Draggable"), y(v, "propTypes", {
2455
+ e.default = x, v(x, "displayName", "Draggable"), v(x, "propTypes", {
2453
2456
  // Accepts all props <DraggableCore> accepts.
2454
- ...b.default.propTypes,
2457
+ ...y.default.propTypes,
2455
2458
  /**
2456
2459
  * `axis` determines which axis the draggable can move.
2457
2460
  *
@@ -2553,11 +2556,11 @@ function pn() {
2553
2556
  /**
2554
2557
  * These properties should be defined on the child, not here.
2555
2558
  */
2556
- className: d.dontSetMe,
2557
- style: d.dontSetMe,
2558
- transform: d.dontSetMe
2559
- }), y(v, "defaultProps", {
2560
- ...b.default.defaultProps,
2559
+ className: u.dontSetMe,
2560
+ style: u.dontSetMe,
2561
+ transform: u.dontSetMe
2562
+ }), v(x, "defaultProps", {
2563
+ ...y.default.defaultProps,
2561
2564
  axis: "both",
2562
2565
  bounds: !1,
2563
2566
  defaultClassName: "react-draggable",
@@ -2569,20 +2572,20 @@ function pn() {
2569
2572
  },
2570
2573
  scale: 1
2571
2574
  });
2572
- })(De)), De;
2575
+ })(Se)), Se;
2573
2576
  }
2574
2577
  var it;
2575
- function yn() {
2576
- if (it) return fe.exports;
2578
+ function pn() {
2579
+ if (it) return ue.exports;
2577
2580
  it = 1;
2578
2581
  const {
2579
2582
  default: e,
2580
2583
  DraggableCore: n
2581
- } = pn();
2582
- return fe.exports = e, fe.exports.default = e, fe.exports.DraggableCore = n, fe.exports;
2584
+ } = mn();
2585
+ return ue.exports = e, ue.exports.default = e, ue.exports.DraggableCore = n, ue.exports;
2583
2586
  }
2584
- var bn = yn();
2585
- const vn = /* @__PURE__ */ an(bn), xn = le((e, n) => {
2587
+ var yn = pn();
2588
+ const bn = /* @__PURE__ */ an(yn), vn = le((e, n) => {
2586
2589
  const r = {
2587
2590
  ...{
2588
2591
  // 1. Take it out of the document flow
@@ -2600,30 +2603,30 @@ const vn = /* @__PURE__ */ an(bn), xn = le((e, n) => {
2600
2603
  boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
2601
2604
  },
2602
2605
  ...e.style || {}
2603
- }, i = e.testId || "not-set", o = e.className || "panel", a = Ct(null);
2606
+ }, a = e.testId || "not-set", i = e.className || "panel", o = wt(null);
2604
2607
  return (
2605
2608
  // 3. Pass the internal ref to the Draggable component via 'nodeRef'
2606
2609
  /* @__PURE__ */ s(
2607
- vn,
2610
+ bn,
2608
2611
  {
2609
- nodeRef: a,
2610
- "data-testid": i,
2612
+ nodeRef: o,
2613
+ "data-testid": a,
2611
2614
  axis: "both",
2612
2615
  handle: ".handle",
2613
- onStart: (m, h) => {
2616
+ onStart: (p, g) => {
2614
2617
  e.onDraggingChange?.(!0);
2615
2618
  },
2616
- onStop: (m, h) => {
2619
+ onStop: (p, g) => {
2617
2620
  setTimeout(() => {
2618
2621
  e.onDraggingChange?.(!1);
2619
2622
  }, 100);
2620
2623
  },
2621
- children: /* @__PURE__ */ s("div", { ref: a, className: o, style: r, children: e.children })
2624
+ children: /* @__PURE__ */ s("div", { ref: o, className: i, style: r, children: e.children })
2622
2625
  }
2623
2626
  )
2624
2627
  );
2625
2628
  });
2626
- function tr({ children: e, addCssClasses: n }) {
2629
+ function er({ children: e, addCssClasses: n }) {
2627
2630
  const t = G(
2628
2631
  "w-full h-full flex-1 flex flex-col",
2629
2632
  (n || "gap-2 items-end justify-end content-end").trim()
@@ -2639,52 +2642,52 @@ function tr({ children: e, addCssClasses: n }) {
2639
2642
  }
2640
2643
  );
2641
2644
  }
2642
- function nr({ children: e, addCssClasses: n }) {
2645
+ function tr({ children: e, addCssClasses: n }) {
2643
2646
  const t = G(
2644
2647
  "w-full flex flex-col",
2645
2648
  (n || "items-end").trim()
2646
2649
  );
2647
2650
  return /* @__PURE__ */ s("div", { className: t, children: e });
2648
2651
  }
2649
- const rr = (e) => {
2652
+ const nr = (e) => {
2650
2653
  console.warn("showToast TODO", e);
2651
- }, wn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, or = le((e, n) => {
2652
- let t = lt(Number(e.zoomScale || 0));
2653
- const r = e.responsiveGrid || !1, i = e.isEditing || !1, o = {
2654
+ }, xn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, rr = le((e, n) => {
2655
+ let t = ct(Number(e.zoomScale || 0));
2656
+ const r = e.responsiveGrid || !1, a = e.isEditing || !1, i = {
2654
2657
  "--bwj-dashboard-transform-scale": t,
2655
- "--bwj-dashboard-add-cols": wn(t)
2656
- }, a = G(
2658
+ "--bwj-dashboard-add-cols": xn(t)
2659
+ }, o = G(
2657
2660
  "dashboard-main-grid w-full",
2658
- i ? "editing" : "",
2661
+ a ? "editing" : "",
2659
2662
  r ? "responsive-grid" : "",
2660
- `border border-dashed ${i ? "border-primary border-opacity-50" : "border-transparent"}`
2663
+ `border border-dashed ${a ? "border-primary border-opacity-50" : "border-transparent"}`
2661
2664
  );
2662
- return /* @__PURE__ */ s("div", { className: a, style: o, children: e.children });
2663
- }), $e = "size-5", Cn = (e, n) => {
2665
+ return /* @__PURE__ */ s("div", { className: o, style: i, children: e.children });
2666
+ }), Pe = "size-5", wn = (e, n) => {
2664
2667
  const t = e.hideTitle && !e.isEditing, r = e.noBorder;
2665
- let i = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
2666
- r ? i = `${i} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? i = `${i} ${e.borderCssClasses}` : i = `${i} border-card-invert border-opacity-20`, e.noShadow && (i = `${i} no-shadow`), e.noPadding && (i = `${i} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? i = `${i} ${e.backgroundCssClasses}` : i = `${i} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (i = `${i} ${e.size}-widget`);
2667
- const o = () => {
2668
+ let a = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
2669
+ r ? a = `${a} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? a = `${a} ${e.borderCssClasses}` : a = `${a} border-card-invert border-opacity-20`, e.noShadow && (a = `${a} no-shadow`), e.noPadding && (a = `${a} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? a = `${a} ${e.backgroundCssClasses}` : a = `${a} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (a = `${a} ${e.size}-widget`);
2670
+ const i = () => {
2668
2671
  e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey, e.parentWidgetKey);
2669
- }, a = (b) => {
2670
- e.onMoveClick && e.widgetKey && e.onMoveClick(b, e.widgetKey, e.parentWidgetKey);
2671
- }, d = G(
2672
+ }, o = (y) => {
2673
+ e.onMoveClick && e.widgetKey && e.onMoveClick(y, e.widgetKey, e.parentWidgetKey);
2674
+ }, u = G(
2672
2675
  "widget-header",
2673
2676
  t ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
2674
2677
  t ? "border-opacity-0" : "border-opacity-20"
2675
2678
  );
2676
- return /* @__PURE__ */ W("div", { className: i, children: [
2677
- /* @__PURE__ */ W("div", { className: d, children: [
2678
- /* @__PURE__ */ W("div", { className: "widget-title-wrapper w-full flex flex-row gap-2 items-center justify-between", children: [
2679
- /* @__PURE__ */ W("h2", { className: "widget-title", children: [
2679
+ return /* @__PURE__ */ $("div", { className: a, children: [
2680
+ /* @__PURE__ */ $("div", { className: u, children: [
2681
+ /* @__PURE__ */ $("div", { className: "widget-title-wrapper w-full flex flex-row gap-2 items-center justify-between", children: [
2682
+ /* @__PURE__ */ $("h2", { className: "widget-title", children: [
2680
2683
  e.title,
2681
2684
  " "
2682
2685
  ] }),
2683
2686
  /* @__PURE__ */ s("div", {})
2684
2687
  ] }),
2685
- /* @__PURE__ */ s("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ W("div", { className: "actions-inner", children: [
2688
+ /* @__PURE__ */ s("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ $("div", { className: "actions-inner", children: [
2686
2689
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("span", { className: "hidden", children: "Widget" }) }),
2687
- /* @__PURE__ */ W("div", { className: "actions-buttons-container", children: [
2690
+ /* @__PURE__ */ $("div", { className: "actions-buttons-container", children: [
2688
2691
  /* @__PURE__ */ s(
2689
2692
  J,
2690
2693
  {
@@ -2695,8 +2698,8 @@ const rr = (e) => {
2695
2698
  placement: "top",
2696
2699
  title: `${e.index < 1 ? "Already at min position" : "Move Widget to the left/up"}`
2697
2700
  },
2698
- onClick: () => a(-1),
2699
- children: /* @__PURE__ */ s(ft, { className: $e })
2701
+ onClick: () => o(-1),
2702
+ children: /* @__PURE__ */ s(ft, { className: Pe })
2700
2703
  }
2701
2704
  ),
2702
2705
  /* @__PURE__ */ s(
@@ -2709,8 +2712,8 @@ const rr = (e) => {
2709
2712
  placement: "top",
2710
2713
  title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Widget to the right/down"}`
2711
2714
  },
2712
- onClick: () => a(1),
2713
- children: /* @__PURE__ */ s(ht, { className: $e })
2715
+ onClick: () => o(1),
2716
+ children: /* @__PURE__ */ s(ht, { className: Pe })
2714
2717
  }
2715
2718
  ),
2716
2719
  /* @__PURE__ */ s(
@@ -2722,8 +2725,8 @@ const rr = (e) => {
2722
2725
  placement: "top",
2723
2726
  title: "Remove Widget"
2724
2727
  },
2725
- onClick: () => o(),
2726
- children: /* @__PURE__ */ s(gt, { className: $e })
2728
+ onClick: () => i(),
2729
+ children: /* @__PURE__ */ s(gt, { className: Pe })
2727
2730
  }
2728
2731
  )
2729
2732
  ] })
@@ -2731,178 +2734,178 @@ const rr = (e) => {
2731
2734
  ] }),
2732
2735
  /* @__PURE__ */ s("div", { className: "widget-inner", children: e.children })
2733
2736
  ] });
2734
- }, at = le(Cn), Sn = (e, n) => {
2735
- const t = (o) => o.replace(/[^0-9.]/g, ""), r = t(e).split(".").map(Number), i = t(n).split(".").map(Number);
2736
- return !(r[0] !== i[0] || r[1] < i[1]);
2737
+ }, at = le(wn), Cn = (e, n) => {
2738
+ const t = (i) => i.replace(/[^0-9.]/g, ""), r = t(e).split(".").map(Number), a = t(n).split(".").map(Number);
2739
+ return !(r[0] !== a[0] || r[1] < a[1]);
2737
2740
  };
2738
- function Dn(e) {
2739
- return /* @__PURE__ */ s("div", { className: "dashboard-widget", children: /* @__PURE__ */ W("div", { className: "absolute inset-0 bg-black flex flex-col items-center justify-center text-center", children: [
2741
+ function Sn(e) {
2742
+ return /* @__PURE__ */ s("div", { className: "dashboard-widget", children: /* @__PURE__ */ $("div", { className: "absolute inset-0 bg-black flex flex-col items-center justify-center text-center", children: [
2740
2743
  /* @__PURE__ */ s("div", { className: "w-full absolute opacity-100 text-primary", children: e.title }),
2741
2744
  /* @__PURE__ */ s("div", { className: "animate-ping rounded-full h-32 w-32 border-8 border-white" })
2742
2745
  ] }) });
2743
2746
  }
2744
- function Tn({
2747
+ function Dn({
2745
2748
  index: e,
2746
2749
  maxIndex: n,
2747
2750
  widgetKey: t,
2748
2751
  parentWidgetKey: r,
2749
- targetContainerKey: i,
2750
- childWidgetsConfig: o,
2751
- widgetCatalog: a,
2752
- isEditing: d,
2752
+ targetContainerKey: a,
2753
+ childWidgetsConfig: i,
2754
+ widgetCatalog: o,
2755
+ isEditing: u,
2753
2756
  // for additional props passed to all widget from the dashboard through the DynamicWidgetLoader:
2754
- extraProps: b,
2755
- onRemoveClick: m,
2756
- onMoveClick: h,
2757
- selectContainer: u
2757
+ extraProps: y,
2758
+ onRemoveClick: p,
2759
+ onMoveClick: g,
2760
+ selectContainer: c
2758
2761
  }) {
2759
- const p = `${t}`.split("_"), y = p.length > 1, D = y ? p[0] : t, g = a.get(D);
2760
- if (!g)
2761
- return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
2762
+ const b = `${t}`.split("_"), v = b.length > 1, T = v ? b[0] : t, m = o.get(T);
2763
+ if (!m)
2764
+ return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ $("p", { children: [
2762
2765
  "Widget not found in catalog: ",
2763
- D
2766
+ T
2764
2767
  ] }) });
2765
- let v = null, w = !1;
2766
- const T = !!g.isContainer, C = y ? mt(t) : "", S = T ? (o || []).filter((c) => c.parentWidgetKey === t) : [], l = {
2768
+ let x = null, C = !1;
2769
+ const E = !!m.isContainer, S = v ? dt(t) : "", D = E ? (i || []).filter((l) => l.parentWidgetKey === t) : [], d = {
2767
2770
  index: e,
2768
2771
  maxIndex: n,
2769
2772
  widgetKey: t,
2770
2773
  parentWidgetKey: r,
2771
- isEditing: d,
2772
- extraProps: b,
2773
- title: y ? C : g.title,
2774
- onRemoveClick: m,
2775
- onMoveClick: h
2774
+ isEditing: u,
2775
+ extraProps: y,
2776
+ title: v ? S : m.title,
2777
+ onRemoveClick: p,
2778
+ onMoveClick: g
2776
2779
  };
2777
- if (g.component ? (v = g.component, w = !1) : g.loader && (w = !0, v = st(() => {
2778
- if (!g) return null;
2779
- const c = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", f = g.meta?.externalDependencies || [], M = f.find(($) => $.startsWith("react@"));
2780
- if (M) {
2781
- const $ = M.split("@")[1];
2782
- if (!Sn(c, $))
2780
+ if (m.component ? (x = m.component, C = !1) : m.loader && (C = !0, x = ot(() => {
2781
+ if (!m) return null;
2782
+ const l = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", h = m.meta?.externalDependencies || [], f = h.find((_) => _.startsWith("react@"));
2783
+ if (f) {
2784
+ const _ = f.split("@")[1];
2785
+ if (!Cn(l, _))
2783
2786
  return ae.lazy(async () => ({
2784
- default: () => /* @__PURE__ */ s(at, { ...l, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
2785
- /* @__PURE__ */ W("p", { className: "font-bold", children: [
2787
+ default: () => /* @__PURE__ */ s(at, { ...d, children: /* @__PURE__ */ $("div", { className: "p-4 border border-dashed border-danger", children: [
2788
+ /* @__PURE__ */ $("p", { className: "font-bold", children: [
2786
2789
  'Failed to load "',
2787
2790
  t,
2788
2791
  '"'
2789
2792
  ] }),
2790
- /* @__PURE__ */ W("p", { className: "text-xs italic", children: [
2793
+ /* @__PURE__ */ $("p", { className: "text-xs italic", children: [
2791
2794
  "The remote plugin is unavailable or incompatible.",
2792
- /* @__PURE__ */ W("p", { className: "font-bold text-sm", children: [
2795
+ /* @__PURE__ */ $("p", { className: "font-bold text-sm", children: [
2793
2796
  "Version Mismatch: ",
2794
2797
  t
2795
2798
  ] }),
2796
- /* @__PURE__ */ W("p", { className: "text-xs", children: [
2799
+ /* @__PURE__ */ $("p", { className: "text-xs", children: [
2797
2800
  "Widget requires ",
2798
- /* @__PURE__ */ W("strong", { children: [
2801
+ /* @__PURE__ */ $("strong", { children: [
2799
2802
  "React ",
2800
- $
2803
+ _
2801
2804
  ] }),
2802
2805
  ". Host is running",
2803
2806
  " ",
2804
- /* @__PURE__ */ s("strong", { children: c }),
2807
+ /* @__PURE__ */ s("strong", { children: l }),
2805
2808
  "."
2806
2809
  ] })
2807
2810
  ] }),
2808
- /* @__PURE__ */ W("div", { className: "flex flex-col mt-3", children: [
2811
+ /* @__PURE__ */ $("div", { className: "flex flex-col mt-3", children: [
2809
2812
  /* @__PURE__ */ s("h5", { children: "Externals:" }),
2810
- /* @__PURE__ */ s("dl", { className: "ml-2 flex flex-col text-xs", children: f.map((I, E) => /* @__PURE__ */ W("dd", { children: [
2813
+ /* @__PURE__ */ s("dl", { className: "ml-2 flex flex-col text-xs", children: h.map((W, B) => /* @__PURE__ */ $("dd", { children: [
2811
2814
  "- ",
2812
- I
2813
- ] }, E)) })
2815
+ W
2816
+ ] }, B)) })
2814
2817
  ] })
2815
2818
  ] }) })
2816
2819
  }));
2817
2820
  }
2818
- if (g.component)
2819
- return g.component;
2820
- if (g.loader) {
2821
- const $ = async () => {
2821
+ if (m.component)
2822
+ return m.component;
2823
+ if (m.loader) {
2824
+ const _ = async () => {
2822
2825
  try {
2823
- return await g.loader();
2824
- } catch (I) {
2825
- return console.error(`CDN Load Failure for ${t}:`, I), {
2826
- default: () => /* @__PURE__ */ s(at, { ...l, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
2827
- /* @__PURE__ */ W("p", { className: "font-bold", children: [
2826
+ return await m.loader();
2827
+ } catch (W) {
2828
+ return console.error(`CDN Load Failure for ${t}:`, W), {
2829
+ default: () => /* @__PURE__ */ s(at, { ...d, children: /* @__PURE__ */ $("div", { className: "p-4 border border-dashed border-danger", children: [
2830
+ /* @__PURE__ */ $("p", { className: "font-bold", children: [
2828
2831
  'Failed to load "',
2829
2832
  t,
2830
2833
  '"'
2831
2834
  ] }),
2832
2835
  /* @__PURE__ */ s("p", { className: "text-xs italic", children: "The remote plugin is unavailable or incompatible." }),
2833
- /* @__PURE__ */ s("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(g.meta || {}, null, 2) })
2836
+ /* @__PURE__ */ s("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(m.meta || {}, null, 2) })
2834
2837
  ] }) })
2835
2838
  };
2836
2839
  }
2837
2840
  };
2838
- return ae.lazy($);
2841
+ return ae.lazy(_);
2839
2842
  }
2840
2843
  return null;
2841
- }, [g, t])), !v)
2842
- return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
2844
+ }, [m, t])), !x)
2845
+ return /* @__PURE__ */ s("div", { className: "flex", children: /* @__PURE__ */ $("p", { children: [
2843
2846
  "Widget definition incomplete: ",
2844
- D
2847
+ T
2845
2848
  ] }) });
2846
- const N = T ? {
2847
- highlight: i === t,
2848
- selectContainer: u,
2849
+ const M = E ? {
2850
+ highlight: a === t,
2851
+ selectContainer: c,
2849
2852
  // The children prop is the recursive call back to DynamicWidgetLoader
2850
- children: S.map((c, f) => /* @__PURE__ */ s(
2851
- Tn,
2853
+ children: D.map((l, h) => /* @__PURE__ */ s(
2854
+ Dn,
2852
2855
  {
2853
- index: f,
2854
- maxIndex: S.length - 1,
2855
- widgetKey: c.widgetKey,
2856
- parentWidgetKey: c.parentWidgetKey,
2857
- widgetCatalog: a,
2858
- isEditing: d,
2859
- extraProps: b,
2860
- onRemoveClick: m,
2861
- onMoveClick: h
2856
+ index: h,
2857
+ maxIndex: D.length - 1,
2858
+ widgetKey: l.widgetKey,
2859
+ parentWidgetKey: l.parentWidgetKey,
2860
+ widgetCatalog: o,
2861
+ isEditing: u,
2862
+ extraProps: y,
2863
+ onRemoveClick: p,
2864
+ onMoveClick: g
2862
2865
  },
2863
- `${c.widgetKey}_${f}`
2866
+ `${l.widgetKey}_${h}`
2864
2867
  ))
2865
2868
  } : {};
2866
- return w ? /* @__PURE__ */ s(St, { fallback: /* @__PURE__ */ s(Dn, { title: `Loading ${g.title}` }), children: /* @__PURE__ */ s(v, { ...l, ...N }) }) : /* @__PURE__ */ s(v, { ...l, ...N });
2869
+ return C ? /* @__PURE__ */ s(Ct, { fallback: /* @__PURE__ */ s(Sn, { title: `Loading ${m.title}` }), children: /* @__PURE__ */ s(x, { ...d, ...M }) }) : /* @__PURE__ */ s(x, { ...d, ...M });
2867
2870
  }
2868
- const xe = "size-5";
2869
- function ke(e) {
2870
- const n = e.highlight || !1, t = e.direction || "column", r = e.children.length > 0, i = e.isEditing || !1;
2871
- let d = n ? "border-transparent" : i && !r ? "border-card-invert" : "border-transparent";
2872
- const b = ["large", "xlarge"].includes(e.size || "");
2873
- let m = "";
2874
- ["large", "xlarge"].indexOf(e.size || "") > -1 && (m = `${e.size}-widget`);
2875
- let h = "";
2876
- t === "row" && !r ? h = "min-h-48" : t === "column" && !r && (h = "min-h-96");
2877
- let u = G(
2871
+ const ve = "size-5";
2872
+ function Oe(e) {
2873
+ const n = e.highlight || !1, t = e.direction || "column", r = e.children.length > 0, a = e.isEditing || !1;
2874
+ let u = n ? "border-transparent" : a && !r ? "border-card-invert" : "border-transparent";
2875
+ const y = ["large", "xlarge"].includes(e.size || "");
2876
+ let p = "";
2877
+ ["large", "xlarge"].indexOf(e.size || "") > -1 && (p = `${e.size}-widget`);
2878
+ let g = "";
2879
+ t === "row" && !r ? g = "min-h-48" : t === "column" && !r && (g = "min-h-96");
2880
+ let c = G(
2878
2881
  "dashboard-widget-container relative ",
2879
2882
  r ? "" : "has-no-children",
2880
- i ? "editing" : "",
2881
- h,
2882
- m,
2883
- b ? "widget-container-grid" : "widget-container-flex",
2883
+ a ? "editing" : "",
2884
+ g,
2885
+ p,
2886
+ y ? "widget-container-grid" : "widget-container-flex",
2884
2887
  `direction-${t}`,
2885
- `border ${d}`,
2886
- `${n ? "highlight-container" : ""} ${d}`
2887
- ), p = `widget-container-header direction-${t} flex items-center border-1 ${d}`;
2888
- const y = () => {
2888
+ `border ${u}`,
2889
+ `${n ? "highlight-container" : ""} ${u}`
2890
+ ), b = `widget-container-header direction-${t} flex items-center border-1 ${u}`;
2891
+ const v = () => {
2889
2892
  e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
2890
- }, D = (v) => {
2891
- e.onMoveClick && e.widgetKey && e.onMoveClick(v, e.widgetKey, e.parentWidgetKey);
2892
- }, g = () => {
2893
+ }, T = (x) => {
2894
+ e.onMoveClick && e.widgetKey && e.onMoveClick(x, e.widgetKey, e.parentWidgetKey);
2895
+ }, m = () => {
2893
2896
  e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
2894
2897
  };
2895
- return /* @__PURE__ */ W("div", { "data-testid": `container_${e.widgetKey}`, className: u, children: [
2896
- /* @__PURE__ */ W("div", { className: p, children: [
2898
+ return /* @__PURE__ */ $("div", { "data-testid": `container_${e.widgetKey}`, className: c, children: [
2899
+ /* @__PURE__ */ $("div", { className: b, children: [
2897
2900
  /* @__PURE__ */ s(
2898
2901
  "div",
2899
2902
  {
2900
2903
  className: "widget-title-wrapper w-full flex whitespace-nowrap",
2901
- onClick: g,
2904
+ onClick: m,
2902
2905
  children: /* @__PURE__ */ s("span", { className: "text-sm font-semibold capitalize", children: e.title })
2903
2906
  }
2904
2907
  ),
2905
- /* @__PURE__ */ s("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ s("div", { className: "actions-inner", children: /* @__PURE__ */ W("div", { className: "actions-buttons-container", children: [
2908
+ /* @__PURE__ */ s("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ s("div", { className: "actions-inner", children: /* @__PURE__ */ $("div", { className: "actions-buttons-container", children: [
2906
2909
  /* @__PURE__ */ s(
2907
2910
  J,
2908
2911
  {
@@ -2913,11 +2916,11 @@ function ke(e) {
2913
2916
  placement: "top",
2914
2917
  title: "Target this Container"
2915
2918
  },
2916
- onClick: g,
2919
+ onClick: m,
2917
2920
  children: /* @__PURE__ */ s(
2918
- tn,
2921
+ en,
2919
2922
  {
2920
- className: `${xe} ${n ? "text-success" : "text-disabled"}`
2923
+ className: `${ve} ${n ? "text-success" : "text-disabled"}`
2921
2924
  }
2922
2925
  )
2923
2926
  }
@@ -2932,8 +2935,8 @@ function ke(e) {
2932
2935
  placement: "top",
2933
2936
  title: `${e.index < 1 ? "Already at min position" : "Move Container to the left/up"}`
2934
2937
  },
2935
- onClick: () => D(-1),
2936
- children: /* @__PURE__ */ s(ft, { className: xe })
2938
+ onClick: () => T(-1),
2939
+ children: /* @__PURE__ */ s(ft, { className: ve })
2937
2940
  }
2938
2941
  ),
2939
2942
  /* @__PURE__ */ s(
@@ -2946,8 +2949,8 @@ function ke(e) {
2946
2949
  placement: "top",
2947
2950
  title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Container to the right/down"}`
2948
2951
  },
2949
- onClick: () => D(1),
2950
- children: /* @__PURE__ */ s(ht, { className: xe })
2952
+ onClick: () => T(1),
2953
+ children: /* @__PURE__ */ s(ht, { className: ve })
2951
2954
  }
2952
2955
  ),
2953
2956
  /* @__PURE__ */ s(
@@ -2959,8 +2962,8 @@ function ke(e) {
2959
2962
  placement: "top",
2960
2963
  title: "Remove Container"
2961
2964
  },
2962
- onClick: () => y(),
2963
- children: /* @__PURE__ */ s(gt, { className: xe })
2965
+ onClick: () => v(),
2966
+ children: /* @__PURE__ */ s(gt, { className: ve })
2964
2967
  }
2965
2968
  )
2966
2969
  ] }) }) })
@@ -2970,136 +2973,129 @@ function ke(e) {
2970
2973
  }
2971
2974
  function ir(e) {
2972
2975
  const { direction: n, ...t } = e;
2973
- return /* @__PURE__ */ s(ke, { direction: "column", ...t });
2976
+ return /* @__PURE__ */ s(Oe, { direction: "column", ...t });
2974
2977
  }
2975
2978
  function ar(e) {
2976
2979
  const { size: n, ...t } = e;
2977
- return /* @__PURE__ */ s(ke, { size: "large", ...t });
2980
+ return /* @__PURE__ */ s(Oe, { size: "large", ...t });
2978
2981
  }
2979
- function sr(e) {
2982
+ function or(e) {
2980
2983
  const { direction: n, ...t } = e;
2981
- return /* @__PURE__ */ s(ke, { direction: "row", ...t });
2984
+ return /* @__PURE__ */ s(Oe, { direction: "row", ...t });
2982
2985
  }
2983
- function We({
2986
+ function $e({
2984
2987
  // widgetKey,
2985
2988
  metaData: e,
2986
2989
  alreadyAdded: n,
2987
2990
  addWidget: t
2988
2991
  }) {
2989
- const [r, i] = ce(!1), o = e.icon || nn, a = e.name || "Unknown", d = e.description || "---", m = (e.noDuplicatedWidgets || !1) && n, h = G(`
2992
+ const [r, a] = se(!1), i = e.icon || tn, o = e.name || "Unknown", u = e.description || "---", p = (e.noDuplicatedWidgets || !1) && n, g = G(`
2990
2993
  flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
2991
- ${m ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
2994
+ ${p ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
2992
2995
  `);
2993
- return /* @__PURE__ */ W("div", { className: h, style: { width: "calc(100% - 1rem)" }, onClick: () => {
2994
- m || t();
2996
+ return /* @__PURE__ */ $("div", { className: g, style: { width: "calc(100% - 1rem)" }, onClick: () => {
2997
+ p || t();
2995
2998
  }, children: [
2996
- /* @__PURE__ */ s(o, { className: "" }),
2997
- /* @__PURE__ */ W("div", { className: "w-full", children: [
2998
- /* @__PURE__ */ W("div", { className: "flex flex-row items-center gap-2 justify-between", children: [
2999
- /* @__PURE__ */ s("span", { className: "font-bold", children: a }),
3000
- /* @__PURE__ */ s("div", { className: "text-xs", children: m ? "(Added)" : "" })
2999
+ /* @__PURE__ */ s(i, { className: "" }),
3000
+ /* @__PURE__ */ $("div", { className: "w-full", children: [
3001
+ /* @__PURE__ */ $("div", { className: "flex flex-row items-center gap-2 justify-between", children: [
3002
+ /* @__PURE__ */ s("span", { className: "font-bold", children: o }),
3003
+ /* @__PURE__ */ s("div", { className: "text-xs", children: p ? "(Added)" : "" })
3001
3004
  ] }),
3002
- /* @__PURE__ */ W("div", { className: "flex flex-col text-xs", children: [
3003
- /* @__PURE__ */ s("div", { children: d }),
3004
- /* @__PURE__ */ s("div", { className: "mt-3 cursor-pointer", onClick: (y) => {
3005
- y.stopPropagation(), y.preventDefault(), i(!r);
3005
+ /* @__PURE__ */ $("div", { className: "flex flex-col text-xs", children: [
3006
+ /* @__PURE__ */ s("div", { children: u }),
3007
+ /* @__PURE__ */ s("div", { className: "mt-3 cursor-pointer", onClick: (v) => {
3008
+ v.stopPropagation(), v.preventDefault(), a(!r);
3006
3009
  }, children: "Externals:" }),
3007
- r && /* @__PURE__ */ s("dl", { className: "ml-2 flex flex-col text-xs", children: e.externalDependencies.map((y, D) => /* @__PURE__ */ W("dd", { children: [
3010
+ r && /* @__PURE__ */ s("dl", { className: "ml-2 flex flex-col text-xs", children: e.externalDependencies.map((v, T) => /* @__PURE__ */ $("dd", { children: [
3008
3011
  "- ",
3009
- y
3010
- ] }, D)) })
3012
+ v
3013
+ ] }, T)) })
3011
3014
  ] })
3012
3015
  ] })
3013
3016
  ] });
3014
3017
  }
3015
- function En({
3016
- item: e,
3017
- onSettingItemChanged: n
3018
- }) {
3019
- const t = e.name || "Unknown", r = e.description || "---", i = G(`
3018
+ function Tn({ item: e, onSettingItemChanged: n }) {
3019
+ const t = e.name || "Unknown", r = e.description || "---", a = G(`
3020
3020
  flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
3021
- `), o = (d) => {
3022
- const b = d.key;
3023
- if (["ArrowUp", "ArrowDown"].includes(b)) {
3024
- d.preventDefault();
3025
- const m = _t.incrementOrDecrementValue(
3021
+ `), i = (u) => {
3022
+ const y = u.key;
3023
+ if (["ArrowUp", "ArrowDown"].includes(y)) {
3024
+ u.preventDefault();
3025
+ const p = Nt.incrementOrDecrementValue(
3026
3026
  e,
3027
- b === "ArrowUp" ? 1 : -1
3027
+ y === "ArrowUp" ? 1 : -1
3028
3028
  );
3029
- n(m);
3029
+ n(p);
3030
3030
  }
3031
- }, a = (d) => {
3031
+ }, o = (u) => {
3032
3032
  n({
3033
3033
  ...e,
3034
- value: d.target.value || ""
3034
+ value: u.target.value || ""
3035
3035
  });
3036
3036
  };
3037
- return /* @__PURE__ */ s("div", { className: i, style: { width: "calc(100% - 1rem)" }, children: /* @__PURE__ */ W("div", { className: "w-full", children: [
3037
+ return /* @__PURE__ */ s("div", { className: a, style: { width: "calc(100% - 1rem)" }, children: /* @__PURE__ */ $("div", { className: "w-full", children: [
3038
3038
  /* @__PURE__ */ s("div", { className: "flex flex-row items-center gap-2 justify-between", children: /* @__PURE__ */ s("span", { className: "font-bold", children: t }) }),
3039
3039
  /* @__PURE__ */ s("div", { className: "flex flex-col gap-2 text-xs", children: /* @__PURE__ */ s("div", { children: r }) }),
3040
- /* @__PURE__ */ W("div", { children: [
3040
+ /* @__PURE__ */ $("div", { children: [
3041
3041
  "Value:",
3042
3042
  /* @__PURE__ */ s(
3043
- pt,
3043
+ mt,
3044
3044
  {
3045
3045
  label: "Filter...",
3046
3046
  size: "small",
3047
3047
  className: "w-full",
3048
3048
  value: e.value,
3049
- onChange: a,
3050
- onKeyDown: o
3049
+ onChange: o,
3050
+ onKeyDown: i
3051
3051
  }
3052
3052
  )
3053
3053
  ] })
3054
3054
  ] }) });
3055
3055
  }
3056
- const Ie = (e, n) => [
3056
+ const We = (e, n) => [
3057
3057
  ...n.widgets.filter((r) => r.indexOf("Container") === -1),
3058
3058
  ...n.childWidgetsConfig.map((r) => r.widgetKey)
3059
3059
  ].includes(e);
3060
- function cr({
3061
- targetContainerKey: e,
3062
- widgetsCatalog: n,
3063
- currentDashboardConfig: t,
3064
- undoStatus: r,
3065
- addWidget: i,
3066
- addContainer: o,
3067
- onSettingItemsUpdated: a,
3068
- onResetToDefaultDashboardClick: d,
3069
- onUndoOrRedo: b,
3070
- onDoneClick: m
3071
- }) {
3072
- const [h, u] = ce("Editing"), [p, y] = ce(0), [D, g] = ce(""), w = Array.from(n.keys()).map((E) => ({
3073
- widgetKey: E,
3074
- metaData: $t(E, n)
3075
- })), T = (E) => {
3076
- g(E.target.value);
3077
- }, C = (E) => {
3078
- const z = D.trim().toLowerCase();
3079
- return z.length < 1 ? !0 : E.name.trim().toLowerCase().includes(z) || E.description.toLowerCase().includes(z);
3080
- }, S = (E) => {
3081
- const z = D.trim().toLowerCase();
3082
- return z.length < 1 ? !0 : E.name.trim().toLowerCase().includes(z) || E.description.toLowerCase().includes(z);
3083
- }, l = (E) => G(
3060
+ function sr(e) {
3061
+ const {
3062
+ currentDashboardConfig: n,
3063
+ undoStatus: t,
3064
+ addContainer: r,
3065
+ onResetToDefaultDashboardClick: a,
3066
+ onUndoOrRedo: i,
3067
+ onDoneClick: o
3068
+ } = e, [u, y] = se("Editing"), [p, g] = se(0), [c, b] = se(""), T = Array.from(e.widgetsCatalog.keys()).map((f) => ({
3069
+ widgetKey: f,
3070
+ metaData: It(f, e.widgetsCatalog)
3071
+ })), m = !!e.targetContainerKey, x = (f) => {
3072
+ b(f.target.value);
3073
+ }, C = (f) => {
3074
+ const _ = c.trim().toLowerCase();
3075
+ return _.length < 1 ? !0 : f.name.trim().toLowerCase().includes(_) || f.description.toLowerCase().includes(_);
3076
+ }, E = (f) => {
3077
+ const _ = c.trim().toLowerCase();
3078
+ return _.length < 1 ? !0 : f.name.trim().toLowerCase().includes(_) || f.description.toLowerCase().includes(_);
3079
+ }, S = (f) => G(
3084
3080
  "px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
3085
- E === p ? "text-primary border-primary" : ""
3086
- ), N = !!e;
3087
- Dt(() => {
3088
- if (e) {
3089
- y(0);
3090
- const E = mt(e);
3091
- u(`Editing ${E}`);
3081
+ f === p ? "text-primary border-primary" : ""
3082
+ ), D = (f) => {
3083
+ m ? e.addWidget(f, e.targetContainerKey) : e.addWidget(f);
3084
+ }, d = (f) => {
3085
+ const _ = (e.currentDashboardConfig.cssSettings || []).map((W) => W.key === f.key ? f : W);
3086
+ e.onSettingItemsUpdated(_);
3087
+ }, [M, l] = se(!1), h = (f) => {
3088
+ l(f);
3089
+ };
3090
+ return St(() => {
3091
+ if (e.targetContainerKey) {
3092
+ g(0);
3093
+ const f = dt(e.targetContainerKey);
3094
+ y(`Editing ${f}`);
3092
3095
  } else
3093
- u("Editing Dashboard");
3094
- }, [e]);
3095
- const c = (E) => {
3096
- N ? i(E, e) : i(E);
3097
- }, f = (E) => {
3098
- const z = (t.cssSettings || []).map((X) => X.key === E.key ? E : X);
3099
- a(z);
3100
- }, [M, $] = ce(!1);
3101
- return /* @__PURE__ */ s(
3102
- xn,
3096
+ y("Editing Dashboard");
3097
+ }, [e.targetContainerKey]), /* @__PURE__ */ s(
3098
+ vn,
3103
3099
  {
3104
3100
  testId: "dashboard-catalog-flyout",
3105
3101
  className: "bg-body content-body bg-opacity-70 border-2 border-primary",
@@ -3110,23 +3106,21 @@ function cr({
3110
3106
  minHeight: "360px",
3111
3107
  backdropFilter: "blur(8px)"
3112
3108
  },
3113
- onDraggingChange: (E) => {
3114
- $(E);
3115
- },
3116
- children: /* @__PURE__ */ W("div", { className: "flex flex-col gap-2 p-2", children: [
3117
- /* @__PURE__ */ W("div", { className: "flex flex-row gap-2 justify-between", children: [
3118
- /* @__PURE__ */ W("div", { className: "handle flex-1 flex gap-2 w-full hover:text-primary cursor-grab", children: [
3119
- M ? /* @__PURE__ */ s(en, { className: "size-5" }) : /* @__PURE__ */ s(Qt, { className: "size-5" }),
3109
+ onDraggingChange: h,
3110
+ children: /* @__PURE__ */ $("div", { className: "flex flex-col gap-2 p-2", children: [
3111
+ /* @__PURE__ */ $("div", { className: "flex flex-row gap-2 justify-between", children: [
3112
+ /* @__PURE__ */ $("div", { className: "handle flex-1 flex gap-2 w-full hover:text-primary cursor-grab", children: [
3113
+ M ? /* @__PURE__ */ s(Qt, { className: "size-5" }) : /* @__PURE__ */ s(Jt, { className: "size-5" }),
3120
3114
  /* @__PURE__ */ s(
3121
3115
  "h2",
3122
3116
  {
3123
3117
  className: "flex-1 text-base margin-0 capitalize",
3124
- title: N ? h : `Editing dashboard: ${t.dashboardName}`,
3125
- children: h
3118
+ title: m ? u : `Editing dashboard: ${n.dashboardName}`,
3119
+ children: u
3126
3120
  }
3127
3121
  )
3128
3122
  ] }),
3129
- /* @__PURE__ */ W("div", { className: "flex flex-row gap-2 items-center", children: [
3123
+ /* @__PURE__ */ $("div", { className: "flex flex-row gap-2 items-center", children: [
3130
3124
  /* @__PURE__ */ s(
3131
3125
  J,
3132
3126
  {
@@ -3136,9 +3130,9 @@ function cr({
3136
3130
  placement: "bottom",
3137
3131
  title: "Undo"
3138
3132
  },
3139
- disabled: r.isUndoDisabled,
3140
- onClick: () => b("Undo"),
3141
- children: /* @__PURE__ */ s(Zt, { className: "size-5" })
3133
+ disabled: t.isUndoDisabled,
3134
+ onClick: () => i("Undo"),
3135
+ children: /* @__PURE__ */ s(Gt, { className: "size-5" })
3142
3136
  }
3143
3137
  ),
3144
3138
  /* @__PURE__ */ s(
@@ -3150,9 +3144,9 @@ function cr({
3150
3144
  placement: "bottom",
3151
3145
  title: "Redo"
3152
3146
  },
3153
- disabled: r.isRedoDisabled,
3154
- onClick: () => b("Redo"),
3155
- children: /* @__PURE__ */ s(Jt, { className: "size-5" })
3147
+ disabled: t.isRedoDisabled,
3148
+ onClick: () => i("Redo"),
3149
+ children: /* @__PURE__ */ s(Zt, { className: "size-5" })
3156
3150
  }
3157
3151
  ),
3158
3152
  /* @__PURE__ */ s(
@@ -3164,29 +3158,29 @@ function cr({
3164
3158
  placement: "bottom",
3165
3159
  title: "Reset this dashboard to the default configuration"
3166
3160
  },
3167
- onClick: d,
3168
- children: /* @__PURE__ */ s(Gt, { className: "size-5" })
3161
+ onClick: a,
3162
+ children: /* @__PURE__ */ s(Xt, { className: "size-5" })
3169
3163
  }
3170
3164
  )
3171
3165
  ] })
3172
3166
  ] }),
3173
- /* @__PURE__ */ W("div", { className: "flex border-b border-gray-200", children: [
3174
- /* @__PURE__ */ s("button", { onClick: () => y(0), className: l(0), children: "Widgets" }),
3175
- /* @__PURE__ */ s("button", { onClick: () => y(1), className: l(1), children: "Charts" }),
3176
- !N && /* @__PURE__ */ s("button", { onClick: () => y(2), className: l(2), children: "Containers" }),
3177
- !N && /* @__PURE__ */ s("button", { onClick: () => y(3), className: l(3), children: /* @__PURE__ */ s(Xt, {}) })
3167
+ /* @__PURE__ */ $("div", { className: "flex border-b border-gray-200", children: [
3168
+ /* @__PURE__ */ s("button", { onClick: () => g(0), className: S(0), children: "Widgets" }),
3169
+ /* @__PURE__ */ s("button", { onClick: () => g(1), className: S(1), children: "Charts" }),
3170
+ !m && /* @__PURE__ */ s("button", { onClick: () => g(2), className: S(2), children: "Containers" }),
3171
+ !m && /* @__PURE__ */ s("button", { onClick: () => g(3), className: S(3), children: /* @__PURE__ */ s(Ht, {}) })
3178
3172
  ] }),
3179
3173
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-1 w-full", children: /* @__PURE__ */ s(
3180
- pt,
3174
+ mt,
3181
3175
  {
3182
3176
  label: "Filter...",
3183
3177
  size: "small",
3184
3178
  className: "w-full",
3185
- value: D,
3186
- onChange: T
3179
+ value: c,
3180
+ onChange: x
3187
3181
  }
3188
3182
  ) }),
3189
- /* @__PURE__ */ W(
3183
+ /* @__PURE__ */ $(
3190
3184
  "div",
3191
3185
  {
3192
3186
  className: "flex flex-col gap-2 overflow-x-hidden overflow-y-auto",
@@ -3194,47 +3188,47 @@ function cr({
3194
3188
  maxHeight: "360px"
3195
3189
  },
3196
3190
  children: [
3197
- p === 0 && w.filter(
3198
- (E) => E.metaData.categories.includes("Widget") && C(E.metaData)
3199
- ).map((E) => /* @__PURE__ */ s(
3200
- We,
3191
+ p === 0 && T.filter(
3192
+ (f) => f.metaData.categories.includes("Widget") && C(f.metaData)
3193
+ ).map((f) => /* @__PURE__ */ s(
3194
+ $e,
3201
3195
  {
3202
- widgetKey: E.widgetKey,
3203
- metaData: E.metaData,
3204
- alreadyAdded: Ie(E.widgetKey, t),
3205
- addWidget: () => c(E.widgetKey)
3196
+ widgetKey: f.widgetKey,
3197
+ metaData: f.metaData,
3198
+ alreadyAdded: We(f.widgetKey, n),
3199
+ addWidget: () => D(f.widgetKey)
3206
3200
  },
3207
- E.widgetKey
3201
+ f.widgetKey
3208
3202
  )),
3209
- p === 1 && w.filter(
3210
- (E) => E.metaData.categories.includes("Chart") && C(E.metaData)
3211
- ).map((E) => /* @__PURE__ */ s(
3212
- We,
3203
+ p === 1 && T.filter(
3204
+ (f) => f.metaData.categories.includes("Chart") && C(f.metaData)
3205
+ ).map((f) => /* @__PURE__ */ s(
3206
+ $e,
3213
3207
  {
3214
- widgetKey: E.widgetKey,
3215
- metaData: E.metaData,
3216
- alreadyAdded: Ie(E.widgetKey, t),
3217
- addWidget: () => c(E.widgetKey)
3208
+ widgetKey: f.widgetKey,
3209
+ metaData: f.metaData,
3210
+ alreadyAdded: We(f.widgetKey, n),
3211
+ addWidget: () => D(f.widgetKey)
3218
3212
  },
3219
- E.widgetKey
3213
+ f.widgetKey
3220
3214
  )),
3221
- !N && p === 2 && w.filter((E) => E.metaData.categories.includes("Container")).map((E) => /* @__PURE__ */ s(
3222
- We,
3215
+ !m && p === 2 && T.filter((f) => f.metaData.categories.includes("Container")).map((f) => /* @__PURE__ */ s(
3216
+ $e,
3223
3217
  {
3224
- widgetKey: E.widgetKey,
3225
- metaData: E.metaData,
3226
- alreadyAdded: Ie(E.widgetKey, t),
3227
- addWidget: () => o(E.widgetKey)
3218
+ widgetKey: f.widgetKey,
3219
+ metaData: f.metaData,
3220
+ alreadyAdded: We(f.widgetKey, n),
3221
+ addWidget: () => r(f.widgetKey)
3228
3222
  },
3229
- E.widgetKey
3223
+ f.widgetKey
3230
3224
  )),
3231
- !N && p === 3 && (t.cssSettings || []).filter(S).map((E) => /* @__PURE__ */ s(
3232
- En,
3225
+ !m && p === 3 && (n.cssSettings || []).filter(E).map((f) => /* @__PURE__ */ s(
3226
+ Tn,
3233
3227
  {
3234
- item: E,
3235
- onSettingItemChanged: f
3228
+ item: f,
3229
+ onSettingItemChanged: d
3236
3230
  },
3237
- E.key
3231
+ f.key
3238
3232
  ))
3239
3233
  ]
3240
3234
  }
@@ -3247,7 +3241,7 @@ function cr({
3247
3241
  placement: "bottom",
3248
3242
  title: "Click to exit edit mode"
3249
3243
  },
3250
- onClick: m,
3244
+ onClick: o,
3251
3245
  children: "Done"
3252
3246
  }
3253
3247
  ) })
@@ -3256,72 +3250,71 @@ function cr({
3256
3250
  );
3257
3251
  }
3258
3252
  export {
3259
- An as AddIcon,
3253
+ Fn as AddIcon,
3260
3254
  J as Button,
3261
- nn as CircleQuestionMark,
3262
- tn as CrosshairIcon,
3263
- or as DashboardGrid,
3264
- Fe as DashboardMaxZoomScale,
3265
- Ae as DashboardMinZoomScale,
3255
+ tn as CircleQuestionMark,
3256
+ en as CrosshairIcon,
3257
+ rr as DashboardGrid,
3258
+ Ae as DashboardMaxZoomScale,
3259
+ je as DashboardMinZoomScale,
3266
3260
  at as DashboardWidgetBase,
3267
- Mt as DashboardZoomStep,
3268
- Fn as DeleteIcon,
3269
- xn as DraggablePanel,
3270
- Tn as DynamicWidgetLoader,
3271
- Ln as EditIcon,
3261
+ $t as DashboardZoomStep,
3262
+ Ln as DeleteIcon,
3263
+ vn as DraggablePanel,
3264
+ Dn as DynamicWidgetLoader,
3265
+ Un as EditIcon,
3272
3266
  Vn as GridIcon,
3273
- en as HandGrabIcon,
3274
- Qt as HandIcon,
3275
- Gn as ListItem,
3276
- Zn as ListItemLeftChild,
3277
- Jn as ListItemMiddleChild,
3278
- Qn as ListItemRightChild,
3279
- Un as MonitorIcon,
3280
- qn as MonitorSmartphoneIcon,
3267
+ Qt as HandGrabIcon,
3268
+ Jt as HandIcon,
3269
+ Xn as ListItem,
3270
+ Gn as ListItemLeftChild,
3271
+ Zn as ListItemMiddleChild,
3272
+ Jn as ListItemRightChild,
3273
+ qn as MonitorIcon,
3274
+ zn as MonitorSmartphoneIcon,
3281
3275
  ft as MoveLeftIcon,
3282
3276
  ht as MoveRightIcon,
3283
- Jt as RedoIcon,
3284
- Xt as SettingsIcon,
3285
- on as Stack,
3286
- H as SvgBaseWrapper,
3277
+ Zt as RedoIcon,
3278
+ Ht as SettingsIcon,
3279
+ rn as Stack,
3280
+ Y as SvgBaseWrapper,
3287
3281
  Yn as TabletSmartphoneIcon,
3288
3282
  Hn as TargetIcon,
3289
- pt as TextField,
3290
- Gt as TimerResetIcon,
3291
- Zt as UndoIcon,
3283
+ mt as TextField,
3284
+ Xt as TimerResetIcon,
3285
+ Gt as UndoIcon,
3292
3286
  ir as WidgetContainerColumn,
3293
3287
  ar as WidgetContainerLarge,
3294
- sr as WidgetContainerRow,
3295
- cr as WidgetsCatalogFlyout,
3296
- tr as WrapperColumnContent,
3297
- nr as WrapperColumnContentListItem,
3288
+ or as WidgetContainerRow,
3289
+ sr as WidgetsCatalogFlyout,
3290
+ er as WrapperColumnContent,
3291
+ tr as WrapperColumnContentListItem,
3298
3292
  gt as XCircleIcon,
3299
- zn as ZoomInIcon,
3293
+ Kn as ZoomInIcon,
3300
3294
  Bn as ZoomOutIcon,
3301
- Sn as _isVersionCompatible,
3302
- Ce as blankDashboardConfig,
3303
- dt as createDynamicEntry,
3304
- Wt as createStaticEntry,
3305
- Tt as cssSettingsCatalog,
3306
- Xn as cssVarsUtils,
3307
- _t as dashboardSettingsUtils,
3308
- Pt as ensureContainersSequence,
3309
- lt as ensureZoomScaleIsWithinRange,
3310
- ge as getDefaultWidgetMetaFromKey,
3295
+ Cn as _isVersionCompatible,
3296
+ we as blankDashboardConfig,
3297
+ ut as createDynamicEntry,
3298
+ Rt as createStaticEntry,
3299
+ Dt as cssSettingsCatalog,
3300
+ kn as cssVarsUtils,
3301
+ Nt as dashboardSettingsUtils,
3302
+ Wt as ensureContainersSequence,
3303
+ ct as ensureZoomScaleIsWithinRange,
3304
+ he as getDefaultWidgetMetaFromKey,
3311
3305
  Wn as getDefaultWidgetMetaFromMap,
3312
3306
  G as getDistinctCssClasses,
3313
- Ot as getMetaInfoFromFile,
3307
+ kt as getMetaInfoFromFile,
3314
3308
  Pn as getNewZoomScaleWithinRange,
3315
- $t as getWidgetMetaFromCatalog,
3316
- On as localWidgetDiscovery,
3317
- mt as parseContainerTitle,
3318
- It as parseKeyAndTitleFromFilePath,
3309
+ It as getWidgetMetaFromCatalog,
3310
+ Rn as localWidgetDiscovery,
3311
+ dt as parseContainerTitle,
3312
+ Ot as parseKeyAndTitleFromFilePath,
3319
3313
  In as remoteWidgetDiscovery,
3320
3314
  $n as removeEmptyContainers,
3321
- re as resolveColorFromClass,
3322
- Kn as resolvedColors,
3323
- rr as showToast,
3324
- kn as useDashboardStorageService,
3325
- Rn as useDashboardStore,
3326
- jn as useDashboardUndoService
3315
+ On as resolveColorFromClass,
3316
+ nr as showToast,
3317
+ Mn as useDashboardStorageService,
3318
+ jn as useDashboardStore,
3319
+ An as useDashboardUndoService
3327
3320
  };