@vasakgroup/vue-libvasak 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- import { ref as $, onMounted as J, onUnmounted as ve, watch as K, defineComponent as z, toRef as Be, computed as p, createElementBlock as s, unref as q, openBlock as i, normalizeStyle as se, createCommentVNode as h, createElementVNode as E, createVNode as O, toDisplayString as S, normalizeClass as x, renderSlot as A, createBlock as Q, onBeforeUnmount as ce, Fragment as Z, renderList as ne, withCtx as W, mergeModels as Ae, useAttrs as we, useId as ot, useModel as it, withDirectives as Ce, mergeProps as oe, isRef as st, vModelSelect as rt, inject as pe, getCurrentInstance as Fe, provide as de, createTextVNode as ze, toHandlers as qe, createSlots as ut, withModifiers as M, withKeys as F, Teleport as fe, Transition as ge, nextTick as Y, TransitionGroup as ct, vShow as Re, cloneVNode as dt, h as ft, Comment as mt, Text as bt } from "vue";
1
+ import { ref as w, onMounted as J, onUnmounted as ve, watch as K, defineComponent as z, toRef as Be, computed as p, createElementBlock as s, unref as q, openBlock as i, normalizeStyle as se, createCommentVNode as h, createElementVNode as E, createVNode as O, toDisplayString as S, normalizeClass as x, renderSlot as A, createBlock as Q, onBeforeUnmount as ce, Fragment as Z, renderList as ne, withCtx as W, mergeModels as Ae, useAttrs as $e, useId as ot, useModel as it, withDirectives as Ce, mergeProps as oe, isRef as st, vModelSelect as rt, inject as pe, getCurrentInstance as Fe, provide as de, createTextVNode as ze, toHandlers as qe, createSlots as ut, withModifiers as M, withKeys as F, Teleport as fe, Transition as ye, nextTick as Y, TransitionGroup as ct, vShow as Re, cloneVNode as dt, h as ft, Comment as mt, Text as bt } from "vue";
2
2
  import { listen as vt } from "@tauri-apps/api/event";
3
- import { getSymbolSource as pt, getIconSource as gt } from "@vasakgroup/plugin-vicons";
4
- import { getCurrentWindow as yt } from "@tauri-apps/api/window";
3
+ import { getSymbolSource as pt, getIconSource as yt } from "@vasakgroup/plugin-vicons";
4
+ import { getCurrentWindow as gt } from "@tauri-apps/api/window";
5
5
  import { useI18n as ht } from "@vasakgroup/tauri-plugin-i18n";
6
- const xt = "vicons:theme-changed", be = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(), re = $(0);
6
+ const xt = "vicons:theme-changed", be = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(), re = w(0);
7
7
  let le = 0, ue = null, te = null;
