smarteye-e-components 0.0.21 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
- import { defineComponent as G, computed as O, openBlock as w, createElementBlock as b, renderSlot as y, createElementVNode as S, toDisplayString as P, h as T, ref as F, resolveComponent as k, createVNode as $, withCtx as C, Fragment as j, renderList as M, createBlock as W, normalizeClass as tt, createCommentVNode as H, pushScopeId as et, popScopeId as ot } from "vue";
2
- var x;
3
- ((t) => {
1
+ import { defineComponent as F, computed as M, openBlock as f, createElementBlock as b, renderSlot as y, createElementVNode as _, toDisplayString as O, h as L, inject as te, ref as z, resolveComponent as $, normalizeClass as B, createVNode as I, withCtx as C, createBlock as P, createCommentVNode as j, Fragment as H, renderList as A, provide as oe, pushScopeId as ne, popScopeId as se } from "vue";
2
+ var N;
3
+ ((e) => {
4
4
  ((o) => {
5
- function r(c) {
5
+ function s(l) {
6
6
  const i = [];
7
- for (let a = 0; a < c; a++)
7
+ for (let a = 0; a < l; a++)
8
8
  i.push({
9
9
  id: "testId",
10
10
  pid: "",
@@ -14,316 +14,316 @@ var x;
14
14
  });
15
15
  return i;
16
16
  }
17
- function e(c) {
17
+ function t(l) {
18
18
  const i = [];
19
- for (let a = 0; a < c; a++)
19
+ for (let a = 0; a < l; a++)
20
20
  i.push({
21
21
  id: `groupid-${a}`,
22
22
  name: `group-${a}`,
23
23
  pid: "",
24
24
  onlineCount: 0,
25
25
  totalCount: 0,
26
- devices: r(10),
27
- items: e(c - a - 1)
26
+ devices: s(10),
27
+ items: t(l - a - 1)
28
28
  });
29
29
  return i;
30
30
  }
31
- function s(c) {
31
+ function r(l) {
32
32
  return {
33
33
  name: "hah",
34
34
  onlineCount: 0,
35
35
  totalCount: 0,
36
- items: e(c)
36
+ items: t(l)
37
37
  };
38
38
  }
39
- o.RandomDeviceGroup = s;
40
- })(t.Test || (t.Test = {}));
41
- function n(o, r) {
42
- for (let e = 0; e < o.length; e++)
43
- r(o[e]), n(o[e].items, r);
39
+ o.RandomDeviceGroup = r;
40
+ })(e.Test || (e.Test = {}));
41
+ function n(o, s) {
42
+ for (let t = 0; t < o.length; t++)
43
+ s(o[t]), n(o[t].items, s);
44
44
  }
45
45
  ((o) => {
46
- function r(e) {
47
- const s = {}, c = {};
48
- return n(e.items, (i) => {
49
- s[i.id] = i;
46
+ function s(t) {
47
+ const r = {}, l = {};
48
+ return n(t.items, (i) => {
49
+ r[i.id] = i;
50
50
  for (let a = 0; a < i.devices.length; a++)
51
- c[i.devices[a].id] = i.devices[a];
51
+ l[i.devices[a].id] = i.devices[a];
52
52
  }), {
53
53
  getGroup(i) {
54
- return s[i];
54
+ return r[i];
55
55
  },
56
56
  getDevice(i) {
57
- return c[i];
57
+ return l[i];
58
58
  },
59
59
  foreachGroup(i) {
60
- for (let a in s)
61
- i(s[a]);
60
+ for (let a in r)
61
+ i(r[a]);
62
62
  }
63
63
  };
64
64
  }
65
- o.AccessSession = r;
66
- })(t.Utils || (t.Utils = {}));
67
- })(x || (x = {}));
68
- const nt = G({
65
+ o.AccessSession = s;
66
+ })(e.Utils || (e.Utils = {}));
67
+ })(N || (N = {}));
68
+ const re = F({
69
69
  props: {
70
70
  countInfo: Object,
71
71
  controlParams: Object
72
72
  },
73
- setup(t) {
74
- function n(e, s) {
75
- if (s) {
76
- let c = 0;
77
- return s.items.forEach((i) => {
78
- c += n(e, i);
79
- }), e(s) + c;
73
+ setup(e) {
74
+ function n(t, r) {
75
+ if (r) {
76
+ let l = 0;
77
+ return r.items.forEach((i) => {
78
+ l += n(t, i);
79
+ }), t(r) + l;
80
80
  }
81
81
  return 0;
82
82
  }
83
- const o = O(() => n((e) => e.onlineCount, t.countInfo));
83
+ const o = M(() => n((t) => t.onlineCount, e.countInfo));
84
84
  return {
85
- totalCount: O(() => n((e) => e.totalCount, t.countInfo)),
85
+ totalCount: M(() => n((t) => t.totalCount, e.countInfo)),
86
86
  onlineCount: o
87
87
  };
88
88
  }
89
89
  });
90
- const D = (t, n) => {
91
- const o = t.__vccOpts || t;
92
- for (const [r, e] of n)
93
- o[r] = e;
90
+ const E = (e, n) => {
91
+ const o = e.__vccOpts || e;
92
+ for (const [s, t] of n)
93
+ o[s] = t;
94
94
  return o;
95
- }, rt = { class: "root" }, st = { class: "count-show" };
96
- function it(t, n, o, r, e, s) {
97
- return w(), b("div", rt, [
98
- y(t.$slots, "default", {}, void 0, !0),
99
- S("span", st, P(t.onlineCount) + "/" + P(t.totalCount), 1)
95
+ }, ie = { class: "root" }, ae = { class: "count-show" };
96
+ function le(e, n, o, s, t, r) {
97
+ return f(), b("div", ie, [
98
+ y(e.$slots, "default", {}, void 0, !0),
99
+ _("span", ae, O(e.onlineCount) + "/" + O(e.totalCount), 1)
100
100
  ]);
101
101
  }
102
- const K = /* @__PURE__ */ D(nt, [["render", it], ["__scopeId", "data-v-56ab9f59"]]), q = Object.freeze(
102
+ const q = /* @__PURE__ */ E(re, [["render", le], ["__scopeId", "data-v-56ab9f59"]]), J = Object.freeze(
103
103
  {
104
104
  left: 0,
105
105
  top: 0,
106
106
  width: 16,
107
107
  height: 16
108
108
  }
109
- ), J = Object.freeze({
109
+ ), Q = Object.freeze({
110
110
  rotate: 0,
111
111
  vFlip: !1,
112
112
  hFlip: !1
113
- }), z = Object.freeze({
114
- ...q,
115
- ...J
113
+ }), T = Object.freeze({
114
+ ...J,
115
+ ...Q
116
116
  });
117
117
  Object.freeze({
118
- ...z,
118
+ ...T,
119
119
  body: "",
120
120
  hidden: !1
121
121
  });
122
122
  ({
123
- ...q
123
+ ...J
124
124
  });
125
- const Q = Object.freeze({
125
+ const X = Object.freeze({
126
126
  width: null,
127
127
  height: null
128
- }), X = Object.freeze({
129
- ...Q,
130
- ...J
128
+ }), Y = Object.freeze({
129
+ ...X,
130
+ ...Q
131
131
  });
132
- function ct(t, n) {
132
+ function ce(e, n) {
133
133
  const o = {
134
- ...t
134
+ ...e
135
135
  };
136
- for (const r in n) {
137
- const e = n[r], s = typeof e;
138
- r in Q ? (e === null || e && (s === "string" || s === "number")) && (o[r] = e) : s === typeof o[r] && (o[r] = r === "rotate" ? e % 4 : e);
136
+ for (const s in n) {
137
+ const t = n[s], r = typeof t;
138
+ s in X ? (t === null || t && (r === "string" || r === "number")) && (o[s] = t) : r === typeof o[s] && (o[s] = s === "rotate" ? t % 4 : t);
139
139
  }
140
140
  return o;
141
141
  }
142
- const at = /[\s,]+/;
143
- function lt(t, n) {
144
- n.split(at).forEach((o) => {
142
+ const ue = /[\s,]+/;
143
+ function de(e, n) {
144
+ n.split(ue).forEach((o) => {
145
145
  switch (o.trim()) {
146
146
  case "horizontal":
147
- t.hFlip = !0;
147
+ e.hFlip = !0;
148
148
  break;
149
149
  case "vertical":
150
- t.vFlip = !0;
150
+ e.vFlip = !0;
151
151
  break;
152
152
  }
153
153
  });
154
154
  }
155
- function ut(t, n = 0) {
156
- const o = t.replace(/^-?[0-9.]*/, "");
157
- function r(e) {
158
- for (; e < 0; )
159
- e += 4;
160
- return e % 4;
155
+ function he(e, n = 0) {
156
+ const o = e.replace(/^-?[0-9.]*/, "");
157
+ function s(t) {
158
+ for (; t < 0; )
159
+ t += 4;
160
+ return t % 4;
161
161
  }
162
162
  if (o === "") {
163
- const e = parseInt(t);
164
- return isNaN(e) ? 0 : r(e);
165
- } else if (o !== t) {
166
- let e = 0;
163
+ const t = parseInt(e);
164
+ return isNaN(t) ? 0 : s(t);
165
+ } else if (o !== e) {
166
+ let t = 0;
167
167
  switch (o) {
168
168
  case "%":
169
- e = 25;
169
+ t = 25;
170
170
  break;
171
171
  case "deg":
172
- e = 90;
172
+ t = 90;
173
173
  }
174
- if (e) {
175
- let s = parseFloat(t.slice(0, t.length - o.length));
176
- return isNaN(s) ? 0 : (s = s / e, s % 1 === 0 ? r(s) : 0);
174
+ if (t) {
175
+ let r = parseFloat(e.slice(0, e.length - o.length));
176
+ return isNaN(r) ? 0 : (r = r / t, r % 1 === 0 ? s(r) : 0);
177
177
  }
178
178
  }
179
179
  return n;
180
180
  }
181
- const dt = /(-?[0-9.]*[0-9]+[0-9.]*)/g, ht = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
182
- function L(t, n, o) {
181
+ const pe = /(-?[0-9.]*[0-9]+[0-9.]*)/g, fe = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
182
+ function R(e, n, o) {
183
183
  if (n === 1)
184
- return t;
185
- if (o = o || 100, typeof t == "number")
186
- return Math.ceil(t * n * o) / o;
187
- if (typeof t != "string")
188
- return t;
189
- const r = t.split(dt);
190
- if (r === null || !r.length)
191
- return t;
192
- const e = [];
193
- let s = r.shift(), c = ht.test(s);
184
+ return e;
185
+ if (o = o || 100, typeof e == "number")
186
+ return Math.ceil(e * n * o) / o;
187
+ if (typeof e != "string")
188
+ return e;
189
+ const s = e.split(pe);
190
+ if (s === null || !s.length)
191
+ return e;
192
+ const t = [];
193
+ let r = s.shift(), l = fe.test(r);
194
194
  for (; ; ) {
195
- if (c) {
196
- const i = parseFloat(s);
197
- isNaN(i) ? e.push(s) : e.push(Math.ceil(i * n * o) / o);
195
+ if (l) {
196
+ const i = parseFloat(r);
197
+ isNaN(i) ? t.push(r) : t.push(Math.ceil(i * n * o) / o);
198
198
  } else
199
- e.push(s);
200
- if (s = r.shift(), s === void 0)
201
- return e.join("");
202
- c = !c;
199
+ t.push(r);
200
+ if (r = s.shift(), r === void 0)
201
+ return t.join("");
202
+ l = !l;
203
203
  }
204
204
  }
205
- function ft(t, n) {
205
+ function ge(e, n) {
206
206
  const o = {
207
- ...z,
208
- ...t
209
- }, r = {
210
- ...X,
207
+ ...T,
208
+ ...e
209
+ }, s = {
210
+ ...Y,
211
211
  ...n
212
- }, e = {
212
+ }, t = {
213
213
  left: o.left,
214
214
  top: o.top,
215
215
  width: o.width,
216
216
  height: o.height
217
217
  };
218
- let s = o.body;
219
- [o, r].forEach((p) => {
220
- const h = [], f = p.hFlip, l = p.vFlip;
221
- let m = p.rotate;
222
- f ? l ? m += 2 : (h.push(
223
- "translate(" + (e.width + e.left).toString() + " " + (0 - e.top).toString() + ")"
224
- ), h.push("scale(-1 1)"), e.top = e.left = 0) : l && (h.push(
225
- "translate(" + (0 - e.left).toString() + " " + (e.height + e.top).toString() + ")"
226
- ), h.push("scale(1 -1)"), e.top = e.left = 0);
227
- let _;
228
- switch (m < 0 && (m -= Math.floor(m / 4) * 4), m = m % 4, m) {
218
+ let r = o.body;
219
+ [o, s].forEach((g) => {
220
+ const h = [], p = g.hFlip, c = g.vFlip;
221
+ let w = g.rotate;
222
+ p ? c ? w += 2 : (h.push(
223
+ "translate(" + (t.width + t.left).toString() + " " + (0 - t.top).toString() + ")"
224
+ ), h.push("scale(-1 1)"), t.top = t.left = 0) : c && (h.push(
225
+ "translate(" + (0 - t.left).toString() + " " + (t.height + t.top).toString() + ")"
226
+ ), h.push("scale(1 -1)"), t.top = t.left = 0);
227
+ let S;
228
+ switch (w < 0 && (w -= Math.floor(w / 4) * 4), w = w % 4, w) {
229
229
  case 1:
230
- _ = e.height / 2 + e.top, h.unshift(
231
- "rotate(90 " + _.toString() + " " + _.toString() + ")"
230
+ S = t.height / 2 + t.top, h.unshift(
231
+ "rotate(90 " + S.toString() + " " + S.toString() + ")"
232
232
  );
233
233
  break;
234
234
  case 2:
235
235
  h.unshift(
236
- "rotate(180 " + (e.width / 2 + e.left).toString() + " " + (e.height / 2 + e.top).toString() + ")"
236
+ "rotate(180 " + (t.width / 2 + t.left).toString() + " " + (t.height / 2 + t.top).toString() + ")"
237
237
  );
238
238
  break;
239
239
  case 3:
240
- _ = e.width / 2 + e.left, h.unshift(
241
- "rotate(-90 " + _.toString() + " " + _.toString() + ")"
240
+ S = t.width / 2 + t.left, h.unshift(
241
+ "rotate(-90 " + S.toString() + " " + S.toString() + ")"
242
242
  );
243
243
  break;
244
244
  }
245
- m % 2 === 1 && (e.left !== e.top && (_ = e.left, e.left = e.top, e.top = _), e.width !== e.height && (_ = e.width, e.width = e.height, e.height = _)), h.length && (s = '<g transform="' + h.join(" ") + '">' + s + "</g>");
245
+ w % 2 === 1 && (t.left !== t.top && (S = t.left, t.left = t.top, t.top = S), t.width !== t.height && (S = t.width, t.width = t.height, t.height = S)), h.length && (r = '<g transform="' + h.join(" ") + '">' + r + "</g>");
246
246
  });
247
- const c = r.width, i = r.height, a = e.width, d = e.height;
248
- let g, u;
249
- return c === null ? (u = i === null ? "1em" : i === "auto" ? d : i, g = L(u, a / d)) : (g = c === "auto" ? a : c, u = i === null ? L(g, d / a) : i === "auto" ? d : i), {
247
+ const l = s.width, i = s.height, a = t.width, d = t.height;
248
+ let v, u;
249
+ return l === null ? (u = i === null ? "1em" : i === "auto" ? d : i, v = R(u, a / d)) : (v = l === "auto" ? a : l, u = i === null ? R(v, d / a) : i === "auto" ? d : i), {
250
250
  attributes: {
251
- width: g.toString(),
251
+ width: v.toString(),
252
252
  height: u.toString(),
253
- viewBox: e.left.toString() + " " + e.top.toString() + " " + a.toString() + " " + d.toString()
253
+ viewBox: t.left.toString() + " " + t.top.toString() + " " + a.toString() + " " + d.toString()
254
254
  },
255
- body: s
255
+ body: r
256
256
  };
257
257
  }
258
- const pt = /\sid="(\S+)"/g, gt = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
259
- let vt = 0;
260
- function mt(t, n = gt) {
258
+ const ve = /\sid="(\S+)"/g, me = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
259
+ let we = 0;
260
+ function _e(e, n = me) {
261
261
  const o = [];
262
- let r;
263
- for (; r = pt.exec(t); )
264
- o.push(r[1]);
265
- return o.length && o.forEach((e) => {
266
- const s = typeof n == "function" ? n(e) : n + (vt++).toString(), c = e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
267
- t = t.replace(
268
- new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"),
269
- "$1" + s + "$3"
262
+ let s;
263
+ for (; s = ve.exec(e); )
264
+ o.push(s[1]);
265
+ return o.length && o.forEach((t) => {
266
+ const r = typeof n == "function" ? n(t) : n + (we++).toString(), l = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
267
+ e = e.replace(
268
+ new RegExp('([#;"])(' + l + ')([")]|\\.[a-z])', "g"),
269
+ "$1" + r + "$3"
270
270
  );
271
- }), t;
271
+ }), e;
272
272
  }
273
- function _t(t, n) {
274
- let o = t.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
275
- for (const r in n)
276
- o += " " + r + '="' + n[r] + '"';
277
- return '<svg xmlns="http://www.w3.org/2000/svg"' + o + ">" + t + "</svg>";
273
+ function Se(e, n) {
274
+ let o = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
275
+ for (const s in n)
276
+ o += " " + s + '="' + n[s] + '"';
277
+ return '<svg xmlns="http://www.w3.org/2000/svg"' + o + ">" + e + "</svg>";
278
278
  }
279
- function wt(t) {
280
- return t.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
279
+ function be(e) {
280
+ return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
281
281
  }
282
- function St(t) {
283
- return 'url("data:image/svg+xml,' + wt(t) + '")';
282
+ function ye(e) {
283
+ return 'url("data:image/svg+xml,' + be(e) + '")';
284
284
  }
285
- const B = {
286
- ...X,
285
+ const V = {
286
+ ...Y,
287
287
  inline: !1
288
- }, bt = {
288
+ }, Ce = {
289
289
  xmlns: "http://www.w3.org/2000/svg",
290
290
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
291
291
  "aria-hidden": !0,
292
292
  role: "img"
293
- }, yt = {
293
+ }, $e = {
294
294
  display: "inline-block"
295
- }, A = {
295
+ }, D = {
296
296
  backgroundColor: "currentColor"
297
- }, Y = {
297
+ }, Z = {
298
298
  backgroundColor: "transparent"
299
- }, N = {
299
+ }, x = {
300
300
  Image: "var(--svg)",
301
301
  Repeat: "no-repeat",
302
302
  Size: "100% 100%"
303
- }, R = {
304
- webkitMask: A,
305
- mask: A,
306
- background: Y
303
+ }, U = {
304
+ webkitMask: D,
305
+ mask: D,
306
+ background: Z
307
307
  };
308
- for (const t in R) {
309
- const n = R[t];
310
- for (const o in N)
311
- n[t + o] = N[o];
308
+ for (const e in U) {
309
+ const n = U[e];
310
+ for (const o in x)
311
+ n[e + o] = x[o];
312
312
  }
313
- const I = {};
314
- ["horizontal", "vertical"].forEach((t) => {
315
- const n = t.slice(0, 1) + "Flip";
316
- I[t + "-flip"] = n, I[t.slice(0, 1) + "-flip"] = n, I[t + "Flip"] = n;
313
+ const G = {};
314
+ ["horizontal", "vertical"].forEach((e) => {
315
+ const n = e.slice(0, 1) + "Flip";
316
+ G[e + "-flip"] = n, G[e.slice(0, 1) + "-flip"] = n, G[e + "Flip"] = n;
317
317
  });
318
- function V(t) {
319
- return t + (t.match(/^[-0-9.]+$/) ? "px" : "");
318
+ function W(e) {
319
+ return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
320
320
  }
321
- const Ct = (t, n) => {
322
- const o = ct(B, n), r = { ...bt }, e = n.mode || "svg", s = {}, c = n.style, i = typeof c == "object" && !(c instanceof Array) ? c : {};
323
- for (let f in n) {
324
- const l = n[f];
325
- if (l !== void 0)
326
- switch (f) {
321
+ const ke = (e, n) => {
322
+ const o = ce(V, n), s = { ...Ce }, t = n.mode || "svg", r = {}, l = n.style, i = typeof l == "object" && !(l instanceof Array) ? l : {};
323
+ for (let p in n) {
324
+ const c = n[p];
325
+ if (c !== void 0)
326
+ switch (p) {
327
327
  case "icon":
328
328
  case "style":
329
329
  case "onLoad":
@@ -332,261 +332,291 @@ const Ct = (t, n) => {
332
332
  case "inline":
333
333
  case "hFlip":
334
334
  case "vFlip":
335
- o[f] = l === !0 || l === "true" || l === 1;
335
+ o[p] = c === !0 || c === "true" || c === 1;
336
336
  break;
337
337
  case "flip":
338
- typeof l == "string" && lt(o, l);
338
+ typeof c == "string" && de(o, c);
339
339
  break;
340
340
  case "color":
341
- s.color = l;
341
+ r.color = c;
342
342
  break;
343
343
  case "rotate":
344
- typeof l == "string" ? o[f] = ut(l) : typeof l == "number" && (o[f] = l);
344
+ typeof c == "string" ? o[p] = he(c) : typeof c == "number" && (o[p] = c);
345
345
  break;
346
346
  case "ariaHidden":
347
347
  case "aria-hidden":
348
- l !== !0 && l !== "true" && delete r["aria-hidden"];
348
+ c !== !0 && c !== "true" && delete s["aria-hidden"];
349
349
  break;
350
350
  default: {
351
- const m = I[f];
352
- m ? (l === !0 || l === "true" || l === 1) && (o[m] = !0) : B[f] === void 0 && (r[f] = l);
351
+ const w = G[p];
352
+ w ? (c === !0 || c === "true" || c === 1) && (o[w] = !0) : V[p] === void 0 && (s[p] = c);
353
353
  }
354
354
  }
355
355
  }
356
- const a = ft(t, o), d = a.attributes;
357
- if (o.inline && (s.verticalAlign = "-0.125em"), e === "svg") {
358
- r.style = {
359
- ...s,
356
+ const a = ge(e, o), d = a.attributes;
357
+ if (o.inline && (r.verticalAlign = "-0.125em"), t === "svg") {
358
+ s.style = {
359
+ ...r,
360
360
  ...i
361
- }, Object.assign(r, d);
362
- let f = 0, l = n.id;
363
- return typeof l == "string" && (l = l.replace(/-/g, "_")), r.innerHTML = mt(a.body, l ? () => l + "ID" + f++ : "iconifyVue"), T("svg", r);
361
+ }, Object.assign(s, d);
362
+ let p = 0, c = n.id;
363
+ return typeof c == "string" && (c = c.replace(/-/g, "_")), s.innerHTML = _e(a.body, c ? () => c + "ID" + p++ : "iconifyVue"), L("svg", s);
364
364
  }
365
- const { body: g, width: u, height: v } = t, p = e === "mask" || (e === "bg" ? !1 : g.indexOf("currentColor") !== -1), h = _t(g, {
365
+ const { body: v, width: u, height: m } = e, g = t === "mask" || (t === "bg" ? !1 : v.indexOf("currentColor") !== -1), h = Se(v, {
366
366
  ...d,
367
367
  width: u + "",
368
- height: v + ""
368
+ height: m + ""
369
369
  });
370
- return r.style = {
371
- ...s,
372
- "--svg": St(h),
373
- width: V(d.width),
374
- height: V(d.height),
375
- ...yt,
376
- ...p ? A : Y,
370
+ return s.style = {
371
+ ...r,
372
+ "--svg": ye(h),
373
+ width: W(d.width),
374
+ height: W(d.height),
375
+ ...$e,
376
+ ...g ? D : Z,
377
377
  ...i
378
- }, T("span", r);
379
- }, Z = /* @__PURE__ */ Object.create(null);
380
- function E(t, n) {
381
- Z[t] = n;
378
+ }, L("span", s);
379
+ }, ee = /* @__PURE__ */ Object.create(null);
380
+ function k(e, n) {
381
+ ee[e] = n;
382
382
  }
383
- const $t = G({
383
+ const Ie = F({
384
384
  inheritAttrs: !1,
385
385
  render() {
386
- const t = this.$attrs, n = t.icon, o = typeof n == "string" ? Z[n] : typeof n == "object" ? n : null;
387
- return o === null || typeof o != "object" || typeof o.body != "string" ? this.$slots.default ? this.$slots.default() : null : Ct({
388
- ...z,
386
+ const e = this.$attrs, n = e.icon, o = typeof n == "string" ? ee[n] : typeof n == "object" ? n : null;
387
+ return o === null || typeof o != "object" || typeof o.body != "string" ? this.$slots.default ? this.$slots.default() : null : ke({
388
+ ...T,
389
389
  ...o
390
- }, t);
390
+ }, e);
391
391
  }
392
- }), kt = G({
392
+ }), Pe = F({
393
393
  components: {
394
- CountShow: K,
395
- Icon: $t
394
+ CountShow: q,
395
+ Icon: Ie
396
396
  },
397
397
  name: "group-show",
398
398
  props: {
399
399
  deviceGroup: Object,
400
400
  controlParams: Object
401
401
  },
402
- setup(t) {
403
- function n(s) {
404
- var c;
405
- return ((c = s && s.filter((i) => {
406
- var a;
407
- return !((a = t.controlParams) != null && a.onlyShowOnline) || i.online;
408
- })) == null ? void 0 : c.filter((i) => {
402
+ setup(e) {
403
+ const n = te("theme");
404
+ function o(r) {
405
+ var l;
406
+ return ((l = r && r.filter((i) => {
409
407
  var a;
410
- return t.controlParams ? i.name.indexOf((a = t.controlParams) == null ? void 0 : a.searchStr) >= 0 : !0;
408
+ return !((a = e.controlParams) != null && a.onlyShowOnline) || i.online;
409
+ })) == null ? void 0 : l.filter((i) => {
410
+ var a, d;
411
+ return e.controlParams ? i.name.indexOf((a = e.controlParams) == null ? void 0 : a.searchStr) >= 0 || i.id.indexOf((d = e.controlParams) == null ? void 0 : d.searchStr) : !0;
411
412
  })) || [];
412
413
  }
413
- const o = O(() => {
414
- var s, c;
415
- const i = t.controlParams.searchStr;
416
- return i.length == 0 || t.deviceGroup && ((s = t.deviceGroup) == null ? void 0 : s.name.indexOf(i)) > 0 ? !0 : (c = t.deviceGroup) == null ? void 0 : c.devices.find((a) => a.name.indexOf(t.controlParams.searchStr) > 0);
417
- });
418
- function r(s) {
419
- return t.controlParams.searchStr.length == 0 ? !0 : s.name.indexOf(t.controlParams.searchStr) > 0;
420
- }
421
- const e = F(!1);
414
+ const s = M(() => {
415
+ var r, l;
416
+ const i = e.controlParams.searchStr;
417
+ return i.length == 0 || e.deviceGroup && ((r = e.deviceGroup) == null ? void 0 : r.name.indexOf(i)) > 0 ? !0 : (l = e.deviceGroup) == null ? void 0 : l.devices.find((a) => a.name.indexOf(e.controlParams.searchStr) > 0 || a.id.indexOf(e.controlParams.searchStr) > 0);
418
+ }), t = z(!1);
422
419
  return {
423
- showGroup: o,
424
- showDevice: r,
425
- FilterDevice: n,
426
- bShow: e
420
+ showGroup: s,
421
+ FilterDevice: o,
422
+ bShow: t,
423
+ theme: n
427
424
  };
428
425
  }
429
426
  });
430
- const It = {
427
+ const Ge = {
431
428
  key: 0,
432
- class: "group"
433
- }, Pt = ["title"], Gt = { class: "group-slot" }, Ot = {
429
+ class: "head-op"
430
+ }, Oe = ["title"], Fe = { class: "group-slot" }, je = {
434
431
  key: 0,
435
432
  style: { "margin-left": "26px" }
436
- }, Ft = ["title"], jt = { class: "device-slot" };
437
- function Mt(t, n, o, r, e, s) {
438
- var c, i;
439
- const a = k("Icon"), d = k("CountShow"), g = k("group-show");
440
- return t.showGroup ? (w(), b("div", It, [
441
- $(d, {
442
- countInfo: t.deviceGroup,
443
- controlParams: t.controlParams
433
+ }, Me = { class: "device-show-div" }, ze = ["title"], He = { class: "device-slot" };
434
+ function Ae(e, n, o, s, t, r) {
435
+ var l, i;
436
+ const a = $("Icon"), d = $("CountShow"), v = $("group-show");
437
+ return e.showGroup ? (f(), b("div", {
438
+ key: 0,
439
+ class: B("group " + e.theme)
440
+ }, [
441
+ I(d, {
442
+ countInfo: e.deviceGroup,
443
+ controlParams: e.controlParams
444
444
  }, {
445
445
  default: C(() => {
446
- var u, v, p, h, f;
446
+ var u, m, g, h, p;
447
447
  return [
448
- $(a, {
449
- icon: "right",
450
- rotate: t.bShow && "90deg",
451
- width: "20",
452
- onClick: n[0] || (n[0] = (l) => t.bShow = !t.bShow),
453
- class: "handle-ls-svg"
454
- }, null, 8, ["rotate"]),
455
- $(a, {
456
- icon: "group",
457
- width: "24",
458
- class: "group-avatar"
459
- }),
460
- S("span", {
461
- class: "group-name",
462
- title: (u = t.deviceGroup) == null ? void 0 : u.name
463
- }, P(((v = t.deviceGroup) == null ? void 0 : v.name) && ((p = t.deviceGroup) == null ? void 0 : p.name.length) > 0 ? (h = t.deviceGroup) == null ? void 0 : h.name : (f = t.deviceGroup) == null ? void 0 : f.id), 9, Pt),
464
- S("div", Gt, [
465
- y(t.$slots, "group", { group: t.deviceGroup }, void 0, !0)
448
+ e.deviceGroup && e.deviceGroup.devices.length + e.deviceGroup.items.length > 0 ? (f(), b("span", Ge, [
449
+ e.bShow ? (f(), P(a, {
450
+ key: 1,
451
+ icon: "minus",
452
+ width: "20",
453
+ onClick: n[1] || (n[1] = (c) => e.bShow = !e.bShow),
454
+ class: "handle-ls-svg"
455
+ })) : (f(), P(a, {
456
+ key: 0,
457
+ icon: "plus",
458
+ width: "20",
459
+ onClick: n[0] || (n[0] = (c) => e.bShow = !e.bShow),
460
+ class: "handle-ls-svg"
461
+ }))
462
+ ])) : j("", !0),
463
+ _("span", {
464
+ class: "group-head-db-click",
465
+ onDblclick: n[2] || (n[2] = (c) => e.bShow = !e.bShow)
466
+ }, [
467
+ I(a, {
468
+ icon: "group",
469
+ width: "24",
470
+ class: "group-avatar"
471
+ }),
472
+ _("span", {
473
+ class: "group-name",
474
+ title: (u = e.deviceGroup) == null ? void 0 : u.name
475
+ }, O(((m = e.deviceGroup) == null ? void 0 : m.name) && ((g = e.deviceGroup) == null ? void 0 : g.name.length) > 0 ? (h = e.deviceGroup) == null ? void 0 : h.name : (p = e.deviceGroup) == null ? void 0 : p.id), 9, Oe)
476
+ ], 32),
477
+ _("div", Fe, [
478
+ y(e.$slots, "group", { group: e.deviceGroup }, void 0, !0)
466
479
  ])
467
480
  ];
468
481
  }),
469
482
  _: 3
470
483
  }, 8, ["countInfo", "controlParams"]),
471
- t.bShow ? (w(), b("div", Ot, [
472
- (w(!0), b(j, null, M((c = t.deviceGroup) == null ? void 0 : c.items, (u, v) => (w(), W(g, {
473
- key: v,
484
+ e.bShow ? (f(), b("div", je, [
485
+ (f(!0), b(H, null, A((l = e.deviceGroup) == null ? void 0 : l.items, (u, m) => (f(), P(v, {
486
+ key: m,
474
487
  deviceGroup: u,
475
- controlParams: t.controlParams
488
+ controlParams: e.controlParams
476
489
  }, {
477
- group: C(({ group: p }) => [
478
- y(t.$slots, "group", { group: p }, void 0, !0)
490
+ group: C(({ group: g }) => [
491
+ y(e.$slots, "group", { group: g }, void 0, !0)
479
492
  ]),
480
- device: C(({ device: p, group: h }) => [
481
- y(t.$slots, "device", {
482
- device: p,
493
+ device: C(({ device: g, group: h }) => [
494
+ y(e.$slots, "device", {
495
+ device: g,
483
496
  group: h
484
497
  }, void 0, !0)
485
498
  ]),
486
499
  _: 2
487
500
  }, 1032, ["deviceGroup", "controlParams"]))), 128)),
488
- (w(!0), b(j, null, M(t.FilterDevice((i = t.deviceGroup) == null ? void 0 : i.devices), (u, v) => (w(), b("div", {
489
- key: v,
490
- class: tt(["device", u.online && "online-device"])
491
- }, [
492
- $(a, {
493
- icon: "user",
494
- width: "16",
495
- class: "device-avatar"
496
- }),
497
- S("span", {
498
- title: u.id,
499
- class: "device-name"
500
- }, P(u.name.length > 0 ? u.name : u.id), 9, Ft),
501
- S("div", jt, [
502
- y(t.$slots, "device", {
503
- device: u,
504
- group: t.deviceGroup
505
- }, void 0, !0)
506
- ])
507
- ], 2))), 128))
508
- ])) : H("", !0)
509
- ])) : H("", !0);
501
+ _("div", Me, [
502
+ (f(!0), b(H, null, A(e.FilterDevice((i = e.deviceGroup) == null ? void 0 : i.devices), (u, m) => (f(), b("div", {
503
+ key: m,
504
+ class: B(["device", u.online && "online-device"])
505
+ }, [
506
+ I(a, {
507
+ icon: "user",
508
+ width: "16",
509
+ class: "device-avatar"
510
+ }),
511
+ _("span", {
512
+ title: u.id,
513
+ class: "device-name"
514
+ }, O(u.name.length > 0 ? u.name : u.id), 9, ze),
515
+ _("div", He, [
516
+ y(e.$slots, "device", {
517
+ device: u,
518
+ group: e.deviceGroup
519
+ }, void 0, !0)
520
+ ])
521
+ ], 2))), 128))
522
+ ])
523
+ ])) : j("", !0)
524
+ ], 2)) : j("", !0);
510
525
  }
511
- const At = /* @__PURE__ */ D(kt, [["render", Mt], ["__scopeId", "data-v-84ced3c6"]]), Dt = {
526
+ const De = /* @__PURE__ */ E(Pe, [["render", Ae], ["__scopeId", "data-v-a9d269de"]]), Ee = {
512
527
  width: 1024,
513
528
  height: 1024,
514
529
  body: '<path fill="currentColor" d="M384 192v640l384-320.064z"/>'
515
- }, zt = {
530
+ }, Te = {
516
531
  width: 1024,
517
532
  height: 1024,
518
533
  body: '<path fill="currentColor" d="M878.08 448H241.92l-96 384h636.16l96-384zM832 384v-64H485.76L357.504 192H128v448l57.92-231.744A32 32 0 0 1 216.96 384H832zm-24.96 512H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h287.872l128.384 128H864a32 32 0 0 1 32 32v96h23.04a32 32 0 0 1 31.04 39.744l-112 448A32 32 0 0 1 807.04 896z"/>'
519
- }, Et = {
534
+ }, Le = {
520
535
  width: 1024,
521
536
  height: 1024,
522
537
  body: '<path fill="currentColor" d="M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704l116.736-175.104zM720 304a208 208 0 1 1-416 0a208 208 0 0 1 416 0z"/>'
538
+ }, Be = {
539
+ width: 1024,
540
+ height: 1024,
541
+ body: '<path fill="currentColor" d="M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64h352z"/>'
542
+ }, Ne = {
543
+ width: 1024,
544
+ height: 1024,
545
+ body: '<path fill="currentColor" d="M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z"/>'
523
546
  };
524
- E("right", Dt);
525
- E("group", zt);
526
- E("user", Et);
527
- const Tt = G({
547
+ k("right", Ee);
548
+ k("group", Te);
549
+ k("user", Le);
550
+ k("plus", Be);
551
+ k("minus", Ne);
552
+ const Re = F({
528
553
  components: {
529
- CountShow: K,
530
- GroupShow: At
554
+ CountShow: q,
555
+ GroupShow: De
531
556
  },
532
557
  props: {
533
- deviceGroup: Object
558
+ deviceGroup: Object,
559
+ theme: {
560
+ type: String,
561
+ default: ""
562
+ }
534
563
  },
535
564
  methods: {
536
565
  onCheckBoxChange() {
537
566
  this.controlParams.onlyShowOnline = !this.controlParams.onlyShowOnline;
538
567
  },
539
568
  onSearchChange() {
540
- var t;
541
- this.inputSearchRef && (this.controlParams.searchStr = (t = this.inputSearchRef) == null ? void 0 : t.value);
569
+ var e;
570
+ this.inputSearchRef && (this.controlParams.searchStr = (e = this.inputSearchRef) == null ? void 0 : e.value);
542
571
  },
543
- search(t) {
544
- this.controlParams.searchStr = t;
572
+ search(e) {
573
+ this.controlParams.searchStr = e;
545
574
  }
546
575
  },
547
- setup() {
548
- const t = F({
576
+ setup(e) {
577
+ oe("theme", e.theme);
578
+ const n = z({
549
579
  onlyShowOnline: !1,
550
580
  searchStr: ""
551
581
  });
552
582
  return {
553
- inputSearchRef: F(),
554
- controlParams: t
583
+ inputSearchRef: z(),
584
+ controlParams: n
555
585
  };
556
586
  }
557
587
  });
558
- const Ht = (t) => (et("data-v-62984bb5"), t = t(), ot(), t), xt = { class: "device-group-list" }, Lt = { class: "search-panel" }, Bt = /* @__PURE__ */ Ht(() => /* @__PURE__ */ S("label", { for: "onlineShow" }, "\u53EA\u663E\u793A\u5728\u7EBF\u8BBE\u5907", -1)), Nt = { class: "device-panel" };
559
- function Rt(t, n, o, r, e, s) {
560
- var c;
561
- const i = k("CountShow"), a = k("group-show");
562
- return w(), b("div", xt, [
563
- S("div", Lt, [
564
- $(i, { countInfo: t.deviceGroup }, {
588
+ const Ve = (e) => (ne("data-v-7e0a8034"), e = e(), se(), e), xe = { class: "device-group-list" }, Ue = { class: "search-panel" }, We = /* @__PURE__ */ Ve(() => /* @__PURE__ */ _("label", { for: "onlineShow" }, "\u53EA\u663E\u793A\u5728\u7EBF\u8BBE\u5907", -1)), Ke = { class: "device-panel" };
589
+ function qe(e, n, o, s, t, r) {
590
+ var l;
591
+ const i = $("CountShow"), a = $("group-show");
592
+ return f(), b("div", xe, [
593
+ _("div", Ue, [
594
+ I(i, { countInfo: e.deviceGroup }, {
565
595
  default: C(() => [
566
- S("input", {
596
+ _("input", {
567
597
  type: "checkbox",
568
598
  id: "onlineShow",
569
599
  value: "onlineShow",
570
- onChange: n[0] || (n[0] = (...d) => t.onCheckBoxChange && t.onCheckBoxChange(...d))
600
+ onChange: n[0] || (n[0] = (...d) => e.onCheckBoxChange && e.onCheckBoxChange(...d))
571
601
  }, null, 32),
572
- Bt
602
+ We
573
603
  ]),
574
604
  _: 1
575
605
  }, 8, ["countInfo"])
576
606
  ]),
577
- S("div", Nt, [
578
- (w(!0), b(j, null, M((c = t.deviceGroup) == null ? void 0 : c.items, (d, g) => (w(), W(a, {
579
- controlParams: t.controlParams,
580
- key: g,
607
+ _("div", Ke, [
608
+ (f(!0), b(H, null, A((l = e.deviceGroup) == null ? void 0 : l.items, (d, v) => (f(), P(a, {
609
+ controlParams: e.controlParams,
610
+ key: v,
581
611
  deviceGroup: d
582
612
  }, {
583
613
  group: C(({ group: u }) => [
584
- y(t.$slots, "group", { group: u }, void 0, !0)
614
+ y(e.$slots, "group", { group: u }, void 0, !0)
585
615
  ]),
586
- device: C(({ device: u, group: v }) => [
587
- y(t.$slots, "device", {
616
+ device: C(({ device: u, group: m }) => [
617
+ y(e.$slots, "device", {
588
618
  device: u,
589
- group: v
619
+ group: m
590
620
  }, void 0, !0)
591
621
  ]),
592
622
  _: 2
@@ -594,18 +624,18 @@ function Rt(t, n, o, r, e, s) {
594
624
  ])
595
625
  ]);
596
626
  }
597
- const Vt = /* @__PURE__ */ D(Tt, [["render", Rt], ["__scopeId", "data-v-62984bb5"]]), U = {
598
- RecursionDeviceGroup: Vt
599
- }, Wt = {
600
- install(t) {
601
- for (const n in U) {
602
- const o = U[n];
603
- t.component(n, o);
627
+ const Je = /* @__PURE__ */ E(Re, [["render", qe], ["__scopeId", "data-v-7e0a8034"]]), K = {
628
+ RecursionDeviceGroup: Je
629
+ }, Xe = {
630
+ install(e) {
631
+ for (const n in K) {
632
+ const o = K[n];
633
+ e.component(n, o);
604
634
  }
605
635
  }
606
636
  };
607
637
  export {
608
- x as RecursionDeviceGroup,
609
- Wt as default
638
+ N as RecursionDeviceGroup,
639
+ Xe as default
610
640
  };
611
641
  //# sourceMappingURL=smarteye-e-components.mjs.map