@nice2dev/ui-iot 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,34 +1,11 @@
1
- import { jsx as e, jsxs as r, Fragment as P } from "react/jsx-runtime";
2
- import { useContext as B, createContext as M, memo as oe, useState as u, useEffect as te, useCallback as C } from "react";
3
- const de = (a, i) => i, se = M(de), le = M("en");
4
- function R() {
5
- const a = B(se), i = B(le);
6
- return { t: a, lang: i };
1
+ import { jsx as e, jsxs as i, Fragment as A } from "react/jsx-runtime";
2
+ import { useContext as I, createContext as x, useState as g, useCallback as f } from "react";
3
+ const K = (a, r) => r, Y = /* @__PURE__ */ x(K), J = /* @__PURE__ */ x("en");
4
+ function b() {
5
+ const a = I(Y), r = I(J);
6
+ return { t: a, lang: r };
7
7
  }
8
- const fe = {
9
- radius: "md",
10
- shadow: "md",
11
- fill: "solid",
12
- buttonStyle: "flat",
13
- inputStyle: "bordered",
14
- cardStyle: "elevated",
15
- badgeStyle: "solid",
16
- tabStyle: "underline",
17
- toggleStyle: "default",
18
- tooltipStyle: "dark",
19
- modalStyle: "default",
20
- tableStyle: "default",
21
- menuStyle: "default",
22
- animation: "normal",
23
- density: "normal"
24
- };
25
- M({
26
- displayStyle: "default",
27
- variantConfig: fe,
28
- setDisplayStyle: () => {
29
- }
30
- });
31
- const me = {
8
+ const X = {
32
9
  // Navigation
33
10
  "chevron-down": "M6 9l6 6 6-6",
34
11
  "chevron-up": "M18 15l-6-6-6 6",
@@ -78,6 +55,8 @@ const me = {
78
55
  link: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",
79
56
  mail: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",
80
57
  phone: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",
58
+ // the device, as `phone` is the handset
59
+ smartphone: "M7 2h10a2 2 0 012 2v16a2 2 0 01-2 2H7a2 2 0 01-2-2V4a2 2 0 012-2z M11 18h2",
81
60
  user: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",
82
61
  users: "M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",
83
62
  home: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",
@@ -224,1789 +203,123 @@ const me = {
224
203
  keyboard: "M4 6h16a2 2 0 012 2v8a2 2 0 01-2 2H4a2 2 0 01-2-2V8a2 2 0 012-2z M6 10h.01 M10 10h.01 M14 10h.01 M18 10h.01 M8 14h8",
225
204
  "page-break": "M6 3v5h12V3 M6 21v-5h12v5 M2 12h3 M8 12h3 M13 12h3 M19 12h3",
226
205
  shield: "M12 2l8 3v6c0 5-3.4 9.4-8 11-4.6-1.6-8-6-8-11V5z",
227
- repeat: "M17 2l4 4-4 4 M3 11V9a4 4 0 014-4h14 M7 22l-4-4 4-4 M21 13v2a4 4 0 01-4 4H3"
228
- }, he = {
206
+ repeat: "M17 2l4 4-4 4 M3 11V9a4 4 0 014-4h14 M7 22l-4-4 4-4 M21 13v2a4 4 0 01-4 4H3",
207
+ // 1.2.1: for the controls that drew these as inline <svg>
208
+ pin: "M12 17v5 M5 17h14l-1.5-3V8a2 2 0 00-2-2h-7a2 2 0 00-2 2v6z",
209
+ "mic-off": "M1 1l22 22 M9 9v3a3 3 0 005.12 2.12 M15 9.34V4a3 3 0 00-5.94-.6 M17 16.95A7 7 0 015 12v-2 M19 10v2a7 7 0 01-.11 1.23 M12 19v4 M8 23h8",
210
+ "log-out": "M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4 M16 17l5-5-5-5 M21 12H9",
211
+ "chevrons-left": "M11 17l-5-5 5-5 M18 17l-5-5 5-5",
212
+ "chevrons-right": "M13 17l5-5-5-5 M6 17l5-5-5-5",
213
+ "zoom-in": "M11 4a7 7 0 100 14 7 7 0 000-14z M21 21l-4.35-4.35 M11 8v6 M8 11h6",
214
+ "zoom-out": "M11 4a7 7 0 100 14 7 7 0 000-14z M21 21l-4.35-4.35 M8 11h6",
215
+ navigation: "M12 2l7 19-7-4-7 4z",
216
+ "refresh-ccw": "M1 4v6h6 M23 20v-6h-6 M20.49 9A9 9 0 005.64 5.64L1 10 M3.51 15a9 9 0 0014.85 3.36L23 14",
217
+ minimize: "M4 14h6v6 M20 10h-6V4 M14 10l7-7 M3 21l7-7"
218
+ }, Z = {
229
219
  xs: 12,
230
220
  sm: 16,
231
221
  md: 20,
232
222
  lg: 24,
233
223
  xl: 32
234
- }, pe = M({});
235
- function ye({
224
+ }, ee = /* @__PURE__ */ x({});
225
+ function ae({
236
226
  path: a,
237
- size: i,
238
- className: c,
227
+ size: r,
228
+ className: l,
239
229
  style: n,
240
- color: t,
241
- title: o,
242
- onClick: d
230
+ color: c,
231
+ title: t,
232
+ onClick: o
243
233
  }) {
244
- return /* @__PURE__ */ r(
234
+ return /* @__PURE__ */ i(
245
235
  "svg",
246
236
  {
247
237
  xmlns: "http://www.w3.org/2000/svg",
248
- width: i,
249
- height: i,
238
+ width: r,
239
+ height: r,
250
240
  viewBox: "0 0 24 24",
251
241
  fill: "none",
252
- stroke: t || "currentColor",
242
+ stroke: c || "currentColor",
253
243
  strokeWidth: 2,
254
244
  strokeLinecap: "round",
255
245
  strokeLinejoin: "round",
256
- className: `nice-icon ${c || ""}`,
246
+ className: `nice-icon ${l || ""}`,
257
247
  style: n,
258
- role: o ? "img" : "presentation",
259
- "aria-label": o,
260
- "aria-hidden": !o,
261
- onClick: d,
248
+ role: t ? "img" : "presentation",
249
+ "aria-label": t,
250
+ "aria-hidden": !t,
251
+ onClick: o,
262
252
  children: [
263
- o && /* @__PURE__ */ e("title", { children: o }),
253
+ t && /* @__PURE__ */ e("title", { children: t }),
264
254
  /* @__PURE__ */ e("path", { d: a })
265
255
  ]
266
256
  }
267
257
  );
268
258
  }
269
- const p = ({
259
+ const m = ({
270
260
  name: a,
271
- size: i = "md",
272
- className: c,
261
+ size: r = "md",
262
+ className: l,
273
263
  style: n,
274
- color: t,
275
- title: o,
276
- onClick: d
264
+ color: c,
265
+ title: t,
266
+ onClick: o
277
267
  }) => {
278
- const { resolver: l } = B(pe), b = typeof i == "number" ? i : he[i];
279
- if (l) {
280
- const _ = l(a, b);
281
- if (_)
282
- return /* @__PURE__ */ e("span", { className: `nice-icon-wrap ${c || ""}`, style: n, onClick: d, children: _ });
268
+ const { resolver: s } = I(ee), h = typeof r == "number" ? r : Z[r];
269
+ if (s) {
270
+ const u = s(a, h);
271
+ if (u)
272
+ return /* @__PURE__ */ e("span", { className: `nice-icon-wrap ${l || ""}`, style: n, onClick: o, children: u });
283
273
  }
284
- const m = me[a];
285
- return m ? /* @__PURE__ */ e(
286
- ye,
274
+ const p = X[a];
275
+ return p ? /* @__PURE__ */ e(
276
+ ae,
287
277
  {
288
- path: m,
289
- size: b,
290
- className: c,
278
+ path: p,
279
+ size: h,
280
+ className: l,
291
281
  style: n,
292
- color: t,
293
- title: o,
294
- onClick: d
282
+ color: c,
283
+ title: t,
284
+ onClick: o
295
285
  }
296
286
  ) : null;
297
287
  };
298
- M({
299
- direction: "ltr",
300
- isRTL: !1,
301
- flip: (a) => a,
302
- flipStyle: (a, i) => ({ [a]: i })
303
- });
304
- M({
305
- permissions: {},
306
- getAccessMode: () => "full"
307
- });
308
- M(null);
309
- function ue() {
288
+ process.env.NODE_ENV;
289
+ process.env.NODE_ENV;
290
+ process.env.NODE_ENV;
291
+ process.env.NODE_ENV;
292
+ process.env.NODE_ENV;
293
+ process.env.NODE_ENV;
294
+ function ie() {
310
295
  const a = globalThis.crypto;
311
296
  if (typeof (a == null ? void 0 : a.randomUUID) == "function")
312
297
  return a.randomUUID();
313
- const i = new Uint8Array(16);
298
+ const r = new Uint8Array(16);
314
299
  if (typeof (a == null ? void 0 : a.getRandomValues) == "function")
315
- a.getRandomValues(i);
300
+ a.getRandomValues(r);
316
301
  else
317
- for (let n = 0; n < i.length; n++)
318
- i[n] = Math.floor(Math.random() * 256);
319
- i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128;
320
- const c = Array.from(i, (n) => n.toString(16).padStart(2, "0")).join("");
321
- return `${c.slice(0, 8)}-${c.slice(8, 12)}-${c.slice(12, 16)}-${c.slice(16, 20)}-${c.slice(20)}`;
322
- }
323
- M(null);
324
- const Y = {
325
- space1: "4px",
326
- space2: "8px",
327
- space3: "12px",
328
- space4: "16px",
329
- space5: "20px",
330
- space6: "24px",
331
- space8: "32px"
332
- }, Z = {
333
- fontFamily: "'Inter', system-ui, -apple-system, sans-serif",
334
- fontSizeXs: "0.75rem",
335
- fontSizeSm: "0.8125rem",
336
- fontSizeMd: "0.875rem",
337
- fontSizeLg: "1rem",
338
- fontSizeXl: "1.125rem",
339
- fontWeightNormal: 400,
340
- fontWeightMedium: 500,
341
- fontWeightSemibold: 600,
342
- fontWeightBold: 700,
343
- lineHeight: 1.5
344
- }, ee = { fast: "120ms ease", normal: "200ms ease", slow: "300ms ease" }, ae = (a) => ({
345
- color: a,
346
- radiusSm: "4px",
347
- radiusMd: "6px",
348
- radiusLg: "8px",
349
- radiusXl: "12px",
350
- radiusFull: "9999px"
351
- }), ve = {
352
- sm: "0 1px 2px rgba(0,0,0,0.05)",
353
- md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
354
- lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
355
- xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
356
- }, be = {
357
- sm: "0 1px 2px rgba(0,0,0,0.3)",
358
- md: "0 4px 6px -1px rgba(0,0,0,0.4)",
359
- lg: "0 10px 15px -3px rgba(0,0,0,0.4)",
360
- xl: "0 20px 25px -5px rgba(0,0,0,0.4)"
361
- };
362
- function s(a, i, c, n, t) {
363
- return {
364
- name: a,
365
- darkMode: "light",
366
- colors: {
367
- ...i,
368
- surface: i.surface ?? c.primary,
369
- surfaceHover: i.surfaceHover ?? c.secondary
370
- },
371
- backgrounds: {
372
- ...c,
373
- elevated: c.elevated ?? c.primary,
374
- inset: c.inset ?? c.tertiary,
375
- canvas: c.canvas ?? c.primary
376
- },
377
- text: { ...n, inverse: n.inverse ?? "#ffffff" },
378
- borders: ae(t),
379
- shadows: ve,
380
- spacing: Y,
381
- typography: Z,
382
- transitions: ee
383
- };
302
+ for (let n = 0; n < r.length; n++)
303
+ r[n] = Math.floor(Math.random() * 256);
304
+ r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128;
305
+ const l = Array.from(r, (n) => n.toString(16).padStart(2, "0")).join("");
306
+ return `${l.slice(0, 8)}-${l.slice(8, 12)}-${l.slice(12, 16)}-${l.slice(16, 20)}-${l.slice(20)}`;
384
307
  }
385
- function h(a, i, c, n, t) {
386
- return {
387
- name: a,
388
- darkMode: "dark",
389
- colors: {
390
- ...i,
391
- surface: i.surface ?? c.secondary,
392
- surfaceHover: i.surfaceHover ?? c.tertiary
393
- },
394
- backgrounds: {
395
- ...c,
396
- elevated: c.elevated ?? c.secondary,
397
- inset: c.inset ?? c.primary,
398
- canvas: c.canvas ?? c.primary
399
- },
400
- text: { ...n, inverse: n.inverse ?? "#0f172a" },
401
- borders: ae(t),
402
- shadows: be,
403
- spacing: Y,
404
- typography: Z,
405
- transitions: ee
406
- };
407
- }
408
- s(
409
- "Slate",
410
- {
411
- primary: "#64748b",
412
- primaryHover: "#475569",
413
- success: "#10b981",
414
- warning: "#f59e0b",
415
- error: "#ef4444",
416
- info: "#06b6d4"
417
- },
418
- { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
419
- { primary: "#1e293b", secondary: "#475569", muted: "#94a3b8" },
420
- "#cbd5e1"
421
- );
422
- s(
423
- "Zinc",
424
- {
425
- primary: "#71717a",
426
- primaryHover: "#52525b",
427
- success: "#22c55e",
428
- warning: "#eab308",
429
- error: "#ef4444",
430
- info: "#06b6d4"
431
- },
432
- { primary: "#fafafa", secondary: "#f4f4f5", tertiary: "#e4e4e7", hover: "#e4e4e7" },
433
- { primary: "#18181b", secondary: "#3f3f46", muted: "#a1a1aa" },
434
- "#d4d4d8"
435
- );
436
- s(
437
- "Stone",
438
- {
439
- primary: "#78716c",
440
- primaryHover: "#57534e",
441
- success: "#16a34a",
442
- warning: "#ca8a04",
443
- error: "#dc2626",
444
- info: "#0891b2"
445
- },
446
- { primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
447
- { primary: "#1c1917", secondary: "#44403c", muted: "#a8a29e" },
448
- "#d6d3d1"
449
- );
450
- s(
451
- "Cool Gray",
452
- {
453
- primary: "#6b7280",
454
- primaryHover: "#4b5563",
455
- success: "#10b981",
456
- warning: "#f59e0b",
457
- error: "#ef4444",
458
- info: "#3b82f6"
459
- },
460
- { primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
461
- { primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
462
- "#d1d5db"
463
- );
464
- s(
465
- "Warm Gray",
466
- {
467
- primary: "#7c7568",
468
- primaryHover: "#5c564c",
469
- success: "#4d7c0f",
470
- warning: "#a16207",
471
- error: "#b91c1c",
472
- info: "#0e7490"
473
- },
474
- { primary: "#faf9f7", secondary: "#f5f4f0", tertiary: "#e8e6e1", hover: "#e8e6e1" },
475
- { primary: "#1f1d19", secondary: "#4a463d", muted: "#a09888" },
476
- "#d4d0c8"
477
- );
478
- s(
479
- "Silver",
480
- {
481
- primary: "#94a3b8",
482
- primaryHover: "#64748b",
483
- success: "#10b981",
484
- warning: "#f59e0b",
485
- error: "#ef4444",
486
- info: "#38bdf8"
487
- },
488
- { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
489
- { primary: "#334155", secondary: "#64748b", muted: "#94a3b8" },
490
- "#cbd5e1"
491
- );
492
- s(
493
- "Charcoal",
494
- {
495
- primary: "#374151",
496
- primaryHover: "#1f2937",
497
- success: "#059669",
498
- warning: "#d97706",
499
- error: "#dc2626",
500
- info: "#0284c7"
501
- },
502
- { primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
503
- { primary: "#111827", secondary: "#374151", muted: "#6b7280" },
504
- "#d1d5db"
505
- );
506
- s(
507
- "Ivory",
508
- {
509
- primary: "#92876d",
510
- primaryHover: "#7a6f55",
511
- success: "#4d7c0f",
512
- warning: "#a16207",
513
- error: "#b91c1c",
514
- info: "#0e7490"
515
- },
516
- { primary: "#fffef7", secondary: "#faf6eb", tertiary: "#f0ead6", hover: "#f0ead6" },
517
- { primary: "#2b2517", secondary: "#5c5340", muted: "#9c9280" },
518
- "#ddd8c4"
519
- );
520
- s(
521
- "Rose",
522
- {
523
- primary: "#e11d48",
524
- primaryHover: "#be123c",
525
- success: "#16a34a",
526
- warning: "#ea580c",
527
- error: "#dc2626",
528
- info: "#0891b2"
529
- },
530
- { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
531
- { primary: "#4c0519", secondary: "#881337", muted: "#f43f5e" },
532
- "#fda4af"
533
- );
534
- s(
535
- "Emerald",
536
- {
537
- primary: "#059669",
538
- primaryHover: "#047857",
539
- success: "#16a34a",
540
- warning: "#d97706",
541
- error: "#dc2626",
542
- info: "#0891b2"
543
- },
544
- { primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
545
- { primary: "#064e3b", secondary: "#065f46", muted: "#34d399" },
546
- "#6ee7b7"
547
- );
548
- s(
549
- "Amber",
550
- {
551
- primary: "#d97706",
552
- primaryHover: "#b45309",
553
- success: "#16a34a",
554
- warning: "#ca8a04",
555
- error: "#dc2626",
556
- info: "#0284c7"
557
- },
558
- { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
559
- { primary: "#451a03", secondary: "#78350f", muted: "#f59e0b" },
560
- "#fcd34d"
561
- );
562
- s(
563
- "Violet",
564
- {
565
- primary: "#7c3aed",
566
- primaryHover: "#6d28d9",
567
- success: "#10b981",
568
- warning: "#f59e0b",
569
- error: "#ef4444",
570
- info: "#06b6d4"
571
- },
572
- { primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
573
- { primary: "#2e1065", secondary: "#4c1d95", muted: "#a78bfa" },
574
- "#c4b5fd"
575
- );
576
- s(
577
- "Teal",
578
- {
579
- primary: "#0d9488",
580
- primaryHover: "#0f766e",
581
- success: "#16a34a",
582
- warning: "#d97706",
583
- error: "#dc2626",
584
- info: "#0284c7"
585
- },
586
- { primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
587
- { primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
588
- "#5eead4"
589
- );
590
- s(
591
- "Indigo",
592
- {
593
- primary: "#4f46e5",
594
- primaryHover: "#4338ca",
595
- success: "#10b981",
596
- warning: "#f59e0b",
597
- error: "#ef4444",
598
- info: "#06b6d4"
599
- },
600
- { primary: "#eef2ff", secondary: "#e0e7ff", tertiary: "#c7d2fe", hover: "#e0e7ff" },
601
- { primary: "#1e1b4b", secondary: "#312e81", muted: "#818cf8" },
602
- "#a5b4fc"
603
- );
604
- s(
605
- "Cyan",
606
- {
607
- primary: "#0891b2",
608
- primaryHover: "#0e7490",
609
- success: "#10b981",
610
- warning: "#f59e0b",
611
- error: "#ef4444",
612
- info: "#0284c7"
613
- },
614
- { primary: "#ecfeff", secondary: "#cffafe", tertiary: "#a5f3fc", hover: "#cffafe" },
615
- { primary: "#164e63", secondary: "#155e75", muted: "#22d3ee" },
616
- "#67e8f9"
617
- );
618
- s(
619
- "Lime",
620
- {
621
- primary: "#65a30d",
622
- primaryHover: "#4d7c0f",
623
- success: "#16a34a",
624
- warning: "#ca8a04",
625
- error: "#dc2626",
626
- info: "#0891b2"
627
- },
628
- { primary: "#f7fee7", secondary: "#ecfccb", tertiary: "#d9f99d", hover: "#ecfccb" },
629
- { primary: "#1a2e05", secondary: "#365314", muted: "#84cc16" },
630
- "#bef264"
631
- );
632
- s(
633
- "Pink",
634
- {
635
- primary: "#db2777",
636
- primaryHover: "#be185d",
637
- success: "#10b981",
638
- warning: "#f59e0b",
639
- error: "#dc2626",
640
- info: "#06b6d4"
641
- },
642
- { primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
643
- { primary: "#500724", secondary: "#831843", muted: "#f472b6" },
644
- "#f9a8d4"
645
- );
646
- s(
647
- "Orange",
648
- {
649
- primary: "#ea580c",
650
- primaryHover: "#c2410c",
651
- success: "#16a34a",
652
- warning: "#ca8a04",
653
- error: "#dc2626",
654
- info: "#0891b2"
655
- },
656
- { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
657
- { primary: "#431407", secondary: "#7c2d12", muted: "#fb923c" },
658
- "#fdba74"
659
- );
660
- s(
661
- "Fuchsia",
662
- {
663
- primary: "#c026d3",
664
- primaryHover: "#a21caf",
665
- success: "#10b981",
666
- warning: "#eab308",
667
- error: "#ef4444",
668
- info: "#06b6d4"
669
- },
670
- { primary: "#fdf4ff", secondary: "#fae8ff", tertiary: "#f5d0fe", hover: "#fae8ff" },
671
- { primary: "#4a044e", secondary: "#701a75", muted: "#d946ef" },
672
- "#e879f9"
673
- );
674
- s(
675
- "Sky",
676
- {
677
- primary: "#0284c7",
678
- primaryHover: "#0369a1",
679
- success: "#10b981",
680
- warning: "#f59e0b",
681
- error: "#ef4444",
682
- info: "#06b6d4"
683
- },
684
- { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
685
- { primary: "#0c4a6e", secondary: "#075985", muted: "#38bdf8" },
686
- "#7dd3fc"
687
- );
688
- s(
689
- "Ruby",
690
- {
691
- primary: "#be123c",
692
- primaryHover: "#9f1239",
693
- success: "#059669",
694
- warning: "#d97706",
695
- error: "#dc2626",
696
- info: "#0284c7"
697
- },
698
- { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
699
- { primary: "#4c0519", secondary: "#881337", muted: "#fb7185" },
700
- "#fda4af"
701
- );
702
- s(
703
- "Coral",
704
- {
705
- primary: "#f97316",
706
- primaryHover: "#ea580c",
707
- success: "#10b981",
708
- warning: "#eab308",
709
- error: "#ef4444",
710
- info: "#06b6d4"
711
- },
712
- { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
713
- { primary: "#431407", secondary: "#9a3412", muted: "#fb923c" },
714
- "#fdba74"
715
- );
716
- h(
717
- "Midnight",
718
- {
719
- primary: "#818cf8",
720
- primaryHover: "#6366f1",
721
- success: "#34d399",
722
- warning: "#fbbf24",
723
- error: "#f87171",
724
- info: "#22d3ee"
725
- },
726
- { primary: "#020617", secondary: "#0f172a", tertiary: "#1e293b", hover: "#1e293b" },
727
- { primary: "#f1f5f9", secondary: "#94a3b8", muted: "#475569" },
728
- "#1e293b"
729
- );
730
- h(
731
- "Obsidian",
732
- {
733
- primary: "#a78bfa",
734
- primaryHover: "#8b5cf6",
735
- success: "#4ade80",
736
- warning: "#facc15",
737
- error: "#fb7185",
738
- info: "#38bdf8"
739
- },
740
- { primary: "#09090b", secondary: "#18181b", tertiary: "#27272a", hover: "#27272a" },
741
- { primary: "#fafafa", secondary: "#a1a1aa", muted: "#52525b" },
742
- "#3f3f46"
743
- );
744
- h(
745
- "Eclipse",
746
- {
747
- primary: "#c084fc",
748
- primaryHover: "#a855f7",
749
- success: "#34d399",
750
- warning: "#fbbf24",
751
- error: "#f87171",
752
- info: "#67e8f9"
753
- },
754
- { primary: "#0c0a1d", secondary: "#1a1533", tertiary: "#2a2248", hover: "#2a2248" },
755
- { primary: "#f5f3ff", secondary: "#a78bfa", muted: "#6d5eac" },
756
- "#3b3266"
757
- );
758
- h(
759
- "Onyx",
760
- {
761
- primary: "#60a5fa",
762
- primaryHover: "#3b82f6",
763
- success: "#4ade80",
764
- warning: "#fbbf24",
765
- error: "#f87171",
766
- info: "#22d3ee"
767
- },
768
- { primary: "#000000", secondary: "#0a0a0a", tertiary: "#171717", hover: "#171717" },
769
- { primary: "#ffffff", secondary: "#a3a3a3", muted: "#525252" },
770
- "#262626"
771
- );
772
- h(
773
- "Carbon",
774
- {
775
- primary: "#38bdf8",
776
- primaryHover: "#0ea5e9",
777
- success: "#4ade80",
778
- warning: "#facc15",
779
- error: "#f87171",
780
- info: "#67e8f9"
781
- },
782
- { primary: "#161616", secondary: "#262626", tertiary: "#393939", hover: "#393939" },
783
- { primary: "#f4f4f4", secondary: "#c6c6c6", muted: "#6f6f6f" },
784
- "#525252"
785
- );
786
- h(
787
- "Cosmos",
788
- {
789
- primary: "#6366f1",
790
- primaryHover: "#4f46e5",
791
- success: "#34d399",
792
- warning: "#fbbf24",
793
- error: "#f87171",
794
- info: "#22d3ee"
795
- },
796
- { primary: "#030712", secondary: "#111827", tertiary: "#1f2937", hover: "#1f2937" },
797
- // indigo-500 is a dark fill: white on it reads better than the dark default of dark themes
798
- { primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563", onPrimary: "#ffffff" },
799
- "#374151"
800
- );
801
- h(
802
- "Nebula",
803
- {
804
- primary: "#e879f9",
805
- primaryHover: "#d946ef",
806
- success: "#4ade80",
807
- warning: "#fbbf24",
808
- error: "#fb7185",
809
- info: "#67e8f9"
810
- },
811
- { primary: "#0d0117", secondary: "#1a0533", tertiary: "#2d0a52", hover: "#2d0a52" },
812
- { primary: "#fae8ff", secondary: "#d8b4fe", muted: "#7c3aed" },
813
- "#581c87"
814
- );
815
- h(
816
- "Abyss",
817
- {
818
- primary: "#22d3ee",
819
- primaryHover: "#06b6d4",
820
- success: "#34d399",
821
- warning: "#fbbf24",
822
- error: "#f87171",
823
- info: "#38bdf8"
824
- },
825
- { primary: "#001219", secondary: "#002a3a", tertiary: "#003e54", hover: "#003e54" },
826
- { primary: "#e0f2fe", secondary: "#7dd3fc", muted: "#0369a1" },
827
- "#075985"
828
- );
829
- h(
830
- "Shadow",
831
- {
832
- primary: "#a3a3a3",
833
- primaryHover: "#737373",
834
- success: "#4ade80",
835
- warning: "#facc15",
836
- error: "#f87171",
837
- info: "#38bdf8"
838
- },
839
- { primary: "#171717", secondary: "#1f1f1f", tertiary: "#2a2a2a", hover: "#2a2a2a" },
840
- { primary: "#e5e5e5", secondary: "#a3a3a3", muted: "#525252" },
841
- "#404040"
842
- );
843
- h(
844
- "Emerald Dark",
845
- {
846
- primary: "#34d399",
847
- primaryHover: "#10b981",
848
- success: "#4ade80",
849
- warning: "#fbbf24",
850
- error: "#f87171",
851
- info: "#22d3ee"
852
- },
853
- { primary: "#022c22", secondary: "#064e3b", tertiary: "#065f46", hover: "#065f46" },
854
- { primary: "#ecfdf5", secondary: "#6ee7b7", muted: "#047857" },
855
- "#047857"
856
- );
857
- s(
858
- "Forest",
859
- {
860
- primary: "#166534",
861
- primaryHover: "#14532d",
862
- success: "#22c55e",
863
- warning: "#ca8a04",
864
- error: "#dc2626",
865
- info: "#0891b2"
866
- },
867
- { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
868
- { primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
869
- "#86efac"
870
- );
871
- s(
872
- "Ocean",
873
- {
874
- primary: "#0369a1",
875
- primaryHover: "#075985",
876
- success: "#059669",
877
- warning: "#d97706",
878
- error: "#dc2626",
879
- info: "#0284c7"
880
- },
881
- { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
882
- { primary: "#0c4a6e", secondary: "#0369a1", muted: "#38bdf8" },
883
- "#7dd3fc"
884
- );
885
- s(
886
- "Desert",
887
- {
888
- primary: "#b45309",
889
- primaryHover: "#92400e",
890
- success: "#4d7c0f",
891
- warning: "#a16207",
892
- error: "#b91c1c",
893
- info: "#0e7490"
894
- },
895
- { primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
896
- { primary: "#422006", secondary: "#713f12", muted: "#ca8a04" },
897
- "#fde047"
898
- );
899
- s(
900
- "Sunset",
901
- {
902
- primary: "#ea580c",
903
- primaryHover: "#c2410c",
904
- success: "#16a34a",
905
- warning: "#d97706",
906
- error: "#dc2626",
907
- info: "#0891b2"
908
- },
909
- { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
910
- { primary: "#431407", secondary: "#9a3412", muted: "#f97316" },
911
- "#fdba74"
912
- );
913
- s(
914
- "Aurora",
915
- {
916
- primary: "#0d9488",
917
- primaryHover: "#0f766e",
918
- success: "#22c55e",
919
- warning: "#eab308",
920
- error: "#ef4444",
921
- info: "#06b6d4"
922
- },
923
- { primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
924
- { primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
925
- "#5eead4"
926
- );
927
- s(
928
- "Lavender",
929
- {
930
- primary: "#7e22ce",
931
- primaryHover: "#6b21a8",
932
- success: "#16a34a",
933
- warning: "#d97706",
934
- error: "#dc2626",
935
- info: "#0891b2"
936
- },
937
- { primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
938
- { primary: "#3b0764", secondary: "#581c87", muted: "#a855f7" },
939
- "#d8b4fe"
940
- );
941
- s(
942
- "Autumn",
943
- {
944
- primary: "#c2410c",
945
- primaryHover: "#9a3412",
946
- success: "#4d7c0f",
947
- warning: "#a16207",
948
- error: "#b91c1c",
949
- info: "#0e7490"
950
- },
951
- { primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
952
- { primary: "#450a0a", secondary: "#7f1d1d", muted: "#f87171" },
953
- "#fca5a5"
954
- );
955
- s(
956
- "Spring",
957
- {
958
- primary: "#16a34a",
959
- primaryHover: "#15803d",
960
- success: "#22c55e",
961
- warning: "#eab308",
962
- error: "#ef4444",
963
- info: "#06b6d4"
964
- },
965
- { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
966
- { primary: "#14532d", secondary: "#166534", muted: "#4ade80" },
967
- "#86efac"
968
- );
969
- s(
970
- "Arctic",
971
- {
972
- primary: "#0ea5e9",
973
- primaryHover: "#0284c7",
974
- success: "#10b981",
975
- warning: "#f59e0b",
976
- error: "#ef4444",
977
- info: "#06b6d4"
978
- },
979
- { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
980
- { primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
981
- "#bae6fd"
982
- );
983
- s(
984
- "Tropical",
985
- {
986
- primary: "#0d9488",
987
- primaryHover: "#0f766e",
988
- success: "#16a34a",
989
- warning: "#f59e0b",
990
- error: "#ef4444",
991
- info: "#06b6d4"
992
- },
993
- { primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
994
- { primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
995
- "#a7f3d0"
996
- );
997
- s(
998
- "Pastel Rose",
999
- {
1000
- primary: "#f472b6",
1001
- primaryHover: "#ec4899",
1002
- success: "#4ade80",
1003
- warning: "#fcd34d",
1004
- error: "#fb7185",
1005
- info: "#67e8f9"
1006
- },
1007
- { primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
1008
- { primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
1009
- "#f9a8d4"
1010
- );
1011
- s(
1012
- "Pastel Sky",
1013
- {
1014
- primary: "#38bdf8",
1015
- primaryHover: "#0ea5e9",
1016
- success: "#4ade80",
1017
- warning: "#fcd34d",
1018
- error: "#fb7185",
1019
- info: "#67e8f9"
1020
- },
1021
- { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
1022
- { primary: "#075985", secondary: "#0369a1", muted: "#7dd3fc" },
1023
- "#bae6fd"
1024
- );
1025
- s(
1026
- "Pastel Mint",
1027
- {
1028
- primary: "#34d399",
1029
- primaryHover: "#10b981",
1030
- success: "#4ade80",
1031
- warning: "#fcd34d",
1032
- error: "#fb7185",
1033
- info: "#67e8f9"
1034
- },
1035
- { primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
1036
- { primary: "#065f46", secondary: "#047857", muted: "#6ee7b7" },
1037
- "#a7f3d0"
1038
- );
1039
- s(
1040
- "Pastel Peach",
1041
- {
1042
- primary: "#fb923c",
1043
- primaryHover: "#f97316",
1044
- success: "#4ade80",
1045
- warning: "#fcd34d",
1046
- error: "#fb7185",
1047
- info: "#67e8f9"
1048
- },
1049
- { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
1050
- { primary: "#7c2d12", secondary: "#9a3412", muted: "#fdba74" },
1051
- "#fed7aa"
1052
- );
1053
- s(
1054
- "Pastel Lavender",
1055
- {
1056
- primary: "#a78bfa",
1057
- primaryHover: "#8b5cf6",
1058
- success: "#4ade80",
1059
- warning: "#fcd34d",
1060
- error: "#fb7185",
1061
- info: "#67e8f9"
1062
- },
1063
- { primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
1064
- { primary: "#4c1d95", secondary: "#5b21b6", muted: "#c4b5fd" },
1065
- "#ddd6fe"
1066
- );
1067
- s(
1068
- "Pastel Lemon",
1069
- {
1070
- primary: "#facc15",
1071
- primaryHover: "#eab308",
1072
- success: "#4ade80",
1073
- warning: "#fcd34d",
1074
- error: "#fb7185",
1075
- info: "#67e8f9"
1076
- },
1077
- { primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
1078
- { primary: "#713f12", secondary: "#854d0e", muted: "#fde047" },
1079
- "#fef08a"
1080
- );
1081
- s(
1082
- "Pastel Sage",
1083
- {
1084
- primary: "#86efac",
1085
- primaryHover: "#4ade80",
1086
- success: "#22c55e",
1087
- warning: "#fcd34d",
1088
- error: "#fb7185",
1089
- info: "#67e8f9"
1090
- },
1091
- { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
1092
- { primary: "#166534", secondary: "#15803d", muted: "#86efac" },
1093
- "#bbf7d0"
1094
- );
1095
- s(
1096
- "Pastel Coral",
1097
- {
1098
- primary: "#fb7185",
1099
- primaryHover: "#f43f5e",
1100
- success: "#4ade80",
1101
- warning: "#fcd34d",
1102
- error: "#ef4444",
1103
- info: "#67e8f9"
1104
- },
1105
- { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
1106
- { primary: "#881337", secondary: "#9f1239", muted: "#fda4af" },
1107
- "#fecdd3"
1108
- );
1109
- s(
1110
- "Banking",
1111
- {
1112
- primary: "#1e3a5f",
1113
- primaryHover: "#152c4a",
1114
- success: "#059669",
1115
- warning: "#d97706",
1116
- error: "#dc2626",
1117
- info: "#0891b2"
1118
- },
1119
- { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
1120
- { primary: "#0f172a", secondary: "#334155", muted: "#94a3b8" },
1121
- "#cbd5e1"
1122
- );
1123
- s(
1124
- "Healthcare",
1125
- {
1126
- primary: "#0891b2",
1127
- primaryHover: "#0e7490",
1128
- success: "#059669",
1129
- warning: "#d97706",
1130
- error: "#dc2626",
1131
- info: "#0284c7"
1132
- },
1133
- { primary: "#f0fdfa", secondary: "#e0f7fa", tertiary: "#b2ebf2", hover: "#e0f7fa" },
1134
- { primary: "#134e4a", secondary: "#1a6b6a", muted: "#80cbc4" },
1135
- "#b2dfdb"
1136
- );
1137
- s(
1138
- "Legal",
1139
- {
1140
- primary: "#1e293b",
1141
- primaryHover: "#0f172a",
1142
- success: "#059669",
1143
- warning: "#d97706",
1144
- error: "#dc2626",
1145
- info: "#0284c7"
1146
- },
1147
- { primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
1148
- { primary: "#0f172a", secondary: "#44403c", muted: "#a8a29e" },
1149
- "#d6d3d1"
1150
- );
1151
- s(
1152
- "Tech Startup",
1153
- {
1154
- primary: "#7c3aed",
1155
- primaryHover: "#6d28d9",
1156
- success: "#10b981",
1157
- warning: "#f59e0b",
1158
- error: "#ef4444",
1159
- info: "#06b6d4"
1160
- },
1161
- { primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
1162
- { primary: "#1e1b4b", secondary: "#4c1d95", muted: "#a78bfa" },
1163
- "#c4b5fd"
1164
- );
1165
- s(
1166
- "Enterprise",
1167
- {
1168
- primary: "#1e40af",
1169
- primaryHover: "#1e3a8a",
1170
- success: "#059669",
1171
- warning: "#d97706",
1172
- error: "#dc2626",
1173
- info: "#0891b2"
1174
- },
1175
- { primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
1176
- { primary: "#1e3a5f", secondary: "#1e40af", muted: "#60a5fa" },
1177
- "#93c5fd"
1178
- );
1179
- s(
1180
- "Government",
1181
- {
1182
- primary: "#1d4ed8",
1183
- primaryHover: "#1e40af",
1184
- success: "#059669",
1185
- warning: "#d97706",
1186
- error: "#dc2626",
1187
- info: "#0891b2"
1188
- },
1189
- { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
1190
- { primary: "#0f172a", secondary: "#1e293b", muted: "#64748b" },
1191
- "#cbd5e1"
1192
- );
1193
- s(
1194
- "Education",
1195
- {
1196
- primary: "#059669",
1197
- primaryHover: "#047857",
1198
- success: "#16a34a",
1199
- warning: "#f59e0b",
1200
- error: "#ef4444",
1201
- info: "#0891b2"
1202
- },
1203
- { primary: "#f0fdf9", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
1204
- { primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
1205
- "#a7f3d0"
1206
- );
1207
- s(
1208
- "Real Estate",
1209
- {
1210
- primary: "#92400e",
1211
- primaryHover: "#78350f",
1212
- success: "#059669",
1213
- warning: "#b45309",
1214
- error: "#dc2626",
1215
- info: "#0891b2"
1216
- },
1217
- { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1218
- { primary: "#422006", secondary: "#713f12", muted: "#d97706" },
1219
- "#fcd34d"
1220
- );
1221
- s(
1222
- "Nord",
1223
- {
1224
- primary: "#5e81ac",
1225
- primaryHover: "#4c6b90",
1226
- success: "#a3be8c",
1227
- warning: "#ebcb8b",
1228
- error: "#bf616a",
1229
- info: "#88c0d0"
1230
- },
1231
- { primary: "#eceff4", secondary: "#e5e9f0", tertiary: "#d8dee9", hover: "#d8dee9" },
1232
- { primary: "#2e3440", secondary: "#3b4252", muted: "#4c566a" },
1233
- "#d8dee9"
1234
- );
1235
- h(
1236
- "Dracula",
1237
- {
1238
- primary: "#bd93f9",
1239
- primaryHover: "#9d79d9",
1240
- success: "#50fa7b",
1241
- warning: "#f1fa8c",
1242
- error: "#ff5555",
1243
- info: "#8be9fd"
1244
- },
1245
- { primary: "#282a36", secondary: "#343746", tertiary: "#44475a", hover: "#44475a" },
1246
- { primary: "#f8f8f2", secondary: "#c0c0c0", muted: "#6272a4" },
1247
- "#44475a"
1248
- );
1249
- s(
1250
- "Solarized Light",
1251
- {
1252
- primary: "#268bd2",
1253
- primaryHover: "#1a6da0",
1254
- success: "#859900",
1255
- warning: "#b58900",
1256
- error: "#dc322f",
1257
- info: "#2aa198"
1258
- },
1259
- { primary: "#fdf6e3", secondary: "#eee8d5", tertiary: "#e0dbc7", hover: "#eee8d5" },
1260
- { primary: "#073642", secondary: "#586e75", muted: "#93a1a1" },
1261
- "#eee8d5"
1262
- );
1263
- h(
1264
- "Solarized Dark",
1265
- {
1266
- primary: "#268bd2",
1267
- primaryHover: "#3d98db",
1268
- success: "#859900",
1269
- warning: "#b58900",
1270
- error: "#dc322f",
1271
- info: "#2aa198"
1272
- },
1273
- { primary: "#002b36", secondary: "#073642", tertiary: "#0a4858", hover: "#073642" },
1274
- // Solarized red is a dark fill: white on it is 4.63 : 1, the dark default 3.86
1275
- { primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75", onError: "#ffffff" },
1276
- "#073642"
1277
- );
1278
- h(
1279
- "Monokai",
1280
- {
1281
- primary: "#66d9ef",
1282
- primaryHover: "#45c0d6",
1283
- success: "#a6e22e",
1284
- warning: "#e6db74",
1285
- error: "#f92672",
1286
- info: "#66d9ef"
1287
- },
1288
- { primary: "#272822", secondary: "#34352e", tertiary: "#3e3d32", hover: "#3e3d32" },
1289
- { primary: "#f8f8f2", secondary: "#cfcfc2", muted: "#75715e" },
1290
- "#3e3d32"
1291
- );
1292
- h(
1293
- "One Dark",
1294
- {
1295
- primary: "#61afef",
1296
- primaryHover: "#4b9ee0",
1297
- success: "#98c379",
1298
- warning: "#e5c07b",
1299
- error: "#e06c75",
1300
- info: "#56b6c2"
1301
- },
1302
- { primary: "#282c34", secondary: "#2c313a", tertiary: "#353b45", hover: "#353b45" },
1303
- { primary: "#abb2bf", secondary: "#828997", muted: "#545862" },
1304
- "#3e4452"
1305
- );
1306
- h(
1307
- "Synthwave",
1308
- {
1309
- primary: "#ff7edb",
1310
- primaryHover: "#e660c2",
1311
- success: "#72f1b8",
1312
- warning: "#fede5d",
1313
- error: "#fe4450",
1314
- info: "#36f9f6"
1315
- },
1316
- { primary: "#241b2f", secondary: "#2d2140", tertiary: "#362a50", hover: "#362a50" },
1317
- { primary: "#f0e4fc", secondary: "#b4a0cc", muted: "#6c5c84" },
1318
- "#4a3866"
1319
- );
1320
- s(
1321
- "Vaporwave",
1322
- {
1323
- primary: "#ff71ce",
1324
- primaryHover: "#e655b5",
1325
- success: "#78dcca",
1326
- warning: "#ffb86c",
1327
- error: "#ff5555",
1328
- info: "#76e8fc"
1329
- },
1330
- { primary: "#fce4f7", secondary: "#e8d0f4", tertiary: "#d4bcf0", hover: "#e8d0f4" },
1331
- { primary: "#4a1a4e", secondary: "#7b3f7d", muted: "#c080c0" },
1332
- "#d8a8e8"
1333
- );
1334
- h(
1335
- "Terminal Green",
1336
- {
1337
- primary: "#00ff41",
1338
- primaryHover: "#00cc34",
1339
- success: "#00ff41",
1340
- warning: "#ffff00",
1341
- error: "#ff0000",
1342
- info: "#00ffff"
1343
- },
1344
- { primary: "#0a0a0a", secondary: "#0d1a0d", tertiary: "#1a2e1a", hover: "#1a2e1a" },
1345
- { primary: "#00ff41", secondary: "#00cc33", muted: "#008822" },
1346
- "#003300"
1347
- );
1348
- s(
1349
- "Sepia",
1350
- {
1351
- primary: "#8b6914",
1352
- primaryHover: "#704f10",
1353
- success: "#6b8e23",
1354
- warning: "#cd853f",
1355
- error: "#b22222",
1356
- info: "#5f9ea0"
1357
- },
1358
- { primary: "#faf0e6", secondary: "#f5e6d3", tertiary: "#eddcc7", hover: "#f5e6d3" },
1359
- { primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
1360
- "#d7ccc8"
1361
- );
1362
- s(
1363
- "Vintage",
1364
- {
1365
- primary: "#8d6e63",
1366
- primaryHover: "#6d4c41",
1367
- success: "#66bb6a",
1368
- warning: "#ffb300",
1369
- error: "#e53935",
1370
- info: "#29b6f6"
1371
- },
1372
- { primary: "#efebe9", secondary: "#d7ccc8", tertiary: "#bcaaa4", hover: "#d7ccc8" },
1373
- { primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
1374
- "#bcaaa4"
1375
- );
1376
- h(
1377
- "Cyberpunk",
1378
- {
1379
- primary: "#00f0ff",
1380
- primaryHover: "#00c8d4",
1381
- success: "#39ff14",
1382
- warning: "#ffff00",
1383
- error: "#ff003c",
1384
- info: "#bf00ff"
1385
- },
1386
- { primary: "#0a0e17", secondary: "#131824", tertiary: "#1c2333", hover: "#1c2333" },
1387
- // the purple info fill is dark: white on it is 4.51 : 1, the dark default 3.96
1388
- { primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72", onInfo: "#ffffff" },
1389
- "#1c3a44"
1390
- );
1391
- h(
1392
- "Neon",
1393
- {
1394
- primary: "#ff00ff",
1395
- primaryHover: "#cc00cc",
1396
- success: "#00ff00",
1397
- warning: "#ffff00",
1398
- error: "#ff0000",
1399
- info: "#00ffff"
1400
- },
1401
- { primary: "#0d0d0d", secondary: "#1a1a1a", tertiary: "#262626", hover: "#262626" },
1402
- { primary: "#ffffff", secondary: "#cccccc", muted: "#666666" },
1403
- "#333333"
1404
- );
1405
- h(
1406
- "Retrowave",
1407
- {
1408
- primary: "#f77fbe",
1409
- primaryHover: "#e462a3",
1410
- success: "#72f1b8",
1411
- warning: "#ffe261",
1412
- error: "#ff4444",
1413
- info: "#79e8fb"
1414
- },
1415
- { primary: "#1b0a2e", secondary: "#261440", tertiary: "#321e52", hover: "#321e52" },
1416
- { primary: "#ffe6f7", secondary: "#c9a0c9", muted: "#6b4c7a" },
1417
- "#4a2d66"
1418
- );
1419
- s(
1420
- "Christmas",
1421
- {
1422
- primary: "#c41e3a",
1423
- primaryHover: "#a01830",
1424
- success: "#228b22",
1425
- warning: "#ffd700",
1426
- error: "#dc2626",
1427
- info: "#0891b2"
1428
- },
1429
- { primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
1430
- { primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
1431
- "#e8a0a0"
1432
- );
1433
- h(
1434
- "Halloween",
1435
- {
1436
- primary: "#ff6600",
1437
- primaryHover: "#e05500",
1438
- success: "#4ade80",
1439
- warning: "#fbbf24",
1440
- error: "#ff0000",
1441
- info: "#9333ea"
1442
- },
1443
- { primary: "#1a0a00", secondary: "#2d1500", tertiary: "#402000", hover: "#402000" },
1444
- // purple-600 info is a dark fill: white on it is 5.38 : 1, the dark default 3.32
1445
- { primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28", onInfo: "#ffffff" },
1446
- "#5c3400"
1447
- );
1448
- s(
1449
- "Valentine",
1450
- {
1451
- primary: "#e11d48",
1452
- primaryHover: "#be123c",
1453
- success: "#10b981",
1454
- warning: "#f59e0b",
1455
- error: "#dc2626",
1456
- info: "#ec4899"
1457
- },
1458
- { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
1459
- { primary: "#4c0519", secondary: "#881337", muted: "#f9a8d4" },
1460
- "#fda4af"
1461
- );
1462
- s(
1463
- "Easter",
1464
- {
1465
- primary: "#a78bfa",
1466
- primaryHover: "#8b5cf6",
1467
- success: "#4ade80",
1468
- warning: "#fcd34d",
1469
- error: "#fb7185",
1470
- info: "#67e8f9"
1471
- },
1472
- { primary: "#fef9ff", secondary: "#f3e8ff", tertiary: "#e8d5ff", hover: "#f3e8ff" },
1473
- { primary: "#581c87", secondary: "#6d28d9", muted: "#c4b5fd" },
1474
- "#ddd6fe"
1475
- );
1476
- s(
1477
- "Summer Beach",
1478
- {
1479
- primary: "#0ea5e9",
1480
- primaryHover: "#0284c7",
1481
- success: "#10b981",
1482
- warning: "#f59e0b",
1483
- error: "#ef4444",
1484
- info: "#06b6d4"
1485
- },
1486
- { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1487
- { primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
1488
- "#fcd34d"
1489
- );
1490
- s(
1491
- "Winter Frost",
1492
- {
1493
- primary: "#3b82f6",
1494
- primaryHover: "#2563eb",
1495
- success: "#10b981",
1496
- warning: "#f59e0b",
1497
- error: "#ef4444",
1498
- info: "#06b6d4"
1499
- },
1500
- { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
1501
- { primary: "#1e3a5f", secondary: "#1e40af", muted: "#93c5fd" },
1502
- "#bfdbfe"
1503
- );
1504
- s(
1505
- "Cherry Blossom",
1506
- {
1507
- primary: "#ec4899",
1508
- primaryHover: "#db2777",
1509
- success: "#10b981",
1510
- warning: "#f59e0b",
1511
- error: "#ef4444",
1512
- info: "#06b6d4"
1513
- },
1514
- { primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
1515
- { primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
1516
- "#fbcfe8"
1517
- );
1518
- s(
1519
- "Harvest",
1520
- {
1521
- primary: "#b45309",
1522
- primaryHover: "#92400e",
1523
- success: "#4d7c0f",
1524
- warning: "#a16207",
1525
- error: "#b91c1c",
1526
- info: "#0e7490"
1527
- },
1528
- { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1529
- { primary: "#451a03", secondary: "#78350f", muted: "#d97706" },
1530
- "#fcd34d"
1531
- );
1532
- s(
1533
- "Japanese Zen",
1534
- {
1535
- primary: "#6b7280",
1536
- primaryHover: "#4b5563",
1537
- success: "#6b8e23",
1538
- warning: "#d4a017",
1539
- error: "#c0392b",
1540
- info: "#5f9ea0"
1541
- },
1542
- { primary: "#faf9f6", secondary: "#f0ece3", tertiary: "#e6e0d4", hover: "#f0ece3" },
1543
- { primary: "#2c2c2c", secondary: "#5c5c5c", muted: "#a0998a" },
1544
- "#d5cec0"
1545
- );
1546
- s(
1547
- "Moroccan",
1548
- {
1549
- primary: "#c2410c",
1550
- primaryHover: "#9a3412",
1551
- success: "#15803d",
1552
- warning: "#ca8a04",
1553
- error: "#b91c1c",
1554
- info: "#0e7490"
1555
- },
1556
- { primary: "#fffbf0", secondary: "#fef3e0", tertiary: "#fde6c4", hover: "#fef3e0" },
1557
- { primary: "#3a1a00", secondary: "#7c2d12", muted: "#d97706" },
1558
- "#f5d0a0"
1559
- );
1560
- s(
1561
- "Scandinavian",
1562
- {
1563
- primary: "#4b5563",
1564
- primaryHover: "#374151",
1565
- success: "#059669",
1566
- warning: "#d97706",
1567
- error: "#dc2626",
1568
- info: "#0891b2"
1569
- },
1570
- { primary: "#ffffff", secondary: "#f9fafb", tertiary: "#f3f4f6", hover: "#f3f4f6" },
1571
- { primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
1572
- "#e5e7eb"
1573
- );
1574
- s(
1575
- "Mediterranean",
1576
- {
1577
- primary: "#1e40af",
1578
- primaryHover: "#1e3a8a",
1579
- success: "#059669",
1580
- warning: "#d97706",
1581
- error: "#dc2626",
1582
- info: "#0891b2"
1583
- },
1584
- { primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
1585
- { primary: "#1e3a5f", secondary: "#2563eb", muted: "#93c5fd" },
1586
- "#bfdbfe"
1587
- );
1588
- s(
1589
- "Chinese New Year",
1590
- {
1591
- primary: "#dc2626",
1592
- primaryHover: "#b91c1c",
1593
- success: "#16a34a",
1594
- warning: "#d4a017",
1595
- error: "#ef4444",
1596
- info: "#0891b2"
1597
- },
1598
- { primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
1599
- { primary: "#450a0a", secondary: "#991b1b", muted: "#f87171" },
1600
- "#fca5a5"
1601
- );
1602
- s(
1603
- "Indian Festive",
1604
- {
1605
- primary: "#d97706",
1606
- primaryHover: "#b45309",
1607
- success: "#16a34a",
1608
- warning: "#ca8a04",
1609
- error: "#dc2626",
1610
- info: "#7c3aed"
1611
- },
1612
- { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1613
- { primary: "#451a03", secondary: "#92400e", muted: "#f59e0b" },
1614
- "#fcd34d"
1615
- );
1616
- s(
1617
- "Brazilian Carnival",
1618
- {
1619
- primary: "#16a34a",
1620
- primaryHover: "#15803d",
1621
- success: "#22c55e",
1622
- warning: "#facc15",
1623
- error: "#ef4444",
1624
- info: "#0ea5e9"
1625
- },
1626
- { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
1627
- { primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
1628
- "#86efac"
1629
- );
1630
- s(
1631
- "African Earth",
1632
- {
1633
- primary: "#92400e",
1634
- primaryHover: "#78350f",
1635
- success: "#4d7c0f",
1636
- warning: "#a16207",
1637
- error: "#b91c1c",
1638
- info: "#0e7490"
1639
- },
1640
- { primary: "#faf5f0", secondary: "#f0e6d6", tertiary: "#e6d5bb", hover: "#f0e6d6" },
1641
- { primary: "#2b1a0e", secondary: "#5c3d1e", muted: "#a08060" },
1642
- "#d4b896"
1643
- );
1644
- h(
1645
- "High Contrast Dark",
1646
- {
1647
- primary: "#ffff00",
1648
- primaryHover: "#cccc00",
1649
- success: "#00ff00",
1650
- warning: "#ff8c00",
1651
- error: "#ff0000",
1652
- info: "#00ffff"
1653
- },
1654
- { primary: "#000000", secondary: "#1a1a1a", tertiary: "#333333", hover: "#333333" },
1655
- { primary: "#ffffff", secondary: "#ffffff", muted: "#cccccc" },
1656
- "#ffffff"
1657
- );
1658
- s(
1659
- "Monochrome",
1660
- {
1661
- primary: "#404040",
1662
- primaryHover: "#262626",
1663
- success: "#4d7c0f",
1664
- warning: "#a16207",
1665
- error: "#b91c1c",
1666
- info: "#0e7490"
1667
- },
1668
- { primary: "#fafafa", secondary: "#f0f0f0", tertiary: "#e0e0e0", hover: "#e0e0e0" },
1669
- { primary: "#1a1a1a", secondary: "#404040", muted: "#808080" },
1670
- "#c0c0c0"
1671
- );
1672
- s(
1673
- "Enhanced Contrast",
1674
- {
1675
- primary: "#0050b3",
1676
- primaryHover: "#003d8c",
1677
- success: "#006400",
1678
- warning: "#cc7000",
1679
- error: "#cc0000",
1680
- info: "#006680"
1681
- },
1682
- { primary: "#ffffff", secondary: "#f5f5f5", tertiary: "#ebebeb", hover: "#ebebeb" },
1683
- { primary: "#000000", secondary: "#1a1a1a", muted: "#595959" },
1684
- "#8c8c8c"
1685
- );
1686
- s(
1687
- "Minimalist",
1688
- {
1689
- primary: "#18181b",
1690
- primaryHover: "#27272a",
1691
- success: "#22c55e",
1692
- warning: "#eab308",
1693
- error: "#ef4444",
1694
- info: "#3b82f6"
1695
- },
1696
- { primary: "#ffffff", secondary: "#fafafa", tertiary: "#f5f5f5", hover: "#f5f5f5" },
1697
- { primary: "#0a0a0a", secondary: "#404040", muted: "#a3a3a3" },
1698
- "#e5e5e5"
1699
- );
1700
- h(
1701
- "Warm Dark",
1702
- {
1703
- primary: "#f59e0b",
1704
- primaryHover: "#d97706",
1705
- success: "#10b981",
1706
- warning: "#fbbf24",
1707
- error: "#f87171",
1708
- info: "#38bdf8"
1709
- },
1710
- { primary: "#1c1917", secondary: "#292524", tertiary: "#44403c", hover: "#44403c" },
1711
- { primary: "#fafaf9", secondary: "#d6d3d1", muted: "#78716c" },
1712
- "#57534e"
1713
- );
1714
- h(
1715
- "Soft Dark",
1716
- {
1717
- primary: "#a78bfa",
1718
- primaryHover: "#8b5cf6",
1719
- success: "#34d399",
1720
- warning: "#fcd34d",
1721
- error: "#fb7185",
1722
- info: "#67e8f9"
1723
- },
1724
- { primary: "#1e1e2e", secondary: "#262637", tertiary: "#313147", hover: "#313147" },
1725
- { primary: "#e8e8f0", secondary: "#a0a0b8", muted: "#5c5c74" },
1726
- "#3e3e58"
1727
- );
1728
- s(
1729
- "Coffee",
1730
- {
1731
- primary: "#6f4e37",
1732
- primaryHover: "#5c3d28",
1733
- success: "#4d7c0f",
1734
- warning: "#a16207",
1735
- error: "#b91c1c",
1736
- info: "#0e7490"
1737
- },
1738
- { primary: "#faf6f1", secondary: "#f0e8dc", tertiary: "#e6d8c6", hover: "#f0e8dc" },
1739
- { primary: "#2c1a0e", secondary: "#5c3d28", muted: "#a08868" },
1740
- "#d4c4a8"
1741
- );
1742
- s(
1743
- "Wine",
1744
- {
1745
- primary: "#7f1d1d",
1746
- primaryHover: "#641717",
1747
- success: "#059669",
1748
- warning: "#d97706",
1749
- error: "#dc2626",
1750
- info: "#0891b2"
1751
- },
1752
- { primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
1753
- { primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
1754
- "#e8a0a0"
1755
- );
1756
- const ge = process.env.NODE_ENV === "development";
1757
- let re = {
1758
- enabled: ge,
1759
- slowRenderThreshold: 16
1760
- };
1761
- const ie = [], O = /* @__PURE__ */ new Map(), ce = /* @__PURE__ */ new Map();
1762
- function Me() {
1763
- ie.length = 0, O.clear(), ce.clear();
1764
- }
1765
- function _e(a) {
1766
- const i = re.slowRenderThreshold;
1767
- return ie.filter((c) => c.actualDuration > i);
1768
- }
1769
- function V(a) {
1770
- return a < 1 ? `${(a * 1e3).toFixed(0)}μs` : a < 1e3 ? `${a.toFixed(2)}ms` : `${(a / 1e3).toFixed(2)}s`;
1771
- }
1772
- function Ne() {
1773
- const a = Array.from(O.values()), i = _e(), c = a.reduce((o, d) => o + d.renderCount, 0), n = a.length > 0 ? a.reduce((o, d) => o + d.avgRenderTime, 0) / a.length : 0, t = Array.from(ce.values());
1774
- return { stats: a, slowRenders: i, totalRenders: c, avgRenderTime: n, marks: t };
1775
- }
1776
- function we() {
1777
- const a = Ne();
1778
- console.group(
1779
- "%c[Nice2Dev Performance Report]",
1780
- "color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"
1781
- ), console.log(`Total renders: ${a.totalRenders}`), console.log(`Average render time: ${V(a.avgRenderTime)}`), console.log(`Slow renders: ${a.slowRenders.length}`), console.group("Component Stats"), console.table(
1782
- a.stats.sort((i, c) => c.totalRenderTime - i.totalRenderTime).map((i) => ({
1783
- Name: i.componentName,
1784
- Renders: i.renderCount,
1785
- "Avg Time": V(i.avgRenderTime),
1786
- "Max Time": V(i.maxRenderTime),
1787
- "Total Time": V(i.totalRenderTime),
1788
- "Slow Renders": i.slowRenderCount
1789
- }))
1790
- ), console.groupEnd(), a.slowRenders.length > 0 && (console.group("Slow Renders (last 10)"), console.table(
1791
- a.slowRenders.slice(-10).map((i) => ({
1792
- Component: i.componentName,
1793
- Phase: i.phase,
1794
- Duration: V(i.actualDuration),
1795
- Time: new Date(i.timestamp).toLocaleTimeString()
1796
- }))
1797
- ), console.groupEnd()), a.marks.length > 0 && (console.group("Custom Marks"), console.table(
1798
- a.marks.filter((i) => i.duration).map((i) => ({
1799
- Name: i.name,
1800
- Duration: V(i.duration)
1801
- }))
1802
- ), console.groupEnd()), console.groupEnd();
1803
- }
1804
- const Ce = oe(
1805
- ({ position: a = "bottom-right", defaultCollapsed: i = !0 }) => {
1806
- const [c, n] = u(i), [t, o] = u([]), [d, l] = u({ used: 0, total: 0 });
1807
- if (te(() => {
1808
- const m = () => {
1809
- const w = Array.from(O.values());
1810
- o(w.sort((v, N) => N.totalRenderTime - v.totalRenderTime).slice(0, 10));
1811
- const g = window.performance;
1812
- g.memory && l({
1813
- used: g.memory.usedJSHeapSize / 1024 / 1024,
1814
- total: g.memory.totalJSHeapSize / 1024 / 1024
1815
- });
1816
- };
1817
- m();
1818
- const _ = setInterval(m, 2e3);
1819
- return () => clearInterval(_);
1820
- }, []), !re.enabled)
1821
- return null;
1822
- const b = {
1823
- position: "fixed",
1824
- zIndex: 99999,
1825
- ...a.includes("top") ? { top: 8 } : { bottom: 8 },
1826
- ...a.includes("left") ? { left: 8 } : { right: 8 }
1827
- };
1828
- return /* @__PURE__ */ r(
1829
- "div",
1830
- {
1831
- style: {
1832
- ...b,
1833
- background: "var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",
1834
- color: "var(--nice-color-white, #fff)",
1835
- borderRadius: 8,
1836
- fontSize: 11,
1837
- fontFamily: "Monaco, Consolas, monospace",
1838
- padding: c ? "4px 8px" : 8,
1839
- maxWidth: c ? "auto" : 300,
1840
- maxHeight: c ? "auto" : 400,
1841
- overflow: "auto"
1842
- },
1843
- children: [
1844
- /* @__PURE__ */ r(
1845
- "div",
1846
- {
1847
- style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 8 },
1848
- onClick: () => n((m) => !m),
1849
- children: [
1850
- /* @__PURE__ */ e(
1851
- "span",
1852
- {
1853
- "aria-hidden": "true",
1854
- style: {
1855
- width: 8,
1856
- height: 8,
1857
- borderRadius: "50%",
1858
- background: "var(--nice-color-success, #22c55e)"
1859
- }
1860
- }
1861
- ),
1862
- /* @__PURE__ */ e("span", { children: "Profiler" }),
1863
- d.used > 0 && /* @__PURE__ */ r(
1864
- "span",
1865
- {
1866
- style: {
1867
- color: d.used > 100 ? "var(--nice-color-warning, #f59e0b)" : "var(--nice-text-muted, #64748b)"
1868
- },
1869
- children: [
1870
- d.used.toFixed(0),
1871
- "MB"
1872
- ]
1873
- }
1874
- ),
1875
- /* @__PURE__ */ e("span", { style: { marginLeft: "auto", opacity: 0.5, display: "inline-flex" }, children: /* @__PURE__ */ e(p, { name: c ? "chevron-down" : "chevron-up", size: 12 }) })
1876
- ]
1877
- }
1878
- ),
1879
- !c && /* @__PURE__ */ r("div", { style: { marginTop: 8 }, children: [
1880
- /* @__PURE__ */ e(
1881
- "div",
1882
- {
1883
- style: {
1884
- borderBottom: "1px solid var(--nice-border-color, #333)",
1885
- paddingBottom: 4,
1886
- marginBottom: 8
1887
- },
1888
- children: /* @__PURE__ */ e("strong", { children: "Top Components" })
1889
- }
1890
- ),
1891
- t.map((m) => /* @__PURE__ */ r("div", { style: { marginBottom: 4, display: "flex", gap: 8 }, children: [
1892
- /* @__PURE__ */ e("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, children: m.componentName }),
1893
- /* @__PURE__ */ e(
1894
- "span",
1895
- {
1896
- style: {
1897
- color: m.avgRenderTime > 16 ? "var(--nice-color-warning, #f59e0b)" : "var(--nice-color-success, #22c55e)"
1898
- },
1899
- children: V(m.avgRenderTime)
1900
- }
1901
- ),
1902
- /* @__PURE__ */ r(
1903
- "span",
1904
- {
1905
- style: {
1906
- color: "var(--nice-text-muted, #64748b)",
1907
- minWidth: 30,
1908
- textAlign: "right"
1909
- },
1910
- children: [
1911
- "x",
1912
- m.renderCount
1913
- ]
1914
- }
1915
- )
1916
- ] }, m.componentName)),
1917
- /* @__PURE__ */ r("div", { style: { marginTop: 8, display: "flex", gap: 8 }, children: [
1918
- /* @__PURE__ */ e(
1919
- "button",
1920
- {
1921
- onClick: we,
1922
- style: {
1923
- flex: 1,
1924
- padding: "4px 8px",
1925
- background: "var(--nice-bg-tertiary, #333)",
1926
- border: "none",
1927
- borderRadius: 4,
1928
- color: "var(--nice-text-primary, #fff)",
1929
- cursor: "pointer",
1930
- fontSize: 10
1931
- },
1932
- children: "Print Report"
1933
- }
1934
- ),
1935
- /* @__PURE__ */ e(
1936
- "button",
1937
- {
1938
- onClick: Me,
1939
- style: {
1940
- flex: 1,
1941
- padding: "4px 8px",
1942
- background: "var(--nice-bg-tertiary, #333)",
1943
- border: "none",
1944
- borderRadius: 4,
1945
- color: "var(--nice-text-primary, #fff)",
1946
- cursor: "pointer",
1947
- fontSize: 10
1948
- },
1949
- children: "Clear"
1950
- }
1951
- )
1952
- ] })
1953
- ] })
1954
- ]
1955
- }
1956
- );
1957
- }
1958
- );
1959
- Ce.displayName = "ProfilerOverlay";
1960
308
  process.env.NODE_ENV;
1961
- M(null);
1962
- M({
1963
- enabled: !0,
1964
- active: !1,
1965
- run: () => {
1966
- }
1967
- });
1968
- const W = "nice-tutorial-button-styles";
1969
- if (typeof document < "u" && !document.getElementById(W)) {
1970
- const a = document.createElement("style");
1971
- a.id = W, a.textContent = `
1972
- .nice-tutorial-button {
1973
- display: inline-flex;
1974
- align-items: center;
1975
- justify-content: center;
1976
- border: 1px solid var(--nice-border, #cbd5e1);
1977
- background: var(--nice-bg, #fff);
1978
- color: var(--nice-text-secondary, #475569);
1979
- border-radius: var(--nice-radius-full, 9999px);
1980
- cursor: help;
1981
- font-weight: 700;
1982
- line-height: 1;
1983
- padding: 0;
1984
- transition: background var(--nice-transition, 200ms ease), color var(--nice-transition, 200ms ease), border-color var(--nice-transition, 200ms ease);
1985
- }
1986
- .nice-tutorial-button:hover {
1987
- background: var(--nice-primary, #2563eb);
1988
- border-color: var(--nice-primary, #2563eb);
1989
- color: var(--nice-text-inverse, #fff);
1990
- }
1991
- .nice-tutorial-button:focus-visible {
1992
- outline: none;
1993
- box-shadow: 0 0 0 2px var(--nice-bg, #fff), 0 0 0 4px var(--nice-primary, #2563eb);
1994
- }
1995
- .nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
1996
- .nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
1997
- `, document.head.appendChild(a);
1998
- }
1999
- M(null);
2000
- M(null);
2001
- M(null);
2002
- M(null);
2003
- const G = {
309
+ process.env.NODE_ENV;
310
+ process.env.NODE_ENV;
311
+ process.env.NODE_ENV;
312
+ process.env.NODE_ENV;
313
+ process.env.NODE_ENV;
314
+ process.env.NODE_ENV;
315
+ process.env.NODE_ENV;
316
+ const R = {
2004
317
  display: "inline-block",
2005
318
  width: 10,
2006
319
  height: 10,
2007
320
  borderRadius: "50%",
2008
321
  background: "currentColor"
2009
- }, F = [
322
+ }, $ = [
2010
323
  { type: "device-list", label: "Device List", icon: "list" },
2011
324
  { type: "device-status", label: "Device Status", icon: "success" },
2012
325
  { type: "telemetry-chart", label: "Telemetry Chart", icon: "bar-chart" },
@@ -2018,199 +331,222 @@ const G = {
2018
331
  { type: "kpi", label: "KPI Card", icon: "target" },
2019
332
  { type: "camera-feed", label: "Camera Feed", icon: "video" }
2020
333
  ];
2021
- function Fe({
334
+ function Ne({
2022
335
  devices: a = [],
2023
- widgets: i = [],
2024
- alarms: c = [],
336
+ widgets: r = [],
337
+ alarms: l = [],
2025
338
  onDeviceSelect: n,
2026
- onWidgetChange: t,
2027
- onCommand: o,
2028
- onAlarmAcknowledge: d,
2029
- fetchTelemetry: l,
2030
- className: b = ""
339
+ onWidgetChange: c,
340
+ onCommand: t,
341
+ onAlarmAcknowledge: o,
342
+ fetchTelemetry: s,
343
+ className: h = ""
2031
344
  }) {
2032
- const [m, _] = u(i), [w, g] = u(null), [v, N] = u("dashboard"), [H, L] = u(!1), [z, A] = u(""), y = C(
2033
- (f) => {
2034
- _((x) => {
2035
- const S = f(x);
2036
- return t == null || t(S), S;
345
+ const { t: p } = b(), [u, H] = g(r), [N, k] = g(null), [M, w] = g("dashboard"), [_, V] = g(!1), [y, L] = g(""), v = f(
346
+ (d) => {
347
+ H((C) => {
348
+ const z = d(C);
349
+ return c == null || c(z), z;
2037
350
  });
2038
351
  },
2039
- [t]
2040
- ), k = C(
2041
- (f) => {
2042
- var S;
2043
- const x = {
2044
- id: ue(),
2045
- type: f,
2046
- title: ((S = F.find(($) => $.type === f)) == null ? void 0 : S.label) || f,
2047
- position: { x: 0, y: He(m), width: 4, height: 3 },
352
+ [c]
353
+ ), D = f(
354
+ (d) => {
355
+ var z;
356
+ const C = {
357
+ id: ie(),
358
+ type: d,
359
+ title: ((z = $.find((U) => U.type === d)) == null ? void 0 : z.label) || d,
360
+ position: { x: 0, y: ne(u), width: 4, height: 3 },
2048
361
  config: {}
2049
362
  };
2050
- y(($) => [...$, x]);
363
+ v((U) => [...U, C]);
2051
364
  },
2052
- [m, y]
2053
- ), U = C(
2054
- (f) => {
2055
- g(f), n == null || n(f);
365
+ [u, v]
366
+ ), P = f(
367
+ (d) => {
368
+ k(d), n == null || n(d);
2056
369
  },
2057
370
  [n]
2058
- ), E = C(
2059
- (f) => {
2060
- d == null || d(f);
371
+ ), T = f(
372
+ (d) => {
373
+ o == null || o(d);
2061
374
  },
2062
- [d]
2063
- ), T = a.filter(
2064
- (f) => !z || f.name.toLowerCase().includes(z.toLowerCase()) || f.type.toLowerCase().includes(z.toLowerCase())
2065
- ), D = c.filter((f) => !f.cleared), q = D.filter(
2066
- (f) => f.severity === "critical" || f.severity === "high"
375
+ [o]
376
+ ), j = a.filter(
377
+ (d) => !y || d.name.toLowerCase().includes(y.toLowerCase()) || d.type.toLowerCase().includes(y.toLowerCase())
378
+ ), S = l.filter((d) => !d.cleared), O = S.filter(
379
+ (d) => d.severity === "critical" || d.severity === "high"
2067
380
  );
2068
- return /* @__PURE__ */ r("div", { className: `nice-iot-dashboard ${b}`, children: [
2069
- /* @__PURE__ */ r("header", { className: "nice-iot-dashboard__header", children: [
2070
- /* @__PURE__ */ e("h1", { children: "IoT Dashboard" }),
2071
- /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__stats", children: [
2072
- /* @__PURE__ */ r("span", { className: "nice-iot-dashboard__stat", children: [
2073
- /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: /* @__PURE__ */ e(p, { name: "wifi", size: 14 }) }),
2074
- a.length,
2075
- " Devices"
381
+ return /* @__PURE__ */ i("div", { className: `nice-iot-dashboard ${h}`, children: [
382
+ /* @__PURE__ */ i("header", { className: "nice-iot-dashboard__header", children: [
383
+ /* @__PURE__ */ e("h1", { children: p("ioTDashboard.iotDashboard", "IoT Dashboard") }),
384
+ /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__stats", children: [
385
+ /* @__PURE__ */ i("span", { className: "nice-iot-dashboard__stat", children: [
386
+ /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: /* @__PURE__ */ e(m, { name: "wifi", size: 14 }) }),
387
+ p("ioTDashboard.devices", "{devices} Devices").replace(
388
+ "{devices}",
389
+ String(a.length)
390
+ )
2076
391
  ] }),
2077
- /* @__PURE__ */ r("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--online", children: [
2078
- /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", style: G }),
2079
- a.filter((f) => f.status === "online").length,
2080
- " Online"
392
+ /* @__PURE__ */ i("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--online", children: [
393
+ /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", style: R }),
394
+ p("ioTDashboard.online", "{online} Online").replace(
395
+ "{online}",
396
+ String(a.filter((d) => d.status === "online").length)
397
+ )
2081
398
  ] }),
2082
- /* @__PURE__ */ r("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--offline", children: [
2083
- /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", style: G }),
2084
- a.filter((f) => f.status === "offline").length,
2085
- " Offline"
399
+ /* @__PURE__ */ i("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--offline", children: [
400
+ /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", style: R }),
401
+ p("ioTDashboard.offline", "{offline} Offline").replace(
402
+ "{offline}",
403
+ String(a.filter((d) => d.status === "offline").length)
404
+ )
2086
405
  ] }),
2087
- q.length > 0 && /* @__PURE__ */ r("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--alarms", children: [
2088
- /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: /* @__PURE__ */ e(p, { name: "bell", size: 14 }) }),
2089
- q.length,
2090
- " Alarms"
406
+ O.length > 0 && /* @__PURE__ */ i("span", { className: "nice-iot-dashboard__stat nice-iot-dashboard__stat--alarms", children: [
407
+ /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__stat-icon", children: /* @__PURE__ */ e(m, { name: "bell", size: 14 }) }),
408
+ p("ioTDashboard.alarms", "{criticalAlarms} Alarms").replace(
409
+ "{criticalAlarms}",
410
+ String(O.length)
411
+ )
2091
412
  ] })
2092
413
  ] }),
2093
- /* @__PURE__ */ r("nav", { className: "nice-iot-dashboard__nav", children: [
414
+ /* @__PURE__ */ i("nav", { className: "nice-iot-dashboard__nav", children: [
2094
415
  /* @__PURE__ */ e(
2095
416
  "button",
2096
417
  {
2097
- className: v === "dashboard" ? "active" : "",
2098
- onClick: () => N("dashboard"),
2099
- children: "Dashboard"
418
+ className: `nice-iot-dashboard__nav-button ${M === "dashboard" ? "nice-iot-dashboard__nav-button--active" : ""}`,
419
+ onClick: () => w("dashboard"),
420
+ children: p("ioTDashboard.dashboard", "Dashboard")
2100
421
  }
2101
422
  ),
2102
- /* @__PURE__ */ e("button", { className: v === "devices" ? "active" : "", onClick: () => N("devices"), children: "Devices" }),
2103
- /* @__PURE__ */ r("button", { className: v === "alarms" ? "active" : "", onClick: () => N("alarms"), children: [
2104
- "Alarms ",
2105
- D.length > 0 && `(${D.length})`
2106
- ] })
423
+ /* @__PURE__ */ e(
424
+ "button",
425
+ {
426
+ className: `nice-iot-dashboard__nav-button ${M === "devices" ? "nice-iot-dashboard__nav-button--active" : ""}`,
427
+ onClick: () => w("devices"),
428
+ children: p("ioTDashboard.devices2", "Devices")
429
+ }
430
+ ),
431
+ /* @__PURE__ */ i(
432
+ "button",
433
+ {
434
+ className: `nice-iot-dashboard__nav-button ${M === "alarms" ? "nice-iot-dashboard__nav-button--active" : ""}`,
435
+ onClick: () => w("alarms"),
436
+ children: [
437
+ p("ioTDashboard.alarms2", "Alarms"),
438
+ " ",
439
+ S.length > 0 && `(${S.length})`
440
+ ]
441
+ }
442
+ )
2107
443
  ] }),
2108
- /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__actions", children: v === "dashboard" && /* @__PURE__ */ r("button", { onClick: () => L(!H), children: [
2109
- /* @__PURE__ */ e(p, { name: H ? "check" : "edit", size: 14 }),
444
+ /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__actions", children: M === "dashboard" && /* @__PURE__ */ i("button", { onClick: () => V(!_), children: [
445
+ /* @__PURE__ */ e(m, { name: _ ? "check" : "edit", size: 14 }),
2110
446
  " ",
2111
- H ? "Done" : "Edit"
447
+ _ ? "Done" : "Edit"
2112
448
  ] }) })
2113
449
  ] }),
2114
- v === "dashboard" && /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__main", children: [
2115
- H && /* @__PURE__ */ r("aside", { className: "nice-iot-dashboard__palette", children: [
2116
- /* @__PURE__ */ e("h4", { children: "Add Widget" }),
2117
- F.map((f) => /* @__PURE__ */ r(
450
+ M === "dashboard" && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__main", children: [
451
+ _ && /* @__PURE__ */ i("aside", { className: "nice-iot-dashboard__palette", children: [
452
+ /* @__PURE__ */ e("h4", { children: p("ioTDashboard.addWidget", "Add Widget") }),
453
+ $.map((d) => /* @__PURE__ */ i(
2118
454
  "button",
2119
455
  {
2120
456
  className: "nice-iot-dashboard__palette-item",
2121
- onClick: () => k(f.type),
457
+ onClick: () => D(d.type),
2122
458
  children: [
2123
- /* @__PURE__ */ e(p, { name: f.icon, size: 16 }),
2124
- /* @__PURE__ */ e("span", { children: f.label })
459
+ /* @__PURE__ */ e(m, { name: d.icon, size: 16 }),
460
+ /* @__PURE__ */ e("span", { children: d.label })
2125
461
  ]
2126
462
  },
2127
- f.type
463
+ d.type
2128
464
  ))
2129
465
  ] }),
2130
- /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__grid", children: [
2131
- m.map((f) => /* @__PURE__ */ e(
2132
- ze,
466
+ /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__grid", children: [
467
+ u.map((d) => /* @__PURE__ */ e(
468
+ le,
2133
469
  {
2134
- widget: f,
470
+ widget: d,
2135
471
  devices: a,
2136
- alarms: c,
2137
- isEditing: H,
2138
- onCommand: o,
2139
- onDelete: () => y((x) => x.filter((S) => S.id !== f.id))
472
+ alarms: l,
473
+ isEditing: _,
474
+ onCommand: t,
475
+ onDelete: () => v((C) => C.filter((z) => z.id !== d.id))
2140
476
  },
2141
- f.id
477
+ d.id
2142
478
  )),
2143
- m.length === 0 && /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__empty", children: H ? "Add widgets from the palette" : "No widgets configured. Click Edit to add widgets." })
479
+ u.length === 0 && /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__empty", children: _ ? "Add widgets from the palette" : "No widgets configured. Click Edit to add widgets." })
2144
480
  ] })
2145
481
  ] }),
2146
- v === "devices" && /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__devices", children: [
482
+ M === "devices" && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__devices", children: [
2147
483
  /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__devices-toolbar", children: /* @__PURE__ */ e(
2148
484
  "input",
2149
485
  {
2150
486
  type: "search",
2151
- placeholder: "Search devices...",
2152
- value: z,
2153
- onChange: (f) => A(f.target.value)
487
+ placeholder: p("ioTDashboard.searchDevices", "Search devices..."),
488
+ value: y,
489
+ onChange: (d) => L(d.target.value)
2154
490
  }
2155
491
  ) }),
2156
- /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-grid", children: T.map((f) => /* @__PURE__ */ e(
2157
- xe,
492
+ /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-grid", children: j.map((d) => /* @__PURE__ */ e(
493
+ te,
2158
494
  {
2159
- device: f,
2160
- isSelected: (w == null ? void 0 : w.id) === f.id,
2161
- onSelect: () => U(f)
495
+ device: d,
496
+ isSelected: (N == null ? void 0 : N.id) === d.id,
497
+ onSelect: () => P(d)
2162
498
  },
2163
- f.id
499
+ d.id
2164
500
  )) }),
2165
- w && /* @__PURE__ */ e(
2166
- Se,
501
+ N && /* @__PURE__ */ e(
502
+ oe,
2167
503
  {
2168
- device: w,
2169
- onCommand: o,
2170
- onClose: () => g(null)
504
+ device: N,
505
+ onCommand: t,
506
+ onClose: () => k(null)
2171
507
  }
2172
508
  )
2173
509
  ] }),
2174
- v === "alarms" && /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarms", children: /* @__PURE__ */ r("table", { className: "nice-iot-dashboard__alarm-table", children: [
2175
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { children: [
2176
- /* @__PURE__ */ e("th", { children: "Severity" }),
2177
- /* @__PURE__ */ e("th", { children: "Device" }),
2178
- /* @__PURE__ */ e("th", { children: "Message" }),
2179
- /* @__PURE__ */ e("th", { children: "Time" }),
2180
- /* @__PURE__ */ e("th", { children: "Status" }),
2181
- /* @__PURE__ */ e("th", { children: "Actions" })
510
+ M === "alarms" && /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarms", children: /* @__PURE__ */ i("table", { className: "nice-iot-dashboard__alarm-table", children: [
511
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
512
+ /* @__PURE__ */ e("th", { children: p("ioTDashboard.severity", "Severity") }),
513
+ /* @__PURE__ */ e("th", { children: p("ioTDashboard.device", "Device") }),
514
+ /* @__PURE__ */ e("th", { children: p("ioTDashboard.message", "Message") }),
515
+ /* @__PURE__ */ e("th", { children: p("ioTDashboard.time", "Time") }),
516
+ /* @__PURE__ */ e("th", { children: p("ioTDashboard.status", "Status") }),
517
+ /* @__PURE__ */ e("th", { children: p("ioTDashboard.actions", "Actions") })
2182
518
  ] }) }),
2183
- /* @__PURE__ */ e("tbody", { children: D.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: 6, className: "nice-iot-dashboard__no-alarms", children: "No active alarms" }) }) : D.map((f) => {
2184
- const x = a.find((S) => S.id === f.deviceId);
2185
- return /* @__PURE__ */ r(
519
+ /* @__PURE__ */ e("tbody", { children: S.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: 6, className: "nice-iot-dashboard__no-alarms", children: p("ioTDashboard.noActiveAlarms", "No active alarms") }) }) : S.map((d) => {
520
+ const C = a.find((z) => z.id === d.deviceId);
521
+ return /* @__PURE__ */ i(
2186
522
  "tr",
2187
523
  {
2188
- className: `nice-iot-dashboard__alarm-row nice-iot-dashboard__alarm-row--${f.severity}`,
524
+ className: `nice-iot-dashboard__alarm-row nice-iot-dashboard__alarm-row--${d.severity}`,
2189
525
  children: [
2190
526
  /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
2191
527
  "span",
2192
528
  {
2193
- className: `nice-iot-dashboard__severity nice-iot-dashboard__severity--${f.severity}`,
2194
- children: f.severity
529
+ className: `nice-iot-dashboard__severity nice-iot-dashboard__severity--${d.severity}`,
530
+ children: d.severity
2195
531
  }
2196
532
  ) }),
2197
- /* @__PURE__ */ e("td", { children: (x == null ? void 0 : x.name) || f.deviceId }),
2198
- /* @__PURE__ */ e("td", { children: f.message }),
2199
- /* @__PURE__ */ e("td", { children: f.timestamp.toLocaleString() }),
2200
- /* @__PURE__ */ e("td", { children: f.acknowledged ? "Acknowledged" : "Active" }),
2201
- /* @__PURE__ */ e("td", { children: !f.acknowledged && /* @__PURE__ */ e("button", { onClick: () => E(f.id), children: "Acknowledge" }) })
533
+ /* @__PURE__ */ e("td", { children: (C == null ? void 0 : C.name) || d.deviceId }),
534
+ /* @__PURE__ */ e("td", { children: d.message }),
535
+ /* @__PURE__ */ e("td", { children: d.timestamp.toLocaleString() }),
536
+ /* @__PURE__ */ e("td", { children: d.acknowledged ? "Acknowledged" : "Active" }),
537
+ /* @__PURE__ */ e("td", { children: !d.acknowledged && /* @__PURE__ */ e("button", { onClick: () => T(d.id), children: p("ioTDashboard.acknowledge", "Acknowledge") }) })
2202
538
  ]
2203
539
  },
2204
- f.id
540
+ d.id
2205
541
  );
2206
542
  }) })
2207
543
  ] }) })
2208
544
  ] });
2209
545
  }
2210
- function He(a) {
2211
- return a.length === 0 ? 0 : Math.max(...a.map((i) => i.position.y + i.position.height));
546
+ function ne(a) {
547
+ return a.length === 0 ? 0 : Math.max(...a.map((r) => r.position.y + r.position.height));
2212
548
  }
2213
- function I(a) {
549
+ function E(a) {
2214
550
  switch (a) {
2215
551
  case "online":
2216
552
  return "var(--nice-success, #28a745)";
@@ -2226,16 +562,16 @@ function I(a) {
2226
562
  return "var(--nice-text-secondary, #6c757d)";
2227
563
  }
2228
564
  }
2229
- function ze({
565
+ function le({
2230
566
  widget: a,
2231
- devices: i,
2232
- alarms: c,
567
+ devices: r,
568
+ alarms: l,
2233
569
  isEditing: n,
2234
- onCommand: t,
2235
- onDelete: o
570
+ onCommand: c,
571
+ onDelete: t
2236
572
  }) {
2237
- const d = F.find((l) => l.type === a.type);
2238
- return /* @__PURE__ */ r(
573
+ const { t: o } = b(), s = $.find((h) => h.type === a.type);
574
+ return /* @__PURE__ */ i(
2239
575
  "div",
2240
576
  {
2241
577
  className: `nice-iot-dashboard__widget nice-iot-dashboard__widget--${a.type}`,
@@ -2244,30 +580,39 @@ function ze({
2244
580
  gridRow: `span ${a.position.height}`
2245
581
  },
2246
582
  children: [
2247
- /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__widget-header", children: [
2248
- /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__widget-icon", children: /* @__PURE__ */ e(p, { name: (d == null ? void 0 : d.icon) ?? "box", size: 14 }) }),
583
+ /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__widget-header", children: [
584
+ /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__widget-icon", children: /* @__PURE__ */ e(m, { name: (s == null ? void 0 : s.icon) ?? "box", size: 14 }) }),
2249
585
  /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__widget-title", children: a.title }),
2250
- n && /* @__PURE__ */ e("button", { className: "nice-iot-dashboard__widget-delete", onClick: o, children: "×" })
586
+ n && /* @__PURE__ */ e(
587
+ "button",
588
+ {
589
+ "aria-label": o("ioTDashboard.close", "Close"),
590
+ className: "nice-iot-dashboard__widget-delete",
591
+ onClick: t,
592
+ children: /* @__PURE__ */ e(m, { name: "close", size: 14 })
593
+ }
594
+ )
2251
595
  ] }),
2252
- /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__widget-content", children: /* @__PURE__ */ e(ke, { widget: a, devices: i, alarms: c, onCommand: t }) })
596
+ /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__widget-content", children: /* @__PURE__ */ e(re, { widget: a, devices: r, alarms: l, onCommand: c }) })
2253
597
  ]
2254
598
  }
2255
599
  );
2256
600
  }
2257
- function ke({
601
+ function re({
2258
602
  widget: a,
2259
- devices: i,
2260
- alarms: c,
603
+ devices: r,
604
+ alarms: l,
2261
605
  onCommand: n
2262
606
  }) {
607
+ const { t: c } = b();
2263
608
  switch (a.type) {
2264
609
  case "device-list":
2265
- return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-list", children: i.slice(0, 10).map((t) => /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__device-list-item", children: [
610
+ return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__device-list", children: r.slice(0, 10).map((t) => /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-list-item", children: [
2266
611
  /* @__PURE__ */ e(
2267
612
  "span",
2268
613
  {
2269
614
  className: "nice-iot-dashboard__device-status",
2270
- style: { background: I(t.status) }
615
+ style: { background: E(t.status) }
2271
616
  }
2272
617
  ),
2273
618
  /* @__PURE__ */ e("span", { children: t.name }),
@@ -2275,13 +620,13 @@ function ke({
2275
620
  ] }, t.id)) });
2276
621
  case "device-status":
2277
622
  return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__status-grid", children: ["online", "offline", "warning", "error"].map((t) => {
2278
- const o = i.filter((d) => d.status === t).length;
2279
- return /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__status-card", children: [
623
+ const o = r.filter((s) => s.status === t).length;
624
+ return /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__status-card", children: [
2280
625
  /* @__PURE__ */ e(
2281
626
  "span",
2282
627
  {
2283
628
  className: "nice-iot-dashboard__status-indicator",
2284
- style: { background: I(t) }
629
+ style: { background: E(t) }
2285
630
  }
2286
631
  ),
2287
632
  /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__status-count", children: o }),
@@ -2289,13 +634,13 @@ function ke({
2289
634
  ] }, t);
2290
635
  }) });
2291
636
  case "telemetry-chart":
2292
- return /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__chart-placeholder", children: [
2293
- /* @__PURE__ */ e(p, { name: "bar-chart", size: 32 }),
2294
- /* @__PURE__ */ e("span", { children: "Telemetry Chart" }),
2295
- /* @__PURE__ */ e("small", { children: "Configure device and capability" })
637
+ return /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__chart-placeholder", children: [
638
+ /* @__PURE__ */ e(m, { name: "bar-chart", size: 32 }),
639
+ /* @__PURE__ */ e("span", { children: c("ioTDashboard.telemetryChart", "Telemetry Chart") }),
640
+ /* @__PURE__ */ e("small", { children: c("ioTDashboard.configureDeviceAndCapability", "Configure device and capability") })
2296
641
  ] });
2297
642
  case "gauge":
2298
- return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__gauge", children: /* @__PURE__ */ r("svg", { viewBox: "0 0 100 60", children: [
643
+ return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__gauge", children: /* @__PURE__ */ i("svg", { viewBox: "0 0 100 60", children: [
2299
644
  /* @__PURE__ */ e(
2300
645
  "path",
2301
646
  {
@@ -2318,17 +663,17 @@ function ke({
2318
663
  /* @__PURE__ */ e("text", { x: "50", y: "50", textAnchor: "middle", fontSize: "14", fontWeight: "bold", children: "50%" })
2319
664
  ] }) });
2320
665
  case "map":
2321
- return /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__map-placeholder", children: [
2322
- /* @__PURE__ */ e(p, { name: "map-pin", size: 32 }),
2323
- /* @__PURE__ */ e("span", { children: "Device Map" }),
2324
- /* @__PURE__ */ r("small", { children: [
2325
- i.filter((t) => t.location).length,
666
+ return /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__map-placeholder", children: [
667
+ /* @__PURE__ */ e(m, { name: "map-pin", size: 32 }),
668
+ /* @__PURE__ */ e("span", { children: c("ioTDashboard.deviceMap", "Device Map") }),
669
+ /* @__PURE__ */ i("small", { children: [
670
+ r.filter((t) => t.location).length,
2326
671
  " devices with location"
2327
672
  ] })
2328
673
  ] });
2329
674
  case "alarms": {
2330
- const t = c.filter((o) => !o.cleared).slice(0, 5);
2331
- return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarm-list", children: t.length === 0 ? /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarm-empty", children: "No active alarms" }) : t.map((o) => /* @__PURE__ */ r(
675
+ const t = l.filter((o) => !o.cleared).slice(0, 5);
676
+ return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarm-list", children: t.length === 0 ? /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__alarm-empty", children: c("ioTDashboard.noActiveAlarms", "No active alarms") }) : t.map((o) => /* @__PURE__ */ i(
2332
677
  "div",
2333
678
  {
2334
679
  className: `nice-iot-dashboard__alarm-item nice-iot-dashboard__alarm-item--${o.severity}`,
@@ -2341,55 +686,55 @@ function ke({
2341
686
  )) });
2342
687
  }
2343
688
  case "control-panel":
2344
- return /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__control-placeholder", children: [
2345
- /* @__PURE__ */ e(p, { name: "settings", size: 32 }),
2346
- /* @__PURE__ */ e("span", { children: "Control Panel" }),
2347
- /* @__PURE__ */ e("small", { children: "Configure device controls" })
689
+ return /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__control-placeholder", children: [
690
+ /* @__PURE__ */ e(m, { name: "settings", size: 32 }),
691
+ /* @__PURE__ */ e("span", { children: c("ioTDashboard.controlPanel", "Control Panel") }),
692
+ /* @__PURE__ */ e("small", { children: c("ioTDashboard.configureDeviceControls", "Configure device controls") })
2348
693
  ] });
2349
694
  case "kpi":
2350
- return /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__kpi", children: [
2351
- /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__kpi-value", children: i.length }),
2352
- /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__kpi-label", children: "Total Devices" })
695
+ return /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__kpi", children: [
696
+ /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__kpi-value", children: r.length }),
697
+ /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__kpi-label", children: c("ioTDashboard.totalDevices", "Total Devices") })
2353
698
  ] });
2354
699
  default:
2355
700
  return /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__widget-placeholder", children: a.type });
2356
701
  }
2357
702
  }
2358
- function xe({ device: a, isSelected: i, onSelect: c }) {
2359
- return /* @__PURE__ */ r(
703
+ function te({ device: a, isSelected: r, onSelect: l }) {
704
+ return /* @__PURE__ */ i(
2360
705
  "div",
2361
706
  {
2362
- className: `nice-iot-dashboard__device-card ${i ? "nice-iot-dashboard__device-card--selected" : ""}`,
2363
- onClick: c,
707
+ className: `nice-iot-dashboard__device-card ${r ? "nice-iot-dashboard__device-card--selected" : ""}`,
708
+ onClick: l,
2364
709
  children: [
2365
- /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__device-card-header", children: [
710
+ /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-card-header", children: [
2366
711
  /* @__PURE__ */ e(
2367
712
  "span",
2368
713
  {
2369
714
  className: "nice-iot-dashboard__device-status",
2370
- style: { background: I(a.status) }
715
+ style: { background: E(a.status) }
2371
716
  }
2372
717
  ),
2373
718
  /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__device-name", children: a.name })
2374
719
  ] }),
2375
- /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__device-card-body", children: [
2376
- /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__device-info", children: [
2377
- /* @__PURE__ */ r("span", { children: [
720
+ /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-card-body", children: [
721
+ /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-info", children: [
722
+ /* @__PURE__ */ i("span", { children: [
2378
723
  "Type: ",
2379
724
  a.type
2380
725
  ] }),
2381
- /* @__PURE__ */ r("span", { children: [
726
+ /* @__PURE__ */ i("span", { children: [
2382
727
  "Protocol: ",
2383
728
  a.protocol
2384
729
  ] })
2385
730
  ] }),
2386
- a.lastSeen && /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__device-lastseen", children: [
731
+ a.lastSeen && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-lastseen", children: [
2387
732
  "Last seen: ",
2388
733
  a.lastSeen.toLocaleString()
2389
734
  ] }),
2390
- /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__device-capabilities", children: [
735
+ /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-capabilities", children: [
2391
736
  a.capabilities.slice(0, 3).map((n) => /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-badge", children: n.name }, n.id)),
2392
- a.capabilities.length > 3 && /* @__PURE__ */ r("span", { className: "nice-iot-dashboard__capability-more", children: [
737
+ a.capabilities.length > 3 && /* @__PURE__ */ i("span", { className: "nice-iot-dashboard__capability-more", children: [
2393
738
  "+",
2394
739
  a.capabilities.length - 3
2395
740
  ] })
@@ -2399,80 +744,81 @@ function xe({ device: a, isSelected: i, onSelect: c }) {
2399
744
  }
2400
745
  );
2401
746
  }
2402
- function Se({
747
+ function oe({
2403
748
  device: a,
2404
- onCommand: i,
2405
- onClose: c
749
+ onCommand: r,
750
+ onClose: l
2406
751
  }) {
2407
- return /* @__PURE__ */ r("aside", { className: "nice-iot-dashboard__device-detail", children: [
2408
- /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__device-detail-header", children: [
752
+ const { t: n } = b();
753
+ return /* @__PURE__ */ i("aside", { className: "nice-iot-dashboard__device-detail", children: [
754
+ /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-detail-header", children: [
2409
755
  /* @__PURE__ */ e("h3", { children: a.name }),
2410
- /* @__PURE__ */ e("button", { onClick: c, children: "×" })
756
+ /* @__PURE__ */ e("button", { "aria-label": n("ioTDashboard.close", "Close"), onClick: l, children: /* @__PURE__ */ e(m, { name: "close", size: 14 }) })
2411
757
  ] }),
2412
- /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__device-detail-content", children: [
2413
- /* @__PURE__ */ r("section", { children: [
2414
- /* @__PURE__ */ e("h4", { children: "Status" }),
2415
- /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__detail-row", children: [
758
+ /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__device-detail-content", children: [
759
+ /* @__PURE__ */ i("section", { children: [
760
+ /* @__PURE__ */ e("h4", { children: n("ioTDashboard.status", "Status") }),
761
+ /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
2416
762
  /* @__PURE__ */ e("span", { children: "Status:" }),
2417
763
  /* @__PURE__ */ e(
2418
764
  "span",
2419
765
  {
2420
766
  className: "nice-iot-dashboard__status-badge",
2421
- style: { background: I(a.status) },
767
+ style: { background: E(a.status) },
2422
768
  children: a.status
2423
769
  }
2424
770
  )
2425
771
  ] }),
2426
- a.lastSeen && /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__detail-row", children: [
772
+ a.lastSeen && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
2427
773
  /* @__PURE__ */ e("span", { children: "Last Seen:" }),
2428
774
  /* @__PURE__ */ e("span", { children: a.lastSeen.toLocaleString() })
2429
775
  ] })
2430
776
  ] }),
2431
- /* @__PURE__ */ r("section", { children: [
2432
- /* @__PURE__ */ e("h4", { children: "Connection" }),
2433
- /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__detail-row", children: [
777
+ /* @__PURE__ */ i("section", { children: [
778
+ /* @__PURE__ */ e("h4", { children: n("ioTDashboard.connection", "Connection") }),
779
+ /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
2434
780
  /* @__PURE__ */ e("span", { children: "Protocol:" }),
2435
781
  /* @__PURE__ */ e("span", { children: a.protocol })
2436
782
  ] }),
2437
- a.connectionInfo.host && /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__detail-row", children: [
783
+ a.connectionInfo.host && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
2438
784
  /* @__PURE__ */ e("span", { children: "Host:" }),
2439
- /* @__PURE__ */ r("span", { children: [
785
+ /* @__PURE__ */ i("span", { children: [
2440
786
  a.connectionInfo.host,
2441
787
  ":",
2442
788
  a.connectionInfo.port
2443
789
  ] })
2444
790
  ] })
2445
791
  ] }),
2446
- a.metadata && /* @__PURE__ */ r("section", { children: [
2447
- /* @__PURE__ */ e("h4", { children: "Metadata" }),
2448
- a.metadata.manufacturer && /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__detail-row", children: [
792
+ a.metadata && /* @__PURE__ */ i("section", { children: [
793
+ /* @__PURE__ */ e("h4", { children: n("ioTDashboard.metadata", "Metadata") }),
794
+ a.metadata.manufacturer && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
2449
795
  /* @__PURE__ */ e("span", { children: "Manufacturer:" }),
2450
796
  /* @__PURE__ */ e("span", { children: a.metadata.manufacturer })
2451
797
  ] }),
2452
- a.metadata.model && /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__detail-row", children: [
798
+ a.metadata.model && /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__detail-row", children: [
2453
799
  /* @__PURE__ */ e("span", { children: "Model:" }),
2454
800
  /* @__PURE__ */ e("span", { children: a.metadata.model })
2455
801
  ] })
2456
802
  ] }),
2457
- /* @__PURE__ */ r("section", { children: [
2458
- /* @__PURE__ */ e("h4", { children: "Capabilities" }),
2459
- /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__capabilities-list", children: a.capabilities.map((n) => /* @__PURE__ */ r("div", { className: "nice-iot-dashboard__capability-item", children: [
2460
- /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-name", children: n.name }),
2461
- /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-type", children: n.type }),
2462
- n.writable && i && /* @__PURE__ */ e(
803
+ /* @__PURE__ */ i("section", { children: [
804
+ /* @__PURE__ */ e("h4", { children: n("ioTDashboard.capabilities", "Capabilities") }),
805
+ /* @__PURE__ */ e("div", { className: "nice-iot-dashboard__capabilities-list", children: a.capabilities.map((c) => /* @__PURE__ */ i("div", { className: "nice-iot-dashboard__capability-item", children: [
806
+ /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-name", children: c.name }),
807
+ /* @__PURE__ */ e("span", { className: "nice-iot-dashboard__capability-type", children: c.type }),
808
+ c.writable && r && /* @__PURE__ */ e(
2463
809
  "button",
2464
810
  {
2465
811
  className: "nice-iot-dashboard__capability-control",
2466
- onClick: () => i(a.id, n.id, !0),
2467
- children: "Control"
812
+ onClick: () => r(a.id, c.id, !0),
813
+ children: n("ioTDashboard.control", "Control")
2468
814
  }
2469
815
  )
2470
- ] }, n.id)) })
816
+ ] }, c.id)) })
2471
817
  ] })
2472
818
  ] })
2473
819
  ] });
2474
820
  }
2475
- const Le = [
821
+ const ce = [
2476
822
  { name: "MQTT Broker", image: "eclipse-mosquitto:latest" },
2477
823
  { name: "Node-RED", image: "nodered/node-red:latest" },
2478
824
  { name: "InfluxDB", image: "influxdb:latest" },
@@ -2480,109 +826,126 @@ const Le = [
2480
826
  { name: "Telegraf", image: "telegraf:latest" },
2481
827
  { name: "Protocol Adapter", image: "nice2dev/protocol-adapter:latest" }
2482
828
  ];
2483
- function Oe({
829
+ function fe({
2484
830
  nodes: a = [],
2485
- modules: i = [],
2486
- onNodeSelect: c,
831
+ modules: r = [],
832
+ onNodeSelect: l,
2487
833
  onModuleDeploy: n,
2488
- onModuleAction: t,
2489
- onNodeSync: o,
2490
- className: d = ""
834
+ onModuleAction: c,
835
+ onNodeSync: t,
836
+ className: o = ""
2491
837
  }) {
2492
- const [l, b] = u(null), [m, _] = u("nodes"), [w, g] = u(!1), [v, N] = u({
838
+ const { t: s } = b(), [h, p] = g(null), [u, H] = g("nodes"), [N, k] = g(!1), [M, w] = g({
2493
839
  name: "",
2494
840
  image: "",
2495
841
  status: "pending"
2496
- }), H = C(
2497
- (y) => {
2498
- b(y), c == null || c(y);
842
+ }), _ = f(
843
+ (v) => {
844
+ p(v), l == null || l(v);
2499
845
  },
2500
- [c]
2501
- ), L = C(async () => {
2502
- !l || !v.name || !v.image || (await (n == null ? void 0 : n(l.id, v)), g(!1), N({ name: "", image: "", status: "pending" }));
2503
- }, [l, v, n]), z = C(
2504
- async (y, k) => {
2505
- l && await (t == null ? void 0 : t(l.id, y, k));
846
+ [l]
847
+ ), V = f(async () => {
848
+ !h || !M.name || !M.image || (await (n == null ? void 0 : n(h.id, M)), k(!1), w({ name: "", image: "", status: "pending" }));
849
+ }, [h, M, n]), y = f(
850
+ async (v, D) => {
851
+ h && await (c == null ? void 0 : c(h.id, v, D));
2506
852
  },
2507
- [l, t]
2508
- ), A = C(async () => {
2509
- l && await (o == null ? void 0 : o(l.id));
2510
- }, [l, o]);
2511
- return /* @__PURE__ */ r("div", { className: `nice-edge-manager ${d}`, children: [
2512
- /* @__PURE__ */ r("header", { className: "nice-edge-manager__header", children: [
2513
- /* @__PURE__ */ e("h1", { children: "Edge Manager" }),
2514
- /* @__PURE__ */ r("nav", { className: "nice-edge-manager__nav", children: [
2515
- /* @__PURE__ */ r("button", { className: m === "nodes" ? "active" : "", onClick: () => _("nodes"), children: [
2516
- "Nodes (",
2517
- a.length,
2518
- ")"
2519
- ] }),
2520
- /* @__PURE__ */ e("button", { className: m === "modules" ? "active" : "", onClick: () => _("modules"), children: "Modules" })
853
+ [h, c]
854
+ ), L = f(async () => {
855
+ h && await (t == null ? void 0 : t(h.id));
856
+ }, [h, t]);
857
+ return /* @__PURE__ */ i("div", { className: `nice-edge-manager ${o}`, children: [
858
+ /* @__PURE__ */ i("header", { className: "nice-edge-manager__header", children: [
859
+ /* @__PURE__ */ e("h1", { children: s("edgeManager.edgeManager", "Edge Manager") }),
860
+ /* @__PURE__ */ i("nav", { className: "nice-edge-manager__nav", children: [
861
+ /* @__PURE__ */ i(
862
+ "button",
863
+ {
864
+ className: `nice-edge-manager__nav-button ${u === "nodes" ? "nice-edge-manager__nav-button--active" : ""}`,
865
+ onClick: () => H("nodes"),
866
+ children: [
867
+ "Nodes (",
868
+ a.length,
869
+ ")"
870
+ ]
871
+ }
872
+ ),
873
+ /* @__PURE__ */ e(
874
+ "button",
875
+ {
876
+ className: `nice-edge-manager__nav-button ${u === "modules" ? "nice-edge-manager__nav-button--active" : ""}`,
877
+ onClick: () => H("modules"),
878
+ children: s("edgeManager.modules", "Modules")
879
+ }
880
+ )
2521
881
  ] })
2522
882
  ] }),
2523
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__main", children: [
2524
- m === "nodes" && /* @__PURE__ */ e("div", { className: "nice-edge-manager__nodes", children: /* @__PURE__ */ r("div", { className: "nice-edge-manager__node-grid", children: [
2525
- a.map((y) => /* @__PURE__ */ e(
2526
- Ve,
883
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__main", children: [
884
+ u === "nodes" && /* @__PURE__ */ e("div", { className: "nice-edge-manager__nodes", children: /* @__PURE__ */ i("div", { className: "nice-edge-manager__node-grid", children: [
885
+ a.map((v) => /* @__PURE__ */ e(
886
+ de,
2527
887
  {
2528
- node: y,
2529
- isSelected: (l == null ? void 0 : l.id) === y.id,
2530
- onSelect: () => H(y)
888
+ node: v,
889
+ isSelected: (h == null ? void 0 : h.id) === v.id,
890
+ onSelect: () => _(v)
2531
891
  },
2532
- y.id
892
+ v.id
2533
893
  )),
2534
- a.length === 0 && /* @__PURE__ */ e("div", { className: "nice-edge-manager__empty", children: "No edge nodes configured" })
894
+ a.length === 0 && /* @__PURE__ */ e("div", { className: "nice-edge-manager__empty", children: s("edgeManager.noEdgeNodesConfigured", "No edge nodes configured") })
2535
895
  ] }) }),
2536
- m === "modules" && l && /* @__PURE__ */ r("div", { className: "nice-edge-manager__modules", children: [
2537
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__modules-header", children: [
2538
- /* @__PURE__ */ r("h3", { children: [
2539
- "Modules on ",
2540
- l.name
2541
- ] }),
896
+ u === "modules" && h && /* @__PURE__ */ i("div", { className: "nice-edge-manager__modules", children: [
897
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__modules-header", children: [
898
+ /* @__PURE__ */ e("h3", { children: s("edgeManager.modulesOn", "Modules on {name}").replace(
899
+ "{name}",
900
+ String(h.name)
901
+ ) }),
2542
902
  /* @__PURE__ */ e(
2543
903
  "button",
2544
904
  {
2545
905
  className: "nice-edge-manager__deploy-btn",
2546
- onClick: () => g(!0),
906
+ onClick: () => k(!0),
2547
907
  children: "+ Deploy Module"
2548
908
  }
2549
909
  )
2550
910
  ] }),
2551
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__module-grid", children: [
2552
- l.deployedModules.map((y) => /* @__PURE__ */ e(
2553
- Ae,
911
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__module-grid", children: [
912
+ h.deployedModules.map((v) => /* @__PURE__ */ e(
913
+ he,
2554
914
  {
2555
- module: y,
2556
- onAction: (k) => z(y.id, k)
915
+ module: v,
916
+ onAction: (D) => y(v.id, D)
2557
917
  },
2558
- y.id
918
+ v.id
2559
919
  )),
2560
- l.deployedModules.length === 0 && /* @__PURE__ */ e("div", { className: "nice-edge-manager__empty", children: "No modules deployed on this node" })
920
+ h.deployedModules.length === 0 && /* @__PURE__ */ e("div", { className: "nice-edge-manager__empty", children: s("edgeManager.noModulesDeployedOnThis", "No modules deployed on this node") })
2561
921
  ] })
2562
922
  ] }),
2563
- m === "modules" && !l && /* @__PURE__ */ e("div", { className: "nice-edge-manager__no-selection", children: "Select a node from the Nodes tab to manage modules" }),
2564
- l && /* @__PURE__ */ e(
2565
- Pe,
923
+ u === "modules" && !h && /* @__PURE__ */ e("div", { className: "nice-edge-manager__no-selection", children: s(
924
+ "edgeManager.selectANodeFromThe",
925
+ "Select a node from the Nodes tab to manage modules"
926
+ ) }),
927
+ h && /* @__PURE__ */ e(
928
+ me,
2566
929
  {
2567
- node: l,
2568
- onSync: A,
2569
- onClose: () => b(null)
930
+ node: h,
931
+ onSync: L,
932
+ onClose: () => p(null)
2570
933
  }
2571
934
  )
2572
935
  ] }),
2573
- w && /* @__PURE__ */ e(
2574
- De,
936
+ N && /* @__PURE__ */ e(
937
+ pe,
2575
938
  {
2576
- config: v,
2577
- templates: Le,
2578
- onChange: N,
2579
- onDeploy: L,
2580
- onClose: () => g(!1)
939
+ config: M,
940
+ templates: ce,
941
+ onChange: w,
942
+ onDeploy: V,
943
+ onClose: () => k(!1)
2581
944
  }
2582
945
  )
2583
946
  ] });
2584
947
  }
2585
- function ne(a) {
948
+ function Q(a) {
2586
949
  switch (a) {
2587
950
  case "running":
2588
951
  return "var(--nice-success, #28a745)";
@@ -2598,47 +961,47 @@ function ne(a) {
2598
961
  return "var(--nice-text-secondary, #6c757d)";
2599
962
  }
2600
963
  }
2601
- function j(a) {
964
+ function B(a) {
2602
965
  return a < 1024 ? `${a} B` : a < 1024 * 1024 ? `${(a / 1024).toFixed(1)} KB` : a < 1024 * 1024 * 1024 ? `${(a / 1024 / 1024).toFixed(1)} MB` : `${(a / 1024 / 1024 / 1024).toFixed(2)} GB`;
2603
966
  }
2604
- function Te(a) {
2605
- const i = Math.floor(a / 86400), c = Math.floor(a % 86400 / 3600), n = Math.floor(a % 3600 / 60);
2606
- return i > 0 ? `${i}d ${c}h` : c > 0 ? `${c}h ${n}m` : `${n}m`;
967
+ function se(a) {
968
+ const r = Math.floor(a / 86400), l = Math.floor(a % 86400 / 3600), n = Math.floor(a % 3600 / 60);
969
+ return r > 0 ? `${r}d ${l}h` : l > 0 ? `${l}h ${n}m` : `${n}m`;
2607
970
  }
2608
- function Ve({ node: a, isSelected: i, onSelect: c }) {
2609
- return /* @__PURE__ */ r(
971
+ function de({ node: a, isSelected: r, onSelect: l }) {
972
+ return /* @__PURE__ */ i(
2610
973
  "div",
2611
974
  {
2612
- className: `nice-edge-manager__node-card ${i ? "nice-edge-manager__node-card--selected" : ""}`,
2613
- onClick: c,
975
+ className: `nice-edge-manager__node-card ${r ? "nice-edge-manager__node-card--selected" : ""}`,
976
+ onClick: l,
2614
977
  children: [
2615
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__node-header", children: [
978
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__node-header", children: [
2616
979
  /* @__PURE__ */ e(
2617
980
  "span",
2618
981
  {
2619
982
  className: "nice-edge-manager__node-status",
2620
- style: { background: ne(a.status) }
983
+ style: { background: Q(a.status) }
2621
984
  }
2622
985
  ),
2623
986
  /* @__PURE__ */ e("span", { className: "nice-edge-manager__node-name", children: a.name }),
2624
987
  /* @__PURE__ */ e("span", { className: "nice-edge-manager__node-type", children: a.type })
2625
988
  ] }),
2626
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__node-body", children: [
2627
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__node-info", children: [
2628
- /* @__PURE__ */ r("span", { children: [
2629
- /* @__PURE__ */ e(p, { name: "server", size: 12 }),
989
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__node-body", children: [
990
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__node-info", children: [
991
+ /* @__PURE__ */ i("span", { children: [
992
+ /* @__PURE__ */ e(m, { name: "server", size: 12 }),
2630
993
  " ",
2631
994
  a.hardware.cpu
2632
995
  ] }),
2633
- /* @__PURE__ */ r("span", { children: [
2634
- /* @__PURE__ */ e(p, { name: "database", size: 12 }),
996
+ /* @__PURE__ */ i("span", { children: [
997
+ /* @__PURE__ */ e(m, { name: "database", size: 12 }),
2635
998
  " ",
2636
999
  (a.hardware.memoryMB / 1024).toFixed(1),
2637
1000
  " GB"
2638
1001
  ] })
2639
1002
  ] }),
2640
- /* @__PURE__ */ e("div", { className: "nice-edge-manager__node-metrics", children: a.metrics && /* @__PURE__ */ r(P, { children: [
2641
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__metric", children: [
1003
+ /* @__PURE__ */ e("div", { className: "nice-edge-manager__node-metrics", children: a.metrics && /* @__PURE__ */ i(A, { children: [
1004
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__metric", children: [
2642
1005
  /* @__PURE__ */ e("span", { className: "nice-edge-manager__metric-label", children: "CPU" }),
2643
1006
  /* @__PURE__ */ e("div", { className: "nice-edge-manager__metric-bar", children: /* @__PURE__ */ e(
2644
1007
  "div",
@@ -2647,12 +1010,12 @@ function Ve({ node: a, isSelected: i, onSelect: c }) {
2647
1010
  style: { width: `${a.metrics.cpuUsage}%` }
2648
1011
  }
2649
1012
  ) }),
2650
- /* @__PURE__ */ r("span", { className: "nice-edge-manager__metric-value", children: [
1013
+ /* @__PURE__ */ i("span", { className: "nice-edge-manager__metric-value", children: [
2651
1014
  a.metrics.cpuUsage.toFixed(0),
2652
1015
  "%"
2653
1016
  ] })
2654
1017
  ] }),
2655
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__metric", children: [
1018
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__metric", children: [
2656
1019
  /* @__PURE__ */ e("span", { className: "nice-edge-manager__metric-label", children: "MEM" }),
2657
1020
  /* @__PURE__ */ e("div", { className: "nice-edge-manager__metric-bar", children: /* @__PURE__ */ e(
2658
1021
  "div",
@@ -2661,13 +1024,13 @@ function Ve({ node: a, isSelected: i, onSelect: c }) {
2661
1024
  style: { width: `${a.metrics.memoryUsage}%` }
2662
1025
  }
2663
1026
  ) }),
2664
- /* @__PURE__ */ r("span", { className: "nice-edge-manager__metric-value", children: [
1027
+ /* @__PURE__ */ i("span", { className: "nice-edge-manager__metric-value", children: [
2665
1028
  a.metrics.memoryUsage.toFixed(0),
2666
1029
  "%"
2667
1030
  ] })
2668
1031
  ] })
2669
1032
  ] }) }),
2670
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__node-modules", children: [
1033
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__node-modules", children: [
2671
1034
  a.deployedModules.length,
2672
1035
  " modules deployed"
2673
1036
  ] })
@@ -2676,9 +1039,10 @@ function Ve({ node: a, isSelected: i, onSelect: c }) {
2676
1039
  }
2677
1040
  );
2678
1041
  }
2679
- function Ae({ module: a, onAction: i }) {
2680
- return /* @__PURE__ */ r("div", { className: "nice-edge-manager__module-card", children: [
2681
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__module-header", children: [
1042
+ function he({ module: a, onAction: r }) {
1043
+ const { t: l } = b();
1044
+ return /* @__PURE__ */ i("div", { className: "nice-edge-manager__module-card", children: [
1045
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__module-header", children: [
2682
1046
  /* @__PURE__ */ e(
2683
1047
  "span",
2684
1048
  {
@@ -2694,154 +1058,156 @@ function Ae({ module: a, onAction: i }) {
2694
1058
  }
2695
1059
  ),
2696
1060
  /* @__PURE__ */ e("span", { className: "nice-edge-manager__module-name", children: a.name }),
2697
- /* @__PURE__ */ r("span", { className: "nice-edge-manager__module-version", children: [
1061
+ /* @__PURE__ */ i("span", { className: "nice-edge-manager__module-version", children: [
2698
1062
  "v",
2699
1063
  a.version
2700
1064
  ] })
2701
1065
  ] }),
2702
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__module-body", children: [
1066
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__module-body", children: [
2703
1067
  /* @__PURE__ */ e("div", { className: "nice-edge-manager__module-image", children: a.image }),
2704
- a.resources && /* @__PURE__ */ r("div", { className: "nice-edge-manager__module-resources", children: [
2705
- a.resources.cpuLimit && /* @__PURE__ */ r("span", { children: [
1068
+ a.resources && /* @__PURE__ */ i("div", { className: "nice-edge-manager__module-resources", children: [
1069
+ a.resources.cpuLimit && /* @__PURE__ */ i("span", { children: [
2706
1070
  "CPU: ",
2707
1071
  a.resources.cpuLimit
2708
1072
  ] }),
2709
- a.resources.memoryLimitMB && /* @__PURE__ */ r("span", { children: [
1073
+ a.resources.memoryLimitMB && /* @__PURE__ */ i("span", { children: [
2710
1074
  "RAM: ",
2711
1075
  a.resources.memoryLimitMB,
2712
1076
  " MB"
2713
1077
  ] })
2714
1078
  ] }),
2715
- a.ports && a.ports.length > 0 && /* @__PURE__ */ r("div", { className: "nice-edge-manager__module-ports", children: [
1079
+ a.ports && a.ports.length > 0 && /* @__PURE__ */ i("div", { className: "nice-edge-manager__module-ports", children: [
2716
1080
  "Ports: ",
2717
- a.ports.map((n) => `${n.host}:${n.container}`).join(", ")
1081
+ a.ports.map((c) => `${c.host}:${c.container}`).join(", ")
2718
1082
  ] })
2719
1083
  ] }),
2720
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__module-actions", children: [
2721
- a.status === "running" && /* @__PURE__ */ r(P, { children: [
2722
- /* @__PURE__ */ e("button", { onClick: () => i("stop"), children: "Stop" }),
2723
- /* @__PURE__ */ e("button", { onClick: () => i("restart"), children: "Restart" })
1084
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__module-actions", children: [
1085
+ a.status === "running" && /* @__PURE__ */ i(A, { children: [
1086
+ /* @__PURE__ */ e("button", { onClick: () => r("stop"), children: l("edgeManager.stop", "Stop") }),
1087
+ /* @__PURE__ */ e("button", { onClick: () => r("restart"), children: l("edgeManager.restart", "Restart") })
2724
1088
  ] }),
2725
- a.status === "stopped" && /* @__PURE__ */ e("button", { onClick: () => i("start"), children: "Start" }),
2726
- /* @__PURE__ */ e("button", { className: "nice-edge-manager__module-remove", onClick: () => i("remove"), children: "Remove" })
1089
+ a.status === "stopped" && /* @__PURE__ */ e("button", { onClick: () => r("start"), children: l("edgeManager.start", "Start") }),
1090
+ /* @__PURE__ */ e("button", { className: "nice-edge-manager__module-remove", onClick: () => r("remove"), children: l("edgeManager.remove", "Remove") })
2727
1091
  ] })
2728
1092
  ] });
2729
1093
  }
2730
- function Pe({ node: a, onSync: i, onClose: c }) {
2731
- return /* @__PURE__ */ r("aside", { className: "nice-edge-manager__detail", children: [
2732
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-header", children: [
1094
+ function me({ node: a, onSync: r, onClose: l }) {
1095
+ const { t: n } = b();
1096
+ return /* @__PURE__ */ i("aside", { className: "nice-edge-manager__detail", children: [
1097
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-header", children: [
2733
1098
  /* @__PURE__ */ e("h3", { children: a.name }),
2734
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-actions", children: [
2735
- /* @__PURE__ */ r("button", { onClick: i, children: [
2736
- /* @__PURE__ */ e(p, { name: "refresh", size: 14 }),
2737
- " Sync"
1099
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-actions", children: [
1100
+ /* @__PURE__ */ i("button", { onClick: r, children: [
1101
+ /* @__PURE__ */ e(m, { name: "refresh", size: 14 }),
1102
+ " ",
1103
+ n("edgeManager.sync", "Sync")
2738
1104
  ] }),
2739
- /* @__PURE__ */ e("button", { onClick: c, "aria-label": "Close", children: /* @__PURE__ */ e(p, { name: "close", size: 14 }) })
1105
+ /* @__PURE__ */ e("button", { onClick: l, "aria-label": n("edgeManager.close", "Close"), children: /* @__PURE__ */ e(m, { name: "close", size: 14 }) })
2740
1106
  ] })
2741
1107
  ] }),
2742
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-content", children: [
2743
- /* @__PURE__ */ r("section", { children: [
2744
- /* @__PURE__ */ e("h4", { children: "Status" }),
2745
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1108
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-content", children: [
1109
+ /* @__PURE__ */ i("section", { children: [
1110
+ /* @__PURE__ */ e("h4", { children: n("edgeManager.status", "Status") }),
1111
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2746
1112
  /* @__PURE__ */ e("span", { children: "Status:" }),
2747
1113
  /* @__PURE__ */ e(
2748
1114
  "span",
2749
1115
  {
2750
1116
  className: "nice-edge-manager__status-badge",
2751
- style: { background: ne(a.status) },
1117
+ style: { background: Q(a.status) },
2752
1118
  children: a.status
2753
1119
  }
2754
1120
  )
2755
1121
  ] }),
2756
- a.metrics && /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1122
+ a.metrics && /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2757
1123
  /* @__PURE__ */ e("span", { children: "Uptime:" }),
2758
- /* @__PURE__ */ e("span", { children: Te(a.metrics.uptime) })
1124
+ /* @__PURE__ */ e("span", { children: se(a.metrics.uptime) })
2759
1125
  ] })
2760
1126
  ] }),
2761
- /* @__PURE__ */ r("section", { children: [
2762
- /* @__PURE__ */ e("h4", { children: "Hardware" }),
2763
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1127
+ /* @__PURE__ */ i("section", { children: [
1128
+ /* @__PURE__ */ e("h4", { children: n("edgeManager.hardware", "Hardware") }),
1129
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2764
1130
  /* @__PURE__ */ e("span", { children: "CPU:" }),
2765
- /* @__PURE__ */ r("span", { children: [
1131
+ /* @__PURE__ */ i("span", { children: [
2766
1132
  a.hardware.cpu,
2767
1133
  " (",
2768
1134
  a.hardware.cores,
2769
1135
  " cores)"
2770
1136
  ] })
2771
1137
  ] }),
2772
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1138
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2773
1139
  /* @__PURE__ */ e("span", { children: "Memory:" }),
2774
- /* @__PURE__ */ r("span", { children: [
1140
+ /* @__PURE__ */ i("span", { children: [
2775
1141
  (a.hardware.memoryMB / 1024).toFixed(1),
2776
1142
  " GB"
2777
1143
  ] })
2778
1144
  ] }),
2779
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1145
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2780
1146
  /* @__PURE__ */ e("span", { children: "Storage:" }),
2781
- /* @__PURE__ */ r("span", { children: [
1147
+ /* @__PURE__ */ i("span", { children: [
2782
1148
  (a.hardware.storageMB / 1024).toFixed(1),
2783
1149
  " GB"
2784
1150
  ] })
2785
1151
  ] }),
2786
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1152
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2787
1153
  /* @__PURE__ */ e("span", { children: "Architecture:" }),
2788
1154
  /* @__PURE__ */ e("span", { children: a.hardware.architecture })
2789
1155
  ] })
2790
1156
  ] }),
2791
- /* @__PURE__ */ r("section", { children: [
2792
- /* @__PURE__ */ e("h4", { children: "Software" }),
2793
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1157
+ /* @__PURE__ */ i("section", { children: [
1158
+ /* @__PURE__ */ e("h4", { children: n("edgeManager.software", "Software") }),
1159
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2794
1160
  /* @__PURE__ */ e("span", { children: "OS:" }),
2795
- /* @__PURE__ */ r("span", { children: [
1161
+ /* @__PURE__ */ i("span", { children: [
2796
1162
  a.software.os,
2797
1163
  " ",
2798
1164
  a.software.osVersion
2799
1165
  ] })
2800
1166
  ] }),
2801
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1167
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2802
1168
  /* @__PURE__ */ e("span", { children: "Runtime:" }),
2803
- /* @__PURE__ */ r("span", { children: [
1169
+ /* @__PURE__ */ i("span", { children: [
2804
1170
  a.software.runtime,
2805
1171
  " ",
2806
1172
  a.software.runtimeVersion
2807
1173
  ] })
2808
1174
  ] }),
2809
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1175
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2810
1176
  /* @__PURE__ */ e("span", { children: "Agent:" }),
2811
- /* @__PURE__ */ r("span", { children: [
1177
+ /* @__PURE__ */ i("span", { children: [
2812
1178
  a.software.agent,
2813
1179
  " v",
2814
1180
  a.software.agentVersion
2815
1181
  ] })
2816
1182
  ] })
2817
1183
  ] }),
2818
- /* @__PURE__ */ r("section", { children: [
2819
- /* @__PURE__ */ e("h4", { children: "Connectivity" }),
2820
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1184
+ /* @__PURE__ */ i("section", { children: [
1185
+ /* @__PURE__ */ e("h4", { children: n("edgeManager.connectivity", "Connectivity") }),
1186
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2821
1187
  /* @__PURE__ */ e("span", { children: "Cloud:" }),
2822
- /* @__PURE__ */ r("span", { children: [
2823
- /* @__PURE__ */ e(p, { name: a.connectivity.cloudConnected ? "check" : "close", size: 12 }),
1188
+ /* @__PURE__ */ i("span", { children: [
1189
+ /* @__PURE__ */ e(m, { name: a.connectivity.cloudConnected ? "check" : "close", size: 12 }),
2824
1190
  " ",
2825
1191
  a.connectivity.cloudConnected ? "Connected" : "Disconnected"
2826
1192
  ] })
2827
1193
  ] }),
2828
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1194
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2829
1195
  /* @__PURE__ */ e("span", { children: "Network:" }),
2830
1196
  /* @__PURE__ */ e("span", { children: a.connectivity.localNetwork })
2831
1197
  ] }),
2832
- a.connectivity.publicIP && /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1198
+ a.connectivity.publicIP && /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2833
1199
  /* @__PURE__ */ e("span", { children: "Public IP:" }),
2834
1200
  /* @__PURE__ */ e("span", { children: a.connectivity.publicIP })
2835
1201
  ] }),
2836
- a.connectivity.lastSync && /* @__PURE__ */ r("div", { className: "nice-edge-manager__detail-row", children: [
1202
+ a.connectivity.lastSync && /* @__PURE__ */ i("div", { className: "nice-edge-manager__detail-row", children: [
2837
1203
  /* @__PURE__ */ e("span", { children: "Last Sync:" }),
2838
1204
  /* @__PURE__ */ e("span", { children: a.connectivity.lastSync.toLocaleString() })
2839
1205
  ] })
2840
1206
  ] }),
2841
- a.metrics && /* @__PURE__ */ r("section", { children: [
2842
- /* @__PURE__ */ e("h4", { children: "Resource Usage" }),
2843
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__resource-chart", children: [
2844
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__resource-item", children: [
1207
+ a.metrics && /* @__PURE__ */ i("section", { children: [
1208
+ /* @__PURE__ */ e("h4", { children: n("edgeManager.resourceUsage", "Resource Usage") }),
1209
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__resource-chart", children: [
1210
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__resource-item", children: [
2845
1211
  /* @__PURE__ */ e("span", { children: "CPU" }),
2846
1212
  /* @__PURE__ */ e("div", { className: "nice-edge-manager__resource-bar", children: /* @__PURE__ */ e(
2847
1213
  "div",
@@ -2850,13 +1216,13 @@ function Pe({ node: a, onSync: i, onClose: c }) {
2850
1216
  style: { width: `${a.metrics.cpuUsage}%` }
2851
1217
  }
2852
1218
  ) }),
2853
- /* @__PURE__ */ r("span", { children: [
1219
+ /* @__PURE__ */ i("span", { children: [
2854
1220
  a.metrics.cpuUsage.toFixed(1),
2855
1221
  "%"
2856
1222
  ] })
2857
1223
  ] }),
2858
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__resource-item", children: [
2859
- /* @__PURE__ */ e("span", { children: "Memory" }),
1224
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__resource-item", children: [
1225
+ /* @__PURE__ */ e("span", { children: n("edgeManager.memory", "Memory") }),
2860
1226
  /* @__PURE__ */ e("div", { className: "nice-edge-manager__resource-bar", children: /* @__PURE__ */ e(
2861
1227
  "div",
2862
1228
  {
@@ -2864,13 +1230,13 @@ function Pe({ node: a, onSync: i, onClose: c }) {
2864
1230
  style: { width: `${a.metrics.memoryUsage}%` }
2865
1231
  }
2866
1232
  ) }),
2867
- /* @__PURE__ */ r("span", { children: [
1233
+ /* @__PURE__ */ i("span", { children: [
2868
1234
  a.metrics.memoryUsage.toFixed(1),
2869
1235
  "%"
2870
1236
  ] })
2871
1237
  ] }),
2872
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__resource-item", children: [
2873
- /* @__PURE__ */ e("span", { children: "Disk" }),
1238
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__resource-item", children: [
1239
+ /* @__PURE__ */ e("span", { children: n("edgeManager.disk", "Disk") }),
2874
1240
  /* @__PURE__ */ e("div", { className: "nice-edge-manager__resource-bar", children: /* @__PURE__ */ e(
2875
1241
  "div",
2876
1242
  {
@@ -2878,103 +1244,106 @@ function Pe({ node: a, onSync: i, onClose: c }) {
2878
1244
  style: { width: `${a.metrics.diskUsage}%` }
2879
1245
  }
2880
1246
  ) }),
2881
- /* @__PURE__ */ r("span", { children: [
1247
+ /* @__PURE__ */ i("span", { children: [
2882
1248
  a.metrics.diskUsage.toFixed(1),
2883
1249
  "%"
2884
1250
  ] })
2885
1251
  ] })
2886
1252
  ] }),
2887
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__network-stats", children: [
2888
- /* @__PURE__ */ r("span", { children: [
2889
- "↓ ",
2890
- j(a.metrics.networkIn)
1253
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__network-stats", children: [
1254
+ /* @__PURE__ */ i("span", { children: [
1255
+ /* @__PURE__ */ e(m, { name: "arrow-down", size: 12 }),
1256
+ " ",
1257
+ B(a.metrics.networkIn)
2891
1258
  ] }),
2892
- /* @__PURE__ */ r("span", { children: [
2893
- "↑ ",
2894
- j(a.metrics.networkOut)
1259
+ /* @__PURE__ */ i("span", { children: [
1260
+ /* @__PURE__ */ e(m, { name: "arrow-up", size: 12 }),
1261
+ " ",
1262
+ B(a.metrics.networkOut)
2895
1263
  ] })
2896
1264
  ] })
2897
1265
  ] })
2898
1266
  ] })
2899
1267
  ] });
2900
1268
  }
2901
- function De({
1269
+ function pe({
2902
1270
  config: a,
2903
- templates: i,
2904
- onChange: c,
1271
+ templates: r,
1272
+ onChange: l,
2905
1273
  onDeploy: n,
2906
- onClose: t
1274
+ onClose: c
2907
1275
  }) {
2908
- return /* @__PURE__ */ e("div", { className: "nice-edge-manager__dialog-overlay", children: /* @__PURE__ */ r("div", { className: "nice-edge-manager__dialog", children: [
2909
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__dialog-header", children: [
2910
- /* @__PURE__ */ e("h3", { children: "Deploy Module" }),
2911
- /* @__PURE__ */ e("button", { onClick: t, "aria-label": "Close", children: /* @__PURE__ */ e(p, { name: "close", size: 14 }) })
1276
+ const { t } = b();
1277
+ return /* @__PURE__ */ e("div", { className: "nice-edge-manager__dialog-overlay", children: /* @__PURE__ */ i("div", { className: "nice-edge-manager__dialog", children: [
1278
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__dialog-header", children: [
1279
+ /* @__PURE__ */ e("h3", { children: t("edgeManager.deployModule", "Deploy Module") }),
1280
+ /* @__PURE__ */ e("button", { onClick: c, "aria-label": t("edgeManager.close", "Close"), children: /* @__PURE__ */ e(m, { name: "close", size: 14 }) })
2912
1281
  ] }),
2913
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__dialog-content", children: [
2914
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__field", children: [
1282
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__dialog-content", children: [
1283
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__field", children: [
2915
1284
  /* @__PURE__ */ e("label", { children: "Template (optional)" }),
2916
- /* @__PURE__ */ r(
1285
+ /* @__PURE__ */ i(
2917
1286
  "select",
2918
1287
  {
2919
1288
  value: "",
2920
1289
  onChange: (o) => {
2921
- const d = i.find((l) => l.image === o.target.value);
2922
- d && c({
1290
+ const s = r.find((h) => h.image === o.target.value);
1291
+ s && l({
2923
1292
  ...a,
2924
- name: d.name,
2925
- image: d.image
1293
+ name: s.name,
1294
+ image: s.image
2926
1295
  });
2927
1296
  },
2928
1297
  children: [
2929
- /* @__PURE__ */ e("option", { value: "", children: "Select a template..." }),
2930
- i.map((o) => /* @__PURE__ */ e("option", { value: o.image, children: o.name }, o.image))
1298
+ /* @__PURE__ */ e("option", { value: "", children: t("edgeManager.selectATemplate", "Select a template...") }),
1299
+ r.map((o) => /* @__PURE__ */ e("option", { value: o.image, children: o.name }, o.image))
2931
1300
  ]
2932
1301
  }
2933
1302
  )
2934
1303
  ] }),
2935
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__field", children: [
2936
- /* @__PURE__ */ e("label", { children: "Module Name" }),
1304
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__field", children: [
1305
+ /* @__PURE__ */ e("label", { children: t("edgeManager.moduleName", "Module Name") }),
2937
1306
  /* @__PURE__ */ e(
2938
1307
  "input",
2939
1308
  {
2940
1309
  type: "text",
2941
1310
  value: a.name || "",
2942
- onChange: (o) => c({ ...a, name: o.target.value }),
2943
- placeholder: "e.g., my-module"
1311
+ onChange: (o) => l({ ...a, name: o.target.value }),
1312
+ placeholder: t("edgeManager.eGMyModule", "e.g., my-module")
2944
1313
  }
2945
1314
  )
2946
1315
  ] }),
2947
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__field", children: [
2948
- /* @__PURE__ */ e("label", { children: "Container Image" }),
1316
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__field", children: [
1317
+ /* @__PURE__ */ e("label", { children: t("edgeManager.containerImage", "Container Image") }),
2949
1318
  /* @__PURE__ */ e(
2950
1319
  "input",
2951
1320
  {
2952
1321
  type: "text",
2953
1322
  value: a.image || "",
2954
- onChange: (o) => c({ ...a, image: o.target.value }),
2955
- placeholder: "e.g., nginx:latest"
1323
+ onChange: (o) => l({ ...a, image: o.target.value }),
1324
+ placeholder: t("edgeManager.eGNginxLatest", "e.g., nginx:latest")
2956
1325
  }
2957
1326
  )
2958
1327
  ] }),
2959
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__field", children: [
2960
- /* @__PURE__ */ e("label", { children: "Version" }),
1328
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__field", children: [
1329
+ /* @__PURE__ */ e("label", { children: t("edgeManager.version", "Version") }),
2961
1330
  /* @__PURE__ */ e(
2962
1331
  "input",
2963
1332
  {
2964
1333
  type: "text",
2965
1334
  value: a.version || "1.0.0",
2966
- onChange: (o) => c({ ...a, version: o.target.value })
1335
+ onChange: (o) => l({ ...a, version: o.target.value })
2967
1336
  }
2968
1337
  )
2969
1338
  ] })
2970
1339
  ] }),
2971
- /* @__PURE__ */ r("div", { className: "nice-edge-manager__dialog-footer", children: [
2972
- /* @__PURE__ */ e("button", { onClick: t, children: "Cancel" }),
2973
- /* @__PURE__ */ e("button", { className: "nice-edge-manager__deploy-confirm", onClick: n, children: "Deploy" })
1340
+ /* @__PURE__ */ i("div", { className: "nice-edge-manager__dialog-footer", children: [
1341
+ /* @__PURE__ */ e("button", { onClick: c, children: t("edgeManager.cancel", "Cancel") }),
1342
+ /* @__PURE__ */ e("button", { className: "nice-edge-manager__deploy-confirm", onClick: n, children: t("edgeManager.deploy", "Deploy") })
2974
1343
  ] })
2975
1344
  ] }) });
2976
1345
  }
2977
- const Q = {
1346
+ const F = {
2978
1347
  broker: "localhost",
2979
1348
  port: 1883,
2980
1349
  clientId: `nice2dev-${Date.now()}`,
@@ -2982,288 +1351,289 @@ const Q = {
2982
1351
  keepAlive: 60,
2983
1352
  cleanSession: !0,
2984
1353
  topics: []
2985
- }, J = {
1354
+ }, q = {
2986
1355
  host: "localhost",
2987
1356
  port: 5683,
2988
1357
  useDTLS: !1,
2989
1358
  resources: []
2990
- }, K = {
1359
+ }, W = {
2991
1360
  type: "tcp",
2992
1361
  host: "localhost",
2993
1362
  port: 502,
2994
1363
  slaveId: 1,
2995
1364
  timeout: 1e3,
2996
1365
  registers: []
2997
- }, X = {
1366
+ }, G = {
2998
1367
  endpointUrl: "opc.tcp://localhost:4840",
2999
1368
  securityMode: "None",
3000
1369
  authentication: "anonymous",
3001
1370
  applicationName: "Nice2Dev IoT Client",
3002
1371
  nodes: []
3003
1372
  };
3004
- function qe({
1373
+ function ye({
3005
1374
  protocol: a = "mqtt",
3006
- config: i,
3007
- onSave: c,
1375
+ config: r,
1376
+ onSave: l,
3008
1377
  onTest: n,
3009
- className: t = ""
1378
+ className: c = ""
3010
1379
  }) {
3011
- const { t: o } = R(), [d, l] = u(a), [b, m] = u(
3012
- (i == null ? void 0 : i.type) === "mqtt" ? { ...Q, ...i.config } : Q
3013
- ), [_, w] = u(
3014
- (i == null ? void 0 : i.type) === "coap" ? { ...J, ...i.config } : J
3015
- ), [g, v] = u(
3016
- (i == null ? void 0 : i.type) === "modbus" ? { ...K, ...i.config } : K
3017
- ), [N, H] = u(
3018
- (i == null ? void 0 : i.type) === "opcua" ? { ...X, ...i.config } : X
3019
- ), [L, z] = u(null), [A, y] = u(!1), k = C(() => {
3020
- switch (d) {
1380
+ const { t } = b(), [o, s] = g(a), [h, p] = g(
1381
+ (r == null ? void 0 : r.type) === "mqtt" ? { ...F, ...r.config } : F
1382
+ ), [u, H] = g(
1383
+ (r == null ? void 0 : r.type) === "coap" ? { ...q, ...r.config } : q
1384
+ ), [N, k] = g(
1385
+ (r == null ? void 0 : r.type) === "modbus" ? { ...W, ...r.config } : W
1386
+ ), [M, w] = g(
1387
+ (r == null ? void 0 : r.type) === "opcua" ? { ...G, ...r.config } : G
1388
+ ), [_, V] = g(null), [y, L] = g(!1), v = f(() => {
1389
+ switch (o) {
3021
1390
  case "mqtt":
3022
- return b;
1391
+ return h;
3023
1392
  case "coap":
3024
- return _;
1393
+ return u;
3025
1394
  case "modbus-tcp":
3026
1395
  case "modbus-rtu":
3027
- return g;
3028
- case "opcua":
3029
1396
  return N;
1397
+ case "opcua":
1398
+ return M;
3030
1399
  default:
3031
- return b;
1400
+ return h;
3032
1401
  }
3033
- }, [d, b, _, g, N]), U = C(() => {
3034
- c == null || c(k());
3035
- }, [k, c]), E = C(async () => {
1402
+ }, [o, h, u, N, M]), D = f(() => {
1403
+ l == null || l(v());
1404
+ }, [v, l]), P = f(async () => {
3036
1405
  if (n) {
3037
- y(!0), z(null);
1406
+ L(!0), V(null);
3038
1407
  try {
3039
- const T = await n(k());
3040
- z(T);
1408
+ const T = await n(v());
1409
+ V(T);
3041
1410
  } catch (T) {
3042
- z({ success: !1, message: String(T) });
1411
+ V({ success: !1, message: String(T) });
3043
1412
  } finally {
3044
- y(!1);
1413
+ L(!1);
3045
1414
  }
3046
1415
  }
3047
- }, [k, n]);
3048
- return /* @__PURE__ */ r("div", { className: `nice-protocol-config ${t}`, children: [
3049
- /* @__PURE__ */ r("header", { className: "nice-protocol-config__header", children: [
3050
- /* @__PURE__ */ e("h2", { children: o("protocolConfig.title", "Protocol Configuration") }),
3051
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__protocol-selector", children: [
3052
- /* @__PURE__ */ e("label", { children: o("protocolConfig.protocol", "Protocol:") }),
3053
- /* @__PURE__ */ r("select", { value: d, onChange: (T) => l(T.target.value), children: [
3054
- /* @__PURE__ */ e("option", { value: "mqtt", children: o("protocolConfig.mqtt", "MQTT") }),
3055
- /* @__PURE__ */ e("option", { value: "coap", children: o("protocolConfig.coap", "CoAP") }),
3056
- /* @__PURE__ */ e("option", { value: "modbus-tcp", children: o("protocolConfig.modbusTcp", "Modbus TCP") }),
3057
- /* @__PURE__ */ e("option", { value: "modbus-rtu", children: o("protocolConfig.modbusRtu", "Modbus RTU") }),
3058
- /* @__PURE__ */ e("option", { value: "opcua", children: o("protocolConfig.opcUa", "OPC-UA") })
1416
+ }, [v, n]);
1417
+ return /* @__PURE__ */ i("div", { className: `nice-protocol-config ${c}`, children: [
1418
+ /* @__PURE__ */ i("header", { className: "nice-protocol-config__header", children: [
1419
+ /* @__PURE__ */ e("h2", { children: t("protocolConfig.title", "Protocol Configuration") }),
1420
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__protocol-selector", children: [
1421
+ /* @__PURE__ */ e("label", { children: t("protocolConfig.protocol", "Protocol:") }),
1422
+ /* @__PURE__ */ i("select", { value: o, onChange: (T) => s(T.target.value), children: [
1423
+ /* @__PURE__ */ e("option", { value: "mqtt", children: t("protocolConfig.mqtt", "MQTT") }),
1424
+ /* @__PURE__ */ e("option", { value: "coap", children: t("protocolConfig.coap", "CoAP") }),
1425
+ /* @__PURE__ */ e("option", { value: "modbus-tcp", children: t("protocolConfig.modbusTcp", "Modbus TCP") }),
1426
+ /* @__PURE__ */ e("option", { value: "modbus-rtu", children: t("protocolConfig.modbusRtu", "Modbus RTU") }),
1427
+ /* @__PURE__ */ e("option", { value: "opcua", children: t("protocolConfig.opcUa", "OPC-UA") })
3059
1428
  ] })
3060
1429
  ] })
3061
1430
  ] }),
3062
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__content", children: [
3063
- d === "mqtt" && /* @__PURE__ */ e(Re, { config: b, onChange: m }),
3064
- d === "coap" && /* @__PURE__ */ e(Ie, { config: _, onChange: w }),
3065
- (d === "modbus-tcp" || d === "modbus-rtu") && /* @__PURE__ */ e(
3066
- Ue,
1431
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__content", children: [
1432
+ o === "mqtt" && /* @__PURE__ */ e(ve, { config: h, onChange: p }),
1433
+ o === "coap" && /* @__PURE__ */ e(ue, { config: u, onChange: H }),
1434
+ (o === "modbus-tcp" || o === "modbus-rtu") && /* @__PURE__ */ e(
1435
+ Me,
3067
1436
  {
3068
- config: g,
3069
- type: d === "modbus-rtu" ? "rtu" : "tcp",
3070
- onChange: v
1437
+ config: N,
1438
+ type: o === "modbus-rtu" ? "rtu" : "tcp",
1439
+ onChange: k
3071
1440
  }
3072
1441
  ),
3073
- d === "opcua" && /* @__PURE__ */ e(Ee, { config: N, onChange: H })
1442
+ o === "opcua" && /* @__PURE__ */ e(ge, { config: M, onChange: w })
3074
1443
  ] }),
3075
- L && /* @__PURE__ */ r(
1444
+ _ && /* @__PURE__ */ i(
3076
1445
  "div",
3077
1446
  {
3078
- className: `nice-protocol-config__test-result nice-protocol-config__test-result--${L.success ? "success" : "error"}`,
1447
+ className: `nice-protocol-config__test-result nice-protocol-config__test-result--${_.success ? "success" : "error"}`,
3079
1448
  children: [
3080
- /* @__PURE__ */ e(p, { name: L.success ? "check" : "close", size: 14 }),
1449
+ /* @__PURE__ */ e(m, { name: _.success ? "check" : "close", size: 14 }),
3081
1450
  " ",
3082
- L.message
1451
+ _.message
3083
1452
  ]
3084
1453
  }
3085
1454
  ),
3086
- /* @__PURE__ */ r("footer", { className: "nice-protocol-config__footer", children: [
1455
+ /* @__PURE__ */ i("footer", { className: "nice-protocol-config__footer", children: [
3087
1456
  /* @__PURE__ */ e(
3088
1457
  "button",
3089
1458
  {
3090
1459
  className: "nice-protocol-config__test-btn",
3091
- onClick: E,
3092
- disabled: A || !n,
3093
- children: A ? o("protocolConfig.testing", "Testing...") : /* @__PURE__ */ r(P, { children: [
3094
- /* @__PURE__ */ e(p, { name: "plug", size: 14 }),
1460
+ onClick: P,
1461
+ disabled: y || !n,
1462
+ children: y ? t("protocolConfig.testing", "Testing...") : /* @__PURE__ */ i(A, { children: [
1463
+ /* @__PURE__ */ e(m, { name: "plug", size: 14 }),
3095
1464
  " ",
3096
- o("protocolConfig.testConnection", "Test Connection")
1465
+ t("protocolConfig.testConnection", "Test Connection")
3097
1466
  ] })
3098
1467
  }
3099
1468
  ),
3100
- /* @__PURE__ */ r("button", { className: "nice-protocol-config__save-btn", onClick: U, children: [
3101
- /* @__PURE__ */ e(p, { name: "save", size: 14 }),
1469
+ /* @__PURE__ */ i("button", { className: "nice-protocol-config__save-btn", onClick: D, children: [
1470
+ /* @__PURE__ */ e(m, { name: "save", size: 14 }),
3102
1471
  " ",
3103
- o("save", "Save")
1472
+ t("save", "Save")
3104
1473
  ] })
3105
1474
  ] })
3106
1475
  ] });
3107
1476
  }
3108
- function Re({ config: a, onChange: i }) {
3109
- const { t: c } = R();
3110
- return /* @__PURE__ */ r("div", { className: "nice-protocol-config__section", children: [
3111
- /* @__PURE__ */ e("h3", { children: c("protocolConfig.mqttConfiguration", "MQTT Configuration") }),
3112
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__grid", children: [
3113
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3114
- /* @__PURE__ */ e("label", { children: c("protocolConfig.broker", "Broker") }),
1477
+ function ve({ config: a, onChange: r }) {
1478
+ const { t: l } = b();
1479
+ return /* @__PURE__ */ i("div", { className: "nice-protocol-config__section", children: [
1480
+ /* @__PURE__ */ e("h3", { children: l("protocolConfig.mqttConfiguration", "MQTT Configuration") }),
1481
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__grid", children: [
1482
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
1483
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.broker", "Broker") }),
3115
1484
  /* @__PURE__ */ e(
3116
1485
  "input",
3117
1486
  {
3118
1487
  type: "text",
3119
1488
  value: a.broker,
3120
- onChange: (n) => i({ ...a, broker: n.target.value }),
1489
+ onChange: (n) => r({ ...a, broker: n.target.value }),
3121
1490
  placeholder: "localhost"
3122
1491
  }
3123
1492
  )
3124
1493
  ] }),
3125
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3126
- /* @__PURE__ */ e("label", { children: c("protocolConfig.port", "Port") }),
1494
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
1495
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.port", "Port") }),
3127
1496
  /* @__PURE__ */ e(
3128
1497
  "input",
3129
1498
  {
3130
1499
  type: "number",
3131
1500
  value: a.port,
3132
- onChange: (n) => i({ ...a, port: parseInt(n.target.value, 10) || 1883 })
1501
+ onChange: (n) => r({ ...a, port: parseInt(n.target.value, 10) || 1883 })
3133
1502
  }
3134
1503
  )
3135
1504
  ] }),
3136
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3137
- /* @__PURE__ */ e("label", { children: c("protocolConfig.clientId", "Client ID") }),
1505
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
1506
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.clientId", "Client ID") }),
3138
1507
  /* @__PURE__ */ e(
3139
1508
  "input",
3140
1509
  {
3141
1510
  type: "text",
3142
1511
  value: a.clientId,
3143
- onChange: (n) => i({ ...a, clientId: n.target.value })
1512
+ onChange: (n) => r({ ...a, clientId: n.target.value })
3144
1513
  }
3145
1514
  )
3146
1515
  ] }),
3147
- /* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ r("label", { children: [
1516
+ /* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ i("label", { children: [
3148
1517
  /* @__PURE__ */ e(
3149
1518
  "input",
3150
1519
  {
3151
1520
  type: "checkbox",
3152
1521
  checked: a.useTLS,
3153
- onChange: (n) => i({ ...a, useTLS: n.target.checked })
1522
+ onChange: (n) => r({ ...a, useTLS: n.target.checked })
3154
1523
  }
3155
1524
  ),
3156
- c("protocolConfig.useTls", "Use TLS")
1525
+ l("protocolConfig.useTls", "Use TLS")
3157
1526
  ] }) }),
3158
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3159
- /* @__PURE__ */ e("label", { children: c("protocolConfig.username", "Username") }),
1527
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
1528
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.username", "Username") }),
3160
1529
  /* @__PURE__ */ e(
3161
1530
  "input",
3162
1531
  {
3163
1532
  type: "text",
3164
1533
  value: a.username || "",
3165
- onChange: (n) => i({ ...a, username: n.target.value })
1534
+ onChange: (n) => r({ ...a, username: n.target.value })
3166
1535
  }
3167
1536
  )
3168
1537
  ] }),
3169
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3170
- /* @__PURE__ */ e("label", { children: c("protocolConfig.password", "Password") }),
1538
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
1539
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.password", "Password") }),
3171
1540
  /* @__PURE__ */ e(
3172
1541
  "input",
3173
1542
  {
3174
1543
  type: "password",
3175
1544
  value: a.password || "",
3176
- onChange: (n) => i({ ...a, password: n.target.value })
1545
+ onChange: (n) => r({ ...a, password: n.target.value })
3177
1546
  }
3178
1547
  )
3179
1548
  ] }),
3180
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3181
- /* @__PURE__ */ e("label", { children: c("protocolConfig.keepAlive", "Keep Alive (seconds)") }),
1549
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
1550
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.keepAlive", "Keep Alive (seconds)") }),
3182
1551
  /* @__PURE__ */ e(
3183
1552
  "input",
3184
1553
  {
3185
1554
  type: "number",
3186
1555
  value: a.keepAlive,
3187
- onChange: (n) => i({ ...a, keepAlive: parseInt(n.target.value, 10) || 60 })
1556
+ onChange: (n) => r({ ...a, keepAlive: parseInt(n.target.value, 10) || 60 })
3188
1557
  }
3189
1558
  )
3190
1559
  ] }),
3191
- /* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ r("label", { children: [
1560
+ /* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ i("label", { children: [
3192
1561
  /* @__PURE__ */ e(
3193
1562
  "input",
3194
1563
  {
3195
1564
  type: "checkbox",
3196
1565
  checked: a.cleanSession,
3197
- onChange: (n) => i({ ...a, cleanSession: n.target.checked })
1566
+ onChange: (n) => r({ ...a, cleanSession: n.target.checked })
3198
1567
  }
3199
1568
  ),
3200
- c("protocolConfig.cleanSession", "Clean Session")
1569
+ l("protocolConfig.cleanSession", "Clean Session")
3201
1570
  ] }) })
3202
1571
  ] }),
3203
- /* @__PURE__ */ e("h4", { children: c("protocolConfig.topics", "Topics") }),
3204
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__topics", children: [
3205
- a.topics.map((n, t) => /* @__PURE__ */ r("div", { className: "nice-protocol-config__topic-row", children: [
1572
+ /* @__PURE__ */ e("h4", { children: l("protocolConfig.topics", "Topics") }),
1573
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__topics", children: [
1574
+ a.topics.map((n, c) => /* @__PURE__ */ i("div", { className: "nice-protocol-config__topic-row", children: [
3206
1575
  /* @__PURE__ */ e(
3207
1576
  "input",
3208
1577
  {
3209
1578
  type: "text",
3210
1579
  value: n.pattern,
3211
- onChange: (o) => {
3212
- const d = [...a.topics];
3213
- d[t] = { ...d[t], pattern: o.target.value }, i({ ...a, topics: d });
1580
+ onChange: (t) => {
1581
+ const o = [...a.topics];
1582
+ o[c] = { ...o[c], pattern: t.target.value }, r({ ...a, topics: o });
3214
1583
  },
3215
- placeholder: c("protocolConfig.topicPatternPlaceholder", "e.g., sensors/+/data")
1584
+ placeholder: l("protocolConfig.topicPatternPlaceholder", "e.g., sensors/+/data")
3216
1585
  }
3217
1586
  ),
3218
- /* @__PURE__ */ r(
1587
+ /* @__PURE__ */ i(
3219
1588
  "select",
3220
1589
  {
3221
1590
  value: n.qos,
3222
- onChange: (o) => {
3223
- const d = [...a.topics];
3224
- d[t] = { ...d[t], qos: parseInt(o.target.value, 10) }, i({ ...a, topics: d });
1591
+ onChange: (t) => {
1592
+ const o = [...a.topics];
1593
+ o[c] = { ...o[c], qos: parseInt(t.target.value, 10) }, r({ ...a, topics: o });
3225
1594
  },
3226
1595
  children: [
3227
- /* @__PURE__ */ e("option", { value: 0, children: c("protocolConfig.qos0", "QoS 0") }),
3228
- /* @__PURE__ */ e("option", { value: 1, children: c("protocolConfig.qos1", "QoS 1") }),
3229
- /* @__PURE__ */ e("option", { value: 2, children: c("protocolConfig.qos2", "QoS 2") })
1596
+ /* @__PURE__ */ e("option", { value: 0, children: l("protocolConfig.qos0", "QoS 0") }),
1597
+ /* @__PURE__ */ e("option", { value: 1, children: l("protocolConfig.qos1", "QoS 1") }),
1598
+ /* @__PURE__ */ e("option", { value: 2, children: l("protocolConfig.qos2", "QoS 2") })
3230
1599
  ]
3231
1600
  }
3232
1601
  ),
3233
- /* @__PURE__ */ r(
1602
+ /* @__PURE__ */ i(
3234
1603
  "select",
3235
1604
  {
3236
1605
  value: n.direction,
3237
- onChange: (o) => {
3238
- const d = [...a.topics];
3239
- d[t] = {
3240
- ...d[t],
3241
- direction: o.target.value
3242
- }, i({ ...a, topics: d });
1606
+ onChange: (t) => {
1607
+ const o = [...a.topics];
1608
+ o[c] = {
1609
+ ...o[c],
1610
+ direction: t.target.value
1611
+ }, r({ ...a, topics: o });
3243
1612
  },
3244
1613
  children: [
3245
- /* @__PURE__ */ e("option", { value: "subscribe", children: c("protocolConfig.subscribe", "Subscribe") }),
3246
- /* @__PURE__ */ e("option", { value: "publish", children: c("protocolConfig.publish", "Publish") }),
3247
- /* @__PURE__ */ e("option", { value: "both", children: c("protocolConfig.both", "Both") })
1614
+ /* @__PURE__ */ e("option", { value: "subscribe", children: l("protocolConfig.subscribe", "Subscribe") }),
1615
+ /* @__PURE__ */ e("option", { value: "publish", children: l("protocolConfig.publish", "Publish") }),
1616
+ /* @__PURE__ */ e("option", { value: "both", children: l("protocolConfig.both", "Both") })
3248
1617
  ]
3249
1618
  }
3250
1619
  ),
3251
1620
  /* @__PURE__ */ e(
3252
1621
  "button",
3253
1622
  {
1623
+ "aria-label": l("protocolConfig.close", "Close"),
3254
1624
  onClick: () => {
3255
- const o = a.topics.filter((d, l) => l !== t);
3256
- i({ ...a, topics: o });
1625
+ const t = a.topics.filter((o, s) => s !== c);
1626
+ r({ ...a, topics: t });
3257
1627
  },
3258
- children: "×"
1628
+ children: /* @__PURE__ */ e(m, { name: "close", size: 14 })
3259
1629
  }
3260
1630
  )
3261
- ] }, t)),
3262
- /* @__PURE__ */ r(
1631
+ ] }, c)),
1632
+ /* @__PURE__ */ i(
3263
1633
  "button",
3264
1634
  {
3265
1635
  onClick: () => {
3266
- i({
1636
+ r({
3267
1637
  ...a,
3268
1638
  topics: [
3269
1639
  ...a.topics,
@@ -3272,76 +1642,76 @@ function Re({ config: a, onChange: i }) {
3272
1642
  });
3273
1643
  },
3274
1644
  children: [
3275
- /* @__PURE__ */ e(p, { name: "plus", size: 14 }),
1645
+ /* @__PURE__ */ e(m, { name: "plus", size: 14 }),
3276
1646
  " ",
3277
- c("protocolConfig.addTopic", "Add Topic")
1647
+ l("protocolConfig.addTopic", "Add Topic")
3278
1648
  ]
3279
1649
  }
3280
1650
  )
3281
1651
  ] })
3282
1652
  ] });
3283
1653
  }
3284
- function Ie({ config: a, onChange: i }) {
3285
- const { t: c } = R();
3286
- return /* @__PURE__ */ r("div", { className: "nice-protocol-config__section", children: [
3287
- /* @__PURE__ */ e("h3", { children: c("protocolConfig.coapConfiguration", "CoAP Configuration") }),
3288
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__grid", children: [
3289
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3290
- /* @__PURE__ */ e("label", { children: c("protocolConfig.host", "Host") }),
1654
+ function ue({ config: a, onChange: r }) {
1655
+ const { t: l } = b();
1656
+ return /* @__PURE__ */ i("div", { className: "nice-protocol-config__section", children: [
1657
+ /* @__PURE__ */ e("h3", { children: l("protocolConfig.coapConfiguration", "CoAP Configuration") }),
1658
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__grid", children: [
1659
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
1660
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.host", "Host") }),
3291
1661
  /* @__PURE__ */ e(
3292
1662
  "input",
3293
1663
  {
3294
1664
  type: "text",
3295
1665
  value: a.host,
3296
- onChange: (n) => i({ ...a, host: n.target.value })
1666
+ onChange: (n) => r({ ...a, host: n.target.value })
3297
1667
  }
3298
1668
  )
3299
1669
  ] }),
3300
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3301
- /* @__PURE__ */ e("label", { children: c("protocolConfig.port", "Port") }),
1670
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
1671
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.port", "Port") }),
3302
1672
  /* @__PURE__ */ e(
3303
1673
  "input",
3304
1674
  {
3305
1675
  type: "number",
3306
1676
  value: a.port,
3307
- onChange: (n) => i({ ...a, port: parseInt(n.target.value, 10) || 5683 })
1677
+ onChange: (n) => r({ ...a, port: parseInt(n.target.value, 10) || 5683 })
3308
1678
  }
3309
1679
  )
3310
1680
  ] }),
3311
- /* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ r("label", { children: [
1681
+ /* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ i("label", { children: [
3312
1682
  /* @__PURE__ */ e(
3313
1683
  "input",
3314
1684
  {
3315
1685
  type: "checkbox",
3316
1686
  checked: a.useDTLS,
3317
- onChange: (n) => i({ ...a, useDTLS: n.target.checked })
1687
+ onChange: (n) => r({ ...a, useDTLS: n.target.checked })
3318
1688
  }
3319
1689
  ),
3320
- c("protocolConfig.useDtls", "Use DTLS")
1690
+ l("protocolConfig.useDtls", "Use DTLS")
3321
1691
  ] }) }),
3322
- /* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ r("label", { children: [
1692
+ /* @__PURE__ */ e("div", { className: "nice-protocol-config__field", children: /* @__PURE__ */ i("label", { children: [
3323
1693
  /* @__PURE__ */ e(
3324
1694
  "input",
3325
1695
  {
3326
1696
  type: "checkbox",
3327
1697
  checked: a.observe || !1,
3328
- onChange: (n) => i({ ...a, observe: n.target.checked })
1698
+ onChange: (n) => r({ ...a, observe: n.target.checked })
3329
1699
  }
3330
1700
  ),
3331
- c("protocolConfig.enableObserve", "Enable Observe")
1701
+ l("protocolConfig.enableObserve", "Enable Observe")
3332
1702
  ] }) })
3333
1703
  ] }),
3334
- /* @__PURE__ */ e("h4", { children: c("protocolConfig.resources", "Resources") }),
3335
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__resources", children: [
3336
- a.resources.map((n, t) => /* @__PURE__ */ r("div", { className: "nice-protocol-config__resource-row", children: [
1704
+ /* @__PURE__ */ e("h4", { children: l("protocolConfig.resources", "Resources") }),
1705
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__resources", children: [
1706
+ a.resources.map((n, c) => /* @__PURE__ */ i("div", { className: "nice-protocol-config__resource-row", children: [
3337
1707
  /* @__PURE__ */ e(
3338
1708
  "input",
3339
1709
  {
3340
1710
  type: "text",
3341
1711
  value: n.path,
3342
- onChange: (o) => {
3343
- const d = [...a.resources];
3344
- d[t] = { ...d[t], path: o.target.value }, i({ ...a, resources: d });
1712
+ onChange: (t) => {
1713
+ const o = [...a.resources];
1714
+ o[c] = { ...o[c], path: t.target.value }, r({ ...a, resources: o });
3345
1715
  },
3346
1716
  placeholder: "/sensors/temperature"
3347
1717
  }
@@ -3349,19 +1719,20 @@ function Ie({ config: a, onChange: i }) {
3349
1719
  /* @__PURE__ */ e(
3350
1720
  "button",
3351
1721
  {
1722
+ "aria-label": l("protocolConfig.close", "Close"),
3352
1723
  onClick: () => {
3353
- const o = a.resources.filter((d, l) => l !== t);
3354
- i({ ...a, resources: o });
1724
+ const t = a.resources.filter((o, s) => s !== c);
1725
+ r({ ...a, resources: t });
3355
1726
  },
3356
- children: "×"
1727
+ children: /* @__PURE__ */ e(m, { name: "close", size: 14 })
3357
1728
  }
3358
1729
  )
3359
- ] }, t)),
3360
- /* @__PURE__ */ r(
1730
+ ] }, c)),
1731
+ /* @__PURE__ */ i(
3361
1732
  "button",
3362
1733
  {
3363
1734
  onClick: () => {
3364
- i({
1735
+ r({
3365
1736
  ...a,
3366
1737
  resources: [
3367
1738
  ...a.resources,
@@ -3370,72 +1741,71 @@ function Ie({ config: a, onChange: i }) {
3370
1741
  });
3371
1742
  },
3372
1743
  children: [
3373
- /* @__PURE__ */ e(p, { name: "plus", size: 14 }),
1744
+ /* @__PURE__ */ e(m, { name: "plus", size: 14 }),
3374
1745
  " ",
3375
- c("protocolConfig.addResource", "Add Resource")
1746
+ l("protocolConfig.addResource", "Add Resource")
3376
1747
  ]
3377
1748
  }
3378
1749
  )
3379
1750
  ] })
3380
1751
  ] });
3381
1752
  }
3382
- function Ue({
1753
+ function Me({
3383
1754
  config: a,
3384
- type: i,
3385
- onChange: c
1755
+ type: r,
1756
+ onChange: l
3386
1757
  }) {
3387
- const { t: n } = R();
3388
- return /* @__PURE__ */ r("div", { className: "nice-protocol-config__section", children: [
3389
- /* @__PURE__ */ r("h3", { children: [
3390
- "Modbus ",
3391
- i.toUpperCase(),
3392
- " Configuration"
3393
- ] }),
3394
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__grid", children: [
3395
- i === "tcp" && /* @__PURE__ */ r(P, { children: [
3396
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
1758
+ const { t: n } = b();
1759
+ return /* @__PURE__ */ i("div", { className: "nice-protocol-config__section", children: [
1760
+ /* @__PURE__ */ e("h3", { children: n("protocolConfig.modbusConfiguration", "Modbus {type} Configuration").replace(
1761
+ "{type}",
1762
+ String(r.toUpperCase())
1763
+ ) }),
1764
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__grid", children: [
1765
+ r === "tcp" && /* @__PURE__ */ i(A, { children: [
1766
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
3397
1767
  /* @__PURE__ */ e("label", { children: n("protocolConfig.host", "Host") }),
3398
1768
  /* @__PURE__ */ e(
3399
1769
  "input",
3400
1770
  {
3401
1771
  type: "text",
3402
1772
  value: a.host || "",
3403
- onChange: (t) => c({ ...a, host: t.target.value })
1773
+ onChange: (c) => l({ ...a, host: c.target.value })
3404
1774
  }
3405
1775
  )
3406
1776
  ] }),
3407
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
1777
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
3408
1778
  /* @__PURE__ */ e("label", { children: n("protocolConfig.port", "Port") }),
3409
1779
  /* @__PURE__ */ e(
3410
1780
  "input",
3411
1781
  {
3412
1782
  type: "number",
3413
1783
  value: a.port || 502,
3414
- onChange: (t) => c({ ...a, port: parseInt(t.target.value, 10) || 502 })
1784
+ onChange: (c) => l({ ...a, port: parseInt(c.target.value, 10) || 502 })
3415
1785
  }
3416
1786
  )
3417
1787
  ] })
3418
1788
  ] }),
3419
- i === "rtu" && /* @__PURE__ */ r(P, { children: [
3420
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
1789
+ r === "rtu" && /* @__PURE__ */ i(A, { children: [
1790
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
3421
1791
  /* @__PURE__ */ e("label", { children: n("protocolConfig.serialPort", "Serial Port") }),
3422
1792
  /* @__PURE__ */ e(
3423
1793
  "input",
3424
1794
  {
3425
1795
  type: "text",
3426
1796
  value: a.serialPort || "",
3427
- onChange: (t) => c({ ...a, serialPort: t.target.value }),
1797
+ onChange: (c) => l({ ...a, serialPort: c.target.value }),
3428
1798
  placeholder: n("protocolConfig.serialPortPlaceholder", "COM1 or /dev/ttyUSB0")
3429
1799
  }
3430
1800
  )
3431
1801
  ] }),
3432
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
1802
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
3433
1803
  /* @__PURE__ */ e("label", { children: n("protocolConfig.baudRate", "Baud Rate") }),
3434
- /* @__PURE__ */ r(
1804
+ /* @__PURE__ */ i(
3435
1805
  "select",
3436
1806
  {
3437
1807
  value: a.baudRate || 9600,
3438
- onChange: (t) => c({ ...a, baudRate: parseInt(t.target.value, 10) }),
1808
+ onChange: (c) => l({ ...a, baudRate: parseInt(c.target.value, 10) }),
3439
1809
  children: [
3440
1810
  /* @__PURE__ */ e("option", { value: 9600, children: "9600" }),
3441
1811
  /* @__PURE__ */ e("option", { value: 19200, children: "19200" }),
@@ -3446,13 +1816,13 @@ function Ue({
3446
1816
  }
3447
1817
  )
3448
1818
  ] }),
3449
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
1819
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
3450
1820
  /* @__PURE__ */ e("label", { children: n("protocolConfig.parity", "Parity") }),
3451
- /* @__PURE__ */ r(
1821
+ /* @__PURE__ */ i(
3452
1822
  "select",
3453
1823
  {
3454
1824
  value: a.parity || "none",
3455
- onChange: (t) => c({ ...a, parity: t.target.value }),
1825
+ onChange: (c) => l({ ...a, parity: c.target.value }),
3456
1826
  children: [
3457
1827
  /* @__PURE__ */ e("option", { value: "none", children: n("protocolConfig.none", "None") }),
3458
1828
  /* @__PURE__ */ e("option", { value: "even", children: n("protocolConfig.even", "Even") }),
@@ -3462,34 +1832,34 @@ function Ue({
3462
1832
  )
3463
1833
  ] })
3464
1834
  ] }),
3465
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
1835
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
3466
1836
  /* @__PURE__ */ e("label", { children: n("protocolConfig.slaveId", "Slave ID") }),
3467
1837
  /* @__PURE__ */ e(
3468
1838
  "input",
3469
1839
  {
3470
1840
  type: "number",
3471
1841
  value: a.slaveId,
3472
- onChange: (t) => c({ ...a, slaveId: parseInt(t.target.value, 10) || 1 }),
1842
+ onChange: (c) => l({ ...a, slaveId: parseInt(c.target.value, 10) || 1 }),
3473
1843
  min: 1,
3474
1844
  max: 247
3475
1845
  }
3476
1846
  )
3477
1847
  ] }),
3478
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
1848
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
3479
1849
  /* @__PURE__ */ e("label", { children: n("protocolConfig.timeoutMs", "Timeout (ms)") }),
3480
1850
  /* @__PURE__ */ e(
3481
1851
  "input",
3482
1852
  {
3483
1853
  type: "number",
3484
1854
  value: a.timeout,
3485
- onChange: (t) => c({ ...a, timeout: parseInt(t.target.value, 10) || 1e3 })
1855
+ onChange: (c) => l({ ...a, timeout: parseInt(c.target.value, 10) || 1e3 })
3486
1856
  }
3487
1857
  )
3488
1858
  ] })
3489
1859
  ] }),
3490
1860
  /* @__PURE__ */ e("h4", { children: n("protocolConfig.registers", "Registers") }),
3491
- /* @__PURE__ */ r("table", { className: "nice-protocol-config__registers-table", children: [
3492
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { children: [
1861
+ /* @__PURE__ */ i("table", { className: "nice-protocol-config__registers-table", children: [
1862
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
3493
1863
  /* @__PURE__ */ e("th", { children: n("protocolConfig.name", "Name") }),
3494
1864
  /* @__PURE__ */ e("th", { children: n("protocolConfig.address", "Address") }),
3495
1865
  /* @__PURE__ */ e("th", { children: n("protocolConfig.type", "Type") }),
@@ -3497,15 +1867,15 @@ function Ue({
3497
1867
  /* @__PURE__ */ e("th", { children: n("protocolConfig.readWrite", "R/W") }),
3498
1868
  /* @__PURE__ */ e("th", {})
3499
1869
  ] }) }),
3500
- /* @__PURE__ */ e("tbody", { children: a.registers.map((t, o) => /* @__PURE__ */ r("tr", { children: [
1870
+ /* @__PURE__ */ e("tbody", { children: a.registers.map((c, t) => /* @__PURE__ */ i("tr", { children: [
3501
1871
  /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
3502
1872
  "input",
3503
1873
  {
3504
1874
  type: "text",
3505
- value: t.name,
3506
- onChange: (d) => {
3507
- const l = [...a.registers];
3508
- l[o] = { ...l[o], name: d.target.value }, c({ ...a, registers: l });
1875
+ value: c.name,
1876
+ onChange: (o) => {
1877
+ const s = [...a.registers];
1878
+ s[t] = { ...s[t], name: o.target.value }, l({ ...a, registers: s });
3509
1879
  }
3510
1880
  }
3511
1881
  ) }),
@@ -3513,26 +1883,26 @@ function Ue({
3513
1883
  "input",
3514
1884
  {
3515
1885
  type: "number",
3516
- value: t.address,
3517
- onChange: (d) => {
3518
- const l = [...a.registers];
3519
- l[o] = {
3520
- ...l[o],
3521
- address: parseInt(d.target.value, 10) || 0
3522
- }, c({ ...a, registers: l });
1886
+ value: c.address,
1887
+ onChange: (o) => {
1888
+ const s = [...a.registers];
1889
+ s[t] = {
1890
+ ...s[t],
1891
+ address: parseInt(o.target.value, 10) || 0
1892
+ }, l({ ...a, registers: s });
3523
1893
  }
3524
1894
  }
3525
1895
  ) }),
3526
- /* @__PURE__ */ e("td", { children: /* @__PURE__ */ r(
1896
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ i(
3527
1897
  "select",
3528
1898
  {
3529
- value: t.type,
3530
- onChange: (d) => {
3531
- const l = [...a.registers];
3532
- l[o] = {
3533
- ...l[o],
3534
- type: d.target.value
3535
- }, c({ ...a, registers: l });
1899
+ value: c.type,
1900
+ onChange: (o) => {
1901
+ const s = [...a.registers];
1902
+ s[t] = {
1903
+ ...s[t],
1904
+ type: o.target.value
1905
+ }, l({ ...a, registers: s });
3536
1906
  },
3537
1907
  children: [
3538
1908
  /* @__PURE__ */ e("option", { value: "coil", children: n("protocolConfig.coil", "Coil") }),
@@ -3542,16 +1912,16 @@ function Ue({
3542
1912
  ]
3543
1913
  }
3544
1914
  ) }),
3545
- /* @__PURE__ */ e("td", { children: /* @__PURE__ */ r(
1915
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ i(
3546
1916
  "select",
3547
1917
  {
3548
- value: t.dataType,
3549
- onChange: (d) => {
3550
- const l = [...a.registers];
3551
- l[o] = {
3552
- ...l[o],
3553
- dataType: d.target.value
3554
- }, c({ ...a, registers: l });
1918
+ value: c.dataType,
1919
+ onChange: (o) => {
1920
+ const s = [...a.registers];
1921
+ s[t] = {
1922
+ ...s[t],
1923
+ dataType: o.target.value
1924
+ }, l({ ...a, registers: s });
3555
1925
  },
3556
1926
  children: [
3557
1927
  /* @__PURE__ */ e("option", { value: "bool", children: n("protocolConfig.bool", "Bool") }),
@@ -3563,15 +1933,15 @@ function Ue({
3563
1933
  ]
3564
1934
  }
3565
1935
  ) }),
3566
- /* @__PURE__ */ r("td", { children: [
1936
+ /* @__PURE__ */ i("td", { children: [
3567
1937
  /* @__PURE__ */ e(
3568
1938
  "input",
3569
1939
  {
3570
1940
  type: "checkbox",
3571
- checked: t.readable,
3572
- onChange: (d) => {
3573
- const l = [...a.registers];
3574
- l[o] = { ...l[o], readable: d.target.checked }, c({ ...a, registers: l });
1941
+ checked: c.readable,
1942
+ onChange: (o) => {
1943
+ const s = [...a.registers];
1944
+ s[t] = { ...s[t], readable: o.target.checked }, l({ ...a, registers: s });
3575
1945
  },
3576
1946
  title: n("protocolConfig.readable", "Readable")
3577
1947
  }
@@ -3580,10 +1950,10 @@ function Ue({
3580
1950
  "input",
3581
1951
  {
3582
1952
  type: "checkbox",
3583
- checked: t.writable,
3584
- onChange: (d) => {
3585
- const l = [...a.registers];
3586
- l[o] = { ...l[o], writable: d.target.checked }, c({ ...a, registers: l });
1953
+ checked: c.writable,
1954
+ onChange: (o) => {
1955
+ const s = [...a.registers];
1956
+ s[t] = { ...s[t], writable: o.target.checked }, l({ ...a, registers: s });
3587
1957
  },
3588
1958
  title: n("protocolConfig.writable", "Writable")
3589
1959
  }
@@ -3592,20 +1962,21 @@ function Ue({
3592
1962
  /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e(
3593
1963
  "button",
3594
1964
  {
1965
+ "aria-label": n("protocolConfig.close", "Close"),
3595
1966
  onClick: () => {
3596
- const d = a.registers.filter((l, b) => b !== o);
3597
- c({ ...a, registers: d });
1967
+ const o = a.registers.filter((s, h) => h !== t);
1968
+ l({ ...a, registers: o });
3598
1969
  },
3599
- children: "×"
1970
+ children: /* @__PURE__ */ e(m, { name: "close", size: 14 })
3600
1971
  }
3601
1972
  ) })
3602
- ] }, o)) })
1973
+ ] }, t)) })
3603
1974
  ] }),
3604
- /* @__PURE__ */ r(
1975
+ /* @__PURE__ */ i(
3605
1976
  "button",
3606
1977
  {
3607
1978
  onClick: () => {
3608
- c({
1979
+ l({
3609
1980
  ...a,
3610
1981
  registers: [
3611
1982
  ...a.registers,
@@ -3621,7 +1992,7 @@ function Ue({
3621
1992
  });
3622
1993
  },
3623
1994
  children: [
3624
- /* @__PURE__ */ e(p, { name: "plus", size: 14 }),
1995
+ /* @__PURE__ */ e(m, { name: "plus", size: 14 }),
3625
1996
  " ",
3626
1997
  n("protocolConfig.addRegister", "Add Register")
3627
1998
  ]
@@ -3629,108 +2000,108 @@ function Ue({
3629
2000
  )
3630
2001
  ] });
3631
2002
  }
3632
- function Ee({ config: a, onChange: i }) {
3633
- const { t: c } = R();
3634
- return /* @__PURE__ */ r("div", { className: "nice-protocol-config__section", children: [
3635
- /* @__PURE__ */ e("h3", { children: c("protocolConfig.opcUaConfiguration", "OPC-UA Configuration") }),
3636
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__grid", children: [
3637
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field nice-protocol-config__field--full", children: [
3638
- /* @__PURE__ */ e("label", { children: c("protocolConfig.endpointUrl", "Endpoint URL") }),
2003
+ function ge({ config: a, onChange: r }) {
2004
+ const { t: l } = b();
2005
+ return /* @__PURE__ */ i("div", { className: "nice-protocol-config__section", children: [
2006
+ /* @__PURE__ */ e("h3", { children: l("protocolConfig.opcUaConfiguration", "OPC-UA Configuration") }),
2007
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__grid", children: [
2008
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field nice-protocol-config__field--full", children: [
2009
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.endpointUrl", "Endpoint URL") }),
3639
2010
  /* @__PURE__ */ e(
3640
2011
  "input",
3641
2012
  {
3642
2013
  type: "text",
3643
2014
  value: a.endpointUrl,
3644
- onChange: (n) => i({ ...a, endpointUrl: n.target.value }),
3645
- placeholder: c("protocolConfig.endpointUrlPlaceholder", "opc.tcp://localhost:4840")
2015
+ onChange: (n) => r({ ...a, endpointUrl: n.target.value }),
2016
+ placeholder: l("protocolConfig.endpointUrlPlaceholder", "opc.tcp://localhost:4840")
3646
2017
  }
3647
2018
  )
3648
2019
  ] }),
3649
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3650
- /* @__PURE__ */ e("label", { children: c("protocolConfig.securityMode", "Security Mode") }),
3651
- /* @__PURE__ */ r(
2020
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
2021
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.securityMode", "Security Mode") }),
2022
+ /* @__PURE__ */ i(
3652
2023
  "select",
3653
2024
  {
3654
2025
  value: a.securityMode,
3655
- onChange: (n) => i({
2026
+ onChange: (n) => r({
3656
2027
  ...a,
3657
2028
  securityMode: n.target.value
3658
2029
  }),
3659
2030
  children: [
3660
- /* @__PURE__ */ e("option", { value: "None", children: c("protocolConfig.securityNone", "None") }),
3661
- /* @__PURE__ */ e("option", { value: "Sign", children: c("protocolConfig.sign", "Sign") }),
3662
- /* @__PURE__ */ e("option", { value: "SignAndEncrypt", children: c("protocolConfig.signAndEncrypt", "Sign and Encrypt") })
2031
+ /* @__PURE__ */ e("option", { value: "None", children: l("protocolConfig.securityNone", "None") }),
2032
+ /* @__PURE__ */ e("option", { value: "Sign", children: l("protocolConfig.sign", "Sign") }),
2033
+ /* @__PURE__ */ e("option", { value: "SignAndEncrypt", children: l("protocolConfig.signAndEncrypt", "Sign and Encrypt") })
3663
2034
  ]
3664
2035
  }
3665
2036
  )
3666
2037
  ] }),
3667
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3668
- /* @__PURE__ */ e("label", { children: c("protocolConfig.authentication", "Authentication") }),
3669
- /* @__PURE__ */ r(
2038
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
2039
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.authentication", "Authentication") }),
2040
+ /* @__PURE__ */ i(
3670
2041
  "select",
3671
2042
  {
3672
2043
  value: a.authentication,
3673
- onChange: (n) => i({
2044
+ onChange: (n) => r({
3674
2045
  ...a,
3675
2046
  authentication: n.target.value
3676
2047
  }),
3677
2048
  children: [
3678
- /* @__PURE__ */ e("option", { value: "anonymous", children: c("protocolConfig.anonymous", "Anonymous") }),
3679
- /* @__PURE__ */ e("option", { value: "username", children: c("protocolConfig.usernamePassword", "Username/Password") }),
3680
- /* @__PURE__ */ e("option", { value: "certificate", children: c("protocolConfig.certificate", "Certificate") })
2049
+ /* @__PURE__ */ e("option", { value: "anonymous", children: l("protocolConfig.anonymous", "Anonymous") }),
2050
+ /* @__PURE__ */ e("option", { value: "username", children: l("protocolConfig.usernamePassword", "Username/Password") }),
2051
+ /* @__PURE__ */ e("option", { value: "certificate", children: l("protocolConfig.certificate", "Certificate") })
3681
2052
  ]
3682
2053
  }
3683
2054
  )
3684
2055
  ] }),
3685
- a.authentication === "username" && /* @__PURE__ */ r(P, { children: [
3686
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3687
- /* @__PURE__ */ e("label", { children: c("protocolConfig.username", "Username") }),
2056
+ a.authentication === "username" && /* @__PURE__ */ i(A, { children: [
2057
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
2058
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.username", "Username") }),
3688
2059
  /* @__PURE__ */ e(
3689
2060
  "input",
3690
2061
  {
3691
2062
  type: "text",
3692
2063
  value: a.username || "",
3693
- onChange: (n) => i({ ...a, username: n.target.value })
2064
+ onChange: (n) => r({ ...a, username: n.target.value })
3694
2065
  }
3695
2066
  )
3696
2067
  ] }),
3697
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field", children: [
3698
- /* @__PURE__ */ e("label", { children: c("protocolConfig.password", "Password") }),
2068
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field", children: [
2069
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.password", "Password") }),
3699
2070
  /* @__PURE__ */ e(
3700
2071
  "input",
3701
2072
  {
3702
2073
  type: "password",
3703
2074
  value: a.password || "",
3704
- onChange: (n) => i({ ...a, password: n.target.value })
2075
+ onChange: (n) => r({ ...a, password: n.target.value })
3705
2076
  }
3706
2077
  )
3707
2078
  ] })
3708
2079
  ] }),
3709
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__field nice-protocol-config__field--full", children: [
3710
- /* @__PURE__ */ e("label", { children: c("protocolConfig.applicationName", "Application Name") }),
2080
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__field nice-protocol-config__field--full", children: [
2081
+ /* @__PURE__ */ e("label", { children: l("protocolConfig.applicationName", "Application Name") }),
3711
2082
  /* @__PURE__ */ e(
3712
2083
  "input",
3713
2084
  {
3714
2085
  type: "text",
3715
2086
  value: a.applicationName,
3716
- onChange: (n) => i({ ...a, applicationName: n.target.value })
2087
+ onChange: (n) => r({ ...a, applicationName: n.target.value })
3717
2088
  }
3718
2089
  )
3719
2090
  ] })
3720
2091
  ] }),
3721
- /* @__PURE__ */ e("h4", { children: c("protocolConfig.nodes", "Nodes") }),
3722
- /* @__PURE__ */ r("div", { className: "nice-protocol-config__nodes", children: [
3723
- a.nodes.map((n, t) => /* @__PURE__ */ r("div", { className: "nice-protocol-config__node-row", children: [
2092
+ /* @__PURE__ */ e("h4", { children: l("protocolConfig.nodes", "Nodes") }),
2093
+ /* @__PURE__ */ i("div", { className: "nice-protocol-config__nodes", children: [
2094
+ a.nodes.map((n, c) => /* @__PURE__ */ i("div", { className: "nice-protocol-config__node-row", children: [
3724
2095
  /* @__PURE__ */ e(
3725
2096
  "input",
3726
2097
  {
3727
2098
  type: "text",
3728
2099
  value: n.nodeId,
3729
- onChange: (o) => {
3730
- const d = [...a.nodes];
3731
- d[t] = { ...d[t], nodeId: o.target.value }, i({ ...a, nodes: d });
2100
+ onChange: (t) => {
2101
+ const o = [...a.nodes];
2102
+ o[c] = { ...o[c], nodeId: t.target.value }, r({ ...a, nodes: o });
3732
2103
  },
3733
- placeholder: c("protocolConfig.nodeIdPlaceholder", "ns=2;s=Temperature")
2104
+ placeholder: l("protocolConfig.nodeIdPlaceholder", "ns=2;s=Temperature")
3734
2105
  }
3735
2106
  ),
3736
2107
  /* @__PURE__ */ e(
@@ -3738,29 +2109,30 @@ function Ee({ config: a, onChange: i }) {
3738
2109
  {
3739
2110
  type: "text",
3740
2111
  value: n.displayName,
3741
- onChange: (o) => {
3742
- const d = [...a.nodes];
3743
- d[t] = { ...d[t], displayName: o.target.value }, i({ ...a, nodes: d });
2112
+ onChange: (t) => {
2113
+ const o = [...a.nodes];
2114
+ o[c] = { ...o[c], displayName: t.target.value }, r({ ...a, nodes: o });
3744
2115
  },
3745
- placeholder: c("protocolConfig.displayNamePlaceholder", "Display Name")
2116
+ placeholder: l("protocolConfig.displayNamePlaceholder", "Display Name")
3746
2117
  }
3747
2118
  ),
3748
2119
  /* @__PURE__ */ e(
3749
2120
  "button",
3750
2121
  {
2122
+ "aria-label": l("protocolConfig.close", "Close"),
3751
2123
  onClick: () => {
3752
- const o = a.nodes.filter((d, l) => l !== t);
3753
- i({ ...a, nodes: o });
2124
+ const t = a.nodes.filter((o, s) => s !== c);
2125
+ r({ ...a, nodes: t });
3754
2126
  },
3755
- children: "×"
2127
+ children: /* @__PURE__ */ e(m, { name: "close", size: 14 })
3756
2128
  }
3757
2129
  )
3758
- ] }, t)),
3759
- /* @__PURE__ */ r(
2130
+ ] }, c)),
2131
+ /* @__PURE__ */ i(
3760
2132
  "button",
3761
2133
  {
3762
2134
  onClick: () => {
3763
- i({
2135
+ r({
3764
2136
  ...a,
3765
2137
  nodes: [
3766
2138
  ...a.nodes,
@@ -3769,9 +2141,9 @@ function Ee({ config: a, onChange: i }) {
3769
2141
  });
3770
2142
  },
3771
2143
  children: [
3772
- /* @__PURE__ */ e(p, { name: "plus", size: 14 }),
2144
+ /* @__PURE__ */ e(m, { name: "plus", size: 14 }),
3773
2145
  " ",
3774
- c("protocolConfig.addNode", "Add Node")
2146
+ l("protocolConfig.addNode", "Add Node")
3775
2147
  ]
3776
2148
  }
3777
2149
  )
@@ -3779,7 +2151,7 @@ function Ee({ config: a, onChange: i }) {
3779
2151
  ] });
3780
2152
  }
3781
2153
  export {
3782
- Oe as NiceEdgeManager,
3783
- Fe as NiceIoTDashboard,
3784
- qe as NiceProtocolConfig
2154
+ fe as NiceEdgeManager,
2155
+ Ne as NiceIoTDashboard,
2156
+ ye as NiceProtocolConfig
3785
2157
  };