nemesischart 2.0.1 → 2.0.3

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,6 +1,6 @@
1
- import { ref as G, shallowRef as wt, onMounted as qt, onBeforeUnmount as Rt, watch as xt, openBlock as l, createElementBlock as n, normalizeStyle as u, createElementVNode as f, computed as R, unref as o, normalizeClass as et, renderSlot as S, createTextVNode as V, toDisplayString as h, createCommentVNode as i, createVNode as ct, Fragment as pt, renderList as gt } from "vue";
2
- import { Chart as $t, Title as zt, Tooltip as Ft, Legend as Tt, Filler as Lt, LineController as Vt, LineElement as Nt, PointElement as Dt, BarController as _t, BarElement as Mt, PieController as Ht, PolarAreaController as Pt, ArcElement as Ot, CategoryScale as It, LinearScale as Wt, RadialLinearScale as jt } from "chart.js";
3
- const Z = (t, y) => {
1
+ import { ref as tt, shallowRef as Et, onMounted as qt, onBeforeUnmount as Rt, watch as vt, openBlock as l, createElementBlock as n, normalizeStyle as u, createElementVNode as p, computed as R, unref as o, normalizeClass as at, renderSlot as k, createTextVNode as j, toDisplayString as x, createCommentVNode as i, createVNode as ct, Fragment as ft, renderList as gt } from "vue";
2
+ import { Chart as $t, Title as zt, Tooltip as Ft, Legend as Tt, Filler as Lt, LineController as Vt, LineElement as jt, PointElement as Nt, BarController as Ht, BarElement as _t, PieController as Mt, PolarAreaController as Dt, ArcElement as Pt, CategoryScale as Ot, LinearScale as It, RadialLinearScale as Wt } from "chart.js";
3
+ const et = (t, y) => {
4
4
  const a = t.__vccOpts || t;
5
5
  for (const [d, e] of y)
6
6
  a[d] = e;
@@ -22,76 +22,76 @@ const Z = (t, y) => {
22
22
  Tt,
23
23
  Lt,
24
24
  Vt,
25
+ jt,
25
26
  Nt,
26
- Dt,
27
+ Ht,
27
28
  _t,
28
29
  Mt,
29
- Ht,
30
+ Dt,
30
31
  Pt,
31
32
  Ot,
32
33
  It,
33
- Wt,
34
- jt
34
+ Wt
35
35
  );
36
- const a = t, d = G(null), e = wt(null), A = {
36
+ const a = t, d = tt(null), e = Et(null), w = {
37
37
  responsive: !0,
38
38
  maintainAspectRatio: !1,
39
39
  plugins: {
40
40
  legend: { position: "top" }
41
41
  }
42
42
  };
43
- function x() {
44
- return { ...A, ...a.options };
43
+ function v() {
44
+ return { ...w, ...a.options };
45
45
  }
46
46
  function z() {
47
47
  d.value && (e.value = new $t(d.value, {
48
48
  type: a.type,
49
49
  data: a.data,
50
- options: x(),
50
+ options: v(),
51
51
  plugins: a.plugins
52
52
  }));
53
53
  }
54
- function H() {
54
+ function D() {
55
55
  e.value && (e.value.destroy(), e.value = null);
56
56
  }
57
- return qt(z), Rt(H), xt(
57
+ return qt(z), Rt(D), vt(
58
58
  () => a.data,
59
- (P) => {
59
+ (O) => {
60
60
  if (!e.value) return;
61
- e.value.data.labels = P.labels;
62
- const w = e.value.data.datasets, T = P.datasets;
63
- w.length !== T.length ? e.value.data.datasets = T : T.forEach((O, I) => Object.assign(w[I], O)), e.value.update();
61
+ e.value.data.labels = O.labels;
62
+ const E = e.value.data.datasets, T = O.datasets;
63
+ E.length !== T.length ? e.value.data.datasets = T : T.forEach((I, W) => Object.assign(E[W], I)), e.value.update();
64
64
  },
65
65
  { deep: !0 }
66
- ), xt(
66
+ ), vt(
67
67
  () => a.options,
68
68
  () => {
69
- e.value && (e.value.options = x(), e.value.update());
69
+ e.value && (e.value.options = v(), e.value.update());
70
70
  },
71
71
  { deep: !0 }
72
- ), y({ chart: e }), (P, w) => (l(), n("div", {
73
- class: "nc-chart-wrapper",
72
+ ), y({ chart: e }), (O, E) => (l(), n("div", {
73
+ class: "nc-chart-wrapper w-full",
74
74
  style: u({
75
75
  height: typeof t.height == "number" ? `${t.height}px` : t.height,
76
76
  width: t.width ? typeof t.width == "number" ? `${t.width}px` : t.width : "100%"
77
77
  })
78
78
  }, [
79
- f("canvas", {
79
+ p("canvas", {
80
80
  ref_key: "canvasRef",
81
81
  ref: d
82
82
  }, null, 512)
83
83
  ], 4));
84
84
  }
85
- }, at = /* @__PURE__ */ Z(Xt, [["__scopeId", "data-v-32d30c2c"]]), Jt = {
85
+ }, ot = /* @__PURE__ */ et(Xt, [["__scopeId", "data-v-9828990e"]]), Yt = {
86
86
  light: { bg: "#ffffff", text: "#000000", muted: "#64748B", grid: "rgba(15,23,42,0.06)" },
87
87
  dark: { bg: "#000000", text: "#ffffff", muted: "#94A3B8", grid: "rgba(255,255,255,0.08)" },
88
88
  transparent: { bg: "transparent", text: "inherit", muted: "#94A3B8", grid: "rgba(127,127,127,0.15)" }
89
89
  };
90
- function L(t, y) {
90
+ function V(t, y) {
91
91
  if (!t) return `rgba(59,130,246,${y})`;
92
92
  if (t.startsWith("#")) {
93
- const a = t.replace("#", ""), d = a.length === 3 ? a.split("").map((z) => z + z).join("") : a, e = parseInt(d.slice(0, 2), 16), A = parseInt(d.slice(2, 4), 16), x = parseInt(d.slice(4, 6), 16);
94
- return `rgba(${e},${A},${x},${y})`;
93
+ const a = t.replace("#", ""), d = a.length === 3 ? a.split("").map((z) => z + z).join("") : a, e = parseInt(d.slice(0, 2), 16), w = parseInt(d.slice(2, 4), 16), v = parseInt(d.slice(4, 6), 16);
94
+ return `rgba(${e},${w},${v},${y})`;
95
95
  }
96
96
  if (t.startsWith("rgb")) {
97
97
  const a = t.match(/[\d.]+/g);
@@ -99,9 +99,9 @@ function L(t, y) {
99
99
  }
100
100
  return t;
101
101
  }
102
- function ot(t) {
102
+ function rt(t) {
103
103
  const y = R(() => {
104
- const d = Jt[t.tema], e = d ? { ...d, bg: t.corFundo || d.bg } : { bg: t.corFundo || t.tema, text: "#F8FAFC", muted: "#94A3B8", grid: "rgba(255,255,255,0.08)" };
104
+ const d = Yt[t.tema], e = d ? { ...d, bg: t.corFundo || d.bg } : { bg: t.corFundo || t.tema, text: "#F8FAFC", muted: "#94A3B8", grid: "rgba(255,255,255,0.08)" };
105
105
  return {
106
106
  ...e,
107
107
  text: t.corTexto || e.text,
@@ -114,7 +114,7 @@ function ot(t) {
114
114
  boxShadow: t.sombra,
115
115
  border: t.corBorda ? `1px solid ${t.corBorda}` : "none"
116
116
  }));
117
- return { palette: y, cardStyle: a, toRgba: L };
117
+ return { palette: y, cardStyle: a, toRgba: V };
118
118
  }
119
119
  function ut(t) {
120
120
  const y = R(() => t.tipoValor === "moeda" ? new Intl.NumberFormat(t.locale, { style: "currency", currency: t.moeda }) : t.tipoValor === "percentual" ? new Intl.NumberFormat(t.locale, { style: "percent", maximumFractionDigits: 2 }) : new Intl.NumberFormat(t.locale, { maximumFractionDigits: 2 }));
@@ -125,7 +125,7 @@ function ut(t) {
125
125
  }
126
126
  return { formatador: y, formatar: a };
127
127
  }
128
- function ft(t, { caretFlexivel: y = !1 } = {}) {
128
+ function pt(t, { caretFlexivel: y = !1 } = {}) {
129
129
  let a = t.querySelector(".nc-tt");
130
130
  if (a) return a;
131
131
  a = document.createElement("div"), a.className = "nc-tt", Object.assign(a.style, {
@@ -161,8 +161,8 @@ function ft(t, { caretFlexivel: y = !1 } = {}) {
161
161
  borderRight: "1px solid rgba(15,23,42,.06)",
162
162
  borderBottom: "1px solid rgba(15,23,42,.06)"
163
163
  }), a.appendChild(d);
164
- const A = document.createElement("div");
165
- return A.className = "nc-tt__content", Object.assign(A.style, { position: "relative", background: "#fff", borderRadius: "8px" }), a.appendChild(A), t.appendChild(a), a;
164
+ const w = document.createElement("div");
165
+ return w.className = "nc-tt__content", Object.assign(w.style, { position: "relative", background: "#fff", borderRadius: "8px" }), a.appendChild(w), t.appendChild(a), a;
166
166
  }
167
167
  function it(t) {
168
168
  const y = t.canvas.parentNode;
@@ -176,73 +176,73 @@ function St(t, y) {
176
176
  const a = window.getComputedStyle(t);
177
177
  let d = "";
178
178
  for (let e = 0; e < a.length; e++) {
179
- const A = a[e];
180
- let x = a.getPropertyValue(A);
181
- if (x && x.indexOf("url(") !== -1 && !/url\(["']?data:/.test(x))
182
- if (A === "background-image" || A === "background" || A === "mask-image" || A === "border-image" || A === "border-image-source")
183
- x = "none";
179
+ const w = a[e];
180
+ let v = a.getPropertyValue(w);
181
+ if (v && v.indexOf("url(") !== -1 && !/url\(["']?data:/.test(v))
182
+ if (w === "background-image" || w === "background" || w === "mask-image" || w === "border-image" || w === "border-image-source")
183
+ v = "none";
184
184
  else
185
185
  continue;
186
- d += `${A}:${x};`;
186
+ d += `${w}:${v};`;
187
187
  }
188
188
  y.setAttribute("style", d);
189
189
  }
190
- function Qt(t, y) {
190
+ function Jt(t, y) {
191
191
  St(t, y);
192
192
  const a = t.querySelectorAll("*"), d = y.querySelectorAll("*");
193
193
  for (let e = 0; e < a.length; e++)
194
194
  d[e] && St(a[e], d[e]);
195
195
  }
196
- function Yt(t, y) {
196
+ function Qt(t, y) {
197
197
  const a = t.querySelectorAll("canvas"), d = y.querySelectorAll("canvas");
198
- a.forEach((e, A) => {
199
- if (!d[A]) return;
200
- const x = document.createElement("img");
198
+ a.forEach((e, w) => {
199
+ if (!d[w]) return;
200
+ const v = document.createElement("img");
201
201
  try {
202
- x.src = e.toDataURL("image/png");
202
+ v.src = e.toDataURL("image/png");
203
203
  } catch {
204
204
  return;
205
205
  }
206
206
  const z = e.getBoundingClientRect();
207
- x.setAttribute("style", `width:${z.width}px;height:${z.height}px;display:block;`), d[A].replaceWith(x);
207
+ v.setAttribute("style", `width:${z.width}px;height:${z.height}px;display:block;`), d[w].replaceWith(v);
208
208
  });
209
209
  }
210
- async function rt(t, y = {}) {
210
+ async function lt(t, y = {}) {
211
211
  if (!t) return;
212
212
  const {
213
213
  nomeArquivo: a = "componente.png",
214
214
  escala: d = 2,
215
215
  corFundo: e = null
216
- } = y, A = t.getBoundingClientRect(), x = Math.ceil(A.width), z = Math.ceil(A.height), H = t.cloneNode(!0);
217
- Qt(t, H), Yt(t, H), H.style.margin = "0", H.style.transform = "none";
218
- const P = new XMLSerializer().serializeToString(H), w = `<svg xmlns="http://www.w3.org/2000/svg" width="${x}" height="${z}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="width:${x}px;height:${z}px;">` + P + "</div></foreignObject></svg>", O = "data:image/svg+xml;base64," + (typeof window < "u" && window.btoa ? window.btoa(unescape(encodeURIComponent(w))) : ""), I = new Image();
219
- await new Promise((k, E) => {
220
- I.onload = k, I.onerror = E, I.src = O;
216
+ } = y, w = t.getBoundingClientRect(), v = Math.ceil(w.width), z = Math.ceil(w.height), D = t.cloneNode(!0);
217
+ Jt(t, D), Qt(t, D), D.style.margin = "0", D.style.transform = "none";
218
+ const O = new XMLSerializer().serializeToString(D), E = `<svg xmlns="http://www.w3.org/2000/svg" width="${v}" height="${z}"><foreignObject width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml" style="width:${v}px;height:${z}px;">` + O + "</div></foreignObject></svg>", I = "data:image/svg+xml;base64," + (typeof window < "u" && window.btoa ? window.btoa(unescape(encodeURIComponent(E))) : ""), W = new Image();
219
+ await new Promise((B, S) => {
220
+ W.onload = B, W.onerror = S, W.src = I;
221
221
  });
222
- const J = document.createElement("canvas");
223
- J.width = x * d, J.height = z * d;
224
- const v = J.getContext("2d");
225
- v.scale(d, d), e && (v.fillStyle = e, v.fillRect(0, 0, x, z)), v.drawImage(I, 0, 0);
222
+ const Q = document.createElement("canvas");
223
+ Q.width = v * d, Q.height = z * d;
224
+ const m = Q.getContext("2d");
225
+ m.scale(d, d), e && (m.fillStyle = e, m.fillRect(0, 0, v, z)), m.drawImage(W, 0, 0);
226
226
  let r;
227
227
  try {
228
- r = J.toDataURL("image/png");
229
- } catch (k) {
230
- console.error("Falha ao exportar imagem: canvas contaminado.", k);
228
+ r = Q.toDataURL("image/png");
229
+ } catch (B) {
230
+ console.error("Falha ao exportar imagem: canvas contaminado.", B);
231
231
  return;
232
232
  }
233
233
  const $ = document.createElement("a");
234
234
  $.download = a, $.href = r, document.body.appendChild($), $.click(), document.body.removeChild($);
235
235
  }
236
- const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>', Ut = { class: "card-linhas__header" }, Gt = { class: "card-linhas__topo" }, Zt = {
236
+ const nt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>', Ut = { class: "card-linhas__header flex flex-column" }, Gt = { class: "card-linhas__topo flex align-items-start justify-content-between gap-3" }, Zt = {
237
237
  key: 0,
238
- class: "card-linhas__legendas"
238
+ class: "card-linhas__legendas flex flex-column"
239
239
  }, Kt = {
240
240
  key: 1,
241
- class: "card-linhas__actions"
241
+ class: "card-linhas__actions inline-flex align-items-center gap-2"
242
242
  }, te = ["innerHTML"], ee = {
243
243
  key: 0,
244
- class: "card-linhas__titulos mt-3 mb-2"
245
- }, ae = { class: "card-linhas__chart" }, oe = {
244
+ class: "card-linhas__titulos mt-3 mb-2 flex flex-column"
245
+ }, ae = { class: "card-linhas__chart flex-1" }, oe = {
246
246
  key: 0,
247
247
  class: "card-linhas__footer mt-3"
248
248
  }, re = {
@@ -296,27 +296,27 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
296
296
  },
297
297
  emits: ["botaoAcao", "exportado"],
298
298
  setup(t, { emit: y }) {
299
- const a = t, d = y, { palette: e, cardStyle: A } = ot(a), { formatar: x } = ut(a), z = G(null), H = lt;
300
- async function P() {
301
- await rt(z.value, {
299
+ const a = t, d = y, { palette: e, cardStyle: w } = rt(a), { formatar: v } = ut(a), z = tt(null), D = nt;
300
+ async function O() {
301
+ await lt(z.value, {
302
302
  nomeArquivo: a.nomeArquivoExport,
303
303
  corFundo: e.value.bg !== "transparent" ? e.value.bg : null
304
304
  }), d("exportado");
305
305
  }
306
- const w = R(() => `card-linhas--${a.direcao}`), T = R(() => ({
307
- labels: a.data.map((v) => v.rotulo),
306
+ const E = R(() => `card-linhas--${a.direcao}`), T = R(() => ({
307
+ labels: a.data.map((m) => m.rotulo),
308
308
  datasets: [
309
309
  {
310
- data: a.data.map((v) => v.quantidade),
310
+ data: a.data.map((m) => m.quantidade),
311
311
  borderColor: a.corDetalhes,
312
312
  borderWidth: 3,
313
313
  borderJoinStyle: "round",
314
314
  borderCapStyle: "round",
315
- backgroundColor: (v) => {
316
- const { chart: r } = v, { ctx: $, chartArea: k } = r;
317
- if (!k) return "transparent";
318
- const E = a.corDetalhes || "#0400FF", c = "#7C7C7C", N = $.createLinearGradient(0, k.top, 0, k.bottom);
319
- return N.addColorStop(0.16, L(E, 0.2)), N.addColorStop(1, L(c, 0)), N;
315
+ backgroundColor: (m) => {
316
+ const { chart: r } = m, { ctx: $, chartArea: B } = r;
317
+ if (!B) return "transparent";
318
+ const S = a.corDetalhes || "#0400FF", c = "#7C7C7C", N = $.createLinearGradient(0, B.top, 0, B.bottom);
319
+ return N.addColorStop(0.16, V(S, 0.2)), N.addColorStop(1, V(c, 0)), N;
320
320
  },
321
321
  fill: !0,
322
322
  tension: 0.45,
@@ -329,49 +329,63 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
329
329
  }
330
330
  ]
331
331
  }));
332
- function O(v) {
333
- const { chart: r, tooltip: $ } = v, k = it(r);
334
- if (!k) return;
335
- const E = ft(k);
332
+ function I(m) {
333
+ const { chart: r, tooltip: $ } = m, B = it(r);
334
+ if (!B) return;
335
+ const S = pt(B);
336
336
  if ($.opacity === 0) {
337
- E.style.opacity = "0";
337
+ S.style.opacity = "0";
338
338
  return;
339
339
  }
340
- const c = $.title || [], N = ($.body || []).flatMap((C) => C.lines), F = E.querySelector(".nc-tt__content"), Q = a.corDetalhes || "#3B82F6";
341
- F.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${c.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${Q};box-shadow:0 0 0 2px ${L(Q, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${N.join(" ")}</span></div>`;
342
- const { offsetLeft: p, offsetTop: m } = r.canvas;
343
- E.style.opacity = "1", E.style.visibility = "hidden", E.style.left = "0px", E.style.top = "0px";
344
- const s = E.offsetWidth, b = E.offsetHeight, g = 4, D = dt(p + $.caretX, s, k.clientWidth, g);
345
- let B = m + $.caretY;
346
- const q = b + 16 + g;
347
- B < q && (B = q), E.style.left = D + "px", E.style.top = B + "px", E.style.visibility = "visible";
340
+ const c = $.title || [], N = ($.body || []).flatMap((Z) => Z.lines), F = S.querySelector(".nc-tt__content"), U = a.corDetalhes || "#3B82F6";
341
+ F.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${c.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${U};box-shadow:0 0 0 2px ${V(U, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${N.join(" ")}</span></div>`;
342
+ const { offsetLeft: f, offsetTop: b } = r.canvas;
343
+ S.style.opacity = "1", S.style.visibility = "hidden", S.style.left = "0px", S.style.top = "0px";
344
+ const s = S.offsetWidth, h = S.offsetHeight, g = 4, L = f + $.caretX, C = b + $.caretY, q = dt(L, s, B.clientWidth, g), A = h + 16 + g, X = C < A;
345
+ let K;
346
+ X ? (S.style.transform = "translateX(-50%) translateY(16px)", K = C) : (S.style.transform = "translate(-50%, calc(-100% - 16px))", K = C), S.style.left = q + "px", S.style.top = K + "px";
347
+ const M = S.querySelector(".nc-tt__caret");
348
+ if (M) {
349
+ const Z = L - q, G = s / 2, P = Math.max(-G + 8, Math.min(G - 8, Z));
350
+ M.style.left = `calc(50% + ${P}px)`, X ? (M.style.bottom = "", M.style.top = "-5px", M.style.borderRight = "", M.style.borderBottom = "", M.style.borderLeft = "1px solid rgba(15,23,42,.06)", M.style.borderTop = "1px solid rgba(15,23,42,.06)") : (M.style.top = "", M.style.bottom = "-5px", M.style.borderLeft = "", M.style.borderTop = "", M.style.borderRight = "1px solid rgba(15,23,42,.06)", M.style.borderBottom = "1px solid rgba(15,23,42,.06)");
351
+ }
352
+ S.style.visibility = "visible";
348
353
  }
349
- const I = R(() => ({
354
+ const W = R(() => ({
350
355
  responsive: !0,
351
356
  maintainAspectRatio: !1,
352
357
  interaction: { intersect: !1, mode: "index" },
353
358
  layout: {
354
- padding: { top: 12, right: 0, bottom: 0, left: 0 }
359
+ padding: { top: 0, right: 0, bottom: 0, left: 0 }
355
360
  },
356
361
  plugins: {
357
362
  legend: { display: !1 },
358
363
  tooltip: {
359
364
  enabled: !1,
360
- external: O,
365
+ external: I,
361
366
  callbacks: {
362
- title: (v) => {
367
+ title: (m) => {
363
368
  var r;
364
- return ((r = v[0]) == null ? void 0 : r.label) ?? "";
369
+ return ((r = m[0]) == null ? void 0 : r.label) ?? "";
365
370
  },
366
- label: (v) => x(v.parsed.y)
371
+ label: (m) => v(m.parsed.y)
367
372
  }
368
373
  }
369
374
  },
370
375
  scales: {
371
376
  x: {
377
+ display: !0,
378
+ afterFit: (m) => {
379
+ m.paddingLeft = 0, m.paddingRight = 0;
380
+ },
372
381
  grid: { display: !1, drawBorder: !1 },
373
382
  border: { display: !1 },
374
- ticks: { color: e.value.muted, font: { size: 11, family: "'Inter', sans-serif" }, padding: 8 }
383
+ ticks: {
384
+ color: e.value.muted,
385
+ font: { size: 10, family: "'Inter', sans-serif" },
386
+ padding: 8,
387
+ align: "inner"
388
+ }
375
389
  },
376
390
  y: {
377
391
  display: !1,
@@ -380,107 +394,107 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
380
394
  }
381
395
  }
382
396
  }));
383
- function J() {
397
+ function Q() {
384
398
  d("botaoAcao");
385
399
  }
386
- return (v, r) => (l(), n("div", {
400
+ return (m, r) => (l(), n("div", {
387
401
  ref_key: "cardRef",
388
402
  ref: z,
389
- class: et(["card-linhas p-4", w.value]),
390
- style: u(o(A))
403
+ class: at(["card-linhas p-4 flex", E.value]),
404
+ style: u(o(w))
391
405
  }, [
392
- f("div", Ut, [
393
- f("div", Gt, [
394
- v.$slots.legenda || t.legenda || v.$slots.sublegenda || t.sublegenda ? (l(), n("div", Zt, [
395
- v.$slots.legenda || t.legenda ? (l(), n("div", {
406
+ p("div", Ut, [
407
+ p("div", Gt, [
408
+ m.$slots.legenda || t.legenda || m.$slots.sublegenda || t.sublegenda ? (l(), n("div", Zt, [
409
+ m.$slots.legenda || t.legenda ? (l(), n("div", {
396
410
  key: 0,
397
- class: "text-sm font-medium",
411
+ class: "text-xs font-medium",
398
412
  style: u({ color: o(e).text, opacity: 0.85 })
399
413
  }, [
400
- S(v.$slots, "legenda", {}, () => [
401
- V(h(t.legenda), 1)
414
+ k(m.$slots, "legenda", {}, () => [
415
+ j(x(t.legenda), 1)
402
416
  ], !0)
403
417
  ], 4)) : i("", !0),
404
- v.$slots.sublegenda || t.sublegenda ? (l(), n("div", {
418
+ m.$slots.sublegenda || t.sublegenda ? (l(), n("div", {
405
419
  key: 1,
406
420
  class: "text-xs",
407
421
  style: u({ color: o(e).muted })
408
422
  }, [
409
- S(v.$slots, "sublegenda", {}, () => [
410
- V(h(t.sublegenda), 1)
423
+ k(m.$slots, "sublegenda", {}, () => [
424
+ j(x(t.sublegenda), 1)
411
425
  ], !0)
412
426
  ], 4)) : i("", !0)
413
427
  ])) : i("", !0),
414
- v.$slots.actions || t.botaoVisivel || t.exportar ? (l(), n("div", Kt, [
415
- S(v.$slots, "actions", {}, () => [
428
+ m.$slots.actions || t.botaoVisivel || t.exportar ? (l(), n("div", Kt, [
429
+ k(m.$slots, "actions", {}, () => [
416
430
  t.botaoVisivel ? (l(), n("button", {
417
431
  key: 0,
418
- class: "card-linhas__btn",
419
- style: u({ color: o(e).text, borderColor: o(L)(o(e).text, 0.18) }),
420
- onClick: J
432
+ class: "card-linhas__btn inline-flex align-items-center",
433
+ style: u({ color: o(e).text, borderColor: o(V)(o(e).text, 0.18) }),
434
+ onClick: Q
421
435
  }, [
422
- f("span", null, h(t.textoBotao), 1)
436
+ p("span", null, x(t.textoBotao), 1)
423
437
  ], 4)) : i("", !0)
424
438
  ], !0),
425
439
  t.exportar ? (l(), n("button", {
426
440
  key: 0,
427
441
  type: "button",
428
- class: "card-linhas__exportar",
429
- style: u({ color: o(e).muted, borderColor: o(L)(o(e).text, 0.18) }),
442
+ class: "card-linhas__exportar inline-flex align-items-center justify-content-center",
443
+ style: u({ color: o(e).muted, borderColor: o(V)(o(e).text, 0.18) }),
430
444
  title: "Exportar como imagem",
431
445
  "aria-label": "Exportar como imagem",
432
- onClick: P,
433
- innerHTML: o(H)
446
+ onClick: O,
447
+ innerHTML: o(D)
434
448
  }, null, 12, te)) : i("", !0)
435
449
  ])) : i("", !0)
436
450
  ]),
437
- v.$slots.titulo || t.titulo || v.$slots.descricao || t.descricao ? (l(), n("div", ee, [
438
- v.$slots.titulo || t.titulo ? (l(), n("div", {
451
+ m.$slots.titulo || t.titulo || m.$slots.descricao || t.descricao ? (l(), n("div", ee, [
452
+ m.$slots.titulo || t.titulo ? (l(), n("div", {
439
453
  key: 0,
440
- class: "text-4xl font-semibold line-height-2",
441
- style: u({ color: o(e).text })
454
+ class: "m-0 text-3xl font-semibold",
455
+ style: u({ color: o(e).text, lineHeight: "33px", letterSpacing: "-1px" })
442
456
  }, [
443
- S(v.$slots, "titulo", {}, () => [
444
- V(h(t.titulo), 1)
457
+ k(m.$slots, "titulo", {}, () => [
458
+ j(x(t.titulo), 1)
445
459
  ], !0)
446
460
  ], 4)) : i("", !0),
447
- v.$slots.descricao || t.descricao ? (l(), n("div", {
461
+ m.$slots.descricao || t.descricao ? (l(), n("div", {
448
462
  key: 1,
449
463
  class: "text-sm mt-1",
450
464
  style: u({ color: o(e).muted })
451
465
  }, [
452
- S(v.$slots, "descricao", {}, () => [
453
- V(h(t.descricao), 1)
466
+ k(m.$slots, "descricao", {}, () => [
467
+ j(x(t.descricao), 1)
454
468
  ], !0)
455
469
  ], 4)) : i("", !0)
456
470
  ])) : i("", !0)
457
471
  ]),
458
- f("div", ae, [
459
- ct(at, {
472
+ p("div", ae, [
473
+ ct(ot, {
460
474
  type: "line",
461
475
  data: T.value,
462
- options: I.value,
476
+ options: W.value,
463
477
  height: t.height
464
478
  }, null, 8, ["data", "options", "height"])
465
479
  ]),
466
- v.$slots.footer ? (l(), n("div", oe, [
467
- S(v.$slots, "footer", {}, void 0, !0)
480
+ m.$slots.footer ? (l(), n("div", oe, [
481
+ k(m.$slots, "footer", {}, void 0, !0)
468
482
  ])) : i("", !0)
469
483
  ], 6));
470
484
  }
471
- }, le = /* @__PURE__ */ Z(re, [["__scopeId", "data-v-5957ee17"]]), ne = { class: "card-pizza__topo" }, se = {
485
+ }, le = /* @__PURE__ */ et(re, [["__scopeId", "data-v-2ab2b571"]]), ne = { class: "card-pizza__topo flex align-items-start justify-content-between gap-3" }, se = {
472
486
  key: 0,
473
- class: "card-pizza__legendas"
487
+ class: "card-pizza__legendas flex flex-column"
474
488
  }, ie = {
475
489
  key: 1,
476
- class: "card-pizza__actions"
477
- }, de = ["innerHTML"], ce = { class: "card-pizza__corpo" }, ue = { class: "card-pizza__tabela" }, pe = { class: "card-pizza__tabela-valor" }, fe = { class: "card-pizza__tabela-rotulo" }, ge = { class: "card-pizza__tabela-valor" }, ye = { class: "card-pizza__chart-wrap" }, me = { class: "card-pizza__chart" }, be = {
490
+ class: "card-pizza__actions inline-flex align-items-center gap-2"
491
+ }, de = ["innerHTML"], ce = { class: "card-pizza__corpo flex align-items-center gap-4" }, ue = { class: "card-pizza__tabela flex flex-column" }, fe = { class: "card-pizza__tabela-valor" }, pe = { class: "card-pizza__tabela-rotulo inline-flex align-items-center gap-2" }, ge = { class: "card-pizza__tabela-valor" }, ye = { class: "card-pizza__chart-wrap flex align-items-center justify-content-center" }, me = { class: "card-pizza__chart" }, be = {
478
492
  key: 0,
479
- class: "card-pizza__centro"
493
+ class: "card-pizza__centro flex flex-column align-items-center justify-content-center"
480
494
  }, he = {
481
495
  key: 0,
482
496
  class: "card-pizza__footer mt-3"
483
- }, ve = {
497
+ }, xe = {
484
498
  __name: "CardPizza",
485
499
  props: {
486
500
  legenda: { type: String, default: null },
@@ -533,21 +547,21 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
533
547
  },
534
548
  emits: ["botaoAcao", "exportado"],
535
549
  setup(t, { emit: y }) {
536
- const a = t, d = y, { palette: e, cardStyle: A } = ot(a), { formatar: x } = ut(a), z = G(null);
537
- async function H() {
538
- await rt(z.value, {
550
+ const a = t, d = y, { palette: e, cardStyle: w } = rt(a), { formatar: v } = ut(a), z = tt(null);
551
+ async function D() {
552
+ await lt(z.value, {
539
553
  nomeArquivo: a.nomeArquivoExport,
540
554
  corFundo: e.value.bg !== "transparent" ? e.value.bg : null
541
555
  }), d("exportado");
542
556
  }
543
- const P = R(() => `card-pizza--${a.direcao}`), w = R(
557
+ const O = R(() => `card-pizza--${a.direcao}`), E = R(
544
558
  () => a.data.map((r, $) => a.cores[$ % a.cores.length])
545
559
  ), T = R(() => ({
546
560
  labels: a.data.map((r) => r.rotulo),
547
561
  datasets: [
548
562
  {
549
563
  data: a.data.map((r) => r.quantidade),
550
- backgroundColor: w.value,
564
+ backgroundColor: E.value,
551
565
  borderWidth: 0,
552
566
  borderColor: "transparent",
553
567
  hoverOffset: 6,
@@ -556,24 +570,24 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
556
570
  }
557
571
  ]
558
572
  }));
559
- function O(r) {
560
- const { chart: $, tooltip: k } = r, E = it($);
561
- if (!E) return;
562
- const c = ft(E);
563
- if (k.opacity === 0) {
573
+ function I(r) {
574
+ const { chart: $, tooltip: B } = r, S = it($);
575
+ if (!S) return;
576
+ const c = pt(S);
577
+ if (B.opacity === 0) {
564
578
  c.style.opacity = "0";
565
579
  return;
566
580
  }
567
- const N = k.title || [], F = k.dataPoints && k.dataPoints[0], Q = F ? w.value[F.dataIndex] : "#3B82F6", p = F ? x(F.parsed) : "", m = c.querySelector(".nc-tt__content");
568
- m.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${N.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${Q};box-shadow:0 0 0 2px ${L(Q, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${p}</span></div>`;
569
- const { offsetLeft: s, offsetTop: b } = $.canvas;
581
+ const N = B.title || [], F = B.dataPoints && B.dataPoints[0], U = F ? E.value[F.dataIndex] : "#3B82F6", f = F ? v(F.parsed) : "", b = c.querySelector(".nc-tt__content");
582
+ b.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${N.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${U};box-shadow:0 0 0 2px ${V(U, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${f}</span></div>`;
583
+ const { offsetLeft: s, offsetTop: h } = $.canvas;
570
584
  c.style.opacity = "1", c.style.visibility = "hidden", c.style.left = "0px", c.style.top = "0px";
571
- const g = c.offsetWidth, D = c.offsetHeight, B = 4, q = dt(s + k.caretX, g, E.clientWidth, B);
572
- let C = b + k.caretY;
573
- const Y = D + 16 + B;
574
- C < Y && (C = Y), c.style.left = q + "px", c.style.top = C + "px", c.style.visibility = "visible";
585
+ const g = c.offsetWidth, L = c.offsetHeight, C = 4, q = dt(s + B.caretX, g, S.clientWidth, C);
586
+ let A = h + B.caretY;
587
+ const X = L + 16 + C;
588
+ A < X && (A = X), c.style.left = q + "px", c.style.top = A + "px", c.style.visibility = "visible";
575
589
  }
576
- const I = R(() => ({
590
+ const W = R(() => ({
577
591
  responsive: !0,
578
592
  maintainAspectRatio: !1,
579
593
  cutout: a.cutout,
@@ -582,36 +596,36 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
582
596
  legend: { display: !1 },
583
597
  tooltip: {
584
598
  enabled: !1,
585
- external: O,
599
+ external: I,
586
600
  callbacks: {
587
601
  title: (r) => {
588
602
  var $;
589
603
  return (($ = r[0]) == null ? void 0 : $.label) ?? "";
590
604
  },
591
- label: (r) => x(r.parsed)
605
+ label: (r) => v(r.parsed)
592
606
  }
593
607
  }
594
608
  }
595
609
  }));
596
- function J() {
610
+ function Q() {
597
611
  d("botaoAcao");
598
612
  }
599
- const v = lt;
613
+ const m = nt;
600
614
  return (r, $) => (l(), n("div", {
601
615
  ref_key: "cardRef",
602
616
  ref: z,
603
- class: et(["card-pizza p-4", P.value]),
604
- style: u(o(A))
617
+ class: at(["card-pizza p-4 flex flex-column", O.value]),
618
+ style: u(o(w))
605
619
  }, [
606
- f("div", ne, [
620
+ p("div", ne, [
607
621
  r.$slots.legenda || t.legenda || r.$slots.sublegenda || t.sublegenda ? (l(), n("div", se, [
608
622
  r.$slots.legenda || t.legenda ? (l(), n("div", {
609
623
  key: 0,
610
- class: "text-sm font-medium",
624
+ class: "text-xs font-medium",
611
625
  style: u({ color: o(e).text, opacity: 0.95 })
612
626
  }, [
613
- S(r.$slots, "legenda", {}, () => [
614
- V(h(t.legenda), 1)
627
+ k(r.$slots, "legenda", {}, () => [
628
+ j(x(t.legenda), 1)
615
629
  ], !0)
616
630
  ], 4)) : i("", !0),
617
631
  r.$slots.sublegenda || t.sublegenda ? (l(), n("div", {
@@ -619,75 +633,75 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
619
633
  class: "text-xs",
620
634
  style: u({ color: o(e).muted })
621
635
  }, [
622
- S(r.$slots, "sublegenda", {}, () => [
623
- V(h(t.sublegenda), 1)
636
+ k(r.$slots, "sublegenda", {}, () => [
637
+ j(x(t.sublegenda), 1)
624
638
  ], !0)
625
639
  ], 4)) : i("", !0)
626
640
  ])) : i("", !0),
627
641
  r.$slots.actions || t.botaoVisivel || t.exportar ? (l(), n("div", ie, [
628
- S(r.$slots, "actions", {}, () => [
642
+ k(r.$slots, "actions", {}, () => [
629
643
  t.botaoVisivel ? (l(), n("button", {
630
644
  key: 0,
631
- class: "card-pizza__btn",
632
- style: u({ color: o(e).text, borderColor: o(L)(o(e).text, 0.18) }),
633
- onClick: J
645
+ class: "card-pizza__btn inline-flex align-items-center",
646
+ style: u({ color: o(e).text, borderColor: o(V)(o(e).text, 0.18) }),
647
+ onClick: Q
634
648
  }, [
635
- f("span", null, h(t.textoBotao), 1)
649
+ p("span", null, x(t.textoBotao), 1)
636
650
  ], 4)) : i("", !0)
637
651
  ], !0),
638
652
  t.exportar ? (l(), n("button", {
639
653
  key: 0,
640
654
  type: "button",
641
- class: "card-pizza__exportar",
642
- style: u({ color: o(e).muted, borderColor: o(L)(o(e).text, 0.18) }),
655
+ class: "card-pizza__exportar inline-flex align-items-center justify-content-center",
656
+ style: u({ color: o(e).muted, borderColor: o(V)(o(e).text, 0.18) }),
643
657
  title: "Exportar como imagem",
644
658
  "aria-label": "Exportar como imagem",
645
- onClick: H,
646
- innerHTML: o(v)
659
+ onClick: D,
660
+ innerHTML: o(m)
647
661
  }, null, 12, de)) : i("", !0)
648
662
  ])) : i("", !0)
649
663
  ]),
650
- f("div", ce, [
651
- f("div", ue, [
664
+ p("div", ce, [
665
+ p("div", ue, [
652
666
  t.mostrarCabecalho ? (l(), n("div", {
653
667
  key: 0,
654
- class: "card-pizza__tabela-cab",
655
- style: u({ color: o(e).muted, borderColor: o(L)(o(e).muted, 0.25) })
668
+ class: "card-pizza__tabela-cab flex align-items-center justify-content-between",
669
+ style: u({ color: o(e).muted, borderColor: o(V)(o(e).muted, 0.25) })
656
670
  }, [
657
- f("span", null, h(t.rotuloCategoria), 1),
658
- f("span", pe, h(t.rotuloQuantidade), 1)
671
+ p("span", null, x(t.rotuloCategoria), 1),
672
+ p("span", fe, x(t.rotuloQuantidade), 1)
659
673
  ], 4)) : i("", !0),
660
- (l(!0), n(pt, null, gt(t.data, (k, E) => (l(), n("div", {
661
- key: E,
662
- class: "card-pizza__tabela-linha",
674
+ (l(!0), n(ft, null, gt(t.data, (B, S) => (l(), n("div", {
675
+ key: S,
676
+ class: "card-pizza__tabela-linha flex align-items-center justify-content-between",
663
677
  style: u({ color: o(e).text })
664
678
  }, [
665
- f("span", fe, [
666
- f("span", {
679
+ p("span", pe, [
680
+ p("span", {
667
681
  class: "card-pizza__bolinha",
668
- style: u({ background: w.value[E] })
682
+ style: u({ background: E.value[S] })
669
683
  }, null, 4),
670
- f("span", null, h(k.rotulo), 1)
684
+ p("span", null, x(B.rotulo), 1)
671
685
  ]),
672
- f("span", ge, h(o(x)(k.quantidade)), 1)
686
+ p("span", ge, x(o(v)(B.quantidade)), 1)
673
687
  ], 4))), 128))
674
688
  ]),
675
- f("div", ye, [
676
- f("div", me, [
677
- ct(at, {
689
+ p("div", ye, [
690
+ p("div", me, [
691
+ ct(ot, {
678
692
  type: "doughnut",
679
693
  data: T.value,
680
- options: I.value,
694
+ options: W.value,
681
695
  height: t.height
682
696
  }, null, 8, ["data", "options", "height"]),
683
697
  r.$slots.titulo || t.titulo || r.$slots.descricao || t.descricao ? (l(), n("div", be, [
684
698
  r.$slots.titulo || t.titulo ? (l(), n("div", {
685
699
  key: 0,
686
- class: "card-pizza__centro-titulo",
700
+ class: "card-pizza__centro-titulo m-0 font-semibold",
687
701
  style: u({ color: o(e).text })
688
702
  }, [
689
- S(r.$slots, "titulo", {}, () => [
690
- V(h(t.titulo), 1)
703
+ k(r.$slots, "titulo", {}, () => [
704
+ j(x(t.titulo), 1)
691
705
  ], !0)
692
706
  ], 4)) : i("", !0),
693
707
  r.$slots.descricao || t.descricao ? (l(), n("div", {
@@ -695,8 +709,8 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
695
709
  class: "card-pizza__centro-desc",
696
710
  style: u({ color: o(e).muted })
697
711
  }, [
698
- S(r.$slots, "descricao", {}, () => [
699
- V(h(t.descricao), 1)
712
+ k(r.$slots, "descricao", {}, () => [
713
+ j(x(t.descricao), 1)
700
714
  ], !0)
701
715
  ], 4)) : i("", !0)
702
716
  ])) : i("", !0)
@@ -704,20 +718,20 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
704
718
  ])
705
719
  ]),
706
720
  r.$slots.footer ? (l(), n("div", he, [
707
- S(r.$slots, "footer", {}, void 0, !0)
721
+ k(r.$slots, "footer", {}, void 0, !0)
708
722
  ])) : i("", !0)
709
723
  ], 6));
710
724
  }
711
- }, xe = /* @__PURE__ */ Z(ve, [["__scopeId", "data-v-b1c30a0b"]]), $e = { class: "card-barra__header" }, Se = { class: "card-barra__topo" }, ke = {
725
+ }, ve = /* @__PURE__ */ et(xe, [["__scopeId", "data-v-fd01f68b"]]), $e = { class: "card-barra__header flex flex-column" }, Se = { class: "card-barra__topo flex align-items-start justify-content-between gap-3" }, ke = {
712
726
  key: 0,
713
- class: "card-barra__legendas"
727
+ class: "card-barra__legendas flex flex-column"
714
728
  }, Be = {
715
729
  key: 1,
716
- class: "card-barra__actions"
730
+ class: "card-barra__actions inline-flex align-items-center gap-2"
717
731
  }, Ce = ["innerHTML"], Ae = {
718
732
  key: 0,
719
- class: "card-barra__titulos mt-3 mb-2"
720
- }, Ee = { class: "card-barra__chart" }, we = {
733
+ class: "card-barra__titulos mt-3 mb-2 flex flex-column"
734
+ }, we = { class: "card-barra__chart flex-1" }, Ee = {
721
735
  key: 0,
722
736
  class: "card-barra__footer mt-3"
723
737
  }, qe = {
@@ -786,61 +800,61 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
786
800
  },
787
801
  emits: ["botaoAcao", "exportado"],
788
802
  setup(t, { emit: y }) {
789
- const a = t, d = y, { palette: e, cardStyle: A } = ot(a), { formatar: x } = ut(a), z = G(null), H = lt;
790
- async function P() {
791
- await rt(z.value, {
803
+ const a = t, d = y, { palette: e, cardStyle: w } = rt(a), { formatar: v } = ut(a), z = tt(null), D = nt;
804
+ async function O() {
805
+ await lt(z.value, {
792
806
  nomeArquivo: a.nomeArquivoExport,
793
807
  corFundo: e.value.bg !== "transparent" ? e.value.bg : null
794
808
  }), d("exportado");
795
809
  }
796
- const w = R(() => `card-barra--${a.direcao}`), T = R(() => a.orientacao === "horizontal"), O = R(() => Array.isArray(a.series) && a.series.length > 0 ? a.series.map((p, m) => ({
797
- nome: p.nome ?? `Série ${m + 1}`,
798
- cor: p.cor || a.cores[m % a.cores.length],
799
- dados: Array.isArray(p.dados) ? p.dados : []
800
- })) : [{ nome: a.legenda || "Valores", cor: a.corDetalhes, dados: a.data }]), I = R(() => {
801
- const p = O.value[0];
802
- return p ? p.dados.map((m) => m.rotulo) : [];
803
- }), J = R(() => {
804
- const p = O.value, m = p.length - 1, s = typeof a.larguraBarra == "number" ? a.larguraBarra : Number(a.larguraBarra) || 0.6, b = a.raioBarra, g = T.value;
805
- function D(B) {
806
- if (!a.empilhado || p.length === 1) return b;
807
- const q = B === 0, C = B === m;
810
+ const E = R(() => `card-barra--${a.direcao}`), T = R(() => a.orientacao === "horizontal"), I = R(() => Array.isArray(a.series) && a.series.length > 0 ? a.series.map((f, b) => ({
811
+ nome: f.nome ?? `Série ${b + 1}`,
812
+ cor: f.cor || a.cores[b % a.cores.length],
813
+ dados: Array.isArray(f.dados) ? f.dados : []
814
+ })) : [{ nome: a.legenda || "Valores", cor: a.corDetalhes, dados: a.data }]), W = R(() => {
815
+ const f = I.value[0];
816
+ return f ? f.dados.map((b) => b.rotulo) : [];
817
+ }), Q = R(() => {
818
+ const f = I.value, b = f.length - 1, s = typeof a.larguraBarra == "number" ? a.larguraBarra : Number(a.larguraBarra) || 0.6, h = a.raioBarra, g = T.value;
819
+ function L(C) {
820
+ if (!a.empilhado || f.length === 1) return h;
821
+ const q = C === 0, A = C === b;
808
822
  return g ? {
809
- topLeft: q ? b : 0,
810
- bottomLeft: q ? b : 0,
811
- topRight: C ? b : 0,
812
- bottomRight: C ? b : 0
823
+ topLeft: q ? h : 0,
824
+ bottomLeft: q ? h : 0,
825
+ topRight: A ? h : 0,
826
+ bottomRight: A ? h : 0
813
827
  } : {
814
- bottomLeft: q ? b : 0,
815
- bottomRight: q ? b : 0,
816
- topLeft: C ? b : 0,
817
- topRight: C ? b : 0
828
+ bottomLeft: q ? h : 0,
829
+ bottomRight: q ? h : 0,
830
+ topLeft: A ? h : 0,
831
+ topRight: A ? h : 0
818
832
  };
819
833
  }
820
834
  return {
821
- labels: I.value,
822
- datasets: p.map((B, q) => ({
823
- label: B.nome,
824
- data: B.dados.map((C) => C.quantidade),
825
- backgroundColor: B.cor,
826
- hoverBackgroundColor: B.cor,
835
+ labels: W.value,
836
+ datasets: f.map((C, q) => ({
837
+ label: C.nome,
838
+ data: C.dados.map((A) => A.quantidade),
839
+ backgroundColor: C.cor,
840
+ hoverBackgroundColor: C.cor,
827
841
  borderWidth: 0,
828
- borderRadius: D(q),
842
+ borderRadius: L(q),
829
843
  borderSkipped: !1,
830
844
  categoryPercentage: 0.9,
831
845
  barPercentage: s
832
846
  }))
833
847
  };
834
848
  });
835
- function v(p, m) {
836
- m ? Object.assign(p.style, {
849
+ function m(f, b) {
850
+ b ? Object.assign(f.style, {
837
851
  top: "-5px",
838
852
  bottom: "auto",
839
853
  borderTop: "1px solid rgba(15,23,42,.06)",
840
854
  borderLeft: "1px solid rgba(15,23,42,.06)",
841
855
  borderRight: "none",
842
856
  borderBottom: "none"
843
- }) : Object.assign(p.style, {
857
+ }) : Object.assign(f.style, {
844
858
  bottom: "-5px",
845
859
  top: "auto",
846
860
  borderRight: "1px solid rgba(15,23,42,.06)",
@@ -850,32 +864,32 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
850
864
  });
851
865
  }
852
866
  let r = null;
853
- function $(p) {
854
- const { chart: m, tooltip: s } = p, b = it(m);
855
- if (!b) return;
856
- const g = ft(b, { caretFlexivel: !0 });
867
+ function $(f) {
868
+ const { chart: b, tooltip: s } = f, h = it(b);
869
+ if (!h) return;
870
+ const g = pt(h, { caretFlexivel: !0 });
857
871
  if (s.opacity === 0 || r) {
858
872
  g.style.opacity = "0";
859
873
  return;
860
874
  }
861
- const D = s.title || [], B = s.dataPoints || [], q = g.querySelector(".nc-tt__content"), C = B.map((st) => {
862
- var vt;
863
- const ht = ((vt = O.value[st.datasetIndex]) == null ? void 0 : vt.cor) || a.corDetalhes, At = x(T.value ? st.parsed.x : st.parsed.y), Et = st.dataset.label && O.value.length > 1 ? `<span style="font-size:11px;color:#64748B;margin-right:6px;">${st.dataset.label}</span>` : "";
864
- return `<div style="display:flex;align-items:center;gap:6px;margin-top:2px;"><span style="width:6px;height:6px;border-radius:999px;background:${ht};box-shadow:0 0 0 2px ${L(ht, 0.15)};flex:0 0 auto;"></span>` + Et + `<span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;margin-left:auto;">${At}</span></div>`;
875
+ const L = s.title || [], C = s.dataPoints || [], q = g.querySelector(".nc-tt__content"), A = C.map((st) => {
876
+ var xt;
877
+ const ht = ((xt = I.value[st.datasetIndex]) == null ? void 0 : xt.cor) || a.corDetalhes, At = v(T.value ? st.parsed.x : st.parsed.y), wt = st.dataset.label && I.value.length > 1 ? `<span style="font-size:11px;color:#64748B;margin-right:6px;">${st.dataset.label}</span>` : "";
878
+ return `<div style="display:flex;align-items:center;gap:6px;margin-top:2px;"><span style="width:6px;height:6px;border-radius:999px;background:${ht};box-shadow:0 0 0 2px ${V(ht, 0.15)};flex:0 0 auto;"></span>` + wt + `<span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;margin-left:auto;">${At}</span></div>`;
865
879
  }).join("");
866
- q.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${D.join(" ")}</div>` + C;
867
- const { offsetLeft: Y, offsetTop: nt } = m.canvas;
880
+ q.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${L.join(" ")}</div>` + A;
881
+ const { offsetLeft: X, offsetTop: K } = b.canvas;
868
882
  g.style.opacity = "1", g.style.visibility = "hidden", g.style.left = "0px", g.style.top = "0px";
869
- const K = g.offsetWidth, tt = g.offsetHeight, U = 4, W = Y + s.caretX, X = nt + s.caretY, j = dt(W, K, b.clientWidth, U), _ = K / 2, M = 14, yt = X - M - tt, mt = yt < U, kt = mt ? X + M : yt, bt = g.querySelector(".nc-tt__caret");
870
- v(bt, mt);
871
- const Bt = W - (j - _), Ct = Math.max(10, Math.min(K - 10, Bt));
872
- bt.style.left = Ct + "px", g.style.left = j + "px", g.style.top = kt + "px", g.style.visibility = "visible";
883
+ const M = g.offsetWidth, Z = g.offsetHeight, G = 4, P = X + s.caretX, J = K + s.caretY, Y = dt(P, M, h.clientWidth, G), H = M / 2, _ = 14, yt = J - _ - Z, mt = yt < G, kt = mt ? J + _ : yt, bt = g.querySelector(".nc-tt__caret");
884
+ m(bt, mt);
885
+ const Bt = P - (Y - H), Ct = Math.max(10, Math.min(M - 10, Bt));
886
+ bt.style.left = Ct + "px", g.style.left = Y + "px", g.style.top = kt + "px", g.style.visibility = "visible";
873
887
  }
874
- const k = R(() => {
875
- const p = T.value, m = {
888
+ const B = R(() => {
889
+ const f = T.value, b = {
876
890
  grid: { display: !1, drawBorder: !1 },
877
891
  border: { display: !1 },
878
- ticks: { color: e.value.muted, font: { size: 11, family: "'Inter', sans-serif" }, padding: 8 },
892
+ ticks: { color: e.value.muted, font: { size: 10, family: "'Inter', sans-serif" }, padding: 8 },
879
893
  stacked: a.empilhado
880
894
  }, s = {
881
895
  display: !1,
@@ -886,19 +900,19 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
886
900
  return {
887
901
  responsive: !0,
888
902
  maintainAspectRatio: !1,
889
- indexAxis: p ? "y" : "x",
890
- interaction: { intersect: !1, mode: "index", axis: p ? "y" : "x" },
903
+ indexAxis: f ? "y" : "x",
904
+ interaction: { intersect: !1, mode: "index", axis: f ? "y" : "x" },
891
905
  layout: {
892
906
  padding: {
893
- top: c.value.length && !p ? 24 : 12,
894
- right: p ? 12 : 0,
907
+ top: c.value.length && !f ? 24 : 12,
908
+ right: f ? 12 : 0,
895
909
  bottom: 0,
896
- left: c.value.length && p ? 60 : 0
910
+ left: c.value.length && f ? 60 : 0
897
911
  }
898
912
  },
899
913
  plugins: {
900
914
  legend: {
901
- display: a.mostrarLegendaSeries && O.value.length > 1,
915
+ display: a.mostrarLegendaSeries && I.value.length > 1,
902
916
  position: "bottom",
903
917
  align: "start",
904
918
  labels: {
@@ -907,7 +921,7 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
907
921
  boxHeight: 8,
908
922
  usePointStyle: !0,
909
923
  pointStyle: "circle",
910
- font: { size: 11, family: "'Inter', sans-serif" },
924
+ font: { size: 10, family: "'Inter', sans-serif" },
911
925
  padding: 12
912
926
  }
913
927
  },
@@ -915,91 +929,91 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
915
929
  enabled: !1,
916
930
  external: $,
917
931
  callbacks: {
918
- title: (b) => {
932
+ title: (h) => {
919
933
  var g;
920
- return ((g = b[0]) == null ? void 0 : g.label) ?? "";
934
+ return ((g = h[0]) == null ? void 0 : g.label) ?? "";
921
935
  },
922
- label: (b) => x(p ? b.parsed.x : b.parsed.y)
936
+ label: (h) => v(f ? h.parsed.x : h.parsed.y)
923
937
  }
924
938
  }
925
939
  },
926
940
  scales: {
927
- x: p ? s : m,
928
- y: p ? m : s
941
+ x: f ? s : b,
942
+ y: f ? b : s
929
943
  }
930
944
  };
931
945
  });
932
- function E() {
946
+ function S() {
933
947
  d("botaoAcao");
934
948
  }
935
- const c = R(() => a.linhasReferencia ? (Array.isArray(a.linhasReferencia) ? a.linhasReferencia : [a.linhasReferencia]).filter((m) => m && (typeof m == "number" || typeof m.valor == "number")).map((m) => typeof m == "number" ? { valor: m, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
936
- valor: m.valor,
937
- rotulo: m.rotulo ?? null,
938
- cor: m.cor || "#0F172A",
939
- corRotulo: m.corRotulo || m.cor || "#0F172A",
940
- corTexto: m.corTexto || "#FFFFFF",
941
- tracejado: m.tracejado || [6, 6],
942
- espessura: m.espessura ?? 1
949
+ const c = R(() => a.linhasReferencia ? (Array.isArray(a.linhasReferencia) ? a.linhasReferencia : [a.linhasReferencia]).filter((b) => b && (typeof b == "number" || typeof b.valor == "number")).map((b) => typeof b == "number" ? { valor: b, rotulo: null, cor: "#0F172A", corRotulo: "#0F172A", corTexto: "#FFFFFF", tracejado: [6, 6], espessura: 1 } : {
950
+ valor: b.valor,
951
+ rotulo: b.rotulo ?? null,
952
+ cor: b.cor || "#0F172A",
953
+ corRotulo: b.corRotulo || b.cor || "#0F172A",
954
+ corTexto: b.corTexto || "#FFFFFF",
955
+ tracejado: b.tracejado || [6, 6],
956
+ espessura: b.espessura ?? 1
943
957
  }) : []), N = [], F = {
944
958
  id: "linhaReferencia",
945
- afterDatasetsDraw(p) {
946
- const m = c.value;
947
- if (N.length = 0, !m.length) return;
948
- const { ctx: s, chartArea: b, scales: g } = p, D = T.value, B = D ? g.x : g.y;
949
- B && m.forEach((q) => {
950
- const C = B.getPixelForValue(q.valor);
951
- if (N.push({ linha: q, pos: C, horizontal: D, chartArea: b }), s.save(), s.beginPath(), s.setLineDash(q.tracejado), s.lineWidth = q.espessura, s.strokeStyle = q.cor, D) {
952
- if (C < b.left || C > b.right) {
959
+ afterDatasetsDraw(f) {
960
+ const b = c.value;
961
+ if (N.length = 0, !b.length) return;
962
+ const { ctx: s, chartArea: h, scales: g } = f, L = T.value, C = L ? g.x : g.y;
963
+ C && b.forEach((q) => {
964
+ const A = C.getPixelForValue(q.valor);
965
+ if (N.push({ linha: q, pos: A, horizontal: L, chartArea: h }), s.save(), s.beginPath(), s.setLineDash(q.tracejado), s.lineWidth = q.espessura, s.strokeStyle = q.cor, L) {
966
+ if (A < h.left || A > h.right) {
953
967
  s.restore();
954
968
  return;
955
969
  }
956
- s.moveTo(C, b.top), s.lineTo(C, b.bottom);
970
+ s.moveTo(A, h.top), s.lineTo(A, h.bottom);
957
971
  } else {
958
- if (C < b.top || C > b.bottom) {
972
+ if (A < h.top || A > h.bottom) {
959
973
  s.restore();
960
974
  return;
961
975
  }
962
- s.moveTo(b.left, C), s.lineTo(b.right, C);
976
+ s.moveTo(h.left, A), s.lineTo(h.right, A);
963
977
  }
964
978
  if (s.stroke(), s.setLineDash([]), q.rotulo) {
965
979
  s.font = "600 11px 'Inter', sans-serif";
966
- const Y = 8, nt = 5, tt = s.measureText(q.rotulo).width, U = 12, W = tt + Y * 2, X = U + nt * 2, j = X / 2;
967
- let _, M;
968
- D ? (_ = C - W / 2, M = b.top - X - 6, M < 0 && (M = b.top + 6)) : (_ = b.left - W - 6, M = C - X / 2, _ < 0 && (_ = b.left + 6)), s.fillStyle = q.corRotulo, s.beginPath(), s.roundRect ? s.roundRect(_, M, W, X, j) : (s.moveTo(_ + j, M), s.lineTo(_ + W - j, M), s.quadraticCurveTo(_ + W, M, _ + W, M + j), s.lineTo(_ + W, M + X - j), s.quadraticCurveTo(_ + W, M + X, _ + W - j, M + X), s.lineTo(_ + j, M + X), s.quadraticCurveTo(_, M + X, _, M + X - j), s.lineTo(_, M + j), s.quadraticCurveTo(_, M, _ + j, M)), s.fill(), s.fillStyle = q.corTexto, s.textBaseline = "middle", s.textAlign = "center", s.fillText(q.rotulo, _ + W / 2, M + X / 2);
980
+ const X = 8, K = 5, Z = s.measureText(q.rotulo).width, G = 12, P = Z + X * 2, J = G + K * 2, Y = J / 2;
981
+ let H, _;
982
+ L ? (H = A - P / 2, _ = h.top - J - 6, _ < 0 && (_ = h.top + 6)) : (H = h.left - P - 6, _ = A - J / 2, H < 0 && (H = h.left + 6)), s.fillStyle = q.corRotulo, s.beginPath(), s.roundRect ? s.roundRect(H, _, P, J, Y) : (s.moveTo(H + Y, _), s.lineTo(H + P - Y, _), s.quadraticCurveTo(H + P, _, H + P, _ + Y), s.lineTo(H + P, _ + J - Y), s.quadraticCurveTo(H + P, _ + J, H + P - Y, _ + J), s.lineTo(H + Y, _ + J), s.quadraticCurveTo(H, _ + J, H, _ + J - Y), s.lineTo(H, _ + Y), s.quadraticCurveTo(H, _, H + Y, _)), s.fill(), s.fillStyle = q.corTexto, s.textBaseline = "middle", s.textAlign = "center", s.fillText(q.rotulo, H + P / 2, _ + J / 2);
969
983
  }
970
984
  s.restore();
971
985
  });
972
986
  },
973
- beforeEvent(p, m) {
987
+ beforeEvent(f, b) {
974
988
  if (!N.length) {
975
989
  r = null;
976
990
  return;
977
991
  }
978
- const s = m.event;
992
+ const s = b.event;
979
993
  if (!s || s.type === "mouseout" || s.x == null || s.y == null) {
980
994
  r = null;
981
995
  return;
982
996
  }
983
- const b = 8;
984
- let g = null, D = 1 / 0;
985
- for (const B of N) {
986
- const q = B.horizontal ? Math.abs(s.x - B.pos) : Math.abs(s.y - B.pos), C = B.horizontal ? s.y >= B.chartArea.top && s.y <= B.chartArea.bottom : s.x >= B.chartArea.left && s.x <= B.chartArea.right;
987
- q <= b && C && q < D && (D = q, g = B);
997
+ const h = 8;
998
+ let g = null, L = 1 / 0;
999
+ for (const C of N) {
1000
+ const q = C.horizontal ? Math.abs(s.x - C.pos) : Math.abs(s.y - C.pos), A = C.horizontal ? s.y >= C.chartArea.top && s.y <= C.chartArea.bottom : s.x >= C.chartArea.left && s.x <= C.chartArea.right;
1001
+ q <= h && A && q < L && (L = q, g = C);
988
1002
  }
989
1003
  r = g;
990
1004
  },
991
- afterEvent(p, m) {
1005
+ afterEvent(f, b) {
992
1006
  if (!N.length) return;
993
- const s = m.event;
1007
+ const s = b.event;
994
1008
  if (!s) return;
995
- const b = it(p);
996
- if (!b) return;
997
- let g = b.querySelector(".nc-tt-linhaRef");
1009
+ const h = it(f);
1010
+ if (!h) return;
1011
+ let g = h.querySelector(".nc-tt-linhaRef");
998
1012
  if (!r) {
999
1013
  g && (g.style.opacity = "0");
1000
1014
  return;
1001
1015
  }
1002
- const D = r;
1016
+ const L = r;
1003
1017
  g || (g = document.createElement("div"), g.className = "nc-tt-linhaRef", Object.assign(g.style, {
1004
1018
  position: "absolute",
1005
1019
  pointerEvents: "none",
@@ -1015,119 +1029,119 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1015
1029
  zIndex: "11",
1016
1030
  fontFamily: "'Inter', sans-serif",
1017
1031
  textAlign: "left"
1018
- }), b.appendChild(g));
1019
- const B = D.linha.cor || "#0F172A", q = x(D.linha.valor), C = D.linha.rotulo;
1020
- g.innerHTML = (C ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${C}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${B};box-shadow:0 0 0 2px ${L(B, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${q}</span></div>`;
1021
- const Y = p.canvas;
1032
+ }), h.appendChild(g));
1033
+ const C = L.linha.cor || "#0F172A", q = v(L.linha.valor), A = L.linha.rotulo;
1034
+ g.innerHTML = (A ? `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${A}</div>` : "") + `<div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${C};box-shadow:0 0 0 2px ${V(C, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${q}</span></div>`;
1035
+ const X = f.canvas;
1022
1036
  g.style.opacity = "1", g.style.visibility = "hidden", g.style.left = "0px", g.style.top = "0px";
1023
- const nt = g.offsetWidth, K = g.offsetHeight, tt = 4;
1024
- let U, W;
1025
- D.horizontal ? (U = Y.offsetLeft + D.pos, W = Y.offsetTop + s.y) : (U = Y.offsetLeft + s.x, W = Y.offsetTop + D.pos);
1026
- const X = dt(U, nt, b.clientWidth, tt);
1027
- let j = W;
1028
- const _ = K + 16 + tt;
1029
- j < _ && (j = _), g.style.left = X + "px", g.style.top = j + "px", g.style.visibility = "visible";
1037
+ const K = g.offsetWidth, M = g.offsetHeight, Z = 4;
1038
+ let G, P;
1039
+ L.horizontal ? (G = X.offsetLeft + L.pos, P = X.offsetTop + s.y) : (G = X.offsetLeft + s.x, P = X.offsetTop + L.pos);
1040
+ const J = dt(G, K, h.clientWidth, Z);
1041
+ let Y = P;
1042
+ const H = M + 16 + Z;
1043
+ Y < H && (Y = H), g.style.left = J + "px", g.style.top = Y + "px", g.style.visibility = "visible";
1030
1044
  }
1031
- }, Q = R(() => c.value.length ? [F] : []);
1032
- return (p, m) => (l(), n("div", {
1045
+ }, U = R(() => c.value.length ? [F] : []);
1046
+ return (f, b) => (l(), n("div", {
1033
1047
  ref_key: "cardRef",
1034
1048
  ref: z,
1035
- class: et(["card-barra p-4", w.value]),
1036
- style: u(o(A))
1049
+ class: at(["card-barra p-4 flex", E.value]),
1050
+ style: u(o(w))
1037
1051
  }, [
1038
- f("div", $e, [
1039
- f("div", Se, [
1040
- p.$slots.legenda || t.legenda || p.$slots.sublegenda || t.sublegenda ? (l(), n("div", ke, [
1041
- p.$slots.legenda || t.legenda ? (l(), n("div", {
1052
+ p("div", $e, [
1053
+ p("div", Se, [
1054
+ f.$slots.legenda || t.legenda || f.$slots.sublegenda || t.sublegenda ? (l(), n("div", ke, [
1055
+ f.$slots.legenda || t.legenda ? (l(), n("div", {
1042
1056
  key: 0,
1043
- class: "text-sm font-medium",
1057
+ class: "text-xs font-medium",
1044
1058
  style: u({ color: o(e).text, opacity: 0.85 })
1045
1059
  }, [
1046
- S(p.$slots, "legenda", {}, () => [
1047
- V(h(t.legenda), 1)
1060
+ k(f.$slots, "legenda", {}, () => [
1061
+ j(x(t.legenda), 1)
1048
1062
  ], !0)
1049
1063
  ], 4)) : i("", !0),
1050
- p.$slots.sublegenda || t.sublegenda ? (l(), n("div", {
1064
+ f.$slots.sublegenda || t.sublegenda ? (l(), n("div", {
1051
1065
  key: 1,
1052
1066
  class: "text-xs",
1053
1067
  style: u({ color: o(e).muted })
1054
1068
  }, [
1055
- S(p.$slots, "sublegenda", {}, () => [
1056
- V(h(t.sublegenda), 1)
1069
+ k(f.$slots, "sublegenda", {}, () => [
1070
+ j(x(t.sublegenda), 1)
1057
1071
  ], !0)
1058
1072
  ], 4)) : i("", !0)
1059
1073
  ])) : i("", !0),
1060
- p.$slots.actions || t.botaoVisivel || t.exportar ? (l(), n("div", Be, [
1061
- S(p.$slots, "actions", {}, () => [
1074
+ f.$slots.actions || t.botaoVisivel || t.exportar ? (l(), n("div", Be, [
1075
+ k(f.$slots, "actions", {}, () => [
1062
1076
  t.botaoVisivel ? (l(), n("button", {
1063
1077
  key: 0,
1064
- class: "card-barra__btn",
1065
- style: u({ color: o(e).text, borderColor: o(L)(o(e).text, 0.18) }),
1066
- onClick: E
1078
+ class: "card-barra__btn inline-flex align-items-center",
1079
+ style: u({ color: o(e).text, borderColor: o(V)(o(e).text, 0.18) }),
1080
+ onClick: S
1067
1081
  }, [
1068
- f("span", null, h(t.textoBotao), 1)
1082
+ p("span", null, x(t.textoBotao), 1)
1069
1083
  ], 4)) : i("", !0)
1070
1084
  ], !0),
1071
1085
  t.exportar ? (l(), n("button", {
1072
1086
  key: 0,
1073
1087
  type: "button",
1074
- class: "card-barra__exportar",
1075
- style: u({ color: o(e).muted, borderColor: o(L)(o(e).text, 0.18) }),
1088
+ class: "card-barra__exportar inline-flex align-items-center justify-content-center",
1089
+ style: u({ color: o(e).muted, borderColor: o(V)(o(e).text, 0.18) }),
1076
1090
  title: "Exportar como imagem",
1077
1091
  "aria-label": "Exportar como imagem",
1078
- onClick: P,
1079
- innerHTML: o(H)
1092
+ onClick: O,
1093
+ innerHTML: o(D)
1080
1094
  }, null, 12, Ce)) : i("", !0)
1081
1095
  ])) : i("", !0)
1082
1096
  ]),
1083
- p.$slots.titulo || t.titulo || p.$slots.descricao || t.descricao ? (l(), n("div", Ae, [
1084
- p.$slots.titulo || t.titulo ? (l(), n("div", {
1097
+ f.$slots.titulo || t.titulo || f.$slots.descricao || t.descricao ? (l(), n("div", Ae, [
1098
+ f.$slots.titulo || t.titulo ? (l(), n("div", {
1085
1099
  key: 0,
1086
- class: "text-4xl font-semibold line-height-2",
1087
- style: u({ color: o(e).text })
1100
+ class: "m-0 text-3xl font-semibold",
1101
+ style: u({ color: o(e).text, lineHeight: "33px", letterSpacing: "-1px" })
1088
1102
  }, [
1089
- S(p.$slots, "titulo", {}, () => [
1090
- V(h(t.titulo), 1)
1103
+ k(f.$slots, "titulo", {}, () => [
1104
+ j(x(t.titulo), 1)
1091
1105
  ], !0)
1092
1106
  ], 4)) : i("", !0),
1093
- p.$slots.descricao || t.descricao ? (l(), n("div", {
1107
+ f.$slots.descricao || t.descricao ? (l(), n("div", {
1094
1108
  key: 1,
1095
1109
  class: "text-sm mt-1",
1096
1110
  style: u({ color: o(e).muted })
1097
1111
  }, [
1098
- S(p.$slots, "descricao", {}, () => [
1099
- V(h(t.descricao), 1)
1112
+ k(f.$slots, "descricao", {}, () => [
1113
+ j(x(t.descricao), 1)
1100
1114
  ], !0)
1101
1115
  ], 4)) : i("", !0)
1102
1116
  ])) : i("", !0)
1103
1117
  ]),
1104
- f("div", Ee, [
1105
- ct(at, {
1118
+ p("div", we, [
1119
+ ct(ot, {
1106
1120
  type: "bar",
1107
- data: J.value,
1108
- options: k.value,
1109
- plugins: Q.value,
1121
+ data: Q.value,
1122
+ options: B.value,
1123
+ plugins: U.value,
1110
1124
  height: t.height
1111
1125
  }, null, 8, ["data", "options", "plugins", "height"])
1112
1126
  ]),
1113
- p.$slots.footer ? (l(), n("div", we, [
1114
- S(p.$slots, "footer", {}, void 0, !0)
1127
+ f.$slots.footer ? (l(), n("div", Ee, [
1128
+ k(f.$slots, "footer", {}, void 0, !0)
1115
1129
  ])) : i("", !0)
1116
1130
  ], 6));
1117
1131
  }
1118
- }, Re = /* @__PURE__ */ Z(qe, [["__scopeId", "data-v-a2aca0e2"]]), ze = { class: "card-polar__topo" }, Fe = {
1132
+ }, Re = /* @__PURE__ */ et(qe, [["__scopeId", "data-v-e1f47bcc"]]), ze = { class: "card-polar__topo flex align-items-start justify-content-between gap-3" }, Fe = {
1119
1133
  key: 0,
1120
- class: "card-polar__legendas"
1134
+ class: "card-polar__legendas flex flex-column"
1121
1135
  }, Te = {
1122
1136
  key: 1,
1123
- class: "card-polar__actions"
1124
- }, Le = ["innerHTML"], Ve = { class: "card-polar__corpo" }, Ne = { class: "card-polar__tabela" }, De = { class: "card-polar__tabela-valor" }, _e = { class: "card-polar__tabela-rotulo" }, Me = { class: "card-polar__tabela-valor" }, He = { class: "card-polar__chart-wrap" }, Pe = { class: "card-polar__chart" }, Oe = {
1137
+ class: "card-polar__actions inline-flex align-items-center gap-2"
1138
+ }, Le = ["innerHTML"], Ve = { class: "card-polar__corpo flex align-items-center gap-4" }, je = { class: "card-polar__tabela flex flex-column" }, Ne = { class: "card-polar__tabela-valor" }, He = { class: "card-polar__tabela-rotulo inline-flex align-items-center gap-2" }, _e = { class: "card-polar__tabela-valor" }, Me = { class: "card-polar__chart-wrap flex align-items-center justify-content-center" }, De = { class: "card-polar__chart" }, Pe = {
1125
1139
  key: 0,
1126
1140
  class: "card-polar__centro-bottom"
1127
- }, Ie = {
1141
+ }, Oe = {
1128
1142
  key: 0,
1129
1143
  class: "card-polar__footer mt-3"
1130
- }, We = {
1144
+ }, Ie = {
1131
1145
  __name: "CardPolar",
1132
1146
  props: {
1133
1147
  legenda: { type: String, default: null },
@@ -1180,16 +1194,16 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1180
1194
  },
1181
1195
  emits: ["botaoAcao", "exportado"],
1182
1196
  setup(t, { emit: y }) {
1183
- const a = t, d = y, { palette: e, cardStyle: A } = ot(a), { formatar: x } = ut(a), z = G(null), H = lt;
1184
- async function P() {
1185
- await rt(z.value, {
1197
+ const a = t, d = y, { palette: e, cardStyle: w } = rt(a), { formatar: v } = ut(a), z = tt(null), D = nt;
1198
+ async function O() {
1199
+ await lt(z.value, {
1186
1200
  nomeArquivo: a.nomeArquivoExport,
1187
1201
  corFundo: e.value.bg !== "transparent" ? e.value.bg : null
1188
1202
  }), d("exportado");
1189
1203
  }
1190
- const w = R(() => `card-polar--${a.direcao}`), T = R(
1204
+ const E = R(() => `card-polar--${a.direcao}`), T = R(
1191
1205
  () => a.data.map((r, $) => a.cores[$ % a.cores.length])
1192
- ), O = R(() => ({
1206
+ ), I = R(() => ({
1193
1207
  labels: a.data.map((r) => r.rotulo),
1194
1208
  datasets: [
1195
1209
  {
@@ -1201,24 +1215,24 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1201
1215
  }
1202
1216
  ]
1203
1217
  }));
1204
- function I(r) {
1205
- const { chart: $, tooltip: k } = r, E = it($);
1206
- if (!E) return;
1207
- const c = ft(E);
1208
- if (k.opacity === 0) {
1218
+ function W(r) {
1219
+ const { chart: $, tooltip: B } = r, S = it($);
1220
+ if (!S) return;
1221
+ const c = pt(S);
1222
+ if (B.opacity === 0) {
1209
1223
  c.style.opacity = "0";
1210
1224
  return;
1211
1225
  }
1212
- const N = k.title || [], F = k.dataPoints && k.dataPoints[0], Q = F ? T.value[F.dataIndex] : "#3B82F6", p = F ? x(F.parsed.r ?? F.parsed) : "", m = c.querySelector(".nc-tt__content");
1213
- m.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${N.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${Q};box-shadow:0 0 0 2px ${L(Q, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${p}</span></div>`;
1214
- const { offsetLeft: s, offsetTop: b } = $.canvas;
1226
+ const N = B.title || [], F = B.dataPoints && B.dataPoints[0], U = F ? T.value[F.dataIndex] : "#3B82F6", f = F ? v(F.parsed.r ?? F.parsed) : "", b = c.querySelector(".nc-tt__content");
1227
+ b.innerHTML = `<div style="font-size:9px;font-weight:500;color:#94A3B8;letter-spacing:.04em;text-transform:uppercase;line-height:1;margin-bottom:4px;">${N.join(" ")}</div><div style="display:flex;align-items:center;gap:6px;"><span style="width:6px;height:6px;border-radius:999px;background:${U};box-shadow:0 0 0 2px ${V(U, 0.15)};flex:0 0 auto;"></span><span style="font-size:12px;font-weight:700;color:#0F172A;letter-spacing:-.01em;line-height:1.1;">${f}</span></div>`;
1228
+ const { offsetLeft: s, offsetTop: h } = $.canvas;
1215
1229
  c.style.opacity = "1", c.style.visibility = "hidden", c.style.left = "0px", c.style.top = "0px";
1216
- const g = c.offsetWidth, D = c.offsetHeight, B = 4, q = dt(s + k.caretX, g, E.clientWidth, B);
1217
- let C = b + k.caretY;
1218
- const Y = D + 16 + B;
1219
- C < Y && (C = Y), c.style.left = q + "px", c.style.top = C + "px", c.style.visibility = "visible";
1230
+ const g = c.offsetWidth, L = c.offsetHeight, C = 4, q = dt(s + B.caretX, g, S.clientWidth, C);
1231
+ let A = h + B.caretY;
1232
+ const X = L + 16 + C;
1233
+ A < X && (A = X), c.style.left = q + "px", c.style.top = A + "px", c.style.visibility = "visible";
1220
1234
  }
1221
- const J = R(() => ({
1235
+ const Q = R(() => ({
1222
1236
  responsive: !0,
1223
1237
  maintainAspectRatio: !1,
1224
1238
  layout: { padding: 4 },
@@ -1228,11 +1242,11 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1228
1242
  ticks: { display: !1, backdropColor: "transparent" },
1229
1243
  grid: {
1230
1244
  display: a.mostrarLinhasGrade,
1231
- color: L(e.value.muted, 0.18)
1245
+ color: V(e.value.muted, 0.18)
1232
1246
  },
1233
1247
  angleLines: {
1234
1248
  display: a.mostrarLinhasGrade,
1235
- color: L(e.value.muted, 0.18)
1249
+ color: V(e.value.muted, 0.18)
1236
1250
  },
1237
1251
  pointLabels: { display: !1 }
1238
1252
  }
@@ -1241,7 +1255,7 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1241
1255
  legend: { display: !1 },
1242
1256
  tooltip: {
1243
1257
  enabled: !1,
1244
- external: I,
1258
+ external: W,
1245
1259
  callbacks: {
1246
1260
  title: (r) => {
1247
1261
  var $;
@@ -1249,30 +1263,30 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1249
1263
  },
1250
1264
  label: (r) => {
1251
1265
  var $;
1252
- return x((($ = r.parsed) == null ? void 0 : $.r) ?? r.parsed);
1266
+ return v((($ = r.parsed) == null ? void 0 : $.r) ?? r.parsed);
1253
1267
  }
1254
1268
  }
1255
1269
  }
1256
1270
  }
1257
1271
  }));
1258
- function v() {
1272
+ function m() {
1259
1273
  d("botaoAcao");
1260
1274
  }
1261
1275
  return (r, $) => (l(), n("div", {
1262
1276
  ref_key: "cardRef",
1263
1277
  ref: z,
1264
- class: et(["card-polar p-4", w.value]),
1265
- style: u(o(A))
1278
+ class: at(["card-polar p-4 flex flex-column", E.value]),
1279
+ style: u(o(w))
1266
1280
  }, [
1267
- f("div", ze, [
1281
+ p("div", ze, [
1268
1282
  r.$slots.legenda || t.legenda || r.$slots.sublegenda || t.sublegenda ? (l(), n("div", Fe, [
1269
1283
  r.$slots.legenda || t.legenda ? (l(), n("div", {
1270
1284
  key: 0,
1271
- class: "text-sm font-medium",
1285
+ class: "text-xs font-medium",
1272
1286
  style: u({ color: o(e).text, opacity: 0.95 })
1273
1287
  }, [
1274
- S(r.$slots, "legenda", {}, () => [
1275
- V(h(t.legenda), 1)
1288
+ k(r.$slots, "legenda", {}, () => [
1289
+ j(x(t.legenda), 1)
1276
1290
  ], !0)
1277
1291
  ], 4)) : i("", !0),
1278
1292
  r.$slots.sublegenda || t.sublegenda ? (l(), n("div", {
@@ -1280,75 +1294,75 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1280
1294
  class: "text-xs",
1281
1295
  style: u({ color: o(e).muted })
1282
1296
  }, [
1283
- S(r.$slots, "sublegenda", {}, () => [
1284
- V(h(t.sublegenda), 1)
1297
+ k(r.$slots, "sublegenda", {}, () => [
1298
+ j(x(t.sublegenda), 1)
1285
1299
  ], !0)
1286
1300
  ], 4)) : i("", !0)
1287
1301
  ])) : i("", !0),
1288
1302
  r.$slots.actions || t.botaoVisivel || t.exportar ? (l(), n("div", Te, [
1289
- S(r.$slots, "actions", {}, () => [
1303
+ k(r.$slots, "actions", {}, () => [
1290
1304
  t.botaoVisivel ? (l(), n("button", {
1291
1305
  key: 0,
1292
- class: "card-polar__btn",
1293
- style: u({ color: o(e).text, borderColor: o(L)(o(e).text, 0.18) }),
1294
- onClick: v
1306
+ class: "card-polar__btn inline-flex align-items-center",
1307
+ style: u({ color: o(e).text, borderColor: o(V)(o(e).text, 0.18) }),
1308
+ onClick: m
1295
1309
  }, [
1296
- f("span", null, h(t.textoBotao), 1)
1310
+ p("span", null, x(t.textoBotao), 1)
1297
1311
  ], 4)) : i("", !0)
1298
1312
  ], !0),
1299
1313
  t.exportar ? (l(), n("button", {
1300
1314
  key: 0,
1301
1315
  type: "button",
1302
- class: "card-polar__exportar",
1303
- style: u({ color: o(e).muted, borderColor: o(L)(o(e).text, 0.18) }),
1316
+ class: "card-polar__exportar inline-flex align-items-center justify-content-center",
1317
+ style: u({ color: o(e).muted, borderColor: o(V)(o(e).text, 0.18) }),
1304
1318
  title: "Exportar como imagem",
1305
1319
  "aria-label": "Exportar como imagem",
1306
- onClick: P,
1307
- innerHTML: o(H)
1320
+ onClick: O,
1321
+ innerHTML: o(D)
1308
1322
  }, null, 12, Le)) : i("", !0)
1309
1323
  ])) : i("", !0)
1310
1324
  ]),
1311
- f("div", Ve, [
1312
- f("div", Ne, [
1325
+ p("div", Ve, [
1326
+ p("div", je, [
1313
1327
  t.mostrarCabecalho ? (l(), n("div", {
1314
1328
  key: 0,
1315
- class: "card-polar__tabela-cab",
1316
- style: u({ color: o(e).muted, borderColor: o(L)(o(e).muted, 0.25) })
1329
+ class: "card-polar__tabela-cab flex align-items-center justify-content-between",
1330
+ style: u({ color: o(e).muted, borderColor: o(V)(o(e).muted, 0.25) })
1317
1331
  }, [
1318
- f("span", null, h(t.rotuloCategoria), 1),
1319
- f("span", De, h(t.rotuloQuantidade), 1)
1332
+ p("span", null, x(t.rotuloCategoria), 1),
1333
+ p("span", Ne, x(t.rotuloQuantidade), 1)
1320
1334
  ], 4)) : i("", !0),
1321
- (l(!0), n(pt, null, gt(t.data, (k, E) => (l(), n("div", {
1322
- key: E,
1323
- class: "card-polar__tabela-linha",
1335
+ (l(!0), n(ft, null, gt(t.data, (B, S) => (l(), n("div", {
1336
+ key: S,
1337
+ class: "card-polar__tabela-linha flex align-items-center justify-content-between",
1324
1338
  style: u({ color: o(e).text })
1325
1339
  }, [
1326
- f("span", _e, [
1327
- f("span", {
1340
+ p("span", He, [
1341
+ p("span", {
1328
1342
  class: "card-polar__bolinha",
1329
- style: u({ background: T.value[E] })
1343
+ style: u({ background: T.value[S] })
1330
1344
  }, null, 4),
1331
- f("span", null, h(k.rotulo), 1)
1345
+ p("span", null, x(B.rotulo), 1)
1332
1346
  ]),
1333
- f("span", Me, h(o(x)(k.quantidade)), 1)
1347
+ p("span", _e, x(o(v)(B.quantidade)), 1)
1334
1348
  ], 4))), 128))
1335
1349
  ]),
1336
- f("div", He, [
1337
- f("div", Pe, [
1338
- ct(at, {
1350
+ p("div", Me, [
1351
+ p("div", De, [
1352
+ ct(ot, {
1339
1353
  type: "polarArea",
1340
- data: O.value,
1341
- options: J.value,
1354
+ data: I.value,
1355
+ options: Q.value,
1342
1356
  height: t.height
1343
1357
  }, null, 8, ["data", "options", "height"]),
1344
- r.$slots.titulo || t.titulo || r.$slots.descricao || t.descricao ? (l(), n("div", Oe, [
1358
+ r.$slots.titulo || t.titulo || r.$slots.descricao || t.descricao ? (l(), n("div", Pe, [
1345
1359
  r.$slots.titulo || t.titulo ? (l(), n("div", {
1346
1360
  key: 0,
1347
- class: "card-polar__centro-titulo",
1348
- style: u({ color: o(e).text })
1361
+ class: "card-polar__centro-titulo m-0 text-3xl font-semibold",
1362
+ style: u({ color: o(e).text, lineHeight: "33px", letterSpacing: "-1px" })
1349
1363
  }, [
1350
- S(r.$slots, "titulo", {}, () => [
1351
- V(h(t.titulo), 1)
1364
+ k(r.$slots, "titulo", {}, () => [
1365
+ j(x(t.titulo), 1)
1352
1366
  ], !0)
1353
1367
  ], 4)) : i("", !0),
1354
1368
  r.$slots.descricao || t.descricao ? (l(), n("div", {
@@ -1356,32 +1370,32 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1356
1370
  class: "card-polar__centro-desc",
1357
1371
  style: u({ color: o(e).muted })
1358
1372
  }, [
1359
- S(r.$slots, "descricao", {}, () => [
1360
- V(h(t.descricao), 1)
1373
+ k(r.$slots, "descricao", {}, () => [
1374
+ j(x(t.descricao), 1)
1361
1375
  ], !0)
1362
1376
  ], 4)) : i("", !0)
1363
1377
  ])) : i("", !0)
1364
1378
  ])
1365
1379
  ])
1366
1380
  ]),
1367
- r.$slots.footer ? (l(), n("div", Ie, [
1368
- S(r.$slots, "footer", {}, void 0, !0)
1381
+ r.$slots.footer ? (l(), n("div", Oe, [
1382
+ k(r.$slots, "footer", {}, void 0, !0)
1369
1383
  ])) : i("", !0)
1370
1384
  ], 6));
1371
1385
  }
1372
- }, je = /* @__PURE__ */ Z(We, [["__scopeId", "data-v-76970135"]]), Xe = { class: "card-progresso__topo" }, Je = {
1386
+ }, We = /* @__PURE__ */ et(Ie, [["__scopeId", "data-v-32e940e9"]]), Xe = { class: "card-progresso__topo flex align-items-start justify-content-between gap-3" }, Ye = {
1373
1387
  key: 0,
1374
- class: "card-progresso__legendas"
1375
- }, Qe = {
1388
+ class: "card-progresso__legendas flex flex-column"
1389
+ }, Je = {
1376
1390
  key: 1,
1377
- class: "card-progresso__actions"
1378
- }, Ye = ["innerHTML"], Ue = {
1391
+ class: "card-progresso__actions inline-flex align-items-center gap-2"
1392
+ }, Qe = ["innerHTML"], Ue = {
1379
1393
  key: 0,
1380
- class: "card-progresso__titulos mt-3 mb-2"
1381
- }, Ge = { class: "card-progresso__corpo" }, Ze = {
1394
+ class: "card-progresso__titulos mt-3 mb-2 flex flex-column"
1395
+ }, Ge = { class: "card-progresso__corpo flex align-items-center gap-4 flex-wrap" }, Ze = {
1382
1396
  key: 0,
1383
- class: "card-progresso__chart-wrap"
1384
- }, Ke = { class: "card-progresso__chart" }, ta = { class: "card-progresso__centro" }, ea = { class: "card-progresso__lista" }, aa = { class: "card-progresso__item-cab" }, oa = {
1397
+ class: "card-progresso__chart-wrap flex align-items-center justify-content-center"
1398
+ }, Ke = { class: "card-progresso__chart" }, ta = { class: "card-progresso__centro flex flex-column align-items-center justify-content-center" }, ea = { class: "card-progresso__lista flex flex-column" }, aa = { class: "card-progresso__item-cab flex align-items-center justify-content-between" }, oa = {
1385
1399
  key: 1,
1386
1400
  class: "card-progresso__footer mt-3"
1387
1401
  }, ra = {
@@ -1442,30 +1456,30 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1442
1456
  },
1443
1457
  emits: ["botaoAcao", "exportado"],
1444
1458
  setup(t, { emit: y }) {
1445
- const a = t, d = y, { palette: e, cardStyle: A } = ot(a), { formatar: x } = ut(a), z = G(null), H = lt;
1446
- async function P() {
1447
- await rt(z.value, {
1459
+ const a = t, d = y, { palette: e, cardStyle: w } = rt(a), { formatar: v } = ut(a), z = tt(null), D = nt;
1460
+ async function O() {
1461
+ await lt(z.value, {
1448
1462
  nomeArquivo: a.nomeArquivoExport,
1449
1463
  corFundo: e.value.bg !== "transparent" ? e.value.bg : null
1450
1464
  }), d("exportado");
1451
1465
  }
1452
- const w = R(() => `card-progresso--${a.direcao}`), T = R(
1466
+ const E = R(() => `card-progresso--${a.direcao}`), T = R(
1453
1467
  () => a.data.map((c, N) => {
1454
- const F = Number(c.meta ?? a.metaPadrao) || 0, Q = Number(c.quantidade) || 0, p = c.cor || a.cores[N % a.cores.length], m = F > 0 ? Math.max(0, Math.min(100, Q / F * 100)) : 0;
1455
- return { rotulo: c.rotulo, quantidade: Q, meta: F, cor: p, percentual: m };
1468
+ const F = Number(c.meta ?? a.metaPadrao) || 0, U = Number(c.quantidade) || 0, f = c.cor || a.cores[N % a.cores.length], b = F > 0 ? Math.max(0, Math.min(100, U / F * 100)) : 0;
1469
+ return { rotulo: c.rotulo, quantidade: U, meta: F, cor: f, percentual: b };
1456
1470
  })
1457
- ), O = R(
1458
- () => typeof a.alturaBarra == "number" ? `${a.alturaBarra}px` : a.alturaBarra
1459
1471
  ), I = R(
1472
+ () => typeof a.alturaBarra == "number" ? `${a.alturaBarra}px` : a.alturaBarra
1473
+ ), W = R(
1460
1474
  () => typeof a.raioBarra == "number" ? `${a.raioBarra}px` : a.raioBarra
1461
- ), J = R(() => T.value.reduce((c, N) => c + N.quantidade, 0)), v = R(() => T.value.reduce((c, N) => c + N.meta, 0)), r = R(() => v.value <= 0 ? 0 : Math.max(0, Math.min(100, J.value / v.value * 100))), $ = R(() => {
1475
+ ), Q = R(() => T.value.reduce((c, N) => c + N.quantidade, 0)), m = R(() => T.value.reduce((c, N) => c + N.meta, 0)), r = R(() => m.value <= 0 ? 0 : Math.max(0, Math.min(100, Q.value / m.value * 100))), $ = R(() => {
1462
1476
  const c = Math.max(0, 100 - r.value), N = a.corDetalhes;
1463
1477
  return {
1464
1478
  labels: ["Progresso", "Restante"],
1465
1479
  datasets: [
1466
1480
  {
1467
1481
  data: [r.value, c],
1468
- backgroundColor: [N, L(e.value.muted, 0.15)],
1482
+ backgroundColor: [N, V(e.value.muted, 0.15)],
1469
1483
  borderWidth: 0,
1470
1484
  borderColor: "transparent",
1471
1485
  hoverOffset: 0,
@@ -1473,7 +1487,7 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1473
1487
  }
1474
1488
  ]
1475
1489
  };
1476
- }), k = R(() => ({
1490
+ }), B = R(() => ({
1477
1491
  responsive: !0,
1478
1492
  maintainAspectRatio: !1,
1479
1493
  cutout: a.cutout,
@@ -1485,24 +1499,24 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1485
1499
  tooltip: { enabled: !1 }
1486
1500
  }
1487
1501
  }));
1488
- function E() {
1502
+ function S() {
1489
1503
  d("botaoAcao");
1490
1504
  }
1491
1505
  return (c, N) => (l(), n("div", {
1492
1506
  ref_key: "cardRef",
1493
1507
  ref: z,
1494
- class: et(["card-progresso p-4", w.value]),
1495
- style: u(o(A))
1508
+ class: at(["card-progresso p-4 flex flex-column", E.value]),
1509
+ style: u(o(w))
1496
1510
  }, [
1497
- f("div", Xe, [
1498
- c.$slots.legenda || t.legenda || c.$slots.sublegenda || t.sublegenda ? (l(), n("div", Je, [
1511
+ p("div", Xe, [
1512
+ c.$slots.legenda || t.legenda || c.$slots.sublegenda || t.sublegenda ? (l(), n("div", Ye, [
1499
1513
  c.$slots.legenda || t.legenda ? (l(), n("div", {
1500
1514
  key: 0,
1501
- class: "text-sm font-medium",
1515
+ class: "text-xs font-medium",
1502
1516
  style: u({ color: o(e).text, opacity: 0.95 })
1503
1517
  }, [
1504
- S(c.$slots, "legenda", {}, () => [
1505
- V(h(t.legenda), 1)
1518
+ k(c.$slots, "legenda", {}, () => [
1519
+ j(x(t.legenda), 1)
1506
1520
  ], !0)
1507
1521
  ], 4)) : i("", !0),
1508
1522
  c.$slots.sublegenda || t.sublegenda ? (l(), n("div", {
@@ -1510,42 +1524,42 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1510
1524
  class: "text-xs",
1511
1525
  style: u({ color: o(e).muted })
1512
1526
  }, [
1513
- S(c.$slots, "sublegenda", {}, () => [
1514
- V(h(t.sublegenda), 1)
1527
+ k(c.$slots, "sublegenda", {}, () => [
1528
+ j(x(t.sublegenda), 1)
1515
1529
  ], !0)
1516
1530
  ], 4)) : i("", !0)
1517
1531
  ])) : i("", !0),
1518
- c.$slots.actions || t.botaoVisivel || t.exportar ? (l(), n("div", Qe, [
1519
- S(c.$slots, "actions", {}, () => [
1532
+ c.$slots.actions || t.botaoVisivel || t.exportar ? (l(), n("div", Je, [
1533
+ k(c.$slots, "actions", {}, () => [
1520
1534
  t.botaoVisivel ? (l(), n("button", {
1521
1535
  key: 0,
1522
- class: "card-progresso__btn",
1523
- style: u({ color: o(e).text, borderColor: o(L)(o(e).text, 0.18) }),
1524
- onClick: E
1536
+ class: "card-progresso__btn inline-flex align-items-center",
1537
+ style: u({ color: o(e).text, borderColor: o(V)(o(e).text, 0.18) }),
1538
+ onClick: S
1525
1539
  }, [
1526
- f("span", null, h(t.textoBotao), 1)
1540
+ p("span", null, x(t.textoBotao), 1)
1527
1541
  ], 4)) : i("", !0)
1528
1542
  ], !0),
1529
1543
  t.exportar ? (l(), n("button", {
1530
1544
  key: 0,
1531
1545
  type: "button",
1532
- class: "card-progresso__exportar",
1533
- style: u({ color: o(e).muted, borderColor: o(L)(o(e).text, 0.18) }),
1546
+ class: "card-progresso__exportar inline-flex align-items-center justify-content-center",
1547
+ style: u({ color: o(e).muted, borderColor: o(V)(o(e).text, 0.18) }),
1534
1548
  title: "Exportar como imagem",
1535
1549
  "aria-label": "Exportar como imagem",
1536
- onClick: P,
1537
- innerHTML: o(H)
1538
- }, null, 12, Ye)) : i("", !0)
1550
+ onClick: O,
1551
+ innerHTML: o(D)
1552
+ }, null, 12, Qe)) : i("", !0)
1539
1553
  ])) : i("", !0)
1540
1554
  ]),
1541
1555
  c.$slots.titulo || t.titulo || c.$slots.descricao || t.descricao ? (l(), n("div", Ue, [
1542
1556
  c.$slots.titulo || t.titulo ? (l(), n("div", {
1543
1557
  key: 0,
1544
- class: "text-4xl font-semibold line-height-2",
1545
- style: u({ color: o(e).text })
1558
+ class: "m-0 text-3xl font-semibold",
1559
+ style: u({ color: o(e).text, lineHeight: "33px", letterSpacing: "-1px" })
1546
1560
  }, [
1547
- S(c.$slots, "titulo", {}, () => [
1548
- V(h(t.titulo), 1)
1561
+ k(c.$slots, "titulo", {}, () => [
1562
+ j(x(t.titulo), 1)
1549
1563
  ], !0)
1550
1564
  ], 4)) : i("", !0),
1551
1565
  c.$slots.descricao || t.descricao ? (l(), n("div", {
@@ -1553,97 +1567,97 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1553
1567
  class: "text-sm mt-1",
1554
1568
  style: u({ color: o(e).muted })
1555
1569
  }, [
1556
- S(c.$slots, "descricao", {}, () => [
1557
- V(h(t.descricao), 1)
1570
+ k(c.$slots, "descricao", {}, () => [
1571
+ j(x(t.descricao), 1)
1558
1572
  ], !0)
1559
1573
  ], 4)) : i("", !0)
1560
1574
  ])) : i("", !0),
1561
- f("div", Ge, [
1575
+ p("div", Ge, [
1562
1576
  t.formato === "circular" ? (l(), n("div", Ze, [
1563
- f("div", Ke, [
1564
- ct(at, {
1577
+ p("div", Ke, [
1578
+ ct(ot, {
1565
1579
  type: "doughnut",
1566
1580
  data: $.value,
1567
- options: k.value,
1581
+ options: B.value,
1568
1582
  height: t.height
1569
1583
  }, null, 8, ["data", "options", "height"]),
1570
- f("div", ta, [
1571
- f("div", {
1584
+ p("div", ta, [
1585
+ p("div", {
1572
1586
  class: "card-progresso__centro-valor",
1573
1587
  style: u({ color: o(e).text })
1574
- }, h(Math.round(r.value)) + "% ", 5),
1575
- f("div", {
1588
+ }, x(Math.round(r.value)) + "% ", 5),
1589
+ p("div", {
1576
1590
  class: "card-progresso__centro-desc",
1577
1591
  style: u({ color: o(e).muted })
1578
- }, h(o(x)(J.value)) + " / " + h(o(x)(v.value)), 5)
1592
+ }, x(o(v)(Q.value)) + " / " + x(o(v)(m.value)), 5)
1579
1593
  ])
1580
1594
  ])
1581
1595
  ])) : i("", !0),
1582
- f("div", ea, [
1583
- (l(!0), n(pt, null, gt(T.value, (F, Q) => (l(), n("div", {
1584
- key: Q,
1585
- class: "card-progresso__item"
1596
+ p("div", ea, [
1597
+ (l(!0), n(ft, null, gt(T.value, (F, U) => (l(), n("div", {
1598
+ key: U,
1599
+ class: "card-progresso__item flex flex-column"
1586
1600
  }, [
1587
- f("div", aa, [
1588
- f("span", {
1589
- class: "card-progresso__item-rotulo",
1601
+ p("div", aa, [
1602
+ p("span", {
1603
+ class: "card-progresso__item-rotulo inline-flex align-items-center gap-2",
1590
1604
  style: u({ color: o(e).text })
1591
1605
  }, [
1592
- f("span", {
1606
+ p("span", {
1593
1607
  class: "card-progresso__bolinha",
1594
1608
  style: u({ background: F.cor })
1595
1609
  }, null, 4),
1596
- f("span", null, h(F.rotulo), 1)
1610
+ p("span", null, x(F.rotulo), 1)
1597
1611
  ], 4),
1598
1612
  t.mostrarValor || t.mostrarPercentual ? (l(), n("span", {
1599
1613
  key: 0,
1600
- class: "card-progresso__item-valor",
1614
+ class: "card-progresso__item-valor inline-flex align-items-baseline gap-2",
1601
1615
  style: u({ color: o(e).text })
1602
1616
  }, [
1603
- t.mostrarValor ? (l(), n(pt, { key: 0 }, [
1604
- V(h(o(x)(F.quantidade)), 1),
1617
+ t.mostrarValor ? (l(), n(ft, { key: 0 }, [
1618
+ j(x(o(v)(F.quantidade)), 1),
1605
1619
  F.meta ? (l(), n("span", {
1606
1620
  key: 0,
1607
1621
  style: u({ color: o(e).muted })
1608
- }, " / " + h(o(x)(F.meta)), 5)) : i("", !0)
1622
+ }, " / " + x(o(v)(F.meta)), 5)) : i("", !0)
1609
1623
  ], 64)) : i("", !0),
1610
1624
  t.mostrarPercentual ? (l(), n("span", {
1611
1625
  key: 1,
1612
1626
  class: "card-progresso__item-pct",
1613
1627
  style: u({ color: o(e).muted })
1614
- }, h(Math.round(F.percentual)) + "% ", 5)) : i("", !0)
1628
+ }, x(Math.round(F.percentual)) + "% ", 5)) : i("", !0)
1615
1629
  ], 4)) : i("", !0)
1616
1630
  ]),
1617
- f("div", {
1618
- class: "card-progresso__trilha",
1619
- style: u({ height: O.value, borderRadius: I.value, background: o(L)(o(e).muted, 0.15) })
1631
+ p("div", {
1632
+ class: "card-progresso__trilha w-full",
1633
+ style: u({ height: I.value, borderRadius: W.value, background: o(V)(o(e).muted, 0.15) })
1620
1634
  }, [
1621
- f("div", {
1635
+ p("div", {
1622
1636
  class: "card-progresso__preenchimento",
1623
- style: u({ width: F.percentual + "%", background: F.cor, borderRadius: I.value })
1637
+ style: u({ width: F.percentual + "%", background: F.cor, borderRadius: W.value })
1624
1638
  }, null, 4)
1625
1639
  ], 4)
1626
1640
  ]))), 128))
1627
1641
  ])
1628
1642
  ]),
1629
1643
  c.$slots.footer ? (l(), n("div", oa, [
1630
- S(c.$slots, "footer", {}, void 0, !0)
1644
+ k(c.$slots, "footer", {}, void 0, !0)
1631
1645
  ])) : i("", !0)
1632
1646
  ], 6));
1633
1647
  }
1634
- }, la = /* @__PURE__ */ Z(ra, [["__scopeId", "data-v-aa7e8576"]]), na = {
1648
+ }, la = /* @__PURE__ */ et(ra, [["__scopeId", "data-v-b5d915fb"]]), na = {
1635
1649
  key: 0,
1636
1650
  class: "card-base__topo"
1637
- }, sa = ["innerHTML"], ia = { class: "card-base__legendas" }, da = {
1651
+ }, sa = ["innerHTML"], ia = { class: "card-base__legendas flex flex-column" }, da = {
1638
1652
  key: 1,
1639
- class: "card-base__titulos"
1653
+ class: "card-base__titulos flex flex-column"
1640
1654
  }, ca = {
1641
1655
  key: 2,
1642
- class: "card-base__acao"
1656
+ class: "card-base__acao flex"
1643
1657
  }, ua = {
1644
1658
  key: 3,
1645
1659
  class: "card-base__footer"
1646
- }, pa = {
1660
+ }, fa = {
1647
1661
  __name: "CardBase",
1648
1662
  props: {
1649
1663
  legenda: { type: String, default: null },
@@ -1668,107 +1682,107 @@ const lt = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewB
1668
1682
  },
1669
1683
  emits: ["botaoAcao", "exportado"],
1670
1684
  setup(t, { emit: y }) {
1671
- const a = t, d = y, { palette: e, cardStyle: A } = ot(a), x = G(null), z = lt;
1672
- function H() {
1685
+ const a = t, d = y, { palette: e, cardStyle: w } = rt(a), v = tt(null), z = nt;
1686
+ function D() {
1673
1687
  d("botaoAcao");
1674
1688
  }
1675
- async function P() {
1676
- await rt(x.value, {
1689
+ async function O() {
1690
+ await lt(v.value, {
1677
1691
  nomeArquivo: a.nomeArquivoExport,
1678
1692
  corFundo: e.value.bg !== "transparent" ? e.value.bg : null
1679
1693
  }), d("exportado");
1680
1694
  }
1681
- return (w, T) => (l(), n("div", {
1695
+ return (E, T) => (l(), n("div", {
1682
1696
  ref_key: "cardRef",
1683
- ref: x,
1684
- class: et(["card-base p-4", `card-base--${t.alinhamento}`]),
1685
- style: u(o(A))
1697
+ ref: v,
1698
+ class: at(["card-base p-4 flex flex-column", `card-base--${t.alinhamento}`]),
1699
+ style: u(o(w))
1686
1700
  }, [
1687
1701
  t.exportar ? (l(), n("div", na, [
1688
- f("button", {
1702
+ p("button", {
1689
1703
  type: "button",
1690
- class: "card-base__exportar",
1691
- style: u({ color: o(e).muted, borderColor: o(L)(o(e).text === "inherit" ? "#0F172A" : o(e).text, 0.18) }),
1704
+ class: "card-base__exportar inline-flex align-items-center justify-content-center",
1705
+ style: u({ color: o(e).muted, borderColor: o(V)(o(e).text === "inherit" ? "#0F172A" : o(e).text, 0.18) }),
1692
1706
  title: "Exportar como imagem",
1693
1707
  "aria-label": "Exportar como imagem",
1694
- onClick: P,
1708
+ onClick: O,
1695
1709
  innerHTML: o(z)
1696
1710
  }, null, 12, sa)
1697
1711
  ])) : i("", !0),
1698
- f("div", ia, [
1699
- w.$slots.legenda || t.legenda ? (l(), n("div", {
1712
+ p("div", ia, [
1713
+ E.$slots.legenda || t.legenda ? (l(), n("div", {
1700
1714
  key: 0,
1701
- class: "card-base__legenda",
1715
+ class: "card-base__legenda text-xs",
1702
1716
  style: u({ color: o(e).text })
1703
1717
  }, [
1704
- S(w.$slots, "legenda", {}, () => [
1705
- V(h(t.legenda), 1)
1718
+ k(E.$slots, "legenda", {}, () => [
1719
+ j(x(t.legenda), 1)
1706
1720
  ], !0)
1707
1721
  ], 4)) : i("", !0),
1708
- w.$slots.sublegenda || t.sublegenda ? (l(), n("div", {
1722
+ E.$slots.sublegenda || t.sublegenda ? (l(), n("div", {
1709
1723
  key: 1,
1710
- class: "card-base__sublegenda",
1724
+ class: "card-base__sublegenda text-xs",
1711
1725
  style: u({ color: o(e).muted })
1712
1726
  }, [
1713
- S(w.$slots, "sublegenda", {}, () => [
1714
- V(h(t.sublegenda), 1)
1727
+ k(E.$slots, "sublegenda", {}, () => [
1728
+ j(x(t.sublegenda), 1)
1715
1729
  ], !0)
1716
1730
  ], 4)) : i("", !0)
1717
1731
  ]),
1718
- w.$slots.titulo || t.titulo || w.$slots.descricao || t.descricao ? (l(), n("div", da, [
1719
- w.$slots.titulo || t.titulo ? (l(), n("div", {
1732
+ E.$slots.titulo || t.titulo || E.$slots.descricao || t.descricao ? (l(), n("div", da, [
1733
+ E.$slots.titulo || t.titulo ? (l(), n("div", {
1720
1734
  key: 0,
1721
- class: "card-base__titulo",
1722
- style: u({ color: o(e).text })
1735
+ class: "card-base__titulo m-0 text-3xl font-semibold",
1736
+ style: u({ color: o(e).text, lineHeight: "33px", letterSpacing: "-1px" })
1723
1737
  }, [
1724
- S(w.$slots, "titulo", {}, () => [
1725
- V(h(t.titulo), 1)
1738
+ k(E.$slots, "titulo", {}, () => [
1739
+ j(x(t.titulo), 1)
1726
1740
  ], !0)
1727
1741
  ], 4)) : i("", !0),
1728
- w.$slots.descricao || t.descricao ? (l(), n("div", {
1742
+ E.$slots.descricao || t.descricao ? (l(), n("div", {
1729
1743
  key: 1,
1730
1744
  class: "card-base__descricao",
1731
1745
  style: u({ color: o(e).muted })
1732
1746
  }, [
1733
- S(w.$slots, "descricao", {}, () => [
1734
- V(h(t.descricao), 1)
1747
+ k(E.$slots, "descricao", {}, () => [
1748
+ j(x(t.descricao), 1)
1735
1749
  ], !0)
1736
1750
  ], 4)) : i("", !0)
1737
1751
  ])) : i("", !0),
1738
- w.$slots.acao || t.botaoVisivel ? (l(), n("div", ca, [
1739
- S(w.$slots, "acao", {}, () => [
1752
+ E.$slots.acao || t.botaoVisivel ? (l(), n("div", ca, [
1753
+ k(E.$slots, "acao", {}, () => [
1740
1754
  t.botaoVisivel ? (l(), n("button", {
1741
1755
  key: 0,
1742
1756
  type: "button",
1743
- class: "card-base__link",
1757
+ class: "card-base__link text-xs inline-flex align-items-center",
1744
1758
  style: u({ color: o(e).text }),
1745
- onClick: H
1759
+ onClick: D
1746
1760
  }, [
1747
- f("span", null, h(t.textoBotao), 1),
1748
- T[0] || (T[0] = f("span", {
1761
+ p("span", null, x(t.textoBotao), 1),
1762
+ T[0] || (T[0] = p("span", {
1749
1763
  class: "card-base__chevron",
1750
1764
  "aria-hidden": "true"
1751
1765
  }, "›", -1))
1752
1766
  ], 4)) : i("", !0)
1753
1767
  ], !0)
1754
1768
  ])) : i("", !0),
1755
- w.$slots.footer ? (l(), n("div", ua, [
1756
- S(w.$slots, "footer", {}, void 0, !0)
1769
+ E.$slots.footer ? (l(), n("div", ua, [
1770
+ k(E.$slots, "footer", {}, void 0, !0)
1757
1771
  ])) : i("", !0)
1758
1772
  ], 6));
1759
1773
  }
1760
- }, fa = /* @__PURE__ */ Z(pa, [["__scopeId", "data-v-6ff630fc"]]), ma = {
1774
+ }, pa = /* @__PURE__ */ et(fa, [["__scopeId", "data-v-9a0b17f7"]]), ma = {
1761
1775
  install(t) {
1762
- t.component("ChartBase", at), t.component("CardBase", fa), t.component("CardLinhas", le), t.component("CardPizza", xe), t.component("CardBarra", Re), t.component("CardPolar", je), t.component("CardProgresso", la);
1776
+ t.component("ChartBase", ot), t.component("CardBase", pa), t.component("CardLinhas", le), t.component("CardPizza", ve), t.component("CardBarra", Re), t.component("CardPolar", We), t.component("CardProgresso", la);
1763
1777
  }
1764
1778
  };
1765
1779
  export {
1766
1780
  Re as CardBarra,
1767
- fa as CardBase,
1781
+ pa as CardBase,
1768
1782
  le as CardLinhas,
1769
- xe as CardPizza,
1770
- je as CardPolar,
1783
+ ve as CardPizza,
1784
+ We as CardPolar,
1771
1785
  la as CardProgresso,
1772
- at as ChartBase,
1786
+ ot as ChartBase,
1773
1787
  ma as default
1774
1788
  };