@cm-sigoo-temp/ui 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -67,10 +67,10 @@ function _o(e) {
67
67
  return ko("VITE__URL__OBTENER_TERMINALES", r);
68
68
  }
69
69
  const Ro = async (e) => {
70
+ var u;
70
71
  const r = bn();
71
72
  if (!r) throw new Error("No hay sesión de Keycloak activa");
72
- const t = _o(yn()), n = new URL(t);
73
- return (await fetch(n, {
73
+ const t = _o(yn()), n = new URL(t), a = await (await fetch(n, {
74
74
  headers: {
75
75
  Accept: "application/json",
76
76
  Authorization: `Bearer ${r}`,
@@ -80,7 +80,8 @@ const Ro = async (e) => {
80
80
  "x-request": crypto.randomUUID(),
81
81
  "x-timestamp": (/* @__PURE__ */ new Date()).toISOString()
82
82
  }
83
- })).json();
83
+ })).json(), s = Array.isArray(a.data) ? a.data : Array.isArray((u = a.data) == null ? void 0 : u.terminales) ? a.data.terminales : [];
84
+ return { ...a, data: s };
84
85
  }, Oo = (e) => {
85
86
  var r;
86
87
  return document ? ((r = document.cookie.split("; ").find((t) => t.startsWith(`${e}=`))) == null ? void 0 : r.split("=")[1]) ?? null : null;
@@ -6732,11 +6733,11 @@ function hc({
6732
6733
  permisos: W
6733
6734
  });
6734
6735
  const F = await Ro();
6735
- if (F.isError || !F.data.terminales.length)
6736
+ if (F.isError || !F.data.length)
6736
6737
  throw new Error("No se han encontrado terminales");
6737
6738
  const X = typeof (T == null ? void 0 : T.terminal) == "number" ? T.terminal : void 0, se = mc(
6738
6739
  L.response[0].terminales ?? [],
6739
- F.data.terminales,
6740
+ F.data,
6740
6741
  X
6741
6742
  );
6742
6743
  if (!se.length)