@selectwin/kit 0.1.55 → 0.1.56
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/SelectField.d.ts +10 -0
- package/dist/index.js +424 -421
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m, Fragment as ae } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as Y, useEffect as te, forwardRef as P, useState as T, useId as ne, useLayoutEffect as Ee, useMemo as
|
|
3
|
-
import
|
|
2
|
+
import { useRef as Y, useEffect as te, forwardRef as P, useState as T, useId as ne, useLayoutEffect as Ee, useMemo as xe, useCallback as Fe, Fragment as qt, Children as El, useContext as zt, createContext as Xt } from "react";
|
|
3
|
+
import we from "gsap";
|
|
4
4
|
import { createPortal as Et } from "react-dom";
|
|
5
5
|
import { Link as Bl, useNavigate as Fl } from "react-router-dom";
|
|
6
6
|
const on = (t, n, l) => t < n ? n : t > l ? l : t;
|
|
@@ -31,62 +31,62 @@ function ha({ className: t, theme: n, glowTarget: l }) {
|
|
|
31
31
|
const o = ((Q = window.matchMedia) == null ? void 0 : Q.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, i = n === "dark", r = 30, d = 1.2, h = 160, u = 8, f = 2.9, g = 0.32, v = 1.4, x = 18, N = Math.PI * 2, k = getComputedStyle(s), [_, p, b] = Il(k, "--select-dot", i ? [235, 238, 255] : [64, 68, 92]), [S, $, M] = Pl(k.getPropertyValue("--select-primary"), i ? [255, 255, 255] : [33, 37, 41]);
|
|
32
32
|
let w = 0, y = 0, C = [], L = 0, B = 0, A = null, E = 0;
|
|
33
33
|
const F = { x: 0, y: 0 };
|
|
34
|
-
let W = 0, Z = 0,
|
|
35
|
-
const
|
|
36
|
-
function
|
|
34
|
+
let W = 0, Z = 0, D = -10;
|
|
35
|
+
const R = we.quickTo(F, "x", { duration: 0.5, ease: "power3.out" }), O = we.quickTo(F, "y", { duration: 0.5, ease: "power3.out" });
|
|
36
|
+
function U() {
|
|
37
37
|
const X = s.getBoundingClientRect();
|
|
38
38
|
L = X.left, B = X.top, w = X.width, y = X.height;
|
|
39
|
-
const
|
|
40
|
-
s.width = Math.round(w *
|
|
41
|
-
const
|
|
42
|
-
A = l ?
|
|
43
|
-
const
|
|
44
|
-
for (let
|
|
45
|
-
for (let Le = 0; Le <
|
|
46
|
-
const
|
|
47
|
-
C.push({ x:
|
|
39
|
+
const ue = Math.min(window.devicePixelRatio || 1, 2);
|
|
40
|
+
s.width = Math.round(w * ue), s.height = Math.round(y * ue), a.setTransform(ue, 0, 0, ue, 0, 0);
|
|
41
|
+
const ve = s.closest(".select-auth") ?? document;
|
|
42
|
+
A = l ? ve.querySelector(l) : null, C = [];
|
|
43
|
+
const he = Math.ceil(w / r) + 1, ce = Math.ceil(y / r) + 1, pe = (w - (he - 1) * r) / 2, Me = (y - (ce - 1) * r) / 2;
|
|
44
|
+
for (let me = 0; me < ce; me++)
|
|
45
|
+
for (let Le = 0; Le < he; Le++) {
|
|
46
|
+
const $e = pe + Le * r, Pe = Me + me * r;
|
|
47
|
+
C.push({ x: $e, y: Pe, phase: ($e + Pe) * 0.013 });
|
|
48
48
|
}
|
|
49
49
|
F.x === 0 && F.y === 0 && (F.x = W = w / 2, F.y = Z = y / 2);
|
|
50
50
|
}
|
|
51
|
-
function q(X,
|
|
51
|
+
function q(X, ue, ve, he, ce) {
|
|
52
52
|
if (!A) return;
|
|
53
|
-
const
|
|
53
|
+
const pe = A.getBoundingClientRect(), Me = pe.left - L + pe.width / 2, me = pe.top - B + pe.height / 2, Le = pe.width / 2, $e = pe.height / 2, Pe = (X - Me) / (Le + x), ke = (ue - me) / ($e + x), Ue = Math.sqrt(Pe * Pe + ke * ke), He = Ue < 1 ? 1 - Ue : 0, Be = He * He * (3 - 2 * He);
|
|
54
54
|
if (Be > 1e-3 || E > 1e-3) {
|
|
55
|
-
const I = on((X -
|
|
56
|
-
A.style.setProperty("--select-card-glow", Be.toFixed(3)), A.style.setProperty("--select-card-glow-rgb", `${
|
|
55
|
+
const I = on((X - Me) / Math.max(Le, 1), -1, 1) * 10 * Be, V = on((ue - me) / Math.max($e, 1), -1, 1) * 10 * Be;
|
|
56
|
+
A.style.setProperty("--select-card-glow", Be.toFixed(3)), A.style.setProperty("--select-card-glow-rgb", `${ve}, ${he}, ${ce}`), A.style.setProperty("--select-card-glow-x", `${I.toFixed(1)}px`), A.style.setProperty("--select-card-glow-y", `${V.toFixed(1)}px`);
|
|
57
57
|
}
|
|
58
58
|
E = Be;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function oe() {
|
|
61
61
|
a.clearRect(0, 0, w, y), a.fillStyle = `rgba(${_},${p},${b},${g})`;
|
|
62
62
|
for (const X of C)
|
|
63
63
|
a.beginPath(), a.arc(X.x, X.y, d, 0, N), a.fill();
|
|
64
64
|
A == null || A.style.setProperty("--select-card-glow", "0");
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
let
|
|
68
|
-
X -
|
|
69
|
-
const
|
|
66
|
+
function _e(X) {
|
|
67
|
+
let ue, ve;
|
|
68
|
+
X - D < v ? (ue = W, ve = Z) : (ue = w * 0.5 + Math.cos(X * 0.45) * w * 0.3, ve = y * 0.5 + Math.sin(X * 0.6) * y * 0.28), R(ue), O(ve);
|
|
69
|
+
const he = F.x, ce = F.y;
|
|
70
70
|
a.clearRect(0, 0, w, y);
|
|
71
|
-
for (let
|
|
72
|
-
const
|
|
73
|
-
|
|
71
|
+
for (let pe = 0; pe < C.length; pe++) {
|
|
72
|
+
const Me = C[pe], me = Me.x - he, Le = Me.y - ce, $e = Math.sqrt(me * me + Le * Le), Pe = $e < h ? 1 - $e / h : 0, ke = Pe * Pe, Ue = Math.sin(X * 1.4 + Me.phase) * 0.5 + 0.5, He = ke * u, Be = $e > 1e-4 ? 1 / $e : 0, I = Me.x - me * Be * He, V = Me.y - Le * Be * He, G = 1 + ke * (f - 1) + Ue * 0.14, re = Math.min(1, g + Ue * 0.08 + ke * (1 - g)), ee = _ + (S - _) * ke | 0, se = p + ($ - p) * ke | 0, de = b + (M - b) * ke | 0;
|
|
73
|
+
ke > 0.12 ? (a.shadowColor = `rgba(${S},${$},${M},${0.6 * ke})`, a.shadowBlur = 12 * ke) : a.shadowBlur = 0, a.beginPath(), a.arc(I, V, d * G, 0, N), a.fillStyle = `rgba(${ee},${se},${de},${re})`, a.fill();
|
|
74
74
|
}
|
|
75
|
-
a.shadowBlur = 0, q(
|
|
75
|
+
a.shadowBlur = 0, q(he, ce, S, $, M);
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
W = X.clientX - L, Z = X.clientY - B,
|
|
77
|
+
function Ce(X) {
|
|
78
|
+
W = X.clientX - L, Z = X.clientY - B, D = we.ticker.time;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function ie() {
|
|
81
81
|
const X = s.getBoundingClientRect();
|
|
82
82
|
L = X.left, B = X.top;
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
U();
|
|
85
85
|
const H = new ResizeObserver(() => {
|
|
86
|
-
|
|
86
|
+
U(), o && oe();
|
|
87
87
|
});
|
|
88
|
-
return H.observe(s), o ? (
|
|
89
|
-
|
|
88
|
+
return H.observe(s), o ? (oe(), () => H.disconnect()) : (window.addEventListener("pointermove", Ce, { passive: !0 }), window.addEventListener("scroll", ie, { passive: !0 }), we.ticker.add(_e), () => {
|
|
89
|
+
we.ticker.remove(_e), we.killTweensOf(F), window.removeEventListener("pointermove", Ce), window.removeEventListener("scroll", ie), H.disconnect(), A == null || A.style.removeProperty("--select-card-glow");
|
|
90
90
|
});
|
|
91
91
|
}, [n, l]), /* @__PURE__ */ e("canvas", { ref: c, className: t, "aria-hidden": "true" });
|
|
92
92
|
}
|
|
@@ -124,8 +124,8 @@ const Tl = (t) => {
|
|
|
124
124
|
g.clearRect(0, 0, S, $);
|
|
125
125
|
const M = v.x, w = v.y;
|
|
126
126
|
for (const y of i) {
|
|
127
|
-
const C = y.x - M, L = y.y - w, B = Math.hypot(C, L), A = f > 0 && B < 150 ? 1 - B / 150 : 0, E = A * A * f, F = Math.sin(u * 1.1 + y.phase) * 0.5 + 0.5, W = E * 6, Z = B > 1e-3 ? 1 / B : 0,
|
|
128
|
-
t.dark && E > 0.14 ? (g.shadowColor = `rgba(${_},${p},${b},${0.5 * E})`, g.shadowBlur = 10 * E) : g.shadowBlur = 0, g.beginPath(), g.arc(
|
|
127
|
+
const C = y.x - M, L = y.y - w, B = Math.hypot(C, L), A = f > 0 && B < 150 ? 1 - B / 150 : 0, E = A * A * f, F = Math.sin(u * 1.1 + y.phase) * 0.5 + 0.5, W = E * 6, Z = B > 1e-3 ? 1 / B : 0, D = y.x - C * Z * W, R = y.y - L * Z * W, O = 1 + E * (2.4 - 1) + F * 0.1, U = Math.min(1, 0.3 + F * 0.06 + E * (1 - 0.3)), q = x + (_ - x) * E | 0, oe = N + (p - N) * E | 0, _e = k + (b - k) * E | 0;
|
|
128
|
+
t.dark && E > 0.14 ? (g.shadowColor = `rgba(${_},${p},${b},${0.5 * E})`, g.shadowBlur = 10 * E) : g.shadowBlur = 0, g.beginPath(), g.arc(D, R, 1.2 * O, 0, nt), g.fillStyle = `rgba(${q},${oe},${_e},${U})`, g.fill();
|
|
129
129
|
}
|
|
130
130
|
g.shadowBlur = 0;
|
|
131
131
|
}
|
|
@@ -211,12 +211,12 @@ const Tl = (t) => {
|
|
|
211
211
|
const E = i + A * 44;
|
|
212
212
|
let F = B;
|
|
213
213
|
if (f) {
|
|
214
|
-
const
|
|
215
|
-
|
|
214
|
+
const R = Math.hypot(E - M, C - w);
|
|
215
|
+
R < 120 && (F = Math.max(F, (1 - R / 120) ** 2));
|
|
216
216
|
}
|
|
217
217
|
if (F < 0.02) continue;
|
|
218
|
-
const W = x + (_ - x) * F | 0, Z = N + (p - N) * F | 0,
|
|
219
|
-
g.beginPath(), g.arc(E, C, 1 + F * 2.2, 0, nt), g.fillStyle = `rgba(${W},${Z},${
|
|
218
|
+
const W = x + (_ - x) * F | 0, Z = N + (p - N) * F | 0, D = k + (b - k) * F | 0;
|
|
219
|
+
g.beginPath(), g.arc(E, C, 1 + F * 2.2, 0, nt), g.fillStyle = `rgba(${W},${Z},${D},${0.3 + F * 0.6})`, g.fill();
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
}
|
|
@@ -381,46 +381,46 @@ function ma({
|
|
|
381
381
|
let f = 0, g = 0, v = 0, x = 0, N = null, k = 0;
|
|
382
382
|
const _ = 1.2, p = { x: 0, y: 0 }, b = { x: 0, y: 0, active: !1 };
|
|
383
383
|
let S = 0, $ = 0, M = -10;
|
|
384
|
-
const w =
|
|
385
|
-
function C(
|
|
384
|
+
const w = we.quickTo(p, "x", { duration: 0.5, ease: "power3.out" }), y = we.quickTo(p, "y", { duration: 0.5, ease: "power3.out" });
|
|
385
|
+
function C(U, q) {
|
|
386
386
|
if (!N) return;
|
|
387
|
-
const
|
|
388
|
-
if (
|
|
389
|
-
const
|
|
390
|
-
N.style.setProperty("--select-card-glow",
|
|
387
|
+
const oe = N.getBoundingClientRect(), _e = oe.left - v + oe.width / 2, Ce = oe.top - x + oe.height / 2, ie = oe.width / 2, H = oe.height / 2, Q = 18, X = (U - _e) / (ie + Q), ue = (q - Ce) / (H + Q), ve = Math.sqrt(X * X + ue * ue), he = ve < 1 ? 1 - ve : 0, ce = he * he * (3 - 2 * he);
|
|
388
|
+
if (ce > 1e-3 || k > 1e-3) {
|
|
389
|
+
const pe = qe((U - _e) / Math.max(ie, 1), -1, 1) * 10 * ce, Me = qe((q - Ce) / Math.max(H, 1), -1, 1) * 10 * ce;
|
|
390
|
+
N.style.setProperty("--select-card-glow", ce.toFixed(3)), N.style.setProperty("--select-card-glow-rgb", `${u[0]}, ${u[1]}, ${u[2]}`), N.style.setProperty("--select-card-glow-x", `${pe.toFixed(1)}px`), N.style.setProperty("--select-card-glow-y", `${Me.toFixed(1)}px`);
|
|
391
391
|
}
|
|
392
|
-
k =
|
|
392
|
+
k = ce;
|
|
393
393
|
}
|
|
394
394
|
function L() {
|
|
395
395
|
k > 1e-3 && (N == null || N.style.setProperty("--select-card-glow", "0")), k = 0;
|
|
396
396
|
}
|
|
397
397
|
const B = { ctx: o, w: () => f, h: () => g, ink: h, accent: u, dark: r, pointer: b, cardGlow: C, clearGlow: L }, A = Vl[c](B);
|
|
398
398
|
function E() {
|
|
399
|
-
const
|
|
400
|
-
v =
|
|
399
|
+
const U = a.getBoundingClientRect();
|
|
400
|
+
v = U.left, x = U.top, f = U.width, g = U.height;
|
|
401
401
|
const q = Math.min(window.devicePixelRatio || 1, 2);
|
|
402
402
|
a.width = Math.round(f * q), a.height = Math.round(g * q), o.setTransform(q, 0, 0, q, 0, 0);
|
|
403
|
-
const
|
|
404
|
-
N = l ?
|
|
403
|
+
const oe = a.closest(".select-auth") ?? document;
|
|
404
|
+
N = l ? oe.querySelector(l) : null, p.x === 0 && p.y === 0 && (p.x = S = f / 2, p.y = $ = g / 2), A.build();
|
|
405
405
|
}
|
|
406
406
|
let F = -1;
|
|
407
|
-
function W(
|
|
408
|
-
const q = F < 0 ? 0 : Math.min(
|
|
409
|
-
F =
|
|
407
|
+
function W(U) {
|
|
408
|
+
const q = F < 0 ? 0 : Math.min(U - F, 0.05);
|
|
409
|
+
F = U, b.active = U - M < _, w(b.active ? S : f / 2), y(b.active ? $ : g / 2), b.x = p.x, b.y = p.y, A.frame(U, q);
|
|
410
410
|
}
|
|
411
|
-
function Z(
|
|
412
|
-
S =
|
|
411
|
+
function Z(U) {
|
|
412
|
+
S = U.clientX - v, $ = U.clientY - x, M = we.ticker.time;
|
|
413
413
|
}
|
|
414
|
-
function
|
|
415
|
-
const
|
|
416
|
-
v =
|
|
414
|
+
function D() {
|
|
415
|
+
const U = a.getBoundingClientRect();
|
|
416
|
+
v = U.left, x = U.top;
|
|
417
417
|
}
|
|
418
418
|
E();
|
|
419
|
-
const
|
|
419
|
+
const R = new ResizeObserver(() => {
|
|
420
420
|
E(), i && A.paintStatic();
|
|
421
421
|
});
|
|
422
|
-
return
|
|
423
|
-
|
|
422
|
+
return R.observe(a), i ? (A.paintStatic(), () => R.disconnect()) : (window.addEventListener("pointermove", Z, { passive: !0 }), window.addEventListener("scroll", D, { passive: !0 }), we.ticker.add(W), () => {
|
|
423
|
+
we.ticker.remove(W), we.killTweensOf(p), window.removeEventListener("pointermove", Z), window.removeEventListener("scroll", D), R.disconnect(), N == null || N.style.removeProperty("--select-card-glow");
|
|
424
424
|
});
|
|
425
425
|
}, [n, l, c]), /* @__PURE__ */ e("canvas", { ref: s, className: t, "aria-hidden": "true" });
|
|
426
426
|
}
|
|
@@ -437,7 +437,7 @@ const fa = P(function({ title: n, subtitle: l, logo: c, mark: s, children: a, fo
|
|
|
437
437
|
] }),
|
|
438
438
|
o && /* @__PURE__ */ e("div", { className: "select-card__footer", children: o })
|
|
439
439
|
] });
|
|
440
|
-
}),
|
|
440
|
+
}), ge = P(function({
|
|
441
441
|
variant: n = "primary",
|
|
442
442
|
type: l = "button",
|
|
443
443
|
size: c = "md",
|
|
@@ -530,7 +530,7 @@ function dt() {
|
|
|
530
530
|
function Kt() {
|
|
531
531
|
return /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ e("path", { d: "M15 19.92L8.48 13.4c-.77-.77-.77-2.03 0-2.8L15 4.08" }) });
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function ye() {
|
|
534
534
|
return /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ e("path", { d: "M19.92 8.95l-6.52 6.52c-.77.77-2.03.77-2.8 0L4.08 8.95" }) });
|
|
535
535
|
}
|
|
536
536
|
function Zn() {
|
|
@@ -873,82 +873,85 @@ const lt = P(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
873
873
|
] }),
|
|
874
874
|
s
|
|
875
875
|
] });
|
|
876
|
-
}), Ze = P(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: o, description: i, hint: r, error: d, prefix: h, suffix: u,
|
|
877
|
-
const
|
|
878
|
-
const
|
|
879
|
-
let
|
|
880
|
-
|
|
881
|
-
},
|
|
876
|
+
}), Ze = P(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: o, description: i, hint: r, error: d, prefix: h, suffix: u, trailingAction: f, mono: g, autoComplete: v, placeholder: x, required: N, disabled: k, readOnly: _, name: p, id: b, minLength: S, maxLength: $, min: M, max: w, step: y, inputMode: C, autoFocus: L, onBlur: B, onKeyDown: A, size: E = "md", className: F, ...W }, Z) {
|
|
877
|
+
const D = ne(), R = b ?? D, [O, U] = T(!1), q = s === "password", oe = q && O ? "text" : s, _e = d ? `${R}-err` : r ? `${R}-hint` : void 0, Ce = h != null || u != null, ie = s === "number" && !Ce && !_, H = l === "" ? null : Number(l), Q = (ce) => {
|
|
878
|
+
const pe = Number(y ?? 1) || 1;
|
|
879
|
+
let me = (H != null && Number.isFinite(H) ? H : 0) + ce * pe;
|
|
880
|
+
M != null && (me = Math.max(Number(M), me)), w != null && (me = Math.min(Number(w), me)), c(String(me));
|
|
881
|
+
}, X = M != null && H != null && H <= Number(M), ue = w != null && H != null && H >= Number(w), ve = /* @__PURE__ */ e(
|
|
882
882
|
"input",
|
|
883
883
|
{
|
|
884
884
|
id: R,
|
|
885
|
-
className: `select-input${
|
|
886
|
-
type:
|
|
885
|
+
className: `select-input${q ? " select-input--has-suffix" : ""}${ie ? " select-input--has-stepper" : ""}${g ? " select-input--mono" : ""}${d ? " select-input--error" : ""}`,
|
|
886
|
+
type: oe,
|
|
887
887
|
value: l,
|
|
888
|
-
onChange: (
|
|
889
|
-
onBlur:
|
|
890
|
-
onKeyDown:
|
|
891
|
-
autoComplete:
|
|
892
|
-
placeholder:
|
|
893
|
-
required:
|
|
894
|
-
disabled:
|
|
895
|
-
readOnly:
|
|
896
|
-
name:
|
|
897
|
-
minLength:
|
|
898
|
-
maxLength:
|
|
899
|
-
min:
|
|
900
|
-
max:
|
|
901
|
-
step:
|
|
902
|
-
inputMode:
|
|
903
|
-
autoFocus:
|
|
888
|
+
onChange: (ce) => c(ce.target.value),
|
|
889
|
+
onBlur: B,
|
|
890
|
+
onKeyDown: A,
|
|
891
|
+
autoComplete: v,
|
|
892
|
+
placeholder: x,
|
|
893
|
+
required: N,
|
|
894
|
+
disabled: k,
|
|
895
|
+
readOnly: _,
|
|
896
|
+
name: p,
|
|
897
|
+
minLength: S,
|
|
898
|
+
maxLength: $,
|
|
899
|
+
min: M,
|
|
900
|
+
max: w,
|
|
901
|
+
step: y,
|
|
902
|
+
inputMode: C,
|
|
903
|
+
autoFocus: L,
|
|
904
904
|
"aria-invalid": d ? !0 : void 0,
|
|
905
|
-
"aria-describedby":
|
|
905
|
+
"aria-describedby": _e
|
|
906
906
|
}
|
|
907
|
-
)
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
/* @__PURE__ */
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
907
|
+
), he = /* @__PURE__ */ m("div", { className: `select-input-wrap${Ce ? " select-input-wrap--affixed" : ""}${d ? " select-input-wrap--error" : ""}`, children: [
|
|
908
|
+
h != null && /* @__PURE__ */ e("span", { className: "select-input__affix select-input__affix--prefix", children: h }),
|
|
909
|
+
ve,
|
|
910
|
+
u != null && /* @__PURE__ */ e("span", { className: "select-input__affix select-input__affix--suffix", children: u }),
|
|
911
|
+
q && /* @__PURE__ */ e(
|
|
912
|
+
"button",
|
|
913
|
+
{
|
|
914
|
+
type: "button",
|
|
915
|
+
className: "select-input__reveal",
|
|
916
|
+
onClick: () => U((ce) => !ce),
|
|
917
|
+
"aria-label": O ? "Ocultar senha" : "Mostrar senha",
|
|
918
|
+
children: O ? /* @__PURE__ */ e(qn, {}) : /* @__PURE__ */ e(Yn, {})
|
|
919
|
+
}
|
|
920
|
+
),
|
|
921
|
+
ie && /* @__PURE__ */ m("span", { className: "select-stepper", children: [
|
|
922
|
+
/* @__PURE__ */ e(
|
|
916
923
|
"button",
|
|
917
924
|
{
|
|
918
925
|
type: "button",
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
"aria-label":
|
|
922
|
-
|
|
926
|
+
tabIndex: -1,
|
|
927
|
+
className: "select-stepper__btn",
|
|
928
|
+
"aria-label": "Aumentar",
|
|
929
|
+
disabled: k || ue,
|
|
930
|
+
onClick: () => Q(1),
|
|
931
|
+
children: /* @__PURE__ */ e(Kn, {})
|
|
923
932
|
}
|
|
924
933
|
),
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
onClick: () => H(-1),
|
|
947
|
-
children: /* @__PURE__ */ e(be, {})
|
|
948
|
-
}
|
|
949
|
-
)
|
|
950
|
-
] })
|
|
951
|
-
] }),
|
|
934
|
+
/* @__PURE__ */ e(
|
|
935
|
+
"button",
|
|
936
|
+
{
|
|
937
|
+
type: "button",
|
|
938
|
+
tabIndex: -1,
|
|
939
|
+
className: "select-stepper__btn",
|
|
940
|
+
"aria-label": "Diminuir",
|
|
941
|
+
disabled: k || X,
|
|
942
|
+
onClick: () => Q(-1),
|
|
943
|
+
children: /* @__PURE__ */ e(ye, {})
|
|
944
|
+
}
|
|
945
|
+
)
|
|
946
|
+
] })
|
|
947
|
+
] });
|
|
948
|
+
return /* @__PURE__ */ m("div", { ref: Z, ...W, className: `select-field${E === "sm" ? " select-field--sm" : ""}${F ? " " + F : ""}`, children: [
|
|
949
|
+
(n || o || a) && /* @__PURE__ */ e(lt, { htmlFor: R, label: n, info: o, action: a }),
|
|
950
|
+
i && /* @__PURE__ */ e("p", { className: "select-field__desc", children: i }),
|
|
951
|
+
f != null ? /* @__PURE__ */ m("div", { className: "select-field__control", children: [
|
|
952
|
+
he,
|
|
953
|
+
/* @__PURE__ */ e("span", { className: "select-field__trailing", children: f })
|
|
954
|
+
] }) : he,
|
|
952
955
|
d ? /* @__PURE__ */ e("p", { id: `${R}-err`, className: "select-field__error", children: d }) : r ? /* @__PURE__ */ e("p", { id: `${R}-hint`, className: "select-field__hint", children: r }) : null
|
|
953
956
|
] });
|
|
954
957
|
}), er = P(function({ label: n, checked: l, onChange: c, disabled: s, hint: a, name: o, className: i, ...r }, d) {
|
|
@@ -1187,7 +1190,7 @@ function ll(t) {
|
|
|
1187
1190
|
}
|
|
1188
1191
|
}
|
|
1189
1192
|
const sr = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, allowMultiple: a = !0, maxFiles: o, hint: i, className: r, ...d }, h) {
|
|
1190
|
-
const u = Y(null), [f, g] = T(!1), [v, x] = T(0), N = s * 1024 * 1024, k =
|
|
1193
|
+
const u = Y(null), [f, g] = T(!1), [v, x] = T(0), N = s * 1024 * 1024, k = xe(() => n.map((C) => el(C) ? URL.createObjectURL(C) : null), [n]);
|
|
1191
1194
|
te(
|
|
1192
1195
|
() => () => {
|
|
1193
1196
|
k.forEach((C) => {
|
|
@@ -1324,24 +1327,24 @@ const sr = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1324
1327
|
o != null && !f && /* @__PURE__ */ e("p", { className: "select-field__hint", children: o })
|
|
1325
1328
|
] });
|
|
1326
1329
|
}), ac = P(function({ label: n, mode: l = "multiple", files: c, onFilesChange: s, urls: a, onUrlsChange: o, accept: i = ".jpg,.jpeg,.png,.webp", maxSizeMB: r = 3, maxItems: d = 10, maxFiles: h, uploadHint: u, urlPlaceholder: f, helpText: g, className: v, ...x }, N) {
|
|
1327
|
-
const k = l === "single", _ = Y(null), [p, b] = T(!1), [S, $] = T(0), [M, w] = T(""), [y, C] = T(null), L = k ? 1 : Math.max(1, d), B = k ? 1 : h ?? L, A = c.length + a.length, E = k ? A === 0 : A < L && c.length < B, F = k ? A === 0 : A < L, W = A > 0, Z = r * 1024 * 1024,
|
|
1330
|
+
const k = l === "single", _ = Y(null), [p, b] = T(!1), [S, $] = T(0), [M, w] = T(""), [y, C] = T(null), L = k ? 1 : Math.max(1, d), B = k ? 1 : h ?? L, A = c.length + a.length, E = k ? A === 0 : A < L && c.length < B, F = k ? A === 0 : A < L, W = A > 0, Z = r * 1024 * 1024, D = xe(() => c.map((H) => el(H) ? URL.createObjectURL(H) : null), [c]);
|
|
1328
1331
|
te(
|
|
1329
1332
|
() => () => {
|
|
1330
|
-
|
|
1333
|
+
D.forEach((H) => {
|
|
1331
1334
|
H && URL.revokeObjectURL(H);
|
|
1332
1335
|
});
|
|
1333
1336
|
},
|
|
1334
|
-
[
|
|
1337
|
+
[D]
|
|
1335
1338
|
);
|
|
1336
|
-
const
|
|
1337
|
-
const Q = H.filter((
|
|
1339
|
+
const R = (H) => {
|
|
1340
|
+
const Q = H.filter((ve) => ve.size <= Z && Qn(ve, i));
|
|
1338
1341
|
if ($(H.length - Q.length), !Q.length) return;
|
|
1339
1342
|
if (k) {
|
|
1340
1343
|
o([]), s(Q.slice(0, 1));
|
|
1341
1344
|
return;
|
|
1342
1345
|
}
|
|
1343
|
-
const X = Math.min(B - c.length, L - A),
|
|
1344
|
-
s(
|
|
1346
|
+
const X = Math.min(B - c.length, L - A), ue = [...c, ...Q.slice(0, Math.max(0, X))];
|
|
1347
|
+
s(ue);
|
|
1345
1348
|
}, O = () => {
|
|
1346
1349
|
const H = M.trim();
|
|
1347
1350
|
if (H) {
|
|
@@ -1355,23 +1358,23 @@ const sr = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1355
1358
|
}
|
|
1356
1359
|
k ? (s([]), o([H])) : o([...a, H].slice(0, L)), w(""), C(null);
|
|
1357
1360
|
}
|
|
1358
|
-
},
|
|
1361
|
+
}, U = (H) => {
|
|
1359
1362
|
H.key === "Enter" && (H.preventDefault(), O());
|
|
1360
|
-
}, q = (H) => s(c.filter((Q, X) => X !== H)),
|
|
1363
|
+
}, q = (H) => s(c.filter((Q, X) => X !== H)), oe = (H) => o(a.filter((Q, X) => X !== H)), _e = () => {
|
|
1361
1364
|
var H;
|
|
1362
1365
|
return (H = _.current) == null ? void 0 : H.click();
|
|
1363
|
-
},
|
|
1366
|
+
}, ie = {
|
|
1364
1367
|
onDragOver: (H) => {
|
|
1365
1368
|
H.preventDefault(), b(!0);
|
|
1366
1369
|
},
|
|
1367
1370
|
onDragLeave: () => b(!1),
|
|
1368
1371
|
onDrop: (H) => {
|
|
1369
|
-
H.preventDefault(), b(!1),
|
|
1372
|
+
H.preventDefault(), b(!1), R(Array.from(H.dataTransfer.files));
|
|
1370
1373
|
}
|
|
1371
1374
|
};
|
|
1372
1375
|
return /* @__PURE__ */ m("div", { ref: N, ...x, className: `select-field select-imageupload${v ? " " + v : ""}`, children: [
|
|
1373
1376
|
n && /* @__PURE__ */ e("span", { className: "select-field__label", children: n }),
|
|
1374
|
-
/* @__PURE__ */ m("div", { className: `select-uploadzone${p ? " is-over" : ""}`, ...
|
|
1377
|
+
/* @__PURE__ */ m("div", { className: `select-uploadzone${p ? " is-over" : ""}`, ...ie, children: [
|
|
1375
1378
|
W ? (
|
|
1376
1379
|
// Grid inteligente (user 2026-07-27): 1 imagem preenche a div toda; 2+ dividem
|
|
1377
1380
|
// em colunas de 50% com gap (o modificador --single vem da CONTAGEM de itens,
|
|
@@ -1380,7 +1383,7 @@ const sr = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1380
1383
|
c.map((H, Q) => /* @__PURE__ */ e(
|
|
1381
1384
|
kt,
|
|
1382
1385
|
{
|
|
1383
|
-
src:
|
|
1386
|
+
src: D[Q] ?? void 0,
|
|
1384
1387
|
docExt: tl(H.name),
|
|
1385
1388
|
name: H.name,
|
|
1386
1389
|
sub: Jn(H.size),
|
|
@@ -1388,13 +1391,13 @@ const sr = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1388
1391
|
},
|
|
1389
1392
|
`f-${H.name}-${Q}`
|
|
1390
1393
|
)),
|
|
1391
|
-
a.map((H, Q) => /* @__PURE__ */ e(kt, { src: H, name: ll(H), onRemove: () =>
|
|
1392
|
-
E && /* @__PURE__ */ m("button", { type: "button", className: "select-dropzone select-dropzone--tile", onClick:
|
|
1394
|
+
a.map((H, Q) => /* @__PURE__ */ e(kt, { src: H, name: ll(H), onRemove: () => oe(Q) }, `u-${H}-${Q}`)),
|
|
1395
|
+
E && /* @__PURE__ */ m("button", { type: "button", className: "select-dropzone select-dropzone--tile", onClick: _e, children: [
|
|
1393
1396
|
/* @__PURE__ */ e(wt, {}),
|
|
1394
1397
|
/* @__PURE__ */ e("span", { children: "Adicionar" })
|
|
1395
1398
|
] })
|
|
1396
1399
|
] })
|
|
1397
|
-
) : /* @__PURE__ */ m("button", { type: "button", className: "select-uploadzone__prompt", onClick:
|
|
1400
|
+
) : /* @__PURE__ */ m("button", { type: "button", className: "select-uploadzone__prompt", onClick: _e, children: [
|
|
1398
1401
|
/* @__PURE__ */ e(wt, {}),
|
|
1399
1402
|
/* @__PURE__ */ e("span", { children: u ?? `Arraste ou selecione um arquivo · até ${r} MB` })
|
|
1400
1403
|
] }),
|
|
@@ -1408,7 +1411,7 @@ const sr = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1408
1411
|
onChange: (H) => {
|
|
1409
1412
|
w(H), y && C(null);
|
|
1410
1413
|
},
|
|
1411
|
-
onKeyDown:
|
|
1414
|
+
onKeyDown: U,
|
|
1412
1415
|
type: "url",
|
|
1413
1416
|
inputMode: "url",
|
|
1414
1417
|
placeholder: f ?? "ou cole uma URL (https://…)",
|
|
@@ -1416,7 +1419,7 @@ const sr = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1416
1419
|
autoComplete: "off"
|
|
1417
1420
|
}
|
|
1418
1421
|
) }),
|
|
1419
|
-
/* @__PURE__ */ e(
|
|
1422
|
+
/* @__PURE__ */ e(ge, { variant: "secondary", size: "sm", inline: !0, onClick: O, disabled: !M.trim(), children: "Adicionar" })
|
|
1420
1423
|
] }),
|
|
1421
1424
|
/* @__PURE__ */ e(
|
|
1422
1425
|
"input",
|
|
@@ -1427,7 +1430,7 @@ const sr = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1427
1430
|
multiple: !k,
|
|
1428
1431
|
hidden: !0,
|
|
1429
1432
|
onChange: (H) => {
|
|
1430
|
-
|
|
1433
|
+
R(Array.from(H.target.files ?? [])), H.target.value = "";
|
|
1431
1434
|
}
|
|
1432
1435
|
}
|
|
1433
1436
|
)
|
|
@@ -1470,7 +1473,7 @@ const sr = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1470
1473
|
]
|
|
1471
1474
|
}
|
|
1472
1475
|
),
|
|
1473
|
-
/* @__PURE__ */ e("span", { className: "select-select-caret", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
1476
|
+
/* @__PURE__ */ e("span", { className: "select-select-caret", "aria-hidden": "true", children: /* @__PURE__ */ e(ye, {}) })
|
|
1474
1477
|
] }),
|
|
1475
1478
|
d ? /* @__PURE__ */ e("p", { id: `${_}-err`, className: "select-field__error", children: d }) : r ? /* @__PURE__ */ e("p", { id: `${_}-hint`, className: "select-field__hint", children: r }) : null
|
|
1476
1479
|
] });
|
|
@@ -1501,7 +1504,7 @@ function Ft(t = {}) {
|
|
|
1501
1504
|
const v = s ? Array.from(c.querySelectorAll(s)) : [], x = v.length ? v : [c], N = { opacity: 0, y: a, ...o !== 1 ? { scale: o } : {} };
|
|
1502
1505
|
let k;
|
|
1503
1506
|
const _ = () => {
|
|
1504
|
-
k =
|
|
1507
|
+
k = we.fromTo(x, N, {
|
|
1505
1508
|
opacity: 1,
|
|
1506
1509
|
y: 0,
|
|
1507
1510
|
scale: 1,
|
|
@@ -1514,7 +1517,7 @@ function Ft(t = {}) {
|
|
|
1514
1517
|
};
|
|
1515
1518
|
if (!u || !al())
|
|
1516
1519
|
return _(), () => k == null ? void 0 : k.kill();
|
|
1517
|
-
|
|
1520
|
+
we.set(x, N);
|
|
1518
1521
|
const p = new IntersectionObserver(
|
|
1519
1522
|
(b) => {
|
|
1520
1523
|
for (const S of b)
|
|
@@ -1550,7 +1553,7 @@ function rc(t) {
|
|
|
1550
1553
|
const f = { n: a };
|
|
1551
1554
|
let g;
|
|
1552
1555
|
const v = () => {
|
|
1553
|
-
g =
|
|
1556
|
+
g = we.to(f, {
|
|
1554
1557
|
n: s,
|
|
1555
1558
|
duration: o,
|
|
1556
1559
|
ease: i,
|
|
@@ -1707,7 +1710,7 @@ function dc({ count: t, children: n }) {
|
|
|
1707
1710
|
return /* @__PURE__ */ e("div", { className: "select-combobox__list", ref: c, children: n });
|
|
1708
1711
|
}
|
|
1709
1712
|
const uc = P(function({ label: n, value: l, onChange: c, options: s, placeholder: a = "Selecionar…", searchPlaceholder: o = "Buscar…", labelAction: i, hint: r, error: d, emptyText: h = "Nenhum resultado", disabled: u, required: f, size: g = "md", searchable: v = !0, className: x, ...N }, k) {
|
|
1710
|
-
const _ = ne(), [p, b] = T(!1), [S, $] = T(""), M = s.find((B) => B.value === l), w =
|
|
1713
|
+
const _ = ne(), [p, b] = T(!1), [S, $] = T(""), M = s.find((B) => B.value === l), w = xe(() => {
|
|
1711
1714
|
const B = S.trim().toLowerCase();
|
|
1712
1715
|
return !v || !B ? s : s.filter((A) => {
|
|
1713
1716
|
var E;
|
|
@@ -1745,7 +1748,7 @@ const uc = P(function({ label: n, value: l, onChange: c, options: s, placeholder
|
|
|
1745
1748
|
"aria-describedby": L,
|
|
1746
1749
|
children: [
|
|
1747
1750
|
/* @__PURE__ */ e("span", { className: `select-combobox__value${M ? "" : " is-placeholder"}`, children: M ? M.label : a }),
|
|
1748
|
-
/* @__PURE__ */ e("span", { className: "select-combobox__caret", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
1751
|
+
/* @__PURE__ */ e("span", { className: "select-combobox__caret", "aria-hidden": "true", children: /* @__PURE__ */ e(ye, {}) })
|
|
1749
1752
|
]
|
|
1750
1753
|
}
|
|
1751
1754
|
),
|
|
@@ -1985,7 +1988,7 @@ const ur = P(function({ label: n, value: l, onChange: c, labelAction: s, hint: a
|
|
|
1985
1988
|
" ",
|
|
1986
1989
|
g
|
|
1987
1990
|
] }),
|
|
1988
|
-
/* @__PURE__ */ e("span", { className: "select-select-caret", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
1991
|
+
/* @__PURE__ */ e("span", { className: "select-select-caret", "aria-hidden": "true", children: /* @__PURE__ */ e(ye, {}) }),
|
|
1989
1992
|
/* @__PURE__ */ e(
|
|
1990
1993
|
"select",
|
|
1991
1994
|
{
|
|
@@ -2172,12 +2175,12 @@ function fr({
|
|
|
2172
2175
|
onClose: () => s(!1),
|
|
2173
2176
|
placement: "bottom-end",
|
|
2174
2177
|
activator: /* @__PURE__ */ e(
|
|
2175
|
-
|
|
2178
|
+
ge,
|
|
2176
2179
|
{
|
|
2177
2180
|
variant: "secondary",
|
|
2178
2181
|
size: "sm",
|
|
2179
2182
|
inline: !0,
|
|
2180
|
-
trailingIcon: /* @__PURE__ */ e(
|
|
2183
|
+
trailingIcon: /* @__PURE__ */ e(ye, {}),
|
|
2181
2184
|
disabled: l,
|
|
2182
2185
|
onClick: () => s((a) => !a),
|
|
2183
2186
|
children: n
|
|
@@ -2526,7 +2529,7 @@ function cn({
|
|
|
2526
2529
|
)
|
|
2527
2530
|
] });
|
|
2528
2531
|
}
|
|
2529
|
-
const
|
|
2532
|
+
const be = P(function({ icon: n, label: l, onClick: c, disabled: s = !1, size: a = "md", variant: o = "ghost", active: i = !1, className: r, ...d }, h) {
|
|
2530
2533
|
return /* @__PURE__ */ e(cn, { content: l, children: /* @__PURE__ */ e("button", { ref: h, ...d, type: "button", className: `select-iconbtn select-iconbtn--${a} select-iconbtn--${o}${i ? " is-active" : ""}${r ? " " + r : ""}`, "aria-label": l, "aria-pressed": i, onClick: c, disabled: s, children: n }) });
|
|
2531
2534
|
});
|
|
2532
2535
|
function Ic({
|
|
@@ -2539,12 +2542,12 @@ function Ic({
|
|
|
2539
2542
|
variant: o = "secondary"
|
|
2540
2543
|
}) {
|
|
2541
2544
|
return /* @__PURE__ */ e(
|
|
2542
|
-
|
|
2545
|
+
ge,
|
|
2543
2546
|
{
|
|
2544
2547
|
variant: o,
|
|
2545
2548
|
size: a,
|
|
2546
2549
|
inline: !0,
|
|
2547
|
-
trailingIcon: /* @__PURE__ */ e("span", { className: `select-disclosure-caret${t ? " is-open" : ""}`, children: /* @__PURE__ */ e(
|
|
2550
|
+
trailingIcon: /* @__PURE__ */ e("span", { className: `select-disclosure-caret${t ? " is-open" : ""}`, children: /* @__PURE__ */ e(ye, {}) }),
|
|
2548
2551
|
disabled: s,
|
|
2549
2552
|
"aria-expanded": t,
|
|
2550
2553
|
onClick: n,
|
|
@@ -2792,35 +2795,35 @@ function gl({
|
|
|
2792
2795
|
}) });
|
|
2793
2796
|
}
|
|
2794
2797
|
function Xc({ text: t, term: n }) {
|
|
2795
|
-
const l =
|
|
2798
|
+
const l = xe(() => t.length > Yc ? null : Zc(t), [t]);
|
|
2796
2799
|
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 }) });
|
|
2797
2800
|
}
|
|
2798
2801
|
const gr = P(function({ value: n, title: l = "Metadados", maxHeight: c = 360, defaultOpen: s = !1, defaultExpandDepth: a = 1, searchable: o = !0, emptyLabel: i = "Sem dados", className: r, ...d }, h) {
|
|
2799
|
-
const [u, f] = T(s), [g, v] = T("tree"), [x, N] = T(""), [k, _] = T(/* @__PURE__ */ new Set()), [p, b] = zc(), S = Y(null), $ =
|
|
2802
|
+
const [u, f] = T(s), [g, v] = T("tree"), [x, N] = T(""), [k, _] = T(/* @__PURE__ */ new Set()), [p, b] = zc(), S = Y(null), $ = xe(() => Dc(n), [n]), M = Tc($), w = xe(
|
|
2800
2803
|
() => typeof n == "string" && $ === n ? n : _l($),
|
|
2801
2804
|
[n, $]
|
|
2802
|
-
), y =
|
|
2803
|
-
}).truncated, [$]), C = g === "tree" && !y, L =
|
|
2805
|
+
), y = xe(() => ot($, () => {
|
|
2806
|
+
}).truncated, [$]), C = g === "tree" && !y, L = xe(() => y ? [] : Hc($), [$, y]);
|
|
2804
2807
|
te(() => {
|
|
2805
2808
|
_(y ? /* @__PURE__ */ new Set() : Oc($, a)), N("");
|
|
2806
2809
|
}, [$, a, y]);
|
|
2807
|
-
const B =
|
|
2810
|
+
const B = xe(() => Vc($, C ? x : ""), [$, x, C]), A = x.trim().length > 0, E = C ? B.count : Uc(w, x);
|
|
2808
2811
|
te(() => {
|
|
2809
|
-
var O,
|
|
2810
|
-
!u || !A || (
|
|
2812
|
+
var O, U;
|
|
2813
|
+
!u || !A || (U = (O = S.current) == null ? void 0 : O.querySelector(".select-json__hit")) == null || U.scrollIntoView({ block: "nearest" });
|
|
2811
2814
|
}, [u, A, x, g]);
|
|
2812
2815
|
const F = Fe((O) => {
|
|
2813
|
-
_((
|
|
2814
|
-
const q = new Set(
|
|
2816
|
+
_((U) => {
|
|
2817
|
+
const q = new Set(U);
|
|
2815
2818
|
return q.delete(O) || q.add(O), q;
|
|
2816
2819
|
});
|
|
2817
|
-
}, []), W = L.length > 0 && L.every((O) => k.has(O)), Z = () => _(W ? /* @__PURE__ */ new Set() : new Set(L)),
|
|
2820
|
+
}, []), W = L.length > 0 && L.every((O) => k.has(O)), Z = () => _(W ? /* @__PURE__ */ new Set() : new Set(L)), D = { expanded: k, toggle: F, search: x, result: B, copied: p, copy: b }, R = u && !M;
|
|
2818
2821
|
return /* @__PURE__ */ m("div", { ref: h, ...d, className: `select-json${r ? " " + r : ""}`, children: [
|
|
2819
2822
|
/* @__PURE__ */ m("div", { className: "select-json__head", children: [
|
|
2820
2823
|
/* @__PURE__ */ e(Xe, { as: "h2", variant: "headingSm", children: l }),
|
|
2821
|
-
/* @__PURE__ */ e(Ic, { open:
|
|
2824
|
+
/* @__PURE__ */ e(Ic, { open: R, onToggle: () => f((O) => !O), openLabel: "Ocultar", disabled: M, children: M ? i : "Mostrar" })
|
|
2822
2825
|
] }),
|
|
2823
|
-
|
|
2826
|
+
R && /* @__PURE__ */ m("div", { className: "select-json__body", children: [
|
|
2824
2827
|
/* @__PURE__ */ m("div", { className: "select-json__toolbar", children: [
|
|
2825
2828
|
o ? /* @__PURE__ */ m(ae, { children: [
|
|
2826
2829
|
/* @__PURE__ */ e("span", { className: "select-json__searchicon", "aria-hidden": "true", children: /* @__PURE__ */ e(Jt, {}) }),
|
|
@@ -2838,7 +2841,7 @@ const gr = P(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2838
2841
|
A && /* @__PURE__ */ e("span", { className: "select-json__count", children: E === 0 ? "nenhum" : E === 1 ? "1 resultado" : `${E} resultados` })
|
|
2839
2842
|
] }) : /* @__PURE__ */ e("span", { className: "select-json__spacer" }),
|
|
2840
2843
|
C && L.length > 0 && !A && /* @__PURE__ */ e(
|
|
2841
|
-
|
|
2844
|
+
be,
|
|
2842
2845
|
{
|
|
2843
2846
|
icon: /* @__PURE__ */ e(Gn, {}),
|
|
2844
2847
|
label: W ? "Recolher tudo" : "Expandir tudo",
|
|
@@ -2848,7 +2851,7 @@ const gr = P(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2848
2851
|
}
|
|
2849
2852
|
),
|
|
2850
2853
|
/* @__PURE__ */ e(
|
|
2851
|
-
|
|
2854
|
+
be,
|
|
2852
2855
|
{
|
|
2853
2856
|
icon: /* @__PURE__ */ e(Yl, {}),
|
|
2854
2857
|
label: y ? "Árvore indisponível: JSON muito grande" : g === "raw" ? "Ver árvore" : "Ver JSON bruto",
|
|
@@ -2859,7 +2862,7 @@ const gr = P(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2859
2862
|
}
|
|
2860
2863
|
),
|
|
2861
2864
|
/* @__PURE__ */ e(
|
|
2862
|
-
|
|
2865
|
+
be,
|
|
2863
2866
|
{
|
|
2864
2867
|
icon: p === "all" ? /* @__PURE__ */ e(Ae, {}) : /* @__PURE__ */ e(tc, {}),
|
|
2865
2868
|
label: p === "all" ? "Copiado!" : "Copiar JSON",
|
|
@@ -2873,7 +2876,7 @@ const gr = P(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2873
2876
|
"Nenhuma chave ou valor corresponde a “",
|
|
2874
2877
|
x.trim(),
|
|
2875
2878
|
"”."
|
|
2876
|
-
] }) }) : /* @__PURE__ */ e("div", { className: "select-json__tree", children: Oe($) ? /* @__PURE__ */ e(gl, { value: $, path: "", depth: 0, ancestors: [$], ctx:
|
|
2879
|
+
] }) }) : /* @__PURE__ */ e("div", { className: "select-json__tree", children: Oe($) ? /* @__PURE__ */ e(gl, { value: $, path: "", depth: 0, ancestors: [$], ctx: D }) : /* @__PURE__ */ m("div", { className: "select-json__row", style: { "--json-depth": 0 }, children: [
|
|
2877
2880
|
/* @__PURE__ */ e("span", { className: "select-json__caret select-json__caret--empty", "aria-hidden": "true" }),
|
|
2878
2881
|
/* @__PURE__ */ e("span", { className: "select-json__label", children: /* @__PURE__ */ e(vl, { value: $, term: x, forceFull: !0 }) })
|
|
2879
2882
|
] }) }) : /* @__PURE__ */ e(Xc, { text: w, term: x }) })
|
|
@@ -3063,7 +3066,7 @@ const Sr = P(function({ value: n, className: l, ...c }, s) {
|
|
|
3063
3066
|
] }),
|
|
3064
3067
|
u && /* @__PURE__ */ m("div", { className: "select-page__actions", children: [
|
|
3065
3068
|
s == null ? void 0 : s.map((g, v) => /* @__PURE__ */ e(
|
|
3066
|
-
|
|
3069
|
+
ge,
|
|
3067
3070
|
{
|
|
3068
3071
|
variant: "secondary",
|
|
3069
3072
|
size: "sm",
|
|
@@ -3077,7 +3080,7 @@ const Sr = P(function({ value: n, className: l, ...c }, s) {
|
|
|
3077
3080
|
v
|
|
3078
3081
|
)),
|
|
3079
3082
|
c && /* @__PURE__ */ e(
|
|
3080
|
-
|
|
3083
|
+
ge,
|
|
3081
3084
|
{
|
|
3082
3085
|
variant: "primary",
|
|
3083
3086
|
size: "sm",
|
|
@@ -3195,7 +3198,7 @@ const Er = P(function({ children: n, tone: l = "neutral", hideIcon: c = !1, clas
|
|
|
3195
3198
|
return a ? /* @__PURE__ */ m("div", { ref: h, ...d, className: `select-section select-section--collapsible${u ? " is-open" : ""}${r ? " " + r : ""}`, children: [
|
|
3196
3199
|
/* @__PURE__ */ m("button", { type: "button", className: "select-section__head select-section__head--toggle", "aria-expanded": u, onClick: () => f((g) => !g), children: [
|
|
3197
3200
|
n && /* @__PURE__ */ e("span", { className: "select-section__title", children: n }),
|
|
3198
|
-
/* @__PURE__ */ e("span", { className: "select-section__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
3201
|
+
/* @__PURE__ */ e("span", { className: "select-section__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(ye, {}) })
|
|
3199
3202
|
] }),
|
|
3200
3203
|
/* @__PURE__ */ e("div", { className: "select-section__collapse", "data-open": u, "aria-hidden": !u, children: /* @__PURE__ */ e("div", { className: "select-section__collapsewrap", children: /* @__PURE__ */ e("div", { className: "select-section__body", children: i }) }) })
|
|
3201
3204
|
] }) : /* @__PURE__ */ m("div", { ref: h, ...d, className: `select-section${r ? " " + r : ""}`, children: [
|
|
@@ -3285,7 +3288,7 @@ function is({
|
|
|
3285
3288
|
children: [
|
|
3286
3289
|
t.icon && /* @__PURE__ */ e("span", { className: "select-sidenav__icon", children: t.icon }),
|
|
3287
3290
|
/* @__PURE__ */ e("span", { className: "select-sidenav__label", children: t.label }),
|
|
3288
|
-
!c && /* @__PURE__ */ e("span", { className: "select-sidenav__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
3291
|
+
!c && /* @__PURE__ */ e("span", { className: "select-sidenav__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(ye, {}) })
|
|
3289
3292
|
]
|
|
3290
3293
|
}
|
|
3291
3294
|
),
|
|
@@ -3378,7 +3381,7 @@ const Dr = P(function({ sections: n, active: l, onSelect: c, header: s, classNam
|
|
|
3378
3381
|
onClick: _.onSort,
|
|
3379
3382
|
children: [
|
|
3380
3383
|
_.label,
|
|
3381
|
-
/* @__PURE__ */ e(
|
|
3384
|
+
/* @__PURE__ */ e(ye, {})
|
|
3382
3385
|
]
|
|
3383
3386
|
}
|
|
3384
3387
|
) : _.label
|
|
@@ -3447,7 +3450,7 @@ function Hr() {
|
|
|
3447
3450
|
const ms = P(function({ children: n, onClick: l, active: c = !1, className: s, ...a }, o) {
|
|
3448
3451
|
return /* @__PURE__ */ m("button", { ref: o, ...a, type: "button", className: `select-menubtn${c ? " is-active" : ""}${s ? " " + s : ""}`, onClick: l, "aria-haspopup": "menu", "aria-expanded": c, children: [
|
|
3449
3452
|
/* @__PURE__ */ e("span", { children: n }),
|
|
3450
|
-
/* @__PURE__ */ e("span", { className: "select-menubtn__caret", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
3453
|
+
/* @__PURE__ */ e("span", { className: "select-menubtn__caret", "aria-hidden": "true", children: /* @__PURE__ */ e(ye, {}) })
|
|
3451
3454
|
] });
|
|
3452
3455
|
}), jr = P(function({ children: n, onClick: l, active: c = !1, className: s, ...a }, o) {
|
|
3453
3456
|
return /* @__PURE__ */ m("button", { ref: o, ...a, type: "button", className: `select-chip${c ? " select-chip--active" : ""}${s ? " " + s : ""}`, onClick: l, children: [
|
|
@@ -3461,7 +3464,7 @@ const ms = P(function({ children: n, onClick: l, active: c = !1, className: s, .
|
|
|
3461
3464
|
/* @__PURE__ */ e("span", { className: "select-copyrow__text", children: l }),
|
|
3462
3465
|
/* @__PURE__ */ m("div", { className: "select-copyrow__actions", children: [
|
|
3463
3466
|
c && /* @__PURE__ */ e("a", { className: "select-iconbtn select-iconbtn--sm", href: c, target: "_blank", rel: "noreferrer", "aria-label": "Abrir", title: "Abrir", children: /* @__PURE__ */ e(en, {}) }),
|
|
3464
|
-
/* @__PURE__ */ e(
|
|
3467
|
+
/* @__PURE__ */ e(be, { size: "sm", icon: /* @__PURE__ */ e(Qt, {}), label: "Copiar", onClick: () => s == null ? void 0 : s(l) })
|
|
3465
3468
|
] })
|
|
3466
3469
|
] })
|
|
3467
3470
|
] });
|
|
@@ -3504,13 +3507,13 @@ const Gr = P(function({ title: n, children: l, defaultOpen: c = !1, plain: s = !
|
|
|
3504
3507
|
return /* @__PURE__ */ m("div", { ref: i, ...o, className: `select-collapsible${s ? " select-collapsible--plain" : ""}${r ? " is-open" : ""}${a ? " " + a : ""}`, children: [
|
|
3505
3508
|
/* @__PURE__ */ m("button", { type: "button", className: "select-collapsible__header", onClick: () => d((h) => !h), "aria-expanded": r, children: [
|
|
3506
3509
|
/* @__PURE__ */ e("span", { className: "select-collapsible__title", children: n }),
|
|
3507
|
-
/* @__PURE__ */ e("span", { className: "select-collapsible__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
3510
|
+
/* @__PURE__ */ e("span", { className: "select-collapsible__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(ye, {}) })
|
|
3508
3511
|
] }),
|
|
3509
3512
|
/* @__PURE__ */ e("div", { className: "select-collapsible__bodywrap", children: /* @__PURE__ */ e("div", { className: "select-collapsible__bodyclip", "aria-hidden": !r, children: /* @__PURE__ */ e("div", { className: "select-collapsible__body", children: l }) }) })
|
|
3510
3513
|
] });
|
|
3511
3514
|
}), Ur = P(function({ icon: n, title: l, description: c, action: s, onDismiss: a, className: o, ...i }, r) {
|
|
3512
3515
|
return /* @__PURE__ */ m("div", { ref: r, ...i, className: `select-actioncard${o ? " " + o : ""}`, children: [
|
|
3513
|
-
a && /* @__PURE__ */ e("div", { className: "select-actioncard__dismiss", children: /* @__PURE__ */ e(
|
|
3516
|
+
a && /* @__PURE__ */ e("div", { className: "select-actioncard__dismiss", children: /* @__PURE__ */ e(be, { size: "sm", icon: /* @__PURE__ */ e(Ke, {}), label: "Dispensar", onClick: a }) }),
|
|
3514
3517
|
n && /* @__PURE__ */ e("span", { className: "select-actioncard__icon", children: n }),
|
|
3515
3518
|
/* @__PURE__ */ m("div", { className: "select-actioncard__text", children: [
|
|
3516
3519
|
/* @__PURE__ */ e("h4", { className: "select-actioncard__title", children: l }),
|
|
@@ -3632,7 +3635,7 @@ function Xr({ actions: t, label: n = "Ações" }) {
|
|
|
3632
3635
|
onClose: () => c(!1),
|
|
3633
3636
|
placement: "bottom-end",
|
|
3634
3637
|
activator: /* @__PURE__ */ e(
|
|
3635
|
-
|
|
3638
|
+
be,
|
|
3636
3639
|
{
|
|
3637
3640
|
icon: /* @__PURE__ */ e(Zl, {}),
|
|
3638
3641
|
label: n,
|
|
@@ -3667,9 +3670,9 @@ function Kr({
|
|
|
3667
3670
|
size: "sm",
|
|
3668
3671
|
theme: d ?? ht(),
|
|
3669
3672
|
footer: /* @__PURE__ */ m("div", { className: "select-modal__actions", children: [
|
|
3670
|
-
/* @__PURE__ */ e(
|
|
3673
|
+
/* @__PURE__ */ e(ge, { variant: "secondary", size: "sm", inline: !0, onClick: n, disabled: r, children: o }),
|
|
3671
3674
|
/* @__PURE__ */ e(
|
|
3672
|
-
|
|
3675
|
+
ge,
|
|
3673
3676
|
{
|
|
3674
3677
|
variant: i ? "danger" : "primary",
|
|
3675
3678
|
size: "sm",
|
|
@@ -3710,9 +3713,9 @@ function Jr({
|
|
|
3710
3713
|
size: f,
|
|
3711
3714
|
theme: g ?? ht(),
|
|
3712
3715
|
footer: /* @__PURE__ */ m("div", { className: "select-modal__actions", children: [
|
|
3713
|
-
/* @__PURE__ */ e(
|
|
3716
|
+
/* @__PURE__ */ e(ge, { variant: "secondary", size: "sm", inline: !0, onClick: n, disabled: r, children: i }),
|
|
3714
3717
|
/* @__PURE__ */ e(
|
|
3715
|
-
|
|
3718
|
+
ge,
|
|
3716
3719
|
{
|
|
3717
3720
|
variant: h,
|
|
3718
3721
|
size: "sm",
|
|
@@ -3854,28 +3857,28 @@ function to({
|
|
|
3854
3857
|
filters: h,
|
|
3855
3858
|
columnsKey: u
|
|
3856
3859
|
}) {
|
|
3857
|
-
const [f, g] = T(() => u ? bs(u) : []), [v, x] = T(!1), [N, k] = T(!1), _ =
|
|
3858
|
-
g((
|
|
3859
|
-
const O = !
|
|
3860
|
-
return u && ys(u,
|
|
3860
|
+
const [f, g] = T(() => u ? bs(u) : []), [v, x] = T(!1), [N, k] = T(!1), _ = xe(() => new Set(f), [f]), p = t.filter(wn), b = p.length > 0 && p.every((D) => _.has(D.key)), S = (D) => !b && _.has(D.key) && wn(D), $ = t.filter((D) => !S(D)), M = p.filter((D) => !S(D)), [w, y] = T(null), C = (D) => {
|
|
3861
|
+
g((R) => {
|
|
3862
|
+
const O = !R.includes(D.key), U = O ? [...R, D.key] : R.filter((q) => q !== D.key);
|
|
3863
|
+
return u && ys(u, U), O && y((q) => q && q.key === D.key ? null : q), U;
|
|
3861
3864
|
});
|
|
3862
|
-
}, L = (
|
|
3863
|
-
y((
|
|
3864
|
-
const O =
|
|
3865
|
-
return !
|
|
3865
|
+
}, L = (D) => {
|
|
3866
|
+
y((R) => {
|
|
3867
|
+
const O = D.sortDefault ?? "asc";
|
|
3868
|
+
return !R || R.key !== D.key ? { key: D.key, dir: O } : R.dir === O ? { key: D.key, dir: O === "asc" ? "desc" : "asc" } : null;
|
|
3866
3869
|
});
|
|
3867
|
-
}, B = w ? t.find((
|
|
3868
|
-
const
|
|
3869
|
-
if (!w || !
|
|
3870
|
-
const
|
|
3871
|
-
return [...n].sort((O,
|
|
3872
|
-
}, [n, w, B]), E = $.map((
|
|
3873
|
-
label:
|
|
3874
|
-
align:
|
|
3875
|
-
width:
|
|
3876
|
-
sortable: !!
|
|
3877
|
-
sortDir: (w == null ? void 0 : w.key) ===
|
|
3878
|
-
onSort:
|
|
3870
|
+
}, B = w ? t.find((D) => D.key === w.key) : void 0, A = xe(() => {
|
|
3871
|
+
const D = B == null ? void 0 : B.sortValue;
|
|
3872
|
+
if (!w || !D) return n;
|
|
3873
|
+
const R = w.dir === "asc" ? 1 : -1;
|
|
3874
|
+
return [...n].sort((O, U) => xs(D(O), D(U), R));
|
|
3875
|
+
}, [n, w, B]), E = $.map((D) => ({
|
|
3876
|
+
label: D.title,
|
|
3877
|
+
align: D.align,
|
|
3878
|
+
width: D.width,
|
|
3879
|
+
sortable: !!D.sortValue,
|
|
3880
|
+
sortDir: (w == null ? void 0 : w.key) === D.key ? w.dir : null,
|
|
3881
|
+
onSort: D.sortValue ? () => L(D) : void 0
|
|
3879
3882
|
})), F = !c && s ? /* @__PURE__ */ e(us, { icon: s.icon, title: s.heading, subtitle: s.text, action: s.action }) : void 0, W = u && p.length > 0 ? /* @__PURE__ */ e(
|
|
3880
3883
|
We,
|
|
3881
3884
|
{
|
|
@@ -3884,33 +3887,33 @@ function to({
|
|
|
3884
3887
|
placement: "bottom-end",
|
|
3885
3888
|
role: "menu",
|
|
3886
3889
|
activator: /* @__PURE__ */ e(
|
|
3887
|
-
|
|
3890
|
+
be,
|
|
3888
3891
|
{
|
|
3889
3892
|
icon: /* @__PURE__ */ e(ec, {}),
|
|
3890
3893
|
label: "Colunas",
|
|
3891
3894
|
size: "sm",
|
|
3892
3895
|
active: v,
|
|
3893
3896
|
"aria-expanded": v,
|
|
3894
|
-
onClick: () => x((
|
|
3897
|
+
onClick: () => x((D) => !D)
|
|
3895
3898
|
}
|
|
3896
3899
|
),
|
|
3897
|
-
children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "menu", children: p.map((
|
|
3898
|
-
const
|
|
3900
|
+
children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "menu", children: p.map((D) => {
|
|
3901
|
+
const R = !S(D), O = R && M.length === 1;
|
|
3899
3902
|
return /* @__PURE__ */ m(
|
|
3900
3903
|
"button",
|
|
3901
3904
|
{
|
|
3902
3905
|
type: "button",
|
|
3903
3906
|
role: "menuitemcheckbox",
|
|
3904
|
-
"aria-checked":
|
|
3907
|
+
"aria-checked": R,
|
|
3905
3908
|
disabled: O,
|
|
3906
3909
|
className: "select-facet__opt",
|
|
3907
|
-
onClick: () => C(
|
|
3910
|
+
onClick: () => C(D),
|
|
3908
3911
|
children: [
|
|
3909
|
-
/* @__PURE__ */ e("span", { children:
|
|
3910
|
-
|
|
3912
|
+
/* @__PURE__ */ e("span", { children: D.title }),
|
|
3913
|
+
R && /* @__PURE__ */ e("span", { className: "select-facet__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Ae, {}) })
|
|
3911
3914
|
]
|
|
3912
3915
|
},
|
|
3913
|
-
|
|
3916
|
+
D.key
|
|
3914
3917
|
);
|
|
3915
3918
|
}) }) })
|
|
3916
3919
|
}
|
|
@@ -3919,7 +3922,7 @@ function to({
|
|
|
3919
3922
|
/* @__PURE__ */ e(ds, { columns: E, empty: F, title: i, help: r, filters: h, action: W ? /* @__PURE__ */ m("span", { className: "select-datatable__toolbar", children: [
|
|
3920
3923
|
d,
|
|
3921
3924
|
W
|
|
3922
|
-
] }) : d, children: c ? Array.from({ length: 5 }, (
|
|
3925
|
+
] }) : d, children: c ? Array.from({ length: 5 }, (D, R) => /* @__PURE__ */ e(Mn, { children: $.map((O, U) => /* @__PURE__ */ e($n, { align: O.align, width: O.width, children: /* @__PURE__ */ e("span", { className: "select-skeleton select-datatable__skel" }) }, U)) }, `skeleton-${R}`)) : A.map((D) => /* @__PURE__ */ e(Mn, { onClick: o ? () => o(D) : void 0, children: $.map((R, O) => /* @__PURE__ */ e($n, { align: R.align, width: R.width, children: R.render(D) }, O)) }, l(D))) }),
|
|
3923
3926
|
a && /* @__PURE__ */ m("div", { className: "select-datatable__pagination", children: [
|
|
3924
3927
|
a.pageSizeOptions && a.pageSizeOptions.length > 1 && a.onPageSizeChange && /* @__PURE__ */ e("div", { className: "select-datatable__pagesize", children: /* @__PURE__ */ e(
|
|
3925
3928
|
We,
|
|
@@ -3933,7 +3936,7 @@ function to({
|
|
|
3933
3936
|
{
|
|
3934
3937
|
type: "button",
|
|
3935
3938
|
className: `select-facet${N ? " is-active" : ""}`,
|
|
3936
|
-
onClick: () => k((
|
|
3939
|
+
onClick: () => k((D) => !D),
|
|
3937
3940
|
"aria-expanded": N,
|
|
3938
3941
|
"aria-haspopup": "listbox",
|
|
3939
3942
|
children: [
|
|
@@ -3941,32 +3944,32 @@ function to({
|
|
|
3941
3944
|
a.pageSize ?? "—",
|
|
3942
3945
|
" por página"
|
|
3943
3946
|
] }),
|
|
3944
|
-
/* @__PURE__ */ e("span", { className: `select-facet__caret${N ? " is-open" : ""}`, "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
3947
|
+
/* @__PURE__ */ e("span", { className: `select-facet__caret${N ? " is-open" : ""}`, "aria-hidden": "true", children: /* @__PURE__ */ e(ye, {}) })
|
|
3945
3948
|
]
|
|
3946
3949
|
}
|
|
3947
3950
|
),
|
|
3948
|
-
children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "listbox", children: a.pageSizeOptions.map((
|
|
3949
|
-
const
|
|
3951
|
+
children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "listbox", children: a.pageSizeOptions.map((D) => {
|
|
3952
|
+
const R = D === a.pageSize;
|
|
3950
3953
|
return /* @__PURE__ */ m(
|
|
3951
3954
|
"button",
|
|
3952
3955
|
{
|
|
3953
3956
|
type: "button",
|
|
3954
3957
|
role: "option",
|
|
3955
|
-
"aria-selected":
|
|
3956
|
-
className: `select-facet__opt${
|
|
3958
|
+
"aria-selected": R,
|
|
3959
|
+
className: `select-facet__opt${R ? " is-selected" : ""}`,
|
|
3957
3960
|
onClick: () => {
|
|
3958
3961
|
var O;
|
|
3959
|
-
(O = a.onPageSizeChange) == null || O.call(a,
|
|
3962
|
+
(O = a.onPageSizeChange) == null || O.call(a, D), k(!1);
|
|
3960
3963
|
},
|
|
3961
3964
|
children: [
|
|
3962
3965
|
/* @__PURE__ */ m("span", { children: [
|
|
3963
|
-
|
|
3966
|
+
D,
|
|
3964
3967
|
" por página"
|
|
3965
3968
|
] }),
|
|
3966
|
-
|
|
3969
|
+
R && /* @__PURE__ */ e("span", { className: "select-facet__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Ae, {}) })
|
|
3967
3970
|
]
|
|
3968
3971
|
},
|
|
3969
|
-
|
|
3972
|
+
D
|
|
3970
3973
|
);
|
|
3971
3974
|
}) }) })
|
|
3972
3975
|
}
|
|
@@ -4016,18 +4019,18 @@ function ws(t, n) {
|
|
|
4016
4019
|
return n ? `${l} ${Te(t.getHours())}:${Te(t.getMinutes())}` : l;
|
|
4017
4020
|
}
|
|
4018
4021
|
const ks = P(function({ label: n, value: l, onChange: c, showTime: s = !1, placeholder: a, required: o, disabled: i, error: r, hint: d, minDate: h, maxDate: u, clearable: f = !0, id: g, className: v, ...x }, N) {
|
|
4019
|
-
const k = ne(), _ = g ?? k, [p, b] = T(!1), S = $s(l), [$, M] = T(() => vt(S ?? /* @__PURE__ */ new Date())), w = h ? ct(h) : null, y = u ? ct(u) : null, C = (
|
|
4020
|
-
i || (M(vt(S ?? /* @__PURE__ */ new Date())), b((
|
|
4021
|
-
}, F = (
|
|
4022
|
-
if (C(
|
|
4023
|
-
const O = new Date(
|
|
4022
|
+
const k = ne(), _ = g ?? k, [p, b] = T(!1), S = $s(l), [$, M] = T(() => vt(S ?? /* @__PURE__ */ new Date())), w = h ? ct(h) : null, y = u ? ct(u) : null, C = (R) => !!w && ct(R) < w || !!y && ct(R) > y, L = Sn(vt($), -vt($).getDay()), B = Array.from({ length: 42 }, (R, O) => Sn(L, O)), A = ct(/* @__PURE__ */ new Date()), E = () => {
|
|
4023
|
+
i || (M(vt(S ?? /* @__PURE__ */ new Date())), b((R) => !R));
|
|
4024
|
+
}, F = (R) => {
|
|
4025
|
+
if (C(R)) return;
|
|
4026
|
+
const O = new Date(R);
|
|
4024
4027
|
s && O.setHours((S == null ? void 0 : S.getHours()) ?? 0, (S == null ? void 0 : S.getMinutes()) ?? 0, 0, 0), c(An(O, s)), s || b(!1);
|
|
4025
|
-
}, W = (
|
|
4026
|
-
const [O = "",
|
|
4027
|
-
|
|
4028
|
+
}, W = (R) => {
|
|
4029
|
+
const [O = "", U = ""] = R.split(":"), q = Number(O), oe = Number(U), _e = new Date(S ?? A);
|
|
4030
|
+
_e.setHours(Number.isFinite(q) ? q : 0, Number.isFinite(oe) ? oe : 0, 0, 0), c(An(_e, !0));
|
|
4028
4031
|
}, Z = () => {
|
|
4029
4032
|
c(""), b(!1);
|
|
4030
|
-
},
|
|
4033
|
+
}, D = /* @__PURE__ */ m("div", { className: `select-input-wrap${r ? " select-input-wrap--error" : ""}`, children: [
|
|
4031
4034
|
/* @__PURE__ */ e(
|
|
4032
4035
|
"button",
|
|
4033
4036
|
{
|
|
@@ -4046,21 +4049,21 @@ const ks = P(function({ label: n, value: l, onChange: c, showTime: s = !1, place
|
|
|
4046
4049
|
] });
|
|
4047
4050
|
return /* @__PURE__ */ m("div", { ref: N, ...x, className: `select-field${v ? " " + v : ""}`, children: [
|
|
4048
4051
|
n && /* @__PURE__ */ e(lt, { htmlFor: _, label: o ? `${n} *` : n }),
|
|
4049
|
-
/* @__PURE__ */ e("div", { className: "select-datefield", children: /* @__PURE__ */ e(We, { active: p, onClose: () => b(!1), placement: "bottom-start", role: "dialog", activator:
|
|
4052
|
+
/* @__PURE__ */ e("div", { className: "select-datefield", children: /* @__PURE__ */ e(We, { active: p, onClose: () => b(!1), placement: "bottom-start", role: "dialog", activator: D, children: /* @__PURE__ */ m("div", { className: "select-datefield__pop", children: [
|
|
4050
4053
|
/* @__PURE__ */ m("div", { className: "select-datepicker__calhead", children: [
|
|
4051
|
-
/* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Mês anterior", onClick: () => M((
|
|
4054
|
+
/* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Mês anterior", onClick: () => M((R) => Cn(R, -1)), children: /* @__PURE__ */ e(Kt, {}) }),
|
|
4052
4055
|
/* @__PURE__ */ m("span", { className: "select-datepicker__monthlabel", children: [
|
|
4053
4056
|
Ms[$.getMonth()],
|
|
4054
4057
|
" ",
|
|
4055
4058
|
$.getFullYear()
|
|
4056
4059
|
] }),
|
|
4057
|
-
/* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Próximo mês", onClick: () => M((
|
|
4060
|
+
/* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Próximo mês", onClick: () => M((R) => Cn(R, 1)), children: /* @__PURE__ */ e(dt, {}) })
|
|
4058
4061
|
] }),
|
|
4059
4062
|
/* @__PURE__ */ m("div", { className: "select-datepicker__grid", role: "grid", children: [
|
|
4060
|
-
Ns.map((
|
|
4061
|
-
B.map((
|
|
4062
|
-
const O =
|
|
4063
|
-
return /* @__PURE__ */ e("div", { className: "select-datepicker__day", children: /* @__PURE__ */ e("button", { type: "button", className: q, disabled: C(
|
|
4063
|
+
Ns.map((R) => /* @__PURE__ */ e("div", { className: "select-datepicker__weekday", children: R }, R)),
|
|
4064
|
+
B.map((R) => {
|
|
4065
|
+
const O = R.getMonth() !== $.getMonth(), U = !!S && Ln(R, S), q = "select-datepicker__daybtn" + (U ? " is-selected" : "") + (Ln(R, A) && !U ? " is-today" : "") + (O ? " is-outside" : "");
|
|
4066
|
+
return /* @__PURE__ */ e("div", { className: "select-datepicker__day", children: /* @__PURE__ */ e("button", { type: "button", className: q, disabled: C(R), onClick: () => F(R), children: R.getDate() }) }, R.getTime());
|
|
4064
4067
|
})
|
|
4065
4068
|
] }),
|
|
4066
4069
|
s && /* @__PURE__ */ m("div", { className: "select-datefield__time", children: [
|
|
@@ -4072,15 +4075,15 @@ const ks = P(function({ label: n, value: l, onChange: c, showTime: s = !1, place
|
|
|
4072
4075
|
className: "select-input select-datefield__time-input",
|
|
4073
4076
|
"aria-label": "Horário",
|
|
4074
4077
|
value: S ? `${Te(S.getHours())}:${Te(S.getMinutes())}` : "",
|
|
4075
|
-
onChange: (
|
|
4078
|
+
onChange: (R) => W(R.target.value)
|
|
4076
4079
|
}
|
|
4077
4080
|
)
|
|
4078
4081
|
] }),
|
|
4079
4082
|
/* @__PURE__ */ m("div", { className: "select-datefield__footer", children: [
|
|
4080
|
-
f && S ? /* @__PURE__ */ e(
|
|
4083
|
+
f && S ? /* @__PURE__ */ e(ge, { variant: "secondary", inline: !0, onClick: Z, children: "Limpar" }) : /* @__PURE__ */ e("span", {}),
|
|
4081
4084
|
/* @__PURE__ */ m("div", { className: "select-datefield__footer-right", children: [
|
|
4082
|
-
/* @__PURE__ */ e(
|
|
4083
|
-
s && /* @__PURE__ */ e(
|
|
4085
|
+
/* @__PURE__ */ e(ge, { variant: "secondary", inline: !0, onClick: () => F(A), children: "Hoje" }),
|
|
4086
|
+
s && /* @__PURE__ */ e(ge, { variant: "primary", inline: !0, onClick: () => b(!1), children: "Concluir" })
|
|
4084
4087
|
] })
|
|
4085
4088
|
] })
|
|
4086
4089
|
] }) }) }),
|
|
@@ -4123,7 +4126,7 @@ function Ss({
|
|
|
4123
4126
|
title: u ? t.error : void 0,
|
|
4124
4127
|
children: [
|
|
4125
4128
|
/* @__PURE__ */ e("span", { className: "select-facet__label", children: h != null ? `${t.label}: ${h}` : t.label }),
|
|
4126
|
-
/* @__PURE__ */ e("span", { className: `select-facet__caret${c ? " is-open" : ""}`, "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
4129
|
+
/* @__PURE__ */ e("span", { className: `select-facet__caret${c ? " is-open" : ""}`, "aria-hidden": "true", children: /* @__PURE__ */ e(ye, {}) })
|
|
4127
4130
|
]
|
|
4128
4131
|
}
|
|
4129
4132
|
),
|
|
@@ -4330,7 +4333,7 @@ const no = P(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
4330
4333
|
}
|
|
4331
4334
|
)
|
|
4332
4335
|
] }, b.value)),
|
|
4333
|
-
/* @__PURE__ */ e("span", { className: "select-tagselect__caret", "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
4336
|
+
/* @__PURE__ */ e("span", { className: "select-tagselect__caret", "aria-hidden": "true", children: /* @__PURE__ */ e(ye, {}) })
|
|
4334
4337
|
]
|
|
4335
4338
|
}
|
|
4336
4339
|
),
|
|
@@ -4398,7 +4401,7 @@ function so({ children: t }) {
|
|
|
4398
4401
|
d.forEach((h) => clearTimeout(h)), d.clear();
|
|
4399
4402
|
};
|
|
4400
4403
|
}, []);
|
|
4401
|
-
const r =
|
|
4404
|
+
const r = xe(
|
|
4402
4405
|
() => ({
|
|
4403
4406
|
show: i,
|
|
4404
4407
|
success: (d, h) => i(d, { variant: "success", duration: h }),
|
|
@@ -4441,7 +4444,7 @@ const Fs = { desktop: "100%", mobile: 390 }, ro = P(function({ src: n, title: l
|
|
|
4441
4444
|
/* @__PURE__ */ m("div", { className: "select-preview__actions", children: [
|
|
4442
4445
|
a && /* @__PURE__ */ m(ae, { children: [
|
|
4443
4446
|
/* @__PURE__ */ e(
|
|
4444
|
-
|
|
4447
|
+
be,
|
|
4445
4448
|
{
|
|
4446
4449
|
size: "sm",
|
|
4447
4450
|
icon: /* @__PURE__ */ e(Un, {}),
|
|
@@ -4451,7 +4454,7 @@ const Fs = { desktop: "100%", mobile: 390 }, ro = P(function({ src: n, title: l
|
|
|
4451
4454
|
}
|
|
4452
4455
|
),
|
|
4453
4456
|
/* @__PURE__ */ e(
|
|
4454
|
-
|
|
4457
|
+
be,
|
|
4455
4458
|
{
|
|
4456
4459
|
size: "sm",
|
|
4457
4460
|
icon: /* @__PURE__ */ e(Kl, {}),
|
|
@@ -4461,7 +4464,7 @@ const Fs = { desktop: "100%", mobile: 390 }, ro = P(function({ src: n, title: l
|
|
|
4461
4464
|
}
|
|
4462
4465
|
)
|
|
4463
4466
|
] }),
|
|
4464
|
-
/* @__PURE__ */ e(
|
|
4467
|
+
/* @__PURE__ */ e(be, { size: "sm", icon: /* @__PURE__ */ e(Jl, {}), label: "Recarregar", onClick: k, disabled: !n }),
|
|
4465
4468
|
n && /* @__PURE__ */ e(
|
|
4466
4469
|
"a",
|
|
4467
4470
|
{
|
|
@@ -4522,7 +4525,7 @@ function oo({ children: t }) {
|
|
|
4522
4525
|
const i = !o;
|
|
4523
4526
|
return En(i), i;
|
|
4524
4527
|
});
|
|
4525
|
-
}, []), a =
|
|
4528
|
+
}, []), a = xe(() => ({ hidden: n, toggle: s, setHidden: c }), [n, s, c]);
|
|
4526
4529
|
return /* @__PURE__ */ e($l.Provider, { value: a, children: t });
|
|
4527
4530
|
}
|
|
4528
4531
|
function wl() {
|
|
@@ -4562,7 +4565,7 @@ const Os = new Intl.NumberFormat("pt-BR", {
|
|
|
4562
4565
|
function io() {
|
|
4563
4566
|
const { hidden: t, toggle: n } = wl();
|
|
4564
4567
|
return /* @__PURE__ */ e(
|
|
4565
|
-
|
|
4568
|
+
be,
|
|
4566
4569
|
{
|
|
4567
4570
|
variant: "outline",
|
|
4568
4571
|
icon: t ? /* @__PURE__ */ e(qn, {}) : /* @__PURE__ */ e(Yn, {}),
|
|
@@ -4577,7 +4580,7 @@ const uo = P(function({ availableCents: n, availableLabel: l = "Saldo disponíve
|
|
|
4577
4580
|
/* @__PURE__ */ m("div", { className: "select-balance__head", children: [
|
|
4578
4581
|
/* @__PURE__ */ e("h3", { className: "select-balance__title", children: l }),
|
|
4579
4582
|
a && /* @__PURE__ */ e(
|
|
4580
|
-
|
|
4583
|
+
ge,
|
|
4581
4584
|
{
|
|
4582
4585
|
variant: "primary",
|
|
4583
4586
|
size: "sm",
|
|
@@ -4667,7 +4670,7 @@ function js() {
|
|
|
4667
4670
|
return l(), window.addEventListener("resize", l), () => window.removeEventListener("resize", l);
|
|
4668
4671
|
}, []), t;
|
|
4669
4672
|
}
|
|
4670
|
-
function
|
|
4673
|
+
function le(t) {
|
|
4671
4674
|
const n = Y(null), [l, c] = T(0), s = js();
|
|
4672
4675
|
return Ee(() => {
|
|
4673
4676
|
const a = n.current;
|
|
@@ -4695,12 +4698,12 @@ function Ct(t, n) {
|
|
|
4695
4698
|
return o.observe(s), () => o.disconnect();
|
|
4696
4699
|
}, [t]), l;
|
|
4697
4700
|
}
|
|
4698
|
-
function
|
|
4701
|
+
function Ne(t) {
|
|
4699
4702
|
if (t <= 0) return 1;
|
|
4700
4703
|
const n = Math.floor(Math.log10(t)), l = Math.pow(10, n), c = t / l;
|
|
4701
4704
|
return (c <= 1 ? 1 : c <= 2 ? 2 : c <= 5 ? 5 : 10) * l;
|
|
4702
4705
|
}
|
|
4703
|
-
function
|
|
4706
|
+
function Se(t, n = 4) {
|
|
4704
4707
|
return Array.from({ length: n + 1 }, (l, c) => t / n * c);
|
|
4705
4708
|
}
|
|
4706
4709
|
function Vs(t, n = 5) {
|
|
@@ -4772,7 +4775,7 @@ function z(t) {
|
|
|
4772
4775
|
}
|
|
4773
4776
|
const Ie = { top: 16, right: 22, bottom: 32, left: 48 };
|
|
4774
4777
|
function fo({ data: t, color: n, height: l = 40, className: c, ...s }) {
|
|
4775
|
-
const { ref: a, width: o } =
|
|
4778
|
+
const { ref: a, width: o } = le(l), i = n ?? j(0), r = ne(), d = 4;
|
|
4776
4779
|
let h = null;
|
|
4777
4780
|
if (o > 0 && t.length > 1) {
|
|
4778
4781
|
const u = Math.max(...t), f = Math.min(...t), g = u - f || 1, v = t.map((N, k) => [
|
|
@@ -4832,14 +4835,14 @@ function J({ tip: t, className: n, ...l }) {
|
|
|
4832
4835
|
] });
|
|
4833
4836
|
}
|
|
4834
4837
|
function _o({ data: t, height: n = 240, color: l, format: c = z, className: s, ...a }) {
|
|
4835
|
-
const { ref: o, width: i } =
|
|
4838
|
+
const { ref: o, width: i } = le(n), r = K(), d = ne(), h = l ?? j(0), u = Ne(Math.max(0, ...t.map((p) => p.value))), f = Ie, g = Math.max(0, i - f.left - f.right), v = n - f.top - f.bottom, x = t.length > 0 ? g / t.length : 0, N = Math.min(x * 0.62, 44), k = f.top + v, _ = (p) => k - p / u * v;
|
|
4836
4839
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: o, children: [
|
|
4837
4840
|
i > 0 && /* @__PURE__ */ m("svg", { width: i, height: n, className: "select-chart", children: [
|
|
4838
4841
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${d}-bar`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4839
4842
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: h, stopOpacity: 1 }),
|
|
4840
4843
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: h, stopOpacity: 0.62 })
|
|
4841
4844
|
] }) }),
|
|
4842
|
-
|
|
4845
|
+
Se(u).map((p, b) => /* @__PURE__ */ m("g", { children: [
|
|
4843
4846
|
/* @__PURE__ */ e(
|
|
4844
4847
|
"line",
|
|
4845
4848
|
{
|
|
@@ -4883,7 +4886,7 @@ function _o({ data: t, height: n = 240, color: l, format: c = z, className: s, .
|
|
|
4883
4886
|
] });
|
|
4884
4887
|
}
|
|
4885
4888
|
function vo({ series: t, labels: n, height: l = 240, format: c = z, area: s = !1, className: a, ...o }) {
|
|
4886
|
-
const { ref: i, width: r } =
|
|
4889
|
+
const { ref: i, width: r } = le(l), d = K(), h = ne(), [u, f] = T(null), { max: g, values: v } = Vs(Math.max(0, ...t.flatMap((w) => w.data))), x = Ie, N = Math.max(0, r - x.left - x.right), k = l - x.top - x.bottom, _ = n.length, p = (w) => x.left + (_ <= 1 ? N / 2 : w / (_ - 1) * N), b = (w) => x.top + k - w / g * k, S = _ > 1 ? N / (_ - 1) : N, $ = Math.max(1, Math.ceil(_ / 7)), M = x.top + k;
|
|
4887
4890
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${a ? " " + a : ""}`, ref: i, children: [
|
|
4888
4891
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: l, className: "select-chart", children: [
|
|
4889
4892
|
/* @__PURE__ */ e("defs", { children: t.map((w, y) => {
|
|
@@ -4970,9 +4973,9 @@ function vo({ series: t, labels: n, height: l = 240, format: c = z, area: s = !1
|
|
|
4970
4973
|
] });
|
|
4971
4974
|
}
|
|
4972
4975
|
function go({ series: t, labels: n, height: l = 240, format: c = z, className: s, ...a }) {
|
|
4973
|
-
const { ref: o, width: i } =
|
|
4976
|
+
const { ref: o, width: i } = le(l), r = K(), d = ne(), [h, u] = T(null), f = n.length, g = new Array(f).fill(0), v = t.map(
|
|
4974
4977
|
(y) => y.data.map((C, L) => (g[L] = (g[L] ?? 0) + (C ?? 0), g[L]))
|
|
4975
|
-
), x =
|
|
4978
|
+
), x = Ne(Math.max(0, ...g)), N = Ie, k = Math.max(0, i - N.left - N.right), _ = l - N.top - N.bottom, p = (y) => N.left + (f <= 1 ? k / 2 : y / (f - 1) * k), b = (y) => N.top + _ - y / x * _, S = f > 1 ? k / (f - 1) : k, $ = Math.max(1, Math.ceil(f / 7)), M = N.top + _, w = v[v.length - 1];
|
|
4976
4979
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: o, children: [
|
|
4977
4980
|
i > 0 && /* @__PURE__ */ m("svg", { width: i, height: l, className: "select-chart", children: [
|
|
4978
4981
|
/* @__PURE__ */ e("defs", { children: t.map((y, C) => {
|
|
@@ -4982,7 +4985,7 @@ function go({ series: t, labels: n, height: l = 240, format: c = z, className: s
|
|
|
4982
4985
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: L, stopOpacity: 0.4 })
|
|
4983
4986
|
] }, C);
|
|
4984
4987
|
}) }),
|
|
4985
|
-
|
|
4988
|
+
Se(x).map((y, C) => /* @__PURE__ */ m("g", { children: [
|
|
4986
4989
|
/* @__PURE__ */ e(
|
|
4987
4990
|
"line",
|
|
4988
4991
|
{
|
|
@@ -5036,14 +5039,14 @@ function go({ series: t, labels: n, height: l = 240, format: c = z, className: s
|
|
|
5036
5039
|
] });
|
|
5037
5040
|
}
|
|
5038
5041
|
function bo({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = z, formatLine: a = (r) => `${Math.round(r)}%`, className: o, ...i }) {
|
|
5039
|
-
const { ref: r, width: d } =
|
|
5042
|
+
const { ref: r, width: d } = le(c), h = K(), u = ne(), [f, g] = T(null), v = { ...Ie, right: 58 }, x = Math.max(0, d - v.left - v.right), N = c - v.top - v.bottom, k = t.length, _ = Ne(Math.max(0, ...n.data)), p = Ne(Math.max(0, ...l.data)), b = k > 0 ? x / k : 0, S = Math.min(b * 0.5, 36), $ = Math.max(1, Math.ceil(k / 8)), M = n.color ?? j(0), w = l.color ?? j(1), y = v.top + N, C = (E) => y - E / _ * N, L = (E) => y - E / p * N, B = (E) => v.left + b * E + b / 2, A = l.data.map((E, F) => [B(F), L(E)]);
|
|
5040
5043
|
return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${o ? " " + o : ""}`, ref: r, children: [
|
|
5041
5044
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: c, className: "select-chart", children: [
|
|
5042
5045
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${u}-bar`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
5043
5046
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: M, stopOpacity: 1 }),
|
|
5044
5047
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: M, stopOpacity: 0.55 })
|
|
5045
5048
|
] }) }),
|
|
5046
|
-
|
|
5049
|
+
Se(_).map((E, F) => /* @__PURE__ */ m("g", { children: [
|
|
5047
5050
|
/* @__PURE__ */ e(
|
|
5048
5051
|
"line",
|
|
5049
5052
|
{
|
|
@@ -5056,7 +5059,7 @@ function bo({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = z, fo
|
|
|
5056
5059
|
),
|
|
5057
5060
|
/* @__PURE__ */ e("text", { x: v.left - 8, y: C(E), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: s(E) })
|
|
5058
5061
|
] }, F)),
|
|
5059
|
-
|
|
5062
|
+
Se(p).map((E, F) => /* @__PURE__ */ e("text", { x: d - 4, y: L(E), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: a(E) }, `r${F}`)),
|
|
5060
5063
|
n.data.map((E, F) => {
|
|
5061
5064
|
const W = E / _ * N;
|
|
5062
5065
|
return /* @__PURE__ */ e(
|
|
@@ -5183,7 +5186,7 @@ const yo = P(function({ segments: n, size: l = 200, thickness: c = 26, format: s
|
|
|
5183
5186
|
] });
|
|
5184
5187
|
});
|
|
5185
5188
|
function xo({ series: t, labels: n, height: l = 240, format: c = z, stacked: s = !1, className: a, ...o }) {
|
|
5186
|
-
const { ref: i, width: r } =
|
|
5189
|
+
const { ref: i, width: r } = le(l), d = K(), h = ne(), u = n.length, f = t.length || 1, g = n.map((M, w) => t.reduce((y, C) => y + (C.data[w] ?? 0), 0)), v = Ne(s ? Math.max(0, ...g) : Math.max(0, ...t.flatMap((M) => M.data))), x = Ie, N = Math.max(0, r - x.left - x.right), k = l - x.top - x.bottom, _ = x.top + k, p = u ? N / u : 0, b = (M) => _ - M / v * k, S = Math.min(p * 0.72, f * 40), $ = s ? Math.min(p * 0.5, 44) : S / f;
|
|
5187
5190
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${a ? " " + a : ""}`, ref: i, children: [
|
|
5188
5191
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: l, className: "select-chart", children: [
|
|
5189
5192
|
/* @__PURE__ */ e("defs", { children: t.map((M, w) => {
|
|
@@ -5193,7 +5196,7 @@ function xo({ series: t, labels: n, height: l = 240, format: c = z, stacked: s =
|
|
|
5193
5196
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: y, stopOpacity: 0.62 })
|
|
5194
5197
|
] }, w);
|
|
5195
5198
|
}) }),
|
|
5196
|
-
|
|
5199
|
+
Se(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
|
|
5197
5200
|
/* @__PURE__ */ e(
|
|
5198
5201
|
"line",
|
|
5199
5202
|
{
|
|
@@ -5381,11 +5384,11 @@ const Gs = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
|
|
|
5381
5384
|
color: L > 0.55 ? "#fff" : "var(--select-text)"
|
|
5382
5385
|
},
|
|
5383
5386
|
onMouseEnter: (E) => {
|
|
5384
|
-
const F = E.currentTarget.closest(".select-chart-wrap"), W = E.currentTarget.getBoundingClientRect(), Z = F == null ? void 0 : F.getBoundingClientRect(),
|
|
5387
|
+
const F = E.currentTarget.closest(".select-chart-wrap"), W = E.currentTarget.getBoundingClientRect(), Z = F == null ? void 0 : F.getBoundingClientRect(), D = Z ? W.top - Z.top : 0, R = D < 64 ? "bottom" : "top", O = (Z ? W.left - Z.left : 0) + W.width / 2, U = R === "bottom" ? Z ? W.bottom - Z.top : 0 : D;
|
|
5385
5388
|
x.show({
|
|
5386
5389
|
x: O,
|
|
5387
|
-
y:
|
|
5388
|
-
place:
|
|
5390
|
+
y: U,
|
|
5391
|
+
place: R,
|
|
5389
5392
|
title: `${M.label} · ${n[y] ?? ""}`,
|
|
5390
5393
|
rows: [{ label: "Valor", value: (s ?? c)(w), color: a }]
|
|
5391
5394
|
});
|
|
@@ -5482,7 +5485,7 @@ const Wt = (t) => Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0, ko = P
|
|
|
5482
5485
|
] });
|
|
5483
5486
|
}), Rn = 6.1, Ot = 12, Dn = 56, Us = 0.4;
|
|
5484
5487
|
function So({ data: t, height: n, color: l, format: c = z, formatValue: s, distributed: a = !0, labelWidth: o, className: i, ...r }) {
|
|
5485
|
-
const g = n ?? t.length * 36 + 6 + 26, { ref: v, width: x } =
|
|
5488
|
+
const g = n ?? t.length * 36 + 6 + 26, { ref: v, width: x } = le(g), N = K(), k = ne(), _ = Ne(Math.max(0, ...t.map((E) => E.value))), p = t.reduce((E, F) => Math.max(E, F.label.length), 0), b = Math.min(
|
|
5486
5489
|
Math.max(Dn, p * Rn + Ot),
|
|
5487
5490
|
Math.max(Dn, x * Us)
|
|
5488
5491
|
), S = o ?? b, $ = Math.max(3, Math.floor((S - Ot) / Rn)), M = (E) => E.length <= $ ? E : `${E.slice(0, $ - 1).trimEnd()}…`, w = Math.max(0, x - S - 28), y = g - 6 - 26, C = t.length ? y / t.length : 0, L = Math.min(C * 0.62, 22), B = (E) => S + E / _ * w, A = (E, F) => E.color ?? (a ? j(F) : l ?? j(0));
|
|
@@ -5495,7 +5498,7 @@ function So({ data: t, height: n, color: l, format: c = z, formatValue: s, distr
|
|
|
5495
5498
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: W, stopOpacity: 0.5 })
|
|
5496
5499
|
] }, F);
|
|
5497
5500
|
}) }),
|
|
5498
|
-
|
|
5501
|
+
Se(_).map((E, F) => /* @__PURE__ */ m("g", { children: [
|
|
5499
5502
|
/* @__PURE__ */ e(
|
|
5500
5503
|
"line",
|
|
5501
5504
|
{
|
|
@@ -5509,7 +5512,7 @@ function So({ data: t, height: n, color: l, format: c = z, formatValue: s, distr
|
|
|
5509
5512
|
/* @__PURE__ */ e("text", { x: B(E), y: g - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: c(E) })
|
|
5510
5513
|
] }, F)),
|
|
5511
5514
|
t.map((E, F) => {
|
|
5512
|
-
const W = 6 + C * F + C / 2, Z = E.value / _ * w,
|
|
5515
|
+
const W = 6 + C * F + C / 2, Z = E.value / _ * w, D = A(E, F);
|
|
5513
5516
|
return /* @__PURE__ */ m("g", { children: [
|
|
5514
5517
|
/* @__PURE__ */ e("rect", { x: S, y: W - L / 2, width: w, height: L, rx: 5, className: "select-chart__track-bar" }),
|
|
5515
5518
|
/* @__PURE__ */ e(
|
|
@@ -5527,7 +5530,7 @@ function So({ data: t, height: n, color: l, format: c = z, formatValue: s, distr
|
|
|
5527
5530
|
x: S + Z,
|
|
5528
5531
|
y: W - L / 2,
|
|
5529
5532
|
place: W - L / 2 < 50 ? "bottom" : "top",
|
|
5530
|
-
rows: [{ label: E.label, value: (s ?? c)(E.value), color:
|
|
5533
|
+
rows: [{ label: E.label, value: (s ?? c)(E.value), color: D }]
|
|
5531
5534
|
}),
|
|
5532
5535
|
onMouseLeave: N.hide
|
|
5533
5536
|
}
|
|
@@ -5553,14 +5556,14 @@ function So({ data: t, height: n, color: l, format: c = z, formatValue: s, distr
|
|
|
5553
5556
|
] });
|
|
5554
5557
|
}
|
|
5555
5558
|
function Co({ data: t, height: n = 240, format: l = z, className: c, ...s }) {
|
|
5556
|
-
const { ref: a, width: o } =
|
|
5559
|
+
const { ref: a, width: o } = le(n), i = K(), r = ne();
|
|
5557
5560
|
let d = 0;
|
|
5558
5561
|
const h = t.map(($) => {
|
|
5559
5562
|
if ($.total)
|
|
5560
5563
|
return d = $.value, { ...$, start: 0, end: $.value };
|
|
5561
5564
|
const M = d;
|
|
5562
5565
|
return d += $.value, { ...$, start: M, end: d };
|
|
5563
|
-
}), u =
|
|
5566
|
+
}), u = Ne(Math.max(0, ...h.map(($) => Math.max($.start, $.end)))), f = Ie, g = Math.max(0, o - f.left - f.right), v = n - f.top - f.bottom, x = f.top + v, N = t.length, k = N ? g / N : 0, _ = Math.min(k * 0.6, 46), p = ($) => x - $ / u * v, b = {
|
|
5564
5567
|
total: "var(--select-chart-1)",
|
|
5565
5568
|
inc: "var(--select-chart-4)",
|
|
5566
5569
|
dec: "var(--select-chart-3)"
|
|
@@ -5571,7 +5574,7 @@ function Co({ data: t, height: n = 240, format: l = z, className: c, ...s }) {
|
|
|
5571
5574
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: b[$], stopOpacity: 1 }),
|
|
5572
5575
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: b[$], stopOpacity: 0.62 })
|
|
5573
5576
|
] }, $)) }),
|
|
5574
|
-
|
|
5577
|
+
Se(u).map(($, M) => /* @__PURE__ */ m("g", { children: [
|
|
5575
5578
|
/* @__PURE__ */ e(
|
|
5576
5579
|
"line",
|
|
5577
5580
|
{
|
|
@@ -5702,7 +5705,7 @@ function Ys(t, n, l) {
|
|
|
5702
5705
|
), c;
|
|
5703
5706
|
}
|
|
5704
5707
|
function Ao({ data: t, height: n = 240, format: l = z, className: c, ...s }) {
|
|
5705
|
-
const { ref: a, width: o } =
|
|
5708
|
+
const { ref: a, width: o } = le(n), i = K(), r = ne(), d = t.map((u, f) => f).sort((u, f) => t[f].value - t[u].value), h = o > 0 ? Ys(d.map((u) => t[u].value), o, n) : [];
|
|
5706
5709
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap select-treemap${c ? " " + c : ""}`, ref: a, children: [
|
|
5707
5710
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
|
|
5708
5711
|
/* @__PURE__ */ e("defs", { children: t.map((u, f) => {
|
|
@@ -5744,10 +5747,10 @@ function Ao({ data: t, height: n = 240, format: l = z, className: c, ...s }) {
|
|
|
5744
5747
|
] });
|
|
5745
5748
|
}
|
|
5746
5749
|
function Eo({ series: t, height: n = 240, xFormat: l = z, yFormat: c = z, xMax: s, yMax: a, maxRadius: o = 18, className: i, ...r }) {
|
|
5747
|
-
const { ref: d, width: h } =
|
|
5750
|
+
const { ref: d, width: h } = le(n), u = K(), f = t.flatMap((M) => M.points), g = Ne(s ?? Math.max(0, ...f.map((M) => M.x))), v = Ne(a ?? Math.max(0, ...f.map((M) => M.y))), x = Math.max(1, ...f.map((M) => M.r ?? 0)), N = Ie, k = Math.max(0, h - N.left - N.right), _ = n - N.top - N.bottom, p = N.top + _, b = (M) => N.left + M / g * k, S = (M) => p - M / v * _, $ = (M) => M.r ? 4 + Math.sqrt(M.r) / Math.sqrt(x) * (o - 4) : 4.5;
|
|
5748
5751
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${i ? " " + i : ""}`, ref: d, children: [
|
|
5749
5752
|
h > 0 && /* @__PURE__ */ m("svg", { width: h, height: n, className: "select-chart", children: [
|
|
5750
|
-
|
|
5753
|
+
Se(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
|
|
5751
5754
|
/* @__PURE__ */ e(
|
|
5752
5755
|
"line",
|
|
5753
5756
|
{
|
|
@@ -5760,7 +5763,7 @@ function Eo({ series: t, height: n = 240, xFormat: l = z, yFormat: c = z, xMax:
|
|
|
5760
5763
|
),
|
|
5761
5764
|
/* @__PURE__ */ e("text", { x: N.left - 8, y: S(M), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(M) })
|
|
5762
5765
|
] }, `y${w}`)),
|
|
5763
|
-
|
|
5766
|
+
Se(g).map((M, w, y) => /* @__PURE__ */ e("text", { x: b(M), y: n - N.bottom + 16, className: "select-chart__xlabel", textAnchor: w === 0 ? "start" : w === y.length - 1 ? "end" : "middle", children: l(M) }, `x${w}`)),
|
|
5764
5767
|
t.map((M, w) => {
|
|
5765
5768
|
const y = M.color ?? j(w);
|
|
5766
5769
|
return /* @__PURE__ */ e("g", { fill: y, children: M.points.map((C, L) => /* @__PURE__ */ e(
|
|
@@ -5791,7 +5794,7 @@ function Eo({ series: t, height: n = 240, xFormat: l = z, yFormat: c = z, xMax:
|
|
|
5791
5794
|
] });
|
|
5792
5795
|
}
|
|
5793
5796
|
const Bo = P(function({ axes: n, series: l, size: c = 240, max: s, format: a = z, levels: o = 4, legend: i = !0, className: r, ...d }, h) {
|
|
5794
|
-
const u = K(), f = ne(), g = n.length, v = c / 2, x = c / 2, N = c / 2 - 30, k = s ??
|
|
5797
|
+
const u = K(), f = ne(), g = n.length, v = c / 2, x = c / 2, N = c / 2 - 30, k = s ?? Ne(Math.max(1, ...l.flatMap((S) => S.values))), _ = (S) => (-90 + S * 360 / g) * Math.PI / 180, p = (S, $) => [v + $ * Math.cos(_(S)), x + $ * Math.sin(_(S))], b = (S) => S.map(($, M) => `${M === 0 ? "M" : "L"}${p(M, $).map((w) => w.toFixed(2)).join(",")}`).join(" ") + " Z";
|
|
5795
5798
|
return /* @__PURE__ */ m("div", { ref: h, ...d, className: `select-donut-wrap${r ? " " + r : ""}`, children: [
|
|
5796
5799
|
/* @__PURE__ */ m("div", { className: "select-radar", style: { width: c, aspectRatio: "1" }, children: [
|
|
5797
5800
|
/* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
@@ -5861,7 +5864,7 @@ const Bo = P(function({ axes: n, series: l, size: c = 240, max: s, format: a = z
|
|
|
5861
5864
|
] });
|
|
5862
5865
|
});
|
|
5863
5866
|
function Fo({ links: t, height: n = 260, format: l = z, nodeWidth: c = 14, nodeGap: s = 14, className: a, ...o }) {
|
|
5864
|
-
const { ref: i, width: r } =
|
|
5867
|
+
const { ref: i, width: r } = le(n), d = K(), h = [], u = [];
|
|
5865
5868
|
for (const y of t)
|
|
5866
5869
|
h.includes(y.source) || h.push(y.source), u.includes(y.target) || u.push(y.target);
|
|
5867
5870
|
const f = t.reduce((y, C) => y + C.value, 0) || 1, g = (y, C) => t.filter((L) => L[C] === y).reduce((L, B) => L + B.value, 0), v = 6, x = n - v * 2, N = Math.max(h.length, u.length), k = s * Math.max(0, N - 1), _ = (x - k) / f, p = (y, C, L) => {
|
|
@@ -5909,7 +5912,7 @@ function Fo({ links: t, height: n = 260, format: l = z, nodeWidth: c = 14, nodeG
|
|
|
5909
5912
|
] });
|
|
5910
5913
|
}
|
|
5911
5914
|
function Io({ data: t, height: n = 240, format: l = z, upColor: c = "var(--select-chart-4)", downColor: s = "var(--select-chart-3)", className: a, ...o }) {
|
|
5912
|
-
const { ref: i, width: r } =
|
|
5915
|
+
const { ref: i, width: r } = le(n), d = K(), h = Ie, u = Math.max(0, r - h.left - h.right), f = n - h.top - h.bottom, g = h.top + f, v = Math.max(1, ...t.map((w) => w.high)), x = Math.min(v, ...t.map((w) => w.low)), N = (v - x) * 0.08 || 1, k = x - N, _ = v + N, p = (w) => g - (w - k) / (_ - k) * f, b = t.length, S = b ? u / b : 0, $ = Math.min(S * 0.5, 18), M = Array.from({ length: 5 }, (w, y) => k + (_ - k) * y / 4);
|
|
5913
5916
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${a ? " " + a : ""}`, ref: i, children: [
|
|
5914
5917
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
|
|
5915
5918
|
M.map((w, y) => /* @__PURE__ */ m("g", { children: [
|
|
@@ -5961,10 +5964,10 @@ function Io({ data: t, height: n = 240, format: l = z, upColor: c = "var(--selec
|
|
|
5961
5964
|
] });
|
|
5962
5965
|
}
|
|
5963
5966
|
function Po({ data: t, height: n = 240, format: l = z, className: c, ...s }) {
|
|
5964
|
-
const { ref: a, width: o } =
|
|
5967
|
+
const { ref: a, width: o } = le(n), i = K(), r = Ie, d = Math.max(0, o - r.left - r.right), h = n - r.top - r.bottom, u = r.top + h, f = Ne(Math.max(1, ...t.map((k) => k.max))), g = (k) => u - k / f * h, v = t.length, x = v ? d / v : 0, N = Math.min(x * 0.5, 40);
|
|
5965
5968
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
5966
5969
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
|
|
5967
|
-
|
|
5970
|
+
Se(f).map((k, _) => /* @__PURE__ */ m("g", { children: [
|
|
5968
5971
|
/* @__PURE__ */ e(
|
|
5969
5972
|
"line",
|
|
5970
5973
|
{
|
|
@@ -6017,7 +6020,7 @@ function Po({ data: t, height: n = 240, format: l = z, className: c, ...s }) {
|
|
|
6017
6020
|
] });
|
|
6018
6021
|
}
|
|
6019
6022
|
function Ro({ data: t, height: n, min: l, max: c, format: s = z, labelWidth: a = 96, className: o, ...i }) {
|
|
6020
|
-
const f = n ?? t.length * 36 + 6 + 26, { ref: g, width: v } =
|
|
6023
|
+
const f = n ?? t.length * 36 + 6 + 26, { ref: g, width: v } = le(f), x = K(), N = ne(), k = l ?? Math.min(0, ...t.map((L) => L.start)), p = (c ?? Math.max(1, ...t.map((L) => L.end))) - k || 1, b = a, S = Math.max(0, v - b - 14), $ = f - 6 - 26, M = t.length ? $ / t.length : 0, w = Math.min(M * 0.6, 22), y = (L) => b + (L - k) / p * S, C = Array.from({ length: 5 }, (L, B) => k + p * B / 4);
|
|
6021
6024
|
return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${o ? " " + o : ""}`, ref: g, children: [
|
|
6022
6025
|
v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
|
|
6023
6026
|
/* @__PURE__ */ e("defs", { children: t.map((L, B) => {
|
|
@@ -6116,7 +6119,7 @@ const Do = P(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
6116
6119
|
/* @__PURE__ */ e(J, { tip: g.tip })
|
|
6117
6120
|
] });
|
|
6118
6121
|
}), To = P(function({ segments: n, size: l = 200, format: c = z, legend: s = !0, rose: a = !1, className: o, ...i }, r) {
|
|
6119
|
-
const d = K(), h = l / 2, u = l / 2, f = l / 2 - 2, g = n.length || 1, v =
|
|
6122
|
+
const d = K(), h = l / 2, u = l / 2, f = l / 2 - 2, g = n.length || 1, v = Ne(Math.max(1, ...n.map((k) => k.value))), x = (k) => a ? Math.max(0, k) / v * f : Math.sqrt(Math.max(0, k) / v) * f, N = 360 / g;
|
|
6120
6123
|
return /* @__PURE__ */ m("div", { ref: r, ...i, className: `select-donut-wrap${o ? " " + o : ""}`, children: [
|
|
6121
6124
|
/* @__PURE__ */ m("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: [
|
|
6122
6125
|
/* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
@@ -6147,7 +6150,7 @@ const Do = P(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
6147
6150
|
] });
|
|
6148
6151
|
});
|
|
6149
6152
|
function Wo({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s = z, className: a, ...o }) {
|
|
6150
|
-
const { ref: i, width: r } =
|
|
6153
|
+
const { ref: i, width: r } = le(c), d = K(), h = { top: 24, right: 64, bottom: 12, left: 132 }, u = Ne(Math.max(1, ...t.flatMap((N) => [N.left, N.right]))), f = c - h.top - h.bottom, g = (N) => h.top + f - N / u * f, v = h.left, x = r - h.right;
|
|
6151
6154
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${a ? " " + a : ""}`, ref: i, children: [
|
|
6152
6155
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: c, className: "select-chart", children: [
|
|
6153
6156
|
/* @__PURE__ */ e("line", { x1: v, x2: v, y1: h.top, y2: h.top + f, className: "select-chart__axis" }),
|
|
@@ -6194,10 +6197,10 @@ function Wo({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s =
|
|
|
6194
6197
|
] });
|
|
6195
6198
|
}
|
|
6196
6199
|
function Oo({ data: t, height: n, format: l = z, fromLabel: c = "Antes", toLabel: s = "Depois", labelWidth: a = 96, className: o, ...i }) {
|
|
6197
|
-
const f = n ?? t.length * 34 + 6 + 26, { ref: g, width: v } =
|
|
6200
|
+
const f = n ?? t.length * 34 + 6 + 26, { ref: g, width: v } = le(f), x = K(), N = "var(--select-chart-2)", k = "var(--select-chart-1)", _ = Ne(Math.max(1, ...t.flatMap((w) => [w.from, w.to]))), p = a, b = Math.max(0, v - p - 14), S = f - 6 - 26, $ = t.length ? S / t.length : 0, M = (w) => p + w / _ * b;
|
|
6198
6201
|
return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${o ? " " + o : ""}`, ref: g, children: [
|
|
6199
6202
|
v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
|
|
6200
|
-
|
|
6203
|
+
Se(_).map((w, y) => /* @__PURE__ */ m("g", { children: [
|
|
6201
6204
|
/* @__PURE__ */ e(
|
|
6202
6205
|
"line",
|
|
6203
6206
|
{
|
|
@@ -6246,7 +6249,7 @@ function Oo({ data: t, height: n, format: l = z, fromLabel: c = "Antes", toLabel
|
|
|
6246
6249
|
] });
|
|
6247
6250
|
}
|
|
6248
6251
|
function Ho({ columns: t, height: n = 240, format: l = z, gap: c = 3, className: s, ...a }) {
|
|
6249
|
-
const { ref: o, width: i } =
|
|
6252
|
+
const { ref: o, width: i } = le(n), r = K(), d = { top: 6, right: 6, bottom: 24, left: 6 }, h = Math.max(0, i - d.left - d.right), u = n - d.top - d.bottom, f = t.map((p) => p.segments.reduce((b, S) => b + S.value, 0)), g = f.reduce((p, b) => p + b, 0) || 1, v = [];
|
|
6250
6253
|
t.forEach((p) => p.segments.forEach((b) => {
|
|
6251
6254
|
v.includes(b.key) || v.push(b.key);
|
|
6252
6255
|
}));
|
|
@@ -6323,7 +6326,7 @@ const jo = P(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
|
|
|
6323
6326
|
] }) });
|
|
6324
6327
|
});
|
|
6325
6328
|
function Vo({ series: t, labels: n, height: l = 240, format: c = z, className: s, ...a }) {
|
|
6326
|
-
const { ref: o, width: i } =
|
|
6329
|
+
const { ref: o, width: i } = le(l), r = K(), d = ne(), [h, u] = T(null), f = n.length, g = { top: 14, right: 14, bottom: 28, left: 14 }, v = Math.max(0, i - g.left - g.right), x = l - g.top - g.bottom, N = n.map(($, M) => t.reduce((w, y) => w + (y.data[M] ?? 0), 0)), k = Math.max(1, ...N), _ = x / k, p = ($) => g.left + (f <= 1 ? v / 2 : $ / (f - 1) * v), b = n.map(() => 0), S = t.map(($, M) => {
|
|
6327
6330
|
const w = [], y = [];
|
|
6328
6331
|
return n.forEach((C, L) => {
|
|
6329
6332
|
const A = g.top + (x - N[L] * _) / 2 + b[L] * _, E = A + ($.data[L] ?? 0) * _;
|
|
@@ -6430,10 +6433,10 @@ const Zo = P(function({ data: n, size: l = 220, format: c = z, legend: s = !0, c
|
|
|
6430
6433
|
] });
|
|
6431
6434
|
});
|
|
6432
6435
|
function Go({ data: t, height: n = 240, format: l = z, className: c, ...s }) {
|
|
6433
|
-
const { ref: a, width: o } =
|
|
6436
|
+
const { ref: a, width: o } = le(n), i = K(), r = Ie, d = Math.max(0, o - r.left - r.right), h = n - r.top - r.bottom, u = r.top + h, f = Ne(Math.max(1, ...t.map((_) => _.max))), g = (_) => u - _ / f * h, v = t.length, x = v ? d / v : 0, N = Math.min(x * 0.42, 46), k = Math.max(1, ...t.flatMap((_) => _.bins));
|
|
6434
6437
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
6435
6438
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
|
|
6436
|
-
|
|
6439
|
+
Se(f).map((_, p) => /* @__PURE__ */ m("g", { children: [
|
|
6437
6440
|
/* @__PURE__ */ e(
|
|
6438
6441
|
"line",
|
|
6439
6442
|
{
|
|
@@ -6499,8 +6502,8 @@ const Uo = P(function({ matrix: n, labels: l, size: c = 240, format: s = z, padA
|
|
|
6499
6502
|
}
|
|
6500
6503
|
}
|
|
6501
6504
|
const S = (y, C) => [u + C * Math.cos(y - Math.PI / 2), f + C * Math.sin(y - Math.PI / 2)], $ = (y, C, L, B) => {
|
|
6502
|
-
const [A, E] = S(y, v), [F, W] = S(C, v), [Z,
|
|
6503
|
-
return `M${A.toFixed(2)},${E.toFixed(2)} A${v},${v} 0 0 1 ${F.toFixed(2)},${W.toFixed(2)} Q${u},${f} ${Z.toFixed(2)},${
|
|
6505
|
+
const [A, E] = S(y, v), [F, W] = S(C, v), [Z, D] = S(L, v), [R, O] = S(B, v);
|
|
6506
|
+
return `M${A.toFixed(2)},${E.toFixed(2)} A${v},${v} 0 0 1 ${F.toFixed(2)},${W.toFixed(2)} Q${u},${f} ${Z.toFixed(2)},${D.toFixed(2)} A${v},${v} 0 0 1 ${R.toFixed(2)},${O.toFixed(2)} Q${u},${f} ${A.toFixed(2)},${E.toFixed(2)} Z`;
|
|
6504
6507
|
}, M = (y) => y * 180 / Math.PI, w = [];
|
|
6505
6508
|
for (let y = 0; y < h; y++)
|
|
6506
6509
|
for (let C = y; C < h; C++) {
|
|
@@ -6549,10 +6552,10 @@ const Uo = P(function({ matrix: n, labels: l, size: c = 240, format: s = z, padA
|
|
|
6549
6552
|
] }) });
|
|
6550
6553
|
});
|
|
6551
6554
|
function Yo({ points: t, height: n = 240, radius: l = 16, color: c = "var(--select-chart-1)", xMax: s, yMax: a, format: o = z, className: i, ...r }) {
|
|
6552
|
-
const { ref: d, width: h } =
|
|
6555
|
+
const { ref: d, width: h } = le(n), u = K(), f = 12, g = Math.max(0, h - f * 2), v = n - f * 2, x = s ?? Math.max(1, ...t.map((C) => C.x)), N = a ?? Math.max(1, ...t.map((C) => C.y)), k = (C) => f + C / x * g, _ = (C) => f + v - C / N * v, p = l, b = Math.sqrt(3), S = (C, L) => {
|
|
6553
6556
|
let B = C, A = L, E = -B - A, F = Math.round(B), W = Math.round(E), Z = Math.round(A);
|
|
6554
|
-
const
|
|
6555
|
-
return
|
|
6557
|
+
const D = Math.abs(F - B), R = Math.abs(W - E), O = Math.abs(Z - A);
|
|
6558
|
+
return D > R && D > O ? F = -W - Z : R > O ? W = -F - Z : Z = -F - W, [F, Z];
|
|
6556
6559
|
}, $ = (C, L) => [p * b * (C + L / 2), p * (3 / 2) * L], M = (C, L) => {
|
|
6557
6560
|
let B = "";
|
|
6558
6561
|
for (let A = 0; A < 6; A++) {
|
|
@@ -6754,18 +6757,18 @@ const On = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6754
6757
|
var Be;
|
|
6755
6758
|
const N = ne(), k = K(), _ = Y(null), p = Ct(_, c), b = n.length ? n.reduce((I, V) => I + V.lng, 0) / n.length : 0, S = Y(
|
|
6756
6759
|
typeof window < "u" && !!((Be = window.matchMedia) != null && Be.call(window, "(prefers-reduced-motion: reduce)").matches)
|
|
6757
|
-
), $ = Y({ lng: -b, lat: s }), M = Y({ lng: 0, lat: 0 }), w = Y(1), y = Y(null), C = Y(null), L = Y(!1), B = Y(0), A = Y(0), E = Y(0), [, F] = T(0), [W, Z] = T(!1), [
|
|
6758
|
-
A.current || (E.current = performance.now(), A.current = requestAnimationFrame(
|
|
6760
|
+
), $ = Y({ lng: -b, lat: s }), M = Y({ lng: 0, lat: 0 }), w = Y(1), y = Y(null), C = Y(null), L = Y(!1), B = Y(0), A = Y(0), E = Y(0), [, F] = T(0), [W, Z] = T(!1), [D, R] = T(null), O = () => {
|
|
6761
|
+
A.current || (E.current = performance.now(), A.current = requestAnimationFrame(U));
|
|
6759
6762
|
};
|
|
6760
|
-
function
|
|
6763
|
+
function U(I) {
|
|
6761
6764
|
const V = Math.min(0.05, (I - E.current) / 1e3);
|
|
6762
6765
|
E.current = I, B.current += V;
|
|
6763
|
-
const
|
|
6766
|
+
const G = M.current, re = Math.abs(G.lng) + Math.abs(G.lat) > 0.02;
|
|
6764
6767
|
if (!C.current) if (y.current) {
|
|
6765
6768
|
const se = Math.min(1, V * 6);
|
|
6766
6769
|
$.current.lng += (y.current.lng - $.current.lng) * se, $.current.lat += (y.current.lat - $.current.lat) * se, Math.abs(y.current.lng - $.current.lng) < 0.2 && Math.abs(y.current.lat - $.current.lat) < 0.2 && (y.current = null);
|
|
6767
|
-
} else
|
|
6768
|
-
F((se) => (se + 1) % 1e6), !S.current || !!C.current || !!y.current || Math.abs(
|
|
6770
|
+
} else re ? ($.current.lng += G.lng * V * 60, $.current.lat = Math.max(-85, Math.min(85, $.current.lat + G.lat * V * 60)), G.lng *= 0.94, G.lat *= 0.94) : (G.lng = 0, G.lat = 0, a && !S.current && !L.current && ($.current.lng += o * V));
|
|
6771
|
+
F((se) => (se + 1) % 1e6), !S.current || !!C.current || !!y.current || Math.abs(G.lng) + Math.abs(G.lat) > 0.02 ? A.current = requestAnimationFrame(U) : A.current = 0;
|
|
6769
6772
|
}
|
|
6770
6773
|
te(() => (S.current || O(), () => {
|
|
6771
6774
|
A.current && cancelAnimationFrame(A.current), A.current = 0;
|
|
@@ -6774,111 +6777,111 @@ const On = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6774
6777
|
q.current = f, te(() => {
|
|
6775
6778
|
const I = _.current;
|
|
6776
6779
|
if (!I) return;
|
|
6777
|
-
const V = (
|
|
6780
|
+
const V = (G) => {
|
|
6778
6781
|
var se;
|
|
6779
|
-
|
|
6780
|
-
const
|
|
6781
|
-
w.current = Math.max(0.8, Math.min(1.8, ee)), (se = q.current) == null || se.call(q, w.current), O(), F((
|
|
6782
|
+
G.preventDefault();
|
|
6783
|
+
const re = Math.max(-240, Math.min(240, G.deltaMode ? G.deltaY * 40 : G.deltaY)), ee = w.current * Math.exp(-re * 12e-4);
|
|
6784
|
+
w.current = Math.max(0.8, Math.min(1.8, ee)), (se = q.current) == null || se.call(q, w.current), O(), F((de) => (de + 1) % 1e6);
|
|
6782
6785
|
};
|
|
6783
6786
|
return I.addEventListener("wheel", V, { passive: !1 }), () => I.removeEventListener("wheel", V);
|
|
6784
6787
|
}, []);
|
|
6785
|
-
const
|
|
6786
|
-
var V,
|
|
6787
|
-
(
|
|
6788
|
-
},
|
|
6788
|
+
const oe = (I) => {
|
|
6789
|
+
var V, G;
|
|
6790
|
+
(G = (V = I.target).setPointerCapture) == null || G.call(V, I.pointerId), C.current = { x: I.clientX, y: I.clientY }, M.current = { lng: 0, lat: 0 }, y.current = null, Z(!0), O();
|
|
6791
|
+
}, _e = (I) => {
|
|
6789
6792
|
if (!C.current) return;
|
|
6790
|
-
const V = 0.34 / w.current,
|
|
6791
|
-
C.current = { x: I.clientX, y: I.clientY }, $.current.lng +=
|
|
6792
|
-
},
|
|
6793
|
-
var V,
|
|
6794
|
-
C.current && ((
|
|
6795
|
-
},
|
|
6793
|
+
const V = 0.34 / w.current, G = I.clientX - C.current.x, re = I.clientY - C.current.y;
|
|
6794
|
+
C.current = { x: I.clientX, y: I.clientY }, $.current.lng += G * V, $.current.lat = Math.max(-85, Math.min(85, $.current.lat + re * V)), M.current = { lng: G * V, lat: re * V };
|
|
6795
|
+
}, Ce = (I) => {
|
|
6796
|
+
var V, G;
|
|
6797
|
+
C.current && ((G = (V = I.target).releasePointerCapture) == null || G.call(V, I.pointerId), C.current = null, Z(!1), O());
|
|
6798
|
+
}, ie = (p / 2 - 6) * w.current, H = p / 2, Q = p / 2, X = (I) => {
|
|
6796
6799
|
const V = bt(I, $.current.lng, $.current.lat);
|
|
6797
|
-
return { x: H +
|
|
6798
|
-
},
|
|
6800
|
+
return { x: H + ie * V[0], y: Q - ie * V[1], z: V[2] };
|
|
6801
|
+
}, ue = xe(() => {
|
|
6799
6802
|
const V = [];
|
|
6800
|
-
for (let
|
|
6801
|
-
const
|
|
6802
|
-
for (let ee = 0; ee <= 48; ee++)
|
|
6803
|
-
V.push(
|
|
6803
|
+
for (let G = -180; G < 180; G += 30) {
|
|
6804
|
+
const re = [];
|
|
6805
|
+
for (let ee = 0; ee <= 48; ee++) re.push(tt(-90 + 180 * ee / 48, G));
|
|
6806
|
+
V.push(re);
|
|
6804
6807
|
}
|
|
6805
|
-
for (let
|
|
6806
|
-
const
|
|
6807
|
-
for (let ee = 0; ee <= 48; ee++)
|
|
6808
|
-
V.push(
|
|
6808
|
+
for (let G = -60; G <= 60; G += 30) {
|
|
6809
|
+
const re = [];
|
|
6810
|
+
for (let ee = 0; ee <= 48; ee++) re.push(tt(G, -180 + 360 * ee / 48));
|
|
6811
|
+
V.push(re);
|
|
6809
6812
|
}
|
|
6810
6813
|
return V;
|
|
6811
|
-
}, []),
|
|
6814
|
+
}, []), ve = xe(
|
|
6812
6815
|
() => qs.map((I) => {
|
|
6813
6816
|
const V = [];
|
|
6814
|
-
for (let
|
|
6817
|
+
for (let G = 0; G < I.length; G += 2) V.push(tt(I[G + 1], I[G]));
|
|
6815
6818
|
return V;
|
|
6816
6819
|
}),
|
|
6817
6820
|
[]
|
|
6818
|
-
),
|
|
6819
|
-
let
|
|
6821
|
+
), he = (I) => ({ x: H + ie * I[0], y: Q - ie * I[1] });
|
|
6822
|
+
let ce = "", pe = "";
|
|
6820
6823
|
if (h)
|
|
6821
|
-
for (const I of
|
|
6822
|
-
const V = I.map((se) => bt(se, $.current.lng, $.current.lat)),
|
|
6823
|
-
let
|
|
6824
|
+
for (const I of ve) {
|
|
6825
|
+
const V = I.map((se) => bt(se, $.current.lng, $.current.lat)), G = V.length;
|
|
6826
|
+
let re = !1;
|
|
6824
6827
|
for (const se of V)
|
|
6825
6828
|
if (se[2] > 0) {
|
|
6826
|
-
const
|
|
6827
|
-
|
|
6828
|
-
} else
|
|
6829
|
+
const de = he(se);
|
|
6830
|
+
pe += `${re ? "L" : "M"}${de.x.toFixed(1)},${de.y.toFixed(1)}`, re = !0;
|
|
6831
|
+
} else re = !1;
|
|
6829
6832
|
const ee = [];
|
|
6830
|
-
for (let se = 0; se <
|
|
6831
|
-
const
|
|
6832
|
-
if (je && ee.push({ v:
|
|
6833
|
-
const Qe =
|
|
6834
|
-
ee.push({ v: [
|
|
6833
|
+
for (let se = 0; se < G; se++) {
|
|
6834
|
+
const de = V[se], fe = V[(se + 1) % G], je = de[2] > 0, Re = fe[2] > 0;
|
|
6835
|
+
if (je && ee.push({ v: de, edge: !1 }), je !== Re) {
|
|
6836
|
+
const Qe = de[2] / (de[2] - fe[2]);
|
|
6837
|
+
ee.push({ v: [de[0] + (fe[0] - de[0]) * Qe, de[1] + (fe[1] - de[1]) * Qe, 0], edge: !0 });
|
|
6835
6838
|
}
|
|
6836
6839
|
}
|
|
6837
6840
|
if (ee.length >= 3) {
|
|
6838
|
-
const se = (
|
|
6839
|
-
const Re =
|
|
6840
|
-
if (
|
|
6841
|
-
const Qe = Math.atan2(
|
|
6841
|
+
const se = (fe, je) => {
|
|
6842
|
+
const Re = he(je.v);
|
|
6843
|
+
if (fe.edge && je.edge) {
|
|
6844
|
+
const Qe = Math.atan2(he(fe.v).y - Q, he(fe.v).x - H);
|
|
6842
6845
|
let Ve = Math.atan2(Re.y - Q, Re.x - H) - Qe;
|
|
6843
6846
|
for (; Ve > Math.PI; ) Ve -= 2 * Math.PI;
|
|
6844
6847
|
for (; Ve < -Math.PI; ) Ve += 2 * Math.PI;
|
|
6845
6848
|
const mt = Ve > 0 ? 1 : 0;
|
|
6846
|
-
return `A${
|
|
6849
|
+
return `A${ie.toFixed(1)},${ie.toFixed(1)} 0 0 ${mt} ${Re.x.toFixed(1)},${Re.y.toFixed(1)}`;
|
|
6847
6850
|
}
|
|
6848
6851
|
return `L${Re.x.toFixed(1)},${Re.y.toFixed(1)}`;
|
|
6849
|
-
},
|
|
6850
|
-
|
|
6851
|
-
for (let
|
|
6852
|
-
|
|
6852
|
+
}, de = he(ee[0].v);
|
|
6853
|
+
ce += `M${de.x.toFixed(1)},${de.y.toFixed(1)}`;
|
|
6854
|
+
for (let fe = 1; fe < ee.length; fe++) ce += se(ee[fe - 1], ee[fe]);
|
|
6855
|
+
ce += se(ee[ee.length - 1], ee[0]), ce += "Z";
|
|
6853
6856
|
}
|
|
6854
6857
|
}
|
|
6855
|
-
const
|
|
6856
|
-
let V = "",
|
|
6857
|
-
for (const
|
|
6858
|
-
const ee = X(
|
|
6859
|
-
ee.z > 0 ? (V += `${
|
|
6858
|
+
const Me = (I) => {
|
|
6859
|
+
let V = "", G = !1;
|
|
6860
|
+
for (const re of I) {
|
|
6861
|
+
const ee = X(re);
|
|
6862
|
+
ee.z > 0 ? (V += `${G ? "L" : "M"}${ee.x.toFixed(1)},${ee.y.toFixed(1)}`, G = !0) : G = !1;
|
|
6860
6863
|
}
|
|
6861
6864
|
return V;
|
|
6862
|
-
},
|
|
6863
|
-
const
|
|
6865
|
+
}, me = Math.max(1, ...n.map((I) => I.value ?? 0)), Le = n.map((I, V) => {
|
|
6866
|
+
const G = X(tt(I.lat, I.lng));
|
|
6864
6867
|
return {
|
|
6865
6868
|
...I,
|
|
6866
6869
|
i: V,
|
|
6867
|
-
p:
|
|
6868
|
-
vis:
|
|
6869
|
-
r: 3 + Math.max(0, I.value ?? 0) /
|
|
6870
|
+
p: G,
|
|
6871
|
+
vis: G.z > 0,
|
|
6872
|
+
r: 3 + Math.max(0, I.value ?? 0) / me * 6,
|
|
6870
6873
|
col: I.color ?? i
|
|
6871
6874
|
};
|
|
6872
|
-
}),
|
|
6873
|
-
const
|
|
6875
|
+
}), $e = D != null ? n[D] : null, Pe = 0.16, ke = l.map((I, V) => {
|
|
6876
|
+
const G = tt(I.from.lat, I.from.lng), re = tt(I.to.lat, I.to.lng);
|
|
6874
6877
|
let ee = "", se = !1;
|
|
6875
6878
|
for (let Ve = 0; Ve <= 40; Ve++) {
|
|
6876
|
-
const mt = Ve / 40, ft = Wn(
|
|
6879
|
+
const mt = Ve / 40, ft = Wn(G, re, mt), Dt = 1 + 0.34 * Math.sin(Math.PI * mt), Al = bt(ft, $.current.lng, $.current.lat), rn = X([ft[0] * Dt, ft[1] * Dt, ft[2] * Dt]);
|
|
6877
6880
|
Al[2] > -0.05 ? (ee += `${se ? "L" : "M"}${rn.x.toFixed(1)},${rn.y.toFixed(1)}`, se = !0) : se = !1;
|
|
6878
6881
|
}
|
|
6879
|
-
const
|
|
6882
|
+
const de = S.current ? 0.5 : (B.current * Pe + V * 0.27) % 1, fe = Wn(G, re, de), je = 1 + 0.34 * Math.sin(Math.PI * de), Re = bt(fe, $.current.lng, $.current.lat), Qe = X([fe[0] * je, fe[1] * je, fe[2] * je]), an = $e != null && (On(I.from, $e) || On(I.to, $e));
|
|
6880
6883
|
return { d: ee, col: I.color ?? i, i: V, flow: { ...Qe, vis: Re[2] > 0 }, active: an };
|
|
6881
|
-
}), Ue =
|
|
6884
|
+
}), Ue = $e != null, He = d ? [...n].sort((I, V) => (V.value ?? 0) - (I.value ?? 0)).slice(0, 6) : [];
|
|
6882
6885
|
return /* @__PURE__ */ m("div", { ref: x, ...v, className: `select-globe${g ? " " + g : ""}`, children: [
|
|
6883
6886
|
/* @__PURE__ */ m(
|
|
6884
6887
|
"div",
|
|
@@ -6890,11 +6893,11 @@ const On = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6890
6893
|
L.current = !0;
|
|
6891
6894
|
},
|
|
6892
6895
|
onPointerLeave: (I) => {
|
|
6893
|
-
L.current = !1,
|
|
6896
|
+
L.current = !1, Ce(I), R(null), k.hide(), O();
|
|
6894
6897
|
},
|
|
6895
|
-
onPointerDown:
|
|
6896
|
-
onPointerMove:
|
|
6897
|
-
onPointerUp:
|
|
6898
|
+
onPointerDown: oe,
|
|
6899
|
+
onPointerMove: _e,
|
|
6900
|
+
onPointerUp: Ce,
|
|
6898
6901
|
children: [
|
|
6899
6902
|
/* @__PURE__ */ m("svg", { width: p, height: p, viewBox: `0 0 ${p} ${p}`, className: "select-chart", children: [
|
|
6900
6903
|
/* @__PURE__ */ m("defs", { children: [
|
|
@@ -6919,42 +6922,42 @@ const On = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6919
6922
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: i, stopOpacity: 0.95 }),
|
|
6920
6923
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: i, stopOpacity: 0.3 })
|
|
6921
6924
|
] }),
|
|
6922
|
-
/* @__PURE__ */ e("clipPath", { id: `${N}-clip`, children: /* @__PURE__ */ e("circle", { cx: H, cy: Q, r:
|
|
6925
|
+
/* @__PURE__ */ e("clipPath", { id: `${N}-clip`, children: /* @__PURE__ */ e("circle", { cx: H, cy: Q, r: ie }) })
|
|
6923
6926
|
] }),
|
|
6924
|
-
/* @__PURE__ */ e("circle", { cx: H, cy: Q, r:
|
|
6927
|
+
/* @__PURE__ */ e("circle", { cx: H, cy: Q, r: ie + 24, fill: `url(#${N}-atmo)` }),
|
|
6925
6928
|
/* @__PURE__ */ e(
|
|
6926
6929
|
"circle",
|
|
6927
6930
|
{
|
|
6928
6931
|
cx: H,
|
|
6929
6932
|
cy: Q,
|
|
6930
|
-
r:
|
|
6933
|
+
r: ie,
|
|
6931
6934
|
fill: `url(#${N}-sphere)`,
|
|
6932
6935
|
stroke: `color-mix(in srgb, ${i} 40%, transparent)`,
|
|
6933
6936
|
strokeWidth: 1
|
|
6934
6937
|
}
|
|
6935
6938
|
),
|
|
6936
|
-
/* @__PURE__ */ e("circle", { cx: H, cy: Q, r:
|
|
6937
|
-
/* @__PURE__ */ e("circle", { cx: H, cy: Q, r:
|
|
6939
|
+
/* @__PURE__ */ e("circle", { cx: H, cy: Q, r: ie, fill: `url(#${N}-glow)` }),
|
|
6940
|
+
/* @__PURE__ */ e("circle", { cx: H, cy: Q, r: ie, fill: `url(#${N}-spec)` }),
|
|
6938
6941
|
/* @__PURE__ */ m("g", { clipPath: `url(#${N}-clip)`, children: [
|
|
6939
|
-
h &&
|
|
6942
|
+
h && ce && /* @__PURE__ */ e(
|
|
6940
6943
|
"path",
|
|
6941
6944
|
{
|
|
6942
|
-
d:
|
|
6945
|
+
d: ce,
|
|
6943
6946
|
className: "select-globe__land",
|
|
6944
6947
|
fill: `color-mix(in srgb, ${i} 38%, transparent)`
|
|
6945
6948
|
}
|
|
6946
6949
|
),
|
|
6947
|
-
h &&
|
|
6950
|
+
h && pe && /* @__PURE__ */ e(
|
|
6948
6951
|
"path",
|
|
6949
6952
|
{
|
|
6950
|
-
d:
|
|
6953
|
+
d: pe,
|
|
6951
6954
|
className: "select-globe__coast",
|
|
6952
6955
|
fill: "none",
|
|
6953
6956
|
stroke: `color-mix(in srgb, ${i} 68%, transparent)`
|
|
6954
6957
|
}
|
|
6955
6958
|
),
|
|
6956
|
-
|
|
6957
|
-
|
|
6959
|
+
ue.map((I, V) => /* @__PURE__ */ e("path", { d: Me(I), className: "select-globe__grid" }, `g${V}`)),
|
|
6960
|
+
ke.map((I) => /* @__PURE__ */ m(
|
|
6958
6961
|
"g",
|
|
6959
6962
|
{
|
|
6960
6963
|
className: "select-globe__arcgrp",
|
|
@@ -6986,7 +6989,7 @@ const On = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6986
6989
|
))
|
|
6987
6990
|
] }),
|
|
6988
6991
|
Le.filter((I) => I.vis).map((I) => {
|
|
6989
|
-
const V =
|
|
6992
|
+
const V = D === I.i;
|
|
6990
6993
|
return /* @__PURE__ */ m("g", { style: { opacity: Ue && !V ? 0.45 : 1 }, children: [
|
|
6991
6994
|
/* @__PURE__ */ e("circle", { cx: I.p.x, cy: I.p.y, r: I.r, fill: I.col, className: "select-globe__pulse" }),
|
|
6992
6995
|
V && /* @__PURE__ */ e("circle", { cx: I.p.x, cy: I.p.y, r: I.r + 4, fill: "none", stroke: I.col, strokeWidth: 1.5, opacity: 0.6 }),
|
|
@@ -6999,7 +7002,7 @@ const On = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6999
7002
|
fill: I.col,
|
|
7000
7003
|
className: "select-globe__point",
|
|
7001
7004
|
onPointerEnter: () => {
|
|
7002
|
-
|
|
7005
|
+
R(I.i), k.show({
|
|
7003
7006
|
x: I.p.x,
|
|
7004
7007
|
y: I.p.y - I.r - 4,
|
|
7005
7008
|
place: I.p.y < Q ? "bottom" : "top",
|
|
@@ -7008,7 +7011,7 @@ const On = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
7008
7011
|
});
|
|
7009
7012
|
},
|
|
7010
7013
|
onPointerLeave: () => {
|
|
7011
|
-
|
|
7014
|
+
R(null), k.hide();
|
|
7012
7015
|
},
|
|
7013
7016
|
onClick: () => {
|
|
7014
7017
|
y.current = { lng: -I.lng, lat: s }, O();
|
|
@@ -7079,9 +7082,9 @@ function Xo({ children: t, speed: n = 28, className: l, ...c }) {
|
|
|
7079
7082
|
}
|
|
7080
7083
|
function Ko({ data: t, height: n = 240, format: l = z, className: c, ...s }) {
|
|
7081
7084
|
var A;
|
|
7082
|
-
const { ref: a, width: o } =
|
|
7085
|
+
const { ref: a, width: o } = le(n), i = K(), r = ne(), [d, h] = T(null), u = { ...Ie, right: 44 }, f = [...t].sort((E, F) => F.value - E.value), g = f.length, v = f.reduce((E, F) => E + F.value, 0) || 1;
|
|
7083
7086
|
let x = 0;
|
|
7084
|
-
const N = f.map((E) => (x += E.value, x / v * 100)), k = Math.max(0, o - u.left - u.right), _ = n - u.top - u.bottom, p =
|
|
7087
|
+
const N = f.map((E) => (x += E.value, x / v * 100)), k = Math.max(0, o - u.left - u.right), _ = n - u.top - u.bottom, p = Ne(((A = f[0]) == null ? void 0 : A.value) ?? 1), b = g > 0 ? k / g : 0, S = Math.min(b * 0.62, 46), $ = u.top + _, M = (E) => $ - E / p * _, w = (E) => $ - E / 100 * _, y = (E) => u.left + b * E + b / 2, C = N.map((E, F) => [y(F), w(E)]), L = j(0), B = j(1);
|
|
7085
7088
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
7086
7089
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", onMouseLeave: () => {
|
|
7087
7090
|
h(null), i.hide();
|
|
@@ -7090,7 +7093,7 @@ function Ko({ data: t, height: n = 240, format: l = z, className: c, ...s }) {
|
|
|
7090
7093
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: L, stopOpacity: 1 }),
|
|
7091
7094
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: L, stopOpacity: 0.55 })
|
|
7092
7095
|
] }) }),
|
|
7093
|
-
|
|
7096
|
+
Se(p).map((E, F) => /* @__PURE__ */ m("g", { children: [
|
|
7094
7097
|
/* @__PURE__ */ e("line", { x1: u.left, x2: o - u.right, y1: M(E), y2: M(E), className: F === 0 ? "select-chart__axis" : "select-chart__grid" }),
|
|
7095
7098
|
/* @__PURE__ */ e("text", { x: u.left - 8, y: M(E), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(E) })
|
|
7096
7099
|
] }, F)),
|
|
@@ -7164,7 +7167,7 @@ const Jo = P(function({ segments: n, cols: l = 10, rows: c = 10, format: s = z,
|
|
|
7164
7167
|
] });
|
|
7165
7168
|
});
|
|
7166
7169
|
function Qo({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", height: c, format: s = z, leftColor: a, rightColor: o, centerWidth: i = 84, className: r, ...d }) {
|
|
7167
|
-
const h = c ?? Math.max(180, t.length * 40 + 36), { ref: u, width: f } =
|
|
7170
|
+
const h = c ?? Math.max(180, t.length * 40 + 36), { ref: u, width: f } = le(h), g = K(), [v, x] = T(null), N = 8, k = 26, _ = 8, p = Math.max(1, ...t.flatMap((L) => [L.left, L.right])), b = Math.max(0, (f - i - N * 2) / 2), S = t.length ? (h - k - _) / t.length : 0, $ = Math.min(S * 0.6, 26), M = N + b, w = N + b + i, y = a ?? j(1), C = o ?? j(0);
|
|
7168
7171
|
return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: u, children: [
|
|
7169
7172
|
f > 0 && /* @__PURE__ */ m("svg", { width: f, height: h, className: "select-chart", onMouseLeave: () => {
|
|
7170
7173
|
x(null), g.hide();
|
|
@@ -7218,7 +7221,7 @@ function Qo({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
7218
7221
|
] });
|
|
7219
7222
|
}
|
|
7220
7223
|
function e1({ series: t, labels: n, height: l = 240, format: c = z, className: s, ...a }) {
|
|
7221
|
-
const { ref: o, width: i } =
|
|
7224
|
+
const { ref: o, width: i } = le(l), r = K(), [d, h] = T(null), u = { top: 16, right: 78, bottom: 28, left: 28 }, f = n.length, g = t.length, v = Math.max(0, i - u.left - u.right), x = l - u.top - u.bottom, N = t.map(() => new Array(f).fill(0));
|
|
7222
7225
|
for (let p = 0; p < f; p++)
|
|
7223
7226
|
t.map((S, $) => ({ si: $, v: S.data[p] ?? 0 })).sort((S, $) => $.v - S.v).forEach((S, $) => {
|
|
7224
7227
|
N[S.si][p] = $ + 1;
|
|
@@ -7266,7 +7269,7 @@ function e1({ series: t, labels: n, height: l = 240, format: c = z, className: s
|
|
|
7266
7269
|
] });
|
|
7267
7270
|
}
|
|
7268
7271
|
function t1({ axes: t, data: n, height: l = 260, format: c = z, className: s, ...a }) {
|
|
7269
|
-
const { ref: o, width: i } =
|
|
7272
|
+
const { ref: o, width: i } = le(l), r = K(), [d, h] = T(null), u = { top: 30, right: 28, bottom: 26, left: 28 }, f = Math.max(0, i - u.left - u.right), g = l - u.top - u.bottom, v = t.length, x = (_) => u.left + (v <= 1 ? f / 2 : f / (v - 1) * _), N = t.map((_) => {
|
|
7270
7273
|
const p = n.map((b) => b.values[_.key] ?? 0);
|
|
7271
7274
|
return { min: Math.min(...p), max: Math.max(...p) };
|
|
7272
7275
|
}), k = (_, p) => {
|
|
@@ -7323,7 +7326,7 @@ function Cl(t, n = 0) {
|
|
|
7323
7326
|
return !t.children || !t.children.length ? n : Math.max(...t.children.map((l) => Cl(l, n + 1)));
|
|
7324
7327
|
}
|
|
7325
7328
|
function n1({ data: t, height: n = 240, format: l = z, className: c, ...s }) {
|
|
7326
|
-
const { ref: a, width: o } =
|
|
7329
|
+
const { ref: a, width: o } = le(n), i = K(), [r, d] = T(null), h = Cl(t), u = n / (h + 1), f = [], g = (v, x, N, k, _) => {
|
|
7327
7330
|
if (f.push({ node: v, x0: x, x1: N, depth: k, color: v.color ?? j(_), value: Mt(v) }), v.children && v.children.length) {
|
|
7328
7331
|
const p = v.children.reduce((S, $) => S + Mt($), 0) || 1;
|
|
7329
7332
|
let b = x;
|
|
@@ -7367,7 +7370,7 @@ function n1({ data: t, height: n = 240, format: l = z, className: c, ...s }) {
|
|
|
7367
7370
|
] });
|
|
7368
7371
|
}
|
|
7369
7372
|
function l1({ data: t, height: n = 260, className: l, ...c }) {
|
|
7370
|
-
const { ref: s, width: a } =
|
|
7373
|
+
const { ref: s, width: a } = le(n), o = K(), [i, r] = T(null), d = { top: 14, right: 96, bottom: 14, left: 16 };
|
|
7371
7374
|
let h = null;
|
|
7372
7375
|
if (a > 0) {
|
|
7373
7376
|
const u = [];
|
|
@@ -7541,7 +7544,7 @@ const c1 = P(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7541
7544
|
] });
|
|
7542
7545
|
});
|
|
7543
7546
|
function a1({ nodes: t, links: n, height: l = 300, format: c = z, className: s, ...a }) {
|
|
7544
|
-
const { ref: o, width: i } =
|
|
7547
|
+
const { ref: o, width: i } = le(l), r = K(), [d, h] = T(null), u = xe(() => {
|
|
7545
7548
|
const v = i || l, x = l, N = t.length, k = /* @__PURE__ */ new Map();
|
|
7546
7549
|
if (!N) return k;
|
|
7547
7550
|
const _ = t.map(($, M) => ({
|
|
@@ -7876,7 +7879,7 @@ const b1 = P(function({ pairs: n, onChange: l, keyPlaceholder: c = "Chave", valu
|
|
|
7876
7879
|
autoComplete: "off"
|
|
7877
7880
|
}
|
|
7878
7881
|
) }),
|
|
7879
|
-
/* @__PURE__ */ e("div", { className: "select-kv__remove", children: /* @__PURE__ */ e(
|
|
7882
|
+
/* @__PURE__ */ e("div", { className: "select-kv__remove", children: /* @__PURE__ */ e(be, { size: "sm", icon: /* @__PURE__ */ e(zn, {}), label: "Remover", onClick: () => v(_) }) })
|
|
7880
7883
|
] }, _)),
|
|
7881
7884
|
N && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ m(Jc, { onClick: x, children: [
|
|
7882
7885
|
"+ ",
|
|
@@ -8026,13 +8029,13 @@ const na = P(function({ value: n, presets: l = Js, onApply: c, onCancel: s, acce
|
|
|
8026
8029
|
/* @__PURE__ */ m("div", { className: "select-datepicker__grid", role: "grid", children: [
|
|
8027
8030
|
g.weekdays.map((A, E) => /* @__PURE__ */ e("div", { className: "select-datepicker__weekday", children: A }, E)),
|
|
8028
8031
|
M.map((A) => {
|
|
8029
|
-
const E = A.getMonth() !== _.getMonth(), F = w(A), W = !!N.from && xt(A, N.from), Z = !!N.to && xt(A, N.to),
|
|
8030
|
-
return /* @__PURE__ */ e("div", { className:
|
|
8032
|
+
const E = A.getMonth() !== _.getMonth(), F = w(A), W = !!N.from && xt(A, N.from), Z = !!N.to && xt(A, N.to), D = W || Z, R = !!N.from && !!N.to && !xt(N.from, N.to), U = "select-datepicker__day" + (!!N.from && !!N.to && A > De(N.from) && A < De(N.to) ? " select-datepicker__day--in-range" : "") + (R && W ? " select-datepicker__day--range-start" : "") + (R && Z ? " select-datepicker__day--range-end" : ""), q = "select-datepicker__daybtn" + (D ? " is-selected" : "") + (xt(A, v) && !D ? " is-today" : "") + (E ? " is-outside" : "");
|
|
8033
|
+
return /* @__PURE__ */ e("div", { className: U, children: /* @__PURE__ */ e("button", { type: "button", className: q, disabled: F, onClick: () => C(A), children: A.getDate() }) }, A.getTime());
|
|
8031
8034
|
})
|
|
8032
8035
|
] }),
|
|
8033
8036
|
/* @__PURE__ */ m("div", { className: "select-datepicker__footer", children: [
|
|
8034
|
-
/* @__PURE__ */ e(
|
|
8035
|
-
/* @__PURE__ */ e(
|
|
8037
|
+
/* @__PURE__ */ e(ge, { variant: "secondary", inline: !0, onClick: s, children: g.cancel }),
|
|
8038
|
+
/* @__PURE__ */ e(ge, { variant: "primary", inline: !0, onClick: () => c == null ? void 0 : c(N), children: g.apply })
|
|
8036
8039
|
] })
|
|
8037
8040
|
] })
|
|
8038
8041
|
] }) });
|
|
@@ -8064,14 +8067,14 @@ function y1({
|
|
|
8064
8067
|
placement: s,
|
|
8065
8068
|
role: "dialog",
|
|
8066
8069
|
activator: /* @__PURE__ */ e(
|
|
8067
|
-
|
|
8070
|
+
ge,
|
|
8068
8071
|
{
|
|
8069
8072
|
variant: "secondary",
|
|
8070
8073
|
size: a,
|
|
8071
8074
|
inline: !i,
|
|
8072
8075
|
disabled: o,
|
|
8073
8076
|
icon: /* @__PURE__ */ e(Xn, {}),
|
|
8074
|
-
trailingIcon: /* @__PURE__ */ e(
|
|
8077
|
+
trailingIcon: /* @__PURE__ */ e(ye, {}),
|
|
8075
8078
|
onClick: () => d((u) => !u),
|
|
8076
8079
|
children: la(t, l)
|
|
8077
8080
|
}
|
|
@@ -8136,7 +8139,7 @@ const x1 = P(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
|
|
|
8136
8139
|
n && /* @__PURE__ */ e(lt, { htmlFor: k, label: n }),
|
|
8137
8140
|
/* @__PURE__ */ m("div", { className: "select-numfield", children: [
|
|
8138
8141
|
/* @__PURE__ */ e(
|
|
8139
|
-
|
|
8142
|
+
be,
|
|
8140
8143
|
{
|
|
8141
8144
|
variant: "outline",
|
|
8142
8145
|
size: g,
|
|
@@ -8168,7 +8171,7 @@ const x1 = P(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
|
|
|
8168
8171
|
}
|
|
8169
8172
|
),
|
|
8170
8173
|
/* @__PURE__ */ e(
|
|
8171
|
-
|
|
8174
|
+
be,
|
|
8172
8175
|
{
|
|
8173
8176
|
variant: "outline",
|
|
8174
8177
|
size: g,
|
|
@@ -8222,17 +8225,17 @@ function M1({
|
|
|
8222
8225
|
/* @__PURE__ */ e(Xe, { as: "span", variant: "bodySm", fontWeight: "medium", tone: "subdued", children: a ? a(b, p) : `#${b + 1}` }),
|
|
8223
8226
|
/* @__PURE__ */ m(st, { gap: "100", blockAlign: "center", wrap: !1, children: [
|
|
8224
8227
|
d && /* @__PURE__ */ m(ae, { children: [
|
|
8225
|
-
/* @__PURE__ */ e(
|
|
8226
|
-
/* @__PURE__ */ e(
|
|
8228
|
+
/* @__PURE__ */ e(be, { size: "sm", icon: /* @__PURE__ */ e(Kn, {}), label: "Mover para cima", disabled: S.isFirst, onClick: S.moveUp }),
|
|
8229
|
+
/* @__PURE__ */ e(be, { size: "sm", icon: /* @__PURE__ */ e(ye, {}), label: "Mover para baixo", disabled: S.isLast, onClick: S.moveDown })
|
|
8227
8230
|
] }),
|
|
8228
|
-
/* @__PURE__ */ e(
|
|
8231
|
+
/* @__PURE__ */ e(be, { size: "sm", icon: /* @__PURE__ */ e(zn, {}), label: "Remover", disabled: !v, onClick: S.remove })
|
|
8229
8232
|
] })
|
|
8230
8233
|
] }),
|
|
8231
8234
|
l(p, S)
|
|
8232
8235
|
] }) }, b);
|
|
8233
8236
|
}),
|
|
8234
8237
|
/* @__PURE__ */ m(st, { align: "space-between", blockAlign: "center", gap: "200", children: [
|
|
8235
|
-
/* @__PURE__ */ e(
|
|
8238
|
+
/* @__PURE__ */ e(ge, { variant: "secondary", size: "sm", inline: !0, icon: /* @__PURE__ */ e(Je, {}), disabled: !g, onClick: () => n([...t, c()]), children: s }),
|
|
8236
8239
|
f != null && /* @__PURE__ */ e(Xe, { as: "span", variant: "bodyXs", tone: "subdued", children: f })
|
|
8237
8240
|
] })
|
|
8238
8241
|
] });
|
|
@@ -8381,7 +8384,7 @@ const S1 = P(function({ label: n, value: l, onChange: c, accept: s = "image/*",
|
|
|
8381
8384
|
onClick: () => d(h.id),
|
|
8382
8385
|
children: [
|
|
8383
8386
|
/* @__PURE__ */ e("span", { className: "select-accordion__title", children: h.title }),
|
|
8384
|
-
/* @__PURE__ */ e("span", { className: `select-accordion__chevron${u ? " is-open" : ""}`, "aria-hidden": "true", children: /* @__PURE__ */ e(
|
|
8387
|
+
/* @__PURE__ */ e("span", { className: `select-accordion__chevron${u ? " is-open" : ""}`, "aria-hidden": "true", children: /* @__PURE__ */ e(ye, {}) })
|
|
8385
8388
|
]
|
|
8386
8389
|
}
|
|
8387
8390
|
),
|
|
@@ -8413,7 +8416,7 @@ export {
|
|
|
8413
8416
|
qa as ChartLineIcon,
|
|
8414
8417
|
Ql as CheckCircleIcon,
|
|
8415
8418
|
Ae as CheckIcon,
|
|
8416
|
-
|
|
8419
|
+
ye as ChevronDownIcon,
|
|
8417
8420
|
Kt as ChevronLeftIcon,
|
|
8418
8421
|
dt as ChevronRightIcon,
|
|
8419
8422
|
Kn as ChevronUpIcon,
|
|
@@ -8480,7 +8483,7 @@ export {
|
|
|
8480
8483
|
$1 as SelectBuilderLayout,
|
|
8481
8484
|
Lo as SelectBullet,
|
|
8482
8485
|
e1 as SelectBump,
|
|
8483
|
-
|
|
8486
|
+
ge as SelectButton,
|
|
8484
8487
|
Do as SelectCalendarHeatmap,
|
|
8485
8488
|
Io as SelectCandlestick,
|
|
8486
8489
|
fa as SelectCard,
|
|
@@ -8529,7 +8532,7 @@ export {
|
|
|
8529
8532
|
So as SelectHorizontalBar,
|
|
8530
8533
|
n1 as SelectIcicle,
|
|
8531
8534
|
Ar as SelectIcon,
|
|
8532
|
-
|
|
8535
|
+
be as SelectIconButton,
|
|
8533
8536
|
Mr as SelectIdentityFooter,
|
|
8534
8537
|
S1 as SelectImageField,
|
|
8535
8538
|
ac as SelectImageUploadField,
|