@vasakgroup/vue-libvasak 1.8.0 → 1.9.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,4 +1,4 @@
1
- import { ref as w, onMounted as W, onUnmounted as ve, readonly as vt, watch as Q, defineComponent as D, toRef as Pe, useTemplateRef as pt, computed as v, createElementBlock as s, unref as F, openBlock as i, normalizeStyle as fe, createCommentVNode as x, createElementVNode as B, createVNode as j, toDisplayString as V, normalizeClass as y, renderSlot as S, createBlock as U, onBeforeUnmount as pe, Fragment as te, renderList as ce, withCtx as G, mergeModels as Re, useAttrs as Be, useId as yt, useModel as gt, withDirectives as Se, mergeProps as le, isRef as ht, vModelSelect as xt, inject as we, getCurrentInstance as Ge, provide as ye, createTextVNode as $e, toHandlers as Qe, createSlots as wt, withModifiers as M, withKeys as I, Teleport as ge, Transition as ke, nextTick as J, TransitionGroup as $t, vShow as Ye, cloneVNode as kt, h as Ct, Comment as zt, Text as Et, resolveDynamicComponent as Lt } from "vue";
1
+ import { ref as w, onMounted as W, onUnmounted as ve, readonly as vt, watch as Q, defineComponent as D, toRef as Pe, useTemplateRef as pt, computed as v, createElementBlock as s, unref as F, openBlock as i, normalizeStyle as fe, createCommentVNode as x, createElementVNode as B, createVNode as j, toDisplayString as V, normalizeClass as y, renderSlot as S, createBlock as K, onBeforeUnmount as pe, Fragment as te, renderList as ce, withCtx as G, mergeModels as Re, useAttrs as Be, useId as yt, useModel as gt, withDirectives as Se, mergeProps as le, isRef as ht, vModelSelect as xt, inject as we, getCurrentInstance as Ge, provide as ye, createTextVNode as $e, toHandlers as Qe, createSlots as wt, withModifiers as M, withKeys as I, Teleport as ge, Transition as ke, nextTick as J, TransitionGroup as $t, vShow as Ye, cloneVNode as kt, h as Ct, Comment as zt, Text as Et, resolveDynamicComponent as Lt } from "vue";
2
2
  import { listen as Dt } from "@tauri-apps/api/event";
3
3
  import { getSymbolSource as Tt, getIconSource as At } from "@vasakgroup/plugin-vicons";
4
4
  import { getCurrentWindow as Bt } from "@tauri-apps/api/window";
