@tenorlab/react-dashboard 1.1.6 → 1.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsxs as W, jsx as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import ae, { useState as le, useCallback as ue, useMemo as st, forwardRef as ce, useRef as Ct, Suspense as St, useEffect as Dt } from "react";
|
|
2
|
+
import { jsxs as W, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import lt from "react-dom";
|
|
4
|
+
const Nt = [
|
|
5
5
|
{
|
|
6
6
|
key: "grid-gap",
|
|
7
7
|
displayName: "Gap",
|
|
@@ -79,9 +79,9 @@ const Dt = [
|
|
|
79
79
|
defaultValue: "1.0rem",
|
|
80
80
|
value: "1.0rem"
|
|
81
81
|
}
|
|
82
|
-
],
|
|
82
|
+
], Tt = ["rem", "pc", "cm", "in", "em", "vh", "vw", "%"], Et = (e, n) => Tt.includes(e) ? n : 1, _t = {
|
|
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,
|
|
84
|
+
const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0, i = e.value.match(/([^\d.]+)/), o = i ? i[1] : e.defaultUnit, s = Et(o, e.step) * n, y = `${Math.max(r + s, e.minValue).toFixed(1)}${o}`;
|
|
85
85
|
return {
|
|
86
86
|
...e,
|
|
87
87
|
value: y
|
|
@@ -96,14 +96,14 @@ const Dt = [
|
|
|
96
96
|
responsiveGrid: !1,
|
|
97
97
|
widgets: [],
|
|
98
98
|
childWidgetsConfig: [],
|
|
99
|
-
cssSettings: [...
|
|
100
|
-
}, Ae = 0.7, Le = 1,
|
|
99
|
+
cssSettings: [...Nt]
|
|
100
|
+
}, Ae = 0.7, Le = 1, Mt = 0.05, ct = (e) => {
|
|
101
101
|
let n = Number(e || 0);
|
|
102
102
|
return n < Ae && (n = Ae), n > Le && (n = Le), n;
|
|
103
|
-
},
|
|
104
|
-
let t = Number(Number((
|
|
105
|
-
return
|
|
106
|
-
},
|
|
103
|
+
}, Pn = (e, n) => {
|
|
104
|
+
let t = Number(Number((Mt * n).toFixed(2)).toFixed(2)), r = Number((Number(e) + t).toFixed(2));
|
|
105
|
+
return ct(r);
|
|
106
|
+
}, $n = (e) => {
|
|
107
107
|
let n = {
|
|
108
108
|
...e
|
|
109
109
|
};
|
|
@@ -119,7 +119,7 @@ const Dt = [
|
|
|
119
119
|
}
|
|
120
120
|
return !0;
|
|
121
121
|
}), n;
|
|
122
|
-
},
|
|
122
|
+
}, Pt = (e) => {
|
|
123
123
|
const n = e.widgets.filter(
|
|
124
124
|
(r) => r.includes("WidgetContainer")
|
|
125
125
|
), t = {};
|
|
@@ -145,13 +145,13 @@ const Dt = [
|
|
|
145
145
|
icon: void 0,
|
|
146
146
|
externalDependencies: []
|
|
147
147
|
};
|
|
148
|
-
},
|
|
148
|
+
}, Wn = (e, n, t) => {
|
|
149
149
|
const r = n[e];
|
|
150
150
|
return r || ge(e, t);
|
|
151
|
-
},
|
|
151
|
+
}, $t = (e, n) => {
|
|
152
152
|
const r = n.get(e)?.meta;
|
|
153
153
|
return r || ge(e);
|
|
154
|
-
},
|
|
154
|
+
}, Wt = (e, n, t) => {
|
|
155
155
|
const r = t || ge(e);
|
|
156
156
|
return [
|
|
157
157
|
e,
|
|
@@ -163,7 +163,7 @@ const Dt = [
|
|
|
163
163
|
component: n
|
|
164
164
|
}
|
|
165
165
|
];
|
|
166
|
-
},
|
|
166
|
+
}, dt = (e, n, t) => {
|
|
167
167
|
const r = t || ge(e);
|
|
168
168
|
return [
|
|
169
169
|
e,
|
|
@@ -175,23 +175,23 @@ const Dt = [
|
|
|
175
175
|
loader: n
|
|
176
176
|
}
|
|
177
177
|
];
|
|
178
|
-
},
|
|
178
|
+
}, It = (e) => {
|
|
179
179
|
const n = e.match(/\/widget-([a-zA-Z0-9-]+)\/index\.ts$/);
|
|
180
180
|
if (n && n[1]) {
|
|
181
181
|
const t = n[1], r = `Widget${t.split("-").map((o) => o.charAt(0).toUpperCase() + o.slice(1)).join("")}`, i = t.split("-").map((o) => o.charAt(0).toUpperCase() + o.slice(1)).join(" ");
|
|
182
182
|
return { key: r, title: i, folder: t };
|
|
183
183
|
}
|
|
184
184
|
return null;
|
|
185
|
-
},
|
|
186
|
-
const i = `${n}/widget-${t}/widget-${t}.meta.ts`, o = e[i],
|
|
187
|
-
if (o && o[
|
|
188
|
-
return o[
|
|
189
|
-
},
|
|
185
|
+
}, Rt = (e, n, t, r) => {
|
|
186
|
+
const i = `${n}/widget-${t}/widget-${t}.meta.ts`, o = e[i], s = `${r}Meta`;
|
|
187
|
+
if (o && o[s])
|
|
188
|
+
return o[s];
|
|
189
|
+
}, In = async (e) => new Promise(async (n, t) => {
|
|
190
190
|
const r = [];
|
|
191
191
|
try {
|
|
192
192
|
const o = await (await fetch(`${e}?${Math.random()}`)).json();
|
|
193
|
-
for (const
|
|
194
|
-
const d = o[
|
|
193
|
+
for (const s in o) {
|
|
194
|
+
const d = o[s], y = () => import(
|
|
195
195
|
/* @vite-ignore */
|
|
196
196
|
d.url
|
|
197
197
|
), m = {
|
|
@@ -203,7 +203,7 @@ const Dt = [
|
|
|
203
203
|
// Or a logic to map a string name to a Lucide component
|
|
204
204
|
externalDependencies: d.meta.externalDependencies || []
|
|
205
205
|
};
|
|
206
|
-
r.push(
|
|
206
|
+
r.push(dt(s, y, m));
|
|
207
207
|
}
|
|
208
208
|
n({
|
|
209
209
|
entries: r,
|
|
@@ -217,22 +217,22 @@ const Dt = [
|
|
|
217
217
|
details: typeof i == "object" ? JSON.stringify(i) : i
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
}),
|
|
220
|
+
}), Rn = (e, n, t, r = !0) => {
|
|
221
221
|
const i = [];
|
|
222
222
|
for (const o in n) {
|
|
223
|
-
const
|
|
224
|
-
if (d &&
|
|
223
|
+
const s = n[o], d = It(o);
|
|
224
|
+
if (d && s) {
|
|
225
225
|
const { key: y, title: m, folder: h } = d;
|
|
226
|
-
let u =
|
|
226
|
+
let u = Rt(t, e, h, y);
|
|
227
227
|
if (u || (u = ge(y, {
|
|
228
228
|
title: m,
|
|
229
229
|
description: `Local ${r ? "dynamic" : "static"} widget`
|
|
230
230
|
})), r) {
|
|
231
|
-
const g =
|
|
232
|
-
i.push(
|
|
231
|
+
const g = s;
|
|
232
|
+
i.push(dt(y, g, u));
|
|
233
233
|
} else {
|
|
234
|
-
const g =
|
|
235
|
-
i.push(
|
|
234
|
+
const g = s.default || s;
|
|
235
|
+
i.push(Wt(y, g, u));
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
}
|
|
@@ -247,29 +247,29 @@ const Dt = [
|
|
|
247
247
|
}
|
|
248
248
|
}, i = () => n, d = { setState: r, getState: i, getInitialState: () => y, subscribe: (m) => (t.add(m), () => t.delete(m)) }, y = n = e(r, i, d);
|
|
249
249
|
return d;
|
|
250
|
-
}, Ot = ((e) => e ? Fe(e) : Fe),
|
|
251
|
-
function
|
|
252
|
-
const t =
|
|
250
|
+
}, Ot = ((e) => e ? Fe(e) : Fe), kt = (e) => e;
|
|
251
|
+
function jt(e, n = kt) {
|
|
252
|
+
const t = ae.useSyncExternalStore(
|
|
253
253
|
e.subscribe,
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
ae.useCallback(() => n(e.getState()), [e, n]),
|
|
255
|
+
ae.useCallback(() => n(e.getInitialState()), [e, n])
|
|
256
256
|
);
|
|
257
|
-
return
|
|
257
|
+
return ae.useDebugValue(t), t;
|
|
258
258
|
}
|
|
259
|
-
const
|
|
260
|
-
const n = Ot(e), t = (r) =>
|
|
259
|
+
const At = (e) => {
|
|
260
|
+
const n = Ot(e), t = (r) => jt(n, r);
|
|
261
261
|
return Object.assign(t, n), t;
|
|
262
|
-
},
|
|
262
|
+
}, Lt = ((e) => At), Ft = (e) => {
|
|
263
263
|
const n = e.widgets.filter((r) => r.includes("WidgetContainer")).map((r) => Number(r.split("_")[1].replace("container", "")));
|
|
264
264
|
return `container${n.length > 0 ? Math.max(...n) + 1 : 1}`;
|
|
265
|
-
},
|
|
266
|
-
const t =
|
|
265
|
+
}, Vt = (e, n) => {
|
|
266
|
+
const t = Ft(e);
|
|
267
267
|
return `${n}_${t}`;
|
|
268
268
|
}, Ut = (e) => {
|
|
269
269
|
const { dashboardConfig: n, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets: i } = e;
|
|
270
270
|
if (r) {
|
|
271
271
|
if (i && n.childWidgetsConfig.find(
|
|
272
|
-
(
|
|
272
|
+
(s) => s.parentWidgetKey === r && s.widgetKey === t
|
|
273
273
|
))
|
|
274
274
|
return {
|
|
275
275
|
success: !1,
|
|
@@ -304,20 +304,20 @@ const jt = (e) => {
|
|
|
304
304
|
}
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
},
|
|
307
|
+
}, qt = (e, n, t) => {
|
|
308
308
|
if ((t || "").trim().length > 0) {
|
|
309
309
|
const r = e.childWidgetsConfig.filter(
|
|
310
310
|
(y) => y.parentWidgetKey !== t
|
|
311
311
|
), i = e.childWidgetsConfig.filter(
|
|
312
312
|
(y) => y.parentWidgetKey === t && y.widgetKey !== n
|
|
313
313
|
), o = [...r, ...i];
|
|
314
|
-
let
|
|
314
|
+
let s = {
|
|
315
315
|
...e,
|
|
316
316
|
childWidgetsConfig: o
|
|
317
317
|
};
|
|
318
|
-
return `${n}`.includes("Container") && (
|
|
318
|
+
return `${n}`.includes("Container") && (s = Pt(s)), {
|
|
319
319
|
success: !0,
|
|
320
|
-
updatedDashboardConfig:
|
|
320
|
+
updatedDashboardConfig: s
|
|
321
321
|
};
|
|
322
322
|
} else {
|
|
323
323
|
const r = e.widgets.filter((o) => o !== n), i = e.childWidgetsConfig.filter(
|
|
@@ -340,15 +340,15 @@ const jt = (e) => {
|
|
|
340
340
|
let o = e.childWidgetsConfig.filter(
|
|
341
341
|
(h) => h.parentWidgetKey === r
|
|
342
342
|
);
|
|
343
|
-
const
|
|
344
|
-
let d =
|
|
345
|
-
if (d = Math.max(0, d), d = Math.min(o.length - 1, d), d ===
|
|
343
|
+
const s = o.indexOf(t);
|
|
344
|
+
let d = s + n;
|
|
345
|
+
if (d = Math.max(0, d), d = Math.min(o.length - 1, d), d === s)
|
|
346
346
|
return {
|
|
347
347
|
success: !1,
|
|
348
348
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
349
349
|
updatedDashboardConfig: e
|
|
350
350
|
};
|
|
351
|
-
const y = [...o], [m] = y.splice(
|
|
351
|
+
const y = [...o], [m] = y.splice(s, 1);
|
|
352
352
|
return y.splice(d, 0, m), {
|
|
353
353
|
success: !0,
|
|
354
354
|
updatedDashboardConfig: {
|
|
@@ -358,15 +358,15 @@ const jt = (e) => {
|
|
|
358
358
|
};
|
|
359
359
|
} else {
|
|
360
360
|
const i = e.widgets || [], o = i.indexOf(t);
|
|
361
|
-
let
|
|
362
|
-
if (
|
|
361
|
+
let s = o + n;
|
|
362
|
+
if (s = Math.max(0, s), s = Math.min(i.length - 1, s), s === o)
|
|
363
363
|
return {
|
|
364
364
|
success: !1,
|
|
365
365
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
366
366
|
updatedDashboardConfig: e
|
|
367
367
|
};
|
|
368
368
|
const d = [...i], [y] = d.splice(o, 1);
|
|
369
|
-
return d.splice(
|
|
369
|
+
return d.splice(s, 0, y), {
|
|
370
370
|
success: !0,
|
|
371
371
|
updatedDashboardConfig: {
|
|
372
372
|
...e,
|
|
@@ -374,13 +374,13 @@ const jt = (e) => {
|
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
|
-
},
|
|
377
|
+
}, zt = (e, n) => ({
|
|
378
378
|
isLoading: !1,
|
|
379
379
|
isEditing: !1,
|
|
380
380
|
allDashboardConfigs: [Ce],
|
|
381
381
|
currentDashboardConfig: Ce,
|
|
382
382
|
targetContainerKey: void 0,
|
|
383
|
-
getNextContainerKey: (t) =>
|
|
383
|
+
getNextContainerKey: (t) => Vt(n().currentDashboardConfig, t),
|
|
384
384
|
setIsLoading: (t) => (e(() => ({ isLoading: t })), t),
|
|
385
385
|
setIsEditing: (t) => {
|
|
386
386
|
let r = n().targetContainerKey;
|
|
@@ -432,7 +432,7 @@ const jt = (e) => {
|
|
|
432
432
|
...t
|
|
433
433
|
}), o = [
|
|
434
434
|
...r.allDashboardConfigs.filter(
|
|
435
|
-
(
|
|
435
|
+
(s) => s.dashboardId !== i.updatedDashboardConfig.dashboardId
|
|
436
436
|
),
|
|
437
437
|
i.updatedDashboardConfig
|
|
438
438
|
];
|
|
@@ -445,49 +445,49 @@ const jt = (e) => {
|
|
|
445
445
|
};
|
|
446
446
|
},
|
|
447
447
|
removeWidget: (t, r) => {
|
|
448
|
-
const i = n(), o =
|
|
448
|
+
const i = n(), o = qt(i.currentDashboardConfig, t, r), s = [
|
|
449
449
|
...i.allDashboardConfigs.filter(
|
|
450
450
|
(d) => d.dashboardId !== o.updatedDashboardConfig.dashboardId
|
|
451
451
|
),
|
|
452
452
|
o.updatedDashboardConfig
|
|
453
453
|
];
|
|
454
454
|
return o.success && e(() => ({
|
|
455
|
-
allDashboardConfigs:
|
|
455
|
+
allDashboardConfigs: s,
|
|
456
456
|
currentDashboardConfig: o.updatedDashboardConfig
|
|
457
457
|
})), {
|
|
458
458
|
...o,
|
|
459
|
-
allUpdatedDashboardConfigs:
|
|
459
|
+
allUpdatedDashboardConfigs: s
|
|
460
460
|
};
|
|
461
461
|
},
|
|
462
462
|
moveWidget: (t, r, i) => {
|
|
463
|
-
const o = n(),
|
|
463
|
+
const o = n(), s = Yt(o.currentDashboardConfig, t, r, i), d = [
|
|
464
464
|
...o.allDashboardConfigs.filter(
|
|
465
|
-
(y) => y.dashboardId !==
|
|
465
|
+
(y) => y.dashboardId !== s.updatedDashboardConfig.dashboardId
|
|
466
466
|
),
|
|
467
|
-
|
|
467
|
+
s.updatedDashboardConfig
|
|
468
468
|
];
|
|
469
|
-
return
|
|
469
|
+
return s.success && e(() => ({
|
|
470
470
|
allDashboardConfigs: d,
|
|
471
|
-
currentDashboardConfig:
|
|
471
|
+
currentDashboardConfig: s.updatedDashboardConfig
|
|
472
472
|
})), {
|
|
473
|
-
...
|
|
473
|
+
...s,
|
|
474
474
|
allUpdatedDashboardConfigs: d
|
|
475
475
|
};
|
|
476
476
|
}
|
|
477
|
-
}), On =
|
|
478
|
-
...
|
|
479
|
-
})),
|
|
480
|
-
const i = localStorage.getItem(
|
|
477
|
+
}), On = Lt()((...e) => ({
|
|
478
|
+
...zt(...e)
|
|
479
|
+
})), ut = (e, n) => `dashboards_${n}_${e}`, Bt = async (e, n, t, r) => {
|
|
480
|
+
const i = localStorage.getItem(ut(e, n));
|
|
481
481
|
if (i)
|
|
482
482
|
try {
|
|
483
483
|
const o = JSON.parse(i);
|
|
484
|
-
return o.length < 1 ? [r] : (o.forEach((
|
|
485
|
-
|
|
486
|
-
const d = (
|
|
484
|
+
return o.length < 1 ? [r] : (o.forEach((s) => {
|
|
485
|
+
s.dashboardId || (s.dashboardId = "default"), s.dashboardName || (s.dashboardName = `Dashboard ${s.dashboardId}`), s.responsiveGrid = s.responsiveGrid ?? !1, (s.widgets || []).length < 1 && (s.widgets = r.widgets);
|
|
486
|
+
const d = (s.cssSettings || []).filter(
|
|
487
487
|
(y) => r.cssSettings.some((m) => m.key === y.key)
|
|
488
488
|
);
|
|
489
489
|
if (d.length < 1)
|
|
490
|
-
|
|
490
|
+
s.cssSettings = [...r.cssSettings];
|
|
491
491
|
else {
|
|
492
492
|
d.forEach((m) => {
|
|
493
493
|
m.value = (m.value || "").replace(/NaN/g, "");
|
|
@@ -501,34 +501,34 @@ const jt = (e) => {
|
|
|
501
501
|
const y = r.cssSettings.filter((m) => !d.some(
|
|
502
502
|
(h) => h.key === m.key
|
|
503
503
|
));
|
|
504
|
-
|
|
504
|
+
s.cssSettings = [...d, ...y];
|
|
505
505
|
}
|
|
506
|
-
|
|
506
|
+
s.widgets = s.widgets.filter(
|
|
507
507
|
(y) => y.includes("WidgetContainer") || t.has(y)
|
|
508
|
-
),
|
|
508
|
+
), s.childWidgetsConfig = s.childWidgetsConfig.filter(
|
|
509
509
|
(y) => t.has(y.widgetKey)
|
|
510
|
-
),
|
|
510
|
+
), s.zoomScale ? s.zoomScale < 0.7 && (s.zoomScale = 0.7) : s.zoomScale = 1;
|
|
511
511
|
}), o);
|
|
512
512
|
} catch (o) {
|
|
513
513
|
console.warn("Error parsing saved dashboard config:", o);
|
|
514
514
|
}
|
|
515
515
|
return [r];
|
|
516
|
-
},
|
|
516
|
+
}, Ht = async (e, n, t, r) => {
|
|
517
517
|
t.forEach((o) => {
|
|
518
518
|
if (o.userID = e, o.clientAppKey = n, o.responsiveGrid = o.responsiveGrid ?? !1, typeof o != "object")
|
|
519
519
|
throw new Error("Invalid dashboard configuration");
|
|
520
520
|
o.widgets = o.widgets.filter(
|
|
521
|
-
(
|
|
521
|
+
(s) => s.includes("WidgetContainer") || r.has(s)
|
|
522
522
|
), o.childWidgetsConfig = o.childWidgetsConfig.filter(
|
|
523
|
-
(
|
|
523
|
+
(s) => r.has(s.widgetKey)
|
|
524
524
|
), o.zoomScale ? o.zoomScale < 0.7 && (o.zoomScale = 0.7) : o.zoomScale = 1;
|
|
525
525
|
});
|
|
526
526
|
const i = JSON.stringify(t);
|
|
527
|
-
return localStorage.setItem(
|
|
527
|
+
return localStorage.setItem(ut(e, n), i), !0;
|
|
528
528
|
}, Kt = {
|
|
529
|
-
getSavedDashboards:
|
|
530
|
-
saveDashboards:
|
|
531
|
-
},
|
|
529
|
+
getSavedDashboards: Bt,
|
|
530
|
+
saveDashboards: Ht
|
|
531
|
+
}, kn = () => Kt, jn = () => {
|
|
532
532
|
const [e, n] = le({}), [t, r] = le({}), i = ue((h) => {
|
|
533
533
|
const u = h.dashboardId;
|
|
534
534
|
n((g) => {
|
|
@@ -536,8 +536,8 @@ const jt = (e) => {
|
|
|
536
536
|
undoIndex: 0,
|
|
537
537
|
config: h
|
|
538
538
|
};
|
|
539
|
-
return r((
|
|
540
|
-
...
|
|
539
|
+
return r((x) => ({
|
|
540
|
+
...x,
|
|
541
541
|
[u]: 0
|
|
542
542
|
})), {
|
|
543
543
|
...g,
|
|
@@ -548,11 +548,11 @@ const jt = (e) => {
|
|
|
548
548
|
}, []), o = ue(
|
|
549
549
|
(h) => {
|
|
550
550
|
n((u) => {
|
|
551
|
-
const g = h.dashboardId, p = u[g] || [],
|
|
552
|
-
undoIndex:
|
|
551
|
+
const g = h.dashboardId, p = u[g] || [], x = t[g] ?? -1, b = p.slice(0, x + 1), v = {
|
|
552
|
+
undoIndex: b.length,
|
|
553
553
|
// New index based on trimmed length
|
|
554
554
|
config: h
|
|
555
|
-
}, C = [...
|
|
555
|
+
}, C = [...b, v];
|
|
556
556
|
return r((N) => ({
|
|
557
557
|
...N,
|
|
558
558
|
[g]: C.length - 1
|
|
@@ -564,7 +564,7 @@ const jt = (e) => {
|
|
|
564
564
|
});
|
|
565
565
|
},
|
|
566
566
|
[t]
|
|
567
|
-
),
|
|
567
|
+
), s = ue((h) => {
|
|
568
568
|
n((u) => {
|
|
569
569
|
if (!u[h])
|
|
570
570
|
return u;
|
|
@@ -587,8 +587,8 @@ const jt = (e) => {
|
|
|
587
587
|
), y = ue(
|
|
588
588
|
(h) => {
|
|
589
589
|
r((u) => {
|
|
590
|
-
const g = e[h]?.length || 0, p = u[h] ?? -1,
|
|
591
|
-
return
|
|
590
|
+
const g = e[h]?.length || 0, p = u[h] ?? -1, x = Math.min(g - 1, p + 1);
|
|
591
|
+
return x !== p ? { ...u, [h]: x } : u;
|
|
592
592
|
});
|
|
593
593
|
},
|
|
594
594
|
[
|
|
@@ -600,23 +600,23 @@ const jt = (e) => {
|
|
|
600
600
|
initializeHistoryForDashboard: i,
|
|
601
601
|
resetAllHistory: () => n({}),
|
|
602
602
|
addUndoEntry: o,
|
|
603
|
-
removeUndoHistoryForDashboard:
|
|
603
|
+
removeUndoHistoryForDashboard: s,
|
|
604
604
|
undo: d,
|
|
605
605
|
redo: y,
|
|
606
606
|
getUndoStatus: (h) => {
|
|
607
|
-
const u = t[h] ?? -1, g = e[h]?.length || 0, p = u <= 0,
|
|
608
|
-
return { isUndoDisabled: p, isRedoDisabled:
|
|
607
|
+
const u = t[h] ?? -1, g = e[h]?.length || 0, p = u <= 0, x = u >= g - 1;
|
|
608
|
+
return { isUndoDisabled: p, isRedoDisabled: x };
|
|
609
609
|
},
|
|
610
610
|
undoHistory: e,
|
|
611
611
|
historyIndex: t
|
|
612
612
|
// (Optional: You might expose undoHistory and historyIndex if needed for debugging)
|
|
613
613
|
};
|
|
614
614
|
};
|
|
615
|
-
function
|
|
615
|
+
function H({
|
|
616
616
|
children: e,
|
|
617
617
|
className: n
|
|
618
618
|
}) {
|
|
619
|
-
return /* @__PURE__ */
|
|
619
|
+
return /* @__PURE__ */ a(
|
|
620
620
|
"svg",
|
|
621
621
|
{
|
|
622
622
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -633,186 +633,186 @@ function K({
|
|
|
633
633
|
}
|
|
634
634
|
);
|
|
635
635
|
}
|
|
636
|
-
function jn({ className: e }) {
|
|
637
|
-
return /* @__PURE__ */ W(K, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
|
|
638
|
-
/* @__PURE__ */ s("circle", { cx: "12", cy: "12", r: "10" }),
|
|
639
|
-
/* @__PURE__ */ s("path", { d: "M8 12h8" }),
|
|
640
|
-
/* @__PURE__ */ s("path", { d: "M12 8v8" })
|
|
641
|
-
] });
|
|
642
|
-
}
|
|
643
636
|
function An({ className: e }) {
|
|
644
|
-
return /* @__PURE__ */ W(
|
|
645
|
-
/* @__PURE__ */
|
|
646
|
-
/* @__PURE__ */
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
/* @__PURE__ */ s("path", { d: "M3 6h18" }),
|
|
649
|
-
/* @__PURE__ */ s("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
637
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
|
|
638
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
639
|
+
/* @__PURE__ */ a("path", { d: "M8 12h8" }),
|
|
640
|
+
/* @__PURE__ */ a("path", { d: "M12 8v8" })
|
|
650
641
|
] });
|
|
651
642
|
}
|
|
652
643
|
function Ln({ className: e }) {
|
|
653
|
-
return /* @__PURE__ */ W(
|
|
654
|
-
/* @__PURE__ */
|
|
655
|
-
/* @__PURE__ */
|
|
644
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
|
|
645
|
+
/* @__PURE__ */ a("path", { d: "M10 11v6" }),
|
|
646
|
+
/* @__PURE__ */ a("path", { d: "M14 11v6" }),
|
|
647
|
+
/* @__PURE__ */ a("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
648
|
+
/* @__PURE__ */ a("path", { d: "M3 6h18" }),
|
|
649
|
+
/* @__PURE__ */ a("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
656
650
|
] });
|
|
657
651
|
}
|
|
658
652
|
function Fn({ className: e }) {
|
|
659
|
-
return /* @__PURE__ */ W(
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
653
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
|
|
654
|
+
/* @__PURE__ */ a("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
655
|
+
/* @__PURE__ */ a("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" })
|
|
656
|
+
] });
|
|
657
|
+
}
|
|
658
|
+
function Vn({ className: e }) {
|
|
659
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-grid3x3-icon lucide-grid-3x3 ${e}`, children: [
|
|
660
|
+
/* @__PURE__ */ a("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
661
|
+
/* @__PURE__ */ a("path", { d: "M3 9h18" }),
|
|
662
|
+
/* @__PURE__ */ a("path", { d: "M3 15h18" }),
|
|
663
|
+
/* @__PURE__ */ a("path", { d: "M9 3v18" }),
|
|
664
|
+
/* @__PURE__ */ a("path", { d: "M15 3v18" })
|
|
665
665
|
] });
|
|
666
666
|
}
|
|
667
667
|
function Un({ className: e }) {
|
|
668
|
-
return /* @__PURE__ */ W(
|
|
669
|
-
/* @__PURE__ */
|
|
670
|
-
/* @__PURE__ */
|
|
671
|
-
/* @__PURE__ */
|
|
668
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-monitor-icon lucide-monitor ${e}`, children: [
|
|
669
|
+
/* @__PURE__ */ a("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
670
|
+
/* @__PURE__ */ a("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
|
|
671
|
+
/* @__PURE__ */ a("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
|
|
672
672
|
] });
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function qn({ className: e }) {
|
|
675
675
|
return /* @__PURE__ */ W(
|
|
676
|
-
|
|
676
|
+
H,
|
|
677
677
|
{
|
|
678
678
|
className: `lucide lucide-monitor-smartphone-icon lucide-monitor-smartphone ${e}`,
|
|
679
679
|
children: [
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */
|
|
682
|
-
/* @__PURE__ */
|
|
683
|
-
/* @__PURE__ */
|
|
680
|
+
/* @__PURE__ */ a("path", { d: "M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8" }),
|
|
681
|
+
/* @__PURE__ */ a("path", { d: "M10 19v-3.96 3.15" }),
|
|
682
|
+
/* @__PURE__ */ a("path", { d: "M7 19h5" }),
|
|
683
|
+
/* @__PURE__ */ a("rect", { width: "6", height: "10", x: "16", y: "12", rx: "2" })
|
|
684
684
|
]
|
|
685
685
|
}
|
|
686
686
|
);
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function ft({ className: e }) {
|
|
689
689
|
return /* @__PURE__ */ W(
|
|
690
|
-
|
|
690
|
+
H,
|
|
691
691
|
{
|
|
692
692
|
className: `lucide lucide-circle-arrow-left-icon lucide-circle-arrow-left ${e}`,
|
|
693
693
|
children: [
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
695
|
+
/* @__PURE__ */ a("path", { d: "m12 8-4 4 4 4" }),
|
|
696
|
+
/* @__PURE__ */ a("path", { d: "M16 12H8" })
|
|
697
697
|
]
|
|
698
698
|
}
|
|
699
699
|
);
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function ht({ className: e }) {
|
|
702
702
|
return /* @__PURE__ */ W(
|
|
703
|
-
|
|
703
|
+
H,
|
|
704
704
|
{
|
|
705
705
|
className: `lucide lucide-circle-arrow-right-icon lucide-circle-arrow-right ${e}`,
|
|
706
706
|
children: [
|
|
707
|
-
/* @__PURE__ */
|
|
708
|
-
/* @__PURE__ */
|
|
709
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
708
|
+
/* @__PURE__ */ a("path", { d: "m12 16 4-4-4-4" }),
|
|
709
|
+
/* @__PURE__ */ a("path", { d: "M8 12h8" })
|
|
710
710
|
]
|
|
711
711
|
}
|
|
712
712
|
);
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
return /* @__PURE__ */ W(
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
/* @__PURE__ */
|
|
714
|
+
function Xt({ className: e }) {
|
|
715
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-settings-icon lucide-settings ${e}`, children: [
|
|
716
|
+
/* @__PURE__ */ a("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" }),
|
|
717
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "3" })
|
|
718
718
|
] });
|
|
719
719
|
}
|
|
720
720
|
function Yn({ className: e }) {
|
|
721
721
|
return /* @__PURE__ */ W(
|
|
722
|
-
|
|
722
|
+
H,
|
|
723
723
|
{
|
|
724
724
|
className: `lucide lucide-tablet-smartphone-icon lucide-tablet-smartphone ${e}`,
|
|
725
725
|
children: [
|
|
726
|
-
/* @__PURE__ */
|
|
727
|
-
/* @__PURE__ */
|
|
728
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ a("rect", { width: "10", height: "14", x: "3", y: "8", rx: "2" }),
|
|
727
|
+
/* @__PURE__ */ a("path", { d: "M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4" }),
|
|
728
|
+
/* @__PURE__ */ a("path", { d: "M8 18h.01" })
|
|
729
729
|
]
|
|
730
730
|
}
|
|
731
731
|
);
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
return /* @__PURE__ */ W(
|
|
735
|
-
/* @__PURE__ */
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
] });
|
|
739
|
-
}
|
|
740
|
-
function qn({ className: e }) {
|
|
741
|
-
return /* @__PURE__ */ W(K, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
|
|
742
|
-
/* @__PURE__ */ s("circle", { cx: "11", cy: "11", r: "8" }),
|
|
743
|
-
/* @__PURE__ */ s("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
744
|
-
/* @__PURE__ */ s("line", { x1: "11", x2: "11", y1: "8", y2: "14" }),
|
|
745
|
-
/* @__PURE__ */ s("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
733
|
+
function gt({ className: e }) {
|
|
734
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-circle-x-icon lucide-circle-x ${e}`, children: [
|
|
735
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
736
|
+
/* @__PURE__ */ a("path", { d: "m15 9-6 6" }),
|
|
737
|
+
/* @__PURE__ */ a("path", { d: "m9 9 6 6" })
|
|
746
738
|
] });
|
|
747
739
|
}
|
|
748
740
|
function zn({ className: e }) {
|
|
749
|
-
return /* @__PURE__ */ W(
|
|
750
|
-
/* @__PURE__ */
|
|
751
|
-
/* @__PURE__ */
|
|
752
|
-
/* @__PURE__ */
|
|
741
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
|
|
742
|
+
/* @__PURE__ */ a("circle", { cx: "11", cy: "11", r: "8" }),
|
|
743
|
+
/* @__PURE__ */ a("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
744
|
+
/* @__PURE__ */ a("line", { x1: "11", x2: "11", y1: "8", y2: "14" }),
|
|
745
|
+
/* @__PURE__ */ a("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
753
746
|
] });
|
|
754
747
|
}
|
|
755
|
-
function
|
|
756
|
-
return /* @__PURE__ */ W(
|
|
757
|
-
/* @__PURE__ */
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
-
/* @__PURE__ */
|
|
760
|
-
/* @__PURE__ */ s("path", { d: "M9 17H4v5" })
|
|
748
|
+
function Bn({ className: e }) {
|
|
749
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-zoom-out-icon lucide-zoom-out ${e}`, children: [
|
|
750
|
+
/* @__PURE__ */ a("circle", { cx: "11", cy: "11", r: "8" }),
|
|
751
|
+
/* @__PURE__ */ a("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
752
|
+
/* @__PURE__ */ a("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
761
753
|
] });
|
|
762
754
|
}
|
|
763
755
|
function Gt({ className: e }) {
|
|
764
|
-
return /* @__PURE__ */ W(
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
/* @__PURE__ */
|
|
756
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-timer-reset-icon lucide-timer-reset ${e}`, children: [
|
|
757
|
+
/* @__PURE__ */ a("path", { d: "M10 2h4" }),
|
|
758
|
+
/* @__PURE__ */ a("path", { d: "M12 14v-4" }),
|
|
759
|
+
/* @__PURE__ */ a("path", { d: "M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6" }),
|
|
760
|
+
/* @__PURE__ */ a("path", { d: "M9 17H4v5" })
|
|
767
761
|
] });
|
|
768
762
|
}
|
|
769
763
|
function Zt({ className: e }) {
|
|
770
|
-
return /* @__PURE__ */ W(
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
-
/* @__PURE__ */
|
|
764
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-undo-icon lucide-undo ${e}`, children: [
|
|
765
|
+
/* @__PURE__ */ a("path", { d: "M3 7v6h6" }),
|
|
766
|
+
/* @__PURE__ */ a("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" })
|
|
773
767
|
] });
|
|
774
768
|
}
|
|
775
769
|
function Jt({ className: e }) {
|
|
776
|
-
return /* @__PURE__ */ W(
|
|
777
|
-
/* @__PURE__ */
|
|
778
|
-
/* @__PURE__ */
|
|
779
|
-
/* @__PURE__ */ s("path", { d: "M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8" }),
|
|
780
|
-
/* @__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" })
|
|
770
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-redo-icon lucide-redo ${e}`, children: [
|
|
771
|
+
/* @__PURE__ */ a("path", { d: "M21 7v6h-6" }),
|
|
772
|
+
/* @__PURE__ */ a("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" })
|
|
781
773
|
] });
|
|
782
774
|
}
|
|
783
775
|
function Qt({ className: e }) {
|
|
784
|
-
return /* @__PURE__ */ W(
|
|
785
|
-
/* @__PURE__ */
|
|
786
|
-
/* @__PURE__ */
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
/* @__PURE__ */
|
|
789
|
-
/* @__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" })
|
|
776
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-hand-icon lucide-hand ${e}`, children: [
|
|
777
|
+
/* @__PURE__ */ a("path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
|
|
778
|
+
/* @__PURE__ */ a("path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
779
|
+
/* @__PURE__ */ a("path", { d: "M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8" }),
|
|
780
|
+
/* @__PURE__ */ a("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" })
|
|
790
781
|
] });
|
|
791
782
|
}
|
|
792
783
|
function en({ className: e }) {
|
|
793
|
-
return /* @__PURE__ */ W(
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
/* @__PURE__ */
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-hand-grab-icon lucide-hand-grab ${e}`, children: [
|
|
785
|
+
/* @__PURE__ */ a("path", { d: "M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4" }),
|
|
786
|
+
/* @__PURE__ */ a("path", { d: "M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
787
|
+
/* @__PURE__ */ a("path", { d: "M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5" }),
|
|
788
|
+
/* @__PURE__ */ a("path", { d: "M6 14a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
|
|
789
|
+
/* @__PURE__ */ a("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" })
|
|
798
790
|
] });
|
|
799
791
|
}
|
|
800
|
-
function
|
|
801
|
-
return /* @__PURE__ */ W(
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */
|
|
792
|
+
function tn({ className: e }) {
|
|
793
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-crosshair-icon lucide-crosshair ${e}`, children: [
|
|
794
|
+
/* @__PURE__ */ a("line", { x1: "22", x2: "18", y1: "12", y2: "12" }),
|
|
795
|
+
/* @__PURE__ */ a("line", { x1: "6", x2: "2", y1: "12", y2: "12" }),
|
|
796
|
+
/* @__PURE__ */ a("line", { x1: "12", x2: "12", y1: "6", y2: "2" }),
|
|
797
|
+
/* @__PURE__ */ a("line", { x1: "12", x2: "12", y1: "22", y2: "18" })
|
|
805
798
|
] });
|
|
806
799
|
}
|
|
807
|
-
function
|
|
800
|
+
function Hn({ className: e }) {
|
|
801
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-target-icon lucide-target ${e}`, children: [
|
|
802
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
803
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "6" }),
|
|
804
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "2" })
|
|
805
|
+
] });
|
|
806
|
+
}
|
|
807
|
+
function nn({ className: e }) {
|
|
808
808
|
return /* @__PURE__ */ W(
|
|
809
|
-
|
|
809
|
+
H,
|
|
810
810
|
{
|
|
811
811
|
className: `lucide lucide-file-question-mark-icon lucide-file-question-mark ${e}`,
|
|
812
812
|
children: [
|
|
813
|
-
/* @__PURE__ */
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
814
|
+
/* @__PURE__ */ a("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
815
|
+
/* @__PURE__ */ a("path", { d: "M12 17h.01" })
|
|
816
816
|
]
|
|
817
817
|
}
|
|
818
818
|
);
|
|
@@ -837,7 +837,7 @@ const Z = (e, ...n) => [
|
|
|
837
837
|
disabled: re("text-disabled", "color"),
|
|
838
838
|
neutral: re("text-neutral", "color"),
|
|
839
839
|
body: re("text-body", "color")
|
|
840
|
-
},
|
|
840
|
+
}, Xn = {
|
|
841
841
|
getCssVariableValue: (e) => {
|
|
842
842
|
const n = document.documentElement;
|
|
843
843
|
return getComputedStyle(n).getPropertyValue(e).trim() || null;
|
|
@@ -851,19 +851,19 @@ const Z = (e, ...n) => [
|
|
|
851
851
|
n.style.setProperty(t.cssProperty, t.value);
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
|
-
},
|
|
854
|
+
}, mt = (e) => {
|
|
855
855
|
const n = `${e}`.split("_");
|
|
856
856
|
return n.length > 1 ? n[1].replace(/(\D)(\d+)/, "$1 $2") : "Container";
|
|
857
|
-
},
|
|
857
|
+
}, pt = ({
|
|
858
858
|
label: e,
|
|
859
859
|
className: n,
|
|
860
860
|
size: t = "medium",
|
|
861
861
|
value: r,
|
|
862
862
|
onChange: i,
|
|
863
863
|
onKeyDown: o,
|
|
864
|
-
placeholder:
|
|
864
|
+
placeholder: s = ""
|
|
865
865
|
}) => {
|
|
866
|
-
const d =
|
|
866
|
+
const d = st(() => t === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [t]), y = Z("flex flex-col mb-4", n || ""), h = `${Z(`
|
|
867
867
|
block w-full rounded-md px-3 py-1.5 text-base
|
|
868
868
|
bg-formfield content-formfield
|
|
869
869
|
outline-1 -outline-offset-1 outline-primary
|
|
@@ -871,8 +871,8 @@ const Z = (e, ...n) => [
|
|
|
871
871
|
focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-200 sm:text-sm/6
|
|
872
872
|
`)} ${d}`;
|
|
873
873
|
return /* @__PURE__ */ W("div", { className: y, children: [
|
|
874
|
-
/* @__PURE__ */
|
|
875
|
-
/* @__PURE__ */
|
|
874
|
+
/* @__PURE__ */ a("label", { htmlFor: e, className: "block text-sm/6 font-medium mb-1.5", children: e }),
|
|
875
|
+
/* @__PURE__ */ a(
|
|
876
876
|
"input",
|
|
877
877
|
{
|
|
878
878
|
id: e,
|
|
@@ -880,7 +880,7 @@ const Z = (e, ...n) => [
|
|
|
880
880
|
value: r,
|
|
881
881
|
onChange: i,
|
|
882
882
|
onKeyDown: (u) => o && o(u),
|
|
883
|
-
placeholder:
|
|
883
|
+
placeholder: s,
|
|
884
884
|
className: h,
|
|
885
885
|
"aria-label": e
|
|
886
886
|
}
|
|
@@ -903,20 +903,20 @@ function J(e) {
|
|
|
903
903
|
isIconButton: r,
|
|
904
904
|
className: i,
|
|
905
905
|
buttonType: o,
|
|
906
|
-
category:
|
|
906
|
+
category: s,
|
|
907
907
|
px: d,
|
|
908
908
|
py: y,
|
|
909
909
|
children: m,
|
|
910
910
|
...h
|
|
911
911
|
} = e, u = () => {
|
|
912
|
-
const p = e.isIconButton || !1,
|
|
912
|
+
const p = e.isIconButton || !1, x = e.category || "primary", b = e.buttonType || "normal", v = e.disabled || !1, C = e.className || "", N = e.font || "semibold", S = Number((e.border || 0) > 0 ? e.border : 0);
|
|
913
913
|
let D = (e.borderColor || "").trim();
|
|
914
914
|
D = D.length > 0 ? D : "";
|
|
915
|
-
const c = Number((e.borderHover || 0) > 0 ? e.borderHover : 0),
|
|
915
|
+
const c = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), E = e.shadow || "sm", l = e.shadowHover || "md", f = (e.addCss || "").trim(), M = e.justifyCss || "justify-center";
|
|
916
916
|
if (p)
|
|
917
917
|
return Z(
|
|
918
918
|
"flex flex-row items-center",
|
|
919
|
-
|
|
919
|
+
v ? "text-disabled" : `text-${x} hover:brightness-110 cursor-pointer`,
|
|
920
920
|
C || ""
|
|
921
921
|
);
|
|
922
922
|
const $ = [
|
|
@@ -926,39 +926,39 @@ function J(e) {
|
|
|
926
926
|
"text-sm",
|
|
927
927
|
`font-${N}`
|
|
928
928
|
];
|
|
929
|
-
if (
|
|
930
|
-
|
|
929
|
+
if (v)
|
|
930
|
+
b === "ghost" ? $.push("text-disabled border-disabled cursor-not-allowed") : $.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
|
|
931
931
|
else {
|
|
932
932
|
$.push("cursor-pointer");
|
|
933
|
-
let
|
|
934
|
-
Se.has(
|
|
935
|
-
const
|
|
936
|
-
$.push(
|
|
933
|
+
let I = "";
|
|
934
|
+
Se.has(b) ? I = `${Se.get(b)}` : I = `${Se.get("normal")}`, S < 1 && (I = I.replace("border-[category]", ""));
|
|
935
|
+
const T = I.replace(/\[category\]/g, x).trim();
|
|
936
|
+
$.push(T);
|
|
937
937
|
}
|
|
938
|
-
return S > 0 ? ($.push(`border-[${S}px]`), $.push(`border-${D}`)) : ($.push("border-[1px]"), $.push("border-transparent")), c > 0 ? ($.push(`hover:border-[${c}px] group-hover:border-[${c}px]`), $.push(`hover:border-${D} group-hover:border-${D}`)) : $.push("hover:border-[1px] group-hover:border-[1px]"), $.push(`shadow-${
|
|
938
|
+
return S > 0 ? ($.push(`border-[${S}px]`), $.push(`border-${D}`)) : ($.push("border-[1px]"), $.push("border-transparent")), c > 0 ? ($.push(`hover:border-[${c}px] group-hover:border-[${c}px]`), $.push(`hover:border-${D} group-hover:border-${D}`)) : $.push("hover:border-[1px] group-hover:border-[1px]"), $.push(`shadow-${E}`), $.push(`hover:shadow-${l} group-hover:shadow-${l}`), f.length > 0 && $.push(f), f.indexOf("hidden") === -1 && $.push("inline-flex"), $.push(M), $.join(" ").trim();
|
|
939
939
|
}, g = () => {
|
|
940
|
-
const p = e.px || 0.7,
|
|
940
|
+
const p = e.px || 0.7, x = e.py || 0.25;
|
|
941
941
|
return {
|
|
942
|
-
padding: r ? 0 : `${
|
|
942
|
+
padding: r ? 0 : `${x}rem ${p}rem `
|
|
943
943
|
};
|
|
944
944
|
};
|
|
945
|
-
return /* @__PURE__ */
|
|
945
|
+
return /* @__PURE__ */ a("button", { type: "button", disabled: t, className: u(), style: g(), ...h, children: m });
|
|
946
946
|
}
|
|
947
|
-
const
|
|
948
|
-
function
|
|
949
|
-
const { children: n, testId: t, classNames: r, direction: i, ...o } = e,
|
|
950
|
-
return /* @__PURE__ */
|
|
947
|
+
const rn = (e) => e.direction === "row" ? Z("flex flex-row items-center gap-2", e.classNames || "") : Z("flex flex-col gap-2 w-full", e.classNames || "");
|
|
948
|
+
function on(e) {
|
|
949
|
+
const { children: n, testId: t, classNames: r, direction: i, ...o } = e, s = rn(e);
|
|
950
|
+
return /* @__PURE__ */ a("div", { "data-testid": t || "not-set", className: s, ...o, children: n });
|
|
951
951
|
}
|
|
952
|
-
const
|
|
952
|
+
const Gn = ce(
|
|
953
953
|
(e, n) => {
|
|
954
|
-
const { classNames: t, innerClass: r, ...i } = e, o = Z(t || "", "w-full"),
|
|
954
|
+
const { classNames: t, innerClass: r, ...i } = e, o = Z(t || "", "w-full"), s = Z(
|
|
955
955
|
`w-full flex overflow-hidden justify-between items-center gap-0
|
|
956
956
|
rounded-md border`,
|
|
957
957
|
r || ""
|
|
958
958
|
);
|
|
959
|
-
return /* @__PURE__ */
|
|
959
|
+
return /* @__PURE__ */ a(on, { direction: "row", classNames: o, ...i, children: /* @__PURE__ */ a("div", { className: s, children: e.children }) });
|
|
960
960
|
}
|
|
961
|
-
),
|
|
961
|
+
), Zn = ce((e, n) => /* @__PURE__ */ a(
|
|
962
962
|
"div",
|
|
963
963
|
{
|
|
964
964
|
"data-testid": e.testId || "not-set",
|
|
@@ -969,8 +969,8 @@ const Xn = ce(
|
|
|
969
969
|
},
|
|
970
970
|
children: e.children
|
|
971
971
|
}
|
|
972
|
-
)),
|
|
973
|
-
(e, n) => /* @__PURE__ */
|
|
972
|
+
)), Jn = ce(
|
|
973
|
+
(e, n) => /* @__PURE__ */ a(
|
|
974
974
|
"div",
|
|
975
975
|
{
|
|
976
976
|
"data-testid": e.testId || "not-set",
|
|
@@ -978,7 +978,7 @@ const Xn = ce(
|
|
|
978
978
|
children: e.children
|
|
979
979
|
}
|
|
980
980
|
)
|
|
981
|
-
),
|
|
981
|
+
), Qn = ce((e, n) => /* @__PURE__ */ a(
|
|
982
982
|
"div",
|
|
983
983
|
{
|
|
984
984
|
"data-testid": e.testId || "not-set",
|
|
@@ -990,19 +990,19 @@ const Xn = ce(
|
|
|
990
990
|
children: e.children
|
|
991
991
|
}
|
|
992
992
|
));
|
|
993
|
-
function
|
|
993
|
+
function an(e) {
|
|
994
994
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
995
995
|
}
|
|
996
|
-
var fe = { exports: {} }, De = {}, pe = { exports: {} }, ye = { exports: {} },
|
|
997
|
-
var
|
|
998
|
-
function
|
|
999
|
-
if (
|
|
1000
|
-
|
|
1001
|
-
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,
|
|
996
|
+
var fe = { exports: {} }, De = {}, pe = { exports: {} }, ye = { exports: {} }, U = {};
|
|
997
|
+
var Ve;
|
|
998
|
+
function sn() {
|
|
999
|
+
if (Ve) return U;
|
|
1000
|
+
Ve = 1;
|
|
1001
|
+
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, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, y = 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, g = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, p = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, b = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1002
1002
|
function S(c) {
|
|
1003
1003
|
if (typeof c == "object" && c !== null) {
|
|
1004
|
-
var
|
|
1005
|
-
switch (
|
|
1004
|
+
var E = c.$$typeof;
|
|
1005
|
+
switch (E) {
|
|
1006
1006
|
case n:
|
|
1007
1007
|
switch (c = c.type, c) {
|
|
1008
1008
|
case y:
|
|
@@ -1016,58 +1016,58 @@ function an() {
|
|
|
1016
1016
|
switch (c = c && c.$$typeof, c) {
|
|
1017
1017
|
case d:
|
|
1018
1018
|
case h:
|
|
1019
|
-
case
|
|
1019
|
+
case x:
|
|
1020
1020
|
case p:
|
|
1021
|
-
case
|
|
1021
|
+
case s:
|
|
1022
1022
|
return c;
|
|
1023
1023
|
default:
|
|
1024
|
-
return
|
|
1024
|
+
return E;
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
1027
|
case t:
|
|
1028
|
-
return
|
|
1028
|
+
return E;
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
1032
|
function D(c) {
|
|
1033
1033
|
return S(c) === m;
|
|
1034
1034
|
}
|
|
1035
|
-
return
|
|
1035
|
+
return U.AsyncMode = y, U.ConcurrentMode = m, U.ContextConsumer = d, U.ContextProvider = s, U.Element = n, U.ForwardRef = h, U.Fragment = r, U.Lazy = x, U.Memo = p, U.Portal = t, U.Profiler = o, U.StrictMode = i, U.Suspense = u, U.isAsyncMode = function(c) {
|
|
1036
1036
|
return D(c) || S(c) === y;
|
|
1037
|
-
},
|
|
1037
|
+
}, U.isConcurrentMode = D, U.isContextConsumer = function(c) {
|
|
1038
1038
|
return S(c) === d;
|
|
1039
|
-
},
|
|
1040
|
-
return S(c) ===
|
|
1041
|
-
},
|
|
1039
|
+
}, U.isContextProvider = function(c) {
|
|
1040
|
+
return S(c) === s;
|
|
1041
|
+
}, U.isElement = function(c) {
|
|
1042
1042
|
return typeof c == "object" && c !== null && c.$$typeof === n;
|
|
1043
|
-
},
|
|
1043
|
+
}, U.isForwardRef = function(c) {
|
|
1044
1044
|
return S(c) === h;
|
|
1045
|
-
},
|
|
1045
|
+
}, U.isFragment = function(c) {
|
|
1046
1046
|
return S(c) === r;
|
|
1047
|
-
},
|
|
1048
|
-
return S(c) ===
|
|
1049
|
-
},
|
|
1047
|
+
}, U.isLazy = function(c) {
|
|
1048
|
+
return S(c) === x;
|
|
1049
|
+
}, U.isMemo = function(c) {
|
|
1050
1050
|
return S(c) === p;
|
|
1051
|
-
},
|
|
1051
|
+
}, U.isPortal = function(c) {
|
|
1052
1052
|
return S(c) === t;
|
|
1053
|
-
},
|
|
1053
|
+
}, U.isProfiler = function(c) {
|
|
1054
1054
|
return S(c) === o;
|
|
1055
|
-
},
|
|
1055
|
+
}, U.isStrictMode = function(c) {
|
|
1056
1056
|
return S(c) === i;
|
|
1057
|
-
},
|
|
1057
|
+
}, U.isSuspense = function(c) {
|
|
1058
1058
|
return S(c) === u;
|
|
1059
|
-
},
|
|
1060
|
-
return typeof c == "string" || typeof c == "function" || c === r || c === m || c === o || c === i || c === u || c === g || typeof c == "object" && c !== null && (c.$$typeof ===
|
|
1061
|
-
},
|
|
1059
|
+
}, U.isValidElementType = function(c) {
|
|
1060
|
+
return typeof c == "string" || typeof c == "function" || c === r || c === m || c === o || c === i || c === u || c === g || typeof c == "object" && c !== null && (c.$$typeof === x || c.$$typeof === p || c.$$typeof === s || c.$$typeof === d || c.$$typeof === h || c.$$typeof === v || c.$$typeof === C || c.$$typeof === N || c.$$typeof === b);
|
|
1061
|
+
}, U.typeOf = S, U;
|
|
1062
1062
|
}
|
|
1063
|
-
var
|
|
1064
|
-
var
|
|
1065
|
-
function
|
|
1066
|
-
return
|
|
1067
|
-
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,
|
|
1063
|
+
var q = {};
|
|
1064
|
+
var Ue;
|
|
1065
|
+
function ln() {
|
|
1066
|
+
return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1067
|
+
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, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, y = 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, g = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, p = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, x = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, b = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, C = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1068
1068
|
function S(_) {
|
|
1069
1069
|
return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1070
|
-
_ === r || _ === m || _ === o || _ === i || _ === u || _ === g || typeof _ == "object" && _ !== null && (_.$$typeof ===
|
|
1070
|
+
_ === r || _ === m || _ === o || _ === i || _ === u || _ === g || typeof _ == "object" && _ !== null && (_.$$typeof === x || _.$$typeof === p || _.$$typeof === s || _.$$typeof === d || _.$$typeof === h || _.$$typeof === v || _.$$typeof === C || _.$$typeof === N || _.$$typeof === b);
|
|
1071
1071
|
}
|
|
1072
1072
|
function D(_) {
|
|
1073
1073
|
if (typeof _ == "object" && _ !== null) {
|
|
@@ -1088,9 +1088,9 @@ function sn() {
|
|
|
1088
1088
|
switch (je) {
|
|
1089
1089
|
case d:
|
|
1090
1090
|
case h:
|
|
1091
|
-
case
|
|
1091
|
+
case x:
|
|
1092
1092
|
case p:
|
|
1093
|
-
case
|
|
1093
|
+
case s:
|
|
1094
1094
|
return je;
|
|
1095
1095
|
default:
|
|
1096
1096
|
return te;
|
|
@@ -1101,30 +1101,30 @@ function sn() {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
|
-
var c = y,
|
|
1104
|
+
var c = y, E = m, l = d, f = s, M = n, $ = h, I = r, T = x, z = p, X = t, Q = o, K = i, ee = u, se = !1;
|
|
1105
1105
|
function de(_) {
|
|
1106
|
-
return
|
|
1106
|
+
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.")), w(_) || D(_) === y;
|
|
1107
1107
|
}
|
|
1108
|
-
function
|
|
1108
|
+
function w(_) {
|
|
1109
1109
|
return D(_) === m;
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function P(_) {
|
|
1112
1112
|
return D(_) === d;
|
|
1113
1113
|
}
|
|
1114
1114
|
function A(_) {
|
|
1115
|
-
return D(_) ===
|
|
1115
|
+
return D(_) === s;
|
|
1116
1116
|
}
|
|
1117
1117
|
function k(_) {
|
|
1118
1118
|
return typeof _ == "object" && _ !== null && _.$$typeof === n;
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function R(_) {
|
|
1121
1121
|
return D(_) === h;
|
|
1122
1122
|
}
|
|
1123
1123
|
function L(_) {
|
|
1124
1124
|
return D(_) === r;
|
|
1125
1125
|
}
|
|
1126
|
-
function
|
|
1127
|
-
return D(_) ===
|
|
1126
|
+
function O(_) {
|
|
1127
|
+
return D(_) === x;
|
|
1128
1128
|
}
|
|
1129
1129
|
function j(_) {
|
|
1130
1130
|
return D(_) === p;
|
|
@@ -1132,26 +1132,26 @@ function sn() {
|
|
|
1132
1132
|
function F(_) {
|
|
1133
1133
|
return D(_) === t;
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1135
|
+
function Y(_) {
|
|
1136
1136
|
return D(_) === o;
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1138
|
+
function V(_) {
|
|
1139
1139
|
return D(_) === i;
|
|
1140
1140
|
}
|
|
1141
1141
|
function G(_) {
|
|
1142
1142
|
return D(_) === u;
|
|
1143
1143
|
}
|
|
1144
|
-
|
|
1145
|
-
})()),
|
|
1144
|
+
q.AsyncMode = c, q.ConcurrentMode = E, q.ContextConsumer = l, q.ContextProvider = f, q.Element = M, q.ForwardRef = $, q.Fragment = I, q.Lazy = T, q.Memo = z, q.Portal = X, q.Profiler = Q, q.StrictMode = K, q.Suspense = ee, q.isAsyncMode = de, q.isConcurrentMode = w, q.isContextConsumer = P, q.isContextProvider = A, q.isElement = k, q.isForwardRef = R, q.isFragment = L, q.isLazy = O, q.isMemo = j, q.isPortal = F, q.isProfiler = Y, q.isStrictMode = V, q.isSuspense = G, q.isValidElementType = S, q.typeOf = D;
|
|
1145
|
+
})()), q;
|
|
1146
1146
|
}
|
|
1147
|
-
var
|
|
1148
|
-
function
|
|
1149
|
-
return
|
|
1147
|
+
var qe;
|
|
1148
|
+
function yt() {
|
|
1149
|
+
return qe || (qe = 1, process.env.NODE_ENV === "production" ? ye.exports = sn() : ye.exports = ln()), ye.exports;
|
|
1150
1150
|
}
|
|
1151
|
-
var Ne,
|
|
1152
|
-
function
|
|
1153
|
-
if (
|
|
1154
|
-
|
|
1151
|
+
var Ne, Ye;
|
|
1152
|
+
function cn() {
|
|
1153
|
+
if (Ye) return Ne;
|
|
1154
|
+
Ye = 1;
|
|
1155
1155
|
var e = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
1156
1156
|
function r(o) {
|
|
1157
1157
|
if (o == null)
|
|
@@ -1165,10 +1165,10 @@ function ln() {
|
|
|
1165
1165
|
var o = new String("abc");
|
|
1166
1166
|
if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
|
|
1167
1167
|
return !1;
|
|
1168
|
-
for (var
|
|
1169
|
-
|
|
1170
|
-
var y = Object.getOwnPropertyNames(
|
|
1171
|
-
return
|
|
1168
|
+
for (var s = {}, d = 0; d < 10; d++)
|
|
1169
|
+
s["_" + String.fromCharCode(d)] = d;
|
|
1170
|
+
var y = Object.getOwnPropertyNames(s).map(function(h) {
|
|
1171
|
+
return s[h];
|
|
1172
1172
|
});
|
|
1173
1173
|
if (y.join("") !== "0123456789")
|
|
1174
1174
|
return !1;
|
|
@@ -1180,7 +1180,7 @@ function ln() {
|
|
|
1180
1180
|
return !1;
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
|
-
return Ne = i() ? Object.assign : function(o,
|
|
1183
|
+
return Ne = i() ? Object.assign : function(o, s) {
|
|
1184
1184
|
for (var d, y = r(o), m, h = 1; h < arguments.length; h++) {
|
|
1185
1185
|
d = Object(arguments[h]);
|
|
1186
1186
|
for (var u in d)
|
|
@@ -1195,34 +1195,34 @@ function ln() {
|
|
|
1195
1195
|
}, Ne;
|
|
1196
1196
|
}
|
|
1197
1197
|
var Te, ze;
|
|
1198
|
-
function
|
|
1198
|
+
function Re() {
|
|
1199
1199
|
if (ze) return Te;
|
|
1200
1200
|
ze = 1;
|
|
1201
1201
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
1202
1202
|
return Te = e, Te;
|
|
1203
1203
|
}
|
|
1204
1204
|
var Ee, Be;
|
|
1205
|
-
function
|
|
1205
|
+
function bt() {
|
|
1206
1206
|
return Be || (Be = 1, Ee = Function.call.bind(Object.prototype.hasOwnProperty)), Ee;
|
|
1207
1207
|
}
|
|
1208
|
-
var _e,
|
|
1209
|
-
function
|
|
1210
|
-
if (
|
|
1211
|
-
|
|
1208
|
+
var _e, He;
|
|
1209
|
+
function dn() {
|
|
1210
|
+
if (He) return _e;
|
|
1211
|
+
He = 1;
|
|
1212
1212
|
var e = function() {
|
|
1213
1213
|
};
|
|
1214
1214
|
if (process.env.NODE_ENV !== "production") {
|
|
1215
|
-
var n = /* @__PURE__ */
|
|
1215
|
+
var n = /* @__PURE__ */ Re(), t = {}, r = /* @__PURE__ */ bt();
|
|
1216
1216
|
e = function(o) {
|
|
1217
|
-
var
|
|
1218
|
-
typeof console < "u" && console.error(
|
|
1217
|
+
var s = "Warning: " + o;
|
|
1218
|
+
typeof console < "u" && console.error(s);
|
|
1219
1219
|
try {
|
|
1220
|
-
throw new Error(
|
|
1220
|
+
throw new Error(s);
|
|
1221
1221
|
} catch {
|
|
1222
1222
|
}
|
|
1223
1223
|
};
|
|
1224
1224
|
}
|
|
1225
|
-
function i(o,
|
|
1225
|
+
function i(o, s, d, y, m) {
|
|
1226
1226
|
if (process.env.NODE_ENV !== "production") {
|
|
1227
1227
|
for (var h in o)
|
|
1228
1228
|
if (r(o, h)) {
|
|
@@ -1234,9 +1234,9 @@ function cn() {
|
|
|
1234
1234
|
);
|
|
1235
1235
|
throw g.name = "Invariant Violation", g;
|
|
1236
1236
|
}
|
|
1237
|
-
u = o[h](
|
|
1238
|
-
} catch (
|
|
1239
|
-
u =
|
|
1237
|
+
u = o[h](s, h, y, d, null, n);
|
|
1238
|
+
} catch (x) {
|
|
1239
|
+
u = x;
|
|
1240
1240
|
}
|
|
1241
1241
|
if (u && !(u instanceof Error) && e(
|
|
1242
1242
|
(y || "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)."
|
|
@@ -1254,11 +1254,11 @@ function cn() {
|
|
|
1254
1254
|
process.env.NODE_ENV !== "production" && (t = {});
|
|
1255
1255
|
}, _e = i, _e;
|
|
1256
1256
|
}
|
|
1257
|
-
var Me,
|
|
1258
|
-
function
|
|
1259
|
-
if (
|
|
1260
|
-
|
|
1261
|
-
var e =
|
|
1257
|
+
var Me, Ke;
|
|
1258
|
+
function un() {
|
|
1259
|
+
if (Ke) return Me;
|
|
1260
|
+
Ke = 1;
|
|
1261
|
+
var e = yt(), n = cn(), t = /* @__PURE__ */ Re(), r = /* @__PURE__ */ bt(), i = /* @__PURE__ */ dn(), o = function() {
|
|
1262
1262
|
};
|
|
1263
1263
|
process.env.NODE_ENV !== "production" && (o = function(d) {
|
|
1264
1264
|
var y = "Warning: " + d;
|
|
@@ -1268,15 +1268,15 @@ function dn() {
|
|
|
1268
1268
|
} catch {
|
|
1269
1269
|
}
|
|
1270
1270
|
});
|
|
1271
|
-
function
|
|
1271
|
+
function s() {
|
|
1272
1272
|
return null;
|
|
1273
1273
|
}
|
|
1274
1274
|
return Me = function(d, y) {
|
|
1275
1275
|
var m = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
|
|
1276
|
-
function u(
|
|
1277
|
-
var
|
|
1278
|
-
if (typeof
|
|
1279
|
-
return
|
|
1276
|
+
function u(w) {
|
|
1277
|
+
var P = w && (m && w[m] || w[h]);
|
|
1278
|
+
if (typeof P == "function")
|
|
1279
|
+
return P;
|
|
1280
1280
|
}
|
|
1281
1281
|
var g = "<<anonymous>>", p = {
|
|
1282
1282
|
array: C("array"),
|
|
@@ -1291,26 +1291,26 @@ function dn() {
|
|
|
1291
1291
|
arrayOf: S,
|
|
1292
1292
|
element: D(),
|
|
1293
1293
|
elementType: c(),
|
|
1294
|
-
instanceOf:
|
|
1294
|
+
instanceOf: E,
|
|
1295
1295
|
node: $(),
|
|
1296
1296
|
objectOf: f,
|
|
1297
1297
|
oneOf: l,
|
|
1298
|
-
oneOfType:
|
|
1299
|
-
shape:
|
|
1298
|
+
oneOfType: M,
|
|
1299
|
+
shape: T,
|
|
1300
1300
|
exact: z
|
|
1301
1301
|
};
|
|
1302
|
-
function w
|
|
1303
|
-
return
|
|
1302
|
+
function x(w, P) {
|
|
1303
|
+
return w === P ? w !== 0 || 1 / w === 1 / P : w !== w && P !== P;
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1306
|
-
this.message =
|
|
1305
|
+
function b(w, P) {
|
|
1306
|
+
this.message = w, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
|
|
1307
1307
|
}
|
|
1308
|
-
|
|
1309
|
-
function
|
|
1308
|
+
b.prototype = Error.prototype;
|
|
1309
|
+
function v(w) {
|
|
1310
1310
|
if (process.env.NODE_ENV !== "production")
|
|
1311
|
-
var
|
|
1312
|
-
function k(L,
|
|
1313
|
-
if (F = F || g,
|
|
1311
|
+
var P = {}, A = 0;
|
|
1312
|
+
function k(L, O, j, F, Y, V, G) {
|
|
1313
|
+
if (F = F || g, V = V || j, G !== t) {
|
|
1314
1314
|
if (y) {
|
|
1315
1315
|
var _ = new Error(
|
|
1316
1316
|
"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"
|
|
@@ -1318,215 +1318,215 @@ function dn() {
|
|
|
1318
1318
|
throw _.name = "Invariant Violation", _;
|
|
1319
1319
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1320
1320
|
var te = F + ":" + j;
|
|
1321
|
-
!
|
|
1321
|
+
!P[te] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1322
1322
|
A < 3 && (o(
|
|
1323
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
1324
|
-
),
|
|
1323
|
+
"You are manually calling a React.PropTypes validation function for the `" + V + "` 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."
|
|
1324
|
+
), P[te] = !0, A++);
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
1327
|
-
return
|
|
1327
|
+
return O[j] == null ? L ? O[j] === null ? new b("The " + Y + " `" + V + "` is marked as required " + ("in `" + F + "`, but its value is `null`.")) : new b("The " + Y + " `" + V + "` is marked as required in " + ("`" + F + "`, but its value is `undefined`.")) : null : w(O, j, F, Y, V);
|
|
1328
1328
|
}
|
|
1329
|
-
var
|
|
1330
|
-
return
|
|
1331
|
-
}
|
|
1332
|
-
function C(
|
|
1333
|
-
function
|
|
1334
|
-
var F = A[k],
|
|
1335
|
-
if (
|
|
1336
|
-
var
|
|
1337
|
-
return new
|
|
1338
|
-
"Invalid " + L + " `" +
|
|
1339
|
-
{ expectedType:
|
|
1329
|
+
var R = k.bind(null, !1);
|
|
1330
|
+
return R.isRequired = k.bind(null, !0), R;
|
|
1331
|
+
}
|
|
1332
|
+
function C(w) {
|
|
1333
|
+
function P(A, k, R, L, O, j) {
|
|
1334
|
+
var F = A[k], Y = K(F);
|
|
1335
|
+
if (Y !== w) {
|
|
1336
|
+
var V = ee(F);
|
|
1337
|
+
return new b(
|
|
1338
|
+
"Invalid " + L + " `" + O + "` of type " + ("`" + V + "` supplied to `" + R + "`, expected ") + ("`" + w + "`."),
|
|
1339
|
+
{ expectedType: w }
|
|
1340
1340
|
);
|
|
1341
1341
|
}
|
|
1342
1342
|
return null;
|
|
1343
1343
|
}
|
|
1344
|
-
return
|
|
1344
|
+
return v(P);
|
|
1345
1345
|
}
|
|
1346
1346
|
function N() {
|
|
1347
|
-
return
|
|
1347
|
+
return v(s);
|
|
1348
1348
|
}
|
|
1349
|
-
function S(
|
|
1350
|
-
function
|
|
1351
|
-
if (typeof
|
|
1352
|
-
return new
|
|
1349
|
+
function S(w) {
|
|
1350
|
+
function P(A, k, R, L, O) {
|
|
1351
|
+
if (typeof w != "function")
|
|
1352
|
+
return new b("Property `" + O + "` of component `" + R + "` has invalid PropType notation inside arrayOf.");
|
|
1353
1353
|
var j = A[k];
|
|
1354
1354
|
if (!Array.isArray(j)) {
|
|
1355
|
-
var F =
|
|
1356
|
-
return new
|
|
1355
|
+
var F = K(j);
|
|
1356
|
+
return new b("Invalid " + L + " `" + O + "` of type " + ("`" + F + "` supplied to `" + R + "`, expected an array."));
|
|
1357
1357
|
}
|
|
1358
|
-
for (var
|
|
1359
|
-
var
|
|
1360
|
-
if (
|
|
1361
|
-
return
|
|
1358
|
+
for (var Y = 0; Y < j.length; Y++) {
|
|
1359
|
+
var V = w(j, Y, R, L, O + "[" + Y + "]", t);
|
|
1360
|
+
if (V instanceof Error)
|
|
1361
|
+
return V;
|
|
1362
1362
|
}
|
|
1363
1363
|
return null;
|
|
1364
1364
|
}
|
|
1365
|
-
return
|
|
1365
|
+
return v(P);
|
|
1366
1366
|
}
|
|
1367
1367
|
function D() {
|
|
1368
|
-
function
|
|
1369
|
-
var
|
|
1370
|
-
if (!d(
|
|
1371
|
-
var j =
|
|
1372
|
-
return new
|
|
1368
|
+
function w(P, A, k, R, L) {
|
|
1369
|
+
var O = P[A];
|
|
1370
|
+
if (!d(O)) {
|
|
1371
|
+
var j = K(O);
|
|
1372
|
+
return new b("Invalid " + R + " `" + L + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement."));
|
|
1373
1373
|
}
|
|
1374
1374
|
return null;
|
|
1375
1375
|
}
|
|
1376
|
-
return
|
|
1376
|
+
return v(w);
|
|
1377
1377
|
}
|
|
1378
1378
|
function c() {
|
|
1379
|
-
function
|
|
1380
|
-
var
|
|
1381
|
-
if (!e.isValidElementType(
|
|
1382
|
-
var j =
|
|
1383
|
-
return new
|
|
1379
|
+
function w(P, A, k, R, L) {
|
|
1380
|
+
var O = P[A];
|
|
1381
|
+
if (!e.isValidElementType(O)) {
|
|
1382
|
+
var j = K(O);
|
|
1383
|
+
return new b("Invalid " + R + " `" + L + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement type."));
|
|
1384
1384
|
}
|
|
1385
1385
|
return null;
|
|
1386
1386
|
}
|
|
1387
|
-
return
|
|
1387
|
+
return v(w);
|
|
1388
1388
|
}
|
|
1389
|
-
function
|
|
1390
|
-
function
|
|
1391
|
-
if (!(A[k] instanceof
|
|
1392
|
-
var j =
|
|
1393
|
-
return new
|
|
1389
|
+
function E(w) {
|
|
1390
|
+
function P(A, k, R, L, O) {
|
|
1391
|
+
if (!(A[k] instanceof w)) {
|
|
1392
|
+
var j = w.name || g, F = de(A[k]);
|
|
1393
|
+
return new b("Invalid " + L + " `" + O + "` of type " + ("`" + F + "` supplied to `" + R + "`, expected ") + ("instance of `" + j + "`."));
|
|
1394
1394
|
}
|
|
1395
1395
|
return null;
|
|
1396
1396
|
}
|
|
1397
|
-
return
|
|
1397
|
+
return v(P);
|
|
1398
1398
|
}
|
|
1399
|
-
function l(
|
|
1400
|
-
if (!Array.isArray(
|
|
1399
|
+
function l(w) {
|
|
1400
|
+
if (!Array.isArray(w))
|
|
1401
1401
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
1402
1402
|
"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])."
|
|
1403
|
-
) : o("Invalid argument supplied to oneOf, expected an array.")),
|
|
1404
|
-
function
|
|
1405
|
-
for (var j = A[k], F = 0; F <
|
|
1406
|
-
if (
|
|
1403
|
+
) : o("Invalid argument supplied to oneOf, expected an array.")), s;
|
|
1404
|
+
function P(A, k, R, L, O) {
|
|
1405
|
+
for (var j = A[k], F = 0; F < w.length; F++)
|
|
1406
|
+
if (x(j, w[F]))
|
|
1407
1407
|
return null;
|
|
1408
|
-
var
|
|
1408
|
+
var Y = JSON.stringify(w, function(G, _) {
|
|
1409
1409
|
var te = ee(_);
|
|
1410
1410
|
return te === "symbol" ? String(_) : _;
|
|
1411
1411
|
});
|
|
1412
|
-
return new
|
|
1412
|
+
return new b("Invalid " + L + " `" + O + "` of value `" + String(j) + "` " + ("supplied to `" + R + "`, expected one of " + Y + "."));
|
|
1413
1413
|
}
|
|
1414
|
-
return
|
|
1414
|
+
return v(P);
|
|
1415
1415
|
}
|
|
1416
|
-
function f(
|
|
1417
|
-
function
|
|
1418
|
-
if (typeof
|
|
1419
|
-
return new
|
|
1420
|
-
var j = A[k], F =
|
|
1416
|
+
function f(w) {
|
|
1417
|
+
function P(A, k, R, L, O) {
|
|
1418
|
+
if (typeof w != "function")
|
|
1419
|
+
return new b("Property `" + O + "` of component `" + R + "` has invalid PropType notation inside objectOf.");
|
|
1420
|
+
var j = A[k], F = K(j);
|
|
1421
1421
|
if (F !== "object")
|
|
1422
|
-
return new
|
|
1423
|
-
for (var
|
|
1424
|
-
if (r(j,
|
|
1425
|
-
var
|
|
1426
|
-
if (
|
|
1427
|
-
return
|
|
1422
|
+
return new b("Invalid " + L + " `" + O + "` of type " + ("`" + F + "` supplied to `" + R + "`, expected an object."));
|
|
1423
|
+
for (var Y in j)
|
|
1424
|
+
if (r(j, Y)) {
|
|
1425
|
+
var V = w(j, Y, R, L, O + "." + Y, t);
|
|
1426
|
+
if (V instanceof Error)
|
|
1427
|
+
return V;
|
|
1428
1428
|
}
|
|
1429
1429
|
return null;
|
|
1430
1430
|
}
|
|
1431
|
-
return
|
|
1431
|
+
return v(P);
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1434
|
-
if (!Array.isArray(
|
|
1435
|
-
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."),
|
|
1436
|
-
for (var
|
|
1437
|
-
var A =
|
|
1433
|
+
function M(w) {
|
|
1434
|
+
if (!Array.isArray(w))
|
|
1435
|
+
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), s;
|
|
1436
|
+
for (var P = 0; P < w.length; P++) {
|
|
1437
|
+
var A = w[P];
|
|
1438
1438
|
if (typeof A != "function")
|
|
1439
1439
|
return o(
|
|
1440
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
1441
|
-
),
|
|
1440
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + se(A) + " at index " + P + "."
|
|
1441
|
+
), s;
|
|
1442
1442
|
}
|
|
1443
|
-
function k(
|
|
1444
|
-
for (var
|
|
1445
|
-
var G =
|
|
1443
|
+
function k(R, L, O, j, F) {
|
|
1444
|
+
for (var Y = [], V = 0; V < w.length; V++) {
|
|
1445
|
+
var G = w[V], _ = G(R, L, O, j, F, t);
|
|
1446
1446
|
if (_ == null)
|
|
1447
1447
|
return null;
|
|
1448
|
-
_.data && r(_.data, "expectedType") &&
|
|
1448
|
+
_.data && r(_.data, "expectedType") && Y.push(_.data.expectedType);
|
|
1449
1449
|
}
|
|
1450
|
-
var te =
|
|
1451
|
-
return new
|
|
1450
|
+
var te = Y.length > 0 ? ", expected one of type [" + Y.join(", ") + "]" : "";
|
|
1451
|
+
return new b("Invalid " + j + " `" + F + "` supplied to " + ("`" + O + "`" + te + "."));
|
|
1452
1452
|
}
|
|
1453
|
-
return
|
|
1453
|
+
return v(k);
|
|
1454
1454
|
}
|
|
1455
1455
|
function $() {
|
|
1456
|
-
function
|
|
1457
|
-
return X(
|
|
1456
|
+
function w(P, A, k, R, L) {
|
|
1457
|
+
return X(P[A]) ? null : new b("Invalid " + R + " `" + L + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
|
|
1458
1458
|
}
|
|
1459
|
-
return
|
|
1459
|
+
return v(w);
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1462
|
-
return new
|
|
1463
|
-
(
|
|
1461
|
+
function I(w, P, A, k, R) {
|
|
1462
|
+
return new b(
|
|
1463
|
+
(w || "React class") + ": " + P + " type `" + A + "." + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + R + "`."
|
|
1464
1464
|
);
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1467
|
-
function
|
|
1468
|
-
var j = A[k], F =
|
|
1466
|
+
function T(w) {
|
|
1467
|
+
function P(A, k, R, L, O) {
|
|
1468
|
+
var j = A[k], F = K(j);
|
|
1469
1469
|
if (F !== "object")
|
|
1470
|
-
return new
|
|
1471
|
-
for (var
|
|
1472
|
-
var
|
|
1473
|
-
if (typeof
|
|
1474
|
-
return
|
|
1475
|
-
var G =
|
|
1470
|
+
return new b("Invalid " + L + " `" + O + "` of type `" + F + "` " + ("supplied to `" + R + "`, expected `object`."));
|
|
1471
|
+
for (var Y in w) {
|
|
1472
|
+
var V = w[Y];
|
|
1473
|
+
if (typeof V != "function")
|
|
1474
|
+
return I(R, L, O, Y, ee(V));
|
|
1475
|
+
var G = V(j, Y, R, L, O + "." + Y, t);
|
|
1476
1476
|
if (G)
|
|
1477
1477
|
return G;
|
|
1478
1478
|
}
|
|
1479
1479
|
return null;
|
|
1480
1480
|
}
|
|
1481
|
-
return
|
|
1481
|
+
return v(P);
|
|
1482
1482
|
}
|
|
1483
|
-
function z(
|
|
1484
|
-
function
|
|
1485
|
-
var j = A[k], F =
|
|
1483
|
+
function z(w) {
|
|
1484
|
+
function P(A, k, R, L, O) {
|
|
1485
|
+
var j = A[k], F = K(j);
|
|
1486
1486
|
if (F !== "object")
|
|
1487
|
-
return new
|
|
1488
|
-
var
|
|
1489
|
-
for (var
|
|
1490
|
-
var G =
|
|
1491
|
-
if (r(
|
|
1492
|
-
return
|
|
1487
|
+
return new b("Invalid " + L + " `" + O + "` of type `" + F + "` " + ("supplied to `" + R + "`, expected `object`."));
|
|
1488
|
+
var Y = n({}, A[k], w);
|
|
1489
|
+
for (var V in Y) {
|
|
1490
|
+
var G = w[V];
|
|
1491
|
+
if (r(w, V) && typeof G != "function")
|
|
1492
|
+
return I(R, L, O, V, ee(G));
|
|
1493
1493
|
if (!G)
|
|
1494
|
-
return new
|
|
1495
|
-
"Invalid " + L + " `" +
|
|
1496
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
1494
|
+
return new b(
|
|
1495
|
+
"Invalid " + L + " `" + O + "` key `" + V + "` supplied to `" + R + "`.\nBad object: " + JSON.stringify(A[k], null, " ") + `
|
|
1496
|
+
Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
|
|
1497
1497
|
);
|
|
1498
|
-
var _ = G(j,
|
|
1498
|
+
var _ = G(j, V, R, L, O + "." + V, t);
|
|
1499
1499
|
if (_)
|
|
1500
1500
|
return _;
|
|
1501
1501
|
}
|
|
1502
1502
|
return null;
|
|
1503
1503
|
}
|
|
1504
|
-
return
|
|
1504
|
+
return v(P);
|
|
1505
1505
|
}
|
|
1506
|
-
function X(
|
|
1507
|
-
switch (typeof
|
|
1506
|
+
function X(w) {
|
|
1507
|
+
switch (typeof w) {
|
|
1508
1508
|
case "number":
|
|
1509
1509
|
case "string":
|
|
1510
1510
|
case "undefined":
|
|
1511
1511
|
return !0;
|
|
1512
1512
|
case "boolean":
|
|
1513
|
-
return !
|
|
1513
|
+
return !w;
|
|
1514
1514
|
case "object":
|
|
1515
|
-
if (Array.isArray(
|
|
1516
|
-
return
|
|
1517
|
-
if (
|
|
1515
|
+
if (Array.isArray(w))
|
|
1516
|
+
return w.every(X);
|
|
1517
|
+
if (w === null || d(w))
|
|
1518
1518
|
return !0;
|
|
1519
|
-
var
|
|
1520
|
-
if (
|
|
1521
|
-
var A =
|
|
1522
|
-
if (
|
|
1519
|
+
var P = u(w);
|
|
1520
|
+
if (P) {
|
|
1521
|
+
var A = P.call(w), k;
|
|
1522
|
+
if (P !== w.entries) {
|
|
1523
1523
|
for (; !(k = A.next()).done; )
|
|
1524
1524
|
if (!X(k.value))
|
|
1525
1525
|
return !1;
|
|
1526
1526
|
} else
|
|
1527
1527
|
for (; !(k = A.next()).done; ) {
|
|
1528
|
-
var
|
|
1529
|
-
if (
|
|
1528
|
+
var R = k.value;
|
|
1529
|
+
if (R && !X(R[1]))
|
|
1530
1530
|
return !1;
|
|
1531
1531
|
}
|
|
1532
1532
|
} else
|
|
@@ -1536,56 +1536,56 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1536
1536
|
return !1;
|
|
1537
1537
|
}
|
|
1538
1538
|
}
|
|
1539
|
-
function Q(
|
|
1540
|
-
return
|
|
1539
|
+
function Q(w, P) {
|
|
1540
|
+
return w === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1543
|
-
var
|
|
1544
|
-
return Array.isArray(
|
|
1542
|
+
function K(w) {
|
|
1543
|
+
var P = typeof w;
|
|
1544
|
+
return Array.isArray(w) ? "array" : w instanceof RegExp ? "object" : Q(P, w) ? "symbol" : P;
|
|
1545
1545
|
}
|
|
1546
|
-
function ee(
|
|
1547
|
-
if (typeof
|
|
1548
|
-
return "" +
|
|
1549
|
-
var
|
|
1550
|
-
if (
|
|
1551
|
-
if (
|
|
1546
|
+
function ee(w) {
|
|
1547
|
+
if (typeof w > "u" || w === null)
|
|
1548
|
+
return "" + w;
|
|
1549
|
+
var P = K(w);
|
|
1550
|
+
if (P === "object") {
|
|
1551
|
+
if (w instanceof Date)
|
|
1552
1552
|
return "date";
|
|
1553
|
-
if (
|
|
1553
|
+
if (w instanceof RegExp)
|
|
1554
1554
|
return "regexp";
|
|
1555
1555
|
}
|
|
1556
|
-
return
|
|
1556
|
+
return P;
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1559
|
-
var
|
|
1560
|
-
switch (
|
|
1558
|
+
function se(w) {
|
|
1559
|
+
var P = ee(w);
|
|
1560
|
+
switch (P) {
|
|
1561
1561
|
case "array":
|
|
1562
1562
|
case "object":
|
|
1563
|
-
return "an " +
|
|
1563
|
+
return "an " + P;
|
|
1564
1564
|
case "boolean":
|
|
1565
1565
|
case "date":
|
|
1566
1566
|
case "regexp":
|
|
1567
|
-
return "a " +
|
|
1567
|
+
return "a " + P;
|
|
1568
1568
|
default:
|
|
1569
|
-
return
|
|
1569
|
+
return P;
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
|
-
function de(
|
|
1573
|
-
return !
|
|
1572
|
+
function de(w) {
|
|
1573
|
+
return !w.constructor || !w.constructor.name ? g : w.constructor.name;
|
|
1574
1574
|
}
|
|
1575
1575
|
return p.checkPropTypes = i, p.resetWarningCache = i.resetWarningCache, p.PropTypes = p, p;
|
|
1576
1576
|
}, Me;
|
|
1577
1577
|
}
|
|
1578
1578
|
var Pe, Xe;
|
|
1579
|
-
function
|
|
1579
|
+
function fn() {
|
|
1580
1580
|
if (Xe) return Pe;
|
|
1581
1581
|
Xe = 1;
|
|
1582
|
-
var e = /* @__PURE__ */
|
|
1582
|
+
var e = /* @__PURE__ */ Re();
|
|
1583
1583
|
function n() {
|
|
1584
1584
|
}
|
|
1585
1585
|
function t() {
|
|
1586
1586
|
}
|
|
1587
1587
|
return t.resetWarningCache = n, Pe = function() {
|
|
1588
|
-
function r(
|
|
1588
|
+
function r(s, d, y, m, h, u) {
|
|
1589
1589
|
if (u !== e) {
|
|
1590
1590
|
var g = new Error(
|
|
1591
1591
|
"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"
|
|
@@ -1627,30 +1627,30 @@ var Ge;
|
|
|
1627
1627
|
function vt() {
|
|
1628
1628
|
if (Ge) return pe.exports;
|
|
1629
1629
|
if (Ge = 1, process.env.NODE_ENV !== "production") {
|
|
1630
|
-
var e =
|
|
1631
|
-
pe.exports = /* @__PURE__ */
|
|
1630
|
+
var e = yt(), n = !0;
|
|
1631
|
+
pe.exports = /* @__PURE__ */ un()(e.isElement, n);
|
|
1632
1632
|
} else
|
|
1633
|
-
pe.exports = /* @__PURE__ */
|
|
1633
|
+
pe.exports = /* @__PURE__ */ fn()();
|
|
1634
1634
|
return pe.exports;
|
|
1635
1635
|
}
|
|
1636
|
-
var
|
|
1637
|
-
function
|
|
1638
|
-
if (Ze) return
|
|
1636
|
+
var be = { exports: {} }, Ze;
|
|
1637
|
+
function hn() {
|
|
1638
|
+
if (Ze) return be.exports;
|
|
1639
1639
|
Ze = 1;
|
|
1640
1640
|
function e(t) {
|
|
1641
1641
|
var r, i, o = "";
|
|
1642
1642
|
if (typeof t == "string" || typeof t == "number") o += t;
|
|
1643
1643
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1644
|
-
var
|
|
1645
|
-
for (r = 0; r <
|
|
1644
|
+
var s = t.length;
|
|
1645
|
+
for (r = 0; r < s; r++) t[r] && (i = e(t[r])) && (o && (o += " "), o += i);
|
|
1646
1646
|
} else for (i in t) t[i] && (o && (o += " "), o += i);
|
|
1647
1647
|
return o;
|
|
1648
1648
|
}
|
|
1649
1649
|
function n() {
|
|
1650
|
-
for (var t, r, i = 0, o = "",
|
|
1650
|
+
for (var t, r, i = 0, o = "", s = arguments.length; i < s; i++) (t = arguments[i]) && (r = e(t)) && (o && (o += " "), o += r);
|
|
1651
1651
|
return o;
|
|
1652
1652
|
}
|
|
1653
|
-
return
|
|
1653
|
+
return be.exports = n, be.exports.clsx = n, be.exports;
|
|
1654
1654
|
}
|
|
1655
1655
|
var B = {}, oe = {}, Je;
|
|
1656
1656
|
function we() {
|
|
@@ -1658,9 +1658,9 @@ function we() {
|
|
|
1658
1658
|
Je = 1, Object.defineProperty(oe, "__esModule", {
|
|
1659
1659
|
value: !0
|
|
1660
1660
|
}), oe.dontSetMe = i, oe.findInArray = e, oe.int = r, oe.isFunction = n, oe.isNum = t;
|
|
1661
|
-
function e(o,
|
|
1661
|
+
function e(o, s) {
|
|
1662
1662
|
for (let d = 0, y = o.length; d < y; d++)
|
|
1663
|
-
if (
|
|
1663
|
+
if (s.apply(s, [o[d], d, o])) return o[d];
|
|
1664
1664
|
}
|
|
1665
1665
|
function n(o) {
|
|
1666
1666
|
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Function]";
|
|
@@ -1671,14 +1671,14 @@ function we() {
|
|
|
1671
1671
|
function r(o) {
|
|
1672
1672
|
return parseInt(o, 10);
|
|
1673
1673
|
}
|
|
1674
|
-
function i(o,
|
|
1675
|
-
if (o[
|
|
1676
|
-
return new Error(`Invalid prop ${
|
|
1674
|
+
function i(o, s, d) {
|
|
1675
|
+
if (o[s])
|
|
1676
|
+
return new Error(`Invalid prop ${s} passed to ${d} - do not set this, set it on the child.`);
|
|
1677
1677
|
}
|
|
1678
1678
|
return oe;
|
|
1679
1679
|
}
|
|
1680
1680
|
var ie = {}, Qe;
|
|
1681
|
-
function
|
|
1681
|
+
function gn() {
|
|
1682
1682
|
if (Qe) return ie;
|
|
1683
1683
|
Qe = 1, Object.defineProperty(ie, "__esModule", {
|
|
1684
1684
|
value: !0
|
|
@@ -1687,130 +1687,130 @@ function hn() {
|
|
|
1687
1687
|
function n() {
|
|
1688
1688
|
let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
|
|
1689
1689
|
if (typeof window > "u") return "";
|
|
1690
|
-
const
|
|
1691
|
-
if (!
|
|
1690
|
+
const s = window.document?.documentElement?.style;
|
|
1691
|
+
if (!s || o in s) return "";
|
|
1692
1692
|
for (let d = 0; d < e.length; d++)
|
|
1693
|
-
if (t(o, e[d]) in
|
|
1693
|
+
if (t(o, e[d]) in s) return e[d];
|
|
1694
1694
|
return "";
|
|
1695
1695
|
}
|
|
1696
|
-
function t(o,
|
|
1697
|
-
return
|
|
1696
|
+
function t(o, s) {
|
|
1697
|
+
return s ? `${s}${i(o)}` : o;
|
|
1698
1698
|
}
|
|
1699
|
-
function r(o,
|
|
1700
|
-
return
|
|
1699
|
+
function r(o, s) {
|
|
1700
|
+
return s ? `-${s.toLowerCase()}-${o}` : o;
|
|
1701
1701
|
}
|
|
1702
1702
|
function i(o) {
|
|
1703
|
-
let
|
|
1703
|
+
let s = "", d = !0;
|
|
1704
1704
|
for (let y = 0; y < o.length; y++)
|
|
1705
|
-
d ? (
|
|
1706
|
-
return
|
|
1705
|
+
d ? (s += o[y].toUpperCase(), d = !1) : o[y] === "-" ? d = !0 : s += o[y];
|
|
1706
|
+
return s;
|
|
1707
1707
|
}
|
|
1708
1708
|
return ie.default = n(), ie;
|
|
1709
1709
|
}
|
|
1710
1710
|
var et;
|
|
1711
|
-
function
|
|
1711
|
+
function Oe() {
|
|
1712
1712
|
if (et) return B;
|
|
1713
1713
|
et = 1, Object.defineProperty(B, "__esModule", {
|
|
1714
1714
|
value: !0
|
|
1715
|
-
}), B.addClassName = c, B.addEvent =
|
|
1716
|
-
var e = we(), n = t(
|
|
1715
|
+
}), B.addClassName = c, B.addEvent = s, B.addUserSelectStyles = N, B.createCSSTransform = p, B.createSVGTransform = x, B.getTouch = v, B.getTouchIdentifier = C, B.getTranslation = b, B.innerHeight = h, B.innerWidth = u, B.matchesSelector = i, B.matchesSelectorAndParentsTo = o, B.offsetXYFromParent = g, B.outerHeight = y, B.outerWidth = m, B.removeClassName = E, B.removeEvent = d, B.scheduleRemoveUserSelectStyles = S;
|
|
1716
|
+
var e = we(), n = t(gn());
|
|
1717
1717
|
function t(l, f) {
|
|
1718
|
-
if (typeof WeakMap == "function") var
|
|
1719
|
-
return (t = function(
|
|
1720
|
-
if (!
|
|
1721
|
-
var z, X, Q = { __proto__: null, default:
|
|
1722
|
-
if (
|
|
1723
|
-
if (z =
|
|
1724
|
-
if (z.has(
|
|
1725
|
-
z.set(
|
|
1718
|
+
if (typeof WeakMap == "function") var M = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap();
|
|
1719
|
+
return (t = function(I, T) {
|
|
1720
|
+
if (!T && I && I.__esModule) return I;
|
|
1721
|
+
var z, X, Q = { __proto__: null, default: I };
|
|
1722
|
+
if (I === null || typeof I != "object" && typeof I != "function") return Q;
|
|
1723
|
+
if (z = T ? $ : M) {
|
|
1724
|
+
if (z.has(I)) return z.get(I);
|
|
1725
|
+
z.set(I, Q);
|
|
1726
1726
|
}
|
|
1727
|
-
for (const
|
|
1727
|
+
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]);
|
|
1728
1728
|
return Q;
|
|
1729
1729
|
})(l, f);
|
|
1730
1730
|
}
|
|
1731
1731
|
let r = "";
|
|
1732
1732
|
function i(l, f) {
|
|
1733
|
-
return r || (r = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(
|
|
1734
|
-
return (0, e.isFunction)(l[
|
|
1733
|
+
return r || (r = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(M) {
|
|
1734
|
+
return (0, e.isFunction)(l[M]);
|
|
1735
1735
|
})), (0, e.isFunction)(l[r]) ? l[r](f) : !1;
|
|
1736
1736
|
}
|
|
1737
|
-
function o(l, f,
|
|
1737
|
+
function o(l, f, M) {
|
|
1738
1738
|
let $ = l;
|
|
1739
1739
|
do {
|
|
1740
1740
|
if (i($, f)) return !0;
|
|
1741
|
-
if ($ ===
|
|
1741
|
+
if ($ === M) return !1;
|
|
1742
1742
|
$ = $.parentNode;
|
|
1743
1743
|
} while ($);
|
|
1744
1744
|
return !1;
|
|
1745
1745
|
}
|
|
1746
|
-
function
|
|
1746
|
+
function s(l, f, M, $) {
|
|
1747
1747
|
if (!l) return;
|
|
1748
|
-
const
|
|
1748
|
+
const I = {
|
|
1749
1749
|
capture: !0,
|
|
1750
1750
|
...$
|
|
1751
1751
|
};
|
|
1752
|
-
l.addEventListener ? l.addEventListener(f,
|
|
1752
|
+
l.addEventListener ? l.addEventListener(f, M, I) : l.attachEvent ? l.attachEvent("on" + f, M) : l["on" + f] = M;
|
|
1753
1753
|
}
|
|
1754
|
-
function d(l, f,
|
|
1754
|
+
function d(l, f, M, $) {
|
|
1755
1755
|
if (!l) return;
|
|
1756
|
-
const
|
|
1756
|
+
const I = {
|
|
1757
1757
|
capture: !0,
|
|
1758
1758
|
...$
|
|
1759
1759
|
};
|
|
1760
|
-
l.removeEventListener ? l.removeEventListener(f,
|
|
1760
|
+
l.removeEventListener ? l.removeEventListener(f, M, I) : l.detachEvent ? l.detachEvent("on" + f, M) : l["on" + f] = null;
|
|
1761
1761
|
}
|
|
1762
1762
|
function y(l) {
|
|
1763
1763
|
let f = l.clientHeight;
|
|
1764
|
-
const
|
|
1765
|
-
return f += (0, e.int)(
|
|
1764
|
+
const M = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1765
|
+
return f += (0, e.int)(M.borderTopWidth), f += (0, e.int)(M.borderBottomWidth), f;
|
|
1766
1766
|
}
|
|
1767
1767
|
function m(l) {
|
|
1768
1768
|
let f = l.clientWidth;
|
|
1769
|
-
const
|
|
1770
|
-
return f += (0, e.int)(
|
|
1769
|
+
const M = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1770
|
+
return f += (0, e.int)(M.borderLeftWidth), f += (0, e.int)(M.borderRightWidth), f;
|
|
1771
1771
|
}
|
|
1772
1772
|
function h(l) {
|
|
1773
1773
|
let f = l.clientHeight;
|
|
1774
|
-
const
|
|
1775
|
-
return f -= (0, e.int)(
|
|
1774
|
+
const M = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1775
|
+
return f -= (0, e.int)(M.paddingTop), f -= (0, e.int)(M.paddingBottom), f;
|
|
1776
1776
|
}
|
|
1777
1777
|
function u(l) {
|
|
1778
1778
|
let f = l.clientWidth;
|
|
1779
|
-
const
|
|
1780
|
-
return f -= (0, e.int)(
|
|
1779
|
+
const M = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1780
|
+
return f -= (0, e.int)(M.paddingLeft), f -= (0, e.int)(M.paddingRight), f;
|
|
1781
1781
|
}
|
|
1782
|
-
function g(l, f,
|
|
1783
|
-
const
|
|
1782
|
+
function g(l, f, M) {
|
|
1783
|
+
const I = f === f.ownerDocument.body ? {
|
|
1784
1784
|
left: 0,
|
|
1785
1785
|
top: 0
|
|
1786
|
-
} : f.getBoundingClientRect(),
|
|
1786
|
+
} : f.getBoundingClientRect(), T = (l.clientX + f.scrollLeft - I.left) / M, z = (l.clientY + f.scrollTop - I.top) / M;
|
|
1787
1787
|
return {
|
|
1788
|
-
x:
|
|
1788
|
+
x: T,
|
|
1789
1789
|
y: z
|
|
1790
1790
|
};
|
|
1791
1791
|
}
|
|
1792
1792
|
function p(l, f) {
|
|
1793
|
-
const
|
|
1793
|
+
const M = b(l, f, "px");
|
|
1794
1794
|
return {
|
|
1795
|
-
[(0, n.browserPrefixToKey)("transform", n.default)]:
|
|
1795
|
+
[(0, n.browserPrefixToKey)("transform", n.default)]: M
|
|
1796
1796
|
};
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1799
|
-
return
|
|
1798
|
+
function x(l, f) {
|
|
1799
|
+
return b(l, f, "");
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1801
|
+
function b(l, f, M) {
|
|
1802
1802
|
let {
|
|
1803
1803
|
x: $,
|
|
1804
|
-
y:
|
|
1805
|
-
} = l,
|
|
1804
|
+
y: I
|
|
1805
|
+
} = l, T = `translate(${$}${M},${I}${M})`;
|
|
1806
1806
|
if (f) {
|
|
1807
|
-
const z = `${typeof f.x == "string" ? f.x : f.x +
|
|
1808
|
-
|
|
1807
|
+
const z = `${typeof f.x == "string" ? f.x : f.x + M}`, X = `${typeof f.y == "string" ? f.y : f.y + M}`;
|
|
1808
|
+
T = `translate(${z}, ${X})` + T;
|
|
1809
1809
|
}
|
|
1810
|
-
return
|
|
1810
|
+
return T;
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1813
|
-
return l.targetTouches && (0, e.findInArray)(l.targetTouches, (
|
|
1812
|
+
function v(l, f) {
|
|
1813
|
+
return l.targetTouches && (0, e.findInArray)(l.targetTouches, (M) => f === M.identifier) || l.changedTouches && (0, e.findInArray)(l.changedTouches, (M) => f === M.identifier);
|
|
1814
1814
|
}
|
|
1815
1815
|
function C(l) {
|
|
1816
1816
|
if (l.targetTouches && l.targetTouches[0]) return l.targetTouches[0].identifier;
|
|
@@ -1831,7 +1831,7 @@ function Re() {
|
|
|
1831
1831
|
function D(l) {
|
|
1832
1832
|
if (l)
|
|
1833
1833
|
try {
|
|
1834
|
-
if (l.body &&
|
|
1834
|
+
if (l.body && E(l.body, "react-draggable-transparent-selection"), l.selection)
|
|
1835
1835
|
l.selection.empty();
|
|
1836
1836
|
else {
|
|
1837
1837
|
const f = (l.defaultView || window).getSelection();
|
|
@@ -1843,45 +1843,45 @@ function Re() {
|
|
|
1843
1843
|
function c(l, f) {
|
|
1844
1844
|
l.classList ? l.classList.add(f) : l.className.match(new RegExp(`(?:^|\\s)${f}(?!\\S)`)) || (l.className += ` ${f}`);
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function E(l, f) {
|
|
1847
1847
|
l.classList ? l.classList.remove(f) : l.className = l.className.replace(new RegExp(`(?:^|\\s)${f}(?!\\S)`, "g"), "");
|
|
1848
1848
|
}
|
|
1849
1849
|
return B;
|
|
1850
1850
|
}
|
|
1851
1851
|
var ne = {}, tt;
|
|
1852
|
-
function
|
|
1852
|
+
function xt() {
|
|
1853
1853
|
if (tt) return ne;
|
|
1854
1854
|
tt = 1, Object.defineProperty(ne, "__esModule", {
|
|
1855
1855
|
value: !0
|
|
1856
|
-
}), ne.canDragX = i, ne.canDragY = o, ne.createCoreData = d, ne.createDraggableData = y, ne.getBoundPosition = t, ne.getControlPosition =
|
|
1857
|
-
var e = we(), n =
|
|
1856
|
+
}), ne.canDragX = i, ne.canDragY = o, ne.createCoreData = d, ne.createDraggableData = y, ne.getBoundPosition = t, ne.getControlPosition = s, ne.snapToGrid = r;
|
|
1857
|
+
var e = we(), n = Oe();
|
|
1858
1858
|
function t(u, g, p) {
|
|
1859
1859
|
if (!u.props.bounds) return [g, p];
|
|
1860
1860
|
let {
|
|
1861
|
-
bounds:
|
|
1861
|
+
bounds: x
|
|
1862
1862
|
} = u.props;
|
|
1863
|
-
|
|
1864
|
-
const
|
|
1865
|
-
if (typeof
|
|
1863
|
+
x = typeof x == "string" ? x : m(x);
|
|
1864
|
+
const b = h(u);
|
|
1865
|
+
if (typeof x == "string") {
|
|
1866
1866
|
const {
|
|
1867
|
-
ownerDocument:
|
|
1868
|
-
} =
|
|
1867
|
+
ownerDocument: v
|
|
1868
|
+
} = b, C = v.defaultView;
|
|
1869
1869
|
let N;
|
|
1870
|
-
if (
|
|
1871
|
-
throw new Error('Bounds selector "' +
|
|
1872
|
-
const S = N, D = C.getComputedStyle(
|
|
1873
|
-
|
|
1874
|
-
left: -
|
|
1875
|
-
top: -
|
|
1876
|
-
right: (0, n.innerWidth)(S) - (0, n.outerWidth)(
|
|
1877
|
-
bottom: (0, n.innerHeight)(S) - (0, n.outerHeight)(
|
|
1870
|
+
if (x === "parent" ? N = b.parentNode : N = b.getRootNode().querySelector(x), !(N instanceof C.HTMLElement))
|
|
1871
|
+
throw new Error('Bounds selector "' + x + '" could not find an element.');
|
|
1872
|
+
const S = N, D = C.getComputedStyle(b), c = C.getComputedStyle(S);
|
|
1873
|
+
x = {
|
|
1874
|
+
left: -b.offsetLeft + (0, e.int)(c.paddingLeft) + (0, e.int)(D.marginLeft),
|
|
1875
|
+
top: -b.offsetTop + (0, e.int)(c.paddingTop) + (0, e.int)(D.marginTop),
|
|
1876
|
+
right: (0, n.innerWidth)(S) - (0, n.outerWidth)(b) - b.offsetLeft + (0, e.int)(c.paddingRight) - (0, e.int)(D.marginRight),
|
|
1877
|
+
bottom: (0, n.innerHeight)(S) - (0, n.outerHeight)(b) - b.offsetTop + (0, e.int)(c.paddingBottom) - (0, e.int)(D.marginBottom)
|
|
1878
1878
|
};
|
|
1879
1879
|
}
|
|
1880
|
-
return (0, e.isNum)(
|
|
1880
|
+
return (0, e.isNum)(x.right) && (g = Math.min(g, x.right)), (0, e.isNum)(x.bottom) && (p = Math.min(p, x.bottom)), (0, e.isNum)(x.left) && (g = Math.max(g, x.left)), (0, e.isNum)(x.top) && (p = Math.max(p, x.top)), [g, p];
|
|
1881
1881
|
}
|
|
1882
1882
|
function r(u, g, p) {
|
|
1883
|
-
const
|
|
1884
|
-
return [
|
|
1883
|
+
const x = Math.round(g / u[0]) * u[0], b = Math.round(p / u[1]) * u[1];
|
|
1884
|
+
return [x, b];
|
|
1885
1885
|
}
|
|
1886
1886
|
function i(u) {
|
|
1887
1887
|
return u.props.axis === "both" || u.props.axis === "x";
|
|
@@ -1889,16 +1889,16 @@ function bt() {
|
|
|
1889
1889
|
function o(u) {
|
|
1890
1890
|
return u.props.axis === "both" || u.props.axis === "y";
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1893
|
-
const
|
|
1894
|
-
if (typeof g == "number" && !
|
|
1895
|
-
const
|
|
1896
|
-
return (0, n.offsetXYFromParent)(
|
|
1892
|
+
function s(u, g, p) {
|
|
1893
|
+
const x = typeof g == "number" ? (0, n.getTouch)(u, g) : null;
|
|
1894
|
+
if (typeof g == "number" && !x) return null;
|
|
1895
|
+
const b = h(p), v = p.props.offsetParent || b.offsetParent || b.ownerDocument.body;
|
|
1896
|
+
return (0, n.offsetXYFromParent)(x || u, v, p.props.scale);
|
|
1897
1897
|
}
|
|
1898
1898
|
function d(u, g, p) {
|
|
1899
|
-
const
|
|
1900
|
-
return
|
|
1901
|
-
node:
|
|
1899
|
+
const x = !(0, e.isNum)(u.lastX), b = h(u);
|
|
1900
|
+
return x ? {
|
|
1901
|
+
node: b,
|
|
1902
1902
|
deltaX: 0,
|
|
1903
1903
|
deltaY: 0,
|
|
1904
1904
|
lastX: g,
|
|
@@ -1906,7 +1906,7 @@ function bt() {
|
|
|
1906
1906
|
x: g,
|
|
1907
1907
|
y: p
|
|
1908
1908
|
} : {
|
|
1909
|
-
node:
|
|
1909
|
+
node: b,
|
|
1910
1910
|
deltaX: g - u.lastX,
|
|
1911
1911
|
deltaY: p - u.lastY,
|
|
1912
1912
|
lastX: u.lastX,
|
|
@@ -1943,56 +1943,56 @@ function bt() {
|
|
|
1943
1943
|
}
|
|
1944
1944
|
return ne;
|
|
1945
1945
|
}
|
|
1946
|
-
var he = {},
|
|
1947
|
-
function
|
|
1948
|
-
if (nt) return
|
|
1949
|
-
nt = 1, Object.defineProperty(
|
|
1946
|
+
var he = {}, ve = {}, nt;
|
|
1947
|
+
function wt() {
|
|
1948
|
+
if (nt) return ve;
|
|
1949
|
+
nt = 1, Object.defineProperty(ve, "__esModule", {
|
|
1950
1950
|
value: !0
|
|
1951
|
-
}),
|
|
1951
|
+
}), ve.default = e;
|
|
1952
1952
|
function e() {
|
|
1953
1953
|
}
|
|
1954
|
-
return
|
|
1954
|
+
return ve;
|
|
1955
1955
|
}
|
|
1956
1956
|
var rt;
|
|
1957
|
-
function
|
|
1957
|
+
function mn() {
|
|
1958
1958
|
if (rt) return he;
|
|
1959
1959
|
rt = 1, Object.defineProperty(he, "__esModule", {
|
|
1960
1960
|
value: !0
|
|
1961
1961
|
}), he.default = void 0;
|
|
1962
|
-
var e = y(
|
|
1963
|
-
function d(
|
|
1964
|
-
return
|
|
1962
|
+
var e = y(ae), n = d(/* @__PURE__ */ vt()), t = d(lt), r = Oe(), i = xt(), o = we(), s = d(wt());
|
|
1963
|
+
function d(b) {
|
|
1964
|
+
return b && b.__esModule ? b : { default: b };
|
|
1965
1965
|
}
|
|
1966
|
-
function y(
|
|
1966
|
+
function y(b, v) {
|
|
1967
1967
|
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap();
|
|
1968
1968
|
return (y = function(S, D) {
|
|
1969
1969
|
if (!D && S && S.__esModule) return S;
|
|
1970
|
-
var c,
|
|
1970
|
+
var c, E, l = { __proto__: null, default: S };
|
|
1971
1971
|
if (S === null || typeof S != "object" && typeof S != "function") return l;
|
|
1972
1972
|
if (c = D ? N : C) {
|
|
1973
1973
|
if (c.has(S)) return c.get(S);
|
|
1974
1974
|
c.set(S, l);
|
|
1975
1975
|
}
|
|
1976
|
-
for (const f in S) f !== "default" && {}.hasOwnProperty.call(S, f) && ((
|
|
1976
|
+
for (const f in S) f !== "default" && {}.hasOwnProperty.call(S, f) && ((E = (c = Object.defineProperty) && Object.getOwnPropertyDescriptor(S, f)) && (E.get || E.set) ? c(l, f, E) : l[f] = S[f]);
|
|
1977
1977
|
return l;
|
|
1978
|
-
})(
|
|
1978
|
+
})(b, v);
|
|
1979
1979
|
}
|
|
1980
|
-
function m(
|
|
1981
|
-
return (
|
|
1980
|
+
function m(b, v, C) {
|
|
1981
|
+
return (v = h(v)) in b ? Object.defineProperty(b, v, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : b[v] = C, b;
|
|
1982
1982
|
}
|
|
1983
|
-
function h(
|
|
1984
|
-
var
|
|
1985
|
-
return typeof
|
|
1983
|
+
function h(b) {
|
|
1984
|
+
var v = u(b, "string");
|
|
1985
|
+
return typeof v == "symbol" ? v : v + "";
|
|
1986
1986
|
}
|
|
1987
|
-
function u(
|
|
1988
|
-
if (typeof
|
|
1989
|
-
var C =
|
|
1987
|
+
function u(b, v) {
|
|
1988
|
+
if (typeof b != "object" || !b) return b;
|
|
1989
|
+
var C = b[Symbol.toPrimitive];
|
|
1990
1990
|
if (C !== void 0) {
|
|
1991
|
-
var N = C.call(
|
|
1991
|
+
var N = C.call(b, v);
|
|
1992
1992
|
if (typeof N != "object") return N;
|
|
1993
1993
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1994
1994
|
}
|
|
1995
|
-
return (
|
|
1995
|
+
return (v === "string" ? String : Number)(b);
|
|
1996
1996
|
}
|
|
1997
1997
|
const g = {
|
|
1998
1998
|
touch: {
|
|
@@ -2006,42 +2006,42 @@ function gn() {
|
|
|
2006
2006
|
stop: "mouseup"
|
|
2007
2007
|
}
|
|
2008
2008
|
};
|
|
2009
|
-
let p = g.mouse,
|
|
2009
|
+
let p = g.mouse, x = class extends e.Component {
|
|
2010
2010
|
constructor() {
|
|
2011
|
-
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", (
|
|
2012
|
-
if (this.props.onMouseDown(
|
|
2011
|
+
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) => {
|
|
2012
|
+
if (this.props.onMouseDown(v), !this.props.allowAnyClick && typeof v.button == "number" && v.button !== 0) return !1;
|
|
2013
2013
|
const C = this.findDOMNode();
|
|
2014
2014
|
if (!C || !C.ownerDocument || !C.ownerDocument.body)
|
|
2015
2015
|
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
2016
2016
|
const {
|
|
2017
2017
|
ownerDocument: N
|
|
2018
2018
|
} = C;
|
|
2019
|
-
if (this.props.disabled || !(
|
|
2019
|
+
if (this.props.disabled || !(v.target instanceof N.defaultView.Node) || this.props.handle && !(0, r.matchesSelectorAndParentsTo)(v.target, this.props.handle, C) || this.props.cancel && (0, r.matchesSelectorAndParentsTo)(v.target, this.props.cancel, C))
|
|
2020
2020
|
return;
|
|
2021
|
-
|
|
2022
|
-
const S = (0, r.getTouchIdentifier)(
|
|
2021
|
+
v.type === "touchstart" && !this.props.allowMobileScroll && v.preventDefault();
|
|
2022
|
+
const S = (0, r.getTouchIdentifier)(v);
|
|
2023
2023
|
this.touchIdentifier = S;
|
|
2024
|
-
const D = (0, i.getControlPosition)(
|
|
2024
|
+
const D = (0, i.getControlPosition)(v, S, this);
|
|
2025
2025
|
if (D == null) return;
|
|
2026
2026
|
const {
|
|
2027
2027
|
x: c,
|
|
2028
|
-
y:
|
|
2029
|
-
} = D, l = (0, i.createCoreData)(this, c,
|
|
2030
|
-
(0,
|
|
2031
|
-
}), m(this, "handleDrag", (
|
|
2032
|
-
const C = (0, i.getControlPosition)(
|
|
2028
|
+
y: E
|
|
2029
|
+
} = D, l = (0, i.createCoreData)(this, c, E);
|
|
2030
|
+
(0, s.default)("DraggableCore: handleDragStart: %j", l), (0, s.default)("calling", this.props.onStart), !(this.props.onStart(v, l) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(N), this.dragging = !0, this.lastX = c, this.lastY = E, (0, r.addEvent)(N, p.move, this.handleDrag), (0, r.addEvent)(N, p.stop, this.handleDragStop));
|
|
2031
|
+
}), m(this, "handleDrag", (v) => {
|
|
2032
|
+
const C = (0, i.getControlPosition)(v, this.touchIdentifier, this);
|
|
2033
2033
|
if (C == null) return;
|
|
2034
2034
|
let {
|
|
2035
2035
|
x: N,
|
|
2036
2036
|
y: S
|
|
2037
2037
|
} = C;
|
|
2038
2038
|
if (Array.isArray(this.props.grid)) {
|
|
2039
|
-
let
|
|
2040
|
-
if ([
|
|
2041
|
-
N = this.lastX +
|
|
2039
|
+
let E = N - this.lastX, l = S - this.lastY;
|
|
2040
|
+
if ([E, l] = (0, i.snapToGrid)(this.props.grid, E, l), !E && !l) return;
|
|
2041
|
+
N = this.lastX + E, S = this.lastY + l;
|
|
2042
2042
|
}
|
|
2043
2043
|
const D = (0, i.createCoreData)(this, N, S);
|
|
2044
|
-
if ((0,
|
|
2044
|
+
if ((0, s.default)("DraggableCore: handleDrag: %j", D), this.props.onDrag(v, D) === !1 || this.mounted === !1) {
|
|
2045
2045
|
try {
|
|
2046
2046
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
2047
2047
|
} catch {
|
|
@@ -2051,9 +2051,9 @@ function gn() {
|
|
|
2051
2051
|
return;
|
|
2052
2052
|
}
|
|
2053
2053
|
this.lastX = N, this.lastY = S;
|
|
2054
|
-
}), m(this, "handleDragStop", (
|
|
2054
|
+
}), m(this, "handleDragStop", (v) => {
|
|
2055
2055
|
if (!this.dragging) return;
|
|
2056
|
-
const C = (0, i.getControlPosition)(
|
|
2056
|
+
const C = (0, i.getControlPosition)(v, this.touchIdentifier, this);
|
|
2057
2057
|
if (C == null) return;
|
|
2058
2058
|
let {
|
|
2059
2059
|
x: N,
|
|
@@ -2064,26 +2064,26 @@ function gn() {
|
|
|
2064
2064
|
[l, f] = (0, i.snapToGrid)(this.props.grid, l, f), N = this.lastX + l, S = this.lastY + f;
|
|
2065
2065
|
}
|
|
2066
2066
|
const D = (0, i.createCoreData)(this, N, S);
|
|
2067
|
-
if (this.props.onStop(
|
|
2068
|
-
const
|
|
2069
|
-
|
|
2070
|
-
}), m(this, "onMouseDown", (
|
|
2067
|
+
if (this.props.onStop(v, D) === !1 || this.mounted === !1) return !1;
|
|
2068
|
+
const E = this.findDOMNode();
|
|
2069
|
+
E && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(E.ownerDocument), (0, s.default)("DraggableCore: handleDragStop: %j", D), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, E && ((0, s.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(E.ownerDocument, p.move, this.handleDrag), (0, r.removeEvent)(E.ownerDocument, p.stop, this.handleDragStop));
|
|
2070
|
+
}), m(this, "onMouseDown", (v) => (p = g.mouse, this.handleDragStart(v))), m(this, "onMouseUp", (v) => (p = g.mouse, this.handleDragStop(v))), m(this, "onTouchStart", (v) => (p = g.touch, this.handleDragStart(v))), m(this, "onTouchEnd", (v) => (p = g.touch, this.handleDragStop(v)));
|
|
2071
2071
|
}
|
|
2072
2072
|
componentDidMount() {
|
|
2073
2073
|
this.mounted = !0;
|
|
2074
|
-
const
|
|
2075
|
-
|
|
2074
|
+
const v = this.findDOMNode();
|
|
2075
|
+
v && (0, r.addEvent)(v, g.touch.start, this.onTouchStart, {
|
|
2076
2076
|
passive: !1
|
|
2077
2077
|
});
|
|
2078
2078
|
}
|
|
2079
2079
|
componentWillUnmount() {
|
|
2080
2080
|
this.mounted = !1;
|
|
2081
|
-
const
|
|
2082
|
-
if (
|
|
2081
|
+
const v = this.findDOMNode();
|
|
2082
|
+
if (v) {
|
|
2083
2083
|
const {
|
|
2084
2084
|
ownerDocument: C
|
|
2085
|
-
} =
|
|
2086
|
-
(0, r.removeEvent)(C, g.mouse.move, this.handleDrag), (0, r.removeEvent)(C, g.touch.move, this.handleDrag), (0, r.removeEvent)(C, g.mouse.stop, this.handleDragStop), (0, r.removeEvent)(C, g.touch.stop, this.handleDragStop), (0, r.removeEvent)(
|
|
2085
|
+
} = v;
|
|
2086
|
+
(0, r.removeEvent)(C, g.mouse.move, this.handleDrag), (0, r.removeEvent)(C, g.touch.move, this.handleDrag), (0, r.removeEvent)(C, g.mouse.stop, this.handleDragStop), (0, r.removeEvent)(C, g.touch.stop, this.handleDragStop), (0, r.removeEvent)(v, g.touch.start, this.onTouchStart, {
|
|
2087
2087
|
passive: !1
|
|
2088
2088
|
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(C);
|
|
2089
2089
|
}
|
|
@@ -2106,7 +2106,7 @@ function gn() {
|
|
|
2106
2106
|
});
|
|
2107
2107
|
}
|
|
2108
2108
|
};
|
|
2109
|
-
return he.default =
|
|
2109
|
+
return he.default = x, m(x, "displayName", "DraggableCore"), m(x, "propTypes", {
|
|
2110
2110
|
/**
|
|
2111
2111
|
* `allowAnyClick` allows dragging using any mouse button.
|
|
2112
2112
|
* By default, we only accept the left button.
|
|
@@ -2138,8 +2138,8 @@ function gn() {
|
|
|
2138
2138
|
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
2139
2139
|
* instead of using the parent node.
|
|
2140
2140
|
*/
|
|
2141
|
-
offsetParent: function(
|
|
2142
|
-
if (v
|
|
2141
|
+
offsetParent: function(b, v) {
|
|
2142
|
+
if (b[v] && b[v].nodeType !== 1)
|
|
2143
2143
|
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
2144
2144
|
},
|
|
2145
2145
|
/**
|
|
@@ -2236,7 +2236,7 @@ function gn() {
|
|
|
2236
2236
|
className: o.dontSetMe,
|
|
2237
2237
|
style: o.dontSetMe,
|
|
2238
2238
|
transform: o.dontSetMe
|
|
2239
|
-
}), m(
|
|
2239
|
+
}), m(x, "defaultProps", {
|
|
2240
2240
|
allowAnyClick: !1,
|
|
2241
2241
|
// by default only accept left click
|
|
2242
2242
|
allowMobileScroll: !1,
|
|
@@ -2254,7 +2254,7 @@ function gn() {
|
|
|
2254
2254
|
}), he;
|
|
2255
2255
|
}
|
|
2256
2256
|
var ot;
|
|
2257
|
-
function
|
|
2257
|
+
function pn() {
|
|
2258
2258
|
return ot || (ot = 1, (function(e) {
|
|
2259
2259
|
Object.defineProperty(e, "__esModule", {
|
|
2260
2260
|
value: !0
|
|
@@ -2264,22 +2264,22 @@ function mn() {
|
|
|
2264
2264
|
return y.default;
|
|
2265
2265
|
}
|
|
2266
2266
|
}), e.default = void 0;
|
|
2267
|
-
var n = u(
|
|
2267
|
+
var n = u(ae), t = h(/* @__PURE__ */ vt()), r = h(lt), i = hn(), o = Oe(), s = xt(), d = we(), y = h(mn()), m = h(wt());
|
|
2268
2268
|
function h(C) {
|
|
2269
2269
|
return C && C.__esModule ? C : { default: C };
|
|
2270
2270
|
}
|
|
2271
2271
|
function u(C, N) {
|
|
2272
2272
|
if (typeof WeakMap == "function") var S = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap();
|
|
2273
|
-
return (u = function(c,
|
|
2274
|
-
if (!
|
|
2275
|
-
var l, f,
|
|
2276
|
-
if (c === null || typeof c != "object" && typeof c != "function") return
|
|
2277
|
-
if (l =
|
|
2273
|
+
return (u = function(c, E) {
|
|
2274
|
+
if (!E && c && c.__esModule) return c;
|
|
2275
|
+
var l, f, M = { __proto__: null, default: c };
|
|
2276
|
+
if (c === null || typeof c != "object" && typeof c != "function") return M;
|
|
2277
|
+
if (l = E ? D : S) {
|
|
2278
2278
|
if (l.has(c)) return l.get(c);
|
|
2279
|
-
l.set(c,
|
|
2279
|
+
l.set(c, M);
|
|
2280
2280
|
}
|
|
2281
|
-
for (const $ in c) $ !== "default" && {}.hasOwnProperty.call(c, $) && ((f = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(c, $)) && (f.get || f.set) ? l(
|
|
2282
|
-
return
|
|
2281
|
+
for (const $ in c) $ !== "default" && {}.hasOwnProperty.call(c, $) && ((f = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(c, $)) && (f.get || f.set) ? l(M, $, f) : M[$] = c[$]);
|
|
2282
|
+
return M;
|
|
2283
2283
|
})(C, N);
|
|
2284
2284
|
}
|
|
2285
2285
|
function g() {
|
|
@@ -2292,13 +2292,13 @@ function mn() {
|
|
|
2292
2292
|
}, g.apply(null, arguments);
|
|
2293
2293
|
}
|
|
2294
2294
|
function p(C, N, S) {
|
|
2295
|
-
return (N =
|
|
2295
|
+
return (N = x(N)) in C ? Object.defineProperty(C, N, { value: S, enumerable: !0, configurable: !0, writable: !0 }) : C[N] = S, C;
|
|
2296
2296
|
}
|
|
2297
|
-
function
|
|
2298
|
-
var N =
|
|
2297
|
+
function x(C) {
|
|
2298
|
+
var N = b(C, "string");
|
|
2299
2299
|
return typeof N == "symbol" ? N : N + "";
|
|
2300
2300
|
}
|
|
2301
|
-
function
|
|
2301
|
+
function b(C, N) {
|
|
2302
2302
|
if (typeof C != "object" || !C) return C;
|
|
2303
2303
|
var S = C[Symbol.toPrimitive];
|
|
2304
2304
|
if (S !== void 0) {
|
|
@@ -2308,7 +2308,7 @@ function mn() {
|
|
|
2308
2308
|
}
|
|
2309
2309
|
return (N === "string" ? String : Number)(C);
|
|
2310
2310
|
}
|
|
2311
|
-
class
|
|
2311
|
+
class v extends n.Component {
|
|
2312
2312
|
// React 16.3+
|
|
2313
2313
|
// Arity (props, state)
|
|
2314
2314
|
static getDerivedStateFromProps(N, S) {
|
|
@@ -2330,7 +2330,7 @@ function mn() {
|
|
|
2330
2330
|
}
|
|
2331
2331
|
constructor(N) {
|
|
2332
2332
|
super(N), p(this, "onDragStart", (S, D) => {
|
|
2333
|
-
if ((0, m.default)("Draggable: onDragStart: %j", D), this.props.onStart(S, (0,
|
|
2333
|
+
if ((0, m.default)("Draggable: onDragStart: %j", D), this.props.onStart(S, (0, s.createDraggableData)(this, D)) === !1) return !1;
|
|
2334
2334
|
this.setState({
|
|
2335
2335
|
dragging: !0,
|
|
2336
2336
|
dragged: !0
|
|
@@ -2338,7 +2338,7 @@ function mn() {
|
|
|
2338
2338
|
}), p(this, "onDrag", (S, D) => {
|
|
2339
2339
|
if (!this.state.dragging) return !1;
|
|
2340
2340
|
(0, m.default)("Draggable: onDrag: %j", D);
|
|
2341
|
-
const c = (0,
|
|
2341
|
+
const c = (0, s.createDraggableData)(this, D), E = {
|
|
2342
2342
|
x: c.x,
|
|
2343
2343
|
y: c.y,
|
|
2344
2344
|
slackX: 0,
|
|
@@ -2347,18 +2347,18 @@ function mn() {
|
|
|
2347
2347
|
if (this.props.bounds) {
|
|
2348
2348
|
const {
|
|
2349
2349
|
x: f,
|
|
2350
|
-
y:
|
|
2351
|
-
} =
|
|
2352
|
-
|
|
2353
|
-
const [$,
|
|
2354
|
-
|
|
2350
|
+
y: M
|
|
2351
|
+
} = E;
|
|
2352
|
+
E.x += this.state.slackX, E.y += this.state.slackY;
|
|
2353
|
+
const [$, I] = (0, s.getBoundPosition)(this, E.x, E.y);
|
|
2354
|
+
E.x = $, E.y = I, E.slackX = this.state.slackX + (f - E.x), E.slackY = this.state.slackY + (M - E.y), c.x = E.x, c.y = E.y, c.deltaX = E.x - this.state.x, c.deltaY = E.y - this.state.y;
|
|
2355
2355
|
}
|
|
2356
2356
|
if (this.props.onDrag(S, c) === !1) return !1;
|
|
2357
|
-
this.setState(
|
|
2357
|
+
this.setState(E);
|
|
2358
2358
|
}), p(this, "onDragStop", (S, D) => {
|
|
2359
|
-
if (!this.state.dragging || this.props.onStop(S, (0,
|
|
2359
|
+
if (!this.state.dragging || this.props.onStop(S, (0, s.createDraggableData)(this, D)) === !1) return !1;
|
|
2360
2360
|
(0, m.default)("Draggable: onDragStop: %j", D);
|
|
2361
|
-
const
|
|
2361
|
+
const E = {
|
|
2362
2362
|
dragging: !1,
|
|
2363
2363
|
slackX: 0,
|
|
2364
2364
|
slackY: 0
|
|
@@ -2366,11 +2366,11 @@ function mn() {
|
|
|
2366
2366
|
if (!!this.props.position) {
|
|
2367
2367
|
const {
|
|
2368
2368
|
x: f,
|
|
2369
|
-
y:
|
|
2369
|
+
y: M
|
|
2370
2370
|
} = this.props.position;
|
|
2371
|
-
|
|
2371
|
+
E.x = f, E.y = M;
|
|
2372
2372
|
}
|
|
2373
|
-
this.setState(
|
|
2373
|
+
this.setState(E);
|
|
2374
2374
|
}), this.state = {
|
|
2375
2375
|
// Whether or not we are currently dragging.
|
|
2376
2376
|
dragging: !1,
|
|
@@ -2410,27 +2410,27 @@ function mn() {
|
|
|
2410
2410
|
bounds: S,
|
|
2411
2411
|
children: D,
|
|
2412
2412
|
defaultPosition: c,
|
|
2413
|
-
defaultClassName:
|
|
2413
|
+
defaultClassName: E,
|
|
2414
2414
|
defaultClassNameDragging: l,
|
|
2415
2415
|
defaultClassNameDragged: f,
|
|
2416
|
-
position:
|
|
2416
|
+
position: M,
|
|
2417
2417
|
positionOffset: $,
|
|
2418
|
-
scale:
|
|
2419
|
-
...
|
|
2418
|
+
scale: I,
|
|
2419
|
+
...T
|
|
2420
2420
|
} = this.props;
|
|
2421
2421
|
let z = {}, X = null;
|
|
2422
|
-
const
|
|
2422
|
+
const K = !!!M || this.state.dragging, ee = M || c, se = {
|
|
2423
2423
|
// Set left if horizontal drag is enabled
|
|
2424
|
-
x: (0,
|
|
2424
|
+
x: (0, s.canDragX)(this) && K ? this.state.x : ee.x,
|
|
2425
2425
|
// Set top if vertical drag is enabled
|
|
2426
|
-
y: (0,
|
|
2426
|
+
y: (0, s.canDragY)(this) && K ? this.state.y : ee.y
|
|
2427
2427
|
};
|
|
2428
|
-
this.state.isElementSVG ? X = (0, o.createSVGTransform)(
|
|
2429
|
-
const de = (0, i.clsx)(D.props.className || "",
|
|
2428
|
+
this.state.isElementSVG ? X = (0, o.createSVGTransform)(se, $) : z = (0, o.createCSSTransform)(se, $);
|
|
2429
|
+
const de = (0, i.clsx)(D.props.className || "", E, {
|
|
2430
2430
|
[l]: this.state.dragging,
|
|
2431
2431
|
[f]: this.state.dragged
|
|
2432
2432
|
});
|
|
2433
|
-
return /* @__PURE__ */ n.createElement(y.default, g({},
|
|
2433
|
+
return /* @__PURE__ */ n.createElement(y.default, g({}, T, {
|
|
2434
2434
|
onStart: this.onDragStart,
|
|
2435
2435
|
onDrag: this.onDrag,
|
|
2436
2436
|
onStop: this.onDragStop
|
|
@@ -2444,7 +2444,7 @@ function mn() {
|
|
|
2444
2444
|
}));
|
|
2445
2445
|
}
|
|
2446
2446
|
}
|
|
2447
|
-
e.default =
|
|
2447
|
+
e.default = v, p(v, "displayName", "Draggable"), p(v, "propTypes", {
|
|
2448
2448
|
// Accepts all props <DraggableCore> accepts.
|
|
2449
2449
|
...y.default.propTypes,
|
|
2450
2450
|
/**
|
|
@@ -2551,7 +2551,7 @@ function mn() {
|
|
|
2551
2551
|
className: d.dontSetMe,
|
|
2552
2552
|
style: d.dontSetMe,
|
|
2553
2553
|
transform: d.dontSetMe
|
|
2554
|
-
}), p(
|
|
2554
|
+
}), p(v, "defaultProps", {
|
|
2555
2555
|
...y.default.defaultProps,
|
|
2556
2556
|
axis: "both",
|
|
2557
2557
|
bounds: !1,
|
|
@@ -2567,17 +2567,17 @@ function mn() {
|
|
|
2567
2567
|
})(De)), De;
|
|
2568
2568
|
}
|
|
2569
2569
|
var it;
|
|
2570
|
-
function
|
|
2570
|
+
function yn() {
|
|
2571
2571
|
if (it) return fe.exports;
|
|
2572
2572
|
it = 1;
|
|
2573
2573
|
const {
|
|
2574
2574
|
default: e,
|
|
2575
2575
|
DraggableCore: n
|
|
2576
|
-
} =
|
|
2576
|
+
} = pn();
|
|
2577
2577
|
return fe.exports = e, fe.exports.default = e, fe.exports.DraggableCore = n, fe.exports;
|
|
2578
2578
|
}
|
|
2579
|
-
var
|
|
2580
|
-
const vn = /* @__PURE__ */
|
|
2579
|
+
var bn = yn();
|
|
2580
|
+
const vn = /* @__PURE__ */ an(bn), xn = ce((e, n) => {
|
|
2581
2581
|
const r = {
|
|
2582
2582
|
...{
|
|
2583
2583
|
// 1. Take it out of the document flow
|
|
@@ -2595,13 +2595,13 @@ const vn = /* @__PURE__ */ on(yn), bn = ce((e, n) => {
|
|
|
2595
2595
|
boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
|
|
2596
2596
|
},
|
|
2597
2597
|
...e.style || {}
|
|
2598
|
-
}, i = e.testId || "not-set", o = e.className || "panel",
|
|
2598
|
+
}, i = e.testId || "not-set", o = e.className || "panel", s = Ct(null);
|
|
2599
2599
|
return (
|
|
2600
2600
|
// 3. Pass the internal ref to the Draggable component via 'nodeRef'
|
|
2601
|
-
/* @__PURE__ */
|
|
2601
|
+
/* @__PURE__ */ a(
|
|
2602
2602
|
vn,
|
|
2603
2603
|
{
|
|
2604
|
-
nodeRef:
|
|
2604
|
+
nodeRef: s,
|
|
2605
2605
|
"data-testid": i,
|
|
2606
2606
|
axis: "both",
|
|
2607
2607
|
handle: ".handle",
|
|
@@ -2613,13 +2613,13 @@ const vn = /* @__PURE__ */ on(yn), bn = ce((e, n) => {
|
|
|
2613
2613
|
e.onDraggingChange?.(!1);
|
|
2614
2614
|
}, 100);
|
|
2615
2615
|
},
|
|
2616
|
-
children: /* @__PURE__ */
|
|
2616
|
+
children: /* @__PURE__ */ a("div", { ref: s, className: o, style: r, children: e.children })
|
|
2617
2617
|
}
|
|
2618
2618
|
)
|
|
2619
2619
|
);
|
|
2620
2620
|
});
|
|
2621
|
-
function
|
|
2622
|
-
return /* @__PURE__ */
|
|
2621
|
+
function tr({ children: e }) {
|
|
2622
|
+
return /* @__PURE__ */ a(
|
|
2623
2623
|
"div",
|
|
2624
2624
|
{
|
|
2625
2625
|
className: "w-full h-full flex-1 flex flex-col gap-2 items-end justify-end content-end",
|
|
@@ -2630,30 +2630,30 @@ function er({ children: e }) {
|
|
|
2630
2630
|
}
|
|
2631
2631
|
);
|
|
2632
2632
|
}
|
|
2633
|
-
function
|
|
2634
|
-
return /* @__PURE__ */
|
|
2633
|
+
function nr({ children: e }) {
|
|
2634
|
+
return /* @__PURE__ */ a("div", { className: "w-full flex flex-col items-end", children: e });
|
|
2635
2635
|
}
|
|
2636
|
-
const
|
|
2636
|
+
const rr = (e) => {
|
|
2637
2637
|
console.warn("showToast TODO", e);
|
|
2638
|
-
},
|
|
2639
|
-
let t =
|
|
2638
|
+
}, wn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, or = ce((e, n) => {
|
|
2639
|
+
let t = ct(Number(e.zoomScale || 0));
|
|
2640
2640
|
const r = e.responsiveGrid || !1, i = e.isEditing || !1, o = {
|
|
2641
2641
|
"--bwj-dashboard-transform-scale": t,
|
|
2642
|
-
"--bwj-dashboard-add-cols":
|
|
2643
|
-
},
|
|
2642
|
+
"--bwj-dashboard-add-cols": wn(t)
|
|
2643
|
+
}, s = Z(
|
|
2644
2644
|
"dashboard-main-grid w-full",
|
|
2645
2645
|
i ? "editing" : "",
|
|
2646
2646
|
r ? "responsive-grid" : "",
|
|
2647
2647
|
`border border-dashed ${i ? "border-primary border-opacity-50" : "border-transparent"}`
|
|
2648
2648
|
);
|
|
2649
|
-
return /* @__PURE__ */
|
|
2650
|
-
}), $e = "size-5",
|
|
2649
|
+
return /* @__PURE__ */ a("div", { className: s, style: o, children: e.children });
|
|
2650
|
+
}), $e = "size-5", Cn = (e, n) => {
|
|
2651
2651
|
const t = e.hideTitle && !e.isEditing, r = e.noBorder;
|
|
2652
2652
|
let i = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
|
|
2653
2653
|
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`);
|
|
2654
2654
|
const o = () => {
|
|
2655
2655
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey, e.parentWidgetKey);
|
|
2656
|
-
},
|
|
2656
|
+
}, s = (y) => {
|
|
2657
2657
|
e.onMoveClick && e.widgetKey && e.onMoveClick(y, e.widgetKey, e.parentWidgetKey);
|
|
2658
2658
|
}, d = Z(
|
|
2659
2659
|
"widget-header",
|
|
@@ -2667,12 +2667,12 @@ const nr = (e) => {
|
|
|
2667
2667
|
e.title,
|
|
2668
2668
|
" "
|
|
2669
2669
|
] }),
|
|
2670
|
-
/* @__PURE__ */
|
|
2670
|
+
/* @__PURE__ */ a("div", {})
|
|
2671
2671
|
] }),
|
|
2672
|
-
/* @__PURE__ */
|
|
2673
|
-
/* @__PURE__ */
|
|
2672
|
+
/* @__PURE__ */ a("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ W("div", { className: "actions-inner", children: [
|
|
2673
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("span", { className: "hidden", children: "Widget" }) }),
|
|
2674
2674
|
/* @__PURE__ */ W("div", { className: "actions-buttons-container", children: [
|
|
2675
|
-
/* @__PURE__ */
|
|
2675
|
+
/* @__PURE__ */ a(
|
|
2676
2676
|
J,
|
|
2677
2677
|
{
|
|
2678
2678
|
"data-testid": `move-widget-left_${e.title}`,
|
|
@@ -2682,11 +2682,11 @@ const nr = (e) => {
|
|
|
2682
2682
|
placement: "top",
|
|
2683
2683
|
title: `${e.index < 1 ? "Already at min position" : "Move Widget to the left/up"}`
|
|
2684
2684
|
},
|
|
2685
|
-
onClick: () =>
|
|
2686
|
-
children: /* @__PURE__ */
|
|
2685
|
+
onClick: () => s(-1),
|
|
2686
|
+
children: /* @__PURE__ */ a(ft, { className: $e })
|
|
2687
2687
|
}
|
|
2688
2688
|
),
|
|
2689
|
-
/* @__PURE__ */
|
|
2689
|
+
/* @__PURE__ */ a(
|
|
2690
2690
|
J,
|
|
2691
2691
|
{
|
|
2692
2692
|
"data-testid": `move-widget-right_${e.title}`,
|
|
@@ -2696,11 +2696,11 @@ const nr = (e) => {
|
|
|
2696
2696
|
placement: "top",
|
|
2697
2697
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Widget to the right/down"}`
|
|
2698
2698
|
},
|
|
2699
|
-
onClick: () =>
|
|
2700
|
-
children: /* @__PURE__ */
|
|
2699
|
+
onClick: () => s(1),
|
|
2700
|
+
children: /* @__PURE__ */ a(ht, { className: $e })
|
|
2701
2701
|
}
|
|
2702
2702
|
),
|
|
2703
|
-
/* @__PURE__ */
|
|
2703
|
+
/* @__PURE__ */ a(
|
|
2704
2704
|
J,
|
|
2705
2705
|
{
|
|
2706
2706
|
"data-testid": `remove-container_${e.title}`,
|
|
@@ -2710,100 +2710,142 @@ const nr = (e) => {
|
|
|
2710
2710
|
title: "Remove Widget"
|
|
2711
2711
|
},
|
|
2712
2712
|
onClick: () => o(),
|
|
2713
|
-
children: /* @__PURE__ */
|
|
2713
|
+
children: /* @__PURE__ */ a(gt, { className: $e })
|
|
2714
2714
|
}
|
|
2715
2715
|
)
|
|
2716
2716
|
] })
|
|
2717
2717
|
] }) })
|
|
2718
2718
|
] }),
|
|
2719
|
-
/* @__PURE__ */
|
|
2719
|
+
/* @__PURE__ */ a("div", { className: "widget-inner", children: e.children })
|
|
2720
2720
|
] });
|
|
2721
|
-
},
|
|
2722
|
-
|
|
2723
|
-
return
|
|
2724
|
-
|
|
2725
|
-
|
|
2721
|
+
}, at = ce(Cn), Sn = (e, n) => {
|
|
2722
|
+
const t = (o) => o.replace(/[^0-9.]/g, ""), r = t(e).split(".").map(Number), i = t(n).split(".").map(Number);
|
|
2723
|
+
return !(r[0] !== i[0] || r[1] < i[1]);
|
|
2724
|
+
};
|
|
2725
|
+
function Dn(e) {
|
|
2726
|
+
return /* @__PURE__ */ a("div", { className: "dashboard-widget", children: /* @__PURE__ */ W("div", { className: "absolute inset-0 bg-black flex flex-col items-center justify-center text-center", children: [
|
|
2727
|
+
/* @__PURE__ */ a("div", { className: "w-full absolute opacity-100 text-primary", children: e.title }),
|
|
2728
|
+
/* @__PURE__ */ a("div", { className: "animate-ping rounded-full h-32 w-32 border-8 border-white" })
|
|
2726
2729
|
] }) });
|
|
2727
2730
|
}
|
|
2728
|
-
function
|
|
2731
|
+
function Nn({
|
|
2729
2732
|
index: e,
|
|
2730
2733
|
maxIndex: n,
|
|
2731
2734
|
widgetKey: t,
|
|
2732
2735
|
parentWidgetKey: r,
|
|
2733
2736
|
targetContainerKey: i,
|
|
2734
2737
|
childWidgetsConfig: o,
|
|
2735
|
-
widgetCatalog:
|
|
2738
|
+
widgetCatalog: s,
|
|
2736
2739
|
isEditing: d,
|
|
2737
2740
|
onRemoveClick: y,
|
|
2738
2741
|
onMoveClick: m,
|
|
2739
2742
|
selectContainer: h
|
|
2740
2743
|
}) {
|
|
2741
|
-
const u = `${t}`.split("_"), g = u.length > 1, p = g ? u[0] : t,
|
|
2742
|
-
if (!
|
|
2743
|
-
return /* @__PURE__ */
|
|
2744
|
+
const u = `${t}`.split("_"), g = u.length > 1, p = g ? u[0] : t, x = s.get(p);
|
|
2745
|
+
if (!x)
|
|
2746
|
+
return /* @__PURE__ */ a("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2744
2747
|
"Widget not found in catalog: ",
|
|
2745
2748
|
p
|
|
2746
2749
|
] }) });
|
|
2747
|
-
let
|
|
2748
|
-
if (
|
|
2749
|
-
if (!
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2750
|
+
let b = null, v = !1;
|
|
2751
|
+
if (x.component ? (b = x.component, v = !1) : x.loader && (v = !0, b = st(() => {
|
|
2752
|
+
if (!x) return null;
|
|
2753
|
+
const l = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", f = x.meta?.externalDependencies || [], M = f.find(($) => $.startsWith("react@"));
|
|
2754
|
+
if (M) {
|
|
2755
|
+
const $ = M.split("@")[1];
|
|
2756
|
+
if (!Sn(l, $))
|
|
2757
|
+
return ae.lazy(async () => ({
|
|
2758
|
+
default: () => /* @__PURE__ */ a(at, { ...D, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2759
|
+
/* @__PURE__ */ W("p", { className: "font-bold", children: [
|
|
2760
|
+
'Failed to load "',
|
|
2761
|
+
t,
|
|
2762
|
+
'"'
|
|
2763
|
+
] }),
|
|
2764
|
+
/* @__PURE__ */ W("p", { className: "text-xs italic", children: [
|
|
2765
|
+
"The remote plugin is unavailable or incompatible.",
|
|
2766
|
+
/* @__PURE__ */ W("p", { className: "font-bold text-sm", children: [
|
|
2767
|
+
"Version Mismatch: ",
|
|
2768
|
+
t
|
|
2769
|
+
] }),
|
|
2770
|
+
/* @__PURE__ */ W("p", { className: "text-xs", children: [
|
|
2771
|
+
"Widget requires ",
|
|
2772
|
+
/* @__PURE__ */ W("strong", { children: [
|
|
2773
|
+
"React ",
|
|
2774
|
+
$
|
|
2775
|
+
] }),
|
|
2776
|
+
". Host is running",
|
|
2777
|
+
" ",
|
|
2778
|
+
/* @__PURE__ */ a("strong", { children: l }),
|
|
2779
|
+
"."
|
|
2780
|
+
] })
|
|
2781
|
+
] }),
|
|
2782
|
+
/* @__PURE__ */ W("div", { className: "flex flex-col mt-3", children: [
|
|
2783
|
+
/* @__PURE__ */ a("h5", { children: "Externals:" }),
|
|
2784
|
+
/* @__PURE__ */ a("dl", { className: "ml-2 flex flex-col text-xs", children: f.map((I, T) => /* @__PURE__ */ W("dd", { children: [
|
|
2785
|
+
"- ",
|
|
2786
|
+
I
|
|
2787
|
+
] }, T)) })
|
|
2788
|
+
] })
|
|
2789
|
+
] }) })
|
|
2790
|
+
}));
|
|
2791
|
+
}
|
|
2792
|
+
if (x.component)
|
|
2793
|
+
return x.component;
|
|
2794
|
+
if (x.loader) {
|
|
2795
|
+
const $ = async () => {
|
|
2754
2796
|
try {
|
|
2755
|
-
return await
|
|
2756
|
-
} catch (
|
|
2757
|
-
return console.error(`CDN Load Failure for ${t}:`,
|
|
2758
|
-
default: () => /* @__PURE__ */
|
|
2797
|
+
return await x.loader();
|
|
2798
|
+
} catch (I) {
|
|
2799
|
+
return console.error(`CDN Load Failure for ${t}:`, I), {
|
|
2800
|
+
default: () => /* @__PURE__ */ a(at, { ...D, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2759
2801
|
/* @__PURE__ */ W("p", { className: "font-bold", children: [
|
|
2760
2802
|
'Failed to load "',
|
|
2761
2803
|
t,
|
|
2762
2804
|
'"'
|
|
2763
2805
|
] }),
|
|
2764
|
-
/* @__PURE__ */
|
|
2765
|
-
/* @__PURE__ */
|
|
2806
|
+
/* @__PURE__ */ a("p", { className: "text-xs italic", children: "The remote plugin is unavailable or incompatible." }),
|
|
2807
|
+
/* @__PURE__ */ a("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(x.meta || {}, null, 2) })
|
|
2766
2808
|
] }) })
|
|
2767
2809
|
};
|
|
2768
2810
|
}
|
|
2769
2811
|
};
|
|
2770
|
-
return
|
|
2812
|
+
return ae.lazy($);
|
|
2771
2813
|
}
|
|
2772
2814
|
return null;
|
|
2773
|
-
}, [
|
|
2774
|
-
return /* @__PURE__ */
|
|
2815
|
+
}, [x, t])), !b)
|
|
2816
|
+
return /* @__PURE__ */ a("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2775
2817
|
"Widget definition incomplete: ",
|
|
2776
2818
|
p
|
|
2777
2819
|
] }) });
|
|
2778
|
-
const C = !!
|
|
2820
|
+
const C = !!x.isContainer, N = g ? mt(t) : "", S = C ? (o || []).filter((l) => l.parentWidgetKey === t) : [], D = {
|
|
2779
2821
|
index: e,
|
|
2780
2822
|
maxIndex: n,
|
|
2781
2823
|
widgetKey: t,
|
|
2782
2824
|
parentWidgetKey: r,
|
|
2783
2825
|
isEditing: d,
|
|
2784
|
-
title: g ? N :
|
|
2826
|
+
title: g ? N : x.title,
|
|
2785
2827
|
onRemoveClick: y,
|
|
2786
2828
|
onMoveClick: m
|
|
2787
2829
|
}, c = C ? {
|
|
2788
2830
|
highlight: i === t,
|
|
2789
2831
|
selectContainer: h,
|
|
2790
2832
|
// The children prop is the recursive call back to DynamicWidgetLoader
|
|
2791
|
-
children: S.map((l, f) => /* @__PURE__ */
|
|
2792
|
-
|
|
2833
|
+
children: S.map((l, f) => /* @__PURE__ */ a(
|
|
2834
|
+
Nn,
|
|
2793
2835
|
{
|
|
2794
2836
|
index: f,
|
|
2795
2837
|
maxIndex: S.length - 1,
|
|
2796
2838
|
widgetKey: l.widgetKey,
|
|
2797
2839
|
parentWidgetKey: l.parentWidgetKey,
|
|
2798
|
-
widgetCatalog:
|
|
2840
|
+
widgetCatalog: s,
|
|
2799
2841
|
isEditing: d,
|
|
2800
2842
|
onRemoveClick: y,
|
|
2801
2843
|
onMoveClick: m
|
|
2802
2844
|
},
|
|
2803
2845
|
`${l.widgetKey}_${f}`
|
|
2804
2846
|
))
|
|
2805
|
-
} : {},
|
|
2806
|
-
return
|
|
2847
|
+
} : {}, E = () => /* @__PURE__ */ a(b, { ...D, ...c });
|
|
2848
|
+
return v ? /* @__PURE__ */ a(St, { fallback: /* @__PURE__ */ a(Dn, { title: `Loading ${x.title}` }), children: /* @__PURE__ */ a(E, {}) }) : /* @__PURE__ */ a(E, {});
|
|
2807
2849
|
}
|
|
2808
2850
|
const xe = "size-5";
|
|
2809
2851
|
function ke(e) {
|
|
@@ -2827,23 +2869,23 @@ function ke(e) {
|
|
|
2827
2869
|
), g = `widget-container-header direction-${t} flex items-center border-1 ${d}`;
|
|
2828
2870
|
const p = () => {
|
|
2829
2871
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
|
|
2830
|
-
},
|
|
2831
|
-
e.onMoveClick && e.widgetKey && e.onMoveClick(
|
|
2832
|
-
},
|
|
2872
|
+
}, x = (v) => {
|
|
2873
|
+
e.onMoveClick && e.widgetKey && e.onMoveClick(v, e.widgetKey, e.parentWidgetKey);
|
|
2874
|
+
}, b = () => {
|
|
2833
2875
|
e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
|
|
2834
2876
|
};
|
|
2835
2877
|
return /* @__PURE__ */ W("div", { "data-testid": `container_${e.widgetKey}`, className: u, children: [
|
|
2836
2878
|
/* @__PURE__ */ W("div", { className: g, children: [
|
|
2837
|
-
/* @__PURE__ */
|
|
2879
|
+
/* @__PURE__ */ a(
|
|
2838
2880
|
"div",
|
|
2839
2881
|
{
|
|
2840
2882
|
className: "widget-title-wrapper w-full flex whitespace-nowrap",
|
|
2841
|
-
onClick:
|
|
2842
|
-
children: /* @__PURE__ */
|
|
2883
|
+
onClick: b,
|
|
2884
|
+
children: /* @__PURE__ */ a("span", { className: "text-sm font-semibold capitalize", children: e.title })
|
|
2843
2885
|
}
|
|
2844
2886
|
),
|
|
2845
|
-
/* @__PURE__ */
|
|
2846
|
-
/* @__PURE__ */
|
|
2887
|
+
/* @__PURE__ */ a("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ a("div", { className: "actions-inner", children: /* @__PURE__ */ W("div", { className: "actions-buttons-container", children: [
|
|
2888
|
+
/* @__PURE__ */ a(
|
|
2847
2889
|
J,
|
|
2848
2890
|
{
|
|
2849
2891
|
"data-testid": `open-widgets-catalog-from-container_${e.title}`,
|
|
@@ -2853,16 +2895,16 @@ function ke(e) {
|
|
|
2853
2895
|
placement: "top",
|
|
2854
2896
|
title: "Target this Container"
|
|
2855
2897
|
},
|
|
2856
|
-
onClick:
|
|
2857
|
-
children: /* @__PURE__ */
|
|
2858
|
-
|
|
2898
|
+
onClick: b,
|
|
2899
|
+
children: /* @__PURE__ */ a(
|
|
2900
|
+
tn,
|
|
2859
2901
|
{
|
|
2860
2902
|
className: `${xe} ${n ? "text-success" : "text-disabled"}`
|
|
2861
2903
|
}
|
|
2862
2904
|
)
|
|
2863
2905
|
}
|
|
2864
2906
|
),
|
|
2865
|
-
/* @__PURE__ */
|
|
2907
|
+
/* @__PURE__ */ a(
|
|
2866
2908
|
J,
|
|
2867
2909
|
{
|
|
2868
2910
|
"data-testid": `move-container-left_${e.title}`,
|
|
@@ -2872,11 +2914,11 @@ function ke(e) {
|
|
|
2872
2914
|
placement: "top",
|
|
2873
2915
|
title: `${e.index < 1 ? "Already at min position" : "Move Container to the left/up"}`
|
|
2874
2916
|
},
|
|
2875
|
-
onClick: () =>
|
|
2876
|
-
children: /* @__PURE__ */
|
|
2917
|
+
onClick: () => x(-1),
|
|
2918
|
+
children: /* @__PURE__ */ a(ft, { className: xe })
|
|
2877
2919
|
}
|
|
2878
2920
|
),
|
|
2879
|
-
/* @__PURE__ */
|
|
2921
|
+
/* @__PURE__ */ a(
|
|
2880
2922
|
J,
|
|
2881
2923
|
{
|
|
2882
2924
|
"data-testid": `move-container-right_${e.title}`,
|
|
@@ -2886,11 +2928,11 @@ function ke(e) {
|
|
|
2886
2928
|
placement: "top",
|
|
2887
2929
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Container to the right/down"}`
|
|
2888
2930
|
},
|
|
2889
|
-
onClick: () =>
|
|
2890
|
-
children: /* @__PURE__ */
|
|
2931
|
+
onClick: () => x(1),
|
|
2932
|
+
children: /* @__PURE__ */ a(ht, { className: xe })
|
|
2891
2933
|
}
|
|
2892
2934
|
),
|
|
2893
|
-
/* @__PURE__ */
|
|
2935
|
+
/* @__PURE__ */ a(
|
|
2894
2936
|
J,
|
|
2895
2937
|
{
|
|
2896
2938
|
"data-testid": `remove-container_${e.title}`,
|
|
@@ -2900,25 +2942,25 @@ function ke(e) {
|
|
|
2900
2942
|
title: "Remove Container"
|
|
2901
2943
|
},
|
|
2902
2944
|
onClick: () => p(),
|
|
2903
|
-
children: /* @__PURE__ */
|
|
2945
|
+
children: /* @__PURE__ */ a(gt, { className: xe })
|
|
2904
2946
|
}
|
|
2905
2947
|
)
|
|
2906
2948
|
] }) }) })
|
|
2907
2949
|
] }),
|
|
2908
|
-
/* @__PURE__ */
|
|
2950
|
+
/* @__PURE__ */ a("div", { "data-testid": `childrenwrapper_${e.widgetKey}`, className: "widget-container-inner", children: e.children })
|
|
2909
2951
|
] });
|
|
2910
2952
|
}
|
|
2911
|
-
function
|
|
2953
|
+
function ir(e) {
|
|
2912
2954
|
const { direction: n, ...t } = e;
|
|
2913
|
-
return /* @__PURE__ */
|
|
2955
|
+
return /* @__PURE__ */ a(ke, { direction: "column", ...t });
|
|
2914
2956
|
}
|
|
2915
|
-
function
|
|
2957
|
+
function ar(e) {
|
|
2916
2958
|
const { size: n, ...t } = e;
|
|
2917
|
-
return /* @__PURE__ */
|
|
2959
|
+
return /* @__PURE__ */ a(ke, { size: "large", ...t });
|
|
2918
2960
|
}
|
|
2919
|
-
function
|
|
2961
|
+
function sr(e) {
|
|
2920
2962
|
const { direction: n, ...t } = e;
|
|
2921
|
-
return /* @__PURE__ */
|
|
2963
|
+
return /* @__PURE__ */ a(ke, { direction: "row", ...t });
|
|
2922
2964
|
}
|
|
2923
2965
|
function We({
|
|
2924
2966
|
// widgetKey,
|
|
@@ -2926,33 +2968,33 @@ function We({
|
|
|
2926
2968
|
alreadyAdded: n,
|
|
2927
2969
|
addWidget: t
|
|
2928
2970
|
}) {
|
|
2929
|
-
const [r, i] = le(!1), o = e.icon ||
|
|
2971
|
+
const [r, i] = le(!1), o = e.icon || nn, s = e.displayName || "Unknown", d = e.description || "---", m = (e.noDuplicatedWidgets || !1) && n, h = Z(`
|
|
2930
2972
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2931
2973
|
${m ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
|
|
2932
2974
|
`);
|
|
2933
2975
|
return /* @__PURE__ */ W("div", { className: h, style: { width: "calc(100% - 1rem)" }, onClick: () => {
|
|
2934
2976
|
m || t();
|
|
2935
2977
|
}, children: [
|
|
2936
|
-
/* @__PURE__ */
|
|
2978
|
+
/* @__PURE__ */ a(o, { className: "" }),
|
|
2937
2979
|
/* @__PURE__ */ W("div", { className: "w-full", children: [
|
|
2938
2980
|
/* @__PURE__ */ W("div", { className: "flex flex-row items-center gap-2 justify-between", children: [
|
|
2939
|
-
/* @__PURE__ */
|
|
2940
|
-
/* @__PURE__ */
|
|
2981
|
+
/* @__PURE__ */ a("span", { className: "font-bold", children: s }),
|
|
2982
|
+
/* @__PURE__ */ a("div", { className: "text-xs", children: m ? "(Added)" : "" })
|
|
2941
2983
|
] }),
|
|
2942
2984
|
/* @__PURE__ */ W("div", { className: "flex flex-col text-xs", children: [
|
|
2943
|
-
/* @__PURE__ */
|
|
2944
|
-
/* @__PURE__ */
|
|
2985
|
+
/* @__PURE__ */ a("div", { children: d }),
|
|
2986
|
+
/* @__PURE__ */ a("div", { className: "mt-3 cursor-pointer", onClick: (p) => {
|
|
2945
2987
|
p.stopPropagation(), p.preventDefault(), i(!r);
|
|
2946
2988
|
}, children: "Externals:" }),
|
|
2947
|
-
r && /* @__PURE__ */
|
|
2989
|
+
r && /* @__PURE__ */ a("dl", { className: "ml-2 flex flex-col text-xs", children: e.externalDependencies.map((p, x) => /* @__PURE__ */ W("dd", { children: [
|
|
2948
2990
|
"- ",
|
|
2949
2991
|
p
|
|
2950
|
-
] },
|
|
2992
|
+
] }, x)) })
|
|
2951
2993
|
] })
|
|
2952
2994
|
] })
|
|
2953
2995
|
] });
|
|
2954
2996
|
}
|
|
2955
|
-
function
|
|
2997
|
+
function Tn({
|
|
2956
2998
|
item: e,
|
|
2957
2999
|
onSettingItemChanged: n
|
|
2958
3000
|
}) {
|
|
@@ -2962,31 +3004,31 @@ function Nn({
|
|
|
2962
3004
|
const y = d.key;
|
|
2963
3005
|
if (["ArrowUp", "ArrowDown"].includes(y)) {
|
|
2964
3006
|
d.preventDefault();
|
|
2965
|
-
const m =
|
|
3007
|
+
const m = _t.incrementOrDecrementValue(
|
|
2966
3008
|
e,
|
|
2967
3009
|
y === "ArrowUp" ? 1 : -1
|
|
2968
3010
|
);
|
|
2969
3011
|
n(m);
|
|
2970
3012
|
}
|
|
2971
|
-
},
|
|
3013
|
+
}, s = (d) => {
|
|
2972
3014
|
n({
|
|
2973
3015
|
...e,
|
|
2974
3016
|
value: d.target.value || ""
|
|
2975
3017
|
});
|
|
2976
3018
|
};
|
|
2977
|
-
return /* @__PURE__ */
|
|
2978
|
-
/* @__PURE__ */
|
|
2979
|
-
/* @__PURE__ */
|
|
3019
|
+
return /* @__PURE__ */ a("div", { className: i, style: { width: "calc(100% - 1rem)" }, children: /* @__PURE__ */ W("div", { className: "w-full", children: [
|
|
3020
|
+
/* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2 justify-between", children: /* @__PURE__ */ a("span", { className: "font-bold", children: t }) }),
|
|
3021
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-2 text-xs", children: /* @__PURE__ */ a("div", { children: r }) }),
|
|
2980
3022
|
/* @__PURE__ */ W("div", { children: [
|
|
2981
3023
|
"Value:",
|
|
2982
|
-
/* @__PURE__ */
|
|
2983
|
-
|
|
3024
|
+
/* @__PURE__ */ a(
|
|
3025
|
+
pt,
|
|
2984
3026
|
{
|
|
2985
3027
|
label: "Filter...",
|
|
2986
3028
|
size: "small",
|
|
2987
3029
|
className: "w-full",
|
|
2988
3030
|
value: e.value,
|
|
2989
|
-
onChange:
|
|
3031
|
+
onChange: s,
|
|
2990
3032
|
onKeyDown: o
|
|
2991
3033
|
}
|
|
2992
3034
|
)
|
|
@@ -2997,49 +3039,49 @@ const Ie = (e, n) => [
|
|
|
2997
3039
|
...n.widgets.filter((r) => r.indexOf("Container") === -1),
|
|
2998
3040
|
...n.childWidgetsConfig.map((r) => r.widgetKey)
|
|
2999
3041
|
].includes(e);
|
|
3000
|
-
function
|
|
3042
|
+
function lr({
|
|
3001
3043
|
targetContainerKey: e,
|
|
3002
3044
|
widgetsCatalog: n,
|
|
3003
3045
|
currentDashboardConfig: t,
|
|
3004
3046
|
undoStatus: r,
|
|
3005
3047
|
addWidget: i,
|
|
3006
3048
|
addContainer: o,
|
|
3007
|
-
onSettingItemsUpdated:
|
|
3049
|
+
onSettingItemsUpdated: s,
|
|
3008
3050
|
onResetToDefaultDashboardClick: d,
|
|
3009
3051
|
onUndoOrRedo: y,
|
|
3010
3052
|
onDoneClick: m
|
|
3011
3053
|
}) {
|
|
3012
|
-
const [h, u] = le("Editing"), [g, p] = le(0), [
|
|
3013
|
-
widgetKey:
|
|
3014
|
-
metaData:
|
|
3015
|
-
})), N = (
|
|
3016
|
-
|
|
3017
|
-
}, S = (
|
|
3018
|
-
const z =
|
|
3019
|
-
return z.length < 1 ? !0 :
|
|
3020
|
-
}, D = (
|
|
3021
|
-
const z =
|
|
3022
|
-
return z.length < 1 ? !0 :
|
|
3023
|
-
}, c = (
|
|
3054
|
+
const [h, u] = le("Editing"), [g, p] = le(0), [x, b] = le(""), C = Array.from(n.keys()).map((T) => ({
|
|
3055
|
+
widgetKey: T,
|
|
3056
|
+
metaData: $t(T, n)
|
|
3057
|
+
})), N = (T) => {
|
|
3058
|
+
b(T.target.value);
|
|
3059
|
+
}, S = (T) => {
|
|
3060
|
+
const z = x.trim().toLowerCase();
|
|
3061
|
+
return z.length < 1 ? !0 : T.displayName.trim().toLowerCase().includes(z) || T.description.toLowerCase().includes(z);
|
|
3062
|
+
}, D = (T) => {
|
|
3063
|
+
const z = x.trim().toLowerCase();
|
|
3064
|
+
return z.length < 1 ? !0 : T.displayName.trim().toLowerCase().includes(z) || T.description.toLowerCase().includes(z);
|
|
3065
|
+
}, c = (T) => Z(
|
|
3024
3066
|
"px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
|
|
3025
|
-
|
|
3026
|
-
),
|
|
3027
|
-
|
|
3067
|
+
T === g ? "text-primary border-primary" : ""
|
|
3068
|
+
), E = !!e;
|
|
3069
|
+
Dt(() => {
|
|
3028
3070
|
if (e) {
|
|
3029
3071
|
p(0);
|
|
3030
|
-
const
|
|
3031
|
-
u(`Editing ${
|
|
3072
|
+
const T = mt(e);
|
|
3073
|
+
u(`Editing ${T}`);
|
|
3032
3074
|
} else
|
|
3033
3075
|
u("Editing Dashboard");
|
|
3034
3076
|
}, [e]);
|
|
3035
|
-
const l = (
|
|
3036
|
-
|
|
3037
|
-
}, f = (
|
|
3038
|
-
const z = (t.cssSettings || []).map((X) => X.key ===
|
|
3039
|
-
|
|
3040
|
-
}, [
|
|
3041
|
-
return /* @__PURE__ */
|
|
3042
|
-
|
|
3077
|
+
const l = (T) => {
|
|
3078
|
+
E ? i(T, e) : i(T);
|
|
3079
|
+
}, f = (T) => {
|
|
3080
|
+
const z = (t.cssSettings || []).map((X) => X.key === T.key ? T : X);
|
|
3081
|
+
s(z);
|
|
3082
|
+
}, [M, $] = le(!1);
|
|
3083
|
+
return /* @__PURE__ */ a(
|
|
3084
|
+
xn,
|
|
3043
3085
|
{
|
|
3044
3086
|
testId: "dashboard-catalog-flyout",
|
|
3045
3087
|
className: "bg-body content-body bg-opacity-70 border-2 border-primary",
|
|
@@ -3050,24 +3092,24 @@ function sr({
|
|
|
3050
3092
|
minHeight: "360px",
|
|
3051
3093
|
backdropFilter: "blur(8px)"
|
|
3052
3094
|
},
|
|
3053
|
-
onDraggingChange: (
|
|
3054
|
-
$(
|
|
3095
|
+
onDraggingChange: (T) => {
|
|
3096
|
+
$(T);
|
|
3055
3097
|
},
|
|
3056
3098
|
children: /* @__PURE__ */ W("div", { className: "flex flex-col gap-2 p-2", children: [
|
|
3057
3099
|
/* @__PURE__ */ W("div", { className: "flex flex-row gap-2 justify-between", children: [
|
|
3058
3100
|
/* @__PURE__ */ W("div", { className: "handle flex-1 flex gap-2 w-full hover:text-primary cursor-grab", children: [
|
|
3059
|
-
|
|
3060
|
-
/* @__PURE__ */
|
|
3101
|
+
M ? /* @__PURE__ */ a(en, { className: "size-5" }) : /* @__PURE__ */ a(Qt, { className: "size-5" }),
|
|
3102
|
+
/* @__PURE__ */ a(
|
|
3061
3103
|
"h2",
|
|
3062
3104
|
{
|
|
3063
3105
|
className: "flex-1 text-base margin-0 capitalize",
|
|
3064
|
-
title:
|
|
3106
|
+
title: E ? h : `Editing dashboard: ${t.dashboardName}`,
|
|
3065
3107
|
children: h
|
|
3066
3108
|
}
|
|
3067
3109
|
)
|
|
3068
3110
|
] }),
|
|
3069
3111
|
/* @__PURE__ */ W("div", { className: "flex flex-row gap-2 items-center", children: [
|
|
3070
|
-
/* @__PURE__ */
|
|
3112
|
+
/* @__PURE__ */ a(
|
|
3071
3113
|
J,
|
|
3072
3114
|
{
|
|
3073
3115
|
"data-testid": "undo-dashboard-config-change",
|
|
@@ -3078,10 +3120,10 @@ function sr({
|
|
|
3078
3120
|
},
|
|
3079
3121
|
disabled: r.isUndoDisabled,
|
|
3080
3122
|
onClick: () => y("Undo"),
|
|
3081
|
-
children: /* @__PURE__ */
|
|
3123
|
+
children: /* @__PURE__ */ a(Zt, { className: "size-5" })
|
|
3082
3124
|
}
|
|
3083
3125
|
),
|
|
3084
|
-
/* @__PURE__ */
|
|
3126
|
+
/* @__PURE__ */ a(
|
|
3085
3127
|
J,
|
|
3086
3128
|
{
|
|
3087
3129
|
"data-testid": "redo-dashboard-config-change",
|
|
@@ -3092,10 +3134,10 @@ function sr({
|
|
|
3092
3134
|
},
|
|
3093
3135
|
disabled: r.isRedoDisabled,
|
|
3094
3136
|
onClick: () => y("Redo"),
|
|
3095
|
-
children: /* @__PURE__ */
|
|
3137
|
+
children: /* @__PURE__ */ a(Jt, { className: "size-5" })
|
|
3096
3138
|
}
|
|
3097
3139
|
),
|
|
3098
|
-
/* @__PURE__ */
|
|
3140
|
+
/* @__PURE__ */ a(
|
|
3099
3141
|
J,
|
|
3100
3142
|
{
|
|
3101
3143
|
"data-testid": "reset-dashboard-to-default",
|
|
@@ -3105,24 +3147,24 @@ function sr({
|
|
|
3105
3147
|
title: "Reset this dashboard to the default configuration"
|
|
3106
3148
|
},
|
|
3107
3149
|
onClick: d,
|
|
3108
|
-
children: /* @__PURE__ */
|
|
3150
|
+
children: /* @__PURE__ */ a(Gt, { className: "size-5" })
|
|
3109
3151
|
}
|
|
3110
3152
|
)
|
|
3111
3153
|
] })
|
|
3112
3154
|
] }),
|
|
3113
3155
|
/* @__PURE__ */ W("div", { className: "flex border-b border-gray-200", children: [
|
|
3114
|
-
/* @__PURE__ */
|
|
3115
|
-
/* @__PURE__ */
|
|
3116
|
-
!
|
|
3117
|
-
!
|
|
3156
|
+
/* @__PURE__ */ a("button", { onClick: () => p(0), className: c(0), children: "Widgets" }),
|
|
3157
|
+
/* @__PURE__ */ a("button", { onClick: () => p(1), className: c(1), children: "Charts" }),
|
|
3158
|
+
!E && /* @__PURE__ */ a("button", { onClick: () => p(2), className: c(2), children: "Containers" }),
|
|
3159
|
+
!E && /* @__PURE__ */ a("button", { onClick: () => p(3), className: c(3), children: /* @__PURE__ */ a(Xt, {}) })
|
|
3118
3160
|
] }),
|
|
3119
|
-
/* @__PURE__ */
|
|
3120
|
-
|
|
3161
|
+
/* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-1 w-full", children: /* @__PURE__ */ a(
|
|
3162
|
+
pt,
|
|
3121
3163
|
{
|
|
3122
3164
|
label: "Filter...",
|
|
3123
3165
|
size: "small",
|
|
3124
3166
|
className: "w-full",
|
|
3125
|
-
value:
|
|
3167
|
+
value: x,
|
|
3126
3168
|
onChange: N
|
|
3127
3169
|
}
|
|
3128
3170
|
) }),
|
|
@@ -3135,51 +3177,51 @@ function sr({
|
|
|
3135
3177
|
},
|
|
3136
3178
|
children: [
|
|
3137
3179
|
g === 0 && C.filter(
|
|
3138
|
-
(
|
|
3139
|
-
).map((
|
|
3180
|
+
(T) => T.metaData.categories.includes("Widget") && S(T.metaData)
|
|
3181
|
+
).map((T) => /* @__PURE__ */ a(
|
|
3140
3182
|
We,
|
|
3141
3183
|
{
|
|
3142
|
-
widgetKey:
|
|
3143
|
-
metaData:
|
|
3144
|
-
alreadyAdded: Ie(
|
|
3145
|
-
addWidget: () => l(
|
|
3184
|
+
widgetKey: T.widgetKey,
|
|
3185
|
+
metaData: T.metaData,
|
|
3186
|
+
alreadyAdded: Ie(T.widgetKey, t),
|
|
3187
|
+
addWidget: () => l(T.widgetKey)
|
|
3146
3188
|
},
|
|
3147
|
-
|
|
3189
|
+
T.widgetKey
|
|
3148
3190
|
)),
|
|
3149
3191
|
g === 1 && C.filter(
|
|
3150
|
-
(
|
|
3151
|
-
).map((
|
|
3192
|
+
(T) => T.metaData.categories.includes("Chart") && S(T.metaData)
|
|
3193
|
+
).map((T) => /* @__PURE__ */ a(
|
|
3152
3194
|
We,
|
|
3153
3195
|
{
|
|
3154
|
-
widgetKey:
|
|
3155
|
-
metaData:
|
|
3156
|
-
alreadyAdded: Ie(
|
|
3157
|
-
addWidget: () => l(
|
|
3196
|
+
widgetKey: T.widgetKey,
|
|
3197
|
+
metaData: T.metaData,
|
|
3198
|
+
alreadyAdded: Ie(T.widgetKey, t),
|
|
3199
|
+
addWidget: () => l(T.widgetKey)
|
|
3158
3200
|
},
|
|
3159
|
-
|
|
3201
|
+
T.widgetKey
|
|
3160
3202
|
)),
|
|
3161
|
-
!
|
|
3203
|
+
!E && g === 2 && C.filter((T) => T.metaData.categories.includes("Container")).map((T) => /* @__PURE__ */ a(
|
|
3162
3204
|
We,
|
|
3163
3205
|
{
|
|
3164
|
-
widgetKey:
|
|
3165
|
-
metaData:
|
|
3166
|
-
alreadyAdded: Ie(
|
|
3167
|
-
addWidget: () => o(
|
|
3206
|
+
widgetKey: T.widgetKey,
|
|
3207
|
+
metaData: T.metaData,
|
|
3208
|
+
alreadyAdded: Ie(T.widgetKey, t),
|
|
3209
|
+
addWidget: () => o(T.widgetKey)
|
|
3168
3210
|
},
|
|
3169
|
-
|
|
3211
|
+
T.widgetKey
|
|
3170
3212
|
)),
|
|
3171
|
-
!
|
|
3172
|
-
|
|
3213
|
+
!E && g === 3 && (t.cssSettings || []).filter(D).map((T) => /* @__PURE__ */ a(
|
|
3214
|
+
Tn,
|
|
3173
3215
|
{
|
|
3174
|
-
item:
|
|
3216
|
+
item: T,
|
|
3175
3217
|
onSettingItemChanged: f
|
|
3176
3218
|
},
|
|
3177
|
-
|
|
3219
|
+
T.key
|
|
3178
3220
|
))
|
|
3179
3221
|
]
|
|
3180
3222
|
}
|
|
3181
3223
|
),
|
|
3182
|
-
/* @__PURE__ */
|
|
3224
|
+
/* @__PURE__ */ a("div", { className: "mt-4 w-full flex flex-row justify-end pt-1", children: /* @__PURE__ */ a(
|
|
3183
3225
|
J,
|
|
3184
3226
|
{
|
|
3185
3227
|
className: "bg-opacity-100",
|
|
@@ -3196,71 +3238,72 @@ function sr({
|
|
|
3196
3238
|
);
|
|
3197
3239
|
}
|
|
3198
3240
|
export {
|
|
3199
|
-
|
|
3241
|
+
An as AddIcon,
|
|
3200
3242
|
J as Button,
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3243
|
+
nn as CircleQuestionMark,
|
|
3244
|
+
tn as CrosshairIcon,
|
|
3245
|
+
or as DashboardGrid,
|
|
3204
3246
|
Le as DashboardMaxZoomScale,
|
|
3205
3247
|
Ae as DashboardMinZoomScale,
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3248
|
+
at as DashboardWidgetBase,
|
|
3249
|
+
Mt as DashboardZoomStep,
|
|
3250
|
+
Ln as DeleteIcon,
|
|
3251
|
+
xn as DraggablePanel,
|
|
3252
|
+
Nn as DynamicWidgetLoader,
|
|
3253
|
+
Fn as EditIcon,
|
|
3254
|
+
Vn as GridIcon,
|
|
3255
|
+
en as HandGrabIcon,
|
|
3256
|
+
Qt as HandIcon,
|
|
3257
|
+
Gn as ListItem,
|
|
3258
|
+
Zn as ListItemLeftChild,
|
|
3259
|
+
Jn as ListItemMiddleChild,
|
|
3260
|
+
Qn as ListItemRightChild,
|
|
3219
3261
|
Un as MonitorIcon,
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3262
|
+
qn as MonitorSmartphoneIcon,
|
|
3263
|
+
ft as MoveLeftIcon,
|
|
3264
|
+
ht as MoveRightIcon,
|
|
3265
|
+
Jt as RedoIcon,
|
|
3266
|
+
Xt as SettingsIcon,
|
|
3267
|
+
on as Stack,
|
|
3268
|
+
H as SvgBaseWrapper,
|
|
3227
3269
|
Yn as TabletSmartphoneIcon,
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3270
|
+
Hn as TargetIcon,
|
|
3271
|
+
pt as TextField,
|
|
3272
|
+
Gt as TimerResetIcon,
|
|
3273
|
+
Zt as UndoIcon,
|
|
3274
|
+
ir as WidgetContainerColumn,
|
|
3275
|
+
ar as WidgetContainerLarge,
|
|
3276
|
+
sr as WidgetContainerRow,
|
|
3277
|
+
lr as WidgetsCatalogFlyout,
|
|
3278
|
+
tr as WrapperColumnContent,
|
|
3279
|
+
nr as WrapperColumnContentListItem,
|
|
3280
|
+
gt as XCircleIcon,
|
|
3281
|
+
zn as ZoomInIcon,
|
|
3282
|
+
Bn as ZoomOutIcon,
|
|
3283
|
+
Sn as _isVersionCompatible,
|
|
3241
3284
|
Ce as blankDashboardConfig,
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3285
|
+
dt as createDynamicEntry,
|
|
3286
|
+
Wt as createStaticEntry,
|
|
3287
|
+
Nt as cssSettingsCatalog,
|
|
3288
|
+
Xn as cssVarsUtils,
|
|
3289
|
+
_t as dashboardSettingsUtils,
|
|
3290
|
+
Pt as ensureContainersSequence,
|
|
3291
|
+
ct as ensureZoomScaleIsWithinRange,
|
|
3249
3292
|
ge as getDefaultWidgetMetaFromKey,
|
|
3250
|
-
|
|
3293
|
+
Wn as getDefaultWidgetMetaFromMap,
|
|
3251
3294
|
Z as getDistinctCssClasses,
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3295
|
+
Rt as getMetaInfoFromFile,
|
|
3296
|
+
Pn as getNewZoomScaleWithinRange,
|
|
3297
|
+
$t as getWidgetMetaFromCatalog,
|
|
3298
|
+
Rn as localWidgetDiscovery,
|
|
3299
|
+
mt as parseContainerTitle,
|
|
3300
|
+
It as parseKeyAndTitleFromFilePath,
|
|
3301
|
+
In as remoteWidgetDiscovery,
|
|
3302
|
+
$n as removeEmptyContainers,
|
|
3260
3303
|
re as resolveColorFromClass,
|
|
3261
3304
|
Kn as resolvedColors,
|
|
3262
|
-
|
|
3263
|
-
|
|
3305
|
+
rr as showToast,
|
|
3306
|
+
kn as useDashboardStorageService,
|
|
3264
3307
|
On as useDashboardStore,
|
|
3265
|
-
|
|
3308
|
+
jn as useDashboardUndoService
|
|
3266
3309
|
};
|