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