vuesp-components 3.0.2 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{VDialog.vue_vue_type_script_setup_true_lang-DoK7s9gY.js → VDialog.vue_vue_type_script_setup_true_lang-BbIQM6vq.js} +12 -12
- package/dist/components/block/service/BlockService.vue.d.ts.map +1 -1
- package/dist/components/dashboard/cards/CardBase.vue.d.ts.map +1 -1
- package/dist/components/index.es.js +729 -710
- package/dist/components/script/editor/ScriptEditor.vue.d.ts.map +1 -1
- package/dist/components/script/editor/highlighters/index.d.ts.map +1 -1
- package/dist/components/ui/button/types.d.ts +1 -1
- package/dist/components/ui/button/types.d.ts.map +1 -1
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.es.js +37 -27
- package/dist/index.es.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as L, resolveComponent as Rt, openBlock as f, createElementBlock as g, Fragment as D, createCommentVNode as T, createElementVNode as l, normalizeClass as M, createVNode as v, withCtx as x, createBlock as O, renderSlot as B, computed as C, withModifiers as Q, toDisplayString as w, unref as H, TransitionGroup as Pt, renderList as K, mergeProps as X, ref as F, watch as _e, resolveDynamicComponent as Ee, Transition as yt, normalizeStyle as Ve, createTextVNode as E, normalizeProps as
|
|
2
|
-
import { a as
|
|
3
|
-
import { I as
|
|
4
|
-
import { f as $
|
|
5
|
-
import { e as $t, f as
|
|
6
|
-
import { useForm as
|
|
7
|
-
import { required as
|
|
8
|
-
import { a as
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as L, resolveComponent as Rt, openBlock as f, createElementBlock as g, Fragment as D, createCommentVNode as T, createElementVNode as l, normalizeClass as M, createVNode as v, withCtx as x, createBlock as O, renderSlot as B, computed as C, withModifiers as Q, toDisplayString as w, unref as H, TransitionGroup as Pt, renderList as K, mergeProps as X, ref as F, watch as _e, resolveDynamicComponent as Ee, Transition as yt, normalizeStyle as Ve, createTextVNode as E, normalizeProps as ae, guardReactiveProps as se, onMounted as he, onUnmounted as Je, reactive as Ut, withDirectives as ot, vShow as ma, vModelText as bt, nextTick as xt, toValue as fa, useTemplateRef as Kt, createSlots as ga, isRef as va, Teleport as pa } from "vue";
|
|
2
|
+
import { a as ha, V as Ht, i as j, j as I, g as Wt, f as kt, k as ya, b as ba, h as xa, d as ge, u as ka, _ as Se, e as le } from "../VDialog.vue_vue_type_script_setup_true_lang-BbIQM6vq.js";
|
|
3
|
+
import { I as wd, l as Cd, m as _d } from "../VDialog.vue_vue_type_script_setup_true_lang-BbIQM6vq.js";
|
|
4
|
+
import { f as $a, t as wa, g as Ca, u as tt, s as _a, d as Sa, m as Ta, c as za } from "../app-B45sALrX.js";
|
|
5
|
+
import { e as $t, f as Aa, g as Ea, o as Va } from "../useDialog-Buvn63AR.js";
|
|
6
|
+
import { useForm as Ba } from "../composables/index.es.js";
|
|
7
|
+
import { required as Ia, maxLen as La } from "../validate/index.es.js";
|
|
8
|
+
import { a as Ma } from "../paths-CbO4FuTv.js";
|
|
9
|
+
const Oa = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, jr = /* @__PURE__ */ L({
|
|
10
10
|
__name: "AppAside",
|
|
11
11
|
props: {
|
|
12
12
|
isSidebar: { type: Boolean, default: !1 }
|
|
13
13
|
},
|
|
14
14
|
emits: ["sidebar"],
|
|
15
|
-
setup(e, { emit:
|
|
16
|
-
const
|
|
17
|
-
e.isSidebar &&
|
|
15
|
+
setup(e, { emit: s }) {
|
|
16
|
+
const a = s, n = () => {
|
|
17
|
+
e.isSidebar && a("sidebar", !e.isSidebar);
|
|
18
18
|
};
|
|
19
19
|
return (t, o) => {
|
|
20
20
|
const r = Rt("router-link");
|
|
@@ -32,7 +32,7 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
32
32
|
}, [
|
|
33
33
|
v(r, { to: "/" }, {
|
|
34
34
|
default: x(() => [
|
|
35
|
-
e.isSidebar ? (f(), O(
|
|
35
|
+
e.isSidebar ? (f(), O(ha, {
|
|
36
36
|
key: 0,
|
|
37
37
|
class: "h-7 text-cyan-main"
|
|
38
38
|
})) : (f(), O(Ht, {
|
|
@@ -43,36 +43,36 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
43
43
|
_: 1
|
|
44
44
|
})
|
|
45
45
|
], 2),
|
|
46
|
-
l("div",
|
|
46
|
+
l("div", Oa, [
|
|
47
47
|
B(t.$slots, "default")
|
|
48
48
|
])
|
|
49
49
|
], 2)
|
|
50
50
|
], 64);
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
}),
|
|
53
|
+
}), Fa = { class: "glass-header relative sticky top-0 left-0 z-10 w-full border-b shadow-card" }, Da = { class: "py-4" }, ja = { class: "container mx-auto flex flex-auto items-center" }, Na = { class: "lg:hidden h-7" }, Ra = { class: "gap-4 hidden lg:flex" }, Pa = { class: "lg:hidden flex gap-4" }, Ua = { class: "ms-2" }, Nr = /* @__PURE__ */ L({
|
|
54
54
|
__name: "AppHeader",
|
|
55
55
|
props: {
|
|
56
56
|
changeTheme: { type: Function },
|
|
57
57
|
notifications: {}
|
|
58
58
|
},
|
|
59
59
|
emits: ["sidebar", "notif"],
|
|
60
|
-
setup(e, { emit:
|
|
61
|
-
const
|
|
60
|
+
setup(e, { emit: s }) {
|
|
61
|
+
const a = s, n = [
|
|
62
62
|
{ name: "Theme", value: 1 },
|
|
63
63
|
{ name: "Notification", value: 2 },
|
|
64
64
|
{ name: "Logout", value: 3 }
|
|
65
|
-
], t = C(() => !!e.notifications.find((c) => c.isNew)), o = (c) =>
|
|
65
|
+
], t = C(() => !!e.notifications.find((c) => c.isNew)), o = (c) => a("sidebar", c), r = (c) => a("notif", c), d = async () => await fetch("/", { headers: { Authorization: "Basic AAAAAAAAAAAAAAAAAAA=" } }), u = () => {
|
|
66
66
|
e.changeTheme && e.changeTheme();
|
|
67
67
|
}, i = ({ value: c }, m) => {
|
|
68
68
|
c == 1 && u(), c == 2 && r(m), c == 3 && d();
|
|
69
69
|
};
|
|
70
70
|
return (c, m) => {
|
|
71
71
|
const p = Rt("router-link");
|
|
72
|
-
return f(), g("header",
|
|
72
|
+
return f(), g("header", Fa, [
|
|
73
73
|
m[3] || (m[3] = l("div", { class: "pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-white/35 to-transparent" }, null, -1)),
|
|
74
|
-
l("div",
|
|
75
|
-
l("div",
|
|
74
|
+
l("div", Da, [
|
|
75
|
+
l("div", ja, [
|
|
76
76
|
v(j, {
|
|
77
77
|
type: "icon",
|
|
78
78
|
onClick: o
|
|
@@ -86,7 +86,7 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
86
86
|
_: 1
|
|
87
87
|
}),
|
|
88
88
|
m[1] || (m[1] = l("div", { class: "lg:hidden flex-auto" }, null, -1)),
|
|
89
|
-
l("div",
|
|
89
|
+
l("div", Na, [
|
|
90
90
|
v(p, { to: "/" }, {
|
|
91
91
|
default: x(() => [
|
|
92
92
|
v(Ht, { class: "h-7 text-cyan-main" })
|
|
@@ -95,7 +95,7 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
95
95
|
})
|
|
96
96
|
]),
|
|
97
97
|
m[2] || (m[2] = l("div", { class: "flex-auto" }, null, -1)),
|
|
98
|
-
l("div",
|
|
98
|
+
l("div", Ra, [
|
|
99
99
|
v(j, {
|
|
100
100
|
type: "icon",
|
|
101
101
|
onClick: u
|
|
@@ -142,7 +142,7 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
142
142
|
_: 1
|
|
143
143
|
})
|
|
144
144
|
]),
|
|
145
|
-
l("div",
|
|
145
|
+
l("div", Pa, [
|
|
146
146
|
v(Wt, {
|
|
147
147
|
left: "unset",
|
|
148
148
|
right: "0",
|
|
@@ -169,7 +169,7 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
169
169
|
onClick: i
|
|
170
170
|
}, {
|
|
171
171
|
default: x(({ item: b }) => [
|
|
172
|
-
l("span",
|
|
172
|
+
l("span", Ua, w(b.name), 1)
|
|
173
173
|
]),
|
|
174
174
|
_: 1
|
|
175
175
|
})
|
|
@@ -182,7 +182,7 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
182
182
|
]);
|
|
183
183
|
};
|
|
184
184
|
}
|
|
185
|
-
}),
|
|
185
|
+
}), Ka = { class: "relative flex items-center gap-2 w-full p-2 overflow-hidden" }, Ha = { class: "flex-auto text-xs" }, Wa = { class: "text-gray-dark-25 dark:text-gray-main mt-1" }, Ga = /* @__PURE__ */ L({
|
|
186
186
|
__name: "CardNotification",
|
|
187
187
|
props: {
|
|
188
188
|
empty: {},
|
|
@@ -193,11 +193,11 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
193
193
|
text: {}
|
|
194
194
|
},
|
|
195
195
|
emits: ["remove", "read"],
|
|
196
|
-
setup(e, { emit:
|
|
197
|
-
const
|
|
198
|
-
return (u, i) => (f(), g("div",
|
|
196
|
+
setup(e, { emit: s }) {
|
|
197
|
+
const a = e, n = s, t = ["", "bg-green-500", "bg-red-500", "bg-yellow-500", "bg-blue-500"], o = (u) => t[u], r = (u) => n("remove", u), d = (u) => n("read", u);
|
|
198
|
+
return (u, i) => (f(), g("div", Ka, [
|
|
199
199
|
l("div", {
|
|
200
|
-
class: M(["absolute left-0 top-0 w-1 h-full", o(
|
|
200
|
+
class: M(["absolute left-0 top-0 w-1 h-full", o(a.color)])
|
|
201
201
|
}, null, 2),
|
|
202
202
|
v(j, {
|
|
203
203
|
class: "shrink-0",
|
|
@@ -206,7 +206,7 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
206
206
|
}, {
|
|
207
207
|
default: x(() => [
|
|
208
208
|
l("span", {
|
|
209
|
-
class: M([
|
|
209
|
+
class: M([a.isNew ? "flex" : "hidden", "absolute right-0 top-0.5 z-1 h-2 w-2 rounded-full bg-orange-400"])
|
|
210
210
|
}, [...i[0] || (i[0] = [
|
|
211
211
|
l("span", { class: "absolute -z-1 inline-flex h-full w-full animate-ping rounded-full bg-orange-400 opacity-75" }, null, -1)
|
|
212
212
|
])], 2),
|
|
@@ -217,9 +217,9 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
217
217
|
]),
|
|
218
218
|
_: 1
|
|
219
219
|
}),
|
|
220
|
-
l("div",
|
|
221
|
-
l("div", null, w(
|
|
222
|
-
l("div",
|
|
220
|
+
l("div", Ha, [
|
|
221
|
+
l("div", null, w(a.text), 1),
|
|
222
|
+
l("div", Wa, w(H($a)(a.date)) + " (" + w(H(wa)(a.date)) + ")", 1)
|
|
223
223
|
]),
|
|
224
224
|
v(j, {
|
|
225
225
|
class: "shrink-0",
|
|
@@ -237,30 +237,30 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
237
237
|
})
|
|
238
238
|
]));
|
|
239
239
|
}
|
|
240
|
-
}),
|
|
240
|
+
}), Ja = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 ease-linear h-full" }, Xa = {
|
|
241
241
|
key: 0,
|
|
242
242
|
class: "flex flex-col gap-2 p-2"
|
|
243
|
-
},
|
|
243
|
+
}, Rr = /* @__PURE__ */ L({
|
|
244
244
|
__name: "AppNotification",
|
|
245
245
|
props: {
|
|
246
246
|
value: { type: Boolean },
|
|
247
247
|
notifications: {}
|
|
248
248
|
},
|
|
249
249
|
emits: ["close", "remove", "read"],
|
|
250
|
-
setup(e, { emit:
|
|
251
|
-
const
|
|
250
|
+
setup(e, { emit: s }) {
|
|
251
|
+
const a = e, n = s, t = C(() => !!a.notifications.find((i) => i.isNew)), o = C(() => !!a.notifications.length), r = (i) => n("close", i), d = (i) => n("remove", i), u = (i) => n("read", i);
|
|
252
252
|
return (i, c) => (f(), g(D, null, [
|
|
253
|
-
|
|
253
|
+
a.value ? (f(), g("div", {
|
|
254
254
|
key: 0,
|
|
255
255
|
class: "overlay fixed left-0 top-0 h-full w-full bg-black/40 bg-blur",
|
|
256
256
|
onClick: r
|
|
257
257
|
})) : T("", !0),
|
|
258
258
|
l("aside", {
|
|
259
|
-
class: M([
|
|
259
|
+
class: M([a.value ? "translate-x-0 " : "translate-x-full", "overflow-x-hidden fixed top-18 bottom-0 right-0 flex w-72 md:w-80 border-l border-gray-light-10/70 flex-col overflow-y-auto transition-all duration-350 dark:border-white/10 bg-white/90 backdrop-blur-2xl dark:bg-night-main/80"])
|
|
260
260
|
}, [
|
|
261
|
-
l("div",
|
|
261
|
+
l("div", Ja, [
|
|
262
262
|
B(i.$slots, "header", { isNew: t.value }),
|
|
263
|
-
o.value ? (f(), g("div",
|
|
263
|
+
o.value ? (f(), g("div", Xa, [
|
|
264
264
|
v(Pt, {
|
|
265
265
|
"enter-active-class": "transition-all duration-300 ",
|
|
266
266
|
"enter-from-class": "opacity-0 translate-x-1/2",
|
|
@@ -270,12 +270,12 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
270
270
|
"leave-to-class": "opacity-0 translate-x-1/2"
|
|
271
271
|
}, {
|
|
272
272
|
default: x(() => [
|
|
273
|
-
(f(!0), g(D, null, K(
|
|
273
|
+
(f(!0), g(D, null, K(a.notifications, (m) => (f(), g("div", {
|
|
274
274
|
key: m.date,
|
|
275
275
|
class: "relative"
|
|
276
276
|
}, [
|
|
277
277
|
B(i.$slots, "card", { item: m }, () => [
|
|
278
|
-
v(
|
|
278
|
+
v(Ga, X({ ref_for: !0 }, m, {
|
|
279
279
|
class: "rounded-md border border-gray-light-10/60 bg-white/50 dark:border-white/5 dark:bg-white/[0.03]",
|
|
280
280
|
onRemove: (p) => d(m),
|
|
281
281
|
onRead: (p) => u(m)
|
|
@@ -290,19 +290,19 @@ const Os = { class: "no-scrollbar flex flex-col overflow-y-auto duration-300 eas
|
|
|
290
290
|
], 2)
|
|
291
291
|
], 64));
|
|
292
292
|
}
|
|
293
|
-
}),
|
|
294
|
-
function
|
|
295
|
-
return f(), g("div",
|
|
296
|
-
|
|
297
|
-
l("div",
|
|
293
|
+
}), qa = {}, Ya = { class: "fixed h-full w-full top-0 left-0 z-20" }, Za = { class: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2" };
|
|
294
|
+
function Qa(e, s) {
|
|
295
|
+
return f(), g("div", Ya, [
|
|
296
|
+
s[0] || (s[0] = l("div", { class: "absolute h-full w-full top-0 left-0 bg-black/60 bg-blur" }, null, -1)),
|
|
297
|
+
l("div", Za, [
|
|
298
298
|
B(e.$slots, "default")
|
|
299
299
|
])
|
|
300
300
|
]);
|
|
301
301
|
}
|
|
302
|
-
const
|
|
302
|
+
const Pr = /* @__PURE__ */ ya(qa, [["render", Qa]]), es = { class: "mb-4 flex flex-col gap-2" }, ts = { class: "size-5 flex-[0_0_20px] opacity-60" }, as = ["onClick"], ss = { class: "flex flex-col gap-2" }, ls = { class: "flex gap-2 ms-8" }, ns = { class: "size-5 flex-[0_0_20px]" }, os = { class: "flex-1 first-letter:uppercase text-sm" }, is = {
|
|
303
303
|
key: 0,
|
|
304
304
|
class: "mt-2"
|
|
305
|
-
},
|
|
305
|
+
}, rs = { class: "flex flex-col gap-2" }, ds = { class: "flex gap-2 ms-14" }, cs = { class: "size-5 flex-[0_0_20px]" }, us = { class: "flex-1 first-letter:uppercase text-sm" }, Ur = /* @__PURE__ */ L({
|
|
306
306
|
__name: "AppNav",
|
|
307
307
|
props: {
|
|
308
308
|
menu: { default: () => [] },
|
|
@@ -310,9 +310,9 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
310
310
|
isSidebar: { type: Boolean, default: !1 }
|
|
311
311
|
},
|
|
312
312
|
emits: ["sidebar"],
|
|
313
|
-
setup(e, { emit:
|
|
314
|
-
const
|
|
315
|
-
e.isSidebar &&
|
|
313
|
+
setup(e, { emit: s }) {
|
|
314
|
+
const a = s, n = F(""), t = ({ name: i }) => {
|
|
315
|
+
e.isSidebar && a("sidebar", !e.isSidebar), n.value !== i && (n.value = n.value === i ? "" : i);
|
|
316
316
|
}, o = (i) => e.fullPath === i, r = (i) => i ? e.fullPath === i || e.fullPath.startsWith(i) : !1, d = (i, c) => !i.path || c === "/" || i.path === "/" ? !1 : i.path === c || c.includes(i.path), u = (i, c) => (i == null ? void 0 : i.find(
|
|
317
317
|
(m) => {
|
|
318
318
|
var p;
|
|
@@ -328,10 +328,10 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
328
328
|
() => e.menu,
|
|
329
329
|
() => {
|
|
330
330
|
var i;
|
|
331
|
-
return n.value = ((i = u(e.menu, e.fullPath) ??
|
|
331
|
+
return n.value = ((i = u(e.menu, e.fullPath) ?? Ca(e.menu, e.fullPath)) == null ? void 0 : i.name) || "";
|
|
332
332
|
}
|
|
333
333
|
), (i, c) => (f(), g("nav", null, [
|
|
334
|
-
l("ul",
|
|
334
|
+
l("ul", es, [
|
|
335
335
|
(f(!0), g(D, null, K(e.menu, (m) => (f(), g("li", {
|
|
336
336
|
key: m.name
|
|
337
337
|
}, [
|
|
@@ -341,7 +341,7 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
341
341
|
onClick: Q((p) => t(m), ["prevent", "stop"])
|
|
342
342
|
}, {
|
|
343
343
|
default: x(() => [
|
|
344
|
-
l("div",
|
|
344
|
+
l("div", ts, [
|
|
345
345
|
B(i.$slots, "icon", { item: m })
|
|
346
346
|
]),
|
|
347
347
|
l("span", {
|
|
@@ -356,7 +356,7 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
356
356
|
name: "arrow-right",
|
|
357
357
|
class: "size-5"
|
|
358
358
|
})) : T("", !0)
|
|
359
|
-
], 10,
|
|
359
|
+
], 10, as)
|
|
360
360
|
]),
|
|
361
361
|
_: 2
|
|
362
362
|
}, 1032, ["to", "class", "onClick"])),
|
|
@@ -364,26 +364,26 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
364
364
|
key: 0,
|
|
365
365
|
class: M(["translate transform overflow-hidden mt-2", [e.isSidebar ? "lg:hidden" : "", n.value === m.name ? "block" : "hidden"]])
|
|
366
366
|
}, [
|
|
367
|
-
l("ul",
|
|
367
|
+
l("ul", ss, [
|
|
368
368
|
(f(!0), g(D, null, K(m.children, ({ name: p, path: b, icon: h, children: k }) => (f(), g("li", { key: p }, [
|
|
369
369
|
(f(), O(Ee(b ? "router-link" : "span"), {
|
|
370
370
|
to: b,
|
|
371
371
|
class: M(["flex gap-2 items-center px-3 py-2 rounded", o(b) ? "bg-cyan-main/10 text-cyan-main" : "hover:bg-white/5"])
|
|
372
372
|
}, {
|
|
373
373
|
default: x(() => [
|
|
374
|
-
l("div",
|
|
375
|
-
l("div",
|
|
374
|
+
l("div", ls, [
|
|
375
|
+
l("div", ns, [
|
|
376
376
|
B(i.$slots, "icon-children", {
|
|
377
377
|
item: { name: p, path: b, icon: h }
|
|
378
378
|
})
|
|
379
379
|
]),
|
|
380
|
-
l("span",
|
|
380
|
+
l("span", os, w(p), 1)
|
|
381
381
|
])
|
|
382
382
|
]),
|
|
383
383
|
_: 2
|
|
384
384
|
}, 1032, ["to", "class"])),
|
|
385
|
-
k != null && k.length && r(b) ? (f(), g("div",
|
|
386
|
-
l("ul",
|
|
385
|
+
k != null && k.length && r(b) ? (f(), g("div", is, [
|
|
386
|
+
l("ul", rs, [
|
|
387
387
|
(f(!0), g(D, null, K(k, (_) => (f(), g("li", {
|
|
388
388
|
key: _.name
|
|
389
389
|
}, [
|
|
@@ -392,11 +392,11 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
392
392
|
class: M(["flex gap-2 items-center px-3 py-2 rounded", o(_.path) ? "bg-cyan-main/10 text-cyan-main" : "hover:bg-white/5"])
|
|
393
393
|
}, {
|
|
394
394
|
default: x(() => [
|
|
395
|
-
l("div",
|
|
396
|
-
l("div",
|
|
395
|
+
l("div", ds, [
|
|
396
|
+
l("div", cs, [
|
|
397
397
|
B(i.$slots, "icon-children", { item: _ })
|
|
398
398
|
]),
|
|
399
|
-
l("span",
|
|
399
|
+
l("span", us, w(_.name), 1)
|
|
400
400
|
])
|
|
401
401
|
]),
|
|
402
402
|
_: 2
|
|
@@ -411,17 +411,17 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
411
411
|
])
|
|
412
412
|
]));
|
|
413
413
|
}
|
|
414
|
-
}),
|
|
414
|
+
}), ms = {
|
|
415
415
|
key: 0,
|
|
416
416
|
class: "glass-inset w-full min-w-64 max-w-xs rounded-xl p-4 shadow-lg",
|
|
417
417
|
role: "alert"
|
|
418
|
-
},
|
|
418
|
+
}, fs = { class: "flex items-center gap-4 text-sm" }, gs = {
|
|
419
419
|
key: 0,
|
|
420
420
|
class: "text-green-600"
|
|
421
|
-
},
|
|
421
|
+
}, vs = {
|
|
422
422
|
key: 1,
|
|
423
423
|
class: "relative mt-2 block h-4 w-full select-none overflow-hidden rounded-md bg-gray-light-10/70 dark:bg-white/10"
|
|
424
|
-
},
|
|
424
|
+
}, ps = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-black dark:text-white text-center leading-none" }, hs = { class: "absolute left-36 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Kr = /* @__PURE__ */ L({
|
|
425
425
|
__name: "AppProgress",
|
|
426
426
|
props: {
|
|
427
427
|
timeout: { default: 5e3 },
|
|
@@ -432,13 +432,13 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
432
432
|
length: { default: 0 }
|
|
433
433
|
},
|
|
434
434
|
setup(e) {
|
|
435
|
-
const
|
|
436
|
-
|
|
435
|
+
const s = F(!1), a = C(() => !!e.length), n = C(() => !!(a.value && t.value === 100 && !e.status)), t = C(() => e.status ? Math.ceil(e.size * 100 / e.length) : 100), o = $t(() => {
|
|
436
|
+
s.value = !1;
|
|
437
437
|
}, e.timeout);
|
|
438
438
|
return _e(
|
|
439
439
|
() => [e.size, e.status],
|
|
440
440
|
() => {
|
|
441
|
-
|
|
441
|
+
s.value = !0, o();
|
|
442
442
|
}
|
|
443
443
|
), (r, d) => (f(), O(yt, {
|
|
444
444
|
"enter-active-class": "duration-300 ease-out",
|
|
@@ -449,15 +449,15 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
449
449
|
"leave-to-class": "transform opacity-0 -translate-y-8"
|
|
450
450
|
}, {
|
|
451
451
|
default: x(() => [
|
|
452
|
-
|
|
453
|
-
l("div",
|
|
452
|
+
s.value ? (f(), g("div", ms, [
|
|
453
|
+
l("div", fs, [
|
|
454
454
|
B(r.$slots, "default", { isDone: n.value }, () => [
|
|
455
455
|
d[1] || (d[1] = l("div", { class: "flex-auto" }, "Progress...", -1)),
|
|
456
|
-
n.value ? (f(), g("span",
|
|
456
|
+
n.value ? (f(), g("span", gs, "Done")) : T("", !0)
|
|
457
457
|
]),
|
|
458
458
|
l("button", {
|
|
459
459
|
class: "cursor-pointer transition text-gray-dark-30 dark:text-gray-main self-start hover:text-gray-dark-25",
|
|
460
|
-
onClick: d[0] || (d[0] = (u) =>
|
|
460
|
+
onClick: d[0] || (d[0] = (u) => s.value = !1)
|
|
461
461
|
}, [
|
|
462
462
|
v(I, {
|
|
463
463
|
name: "close",
|
|
@@ -465,18 +465,18 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
465
465
|
})
|
|
466
466
|
])
|
|
467
467
|
]),
|
|
468
|
-
|
|
468
|
+
a.value ? (f(), g("div", {
|
|
469
469
|
key: 0,
|
|
470
470
|
class: "h-0.5 fixed top-0 left-0 w-full bg-blue-600 transition-all duration-500",
|
|
471
471
|
style: Ve(`width: ${t.value}%`)
|
|
472
472
|
}, null, 4)) : T("", !0),
|
|
473
|
-
|
|
474
|
-
l("div",
|
|
473
|
+
a.value ? (f(), g("div", vs, [
|
|
474
|
+
l("div", ps, w(t.value) + "%", 1),
|
|
475
475
|
l("div", {
|
|
476
476
|
class: "bg-blue-600 rounded h-4 overflow-hidden relative transition-all duration-500",
|
|
477
477
|
style: Ve(`width: ${t.value}%`)
|
|
478
478
|
}, [
|
|
479
|
-
l("div",
|
|
479
|
+
l("div", hs, w(t.value) + "%", 1)
|
|
480
480
|
], 4)
|
|
481
481
|
])) : T("", !0)
|
|
482
482
|
])) : T("", !0)
|
|
@@ -484,7 +484,7 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
484
484
|
_: 3
|
|
485
485
|
}));
|
|
486
486
|
}
|
|
487
|
-
}),
|
|
487
|
+
}), ys = { class: "my-4 text-gray-dark-30 dark:text-gray-main" }, bs = { class: "flex flex-col md:flex-row flex-wrap md:gap-4 text-sm" }, xs = { class: "flex gap-2" }, ks = { class: "text-gray-dark-30 dark:text-gray-main" }, $s = { class: "flex gap-2" }, ws = { class: "flex gap-2" }, Cs = { class: "text-gray-dark-30 dark:text-gray-main" }, _s = { class: "flex gap-2" }, Ss = { class: "text-gray-dark-30 dark:text-gray-main" }, Ts = { class: "flex flex-col gap-4 text-sm" }, zs = { class: "flex gap-4" }, Hr = /* @__PURE__ */ L({
|
|
488
488
|
__name: "BlockInfo",
|
|
489
489
|
props: {
|
|
490
490
|
pkg: {},
|
|
@@ -497,7 +497,7 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
497
497
|
board: {}
|
|
498
498
|
},
|
|
499
499
|
setup(e) {
|
|
500
|
-
const
|
|
500
|
+
const s = C(() => e.firmware.join(".")), a = C(() => {
|
|
501
501
|
var t, o, r, d, u, i, c;
|
|
502
502
|
const n = [];
|
|
503
503
|
return (t = e.pkg) != null && t.homepage && n.push({ name: "homepage", href: e.pkg.homepage }), (r = (o = e.pkg) == null ? void 0 : o.repository) != null && r.url && n.push({ name: "repository", href: e.pkg.repository.url }), (u = (d = e.pkg) == null ? void 0 : d.bugs) != null && u.url && n.push({ name: "bugs", href: e.pkg.bugs.url }), (i = e.pkg) != null && i.author && n.push({ name: "author", href: `mailto:${(c = e.pkg) == null ? void 0 : c.author}` }), n;
|
|
@@ -505,46 +505,46 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
505
505
|
return (n, t) => {
|
|
506
506
|
var o, r;
|
|
507
507
|
return f(), g("div", null, [
|
|
508
|
-
l("p",
|
|
509
|
-
l("div",
|
|
510
|
-
l("div",
|
|
508
|
+
l("p", ys, w((o = e.pkg) == null ? void 0 : o.description), 1),
|
|
509
|
+
l("div", bs, [
|
|
510
|
+
l("div", xs, [
|
|
511
511
|
t[0] || (t[0] = E(" Firmware (hw): ", -1)),
|
|
512
|
-
l("span",
|
|
512
|
+
l("span", ks, w(s.value), 1)
|
|
513
513
|
]),
|
|
514
|
-
l("div", $
|
|
515
|
-
l("div",
|
|
514
|
+
l("div", $s, [
|
|
515
|
+
l("div", ws, [
|
|
516
516
|
t[1] || (t[1] = E(" Version (web): ", -1)),
|
|
517
|
-
l("span",
|
|
517
|
+
l("span", Cs, w((r = e.pkg) == null ? void 0 : r.version), 1)
|
|
518
518
|
])
|
|
519
519
|
]),
|
|
520
520
|
t[3] || (t[3] = l("div", { class: "flex-auto" }, null, -1)),
|
|
521
|
-
l("div",
|
|
521
|
+
l("div", _s, [
|
|
522
522
|
t[2] || (t[2] = E(" ID: ", -1)),
|
|
523
|
-
l("span",
|
|
523
|
+
l("span", Ss, w(e.id.toString(16)), 1)
|
|
524
524
|
])
|
|
525
525
|
]),
|
|
526
526
|
t[4] || (t[4] = l("hr", { class: "dark:text-gray-dark-30 text-gray-light-10 my-2" }, null, -1)),
|
|
527
|
-
l("div",
|
|
528
|
-
l("div",
|
|
529
|
-
B(n.$slots, "links", { links:
|
|
527
|
+
l("div", Ts, [
|
|
528
|
+
l("div", zs, [
|
|
529
|
+
B(n.$slots, "links", { links: a.value })
|
|
530
530
|
])
|
|
531
531
|
])
|
|
532
532
|
]);
|
|
533
533
|
};
|
|
534
534
|
}
|
|
535
|
-
}),
|
|
535
|
+
}), As = ["onClick"], Es = { class: "mr-2" }, Vs = { class: "text-sm" }, Bs = { class: "text-gray-main text-xs" }, Is = {
|
|
536
536
|
key: 0,
|
|
537
537
|
class: "flex justify-center"
|
|
538
|
-
},
|
|
538
|
+
}, Ls = { class: "flex justify-end mt-4" }, Wr = /* @__PURE__ */ L({
|
|
539
539
|
__name: "BlockScan",
|
|
540
540
|
props: {
|
|
541
541
|
items: { default: () => [] }
|
|
542
542
|
},
|
|
543
543
|
emits: ["scan", "select"],
|
|
544
|
-
setup(e, { emit:
|
|
545
|
-
const
|
|
544
|
+
setup(e, { emit: s }) {
|
|
545
|
+
const a = s, n = ["OPEN", "WEP", "WPA_PSK", "WPA2_PSK", "WPA_WPA2_PSK", "MAX", "", "NO", "AUTO"], t = (r) => a("select", r), o = (r) => a("scan", r);
|
|
546
546
|
return (r, d) => {
|
|
547
|
-
const u =
|
|
547
|
+
const u = ba, i = kt, c = xa, m = j;
|
|
548
548
|
return f(), g("div", null, [
|
|
549
549
|
v(i, {
|
|
550
550
|
items: e.items,
|
|
@@ -555,21 +555,21 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
555
555
|
class: "flex items-center w-full",
|
|
556
556
|
onClick: (b) => t(p)
|
|
557
557
|
}, [
|
|
558
|
-
l("div",
|
|
559
|
-
v(u, se(
|
|
558
|
+
l("div", Es, [
|
|
559
|
+
v(u, ae(se(p)), null, 16)
|
|
560
560
|
]),
|
|
561
561
|
l("div", null, [
|
|
562
|
-
l("div",
|
|
563
|
-
l("div",
|
|
562
|
+
l("div", Vs, w(p.ssid), 1),
|
|
563
|
+
l("div", Bs, w(r.$t("security")) + " : " + w(n[p.encryptionType] || "unknown"), 1)
|
|
564
564
|
])
|
|
565
|
-
], 8,
|
|
565
|
+
], 8, As)
|
|
566
566
|
]),
|
|
567
567
|
_: 1
|
|
568
568
|
}, 8, ["items"]),
|
|
569
|
-
e.items.length ? T("", !0) : (f(), g("div",
|
|
569
|
+
e.items.length ? T("", !0) : (f(), g("div", Is, [
|
|
570
570
|
v(c, { class: "text-cyan-main" })
|
|
571
571
|
])),
|
|
572
|
-
l("div",
|
|
572
|
+
l("div", Ls, [
|
|
573
573
|
v(m, {
|
|
574
574
|
color: "blue",
|
|
575
575
|
onClick: o
|
|
@@ -583,24 +583,24 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
583
583
|
]);
|
|
584
584
|
};
|
|
585
585
|
}
|
|
586
|
-
}),
|
|
586
|
+
}), Ms = { class: "md:flex items-center mb-4" }, Os = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10 mb-2" }, Fs = { class: "md:max-w-50" }, Ds = { class: "flex items-center mb-4" }, js = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, Ns = { class: "flex items-center mb-4" }, Rs = { class: "flex-auto text-gray-dark-25 dark:text-gray-light-10" }, Gr = /* @__PURE__ */ L({
|
|
587
587
|
__name: "BlockService",
|
|
588
588
|
props: {
|
|
589
589
|
locale: {},
|
|
590
590
|
locales: {}
|
|
591
591
|
},
|
|
592
592
|
emits: ["reboot", "reset", "locale"],
|
|
593
|
-
setup(e, { emit:
|
|
594
|
-
const
|
|
593
|
+
setup(e, { emit: s }) {
|
|
594
|
+
const a = s, n = (o) => a("locale", o), t = (o) => {
|
|
595
595
|
var r;
|
|
596
596
|
return (r = e.locales.find((d) => d.value === o)) == null ? void 0 : r.name;
|
|
597
597
|
};
|
|
598
598
|
return (o, r) => {
|
|
599
599
|
const d = ge, u = j;
|
|
600
600
|
return f(), g(D, null, [
|
|
601
|
-
l("div",
|
|
602
|
-
l("div",
|
|
603
|
-
l("div",
|
|
601
|
+
l("div", Ms, [
|
|
602
|
+
l("div", Os, w(o.$t("selectLang")), 1),
|
|
603
|
+
l("div", Fs, [
|
|
604
604
|
v(d, {
|
|
605
605
|
"model-value": t(e.locale),
|
|
606
606
|
label: o.$t("lang"),
|
|
@@ -609,13 +609,14 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
609
609
|
}, null, 8, ["model-value", "label", "items"])
|
|
610
610
|
])
|
|
611
611
|
]),
|
|
612
|
-
l("div",
|
|
613
|
-
l("div",
|
|
612
|
+
l("div", Ds, [
|
|
613
|
+
l("div", js, w(o.$t("rebootDev")), 1),
|
|
614
614
|
v(u, {
|
|
615
615
|
class: "min-w-24",
|
|
616
616
|
color: "red",
|
|
617
|
-
variant: "
|
|
618
|
-
|
|
617
|
+
variant: "soft",
|
|
618
|
+
invert: "",
|
|
619
|
+
onClick: r[0] || (r[0] = (i) => a("reboot", i))
|
|
619
620
|
}, {
|
|
620
621
|
default: x(() => [
|
|
621
622
|
E(w(o.$t("reboot")), 1)
|
|
@@ -623,12 +624,14 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
623
624
|
_: 1
|
|
624
625
|
})
|
|
625
626
|
]),
|
|
626
|
-
l("div",
|
|
627
|
-
l("div",
|
|
627
|
+
l("div", Ns, [
|
|
628
|
+
l("div", Rs, w(o.$t("resetConf")), 1),
|
|
628
629
|
v(u, {
|
|
629
630
|
class: "min-w-24",
|
|
630
631
|
color: "red",
|
|
631
|
-
|
|
632
|
+
variant: "outline",
|
|
633
|
+
invert: "",
|
|
634
|
+
onClick: r[1] || (r[1] = (i) => a("reset", i))
|
|
632
635
|
}, {
|
|
633
636
|
default: x(() => [
|
|
634
637
|
E(w(o.$t("reset")), 1)
|
|
@@ -639,7 +642,7 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
639
642
|
], 64);
|
|
640
643
|
};
|
|
641
644
|
}
|
|
642
|
-
}),
|
|
645
|
+
}), Ps = { class: "grid grid-cols-1 gap-4 lg:max-w-90 min-w-64" }, Us = { class: "flex flex-col w-full items-center gap-2" }, Ks = ["title"], Hs = { class: "absolute left-28 top-1/2 -translate-1/2 text-center text-sm font-bold leading-none text-gray-dark-40 dark:text-white" }, Ws = { class: "absolute left-28 top-1/2 -translate-1/2 text-sm font-bold text-white text-center leading-none" }, Gs = { class: "flex justify-between w-full text-xs" }, Js = { class: "text-gray-dark-25 dark:text-white/50" }, Xs = { class: "text-sm" }, qs = { class: "text-gray-dark-25 dark:text-white/50 text-left" }, Ys = { class: "text-right text-xs" }, Jr = /* @__PURE__ */ L({
|
|
643
646
|
__name: "BlockStatus",
|
|
644
647
|
props: {
|
|
645
648
|
pkg: {},
|
|
@@ -652,8 +655,8 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
652
655
|
board: {}
|
|
653
656
|
},
|
|
654
657
|
setup(e) {
|
|
655
|
-
const
|
|
656
|
-
let
|
|
658
|
+
const s = F(e.uptime);
|
|
659
|
+
let a = null;
|
|
657
660
|
const n = C(() => e.firmware.join(".")), t = C(() => [
|
|
658
661
|
{ name: "used", value: tt(e.usedBytes) },
|
|
659
662
|
{ name: "available", value: tt(e.totalBytes - e.usedBytes) },
|
|
@@ -661,55 +664,55 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
661
664
|
]), o = C(() => {
|
|
662
665
|
var u;
|
|
663
666
|
return [
|
|
664
|
-
{ name: "uptime", value:
|
|
667
|
+
{ name: "uptime", value: _a(s.value) },
|
|
665
668
|
{ name: "id", value: `${e.id.toString(16)} (${e.id})` },
|
|
666
669
|
{ name: "firmware", value: n.value },
|
|
667
670
|
{ name: "version", value: (u = e.pkg) == null ? void 0 : u.version }
|
|
668
671
|
];
|
|
669
672
|
}), r = C(() => e.usedBytes ? Math.round(e.usedBytes * 100 / e.totalBytes) : 0), d = () => {
|
|
670
|
-
|
|
673
|
+
s.value++, a = setTimeout(d, 1e3);
|
|
671
674
|
};
|
|
672
675
|
return he(() => {
|
|
673
676
|
d();
|
|
674
677
|
}), Je(() => {
|
|
675
|
-
|
|
678
|
+
s.value = 0, a && clearTimeout(a);
|
|
676
679
|
}), (u, i) => {
|
|
677
680
|
var c, m, p;
|
|
678
|
-
return f(), g("div",
|
|
679
|
-
l("div",
|
|
681
|
+
return f(), g("div", Ps, [
|
|
682
|
+
l("div", Us, [
|
|
680
683
|
l("div", {
|
|
681
684
|
class: "relative block h-4 w-full select-none overflow-hidden rounded-md bg-gray-light-10/70 dark:bg-white/10",
|
|
682
685
|
title: `${r.value}%`
|
|
683
686
|
}, [
|
|
684
|
-
l("div",
|
|
687
|
+
l("div", Hs, w(r.value) + "%", 1),
|
|
685
688
|
l("div", {
|
|
686
689
|
class: "relative h-4 overflow-hidden rounded-md bg-cyan-main transition-all duration-500",
|
|
687
690
|
style: Ve(`width: ${r.value}%`)
|
|
688
691
|
}, [
|
|
689
|
-
l("div",
|
|
692
|
+
l("div", Ws, w(r.value) + "%", 1)
|
|
690
693
|
], 4)
|
|
691
|
-
], 8,
|
|
692
|
-
l("div",
|
|
694
|
+
], 8, Ks),
|
|
695
|
+
l("div", Gs, [
|
|
693
696
|
(f(!0), g(D, null, K(t.value, (b) => (f(), g("div", {
|
|
694
697
|
key: b.name,
|
|
695
698
|
class: "flex-auto"
|
|
696
699
|
}, [
|
|
697
|
-
l("div",
|
|
700
|
+
l("div", Js, [
|
|
698
701
|
B(u.$slots, "name", { item: b })
|
|
699
702
|
]),
|
|
700
703
|
l("div", null, w(b.value), 1)
|
|
701
704
|
]))), 128))
|
|
702
705
|
])
|
|
703
706
|
]),
|
|
704
|
-
l("div",
|
|
707
|
+
l("div", Xs, [
|
|
705
708
|
(f(!0), g(D, null, K(o.value, (b) => (f(), g("div", {
|
|
706
709
|
key: b.name,
|
|
707
710
|
class: "flex justify-between items-center"
|
|
708
711
|
}, [
|
|
709
|
-
l("div",
|
|
712
|
+
l("div", qs, [
|
|
710
713
|
B(u.$slots, "name", { item: b })
|
|
711
714
|
]),
|
|
712
|
-
l("div",
|
|
715
|
+
l("div", Ys, w(b.value), 1)
|
|
713
716
|
]))), 128))
|
|
714
717
|
]),
|
|
715
718
|
l("div", null, [
|
|
@@ -721,15 +724,15 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
721
724
|
]);
|
|
722
725
|
};
|
|
723
726
|
}
|
|
724
|
-
}),
|
|
727
|
+
}), Zs = { class: "flex items-center cursor-pointer" }, Qs = /* @__PURE__ */ L({
|
|
725
728
|
__name: "VFile",
|
|
726
729
|
emits: ["change"],
|
|
727
|
-
setup(e, { emit:
|
|
728
|
-
const
|
|
730
|
+
setup(e, { emit: s }) {
|
|
731
|
+
const a = s, n = async (t) => {
|
|
729
732
|
const o = t.target;
|
|
730
|
-
o.files &&
|
|
733
|
+
o.files && a("change", o.files);
|
|
731
734
|
};
|
|
732
|
-
return (t, o) => (f(), g("label",
|
|
735
|
+
return (t, o) => (f(), g("label", Zs, [
|
|
733
736
|
l("input", X({
|
|
734
737
|
type: "file",
|
|
735
738
|
class: "hidden"
|
|
@@ -737,11 +740,11 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
737
740
|
B(t.$slots, "default")
|
|
738
741
|
]));
|
|
739
742
|
}
|
|
740
|
-
}), el = { class: "md:flex" }, tl = { class: "text-gray-dark-25 dark:text-gray-light-10 first-letter:uppercase min-w-19" },
|
|
743
|
+
}), el = { class: "md:flex" }, tl = { class: "text-gray-dark-25 dark:text-gray-light-10 first-letter:uppercase min-w-19" }, Xr = /* @__PURE__ */ L({
|
|
741
744
|
__name: "BlockUpdate",
|
|
742
745
|
emits: ["update"],
|
|
743
|
-
setup(e, { emit:
|
|
744
|
-
const
|
|
746
|
+
setup(e, { emit: s }) {
|
|
747
|
+
const a = s, n = Ut({ firmware: null, littlefs: null }), t = (d) => d ? Array.from(d).map((u) => `${u.name} (${tt(u.size)})`).join("") : "", o = (d, u) => {
|
|
745
748
|
const i = new FormData();
|
|
746
749
|
for (let c = 0; c < d.length; c++) {
|
|
747
750
|
const m = d.item(c);
|
|
@@ -752,7 +755,7 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
752
755
|
}, r = (d, u) => {
|
|
753
756
|
if (!u) return;
|
|
754
757
|
const i = o(u, d);
|
|
755
|
-
i &&
|
|
758
|
+
i && a("update", d, i);
|
|
756
759
|
};
|
|
757
760
|
return (d, u) => {
|
|
758
761
|
const i = j;
|
|
@@ -761,7 +764,7 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
761
764
|
key: m,
|
|
762
765
|
class: "mb-4 flex items-center"
|
|
763
766
|
}, [
|
|
764
|
-
v(
|
|
767
|
+
v(Qs, {
|
|
765
768
|
accept: ".bin",
|
|
766
769
|
onChange: (p) => n[m] = p,
|
|
767
770
|
class: "flex-auto"
|
|
@@ -791,16 +794,16 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
791
794
|
]);
|
|
792
795
|
};
|
|
793
796
|
}
|
|
794
|
-
}),
|
|
797
|
+
}), al = { class: "flex items-center gap-1.5" }, qr = /* @__PURE__ */ L({
|
|
795
798
|
__name: "BlockBreadcrumb",
|
|
796
799
|
props: {
|
|
797
800
|
items: { default: () => [] }
|
|
798
801
|
},
|
|
799
802
|
emits: ["click"],
|
|
800
|
-
setup(e, { emit:
|
|
801
|
-
const
|
|
803
|
+
setup(e, { emit: s }) {
|
|
804
|
+
const a = s, n = (t) => a("click", t);
|
|
802
805
|
return (t, o) => (f(), g("nav", null, [
|
|
803
|
-
l("ol",
|
|
806
|
+
l("ol", al, [
|
|
804
807
|
(f(!0), g(D, null, K(e.items, (r, d) => (f(), g("li", {
|
|
805
808
|
key: d,
|
|
806
809
|
class: M(["inline-flex items-center gap-1.5 text-sm text-gray-dark-25 dark:text-gray-main", r.path ? "" : "text-gray-dark-30 dark:text-white/90"])
|
|
@@ -826,7 +829,7 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
826
829
|
])
|
|
827
830
|
]));
|
|
828
831
|
}
|
|
829
|
-
}),
|
|
832
|
+
}), sl = ["onClick"], ll = {
|
|
830
833
|
key: 0,
|
|
831
834
|
class: "me-1"
|
|
832
835
|
}, nl = { class: "dark:text-gray-light-10" }, ol = { class: "flex items-center z-10" }, il = {
|
|
@@ -840,11 +843,11 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
840
843
|
onlyValue: { type: Boolean, default: !1 }
|
|
841
844
|
},
|
|
842
845
|
emits: ["click"],
|
|
843
|
-
setup(e, { emit:
|
|
844
|
-
const
|
|
846
|
+
setup(e, { emit: s }) {
|
|
847
|
+
const a = s, n = () => "before:absolute before:w-full before:h-8 before:t-0 before:left-0 before:border-b before:border-gray-light-10 dark:before:border-gray-dark-30/50 hover:before:bg-gray-main/10", t = F({}), { text: o, copy: r, copied: d, isSupported: u } = Aa(), i = (b) => {
|
|
845
848
|
t.value[b] = !t.value[b];
|
|
846
849
|
}, c = (b) => typeof b == "object", m = (b) => `${e.path ? e.path + "." : ""}${b}`, p = (b, h) => {
|
|
847
|
-
|
|
850
|
+
a("click", { key: b, path: m(b), isObject: h });
|
|
848
851
|
};
|
|
849
852
|
return (b, h) => (f(), g("ul", null, [
|
|
850
853
|
(f(!0), g(D, null, K(e.items, (k, _) => (f(), g("li", {
|
|
@@ -901,16 +904,16 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
901
904
|
}, 8, ["title", "onClick"])
|
|
902
905
|
])
|
|
903
906
|
], 64)) : T("", !0)
|
|
904
|
-
], 10,
|
|
907
|
+
], 10, sl),
|
|
905
908
|
c(k) ? (f(), g("div", il, [
|
|
906
909
|
ot(v(wt, {
|
|
907
910
|
class: "flex-auto",
|
|
908
911
|
path: m(_),
|
|
909
912
|
items: k,
|
|
910
913
|
onlyValue: e.onlyValue,
|
|
911
|
-
onClick: h[0] || (h[0] = (N) =>
|
|
914
|
+
onClick: h[0] || (h[0] = (N) => a("click", N))
|
|
912
915
|
}, null, 8, ["path", "items", "onlyValue"]), [
|
|
913
|
-
[
|
|
916
|
+
[ma, t.value[_]]
|
|
914
917
|
])
|
|
915
918
|
])) : (f(), g(D, { key: 1 }, [
|
|
916
919
|
h[2] || (h[2] = l("div", { class: "flex-auto gap-3" }, null, -1)),
|
|
@@ -945,27 +948,27 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
945
948
|
iconLabel: {}
|
|
946
949
|
},
|
|
947
950
|
emits: ["icon"],
|
|
948
|
-
setup(e, { emit:
|
|
949
|
-
const
|
|
951
|
+
setup(e, { emit: s }) {
|
|
952
|
+
const a = e, n = s, { labelClass: t, borderClass: o, contentClass: r, slotClass: d } = ka(a, "wrapper");
|
|
950
953
|
return (u, i) => (f(), g("div", dl, [
|
|
951
954
|
l("div", {
|
|
952
955
|
class: M(["glass-inset relative flex w-full items-center rounded-md transition focus-within:border-cyan-main/60", [H(d), H(o)]])
|
|
953
956
|
}, [
|
|
954
957
|
l("span", {
|
|
955
958
|
class: M(["absolute -translate-y-1/2 rounded transition-all", H(t)])
|
|
956
|
-
}, w(
|
|
959
|
+
}, w(a.label), 3),
|
|
957
960
|
l("div", {
|
|
958
961
|
class: M(H(r))
|
|
959
962
|
}, [
|
|
960
963
|
B(u.$slots, "default")
|
|
961
964
|
], 2),
|
|
962
|
-
|
|
965
|
+
a.hideIcon ? T("", !0) : (f(), g("button", {
|
|
963
966
|
key: 0,
|
|
964
967
|
type: "button",
|
|
965
|
-
disabled:
|
|
966
|
-
"aria-label":
|
|
967
|
-
title:
|
|
968
|
-
class: M(["flex h-full flex-[0_0_50px] items-center justify-center rounded-r-md border-l border-gray-light-10 text-gray-main transition hover:text-cyan-main disabled:pointer-events-none disabled:opacity-40 dark:border-white/10", { "cursor-pointer": !
|
|
968
|
+
disabled: a.disabled || a.iconDisabled,
|
|
969
|
+
"aria-label": a.iconLabel || void 0,
|
|
970
|
+
title: a.iconLabel || void 0,
|
|
971
|
+
class: M(["flex h-full flex-[0_0_50px] items-center justify-center rounded-r-md border-l border-gray-light-10 text-gray-main transition hover:text-cyan-main disabled:pointer-events-none disabled:opacity-40 dark:border-white/10", { "cursor-pointer": !a.disabled && !a.iconDisabled }]),
|
|
969
972
|
onClick: i[0] || (i[0] = (c) => n("icon", c))
|
|
970
973
|
}, [
|
|
971
974
|
B(u.$slots, "icon", {}, () => [
|
|
@@ -981,12 +984,12 @@ const Rr = /* @__PURE__ */ ys(qs, [["render", Qs]]), ea = { class: "mb-4 flex fl
|
|
|
981
984
|
}), ul = /* @__PURE__ */ L({
|
|
982
985
|
__name: "BlockDataHelp",
|
|
983
986
|
emits: ["close"],
|
|
984
|
-
setup(e, { emit:
|
|
985
|
-
const
|
|
987
|
+
setup(e, { emit: s }) {
|
|
988
|
+
const a = s;
|
|
986
989
|
return (n, t) => (f(), O(Se, {
|
|
987
990
|
title: "Как настроить блок",
|
|
988
991
|
size: "md",
|
|
989
|
-
onClose: t[0] || (t[0] = (o) =>
|
|
992
|
+
onClose: t[0] || (t[0] = (o) => a("close"))
|
|
990
993
|
}, {
|
|
991
994
|
default: x(() => [...t[1] || (t[1] = [
|
|
992
995
|
l("div", { class: "flex flex-col gap-4 text-sm leading-relaxed text-gray-dark-25 dark:text-gray-light-10" }, [
|
|
@@ -1103,8 +1106,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1103
1106
|
showReset: { type: Boolean, default: !0 }
|
|
1104
1107
|
},
|
|
1105
1108
|
emits: ["update:modelValue", "update:format", "pick", "reset"],
|
|
1106
|
-
setup(e, { emit:
|
|
1107
|
-
const
|
|
1109
|
+
setup(e, { emit: s }) {
|
|
1110
|
+
const a = s;
|
|
1108
1111
|
return (n, t) => (f(), g("div", ml, [
|
|
1109
1112
|
l("div", fl, [
|
|
1110
1113
|
l("div", {
|
|
@@ -1116,7 +1119,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1116
1119
|
"hide-message": "",
|
|
1117
1120
|
"model-value": e.modelValue,
|
|
1118
1121
|
label: e.field.label,
|
|
1119
|
-
"onUpdate:modelValue": t[0] || (t[0] = (o) =>
|
|
1122
|
+
"onUpdate:modelValue": t[0] || (t[0] = (o) => a("update:modelValue", o))
|
|
1120
1123
|
}, null, 8, ["model-value", "label"])) : (f(), O(le, {
|
|
1121
1124
|
key: 1,
|
|
1122
1125
|
active: "",
|
|
@@ -1124,8 +1127,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1124
1127
|
"model-value": e.modelValue,
|
|
1125
1128
|
label: e.field.label,
|
|
1126
1129
|
placeholder: e.placeholder,
|
|
1127
|
-
"onUpdate:modelValue": t[1] || (t[1] = (o) =>
|
|
1128
|
-
onOnIcon: t[2] || (t[2] = (o) =>
|
|
1130
|
+
"onUpdate:modelValue": t[1] || (t[1] = (o) => a("update:modelValue", o)),
|
|
1131
|
+
onOnIcon: t[2] || (t[2] = (o) => a("pick"))
|
|
1129
1132
|
}, {
|
|
1130
1133
|
icon: x(() => [
|
|
1131
1134
|
v(I, {
|
|
@@ -1142,7 +1145,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1142
1145
|
"model-value": e.formatValue,
|
|
1143
1146
|
label: "Формат",
|
|
1144
1147
|
placeholder: e.placeholderFormat,
|
|
1145
|
-
"onUpdate:modelValue": t[3] || (t[3] = (o) =>
|
|
1148
|
+
"onUpdate:modelValue": t[3] || (t[3] = (o) => a("update:format", o))
|
|
1146
1149
|
}, null, 8, ["model-value", "placeholder"])) : T("", !0)
|
|
1147
1150
|
], 2),
|
|
1148
1151
|
e.showReset ? (f(), O(j, {
|
|
@@ -1151,7 +1154,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1151
1154
|
class: "shrink-0",
|
|
1152
1155
|
"aria-label": "Сбросить поле",
|
|
1153
1156
|
title: "Сбросить поле",
|
|
1154
|
-
onClick: t[4] || (t[4] = (o) =>
|
|
1157
|
+
onClick: t[4] || (t[4] = (o) => a("reset"))
|
|
1155
1158
|
}, {
|
|
1156
1159
|
default: x(() => [
|
|
1157
1160
|
v(I, {
|
|
@@ -1179,8 +1182,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1179
1182
|
hideIcon: { type: Boolean, default: !1 }
|
|
1180
1183
|
},
|
|
1181
1184
|
emits: ["change", "icon"],
|
|
1182
|
-
setup(e, { emit:
|
|
1183
|
-
const
|
|
1185
|
+
setup(e, { emit: s }) {
|
|
1186
|
+
const a = s, n = ["a", "b", "c", "d"], t = (i) => {
|
|
1184
1187
|
var c;
|
|
1185
1188
|
return ((c = e.params) == null ? void 0 : c[i]) ?? n[i] ?? "";
|
|
1186
1189
|
}, o = F(e.value || ""), r = (i) => {
|
|
@@ -1191,8 +1194,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1191
1194
|
}
|
|
1192
1195
|
}, d = $t((i) => {
|
|
1193
1196
|
const c = i.target;
|
|
1194
|
-
r(c.value) &&
|
|
1195
|
-
}, 500), u = (i) =>
|
|
1197
|
+
r(c.value) && a("change", c.value);
|
|
1198
|
+
}, 500), u = (i) => a("icon", i);
|
|
1196
1199
|
return _e(
|
|
1197
1200
|
() => e.value,
|
|
1198
1201
|
(i) => {
|
|
@@ -1305,12 +1308,12 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1305
1308
|
{ value: "left", name: "Слева" },
|
|
1306
1309
|
{ value: "right", name: "Справа" }
|
|
1307
1310
|
], vt = (e) => {
|
|
1308
|
-
const
|
|
1311
|
+
const s = { ..._t, ...e };
|
|
1309
1312
|
return [
|
|
1310
|
-
xl[
|
|
1311
|
-
kl[
|
|
1312
|
-
$l[
|
|
1313
|
-
wl[
|
|
1313
|
+
xl[s.size],
|
|
1314
|
+
kl[s.color],
|
|
1315
|
+
$l[s.weight],
|
|
1316
|
+
wl[s.align]
|
|
1314
1317
|
].join(" ");
|
|
1315
1318
|
}, Gt = /^[A-Za-z_$][\w$]*(\.[\w$]+)+$/, Cl = /^[A-Za-z_$][\w$]*$/, _l = /* @__PURE__ */ new Set([
|
|
1316
1319
|
"await",
|
|
@@ -1353,50 +1356,50 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1353
1356
|
"while",
|
|
1354
1357
|
"with",
|
|
1355
1358
|
"yield"
|
|
1356
|
-
]), pt = 10, We = 4, ht = ["a", "b", "c", "d"], Sl = (e) => Cl.test(e) && !_l.has(e), Jt = (e,
|
|
1359
|
+
]), pt = 10, We = 4, ht = ["a", "b", "c", "d"], Sl = (e) => Cl.test(e) && !_l.has(e), Jt = (e, s) => {
|
|
1357
1360
|
try {
|
|
1358
|
-
const
|
|
1359
|
-
return new Function(...
|
|
1361
|
+
const a = Object.keys(s).filter(Sl), n = a.map((o) => s[o]);
|
|
1362
|
+
return new Function(...a, `"use strict"; return (${e});`)(...n);
|
|
1360
1363
|
} catch {
|
|
1361
1364
|
return;
|
|
1362
1365
|
}
|
|
1363
|
-
},
|
|
1366
|
+
}, at = (e, s, a) => {
|
|
1364
1367
|
if (!e.trim()) return;
|
|
1365
|
-
const n = Jt(e,
|
|
1366
|
-
return n === void 0 && Gt.test(e) ?
|
|
1368
|
+
const n = Jt(e, s);
|
|
1369
|
+
return n === void 0 && Gt.test(e) ? a.get(e) : n;
|
|
1367
1370
|
}, Tl = (e) => e == null || e === "" ? "—" : typeof e == "boolean" ? e ? "да" : "нет" : typeof e == "number" ? Number.isInteger(e) ? String(e) : String(Number(e.toFixed(2))) : String(e), zl = (e) => e.replace(/<br\s*\/?>/gi, `
|
|
1368
|
-
`),
|
|
1371
|
+
`), st = (e) => typeof e == "number" && !Number.isFinite(e) ? void 0 : e, Al = (e, s) => {
|
|
1369
1372
|
if (!(e == null || e === "")) {
|
|
1370
|
-
if (
|
|
1371
|
-
const
|
|
1372
|
-
return Number.isFinite(
|
|
1373
|
+
if (s === "number") {
|
|
1374
|
+
const a = typeof e == "number" ? e : Number.parseFloat(String(e));
|
|
1375
|
+
return Number.isFinite(a) ? a : void 0;
|
|
1373
1376
|
}
|
|
1374
|
-
return
|
|
1377
|
+
return s === "boolean" ? typeof e == "boolean" ? e : e === 1 || e === "1" || e === "true" : String(e);
|
|
1375
1378
|
}
|
|
1376
1379
|
}, Qe = (e) => {
|
|
1377
|
-
const
|
|
1378
|
-
return Number.isFinite(
|
|
1380
|
+
const s = typeof e == "number" ? e : Number.parseFloat(String(e));
|
|
1381
|
+
return Number.isFinite(s) ? s : 0;
|
|
1379
1382
|
}, St = (e) => ({
|
|
1380
1383
|
...e.helpers,
|
|
1381
1384
|
...e.roots,
|
|
1382
1385
|
get: e.get,
|
|
1383
|
-
num: (
|
|
1384
|
-
scale: (
|
|
1385
|
-
round: (
|
|
1386
|
-
clamp: (
|
|
1387
|
-
}),
|
|
1388
|
-
const n = { ...St(
|
|
1389
|
-
return e.slice(0, We).map((t) => at(
|
|
1390
|
-
}, El = (e,
|
|
1391
|
-
const t = { ...St(
|
|
1392
|
-
|
|
1393
|
-
t[ht[u]] = at(
|
|
1386
|
+
num: (s) => Qe(s),
|
|
1387
|
+
scale: (s, a = 1, n = 0) => Qe(s) * a + n,
|
|
1388
|
+
round: (s, a = 0) => Number(Qe(s).toFixed(a)),
|
|
1389
|
+
clamp: (s, a, n) => Math.min(n, Math.max(a, Qe(s)))
|
|
1390
|
+
}), Yr = (e, s, a) => {
|
|
1391
|
+
const n = { ...St(s), ...a };
|
|
1392
|
+
return e.slice(0, We).map((t) => st(at(t, n, s)));
|
|
1393
|
+
}, El = (e, s, a, n) => {
|
|
1394
|
+
const t = { ...St(a), ...n };
|
|
1395
|
+
s.slice(0, We).forEach((d, u) => {
|
|
1396
|
+
t[ht[u]] = st(at(d, t, a));
|
|
1394
1397
|
});
|
|
1395
|
-
let o = at(
|
|
1398
|
+
let o = st(at(e.value, t, a));
|
|
1396
1399
|
o === void 0 && (o = t.a), t.v = o, t.a = t.a ?? o;
|
|
1397
1400
|
let r;
|
|
1398
1401
|
if (e.format.trim() && o !== void 0 && o !== null) {
|
|
1399
|
-
const d = at(
|
|
1402
|
+
const d = st(at(e.format, t, a));
|
|
1400
1403
|
d != null && (r = String(d));
|
|
1401
1404
|
}
|
|
1402
1405
|
return {
|
|
@@ -1406,27 +1409,27 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1406
1409
|
raw: o,
|
|
1407
1410
|
style: { ..._t, ...e.style }
|
|
1408
1411
|
};
|
|
1409
|
-
}, Vl = (e,
|
|
1412
|
+
}, Vl = (e, s, a, n) => {
|
|
1410
1413
|
var r, d, u, i;
|
|
1411
1414
|
const t = /* @__PURE__ */ new Set([
|
|
1412
1415
|
...Object.keys(e.metrics ?? {}),
|
|
1413
|
-
...Object.keys(
|
|
1416
|
+
...Object.keys(s.metrics ?? {})
|
|
1414
1417
|
]), o = {};
|
|
1415
1418
|
for (const c of t) {
|
|
1416
|
-
const m = ((r =
|
|
1417
|
-
o[c] = m.slice(0, pt).map((b) => El(b, p,
|
|
1419
|
+
const m = ((r = s.metrics) == null ? void 0 : r[c]) ?? ((d = e.metrics) == null ? void 0 : d[c]) ?? [], p = ((u = s.metricArgs) == null ? void 0 : u[c]) ?? ((i = e.metricArgs) == null ? void 0 : i[c]) ?? [];
|
|
1420
|
+
o[c] = m.slice(0, pt).map((b) => El(b, p, a, n));
|
|
1418
1421
|
}
|
|
1419
1422
|
return o;
|
|
1420
|
-
}, Tt = (e,
|
|
1421
|
-
const n = St(
|
|
1423
|
+
}, Tt = (e, s, a) => {
|
|
1424
|
+
const n = St(a), t = {};
|
|
1422
1425
|
for (const o of e.fields) {
|
|
1423
|
-
const r =
|
|
1426
|
+
const r = s.bindings[o.key], d = typeof r == "string" ? r : r == null ? void 0 : r.expr, u = typeof r == "object" ? r == null ? void 0 : r.fallback : void 0;
|
|
1424
1427
|
let i;
|
|
1425
|
-
o.formatFor && (n.v = t[o.formatFor]), d && (i = Jt(d, n), i === void 0 && Gt.test(d) && (i =
|
|
1428
|
+
o.formatFor && (n.v = t[o.formatFor]), d && (i = Jt(d, n), i === void 0 && Gt.test(d) && (i = a.get(d)));
|
|
1426
1429
|
const c = Al(i ?? u ?? o.default, o.type);
|
|
1427
1430
|
t[o.key] = c, n[o.key] = c;
|
|
1428
1431
|
}
|
|
1429
|
-
return t.metrics = Vl(e,
|
|
1432
|
+
return t.metrics = Vl(e, s, a, t), t;
|
|
1430
1433
|
}, Bl = { class: "glass-inset rounded-xl p-3" }, Il = { class: "flex items-center gap-2" }, Ll = { class: "min-w-0 flex-1" }, Ml = { class: "mt-2 flex flex-col gap-2" }, Ol = /* @__PURE__ */ L({
|
|
1431
1434
|
__name: "BlockMetricCard",
|
|
1432
1435
|
props: {
|
|
@@ -1435,8 +1438,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1435
1438
|
args: {}
|
|
1436
1439
|
},
|
|
1437
1440
|
emits: ["remove", "open-style", "toggle-field", "dragstart", "dragend", "change", "hover"],
|
|
1438
|
-
setup(e, { emit:
|
|
1439
|
-
const
|
|
1441
|
+
setup(e, { emit: s }) {
|
|
1442
|
+
const a = s, n = (t, o) => a("hover", t, o);
|
|
1440
1443
|
return (t, o) => (f(), g("div", Bl, [
|
|
1441
1444
|
l("div", Il, [
|
|
1442
1445
|
l("div", Ll, [
|
|
@@ -1445,7 +1448,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1445
1448
|
"hide-message": "",
|
|
1446
1449
|
"model-value": e.metric.label,
|
|
1447
1450
|
label: "Название",
|
|
1448
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) =>
|
|
1451
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => a("change", { label: r }))
|
|
1449
1452
|
}, null, 8, ["model-value"])
|
|
1450
1453
|
]),
|
|
1451
1454
|
v(j, {
|
|
@@ -1453,7 +1456,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1453
1456
|
size: "sm",
|
|
1454
1457
|
"aria-label": "Стиль показателя",
|
|
1455
1458
|
title: "Стиль показателя",
|
|
1456
|
-
onClick: o[1] || (o[1] = (r) =>
|
|
1459
|
+
onClick: o[1] || (o[1] = (r) => a("open-style"))
|
|
1457
1460
|
}, {
|
|
1458
1461
|
default: x(() => [
|
|
1459
1462
|
v(I, {
|
|
@@ -1468,7 +1471,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1468
1471
|
size: "sm",
|
|
1469
1472
|
"aria-label": "Удалить показатель",
|
|
1470
1473
|
title: "Удалить показатель",
|
|
1471
|
-
onClick: o[2] || (o[2] = (r) =>
|
|
1474
|
+
onClick: o[2] || (o[2] = (r) => a("remove"))
|
|
1472
1475
|
}, {
|
|
1473
1476
|
default: x(() => [
|
|
1474
1477
|
v(I, {
|
|
@@ -1482,8 +1485,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1482
1485
|
draggable: "true",
|
|
1483
1486
|
class: "-me-1 grid size-8 shrink-0 cursor-grab place-items-center rounded-md text-gray-main transition hover:bg-white/5 hover:text-white active:cursor-grabbing",
|
|
1484
1487
|
title: "Перетащить показатель",
|
|
1485
|
-
onDragstart: o[3] || (o[3] = (r) =>
|
|
1486
|
-
onDragend: o[4] || (o[4] = (r) =>
|
|
1488
|
+
onDragstart: o[3] || (o[3] = (r) => a("dragstart", r, e.index)),
|
|
1489
|
+
onDragend: o[4] || (o[4] = (r) => a("dragend"))
|
|
1487
1490
|
}, [
|
|
1488
1491
|
v(I, {
|
|
1489
1492
|
name: "grip",
|
|
@@ -1497,8 +1500,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1497
1500
|
args: e.args,
|
|
1498
1501
|
params: [...H(ht)],
|
|
1499
1502
|
label: "Значение",
|
|
1500
|
-
onIcon: o[5] || (o[5] = (r) =>
|
|
1501
|
-
onChange: o[6] || (o[6] = (r) =>
|
|
1503
|
+
onIcon: o[5] || (o[5] = (r) => a("toggle-field", "value")),
|
|
1504
|
+
onChange: o[6] || (o[6] = (r) => a("change", { value: r })),
|
|
1502
1505
|
onHover: n
|
|
1503
1506
|
}, null, 8, ["value", "args", "params"]),
|
|
1504
1507
|
v(He, {
|
|
@@ -1507,8 +1510,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1507
1510
|
params: [...H(ht)],
|
|
1508
1511
|
prefix: ["v"],
|
|
1509
1512
|
label: "Формат",
|
|
1510
|
-
onIcon: o[7] || (o[7] = (r) =>
|
|
1511
|
-
onChange: o[8] || (o[8] = (r) =>
|
|
1513
|
+
onIcon: o[7] || (o[7] = (r) => a("toggle-field", "format")),
|
|
1514
|
+
onChange: o[8] || (o[8] = (r) => a("change", { format: r })),
|
|
1512
1515
|
onHover: n
|
|
1513
1516
|
}, null, 8, ["value", "args", "params"])
|
|
1514
1517
|
])
|
|
@@ -1522,17 +1525,17 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1522
1525
|
preview: { default: "" }
|
|
1523
1526
|
},
|
|
1524
1527
|
emits: ["close", "update"],
|
|
1525
|
-
setup(e, { emit:
|
|
1526
|
-
const
|
|
1528
|
+
setup(e, { emit: s }) {
|
|
1529
|
+
const a = s, n = C(() => ({ ..._t, ...e.style })), t = (h, k) => {
|
|
1527
1530
|
var _;
|
|
1528
1531
|
return ((_ = h.find((N) => N.value === k)) == null ? void 0 : _.name) ?? "";
|
|
1529
1532
|
}, o = C(() => t(Bt, n.value.size)), r = C(() => t(It, n.value.color)), d = C(() => t(Lt, n.value.weight)), u = C(() => t(Mt, n.value.align)), i = (h) => {
|
|
1530
|
-
|
|
1533
|
+
a("update", { ...n.value, ...h });
|
|
1531
1534
|
}, c = (h) => i({ size: h.value }), m = (h) => i({ color: h.value }), p = (h) => i({ weight: h.value }), b = (h) => i({ align: h.value });
|
|
1532
1535
|
return (h, k) => (f(), O(Se, {
|
|
1533
1536
|
title: "Стиль показателя",
|
|
1534
1537
|
size: "md",
|
|
1535
|
-
onClose: k[1] || (k[1] = (_) =>
|
|
1538
|
+
onClose: k[1] || (k[1] = (_) => a("close"))
|
|
1536
1539
|
}, {
|
|
1537
1540
|
default: x(() => [
|
|
1538
1541
|
l("div", Fl, [
|
|
@@ -1575,7 +1578,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1575
1578
|
l("div", Pl, [
|
|
1576
1579
|
v(j, {
|
|
1577
1580
|
color: "blue",
|
|
1578
|
-
onClick: k[0] || (k[0] = (_) =>
|
|
1581
|
+
onClick: k[0] || (k[0] = (_) => a("close"))
|
|
1579
1582
|
}, {
|
|
1580
1583
|
default: x(() => [...k[4] || (k[4] = [
|
|
1581
1584
|
E("Готово", -1)
|
|
@@ -1597,7 +1600,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1597
1600
|
}, Ql = {
|
|
1598
1601
|
key: 0,
|
|
1599
1602
|
class: "flex gap-2 flex-wrap flex-auto px-2 py-1"
|
|
1600
|
-
}, en = { class: "relative group" }, tn = { class: "select-none" },
|
|
1603
|
+
}, en = { class: "relative group" }, tn = { class: "select-none" }, an = ["onClick"], sn = {
|
|
1601
1604
|
key: 2,
|
|
1602
1605
|
class: "flex flex-col gap-2"
|
|
1603
1606
|
}, ln = { class: "flex items-center justify-between gap-2" }, nn = {
|
|
@@ -1617,8 +1620,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1617
1620
|
context: {}
|
|
1618
1621
|
},
|
|
1619
1622
|
emits: ["close", "update:config"],
|
|
1620
|
-
setup(e, { emit:
|
|
1621
|
-
const
|
|
1623
|
+
setup(e, { emit: s }) {
|
|
1624
|
+
const a = s, n = [
|
|
1622
1625
|
{ key: "general", label: "Основное", icon: "settings" },
|
|
1623
1626
|
{ key: "solar", label: "Солнце", icon: "sun" },
|
|
1624
1627
|
{ key: "grid", label: "Сеть", icon: "plug" },
|
|
@@ -1707,13 +1710,13 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1707
1710
|
}, R = (y) => `v + ' ${y.unit ?? "ед."}'`, me = () => {
|
|
1708
1711
|
N && (clearTimeout(N), N = null);
|
|
1709
1712
|
const y = o(r.value), $ = JSON.stringify(y);
|
|
1710
|
-
$ !== _ && (_ = $,
|
|
1713
|
+
$ !== _ && (_ = $, a("update:config", y));
|
|
1711
1714
|
};
|
|
1712
1715
|
_e(r, () => {
|
|
1713
1716
|
N && clearTimeout(N), N = setTimeout(me, 500);
|
|
1714
1717
|
}, { deep: !0 });
|
|
1715
1718
|
const Pe = () => {
|
|
1716
|
-
me(),
|
|
1719
|
+
me(), a("close");
|
|
1717
1720
|
}, Ue = (y) => {
|
|
1718
1721
|
c.value = { kind: "field", key: y }, i.value = !0;
|
|
1719
1722
|
}, qe = (y) => {
|
|
@@ -1768,20 +1771,20 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1768
1771
|
if (h.value = null, k.value = null, $ === null || $ === y) return;
|
|
1769
1772
|
const S = [...oe.value], [P] = S.splice($, 1);
|
|
1770
1773
|
S.splice(y, 0, P), r.value.metrics = { ...r.value.metrics ?? {}, [d.value]: S };
|
|
1771
|
-
},
|
|
1774
|
+
}, ia = () => {
|
|
1772
1775
|
h.value = null, k.value = null;
|
|
1773
|
-
},
|
|
1776
|
+
}, ra = (y) => {
|
|
1774
1777
|
var $, S;
|
|
1775
1778
|
return ((S = ($ = xe.value[d.value]) == null ? void 0 : $.find((P) => P.id === y.id)) == null ? void 0 : S.value) ?? "";
|
|
1776
1779
|
}, Ze = (y, $) => {
|
|
1777
1780
|
Object.assign(y, $);
|
|
1778
|
-
},
|
|
1781
|
+
}, da = () => {
|
|
1779
1782
|
const y = JSON.stringify(r.value, null, 2), $ = new Blob([y], { type: "application/json" }), S = URL.createObjectURL($), P = document.createElement("a");
|
|
1780
1783
|
P.href = S, P.download = `${e.definition.type}.json`, P.click(), URL.revokeObjectURL(S);
|
|
1781
|
-
},
|
|
1784
|
+
}, ca = () => {
|
|
1782
1785
|
var y;
|
|
1783
1786
|
return (y = b.value) == null ? void 0 : y.click();
|
|
1784
|
-
}, Et = (y) => typeof y == "object" && y !== null && !Array.isArray(y),
|
|
1787
|
+
}, Et = (y) => typeof y == "object" && y !== null && !Array.isArray(y), ua = async (y) => {
|
|
1785
1788
|
var P;
|
|
1786
1789
|
const $ = y.target, S = (P = $.files) == null ? void 0 : P[0];
|
|
1787
1790
|
if (S)
|
|
@@ -1825,7 +1828,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1825
1828
|
size: "sm",
|
|
1826
1829
|
"aria-label": "Импорт",
|
|
1827
1830
|
title: "Импорт",
|
|
1828
|
-
onClick:
|
|
1831
|
+
onClick: ca
|
|
1829
1832
|
}, {
|
|
1830
1833
|
default: x(() => [
|
|
1831
1834
|
v(I, {
|
|
@@ -1840,7 +1843,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1840
1843
|
size: "sm",
|
|
1841
1844
|
"aria-label": "Экспорт",
|
|
1842
1845
|
title: "Экспорт",
|
|
1843
|
-
onClick:
|
|
1846
|
+
onClick: da
|
|
1844
1847
|
}, {
|
|
1845
1848
|
default: x(() => [
|
|
1846
1849
|
v(I, {
|
|
@@ -1859,7 +1862,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1859
1862
|
type: "file",
|
|
1860
1863
|
accept: "application/json,.json",
|
|
1861
1864
|
class: "hidden",
|
|
1862
|
-
onChange:
|
|
1865
|
+
onChange: ua
|
|
1863
1866
|
}, null, 544),
|
|
1864
1867
|
l("div", Hl, [
|
|
1865
1868
|
l("nav", Wl, [
|
|
@@ -1933,14 +1936,14 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1933
1936
|
name: "close",
|
|
1934
1937
|
class: "size-5"
|
|
1935
1938
|
})
|
|
1936
|
-
], 8,
|
|
1939
|
+
], 8, an)) : T("", !0)
|
|
1937
1940
|
]))), 128))
|
|
1938
1941
|
])) : T("", !0)
|
|
1939
1942
|
]),
|
|
1940
1943
|
_: 1
|
|
1941
1944
|
}, 8, ["active", "icon-disabled"])
|
|
1942
1945
|
])) : T("", !0),
|
|
1943
|
-
V.value ? (f(), g("section",
|
|
1946
|
+
V.value ? (f(), g("section", sn, [
|
|
1944
1947
|
l("div", ln, [
|
|
1945
1948
|
$[8] || ($[8] = l("h4", { class: "text-sm font-semibold" }, "Показатели", -1)),
|
|
1946
1949
|
v(j, {
|
|
@@ -1975,7 +1978,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1975
1978
|
onOpenStyle: (ie) => ue(S),
|
|
1976
1979
|
onToggleField: (ie) => ce(S, ie),
|
|
1977
1980
|
onDragstart: Z,
|
|
1978
|
-
onDragend:
|
|
1981
|
+
onDragend: ia,
|
|
1979
1982
|
onChange: (ie) => Ze(S, ie),
|
|
1980
1983
|
onHover: we
|
|
1981
1984
|
}, null, 8, ["metric", "index", "args", "onRemove", "onOpenStyle", "onToggleField", "onChange"])
|
|
@@ -1997,7 +2000,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
1997
2000
|
key: 0,
|
|
1998
2001
|
label: m.value.label,
|
|
1999
2002
|
style: Ve(m.value.style),
|
|
2000
|
-
preview:
|
|
2003
|
+
preview: ra(m.value),
|
|
2001
2004
|
onUpdate: ee,
|
|
2002
2005
|
onClose: $[5] || ($[5] = (S) => m.value = null)
|
|
2003
2006
|
}, null, 8, ["label", "style", "preview"])) : T("", !0),
|
|
@@ -2034,9 +2037,9 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2034
2037
|
removable: { type: Boolean, default: !1 }
|
|
2035
2038
|
},
|
|
2036
2039
|
emits: ["update:config", "remove"],
|
|
2037
|
-
setup(e, { emit:
|
|
2038
|
-
const
|
|
2039
|
-
|
|
2040
|
+
setup(e, { emit: s }) {
|
|
2041
|
+
const a = s, n = F(!1), t = C(() => e.definition.component), o = C(() => Tt(e.definition, e.config, e.context)), r = (d) => {
|
|
2042
|
+
a("update:config", d);
|
|
2040
2043
|
};
|
|
2041
2044
|
return (d, u) => (f(), g(D, null, [
|
|
2042
2045
|
(f(), O(Ee(t.value), X(o.value, {
|
|
@@ -2050,7 +2053,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2050
2053
|
context: e.context,
|
|
2051
2054
|
removable: e.removable,
|
|
2052
2055
|
onClose: u[1] || (u[1] = (i) => n.value = !1),
|
|
2053
|
-
onRemove: u[2] || (u[2] = (i) =>
|
|
2056
|
+
onRemove: u[2] || (u[2] = (i) => a("remove")),
|
|
2054
2057
|
"onUpdate:config": r
|
|
2055
2058
|
}, null, 8, ["definition", "config", "context", "removable"])) : T("", !0)
|
|
2056
2059
|
], 64));
|
|
@@ -2061,18 +2064,18 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2061
2064
|
}, hn = {
|
|
2062
2065
|
key: 0,
|
|
2063
2066
|
class: "py-8 text-center text-sm text-gray-dark-25 dark:text-gray-main"
|
|
2064
|
-
},
|
|
2067
|
+
}, Zr = /* @__PURE__ */ L({
|
|
2065
2068
|
__name: "BlockPicker",
|
|
2066
2069
|
props: {
|
|
2067
2070
|
definitions: {}
|
|
2068
2071
|
},
|
|
2069
2072
|
emits: ["close", "select"],
|
|
2070
|
-
setup(e, { emit:
|
|
2071
|
-
const
|
|
2073
|
+
setup(e, { emit: s }) {
|
|
2074
|
+
const a = s;
|
|
2072
2075
|
return (n, t) => (f(), O(Se, {
|
|
2073
2076
|
title: "Добавить блок",
|
|
2074
2077
|
size: "md",
|
|
2075
|
-
onClose: t[0] || (t[0] = (o) =>
|
|
2078
|
+
onClose: t[0] || (t[0] = (o) => a("close"))
|
|
2076
2079
|
}, {
|
|
2077
2080
|
default: x(() => [
|
|
2078
2081
|
l("div", mn, [
|
|
@@ -2080,7 +2083,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2080
2083
|
key: o.type,
|
|
2081
2084
|
type: "button",
|
|
2082
2085
|
class: "glass-inset flex flex-col items-start rounded-xl p-4 text-left transition hover:border-cyan-main/30 hover:bg-cyan-main/5",
|
|
2083
|
-
onClick: (r) =>
|
|
2086
|
+
onClick: (r) => a("select", o.type)
|
|
2084
2087
|
}, [
|
|
2085
2088
|
l("span", gn, [
|
|
2086
2089
|
v(I, {
|
|
@@ -2097,7 +2100,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2097
2100
|
_: 1
|
|
2098
2101
|
}));
|
|
2099
2102
|
}
|
|
2100
|
-
}),
|
|
2103
|
+
}), Qr = /* @__PURE__ */ L({
|
|
2101
2104
|
__name: "BlockView",
|
|
2102
2105
|
props: {
|
|
2103
2106
|
definition: {},
|
|
@@ -2107,15 +2110,15 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2107
2110
|
removable: { type: Boolean, default: !1 }
|
|
2108
2111
|
},
|
|
2109
2112
|
emits: ["update:config", "remove"],
|
|
2110
|
-
setup(e, { emit:
|
|
2111
|
-
const
|
|
2113
|
+
setup(e, { emit: s }) {
|
|
2114
|
+
const a = s, n = C(() => e.provider.createContext(e.source));
|
|
2112
2115
|
return (t, o) => (f(), O(un, {
|
|
2113
2116
|
definition: e.definition,
|
|
2114
2117
|
config: e.config,
|
|
2115
2118
|
context: n.value,
|
|
2116
2119
|
removable: e.removable,
|
|
2117
|
-
"onUpdate:config": o[0] || (o[0] = (r) =>
|
|
2118
|
-
onRemove: o[1] || (o[1] = (r) =>
|
|
2120
|
+
"onUpdate:config": o[0] || (o[0] = (r) => a("update:config", r)),
|
|
2121
|
+
onRemove: o[1] || (o[1] = (r) => a("remove"))
|
|
2119
2122
|
}, null, 8, ["definition", "config", "context", "removable"]));
|
|
2120
2123
|
}
|
|
2121
2124
|
}), yn = /* @__PURE__ */ L({
|
|
@@ -2129,8 +2132,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2129
2132
|
removable: { type: Boolean, default: !1 }
|
|
2130
2133
|
},
|
|
2131
2134
|
emits: ["update:config"],
|
|
2132
|
-
setup(e, { emit:
|
|
2133
|
-
const
|
|
2135
|
+
setup(e, { emit: s }) {
|
|
2136
|
+
const a = s, n = F(!1), t = C(() => e.definition.component);
|
|
2134
2137
|
return (o, r) => (f(), g(D, null, [
|
|
2135
2138
|
(f(), O(Ee(t.value), X(o.$attrs, {
|
|
2136
2139
|
editable: e.editable,
|
|
@@ -2143,18 +2146,18 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2143
2146
|
context: e.context,
|
|
2144
2147
|
removable: e.removable,
|
|
2145
2148
|
onClose: r[1] || (r[1] = (d) => n.value = !1),
|
|
2146
|
-
"onUpdate:config": r[2] || (r[2] = (d) =>
|
|
2149
|
+
"onUpdate:config": r[2] || (r[2] = (d) => a("update:config", d))
|
|
2147
2150
|
}, null, 8, ["definition", "config", "context", "removable"])) : T("", !0)
|
|
2148
2151
|
], 64));
|
|
2149
2152
|
}
|
|
2150
2153
|
}), bn = { class: "flex flex-col gap-3" }, xn = {
|
|
2151
2154
|
key: 0,
|
|
2152
2155
|
class: "text-sm text-red-500"
|
|
2153
|
-
}, kn = { class: "flex justify-end gap-2" },
|
|
2156
|
+
}, kn = { class: "flex justify-end gap-2" }, ed = /* @__PURE__ */ L({
|
|
2154
2157
|
__name: "BlockImport",
|
|
2155
2158
|
emits: ["close", "import"],
|
|
2156
|
-
setup(e, { emit:
|
|
2157
|
-
const
|
|
2159
|
+
setup(e, { emit: s }) {
|
|
2160
|
+
const a = s, n = F(""), t = F(""), o = (u) => typeof u == "object" && u !== null && !Array.isArray(u), r = () => {
|
|
2158
2161
|
try {
|
|
2159
2162
|
const u = JSON.parse(n.value);
|
|
2160
2163
|
return !o(u) || typeof u.type != "string" || !o(u.bindings) ? (t.value = "Нужен JSON блока с полями type и bindings.", null) : {
|
|
@@ -2172,12 +2175,12 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2172
2175
|
}, d = () => {
|
|
2173
2176
|
t.value = "";
|
|
2174
2177
|
const u = r();
|
|
2175
|
-
u && (
|
|
2178
|
+
u && (a("import", u), a("close"));
|
|
2176
2179
|
};
|
|
2177
2180
|
return (u, i) => (f(), O(Se, {
|
|
2178
2181
|
title: "Импорт блока",
|
|
2179
2182
|
size: "md",
|
|
2180
|
-
onClose: i[2] || (i[2] = (c) =>
|
|
2183
|
+
onClose: i[2] || (i[2] = (c) => a("close"))
|
|
2181
2184
|
}, {
|
|
2182
2185
|
default: x(() => [
|
|
2183
2186
|
l("div", bn, [
|
|
@@ -2195,7 +2198,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2195
2198
|
v(j, {
|
|
2196
2199
|
color: "gray",
|
|
2197
2200
|
variant: "outline",
|
|
2198
|
-
onClick: i[1] || (i[1] = (c) =>
|
|
2201
|
+
onClick: i[1] || (i[1] = (c) => a("close"))
|
|
2199
2202
|
}, {
|
|
2200
2203
|
default: x(() => [...i[3] || (i[3] = [
|
|
2201
2204
|
E("Отмена", -1)
|
|
@@ -2248,12 +2251,12 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2248
2251
|
as: { default: "div" }
|
|
2249
2252
|
},
|
|
2250
2253
|
setup(e) {
|
|
2251
|
-
const
|
|
2254
|
+
const s = {
|
|
2252
2255
|
glass: "glass-inset",
|
|
2253
2256
|
solid: "border border-gray-light-10/70 bg-white/80 dark:border-white/10 dark:bg-night-light-10/80",
|
|
2254
2257
|
outline: "border border-gray-light-10/70 bg-transparent dark:border-white/10",
|
|
2255
2258
|
ghost: "bg-transparent"
|
|
2256
|
-
},
|
|
2259
|
+
}, a = {
|
|
2257
2260
|
none: "",
|
|
2258
2261
|
lg: "p-5 sm:p-6"
|
|
2259
2262
|
}, n = {
|
|
@@ -2265,8 +2268,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2265
2268
|
accent: "!border-violet-main/30 !bg-violet-main/10 text-violet-main"
|
|
2266
2269
|
}, t = C(() => [
|
|
2267
2270
|
"relative rounded-xl transition-all duration-300",
|
|
2268
|
-
|
|
2269
|
-
|
|
2271
|
+
s[e.variant],
|
|
2272
|
+
a[e.padding],
|
|
2270
2273
|
n[e.tone],
|
|
2271
2274
|
e.hover ? "hover:border-cyan-main/25 hover:shadow-cyan-glow" : ""
|
|
2272
2275
|
]);
|
|
@@ -2300,7 +2303,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2300
2303
|
}), En = { class: "flex items-center gap-2" }, Vn = ["viewBox"], Bn = ["id", "d"], In = ["d"], Ln = ["d"], Mn = ["d"], On = ["dur", "begin", "keyPoints"], Fn = ["href"], Dn = ["dur", "begin"], jn = { class: "relative grid h-full grid-cols-2 grid-rows-3 gap-3 lg:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)]" }, Nn = { class: "flex items-center gap-2" }, Rn = { class: "min-w-0 flex-1 truncate text-sm font-semibold" }, Pn = {
|
|
2301
2304
|
key: 0,
|
|
2302
2305
|
class: "flex flex-col gap-2"
|
|
2303
|
-
}, Un = { class: "block text-xs text-gray-dark-25 dark:text-gray-main" }, Kn = { class: "col-span-2 row-start-2 grid place-items-center lg:col-span-1 lg:col-start-2 lg:row-span-3 lg:self-center" }, Hn = { class: "relative" }, Wn = { class: "flex items-center gap-2" }, Gn = { class: "grid size-9 place-items-center rounded-lg bg-cyan-main/15" }, Jn = { class: "text-sm font-semibold text-gray-dark-30 dark:text-white" }, Xn = { class: "mt-3" }, qn = { class: "whitespace-pre-line text-2xl font-bold text-gray-dark-40 dark:text-white" }, Yn = { class: "ml-1 text-xs text-gray-dark-25 dark:text-gray-main" }, Zn = { class: "mt-3 grid grid-cols-2 gap-2" }, Qn = { class: "min-w-0 truncate text-xs text-gray-dark-25 dark:text-gray-main" }, eo = { class: "glass-inset mt-2 rounded-md px-3 py-2" }, to = { class: "flex items-center justify-between gap-2 text-xs" },
|
|
2306
|
+
}, Un = { class: "block text-xs text-gray-dark-25 dark:text-gray-main" }, Kn = { class: "col-span-2 row-start-2 grid place-items-center lg:col-span-1 lg:col-start-2 lg:row-span-3 lg:self-center" }, Hn = { class: "relative" }, Wn = { class: "flex items-center gap-2" }, Gn = { class: "grid size-9 place-items-center rounded-lg bg-cyan-main/15" }, Jn = { class: "text-sm font-semibold text-gray-dark-30 dark:text-white" }, Xn = { class: "mt-3" }, qn = { class: "whitespace-pre-line text-2xl font-bold text-gray-dark-40 dark:text-white" }, Yn = { class: "ml-1 text-xs text-gray-dark-25 dark:text-gray-main" }, Zn = { class: "mt-3 grid grid-cols-2 gap-2" }, Qn = { class: "min-w-0 truncate text-xs text-gray-dark-25 dark:text-gray-main" }, eo = { class: "glass-inset mt-2 rounded-md px-3 py-2" }, to = { class: "flex items-center justify-between gap-2 text-xs" }, ao = { class: "whitespace-pre-line font-semibold" }, so = { class: "mt-2 h-1.5 overflow-hidden rounded-full bg-gray-light-10/70 dark:bg-white/10" }, lo = /* @__PURE__ */ L({
|
|
2304
2307
|
__name: "EnergyFlowCard",
|
|
2305
2308
|
props: {
|
|
2306
2309
|
title: { default: "Сетевой инвертор" },
|
|
@@ -2324,8 +2327,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2324
2327
|
metrics: { default: () => ({}) }
|
|
2325
2328
|
},
|
|
2326
2329
|
emits: ["refresh", "settings"],
|
|
2327
|
-
setup(e, { emit:
|
|
2328
|
-
const
|
|
2330
|
+
setup(e, { emit: s }) {
|
|
2331
|
+
const a = s, n = (G) => Math.min(4.2, Math.max(1.6, 4.2 - Math.abs(G) * 0.55)), t = (G) => G.replace(/<br\s*\/?>/gi, `
|
|
2329
2332
|
`), o = (G) => `${Math.abs(G).toFixed(1)} кВт`, r = (G) => {
|
|
2330
2333
|
var J;
|
|
2331
2334
|
return ((J = e.metrics) == null ? void 0 : J[G]) ?? [];
|
|
@@ -2336,7 +2339,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2336
2339
|
}, u = (G, J) => {
|
|
2337
2340
|
const A = typeof G == "number" ? G : Number.parseFloat(String(G));
|
|
2338
2341
|
return Number.isFinite(A) ? A : J;
|
|
2339
|
-
}, i = C(() => u(d("solar", "solar-power", 0), e.solarPower)), c = C(() => u(d("grid", "grid-power", 0), e.gridPower)), m = C(() => u(d("battery", "battery-power", 0), e.batteryPower)), p = C(() => u(d("battery", "battery-soc", 1), e.batterySoc)), b = C(() => u(d("house", "house-load", 0), e.loadPower)), h = C(() => i.value > 0 && e.solarFlow !== "idle"), k = C(() => e.solarFlow === "reverse"), _ = C(() => c.value !== 0 || ["import", "export"].includes(e.gridFlow)), N = C(() => m.value !== 0 || ["charge", "discharge"].includes(e.batteryFlow)), q = C(() => e.gridFlow === "export" ? !0 : e.gridFlow === "import" ? !1 : c.value < 0), xe = C(() => e.batteryFlow === "charge" ? !0 : e.batteryFlow === "discharge" ? !1 : m.value > 0), Te = C(() => b.value > 0 && e.houseFlow !== "idle"), z = C(() => e.houseFlow !== "reverse"), V = C(() => o(b.value)), W = C(() => r("inverter")), ne =
|
|
2342
|
+
}, i = C(() => u(d("solar", "solar-power", 0), e.solarPower)), c = C(() => u(d("grid", "grid-power", 0), e.gridPower)), m = C(() => u(d("battery", "battery-power", 0), e.batteryPower)), p = C(() => u(d("battery", "battery-soc", 1), e.batterySoc)), b = C(() => u(d("house", "house-load", 0), e.loadPower)), h = C(() => i.value > 0 && e.solarFlow !== "idle"), k = C(() => e.solarFlow === "reverse"), _ = C(() => c.value !== 0 || ["import", "export"].includes(e.gridFlow)), N = C(() => m.value !== 0 || ["charge", "discharge"].includes(e.batteryFlow)), q = C(() => e.gridFlow === "export" ? !0 : e.gridFlow === "import" ? !1 : c.value < 0), xe = C(() => e.batteryFlow === "charge" ? !0 : e.batteryFlow === "discharge" ? !1 : m.value > 0), Te = C(() => b.value > 0 && e.houseFlow !== "idle"), z = C(() => e.houseFlow !== "reverse"), V = C(() => o(b.value)), W = C(() => r("inverter")), ne = Ea(), Ne = C(() => ne.value === "reduce"), ke = C(() => [
|
|
2340
2343
|
{ id: "solar", active: h.value, reverse: k.value, speed: n(i.value) },
|
|
2341
2344
|
{ id: "battery", active: N.value, reverse: xe.value, speed: n(m.value) },
|
|
2342
2345
|
{ id: "grid", active: _.value, reverse: q.value, speed: n(c.value) },
|
|
@@ -2445,7 +2448,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2445
2448
|
size: "sm",
|
|
2446
2449
|
"aria-label": "Настроить блок",
|
|
2447
2450
|
title: "Настроить блок",
|
|
2448
|
-
onClick: J[0] || (J[0] = (A) =>
|
|
2451
|
+
onClick: J[0] || (J[0] = (A) => a("settings"))
|
|
2449
2452
|
}, {
|
|
2450
2453
|
default: x(() => [
|
|
2451
2454
|
v(I, {
|
|
@@ -2460,7 +2463,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2460
2463
|
size: "sm",
|
|
2461
2464
|
"aria-label": "Обновить данные",
|
|
2462
2465
|
title: "Обновить данные",
|
|
2463
|
-
onClick: J[1] || (J[1] = (A) =>
|
|
2466
|
+
onClick: J[1] || (J[1] = (A) => a("refresh"))
|
|
2464
2467
|
}, {
|
|
2465
2468
|
default: x(() => [
|
|
2466
2469
|
v(I, {
|
|
@@ -2609,9 +2612,9 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2609
2612
|
l("div", eo, [
|
|
2610
2613
|
l("div", to, [
|
|
2611
2614
|
J[2] || (J[2] = l("span", { class: "text-gray-dark-25 dark:text-gray-main" }, "Батарея", -1)),
|
|
2612
|
-
l("span",
|
|
2615
|
+
l("span", ao, w(p.value) + " %", 1)
|
|
2613
2616
|
]),
|
|
2614
|
-
l("div",
|
|
2617
|
+
l("div", so, [
|
|
2615
2618
|
l("div", {
|
|
2616
2619
|
class: "h-full rounded-full bg-emerald-500 transition-all duration-500",
|
|
2617
2620
|
style: Ve({ width: `${p.value}%` })
|
|
@@ -2678,7 +2681,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2678
2681
|
{ key: "inverterTitle", plain: !0, block: "inverter", label: "Заголовок", type: "string", default: "Инвертор" },
|
|
2679
2682
|
{ key: "loadLabel", plain: !0, block: "inverter", label: "Подпись нагрузки", type: "string", default: "нагрузка" }
|
|
2680
2683
|
]
|
|
2681
|
-
},
|
|
2684
|
+
}, td = /* @__PURE__ */ L({
|
|
2682
2685
|
inheritAttrs: !1,
|
|
2683
2686
|
__name: "EnergyFlowBlock",
|
|
2684
2687
|
props: {
|
|
@@ -2688,8 +2691,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2688
2691
|
removable: { type: Boolean, default: !1 }
|
|
2689
2692
|
},
|
|
2690
2693
|
emits: ["update:config"],
|
|
2691
|
-
setup(e, { emit:
|
|
2692
|
-
const
|
|
2694
|
+
setup(e, { emit: s }) {
|
|
2695
|
+
const a = s;
|
|
2693
2696
|
return (n, t) => (f(), O(yn, X({
|
|
2694
2697
|
definition: H(io),
|
|
2695
2698
|
config: e.config,
|
|
@@ -2697,17 +2700,17 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2697
2700
|
editable: e.editable,
|
|
2698
2701
|
removable: e.removable
|
|
2699
2702
|
}, n.$attrs, {
|
|
2700
|
-
"onUpdate:config": t[0] || (t[0] = (o) =>
|
|
2703
|
+
"onUpdate:config": t[0] || (t[0] = (o) => a("update:config", o))
|
|
2701
2704
|
}), null, 16, ["definition", "config", "context", "editable", "removable"]));
|
|
2702
2705
|
}
|
|
2703
|
-
}), ro = (e,
|
|
2706
|
+
}), ro = (e, s, a, n) => ({
|
|
2704
2707
|
kind: e,
|
|
2705
|
-
roots:
|
|
2706
|
-
helpers:
|
|
2708
|
+
roots: s,
|
|
2709
|
+
helpers: a,
|
|
2707
2710
|
meta: n,
|
|
2708
|
-
get: (t) =>
|
|
2711
|
+
get: (t) => Ma(t, s)
|
|
2709
2712
|
}), co = (e) => {
|
|
2710
|
-
const
|
|
2713
|
+
const s = ro("device", {
|
|
2711
2714
|
device: e.device ?? {},
|
|
2712
2715
|
ports: e.ports ?? {},
|
|
2713
2716
|
dallas: e.dallas ?? {},
|
|
@@ -2715,18 +2718,18 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2715
2718
|
slots: e.slots ?? {},
|
|
2716
2719
|
discovery: e.discovery ?? {}
|
|
2717
2720
|
});
|
|
2718
|
-
return
|
|
2719
|
-
port: (
|
|
2720
|
-
dallas: (
|
|
2721
|
-
},
|
|
2721
|
+
return s.helpers = {
|
|
2722
|
+
port: (a) => s.get(`ports.${String(a)}`),
|
|
2723
|
+
dallas: (a) => s.get(`dallas.${String(a)}`)
|
|
2724
|
+
}, s;
|
|
2722
2725
|
}, uo = {
|
|
2723
2726
|
id: "vuesp.device",
|
|
2724
2727
|
label: "Устройство vuesp",
|
|
2725
2728
|
createContext: (e) => co(e)
|
|
2726
2729
|
}, mo = "/tmp/blocks.json", Ot = "/fs", fo = 1, go = 8, qt = 10, Yt = 4, nt = 512, vo = 64, po = 8192, Zt = ["vuesp.blocks", "vuesp.block.energy"], ho = ["xs", "sm", "base", "lg", "xl"], yo = ["default", "muted", "primary", "success", "warning", "danger"], bo = ["normal", "medium", "semibold"], xo = ["left", "right"], pe = (e) => typeof e == "object" && e !== null && !Array.isArray(e), Qt = (e) => {
|
|
2727
2730
|
if (!pe(e)) return;
|
|
2728
|
-
const
|
|
2729
|
-
return typeof e.size == "string" && ho.includes(e.size) && (
|
|
2731
|
+
const s = {};
|
|
2732
|
+
return typeof e.size == "string" && ho.includes(e.size) && (s.size = e.size), typeof e.color == "string" && yo.includes(e.color) && (s.color = e.color), typeof e.weight == "string" && bo.includes(e.weight) && (s.weight = e.weight), typeof e.align == "string" && xo.includes(e.align) && (s.align = e.align), Object.keys(s).length ? s : void 0;
|
|
2730
2733
|
}, ko = (e) => !pe(e) || typeof e.i != "string" || !e.i ? null : {
|
|
2731
2734
|
id: e.i,
|
|
2732
2735
|
label: typeof e.l == "string" ? e.l : "",
|
|
@@ -2735,31 +2738,31 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2735
2738
|
style: Qt(e.s)
|
|
2736
2739
|
}, $o = (e) => {
|
|
2737
2740
|
if (!pe(e)) return;
|
|
2738
|
-
const
|
|
2739
|
-
for (const [
|
|
2740
|
-
Array.isArray(n) && (a
|
|
2741
|
-
return Object.keys(
|
|
2741
|
+
const s = {};
|
|
2742
|
+
for (const [a, n] of Object.entries(e))
|
|
2743
|
+
Array.isArray(n) && (s[a] = n.filter((t) => typeof t == "string").slice(0, Yt));
|
|
2744
|
+
return Object.keys(s).length ? s : void 0;
|
|
2742
2745
|
}, wo = (e) => {
|
|
2743
2746
|
if (!pe(e)) return;
|
|
2744
|
-
const
|
|
2745
|
-
for (const [
|
|
2747
|
+
const s = {};
|
|
2748
|
+
for (const [a, n] of Object.entries(e)) {
|
|
2746
2749
|
if (!Array.isArray(n)) continue;
|
|
2747
2750
|
const t = n.map(ko).filter((o) => o !== null).slice(0, qt);
|
|
2748
|
-
(t.length || Array.isArray(n)) && (a
|
|
2751
|
+
(t.length || Array.isArray(n)) && (s[a] = t);
|
|
2749
2752
|
}
|
|
2750
|
-
return Object.keys(
|
|
2753
|
+
return Object.keys(s).length ? s : void 0;
|
|
2751
2754
|
}, Co = (e) => {
|
|
2752
2755
|
if (!e) return;
|
|
2753
|
-
const
|
|
2754
|
-
for (const [
|
|
2755
|
-
n && (a
|
|
2756
|
+
const s = {};
|
|
2757
|
+
for (const [a, n] of Object.entries(e))
|
|
2758
|
+
n && (s[a] = n.map((t) => ({
|
|
2756
2759
|
i: t.id,
|
|
2757
2760
|
l: t.label,
|
|
2758
2761
|
v: t.value,
|
|
2759
2762
|
f: t.format,
|
|
2760
2763
|
...t.style && Object.keys(t.style).length ? { s: t.style } : {}
|
|
2761
2764
|
})));
|
|
2762
|
-
return Object.keys(
|
|
2765
|
+
return Object.keys(s).length ? s : void 0;
|
|
2763
2766
|
}, _o = (e) => ({
|
|
2764
2767
|
id: e.id.slice(0, 64),
|
|
2765
2768
|
label: String(e.label ?? "").slice(0, vo),
|
|
@@ -2768,54 +2771,54 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2768
2771
|
...e.style ? { style: Qt(e.style) } : {}
|
|
2769
2772
|
}), So = (e) => {
|
|
2770
2773
|
if (!e) return;
|
|
2771
|
-
const
|
|
2772
|
-
for (const [
|
|
2773
|
-
Array.isArray(n) && (a
|
|
2774
|
-
return Object.keys(
|
|
2774
|
+
const s = {};
|
|
2775
|
+
for (const [a, n] of Object.entries(e))
|
|
2776
|
+
Array.isArray(n) && (s[a] = n.slice(0, Yt).map((t) => String(t).slice(0, nt)));
|
|
2777
|
+
return Object.keys(s).length ? s : void 0;
|
|
2775
2778
|
}, To = (e) => {
|
|
2776
2779
|
if (!e) return;
|
|
2777
|
-
const
|
|
2778
|
-
for (const [
|
|
2779
|
-
n && (a
|
|
2780
|
-
return Object.keys(
|
|
2781
|
-
},
|
|
2782
|
-
id: String(
|
|
2783
|
-
type: String(
|
|
2784
|
-
provider:
|
|
2785
|
-
bindings: pe(
|
|
2786
|
-
units: pe(
|
|
2787
|
-
metricArgs: $o(
|
|
2788
|
-
metrics: wo(
|
|
2789
|
-
})).filter((
|
|
2780
|
+
const s = {};
|
|
2781
|
+
for (const [a, n] of Object.entries(e))
|
|
2782
|
+
n && (s[a] = n.slice(0, qt).map(_o));
|
|
2783
|
+
return Object.keys(s).length ? s : void 0;
|
|
2784
|
+
}, ea = (e) => Array.isArray(e) ? e : pe(e) && typeof e.type == "string" && pe(e.bindings) ? [e] : !pe(e) || !Array.isArray(e.b) ? [] : e.b.filter(pe).map((s) => ({
|
|
2785
|
+
id: String(s.i ?? ""),
|
|
2786
|
+
type: String(s.t ?? ""),
|
|
2787
|
+
provider: s.p ? String(s.p) : void 0,
|
|
2788
|
+
bindings: pe(s.m) ? s.m : {},
|
|
2789
|
+
units: pe(s.u) ? s.u : void 0,
|
|
2790
|
+
metricArgs: $o(s.A),
|
|
2791
|
+
metrics: wo(s.g)
|
|
2792
|
+
})).filter((s) => s.id && s.type), ta = (e) => ({
|
|
2790
2793
|
v: fo,
|
|
2791
|
-
b: e.map((
|
|
2792
|
-
i:
|
|
2793
|
-
t:
|
|
2794
|
-
...
|
|
2795
|
-
m:
|
|
2796
|
-
...
|
|
2797
|
-
...
|
|
2798
|
-
...
|
|
2794
|
+
b: e.map((s) => ({
|
|
2795
|
+
i: s.id,
|
|
2796
|
+
t: s.type,
|
|
2797
|
+
...s.provider ? { p: s.provider } : {},
|
|
2798
|
+
m: s.bindings,
|
|
2799
|
+
...s.units && Object.keys(s.units).length ? { u: s.units } : {},
|
|
2800
|
+
...s.metricArgs && Object.keys(s.metricArgs).length ? { A: s.metricArgs } : {},
|
|
2801
|
+
...s.metrics && Object.keys(s.metrics).length ? { g: Co(s.metrics) } : {}
|
|
2799
2802
|
}))
|
|
2800
2803
|
}), zo = (e) => {
|
|
2801
|
-
const
|
|
2802
|
-
...
|
|
2804
|
+
const s = e.slice(0, go).map((a) => ({
|
|
2805
|
+
...a,
|
|
2803
2806
|
bindings: Object.fromEntries(
|
|
2804
|
-
Object.entries(
|
|
2807
|
+
Object.entries(a.bindings).map(([n, t]) => [n, typeof t == "string" ? t.slice(0, nt) : t]).filter(([, n]) => n !== "")
|
|
2805
2808
|
),
|
|
2806
|
-
metricArgs: So(
|
|
2807
|
-
metrics: To(
|
|
2809
|
+
metricArgs: So(a.metricArgs),
|
|
2810
|
+
metrics: To(a.metrics)
|
|
2808
2811
|
}));
|
|
2809
|
-
for (;
|
|
2810
|
-
|
|
2811
|
-
return
|
|
2812
|
+
for (; s.length > 0 && JSON.stringify(ta(s)).length > po; )
|
|
2813
|
+
s.pop();
|
|
2814
|
+
return s;
|
|
2812
2815
|
}, Ao = () => {
|
|
2813
2816
|
for (const e of Zt)
|
|
2814
2817
|
try {
|
|
2815
|
-
const
|
|
2816
|
-
if (!
|
|
2817
|
-
const
|
|
2818
|
-
if (
|
|
2818
|
+
const s = localStorage.getItem(e);
|
|
2819
|
+
if (!s) continue;
|
|
2820
|
+
const a = ea(JSON.parse(s));
|
|
2821
|
+
if (a.length) return a;
|
|
2819
2822
|
} catch {
|
|
2820
2823
|
}
|
|
2821
2824
|
return [];
|
|
@@ -2826,9 +2829,9 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2826
2829
|
} catch {
|
|
2827
2830
|
}
|
|
2828
2831
|
}, Vo = (e = mo) => {
|
|
2829
|
-
const
|
|
2832
|
+
const s = async (n) => {
|
|
2830
2833
|
const t = new FormData();
|
|
2831
|
-
t.append("file[0]", new Blob([JSON.stringify(
|
|
2834
|
+
t.append("file[0]", new Blob([JSON.stringify(ta(zo(n)))], { type: "application/json" }), e);
|
|
2832
2835
|
const o = await fetch(Ot, { method: "POST", body: t });
|
|
2833
2836
|
if (!o.ok) throw new Error(`Не удалось сохранить настройки блока: HTTP ${o.status}`);
|
|
2834
2837
|
};
|
|
@@ -2836,7 +2839,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2836
2839
|
try {
|
|
2837
2840
|
const t = await fetch(`${Ot}?file=${e}`);
|
|
2838
2841
|
if (t.ok) {
|
|
2839
|
-
const o =
|
|
2842
|
+
const o = ea(await t.json());
|
|
2840
2843
|
if (o.length) return o;
|
|
2841
2844
|
}
|
|
2842
2845
|
} catch {
|
|
@@ -2844,23 +2847,23 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2844
2847
|
const n = Ao();
|
|
2845
2848
|
if (n.length)
|
|
2846
2849
|
try {
|
|
2847
|
-
await
|
|
2850
|
+
await s(n), Eo();
|
|
2848
2851
|
} catch {
|
|
2849
2852
|
}
|
|
2850
2853
|
return n;
|
|
2851
|
-
}, write:
|
|
2852
|
-
},
|
|
2853
|
-
const n =
|
|
2854
|
+
}, write: s };
|
|
2855
|
+
}, ad = Vo(), sd = (e, s, a = {}) => {
|
|
2856
|
+
const n = a.provider ?? uo, t = a.id ?? e.defaultId ?? e.type, o = F({
|
|
2854
2857
|
id: t,
|
|
2855
2858
|
type: e.type,
|
|
2856
2859
|
provider: n.id,
|
|
2857
2860
|
title: e.name,
|
|
2858
2861
|
bindings: { ...e.defaults ?? {} },
|
|
2859
2862
|
units: {}
|
|
2860
|
-
}), r = C(() => n.createContext(
|
|
2861
|
-
if (
|
|
2863
|
+
}), r = C(() => n.createContext(fa(s))), d = C(() => Tt(e, o.value, r.value)), u = C(() => ({ ...o.value.units ?? {} })), i = async () => {
|
|
2864
|
+
if (a.storage)
|
|
2862
2865
|
try {
|
|
2863
|
-
const p = (await
|
|
2866
|
+
const p = (await a.storage.read()).find((b) => b.id === t);
|
|
2864
2867
|
if (!p) return;
|
|
2865
2868
|
o.value = {
|
|
2866
2869
|
...o.value,
|
|
@@ -2873,10 +2876,10 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2873
2876
|
} catch {
|
|
2874
2877
|
}
|
|
2875
2878
|
}, c = async (m) => {
|
|
2876
|
-
if (o.value = m, !!
|
|
2879
|
+
if (o.value = m, !!a.storage)
|
|
2877
2880
|
try {
|
|
2878
|
-
const p = await
|
|
2879
|
-
await
|
|
2881
|
+
const p = await a.storage.read();
|
|
2882
|
+
await a.storage.write([...p.filter((b) => b.id !== m.id), m]);
|
|
2880
2883
|
} catch {
|
|
2881
2884
|
}
|
|
2882
2885
|
};
|
|
@@ -2910,8 +2913,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2910
2913
|
meta: {}
|
|
2911
2914
|
},
|
|
2912
2915
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
2913
|
-
setup(e, { emit:
|
|
2914
|
-
const
|
|
2916
|
+
setup(e, { emit: s }) {
|
|
2917
|
+
const a = e, n = s, t = F(!1), o = C(() => ["button", "dimmer"].includes(a.type || "") && a.value ? "text-amber-500" : "text-gray-main dark:text-gray-light-10"), r = (m) => n("edit", m), d = (m) => n("clone", m), u = () => t.value = !0, i = (m) => n("open", m), c = (m) => {
|
|
2915
2918
|
t.value = !1, n("close", m);
|
|
2916
2919
|
};
|
|
2917
2920
|
return (m, p) => (f(), g("div", {
|
|
@@ -2922,55 +2925,63 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2922
2925
|
l("div", {
|
|
2923
2926
|
class: M([o.value, "size-8 animate-shake"])
|
|
2924
2927
|
}, [
|
|
2925
|
-
B(m.$slots, "icon", se(
|
|
2928
|
+
B(m.$slots, "icon", ae(se(a)))
|
|
2926
2929
|
], 2),
|
|
2927
|
-
B(m.$slots, "header", se(
|
|
2930
|
+
B(m.$slots, "header", ae(se(a)))
|
|
2928
2931
|
]),
|
|
2929
2932
|
l("div", null, [
|
|
2930
|
-
B(m.$slots, "body", se(
|
|
2933
|
+
B(m.$slots, "body", ae(se(a)), () => [
|
|
2931
2934
|
l("h6", Io, [
|
|
2932
|
-
B(m.$slots, "name", se(
|
|
2933
|
-
E(w(
|
|
2935
|
+
B(m.$slots, "name", ae(se(a)), () => [
|
|
2936
|
+
E(w(a.name), 1)
|
|
2934
2937
|
])
|
|
2935
2938
|
]),
|
|
2936
2939
|
l("div", Lo, [
|
|
2937
|
-
B(m.$slots, "value", se(
|
|
2938
|
-
E(w(
|
|
2940
|
+
B(m.$slots, "value", ae(se(a)), () => [
|
|
2941
|
+
E(w(a.valueTo || a.value), 1)
|
|
2939
2942
|
])
|
|
2940
2943
|
])
|
|
2941
2944
|
])
|
|
2942
2945
|
]),
|
|
2943
|
-
|
|
2944
|
-
B(m.$slots, "icon", se(
|
|
2946
|
+
a.icon ? (f(), g("div", Mo, [
|
|
2947
|
+
B(m.$slots, "icon", ae(se(a)))
|
|
2945
2948
|
])) : T("", !0),
|
|
2946
2949
|
t.value ? (f(), O(Se, {
|
|
2947
2950
|
key: 1,
|
|
2948
|
-
size:
|
|
2951
|
+
size: a.size || "sm",
|
|
2949
2952
|
title: e.name,
|
|
2950
2953
|
onClose: c,
|
|
2951
2954
|
onOpen: i
|
|
2952
2955
|
}, {
|
|
2953
2956
|
"header-btn": x(() => [
|
|
2954
2957
|
v(j, {
|
|
2958
|
+
class: "size-8",
|
|
2955
2959
|
color: "transparent",
|
|
2960
|
+
variant: "soft",
|
|
2961
|
+
invert: "",
|
|
2962
|
+
size: "none",
|
|
2956
2963
|
onClick: r
|
|
2957
2964
|
}, {
|
|
2958
2965
|
default: x(() => [
|
|
2959
2966
|
v(I, {
|
|
2960
2967
|
name: "more",
|
|
2961
|
-
class: "size-
|
|
2968
|
+
class: "size-4"
|
|
2962
2969
|
})
|
|
2963
2970
|
]),
|
|
2964
2971
|
_: 1
|
|
2965
2972
|
}),
|
|
2966
2973
|
v(j, {
|
|
2974
|
+
class: "size-8",
|
|
2967
2975
|
color: "transparent",
|
|
2976
|
+
variant: "soft",
|
|
2977
|
+
invert: "",
|
|
2978
|
+
size: "none",
|
|
2968
2979
|
onClick: d
|
|
2969
2980
|
}, {
|
|
2970
2981
|
default: x(() => [
|
|
2971
2982
|
v(I, {
|
|
2972
2983
|
name: "copy",
|
|
2973
|
-
class: "size-4
|
|
2984
|
+
class: "size-4"
|
|
2974
2985
|
})
|
|
2975
2986
|
]),
|
|
2976
2987
|
_: 1
|
|
@@ -2980,14 +2991,14 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2980
2991
|
l("div", Oo, [
|
|
2981
2992
|
l("div", Fo, [
|
|
2982
2993
|
l("h3", Do, [
|
|
2983
|
-
B(m.$slots, "dialog-name", se(
|
|
2984
|
-
E(w(
|
|
2994
|
+
B(m.$slots, "dialog-name", ae(se(a)), () => [
|
|
2995
|
+
E(w(a.name), 1)
|
|
2985
2996
|
])
|
|
2986
2997
|
]),
|
|
2987
|
-
B(m.$slots, "dialog", se(
|
|
2998
|
+
B(m.$slots, "dialog", ae(se(a))),
|
|
2988
2999
|
l("p", jo, [
|
|
2989
|
-
B(m.$slots, "dialog-value", se(
|
|
2990
|
-
E(w(
|
|
3000
|
+
B(m.$slots, "dialog-value", ae(se(a)), () => [
|
|
3001
|
+
E(w(a.valueTo || a.value), 1)
|
|
2991
3002
|
])
|
|
2992
3003
|
])
|
|
2993
3004
|
])
|
|
@@ -2997,7 +3008,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
2997
3008
|
}, 8, ["size", "title"])) : T("", !0)
|
|
2998
3009
|
]));
|
|
2999
3010
|
}
|
|
3000
|
-
}), No = { class: "flex justify-end" }, Ro = { class: "flex justify-center py-4" },
|
|
3011
|
+
}), No = { class: "flex justify-end" }, Ro = { class: "flex justify-center py-4" }, ld = /* @__PURE__ */ L({
|
|
3001
3012
|
__name: "CardButton",
|
|
3002
3013
|
props: {
|
|
3003
3014
|
size: {},
|
|
@@ -3016,24 +3027,24 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3016
3027
|
meta: {}
|
|
3017
3028
|
},
|
|
3018
3029
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
3019
|
-
setup(e, { emit:
|
|
3020
|
-
const
|
|
3030
|
+
setup(e, { emit: s }) {
|
|
3031
|
+
const a = e, n = s, t = ({ opts: r = {} }) => {
|
|
3021
3032
|
const { disabled: d } = r;
|
|
3022
3033
|
return { disabled: !!d };
|
|
3023
|
-
}, o = () => n("setState", !
|
|
3024
|
-
return (r, d) => (f(), O(je, X(
|
|
3034
|
+
}, o = () => n("setState", !a.value);
|
|
3035
|
+
return (r, d) => (f(), O(je, X(a, {
|
|
3025
3036
|
onClick: d[0] || (d[0] = (u) => n("click", u)),
|
|
3026
3037
|
onEdit: d[1] || (d[1] = (u) => n("edit", u)),
|
|
3027
3038
|
onClone: d[2] || (d[2] = (u) => n("clone", u))
|
|
3028
3039
|
}), {
|
|
3029
3040
|
icon: x((u) => [
|
|
3030
|
-
B(r.$slots, "icon", se(
|
|
3041
|
+
B(r.$slots, "icon", ae(se(u)))
|
|
3031
3042
|
]),
|
|
3032
3043
|
header: x((u) => [
|
|
3033
3044
|
l("div", No, [
|
|
3034
3045
|
v(j, X(t(u), {
|
|
3035
3046
|
type: "icon",
|
|
3036
|
-
class:
|
|
3047
|
+
class: a.value ? "text-amber-500" : "text-gray-dark-25 dark:text-gray-light-10",
|
|
3037
3048
|
onClick: Q(o, ["stop"])
|
|
3038
3049
|
}), {
|
|
3039
3050
|
default: x(() => [
|
|
@@ -3050,7 +3061,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3050
3061
|
l("div", Ro, [
|
|
3051
3062
|
v(j, X(t(u), {
|
|
3052
3063
|
type: "icon",
|
|
3053
|
-
class: ["size-18",
|
|
3064
|
+
class: ["size-18", a.value ? "text-amber-500" : "text-gray-dark-25 dark:text-gray-light-10"],
|
|
3054
3065
|
onClick: Q(o, ["stop"])
|
|
3055
3066
|
}), {
|
|
3056
3067
|
default: x(() => [
|
|
@@ -3066,7 +3077,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3066
3077
|
_: 3
|
|
3067
3078
|
}, 16));
|
|
3068
3079
|
}
|
|
3069
|
-
}), Po = { class: "flex justify-center relative mx-2 my-6" },
|
|
3080
|
+
}), Po = { class: "flex justify-center relative mx-2 my-6" }, nd = /* @__PURE__ */ L({
|
|
3070
3081
|
__name: "CardDate",
|
|
3071
3082
|
props: {
|
|
3072
3083
|
size: {},
|
|
@@ -3085,8 +3096,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3085
3096
|
meta: {}
|
|
3086
3097
|
},
|
|
3087
3098
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
3088
|
-
setup(e, { emit:
|
|
3089
|
-
const
|
|
3099
|
+
setup(e, { emit: s }) {
|
|
3100
|
+
const a = e, n = s, t = Kt("time"), o = (i) => new Date(+i * 1e3).toISOString().slice(0, 16), r = (i) => {
|
|
3090
3101
|
var m;
|
|
3091
3102
|
const c = (m = i == null ? void 0 : i.target) == null ? void 0 : m.valueAsNumber;
|
|
3092
3103
|
c && n("setState", c / 1e3);
|
|
@@ -3098,13 +3109,13 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3098
3109
|
const i = (m = (c = t.value) == null ? void 0 : c.$el) == null ? void 0 : m.querySelector("input");
|
|
3099
3110
|
i != null && i.showPicker && i.showPicker();
|
|
3100
3111
|
};
|
|
3101
|
-
return (i, c) => (f(), O(je, X(
|
|
3112
|
+
return (i, c) => (f(), O(je, X(a, {
|
|
3102
3113
|
onClick: c[0] || (c[0] = (m) => n("click", m)),
|
|
3103
3114
|
onEdit: c[1] || (c[1] = (m) => n("edit", m)),
|
|
3104
3115
|
onClone: c[2] || (c[2] = (m) => n("clone", m))
|
|
3105
3116
|
}), {
|
|
3106
3117
|
icon: x((m) => [
|
|
3107
|
-
B(i.$slots, "icon", se(
|
|
3118
|
+
B(i.$slots, "icon", ae(se(m)))
|
|
3108
3119
|
]),
|
|
3109
3120
|
header: x((m) => [
|
|
3110
3121
|
l("div", null, [
|
|
@@ -3151,7 +3162,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3151
3162
|
viewBox: "-7.5 -7.5 75 75",
|
|
3152
3163
|
version: "1.1",
|
|
3153
3164
|
style: { transform: "rotate(-90deg)" }
|
|
3154
|
-
}, Go = ["stroke-dashoffset"], Jo = { class: "absolute top-1/2 left-1/2 -translate-1/2 text-white z-10 font-bold text-xl" },
|
|
3165
|
+
}, Go = ["stroke-dashoffset"], Jo = { class: "absolute top-1/2 left-1/2 -translate-1/2 text-white z-10 font-bold text-xl" }, od = /* @__PURE__ */ L({
|
|
3155
3166
|
__name: "CardDimmer",
|
|
3156
3167
|
props: {
|
|
3157
3168
|
size: {},
|
|
@@ -3170,20 +3181,20 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3170
3181
|
meta: {}
|
|
3171
3182
|
},
|
|
3172
3183
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
3173
|
-
setup(e, { emit:
|
|
3174
|
-
const
|
|
3184
|
+
setup(e, { emit: s }) {
|
|
3185
|
+
const a = e, n = s, t = F(0), o = ({ opts: c, value: m }) => Math.round(100 * +m / ((c == null ? void 0 : c.max) || 255)), r = ({ opts: c, value: m }) => Math.round(187 - +m / ((c == null ? void 0 : c.max) || 255) * 187), d = ({ value: c, opts: m }) => {
|
|
3175
3186
|
const { min: p = 0, max: b = 255, step: h = 1, disabled: k } = m || {};
|
|
3176
3187
|
return { min: p, max: b, step: h, value: c, disabled: !!k, class: k ? "" : "cursor-pointer" };
|
|
3177
3188
|
}, u = (c) => n("setState", +c.target.value || 0), i = ({ value: c }) => {
|
|
3178
3189
|
+c != 0 ? (t.value = +c, n("setState", 0)) : n("setState", c ? 0 : t.value || 255);
|
|
3179
3190
|
};
|
|
3180
|
-
return (c, m) => (f(), O(je, X(
|
|
3191
|
+
return (c, m) => (f(), O(je, X(a, {
|
|
3181
3192
|
onClick: m[0] || (m[0] = (p) => n("click", p)),
|
|
3182
3193
|
onEdit: m[1] || (m[1] = (p) => n("edit", p)),
|
|
3183
3194
|
onClone: m[2] || (m[2] = (p) => n("clone", p))
|
|
3184
3195
|
}), {
|
|
3185
3196
|
icon: x((p) => [
|
|
3186
|
-
B(c.$slots, "icon", se(
|
|
3197
|
+
B(c.$slots, "icon", ae(se(p)))
|
|
3187
3198
|
]),
|
|
3188
3199
|
header: x((p) => [
|
|
3189
3200
|
l("div", Uo, [
|
|
@@ -3241,7 +3252,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3241
3252
|
_: 3
|
|
3242
3253
|
}, 16));
|
|
3243
3254
|
}
|
|
3244
|
-
}),
|
|
3255
|
+
}), id = /* @__PURE__ */ L({
|
|
3245
3256
|
__name: "CardInfo",
|
|
3246
3257
|
props: {
|
|
3247
3258
|
size: {},
|
|
@@ -3260,15 +3271,15 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3260
3271
|
meta: {}
|
|
3261
3272
|
},
|
|
3262
3273
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
3263
|
-
setup(e, { emit:
|
|
3264
|
-
const
|
|
3265
|
-
return (t, o) => (f(), O(je, X(
|
|
3274
|
+
setup(e, { emit: s }) {
|
|
3275
|
+
const a = e, n = s;
|
|
3276
|
+
return (t, o) => (f(), O(je, X(a, {
|
|
3266
3277
|
onClick: o[0] || (o[0] = (r) => n("click", r)),
|
|
3267
3278
|
onEdit: o[1] || (o[1] = (r) => n("edit", r)),
|
|
3268
3279
|
onClone: o[2] || (o[2] = (r) => n("clone", r))
|
|
3269
3280
|
}), {
|
|
3270
3281
|
icon: x((r) => [
|
|
3271
|
-
B(t.$slots, "icon", se(
|
|
3282
|
+
B(t.$slots, "icon", ae(se(r)))
|
|
3272
3283
|
]),
|
|
3273
3284
|
default: x(() => [
|
|
3274
3285
|
B(t.$slots, "dialog")
|
|
@@ -3276,7 +3287,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3276
3287
|
_: 3
|
|
3277
3288
|
}, 16));
|
|
3278
3289
|
}
|
|
3279
|
-
}), Xo = { class: "flex justify-center relative mx-2 my-6" },
|
|
3290
|
+
}), Xo = { class: "flex justify-center relative mx-2 my-6" }, rd = /* @__PURE__ */ L({
|
|
3280
3291
|
__name: "CardInput",
|
|
3281
3292
|
props: {
|
|
3282
3293
|
size: {},
|
|
@@ -3295,23 +3306,23 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3295
3306
|
meta: {}
|
|
3296
3307
|
},
|
|
3297
3308
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
3298
|
-
setup(e, { emit:
|
|
3299
|
-
const
|
|
3309
|
+
setup(e, { emit: s }) {
|
|
3310
|
+
const a = e, n = s, t = F(a.value || ""), o = ({ name: d, opts: u = {} }) => {
|
|
3300
3311
|
const { disabled: i } = u;
|
|
3301
3312
|
return { label: d, disabled: i };
|
|
3302
3313
|
}, r = (d) => n("setState", d.target.value);
|
|
3303
3314
|
return _e(
|
|
3304
|
-
() =>
|
|
3315
|
+
() => a.value,
|
|
3305
3316
|
(d) => {
|
|
3306
3317
|
t.value = d;
|
|
3307
3318
|
}
|
|
3308
|
-
), (d, u) => (f(), O(je, X(
|
|
3319
|
+
), (d, u) => (f(), O(je, X(a, {
|
|
3309
3320
|
onClick: u[1] || (u[1] = (i) => n("click", i)),
|
|
3310
3321
|
onEdit: u[2] || (u[2] = (i) => n("edit", i)),
|
|
3311
3322
|
onClone: u[3] || (u[3] = (i) => n("clone", i))
|
|
3312
3323
|
}), {
|
|
3313
3324
|
icon: x((i) => [
|
|
3314
|
-
B(d.$slots, "icon", se(
|
|
3325
|
+
B(d.$slots, "icon", ae(se(i)))
|
|
3315
3326
|
]),
|
|
3316
3327
|
dialog: x((i) => [
|
|
3317
3328
|
l("div", Xo, [
|
|
@@ -3335,7 +3346,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3335
3346
|
_: 3
|
|
3336
3347
|
}, 16));
|
|
3337
3348
|
}
|
|
3338
|
-
}), qo = { class: "flex justify-center py-4" },
|
|
3349
|
+
}), qo = { class: "flex justify-center py-4" }, dd = /* @__PURE__ */ L({
|
|
3339
3350
|
__name: "CardList",
|
|
3340
3351
|
props: {
|
|
3341
3352
|
size: {},
|
|
@@ -3354,8 +3365,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3354
3365
|
meta: {}
|
|
3355
3366
|
},
|
|
3356
3367
|
emits: ["edit", "close", "click", "clone", "open", "setState"],
|
|
3357
|
-
setup(e, { emit:
|
|
3358
|
-
const
|
|
3368
|
+
setup(e, { emit: s }) {
|
|
3369
|
+
const a = e, n = s, t = ({ value: d }) => n("setState", d), o = ({ opts: d, value: u }) => {
|
|
3359
3370
|
var i;
|
|
3360
3371
|
return Array.isArray(d == null ? void 0 : d.items) && ((i = d == null ? void 0 : d.items.find((c) => c.value == u)) == null ? void 0 : i.name) || u;
|
|
3361
3372
|
}, r = ({ name: d, value: u, opts: i = {} }) => {
|
|
@@ -3363,13 +3374,13 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3363
3374
|
const { items: c = [], disabled: m } = i, p = ((b = c.find((h) => h.value == u)) == null ? void 0 : b.name) || u;
|
|
3364
3375
|
return { label: d, modelValue: p, items: c, disabled: !!m };
|
|
3365
3376
|
};
|
|
3366
|
-
return (d, u) => (f(), O(je, X(
|
|
3377
|
+
return (d, u) => (f(), O(je, X(a, {
|
|
3367
3378
|
onClick: u[1] || (u[1] = (i) => n("click", i)),
|
|
3368
3379
|
onEdit: u[2] || (u[2] = (i) => n("edit", i)),
|
|
3369
3380
|
onClone: u[3] || (u[3] = (i) => n("clone", i))
|
|
3370
3381
|
}), {
|
|
3371
3382
|
icon: x((i) => [
|
|
3372
|
-
B(d.$slots, "icon", se(
|
|
3383
|
+
B(d.$slots, "icon", ae(se(i)))
|
|
3373
3384
|
]),
|
|
3374
3385
|
value: x((i) => [
|
|
3375
3386
|
E(w(o(i)), 1)
|
|
@@ -3419,7 +3430,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3419
3430
|
_: 3
|
|
3420
3431
|
}, 16));
|
|
3421
3432
|
}
|
|
3422
|
-
}), Yo = { class: "glass-inset rounded-md p-1" }, Zo = { class: "flex gap-1" }, Qo = ["onClick"], ei = { class: "relative my-4" }, ti = { key: 0 },
|
|
3433
|
+
}), Yo = { class: "glass-inset rounded-md p-1" }, Zo = { class: "flex gap-1" }, Qo = ["onClick"], ei = { class: "relative my-4" }, ti = { key: 0 }, ai = /* @__PURE__ */ L({
|
|
3423
3434
|
__name: "VTabs",
|
|
3424
3435
|
props: {
|
|
3425
3436
|
value: {},
|
|
@@ -3427,13 +3438,13 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3427
3438
|
size: { default: "md" }
|
|
3428
3439
|
},
|
|
3429
3440
|
emits: ["click"],
|
|
3430
|
-
setup(e, { expose:
|
|
3431
|
-
const n =
|
|
3441
|
+
setup(e, { expose: s, emit: a }) {
|
|
3442
|
+
const n = a, t = F(e.value || 0), o = (d) => [
|
|
3432
3443
|
t.value === d ? "bg-cyan-main/10 text-cyan-main" : "text-gray-dark-25 hover:bg-white/5 dark:text-white/50 dark:hover:bg-white/5"
|
|
3433
3444
|
], r = (d) => {
|
|
3434
3445
|
t.value = d, n("click", d);
|
|
3435
3446
|
};
|
|
3436
|
-
return
|
|
3447
|
+
return s({
|
|
3437
3448
|
setActiveTab: r,
|
|
3438
3449
|
activeTab: t
|
|
3439
3450
|
}), (d, u) => (f(), g("div", null, [
|
|
@@ -3488,18 +3499,18 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3488
3499
|
])
|
|
3489
3500
|
]));
|
|
3490
3501
|
}
|
|
3491
|
-
}),
|
|
3502
|
+
}), si = ["checked", "disabled"], li = { class: "text-sm ms-2 peer-disabled:opacity-40" }, ni = /* @__PURE__ */ L({
|
|
3492
3503
|
__name: "VCheckbox",
|
|
3493
3504
|
props: {
|
|
3494
3505
|
modelValue: { type: [Number, Boolean], default: !1 },
|
|
3495
3506
|
disabled: { type: Boolean, default: !1 }
|
|
3496
3507
|
},
|
|
3497
3508
|
emits: ["update:modelValue", "click"],
|
|
3498
|
-
setup(e, { emit:
|
|
3499
|
-
const
|
|
3509
|
+
setup(e, { emit: s }) {
|
|
3510
|
+
const a = s, n = (o) => {
|
|
3500
3511
|
const r = o.target;
|
|
3501
|
-
|
|
3502
|
-
}, t = (o) =>
|
|
3512
|
+
a("update:modelValue", r.checked);
|
|
3513
|
+
}, t = (o) => a("click", o);
|
|
3503
3514
|
return (o, r) => (f(), g("label", {
|
|
3504
3515
|
class: M(["inline-flex items-center relative", { "cursor-pointer": !e.disabled }]),
|
|
3505
3516
|
onClick: t
|
|
@@ -3510,7 +3521,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3510
3521
|
disabled: e.disabled,
|
|
3511
3522
|
class: "peer size-5 appearance-none rounded-md border border-gray-light-10/80 bg-transparent transition-all checked:border-blue-main disabled:opacity-40 not-disabled:cursor-pointer dark:border-white/15",
|
|
3512
3523
|
onChange: n
|
|
3513
|
-
}, null, 40,
|
|
3524
|
+
}, null, 40, si),
|
|
3514
3525
|
r[0] || (r[0] = l("button", { class: "pointer-events-none absolute left-2.5 top-1/2 -translate-x-1/2 -translate-y-1/2 text-blue-main opacity-0 peer-checked:opacity-100 peer-disabled:opacity-40 dark:text-white" }, [
|
|
3515
3526
|
l("svg", {
|
|
3516
3527
|
class: "h-3.5 w-3.5",
|
|
@@ -3546,11 +3557,11 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3546
3557
|
type: {}
|
|
3547
3558
|
},
|
|
3548
3559
|
emits: ["update"],
|
|
3549
|
-
setup(e, { emit:
|
|
3550
|
-
const
|
|
3560
|
+
setup(e, { emit: s }) {
|
|
3561
|
+
const a = s, n = C(() => e.items.map((h, k) => ({ ...h, id: ++k }))), t = F({ name: "", value: "" }), o = C(() => e.items.length + 1), r = C(() => {
|
|
3551
3562
|
var h;
|
|
3552
3563
|
return !((h = t.value) != null && h.id);
|
|
3553
|
-
}), d = (h) => e.type === h, u = (h, k) =>
|
|
3564
|
+
}), d = (h) => e.type === h, u = (h, k) => a("update", h, k), i = (h) => h.map(({ name: k, value: _ }) => ({ name: k, value: _ })), c = ({ id: h, name: k, value: _ }) => t.value = { id: h, name: k, value: _ }, m = () => {
|
|
3554
3565
|
const h = o.value;
|
|
3555
3566
|
t.value = { name: `New_${h}`, value: `${h}`, id: h }, u("items", i([...n.value, t.value]));
|
|
3556
3567
|
}, p = (h) => {
|
|
@@ -3653,7 +3664,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3653
3664
|
])) : T("", !0)
|
|
3654
3665
|
]));
|
|
3655
3666
|
}
|
|
3656
|
-
}), vi = { class: "flex flex-col" }, pi = { class: "flex flex-col md:flex-row gap-6 min-h-72" }, hi = { class: "flex-auto order-1" }, yi = { class: "flex-auto gap-x-2 order-1" }, bi = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, xi = { class: "flex gap-2 items-center" }, ki = { class: "flex flex-col gap-4" }, $i = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, wi = { class: "relative group" }, Ci = { class: "select-none" }, _i = ["onClick"], Si = { class: "flex justify-center order-0 md:order-1" }, Ti = { class: "size-32 shrink-0" }, zi = { class: "flex gap-4 justify-end" }, Ai = { class: "relative min-h-52 max-h-100dvh overflow-auto scrollbar" },
|
|
3667
|
+
}), vi = { class: "flex flex-col" }, pi = { class: "flex flex-col md:flex-row gap-6 min-h-72" }, hi = { class: "flex-auto order-1" }, yi = { class: "flex-auto gap-x-2 order-1" }, bi = { class: "grid grid-cols-1 md:grid-cols-2 gap-6" }, xi = { class: "flex gap-2 items-center" }, ki = { class: "flex flex-col gap-4" }, $i = { class: "flex gap-2 flex-wrap flex-auto px-2 py-1" }, wi = { class: "relative group" }, Ci = { class: "select-none" }, _i = ["onClick"], Si = { class: "flex justify-center order-0 md:order-1" }, Ti = { class: "size-32 shrink-0" }, zi = { class: "flex gap-4 justify-end" }, Ai = { class: "relative min-h-52 max-h-100dvh overflow-auto scrollbar" }, cd = /* @__PURE__ */ L({
|
|
3657
3668
|
__name: "ItemEdit",
|
|
3658
3669
|
props: {
|
|
3659
3670
|
items: {},
|
|
@@ -3663,8 +3674,8 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3663
3674
|
listIcons: {}
|
|
3664
3675
|
},
|
|
3665
3676
|
emits: ["button"],
|
|
3666
|
-
setup(e, { emit:
|
|
3667
|
-
const
|
|
3677
|
+
setup(e, { emit: s }) {
|
|
3678
|
+
const a = s, n = [{ title: "Main" }, { title: "Data" }, { title: "Options" }], t = F({
|
|
3668
3679
|
id: "",
|
|
3669
3680
|
name: "",
|
|
3670
3681
|
type: "button",
|
|
@@ -3692,7 +3703,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3692
3703
|
t.value.type = V, delete t.value.opts, ["button", "list", "dimmer"].includes(V) && (z === "button" && (t.value.opts = {}), z === "list" && (t.value.opts = { items: [] }), z === "dimmer" && (t.value.opts = { min: 0, max: 255, step: 1 }));
|
|
3693
3704
|
}, h = (z) => {
|
|
3694
3705
|
z === "set" && (t.value.set ? delete t.value.set : t.value.set = "v"), z === "get" && (t.value.get ? delete t.value.get : t.value.get = "a"), z === "getTo" && (t.value.getTo ? delete t.value.getTo : t.value.getTo = "v");
|
|
3695
|
-
}, k = (z) =>
|
|
3706
|
+
}, k = (z) => a("button", z, t.value), _ = (z) => t.value.args = t.value.args.filter((V) => V !== z), N = ({ path: z }) => {
|
|
3696
3707
|
!t.value.args.length && !t.value.id && (t.value.id = z), t.value.args.push(z), o.value = !1;
|
|
3697
3708
|
}, q = (z, V) => {
|
|
3698
3709
|
z === "set" && (t.value.set = V), z === "get" && (t.value.get = V), z === "getTo" && (t.value.getTo = V), V || delete t.value[z];
|
|
@@ -3703,11 +3714,11 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3703
3714
|
};
|
|
3704
3715
|
return he(() => {
|
|
3705
3716
|
var z;
|
|
3706
|
-
(z = e.item) != null && z.id && (t.value =
|
|
3717
|
+
(z = e.item) != null && z.id && (t.value = Sa(e.item));
|
|
3707
3718
|
}), (z, V) => (f(), g("div", vi, [
|
|
3708
3719
|
l("div", pi, [
|
|
3709
3720
|
l("div", hi, [
|
|
3710
|
-
v(
|
|
3721
|
+
v(ai, {
|
|
3711
3722
|
class: "flex-auto min-h-75",
|
|
3712
3723
|
value: 0,
|
|
3713
3724
|
items: n
|
|
@@ -3719,7 +3730,7 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3719
3730
|
"onUpdate:modelValue": V[0] || (V[0] = (W) => t.value.id = W),
|
|
3720
3731
|
label: "ID",
|
|
3721
3732
|
message: d.value ? z.$t("used") : ""
|
|
3722
|
-
},
|
|
3733
|
+
}, ga({ _: 2 }, [
|
|
3723
3734
|
i.value ? void 0 : {
|
|
3724
3735
|
name: "icon",
|
|
3725
3736
|
fn: x(() => [
|
|
@@ -3899,94 +3910,94 @@ v + ' кВт·ч<br>выработка за день'`),
|
|
|
3899
3910
|
}, 8, ["title"])) : T("", !0)
|
|
3900
3911
|
]));
|
|
3901
3912
|
}
|
|
3902
|
-
}), Ft = { position: "relative", boxSizing: "border-box", overflow: "hidden", fontSize: "16px", fontFamily: 'Menlo, Consolas, "Liberation Mono", Monaco, "Lucida Console", monospace' }, Ei = { lineHeight: "inherit", whiteSpace: "pre-wrap", wordBreak: "keep-all", overflowWrap: "break-word", background: "none", position: "absolute", width: "100%", height: "100%", zIndex: "1", resize: "none", caretColor: "currentColor", padding: "inherit", outline: "none", fontSize: "inherit", fontFamily: "inherit", letterSpacing: "inherit", boxSizing: "border-box", border: "none", top: "0px", left: "0px", color: "inherit", overflow: "hidden", "-webkit-font-smoothing": "antialiased", "-webkit-text-fill-color": "transparent" }, Vi = { lineHeight: "inherit", position: "relative", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "0", width: "100%", margin: "0", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" }, Bi = { lineHeight: "inherit", position: "absolute", width: "100%", height: "100%", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "inherit", margin: "0", top: "0px", left: "0px", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" },
|
|
3913
|
+
}), Ft = { position: "relative", boxSizing: "border-box", overflow: "hidden", fontSize: "16px", fontFamily: 'Menlo, Consolas, "Liberation Mono", Monaco, "Lucida Console", monospace' }, Ei = { lineHeight: "inherit", whiteSpace: "pre-wrap", wordBreak: "keep-all", overflowWrap: "break-word", background: "none", position: "absolute", width: "100%", height: "100%", zIndex: "1", resize: "none", caretColor: "currentColor", padding: "inherit", outline: "none", fontSize: "inherit", fontFamily: "inherit", letterSpacing: "inherit", boxSizing: "border-box", border: "none", top: "0px", left: "0px", color: "inherit", overflow: "hidden", "-webkit-font-smoothing": "antialiased", "-webkit-text-fill-color": "transparent" }, Vi = { lineHeight: "inherit", position: "relative", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "0", width: "100%", margin: "0", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" }, Bi = { lineHeight: "inherit", position: "absolute", width: "100%", height: "100%", whiteSpace: "pre-wrap", wordBreak: "keep-all", padding: "inherit", margin: "0", top: "0px", left: "0px", pointerEvents: "none", boxSizing: "border-box", overflowWrap: "break-word", fontFamily: "inherit" }, aa = (e) => sa(e);
|
|
3903
3914
|
function Dt(e) {
|
|
3904
|
-
const
|
|
3905
|
-
return
|
|
3915
|
+
const s = Array.isArray(e) ? e : [e];
|
|
3916
|
+
return s.length === 0 ? aa : (a) => s.reduce((n, t, o) => t(n, { html: o > 0 }), a);
|
|
3906
3917
|
}
|
|
3907
3918
|
class Ii {
|
|
3908
|
-
constructor(
|
|
3909
|
-
if (this.lines = null, !
|
|
3910
|
-
if (this.root =
|
|
3911
|
-
const n = { value: "", styles: {}, plugins: [], highlighter:
|
|
3919
|
+
constructor(s, a = {}) {
|
|
3920
|
+
if (this.lines = null, !s) throw new Error("selector is not defined");
|
|
3921
|
+
if (this.root = s instanceof Node ? s : document.querySelector(s), !this.root) throw new Error(`element with "${s}" selector is not exist`);
|
|
3922
|
+
const n = { value: "", styles: {}, plugins: [], highlighter: aa }, { highlighters: t, ...o } = a;
|
|
3912
3923
|
this.options = { ...n, ...o, highlighter: t ? Dt(t) : n.highlighter }, this.options.value = this.options.value == null ? "" : String(this.options.value), this.init();
|
|
3913
3924
|
}
|
|
3914
3925
|
init() {
|
|
3915
3926
|
this.textarea = document.createElement("textarea"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocomplete", "off"), this.pre = document.createElement("pre");
|
|
3916
|
-
const
|
|
3927
|
+
const s = Object.keys(Ft).concat(Object.keys(this.options.styles)).concat(["paddingLeft"]);
|
|
3917
3928
|
this.initialRootStyles = {};
|
|
3918
|
-
const
|
|
3919
|
-
|
|
3920
|
-
this.initialRootStyles[n] =
|
|
3929
|
+
const a = this.root.style;
|
|
3930
|
+
s.forEach((n) => {
|
|
3931
|
+
this.initialRootStyles[n] = a[n] || "";
|
|
3921
3932
|
}), Object.assign(this.root.style, Ft, this.options.styles), Object.assign(this.textarea.style, Ei), Object.assign(this.pre.style, Vi), this.basePaddingLeft = this.root.style.paddingLeft || "", this.root.appendChild(this.textarea), this.root.appendChild(this.pre), this.addTextareaEvents(), this.update({ value: this.options.value }), this.updateLines();
|
|
3922
3933
|
}
|
|
3923
3934
|
addTextareaEvents() {
|
|
3924
|
-
this.handleEvent = (
|
|
3925
|
-
if (
|
|
3926
|
-
const
|
|
3927
|
-
if (
|
|
3935
|
+
this.handleEvent = (s) => {
|
|
3936
|
+
if (s.type === "keydown" && this.textarea.readOnly) return;
|
|
3937
|
+
const a = s;
|
|
3938
|
+
if (a.isComposing || a.keyCode === 229) return;
|
|
3928
3939
|
const n = function(t, o) {
|
|
3929
3940
|
const { value: r, selectionStart: d, selectionEnd: u } = o.target;
|
|
3930
3941
|
return t.reduce((i, c) => ({ ...i, ...c(i, o) }), { value: r, selectionStart: d, selectionEnd: u });
|
|
3931
|
-
}(this.options.plugins,
|
|
3942
|
+
}(this.options.plugins, s);
|
|
3932
3943
|
this.update(n);
|
|
3933
3944
|
}, this.textarea.addEventListener("input", this.handleEvent), this.textarea.addEventListener("keydown", this.handleEvent), this.textarea.addEventListener("compositionend", this.handleEvent);
|
|
3934
3945
|
}
|
|
3935
|
-
update(
|
|
3946
|
+
update(s) {
|
|
3936
3947
|
if (!this.textarea) return;
|
|
3937
|
-
let { value:
|
|
3938
|
-
|
|
3948
|
+
let { value: a, selectionStart: n, selectionEnd: t } = s;
|
|
3949
|
+
a != null && (a = String(a), n == null && (n = this.textarea.selectionStart), t == null && (t = this.textarea.selectionEnd), this.textarea.value !== a && (this.textarea.value = a)), n != null && (this.textarea.selectionStart = n), t != null && (this.textarea.selectionEnd = t), a !== this.value && a != null && (this.value = a, this.render(), this.updateCallback && this.updateCallback(a));
|
|
3939
3950
|
}
|
|
3940
|
-
updateOptions(
|
|
3951
|
+
updateOptions(s) {
|
|
3941
3952
|
if (!this.textarea) return;
|
|
3942
|
-
const { highlighters:
|
|
3943
|
-
if (this.options = { ...this.options, ...n, highlighter:
|
|
3953
|
+
const { highlighters: a, ...n } = s;
|
|
3954
|
+
if (this.options = { ...this.options, ...n, highlighter: a ? Dt(a) : this.options.highlighter }, s.styles) {
|
|
3944
3955
|
const t = this.root.style;
|
|
3945
|
-
Object.keys(
|
|
3956
|
+
Object.keys(s.styles).forEach((o) => {
|
|
3946
3957
|
o in this.initialRootStyles || (this.initialRootStyles[o] = t[o] || "");
|
|
3947
|
-
}), Object.assign(this.root.style,
|
|
3958
|
+
}), Object.assign(this.root.style, s.styles), ("paddingLeft" in s.styles || "padding" in s.styles) && (this.basePaddingLeft = this.root.style.paddingLeft || "");
|
|
3948
3959
|
}
|
|
3949
|
-
this.lines && !this.options.lineNumbers && (et(this.lines), this.lines = null, this.root.style.paddingLeft = this.basePaddingLeft),
|
|
3960
|
+
this.lines && !this.options.lineNumbers && (et(this.lines), this.lines = null, this.root.style.paddingLeft = this.basePaddingLeft), s.value != null && this.update({ value: s.value }), this.render();
|
|
3950
3961
|
}
|
|
3951
3962
|
render() {
|
|
3952
|
-
const
|
|
3953
|
-
this.pre.innerHTML =
|
|
3963
|
+
const s = this.options.highlighter(this.value);
|
|
3964
|
+
this.pre.innerHTML = s + "<br/>", this.updateLines();
|
|
3954
3965
|
}
|
|
3955
3966
|
updateLines() {
|
|
3956
3967
|
if (!this.options.lineNumbers) return;
|
|
3957
3968
|
this.lines || (this.lines = document.createElement("pre"), this.root.appendChild(this.lines), Object.assign(this.lines.style, Bi));
|
|
3958
|
-
const
|
|
3959
|
-
`),
|
|
3960
|
-
this.root.style.paddingLeft = `${
|
|
3969
|
+
const s = this.value.split(`
|
|
3970
|
+
`), a = s.length.toString().length;
|
|
3971
|
+
this.root.style.paddingLeft = `${a + 1}ch`, this.lines.innerHTML = s.map((n, t) => `${`<span class="yace-line" style="position: absolute; opacity: .3; left: 0; width: ${a}ch; text-align: right">${1 + t}</span>`}${`<span style="color: transparent; pointer-events: none">${sa(n)}</span>`}`).join(`
|
|
3961
3972
|
`);
|
|
3962
3973
|
}
|
|
3963
3974
|
destroy() {
|
|
3964
3975
|
this.textarea && (this.textarea.removeEventListener("input", this.handleEvent), this.textarea.removeEventListener("keydown", this.handleEvent), this.textarea.removeEventListener("compositionend", this.handleEvent), et(this.textarea), et(this.pre), et(this.lines), Object.assign(this.root.style, this.initialRootStyles), Object.assign(this, { textarea: null, pre: null, lines: null, updateCallback: null, handleEvent: null, initialRootStyles: null, options: null, root: null }));
|
|
3965
3976
|
}
|
|
3966
|
-
onUpdate(
|
|
3967
|
-
this.updateCallback =
|
|
3977
|
+
onUpdate(s) {
|
|
3978
|
+
this.updateCallback = s;
|
|
3968
3979
|
}
|
|
3969
3980
|
}
|
|
3970
3981
|
function et(e) {
|
|
3971
3982
|
e && e.parentNode && e.parentNode.removeChild(e);
|
|
3972
3983
|
}
|
|
3973
|
-
function
|
|
3984
|
+
function sa(e) {
|
|
3974
3985
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
3975
3986
|
}
|
|
3976
3987
|
const jt = { alt: "altKey", control: "ctrlKey", ctrl: "ctrlKey", meta: "metaKey", shift: "shiftKey", "ctrl/cmd": typeof window < "u" && window.navigator && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform) ? "metaKey" : "ctrlKey" }, Li = { add: "=" }, Mi = { ";": "semicolon", "=": "equal", ",": "comma", "-": "minus", ".": "period", "/": "slash", "`": "backquote", "[": "bracketleft", "\\": "backslash", "]": "bracketright", "'": "quote" };
|
|
3977
|
-
function Ge(e,
|
|
3978
|
-
const
|
|
3979
|
-
if (!
|
|
3980
|
-
const t =
|
|
3988
|
+
function Ge(e, s) {
|
|
3989
|
+
const a = e.split("+").reduce((u, i) => jt[i] ? (u.modifiers[jt[i]] = !0, u) : { ...u, key: Li[i] || i.toLowerCase() }, { modifiers: { altKey: !1, ctrlKey: !1, metaKey: !1, shiftKey: !1 }, key: null }), n = Object.keys(a.modifiers).every((u) => a.modifiers[u] ? s[u] : !s[u]);
|
|
3990
|
+
if (!a.key) return n;
|
|
3991
|
+
const t = s.key != null && s.key.toLowerCase() === a.key, o = (r = a.key, /^[a-z]$/.test(r) ? `key${r}` : /^[0-9]$/.test(r) ? `digit${r}` : Mi[r] || null);
|
|
3981
3992
|
var r;
|
|
3982
|
-
const d = !
|
|
3993
|
+
const d = !s.isComposing && o != null && s.code != null && s.code.toLowerCase() === o;
|
|
3983
3994
|
return n && (t || d);
|
|
3984
3995
|
}
|
|
3985
3996
|
function Oi(e = {}) {
|
|
3986
|
-
const
|
|
3997
|
+
const s = Math.max(1, e.limit == null ? 300 : e.limit), a = e.coalesceMs == null ? 300 : e.coalesceMs;
|
|
3987
3998
|
let n = [], t = null, o = null;
|
|
3988
3999
|
const r = (d) => {
|
|
3989
|
-
n = n.slice(0, t + 1), n.push(d), n.length >
|
|
4000
|
+
n = n.slice(0, t + 1), n.push(d), n.length > s && (n = n.slice(n.length - s)), t = n.length - 1;
|
|
3990
4001
|
};
|
|
3991
4002
|
return (d, u) => {
|
|
3992
4003
|
const i = u.type === "keydown" && Ge("ctrl/cmd+z", u), c = u.type === "keydown" && (Ge("ctrl/cmd+shift+z", u) || Ge("ctrl+y", u));
|
|
@@ -3995,49 +4006,49 @@ function Oi(e = {}) {
|
|
|
3995
4006
|
if (c) return o = null, n[t].value !== d.value ? void r(d) : (t = Math.min(n.length - 1, t + 1), n[t]);
|
|
3996
4007
|
if (u.type === "keydown") return n[t].value !== d.value ? (o = null, void r(d)) : void (n[t] = d);
|
|
3997
4008
|
if (u.type === "input") {
|
|
3998
|
-
const m = u.timeStamp, p = m != null && o != null && m - o <=
|
|
4009
|
+
const m = u.timeStamp, p = m != null && o != null && m - o <= a;
|
|
3999
4010
|
if (o = m ?? null, p) return void (n[t] = d);
|
|
4000
4011
|
r(d);
|
|
4001
4012
|
}
|
|
4002
4013
|
};
|
|
4003
4014
|
}
|
|
4004
|
-
const Fi = () => (e,
|
|
4005
|
-
const { value:
|
|
4006
|
-
if (!Ge("enter",
|
|
4007
|
-
const o =
|
|
4015
|
+
const Fi = () => (e, s) => {
|
|
4016
|
+
const { value: a, selectionStart: n, selectionEnd: t } = e;
|
|
4017
|
+
if (!Ge("enter", s) || s.type !== "keydown") return;
|
|
4018
|
+
const o = a.substring(0, n).split(`
|
|
4008
4019
|
`).pop(), r = /^\s+/.exec(o);
|
|
4009
4020
|
if (!r) return;
|
|
4010
|
-
|
|
4021
|
+
s.preventDefault();
|
|
4011
4022
|
const d = `
|
|
4012
4023
|
` + r[0];
|
|
4013
|
-
return { value:
|
|
4014
|
-
}, Di = () => (e,
|
|
4015
|
-
if (typeof KeyboardEvent > "u" || !(
|
|
4024
|
+
return { value: a.substring(0, n) + d + a.substring(t), selectionStart: n + d.length, selectionEnd: n + d.length };
|
|
4025
|
+
}, Di = () => (e, s) => {
|
|
4026
|
+
if (typeof KeyboardEvent > "u" || !(s instanceof KeyboardEvent) || s.key !== "Enter")
|
|
4016
4027
|
return;
|
|
4017
|
-
const { value:
|
|
4028
|
+
const { value: a, selectionStart: n, selectionEnd: t } = e;
|
|
4018
4029
|
if (n !== t)
|
|
4019
4030
|
return;
|
|
4020
|
-
const o =
|
|
4021
|
-
`, n - 1) + 1, r =
|
|
4022
|
-
`, n), d = r === -1 ?
|
|
4023
|
-
if (
|
|
4031
|
+
const o = a.lastIndexOf(`
|
|
4032
|
+
`, n - 1) + 1, r = a.indexOf(`
|
|
4033
|
+
`, n), d = r === -1 ? a.length : r;
|
|
4034
|
+
if (a.slice(n, d).trim().length > 0)
|
|
4024
4035
|
return;
|
|
4025
|
-
const c =
|
|
4036
|
+
const c = a.substring(o, d).trimEnd();
|
|
4026
4037
|
if (c.endsWith(";") || c.length === 0)
|
|
4027
4038
|
return;
|
|
4028
|
-
const m =
|
|
4039
|
+
const m = a.slice(0, d) + ";" + a.slice(d), p = n + 1;
|
|
4029
4040
|
return {
|
|
4030
4041
|
value: m,
|
|
4031
4042
|
selectionStart: p,
|
|
4032
4043
|
selectionEnd: p
|
|
4033
4044
|
};
|
|
4034
4045
|
};
|
|
4035
|
-
let zt = [], re = null, te = 0, ve = [], Ae = null, Oe = null, At,
|
|
4046
|
+
let zt = [], re = null, te = 0, ve = [], Ae = null, Oe = null, At, la, fe = null, De = null;
|
|
4036
4047
|
const ji = (e) => {
|
|
4037
|
-
const { customSuggestions:
|
|
4048
|
+
const { customSuggestions: s = [], minPrefixLength: a = 1, maxSuggestions: n = 20, tabSize: t = 2, tooltip: o = { enabled: !0 }, i18n: r, renderMenu: d, renderTooltip: u } = e;
|
|
4038
4049
|
if (!d || !u)
|
|
4039
4050
|
throw new Error("renderMenu and renderTooltip are required");
|
|
4040
|
-
return zt = [...
|
|
4051
|
+
return zt = [...s].map((i) => r(i)), At = d, la = u, (i, c) => {
|
|
4041
4052
|
if (typeof KeyboardEvent > "u" || !(c instanceof KeyboardEvent))
|
|
4042
4053
|
return;
|
|
4043
4054
|
const { value: m, selectionStart: p } = i, b = c.target;
|
|
@@ -4069,7 +4080,7 @@ const ji = (e) => {
|
|
|
4069
4080
|
setTimeout(() => {
|
|
4070
4081
|
if (Oe) {
|
|
4071
4082
|
const h = Oe.value, k = Oe.selectionStart, _ = lt(h, k), N = h.slice(_, k);
|
|
4072
|
-
if (N.length <
|
|
4083
|
+
if (N.length < a)
|
|
4073
4084
|
be();
|
|
4074
4085
|
else {
|
|
4075
4086
|
const q = mt(N).slice(0, n);
|
|
@@ -4101,7 +4112,7 @@ const ji = (e) => {
|
|
|
4101
4112
|
return Ae && clearTimeout(Ae), Ae = setTimeout(() => {
|
|
4102
4113
|
Ae = null;
|
|
4103
4114
|
const h = b.value, k = b.selectionStart, _ = lt(h, k), N = h.slice(_, k);
|
|
4104
|
-
if (N.length <
|
|
4115
|
+
if (N.length < a) {
|
|
4105
4116
|
be();
|
|
4106
4117
|
return;
|
|
4107
4118
|
}
|
|
@@ -4115,50 +4126,50 @@ const ji = (e) => {
|
|
|
4115
4126
|
};
|
|
4116
4127
|
};
|
|
4117
4128
|
function mt(e) {
|
|
4118
|
-
const
|
|
4119
|
-
return zt.filter((
|
|
4120
|
-
const n =
|
|
4121
|
-
return n.startsWith(
|
|
4122
|
-
}).sort((
|
|
4123
|
-
const t =
|
|
4129
|
+
const s = e.toLowerCase();
|
|
4130
|
+
return zt.filter((a) => {
|
|
4131
|
+
const n = a.label.toLowerCase();
|
|
4132
|
+
return n.startsWith(s) || n.includes(s) || n.split("_").map((t) => t[0]).join("").startsWith(s);
|
|
4133
|
+
}).sort((a, n) => {
|
|
4134
|
+
const t = a.label.toLowerCase(), o = n.label.toLowerCase(), r = t.startsWith(s), d = o.startsWith(s);
|
|
4124
4135
|
if (r && !d) return -1;
|
|
4125
4136
|
if (!r && d) return 1;
|
|
4126
|
-
const u = t.indexOf(
|
|
4137
|
+
const u = t.indexOf(s), i = o.indexOf(s);
|
|
4127
4138
|
return u !== i ? u - i : t.length !== o.length ? t.length - o.length : t.localeCompare(o);
|
|
4128
4139
|
});
|
|
4129
4140
|
}
|
|
4130
|
-
function lt(e,
|
|
4131
|
-
let
|
|
4132
|
-
for (;
|
|
4133
|
-
|
|
4134
|
-
return
|
|
4141
|
+
function lt(e, s) {
|
|
4142
|
+
let a = s;
|
|
4143
|
+
for (; a > 0 && /[a-zA-Z0-9_$]/.test(e[a - 1]); )
|
|
4144
|
+
a--;
|
|
4145
|
+
return a;
|
|
4135
4146
|
}
|
|
4136
|
-
function Ni(e,
|
|
4137
|
-
be(), ve =
|
|
4138
|
-
const
|
|
4139
|
-
re = At(
|
|
4147
|
+
function Ni(e, s) {
|
|
4148
|
+
be(), ve = s, te = 0;
|
|
4149
|
+
const a = na(e);
|
|
4150
|
+
re = At(s, te, (n) => {
|
|
4140
4151
|
te = n, Fe();
|
|
4141
4152
|
}), Object.assign(re.style, {
|
|
4142
4153
|
position: "fixed",
|
|
4143
|
-
left: `${
|
|
4144
|
-
top: `${
|
|
4154
|
+
left: `${a.left}px`,
|
|
4155
|
+
top: `${a.top + 24}px`,
|
|
4145
4156
|
zIndex: "10000"
|
|
4146
4157
|
}), document.body.appendChild(re);
|
|
4147
4158
|
}
|
|
4148
4159
|
function Fe() {
|
|
4149
4160
|
if (!re || !Oe) return;
|
|
4150
|
-
const e = At(ve, te, (
|
|
4151
|
-
te =
|
|
4152
|
-
}),
|
|
4161
|
+
const e = At(ve, te, (a) => {
|
|
4162
|
+
te = a, Fe();
|
|
4163
|
+
}), s = re.getBoundingClientRect();
|
|
4153
4164
|
re.replaceWith(e), re = e, Object.assign(re.style, {
|
|
4154
4165
|
position: "fixed",
|
|
4155
|
-
left: `${
|
|
4156
|
-
top: `${
|
|
4166
|
+
left: `${s.left}px`,
|
|
4167
|
+
top: `${s.top}px`,
|
|
4157
4168
|
zIndex: "10000"
|
|
4158
4169
|
});
|
|
4159
4170
|
}
|
|
4160
|
-
function ft(e,
|
|
4161
|
-
const { value:
|
|
4171
|
+
function ft(e, s) {
|
|
4172
|
+
const { value: a, selectionStart: n } = e, t = lt(a, n), o = s.insert || s.label, r = /\$\{([^}]*)\}/g;
|
|
4162
4173
|
let d = o;
|
|
4163
4174
|
const u = [];
|
|
4164
4175
|
let i;
|
|
@@ -4177,7 +4188,7 @@ function ft(e, a) {
|
|
|
4177
4188
|
}
|
|
4178
4189
|
}
|
|
4179
4190
|
return {
|
|
4180
|
-
value:
|
|
4191
|
+
value: a.slice(0, t) + d + a.slice(n),
|
|
4181
4192
|
selectionStart: m,
|
|
4182
4193
|
selectionEnd: p
|
|
4183
4194
|
};
|
|
@@ -4185,22 +4196,22 @@ function ft(e, a) {
|
|
|
4185
4196
|
function be() {
|
|
4186
4197
|
Ae && (clearTimeout(Ae), Ae = null), re && (re.remove(), re = null, ve = [], te = 0, Oe = null);
|
|
4187
4198
|
}
|
|
4188
|
-
function
|
|
4189
|
-
const
|
|
4199
|
+
function na(e) {
|
|
4200
|
+
const s = e.getBoundingClientRect(), { value: a, selectionStart: n } = e, o = a.substring(0, n).split(`
|
|
4190
4201
|
`), r = o.length, d = o[o.length - 1] || "", u = parseInt(getComputedStyle(e).lineHeight) || 20;
|
|
4191
4202
|
return {
|
|
4192
|
-
left:
|
|
4193
|
-
top:
|
|
4203
|
+
left: s.left + 10 + d.length * 8,
|
|
4204
|
+
top: s.top + (r - 1) * u
|
|
4194
4205
|
};
|
|
4195
4206
|
}
|
|
4196
4207
|
function Nt(e) {
|
|
4197
4208
|
De && clearTimeout(De), De = setTimeout(() => {
|
|
4198
|
-
const
|
|
4199
|
-
if (
|
|
4209
|
+
const s = e.selectionStart, a = e.selectionEnd;
|
|
4210
|
+
if (s === a) {
|
|
4200
4211
|
Ke();
|
|
4201
4212
|
return;
|
|
4202
4213
|
}
|
|
4203
|
-
const n = e.value.substring(
|
|
4214
|
+
const n = e.value.substring(s, a).trim();
|
|
4204
4215
|
if (!n) {
|
|
4205
4216
|
Ke();
|
|
4206
4217
|
return;
|
|
@@ -4210,7 +4221,7 @@ function Nt(e) {
|
|
|
4210
4221
|
Ke();
|
|
4211
4222
|
return;
|
|
4212
4223
|
}
|
|
4213
|
-
const o =
|
|
4224
|
+
const o = na(e), r = la(t, o);
|
|
4214
4225
|
r.style.opacity = "0", fe && fe.remove(), fe = r, document.body.appendChild(fe), requestAnimationFrame(() => {
|
|
4215
4226
|
fe && (fe.style.opacity = "1");
|
|
4216
4227
|
}), setTimeout(() => Ke(), 3e3);
|
|
@@ -4222,27 +4233,35 @@ function Ke() {
|
|
|
4222
4233
|
}, 150));
|
|
4223
4234
|
}
|
|
4224
4235
|
typeof document < "u" && document.addEventListener("mousedown", (e) => {
|
|
4225
|
-
const
|
|
4226
|
-
re && !re.contains(
|
|
4236
|
+
const s = e.target;
|
|
4237
|
+
re && !re.contains(s) && be(), fe && !fe.contains(s) && Ke();
|
|
4227
4238
|
});
|
|
4228
|
-
const gt = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Ri =
|
|
4229
|
-
|
|
4239
|
+
const gt = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">"), Ri = {
|
|
4240
|
+
comment: "text-gray-dark-25 dark:text-gray-main",
|
|
4241
|
+
str: "text-amber-dark-75 dark:text-amber-dark-35",
|
|
4242
|
+
num: "text-green-dark-55 dark:text-green-light-25",
|
|
4243
|
+
word: "text-purple-main dark:text-purple-light-30",
|
|
4244
|
+
var: "text-cyan-dark-30 dark:text-cyan-light-40",
|
|
4245
|
+
event: "text-amber-dark-75 dark:text-amber-light-45",
|
|
4246
|
+
operator: "text-amber-dark-40"
|
|
4247
|
+
}, Pi = ["else", "end", "call", "fade"], Ui = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Ki = (e) => {
|
|
4248
|
+
const s = e.filter((d) => d.type !== "var").map((d) => d.label), r = `(\\/\\/[^\\n]*)|('[^'\\n]*')|(\\b\\d+(?:\\.\\d+)?\\b)|(\\b(?:${Array.from(/* @__PURE__ */ new Set([...Pi, ...s])).map(Ui).join("|")})\\b)|(\\$[a-zA-Z_][a-zA-Z0-9_]*)|(\\b(?:btn_\\d+(?:_\\d+)?)\\b)|([;:(){}])`;
|
|
4230
4249
|
return new RegExp(r, "g");
|
|
4231
|
-
},
|
|
4232
|
-
const
|
|
4250
|
+
}, Hi = (e) => (s) => {
|
|
4251
|
+
const a = Ki(e);
|
|
4233
4252
|
let n = "", t = 0;
|
|
4234
|
-
for (const o of
|
|
4253
|
+
for (const o of s.matchAll(a)) {
|
|
4235
4254
|
const [r, d, u, i, c, m, p, b] = o;
|
|
4236
4255
|
let h = "";
|
|
4237
|
-
d ? h = "comment" : u ? h = "str" : i ? h = "num" : c ? h = "word" : m ? h = "var" : p ? h = "event" : b && (h = "operator"), n += gt(
|
|
4256
|
+
d ? h = "comment" : u ? h = "str" : i ? h = "num" : c ? h = "word" : m ? h = "var" : p ? h = "event" : b && (h = "operator"), n += gt(s.slice(t, o.index)), n += `<span class="${Ri[h] ?? ""}">${gt(r)}</span>`, t = o.index + r.length;
|
|
4238
4257
|
}
|
|
4239
|
-
return n += gt(
|
|
4240
|
-
},
|
|
4258
|
+
return n += gt(s.slice(t)), n;
|
|
4259
|
+
}, oa = {
|
|
4241
4260
|
word: "text-blue-600 dark:text-blue-400",
|
|
4242
4261
|
func: "text-yellow-600 dark:text-yellow-400",
|
|
4243
4262
|
var: "text-cyan-600 dark:text-cyan-400",
|
|
4244
4263
|
event: "text-purple-600 dark:text-purple-400"
|
|
4245
|
-
},
|
|
4264
|
+
}, Wi = (e, s, a) => {
|
|
4246
4265
|
const n = document.createElement("div");
|
|
4247
4266
|
return n.className = `
|
|
4248
4267
|
fixed z-[10000] min-w-64 max-w-100 max-h-64
|
|
@@ -4250,41 +4269,41 @@ const gt = (e) => e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, "
|
|
|
4250
4269
|
border-gray-light-10 dark:border-gray-dark-30 bg-white dark:bg-gray-dark-30
|
|
4251
4270
|
text-sm font-mono scrollbar pointer-events-none
|
|
4252
4271
|
`, e.forEach((t, o) => {
|
|
4253
|
-
const r = o ===
|
|
4272
|
+
const r = o === s, d = document.createElement("div");
|
|
4254
4273
|
d.className = `
|
|
4255
4274
|
flex items-center justify-between gap-2 px-3 py-1.5 cursor-pointer
|
|
4256
4275
|
rounded transition-colors duration-100 border-l-2
|
|
4257
4276
|
${r ? "border-blue-500 dark:border-blue-400 bg-blue-50 dark:bg-blue-900/30" : "border-transparent hover:bg-gray-light-30 dark:hover:bg-gray-dark-30"}
|
|
4258
4277
|
`;
|
|
4259
|
-
const u =
|
|
4278
|
+
const u = oa[t.type] || "text-gray-dark-30 dark:text-gray-light-10";
|
|
4260
4279
|
d.innerHTML = `
|
|
4261
4280
|
<div class="flex items-center gap-2 flex-1">
|
|
4262
4281
|
<span class="${u} font-medium">${t.label}</span>
|
|
4263
4282
|
${t.detail ? `<span class="text-xs text-gray-dark-25 dark:text-gray-main ml-2">${t.detail}</span>` : ""}
|
|
4264
4283
|
</div>
|
|
4265
4284
|
${t.description ? `<span class="text-xs text-gray-main dark:text-gray-dark-25">${t.description}</span>` : ""}
|
|
4266
|
-
`, d.addEventListener("click", () =>
|
|
4285
|
+
`, d.addEventListener("click", () => a(o)), n.appendChild(d);
|
|
4267
4286
|
}), n;
|
|
4268
|
-
},
|
|
4269
|
-
const
|
|
4270
|
-
|
|
4287
|
+
}, Gi = (e, s) => {
|
|
4288
|
+
const a = document.createElement("div");
|
|
4289
|
+
a.className = `
|
|
4271
4290
|
fixed z-[10001] px-3 py-2 font-mono text-sm max-w-75
|
|
4272
4291
|
min-w-12 min-h-5 rounded-lg shadow-lg border
|
|
4273
4292
|
pointer-events-none transition-opacity duration-150
|
|
4274
4293
|
bg-white dark:bg-gray-dark-30 border-gray-light-10 dark:border-gray-dark-30
|
|
4275
4294
|
text-gray-dark-30 dark:text-gray-light-10 pointer-events-none
|
|
4276
|
-
`,
|
|
4277
|
-
left: ${
|
|
4295
|
+
`, a.style.cssText = `
|
|
4296
|
+
left: ${s.left + 40}px; top: ${s.top - 10}px;
|
|
4278
4297
|
transform: translateX(-50%) translateY(-100%); opacity: 0;
|
|
4279
4298
|
`;
|
|
4280
|
-
let t = `<div class="font-medium ${
|
|
4281
|
-
e.detail && (t += `<div class="text-gray-dark-25 dark:text-gray-main mt-0.5 text-xs">${e.detail}</div>`), e.description && (t += `<div class="text-gray-main dark:text-gray-dark-25 text-xs mt-1 pt-1 border-t border-gray-light-10 dark:border-gray-dark-30">${e.description}</div>`),
|
|
4299
|
+
let t = `<div class="font-medium ${oa[e.type] || "text-gray-dark-30 dark:text-gray-light-10"}">${e.label}</div>`;
|
|
4300
|
+
e.detail && (t += `<div class="text-gray-dark-25 dark:text-gray-main mt-0.5 text-xs">${e.detail}</div>`), e.description && (t += `<div class="text-gray-main dark:text-gray-dark-25 text-xs mt-1 pt-1 border-t border-gray-light-10 dark:border-gray-dark-30">${e.description}</div>`), a.innerHTML = t;
|
|
4282
4301
|
const o = document.createElement("div");
|
|
4283
4302
|
return o.className = `
|
|
4284
4303
|
absolute -bottom-1 left-1/2 w-2.5 h-2.5 -translate-x-1/2 rotate-45
|
|
4285
4304
|
bg-white dark:bg-gray-dark-30 border-r border-b border-gray-light-10 dark:border-gray-dark-30
|
|
4286
|
-
`,
|
|
4287
|
-
},
|
|
4305
|
+
`, a.appendChild(o), a;
|
|
4306
|
+
}, Ji = [
|
|
4288
4307
|
{ label: "if", type: "word", insert: `if:\${$v0<10};
|
|
4289
4308
|
|
|
4290
4309
|
else;
|
|
@@ -4319,17 +4338,17 @@ end;`, detail: "event(name: string)" },
|
|
|
4319
4338
|
{ label: "$e", type: "var", insert: "$e${0}", detail: "var event" },
|
|
4320
4339
|
{ label: "$c", type: "var", insert: "$c${0}", detail: "var call" },
|
|
4321
4340
|
{ label: "$p", type: "var", insert: "$p${0}", detail: "gpio" }
|
|
4322
|
-
],
|
|
4341
|
+
], ud = /* @__PURE__ */ L({
|
|
4323
4342
|
__name: "ScriptEditor",
|
|
4324
4343
|
props: {
|
|
4325
4344
|
modelValue: {},
|
|
4326
4345
|
suggestions: { default: () => [] }
|
|
4327
4346
|
},
|
|
4328
4347
|
emits: ["update:modelValue", "update"],
|
|
4329
|
-
setup(e, { emit:
|
|
4330
|
-
const
|
|
4348
|
+
setup(e, { emit: s }) {
|
|
4349
|
+
const a = s;
|
|
4331
4350
|
let n;
|
|
4332
|
-
const t = [...
|
|
4351
|
+
const t = [...Ji, ...e.suggestions];
|
|
4333
4352
|
return _e(
|
|
4334
4353
|
() => e.modelValue,
|
|
4335
4354
|
(o) => {
|
|
@@ -4339,7 +4358,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4339
4358
|
n = new Ii("#editor", {
|
|
4340
4359
|
value: e.modelValue,
|
|
4341
4360
|
lineNumbers: !0,
|
|
4342
|
-
highlighters: [
|
|
4361
|
+
highlighters: [Hi(t)],
|
|
4343
4362
|
plugins: [
|
|
4344
4363
|
Oi(),
|
|
4345
4364
|
Fi(),
|
|
@@ -4351,14 +4370,14 @@ end;`, detail: "event(name: string)" },
|
|
|
4351
4370
|
tooltip: {
|
|
4352
4371
|
enabled: !0
|
|
4353
4372
|
},
|
|
4354
|
-
renderMenu:
|
|
4355
|
-
renderTooltip:
|
|
4373
|
+
renderMenu: Wi,
|
|
4374
|
+
renderTooltip: Gi
|
|
4356
4375
|
}),
|
|
4357
4376
|
Di()
|
|
4358
4377
|
],
|
|
4359
4378
|
styles: { fontSize: "14px" }
|
|
4360
4379
|
}), n.onUpdate((o) => {
|
|
4361
|
-
|
|
4380
|
+
a("update:modelValue", o);
|
|
4362
4381
|
});
|
|
4363
4382
|
}), Je(() => {
|
|
4364
4383
|
n.destroy();
|
|
@@ -4366,22 +4385,22 @@ end;`, detail: "event(name: string)" },
|
|
|
4366
4385
|
l("div", { id: "editor" }, null, -1)
|
|
4367
4386
|
])]));
|
|
4368
4387
|
}
|
|
4369
|
-
}),
|
|
4388
|
+
}), Xi = { class: "max-w-4xl mx-auto" }, qi = {
|
|
4370
4389
|
key: 0,
|
|
4371
4390
|
class: "text-sm"
|
|
4372
|
-
},
|
|
4391
|
+
}, Yi = {
|
|
4373
4392
|
key: 0,
|
|
4374
4393
|
class: "text-gray-dark-25"
|
|
4375
|
-
},
|
|
4394
|
+
}, Zi = {
|
|
4376
4395
|
key: 1,
|
|
4377
4396
|
class: "text-red-600"
|
|
4378
|
-
},
|
|
4397
|
+
}, Qi = ["innerHTML"], er = "https://raw.githubusercontent.com/bondrogeen/vuesp/refs/heads/master/github/docs/scriptrunner/", tr = "https://cdn.jsdelivr.net/npm/marked/lib/marked.umd.js", md = /* @__PURE__ */ L({
|
|
4379
4398
|
__name: "ScriptViewDocs",
|
|
4380
4399
|
props: {
|
|
4381
4400
|
lang: { default: "en" }
|
|
4382
4401
|
},
|
|
4383
4402
|
setup(e) {
|
|
4384
|
-
const
|
|
4403
|
+
const s = F(""), a = F(""), n = F(null), t = F(!1), o = F(null);
|
|
4385
4404
|
let r = null;
|
|
4386
4405
|
const d = () => new Promise((c, m) => {
|
|
4387
4406
|
if (typeof window > "u" || typeof document > "u") {
|
|
@@ -4397,7 +4416,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4397
4416
|
return;
|
|
4398
4417
|
}
|
|
4399
4418
|
const p = document.createElement("script");
|
|
4400
|
-
p.src =
|
|
4419
|
+
p.src = tr, p.async = !0, p.onload = () => {
|
|
4401
4420
|
window.marked ? (window.marked.setOptions({
|
|
4402
4421
|
gfm: !0,
|
|
4403
4422
|
breaks: !0,
|
|
@@ -4426,13 +4445,13 @@ end;`, detail: "event(name: string)" },
|
|
|
4426
4445
|
o.value = "error";
|
|
4427
4446
|
return;
|
|
4428
4447
|
}
|
|
4429
|
-
t.value = !0, o.value = null,
|
|
4448
|
+
t.value = !0, o.value = null, a.value = "";
|
|
4430
4449
|
try {
|
|
4431
|
-
const m = `${
|
|
4450
|
+
const m = `${er}${c}.md`, p = await fetch(m);
|
|
4432
4451
|
if (!p.ok)
|
|
4433
4452
|
throw new Error(`HTTP ${p.status}: ${p.statusText}`);
|
|
4434
4453
|
const b = await p.text();
|
|
4435
|
-
|
|
4454
|
+
s.value = b, n.value = u(b), a.value = r.parse(b);
|
|
4436
4455
|
} catch (m) {
|
|
4437
4456
|
const p = m instanceof Error ? m.message : "";
|
|
4438
4457
|
o.value = p, console.error("Error loading docs:", m);
|
|
@@ -4449,41 +4468,41 @@ end;`, detail: "event(name: string)" },
|
|
|
4449
4468
|
const m = c instanceof Error ? c.message : "";
|
|
4450
4469
|
o.value = m, console.error("Initialization error:", c);
|
|
4451
4470
|
}
|
|
4452
|
-
}), (c, m) => (f(), g("div",
|
|
4453
|
-
t.value || o.value ? (f(), g("div",
|
|
4454
|
-
t.value ? (f(), g("span",
|
|
4455
|
-
o.value ? (f(), g("span",
|
|
4471
|
+
}), (c, m) => (f(), g("div", Xi, [
|
|
4472
|
+
t.value || o.value ? (f(), g("div", qi, [
|
|
4473
|
+
t.value ? (f(), g("span", Yi, "⏳")) : T("", !0),
|
|
4474
|
+
o.value ? (f(), g("span", Zi, "❌ " + w(o.value), 1)) : T("", !0)
|
|
4456
4475
|
])) : T("", !0),
|
|
4457
4476
|
l("div", {
|
|
4458
4477
|
class: "docs-content",
|
|
4459
|
-
innerHTML:
|
|
4460
|
-
}, null, 8,
|
|
4478
|
+
innerHTML: a.value
|
|
4479
|
+
}, null, 8, Qi)
|
|
4461
4480
|
]));
|
|
4462
4481
|
}
|
|
4463
|
-
}),
|
|
4482
|
+
}), ar = { class: "my-4" }, fd = /* @__PURE__ */ L({
|
|
4464
4483
|
__name: "ScriptDialog",
|
|
4465
4484
|
props: {
|
|
4466
4485
|
idScript: {}
|
|
4467
4486
|
},
|
|
4468
4487
|
emits: ["add", "close"],
|
|
4469
|
-
setup(e, { emit:
|
|
4470
|
-
const
|
|
4488
|
+
setup(e, { emit: s }) {
|
|
4489
|
+
const a = s, { defineField: n, handleSubmit: t, isValid: o } = Ba({
|
|
4471
4490
|
validationSchema: () => ({
|
|
4472
|
-
name: [
|
|
4491
|
+
name: [Ia, La(8)]
|
|
4473
4492
|
})
|
|
4474
4493
|
}), [r, d] = n("name"), u = () => {
|
|
4475
|
-
|
|
4494
|
+
a("add", r.value);
|
|
4476
4495
|
}, i = t(() => {
|
|
4477
|
-
u(), r.value = "",
|
|
4496
|
+
u(), r.value = "", a("close", new Event("close"));
|
|
4478
4497
|
});
|
|
4479
4498
|
return he(() => {
|
|
4480
4499
|
e.idScript || (r.value = "boot");
|
|
4481
4500
|
}), (c, m) => {
|
|
4482
4501
|
const p = le, b = j;
|
|
4483
|
-
return f(), g("div",
|
|
4502
|
+
return f(), g("div", ar, [
|
|
4484
4503
|
v(p, X({
|
|
4485
4504
|
modelValue: H(r),
|
|
4486
|
-
"onUpdate:modelValue": m[0] || (m[0] = (h) =>
|
|
4505
|
+
"onUpdate:modelValue": m[0] || (m[0] = (h) => va(r) ? r.value = h : null)
|
|
4487
4506
|
}, H(d), {
|
|
4488
4507
|
disabled: !e.idScript,
|
|
4489
4508
|
label: c.$t("name")
|
|
@@ -4502,16 +4521,16 @@ end;`, detail: "event(name: string)" },
|
|
|
4502
4521
|
]);
|
|
4503
4522
|
};
|
|
4504
4523
|
}
|
|
4505
|
-
}), sr = ["aria-label"],
|
|
4524
|
+
}), sr = ["aria-label"], lr = { class: "hidden lg:inline" }, nr = ["aria-label"], or = { class: "flex items-center gap-3 border-b border-gray-light-10/70 px-4 dark:border-white/10" }, ir = ["placeholder"], rr = { class: "max-h-[55vh] overflow-y-auto p-2" }, dr = ["href"], cr = { class: "min-w-0" }, ur = { class: "flex flex-wrap items-baseline gap-2" }, mr = { class: "text-sm font-medium text-gray-dark-40 dark:text-white" }, fr = {
|
|
4506
4525
|
key: 0,
|
|
4507
4526
|
class: "text-xs uppercase tracking-wider text-gray-main"
|
|
4508
|
-
},
|
|
4527
|
+
}, gr = {
|
|
4509
4528
|
key: 0,
|
|
4510
4529
|
class: "mt-0.5 block truncate text-xs text-gray-dark-25 dark:text-gray-main"
|
|
4511
|
-
},
|
|
4530
|
+
}, vr = {
|
|
4512
4531
|
key: 0,
|
|
4513
4532
|
class: "px-4 py-10 text-center text-sm text-gray-dark-25 dark:text-gray-main"
|
|
4514
|
-
},
|
|
4533
|
+
}, gd = /* @__PURE__ */ L({
|
|
4515
4534
|
__name: "VisionSearch",
|
|
4516
4535
|
props: {
|
|
4517
4536
|
items: {},
|
|
@@ -4521,22 +4540,22 @@ end;`, detail: "event(name: string)" },
|
|
|
4521
4540
|
emptyText: { default: "Ничего не найдено. Попробуйте другой запрос." }
|
|
4522
4541
|
},
|
|
4523
4542
|
setup(e) {
|
|
4524
|
-
const
|
|
4543
|
+
const s = e, a = F(!1), n = F(""), t = F(null), o = C(() => {
|
|
4525
4544
|
const i = n.value.trim().toLowerCase();
|
|
4526
|
-
return (i ?
|
|
4545
|
+
return (i ? s.items.filter((m) => `${m.title} ${m.description ?? ""} ${m.group ?? ""}`.toLowerCase().includes(i)) : s.items).slice(0, 14);
|
|
4527
4546
|
}), r = async () => {
|
|
4528
4547
|
var i;
|
|
4529
|
-
|
|
4548
|
+
a.value = !0, n.value = "", await xt(), (i = t.value) == null || i.focus();
|
|
4530
4549
|
}, d = () => {
|
|
4531
|
-
|
|
4550
|
+
a.value = !1, n.value = "";
|
|
4532
4551
|
}, u = (i) => {
|
|
4533
4552
|
if ((i.metaKey || i.ctrlKey) && i.key.toLowerCase() === "k") {
|
|
4534
|
-
i.preventDefault(),
|
|
4553
|
+
i.preventDefault(), a.value ? d() : r();
|
|
4535
4554
|
return;
|
|
4536
4555
|
}
|
|
4537
|
-
i.key === "Escape" &&
|
|
4556
|
+
i.key === "Escape" && a.value && d();
|
|
4538
4557
|
};
|
|
4539
|
-
return _e(
|
|
4558
|
+
return _e(a, (i) => {
|
|
4540
4559
|
typeof document < "u" && (document.body.style.overflow = i ? "hidden" : "");
|
|
4541
4560
|
}), he(() => window.addEventListener("keydown", u)), Je(() => {
|
|
4542
4561
|
window.removeEventListener("keydown", u), typeof document < "u" && (document.body.style.overflow = "");
|
|
@@ -4551,11 +4570,11 @@ end;`, detail: "event(name: string)" },
|
|
|
4551
4570
|
name: "search",
|
|
4552
4571
|
size: 17
|
|
4553
4572
|
}),
|
|
4554
|
-
l("span",
|
|
4573
|
+
l("span", lr, w(e.label), 1),
|
|
4555
4574
|
c[1] || (c[1] = l("kbd", { class: "hidden rounded border border-gray-light-10/60 px-1.5 py-0.5 font-mono text-xs text-gray-main dark:border-white/10 dark:text-gray-dark-25 lg:inline" }, "⌘K", -1))
|
|
4556
4575
|
], 8, sr),
|
|
4557
|
-
(f(), O(
|
|
4558
|
-
|
|
4576
|
+
(f(), O(pa, { to: "body" }, [
|
|
4577
|
+
a.value ? (f(), g("div", {
|
|
4559
4578
|
key: 0,
|
|
4560
4579
|
class: "fixed inset-0 z-[100] flex items-start justify-center overflow-y-auto bg-slate-900/40 px-4 pt-[12vh] backdrop-blur-sm dark:bg-black/60",
|
|
4561
4580
|
onClick: Q(d, ["self"])
|
|
@@ -4566,7 +4585,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4566
4585
|
"aria-modal": "true",
|
|
4567
4586
|
"aria-label": e.dialogLabel
|
|
4568
4587
|
}, [
|
|
4569
|
-
l("div",
|
|
4588
|
+
l("div", or, [
|
|
4570
4589
|
v(I, {
|
|
4571
4590
|
name: "search",
|
|
4572
4591
|
size: 18,
|
|
@@ -4579,12 +4598,12 @@ end;`, detail: "event(name: string)" },
|
|
|
4579
4598
|
type: "search",
|
|
4580
4599
|
placeholder: e.placeholder,
|
|
4581
4600
|
class: "h-14 min-w-0 flex-1 bg-transparent text-sm text-gray-dark-40 placeholder:text-gray-main focus:outline-none dark:text-white dark:placeholder:text-gray-main"
|
|
4582
|
-
}, null, 8,
|
|
4601
|
+
}, null, 8, ir), [
|
|
4583
4602
|
[bt, n.value]
|
|
4584
4603
|
]),
|
|
4585
4604
|
c[2] || (c[2] = l("kbd", { class: "hidden rounded border border-gray-light-10/60 px-1.5 py-0.5 font-mono text-xs text-gray-main dark:border-white/10 dark:text-gray-dark-25 sm:inline" }, "Esc", -1))
|
|
4586
4605
|
]),
|
|
4587
|
-
l("div",
|
|
4606
|
+
l("div", rr, [
|
|
4588
4607
|
(f(!0), g(D, null, K(o.value, (m) => (f(), g("a", {
|
|
4589
4608
|
key: `${m.group}-${m.to}-${m.title}`,
|
|
4590
4609
|
href: m.to,
|
|
@@ -4596,22 +4615,22 @@ end;`, detail: "event(name: string)" },
|
|
|
4596
4615
|
size: 16,
|
|
4597
4616
|
class: "mt-0.5 shrink-0 text-gray-main"
|
|
4598
4617
|
}),
|
|
4599
|
-
l("span",
|
|
4600
|
-
l("span",
|
|
4601
|
-
l("span",
|
|
4602
|
-
m.group ? (f(), g("span",
|
|
4618
|
+
l("span", cr, [
|
|
4619
|
+
l("span", ur, [
|
|
4620
|
+
l("span", mr, w(m.title), 1),
|
|
4621
|
+
m.group ? (f(), g("span", fr, w(m.group), 1)) : T("", !0)
|
|
4603
4622
|
]),
|
|
4604
|
-
m.description ? (f(), g("span",
|
|
4623
|
+
m.description ? (f(), g("span", gr, w(m.description), 1)) : T("", !0)
|
|
4605
4624
|
])
|
|
4606
|
-
], 8,
|
|
4607
|
-
o.value.length ? T("", !0) : (f(), g("p",
|
|
4625
|
+
], 8, dr))), 128)),
|
|
4626
|
+
o.value.length ? T("", !0) : (f(), g("p", vr, w(e.emptyText), 1))
|
|
4608
4627
|
])
|
|
4609
|
-
], 8,
|
|
4628
|
+
], 8, nr)
|
|
4610
4629
|
])) : T("", !0)
|
|
4611
4630
|
]))
|
|
4612
4631
|
], 64));
|
|
4613
4632
|
}
|
|
4614
|
-
}),
|
|
4633
|
+
}), pr = ["aria-label", "title"], vd = /* @__PURE__ */ L({
|
|
4615
4634
|
__name: "VisionThemeToggle",
|
|
4616
4635
|
props: {
|
|
4617
4636
|
labelLight: { default: "Включить светлую тему" },
|
|
@@ -4620,25 +4639,25 @@ end;`, detail: "event(name: string)" },
|
|
|
4620
4639
|
titleDark: { default: "Тёмная тема" }
|
|
4621
4640
|
},
|
|
4622
4641
|
setup(e) {
|
|
4623
|
-
const
|
|
4624
|
-
|
|
4642
|
+
const s = F(Ta("theme") === "light" ? "light" : "dark"), a = (n) => {
|
|
4643
|
+
s.value = n, za(n);
|
|
4625
4644
|
};
|
|
4626
4645
|
return he(async () => {
|
|
4627
|
-
await xt(), setTimeout(() => s
|
|
4646
|
+
await xt(), setTimeout(() => a(s.value), 0);
|
|
4628
4647
|
}), (n, t) => (f(), g("button", {
|
|
4629
4648
|
type: "button",
|
|
4630
4649
|
class: "grid size-9 place-items-center rounded-md text-gray-dark-25 transition-colors hover:bg-white/50 hover:text-violet-main dark:text-gray-light-10 dark:hover:bg-white/5 dark:hover:text-white",
|
|
4631
|
-
"aria-label":
|
|
4632
|
-
title:
|
|
4633
|
-
onClick: t[0] || (t[0] = (o) => s
|
|
4650
|
+
"aria-label": s.value === "dark" ? e.labelLight : e.labelDark,
|
|
4651
|
+
title: s.value === "dark" ? e.titleLight : e.titleDark,
|
|
4652
|
+
onClick: t[0] || (t[0] = (o) => a(s.value === "dark" ? "light" : "dark"))
|
|
4634
4653
|
}, [
|
|
4635
4654
|
v(I, {
|
|
4636
|
-
name:
|
|
4655
|
+
name: s.value === "dark" ? "sun" : "moon",
|
|
4637
4656
|
size: 18
|
|
4638
4657
|
}, null, 8, ["name"])
|
|
4639
|
-
], 8,
|
|
4658
|
+
], 8, pr));
|
|
4640
4659
|
}
|
|
4641
|
-
}),
|
|
4660
|
+
}), pd = /* @__PURE__ */ L({
|
|
4642
4661
|
__name: "VAutocomplete",
|
|
4643
4662
|
props: {
|
|
4644
4663
|
modelValue: { default: "" },
|
|
@@ -4648,9 +4667,9 @@ end;`, detail: "event(name: string)" },
|
|
|
4648
4667
|
items: {}
|
|
4649
4668
|
},
|
|
4650
4669
|
emits: ["update:modelValue", "select"],
|
|
4651
|
-
setup(e, { emit:
|
|
4652
|
-
const
|
|
4653
|
-
o.click(new Event("click")),
|
|
4670
|
+
setup(e, { emit: s }) {
|
|
4671
|
+
const a = s, n = (o) => a("update:modelValue", o), t = (o, r) => {
|
|
4672
|
+
o.click(new Event("click")), a("select", r);
|
|
4654
4673
|
};
|
|
4655
4674
|
return (o, r) => (f(), O(Wt, X(o.$attrs, {
|
|
4656
4675
|
top: "50px",
|
|
@@ -4683,25 +4702,25 @@ end;`, detail: "event(name: string)" },
|
|
|
4683
4702
|
_: 3
|
|
4684
4703
|
}, 16));
|
|
4685
4704
|
}
|
|
4686
|
-
}),
|
|
4705
|
+
}), hr = { class: "v-expansion__content max-h-0 overflow-hidden transition-all duration-300" }, yr = { class: "p-4" }, hd = /* @__PURE__ */ L({
|
|
4687
4706
|
__name: "VExpansion",
|
|
4688
4707
|
props: {
|
|
4689
4708
|
label: { default: "" },
|
|
4690
4709
|
value: { type: Boolean, default: !1 }
|
|
4691
4710
|
},
|
|
4692
4711
|
setup(e) {
|
|
4693
|
-
const
|
|
4694
|
-
if (!
|
|
4695
|
-
const o =
|
|
4696
|
-
o && (o.style.maxHeight =
|
|
4712
|
+
const s = F(null), a = F(e.value), n = () => {
|
|
4713
|
+
if (!s.value) return;
|
|
4714
|
+
const o = s.value.querySelector(".v-expansion__content");
|
|
4715
|
+
o && (o.style.maxHeight = a.value ? `${o.scrollHeight}px` : "0");
|
|
4697
4716
|
}, t = () => {
|
|
4698
|
-
|
|
4717
|
+
a.value = !a.value, n();
|
|
4699
4718
|
};
|
|
4700
4719
|
return he(() => {
|
|
4701
4720
|
n();
|
|
4702
4721
|
}), (o, r) => (f(), g("div", {
|
|
4703
4722
|
ref_key: "root",
|
|
4704
|
-
ref:
|
|
4723
|
+
ref: s,
|
|
4705
4724
|
class: "glass-inset mb-2 overflow-hidden rounded-md"
|
|
4706
4725
|
}, [
|
|
4707
4726
|
l("div", {
|
|
@@ -4710,7 +4729,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4710
4729
|
}, [
|
|
4711
4730
|
l("h4", null, w(e.label), 1),
|
|
4712
4731
|
l("div", {
|
|
4713
|
-
class: M(["transition text-gray-main", { "rotate-x-180":
|
|
4732
|
+
class: M(["transition text-gray-main", { "rotate-x-180": a.value }])
|
|
4714
4733
|
}, [
|
|
4715
4734
|
v(I, {
|
|
4716
4735
|
name: "chevron-down",
|
|
@@ -4718,25 +4737,25 @@ end;`, detail: "event(name: string)" },
|
|
|
4718
4737
|
})
|
|
4719
4738
|
], 2)
|
|
4720
4739
|
]),
|
|
4721
|
-
l("div",
|
|
4722
|
-
l("div",
|
|
4740
|
+
l("div", hr, [
|
|
4741
|
+
l("div", yr, [
|
|
4723
4742
|
B(o.$slots, "default")
|
|
4724
4743
|
])
|
|
4725
4744
|
])
|
|
4726
4745
|
], 512));
|
|
4727
4746
|
}
|
|
4728
|
-
}),
|
|
4747
|
+
}), br = ["onDragstart", "onDragenter"], xr = {
|
|
4729
4748
|
key: 0,
|
|
4730
4749
|
class: "absolute inset-0 border border-dashed border-blue-600 rounded"
|
|
4731
|
-
},
|
|
4750
|
+
}, yd = /* @__PURE__ */ L({
|
|
4732
4751
|
__name: "VDragDrop",
|
|
4733
4752
|
props: {
|
|
4734
4753
|
items: {},
|
|
4735
4754
|
itemKey: { default: "id" }
|
|
4736
4755
|
},
|
|
4737
4756
|
emits: ["update:items", "order-change"],
|
|
4738
|
-
setup(e, { emit:
|
|
4739
|
-
const
|
|
4757
|
+
setup(e, { emit: s }) {
|
|
4758
|
+
const a = s, n = F(null), t = F(0), o = F(-1), r = ({ id: m }) => ({
|
|
4740
4759
|
"opacity-30 scale-105 z-10": n.value === m,
|
|
4741
4760
|
"transition-transform duration-200": n.value !== m
|
|
4742
4761
|
}), d = (m, p, b) => {
|
|
@@ -4750,7 +4769,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4750
4769
|
const p = e.items.findIndex((h) => h[e.itemKey] === n.value), b = o.value;
|
|
4751
4770
|
if (p !== b && b !== -1) {
|
|
4752
4771
|
const h = [...e.items], [k] = h.splice(p, 1);
|
|
4753
|
-
h.splice(b, 0, k),
|
|
4772
|
+
h.splice(b, 0, k), a("update:items", h), a("order-change", { fromIndex: p, toIndex: b, movedItem: k, newOrder: h });
|
|
4754
4773
|
}
|
|
4755
4774
|
}
|
|
4756
4775
|
o.value = -1;
|
|
@@ -4786,29 +4805,29 @@ end;`, detail: "event(name: string)" },
|
|
|
4786
4805
|
index: h,
|
|
4787
4806
|
isDragging: n.value === b.id
|
|
4788
4807
|
}),
|
|
4789
|
-
o.value === h && n.value !== b.id ? (f(), g("div",
|
|
4790
|
-
], 42,
|
|
4808
|
+
o.value === h && n.value !== b.id ? (f(), g("div", xr)) : T("", !0)
|
|
4809
|
+
], 42, br))), 128))
|
|
4791
4810
|
]),
|
|
4792
4811
|
_: 3
|
|
4793
4812
|
})
|
|
4794
4813
|
], 32));
|
|
4795
4814
|
}
|
|
4796
|
-
}),
|
|
4815
|
+
}), kr = { class: "glass-inset overflow-x-auto rounded-md" }, $r = { class: "min-w-full" }, wr = { class: "border-y border-gray-light-10/70 py-3 dark:border-white/10" }, Cr = { class: "bg-gray-light-30/70 dark:bg-white/[0.04]" }, _r = { class: "flex items-center" }, Sr = { class: "divide-y divide-gray-light-30 dark:divide-white/5" }, Tr = ["onClick"], zr = { class: "flex items-center text-gray-dark-30 dark:text-white/70" }, Ar = { key: 1 }, Er = {
|
|
4797
4816
|
class: "py-3 whitespace-nowrap",
|
|
4798
4817
|
colspan: "9"
|
|
4799
|
-
},
|
|
4818
|
+
}, Vr = { class: "flex items-center justify-center px-2 text-sm text-gray-dark-25 dark:text-white/50" }, bd = /* @__PURE__ */ L({
|
|
4800
4819
|
__name: "VTable",
|
|
4801
4820
|
props: {
|
|
4802
4821
|
headers: { default: () => [] },
|
|
4803
4822
|
items: { default: () => [] }
|
|
4804
4823
|
},
|
|
4805
4824
|
emits: ["click"],
|
|
4806
|
-
setup(e, { emit:
|
|
4807
|
-
const
|
|
4808
|
-
return (r, d) => (f(), g("div",
|
|
4809
|
-
l("table",
|
|
4810
|
-
l("thead",
|
|
4811
|
-
l("tr",
|
|
4825
|
+
setup(e, { emit: s }) {
|
|
4826
|
+
const a = s, n = (r, d) => a("click", r, d), t = (r) => (r == null ? void 0 : r.className) || "", o = (r, { key: d }) => r == null ? void 0 : r[d];
|
|
4827
|
+
return (r, d) => (f(), g("div", kr, [
|
|
4828
|
+
l("table", $r, [
|
|
4829
|
+
l("thead", wr, [
|
|
4830
|
+
l("tr", Cr, [
|
|
4812
4831
|
(f(!0), g(D, null, K(e.headers, (u, i) => (f(), g("th", {
|
|
4813
4832
|
key: i,
|
|
4814
4833
|
class: M(["px-4 py-2 whitespace-nowrap font-normal text-gray-dark-25 dark:text-white/50", t(u)])
|
|
@@ -4817,12 +4836,12 @@ end;`, detail: "event(name: string)" },
|
|
|
4817
4836
|
item: u,
|
|
4818
4837
|
i
|
|
4819
4838
|
}, () => [
|
|
4820
|
-
l("div",
|
|
4839
|
+
l("div", _r, w(u.name), 1)
|
|
4821
4840
|
])
|
|
4822
4841
|
], 2))), 128))
|
|
4823
4842
|
])
|
|
4824
4843
|
]),
|
|
4825
|
-
l("tbody",
|
|
4844
|
+
l("tbody", Sr, [
|
|
4826
4845
|
e.items.length ? (f(!0), g(D, { key: 0 }, K(e.items, (u, i) => (f(), g("tr", {
|
|
4827
4846
|
key: i,
|
|
4828
4847
|
class: "transition-colors hover:bg-cyan-main/[0.04] dark:hover:bg-white/[0.04]",
|
|
@@ -4832,7 +4851,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4832
4851
|
key: m,
|
|
4833
4852
|
class: "py-2 px-4"
|
|
4834
4853
|
}, [
|
|
4835
|
-
l("div",
|
|
4854
|
+
l("div", zr, [
|
|
4836
4855
|
B(r.$slots, c.key, {
|
|
4837
4856
|
item: u,
|
|
4838
4857
|
i
|
|
@@ -4841,9 +4860,9 @@ end;`, detail: "event(name: string)" },
|
|
|
4841
4860
|
])
|
|
4842
4861
|
])
|
|
4843
4862
|
]))), 128))
|
|
4844
|
-
], 8,
|
|
4845
|
-
l("td",
|
|
4846
|
-
l("div",
|
|
4863
|
+
], 8, Tr))), 128)) : (f(), g("tr", Ar, [
|
|
4864
|
+
l("td", Er, [
|
|
4865
|
+
l("div", Vr, [
|
|
4847
4866
|
B(r.$slots, "empty", {}, () => [
|
|
4848
4867
|
d[0] || (d[0] = E("The list is empty", -1))
|
|
4849
4868
|
])
|
|
@@ -4854,27 +4873,27 @@ end;`, detail: "event(name: string)" },
|
|
|
4854
4873
|
])
|
|
4855
4874
|
]));
|
|
4856
4875
|
}
|
|
4857
|
-
}),
|
|
4876
|
+
}), xd = /* @__PURE__ */ L({
|
|
4858
4877
|
__name: "VTooltip",
|
|
4859
4878
|
props: {
|
|
4860
4879
|
timeout: {},
|
|
4861
4880
|
disabled: { type: Boolean }
|
|
4862
4881
|
},
|
|
4863
4882
|
setup(e) {
|
|
4864
|
-
const
|
|
4865
|
-
e.disabled || (
|
|
4883
|
+
const s = F(!1), a = () => {
|
|
4884
|
+
e.disabled || (s.value = !0);
|
|
4866
4885
|
}, n = () => {
|
|
4867
|
-
|
|
4886
|
+
s.value = !1;
|
|
4868
4887
|
}, t = Kt("tooltip");
|
|
4869
|
-
return
|
|
4888
|
+
return Va(t, () => n()), (o, r) => (f(), g("div", {
|
|
4870
4889
|
ref: "tooltip",
|
|
4871
4890
|
class: "relative v-tooltip",
|
|
4872
|
-
onMouseenter:
|
|
4891
|
+
onMouseenter: a,
|
|
4873
4892
|
onMouseleave: n
|
|
4874
4893
|
}, [
|
|
4875
4894
|
l("button", {
|
|
4876
4895
|
type: "button",
|
|
4877
|
-
onClick:
|
|
4896
|
+
onClick: a
|
|
4878
4897
|
}, [
|
|
4879
4898
|
B(o.$slots, "activator")
|
|
4880
4899
|
]),
|
|
@@ -4887,7 +4906,7 @@ end;`, detail: "event(name: string)" },
|
|
|
4887
4906
|
"leave-to-class": "transform opacity-0 -translate-y-2"
|
|
4888
4907
|
}, {
|
|
4889
4908
|
default: x(() => [
|
|
4890
|
-
B(o.$slots, "default", { show:
|
|
4909
|
+
B(o.$slots, "default", { show: s.value })
|
|
4891
4910
|
]),
|
|
4892
4911
|
_: 3
|
|
4893
4912
|
})
|
|
@@ -4895,80 +4914,80 @@ end;`, detail: "event(name: string)" },
|
|
|
4895
4914
|
}
|
|
4896
4915
|
});
|
|
4897
4916
|
export {
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4917
|
+
jr as AppAside,
|
|
4918
|
+
Nr as AppHeader,
|
|
4919
|
+
Ur as AppNav,
|
|
4920
|
+
Rr as AppNotification,
|
|
4921
|
+
Pr as AppOverlay,
|
|
4922
|
+
Kr as AppProgress,
|
|
4923
|
+
qr as BlockBreadcrumb,
|
|
4905
4924
|
Xt as BlockDataSettings,
|
|
4906
4925
|
un as BlockHost,
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4926
|
+
ed as BlockImport,
|
|
4927
|
+
Hr as BlockInfo,
|
|
4928
|
+
Zr as BlockPicker,
|
|
4929
|
+
Wr as BlockScan,
|
|
4930
|
+
Gr as BlockService,
|
|
4912
4931
|
yn as BlockShell,
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4932
|
+
Jr as BlockStatus,
|
|
4933
|
+
Xr as BlockUpdate,
|
|
4934
|
+
Qr as BlockView,
|
|
4916
4935
|
je as CardBase,
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4936
|
+
ld as CardButton,
|
|
4937
|
+
nd as CardDate,
|
|
4938
|
+
od as CardDimmer,
|
|
4939
|
+
id as CardInfo,
|
|
4940
|
+
rd as CardInput,
|
|
4941
|
+
dd as CardList,
|
|
4942
|
+
Ga as CardNotification,
|
|
4924
4943
|
_t as DEFAULT_METRIC_STYLE,
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4944
|
+
Ji as DEFAULT_SUGGESTIONS,
|
|
4945
|
+
td as EnergyFlowBlock,
|
|
4946
|
+
wd as ICONS,
|
|
4947
|
+
Cd as ICON_NAMES,
|
|
4948
|
+
cd as ItemEdit,
|
|
4930
4949
|
pt as MAX_METRICS,
|
|
4931
4950
|
We as MAX_METRIC_ARGS,
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4951
|
+
fd as ScriptDialog,
|
|
4952
|
+
ud as ScriptEditor,
|
|
4953
|
+
md as ScriptViewDocs,
|
|
4954
|
+
pd as VAutocomplete,
|
|
4936
4955
|
j as VButton,
|
|
4937
4956
|
An as VCard,
|
|
4938
4957
|
ni as VCheckbox,
|
|
4939
4958
|
Se as VDialog,
|
|
4940
|
-
|
|
4959
|
+
yd as VDragDrop,
|
|
4941
4960
|
Wt as VDropdown,
|
|
4942
|
-
|
|
4943
|
-
|
|
4961
|
+
hd as VExpansion,
|
|
4962
|
+
Qs as VFile,
|
|
4944
4963
|
He as VFunc,
|
|
4945
4964
|
I as VIcon,
|
|
4946
4965
|
Ht as VIconLogo,
|
|
4947
|
-
|
|
4966
|
+
ha as VIconLogoMini,
|
|
4948
4967
|
kt as VList,
|
|
4949
4968
|
wt as VListObject,
|
|
4950
|
-
|
|
4951
|
-
|
|
4969
|
+
xa as VLoader,
|
|
4970
|
+
_d as VPopup,
|
|
4952
4971
|
ge as VSelect,
|
|
4953
|
-
|
|
4954
|
-
|
|
4972
|
+
bd as VTable,
|
|
4973
|
+
ai as VTabs,
|
|
4955
4974
|
le as VTextField,
|
|
4956
4975
|
Ct as VTextWrapper,
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4976
|
+
xd as VTooltip,
|
|
4977
|
+
ba as VWifiIcon,
|
|
4978
|
+
gd as VisionSearch,
|
|
4979
|
+
vd as VisionThemeToggle,
|
|
4961
4980
|
ro as createBlockContext,
|
|
4962
4981
|
Vo as createDeviceBlockStorage,
|
|
4963
4982
|
co as createDeviceContext,
|
|
4964
|
-
|
|
4983
|
+
ad as deviceBlockStorage,
|
|
4965
4984
|
uo as deviceProvider,
|
|
4966
4985
|
io as energyFlowDefinition,
|
|
4967
|
-
|
|
4986
|
+
Hi as fullHighlighter,
|
|
4968
4987
|
vt as metricClasses,
|
|
4969
4988
|
Tt as resolveBlockBindings,
|
|
4970
4989
|
Vl as resolveBlockMetrics,
|
|
4971
4990
|
El as resolveMetric,
|
|
4972
|
-
|
|
4991
|
+
Yr as resolveMetricArgValues,
|
|
4973
4992
|
sd as useBlock
|
|
4974
4993
|
};
|