@@ -72,7 +72,7 @@ function Je() {
72
72
  function Te() {
73
73
  ue--, !(ue > 0) && (ue = 0, be?.(), be = null);
74
74
  }
75
- function Ut(e, n) {
75
+ function Kt(e, n) {
76
76
  const t = `${n}:${e}`, a = xe.get(t);
77
77
  if (a !== void 0)
78
78
  return Promise.resolve(a);
@@ -92,20 +92,20 @@ function Jl() {
92
92
  e || (e = !0, Te());
93
93
  }), vt(me);
94
94
  }
95
- function Kt(e, n) {
95
+ function Ut(e, n) {
96
96
  const t = w("");
97
97
  let a = !1, l = 0;
98
98
  const o = jt(async () => {
99
99
  await r();
100
100
  });
101
101
  async function r() {
102
- const u = ++l, d = e.value;
103
- if (!d) {
102
+ const u = ++l, m = e.value;
103
+ if (!m) {
104
104
  t.value = "";
105
105
  return;
106
106
  }
107
- const m = await Ut(d, n.value);
108
- u === l && !a && (t.value = m);
107
+ const c = await Kt(m, n.value);
108
+ u === l && !a && (t.value = c);
109
109
  }
110
110
  return W(async () => {
111
111
  await Je(), a || await r();
@@ -122,7 +122,7 @@ const Wt = ["src", "alt"], N = /* @__PURE__ */ D({
122
122
  alt: { default: "" }
123
123
  },
124
124
  setup(e) {
125
- const n = e, { fuente: t, mirarElemento: a } = Kt(Pe(n, "name"), Pe(n, "type")), l = pt("dibujo");
125
+ const n = e, { fuente: t, mirarElemento: a } = Ut(Pe(n, "name"), Pe(n, "type")), l = pt("dibujo");
126
126
  Q(l, (r) => a(r), { immediate: !0 });
127
127
  const o = v(
128
128
  () => n.size === "auto" ? void 0 : { width: `${n.size}px`, height: `${n.size}px` }
@@ -216,7 +216,7 @@ const Wt = ["src", "alt"], N = /* @__PURE__ */ D({
216
216
  class: y(["flex h-8 w-8 shrink-0 items-center justify-center rounded-corner font-semibold text-xs uppercase tracking-wide", e.active ? "border-secondary bg-primary/20" : ""]),
217
217
  "aria-hidden": "true"
218
218
  }, [
219
- e.icon ? (i(), U(N, {
219
+ e.icon ? (i(), K(N, {
220
220
  key: 0,
221
221
  name: e.icon,
222
222
  size: 20
@@ -255,92 +255,92 @@ const Wt = ["src", "alt"], N = /* @__PURE__ */ D({
255
255
  emits: ["update:modelValue", "update:collapsed", "change"],
256
256
  setup(e, { expose: n, emit: t }) {
257
257
  const a = e, l = t, o = w(a.collapsed ?? !1), r = w(!1);
258
- let u = null, d = null;
259
- const m = v(() => r.value || o.value), f = v(() => !!(a.title || a.subtitle));
258
+ let u = null, m = null;
259
+ const c = v(() => r.value || o.value), f = v(() => !!(a.title || a.subtitle));
260
260
  v(() => a.categories.length > 0);
261
- function E() {
261
+ function k() {
262
262
  return document.documentElement?.clientWidth || window.innerWidth;
263
263
  }
264
264
  function L() {
265
- r.value = E() <= Ne;
265
+ r.value = k() <= Ne;
266
266
  }
267
267
  function A() {
268
268
  o.value = !o.value, l("update:collapsed", o.value);
269
269
  }
270
- function g(k) {
271
- l("update:modelValue", k), l("change", k);
270
+ function g(C) {
271
+ l("update:modelValue", C), l("change", C);
272
272
  }
273
273
  return Q(
274
274
  () => a.collapsed,
275
- (k) => {
276
- k !== void 0 && (o.value = k);
275
+ (C) => {
276
+ C !== void 0 && (o.value = C);
277
277
  }
278
278
  ), W(() => {
279
- u = window.matchMedia(`(max-width: ${Ne}px)`), L(), u.addEventListener("change", L), window.addEventListener("resize", L), typeof ResizeObserver < "u" && document.documentElement && (d = new ResizeObserver(L), d.observe(document.documentElement));
279
+ u = window.matchMedia(`(max-width: ${Ne}px)`), L(), u.addEventListener("change", L), window.addEventListener("resize", L), typeof ResizeObserver < "u" && document.documentElement && (m = new ResizeObserver(L), m.observe(document.documentElement));
280
280
  }), pe(() => {
281
- u?.removeEventListener("change", L), window.removeEventListener("resize", L), d?.disconnect(), d = null;
282
- }), n({ collapsed: m }), (k, P) => (i(), s("aside", {
283
- class: y(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-[width] duration-300", ["w-[84px]", m.value ? "md:w-[84px]" : "md:w-72"]])
281
+ u?.removeEventListener("change", L), window.removeEventListener("resize", L), m?.disconnect(), m = null;
282
+ }), n({ collapsed: c }), (C, P) => (i(), s("aside", {
283
+ class: y(["relative z-30 flex h-full shrink-0 flex-col rounded-corner border border-ui-border bg-ui-surface/70 transition-[width] duration-300", ["w-[84px]", c.value ? "md:w-[84px]" : "md:w-72"]])
284
284
  }, [
285
- f.value || k.$slots.header ? (i(), s("header", ea, [
285
+ f.value || C.$slots.header ? (i(), s("header", ea, [
286
286
  B("div", ta, [
287
287
  B("button", {
288
288
  type: "button",
289
289
  class: y(Fe),
290
- "aria-label": m.value ? e.expandLabel : e.collapseLabel,
291
- "aria-expanded": !m.value,
290
+ "aria-label": c.value ? e.expandLabel : e.collapseLabel,
291
+ "aria-expanded": !c.value,
292
292
  onClick: A
293
293
  }, [
294
294
  j(N, {
295
- name: m.value ? "pan-end-symbolic" : "pan-start-symbolic",
295
+ name: c.value ? "pan-end-symbolic" : "pan-start-symbolic",
296
296
  type: "symbol",
297
297
  size: 16
298
298
  }, null, 8, ["name"])
299
299
  ], 8, aa),
300
- f.value && !m.value ? (i(), s("div", na, [
300
+ f.value && !c.value ? (i(), s("div", na, [
301
301
  e.title ? (i(), s("p", la, V(e.title), 1)) : x("", !0),
302
302
  e.subtitle ? (i(), s("p", oa, V(e.subtitle), 1)) : x("", !0)
303
303
  ])) : x("", !0)
304
304
  ]),
305
- k.$slots.header && !m.value ? (i(), s("div", ia, [
306
- S(k.$slots, "header", { collapsed: m.value })
305
+ C.$slots.header && !c.value ? (i(), s("div", ia, [
306
+ S(C.$slots, "header", { collapsed: c.value })
307
307
  ])) : x("", !0)
308
308
  ])) : (i(), s("div", sa, [
309
309
  B("button", {
310
310
  type: "button",
311
311
  class: y(Fe),
312
- "aria-label": m.value ? e.expandLabel : e.collapseLabel,
313
- "aria-expanded": !m.value,
312
+ "aria-label": c.value ? e.expandLabel : e.collapseLabel,
313
+ "aria-expanded": !c.value,
314
314
  onClick: A
315
315
  }, [
316
316
  j(N, {
317
- name: m.value ? "pan-end-symbolic" : "pan-start-symbolic",
317
+ name: c.value ? "pan-end-symbolic" : "pan-start-symbolic",
318
318
  type: "symbol",
319
319
  size: 16
320
320
  }, null, 8, ["name"])
321
321
  ], 8, ra)
322
322
  ])),
323
323
  B("div", ua, [
324
- (i(!0), s(te, null, ce(e.categories, (C) => (i(), U(Ze, {
325
- key: C.id,
326
- title: C.title,
327
- collapsed: m.value
324
+ (i(!0), s(te, null, ce(e.categories, (z) => (i(), K(Ze, {
325
+ key: z.id,
326
+ title: z.title,
327
+ collapsed: c.value
328
328
  }, {
329
329
  default: G(() => [
330
- (i(!0), s(te, null, ce(C.items, (h) => (i(), U(_e, {
330
+ (i(!0), s(te, null, ce(z.items, (h) => (i(), K(_e, {
331
331
  key: h.id,
332
332
  label: h.label,
333
333
  icon: h.icon,
334
334
  badge: h.badge,
335
335
  disabled: h.disabled,
336
- collapsed: m.value,
336
+ collapsed: c.value,
337
337
  active: e.modelValue === h.id,
338
- onClick: (c) => g(h.id)
338
+ onClick: (d) => g(h.id)
339
339
  }, null, 8, ["label", "icon", "badge", "disabled", "collapsed", "active", "onClick"]))), 128))
340
340
  ]),
341
341
  _: 2
342
342
  }, 1032, ["title", "collapsed"]))), 128)),
343
- S(k.$slots, "default", { collapsed: m.value })
343
+ S(C.$slots, "default", { collapsed: c.value })
344
344
  ])
345
345
  ], 2));
346
346
  }
@@ -357,12 +357,12 @@ const Wt = ["src", "alt"], N = /* @__PURE__ */ D({
357
357
  }),
358
358
  emits: /* @__PURE__ */ Re(["change"], ["update:modelValue"]),
359
359
  setup(e, { emit: n }) {
360
- const t = e, a = Be(), l = yt(), o = v(() => a.id ?? l), r = n, [u, d] = gt(e, "modelValue", {
361
- set(m) {
362
- return d.number ? Number(m) : m;
360
+ const t = e, a = Be(), l = yt(), o = v(() => a.id ?? l), r = n, [u, m] = gt(e, "modelValue", {
361
+ set(c) {
362
+ return m.number ? Number(c) : c;
363
363
  }
364
364
  });
365
- return (m, f) => (i(), s("div", da, [
365
+ return (c, f) => (i(), s("div", da, [
366
366
  t.label ? (i(), s("label", {
367
367
  key: 0,
368
368
  for: o.value,
@@ -371,12 +371,12 @@ const Wt = ["src", "alt"], N = /* @__PURE__ */ D({
371
371
  B("div", ma, [
372
372
  Se(B("select", le({
373
373
  id: o.value,
374
- "onUpdate:modelValue": f[0] || (f[0] = (E) => ht(u) ? u.value = E : null),
374
+ "onUpdate:modelValue": f[0] || (f[0] = (k) => ht(u) ? u.value = k : null),
375
375
  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"
376
376
  }, F(a), {
377
- onChange: f[1] || (f[1] = (E) => r("change", E))
377
+ onChange: f[1] || (f[1] = (k) => r("change", k))
378
378
  }), [
379
- S(m.$slots, "default")
379
+ S(c.$slots, "default")
380
380
  ], 16, ba), [
381
381
  [xt, F(u)]
382
382
  ]),
@@ -457,7 +457,7 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
457
457
  },
458
458
  emits: ["minimize", "maximize", "close"],
459
459
  setup(e, { emit: n }) {
460
- const t = e, { t: a } = St(), l = v(() => t.minimizeLabel ?? a("ventana.minimizar")), o = v(() => t.maximizeLabel ?? a("ventana.maximizar")), r = v(() => t.closeLabel ?? a("ventana.cerrar")), u = n, { vertical: d } = he(), m = v(() => ({
460
+ const t = e, { t: a } = St(), l = v(() => t.minimizeLabel ?? a("ventana.minimizar")), o = v(() => t.maximizeLabel ?? a("ventana.maximizar")), r = v(() => t.closeLabel ?? a("ventana.cerrar")), u = n, { vertical: m } = he(), c = v(() => ({
461
461
  minimize: t.controls.includes("minimize"),
462
462
  maximize: t.controls.includes("maximize"),
463
463
  close: t.controls.includes("close")
@@ -465,9 +465,9 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
465
465
  function f() {
466
466
  return Bt();
467
467
  }
468
- const E = Ge();
468
+ const k = Ge();
469
469
  function L(P) {
470
- return !!E?.vnode.props?.[`on${P}`];
470
+ return !!k?.vnode.props?.[`on${P}`];
471
471
  }
472
472
  function A() {
473
473
  if (L("Minimize")) return u("minimize");
@@ -477,22 +477,22 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
477
477
  if (L("Maximize")) return u("maximize");
478
478
  f().toggleMaximize();
479
479
  }
480
- function k() {
480
+ function C() {
481
481
  if (L("Close")) return u("close");
482
482
  f().close();
483
483
  }
484
- return (P, C) => e.controls.length ? (i(), s("div", {
484
+ return (P, z) => e.controls.length ? (i(), s("div", {
485
485
  key: 0,
486
- class: y(["flex shrink-0 gap-1", F(d) ? "flex-col" : ""]),
486
+ class: y(["flex shrink-0 gap-1", F(m) ? "flex-col" : ""]),
487
487
  "data-tauri-drag-region": ""
488
488
  }, [
489
- m.value.minimize ? (i(), s("button", {
489
+ c.value.minimize ? (i(), s("button", {
490
490
  key: 0,
491
491
  type: "button",
492
492
  class: y([Ee, "hover:bg-status-success"]),
493
493
  title: l.value,
494
494
  "aria-label": l.value,
495
- onClick: C[0] || (C[0] = (h) => A())
495
+ onClick: z[0] || (z[0] = (h) => A())
496
496
  }, [
497
497
  j(N, {
498
498
  name: "window-minimize",
@@ -500,13 +500,13 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
500
500
  size: 24
501
501
  })
502
502
  ], 10, $a)) : x("", !0),
503
- m.value.maximize ? (i(), s("button", {
503
+ c.value.maximize ? (i(), s("button", {
504
504
  key: 1,
505
505
  type: "button",
506
506
  class: y([Ee, "hover:bg-status-warning"]),
507
507
  title: o.value,
508
508
  "aria-label": o.value,
509
- onClick: C[1] || (C[1] = (h) => g())
509
+ onClick: z[1] || (z[1] = (h) => g())
510
510
  }, [
511
511
  j(N, {
512
512
  name: "window-maximize",
@@ -514,13 +514,13 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
514
514
  size: 24
515
515
  })
516
516
  ], 10, ka)) : x("", !0),
517
- m.value.close ? (i(), s("button", {
517
+ c.value.close ? (i(), s("button", {
518
518
  key: 2,
519
519
  type: "button",
520
520
  class: y([Ee, "hover:bg-status-error"]),
521
521
  title: r.value,
522
522
  "aria-label": r.value,
523
- onClick: C[2] || (C[2] = (h) => k())
523
+ onClick: z[2] || (z[2] = (h) => C())
524
524
  }, [
525
525
  j(N, {
526
526
  name: "window-close",
@@ -618,10 +618,10 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
618
618
  left: "flex-row",
619
619
  right: "flex-row-reverse"
620
620
  };
621
- return (u, d) => (i(), s("div", {
621
+ return (u, m) => (i(), s("div", {
622
622
  class: y(["flex h-screen w-screen overflow-hidden rounded-corner-window border border-ui-border bg-ui-bg/80", r[a.value]])
623
623
  }, [
624
- e.hideBar ? x("", !0) : (i(), U(at, le({
624
+ e.hideBar ? x("", !0) : (i(), K(at, le({
625
625
  key: 0,
626
626
  position: a.value,
627
627
  title: e.title,
@@ -690,44 +690,44 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
690
690
  },
691
691
  emits: ["select", "close", "menu", "mover", "navegar"],
692
692
  setup(e, { emit: n }) {
693
- const t = e, a = n, { vertical: l, posicion: o } = he(), r = w(null), u = w(null), d = w(!1), m = w(!1), f = w(!1), E = w({ top: 0, left: 0, right: 0 });
693
+ const t = e, a = n, { vertical: l, posicion: o } = he(), r = w(null), u = w(null), m = w(!1), c = w(!1), f = w(!1), k = w({ top: 0, left: 0, right: 0 });
694
694
  let L = null, A = null;
695
- const g = v(() => t.tab.closable !== !1), k = v(() => t.tab.tooltip ?? t.tab.label), P = v(
695
+ const g = v(() => t.tab.closable !== !1), C = v(() => t.tab.tooltip ?? t.tab.label), P = v(
696
696
  () => t.tab.dirty ? `${t.tab.label} · ${t.dirtyLabel}` : t.tab.label
697
- ), C = v(() => t.tab.label.trim().charAt(0).toUpperCase()), h = v(() => d.value || f.value), c = v(
697
+ ), z = v(() => t.tab.label.trim().charAt(0).toUpperCase()), h = v(() => m.value || f.value), d = v(
698
698
  () => !!t.tab.dirty && !(h.value && g.value)
699
699
  ), b = v(
700
700
  () => g.value && (h.value || t.active || !t.tab.dirty)
701
701
  ), p = v(
702
- () => l.value && (d.value || m.value || f.value)
702
+ () => l.value && (m.value || c.value || f.value)
703
703
  ), R = v(() => {
704
- const q = { position: "fixed", top: `${E.value.top}px`, zIndex: 50 };
705
- return o.value === "right" ? { ...q, right: `${E.value.right + He}px` } : { ...q, left: `${E.value.left + He}px` };
704
+ const q = { position: "fixed", top: `${k.value.top}px`, zIndex: 50 };
705
+ return o.value === "right" ? { ...q, right: `${k.value.right + He}px` } : { ...q, left: `${k.value.left + He}px` };
706
706
  });
707
707
  function oe() {
708
708
  const q = r.value;
709
709
  if (!q) return;
710
710
  const $ = q.getBoundingClientRect();
711
- E.value = {
711
+ k.value = {
712
712
  top: $.top,
713
713
  left: $.right,
714
714
  right: window.innerWidth - $.left
715
715
  };
716
716
  }
717
- function K(q) {
717
+ function U(q) {
718
718
  const $ = q.relatedTarget;
719
719
  $ && u.value?.contains($) || (f.value = !1);
720
720
  }
721
721
  function ie() {
722
- d.value = !0, oe();
722
+ m.value = !0, oe();
723
723
  }
724
724
  function Y() {
725
- m.value = !0, oe();
725
+ c.value = !0, oe();
726
726
  }
727
727
  function T() {
728
728
  L !== null && clearTimeout(L), L = null, A = null;
729
729
  }
730
- function z(q) {
730
+ function E(q) {
731
731
  q.button === 0 && (A = { x: q.clientX, y: q.clientY }, L = setTimeout(() => {
732
732
  A && a("menu", A), T();
733
733
  }, Oa));
@@ -751,7 +751,7 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
751
751
  ]]),
752
752
  role: "tab",
753
753
  "aria-selected": e.active,
754
- title: k.value,
754
+ title: C.value,
755
755
  "aria-label": P.value,
756
756
  tabindex: e.tabindex,
757
757
  onClick: $[5] || ($[5] = M((H) => a("select"), ["stop"])),
@@ -772,23 +772,23 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
772
772
  ],
773
773
  onAuxclick: M(de, ["stop"]),
774
774
  onContextmenu: bt,
775
- onPointerdown: z,
775
+ onPointerdown: E,
776
776
  onPointermove: O,
777
777
  onPointerup: T,
778
778
  onPointerleave: T,
779
779
  onMouseenter: ie,
780
- onMouseleave: $[19] || ($[19] = (H) => d.value = !1),
780
+ onMouseleave: $[19] || ($[19] = (H) => m.value = !1),
781
781
  onFocus: Y,
782
- onBlur: $[20] || ($[20] = (H) => m.value = !1)
782
+ onBlur: $[20] || ($[20] = (H) => c.value = !1)
783
783
  }, [
784
- e.tab.icon ? (i(), U(N, {
784
+ e.tab.icon ? (i(), K(N, {
785
785
  key: 0,
786
786
  name: e.tab.icon,
787
787
  size: 16,
788
788
  class: "shrink-0"
789
- }, null, 8, ["name"])) : F(l) ? (i(), s("span", Aa, V(C.value), 1)) : x("", !0),
789
+ }, null, 8, ["name"])) : F(l) ? (i(), s("span", Aa, V(z.value), 1)) : x("", !0),
790
790
  F(l) ? x("", !0) : (i(), s("span", Ba, V(e.tab.label), 1)),
791
- c.value ? (i(), s("span", {
791
+ d.value ? (i(), s("span", {
792
792
  key: 3,
793
793
  class: y(["size-2 shrink-0 rounded-full bg-current", F(l) ? "absolute right-0.5 top-0.5" : ""]),
794
794
  "aria-hidden": "true"
@@ -806,7 +806,7 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
806
806
  size: 12
807
807
  })
808
808
  ], 8, Sa)) : x("", !0),
809
- (i(), U(ge, { to: "body" }, [
809
+ (i(), K(ge, { to: "body" }, [
810
810
  j(ke, {
811
811
  "enter-active-class": "transition duration-150 ease-out",
812
812
  "enter-from-class": "opacity-0 scale-95",
@@ -823,7 +823,7 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
823
823
  onMouseenter: $[2] || ($[2] = (H) => f.value = !0),
824
824
  onMouseleave: $[3] || ($[3] = (H) => f.value = !1),
825
825
  onFocusin: $[4] || ($[4] = (H) => f.value = !0),
826
- onFocusout: K
826
+ onFocusout: U
827
827
  }, [
828
828
  B("span", Ma, V(e.tab.label), 1),
829
829
  e.tab.dirty ? (i(), s("span", Va)) : x("", !0),
@@ -860,48 +860,48 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
860
860
  },
861
861
  emits: ["update:modelValue", "select", "close", "new", "reorder", "menu"],
862
862
  setup(e, { emit: n }) {
863
- const t = e, a = n, { vertical: l } = he(), o = w(null), r = w(0), u = w(null), d = w(null);
864
- function m(h) {
863
+ const t = e, a = n, { vertical: l } = he(), o = w(null), r = w(0), u = w(null), m = w(null);
864
+ function c(h) {
865
865
  a("update:modelValue", h), a("select", h);
866
866
  }
867
- async function f(h, c) {
867
+ async function f(h, d) {
868
868
  const b = t.tabs.length - 1;
869
869
  if (b < 0) return;
870
- const p = c === "primera" ? 0 : c === "ultima" ? b : c === "anterior" ? (h - 1 + t.tabs.length) % t.tabs.length : (h + 1) % t.tabs.length;
870
+ const p = d === "primera" ? 0 : d === "ultima" ? b : d === "anterior" ? (h - 1 + t.tabs.length) % t.tabs.length : (h + 1) % t.tabs.length;
871
871
  r.value = p, await J(), o.value?.querySelectorAll('[role="tab"]')?.[p]?.focus();
872
872
  }
873
- function E(h, c) {
873
+ function k(h, d) {
874
874
  if (t.fixedOrder) return;
875
- const b = h + c;
875
+ const b = h + d;
876
876
  if (b < 0 || b >= t.tabs.length) return;
877
877
  const p = [...t.tabs], [R] = p.splice(h, 1);
878
878
  R && (p.splice(b, 0, R), r.value = b, a("reorder", p));
879
879
  }
880
880
  function L(h) {
881
- const c = o.value;
882
- if (!c) return;
883
- const b = h.deltaY || h.deltaX || 0, p = l.value ? c.scrollTop : c.scrollLeft;
884
- l.value ? c.scrollTop += b : c.scrollLeft += b, (l.value ? c.scrollTop : c.scrollLeft) !== p && h.preventDefault();
881
+ const d = o.value;
882
+ if (!d) return;
883
+ const b = h.deltaY || h.deltaX || 0, p = l.value ? d.scrollTop : d.scrollLeft;
884
+ l.value ? d.scrollTop += b : d.scrollLeft += b, (l.value ? d.scrollTop : d.scrollLeft) !== p && h.preventDefault();
885
885
  }
886
- function A(h, c) {
887
- t.fixedOrder || (u.value = h, c.dataTransfer?.setData("text/plain", String(h)), c.dataTransfer && (c.dataTransfer.effectAllowed = "move"));
886
+ function A(h, d) {
887
+ t.fixedOrder || (u.value = h, d.dataTransfer?.setData("text/plain", String(h)), d.dataTransfer && (d.dataTransfer.effectAllowed = "move"));
888
888
  }
889
- function g(h, c) {
890
- t.fixedOrder || u.value === null || (c.preventDefault(), d.value = h, c.dataTransfer && (c.dataTransfer.dropEffect = "move"));
889
+ function g(h, d) {
890
+ t.fixedOrder || u.value === null || (d.preventDefault(), m.value = h, d.dataTransfer && (d.dataTransfer.dropEffect = "move"));
891
891
  }
892
- function k(h) {
893
- const c = u.value;
894
- if (P(), t.fixedOrder || c === null || c === h) return;
895
- const b = [...t.tabs], [p] = b.splice(c, 1);
892
+ function C(h) {
893
+ const d = u.value;
894
+ if (P(), t.fixedOrder || d === null || d === h) return;
895
+ const b = [...t.tabs], [p] = b.splice(d, 1);
896
896
  p && (b.splice(h, 0, p), a("reorder", b));
897
897
  }
898
898
  function P() {
899
- u.value = null, d.value = null;
899
+ u.value = null, m.value = null;
900
900
  }
901
- const C = v(
901
+ const z = v(
902
902
  () => l.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"
903
903
  );
904
- return (h, c) => (i(), s("div", {
904
+ return (h, d) => (i(), s("div", {
905
905
  class: y(["flex min-h-0 min-w-0 items-center gap-1", F(l) ? "w-full flex-col" : "h-full"]),
906
906
  role: "tablist",
907
907
  "aria-orientation": F(l) ? "vertical" : "horizontal"
@@ -909,19 +909,19 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
909
909
  B("div", {
910
910
  ref_key: "carril",
911
911
  ref: o,
912
- class: y(C.value),
912
+ class: y(z.value),
913
913
  onWheel: L
914
914
  }, [
915
915
  (i(!0), s(te, null, ce(e.tabs, (b, p) => (i(), s("div", {
916
916
  key: b.id,
917
917
  class: y(["transition-opacity", [
918
918
  u.value === p ? "opacity-40" : "",
919
- d.value === p && u.value !== p ? "ring-2 ring-secondary rounded-corner" : ""
919
+ m.value === p && u.value !== p ? "ring-2 ring-secondary rounded-corner" : ""
920
920
  ]]),
921
921
  draggable: !e.fixedOrder,
922
922
  onDragstart: (R) => A(p, R),
923
923
  onDragover: (R) => g(p, R),
924
- onDrop: M((R) => k(p), ["prevent"]),
924
+ onDrop: M((R) => C(p), ["prevent"]),
925
925
  onDragend: P
926
926
  }, [
927
927
  j(nt, {
@@ -930,11 +930,11 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
930
930
  "close-label": e.closeLabel,
931
931
  "dirty-label": e.dirtyLabel,
932
932
  tabindex: p === r.value ? 0 : -1,
933
- onSelect: (R) => m(b.id),
933
+ onSelect: (R) => c(b.id),
934
934
  onClose: (R) => a("close", b.id),
935
935
  onMenu: (R) => a("menu", { id: b.id, ...R }),
936
936
  onNavegar: (R) => f(p, R),
937
- onMover: (R) => E(p, R)
937
+ onMover: (R) => k(p, R)
938
938
  }, null, 8, ["tab", "active", "close-label", "dirty-label", "tabindex", "onSelect", "onClose", "onMenu", "onNavegar", "onMover"])
939
939
  ], 42, Pa))), 128))
940
940
  ], 34),
@@ -944,7 +944,7 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
944
944
  class: "flex size-7 shrink-0 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
945
945
  title: e.newLabel,
946
946
  "aria-label": e.newLabel,
947
- onClick: c[0] || (c[0] = (b) => a("new"))
947
+ onClick: d[0] || (d[0] = (b) => a("new"))
948
948
  }, [
949
949
  j(N, {
950
950
  name: "gtk-add",
@@ -981,18 +981,18 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
981
981
  a.lazy && l("update:modelValue", f.target.value);
982
982
  }
983
983
  const u = w(null);
984
- function d() {
984
+ function m() {
985
985
  return u.value?.focus(), u.value !== null && document.activeElement === u.value;
986
986
  }
987
- n({ enfocar: d });
988
- const m = v(() => [
987
+ n({ enfocar: m });
988
+ const c = v(() => [
989
989
  "w-full rounded-corner border bg-ui-surface/70 px-3 py-1.5 text-sm text-tx-main",
990
990
  "placeholder:text-tx-muted focus:outline-none focus:ring-1 focus:ring-primary",
991
991
  a.invalid ? "border-status-error" : "border-ui-border",
992
992
  a.mono ? "font-mono" : "",
993
993
  a.disabled ? "cursor-not-allowed opacity-60" : ""
994
994
  ]);
995
- return (f, E) => (i(), s("input", {
995
+ return (f, k) => (i(), s("input", {
996
996
  ref_key: "campo",
997
997
  ref: u,
998
998
  id: e.id,
@@ -1006,11 +1006,11 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
1006
1006
  "aria-describedby": e.describedBy,
1007
1007
  autocomplete: e.autocomplete,
1008
1008
  "aria-invalid": e.invalid || void 0,
1009
- class: y(m.value),
1009
+ class: y(c.value),
1010
1010
  onInput: o,
1011
1011
  onChange: r,
1012
- onKeyup: E[0] || (E[0] = (L) => l("keyup", L)),
1013
- onKeydown: E[1] || (E[1] = (L) => l("keydown", L))
1012
+ onKeyup: k[0] || (k[0] = (L) => l("keyup", L)),
1013
+ onKeydown: k[1] || (k[1] = (L) => l("keydown", L))
1014
1014
  }, null, 42, Na));
1015
1015
  }
1016
1016
  }), qa = { class: "pointer-events-none absolute left-2 flex items-center" }, Ha = ["aria-label"], Ie = /* @__PURE__ */ D({
@@ -1032,7 +1032,7 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
1032
1032
  setup(e, { expose: n, emit: t }) {
1033
1033
  const a = e, l = t, o = w(null);
1034
1034
  let r;
1035
- const u = v(() => a.modelValue.length > 0), d = v(
1035
+ const u = v(() => a.modelValue.length > 0), m = v(
1036
1036
  () => a.listboxId ? {
1037
1037
  role: "combobox",
1038
1038
  "aria-autocomplete": "list",
@@ -1040,12 +1040,12 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
1040
1040
  "aria-expanded": String(a.expanded),
1041
1041
  "aria-activedescendant": a.activeOptionId || void 0
1042
1042
  } : {}
1043
- ), m = v(() => a.clearable && u.value && !a.disabled);
1043
+ ), c = v(() => a.clearable && u.value && !a.disabled);
1044
1044
  function f() {
1045
1045
  clearTimeout(r), r = void 0;
1046
1046
  }
1047
- function E(k) {
1048
- l("update:modelValue", k), !(a.debounce <= 0) && (f(), r = setTimeout(() => l("search", k), a.debounce));
1047
+ function k(C) {
1048
+ l("update:modelValue", C), !(a.debounce <= 0) && (f(), r = setTimeout(() => l("search", C), a.debounce));
1049
1049
  }
1050
1050
  function L() {
1051
1051
  f(), l("search", a.modelValue);
@@ -1060,10 +1060,10 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
1060
1060
  a.autofocus && (await J(), g());
1061
1061
  }), ve(f), Q(
1062
1062
  () => a.disabled,
1063
- (k) => {
1064
- k && f();
1063
+ (C) => {
1064
+ C && f();
1065
1065
  }
1066
- ), (k, P) => (i(), s("div", {
1066
+ ), (C, P) => (i(), s("div", {
1067
1067
  class: "relative flex items-center",
1068
1068
  onKeydown: I(L, ["enter"])
1069
1069
  }, [
@@ -1082,13 +1082,13 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
1082
1082
  "model-value": e.modelValue,
1083
1083
  placeholder: e.placeholder || e.label,
1084
1084
  ariaLabel: e.label || void 0
1085
- }, d.value, {
1085
+ }, m.value, {
1086
1086
  disabled: e.disabled,
1087
- class: ["pl-7 [&::-webkit-search-cancel-button]:appearance-none", m.value ? "pr-8" : ""],
1088
- "onUpdate:modelValue": E,
1089
- onKeydown: P[0] || (P[0] = (C) => l("keydown", C))
1087
+ class: ["pl-7 [&::-webkit-search-cancel-button]:appearance-none", c.value ? "pr-8" : ""],
1088
+ "onUpdate:modelValue": k,
1089
+ onKeydown: P[0] || (P[0] = (z) => l("keydown", z))
1090
1090
  }), null, 16, ["model-value", "placeholder", "ariaLabel", "disabled", "class"]),
1091
- m.value ? (i(), s("button", {
1091
+ c.value ? (i(), s("button", {
1092
1092
  key: 0,
1093
1093
  type: "button",
1094
1094
  class: "absolute right-1 flex size-6 items-center justify-center rounded-corner text-tx-muted hover:bg-ui-surface",
@@ -1106,7 +1106,7 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
1106
1106
  ], 40, Ha)) : x("", !0)
1107
1107
  ], 32));
1108
1108
  }
1109
- }), Ua = ["title", "aria-label", "aria-expanded"], Ka = /* @__PURE__ */ D({
1109
+ }), Ka = ["title", "aria-label", "aria-expanded"], Ua = /* @__PURE__ */ D({
1110
1110
  __name: "BarSearch",
1111
1111
  props: {
1112
1112
  modelValue: { default: "" },
@@ -1118,43 +1118,43 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
1118
1118
  },
1119
1119
  emits: ["update:modelValue", "search", "open", "close"],
1120
1120
  setup(e, { emit: n }) {
1121
- const t = e, a = n, { vertical: l, posicion: o } = he(), r = w(!1), u = w(null), d = v(() => l.value || t.collapsed), m = v(() => !d.value || r.value), f = v(() => {
1122
- if (!d.value) return "";
1121
+ const t = e, a = n, { vertical: l, posicion: o } = he(), r = w(!1), u = w(null), m = v(() => l.value || t.collapsed), c = v(() => !m.value || r.value), f = v(() => {
1122
+ if (!m.value) return "";
1123
1123
  const g = "absolute z-40 w-64 rounded-corner border border-ui-border bg-ui-surface/95 p-1 shadow-lg";
1124
1124
  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`;
1125
1125
  });
1126
- async function E() {
1126
+ async function k() {
1127
1127
  r.value = !0, a("open"), await J(), u.value?.enfocar();
1128
1128
  }
1129
1129
  function L() {
1130
1130
  r.value && (r.value = !1, a("close"));
1131
1131
  }
1132
1132
  function A(g) {
1133
- const k = g.relatedTarget;
1134
- k && g.currentTarget.contains(k) || L();
1133
+ const C = g.relatedTarget;
1134
+ C && g.currentTarget.contains(C) || L();
1135
1135
  }
1136
- return (g, k) => (i(), s("div", {
1136
+ return (g, C) => (i(), s("div", {
1137
1137
  class: "relative flex shrink-0 items-center",
1138
1138
  onFocusout: A
1139
1139
  }, [
1140
- d.value ? (i(), s("button", {
1140
+ m.value ? (i(), s("button", {
1141
1141
  key: 0,
1142
1142
  type: "button",
1143
1143
  class: "flex size-7 items-center justify-center rounded-corner border border-ui-border bg-ui-bg/80 hover:bg-ui-surface/70",
1144
1144
  title: e.label,
1145
1145
  "aria-label": e.label,
1146
1146
  "aria-expanded": r.value,
1147
- onMousedown: k[0] || (k[0] = M(() => {
1147
+ onMousedown: C[0] || (C[0] = M(() => {
1148
1148
  }, ["prevent"])),
1149
- onClick: k[1] || (k[1] = (P) => r.value ? L() : E())
1149
+ onClick: C[1] || (C[1] = (P) => r.value ? L() : k())
1150
1150
  }, [
1151
1151
  j(N, {
1152
1152
  name: "system-search",
1153
1153
  type: "symbol",
1154
1154
  size: 14
1155
1155
  })
1156
- ], 40, Ua)) : x("", !0),
1157
- m.value ? (i(), s("div", {
1156
+ ], 40, Ka)) : x("", !0),
1157
+ c.value ? (i(), s("div", {
1158
1158
  key: 1,
1159
1159
  class: y(f.value),
1160
1160
  onKeydown: I(L, ["esc"])
@@ -1167,9 +1167,9 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
1167
1167
  label: e.label,
1168
1168
  disabled: e.disabled,
1169
1169
  debounce: e.debounce,
1170
- class: y(d.value ? "" : "w-48"),
1171
- "onUpdate:modelValue": k[2] || (k[2] = (P) => a("update:modelValue", P)),
1172
- onSearch: k[3] || (k[3] = (P) => a("search", P))
1170
+ class: y(m.value ? "" : "w-48"),
1171
+ "onUpdate:modelValue": C[2] || (C[2] = (P) => a("update:modelValue", P)),
1172
+ onSearch: C[3] || (C[3] = (P) => a("search", P))
1173
1173
  }, null, 8, ["model-value", "placeholder", "label", "disabled", "debounce", "class"])
1174
1174
  ], 34)) : x("", !0)
1175
1175
  ], 32));
@@ -1207,7 +1207,7 @@ const $a = ["title", "aria-label"], ka = ["title", "aria-label"], Ca = ["title",
1207
1207
  }, r = (u) => {
1208
1208
  t.stopPropagation && u.stopPropagation(), t.preventDefault && u.preventDefault(), !t.disabled && !t.loading && a("click");
1209
1209
  };
1210
- return (u, d) => (i(), s("button", {
1210
+ return (u, m) => (i(), s("button", {
1211
1211
  type: t.type,
1212
1212
  onClick: r,
1213
1213
  class: y(["rounded-corner transition-[background-color,opacity] duration-200 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2", [
@@ -1341,7 +1341,7 @@ const _a = ["role"], en = {
1341
1341
  const n = e, t = v(
1342
1342
  () => n.position === "bottom-center" ? "bottom-4 left-1/2 -translate-x-1/2" : "right-4 bottom-4"
1343
1343
  );
1344
- return (a, l) => (i(), U(ge, { to: "body" }, [
1344
+ return (a, l) => (i(), K(ge, { to: "body" }, [
1345
1345
  B("div", {
1346
1346
  class: y(["pointer-events-none fixed z-60 flex flex-col gap-2", t.value])
1347
1347
  }, [
@@ -1413,14 +1413,14 @@ function pn(e, n) {
1413
1413
  if (!t) return e;
1414
1414
  const a = [];
1415
1415
  for (let l = 0; l < e.length; l++) {
1416
- const o = e[l], r = Le(t, o.valor), u = Le(t, o.etiqueta), d = u === 10 ? 20 : u, f = Le(t, o.detalle) === 100 ? 100 : 40, E = Math.min(r, d, f);
1417
- E !== 100 && a.push({ opcion: o, rango: E, orden: l });
1416
+ const o = e[l], r = Le(t, o.valor), u = Le(t, o.etiqueta), m = u === 10 ? 20 : u, f = Le(t, o.detalle) === 100 ? 100 : 40, k = Math.min(r, m, f);
1417
+ k !== 100 && a.push({ opcion: o, rango: k, orden: l });
1418
1418
  }
1419
1419
  return a.sort((l, o) => l.rango - o.rango || l.orden - o.orden), a.map((l) => l.opcion);
1420
1420
  }
1421
- let Ue = 0;
1421
+ let Ke = 0;
1422
1422
  function yn() {
1423
- return Ue += 1, `vsk-lista-${Ue}`;
1423
+ return Ke += 1, `vsk-lista-${Ke}`;
1424
1424
  }
1425
1425
  const gn = ["disabled", "aria-label", "aria-expanded"], hn = { class: "min-w-0 flex-1 truncate" }, xn = {
1426
1426
  key: 0,
@@ -1449,44 +1449,44 @@ const gn = ["disabled", "aria-label", "aria-expanded"], hn = { class: "min-w-0 f
1449
1449
  },
1450
1450
  emits: ["update:modelValue"],
1451
1451
  setup(e, { emit: n }) {
1452
- const t = e, a = n, l = w(""), o = w(!1), r = w(0), u = w(null), d = w(null), m = w(null), f = yn(), E = v(
1452
+ const t = e, a = n, l = w(""), o = w(!1), r = w(0), u = w(null), m = w(null), c = w(null), f = yn(), k = v(
1453
1453
  () => t.options.find((T) => T.valor === t.modelValue) ?? null
1454
- ), L = v(() => pn(t.options, l.value)), A = v(() => L.value.slice(0, t.limit)), g = v(() => Math.max(0, L.value.length - t.limit)), k = v(
1454
+ ), L = v(() => pn(t.options, l.value)), A = v(() => L.value.slice(0, t.limit)), g = v(() => Math.max(0, L.value.length - t.limit)), C = v(
1455
1455
  () => A.value.length > 0 ? `${f}-${r.value}` : void 0
1456
1456
  );
1457
1457
  function P(T) {
1458
1458
  a("update:modelValue", T), h();
1459
1459
  }
1460
- async function C() {
1460
+ async function z() {
1461
1461
  o.value = !0;
1462
- const T = A.value.findIndex((z) => z.valor === t.modelValue);
1463
- r.value = T >= 0 ? T : 0, await J(), m.value?.enfocar(), K();
1462
+ const T = A.value.findIndex((E) => E.valor === t.modelValue);
1463
+ r.value = T >= 0 ? T : 0, await J(), c.value?.enfocar(), U();
1464
1464
  }
1465
1465
  function h(T = !0) {
1466
- o.value && (o.value = !1, l.value = "", T && J(() => d.value?.focus()));
1466
+ o.value && (o.value = !1, l.value = "", T && J(() => m.value?.focus()));
1467
1467
  }
1468
- function c(T) {
1469
- const z = A.value.length;
1470
- z !== 0 && (r.value = (r.value + T + z) % z, K());
1468
+ function d(T) {
1469
+ const E = A.value.length;
1470
+ E !== 0 && (r.value = (r.value + T + E) % E, U());
1471
1471
  }
1472
1472
  function b(T) {
1473
- r.value = T, K();
1473
+ r.value = T, U();
1474
1474
  }
1475
1475
  function p(T) {
1476
- const z = T.target?.closest?.("[data-indice]");
1477
- if (!z) return null;
1478
- const O = Number(z.getAttribute("data-indice"));
1476
+ const E = T.target?.closest?.("[data-indice]");
1477
+ if (!E) return null;
1478
+ const O = Number(E.getAttribute("data-indice"));
1479
1479
  return Number.isInteger(O) ? O : null;
1480
1480
  }
1481
1481
  function R(T) {
1482
- const z = p(T), O = z === null ? void 0 : A.value[z];
1482
+ const E = p(T), O = E === null ? void 0 : A.value[E];
1483
1483
  O && P(O.valor);
1484
1484
  }
1485
1485
  function oe(T) {
1486
- const z = p(T);
1487
- z !== null && (r.value = z);
1486
+ const E = p(T);
1487
+ E !== null && (r.value = E);
1488
1488
  }
1489
- function K() {
1489
+ function U() {
1490
1490
  J(() => {
1491
1491
  u.value?.querySelector(`[data-indice="${r.value}"]`)?.scrollIntoView({ block: "nearest" });
1492
1492
  });
@@ -1501,34 +1501,34 @@ const gn = ["disabled", "aria-label", "aria-expanded"], hn = { class: "min-w-0 f
1501
1501
  T && h(!1);
1502
1502
  }
1503
1503
  ), Q(l, () => {
1504
- r.value = 0, K();
1504
+ r.value = 0, U();
1505
1505
  });
1506
1506
  function Y(T) {
1507
- const z = T.relatedTarget;
1508
- z && T.currentTarget.contains(z) || h(!1);
1507
+ const E = T.relatedTarget;
1508
+ E && T.currentTarget.contains(E) || h(!1);
1509
1509
  }
1510
- return (T, z) => (i(), s("div", {
1510
+ return (T, E) => (i(), s("div", {
1511
1511
  class: "relative",
1512
1512
  onFocusout: Y
1513
1513
  }, [
1514
1514
  B("button", {
1515
1515
  ref_key: "boton",
1516
- ref: d,
1516
+ ref: m,
1517
1517
  type: "button",
1518
1518
  disabled: e.disabled,
1519
1519
  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",
1520
1520
  "aria-label": e.label || void 0,
1521
1521
  "aria-expanded": o.value,
1522
1522
  "aria-haspopup": "listbox",
1523
- onClick: z[0] || (z[0] = (O) => o.value ? h() : C()),
1523
+ onClick: E[0] || (E[0] = (O) => o.value ? h() : z()),
1524
1524
  onKeydown: [
1525
- z[1] || (z[1] = I(M((O) => o.value ? c(1) : C(), ["prevent"]), ["down"])),
1526
- z[2] || (z[2] = I(M((O) => o.value ? c(-1) : C(), ["prevent"]), ["up"]))
1525
+ E[1] || (E[1] = I(M((O) => o.value ? d(1) : z(), ["prevent"]), ["down"])),
1526
+ E[2] || (E[2] = I(M((O) => o.value ? d(-1) : z(), ["prevent"]), ["up"]))
1527
1527
  ]
1528
1528
  }, [
1529
1529
  B("span", hn, [
1530
- $e(V(E.value?.etiqueta ?? e.placeholder) + " ", 1),
1531
- E.value?.detalle ? (i(), s("span", xn, V(E.value.detalle), 1)) : x("", !0)
1530
+ $e(V(k.value?.etiqueta ?? e.placeholder) + " ", 1),
1531
+ k.value?.detalle ? (i(), s("span", xn, V(k.value.detalle), 1)) : x("", !0)
1532
1532
  ]),
1533
1533
  j(N, {
1534
1534
  name: "go-down",
@@ -1541,13 +1541,13 @@ const gn = ["disabled", "aria-label", "aria-expanded"], hn = { class: "min-w-0 f
1541
1541
  key: 0,
1542
1542
  class: y(["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"]),
1543
1543
  onKeydown: [
1544
- z[4] || (z[4] = I(M((O) => h(), ["prevent"]), ["escape"])),
1545
- z[5] || (z[5] = I(M((O) => c(1), ["prevent"]), ["down"])),
1546
- z[6] || (z[6] = I(M((O) => c(-1), ["prevent"]), ["up"])),
1547
- z[7] || (z[7] = I(M((O) => b(0), ["prevent"]), ["home"])),
1548
- z[8] || (z[8] = I(M((O) => b(A.value.length - 1), ["prevent"]), ["end"])),
1549
- z[9] || (z[9] = I(M((O) => ie(), ["prevent"]), ["enter"])),
1550
- z[10] || (z[10] = I((O) => h(!1), ["tab"]))
1544
+ E[4] || (E[4] = I(M((O) => h(), ["prevent"]), ["escape"])),
1545
+ E[5] || (E[5] = I(M((O) => d(1), ["prevent"]), ["down"])),
1546
+ E[6] || (E[6] = I(M((O) => d(-1), ["prevent"]), ["up"])),
1547
+ E[7] || (E[7] = I(M((O) => b(0), ["prevent"]), ["home"])),
1548
+ E[8] || (E[8] = I(M((O) => b(A.value.length - 1), ["prevent"]), ["end"])),
1549
+ E[9] || (E[9] = I(M((O) => ie(), ["prevent"]), ["enter"])),
1550
+ E[10] || (E[10] = I((O) => h(!1), ["tab"]))
1551
1551
  ],
1552
1552
  onClick: R,
1553
1553
  onMousemove: oe
@@ -1555,13 +1555,13 @@ const gn = ["disabled", "aria-label", "aria-expanded"], hn = { class: "min-w-0 f
1555
1555
  B("div", wn, [
1556
1556
  j(Ie, {
1557
1557
  ref_key: "campo",
1558
- ref: m,
1558
+ ref: c,
1559
1559
  modelValue: l.value,
1560
- "onUpdate:modelValue": z[3] || (z[3] = (O) => l.value = O),
1560
+ "onUpdate:modelValue": E[3] || (E[3] = (O) => l.value = O),
1561
1561
  label: e.label,
1562
1562
  placeholder: e.searchPlaceholder,
1563
1563
  "listbox-id": F(f),
1564
- "active-option-id": k.value,
1564
+ "active-option-id": C.value,
1565
1565
  expanded: o.value
1566
1566
  }, null, 8, ["modelValue", "label", "placeholder", "listbox-id", "active-option-id", "expanded"])
1567
1567
  ]),
@@ -1633,6 +1633,7 @@ const gn = ["disabled", "aria-label", "aria-expanded"], hn = { class: "min-w-0 f
1633
1633
  showActionButton: { type: Boolean, default: !0 },
1634
1634
  actionLabel: { default: "" },
1635
1635
  connectingLabel: { default: "" },
1636
+ actionKind: { default: "primary" },
1636
1637
  isConnecting: { type: Boolean, default: !1 },
1637
1638
  showStatusIndicator: { type: Boolean, default: !1 },
1638
1639
  customClass: { default: "" },
@@ -1640,16 +1641,18 @@ const gn = ["disabled", "aria-label", "aria-expanded"], hn = { class: "min-w-0 f
1640
1641
  },
1641
1642
  emits: ["action", "click"],
1642
1643
  setup(e, { emit: n }) {
1643
- const t = e, a = (d) => typeof d == "string" ? "" : d.icon ?? "", l = (d) => typeof d == "string" ? d : d.text, o = n, r = () => {
1644
- o("action");
1645
- }, u = () => {
1646
- t.clickable && o("click");
1644
+ const t = e, a = v(
1645
+ () => t.actionKind === "destructive" ? "border border-status-error/20 bg-status-error/10 text-status-error hover:bg-status-error/20" : "bg-primary text-tx-on-primary"
1646
+ ), l = (c) => typeof c == "string" ? "" : c.icon ?? "", o = (c) => typeof c == "string" ? c : c.text, r = n, u = () => {
1647
+ r("action");
1648
+ }, m = () => {
1649
+ t.clickable && r("click");
1647
1650
  };
1648
1651
  return W(() => {
1649
1652
  t.icon && !t.name && console.warn(
1650
1653
  "[DeviceCard] «icon» está obsoleto y se va en la próxima mayor: recibe una ruta ya resuelta. Usá «name» con el nombre del icono del tema, y «type» si hace falta el símbolo."
1651
1654
  );
1652
- }), (d, m) => (i(), s("div", {
1655
+ }), (c, f) => (i(), s("div", {
1653
1656
  class: y(["flex items-center justify-between background rounded-corner border border-ui-border px-6 py-3 mb-4", [
1654
1657
  { "border-l-4 border-status-success": e.isConnected, "cursor-pointer": e.clickable },
1655
1658
  e.customClass
@@ -1657,14 +1660,14 @@ const gn = ["disabled", "aria-label", "aria-expanded"], hn = { class: "min-w-0 f
1657
1660
  role: e.clickable ? "button" : void 0,
1658
1661
  tabindex: e.clickable ? 0 : void 0,
1659
1662
  "aria-label": e.clickable ? e.title : void 0,
1660
- onClick: u,
1663
+ onClick: m,
1661
1664
  onKeydown: [
1662
- I(M(u, ["self", "prevent"]), ["enter"]),
1663
- I(M(u, ["self", "prevent"]), ["space"])
1665
+ I(M(m, ["self", "prevent"]), ["enter"]),
1666
+ I(M(m, ["self", "prevent"]), ["space"])
1664
1667
  ]
1665
1668
  }, [
1666
1669
  B("div", Mn, [
1667
- e.name ? (i(), U(N, {
1670
+ e.name ? (i(), K(N, {
1668
1671
  key: 0,
1669
1672
  name: e.name,
1670
1673
  type: e.type,
@@ -1681,17 +1684,17 @@ const gn = ["disabled", "aria-label", "aria-expanded"], hn = { class: "min-w-0 f
1681
1684
  e.subtitle ? (i(), s("div", jn, V(e.subtitle), 1)) : x("", !0),
1682
1685
  e.metadata ? (i(), s("div", Pn, V(e.metadata), 1)) : x("", !0),
1683
1686
  e.extraInfo.length > 0 ? (i(), s("div", Rn, [
1684
- (i(!0), s(te, null, ce(e.extraInfo, (f, E) => (i(), s("span", {
1685
- key: E,
1687
+ (i(!0), s(te, null, ce(e.extraInfo, (k, L) => (i(), s("span", {
1688
+ key: L,
1686
1689
  class: "inline-flex items-center gap-1"
1687
1690
  }, [
1688
- a(f) ? (i(), U(N, {
1691
+ l(k) ? (i(), K(N, {
1689
1692
  key: 0,
1690
- name: a(f),
1693
+ name: l(k),
1691
1694
  type: "symbol",
1692
1695
  size: 14
1693
1696
  }, null, 8, ["name"])) : x("", !0),
1694
- $e(" " + V(l(f)), 1)
1697
+ $e(" " + V(o(k)), 1)
1695
1698
  ]))), 128))
1696
1699
  ])) : x("", !0)
1697
1700
  ])
@@ -1699,10 +1702,10 @@ const gn = ["disabled", "aria-label", "aria-expanded"], hn = { class: "min-w-0 f
1699
1702
  e.showActionButton ? (i(), s("button", {
1700
1703
  key: 0,
1701
1704
  type: "button",
1702
- class: "bg-primary text-tx-on-primary rounded-corner px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70 disabled:opacity-50 disabled:cursor-not-allowed",
1705
+ class: y(["rounded-corner px-4 py-2 text-sm font-semibold cursor-pointer hover:opacity-70 disabled:opacity-50 disabled:cursor-not-allowed", a.value]),
1703
1706
  disabled: e.isConnecting,
1704
- onClick: M(r, ["stop"])
1705
- }, V(e.isConnecting ? e.connectingLabel : e.actionLabel), 9, Fn)) : x("", !0),
1707
+ onClick: M(u, ["stop"])
1708
+ }, V(e.isConnecting ? e.connectingLabel : e.actionLabel), 11, Fn)) : x("", !0),
1706
1709
  e.showStatusIndicator && e.isConnected ? (i(), s("div", Nn)) : x("", !0)
1707
1710
  ], 42, Sn));
1708
1711
  }
@@ -1721,11 +1724,11 @@ function rt() {
1721
1724
  }
1722
1725
  };
1723
1726
  }
1724
- let Ke = 0;
1727
+ let Ue = 0;
1725
1728
  function Hn() {
1726
- return Ke += 1, `vsk-dialogo-titulo-${Ke}`;
1729
+ return Ue += 1, `vsk-dialogo-titulo-${Ue}`;
1727
1730
  }
1728
- const Un = /* @__PURE__ */ D({
1731
+ const Kn = /* @__PURE__ */ D({
1729
1732
  __name: "Dialog",
1730
1733
  props: {
1731
1734
  open: { type: Boolean, default: !1 }
@@ -1742,7 +1745,7 @@ const Un = /* @__PURE__ */ D({
1742
1745
  }
1743
1746
  }), (o, r) => S(o.$slots, "default");
1744
1747
  }
1745
- }), Kn = {
1748
+ }), Un = {
1746
1749
  key: 0,
1747
1750
  class: "absolute inset-0 rounded-corner-window bg-ui-border/40"
1748
1751
  }, Wn = ["aria-labelledby", "aria-label"], Gn = "relative z-10 w-full rounded-corner border border-ui-border bg-ui-bg/80 p-6 text-tx-main shadow-lg", Qn = /* @__PURE__ */ D({
@@ -1754,56 +1757,56 @@ const Un = /* @__PURE__ */ D({
1754
1757
  },
1755
1758
  setup(e) {
1756
1759
  const n = e, t = Be(), a = v(() => t.class ?? ""), l = v(() => {
1757
- const { class: C, ...h } = t;
1760
+ const { class: z, ...h } = t;
1758
1761
  return h;
1759
- }), o = v(() => n.size === "full" ? "relative z-10 h-full w-full overflow-hidden rounded-corner-window text-tx-main" : `${Gn} ${n.size === "lg" ? "max-w-2xl" : "max-w-lg"}`), r = rt(), u = v(() => r.abierto.value), d = w(null), m = w(null);
1762
+ }), o = v(() => n.size === "full" ? "relative z-10 h-full w-full overflow-hidden rounded-corner-window text-tx-main" : `${Gn} ${n.size === "lg" ? "max-w-2xl" : "max-w-lg"}`), r = rt(), u = v(() => r.abierto.value), m = w(null), c = w(null);
1760
1763
  let f = null;
1761
- function E() {
1762
- return m.value ? [...m.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')] : [];
1764
+ function k() {
1765
+ return c.value ? [...c.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')] : [];
1763
1766
  }
1764
- function L(C) {
1765
- if (C.key === "Escape") {
1767
+ function L(z) {
1768
+ if (z.key === "Escape") {
1766
1769
  r.cerrar();
1767
1770
  return;
1768
1771
  }
1769
- if (C.key !== "Tab") return;
1770
- const h = E();
1772
+ if (z.key !== "Tab") return;
1773
+ const h = k();
1771
1774
  if (h.length === 0) {
1772
- C.preventDefault(), m.value?.focus();
1775
+ z.preventDefault(), c.value?.focus();
1773
1776
  return;
1774
1777
  }
1775
- const c = h[0], b = h[h.length - 1], p = document.activeElement;
1776
- C.shiftKey && (p === c || p === m.value) ? (C.preventDefault(), b.focus()) : !C.shiftKey && p === b && (C.preventDefault(), c.focus());
1778
+ const d = h[0], b = h[h.length - 1], p = document.activeElement;
1779
+ z.shiftKey && (p === d || p === c.value) ? (z.preventDefault(), b.focus()) : !z.shiftKey && p === b && (z.preventDefault(), d.focus());
1777
1780
  }
1778
- function A(C) {
1779
- C.target === C.currentTarget && r.cerrar();
1781
+ function A(z) {
1782
+ z.target === z.currentTarget && r.cerrar();
1780
1783
  }
1781
- function g(C) {
1782
- d.value?.contains(C.target) || L(C);
1784
+ function g(z) {
1785
+ m.value?.contains(z.target) || L(z);
1783
1786
  }
1784
- function k() {
1787
+ function C() {
1785
1788
  document.removeEventListener("keydown", g);
1786
1789
  }
1787
1790
  function P() {
1788
- const C = f;
1789
- f = null, C?.isConnected && C.focus();
1791
+ const z = f;
1792
+ f = null, z?.isConnected && z.focus();
1790
1793
  }
1791
1794
  return Q(
1792
1795
  u,
1793
- async (C) => {
1794
- if (C) {
1795
- f = document.activeElement, document.addEventListener("keydown", g), await J(), m.value?.focus();
1796
+ async (z) => {
1797
+ if (z) {
1798
+ f = document.activeElement, document.addEventListener("keydown", g), await J(), c.value?.focus();
1796
1799
  return;
1797
1800
  }
1798
- k(), P();
1801
+ C(), P();
1799
1802
  },
1800
1803
  // `watch` no corre para el valor inicial, y un diálogo se puede montar ya
1801
1804
  // abierto —una vista que arranca preguntando algo—. Sin esto, ése no recibe
1802
1805
  // el foco y ni Escape ni el Tab hacen nada: el `aria-modal` queda en promesa.
1803
1806
  { immediate: !0 }
1804
1807
  ), ve(() => {
1805
- k(), P();
1806
- }), (C, h) => (i(), U(ge, { to: "body" }, [
1808
+ C(), P();
1809
+ }), (z, h) => (i(), K(ge, { to: "body" }, [
1807
1810
  j(ke, {
1808
1811
  "enter-active-class": "transition-opacity duration-200 ease-out",
1809
1812
  "leave-active-class": "transition-opacity duration-150 ease-in",
@@ -1814,15 +1817,15 @@ const Un = /* @__PURE__ */ D({
1814
1817
  u.value ? (i(), s("div", {
1815
1818
  key: 0,
1816
1819
  ref_key: "velo",
1817
- ref: d,
1820
+ ref: m,
1818
1821
  class: "fixed inset-0 z-50 flex items-center justify-center",
1819
1822
  onClick: A,
1820
1823
  onKeydown: L
1821
1824
  }, [
1822
- n.size === "md" ? (i(), s("div", Kn)) : x("", !0),
1825
+ n.size === "md" ? (i(), s("div", Un)) : x("", !0),
1823
1826
  B("div", le({
1824
1827
  ref_key: "panel",
1825
- ref: m,
1828
+ ref: c,
1826
1829
  tabindex: "-1",
1827
1830
  role: "dialog",
1828
1831
  "aria-modal": "true",
@@ -1831,7 +1834,7 @@ const Un = /* @__PURE__ */ D({
1831
1834
  }, l.value, {
1832
1835
  class: [a.value, o.value]
1833
1836
  }), [
1834
- S(C.$slots, "default")
1837
+ S(z.$slots, "default")
1835
1838
  ], 16, Wn)
1836
1839
  ], 544)) : x("", !0)
1837
1840
  ]),
@@ -1908,8 +1911,8 @@ const nl = { class: "relative inline-block" }, ll = /* @__PURE__ */ D({
1908
1911
  },
1909
1912
  emits: ["update:open"],
1910
1913
  setup(e, { emit: n }) {
1911
- const t = e, a = n, l = w(!1), o = w(null), r = w(null), u = w("ninguno"), d = ct();
1912
- let m = null;
1914
+ const t = e, a = n, l = w(!1), o = w(null), r = w(null), u = w("ninguno"), m = ct();
1915
+ let c = null;
1913
1916
  const f = v({
1914
1917
  get: () => t.open ?? l.value,
1915
1918
  set: (g) => {
@@ -1918,29 +1921,29 @@ const nl = { class: "relative inline-block" }, ll = /* @__PURE__ */ D({
1918
1921
  });
1919
1922
  Q(f, (g) => {
1920
1923
  if (g) {
1921
- const k = document.activeElement;
1922
- m = k instanceof HTMLElement ? k : null;
1924
+ const C = document.activeElement;
1925
+ c = C instanceof HTMLElement ? C : null;
1923
1926
  } else
1924
1927
  u.value = "ninguno";
1925
1928
  });
1926
- function E(g = "ninguno") {
1929
+ function k(g = "ninguno") {
1927
1930
  u.value = g, f.value = !0;
1928
1931
  }
1929
1932
  function L(g = {}) {
1930
1933
  if (f.value = !1, !g.devolverElFoco) return;
1931
- const k = m ?? o.value;
1932
- k?.isConnected && k.focus();
1934
+ const C = c ?? o.value;
1935
+ C?.isConnected && C.focus();
1933
1936
  }
1934
1937
  function A(g = "ninguno") {
1935
1938
  if (f.value) {
1936
1939
  L({ devolverElFoco: !0 });
1937
1940
  return;
1938
1941
  }
1939
- E(g);
1942
+ k(g);
1940
1943
  }
1941
1944
  return ye(ut, {
1942
1945
  abierto: f,
1943
- idDelMenu: d,
1946
+ idDelMenu: m,
1944
1947
  idDeLaEtiqueta: r,
1945
1948
  ponerLaEtiqueta: (g) => {
1946
1949
  r.value = g;
@@ -1950,10 +1953,10 @@ const nl = { class: "relative inline-block" }, ll = /* @__PURE__ */ D({
1950
1953
  o.value = g;
1951
1954
  },
1952
1955
  focoAlAbrir: u,
1953
- abrir: E,
1956
+ abrir: k,
1954
1957
  cerrar: L,
1955
1958
  alternar: A
1956
- }), (g, k) => (i(), s("div", nl, [
1959
+ }), (g, C) => (i(), s("div", nl, [
1957
1960
  S(g.$slots, "default")
1958
1961
  ]));
1959
1962
  }
@@ -1969,19 +1972,19 @@ const nl = { class: "relative inline-block" }, ll = /* @__PURE__ */ D({
1969
1972
  sideOffset: { default: 4 }
1970
1973
  },
1971
1974
  setup(e) {
1972
- const n = e, t = Ce(), { idDelMenu: a, idDeLaEtiqueta: l } = t, o = v(() => t.disparador.value), r = v(() => t.abierto.value), u = w(null), d = w({
1975
+ const n = e, t = Ce(), { idDelMenu: a, idDeLaEtiqueta: l } = t, o = v(() => t.disparador.value), r = v(() => t.abierto.value), u = w(null), m = w({
1973
1976
  top: 0,
1974
1977
  left: 0,
1975
1978
  techo: null
1976
- }), m = {
1979
+ }), c = {
1977
1980
  top: "bottom",
1978
1981
  bottom: "top",
1979
1982
  left: "right",
1980
1983
  right: "left"
1981
1984
  };
1982
- function f(c, b) {
1985
+ function f(d, b) {
1983
1986
  const p = n.sideOffset + Z;
1984
- switch (c) {
1987
+ switch (d) {
1985
1988
  case "bottom":
1986
1989
  return window.innerHeight - b.bottom - p;
1987
1990
  case "top":
@@ -1992,85 +1995,85 @@ const nl = { class: "relative inline-block" }, ll = /* @__PURE__ */ D({
1992
1995
  return b.left - p;
1993
1996
  }
1994
1997
  }
1995
- function E(c, b, p) {
1996
- return p < b ? b : Math.min(Math.max(c, b), p);
1998
+ function k(d, b, p) {
1999
+ return p < b ? b : Math.min(Math.max(d, b), p);
1997
2000
  }
1998
2001
  function L() {
1999
2002
  if (!o.value || !u.value) return;
2000
- const c = o.value.getBoundingClientRect(), b = u.value.scrollHeight, p = u.value.offsetWidth, R = n.side === "top" || n.side === "bottom", oe = R ? b : p;
2001
- let K = n.side;
2002
- const ie = f(K, c);
2003
- ie < oe && f(m[K], c) > ie && (K = m[K]);
2004
- let Y = 0, T = 0, z = null;
2005
- switch (K) {
2003
+ const d = o.value.getBoundingClientRect(), b = u.value.scrollHeight, p = u.value.offsetWidth, R = n.side === "top" || n.side === "bottom", oe = R ? b : p;
2004
+ let U = n.side;
2005
+ const ie = f(U, d);
2006
+ ie < oe && f(c[U], d) > ie && (U = c[U]);
2007
+ let Y = 0, T = 0, E = null;
2008
+ switch (U) {
2006
2009
  case "bottom": {
2007
- Y = c.bottom + n.sideOffset, z = Math.max(window.innerHeight - Y - Z, 0);
2010
+ Y = d.bottom + n.sideOffset, E = Math.max(window.innerHeight - Y - Z, 0);
2008
2011
  break;
2009
2012
  }
2010
2013
  case "top": {
2011
- z = Math.max(f("top", c), 0), Y = c.top - n.sideOffset - Math.min(b, z);
2014
+ E = Math.max(f("top", d), 0), Y = d.top - n.sideOffset - Math.min(b, E);
2012
2015
  break;
2013
2016
  }
2014
2017
  case "left":
2015
2018
  case "right": {
2016
- T = K === "right" ? c.right + n.sideOffset : c.left - p - n.sideOffset;
2019
+ T = U === "right" ? d.right + n.sideOffset : d.left - p - n.sideOffset;
2017
2020
  const O = window.innerHeight - 2 * Z;
2018
- Y = E(c.top, Z, window.innerHeight - Math.min(b, O) - Z), z = Math.max(window.innerHeight - Y - Z, 0);
2021
+ Y = k(d.top, Z, window.innerHeight - Math.min(b, O) - Z), E = Math.max(window.innerHeight - Y - Z, 0);
2019
2022
  break;
2020
2023
  }
2021
2024
  }
2022
2025
  if (R)
2023
2026
  switch (n.align) {
2024
2027
  case "start":
2025
- T = c.left;
2028
+ T = d.left;
2026
2029
  break;
2027
2030
  case "center":
2028
- T = c.left + c.width / 2 - p / 2;
2031
+ T = d.left + d.width / 2 - p / 2;
2029
2032
  break;
2030
2033
  case "end":
2031
- T = c.right - p;
2034
+ T = d.right - p;
2032
2035
  break;
2033
2036
  }
2034
- T = E(T, Z, window.innerWidth - p - Z), d.value = { top: Y, left: T, techo: z };
2037
+ T = k(T, Z, window.innerWidth - p - Z), m.value = { top: Y, left: T, techo: E };
2035
2038
  }
2036
2039
  function A() {
2037
2040
  return u.value ? Array.from(u.value.querySelectorAll('[role="menuitem"]')) : [];
2038
2041
  }
2039
- function g(c) {
2042
+ function g(d) {
2040
2043
  const b = A();
2041
2044
  if (!b.length) return;
2042
2045
  const p = b.length;
2043
- b[(c % p + p) % p]?.focus();
2046
+ b[(d % p + p) % p]?.focus();
2044
2047
  }
2045
- function k() {
2046
- const c = document.activeElement;
2047
- return c instanceof HTMLElement ? A().indexOf(c) : -1;
2048
+ function C() {
2049
+ const d = document.activeElement;
2050
+ return d instanceof HTMLElement ? A().indexOf(d) : -1;
2048
2051
  }
2049
- function P(c) {
2050
- const b = k();
2051
- switch (c.key) {
2052
+ function P(d) {
2053
+ const b = C();
2054
+ switch (d.key) {
2052
2055
  case "ArrowDown":
2053
- c.preventDefault(), g(b + 1);
2056
+ d.preventDefault(), g(b + 1);
2054
2057
  break;
2055
2058
  case "ArrowUp":
2056
- c.preventDefault(), g(b <= 0 ? -1 : b - 1);
2059
+ d.preventDefault(), g(b <= 0 ? -1 : b - 1);
2057
2060
  break;
2058
2061
  case "Home":
2059
- c.preventDefault(), g(0);
2062
+ d.preventDefault(), g(0);
2060
2063
  break;
2061
2064
  case "End":
2062
- c.preventDefault(), g(-1);
2065
+ d.preventDefault(), g(-1);
2063
2066
  break;
2064
2067
  case "Escape":
2065
- c.preventDefault(), c.stopPropagation(), t.cerrar({ devolverElFoco: !0 });
2068
+ d.preventDefault(), d.stopPropagation(), t.cerrar({ devolverElFoco: !0 });
2066
2069
  break;
2067
2070
  case "Tab":
2068
- c.preventDefault(), t.cerrar({ devolverElFoco: !0 });
2071
+ d.preventDefault(), t.cerrar({ devolverElFoco: !0 });
2069
2072
  break;
2070
2073
  }
2071
2074
  }
2072
- Q(r, async (c) => {
2073
- if (c)
2075
+ Q(r, async (d) => {
2076
+ if (d)
2074
2077
  switch (await J(), requestAnimationFrame(() => {
2075
2078
  L();
2076
2079
  }), t.focoAlAbrir.value) {
@@ -2087,18 +2090,18 @@ const nl = { class: "relative inline-block" }, ll = /* @__PURE__ */ D({
2087
2090
  u.value?.focus();
2088
2091
  }
2089
2092
  });
2090
- function C(c) {
2091
- r.value && (c && u.value?.contains(c.target) || L());
2093
+ function z(d) {
2094
+ r.value && (d && u.value?.contains(d.target) || L());
2092
2095
  }
2093
- function h(c) {
2094
- const b = c.target, p = !!b.closest("[data-dropdown-content]"), R = !!o.value?.contains(b);
2096
+ function h(d) {
2097
+ const b = d.target, p = !!b.closest("[data-dropdown-content]"), R = !!o.value?.contains(b);
2095
2098
  !p && !R && t.cerrar();
2096
2099
  }
2097
2100
  return W(() => {
2098
- document.addEventListener("click", h), window.addEventListener("resize", C), window.addEventListener("scroll", C, !0);
2101
+ document.addEventListener("click", h), window.addEventListener("resize", z), window.addEventListener("scroll", z, !0);
2099
2102
  }), pe(() => {
2100
- document.removeEventListener("click", h), window.removeEventListener("resize", C), window.removeEventListener("scroll", C, !0);
2101
- }), (c, b) => (i(), U(ge, { to: "body" }, [
2103
+ document.removeEventListener("click", h), window.removeEventListener("resize", z), window.removeEventListener("scroll", z, !0);
2104
+ }), (d, b) => (i(), K(ge, { to: "body" }, [
2102
2105
  j(ke, {
2103
2106
  "enter-active-class": "transition-all duration-150 ease-in-out",
2104
2107
  "leave-active-class": "transition-all duration-150 ease-in-out",
@@ -2111,7 +2114,7 @@ const nl = { class: "relative inline-block" }, ll = /* @__PURE__ */ D({
2111
2114
  Se(B("div", le({
2112
2115
  ref_key: "contenido",
2113
2116
  ref: u
2114
- }, c.$attrs, {
2117
+ }, d.$attrs, {
2115
2118
  id: F(a),
2116
2119
  role: "menu",
2117
2120
  tabindex: "-1",
@@ -2120,9 +2123,9 @@ const nl = { class: "relative inline-block" }, ll = /* @__PURE__ */ D({
2120
2123
  inert: !r.value,
2121
2124
  style: {
2122
2125
  position: "fixed",
2123
- top: `${d.value.top}px`,
2124
- left: `${d.value.left}px`,
2125
- maxHeight: d.value.techo === null ? void 0 : `${d.value.techo}px`,
2126
+ top: `${m.value.top}px`,
2127
+ left: `${m.value.left}px`,
2128
+ maxHeight: m.value.techo === null ? void 0 : `${m.value.techo}px`,
2126
2129
  overflowY: "auto",
2127
2130
  overscrollBehavior: "contain",
2128
2131
  zIndex: 50
@@ -2133,7 +2136,7 @@ const nl = { class: "relative inline-block" }, ll = /* @__PURE__ */ D({
2133
2136
  onKeydown: P
2134
2137
  }), [
2135
2138
  B("div", il, [
2136
- S(c.$slots, "default")
2139
+ S(d.$slots, "default")
2137
2140
  ])
2138
2141
  ], 16, ol), [
2139
2142
  [Ye, r.value]
@@ -2230,26 +2233,26 @@ const bl = D({
2230
2233
  function r() {
2231
2234
  e.disabled || (o(), a.alternar());
2232
2235
  }
2233
- function u(d) {
2236
+ function u(m) {
2234
2237
  if (!e.disabled)
2235
- switch (d.key) {
2238
+ switch (m.key) {
2236
2239
  case "Enter":
2237
2240
  case " ":
2238
- d.preventDefault(), o(), a.alternar("primero");
2241
+ m.preventDefault(), o(), a.alternar("primero");
2239
2242
  break;
2240
2243
  case "ArrowDown":
2241
- d.preventDefault(), o(), a.abrir("primero");
2244
+ m.preventDefault(), o(), a.abrir("primero");
2242
2245
  break;
2243
2246
  case "ArrowUp":
2244
- d.preventDefault(), o(), a.abrir("ultimo");
2247
+ m.preventDefault(), o(), a.abrir("ultimo");
2245
2248
  break;
2246
2249
  case "Escape":
2247
- a.abierto.value && (d.preventDefault(), a.cerrar({ devolverElFoco: !0 }));
2250
+ a.abierto.value && (m.preventDefault(), a.cerrar({ devolverElFoco: !0 }));
2248
2251
  break;
2249
2252
  }
2250
2253
  }
2251
2254
  return () => {
2252
- const d = {
2255
+ const m = {
2253
2256
  ref: (f) => {
2254
2257
  l.value = f, o();
2255
2258
  },
@@ -2261,15 +2264,15 @@ const bl = D({
2261
2264
  "aria-controls": a.abierto.value ? a.idDelMenu : void 0,
2262
2265
  onClick: r,
2263
2266
  onKeydown: u
2264
- }, m = n.default?.() ?? [];
2267
+ }, c = n.default?.() ?? [];
2265
2268
  if (e.asChild) {
2266
- const f = dt(m);
2267
- if (f) return kt(f, { ...t, ...d });
2269
+ const f = dt(c);
2270
+ if (f) return kt(f, { ...t, ...m });
2268
2271
  }
2269
2272
  return Ct(
2270
2273
  "div",
2271
- { ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...d },
2272
- m
2274
+ { ...t, class: ["dropdown-menu-trigger inline-block", t.class], ...m },
2275
+ c
2273
2276
  );
2274
2277
  };
2275
2278
  }
@@ -2351,15 +2354,15 @@ const bl = D({
2351
2354
  });
2352
2355
  const a = n, l = v(() => {
2353
2356
  if (t.max <= t.min) return 0;
2354
- const d = t.max - t.min, m = t.modelValue - t.min;
2355
- return Math.round(m / d * 100);
2356
- }), o = v(() => t.getPercentageClass ? t.getPercentageClass(l.value) : ""), r = (d) => {
2357
- const m = d.target;
2358
- a("update:modelValue", Number(m.value));
2357
+ const m = t.max - t.min, c = t.modelValue - t.min;
2358
+ return Math.round(c / m * 100);
2359
+ }), o = v(() => t.getPercentageClass ? t.getPercentageClass(l.value) : ""), r = (m) => {
2360
+ const c = m.target;
2361
+ a("update:modelValue", Number(c.value));
2359
2362
  }, u = () => {
2360
2363
  a("buttonClick");
2361
2364
  };
2362
- return (d, m) => (i(), s("div", xl, [
2365
+ return (m, c) => (i(), s("div", xl, [
2363
2366
  e.showButton ? (i(), s("button", {
2364
2367
  key: 0,
2365
2368
  onClick: u,
@@ -2368,7 +2371,7 @@ const bl = D({
2368
2371
  "aria-label": e.buttonLabel ?? e.label,
2369
2372
  class: "w-8 h-8 flex items-center justify-center rounded-corner transition-[background-color,scale] duration-200 hover:bg-ui-surface/80 hover:scale-110 active:scale-95"
2370
2373
  }, [
2371
- e.name ? (i(), U(N, {
2374
+ e.name ? (i(), K(N, {
2372
2375
  key: 0,
2373
2376
  name: e.name,
2374
2377
  type: e.type,
@@ -2381,7 +2384,7 @@ const bl = D({
2381
2384
  class: y(["w-6 h-6", e.iconClass])
2382
2385
  }, null, 10, $l))
2383
2386
  ], 8, wl)) : (i(), s("div", kl, [
2384
- e.name ? (i(), U(N, {
2387
+ e.name ? (i(), K(N, {
2385
2388
  key: 0,
2386
2389
  name: e.name,
2387
2390
  type: e.type,
@@ -2548,7 +2551,7 @@ const bl = D({
2548
2551
  "aria-busy": e.isLoading || void 0,
2549
2552
  onClick: l
2550
2553
  }, [
2551
- e.name ? (i(), U(N, {
2554
+ e.name ? (i(), K(N, {
2552
2555
  key: 0,
2553
2556
  name: e.name,
2554
2557
  type: e.type,
@@ -2615,7 +2618,7 @@ const jl = { class: "inline-block" }, Pl = /* @__PURE__ */ D({
2615
2618
  },
2616
2619
  abrir: o,
2617
2620
  cerrar: r
2618
- }), (u, d) => (i(), s("div", jl, [
2621
+ }), (u, m) => (i(), s("div", jl, [
2619
2622
  S(u.$slots, "default")
2620
2623
  ]));
2621
2624
  }
@@ -2629,30 +2632,30 @@ const jl = { class: "inline-block" }, Pl = /* @__PURE__ */ D({
2629
2632
  },
2630
2633
  setup(e) {
2631
2634
  const n = Be(), t = v(() => n.class ?? ""), a = e, l = mt(), o = v(() => l.abierto.value), r = w(null), u = w({ top: 0, left: 0 });
2632
- function d() {
2633
- const m = l.disparador.value;
2634
- if (!m || !r.value) return;
2635
- const f = m.getBoundingClientRect(), E = r.value.getBoundingClientRect();
2635
+ function m() {
2636
+ const c = l.disparador.value;
2637
+ if (!c || !r.value) return;
2638
+ const f = c.getBoundingClientRect(), k = r.value.getBoundingClientRect();
2636
2639
  let L = 0, A = 0;
2637
2640
  switch (a.side) {
2638
2641
  case "bottom":
2639
- L = f.bottom + a.sideOffset, A = f.left + f.width / 2 - E.width / 2;
2642
+ L = f.bottom + a.sideOffset, A = f.left + f.width / 2 - k.width / 2;
2640
2643
  break;
2641
2644
  case "top":
2642
- L = f.top - E.height - a.sideOffset, A = f.left + f.width / 2 - E.width / 2;
2645
+ L = f.top - k.height - a.sideOffset, A = f.left + f.width / 2 - k.width / 2;
2643
2646
  break;
2644
2647
  case "left":
2645
- A = f.left - E.width - a.sideOffset, L = f.top + f.height / 2 - E.height / 2;
2648
+ A = f.left - k.width - a.sideOffset, L = f.top + f.height / 2 - k.height / 2;
2646
2649
  break;
2647
2650
  case "right":
2648
- A = f.right + a.sideOffset, L = f.top + f.height / 2 - E.height / 2;
2651
+ A = f.right + a.sideOffset, L = f.top + f.height / 2 - k.height / 2;
2649
2652
  break;
2650
2653
  }
2651
2654
  u.value = { top: L, left: A };
2652
2655
  }
2653
- return Q(o, async (m) => {
2654
- m && (await J(), requestAnimationFrame(d));
2655
- }), (m, f) => (i(), U(ge, { to: "body" }, [
2656
+ return Q(o, async (c) => {
2657
+ c && (await J(), requestAnimationFrame(m));
2658
+ }), (c, f) => (i(), K(ge, { to: "body" }, [
2656
2659
  j(ke, {
2657
2660
  "enter-active-class": "transition-all duration-200 ease-in-out",
2658
2661
  "leave-active-class": "transition-all duration-200 ease-in-out",
@@ -2669,7 +2672,7 @@ const jl = { class: "inline-block" }, Pl = /* @__PURE__ */ D({
2669
2672
  "pointer-events-none rounded-corner border border-secondary bg-ui-bg/80 px-2 py-1 text-sm shadow-md"
2670
2673
  ])
2671
2674
  }, [
2672
- S(m.$slots, "default")
2675
+ S(c.$slots, "default")
2673
2676
  ], 6), [
2674
2677
  [Ye, o.value]
2675
2678
  ])
@@ -2732,15 +2735,15 @@ const jl = { class: "inline-block" }, Pl = /* @__PURE__ */ D({
2732
2735
  const r = () => {
2733
2736
  a("click");
2734
2737
  };
2735
- return (u, d) => (i(), U(Lt(e.interactive ? "button" : "div"), le(e.interactive ? { type: "button", "aria-label": l.value } : {}, {
2738
+ return (u, m) => (i(), K(Lt(e.interactive ? "button" : "div"), le(e.interactive ? { type: "button", "aria-label": l.value } : {}, {
2736
2739
  class: ["p-1 rounded-corner relative group transition-[background-color] duration-300", [e.customClass, e.interactive ? "cursor-pointer hover:bg-primary" : ""]],
2737
2740
  title: e.tooltip,
2738
2741
  onClick: r,
2739
- onMouseenter: d[0] || (d[0] = (m) => o.value = !0),
2740
- onMouseleave: d[1] || (d[1] = (m) => o.value = !1)
2742
+ onMouseenter: m[0] || (m[0] = (c) => o.value = !0),
2743
+ onMouseleave: m[1] || (m[1] = (c) => o.value = !1)
2741
2744
  }), {
2742
2745
  default: G(() => [
2743
- e.name ? (i(), U(N, {
2746
+ e.name ? (i(), K(N, {
2744
2747
  key: 0,
2745
2748
  name: e.name,
2746
2749
  type: e.type,
@@ -2769,7 +2772,7 @@ const jl = { class: "inline-block" }, Pl = /* @__PURE__ */ D({
2769
2772
  _: 3
2770
2773
  }, 16, ["class", "title"]));
2771
2774
  }
2772
- }), Ul = [
2775
+ }), Kl = [
2773
2776
  ca,
2774
2777
  _e,
2775
2778
  Ze,
@@ -2780,7 +2783,7 @@ const jl = { class: "inline-block" }, Pl = /* @__PURE__ */ D({
2780
2783
  tt,
2781
2784
  Fa,
2782
2785
  nt,
2783
- Ka,
2786
+ Ua,
2784
2787
  Za,
2785
2788
  nn,
2786
2789
  sn,
@@ -2792,7 +2795,7 @@ const jl = { class: "inline-block" }, Pl = /* @__PURE__ */ D({
2792
2795
  dn,
2793
2796
  Bn,
2794
2797
  qn,
2795
- Un,
2798
+ Kn,
2796
2799
  Qn,
2797
2800
  Xn,
2798
2801
  Zn,
@@ -2817,7 +2820,7 @@ const jl = { class: "inline-block" }, Pl = /* @__PURE__ */ D({
2817
2820
  Hl
2818
2821
  ], Zl = {
2819
2822
  install(e) {
2820
- Ul.forEach((n) => {
2823
+ Kl.forEach((n) => {
2821
2824
  e.component(n.name, n);
2822
2825
  });
2823
2826
  }
@@ -2826,7 +2829,7 @@ export {
2826
2829
  Za as ActionButton,
2827
2830
  nn as AlertMessage,
2828
2831
  at as AppBar,
2829
- Ka as BarSearch,
2832
+ Ua as BarSearch,
2830
2833
  ot as CLASES_POR_TONO,
2831
2834
  st as CLAVE_DEL_DIALOGO,
2832
2835
  ut as CLAVE_DEL_MENU,
@@ -2834,7 +2837,7 @@ export {
2834
2837
  Me as CLAVE_DE_LA_BARRA,
2835
2838
  Bn as ConfigSection,
2836
2839
  qn as DeviceCard,
2837
- Un as Dialog,
2840
+ Kn as Dialog,
2838
2841
  Qn as DialogContent,
2839
2842
  Xn as DialogDescription,
2840
2843
  Zn as DialogFooter,