@selectwin/kit 0.1.24 → 0.1.26
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.
- package/dist/SelectGlobe.d.ts +3 -2
- package/dist/SelectHeatmap.d.ts +4 -0
- package/dist/index.js +642 -638
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,54 +28,54 @@ function Ks({ className: t, theme: n, glowTarget: l }) {
|
|
|
28
28
|
if (!s) return;
|
|
29
29
|
const a = s.getContext("2d");
|
|
30
30
|
if (!a) return;
|
|
31
|
-
const r = ((Q = window.matchMedia) == null ? void 0 : Q.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, d = n === "dark", o = 30, i = 1.2, h = 160, u = 8, f = 2.9, g = 0.32, v = 1.4, y = 18, x = Math.PI * 2, $ = getComputedStyle(s), [_, p, b] = Cl($, "--select-dot", d ? [235, 238, 255] : [64, 68, 92]), [
|
|
32
|
-
let
|
|
31
|
+
const r = ((Q = window.matchMedia) == null ? void 0 : Q.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, d = n === "dark", o = 30, i = 1.2, h = 160, u = 8, f = 2.9, g = 0.32, v = 1.4, y = 18, x = Math.PI * 2, $ = getComputedStyle(s), [_, p, b] = Cl($, "--select-dot", d ? [235, 238, 255] : [64, 68, 92]), [S, k, M] = Ll($.getPropertyValue("--select-primary"), d ? [255, 255, 255] : [33, 37, 41]);
|
|
32
|
+
let w = 0, N = 0, C = [], L = 0, E = 0, A = null, F = 0;
|
|
33
33
|
const B = { x: 0, y: 0 };
|
|
34
|
-
let
|
|
35
|
-
const
|
|
34
|
+
let T = 0, I = 0, O = -10;
|
|
35
|
+
const W = Me.quickTo(B, "x", { duration: 0.5, ease: "power3.out" }), Z = Me.quickTo(B, "y", { duration: 0.5, ease: "power3.out" });
|
|
36
36
|
function G() {
|
|
37
37
|
const z = s.getBoundingClientRect();
|
|
38
|
-
L = z.left, E = z.top,
|
|
39
|
-
const
|
|
40
|
-
s.width = Math.round(
|
|
38
|
+
L = z.left, E = z.top, w = z.width, N = z.height;
|
|
39
|
+
const he = Math.min(window.devicePixelRatio || 1, 2);
|
|
40
|
+
s.width = Math.round(w * he), s.height = Math.round(N * he), a.setTransform(he, 0, 0, he, 0, 0);
|
|
41
41
|
const ie = s.closest(".select-auth") ?? document;
|
|
42
42
|
A = l ? ie.querySelector(l) : null, C = [];
|
|
43
|
-
const
|
|
43
|
+
const pe = Math.ceil(w / o) + 1, de = Math.ceil(N / o) + 1, ae = (w - (pe - 1) * o) / 2, $e = (N - (de - 1) * o) / 2;
|
|
44
44
|
for (let Ce = 0; Ce < de; Ce++)
|
|
45
|
-
for (let Le = 0; Le <
|
|
45
|
+
for (let Le = 0; Le < pe; Le++) {
|
|
46
46
|
const Ne = ae + Le * o, Ie = $e + Ce * o;
|
|
47
47
|
C.push({ x: Ne, y: Ie, phase: (Ne + Ie) * 0.013 });
|
|
48
48
|
}
|
|
49
|
-
B.x === 0 && B.y === 0 && (B.x =
|
|
49
|
+
B.x === 0 && B.y === 0 && (B.x = T = w / 2, B.y = I = N / 2);
|
|
50
50
|
}
|
|
51
|
-
function J(z,
|
|
51
|
+
function J(z, he, ie, pe, de) {
|
|
52
52
|
if (!A) return;
|
|
53
|
-
const ae = A.getBoundingClientRect(), $e = ae.left - L + ae.width / 2, Ce = ae.top - E + ae.height / 2, Le = ae.width / 2, Ne = ae.height / 2, Ie = (z - $e) / (Le + y), ke = (
|
|
53
|
+
const ae = A.getBoundingClientRect(), $e = ae.left - L + ae.width / 2, Ce = ae.top - E + ae.height / 2, Le = ae.width / 2, Ne = ae.height / 2, Ie = (z - $e) / (Le + y), ke = (he - Ce) / (Ne + y), Ue = Math.sqrt(Ie * Ie + ke * ke), je = Ue < 1 ? 1 - Ue : 0, Fe = je * je * (3 - 2 * je);
|
|
54
54
|
if (Fe > 1e-3 || F > 1e-3) {
|
|
55
|
-
const
|
|
56
|
-
A.style.setProperty("--select-card-glow", Fe.toFixed(3)), A.style.setProperty("--select-card-glow-rgb", `${ie}, ${
|
|
55
|
+
const P = on((z - $e) / Math.max(Le, 1), -1, 1) * 10 * Fe, V = on((he - Ce) / Math.max(Ne, 1), -1, 1) * 10 * Fe;
|
|
56
|
+
A.style.setProperty("--select-card-glow", Fe.toFixed(3)), A.style.setProperty("--select-card-glow-rgb", `${ie}, ${pe}, ${de}`), A.style.setProperty("--select-card-glow-x", `${P.toFixed(1)}px`), A.style.setProperty("--select-card-glow-y", `${V.toFixed(1)}px`);
|
|
57
57
|
}
|
|
58
58
|
F = Fe;
|
|
59
59
|
}
|
|
60
60
|
function re() {
|
|
61
|
-
a.clearRect(0, 0,
|
|
61
|
+
a.clearRect(0, 0, w, N), a.fillStyle = `rgba(${_},${p},${b},${g})`;
|
|
62
62
|
for (const z of C)
|
|
63
63
|
a.beginPath(), a.arc(z.x, z.y, i, 0, x), a.fill();
|
|
64
64
|
A == null || A.style.setProperty("--select-card-glow", "0");
|
|
65
65
|
}
|
|
66
66
|
function me(z) {
|
|
67
|
-
let
|
|
68
|
-
z - O < v ? (
|
|
69
|
-
const
|
|
70
|
-
a.clearRect(0, 0,
|
|
67
|
+
let he, ie;
|
|
68
|
+
z - O < v ? (he = T, ie = I) : (he = w * 0.5 + Math.cos(z * 0.45) * w * 0.3, ie = N * 0.5 + Math.sin(z * 0.6) * N * 0.28), W(he), Z(ie);
|
|
69
|
+
const pe = B.x, de = B.y;
|
|
70
|
+
a.clearRect(0, 0, w, N);
|
|
71
71
|
for (let ae = 0; ae < C.length; ae++) {
|
|
72
|
-
const $e = C[ae], Ce = $e.x -
|
|
73
|
-
ke > 0.12 ? (a.shadowColor = `rgba(${
|
|
72
|
+
const $e = C[ae], Ce = $e.x - pe, Le = $e.y - de, Ne = Math.sqrt(Ce * Ce + Le * Le), Ie = Ne < h ? 1 - Ne / h : 0, ke = Ie * Ie, Ue = Math.sin(z * 1.4 + $e.phase) * 0.5 + 0.5, je = ke * u, Fe = Ne > 1e-4 ? 1 / Ne : 0, P = $e.x - Ce * Fe * je, V = $e.y - Le * Fe * je, U = 1 + ke * (f - 1) + Ue * 0.14, oe = Math.min(1, g + Ue * 0.08 + ke * (1 - g)), ee = _ + (S - _) * ke | 0, se = p + (k - p) * ke | 0, ue = b + (M - b) * ke | 0;
|
|
73
|
+
ke > 0.12 ? (a.shadowColor = `rgba(${S},${k},${M},${0.6 * ke})`, a.shadowBlur = 12 * ke) : a.shadowBlur = 0, a.beginPath(), a.arc(P, V, i * U, 0, x), a.fillStyle = `rgba(${ee},${se},${ue},${oe})`, a.fill();
|
|
74
74
|
}
|
|
75
|
-
a.shadowBlur = 0, J(
|
|
75
|
+
a.shadowBlur = 0, J(pe, de, S, k, M);
|
|
76
76
|
}
|
|
77
77
|
function Se(z) {
|
|
78
|
-
|
|
78
|
+
T = z.clientX - L, I = z.clientY - E, O = Me.ticker.time;
|
|
79
79
|
}
|
|
80
80
|
function ne() {
|
|
81
81
|
const z = s.getBoundingClientRect();
|
|
@@ -120,12 +120,12 @@ const El = (t) => {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function h(u, f) {
|
|
123
|
-
const { ctx: g, pointer: v } = t, [y, x, $] = t.ink, [_, p, b] = t.accent,
|
|
124
|
-
g.clearRect(0, 0,
|
|
125
|
-
const M = v.x,
|
|
123
|
+
const { ctx: g, pointer: v } = t, [y, x, $] = t.ink, [_, p, b] = t.accent, S = t.w(), k = t.h();
|
|
124
|
+
g.clearRect(0, 0, S, k);
|
|
125
|
+
const M = v.x, w = v.y;
|
|
126
126
|
for (const N of d) {
|
|
127
|
-
const C = N.x - M, L = N.y -
|
|
128
|
-
t.dark && F > 0.14 ? (g.shadowColor = `rgba(${_},${p},${b},${0.5 * F})`, g.shadowBlur = 10 * F) : g.shadowBlur = 0, g.beginPath(), g.arc(O,
|
|
127
|
+
const C = N.x - M, L = N.y - w, E = Math.hypot(C, L), A = f > 0 && E < 150 ? 1 - E / 150 : 0, F = A * A * f, B = Math.sin(u * 1.1 + N.phase) * 0.5 + 0.5, T = F * 6, I = E > 1e-3 ? 1 / E : 0, O = N.x - C * I * T, W = N.y - L * I * T, Z = 1 + F * (2.4 - 1) + B * 0.1, G = Math.min(1, 0.3 + B * 0.06 + F * (1 - 0.3)), J = y + (_ - y) * F | 0, re = x + (p - x) * F | 0, me = $ + (b - $) * F | 0;
|
|
128
|
+
t.dark && F > 0.14 ? (g.shadowColor = `rgba(${_},${p},${b},${0.5 * F})`, g.shadowBlur = 10 * F) : g.shadowBlur = 0, g.beginPath(), g.arc(O, W, 1.2 * Z, 0, tt), g.fillStyle = `rgba(${J},${re},${me},${G})`, g.fill();
|
|
129
129
|
}
|
|
130
130
|
g.shadowBlur = 0;
|
|
131
131
|
}
|
|
@@ -155,8 +155,8 @@ const El = (t) => {
|
|
|
155
155
|
i.lineWidth = 1;
|
|
156
156
|
for (let p = 0; p < a.length; p++) {
|
|
157
157
|
const b = a[p];
|
|
158
|
-
for (let
|
|
159
|
-
const k = a[
|
|
158
|
+
for (let S = p + 1; S < a.length; S++) {
|
|
159
|
+
const k = a[S], M = b.x - k.x, w = b.y - k.y, N = M * M + w * w;
|
|
160
160
|
if (N < 132 * 132) {
|
|
161
161
|
const C = 1 - Math.sqrt(N) / 132;
|
|
162
162
|
i.strokeStyle = `rgba(${u},${f},${g},${(C * C * 0.5).toFixed(3)})`, i.beginPath(), i.moveTo(b.x, b.y), i.lineTo(k.x, k.y), i.stroke();
|
|
@@ -167,11 +167,11 @@ const El = (t) => {
|
|
|
167
167
|
for (const p of a) {
|
|
168
168
|
let b = 0;
|
|
169
169
|
if (o) {
|
|
170
|
-
const
|
|
171
|
-
|
|
170
|
+
const w = Math.hypot(p.x - $, p.y - _);
|
|
171
|
+
w < 175 && (b = 1 - w / 175, i.strokeStyle = `rgba(${v},${y},${x},${(b * b * 0.5).toFixed(3)})`, i.beginPath(), i.moveTo($, _), i.lineTo(p.x, p.y), i.stroke());
|
|
172
172
|
}
|
|
173
|
-
const
|
|
174
|
-
t.dark && b > 0.2 ? (i.shadowColor = `rgba(${v},${y},${x},${0.6 * b})`, i.shadowBlur = 10 * b) : i.shadowBlur = 0, i.beginPath(), i.arc(p.x, p.y, 1.4 + b * 2.2, 0, tt), i.fillStyle = `rgba(${
|
|
173
|
+
const S = u + (v - u) * b | 0, k = f + (y - f) * b | 0, M = g + (x - g) * b | 0;
|
|
174
|
+
t.dark && b > 0.2 ? (i.shadowColor = `rgba(${v},${y},${x},${0.6 * b})`, i.shadowBlur = 10 * b) : i.shadowBlur = 0, i.beginPath(), i.arc(p.x, p.y, 1.4 + b * 2.2, 0, tt), i.fillStyle = `rgba(${S},${k},${M},${0.5 + b * 0.5})`, i.fill();
|
|
175
175
|
}
|
|
176
176
|
i.shadowBlur = 0;
|
|
177
177
|
}
|
|
@@ -202,21 +202,21 @@ const El = (t) => {
|
|
|
202
202
|
g.moveTo(0, C), g.lineTo(c, C);
|
|
203
203
|
}
|
|
204
204
|
g.stroke();
|
|
205
|
-
const
|
|
206
|
-
k.addColorStop(0, `rgba(${_},${p},${b},0)`), k.addColorStop(0.5, `rgba(${_},${p},${b},${t.dark ? 0.08 : 0.05})`), k.addColorStop(1, `rgba(${_},${p},${b},0)`), g.fillStyle = k, g.fillRect(0,
|
|
207
|
-
const M = v.x,
|
|
205
|
+
const S = (u * 0.12 % 1 + 1) % 1 * s, k = g.createLinearGradient(0, S - 90, 0, S + 90);
|
|
206
|
+
k.addColorStop(0, `rgba(${_},${p},${b},0)`), k.addColorStop(0.5, `rgba(${_},${p},${b},${t.dark ? 0.08 : 0.05})`), k.addColorStop(1, `rgba(${_},${p},${b},0)`), g.fillStyle = k, g.fillRect(0, S - 90, c, 90 * 2), g.strokeStyle = `rgba(${_},${p},${b},0.18)`, g.beginPath(), g.moveTo(0, S), g.lineTo(c, S), g.stroke();
|
|
207
|
+
const M = v.x, w = v.y;
|
|
208
208
|
for (let N = 0; N < r; N++) {
|
|
209
|
-
const C = o + N * 44, L = 1 - Math.min(1, Math.abs(C -
|
|
209
|
+
const C = o + N * 44, L = 1 - Math.min(1, Math.abs(C - S) / 90), E = L * L * 0.8;
|
|
210
210
|
for (let A = 0; A < a; A++) {
|
|
211
211
|
const F = d + A * 44;
|
|
212
212
|
let B = E;
|
|
213
213
|
if (f) {
|
|
214
|
-
const
|
|
215
|
-
|
|
214
|
+
const W = Math.hypot(F - M, C - w);
|
|
215
|
+
W < 120 && (B = Math.max(B, (1 - W / 120) ** 2));
|
|
216
216
|
}
|
|
217
217
|
if (B < 0.02) continue;
|
|
218
|
-
const
|
|
219
|
-
g.beginPath(), g.arc(F, C, 1 + B * 2.2, 0, tt), g.fillStyle = `rgba(${
|
|
218
|
+
const T = y + (_ - y) * B | 0, I = x + (p - x) * B | 0, O = $ + (b - $) * B | 0;
|
|
219
|
+
g.beginPath(), g.arc(F, C, 1 + B * 2.2, 0, tt), g.fillStyle = `rgba(${T},${I},${O},${0.3 + B * 0.6})`, g.fill();
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
}
|
|
@@ -250,21 +250,21 @@ const El = (t) => {
|
|
|
250
250
|
const { ctx: u, pointer: f } = t, [g, v, y] = t.ink, [x, $, _] = t.accent;
|
|
251
251
|
u.clearRect(0, 0, l, c), u.lineCap = "round";
|
|
252
252
|
const p = f.x, b = f.y;
|
|
253
|
-
for (const
|
|
254
|
-
let k = a(
|
|
253
|
+
for (const S of s) {
|
|
254
|
+
let k = a(S.x, S.y, i), M = 0;
|
|
255
255
|
if (h) {
|
|
256
|
-
const E =
|
|
256
|
+
const E = S.x - p, A = S.y - b, F = Math.hypot(E, A);
|
|
257
257
|
F < 160 && (M = 1 - F / 160, k = $t(k, Math.atan2(A, E) + Math.PI / 2, M * 0.7));
|
|
258
258
|
}
|
|
259
|
-
const
|
|
260
|
-
if (
|
|
261
|
-
r(
|
|
259
|
+
const w = 0.9 + M * 0.6;
|
|
260
|
+
if (S.x += Math.cos(k) * w, S.y += Math.sin(k) * w, S.hist.push(S.x, S.y), S.hist.length > 9 * 2 && S.hist.splice(0, S.hist.length - 9 * 2), ++S.life > S.max || S.x < -20 || S.x > l + 20 || S.y < -20 || S.y > c + 20) {
|
|
261
|
+
r(S);
|
|
262
262
|
continue;
|
|
263
263
|
}
|
|
264
264
|
const N = g + (x - g) * M | 0, C = v + ($ - v) * M | 0, L = y + (_ - y) * M | 0;
|
|
265
265
|
u.strokeStyle = `rgba(${N},${C},${L},${0.16 + M * 0.5})`, u.lineWidth = 1 + M * 0.8, u.beginPath();
|
|
266
|
-
for (let E = 0; E <
|
|
267
|
-
const A =
|
|
266
|
+
for (let E = 0; E < S.hist.length; E += 2) {
|
|
267
|
+
const A = S.hist[E], F = S.hist[E + 1];
|
|
268
268
|
E === 0 ? u.moveTo(A, F) : u.lineTo(A, F);
|
|
269
269
|
}
|
|
270
270
|
u.stroke();
|
|
@@ -294,11 +294,11 @@ const El = (t) => {
|
|
|
294
294
|
for (let x = 0; x < g; x++) {
|
|
295
295
|
let $ = Math.floor(Math.random() * i), _ = Math.floor(Math.random() * h);
|
|
296
296
|
const p = [u + $ * 26, f + _ * 26], b = 3 + Math.floor(Math.random() * 5);
|
|
297
|
-
let
|
|
297
|
+
let S = Math.floor(Math.random() * 4);
|
|
298
298
|
for (let C = 0; C < b; C++) {
|
|
299
|
-
Math.random() < 0.6 && (
|
|
299
|
+
Math.random() < 0.6 && (S = (S + (Math.random() < 0.5 ? 1 : 3)) % 4);
|
|
300
300
|
const L = 1 + Math.floor(Math.random() * 4);
|
|
301
|
-
$ = Ye($ + v[
|
|
301
|
+
$ = Ye($ + v[S] * L, 0, i), _ = Ye(_ + y[S] * L, 0, h), p.push(u + $ * 26, f + _ * 26);
|
|
302
302
|
}
|
|
303
303
|
const k = [];
|
|
304
304
|
let M = 0;
|
|
@@ -307,9 +307,9 @@ const El = (t) => {
|
|
|
307
307
|
k.push(L), M += L;
|
|
308
308
|
}
|
|
309
309
|
if (M < 26) continue;
|
|
310
|
-
const
|
|
311
|
-
for (let C = 0; C < N; C++)
|
|
312
|
-
s.push({ pts: p, len: M, seg: k, pulses:
|
|
310
|
+
const w = [], N = 1 + (Math.random() < 0.4 ? 1 : 0);
|
|
311
|
+
for (let C = 0; C < N; C++) w.push({ p: Math.random(), sp: 0.1 + Math.random() * 0.16 });
|
|
312
|
+
s.push({ pts: p, len: M, seg: k, pulses: w });
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
315
|
function r(i, h) {
|
|
@@ -332,19 +332,19 @@ const El = (t) => {
|
|
|
332
332
|
const { ctx: u, pointer: f } = t, [g, v, y] = t.ink, [x, $, _] = t.accent;
|
|
333
333
|
u.clearRect(0, 0, l, c), u.lineJoin = "round", u.lineCap = "round";
|
|
334
334
|
const p = f.x, b = f.y;
|
|
335
|
-
for (const
|
|
335
|
+
for (const S of s) {
|
|
336
336
|
let k = 0;
|
|
337
337
|
if (h) {
|
|
338
|
-
const M = Math.hypot(
|
|
338
|
+
const M = Math.hypot(S.pts[0] - p, S.pts[1] - b);
|
|
339
339
|
M < 200 && (k = (1 - M / 200) * 0.6);
|
|
340
340
|
}
|
|
341
|
-
u.strokeStyle = `rgba(${g},${v},${y},${0.12 + k * 0.18})`, u.lineWidth = 1.2, u.beginPath(), u.moveTo(
|
|
342
|
-
for (let M = 2; M <
|
|
343
|
-
u.stroke(), d(
|
|
344
|
-
for (const M of
|
|
341
|
+
u.strokeStyle = `rgba(${g},${v},${y},${0.12 + k * 0.18})`, u.lineWidth = 1.2, u.beginPath(), u.moveTo(S.pts[0], S.pts[1]);
|
|
342
|
+
for (let M = 2; M < S.pts.length; M += 2) u.lineTo(S.pts[M], S.pts[M + 1]);
|
|
343
|
+
u.stroke(), d(S.pts[0], S.pts[1], g, v, y, k), d(S.pts[S.pts.length - 2], S.pts[S.pts.length - 1], g, v, y, k);
|
|
344
|
+
for (const M of S.pulses) {
|
|
345
345
|
M.p += M.sp * i, M.p > 1 && (M.p -= 1);
|
|
346
|
-
const [
|
|
347
|
-
t.dark && (u.shadowColor = `rgba(${x},${$},${_},0.85)`, u.shadowBlur = 10), u.beginPath(), u.arc(
|
|
346
|
+
const [w, N] = r(S, M.p);
|
|
347
|
+
t.dark && (u.shadowColor = `rgba(${x},${$},${_},0.85)`, u.shadowBlur = 10), u.beginPath(), u.arc(w, N, 2.1, 0, tt), u.fillStyle = `rgba(${x},${$},${_},0.95)`, u.fill(), u.shadowBlur = 0;
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
}
|
|
@@ -380,11 +380,11 @@ function Qs({
|
|
|
380
380
|
const d = ((Z = window.matchMedia) == null ? void 0 : Z.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, o = n === "dark", i = getComputedStyle(a), h = Al(i, "--select-dot", o ? [235, 238, 255] : [64, 68, 92]), u = Fl(i.getPropertyValue("--select-primary"), o ? [255, 255, 255] : [33, 37, 41]);
|
|
381
381
|
let f = 0, g = 0, v = 0, y = 0, x = null, $ = 0;
|
|
382
382
|
const _ = 1.2, p = { x: 0, y: 0 }, b = { x: 0, y: 0, active: !1 };
|
|
383
|
-
let
|
|
384
|
-
const
|
|
383
|
+
let S = 0, k = 0, M = -10;
|
|
384
|
+
const w = Me.quickTo(p, "x", { duration: 0.5, ease: "power3.out" }), N = Me.quickTo(p, "y", { duration: 0.5, ease: "power3.out" });
|
|
385
385
|
function C(G, J) {
|
|
386
386
|
if (!x) return;
|
|
387
|
-
const re = x.getBoundingClientRect(), me = re.left - v + re.width / 2, Se = re.top - y + re.height / 2, ne = re.width / 2, H = re.height / 2, Q = 18, z = (G - me) / (ne + Q),
|
|
387
|
+
const re = x.getBoundingClientRect(), me = re.left - v + re.width / 2, Se = re.top - y + re.height / 2, ne = re.width / 2, H = re.height / 2, Q = 18, z = (G - me) / (ne + Q), he = (J - Se) / (H + Q), ie = Math.sqrt(z * z + he * he), pe = ie < 1 ? 1 - ie : 0, de = pe * pe * (3 - 2 * pe);
|
|
388
388
|
if (de > 1e-3 || $ > 1e-3) {
|
|
389
389
|
const ae = Ye((G - me) / Math.max(ne, 1), -1, 1) * 10 * de, $e = Ye((J - Se) / Math.max(H, 1), -1, 1) * 10 * de;
|
|
390
390
|
x.style.setProperty("--select-card-glow", de.toFixed(3)), x.style.setProperty("--select-card-glow-rgb", `${u[0]}, ${u[1]}, ${u[2]}`), x.style.setProperty("--select-card-glow-x", `${ae.toFixed(1)}px`), x.style.setProperty("--select-card-glow-y", `${$e.toFixed(1)}px`);
|
|
@@ -401,26 +401,26 @@ function Qs({
|
|
|
401
401
|
const J = Math.min(window.devicePixelRatio || 1, 2);
|
|
402
402
|
a.width = Math.round(f * J), a.height = Math.round(g * J), r.setTransform(J, 0, 0, J, 0, 0);
|
|
403
403
|
const re = a.closest(".select-auth") ?? document;
|
|
404
|
-
x = l ? re.querySelector(l) : null, p.x === 0 && p.y === 0 && (p.x =
|
|
404
|
+
x = l ? re.querySelector(l) : null, p.x === 0 && p.y === 0 && (p.x = S = f / 2, p.y = k = g / 2), A.build();
|
|
405
405
|
}
|
|
406
406
|
let B = -1;
|
|
407
|
-
function
|
|
407
|
+
function T(G) {
|
|
408
408
|
const J = B < 0 ? 0 : Math.min(G - B, 0.05);
|
|
409
|
-
B = G, b.active = G - M < _,
|
|
409
|
+
B = G, b.active = G - M < _, w(b.active ? S : f / 2), N(b.active ? k : g / 2), b.x = p.x, b.y = p.y, A.frame(G, J);
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
|
|
411
|
+
function I(G) {
|
|
412
|
+
S = G.clientX - v, k = G.clientY - y, M = Me.ticker.time;
|
|
413
413
|
}
|
|
414
414
|
function O() {
|
|
415
415
|
const G = a.getBoundingClientRect();
|
|
416
416
|
v = G.left, y = G.top;
|
|
417
417
|
}
|
|
418
418
|
F();
|
|
419
|
-
const
|
|
419
|
+
const W = new ResizeObserver(() => {
|
|
420
420
|
F(), d && A.paintStatic();
|
|
421
421
|
});
|
|
422
|
-
return
|
|
423
|
-
Me.ticker.remove(
|
|
422
|
+
return W.observe(a), d ? (A.paintStatic(), () => W.disconnect()) : (window.addEventListener("pointermove", I, { passive: !0 }), window.addEventListener("scroll", O, { passive: !0 }), Me.ticker.add(T), () => {
|
|
423
|
+
Me.ticker.remove(T), Me.killTweensOf(p), window.removeEventListener("pointermove", I), window.removeEventListener("scroll", O), W.disconnect(), x == null || x.style.removeProperty("--select-card-glow");
|
|
424
424
|
});
|
|
425
425
|
}, [n, l, c]), /* @__PURE__ */ e("canvas", { ref: s, className: t, "aria-hidden": "true" });
|
|
426
426
|
}
|
|
@@ -453,11 +453,11 @@ const ea = R(function({ title: n, subtitle: l, logo: c, mark: s, children: a, fo
|
|
|
453
453
|
const [g, v] = D([]), y = q(0), x = (_) => {
|
|
454
454
|
var k;
|
|
455
455
|
if (i == null || i(_), o || s || typeof window < "u" && ((k = window.matchMedia) != null && k.call(window, "(prefers-reduced-motion: reduce)").matches)) return;
|
|
456
|
-
const p = _.currentTarget.getBoundingClientRect(), b = Math.max(p.width, p.height) * 2,
|
|
456
|
+
const p = _.currentTarget.getBoundingClientRect(), b = Math.max(p.width, p.height) * 2, S = y.current++;
|
|
457
457
|
v((M) => [
|
|
458
458
|
...M,
|
|
459
459
|
{
|
|
460
|
-
key:
|
|
460
|
+
key: S,
|
|
461
461
|
style: {
|
|
462
462
|
width: b,
|
|
463
463
|
height: b,
|
|
@@ -866,12 +866,12 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
866
866
|
] }),
|
|
867
867
|
s
|
|
868
868
|
] });
|
|
869
|
-
}), We = R(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: r, description: d, hint: o, error: i, prefix: h, suffix: u, mono: f, autoComplete: g, placeholder: v, required: y, disabled: x, readOnly: $, name: _, id: p, minLength: b, maxLength:
|
|
870
|
-
const
|
|
871
|
-
const
|
|
872
|
-
let ae = (ne != null && Number.isFinite(ne) ? ne : 0) + ie *
|
|
869
|
+
}), We = R(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: r, description: d, hint: o, error: i, prefix: h, suffix: u, mono: f, autoComplete: g, placeholder: v, required: y, disabled: x, readOnly: $, name: _, id: p, minLength: b, maxLength: S, min: k, max: M, step: w, inputMode: N, autoFocus: C, onBlur: L, onKeyDown: E, size: A = "md", className: F, ...B }, T) {
|
|
870
|
+
const I = te(), O = p ?? I, [W, Z] = D(!1), G = s === "password", J = G && W ? "text" : s, re = i ? `${O}-err` : o ? `${O}-hint` : void 0, me = h != null || u != null, Se = s === "number" && !me && !$, ne = l === "" ? null : Number(l), H = (ie) => {
|
|
871
|
+
const pe = Number(w ?? 1) || 1;
|
|
872
|
+
let ae = (ne != null && Number.isFinite(ne) ? ne : 0) + ie * pe;
|
|
873
873
|
k != null && (ae = Math.max(Number(k), ae)), M != null && (ae = Math.min(Number(M), ae)), c(String(ae));
|
|
874
|
-
}, Q = k != null && ne != null && ne <= Number(k), z = M != null && ne != null && ne >= Number(M),
|
|
874
|
+
}, Q = k != null && ne != null && ne <= Number(k), z = M != null && ne != null && ne >= Number(M), he = /* @__PURE__ */ e(
|
|
875
875
|
"input",
|
|
876
876
|
{
|
|
877
877
|
id: O,
|
|
@@ -888,22 +888,22 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
888
888
|
readOnly: $,
|
|
889
889
|
name: _,
|
|
890
890
|
minLength: b,
|
|
891
|
-
maxLength:
|
|
891
|
+
maxLength: S,
|
|
892
892
|
min: k,
|
|
893
893
|
max: M,
|
|
894
|
-
step:
|
|
894
|
+
step: w,
|
|
895
895
|
inputMode: N,
|
|
896
896
|
autoFocus: C,
|
|
897
897
|
"aria-invalid": i ? !0 : void 0,
|
|
898
898
|
"aria-describedby": re
|
|
899
899
|
}
|
|
900
900
|
);
|
|
901
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
901
|
+
return /* @__PURE__ */ m("div", { ref: T, ...B, className: `select-field${A === "sm" ? " select-field--sm" : ""}${F ? " " + F : ""}`, children: [
|
|
902
902
|
(n || r || a) && /* @__PURE__ */ e(lt, { htmlFor: O, label: n, info: r, action: a }),
|
|
903
903
|
d && /* @__PURE__ */ e("p", { className: "select-field__desc", children: d }),
|
|
904
904
|
/* @__PURE__ */ m("div", { className: `select-input-wrap${me ? " select-input-wrap--affixed" : ""}${i ? " select-input-wrap--error" : ""}`, children: [
|
|
905
905
|
h != null && /* @__PURE__ */ e("span", { className: "select-input__affix select-input__affix--prefix", children: h }),
|
|
906
|
-
|
|
906
|
+
he,
|
|
907
907
|
u != null && /* @__PURE__ */ e("span", { className: "select-input__affix select-input__affix--suffix", children: u }),
|
|
908
908
|
G && /* @__PURE__ */ e(
|
|
909
909
|
"button",
|
|
@@ -911,8 +911,8 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
911
911
|
type: "button",
|
|
912
912
|
className: "select-input__reveal",
|
|
913
913
|
onClick: () => Z((ie) => !ie),
|
|
914
|
-
"aria-label":
|
|
915
|
-
children:
|
|
914
|
+
"aria-label": W ? "Ocultar senha" : "Mostrar senha",
|
|
915
|
+
children: W ? /* @__PURE__ */ e(Gn, {}) : /* @__PURE__ */ e(Zn, {})
|
|
916
916
|
}
|
|
917
917
|
),
|
|
918
918
|
Se && /* @__PURE__ */ m("span", { className: "select-stepper", children: [
|
|
@@ -963,14 +963,14 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
963
963
|
a && /* @__PURE__ */ e("span", { className: "select-checkbox__hint", children: a })
|
|
964
964
|
] });
|
|
965
965
|
}), Wa = R(function({ label: n, value: l, onChange: c, labelAction: s, info: a, description: r, hint: d, error: o, placeholder: i, rows: h = 4, mono: u, name: f, required: g, disabled: v, maxLength: y, onBlur: x, size: $ = "md", className: _, ...p }, b) {
|
|
966
|
-
const
|
|
966
|
+
const S = te(), k = o ? `${S}-err` : d ? `${S}-hint` : void 0;
|
|
967
967
|
return /* @__PURE__ */ m("div", { ref: b, ...p, className: `select-field${$ === "sm" ? " select-field--sm" : ""}${_ ? " " + _ : ""}`, children: [
|
|
968
|
-
(n || a || s) && /* @__PURE__ */ e(lt, { htmlFor:
|
|
968
|
+
(n || a || s) && /* @__PURE__ */ e(lt, { htmlFor: S, label: n, info: a, action: s }),
|
|
969
969
|
r && /* @__PURE__ */ e("p", { className: "select-field__desc", children: r }),
|
|
970
970
|
/* @__PURE__ */ e(
|
|
971
971
|
"textarea",
|
|
972
972
|
{
|
|
973
|
-
id:
|
|
973
|
+
id: S,
|
|
974
974
|
className: `select-input select-textarea${u ? " select-textarea--mono" : ""}${o ? " select-input--error" : ""}`,
|
|
975
975
|
value: l,
|
|
976
976
|
onChange: (M) => c(M.target.value),
|
|
@@ -985,7 +985,7 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
985
985
|
"aria-describedby": k
|
|
986
986
|
}
|
|
987
987
|
),
|
|
988
|
-
o ? /* @__PURE__ */ e("p", { id: `${
|
|
988
|
+
o ? /* @__PURE__ */ e("p", { id: `${S}-err`, className: "select-field__error", children: o }) : d ? /* @__PURE__ */ e("p", { id: `${S}-hint`, className: "select-field__hint", children: d }) : null
|
|
989
989
|
] });
|
|
990
990
|
}), Oa = R(function({ label: n, value: l, onChange: c, unit: s, info: a, hint: r, error: d, placeholder: o = "0", disabled: i = !1, min: h, max: u, className: f, ...g }, v) {
|
|
991
991
|
const y = te();
|
|
@@ -1178,10 +1178,10 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1178
1178
|
onDrop: (C) => {
|
|
1179
1179
|
C.preventDefault(), g(!1), _(Array.from(C.dataTransfer.files));
|
|
1180
1180
|
}
|
|
1181
|
-
},
|
|
1181
|
+
}, S = () => {
|
|
1182
1182
|
var C;
|
|
1183
1183
|
return (C = u.current) == null ? void 0 : C.click();
|
|
1184
|
-
}, k = (C) => l(n.filter((L, E) => E !== C)), M = r != null && n.length >= r,
|
|
1184
|
+
}, k = (C) => l(n.filter((L, E) => E !== C)), M = r != null && n.length >= r, w = (a || n.length === 0) && !M, N = n.length > 0;
|
|
1185
1185
|
return /* @__PURE__ */ m("div", { ref: h, ...i, className: `select-dropzone-wrap${o ? " " + o : ""}`, children: [
|
|
1186
1186
|
N && /* @__PURE__ */ m("div", { className: "select-filetile-grid", children: [
|
|
1187
1187
|
n.map((C, L) => /* @__PURE__ */ e(
|
|
@@ -1195,12 +1195,12 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1195
1195
|
},
|
|
1196
1196
|
`${C.name}-${L}`
|
|
1197
1197
|
)),
|
|
1198
|
-
|
|
1198
|
+
w && /* @__PURE__ */ m(
|
|
1199
1199
|
"button",
|
|
1200
1200
|
{
|
|
1201
1201
|
type: "button",
|
|
1202
1202
|
className: `select-dropzone select-dropzone--tile${f ? " is-over" : ""}`,
|
|
1203
|
-
onClick:
|
|
1203
|
+
onClick: S,
|
|
1204
1204
|
...b,
|
|
1205
1205
|
children: [
|
|
1206
1206
|
/* @__PURE__ */ e(kt, {}),
|
|
@@ -1209,12 +1209,12 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1209
1209
|
}
|
|
1210
1210
|
)
|
|
1211
1211
|
] }),
|
|
1212
|
-
!N &&
|
|
1212
|
+
!N && w && /* @__PURE__ */ m(
|
|
1213
1213
|
"button",
|
|
1214
1214
|
{
|
|
1215
1215
|
type: "button",
|
|
1216
1216
|
className: `select-dropzone${f ? " is-over" : ""}`,
|
|
1217
|
-
onClick:
|
|
1217
|
+
onClick: S,
|
|
1218
1218
|
...b,
|
|
1219
1219
|
children: [
|
|
1220
1220
|
/* @__PURE__ */ e(kt, {}),
|
|
@@ -1289,7 +1289,7 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1289
1289
|
r != null && !f && /* @__PURE__ */ e("p", { className: "select-field__hint", children: r })
|
|
1290
1290
|
] });
|
|
1291
1291
|
}), tc = R(function({ label: n, mode: l = "multiple", files: c, onFilesChange: s, urls: a, onUrlsChange: r, accept: d = ".jpg,.jpeg,.png,.webp", maxSizeMB: o = 3, maxItems: i = 10, maxFiles: h, uploadHint: u, urlPlaceholder: f, helpText: g, className: v, ...y }, x) {
|
|
1292
|
-
const $ = l === "single", _ = q(null), [p, b] = D(!1), [
|
|
1292
|
+
const $ = l === "single", _ = q(null), [p, b] = D(!1), [S, k] = D(0), [M, w] = D(""), [N, C] = D(null), L = $ ? 1 : Math.max(1, i), E = $ ? 1 : h ?? L, A = c.length + a.length, F = $ ? A === 0 : A < L && c.length < E, B = $ ? A === 0 : A < L, T = A > 0, I = o * 1024 * 1024, O = xe(() => c.map((H) => Kn(H) ? URL.createObjectURL(H) : null), [c]);
|
|
1293
1293
|
le(
|
|
1294
1294
|
() => () => {
|
|
1295
1295
|
O.forEach((H) => {
|
|
@@ -1298,15 +1298,15 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1298
1298
|
},
|
|
1299
1299
|
[O]
|
|
1300
1300
|
);
|
|
1301
|
-
const
|
|
1302
|
-
const Q = H.filter((ie) => ie.size <=
|
|
1301
|
+
const W = (H) => {
|
|
1302
|
+
const Q = H.filter((ie) => ie.size <= I && Xn(ie, d));
|
|
1303
1303
|
if (k(H.length - Q.length), !Q.length) return;
|
|
1304
1304
|
if ($) {
|
|
1305
1305
|
r([]), s(Q.slice(0, 1));
|
|
1306
1306
|
return;
|
|
1307
1307
|
}
|
|
1308
|
-
const z = Math.min(E - c.length, L - A),
|
|
1309
|
-
s(
|
|
1308
|
+
const z = Math.min(E - c.length, L - A), he = [...c, ...Q.slice(0, Math.max(0, z))];
|
|
1309
|
+
s(he);
|
|
1310
1310
|
}, Z = () => {
|
|
1311
1311
|
const H = M.trim();
|
|
1312
1312
|
if (H) {
|
|
@@ -1318,7 +1318,7 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1318
1318
|
C("Essa URL já foi adicionada.");
|
|
1319
1319
|
return;
|
|
1320
1320
|
}
|
|
1321
|
-
$ ? (s([]), r([H])) : r([...a, H].slice(0, L)),
|
|
1321
|
+
$ ? (s([]), r([H])) : r([...a, H].slice(0, L)), w(""), C(null);
|
|
1322
1322
|
}
|
|
1323
1323
|
}, G = (H) => {
|
|
1324
1324
|
H.key === "Enter" && (H.preventDefault(), Z());
|
|
@@ -1331,13 +1331,13 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1331
1331
|
},
|
|
1332
1332
|
onDragLeave: () => b(!1),
|
|
1333
1333
|
onDrop: (H) => {
|
|
1334
|
-
H.preventDefault(), b(!1),
|
|
1334
|
+
H.preventDefault(), b(!1), W(Array.from(H.dataTransfer.files));
|
|
1335
1335
|
}
|
|
1336
1336
|
};
|
|
1337
1337
|
return /* @__PURE__ */ m("div", { ref: x, ...y, className: `select-field select-imageupload${v ? " " + v : ""}`, children: [
|
|
1338
1338
|
n && /* @__PURE__ */ e("span", { className: "select-field__label", children: n }),
|
|
1339
1339
|
/* @__PURE__ */ m("div", { className: `select-uploadzone${p ? " is-over" : ""}`, ...ne, children: [
|
|
1340
|
-
|
|
1340
|
+
T ? /* @__PURE__ */ m("div", { className: "select-filetile-grid", children: [
|
|
1341
1341
|
c.map((H, Q) => /* @__PURE__ */ e(
|
|
1342
1342
|
wt,
|
|
1343
1343
|
{
|
|
@@ -1366,7 +1366,7 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1366
1366
|
size: "sm",
|
|
1367
1367
|
value: M,
|
|
1368
1368
|
onChange: (H) => {
|
|
1369
|
-
|
|
1369
|
+
w(H), N && C(null);
|
|
1370
1370
|
},
|
|
1371
1371
|
onKeyDown: G,
|
|
1372
1372
|
type: "url",
|
|
@@ -1387,13 +1387,13 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1387
1387
|
multiple: !$,
|
|
1388
1388
|
hidden: !0,
|
|
1389
1389
|
onChange: (H) => {
|
|
1390
|
-
|
|
1390
|
+
W(Array.from(H.target.files ?? [])), H.target.value = "";
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
1393
|
)
|
|
1394
1394
|
] }),
|
|
1395
|
-
|
|
1396
|
-
|
|
1395
|
+
S > 0 && /* @__PURE__ */ m(ut, { tone: "warning", children: [
|
|
1396
|
+
S,
|
|
1397
1397
|
" arquivo(s) ignorado(s): tipo não permitido ou acima de ",
|
|
1398
1398
|
o,
|
|
1399
1399
|
" MB."
|
|
@@ -1766,8 +1766,8 @@ function Oe({
|
|
|
1766
1766
|
var k;
|
|
1767
1767
|
const _ = ((k = h.current) == null ? void 0 : k.firstElementChild) ?? h.current, p = u.current;
|
|
1768
1768
|
if (!_ || !p) return;
|
|
1769
|
-
const b = _.getBoundingClientRect(),
|
|
1770
|
-
v({ top:
|
|
1769
|
+
const b = _.getBoundingClientRect(), S = ll(b, { width: p.offsetWidth, height: p.offsetHeight }, s, a);
|
|
1770
|
+
v({ top: S.top, left: S.left, minWidth: o ? b.width : void 0 });
|
|
1771
1771
|
}, [s, a, o]);
|
|
1772
1772
|
return Ee(() => {
|
|
1773
1773
|
if (!t) {
|
|
@@ -1799,8 +1799,8 @@ function Oe({
|
|
|
1799
1799
|
if (!t) return;
|
|
1800
1800
|
const _ = (b) => {
|
|
1801
1801
|
var k, M;
|
|
1802
|
-
const
|
|
1803
|
-
(k = u.current) != null && k.contains(
|
|
1802
|
+
const S = b.target;
|
|
1803
|
+
(k = u.current) != null && k.contains(S) || (M = h.current) != null && M.contains(S) || Qe.length && Qe[Qe.length - 1] !== u.current || n();
|
|
1804
1804
|
}, p = (b) => {
|
|
1805
1805
|
b.key === "Escape" && (b.stopPropagation(), n());
|
|
1806
1806
|
};
|
|
@@ -2385,7 +2385,7 @@ function Ic({ text: t, term: n }) {
|
|
|
2385
2385
|
return l ? /* @__PURE__ */ e("pre", { className: "select-json__pre", children: l.map((c, s) => /* @__PURE__ */ e("span", { className: `select-json__v--${c.cls}`, children: /* @__PURE__ */ e(St, { text: c.text, term: n }) }, s)) }) : /* @__PURE__ */ e("pre", { className: "select-json__pre", children: /* @__PURE__ */ e(St, { text: t, term: n }) });
|
|
2386
2386
|
}
|
|
2387
2387
|
const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, defaultOpen: s = !1, defaultExpandDepth: a = 1, searchable: r = !0, emptyLabel: d = "Sem dados", className: o, ...i }, h) {
|
|
2388
|
-
const [u, f] = D(s), [g, v] = D("tree"), [y, x] = D(""), [$, _] = D(/* @__PURE__ */ new Set()), [p, b] = Bc(),
|
|
2388
|
+
const [u, f] = D(s), [g, v] = D("tree"), [y, x] = D(""), [$, _] = D(/* @__PURE__ */ new Set()), [p, b] = Bc(), S = q(null), k = xe(() => yc(n), [n]), M = Nc(k), w = xe(
|
|
2389
2389
|
() => typeof n == "string" && k === n ? n : rl(k),
|
|
2390
2390
|
[n, k]
|
|
2391
2391
|
), N = xe(() => rt(k, () => {
|
|
@@ -2393,23 +2393,23 @@ const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2393
2393
|
le(() => {
|
|
2394
2394
|
_(N ? /* @__PURE__ */ new Set() : $c(k, a)), x("");
|
|
2395
2395
|
}, [k, a, N]);
|
|
2396
|
-
const E = xe(() => Sc(k, C ? y : ""), [k, y, C]), A = y.trim().length > 0, F = C ? E.count : Ac(
|
|
2396
|
+
const E = xe(() => Sc(k, C ? y : ""), [k, y, C]), A = y.trim().length > 0, F = C ? E.count : Ac(w, y);
|
|
2397
2397
|
le(() => {
|
|
2398
2398
|
var Z, G;
|
|
2399
|
-
!u || !A || (G = (Z =
|
|
2399
|
+
!u || !A || (G = (Z = S.current) == null ? void 0 : Z.querySelector(".select-json__hit")) == null || G.scrollIntoView({ block: "nearest" });
|
|
2400
2400
|
}, [u, A, y, g]);
|
|
2401
2401
|
const B = Te((Z) => {
|
|
2402
2402
|
_((G) => {
|
|
2403
2403
|
const J = new Set(G);
|
|
2404
2404
|
return J.delete(Z) || J.add(Z), J;
|
|
2405
2405
|
});
|
|
2406
|
-
}, []),
|
|
2406
|
+
}, []), T = L.length > 0 && L.every((Z) => $.has(Z)), I = () => _(T ? /* @__PURE__ */ new Set() : new Set(L)), O = { expanded: $, toggle: B, search: y, result: E, copied: p, copy: b }, W = u && !M;
|
|
2407
2407
|
return /* @__PURE__ */ m("div", { ref: h, ...i, className: `select-json${o ? " " + o : ""}`, children: [
|
|
2408
2408
|
/* @__PURE__ */ m("div", { className: "select-json__head", children: [
|
|
2409
2409
|
/* @__PURE__ */ e(Xe, { as: "h2", variant: "headingSm", children: l }),
|
|
2410
|
-
/* @__PURE__ */ e(gc, { open:
|
|
2410
|
+
/* @__PURE__ */ e(gc, { open: W, onToggle: () => f((Z) => !Z), openLabel: "Ocultar", disabled: M, children: M ? d : "Mostrar" })
|
|
2411
2411
|
] }),
|
|
2412
|
-
|
|
2412
|
+
W && /* @__PURE__ */ m("div", { className: "select-json__body", children: [
|
|
2413
2413
|
/* @__PURE__ */ m("div", { className: "select-json__toolbar", children: [
|
|
2414
2414
|
r ? /* @__PURE__ */ m(_e, { children: [
|
|
2415
2415
|
/* @__PURE__ */ e("span", { className: "select-json__searchicon", "aria-hidden": "true", children: /* @__PURE__ */ e(Jt, {}) }),
|
|
@@ -2430,10 +2430,10 @@ const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2430
2430
|
ge,
|
|
2431
2431
|
{
|
|
2432
2432
|
icon: /* @__PURE__ */ e(jn, {}),
|
|
2433
|
-
label:
|
|
2433
|
+
label: T ? "Recolher tudo" : "Expandir tudo",
|
|
2434
2434
|
size: "sm",
|
|
2435
|
-
active:
|
|
2436
|
-
onClick:
|
|
2435
|
+
active: T,
|
|
2436
|
+
onClick: I
|
|
2437
2437
|
}
|
|
2438
2438
|
),
|
|
2439
2439
|
/* @__PURE__ */ e(
|
|
@@ -2454,18 +2454,18 @@ const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2454
2454
|
label: p === "all" ? "Copiado!" : "Copiar JSON",
|
|
2455
2455
|
size: "sm",
|
|
2456
2456
|
active: p === "all",
|
|
2457
|
-
onClick: () => b("all",
|
|
2457
|
+
onClick: () => b("all", w)
|
|
2458
2458
|
}
|
|
2459
2459
|
)
|
|
2460
2460
|
] }),
|
|
2461
|
-
/* @__PURE__ */ e("div", { ref:
|
|
2461
|
+
/* @__PURE__ */ e("div", { ref: S, className: "select-json__scroll", style: { maxHeight: c }, children: C ? A && E.count === 0 ? /* @__PURE__ */ e("div", { className: "select-json__empty", children: /* @__PURE__ */ m(Xe, { as: "p", tone: "subdued", variant: "bodySm", children: [
|
|
2462
2462
|
"Nenhuma chave ou valor corresponde a “",
|
|
2463
2463
|
y.trim(),
|
|
2464
2464
|
"”."
|
|
2465
2465
|
] }) }) : /* @__PURE__ */ e("div", { className: "select-json__tree", children: He(k) ? /* @__PURE__ */ e(dl, { value: k, path: "", depth: 0, ancestors: [k], ctx: O }) : /* @__PURE__ */ m("div", { className: "select-json__row", style: { "--json-depth": 0 }, children: [
|
|
2466
2466
|
/* @__PURE__ */ e("span", { className: "select-json__caret select-json__caret--empty", "aria-hidden": "true" }),
|
|
2467
2467
|
/* @__PURE__ */ e("span", { className: "select-json__label", children: /* @__PURE__ */ e(il, { value: k, term: y, forceFull: !0 }) })
|
|
2468
|
-
] }) }) : /* @__PURE__ */ e(Ic, { text:
|
|
2468
|
+
] }) }) : /* @__PURE__ */ e(Ic, { text: w, term: y }) })
|
|
2469
2469
|
] })
|
|
2470
2470
|
] });
|
|
2471
2471
|
}), Pc = {
|
|
@@ -2539,8 +2539,8 @@ function Bt(t = {}) {
|
|
|
2539
2539
|
Me.set(y, x);
|
|
2540
2540
|
const p = new IntersectionObserver(
|
|
2541
2541
|
(b) => {
|
|
2542
|
-
for (const
|
|
2543
|
-
|
|
2542
|
+
for (const S of b)
|
|
2543
|
+
S.isIntersecting && (_(), f && p.unobserve(S.target));
|
|
2544
2544
|
},
|
|
2545
2545
|
{ threshold: 0 }
|
|
2546
2546
|
);
|
|
@@ -2634,8 +2634,8 @@ const o1 = R(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix
|
|
|
2634
2634
|
}, g = (_, p) => {
|
|
2635
2635
|
const b = u.slice();
|
|
2636
2636
|
b[_] = p;
|
|
2637
|
-
const
|
|
2638
|
-
return l(
|
|
2637
|
+
const S = b.join("").slice(0, c);
|
|
2638
|
+
return l(S), S;
|
|
2639
2639
|
}, v = (_, p) => {
|
|
2640
2640
|
const b = p.replace(/\D/g, "");
|
|
2641
2641
|
if (!b) {
|
|
@@ -2643,18 +2643,18 @@ const o1 = R(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix
|
|
|
2643
2643
|
return;
|
|
2644
2644
|
}
|
|
2645
2645
|
if (b.length === 1) {
|
|
2646
|
-
const
|
|
2647
|
-
_ < c - 1 && f(_ + 1),
|
|
2646
|
+
const S = g(_, b);
|
|
2647
|
+
_ < c - 1 && f(_ + 1), S.length === c && (s == null || s(S));
|
|
2648
2648
|
} else
|
|
2649
2649
|
y(b, _);
|
|
2650
2650
|
}, y = (_, p) => {
|
|
2651
2651
|
const b = u.slice();
|
|
2652
2652
|
for (let M = 0; M < _.length && p + M < c; M++)
|
|
2653
2653
|
b[p + M] = _[M] ?? "";
|
|
2654
|
-
const
|
|
2655
|
-
l(
|
|
2654
|
+
const S = b.join("").slice(0, c);
|
|
2655
|
+
l(S);
|
|
2656
2656
|
const k = Math.min(p + _.length, c) - 1;
|
|
2657
|
-
f(Math.min(k + 1, c - 1)),
|
|
2657
|
+
f(Math.min(k + 1, c - 1)), S.length === c && (s == null || s(S));
|
|
2658
2658
|
}, x = (_, p) => {
|
|
2659
2659
|
p.key === "Backspace" && !u[_] && _ > 0 ? (p.preventDefault(), g(_ - 1, ""), f(_ - 1)) : p.key === "ArrowLeft" && _ > 0 ? (p.preventDefault(), f(_ - 1)) : p.key === "ArrowRight" && _ < c - 1 && (p.preventDefault(), f(_ + 1));
|
|
2660
2660
|
}, $ = (_, p) => {
|
|
@@ -3471,16 +3471,16 @@ const ns = R(function({ page: n, pageCount: l, total: c, pageSize: s, hasPreviou
|
|
|
3471
3471
|
}
|
|
3472
3472
|
),
|
|
3473
3473
|
_ ? p.map(
|
|
3474
|
-
(
|
|
3474
|
+
(S, k) => S === "gap" ? /* @__PURE__ */ e("span", { className: "select-pagination__gap", "aria-hidden": "true", children: "…" }, `gap-${k}`) : /* @__PURE__ */ e(
|
|
3475
3475
|
"button",
|
|
3476
3476
|
{
|
|
3477
3477
|
type: "button",
|
|
3478
|
-
className: `select-pagination__page${
|
|
3479
|
-
onClick: () => i == null ? void 0 : i(
|
|
3480
|
-
"aria-current":
|
|
3481
|
-
children:
|
|
3478
|
+
className: `select-pagination__page${S === n ? " is-active" : ""}`,
|
|
3479
|
+
onClick: () => i == null ? void 0 : i(S),
|
|
3480
|
+
"aria-current": S === n ? "page" : void 0,
|
|
3481
|
+
children: S
|
|
3482
3482
|
},
|
|
3483
|
-
|
|
3483
|
+
S
|
|
3484
3484
|
)
|
|
3485
3485
|
) : /* @__PURE__ */ e("span", { className: "select-pagination__current", children: l != null ? `${n} / ${l}` : `Página ${n}` }),
|
|
3486
3486
|
/* @__PURE__ */ e(
|
|
@@ -3550,28 +3550,28 @@ function T1({
|
|
|
3550
3550
|
filters: i,
|
|
3551
3551
|
columnsKey: h
|
|
3552
3552
|
}) {
|
|
3553
|
-
const [u, f] = D(() => h ? ls(h) : []), [g, v] = D(!1), [y, x] = D(!1), $ = xe(() => new Set(u), [u]), _ = t.filter(yn), p = _.length > 0 && _.every((
|
|
3553
|
+
const [u, f] = D(() => h ? ls(h) : []), [g, v] = D(!1), [y, x] = D(!1), $ = xe(() => new Set(u), [u]), _ = t.filter(yn), p = _.length > 0 && _.every((I) => $.has(I.key)), b = (I) => !p && $.has(I.key) && yn(I), S = t.filter((I) => !b(I)), k = _.filter((I) => !b(I)), [M, w] = D(null), N = (I) => {
|
|
3554
3554
|
f((O) => {
|
|
3555
|
-
const
|
|
3556
|
-
return h && cs(h, Z),
|
|
3555
|
+
const W = !O.includes(I.key), Z = W ? [...O, I.key] : O.filter((G) => G !== I.key);
|
|
3556
|
+
return h && cs(h, Z), W && w((G) => G && G.key === I.key ? null : G), Z;
|
|
3557
3557
|
});
|
|
3558
|
-
}, C = (
|
|
3559
|
-
|
|
3560
|
-
const
|
|
3561
|
-
return !O || O.key !==
|
|
3558
|
+
}, C = (I) => {
|
|
3559
|
+
w((O) => {
|
|
3560
|
+
const W = I.sortDefault ?? "asc";
|
|
3561
|
+
return !O || O.key !== I.key ? { key: I.key, dir: W } : O.dir === W ? { key: I.key, dir: W === "asc" ? "desc" : "asc" } : null;
|
|
3562
3562
|
});
|
|
3563
|
-
}, L = M ? t.find((
|
|
3564
|
-
const
|
|
3565
|
-
if (!M || !
|
|
3563
|
+
}, L = M ? t.find((I) => I.key === M.key) : void 0, E = xe(() => {
|
|
3564
|
+
const I = L == null ? void 0 : L.sortValue;
|
|
3565
|
+
if (!M || !I) return n;
|
|
3566
3566
|
const O = M.dir === "asc" ? 1 : -1;
|
|
3567
|
-
return [...n].sort((
|
|
3568
|
-
}, [n, M, L]), A =
|
|
3569
|
-
label:
|
|
3570
|
-
align:
|
|
3571
|
-
width:
|
|
3572
|
-
sortable: !!
|
|
3573
|
-
sortDir: (M == null ? void 0 : M.key) ===
|
|
3574
|
-
onSort:
|
|
3567
|
+
return [...n].sort((W, Z) => ss(I(W), I(Z), O));
|
|
3568
|
+
}, [n, M, L]), A = S.map((I) => ({
|
|
3569
|
+
label: I.title,
|
|
3570
|
+
align: I.align,
|
|
3571
|
+
width: I.width,
|
|
3572
|
+
sortable: !!I.sortValue,
|
|
3573
|
+
sortDir: (M == null ? void 0 : M.key) === I.key ? M.dir : null,
|
|
3574
|
+
onSort: I.sortValue ? () => C(I) : void 0
|
|
3575
3575
|
})), F = !c && s ? /* @__PURE__ */ e(zc, { icon: s.icon, title: s.heading, subtitle: s.text, action: s.action }) : void 0, B = h && _.length > 0 ? /* @__PURE__ */ e(
|
|
3576
3576
|
Oe,
|
|
3577
3577
|
{
|
|
@@ -3587,26 +3587,26 @@ function T1({
|
|
|
3587
3587
|
size: "sm",
|
|
3588
3588
|
active: g,
|
|
3589
3589
|
"aria-expanded": g,
|
|
3590
|
-
onClick: () => v((
|
|
3590
|
+
onClick: () => v((I) => !I)
|
|
3591
3591
|
}
|
|
3592
3592
|
),
|
|
3593
|
-
children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "menu", children: _.map((
|
|
3594
|
-
const O = !b(
|
|
3593
|
+
children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "menu", children: _.map((I) => {
|
|
3594
|
+
const O = !b(I), W = O && k.length === 1;
|
|
3595
3595
|
return /* @__PURE__ */ m(
|
|
3596
3596
|
"button",
|
|
3597
3597
|
{
|
|
3598
3598
|
type: "button",
|
|
3599
3599
|
role: "menuitemcheckbox",
|
|
3600
3600
|
"aria-checked": O,
|
|
3601
|
-
disabled:
|
|
3601
|
+
disabled: W,
|
|
3602
3602
|
className: `select-facet__opt${O ? " is-selected" : ""}`,
|
|
3603
|
-
onClick: () => N(
|
|
3603
|
+
onClick: () => N(I),
|
|
3604
3604
|
children: [
|
|
3605
|
-
/* @__PURE__ */ e("span", { children:
|
|
3605
|
+
/* @__PURE__ */ e("span", { children: I.title }),
|
|
3606
3606
|
O && /* @__PURE__ */ e("span", { className: "select-facet__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Ae, {}) })
|
|
3607
3607
|
]
|
|
3608
3608
|
},
|
|
3609
|
-
|
|
3609
|
+
I.key
|
|
3610
3610
|
);
|
|
3611
3611
|
}) }) })
|
|
3612
3612
|
}
|
|
@@ -3615,7 +3615,7 @@ function T1({
|
|
|
3615
3615
|
/* @__PURE__ */ e(Yc, { columns: A, empty: F, title: d, filters: i, action: B ? /* @__PURE__ */ m("span", { className: "select-datatable__toolbar", children: [
|
|
3616
3616
|
o,
|
|
3617
3617
|
B
|
|
3618
|
-
] }) : o, children: c ? Array.from({ length: 5 }, (
|
|
3618
|
+
] }) : o, children: c ? Array.from({ length: 5 }, (I, O) => /* @__PURE__ */ e(bn, { children: S.map((W, Z) => /* @__PURE__ */ e(xn, { align: W.align, width: W.width, children: /* @__PURE__ */ e("span", { className: "select-skeleton select-datatable__skel" }) }, Z)) }, `skeleton-${O}`)) : E.map((I) => /* @__PURE__ */ e(bn, { onClick: r ? () => r(I) : void 0, children: S.map((O, W) => /* @__PURE__ */ e(xn, { align: O.align, width: O.width, children: O.render(I) }, W)) }, l(I))) }),
|
|
3619
3619
|
a && /* @__PURE__ */ m("div", { className: "select-datatable__pagination", children: [
|
|
3620
3620
|
a.pageSizeOptions && a.pageSizeOptions.length > 1 && a.onPageSizeChange && /* @__PURE__ */ e("div", { className: "select-datatable__pagesize", children: /* @__PURE__ */ e(
|
|
3621
3621
|
Oe,
|
|
@@ -3629,7 +3629,7 @@ function T1({
|
|
|
3629
3629
|
{
|
|
3630
3630
|
type: "button",
|
|
3631
3631
|
className: `select-facet${y ? " is-active" : ""}`,
|
|
3632
|
-
onClick: () => x((
|
|
3632
|
+
onClick: () => x((I) => !I),
|
|
3633
3633
|
"aria-expanded": y,
|
|
3634
3634
|
"aria-haspopup": "listbox",
|
|
3635
3635
|
children: [
|
|
@@ -3641,8 +3641,8 @@ function T1({
|
|
|
3641
3641
|
]
|
|
3642
3642
|
}
|
|
3643
3643
|
),
|
|
3644
|
-
children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "listbox", children: a.pageSizeOptions.map((
|
|
3645
|
-
const O =
|
|
3644
|
+
children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "listbox", children: a.pageSizeOptions.map((I) => {
|
|
3645
|
+
const O = I === a.pageSize;
|
|
3646
3646
|
return /* @__PURE__ */ m(
|
|
3647
3647
|
"button",
|
|
3648
3648
|
{
|
|
@@ -3651,18 +3651,18 @@ function T1({
|
|
|
3651
3651
|
"aria-selected": O,
|
|
3652
3652
|
className: `select-facet__opt${O ? " is-selected" : ""}`,
|
|
3653
3653
|
onClick: () => {
|
|
3654
|
-
var
|
|
3655
|
-
(
|
|
3654
|
+
var W;
|
|
3655
|
+
(W = a.onPageSizeChange) == null || W.call(a, I), x(!1);
|
|
3656
3656
|
},
|
|
3657
3657
|
children: [
|
|
3658
3658
|
/* @__PURE__ */ m("span", { children: [
|
|
3659
|
-
|
|
3659
|
+
I,
|
|
3660
3660
|
" por página"
|
|
3661
3661
|
] }),
|
|
3662
3662
|
O && /* @__PURE__ */ e("span", { className: "select-facet__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Ae, {}) })
|
|
3663
3663
|
]
|
|
3664
3664
|
},
|
|
3665
|
-
|
|
3665
|
+
I
|
|
3666
3666
|
);
|
|
3667
3667
|
}) }) })
|
|
3668
3668
|
}
|
|
@@ -3712,16 +3712,16 @@ function is(t, n) {
|
|
|
3712
3712
|
return n ? `${l} ${De(t.getHours())}:${De(t.getMinutes())}` : l;
|
|
3713
3713
|
}
|
|
3714
3714
|
const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, placeholder: a, required: r, disabled: d, error: o, hint: i, minDate: h, maxDate: u, clearable: f = !0, id: g, className: v, ...y }, x) {
|
|
3715
|
-
const $ = te(), _ = g ?? $, [p, b] = D(!1),
|
|
3716
|
-
d || (M(vt(
|
|
3717
|
-
}, B = (
|
|
3718
|
-
if (C(
|
|
3719
|
-
const Z = new Date(
|
|
3720
|
-
s && Z.setHours((
|
|
3721
|
-
},
|
|
3722
|
-
const [Z = "", G = ""] =
|
|
3715
|
+
const $ = te(), _ = g ?? $, [p, b] = D(!1), S = rs(l), [k, M] = D(() => vt(S ?? /* @__PURE__ */ new Date())), w = h ? ct(h) : null, N = u ? ct(u) : null, C = (W) => !!w && ct(W) < w || !!N && ct(W) > N, L = Mn(vt(k), -vt(k).getDay()), E = Array.from({ length: 42 }, (W, Z) => Mn(L, Z)), A = ct(/* @__PURE__ */ new Date()), F = () => {
|
|
3716
|
+
d || (M(vt(S ?? /* @__PURE__ */ new Date())), b((W) => !W));
|
|
3717
|
+
}, B = (W) => {
|
|
3718
|
+
if (C(W)) return;
|
|
3719
|
+
const Z = new Date(W);
|
|
3720
|
+
s && Z.setHours((S == null ? void 0 : S.getHours()) ?? 0, (S == null ? void 0 : S.getMinutes()) ?? 0, 0, 0), c(wn(Z, s)), s || b(!1);
|
|
3721
|
+
}, T = (W) => {
|
|
3722
|
+
const [Z = "", G = ""] = W.split(":"), J = Number(Z), re = Number(G), me = new Date(S ?? A);
|
|
3723
3723
|
me.setHours(Number.isFinite(J) ? J : 0, Number.isFinite(re) ? re : 0, 0, 0), c(wn(me, !0));
|
|
3724
|
-
},
|
|
3724
|
+
}, I = () => {
|
|
3725
3725
|
c(""), b(!1);
|
|
3726
3726
|
}, O = /* @__PURE__ */ m("div", { className: `select-input-wrap${o ? " select-input-wrap--error" : ""}`, children: [
|
|
3727
3727
|
/* @__PURE__ */ e(
|
|
@@ -3735,7 +3735,7 @@ const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, place
|
|
|
3735
3735
|
"aria-haspopup": "dialog",
|
|
3736
3736
|
"aria-expanded": p,
|
|
3737
3737
|
"aria-invalid": o ? !0 : void 0,
|
|
3738
|
-
children:
|
|
3738
|
+
children: S ? is(S, s) : /* @__PURE__ */ e("span", { className: "select-datefield__ph", children: a ?? (s ? "Selecione data e hora" : "Selecione uma data") })
|
|
3739
3739
|
}
|
|
3740
3740
|
),
|
|
3741
3741
|
/* @__PURE__ */ e("span", { className: "select-datefield__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(qn, {}) })
|
|
@@ -3744,19 +3744,19 @@ const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, place
|
|
|
3744
3744
|
n && /* @__PURE__ */ e(lt, { htmlFor: _, label: r ? `${n} *` : n }),
|
|
3745
3745
|
/* @__PURE__ */ e("div", { className: "select-datefield", children: /* @__PURE__ */ e(Oe, { active: p, onClose: () => b(!1), placement: "bottom-start", role: "dialog", activator: O, children: /* @__PURE__ */ m("div", { className: "select-datefield__pop", children: [
|
|
3746
3746
|
/* @__PURE__ */ m("div", { className: "select-datepicker__calhead", children: [
|
|
3747
|
-
/* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Mês anterior", onClick: () => M((
|
|
3747
|
+
/* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Mês anterior", onClick: () => M((W) => $n(W, -1)), children: /* @__PURE__ */ e(Kt, {}) }),
|
|
3748
3748
|
/* @__PURE__ */ m("span", { className: "select-datepicker__monthlabel", children: [
|
|
3749
3749
|
os[k.getMonth()],
|
|
3750
3750
|
" ",
|
|
3751
3751
|
k.getFullYear()
|
|
3752
3752
|
] }),
|
|
3753
|
-
/* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Próximo mês", onClick: () => M((
|
|
3753
|
+
/* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Próximo mês", onClick: () => M((W) => $n(W, 1)), children: /* @__PURE__ */ e(dt, {}) })
|
|
3754
3754
|
] }),
|
|
3755
3755
|
/* @__PURE__ */ m("div", { className: "select-datepicker__grid", role: "grid", children: [
|
|
3756
|
-
as.map((
|
|
3757
|
-
E.map((
|
|
3758
|
-
const Z =
|
|
3759
|
-
return /* @__PURE__ */ e("div", { className: "select-datepicker__day", children: /* @__PURE__ */ e("button", { type: "button", className: J, disabled: C(
|
|
3756
|
+
as.map((W) => /* @__PURE__ */ e("div", { className: "select-datepicker__weekday", children: W }, W)),
|
|
3757
|
+
E.map((W) => {
|
|
3758
|
+
const Z = W.getMonth() !== k.getMonth(), G = !!S && kn(W, S), J = "select-datepicker__daybtn" + (G ? " is-selected" : "") + (kn(W, A) && !G ? " is-today" : "") + (Z ? " is-outside" : "");
|
|
3759
|
+
return /* @__PURE__ */ e("div", { className: "select-datepicker__day", children: /* @__PURE__ */ e("button", { type: "button", className: J, disabled: C(W), onClick: () => B(W), children: W.getDate() }) }, W.getTime());
|
|
3760
3760
|
})
|
|
3761
3761
|
] }),
|
|
3762
3762
|
s && /* @__PURE__ */ m("div", { className: "select-datefield__time", children: [
|
|
@@ -3767,13 +3767,13 @@ const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, place
|
|
|
3767
3767
|
type: "time",
|
|
3768
3768
|
className: "select-input select-datefield__time-input",
|
|
3769
3769
|
"aria-label": "Horário",
|
|
3770
|
-
value:
|
|
3771
|
-
onChange: (
|
|
3770
|
+
value: S ? `${De(S.getHours())}:${De(S.getMinutes())}` : "",
|
|
3771
|
+
onChange: (W) => T(W.target.value)
|
|
3772
3772
|
}
|
|
3773
3773
|
)
|
|
3774
3774
|
] }),
|
|
3775
3775
|
/* @__PURE__ */ m("div", { className: "select-datefield__footer", children: [
|
|
3776
|
-
f &&
|
|
3776
|
+
f && S ? /* @__PURE__ */ e(ve, { variant: "secondary", inline: !0, onClick: I, children: "Limpar" }) : /* @__PURE__ */ e("span", {}),
|
|
3777
3777
|
/* @__PURE__ */ m("div", { className: "select-datefield__footer-right", children: [
|
|
3778
3778
|
/* @__PURE__ */ e(ve, { variant: "secondary", inline: !0, onClick: () => B(A), children: "Hoje" }),
|
|
3779
3779
|
s && /* @__PURE__ */ e(ve, { variant: "primary", inline: !0, onClick: () => b(!1), children: "Concluir" })
|
|
@@ -3870,10 +3870,10 @@ function us({
|
|
|
3870
3870
|
);
|
|
3871
3871
|
}
|
|
3872
3872
|
const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, search: a, disabled: r, className: d, ...o }, i) {
|
|
3873
|
-
const [h, u] = D([]), [f, g] = D(null), [v, y] = D(!1), x = (M) => (l[M.key] ?? "").trim() !== "", $ = (M) => !!M.pinned || x(M) || h.includes(M.key), _ = n.filter($), p = n.filter((M) => !$(M)), b = n.filter(x),
|
|
3873
|
+
const [h, u] = D([]), [f, g] = D(null), [v, y] = D(!1), x = (M) => (l[M.key] ?? "").trim() !== "", $ = (M) => !!M.pinned || x(M) || h.includes(M.key), _ = n.filter($), p = n.filter((M) => !$(M)), b = n.filter(x), S = () => {
|
|
3874
3874
|
u([]), g(null), s();
|
|
3875
3875
|
}, k = (M) => {
|
|
3876
|
-
u((
|
|
3876
|
+
u((w) => w.includes(M) ? w : [...w, M]), y(!1), g(M);
|
|
3877
3877
|
};
|
|
3878
3878
|
return /* @__PURE__ */ m("div", { ref: i, ...o, className: `select-filterbar${d ? " " + d : ""}`, children: [
|
|
3879
3879
|
/* @__PURE__ */ m("div", { className: "select-filterbar__row", children: [
|
|
@@ -3906,10 +3906,10 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
3906
3906
|
{
|
|
3907
3907
|
filter: M,
|
|
3908
3908
|
value: l[M.key] ?? "",
|
|
3909
|
-
onChange: (
|
|
3909
|
+
onChange: (w) => c(M.key, w),
|
|
3910
3910
|
open: f === M.key,
|
|
3911
|
-
onToggle: () => g((
|
|
3912
|
-
onClose: () => g((
|
|
3911
|
+
onToggle: () => g((w) => w === M.key ? null : M.key),
|
|
3912
|
+
onClose: () => g((w) => w === M.key ? null : w),
|
|
3913
3913
|
disabled: r
|
|
3914
3914
|
},
|
|
3915
3915
|
M.key
|
|
@@ -3964,11 +3964,11 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
3964
3964
|
}
|
|
3965
3965
|
)
|
|
3966
3966
|
] }, M.key)),
|
|
3967
|
-
/* @__PURE__ */ e("button", { type: "button", className: "select-filterbar__clear", onClick:
|
|
3967
|
+
/* @__PURE__ */ e("button", { type: "button", className: "select-filterbar__clear", onClick: S, children: "Limpar tudo" })
|
|
3968
3968
|
] })
|
|
3969
3969
|
] });
|
|
3970
3970
|
}), O1 = R(function({ label: n, options: l, selected: c, onChange: s, placeholder: a = "Selecionar…", hint: r, error: d, onBlur: o, size: i = "md", className: h, ...u }, f) {
|
|
3971
|
-
const [g, v] = D(!1), [y, x] = D(""), $ = l.filter((b) => b.label.toLowerCase().includes(y.trim().toLowerCase())), _ = (b) => s(c.includes(b) ? c.filter((
|
|
3971
|
+
const [g, v] = D(!1), [y, x] = D(""), $ = l.filter((b) => b.label.toLowerCase().includes(y.trim().toLowerCase())), _ = (b) => s(c.includes(b) ? c.filter((S) => S !== b) : [...c, b]), p = c.map((b) => l.find((S) => S.value === b)).filter((b) => b != null);
|
|
3972
3972
|
return /* @__PURE__ */ m("div", { ref: f, ...u, className: `select-field${i === "sm" ? " select-field--sm" : ""}${h ? " " + h : ""}`, children: [
|
|
3973
3973
|
n && /* @__PURE__ */ e("div", { className: "select-field__labelrow", children: /* @__PURE__ */ e("span", { className: "select-field__label", children: n }) }),
|
|
3974
3974
|
/* @__PURE__ */ e(
|
|
@@ -4003,8 +4003,8 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
4003
4003
|
type: "button",
|
|
4004
4004
|
className: "select-tagselect__remove",
|
|
4005
4005
|
"aria-label": `Remover ${b.label}`,
|
|
4006
|
-
onClick: (
|
|
4007
|
-
|
|
4006
|
+
onClick: (S) => {
|
|
4007
|
+
S.stopPropagation(), _(b.value);
|
|
4008
4008
|
},
|
|
4009
4009
|
children: /* @__PURE__ */ e(Ke, {})
|
|
4010
4010
|
}
|
|
@@ -4017,21 +4017,21 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
4017
4017
|
children: /* @__PURE__ */ m("div", { className: "select-tagselect__menu", children: [
|
|
4018
4018
|
/* @__PURE__ */ e("div", { className: "select-tagselect__search", children: /* @__PURE__ */ e(ml, { value: y, onChange: x, placeholder: "Buscar…" }) }),
|
|
4019
4019
|
/* @__PURE__ */ e("div", { className: "select-tagselect__options", role: "presentation", children: $.length === 0 ? /* @__PURE__ */ e("div", { className: "select-tagselect__empty", children: "Nada encontrado" }) : $.map((b) => {
|
|
4020
|
-
const
|
|
4020
|
+
const S = c.includes(b.value);
|
|
4021
4021
|
return /* @__PURE__ */ m(
|
|
4022
4022
|
"button",
|
|
4023
4023
|
{
|
|
4024
4024
|
type: "button",
|
|
4025
4025
|
role: "option",
|
|
4026
|
-
"aria-selected":
|
|
4027
|
-
className: `select-tagselect__option${
|
|
4026
|
+
"aria-selected": S,
|
|
4027
|
+
className: `select-tagselect__option${S ? " is-selected" : ""}`,
|
|
4028
4028
|
onClick: () => _(b.value),
|
|
4029
4029
|
children: [
|
|
4030
4030
|
/* @__PURE__ */ m("span", { className: "select-tagselect__optlabel", children: [
|
|
4031
4031
|
b.label,
|
|
4032
4032
|
b.secondary && /* @__PURE__ */ e("span", { className: "select-tagselect__optsec", children: b.secondary })
|
|
4033
4033
|
] }),
|
|
4034
|
-
|
|
4034
|
+
S && /* @__PURE__ */ e("span", { className: "select-tagselect__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Ae, {}) })
|
|
4035
4035
|
]
|
|
4036
4036
|
},
|
|
4037
4037
|
b.value
|
|
@@ -4525,12 +4525,12 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
|
|
|
4525
4525
|
/* @__PURE__ */ e("text", { x: f.left - 8, y: _(p), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(p) })
|
|
4526
4526
|
] }, b)),
|
|
4527
4527
|
t.map((p, b) => {
|
|
4528
|
-
const
|
|
4528
|
+
const S = f.left + y * b + y / 2, k = p.value / u * v, M = $ - k;
|
|
4529
4529
|
return /* @__PURE__ */ m("g", { children: [
|
|
4530
4530
|
/* @__PURE__ */ e(
|
|
4531
4531
|
"rect",
|
|
4532
4532
|
{
|
|
4533
|
-
x:
|
|
4533
|
+
x: S - x / 2,
|
|
4534
4534
|
y: M,
|
|
4535
4535
|
width: x,
|
|
4536
4536
|
height: Math.max(0, k),
|
|
@@ -4539,7 +4539,7 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
|
|
|
4539
4539
|
className: "select-chart__bar",
|
|
4540
4540
|
style: { animationDelay: `${b * 40}ms` },
|
|
4541
4541
|
onMouseEnter: () => o.show({
|
|
4542
|
-
x:
|
|
4542
|
+
x: S,
|
|
4543
4543
|
y: M,
|
|
4544
4544
|
place: M < f.top + 52 ? "bottom" : "top",
|
|
4545
4545
|
rows: [{ label: p.label, value: c(p.value), color: h }]
|
|
@@ -4547,7 +4547,7 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
|
|
|
4547
4547
|
onMouseLeave: o.hide
|
|
4548
4548
|
}
|
|
4549
4549
|
),
|
|
4550
|
-
/* @__PURE__ */ e("text", { x:
|
|
4550
|
+
/* @__PURE__ */ e("text", { x: S, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: p.label })
|
|
4551
4551
|
] }, b);
|
|
4552
4552
|
})
|
|
4553
4553
|
] }),
|
|
@@ -4555,32 +4555,32 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
|
|
|
4555
4555
|
] });
|
|
4556
4556
|
}
|
|
4557
4557
|
function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1, className: a, ...r }) {
|
|
4558
|
-
const { ref: d, width: o } = ce(l), i = X(), h = te(), [u, f] = D(null), { max: g, values: v } = Ss(Math.max(0, ...t.flatMap((
|
|
4558
|
+
const { ref: d, width: o } = ce(l), i = X(), h = te(), [u, f] = D(null), { max: g, values: v } = Ss(Math.max(0, ...t.flatMap((w) => w.data))), y = Be, x = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = n.length, p = (w) => y.left + (_ <= 1 ? x / 2 : w / (_ - 1) * x), b = (w) => y.top + $ - w / g * $, S = _ > 1 ? x / (_ - 1) : x, k = Math.max(1, Math.ceil(_ / 7)), M = y.top + $;
|
|
4559
4559
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
4560
4560
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
|
|
4561
|
-
/* @__PURE__ */ e("defs", { children: t.map((
|
|
4562
|
-
const C =
|
|
4561
|
+
/* @__PURE__ */ e("defs", { children: t.map((w, N) => {
|
|
4562
|
+
const C = w.color ?? j(N);
|
|
4563
4563
|
return /* @__PURE__ */ m("linearGradient", { id: `${h}-a${N}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4564
4564
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: C, stopOpacity: 0.32 }),
|
|
4565
4565
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: C, stopOpacity: 0 })
|
|
4566
4566
|
] }, N);
|
|
4567
4567
|
}) }),
|
|
4568
|
-
v.map((
|
|
4568
|
+
v.map((w, N) => /* @__PURE__ */ m("g", { children: [
|
|
4569
4569
|
/* @__PURE__ */ e(
|
|
4570
4570
|
"line",
|
|
4571
4571
|
{
|
|
4572
4572
|
x1: y.left,
|
|
4573
4573
|
x2: o - y.right,
|
|
4574
|
-
y1: b(
|
|
4575
|
-
y2: b(
|
|
4576
|
-
className:
|
|
4574
|
+
y1: b(w),
|
|
4575
|
+
y2: b(w),
|
|
4576
|
+
className: w === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
4577
4577
|
}
|
|
4578
4578
|
),
|
|
4579
|
-
/* @__PURE__ */ e("text", { x: y.left - 8, y: b(
|
|
4579
|
+
/* @__PURE__ */ e("text", { x: y.left - 8, y: b(w), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(w) })
|
|
4580
4580
|
] }, N)),
|
|
4581
4581
|
u != null && /* @__PURE__ */ e("line", { x1: p(u), x2: p(u), y1: y.top, y2: M, className: "select-chart__crosshair" }),
|
|
4582
|
-
t.map((
|
|
4583
|
-
const C =
|
|
4582
|
+
t.map((w, N) => {
|
|
4583
|
+
const C = w.color ?? j(N), L = w.data.map((E, A) => [p(A), b(E)]);
|
|
4584
4584
|
return /* @__PURE__ */ m("g", { children: [
|
|
4585
4585
|
s && /* @__PURE__ */ e("path", { d: xl(L, M), fill: `url(#${h}-a${N})`, className: "select-chart__area" }),
|
|
4586
4586
|
/* @__PURE__ */ e(
|
|
@@ -4598,26 +4598,26 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1
|
|
|
4598
4598
|
)
|
|
4599
4599
|
] }, N);
|
|
4600
4600
|
}),
|
|
4601
|
-
u != null && t.map((
|
|
4601
|
+
u != null && t.map((w, N) => /* @__PURE__ */ e(
|
|
4602
4602
|
"circle",
|
|
4603
4603
|
{
|
|
4604
4604
|
cx: p(u),
|
|
4605
|
-
cy: b(
|
|
4605
|
+
cy: b(w.data[u] ?? 0),
|
|
4606
4606
|
r: 3.5,
|
|
4607
|
-
fill:
|
|
4607
|
+
fill: w.color ?? j(N),
|
|
4608
4608
|
className: "select-chart__dot select-chart__dot--active"
|
|
4609
4609
|
},
|
|
4610
4610
|
N
|
|
4611
4611
|
)),
|
|
4612
4612
|
n.map(
|
|
4613
|
-
(
|
|
4613
|
+
(w, N) => N % k === 0 || N === _ - 1 ? /* @__PURE__ */ e("text", { x: p(N), y: l - y.bottom + 16, className: "select-chart__xlabel", textAnchor: N === 0 ? "start" : N === _ - 1 ? "end" : "middle", children: w }, N) : null
|
|
4614
4614
|
),
|
|
4615
|
-
n.map((
|
|
4615
|
+
n.map((w, N) => /* @__PURE__ */ e(
|
|
4616
4616
|
"rect",
|
|
4617
4617
|
{
|
|
4618
|
-
x: p(N) -
|
|
4618
|
+
x: p(N) - S / 2,
|
|
4619
4619
|
y: y.top,
|
|
4620
|
-
width:
|
|
4620
|
+
width: S,
|
|
4621
4621
|
height: $,
|
|
4622
4622
|
fill: "transparent",
|
|
4623
4623
|
onMouseEnter: () => {
|
|
@@ -4627,7 +4627,7 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1
|
|
|
4627
4627
|
x: p(N),
|
|
4628
4628
|
y: C,
|
|
4629
4629
|
place: C < y.top + 52 ? "bottom" : "top",
|
|
4630
|
-
title:
|
|
4630
|
+
title: w,
|
|
4631
4631
|
rows: t.map((L, E) => ({ label: L.name, value: c(L.data[N] ?? 0), color: L.color ?? j(E) }))
|
|
4632
4632
|
});
|
|
4633
4633
|
},
|
|
@@ -4644,7 +4644,7 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1
|
|
|
4644
4644
|
function eo({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
|
|
4645
4645
|
const { ref: r, width: d } = ce(l), o = X(), i = te(), [h, u] = D(null), f = n.length, g = new Array(f).fill(0), v = t.map(
|
|
4646
4646
|
(N) => N.data.map((C, L) => (g[L] = (g[L] ?? 0) + (C ?? 0), g[L]))
|
|
4647
|
-
), y = ye(Math.max(0, ...g)), x = Be, $ = Math.max(0, d - x.left - x.right), _ = l - x.top - x.bottom, p = (N) => x.left + (f <= 1 ? $ / 2 : N / (f - 1) * $), b = (N) => x.top + _ - N / y * _,
|
|
4647
|
+
), y = ye(Math.max(0, ...g)), x = Be, $ = Math.max(0, d - x.left - x.right), _ = l - x.top - x.bottom, p = (N) => x.left + (f <= 1 ? $ / 2 : N / (f - 1) * $), b = (N) => x.top + _ - N / y * _, S = f > 1 ? $ / (f - 1) : $, k = Math.max(1, Math.ceil(f / 7)), M = x.top + _, w = v[v.length - 1];
|
|
4648
4648
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
4649
4649
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", children: [
|
|
4650
4650
|
/* @__PURE__ */ e("defs", { children: t.map((N, C) => {
|
|
@@ -4681,14 +4681,14 @@ function eo({ series: t, labels: n, height: l = 240, format: c = Y, className: s
|
|
|
4681
4681
|
n.map((N, C) => /* @__PURE__ */ e(
|
|
4682
4682
|
"rect",
|
|
4683
4683
|
{
|
|
4684
|
-
x: p(C) -
|
|
4684
|
+
x: p(C) - S / 2,
|
|
4685
4685
|
y: x.top,
|
|
4686
|
-
width:
|
|
4686
|
+
width: S,
|
|
4687
4687
|
height: _,
|
|
4688
4688
|
fill: "transparent",
|
|
4689
4689
|
onMouseEnter: () => {
|
|
4690
4690
|
u(C);
|
|
4691
|
-
const L = b((
|
|
4691
|
+
const L = b((w == null ? void 0 : w[C]) ?? 0);
|
|
4692
4692
|
o.show({
|
|
4693
4693
|
x: p(C),
|
|
4694
4694
|
y: L,
|
|
@@ -4708,7 +4708,7 @@ function eo({ series: t, labels: n, height: l = 240, format: c = Y, className: s
|
|
|
4708
4708
|
] });
|
|
4709
4709
|
}
|
|
4710
4710
|
function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, formatLine: a = (o) => `${Math.round(o)}%`, className: r, ...d }) {
|
|
4711
|
-
const { ref: o, width: i } = ce(c), h = X(), u = te(), [f, g] = D(null), v = { ...Be, right: 58 }, y = Math.max(0, i - v.left - v.right), x = c - v.top - v.bottom, $ = t.length, _ = ye(Math.max(0, ...n.data)), p = ye(Math.max(0, ...l.data)), b = $ > 0 ? y / $ : 0,
|
|
4711
|
+
const { ref: o, width: i } = ce(c), h = X(), u = te(), [f, g] = D(null), v = { ...Be, right: 58 }, y = Math.max(0, i - v.left - v.right), x = c - v.top - v.bottom, $ = t.length, _ = ye(Math.max(0, ...n.data)), p = ye(Math.max(0, ...l.data)), b = $ > 0 ? y / $ : 0, S = Math.min(b * 0.5, 36), k = Math.max(1, Math.ceil($ / 8)), M = n.color ?? j(0), w = l.color ?? j(1), N = v.top + x, C = (F) => N - F / _ * x, L = (F) => N - F / p * x, E = (F) => v.left + b * F + b / 2, A = l.data.map((F, B) => [E(B), L(F)]);
|
|
4712
4712
|
return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: o, children: [
|
|
4713
4713
|
i > 0 && /* @__PURE__ */ m("svg", { width: i, height: c, className: "select-chart", children: [
|
|
4714
4714
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${u}-bar`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
@@ -4730,14 +4730,14 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
|
|
|
4730
4730
|
] }, B)),
|
|
4731
4731
|
we(p).map((F, B) => /* @__PURE__ */ e("text", { x: i - 4, y: L(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: a(F) }, `r${B}`)),
|
|
4732
4732
|
n.data.map((F, B) => {
|
|
4733
|
-
const
|
|
4733
|
+
const T = F / _ * x;
|
|
4734
4734
|
return /* @__PURE__ */ e(
|
|
4735
4735
|
"rect",
|
|
4736
4736
|
{
|
|
4737
|
-
x: E(B) -
|
|
4738
|
-
y: N -
|
|
4739
|
-
width:
|
|
4740
|
-
height: Math.max(0,
|
|
4737
|
+
x: E(B) - S / 2,
|
|
4738
|
+
y: N - T,
|
|
4739
|
+
width: S,
|
|
4740
|
+
height: Math.max(0, T),
|
|
4741
4741
|
rx: 5,
|
|
4742
4742
|
fill: `url(#${u}-bar)`,
|
|
4743
4743
|
className: "select-chart__bar",
|
|
@@ -4752,7 +4752,7 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
|
|
|
4752
4752
|
{
|
|
4753
4753
|
d: Ge(A),
|
|
4754
4754
|
fill: "none",
|
|
4755
|
-
stroke:
|
|
4755
|
+
stroke: w,
|
|
4756
4756
|
strokeWidth: 2.5,
|
|
4757
4757
|
strokeLinecap: "round",
|
|
4758
4758
|
strokeLinejoin: "round",
|
|
@@ -4766,7 +4766,7 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
|
|
|
4766
4766
|
cx: E(f),
|
|
4767
4767
|
cy: L(l.data[f] ?? 0),
|
|
4768
4768
|
r: 4,
|
|
4769
|
-
fill:
|
|
4769
|
+
fill: w,
|
|
4770
4770
|
className: "select-chart__dot select-chart__dot--active"
|
|
4771
4771
|
}
|
|
4772
4772
|
),
|
|
@@ -4783,15 +4783,15 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
|
|
|
4783
4783
|
fill: "transparent",
|
|
4784
4784
|
onMouseEnter: () => {
|
|
4785
4785
|
g(B);
|
|
4786
|
-
const
|
|
4786
|
+
const T = Math.min(C(n.data[B] ?? 0), L(l.data[B] ?? 0));
|
|
4787
4787
|
h.show({
|
|
4788
4788
|
x: E(B),
|
|
4789
|
-
y:
|
|
4790
|
-
place:
|
|
4789
|
+
y: T,
|
|
4790
|
+
place: T < v.top + 52 ? "bottom" : "top",
|
|
4791
4791
|
title: F,
|
|
4792
4792
|
rows: [
|
|
4793
4793
|
{ label: n.name, value: s(n.data[B] ?? 0), color: M },
|
|
4794
|
-
{ label: l.name, value: a(l.data[B] ?? 0), color:
|
|
4794
|
+
{ label: l.name, value: a(l.data[B] ?? 0), color: w }
|
|
4795
4795
|
]
|
|
4796
4796
|
});
|
|
4797
4797
|
},
|
|
@@ -4807,21 +4807,21 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
|
|
|
4807
4807
|
}
|
|
4808
4808
|
const no = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s = Y, centerLabel: a, legend: r = !0, gap: d = 2, pie: o = !1, className: i, ...h }, u) {
|
|
4809
4809
|
const f = X(), g = te(), v = q(null), y = Ct(v, l), x = n.reduce((k, M) => k + M.value, 0) || 1, $ = y / 2, _ = y / 2, p = y / 2 - 2, b = o ? 0 : p - c;
|
|
4810
|
-
let
|
|
4810
|
+
let S = 0;
|
|
4811
4811
|
return /* @__PURE__ */ m("div", { ref: u, ...h, className: `select-donut-wrap${i ? " " + i : ""}`, children: [
|
|
4812
4812
|
/* @__PURE__ */ m("div", { ref: v, className: "select-donut-ring", style: { width: `${l / 16}rem`, aspectRatio: "1" }, children: [
|
|
4813
4813
|
/* @__PURE__ */ m("svg", { width: y, height: y, viewBox: `0 0 ${y} ${y}`, className: "select-chart select-donut", "aria-hidden": "true", children: [
|
|
4814
4814
|
/* @__PURE__ */ e("defs", { children: n.map((k, M) => {
|
|
4815
|
-
const
|
|
4815
|
+
const w = k.color ?? j(M);
|
|
4816
4816
|
return /* @__PURE__ */ m("linearGradient", { id: `${g}-s${M}`, gradientUnits: "userSpaceOnUse", x1: "0", y1: "0", x2: "0", y2: y, children: [
|
|
4817
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
4818
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
4817
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: w, stopOpacity: 1 }),
|
|
4818
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: w, stopOpacity: 0.6 })
|
|
4819
4819
|
] }, M);
|
|
4820
4820
|
}) }),
|
|
4821
4821
|
n.map((k, M) => {
|
|
4822
|
-
const
|
|
4823
|
-
|
|
4824
|
-
const N =
|
|
4822
|
+
const w = S / x * 360;
|
|
4823
|
+
S += k.value;
|
|
4824
|
+
const N = S / x * 360, C = k.color ?? j(M), E = N - w > d * 1.5 ? d / 2 : 0, A = w + E, F = Math.max(A + 0.01, N - E);
|
|
4825
4825
|
return /* @__PURE__ */ e(
|
|
4826
4826
|
"path",
|
|
4827
4827
|
{
|
|
@@ -4829,11 +4829,11 @@ const no = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s
|
|
|
4829
4829
|
fill: `url(#${g}-s${M})`,
|
|
4830
4830
|
className: "select-chart__seg",
|
|
4831
4831
|
onMouseEnter: () => {
|
|
4832
|
-
const B = ((
|
|
4832
|
+
const B = ((w + N) / 2 - 90) * Math.PI / 180, T = $ + (p + 6) * Math.cos(B), I = _ + (p + 6) * Math.sin(B);
|
|
4833
4833
|
f.show({
|
|
4834
|
-
x:
|
|
4835
|
-
y:
|
|
4836
|
-
place:
|
|
4834
|
+
x: T,
|
|
4835
|
+
y: I,
|
|
4836
|
+
place: I <= _ ? "top" : "bottom",
|
|
4837
4837
|
title: k.label,
|
|
4838
4838
|
rows: [{ label: "Valor", value: s(k.value), color: C }]
|
|
4839
4839
|
});
|
|
@@ -4855,17 +4855,17 @@ const no = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s
|
|
|
4855
4855
|
] });
|
|
4856
4856
|
});
|
|
4857
4857
|
function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s = !1, className: a, ...r }) {
|
|
4858
|
-
const { ref: d, width: o } = ce(l), i = X(), h = te(), u = n.length, f = t.length || 1, g = n.map((M,
|
|
4858
|
+
const { ref: d, width: o } = ce(l), i = X(), h = te(), u = n.length, f = t.length || 1, g = n.map((M, w) => t.reduce((N, C) => N + (C.data[w] ?? 0), 0)), v = ye(s ? Math.max(0, ...g) : Math.max(0, ...t.flatMap((M) => M.data))), y = Be, x = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = y.top + $, p = u ? x / u : 0, b = (M) => _ - M / v * $, S = Math.min(p * 0.72, f * 40), k = s ? Math.min(p * 0.5, 44) : S / f;
|
|
4859
4859
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
4860
4860
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
|
|
4861
|
-
/* @__PURE__ */ e("defs", { children: t.map((M,
|
|
4862
|
-
const N = M.color ?? j(
|
|
4863
|
-
return /* @__PURE__ */ m("linearGradient", { id: `${h}-c${
|
|
4861
|
+
/* @__PURE__ */ e("defs", { children: t.map((M, w) => {
|
|
4862
|
+
const N = M.color ?? j(w);
|
|
4863
|
+
return /* @__PURE__ */ m("linearGradient", { id: `${h}-c${w}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4864
4864
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: N, stopOpacity: 1 }),
|
|
4865
4865
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: N, stopOpacity: 0.62 })
|
|
4866
|
-
] },
|
|
4866
|
+
] }, w);
|
|
4867
4867
|
}) }),
|
|
4868
|
-
we(v).map((M,
|
|
4868
|
+
we(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
|
|
4869
4869
|
/* @__PURE__ */ e(
|
|
4870
4870
|
"line",
|
|
4871
4871
|
{
|
|
@@ -4873,17 +4873,17 @@ function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s =
|
|
|
4873
4873
|
x2: o - y.right,
|
|
4874
4874
|
y1: b(M),
|
|
4875
4875
|
y2: b(M),
|
|
4876
|
-
className:
|
|
4876
|
+
className: w === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
4877
4877
|
}
|
|
4878
4878
|
),
|
|
4879
4879
|
/* @__PURE__ */ e("text", { x: y.left - 8, y: b(M), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(M) })
|
|
4880
|
-
] },
|
|
4881
|
-
n.map((M,
|
|
4882
|
-
const N = y.left + p *
|
|
4880
|
+
] }, w)),
|
|
4881
|
+
n.map((M, w) => {
|
|
4882
|
+
const N = y.left + p * w;
|
|
4883
4883
|
if (s) {
|
|
4884
4884
|
let L = 0;
|
|
4885
4885
|
return /* @__PURE__ */ e("g", { children: t.map((E, A) => {
|
|
4886
|
-
const F = (E.data[
|
|
4886
|
+
const F = (E.data[w] ?? 0) / v * $, B = _ - L - F;
|
|
4887
4887
|
return L += F, /* @__PURE__ */ e(
|
|
4888
4888
|
"rect",
|
|
4889
4889
|
{
|
|
@@ -4894,15 +4894,15 @@ function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s =
|
|
|
4894
4894
|
rx: 3,
|
|
4895
4895
|
fill: `url(#${h}-c${A})`,
|
|
4896
4896
|
className: "select-chart__bar",
|
|
4897
|
-
style: { animationDelay: `${
|
|
4897
|
+
style: { animationDelay: `${w * 30}ms` }
|
|
4898
4898
|
},
|
|
4899
4899
|
A
|
|
4900
4900
|
);
|
|
4901
|
-
}) },
|
|
4901
|
+
}) }, w);
|
|
4902
4902
|
}
|
|
4903
|
-
const C = N + (p -
|
|
4903
|
+
const C = N + (p - S) / 2;
|
|
4904
4904
|
return /* @__PURE__ */ e("g", { children: t.map((L, E) => {
|
|
4905
|
-
const A = (L.data[
|
|
4905
|
+
const A = (L.data[w] ?? 0) / v * $;
|
|
4906
4906
|
return /* @__PURE__ */ e(
|
|
4907
4907
|
"rect",
|
|
4908
4908
|
{
|
|
@@ -4913,33 +4913,33 @@ function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s =
|
|
|
4913
4913
|
rx: 3,
|
|
4914
4914
|
fill: `url(#${h}-c${E})`,
|
|
4915
4915
|
className: "select-chart__bar",
|
|
4916
|
-
style: { animationDelay: `${(
|
|
4916
|
+
style: { animationDelay: `${(w * f + E) * 25}ms` }
|
|
4917
4917
|
},
|
|
4918
4918
|
E
|
|
4919
4919
|
);
|
|
4920
|
-
}) },
|
|
4920
|
+
}) }, w);
|
|
4921
4921
|
}),
|
|
4922
|
-
n.map((M,
|
|
4923
|
-
n.map((M,
|
|
4924
|
-
const N = s ? b(g[
|
|
4922
|
+
n.map((M, w) => /* @__PURE__ */ e("text", { x: y.left + p * w + p / 2, y: l - y.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: M }, w)),
|
|
4923
|
+
n.map((M, w) => {
|
|
4924
|
+
const N = s ? b(g[w] ?? 0) : Math.min(...t.map((C) => b(C.data[w] ?? 0)));
|
|
4925
4925
|
return /* @__PURE__ */ e(
|
|
4926
4926
|
"rect",
|
|
4927
4927
|
{
|
|
4928
|
-
x: y.left + p *
|
|
4928
|
+
x: y.left + p * w,
|
|
4929
4929
|
y: y.top,
|
|
4930
4930
|
width: p,
|
|
4931
4931
|
height: $,
|
|
4932
4932
|
fill: "transparent",
|
|
4933
4933
|
onMouseEnter: () => i.show({
|
|
4934
|
-
x: y.left + p *
|
|
4934
|
+
x: y.left + p * w + p / 2,
|
|
4935
4935
|
y: N,
|
|
4936
4936
|
place: N < y.top + 52 ? "bottom" : "top",
|
|
4937
4937
|
title: M,
|
|
4938
|
-
rows: t.map((C, L) => ({ label: C.name, value: c(C.data[
|
|
4938
|
+
rows: t.map((C, L) => ({ label: C.name, value: c(C.data[w] ?? 0), color: C.color ?? j(L) }))
|
|
4939
4939
|
}),
|
|
4940
4940
|
onMouseLeave: i.hide
|
|
4941
4941
|
},
|
|
4942
|
-
`h${
|
|
4942
|
+
`h${w}`
|
|
4943
4943
|
);
|
|
4944
4944
|
})
|
|
4945
4945
|
] }),
|
|
@@ -5022,51 +5022,55 @@ const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
|
|
|
5022
5022
|
] }),
|
|
5023
5023
|
c != null && /* @__PURE__ */ e("div", { className: "select-gauge__caption", children: c })
|
|
5024
5024
|
] });
|
|
5025
|
-
}), ao = R(function({ columns: n, rows: l, format: c = Y, formatValue: s, color: a = "var(--select-chart-1)", showValues: r = !0, min: d, max: o, cellSize: i = 40, maxCellSize: h = 96,
|
|
5026
|
-
const
|
|
5025
|
+
}), ao = R(function({ columns: n, rows: l, format: c = Y, formatValue: s, color: a = "var(--select-chart-1)", showValues: r = !0, min: d, max: o, cellSize: i = 40, maxCellSize: h = 96, cellHeight: u = 30, className: f, ...g }, v) {
|
|
5026
|
+
const y = X(), x = l.flatMap((M) => M.values).filter((M) => M != null && Number.isFinite(M)), $ = d ?? (x.length ? Math.min(...x) : 0), p = (o ?? (x.length ? Math.max(...x) : 1)) - $ || 1, b = { "--heat-color": a }, S = {
|
|
5027
5027
|
gridTemplateColumns: `minmax(56px, max-content) repeat(${n.length}, minmax(${i}px, ${Math.max(i, h)}px))`,
|
|
5028
5028
|
width: "fit-content",
|
|
5029
5029
|
maxWidth: "100%",
|
|
5030
5030
|
minWidth: 0
|
|
5031
|
+
}, k = {
|
|
5032
|
+
minHeight: u,
|
|
5033
|
+
...u >= 40 ? { fontSize: "0.8125rem" } : null
|
|
5031
5034
|
};
|
|
5032
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
5033
|
-
/* @__PURE__ */ m("div", { className: "select-heatmap__grid", style:
|
|
5035
|
+
return /* @__PURE__ */ m("div", { ref: v, ...g, className: `select-chart-wrap select-heatmap${f ? " " + f : ""}`, style: b, children: [
|
|
5036
|
+
/* @__PURE__ */ m("div", { className: "select-heatmap__grid", style: S, children: [
|
|
5034
5037
|
/* @__PURE__ */ e("div", { className: "select-heatmap__corner" }),
|
|
5035
|
-
n.map((
|
|
5036
|
-
l.map((
|
|
5037
|
-
/* @__PURE__ */ e("div", { className: "select-heatmap__rowhead", children:
|
|
5038
|
-
|
|
5039
|
-
const
|
|
5040
|
-
if (
|
|
5041
|
-
return /* @__PURE__ */ e("div", { className: "select-heatmap__cell select-heatmap__cell--empty" },
|
|
5042
|
-
const
|
|
5038
|
+
n.map((M) => /* @__PURE__ */ e("div", { className: "select-heatmap__colhead", children: M }, M)),
|
|
5039
|
+
l.map((M) => /* @__PURE__ */ m(Yt, { children: [
|
|
5040
|
+
/* @__PURE__ */ e("div", { className: "select-heatmap__rowhead", children: M.label }),
|
|
5041
|
+
M.values.map((w, N) => {
|
|
5042
|
+
const C = `${M.label}-${n[N] ?? N}`;
|
|
5043
|
+
if (w == null || !Number.isFinite(w))
|
|
5044
|
+
return /* @__PURE__ */ e("div", { className: "select-heatmap__cell select-heatmap__cell--empty", style: k }, C);
|
|
5045
|
+
const L = Math.max(0, Math.min(1, (w - $) / p)), E = Math.round((0.14 + L * 0.86) * 100), A = Math.max(6, E - 16);
|
|
5043
5046
|
return /* @__PURE__ */ e(
|
|
5044
5047
|
"div",
|
|
5045
5048
|
{
|
|
5046
5049
|
className: "select-heatmap__cell",
|
|
5047
5050
|
style: {
|
|
5048
|
-
|
|
5049
|
-
|
|
5051
|
+
...k,
|
|
5052
|
+
background: `linear-gradient(150deg, color-mix(in srgb, ${a} ${A}%, transparent), color-mix(in srgb, ${a} ${E}%, transparent))`,
|
|
5053
|
+
color: L > 0.55 ? "#fff" : "var(--select-text)"
|
|
5050
5054
|
},
|
|
5051
|
-
onMouseEnter: (
|
|
5052
|
-
const
|
|
5053
|
-
|
|
5054
|
-
x:
|
|
5055
|
-
y:
|
|
5056
|
-
place:
|
|
5057
|
-
title: `${
|
|
5058
|
-
rows: [{ label: "Valor", value: (s ?? c)(
|
|
5055
|
+
onMouseEnter: (F) => {
|
|
5056
|
+
const B = F.currentTarget.closest(".select-chart-wrap"), T = F.currentTarget.getBoundingClientRect(), I = B == null ? void 0 : B.getBoundingClientRect(), O = I ? T.top - I.top : 0, W = O < 64 ? "bottom" : "top", Z = (I ? T.left - I.left : 0) + T.width / 2, G = W === "bottom" ? I ? T.bottom - I.top : 0 : O;
|
|
5057
|
+
y.show({
|
|
5058
|
+
x: Z,
|
|
5059
|
+
y: G,
|
|
5060
|
+
place: W,
|
|
5061
|
+
title: `${M.label} · ${n[N] ?? ""}`,
|
|
5062
|
+
rows: [{ label: "Valor", value: (s ?? c)(w), color: a }]
|
|
5059
5063
|
});
|
|
5060
5064
|
},
|
|
5061
|
-
onMouseLeave:
|
|
5062
|
-
children: r ? c(
|
|
5065
|
+
onMouseLeave: y.hide,
|
|
5066
|
+
children: r ? c(w) : ""
|
|
5063
5067
|
},
|
|
5064
|
-
|
|
5068
|
+
C
|
|
5065
5069
|
);
|
|
5066
5070
|
})
|
|
5067
|
-
] },
|
|
5071
|
+
] }, M.label))
|
|
5068
5072
|
] }),
|
|
5069
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5073
|
+
/* @__PURE__ */ e(K, { tip: y.tip })
|
|
5070
5074
|
] });
|
|
5071
5075
|
});
|
|
5072
5076
|
function oo({
|
|
@@ -5153,14 +5157,14 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
|
|
|
5153
5157
|
const g = n ?? t.length * 36 + 6 + 26, { ref: v, width: y } = ce(g), x = X(), $ = te(), _ = ye(Math.max(0, ...t.map((F) => F.value))), p = t.reduce((F, B) => Math.max(F, B.label.length), 0), b = Math.min(
|
|
5154
5158
|
Math.max(Bn, p * En + Tt),
|
|
5155
5159
|
Math.max(Bn, y * As)
|
|
5156
|
-
),
|
|
5160
|
+
), S = r ?? b, k = Math.max(3, Math.floor((S - Tt) / En)), M = (F) => F.length <= k ? F : `${F.slice(0, k - 1).trimEnd()}…`, w = Math.max(0, y - S - 28), N = g - 6 - 26, C = t.length ? N / t.length : 0, L = Math.min(C * 0.62, 22), E = (F) => S + F / _ * w, A = (F, B) => F.color ?? (a ? j(B) : l ?? j(0));
|
|
5157
5161
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: v, children: [
|
|
5158
5162
|
y > 0 && /* @__PURE__ */ m("svg", { width: y, height: g, className: "select-chart", children: [
|
|
5159
5163
|
/* @__PURE__ */ e("defs", { children: t.map((F, B) => {
|
|
5160
|
-
const
|
|
5164
|
+
const T = A(F, B);
|
|
5161
5165
|
return /* @__PURE__ */ m("linearGradient", { id: `${$}-h${B}`, x1: "0", y1: "0", x2: "1", y2: "0", children: [
|
|
5162
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
5163
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
5166
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: T, stopOpacity: 1 }),
|
|
5167
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: T, stopOpacity: 0.5 })
|
|
5164
5168
|
] }, B);
|
|
5165
5169
|
}) }),
|
|
5166
5170
|
we(_).map((F, B) => /* @__PURE__ */ m("g", { children: [
|
|
@@ -5177,24 +5181,24 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
|
|
|
5177
5181
|
/* @__PURE__ */ e("text", { x: E(F), y: g - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: c(F) })
|
|
5178
5182
|
] }, B)),
|
|
5179
5183
|
t.map((F, B) => {
|
|
5180
|
-
const
|
|
5184
|
+
const T = 6 + C * B + C / 2, I = F.value / _ * w, O = A(F, B);
|
|
5181
5185
|
return /* @__PURE__ */ m("g", { children: [
|
|
5182
|
-
/* @__PURE__ */ e("rect", { x:
|
|
5186
|
+
/* @__PURE__ */ e("rect", { x: S, y: T - L / 2, width: w, height: L, rx: 5, className: "select-chart__track-bar" }),
|
|
5183
5187
|
/* @__PURE__ */ e(
|
|
5184
5188
|
"rect",
|
|
5185
5189
|
{
|
|
5186
|
-
x:
|
|
5187
|
-
y:
|
|
5188
|
-
width: Math.max(0,
|
|
5190
|
+
x: S,
|
|
5191
|
+
y: T - L / 2,
|
|
5192
|
+
width: Math.max(0, I),
|
|
5189
5193
|
height: L,
|
|
5190
5194
|
rx: 5,
|
|
5191
5195
|
fill: `url(#${$}-h${B})`,
|
|
5192
5196
|
className: "select-chart__hbar",
|
|
5193
5197
|
style: { animationDelay: `${B * 40}ms` },
|
|
5194
5198
|
onMouseEnter: () => x.show({
|
|
5195
|
-
x:
|
|
5196
|
-
y:
|
|
5197
|
-
place:
|
|
5199
|
+
x: S + I,
|
|
5200
|
+
y: T - L / 2,
|
|
5201
|
+
place: T - L / 2 < 50 ? "bottom" : "top",
|
|
5198
5202
|
rows: [{ label: F.label, value: (s ?? c)(F.value), color: O }]
|
|
5199
5203
|
}),
|
|
5200
5204
|
onMouseLeave: x.hide
|
|
@@ -5203,8 +5207,8 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
|
|
|
5203
5207
|
/* @__PURE__ */ m(
|
|
5204
5208
|
"text",
|
|
5205
5209
|
{
|
|
5206
|
-
x:
|
|
5207
|
-
y:
|
|
5210
|
+
x: S - Tt / 2,
|
|
5211
|
+
y: T,
|
|
5208
5212
|
className: "select-chart__ylabel",
|
|
5209
5213
|
dominantBaseline: "middle",
|
|
5210
5214
|
textAnchor: "end",
|
|
@@ -5232,7 +5236,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5232
5236
|
total: "var(--select-chart-1)",
|
|
5233
5237
|
inc: "var(--select-chart-4)",
|
|
5234
5238
|
dec: "var(--select-chart-3)"
|
|
5235
|
-
},
|
|
5239
|
+
}, S = (k) => k.total ? "total" : k.value >= 0 ? "inc" : "dec";
|
|
5236
5240
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
5237
5241
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
|
|
5238
5242
|
/* @__PURE__ */ e("defs", { children: ["total", "inc", "dec"].map((k) => /* @__PURE__ */ m("linearGradient", { id: `${o}-${k}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
@@ -5253,16 +5257,16 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5253
5257
|
/* @__PURE__ */ e("text", { x: f.left - 8, y: p(k), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(k) })
|
|
5254
5258
|
] }, M)),
|
|
5255
5259
|
h.slice(0, -1).map((k, M) => {
|
|
5256
|
-
const
|
|
5257
|
-
return /* @__PURE__ */ e("line", { x1:
|
|
5260
|
+
const w = f.left + $ * M + $ / 2 + _ / 2, N = f.left + $ * (M + 1) + $ / 2 - _ / 2;
|
|
5261
|
+
return /* @__PURE__ */ e("line", { x1: w, x2: N, y1: p(k.end), y2: p(k.end), className: "select-chart__crosshair" }, `c${M}`);
|
|
5258
5262
|
}),
|
|
5259
5263
|
h.map((k, M) => {
|
|
5260
|
-
const
|
|
5264
|
+
const w = f.left + $ * M + $ / 2, N = p(Math.max(k.start, k.end)), C = Math.abs(p(k.start) - p(k.end)), L = S(k);
|
|
5261
5265
|
return /* @__PURE__ */ m("g", { children: [
|
|
5262
5266
|
/* @__PURE__ */ e(
|
|
5263
5267
|
"rect",
|
|
5264
5268
|
{
|
|
5265
|
-
x:
|
|
5269
|
+
x: w - _ / 2,
|
|
5266
5270
|
y: N,
|
|
5267
5271
|
width: _,
|
|
5268
5272
|
height: Math.max(2, C),
|
|
@@ -5271,7 +5275,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5271
5275
|
className: "select-chart__bar",
|
|
5272
5276
|
style: { animationDelay: `${M * 40}ms` },
|
|
5273
5277
|
onMouseEnter: () => d.show({
|
|
5274
|
-
x:
|
|
5278
|
+
x: w,
|
|
5275
5279
|
y: N,
|
|
5276
5280
|
place: N < f.top + 52 ? "bottom" : "top",
|
|
5277
5281
|
title: k.label,
|
|
@@ -5283,7 +5287,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5283
5287
|
onMouseLeave: d.hide
|
|
5284
5288
|
}
|
|
5285
5289
|
),
|
|
5286
|
-
/* @__PURE__ */ e("text", { x:
|
|
5290
|
+
/* @__PURE__ */ e("text", { x: w, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k.label })
|
|
5287
5291
|
] }, M);
|
|
5288
5292
|
})
|
|
5289
5293
|
] }),
|
|
@@ -5348,16 +5352,16 @@ function Fs(t, n, l) {
|
|
|
5348
5352
|
if (i >= h) {
|
|
5349
5353
|
const p = _ / h;
|
|
5350
5354
|
let b = o;
|
|
5351
|
-
$.forEach((
|
|
5355
|
+
$.forEach((S, k) => {
|
|
5352
5356
|
const M = x[k] / p;
|
|
5353
|
-
c.push({ x: d, y: b, w: p, h: M, idx:
|
|
5357
|
+
c.push({ x: d, y: b, w: p, h: M, idx: S }), b += M;
|
|
5354
5358
|
}), a(r.slice(y), d + p, o, i - p, h);
|
|
5355
5359
|
} else {
|
|
5356
5360
|
const p = _ / i;
|
|
5357
5361
|
let b = d;
|
|
5358
|
-
$.forEach((
|
|
5362
|
+
$.forEach((S, k) => {
|
|
5359
5363
|
const M = x[k] / p;
|
|
5360
|
-
c.push({ x: b, y: o, w: M, h: p, idx:
|
|
5364
|
+
c.push({ x: b, y: o, w: M, h: p, idx: S }), b += M;
|
|
5361
5365
|
}), a(r.slice(y), d, o + p, i, h - p);
|
|
5362
5366
|
}
|
|
5363
5367
|
};
|
|
@@ -5412,36 +5416,36 @@ function po({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5412
5416
|
] });
|
|
5413
5417
|
}
|
|
5414
5418
|
function mo({ series: t, height: n = 240, xFormat: l = Y, yFormat: c = Y, xMax: s, yMax: a, maxRadius: r = 18, className: d, ...o }) {
|
|
5415
|
-
const { ref: i, width: h } = ce(n), u = X(), f = t.flatMap((M) => M.points), g = ye(s ?? Math.max(0, ...f.map((M) => M.x))), v = ye(a ?? Math.max(0, ...f.map((M) => M.y))), y = Math.max(1, ...f.map((M) => M.r ?? 0)), x = Be, $ = Math.max(0, h - x.left - x.right), _ = n - x.top - x.bottom, p = x.top + _, b = (M) => x.left + M / g * $,
|
|
5419
|
+
const { ref: i, width: h } = ce(n), u = X(), f = t.flatMap((M) => M.points), g = ye(s ?? Math.max(0, ...f.map((M) => M.x))), v = ye(a ?? Math.max(0, ...f.map((M) => M.y))), y = Math.max(1, ...f.map((M) => M.r ?? 0)), x = Be, $ = Math.max(0, h - x.left - x.right), _ = n - x.top - x.bottom, p = x.top + _, b = (M) => x.left + M / g * $, S = (M) => p - M / v * _, k = (M) => M.r ? 4 + Math.sqrt(M.r) / Math.sqrt(y) * (r - 4) : 4.5;
|
|
5416
5420
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: i, children: [
|
|
5417
5421
|
h > 0 && /* @__PURE__ */ m("svg", { width: h, height: n, className: "select-chart", children: [
|
|
5418
|
-
we(v).map((M,
|
|
5422
|
+
we(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
|
|
5419
5423
|
/* @__PURE__ */ e(
|
|
5420
5424
|
"line",
|
|
5421
5425
|
{
|
|
5422
5426
|
x1: x.left,
|
|
5423
5427
|
x2: h - x.right,
|
|
5424
|
-
y1:
|
|
5425
|
-
y2:
|
|
5426
|
-
className:
|
|
5428
|
+
y1: S(M),
|
|
5429
|
+
y2: S(M),
|
|
5430
|
+
className: w === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
5427
5431
|
}
|
|
5428
5432
|
),
|
|
5429
|
-
/* @__PURE__ */ e("text", { x: x.left - 8, y:
|
|
5430
|
-
] }, `y${
|
|
5431
|
-
we(g).map((M,
|
|
5432
|
-
t.map((M,
|
|
5433
|
-
const N = M.color ?? j(
|
|
5433
|
+
/* @__PURE__ */ e("text", { x: x.left - 8, y: S(M), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(M) })
|
|
5434
|
+
] }, `y${w}`)),
|
|
5435
|
+
we(g).map((M, w, N) => /* @__PURE__ */ e("text", { x: b(M), y: n - x.bottom + 16, className: "select-chart__xlabel", textAnchor: w === 0 ? "start" : w === N.length - 1 ? "end" : "middle", children: l(M) }, `x${w}`)),
|
|
5436
|
+
t.map((M, w) => {
|
|
5437
|
+
const N = M.color ?? j(w);
|
|
5434
5438
|
return /* @__PURE__ */ e("g", { fill: N, children: M.points.map((C, L) => /* @__PURE__ */ e(
|
|
5435
5439
|
"circle",
|
|
5436
5440
|
{
|
|
5437
5441
|
cx: b(C.x),
|
|
5438
|
-
cy:
|
|
5442
|
+
cy: S(C.y),
|
|
5439
5443
|
r: k(C),
|
|
5440
5444
|
className: "select-chart__point",
|
|
5441
5445
|
onMouseEnter: () => u.show({
|
|
5442
5446
|
x: b(C.x),
|
|
5443
|
-
y:
|
|
5444
|
-
place:
|
|
5447
|
+
y: S(C.y) - k(C),
|
|
5448
|
+
place: S(C.y) - k(C) < x.top + 52 ? "bottom" : "top",
|
|
5445
5449
|
title: C.label ?? M.name,
|
|
5446
5450
|
rows: [
|
|
5447
5451
|
{ label: "X", value: l(C.x), color: N },
|
|
@@ -5452,32 +5456,32 @@ function mo({ series: t, height: n = 240, xFormat: l = Y, yFormat: c = Y, xMax:
|
|
|
5452
5456
|
onMouseLeave: u.hide
|
|
5453
5457
|
},
|
|
5454
5458
|
L
|
|
5455
|
-
)) },
|
|
5459
|
+
)) }, w);
|
|
5456
5460
|
})
|
|
5457
5461
|
] }),
|
|
5458
5462
|
/* @__PURE__ */ e(K, { tip: u.tip })
|
|
5459
5463
|
] });
|
|
5460
5464
|
}
|
|
5461
5465
|
const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y, levels: r = 4, legend: d = !0, className: o, ...i }, h) {
|
|
5462
|
-
const u = X(), f = te(), g = n.length, v = c / 2, y = c / 2, x = c / 2 - 30, $ = s ?? ye(Math.max(1, ...l.flatMap((
|
|
5466
|
+
const u = X(), f = te(), g = n.length, v = c / 2, y = c / 2, x = c / 2 - 30, $ = s ?? ye(Math.max(1, ...l.flatMap((S) => S.values))), _ = (S) => (-90 + S * 360 / g) * Math.PI / 180, p = (S, k) => [v + k * Math.cos(_(S)), y + k * Math.sin(_(S))], b = (S) => S.map((k, M) => `${M === 0 ? "M" : "L"}${p(M, k).map((w) => w.toFixed(2)).join(",")}`).join(" ") + " Z";
|
|
5463
5467
|
return /* @__PURE__ */ m("div", { ref: h, ...i, className: `select-donut-wrap${o ? " " + o : ""}`, children: [
|
|
5464
5468
|
/* @__PURE__ */ m("div", { className: "select-radar", style: { width: c, aspectRatio: "1" }, children: [
|
|
5465
5469
|
/* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5466
|
-
/* @__PURE__ */ e("defs", { children: l.map((
|
|
5467
|
-
const M =
|
|
5470
|
+
/* @__PURE__ */ e("defs", { children: l.map((S, k) => {
|
|
5471
|
+
const M = S.color ?? j(k);
|
|
5468
5472
|
return /* @__PURE__ */ m("radialGradient", { id: `${f}-rd${k}`, children: [
|
|
5469
5473
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: M, stopOpacity: 0.32 }),
|
|
5470
5474
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: M, stopOpacity: 0.12 })
|
|
5471
5475
|
] }, k);
|
|
5472
5476
|
}) }),
|
|
5473
|
-
Array.from({ length: r }, (
|
|
5477
|
+
Array.from({ length: r }, (S, k) => {
|
|
5474
5478
|
const M = x * (k + 1) / r;
|
|
5475
5479
|
return /* @__PURE__ */ e("path", { d: b(n.map(() => M)), className: "select-chart__grid", fill: "none" }, k);
|
|
5476
5480
|
}),
|
|
5477
|
-
n.map((
|
|
5478
|
-
const [M,
|
|
5481
|
+
n.map((S, k) => {
|
|
5482
|
+
const [M, w] = p(k, x), [N, C] = p(k, x + 14);
|
|
5479
5483
|
return /* @__PURE__ */ m("g", { children: [
|
|
5480
|
-
/* @__PURE__ */ e("line", { x1: v, y1: y, x2: M, y2:
|
|
5484
|
+
/* @__PURE__ */ e("line", { x1: v, y1: y, x2: M, y2: w, className: "select-chart__grid" }),
|
|
5481
5485
|
/* @__PURE__ */ e(
|
|
5482
5486
|
"text",
|
|
5483
5487
|
{
|
|
@@ -5486,16 +5490,16 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
|
|
|
5486
5490
|
className: "select-chart__xlabel",
|
|
5487
5491
|
textAnchor: Math.abs(N - v) < 4 ? "middle" : N > v ? "start" : "end",
|
|
5488
5492
|
dominantBaseline: "middle",
|
|
5489
|
-
children:
|
|
5493
|
+
children: S
|
|
5490
5494
|
}
|
|
5491
5495
|
)
|
|
5492
5496
|
] }, k);
|
|
5493
5497
|
}),
|
|
5494
|
-
l.map((
|
|
5495
|
-
const M =
|
|
5498
|
+
l.map((S, k) => {
|
|
5499
|
+
const M = S.color ?? j(k), w = S.values.map((N) => Math.max(0, N) / $ * x);
|
|
5496
5500
|
return /* @__PURE__ */ m("g", { children: [
|
|
5497
|
-
/* @__PURE__ */ e("path", { d: b(
|
|
5498
|
-
|
|
5501
|
+
/* @__PURE__ */ e("path", { d: b(w), fill: `url(#${f}-rd${k})`, stroke: M, strokeWidth: 2, strokeLinejoin: "round", className: "select-chart__area" }),
|
|
5502
|
+
w.map((N, C) => {
|
|
5499
5503
|
const [L, E] = p(C, N);
|
|
5500
5504
|
return /* @__PURE__ */ e(
|
|
5501
5505
|
"circle",
|
|
@@ -5510,7 +5514,7 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
|
|
|
5510
5514
|
y: E,
|
|
5511
5515
|
place: E < 44 ? "bottom" : "top",
|
|
5512
5516
|
title: n[C],
|
|
5513
|
-
rows: [{ label:
|
|
5517
|
+
rows: [{ label: S.name, value: a(S.values[C] ?? 0), color: M }]
|
|
5514
5518
|
}),
|
|
5515
5519
|
onMouseLeave: u.hide
|
|
5516
5520
|
},
|
|
@@ -5522,9 +5526,9 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
|
|
|
5522
5526
|
] }),
|
|
5523
5527
|
/* @__PURE__ */ e(K, { tip: u.tip })
|
|
5524
5528
|
] }),
|
|
5525
|
-
d && l.length > 1 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: l.map((
|
|
5526
|
-
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background:
|
|
5527
|
-
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children:
|
|
5529
|
+
d && l.length > 1 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: l.map((S, k) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
|
|
5530
|
+
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: S.color ?? j(k) } }),
|
|
5531
|
+
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: S.name })
|
|
5528
5532
|
] }, k)) })
|
|
5529
5533
|
] });
|
|
5530
5534
|
});
|
|
@@ -5536,24 +5540,24 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
|
|
|
5536
5540
|
const E = /* @__PURE__ */ new Map();
|
|
5537
5541
|
let A = v;
|
|
5538
5542
|
return N.forEach((F, B) => {
|
|
5539
|
-
const
|
|
5540
|
-
E.set(F, { name: F, y: A, h:
|
|
5543
|
+
const T = g(F, C) * _;
|
|
5544
|
+
E.set(F, { name: F, y: A, h: T, cursor: A, color: j(B + L) }), A += T + s;
|
|
5541
5545
|
}), E;
|
|
5542
|
-
}, b = p(h, "source", 0),
|
|
5546
|
+
}, b = p(h, "source", 0), S = p(u, "target", h.length), k = c, M = o - c, w = (k + M) / 2;
|
|
5543
5547
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
5544
5548
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
|
|
5545
5549
|
t.map((N, C) => {
|
|
5546
|
-
const L = b.get(N.source), E =
|
|
5550
|
+
const L = b.get(N.source), E = S.get(N.target), A = N.value * _, F = L.cursor, B = E.cursor;
|
|
5547
5551
|
L.cursor += A, E.cursor += A;
|
|
5548
|
-
const
|
|
5552
|
+
const T = `M${k},${F} C${w},${F} ${w},${B} ${M},${B} L${M},${B + A} C${w},${B + A} ${w},${F + A} ${k},${F + A} Z`;
|
|
5549
5553
|
return /* @__PURE__ */ e(
|
|
5550
5554
|
"path",
|
|
5551
5555
|
{
|
|
5552
|
-
d:
|
|
5556
|
+
d: T,
|
|
5553
5557
|
fill: L.color,
|
|
5554
5558
|
className: "select-sankey__link",
|
|
5555
5559
|
onMouseEnter: () => i.show({
|
|
5556
|
-
x:
|
|
5560
|
+
x: w,
|
|
5557
5561
|
y: (F + B + A) / 2,
|
|
5558
5562
|
place: "top",
|
|
5559
5563
|
title: `${N.source} → ${N.target}`,
|
|
@@ -5568,7 +5572,7 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
|
|
|
5568
5572
|
/* @__PURE__ */ e("rect", { x: 0, y: N.y, width: c, height: Math.max(1, N.h), rx: 3, fill: N.color, className: "select-sankey__node" }),
|
|
5569
5573
|
/* @__PURE__ */ e("text", { x: c + 6, y: N.y + N.h / 2, className: "select-sankey__label", dominantBaseline: "middle", textAnchor: "start", children: N.name })
|
|
5570
5574
|
] }, `s${C}`)),
|
|
5571
|
-
[...
|
|
5575
|
+
[...S.values()].map((N, C) => /* @__PURE__ */ m("g", { children: [
|
|
5572
5576
|
/* @__PURE__ */ e("rect", { x: o - c, y: N.y, width: c, height: Math.max(1, N.h), rx: 3, fill: N.color, className: "select-sankey__node" }),
|
|
5573
5577
|
/* @__PURE__ */ e("text", { x: o - c - 6, y: N.y + N.h / 2, className: "select-sankey__label", dominantBaseline: "middle", textAnchor: "end", children: N.name })
|
|
5574
5578
|
] }, `t${C}`))
|
|
@@ -5577,46 +5581,46 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
|
|
|
5577
5581
|
] });
|
|
5578
5582
|
}
|
|
5579
5583
|
function vo({ data: t, height: n = 240, format: l = Y, upColor: c = "var(--select-chart-4)", downColor: s = "var(--select-chart-3)", className: a, ...r }) {
|
|
5580
|
-
const { ref: d, width: o } = ce(n), i = X(), h = Be, u = Math.max(0, o - h.left - h.right), f = n - h.top - h.bottom, g = h.top + f, v = Math.max(1, ...t.map((
|
|
5584
|
+
const { ref: d, width: o } = ce(n), i = X(), h = Be, u = Math.max(0, o - h.left - h.right), f = n - h.top - h.bottom, g = h.top + f, v = Math.max(1, ...t.map((w) => w.high)), y = Math.min(v, ...t.map((w) => w.low)), x = (v - y) * 0.08 || 1, $ = y - x, _ = v + x, p = (w) => g - (w - $) / (_ - $) * f, b = t.length, S = b ? u / b : 0, k = Math.min(S * 0.5, 18), M = Array.from({ length: 5 }, (w, N) => $ + (_ - $) * N / 4);
|
|
5581
5585
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
5582
5586
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
|
|
5583
|
-
M.map((
|
|
5587
|
+
M.map((w, N) => /* @__PURE__ */ m("g", { children: [
|
|
5584
5588
|
/* @__PURE__ */ e(
|
|
5585
5589
|
"line",
|
|
5586
5590
|
{
|
|
5587
5591
|
x1: h.left,
|
|
5588
5592
|
x2: o - h.right,
|
|
5589
|
-
y1: p(
|
|
5590
|
-
y2: p(
|
|
5593
|
+
y1: p(w),
|
|
5594
|
+
y2: p(w),
|
|
5591
5595
|
className: N === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
5592
5596
|
}
|
|
5593
5597
|
),
|
|
5594
|
-
/* @__PURE__ */ e("text", { x: h.left - 8, y: p(
|
|
5598
|
+
/* @__PURE__ */ e("text", { x: h.left - 8, y: p(w), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(w) })
|
|
5595
5599
|
] }, N)),
|
|
5596
|
-
t.map((
|
|
5597
|
-
const C = h.left +
|
|
5600
|
+
t.map((w, N) => {
|
|
5601
|
+
const C = h.left + S * N + S / 2, L = w.close >= w.open, E = L ? c : s, A = p(Math.max(w.open, w.close)), F = Math.max(1, Math.abs(p(w.open) - p(w.close)));
|
|
5598
5602
|
return /* @__PURE__ */ m("g", { children: [
|
|
5599
|
-
/* @__PURE__ */ e("line", { x1: C, x2: C, y1: p(
|
|
5603
|
+
/* @__PURE__ */ e("line", { x1: C, x2: C, y1: p(w.high), y2: p(w.low), stroke: E, strokeWidth: 1.5 }),
|
|
5600
5604
|
/* @__PURE__ */ e("rect", { x: C - k / 2, y: A, width: k, height: F, rx: 2, fill: E, fillOpacity: L ? 0.9 : 0.78 }),
|
|
5601
|
-
/* @__PURE__ */ e("text", { x: C, y: n - h.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children:
|
|
5605
|
+
/* @__PURE__ */ e("text", { x: C, y: n - h.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: w.label }),
|
|
5602
5606
|
/* @__PURE__ */ e(
|
|
5603
5607
|
"rect",
|
|
5604
5608
|
{
|
|
5605
|
-
x: h.left +
|
|
5609
|
+
x: h.left + S * N,
|
|
5606
5610
|
y: h.top,
|
|
5607
|
-
width:
|
|
5611
|
+
width: S,
|
|
5608
5612
|
height: f,
|
|
5609
5613
|
fill: "transparent",
|
|
5610
5614
|
onMouseEnter: () => i.show({
|
|
5611
5615
|
x: C,
|
|
5612
|
-
y: p(
|
|
5613
|
-
place: p(
|
|
5614
|
-
title:
|
|
5616
|
+
y: p(w.high),
|
|
5617
|
+
place: p(w.high) < h.top + 64 ? "bottom" : "top",
|
|
5618
|
+
title: w.label,
|
|
5615
5619
|
rows: [
|
|
5616
|
-
{ label: "Abertura", value: l(
|
|
5617
|
-
{ label: "Máxima", value: l(
|
|
5618
|
-
{ label: "Mínima", value: l(
|
|
5619
|
-
{ label: "Fechamento", value: l(
|
|
5620
|
+
{ label: "Abertura", value: l(w.open), color: E },
|
|
5621
|
+
{ label: "Máxima", value: l(w.high) },
|
|
5622
|
+
{ label: "Mínima", value: l(w.low) },
|
|
5623
|
+
{ label: "Fechamento", value: l(w.close) }
|
|
5620
5624
|
]
|
|
5621
5625
|
}),
|
|
5622
5626
|
onMouseLeave: i.hide
|
|
@@ -5685,7 +5689,7 @@ function go({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5685
5689
|
] });
|
|
5686
5690
|
}
|
|
5687
5691
|
function bo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a = 96, className: r, ...d }) {
|
|
5688
|
-
const f = n ?? t.length * 36 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = te(), $ = l ?? Math.min(0, ...t.map((L) => L.start)), p = (c ?? Math.max(1, ...t.map((L) => L.end))) - $ || 1, b = a,
|
|
5692
|
+
const f = n ?? t.length * 36 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = te(), $ = l ?? Math.min(0, ...t.map((L) => L.start)), p = (c ?? Math.max(1, ...t.map((L) => L.end))) - $ || 1, b = a, S = Math.max(0, v - b - 14), k = f - 6 - 26, M = t.length ? k / t.length : 0, w = Math.min(M * 0.6, 22), N = (L) => b + (L - $) / p * S, C = Array.from({ length: 5 }, (L, E) => $ + p * E / 4);
|
|
5689
5693
|
return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
|
|
5690
5694
|
v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
|
|
5691
5695
|
/* @__PURE__ */ e("defs", { children: t.map((L, E) => {
|
|
@@ -5709,25 +5713,25 @@ function bo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a =
|
|
|
5709
5713
|
/* @__PURE__ */ e("text", { x: N(L), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: s(L) })
|
|
5710
5714
|
] }, E)),
|
|
5711
5715
|
t.map((L, E) => {
|
|
5712
|
-
const A = 6 + M * E + M / 2, F = N(L.start), B = Math.max(2, N(L.end) - N(L.start)),
|
|
5716
|
+
const A = 6 + M * E + M / 2, F = N(L.start), B = Math.max(2, N(L.end) - N(L.start)), T = L.color ?? j(E);
|
|
5713
5717
|
return /* @__PURE__ */ m("g", { children: [
|
|
5714
5718
|
/* @__PURE__ */ e(
|
|
5715
5719
|
"rect",
|
|
5716
5720
|
{
|
|
5717
5721
|
x: F,
|
|
5718
|
-
y: A -
|
|
5722
|
+
y: A - w / 2,
|
|
5719
5723
|
width: B,
|
|
5720
|
-
height:
|
|
5724
|
+
height: w,
|
|
5721
5725
|
rx: 5,
|
|
5722
5726
|
fill: `url(#${x}-rg${E})`,
|
|
5723
5727
|
className: "select-chart__hbar",
|
|
5724
5728
|
style: { animationDelay: `${E * 40}ms` },
|
|
5725
5729
|
onMouseEnter: () => y.show({
|
|
5726
5730
|
x: F + B / 2,
|
|
5727
|
-
y: A -
|
|
5728
|
-
place: A -
|
|
5731
|
+
y: A - w / 2,
|
|
5732
|
+
place: A - w / 2 < 50 ? "bottom" : "top",
|
|
5729
5733
|
title: L.label,
|
|
5730
|
-
rows: [{ label: "Intervalo", value: `${s(L.start)} – ${s(L.end)}`, color:
|
|
5734
|
+
rows: [{ label: "Intervalo", value: `${s(L.start)} – ${s(L.end)}`, color: T }]
|
|
5731
5735
|
}),
|
|
5732
5736
|
onMouseLeave: y.hide
|
|
5733
5737
|
}
|
|
@@ -5742,17 +5746,17 @@ function bo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a =
|
|
|
5742
5746
|
const xo = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels: c = ["Seg", "", "Qua", "", "Sex", "", "Dom"], columnLabels: s, format: a = Y, cell: r = 14, gap: d = 3, min: o, max: i, className: h, ...u }, f) {
|
|
5743
5747
|
const g = X();
|
|
5744
5748
|
te();
|
|
5745
|
-
const v = n.flat().filter((
|
|
5749
|
+
const v = n.flat().filter((w) => w != null && Number.isFinite(w)), y = o ?? (v.length ? Math.min(...v) : 0), $ = (i ?? (v.length ? Math.max(...v) : 1)) - y || 1, _ = 30, p = s ? 16 : 4, b = r + d, S = _ + n.length * b, k = p + 7 * b, M = { "--heat-color": l };
|
|
5746
5750
|
return /* @__PURE__ */ m("div", { ref: f, ...u, className: `select-chart-wrap select-calheat${h ? " " + h : ""}`, style: M, children: [
|
|
5747
|
-
/* @__PURE__ */ m("svg", { width:
|
|
5751
|
+
/* @__PURE__ */ m("svg", { width: S, height: k, className: "select-chart", children: [
|
|
5748
5752
|
c.map(
|
|
5749
|
-
(
|
|
5753
|
+
(w, N) => w ? /* @__PURE__ */ e("text", { x: _ - 6, y: p + N * b + r / 2, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "end", children: w }, N) : null
|
|
5750
5754
|
),
|
|
5751
5755
|
s == null ? void 0 : s.map(
|
|
5752
|
-
(
|
|
5756
|
+
(w, N) => w ? /* @__PURE__ */ e("text", { x: _ + N * b, y: p - 4, className: "select-chart__xlabel", textAnchor: "start", children: w }, N) : null
|
|
5753
5757
|
),
|
|
5754
5758
|
n.map(
|
|
5755
|
-
(
|
|
5759
|
+
(w, N) => w.map((C, L) => {
|
|
5756
5760
|
const E = _ + N * b, A = p + L * b;
|
|
5757
5761
|
if (C == null || !Number.isFinite(C))
|
|
5758
5762
|
return /* @__PURE__ */ e("rect", { x: E, y: A, width: r, height: r, rx: 3, className: "select-chart__calcell select-chart__calcell--empty" }, `${N}-${L}`);
|
|
@@ -5790,15 +5794,15 @@ const xo = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
5790
5794
|
/* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5791
5795
|
[0.34, 0.67, 1].map(($, _) => /* @__PURE__ */ e("circle", { cx: h, cy: u, r: f * $, className: "select-chart__grid", fill: "none" }, _)),
|
|
5792
5796
|
n.map(($, _) => {
|
|
5793
|
-
const p = _ * x, b = (_ + 1) * x - 1.5,
|
|
5797
|
+
const p = _ * x, b = (_ + 1) * x - 1.5, S = $.color ?? j(_), k = Math.max(2, y($.value)), M = ((p + b) / 2 - 90) * (Math.PI / 180), w = h + k * Math.cos(M), N = u + k * Math.sin(M);
|
|
5794
5798
|
return /* @__PURE__ */ e(
|
|
5795
5799
|
"path",
|
|
5796
5800
|
{
|
|
5797
5801
|
d: it(h, u, k, 0, p, b),
|
|
5798
|
-
fill:
|
|
5802
|
+
fill: S,
|
|
5799
5803
|
fillOpacity: 0.8,
|
|
5800
5804
|
className: "select-chart__seg",
|
|
5801
|
-
onMouseEnter: () => i.show({ x:
|
|
5805
|
+
onMouseEnter: () => i.show({ x: w, y: N, place: N < u ? "top" : "bottom", title: $.label, rows: [{ label: "Valor", value: c($.value), color: S }] }),
|
|
5802
5806
|
onMouseLeave: i.hide
|
|
5803
5807
|
},
|
|
5804
5808
|
_
|
|
@@ -5862,29 +5866,29 @@ function No({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s =
|
|
|
5862
5866
|
] });
|
|
5863
5867
|
}
|
|
5864
5868
|
function Mo({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel: s = "Depois", labelWidth: a = 96, className: r, ...d }) {
|
|
5865
|
-
const f = n ?? t.length * 34 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = "var(--select-chart-2)", $ = "var(--select-chart-1)", _ = ye(Math.max(1, ...t.flatMap((
|
|
5869
|
+
const f = n ?? t.length * 34 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = "var(--select-chart-2)", $ = "var(--select-chart-1)", _ = ye(Math.max(1, ...t.flatMap((w) => [w.from, w.to]))), p = a, b = Math.max(0, v - p - 14), S = f - 6 - 26, k = t.length ? S / t.length : 0, M = (w) => p + w / _ * b;
|
|
5866
5870
|
return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
|
|
5867
5871
|
v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
|
|
5868
|
-
we(_).map((
|
|
5872
|
+
we(_).map((w, N) => /* @__PURE__ */ m("g", { children: [
|
|
5869
5873
|
/* @__PURE__ */ e(
|
|
5870
5874
|
"line",
|
|
5871
5875
|
{
|
|
5872
|
-
x1: M(
|
|
5873
|
-
x2: M(
|
|
5876
|
+
x1: M(w),
|
|
5877
|
+
x2: M(w),
|
|
5874
5878
|
y1: 6,
|
|
5875
|
-
y2: 6 +
|
|
5879
|
+
y2: 6 + S,
|
|
5876
5880
|
className: N === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
5877
5881
|
}
|
|
5878
5882
|
),
|
|
5879
|
-
/* @__PURE__ */ e("text", { x: M(
|
|
5883
|
+
/* @__PURE__ */ e("text", { x: M(w), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: l(w) })
|
|
5880
5884
|
] }, N)),
|
|
5881
|
-
t.map((
|
|
5885
|
+
t.map((w, N) => {
|
|
5882
5886
|
const C = 6 + k * N + k / 2;
|
|
5883
5887
|
return /* @__PURE__ */ m("g", { children: [
|
|
5884
|
-
/* @__PURE__ */ e("line", { x1: M(
|
|
5885
|
-
/* @__PURE__ */ e("circle", { cx: M(
|
|
5886
|
-
/* @__PURE__ */ e("circle", { cx: M(
|
|
5887
|
-
/* @__PURE__ */ e("text", { x: p - 8, y: C, className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children:
|
|
5888
|
+
/* @__PURE__ */ e("line", { x1: M(w.from), x2: M(w.to), y1: C, y2: C, stroke: "var(--select-chart-track)", strokeWidth: 4, strokeLinecap: "round" }),
|
|
5889
|
+
/* @__PURE__ */ e("circle", { cx: M(w.from), cy: C, r: 5, fill: x, className: "select-chart__dot" }),
|
|
5890
|
+
/* @__PURE__ */ e("circle", { cx: M(w.to), cy: C, r: 5, fill: $, className: "select-chart__dot" }),
|
|
5891
|
+
/* @__PURE__ */ e("text", { x: p - 8, y: C, className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: w.label }),
|
|
5888
5892
|
/* @__PURE__ */ e(
|
|
5889
5893
|
"rect",
|
|
5890
5894
|
{
|
|
@@ -5894,14 +5898,14 @@ function Mo({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel
|
|
|
5894
5898
|
height: k,
|
|
5895
5899
|
fill: "transparent",
|
|
5896
5900
|
onMouseEnter: () => y.show({
|
|
5897
|
-
x: (M(
|
|
5901
|
+
x: (M(w.from) + M(w.to)) / 2,
|
|
5898
5902
|
y: C - 8,
|
|
5899
5903
|
place: C - 8 < 50 ? "bottom" : "top",
|
|
5900
|
-
title:
|
|
5904
|
+
title: w.label,
|
|
5901
5905
|
rows: [
|
|
5902
|
-
{ label: c, value: l(
|
|
5903
|
-
{ label: s, value: l(
|
|
5904
|
-
{ label: "Δ", value: `${
|
|
5906
|
+
{ label: c, value: l(w.from), color: x },
|
|
5907
|
+
{ label: s, value: l(w.to), color: $ },
|
|
5908
|
+
{ label: "Δ", value: `${w.to - w.from >= 0 ? "+" : ""}${l(w.to - w.from)}` }
|
|
5905
5909
|
]
|
|
5906
5910
|
}),
|
|
5907
5911
|
onMouseLeave: y.hide
|
|
@@ -5914,7 +5918,7 @@ function Mo({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel
|
|
|
5914
5918
|
] });
|
|
5915
5919
|
}
|
|
5916
5920
|
function $o({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className: s, ...a }) {
|
|
5917
|
-
const { ref: r, width: d } = ce(n), o = X(), i = { top: 6, right: 6, bottom: 24, left: 6 }, h = Math.max(0, d - i.left - i.right), u = n - i.top - i.bottom, f = t.map((p) => p.segments.reduce((b,
|
|
5921
|
+
const { ref: r, width: d } = ce(n), o = X(), i = { top: 6, right: 6, bottom: 24, left: 6 }, h = Math.max(0, d - i.left - i.right), u = n - i.top - i.bottom, f = t.map((p) => p.segments.reduce((b, S) => b + S.value, 0)), g = f.reduce((p, b) => p + b, 0) || 1, v = [];
|
|
5918
5922
|
t.forEach((p) => p.segments.forEach((b) => {
|
|
5919
5923
|
v.includes(b.key) || v.push(b.key);
|
|
5920
5924
|
}));
|
|
@@ -5922,13 +5926,13 @@ function $o({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className:
|
|
|
5922
5926
|
let _ = i.left;
|
|
5923
5927
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
5924
5928
|
d > 0 && /* @__PURE__ */ e("svg", { width: d, height: n, className: "select-chart", children: t.map((p, b) => {
|
|
5925
|
-
const
|
|
5929
|
+
const S = f[b] || 1, k = S / g * $, M = _;
|
|
5926
5930
|
_ += k + c;
|
|
5927
|
-
let
|
|
5931
|
+
let w = i.top;
|
|
5928
5932
|
return /* @__PURE__ */ m("g", { children: [
|
|
5929
5933
|
p.segments.map((N, C) => {
|
|
5930
|
-
const L = N.value /
|
|
5931
|
-
|
|
5934
|
+
const L = N.value / S * u, E = w;
|
|
5935
|
+
w += L;
|
|
5932
5936
|
const A = y(N.key, N.color);
|
|
5933
5937
|
return /* @__PURE__ */ e(
|
|
5934
5938
|
"rect",
|
|
@@ -5947,7 +5951,7 @@ function $o({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className:
|
|
|
5947
5951
|
title: `${p.label} · ${N.key}`,
|
|
5948
5952
|
rows: [
|
|
5949
5953
|
{ label: "Valor", value: l(N.value), color: A },
|
|
5950
|
-
{ label: "Share", value: `${Math.round(N.value /
|
|
5954
|
+
{ label: "Share", value: `${Math.round(N.value / S * 100)}%` }
|
|
5951
5955
|
]
|
|
5952
5956
|
}),
|
|
5953
5957
|
onMouseLeave: o.hide
|
|
@@ -5970,17 +5974,17 @@ const ko = R(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
|
|
|
5970
5974
|
const E = Math.PI + L * Math.PI;
|
|
5971
5975
|
return [v + g * Math.cos(E), y + g * Math.sin(E)];
|
|
5972
5976
|
}, p = (L, E) => {
|
|
5973
|
-
const [A, F] = _(L), [B,
|
|
5974
|
-
return `M ${A.toFixed(2)} ${F.toFixed(2)} A ${g} ${g} 0 0 1 ${B.toFixed(2)} ${
|
|
5977
|
+
const [A, F] = _(L), [B, T] = _(E);
|
|
5978
|
+
return `M ${A.toFixed(2)} ${F.toFixed(2)} A ${g} ${g} 0 0 1 ${B.toFixed(2)} ${T.toFixed(2)}`;
|
|
5975
5979
|
};
|
|
5976
5980
|
let b = 0;
|
|
5977
|
-
const
|
|
5981
|
+
const S = c.map((L) => {
|
|
5978
5982
|
const E = $(b) / l, A = $(L.upTo) / l;
|
|
5979
5983
|
return b = L.upTo, { t0: E, t1: A, color: L.color };
|
|
5980
|
-
}), k = $(n) / l, M = Math.PI + k * Math.PI,
|
|
5984
|
+
}), k = $(n) / l, M = Math.PI + k * Math.PI, w = g * 0.82, N = v + w * Math.cos(M), C = y + w * Math.sin(M);
|
|
5981
5985
|
return /* @__PURE__ */ e("div", { ref: h, ...i, className: `select-gauge${o ? " " + o : ""}`, style: { width: `${s / 16}rem` }, children: /* @__PURE__ */ m("div", { className: "select-gauge__ring", style: { width: "100%", aspectRatio: `${s} / ${x}` }, children: [
|
|
5982
5986
|
/* @__PURE__ */ m("svg", { width: "100%", height: "100%", viewBox: `0 0 ${s} ${x}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5983
|
-
|
|
5987
|
+
S.map((L, E) => /* @__PURE__ */ e("path", { d: p(L.t0, L.t1), fill: "none", stroke: L.color, strokeWidth: u, strokeLinecap: "butt" }, E)),
|
|
5984
5988
|
/* @__PURE__ */ e("line", { x1: v, y1: y, x2: N, y2: C, stroke: "var(--select-text)", strokeWidth: 3, strokeLinecap: "round", className: "select-gaugeband__needle" }),
|
|
5985
5989
|
/* @__PURE__ */ e("circle", { cx: v, cy: y, r: 5, fill: "var(--select-text)" })
|
|
5986
5990
|
] }),
|
|
@@ -5991,20 +5995,20 @@ const ko = R(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
|
|
|
5991
5995
|
] }) });
|
|
5992
5996
|
});
|
|
5993
5997
|
function wo({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
|
|
5994
|
-
const { ref: r, width: d } = ce(l), o = X(), i = te(), [h, u] = D(null), f = n.length, g = { top: 14, right: 14, bottom: 28, left: 14 }, v = Math.max(0, d - g.left - g.right), y = l - g.top - g.bottom, x = n.map((k, M) => t.reduce((
|
|
5995
|
-
const
|
|
5998
|
+
const { ref: r, width: d } = ce(l), o = X(), i = te(), [h, u] = D(null), f = n.length, g = { top: 14, right: 14, bottom: 28, left: 14 }, v = Math.max(0, d - g.left - g.right), y = l - g.top - g.bottom, x = n.map((k, M) => t.reduce((w, N) => w + (N.data[M] ?? 0), 0)), $ = Math.max(1, ...x), _ = y / $, p = (k) => g.left + (f <= 1 ? v / 2 : k / (f - 1) * v), b = n.map(() => 0), S = t.map((k, M) => {
|
|
5999
|
+
const w = [], N = [];
|
|
5996
6000
|
return n.forEach((C, L) => {
|
|
5997
6001
|
const A = g.top + (y - x[L] * _) / 2 + b[L] * _, F = A + (k.data[L] ?? 0) * _;
|
|
5998
|
-
|
|
5999
|
-
}), { upper:
|
|
6002
|
+
w.push([p(L), A]), N.push([p(L), F]), b[L] = b[L] + (k.data[L] ?? 0);
|
|
6003
|
+
}), { upper: w, lower: N, color: k.color ?? j(M), name: k.name };
|
|
6000
6004
|
});
|
|
6001
6005
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
6002
6006
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", children: [
|
|
6003
|
-
/* @__PURE__ */ e("defs", { children:
|
|
6007
|
+
/* @__PURE__ */ e("defs", { children: S.map((k, M) => /* @__PURE__ */ m("linearGradient", { id: `${i}-st${M}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
6004
6008
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: k.color, stopOpacity: 0.95 }),
|
|
6005
6009
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: k.color, stopOpacity: 0.6 })
|
|
6006
6010
|
] }, M)) }),
|
|
6007
|
-
|
|
6011
|
+
S.map((k, M) => /* @__PURE__ */ e("path", { d: yl(k.upper, k.lower), fill: `url(#${i}-st${M})`, className: "select-chart__area" }, M)),
|
|
6008
6012
|
h != null && /* @__PURE__ */ e("line", { x1: p(h), x2: p(h), y1: g.top, y2: g.top + y, className: "select-chart__crosshair" }),
|
|
6009
6013
|
n.map(
|
|
6010
6014
|
(k, M) => M % Math.max(1, Math.ceil(f / 7)) === 0 || M === f - 1 ? /* @__PURE__ */ e("text", { x: p(M), y: l - g.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k }, M) : null
|
|
@@ -6023,7 +6027,7 @@ function wo({ series: t, labels: n, height: l = 240, format: c = Y, className: s
|
|
|
6023
6027
|
y: g.top + y / 2,
|
|
6024
6028
|
place: "top",
|
|
6025
6029
|
title: k,
|
|
6026
|
-
rows: t.map((
|
|
6030
|
+
rows: t.map((w, N) => ({ label: w.name, value: c(w.data[M] ?? 0), color: w.color ?? j(N) }))
|
|
6027
6031
|
});
|
|
6028
6032
|
},
|
|
6029
6033
|
onMouseLeave: () => {
|
|
@@ -6047,23 +6051,23 @@ const So = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, c
|
|
|
6047
6051
|
/* @__PURE__ */ e("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart select-donut", "aria-hidden": "true", children: n.map(($, _) => {
|
|
6048
6052
|
const p = v[_], b = x / y * 360;
|
|
6049
6053
|
x += p;
|
|
6050
|
-
const
|
|
6054
|
+
const S = x / y * 360, k = $.color ?? j(_);
|
|
6051
6055
|
let M = b;
|
|
6052
6056
|
return /* @__PURE__ */ m("g", { children: [
|
|
6053
6057
|
/* @__PURE__ */ e(
|
|
6054
6058
|
"path",
|
|
6055
6059
|
{
|
|
6056
|
-
d: it(i, h, f, g, b + 0.6, Math.max(b + 0.7,
|
|
6060
|
+
d: it(i, h, f, g, b + 0.6, Math.max(b + 0.7, S - 0.6)),
|
|
6057
6061
|
fill: k,
|
|
6058
6062
|
className: "select-chart__seg",
|
|
6059
6063
|
onMouseEnter: () => o.show({ x: i, y: h - f, place: h - f < 44 ? "bottom" : "top", title: $.label, rows: [{ label: "Total", value: c(p), color: k }] }),
|
|
6060
6064
|
onMouseLeave: o.hide
|
|
6061
6065
|
}
|
|
6062
6066
|
),
|
|
6063
|
-
($.children ?? []).map((
|
|
6067
|
+
($.children ?? []).map((w, N) => {
|
|
6064
6068
|
const C = M;
|
|
6065
|
-
M +=
|
|
6066
|
-
const L = M, E =
|
|
6069
|
+
M += w.value / y * 360;
|
|
6070
|
+
const L = M, E = w.color ?? k, A = 0.45 + N % 3 * 0.2, F = ((C + L) / 2 - 90) * (Math.PI / 180);
|
|
6067
6071
|
return /* @__PURE__ */ e(
|
|
6068
6072
|
"path",
|
|
6069
6073
|
{
|
|
@@ -6075,10 +6079,10 @@ const So = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, c
|
|
|
6075
6079
|
x: i + (u - 6) * Math.cos(F),
|
|
6076
6080
|
y: h + (u - 6) * Math.sin(F),
|
|
6077
6081
|
place: h + (u - 6) * Math.sin(F) < h ? "top" : "bottom",
|
|
6078
|
-
title: `${$.label} · ${
|
|
6082
|
+
title: `${$.label} · ${w.label}`,
|
|
6079
6083
|
rows: [
|
|
6080
|
-
{ label: "Valor", value: c(
|
|
6081
|
-
{ label: "Share", value: `${Math.round(
|
|
6084
|
+
{ label: "Valor", value: c(w.value), color: k },
|
|
6085
|
+
{ label: "Share", value: `${Math.round(w.value / (p || 1) * 100)}%` }
|
|
6082
6086
|
]
|
|
6083
6087
|
}),
|
|
6084
6088
|
onMouseLeave: o.hide
|
|
@@ -6115,13 +6119,13 @@ function Co({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
6115
6119
|
/* @__PURE__ */ e("text", { x: o.left - 8, y: g(_), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(_) })
|
|
6116
6120
|
] }, p)),
|
|
6117
6121
|
t.map((_, p) => {
|
|
6118
|
-
const b = o.left + y * p + y / 2,
|
|
6119
|
-
for (let A = k - 1; A >= 0; A--) N.push([b +
|
|
6120
|
-
for (let A = 0; A < k; A++) C.push([b -
|
|
6122
|
+
const b = o.left + y * p + y / 2, S = _.color ?? j(p), k = _.bins.length, M = (A) => g(_.min + (_.max - _.min) * A / Math.max(1, k - 1)), w = (A) => _.bins[A] / $ * x, N = [], C = [];
|
|
6123
|
+
for (let A = k - 1; A >= 0; A--) N.push([b + w(A), M(A)]);
|
|
6124
|
+
for (let A = 0; A < k; A++) C.push([b - w(A), M(A)]);
|
|
6121
6125
|
const L = `${Cn(N)} ${Cn(C).replace(/^M/, "L")} Z`, E = _.median != null ? g(_.median) : null;
|
|
6122
6126
|
return /* @__PURE__ */ m("g", { children: [
|
|
6123
|
-
/* @__PURE__ */ e("path", { d: L, fill:
|
|
6124
|
-
E != null && /* @__PURE__ */ e("line", { x1: b - x * 0.6, x2: b + x * 0.6, y1: E, y2: E, stroke:
|
|
6127
|
+
/* @__PURE__ */ e("path", { d: L, fill: S, fillOpacity: 0.32, stroke: S, strokeWidth: 1.5, strokeLinejoin: "round" }),
|
|
6128
|
+
E != null && /* @__PURE__ */ e("line", { x1: b - x * 0.6, x2: b + x * 0.6, y1: E, y2: E, stroke: S, strokeWidth: 2 }),
|
|
6125
6129
|
/* @__PURE__ */ e("text", { x: b, y: n - o.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: _.label }),
|
|
6126
6130
|
/* @__PURE__ */ e(
|
|
6127
6131
|
"rect",
|
|
@@ -6137,7 +6141,7 @@ function Co({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
6137
6141
|
place: g(_.max) < o.top + 64 ? "bottom" : "top",
|
|
6138
6142
|
title: _.label,
|
|
6139
6143
|
rows: [
|
|
6140
|
-
{ label: "Máx", value: l(_.max), color:
|
|
6144
|
+
{ label: "Máx", value: l(_.max), color: S },
|
|
6141
6145
|
..._.median != null ? [{ label: "Mediana", value: l(_.median) }] : [],
|
|
6142
6146
|
{ label: "Mín", value: l(_.min) }
|
|
6143
6147
|
]
|
|
@@ -6166,19 +6170,19 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
|
|
|
6166
6170
|
b[N][L] = [C, C + E], C += E;
|
|
6167
6171
|
}
|
|
6168
6172
|
}
|
|
6169
|
-
const
|
|
6170
|
-
const [A, F] =
|
|
6171
|
-
return `M${A.toFixed(2)},${F.toFixed(2)} A${v},${v} 0 0 1 ${B.toFixed(2)},${
|
|
6172
|
-
}, M = (N) => N * 180 / Math.PI,
|
|
6173
|
+
const S = (N, C) => [u + C * Math.cos(N - Math.PI / 2), f + C * Math.sin(N - Math.PI / 2)], k = (N, C, L, E) => {
|
|
6174
|
+
const [A, F] = S(N, v), [B, T] = S(C, v), [I, O] = S(L, v), [W, Z] = S(E, v);
|
|
6175
|
+
return `M${A.toFixed(2)},${F.toFixed(2)} A${v},${v} 0 0 1 ${B.toFixed(2)},${T.toFixed(2)} Q${u},${f} ${I.toFixed(2)},${O.toFixed(2)} A${v},${v} 0 0 1 ${W.toFixed(2)},${Z.toFixed(2)} Q${u},${f} ${A.toFixed(2)},${F.toFixed(2)} Z`;
|
|
6176
|
+
}, M = (N) => N * 180 / Math.PI, w = [];
|
|
6173
6177
|
for (let N = 0; N < h; N++)
|
|
6174
6178
|
for (let C = N; C < h; C++) {
|
|
6175
6179
|
if (N === C || n[N][C] + n[C][N] <= 0) continue;
|
|
6176
6180
|
const [L, E] = b[N][C], [A, F] = b[C][N];
|
|
6177
|
-
|
|
6181
|
+
w.push({ d: k(L, E, A, F), color: j(N), i: N, j: C, value: n[N][C] + n[C][N] });
|
|
6178
6182
|
}
|
|
6179
6183
|
return /* @__PURE__ */ e("div", { ref: o, ...d, className: `select-donut-wrap${r ? " " + r : ""}`, children: /* @__PURE__ */ m("div", { className: "select-radial", style: { width: c, aspectRatio: "1" }, children: [
|
|
6180
6184
|
/* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
6181
|
-
|
|
6185
|
+
w.map((N, C) => /* @__PURE__ */ e(
|
|
6182
6186
|
"path",
|
|
6183
6187
|
{
|
|
6184
6188
|
d: N.d,
|
|
@@ -6196,7 +6200,7 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
|
|
|
6196
6200
|
C
|
|
6197
6201
|
)),
|
|
6198
6202
|
_.map((N, C) => {
|
|
6199
|
-
const L = (N.a0 + N.a1) / 2, [E, A] =
|
|
6203
|
+
const L = (N.a0 + N.a1) / 2, [E, A] = S(L, g + 12);
|
|
6200
6204
|
return /* @__PURE__ */ m("g", { children: [
|
|
6201
6205
|
/* @__PURE__ */ e("path", { d: it(u, f, g, v, M(N.a0), M(N.a1)), fill: j(C), className: "select-chord__arc" }),
|
|
6202
6206
|
/* @__PURE__ */ e(
|
|
@@ -6217,10 +6221,10 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
|
|
|
6217
6221
|
] }) });
|
|
6218
6222
|
});
|
|
6219
6223
|
function Ao({ points: t, height: n = 240, radius: l = 16, color: c = "var(--select-chart-1)", xMax: s, yMax: a, format: r = Y, className: d, ...o }) {
|
|
6220
|
-
const { ref: i, width: h } = ce(n), u = X(), f = 12, g = Math.max(0, h - f * 2), v = n - f * 2, y = s ?? Math.max(1, ...t.map((C) => C.x)), x = a ?? Math.max(1, ...t.map((C) => C.y)), $ = (C) => f + C / y * g, _ = (C) => f + v - C / x * v, p = l, b = Math.sqrt(3),
|
|
6221
|
-
let E = C, A = L, F = -E - A, B = Math.round(E),
|
|
6222
|
-
const O = Math.abs(B - E),
|
|
6223
|
-
return O >
|
|
6224
|
+
const { ref: i, width: h } = ce(n), u = X(), f = 12, g = Math.max(0, h - f * 2), v = n - f * 2, y = s ?? Math.max(1, ...t.map((C) => C.x)), x = a ?? Math.max(1, ...t.map((C) => C.y)), $ = (C) => f + C / y * g, _ = (C) => f + v - C / x * v, p = l, b = Math.sqrt(3), S = (C, L) => {
|
|
6225
|
+
let E = C, A = L, F = -E - A, B = Math.round(E), T = Math.round(F), I = Math.round(A);
|
|
6226
|
+
const O = Math.abs(B - E), W = Math.abs(T - F), Z = Math.abs(I - A);
|
|
6227
|
+
return O > W && O > Z ? B = -T - I : W > Z ? T = -B - I : I = -B - T, [B, I];
|
|
6224
6228
|
}, k = (C, L) => [p * b * (C + L / 2), p * (3 / 2) * L], M = (C, L) => {
|
|
6225
6229
|
let E = "";
|
|
6226
6230
|
for (let A = 0; A < 6; A++) {
|
|
@@ -6228,21 +6232,21 @@ function Ao({ points: t, height: n = 240, radius: l = 16, color: c = "var(--sele
|
|
|
6228
6232
|
E += `${A === 0 ? "M" : "L"}${(C + p * Math.cos(F)).toFixed(1)},${(L + p * Math.sin(F)).toFixed(1)}`;
|
|
6229
6233
|
}
|
|
6230
6234
|
return E + "Z";
|
|
6231
|
-
},
|
|
6235
|
+
}, w = /* @__PURE__ */ new Map();
|
|
6232
6236
|
for (const C of t) {
|
|
6233
|
-
const L = $(C.x), E = _(C.y), A = (b / 3 * L - 1 / 3 * E) / p, F = 2 / 3 * E / p, [B,
|
|
6234
|
-
|
|
6237
|
+
const L = $(C.x), E = _(C.y), A = (b / 3 * L - 1 / 3 * E) / p, F = 2 / 3 * E / p, [B, T] = S(A, F), I = `${B},${T}`;
|
|
6238
|
+
w.set(I, (w.get(I) ?? 0) + 1);
|
|
6235
6239
|
}
|
|
6236
|
-
const N = Math.max(1, ...
|
|
6240
|
+
const N = Math.max(1, ...w.values());
|
|
6237
6241
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: i, children: [
|
|
6238
|
-
h > 0 && /* @__PURE__ */ e("svg", { width: h, height: n, className: "select-chart", children: [...
|
|
6239
|
-
const [E, A] = C.split(",").map(Number), [F, B] = k(E, A),
|
|
6242
|
+
h > 0 && /* @__PURE__ */ e("svg", { width: h, height: n, className: "select-chart", children: [...w].map(([C, L]) => {
|
|
6243
|
+
const [E, A] = C.split(",").map(Number), [F, B] = k(E, A), T = L / N, I = Math.round((0.16 + T * 0.84) * 100);
|
|
6240
6244
|
return /* @__PURE__ */ e(
|
|
6241
6245
|
"path",
|
|
6242
6246
|
{
|
|
6243
6247
|
d: M(F, B),
|
|
6244
6248
|
className: "select-chart__calcell",
|
|
6245
|
-
style: { fill: `color-mix(in srgb, ${c} ${
|
|
6249
|
+
style: { fill: `color-mix(in srgb, ${c} ${I}%, transparent)`, "--heat-color": c },
|
|
6246
6250
|
onMouseEnter: () => u.show({
|
|
6247
6251
|
x: F,
|
|
6248
6252
|
y: B - p,
|
|
@@ -6420,50 +6424,50 @@ function Pn(t, n, l) {
|
|
|
6420
6424
|
}
|
|
6421
6425
|
const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) < 1e-6, Eo = R(function({ points: n = [], arcs: l = [], size: c = 320, tilt: s = -18, spin: a = !0, speed: r = 7, color: d = "var(--select-chart-1)", format: o = Y, legend: i = !0, map: h = !0, fluid: u = !1, onZoomChange: f, className: g, ...v }, y) {
|
|
6422
6426
|
var Fe;
|
|
6423
|
-
const x = te(), $ = X(), _ = q(null), p = Ct(_, c), b = n.length ? n.reduce((
|
|
6427
|
+
const x = te(), $ = X(), _ = q(null), p = Ct(_, c), b = n.length ? n.reduce((P, V) => P + V.lng, 0) / n.length : 0, S = q(
|
|
6424
6428
|
typeof window < "u" && !!((Fe = window.matchMedia) != null && Fe.call(window, "(prefers-reduced-motion: reduce)").matches)
|
|
6425
|
-
), k = q({ lng: -b, lat: s }), M = q({ lng: 0, lat: 0 }),
|
|
6429
|
+
), k = q({ lng: -b, lat: s }), M = q({ lng: 0, lat: 0 }), w = q(1), N = q(null), C = q(null), L = q(!1), E = q(0), A = q(0), F = q(0), [, B] = D(0), [T, I] = D(!1), [O, W] = D(null), Z = () => {
|
|
6426
6430
|
A.current || (F.current = performance.now(), A.current = requestAnimationFrame(G));
|
|
6427
6431
|
};
|
|
6428
|
-
function G(
|
|
6429
|
-
const V = Math.min(0.05, (
|
|
6430
|
-
F.current =
|
|
6432
|
+
function G(P) {
|
|
6433
|
+
const V = Math.min(0.05, (P - F.current) / 1e3);
|
|
6434
|
+
F.current = P, E.current += V;
|
|
6431
6435
|
const U = M.current, oe = Math.abs(U.lng) + Math.abs(U.lat) > 0.02;
|
|
6432
6436
|
if (!C.current) if (N.current) {
|
|
6433
6437
|
const se = Math.min(1, V * 6);
|
|
6434
6438
|
k.current.lng += (N.current.lng - k.current.lng) * se, k.current.lat += (N.current.lat - k.current.lat) * se, Math.abs(N.current.lng - k.current.lng) < 0.2 && Math.abs(N.current.lat - k.current.lat) < 0.2 && (N.current = null);
|
|
6435
|
-
} else oe ? (k.current.lng += U.lng * V * 60, k.current.lat = Math.max(-85, Math.min(85, k.current.lat + U.lat * V * 60)), U.lng *= 0.94, U.lat *= 0.94) : (U.lng = 0, U.lat = 0, a && !
|
|
6436
|
-
B((se) => (se + 1) % 1e6), !
|
|
6439
|
+
} else oe ? (k.current.lng += U.lng * V * 60, k.current.lat = Math.max(-85, Math.min(85, k.current.lat + U.lat * V * 60)), U.lng *= 0.94, U.lat *= 0.94) : (U.lng = 0, U.lat = 0, a && !S.current && !L.current && (k.current.lng += r * V));
|
|
6440
|
+
B((se) => (se + 1) % 1e6), !S.current || !!C.current || !!N.current || Math.abs(U.lng) + Math.abs(U.lat) > 0.02 ? A.current = requestAnimationFrame(G) : A.current = 0;
|
|
6437
6441
|
}
|
|
6438
|
-
le(() => (
|
|
6442
|
+
le(() => (S.current || Z(), () => {
|
|
6439
6443
|
A.current && cancelAnimationFrame(A.current), A.current = 0;
|
|
6440
6444
|
}), []);
|
|
6441
6445
|
const J = q(f);
|
|
6442
6446
|
J.current = f, le(() => {
|
|
6443
|
-
const
|
|
6444
|
-
if (!
|
|
6447
|
+
const P = _.current;
|
|
6448
|
+
if (!P) return;
|
|
6445
6449
|
const V = (U) => {
|
|
6446
|
-
var
|
|
6450
|
+
var se;
|
|
6447
6451
|
U.preventDefault();
|
|
6448
|
-
const oe =
|
|
6449
|
-
|
|
6452
|
+
const oe = Math.max(-240, Math.min(240, U.deltaMode ? U.deltaY * 40 : U.deltaY)), ee = w.current * Math.exp(-oe * 12e-4);
|
|
6453
|
+
w.current = Math.max(0.8, Math.min(1.8, ee)), (se = J.current) == null || se.call(J, w.current), Z(), B((ue) => (ue + 1) % 1e6);
|
|
6450
6454
|
};
|
|
6451
|
-
return
|
|
6455
|
+
return P.addEventListener("wheel", V, { passive: !1 }), () => P.removeEventListener("wheel", V);
|
|
6452
6456
|
}, []);
|
|
6453
|
-
const re = (
|
|
6457
|
+
const re = (P) => {
|
|
6454
6458
|
var V, U;
|
|
6455
|
-
(U = (V =
|
|
6456
|
-
}, me = (
|
|
6459
|
+
(U = (V = P.target).setPointerCapture) == null || U.call(V, P.pointerId), C.current = { x: P.clientX, y: P.clientY }, M.current = { lng: 0, lat: 0 }, N.current = null, I(!0), Z();
|
|
6460
|
+
}, me = (P) => {
|
|
6457
6461
|
if (!C.current) return;
|
|
6458
|
-
const V = 0.34 /
|
|
6459
|
-
C.current = { x:
|
|
6460
|
-
}, Se = (
|
|
6462
|
+
const V = 0.34 / w.current, U = P.clientX - C.current.x, oe = P.clientY - C.current.y;
|
|
6463
|
+
C.current = { x: P.clientX, y: P.clientY }, k.current.lng += U * V, k.current.lat = Math.max(-85, Math.min(85, k.current.lat + oe * V)), M.current = { lng: U * V, lat: oe * V };
|
|
6464
|
+
}, Se = (P) => {
|
|
6461
6465
|
var V, U;
|
|
6462
|
-
C.current && ((U = (V =
|
|
6463
|
-
}, ne = (p / 2 - 6) *
|
|
6464
|
-
const V = bt(
|
|
6466
|
+
C.current && ((U = (V = P.target).releasePointerCapture) == null || U.call(V, P.pointerId), C.current = null, I(!1), Z());
|
|
6467
|
+
}, ne = (p / 2 - 6) * w.current, H = p / 2, Q = p / 2, z = (P) => {
|
|
6468
|
+
const V = bt(P, k.current.lng, k.current.lat);
|
|
6465
6469
|
return { x: H + ne * V[0], y: Q - ne * V[1], z: V[2] };
|
|
6466
|
-
},
|
|
6470
|
+
}, he = xe(() => {
|
|
6467
6471
|
const V = [];
|
|
6468
6472
|
for (let U = -180; U < 180; U += 30) {
|
|
6469
6473
|
const oe = [];
|
|
@@ -6477,36 +6481,36 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6477
6481
|
}
|
|
6478
6482
|
return V;
|
|
6479
6483
|
}, []), ie = xe(
|
|
6480
|
-
() => Es.map((
|
|
6484
|
+
() => Es.map((P) => {
|
|
6481
6485
|
const V = [];
|
|
6482
|
-
for (let U = 0; U <
|
|
6486
|
+
for (let U = 0; U < P.length; U += 2) V.push(et(P[U + 1], P[U]));
|
|
6483
6487
|
return V;
|
|
6484
6488
|
}),
|
|
6485
6489
|
[]
|
|
6486
|
-
),
|
|
6490
|
+
), pe = (P) => ({ x: H + ne * P[0], y: Q - ne * P[1] });
|
|
6487
6491
|
let de = "", ae = "";
|
|
6488
6492
|
if (h)
|
|
6489
|
-
for (const
|
|
6490
|
-
const V =
|
|
6493
|
+
for (const P of ie) {
|
|
6494
|
+
const V = P.map((se) => bt(se, k.current.lng, k.current.lat)), U = V.length;
|
|
6491
6495
|
let oe = !1;
|
|
6492
6496
|
for (const se of V)
|
|
6493
6497
|
if (se[2] > 0) {
|
|
6494
|
-
const
|
|
6495
|
-
ae += `${oe ? "L" : "M"}${
|
|
6498
|
+
const ue = pe(se);
|
|
6499
|
+
ae += `${oe ? "L" : "M"}${ue.x.toFixed(1)},${ue.y.toFixed(1)}`, oe = !0;
|
|
6496
6500
|
} else oe = !1;
|
|
6497
6501
|
const ee = [];
|
|
6498
6502
|
for (let se = 0; se < U; se++) {
|
|
6499
|
-
const
|
|
6500
|
-
if (Ve && ee.push({ v:
|
|
6501
|
-
const Je =
|
|
6502
|
-
ee.push({ v: [
|
|
6503
|
+
const ue = V[se], fe = V[(se + 1) % U], Ve = ue[2] > 0, Pe = fe[2] > 0;
|
|
6504
|
+
if (Ve && ee.push({ v: ue, edge: !1 }), Ve !== Pe) {
|
|
6505
|
+
const Je = ue[2] / (ue[2] - fe[2]);
|
|
6506
|
+
ee.push({ v: [ue[0] + (fe[0] - ue[0]) * Je, ue[1] + (fe[1] - ue[1]) * Je, 0], edge: !0 });
|
|
6503
6507
|
}
|
|
6504
6508
|
}
|
|
6505
6509
|
if (ee.length >= 3) {
|
|
6506
6510
|
const se = (fe, Ve) => {
|
|
6507
|
-
const Pe =
|
|
6511
|
+
const Pe = pe(Ve.v);
|
|
6508
6512
|
if (fe.edge && Ve.edge) {
|
|
6509
|
-
const Je = Math.atan2(
|
|
6513
|
+
const Je = Math.atan2(pe(fe.v).y - Q, pe(fe.v).x - H);
|
|
6510
6514
|
let Ze = Math.atan2(Pe.y - Q, Pe.x - H) - Je;
|
|
6511
6515
|
for (; Ze > Math.PI; ) Ze -= 2 * Math.PI;
|
|
6512
6516
|
for (; Ze < -Math.PI; ) Ze += 2 * Math.PI;
|
|
@@ -6514,51 +6518,51 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6514
6518
|
return `A${ne.toFixed(1)},${ne.toFixed(1)} 0 0 ${mt} ${Pe.x.toFixed(1)},${Pe.y.toFixed(1)}`;
|
|
6515
6519
|
}
|
|
6516
6520
|
return `L${Pe.x.toFixed(1)},${Pe.y.toFixed(1)}`;
|
|
6517
|
-
},
|
|
6518
|
-
de += `M${
|
|
6521
|
+
}, ue = pe(ee[0].v);
|
|
6522
|
+
de += `M${ue.x.toFixed(1)},${ue.y.toFixed(1)}`;
|
|
6519
6523
|
for (let fe = 1; fe < ee.length; fe++) de += se(ee[fe - 1], ee[fe]);
|
|
6520
6524
|
de += se(ee[ee.length - 1], ee[0]), de += "Z";
|
|
6521
6525
|
}
|
|
6522
6526
|
}
|
|
6523
|
-
const $e = (
|
|
6527
|
+
const $e = (P) => {
|
|
6524
6528
|
let V = "", U = !1;
|
|
6525
|
-
for (const oe of
|
|
6529
|
+
for (const oe of P) {
|
|
6526
6530
|
const ee = z(oe);
|
|
6527
6531
|
ee.z > 0 ? (V += `${U ? "L" : "M"}${ee.x.toFixed(1)},${ee.y.toFixed(1)}`, U = !0) : U = !1;
|
|
6528
6532
|
}
|
|
6529
6533
|
return V;
|
|
6530
|
-
}, Ce = Math.max(1, ...n.map((
|
|
6531
|
-
const U = z(et(
|
|
6534
|
+
}, Ce = Math.max(1, ...n.map((P) => P.value ?? 0)), Le = n.map((P, V) => {
|
|
6535
|
+
const U = z(et(P.lat, P.lng));
|
|
6532
6536
|
return {
|
|
6533
|
-
...
|
|
6537
|
+
...P,
|
|
6534
6538
|
i: V,
|
|
6535
6539
|
p: U,
|
|
6536
6540
|
vis: U.z > 0,
|
|
6537
|
-
r: 3 + Math.max(0,
|
|
6538
|
-
col:
|
|
6541
|
+
r: 3 + Math.max(0, P.value ?? 0) / Ce * 6,
|
|
6542
|
+
col: P.color ?? d
|
|
6539
6543
|
};
|
|
6540
|
-
}), Ne = O != null ? n[O] : null, Ie = 0.16, ke = l.map((
|
|
6541
|
-
const U = et(
|
|
6544
|
+
}), Ne = O != null ? n[O] : null, Ie = 0.16, ke = l.map((P, V) => {
|
|
6545
|
+
const U = et(P.from.lat, P.from.lng), oe = et(P.to.lat, P.to.lng);
|
|
6542
6546
|
let ee = "", se = !1;
|
|
6543
6547
|
for (let Ze = 0; Ze <= 40; Ze++) {
|
|
6544
6548
|
const mt = Ze / 40, ft = Pn(U, oe, mt), Pt = 1 + 0.34 * Math.sin(Math.PI * mt), $l = bt(ft, k.current.lng, k.current.lat), an = z([ft[0] * Pt, ft[1] * Pt, ft[2] * Pt]);
|
|
6545
6549
|
$l[2] > -0.05 ? (ee += `${se ? "L" : "M"}${an.x.toFixed(1)},${an.y.toFixed(1)}`, se = !0) : se = !1;
|
|
6546
6550
|
}
|
|
6547
|
-
const
|
|
6548
|
-
return { d: ee, col:
|
|
6549
|
-
}), Ue = Ne != null, je = i ? [...n].sort((
|
|
6551
|
+
const ue = S.current ? 0.5 : (E.current * Ie + V * 0.27) % 1, fe = Pn(U, oe, ue), Ve = 1 + 0.34 * Math.sin(Math.PI * ue), Pe = bt(fe, k.current.lng, k.current.lat), Je = z([fe[0] * Ve, fe[1] * Ve, fe[2] * Ve]), sn = Ne != null && (Rn(P.from, Ne) || Rn(P.to, Ne));
|
|
6552
|
+
return { d: ee, col: P.color ?? d, i: V, flow: { ...Je, vis: Pe[2] > 0 }, active: sn };
|
|
6553
|
+
}), Ue = Ne != null, je = i ? [...n].sort((P, V) => (V.value ?? 0) - (P.value ?? 0)).slice(0, 6) : [];
|
|
6550
6554
|
return /* @__PURE__ */ m("div", { ref: y, ...v, className: `select-globe${g ? " " + g : ""}`, children: [
|
|
6551
6555
|
/* @__PURE__ */ m(
|
|
6552
6556
|
"div",
|
|
6553
6557
|
{
|
|
6554
6558
|
ref: _,
|
|
6555
|
-
className: `select-globe__stage${
|
|
6559
|
+
className: `select-globe__stage${T ? " is-grabbing" : ""}`,
|
|
6556
6560
|
style: { width: u ? "100%" : `${c / 16}rem`, aspectRatio: "1" },
|
|
6557
6561
|
onPointerEnter: () => {
|
|
6558
6562
|
L.current = !0;
|
|
6559
6563
|
},
|
|
6560
|
-
onPointerLeave: (
|
|
6561
|
-
L.current = !1, Se(
|
|
6564
|
+
onPointerLeave: (P) => {
|
|
6565
|
+
L.current = !1, Se(P), W(null), $.hide(), Z();
|
|
6562
6566
|
},
|
|
6563
6567
|
onPointerDown: re,
|
|
6564
6568
|
onPointerMove: me,
|
|
@@ -6621,93 +6625,93 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6621
6625
|
stroke: `color-mix(in srgb, ${d} 68%, transparent)`
|
|
6622
6626
|
}
|
|
6623
6627
|
),
|
|
6624
|
-
|
|
6625
|
-
ke.map((
|
|
6628
|
+
he.map((P, V) => /* @__PURE__ */ e("path", { d: $e(P), className: "select-globe__grid" }, `g${V}`)),
|
|
6629
|
+
ke.map((P) => /* @__PURE__ */ m(
|
|
6626
6630
|
"g",
|
|
6627
6631
|
{
|
|
6628
6632
|
className: "select-globe__arcgrp",
|
|
6629
|
-
style: { opacity: Ue && !
|
|
6633
|
+
style: { opacity: Ue && !P.active ? 0.18 : 1 },
|
|
6630
6634
|
children: [
|
|
6631
6635
|
/* @__PURE__ */ e(
|
|
6632
6636
|
"path",
|
|
6633
6637
|
{
|
|
6634
|
-
d:
|
|
6638
|
+
d: P.d,
|
|
6635
6639
|
className: "select-globe__arc",
|
|
6636
|
-
stroke:
|
|
6637
|
-
strokeWidth:
|
|
6640
|
+
stroke: P.col === d ? `url(#${x}-arc)` : P.col,
|
|
6641
|
+
strokeWidth: P.active ? 2.5 : 1.75
|
|
6638
6642
|
}
|
|
6639
6643
|
),
|
|
6640
|
-
|
|
6644
|
+
P.flow.vis && /* @__PURE__ */ e(
|
|
6641
6645
|
"circle",
|
|
6642
6646
|
{
|
|
6643
|
-
cx:
|
|
6644
|
-
cy:
|
|
6645
|
-
r:
|
|
6646
|
-
fill:
|
|
6647
|
+
cx: P.flow.x,
|
|
6648
|
+
cy: P.flow.y,
|
|
6649
|
+
r: P.active ? 3 : 2.2,
|
|
6650
|
+
fill: P.col,
|
|
6647
6651
|
className: "select-globe__flow",
|
|
6648
|
-
style: { filter: `drop-shadow(0 0 4px ${
|
|
6652
|
+
style: { filter: `drop-shadow(0 0 4px ${P.col})` }
|
|
6649
6653
|
}
|
|
6650
6654
|
)
|
|
6651
6655
|
]
|
|
6652
6656
|
},
|
|
6653
|
-
`a${
|
|
6657
|
+
`a${P.i}`
|
|
6654
6658
|
))
|
|
6655
6659
|
] }),
|
|
6656
|
-
Le.filter((
|
|
6657
|
-
const V = O ===
|
|
6660
|
+
Le.filter((P) => P.vis).map((P) => {
|
|
6661
|
+
const V = O === P.i;
|
|
6658
6662
|
return /* @__PURE__ */ m("g", { style: { opacity: Ue && !V ? 0.45 : 1 }, children: [
|
|
6659
|
-
/* @__PURE__ */ e("circle", { cx:
|
|
6660
|
-
V && /* @__PURE__ */ e("circle", { cx:
|
|
6663
|
+
/* @__PURE__ */ e("circle", { cx: P.p.x, cy: P.p.y, r: P.r, fill: P.col, className: "select-globe__pulse" }),
|
|
6664
|
+
V && /* @__PURE__ */ e("circle", { cx: P.p.x, cy: P.p.y, r: P.r + 4, fill: "none", stroke: P.col, strokeWidth: 1.5, opacity: 0.6 }),
|
|
6661
6665
|
/* @__PURE__ */ e(
|
|
6662
6666
|
"circle",
|
|
6663
6667
|
{
|
|
6664
|
-
cx:
|
|
6665
|
-
cy:
|
|
6666
|
-
r: V ?
|
|
6667
|
-
fill:
|
|
6668
|
+
cx: P.p.x,
|
|
6669
|
+
cy: P.p.y,
|
|
6670
|
+
r: V ? P.r + 1.5 : P.r,
|
|
6671
|
+
fill: P.col,
|
|
6668
6672
|
className: "select-globe__point",
|
|
6669
6673
|
onPointerEnter: () => {
|
|
6670
|
-
|
|
6671
|
-
x:
|
|
6672
|
-
y:
|
|
6673
|
-
place:
|
|
6674
|
-
title:
|
|
6675
|
-
rows:
|
|
6674
|
+
W(P.i), $.show({
|
|
6675
|
+
x: P.p.x,
|
|
6676
|
+
y: P.p.y - P.r - 4,
|
|
6677
|
+
place: P.p.y < Q ? "bottom" : "top",
|
|
6678
|
+
title: P.label,
|
|
6679
|
+
rows: P.value != null ? [{ label: "Volume", value: o(P.value), color: P.col }] : []
|
|
6676
6680
|
});
|
|
6677
6681
|
},
|
|
6678
6682
|
onPointerLeave: () => {
|
|
6679
|
-
|
|
6683
|
+
W(null), $.hide();
|
|
6680
6684
|
},
|
|
6681
6685
|
onClick: () => {
|
|
6682
|
-
N.current = { lng: -
|
|
6686
|
+
N.current = { lng: -P.lng, lat: s }, Z();
|
|
6683
6687
|
}
|
|
6684
6688
|
}
|
|
6685
6689
|
)
|
|
6686
|
-
] }, `m${
|
|
6690
|
+
] }, `m${P.i}`);
|
|
6687
6691
|
})
|
|
6688
6692
|
] }),
|
|
6689
6693
|
/* @__PURE__ */ e(K, { tip: $.tip })
|
|
6690
6694
|
]
|
|
6691
6695
|
}
|
|
6692
6696
|
),
|
|
6693
|
-
je.length > 0 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: je.map((
|
|
6694
|
-
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background:
|
|
6695
|
-
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children:
|
|
6696
|
-
|
|
6697
|
+
je.length > 0 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: je.map((P, V) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
|
|
6698
|
+
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: P.color ?? d } }),
|
|
6699
|
+
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: P.label }),
|
|
6700
|
+
P.value != null && /* @__PURE__ */ e("span", { className: "select-donut__legval", children: o(P.value) })
|
|
6697
6701
|
] }, V)) })
|
|
6698
6702
|
] });
|
|
6699
6703
|
});
|
|
6700
6704
|
function Bo({ children: t, speed: n = 28, className: l, ...c }) {
|
|
6701
6705
|
const s = q(null), a = q(null), r = q(null), d = Ct(s, 0), o = Ct(r, 0), i = d > 0 && o > d + 1, h = q(0), u = q(null), f = q(!1);
|
|
6702
6706
|
le(() => {
|
|
6703
|
-
var
|
|
6707
|
+
var S;
|
|
6704
6708
|
const x = a.current;
|
|
6705
6709
|
if (!x) return;
|
|
6706
6710
|
if (!i) {
|
|
6707
6711
|
h.current = 0, x.style.transform = "";
|
|
6708
6712
|
return;
|
|
6709
6713
|
}
|
|
6710
|
-
const $ = ((
|
|
6714
|
+
const $ = ((S = window.matchMedia) == null ? void 0 : S.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1;
|
|
6711
6715
|
let _ = 0, p = performance.now();
|
|
6712
6716
|
const b = (k) => {
|
|
6713
6717
|
const M = Math.min(0.1, (k - p) / 1e3);
|
|
@@ -6749,7 +6753,7 @@ function Io({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
6749
6753
|
var A;
|
|
6750
6754
|
const { ref: a, width: r } = ce(n), d = X(), o = te(), [i, h] = D(null), u = { ...Be, right: 44 }, f = [...t].sort((F, B) => B.value - F.value), g = f.length, v = f.reduce((F, B) => F + B.value, 0) || 1;
|
|
6751
6755
|
let y = 0;
|
|
6752
|
-
const x = f.map((F) => (y += F.value, y / v * 100)), $ = Math.max(0, r - u.left - u.right), _ = n - u.top - u.bottom, p = ye(((A = f[0]) == null ? void 0 : A.value) ?? 1), b = g > 0 ? $ / g : 0,
|
|
6756
|
+
const x = f.map((F) => (y += F.value, y / v * 100)), $ = Math.max(0, r - u.left - u.right), _ = n - u.top - u.bottom, p = ye(((A = f[0]) == null ? void 0 : A.value) ?? 1), b = g > 0 ? $ / g : 0, S = Math.min(b * 0.62, 46), k = u.top + _, M = (F) => k - F / p * _, w = (F) => k - F / 100 * _, N = (F) => u.left + b * F + b / 2, C = x.map((F, B) => [N(B), w(F)]), L = j(0), E = j(1);
|
|
6753
6757
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
6754
6758
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", onMouseLeave: () => {
|
|
6755
6759
|
h(null), d.hide();
|
|
@@ -6762,27 +6766,27 @@ function Io({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
6762
6766
|
/* @__PURE__ */ e("line", { x1: u.left, x2: r - u.right, y1: M(F), y2: M(F), className: B === 0 ? "select-chart__axis" : "select-chart__grid" }),
|
|
6763
6767
|
/* @__PURE__ */ e("text", { x: u.left - 8, y: M(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(F) })
|
|
6764
6768
|
] }, B)),
|
|
6765
|
-
[0, 25, 50, 75, 100].map((F, B) => /* @__PURE__ */ m("text", { x: r - 4, y:
|
|
6769
|
+
[0, 25, 50, 75, 100].map((F, B) => /* @__PURE__ */ m("text", { x: r - 4, y: w(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: [
|
|
6766
6770
|
F,
|
|
6767
6771
|
"%"
|
|
6768
6772
|
] }, `r${B}`)),
|
|
6769
|
-
/* @__PURE__ */ e("line", { x1: u.left, x2: r - u.right, y1:
|
|
6773
|
+
/* @__PURE__ */ e("line", { x1: u.left, x2: r - u.right, y1: w(80), y2: w(80), className: "select-chart__crosshair" }),
|
|
6770
6774
|
f.map((F, B) => {
|
|
6771
|
-
const
|
|
6775
|
+
const T = M(F.value);
|
|
6772
6776
|
return /* @__PURE__ */ e(
|
|
6773
6777
|
"rect",
|
|
6774
6778
|
{
|
|
6775
|
-
x: N(B) -
|
|
6776
|
-
y:
|
|
6777
|
-
width:
|
|
6778
|
-
height: Math.max(0, k -
|
|
6779
|
+
x: N(B) - S / 2,
|
|
6780
|
+
y: T,
|
|
6781
|
+
width: S,
|
|
6782
|
+
height: Math.max(0, k - T),
|
|
6779
6783
|
rx: 4,
|
|
6780
6784
|
fill: `url(#${o}-b)`,
|
|
6781
6785
|
className: "select-chart__bar",
|
|
6782
6786
|
onMouseEnter: () => d.show({
|
|
6783
6787
|
x: N(B),
|
|
6784
|
-
y:
|
|
6785
|
-
place:
|
|
6788
|
+
y: T,
|
|
6789
|
+
place: T < u.top + 40 ? "bottom" : "top",
|
|
6786
6790
|
title: F.label,
|
|
6787
6791
|
rows: [
|
|
6788
6792
|
{ label: "Valor", value: l(F.value), color: L },
|
|
@@ -6832,7 +6836,7 @@ const Po = R(function({ segments: n, cols: l = 10, rows: c = 10, format: s = Y,
|
|
|
6832
6836
|
] });
|
|
6833
6837
|
});
|
|
6834
6838
|
function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", height: c, format: s = Y, leftColor: a, rightColor: r, centerWidth: d = 84, className: o, ...i }) {
|
|
6835
|
-
const h = c ?? Math.max(180, t.length * 40 + 36), { ref: u, width: f } = ce(h), g = X(), [v, y] = D(null), x = 8, $ = 26, _ = 8, p = Math.max(1, ...t.flatMap((L) => [L.left, L.right])), b = Math.max(0, (f - d - x * 2) / 2),
|
|
6839
|
+
const h = c ?? Math.max(180, t.length * 40 + 36), { ref: u, width: f } = ce(h), g = X(), [v, y] = D(null), x = 8, $ = 26, _ = 8, p = Math.max(1, ...t.flatMap((L) => [L.left, L.right])), b = Math.max(0, (f - d - x * 2) / 2), S = t.length ? (h - $ - _) / t.length : 0, k = Math.min(S * 0.6, 26), M = x + b, w = x + b + d, N = a ?? j(1), C = r ?? j(0);
|
|
6836
6840
|
return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${o ? " " + o : ""}`, ref: u, children: [
|
|
6837
6841
|
f > 0 && /* @__PURE__ */ m("svg", { width: f, height: h, className: "select-chart", onMouseLeave: () => {
|
|
6838
6842
|
y(null), g.hide();
|
|
@@ -6840,8 +6844,8 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
6840
6844
|
/* @__PURE__ */ e("text", { x, y: 14, className: "select-chart__xlabel", textAnchor: "start", style: { fill: N, fontWeight: 600 }, children: n }),
|
|
6841
6845
|
/* @__PURE__ */ e("text", { x: f - x, y: 14, className: "select-chart__xlabel", textAnchor: "end", style: { fill: C, fontWeight: 600 }, children: l }),
|
|
6842
6846
|
t.map((L, E) => {
|
|
6843
|
-
const A = $ +
|
|
6844
|
-
return /* @__PURE__ */ m("g", { style: { opacity: v === null ||
|
|
6847
|
+
const A = $ + S * E + S / 2, F = L.left / p * b, B = L.right / p * b, T = v === L.label;
|
|
6848
|
+
return /* @__PURE__ */ m("g", { style: { opacity: v === null || T ? 1 : 0.5 }, children: [
|
|
6845
6849
|
/* @__PURE__ */ e(
|
|
6846
6850
|
"rect",
|
|
6847
6851
|
{
|
|
@@ -6863,7 +6867,7 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
6863
6867
|
/* @__PURE__ */ e(
|
|
6864
6868
|
"rect",
|
|
6865
6869
|
{
|
|
6866
|
-
x:
|
|
6870
|
+
x: w,
|
|
6867
6871
|
y: A - k / 2,
|
|
6868
6872
|
width: B,
|
|
6869
6873
|
height: k,
|
|
@@ -6871,14 +6875,14 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
6871
6875
|
fill: C,
|
|
6872
6876
|
className: "select-pyramid__bar select-pyramid__bar--r",
|
|
6873
6877
|
onMouseEnter: () => {
|
|
6874
|
-
y(L.label), g.show({ x:
|
|
6878
|
+
y(L.label), g.show({ x: w + B, y: A - k / 2, place: "top", title: L.label, rows: [{ label: l, value: s(L.right), color: C }] });
|
|
6875
6879
|
},
|
|
6876
6880
|
onMouseLeave: () => {
|
|
6877
6881
|
y(null), g.hide();
|
|
6878
6882
|
}
|
|
6879
6883
|
}
|
|
6880
6884
|
),
|
|
6881
|
-
/* @__PURE__ */ e("text", { x: (M +
|
|
6885
|
+
/* @__PURE__ */ e("text", { x: (M + w) / 2, y: A, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "middle", children: L.label })
|
|
6882
6886
|
] }, L.label);
|
|
6883
6887
|
})
|
|
6884
6888
|
] }),
|
|
@@ -6888,8 +6892,8 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
6888
6892
|
function Do({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
|
|
6889
6893
|
const { ref: r, width: d } = ce(l), o = X(), [i, h] = D(null), u = { top: 16, right: 78, bottom: 28, left: 28 }, f = n.length, g = t.length, v = Math.max(0, d - u.left - u.right), y = l - u.top - u.bottom, x = t.map(() => new Array(f).fill(0));
|
|
6890
6894
|
for (let p = 0; p < f; p++)
|
|
6891
|
-
t.map((
|
|
6892
|
-
x[
|
|
6895
|
+
t.map((S, k) => ({ si: k, v: S.data[p] ?? 0 })).sort((S, k) => k.v - S.v).forEach((S, k) => {
|
|
6896
|
+
x[S.si][p] = k + 1;
|
|
6893
6897
|
});
|
|
6894
6898
|
const $ = (p) => u.left + (f <= 1 ? v / 2 : v / (f - 1) * p), _ = (p) => u.top + (g <= 1 ? y / 2 : y / (g - 1) * (p - 1));
|
|
6895
6899
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
@@ -6898,35 +6902,35 @@ function Do({ series: t, labels: n, height: l = 240, format: c = Y, className: s
|
|
|
6898
6902
|
}, children: [
|
|
6899
6903
|
n.map((p, b) => /* @__PURE__ */ e("text", { x: $(b), y: l - u.bottom + 16, className: "select-chart__xlabel", textAnchor: b === 0 ? "start" : b === f - 1 ? "end" : "middle", children: p }, b)),
|
|
6900
6904
|
t.map((p, b) => {
|
|
6901
|
-
const
|
|
6905
|
+
const S = p.color ?? j(b), k = x[b].map((M, w) => [$(w), _(M)]);
|
|
6902
6906
|
return /* @__PURE__ */ m("g", { style: { opacity: i === null || i === b ? 1 : 0.22 }, children: [
|
|
6903
6907
|
/* @__PURE__ */ e(
|
|
6904
6908
|
"path",
|
|
6905
6909
|
{
|
|
6906
6910
|
d: Ge(k),
|
|
6907
6911
|
fill: "none",
|
|
6908
|
-
stroke:
|
|
6912
|
+
stroke: S,
|
|
6909
6913
|
strokeWidth: i === b ? 3.5 : 2.5,
|
|
6910
6914
|
strokeLinecap: "round",
|
|
6911
6915
|
style: { cursor: "pointer" },
|
|
6912
6916
|
onMouseEnter: () => h(b)
|
|
6913
6917
|
}
|
|
6914
6918
|
),
|
|
6915
|
-
k.map((M,
|
|
6919
|
+
k.map((M, w) => /* @__PURE__ */ e(
|
|
6916
6920
|
"circle",
|
|
6917
6921
|
{
|
|
6918
6922
|
cx: M[0],
|
|
6919
6923
|
cy: M[1],
|
|
6920
6924
|
r: i === b ? 5.5 : 4,
|
|
6921
|
-
fill:
|
|
6925
|
+
fill: S,
|
|
6922
6926
|
className: "select-chart__dot",
|
|
6923
6927
|
onMouseEnter: () => {
|
|
6924
|
-
h(b), o.show({ x: M[0], y: M[1] - 8, place: "top", title: p.name, rows: [{ label: n[
|
|
6928
|
+
h(b), o.show({ x: M[0], y: M[1] - 8, place: "top", title: p.name, rows: [{ label: n[w] ?? "", value: `#${x[b][w]} · ${c(p.data[w] ?? 0)}`, color: S }] });
|
|
6925
6929
|
}
|
|
6926
6930
|
},
|
|
6927
|
-
|
|
6931
|
+
w
|
|
6928
6932
|
)),
|
|
6929
|
-
/* @__PURE__ */ e("text", { x: $(f - 1) + 10, y: _(x[b][f - 1]), className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "start", style: { fill:
|
|
6933
|
+
/* @__PURE__ */ e("text", { x: $(f - 1) + 10, y: _(x[b][f - 1]), className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "start", style: { fill: S, fontWeight: 600 }, children: p.name })
|
|
6930
6934
|
] }, b);
|
|
6931
6935
|
})
|
|
6932
6936
|
] }),
|
|
@@ -6938,8 +6942,8 @@ function To({ axes: t, data: n, height: l = 260, format: c = Y, className: s, ..
|
|
|
6938
6942
|
const p = n.map((b) => b.values[_.key] ?? 0);
|
|
6939
6943
|
return { min: Math.min(...p), max: Math.max(...p) };
|
|
6940
6944
|
}), $ = (_, p) => {
|
|
6941
|
-
const b = x[_],
|
|
6942
|
-
return u.top + g -
|
|
6945
|
+
const b = x[_], S = b.max === b.min ? 0.5 : (p - b.min) / (b.max - b.min);
|
|
6946
|
+
return u.top + g - S * g;
|
|
6943
6947
|
};
|
|
6944
6948
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
6945
6949
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", onMouseLeave: () => {
|
|
@@ -6952,11 +6956,11 @@ function To({ axes: t, data: n, height: l = 260, format: c = Y, className: s, ..
|
|
|
6952
6956
|
/* @__PURE__ */ e("text", { x: y(p), y: u.top + g + 14, className: "select-chart__ylabel", textAnchor: "middle", style: { fontSize: 9 }, children: c(x[p].min) })
|
|
6953
6957
|
] }, _.key)),
|
|
6954
6958
|
n.map((_, p) => {
|
|
6955
|
-
const b = _.color ?? j(p),
|
|
6959
|
+
const b = _.color ?? j(p), S = t.map((k, M) => `${M ? "L" : "M"}${y(M).toFixed(1)},${$(M, _.values[k.key] ?? 0).toFixed(1)}`).join("");
|
|
6956
6960
|
return /* @__PURE__ */ e(
|
|
6957
6961
|
"path",
|
|
6958
6962
|
{
|
|
6959
|
-
d:
|
|
6963
|
+
d: S,
|
|
6960
6964
|
fill: "none",
|
|
6961
6965
|
stroke: b,
|
|
6962
6966
|
strokeWidth: i === p ? 3 : 1.75,
|
|
@@ -6993,11 +6997,11 @@ function Nl(t, n = 0) {
|
|
|
6993
6997
|
function Wo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
6994
6998
|
const { ref: a, width: r } = ce(n), d = X(), [o, i] = D(null), h = Nl(t), u = n / (h + 1), f = [], g = (v, y, x, $, _) => {
|
|
6995
6999
|
if (f.push({ node: v, x0: y, x1: x, depth: $, color: v.color ?? j(_), value: Mt(v) }), v.children && v.children.length) {
|
|
6996
|
-
const p = v.children.reduce((
|
|
7000
|
+
const p = v.children.reduce((S, k) => S + Mt(k), 0) || 1;
|
|
6997
7001
|
let b = y;
|
|
6998
|
-
v.children.forEach((
|
|
6999
|
-
const M = (x - y) * Mt(
|
|
7000
|
-
g(
|
|
7002
|
+
v.children.forEach((S, k) => {
|
|
7003
|
+
const M = (x - y) * Mt(S) / p;
|
|
7004
|
+
g(S, b, b + M, $ + 1, $ === 0 ? k : _), b += M;
|
|
7001
7005
|
});
|
|
7002
7006
|
}
|
|
7003
7007
|
};
|
|
@@ -7040,12 +7044,12 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
|
|
|
7040
7044
|
if (a > 0) {
|
|
7041
7045
|
const u = [];
|
|
7042
7046
|
let f = 0, g = 0;
|
|
7043
|
-
const v = (p, b,
|
|
7047
|
+
const v = (p, b, S, k) => {
|
|
7044
7048
|
g = Math.max(g, b);
|
|
7045
|
-
const M = { node: p, depth: b, yUnit: 0, ci:
|
|
7049
|
+
const M = { node: p, depth: b, yUnit: 0, ci: S, parent: k };
|
|
7046
7050
|
if (p.children && p.children.length) {
|
|
7047
|
-
const
|
|
7048
|
-
M.yUnit = (
|
|
7051
|
+
const w = p.children.map((N, C) => v(N, b + 1, b === 0 ? C : S, M));
|
|
7052
|
+
M.yUnit = (w[0].yUnit + w[w.length - 1].yUnit) / 2;
|
|
7049
7053
|
} else
|
|
7050
7054
|
M.yUnit = f, f++;
|
|
7051
7055
|
return u.push(M), M;
|
|
@@ -7066,7 +7070,7 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
|
|
|
7066
7070
|
) : null
|
|
7067
7071
|
),
|
|
7068
7072
|
u.map((p, b) => {
|
|
7069
|
-
const
|
|
7073
|
+
const S = p.node.color ?? j(p.ci), k = $(p.depth), M = _(p.yUnit), w = !p.node.children || !p.node.children.length;
|
|
7070
7074
|
return /* @__PURE__ */ m("g", { style: { opacity: d === null || d === b ? 1 : 0.4 }, children: [
|
|
7071
7075
|
/* @__PURE__ */ e(
|
|
7072
7076
|
"circle",
|
|
@@ -7074,7 +7078,7 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
|
|
|
7074
7078
|
cx: k,
|
|
7075
7079
|
cy: M,
|
|
7076
7080
|
r: d === b ? 6 : 4.5,
|
|
7077
|
-
fill:
|
|
7081
|
+
fill: S,
|
|
7078
7082
|
className: "select-tree__node",
|
|
7079
7083
|
onMouseEnter: () => {
|
|
7080
7084
|
o(b), r.show({ x: k, y: M - 8, place: "top", title: p.node.label, rows: [] });
|
|
@@ -7087,11 +7091,11 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
|
|
|
7087
7091
|
/* @__PURE__ */ e(
|
|
7088
7092
|
"text",
|
|
7089
7093
|
{
|
|
7090
|
-
x:
|
|
7091
|
-
y:
|
|
7094
|
+
x: w ? k + 9 : k,
|
|
7095
|
+
y: w ? M : M - 9,
|
|
7092
7096
|
className: "select-chart__xlabel",
|
|
7093
7097
|
dominantBaseline: "middle",
|
|
7094
|
-
textAnchor:
|
|
7098
|
+
textAnchor: w ? "start" : "middle",
|
|
7095
7099
|
children: p.node.label
|
|
7096
7100
|
}
|
|
7097
7101
|
)
|
|
@@ -7162,13 +7166,13 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7162
7166
|
let C = 0, L = 0, E = null;
|
|
7163
7167
|
for (let A = 0; A < 8e3; A++) {
|
|
7164
7168
|
const F = Math.cos(C) * L, B = Math.sin(C) * L;
|
|
7165
|
-
let
|
|
7166
|
-
for (const
|
|
7167
|
-
if (Math.hypot(F -
|
|
7168
|
-
|
|
7169
|
+
let T = !0;
|
|
7170
|
+
for (const I of f)
|
|
7171
|
+
if (Math.hypot(F - I.x, B - I.y) < I.r + N.r + 2) {
|
|
7172
|
+
T = !1;
|
|
7169
7173
|
break;
|
|
7170
7174
|
}
|
|
7171
|
-
if (
|
|
7175
|
+
if (T) {
|
|
7172
7176
|
E = [F, B];
|
|
7173
7177
|
break;
|
|
7174
7178
|
}
|
|
@@ -7176,7 +7180,7 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7176
7180
|
}
|
|
7177
7181
|
E && f.push({ d: N.d, i: N.i, x: E[0], y: E[1], r: N.r });
|
|
7178
7182
|
}
|
|
7179
|
-
const g = Math.min(...f.map((N) => N.x - N.r)), v = Math.max(...f.map((N) => N.x + N.r)), y = Math.min(...f.map((N) => N.y - N.r)), x = Math.max(...f.map((N) => N.y + N.r)), $ = v - g || 1, _ = x - y || 1, p = 8, b = Math.min((l - p * 2) / $, (l - p * 2) / _),
|
|
7183
|
+
const g = Math.min(...f.map((N) => N.x - N.r)), v = Math.max(...f.map((N) => N.x + N.r)), y = Math.min(...f.map((N) => N.y - N.r)), x = Math.max(...f.map((N) => N.y + N.r)), $ = v - g || 1, _ = x - y || 1, p = 8, b = Math.min((l - p * 2) / $, (l - p * 2) / _), S = (l - $ * b) / 2 - g * b, k = (l - _ * b) / 2 - y * b, M = (N) => N * b + S, w = (N) => N * b + k;
|
|
7180
7184
|
return /* @__PURE__ */ m("div", { ref: r, ...a, className: `select-donut-wrap${s ? " " + s : ""}`, children: [
|
|
7181
7185
|
/* @__PURE__ */ e("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: /* @__PURE__ */ e("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", onMouseLeave: () => {
|
|
7182
7186
|
i(null), d.hide();
|
|
@@ -7187,7 +7191,7 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7187
7191
|
"circle",
|
|
7188
7192
|
{
|
|
7189
7193
|
cx: M(N.x),
|
|
7190
|
-
cy:
|
|
7194
|
+
cy: w(N.y),
|
|
7191
7195
|
r: L,
|
|
7192
7196
|
fill: C,
|
|
7193
7197
|
fillOpacity: 0.3,
|
|
@@ -7195,14 +7199,14 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7195
7199
|
strokeWidth: 1.5,
|
|
7196
7200
|
className: "select-pack__circle",
|
|
7197
7201
|
onMouseEnter: () => {
|
|
7198
|
-
i(N.i), d.show({ x: M(N.x), y:
|
|
7202
|
+
i(N.i), d.show({ x: M(N.x), y: w(N.y) - L, place: w(N.y) - L < 40 ? "bottom" : "top", title: N.d.label, rows: [{ label: "Valor", value: c(N.d.value), color: C }] });
|
|
7199
7203
|
},
|
|
7200
7204
|
onMouseLeave: () => {
|
|
7201
7205
|
i(null), d.hide();
|
|
7202
7206
|
}
|
|
7203
7207
|
}
|
|
7204
7208
|
),
|
|
7205
|
-
L > 18 && /* @__PURE__ */ e("text", { x: M(N.x), y:
|
|
7209
|
+
L > 18 && /* @__PURE__ */ e("text", { x: M(N.x), y: w(N.y), className: "select-chart__xlabel", textAnchor: "middle", dominantBaseline: "middle", style: { fontWeight: 600 }, children: N.d.label })
|
|
7206
7210
|
] }, N.i);
|
|
7207
7211
|
}) }) }),
|
|
7208
7212
|
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
@@ -7217,25 +7221,25 @@ function Vo({ nodes: t, links: n, height: l = 300, format: c = Y, className: s,
|
|
|
7217
7221
|
x: v / 2 + Math.cos(M / x * 2 * Math.PI) * v * 0.3,
|
|
7218
7222
|
y: y / 2 + Math.sin(M / x * 2 * Math.PI) * y * 0.3
|
|
7219
7223
|
})), p = new Map(t.map((k, M) => [k.id, M])), b = Math.sqrt(v * y / x) * 0.55;
|
|
7220
|
-
let
|
|
7224
|
+
let S = v * 0.12;
|
|
7221
7225
|
for (let k = 0; k < 320; k++) {
|
|
7222
7226
|
const M = _.map(() => ({ x: 0, y: 0 }));
|
|
7223
|
-
for (let
|
|
7224
|
-
for (let N =
|
|
7225
|
-
const C = _[
|
|
7226
|
-
M[
|
|
7227
|
+
for (let w = 0; w < x; w++)
|
|
7228
|
+
for (let N = w + 1; N < x; N++) {
|
|
7229
|
+
const C = _[w].x - _[N].x, L = _[w].y - _[N].y, E = Math.hypot(C, L) || 0.01, A = b * b / E;
|
|
7230
|
+
M[w].x += C / E * A, M[w].y += L / E * A, M[N].x -= C / E * A, M[N].y -= L / E * A;
|
|
7227
7231
|
}
|
|
7228
|
-
for (const
|
|
7229
|
-
const N = p.get(
|
|
7232
|
+
for (const w of n) {
|
|
7233
|
+
const N = p.get(w.source), C = p.get(w.target);
|
|
7230
7234
|
if (N == null || C == null) continue;
|
|
7231
7235
|
const L = _[N].x - _[C].x, E = _[N].y - _[C].y, A = Math.hypot(L, E) || 0.01, F = A * A / b;
|
|
7232
7236
|
M[N].x -= L / A * F, M[N].y -= E / A * F, M[C].x += L / A * F, M[C].y += E / A * F;
|
|
7233
7237
|
}
|
|
7234
|
-
for (let
|
|
7235
|
-
const N = M[
|
|
7236
|
-
_[
|
|
7238
|
+
for (let w = 0; w < x; w++) {
|
|
7239
|
+
const N = M[w].x, C = M[w].y, L = Math.hypot(N, C) || 0.01, E = Math.min(L, S);
|
|
7240
|
+
_[w].x = Math.max(18, Math.min(v - 18, _[w].x + N / L * E)), _[w].y = Math.max(18, Math.min(y - 18, _[w].y + C / L * E));
|
|
7237
7241
|
}
|
|
7238
|
-
|
|
7242
|
+
S *= 0.97;
|
|
7239
7243
|
}
|
|
7240
7244
|
return _.forEach((k) => $.set(k.id, { x: k.x, y: k.y })), $;
|
|
7241
7245
|
}, [t, n, d, l]), f = /* @__PURE__ */ new Map();
|
|
@@ -7298,13 +7302,13 @@ function Bs({ children: t }) {
|
|
|
7298
7302
|
return /* @__PURE__ */ e("div", { className: "select-combobox__list", ref: n, children: t });
|
|
7299
7303
|
}
|
|
7300
7304
|
const Zo = R(function({ label: n, value: l, onChange: c, options: s, placeholder: a = "Selecionar…", searchPlaceholder: r = "Buscar…", labelAction: d, hint: o, error: i, emptyText: h = "Nenhum resultado", disabled: u, required: f, size: g = "md", searchable: v = !0, className: y, ...x }, $) {
|
|
7301
|
-
const _ = te(), [p, b] = D(!1), [
|
|
7302
|
-
const E =
|
|
7305
|
+
const _ = te(), [p, b] = D(!1), [S, k] = D(""), M = s.find((E) => E.value === l), w = xe(() => {
|
|
7306
|
+
const E = S.trim().toLowerCase();
|
|
7303
7307
|
return !v || !E ? s : s.filter((A) => {
|
|
7304
7308
|
var F;
|
|
7305
7309
|
return A.label.toLowerCase().includes(E) || ((F = A.secondary) == null ? void 0 : F.toLowerCase().includes(E));
|
|
7306
7310
|
});
|
|
7307
|
-
}, [s,
|
|
7311
|
+
}, [s, S, v]), N = () => {
|
|
7308
7312
|
b(!1), k("");
|
|
7309
7313
|
}, C = (E) => {
|
|
7310
7314
|
c(E), N();
|
|
@@ -7346,13 +7350,13 @@ const Zo = R(function({ label: n, value: l, onChange: c, options: s, placeholder
|
|
|
7346
7350
|
{
|
|
7347
7351
|
className: "select-combobox__searchinput",
|
|
7348
7352
|
type: "text",
|
|
7349
|
-
value:
|
|
7353
|
+
value: S,
|
|
7350
7354
|
onChange: (E) => k(E.target.value),
|
|
7351
7355
|
placeholder: r,
|
|
7352
7356
|
autoFocus: !0
|
|
7353
7357
|
}
|
|
7354
7358
|
) }),
|
|
7355
|
-
/* @__PURE__ */ e(Bs, { children:
|
|
7359
|
+
/* @__PURE__ */ e(Bs, { children: w.length === 0 ? /* @__PURE__ */ e("div", { className: "select-combobox__empty", children: h }) : w.map((E) => {
|
|
7356
7360
|
const A = E.value === l;
|
|
7357
7361
|
return /* @__PURE__ */ m(
|
|
7358
7362
|
"button",
|
|
@@ -7699,12 +7703,12 @@ function Os(t) {
|
|
|
7699
7703
|
return n = n % 12 || 12, `${n} : ${String(t.getMinutes()).padStart(2, "0")} ${l}`;
|
|
7700
7704
|
}
|
|
7701
7705
|
const Hs = R(function({ value: n, presets: l = Ds, onApply: c, onCancel: s, accentVar: a, locale: r = "en-US", showTime: d = !0, maxDate: o, embedded: i = !1, className: h, ...u }, f) {
|
|
7702
|
-
const g = Rs[r], v = Re(/* @__PURE__ */ new Date()), y = o ? Re(o) : null, [x, $] = D(n ?? { from: v, to: v }), [_, p] = D(xt((n == null ? void 0 : n.from) ?? /* @__PURE__ */ new Date())), [b,
|
|
7703
|
-
|
|
7706
|
+
const g = Rs[r], v = Re(/* @__PURE__ */ new Date()), y = o ? Re(o) : null, [x, $] = D(n ?? { from: v, to: v }), [_, p] = D(xt((n == null ? void 0 : n.from) ?? /* @__PURE__ */ new Date())), [b, S] = D(null), k = At(xt(_), -xt(_).getDay()), M = Array.from({ length: 42 }, (A, F) => At(k, F)), w = (A) => y ? Re(A) > y : !1, N = (A) => A ? g.formatDate(A) : /* @__PURE__ */ e("span", { className: "select-datepicker__placeholder", children: "— / — / ——" }), C = (A) => {
|
|
7707
|
+
w(A) || (S(null), $((F) => !F.from || F.from && F.to ? { from: A, to: null } : A < Re(F.from) ? { from: A, to: null } : { from: F.from, to: A }));
|
|
7704
7708
|
}, L = (A) => {
|
|
7705
7709
|
if (A.disabled || !A.range) return;
|
|
7706
7710
|
const F = A.range();
|
|
7707
|
-
$(F),
|
|
7711
|
+
$(F), S(A.id), F.from && p(xt(F.from));
|
|
7708
7712
|
}, E = a ? { "--select-dp-accent": `var(${a})` } : void 0;
|
|
7709
7713
|
return /* @__PURE__ */ e("div", { ref: f, ...u, className: `select select-datepicker${i ? " select-datepicker--bare" : ""}${h ? " " + h : ""}`, style: E, children: /* @__PURE__ */ m("div", { className: "select-datepicker__body", children: [
|
|
7710
7714
|
/* @__PURE__ */ e("div", { className: "select-datepicker__presets", role: "listbox", "aria-label": "Intervalos", children: l.map((A) => {
|
|
@@ -7762,7 +7766,7 @@ const Hs = R(function({ value: n, presets: l = Ds, onApply: c, onCancel: s, acce
|
|
|
7762
7766
|
/* @__PURE__ */ m("div", { className: "select-datepicker__grid", role: "grid", children: [
|
|
7763
7767
|
g.weekdays.map((A, F) => /* @__PURE__ */ e("div", { className: "select-datepicker__weekday", children: A }, F)),
|
|
7764
7768
|
M.map((A) => {
|
|
7765
|
-
const F = A.getMonth() !== _.getMonth(), B =
|
|
7769
|
+
const F = A.getMonth() !== _.getMonth(), B = w(A), T = !!x.from && yt(A, x.from), I = !!x.to && yt(A, x.to), O = T || I, W = !!x.from && !!x.to && !yt(x.from, x.to), G = "select-datepicker__day" + (!!x.from && !!x.to && A > Re(x.from) && A < Re(x.to) ? " select-datepicker__day--in-range" : "") + (W && T ? " select-datepicker__day--range-start" : "") + (W && I ? " select-datepicker__day--range-end" : ""), J = "select-datepicker__daybtn" + (O ? " is-selected" : "") + (yt(A, v) && !O ? " is-today" : "") + (F ? " is-outside" : "");
|
|
7766
7770
|
return /* @__PURE__ */ e("div", { className: G, children: /* @__PURE__ */ e("button", { type: "button", className: J, disabled: B, onClick: () => C(A), children: A.getDate() }) }, A.getTime());
|
|
7767
7771
|
})
|
|
7768
7772
|
] }),
|
|
@@ -7859,11 +7863,11 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
|
|
|
7859
7863
|
) : /* @__PURE__ */ e("span", { children: $ }, y);
|
|
7860
7864
|
}) });
|
|
7861
7865
|
}), sr = R(function({ label: n, value: l, onChange: c, min: s, max: a, step: r = 1, decimal: d = !1, disabled: o = !1, hint: i, error: h, onBlur: u, placeholder: f, size: g = "md", className: v, ...y }, x) {
|
|
7862
|
-
const $ = te(), _ = (F) => Math.min(a ?? 1 / 0, Math.max(s ?? -1 / 0, F)), p = (F) => Math.round(F * 1e6) / 1e6, b = l ?? 0,
|
|
7866
|
+
const $ = te(), _ = (F) => Math.min(a ?? 1 / 0, Math.max(s ?? -1 / 0, F)), p = (F) => Math.round(F * 1e6) / 1e6, b = l ?? 0, S = s != null && b <= s, k = a != null && b >= a, [M, w] = D(!1), [N, C] = D(""), L = d && M ? N : l == null ? "" : String(l), E = (F) => {
|
|
7863
7867
|
const B = d ? F.replace(/[^\d.,-]/g, "").replace(",", ".") : F.replace(/[^\d-]/g, "");
|
|
7864
7868
|
if (d && C(B), B === "" || B === "-" || B === ".") return c(null);
|
|
7865
|
-
const
|
|
7866
|
-
Number.isFinite(
|
|
7869
|
+
const T = Number(B);
|
|
7870
|
+
Number.isFinite(T) && c(_(T));
|
|
7867
7871
|
}, A = (F) => {
|
|
7868
7872
|
const B = _(p(b + F));
|
|
7869
7873
|
d && C(String(B)), c(B);
|
|
@@ -7878,7 +7882,7 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
|
|
|
7878
7882
|
size: g,
|
|
7879
7883
|
icon: /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "select-numfield__minus", children: "−" }),
|
|
7880
7884
|
label: "Diminuir",
|
|
7881
|
-
disabled: o ||
|
|
7885
|
+
disabled: o || S,
|
|
7882
7886
|
onClick: () => A(-r)
|
|
7883
7887
|
}
|
|
7884
7888
|
),
|
|
@@ -7895,10 +7899,10 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
|
|
|
7895
7899
|
value: L,
|
|
7896
7900
|
onChange: (F) => E(F.target.value),
|
|
7897
7901
|
onFocus: () => {
|
|
7898
|
-
|
|
7902
|
+
w(!0), C(l == null ? "" : String(l));
|
|
7899
7903
|
},
|
|
7900
7904
|
onBlur: () => {
|
|
7901
|
-
|
|
7905
|
+
w(!1), u == null || u();
|
|
7902
7906
|
},
|
|
7903
7907
|
"aria-invalid": h ? !0 : void 0
|
|
7904
7908
|
}
|
|
@@ -7932,11 +7936,11 @@ function ar({
|
|
|
7932
7936
|
emptyState: h,
|
|
7933
7937
|
helpText: u
|
|
7934
7938
|
}) {
|
|
7935
|
-
const f = d == null || t.length < d, g = t.length > r, v = (_, p) => n(t.map((b,
|
|
7939
|
+
const f = d == null || t.length < d, g = t.length > r, v = (_, p) => n(t.map((b, S) => S === _ ? p : b)), y = (_) => n(t.filter((p, b) => b !== _)), x = (_, p) => {
|
|
7936
7940
|
const b = _ + p;
|
|
7937
7941
|
if (b < 0 || b >= t.length) return;
|
|
7938
|
-
const
|
|
7939
|
-
|
|
7942
|
+
const S = t.slice(), k = S[_];
|
|
7943
|
+
S[_] = S[b], S[b] = k, n(S);
|
|
7940
7944
|
}, $ = (_, p) => ({
|
|
7941
7945
|
index: p,
|
|
7942
7946
|
isFirst: p === 0,
|