@selectwin/kit 0.1.43 → 0.1.44
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/SelectSideNav.d.ts +8 -0
- package/dist/index.js +737 -737
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ function na({ className: t, theme: n, glowTarget: l }) {
|
|
|
28
28
|
if (!s) return;
|
|
29
29
|
const a = s.getContext("2d");
|
|
30
30
|
if (!a) return;
|
|
31
|
-
const r = ((Q = window.matchMedia) == null ? void 0 : Q.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1,
|
|
31
|
+
const r = ((Q = window.matchMedia) == null ? void 0 : Q.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, i = n === "dark", o = 30, d = 1.2, u = 160, h = 8, f = 2.9, g = 0.32, v = 1.4, x = 18, N = Math.PI * 2, $ = getComputedStyle(s), [_, p, b] = Cl($, "--select-dot", i ? [235, 238, 255] : [64, 68, 92]), [S, k, M] = Ll($.getPropertyValue("--select-primary"), i ? [255, 255, 255] : [33, 37, 41]);
|
|
32
32
|
let w = 0, y = 0, C = [], L = 0, B = 0, A = null, F = 0;
|
|
33
33
|
const E = { x: 0, y: 0 };
|
|
34
34
|
let T = 0, I = 0, O = -10;
|
|
@@ -60,7 +60,7 @@ function na({ className: t, theme: n, glowTarget: l }) {
|
|
|
60
60
|
function ie() {
|
|
61
61
|
a.clearRect(0, 0, w, y), a.fillStyle = `rgba(${_},${p},${b},${g})`;
|
|
62
62
|
for (const z of C)
|
|
63
|
-
a.beginPath(), a.arc(z.x, z.y,
|
|
63
|
+
a.beginPath(), a.arc(z.x, z.y, d, 0, N), a.fill();
|
|
64
64
|
A == null || A.style.setProperty("--select-card-glow", "0");
|
|
65
65
|
}
|
|
66
66
|
function fe(z) {
|
|
@@ -70,7 +70,7 @@ function na({ className: t, theme: n, glowTarget: l }) {
|
|
|
70
70
|
a.clearRect(0, 0, w, y);
|
|
71
71
|
for (let oe = 0; oe < C.length; oe++) {
|
|
72
72
|
const $e = C[oe], Ce = $e.x - me, Le = $e.y - he, Ne = Math.sqrt(Ce * Ce + Le * Le), Ie = Ne < u ? 1 - Ne / u : 0, ke = Ie * Ie, Ue = Math.sin(z * 1.4 + $e.phase) * 0.5 + 0.5, He = ke * h, Fe = Ne > 1e-4 ? 1 / Ne : 0, P = $e.x - Ce * Fe * He, V = $e.y - Le * Fe * He, U = 1 + ke * (f - 1) + Ue * 0.14, re = Math.min(1, g + Ue * 0.08 + ke * (1 - g)), ee = _ + (S - _) * ke | 0, se = p + (k - p) * ke | 0, ue = b + (M - b) * ke | 0;
|
|
73
|
-
ke > 0.12 ? (a.shadowColor = `rgba(${S},${k},${M},${0.6 * ke})`, a.shadowBlur = 12 * ke) : a.shadowBlur = 0, a.beginPath(), a.arc(P, V,
|
|
73
|
+
ke > 0.12 ? (a.shadowColor = `rgba(${S},${k},${M},${0.6 * ke})`, a.shadowBlur = 12 * ke) : a.shadowBlur = 0, a.beginPath(), a.arc(P, V, d * U, 0, N), a.fillStyle = `rgba(${ee},${se},${ue},${re})`, a.fill();
|
|
74
74
|
}
|
|
75
75
|
a.shadowBlur = 0, J(me, he, S, k, M);
|
|
76
76
|
}
|
|
@@ -108,29 +108,29 @@ function Fl(t, n) {
|
|
|
108
108
|
return c ? [Number(c[1]), Number(c[2]), Number(c[3])] : n;
|
|
109
109
|
}
|
|
110
110
|
const Bl = (t) => {
|
|
111
|
-
let
|
|
112
|
-
function
|
|
111
|
+
let i = [], o = 0;
|
|
112
|
+
function d() {
|
|
113
113
|
const h = t.w(), f = t.h();
|
|
114
|
-
|
|
114
|
+
i = [];
|
|
115
115
|
const g = Math.ceil(h / 30) + 1, v = Math.ceil(f / 30) + 1, x = (h - (g - 1) * 30) / 2, N = (f - (v - 1) * 30) / 2;
|
|
116
116
|
for (let $ = 0; $ < v; $++)
|
|
117
117
|
for (let _ = 0; _ < g; _++) {
|
|
118
118
|
const p = x + _ * 30, b = N + $ * 30;
|
|
119
|
-
|
|
119
|
+
i.push({ x: p, y: b, phase: (p + b) * 0.013 });
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function u(h, f) {
|
|
123
123
|
const { ctx: g, pointer: v } = t, [x, N, $] = t.ink, [_, p, b] = t.accent, S = t.w(), k = t.h();
|
|
124
124
|
g.clearRect(0, 0, S, k);
|
|
125
125
|
const M = v.x, w = v.y;
|
|
126
|
-
for (const y of
|
|
126
|
+
for (const y of i) {
|
|
127
127
|
const C = y.x - M, L = y.y - w, B = Math.hypot(C, L), A = f > 0 && B < 150 ? 1 - B / 150 : 0, F = A * A * f, E = Math.sin(h * 1.1 + y.phase) * 0.5 + 0.5, T = F * 6, I = B > 1e-3 ? 1 / B : 0, O = y.x - C * I * T, W = y.y - L * I * T, Z = 1 + F * (2.4 - 1) + E * 0.1, G = Math.min(1, 0.3 + E * 0.06 + F * (1 - 0.3)), J = x + (_ - x) * F | 0, ie = N + (p - N) * F | 0, fe = $ + (b - $) * F | 0;
|
|
128
128
|
t.dark && F > 0.14 ? (g.shadowColor = `rgba(${_},${p},${b},${0.5 * F})`, g.shadowBlur = 10 * F) : g.shadowBlur = 0, g.beginPath(), g.arc(O, W, 1.2 * Z, 0, tt), g.fillStyle = `rgba(${J},${ie},${fe},${G})`, g.fill();
|
|
129
129
|
}
|
|
130
130
|
g.shadowBlur = 0;
|
|
131
131
|
}
|
|
132
132
|
return {
|
|
133
|
-
build:
|
|
133
|
+
build: d,
|
|
134
134
|
frame(h) {
|
|
135
135
|
o = $t(o, t.pointer.active ? 1 : 0, 0.06), u(h, o), o > 0.02 ? t.cardGlow(t.pointer.x, t.pointer.y) : t.clearGlow();
|
|
136
136
|
},
|
|
@@ -144,22 +144,22 @@ const Bl = (t) => {
|
|
|
144
144
|
c = t.w(), s = t.h();
|
|
145
145
|
const o = Ye(Math.round(c * s / 12e3), 36, 130);
|
|
146
146
|
a = [];
|
|
147
|
-
for (let
|
|
147
|
+
for (let d = 0; d < o; d++)
|
|
148
148
|
a.push({ x: Math.random() * c, y: Math.random() * s, vx: (Math.random() - 0.5) * 0.22, vy: (Math.random() - 0.5) * 0.22 });
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
const { ctx:
|
|
152
|
-
|
|
150
|
+
function i(o) {
|
|
151
|
+
const { ctx: d, pointer: u } = t, [h, f, g] = t.ink, [v, x, N] = t.accent;
|
|
152
|
+
d.clearRect(0, 0, c, s);
|
|
153
153
|
for (const p of a)
|
|
154
154
|
p.x += p.vx, p.y += p.vy, p.x < -12 ? p.x = c + 12 : p.x > c + 12 && (p.x = -12), p.y < -12 ? p.y = s + 12 : p.y > s + 12 && (p.y = -12);
|
|
155
|
-
|
|
155
|
+
d.lineWidth = 1;
|
|
156
156
|
for (let p = 0; p < a.length; p++) {
|
|
157
157
|
const b = a[p];
|
|
158
158
|
for (let S = p + 1; S < a.length; S++) {
|
|
159
159
|
const k = a[S], M = b.x - k.x, w = b.y - k.y, y = M * M + w * w;
|
|
160
160
|
if (y < 132 * 132) {
|
|
161
161
|
const C = 1 - Math.sqrt(y) / 132;
|
|
162
|
-
|
|
162
|
+
d.strokeStyle = `rgba(${h},${f},${g},${(C * C * 0.5).toFixed(3)})`, d.beginPath(), d.moveTo(b.x, b.y), d.lineTo(k.x, k.y), d.stroke();
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
}
|
|
@@ -168,33 +168,33 @@ const Bl = (t) => {
|
|
|
168
168
|
let b = 0;
|
|
169
169
|
if (o) {
|
|
170
170
|
const w = Math.hypot(p.x - $, p.y - _);
|
|
171
|
-
w < 175 && (b = 1 - w / 175,
|
|
171
|
+
w < 175 && (b = 1 - w / 175, d.strokeStyle = `rgba(${v},${x},${N},${(b * b * 0.5).toFixed(3)})`, d.beginPath(), d.moveTo($, _), d.lineTo(p.x, p.y), d.stroke());
|
|
172
172
|
}
|
|
173
173
|
const S = h + (v - h) * b | 0, k = f + (x - f) * b | 0, M = g + (N - g) * b | 0;
|
|
174
|
-
t.dark && b > 0.2 ? (
|
|
174
|
+
t.dark && b > 0.2 ? (d.shadowColor = `rgba(${v},${x},${N},${0.6 * b})`, d.shadowBlur = 10 * b) : d.shadowBlur = 0, d.beginPath(), d.arc(p.x, p.y, 1.4 + b * 2.2, 0, tt), d.fillStyle = `rgba(${S},${k},${M},${0.5 + b * 0.5})`, d.fill();
|
|
175
175
|
}
|
|
176
|
-
|
|
176
|
+
d.shadowBlur = 0;
|
|
177
177
|
}
|
|
178
178
|
return {
|
|
179
179
|
build: r,
|
|
180
180
|
frame() {
|
|
181
181
|
const o = t.pointer.active;
|
|
182
|
-
|
|
182
|
+
i(o), o ? t.cardGlow(t.pointer.x, t.pointer.y) : t.clearGlow();
|
|
183
183
|
},
|
|
184
184
|
paintStatic() {
|
|
185
|
-
|
|
185
|
+
i(!1), t.clearGlow();
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
188
|
}, Il = (t) => {
|
|
189
|
-
let c = 0, s = 0, a = 0, r = 0,
|
|
190
|
-
function
|
|
191
|
-
c = t.w(), s = t.h(), a = Math.ceil(c / 44) + 1, r = Math.ceil(s / 44) + 1,
|
|
189
|
+
let c = 0, s = 0, a = 0, r = 0, i = 0, o = 0;
|
|
190
|
+
function d() {
|
|
191
|
+
c = t.w(), s = t.h(), a = Math.ceil(c / 44) + 1, r = Math.ceil(s / 44) + 1, i = (c - (a - 1) * 44) / 2, o = (s - (r - 1) * 44) / 2;
|
|
192
192
|
}
|
|
193
193
|
function u(h, f) {
|
|
194
194
|
const { ctx: g, pointer: v } = t, [x, N, $] = t.ink, [_, p, b] = t.accent;
|
|
195
195
|
g.clearRect(0, 0, c, s), g.lineWidth = 1, g.strokeStyle = `rgba(${x},${N},${$},0.1)`, g.beginPath();
|
|
196
196
|
for (let y = 0; y < a; y++) {
|
|
197
|
-
const C =
|
|
197
|
+
const C = i + y * 44;
|
|
198
198
|
g.moveTo(C, 0), g.lineTo(C, s);
|
|
199
199
|
}
|
|
200
200
|
for (let y = 0; y < r; y++) {
|
|
@@ -208,7 +208,7 @@ const Bl = (t) => {
|
|
|
208
208
|
for (let y = 0; y < r; y++) {
|
|
209
209
|
const C = o + y * 44, L = 1 - Math.min(1, Math.abs(C - S) / 90), B = L * L * 0.8;
|
|
210
210
|
for (let A = 0; A < a; A++) {
|
|
211
|
-
const F =
|
|
211
|
+
const F = i + A * 44;
|
|
212
212
|
let E = B;
|
|
213
213
|
if (f) {
|
|
214
214
|
const W = Math.hypot(F - M, C - w);
|
|
@@ -221,7 +221,7 @@ const Bl = (t) => {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
return {
|
|
224
|
-
build:
|
|
224
|
+
build: d,
|
|
225
225
|
frame(h) {
|
|
226
226
|
u(h, t.pointer.active), t.clearGlow();
|
|
227
227
|
},
|
|
@@ -231,27 +231,27 @@ const Bl = (t) => {
|
|
|
231
231
|
};
|
|
232
232
|
}, Pl = (t) => {
|
|
233
233
|
let l = 0, c = 0, s = [];
|
|
234
|
-
function a(
|
|
235
|
-
return (Math.sin(
|
|
234
|
+
function a(d, u, h) {
|
|
235
|
+
return (Math.sin(d * 65e-4 + h * 0.18) + Math.cos(u * 72e-4 - h * 0.14) + Math.sin((d + u) * 4e-3 + h * 0.1)) * 1.1;
|
|
236
236
|
}
|
|
237
|
-
function r(
|
|
238
|
-
|
|
237
|
+
function r(d) {
|
|
238
|
+
d.x = Math.random() * l, d.y = Math.random() * c, d.hist.length = 0, d.life = 0, d.max = 80 + Math.random() * 130;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function i() {
|
|
241
241
|
l = t.w(), c = t.h();
|
|
242
|
-
const
|
|
242
|
+
const d = Ye(Math.round(l * c / 9e3), 60, 180);
|
|
243
243
|
s = [];
|
|
244
|
-
for (let u = 0; u <
|
|
244
|
+
for (let u = 0; u < d; u++) {
|
|
245
245
|
const h = { x: 0, y: 0, hist: [], life: 0, max: 0 };
|
|
246
246
|
r(h), s.push(h);
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
function o(
|
|
249
|
+
function o(d, u) {
|
|
250
250
|
const { ctx: h, pointer: f } = t, [g, v, x] = t.ink, [N, $, _] = t.accent;
|
|
251
251
|
h.clearRect(0, 0, l, c), h.lineCap = "round";
|
|
252
252
|
const p = f.x, b = f.y;
|
|
253
253
|
for (const S of s) {
|
|
254
|
-
let k = a(S.x, S.y,
|
|
254
|
+
let k = a(S.x, S.y, d), M = 0;
|
|
255
255
|
if (u) {
|
|
256
256
|
const B = S.x - p, A = S.y - b, F = Math.hypot(B, A);
|
|
257
257
|
F < 160 && (M = 1 - F / 160, k = $t(k, Math.atan2(A, B) + Math.PI / 2, M * 0.7));
|
|
@@ -271,17 +271,17 @@ const Bl = (t) => {
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
return {
|
|
274
|
-
build:
|
|
275
|
-
frame(
|
|
276
|
-
o(
|
|
274
|
+
build: i,
|
|
275
|
+
frame(d) {
|
|
276
|
+
o(d, t.pointer.active), t.clearGlow();
|
|
277
277
|
},
|
|
278
278
|
paintStatic() {
|
|
279
|
-
const { ctx:
|
|
280
|
-
|
|
279
|
+
const { ctx: d } = t, [u, h, f] = t.ink;
|
|
280
|
+
d.clearRect(0, 0, l, c), d.strokeStyle = `rgba(${u},${h},${f},0.16)`, d.lineWidth = 1, d.lineCap = "round";
|
|
281
281
|
for (let g = 0; g < c; g += 34)
|
|
282
282
|
for (let v = 0; v < l; v += 34) {
|
|
283
283
|
const x = a(v, g, 0);
|
|
284
|
-
|
|
284
|
+
d.beginPath(), d.moveTo(v, g), d.lineTo(v + Math.cos(x) * 10, g + Math.sin(x) * 10), d.stroke();
|
|
285
285
|
}
|
|
286
286
|
t.clearGlow();
|
|
287
287
|
}
|
|
@@ -290,15 +290,15 @@ const Bl = (t) => {
|
|
|
290
290
|
let l = 0, c = 0, s = [];
|
|
291
291
|
function a() {
|
|
292
292
|
l = t.w(), c = t.h(), s = [];
|
|
293
|
-
const
|
|
293
|
+
const d = Math.max(2, Math.floor(l / 26)), u = Math.max(2, Math.floor(c / 26)), h = (l - d * 26) / 2, f = (c - u * 26) / 2, g = Ye(Math.round(l * c / 26e3), 10, 34), v = [1, 0, -1, 0], x = [0, 1, 0, -1];
|
|
294
294
|
for (let N = 0; N < g; N++) {
|
|
295
|
-
let $ = Math.floor(Math.random() *
|
|
295
|
+
let $ = Math.floor(Math.random() * d), _ = Math.floor(Math.random() * u);
|
|
296
296
|
const p = [h + $ * 26, f + _ * 26], b = 3 + Math.floor(Math.random() * 5);
|
|
297
297
|
let S = Math.floor(Math.random() * 4);
|
|
298
298
|
for (let C = 0; C < b; C++) {
|
|
299
299
|
Math.random() < 0.6 && (S = (S + (Math.random() < 0.5 ? 1 : 3)) % 4);
|
|
300
300
|
const L = 1 + Math.floor(Math.random() * 4);
|
|
301
|
-
$ = Ye($ + v[S] * L, 0,
|
|
301
|
+
$ = Ye($ + v[S] * L, 0, d), _ = Ye(_ + x[S] * L, 0, u), p.push(h + $ * 26, f + _ * 26);
|
|
302
302
|
}
|
|
303
303
|
const k = [];
|
|
304
304
|
let M = 0;
|
|
@@ -312,23 +312,23 @@ const Bl = (t) => {
|
|
|
312
312
|
s.push({ pts: p, len: M, seg: k, pulses: w });
|
|
313
313
|
}
|
|
314
314
|
}
|
|
315
|
-
function r(
|
|
316
|
-
let h = u *
|
|
317
|
-
for (let f = 0; f <
|
|
318
|
-
const g =
|
|
319
|
-
if (h <= g || f ===
|
|
315
|
+
function r(d, u) {
|
|
316
|
+
let h = u * d.len;
|
|
317
|
+
for (let f = 0; f < d.seg.length; f++) {
|
|
318
|
+
const g = d.seg[f];
|
|
319
|
+
if (h <= g || f === d.seg.length - 1) {
|
|
320
320
|
const v = g > 0 ? h / g : 0;
|
|
321
|
-
return [$t(
|
|
321
|
+
return [$t(d.pts[f * 2], d.pts[f * 2 + 2], v), $t(d.pts[f * 2 + 1], d.pts[f * 2 + 3], v)];
|
|
322
322
|
}
|
|
323
323
|
h -= g;
|
|
324
324
|
}
|
|
325
|
-
return [
|
|
325
|
+
return [d.pts[0], d.pts[1]];
|
|
326
326
|
}
|
|
327
|
-
function d
|
|
327
|
+
function i(d, u, h, f, g, v) {
|
|
328
328
|
const { ctx: x } = t;
|
|
329
|
-
x.lineWidth = 1.2, x.strokeStyle = `rgba(${h},${f},${g},${0.45 + v * 0.4})`, x.beginPath(), x.arc(
|
|
329
|
+
x.lineWidth = 1.2, x.strokeStyle = `rgba(${h},${f},${g},${0.45 + v * 0.4})`, x.beginPath(), x.arc(d, u, 2.4, 0, tt), x.stroke(), x.beginPath(), x.arc(d, u, 0.9, 0, tt), x.fillStyle = `rgba(${h},${f},${g},${0.6 + v * 0.4})`, x.fill();
|
|
330
330
|
}
|
|
331
|
-
function o(
|
|
331
|
+
function o(d, u) {
|
|
332
332
|
const { ctx: h, pointer: f } = t, [g, v, x] = t.ink, [N, $, _] = t.accent;
|
|
333
333
|
h.clearRect(0, 0, l, c), h.lineJoin = "round", h.lineCap = "round";
|
|
334
334
|
const p = f.x, b = f.y;
|
|
@@ -340,9 +340,9 @@ const Bl = (t) => {
|
|
|
340
340
|
}
|
|
341
341
|
h.strokeStyle = `rgba(${g},${v},${x},${0.12 + k * 0.18})`, h.lineWidth = 1.2, h.beginPath(), h.moveTo(S.pts[0], S.pts[1]);
|
|
342
342
|
for (let M = 2; M < S.pts.length; M += 2) h.lineTo(S.pts[M], S.pts[M + 1]);
|
|
343
|
-
h.stroke(),
|
|
343
|
+
h.stroke(), i(S.pts[0], S.pts[1], g, v, x, k), i(S.pts[S.pts.length - 2], S.pts[S.pts.length - 1], g, v, x, k);
|
|
344
344
|
for (const M of S.pulses) {
|
|
345
|
-
M.p += M.sp *
|
|
345
|
+
M.p += M.sp * d, M.p > 1 && (M.p -= 1);
|
|
346
346
|
const [w, y] = r(S, M.p);
|
|
347
347
|
t.dark && (h.shadowColor = `rgba(${N},${$},${_},0.85)`, h.shadowBlur = 10), h.beginPath(), h.arc(w, y, 2.1, 0, tt), h.fillStyle = `rgba(${N},${$},${_},0.95)`, h.fill(), h.shadowBlur = 0;
|
|
348
348
|
}
|
|
@@ -350,7 +350,7 @@ const Bl = (t) => {
|
|
|
350
350
|
}
|
|
351
351
|
return {
|
|
352
352
|
build: a,
|
|
353
|
-
frame(
|
|
353
|
+
frame(d, u) {
|
|
354
354
|
o(u, t.pointer.active), t.clearGlow();
|
|
355
355
|
},
|
|
356
356
|
paintStatic() {
|
|
@@ -377,7 +377,7 @@ function ca({
|
|
|
377
377
|
if (!a) return;
|
|
378
378
|
const r = a.getContext("2d");
|
|
379
379
|
if (!r) return;
|
|
380
|
-
const
|
|
380
|
+
const i = ((Z = window.matchMedia) == null ? void 0 : Z.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, o = n === "dark", d = getComputedStyle(a), u = Al(d, "--select-dot", o ? [235, 238, 255] : [64, 68, 92]), h = Fl(d.getPropertyValue("--select-primary"), o ? [255, 255, 255] : [33, 37, 41]);
|
|
381
381
|
let f = 0, g = 0, v = 0, x = 0, N = null, $ = 0;
|
|
382
382
|
const _ = 1.2, p = { x: 0, y: 0 }, b = { x: 0, y: 0, active: !1 };
|
|
383
383
|
let S = 0, k = 0, M = -10;
|
|
@@ -417,15 +417,15 @@ function ca({
|
|
|
417
417
|
}
|
|
418
418
|
F();
|
|
419
419
|
const W = new ResizeObserver(() => {
|
|
420
|
-
F(),
|
|
420
|
+
F(), i && A.paintStatic();
|
|
421
421
|
});
|
|
422
|
-
return W.observe(a),
|
|
422
|
+
return W.observe(a), i ? (A.paintStatic(), () => W.disconnect()) : (window.addEventListener("pointermove", I, { passive: !0 }), window.addEventListener("scroll", O, { passive: !0 }), Me.ticker.add(T), () => {
|
|
423
423
|
Me.ticker.remove(T), Me.killTweensOf(p), window.removeEventListener("pointermove", I), window.removeEventListener("scroll", O), W.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
|
}
|
|
427
|
-
const sa = R(function({ title: n, subtitle: l, logo: c, mark: s, children: a, footer: r, className:
|
|
428
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
427
|
+
const sa = R(function({ title: n, subtitle: l, logo: c, mark: s, children: a, footer: r, className: i, ...o }, d) {
|
|
428
|
+
return /* @__PURE__ */ m("div", { ref: d, ...o, className: `select-card${i ? " " + i : ""}`, children: [
|
|
429
429
|
/* @__PURE__ */ m("div", { className: "select-card__body", children: [
|
|
430
430
|
c && /* @__PURE__ */ e("div", { className: "select-card__brand", children: c }),
|
|
431
431
|
/* @__PURE__ */ m("div", { className: "select-card__header", children: [
|
|
@@ -444,15 +444,15 @@ const sa = R(function({ title: n, subtitle: l, logo: c, mark: s, children: a, fo
|
|
|
444
444
|
loading: s = !1,
|
|
445
445
|
icon: a,
|
|
446
446
|
trailingIcon: r,
|
|
447
|
-
inline:
|
|
447
|
+
inline: i = !1,
|
|
448
448
|
disabled: o,
|
|
449
|
-
onPointerDown:
|
|
449
|
+
onPointerDown: d,
|
|
450
450
|
children: u,
|
|
451
451
|
...h
|
|
452
452
|
}, f) {
|
|
453
453
|
const [g, v] = D([]), x = q(0), N = (_) => {
|
|
454
454
|
var k;
|
|
455
|
-
if (
|
|
455
|
+
if (d == null || d(_), o || s || typeof window < "u" && ((k = window.matchMedia) != null && k.call(window, "(prefers-reduced-motion: reduce)").matches)) return;
|
|
456
456
|
const p = _.currentTarget.getBoundingClientRect(), b = Math.max(p.width, p.height) * 2, S = x.current++;
|
|
457
457
|
v((M) => [
|
|
458
458
|
...M,
|
|
@@ -467,7 +467,7 @@ const sa = R(function({ title: n, subtitle: l, logo: c, mark: s, children: a, fo
|
|
|
467
467
|
}
|
|
468
468
|
]);
|
|
469
469
|
}, $ = (_) => v((p) => p.filter((b) => b.key !== _));
|
|
470
|
-
return /* @__PURE__ */ m("button", { ref: f, type: l, className: `select-btn select-btn--${n}${c !== "md" ? ` select-btn--${c}` : ""}${
|
|
470
|
+
return /* @__PURE__ */ m("button", { ref: f, type: l, className: `select-btn select-btn--${n}${c !== "md" ? ` select-btn--${c}` : ""}${i ? " select-btn--auto" : ""}`, disabled: o || s, onPointerDown: N, ...h, children: [
|
|
471
471
|
g.map((_) => /* @__PURE__ */ e(
|
|
472
472
|
"span",
|
|
473
473
|
{
|
|
@@ -858,16 +858,16 @@ function ja() {
|
|
|
858
858
|
/* @__PURE__ */ e("path", { d: "M10 19V5c0-2 1-3 3-3h6c2 0 3 1 3 3v14c0 2-1 3-3 3h-6c-2 0-3-1-3-3Z" })
|
|
859
859
|
] });
|
|
860
860
|
}
|
|
861
|
-
const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a, ...r },
|
|
862
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
861
|
+
const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a, ...r }, i) {
|
|
862
|
+
return /* @__PURE__ */ m("div", { ref: i, ...r, className: `select-field__labelrow${a ? " " + a : ""}`, children: [
|
|
863
863
|
/* @__PURE__ */ m("span", { className: "select-field__labelwrap", children: [
|
|
864
864
|
/* @__PURE__ */ e("label", { className: "select-field__label", htmlFor: n, children: l }),
|
|
865
865
|
c && /* @__PURE__ */ e("span", { className: "select-field__info", title: c, "aria-label": c, children: /* @__PURE__ */ e(Jt, {}) })
|
|
866
866
|
] }),
|
|
867
867
|
s
|
|
868
868
|
] });
|
|
869
|
-
}), Ze = R(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: r, description:
|
|
870
|
-
const I = te(), O = p ?? I, [W, Z] = D(!1), G = s === "password", J = G && W ? "text" : s, ie =
|
|
869
|
+
}), Ze = R(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: r, description: i, hint: o, error: d, prefix: u, suffix: h, mono: f, autoComplete: g, placeholder: v, required: x, disabled: N, readOnly: $, name: _, id: p, minLength: b, maxLength: S, min: k, max: M, step: w, inputMode: y, autoFocus: C, onBlur: L, onKeyDown: B, size: A = "md", className: F, ...E }, T) {
|
|
870
|
+
const I = te(), O = p ?? I, [W, Z] = D(!1), G = s === "password", J = G && W ? "text" : s, ie = d ? `${O}-err` : o ? `${O}-hint` : void 0, fe = u != null || h != null, Se = s === "number" && !fe && !$, ne = l === "" ? null : Number(l), H = (de) => {
|
|
871
871
|
const me = Number(w ?? 1) || 1;
|
|
872
872
|
let oe = (ne != null && Number.isFinite(ne) ? ne : 0) + de * me;
|
|
873
873
|
k != null && (oe = Math.max(Number(k), oe)), M != null && (oe = Math.min(Number(M), oe)), c(String(oe));
|
|
@@ -875,7 +875,7 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
875
875
|
"input",
|
|
876
876
|
{
|
|
877
877
|
id: O,
|
|
878
|
-
className: `select-input${G ? " select-input--has-suffix" : ""}${Se ? " select-input--has-stepper" : ""}${f ? " select-input--mono" : ""}${
|
|
878
|
+
className: `select-input${G ? " select-input--has-suffix" : ""}${Se ? " select-input--has-stepper" : ""}${f ? " select-input--mono" : ""}${d ? " select-input--error" : ""}`,
|
|
879
879
|
type: J,
|
|
880
880
|
value: l,
|
|
881
881
|
onChange: (de) => c(de.target.value),
|
|
@@ -894,14 +894,14 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
894
894
|
step: w,
|
|
895
895
|
inputMode: y,
|
|
896
896
|
autoFocus: C,
|
|
897
|
-
"aria-invalid":
|
|
897
|
+
"aria-invalid": d ? !0 : void 0,
|
|
898
898
|
"aria-describedby": ie
|
|
899
899
|
}
|
|
900
900
|
);
|
|
901
901
|
return /* @__PURE__ */ m("div", { ref: T, ...E, className: `select-field${A === "sm" ? " select-field--sm" : ""}${F ? " " + F : ""}`, children: [
|
|
902
902
|
(n || r || a) && /* @__PURE__ */ e(lt, { htmlFor: O, label: n, info: r, action: a }),
|
|
903
|
-
|
|
904
|
-
/* @__PURE__ */ m("div", { className: `select-input-wrap${fe ? " select-input-wrap--affixed" : ""}${
|
|
903
|
+
i && /* @__PURE__ */ e("p", { className: "select-field__desc", children: i }),
|
|
904
|
+
/* @__PURE__ */ m("div", { className: `select-input-wrap${fe ? " select-input-wrap--affixed" : ""}${d ? " select-input-wrap--error" : ""}`, children: [
|
|
905
905
|
u != null && /* @__PURE__ */ e("span", { className: "select-input__affix select-input__affix--prefix", children: u }),
|
|
906
906
|
pe,
|
|
907
907
|
h != null && /* @__PURE__ */ e("span", { className: "select-input__affix select-input__affix--suffix", children: h }),
|
|
@@ -942,10 +942,10 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
942
942
|
)
|
|
943
943
|
] })
|
|
944
944
|
] }),
|
|
945
|
-
|
|
945
|
+
d ? /* @__PURE__ */ e("p", { id: `${O}-err`, className: "select-field__error", children: d }) : o ? /* @__PURE__ */ e("p", { id: `${O}-hint`, className: "select-field__hint", children: o }) : null
|
|
946
946
|
] });
|
|
947
|
-
}), Va = R(function({ label: n, checked: l, onChange: c, disabled: s, hint: a, name: r, className:
|
|
948
|
-
return /* @__PURE__ */ m("span", { ref:
|
|
947
|
+
}), Va = R(function({ label: n, checked: l, onChange: c, disabled: s, hint: a, name: r, className: i, ...o }, d) {
|
|
948
|
+
return /* @__PURE__ */ m("span", { ref: d, ...o, className: `select-checkbox-field${s ? " select-checkbox-field--disabled" : ""}${i ? " " + i : ""}`, children: [
|
|
949
949
|
/* @__PURE__ */ m("label", { className: "select-checkbox", children: [
|
|
950
950
|
/* @__PURE__ */ e(
|
|
951
951
|
"input",
|
|
@@ -962,8 +962,8 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
962
962
|
] }),
|
|
963
963
|
a && /* @__PURE__ */ e("span", { className: "select-checkbox__hint", children: a })
|
|
964
964
|
] });
|
|
965
|
-
}), Za = R(function({ label: n, value: l, onChange: c, labelAction: s, info: a, description: r, hint:
|
|
966
|
-
const S = te(), k = o ? `${S}-err` :
|
|
965
|
+
}), Za = R(function({ label: n, value: l, onChange: c, labelAction: s, info: a, description: r, hint: i, error: o, placeholder: d, rows: u = 4, mono: h, name: f, required: g, disabled: v, maxLength: x, onBlur: N, size: $ = "md", className: _, ...p }, b) {
|
|
966
|
+
const S = te(), k = o ? `${S}-err` : i ? `${S}-hint` : void 0;
|
|
967
967
|
return /* @__PURE__ */ m("div", { ref: b, ...p, className: `select-field${$ === "sm" ? " select-field--sm" : ""}${_ ? " " + _ : ""}`, children: [
|
|
968
968
|
(n || a || s) && /* @__PURE__ */ e(lt, { htmlFor: S, label: n, info: a, action: s }),
|
|
969
969
|
r && /* @__PURE__ */ e("p", { className: "select-field__desc", children: r }),
|
|
@@ -975,7 +975,7 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
975
975
|
value: l,
|
|
976
976
|
onChange: (M) => c(M.target.value),
|
|
977
977
|
onBlur: N,
|
|
978
|
-
placeholder:
|
|
978
|
+
placeholder: d,
|
|
979
979
|
rows: u,
|
|
980
980
|
name: f,
|
|
981
981
|
required: g,
|
|
@@ -985,13 +985,13 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
985
985
|
"aria-describedby": k
|
|
986
986
|
}
|
|
987
987
|
),
|
|
988
|
-
o ? /* @__PURE__ */ e("p", { id: `${S}-err`, className: "select-field__error", children: o }) :
|
|
988
|
+
o ? /* @__PURE__ */ e("p", { id: `${S}-err`, className: "select-field__error", children: o }) : i ? /* @__PURE__ */ e("p", { id: `${S}-hint`, className: "select-field__hint", children: i }) : null
|
|
989
989
|
] });
|
|
990
|
-
}), Ga = R(function({ label: n, value: l, onChange: c, unit: s, info: a, hint: r, error:
|
|
990
|
+
}), Ga = R(function({ label: n, value: l, onChange: c, unit: s, info: a, hint: r, error: i, placeholder: o = "0", disabled: d = !1, min: u, max: h, className: f, ...g }, v) {
|
|
991
991
|
const x = te();
|
|
992
992
|
return /* @__PURE__ */ m("div", { ref: v, ...g, className: `select-field${f ? " " + f : ""}`, children: [
|
|
993
993
|
n && /* @__PURE__ */ e(lt, { htmlFor: x, label: n, info: a }),
|
|
994
|
-
/* @__PURE__ */ m("div", { className: `select-unit${
|
|
994
|
+
/* @__PURE__ */ m("div", { className: `select-unit${i ? " select-unit--error" : ""}${d ? " select-unit--disabled" : ""}`, children: [
|
|
995
995
|
/* @__PURE__ */ e(
|
|
996
996
|
"input",
|
|
997
997
|
{
|
|
@@ -1002,19 +1002,19 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
1002
1002
|
value: l,
|
|
1003
1003
|
onChange: (N) => c(N.target.value),
|
|
1004
1004
|
placeholder: o,
|
|
1005
|
-
disabled:
|
|
1005
|
+
disabled: d,
|
|
1006
1006
|
min: u,
|
|
1007
1007
|
max: h
|
|
1008
1008
|
}
|
|
1009
1009
|
),
|
|
1010
1010
|
/* @__PURE__ */ e("span", { className: "select-unit__unit", children: s })
|
|
1011
1011
|
] }),
|
|
1012
|
-
|
|
1012
|
+
i ? /* @__PURE__ */ e("p", { className: "select-field__error", children: i }) : r ? /* @__PURE__ */ e("p", { className: "select-field__hint", children: r }) : null
|
|
1013
1013
|
] });
|
|
1014
1014
|
}), Kl = new Intl.NumberFormat("pt-BR", {
|
|
1015
1015
|
minimumFractionDigits: 2,
|
|
1016
1016
|
maximumFractionDigits: 2
|
|
1017
|
-
}), Ua = R(function({ label: n, value: l, onChange: c, info: s, hint: a, error: r, onBlur:
|
|
1017
|
+
}), Ua = R(function({ label: n, value: l, onChange: c, info: s, hint: a, error: r, onBlur: i, placeholder: o = "0,00", name: d, disabled: u = !1, size: h = "md", className: f, ...g }, v) {
|
|
1018
1018
|
const x = te();
|
|
1019
1019
|
return /* @__PURE__ */ m("div", { ref: v, ...g, className: `select-field${h === "sm" ? " select-field--sm" : ""}${f ? " " + f : ""}`, children: [
|
|
1020
1020
|
n && /* @__PURE__ */ e(lt, { htmlFor: x, label: n, info: s }),
|
|
@@ -1032,7 +1032,7 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
1032
1032
|
type: "text",
|
|
1033
1033
|
inputMode: "numeric",
|
|
1034
1034
|
autoComplete: "off",
|
|
1035
|
-
name:
|
|
1035
|
+
name: d,
|
|
1036
1036
|
disabled: u,
|
|
1037
1037
|
value: l == null ? "" : Kl.format(l / 100),
|
|
1038
1038
|
placeholder: o,
|
|
@@ -1040,7 +1040,7 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
1040
1040
|
const $ = N.target.value.replace(/\D/g, "");
|
|
1041
1041
|
c($ ? parseInt($, 10) : 0);
|
|
1042
1042
|
},
|
|
1043
|
-
onBlur:
|
|
1043
|
+
onBlur: i,
|
|
1044
1044
|
"aria-invalid": r ? !0 : void 0
|
|
1045
1045
|
}
|
|
1046
1046
|
)
|
|
@@ -1069,7 +1069,7 @@ function qa({
|
|
|
1069
1069
|
error: s,
|
|
1070
1070
|
onBlur: a,
|
|
1071
1071
|
required: r,
|
|
1072
|
-
name:
|
|
1072
|
+
name: i
|
|
1073
1073
|
}) {
|
|
1074
1074
|
const o = Jl(n);
|
|
1075
1075
|
return /* @__PURE__ */ e(
|
|
@@ -1077,7 +1077,7 @@ function qa({
|
|
|
1077
1077
|
{
|
|
1078
1078
|
label: t,
|
|
1079
1079
|
value: Ql(n),
|
|
1080
|
-
onChange: (
|
|
1080
|
+
onChange: (d) => l(Qt(d)),
|
|
1081
1081
|
inputMode: "numeric",
|
|
1082
1082
|
autoComplete: "off",
|
|
1083
1083
|
maxLength: 18,
|
|
@@ -1085,18 +1085,18 @@ function qa({
|
|
|
1085
1085
|
error: s,
|
|
1086
1086
|
onBlur: a,
|
|
1087
1087
|
required: r,
|
|
1088
|
-
name:
|
|
1088
|
+
name: i
|
|
1089
1089
|
}
|
|
1090
1090
|
);
|
|
1091
1091
|
}
|
|
1092
|
-
const ht = R(function({ children: n, tone: l = "critical", title: c, action: s, className: a, ...r },
|
|
1093
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
1092
|
+
const ht = R(function({ children: n, tone: l = "critical", title: c, action: s, className: a, ...r }, i) {
|
|
1093
|
+
return /* @__PURE__ */ m("div", { ref: i, ...r, className: `select-alert select-alert--${l}${a ? " " + a : ""}`, role: "alert", children: [
|
|
1094
1094
|
c != null && /* @__PURE__ */ e("p", { className: "select-alert__title", children: c }),
|
|
1095
1095
|
n != null && /* @__PURE__ */ e("div", { className: "select-alert__body", children: n }),
|
|
1096
1096
|
s != null && /* @__PURE__ */ e("div", { className: "select-alert__action", children: s })
|
|
1097
1097
|
] });
|
|
1098
|
-
}), wt = R(function({ src: n, docExt: l, name: c, sub: s, badge: a, onRemove: r, className:
|
|
1099
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
1098
|
+
}), wt = R(function({ src: n, docExt: l, name: c, sub: s, badge: a, onRemove: r, className: i, ...o }, d) {
|
|
1099
|
+
return /* @__PURE__ */ m("div", { ref: d, ...o, className: `select-filetile${i ? " " + i : ""}`, children: [
|
|
1100
1100
|
/* @__PURE__ */ m("div", { className: "select-filetile__media", children: [
|
|
1101
1101
|
n ? /* @__PURE__ */ e(
|
|
1102
1102
|
"img",
|
|
@@ -1152,7 +1152,7 @@ function Jn(t) {
|
|
|
1152
1152
|
return t;
|
|
1153
1153
|
}
|
|
1154
1154
|
}
|
|
1155
|
-
const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, allowMultiple: a = !0, maxFiles: r, hint:
|
|
1155
|
+
const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, allowMultiple: a = !0, maxFiles: r, hint: i, className: o, ...d }, u) {
|
|
1156
1156
|
const h = q(null), [f, g] = D(!1), [v, x] = D(0), N = s * 1024 * 1024, $ = xe(() => n.map((C) => zn(C) ? URL.createObjectURL(C) : null), [n]);
|
|
1157
1157
|
le(
|
|
1158
1158
|
() => () => {
|
|
@@ -1183,7 +1183,7 @@ const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1183
1183
|
var C;
|
|
1184
1184
|
return (C = h.current) == null ? void 0 : C.click();
|
|
1185
1185
|
}, k = (C) => l(n.filter((L, B) => B !== C)), M = r != null && n.length >= r, w = (a || n.length === 0) && !M, y = n.length > 0;
|
|
1186
|
-
return /* @__PURE__ */ m("div", { ref: u, ...
|
|
1186
|
+
return /* @__PURE__ */ m("div", { ref: u, ...d, className: `select-dropzone-wrap${o ? " " + o : ""}`, children: [
|
|
1187
1187
|
y && /* @__PURE__ */ m("div", { className: "select-filetile-grid", children: [
|
|
1188
1188
|
n.map((C, L) => /* @__PURE__ */ e(
|
|
1189
1189
|
wt,
|
|
@@ -1219,7 +1219,7 @@ const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1219
1219
|
...b,
|
|
1220
1220
|
children: [
|
|
1221
1221
|
/* @__PURE__ */ e(kt, {}),
|
|
1222
|
-
/* @__PURE__ */ e("span", { children:
|
|
1222
|
+
/* @__PURE__ */ e("span", { children: i ?? `Selecionar arquivo · até ${s} MB` })
|
|
1223
1223
|
]
|
|
1224
1224
|
}
|
|
1225
1225
|
),
|
|
@@ -1248,7 +1248,7 @@ const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1248
1248
|
/* @__PURE__ */ e("span", { className: "select-addbtn__icon", "aria-hidden": "true", children: c ?? /* @__PURE__ */ e(nt, {}) }),
|
|
1249
1249
|
n
|
|
1250
1250
|
] });
|
|
1251
|
-
}), za = R(function({ label: n, urls: l, onChange: c, maxUrls: s, placeholder: a, helpText: r, className:
|
|
1251
|
+
}), za = R(function({ label: n, urls: l, onChange: c, maxUrls: s, placeholder: a, helpText: r, className: i, ...o }, d) {
|
|
1252
1252
|
const [u, h] = D(""), [f, g] = D(null), v = s != null && l.length >= s, x = () => {
|
|
1253
1253
|
const _ = u.trim();
|
|
1254
1254
|
if (_) {
|
|
@@ -1265,7 +1265,7 @@ const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1265
1265
|
}, N = (_) => {
|
|
1266
1266
|
_.key === "Enter" && (_.preventDefault(), x());
|
|
1267
1267
|
}, $ = (_) => c(l.filter((p, b) => b !== _));
|
|
1268
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
1268
|
+
return /* @__PURE__ */ m("div", { ref: d, ...o, className: `select-field${i ? " " + i : ""}`, children: [
|
|
1269
1269
|
n && /* @__PURE__ */ e("span", { className: "select-field__label", children: n }),
|
|
1270
1270
|
l.length > 0 && /* @__PURE__ */ e("div", { className: "select-filetile-grid", children: l.map((_, p) => /* @__PURE__ */ e(wt, { src: _, name: Jn(_), onRemove: () => $(p) }, `${_}-${p}`)) }),
|
|
1271
1271
|
!v && /* @__PURE__ */ m(ae, { children: [
|
|
@@ -1289,8 +1289,8 @@ const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1289
1289
|
] }),
|
|
1290
1290
|
r != null && !f && /* @__PURE__ */ e("p", { className: "select-field__hint", children: r })
|
|
1291
1291
|
] });
|
|
1292
|
-
}), tc = R(function({ label: n, mode: l = "multiple", files: c, onFilesChange: s, urls: a, onUrlsChange: r, accept:
|
|
1293
|
-
const $ = l === "single", _ = q(null), [p, b] = D(!1), [S, k] = D(0), [M, w] = D(""), [y, C] = D(null), L = $ ? 1 : Math.max(1,
|
|
1292
|
+
}), tc = R(function({ label: n, mode: l = "multiple", files: c, onFilesChange: s, urls: a, onUrlsChange: r, accept: i = ".jpg,.jpeg,.png,.webp", maxSizeMB: o = 3, maxItems: d = 10, maxFiles: u, uploadHint: h, urlPlaceholder: f, helpText: g, className: v, ...x }, N) {
|
|
1293
|
+
const $ = l === "single", _ = q(null), [p, b] = D(!1), [S, k] = D(0), [M, w] = D(""), [y, C] = D(null), L = $ ? 1 : Math.max(1, d), B = $ ? 1 : u ?? L, A = c.length + a.length, F = $ ? A === 0 : A < L && c.length < B, E = $ ? A === 0 : A < L, T = A > 0, I = o * 1024 * 1024, O = xe(() => c.map((H) => zn(H) ? URL.createObjectURL(H) : null), [c]);
|
|
1294
1294
|
le(
|
|
1295
1295
|
() => () => {
|
|
1296
1296
|
O.forEach((H) => {
|
|
@@ -1300,7 +1300,7 @@ const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1300
1300
|
[O]
|
|
1301
1301
|
);
|
|
1302
1302
|
const W = (H) => {
|
|
1303
|
-
const Q = H.filter((de) => de.size <= I && Yn(de,
|
|
1303
|
+
const Q = H.filter((de) => de.size <= I && Yn(de, i));
|
|
1304
1304
|
if (k(H.length - Q.length), !Q.length) return;
|
|
1305
1305
|
if ($) {
|
|
1306
1306
|
r([]), s(Q.slice(0, 1));
|
|
@@ -1389,7 +1389,7 @@ const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1389
1389
|
{
|
|
1390
1390
|
ref: _,
|
|
1391
1391
|
type: "file",
|
|
1392
|
-
accept:
|
|
1392
|
+
accept: i,
|
|
1393
1393
|
multiple: !$,
|
|
1394
1394
|
hidden: !0,
|
|
1395
1395
|
onChange: (H) => {
|
|
@@ -1406,8 +1406,8 @@ const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1406
1406
|
] }),
|
|
1407
1407
|
g != null && /* @__PURE__ */ e("p", { className: "select-field__hint", children: g })
|
|
1408
1408
|
] });
|
|
1409
|
-
}), jt = R(function({ label: n, value: l, onChange: c, options: s, labelAction: a, info: r, description:
|
|
1410
|
-
const _ = te(), p =
|
|
1409
|
+
}), jt = R(function({ label: n, value: l, onChange: c, options: s, labelAction: a, info: r, description: i, hint: o, error: d, placeholder: u, name: h, required: f, disabled: g, size: v = "md", className: x, ...N }, $) {
|
|
1410
|
+
const _ = te(), p = d ? `${_}-err` : o ? `${_}-hint` : void 0;
|
|
1411
1411
|
return /* @__PURE__ */ m("div", { ref: $, ...N, className: `select-field${v === "sm" ? " select-field--sm" : ""}${x ? " " + x : ""}`, children: [
|
|
1412
1412
|
(n || r || a) && /* @__PURE__ */ m("div", { className: "select-field__labelrow", children: [
|
|
1413
1413
|
/* @__PURE__ */ m("span", { className: "select-field__labelwrap", children: [
|
|
@@ -1416,19 +1416,19 @@ const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1416
1416
|
] }),
|
|
1417
1417
|
a
|
|
1418
1418
|
] }),
|
|
1419
|
-
|
|
1419
|
+
i && /* @__PURE__ */ e("p", { className: "select-field__desc", children: i }),
|
|
1420
1420
|
/* @__PURE__ */ m("div", { className: "select-select-wrap", children: [
|
|
1421
1421
|
/* @__PURE__ */ m(
|
|
1422
1422
|
"select",
|
|
1423
1423
|
{
|
|
1424
1424
|
id: _,
|
|
1425
|
-
className: `select-input select-select${
|
|
1425
|
+
className: `select-input select-select${d ? " select-input--error" : ""}`,
|
|
1426
1426
|
value: l,
|
|
1427
1427
|
onChange: (b) => c(b.target.value),
|
|
1428
1428
|
name: h,
|
|
1429
1429
|
required: f,
|
|
1430
1430
|
disabled: g,
|
|
1431
|
-
"aria-invalid":
|
|
1431
|
+
"aria-invalid": d ? !0 : void 0,
|
|
1432
1432
|
"aria-describedby": p,
|
|
1433
1433
|
children: [
|
|
1434
1434
|
u && /* @__PURE__ */ e("option", { value: "", disabled: !0, children: u }),
|
|
@@ -1438,7 +1438,7 @@ const Ya = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1438
1438
|
),
|
|
1439
1439
|
/* @__PURE__ */ e("span", { className: "select-select-caret", "aria-hidden": "true", children: /* @__PURE__ */ e(be, {}) })
|
|
1440
1440
|
] }),
|
|
1441
|
-
|
|
1441
|
+
d ? /* @__PURE__ */ e("p", { id: `${_}-err`, className: "select-field__error", children: d }) : o ? /* @__PURE__ */ e("p", { id: `${_}-hint`, className: "select-field__hint", children: o }) : null
|
|
1442
1442
|
] });
|
|
1443
1443
|
}), nc = R(function({ children: n, columns: l = 2, className: c, ...s }, a) {
|
|
1444
1444
|
return /* @__PURE__ */ e("div", { ref: a, ...s, className: `select-fieldgrid select-fieldgrid--${l}${c ? " " + c : ""}`, children: n });
|
|
@@ -1447,32 +1447,32 @@ function cc(t) {
|
|
|
1447
1447
|
const n = t.replace(/[^\d-]/g, ""), [l = "", ...c] = n.split("-");
|
|
1448
1448
|
return c.length ? `${l}-${c.join("").replace(/\D/g, "").slice(0, 2)}` : l;
|
|
1449
1449
|
}
|
|
1450
|
-
const Xa = R(function({ value: n, onChange: l, banks: c = [], showType: s = !1, error: a, className: r, ...
|
|
1451
|
-
const
|
|
1450
|
+
const Xa = R(function({ value: n, onChange: l, banks: c = [], showType: s = !1, error: a, className: r, ...i }, o) {
|
|
1451
|
+
const d = (h) => l({ ...n, ...h }), u = [
|
|
1452
1452
|
{ label: "Selecione o banco", value: "" },
|
|
1453
1453
|
// `name` already reads "001 - Banco do Brasil S.A." (code + bank name), so show it alone —
|
|
1454
1454
|
// prefixing the raw `code` ("1") just repeats the code and clutters the option.
|
|
1455
1455
|
...c.map((h) => ({ label: h.name || h.code, value: h.code }))
|
|
1456
1456
|
];
|
|
1457
|
-
return /* @__PURE__ */ m("div", { ref: o, ...
|
|
1457
|
+
return /* @__PURE__ */ m("div", { ref: o, ...i, className: `select-stack${r ? " " + r : ""}`, children: [
|
|
1458
1458
|
/* @__PURE__ */ e(
|
|
1459
1459
|
jt,
|
|
1460
1460
|
{
|
|
1461
1461
|
label: "Banco",
|
|
1462
1462
|
options: u,
|
|
1463
1463
|
value: n.bankCode,
|
|
1464
|
-
onChange: (h) =>
|
|
1464
|
+
onChange: (h) => d({ bankCode: h }),
|
|
1465
1465
|
error: a
|
|
1466
1466
|
}
|
|
1467
1467
|
),
|
|
1468
1468
|
/* @__PURE__ */ m(nc, { columns: 2, children: [
|
|
1469
|
-
/* @__PURE__ */ e(Ze, { label: "Agência", value: n.agency, onChange: (h) =>
|
|
1469
|
+
/* @__PURE__ */ e(Ze, { label: "Agência", value: n.agency, onChange: (h) => d({ agency: lc(h) }), inputMode: "numeric", maxLength: 6 }),
|
|
1470
1470
|
/* @__PURE__ */ e(
|
|
1471
1471
|
Ze,
|
|
1472
1472
|
{
|
|
1473
1473
|
label: "Conta (com dígito)",
|
|
1474
1474
|
value: n.account,
|
|
1475
|
-
onChange: (h) =>
|
|
1475
|
+
onChange: (h) => d({ account: cc(h) }),
|
|
1476
1476
|
inputMode: "numeric",
|
|
1477
1477
|
maxLength: 16,
|
|
1478
1478
|
placeholder: "Ex: 9288-1"
|
|
@@ -1488,22 +1488,22 @@ const Xa = R(function({ value: n, onChange: l, banks: c = [], showType: s = !1,
|
|
|
1488
1488
|
{ label: "Conta poupança", value: "savings" }
|
|
1489
1489
|
],
|
|
1490
1490
|
value: n.type ?? "checking",
|
|
1491
|
-
onChange: (h) =>
|
|
1491
|
+
onChange: (h) => d({ type: h })
|
|
1492
1492
|
}
|
|
1493
1493
|
)
|
|
1494
1494
|
] });
|
|
1495
|
-
}), en = R(function({ checked: n, onChange: l, disabled: c = !1, label: s, className: a, ...r },
|
|
1496
|
-
return /* @__PURE__ */ e("button", { ref:
|
|
1495
|
+
}), en = R(function({ checked: n, onChange: l, disabled: c = !1, label: s, className: a, ...r }, i) {
|
|
1496
|
+
return /* @__PURE__ */ e("button", { ref: i, ...r, type: "button", role: "switch", "aria-checked": n, "aria-label": s, disabled: c, className: `select-switch${n ? " select-switch--on" : ""}${a ? " " + a : ""}`, onClick: () => l(!n), children: /* @__PURE__ */ e("span", { className: "select-switch__knob", "aria-hidden": "true" }) });
|
|
1497
1497
|
}), Ka = R(function({ children: n, scroll: l = !1, className: c, ...s }, a) {
|
|
1498
1498
|
return /* @__PURE__ */ e("div", { ref: a, ...s, className: `select-togglelist${l ? " select-togglelist--scroll" : ""}${c ? " " + c : ""}`, children: n });
|
|
1499
|
-
}), Ja = R(function({ icon: n, label: l, checked: c, onChange: s, disabled: a = !1, className: r, ...
|
|
1500
|
-
return /* @__PURE__ */ m("div", { ref: o, ...
|
|
1499
|
+
}), Ja = R(function({ icon: n, label: l, checked: c, onChange: s, disabled: a = !1, className: r, ...i }, o) {
|
|
1500
|
+
return /* @__PURE__ */ m("div", { ref: o, ...i, className: `select-togglerow${a ? " select-togglerow--disabled" : ""}${r ? " " + r : ""}`, children: [
|
|
1501
1501
|
n && /* @__PURE__ */ e("span", { className: "select-togglerow__icon", children: n }),
|
|
1502
1502
|
/* @__PURE__ */ e("span", { className: "select-togglerow__label", children: l }),
|
|
1503
1503
|
/* @__PURE__ */ e(en, { checked: c, onChange: s, disabled: a, label: typeof l == "string" ? l : void 0 })
|
|
1504
1504
|
] });
|
|
1505
|
-
}), Qa = R(function({ icon: n, title: l, checked: c, onChange: s, children: a, disabled: r = !1, className:
|
|
1506
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
1505
|
+
}), Qa = R(function({ icon: n, title: l, checked: c, onChange: s, children: a, disabled: r = !1, className: i, ...o }, d) {
|
|
1506
|
+
return /* @__PURE__ */ m("div", { ref: d, ...o, className: `select-togglepanel${c ? " is-on" : ""}${i ? " " + i : ""}`, children: [
|
|
1507
1507
|
/* @__PURE__ */ m("div", { className: "select-togglepanel__header", children: [
|
|
1508
1508
|
/* @__PURE__ */ e(en, { checked: c, onChange: s, disabled: r, label: typeof l == "string" ? l : void 0 }),
|
|
1509
1509
|
n && /* @__PURE__ */ e("span", { className: "select-togglepanel__icon", children: n }),
|
|
@@ -1625,9 +1625,9 @@ function mc(t) {
|
|
|
1625
1625
|
var n;
|
|
1626
1626
|
return ((n = el.find((l) => l.iso === t)) == null ? void 0 : n.dial) ?? "";
|
|
1627
1627
|
}
|
|
1628
|
-
const e1 = R(function({ label: n, value: l, onChange: c, labelAction: s, hint: a, error: r, onBlur:
|
|
1628
|
+
const e1 = R(function({ label: n, value: l, onChange: c, labelAction: s, hint: a, error: r, onBlur: i, placeholder: o, className: d, ...u }, h) {
|
|
1629
1629
|
const f = te(), g = mc(l.country), v = r ? `${f}-err` : a ? `${f}-hint` : void 0;
|
|
1630
|
-
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-field${
|
|
1630
|
+
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-field${d ? " " + d : ""}`, children: [
|
|
1631
1631
|
/* @__PURE__ */ m("div", { className: "select-field__labelrow", children: [
|
|
1632
1632
|
/* @__PURE__ */ e("label", { className: "select-field__label", htmlFor: f, children: n }),
|
|
1633
1633
|
s
|
|
@@ -1667,7 +1667,7 @@ const e1 = R(function({ label: n, value: l, onChange: c, labelAction: s, hint: a
|
|
|
1667
1667
|
value: uc(l.country, l.number),
|
|
1668
1668
|
placeholder: o ?? pc(l.country),
|
|
1669
1669
|
onChange: (x) => c({ ...l, number: Qn(l.country, x.target.value) }),
|
|
1670
|
-
onBlur:
|
|
1670
|
+
onBlur: i,
|
|
1671
1671
|
"aria-invalid": r ? !0 : void 0,
|
|
1672
1672
|
"aria-describedby": v
|
|
1673
1673
|
}
|
|
@@ -1675,9 +1675,9 @@ const e1 = R(function({ label: n, value: l, onChange: c, labelAction: s, hint: a
|
|
|
1675
1675
|
] }),
|
|
1676
1676
|
r ? /* @__PURE__ */ e("p", { id: `${f}-err`, className: "select-field__error", children: r }) : a ? /* @__PURE__ */ e("p", { id: `${f}-hint`, className: "select-field__hint", children: a }) : null
|
|
1677
1677
|
] });
|
|
1678
|
-
}), t1 = R(function({ value: n, onChange: l, options: c, name: s, className: a, ...r },
|
|
1679
|
-
const o = te(),
|
|
1680
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
1678
|
+
}), t1 = R(function({ value: n, onChange: l, options: c, name: s, className: a, ...r }, i) {
|
|
1679
|
+
const o = te(), d = s ?? o;
|
|
1680
|
+
return /* @__PURE__ */ e("div", { ref: i, ...r, className: `select-radiogroup${a ? " " + a : ""}`, role: "radiogroup", children: c.map((u) => {
|
|
1681
1681
|
const h = u.value === n;
|
|
1682
1682
|
return /* @__PURE__ */ m(
|
|
1683
1683
|
"label",
|
|
@@ -1688,7 +1688,7 @@ const e1 = R(function({ label: n, value: l, onChange: c, labelAction: s, hint: a
|
|
|
1688
1688
|
"input",
|
|
1689
1689
|
{
|
|
1690
1690
|
type: "radio",
|
|
1691
|
-
name:
|
|
1691
|
+
name: d,
|
|
1692
1692
|
value: u.value,
|
|
1693
1693
|
checked: h,
|
|
1694
1694
|
disabled: u.disabled,
|
|
@@ -1707,14 +1707,14 @@ const e1 = R(function({ label: n, value: l, onChange: c, labelAction: s, hint: a
|
|
|
1707
1707
|
u.value
|
|
1708
1708
|
);
|
|
1709
1709
|
}) });
|
|
1710
|
-
}), n1 = R(function({ value: n, onChange: l, options: c, ariaLabel: s, fullWidth: a = !1, className: r, ...
|
|
1711
|
-
const
|
|
1710
|
+
}), n1 = R(function({ value: n, onChange: l, options: c, ariaLabel: s, fullWidth: a = !1, className: r, ...i }, o) {
|
|
1711
|
+
const d = Math.max(0, c.findIndex((v) => v.value === n)), u = q([]), [h, f] = D(null);
|
|
1712
1712
|
Be(() => {
|
|
1713
|
-
const v = u.current[
|
|
1713
|
+
const v = u.current[d];
|
|
1714
1714
|
v && f({ left: v.offsetLeft, width: v.offsetWidth });
|
|
1715
|
-
}, [
|
|
1715
|
+
}, [d, c.length]);
|
|
1716
1716
|
const g = h ? { left: h.left, width: h.width, opacity: 1 } : { opacity: 0 };
|
|
1717
|
-
return /* @__PURE__ */ m("div", { ref: o, ...
|
|
1717
|
+
return /* @__PURE__ */ m("div", { ref: o, ...i, className: `select-segmented${a ? " select-segmented--full" : ""}${r ? " " + r : ""}`, role: "tablist", "aria-label": s, children: [
|
|
1718
1718
|
/* @__PURE__ */ e("span", { className: "select-segmented__pill", "aria-hidden": "true", style: g }),
|
|
1719
1719
|
c.map((v, x) => {
|
|
1720
1720
|
const N = v.value === n;
|
|
@@ -1735,11 +1735,11 @@ const e1 = R(function({ label: n, value: l, onChange: c, labelAction: s, hint: a
|
|
|
1735
1735
|
);
|
|
1736
1736
|
})
|
|
1737
1737
|
] });
|
|
1738
|
-
}), tl = R(function({ children: n, tone: l = "neutral", icon: c, size: s = "md", className: a, ...r },
|
|
1738
|
+
}), tl = R(function({ children: n, tone: l = "neutral", icon: c, size: s = "md", className: a, ...r }, i) {
|
|
1739
1739
|
return /* @__PURE__ */ m(
|
|
1740
1740
|
"span",
|
|
1741
1741
|
{
|
|
1742
|
-
ref:
|
|
1742
|
+
ref: i,
|
|
1743
1743
|
...r,
|
|
1744
1744
|
className: `select-badge select-badge--${l}${s === "sm" ? " select-badge--sm" : ""}${a ? " " + a : ""}`,
|
|
1745
1745
|
children: [
|
|
@@ -1775,13 +1775,13 @@ function l1({
|
|
|
1775
1775
|
return /* @__PURE__ */ e(tl, { tone: c.tone, size: l, children: c.label });
|
|
1776
1776
|
}
|
|
1777
1777
|
function nl(t, n, l, c, s = 8) {
|
|
1778
|
-
const a = window.innerWidth, r = window.innerHeight,
|
|
1779
|
-
let o =
|
|
1780
|
-
const
|
|
1778
|
+
const a = window.innerWidth, r = window.innerHeight, i = l.split("-");
|
|
1779
|
+
let o = i[0];
|
|
1780
|
+
const d = i[1];
|
|
1781
1781
|
let u = 0, h = 0;
|
|
1782
1782
|
if (o === "bottom" || o === "top") {
|
|
1783
1783
|
const g = r - t.bottom, v = t.top;
|
|
1784
|
-
o === "bottom" && n.height + c > g && v > g ? o = "top" : o === "top" && n.height + c > v && g > v && (o = "bottom"), u = o === "bottom" ? t.bottom + c : t.top - c - n.height,
|
|
1784
|
+
o === "bottom" && n.height + c > g && v > g ? o = "top" : o === "top" && n.height + c > v && g > v && (o = "bottom"), u = o === "bottom" ? t.bottom + c : t.top - c - n.height, d === "start" ? h = t.left : d === "end" ? h = t.right - n.width : h = t.left + (t.width - n.width) / 2;
|
|
1785
1785
|
} else {
|
|
1786
1786
|
const g = a - t.right, v = t.left;
|
|
1787
1787
|
o === "right" && n.width + c > g && v > g ? o = "left" : o === "left" && n.width + c > v && g > v && (o = "right"), h = o === "right" ? t.right + c : t.left - c - n.width, u = t.top + (t.height - n.height) / 2;
|
|
@@ -1816,8 +1816,8 @@ function vc(t, n) {
|
|
|
1816
1816
|
a.preventDefault();
|
|
1817
1817
|
return;
|
|
1818
1818
|
}
|
|
1819
|
-
const
|
|
1820
|
-
a.shiftKey &&
|
|
1819
|
+
const i = r[0], o = r[r.length - 1], d = document.activeElement;
|
|
1820
|
+
a.shiftKey && d === i ? (a.preventDefault(), o.focus()) : !a.shiftKey && d === o ? (a.preventDefault(), i.focus()) : l.contains(d) || (a.preventDefault(), i.focus());
|
|
1821
1821
|
};
|
|
1822
1822
|
return l.addEventListener("keydown", s), () => l.removeEventListener("keydown", s);
|
|
1823
1823
|
}, [t, n]);
|
|
@@ -1834,9 +1834,9 @@ function We({
|
|
|
1834
1834
|
placement: s = "bottom-start",
|
|
1835
1835
|
gap: a = 6,
|
|
1836
1836
|
role: r,
|
|
1837
|
-
trapFocus:
|
|
1837
|
+
trapFocus: i = !1,
|
|
1838
1838
|
matchWidth: o = !1,
|
|
1839
|
-
theme:
|
|
1839
|
+
theme: d
|
|
1840
1840
|
}) {
|
|
1841
1841
|
const u = q(null), h = q(null), f = q(null), [g, v] = D(null), [x, N] = D("light"), $ = Te(() => {
|
|
1842
1842
|
var k;
|
|
@@ -1883,7 +1883,7 @@ function We({
|
|
|
1883
1883
|
return document.addEventListener("mousedown", _, !0), document.addEventListener("keydown", p), () => {
|
|
1884
1884
|
document.removeEventListener("mousedown", _, !0), document.removeEventListener("keydown", p);
|
|
1885
1885
|
};
|
|
1886
|
-
}, [t, n]), vc(t &&
|
|
1886
|
+
}, [t, n]), vc(t && i, h), /* @__PURE__ */ m(ae, { children: [
|
|
1887
1887
|
/* @__PURE__ */ e("span", { className: "select-pop__trigger", ref: u, children: l }),
|
|
1888
1888
|
t && Ft(
|
|
1889
1889
|
/* @__PURE__ */ e(
|
|
@@ -1891,7 +1891,7 @@ function We({
|
|
|
1891
1891
|
{
|
|
1892
1892
|
ref: h,
|
|
1893
1893
|
className: "select select-pop__panel",
|
|
1894
|
-
"data-theme":
|
|
1894
|
+
"data-theme": d ?? x,
|
|
1895
1895
|
role: r,
|
|
1896
1896
|
tabIndex: -1,
|
|
1897
1897
|
style: g ? { position: "fixed", top: g.top, left: g.left, minWidth: g.minWidth } : { position: "fixed", top: 0, left: 0, visibility: "hidden" },
|
|
@@ -1903,22 +1903,22 @@ function We({
|
|
|
1903
1903
|
] });
|
|
1904
1904
|
}
|
|
1905
1905
|
function ll({ items: t, sections: n, onAction: l, autoFocus: c = !0, className: s, ...a }) {
|
|
1906
|
-
const r = q(null),
|
|
1906
|
+
const r = q(null), i = n ?? (t ? [{ items: t }] : []);
|
|
1907
1907
|
le(() => {
|
|
1908
|
-
var
|
|
1909
|
-
c && ((u = (
|
|
1908
|
+
var d, u;
|
|
1909
|
+
c && ((u = (d = r.current) == null ? void 0 : d.querySelector('[role="menuitem"]:not(:disabled)')) == null || u.focus({ preventScroll: !0 }));
|
|
1910
1910
|
}, [c]);
|
|
1911
|
-
const o = (
|
|
1911
|
+
const o = (d) => {
|
|
1912
1912
|
const u = r.current;
|
|
1913
1913
|
if (!u) return;
|
|
1914
1914
|
const h = Array.from(u.querySelectorAll('[role="menuitem"]:not(:disabled)'));
|
|
1915
1915
|
if (h.length === 0) return;
|
|
1916
1916
|
const f = h.indexOf(document.activeElement);
|
|
1917
|
-
|
|
1917
|
+
d.key === "ArrowDown" ? (d.preventDefault(), (h[(f + 1) % h.length] ?? h[0]).focus()) : d.key === "ArrowUp" ? (d.preventDefault(), (h[(f - 1 + h.length) % h.length] ?? h[0]).focus()) : d.key === "Home" ? (d.preventDefault(), h[0].focus()) : d.key === "End" && (d.preventDefault(), h[h.length - 1].focus());
|
|
1918
1918
|
};
|
|
1919
|
-
return /* @__PURE__ */ e("div", { ...a, className: `select-actionlist${s ? " " + s : ""}`, role: "menu", ref: r, onKeyDown: o, children:
|
|
1920
|
-
|
|
1921
|
-
|
|
1919
|
+
return /* @__PURE__ */ e("div", { ...a, className: `select-actionlist${s ? " " + s : ""}`, role: "menu", ref: r, onKeyDown: o, children: i.map((d, u) => /* @__PURE__ */ m("div", { className: "select-actionlist__section", role: "group", "aria-label": d.title, children: [
|
|
1920
|
+
d.title && /* @__PURE__ */ e("div", { className: "select-actionlist__title", children: d.title }),
|
|
1921
|
+
d.items.map((h, f) => /* @__PURE__ */ m(
|
|
1922
1922
|
"button",
|
|
1923
1923
|
{
|
|
1924
1924
|
type: "button",
|
|
@@ -2007,30 +2007,30 @@ function Bt(...t) {
|
|
|
2007
2007
|
return t.filter(Boolean).join(" ");
|
|
2008
2008
|
}
|
|
2009
2009
|
function Vt({ children: t, gap: n, align: l, inlineAlign: c, as: s = "div", className: a, ...r }) {
|
|
2010
|
-
const
|
|
2010
|
+
const i = s, o = {
|
|
2011
2011
|
rowGap: n ? ze[n] : void 0,
|
|
2012
2012
|
justifyContent: l ? ot[l] : void 0,
|
|
2013
2013
|
alignItems: c ? ot[c] : void 0
|
|
2014
2014
|
};
|
|
2015
|
-
return /* @__PURE__ */ e(
|
|
2015
|
+
return /* @__PURE__ */ e(i, { ...r, className: Bt("select-stack", a), style: o, children: t });
|
|
2016
2016
|
}
|
|
2017
|
-
function st({ children: t, gap: n, align: l, blockAlign: c = "center", wrap: s = !0, as: a = "div", className: r, ...
|
|
2018
|
-
const o = a,
|
|
2017
|
+
function st({ children: t, gap: n, align: l, blockAlign: c = "center", wrap: s = !0, as: a = "div", className: r, ...i }) {
|
|
2018
|
+
const o = a, d = {
|
|
2019
2019
|
columnGap: n ? ze[n] : void 0,
|
|
2020
2020
|
rowGap: n ? ze[n] : void 0,
|
|
2021
2021
|
justifyContent: l ? ot[l] : void 0,
|
|
2022
2022
|
alignItems: ot[c],
|
|
2023
2023
|
flexWrap: s ? "wrap" : "nowrap"
|
|
2024
2024
|
};
|
|
2025
|
-
return /* @__PURE__ */ e(o, { ...
|
|
2025
|
+
return /* @__PURE__ */ e(o, { ...i, className: Bt("select-inline", r), style: d, children: t });
|
|
2026
2026
|
}
|
|
2027
|
-
function s1({ children: t, columns: n = 2, gap: l = "400", alignItems: c, collapseBelow: s, as: a = "div", className: r, ...
|
|
2028
|
-
const o = a,
|
|
2027
|
+
function s1({ children: t, columns: n = 2, gap: l = "400", alignItems: c, collapseBelow: s, as: a = "div", className: r, ...i }) {
|
|
2028
|
+
const o = a, d = {
|
|
2029
2029
|
"--select-grid-columns": typeof n == "number" ? `repeat(${n}, minmax(0, 1fr))` : n,
|
|
2030
2030
|
gap: ze[l],
|
|
2031
2031
|
alignItems: c ? ot[c] : void 0
|
|
2032
2032
|
};
|
|
2033
|
-
return /* @__PURE__ */ e(o, { ...
|
|
2033
|
+
return /* @__PURE__ */ e(o, { ...i, className: Bt("select-grid", s && `select-grid--collapse-${s}`, r), style: d, children: t });
|
|
2034
2034
|
}
|
|
2035
2035
|
const gc = {
|
|
2036
2036
|
surface: "var(--select-surface)",
|
|
@@ -2045,7 +2045,7 @@ const gc = {
|
|
|
2045
2045
|
card: "var(--select-radius-card)",
|
|
2046
2046
|
full: "999px"
|
|
2047
2047
|
};
|
|
2048
|
-
function xc({ children: t, padding: n, paddingInline: l, paddingBlock: c, background: s, borderRadius: a, border: r = !1, shadow:
|
|
2048
|
+
function xc({ children: t, padding: n, paddingInline: l, paddingBlock: c, background: s, borderRadius: a, border: r = !1, shadow: i = !1, width: o, minHeight: d, as: u = "div", className: h, style: f, ...g }) {
|
|
2049
2049
|
const v = u, x = {
|
|
2050
2050
|
padding: n ? ze[n] : void 0,
|
|
2051
2051
|
paddingInline: l ? ze[l] : void 0,
|
|
@@ -2053,24 +2053,24 @@ function xc({ children: t, padding: n, paddingInline: l, paddingBlock: c, backgr
|
|
|
2053
2053
|
background: s ? gc[s] : void 0,
|
|
2054
2054
|
borderRadius: a ? bc[a] : void 0,
|
|
2055
2055
|
border: r ? "1px solid var(--select-border)" : void 0,
|
|
2056
|
-
boxShadow:
|
|
2056
|
+
boxShadow: i ? "var(--select-shadow-card)" : void 0,
|
|
2057
2057
|
width: o,
|
|
2058
|
-
minHeight:
|
|
2058
|
+
minHeight: d,
|
|
2059
2059
|
...f
|
|
2060
2060
|
};
|
|
2061
2061
|
return /* @__PURE__ */ e(v, { ...g, className: Bt("select-box", h), style: x, children: t });
|
|
2062
2062
|
}
|
|
2063
|
-
function Xe({ children: t, as: n = "p", variant: l = "bodyMd", tone: c, fontWeight: s, alignment: a, truncate: r = !1, numeric:
|
|
2063
|
+
function Xe({ children: t, as: n = "p", variant: l = "bodyMd", tone: c, fontWeight: s, alignment: a, truncate: r = !1, numeric: i = !1, className: o, ...d }) {
|
|
2064
2064
|
const u = n, h = [
|
|
2065
2065
|
"select-text",
|
|
2066
2066
|
`select-text--${l}`,
|
|
2067
2067
|
c && c !== "base" ? `select-text--${c}` : "",
|
|
2068
2068
|
s ? `select-text--w-${s}` : "",
|
|
2069
2069
|
r ? "select-text--truncate" : "",
|
|
2070
|
-
|
|
2070
|
+
i ? "select-text--numeric" : "",
|
|
2071
2071
|
o ?? ""
|
|
2072
2072
|
].filter(Boolean).join(" ");
|
|
2073
|
-
return /* @__PURE__ */ e(u, { ...
|
|
2073
|
+
return /* @__PURE__ */ e(u, { ...d, className: h, style: a ? { textAlign: a } : void 0, children: t });
|
|
2074
2074
|
}
|
|
2075
2075
|
const on = "https://cdn.selectwin.io/public/payicons", rn = {
|
|
2076
2076
|
visa: "visa",
|
|
@@ -2121,17 +2121,17 @@ function a1({
|
|
|
2121
2121
|
* method/brand text everywhere the label renders (chip title, alt, showLabel, fallback). */
|
|
2122
2122
|
label: a
|
|
2123
2123
|
}) {
|
|
2124
|
-
const r = dn(n) ?? (t ? yc[t] : null),
|
|
2124
|
+
const r = dn(n) ?? (t ? yc[t] : null), i = a || n || (t ? _t[t] : void 0) || t || "—";
|
|
2125
2125
|
if (!r)
|
|
2126
2126
|
return /* @__PURE__ */ e(Xe, { as: "span", tone: "subdued", variant: "bodySm", children: a || t && _t[t] || n || t || "—" });
|
|
2127
|
-
const o = dn(n) == null,
|
|
2127
|
+
const o = dn(n) == null, d = l, u = Math.round(l * 1.2);
|
|
2128
2128
|
if (s) {
|
|
2129
2129
|
const f = o ? Math.round(l * 0.7) : l, g = /* @__PURE__ */ e(
|
|
2130
2130
|
"img",
|
|
2131
2131
|
{
|
|
2132
2132
|
src: `${on}/${r}.svg`,
|
|
2133
|
-
alt:
|
|
2134
|
-
title:
|
|
2133
|
+
alt: i,
|
|
2134
|
+
title: i,
|
|
2135
2135
|
loading: "lazy",
|
|
2136
2136
|
style: {
|
|
2137
2137
|
height: f,
|
|
@@ -2151,13 +2151,13 @@ function a1({
|
|
|
2151
2151
|
const h = /* @__PURE__ */ e(
|
|
2152
2152
|
"span",
|
|
2153
2153
|
{
|
|
2154
|
-
title:
|
|
2154
|
+
title: i,
|
|
2155
2155
|
style: {
|
|
2156
2156
|
display: "inline-flex",
|
|
2157
2157
|
alignItems: "center",
|
|
2158
2158
|
justifyContent: "center",
|
|
2159
2159
|
width: u,
|
|
2160
|
-
height:
|
|
2160
|
+
height: d,
|
|
2161
2161
|
padding: 2,
|
|
2162
2162
|
boxSizing: "border-box",
|
|
2163
2163
|
flex: "0 0 auto",
|
|
@@ -2170,7 +2170,7 @@ function a1({
|
|
|
2170
2170
|
"img",
|
|
2171
2171
|
{
|
|
2172
2172
|
src: `${on}/${r}.svg`,
|
|
2173
|
-
alt:
|
|
2173
|
+
alt: i,
|
|
2174
2174
|
loading: "lazy",
|
|
2175
2175
|
style: o ? (
|
|
2176
2176
|
// Method marks (pix/boleto/nupay) stay capped + centered so they don't dwarf
|
|
@@ -2197,7 +2197,7 @@ function cl({
|
|
|
2197
2197
|
placement: l = "top",
|
|
2198
2198
|
delay: c = 250
|
|
2199
2199
|
}) {
|
|
2200
|
-
const [s, a] = D(!1), r = q(null),
|
|
2200
|
+
const [s, a] = D(!1), r = q(null), i = q(null), o = q(null), [d, u] = D(null), h = te(), f = () => {
|
|
2201
2201
|
o.current && clearTimeout(o.current), o.current = setTimeout(() => a(!0), c);
|
|
2202
2202
|
}, g = () => {
|
|
2203
2203
|
o.current && clearTimeout(o.current), a(!1);
|
|
@@ -2213,7 +2213,7 @@ function cl({
|
|
|
2213
2213
|
u(null);
|
|
2214
2214
|
return;
|
|
2215
2215
|
}
|
|
2216
|
-
const v = (($ = r.current) == null ? void 0 : $.firstElementChild) ?? r.current, x =
|
|
2216
|
+
const v = (($ = r.current) == null ? void 0 : $.firstElementChild) ?? r.current, x = i.current;
|
|
2217
2217
|
if (!v || !x) return;
|
|
2218
2218
|
const N = nl(
|
|
2219
2219
|
v.getBoundingClientRect(),
|
|
@@ -2246,11 +2246,11 @@ function cl({
|
|
|
2246
2246
|
/* @__PURE__ */ e(
|
|
2247
2247
|
"div",
|
|
2248
2248
|
{
|
|
2249
|
-
ref:
|
|
2249
|
+
ref: i,
|
|
2250
2250
|
id: h,
|
|
2251
2251
|
role: "tooltip",
|
|
2252
2252
|
className: "select select-tip",
|
|
2253
|
-
style:
|
|
2253
|
+
style: d ? { position: "fixed", top: d.top, left: d.left } : { position: "fixed", top: 0, left: 0, visibility: "hidden" },
|
|
2254
2254
|
children: t
|
|
2255
2255
|
}
|
|
2256
2256
|
),
|
|
@@ -2258,8 +2258,8 @@ function cl({
|
|
|
2258
2258
|
)
|
|
2259
2259
|
] });
|
|
2260
2260
|
}
|
|
2261
|
-
const ge = R(function({ icon: n, label: l, onClick: c, disabled: s = !1, size: a = "md", variant: r = "ghost", active:
|
|
2262
|
-
return /* @__PURE__ */ e(cl, { content: l, children: /* @__PURE__ */ e("button", { ref: u, ...
|
|
2261
|
+
const ge = R(function({ icon: n, label: l, onClick: c, disabled: s = !1, size: a = "md", variant: r = "ghost", active: i = !1, className: o, ...d }, u) {
|
|
2262
|
+
return /* @__PURE__ */ e(cl, { content: l, children: /* @__PURE__ */ e("button", { ref: u, ...d, type: "button", className: `select-iconbtn select-iconbtn--${a} select-iconbtn--${r}${i ? " is-active" : ""}${o ? " " + o : ""}`, "aria-label": l, "aria-pressed": i, onClick: c, disabled: s, children: n }) });
|
|
2263
2263
|
});
|
|
2264
2264
|
function Nc({
|
|
2265
2265
|
open: t,
|
|
@@ -2347,21 +2347,21 @@ function rl(t) {
|
|
|
2347
2347
|
}
|
|
2348
2348
|
function rt(t, n, l = Mc) {
|
|
2349
2349
|
let c = 0, s = !1;
|
|
2350
|
-
const a = (r,
|
|
2350
|
+
const a = (r, i, o, d, u) => {
|
|
2351
2351
|
if (s) return;
|
|
2352
|
-
if (
|
|
2352
|
+
if (i !== "") {
|
|
2353
2353
|
if (c >= l) {
|
|
2354
2354
|
s = !0;
|
|
2355
2355
|
return;
|
|
2356
2356
|
}
|
|
2357
|
-
c += 1, n({ path:
|
|
2357
|
+
c += 1, n({ path: i, key: o, value: r, depth: d });
|
|
2358
2358
|
}
|
|
2359
2359
|
if (!Oe(r)) return;
|
|
2360
2360
|
const h = r;
|
|
2361
2361
|
if (u.includes(h)) return;
|
|
2362
2362
|
const f = [...u, h];
|
|
2363
2363
|
for (const [g, v] of ol(r))
|
|
2364
|
-
if (a(v, sl(
|
|
2364
|
+
if (a(v, sl(i, g), g, d + 1, f), s) return;
|
|
2365
2365
|
};
|
|
2366
2366
|
return a(t, "", "", 0, []), { count: c, truncated: s };
|
|
2367
2367
|
}
|
|
@@ -2385,10 +2385,10 @@ function Fc(t, n) {
|
|
|
2385
2385
|
const l = n.trim().toLowerCase();
|
|
2386
2386
|
if (!l) return Ac;
|
|
2387
2387
|
const c = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
2388
|
-
return rt(t, ({ path: a, key: r, value:
|
|
2389
|
-
if (r.toLowerCase().includes(l) || !Oe(
|
|
2388
|
+
return rt(t, ({ path: a, key: r, value: i }) => {
|
|
2389
|
+
if (r.toLowerCase().includes(l) || !Oe(i) && nn(i).toLowerCase().includes(l)) {
|
|
2390
2390
|
c.add(a), s.add(a);
|
|
2391
|
-
for (const
|
|
2391
|
+
for (const d of hn(a)) s.add(d);
|
|
2392
2392
|
}
|
|
2393
2393
|
}), c.size > 0 && rt(t, ({ path: a }) => {
|
|
2394
2394
|
hn(a).some((r) => c.has(r)) && s.add(a);
|
|
@@ -2414,12 +2414,12 @@ function Ec(t, n) {
|
|
|
2414
2414
|
const c = t.toLowerCase(), s = l.toLowerCase(), a = [];
|
|
2415
2415
|
let r = 0;
|
|
2416
2416
|
for (; ; ) {
|
|
2417
|
-
const
|
|
2418
|
-
if (
|
|
2417
|
+
const i = c.indexOf(s, r);
|
|
2418
|
+
if (i === -1) {
|
|
2419
2419
|
r < t.length && a.push({ text: t.slice(r), hit: !1 });
|
|
2420
2420
|
break;
|
|
2421
2421
|
}
|
|
2422
|
-
|
|
2422
|
+
i > r && a.push({ text: t.slice(r, i), hit: !1 }), a.push({ text: t.slice(i, i + s.length), hit: !0 }), r = i + s.length;
|
|
2423
2423
|
}
|
|
2424
2424
|
return a.length > 0 ? a : [{ text: t, hit: !1 }];
|
|
2425
2425
|
}
|
|
@@ -2451,19 +2451,19 @@ function Dc(t = 1400) {
|
|
|
2451
2451
|
le(() => () => window.clearTimeout(c.current), []);
|
|
2452
2452
|
const s = Te(
|
|
2453
2453
|
(a, r) => {
|
|
2454
|
-
var
|
|
2455
|
-
(
|
|
2454
|
+
var i;
|
|
2455
|
+
(i = navigator.clipboard) == null || i.writeText(r), l(a), window.clearTimeout(c.current), c.current = window.setTimeout(() => l(null), t);
|
|
2456
2456
|
},
|
|
2457
2457
|
[t]
|
|
2458
2458
|
);
|
|
2459
2459
|
return [n, s];
|
|
2460
2460
|
}
|
|
2461
2461
|
function il({ value: t, term: n, forceFull: l }) {
|
|
2462
|
-
const c = al(t), s = nn(t), a = !l && s.length > mn, r = a ? `${s.slice(0, mn)}…` : s,
|
|
2462
|
+
const c = al(t), s = nn(t), a = !l && s.length > mn, r = a ? `${s.slice(0, mn)}…` : s, i = c === "string";
|
|
2463
2463
|
return /* @__PURE__ */ m("span", { className: `select-json__v select-json__v--${Rc[c]}`, title: a ? s : void 0, children: [
|
|
2464
|
-
|
|
2464
|
+
i && /* @__PURE__ */ e("span", { className: "select-json__quote", children: '"' }),
|
|
2465
2465
|
/* @__PURE__ */ e(St, { text: r, term: n }),
|
|
2466
|
-
|
|
2466
|
+
i && /* @__PURE__ */ e("span", { className: "select-json__quote", children: '"' })
|
|
2467
2467
|
] });
|
|
2468
2468
|
}
|
|
2469
2469
|
function dl({
|
|
@@ -2474,10 +2474,10 @@ function dl({
|
|
|
2474
2474
|
ctx: s
|
|
2475
2475
|
}) {
|
|
2476
2476
|
const a = s.result.active, r = Array.isArray(t);
|
|
2477
|
-
return /* @__PURE__ */ e(ae, { children: ol(t).map(([
|
|
2478
|
-
const
|
|
2479
|
-
if (a && !s.result.visible.has(
|
|
2480
|
-
const u = Sc(o, c), h = Oe(o) && !u, f = h && pt(o) > 0, g = a ? !0 : s.expanded.has(
|
|
2477
|
+
return /* @__PURE__ */ e(ae, { children: ol(t).map(([i, o]) => {
|
|
2478
|
+
const d = sl(n, i);
|
|
2479
|
+
if (a && !s.result.visible.has(d)) return null;
|
|
2480
|
+
const u = Sc(o, c), h = Oe(o) && !u, f = h && pt(o) > 0, g = a ? !0 : s.expanded.has(d), v = s.result.matched.has(d), x = `row:${d}`;
|
|
2481
2481
|
return /* @__PURE__ */ m(Ut, { children: [
|
|
2482
2482
|
/* @__PURE__ */ m(
|
|
2483
2483
|
"div",
|
|
@@ -2491,18 +2491,18 @@ function dl({
|
|
|
2491
2491
|
type: "button",
|
|
2492
2492
|
className: `select-json__caret${g ? " is-open" : ""}`,
|
|
2493
2493
|
"aria-expanded": g,
|
|
2494
|
-
"aria-label": `${g ? "Recolher" : "Expandir"} ${
|
|
2495
|
-
onClick: () => s.toggle(
|
|
2494
|
+
"aria-label": `${g ? "Recolher" : "Expandir"} ${i}`,
|
|
2495
|
+
onClick: () => s.toggle(d),
|
|
2496
2496
|
children: /* @__PURE__ */ e(dt, {})
|
|
2497
2497
|
}
|
|
2498
2498
|
) : /* @__PURE__ */ e("span", { className: "select-json__caret select-json__caret--empty", "aria-hidden": "true" }),
|
|
2499
2499
|
/* @__PURE__ */ m("span", { className: "select-json__label", children: [
|
|
2500
|
-
/* @__PURE__ */ e("span", { className: r ? "select-json__idx" : "select-json__key", children: /* @__PURE__ */ e(St, { text:
|
|
2500
|
+
/* @__PURE__ */ e("span", { className: r ? "select-json__idx" : "select-json__key", children: /* @__PURE__ */ e(St, { text: i, term: s.search }) }),
|
|
2501
2501
|
/* @__PURE__ */ e("span", { className: "select-json__sep", children: ":" }),
|
|
2502
2502
|
u ? /* @__PURE__ */ e("span", { className: "select-json__v select-json__v--other", children: "[referência circular]" }) : f ? (
|
|
2503
2503
|
// The summary doubles as a second hit-target for the caret; `tabIndex={-1}`
|
|
2504
2504
|
// keeps it out of the tab order (the caret is already the focusable control).
|
|
2505
|
-
/* @__PURE__ */ e("button", { type: "button", className: "select-json__summary", tabIndex: -1, onClick: () => s.toggle(
|
|
2505
|
+
/* @__PURE__ */ e("button", { type: "button", className: "select-json__summary", tabIndex: -1, onClick: () => s.toggle(d), children: un(o) })
|
|
2506
2506
|
) : h ? /* @__PURE__ */ e("span", { className: "select-json__summary select-json__summary--static", children: un(o) }) : /* @__PURE__ */ e(il, { value: o, term: s.search, forceFull: v })
|
|
2507
2507
|
] }),
|
|
2508
2508
|
/* @__PURE__ */ e(
|
|
@@ -2510,7 +2510,7 @@ function dl({
|
|
|
2510
2510
|
{
|
|
2511
2511
|
type: "button",
|
|
2512
2512
|
className: "select-json__copy",
|
|
2513
|
-
"aria-label": `Copiar ${
|
|
2513
|
+
"aria-label": `Copiar ${i}`,
|
|
2514
2514
|
title: s.copied === x ? "Copiado!" : "Copiar valor",
|
|
2515
2515
|
onClick: () => s.copy(x, h ? rl(o) : nn(o)),
|
|
2516
2516
|
children: s.copied === x ? /* @__PURE__ */ e(Ae, {}) : /* @__PURE__ */ e(Kt, {})
|
|
@@ -2519,15 +2519,15 @@ function dl({
|
|
|
2519
2519
|
]
|
|
2520
2520
|
}
|
|
2521
2521
|
),
|
|
2522
|
-
f && g && /* @__PURE__ */ e(dl, { value: o, path:
|
|
2523
|
-
] },
|
|
2522
|
+
f && g && /* @__PURE__ */ e(dl, { value: o, path: d, depth: l + 1, ancestors: [...c, o], ctx: s })
|
|
2523
|
+
] }, d);
|
|
2524
2524
|
}) });
|
|
2525
2525
|
}
|
|
2526
2526
|
function Tc({ text: t, term: n }) {
|
|
2527
2527
|
const l = xe(() => t.length > Pc ? null : Bc(t), [t]);
|
|
2528
2528
|
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 }) });
|
|
2529
2529
|
}
|
|
2530
|
-
const o1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, defaultOpen: s = !1, defaultExpandDepth: a = 1, searchable: r = !0, emptyLabel:
|
|
2530
|
+
const o1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, defaultOpen: s = !1, defaultExpandDepth: a = 1, searchable: r = !0, emptyLabel: i = "Sem dados", className: o, ...d }, u) {
|
|
2531
2531
|
const [h, f] = D(s), [g, v] = D("tree"), [x, N] = D(""), [$, _] = D(/* @__PURE__ */ new Set()), [p, b] = Dc(), S = q(null), k = xe(() => kc(n), [n]), M = wc(k), w = xe(
|
|
2532
2532
|
() => typeof n == "string" && k === n ? n : rl(k),
|
|
2533
2533
|
[n, k]
|
|
@@ -2547,10 +2547,10 @@ const o1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2547
2547
|
return J.delete(Z) || J.add(Z), J;
|
|
2548
2548
|
});
|
|
2549
2549
|
}, []), T = L.length > 0 && L.every((Z) => $.has(Z)), I = () => _(T ? /* @__PURE__ */ new Set() : new Set(L)), O = { expanded: $, toggle: E, search: x, result: B, copied: p, copy: b }, W = h && !M;
|
|
2550
|
-
return /* @__PURE__ */ m("div", { ref: u, ...
|
|
2550
|
+
return /* @__PURE__ */ m("div", { ref: u, ...d, className: `select-json${o ? " " + o : ""}`, children: [
|
|
2551
2551
|
/* @__PURE__ */ m("div", { className: "select-json__head", children: [
|
|
2552
2552
|
/* @__PURE__ */ e(Xe, { as: "h2", variant: "headingSm", children: l }),
|
|
2553
|
-
/* @__PURE__ */ e(Nc, { open: W, onToggle: () => f((Z) => !Z), openLabel: "Ocultar", disabled: M, children: M ?
|
|
2553
|
+
/* @__PURE__ */ e(Nc, { open: W, onToggle: () => f((Z) => !Z), openLabel: "Ocultar", disabled: M, children: M ? i : "Mostrar" })
|
|
2554
2554
|
] }),
|
|
2555
2555
|
W && /* @__PURE__ */ m("div", { className: "select-json__body", children: [
|
|
2556
2556
|
/* @__PURE__ */ m("div", { className: "select-json__toolbar", children: [
|
|
@@ -2618,10 +2618,10 @@ const o1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2618
2618
|
info: "var(--select-info-text)",
|
|
2619
2619
|
default: "var(--select-text-secondary)"
|
|
2620
2620
|
}, r1 = R(function({ items: n, className: l, ...c }, s) {
|
|
2621
|
-
var
|
|
2622
|
-
const a = n.length ? ((
|
|
2623
|
-
return /* @__PURE__ */ e("ul", { ref: s, ...c, className: `select-timeline${l ? " " + l : ""}`, style: r, children: n.map((o,
|
|
2624
|
-
/* @__PURE__ */ e("span", { className: `select-timeline__dot${
|
|
2621
|
+
var i;
|
|
2622
|
+
const a = n.length ? ((i = n[0]) == null ? void 0 : i.tone) ?? "default" : "default", r = { "--tl-final": Wc[a] };
|
|
2623
|
+
return /* @__PURE__ */ e("ul", { ref: s, ...c, className: `select-timeline${l ? " " + l : ""}`, style: r, children: n.map((o, d) => /* @__PURE__ */ m("li", { className: "select-timeline__item", children: [
|
|
2624
|
+
/* @__PURE__ */ e("span", { className: `select-timeline__dot${d === 0 ? " select-timeline__dot--final" : ""}`, "aria-hidden": "true" }),
|
|
2625
2625
|
/* @__PURE__ */ m("div", { className: "select-timeline__body", children: [
|
|
2626
2626
|
/* @__PURE__ */ m("div", { className: "select-timeline__head", children: [
|
|
2627
2627
|
/* @__PURE__ */ e("span", { className: "select-timeline__title", children: o.title }),
|
|
@@ -2630,15 +2630,15 @@ const o1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2630
2630
|
o.description != null && /* @__PURE__ */ e("p", { className: "select-timeline__desc", children: o.description }),
|
|
2631
2631
|
o.content != null && /* @__PURE__ */ e("div", { className: "select-timeline__content", children: o.content })
|
|
2632
2632
|
] })
|
|
2633
|
-
] },
|
|
2634
|
-
}), Oc = R(function({ children: n, onClick: l, disabled: c = !1, tone: s = "default", className: a, ...r },
|
|
2635
|
-
return /* @__PURE__ */ e("button", { ref:
|
|
2633
|
+
] }, d)) });
|
|
2634
|
+
}), Oc = R(function({ children: n, onClick: l, disabled: c = !1, tone: s = "default", className: a, ...r }, i) {
|
|
2635
|
+
return /* @__PURE__ */ e("button", { ref: i, ...r, type: "button", className: `select-linkbtn${s === "critical" ? " select-linkbtn--critical" : ""}${a ? " " + a : ""}`, onClick: l, disabled: c, children: n });
|
|
2636
2636
|
}), i1 = R(function({ children: n, className: l, ...c }, s) {
|
|
2637
2637
|
return n == null ? /* @__PURE__ */ e("div", { ref: s, ...c, className: `select-divider select-divider--plain${l ? " " + l : ""}`, role: "separator" }) : /* @__PURE__ */ e("div", { ref: s, ...c, className: `select-divider${l ? " " + l : ""}`, children: n });
|
|
2638
|
-
}), Hc = R(function({ name: n, src: l, icon: c, dashed: s = !1, round: a = !1, className: r, ...
|
|
2638
|
+
}), Hc = R(function({ name: n, src: l, icon: c, dashed: s = !1, round: a = !1, className: r, ...i }, o) {
|
|
2639
2639
|
var u, h;
|
|
2640
|
-
const
|
|
2641
|
-
return /* @__PURE__ */ e("span", { ref: o, ...
|
|
2640
|
+
const d = ((h = (u = n == null ? void 0 : n.trim()) == null ? void 0 : u[0]) == null ? void 0 : h.toUpperCase()) ?? "?";
|
|
2641
|
+
return /* @__PURE__ */ e("span", { ref: o, ...i, className: `select-avatar${s ? " select-avatar--dashed" : ""}${a ? " select-avatar--round" : ""}${r ? " " + r : ""}`, "aria-hidden": "true", children: l ? /* @__PURE__ */ e("img", { src: l, alt: "", className: "select-avatar__img" }) : c ? /* @__PURE__ */ e("span", { className: "select-avatar__icon", children: c }) : /* @__PURE__ */ e("span", { className: "select-avatar__initial", children: d }) });
|
|
2642
2642
|
});
|
|
2643
2643
|
function hl() {
|
|
2644
2644
|
var t;
|
|
@@ -2654,9 +2654,9 @@ function Et(t = {}) {
|
|
|
2654
2654
|
selector: s = "[data-reveal]",
|
|
2655
2655
|
y: a = 12,
|
|
2656
2656
|
scale: r = 1,
|
|
2657
|
-
duration:
|
|
2657
|
+
duration: i = 0.5,
|
|
2658
2658
|
stagger: o = 0.06,
|
|
2659
|
-
delay:
|
|
2659
|
+
delay: d = 0,
|
|
2660
2660
|
ease: u = "power3.out",
|
|
2661
2661
|
scroll: h = !1,
|
|
2662
2662
|
once: f = !0,
|
|
@@ -2670,9 +2670,9 @@ function Et(t = {}) {
|
|
|
2670
2670
|
opacity: 1,
|
|
2671
2671
|
y: 0,
|
|
2672
2672
|
scale: 1,
|
|
2673
|
-
duration:
|
|
2673
|
+
duration: i,
|
|
2674
2674
|
stagger: o,
|
|
2675
|
-
delay:
|
|
2675
|
+
delay: d,
|
|
2676
2676
|
ease: u,
|
|
2677
2677
|
clearProps: "transform"
|
|
2678
2678
|
});
|
|
@@ -2701,9 +2701,9 @@ function jc(t) {
|
|
|
2701
2701
|
value: s,
|
|
2702
2702
|
from: a = 0,
|
|
2703
2703
|
duration: r = 1.2,
|
|
2704
|
-
ease:
|
|
2704
|
+
ease: i = "power2.out",
|
|
2705
2705
|
format: o = (N) => String(Math.round(N)),
|
|
2706
|
-
scroll:
|
|
2706
|
+
scroll: d = !0,
|
|
2707
2707
|
once: u = !0,
|
|
2708
2708
|
enabled: h = !0
|
|
2709
2709
|
} = l.current;
|
|
@@ -2718,13 +2718,13 @@ function jc(t) {
|
|
|
2718
2718
|
g = Me.to(f, {
|
|
2719
2719
|
n: s,
|
|
2720
2720
|
duration: r,
|
|
2721
|
-
ease:
|
|
2721
|
+
ease: i,
|
|
2722
2722
|
onUpdate: () => {
|
|
2723
2723
|
c.textContent = o(f.n);
|
|
2724
2724
|
}
|
|
2725
2725
|
});
|
|
2726
2726
|
};
|
|
2727
|
-
if (!
|
|
2727
|
+
if (!d || !ul())
|
|
2728
2728
|
return v(), () => g == null ? void 0 : g.kill();
|
|
2729
2729
|
c.textContent = o(a);
|
|
2730
2730
|
const x = new IntersectionObserver(
|
|
@@ -2751,18 +2751,18 @@ function h1({
|
|
|
2751
2751
|
onClick: s,
|
|
2752
2752
|
muted: a = !1
|
|
2753
2753
|
}) {
|
|
2754
|
-
const r = !!s,
|
|
2754
|
+
const r = !!s, i = c !== void 0 ? c : r ? /* @__PURE__ */ e(dt, {}) : null, o = /* @__PURE__ */ m(ae, { children: [
|
|
2755
2755
|
l && /* @__PURE__ */ e("span", { className: "select-optionrow__leading", children: l }),
|
|
2756
2756
|
/* @__PURE__ */ m("span", { className: "select-optionrow__text", children: [
|
|
2757
2757
|
/* @__PURE__ */ e("span", { className: "select-optionrow__title", children: t }),
|
|
2758
2758
|
n && /* @__PURE__ */ e("span", { className: "select-optionrow__subtitle", children: n })
|
|
2759
2759
|
] }),
|
|
2760
|
-
|
|
2761
|
-
] }),
|
|
2762
|
-
return r ? /* @__PURE__ */ e("button", { type: "button", className:
|
|
2760
|
+
i && /* @__PURE__ */ e("span", { className: "select-optionrow__trailing", children: i })
|
|
2761
|
+
] }), d = `select-optionrow${a ? " select-optionrow--muted" : ""}`;
|
|
2762
|
+
return r ? /* @__PURE__ */ e("button", { type: "button", className: d, onClick: s, children: o }) : /* @__PURE__ */ e("div", { className: d, children: o });
|
|
2763
2763
|
}
|
|
2764
|
-
const u1 = R(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix: s = "Conectado como", className: a, ...r },
|
|
2765
|
-
return /* @__PURE__ */ m("span", { ref:
|
|
2764
|
+
const u1 = R(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix: s = "Conectado como", className: a, ...r }, i) {
|
|
2765
|
+
return /* @__PURE__ */ m("span", { ref: i, ...r, className: `select-identity${a ? " " + a : ""}`, children: [
|
|
2766
2766
|
/* @__PURE__ */ m("span", { className: "select-identity__text", children: [
|
|
2767
2767
|
s,
|
|
2768
2768
|
" ",
|
|
@@ -2770,7 +2770,7 @@ const u1 = R(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix
|
|
|
2770
2770
|
] }),
|
|
2771
2771
|
l && /* @__PURE__ */ e("button", { type: "button", className: "select-identity__action", onClick: l, children: c })
|
|
2772
2772
|
] });
|
|
2773
|
-
}), p1 = R(function({ value: n, onChange: l, length: c = 6, onComplete: s, autoFocus: a = !1, disabled: r = !1, className:
|
|
2773
|
+
}), p1 = R(function({ value: n, onChange: l, length: c = 6, onComplete: s, autoFocus: a = !1, disabled: r = !1, className: i, ...o }, d) {
|
|
2774
2774
|
const u = q([]), h = Array.from({ length: c }, (_, p) => n[p] ?? ""), f = (_) => {
|
|
2775
2775
|
var p;
|
|
2776
2776
|
return (p = u.current[_]) == null ? void 0 : p.focus();
|
|
@@ -2805,7 +2805,7 @@ const u1 = R(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix
|
|
|
2805
2805
|
const b = p.clipboardData.getData("text").replace(/\D/g, "");
|
|
2806
2806
|
b && x(b, _);
|
|
2807
2807
|
};
|
|
2808
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
2808
|
+
return /* @__PURE__ */ e("div", { ref: d, ...o, className: `select-otp${i ? " " + i : ""}`, children: h.map((_, p) => /* @__PURE__ */ e(
|
|
2809
2809
|
"input",
|
|
2810
2810
|
{
|
|
2811
2811
|
ref: (b) => {
|
|
@@ -2839,16 +2839,16 @@ function m1({
|
|
|
2839
2839
|
return l ? /* @__PURE__ */ e("a", { className: "select-backlink", href: l, children: c }) : /* @__PURE__ */ e("button", { type: "button", className: "select-backlink", onClick: n, children: c });
|
|
2840
2840
|
}
|
|
2841
2841
|
const f1 = R(function({ onResend: n, seconds: l = 30, idleLabel: c = "Reenviar código", className: s, ...a }, r) {
|
|
2842
|
-
const [
|
|
2842
|
+
const [i, o] = D(l);
|
|
2843
2843
|
le(() => {
|
|
2844
|
-
if (
|
|
2844
|
+
if (i <= 0) return;
|
|
2845
2845
|
const f = setInterval(() => o((g) => g <= 1 ? 0 : g - 1), 1e3);
|
|
2846
2846
|
return () => clearInterval(f);
|
|
2847
|
-
}, [
|
|
2848
|
-
const
|
|
2849
|
-
|
|
2850
|
-
}, [
|
|
2851
|
-
return /* @__PURE__ */ e("button", { ref: r, ...a, type: "button", className: `select-resend${s ? " " + s : ""}`, onClick:
|
|
2847
|
+
}, [i]);
|
|
2848
|
+
const d = Te(() => {
|
|
2849
|
+
i > 0 || (n(), o(l));
|
|
2850
|
+
}, [i, n, l]), u = i > 0, h = u ? `Reenviar em 0:${String(i).padStart(2, "0")}` : c;
|
|
2851
|
+
return /* @__PURE__ */ e("button", { ref: r, ...a, type: "button", className: `select-resend${s ? " " + s : ""}`, onClick: d, disabled: u, children: h });
|
|
2852
2852
|
}), fn = [
|
|
2853
2853
|
{ label: "Muito fraca", cls: "is-0" },
|
|
2854
2854
|
{ label: "Fraca", cls: "is-1" },
|
|
@@ -2864,7 +2864,7 @@ function Vc(t) {
|
|
|
2864
2864
|
const _1 = R(function({ value: n, className: l, ...c }, s) {
|
|
2865
2865
|
const a = Vc(n), r = fn[a] ?? fn[0];
|
|
2866
2866
|
return /* @__PURE__ */ m("div", { ref: s, ...c, className: `select-strength${l ? " " + l : ""}`, "aria-hidden": !n, children: [
|
|
2867
|
-
/* @__PURE__ */ e("div", { className: `select-strength__bars select-strength__bars--${r.cls}`, children: [0, 1, 2, 3].map((
|
|
2867
|
+
/* @__PURE__ */ e("div", { className: `select-strength__bars select-strength__bars--${r.cls}`, children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ e("span", { className: `select-strength__bar${i < a ? " is-on" : ""}` }, i)) }),
|
|
2868
2868
|
n && /* @__PURE__ */ e("span", { className: "select-strength__label", children: r.label })
|
|
2869
2869
|
] });
|
|
2870
2870
|
}), Zc = R(function({ label: n, mark: l, className: c, ...s }, a) {
|
|
@@ -2872,9 +2872,9 @@ const _1 = R(function({ value: n, className: l, ...c }, s) {
|
|
|
2872
2872
|
l != null ? /* @__PURE__ */ e("span", { className: "select-loader__mark", "aria-hidden": "true", children: l }) : /* @__PURE__ */ e("span", { className: "select-loader__spinner", "aria-hidden": "true" }),
|
|
2873
2873
|
n && /* @__PURE__ */ e("span", { className: "select-loader__label", children: n })
|
|
2874
2874
|
] });
|
|
2875
|
-
}), Gc = R(function({ title: n, subtitle: l, primaryAction: c, secondaryActions: s, headerActions: a, backAction: r, children:
|
|
2875
|
+
}), Gc = R(function({ title: n, subtitle: l, primaryAction: c, secondaryActions: s, headerActions: a, backAction: r, children: i, className: o, ...d }, u) {
|
|
2876
2876
|
const h = !!c || s && s.length > 0 || !!a, f = r || n || l || h;
|
|
2877
|
-
return /* @__PURE__ */ m("div", { ref: u, ...
|
|
2877
|
+
return /* @__PURE__ */ m("div", { ref: u, ...d, className: `select select-page${o ? " " + o : ""}`, children: [
|
|
2878
2878
|
f && /* @__PURE__ */ m("div", { className: "select-page__header", children: [
|
|
2879
2879
|
/* @__PURE__ */ m("div", { className: "select-page__heading", children: [
|
|
2880
2880
|
r && /* @__PURE__ */ e(
|
|
@@ -2923,7 +2923,7 @@ const _1 = R(function({ value: n, className: l, ...c }, s) {
|
|
|
2923
2923
|
a
|
|
2924
2924
|
] })
|
|
2925
2925
|
] }),
|
|
2926
|
-
|
|
2926
|
+
i
|
|
2927
2927
|
] });
|
|
2928
2928
|
});
|
|
2929
2929
|
function Uc({ children: t }) {
|
|
@@ -2960,15 +2960,15 @@ function b1({
|
|
|
2960
2960
|
return /* @__PURE__ */ e("span", { className: c, style: { "--select-icon-size": Kc[l] }, "aria-hidden": "true", children: /* @__PURE__ */ e(t, {}) });
|
|
2961
2961
|
}
|
|
2962
2962
|
const x1 = R(function({ children: n, tone: l = "neutral", hideIcon: c = !1, className: s, ...a }, r) {
|
|
2963
|
-
const
|
|
2963
|
+
const i = l === "warning" || l === "critical" ? /* @__PURE__ */ e(Ol, {}) : /* @__PURE__ */ e(Jt, {});
|
|
2964
2964
|
return /* @__PURE__ */ m("div", { ref: r, ...a, className: `select-note select-note--${l}${s ? " " + s : ""}`, children: [
|
|
2965
|
-
!c && /* @__PURE__ */ e("span", { className: "select-note__icon", children:
|
|
2965
|
+
!c && /* @__PURE__ */ e("span", { className: "select-note__icon", children: i }),
|
|
2966
2966
|
/* @__PURE__ */ e("span", { className: "select-note__body", children: n })
|
|
2967
2967
|
] });
|
|
2968
2968
|
}), y1 = R(function({ children: n, className: l, ...c }, s) {
|
|
2969
2969
|
return /* @__PURE__ */ e("div", { ref: s, ...c, className: `select-settinglist${l ? " " + l : ""}`, children: n });
|
|
2970
|
-
}), N1 = R(function({ control: n, title: l, badge: c, description: s, children: a, bodyOpen: r, className:
|
|
2971
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
2970
|
+
}), N1 = R(function({ control: n, title: l, badge: c, description: s, children: a, bodyOpen: r, className: i, ...o }, d) {
|
|
2971
|
+
return /* @__PURE__ */ m("div", { ref: d, ...o, className: `select-setting${i ? " " + i : ""}`, children: [
|
|
2972
2972
|
n && /* @__PURE__ */ e("div", { className: "select-setting__control", children: n }),
|
|
2973
2973
|
/* @__PURE__ */ m("div", { className: "select-setting__main", children: [
|
|
2974
2974
|
/* @__PURE__ */ m("div", { className: "select-setting__head", children: [
|
|
@@ -2985,8 +2985,8 @@ const x1 = R(function({ children: n, tone: l = "neutral", hideIcon: c = !1, clas
|
|
|
2985
2985
|
))
|
|
2986
2986
|
] })
|
|
2987
2987
|
] });
|
|
2988
|
-
}), M1 = R(function({ title: n, description: l, headerAction: c, footer: s, children: a, tone: r = "default", flush:
|
|
2989
|
-
return /* @__PURE__ */ m("div", { ref: u, ...
|
|
2988
|
+
}), M1 = R(function({ title: n, description: l, headerAction: c, footer: s, children: a, tone: r = "default", flush: i = !1, className: o, ...d }, u) {
|
|
2989
|
+
return /* @__PURE__ */ m("div", { ref: u, ...d, className: `select-panel${r === "highlight" ? " select-panel--highlight" : ""}${o ? " " + o : ""}`, children: [
|
|
2990
2990
|
(n || c) && /* @__PURE__ */ m("div", { className: "select-panel__header", children: [
|
|
2991
2991
|
/* @__PURE__ */ m("div", { className: "select-panel__heading", children: [
|
|
2992
2992
|
n && /* @__PURE__ */ e("h3", { className: "select-panel__title", children: n }),
|
|
@@ -2994,18 +2994,18 @@ const x1 = R(function({ children: n, tone: l = "neutral", hideIcon: c = !1, clas
|
|
|
2994
2994
|
] }),
|
|
2995
2995
|
c && /* @__PURE__ */ e("div", { className: "select-panel__headeraction", children: c })
|
|
2996
2996
|
] }),
|
|
2997
|
-
a && /* @__PURE__ */ e("div", { className: `select-panel__body${
|
|
2997
|
+
a && /* @__PURE__ */ e("div", { className: `select-panel__body${i ? " select-panel__body--flush" : ""}`, children: a }),
|
|
2998
2998
|
s && /* @__PURE__ */ e("div", { className: "select-panel__footer", children: s })
|
|
2999
2999
|
] });
|
|
3000
|
-
}), $1 = R(function({ title: n, description: l, action: c, collapsible: s = !1, defaultOpen: a = !0, children: r, className:
|
|
3000
|
+
}), $1 = R(function({ title: n, description: l, action: c, collapsible: s = !1, defaultOpen: a = !0, children: r, className: i, ...o }, d) {
|
|
3001
3001
|
const [u, h] = D(a);
|
|
3002
|
-
return s ? /* @__PURE__ */ m("div", { ref:
|
|
3002
|
+
return s ? /* @__PURE__ */ m("div", { ref: d, ...o, className: `select-section select-section--collapsible${u ? " is-open" : ""}${i ? " " + i : ""}`, children: [
|
|
3003
3003
|
/* @__PURE__ */ m("button", { type: "button", className: "select-section__head select-section__head--toggle", "aria-expanded": u, onClick: () => h((f) => !f), children: [
|
|
3004
3004
|
n && /* @__PURE__ */ e("span", { className: "select-section__title", children: n }),
|
|
3005
3005
|
/* @__PURE__ */ e("span", { className: "select-section__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(be, {}) })
|
|
3006
3006
|
] }),
|
|
3007
3007
|
/* @__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: r }) }) })
|
|
3008
|
-
] }) : /* @__PURE__ */ m("div", { ref:
|
|
3008
|
+
] }) : /* @__PURE__ */ m("div", { ref: d, ...o, className: `select-section${i ? " " + i : ""}`, children: [
|
|
3009
3009
|
(n || l || c) && /* @__PURE__ */ m("div", { className: "select-section__head", children: [
|
|
3010
3010
|
/* @__PURE__ */ m("div", { className: "select-section__heading", children: [
|
|
3011
3011
|
n && /* @__PURE__ */ e("h2", { className: "select-section__title", children: n }),
|
|
@@ -3017,7 +3017,7 @@ const x1 = R(function({ children: n, tone: l = "neutral", hideIcon: c = !1, clas
|
|
|
3017
3017
|
] });
|
|
3018
3018
|
});
|
|
3019
3019
|
function k1({ tabs: t, value: n, onChange: l, end: c, className: s, ...a }) {
|
|
3020
|
-
const r = q(null), [
|
|
3020
|
+
const r = q(null), [i, o] = D({ left: 0, width: 0 });
|
|
3021
3021
|
Be(() => {
|
|
3022
3022
|
const u = r.current;
|
|
3023
3023
|
if (!u) return;
|
|
@@ -3034,11 +3034,11 @@ function k1({ tabs: t, value: n, onChange: l, end: c, className: s, ...a }) {
|
|
|
3034
3034
|
const f = typeof ResizeObserver < "u" ? new ResizeObserver(h) : null;
|
|
3035
3035
|
return f == null || f.observe(u), () => f == null ? void 0 : f.disconnect();
|
|
3036
3036
|
}, [n, t.length]);
|
|
3037
|
-
const
|
|
3038
|
-
"--tab-ind-left": `${
|
|
3039
|
-
"--tab-ind-width": `${
|
|
3037
|
+
const d = {
|
|
3038
|
+
"--tab-ind-left": `${i.left}px`,
|
|
3039
|
+
"--tab-ind-width": `${i.width}px`
|
|
3040
3040
|
};
|
|
3041
|
-
return /* @__PURE__ */ m("div", { ...a, className: `select-tabs${s ? " " + s : ""}`, role: "tablist", ref: r, style:
|
|
3041
|
+
return /* @__PURE__ */ m("div", { ...a, className: `select-tabs${s ? " " + s : ""}`, role: "tablist", ref: r, style: d, children: [
|
|
3042
3042
|
t.map((u) => {
|
|
3043
3043
|
const h = u.id === n;
|
|
3044
3044
|
return /* @__PURE__ */ m(
|
|
@@ -3069,31 +3069,31 @@ function Jc({
|
|
|
3069
3069
|
active: n,
|
|
3070
3070
|
onSelect: l
|
|
3071
3071
|
}) {
|
|
3072
|
-
const c = pl(t, n), [
|
|
3072
|
+
const c = t.alwaysOpen === !0, s = pl(t, n), [a, r] = D(s);
|
|
3073
3073
|
le(() => {
|
|
3074
|
-
|
|
3075
|
-
}, [
|
|
3076
|
-
const
|
|
3074
|
+
r(s);
|
|
3075
|
+
}, [s]);
|
|
3076
|
+
const i = c || a, o = q(null), [d, u] = D(null);
|
|
3077
3077
|
return Be(() => {
|
|
3078
|
-
var
|
|
3079
|
-
const
|
|
3080
|
-
|
|
3081
|
-
}, [n,
|
|
3078
|
+
var f;
|
|
3079
|
+
const h = (f = o.current) == null ? void 0 : f.querySelector(".select-sidenav__item--child.is-active");
|
|
3080
|
+
u(h && i ? h.offsetTop + h.offsetHeight / 2 : null);
|
|
3081
|
+
}, [n, i]), /* @__PURE__ */ m("div", { className: "select-sidenav__group", children: [
|
|
3082
3082
|
/* @__PURE__ */ m(
|
|
3083
3083
|
"button",
|
|
3084
3084
|
{
|
|
3085
3085
|
type: "button",
|
|
3086
|
-
className: `select-sidenav__item select-sidenav__item--parent${
|
|
3087
|
-
onClick: () =>
|
|
3088
|
-
"aria-expanded":
|
|
3086
|
+
className: c ? `select-sidenav__item${t.id === n ? " is-active" : ""}` : `select-sidenav__item select-sidenav__item--parent${a ? " is-open" : ""}`,
|
|
3087
|
+
onClick: () => c ? l(t.id) : r((h) => !h),
|
|
3088
|
+
"aria-expanded": c ? void 0 : a,
|
|
3089
3089
|
children: [
|
|
3090
3090
|
t.icon && /* @__PURE__ */ e("span", { className: "select-sidenav__icon", children: t.icon }),
|
|
3091
3091
|
/* @__PURE__ */ e("span", { className: "select-sidenav__label", children: t.label }),
|
|
3092
|
-
/* @__PURE__ */ e("span", { className: "select-sidenav__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(be, {}) })
|
|
3092
|
+
!c && /* @__PURE__ */ e("span", { className: "select-sidenav__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(be, {}) })
|
|
3093
3093
|
]
|
|
3094
3094
|
}
|
|
3095
3095
|
),
|
|
3096
|
-
/* @__PURE__ */ e("div", { className: "select-sidenav__collapse", "data-open":
|
|
3096
|
+
/* @__PURE__ */ e("div", { className: "select-sidenav__collapse", "data-open": i, "aria-hidden": !i, children: /* @__PURE__ */ m("div", { className: "select-sidenav__children", ref: o, children: [
|
|
3097
3097
|
/* @__PURE__ */ e(
|
|
3098
3098
|
"span",
|
|
3099
3099
|
{
|
|
@@ -3102,27 +3102,27 @@ function Jc({
|
|
|
3102
3102
|
style: { top: d ?? 0, opacity: d == null ? 0 : 1 }
|
|
3103
3103
|
}
|
|
3104
3104
|
),
|
|
3105
|
-
t.children.map((
|
|
3105
|
+
t.children.map((h) => /* @__PURE__ */ m(
|
|
3106
3106
|
"button",
|
|
3107
3107
|
{
|
|
3108
3108
|
type: "button",
|
|
3109
|
-
className: `select-sidenav__item select-sidenav__item--child${
|
|
3110
|
-
onClick: () => l(
|
|
3111
|
-
tabIndex:
|
|
3109
|
+
className: `select-sidenav__item select-sidenav__item--child${h.id === n ? " is-active" : ""}`,
|
|
3110
|
+
onClick: () => l(h.id),
|
|
3111
|
+
tabIndex: i ? void 0 : -1,
|
|
3112
3112
|
children: [
|
|
3113
|
-
|
|
3114
|
-
/* @__PURE__ */ e("span", { className: "select-sidenav__label", children:
|
|
3113
|
+
h.icon && /* @__PURE__ */ e("span", { className: "select-sidenav__icon", children: h.icon }),
|
|
3114
|
+
/* @__PURE__ */ e("span", { className: "select-sidenav__label", children: h.label })
|
|
3115
3115
|
]
|
|
3116
3116
|
},
|
|
3117
|
-
|
|
3117
|
+
h.id
|
|
3118
3118
|
))
|
|
3119
3119
|
] }) })
|
|
3120
3120
|
] });
|
|
3121
3121
|
}
|
|
3122
|
-
const w1 = R(function({ sections: n, active: l, onSelect: c, header: s, className: a, ...r },
|
|
3123
|
-
return /* @__PURE__ */ m("nav", { ref:
|
|
3122
|
+
const w1 = R(function({ sections: n, active: l, onSelect: c, header: s, className: a, ...r }, i) {
|
|
3123
|
+
return /* @__PURE__ */ m("nav", { ref: i, ...r, className: `select-sidenav${a ? " " + a : ""}`, children: [
|
|
3124
3124
|
s && /* @__PURE__ */ e("div", { className: "select-sidenav__header", children: s }),
|
|
3125
|
-
n.map((o,
|
|
3125
|
+
n.map((o, d) => /* @__PURE__ */ m("div", { className: "select-sidenav__section", children: [
|
|
3126
3126
|
o.label && /* @__PURE__ */ e("div", { className: "select-sidenav__sectionlabel", children: o.label }),
|
|
3127
3127
|
o.items.map(
|
|
3128
3128
|
(u) => u.children ? /* @__PURE__ */ e(Jc, { item: u, active: l, onSelect: c }, u.id) : /* @__PURE__ */ m(
|
|
@@ -3139,10 +3139,10 @@ const w1 = R(function({ sections: n, active: l, onSelect: c, header: s, classNam
|
|
|
3139
3139
|
u.id
|
|
3140
3140
|
)
|
|
3141
3141
|
)
|
|
3142
|
-
] },
|
|
3142
|
+
] }, d))
|
|
3143
3143
|
] });
|
|
3144
|
-
}), ml = R(function({ value: n, onChange: l, placeholder: c = "Buscar…", shortcut: s, className: a, ...r },
|
|
3145
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
3144
|
+
}), ml = R(function({ value: n, onChange: l, placeholder: c = "Buscar…", shortcut: s, className: a, ...r }, i) {
|
|
3145
|
+
return /* @__PURE__ */ m("div", { ref: i, ...r, className: `select-search${a ? " " + a : ""}`, children: [
|
|
3146
3146
|
/* @__PURE__ */ e("span", { className: "select-search__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(Xt, {}) }),
|
|
3147
3147
|
/* @__PURE__ */ e(
|
|
3148
3148
|
"input",
|
|
@@ -3156,12 +3156,12 @@ const w1 = R(function({ sections: n, active: l, onSelect: c, header: s, classNam
|
|
|
3156
3156
|
),
|
|
3157
3157
|
s && /* @__PURE__ */ e("kbd", { className: "select-search__kbd", children: s })
|
|
3158
3158
|
] });
|
|
3159
|
-
}), Qc = R(function({ columns: n, children: l, empty: c, footer: s, title: a, action: r, filters:
|
|
3160
|
-
const h = kl.count(l) === 0, f = h && !!c, g = a != null || r != null ||
|
|
3161
|
-
return /* @__PURE__ */ m("div", { ref: u, ...
|
|
3159
|
+
}), Qc = R(function({ columns: n, children: l, empty: c, footer: s, title: a, action: r, filters: i, className: o, ...d }, u) {
|
|
3160
|
+
const h = kl.count(l) === 0, f = h && !!c, g = a != null || r != null || i != null, v = f && !g, x = Et({ selector: ".select-table__row", y: 8, duration: 0.45, stagger: 0.05, scroll: !0 }), N = n.length ? n.map(($) => $.width ?? "minmax(var(--select-table-col-min, 6.5rem), 1fr)").join(" ") : "1fr";
|
|
3161
|
+
return /* @__PURE__ */ m("div", { ref: u, ...d, className: `select-table${v ? " select-table--empty" : ""}${o ? " " + o : ""}`, style: { "--select-table-cols": N }, children: [
|
|
3162
3162
|
g && /* @__PURE__ */ m("div", { className: "select-table__title", children: [
|
|
3163
3163
|
a != null && /* @__PURE__ */ e("h3", { className: "select-table__titletext", children: a }),
|
|
3164
|
-
|
|
3164
|
+
i != null && /* @__PURE__ */ e("div", { className: "select-table__filters", children: i }),
|
|
3165
3165
|
r
|
|
3166
3166
|
] }),
|
|
3167
3167
|
/* @__PURE__ */ e("div", { className: `select-table__scroll${f ? " select-table__scroll--empty" : ""}`, children: /* @__PURE__ */ m("div", { className: "select-table__scrollinner", children: [
|
|
@@ -3204,8 +3204,8 @@ function vn({ children: t, onClick: n }) {
|
|
|
3204
3204
|
}
|
|
3205
3205
|
const gn = R(function({ children: n, align: l = "start", className: c, ...s }, a) {
|
|
3206
3206
|
return /* @__PURE__ */ e("div", { ref: a, ...s, role: "cell", className: `select-table__td select-table__cell--${l}${c ? " " + c : ""}`, children: n });
|
|
3207
|
-
}), es = R(function({ icon: n, title: l, subtitle: c, action: s, className: a, ...r },
|
|
3208
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
3207
|
+
}), es = R(function({ icon: n, title: l, subtitle: c, action: s, className: a, ...r }, i) {
|
|
3208
|
+
return /* @__PURE__ */ m("div", { ref: i, ...r, className: `select-table-empty${a ? " " + a : ""}`, children: [
|
|
3209
3209
|
n && /* @__PURE__ */ e("span", { className: "select-table-empty__icon", children: n }),
|
|
3210
3210
|
/* @__PURE__ */ e("p", { className: "select-table-empty__title", children: l }),
|
|
3211
3211
|
c && /* @__PURE__ */ e("p", { className: "select-table-empty__subtitle", children: c }),
|
|
@@ -3213,8 +3213,8 @@ const gn = R(function({ children: n, align: l = "start", className: c, ...s }, a
|
|
|
3213
3213
|
] });
|
|
3214
3214
|
}), ts = R(function({ children: n, className: l, ...c }, s) {
|
|
3215
3215
|
return /* @__PURE__ */ e("div", { ref: s, ...c, className: `select-menu${l ? " " + l : ""}`, role: "menu", children: n });
|
|
3216
|
-
}), ns = R(function({ children: n, icon: l, trailing: c, onClick: s, active: a = !1, tone: r = "default", className:
|
|
3217
|
-
return /* @__PURE__ */ m("button", { ref:
|
|
3216
|
+
}), ns = R(function({ children: n, icon: l, trailing: c, onClick: s, active: a = !1, tone: r = "default", className: i, ...o }, d) {
|
|
3217
|
+
return /* @__PURE__ */ m("button", { ref: d, ...o, type: "button", role: "menuitem", className: `select-menu__item select-menu__item--${r}${a ? " is-active" : ""}${i ? " " + i : ""}`, onClick: s, children: [
|
|
3218
3218
|
l && /* @__PURE__ */ e("span", { className: "select-menu__icon", children: l }),
|
|
3219
3219
|
/* @__PURE__ */ e("span", { className: "select-menu__label", children: n }),
|
|
3220
3220
|
c && /* @__PURE__ */ e("span", { className: "select-menu__trailing", children: c })
|
|
@@ -3233,8 +3233,8 @@ const ls = R(function({ children: n, onClick: l, active: c = !1, className: s, .
|
|
|
3233
3233
|
!c && /* @__PURE__ */ e("span", { className: "select-chip__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(nt, {}) }),
|
|
3234
3234
|
n
|
|
3235
3235
|
] });
|
|
3236
|
-
}), A1 = R(function({ label: n, value: l, href: c, onCopy: s, className: a, ...r },
|
|
3237
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
3236
|
+
}), A1 = R(function({ label: n, value: l, href: c, onCopy: s, className: a, ...r }, i) {
|
|
3237
|
+
return /* @__PURE__ */ m("div", { ref: i, ...r, className: `select-copyrow${a ? " " + a : ""}`, children: [
|
|
3238
3238
|
n && /* @__PURE__ */ e("span", { className: "select-copyrow__label", children: n }),
|
|
3239
3239
|
/* @__PURE__ */ m("div", { className: "select-copyrow__value", children: [
|
|
3240
3240
|
/* @__PURE__ */ e("span", { className: "select-copyrow__text", children: l }),
|
|
@@ -3254,41 +3254,41 @@ function F1({
|
|
|
3254
3254
|
to: a,
|
|
3255
3255
|
reveal: r = "hover"
|
|
3256
3256
|
}) {
|
|
3257
|
-
const [
|
|
3257
|
+
const [i, o] = D(!1);
|
|
3258
3258
|
if (!t) return /* @__PURE__ */ e(ae, { children: s });
|
|
3259
|
-
const
|
|
3259
|
+
const d = n ?? (l ? t.slice(0, l) : t);
|
|
3260
3260
|
return /* @__PURE__ */ m("span", { className: `select-copyid${r === "always" ? " select-copyid--always" : ""}`, children: [
|
|
3261
3261
|
a ? (
|
|
3262
3262
|
// Keep navigation isolated from any row handler; the text alone is the link target.
|
|
3263
|
-
/* @__PURE__ */ e(wl, { className: "select-copyid__text select-copyid__link", to: a, onClick: (h) => h.stopPropagation(), children:
|
|
3264
|
-
) : /* @__PURE__ */ e("span", { className: "select-copyid__text", children:
|
|
3265
|
-
/* @__PURE__ */ e(cl, { content:
|
|
3263
|
+
/* @__PURE__ */ e(wl, { className: "select-copyid__text select-copyid__link", to: a, onClick: (h) => h.stopPropagation(), children: d })
|
|
3264
|
+
) : /* @__PURE__ */ e("span", { className: "select-copyid__text", children: d }),
|
|
3265
|
+
/* @__PURE__ */ e(cl, { content: i ? "Copiado" : c, children: /* @__PURE__ */ e(
|
|
3266
3266
|
"button",
|
|
3267
3267
|
{
|
|
3268
3268
|
type: "button",
|
|
3269
|
-
className: `select-copyid__btn${
|
|
3269
|
+
className: `select-copyid__btn${i ? " is-copied" : ""}`,
|
|
3270
3270
|
onClick: (h) => {
|
|
3271
3271
|
h.stopPropagation(), h.preventDefault(), navigator.clipboard.writeText(t).then(() => {
|
|
3272
3272
|
o(!0), setTimeout(() => o(!1), 1200);
|
|
3273
3273
|
});
|
|
3274
3274
|
},
|
|
3275
|
-
"aria-label":
|
|
3276
|
-
children:
|
|
3275
|
+
"aria-label": i ? "Copiado" : c,
|
|
3276
|
+
children: i ? /* @__PURE__ */ e(Ae, {}) : /* @__PURE__ */ e(Kt, {})
|
|
3277
3277
|
}
|
|
3278
3278
|
) })
|
|
3279
3279
|
] });
|
|
3280
3280
|
}
|
|
3281
|
-
const B1 = R(function({ title: n, children: l, defaultOpen: c = !1, plain: s = !1, className: a, ...r },
|
|
3282
|
-
const [o,
|
|
3283
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
3284
|
-
/* @__PURE__ */ m("button", { type: "button", className: "select-collapsible__header", onClick: () =>
|
|
3281
|
+
const B1 = R(function({ title: n, children: l, defaultOpen: c = !1, plain: s = !1, className: a, ...r }, i) {
|
|
3282
|
+
const [o, d] = D(c);
|
|
3283
|
+
return /* @__PURE__ */ m("div", { ref: i, ...r, className: `select-collapsible${s ? " select-collapsible--plain" : ""}${o ? " is-open" : ""}${a ? " " + a : ""}`, children: [
|
|
3284
|
+
/* @__PURE__ */ m("button", { type: "button", className: "select-collapsible__header", onClick: () => d((u) => !u), "aria-expanded": o, children: [
|
|
3285
3285
|
/* @__PURE__ */ e("span", { className: "select-collapsible__title", children: n }),
|
|
3286
3286
|
/* @__PURE__ */ e("span", { className: "select-collapsible__chevron", "aria-hidden": "true", children: /* @__PURE__ */ e(be, {}) })
|
|
3287
3287
|
] }),
|
|
3288
3288
|
/* @__PURE__ */ e("div", { className: "select-collapsible__bodywrap", children: /* @__PURE__ */ e("div", { className: "select-collapsible__bodyclip", "aria-hidden": !o, children: /* @__PURE__ */ e("div", { className: "select-collapsible__body", children: l }) }) })
|
|
3289
3289
|
] });
|
|
3290
|
-
}), E1 = R(function({ icon: n, title: l, description: c, action: s, onDismiss: a, className: r, ...
|
|
3291
|
-
return /* @__PURE__ */ m("div", { ref: o, ...
|
|
3290
|
+
}), E1 = R(function({ icon: n, title: l, description: c, action: s, onDismiss: a, className: r, ...i }, o) {
|
|
3291
|
+
return /* @__PURE__ */ m("div", { ref: o, ...i, className: `select-actioncard${r ? " " + r : ""}`, children: [
|
|
3292
3292
|
a && /* @__PURE__ */ e("div", { className: "select-actioncard__dismiss", children: /* @__PURE__ */ e(ge, { size: "sm", icon: /* @__PURE__ */ e(Ke, {}), label: "Dispensar", onClick: a }) }),
|
|
3293
3293
|
n && /* @__PURE__ */ e("span", { className: "select-actioncard__icon", children: n }),
|
|
3294
3294
|
/* @__PURE__ */ m("div", { className: "select-actioncard__text", children: [
|
|
@@ -3297,8 +3297,8 @@ const B1 = R(function({ title: n, children: l, defaultOpen: c = !1, plain: s = !
|
|
|
3297
3297
|
] }),
|
|
3298
3298
|
s && /* @__PURE__ */ e("div", { className: "select-actioncard__action", children: s })
|
|
3299
3299
|
] });
|
|
3300
|
-
}), I1 = R(function({ media: n, sublabel: l, title: c, badge: s, meta: a, accent: r = !0, onClick:
|
|
3301
|
-
return /* @__PURE__ */ m("button", { ref: u, ...
|
|
3300
|
+
}), I1 = R(function({ media: n, sublabel: l, title: c, badge: s, meta: a, accent: r = !0, onClick: i, className: o, ...d }, u) {
|
|
3301
|
+
return /* @__PURE__ */ m("button", { ref: u, ...d, type: "button", className: `select-tile${o ? " " + o : ""}`, onClick: i, children: [
|
|
3302
3302
|
r && /* @__PURE__ */ e("span", { className: "select-tile__accent", "aria-hidden": "true" }),
|
|
3303
3303
|
/* @__PURE__ */ m("div", { className: "select-tile__main", children: [
|
|
3304
3304
|
/* @__PURE__ */ m("div", { className: "select-tile__media", children: [
|
|
@@ -3317,8 +3317,8 @@ const B1 = R(function({ title: n, children: l, defaultOpen: c = !1, plain: s = !
|
|
|
3317
3317
|
/* @__PURE__ */ e("span", { className: "select-tile__plus", "aria-hidden": "true", children: /* @__PURE__ */ e(nt, {}) }),
|
|
3318
3318
|
/* @__PURE__ */ e("span", { className: "select-tile__createlabel", children: n })
|
|
3319
3319
|
] });
|
|
3320
|
-
}), R1 = R(function({ avatar: n, name: l, badge: c, onClick: s, className: a, ...r },
|
|
3321
|
-
return /* @__PURE__ */ m("button", { ref:
|
|
3320
|
+
}), R1 = R(function({ avatar: n, name: l, badge: c, onClick: s, className: a, ...r }, i) {
|
|
3321
|
+
return /* @__PURE__ */ m("button", { ref: i, ...r, type: "button", className: `select-wsswitcher${a ? " " + a : ""}`, onClick: s, "aria-haspopup": "menu", children: [
|
|
3322
3322
|
n && /* @__PURE__ */ e("span", { className: "select-wsswitcher__avatar", children: n }),
|
|
3323
3323
|
/* @__PURE__ */ e("span", { className: "select-wsswitcher__name", children: l }),
|
|
3324
3324
|
c,
|
|
@@ -3333,9 +3333,9 @@ function It({
|
|
|
3333
3333
|
children: s,
|
|
3334
3334
|
footer: a,
|
|
3335
3335
|
aside: r,
|
|
3336
|
-
size:
|
|
3336
|
+
size: i = "md",
|
|
3337
3337
|
showClose: o = !0,
|
|
3338
|
-
noise:
|
|
3338
|
+
noise: d = !0,
|
|
3339
3339
|
dividedHeader: u = !1,
|
|
3340
3340
|
theme: h = "light"
|
|
3341
3341
|
}) {
|
|
@@ -3366,13 +3366,13 @@ function It({
|
|
|
3366
3366
|
/* @__PURE__ */ e(
|
|
3367
3367
|
"div",
|
|
3368
3368
|
{
|
|
3369
|
-
className: `select select-modal__overlay${
|
|
3369
|
+
className: `select select-modal__overlay${d ? " select-modal__overlay--noise" : ""}${v ? " select-modal__overlay--closing" : ""}`,
|
|
3370
3370
|
"data-theme": h,
|
|
3371
3371
|
onMouseDown: n,
|
|
3372
3372
|
children: /* @__PURE__ */ e(
|
|
3373
3373
|
"div",
|
|
3374
3374
|
{
|
|
3375
|
-
className: `select-modal select-modal--${
|
|
3375
|
+
className: `select-modal select-modal--${i}${r ? " select-modal--split" : ""}${v ? " select-modal--closing" : ""}`,
|
|
3376
3376
|
role: "dialog",
|
|
3377
3377
|
"aria-modal": "true",
|
|
3378
3378
|
onMouseDown: (_) => _.stopPropagation(),
|
|
@@ -3433,9 +3433,9 @@ function T1({
|
|
|
3433
3433
|
children: s,
|
|
3434
3434
|
confirmLabel: a = "Confirmar",
|
|
3435
3435
|
cancelLabel: r = "Cancelar",
|
|
3436
|
-
destructive:
|
|
3436
|
+
destructive: i = !1,
|
|
3437
3437
|
loading: o = !1,
|
|
3438
|
-
theme:
|
|
3438
|
+
theme: d
|
|
3439
3439
|
}) {
|
|
3440
3440
|
return /* @__PURE__ */ e(
|
|
3441
3441
|
It,
|
|
@@ -3444,13 +3444,13 @@ function T1({
|
|
|
3444
3444
|
onClose: n,
|
|
3445
3445
|
title: c,
|
|
3446
3446
|
size: "sm",
|
|
3447
|
-
theme:
|
|
3447
|
+
theme: d ?? ut(),
|
|
3448
3448
|
footer: /* @__PURE__ */ m("div", { className: "select-modal__actions", children: [
|
|
3449
3449
|
/* @__PURE__ */ e(ve, { variant: "secondary", size: "sm", inline: !0, onClick: n, disabled: o, children: r }),
|
|
3450
3450
|
/* @__PURE__ */ e(
|
|
3451
3451
|
ve,
|
|
3452
3452
|
{
|
|
3453
|
-
variant:
|
|
3453
|
+
variant: i ? "danger" : "primary",
|
|
3454
3454
|
size: "sm",
|
|
3455
3455
|
inline: !0,
|
|
3456
3456
|
loading: o,
|
|
@@ -3471,9 +3471,9 @@ function W1({
|
|
|
3471
3471
|
subtitle: s,
|
|
3472
3472
|
children: a,
|
|
3473
3473
|
submitLabel: r = "Salvar",
|
|
3474
|
-
cancelLabel:
|
|
3474
|
+
cancelLabel: i = "Cancelar",
|
|
3475
3475
|
submitting: o = !1,
|
|
3476
|
-
submitDisabled:
|
|
3476
|
+
submitDisabled: d = !1,
|
|
3477
3477
|
submitVariant: u = "primary",
|
|
3478
3478
|
error: h,
|
|
3479
3479
|
size: f = "md",
|
|
@@ -3489,7 +3489,7 @@ function W1({
|
|
|
3489
3489
|
size: f,
|
|
3490
3490
|
theme: g ?? ut(),
|
|
3491
3491
|
footer: /* @__PURE__ */ m("div", { className: "select-modal__actions", children: [
|
|
3492
|
-
/* @__PURE__ */ e(ve, { variant: "secondary", size: "sm", inline: !0, onClick: n, disabled: o, children:
|
|
3492
|
+
/* @__PURE__ */ e(ve, { variant: "secondary", size: "sm", inline: !0, onClick: n, disabled: o, children: i }),
|
|
3493
3493
|
/* @__PURE__ */ e(
|
|
3494
3494
|
ve,
|
|
3495
3495
|
{
|
|
@@ -3497,7 +3497,7 @@ function W1({
|
|
|
3497
3497
|
size: "sm",
|
|
3498
3498
|
inline: !0,
|
|
3499
3499
|
loading: o,
|
|
3500
|
-
disabled:
|
|
3500
|
+
disabled: d,
|
|
3501
3501
|
onClick: () => l(),
|
|
3502
3502
|
children: r
|
|
3503
3503
|
}
|
|
@@ -3519,7 +3519,7 @@ function W1({
|
|
|
3519
3519
|
);
|
|
3520
3520
|
}
|
|
3521
3521
|
function ss(t, n) {
|
|
3522
|
-
const c = [.../* @__PURE__ */ new Set([1, n, t, t - 1, t + 1])].filter((r) => r >= 1 && r <= n).sort((r,
|
|
3522
|
+
const c = [.../* @__PURE__ */ new Set([1, n, t, t - 1, t + 1])].filter((r) => r >= 1 && r <= n).sort((r, i) => r - i), s = [];
|
|
3523
3523
|
let a = 0;
|
|
3524
3524
|
for (const r of c)
|
|
3525
3525
|
r - a > 1 && s.push("gap"), s.push(r), a = r;
|
|
@@ -3531,14 +3531,14 @@ function as(t, n, l, c, s, a) {
|
|
|
3531
3531
|
if (t === 0)
|
|
3532
3532
|
r.push(`0 ${s}`);
|
|
3533
3533
|
else if (n) {
|
|
3534
|
-
const
|
|
3535
|
-
r.push(`${
|
|
3534
|
+
const i = (l - 1) * n + 1, o = Math.min(l * n, t);
|
|
3535
|
+
r.push(`${i}–${o} de ${t} ${s}`);
|
|
3536
3536
|
} else
|
|
3537
3537
|
r.push(`${t} ${s}`);
|
|
3538
3538
|
return a && c != null && c > 0 && r.push(`Página ${l} de ${c}`), r.length > 0 ? r.join(" · ") : null;
|
|
3539
3539
|
}
|
|
3540
|
-
const os = R(function({ page: n, pageCount: l, total: c, pageSize: s, hasPrevious: a, hasNext: r, onPrevious:
|
|
3541
|
-
const v = a ?? n > 1, x = r ?? (l != null ? n < l : !0), N =
|
|
3540
|
+
const os = R(function({ page: n, pageCount: l, total: c, pageSize: s, hasPrevious: a, hasNext: r, onPrevious: i, onNext: o, onPage: d, noun: u = "resultados", className: h, ...f }, g) {
|
|
3541
|
+
const v = a ?? n > 1, x = r ?? (l != null ? n < l : !0), N = i ?? (d ? () => d(n - 1) : void 0), $ = o ?? (d ? () => d(n + 1) : void 0), _ = l != null && l > 1 && d != null, p = _ ? ss(n, l) : [], b = as(c, s, n, l, u, _);
|
|
3542
3542
|
return /* @__PURE__ */ m("nav", { ref: g, ...f, className: `select-pagination${h ? " " + h : ""}`, "aria-label": "Paginação", children: [
|
|
3543
3543
|
/* @__PURE__ */ m("div", { className: "select-pagination__controls", children: [
|
|
3544
3544
|
/* @__PURE__ */ e(
|
|
@@ -3558,7 +3558,7 @@ const os = R(function({ page: n, pageCount: l, total: c, pageSize: s, hasPreviou
|
|
|
3558
3558
|
{
|
|
3559
3559
|
type: "button",
|
|
3560
3560
|
className: `select-pagination__page${S === n ? " is-active" : ""}`,
|
|
3561
|
-
onClick: () =>
|
|
3561
|
+
onClick: () => d == null ? void 0 : d(S),
|
|
3562
3562
|
"aria-current": S === n ? "page" : void 0,
|
|
3563
3563
|
children: S
|
|
3564
3564
|
},
|
|
@@ -3627,9 +3627,9 @@ function j1({
|
|
|
3627
3627
|
empty: s,
|
|
3628
3628
|
pagination: a,
|
|
3629
3629
|
onRowClick: r,
|
|
3630
|
-
title:
|
|
3630
|
+
title: i,
|
|
3631
3631
|
action: o,
|
|
3632
|
-
filters:
|
|
3632
|
+
filters: d,
|
|
3633
3633
|
columnsKey: u
|
|
3634
3634
|
}) {
|
|
3635
3635
|
const [h, f] = D(() => u ? rs(u) : []), [g, v] = D(!1), [x, N] = D(!1), $ = xe(() => new Set(h), [h]), _ = t.filter(bn), p = _.length > 0 && _.every((I) => $.has(I.key)), b = (I) => !p && $.has(I.key) && bn(I), S = t.filter((I) => !b(I)), k = _.filter((I) => !b(I)), [M, w] = D(null), y = (I) => {
|
|
@@ -3694,7 +3694,7 @@ function j1({
|
|
|
3694
3694
|
}
|
|
3695
3695
|
) : null;
|
|
3696
3696
|
return /* @__PURE__ */ m("div", { className: "select-datatable", children: [
|
|
3697
|
-
/* @__PURE__ */ e(Qc, { columns: A, empty: F, title:
|
|
3697
|
+
/* @__PURE__ */ e(Qc, { columns: A, empty: F, title: i, filters: d, action: E ? /* @__PURE__ */ m("span", { className: "select-datatable__toolbar", children: [
|
|
3698
3698
|
o,
|
|
3699
3699
|
E
|
|
3700
3700
|
] }) : o, children: c ? Array.from({ length: 5 }, (I, O) => /* @__PURE__ */ e(vn, { children: S.map((W, Z) => /* @__PURE__ */ e(gn, { align: W.align, width: W.width, children: /* @__PURE__ */ e("span", { className: "select-skeleton select-datatable__skel" }) }, Z)) }, `skeleton-${O}`)) : B.map((I) => /* @__PURE__ */ e(vn, { onClick: r ? () => r(I) : void 0, children: S.map((O, W) => /* @__PURE__ */ e(gn, { align: O.align, width: O.width, children: O.render(I) }, W)) }, l(I))) }),
|
|
@@ -3793,9 +3793,9 @@ function ms(t, n) {
|
|
|
3793
3793
|
const l = `${De(t.getDate())}/${De(t.getMonth() + 1)}/${t.getFullYear()}`;
|
|
3794
3794
|
return n ? `${l} ${De(t.getHours())}:${De(t.getMinutes())}` : l;
|
|
3795
3795
|
}
|
|
3796
|
-
const fs = R(function({ label: n, value: l, onChange: c, showTime: s = !1, placeholder: a, required: r, disabled:
|
|
3796
|
+
const fs = R(function({ label: n, value: l, onChange: c, showTime: s = !1, placeholder: a, required: r, disabled: i, error: o, hint: d, minDate: u, maxDate: h, clearable: f = !0, id: g, className: v, ...x }, N) {
|
|
3797
3797
|
const $ = te(), _ = g ?? $, [p, b] = D(!1), S = ps(l), [k, M] = D(() => vt(S ?? /* @__PURE__ */ new Date())), w = u ? ct(u) : null, y = h ? ct(h) : null, C = (W) => !!w && ct(W) < w || !!y && ct(W) > y, L = yn(vt(k), -vt(k).getDay()), B = Array.from({ length: 42 }, (W, Z) => yn(L, Z)), A = ct(/* @__PURE__ */ new Date()), F = () => {
|
|
3798
|
-
|
|
3798
|
+
i || (M(vt(S ?? /* @__PURE__ */ new Date())), b((W) => !W));
|
|
3799
3799
|
}, E = (W) => {
|
|
3800
3800
|
if (C(W)) return;
|
|
3801
3801
|
const Z = new Date(W);
|
|
@@ -3813,7 +3813,7 @@ const fs = R(function({ label: n, value: l, onChange: c, showTime: s = !1, place
|
|
|
3813
3813
|
type: "button",
|
|
3814
3814
|
className: `select-input select-datefield__activator${o ? " select-input--error" : ""}`,
|
|
3815
3815
|
onClick: F,
|
|
3816
|
-
disabled:
|
|
3816
|
+
disabled: i,
|
|
3817
3817
|
"aria-haspopup": "dialog",
|
|
3818
3818
|
"aria-expanded": p,
|
|
3819
3819
|
"aria-invalid": o ? !0 : void 0,
|
|
@@ -3862,7 +3862,7 @@ const fs = R(function({ label: n, value: l, onChange: c, showTime: s = !1, place
|
|
|
3862
3862
|
] })
|
|
3863
3863
|
] })
|
|
3864
3864
|
] }) }) }),
|
|
3865
|
-
o ? /* @__PURE__ */ e("p", { id: `${_}-err`, className: "select-field__error", children: o }) :
|
|
3865
|
+
o ? /* @__PURE__ */ e("p", { id: `${_}-err`, className: "select-field__error", children: o }) : d ? /* @__PURE__ */ e("p", { id: `${_}-hint`, className: "select-field__hint", children: d }) : null
|
|
3866
3866
|
] });
|
|
3867
3867
|
});
|
|
3868
3868
|
function fl(t, n) {
|
|
@@ -3878,11 +3878,11 @@ function _s({
|
|
|
3878
3878
|
onClose: a,
|
|
3879
3879
|
disabled: r
|
|
3880
3880
|
}) {
|
|
3881
|
-
const [
|
|
3881
|
+
const [i, o] = D("");
|
|
3882
3882
|
le(() => {
|
|
3883
3883
|
c || o("");
|
|
3884
3884
|
}, [c]);
|
|
3885
|
-
const
|
|
3885
|
+
const d = n.trim() !== "", u = d ? fl(t, n) : null, h = t.options ?? [], f = h.length > 7, g = f ? h.filter((v) => v.label.toLowerCase().includes(i.trim().toLowerCase())) : h;
|
|
3886
3886
|
return /* @__PURE__ */ m(
|
|
3887
3887
|
We,
|
|
3888
3888
|
{
|
|
@@ -3893,7 +3893,7 @@ function _s({
|
|
|
3893
3893
|
"button",
|
|
3894
3894
|
{
|
|
3895
3895
|
type: "button",
|
|
3896
|
-
className: `select-facet${
|
|
3896
|
+
className: `select-facet${d ? " is-active" : ""}`,
|
|
3897
3897
|
onClick: s,
|
|
3898
3898
|
disabled: r,
|
|
3899
3899
|
"aria-expanded": c,
|
|
@@ -3905,7 +3905,7 @@ function _s({
|
|
|
3905
3905
|
),
|
|
3906
3906
|
children: [
|
|
3907
3907
|
t.type === "select" ? /* @__PURE__ */ m("div", { className: "select-facet__panel", children: [
|
|
3908
|
-
f && /* @__PURE__ */ e("div", { className: "select-facet__search", children: /* @__PURE__ */ e(ml, { value:
|
|
3908
|
+
f && /* @__PURE__ */ e("div", { className: "select-facet__search", children: /* @__PURE__ */ e(ml, { value: i, onChange: o, placeholder: "Buscar opção…" }) }),
|
|
3909
3909
|
/* @__PURE__ */ e("div", { className: "select-facet__options", role: "listbox", children: g.length === 0 ? /* @__PURE__ */ e("div", { className: "select-facet__empty", children: "Nada encontrado" }) : g.map((v) => {
|
|
3910
3910
|
const x = n === v.value;
|
|
3911
3911
|
return /* @__PURE__ */ m(
|
|
@@ -3936,7 +3936,7 @@ function _s({
|
|
|
3936
3936
|
children: /* @__PURE__ */ e(Ze, { type: "text", value: n, onChange: l, placeholder: t.placeholder, autoFocus: !0 })
|
|
3937
3937
|
}
|
|
3938
3938
|
),
|
|
3939
|
-
|
|
3939
|
+
d && /* @__PURE__ */ e("div", { className: "select-facet__foot", children: /* @__PURE__ */ e(
|
|
3940
3940
|
"button",
|
|
3941
3941
|
{
|
|
3942
3942
|
type: "button",
|
|
@@ -3951,13 +3951,13 @@ function _s({
|
|
|
3951
3951
|
}
|
|
3952
3952
|
);
|
|
3953
3953
|
}
|
|
3954
|
-
const V1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, search: a, disabled: r, className:
|
|
3954
|
+
const V1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, search: a, disabled: r, className: i, ...o }, d) {
|
|
3955
3955
|
const [u, h] = D([]), [f, g] = D(null), [v, x] = D(!1), N = (M) => (l[M.key] ?? "").trim() !== "", $ = (M) => !!M.pinned || N(M) || u.includes(M.key), _ = n.filter($), p = n.filter((M) => !$(M)), b = n.filter(N), S = () => {
|
|
3956
3956
|
h([]), g(null), s();
|
|
3957
3957
|
}, k = (M) => {
|
|
3958
3958
|
h((w) => w.includes(M) ? w : [...w, M]), x(!1), g(M);
|
|
3959
3959
|
};
|
|
3960
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
3960
|
+
return /* @__PURE__ */ m("div", { ref: d, ...o, className: `select-filterbar${i ? " " + i : ""}`, children: [
|
|
3961
3961
|
/* @__PURE__ */ m("div", { className: "select-filterbar__row", children: [
|
|
3962
3962
|
a && /* @__PURE__ */ m("div", { className: "select-filterbar__query", children: [
|
|
3963
3963
|
/* @__PURE__ */ e("span", { className: "select-filterbar__query-icon", "aria-hidden": "true", children: /* @__PURE__ */ e(Xt, {}) }),
|
|
@@ -4049,9 +4049,9 @@ const V1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
4049
4049
|
/* @__PURE__ */ e("button", { type: "button", className: "select-filterbar__clear", onClick: S, children: "Limpar tudo" })
|
|
4050
4050
|
] })
|
|
4051
4051
|
] });
|
|
4052
|
-
}), Z1 = R(function({ label: n, options: l, selected: c, onChange: s, placeholder: a = "Selecionar…", hint: r, error:
|
|
4052
|
+
}), Z1 = R(function({ label: n, options: l, selected: c, onChange: s, placeholder: a = "Selecionar…", hint: r, error: i, onBlur: o, size: d = "md", className: u, ...h }, f) {
|
|
4053
4053
|
const [g, v] = D(!1), [x, N] = D(""), $ = l.filter((b) => b.label.toLowerCase().includes(x.trim().toLowerCase())), _ = (b) => s(c.includes(b) ? c.filter((S) => S !== b) : [...c, b]), p = c.map((b) => l.find((S) => S.value === b)).filter((b) => b != null);
|
|
4054
|
-
return /* @__PURE__ */ m("div", { ref: f, ...h, className: `select-field${
|
|
4054
|
+
return /* @__PURE__ */ m("div", { ref: f, ...h, className: `select-field${d === "sm" ? " select-field--sm" : ""}${u ? " " + u : ""}`, children: [
|
|
4055
4055
|
n && /* @__PURE__ */ e("div", { className: "select-field__labelrow", children: /* @__PURE__ */ e("span", { className: "select-field__label", children: n }) }),
|
|
4056
4056
|
/* @__PURE__ */ e(
|
|
4057
4057
|
We,
|
|
@@ -4066,8 +4066,8 @@ const V1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
4066
4066
|
activator: /* @__PURE__ */ m(
|
|
4067
4067
|
"div",
|
|
4068
4068
|
{
|
|
4069
|
-
className: `select-tagselect__control${g ? " is-open" : ""}${
|
|
4070
|
-
"aria-invalid":
|
|
4069
|
+
className: `select-tagselect__control${g ? " is-open" : ""}${i ? " is-error" : ""}`,
|
|
4070
|
+
"aria-invalid": i ? !0 : void 0,
|
|
4071
4071
|
role: "button",
|
|
4072
4072
|
tabIndex: 0,
|
|
4073
4073
|
"aria-haspopup": "listbox",
|
|
@@ -4123,10 +4123,10 @@ const V1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
4123
4123
|
] })
|
|
4124
4124
|
}
|
|
4125
4125
|
),
|
|
4126
|
-
|
|
4126
|
+
i ? /* @__PURE__ */ e("p", { className: "select-field__error", children: i }) : r ? /* @__PURE__ */ e("p", { className: "select-field__hint", children: r }) : null
|
|
4127
4127
|
] });
|
|
4128
|
-
}), G1 = R(function({ title: n, description: l, headerAction: c, footer: s, children: a, flush: r = !1, className:
|
|
4129
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
4128
|
+
}), G1 = R(function({ title: n, description: l, headerAction: c, footer: s, children: a, flush: r = !1, className: i, ...o }, d) {
|
|
4129
|
+
return /* @__PURE__ */ m("div", { ref: d, ...o, className: `select-surface${i ? " " + i : ""}`, children: [
|
|
4130
4130
|
(n || l || c) && /* @__PURE__ */ m("div", { className: "select-surface__header", children: [
|
|
4131
4131
|
/* @__PURE__ */ m("div", { className: "select-surface__heading", children: [
|
|
4132
4132
|
n && /* @__PURE__ */ e("h3", { className: "select-surface__title", children: n }),
|
|
@@ -4139,50 +4139,50 @@ const V1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
4139
4139
|
] });
|
|
4140
4140
|
}), _l = Yt(null), vs = 220, gs = 4e3, bs = 8, xs = 0.04, ys = 5;
|
|
4141
4141
|
function U1({ children: t }) {
|
|
4142
|
-
const [n, l] = D([]), c = q(0), s = q(/* @__PURE__ */ new Map()), a = Te((
|
|
4143
|
-
l((u) => u.filter((h) => h.id !==
|
|
4142
|
+
const [n, l] = D([]), c = q(0), s = q(/* @__PURE__ */ new Map()), a = Te((d) => {
|
|
4143
|
+
l((u) => u.filter((h) => h.id !== d)), s.current.delete(d);
|
|
4144
4144
|
}, []), r = Te(
|
|
4145
|
-
(
|
|
4146
|
-
const u = s.current.get(
|
|
4147
|
-
u && clearTimeout(u), l((h) => h.map((f) => f.id ===
|
|
4145
|
+
(d) => {
|
|
4146
|
+
const u = s.current.get(d);
|
|
4147
|
+
u && clearTimeout(u), l((h) => h.map((f) => f.id === d ? { ...f, exiting: !0 } : f)), s.current.set(d, setTimeout(() => a(d), vs));
|
|
4148
4148
|
},
|
|
4149
4149
|
[a]
|
|
4150
|
-
),
|
|
4151
|
-
(
|
|
4150
|
+
), i = Te(
|
|
4151
|
+
(d, u) => {
|
|
4152
4152
|
const h = ++c.current, f = (u == null ? void 0 : u.duration) ?? gs;
|
|
4153
|
-
l((g) => [...g, { id: h, content:
|
|
4153
|
+
l((g) => [...g, { id: h, content: d, variant: (u == null ? void 0 : u.variant) ?? "neutral" }]), f > 0 && s.current.set(h, setTimeout(() => r(h), f));
|
|
4154
4154
|
},
|
|
4155
4155
|
[r]
|
|
4156
4156
|
);
|
|
4157
4157
|
le(() => {
|
|
4158
|
-
const
|
|
4158
|
+
const d = s.current;
|
|
4159
4159
|
return () => {
|
|
4160
|
-
|
|
4160
|
+
d.forEach((u) => clearTimeout(u)), d.clear();
|
|
4161
4161
|
};
|
|
4162
4162
|
}, []);
|
|
4163
4163
|
const o = xe(
|
|
4164
4164
|
() => ({
|
|
4165
|
-
show:
|
|
4166
|
-
success: (
|
|
4167
|
-
error: (
|
|
4168
|
-
info: (
|
|
4165
|
+
show: i,
|
|
4166
|
+
success: (d, u) => i(d, { variant: "success", duration: u }),
|
|
4167
|
+
error: (d, u) => i(d, { variant: "error", duration: u }),
|
|
4168
|
+
info: (d, u) => i(d, { variant: "info", duration: u })
|
|
4169
4169
|
}),
|
|
4170
|
-
[
|
|
4170
|
+
[i]
|
|
4171
4171
|
);
|
|
4172
4172
|
return /* @__PURE__ */ m(_l.Provider, { value: o, children: [
|
|
4173
4173
|
t,
|
|
4174
4174
|
n.length > 0 && Ft(
|
|
4175
|
-
/* @__PURE__ */ e("div", { className: "select select-toasts", role: "region", "aria-live": "polite", "aria-label": "Notificações", children: n.map((
|
|
4176
|
-
const h = n.length - 1 - u, f =
|
|
4175
|
+
/* @__PURE__ */ e("div", { className: "select select-toasts", role: "region", "aria-live": "polite", "aria-label": "Notificações", children: n.map((d, u) => {
|
|
4176
|
+
const h = n.length - 1 - u, f = d.exiting || h >= ys, g = {
|
|
4177
4177
|
transform: `translate(-50%, ${-h * bs}px) scale(${1 - h * xs})`,
|
|
4178
4178
|
opacity: f ? 0 : 1,
|
|
4179
4179
|
zIndex: 1e3 - h,
|
|
4180
|
-
pointerEvents: h === 0 && !
|
|
4180
|
+
pointerEvents: h === 0 && !d.exiting ? "auto" : "none"
|
|
4181
4181
|
};
|
|
4182
|
-
return /* @__PURE__ */ m("div", { className: `select-toast select-toast--${
|
|
4183
|
-
/* @__PURE__ */ e("span", { className: "select-toast__content", children:
|
|
4184
|
-
/* @__PURE__ */ e("button", { type: "button", className: "select-toast__close", "aria-label": "Fechar", onClick: () => r(
|
|
4185
|
-
] },
|
|
4182
|
+
return /* @__PURE__ */ m("div", { className: `select-toast select-toast--${d.variant}`, role: "status", style: g, children: [
|
|
4183
|
+
/* @__PURE__ */ e("span", { className: "select-toast__content", children: d.content }),
|
|
4184
|
+
/* @__PURE__ */ e("button", { type: "button", className: "select-toast__close", "aria-label": "Fechar", onClick: () => r(d.id), children: /* @__PURE__ */ e(Ke, {}) })
|
|
4185
|
+
] }, d.id);
|
|
4186
4186
|
}) }),
|
|
4187
4187
|
document.body
|
|
4188
4188
|
)
|
|
@@ -4193,11 +4193,11 @@ function q1() {
|
|
|
4193
4193
|
if (!t) throw new Error("useSelectToast must be used within a SelectToastProvider");
|
|
4194
4194
|
return t;
|
|
4195
4195
|
}
|
|
4196
|
-
const Ns = { desktop: "100%", mobile: 390 }, Y1 = R(function({ src: n, title: l = "Pré-visualização", height: c = 560, initialDevice: s = "desktop", showDeviceToggle: a = !0, emptyLabel: r = "Salve para gerar a pré-visualização.", className:
|
|
4196
|
+
const Ns = { desktop: "100%", mobile: 390 }, Y1 = R(function({ src: n, title: l = "Pré-visualização", height: c = 560, initialDevice: s = "desktop", showDeviceToggle: a = !0, emptyLabel: r = "Salve para gerar a pré-visualização.", className: i, ...o }, d) {
|
|
4197
4197
|
const [u, h] = D(s), [f, g] = D(0), [v, x] = D(!0), N = n ? `${n}${n.includes("?") ? "&" : "?"}_pv=${f}` : "", $ = () => {
|
|
4198
4198
|
x(!0), g((_) => _ + 1);
|
|
4199
4199
|
};
|
|
4200
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
4200
|
+
return /* @__PURE__ */ m("div", { ref: d, ...o, className: `select-preview${i ? " " + i : ""}`, children: [
|
|
4201
4201
|
/* @__PURE__ */ m("div", { className: "select-preview__bar", children: [
|
|
4202
4202
|
/* @__PURE__ */ e("span", { className: "select-preview__title", children: l }),
|
|
4203
4203
|
/* @__PURE__ */ m("div", { className: "select-preview__actions", children: [
|
|
@@ -4281,8 +4281,8 @@ function z1({ children: t }) {
|
|
|
4281
4281
|
l(r), kn(r);
|
|
4282
4282
|
}, []), s = Te(() => {
|
|
4283
4283
|
l((r) => {
|
|
4284
|
-
const
|
|
4285
|
-
return kn(
|
|
4284
|
+
const i = !r;
|
|
4285
|
+
return kn(i), i;
|
|
4286
4286
|
});
|
|
4287
4287
|
}, []), a = xe(() => ({ hidden: n, toggle: s, setHidden: c }), [n, s, c]);
|
|
4288
4288
|
return /* @__PURE__ */ e(gl.Provider, { value: a, children: t });
|
|
@@ -4311,7 +4311,7 @@ const Ls = new Intl.NumberFormat("pt-BR", {
|
|
|
4311
4311
|
"—",
|
|
4312
4312
|
c ? ` ${c}` : ""
|
|
4313
4313
|
] });
|
|
4314
|
-
const
|
|
4314
|
+
const i = n === 0, o = n > 0, d = i ? null : l ? !o : o, u = d == null ? "muted" : d ? "up" : "down", h = i ? "" : o ? "▲" : "▼";
|
|
4315
4315
|
return /* @__PURE__ */ m("span", { ref: r, ...a, className: `select-delta${s ? " " + s : ""}`, children: [
|
|
4316
4316
|
/* @__PURE__ */ m("span", { className: `select-delta__value select-delta__value--${u}`, children: [
|
|
4317
4317
|
h ? `${h} ` : "",
|
|
@@ -4334,8 +4334,8 @@ function X1() {
|
|
|
4334
4334
|
}
|
|
4335
4335
|
);
|
|
4336
4336
|
}
|
|
4337
|
-
const K1 = R(function({ availableCents: n, availableLabel: l = "Saldo disponível", delta: c, buckets: s = [], action: a, className: r, ...
|
|
4338
|
-
return /* @__PURE__ */ m("div", { ref: o, ...
|
|
4337
|
+
const K1 = R(function({ availableCents: n, availableLabel: l = "Saldo disponível", delta: c, buckets: s = [], action: a, className: r, ...i }, o) {
|
|
4338
|
+
return /* @__PURE__ */ m("div", { ref: o, ...i, className: `select-balance${r ? " " + r : ""}`, children: [
|
|
4339
4339
|
/* @__PURE__ */ m("div", { className: "select-balance__head", children: [
|
|
4340
4340
|
/* @__PURE__ */ e("h3", { className: "select-balance__title", children: l }),
|
|
4341
4341
|
a && /* @__PURE__ */ e(
|
|
@@ -4356,18 +4356,18 @@ const K1 = R(function({ availableCents: n, availableLabel: l = "Saldo disponíve
|
|
|
4356
4356
|
/* @__PURE__ */ e("span", { className: "select-balance__heroamount", children: /* @__PURE__ */ e(at, { cents: n }) }),
|
|
4357
4357
|
c != null && /* @__PURE__ */ e(As, { value: c, caption: "vs. período anterior" })
|
|
4358
4358
|
] }),
|
|
4359
|
-
s.length > 0 && /* @__PURE__ */ e("div", { className: "select-balance__buckets", children: s.map((
|
|
4360
|
-
|
|
4359
|
+
s.length > 0 && /* @__PURE__ */ e("div", { className: "select-balance__buckets", children: s.map((d) => /* @__PURE__ */ m("div", { className: "select-balance__bucket", children: [
|
|
4360
|
+
d.icon && /* @__PURE__ */ e("span", { className: "select-balance__bucketicon", children: d.icon }),
|
|
4361
4361
|
/* @__PURE__ */ m("span", { className: "select-balance__bucketbody", children: [
|
|
4362
|
-
/* @__PURE__ */ e("span", { className: "select-balance__bucketlabel", title:
|
|
4363
|
-
/* @__PURE__ */ e("span", { className: "select-balance__bucketamount", children: /* @__PURE__ */ e(at, { cents:
|
|
4362
|
+
/* @__PURE__ */ e("span", { className: "select-balance__bucketlabel", title: d.label, children: d.label }),
|
|
4363
|
+
/* @__PURE__ */ e("span", { className: "select-balance__bucketamount", children: /* @__PURE__ */ e(at, { cents: d.cents }) })
|
|
4364
4364
|
] })
|
|
4365
|
-
] },
|
|
4365
|
+
] }, d.label)) })
|
|
4366
4366
|
] })
|
|
4367
4367
|
] });
|
|
4368
|
-
}), J1 = R(function({ grossCents: n, fees: l, netCents: c, grossLabel: s = "Valor bruto", netLabel: a = "Valor líquido", className: r, ...
|
|
4369
|
-
const
|
|
4370
|
-
return /* @__PURE__ */ m("div", { ref: o, ...
|
|
4368
|
+
}), J1 = R(function({ grossCents: n, fees: l, netCents: c, grossLabel: s = "Valor bruto", netLabel: a = "Valor líquido", className: r, ...i }, o) {
|
|
4369
|
+
const d = c ?? n - l.reduce((u, h) => u + h.cents, 0);
|
|
4370
|
+
return /* @__PURE__ */ m("div", { ref: o, ...i, className: `select-fees${r ? " " + r : ""}`, children: [
|
|
4371
4371
|
/* @__PURE__ */ m("div", { className: "select-fees__row", children: [
|
|
4372
4372
|
/* @__PURE__ */ e("span", { children: s }),
|
|
4373
4373
|
/* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(at, { cents: n }) })
|
|
@@ -4382,17 +4382,17 @@ const K1 = R(function({ availableCents: n, availableLabel: l = "Saldo disponíve
|
|
|
4382
4382
|
/* @__PURE__ */ e("div", { className: "select-fees__divider" }),
|
|
4383
4383
|
/* @__PURE__ */ m("div", { className: "select-fees__row select-fees__row--net", children: [
|
|
4384
4384
|
/* @__PURE__ */ e("span", { children: a }),
|
|
4385
|
-
/* @__PURE__ */ e("span", { className: "select-fees__netvalue", children: /* @__PURE__ */ e(at, { cents:
|
|
4385
|
+
/* @__PURE__ */ e("span", { className: "select-fees__netvalue", children: /* @__PURE__ */ e(at, { cents: d }) })
|
|
4386
4386
|
] })
|
|
4387
4387
|
] });
|
|
4388
|
-
}), Q1 = R(function({ label: n, value: l, caption: c, chart: s, tone: a, bare: r = !1, className:
|
|
4389
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
4388
|
+
}), Q1 = R(function({ label: n, value: l, caption: c, chart: s, tone: a, bare: r = !1, className: i, ...o }, d) {
|
|
4389
|
+
return /* @__PURE__ */ m("div", { ref: d, ...o, className: `select-kpi${r ? " select-kpi--bare" : ""}${i ? " " + i : ""}`, children: [
|
|
4390
4390
|
/* @__PURE__ */ e("span", { className: "select-kpi__label", children: n }),
|
|
4391
4391
|
/* @__PURE__ */ e("span", { className: `select-kpi__value${a ? ` select-kpi__value--${a}` : ""}`, children: l }),
|
|
4392
4392
|
s != null && /* @__PURE__ */ e("div", { className: "select-kpi__chart", children: s }),
|
|
4393
4393
|
c != null && /* @__PURE__ */ e("span", { className: "select-kpi__caption", children: c })
|
|
4394
4394
|
] });
|
|
4395
|
-
}), eo = R(function({ title: n, caption: l, action: c, loading: s = !1, hideValues: a = !1, height: r = 260, flush:
|
|
4395
|
+
}), eo = R(function({ title: n, caption: l, action: c, loading: s = !1, hideValues: a = !1, height: r = 260, flush: i = !1, insight: o, insightTone: d = "neutral", children: u, className: h, ...f }, g) {
|
|
4396
4396
|
const v = r === "auto" ? void 0 : `${r / 16}rem`, x = r === "auto" ? "10rem" : `${r / 16}rem`;
|
|
4397
4397
|
return /* @__PURE__ */ m("div", { ref: g, ...f, className: `select-chartcard${h ? " " + h : ""}`, children: [
|
|
4398
4398
|
(n || c || l) && /* @__PURE__ */ m("div", { className: "select-chartcard__head", children: [
|
|
@@ -4405,12 +4405,12 @@ const K1 = R(function({ availableCents: n, availableLabel: l = "Saldo disponíve
|
|
|
4405
4405
|
/* @__PURE__ */ e(
|
|
4406
4406
|
"div",
|
|
4407
4407
|
{
|
|
4408
|
-
className: `select-chartcard__body${
|
|
4408
|
+
className: `select-chartcard__body${i ? " select-chartcard__body--flush" : ""}${a ? " is-blurred" : ""}`,
|
|
4409
4409
|
style: { minHeight: v },
|
|
4410
4410
|
children: s ? /* @__PURE__ */ e("div", { className: "select-skeleton select-chartcard__skeleton", style: { height: x } }) : u
|
|
4411
4411
|
}
|
|
4412
4412
|
),
|
|
4413
|
-
o != null && !s && /* @__PURE__ */ e("div", { className: `select-chartcard__insight select-chartcard__insight--${
|
|
4413
|
+
o != null && !s && /* @__PURE__ */ e("div", { className: `select-chartcard__insight select-chartcard__insight--${d}`, children: (Array.isArray(o) ? o : [o]).filter((N) => N != null).map((N, $) => /* @__PURE__ */ e("span", { className: "select-chartcard__insightpill", children: N }, $)) })
|
|
4414
4414
|
] });
|
|
4415
4415
|
});
|
|
4416
4416
|
function Fs() {
|
|
@@ -4429,9 +4429,9 @@ function ce(t) {
|
|
|
4429
4429
|
const a = n.current;
|
|
4430
4430
|
if (!a) return;
|
|
4431
4431
|
c(a.clientWidth);
|
|
4432
|
-
const r = new ResizeObserver((
|
|
4433
|
-
var
|
|
4434
|
-
const o = (
|
|
4432
|
+
const r = new ResizeObserver((i) => {
|
|
4433
|
+
var d;
|
|
4434
|
+
const o = (d = i[0]) == null ? void 0 : d.contentRect.width;
|
|
4435
4435
|
o != null && c(o);
|
|
4436
4436
|
});
|
|
4437
4437
|
return r.observe(a), () => r.disconnect();
|
|
@@ -4443,8 +4443,8 @@ function Ct(t, n) {
|
|
|
4443
4443
|
const s = t.current;
|
|
4444
4444
|
if (!s) return;
|
|
4445
4445
|
const a = () => {
|
|
4446
|
-
const
|
|
4447
|
-
|
|
4446
|
+
const i = s.clientWidth;
|
|
4447
|
+
i && c(Math.round(i));
|
|
4448
4448
|
};
|
|
4449
4449
|
a();
|
|
4450
4450
|
const r = new ResizeObserver(a);
|
|
@@ -4461,9 +4461,9 @@ function we(t, n = 4) {
|
|
|
4461
4461
|
}
|
|
4462
4462
|
function Bs(t, n = 5) {
|
|
4463
4463
|
if (!(t > 0)) return { max: 1, values: [0, 1] };
|
|
4464
|
-
const l = t / n, c = Math.pow(10, Math.floor(Math.log10(l))), s = l / c, a = (s <= 1 ? 1 : s <= 2 ? 2 : s <= 5 ? 5 : 10) * c, r = Math.ceil(t / a) * a,
|
|
4465
|
-
for (let o = 0; o <= r + a / 2; o += a)
|
|
4466
|
-
return { max: r, values:
|
|
4464
|
+
const l = t / n, c = Math.pow(10, Math.floor(Math.log10(l))), s = l / c, a = (s <= 1 ? 1 : s <= 2 ? 2 : s <= 5 ? 5 : 10) * c, r = Math.ceil(t / a) * a, i = [];
|
|
4465
|
+
for (let o = 0; o <= r + a / 2; o += a) i.push(Math.round(o * 1e6) / 1e6);
|
|
4466
|
+
return { max: r, values: i };
|
|
4467
4467
|
}
|
|
4468
4468
|
function wn(t) {
|
|
4469
4469
|
return t.map((n, l) => `${l === 0 ? "M" : "L"}${n[0].toFixed(2)},${n[1].toFixed(2)}`).join(" ");
|
|
@@ -4479,20 +4479,20 @@ function Ge(t) {
|
|
|
4479
4479
|
const r = new Array(n);
|
|
4480
4480
|
r[0] = a[0], r[n - 1] = a[n - 2];
|
|
4481
4481
|
for (let o = 1; o < n - 1; o++) {
|
|
4482
|
-
const
|
|
4483
|
-
if (
|
|
4482
|
+
const d = a[o - 1], u = a[o];
|
|
4483
|
+
if (d * u <= 0)
|
|
4484
4484
|
r[o] = 0;
|
|
4485
4485
|
else {
|
|
4486
4486
|
const h = 2 * s[o] + s[o - 1], f = s[o] + 2 * s[o - 1];
|
|
4487
|
-
r[o] = (h + f) / (h /
|
|
4487
|
+
r[o] = (h + f) / (h / d + f / u);
|
|
4488
4488
|
}
|
|
4489
4489
|
}
|
|
4490
|
-
let
|
|
4490
|
+
let i = `M${l[0].toFixed(2)},${c[0].toFixed(2)}`;
|
|
4491
4491
|
for (let o = 0; o < n - 1; o++) {
|
|
4492
|
-
const
|
|
4493
|
-
|
|
4492
|
+
const d = l[o] + s[o] / 3, u = c[o] + r[o] * s[o] / 3, h = l[o + 1] - s[o] / 3, f = c[o + 1] - r[o + 1] * s[o] / 3;
|
|
4493
|
+
i += ` C${d.toFixed(2)},${u.toFixed(2)} ${h.toFixed(2)},${f.toFixed(2)} ${l[o + 1].toFixed(2)},${c[o + 1].toFixed(2)}`;
|
|
4494
4494
|
}
|
|
4495
|
-
return
|
|
4495
|
+
return i;
|
|
4496
4496
|
}
|
|
4497
4497
|
function xl(t, n) {
|
|
4498
4498
|
if (t.length === 0) return "";
|
|
@@ -4509,8 +4509,8 @@ function gt(t, n, l, c) {
|
|
|
4509
4509
|
return [t + l * Math.cos(s), n + l * Math.sin(s)];
|
|
4510
4510
|
}
|
|
4511
4511
|
function it(t, n, l, c, s, a) {
|
|
4512
|
-
const [r,
|
|
4513
|
-
return `M${r.toFixed(2)},${
|
|
4512
|
+
const [r, i] = gt(t, n, l, s), [o, d] = gt(t, n, l, a), [u, h] = gt(t, n, c, a), [f, g] = gt(t, n, c, s), v = a - s > 180 ? 1 : 0;
|
|
4513
|
+
return `M${r.toFixed(2)},${i.toFixed(2)} A${l},${l} 0 ${v} 1 ${o.toFixed(2)},${d.toFixed(2)} L${u.toFixed(2)},${h.toFixed(2)} A${c},${c} 0 ${v} 0 ${f.toFixed(2)},${g.toFixed(2)} Z`;
|
|
4514
4514
|
}
|
|
4515
4515
|
const Sn = [
|
|
4516
4516
|
"var(--select-chart-1)",
|
|
@@ -4528,25 +4528,25 @@ function Y(t) {
|
|
|
4528
4528
|
}
|
|
4529
4529
|
const Ee = { top: 16, right: 22, bottom: 32, left: 48 };
|
|
4530
4530
|
function to({ data: t, color: n, height: l = 40, className: c, ...s }) {
|
|
4531
|
-
const { ref: a, width: r } = ce(l),
|
|
4531
|
+
const { ref: a, width: r } = ce(l), i = n ?? j(0), o = te(), d = 4;
|
|
4532
4532
|
let u = null;
|
|
4533
4533
|
if (r > 0 && t.length > 1) {
|
|
4534
4534
|
const h = Math.max(...t), f = Math.min(...t), g = h - f || 1, v = t.map((N, $) => [
|
|
4535
|
-
|
|
4536
|
-
l -
|
|
4535
|
+
d + $ / (t.length - 1) * (r - d * 2),
|
|
4536
|
+
l - d - (N - f) / g * (l - d * 2)
|
|
4537
4537
|
]), x = v[v.length - 1];
|
|
4538
4538
|
u = /* @__PURE__ */ m("svg", { width: r, height: l, className: "select-chart", "aria-hidden": "true", children: [
|
|
4539
4539
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${o}-sa`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4540
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
4541
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
4540
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: i, stopOpacity: 0.26 }),
|
|
4541
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: i, stopOpacity: 0 })
|
|
4542
4542
|
] }) }),
|
|
4543
|
-
/* @__PURE__ */ e("path", { d: xl(v, l -
|
|
4543
|
+
/* @__PURE__ */ e("path", { d: xl(v, l - d), fill: `url(#${o}-sa)` }),
|
|
4544
4544
|
/* @__PURE__ */ e(
|
|
4545
4545
|
"path",
|
|
4546
4546
|
{
|
|
4547
4547
|
d: Ge(v),
|
|
4548
4548
|
fill: "none",
|
|
4549
|
-
stroke:
|
|
4549
|
+
stroke: i,
|
|
4550
4550
|
strokeWidth: 2,
|
|
4551
4551
|
strokeLinecap: "round",
|
|
4552
4552
|
strokeLinejoin: "round",
|
|
@@ -4554,7 +4554,7 @@ function to({ data: t, color: n, height: l = 40, className: c, ...s }) {
|
|
|
4554
4554
|
className: "select-chart__line"
|
|
4555
4555
|
}
|
|
4556
4556
|
),
|
|
4557
|
-
/* @__PURE__ */ e("circle", { cx: x[0], cy: x[1], r: 2.75, fill:
|
|
4557
|
+
/* @__PURE__ */ e("circle", { cx: x[0], cy: x[1], r: 2.75, fill: i, className: "select-chart__dot" })
|
|
4558
4558
|
] });
|
|
4559
4559
|
}
|
|
4560
4560
|
return /* @__PURE__ */ e("div", { ...s, className: `select-spark${c ? " " + c : ""}`, ref: a, children: u });
|
|
@@ -4567,11 +4567,11 @@ function K({ tip: t, className: n, ...l }) {
|
|
|
4567
4567
|
const c = q(null), [s, a] = D(0);
|
|
4568
4568
|
if (Be(() => {
|
|
4569
4569
|
if (!t) return;
|
|
4570
|
-
const
|
|
4571
|
-
if (!
|
|
4572
|
-
const
|
|
4570
|
+
const i = c.current, o = i == null ? void 0 : i.offsetParent;
|
|
4571
|
+
if (!i || !o) return;
|
|
4572
|
+
const d = i.offsetWidth / 2, u = o.clientWidth, h = 6;
|
|
4573
4573
|
let f = 0;
|
|
4574
|
-
t.x -
|
|
4574
|
+
t.x - d < h ? f = h - (t.x - d) : t.x + d > u - h && (f = u - h - (t.x + d)), a(f);
|
|
4575
4575
|
}, [t]), !t) return null;
|
|
4576
4576
|
const r = {
|
|
4577
4577
|
left: t.x + s,
|
|
@@ -4580,18 +4580,18 @@ function K({ tip: t, className: n, ...l }) {
|
|
|
4580
4580
|
};
|
|
4581
4581
|
return /* @__PURE__ */ m("div", { ...l, ref: c, className: `select-chart__tip${t.place === "bottom" ? " select-chart__tip--bottom" : ""}${n ? " " + n : ""}`, style: r, role: "status", "aria-hidden": "true", children: [
|
|
4582
4582
|
t.title != null && /* @__PURE__ */ e("div", { className: "select-chart__tiptitle", children: t.title }),
|
|
4583
|
-
t.rows.map((
|
|
4584
|
-
|
|
4585
|
-
/* @__PURE__ */ e("span", { className: "select-chart__tiplabel", children:
|
|
4586
|
-
/* @__PURE__ */ e("span", { className: "select-chart__tipval", children:
|
|
4583
|
+
t.rows.map((i, o) => /* @__PURE__ */ m("div", { className: "select-chart__tiprow", children: [
|
|
4584
|
+
i.color && /* @__PURE__ */ e("span", { className: "select-chart__tipdot", style: { background: i.color } }),
|
|
4585
|
+
/* @__PURE__ */ e("span", { className: "select-chart__tiplabel", children: i.label }),
|
|
4586
|
+
/* @__PURE__ */ e("span", { className: "select-chart__tipval", children: i.value })
|
|
4587
4587
|
] }, o))
|
|
4588
4588
|
] });
|
|
4589
4589
|
}
|
|
4590
4590
|
function no({ data: t, height: n = 240, color: l, format: c = Y, className: s, ...a }) {
|
|
4591
|
-
const { ref: r, width:
|
|
4591
|
+
const { ref: r, width: i } = ce(n), o = X(), d = te(), u = l ?? j(0), h = ye(Math.max(0, ...t.map((p) => p.value))), f = Ee, 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), $ = f.top + v, _ = (p) => $ - p / h * v;
|
|
4592
4592
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
4593
|
-
|
|
4594
|
-
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${
|
|
4593
|
+
i > 0 && /* @__PURE__ */ m("svg", { width: i, height: n, className: "select-chart", children: [
|
|
4594
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${d}-bar`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4595
4595
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: u, stopOpacity: 1 }),
|
|
4596
4596
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: u, stopOpacity: 0.62 })
|
|
4597
4597
|
] }) }),
|
|
@@ -4600,7 +4600,7 @@ function no({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
|
|
|
4600
4600
|
"line",
|
|
4601
4601
|
{
|
|
4602
4602
|
x1: f.left,
|
|
4603
|
-
x2:
|
|
4603
|
+
x2: i - f.right,
|
|
4604
4604
|
y1: _(p),
|
|
4605
4605
|
y2: _(p),
|
|
4606
4606
|
className: b === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
@@ -4619,7 +4619,7 @@ function no({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
|
|
|
4619
4619
|
width: N,
|
|
4620
4620
|
height: Math.max(0, k),
|
|
4621
4621
|
rx: 5,
|
|
4622
|
-
fill: `url(#${
|
|
4622
|
+
fill: `url(#${d}-bar)`,
|
|
4623
4623
|
className: "select-chart__bar",
|
|
4624
4624
|
style: { animationDelay: `${b * 40}ms` },
|
|
4625
4625
|
onMouseEnter: () => o.show({
|
|
@@ -4639,8 +4639,8 @@ function no({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
|
|
|
4639
4639
|
] });
|
|
4640
4640
|
}
|
|
4641
4641
|
function lo({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1, className: a, ...r }) {
|
|
4642
|
-
const { ref:
|
|
4643
|
-
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref:
|
|
4642
|
+
const { ref: i, width: o } = ce(l), d = X(), u = te(), [h, f] = D(null), { max: g, values: v } = Bs(Math.max(0, ...t.flatMap((w) => w.data))), x = Ee, N = Math.max(0, o - x.left - x.right), $ = l - x.top - x.bottom, _ = n.length, p = (w) => x.left + (_ <= 1 ? N / 2 : w / (_ - 1) * N), b = (w) => x.top + $ - w / g * $, S = _ > 1 ? N / (_ - 1) : N, k = Math.max(1, Math.ceil(_ / 7)), M = x.top + $;
|
|
4643
|
+
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: i, children: [
|
|
4644
4644
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
|
|
4645
4645
|
/* @__PURE__ */ e("defs", { children: t.map((w, y) => {
|
|
4646
4646
|
const C = w.color ?? j(y);
|
|
@@ -4707,7 +4707,7 @@ function lo({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1
|
|
|
4707
4707
|
onMouseEnter: () => {
|
|
4708
4708
|
f(y);
|
|
4709
4709
|
const C = Math.min(...t.map((L) => b(L.data[y] ?? 0)));
|
|
4710
|
-
|
|
4710
|
+
d.show({
|
|
4711
4711
|
x: p(y),
|
|
4712
4712
|
y: C,
|
|
4713
4713
|
place: C < x.top + 52 ? "bottom" : "top",
|
|
@@ -4716,24 +4716,24 @@ function lo({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1
|
|
|
4716
4716
|
});
|
|
4717
4717
|
},
|
|
4718
4718
|
onMouseLeave: () => {
|
|
4719
|
-
f(null),
|
|
4719
|
+
f(null), d.hide();
|
|
4720
4720
|
}
|
|
4721
4721
|
},
|
|
4722
4722
|
`h${y}`
|
|
4723
4723
|
))
|
|
4724
4724
|
] }),
|
|
4725
|
-
/* @__PURE__ */ e(K, { tip:
|
|
4725
|
+
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
4726
4726
|
] });
|
|
4727
4727
|
}
|
|
4728
4728
|
function co({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
|
|
4729
|
-
const { ref: r, width:
|
|
4729
|
+
const { ref: r, width: i } = ce(l), o = X(), d = te(), [u, h] = D(null), f = n.length, g = new Array(f).fill(0), v = t.map(
|
|
4730
4730
|
(y) => y.data.map((C, L) => (g[L] = (g[L] ?? 0) + (C ?? 0), g[L]))
|
|
4731
|
-
), x = ye(Math.max(0, ...g)), N = Ee, $ = Math.max(0,
|
|
4731
|
+
), x = ye(Math.max(0, ...g)), N = Ee, $ = Math.max(0, i - N.left - N.right), _ = l - N.top - N.bottom, p = (y) => N.left + (f <= 1 ? $ / 2 : y / (f - 1) * $), b = (y) => N.top + _ - y / x * _, S = f > 1 ? $ / (f - 1) : $, k = Math.max(1, Math.ceil(f / 7)), M = N.top + _, w = v[v.length - 1];
|
|
4732
4732
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
4733
|
-
|
|
4733
|
+
i > 0 && /* @__PURE__ */ m("svg", { width: i, height: l, className: "select-chart", children: [
|
|
4734
4734
|
/* @__PURE__ */ e("defs", { children: t.map((y, C) => {
|
|
4735
4735
|
const L = y.color ?? j(C);
|
|
4736
|
-
return /* @__PURE__ */ m("linearGradient", { id: `${
|
|
4736
|
+
return /* @__PURE__ */ m("linearGradient", { id: `${d}-b${C}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4737
4737
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: L, stopOpacity: 0.95 }),
|
|
4738
4738
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: L, stopOpacity: 0.4 })
|
|
4739
4739
|
] }, C);
|
|
@@ -4743,7 +4743,7 @@ function co({ series: t, labels: n, height: l = 240, format: c = Y, className: s
|
|
|
4743
4743
|
"line",
|
|
4744
4744
|
{
|
|
4745
4745
|
x1: N.left,
|
|
4746
|
-
x2:
|
|
4746
|
+
x2: i - N.right,
|
|
4747
4747
|
y1: b(y),
|
|
4748
4748
|
y2: b(y),
|
|
4749
4749
|
className: C === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
@@ -4754,7 +4754,7 @@ function co({ series: t, labels: n, height: l = 240, format: c = Y, className: s
|
|
|
4754
4754
|
t.map((y, C) => {
|
|
4755
4755
|
const L = y.color ?? j(C), B = v[C].map((F, E) => [p(E), b(F)]), A = C === 0 ? n.map((F, E) => [p(E), M]) : v[C - 1].map((F, E) => [p(E), b(F)]);
|
|
4756
4756
|
return /* @__PURE__ */ m("g", { className: "select-chart__area", children: [
|
|
4757
|
-
/* @__PURE__ */ e("path", { d: yl(B, A), fill: `url(#${
|
|
4757
|
+
/* @__PURE__ */ e("path", { d: yl(B, A), fill: `url(#${d}-b${C})` }),
|
|
4758
4758
|
/* @__PURE__ */ e("path", { d: Ge(B), fill: "none", stroke: L, strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
4759
4759
|
] }, C);
|
|
4760
4760
|
}),
|
|
@@ -4791,10 +4791,10 @@ function co({ series: t, labels: n, height: l = 240, format: c = Y, className: s
|
|
|
4791
4791
|
/* @__PURE__ */ e(K, { tip: o.tip })
|
|
4792
4792
|
] });
|
|
4793
4793
|
}
|
|
4794
|
-
function so({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, formatLine: a = (o) => `${Math.round(o)}%`, className: r, ...
|
|
4795
|
-
const { ref: o, width:
|
|
4796
|
-
return /* @__PURE__ */ m("div", { ...
|
|
4797
|
-
|
|
4794
|
+
function so({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, formatLine: a = (o) => `${Math.round(o)}%`, className: r, ...i }) {
|
|
4795
|
+
const { ref: o, width: d } = ce(c), u = X(), h = te(), [f, g] = D(null), v = { ...Ee, right: 58 }, x = Math.max(0, d - v.left - v.right), N = c - v.top - v.bottom, $ = t.length, _ = ye(Math.max(0, ...n.data)), p = ye(Math.max(0, ...l.data)), b = $ > 0 ? x / $ : 0, S = Math.min(b * 0.5, 36), k = Math.max(1, Math.ceil($ / 8)), M = n.color ?? j(0), w = l.color ?? j(1), y = v.top + N, C = (F) => y - F / _ * N, L = (F) => y - F / p * N, B = (F) => v.left + b * F + b / 2, A = l.data.map((F, E) => [B(E), L(F)]);
|
|
4796
|
+
return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${r ? " " + r : ""}`, ref: o, children: [
|
|
4797
|
+
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: c, className: "select-chart", children: [
|
|
4798
4798
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${h}-bar`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4799
4799
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: M, stopOpacity: 1 }),
|
|
4800
4800
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: M, stopOpacity: 0.55 })
|
|
@@ -4804,7 +4804,7 @@ function so({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
|
|
|
4804
4804
|
"line",
|
|
4805
4805
|
{
|
|
4806
4806
|
x1: v.left,
|
|
4807
|
-
x2:
|
|
4807
|
+
x2: d - v.right,
|
|
4808
4808
|
y1: C(F),
|
|
4809
4809
|
y2: C(F),
|
|
4810
4810
|
className: E === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
@@ -4812,7 +4812,7 @@ function so({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
|
|
|
4812
4812
|
),
|
|
4813
4813
|
/* @__PURE__ */ e("text", { x: v.left - 8, y: C(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: s(F) })
|
|
4814
4814
|
] }, E)),
|
|
4815
|
-
we(p).map((F, E) => /* @__PURE__ */ e("text", { x:
|
|
4815
|
+
we(p).map((F, E) => /* @__PURE__ */ e("text", { x: d - 4, y: L(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: a(F) }, `r${E}`)),
|
|
4816
4816
|
n.data.map((F, E) => {
|
|
4817
4817
|
const T = F / _ * N;
|
|
4818
4818
|
return /* @__PURE__ */ e(
|
|
@@ -4889,10 +4889,10 @@ function so({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
|
|
|
4889
4889
|
/* @__PURE__ */ e(K, { tip: u.tip })
|
|
4890
4890
|
] });
|
|
4891
4891
|
}
|
|
4892
|
-
const ao = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s = Y, centerLabel: a, legend: r = !0, gap:
|
|
4892
|
+
const ao = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s = Y, centerLabel: a, legend: r = !0, gap: i = 2, pie: o = !1, className: d, ...u }, h) {
|
|
4893
4893
|
const f = X(), g = te(), v = q(null), x = Ct(v, l), N = n.reduce((k, M) => k + M.value, 0) || 1, $ = x / 2, _ = x / 2, p = x / 2 - 2, b = o ? 0 : p - c;
|
|
4894
4894
|
let S = 0;
|
|
4895
|
-
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-donut-wrap${
|
|
4895
|
+
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-donut-wrap${d ? " " + d : ""}`, children: [
|
|
4896
4896
|
/* @__PURE__ */ m("div", { ref: v, className: "select-donut-ring", style: { width: `${l / 16}rem`, aspectRatio: "1" }, children: [
|
|
4897
4897
|
/* @__PURE__ */ m("svg", { width: x, height: x, viewBox: `0 0 ${x} ${x}`, className: "select-chart select-donut", "aria-hidden": "true", children: [
|
|
4898
4898
|
/* @__PURE__ */ e("defs", { children: n.map((k, M) => {
|
|
@@ -4905,7 +4905,7 @@ const ao = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s
|
|
|
4905
4905
|
n.map((k, M) => {
|
|
4906
4906
|
const w = S / N * 360;
|
|
4907
4907
|
S += k.value;
|
|
4908
|
-
const y = S / N * 360, C = k.color ?? j(M), B = y - w >
|
|
4908
|
+
const y = S / N * 360, C = k.color ?? j(M), B = y - w > i * 1.5 ? i / 2 : 0, A = w + B, F = Math.max(A + 0.01, y - B);
|
|
4909
4909
|
return /* @__PURE__ */ e(
|
|
4910
4910
|
"path",
|
|
4911
4911
|
{
|
|
@@ -4939,8 +4939,8 @@ const ao = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s
|
|
|
4939
4939
|
] });
|
|
4940
4940
|
});
|
|
4941
4941
|
function oo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s = !1, className: a, ...r }) {
|
|
4942
|
-
const { ref:
|
|
4943
|
-
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref:
|
|
4942
|
+
const { ref: i, width: o } = ce(l), d = X(), u = te(), h = n.length, f = t.length || 1, g = n.map((M, w) => t.reduce((y, C) => y + (C.data[w] ?? 0), 0)), v = ye(s ? Math.max(0, ...g) : Math.max(0, ...t.flatMap((M) => M.data))), x = Ee, N = Math.max(0, o - x.left - x.right), $ = l - x.top - x.bottom, _ = x.top + $, p = h ? N / h : 0, b = (M) => _ - M / v * $, S = Math.min(p * 0.72, f * 40), k = s ? Math.min(p * 0.5, 44) : S / f;
|
|
4943
|
+
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: i, children: [
|
|
4944
4944
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
|
|
4945
4945
|
/* @__PURE__ */ e("defs", { children: t.map((M, w) => {
|
|
4946
4946
|
const y = M.color ?? j(w);
|
|
@@ -5014,40 +5014,40 @@ function oo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s =
|
|
|
5014
5014
|
width: p,
|
|
5015
5015
|
height: $,
|
|
5016
5016
|
fill: "transparent",
|
|
5017
|
-
onMouseEnter: () =>
|
|
5017
|
+
onMouseEnter: () => d.show({
|
|
5018
5018
|
x: x.left + p * w + p / 2,
|
|
5019
5019
|
y,
|
|
5020
5020
|
place: y < x.top + 52 ? "bottom" : "top",
|
|
5021
5021
|
title: M,
|
|
5022
5022
|
rows: t.map((C, L) => ({ label: C.name, value: c(C.data[w] ?? 0), color: C.color ?? j(L) }))
|
|
5023
5023
|
}),
|
|
5024
|
-
onMouseLeave:
|
|
5024
|
+
onMouseLeave: d.hide
|
|
5025
5025
|
},
|
|
5026
5026
|
`h${w}`
|
|
5027
5027
|
);
|
|
5028
5028
|
})
|
|
5029
5029
|
] }),
|
|
5030
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5030
|
+
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
5031
5031
|
] });
|
|
5032
5032
|
}
|
|
5033
5033
|
const ro = R(function({ stages: n, format: l = Y, className: c, ...s }, a) {
|
|
5034
|
-
const r = Math.max(1, ...n.map((
|
|
5035
|
-
return /* @__PURE__ */ e("div", { ref: a, ...s, className: `select-funnel${c ? " " + c : ""}`, children: n.map((
|
|
5036
|
-
const
|
|
5034
|
+
const r = Math.max(1, ...n.map((i) => i.value));
|
|
5035
|
+
return /* @__PURE__ */ e("div", { ref: a, ...s, className: `select-funnel${c ? " " + c : ""}`, children: n.map((i, o) => {
|
|
5036
|
+
const d = o > 0 ? n[o - 1].value || 1 : i.value || 1, u = o > 0 ? i.value / d * 100 : 100, h = j(o);
|
|
5037
5037
|
return /* @__PURE__ */ m("div", { className: "select-funnel__row", children: [
|
|
5038
|
-
/* @__PURE__ */ e("div", { className: "select-funnel__label", children:
|
|
5038
|
+
/* @__PURE__ */ e("div", { className: "select-funnel__label", children: i.label }),
|
|
5039
5039
|
/* @__PURE__ */ e("div", { className: "select-funnel__track", children: /* @__PURE__ */ e(
|
|
5040
5040
|
"div",
|
|
5041
5041
|
{
|
|
5042
5042
|
className: "select-funnel__bar",
|
|
5043
5043
|
style: {
|
|
5044
|
-
width: `${
|
|
5044
|
+
width: `${i.value / r * 100}%`,
|
|
5045
5045
|
background: `linear-gradient(90deg, ${h}, color-mix(in srgb, ${h} 50%, transparent))`
|
|
5046
5046
|
}
|
|
5047
5047
|
}
|
|
5048
5048
|
) }),
|
|
5049
5049
|
/* @__PURE__ */ m("div", { className: "select-funnel__meta", children: [
|
|
5050
|
-
/* @__PURE__ */ e("span", { className: "select-funnel__value", children: l(
|
|
5050
|
+
/* @__PURE__ */ e("span", { className: "select-funnel__value", children: l(i.value) }),
|
|
5051
5051
|
o > 0 && /* @__PURE__ */ m("span", { className: "select-funnel__conv", children: [
|
|
5052
5052
|
u.toFixed(0),
|
|
5053
5053
|
"%"
|
|
@@ -5064,12 +5064,12 @@ function Cn(t, n, l, c) {
|
|
|
5064
5064
|
return [t + l * Math.cos(s), n + l * Math.sin(s)];
|
|
5065
5065
|
}
|
|
5066
5066
|
function Ln(t, n, l, c, s) {
|
|
5067
|
-
const [a, r] = Cn(t, n, l, c), [
|
|
5068
|
-
return `M ${a.toFixed(2)} ${r.toFixed(2)} A ${l} ${l} 0 0 1 ${
|
|
5067
|
+
const [a, r] = Cn(t, n, l, c), [i, o] = Cn(t, n, l, s);
|
|
5068
|
+
return `M ${a.toFixed(2)} ${r.toFixed(2)} A ${l} ${l} 0 0 1 ${i.toFixed(2)} ${o.toFixed(2)}`;
|
|
5069
5069
|
}
|
|
5070
|
-
const Is = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ? 1 : 0 })}%`, io = R(function({ value: n, label: l, caption: c, size: s = 220, thickness: a, color: r, format:
|
|
5071
|
-
const h = Es(n), f = te(), g = a ?? Math.max(8, Math.round(s * 0.075)), v = g / 2 + 2, x = s / 2 - v, N = s / 2, $ = s / 2, _ = $ + v, p = jc({ value: h, format:
|
|
5072
|
-
return /* @__PURE__ */ m("div", { ref: u, ...
|
|
5070
|
+
const Is = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ? 1 : 0 })}%`, io = R(function({ value: n, label: l, caption: c, size: s = 220, thickness: a, color: r, format: i = Is, className: o, ...d }, u) {
|
|
5071
|
+
const h = Es(n), f = te(), g = a ?? Math.max(8, Math.round(s * 0.075)), v = g / 2 + 2, x = s / 2 - v, N = s / 2, $ = s / 2, _ = $ + v, p = jc({ value: h, format: i });
|
|
5072
|
+
return /* @__PURE__ */ m("div", { ref: u, ...d, className: `select-gauge${o ? " " + o : ""}`, style: { width: `${s / 16}rem` }, children: [
|
|
5073
5073
|
/* @__PURE__ */ m("div", { className: "select-gauge__ring", style: { width: "100%", aspectRatio: `${s} / ${_}` }, children: [
|
|
5074
5074
|
/* @__PURE__ */ m("svg", { width: "100%", height: "100%", viewBox: `0 0 ${s} ${_}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5075
5075
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: f, x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
|
|
@@ -5100,15 +5100,15 @@ const Is = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
|
|
|
5100
5100
|
)
|
|
5101
5101
|
] }),
|
|
5102
5102
|
/* @__PURE__ */ m("div", { className: "select-gauge__center", children: [
|
|
5103
|
-
/* @__PURE__ */ e("span", { className: "select-gauge__value", ref: p, children:
|
|
5103
|
+
/* @__PURE__ */ e("span", { className: "select-gauge__value", ref: p, children: i(h) }),
|
|
5104
5104
|
l != null && /* @__PURE__ */ e("span", { className: "select-gauge__label", children: l })
|
|
5105
5105
|
] })
|
|
5106
5106
|
] }),
|
|
5107
5107
|
c != null && /* @__PURE__ */ e("div", { className: "select-gauge__caption", children: c })
|
|
5108
5108
|
] });
|
|
5109
|
-
}), ho = R(function({ columns: n, rows: l, format: c = Y, formatValue: s, color: a = "var(--select-chart-1)", showValues: r = !0, min:
|
|
5110
|
-
const x = X(), N = l.flatMap((M) => M.values).filter((M) => M != null && Number.isFinite(M)), $ =
|
|
5111
|
-
gridTemplateColumns: `minmax(56px, max-content) repeat(${n.length}, minmax(${
|
|
5109
|
+
}), ho = R(function({ columns: n, rows: l, format: c = Y, formatValue: s, color: a = "var(--select-chart-1)", showValues: r = !0, min: i, max: o, cellSize: d = 40, maxCellSize: u = 96, cellHeight: h = 30, className: f, ...g }, v) {
|
|
5110
|
+
const x = X(), N = l.flatMap((M) => M.values).filter((M) => M != null && Number.isFinite(M)), $ = i ?? (N.length ? Math.min(...N) : 0), p = (o ?? (N.length ? Math.max(...N) : 1)) - $ || 1, b = { "--heat-color": a }, S = {
|
|
5111
|
+
gridTemplateColumns: `minmax(56px, max-content) repeat(${n.length}, minmax(${d}px, ${Math.max(d, u)}px))`,
|
|
5112
5112
|
width: "fit-content",
|
|
5113
5113
|
maxWidth: "100%",
|
|
5114
5114
|
minWidth: 0
|
|
@@ -5167,7 +5167,7 @@ function uo({
|
|
|
5167
5167
|
return /* @__PURE__ */ e("div", { className: "select-progresslist__empty", children: c });
|
|
5168
5168
|
const s = Math.max(...t.map((a) => a.value), 1);
|
|
5169
5169
|
return /* @__PURE__ */ e("ul", { className: "select-progresslist", children: t.map((a, r) => {
|
|
5170
|
-
const
|
|
5170
|
+
const i = a.color ?? l ?? j(r);
|
|
5171
5171
|
return /* @__PURE__ */ m("li", { className: "select-progresslist__row", children: [
|
|
5172
5172
|
/* @__PURE__ */ m("div", { className: "select-progresslist__top", children: [
|
|
5173
5173
|
/* @__PURE__ */ m("span", { className: "select-progresslist__label", children: [
|
|
@@ -5182,7 +5182,7 @@ function uo({
|
|
|
5182
5182
|
className: "select-progresslist__bar",
|
|
5183
5183
|
style: {
|
|
5184
5184
|
width: `${a.value / s * 100}%`,
|
|
5185
|
-
background: `linear-gradient(90deg, ${
|
|
5185
|
+
background: `linear-gradient(90deg, ${i}, color-mix(in srgb, ${i} 55%, transparent))`,
|
|
5186
5186
|
animationDelay: `${r * 40}ms`
|
|
5187
5187
|
}
|
|
5188
5188
|
}
|
|
@@ -5191,9 +5191,9 @@ function uo({
|
|
|
5191
5191
|
] }, `${a.label}-${r}`);
|
|
5192
5192
|
}) });
|
|
5193
5193
|
}
|
|
5194
|
-
const Rt = (t) => Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0, po = R(function({ series: n, size: l = 200, thickness: c = 14, gap: s = 8, format: a = (h) => `${Math.round(h)}%`, centerLabel: r, legend:
|
|
5194
|
+
const Rt = (t) => Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0, po = R(function({ series: n, size: l = 200, thickness: c = 14, gap: s = 8, format: a = (h) => `${Math.round(h)}%`, centerLabel: r, legend: i = !0, className: o, ...d }, u) {
|
|
5195
5195
|
const h = te(), f = l / 2, g = l / 2;
|
|
5196
|
-
return /* @__PURE__ */ m("div", { ref: u, ...
|
|
5196
|
+
return /* @__PURE__ */ m("div", { ref: u, ...d, className: `select-donut-wrap${o ? " " + o : ""}`, children: [
|
|
5197
5197
|
/* @__PURE__ */ m("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: [
|
|
5198
5198
|
/* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5199
5199
|
/* @__PURE__ */ e("defs", { children: n.map((v, x) => {
|
|
@@ -5230,19 +5230,19 @@ const Rt = (t) => Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0, po = R
|
|
|
5230
5230
|
] }),
|
|
5231
5231
|
/* @__PURE__ */ e("div", { className: "select-radial__center", children: r ?? (n.length === 1 ? /* @__PURE__ */ e("strong", { className: "select-radial__value", children: a(Rt(n[0].value)) }) : null) })
|
|
5232
5232
|
] }),
|
|
5233
|
-
|
|
5233
|
+
i && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: n.map((v, x) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
|
|
5234
5234
|
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: v.color ?? j(x) } }),
|
|
5235
5235
|
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: v.label }),
|
|
5236
5236
|
/* @__PURE__ */ e("span", { className: "select-donut__legval", children: a(Rt(v.value)) })
|
|
5237
5237
|
] }, x)) })
|
|
5238
5238
|
] });
|
|
5239
5239
|
}), An = 6.1, Dt = 12, Fn = 56, Ps = 0.4;
|
|
5240
|
-
function mo({ data: t, height: n, color: l, format: c = Y, formatValue: s, distributed: a = !0, labelWidth: r, className:
|
|
5240
|
+
function mo({ data: t, height: n, color: l, format: c = Y, formatValue: s, distributed: a = !0, labelWidth: r, className: i, ...o }) {
|
|
5241
5241
|
const g = n ?? t.length * 36 + 6 + 26, { ref: v, width: x } = ce(g), N = X(), $ = te(), _ = ye(Math.max(0, ...t.map((F) => F.value))), p = t.reduce((F, E) => Math.max(F, E.label.length), 0), b = Math.min(
|
|
5242
5242
|
Math.max(Fn, p * An + Dt),
|
|
5243
5243
|
Math.max(Fn, x * Ps)
|
|
5244
5244
|
), S = r ?? b, k = Math.max(3, Math.floor((S - Dt) / An)), M = (F) => F.length <= k ? F : `${F.slice(0, k - 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 = (F) => S + F / _ * w, A = (F, E) => F.color ?? (a ? j(E) : l ?? j(0));
|
|
5245
|
-
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${
|
|
5245
|
+
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${i ? " " + i : ""}`, ref: v, children: [
|
|
5246
5246
|
x > 0 && /* @__PURE__ */ m("svg", { width: x, height: g, className: "select-chart", children: [
|
|
5247
5247
|
/* @__PURE__ */ e("defs", { children: t.map((F, E) => {
|
|
5248
5248
|
const T = A(F, E);
|
|
@@ -5309,13 +5309,13 @@ function mo({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
|
|
|
5309
5309
|
] });
|
|
5310
5310
|
}
|
|
5311
5311
|
function fo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
5312
|
-
const { ref: a, width: r } = ce(n),
|
|
5313
|
-
let
|
|
5312
|
+
const { ref: a, width: r } = ce(n), i = X(), o = te();
|
|
5313
|
+
let d = 0;
|
|
5314
5314
|
const u = t.map((k) => {
|
|
5315
5315
|
if (k.total)
|
|
5316
|
-
return
|
|
5317
|
-
const M =
|
|
5318
|
-
return
|
|
5316
|
+
return d = k.value, { ...k, start: 0, end: k.value };
|
|
5317
|
+
const M = d;
|
|
5318
|
+
return d += k.value, { ...k, start: M, end: d };
|
|
5319
5319
|
}), h = ye(Math.max(0, ...u.map((k) => Math.max(k.start, k.end)))), f = Ee, g = Math.max(0, r - f.left - f.right), v = n - f.top - f.bottom, x = f.top + v, N = t.length, $ = N ? g / N : 0, _ = Math.min($ * 0.6, 46), p = (k) => x - k / h * v, b = {
|
|
5320
5320
|
total: "var(--select-chart-1)",
|
|
5321
5321
|
inc: "var(--select-chart-4)",
|
|
@@ -5358,7 +5358,7 @@ function fo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5358
5358
|
fill: `url(#${o}-${L})`,
|
|
5359
5359
|
className: "select-chart__bar",
|
|
5360
5360
|
style: { animationDelay: `${M * 40}ms` },
|
|
5361
|
-
onMouseEnter: () =>
|
|
5361
|
+
onMouseEnter: () => i.show({
|
|
5362
5362
|
x: w,
|
|
5363
5363
|
y,
|
|
5364
5364
|
place: y < f.top + 52 ? "bottom" : "top",
|
|
@@ -5368,19 +5368,19 @@ function fo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5368
5368
|
{ label: "Total", value: l(k.end) }
|
|
5369
5369
|
]
|
|
5370
5370
|
}),
|
|
5371
|
-
onMouseLeave:
|
|
5371
|
+
onMouseLeave: i.hide
|
|
5372
5372
|
}
|
|
5373
5373
|
),
|
|
5374
5374
|
/* @__PURE__ */ e("text", { x: w, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k.label })
|
|
5375
5375
|
] }, M);
|
|
5376
5376
|
})
|
|
5377
5377
|
] }),
|
|
5378
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5378
|
+
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
5379
5379
|
] });
|
|
5380
5380
|
}
|
|
5381
5381
|
const Bn = (t) => Math.max(0, Math.min(100, t)), _o = R(function({ items: n, format: l = Y, className: c, ...s }, a) {
|
|
5382
|
-
return /* @__PURE__ */ e("div", { ref: a, ...s, className: `select-bullet${c ? " " + c : ""}`, children: n.map((r,
|
|
5383
|
-
const o = r.color ?? j(
|
|
5382
|
+
return /* @__PURE__ */ e("div", { ref: a, ...s, className: `select-bullet${c ? " " + c : ""}`, children: n.map((r, i) => {
|
|
5383
|
+
const o = r.color ?? j(i), d = r.max ?? (Math.max(r.value, r.target) * 1.25 || 1), u = r.value >= r.target;
|
|
5384
5384
|
return /* @__PURE__ */ m("div", { className: "select-bullet__row", children: [
|
|
5385
5385
|
/* @__PURE__ */ m("div", { className: "select-bullet__head", children: [
|
|
5386
5386
|
/* @__PURE__ */ e("span", { className: "select-bullet__label", children: r.label }),
|
|
@@ -5404,27 +5404,27 @@ const Bn = (t) => Math.max(0, Math.min(100, t)), _o = R(function({ items: n, for
|
|
|
5404
5404
|
{
|
|
5405
5405
|
className: "select-bullet__fill",
|
|
5406
5406
|
style: {
|
|
5407
|
-
width: `${Bn(r.value /
|
|
5407
|
+
width: `${Bn(r.value / d * 100)}%`,
|
|
5408
5408
|
background: `linear-gradient(90deg, ${o}, color-mix(in srgb, ${o} 55%, transparent))`
|
|
5409
5409
|
}
|
|
5410
5410
|
}
|
|
5411
5411
|
),
|
|
5412
|
-
/* @__PURE__ */ e("span", { className: "select-bullet__tick", style: { left: `${Bn(r.target /
|
|
5412
|
+
/* @__PURE__ */ e("span", { className: "select-bullet__tick", style: { left: `${Bn(r.target / d * 100)}%` } })
|
|
5413
5413
|
] })
|
|
5414
|
-
] }, `${r.label}-${
|
|
5414
|
+
] }, `${r.label}-${i}`);
|
|
5415
5415
|
}) });
|
|
5416
5416
|
});
|
|
5417
5417
|
function Rs(t, n, l) {
|
|
5418
|
-
const c = [], s = (r,
|
|
5419
|
-
const o = r.reduce((h, f) => h + f, 0),
|
|
5420
|
-
return Math.max(
|
|
5421
|
-
}, a = (r,
|
|
5422
|
-
if (r.length === 0 ||
|
|
5418
|
+
const c = [], s = (r, i) => {
|
|
5419
|
+
const o = r.reduce((h, f) => h + f, 0), d = Math.max(...r), u = Math.min(...r);
|
|
5420
|
+
return Math.max(i * i * d / (o * o), o * o / (i * i * u));
|
|
5421
|
+
}, a = (r, i, o, d, u) => {
|
|
5422
|
+
if (r.length === 0 || d <= 0 || u <= 0) return;
|
|
5423
5423
|
if (r.length === 1) {
|
|
5424
|
-
c.push({ x:
|
|
5424
|
+
c.push({ x: i, y: o, w: d, h: u, idx: r[0] });
|
|
5425
5425
|
return;
|
|
5426
5426
|
}
|
|
5427
|
-
const h = r.reduce((p, b) => p + t[b], 0) || 1, f =
|
|
5427
|
+
const h = r.reduce((p, b) => p + t[b], 0) || 1, f = d * u, g = r.map((p) => t[p] / h * f), v = Math.min(d, u);
|
|
5428
5428
|
let x = 0, N = [];
|
|
5429
5429
|
for (; x < g.length; ) {
|
|
5430
5430
|
const p = [...N, g[x]];
|
|
@@ -5433,24 +5433,24 @@ function Rs(t, n, l) {
|
|
|
5433
5433
|
else break;
|
|
5434
5434
|
}
|
|
5435
5435
|
const $ = r.slice(0, x), _ = N.reduce((p, b) => p + b, 0);
|
|
5436
|
-
if (
|
|
5436
|
+
if (d >= u) {
|
|
5437
5437
|
const p = _ / u;
|
|
5438
5438
|
let b = o;
|
|
5439
5439
|
$.forEach((S, k) => {
|
|
5440
5440
|
const M = N[k] / p;
|
|
5441
|
-
c.push({ x:
|
|
5442
|
-
}), a(r.slice(x),
|
|
5441
|
+
c.push({ x: i, y: b, w: p, h: M, idx: S }), b += M;
|
|
5442
|
+
}), a(r.slice(x), i + p, o, d - p, u);
|
|
5443
5443
|
} else {
|
|
5444
|
-
const p = _ /
|
|
5445
|
-
let b =
|
|
5444
|
+
const p = _ / d;
|
|
5445
|
+
let b = i;
|
|
5446
5446
|
$.forEach((S, k) => {
|
|
5447
5447
|
const M = N[k] / p;
|
|
5448
5448
|
c.push({ x: b, y: o, w: M, h: p, idx: S }), b += M;
|
|
5449
|
-
}), a(r.slice(x),
|
|
5449
|
+
}), a(r.slice(x), i, o + p, d, u - p);
|
|
5450
5450
|
}
|
|
5451
5451
|
};
|
|
5452
5452
|
return a(
|
|
5453
|
-
t.map((r,
|
|
5453
|
+
t.map((r, i) => i),
|
|
5454
5454
|
0,
|
|
5455
5455
|
0,
|
|
5456
5456
|
n,
|
|
@@ -5458,7 +5458,7 @@ function Rs(t, n, l) {
|
|
|
5458
5458
|
), c;
|
|
5459
5459
|
}
|
|
5460
5460
|
function vo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
5461
|
-
const { ref: a, width: r } = ce(n),
|
|
5461
|
+
const { ref: a, width: r } = ce(n), i = X(), o = te(), d = t.map((h, f) => f).sort((h, f) => t[f].value - t[h].value), u = r > 0 ? Rs(d.map((h) => t[h].value), r, n) : [];
|
|
5462
5462
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap select-treemap${c ? " " + c : ""}`, ref: a, children: [
|
|
5463
5463
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
|
|
5464
5464
|
/* @__PURE__ */ e("defs", { children: t.map((h, f) => {
|
|
@@ -5469,7 +5469,7 @@ function vo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5469
5469
|
] }, f);
|
|
5470
5470
|
}) }),
|
|
5471
5471
|
u.map((h, f) => {
|
|
5472
|
-
const g =
|
|
5472
|
+
const g = d[h.idx], v = t[g], x = h.w > 56 && h.h > 30;
|
|
5473
5473
|
return /* @__PURE__ */ m("g", { children: [
|
|
5474
5474
|
/* @__PURE__ */ e(
|
|
5475
5475
|
"rect",
|
|
@@ -5481,14 +5481,14 @@ function vo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5481
5481
|
rx: 6,
|
|
5482
5482
|
fill: `url(#${o}-t${g})`,
|
|
5483
5483
|
className: "select-treemap__cell",
|
|
5484
|
-
onMouseEnter: () =>
|
|
5484
|
+
onMouseEnter: () => i.show({
|
|
5485
5485
|
x: h.x + h.w / 2,
|
|
5486
5486
|
y: h.y + 6,
|
|
5487
5487
|
place: h.y < 44 ? "bottom" : "top",
|
|
5488
5488
|
title: v.label,
|
|
5489
5489
|
rows: [{ label: "Valor", value: l(v.value), color: v.color ?? j(g) }]
|
|
5490
5490
|
}),
|
|
5491
|
-
onMouseLeave:
|
|
5491
|
+
onMouseLeave: i.hide
|
|
5492
5492
|
}
|
|
5493
5493
|
),
|
|
5494
5494
|
x && /* @__PURE__ */ e("text", { x: h.x + 12, y: h.y + 22, className: "select-treemap__label", children: v.label }),
|
|
@@ -5496,12 +5496,12 @@ function vo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5496
5496
|
] }, f);
|
|
5497
5497
|
})
|
|
5498
5498
|
] }),
|
|
5499
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5499
|
+
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
5500
5500
|
] });
|
|
5501
5501
|
}
|
|
5502
|
-
function go({ series: t, height: n = 240, xFormat: l = Y, yFormat: c = Y, xMax: s, yMax: a, maxRadius: r = 18, className:
|
|
5503
|
-
const { ref:
|
|
5504
|
-
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${
|
|
5502
|
+
function go({ series: t, height: n = 240, xFormat: l = Y, yFormat: c = Y, xMax: s, yMax: a, maxRadius: r = 18, className: i, ...o }) {
|
|
5503
|
+
const { ref: d, width: u } = ce(n), h = X(), f = t.flatMap((M) => M.points), g = ye(s ?? Math.max(0, ...f.map((M) => M.x))), v = ye(a ?? Math.max(0, ...f.map((M) => M.y))), x = Math.max(1, ...f.map((M) => M.r ?? 0)), N = Ee, $ = Math.max(0, u - N.left - N.right), _ = n - N.top - N.bottom, p = N.top + _, b = (M) => N.left + M / g * $, S = (M) => p - M / v * _, k = (M) => M.r ? 4 + Math.sqrt(M.r) / Math.sqrt(x) * (r - 4) : 4.5;
|
|
5504
|
+
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${i ? " " + i : ""}`, ref: d, children: [
|
|
5505
5505
|
u > 0 && /* @__PURE__ */ m("svg", { width: u, height: n, className: "select-chart", children: [
|
|
5506
5506
|
we(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
|
|
5507
5507
|
/* @__PURE__ */ e(
|
|
@@ -5546,9 +5546,9 @@ function go({ series: t, height: n = 240, xFormat: l = Y, yFormat: c = Y, xMax:
|
|
|
5546
5546
|
/* @__PURE__ */ e(K, { tip: h.tip })
|
|
5547
5547
|
] });
|
|
5548
5548
|
}
|
|
5549
|
-
const bo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y, levels: r = 4, legend:
|
|
5549
|
+
const bo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y, levels: r = 4, legend: i = !0, className: o, ...d }, u) {
|
|
5550
5550
|
const h = X(), f = te(), g = n.length, v = c / 2, x = c / 2, N = c / 2 - 30, $ = s ?? ye(Math.max(1, ...l.flatMap((S) => S.values))), _ = (S) => (-90 + S * 360 / g) * Math.PI / 180, p = (S, k) => [v + k * Math.cos(_(S)), x + k * Math.sin(_(S))], b = (S) => S.map((k, M) => `${M === 0 ? "M" : "L"}${p(M, k).map((w) => w.toFixed(2)).join(",")}`).join(" ") + " Z";
|
|
5551
|
-
return /* @__PURE__ */ m("div", { ref: u, ...
|
|
5551
|
+
return /* @__PURE__ */ m("div", { ref: u, ...d, className: `select-donut-wrap${o ? " " + o : ""}`, children: [
|
|
5552
5552
|
/* @__PURE__ */ m("div", { className: "select-radar", style: { width: c, aspectRatio: "1" }, children: [
|
|
5553
5553
|
/* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5554
5554
|
/* @__PURE__ */ e("defs", { children: l.map((S, k) => {
|
|
@@ -5610,14 +5610,14 @@ const bo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
|
|
|
5610
5610
|
] }),
|
|
5611
5611
|
/* @__PURE__ */ e(K, { tip: h.tip })
|
|
5612
5612
|
] }),
|
|
5613
|
-
|
|
5613
|
+
i && l.length > 1 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: l.map((S, k) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
|
|
5614
5614
|
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: S.color ?? j(k) } }),
|
|
5615
5615
|
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: S.name })
|
|
5616
5616
|
] }, k)) })
|
|
5617
5617
|
] });
|
|
5618
5618
|
});
|
|
5619
5619
|
function xo({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeGap: s = 14, className: a, ...r }) {
|
|
5620
|
-
const { ref:
|
|
5620
|
+
const { ref: i, width: o } = ce(n), d = X(), u = [], h = [];
|
|
5621
5621
|
for (const y of t)
|
|
5622
5622
|
u.includes(y.source) || u.push(y.source), h.includes(y.target) || h.push(y.target);
|
|
5623
5623
|
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(u.length, h.length), $ = s * Math.max(0, N - 1), _ = (x - $) / f, p = (y, C, L) => {
|
|
@@ -5628,7 +5628,7 @@ function xo({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
|
|
|
5628
5628
|
B.set(F, { name: F, y: A, h: T, cursor: A, color: j(E + L) }), A += T + s;
|
|
5629
5629
|
}), B;
|
|
5630
5630
|
}, b = p(u, "source", 0), S = p(h, "target", u.length), k = c, M = o - c, w = (k + M) / 2;
|
|
5631
|
-
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref:
|
|
5631
|
+
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: i, children: [
|
|
5632
5632
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
|
|
5633
5633
|
t.map((y, C) => {
|
|
5634
5634
|
const L = b.get(y.source), B = S.get(y.target), A = y.value * _, F = L.cursor, E = B.cursor;
|
|
@@ -5640,14 +5640,14 @@ function xo({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
|
|
|
5640
5640
|
d: T,
|
|
5641
5641
|
fill: L.color,
|
|
5642
5642
|
className: "select-sankey__link",
|
|
5643
|
-
onMouseEnter: () =>
|
|
5643
|
+
onMouseEnter: () => d.show({
|
|
5644
5644
|
x: w,
|
|
5645
5645
|
y: (F + E + A) / 2,
|
|
5646
5646
|
place: "top",
|
|
5647
5647
|
title: `${y.source} → ${y.target}`,
|
|
5648
5648
|
rows: [{ label: "Fluxo", value: l(y.value), color: L.color }]
|
|
5649
5649
|
}),
|
|
5650
|
-
onMouseLeave:
|
|
5650
|
+
onMouseLeave: d.hide
|
|
5651
5651
|
},
|
|
5652
5652
|
C
|
|
5653
5653
|
);
|
|
@@ -5661,12 +5661,12 @@ function xo({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
|
|
|
5661
5661
|
/* @__PURE__ */ e("text", { x: o - c - 6, y: y.y + y.h / 2, className: "select-sankey__label", dominantBaseline: "middle", textAnchor: "end", children: y.name })
|
|
5662
5662
|
] }, `t${C}`))
|
|
5663
5663
|
] }),
|
|
5664
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5664
|
+
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
5665
5665
|
] });
|
|
5666
5666
|
}
|
|
5667
5667
|
function yo({ data: t, height: n = 240, format: l = Y, upColor: c = "var(--select-chart-4)", downColor: s = "var(--select-chart-3)", className: a, ...r }) {
|
|
5668
|
-
const { ref:
|
|
5669
|
-
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref:
|
|
5668
|
+
const { ref: i, width: o } = ce(n), d = X(), u = Ee, h = Math.max(0, o - u.left - u.right), f = n - u.top - u.bottom, g = u.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, $ = x - N, _ = v + N, p = (w) => g - (w - $) / (_ - $) * f, b = t.length, S = b ? h / b : 0, k = Math.min(S * 0.5, 18), M = Array.from({ length: 5 }, (w, y) => $ + (_ - $) * y / 4);
|
|
5669
|
+
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: i, children: [
|
|
5670
5670
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
|
|
5671
5671
|
M.map((w, y) => /* @__PURE__ */ m("g", { children: [
|
|
5672
5672
|
/* @__PURE__ */ e(
|
|
@@ -5695,7 +5695,7 @@ function yo({ data: t, height: n = 240, format: l = Y, upColor: c = "var(--selec
|
|
|
5695
5695
|
width: S,
|
|
5696
5696
|
height: f,
|
|
5697
5697
|
fill: "transparent",
|
|
5698
|
-
onMouseEnter: () =>
|
|
5698
|
+
onMouseEnter: () => d.show({
|
|
5699
5699
|
x: C,
|
|
5700
5700
|
y: p(w.high),
|
|
5701
5701
|
place: p(w.high) < u.top + 64 ? "bottom" : "top",
|
|
@@ -5707,17 +5707,17 @@ function yo({ data: t, height: n = 240, format: l = Y, upColor: c = "var(--selec
|
|
|
5707
5707
|
{ label: "Fechamento", value: l(w.close) }
|
|
5708
5708
|
]
|
|
5709
5709
|
}),
|
|
5710
|
-
onMouseLeave:
|
|
5710
|
+
onMouseLeave: d.hide
|
|
5711
5711
|
}
|
|
5712
5712
|
)
|
|
5713
5713
|
] }, y);
|
|
5714
5714
|
})
|
|
5715
5715
|
] }),
|
|
5716
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5716
|
+
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
5717
5717
|
] });
|
|
5718
5718
|
}
|
|
5719
5719
|
function No({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
5720
|
-
const { ref: a, width: r } = ce(n),
|
|
5720
|
+
const { ref: a, width: r } = ce(n), i = X(), o = Ee, d = Math.max(0, r - o.left - o.right), u = n - o.top - o.bottom, h = o.top + u, f = ye(Math.max(1, ...t.map(($) => $.max))), g = ($) => h - $ / f * u, v = t.length, x = v ? d / v : 0, N = Math.min(x * 0.5, 40);
|
|
5721
5721
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
5722
5722
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
|
|
5723
5723
|
we(f).map(($, _) => /* @__PURE__ */ m("g", { children: [
|
|
@@ -5750,7 +5750,7 @@ function No({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5750
5750
|
width: x,
|
|
5751
5751
|
height: u,
|
|
5752
5752
|
fill: "transparent",
|
|
5753
|
-
onMouseEnter: () =>
|
|
5753
|
+
onMouseEnter: () => i.show({
|
|
5754
5754
|
x: p,
|
|
5755
5755
|
y: g($.max),
|
|
5756
5756
|
place: g($.max) < o.top + 76 ? "bottom" : "top",
|
|
@@ -5763,18 +5763,18 @@ function No({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
5763
5763
|
{ label: "Mín", value: l($.min) }
|
|
5764
5764
|
]
|
|
5765
5765
|
}),
|
|
5766
|
-
onMouseLeave:
|
|
5766
|
+
onMouseLeave: i.hide
|
|
5767
5767
|
}
|
|
5768
5768
|
)
|
|
5769
5769
|
] }, _);
|
|
5770
5770
|
})
|
|
5771
5771
|
] }),
|
|
5772
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5772
|
+
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
5773
5773
|
] });
|
|
5774
5774
|
}
|
|
5775
|
-
function Mo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a = 96, className: r, ...
|
|
5775
|
+
function Mo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a = 96, className: r, ...i }) {
|
|
5776
5776
|
const f = n ?? t.length * 36 + 6 + 26, { ref: g, width: v } = ce(f), x = X(), N = te(), $ = l ?? Math.min(0, ...t.map((L) => L.start)), p = (c ?? Math.max(1, ...t.map((L) => L.end))) - $ || 1, b = a, S = Math.max(0, v - b - 14), k = f - 6 - 26, M = t.length ? k / t.length : 0, w = Math.min(M * 0.6, 22), y = (L) => b + (L - $) / p * S, C = Array.from({ length: 5 }, (L, B) => $ + p * B / 4);
|
|
5777
|
-
return /* @__PURE__ */ m("div", { ...
|
|
5777
|
+
return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
|
|
5778
5778
|
v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
|
|
5779
5779
|
/* @__PURE__ */ e("defs", { children: t.map((L, B) => {
|
|
5780
5780
|
const A = L.color ?? j(B);
|
|
@@ -5827,10 +5827,10 @@ function Mo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a =
|
|
|
5827
5827
|
/* @__PURE__ */ e(K, { tip: x.tip })
|
|
5828
5828
|
] });
|
|
5829
5829
|
}
|
|
5830
|
-
const $o = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels: c = ["Seg", "", "Qua", "", "Sex", "", "Dom"], columnLabels: s, format: a = Y, cell: r = 14, gap:
|
|
5830
|
+
const $o = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels: c = ["Seg", "", "Qua", "", "Sex", "", "Dom"], columnLabels: s, format: a = Y, cell: r = 14, gap: i = 3, min: o, max: d, className: u, ...h }, f) {
|
|
5831
5831
|
const g = X();
|
|
5832
5832
|
te();
|
|
5833
|
-
const v = n.flat().filter((w) => w != null && Number.isFinite(w)), x = o ?? (v.length ? Math.min(...v) : 0), $ = (
|
|
5833
|
+
const v = n.flat().filter((w) => w != null && Number.isFinite(w)), x = o ?? (v.length ? Math.min(...v) : 0), $ = (d ?? (v.length ? Math.max(...v) : 1)) - x || 1, _ = 30, p = s ? 16 : 4, b = r + i, S = _ + n.length * b, k = p + 7 * b, M = { "--heat-color": l };
|
|
5834
5834
|
return /* @__PURE__ */ m("div", { ref: f, ...h, className: `select-chart-wrap select-calheat${u ? " " + u : ""}`, style: M, children: [
|
|
5835
5835
|
/* @__PURE__ */ m("svg", { width: S, height: k, className: "select-chart", children: [
|
|
5836
5836
|
c.map(
|
|
@@ -5871,9 +5871,9 @@ const $o = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
5871
5871
|
] }),
|
|
5872
5872
|
/* @__PURE__ */ e(K, { tip: g.tip })
|
|
5873
5873
|
] });
|
|
5874
|
-
}), ko = R(function({ segments: n, size: l = 200, format: c = Y, legend: s = !0, rose: a = !1, className: r, ...
|
|
5875
|
-
const
|
|
5876
|
-
return /* @__PURE__ */ m("div", { ref: o, ...
|
|
5874
|
+
}), ko = R(function({ segments: n, size: l = 200, format: c = Y, legend: s = !0, rose: a = !1, className: r, ...i }, o) {
|
|
5875
|
+
const d = X(), u = l / 2, h = l / 2, f = l / 2 - 2, g = n.length || 1, v = ye(Math.max(1, ...n.map(($) => $.value))), x = ($) => a ? Math.max(0, $) / v * f : Math.sqrt(Math.max(0, $) / v) * f, N = 360 / g;
|
|
5876
|
+
return /* @__PURE__ */ m("div", { ref: o, ...i, className: `select-donut-wrap${r ? " " + r : ""}`, children: [
|
|
5877
5877
|
/* @__PURE__ */ m("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: [
|
|
5878
5878
|
/* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5879
5879
|
[0.34, 0.67, 1].map(($, _) => /* @__PURE__ */ e("circle", { cx: u, cy: h, r: f * $, className: "select-chart__grid", fill: "none" }, _)),
|
|
@@ -5886,14 +5886,14 @@ const $o = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
5886
5886
|
fill: S,
|
|
5887
5887
|
fillOpacity: 0.8,
|
|
5888
5888
|
className: "select-chart__seg",
|
|
5889
|
-
onMouseEnter: () =>
|
|
5890
|
-
onMouseLeave:
|
|
5889
|
+
onMouseEnter: () => d.show({ x: w, y, place: y < h ? "top" : "bottom", title: $.label, rows: [{ label: "Valor", value: c($.value), color: S }] }),
|
|
5890
|
+
onMouseLeave: d.hide
|
|
5891
5891
|
},
|
|
5892
5892
|
_
|
|
5893
5893
|
);
|
|
5894
5894
|
})
|
|
5895
5895
|
] }),
|
|
5896
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5896
|
+
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
5897
5897
|
] }),
|
|
5898
5898
|
s && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: n.map(($, _) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
|
|
5899
5899
|
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: $.color ?? j(_) } }),
|
|
@@ -5903,8 +5903,8 @@ const $o = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
5903
5903
|
] });
|
|
5904
5904
|
});
|
|
5905
5905
|
function wo({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s = Y, className: a, ...r }) {
|
|
5906
|
-
const { ref:
|
|
5907
|
-
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref:
|
|
5906
|
+
const { ref: i, width: o } = ce(c), d = X(), u = { top: 24, right: 64, bottom: 12, left: 132 }, h = ye(Math.max(1, ...t.flatMap((N) => [N.left, N.right]))), f = c - u.top - u.bottom, g = (N) => u.top + f - N / h * f, v = u.left, x = o - u.right;
|
|
5907
|
+
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: i, children: [
|
|
5908
5908
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: c, className: "select-chart", children: [
|
|
5909
5909
|
/* @__PURE__ */ e("line", { x1: v, x2: v, y1: u.top, y2: u.top + f, className: "select-chart__axis" }),
|
|
5910
5910
|
/* @__PURE__ */ e("line", { x1: x, x2: x, y1: u.top, y2: u.top + f, className: "select-chart__axis" }),
|
|
@@ -5930,7 +5930,7 @@ function wo({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s =
|
|
|
5930
5930
|
width: Math.max(0, x - v),
|
|
5931
5931
|
height: Math.abs(b - p) + 12,
|
|
5932
5932
|
fill: "transparent",
|
|
5933
|
-
onMouseEnter: () =>
|
|
5933
|
+
onMouseEnter: () => d.show({
|
|
5934
5934
|
x: (v + x) / 2,
|
|
5935
5935
|
y: (p + b) / 2,
|
|
5936
5936
|
place: "top",
|
|
@@ -5940,18 +5940,18 @@ function wo({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s =
|
|
|
5940
5940
|
{ label: l ?? "Depois", value: s(N.right) }
|
|
5941
5941
|
]
|
|
5942
5942
|
}),
|
|
5943
|
-
onMouseLeave:
|
|
5943
|
+
onMouseLeave: d.hide
|
|
5944
5944
|
}
|
|
5945
5945
|
)
|
|
5946
5946
|
] }, $);
|
|
5947
5947
|
})
|
|
5948
5948
|
] }),
|
|
5949
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5949
|
+
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
5950
5950
|
] });
|
|
5951
5951
|
}
|
|
5952
|
-
function So({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel: s = "Depois", labelWidth: a = 96, className: r, ...
|
|
5952
|
+
function So({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel: s = "Depois", labelWidth: a = 96, className: r, ...i }) {
|
|
5953
5953
|
const f = n ?? t.length * 34 + 6 + 26, { ref: g, width: v } = ce(f), x = X(), N = "var(--select-chart-2)", $ = "var(--select-chart-1)", _ = ye(Math.max(1, ...t.flatMap((w) => [w.from, w.to]))), p = a, b = Math.max(0, v - p - 14), S = f - 6 - 26, k = t.length ? S / t.length : 0, M = (w) => p + w / _ * b;
|
|
5954
|
-
return /* @__PURE__ */ m("div", { ...
|
|
5954
|
+
return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
|
|
5955
5955
|
v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
|
|
5956
5956
|
we(_).map((w, y) => /* @__PURE__ */ m("g", { children: [
|
|
5957
5957
|
/* @__PURE__ */ e(
|
|
@@ -6002,17 +6002,17 @@ function So({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel
|
|
|
6002
6002
|
] });
|
|
6003
6003
|
}
|
|
6004
6004
|
function Co({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className: s, ...a }) {
|
|
6005
|
-
const { ref: r, width:
|
|
6005
|
+
const { ref: r, width: i } = ce(n), o = X(), d = { top: 6, right: 6, bottom: 24, left: 6 }, u = Math.max(0, i - d.left - d.right), h = 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 = [];
|
|
6006
6006
|
t.forEach((p) => p.segments.forEach((b) => {
|
|
6007
6007
|
v.includes(b.key) || v.push(b.key);
|
|
6008
6008
|
}));
|
|
6009
6009
|
const x = (p, b) => b ?? j(v.indexOf(p)), N = c * Math.max(0, t.length - 1), $ = Math.max(0, u - N);
|
|
6010
|
-
let _ =
|
|
6010
|
+
let _ = d.left;
|
|
6011
6011
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
6012
|
-
|
|
6012
|
+
i > 0 && /* @__PURE__ */ e("svg", { width: i, height: n, className: "select-chart", children: t.map((p, b) => {
|
|
6013
6013
|
const S = f[b] || 1, k = S / g * $, M = _;
|
|
6014
6014
|
_ += k + c;
|
|
6015
|
-
let w =
|
|
6015
|
+
let w = d.top;
|
|
6016
6016
|
return /* @__PURE__ */ m("g", { children: [
|
|
6017
6017
|
p.segments.map((y, C) => {
|
|
6018
6018
|
const L = y.value / S * h, B = w;
|
|
@@ -6031,7 +6031,7 @@ function Co({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className:
|
|
|
6031
6031
|
onMouseEnter: () => o.show({
|
|
6032
6032
|
x: M + k / 2,
|
|
6033
6033
|
y: B,
|
|
6034
|
-
place: B <
|
|
6034
|
+
place: B < d.top + 44 ? "bottom" : "top",
|
|
6035
6035
|
title: `${p.label} · ${y.key}`,
|
|
6036
6036
|
rows: [
|
|
6037
6037
|
{ label: "Valor", value: l(y.value), color: A },
|
|
@@ -6043,7 +6043,7 @@ function Co({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className:
|
|
|
6043
6043
|
C
|
|
6044
6044
|
);
|
|
6045
6045
|
}),
|
|
6046
|
-
/* @__PURE__ */ e("text", { x: M + k / 2, y: n -
|
|
6046
|
+
/* @__PURE__ */ e("text", { x: M + k / 2, y: n - d.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: p.label })
|
|
6047
6047
|
] }, b);
|
|
6048
6048
|
}) }),
|
|
6049
6049
|
/* @__PURE__ */ e("ul", { className: "select-donut__legend select-mekko__legend", children: v.map((p, b) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
|
|
@@ -6053,7 +6053,7 @@ function Co({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className:
|
|
|
6053
6053
|
/* @__PURE__ */ e(K, { tip: o.tip })
|
|
6054
6054
|
] });
|
|
6055
6055
|
}
|
|
6056
|
-
const Lo = R(function({ value: n, max: l = 100, bands: c, size: s = 220, thickness: a, label: r, format:
|
|
6056
|
+
const Lo = R(function({ value: n, max: l = 100, bands: c, size: s = 220, thickness: a, label: r, format: i = (h) => `${Math.round(h)}`, className: o, ...d }, u) {
|
|
6057
6057
|
const h = a ?? Math.max(10, Math.round(s * 0.08)), f = h / 2 + 2, g = s / 2 - f, v = s / 2, x = s / 2, N = x + f, $ = (L) => Math.max(0, Math.min(l, L)), _ = (L) => {
|
|
6058
6058
|
const B = Math.PI + L * Math.PI;
|
|
6059
6059
|
return [v + g * Math.cos(B), x + g * Math.sin(B)];
|
|
@@ -6066,20 +6066,20 @@ const Lo = R(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
|
|
|
6066
6066
|
const B = $(b) / l, A = $(L.upTo) / l;
|
|
6067
6067
|
return b = L.upTo, { t0: B, t1: A, color: L.color };
|
|
6068
6068
|
}), k = $(n) / l, M = Math.PI + k * Math.PI, w = g * 0.82, y = v + w * Math.cos(M), C = x + w * Math.sin(M);
|
|
6069
|
-
return /* @__PURE__ */ e("div", { ref: u, ...
|
|
6069
|
+
return /* @__PURE__ */ e("div", { ref: u, ...d, className: `select-gauge${o ? " " + o : ""}`, style: { width: `${s / 16}rem` }, children: /* @__PURE__ */ m("div", { className: "select-gauge__ring", style: { width: "100%", aspectRatio: `${s} / ${N}` }, children: [
|
|
6070
6070
|
/* @__PURE__ */ m("svg", { width: "100%", height: "100%", viewBox: `0 0 ${s} ${N}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
6071
6071
|
S.map((L, B) => /* @__PURE__ */ e("path", { d: p(L.t0, L.t1), fill: "none", stroke: L.color, strokeWidth: h, strokeLinecap: "butt" }, B)),
|
|
6072
6072
|
/* @__PURE__ */ e("line", { x1: v, y1: x, x2: y, y2: C, stroke: "var(--select-text)", strokeWidth: 3, strokeLinecap: "round", className: "select-gaugeband__needle" }),
|
|
6073
6073
|
/* @__PURE__ */ e("circle", { cx: v, cy: x, r: 5, fill: "var(--select-text)" })
|
|
6074
6074
|
] }),
|
|
6075
6075
|
/* @__PURE__ */ m("div", { className: "select-gauge__center", children: [
|
|
6076
|
-
/* @__PURE__ */ e("span", { className: "select-gauge__value", children:
|
|
6076
|
+
/* @__PURE__ */ e("span", { className: "select-gauge__value", children: i($(n)) }),
|
|
6077
6077
|
r != null && /* @__PURE__ */ e("span", { className: "select-gauge__label", children: r })
|
|
6078
6078
|
] })
|
|
6079
6079
|
] }) });
|
|
6080
6080
|
});
|
|
6081
6081
|
function Ao({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
|
|
6082
|
-
const { ref: r, width:
|
|
6082
|
+
const { ref: r, width: i } = ce(l), o = X(), d = te(), [u, h] = D(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((k, M) => t.reduce((w, y) => w + (y.data[M] ?? 0), 0)), $ = Math.max(1, ...N), _ = x / $, p = (k) => g.left + (f <= 1 ? v / 2 : k / (f - 1) * v), b = n.map(() => 0), S = t.map((k, M) => {
|
|
6083
6083
|
const w = [], y = [];
|
|
6084
6084
|
return n.forEach((C, L) => {
|
|
6085
6085
|
const A = g.top + (x - N[L] * _) / 2 + b[L] * _, F = A + (k.data[L] ?? 0) * _;
|
|
@@ -6087,12 +6087,12 @@ function Ao({ series: t, labels: n, height: l = 240, format: c = Y, className: s
|
|
|
6087
6087
|
}), { upper: w, lower: y, color: k.color ?? j(M), name: k.name };
|
|
6088
6088
|
});
|
|
6089
6089
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
6090
|
-
|
|
6091
|
-
/* @__PURE__ */ e("defs", { children: S.map((k, M) => /* @__PURE__ */ m("linearGradient", { id: `${
|
|
6090
|
+
i > 0 && /* @__PURE__ */ m("svg", { width: i, height: l, className: "select-chart", children: [
|
|
6091
|
+
/* @__PURE__ */ e("defs", { children: S.map((k, M) => /* @__PURE__ */ m("linearGradient", { id: `${d}-st${M}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
6092
6092
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: k.color, stopOpacity: 0.95 }),
|
|
6093
6093
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: k.color, stopOpacity: 0.6 })
|
|
6094
6094
|
] }, M)) }),
|
|
6095
|
-
S.map((k, M) => /* @__PURE__ */ e("path", { d: yl(k.upper, k.lower), fill: `url(#${
|
|
6095
|
+
S.map((k, M) => /* @__PURE__ */ e("path", { d: yl(k.upper, k.lower), fill: `url(#${d}-st${M})`, className: "select-chart__area" }, M)),
|
|
6096
6096
|
u != null && /* @__PURE__ */ e("line", { x1: p(u), x2: p(u), y1: g.top, y2: g.top + x, className: "select-chart__crosshair" }),
|
|
6097
6097
|
n.map(
|
|
6098
6098
|
(k, M) => M % Math.max(1, Math.ceil(f / 7)) === 0 || M === f - 1 ? /* @__PURE__ */ e("text", { x: p(M), y: l - g.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k }, M) : null
|
|
@@ -6124,13 +6124,13 @@ function Ao({ series: t, labels: n, height: l = 240, format: c = Y, className: s
|
|
|
6124
6124
|
/* @__PURE__ */ e(K, { tip: o.tip })
|
|
6125
6125
|
] });
|
|
6126
6126
|
}
|
|
6127
|
-
const Fo = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, className: a, ...r },
|
|
6128
|
-
const o = X(),
|
|
6127
|
+
const Fo = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, className: a, ...r }, i) {
|
|
6128
|
+
const o = X(), d = l / 2, u = l / 2, h = l / 2 - 2, f = h * 0.62, g = h * 0.32, v = n.map(($) => {
|
|
6129
6129
|
var _;
|
|
6130
6130
|
return (_ = $.children) != null && _.length ? $.children.reduce((p, b) => p + b.value, 0) : $.value ?? 0;
|
|
6131
6131
|
}), x = v.reduce(($, _) => $ + _, 0) || 1;
|
|
6132
6132
|
let N = 0;
|
|
6133
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
6133
|
+
return /* @__PURE__ */ m("div", { ref: i, ...r, className: `select-donut-wrap${a ? " " + a : ""}`, children: [
|
|
6134
6134
|
/* @__PURE__ */ m("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: [
|
|
6135
6135
|
/* @__PURE__ */ e("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart select-donut", "aria-hidden": "true", children: n.map(($, _) => {
|
|
6136
6136
|
const p = v[_], b = N / x * 360;
|
|
@@ -6141,10 +6141,10 @@ const Fo = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, c
|
|
|
6141
6141
|
/* @__PURE__ */ e(
|
|
6142
6142
|
"path",
|
|
6143
6143
|
{
|
|
6144
|
-
d: it(
|
|
6144
|
+
d: it(d, u, f, g, b + 0.6, Math.max(b + 0.7, S - 0.6)),
|
|
6145
6145
|
fill: k,
|
|
6146
6146
|
className: "select-chart__seg",
|
|
6147
|
-
onMouseEnter: () => o.show({ x:
|
|
6147
|
+
onMouseEnter: () => o.show({ x: d, y: u - f, place: u - f < 44 ? "bottom" : "top", title: $.label, rows: [{ label: "Total", value: c(p), color: k }] }),
|
|
6148
6148
|
onMouseLeave: o.hide
|
|
6149
6149
|
}
|
|
6150
6150
|
),
|
|
@@ -6155,12 +6155,12 @@ const Fo = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, c
|
|
|
6155
6155
|
return /* @__PURE__ */ e(
|
|
6156
6156
|
"path",
|
|
6157
6157
|
{
|
|
6158
|
-
d: it(
|
|
6158
|
+
d: it(d, u, h, f + 2, C + 0.5, Math.max(C + 0.6, L - 0.5)),
|
|
6159
6159
|
fill: B,
|
|
6160
6160
|
fillOpacity: A,
|
|
6161
6161
|
className: "select-chart__seg",
|
|
6162
6162
|
onMouseEnter: () => o.show({
|
|
6163
|
-
x:
|
|
6163
|
+
x: d + (h - 6) * Math.cos(F),
|
|
6164
6164
|
y: u + (h - 6) * Math.sin(F),
|
|
6165
6165
|
place: u + (h - 6) * Math.sin(F) < u ? "top" : "bottom",
|
|
6166
6166
|
title: `${$.label} · ${w.label}`,
|
|
@@ -6186,7 +6186,7 @@ const Fo = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, c
|
|
|
6186
6186
|
] });
|
|
6187
6187
|
});
|
|
6188
6188
|
function Bo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
6189
|
-
const { ref: a, width: r } = ce(n),
|
|
6189
|
+
const { ref: a, width: r } = ce(n), i = X(), o = Ee, d = Math.max(0, r - o.left - o.right), u = n - o.top - o.bottom, h = o.top + u, f = ye(Math.max(1, ...t.map((_) => _.max))), g = (_) => h - _ / f * u, v = t.length, x = v ? d / v : 0, N = Math.min(x * 0.42, 46), $ = Math.max(1, ...t.flatMap((_) => _.bins));
|
|
6190
6190
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
6191
6191
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
|
|
6192
6192
|
we(f).map((_, p) => /* @__PURE__ */ m("g", { children: [
|
|
@@ -6219,7 +6219,7 @@ function Bo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
6219
6219
|
width: x,
|
|
6220
6220
|
height: u,
|
|
6221
6221
|
fill: "transparent",
|
|
6222
|
-
onMouseEnter: () =>
|
|
6222
|
+
onMouseEnter: () => i.show({
|
|
6223
6223
|
x: b,
|
|
6224
6224
|
y: g(_.max),
|
|
6225
6225
|
place: g(_.max) < o.top + 64 ? "bottom" : "top",
|
|
@@ -6230,17 +6230,17 @@ function Bo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
6230
6230
|
{ label: "Mín", value: l(_.min) }
|
|
6231
6231
|
]
|
|
6232
6232
|
}),
|
|
6233
|
-
onMouseLeave:
|
|
6233
|
+
onMouseLeave: i.hide
|
|
6234
6234
|
}
|
|
6235
6235
|
)
|
|
6236
6236
|
] }, p);
|
|
6237
6237
|
})
|
|
6238
6238
|
] }),
|
|
6239
|
-
/* @__PURE__ */ e(K, { tip:
|
|
6239
|
+
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
6240
6240
|
] });
|
|
6241
6241
|
}
|
|
6242
|
-
const Eo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padAngle: a = 0.05, className: r, ...
|
|
6243
|
-
const
|
|
6242
|
+
const Eo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padAngle: a = 0.05, className: r, ...i }, o) {
|
|
6243
|
+
const d = X(), u = l.length, h = c / 2, f = c / 2, g = c / 2 - 22, v = g - 9, x = n.map((y) => y.reduce((C, L) => C + L, 0)), N = x.reduce((y, C) => y + C, 0) || 1, $ = (2 * Math.PI - u * a) / N, _ = [];
|
|
6244
6244
|
let p = 0;
|
|
6245
6245
|
for (let y = 0; y < u; y++) {
|
|
6246
6246
|
const C = p, L = p + x[y] * $;
|
|
@@ -6264,7 +6264,7 @@ const Eo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
|
|
|
6264
6264
|
const [L, B] = b[y][C], [A, F] = b[C][y];
|
|
6265
6265
|
w.push({ d: k(L, B, A, F), color: j(y), i: y, j: C, value: n[y][C] + n[C][y] });
|
|
6266
6266
|
}
|
|
6267
|
-
return /* @__PURE__ */ e("div", { ref: o, ...
|
|
6267
|
+
return /* @__PURE__ */ e("div", { ref: o, ...i, className: `select-donut-wrap${r ? " " + r : ""}`, children: /* @__PURE__ */ m("div", { className: "select-radial", style: { width: c, aspectRatio: "1" }, children: [
|
|
6268
6268
|
/* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
6269
6269
|
w.map((y, C) => /* @__PURE__ */ e(
|
|
6270
6270
|
"path",
|
|
@@ -6272,14 +6272,14 @@ const Eo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
|
|
|
6272
6272
|
d: y.d,
|
|
6273
6273
|
fill: y.color,
|
|
6274
6274
|
className: "select-chord__ribbon",
|
|
6275
|
-
onMouseEnter: () =>
|
|
6275
|
+
onMouseEnter: () => d.show({
|
|
6276
6276
|
x: h,
|
|
6277
6277
|
y: f,
|
|
6278
6278
|
place: "top",
|
|
6279
6279
|
title: `${l[y.i]} ↔ ${l[y.j]}`,
|
|
6280
6280
|
rows: [{ label: "Fluxo", value: s(y.value), color: y.color }]
|
|
6281
6281
|
}),
|
|
6282
|
-
onMouseLeave:
|
|
6282
|
+
onMouseLeave: d.hide
|
|
6283
6283
|
},
|
|
6284
6284
|
C
|
|
6285
6285
|
)),
|
|
@@ -6301,11 +6301,11 @@ const Eo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
|
|
|
6301
6301
|
] }, C);
|
|
6302
6302
|
})
|
|
6303
6303
|
] }),
|
|
6304
|
-
/* @__PURE__ */ e(K, { tip:
|
|
6304
|
+
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
6305
6305
|
] }) });
|
|
6306
6306
|
});
|
|
6307
|
-
function Io({ points: t, height: n = 240, radius: l = 16, color: c = "var(--select-chart-1)", xMax: s, yMax: a, format: r = Y, className:
|
|
6308
|
-
const { ref:
|
|
6307
|
+
function Io({ points: t, height: n = 240, radius: l = 16, color: c = "var(--select-chart-1)", xMax: s, yMax: a, format: r = Y, className: i, ...o }) {
|
|
6308
|
+
const { ref: d, width: u } = ce(n), h = X(), f = 12, g = Math.max(0, u - 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)), $ = (C) => f + C / x * g, _ = (C) => f + v - C / N * v, p = l, b = Math.sqrt(3), S = (C, L) => {
|
|
6309
6309
|
let B = C, A = L, F = -B - A, E = Math.round(B), T = Math.round(F), I = Math.round(A);
|
|
6310
6310
|
const O = Math.abs(E - B), W = Math.abs(T - F), Z = Math.abs(I - A);
|
|
6311
6311
|
return O > W && O > Z ? E = -T - I : W > Z ? T = -E - I : I = -E - T, [E, I];
|
|
@@ -6322,7 +6322,7 @@ function Io({ points: t, height: n = 240, radius: l = 16, color: c = "var(--sele
|
|
|
6322
6322
|
w.set(I, (w.get(I) ?? 0) + 1);
|
|
6323
6323
|
}
|
|
6324
6324
|
const y = Math.max(1, ...w.values());
|
|
6325
|
-
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${
|
|
6325
|
+
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${i ? " " + i : ""}`, ref: d, children: [
|
|
6326
6326
|
u > 0 && /* @__PURE__ */ e("svg", { width: u, height: n, className: "select-chart", children: [...w].map(([C, L]) => {
|
|
6327
6327
|
const [B, A] = C.split(",").map(Number), [F, E] = k(B, A), T = L / y, I = Math.round((0.16 + T * 0.84) * 100);
|
|
6328
6328
|
return /* @__PURE__ */ e(
|
|
@@ -6346,7 +6346,7 @@ function Io({ points: t, height: n = 240, radius: l = 16, color: c = "var(--sele
|
|
|
6346
6346
|
] });
|
|
6347
6347
|
}
|
|
6348
6348
|
const Po = R(function({ words: n, minSize: l = 14, maxSize: c = 46, className: s, ...a }, r) {
|
|
6349
|
-
const
|
|
6349
|
+
const i = n.map((f) => f.value), o = Math.max(1, ...i), d = Math.min(...i), u = o - d || 1, h = (f) => l + (f - d) / u * (c - l);
|
|
6350
6350
|
return /* @__PURE__ */ e("div", { ref: r, ...a, className: `select-wordcloud${s ? " " + s : ""}`, children: n.map((f, g) => /* @__PURE__ */ e(
|
|
6351
6351
|
"span",
|
|
6352
6352
|
{
|
|
@@ -6355,7 +6355,7 @@ const Po = R(function({ words: n, minSize: l = 14, maxSize: c = 46, className: s
|
|
|
6355
6355
|
style: {
|
|
6356
6356
|
fontSize: `${h(f.value)}px`,
|
|
6357
6357
|
color: f.color ?? j(g),
|
|
6358
|
-
opacity: 0.55 + (f.value -
|
|
6358
|
+
opacity: 0.55 + (f.value - d) / u * 0.45
|
|
6359
6359
|
},
|
|
6360
6360
|
children: f.text
|
|
6361
6361
|
},
|
|
@@ -6495,18 +6495,18 @@ function et(t, n) {
|
|
|
6495
6495
|
return [Math.cos(l) * Math.sin(c), Math.sin(l), Math.cos(l) * Math.cos(c)];
|
|
6496
6496
|
}
|
|
6497
6497
|
function bt([t, n, l], c, s) {
|
|
6498
|
-
const a = c * Lt, r = t * Math.cos(a) + l * Math.sin(a),
|
|
6499
|
-
return [r,
|
|
6498
|
+
const a = c * Lt, r = t * Math.cos(a) + l * Math.sin(a), i = -t * Math.sin(a) + l * Math.cos(a), o = s * Lt, d = n * Math.cos(o) - i * Math.sin(o), u = n * Math.sin(o) + i * Math.cos(o);
|
|
6499
|
+
return [r, d, u];
|
|
6500
6500
|
}
|
|
6501
6501
|
function En(t, n, l) {
|
|
6502
6502
|
let c = t[0] * n[0] + t[1] * n[1] + t[2] * n[2];
|
|
6503
6503
|
c = Math.max(-1, Math.min(1, c));
|
|
6504
6504
|
const s = Math.acos(c);
|
|
6505
6505
|
if (s < 1e-6) return t;
|
|
6506
|
-
const a = Math.sin(s), r = Math.sin((1 - l) * s) / a,
|
|
6507
|
-
return [t[0] * r + n[0] *
|
|
6506
|
+
const a = Math.sin(s), r = Math.sin((1 - l) * s) / a, i = Math.sin(l * s) / a;
|
|
6507
|
+
return [t[0] * r + n[0] * i, t[1] * r + n[1] * i, t[2] * r + n[2] * i];
|
|
6508
6508
|
}
|
|
6509
|
-
const In = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) < 1e-6, Ro = R(function({ points: n = [], arcs: l = [], size: c = 320, tilt: s = -18, spin: a = !0, speed: r = 7, color:
|
|
6509
|
+
const In = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) < 1e-6, Ro = R(function({ points: n = [], arcs: l = [], size: c = 320, tilt: s = -18, spin: a = !0, speed: r = 7, color: i = "var(--select-chart-1)", format: o = Y, legend: d = !0, map: u = !0, fluid: h = !1, onZoomChange: f, className: g, ...v }, x) {
|
|
6510
6510
|
var Fe;
|
|
6511
6511
|
const N = te(), $ = X(), _ = q(null), p = Ct(_, c), b = n.length ? n.reduce((P, V) => P + V.lng, 0) / n.length : 0, S = q(
|
|
6512
6512
|
typeof window < "u" && !!((Fe = window.matchMedia) != null && Fe.call(window, "(prefers-reduced-motion: reduce)").matches)
|
|
@@ -6623,7 +6623,7 @@ const In = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6623
6623
|
p: U,
|
|
6624
6624
|
vis: U.z > 0,
|
|
6625
6625
|
r: 3 + Math.max(0, P.value ?? 0) / Ce * 6,
|
|
6626
|
-
col: P.color ??
|
|
6626
|
+
col: P.color ?? i
|
|
6627
6627
|
};
|
|
6628
6628
|
}), Ne = O != null ? n[O] : null, Ie = 0.16, ke = l.map((P, V) => {
|
|
6629
6629
|
const U = et(P.from.lat, P.from.lng), re = et(P.to.lat, P.to.lng);
|
|
@@ -6633,8 +6633,8 @@ const In = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6633
6633
|
$l[2] > -0.05 ? (ee += `${se ? "L" : "M"}${cn.x.toFixed(1)},${cn.y.toFixed(1)}`, se = !0) : se = !1;
|
|
6634
6634
|
}
|
|
6635
6635
|
const ue = S.current ? 0.5 : (B.current * Ie + V * 0.27) % 1, _e = En(U, re, ue), je = 1 + 0.34 * Math.sin(Math.PI * ue), Pe = bt(_e, k.current.lng, k.current.lat), Je = z([_e[0] * je, _e[1] * je, _e[2] * je]), ln = Ne != null && (In(P.from, Ne) || In(P.to, Ne));
|
|
6636
|
-
return { d: ee, col: P.color ??
|
|
6637
|
-
}), Ue = Ne != null, He =
|
|
6636
|
+
return { d: ee, col: P.color ?? i, i: V, flow: { ...Je, vis: Pe[2] > 0 }, active: ln };
|
|
6637
|
+
}), Ue = Ne != null, He = d ? [...n].sort((P, V) => (V.value ?? 0) - (P.value ?? 0)).slice(0, 6) : [];
|
|
6638
6638
|
return /* @__PURE__ */ m("div", { ref: x, ...v, className: `select-globe${g ? " " + g : ""}`, children: [
|
|
6639
6639
|
/* @__PURE__ */ m(
|
|
6640
6640
|
"div",
|
|
@@ -6655,25 +6655,25 @@ const In = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6655
6655
|
/* @__PURE__ */ m("svg", { width: p, height: p, viewBox: `0 0 ${p} ${p}`, className: "select-chart", children: [
|
|
6656
6656
|
/* @__PURE__ */ m("defs", { children: [
|
|
6657
6657
|
/* @__PURE__ */ m("radialGradient", { id: `${N}-sphere`, cx: "35%", cy: "32%", r: "80%", children: [
|
|
6658
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
6659
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
6658
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: i, stopOpacity: 0.1 }),
|
|
6659
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: i, stopOpacity: 0.52 })
|
|
6660
6660
|
] }),
|
|
6661
6661
|
/* @__PURE__ */ m("radialGradient", { id: `${N}-glow`, cx: "35%", cy: "28%", r: "36%", children: [
|
|
6662
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
6663
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
6662
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: i, stopOpacity: 0.5 }),
|
|
6663
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: i, stopOpacity: 0 })
|
|
6664
6664
|
] }),
|
|
6665
6665
|
/* @__PURE__ */ m("radialGradient", { id: `${N}-spec`, cx: "35%", cy: "28%", r: "36%", children: [
|
|
6666
6666
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: "white", stopOpacity: 0.18 }),
|
|
6667
6667
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: "white", stopOpacity: 0 })
|
|
6668
6668
|
] }),
|
|
6669
6669
|
/* @__PURE__ */ m("radialGradient", { id: `${N}-atmo`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
6670
|
-
/* @__PURE__ */ e("stop", { offset: "68%", stopColor:
|
|
6671
|
-
/* @__PURE__ */ e("stop", { offset: "84%", stopColor:
|
|
6672
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
6670
|
+
/* @__PURE__ */ e("stop", { offset: "68%", stopColor: i, stopOpacity: 0 }),
|
|
6671
|
+
/* @__PURE__ */ e("stop", { offset: "84%", stopColor: i, stopOpacity: 0.3 }),
|
|
6672
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: i, stopOpacity: 0 })
|
|
6673
6673
|
] }),
|
|
6674
6674
|
/* @__PURE__ */ m("linearGradient", { id: `${N}-arc`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
6675
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
6676
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
6675
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: i, stopOpacity: 0.95 }),
|
|
6676
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: i, stopOpacity: 0.3 })
|
|
6677
6677
|
] }),
|
|
6678
6678
|
/* @__PURE__ */ e("clipPath", { id: `${N}-clip`, children: /* @__PURE__ */ e("circle", { cx: H, cy: Q, r: ne }) })
|
|
6679
6679
|
] }),
|
|
@@ -6685,7 +6685,7 @@ const In = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6685
6685
|
cy: Q,
|
|
6686
6686
|
r: ne,
|
|
6687
6687
|
fill: `url(#${N}-sphere)`,
|
|
6688
|
-
stroke: `color-mix(in srgb, ${
|
|
6688
|
+
stroke: `color-mix(in srgb, ${i} 40%, transparent)`,
|
|
6689
6689
|
strokeWidth: 1
|
|
6690
6690
|
}
|
|
6691
6691
|
),
|
|
@@ -6697,7 +6697,7 @@ const In = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6697
6697
|
{
|
|
6698
6698
|
d: he,
|
|
6699
6699
|
className: "select-globe__land",
|
|
6700
|
-
fill: `color-mix(in srgb, ${
|
|
6700
|
+
fill: `color-mix(in srgb, ${i} 38%, transparent)`
|
|
6701
6701
|
}
|
|
6702
6702
|
),
|
|
6703
6703
|
u && oe && /* @__PURE__ */ e(
|
|
@@ -6706,7 +6706,7 @@ const In = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6706
6706
|
d: oe,
|
|
6707
6707
|
className: "select-globe__coast",
|
|
6708
6708
|
fill: "none",
|
|
6709
|
-
stroke: `color-mix(in srgb, ${
|
|
6709
|
+
stroke: `color-mix(in srgb, ${i} 68%, transparent)`
|
|
6710
6710
|
}
|
|
6711
6711
|
),
|
|
6712
6712
|
pe.map((P, V) => /* @__PURE__ */ e("path", { d: $e(P), className: "select-globe__grid" }, `g${V}`)),
|
|
@@ -6721,7 +6721,7 @@ const In = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6721
6721
|
{
|
|
6722
6722
|
d: P.d,
|
|
6723
6723
|
className: "select-globe__arc",
|
|
6724
|
-
stroke: P.col ===
|
|
6724
|
+
stroke: P.col === i ? `url(#${N}-arc)` : P.col,
|
|
6725
6725
|
strokeWidth: P.active ? 2.5 : 1.75
|
|
6726
6726
|
}
|
|
6727
6727
|
),
|
|
@@ -6779,19 +6779,19 @@ const In = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6779
6779
|
}
|
|
6780
6780
|
),
|
|
6781
6781
|
He.length > 0 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: He.map((P, V) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
|
|
6782
|
-
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: P.color ??
|
|
6782
|
+
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: P.color ?? i } }),
|
|
6783
6783
|
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: P.label }),
|
|
6784
6784
|
P.value != null && /* @__PURE__ */ e("span", { className: "select-donut__legval", children: o(P.value) })
|
|
6785
6785
|
] }, V)) })
|
|
6786
6786
|
] });
|
|
6787
6787
|
});
|
|
6788
6788
|
function Do({ children: t, speed: n = 28, className: l, ...c }) {
|
|
6789
|
-
const s = q(null), a = q(null), r = q(null),
|
|
6789
|
+
const s = q(null), a = q(null), r = q(null), i = Ct(s, 0), o = Ct(r, 0), d = i > 0 && o > i + 1, u = q(0), h = q(null), f = q(!1);
|
|
6790
6790
|
le(() => {
|
|
6791
6791
|
var S;
|
|
6792
6792
|
const N = a.current;
|
|
6793
6793
|
if (!N) return;
|
|
6794
|
-
if (!
|
|
6794
|
+
if (!d) {
|
|
6795
6795
|
u.current = 0, N.style.transform = "";
|
|
6796
6796
|
return;
|
|
6797
6797
|
}
|
|
@@ -6802,9 +6802,9 @@ function Do({ children: t, speed: n = 28, className: l, ...c }) {
|
|
|
6802
6802
|
p = k, !h.current && !f.current && !$ && (u.current = (u.current + n * M) % Math.max(1, o)), N.style.transform = `translate3d(${(-u.current).toFixed(2)}px, 0, 0)`, _ = requestAnimationFrame(b);
|
|
6803
6803
|
};
|
|
6804
6804
|
return _ = requestAnimationFrame(b), () => cancelAnimationFrame(_);
|
|
6805
|
-
}, [
|
|
6805
|
+
}, [d, o, n]);
|
|
6806
6806
|
const g = (N) => {
|
|
6807
|
-
|
|
6807
|
+
d && (h.current = { id: N.pointerId, startX: N.clientX, startOff: u.current }, N.currentTarget.setPointerCapture(N.pointerId));
|
|
6808
6808
|
}, v = (N) => {
|
|
6809
6809
|
const $ = h.current;
|
|
6810
6810
|
if (!$ || N.pointerId !== $.id) return;
|
|
@@ -6819,7 +6819,7 @@ function Do({ children: t, speed: n = 28, className: l, ...c }) {
|
|
|
6819
6819
|
{
|
|
6820
6820
|
...c,
|
|
6821
6821
|
ref: s,
|
|
6822
|
-
className: `select-ticker${
|
|
6822
|
+
className: `select-ticker${d ? " is-sliding" : ""}${l ? " " + l : ""}`,
|
|
6823
6823
|
onPointerDown: g,
|
|
6824
6824
|
onPointerMove: v,
|
|
6825
6825
|
onPointerUp: x,
|
|
@@ -6828,19 +6828,19 @@ function Do({ children: t, speed: n = 28, className: l, ...c }) {
|
|
|
6828
6828
|
onPointerLeave: () => f.current = !1,
|
|
6829
6829
|
children: /* @__PURE__ */ m("div", { ref: a, className: "select-ticker__track", children: [
|
|
6830
6830
|
/* @__PURE__ */ e("div", { ref: r, className: "select-ticker__group", children: t }),
|
|
6831
|
-
|
|
6831
|
+
d && /* @__PURE__ */ e("div", { className: "select-ticker__group", "aria-hidden": "true", children: t })
|
|
6832
6832
|
] })
|
|
6833
6833
|
}
|
|
6834
6834
|
);
|
|
6835
6835
|
}
|
|
6836
6836
|
function To({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
6837
6837
|
var A;
|
|
6838
|
-
const { ref: a, width: r } = ce(n),
|
|
6838
|
+
const { ref: a, width: r } = ce(n), i = X(), o = te(), [d, u] = D(null), h = { ...Ee, right: 44 }, f = [...t].sort((F, E) => E.value - F.value), g = f.length, v = f.reduce((F, E) => F + E.value, 0) || 1;
|
|
6839
6839
|
let x = 0;
|
|
6840
6840
|
const N = f.map((F) => (x += F.value, x / v * 100)), $ = Math.max(0, r - h.left - h.right), _ = n - h.top - h.bottom, p = ye(((A = f[0]) == null ? void 0 : A.value) ?? 1), b = g > 0 ? $ / g : 0, S = Math.min(b * 0.62, 46), k = h.top + _, M = (F) => k - F / p * _, w = (F) => k - F / 100 * _, y = (F) => h.left + b * F + b / 2, C = N.map((F, E) => [y(E), w(F)]), L = j(0), B = j(1);
|
|
6841
6841
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
6842
6842
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", onMouseLeave: () => {
|
|
6843
|
-
u(null),
|
|
6843
|
+
u(null), i.hide();
|
|
6844
6844
|
}, children: [
|
|
6845
6845
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${o}-b`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
6846
6846
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: L, stopOpacity: 1 }),
|
|
@@ -6867,7 +6867,7 @@ function To({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
6867
6867
|
rx: 4,
|
|
6868
6868
|
fill: `url(#${o}-b)`,
|
|
6869
6869
|
className: "select-chart__bar",
|
|
6870
|
-
onMouseEnter: () =>
|
|
6870
|
+
onMouseEnter: () => i.show({
|
|
6871
6871
|
x: y(E),
|
|
6872
6872
|
y: T,
|
|
6873
6873
|
place: T < h.top + 40 ? "bottom" : "top",
|
|
@@ -6877,7 +6877,7 @@ function To({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
6877
6877
|
{ label: "Acumulado", value: `${N[E].toFixed(0)}%`, color: B }
|
|
6878
6878
|
]
|
|
6879
6879
|
}),
|
|
6880
|
-
onMouseLeave:
|
|
6880
|
+
onMouseLeave: i.hide
|
|
6881
6881
|
},
|
|
6882
6882
|
E
|
|
6883
6883
|
);
|
|
@@ -6888,30 +6888,30 @@ function To({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
6888
6888
|
{
|
|
6889
6889
|
cx: F[0],
|
|
6890
6890
|
cy: F[1],
|
|
6891
|
-
r:
|
|
6891
|
+
r: d === E ? 5 : 3.5,
|
|
6892
6892
|
fill: B,
|
|
6893
|
-
className: `select-chart__dot${
|
|
6893
|
+
className: `select-chart__dot${d === E ? " select-chart__dot--active" : ""}`,
|
|
6894
6894
|
onMouseEnter: () => u(E)
|
|
6895
6895
|
},
|
|
6896
6896
|
E
|
|
6897
6897
|
)),
|
|
6898
6898
|
f.map((F, E) => /* @__PURE__ */ e("text", { x: y(E), y: n - h.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: F.label }, E))
|
|
6899
6899
|
] }),
|
|
6900
|
-
/* @__PURE__ */ e(K, { tip:
|
|
6900
|
+
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
6901
6901
|
] });
|
|
6902
6902
|
}
|
|
6903
|
-
const Wo = R(function({ segments: n, cols: l = 10, rows: c = 10, format: s = Y, className: a, ...r },
|
|
6904
|
-
const o = n.reduce((x, N) => x + N.value, 0) || 1,
|
|
6903
|
+
const Wo = R(function({ segments: n, cols: l = 10, rows: c = 10, format: s = Y, className: a, ...r }, i) {
|
|
6904
|
+
const o = n.reduce((x, N) => x + N.value, 0) || 1, d = l * c, u = n.map((x) => x.value / o * d), h = u.map(Math.floor);
|
|
6905
6905
|
let f = h.reduce((x, N) => x + N, 0);
|
|
6906
6906
|
const g = u.map((x, N) => ({ i: N, frac: x - h[N] })).sort((x, N) => N.frac - x.frac);
|
|
6907
|
-
for (let x = 0; f <
|
|
6907
|
+
for (let x = 0; f < d && x < g.length; x++, f++) h[g[x].i]++;
|
|
6908
6908
|
const v = [];
|
|
6909
6909
|
for (n.forEach((x, N) => {
|
|
6910
6910
|
const $ = x.color ?? j(N);
|
|
6911
6911
|
for (let _ = 0; _ < h[N]; _++) v.push($);
|
|
6912
|
-
}); v.length <
|
|
6913
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
6914
|
-
/* @__PURE__ */ e("div", { className: "select-waffle", style: { gridTemplateColumns: `repeat(${l}, 1fr)` }, children: v.slice(0,
|
|
6912
|
+
}); v.length < d; ) v.push("var(--select-chart-track)");
|
|
6913
|
+
return /* @__PURE__ */ m("div", { ref: i, ...r, className: `select-waffle-wrap${a ? " " + a : ""}`, children: [
|
|
6914
|
+
/* @__PURE__ */ e("div", { className: "select-waffle", style: { gridTemplateColumns: `repeat(${l}, 1fr)` }, children: v.slice(0, d).map((x, N) => /* @__PURE__ */ e("span", { className: "select-waffle__cell", style: { background: x, animationDelay: `${N % l * 12 + Math.floor(N / l) * 12}ms` } }, N)) }),
|
|
6915
6915
|
/* @__PURE__ */ e("ul", { className: "select-donut__legend", children: n.map((x, N) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
|
|
6916
6916
|
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: x.color ?? j(N) } }),
|
|
6917
6917
|
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: x.label }),
|
|
@@ -6919,9 +6919,9 @@ const Wo = R(function({ segments: n, cols: l = 10, rows: c = 10, format: s = Y,
|
|
|
6919
6919
|
] }, N)) })
|
|
6920
6920
|
] });
|
|
6921
6921
|
});
|
|
6922
|
-
function Oo({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", height: c, format: s = Y, leftColor: a, rightColor: r, centerWidth:
|
|
6923
|
-
const u = c ?? Math.max(180, t.length * 40 + 36), { ref: h, width: f } = ce(u), g = X(), [v, x] = D(null), N = 8, $ = 26, _ = 8, p = Math.max(1, ...t.flatMap((L) => [L.left, L.right])), b = Math.max(0, (f -
|
|
6924
|
-
return /* @__PURE__ */ m("div", { ...
|
|
6922
|
+
function Oo({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", height: c, format: s = Y, leftColor: a, rightColor: r, centerWidth: i = 84, className: o, ...d }) {
|
|
6923
|
+
const u = c ?? Math.max(180, t.length * 40 + 36), { ref: h, width: f } = ce(u), g = X(), [v, x] = D(null), N = 8, $ = 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 ? (u - $ - _) / t.length : 0, k = Math.min(S * 0.6, 26), M = N + b, w = N + b + i, y = a ?? j(1), C = r ?? j(0);
|
|
6924
|
+
return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${o ? " " + o : ""}`, ref: h, children: [
|
|
6925
6925
|
f > 0 && /* @__PURE__ */ m("svg", { width: f, height: u, className: "select-chart", onMouseLeave: () => {
|
|
6926
6926
|
x(null), g.hide();
|
|
6927
6927
|
}, children: [
|
|
@@ -6974,27 +6974,27 @@ function Oo({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
6974
6974
|
] });
|
|
6975
6975
|
}
|
|
6976
6976
|
function Ho({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
|
|
6977
|
-
const { ref: r, width:
|
|
6977
|
+
const { ref: r, width: i } = ce(l), o = X(), [d, u] = D(null), h = { top: 16, right: 78, bottom: 28, left: 28 }, f = n.length, g = t.length, v = Math.max(0, i - h.left - h.right), x = l - h.top - h.bottom, N = t.map(() => new Array(f).fill(0));
|
|
6978
6978
|
for (let p = 0; p < f; p++)
|
|
6979
6979
|
t.map((S, k) => ({ si: k, v: S.data[p] ?? 0 })).sort((S, k) => k.v - S.v).forEach((S, k) => {
|
|
6980
6980
|
N[S.si][p] = k + 1;
|
|
6981
6981
|
});
|
|
6982
6982
|
const $ = (p) => h.left + (f <= 1 ? v / 2 : v / (f - 1) * p), _ = (p) => h.top + (g <= 1 ? x / 2 : x / (g - 1) * (p - 1));
|
|
6983
6983
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
6984
|
-
|
|
6984
|
+
i > 0 && /* @__PURE__ */ m("svg", { width: i, height: l, className: "select-chart", onMouseLeave: () => {
|
|
6985
6985
|
u(null), o.hide();
|
|
6986
6986
|
}, children: [
|
|
6987
6987
|
n.map((p, b) => /* @__PURE__ */ e("text", { x: $(b), y: l - h.bottom + 16, className: "select-chart__xlabel", textAnchor: b === 0 ? "start" : b === f - 1 ? "end" : "middle", children: p }, b)),
|
|
6988
6988
|
t.map((p, b) => {
|
|
6989
6989
|
const S = p.color ?? j(b), k = N[b].map((M, w) => [$(w), _(M)]);
|
|
6990
|
-
return /* @__PURE__ */ m("g", { style: { opacity:
|
|
6990
|
+
return /* @__PURE__ */ m("g", { style: { opacity: d === null || d === b ? 1 : 0.22 }, children: [
|
|
6991
6991
|
/* @__PURE__ */ e(
|
|
6992
6992
|
"path",
|
|
6993
6993
|
{
|
|
6994
6994
|
d: Ge(k),
|
|
6995
6995
|
fill: "none",
|
|
6996
6996
|
stroke: S,
|
|
6997
|
-
strokeWidth:
|
|
6997
|
+
strokeWidth: d === b ? 3.5 : 2.5,
|
|
6998
6998
|
strokeLinecap: "round",
|
|
6999
6999
|
style: { cursor: "pointer" },
|
|
7000
7000
|
onMouseEnter: () => u(b)
|
|
@@ -7005,7 +7005,7 @@ function Ho({ series: t, labels: n, height: l = 240, format: c = Y, className: s
|
|
|
7005
7005
|
{
|
|
7006
7006
|
cx: M[0],
|
|
7007
7007
|
cy: M[1],
|
|
7008
|
-
r:
|
|
7008
|
+
r: d === b ? 5.5 : 4,
|
|
7009
7009
|
fill: S,
|
|
7010
7010
|
className: "select-chart__dot",
|
|
7011
7011
|
onMouseEnter: () => {
|
|
@@ -7022,7 +7022,7 @@ function Ho({ series: t, labels: n, height: l = 240, format: c = Y, className: s
|
|
|
7022
7022
|
] });
|
|
7023
7023
|
}
|
|
7024
7024
|
function jo({ axes: t, data: n, height: l = 260, format: c = Y, className: s, ...a }) {
|
|
7025
|
-
const { ref: r, width:
|
|
7025
|
+
const { ref: r, width: i } = ce(l), o = X(), [d, u] = D(null), h = { top: 30, right: 28, bottom: 26, left: 28 }, f = Math.max(0, i - h.left - h.right), g = l - h.top - h.bottom, v = t.length, x = (_) => h.left + (v <= 1 ? f / 2 : f / (v - 1) * _), N = t.map((_) => {
|
|
7026
7026
|
const p = n.map((b) => b.values[_.key] ?? 0);
|
|
7027
7027
|
return { min: Math.min(...p), max: Math.max(...p) };
|
|
7028
7028
|
}), $ = (_, p) => {
|
|
@@ -7030,7 +7030,7 @@ function jo({ axes: t, data: n, height: l = 260, format: c = Y, className: s, ..
|
|
|
7030
7030
|
return h.top + g - S * g;
|
|
7031
7031
|
};
|
|
7032
7032
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
7033
|
-
|
|
7033
|
+
i > 0 && /* @__PURE__ */ m("svg", { width: i, height: l, className: "select-chart", onMouseLeave: () => {
|
|
7034
7034
|
u(null), o.hide();
|
|
7035
7035
|
}, children: [
|
|
7036
7036
|
t.map((_, p) => /* @__PURE__ */ m("g", { children: [
|
|
@@ -7047,10 +7047,10 @@ function jo({ axes: t, data: n, height: l = 260, format: c = Y, className: s, ..
|
|
|
7047
7047
|
d: S,
|
|
7048
7048
|
fill: "none",
|
|
7049
7049
|
stroke: b,
|
|
7050
|
-
strokeWidth:
|
|
7050
|
+
strokeWidth: d === p ? 3 : 1.75,
|
|
7051
7051
|
strokeLinecap: "round",
|
|
7052
7052
|
strokeLinejoin: "round",
|
|
7053
|
-
strokeOpacity:
|
|
7053
|
+
strokeOpacity: d === null || d === p ? 0.9 : 0.2,
|
|
7054
7054
|
style: { cursor: "pointer" },
|
|
7055
7055
|
onMouseEnter: () => {
|
|
7056
7056
|
u(p), o.show({
|
|
@@ -7079,7 +7079,7 @@ function Nl(t, n = 0) {
|
|
|
7079
7079
|
return !t.children || !t.children.length ? n : Math.max(...t.children.map((l) => Nl(l, n + 1)));
|
|
7080
7080
|
}
|
|
7081
7081
|
function Vo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
7082
|
-
const { ref: a, width: r } = ce(n),
|
|
7082
|
+
const { ref: a, width: r } = ce(n), i = X(), [o, d] = D(null), u = Nl(t), h = n / (u + 1), f = [], g = (v, x, N, $, _) => {
|
|
7083
7083
|
if (f.push({ node: v, x0: x, x1: N, depth: $, color: v.color ?? j(_), value: Mt(v) }), v.children && v.children.length) {
|
|
7084
7084
|
const p = v.children.reduce((S, k) => S + Mt(k), 0) || 1;
|
|
7085
7085
|
let b = x;
|
|
@@ -7091,7 +7091,7 @@ function Vo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
7091
7091
|
};
|
|
7092
7092
|
return r > 0 && g(t, 0, r, 0, 0), /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
7093
7093
|
r > 0 && /* @__PURE__ */ e("svg", { width: r, height: n, className: "select-chart", onMouseLeave: () => {
|
|
7094
|
-
|
|
7094
|
+
d(null), i.hide();
|
|
7095
7095
|
}, children: f.map((v) => {
|
|
7096
7096
|
const x = Math.max(0, v.x1 - v.x0 - 2), N = v.depth * h, $ = `${v.depth}-${v.x0.toFixed(1)}-${v.node.label}`;
|
|
7097
7097
|
return /* @__PURE__ */ m("g", { style: { opacity: o === null || o === $ ? 1 : 0.5 }, children: [
|
|
@@ -7109,21 +7109,21 @@ function Vo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
|
|
|
7109
7109
|
strokeOpacity: 0.5,
|
|
7110
7110
|
className: "select-icicle__cell",
|
|
7111
7111
|
onMouseEnter: () => {
|
|
7112
|
-
|
|
7112
|
+
d($), i.show({ x: (v.x0 + v.x1) / 2, y: N, place: N < 40 ? "bottom" : "top", title: v.node.label, rows: [{ label: "Valor", value: l(v.value), color: v.color }] });
|
|
7113
7113
|
},
|
|
7114
7114
|
onMouseLeave: () => {
|
|
7115
|
-
|
|
7115
|
+
d(null), i.hide();
|
|
7116
7116
|
}
|
|
7117
7117
|
}
|
|
7118
7118
|
),
|
|
7119
7119
|
x > 42 && h > 16 && /* @__PURE__ */ e("text", { x: v.x0 + 8, y: N + h / 2, className: "select-treemap__label", dominantBaseline: "middle", children: v.node.label })
|
|
7120
7120
|
] }, $);
|
|
7121
7121
|
}) }),
|
|
7122
|
-
/* @__PURE__ */ e(K, { tip:
|
|
7122
|
+
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
7123
7123
|
] });
|
|
7124
7124
|
}
|
|
7125
7125
|
function Zo({ data: t, height: n = 260, className: l, ...c }) {
|
|
7126
|
-
const { ref: s, width: a } = ce(n), r = X(), [
|
|
7126
|
+
const { ref: s, width: a } = ce(n), r = X(), [i, o] = D(null), d = { top: 14, right: 96, bottom: 14, left: 16 };
|
|
7127
7127
|
let u = null;
|
|
7128
7128
|
if (a > 0) {
|
|
7129
7129
|
const h = [];
|
|
@@ -7139,7 +7139,7 @@ function Zo({ data: t, height: n = 260, className: l, ...c }) {
|
|
|
7139
7139
|
return h.push(M), M;
|
|
7140
7140
|
};
|
|
7141
7141
|
v(t, 0, 0);
|
|
7142
|
-
const x = a -
|
|
7142
|
+
const x = a - d.left - d.right, N = n - d.top - d.bottom, $ = (p) => d.left + (g <= 0 ? 0 : x / g * p), _ = (p) => d.top + (f <= 1 ? N / 2 : N / (f - 1) * p);
|
|
7143
7143
|
u = /* @__PURE__ */ m("svg", { width: a, height: n, className: "select-chart", onMouseLeave: () => {
|
|
7144
7144
|
o(null), r.hide();
|
|
7145
7145
|
}, children: [
|
|
@@ -7155,13 +7155,13 @@ function Zo({ data: t, height: n = 260, className: l, ...c }) {
|
|
|
7155
7155
|
),
|
|
7156
7156
|
h.map((p, b) => {
|
|
7157
7157
|
const S = p.node.color ?? j(p.ci), k = $(p.depth), M = _(p.yUnit), w = !p.node.children || !p.node.children.length;
|
|
7158
|
-
return /* @__PURE__ */ m("g", { style: { opacity:
|
|
7158
|
+
return /* @__PURE__ */ m("g", { style: { opacity: i === null || i === b ? 1 : 0.4 }, children: [
|
|
7159
7159
|
/* @__PURE__ */ e(
|
|
7160
7160
|
"circle",
|
|
7161
7161
|
{
|
|
7162
7162
|
cx: k,
|
|
7163
7163
|
cy: M,
|
|
7164
|
-
r:
|
|
7164
|
+
r: i === b ? 6 : 4.5,
|
|
7165
7165
|
fill: S,
|
|
7166
7166
|
className: "select-tree__node",
|
|
7167
7167
|
onMouseEnter: () => {
|
|
@@ -7193,13 +7193,13 @@ function Zo({ data: t, height: n = 260, className: l, ...c }) {
|
|
|
7193
7193
|
] });
|
|
7194
7194
|
}
|
|
7195
7195
|
const Go = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
7196
|
-
const r = Math.min(3, n.length),
|
|
7197
|
-
[
|
|
7198
|
-
[
|
|
7196
|
+
const r = Math.min(3, n.length), i = l / 2, o = l / 2, d = Math.max(1, ...n.slice(0, r).map((g) => g.size)), u = l * 0.26, h = (g) => u * 0.45 + u * 0.55 * Math.sqrt(g.size / d), f = r <= 2 ? [
|
|
7197
|
+
[i - u * 0.42, o],
|
|
7198
|
+
[i + u * 0.42, o]
|
|
7199
7199
|
] : [
|
|
7200
|
-
[
|
|
7201
|
-
[
|
|
7202
|
-
[
|
|
7200
|
+
[i, o - u * 0.5],
|
|
7201
|
+
[i - u * 0.5, o + u * 0.36],
|
|
7202
|
+
[i + u * 0.5, o + u * 0.36]
|
|
7203
7203
|
];
|
|
7204
7204
|
return /* @__PURE__ */ m("div", { ref: a, ...s, className: `select-donut-wrap${c ? " " + c : ""}`, children: [
|
|
7205
7205
|
/* @__PURE__ */ e("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: /* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
@@ -7241,7 +7241,7 @@ const Go = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7241
7241
|
] }, v)) })
|
|
7242
7242
|
] });
|
|
7243
7243
|
}), Uo = R(function({ data: n, size: l = 260, format: c = Y, className: s, ...a }, r) {
|
|
7244
|
-
const
|
|
7244
|
+
const i = X(), [o, d] = D(null), u = Math.max(1, ...n.map((y) => y.value)), h = n.map((y, C) => ({ d: y, i: C, r: 8 + Math.sqrt(y.value / u) * 40 })).sort((y, C) => C.r - y.r), f = [];
|
|
7245
7245
|
for (const y of h) {
|
|
7246
7246
|
if (f.length === 0) {
|
|
7247
7247
|
f.push({ d: y.d, i: y.i, x: 0, y: 0, r: y.r });
|
|
@@ -7267,7 +7267,7 @@ const Go = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7267
7267
|
const g = Math.min(...f.map((y) => y.x - y.r)), v = Math.max(...f.map((y) => y.x + y.r)), x = Math.min(...f.map((y) => y.y - y.r)), N = Math.max(...f.map((y) => y.y + y.r)), $ = v - g || 1, _ = N - x || 1, p = 8, b = Math.min((l - p * 2) / $, (l - p * 2) / _), S = (l - $ * b) / 2 - g * b, k = (l - _ * b) / 2 - x * b, M = (y) => y * b + S, w = (y) => y * b + k;
|
|
7268
7268
|
return /* @__PURE__ */ m("div", { ref: r, ...a, className: `select-donut-wrap${s ? " " + s : ""}`, children: [
|
|
7269
7269
|
/* @__PURE__ */ e("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: /* @__PURE__ */ e("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", onMouseLeave: () => {
|
|
7270
|
-
|
|
7270
|
+
d(null), i.hide();
|
|
7271
7271
|
}, children: f.map((y) => {
|
|
7272
7272
|
const C = y.d.color ?? j(y.i), L = y.r * b;
|
|
7273
7273
|
return /* @__PURE__ */ m("g", { style: { opacity: o === null || o === y.i ? 1 : 0.5 }, children: [
|
|
@@ -7283,22 +7283,22 @@ const Go = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7283
7283
|
strokeWidth: 1.5,
|
|
7284
7284
|
className: "select-pack__circle",
|
|
7285
7285
|
onMouseEnter: () => {
|
|
7286
|
-
|
|
7286
|
+
d(y.i), i.show({ x: M(y.x), y: w(y.y) - L, place: w(y.y) - L < 40 ? "bottom" : "top", title: y.d.label, rows: [{ label: "Valor", value: c(y.d.value), color: C }] });
|
|
7287
7287
|
},
|
|
7288
7288
|
onMouseLeave: () => {
|
|
7289
|
-
|
|
7289
|
+
d(null), i.hide();
|
|
7290
7290
|
}
|
|
7291
7291
|
}
|
|
7292
7292
|
),
|
|
7293
7293
|
L > 18 && /* @__PURE__ */ e("text", { x: M(y.x), y: w(y.y), className: "select-chart__xlabel", textAnchor: "middle", dominantBaseline: "middle", style: { fontWeight: 600 }, children: y.d.label })
|
|
7294
7294
|
] }, y.i);
|
|
7295
7295
|
}) }) }),
|
|
7296
|
-
/* @__PURE__ */ e(K, { tip:
|
|
7296
|
+
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
7297
7297
|
] });
|
|
7298
7298
|
});
|
|
7299
7299
|
function qo({ nodes: t, links: n, height: l = 300, format: c = Y, className: s, ...a }) {
|
|
7300
|
-
const { ref: r, width:
|
|
7301
|
-
const v =
|
|
7300
|
+
const { ref: r, width: i } = ce(l), o = X(), [d, u] = D(null), h = xe(() => {
|
|
7301
|
+
const v = i || l, x = l, N = t.length, $ = /* @__PURE__ */ new Map();
|
|
7302
7302
|
if (!N) return $;
|
|
7303
7303
|
const _ = t.map((k, M) => ({
|
|
7304
7304
|
id: k.id,
|
|
@@ -7326,19 +7326,19 @@ function qo({ nodes: t, links: n, height: l = 300, format: c = Y, className: s,
|
|
|
7326
7326
|
S *= 0.97;
|
|
7327
7327
|
}
|
|
7328
7328
|
return _.forEach((k) => $.set(k.id, { x: k.x, y: k.y })), $;
|
|
7329
|
-
}, [t, n,
|
|
7329
|
+
}, [t, n, i, l]), f = /* @__PURE__ */ new Map();
|
|
7330
7330
|
n.forEach((v) => {
|
|
7331
7331
|
f.set(v.source, (f.get(v.source) ?? 0) + 1), f.set(v.target, (f.get(v.target) ?? 0) + 1);
|
|
7332
7332
|
});
|
|
7333
|
-
const g =
|
|
7333
|
+
const g = d ? new Set(n.filter((v) => v.source === d || v.target === d).flatMap((v) => [v.source, v.target])) : null;
|
|
7334
7334
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
7335
|
-
|
|
7335
|
+
i > 0 && /* @__PURE__ */ m("svg", { width: i, height: l, className: "select-chart", onMouseLeave: () => {
|
|
7336
7336
|
u(null), o.hide();
|
|
7337
7337
|
}, children: [
|
|
7338
7338
|
n.map((v, x) => {
|
|
7339
7339
|
const N = h.get(v.source), $ = h.get(v.target);
|
|
7340
7340
|
if (!N || !$) return null;
|
|
7341
|
-
const _ = !
|
|
7341
|
+
const _ = !d || v.source === d || v.target === d;
|
|
7342
7342
|
return /* @__PURE__ */ e(
|
|
7343
7343
|
"line",
|
|
7344
7344
|
{
|
|
@@ -7363,7 +7363,7 @@ function qo({ nodes: t, links: n, height: l = 300, format: c = Y, className: s,
|
|
|
7363
7363
|
{
|
|
7364
7364
|
cx: N.x,
|
|
7365
7365
|
cy: N.y,
|
|
7366
|
-
r:
|
|
7366
|
+
r: d === v.id ? _ + 2 : _,
|
|
7367
7367
|
fill: $,
|
|
7368
7368
|
className: "select-net__node",
|
|
7369
7369
|
onMouseEnter: () => {
|
|
@@ -7374,7 +7374,7 @@ function qo({ nodes: t, links: n, height: l = 300, format: c = Y, className: s,
|
|
|
7374
7374
|
}
|
|
7375
7375
|
}
|
|
7376
7376
|
),
|
|
7377
|
-
(
|
|
7377
|
+
(d === v.id || _ >= 9) && /* @__PURE__ */ e("text", { x: N.x, y: N.y - _ - 6, className: "select-chart__xlabel", textAnchor: "middle", children: v.label ?? v.id })
|
|
7378
7378
|
] }, v.id);
|
|
7379
7379
|
})
|
|
7380
7380
|
] }),
|
|
@@ -7385,7 +7385,7 @@ function Ts({ children: t }) {
|
|
|
7385
7385
|
const n = Et({ selector: ".select-combobox__option", y: 6, duration: 0.3, stagger: 0.03 });
|
|
7386
7386
|
return /* @__PURE__ */ e("div", { className: "select-combobox__list", ref: n, children: t });
|
|
7387
7387
|
}
|
|
7388
|
-
const Yo = R(function({ label: n, value: l, onChange: c, options: s, placeholder: a = "Selecionar…", searchPlaceholder: r = "Buscar…", labelAction:
|
|
7388
|
+
const Yo = R(function({ label: n, value: l, onChange: c, options: s, placeholder: a = "Selecionar…", searchPlaceholder: r = "Buscar…", labelAction: i, hint: o, error: d, emptyText: u = "Nenhum resultado", disabled: h, required: f, size: g = "md", searchable: v = !0, className: x, ...N }, $) {
|
|
7389
7389
|
const _ = te(), [p, b] = D(!1), [S, k] = D(""), M = s.find((B) => B.value === l), w = xe(() => {
|
|
7390
7390
|
const B = S.trim().toLowerCase();
|
|
7391
7391
|
return !v || !B ? s : s.filter((A) => {
|
|
@@ -7396,11 +7396,11 @@ const Yo = R(function({ label: n, value: l, onChange: c, options: s, placeholder
|
|
|
7396
7396
|
b(!1), k("");
|
|
7397
7397
|
}, C = (B) => {
|
|
7398
7398
|
c(B), y();
|
|
7399
|
-
}, L =
|
|
7399
|
+
}, L = d ? `${_}-err` : o ? `${_}-hint` : void 0;
|
|
7400
7400
|
return /* @__PURE__ */ m("div", { ref: $, ...N, className: `select-field${g === "sm" ? " select-field--sm" : ""}${x ? " " + x : ""}`, children: [
|
|
7401
7401
|
n && /* @__PURE__ */ m("div", { className: "select-field__labelrow", children: [
|
|
7402
7402
|
/* @__PURE__ */ e("label", { className: "select-field__label", htmlFor: _, children: n }),
|
|
7403
|
-
|
|
7403
|
+
i
|
|
7404
7404
|
] }),
|
|
7405
7405
|
/* @__PURE__ */ e("div", { className: "select-combobox", children: /* @__PURE__ */ e(
|
|
7406
7406
|
We,
|
|
@@ -7415,7 +7415,7 @@ const Yo = R(function({ label: n, value: l, onChange: c, options: s, placeholder
|
|
|
7415
7415
|
{
|
|
7416
7416
|
id: _,
|
|
7417
7417
|
type: "button",
|
|
7418
|
-
className: `select-combobox__trigger${
|
|
7418
|
+
className: `select-combobox__trigger${d ? " select-input--error" : ""}${p ? " is-open" : ""}`,
|
|
7419
7419
|
onClick: () => p ? y() : b(!0),
|
|
7420
7420
|
disabled: h,
|
|
7421
7421
|
"aria-haspopup": "listbox",
|
|
@@ -7465,7 +7465,7 @@ const Yo = R(function({ label: n, value: l, onChange: c, options: s, placeholder
|
|
|
7465
7465
|
] })
|
|
7466
7466
|
}
|
|
7467
7467
|
) }),
|
|
7468
|
-
|
|
7468
|
+
d ? /* @__PURE__ */ e("p", { id: `${_}-err`, className: "select-field__error", children: d }) : o ? /* @__PURE__ */ e("p", { id: `${_}-hint`, className: "select-field__hint", children: o }) : null
|
|
7469
7469
|
] });
|
|
7470
7470
|
}), Tt = [
|
|
7471
7471
|
{ value: "light", label: "Claro", icon: /* @__PURE__ */ e(Vl, {}) },
|
|
@@ -7477,17 +7477,17 @@ function zo(t) {
|
|
|
7477
7477
|
return t === "system" ? (n = window.matchMedia) != null && n.call(window, "(prefers-color-scheme: dark)").matches ? "dark" : "light" : t;
|
|
7478
7478
|
}
|
|
7479
7479
|
function Xo({ value: t, onChange: n, className: l, ...c }) {
|
|
7480
|
-
const [s, a] = D(!1), r = q(null),
|
|
7480
|
+
const [s, a] = D(!1), r = q(null), i = Tt.find((o) => o.value === t) ?? Tt[2];
|
|
7481
7481
|
return le(() => {
|
|
7482
7482
|
if (!s) return;
|
|
7483
|
-
const o = (
|
|
7484
|
-
r.current && !r.current.contains(
|
|
7483
|
+
const o = (d) => {
|
|
7484
|
+
r.current && !r.current.contains(d.target) && a(!1);
|
|
7485
7485
|
};
|
|
7486
7486
|
return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
|
|
7487
7487
|
}, [s]), /* @__PURE__ */ m("div", { ...c, className: `select-themeswitcher${l ? " " + l : ""}`, ref: r, children: [
|
|
7488
7488
|
/* @__PURE__ */ e(ls, { active: s, onClick: () => a((o) => !o), children: /* @__PURE__ */ m("span", { className: "select-themeswitcher__current", children: [
|
|
7489
|
-
|
|
7490
|
-
|
|
7489
|
+
i.icon,
|
|
7490
|
+
i.label
|
|
7491
7491
|
] }) }),
|
|
7492
7492
|
s && /* @__PURE__ */ e("div", { className: "select-themeswitcher__popover", children: /* @__PURE__ */ e(ts, { children: Tt.map((o) => /* @__PURE__ */ e(
|
|
7493
7493
|
ns,
|
|
@@ -7513,23 +7513,23 @@ function Ko({
|
|
|
7513
7513
|
const c = Et({ selector: ".select-detail", y: 8, duration: 0.45, stagger: 0.05, scroll: !0 });
|
|
7514
7514
|
return /* @__PURE__ */ e(Ml.Provider, { value: l, children: /* @__PURE__ */ e("div", { className: `select-detaillist${n ? " select-detaillist--stacked" : ""}`, ref: c, children: t }) });
|
|
7515
7515
|
}
|
|
7516
|
-
const Jo = R(function({ label: n, children: l, action: c, align: s = "center", loading: a, className: r, ...
|
|
7517
|
-
const
|
|
7518
|
-
return /* @__PURE__ */ m("div", { ref: o, ...
|
|
7516
|
+
const Jo = R(function({ label: n, children: l, action: c, align: s = "center", loading: a, className: r, ...i }, o) {
|
|
7517
|
+
const d = qt(Ml), u = a ?? d;
|
|
7518
|
+
return /* @__PURE__ */ m("div", { ref: o, ...i, className: `select-detail select-detail--${s}${r ? " " + r : ""}`, children: [
|
|
7519
7519
|
/* @__PURE__ */ e("div", { className: "select-detail__label", children: n }),
|
|
7520
7520
|
/* @__PURE__ */ e("div", { className: "select-detail__value", children: u ? /* @__PURE__ */ e("span", { className: "select-skeleton select-detail__skel" }) : l }),
|
|
7521
7521
|
c && /* @__PURE__ */ e("div", { className: "select-detail__action", children: c })
|
|
7522
7522
|
] });
|
|
7523
7523
|
}), Qo = R(function({ steps: n, current: l, onSelect: c, className: s, ...a }, r) {
|
|
7524
|
-
return /* @__PURE__ */ e("ol", { ref: r, ...a, className: `select-steps${s ? " " + s : ""}`, children: n.map((
|
|
7525
|
-
const
|
|
7526
|
-
/* @__PURE__ */ e("span", { className: "select-steps__num", "aria-hidden": "true", children:
|
|
7527
|
-
/* @__PURE__ */ e("span", { className: "select-steps__label", children:
|
|
7524
|
+
return /* @__PURE__ */ e("ol", { ref: r, ...a, className: `select-steps${s ? " " + s : ""}`, children: n.map((i, o) => {
|
|
7525
|
+
const d = o < l ? "done" : o === l ? "current" : "todo", u = !!c && o < l, h = /* @__PURE__ */ m(ae, { children: [
|
|
7526
|
+
/* @__PURE__ */ e("span", { className: "select-steps__num", "aria-hidden": "true", children: d === "done" ? /* @__PURE__ */ e(Ae, {}) : o + 1 }),
|
|
7527
|
+
/* @__PURE__ */ e("span", { className: "select-steps__label", children: i })
|
|
7528
7528
|
] });
|
|
7529
|
-
return /* @__PURE__ */ e("li", { className: `select-steps__step select-steps__step--${
|
|
7529
|
+
return /* @__PURE__ */ e("li", { className: `select-steps__step select-steps__step--${d}`, "aria-current": d === "current" ? "step" : void 0, children: u ? /* @__PURE__ */ e("button", { type: "button", className: "select-steps__btn", onClick: () => c(o), children: h }) : h }, o);
|
|
7530
7530
|
}) });
|
|
7531
|
-
}), er = R(function({ name: n, price: l, priceSuffix: c, headerAction: s, summary: a, cta: r, featuresTitle:
|
|
7532
|
-
return /* @__PURE__ */ m("div", { ref: f, ...h, className: `select-plan${
|
|
7531
|
+
}), er = R(function({ name: n, price: l, priceSuffix: c, headerAction: s, summary: a, cta: r, featuresTitle: i, features: o, featured: d = !1, className: u, ...h }, f) {
|
|
7532
|
+
return /* @__PURE__ */ m("div", { ref: f, ...h, className: `select-plan${d ? " select-plan--featured" : ""}${u ? " " + u : ""}`, children: [
|
|
7533
7533
|
/* @__PURE__ */ m("div", { className: "select-plan__top", children: [
|
|
7534
7534
|
/* @__PURE__ */ m("div", { className: "select-plan__head", children: [
|
|
7535
7535
|
/* @__PURE__ */ e("h3", { className: "select-plan__name", children: n }),
|
|
@@ -7543,15 +7543,15 @@ const Jo = R(function({ label: n, children: l, action: c, align: s = "center", l
|
|
|
7543
7543
|
r && /* @__PURE__ */ e("div", { className: "select-plan__cta", children: r })
|
|
7544
7544
|
] }),
|
|
7545
7545
|
o && o.length > 0 && /* @__PURE__ */ m("div", { className: "select-plan__features", children: [
|
|
7546
|
-
|
|
7546
|
+
i && /* @__PURE__ */ e("p", { className: "select-plan__featurestitle", children: i }),
|
|
7547
7547
|
/* @__PURE__ */ e("ul", { className: "select-plan__list", children: o.map((g, v) => /* @__PURE__ */ m("li", { className: "select-plan__feature", children: [
|
|
7548
7548
|
/* @__PURE__ */ e("span", { className: "select-plan__check", "aria-hidden": "true", children: /* @__PURE__ */ e(ql, {}) }),
|
|
7549
7549
|
/* @__PURE__ */ e("span", { children: g })
|
|
7550
7550
|
] }, v)) })
|
|
7551
7551
|
] })
|
|
7552
7552
|
] });
|
|
7553
|
-
}), tr = R(function({ title: n, description: l, headerAction: c, footer: s, children: a, className: r, ...
|
|
7554
|
-
return /* @__PURE__ */ m("div", { ref: o, ...
|
|
7553
|
+
}), tr = R(function({ title: n, description: l, headerAction: c, footer: s, children: a, className: r, ...i }, o) {
|
|
7554
|
+
return /* @__PURE__ */ m("div", { ref: o, ...i, className: `select-listcard${r ? " " + r : ""}`, children: [
|
|
7555
7555
|
(n || c) && /* @__PURE__ */ m("div", { className: "select-listcard__head", children: [
|
|
7556
7556
|
/* @__PURE__ */ m("div", { className: "select-listcard__heading", children: [
|
|
7557
7557
|
n && /* @__PURE__ */ e("h3", { className: "select-listcard__title", children: n }),
|
|
@@ -7578,12 +7578,12 @@ function nr({
|
|
|
7578
7578
|
l && /* @__PURE__ */ e("span", { className: "select-listrow__secondary", children: l })
|
|
7579
7579
|
] }),
|
|
7580
7580
|
c && /* @__PURE__ */ e("span", { className: "select-listrow__action", children: c })
|
|
7581
|
-
] }),
|
|
7582
|
-
return a ? /* @__PURE__ */ e("button", { type: "button", className: `${
|
|
7581
|
+
] }), i = `select-listrow${s ? " select-listrow--muted" : ""}`;
|
|
7582
|
+
return a ? /* @__PURE__ */ e("button", { type: "button", className: `${i} select-listrow--clickable`, onClick: a, children: r }) : /* @__PURE__ */ e("div", { className: i, children: r });
|
|
7583
7583
|
}
|
|
7584
7584
|
const Pn = R(function({ src: n, alt: l = "", size: c = 40, className: s, ...a }, r) {
|
|
7585
|
-
const [
|
|
7586
|
-
return le(() => o(!1), [n]), /* @__PURE__ */ e("span", { ref: r, ...a, className: `select-thumb${s ? " " + s : ""}`, style: { width: c, height: c }, children: n && !
|
|
7585
|
+
const [i, o] = D(!1);
|
|
7586
|
+
return le(() => o(!1), [n]), /* @__PURE__ */ e("span", { ref: r, ...a, className: `select-thumb${s ? " " + s : ""}`, style: { width: c, height: c }, children: n && !i ? /* @__PURE__ */ e(
|
|
7587
7587
|
"img",
|
|
7588
7588
|
{
|
|
7589
7589
|
src: n,
|
|
@@ -7668,9 +7668,9 @@ function Os(t) {
|
|
|
7668
7668
|
value: l == null ? "" : String(l)
|
|
7669
7669
|
})) : [];
|
|
7670
7670
|
}
|
|
7671
|
-
const ar = R(function({ pairs: n, onChange: l, keyPlaceholder: c = "Chave", valuePlaceholder: s = "Valor", keyOptions: a, addLabel: r = "Adicionar", max:
|
|
7672
|
-
const f = Os(n), g = ($, _) => l(f.map((p, b) => b === $ ? { ...p, ..._ } : p)), v = ($) => l(f.filter((_, p) => p !== $)), x = () => l([...f, { name: "", value: "" }]), N =
|
|
7673
|
-
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-kv${
|
|
7671
|
+
const ar = R(function({ pairs: n, onChange: l, keyPlaceholder: c = "Chave", valuePlaceholder: s = "Valor", keyOptions: a, addLabel: r = "Adicionar", max: i, helpText: o = "Linhas vazias serão ignoradas.", className: d, ...u }, h) {
|
|
7672
|
+
const f = Os(n), g = ($, _) => l(f.map((p, b) => b === $ ? { ...p, ..._ } : p)), v = ($) => l(f.filter((_, p) => p !== $)), x = () => l([...f, { name: "", value: "" }]), N = i == null || f.length < i;
|
|
7673
|
+
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-kv${d ? " " + d : ""}`, children: [
|
|
7674
7674
|
f.map(($, _) => /* @__PURE__ */ m("div", { className: "select-kv__row", children: [
|
|
7675
7675
|
/* @__PURE__ */ e("div", { className: "select-kv__field", children: a ? /* @__PURE__ */ e(
|
|
7676
7676
|
jt,
|
|
@@ -7786,7 +7786,7 @@ function Gs(t) {
|
|
|
7786
7786
|
const l = n < 12 ? "AM" : "PM";
|
|
7787
7787
|
return n = n % 12 || 12, `${n} : ${String(t.getMinutes()).padStart(2, "0")} ${l}`;
|
|
7788
7788
|
}
|
|
7789
|
-
const Us = R(function({ value: n, presets: l = js, onApply: c, onCancel: s, accentVar: a, locale: r = "en-US", showTime:
|
|
7789
|
+
const Us = R(function({ value: n, presets: l = js, onApply: c, onCancel: s, accentVar: a, locale: r = "en-US", showTime: i = !0, maxDate: o, embedded: d = !1, className: u, ...h }, f) {
|
|
7790
7790
|
const g = Hs[r], v = Re(/* @__PURE__ */ new Date()), x = o ? Re(o) : null, [N, $] = D(n ?? { from: v, to: v }), [_, p] = D(xt((n == null ? void 0 : n.from) ?? /* @__PURE__ */ new Date())), [b, S] = D(null), k = At(xt(_), -xt(_).getDay()), M = Array.from({ length: 42 }, (A, F) => At(k, F)), w = (A) => x ? Re(A) > x : !1, y = (A) => A ? g.formatDate(A) : /* @__PURE__ */ e("span", { className: "select-datepicker__placeholder", children: "— / — / ——" }), C = (A) => {
|
|
7791
7791
|
w(A) || (S(null), $((F) => !F.from || F.from && F.to ? { from: A, to: null } : A < Re(F.from) ? { from: A, to: null } : { from: F.from, to: A }));
|
|
7792
7792
|
}, L = (A) => {
|
|
@@ -7794,7 +7794,7 @@ const Us = R(function({ value: n, presets: l = js, onApply: c, onCancel: s, acce
|
|
|
7794
7794
|
const F = A.range();
|
|
7795
7795
|
$(F), S(A.id), F.from && p(xt(F.from));
|
|
7796
7796
|
}, B = a ? { "--select-dp-accent": `var(${a})` } : void 0;
|
|
7797
|
-
return /* @__PURE__ */ e("div", { ref: f, ...h, className: `select select-datepicker${
|
|
7797
|
+
return /* @__PURE__ */ e("div", { ref: f, ...h, className: `select select-datepicker${d ? " select-datepicker--bare" : ""}${u ? " " + u : ""}`, style: B, children: /* @__PURE__ */ m("div", { className: "select-datepicker__body", children: [
|
|
7798
7798
|
/* @__PURE__ */ e("div", { className: "select-datepicker__presets", role: "listbox", "aria-label": "Intervalos", children: l.map((A) => {
|
|
7799
7799
|
const F = b === A.id;
|
|
7800
7800
|
return /* @__PURE__ */ m(
|
|
@@ -7818,7 +7818,7 @@ const Us = R(function({ value: n, presets: l = js, onApply: c, onCancel: s, acce
|
|
|
7818
7818
|
/* @__PURE__ */ e("div", { className: "select-datepicker__fields", children: ["from", "to"].map((A) => /* @__PURE__ */ m("div", { className: "select-datepicker__fieldrow", children: [
|
|
7819
7819
|
/* @__PURE__ */ e("span", { className: "select-datepicker__fieldlabel", children: A === "from" ? g.from : g.to }),
|
|
7820
7820
|
/* @__PURE__ */ e("span", { className: "select-datepicker__pill select-datepicker__pill--date", children: y(N[A]) }),
|
|
7821
|
-
|
|
7821
|
+
i && /* @__PURE__ */ e("span", { className: "select-datepicker__pill select-datepicker__pill--time", children: Gs(N[A]) })
|
|
7822
7822
|
] }, A)) }),
|
|
7823
7823
|
/* @__PURE__ */ m("div", { className: "select-datepicker__calhead", children: [
|
|
7824
7824
|
/* @__PURE__ */ e(
|
|
@@ -7877,14 +7877,14 @@ function or({
|
|
|
7877
7877
|
placement: s = "bottom-end",
|
|
7878
7878
|
size: a = "md",
|
|
7879
7879
|
disabled: r = !1,
|
|
7880
|
-
block:
|
|
7880
|
+
block: i = !1
|
|
7881
7881
|
}) {
|
|
7882
|
-
const [o,
|
|
7882
|
+
const [o, d] = D(!1), u = c === null ? null : c ?? Wt(/* @__PURE__ */ new Date());
|
|
7883
7883
|
return /* @__PURE__ */ e(
|
|
7884
7884
|
We,
|
|
7885
7885
|
{
|
|
7886
7886
|
active: o,
|
|
7887
|
-
onClose: () =>
|
|
7887
|
+
onClose: () => d(!1),
|
|
7888
7888
|
placement: s,
|
|
7889
7889
|
role: "dialog",
|
|
7890
7890
|
activator: /* @__PURE__ */ e(
|
|
@@ -7892,11 +7892,11 @@ function or({
|
|
|
7892
7892
|
{
|
|
7893
7893
|
variant: "secondary",
|
|
7894
7894
|
size: a,
|
|
7895
|
-
inline: !
|
|
7895
|
+
inline: !i,
|
|
7896
7896
|
disabled: r,
|
|
7897
7897
|
icon: /* @__PURE__ */ e(Gn, {}),
|
|
7898
7898
|
trailingIcon: /* @__PURE__ */ e(be, {}),
|
|
7899
|
-
onClick: () =>
|
|
7899
|
+
onClick: () => d((h) => !h),
|
|
7900
7900
|
children: qs(t, l)
|
|
7901
7901
|
}
|
|
7902
7902
|
),
|
|
@@ -7909,9 +7909,9 @@ function or({
|
|
|
7909
7909
|
presets: l,
|
|
7910
7910
|
maxDate: u,
|
|
7911
7911
|
value: { from: t.start, to: t.end },
|
|
7912
|
-
onCancel: () =>
|
|
7912
|
+
onCancel: () => d(!1),
|
|
7913
7913
|
onApply: (h) => {
|
|
7914
|
-
h.from && n({ start: Wt(h.from), end: Wt(h.to ?? h.from) }),
|
|
7914
|
+
h.from && n({ start: Wt(h.from), end: Wt(h.to ?? h.from) }), d(!1);
|
|
7915
7915
|
}
|
|
7916
7916
|
}
|
|
7917
7917
|
)
|
|
@@ -7927,9 +7927,9 @@ function Ys({ size: t }) {
|
|
|
7927
7927
|
}
|
|
7928
7928
|
) });
|
|
7929
7929
|
}
|
|
7930
|
-
const rr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label: a, disabled: r = !1, className:
|
|
7930
|
+
const rr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label: a, disabled: r = !1, className: i, ...o }, d) {
|
|
7931
7931
|
const u = !!c && !r, [h, f] = D(null), g = h ?? n;
|
|
7932
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
7932
|
+
return /* @__PURE__ */ e("div", { ref: d, ...o, className: `select-rating${u ? " select-rating--interactive" : ""}${i ? " " + i : ""}`, role: u ? "slider" : "img", "aria-label": a ?? `Avaliação ${n} de ${l}`, "aria-valuenow": u ? n : void 0, "aria-valuemin": u ? 0 : void 0, "aria-valuemax": u ? l : void 0, onMouseLeave: () => u && f(null), children: Array.from({ length: l }, (v, x) => {
|
|
7933
7933
|
const N = x < g, $ = /* @__PURE__ */ e("span", { className: `select-rating__star${N ? " is-filled" : ""}`, children: /* @__PURE__ */ e(Ys, { size: s }) });
|
|
7934
7934
|
return u ? /* @__PURE__ */ e(
|
|
7935
7935
|
"button",
|
|
@@ -7946,15 +7946,15 @@ const rr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
|
|
|
7946
7946
|
x
|
|
7947
7947
|
) : /* @__PURE__ */ e("span", { children: $ }, x);
|
|
7948
7948
|
}) });
|
|
7949
|
-
}), ir = R(function({ label: n, value: l, onChange: c, min: s, max: a, step: r = 1, decimal:
|
|
7950
|
-
const $ = te(), _ = (F) => Math.min(a ?? 1 / 0, Math.max(s ?? -1 / 0, F)), p = (F) => Math.round(F * 1e6) / 1e6, b = l ?? 0, S = s != null && b <= s, k = a != null && b >= a, [M, w] = D(!1), [y, C] = D(""), L =
|
|
7951
|
-
const E =
|
|
7952
|
-
if (
|
|
7949
|
+
}), ir = R(function({ label: n, value: l, onChange: c, min: s, max: a, step: r = 1, decimal: i = !1, disabled: o = !1, hint: d, error: u, onBlur: h, placeholder: f, size: g = "md", className: v, ...x }, N) {
|
|
7950
|
+
const $ = te(), _ = (F) => Math.min(a ?? 1 / 0, Math.max(s ?? -1 / 0, F)), p = (F) => Math.round(F * 1e6) / 1e6, b = l ?? 0, S = s != null && b <= s, k = a != null && b >= a, [M, w] = D(!1), [y, C] = D(""), L = i && M ? y : l == null ? "" : String(l), B = (F) => {
|
|
7951
|
+
const E = i ? F.replace(/[^\d.,-]/g, "").replace(",", ".") : F.replace(/[^\d-]/g, "");
|
|
7952
|
+
if (i && C(E), E === "" || E === "-" || E === ".") return c(null);
|
|
7953
7953
|
const T = Number(E);
|
|
7954
7954
|
Number.isFinite(T) && c(_(T));
|
|
7955
7955
|
}, A = (F) => {
|
|
7956
7956
|
const E = _(p(b + F));
|
|
7957
|
-
|
|
7957
|
+
i && C(String(E)), c(E);
|
|
7958
7958
|
};
|
|
7959
7959
|
return /* @__PURE__ */ m("div", { ref: N, ...x, className: `select-field${g === "sm" ? " select-field--sm" : ""}${v ? " " + v : ""}`, children: [
|
|
7960
7960
|
n && /* @__PURE__ */ e(lt, { htmlFor: $, label: n }),
|
|
@@ -7976,7 +7976,7 @@ const rr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
|
|
|
7976
7976
|
id: $,
|
|
7977
7977
|
className: `select-input select-numfield__input${u ? " select-input--error" : ""}`,
|
|
7978
7978
|
type: "text",
|
|
7979
|
-
inputMode:
|
|
7979
|
+
inputMode: i ? "decimal" : "numeric",
|
|
7980
7980
|
autoComplete: "off",
|
|
7981
7981
|
disabled: o,
|
|
7982
7982
|
placeholder: f,
|
|
@@ -8003,7 +8003,7 @@ const rr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
|
|
|
8003
8003
|
}
|
|
8004
8004
|
)
|
|
8005
8005
|
] }),
|
|
8006
|
-
u ? /* @__PURE__ */ e("p", { className: "select-field__error", children: u }) :
|
|
8006
|
+
u ? /* @__PURE__ */ e("p", { className: "select-field__error", children: u }) : d ? /* @__PURE__ */ e("p", { className: "select-field__hint", children: d }) : null
|
|
8007
8007
|
] });
|
|
8008
8008
|
});
|
|
8009
8009
|
function dr({
|
|
@@ -8014,13 +8014,13 @@ function dr({
|
|
|
8014
8014
|
addLabel: s = "Adicionar",
|
|
8015
8015
|
rowLabel: a,
|
|
8016
8016
|
min: r = 0,
|
|
8017
|
-
max:
|
|
8017
|
+
max: i,
|
|
8018
8018
|
reorderable: o = !1,
|
|
8019
|
-
chrome:
|
|
8019
|
+
chrome: d = "card",
|
|
8020
8020
|
emptyState: u,
|
|
8021
8021
|
helpText: h
|
|
8022
8022
|
}) {
|
|
8023
|
-
const f =
|
|
8023
|
+
const f = i == null || t.length < i, g = t.length > r, v = (_, p) => n(t.map((b, S) => S === _ ? p : b)), x = (_) => n(t.filter((p, b) => b !== _)), N = (_, p) => {
|
|
8024
8024
|
const b = _ + p;
|
|
8025
8025
|
if (b < 0 || b >= t.length) return;
|
|
8026
8026
|
const S = t.slice(), k = S[_];
|
|
@@ -8040,7 +8040,7 @@ function dr({
|
|
|
8040
8040
|
t.length === 0 && u != null && /* @__PURE__ */ e("div", { children: u }),
|
|
8041
8041
|
t.map((_, p) => {
|
|
8042
8042
|
const b = $(_, p);
|
|
8043
|
-
return
|
|
8043
|
+
return d === "bare" ? /* @__PURE__ */ e("div", { children: l(_, b) }, p) : /* @__PURE__ */ e(xc, { background: "surface", border: !0, borderRadius: "base", padding: "300", children: /* @__PURE__ */ m(Vt, { gap: "200", children: [
|
|
8044
8044
|
/* @__PURE__ */ m(st, { align: "space-between", blockAlign: "center", gap: "200", children: [
|
|
8045
8045
|
/* @__PURE__ */ e(Xe, { as: "span", variant: "bodySm", fontWeight: "medium", tone: "subdued", children: a ? a(p, _) : `#${p + 1}` }),
|
|
8046
8046
|
/* @__PURE__ */ m(st, { gap: "100", blockAlign: "center", wrap: !1, children: [
|
|
@@ -8068,9 +8068,9 @@ function hr({
|
|
|
8068
8068
|
saving: s = !1,
|
|
8069
8069
|
saveLabel: a = "Salvar",
|
|
8070
8070
|
saveDisabled: r = !1,
|
|
8071
|
-
cancelTo:
|
|
8071
|
+
cancelTo: i,
|
|
8072
8072
|
error: o,
|
|
8073
|
-
preview:
|
|
8073
|
+
preview: d,
|
|
8074
8074
|
children: u
|
|
8075
8075
|
}) {
|
|
8076
8076
|
const h = Sl();
|
|
@@ -8081,19 +8081,19 @@ function hr({
|
|
|
8081
8081
|
subtitle: n,
|
|
8082
8082
|
backAction: { content: "Voltar", onAction: () => h(l || -1) },
|
|
8083
8083
|
primaryAction: { content: a, onAction: c, loading: s, disabled: r },
|
|
8084
|
-
secondaryActions:
|
|
8084
|
+
secondaryActions: i ? [{ content: "Cancelar", onAction: () => h(i), disabled: s }] : void 0,
|
|
8085
8085
|
children: /* @__PURE__ */ m(Vt, { gap: "400", children: [
|
|
8086
8086
|
o != null && /* @__PURE__ */ e(ht, { tone: "critical", children: o }),
|
|
8087
|
-
|
|
8087
|
+
d != null ? /* @__PURE__ */ m("div", { className: "select-builder-split", children: [
|
|
8088
8088
|
/* @__PURE__ */ e("div", { className: "select-builder-split__form", children: u }),
|
|
8089
|
-
/* @__PURE__ */ e("div", { className: "select-builder-split__preview", children:
|
|
8089
|
+
/* @__PURE__ */ e("div", { className: "select-builder-split__preview", children: d })
|
|
8090
8090
|
] }) : u
|
|
8091
8091
|
] })
|
|
8092
8092
|
}
|
|
8093
8093
|
);
|
|
8094
8094
|
}
|
|
8095
|
-
const ur = R(function({ label: n, checked: l, onChange: c, disabled: s = !1, hint: a, className: r, ...
|
|
8096
|
-
return /* @__PURE__ */ m("div", { ref: o, ...
|
|
8095
|
+
const ur = R(function({ label: n, checked: l, onChange: c, disabled: s = !1, hint: a, className: r, ...i }, o) {
|
|
8096
|
+
return /* @__PURE__ */ m("div", { ref: o, ...i, className: `select-switchfield${s ? " is-disabled" : ""}${r ? " " + r : ""}`, children: [
|
|
8097
8097
|
/* @__PURE__ */ m("div", { className: "select-switchfield__row", children: [
|
|
8098
8098
|
/* @__PURE__ */ e(en, { checked: l, onChange: c, disabled: s, label: n }),
|
|
8099
8099
|
/* @__PURE__ */ e(
|
|
@@ -8117,8 +8117,8 @@ function pr({ label: t, value: n, onChange: l, disabled: c = !1, hint: s, error:
|
|
|
8117
8117
|
label: t,
|
|
8118
8118
|
value: n,
|
|
8119
8119
|
onChange: (r) => {
|
|
8120
|
-
let
|
|
8121
|
-
|
|
8120
|
+
let i = r.trim();
|
|
8121
|
+
i && !i.startsWith("#") && (i = `#${i}`), l(i.slice(0, 7));
|
|
8122
8122
|
},
|
|
8123
8123
|
autoComplete: "off",
|
|
8124
8124
|
maxLength: 7,
|
|
@@ -8147,7 +8147,7 @@ function Xs(t) {
|
|
|
8147
8147
|
c.onload = () => n(String(c.result)), c.onerror = () => l(c.error), c.readAsDataURL(t);
|
|
8148
8148
|
});
|
|
8149
8149
|
}
|
|
8150
|
-
const mr = R(function({ label: n, value: l, onChange: c, accept: s = "image/*", maxSizeMB: a = 3, urlPlaceholder: r, hint:
|
|
8150
|
+
const mr = R(function({ label: n, value: l, onChange: c, accept: s = "image/*", maxSizeMB: a = 3, urlPlaceholder: r, hint: i, uploadFile: o, className: d, ...u }, h) {
|
|
8151
8151
|
const [f, g] = D([]), [v, x] = D(null), N = l ? [l] : [], $ = async (_) => {
|
|
8152
8152
|
const p = _[0];
|
|
8153
8153
|
if (!p) {
|
|
@@ -8167,7 +8167,7 @@ const mr = R(function({ label: n, value: l, onChange: c, accept: s = "image/*",
|
|
|
8167
8167
|
g([]);
|
|
8168
8168
|
}
|
|
8169
8169
|
};
|
|
8170
|
-
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-imagefield${
|
|
8170
|
+
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-imagefield${d ? " " + d : ""}`, children: [
|
|
8171
8171
|
/* @__PURE__ */ e(
|
|
8172
8172
|
tc,
|
|
8173
8173
|
{
|
|
@@ -8180,18 +8180,18 @@ const mr = R(function({ label: n, value: l, onChange: c, accept: s = "image/*",
|
|
|
8180
8180
|
accept: s,
|
|
8181
8181
|
maxSizeMB: a,
|
|
8182
8182
|
urlPlaceholder: r,
|
|
8183
|
-
helpText:
|
|
8183
|
+
helpText: i
|
|
8184
8184
|
}
|
|
8185
8185
|
),
|
|
8186
8186
|
v && /* @__PURE__ */ e("span", { className: "select-imagefield__error", children: v })
|
|
8187
8187
|
] });
|
|
8188
8188
|
}), fr = R(function({ items: n, multiple: l = !1, defaultOpenIds: c = [], className: s, ...a }, r) {
|
|
8189
|
-
const [
|
|
8189
|
+
const [i, o] = D(() => new Set(c)), d = (u) => o((h) => {
|
|
8190
8190
|
const f = h.has(u), g = new Set(l ? h : []);
|
|
8191
8191
|
return f ? g.delete(u) : g.add(u), g;
|
|
8192
8192
|
});
|
|
8193
8193
|
return /* @__PURE__ */ e("div", { ref: r, ...a, className: `select-accordion${s ? " " + s : ""}`, children: n.map((u) => {
|
|
8194
|
-
const h =
|
|
8194
|
+
const h = i.has(u.id);
|
|
8195
8195
|
return /* @__PURE__ */ m("div", { className: "select-accordion__item", children: [
|
|
8196
8196
|
/* @__PURE__ */ m(
|
|
8197
8197
|
"button",
|
|
@@ -8201,7 +8201,7 @@ const mr = R(function({ label: n, value: l, onChange: c, accept: s = "image/*",
|
|
|
8201
8201
|
"aria-expanded": h,
|
|
8202
8202
|
"aria-controls": `select-acc-${u.id}`,
|
|
8203
8203
|
disabled: u.disabled,
|
|
8204
|
-
onClick: () =>
|
|
8204
|
+
onClick: () => d(u.id),
|
|
8205
8205
|
children: [
|
|
8206
8206
|
/* @__PURE__ */ e("span", { className: "select-accordion__title", children: u.title }),
|
|
8207
8207
|
/* @__PURE__ */ e("span", { className: `select-accordion__chevron${h ? " is-open" : ""}`, "aria-hidden": "true", children: /* @__PURE__ */ e(be, {}) })
|