nemesischart 2.0.3 → 2.0.5

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