8
8
  function zn() {
9
9
  be.clear(), ae.clear(), le = 0, ue = null, te = null, re.value = 0;
@@ -11,12 +11,12 @@ function zn() {
11
11
  function kt() {
12
12
  be.clear(), ae.clear(), re.value++;
13
13
  }
14
- function $t() {
14
+ function wt() {
15
15
  return le++, ue || te ? te ?? Promise.resolve() : (te = vt(xt, kt).then((e) => {
16
16
  le <= 0 ? e() : ue = e, te = null;
17
17
  }), te);
18
18
  }
19
- function wt() {
19
+ function $t() {
20
20
  le--, !(le > 0) && (le = 0, ue?.(), ue = null);
21
21
  }
22
22
  function Ct(e, l) {
@@ -26,13 +26,13 @@ function Ct(e, l) {
26
26
  const n = ae.get(t);
27
27
  if (n)
28
28
  return n;
29
- const o = re.value, u = (l === "symbol" ? pt(e) : gt(e)).then((r) => (re.value === o && be.set(t, r), r)).finally(() => {
29
+ const o = re.value, u = (l === "symbol" ? pt(e) : yt(e)).then((r) => (re.value === o && be.set(t, r), r)).finally(() => {
30
30
  ae.get(t) === u && ae.delete(t);
31
31
  });
32
32
  return ae.set(t, u), u;
33
33
  }
34
34
  function zt(e, l) {
35
- const t = $("");
35
+ const t = w("");
36
36
  let a = !1, n = 0;
37
37
  async function o() {
38
38
  const u = ++n, r = e.value;
@@ -40,13 +40,13 @@ function zt(e, l) {
40
40
  t.value = "";
41
41
  return;
42
42
  }
43
- const m = await Ct(r, l.value);
44
- u === n && !a && (t.value = m);
43
+ const d = await Ct(r, l.value);
44
+ u === n && !a && (t.value = d);
45
45
  }
46
46
  return J(async () => {
47
- await $t(), a || await o();
47
+ await wt(), a || await o();
48
48
  }), ve(() => {
49
- a = !0, wt();
49
+ a = !0, $t();
50
50
  }), K([e, l], o), K(re, o), t;
51
51
  }
52
52
  const Et = ["src", "alt"], H = /* @__PURE__ */ z({
@@ -82,7 +82,7 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
82
82
  defaultOpen: { type: Boolean, default: !0 }
83
83
  },
84
84
  setup(e) {
85
- const l = e, t = $(l.defaultOpen);
85
+ const l = e, t = w(l.defaultOpen);
86
86
  return K(
87
87
  () => l.collapsed,
88
88
  (a) => {
@@ -182,9 +182,9 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
182
182
  },
183
183
  emits: ["update:modelValue", "update:collapsed", "change"],
184
184
  setup(e, { expose: l, emit: t }) {
185
- const a = e, n = t, o = $(a.collapsed ?? !1), u = $(!1);
186
- let r = null, m = null;
187
- const b = p(() => u.value || o.value), f = p(() => !!(a.title || a.subtitle));
185
+ const a = e, n = t, o = w(a.collapsed ?? !1), u = w(!1);
186
+ let r = null, d = null;
187
+ const b = p(() => u.value || o.value), m = p(() => !!(a.title || a.subtitle));
188
188
  p(() => a.categories.length > 0);
189
189
  function B() {
190
190
  return document.documentElement?.clientWidth || window.innerWidth;
@@ -195,22 +195,22 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
195
195
  function L() {
196
196
  o.value = !o.value, n("update:collapsed", o.value);
197
197
  }
198
- function g(d) {
199
- n("update:modelValue", d), n("change", d);
198
+ function y(f) {
199
+ n("update:modelValue", f), n("change", f);
200
200
  }
201
201
  return K(
202
202
  () => a.collapsed,
203
- (d) => {
204
- d !== void 0 && (o.value = d);
203
+ (f) => {
204
+ f !== void 0 && (o.value = f);
205
205
  }
206
206
  ), J(() => {
207
- r = window.matchMedia(`(max-width: ${Ve}px)`), D(), r.addEventListener("change", D), window.addEventListener("resize", D), typeof ResizeObserver < "u" && document.documentElement && (m = new ResizeObserver(D), m.observe(document.documentElement));
207
+ r = window.matchMedia(`(max-width: ${Ve}px)`), D(), r.addEventListener("change", D), window.addEventListener("resize", D), typeof ResizeObserver < "u" && document.documentElement && (d = new ResizeObserver(D), d.observe(document.documentElement));
208
208
  }), ce(() => {
209
- r?.removeEventListener("change", D), window.removeEventListener("resize", D), m?.disconnect(), m = null;
210
- }), l({ collapsed: b }), (d, V) => (i(), s("aside", {
209
+ r?.removeEventListener("change", D), window.removeEventListener("resize", D), d?.disconnect(), d = null;
210
+ }), l({ collapsed: b }), (f, V) => (i(), s("aside", {
211
211
  class: x(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-all duration-300", ["w-[84px]", b.value ? "md:w-[84px]" : "md:w-72"]])
212
212
  }, [
213
- f.value || d.$slots.header ? (i(), s("header", Mt, [
213
+ m.value || f.$slots.header ? (i(), s("header", Mt, [
214
214
  E("div", It, [
215
215
  E("button", {
216
216
  type: "button",
@@ -225,13 +225,13 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
225
225
  size: 16
226
226
  }, null, 8, ["name"])
227
227
  ], 8, Ot),
228
- f.value && !b.value ? (i(), s("div", jt, [
228
+ m.value && !b.value ? (i(), s("div", jt, [
229
229
  e.title ? (i(), s("p", Pt, S(e.title), 1)) : h("", !0),
230
230
  e.subtitle ? (i(), s("p", Ft, S(e.subtitle), 1)) : h("", !0)
231
231
  ])) : h("", !0)
232
232
  ]),
233
- d.$slots.header && !b.value ? (i(), s("div", qt, [
234
- A(d.$slots, "header", { collapsed: b.value })
233
+ f.$slots.header && !b.value ? (i(), s("div", qt, [
234
+ A(f.$slots, "header", { collapsed: b.value })
235
235
  ])) : h("", !0)
236
236
  ])) : (i(), s("div", Rt, [
237
237
  E("button", {
@@ -255,20 +255,20 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
255
255
  collapsed: b.value
256
256
  }, {
257
257
  default: W(() => [
258
- (i(!0), s(Z, null, ne(j.items, (w) => (i(), Q(He, {
259
- key: w.id,
260
- label: w.label,
261
- icon: w.icon,
262
- badge: w.badge,
263
- disabled: w.disabled,
258
+ (i(!0), s(Z, null, ne(j.items, ($) => (i(), Q(He, {
259
+ key: $.id,
260
+ label: $.label,
261
+ icon: $.icon,
262
+ badge: $.badge,
263
+ disabled: $.disabled,
264
264
  collapsed: b.value,
265
- active: e.modelValue === w.id,
266
- onClick: (c) => g(w.id)
265
+ active: e.modelValue === $.id,
266
+ onClick: (c) => y($.id)
267
267
  }, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
268
268
  ]),
269
269
  _: 2
270
270
  }, 1032, ["title", "collapsed"]))), 128)),
271
- A(d.$slots, "default", { collapsed: b.value })
271
+ A(f.$slots, "default", { collapsed: b.value })
272
272
  ])
273
273
  ], 2));
274
274
  }
@@ -285,12 +285,12 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
285
285
  }),
286
286
  emits: /* @__PURE__ */ Ae(["change"], ["update:modelValue"]),
287
287
  setup(e, { emit: l }) {
288
- const t = e, a = we(), n = ot(), o = p(() => a.id ?? n), u = l, [r, m] = it(e, "modelValue", {
288
+ const t = e, a = $e(), n = ot(), o = p(() => a.id ?? n), u = l, [r, d] = it(e, "modelValue", {
289
289
  set(b) {
290
- return m.number ? Number(b) : b;
290
+ return d.number ? Number(b) : b;
291
291
  }
292
292
  });
293
- return (b, f) => (i(), s("div", Wt, [
293
+ return (b, m) => (i(), s("div", Wt, [
294
294
  t.label ? (i(), s("label", {
295
295
  key: 0,
296
296
  for: o.value,
@@ -299,10 +299,10 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
299
299
  E("div", Gt, [
300
300
  Ce(E("select", oe({
301
301
  id: o.value,
302
- "onUpdate:modelValue": f[0] || (f[0] = (B) => st(r) ? r.value = B : null),
302
+ "onUpdate:modelValue": m[0] || (m[0] = (B) => st(r) ? r.value = B : null),
303
303
  class: "min-w-0 flex-1 appearance-none truncate rounded-corner border border-ui-border bg-ui-surface/60 py-1.5 pr-8 pl-2 text-sm text-tx-main"
304
304
  }, q(a), {
305
- onChange: f[1] || (f[1] = (B) => u("change", B))
305
+ onChange: m[1] || (m[1] = (B) => u("change", B))
306
306
  }), [
307
307
  A(b.$slots, "default")
308
308
  ], 16, Qt), [
@@ -318,7 +318,7 @@ const Et = ["src", "alt"], H = /* @__PURE__ */ z({
318
318
  ]));
319
319
  }
320
320
  }), Ee = /* @__PURE__ */ Symbol("barra de vasak");
321
- function $e(e) {
321
+ function we(e) {
322
322
  return e === "left" || e === "right" ? "vertical" : "horizontal";
323
323
  }
324
324
  const Xt = ["top", "bottom", "left", "right"];
@@ -328,11 +328,11 @@ function Jt(e) {
328
328
  function me() {
329
329
  const e = pe(Ee, null);
330
330
  if (e) return e;
331
- const l = $("top");
331
+ const l = w("top");
332
332
  return {
333
333
  posicion: l,
334
- orientacion: p(() => $e(l.value)),
335
- vertical: p(() => $e(l.value) === "vertical")
334
+ orientacion: p(() => we(l.value)),
335
+ vertical: p(() => we(l.value) === "vertical")
336
336
  };
337
337
  }
338
338
  const De = ["minimize", "maximize", "close"], Zt = "window", _t = "barPosition";
@@ -341,7 +341,7 @@ function ea(e) {
341
341
  return Jt(t) ? t : null;
342
342
  }
343
343
  function ta(e = "top") {
344
- const l = $(e);
344
+ const l = w(e);
345
345
  let t = null, a = !1;
346
346
  async function n() {
347
347
  try {
@@ -385,13 +385,13 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
385
385
  },
386
386
  emits: ["minimize", "maximize", "close"],
387
387
  setup(e, { emit: l }) {
388
- const t = e, { t: a } = ht(), n = p(() => t.minimizeLabel ?? a("ventana.minimizar")), o = p(() => t.maximizeLabel ?? a("ventana.maximizar")), u = p(() => t.closeLabel ?? a("ventana.cerrar")), r = l, { vertical: m } = me(), b = p(() => ({
388
+ const t = e, { t: a } = ht(), n = p(() => t.minimizeLabel ?? a("ventana.minimizar")), o = p(() => t.maximizeLabel ?? a("ventana.maximizar")), u = p(() => t.closeLabel ?? a("ventana.cerrar")), r = l, { vertical: d } = me(), b = p(() => ({
389
389
  minimize: t.controls.includes("minimize"),
390
390
  maximize: t.controls.includes("maximize"),
391
391
  close: t.controls.includes("close")
392
392
  }));
393
- function f() {
394
- return yt();
393
+ function m() {
394
+ return gt();
395
395
  }
396
396
  const B = Fe();
397
397
  function D(V) {
@@ -399,19 +399,19 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
399
399
  }
400
400
  function L() {
401
401
  if (D("Minimize")) return r("minimize");
402
- f().minimize();
402
+ m().minimize();
403
403
  }
404
- function g() {
404
+ function y() {
405
405
  if (D("Maximize")) return r("maximize");
406
- f().toggleMaximize();
406
+ m().toggleMaximize();
407
407
  }
408
- function d() {
408
+ function f() {
409
409
  if (D("Close")) return r("close");
410
- f().close();
410
+ m().close();
411
411
  }
412
412
  return (V, j) => e.controls.length ? (i(), s("div", {
413
413
  key: 0,
414
- class: x(["flex shrink-0 gap-1", q(m) ? "flex-col" : ""]),
414
+ class: x(["flex shrink-0 gap-1", q(d) ? "flex-col" : ""]),
415
415
  "data-tauri-drag-region": ""
416
416
  }, [
417
417
  b.value.minimize ? (i(), s("button", {
@@ -420,7 +420,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
420
420
  class: x([xe, "hover:bg-status-success"]),
421
421
  title: n.value,
422
422
  "aria-label": n.value,
423
- onClick: j[0] || (j[0] = (w) => L())
423
+ onClick: j[0] || (j[0] = ($) => L())
424
424
  }, [
425
425
  O(H, {
426
426
  name: "window-minimize",
@@ -434,7 +434,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
434
434
  class: x([xe, "hover:bg-status-warning"]),
435
435
  title: o.value,
436
436
  "aria-label": o.value,
437
- onClick: j[1] || (j[1] = (w) => g())
437
+ onClick: j[1] || (j[1] = ($) => y())
438
438
  }, [
439
439
  O(H, {
440
440
  name: "window-maximize",
@@ -448,7 +448,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
448
448
  class: x([xe, "hover:bg-status-error"]),
449
449
  title: u.value,
450
450
  "aria-label": u.value,
451
- onClick: j[2] || (j[2] = (w) => d())
451
+ onClick: j[2] || (j[2] = ($) => f())
452
452
  }, [
453
453
  O(H, {
454
454
  name: "window-close",
@@ -538,7 +538,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
538
538
  },
539
539
  emits: ["minimize", "maximize", "close"],
540
540
  setup(e) {
541
- const l = e, t = ta(), a = p(() => l.position ?? t.value), n = p(() => $e(a.value)), o = p(() => n.value === "vertical");
541
+ const l = e, t = ta(), a = p(() => l.position ?? t.value), n = p(() => we(a.value)), o = p(() => n.value === "vertical");
542
542
  de(Ee, { posicion: a, orientacion: n, vertical: o });
543
543
  const u = {
544
544
  top: "flex-col",
@@ -546,7 +546,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
546
546
  left: "flex-row",
547
547
  right: "flex-row-reverse"
548
548
  };
549
- return (r, m) => (i(), s("div", {
549
+ return (r, d) => (i(), s("div", {
550
550
  class: x(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", u[a.value]])
551
551
  }, [
552
552
  e.hideBar ? h("", !0) : (i(), Q(Ke, oe({
@@ -618,16 +618,16 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
618
618
  },
619
619
  emits: ["select", "close", "menu", "mover", "navegar"],
620
620
  setup(e, { emit: l }) {
621
- const t = e, a = l, { vertical: n, posicion: o } = me(), u = $(null), r = $(null), m = $(!1), b = $(!1), f = $(!1), B = $({ top: 0, left: 0, right: 0 });
621
+ const t = e, a = l, { vertical: n, posicion: o } = me(), u = w(null), r = w(null), d = w(!1), b = w(!1), m = w(!1), B = w({ top: 0, left: 0, right: 0 });
622
622
  let D = null, L = null;
623
- const g = p(() => t.tab.closable !== !1), d = p(() => t.tab.tooltip ?? t.tab.label), V = p(
623
+ const y = p(() => t.tab.closable !== !1), f = p(() => t.tab.tooltip ?? t.tab.label), V = p(
624
624
  () => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
625
- ), j = p(() => t.tab.label.trim().charAt(0).toUpperCase()), w = p(() => m.value || f.value), c = p(
626
- () => !!t.tab.dirty && !(w.value && g.value)
625
+ ), j = p(() => t.tab.label.trim().charAt(0).toUpperCase()), $ = p(() => d.value || m.value), c = p(
626
+ () => !!t.tab.dirty && !($.value && y.value)
627
627
  ), v = p(
628
- () => g.value && (w.value || t.active || !t.tab.dirty)
629
- ), y = p(
630
- () => n.value && (m.value || b.value || f.value)
628
+ () => y.value && ($.value || t.active || !t.tab.dirty)
629
+ ), g = p(
630
+ () => n.value && (d.value || b.value || m.value)
631
631
  ), P = p(() => {
632
632
  const R = { position: "fixed", top: `${B.value.top}px`, zIndex: 50 };
633
633
  return o.value === "right" ? { ...R, right: `${B.value.right + Ie}px` } : { ...R, left: `${B.value.left + Ie}px` };
@@ -644,10 +644,10 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
644
644
  }
645
645
  function U(R) {
646
646
  const k = R.relatedTarget;
647
- k && r.value?.contains(k) || (f.value = !1);
647
+ k && r.value?.contains(k) || (m.value = !1);
648
648
  }
649
649
  function ee() {
650
- m.value = !0, _();
650
+ d.value = !0, _();
651
651
  }
652
652
  function G() {
653
653
  b.value = !0, _();
@@ -665,7 +665,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
665
665
  (Math.abs(R.clientX - L.x) > Me || Math.abs(R.clientY - L.y) > Me) && T();
666
666
  }
667
667
  function ie(R) {
668
- R.button === 1 && g.value && (R.preventDefault(), a("close"));
668
+ R.button === 1 && y.value && (R.preventDefault(), a("close"));
669
669
  }
670
670
  function nt(R) {
671
671
  R.preventDefault(), a("menu", { x: R.clientX, y: R.clientY });
@@ -679,7 +679,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
679
679
  ]]),
680
680
  role: "tab",
681
681
  "aria-selected": e.active,
682
- title: d.value,
682
+ title: f.value,
683
683
  "aria-label": V.value,
684
684
  tabindex: e.tabindex,
685
685
  onClick: k[5] || (k[5] = M((N) => a("select"), ["stop"])),
@@ -696,7 +696,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
696
696
  k[15] || (k[15] = F(M((N) => a("mover", -1), ["alt", "prevent", "stop"]), ["up"])),
697
697
  k[16] || (k[16] = F(M((N) => a("mover", 1), ["alt", "prevent", "stop"]), ["right"])),
698
698
  k[17] || (k[17] = F(M((N) => a("mover", 1), ["alt", "prevent", "stop"]), ["down"])),
699
- k[18] || (k[18] = F(M((N) => g.value && a("close"), ["prevent", "stop"]), ["delete"]))
699
+ k[18] || (k[18] = F(M((N) => y.value && a("close"), ["prevent", "stop"]), ["delete"]))
700
700
  ],
701
701
  onAuxclick: M(ie, ["stop"]),
702
702
  onContextmenu: nt,
@@ -705,7 +705,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
705
705
  onPointerup: T,
706
706
  onPointerleave: T,
707
707
  onMouseenter: ee,
708
- onMouseleave: k[19] || (k[19] = (N) => m.value = !1),
708
+ onMouseleave: k[19] || (k[19] = (N) => d.value = !1),
709
709
  onFocus: G,
710
710
  onBlur: k[20] || (k[20] = (N) => b.value = !1)
711
711
  }, [
@@ -735,27 +735,27 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
735
735
  })
736
736
  ], 8, fa)) : h("", !0),
737
737
  (i(), Q(fe, { to: "body" }, [
738
- O(ge, {
738
+ O(ye, {
739
739
  "enter-active-class": "transition duration-150 ease-out",
740
740
  "enter-from-class": "opacity-0 scale-95",
741
741
  "leave-active-class": "transition duration-100 ease-in",
742
742
  "leave-to-class": "opacity-0 scale-95"
743
743
  }, {
744
744
  default: W(() => [
745
- y.value ? (i(), s("div", {
745
+ g.value ? (i(), s("div", {
746
746
  key: 0,
747
747
  class: x(["flex items-center gap-2 rounded-corner border border-ui-border bg-ui-surface/95 px-3 py-1 text-sm shadow-lg", e.active ? "font-bold" : ""]),
748
748
  ref_key: "desplegadoRef",
749
749
  ref: r,
750
750
  style: se(P.value),
751
- onMouseenter: k[2] || (k[2] = (N) => f.value = !0),
752
- onMouseleave: k[3] || (k[3] = (N) => f.value = !1),
753
- onFocusin: k[4] || (k[4] = (N) => f.value = !0),
751
+ onMouseenter: k[2] || (k[2] = (N) => m.value = !0),
752
+ onMouseleave: k[3] || (k[3] = (N) => m.value = !1),
753
+ onFocusin: k[4] || (k[4] = (N) => m.value = !0),
754
754
  onFocusout: U
755
755
  }, [
756
756
  E("span", ma, S(e.tab.label), 1),
757
757
  e.tab.dirty ? (i(), s("span", ba)) : h("", !0),
758
- g.value ? (i(), s("button", {
758
+ y.value ? (i(), s("button", {
759
759
  key: 1,
760
760
  type: "button",
761
761
  class: "flex size-4 shrink-0 items-center justify-center rounded-corner-sm hover:bg-ui-surface",
@@ -776,7 +776,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
776
776
  ]))
777
777
  ], 42, ua));
778
778
  }
779
- }), ga = ["aria-orientation"], ya = ["draggable", "onDragstart", "onDragover", "onDrop"], ha = ["title", "aria-label"], xa = /* @__PURE__ */ z({
779
+ }), ya = ["aria-orientation"], ga = ["draggable", "onDragstart", "onDragover", "onDrop"], ha = ["title", "aria-label"], xa = /* @__PURE__ */ z({
780
780
  __name: "TabBar",
781
781
  props: {
782
782
  tabs: {},
@@ -788,48 +788,48 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
788
788
  },
789
789
  emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
790
790
  setup(e, { emit: l }) {
791
- const t = e, a = l, { vertical: n } = me(), o = $(null), u = $(0), r = $(null), m = $(null);
792
- function b(w) {
793
- a("update:modelValue", w), a("select", w);
791
+ const t = e, a = l, { vertical: n } = me(), o = w(null), u = w(0), r = w(null), d = w(null);
792
+ function b($) {
793
+ a("update:modelValue", $), a("select", $);
794
794
  }
795
- async function f(w, c) {
795
+ async function m($, c) {
796
796
  const v = t.tabs.length - 1;
797
797
  if (v < 0) return;
798
- const y = c === "primera" ? 0 : c === "ultima" ? v : c === "anterior" ? (w - 1 + t.tabs.length) % t.tabs.length : (w + 1) % t.tabs.length;
799
- u.value = y, await Y(), o.value?.querySelectorAll('[role="tab"]')?.[y]?.focus();
798
+ const g = c === "primera" ? 0 : c === "ultima" ? v : c === "anterior" ? ($ - 1 + t.tabs.length) % t.tabs.length : ($ + 1) % t.tabs.length;
799
+ u.value = g, await Y(), o.value?.querySelectorAll('[role="tab"]')?.[g]?.focus();
800
800
  }
801
- function B(w, c) {
801
+ function B($, c) {
802
802
  if (t.fixedOrder) return;
803
- const v = w + c;
803
+ const v = $ + c;
804
804
  if (v < 0 || v >= t.tabs.length) return;
805
- const y = [...t.tabs], [P] = y.splice(w, 1);
806
- P && (y.splice(v, 0, P), u.value = v, a("reorder", y));
805
+ const g = [...t.tabs], [P] = g.splice($, 1);
806
+ P && (g.splice(v, 0, P), u.value = v, a("reorder", g));
807
807
  }
808
- function D(w) {
808
+ function D($) {
809
809
  const c = o.value;
810
810
  if (!c) return;
811
- const v = w.deltaY || w.deltaX || 0, y = n.value ? c.scrollTop : c.scrollLeft;
812
- n.value ? c.scrollTop += v : c.scrollLeft += v, (n.value ? c.scrollTop : c.scrollLeft) !== y && w.preventDefault();
811
+ const v = $.deltaY || $.deltaX || 0, g = n.value ? c.scrollTop : c.scrollLeft;
812
+ n.value ? c.scrollTop += v : c.scrollLeft += v, (n.value ? c.scrollTop : c.scrollLeft) !== g && $.preventDefault();
813
813
  }
814
- function L(w, c) {
815
- t.fixedOrder || (r.value = w, c.dataTransfer?.setData("text/plain", String(w)), c.dataTransfer && (c.dataTransfer.effectAllowed = "move"));
814
+ function L($, c) {
815
+ t.fixedOrder || (r.value = $, c.dataTransfer?.setData("text/plain", String($)), c.dataTransfer && (c.dataTransfer.effectAllowed = "move"));
816
816
  }
817
- function g(w, c) {
818
- t.fixedOrder || r.value === null || (c.preventDefault(), m.value = w, c.dataTransfer && (c.dataTransfer.dropEffect = "move"));
817
+ function y($, c) {
818
+ t.fixedOrder || r.value === null || (c.preventDefault(), d.value = $, c.dataTransfer && (c.dataTransfer.dropEffect = "move"));
819
819
  }
820
- function d(w) {
820
+ function f($) {
821
821
  const c = r.value;
822
- if (V(), t.fixedOrder || c === null || c === w) return;
823
- const v = [...t.tabs], [y] = v.splice(c, 1);
824
- y && (v.splice(w, 0, y), a("reorder", v));
822
+ if (V(), t.fixedOrder || c === null || c === $) return;
823
+ const v = [...t.tabs], [g] = v.splice(c, 1);
824
+ g && (v.splice($, 0, g), a("reorder", v));
825
825
  }
826
826
  function V() {
827
- r.value = null, m.value = null;
827
+ r.value = null, d.value = null;
828
828
  }
829
829
  const j = p(
830
830
  () => n.value ? "flex h-full flex-col items-center gap-1 overflow-y-auto overflow-x-hidden" : "flex items-center gap-1 overflow-x-auto overflow-y-hidden"
831
831
  );
832
- return (w, c) => (i(), s("div", {
832
+ return ($, c) => (i(), s("div", {
833
833
  class: x(["flex min-h-0 min-w-0 items-center gap-1", q(n) ? "w-full flex-col" : "h-full"]),
834
834
  role: "tablist",
835
835
  "aria-orientation": q(n) ? "vertical" : "horizontal"
@@ -840,16 +840,16 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
840
840
  class: x(j.value),
841
841
  onWheel: D
842
842
  }, [
843
- (i(!0), s(Z, null, ne(e.tabs, (v, y) => (i(), s("div", {
843
+ (i(!0), s(Z, null, ne(e.tabs, (v, g) => (i(), s("div", {
844
844
  key: v.id,
845
845
  class: x(["transition-opacity", [
846
- r.value === y ? "opacity-40" : "",
847
- m.value === y && r.value !== y ? "ring-2 ring-secondary rounded-corner" : ""
846
+ r.value === g ? "opacity-40" : "",
847
+ d.value === g && r.value !== g ? "ring-2 ring-secondary rounded-corner" : ""
848
848
  ]]),
849
849
  draggable: !e.fixedOrder,
850
- onDragstart: (P) => L(y, P),
851
- onDragover: (P) => g(y, P),
852
- onDrop: M((P) => d(y), ["prevent"]),
850
+ onDragstart: (P) => L(g, P),
851
+ onDragover: (P) => y(g, P),
852
+ onDrop: M((P) => f(g), ["prevent"]),
853
853
  onDragend: V
854
854
  }, [
855
855
  O(Ge, {
@@ -857,14 +857,14 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
857
857
  active: v.id === e.modelValue,
858
858
  "close-label": e.closeLabel,
859
859
  "dirty-label": e.dirtyLabel,
860
- tabindex: y === u.value ? 0 : -1,
860
+ tabindex: g === u.value ? 0 : -1,
861
861
  onSelect: (P) => b(v.id),
862
862
  onClose: (P) => a("close", v.id),
863
863
  onMenu: (P) => a("menu", { id: v.id, ...P }),
864
- onNavegar: (P) => f(y, P),
865
- onMover: (P) => B(y, P)
864
+ onNavegar: (P) => m(g, P),
865
+ onMover: (P) => B(g, P)
866
866
  }, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
867
- ], 42, ya))), 128))
867
+ ], 42, ga))), 128))
868
868
  ], 34),
869
869
  e.newLabel ? (i(), s("button", {
870
870
  key: 0,
@@ -880,7 +880,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
880
880
  size: 14
881
881
  })
882
882
  ], 8, ha)) : h("", !0)
883
- ], 10, ga));
883
+ ], 10, ya));
884
884
  }
885
885
  }), ka = ["id", "aria-label", "type", "value", "placeholder", "disabled", "readonly", "required", "aria-describedby", "autocomplete", "aria-invalid"], Qe = /* @__PURE__ */ z({
886
886
  __name: "TextInput",
@@ -899,7 +899,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
899
899
  required: { type: Boolean, default: !1 },
900
900
  lazy: { type: Boolean, default: !1 }
901
901
  },
902
- emits: ["update:modelValue"],
902
+ emits: ["update:modelValue", "keyup", "keydown"],
903
903
  setup(e, { emit: l }) {
904
904
  const t = e, a = l;
905
905
  function n(r) {
@@ -915,7 +915,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
915
915
  t.mono ? "font-mono" : "",
916
916
  t.disabled ? "cursor-not-allowed opacity-60" : ""
917
917
  ]);
918
- return (r, m) => (i(), s("input", {
918
+ return (r, d) => (i(), s("input", {
919
919
  id: e.id,
920
920
  "aria-label": e.ariaLabel,
921
921
  type: e.type,
@@ -929,10 +929,12 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
929
929
  "aria-invalid": e.invalid || void 0,
930
930
  class: x(u.value),
931
931
  onInput: n,
932
- onChange: o
932
+ onChange: o,
933
+ onKeyup: d[0] || (d[0] = (b) => a("keyup", b)),
934
+ onKeydown: d[1] || (d[1] = (b) => a("keydown", b))
933
935
  }, null, 42, ka));
934
936
  }
935
- }), $a = { class: "pointer-events-none absolute left-2 flex items-center" }, wa = ["aria-label"], Le = /* @__PURE__ */ z({
937
+ }), wa = { class: "pointer-events-none absolute left-2 flex items-center" }, $a = ["aria-label"], Le = /* @__PURE__ */ z({
936
938
  __name: "SearchField",
937
939
  props: {
938
940
  modelValue: { default: "" },
@@ -949,9 +951,9 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
949
951
  },
950
952
  emits: ["update:modelValue", "search", "clear"],
951
953
  setup(e, { expose: l, emit: t }) {
952
- const a = e, n = t, o = $(null);
954
+ const a = e, n = t, o = w(null);
953
955
  let u;
954
- const r = p(() => a.modelValue.length > 0), m = p(
956
+ const r = p(() => a.modelValue.length > 0), d = p(
955
957
  () => a.listboxId ? {
956
958
  role: "combobox",
957
959
  "aria-autocomplete": "list",
@@ -960,33 +962,33 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
960
962
  "aria-activedescendant": a.activeOptionId || void 0
961
963
  } : {}
962
964
  ), b = p(() => a.clearable && r.value && !a.disabled);
963
- function f() {
965
+ function m() {
964
966
  clearTimeout(u), u = void 0;
965
967
  }
966
- function B(d) {
967
- n("update:modelValue", d), !(a.debounce <= 0) && (f(), u = setTimeout(() => n("search", d), a.debounce));
968
+ function B(f) {
969
+ n("update:modelValue", f), !(a.debounce <= 0) && (m(), u = setTimeout(() => n("search", f), a.debounce));
968
970
  }
969
971
  function D() {
970
- f(), n("search", a.modelValue);
972
+ m(), n("search", a.modelValue);
971
973
  }
972
974
  function L() {
973
- f(), n("update:modelValue", ""), n("clear"), g();
975
+ m(), n("update:modelValue", ""), n("clear"), y();
974
976
  }
975
- function g() {
977
+ function y() {
976
978
  o.value?.$el?.focus?.();
977
979
  }
978
- return l({ enfocar: g }), J(async () => {
979
- a.autofocus && (await Y(), g());
980
- }), ve(f), K(
980
+ return l({ enfocar: y }), J(async () => {
981
+ a.autofocus && (await Y(), y());
982
+ }), ve(m), K(
981
983
  () => a.disabled,
982
- (d) => {
983
- d && f();
984
+ (f) => {
985
+ f && m();
984
986
  }
985
- ), (d, V) => (i(), s("div", {
987
+ ), (f, V) => (i(), s("div", {
986
988
  class: "relative flex items-center",
987
989
  onKeydown: F(D, ["enter"])
988
990
  }, [
989
- E("span", $a, [
991
+ E("span", wa, [
990
992
  O(H, {
991
993
  name: e.busy ? "content-loading" : "system-search",
992
994
  type: "symbol",
@@ -1001,7 +1003,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1001
1003
  "model-value": e.modelValue,
1002
1004
  placeholder: e.placeholder || e.label,
1003
1005
  ariaLabel: e.label || void 0
1004
- }, m.value, {
1006
+ }, d.value, {
1005
1007
  disabled: e.disabled,
1006
1008
  class: ["pl-7 [&::-webkit-search-cancel-button]:appearance-none", b.value ? "pr-8" : ""],
1007
1009
  "onUpdate:modelValue": B
@@ -1021,7 +1023,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1021
1023
  size: 12,
1022
1024
  alt: ""
1023
1025
  })
1024
- ], 40, wa)) : h("", !0)
1026
+ ], 40, $a)) : h("", !0)
1025
1027
  ], 32));
1026
1028
  }
1027
1029
  }), Ca = ["title", "aria-label", "aria-expanded"], za = /* @__PURE__ */ z({
@@ -1036,10 +1038,10 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1036
1038
  },
1037
1039
  emits: ["update:modelValue", "search", "open", "close"],
1038
1040
  setup(e, { emit: l }) {
1039
- const t = e, a = l, { vertical: n, posicion: o } = me(), u = $(!1), r = $(null), m = p(() => n.value || t.collapsed), b = p(() => !m.value || u.value), f = p(() => {
1040
- if (!m.value) return "";
1041
- const g = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
1042
- return o.value === "left" ? `${g} left-full top-0 ml-1` : o.value === "right" ? `${g} right-full top-0 mr-1` : o.value === "bottom" ? `${g} bottom-full right-0 mb-1` : `${g} top-full right-0 mt-1`;
1041
+ const t = e, a = l, { vertical: n, posicion: o } = me(), u = w(!1), r = w(null), d = p(() => n.value || t.collapsed), b = p(() => !d.value || u.value), m = p(() => {
1042
+ if (!d.value) return "";
1043
+ const y = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
1044
+ return o.value === "left" ? `${y} left-full top-0 ml-1` : o.value === "right" ? `${y} right-full top-0 mr-1` : o.value === "bottom" ? `${y} bottom-full right-0 mb-1` : `${y} top-full right-0 mt-1`;
1043
1045
  });
1044
1046
  async function B() {
1045
1047
  u.value = !0, a("open"), await Y(), r.value?.enfocar();
@@ -1047,24 +1049,24 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1047
1049
  function D() {
1048
1050
  u.value && (u.value = !1, a("close"));
1049
1051
  }
1050
- function L(g) {
1051
- const d = g.relatedTarget;
1052
- d && g.currentTarget.contains(d) || D();
1052
+ function L(y) {
1053
+ const f = y.relatedTarget;
1054
+ f && y.currentTarget.contains(f) || D();
1053
1055
  }
1054
- return (g, d) => (i(), s("div", {
1056
+ return (y, f) => (i(), s("div", {
1055
1057
  class: "relative flex shrink-0 items-center",
1056
1058
  onFocusout: L
1057
1059
  }, [
1058
- m.value ? (i(), s("button", {
1060
+ d.value ? (i(), s("button", {
1059
1061
  key: 0,
1060
1062
  type: "button",
1061
1063
  class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
1062
1064
  title: e.label,
1063
1065
  "aria-label": e.label,
1064
1066
  "aria-expanded": u.value,
1065
- onMousedown: d[0] || (d[0] = M(() => {
1067
+ onMousedown: f[0] || (f[0] = M(() => {
1066
1068
  }, ["prevent"])),
1067
- onClick: d[1] || (d[1] = (V) => u.value ? D() : B())
1069
+ onClick: f[1] || (f[1] = (V) => u.value ? D() : B())
1068
1070
  }, [
1069
1071
  O(H, {
1070
1072
  name: "system-search",
@@ -1074,7 +1076,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1074
1076
  ], 40, Ca)) : h("", !0),
1075
1077
  b.value ? (i(), s("div", {
1076
1078
  key: 1,
1077
- class: x(f.value),
1079
+ class: x(m.value),
1078
1080
  onKeydown: F(D, ["esc"])
1079
1081
  }, [
1080
1082
  O(Le, {
@@ -1085,9 +1087,9 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1085
1087
  label: e.label,
1086
1088
  disabled: e.disabled,
1087
1089
  debounce: e.debounce,
1088
- class: x(m.value ? "" : "w-48"),
1089
- "onUpdate:modelValue": d[2] || (d[2] = (V) => a("update:modelValue", V)),
1090
- onSearch: d[3] || (d[3] = (V) => a("search", V))
1090
+ class: x(d.value ? "" : "w-48"),
1091
+ "onUpdate:modelValue": f[2] || (f[2] = (V) => a("update:modelValue", V)),
1092
+ onSearch: f[3] || (f[3] = (V) => a("search", V))
1091
1093
  }, null, 8, ["model-value", "placeholder", "label", "disabled", "debounce", "class"])
1092
1094
  ], 34)) : h("", !0)
1093
1095
  ], 32));
@@ -1125,7 +1127,7 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1125
1127
  }, u = (r) => {
1126
1128
  t.stopPropagation && r.stopPropagation(), t.preventDefault && r.preventDefault(), !t.disabled && !t.loading && a("click");
1127
1129
  };
1128
- return (r, m) => (i(), s("button", {
1130
+ return (r, d) => (i(), s("button", {
1129
1131
  type: t.type,
1130
1132
  onClick: u,
1131
1133
  class: x(["rounded-corner transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
@@ -1153,12 +1155,12 @@ const aa = ["title", "aria-label"], la = ["title", "aria-label"], na = ["title",
1153
1155
  }, null, 8, Ba)) : h("", !0)
1154
1156
  ], 10, Ea));
1155
1157
  }
1156
- }), ye = (e, l) => {
1158
+ }), ge = (e, l) => {
1157
1159
  const t = e.__vccOpts || e;
1158
1160
  for (const [a, n] of l)
1159
1161
  t[a] = n;
1160
1162
  return t;
1161
- }, Sa = /* @__PURE__ */ ye(Aa, [["__scopeId", "data-v-2eaf6e27"]]), Ye = {
1163
+ }, Sa = /* @__PURE__ */ ge(Aa, [["__scopeId", "data-v-2eaf6e27"]]), Ye = {
1162
1164
  info: "border-ui-border bg-ui-surface/70 text-tx-main",
1163
1165
  success: "border-status-success/40 bg-status-success/10 text-tx-main",
1164
1166
  warning: "border-status-warning/40 bg-status-warning/10 text-tx-main",
@@ -1215,6 +1217,7 @@ const Va = ["role"], Ma = {
1215
1217
  title: {},
1216
1218
  note: {},
1217
1219
  icon: { default: "dialog-information" },
1220
+ iconType: { default: "icon" },
1218
1221
  bordered: { type: Boolean, default: !1 }
1219
1222
  },
1220
1223
  setup(e) {
@@ -1223,9 +1226,10 @@ const Va = ["role"], Ma = {
1223
1226
  }, [
1224
1227
  O(H, {
1225
1228
  name: e.icon,
1229
+ type: e.iconType,
1226
1230
  size: 48,
1227
1231
  class: "opacity-60"
1228
- }, null, 8, ["name"]),
1232
+ }, null, 8, ["name", "type"]),
1229
1233
  E("p", Pa, S(e.title), 1),
1230
1234
  e.note ? (i(), s("p", Fa, S(e.note), 1)) : h("", !0),
1231
1235
  A(l.$slots, "default")
@@ -1308,7 +1312,7 @@ function Ga(e, l) {
1308
1312
  if (!t) return e;
1309
1313
  const a = [];
1310
1314
  for (let n = 0; n < e.length; n++) {
1311
- const o = e[n], u = ke(t, o.valor), r = ke(t, o.etiqueta), m = r === 10 ? 20 : r, f = ke(t, o.detalle) === 100 ? 100 : 40, B = Math.min(u, m, f);
1315
+ const o = e[n], u = ke(t, o.valor), r = ke(t, o.etiqueta), d = r === 10 ? 20 : r, m = ke(t, o.detalle) === 100 ? 100 : 40, B = Math.min(u, d, m);
1312
1316
  B !== 100 && a.push({ opcion: o, rango: B, orden: n });
1313
1317
  }
1314
1318
  return a.sort((n, o) => n.rango - o.rango || n.orden - o.orden), a.map((n) => n.opcion);
@@ -1344,21 +1348,21 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1344
1348
  },
1345
1349
  emits: ["update:modelValue"],
1346
1350
  setup(e, { emit: l }) {
1347
- const t = e, a = l, n = $(""), o = $(!1), u = $(0), r = $(null), m = $(null), b = $(null), f = Qa(), B = p(
1351
+ const t = e, a = l, n = w(""), o = w(!1), u = w(0), r = w(null), d = w(null), b = w(null), m = Qa(), B = p(
1348
1352
  () => t.options.find((T) => T.valor === t.modelValue) ?? null
1349
- ), D = p(() => Ga(t.options, n.value)), L = p(() => D.value.slice(0, t.limit)), g = p(() => Math.max(0, D.value.length - t.limit)), d = p(
1350
- () => L.value.length > 0 ? `${f}-${u.value}` : void 0
1353
+ ), D = p(() => Ga(t.options, n.value)), L = p(() => D.value.slice(0, t.limit)), y = p(() => Math.max(0, D.value.length - t.limit)), f = p(
1354
+ () => L.value.length > 0 ? `${m}-${u.value}` : void 0
1351
1355
  );
1352
1356
  function V(T) {
1353
- a("update:modelValue", T), w();
1357
+ a("update:modelValue", T), $();
1354
1358
  }
1355
1359
  async function j() {
1356
1360
  o.value = !0;
1357
1361
  const T = L.value.findIndex((C) => C.valor === t.modelValue);
1358
1362
  u.value = T >= 0 ? T : 0, await Y(), b.value?.enfocar(), U();
1359
1363
  }
1360
- function w(T = !0) {
1361
- o.value && (o.value = !1, n.value = "", T && Y(() => m.value?.focus()));
1364
+ function $(T = !0) {
1365
+ o.value && (o.value = !1, n.value = "", T && Y(() => d.value?.focus()));
1362
1366
  }
1363
1367
  function c(T) {
1364
1368
  const C = L.value.length;
@@ -1367,18 +1371,18 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1367
1371
  function v(T) {
1368
1372
  u.value = T, U();
1369
1373
  }
1370
- function y(T) {
1374
+ function g(T) {
1371
1375
  const C = T.target?.closest?.("[data-indice]");
1372
1376
  if (!C) return null;
1373
1377
  const I = Number(C.getAttribute("data-indice"));
1374
1378
  return Number.isInteger(I) ? I : null;
1375
1379
  }
1376
1380
  function P(T) {
1377
- const C = y(T), I = C === null ? void 0 : L.value[C];
1381
+ const C = g(T), I = C === null ? void 0 : L.value[C];
1378
1382
  I && V(I.valor);
1379
1383
  }
1380
1384
  function _(T) {
1381
- const C = y(T);
1385
+ const C = g(T);
1382
1386
  C !== null && (u.value = C);
1383
1387
  }
1384
1388
  function U() {
@@ -1393,14 +1397,14 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1393
1397
  K(
1394
1398
  () => t.disabled,
1395
1399
  (T) => {
1396
- T && w(!1);
1400
+ T && $(!1);
1397
1401
  }
1398
1402
  ), K(n, () => {
1399
1403
  u.value = 0, U();
1400
1404
  });
1401
1405
  function G(T) {
1402
1406
  const C = T.relatedTarget;
1403
- C && T.currentTarget.contains(C) || w(!1);
1407
+ C && T.currentTarget.contains(C) || $(!1);
1404
1408
  }
1405
1409
  return (T, C) => (i(), s("div", {
1406
1410
  class: "relative",
@@ -1408,14 +1412,14 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1408
1412
  }, [
1409
1413
  E("button", {
1410
1414
  ref_key: "boton",
1411
- ref: m,
1415
+ ref: d,
1412
1416
  type: "button",
1413
1417
  disabled: e.disabled,
1414
1418
  class: "flex w-full items-center justify-between gap-2 rounded-corner border border-ui-border-strong bg-ui-surface px-2 py-1 text-left text-sm text-tx-main transition-colors hover:bg-ui-bg/60 disabled:cursor-not-allowed disabled:opacity-50",
1415
1419
  "aria-label": e.label || void 0,
1416
1420
  "aria-expanded": o.value,
1417
1421
  "aria-haspopup": "listbox",
1418
- onClick: C[0] || (C[0] = (I) => o.value ? w() : j()),
1422
+ onClick: C[0] || (C[0] = (I) => o.value ? $() : j()),
1419
1423
  onKeydown: [
1420
1424
  C[1] || (C[1] = F(M((I) => o.value ? c(1) : j(), ["prevent"]), ["down"])),
1421
1425
  C[2] || (C[2] = F(M((I) => o.value ? c(-1) : j(), ["prevent"]), ["up"]))
@@ -1436,13 +1440,13 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1436
1440
  key: 0,
1437
1441
  class: x(["absolute z-20 w-full min-w-64 rounded-corner border border-ui-border-strong bg-ui-bg shadow-lg", e.up ? "bottom-full mb-1" : "mt-1"]),
1438
1442
  onKeydown: [
1439
- C[4] || (C[4] = F(M((I) => w(), ["prevent"]), ["escape"])),
1443
+ C[4] || (C[4] = F(M((I) => $(), ["prevent"]), ["escape"])),
1440
1444
  C[5] || (C[5] = F(M((I) => c(1), ["prevent"]), ["down"])),
1441
1445
  C[6] || (C[6] = F(M((I) => c(-1), ["prevent"]), ["up"])),
1442
1446
  C[7] || (C[7] = F(M((I) => v(0), ["prevent"]), ["home"])),
1443
1447
  C[8] || (C[8] = F(M((I) => v(L.value.length - 1), ["prevent"]), ["end"])),
1444
1448
  C[9] || (C[9] = F(M((I) => ee(), ["prevent"]), ["enter"])),
1445
- C[10] || (C[10] = F((I) => w(!1), ["tab"]))
1449
+ C[10] || (C[10] = F((I) => $(!1), ["tab"]))
1446
1450
  ],
1447
1451
  onClick: P,
1448
1452
  onMousemove: _
@@ -1455,13 +1459,13 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1455
1459
  "onUpdate:modelValue": C[3] || (C[3] = (I) => n.value = I),
1456
1460
  label: e.label,
1457
1461
  placeholder: e.searchPlaceholder,
1458
- "listbox-id": q(f),
1459
- "active-option-id": d.value,
1462
+ "listbox-id": q(m),
1463
+ "active-option-id": f.value,
1460
1464
  expanded: o.value
1461
1465
  }, null, 8, ["modelValue", "label", "placeholder", "listbox-id", "active-option-id", "expanded"])
1462
1466
  ]),
1463
1467
  E("ul", {
1464
- id: q(f),
1468
+ id: q(m),
1465
1469
  ref_key: "lista",
1466
1470
  ref: r,
1467
1471
  role: "listbox",
@@ -1469,7 +1473,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1469
1473
  }, [
1470
1474
  L.value.length === 0 ? (i(), s("li", el, S(e.emptyText), 1)) : h("", !0),
1471
1475
  (i(!0), s(Z, null, ne(L.value, (I, ie) => (i(), s("li", {
1472
- id: `${q(f)}-${ie}`,
1476
+ id: `${q(m)}-${ie}`,
1473
1477
  key: I.valor,
1474
1478
  "data-indice": ie,
1475
1479
  role: "option",
@@ -1482,7 +1486,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1482
1486
  E("span", al, S(I.etiqueta), 1),
1483
1487
  I.detalle ? (i(), s("span", ll, S(I.detalle), 1)) : h("", !0)
1484
1488
  ], 10, tl))), 128)),
1485
- g.value > 0 ? (i(), s("li", nl, "+" + S(g.value), 1)) : h("", !0)
1489
+ y.value > 0 ? (i(), s("li", nl, "+" + S(y.value), 1)) : h("", !0)
1486
1490
  ], 8, _a)
1487
1491
  ], 34)) : h("", !0)
1488
1492
  ], 32));
@@ -1502,7 +1506,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1502
1506
  A(l.$slots, "default", {}, void 0, !0)
1503
1507
  ], 2));
1504
1508
  }
1505
- }), rl = /* @__PURE__ */ ye(sl, [["__scopeId", "data-v-45bd4eab"]]), ul = { class: "flex items-center gap-3 flex-1 min-w-0" }, cl = ["src", "alt"], dl = { class: "min-w-0" }, fl = { class: "font-semibold truncate" }, ml = {
1509
+ }), rl = /* @__PURE__ */ ge(sl, [["__scopeId", "data-v-45bd4eab"]]), ul = { class: "flex items-center gap-3 flex-1 min-w-0" }, cl = ["src", "alt"], dl = { class: "min-w-0" }, fl = { class: "font-semibold truncate" }, ml = {
1506
1510
  key: 0,
1507
1511
  class: "text-xs text-gray-400 truncate"
1508
1512
  }, bl = {
@@ -1514,7 +1518,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1514
1518
  }, pl = {
1515
1519
  key: 1,
1516
1520
  class: "w-2 h-2 rounded-full bg-green-500"
1517
- }, gl = /* @__PURE__ */ z({
1521
+ }, yl = /* @__PURE__ */ z({
1518
1522
  __name: "DeviceCard",
1519
1523
  props: {
1520
1524
  icon: {},
@@ -1551,7 +1555,7 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1551
1555
  e.subtitle ? (i(), s("div", ml, S(e.subtitle), 1)) : h("", !0),
1552
1556
  e.metadata ? (i(), s("div", bl, S(e.metadata), 1)) : h("", !0),
1553
1557
  e.extraInfo && e.extraInfo.length > 0 ? (i(), s("div", vl, [
1554
- (i(!0), s(Z, null, ne(e.extraInfo, (r, m) => (i(), s("span", { key: m }, S(r), 1))), 128))
1558
+ (i(!0), s(Z, null, ne(e.extraInfo, (r, d) => (i(), s("span", { key: d }, S(r), 1))), 128))
1555
1559
  ])) : h("", !0)
1556
1560
  ])
1557
1561
  ]),
@@ -1567,19 +1571,19 @@ const Ya = ["disabled", "aria-label", "aria-expanded"], Xa = { class: "min-w-0 f
1567
1571
  function Ze() {
1568
1572
  const e = pe(Je, null);
1569
1573
  if (e) return e;
1570
- const l = $(!1);
1574
+ const l = w(!1);
1571
1575
  return {
1572
1576
  abierto: p(() => l.value),
1573
1577
  cerrar: () => {
1574
1578
  l.value = !1;
1575
1579
  },
1576
- idDelTitulo: $(null),
1580
+ idDelTitulo: w(null),
1577
1581
  ponerElTitulo: () => {
1578
1582
  }
1579
1583
  };
1580
1584
  }
1581
1585
  let je = 0;
1582
- function yl() {
1586
+ function gl() {
1583
1587
  return je += 1, `vsk-dialogo-titulo-${je}`;
1584
1588
  }
1585
1589
  const hl = /* @__PURE__ */ z({
@@ -1589,7 +1593,7 @@ const hl = /* @__PURE__ */ z({
1589
1593
  },
1590
1594
  emits: ["update:open"],
1591
1595
  setup(e, { emit: l }) {
1592
- const t = e, a = l, n = $(null);
1596
+ const t = e, a = l, n = w(null);
1593
1597
  return de(Je, {
1594
1598
  abierto: p(() => t.open),
1595
1599
  cerrar: () => a("update:open", !1),
@@ -1603,58 +1607,58 @@ const hl = /* @__PURE__ */ z({
1603
1607
  inheritAttrs: !1,
1604
1608
  __name: "DialogContent",
1605
1609
  setup(e) {
1606
- const l = we(), t = p(() => l.class ?? ""), a = p(() => {
1607
- const { class: d, ...V } = l;
1610
+ const l = $e(), t = p(() => l.class ?? ""), a = p(() => {
1611
+ const { class: f, ...V } = l;
1608
1612
  return V;
1609
- }), n = Ze(), o = p(() => n.abierto.value), u = $(null), r = $(null);
1610
- let m = null;
1613
+ }), n = Ze(), o = p(() => n.abierto.value), u = w(null), r = w(null);
1614
+ let d = null;
1611
1615
  function b() {
1612
1616
  return r.value ? [...r.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')] : [];
1613
1617
  }
1614
- function f(d) {
1615
- if (d.key === "Escape") {
1618
+ function m(f) {
1619
+ if (f.key === "Escape") {
1616
1620
  n.cerrar();
1617
1621
  return;
1618
1622
  }
1619
- if (d.key !== "Tab") return;
1623
+ if (f.key !== "Tab") return;
1620
1624
  const V = b();
1621
1625
  if (V.length === 0) {
1622
- d.preventDefault(), r.value?.focus();
1626
+ f.preventDefault(), r.value?.focus();
1623
1627
  return;
1624
1628
  }
1625
- const j = V[0], w = V[V.length - 1], c = document.activeElement;
1626
- d.shiftKey && (c === j || c === r.value) ? (d.preventDefault(), w.focus()) : !d.shiftKey && c === w && (d.preventDefault(), j.focus());
1629
+ const j = V[0], $ = V[V.length - 1], c = document.activeElement;
1630
+ f.shiftKey && (c === j || c === r.value) ? (f.preventDefault(), $.focus()) : !f.shiftKey && c === $ && (f.preventDefault(), j.focus());
1627
1631
  }
1628
- function B(d) {
1629
- d.target === d.currentTarget && n.cerrar();
1632
+ function B(f) {
1633
+ f.target === f.currentTarget && n.cerrar();
1630
1634
  }
1631
- function D(d) {
1632
- u.value?.contains(d.target) || f(d);
1635
+ function D(f) {
1636
+ u.value?.contains(f.target) || m(f);
1633
1637
  }
1634
1638
  function L() {
1635
1639
  document.removeEventListener("keydown", D);
1636
1640
  }
1637
- function g() {
1638
- const d = m;
1639
- m = null, d?.isConnected && d.focus();
1641
+ function y() {
1642
+ const f = d;
1643
+ d = null, f?.isConnected && f.focus();
1640
1644
  }
1641
1645
  return K(
1642
1646
  o,
1643
- async (d) => {
1644
- if (d) {
1645
- m = document.activeElement, document.addEventListener("keydown", D), await Y(), r.value?.focus();
1647
+ async (f) => {
1648
+ if (f) {
1649
+ d = document.activeElement, document.addEventListener("keydown", D), await Y(), r.value?.focus();
1646
1650
  return;
1647
1651
  }
1648
- L(), g();
1652
+ L(), y();
1649
1653
  },
1650
1654
  // `watch` no corre para el valor inicial, y un diálogo se puede montar ya
1651
1655
  // abierto —una vista que arranca preguntando algo—. Sin esto, ése no recibe
1652
1656
  // el foco y ni Escape ni el Tab hacen nada: el `aria-modal` queda en promesa.
1653
1657
  { immediate: !0 }
1654
1658
  ), ve(() => {
1655
- L(), g();
1656
- }), (d, V) => (i(), Q(fe, { to: "body" }, [
1657
- O(ge, {
1659
+ L(), y();
1660
+ }), (f, V) => (i(), Q(fe, { to: "body" }, [
1661
+ O(ye, {
1658
1662
  "enter-active-class": "transition-opacity duration-200 ease-out",
1659
1663
  "leave-active-class": "transition-opacity duration-150 ease-in",
1660
1664
  "enter-from-class": "opacity-0",
@@ -1667,7 +1671,7 @@ const hl = /* @__PURE__ */ z({
1667
1671
  ref: u,
1668
1672
  class: "fixed inset-0 z-50 flex items-center justify-center",
1669
1673
  onClick: B,
1670
- onKeydown: f
1674
+ onKeydown: m
1671
1675
  }, [
1672
1676
  V[0] || (V[0] = E("div", { class: "absolute inset-0 bg-ui-border-dark/40" }, null, -1)),
1673
1677
  E("div", oe({
@@ -1683,7 +1687,7 @@ const hl = /* @__PURE__ */ z({
1683
1687
  "relative z-10 w-full max-w-lg rounded-corner border border-ui-border bg-ui-bg/80 p-6 text-tx-main shadow-lg"
1684
1688
  ]
1685
1689
  }), [
1686
- A(d.$slots, "default")
1690
+ A(f.$slots, "default")
1687
1691
  ], 16, xl)
1688
1692
  ], 544)) : h("", !0)
1689
1693
  ]),
@@ -1691,10 +1695,10 @@ const hl = /* @__PURE__ */ z({
1691
1695
  })
1692
1696
  ]));
1693
1697
  }
1694
- }), $l = { class: "text-sm text-tx-muted" }, wl = /* @__PURE__ */ z({
1698
+ }), wl = { class: "text-sm text-tx-muted" }, $l = /* @__PURE__ */ z({
1695
1699
  __name: "DialogDescription",
1696
1700
  setup(e) {
1697
- return (l, t) => (i(), s("p", $l, [
1701
+ return (l, t) => (i(), s("p", wl, [
1698
1702
  A(l.$slots, "default")
1699
1703
  ]));
1700
1704
  }
@@ -1715,7 +1719,7 @@ const hl = /* @__PURE__ */ z({
1715
1719
  }), Ll = ["id"], Tl = /* @__PURE__ */ z({
1716
1720
  __name: "DialogTitle",
1717
1721
  setup(e) {
1718
- const l = Ze(), t = yl();
1722
+ const l = Ze(), t = gl();
1719
1723
  return J(() => l.ponerElTitulo(t)), ve(() => l.ponerElTitulo(null)), (a, n) => (i(), s("h2", {
1720
1724
  id: q(t),
1721
1725
  class: "font-semibold text-lg leading-none tracking-tight"
@@ -1727,17 +1731,17 @@ const hl = /* @__PURE__ */ z({
1727
1731
  function he() {
1728
1732
  const e = pe(_e, null);
1729
1733
  if (e) return e;
1730
- const l = $(!1);
1734
+ const l = w(!1);
1731
1735
  return {
1732
1736
  abierto: l,
1733
1737
  idDelMenu: "vsk-menu-suelto",
1734
- idDeLaEtiqueta: $(null),
1738
+ idDeLaEtiqueta: w(null),
1735
1739
  ponerLaEtiqueta: () => {
1736
1740
  },
1737
- disparador: $(null),
1741
+ disparador: w(null),
1738
1742
  ponerElDisparador: () => {
1739
1743
  },
1740
- focoAlAbrir: $("ninguno"),
1744
+ focoAlAbrir: w("ninguno"),
1741
1745
  abrir: () => {
1742
1746
  l.value = !0;
1743
1747
  },
@@ -1760,53 +1764,53 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1760
1764
  },
1761
1765
  emits: ["update:open"],
1762
1766
  setup(e, { emit: l }) {
1763
- const t = e, a = l, n = $(!1), o = $(null), u = $(null), r = $("ninguno"), m = et();
1767
+ const t = e, a = l, n = w(!1), o = w(null), u = w(null), r = w("ninguno"), d = et();
1764
1768
  let b = null;
1765
- const f = p({
1769
+ const m = p({
1766
1770
  get: () => t.open ?? n.value,
1767
- set: (g) => {
1768
- t.open === void 0 && (n.value = g), a("update:open", g);
1771
+ set: (y) => {
1772
+ t.open === void 0 && (n.value = y), a("update:open", y);
1769
1773
  }
1770
1774
  });
1771
- K(f, (g) => {
1772
- if (g) {
1773
- const d = document.activeElement;
1774
- b = d instanceof HTMLElement ? d : null;
1775
+ K(m, (y) => {
1776
+ if (y) {
1777
+ const f = document.activeElement;
1778
+ b = f instanceof HTMLElement ? f : null;
1775
1779
  } else
1776
1780
  r.value = "ninguno";
1777
1781
  });
1778
- function B(g = "ninguno") {
1779
- r.value = g, f.value = !0;
1782
+ function B(y = "ninguno") {
1783
+ r.value = y, m.value = !0;
1780
1784
  }
1781
- function D(g = {}) {
1782
- if (f.value = !1, !g.devolverElFoco) return;
1783
- const d = b ?? o.value;
1784
- d?.isConnected && d.focus();
1785
+ function D(y = {}) {
1786
+ if (m.value = !1, !y.devolverElFoco) return;
1787
+ const f = b ?? o.value;
1788
+ f?.isConnected && f.focus();
1785
1789
  }
1786
- function L(g = "ninguno") {
1787
- if (f.value) {
1790
+ function L(y = "ninguno") {
1791
+ if (m.value) {
1788
1792
  D({ devolverElFoco: !0 });
1789
1793
  return;
1790
1794
  }
1791
- B(g);
1795
+ B(y);
1792
1796
  }
1793
1797
  return de(_e, {
1794
- abierto: f,
1795
- idDelMenu: m,
1798
+ abierto: m,
1799
+ idDelMenu: d,
1796
1800
  idDeLaEtiqueta: u,
1797
- ponerLaEtiqueta: (g) => {
1798
- u.value = g;
1801
+ ponerLaEtiqueta: (y) => {
1802
+ u.value = y;
1799
1803
  },
1800
1804
  disparador: o,
1801
- ponerElDisparador: (g) => {
1802
- o.value = g;
1805
+ ponerElDisparador: (y) => {
1806
+ o.value = y;
1803
1807
  },
1804
1808
  focoAlAbrir: r,
1805
1809
  abrir: B,
1806
1810
  cerrar: D,
1807
1811
  alternar: L
1808
- }), (g, d) => (i(), s("div", Bl, [
1809
- A(g.$slots, "default")
1812
+ }), (y, f) => (i(), s("div", Bl, [
1813
+ A(y.$slots, "default")
1810
1814
  ]));
1811
1815
  }
1812
1816
  }), Sl = ["id", "aria-labelledby", "inert"], Vl = {
@@ -1821,7 +1825,7 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1821
1825
  sideOffset: { default: 4 }
1822
1826
  },
1823
1827
  setup(e) {
1824
- const l = e, t = he(), { idDelMenu: a, idDeLaEtiqueta: n } = t, o = p(() => t.disparador.value), u = p(() => t.abierto.value), r = $(null), m = $({
1828
+ const l = e, t = he(), { idDelMenu: a, idDeLaEtiqueta: n } = t, o = p(() => t.disparador.value), u = p(() => t.abierto.value), r = w(null), d = w({
1825
1829
  top: 0,
1826
1830
  left: 0,
1827
1831
  techo: null
@@ -1831,28 +1835,28 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1831
1835
  left: "right",
1832
1836
  right: "left"
1833
1837
  };
1834
- function f(c, v) {
1835
- const y = l.sideOffset + X;
1838
+ function m(c, v) {
1839
+ const g = l.sideOffset + X;
1836
1840
  switch (c) {
1837
1841
  case "bottom":
1838
- return window.innerHeight - v.bottom - y;
1842
+ return window.innerHeight - v.bottom - g;
1839
1843
  case "top":
1840
- return v.top - y;
1844
+ return v.top - g;
1841
1845
  case "right":
1842
- return window.innerWidth - v.right - y;
1846
+ return window.innerWidth - v.right - g;
1843
1847
  case "left":
1844
- return v.left - y;
1848
+ return v.left - g;
1845
1849
  }
1846
1850
  }
1847
- function B(c, v, y) {
1848
- return y < v ? v : Math.min(Math.max(c, v), y);
1851
+ function B(c, v, g) {
1852
+ return g < v ? v : Math.min(Math.max(c, v), g);
1849
1853
  }
1850
1854
  function D() {
1851
1855
  if (!o.value || !r.value) return;
1852
- const c = o.value.getBoundingClientRect(), v = r.value.scrollHeight, y = r.value.offsetWidth, P = l.side === "top" || l.side === "bottom", _ = P ? v : y;
1856
+ const c = o.value.getBoundingClientRect(), v = r.value.scrollHeight, g = r.value.offsetWidth, P = l.side === "top" || l.side === "bottom", _ = P ? v : g;
1853
1857
  let U = l.side;
1854
- const ee = f(U, c);
1855
- ee < _ && f(b[U], c) > ee && (U = b[U]);
1858
+ const ee = m(U, c);
1859
+ ee < _ && m(b[U], c) > ee && (U = b[U]);
1856
1860
  let G = 0, T = 0, C = null;
1857
1861
  switch (U) {
1858
1862
  case "bottom": {
@@ -1860,12 +1864,12 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1860
1864
  break;
1861
1865
  }
1862
1866
  case "top": {
1863
- C = Math.max(f("top", c), 0), G = c.top - l.sideOffset - Math.min(v, C);
1867
+ C = Math.max(m("top", c), 0), G = c.top - l.sideOffset - Math.min(v, C);
1864
1868
  break;
1865
1869
  }
1866
1870
  case "left":
1867
1871
  case "right": {
1868
- T = U === "right" ? c.right + l.sideOffset : c.left - y - l.sideOffset;
1872
+ T = U === "right" ? c.right + l.sideOffset : c.left - g - l.sideOffset;
1869
1873
  const I = window.innerHeight - 2 * X;
1870
1874
  G = B(c.top, X, window.innerHeight - Math.min(v, I) - X), C = Math.max(window.innerHeight - G - X, 0);
1871
1875
  break;
@@ -1877,41 +1881,41 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1877
1881
  T = c.left;
1878
1882
  break;
1879
1883
  case "center":
1880
- T = c.left + c.width / 2 - y / 2;
1884
+ T = c.left + c.width / 2 - g / 2;
1881
1885
  break;
1882
1886
  case "end":
1883
- T = c.right - y;
1887
+ T = c.right - g;
1884
1888
  break;
1885
1889
  }
1886
- T = B(T, X, window.innerWidth - y - X), m.value = { top: G, left: T, techo: C };
1890
+ T = B(T, X, window.innerWidth - g - X), d.value = { top: G, left: T, techo: C };
1887
1891
  }
1888
1892
  function L() {
1889
1893
  return r.value ? Array.from(r.value.querySelectorAll('[role="menuitem"]')) : [];
1890
1894
  }
1891
- function g(c) {
1895
+ function y(c) {
1892
1896
  const v = L();
1893
1897
  if (!v.length) return;
1894
- const y = v.length;
1895
- v[(c % y + y) % y]?.focus();
1898
+ const g = v.length;
1899
+ v[(c % g + g) % g]?.focus();
1896
1900
  }
1897
- function d() {
1901
+ function f() {
1898
1902
  const c = document.activeElement;
1899
1903
  return c instanceof HTMLElement ? L().indexOf(c) : -1;
1900
1904
  }
1901
1905
  function V(c) {
1902
- const v = d();
1906
+ const v = f();
1903
1907
  switch (c.key) {
1904
1908
  case "ArrowDown":
1905
- c.preventDefault(), g(v + 1);
1909
+ c.preventDefault(), y(v + 1);
1906
1910
  break;
1907
1911
  case "ArrowUp":
1908
- c.preventDefault(), g(v <= 0 ? -1 : v - 1);
1912
+ c.preventDefault(), y(v <= 0 ? -1 : v - 1);
1909
1913
  break;
1910
1914
  case "Home":
1911
- c.preventDefault(), g(0);
1915
+ c.preventDefault(), y(0);
1912
1916
  break;
1913
1917
  case "End":
1914
- c.preventDefault(), g(-1);
1918
+ c.preventDefault(), y(-1);
1915
1919
  break;
1916
1920
  case "Escape":
1917
1921
  c.preventDefault(), c.stopPropagation(), t.cerrar({ devolverElFoco: !0 });
@@ -1927,10 +1931,10 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1927
1931
  D();
1928
1932
  }), t.focoAlAbrir.value) {
1929
1933
  case "primero":
1930
- g(0);
1934
+ y(0);
1931
1935
  break;
1932
1936
  case "ultimo":
1933
- g(-1);
1937
+ y(-1);
1934
1938
  break;
1935
1939
  // Abierto con el ratón: el foco va al menú y no a un ítem —no hay
1936
1940
  // ninguno elegido todavía—, que es lo que deja andar las flechas y el
@@ -1942,22 +1946,22 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1942
1946
  function j(c) {
1943
1947
  u.value && (c && r.value?.contains(c.target) || D());
1944
1948
  }
1945
- function w(c) {
1946
- const v = c.target, y = !!v.closest("[data-dropdown-content]"), P = !!o.value?.contains(v);
1947
- !y && !P && t.cerrar();
1949
+ function $(c) {
1950
+ const v = c.target, g = !!v.closest("[data-dropdown-content]"), P = !!o.value?.contains(v);
1951
+ !g && !P && t.cerrar();
1948
1952
  }
1949
1953
  return J(() => {
1950
- document.addEventListener("click", w), window.addEventListener("resize", j), window.addEventListener("scroll", j, !0);
1954
+ document.addEventListener("click", $), window.addEventListener("resize", j), window.addEventListener("scroll", j, !0);
1951
1955
  }), ce(() => {
1952
- document.removeEventListener("click", w), window.removeEventListener("resize", j), window.removeEventListener("scroll", j, !0);
1956
+ document.removeEventListener("click", $), window.removeEventListener("resize", j), window.removeEventListener("scroll", j, !0);
1953
1957
  }), (c, v) => (i(), Q(fe, { to: "body" }, [
1954
- O(ge, {
1958
+ O(ye, {
1955
1959
  "enter-active-class": "transition-all duration-150 ease-in-out",
1956
1960
  "leave-active-class": "transition-all duration-150 ease-in-out",
1957
1961
  "enter-from-class": "opacity-0 scale-95",
1958
1962
  "leave-to-class": "opacity-0 scale-95",
1959
- onEnter: v[1] || (v[1] = (y) => y.offsetHeight),
1960
- onLeave: v[2] || (v[2] = (y) => y.offsetHeight)
1963
+ onEnter: v[1] || (v[1] = (g) => g.offsetHeight),
1964
+ onLeave: v[2] || (v[2] = (g) => g.offsetHeight)
1961
1965
  }, {
1962
1966
  default: W(() => [
1963
1967
  Ce(E("div", oe({
@@ -1972,16 +1976,16 @@ const Bl = { class: "relative inline-block" }, Al = /* @__PURE__ */ z({
1972
1976
  inert: !u.value,
1973
1977
  style: {
1974
1978
  position: "fixed",
1975
- top: `${m.value.top}px`,
1976
- left: `${m.value.left}px`,
1977
- maxHeight: m.value.techo === null ? void 0 : `${m.value.techo}px`,
1979
+ top: `${d.value.top}px`,
1980
+ left: `${d.value.left}px`,
1981
+ maxHeight: d.value.techo === null ? void 0 : `${d.value.techo}px`,
1978
1982
  overflowY: "auto",
1979
1983
  overscrollBehavior: "contain",
1980
1984
  zIndex: 50
1981
1985
  },
1982
1986
  "data-dropdown-content": "",
1983
1987
  class: "min-w-30 rounded-corner border border-primary bg-ui-bg/80 shadow-lg focus:outline-none",
1984
- onClick: v[0] || (v[0] = (y) => y.stopPropagation()),
1988
+ onClick: v[0] || (v[0] = (g) => g.stopPropagation()),
1985
1989
  onKeydown: V
1986
1990
  }), [
1987
1991
  E("div", Vl, [
@@ -2075,35 +2079,35 @@ const Rl = z({
2075
2079
  disabled: { type: Boolean, default: !1 }
2076
2080
  },
2077
2081
  setup(e, { slots: l, attrs: t }) {
2078
- const a = he(), n = $(null);
2082
+ const a = he(), n = w(null);
2079
2083
  function o() {
2080
2084
  a.ponerElDisparador(ql(n.value));
2081
2085
  }
2082
2086
  function u() {
2083
2087
  e.disabled || (o(), a.alternar());
2084
2088
  }
2085
- function r(m) {
2089
+ function r(d) {
2086
2090
  if (!e.disabled)
2087
- switch (m.key) {
2091
+ switch (d.key) {
2088
2092
  case "Enter":
2089
2093
  case " ":
2090
- m.preventDefault(), o(), a.alternar("primero");
2094
+ d.preventDefault(), o(), a.alternar("primero");
2091
2095
  break;
2092
2096
  case "ArrowDown":
2093
- m.preventDefault(), o(), a.abrir("primero");
2097
+ d.preventDefault(), o(), a.abrir("primero");
2094
2098
  break;
2095
2099
  case "ArrowUp":
2096
- m.preventDefault(), o(), a.abrir("ultimo");
2100
+ d.preventDefault(), o(), a.abrir("ultimo");
2097
2101
  break;
2098
2102
  case "Escape":
2099
- a.abierto.value && (m.preventDefault(), a.cerrar({ devolverElFoco: !0 }));
2103
+ a.abierto.value && (d.preventDefault(), a.cerrar({ devolverElFoco: !0 }));
2100
2104
  break;
2101
2105
  }
2102
2106
  }
2103
2107
  return () => {
2104
- const m = {
2105
- ref: (f) => {
2106
- n.value = f, o();
2108
+ const d = {
2109
+ ref: (m) => {
2110
+ n.value = m, o();
2107
2111
  },
2108
2112
  "aria-haspopup": "menu",
2109
2113
  "aria-expanded": a.abierto.value ? "true" : "false",
@@ -2115,12 +2119,12 @@ const Rl = z({
2115
2119
  onKeydown: r
2116
2120
  }, b = l.default?.() ?? [];
2117
2121
  if (e.asChild) {
2118
- const f = tt(b);
2119
- if (f) return dt(f, { ...t, ...m });
2122
+ const m = tt(b);
2123
+ if (m) return dt(m, { ...t, ...d });
2120
2124
  }
2121
2125
  return ft(
2122
2126
  "div",
2123
- { ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...m },
2127
+ { ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...d },
2124
2128
  b
2125
2129
  );
2126
2130
  };
@@ -2145,7 +2149,7 @@ const Rl = z({
2145
2149
  A(l.$slots, "default", {}, void 0, !0)
2146
2150
  ], 2));
2147
2151
  }
2148
- }), Ul = /* @__PURE__ */ ye(Hl, [["__scopeId", "data-v-c0d9d9cb"]]), Wl = /* @__PURE__ */ z({
2152
+ }), Ul = /* @__PURE__ */ ge(Hl, [["__scopeId", "data-v-c0d9d9cb"]]), Wl = /* @__PURE__ */ z({
2149
2153
  __name: "ListCard",
2150
2154
  props: {
2151
2155
  clickable: { type: Boolean, default: !1 },
@@ -2169,7 +2173,7 @@ const Rl = z({
2169
2173
  A(o.$slots, "default", {}, void 0, !0)
2170
2174
  ], 2));
2171
2175
  }
2172
- }), Kl = /* @__PURE__ */ ye(Wl, [["__scopeId", "data-v-f86d47da"]]), Gl = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, Ql = ["title", "aria-label"], Yl = ["src"], Xl = {
2176
+ }), Kl = /* @__PURE__ */ ge(Wl, [["__scopeId", "data-v-f86d47da"]]), Gl = { class: "background rounded-corner flex flex-row items-center gap-2 justify-between w-full h-auto p-4 transition-all duration-200 hover:bg-ui-surface/80 dark:hover:bg-ui-surface-dark/80" }, Ql = ["title", "aria-label"], Yl = ["src"], Xl = {
2173
2177
  key: 1,
2174
2178
  class: "w-8 h-8 flex items-center justify-center"
2175
2179
  }, Jl = ["src"], Zl = ["min", "max", "value", "aria-label", "aria-valuetext"], _l = /* @__PURE__ */ z({
@@ -2189,15 +2193,15 @@ const Rl = z({
2189
2193
  setup(e, { emit: l }) {
2190
2194
  const t = e, a = l, n = p(() => {
2191
2195
  if (t.max <= t.min) return 0;
2192
- const m = t.max - t.min, b = t.modelValue - t.min;
2193
- return Math.round(b / m * 100);
2194
- }), o = p(() => t.getPercentageClass ? t.getPercentageClass(n.value) : ""), u = (m) => {
2195
- const b = m.target;
2196
+ const d = t.max - t.min, b = t.modelValue - t.min;
2197
+ return Math.round(b / d * 100);
2198
+ }), o = p(() => t.getPercentageClass ? t.getPercentageClass(n.value) : ""), u = (d) => {
2199
+ const b = d.target;
2196
2200
  a("update:modelValue", Number(b.value));
2197
2201
  }, r = () => {
2198
2202
  a("buttonClick");
2199
2203
  };
2200
- return (m, b) => (i(), s("div", Gl, [
2204
+ return (d, b) => (i(), s("div", Gl, [
2201
2205
  e.showButton ? (i(), s("button", {
2202
2206
  key: 0,
2203
2207
  onClick: r,
@@ -2381,10 +2385,10 @@ const Rl = z({
2381
2385
  function lt() {
2382
2386
  const e = pe(at, null);
2383
2387
  if (e) return e;
2384
- const l = $(!1);
2388
+ const l = w(!1);
2385
2389
  return {
2386
2390
  abierto: p(() => l.value),
2387
- disparador: $(null),
2391
+ disparador: w(null),
2388
2392
  ponerElDisparador: () => {
2389
2393
  },
2390
2394
  abrir: () => {
@@ -2402,7 +2406,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2402
2406
  delayDuration: { default: 200 }
2403
2407
  },
2404
2408
  setup(e) {
2405
- const l = e, t = $(!1), a = $(null);
2409
+ const l = e, t = w(!1), a = w(null);
2406
2410
  let n = null;
2407
2411
  function o() {
2408
2412
  l.disabled || (n = setTimeout(() => {
@@ -2420,7 +2424,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2420
2424
  },
2421
2425
  abrir: o,
2422
2426
  cerrar: u
2423
- }), (r, m) => (i(), s("div", dn, [
2427
+ }), (r, d) => (i(), s("div", dn, [
2424
2428
  A(r.$slots, "default")
2425
2429
  ]));
2426
2430
  }
@@ -2433,32 +2437,32 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2433
2437
  sideOffset: { default: 4 }
2434
2438
  },
2435
2439
  setup(e) {
2436
- const l = we(), t = p(() => l.class ?? ""), a = e, n = lt(), o = p(() => n.abierto.value), u = $(null), r = $({ top: 0, left: 0 });
2437
- function m() {
2440
+ const l = $e(), t = p(() => l.class ?? ""), a = e, n = lt(), o = p(() => n.abierto.value), u = w(null), r = w({ top: 0, left: 0 });
2441
+ function d() {
2438
2442
  const b = n.disparador.value;
2439
2443
  if (!b || !u.value) return;
2440
- const f = b.getBoundingClientRect(), B = u.value.getBoundingClientRect();
2444
+ const m = b.getBoundingClientRect(), B = u.value.getBoundingClientRect();
2441
2445
  let D = 0, L = 0;
2442
2446
  switch (a.side) {
2443
2447
  case "bottom":
2444
- D = f.bottom + a.sideOffset, L = f.left + f.width / 2 - B.width / 2;
2448
+ D = m.bottom + a.sideOffset, L = m.left + m.width / 2 - B.width / 2;
2445
2449
  break;
2446
2450
  case "top":
2447
- D = f.top - B.height - a.sideOffset, L = f.left + f.width / 2 - B.width / 2;
2451
+ D = m.top - B.height - a.sideOffset, L = m.left + m.width / 2 - B.width / 2;
2448
2452
  break;
2449
2453
  case "left":
2450
- L = f.left - B.width - a.sideOffset, D = f.top + f.height / 2 - B.height / 2;
2454
+ L = m.left - B.width - a.sideOffset, D = m.top + m.height / 2 - B.height / 2;
2451
2455
  break;
2452
2456
  case "right":
2453
- L = f.right + a.sideOffset, D = f.top + f.height / 2 - B.height / 2;
2457
+ L = m.right + a.sideOffset, D = m.top + m.height / 2 - B.height / 2;
2454
2458
  break;
2455
2459
  }
2456
2460
  r.value = { top: D, left: L };
2457
2461
  }
2458
2462
  return K(o, async (b) => {
2459
- b && (await Y(), requestAnimationFrame(m));
2460
- }), (b, f) => (i(), Q(fe, { to: "body" }, [
2461
- O(ge, {
2463
+ b && (await Y(), requestAnimationFrame(d));
2464
+ }), (b, m) => (i(), Q(fe, { to: "body" }, [
2465
+ O(ye, {
2462
2466
  "enter-active-class": "transition-all duration-200 ease-in-out",
2463
2467
  "leave-active-class": "transition-all duration-200 ease-in-out",
2464
2468
  "enter-from-class": "opacity-0 scale-95",
@@ -2486,7 +2490,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2486
2490
  }), bn = /* @__PURE__ */ z({
2487
2491
  __name: "TooltipTrigger",
2488
2492
  setup(e) {
2489
- const l = lt(), t = $(null);
2493
+ const l = lt(), t = w(null);
2490
2494
  function a() {
2491
2495
  return t.value ? t.value.firstElementChild ?? t.value : null;
2492
2496
  }
@@ -2507,10 +2511,10 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2507
2511
  A(o.$slots, "default")
2508
2512
  ], 544));
2509
2513
  }
2510
- }), vn = ["title"], pn = ["src", "alt"], gn = {
2514
+ }), vn = ["title"], pn = ["src", "alt"], yn = {
2511
2515
  key: 0,
2512
2516
  class: "absolute bottom-1 right-1 bg-primary dark:bg-primary-dark text-white text-xs rounded-full w-4 h-4 flex items-center justify-center font-bold animate-bounce"
2513
- }, yn = /* @__PURE__ */ z({
2517
+ }, gn = /* @__PURE__ */ z({
2514
2518
  __name: "TrayIconButton",
2515
2519
  props: {
2516
2520
  icon: {},
@@ -2525,7 +2529,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2525
2529
  },
2526
2530
  emits: ["click"],
2527
2531
  setup(e, { emit: l }) {
2528
- const t = l, a = $(!1), n = () => {
2532
+ const t = l, a = w(!1), n = () => {
2529
2533
  t("click");
2530
2534
  };
2531
2535
  return (o, u) => (i(), s("div", {
@@ -2540,7 +2544,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2540
2544
  alt: e.alt,
2541
2545
  class: x(["m-auto h-5.5 w-auto transition-all duration-300", e.iconClass])
2542
2546
  }, null, 10, pn),
2543
- e.badge !== null && e.badge > 0 ? (i(), s("div", gn, S(e.badge), 1)) : h("", !0),
2547
+ e.badge !== null && e.badge > 0 ? (i(), s("div", yn, S(e.badge), 1)) : h("", !0),
2544
2548
  e.showCustomTooltip && e.customTooltipText ? (i(), s("div", {
2545
2549
  key: 1,
2546
2550
  class: x(["absolute top-1 left-1/2 transform -translate-x-1/2 text-xs font-semibold p-1 rounded-corner transition-all duration-300 pointer-events-none background", [
@@ -2575,10 +2579,10 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2575
2579
  Qe,
2576
2580
  Na,
2577
2581
  rl,
2578
- gl,
2582
+ yl,
2579
2583
  hl,
2580
2584
  kl,
2581
- wl,
2585
+ $l,
2582
2586
  zl,
2583
2587
  Dl,
2584
2588
  Tl,
@@ -2598,7 +2602,7 @@ const dn = { class: "inline-block" }, fn = /* @__PURE__ */ z({
2598
2602
  fn,
2599
2603
  mn,
2600
2604
  bn,
2601
- yn
2605
+ gn
2602
2606
  ], En = {
2603
2607
  install(e) {
2604
2608
  hn.forEach((l) => {
@@ -2617,10 +2621,10 @@ export {
2617
2621
  at as CLAVE_DEL_TOOLTIP,
2618
2622
  Ee as CLAVE_DE_LA_BARRA,
2619
2623
  rl as ConfigSection,
2620
- gl as DeviceCard,
2624
+ yl as DeviceCard,
2621
2625
  hl as Dialog,
2622
2626
  kl as DialogContent,
2623
- wl as DialogDescription,
2627
+ $l as DialogDescription,
2624
2628
  zl as DialogFooter,
2625
2629
  Dl as DialogHeader,
2626
2630
  Tl as DialogTitle,
@@ -2655,14 +2659,14 @@ export {
2655
2659
  fn as Tooltip,
2656
2660
  mn as TooltipContent,
2657
2661
  bn as TooltipTrigger,
2658
- yn as TrayIconButton,
2662
+ gn as TrayIconButton,
2659
2663
  We as WindowControls,
2660
2664
  ra as WindowFrame,
2661
2665
  Ga as buscarOpciones,
2662
2666
  En as default,
2663
2667
  Jt as esPosicion,
2664
2668
  zn as olvidarLosIconosDelTema,
2665
- $e as orientacionDe,
2669
+ we as orientacionDe,
2666
2670
  ea as posicionDe,
2667
2671
  Xe as rolDelTono,
2668
2672
  Ze as usarElDialogo,