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