@selectwin/kit 0.1.115 → 0.1.116
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/SelectMenu.d.ts +4 -0
- package/dist/index.js +631 -615
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -113,16 +113,16 @@ function S({ className: e, theme: t, glowTarget: n }) {
|
|
|
113
113
|
function te(e) {
|
|
114
114
|
j = e.clientX - E, M = e.clientY - D, N = f.ticker.time;
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function ne() {
|
|
117
117
|
let e = a.getBoundingClientRect();
|
|
118
118
|
E = e.left, D = e.top;
|
|
119
119
|
}
|
|
120
120
|
I();
|
|
121
|
-
let
|
|
121
|
+
let z = new ResizeObserver(() => {
|
|
122
122
|
I(), s && ee();
|
|
123
123
|
});
|
|
124
|
-
return
|
|
125
|
-
f.ticker.remove(R), f.killTweensOf(A), window.removeEventListener("pointermove", te), window.removeEventListener("scroll",
|
|
124
|
+
return z.observe(a), s ? (ee(), () => z.disconnect()) : (window.addEventListener("pointermove", te, { passive: !0 }), window.addEventListener("scroll", ne, { passive: !0 }), f.ticker.add(R), () => {
|
|
125
|
+
f.ticker.remove(R), f.killTweensOf(A), window.removeEventListener("pointermove", te), window.removeEventListener("scroll", ne), z.disconnect(), O == null || O.style.removeProperty("--select-card-glow");
|
|
126
126
|
});
|
|
127
127
|
}, [t, n]), /* @__PURE__ */ m("canvas", {
|
|
128
128
|
ref: r,
|
|
@@ -459,7 +459,7 @@ var k = (e) => {
|
|
|
459
459
|
}, I = (e) => e <= 0 ? 0 : e >= 1 ? 255 : e * 255 | 0, L = (() => {
|
|
460
460
|
let e = /* @__PURE__ */ new Uint32Array(1);
|
|
461
461
|
return e[0] = 1, new Uint8Array(e.buffer)[0] === 1;
|
|
462
|
-
})(), ee = L ? 0 : 24, R = L ? 8 : 16, te = L ? 16 : 8,
|
|
462
|
+
})(), ee = L ? 0 : 24, R = L ? 8 : 16, te = L ? 16 : 8, ne = L ? 24 : 0, z = {
|
|
463
463
|
dots: k,
|
|
464
464
|
plexus: A,
|
|
465
465
|
grid: j,
|
|
@@ -501,13 +501,13 @@ var k = (e) => {
|
|
|
501
501
|
w(),
|
|
502
502
|
w(),
|
|
503
503
|
w()
|
|
504
|
-
], E = T[0], D = null, O = null, k = null, A = null, j = /* @__PURE__ */ new Float32Array(), M = 0, N = 0, L = 0,
|
|
505
|
-
function
|
|
504
|
+
], E = T[0], D = null, O = null, k = null, A = null, j = /* @__PURE__ */ new Float32Array(), M = 0, N = 0, L = 0, z = 0, B = 0, re = 0;
|
|
505
|
+
function V() {
|
|
506
506
|
let t = Math.max(e.w(), 1), n = Math.max(e.h(), 1);
|
|
507
|
-
L = (t * Math.abs(m) + n * Math.abs(h)) / 2,
|
|
507
|
+
L = (t * Math.abs(m) + n * Math.abs(h)) / 2, z = (t * Math.abs(h) + n * Math.abs(m)) / 2, B = Math.min(1, Math.sqrt(42e4 / (4 * L * z))), M = Math.max(2, Math.round(2 * L * B)), N = Math.max(2, Math.round(2 * z * B)), re = Math.min(2.6, Math.max(.7, .62 / B)), D || (D = document.createElement("canvas")), D.width = M, D.height = N, O = D.getContext("2d"), k = (O == null ? void 0 : O.createImageData(M, N)) ?? null, A = k ? new Uint32Array(k.data.buffer) : null, j = new Float32Array(M);
|
|
508
508
|
}
|
|
509
|
-
let
|
|
510
|
-
let o = e *
|
|
509
|
+
let H = 1, ie = 0, ae = 0, U = 0, W = 0, G = 1, K = 0, oe = 0, se = 0, ce = 0, q = F.TENSION, le = (e, t, r, i, a) => {
|
|
510
|
+
let o = e * H + t * ie, s = -e * ie + t * H - ae, c = r * H + i * ie, l = -r * ie + i * H;
|
|
511
511
|
l < 0 && (c = -c, l = -l);
|
|
512
512
|
let f = F.CAM - s;
|
|
513
513
|
if (f < n) {
|
|
@@ -516,7 +516,7 @@ var k = (e) => {
|
|
|
516
516
|
}
|
|
517
517
|
let g = (f - n) * .5263157894736842;
|
|
518
518
|
g > 1 && (g = 1);
|
|
519
|
-
let y = g * g * (3 - 2 * g), b = o * F.FOCAL / f * ce + M * .5, x = -o, S = -
|
|
519
|
+
let y = g * g * (3 - 2 * g), b = o * F.FOCAL / f * ce + M * .5, x = -o, S = -U, C = f, w = 1 / Math.sqrt(x * x + S * S + C * C);
|
|
520
520
|
x *= w, S *= w, C *= w;
|
|
521
521
|
let T = c * x + l * C;
|
|
522
522
|
T < 0 && (T = 0);
|
|
@@ -526,10 +526,10 @@ var k = (e) => {
|
|
|
526
526
|
I < 0 && (I = 0);
|
|
527
527
|
let L = I * I, ee = L * L, R = ee * ee * ee;
|
|
528
528
|
A = v[0] + x, j = v[1] + S, N = v[2] + C, P = 1 / Math.sqrt(A * A + j * j + N * N), I = (c * A + l * N) * P, I < 0 && (I = 0);
|
|
529
|
-
let te = I * I,
|
|
530
|
-
|
|
531
|
-
let
|
|
532
|
-
W > 1 && (W = 1), E.lift[K] = W, E.a[K] = (u + d * k + p *
|
|
529
|
+
let te = I * I, ne = te * te, z = ne * ne, B = (-(-x + 2 * T * c) * h - S * m + .2) * .8333333333333334;
|
|
530
|
+
B < 0 ? B = 0 : B > 1 && (B = 1);
|
|
531
|
+
let re = B * B * (3 - 2 * B), V = R * .9 + z * .45, W = k * .55 + V;
|
|
532
|
+
W > 1 && (W = 1), E.lift[K] = W, E.a[K] = (u + d * k + p * V + re * .06) * a * G * y, E.x[K] = b, E.z[K] = s, b < oe && (oe = b), b > se && (se = b), K++;
|
|
533
533
|
}, ue = (e, t) => {
|
|
534
534
|
let n = e * W, r = Math.cos(n), i = -Math.sin(n) * q, a = 1 / Math.sqrt(q * q * r * r + 1), o = q * r * a, s = a;
|
|
535
535
|
for (let r = 0; r < 14; r++) {
|
|
@@ -538,12 +538,12 @@ var k = (e) => {
|
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
540
|
function de(t, n, r) {
|
|
541
|
-
let i = Math.max(e.h(), 1), a = r * F.TWIST_SPEED * .15, o = r * F.TWIST_SPEED * .2, s = -((t + .5) / N * 2 *
|
|
542
|
-
|
|
543
|
-
for (let e = 0; e < 2; e++)
|
|
544
|
-
|
|
545
|
-
let c =
|
|
546
|
-
|
|
541
|
+
let i = Math.max(e.h(), 1), a = r * F.TWIST_SPEED * .15, o = r * F.TWIST_SPEED * .2, s = -((t + .5) / N * 2 * z - z) / (i * F.ZOOM);
|
|
542
|
+
U = s * F.CAM / F.FOCAL;
|
|
543
|
+
for (let e = 0; e < 2; e++) U = s * (F.CAM + Math.sin(U * 1.2 + a) * F.BILLOW) / F.FOCAL;
|
|
544
|
+
ae = Math.sin(U * 1.2 + a) * F.BILLOW;
|
|
545
|
+
let c = U < 0 ? -U : U, l = P(7, 1, c), u = U * S.twist * P(8, 0, c) - o;
|
|
546
|
+
H = Math.cos(u), ie = Math.sin(u), W = F.WIDTH * l, G = P(.06, .46, H < 0 ? -H : H) * P(0, .06, l), E = n, K = 0, oe = 1e9, se = -1e9, ue(-1, !0);
|
|
547
547
|
let d = 2 * W / 107, f = Math.cos(d), p = Math.sin(d), m = Math.cos(-W), h = Math.sin(-W);
|
|
548
548
|
for (let e = 0; e < 108; e++) {
|
|
549
549
|
let t = 1 / Math.sqrt(q * q * m * m + 1);
|
|
@@ -561,9 +561,9 @@ var k = (e) => {
|
|
|
561
561
|
let v = Math.floor(m), y = Math.ceil(g);
|
|
562
562
|
if (y < 0 || v > M - 1) return;
|
|
563
563
|
v < 0 && (v = 0), y > M - 1 && (y = M - 1), j.fill(-1e9, v, y + 1);
|
|
564
|
-
let b = e * M, x = f * f, S = x * f, C = -.5 * S + x - .5 * f, w = 1.5 * S - 2.5 * x + 1, T = -1.5 * S + 2 * x + .5 * f, E = .5 * S - .5 * x, D = n.x, O = r.x, k = u.x, N = d.x, P = n.z, F = r.z, L = u.z,
|
|
564
|
+
let b = e * M, x = f * f, S = x * f, C = -.5 * S + x - .5 * f, w = 1.5 * S - 2.5 * x + 1, T = -1.5 * S + 2 * x + .5 * f, E = .5 * S - .5 * x, D = n.x, O = r.x, k = u.x, N = d.x, P = n.z, F = r.z, L = u.z, z = d.z, B = n.lift, re = r.lift, V = u.lift, H = d.lift, ie = n.a, ae = r.a, U = u.a, W = d.a, G = C * D[0] + w * O[0] + T * k[0] + E * N[0], K = C * P[0] + w * F[0] + T * L[0] + E * z[0], oe = C * B[0] + w * re[0] + T * V[0] + E * H[0], se = C * ie[0] + w * ae[0] + T * U[0] + E * W[0];
|
|
565
565
|
for (let e = 1; e < 136; e++) {
|
|
566
|
-
let t = C * D[e] + w * O[e] + T * k[e] + E * N[e], n = C * P[e] + w * F[e] + T * L[e] + E *
|
|
566
|
+
let t = C * D[e] + w * O[e] + T * k[e] + E * N[e], n = C * P[e] + w * F[e] + T * L[e] + E * z[e], r = C * B[e] + w * re[e] + T * V[e] + E * H[e], u = C * ie[e] + w * ae[e] + T * U[e] + E * W[e];
|
|
567
567
|
if (!Number.isNaN(G) && !Number.isNaN(t)) {
|
|
568
568
|
let e = Math.max(v, Math.ceil((G < t ? G : t) - .5)), d = Math.min(y, Math.floor((G > t ? G : t) - .5));
|
|
569
569
|
if (d < e) {
|
|
@@ -579,34 +579,34 @@ var k = (e) => {
|
|
|
579
579
|
if (n <= j[t]) continue;
|
|
580
580
|
j[t] = n;
|
|
581
581
|
let r = oe + g * e;
|
|
582
|
-
p[b + t] = I(i + s * r) << ee | I(a + c * r) << R | I(o + l * r) << te | I(se + _ * e) <<
|
|
582
|
+
p[b + t] = I(i + s * r) << ee | I(a + c * r) << R | I(o + l * r) << te | I(se + _ * e) << ne;
|
|
583
583
|
}
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
G = t, K = n, oe = r, se = u;
|
|
587
587
|
}
|
|
588
588
|
let ce = -1, q = -1;
|
|
589
|
-
for (let e = v; e <= y; e++) if ((p[b + e] >>>
|
|
589
|
+
for (let e = v; e <= y; e++) if ((p[b + e] >>> ne & 255) > 0) {
|
|
590
590
|
ce = e;
|
|
591
591
|
break;
|
|
592
592
|
}
|
|
593
593
|
if (ce < 0) return;
|
|
594
|
-
for (let e = y; e >= ce; e--) if ((p[b + e] >>>
|
|
594
|
+
for (let e = y; e >= ce; e--) if ((p[b + e] >>> ne & 255) > 0) {
|
|
595
595
|
q = e;
|
|
596
596
|
break;
|
|
597
597
|
}
|
|
598
598
|
if (q - ce <= 2 * t.length) return;
|
|
599
|
-
let le = ~(255 <<
|
|
599
|
+
let le = ~(255 << ne);
|
|
600
600
|
for (let e = 0; e < t.length; e++) {
|
|
601
601
|
let n = t[e], r = b + ce + e, i = p[r];
|
|
602
|
-
p[r] = i & le | ((i >>>
|
|
602
|
+
p[r] = i & le | ((i >>> ne & 255) * n | 0) << ne;
|
|
603
603
|
let a = b + q - e, o = p[a];
|
|
604
|
-
p[a] = o & le | ((o >>>
|
|
604
|
+
p[a] = o & le | ((o >>> ne & 255) * n | 0) << ne;
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
function pe(t) {
|
|
608
608
|
if (!k || !O || !A) return;
|
|
609
|
-
A.fill(0), q = S.tension, ce = F.ZOOM * Math.max(e.h(), 1) *
|
|
609
|
+
A.fill(0), q = S.tension, ce = F.ZOOM * Math.max(e.h(), 1) * B;
|
|
610
610
|
let n = Math.max(1, Math.ceil((N - 1) / 3)), r = (e) => Math.min(e * 3, N - 1), i = 0;
|
|
611
611
|
de(r(0), T[0], t);
|
|
612
612
|
let a = 0, o = r(0), s = r(1);
|
|
@@ -621,10 +621,10 @@ var k = (e) => {
|
|
|
621
621
|
}
|
|
622
622
|
function me(t) {
|
|
623
623
|
let { ctx: n } = e, r = e.w(), i = e.h();
|
|
624
|
-
n.clearRect(0, 0, r, i), !(!D || M < 2) && (pe(t), n.save(), n.translate(r / 2, i / 2), n.rotate(F.ROT), n.imageSmoothingEnabled = !0, n.imageSmoothingQuality = "high", n.filter = `blur(${
|
|
624
|
+
n.clearRect(0, 0, r, i), !(!D || M < 2) && (pe(t), n.save(), n.translate(r / 2, i / 2), n.rotate(F.ROT), n.imageSmoothingEnabled = !0, n.imageSmoothingQuality = "high", n.filter = `blur(${re.toFixed(2)}px)`, n.drawImage(D, -L, -z, 2 * L, 2 * z), n.restore());
|
|
625
625
|
}
|
|
626
626
|
return {
|
|
627
|
-
build:
|
|
627
|
+
build: V,
|
|
628
628
|
interactive: !1,
|
|
629
629
|
frame(t) {
|
|
630
630
|
C || (C = f.timeline({
|
|
@@ -648,7 +648,7 @@ var k = (e) => {
|
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
650
|
};
|
|
651
|
-
function
|
|
651
|
+
function B({ className: e, theme: t, glowTarget: n, variant: r }) {
|
|
652
652
|
let i = u(null);
|
|
653
653
|
return o(() => {
|
|
654
654
|
var e, a;
|
|
@@ -708,7 +708,7 @@ function V({ className: e, theme: t, glowTarget: n, variant: r }) {
|
|
|
708
708
|
pointer: x,
|
|
709
709
|
cardGlow: A,
|
|
710
710
|
clearGlow: j
|
|
711
|
-
}, N =
|
|
711
|
+
}, N = z[r](M), P = N.interactive !== !1;
|
|
712
712
|
function F() {
|
|
713
713
|
let e = o.getBoundingClientRect();
|
|
714
714
|
g = e.left, _ = e.top, m = e.width, h = e.height;
|
|
@@ -752,7 +752,7 @@ function V({ className: e, theme: t, glowTarget: n, variant: r }) {
|
|
|
752
752
|
}
|
|
753
753
|
//#endregion
|
|
754
754
|
//#region src/SelectCard.tsx
|
|
755
|
-
var
|
|
755
|
+
var re = r(function({ title: e, subtitle: t, logo: n, mark: r, children: i, footer: a, className: o, ...s }, c) {
|
|
756
756
|
return /* @__PURE__ */ h("div", {
|
|
757
757
|
ref: c,
|
|
758
758
|
...s,
|
|
@@ -788,7 +788,7 @@ var ne = r(function({ title: e, subtitle: t, logo: n, mark: r, children: i, foot
|
|
|
788
788
|
children: a
|
|
789
789
|
})]
|
|
790
790
|
});
|
|
791
|
-
}),
|
|
791
|
+
}), V = r(function({ variant: e = "primary", type: t = "button", size: n = "md", loading: r = !1, icon: i, trailingIcon: a, inline: o = !1, disabled: s, onPointerDown: c, children: l, ...f }, p) {
|
|
792
792
|
let [g, _] = d([]), v = u(0), y = (e) => {
|
|
793
793
|
var t, n;
|
|
794
794
|
if (c == null || c(e), s || r || typeof window < "u" && (t = (n = window).matchMedia) != null && t.call(n, "(prefers-reduced-motion: reduce)").matches) return;
|
|
@@ -834,7 +834,7 @@ var ne = r(function({ title: e, subtitle: t, logo: n, mark: r, children: i, foot
|
|
|
834
834
|
});
|
|
835
835
|
//#endregion
|
|
836
836
|
//#region src/icons.tsx
|
|
837
|
-
function
|
|
837
|
+
function H() {
|
|
838
838
|
return /* @__PURE__ */ h("svg", {
|
|
839
839
|
viewBox: "0 0 24 24",
|
|
840
840
|
"aria-hidden": "true",
|
|
@@ -858,7 +858,7 @@ function U() {
|
|
|
858
858
|
]
|
|
859
859
|
});
|
|
860
860
|
}
|
|
861
|
-
function
|
|
861
|
+
function ie() {
|
|
862
862
|
return /* @__PURE__ */ m("svg", {
|
|
863
863
|
viewBox: "0 0 24 24",
|
|
864
864
|
"aria-hidden": "true",
|
|
@@ -868,7 +868,7 @@ function re() {
|
|
|
868
868
|
})
|
|
869
869
|
});
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function ae() {
|
|
872
872
|
return /* @__PURE__ */ m("svg", {
|
|
873
873
|
viewBox: "0 0 24 24",
|
|
874
874
|
fill: "none",
|
|
@@ -880,7 +880,7 @@ function ie() {
|
|
|
880
880
|
children: /* @__PURE__ */ m("path", { d: "M8.91 19.92l6.52-6.52c.77-.77.77-2.03 0-2.8L8.91 4.08" })
|
|
881
881
|
});
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function U() {
|
|
884
884
|
return /* @__PURE__ */ m("svg", {
|
|
885
885
|
viewBox: "0 0 24 24",
|
|
886
886
|
fill: "none",
|
|
@@ -2231,11 +2231,11 @@ var kt = r(function({ content: e, title: t, label: n = "Mais informações", pla
|
|
|
2231
2231
|
}), i]
|
|
2232
2232
|
});
|
|
2233
2233
|
}), jt = r(function({ label: e, value: t, onChange: n, type: r = "text", labelAction: i, help: a, info: o, description: c, hint: l, error: u, prefix: f, suffix: p, trailingAction: g, mono: _, autoComplete: v, placeholder: y, required: b, disabled: x, readOnly: S, name: C, id: w, minLength: T, maxLength: E, min: D, max: O, step: k, inputMode: A, autoFocus: j, onBlur: M, onKeyDown: N, size: P = "md", className: F, ...I }, L) {
|
|
2234
|
-
let ee = s(), R = w ?? ee, [te,
|
|
2235
|
-
let t = Number(k ?? 1) || 1, r = (
|
|
2234
|
+
let ee = s(), R = w ?? ee, [te, ne] = d(!1), z = r === "password", B = z && te ? "text" : r, re = u ? `${R}-err` : l ? `${R}-hint` : void 0, V = f != null || p != null, H = r === "number" && !V && !S, ie = t === "" ? null : Number(t), ae = (e) => {
|
|
2235
|
+
let t = Number(k ?? 1) || 1, r = (ie != null && Number.isFinite(ie) ? ie : 0) + e * t;
|
|
2236
2236
|
D != null && (r = Math.max(Number(D), r)), O != null && (r = Math.min(Number(O), r)), n(String(r));
|
|
2237
|
-
},
|
|
2238
|
-
className: `select-input-wrap${
|
|
2237
|
+
}, U = D != null && ie != null && ie <= Number(D), G = O != null && ie != null && ie >= Number(O), K = /* @__PURE__ */ h("div", {
|
|
2238
|
+
className: `select-input-wrap${V ? " select-input-wrap--affixed" : ""}${u ? " select-input-wrap--error" : ""}`,
|
|
2239
2239
|
children: [
|
|
2240
2240
|
f != null && /* @__PURE__ */ m("span", {
|
|
2241
2241
|
className: "select-input__affix select-input__affix--prefix",
|
|
@@ -2243,8 +2243,8 @@ var kt = r(function({ content: e, title: t, label: n = "Mais informações", pla
|
|
|
2243
2243
|
}),
|
|
2244
2244
|
/* @__PURE__ */ m("input", {
|
|
2245
2245
|
id: R,
|
|
2246
|
-
className: `select-input${
|
|
2247
|
-
type:
|
|
2246
|
+
className: `select-input${z ? " select-input--has-suffix" : ""}${H ? " select-input--has-stepper" : ""}${_ ? " select-input--mono" : ""}${u ? " select-input--error" : ""}`,
|
|
2247
|
+
type: B,
|
|
2248
2248
|
value: t,
|
|
2249
2249
|
onChange: (e) => n(e.target.value),
|
|
2250
2250
|
onBlur: M,
|
|
@@ -2263,20 +2263,20 @@ var kt = r(function({ content: e, title: t, label: n = "Mais informações", pla
|
|
|
2263
2263
|
inputMode: A,
|
|
2264
2264
|
autoFocus: j,
|
|
2265
2265
|
"aria-invalid": u ? !0 : void 0,
|
|
2266
|
-
"aria-describedby":
|
|
2266
|
+
"aria-describedby": re
|
|
2267
2267
|
}),
|
|
2268
2268
|
p != null && /* @__PURE__ */ m("span", {
|
|
2269
2269
|
className: "select-input__affix select-input__affix--suffix",
|
|
2270
2270
|
children: p
|
|
2271
2271
|
}),
|
|
2272
|
-
|
|
2272
|
+
z && /* @__PURE__ */ m("button", {
|
|
2273
2273
|
type: "button",
|
|
2274
2274
|
className: "select-input__reveal",
|
|
2275
|
-
onClick: () =>
|
|
2275
|
+
onClick: () => ne((e) => !e),
|
|
2276
2276
|
"aria-label": te ? "Ocultar senha" : "Mostrar senha",
|
|
2277
2277
|
children: m(te ? Ue : He, {})
|
|
2278
2278
|
}),
|
|
2279
|
-
|
|
2279
|
+
H && /* @__PURE__ */ h("span", {
|
|
2280
2280
|
className: "select-stepper",
|
|
2281
2281
|
children: [/* @__PURE__ */ m("button", {
|
|
2282
2282
|
type: "button",
|
|
@@ -2284,15 +2284,15 @@ var kt = r(function({ content: e, title: t, label: n = "Mais informações", pla
|
|
|
2284
2284
|
className: "select-stepper__btn",
|
|
2285
2285
|
"aria-label": "Aumentar",
|
|
2286
2286
|
disabled: x || G,
|
|
2287
|
-
onClick: () =>
|
|
2287
|
+
onClick: () => ae(1),
|
|
2288
2288
|
children: /* @__PURE__ */ m(it, {})
|
|
2289
2289
|
}), /* @__PURE__ */ m("button", {
|
|
2290
2290
|
type: "button",
|
|
2291
2291
|
tabIndex: -1,
|
|
2292
2292
|
className: "select-stepper__btn",
|
|
2293
2293
|
"aria-label": "Diminuir",
|
|
2294
|
-
disabled: x ||
|
|
2295
|
-
onClick: () =>
|
|
2294
|
+
disabled: x || U,
|
|
2295
|
+
onClick: () => ae(-1),
|
|
2296
2296
|
children: /* @__PURE__ */ m(W, {})
|
|
2297
2297
|
})]
|
|
2298
2298
|
})
|
|
@@ -2812,7 +2812,7 @@ var Zt = r(function({ files: e, onChange: t, accept: n, maxSizeMB: r = 10, allow
|
|
|
2812
2812
|
}
|
|
2813
2813
|
let i = Math.min(N - n.length, M - P);
|
|
2814
2814
|
r([...n, ...t.slice(0, Math.max(0, i))]);
|
|
2815
|
-
},
|
|
2815
|
+
}, ne = () => {
|
|
2816
2816
|
let e = O.trim();
|
|
2817
2817
|
if (e) {
|
|
2818
2818
|
if (!Yt.test(e)) {
|
|
@@ -2825,12 +2825,12 @@ var Zt = r(function({ files: e, onChange: t, accept: n, maxSizeMB: r = 10, allow
|
|
|
2825
2825
|
}
|
|
2826
2826
|
S ? (r([]), a([e])) : a([...i, e].slice(0, M)), k(""), j(null);
|
|
2827
2827
|
}
|
|
2828
|
-
},
|
|
2829
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
2830
|
-
},
|
|
2828
|
+
}, z = (e) => {
|
|
2829
|
+
e.key === "Enter" && (e.preventDefault(), ne());
|
|
2830
|
+
}, B = (e) => r(n.filter((t, n) => n !== e)), re = (e) => a(i.filter((t, n) => n !== e)), H = () => {
|
|
2831
2831
|
var e;
|
|
2832
2832
|
return (e = C.current) == null ? void 0 : e.click();
|
|
2833
|
-
},
|
|
2833
|
+
}, ie = {
|
|
2834
2834
|
onDragOver: (e) => {
|
|
2835
2835
|
e.preventDefault(), T(!0);
|
|
2836
2836
|
},
|
|
@@ -2850,7 +2850,7 @@ var Zt = r(function({ files: e, onChange: t, accept: n, maxSizeMB: r = 10, allow
|
|
|
2850
2850
|
}),
|
|
2851
2851
|
/* @__PURE__ */ h("div", {
|
|
2852
2852
|
className: `select-uploadzone${w ? " is-over" : ""}`,
|
|
2853
|
-
...
|
|
2853
|
+
...ie,
|
|
2854
2854
|
children: [
|
|
2855
2855
|
L ? /* @__PURE__ */ h("div", {
|
|
2856
2856
|
className: `select-filetile-grid${P === 1 ? " select-filetile-grid--single" : ""}`,
|
|
@@ -2860,24 +2860,24 @@ var Zt = r(function({ files: e, onChange: t, accept: n, maxSizeMB: r = 10, allow
|
|
|
2860
2860
|
docExt: Jt(e.name),
|
|
2861
2861
|
name: e.name,
|
|
2862
2862
|
sub: Gt(e.size),
|
|
2863
|
-
onRemove: () =>
|
|
2863
|
+
onRemove: () => B(t)
|
|
2864
2864
|
}, `f-${e.name}-${t}`)),
|
|
2865
2865
|
i.map((e, t) => /* @__PURE__ */ m(Wt, {
|
|
2866
2866
|
src: e,
|
|
2867
2867
|
name: Xt(e),
|
|
2868
|
-
onRemove: () =>
|
|
2868
|
+
onRemove: () => re(t)
|
|
2869
2869
|
}, `u-${e}-${t}`)),
|
|
2870
2870
|
F && /* @__PURE__ */ h("button", {
|
|
2871
2871
|
type: "button",
|
|
2872
2872
|
className: "select-dropzone select-dropzone--tile",
|
|
2873
|
-
onClick:
|
|
2873
|
+
onClick: H,
|
|
2874
2874
|
children: [/* @__PURE__ */ m(se, {}), /* @__PURE__ */ m("span", { children: "Adicionar" })]
|
|
2875
2875
|
})
|
|
2876
2876
|
]
|
|
2877
2877
|
}) : /* @__PURE__ */ h("button", {
|
|
2878
2878
|
type: "button",
|
|
2879
2879
|
className: "select-uploadzone__prompt",
|
|
2880
|
-
onClick:
|
|
2880
|
+
onClick: H,
|
|
2881
2881
|
children: [/* @__PURE__ */ m(se, {}), /* @__PURE__ */ m("span", { children: g ?? `Arraste ou selecione um arquivo · até ${c} MB` })]
|
|
2882
2882
|
}),
|
|
2883
2883
|
I && /* @__PURE__ */ h("div", {
|
|
@@ -2892,7 +2892,7 @@ var Zt = r(function({ files: e, onChange: t, accept: n, maxSizeMB: r = 10, allow
|
|
|
2892
2892
|
onChange: (e) => {
|
|
2893
2893
|
k(e), A && j(null);
|
|
2894
2894
|
},
|
|
2895
|
-
onKeyDown:
|
|
2895
|
+
onKeyDown: z,
|
|
2896
2896
|
type: "url",
|
|
2897
2897
|
inputMode: "url",
|
|
2898
2898
|
placeholder: _ ?? "ou cole uma URL (https://…)",
|
|
@@ -2900,11 +2900,11 @@ var Zt = r(function({ files: e, onChange: t, accept: n, maxSizeMB: r = 10, allow
|
|
|
2900
2900
|
autoComplete: "off"
|
|
2901
2901
|
})
|
|
2902
2902
|
}),
|
|
2903
|
-
/* @__PURE__ */ m(
|
|
2903
|
+
/* @__PURE__ */ m(V, {
|
|
2904
2904
|
variant: "secondary",
|
|
2905
2905
|
size: "sm",
|
|
2906
2906
|
inline: !0,
|
|
2907
|
-
onClick:
|
|
2907
|
+
onClick: ne,
|
|
2908
2908
|
disabled: !O.trim(),
|
|
2909
2909
|
children: "Adicionar"
|
|
2910
2910
|
})
|
|
@@ -4059,7 +4059,7 @@ function Un({ items: e, label: t = "Ações", disabled: n }) {
|
|
|
4059
4059
|
active: r,
|
|
4060
4060
|
onClose: () => i(!1),
|
|
4061
4061
|
placement: "bottom-end",
|
|
4062
|
-
activator: /* @__PURE__ */ m(
|
|
4062
|
+
activator: /* @__PURE__ */ m(V, {
|
|
4063
4063
|
variant: "secondary",
|
|
4064
4064
|
size: "sm",
|
|
4065
4065
|
inline: !0,
|
|
@@ -4399,7 +4399,7 @@ var J = r(function({ icon: e, label: t, onClick: n, disabled: r = !1, size: i =
|
|
|
4399
4399
|
//#endregion
|
|
4400
4400
|
//#region src/SelectDisclosureButton.tsx
|
|
4401
4401
|
function ur({ open: e, onToggle: t, children: n, openLabel: r, disabled: i = !1, size: a = "sm", variant: o = "secondary" }) {
|
|
4402
|
-
return /* @__PURE__ */ m(
|
|
4402
|
+
return /* @__PURE__ */ m(V, {
|
|
4403
4403
|
variant: o,
|
|
4404
4404
|
size: a,
|
|
4405
4405
|
inline: !0,
|
|
@@ -4654,7 +4654,7 @@ function Br({ value: e, path: n, depth: r, ancestors: i, ctx: a }) {
|
|
|
4654
4654
|
"aria-expanded": p,
|
|
4655
4655
|
"aria-label": `${p ? "Recolher" : "Expandir"} ${e}`,
|
|
4656
4656
|
onClick: () => a.toggle(l),
|
|
4657
|
-
children: /* @__PURE__ */ m(
|
|
4657
|
+
children: /* @__PURE__ */ m(ae, {})
|
|
4658
4658
|
}) : /* @__PURE__ */ m("span", {
|
|
4659
4659
|
className: "select-json__caret select-json__caret--empty",
|
|
4660
4660
|
"aria-hidden": "true"
|
|
@@ -4757,14 +4757,14 @@ var Hr = r(function({ value: e, title: t = "Metadados", maxHeight: n = 360, defa
|
|
|
4757
4757
|
let n = new Set(t);
|
|
4758
4758
|
return n.delete(e) || n.add(e), n;
|
|
4759
4759
|
});
|
|
4760
|
-
}, []), R = P.length > 0 && P.every((e) => w.has(e)), te = () => T(R ? /* @__PURE__ */ new Set() : new Set(P)),
|
|
4760
|
+
}, []), R = P.length > 0 && P.every((e) => w.has(e)), te = () => T(R ? /* @__PURE__ */ new Set() : new Set(P)), ne = {
|
|
4761
4761
|
expanded: w,
|
|
4762
4762
|
toggle: ee,
|
|
4763
4763
|
search: S,
|
|
4764
4764
|
result: F,
|
|
4765
4765
|
copied: E,
|
|
4766
4766
|
copy: D
|
|
4767
|
-
},
|
|
4767
|
+
}, z = v && !A;
|
|
4768
4768
|
return /* @__PURE__ */ h("div", {
|
|
4769
4769
|
ref: _,
|
|
4770
4770
|
...g,
|
|
@@ -4776,13 +4776,13 @@ var Hr = r(function({ value: e, title: t = "Metadados", maxHeight: n = 360, defa
|
|
|
4776
4776
|
variant: "headingSm",
|
|
4777
4777
|
children: t
|
|
4778
4778
|
}), /* @__PURE__ */ m(ur, {
|
|
4779
|
-
open:
|
|
4779
|
+
open: z,
|
|
4780
4780
|
onToggle: () => y((e) => !e),
|
|
4781
4781
|
openLabel: "Ocultar",
|
|
4782
4782
|
disabled: A,
|
|
4783
4783
|
children: A ? c : "Mostrar"
|
|
4784
4784
|
})]
|
|
4785
|
-
}),
|
|
4785
|
+
}), z && /* @__PURE__ */ h("div", {
|
|
4786
4786
|
className: "select-json__body",
|
|
4787
4787
|
children: [/* @__PURE__ */ h("div", {
|
|
4788
4788
|
className: "select-json__toolbar",
|
|
@@ -4852,7 +4852,7 @@ var Hr = r(function({ value: e, title: t = "Metadados", maxHeight: n = 360, defa
|
|
|
4852
4852
|
path: "",
|
|
4853
4853
|
depth: 0,
|
|
4854
4854
|
ancestors: [k],
|
|
4855
|
-
ctx:
|
|
4855
|
+
ctx: ne
|
|
4856
4856
|
}) : /* @__PURE__ */ h("div", {
|
|
4857
4857
|
className: "select-json__row",
|
|
4858
4858
|
style: { "--json-depth": 0 },
|
|
@@ -4981,7 +4981,7 @@ function Jr({ children: e, className: t, ...n }) {
|
|
|
4981
4981
|
});
|
|
4982
4982
|
}
|
|
4983
4983
|
function Yr({ title: e, subtitle: t, leading: n, trailing: r, onClick: i, muted: a = !1 }) {
|
|
4984
|
-
let o = !!i, s = r === void 0 ? o ? /* @__PURE__ */ m(
|
|
4984
|
+
let o = !!i, s = r === void 0 ? o ? /* @__PURE__ */ m(ae, {}) : null : r, c = /* @__PURE__ */ h(p, { children: [
|
|
4985
4985
|
n && /* @__PURE__ */ m("span", {
|
|
4986
4986
|
className: "select-optionrow__leading",
|
|
4987
4987
|
children: n
|
|
@@ -5339,7 +5339,7 @@ var si = r(function({ value: e, rules: t, className: n, ...r }, i) {
|
|
|
5339
5339
|
}), u && /* @__PURE__ */ h("div", {
|
|
5340
5340
|
className: "select-page__actions",
|
|
5341
5341
|
children: [
|
|
5342
|
-
r == null ? void 0 : r.map((e, t) => /* @__PURE__ */ m(
|
|
5342
|
+
r == null ? void 0 : r.map((e, t) => /* @__PURE__ */ m(V, {
|
|
5343
5343
|
variant: "secondary",
|
|
5344
5344
|
size: "sm",
|
|
5345
5345
|
inline: !0,
|
|
@@ -5349,7 +5349,7 @@ var si = r(function({ value: e, rules: t, className: n, ...r }, i) {
|
|
|
5349
5349
|
onClick: e.onAction,
|
|
5350
5350
|
children: e.content
|
|
5351
5351
|
}, t)),
|
|
5352
|
-
n && /* @__PURE__ */ m(
|
|
5352
|
+
n && /* @__PURE__ */ m(V, {
|
|
5353
5353
|
variant: "primary",
|
|
5354
5354
|
size: "sm",
|
|
5355
5355
|
inline: !0,
|
|
@@ -5895,7 +5895,7 @@ var Ii = r(function({ page: e, pageCount: t, total: n, pageSize: r, hasPrevious:
|
|
|
5895
5895
|
onClick: _,
|
|
5896
5896
|
disabled: !p || !_,
|
|
5897
5897
|
"aria-label": "Página anterior",
|
|
5898
|
-
children: /* @__PURE__ */ m(
|
|
5898
|
+
children: /* @__PURE__ */ m(U, {})
|
|
5899
5899
|
}),
|
|
5900
5900
|
y ? b.map((t, n) => t === "gap" ? /* @__PURE__ */ m("span", {
|
|
5901
5901
|
className: "select-pagination__gap",
|
|
@@ -5917,7 +5917,7 @@ var Ii = r(function({ page: e, pageCount: t, total: n, pageSize: r, hasPrevious:
|
|
|
5917
5917
|
onClick: v,
|
|
5918
5918
|
disabled: !g || !v,
|
|
5919
5919
|
"aria-label": "Próxima página",
|
|
5920
|
-
children: /* @__PURE__ */ m(
|
|
5920
|
+
children: /* @__PURE__ */ m(ae, {})
|
|
5921
5921
|
})
|
|
5922
5922
|
]
|
|
5923
5923
|
}), x != null && /* @__PURE__ */ m("p", {
|
|
@@ -6253,7 +6253,7 @@ var Yi = r(function({ children: e, align: t = "start", disclosure: n, className:
|
|
|
6253
6253
|
children: [n ? /* @__PURE__ */ m("span", {
|
|
6254
6254
|
className: `select-table__disclosure${n === "open" ? " is-open" : ""}`,
|
|
6255
6255
|
"aria-hidden": "true",
|
|
6256
|
-
children: n !== "none" && /* @__PURE__ */ m(
|
|
6256
|
+
children: n !== "none" && /* @__PURE__ */ m(ae, {})
|
|
6257
6257
|
}) : null, e]
|
|
6258
6258
|
});
|
|
6259
6259
|
}), Xi = r(function({ icon: e, title: t, subtitle: n, action: r, className: i, ...a }, o) {
|
|
@@ -6288,68 +6288,84 @@ var Yi = r(function({ children: e, align: t = "start", disclosure: n, className:
|
|
|
6288
6288
|
role: "menu",
|
|
6289
6289
|
children: e
|
|
6290
6290
|
});
|
|
6291
|
-
})
|
|
6291
|
+
});
|
|
6292
|
+
function Qi({ children: e, description: t }) {
|
|
6293
|
+
return t == null || t === "" ? /* @__PURE__ */ m("span", {
|
|
6294
|
+
className: "select-menu__label",
|
|
6295
|
+
children: e
|
|
6296
|
+
}) : /* @__PURE__ */ h("span", {
|
|
6297
|
+
className: "select-menu__label select-menu__label--desc",
|
|
6298
|
+
children: [/* @__PURE__ */ m("span", {
|
|
6299
|
+
className: "select-menu__title",
|
|
6300
|
+
children: e
|
|
6301
|
+
}), /* @__PURE__ */ m("span", {
|
|
6302
|
+
className: "select-menu__desc",
|
|
6303
|
+
children: t
|
|
6304
|
+
})]
|
|
6305
|
+
});
|
|
6306
|
+
}
|
|
6307
|
+
var $i = r(function({ children: e, description: t, icon: n, trailing: r, onClick: i, active: a = !1, tone: o = "default", className: s, ...c }, l) {
|
|
6292
6308
|
return /* @__PURE__ */ h("button", {
|
|
6293
|
-
ref:
|
|
6294
|
-
...
|
|
6309
|
+
ref: l,
|
|
6310
|
+
...c,
|
|
6295
6311
|
type: "button",
|
|
6296
6312
|
role: "menuitem",
|
|
6297
|
-
className: `select-menu__item select-menu__item--${
|
|
6298
|
-
onClick:
|
|
6313
|
+
className: `select-menu__item select-menu__item--${o}${a ? " is-active" : ""}${s ? " " + s : ""}`,
|
|
6314
|
+
onClick: i,
|
|
6299
6315
|
children: [
|
|
6300
|
-
|
|
6316
|
+
n && /* @__PURE__ */ m("span", {
|
|
6301
6317
|
className: "select-menu__icon",
|
|
6302
|
-
children:
|
|
6318
|
+
children: n
|
|
6303
6319
|
}),
|
|
6304
|
-
/* @__PURE__ */ m(
|
|
6305
|
-
|
|
6320
|
+
/* @__PURE__ */ m(Qi, {
|
|
6321
|
+
description: t,
|
|
6306
6322
|
children: e
|
|
6307
6323
|
}),
|
|
6308
|
-
|
|
6324
|
+
r && /* @__PURE__ */ m("span", {
|
|
6309
6325
|
className: "select-menu__trailing",
|
|
6310
|
-
children:
|
|
6326
|
+
children: r
|
|
6311
6327
|
})
|
|
6312
6328
|
]
|
|
6313
6329
|
});
|
|
6314
|
-
}),
|
|
6315
|
-
let
|
|
6330
|
+
}), ea = r(function({ children: e, description: t, href: n, icon: r, trailing: i, external: a, tone: o = "default", className: s, ...c }, l) {
|
|
6331
|
+
let u = $r(n), d = a ?? /^(https?:|mailto:|tel:)/i.test(u ?? ""), f = i ?? (d ? /* @__PURE__ */ m(q, {}) : void 0);
|
|
6316
6332
|
return /* @__PURE__ */ h("a", {
|
|
6317
|
-
ref:
|
|
6318
|
-
...
|
|
6319
|
-
href:
|
|
6333
|
+
ref: l,
|
|
6334
|
+
...c,
|
|
6335
|
+
href: u,
|
|
6320
6336
|
role: "menuitem",
|
|
6321
|
-
target:
|
|
6322
|
-
rel:
|
|
6323
|
-
className: `select-menu__item select-menu__item--${
|
|
6337
|
+
target: d ? "_blank" : c.target,
|
|
6338
|
+
rel: d ? "noreferrer" : c.rel,
|
|
6339
|
+
className: `select-menu__item select-menu__item--${o}${s ? " " + s : ""}`,
|
|
6324
6340
|
children: [
|
|
6325
|
-
|
|
6341
|
+
r && /* @__PURE__ */ m("span", {
|
|
6326
6342
|
className: "select-menu__icon",
|
|
6327
|
-
children:
|
|
6343
|
+
children: r
|
|
6328
6344
|
}),
|
|
6329
|
-
/* @__PURE__ */ m(
|
|
6330
|
-
|
|
6345
|
+
/* @__PURE__ */ m(Qi, {
|
|
6346
|
+
description: t,
|
|
6331
6347
|
children: e
|
|
6332
6348
|
}),
|
|
6333
|
-
|
|
6349
|
+
f && /* @__PURE__ */ m("span", {
|
|
6334
6350
|
className: "select-menu__trailing",
|
|
6335
|
-
children:
|
|
6351
|
+
children: f
|
|
6336
6352
|
})
|
|
6337
6353
|
]
|
|
6338
6354
|
});
|
|
6339
6355
|
});
|
|
6340
|
-
function
|
|
6356
|
+
function ta({ children: e }) {
|
|
6341
6357
|
return /* @__PURE__ */ m("div", {
|
|
6342
6358
|
className: "select-menu__heading",
|
|
6343
6359
|
children: e
|
|
6344
6360
|
});
|
|
6345
6361
|
}
|
|
6346
|
-
function
|
|
6362
|
+
function na() {
|
|
6347
6363
|
return /* @__PURE__ */ m("div", {
|
|
6348
6364
|
className: "select-menu__divider",
|
|
6349
6365
|
role: "separator"
|
|
6350
6366
|
});
|
|
6351
6367
|
}
|
|
6352
|
-
var
|
|
6368
|
+
var ra = r(function({ children: e, onClick: t, active: n = !1, className: r, ...i }, a) {
|
|
6353
6369
|
return /* @__PURE__ */ h("button", {
|
|
6354
6370
|
ref: a,
|
|
6355
6371
|
...i,
|
|
@@ -6364,7 +6380,7 @@ var na = r(function({ children: e, onClick: t, active: n = !1, className: r, ...
|
|
|
6364
6380
|
children: /* @__PURE__ */ m(W, {})
|
|
6365
6381
|
})]
|
|
6366
6382
|
});
|
|
6367
|
-
}),
|
|
6383
|
+
}), ia = r(function({ children: e, onClick: t, active: n = !1, className: r, ...i }, a) {
|
|
6368
6384
|
return /* @__PURE__ */ h("button", {
|
|
6369
6385
|
ref: a,
|
|
6370
6386
|
...i,
|
|
@@ -6377,7 +6393,7 @@ var na = r(function({ children: e, onClick: t, active: n = !1, className: r, ...
|
|
|
6377
6393
|
children: /* @__PURE__ */ m(Me, {})
|
|
6378
6394
|
}), e]
|
|
6379
6395
|
});
|
|
6380
|
-
}),
|
|
6396
|
+
}), aa = r(function({ label: e, value: t, href: n, onCopy: r, className: i, ...a }, o) {
|
|
6381
6397
|
let [s, c] = d(!1), l = $r(n), u = () => {
|
|
6382
6398
|
navigator.clipboard.writeText(t).then(() => {
|
|
6383
6399
|
c(!0), setTimeout(() => c(!1), 1200), r == null || r(t);
|
|
@@ -6417,7 +6433,7 @@ var na = r(function({ children: e, onClick: t, active: n = !1, className: r, ...
|
|
|
6417
6433
|
});
|
|
6418
6434
|
//#endregion
|
|
6419
6435
|
//#region src/SelectCopyableId.tsx
|
|
6420
|
-
function
|
|
6436
|
+
function oa({ value: e, children: t, truncate: n, label: r = "Copiar id", fallback: i = "—", to: a, reveal: o = "hover" }) {
|
|
6421
6437
|
let [s, c] = d(!1);
|
|
6422
6438
|
if (!e) return /* @__PURE__ */ m(p, { children: i });
|
|
6423
6439
|
let l = t ?? (n ? e.slice(0, n) : e), u = $r(a);
|
|
@@ -6449,7 +6465,7 @@ function aa({ value: e, children: t, truncate: n, label: r = "Copiar id", fallba
|
|
|
6449
6465
|
}
|
|
6450
6466
|
//#endregion
|
|
6451
6467
|
//#region src/SelectCollapsible.tsx
|
|
6452
|
-
var
|
|
6468
|
+
var sa = r(function({ title: e, children: t, defaultOpen: n = !1, plain: r = !1, className: i, ...a }, o) {
|
|
6453
6469
|
let [s, c] = d(n);
|
|
6454
6470
|
return /* @__PURE__ */ h("div", {
|
|
6455
6471
|
ref: o,
|
|
@@ -6480,7 +6496,7 @@ var oa = r(function({ title: e, children: t, defaultOpen: n = !1, plain: r = !1,
|
|
|
6480
6496
|
})
|
|
6481
6497
|
})]
|
|
6482
6498
|
});
|
|
6483
|
-
}),
|
|
6499
|
+
}), ca = r(function({ icon: e, title: t, description: n, action: r, onDismiss: i, className: a, ...o }, s) {
|
|
6484
6500
|
return /* @__PURE__ */ h("div", {
|
|
6485
6501
|
ref: s,
|
|
6486
6502
|
...o,
|
|
@@ -6515,7 +6531,7 @@ var oa = r(function({ title: e, children: t, defaultOpen: n = !1, plain: r = !1,
|
|
|
6515
6531
|
})
|
|
6516
6532
|
]
|
|
6517
6533
|
});
|
|
6518
|
-
}),
|
|
6534
|
+
}), la = r(function({ media: e, sublabel: t, title: n, badge: r, meta: i, accent: a = !0, onClick: o, className: s, ...c }, l) {
|
|
6519
6535
|
return /* @__PURE__ */ h("button", {
|
|
6520
6536
|
ref: l,
|
|
6521
6537
|
...c,
|
|
@@ -6552,7 +6568,7 @@ var oa = r(function({ title: e, children: t, defaultOpen: n = !1, plain: r = !1,
|
|
|
6552
6568
|
})
|
|
6553
6569
|
]
|
|
6554
6570
|
});
|
|
6555
|
-
}),
|
|
6571
|
+
}), ua = r(function({ label: e, onClick: t, className: n, ...r }, i) {
|
|
6556
6572
|
return /* @__PURE__ */ h("button", {
|
|
6557
6573
|
ref: i,
|
|
6558
6574
|
...r,
|
|
@@ -6568,7 +6584,7 @@ var oa = r(function({ title: e, children: t, defaultOpen: n = !1, plain: r = !1,
|
|
|
6568
6584
|
children: e
|
|
6569
6585
|
})]
|
|
6570
6586
|
});
|
|
6571
|
-
}),
|
|
6587
|
+
}), da = r(function({ avatar: e, name: t, badge: n, onClick: r, className: i, ...a }, o) {
|
|
6572
6588
|
return /* @__PURE__ */ h("button", {
|
|
6573
6589
|
ref: o,
|
|
6574
6590
|
...a,
|
|
@@ -6593,8 +6609,8 @@ var oa = r(function({ title: e, children: t, defaultOpen: n = !1, plain: r = !1,
|
|
|
6593
6609
|
})
|
|
6594
6610
|
]
|
|
6595
6611
|
});
|
|
6596
|
-
}),
|
|
6597
|
-
function
|
|
6612
|
+
}), fa = 220;
|
|
6613
|
+
function pa({ open: e, onClose: t, title: n, subtitle: r, children: i, footer: a, aside: s, size: c = "md", showClose: l = !0, noise: u = !0, dividedHeader: f = !1, backdrop: _ = "dim", theme: v = "light" }) {
|
|
6598
6614
|
let [y, b] = d(e), [x, S] = d(!1);
|
|
6599
6615
|
if (o(() => {
|
|
6600
6616
|
if (e) b(!0), S(!1);
|
|
@@ -6602,7 +6618,7 @@ function fa({ open: e, onClose: t, title: n, subtitle: r, children: i, footer: a
|
|
|
6602
6618
|
S(!0);
|
|
6603
6619
|
let e = setTimeout(() => {
|
|
6604
6620
|
b(!1), S(!1);
|
|
6605
|
-
},
|
|
6621
|
+
}, fa);
|
|
6606
6622
|
return () => clearTimeout(e);
|
|
6607
6623
|
}
|
|
6608
6624
|
}, [e, y]), o(() => {
|
|
@@ -6680,7 +6696,7 @@ function fa({ open: e, onClose: t, title: n, subtitle: r, children: i, footer: a
|
|
|
6680
6696
|
}
|
|
6681
6697
|
//#endregion
|
|
6682
6698
|
//#region src/SelectRowActions.tsx
|
|
6683
|
-
function
|
|
6699
|
+
function ma({ actions: e, label: t = "Ações" }) {
|
|
6684
6700
|
let [n, r] = d(!1);
|
|
6685
6701
|
return /* @__PURE__ */ m(fn, {
|
|
6686
6702
|
active: n,
|
|
@@ -6702,8 +6718,8 @@ function pa({ actions: e, label: t = "Ações" }) {
|
|
|
6702
6718
|
}
|
|
6703
6719
|
//#endregion
|
|
6704
6720
|
//#region src/SelectConfirmModal.tsx
|
|
6705
|
-
function
|
|
6706
|
-
return /* @__PURE__ */ m(
|
|
6721
|
+
function ha({ open: e, onClose: t, onConfirm: n, title: r, children: i, confirmLabel: a = "Confirmar", cancelLabel: o = "Cancelar", destructive: s = !1, loading: c = !1, theme: l }) {
|
|
6722
|
+
return /* @__PURE__ */ m(pa, {
|
|
6707
6723
|
open: e,
|
|
6708
6724
|
onClose: t,
|
|
6709
6725
|
title: r,
|
|
@@ -6711,14 +6727,14 @@ function ma({ open: e, onClose: t, onConfirm: n, title: r, children: i, confirmL
|
|
|
6711
6727
|
theme: l ?? un(),
|
|
6712
6728
|
footer: /* @__PURE__ */ h("div", {
|
|
6713
6729
|
className: "select-modal__actions",
|
|
6714
|
-
children: [/* @__PURE__ */ m(
|
|
6730
|
+
children: [/* @__PURE__ */ m(V, {
|
|
6715
6731
|
variant: "secondary",
|
|
6716
6732
|
size: "sm",
|
|
6717
6733
|
inline: !0,
|
|
6718
6734
|
onClick: t,
|
|
6719
6735
|
disabled: c,
|
|
6720
6736
|
children: o
|
|
6721
|
-
}), /* @__PURE__ */ m(
|
|
6737
|
+
}), /* @__PURE__ */ m(V, {
|
|
6722
6738
|
variant: s ? "danger" : "primary",
|
|
6723
6739
|
size: "sm",
|
|
6724
6740
|
inline: !0,
|
|
@@ -6732,8 +6748,8 @@ function ma({ open: e, onClose: t, onConfirm: n, title: r, children: i, confirmL
|
|
|
6732
6748
|
}
|
|
6733
6749
|
//#endregion
|
|
6734
6750
|
//#region src/SelectFormModal.tsx
|
|
6735
|
-
function
|
|
6736
|
-
return /* @__PURE__ */ h(
|
|
6751
|
+
function ga({ open: e, onClose: t, onSubmit: n, title: r, subtitle: i, children: a, submitLabel: o = "Salvar", cancelLabel: s = "Cancelar", submitting: c = !1, submitDisabled: l = !1, submitVariant: u = "primary", error: d, size: f = "md", theme: p }) {
|
|
6752
|
+
return /* @__PURE__ */ h(pa, {
|
|
6737
6753
|
open: e,
|
|
6738
6754
|
onClose: t,
|
|
6739
6755
|
title: r,
|
|
@@ -6742,14 +6758,14 @@ function ha({ open: e, onClose: t, onSubmit: n, title: r, subtitle: i, children:
|
|
|
6742
6758
|
theme: p ?? un(),
|
|
6743
6759
|
footer: /* @__PURE__ */ h("div", {
|
|
6744
6760
|
className: "select-modal__actions",
|
|
6745
|
-
children: [/* @__PURE__ */ m(
|
|
6761
|
+
children: [/* @__PURE__ */ m(V, {
|
|
6746
6762
|
variant: "secondary",
|
|
6747
6763
|
size: "sm",
|
|
6748
6764
|
inline: !0,
|
|
6749
6765
|
onClick: t,
|
|
6750
6766
|
disabled: c,
|
|
6751
6767
|
children: s
|
|
6752
|
-
}), /* @__PURE__ */ m(
|
|
6768
|
+
}), /* @__PURE__ */ m(V, {
|
|
6753
6769
|
variant: u,
|
|
6754
6770
|
size: "sm",
|
|
6755
6771
|
inline: !0,
|
|
@@ -6775,30 +6791,30 @@ function ha({ open: e, onClose: t, onSubmit: n, title: r, subtitle: i, children:
|
|
|
6775
6791
|
}
|
|
6776
6792
|
//#endregion
|
|
6777
6793
|
//#region src/SelectDataTable.tsx
|
|
6778
|
-
var
|
|
6794
|
+
var _a = "9.5rem", va = {
|
|
6779
6795
|
minWidth: "9.5rem",
|
|
6780
6796
|
grow: 2
|
|
6781
|
-
},
|
|
6782
|
-
function
|
|
6797
|
+
}, ya = "select-datatable:hidden-cols:";
|
|
6798
|
+
function ba(e) {
|
|
6783
6799
|
try {
|
|
6784
|
-
let t = localStorage.getItem(
|
|
6800
|
+
let t = localStorage.getItem(ya + e), n = t ? JSON.parse(t) : null;
|
|
6785
6801
|
return Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
|
|
6786
6802
|
} catch {
|
|
6787
6803
|
return [];
|
|
6788
6804
|
}
|
|
6789
6805
|
}
|
|
6790
|
-
function
|
|
6806
|
+
function xa(e, t) {
|
|
6791
6807
|
try {
|
|
6792
|
-
t.length === 0 ? localStorage.removeItem(
|
|
6808
|
+
t.length === 0 ? localStorage.removeItem(ya + e) : localStorage.setItem(ya + e, JSON.stringify(t));
|
|
6793
6809
|
} catch {}
|
|
6794
6810
|
}
|
|
6795
|
-
function
|
|
6811
|
+
function Sa(e) {
|
|
6796
6812
|
return e.hideable ?? !!e.title;
|
|
6797
6813
|
}
|
|
6798
|
-
var
|
|
6799
|
-
function
|
|
6814
|
+
var Ca = "select-datatable:col-widths:";
|
|
6815
|
+
function wa(e) {
|
|
6800
6816
|
try {
|
|
6801
|
-
let t = localStorage.getItem(
|
|
6817
|
+
let t = localStorage.getItem(Ca + e), n = t ? JSON.parse(t) : null;
|
|
6802
6818
|
if (!n || typeof n != "object" || Array.isArray(n)) return {};
|
|
6803
6819
|
let r = {};
|
|
6804
6820
|
for (let [e, t] of Object.entries(n)) typeof t == "string" && t && (r[e] = t);
|
|
@@ -6807,16 +6823,16 @@ function Ca(e) {
|
|
|
6807
6823
|
return {};
|
|
6808
6824
|
}
|
|
6809
6825
|
}
|
|
6810
|
-
function
|
|
6826
|
+
function Ta(e, t) {
|
|
6811
6827
|
try {
|
|
6812
|
-
Object.keys(t).length === 0 ? localStorage.removeItem(
|
|
6828
|
+
Object.keys(t).length === 0 ? localStorage.removeItem(Ca + e) : localStorage.setItem(Ca + e, JSON.stringify(t));
|
|
6813
6829
|
} catch {}
|
|
6814
6830
|
}
|
|
6815
|
-
var
|
|
6816
|
-
function
|
|
6831
|
+
var Ea = "select-datatable:page-size:";
|
|
6832
|
+
function Da(e, t, n) {
|
|
6817
6833
|
let [r, i] = d(() => {
|
|
6818
6834
|
try {
|
|
6819
|
-
let r = Number(localStorage.getItem(
|
|
6835
|
+
let r = Number(localStorage.getItem(Ea + e));
|
|
6820
6836
|
return Number.isInteger(r) && r > 0 && (!n || n.includes(r)) ? r : t;
|
|
6821
6837
|
} catch {
|
|
6822
6838
|
return t;
|
|
@@ -6825,25 +6841,25 @@ function Ea(e, t, n) {
|
|
|
6825
6841
|
return [r, (t) => {
|
|
6826
6842
|
i(t);
|
|
6827
6843
|
try {
|
|
6828
|
-
localStorage.setItem(
|
|
6844
|
+
localStorage.setItem(Ea + e, String(t));
|
|
6829
6845
|
} catch {}
|
|
6830
6846
|
}];
|
|
6831
6847
|
}
|
|
6832
|
-
function
|
|
6848
|
+
function Oa(e, t, n) {
|
|
6833
6849
|
let r = e == null || e === "", i = t == null || t === "";
|
|
6834
6850
|
return r || i ? r && i ? 0 : r ? 1 : -1 : typeof e == "number" && typeof t == "number" ? n * (e - t) : n * String(e).localeCompare(String(t), "pt-BR", {
|
|
6835
6851
|
numeric: !0,
|
|
6836
6852
|
sensitivity: "base"
|
|
6837
6853
|
});
|
|
6838
6854
|
}
|
|
6839
|
-
function
|
|
6840
|
-
let [y, b] = d(() => g ?
|
|
6855
|
+
function ka({ columns: e, items: t, getId: n, loading: r = !1, empty: i, pagination: a, onRowClick: o, title: s, help: c, description: u, action: f, filters: p, columnsKey: g, getChildren: _, defaultExpanded: v }) {
|
|
6856
|
+
let [y, b] = d(() => g ? ba(g) : []), [x, S] = d(!1), [C, w] = d(() => g ? wa(g) : {}), T = l(() => new Set(y), [y]), E = e.filter(Sa), D = E.length > 0 && E.every((e) => T.has(e.key)), O = (e) => !D && T.has(e.key) && Sa(e), k = e.filter((e) => !O(e)), A = E.filter((e) => !O(e)), [j, M] = d(null), [N, P] = d(() => /* @__PURE__ */ new Set()), F = (e) => ((v == null ? void 0 : v(e)) ?? !1) !== N.has(n(e)), I = (e) => P((t) => {
|
|
6841
6857
|
let r = new Set(t), i = n(e);
|
|
6842
6858
|
return r.delete(i) || r.add(i), r;
|
|
6843
6859
|
}), L = (e) => {
|
|
6844
6860
|
b((t) => {
|
|
6845
6861
|
let n = !t.includes(e.key), r = n ? [...t, e.key] : t.filter((t) => t !== e.key);
|
|
6846
|
-
return g &&
|
|
6862
|
+
return g && xa(g, r), n && M((t) => t && t.key === e.key ? null : t), r;
|
|
6847
6863
|
});
|
|
6848
6864
|
}, ee = (e) => {
|
|
6849
6865
|
M((t) => {
|
|
@@ -6860,8 +6876,8 @@ function Oa({ columns: e, items: t, getId: n, loading: r = !1, empty: i, paginat
|
|
|
6860
6876
|
let e = R == null ? void 0 : R.sortValue;
|
|
6861
6877
|
if (!j || !e) return (e) => e;
|
|
6862
6878
|
let t = j.dir === "asc" ? 1 : -1;
|
|
6863
|
-
return (n) => [...n].sort((n, r) =>
|
|
6864
|
-
}, [j, R]),
|
|
6879
|
+
return (n) => [...n].sort((n, r) => Oa(e(n), e(r), t));
|
|
6880
|
+
}, [j, R]), ne = l(() => te(t), [t, te]), z = (e) => (_ == null ? void 0 : _(e)) ?? [], B = !!_ && t.some((e) => z(e).length > 0), re = k.map((e) => ({
|
|
6865
6881
|
label: e.title,
|
|
6866
6882
|
align: e.align,
|
|
6867
6883
|
width: C[e.key] ?? e.width,
|
|
@@ -6871,20 +6887,20 @@ function Oa({ columns: e, items: t, getId: n, loading: r = !1, empty: i, paginat
|
|
|
6871
6887
|
sortDir: (j == null ? void 0 : j.key) === e.key ? j.dir : null,
|
|
6872
6888
|
onSort: e.sortValue ? () => ee(e) : void 0,
|
|
6873
6889
|
resizable: !!e.title
|
|
6874
|
-
})),
|
|
6890
|
+
})), V = (e, t) => {
|
|
6875
6891
|
let n = k[e];
|
|
6876
6892
|
n && w((e) => {
|
|
6877
6893
|
let r = { ...e };
|
|
6878
|
-
return t ? r[n.key] = t : delete r[n.key], g &&
|
|
6894
|
+
return t ? r[n.key] = t : delete r[n.key], g && Ta(g, r), r;
|
|
6879
6895
|
});
|
|
6880
|
-
},
|
|
6881
|
-
w({}), g &&
|
|
6882
|
-
},
|
|
6896
|
+
}, H = () => {
|
|
6897
|
+
w({}), g && Ta(g, {});
|
|
6898
|
+
}, ie = Object.keys(C).length > 0, ae = !r && i ? /* @__PURE__ */ m(Xi, {
|
|
6883
6899
|
icon: i.icon,
|
|
6884
6900
|
title: i.heading,
|
|
6885
6901
|
subtitle: i.text,
|
|
6886
6902
|
action: i.action
|
|
6887
|
-
}) : void 0,
|
|
6903
|
+
}) : void 0, U = g && E.length > 0 ? /* @__PURE__ */ m(fn, {
|
|
6888
6904
|
active: x,
|
|
6889
6905
|
onClose: () => S(!1),
|
|
6890
6906
|
placement: "bottom-end",
|
|
@@ -6918,7 +6934,7 @@ function Oa({ columns: e, items: t, getId: n, loading: r = !1, empty: i, paginat
|
|
|
6918
6934
|
})]
|
|
6919
6935
|
}, e.key);
|
|
6920
6936
|
})
|
|
6921
|
-
}),
|
|
6937
|
+
}), ie && /* @__PURE__ */ m("div", {
|
|
6922
6938
|
className: "select-facet__options select-facet__options--footer",
|
|
6923
6939
|
role: "menu",
|
|
6924
6940
|
children: /* @__PURE__ */ m("button", {
|
|
@@ -6926,7 +6942,7 @@ function Oa({ columns: e, items: t, getId: n, loading: r = !1, empty: i, paginat
|
|
|
6926
6942
|
role: "menuitem",
|
|
6927
6943
|
className: "select-facet__opt",
|
|
6928
6944
|
onClick: () => {
|
|
6929
|
-
|
|
6945
|
+
H(), S(!1);
|
|
6930
6946
|
},
|
|
6931
6947
|
children: /* @__PURE__ */ m("span", { children: "Restaurar larguras" })
|
|
6932
6948
|
})
|
|
@@ -6936,28 +6952,28 @@ function Oa({ columns: e, items: t, getId: n, loading: r = !1, empty: i, paginat
|
|
|
6936
6952
|
return /* @__PURE__ */ h("div", {
|
|
6937
6953
|
className: "select-datatable",
|
|
6938
6954
|
children: [/* @__PURE__ */ m(Gi, {
|
|
6939
|
-
columns:
|
|
6940
|
-
empty:
|
|
6955
|
+
columns: re,
|
|
6956
|
+
empty: ae,
|
|
6941
6957
|
title: s,
|
|
6942
6958
|
help: c,
|
|
6943
6959
|
description: u,
|
|
6944
6960
|
filters: p,
|
|
6945
6961
|
action: f,
|
|
6946
|
-
tools:
|
|
6947
|
-
onColumnResize: (e, t) =>
|
|
6948
|
-
onColumnResizeReset: (e) =>
|
|
6962
|
+
tools: U,
|
|
6963
|
+
onColumnResize: (e, t) => V(e, t),
|
|
6964
|
+
onColumnResizeReset: (e) => V(e, null),
|
|
6949
6965
|
children: r ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ m(Ji, { children: k.map((e, t) => /* @__PURE__ */ m(Yi, {
|
|
6950
6966
|
align: e.align,
|
|
6951
6967
|
width: e.width,
|
|
6952
6968
|
children: /* @__PURE__ */ m("span", { className: "select-skeleton select-datatable__skel" })
|
|
6953
|
-
}, t)) }, `skeleton-${t}`)) :
|
|
6954
|
-
let t =
|
|
6969
|
+
}, t)) }, `skeleton-${t}`)) : ne.flatMap((e) => {
|
|
6970
|
+
let t = z(e);
|
|
6955
6971
|
if (t.length === 0) return [/* @__PURE__ */ m(Ji, {
|
|
6956
6972
|
onClick: o ? () => o(e) : void 0,
|
|
6957
6973
|
children: k.map((t, n) => /* @__PURE__ */ m(Yi, {
|
|
6958
6974
|
align: t.align,
|
|
6959
6975
|
width: t.width,
|
|
6960
|
-
disclosure:
|
|
6976
|
+
disclosure: B && n === 0 ? "none" : void 0,
|
|
6961
6977
|
children: t.render(e)
|
|
6962
6978
|
}, n))
|
|
6963
6979
|
}, n(e))];
|
|
@@ -6986,7 +7002,7 @@ function Oa({ columns: e, items: t, getId: n, loading: r = !1, empty: i, paginat
|
|
|
6986
7002
|
}
|
|
6987
7003
|
//#endregion
|
|
6988
7004
|
//#region src/SelectAddCard.tsx
|
|
6989
|
-
var
|
|
7005
|
+
var Aa = r(function({ label: e, description: t, onClick: n, icon: r, className: i, ...a }, o) {
|
|
6990
7006
|
return /* @__PURE__ */ h("button", {
|
|
6991
7007
|
ref: o,
|
|
6992
7008
|
...a,
|
|
@@ -7012,7 +7028,7 @@ var ka = r(function({ label: e, description: t, onClick: n, icon: r, className:
|
|
|
7012
7028
|
});
|
|
7013
7029
|
//#endregion
|
|
7014
7030
|
//#region src/SelectCardGrid.tsx
|
|
7015
|
-
function
|
|
7031
|
+
function ja({ items: e, getId: t, renderItem: n, loading: r = !1, skeletonCount: i = 6, empty: a, pagination: o, create: s, minCardWidth: c = "16rem", skeletonCover: l = !1, title: u, help: d, description: f, action: p, filters: g, tools: _ }) {
|
|
7016
7032
|
let v = !r && e.length === 0 && a != null, { hasTitleRow: y, hasFilters: b } = Li({
|
|
7017
7033
|
title: u,
|
|
7018
7034
|
description: f,
|
|
@@ -7068,7 +7084,7 @@ function Aa({ items: e, getId: t, renderItem: n, loading: r = !1, skeletonCount:
|
|
|
7068
7084
|
}, `skeleton-${t}`)) : e.map((e) => /* @__PURE__ */ m("div", {
|
|
7069
7085
|
className: "select-cardgrid__item",
|
|
7070
7086
|
children: n(e)
|
|
7071
|
-
}, t(e))), !r && s && /* @__PURE__ */ m(
|
|
7087
|
+
}, t(e))), !r && s && /* @__PURE__ */ m(Aa, {
|
|
7072
7088
|
label: s.label,
|
|
7073
7089
|
description: s.description,
|
|
7074
7090
|
onClick: s.onAction,
|
|
@@ -7081,7 +7097,7 @@ function Aa({ items: e, getId: t, renderItem: n, loading: r = !1, skeletonCount:
|
|
|
7081
7097
|
}
|
|
7082
7098
|
//#endregion
|
|
7083
7099
|
//#region src/SelectRecordCard.tsx
|
|
7084
|
-
var
|
|
7100
|
+
var Ma = r(function({ media: e, title: t, subtitle: n, actions: r, body: i, tags: a, status: o, meta: s, to: c, accent: l = !1, cover: u, coverFallback: d, className: f, ...p }, g) {
|
|
7085
7101
|
let v = o != null || s != null, y = $r(c);
|
|
7086
7102
|
return /* @__PURE__ */ h("div", {
|
|
7087
7103
|
ref: g,
|
|
@@ -7092,7 +7108,7 @@ var ja = r(function({ media: e, title: t, subtitle: n, actions: r, body: i, tags
|
|
|
7092
7108
|
className: "select-rcard__accent",
|
|
7093
7109
|
"aria-hidden": "true"
|
|
7094
7110
|
}),
|
|
7095
|
-
u !== void 0 && /* @__PURE__ */ m(
|
|
7111
|
+
u !== void 0 && /* @__PURE__ */ m(Na, {
|
|
7096
7112
|
src: u,
|
|
7097
7113
|
fallback: d
|
|
7098
7114
|
}),
|
|
@@ -7152,7 +7168,7 @@ var ja = r(function({ media: e, title: t, subtitle: n, actions: r, body: i, tags
|
|
|
7152
7168
|
]
|
|
7153
7169
|
});
|
|
7154
7170
|
});
|
|
7155
|
-
function
|
|
7171
|
+
function Na({ src: e, fallback: t }) {
|
|
7156
7172
|
let [n, r] = d(!1);
|
|
7157
7173
|
return o(() => r(!1), [e]), /* @__PURE__ */ m("span", {
|
|
7158
7174
|
className: "select-rcard__cover",
|
|
@@ -7168,7 +7184,7 @@ function Ma({ src: e, fallback: t }) {
|
|
|
7168
7184
|
})
|
|
7169
7185
|
});
|
|
7170
7186
|
}
|
|
7171
|
-
var
|
|
7187
|
+
var Pa = r(function({ kind: e, className: t, ...n }, r) {
|
|
7172
7188
|
return /* @__PURE__ */ h("span", {
|
|
7173
7189
|
ref: r,
|
|
7174
7190
|
...n,
|
|
@@ -7186,18 +7202,18 @@ var Na = r(function({ kind: e, className: t, ...n }, r) {
|
|
|
7186
7202
|
});
|
|
7187
7203
|
//#endregion
|
|
7188
7204
|
//#region src/SelectSplitChain.tsx
|
|
7189
|
-
function
|
|
7205
|
+
function Fa(e) {
|
|
7190
7206
|
var t;
|
|
7191
7207
|
return e.initials ? e.initials : ((t = (typeof e.label == "string" ? e.label : "").trim()[0]) == null ? void 0 : t.toUpperCase()) ?? "•";
|
|
7192
7208
|
}
|
|
7193
|
-
function
|
|
7209
|
+
function Ia({ node: e, origin: t = !1 }) {
|
|
7194
7210
|
return /* @__PURE__ */ h("span", {
|
|
7195
7211
|
className: `select-chain__node${t ? " select-chain__node--origin" : ""}`,
|
|
7196
7212
|
children: [
|
|
7197
7213
|
/* @__PURE__ */ m("span", {
|
|
7198
7214
|
className: "select-chain__dot",
|
|
7199
7215
|
"aria-hidden": "true",
|
|
7200
|
-
children:
|
|
7216
|
+
children: Fa(e)
|
|
7201
7217
|
}),
|
|
7202
7218
|
/* @__PURE__ */ m("span", {
|
|
7203
7219
|
className: "select-chain__label",
|
|
@@ -7211,16 +7227,16 @@ function Fa({ node: e, origin: t = !1 }) {
|
|
|
7211
7227
|
]
|
|
7212
7228
|
});
|
|
7213
7229
|
}
|
|
7214
|
-
var
|
|
7230
|
+
var La = r(function({ nodes: e, origin: t, max: n = 3, className: r, ...i }, a) {
|
|
7215
7231
|
let o = e.slice(0, n), s = e.length - o.length, c = [], l = (e) => /* @__PURE__ */ m("span", {
|
|
7216
7232
|
className: "select-chain__link",
|
|
7217
7233
|
"aria-hidden": "true"
|
|
7218
7234
|
}, e);
|
|
7219
|
-
t && c.push(/* @__PURE__ */ m(
|
|
7235
|
+
t && c.push(/* @__PURE__ */ m(Ia, {
|
|
7220
7236
|
node: t,
|
|
7221
7237
|
origin: !0
|
|
7222
7238
|
}, "__origin"));
|
|
7223
|
-
for (let e of o) c.length && c.push(l(`__link-${e.id}`)), c.push(/* @__PURE__ */ m(
|
|
7239
|
+
for (let e of o) c.length && c.push(l(`__link-${e.id}`)), c.push(/* @__PURE__ */ m(Ia, { node: e }, e.id));
|
|
7224
7240
|
return s > 0 && (c.push(l("__link-more")), c.push(/* @__PURE__ */ h("span", {
|
|
7225
7241
|
className: "select-chain__more",
|
|
7226
7242
|
children: ["+", s]
|
|
@@ -7230,43 +7246,43 @@ var Ia = r(function({ nodes: e, origin: t, max: n = 3, className: r, ...i }, a)
|
|
|
7230
7246
|
className: `select-chain${r ? " " + r : ""}`,
|
|
7231
7247
|
children: c
|
|
7232
7248
|
});
|
|
7233
|
-
}),
|
|
7249
|
+
}), Ra = new Intl.NumberFormat("pt-BR", {
|
|
7234
7250
|
style: "currency",
|
|
7235
7251
|
currency: "BRL"
|
|
7236
7252
|
});
|
|
7237
|
-
function
|
|
7253
|
+
function za(e) {
|
|
7238
7254
|
let t = typeof e == "string" ? Number(e) : e;
|
|
7239
7255
|
return typeof t == "number" && Number.isFinite(t) ? t : 0;
|
|
7240
7256
|
}
|
|
7241
|
-
function
|
|
7242
|
-
return
|
|
7257
|
+
function Ba(e) {
|
|
7258
|
+
return Ra.format(za(e) / 100);
|
|
7243
7259
|
}
|
|
7244
7260
|
//#endregion
|
|
7245
7261
|
//#region src/SelectMoney.tsx
|
|
7246
|
-
var
|
|
7262
|
+
var Va = "sw:hide-money", Ha = {
|
|
7247
7263
|
hidden: !1,
|
|
7248
7264
|
toggle: () => {},
|
|
7249
7265
|
setHidden: () => {}
|
|
7250
|
-
},
|
|
7251
|
-
function
|
|
7266
|
+
}, Ua = n(null);
|
|
7267
|
+
function Wa() {
|
|
7252
7268
|
try {
|
|
7253
|
-
return localStorage.getItem(
|
|
7269
|
+
return localStorage.getItem(Va) === "1";
|
|
7254
7270
|
} catch {
|
|
7255
7271
|
return !1;
|
|
7256
7272
|
}
|
|
7257
7273
|
}
|
|
7258
|
-
function
|
|
7274
|
+
function Ga(e) {
|
|
7259
7275
|
try {
|
|
7260
|
-
localStorage.setItem(
|
|
7276
|
+
localStorage.setItem(Va, e ? "1" : "0");
|
|
7261
7277
|
} catch {}
|
|
7262
7278
|
}
|
|
7263
|
-
function
|
|
7264
|
-
let [t, n] = d(
|
|
7265
|
-
n(e),
|
|
7279
|
+
function Ka({ children: e }) {
|
|
7280
|
+
let [t, n] = d(Wa), r = i((e) => {
|
|
7281
|
+
n(e), Ga(e);
|
|
7266
7282
|
}, []), a = i(() => {
|
|
7267
7283
|
n((e) => {
|
|
7268
7284
|
let t = !e;
|
|
7269
|
-
return
|
|
7285
|
+
return Ga(t), t;
|
|
7270
7286
|
});
|
|
7271
7287
|
}, []), o = l(() => ({
|
|
7272
7288
|
hidden: t,
|
|
@@ -7277,16 +7293,16 @@ function Ga({ children: e }) {
|
|
|
7277
7293
|
a,
|
|
7278
7294
|
r
|
|
7279
7295
|
]);
|
|
7280
|
-
return /* @__PURE__ */ m(
|
|
7296
|
+
return /* @__PURE__ */ m(Ua.Provider, {
|
|
7281
7297
|
value: o,
|
|
7282
7298
|
children: e
|
|
7283
7299
|
});
|
|
7284
7300
|
}
|
|
7285
|
-
function
|
|
7286
|
-
return a(
|
|
7301
|
+
function qa() {
|
|
7302
|
+
return a(Ua) ?? Ha;
|
|
7287
7303
|
}
|
|
7288
|
-
var
|
|
7289
|
-
let { hidden: a } =
|
|
7304
|
+
var Ja = r(function({ children: e, label: t = "valor oculto", className: n, ...r }, i) {
|
|
7305
|
+
let { hidden: a } = qa();
|
|
7290
7306
|
return /* @__PURE__ */ m("span", {
|
|
7291
7307
|
ref: i,
|
|
7292
7308
|
...r,
|
|
@@ -7295,15 +7311,15 @@ var qa = r(function({ children: e, label: t = "valor oculto", className: n, ...r
|
|
|
7295
7311
|
children: e
|
|
7296
7312
|
});
|
|
7297
7313
|
});
|
|
7298
|
-
function
|
|
7299
|
-
let n =
|
|
7300
|
-
return m(t ?
|
|
7314
|
+
function Ya({ cents: e, sensitive: t = !0 }) {
|
|
7315
|
+
let n = Ba(e);
|
|
7316
|
+
return m(t ? Ja : p, { children: n });
|
|
7301
7317
|
}
|
|
7302
|
-
var
|
|
7318
|
+
var Xa = new Intl.NumberFormat("pt-BR", {
|
|
7303
7319
|
signDisplay: "exceptZero",
|
|
7304
7320
|
minimumFractionDigits: 1,
|
|
7305
7321
|
maximumFractionDigits: 1
|
|
7306
|
-
}),
|
|
7322
|
+
}), Za = r(function({ value: e, invert: t = !1, caption: n, unit: r = "percent", className: i, ...a }, o) {
|
|
7307
7323
|
if (e == null || !Number.isFinite(e)) return /* @__PURE__ */ h("span", {
|
|
7308
7324
|
ref: o,
|
|
7309
7325
|
...a,
|
|
@@ -7319,7 +7335,7 @@ var Ya = new Intl.NumberFormat("pt-BR", {
|
|
|
7319
7335
|
className: `select-delta__value select-delta__value--${u}`,
|
|
7320
7336
|
children: [
|
|
7321
7337
|
d ? `${d} ` : "",
|
|
7322
|
-
|
|
7338
|
+
Xa.format(e),
|
|
7323
7339
|
r === "points" ? " p.p." : "%"
|
|
7324
7340
|
]
|
|
7325
7341
|
}), n != null && /* @__PURE__ */ m("span", {
|
|
@@ -7328,8 +7344,8 @@ var Ya = new Intl.NumberFormat("pt-BR", {
|
|
|
7328
7344
|
})]
|
|
7329
7345
|
});
|
|
7330
7346
|
});
|
|
7331
|
-
function
|
|
7332
|
-
let { hidden: e, toggle: t } =
|
|
7347
|
+
function Qa() {
|
|
7348
|
+
let { hidden: e, toggle: t } = qa();
|
|
7333
7349
|
return /* @__PURE__ */ m(J, {
|
|
7334
7350
|
variant: "outline",
|
|
7335
7351
|
icon: m(e ? Ue : He, {}),
|
|
@@ -7340,7 +7356,7 @@ function Za() {
|
|
|
7340
7356
|
}
|
|
7341
7357
|
//#endregion
|
|
7342
7358
|
//#region src/SelectOfferPrice.tsx
|
|
7343
|
-
var
|
|
7359
|
+
var $a = r(function({ price: e, was: t, hideDiscount: n = !1, zeroLabel: r, note: i, className: a, ...o }, s) {
|
|
7344
7360
|
let c = Number(e);
|
|
7345
7361
|
if (!Number.isFinite(c)) return null;
|
|
7346
7362
|
let l = Number(t), u = Number.isFinite(l) && l > c, d = u ? Math.round((l - c) / l * 100) : 0;
|
|
@@ -7351,11 +7367,11 @@ var Qa = r(function({ price: e, was: t, hideDiscount: n = !1, zeroLabel: r, note
|
|
|
7351
7367
|
children: [
|
|
7352
7368
|
/* @__PURE__ */ m("span", {
|
|
7353
7369
|
className: "select-offerprice__now",
|
|
7354
|
-
children: c === 0 && r != null ? r : /* @__PURE__ */ m(
|
|
7370
|
+
children: c === 0 && r != null ? r : /* @__PURE__ */ m(Ya, { cents: c })
|
|
7355
7371
|
}),
|
|
7356
7372
|
u && /* @__PURE__ */ m("s", {
|
|
7357
7373
|
className: "select-offerprice__was",
|
|
7358
|
-
children: /* @__PURE__ */ m(
|
|
7374
|
+
children: /* @__PURE__ */ m(Ya, { cents: l })
|
|
7359
7375
|
}),
|
|
7360
7376
|
u && !n && d > 0 && /* @__PURE__ */ h("span", {
|
|
7361
7377
|
className: "select-offerprice__off",
|
|
@@ -7374,7 +7390,7 @@ var Qa = r(function({ price: e, was: t, hideDiscount: n = !1, zeroLabel: r, note
|
|
|
7374
7390
|
});
|
|
7375
7391
|
//#endregion
|
|
7376
7392
|
//#region src/SelectRating.tsx
|
|
7377
|
-
function
|
|
7393
|
+
function eo({ size: e }) {
|
|
7378
7394
|
return /* @__PURE__ */ m("svg", {
|
|
7379
7395
|
width: e,
|
|
7380
7396
|
height: e,
|
|
@@ -7386,7 +7402,7 @@ function $a({ size: e }) {
|
|
|
7386
7402
|
})
|
|
7387
7403
|
});
|
|
7388
7404
|
}
|
|
7389
|
-
var
|
|
7405
|
+
var to = r(function({ value: e, max: t = 5, onChange: n, size: r = 20, label: i, disabled: a = !1, className: o, ...s }, c) {
|
|
7390
7406
|
let l = !!n && !a, [u, f] = d(null), p = u ?? e;
|
|
7391
7407
|
return /* @__PURE__ */ m("div", {
|
|
7392
7408
|
ref: c,
|
|
@@ -7401,7 +7417,7 @@ var eo = r(function({ value: e, max: t = 5, onChange: n, size: r = 20, label: i,
|
|
|
7401
7417
|
children: Array.from({ length: t }, (e, t) => {
|
|
7402
7418
|
let i = /* @__PURE__ */ m("span", {
|
|
7403
7419
|
className: `select-rating__star${t < p ? " is-filled" : ""}`,
|
|
7404
|
-
children: /* @__PURE__ */ m(
|
|
7420
|
+
children: /* @__PURE__ */ m(eo, { size: r })
|
|
7405
7421
|
});
|
|
7406
7422
|
return l ? /* @__PURE__ */ m("button", {
|
|
7407
7423
|
type: "button",
|
|
@@ -7415,14 +7431,14 @@ var eo = r(function({ value: e, max: t = 5, onChange: n, size: r = 20, label: i,
|
|
|
7415
7431
|
}, t) : /* @__PURE__ */ m("span", { children: i }, t);
|
|
7416
7432
|
})
|
|
7417
7433
|
});
|
|
7418
|
-
}),
|
|
7434
|
+
}), no = r(function({ stars: e, max: t = 5, title: n, text: r, className: i, ...a }, o) {
|
|
7419
7435
|
let s = Number(e), c = Number.isFinite(s) && s > 0;
|
|
7420
7436
|
return /* @__PURE__ */ h("div", {
|
|
7421
7437
|
ref: o,
|
|
7422
7438
|
...a,
|
|
7423
7439
|
className: `select-quote${i ? " " + i : ""}`,
|
|
7424
7440
|
children: [
|
|
7425
|
-
c && /* @__PURE__ */ m(
|
|
7441
|
+
c && /* @__PURE__ */ m(to, {
|
|
7426
7442
|
value: s,
|
|
7427
7443
|
max: t,
|
|
7428
7444
|
size: 13
|
|
@@ -7437,7 +7453,7 @@ var eo = r(function({ value: e, max: t = 5, onChange: n, size: r = 20, label: i,
|
|
|
7437
7453
|
})
|
|
7438
7454
|
]
|
|
7439
7455
|
});
|
|
7440
|
-
}),
|
|
7456
|
+
}), ro = r(function({ marks: e, max: t = 4, className: n, ...r }, i) {
|
|
7441
7457
|
let a = e.slice(0, t), o = e.length - a.length, s = a.some((e) => e.icon == null && (e.initials ?? "").length > 2);
|
|
7442
7458
|
return /* @__PURE__ */ h("div", {
|
|
7443
7459
|
ref: i,
|
|
@@ -7459,7 +7475,7 @@ var eo = r(function({ value: e, max: t = 5, onChange: n, size: r = 20, label: i,
|
|
|
7459
7475
|
children: ["+", o]
|
|
7460
7476
|
})]
|
|
7461
7477
|
});
|
|
7462
|
-
}),
|
|
7478
|
+
}), io = [
|
|
7463
7479
|
"Dom",
|
|
7464
7480
|
"Seg",
|
|
7465
7481
|
"Ter",
|
|
@@ -7467,7 +7483,7 @@ var eo = r(function({ value: e, max: t = 5, onChange: n, size: r = 20, label: i,
|
|
|
7467
7483
|
"Qui",
|
|
7468
7484
|
"Sex",
|
|
7469
7485
|
"Sáb"
|
|
7470
|
-
],
|
|
7486
|
+
], ao = [
|
|
7471
7487
|
"Janeiro",
|
|
7472
7488
|
"Fevereiro",
|
|
7473
7489
|
"Março",
|
|
@@ -7480,29 +7496,29 @@ var eo = r(function({ value: e, max: t = 5, onChange: n, size: r = 20, label: i,
|
|
|
7480
7496
|
"Outubro",
|
|
7481
7497
|
"Novembro",
|
|
7482
7498
|
"Dezembro"
|
|
7483
|
-
],
|
|
7484
|
-
function
|
|
7499
|
+
], oo = (e) => String(e).padStart(2, "0"), so = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), co = (e) => new Date(e.getFullYear(), e.getMonth(), 1), lo = (e, t) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + t), uo = (e, t) => new Date(e.getFullYear(), e.getMonth() + t, 1), fo = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
7500
|
+
function po(e) {
|
|
7485
7501
|
let t = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2}))?/.exec(e || "");
|
|
7486
7502
|
return t ? new Date(Number(t[1]), Number(t[2]) - 1, Number(t[3]), Number(t[4] ?? 0), Number(t[5] ?? 0)) : null;
|
|
7487
7503
|
}
|
|
7488
|
-
function po(e, t) {
|
|
7489
|
-
let n = `${e.getFullYear()}-${ao(e.getMonth() + 1)}-${ao(e.getDate())}`;
|
|
7490
|
-
return t ? `${n}T${ao(e.getHours())}:${ao(e.getMinutes())}` : n;
|
|
7491
|
-
}
|
|
7492
7504
|
function mo(e, t) {
|
|
7493
|
-
let n = `${
|
|
7494
|
-
return t ? `${n}
|
|
7505
|
+
let n = `${e.getFullYear()}-${oo(e.getMonth() + 1)}-${oo(e.getDate())}`;
|
|
7506
|
+
return t ? `${n}T${oo(e.getHours())}:${oo(e.getMinutes())}` : n;
|
|
7507
|
+
}
|
|
7508
|
+
function ho(e, t) {
|
|
7509
|
+
let n = `${oo(e.getDate())}/${oo(e.getMonth() + 1)}/${e.getFullYear()}`;
|
|
7510
|
+
return t ? `${n} ${oo(e.getHours())}:${oo(e.getMinutes())}` : n;
|
|
7495
7511
|
}
|
|
7496
|
-
var
|
|
7497
|
-
let b = s(), x = g ?? b, [S, C] = d(!1), w =
|
|
7498
|
-
o || (E(
|
|
7512
|
+
var go = r(function({ label: e, value: t, onChange: n, showTime: r = !1, placeholder: i, required: a, disabled: o, error: c, hint: l, minDate: u, maxDate: f, clearable: p = !0, id: g, className: _, ...v }, y) {
|
|
7513
|
+
let b = s(), x = g ?? b, [S, C] = d(!1), w = po(t), [T, E] = d(() => co(w ?? /* @__PURE__ */ new Date())), D = u ? so(u) : null, O = f ? so(f) : null, k = (e) => !!D && so(e) < D || !!O && so(e) > O, A = lo(co(T), -co(T).getDay()), j = Array.from({ length: 42 }, (e, t) => lo(A, t)), M = so(/* @__PURE__ */ new Date()), N = () => {
|
|
7514
|
+
o || (E(co(w ?? /* @__PURE__ */ new Date())), C((e) => !e));
|
|
7499
7515
|
}, P = (e) => {
|
|
7500
7516
|
if (k(e)) return;
|
|
7501
7517
|
let t = new Date(e);
|
|
7502
|
-
r && t.setHours((w == null ? void 0 : w.getHours()) ?? 0, (w == null ? void 0 : w.getMinutes()) ?? 0, 0, 0), n(
|
|
7518
|
+
r && t.setHours((w == null ? void 0 : w.getHours()) ?? 0, (w == null ? void 0 : w.getMinutes()) ?? 0, 0, 0), n(mo(t, r)), r || C(!1);
|
|
7503
7519
|
}, F = (e) => {
|
|
7504
7520
|
let [t = "", r = ""] = e.split(":"), i = Number(t), a = Number(r), o = new Date(w ?? M);
|
|
7505
|
-
o.setHours(Number.isFinite(i) ? i : 0, Number.isFinite(a) ? a : 0, 0, 0), n(
|
|
7521
|
+
o.setHours(Number.isFinite(i) ? i : 0, Number.isFinite(a) ? a : 0, 0, 0), n(mo(o, !0));
|
|
7506
7522
|
}, I = () => {
|
|
7507
7523
|
n(""), C(!1);
|
|
7508
7524
|
}, L = /* @__PURE__ */ h("div", {
|
|
@@ -7516,7 +7532,7 @@ var ho = r(function({ label: e, value: t, onChange: n, showTime: r = !1, placeho
|
|
|
7516
7532
|
"aria-haspopup": "dialog",
|
|
7517
7533
|
"aria-expanded": S,
|
|
7518
7534
|
"aria-invalid": c ? !0 : void 0,
|
|
7519
|
-
children: w ?
|
|
7535
|
+
children: w ? ho(w, r) : /* @__PURE__ */ m("span", {
|
|
7520
7536
|
className: "select-datefield__ph",
|
|
7521
7537
|
children: i ?? (r ? "Selecione data e hora" : "Selecione uma data")
|
|
7522
7538
|
})
|
|
@@ -7553,13 +7569,13 @@ var ho = r(function({ label: e, value: t, onChange: n, showTime: r = !1, placeho
|
|
|
7553
7569
|
type: "button",
|
|
7554
7570
|
className: "select-datepicker__nav",
|
|
7555
7571
|
"aria-label": "Mês anterior",
|
|
7556
|
-
onClick: () => E((e) =>
|
|
7557
|
-
children: /* @__PURE__ */ m(
|
|
7572
|
+
onClick: () => E((e) => uo(e, -1)),
|
|
7573
|
+
children: /* @__PURE__ */ m(U, {})
|
|
7558
7574
|
}),
|
|
7559
7575
|
/* @__PURE__ */ h("span", {
|
|
7560
7576
|
className: "select-datepicker__monthlabel",
|
|
7561
7577
|
children: [
|
|
7562
|
-
|
|
7578
|
+
ao[T.getMonth()],
|
|
7563
7579
|
" ",
|
|
7564
7580
|
T.getFullYear()
|
|
7565
7581
|
]
|
|
@@ -7568,19 +7584,19 @@ var ho = r(function({ label: e, value: t, onChange: n, showTime: r = !1, placeho
|
|
|
7568
7584
|
type: "button",
|
|
7569
7585
|
className: "select-datepicker__nav",
|
|
7570
7586
|
"aria-label": "Próximo mês",
|
|
7571
|
-
onClick: () => E((e) =>
|
|
7572
|
-
children: /* @__PURE__ */ m(
|
|
7587
|
+
onClick: () => E((e) => uo(e, 1)),
|
|
7588
|
+
children: /* @__PURE__ */ m(ae, {})
|
|
7573
7589
|
})
|
|
7574
7590
|
]
|
|
7575
7591
|
}),
|
|
7576
7592
|
/* @__PURE__ */ h("div", {
|
|
7577
7593
|
className: "select-datepicker__grid",
|
|
7578
7594
|
role: "grid",
|
|
7579
|
-
children: [
|
|
7595
|
+
children: [io.map((e) => /* @__PURE__ */ m("div", {
|
|
7580
7596
|
className: "select-datepicker__weekday",
|
|
7581
7597
|
children: e
|
|
7582
7598
|
}, e)), j.map((e) => {
|
|
7583
|
-
let t = e.getMonth() !== T.getMonth(), n = !!w &&
|
|
7599
|
+
let t = e.getMonth() !== T.getMonth(), n = !!w && fo(e, w), r = "select-datepicker__daybtn" + (n ? " is-selected" : "") + (fo(e, M) && !n ? " is-today" : "") + (t ? " is-outside" : "");
|
|
7584
7600
|
return /* @__PURE__ */ m("div", {
|
|
7585
7601
|
className: "select-datepicker__day",
|
|
7586
7602
|
children: /* @__PURE__ */ m("button", {
|
|
@@ -7602,25 +7618,25 @@ var ho = r(function({ label: e, value: t, onChange: n, showTime: r = !1, placeho
|
|
|
7602
7618
|
type: "time",
|
|
7603
7619
|
className: "select-input select-datefield__time-input",
|
|
7604
7620
|
"aria-label": "Horário",
|
|
7605
|
-
value: w ? `${
|
|
7621
|
+
value: w ? `${oo(w.getHours())}:${oo(w.getMinutes())}` : "",
|
|
7606
7622
|
onChange: (e) => F(e.target.value)
|
|
7607
7623
|
})]
|
|
7608
7624
|
}),
|
|
7609
7625
|
/* @__PURE__ */ h("div", {
|
|
7610
7626
|
className: "select-datefield__footer",
|
|
7611
|
-
children: [p && w ? /* @__PURE__ */ m(
|
|
7627
|
+
children: [p && w ? /* @__PURE__ */ m(V, {
|
|
7612
7628
|
variant: "secondary",
|
|
7613
7629
|
inline: !0,
|
|
7614
7630
|
onClick: I,
|
|
7615
7631
|
children: "Limpar"
|
|
7616
7632
|
}) : /* @__PURE__ */ m("span", {}), /* @__PURE__ */ h("div", {
|
|
7617
7633
|
className: "select-datefield__footer-right",
|
|
7618
|
-
children: [/* @__PURE__ */ m(
|
|
7634
|
+
children: [/* @__PURE__ */ m(V, {
|
|
7619
7635
|
variant: "secondary",
|
|
7620
7636
|
inline: !0,
|
|
7621
7637
|
onClick: () => P(M),
|
|
7622
7638
|
children: "Hoje"
|
|
7623
|
-
}), r && /* @__PURE__ */ m(
|
|
7639
|
+
}), r && /* @__PURE__ */ m(V, {
|
|
7624
7640
|
variant: "primary",
|
|
7625
7641
|
inline: !0,
|
|
7626
7642
|
onClick: () => C(!1),
|
|
@@ -7643,25 +7659,25 @@ var ho = r(function({ label: e, value: t, onChange: n, showTime: r = !1, placeho
|
|
|
7643
7659
|
}) : null
|
|
7644
7660
|
]
|
|
7645
7661
|
});
|
|
7646
|
-
}),
|
|
7647
|
-
function
|
|
7648
|
-
let t =
|
|
7662
|
+
}), _o = /^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2}))?$/;
|
|
7663
|
+
function vo(e) {
|
|
7664
|
+
let t = _o.exec(e ?? "");
|
|
7649
7665
|
if (!t) return null;
|
|
7650
7666
|
let n = `${t[3]}/${t[2]}/${t[1]}`;
|
|
7651
7667
|
return t[4] == null ? n : `${n} ${t[4]}:${t[5]}`;
|
|
7652
7668
|
}
|
|
7653
7669
|
//#endregion
|
|
7654
7670
|
//#region src/SelectFilterBar.tsx
|
|
7655
|
-
function
|
|
7671
|
+
function yo(e, t) {
|
|
7656
7672
|
var n;
|
|
7657
|
-
return e.type === "select" ? ((n = e.options) == null || (n = n.find((e) => e.value === t)) == null ? void 0 : n.label) ?? t : e.type === "date" ?
|
|
7673
|
+
return e.type === "select" ? ((n = e.options) == null || (n = n.find((e) => e.value === t)) == null ? void 0 : n.label) ?? t : e.type === "date" ? vo(t) ?? t : t;
|
|
7658
7674
|
}
|
|
7659
|
-
function
|
|
7675
|
+
function bo({ filter: e, value: t, onChange: n, open: r, onToggle: i, onClose: a, disabled: s }) {
|
|
7660
7676
|
let [c, l] = d("");
|
|
7661
7677
|
o(() => {
|
|
7662
7678
|
r || l("");
|
|
7663
7679
|
}, [r]);
|
|
7664
|
-
let u = t.trim() !== "", f = u ?
|
|
7680
|
+
let u = t.trim() !== "", f = u ? yo(e, t) : null, p = u && !!e.error, g = e.options ?? [], _ = g.length > 7, v = _ ? g.filter((e) => e.label.toLowerCase().includes(c.trim().toLowerCase())) : g;
|
|
7665
7681
|
return /* @__PURE__ */ h(fn, {
|
|
7666
7682
|
active: r,
|
|
7667
7683
|
onClose: a,
|
|
@@ -7719,7 +7735,7 @@ function yo({ filter: e, value: t, onChange: n, open: r, onToggle: i, onClose: a
|
|
|
7719
7735
|
})]
|
|
7720
7736
|
}) : e.type === "date" ? /* @__PURE__ */ m("div", {
|
|
7721
7737
|
className: "select-facet__field",
|
|
7722
|
-
children: /* @__PURE__ */ m(
|
|
7738
|
+
children: /* @__PURE__ */ m(go, {
|
|
7723
7739
|
value: t,
|
|
7724
7740
|
onChange: n,
|
|
7725
7741
|
placeholder: e.placeholder,
|
|
@@ -7757,7 +7773,7 @@ function yo({ filter: e, value: t, onChange: n, open: r, onToggle: i, onClose: a
|
|
|
7757
7773
|
]
|
|
7758
7774
|
});
|
|
7759
7775
|
}
|
|
7760
|
-
var
|
|
7776
|
+
var xo = r(function({ filters: e, values: t, onChange: n, onClearAll: r, search: i, leading: a, disabled: o, className: s, ...c }, l) {
|
|
7761
7777
|
let [u, f] = d([]), [p, g] = d(null), [_, v] = d(!1), y = (e) => (t[e.key] ?? "").trim() !== "", b = (e) => !!e.pinned || y(e) || u.includes(e.key), x = e.filter(b), S = e.filter((e) => !b(e)), C = e.filter(y), w = () => {
|
|
7762
7778
|
f([]), g(null), r();
|
|
7763
7779
|
}, T = (e) => {
|
|
@@ -7796,7 +7812,7 @@ var bo = r(function({ filters: e, values: t, onChange: n, onClearAll: r, search:
|
|
|
7796
7812
|
})
|
|
7797
7813
|
]
|
|
7798
7814
|
}),
|
|
7799
|
-
x.map((e) => /* @__PURE__ */ m(
|
|
7815
|
+
x.map((e) => /* @__PURE__ */ m(bo, {
|
|
7800
7816
|
filter: e,
|
|
7801
7817
|
value: t[e.key] ?? "",
|
|
7802
7818
|
onChange: (t) => n(e.key, t),
|
|
@@ -7842,7 +7858,7 @@ var bo = r(function({ filters: e, values: t, onChange: n, onClearAll: r, search:
|
|
|
7842
7858
|
children: [
|
|
7843
7859
|
e.label,
|
|
7844
7860
|
": ",
|
|
7845
|
-
|
|
7861
|
+
yo(e, t[e.key] ?? ""),
|
|
7846
7862
|
/* @__PURE__ */ m("button", {
|
|
7847
7863
|
type: "button",
|
|
7848
7864
|
className: "select-filterbar__tagx",
|
|
@@ -7859,7 +7875,7 @@ var bo = r(function({ filters: e, values: t, onChange: n, onClearAll: r, search:
|
|
|
7859
7875
|
})]
|
|
7860
7876
|
})]
|
|
7861
7877
|
});
|
|
7862
|
-
}),
|
|
7878
|
+
}), So = r(function({ label: e, options: t, selected: n, onChange: r, placeholder: i = "Selecionar…", hint: a, help: o, error: s, onBlur: c, size: l = "md", className: u, ...f }, p) {
|
|
7863
7879
|
let [g, _] = d(!1), [v, y] = d(""), b = t.filter((e) => e.label.toLowerCase().includes(v.trim().toLowerCase())), x = (e) => r(n.includes(e) ? n.filter((t) => t !== e) : [...n, e]), S = n.map((e) => t.find((t) => t.value === e)).filter((e) => e != null);
|
|
7864
7880
|
return /* @__PURE__ */ h("div", {
|
|
7865
7881
|
ref: p,
|
|
@@ -7972,7 +7988,7 @@ var bo = r(function({ filters: e, values: t, onChange: n, onClearAll: r, search:
|
|
|
7972
7988
|
}) : null
|
|
7973
7989
|
]
|
|
7974
7990
|
});
|
|
7975
|
-
}),
|
|
7991
|
+
}), Co = r(function({ title: e, description: t, headerAction: n, footer: r, children: i, flush: a = !1, className: o, ...s }, c) {
|
|
7976
7992
|
return /* @__PURE__ */ h("div", {
|
|
7977
7993
|
ref: c,
|
|
7978
7994
|
...s,
|
|
@@ -8004,8 +8020,8 @@ var bo = r(function({ filters: e, values: t, onChange: n, onClearAll: r, search:
|
|
|
8004
8020
|
})
|
|
8005
8021
|
]
|
|
8006
8022
|
});
|
|
8007
|
-
}),
|
|
8008
|
-
function
|
|
8023
|
+
}), wo = n(null), To = 220, Eo = 4e3, Do = 8, Oo = .04, ko = 5;
|
|
8024
|
+
function Ao({ children: e }) {
|
|
8009
8025
|
let [t, n] = d([]), r = u(0), a = u(/* @__PURE__ */ new Map()), s = i((e) => {
|
|
8010
8026
|
n((t) => t.filter((t) => t.id !== e)), a.current.delete(e);
|
|
8011
8027
|
}, []), c = i((e) => {
|
|
@@ -8013,9 +8029,9 @@ function ko({ children: e }) {
|
|
|
8013
8029
|
t && clearTimeout(t), n((t) => t.map((t) => t.id === e ? {
|
|
8014
8030
|
...t,
|
|
8015
8031
|
exiting: !0
|
|
8016
|
-
} : t)), a.current.set(e, setTimeout(() => s(e),
|
|
8032
|
+
} : t)), a.current.set(e, setTimeout(() => s(e), To));
|
|
8017
8033
|
}, [s]), f = i((e, t) => {
|
|
8018
|
-
let i = ++r.current, o = (t == null ? void 0 : t.duration) ??
|
|
8034
|
+
let i = ++r.current, o = (t == null ? void 0 : t.duration) ?? Eo;
|
|
8019
8035
|
n((n) => [...n, {
|
|
8020
8036
|
id: i,
|
|
8021
8037
|
content: e,
|
|
@@ -8043,7 +8059,7 @@ function ko({ children: e }) {
|
|
|
8043
8059
|
duration: t
|
|
8044
8060
|
})
|
|
8045
8061
|
}), [f]);
|
|
8046
|
-
return /* @__PURE__ */ h(
|
|
8062
|
+
return /* @__PURE__ */ h(wo.Provider, {
|
|
8047
8063
|
value: p,
|
|
8048
8064
|
children: [e, t.length > 0 && g(/* @__PURE__ */ m("div", {
|
|
8049
8065
|
className: "select select-toasts",
|
|
@@ -8051,8 +8067,8 @@ function ko({ children: e }) {
|
|
|
8051
8067
|
"aria-live": "polite",
|
|
8052
8068
|
"aria-label": "Notificações",
|
|
8053
8069
|
children: t.map((e, n) => {
|
|
8054
|
-
let r = t.length - 1 - n, i = e.exiting || r >=
|
|
8055
|
-
transform: `translate(-50%, ${-r *
|
|
8070
|
+
let r = t.length - 1 - n, i = e.exiting || r >= ko, a = {
|
|
8071
|
+
transform: `translate(-50%, ${-r * Do}px) scale(${1 - r * Oo})`,
|
|
8056
8072
|
opacity: +!i,
|
|
8057
8073
|
zIndex: 1e3 - r,
|
|
8058
8074
|
pointerEvents: r === 0 && !e.exiting ? "auto" : "none"
|
|
@@ -8076,14 +8092,14 @@ function ko({ children: e }) {
|
|
|
8076
8092
|
}), document.body)]
|
|
8077
8093
|
});
|
|
8078
8094
|
}
|
|
8079
|
-
function
|
|
8080
|
-
let e = a(
|
|
8095
|
+
function jo() {
|
|
8096
|
+
let e = a(wo);
|
|
8081
8097
|
if (!e) throw Error("useSelectToast must be used within a SelectToastProvider");
|
|
8082
8098
|
return e;
|
|
8083
8099
|
}
|
|
8084
8100
|
//#endregion
|
|
8085
8101
|
//#region src/SelectPreviewFrame.tsx
|
|
8086
|
-
var
|
|
8102
|
+
var Mo = "allow-scripts allow-same-origin allow-forms", No = 390, Po = 1280, Fo = r(function({ src: e, sandbox: t = Mo, title: n = "Pré-visualização", height: r = 560, fill: i = !1, initialDevice: a = "desktop", showDeviceToggle: o = !0, emptyLabel: s = "Salve para gerar a pré-visualização.", onReload: l, notice: f, iframeRef: g, desktopWidth: _ = Po, className: v, ...y }, b) {
|
|
8087
8103
|
let x = $r(e), [S, C] = d(a), [w, T] = d(0), [E, D] = d(!0), O = u(null), [k, A] = d({
|
|
8088
8104
|
w: 0,
|
|
8089
8105
|
h: 0
|
|
@@ -8101,7 +8117,7 @@ var jo = "allow-scripts allow-same-origin allow-forms", Mo = 390, No = 1280, Po
|
|
|
8101
8117
|
});
|
|
8102
8118
|
return t.observe(e), () => t.disconnect();
|
|
8103
8119
|
}, []);
|
|
8104
|
-
let j = S === "mobile" ?
|
|
8120
|
+
let j = S === "mobile" ? No : _, M = k.w > 0 ? Math.min(1, k.w / j) : 1, N = x ? `${x}${x.includes("?") ? "&" : "?"}_pv=${w}` : "", P = () => {
|
|
8105
8121
|
if (D(!0), l) {
|
|
8106
8122
|
l();
|
|
8107
8123
|
return;
|
|
@@ -8190,7 +8206,7 @@ var jo = "allow-scripts allow-same-origin allow-forms", Mo = 390, No = 1280, Po
|
|
|
8190
8206
|
})
|
|
8191
8207
|
})]
|
|
8192
8208
|
});
|
|
8193
|
-
}),
|
|
8209
|
+
}), Io = r(function({ availableCents: e, availableLabel: t = "Saldo disponível", delta: n, buckets: r = [], action: i, className: a, ...o }, s) {
|
|
8194
8210
|
return /* @__PURE__ */ h("div", {
|
|
8195
8211
|
ref: s,
|
|
8196
8212
|
...o,
|
|
@@ -8200,7 +8216,7 @@ var jo = "allow-scripts allow-same-origin allow-forms", Mo = 390, No = 1280, Po
|
|
|
8200
8216
|
children: [/* @__PURE__ */ m("h3", {
|
|
8201
8217
|
className: "select-balance__title",
|
|
8202
8218
|
children: t
|
|
8203
|
-
}), i && /* @__PURE__ */ m(
|
|
8219
|
+
}), i && /* @__PURE__ */ m(V, {
|
|
8204
8220
|
variant: "primary",
|
|
8205
8221
|
size: "sm",
|
|
8206
8222
|
inline: !0,
|
|
@@ -8215,8 +8231,8 @@ var jo = "allow-scripts allow-same-origin allow-forms", Mo = 390, No = 1280, Po
|
|
|
8215
8231
|
className: "select-balance__heromain",
|
|
8216
8232
|
children: [/* @__PURE__ */ m("span", {
|
|
8217
8233
|
className: "select-balance__heroamount",
|
|
8218
|
-
children: /* @__PURE__ */ m(
|
|
8219
|
-
}), n != null && /* @__PURE__ */ m(
|
|
8234
|
+
children: /* @__PURE__ */ m(Ya, { cents: e })
|
|
8235
|
+
}), n != null && /* @__PURE__ */ m(Za, {
|
|
8220
8236
|
value: n,
|
|
8221
8237
|
caption: "vs. período anterior"
|
|
8222
8238
|
})]
|
|
@@ -8235,14 +8251,14 @@ var jo = "allow-scripts allow-same-origin allow-forms", Mo = 390, No = 1280, Po
|
|
|
8235
8251
|
children: e.label
|
|
8236
8252
|
}), /* @__PURE__ */ m("span", {
|
|
8237
8253
|
className: "select-balance__bucketamount",
|
|
8238
|
-
children: /* @__PURE__ */ m(
|
|
8254
|
+
children: /* @__PURE__ */ m(Ya, { cents: e.cents })
|
|
8239
8255
|
})]
|
|
8240
8256
|
})]
|
|
8241
8257
|
}, e.label))
|
|
8242
8258
|
})]
|
|
8243
8259
|
})]
|
|
8244
8260
|
});
|
|
8245
|
-
}),
|
|
8261
|
+
}), Lo = r(function({ grossCents: e, fees: t, netCents: n, grossLabel: r = "Valor bruto", netLabel: i = "Valor líquido", className: a, ...o }, s) {
|
|
8246
8262
|
let c = n ?? e - t.reduce((e, t) => e + t.cents, 0);
|
|
8247
8263
|
return /* @__PURE__ */ h("div", {
|
|
8248
8264
|
ref: s,
|
|
@@ -8251,13 +8267,13 @@ var jo = "allow-scripts allow-same-origin allow-forms", Mo = 390, No = 1280, Po
|
|
|
8251
8267
|
children: [
|
|
8252
8268
|
/* @__PURE__ */ h("div", {
|
|
8253
8269
|
className: "select-fees__row",
|
|
8254
|
-
children: [/* @__PURE__ */ m("span", { children: r }), /* @__PURE__ */ m("span", { children: /* @__PURE__ */ m(
|
|
8270
|
+
children: [/* @__PURE__ */ m("span", { children: r }), /* @__PURE__ */ m("span", { children: /* @__PURE__ */ m(Ya, { cents: e }) })]
|
|
8255
8271
|
}),
|
|
8256
8272
|
t.map((e) => /* @__PURE__ */ h("div", {
|
|
8257
8273
|
className: "select-fees__row",
|
|
8258
8274
|
children: [/* @__PURE__ */ m("span", { children: e.label }), /* @__PURE__ */ h("span", {
|
|
8259
8275
|
className: "select-fees__neg",
|
|
8260
|
-
children: ["−\xA0", /* @__PURE__ */ m(
|
|
8276
|
+
children: ["−\xA0", /* @__PURE__ */ m(Ya, { cents: e.cents })]
|
|
8261
8277
|
})]
|
|
8262
8278
|
}, e.label)),
|
|
8263
8279
|
/* @__PURE__ */ m("div", { className: "select-fees__divider" }),
|
|
@@ -8265,12 +8281,12 @@ var jo = "allow-scripts allow-same-origin allow-forms", Mo = 390, No = 1280, Po
|
|
|
8265
8281
|
className: "select-fees__row select-fees__row--net",
|
|
8266
8282
|
children: [/* @__PURE__ */ m("span", { children: i }), /* @__PURE__ */ m("span", {
|
|
8267
8283
|
className: "select-fees__netvalue",
|
|
8268
|
-
children: /* @__PURE__ */ m(
|
|
8284
|
+
children: /* @__PURE__ */ m(Ya, { cents: c })
|
|
8269
8285
|
})]
|
|
8270
8286
|
})
|
|
8271
8287
|
]
|
|
8272
8288
|
});
|
|
8273
|
-
}),
|
|
8289
|
+
}), Ro = r(function({ label: e, value: t, caption: n, chart: r, help: i, tone: a, bare: o = !1, onClick: s, selected: c = !1, loading: l = !1, className: u, ...d }, f) {
|
|
8274
8290
|
let g = s != null, _ = g ? {
|
|
8275
8291
|
role: "button",
|
|
8276
8292
|
tabIndex: 0,
|
|
@@ -8315,7 +8331,7 @@ var jo = "allow-scripts allow-same-origin allow-forms", Mo = 390, No = 1280, Po
|
|
|
8315
8331
|
})
|
|
8316
8332
|
] })]
|
|
8317
8333
|
});
|
|
8318
|
-
}),
|
|
8334
|
+
}), zo = r(function({ title: e, caption: t, action: n, help: r, loading: i = !1, hideValues: a = !1, height: o = 260, flush: s = !1, insight: c, insightTone: l = "neutral", children: u, className: d, ...f }, p) {
|
|
8319
8335
|
let g = o === "auto" ? void 0 : `${o / 16}rem`, _ = o === "auto" ? "10rem" : `${o / 16}rem`;
|
|
8320
8336
|
return /* @__PURE__ */ h("div", {
|
|
8321
8337
|
ref: p,
|
|
@@ -8358,7 +8374,7 @@ var jo = "allow-scripts allow-same-origin allow-forms", Mo = 390, No = 1280, Po
|
|
|
8358
8374
|
});
|
|
8359
8375
|
//#endregion
|
|
8360
8376
|
//#region src/chartUtils.ts
|
|
8361
|
-
function
|
|
8377
|
+
function Bo() {
|
|
8362
8378
|
let [e, t] = d(1);
|
|
8363
8379
|
return c(() => {
|
|
8364
8380
|
let e = () => {
|
|
@@ -8369,7 +8385,7 @@ function zo() {
|
|
|
8369
8385
|
}, []), e;
|
|
8370
8386
|
}
|
|
8371
8387
|
function Y(e) {
|
|
8372
|
-
let t = u(null), [n, r] = d(0), i =
|
|
8388
|
+
let t = u(null), [n, r] = d(0), i = Bo();
|
|
8373
8389
|
return c(() => {
|
|
8374
8390
|
let e = t.current;
|
|
8375
8391
|
if (!e) return;
|
|
@@ -8386,7 +8402,7 @@ function Y(e) {
|
|
|
8386
8402
|
height: Math.round(e * i)
|
|
8387
8403
|
};
|
|
8388
8404
|
}
|
|
8389
|
-
function
|
|
8405
|
+
function Vo(e, t) {
|
|
8390
8406
|
let [n, r] = d(t);
|
|
8391
8407
|
return c(() => {
|
|
8392
8408
|
let t = e.current;
|
|
@@ -8400,15 +8416,15 @@ function Bo(e, t) {
|
|
|
8400
8416
|
return i.observe(t), () => i.disconnect();
|
|
8401
8417
|
}, [e]), n;
|
|
8402
8418
|
}
|
|
8403
|
-
function
|
|
8419
|
+
function Ho(e) {
|
|
8404
8420
|
if (e <= 0) return 1;
|
|
8405
8421
|
let t = 10 ** Math.floor(Math.log10(e)), n = e / t;
|
|
8406
8422
|
return (n <= 1 ? 1 : n <= 2 ? 2 : n <= 5 ? 5 : 10) * t;
|
|
8407
8423
|
}
|
|
8408
|
-
function
|
|
8424
|
+
function Uo(e, t = 4) {
|
|
8409
8425
|
return Array.from({ length: t + 1 }, (n, r) => e / t * r);
|
|
8410
8426
|
}
|
|
8411
|
-
function
|
|
8427
|
+
function Wo(e, t = 5) {
|
|
8412
8428
|
if (!(e > 0)) return {
|
|
8413
8429
|
max: 1,
|
|
8414
8430
|
values: [0, 1]
|
|
@@ -8420,10 +8436,10 @@ function Uo(e, t = 5) {
|
|
|
8420
8436
|
values: s
|
|
8421
8437
|
};
|
|
8422
8438
|
}
|
|
8423
|
-
function
|
|
8439
|
+
function Go(e) {
|
|
8424
8440
|
return e.map((e, t) => `${t === 0 ? "M" : "L"}${e[0].toFixed(2)},${e[1].toFixed(2)}`).join(" ");
|
|
8425
8441
|
}
|
|
8426
|
-
function
|
|
8442
|
+
function Ko(e) {
|
|
8427
8443
|
let t = e.length;
|
|
8428
8444
|
if (t === 0) return "";
|
|
8429
8445
|
if (t === 1) return `M${e[0][0].toFixed(2)},${e[0][1].toFixed(2)}`;
|
|
@@ -8447,23 +8463,23 @@ function Go(e) {
|
|
|
8447
8463
|
}
|
|
8448
8464
|
return s;
|
|
8449
8465
|
}
|
|
8450
|
-
function
|
|
8466
|
+
function qo(e, t) {
|
|
8451
8467
|
if (e.length === 0) return "";
|
|
8452
8468
|
let n = e[0], r = e[e.length - 1];
|
|
8453
|
-
return `${
|
|
8469
|
+
return `${Ko(e)} L${r[0].toFixed(2)},${t.toFixed(2)} L${n[0].toFixed(2)},${t.toFixed(2)} Z`;
|
|
8454
8470
|
}
|
|
8455
|
-
function
|
|
8456
|
-
return e.length === 0 || t.length === 0 ? "" : `${
|
|
8471
|
+
function Jo(e, t) {
|
|
8472
|
+
return e.length === 0 || t.length === 0 ? "" : `${Ko(e)} ${Ko([...t].reverse()).replace(/^M/, "L")} Z`;
|
|
8457
8473
|
}
|
|
8458
|
-
function
|
|
8474
|
+
function Yo(e, t, n, r) {
|
|
8459
8475
|
let i = (r - 90) * Math.PI / 180;
|
|
8460
8476
|
return [e + n * Math.cos(i), t + n * Math.sin(i)];
|
|
8461
8477
|
}
|
|
8462
|
-
function
|
|
8463
|
-
let [o, s] =
|
|
8478
|
+
function Xo(e, t, n, r, i, a) {
|
|
8479
|
+
let [o, s] = Yo(e, t, n, i), [c, l] = Yo(e, t, n, a), [u, d] = Yo(e, t, r, a), [f, p] = Yo(e, t, r, i), m = +(a - i > 180);
|
|
8464
8480
|
return `M${o.toFixed(2)},${s.toFixed(2)} A${n},${n} 0 ${m} 1 ${c.toFixed(2)},${l.toFixed(2)} L${u.toFixed(2)},${d.toFixed(2)} A${r},${r} 0 ${m} 0 ${f.toFixed(2)},${p.toFixed(2)} Z`;
|
|
8465
8481
|
}
|
|
8466
|
-
var
|
|
8482
|
+
var Zo = [
|
|
8467
8483
|
"var(--select-chart-1)",
|
|
8468
8484
|
"var(--select-chart-2)",
|
|
8469
8485
|
"var(--select-chart-3)",
|
|
@@ -8471,13 +8487,13 @@ var Xo = [
|
|
|
8471
8487
|
"var(--select-chart-5)"
|
|
8472
8488
|
];
|
|
8473
8489
|
function X(e) {
|
|
8474
|
-
return
|
|
8490
|
+
return Zo[e % Zo.length];
|
|
8475
8491
|
}
|
|
8476
8492
|
function Z(e) {
|
|
8477
8493
|
let t = Math.abs(e);
|
|
8478
8494
|
return t >= 1e9 ? (e / 1e9).toFixed(1).replace(/\.0$/, "") + "B" : t >= 1e6 ? (e / 1e6).toFixed(1).replace(/\.0$/, "") + "M" : t >= 1e3 ? (e / 1e3).toFixed(1).replace(/\.0$/, "") + "k" : String(Math.round(e));
|
|
8479
8495
|
}
|
|
8480
|
-
var
|
|
8496
|
+
var Qo = {
|
|
8481
8497
|
top: 16,
|
|
8482
8498
|
right: 22,
|
|
8483
8499
|
bottom: 32,
|
|
@@ -8485,7 +8501,7 @@ var Zo = {
|
|
|
8485
8501
|
};
|
|
8486
8502
|
//#endregion
|
|
8487
8503
|
//#region src/SelectSparkline.tsx
|
|
8488
|
-
function
|
|
8504
|
+
function $o({ data: e, color: t, height: n = 40, className: r, ...i }) {
|
|
8489
8505
|
let { ref: a, width: o } = Y(n), c = t ?? X(0), l = s(), u = null;
|
|
8490
8506
|
if (o > 0 && e.length > 1) {
|
|
8491
8507
|
let t = Math.max(...e), r = Math.min(...e), i = t - r || 1, a = e.map((t, a) => [4 + a / (e.length - 1) * (o - 8), n - 4 - (t - r) / i * (n - 8)]), s = a[a.length - 1];
|
|
@@ -8512,11 +8528,11 @@ function Qo({ data: e, color: t, height: n = 40, className: r, ...i }) {
|
|
|
8512
8528
|
})]
|
|
8513
8529
|
}) }),
|
|
8514
8530
|
/* @__PURE__ */ m("path", {
|
|
8515
|
-
d:
|
|
8531
|
+
d: qo(a, n - 4),
|
|
8516
8532
|
fill: `url(#${l}-sa)`
|
|
8517
8533
|
}),
|
|
8518
8534
|
/* @__PURE__ */ m("path", {
|
|
8519
|
-
d:
|
|
8535
|
+
d: Ko(a),
|
|
8520
8536
|
fill: "none",
|
|
8521
8537
|
stroke: c,
|
|
8522
8538
|
strokeWidth: 2,
|
|
@@ -8597,8 +8613,8 @@ function $({ tip: e, className: t, ...n }) {
|
|
|
8597
8613
|
}
|
|
8598
8614
|
//#endregion
|
|
8599
8615
|
//#region src/SelectBarChart.tsx
|
|
8600
|
-
function
|
|
8601
|
-
let { ref: o, width: c } = Y(t), l = Q(), u = s(), d = n ?? X(0), f =
|
|
8616
|
+
function es({ data: e, height: t = 240, color: n, format: r = Z, className: i, ...a }) {
|
|
8617
|
+
let { ref: o, width: c } = Y(t), l = Q(), u = s(), d = n ?? X(0), f = Ho(Math.max(0, ...e.map((e) => e.value))), p = Qo, g = Math.max(0, c - p.left - p.right), _ = t - p.top - p.bottom, v = e.length > 0 ? g / e.length : 0, y = Math.min(v * .62, 44), b = p.top + _, x = (e) => b - e / f * _;
|
|
8602
8618
|
return /* @__PURE__ */ h("div", {
|
|
8603
8619
|
...a,
|
|
8604
8620
|
className: `select-chart-wrap${i ? " " + i : ""}`,
|
|
@@ -8624,7 +8640,7 @@ function $o({ data: e, height: t = 240, color: n, format: r = Z, className: i, .
|
|
|
8624
8640
|
stopOpacity: .62
|
|
8625
8641
|
})]
|
|
8626
8642
|
}) }),
|
|
8627
|
-
|
|
8643
|
+
Uo(f).map((e, t) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
|
|
8628
8644
|
x1: p.left,
|
|
8629
8645
|
x2: c - p.right,
|
|
8630
8646
|
y1: x(e),
|
|
@@ -8674,8 +8690,8 @@ function $o({ data: e, height: t = 240, color: n, format: r = Z, className: i, .
|
|
|
8674
8690
|
}
|
|
8675
8691
|
//#endregion
|
|
8676
8692
|
//#region src/SelectLineChart.tsx
|
|
8677
|
-
function
|
|
8678
|
-
let { ref: c, width: l } = Y(n), u = Q(), f = s(), [p, g] = d(null), { max: _, values: v } =
|
|
8693
|
+
function ts({ series: e, labels: t, height: n = 240, format: r = Z, area: i = !1, className: a, ...o }) {
|
|
8694
|
+
let { ref: c, width: l } = Y(n), u = Q(), f = s(), [p, g] = d(null), { max: _, values: v } = Wo(Math.max(0, ...e.flatMap((e) => e.data))), y = Qo, b = Math.max(0, l - y.left - y.right), x = n - y.top - y.bottom, S = t.length, C = (e) => y.left + (S <= 1 ? b / 2 : e / (S - 1) * b), w = (e) => y.top + x - e / _ * x, T = S > 1 ? b / (S - 1) : b, E = Math.max(1, Math.ceil(S / 7)), D = y.top + x;
|
|
8679
8695
|
return /* @__PURE__ */ h("div", {
|
|
8680
8696
|
...o,
|
|
8681
8697
|
className: `select-chart-wrap${a ? " " + a : ""}`,
|
|
@@ -8728,11 +8744,11 @@ function es({ series: e, labels: t, height: n = 240, format: r = Z, area: i = !1
|
|
|
8728
8744
|
e.map((e, t) => {
|
|
8729
8745
|
let n = e.color ?? X(t), r = e.data.map((e, t) => [C(t), w(e)]);
|
|
8730
8746
|
return /* @__PURE__ */ h("g", { children: [i && /* @__PURE__ */ m("path", {
|
|
8731
|
-
d:
|
|
8747
|
+
d: qo(r, D),
|
|
8732
8748
|
fill: `url(#${f}-a${t})`,
|
|
8733
8749
|
className: "select-chart__area"
|
|
8734
8750
|
}), /* @__PURE__ */ m("path", {
|
|
8735
|
-
d:
|
|
8751
|
+
d: Ko(r),
|
|
8736
8752
|
fill: "none",
|
|
8737
8753
|
stroke: n,
|
|
8738
8754
|
strokeWidth: 2.25,
|
|
@@ -8787,8 +8803,8 @@ function es({ series: e, labels: t, height: n = 240, format: r = Z, area: i = !1
|
|
|
8787
8803
|
}
|
|
8788
8804
|
//#endregion
|
|
8789
8805
|
//#region src/SelectStackedArea.tsx
|
|
8790
|
-
function
|
|
8791
|
-
let { ref: o, width: c } = Y(n), l = Q(), u = s(), [f, p] = d(null), g = t.length, _ = Array(g).fill(0), v = e.map((e) => e.data.map((e, t) => (_[t] = (_[t] ?? 0) + (e ?? 0), _[t]))), y =
|
|
8806
|
+
function ns({ series: e, labels: t, height: n = 240, format: r = Z, className: i, ...a }) {
|
|
8807
|
+
let { ref: o, width: c } = Y(n), l = Q(), u = s(), [f, p] = d(null), g = t.length, _ = Array(g).fill(0), v = e.map((e) => e.data.map((e, t) => (_[t] = (_[t] ?? 0) + (e ?? 0), _[t]))), y = Ho(Math.max(0, ..._)), b = Qo, x = Math.max(0, c - b.left - b.right), S = n - b.top - b.bottom, C = (e) => b.left + (g <= 1 ? x / 2 : e / (g - 1) * x), w = (e) => b.top + S - e / y * S, T = g > 1 ? x / (g - 1) : x, E = Math.max(1, Math.ceil(g / 7)), D = b.top + S, O = v[v.length - 1];
|
|
8792
8808
|
return /* @__PURE__ */ h("div", {
|
|
8793
8809
|
...a,
|
|
8794
8810
|
className: `select-chart-wrap${i ? " " + i : ""}`,
|
|
@@ -8817,7 +8833,7 @@ function ts({ series: e, labels: t, height: n = 240, format: r = Z, className: i
|
|
|
8817
8833
|
})]
|
|
8818
8834
|
}, t);
|
|
8819
8835
|
}) }),
|
|
8820
|
-
|
|
8836
|
+
Uo(y).map((e, t) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
|
|
8821
8837
|
x1: b.left,
|
|
8822
8838
|
x2: c - b.right,
|
|
8823
8839
|
y1: w(e),
|
|
@@ -8836,10 +8852,10 @@ function ts({ series: e, labels: t, height: n = 240, format: r = Z, className: i
|
|
|
8836
8852
|
return /* @__PURE__ */ h("g", {
|
|
8837
8853
|
className: "select-chart__area",
|
|
8838
8854
|
children: [/* @__PURE__ */ m("path", {
|
|
8839
|
-
d:
|
|
8855
|
+
d: Jo(i, a),
|
|
8840
8856
|
fill: `url(#${u}-b${n})`
|
|
8841
8857
|
}), /* @__PURE__ */ m("path", {
|
|
8842
|
-
d:
|
|
8858
|
+
d: Ko(i),
|
|
8843
8859
|
fill: "none",
|
|
8844
8860
|
stroke: r,
|
|
8845
8861
|
strokeWidth: 1.5,
|
|
@@ -8893,11 +8909,11 @@ function ts({ series: e, labels: t, height: n = 240, format: r = Z, className: i
|
|
|
8893
8909
|
}
|
|
8894
8910
|
//#endregion
|
|
8895
8911
|
//#region src/SelectComboChart.tsx
|
|
8896
|
-
function
|
|
8912
|
+
function rs({ labels: e, bars: t, line: n, height: r = 240, formatBar: i = Z, formatLine: a = (e) => `${Math.round(e)}%`, className: o, ...c }) {
|
|
8897
8913
|
let { ref: l, width: u } = Y(r), f = Q(), p = s(), [g, _] = d(null), v = {
|
|
8898
|
-
...
|
|
8914
|
+
...Qo,
|
|
8899
8915
|
right: 58
|
|
8900
|
-
}, y = Math.max(0, u - v.left - v.right), b = r - v.top - v.bottom, x = e.length, S =
|
|
8916
|
+
}, y = Math.max(0, u - v.left - v.right), b = r - v.top - v.bottom, x = e.length, S = Ho(Math.max(0, ...t.data)), C = Ho(Math.max(0, ...n.data)), w = x > 0 ? y / x : 0, T = Math.min(w * .5, 36), E = Math.max(1, Math.ceil(x / 8)), D = t.color ?? X(0), O = n.color ?? X(1), k = v.top + b, A = (e) => k - e / S * b, j = (e) => k - e / C * b, M = (e) => v.left + w * e + w / 2, N = n.data.map((e, t) => [M(t), j(e)]);
|
|
8901
8917
|
return /* @__PURE__ */ h("div", {
|
|
8902
8918
|
...c,
|
|
8903
8919
|
className: `select-chart-wrap${o ? " " + o : ""}`,
|
|
@@ -8923,7 +8939,7 @@ function ns({ labels: e, bars: t, line: n, height: r = 240, formatBar: i = Z, fo
|
|
|
8923
8939
|
stopOpacity: .55
|
|
8924
8940
|
})]
|
|
8925
8941
|
}) }),
|
|
8926
|
-
|
|
8942
|
+
Uo(S).map((e, t) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
|
|
8927
8943
|
x1: v.left,
|
|
8928
8944
|
x2: u - v.right,
|
|
8929
8945
|
y1: A(e),
|
|
@@ -8937,7 +8953,7 @@ function ns({ labels: e, bars: t, line: n, height: r = 240, formatBar: i = Z, fo
|
|
|
8937
8953
|
textAnchor: "end",
|
|
8938
8954
|
children: i(e)
|
|
8939
8955
|
})] }, t)),
|
|
8940
|
-
|
|
8956
|
+
Uo(C).map((e, t) => /* @__PURE__ */ m("text", {
|
|
8941
8957
|
x: u - 4,
|
|
8942
8958
|
y: j(e),
|
|
8943
8959
|
className: "select-chart__ylabel",
|
|
@@ -8966,7 +8982,7 @@ function ns({ labels: e, bars: t, line: n, height: r = 240, formatBar: i = Z, fo
|
|
|
8966
8982
|
className: "select-chart__crosshair"
|
|
8967
8983
|
}),
|
|
8968
8984
|
/* @__PURE__ */ m("path", {
|
|
8969
|
-
d:
|
|
8985
|
+
d: Ko(N),
|
|
8970
8986
|
fill: "none",
|
|
8971
8987
|
stroke: O,
|
|
8972
8988
|
strokeWidth: 2.5,
|
|
@@ -9024,8 +9040,8 @@ function ns({ labels: e, bars: t, line: n, height: r = 240, formatBar: i = Z, fo
|
|
|
9024
9040
|
}
|
|
9025
9041
|
//#endregion
|
|
9026
9042
|
//#region src/SelectDonut.tsx
|
|
9027
|
-
var
|
|
9028
|
-
let p = Q(), g = s(), _ = u(null), v =
|
|
9043
|
+
var is = r(function({ segments: e, size: t = 200, thickness: n = 26, format: r = Z, centerLabel: i, legend: a = !0, gap: o = 2, pie: c = !1, className: l, ...d }, f) {
|
|
9044
|
+
let p = Q(), g = s(), _ = u(null), v = Vo(_, t), y = e.reduce((e, t) => e + t.value, 0) || 1, b = v / 2, x = v / 2, S = v / 2 - 2, C = c ? 0 : S - n, w = 0;
|
|
9029
9045
|
return /* @__PURE__ */ h("div", {
|
|
9030
9046
|
ref: f,
|
|
9031
9047
|
...d,
|
|
@@ -9068,7 +9084,7 @@ var rs = r(function({ segments: e, size: t = 200, thickness: n = 26, format: r =
|
|
|
9068
9084
|
w += e.value;
|
|
9069
9085
|
let i = w / y * 360, a = e.color ?? X(t), s = i - n > o * 1.5 ? o / 2 : 0, c = n + s, l = Math.max(c + .01, i - s);
|
|
9070
9086
|
return /* @__PURE__ */ m("path", {
|
|
9071
|
-
d:
|
|
9087
|
+
d: Xo(b, x, S, C, c, l),
|
|
9072
9088
|
fill: `url(#${g}-s${t})`,
|
|
9073
9089
|
className: "select-chart__seg",
|
|
9074
9090
|
onMouseEnter: () => {
|
|
@@ -9119,8 +9135,8 @@ var rs = r(function({ segments: e, size: t = 200, thickness: n = 26, format: r =
|
|
|
9119
9135
|
});
|
|
9120
9136
|
//#endregion
|
|
9121
9137
|
//#region src/SelectColumnChart.tsx
|
|
9122
|
-
function
|
|
9123
|
-
let { ref: c, width: l } = Y(n), u = Q(), d = s(), f = t.length, p = e.length || 1, g = t.map((t, n) => e.reduce((e, t) => e + (t.data[n] ?? 0), 0)), _ =
|
|
9138
|
+
function as({ series: e, labels: t, height: n = 240, format: r = Z, stacked: i = !1, className: a, ...o }) {
|
|
9139
|
+
let { ref: c, width: l } = Y(n), u = Q(), d = s(), f = t.length, p = e.length || 1, g = t.map((t, n) => e.reduce((e, t) => e + (t.data[n] ?? 0), 0)), _ = Ho(i ? Math.max(0, ...g) : Math.max(0, ...e.flatMap((e) => e.data))), v = Qo, y = Math.max(0, l - v.left - v.right), b = n - v.top - v.bottom, x = v.top + b, S = f ? y / f : 0, C = (e) => x - e / _ * b, w = Math.min(S * .72, p * 40), T = i ? Math.min(S * .5, 44) : w / p;
|
|
9124
9140
|
return /* @__PURE__ */ h("div", {
|
|
9125
9141
|
...o,
|
|
9126
9142
|
className: `select-chart-wrap${a ? " " + a : ""}`,
|
|
@@ -9149,7 +9165,7 @@ function is({ series: e, labels: t, height: n = 240, format: r = Z, stacked: i =
|
|
|
9149
9165
|
})]
|
|
9150
9166
|
}, t);
|
|
9151
9167
|
}) }),
|
|
9152
|
-
|
|
9168
|
+
Uo(_).map((e, t) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
|
|
9153
9169
|
x1: v.left,
|
|
9154
9170
|
x2: l - v.right,
|
|
9155
9171
|
y1: C(e),
|
|
@@ -9231,7 +9247,7 @@ function is({ series: e, labels: t, height: n = 240, format: r = Z, stacked: i =
|
|
|
9231
9247
|
}
|
|
9232
9248
|
//#endregion
|
|
9233
9249
|
//#region src/SelectFunnel.tsx
|
|
9234
|
-
var
|
|
9250
|
+
var os = r(function({ stages: e, format: t = Z, className: n, ...r }, i) {
|
|
9235
9251
|
let a = Math.max(1, ...e.map((e) => e.value));
|
|
9236
9252
|
return /* @__PURE__ */ m("div", {
|
|
9237
9253
|
ref: i,
|
|
@@ -9273,19 +9289,19 @@ var as = r(function({ stages: e, format: t = Z, className: n, ...r }, i) {
|
|
|
9273
9289
|
});
|
|
9274
9290
|
//#endregion
|
|
9275
9291
|
//#region src/SelectGauge.tsx
|
|
9276
|
-
function
|
|
9292
|
+
function ss(e) {
|
|
9277
9293
|
return Number.isFinite(e) ? Math.max(0, Math.min(100, e)) : 0;
|
|
9278
9294
|
}
|
|
9279
|
-
function
|
|
9295
|
+
function cs(e, t, n, r) {
|
|
9280
9296
|
let i = Math.PI + r * Math.PI;
|
|
9281
9297
|
return [e + n * Math.cos(i), t + n * Math.sin(i)];
|
|
9282
9298
|
}
|
|
9283
|
-
function
|
|
9284
|
-
let [a, o] =
|
|
9299
|
+
function ls(e, t, n, r, i) {
|
|
9300
|
+
let [a, o] = cs(e, t, n, r), [s, c] = cs(e, t, n, i);
|
|
9285
9301
|
return `M ${a.toFixed(2)} ${o.toFixed(2)} A ${n} ${n} 0 0 1 ${s.toFixed(2)} ${c.toFixed(2)}`;
|
|
9286
9302
|
}
|
|
9287
|
-
var
|
|
9288
|
-
let u =
|
|
9303
|
+
var us = (e) => `${e.toLocaleString("pt-BR", { maximumFractionDigits: +(e < 10) })}%`, ds = r(function({ value: e, label: t, caption: n, size: r = 220, thickness: i, color: a, format: o = us, className: s, ...c }, l) {
|
|
9304
|
+
let u = ss(e), d = i ?? Math.max(8, Math.round(r * .075)), f = d / 2 + 2, p = r / 2 - f, g = r / 2, _ = r / 2, v = _ + f, y = on({
|
|
9289
9305
|
value: u,
|
|
9290
9306
|
format: o
|
|
9291
9307
|
});
|
|
@@ -9308,13 +9324,13 @@ var ls = (e) => `${e.toLocaleString("pt-BR", { maximumFractionDigits: +(e < 10)
|
|
|
9308
9324
|
"aria-hidden": "true",
|
|
9309
9325
|
children: [/* @__PURE__ */ m("path", {
|
|
9310
9326
|
className: "select-gauge__track",
|
|
9311
|
-
d:
|
|
9327
|
+
d: ls(g, _, p, 0, 1),
|
|
9312
9328
|
fill: "none",
|
|
9313
9329
|
strokeWidth: d,
|
|
9314
9330
|
strokeLinecap: "round"
|
|
9315
9331
|
}), u > 0 && /* @__PURE__ */ m("path", {
|
|
9316
9332
|
className: "select-gauge__arc",
|
|
9317
|
-
d:
|
|
9333
|
+
d: ls(g, _, p, 0, u / 100),
|
|
9318
9334
|
fill: "none",
|
|
9319
9335
|
stroke: a ?? "var(--select-chart-1)",
|
|
9320
9336
|
strokeWidth: d,
|
|
@@ -9337,7 +9353,7 @@ var ls = (e) => `${e.toLocaleString("pt-BR", { maximumFractionDigits: +(e < 10)
|
|
|
9337
9353
|
children: n
|
|
9338
9354
|
})]
|
|
9339
9355
|
});
|
|
9340
|
-
}),
|
|
9356
|
+
}), fs = r(function({ columns: e, rows: n, format: r = Z, formatValue: i, color: a = "var(--select-chart-1)", showValues: o = !0, min: s, max: c, cellSize: l = 40, maxCellSize: u = 96, cellHeight: d = 30, className: f, ...p }, g) {
|
|
9341
9357
|
let _ = Q(), v = n.flatMap((e) => e.values).filter((e) => e != null && Number.isFinite(e)), y = s ?? (v.length ? Math.min(...v) : 0), b = (c ?? (v.length ? Math.max(...v) : 1)) - y || 1, x = { "--heat-color": a }, S = {
|
|
9342
9358
|
gridTemplateColumns: `minmax(56px, max-content) repeat(${e.length}, minmax(${l}px, ${Math.max(l, u)}px))`,
|
|
9343
9359
|
width: "fit-content",
|
|
@@ -9402,7 +9418,7 @@ var ls = (e) => `${e.toLocaleString("pt-BR", { maximumFractionDigits: +(e < 10)
|
|
|
9402
9418
|
});
|
|
9403
9419
|
//#endregion
|
|
9404
9420
|
//#region src/SelectProgressList.tsx
|
|
9405
|
-
function
|
|
9421
|
+
function ps({ items: e, format: t = Z, color: n, emptyText: r = "Sem dados no período." }) {
|
|
9406
9422
|
if (e.length === 0) return /* @__PURE__ */ m("div", {
|
|
9407
9423
|
className: "select-progresslist__empty",
|
|
9408
9424
|
children: r
|
|
@@ -9453,7 +9469,7 @@ function fs({ items: e, format: t = Z, color: n, emptyText: r = "Sem dados no pe
|
|
|
9453
9469
|
}
|
|
9454
9470
|
//#endregion
|
|
9455
9471
|
//#region src/SelectRadialBar.tsx
|
|
9456
|
-
var
|
|
9472
|
+
var ms = (e) => Number.isFinite(e) ? Math.max(0, Math.min(100, e)) : 0, hs = r(function({ series: e, size: t = 200, thickness: n = 14, gap: r = 8, format: i = (e) => `${Math.round(e)}%`, centerLabel: a, legend: o = !0, className: c, ...l }, u) {
|
|
9457
9473
|
let d = s(), f = t / 2, p = t / 2;
|
|
9458
9474
|
return /* @__PURE__ */ h("div", {
|
|
9459
9475
|
ref: u,
|
|
@@ -9493,7 +9509,7 @@ var ps = (e) => Number.isFinite(e) ? Math.max(0, Math.min(100, e)) : 0, ms = r(f
|
|
|
9493
9509
|
}) }), e.map((e, i) => {
|
|
9494
9510
|
let a = t / 2 - 2 - n / 2 - i * (n + r);
|
|
9495
9511
|
if (a <= n / 2) return null;
|
|
9496
|
-
let o =
|
|
9512
|
+
let o = ms(e.value);
|
|
9497
9513
|
return /* @__PURE__ */ h("g", {
|
|
9498
9514
|
transform: `rotate(-90 ${f} ${p})`,
|
|
9499
9515
|
children: [/* @__PURE__ */ m("circle", {
|
|
@@ -9522,7 +9538,7 @@ var ps = (e) => Number.isFinite(e) ? Math.max(0, Math.min(100, e)) : 0, ms = r(f
|
|
|
9522
9538
|
className: "select-radial__center",
|
|
9523
9539
|
children: a ?? (e.length === 1 ? /* @__PURE__ */ m("strong", {
|
|
9524
9540
|
className: "select-radial__value",
|
|
9525
|
-
children: i(
|
|
9541
|
+
children: i(ms(e[0].value))
|
|
9526
9542
|
}) : null)
|
|
9527
9543
|
})]
|
|
9528
9544
|
}), o && /* @__PURE__ */ m("ul", {
|
|
@@ -9540,15 +9556,15 @@ var ps = (e) => Number.isFinite(e) ? Math.max(0, Math.min(100, e)) : 0, ms = r(f
|
|
|
9540
9556
|
}),
|
|
9541
9557
|
/* @__PURE__ */ m("span", {
|
|
9542
9558
|
className: "select-donut__legval",
|
|
9543
|
-
children: i(
|
|
9559
|
+
children: i(ms(e.value))
|
|
9544
9560
|
})
|
|
9545
9561
|
]
|
|
9546
9562
|
}, t))
|
|
9547
9563
|
})]
|
|
9548
9564
|
});
|
|
9549
|
-
}),
|
|
9550
|
-
function
|
|
9551
|
-
let d = t ?? e.length * 36 + 6 + 26, { ref: f, width: p } = Y(d), g = Q(), _ = s(), v = c && c > 0 ? c :
|
|
9565
|
+
}), gs = 6.1, _s = 12, vs = 56, ys = .4;
|
|
9566
|
+
function bs({ data: e, height: t, color: n, format: r = Z, formatValue: i, distributed: a = !0, labelWidth: o, max: c, className: l, ...u }) {
|
|
9567
|
+
let d = t ?? e.length * 36 + 6 + 26, { ref: f, width: p } = Y(d), g = Q(), _ = s(), v = c && c > 0 ? c : Ho(Math.max(0, ...e.map((e) => e.value))), y = e.reduce((e, t) => Math.max(e, t.label.length), 0), b = Math.min(Math.max(vs, y * gs + _s), Math.max(vs, p * ys)), x = o ?? b, S = Math.max(3, Math.floor((x - _s) / gs)), C = (e) => e.length <= S ? e : `${e.slice(0, S - 1).trimEnd()}…`, w = Math.max(0, p - x - 28), T = d - 6 - 26, E = e.length ? T / e.length : 0, D = Math.min(E * .62, 22), O = (e) => x + e / v * w, k = (e, t) => e.color ?? (a ? X(t) : n ?? X(0));
|
|
9552
9568
|
return /* @__PURE__ */ h("div", {
|
|
9553
9569
|
...u,
|
|
9554
9570
|
className: `select-chart-wrap${l ? " " + l : ""}`,
|
|
@@ -9577,7 +9593,7 @@ function ys({ data: e, height: t, color: n, format: r = Z, formatValue: i, distr
|
|
|
9577
9593
|
})]
|
|
9578
9594
|
}, t);
|
|
9579
9595
|
}) }),
|
|
9580
|
-
|
|
9596
|
+
Uo(v).map((e, t) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
|
|
9581
9597
|
x1: O(e),
|
|
9582
9598
|
x2: O(e),
|
|
9583
9599
|
y1: 6,
|
|
@@ -9623,7 +9639,7 @@ function ys({ data: e, height: t, color: n, format: r = Z, formatValue: i, distr
|
|
|
9623
9639
|
onMouseLeave: g.hide
|
|
9624
9640
|
}),
|
|
9625
9641
|
/* @__PURE__ */ h("text", {
|
|
9626
|
-
x: x -
|
|
9642
|
+
x: x - _s / 2,
|
|
9627
9643
|
y: n,
|
|
9628
9644
|
className: "select-chart__ylabel",
|
|
9629
9645
|
dominantBaseline: "middle",
|
|
@@ -9638,7 +9654,7 @@ function ys({ data: e, height: t, color: n, format: r = Z, formatValue: i, distr
|
|
|
9638
9654
|
}
|
|
9639
9655
|
//#endregion
|
|
9640
9656
|
//#region src/SelectWaterfall.tsx
|
|
9641
|
-
function
|
|
9657
|
+
function xs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
9642
9658
|
let { ref: a, width: o } = Y(t), c = Q(), l = s(), u = 0, d = e.map((e) => {
|
|
9643
9659
|
if (e.total) return u = e.value, {
|
|
9644
9660
|
...e,
|
|
@@ -9651,7 +9667,7 @@ function bs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
9651
9667
|
start: t,
|
|
9652
9668
|
end: u
|
|
9653
9669
|
};
|
|
9654
|
-
}), f =
|
|
9670
|
+
}), f = Ho(Math.max(0, ...d.map((e) => Math.max(e.start, e.end)))), p = Qo, g = Math.max(0, o - p.left - p.right), _ = t - p.top - p.bottom, v = p.top + _, y = e.length, b = y ? g / y : 0, x = Math.min(b * .6, 46), S = (e) => v - e / f * _, C = {
|
|
9655
9671
|
total: "var(--select-chart-1)",
|
|
9656
9672
|
inc: "var(--select-chart-4)",
|
|
9657
9673
|
dec: "var(--select-chart-3)"
|
|
@@ -9685,7 +9701,7 @@ function bs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
9685
9701
|
stopOpacity: .62
|
|
9686
9702
|
})]
|
|
9687
9703
|
}, e)) }),
|
|
9688
|
-
|
|
9704
|
+
Uo(f).map((e, t) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
|
|
9689
9705
|
x1: p.left,
|
|
9690
9706
|
x2: o - p.right,
|
|
9691
9707
|
y1: S(e),
|
|
@@ -9753,7 +9769,7 @@ function bs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
9753
9769
|
}
|
|
9754
9770
|
//#endregion
|
|
9755
9771
|
//#region src/SelectBullet.tsx
|
|
9756
|
-
var
|
|
9772
|
+
var Ss = (e) => Math.max(0, Math.min(100, e)), Cs = r(function({ items: e, format: t = Z, className: n, ...r }, i) {
|
|
9757
9773
|
return /* @__PURE__ */ m("div", {
|
|
9758
9774
|
ref: i,
|
|
9759
9775
|
...r,
|
|
@@ -9791,12 +9807,12 @@ var xs = (e) => Math.max(0, Math.min(100, e)), Ss = r(function({ items: e, forma
|
|
|
9791
9807
|
children: [/* @__PURE__ */ m("span", {
|
|
9792
9808
|
className: "select-bullet__fill",
|
|
9793
9809
|
style: {
|
|
9794
|
-
width: `${
|
|
9810
|
+
width: `${Ss(e.value / i * 100)}%`,
|
|
9795
9811
|
background: `linear-gradient(90deg, ${r}, color-mix(in srgb, ${r} 55%, transparent))`
|
|
9796
9812
|
}
|
|
9797
9813
|
}), /* @__PURE__ */ m("span", {
|
|
9798
9814
|
className: "select-bullet__tick",
|
|
9799
|
-
style: { left: `${
|
|
9815
|
+
style: { left: `${Ss(e.target / i * 100)}%` }
|
|
9800
9816
|
})]
|
|
9801
9817
|
})]
|
|
9802
9818
|
}, `${e.label}-${n}`);
|
|
@@ -9805,7 +9821,7 @@ var xs = (e) => Math.max(0, Math.min(100, e)), Ss = r(function({ items: e, forma
|
|
|
9805
9821
|
});
|
|
9806
9822
|
//#endregion
|
|
9807
9823
|
//#region src/SelectTreemap.tsx
|
|
9808
|
-
function
|
|
9824
|
+
function ws(e, t, n) {
|
|
9809
9825
|
let r = [], i = (e, t) => {
|
|
9810
9826
|
let n = e.reduce((e, t) => e + t, 0), r = Math.max(...e), i = Math.min(...e);
|
|
9811
9827
|
return Math.max(t * t * r / (n * n), n * n / (t * t * i));
|
|
@@ -9856,8 +9872,8 @@ function Cs(e, t, n) {
|
|
|
9856
9872
|
};
|
|
9857
9873
|
return a(e.map((e, t) => t), 0, 0, t, n), r;
|
|
9858
9874
|
}
|
|
9859
|
-
function
|
|
9860
|
-
let { ref: a, width: o } = Y(t), c = Q(), l = s(), u = e.map((e, t) => t).sort((t, n) => e[n].value - e[t].value), d = o > 0 ?
|
|
9875
|
+
function Ts({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
9876
|
+
let { ref: a, width: o } = Y(t), c = Q(), l = s(), u = e.map((e, t) => t).sort((t, n) => e[n].value - e[t].value), d = o > 0 ? ws(u.map((t) => e[t].value), o, t) : [];
|
|
9861
9877
|
return /* @__PURE__ */ h("div", {
|
|
9862
9878
|
...i,
|
|
9863
9879
|
className: `select-chart-wrap select-treemap${r ? " " + r : ""}`,
|
|
@@ -9927,8 +9943,8 @@ function ws({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
9927
9943
|
}
|
|
9928
9944
|
//#endregion
|
|
9929
9945
|
//#region src/SelectScatter.tsx
|
|
9930
|
-
function
|
|
9931
|
-
let { ref: l, width: u } = Y(t), d = Q(), f = e.flatMap((e) => e.points), p =
|
|
9946
|
+
function Es({ series: e, height: t = 240, xFormat: n = Z, yFormat: r = Z, xMax: i, yMax: a, maxRadius: o = 18, className: s, ...c }) {
|
|
9947
|
+
let { ref: l, width: u } = Y(t), d = Q(), f = e.flatMap((e) => e.points), p = Ho(i ?? Math.max(0, ...f.map((e) => e.x))), g = Ho(a ?? Math.max(0, ...f.map((e) => e.y))), _ = Math.max(1, ...f.map((e) => e.r ?? 0)), v = Qo, y = Math.max(0, u - v.left - v.right), b = t - v.top - v.bottom, x = v.top + b, S = (e) => v.left + e / p * y, C = (e) => x - e / g * b, w = (e) => e.r ? 4 + Math.sqrt(e.r) / Math.sqrt(_) * (o - 4) : 4.5;
|
|
9932
9948
|
return /* @__PURE__ */ h("div", {
|
|
9933
9949
|
...c,
|
|
9934
9950
|
className: `select-chart-wrap${s ? " " + s : ""}`,
|
|
@@ -9938,7 +9954,7 @@ function Ts({ series: e, height: t = 240, xFormat: n = Z, yFormat: r = Z, xMax:
|
|
|
9938
9954
|
height: t,
|
|
9939
9955
|
className: "select-chart",
|
|
9940
9956
|
children: [
|
|
9941
|
-
|
|
9957
|
+
Uo(g).map((e, t) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
|
|
9942
9958
|
x1: v.left,
|
|
9943
9959
|
x2: u - v.right,
|
|
9944
9960
|
y1: C(e),
|
|
@@ -9952,7 +9968,7 @@ function Ts({ series: e, height: t = 240, xFormat: n = Z, yFormat: r = Z, xMax:
|
|
|
9952
9968
|
textAnchor: "end",
|
|
9953
9969
|
children: r(e)
|
|
9954
9970
|
})] }, `y${t}`)),
|
|
9955
|
-
|
|
9971
|
+
Uo(p).map((e, r, i) => /* @__PURE__ */ m("text", {
|
|
9956
9972
|
x: S(e),
|
|
9957
9973
|
y: t - v.bottom + 16,
|
|
9958
9974
|
className: "select-chart__xlabel",
|
|
@@ -9999,8 +10015,8 @@ function Ts({ series: e, height: t = 240, xFormat: n = Z, yFormat: r = Z, xMax:
|
|
|
9999
10015
|
}
|
|
10000
10016
|
//#endregion
|
|
10001
10017
|
//#region src/SelectRadar.tsx
|
|
10002
|
-
var
|
|
10003
|
-
let d = Q(), f = s(), p = e.length, g = n / 2, _ = n / 2, v = n / 2 - 30, y = r ??
|
|
10018
|
+
var Ds = r(function({ axes: e, series: t, size: n = 240, max: r, format: i = Z, levels: a = 4, legend: o = !0, className: c, ...l }, u) {
|
|
10019
|
+
let d = Q(), f = s(), p = e.length, g = n / 2, _ = n / 2, v = n / 2 - 30, y = r ?? Ho(Math.max(1, ...t.flatMap((e) => e.values))), b = (e) => (-90 + e * 360 / p) * Math.PI / 180, x = (e, t) => [g + t * Math.cos(b(e)), _ + t * Math.sin(b(e))], S = (e) => e.map((e, t) => `${t === 0 ? "M" : "L"}${x(t, e).map((e) => e.toFixed(2)).join(",")}`).join(" ") + " Z";
|
|
10004
10020
|
return /* @__PURE__ */ h("div", {
|
|
10005
10021
|
ref: u,
|
|
10006
10022
|
...l,
|
|
@@ -10109,7 +10125,7 @@ var Es = r(function({ axes: e, series: t, size: n = 240, max: r, format: i = Z,
|
|
|
10109
10125
|
});
|
|
10110
10126
|
//#endregion
|
|
10111
10127
|
//#region src/SelectSankey.tsx
|
|
10112
|
-
function
|
|
10128
|
+
function Os({ links: e, height: t = 260, format: n = Z, nodeWidth: r = 14, nodeGap: i = 14, className: a, ...o }) {
|
|
10113
10129
|
let { ref: s, width: c } = Y(t), l = Q(), u = [], d = [];
|
|
10114
10130
|
for (let t of e) u.includes(t.source) || u.push(t.source), d.includes(t.target) || d.push(t.target);
|
|
10115
10131
|
let f = e.reduce((e, t) => e + t.value, 0) || 1, p = (t, n) => e.filter((e) => e[n] === t).reduce((e, t) => e + t.value, 0), g = t - 12, _ = Math.max(u.length, d.length), v = (g - i * Math.max(0, _ - 1)) / f, y = (e, t, n) => {
|
|
@@ -10194,8 +10210,8 @@ function Ds({ links: e, height: t = 260, format: n = Z, nodeWidth: r = 14, nodeG
|
|
|
10194
10210
|
}
|
|
10195
10211
|
//#endregion
|
|
10196
10212
|
//#region src/SelectCandlestick.tsx
|
|
10197
|
-
function
|
|
10198
|
-
let { ref: s, width: c } = Y(t), l = Q(), u =
|
|
10213
|
+
function ks({ data: e, height: t = 240, format: n = Z, upColor: r = "var(--select-chart-4)", downColor: i = "var(--select-chart-3)", className: a, ...o }) {
|
|
10214
|
+
let { ref: s, width: c } = Y(t), l = Q(), u = Qo, d = Math.max(0, c - u.left - u.right), f = t - u.top - u.bottom, p = u.top + f, g = Math.max(1, ...e.map((e) => e.high)), _ = Math.min(g, ...e.map((e) => e.low)), v = (g - _) * .08 || 1, y = _ - v, b = g + v, x = (e) => p - (e - y) / (b - y) * f, S = e.length, C = S ? d / S : 0, w = Math.min(C * .5, 18), T = Array.from({ length: 5 }, (e, t) => y + (b - y) * t / 4);
|
|
10199
10215
|
return /* @__PURE__ */ h("div", {
|
|
10200
10216
|
...o,
|
|
10201
10217
|
className: `select-chart-wrap${a ? " " + a : ""}`,
|
|
@@ -10284,8 +10300,8 @@ function Os({ data: e, height: t = 240, format: n = Z, upColor: r = "var(--selec
|
|
|
10284
10300
|
}
|
|
10285
10301
|
//#endregion
|
|
10286
10302
|
//#region src/SelectBoxPlot.tsx
|
|
10287
|
-
function
|
|
10288
|
-
let { ref: a, width: o } = Y(t), s = Q(), c =
|
|
10303
|
+
function As({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
10304
|
+
let { ref: a, width: o } = Y(t), s = Q(), c = Qo, l = Math.max(0, o - c.left - c.right), u = t - c.top - c.bottom, d = c.top + u, f = Ho(Math.max(1, ...e.map((e) => e.max))), p = (e) => d - e / f * u, g = e.length, _ = g ? l / g : 0, v = Math.min(_ * .5, 40);
|
|
10289
10305
|
return /* @__PURE__ */ h("div", {
|
|
10290
10306
|
...i,
|
|
10291
10307
|
className: `select-chart-wrap${r ? " " + r : ""}`,
|
|
@@ -10294,7 +10310,7 @@ function ks({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
10294
10310
|
width: o,
|
|
10295
10311
|
height: t,
|
|
10296
10312
|
className: "select-chart",
|
|
10297
|
-
children: [
|
|
10313
|
+
children: [Uo(f).map((e, t) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
|
|
10298
10314
|
x1: c.left,
|
|
10299
10315
|
x2: o - c.right,
|
|
10300
10316
|
y1: p(e),
|
|
@@ -10404,7 +10420,7 @@ function ks({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
10404
10420
|
}
|
|
10405
10421
|
//#endregion
|
|
10406
10422
|
//#region src/SelectRangeBar.tsx
|
|
10407
|
-
function
|
|
10423
|
+
function js({ data: e, height: t, min: n, max: r, format: i = Z, labelWidth: a = 96, className: o, ...c }) {
|
|
10408
10424
|
let l = t ?? e.length * 36 + 6 + 26, { ref: u, width: d } = Y(l), f = Q(), p = s(), g = n ?? Math.min(0, ...e.map((e) => e.start)), _ = (r ?? Math.max(1, ...e.map((e) => e.end))) - g || 1, v = a, y = Math.max(0, d - v - 14), b = l - 6 - 26, x = e.length ? b / e.length : 0, S = Math.min(x * .6, 22), C = (e) => v + (e - g) / _ * y, w = Array.from({ length: 5 }, (e, t) => g + _ * t / 4);
|
|
10409
10425
|
return /* @__PURE__ */ h("div", {
|
|
10410
10426
|
...c,
|
|
@@ -10485,7 +10501,7 @@ function As({ data: e, height: t, min: n, max: r, format: i = Z, labelWidth: a =
|
|
|
10485
10501
|
}
|
|
10486
10502
|
//#endregion
|
|
10487
10503
|
//#region src/SelectCalendarHeatmap.tsx
|
|
10488
|
-
var
|
|
10504
|
+
var Ms = r(function({ weeks: e, color: t = "var(--select-chart-4)", dayLabels: n = [
|
|
10489
10505
|
"Seg",
|
|
10490
10506
|
"",
|
|
10491
10507
|
"Qua",
|
|
@@ -10558,8 +10574,8 @@ var js = r(function({ weeks: e, color: t = "var(--select-chart-4)", dayLabels: n
|
|
|
10558
10574
|
]
|
|
10559
10575
|
}), /* @__PURE__ */ m($, { tip: p.tip })]
|
|
10560
10576
|
});
|
|
10561
|
-
}),
|
|
10562
|
-
let c = Q(), l = t / 2, u = t / 2, d = t / 2 - 2, f = e.length || 1, p =
|
|
10577
|
+
}), Ns = r(function({ segments: e, size: t = 200, format: n = Z, legend: r = !0, rose: i = !1, className: a, ...o }, s) {
|
|
10578
|
+
let c = Q(), l = t / 2, u = t / 2, d = t / 2 - 2, f = e.length || 1, p = Ho(Math.max(1, ...e.map((e) => e.value))), g = (e) => i ? Math.max(0, e) / p * d : Math.sqrt(Math.max(0, e) / p) * d, _ = 360 / f;
|
|
10563
10579
|
return /* @__PURE__ */ h("div", {
|
|
10564
10580
|
ref: s,
|
|
10565
10581
|
...o,
|
|
@@ -10589,7 +10605,7 @@ var js = r(function({ weeks: e, color: t = "var(--select-chart-4)", dayLabels: n
|
|
|
10589
10605
|
}, t)), e.map((e, t) => {
|
|
10590
10606
|
let r = t * _, i = (t + 1) * _ - 1.5, a = e.color ?? X(t), o = Math.max(2, g(e.value)), s = ((r + i) / 2 - 90) * (Math.PI / 180), d = l + o * Math.cos(s), f = u + o * Math.sin(s);
|
|
10591
10607
|
return /* @__PURE__ */ m("path", {
|
|
10592
|
-
d:
|
|
10608
|
+
d: Xo(l, u, o, 0, r, i),
|
|
10593
10609
|
fill: a,
|
|
10594
10610
|
fillOpacity: .8,
|
|
10595
10611
|
className: "select-chart__seg",
|
|
@@ -10632,13 +10648,13 @@ var js = r(function({ weeks: e, color: t = "var(--select-chart-4)", dayLabels: n
|
|
|
10632
10648
|
});
|
|
10633
10649
|
//#endregion
|
|
10634
10650
|
//#region src/SelectSlope.tsx
|
|
10635
|
-
function
|
|
10651
|
+
function Ps({ data: e, leftLabel: t, rightLabel: n, height: r = 240, format: i = Z, className: a, ...o }) {
|
|
10636
10652
|
let { ref: s, width: c } = Y(r), l = Q(), u = {
|
|
10637
10653
|
top: 24,
|
|
10638
10654
|
right: 64,
|
|
10639
10655
|
bottom: 12,
|
|
10640
10656
|
left: 132
|
|
10641
|
-
}, d =
|
|
10657
|
+
}, d = Ho(Math.max(1, ...e.flatMap((e) => [e.left, e.right]))), f = r - u.top - u.bottom, p = (e) => u.top + f - e / d * f, g = u.left, _ = c - u.right;
|
|
10642
10658
|
return /* @__PURE__ */ h("div", {
|
|
10643
10659
|
...o,
|
|
10644
10660
|
className: `select-chart-wrap${a ? " " + a : ""}`,
|
|
@@ -10754,8 +10770,8 @@ function Ns({ data: e, leftLabel: t, rightLabel: n, height: r = 240, format: i =
|
|
|
10754
10770
|
}
|
|
10755
10771
|
//#endregion
|
|
10756
10772
|
//#region src/SelectDumbbell.tsx
|
|
10757
|
-
function
|
|
10758
|
-
let c = t ?? e.length * 34 + 6 + 26, { ref: l, width: u } = Y(c), d = Q(), f = "var(--select-chart-2)", p = "var(--select-chart-1)", g =
|
|
10773
|
+
function Fs({ data: e, height: t, format: n = Z, fromLabel: r = "Antes", toLabel: i = "Depois", labelWidth: a = 96, className: o, ...s }) {
|
|
10774
|
+
let c = t ?? e.length * 34 + 6 + 26, { ref: l, width: u } = Y(c), d = Q(), f = "var(--select-chart-2)", p = "var(--select-chart-1)", g = Ho(Math.max(1, ...e.flatMap((e) => [e.from, e.to]))), _ = a, v = Math.max(0, u - _ - 14), y = c - 6 - 26, b = e.length ? y / e.length : 0, x = (e) => _ + e / g * v;
|
|
10759
10775
|
return /* @__PURE__ */ h("div", {
|
|
10760
10776
|
...s,
|
|
10761
10777
|
className: `select-chart-wrap${o ? " " + o : ""}`,
|
|
@@ -10764,7 +10780,7 @@ function Ps({ data: e, height: t, format: n = Z, fromLabel: r = "Antes", toLabel
|
|
|
10764
10780
|
width: u,
|
|
10765
10781
|
height: c,
|
|
10766
10782
|
className: "select-chart",
|
|
10767
|
-
children: [
|
|
10783
|
+
children: [Uo(g).map((e, t) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
|
|
10768
10784
|
x1: x(e),
|
|
10769
10785
|
x2: x(e),
|
|
10770
10786
|
y1: 6,
|
|
@@ -10847,7 +10863,7 @@ function Ps({ data: e, height: t, format: n = Z, fromLabel: r = "Antes", toLabel
|
|
|
10847
10863
|
}
|
|
10848
10864
|
//#endregion
|
|
10849
10865
|
//#region src/SelectMarimekko.tsx
|
|
10850
|
-
function
|
|
10866
|
+
function Is({ columns: e, height: t = 240, format: n = Z, gap: r = 3, className: i, ...a }) {
|
|
10851
10867
|
let { ref: o, width: s } = Y(t), c = Q(), l = {
|
|
10852
10868
|
top: 6,
|
|
10853
10869
|
right: 6,
|
|
@@ -10927,7 +10943,7 @@ function Fs({ columns: e, height: t = 240, format: n = Z, gap: r = 3, className:
|
|
|
10927
10943
|
}
|
|
10928
10944
|
//#endregion
|
|
10929
10945
|
//#region src/SelectGaugeBands.tsx
|
|
10930
|
-
var
|
|
10946
|
+
var Ls = r(function({ value: e, max: t = 100, bands: n, size: r = 220, thickness: i, label: a, format: o = (e) => `${Math.round(e)}`, className: s, ...c }, l) {
|
|
10931
10947
|
let u = i ?? Math.max(10, Math.round(r * .08)), d = u / 2 + 2, f = r / 2 - d, p = r / 2, g = r / 2, _ = g + d, v = (e) => Math.max(0, Math.min(t, e)), y = (e) => {
|
|
10932
10948
|
let t = Math.PI + e * Math.PI;
|
|
10933
10949
|
return [p + f * Math.cos(t), g + f * Math.sin(t)];
|
|
@@ -10999,7 +11015,7 @@ var Is = r(function({ value: e, max: t = 100, bands: n, size: r = 220, thickness
|
|
|
10999
11015
|
});
|
|
11000
11016
|
//#endregion
|
|
11001
11017
|
//#region src/SelectStreamGraph.tsx
|
|
11002
|
-
function
|
|
11018
|
+
function Rs({ series: e, labels: t, height: n = 240, format: r = Z, className: i, ...a }) {
|
|
11003
11019
|
let { ref: o, width: c } = Y(n), l = Q(), u = s(), [f, p] = d(null), g = t.length, _ = {
|
|
11004
11020
|
top: 14,
|
|
11005
11021
|
right: 14,
|
|
@@ -11043,7 +11059,7 @@ function Ls({ series: e, labels: t, height: n = 240, format: r = Z, className: i
|
|
|
11043
11059
|
})]
|
|
11044
11060
|
}, t)) }),
|
|
11045
11061
|
w.map((e, t) => /* @__PURE__ */ m("path", {
|
|
11046
|
-
d:
|
|
11062
|
+
d: Jo(e.upper, e.lower),
|
|
11047
11063
|
fill: `url(#${u}-st${t})`,
|
|
11048
11064
|
className: "select-chart__area"
|
|
11049
11065
|
}, t)),
|
|
@@ -11090,7 +11106,7 @@ function Ls({ series: e, labels: t, height: n = 240, format: r = Z, className: i
|
|
|
11090
11106
|
}
|
|
11091
11107
|
//#endregion
|
|
11092
11108
|
//#region src/SelectSunburst.tsx
|
|
11093
|
-
var
|
|
11109
|
+
var zs = r(function({ data: e, size: t = 220, format: n = Z, legend: r = !0, className: i, ...a }, o) {
|
|
11094
11110
|
let s = Q(), c = t / 2, l = t / 2, u = t / 2 - 2, d = u * .62, f = u * .32, p = e.map((e) => {
|
|
11095
11111
|
var t;
|
|
11096
11112
|
return (t = e.children) != null && t.length ? e.children.reduce((e, t) => e + t.value, 0) : e.value ?? 0;
|
|
@@ -11116,7 +11132,7 @@ var Rs = r(function({ data: e, size: t = 220, format: n = Z, legend: r = !0, cla
|
|
|
11116
11132
|
_ += r;
|
|
11117
11133
|
let a = _ / g * 360, o = e.color ?? X(t), v = i;
|
|
11118
11134
|
return /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("path", {
|
|
11119
|
-
d:
|
|
11135
|
+
d: Xo(c, l, d, f, i + .6, Math.max(i + .7, a - .6)),
|
|
11120
11136
|
fill: o,
|
|
11121
11137
|
className: "select-chart__seg",
|
|
11122
11138
|
onMouseEnter: () => s.show({
|
|
@@ -11136,7 +11152,7 @@ var Rs = r(function({ data: e, size: t = 220, format: n = Z, legend: r = !0, cla
|
|
|
11136
11152
|
v += t.value / g * 360;
|
|
11137
11153
|
let f = v, p = t.color ?? o, h = .45 + i % 3 * .2, _ = ((a + f) / 2 - 90) * (Math.PI / 180);
|
|
11138
11154
|
return /* @__PURE__ */ m("path", {
|
|
11139
|
-
d:
|
|
11155
|
+
d: Xo(c, l, u, d + 2, a + .5, Math.max(a + .6, f - .5)),
|
|
11140
11156
|
fill: p,
|
|
11141
11157
|
fillOpacity: h,
|
|
11142
11158
|
className: "select-chart__seg",
|
|
@@ -11183,8 +11199,8 @@ var Rs = r(function({ data: e, size: t = 220, format: n = Z, legend: r = !0, cla
|
|
|
11183
11199
|
});
|
|
11184
11200
|
//#endregion
|
|
11185
11201
|
//#region src/SelectViolin.tsx
|
|
11186
|
-
function
|
|
11187
|
-
let { ref: a, width: o } = Y(t), s = Q(), c =
|
|
11202
|
+
function Bs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
11203
|
+
let { ref: a, width: o } = Y(t), s = Q(), c = Qo, l = Math.max(0, o - c.left - c.right), u = t - c.top - c.bottom, d = c.top + u, f = Ho(Math.max(1, ...e.map((e) => e.max))), p = (e) => d - e / f * u, g = e.length, _ = g ? l / g : 0, v = Math.min(_ * .42, 46), y = Math.max(1, ...e.flatMap((e) => e.bins));
|
|
11188
11204
|
return /* @__PURE__ */ h("div", {
|
|
11189
11205
|
...i,
|
|
11190
11206
|
className: `select-chart-wrap${r ? " " + r : ""}`,
|
|
@@ -11193,7 +11209,7 @@ function zs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
11193
11209
|
width: o,
|
|
11194
11210
|
height: t,
|
|
11195
11211
|
className: "select-chart",
|
|
11196
|
-
children: [
|
|
11212
|
+
children: [Uo(f).map((e, t) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
|
|
11197
11213
|
x1: c.left,
|
|
11198
11214
|
x2: o - c.right,
|
|
11199
11215
|
y1: p(e),
|
|
@@ -11210,7 +11226,7 @@ function zs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
11210
11226
|
let i = c.left + _ * r + _ / 2, a = e.color ?? X(r), o = e.bins.length, l = (t) => p(e.min + (e.max - e.min) * t / Math.max(1, o - 1)), d = (t) => e.bins[t] / y * v, f = [], g = [];
|
|
11211
11227
|
for (let e = o - 1; e >= 0; e--) f.push([i + d(e), l(e)]);
|
|
11212
11228
|
for (let e = 0; e < o; e++) g.push([i - d(e), l(e)]);
|
|
11213
|
-
let b = `${
|
|
11229
|
+
let b = `${Go(f)} ${Go(g).replace(/^M/, "L")} Z`, x = e.median == null ? null : p(e.median);
|
|
11214
11230
|
return /* @__PURE__ */ h("g", { children: [
|
|
11215
11231
|
/* @__PURE__ */ m("path", {
|
|
11216
11232
|
d: b,
|
|
@@ -11271,7 +11287,7 @@ function zs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
11271
11287
|
}
|
|
11272
11288
|
//#endregion
|
|
11273
11289
|
//#region src/SelectChord.tsx
|
|
11274
|
-
var
|
|
11290
|
+
var Vs = r(function({ matrix: e, labels: t, size: n = 240, format: r = Z, padAngle: i = .05, className: a, ...o }, s) {
|
|
11275
11291
|
let c = Q(), l = t.length, u = n / 2, d = n / 2, f = n / 2 - 22, p = f - 9, g = e.map((e) => e.reduce((e, t) => e + t, 0)), _ = g.reduce((e, t) => e + t, 0) || 1, v = (2 * Math.PI - l * i) / _, y = [], b = 0;
|
|
11276
11292
|
for (let e = 0; e < l; e++) {
|
|
11277
11293
|
let t = b, n = b + g[e] * v;
|
|
@@ -11338,7 +11354,7 @@ var Bs = r(function({ matrix: e, labels: t, size: n = 240, format: r = Z, padAng
|
|
|
11338
11354
|
}, n)), y.map((e, n) => {
|
|
11339
11355
|
let r = (e.a0 + e.a1) / 2, [i, a] = S(r, f + 12);
|
|
11340
11356
|
return /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("path", {
|
|
11341
|
-
d:
|
|
11357
|
+
d: Xo(u, d, f, p, w(e.a0), w(e.a1)),
|
|
11342
11358
|
fill: X(n),
|
|
11343
11359
|
className: "select-chord__arc"
|
|
11344
11360
|
}), /* @__PURE__ */ m("text", {
|
|
@@ -11356,7 +11372,7 @@ var Bs = r(function({ matrix: e, labels: t, size: n = 240, format: r = Z, padAng
|
|
|
11356
11372
|
});
|
|
11357
11373
|
//#endregion
|
|
11358
11374
|
//#region src/SelectHexbin.tsx
|
|
11359
|
-
function
|
|
11375
|
+
function Hs({ points: e, height: t = 240, radius: n = 16, color: r = "var(--select-chart-1)", xMax: i, yMax: a, format: o = Z, className: s, ...c }) {
|
|
11360
11376
|
let { ref: l, width: u } = Y(t), d = Q(), f = Math.max(0, u - 24), p = t - 24, g = i ?? Math.max(1, ...e.map((e) => e.x)), _ = a ?? Math.max(1, ...e.map((e) => e.y)), v = (e) => 12 + e / g * f, y = (e) => 12 + p - e / _ * p, b = n, x = Math.sqrt(3), S = (e, t) => {
|
|
11361
11377
|
let n = e, r = t, i = -n - r, a = Math.round(n), o = Math.round(i), s = Math.round(r), c = Math.abs(a - n), l = Math.abs(o - i), u = Math.abs(s - r);
|
|
11362
11378
|
return c > l && c > u ? a = -o - s : l > u ? o = -a - s : s = -a - o, [a, s];
|
|
@@ -11408,7 +11424,7 @@ function Vs({ points: e, height: t = 240, radius: n = 16, color: r = "var(--sele
|
|
|
11408
11424
|
}
|
|
11409
11425
|
//#endregion
|
|
11410
11426
|
//#region src/SelectWordCloud.tsx
|
|
11411
|
-
var
|
|
11427
|
+
var Us = r(function({ words: e, minSize: t = 14, maxSize: n = 46, className: r, ...i }, a) {
|
|
11412
11428
|
let o = e.map((e) => e.value), s = Math.max(1, ...o), c = Math.min(...o), l = s - c || 1, u = (e) => t + (e - c) / l * (n - t);
|
|
11413
11429
|
return /* @__PURE__ */ m("div", {
|
|
11414
11430
|
ref: a,
|
|
@@ -11425,7 +11441,7 @@ var Hs = r(function({ words: e, minSize: t = 14, maxSize: n = 46, className: r,
|
|
|
11425
11441
|
children: e.text
|
|
11426
11442
|
}, `${e.text}-${t}`))
|
|
11427
11443
|
});
|
|
11428
|
-
}),
|
|
11444
|
+
}), Ws = [
|
|
11429
11445
|
[
|
|
11430
11446
|
-59.6,
|
|
11431
11447
|
-80,
|
|
@@ -21820,24 +21836,24 @@ var Hs = r(function({ words: e, minSize: t = 14, maxSize: n = 46, className: r,
|
|
|
21820
21836
|
-27.1,
|
|
21821
21837
|
83.5
|
|
21822
21838
|
]
|
|
21823
|
-
],
|
|
21824
|
-
function
|
|
21825
|
-
let n = e *
|
|
21839
|
+
], Gs = Math.PI / 180;
|
|
21840
|
+
function Ks(e, t) {
|
|
21841
|
+
let n = e * Gs, r = t * Gs;
|
|
21826
21842
|
return [
|
|
21827
21843
|
Math.cos(n) * Math.sin(r),
|
|
21828
21844
|
Math.sin(n),
|
|
21829
21845
|
Math.cos(n) * Math.cos(r)
|
|
21830
21846
|
];
|
|
21831
21847
|
}
|
|
21832
|
-
function
|
|
21833
|
-
let a = r *
|
|
21848
|
+
function qs([e, t, n], r, i) {
|
|
21849
|
+
let a = r * Gs, o = e * Math.cos(a) + n * Math.sin(a), s = -e * Math.sin(a) + n * Math.cos(a), c = i * Gs;
|
|
21834
21850
|
return [
|
|
21835
21851
|
o,
|
|
21836
21852
|
t * Math.cos(c) - s * Math.sin(c),
|
|
21837
21853
|
t * Math.sin(c) + s * Math.cos(c)
|
|
21838
21854
|
];
|
|
21839
21855
|
}
|
|
21840
|
-
function
|
|
21856
|
+
function Js(e, t, n) {
|
|
21841
21857
|
let r = e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
|
|
21842
21858
|
r = Math.max(-1, Math.min(1, r));
|
|
21843
21859
|
let i = Math.acos(r);
|
|
@@ -21849,18 +21865,18 @@ function qs(e, t, n) {
|
|
|
21849
21865
|
e[2] * o + t[2] * s
|
|
21850
21866
|
];
|
|
21851
21867
|
}
|
|
21852
|
-
var
|
|
21868
|
+
var Ys = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1e-6, Xs = r(function({ points: e = [], arcs: t = [], size: n = 320, tilt: r = -18, spin: i = !0, speed: a = 7, color: c = "var(--select-chart-1)", format: f = Z, legend: p = !0, map: g = !0, fluid: _ = !1, onZoomChange: v, className: y, ...b }, x) {
|
|
21853
21869
|
var S, C;
|
|
21854
|
-
let w = s(), T = Q(), E = u(null), D =
|
|
21870
|
+
let w = s(), T = Q(), E = u(null), D = Vo(E, n), O = e.length ? e.reduce((e, t) => e + t.lng, 0) / e.length : 0, k = u(typeof window < "u" && !!((S = (C = window).matchMedia) != null && S.call(C, "(prefers-reduced-motion: reduce)").matches)), A = u({
|
|
21855
21871
|
lng: -O,
|
|
21856
21872
|
lat: r
|
|
21857
21873
|
}), j = u({
|
|
21858
21874
|
lng: 0,
|
|
21859
21875
|
lat: 0
|
|
21860
|
-
}), M = u(1), N = u(null), P = u(null), F = u(!1), I = u(0), L = u(0), ee = u(0), [, R] = d(0), [te,
|
|
21861
|
-
L.current || (ee.current = performance.now(), L.current = requestAnimationFrame(
|
|
21876
|
+
}), M = u(1), N = u(null), P = u(null), F = u(!1), I = u(0), L = u(0), ee = u(0), [, R] = d(0), [te, ne] = d(!1), [z, B] = d(null), re = () => {
|
|
21877
|
+
L.current || (ee.current = performance.now(), L.current = requestAnimationFrame(V));
|
|
21862
21878
|
};
|
|
21863
|
-
function
|
|
21879
|
+
function V(e) {
|
|
21864
21880
|
let t = Math.min(.05, (e - ee.current) / 1e3);
|
|
21865
21881
|
ee.current = e, I.current += t;
|
|
21866
21882
|
let n = j.current, r = Math.abs(n.lng) + Math.abs(n.lat) > .02;
|
|
@@ -21870,24 +21886,24 @@ var Js = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1
|
|
|
21870
21886
|
A.current.lng += (N.current.lng - A.current.lng) * e, A.current.lat += (N.current.lat - A.current.lat) * e, Math.abs(N.current.lng - A.current.lng) < .2 && Math.abs(N.current.lat - A.current.lat) < .2 && (N.current = null);
|
|
21871
21887
|
} else r ? (A.current.lng += n.lng * t * 60, A.current.lat = Math.max(-85, Math.min(85, A.current.lat + n.lat * t * 60)), n.lng *= .94, n.lat *= .94) : (n.lng = 0, n.lat = 0, i && !k.current && !F.current && (A.current.lng += a * t));
|
|
21872
21888
|
}
|
|
21873
|
-
R((e) => (e + 1) % 1e6), !k.current || P.current || N.current || Math.abs(n.lng) + Math.abs(n.lat) > .02 ? L.current = requestAnimationFrame(
|
|
21889
|
+
R((e) => (e + 1) % 1e6), !k.current || P.current || N.current || Math.abs(n.lng) + Math.abs(n.lat) > .02 ? L.current = requestAnimationFrame(V) : L.current = 0;
|
|
21874
21890
|
}
|
|
21875
|
-
o(() => (k.current ||
|
|
21891
|
+
o(() => (k.current || re(), () => {
|
|
21876
21892
|
L.current && cancelAnimationFrame(L.current), L.current = 0;
|
|
21877
21893
|
}), []);
|
|
21878
|
-
let
|
|
21879
|
-
|
|
21894
|
+
let H = u(v);
|
|
21895
|
+
H.current = v, o(() => {
|
|
21880
21896
|
let e = E.current;
|
|
21881
21897
|
if (!e) return;
|
|
21882
21898
|
let t = (e) => {
|
|
21883
21899
|
var t;
|
|
21884
21900
|
e.preventDefault();
|
|
21885
21901
|
let n = Math.max(-240, Math.min(240, e.deltaMode ? e.deltaY * 40 : e.deltaY)), r = M.current * Math.exp(-n * .0012);
|
|
21886
|
-
M.current = Math.max(.8, Math.min(1.8, r)), (t =
|
|
21902
|
+
M.current = Math.max(.8, Math.min(1.8, r)), (t = H.current) == null || t.call(H, M.current), re(), R((e) => (e + 1) % 1e6);
|
|
21887
21903
|
};
|
|
21888
21904
|
return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
|
|
21889
21905
|
}, []);
|
|
21890
|
-
let
|
|
21906
|
+
let ie = (e) => {
|
|
21891
21907
|
var t, n;
|
|
21892
21908
|
(t = (n = e.target).setPointerCapture) == null || t.call(n, e.pointerId), P.current = {
|
|
21893
21909
|
x: e.clientX,
|
|
@@ -21895,8 +21911,8 @@ var Js = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1
|
|
|
21895
21911
|
}, j.current = {
|
|
21896
21912
|
lng: 0,
|
|
21897
21913
|
lat: 0
|
|
21898
|
-
}, N.current = null,
|
|
21899
|
-
},
|
|
21914
|
+
}, N.current = null, ne(!0), re();
|
|
21915
|
+
}, ae = (e) => {
|
|
21900
21916
|
if (!P.current) return;
|
|
21901
21917
|
let t = .34 / M.current, n = e.clientX - P.current.x, r = e.clientY - P.current.y;
|
|
21902
21918
|
P.current = {
|
|
@@ -21906,11 +21922,11 @@ var Js = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1
|
|
|
21906
21922
|
lng: n * t,
|
|
21907
21923
|
lat: r * t
|
|
21908
21924
|
};
|
|
21909
|
-
},
|
|
21925
|
+
}, U = (e) => {
|
|
21910
21926
|
var t, n;
|
|
21911
|
-
P.current && ((t = (n = e.target).releasePointerCapture) == null || t.call(n, e.pointerId), P.current = null,
|
|
21927
|
+
P.current && ((t = (n = e.target).releasePointerCapture) == null || t.call(n, e.pointerId), P.current = null, ne(!1), re());
|
|
21912
21928
|
}, W = (D / 2 - 6) * M.current, G = D / 2, K = D / 2, oe = (e) => {
|
|
21913
|
-
let t =
|
|
21929
|
+
let t = qs(e, A.current.lng, A.current.lat);
|
|
21914
21930
|
return {
|
|
21915
21931
|
x: G + W * t[0],
|
|
21916
21932
|
y: K - W * t[1],
|
|
@@ -21920,25 +21936,25 @@ var Js = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1
|
|
|
21920
21936
|
let e = [];
|
|
21921
21937
|
for (let t = -180; t < 180; t += 30) {
|
|
21922
21938
|
let n = [];
|
|
21923
|
-
for (let e = 0; e <= 48; e++) n.push(
|
|
21939
|
+
for (let e = 0; e <= 48; e++) n.push(Ks(-90 + 180 * e / 48, t));
|
|
21924
21940
|
e.push(n);
|
|
21925
21941
|
}
|
|
21926
21942
|
for (let t = -60; t <= 60; t += 30) {
|
|
21927
21943
|
let n = [];
|
|
21928
|
-
for (let e = 0; e <= 48; e++) n.push(
|
|
21944
|
+
for (let e = 0; e <= 48; e++) n.push(Ks(t, -180 + 360 * e / 48));
|
|
21929
21945
|
e.push(n);
|
|
21930
21946
|
}
|
|
21931
21947
|
return e;
|
|
21932
|
-
}, []), ce = l(() =>
|
|
21948
|
+
}, []), ce = l(() => Ws.map((e) => {
|
|
21933
21949
|
let t = [];
|
|
21934
|
-
for (let n = 0; n < e.length; n += 2) t.push(
|
|
21950
|
+
for (let n = 0; n < e.length; n += 2) t.push(Ks(e[n + 1], e[n]));
|
|
21935
21951
|
return t;
|
|
21936
21952
|
}), []), q = (e) => ({
|
|
21937
21953
|
x: G + W * e[0],
|
|
21938
21954
|
y: K - W * e[1]
|
|
21939
21955
|
}), le = "", ue = "";
|
|
21940
21956
|
if (g) for (let e of ce) {
|
|
21941
|
-
let t = e.map((e) =>
|
|
21957
|
+
let t = e.map((e) => qs(e, A.current.lng, A.current.lat)), n = t.length, r = !1;
|
|
21942
21958
|
for (let e of t) if (e[2] > 0) {
|
|
21943
21959
|
let t = q(e);
|
|
21944
21960
|
ue += `${r ? "L" : "M"}${t.x.toFixed(1)},${t.y.toFixed(1)}`, r = !0;
|
|
@@ -21986,7 +22002,7 @@ var Js = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1
|
|
|
21986
22002
|
}
|
|
21987
22003
|
return t;
|
|
21988
22004
|
}, fe = Math.max(1, ...e.map((e) => e.value ?? 0)), pe = e.map((e, t) => {
|
|
21989
|
-
let n = oe(
|
|
22005
|
+
let n = oe(Ks(e.lat, e.lng));
|
|
21990
22006
|
return {
|
|
21991
22007
|
...e,
|
|
21992
22008
|
i: t,
|
|
@@ -21995,21 +22011,21 @@ var Js = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1
|
|
|
21995
22011
|
r: 3 + Math.max(0, e.value ?? 0) / fe * 6,
|
|
21996
22012
|
col: e.color ?? c
|
|
21997
22013
|
};
|
|
21998
|
-
}), me =
|
|
21999
|
-
let n =
|
|
22014
|
+
}), me = z == null ? null : e[z], he = t.map((e, t) => {
|
|
22015
|
+
let n = Ks(e.from.lat, e.from.lng), r = Ks(e.to.lat, e.to.lng), i = "", a = !1;
|
|
22000
22016
|
for (let e = 0; e <= 40; e++) {
|
|
22001
|
-
let t = e / 40, o =
|
|
22017
|
+
let t = e / 40, o = Js(n, r, t), s = 1 + .34 * Math.sin(Math.PI * t), c = qs(o, A.current.lng, A.current.lat), l = oe([
|
|
22002
22018
|
o[0] * s,
|
|
22003
22019
|
o[1] * s,
|
|
22004
22020
|
o[2] * s
|
|
22005
22021
|
]);
|
|
22006
22022
|
c[2] > -.05 ? (i += `${a ? "L" : "M"}${l.x.toFixed(1)},${l.y.toFixed(1)}`, a = !0) : a = !1;
|
|
22007
22023
|
}
|
|
22008
|
-
let o = k.current ? .5 : (I.current * .16 + t * .27) % 1, s =
|
|
22024
|
+
let o = k.current ? .5 : (I.current * .16 + t * .27) % 1, s = Js(n, r, o), l = 1 + .34 * Math.sin(Math.PI * o), u = qs(s, A.current.lng, A.current.lat), d = oe([
|
|
22009
22025
|
s[0] * l,
|
|
22010
22026
|
s[1] * l,
|
|
22011
22027
|
s[2] * l
|
|
22012
|
-
]), f = me != null && (
|
|
22028
|
+
]), f = me != null && (Ys(e.from, me) || Ys(e.to, me));
|
|
22013
22029
|
return {
|
|
22014
22030
|
d: i,
|
|
22015
22031
|
col: e.color ?? c,
|
|
@@ -22036,11 +22052,11 @@ var Js = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1
|
|
|
22036
22052
|
F.current = !0;
|
|
22037
22053
|
},
|
|
22038
22054
|
onPointerLeave: (e) => {
|
|
22039
|
-
F.current = !1,
|
|
22055
|
+
F.current = !1, U(e), B(null), T.hide(), re();
|
|
22040
22056
|
},
|
|
22041
|
-
onPointerDown:
|
|
22042
|
-
onPointerMove:
|
|
22043
|
-
onPointerUp:
|
|
22057
|
+
onPointerDown: ie,
|
|
22058
|
+
onPointerMove: ae,
|
|
22059
|
+
onPointerUp: U,
|
|
22044
22060
|
children: [/* @__PURE__ */ h("svg", {
|
|
22045
22061
|
width: D,
|
|
22046
22062
|
height: D,
|
|
@@ -22205,7 +22221,7 @@ var Js = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1
|
|
|
22205
22221
|
]
|
|
22206
22222
|
}),
|
|
22207
22223
|
pe.filter((e) => e.vis).map((e) => {
|
|
22208
|
-
let t =
|
|
22224
|
+
let t = z === e.i;
|
|
22209
22225
|
return /* @__PURE__ */ h("g", {
|
|
22210
22226
|
style: { opacity: ge && !t ? .45 : 1 },
|
|
22211
22227
|
children: [
|
|
@@ -22232,7 +22248,7 @@ var Js = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1
|
|
|
22232
22248
|
fill: e.col,
|
|
22233
22249
|
className: "select-globe__point",
|
|
22234
22250
|
onPointerEnter: () => {
|
|
22235
|
-
|
|
22251
|
+
B(e.i), T.show({
|
|
22236
22252
|
x: e.p.x,
|
|
22237
22253
|
y: e.p.y - e.r - 4,
|
|
22238
22254
|
place: e.p.y < K ? "bottom" : "top",
|
|
@@ -22245,13 +22261,13 @@ var Js = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1
|
|
|
22245
22261
|
});
|
|
22246
22262
|
},
|
|
22247
22263
|
onPointerLeave: () => {
|
|
22248
|
-
|
|
22264
|
+
B(null), T.hide();
|
|
22249
22265
|
},
|
|
22250
22266
|
onClick: () => {
|
|
22251
22267
|
N.current = {
|
|
22252
22268
|
lng: -e.lng,
|
|
22253
22269
|
lat: r
|
|
22254
|
-
},
|
|
22270
|
+
}, re();
|
|
22255
22271
|
}
|
|
22256
22272
|
})
|
|
22257
22273
|
]
|
|
@@ -22283,8 +22299,8 @@ var Js = (e, t) => Math.abs(e.lat - t.lat) < 1e-6 && Math.abs(e.lng - t.lng) < 1
|
|
|
22283
22299
|
});
|
|
22284
22300
|
//#endregion
|
|
22285
22301
|
//#region src/SelectTicker.tsx
|
|
22286
|
-
function
|
|
22287
|
-
let i = u(null), a = u(null), s = u(null), c =
|
|
22302
|
+
function Zs({ children: e, speed: t = 28, className: n, ...r }) {
|
|
22303
|
+
let i = u(null), a = u(null), s = u(null), c = Vo(i, 0), l = Vo(s, 0), d = c > 0 && l > c + 1, f = u(0), p = u(null), g = u(!1);
|
|
22288
22304
|
o(() => {
|
|
22289
22305
|
var e, n;
|
|
22290
22306
|
let r = a.current;
|
|
@@ -22345,12 +22361,12 @@ function Xs({ children: e, speed: t = 28, className: n, ...r }) {
|
|
|
22345
22361
|
}
|
|
22346
22362
|
//#endregion
|
|
22347
22363
|
//#region src/SelectPareto.tsx
|
|
22348
|
-
function
|
|
22364
|
+
function Qs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
22349
22365
|
var a;
|
|
22350
22366
|
let { ref: o, width: c } = Y(t), l = Q(), u = s(), [f, p] = d(null), g = {
|
|
22351
|
-
...
|
|
22367
|
+
...Qo,
|
|
22352
22368
|
right: 44
|
|
22353
|
-
}, _ = [...e].sort((e, t) => t.value - e.value), v = _.length, y = _.reduce((e, t) => e + t.value, 0) || 1, b = 0, x = _.map((e) => (b += e.value, b / y * 100)), S = Math.max(0, c - g.left - g.right), C = t - g.top - g.bottom, w =
|
|
22369
|
+
}, _ = [...e].sort((e, t) => t.value - e.value), v = _.length, y = _.reduce((e, t) => e + t.value, 0) || 1, b = 0, x = _.map((e) => (b += e.value, b / y * 100)), S = Math.max(0, c - g.left - g.right), C = t - g.top - g.bottom, w = Ho(((a = _[0]) == null ? void 0 : a.value) ?? 1), T = v > 0 ? S / v : 0, E = Math.min(T * .62, 46), D = g.top + C, O = (e) => D - e / w * C, k = (e) => D - e / 100 * C, A = (e) => g.left + T * e + T / 2, j = x.map((e, t) => [A(t), k(e)]), M = X(0), N = X(1);
|
|
22354
22370
|
return /* @__PURE__ */ h("div", {
|
|
22355
22371
|
...i,
|
|
22356
22372
|
className: `select-chart-wrap${r ? " " + r : ""}`,
|
|
@@ -22379,7 +22395,7 @@ function Zs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
22379
22395
|
stopOpacity: .55
|
|
22380
22396
|
})]
|
|
22381
22397
|
}) }),
|
|
22382
|
-
|
|
22398
|
+
Uo(w).map((e, t) => /* @__PURE__ */ h("g", { children: [/* @__PURE__ */ m("line", {
|
|
22383
22399
|
x1: g.left,
|
|
22384
22400
|
x2: c - g.right,
|
|
22385
22401
|
y1: O(e),
|
|
@@ -22443,7 +22459,7 @@ function Zs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
22443
22459
|
}, t);
|
|
22444
22460
|
}),
|
|
22445
22461
|
/* @__PURE__ */ m("path", {
|
|
22446
|
-
d:
|
|
22462
|
+
d: Ko(j),
|
|
22447
22463
|
fill: "none",
|
|
22448
22464
|
stroke: N,
|
|
22449
22465
|
strokeWidth: 2,
|
|
@@ -22471,7 +22487,7 @@ function Zs({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
22471
22487
|
}
|
|
22472
22488
|
//#endregion
|
|
22473
22489
|
//#region src/SelectWaffle.tsx
|
|
22474
|
-
var
|
|
22490
|
+
var $s = r(function({ segments: e, cols: t = 10, rows: n = 10, format: r = Z, className: i, ...a }, o) {
|
|
22475
22491
|
let s = e.reduce((e, t) => e + t.value, 0) || 1, c = t * n, l = e.map((e) => e.value / s * c), u = l.map(Math.floor), d = u.reduce((e, t) => e + t, 0), f = l.map((e, t) => ({
|
|
22476
22492
|
i: t,
|
|
22477
22493
|
frac: e - u[t]
|
|
@@ -22520,7 +22536,7 @@ var Qs = r(function({ segments: e, cols: t = 10, rows: n = 10, format: r = Z, cl
|
|
|
22520
22536
|
});
|
|
22521
22537
|
//#endregion
|
|
22522
22538
|
//#region src/SelectPyramid.tsx
|
|
22523
|
-
function
|
|
22539
|
+
function ec({ data: e, leftLabel: t = "Esquerda", rightLabel: n = "Direita", height: r, format: i = Z, leftColor: a, rightColor: o, centerWidth: s = 84, className: c, ...l }) {
|
|
22524
22540
|
let u = r ?? Math.max(180, e.length * 40 + 36), { ref: f, width: p } = Y(u), g = Q(), [_, v] = d(null), y = Math.max(1, ...e.flatMap((e) => [e.left, e.right])), b = Math.max(0, (p - s - 16) / 2), x = e.length ? (u - 26 - 8) / e.length : 0, S = Math.min(x * .6, 26), C = 8 + b, w = 8 + b + s, T = a ?? X(1), E = o ?? X(0);
|
|
22525
22541
|
return /* @__PURE__ */ h("div", {
|
|
22526
22542
|
...l,
|
|
@@ -22628,7 +22644,7 @@ function $s({ data: e, leftLabel: t = "Esquerda", rightLabel: n = "Direita", hei
|
|
|
22628
22644
|
}
|
|
22629
22645
|
//#endregion
|
|
22630
22646
|
//#region src/SelectBump.tsx
|
|
22631
|
-
function
|
|
22647
|
+
function tc({ series: e, labels: t, height: n = 240, format: r = Z, className: i, ...a }) {
|
|
22632
22648
|
let { ref: o, width: s } = Y(n), c = Q(), [l, u] = d(null), f = {
|
|
22633
22649
|
top: 16,
|
|
22634
22650
|
right: 78,
|
|
@@ -22665,7 +22681,7 @@ function ec({ series: e, labels: t, height: n = 240, format: r = Z, className: i
|
|
|
22665
22681
|
style: { opacity: l === null || l === n ? 1 : .22 },
|
|
22666
22682
|
children: [
|
|
22667
22683
|
/* @__PURE__ */ m("path", {
|
|
22668
|
-
d:
|
|
22684
|
+
d: Ko(a),
|
|
22669
22685
|
fill: "none",
|
|
22670
22686
|
stroke: i,
|
|
22671
22687
|
strokeWidth: l === n ? 3.5 : 2.5,
|
|
@@ -22713,7 +22729,7 @@ function ec({ series: e, labels: t, height: n = 240, format: r = Z, className: i
|
|
|
22713
22729
|
}
|
|
22714
22730
|
//#endregion
|
|
22715
22731
|
//#region src/SelectParallel.tsx
|
|
22716
|
-
function
|
|
22732
|
+
function nc({ axes: e, data: t, height: n = 260, format: r = Z, className: i, ...a }) {
|
|
22717
22733
|
let { ref: o, width: s } = Y(n), c = Q(), [l, u] = d(null), f = {
|
|
22718
22734
|
top: 30,
|
|
22719
22735
|
right: 28,
|
|
@@ -22805,25 +22821,25 @@ function tc({ axes: e, data: t, height: n = 260, format: r = Z, className: i, ..
|
|
|
22805
22821
|
}
|
|
22806
22822
|
//#endregion
|
|
22807
22823
|
//#region src/SelectIcicle.tsx
|
|
22808
|
-
function
|
|
22809
|
-
return e.children && e.children.length ? e.children.reduce((e, t) => e +
|
|
22824
|
+
function rc(e) {
|
|
22825
|
+
return e.children && e.children.length ? e.children.reduce((e, t) => e + rc(t), 0) : e.value ?? 0;
|
|
22810
22826
|
}
|
|
22811
|
-
function
|
|
22812
|
-
return !e.children || !e.children.length ? t : Math.max(...e.children.map((e) =>
|
|
22827
|
+
function ic(e, t = 0) {
|
|
22828
|
+
return !e.children || !e.children.length ? t : Math.max(...e.children.map((e) => ic(e, t + 1)));
|
|
22813
22829
|
}
|
|
22814
|
-
function
|
|
22815
|
-
let { ref: a, width: o } = Y(t), s = Q(), [c, l] = d(null), u =
|
|
22830
|
+
function ac({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
22831
|
+
let { ref: a, width: o } = Y(t), s = Q(), [c, l] = d(null), u = ic(e), f = t / (u + 1), p = [], g = (e, t, n, r, i) => {
|
|
22816
22832
|
if (p.push({
|
|
22817
22833
|
node: e,
|
|
22818
22834
|
x0: t,
|
|
22819
22835
|
x1: n,
|
|
22820
22836
|
depth: r,
|
|
22821
22837
|
color: e.color ?? X(i),
|
|
22822
|
-
value:
|
|
22838
|
+
value: rc(e)
|
|
22823
22839
|
}), e.children && e.children.length) {
|
|
22824
|
-
let a = e.children.reduce((e, t) => e +
|
|
22840
|
+
let a = e.children.reduce((e, t) => e + rc(t), 0) || 1, o = t;
|
|
22825
22841
|
e.children.forEach((e, s) => {
|
|
22826
|
-
let c = (n - t) *
|
|
22842
|
+
let c = (n - t) * rc(e) / a;
|
|
22827
22843
|
g(e, o, o + c, r + 1, r === 0 ? s : i), o += c;
|
|
22828
22844
|
});
|
|
22829
22845
|
}
|
|
@@ -22884,7 +22900,7 @@ function ic({ data: e, height: t = 240, format: n = Z, className: r, ...i }) {
|
|
|
22884
22900
|
}
|
|
22885
22901
|
//#endregion
|
|
22886
22902
|
//#region src/SelectTree.tsx
|
|
22887
|
-
function
|
|
22903
|
+
function oc({ data: e, height: t = 260, className: n, ...r }) {
|
|
22888
22904
|
let { ref: i, width: a } = Y(t), o = Q(), [s, c] = d(null), l = {
|
|
22889
22905
|
top: 14,
|
|
22890
22906
|
right: 96,
|
|
@@ -22962,7 +22978,7 @@ function ac({ data: e, height: t = 260, className: n, ...r }) {
|
|
|
22962
22978
|
}
|
|
22963
22979
|
//#endregion
|
|
22964
22980
|
//#region src/SelectVenn.tsx
|
|
22965
|
-
var
|
|
22981
|
+
var sc = r(function({ sets: e, size: t = 240, className: n, ...r }, i) {
|
|
22966
22982
|
let a = Math.min(3, e.length), o = t / 2, s = t / 2, c = Math.max(1, ...e.slice(0, a).map((e) => e.size)), l = t * .26, u = (e) => l * .45 + l * .55 * Math.sqrt(e.size / c), d = a <= 2 ? [[o - l * .42, s], [o + l * .42, s]] : [
|
|
22967
22983
|
[o, s - l * .5],
|
|
22968
22984
|
[o - l * .5, s + l * .36],
|
|
@@ -23027,7 +23043,7 @@ var oc = r(function({ sets: e, size: t = 240, className: n, ...r }, i) {
|
|
|
23027
23043
|
}, t))
|
|
23028
23044
|
})]
|
|
23029
23045
|
});
|
|
23030
|
-
}),
|
|
23046
|
+
}), cc = r(function({ data: e, size: t = 260, format: n = Z, className: r, ...i }, a) {
|
|
23031
23047
|
let o = Q(), [s, c] = d(null), l = Math.max(1, ...e.map((e) => e.value)), u = e.map((e, t) => ({
|
|
23032
23048
|
d: e,
|
|
23033
23049
|
i: t,
|
|
@@ -23130,7 +23146,7 @@ var oc = r(function({ sets: e, size: t = 240, className: n, ...r }, i) {
|
|
|
23130
23146
|
});
|
|
23131
23147
|
//#endregion
|
|
23132
23148
|
//#region src/SelectNetwork.tsx
|
|
23133
|
-
function
|
|
23149
|
+
function lc({ nodes: e, links: t, height: n = 300, format: r = Z, className: i, ...a }) {
|
|
23134
23150
|
let { ref: o, width: s } = Y(n), c = Q(), [u, f] = d(null), p = l(() => {
|
|
23135
23151
|
let r = s || n, i = n, a = e.length, o = /* @__PURE__ */ new Map();
|
|
23136
23152
|
if (!a) return o;
|
|
@@ -23244,7 +23260,7 @@ function cc({ nodes: e, links: t, height: n = 300, format: r = Z, className: i,
|
|
|
23244
23260
|
}
|
|
23245
23261
|
//#endregion
|
|
23246
23262
|
//#region src/SelectSearchMenu.tsx
|
|
23247
|
-
function
|
|
23263
|
+
function uc({ search: e, onSearchChange: t, searchPlaceholder: n = "Buscar…", status: r, footer: i, width: a = "min(22rem, 86vw)", children: o }) {
|
|
23248
23264
|
return /* @__PURE__ */ h("div", {
|
|
23249
23265
|
className: "select-combobox__panel select-searchmenu",
|
|
23250
23266
|
style: { width: a },
|
|
@@ -23261,7 +23277,7 @@ function lc({ search: e, onSearchChange: t, searchPlaceholder: n = "Buscar…",
|
|
|
23261
23277
|
className: "select-combobox__empty",
|
|
23262
23278
|
role: "status",
|
|
23263
23279
|
children: r
|
|
23264
|
-
}) : /* @__PURE__ */ m(
|
|
23280
|
+
}) : /* @__PURE__ */ m(dc, { children: o }),
|
|
23265
23281
|
i != null && i !== !1 ? /* @__PURE__ */ m("div", {
|
|
23266
23282
|
className: "select-searchmenu__footer",
|
|
23267
23283
|
children: i
|
|
@@ -23269,7 +23285,7 @@ function lc({ search: e, onSearchChange: t, searchPlaceholder: n = "Buscar…",
|
|
|
23269
23285
|
]
|
|
23270
23286
|
});
|
|
23271
23287
|
}
|
|
23272
|
-
function
|
|
23288
|
+
function dc({ children: e }) {
|
|
23273
23289
|
let t = an({
|
|
23274
23290
|
selector: ".select-combobox__option",
|
|
23275
23291
|
y: 6,
|
|
@@ -23283,7 +23299,7 @@ function uc({ children: e }) {
|
|
|
23283
23299
|
children: e
|
|
23284
23300
|
});
|
|
23285
23301
|
}
|
|
23286
|
-
function
|
|
23302
|
+
function fc({ label: e, secondary: t, selected: n = !1, disabled: r = !1, onSelect: i }) {
|
|
23287
23303
|
return /* @__PURE__ */ h("button", {
|
|
23288
23304
|
type: "button",
|
|
23289
23305
|
role: "option",
|
|
@@ -23309,7 +23325,7 @@ function dc({ label: e, secondary: t, selected: n = !1, disabled: r = !1, onSele
|
|
|
23309
23325
|
}
|
|
23310
23326
|
//#endregion
|
|
23311
23327
|
//#region src/SelectThemeSwitcher.tsx
|
|
23312
|
-
var
|
|
23328
|
+
var pc = [
|
|
23313
23329
|
{
|
|
23314
23330
|
value: "light",
|
|
23315
23331
|
label: "Claro",
|
|
@@ -23326,15 +23342,15 @@ var fc = [
|
|
|
23326
23342
|
icon: /* @__PURE__ */ m(ke, {})
|
|
23327
23343
|
}
|
|
23328
23344
|
];
|
|
23329
|
-
function
|
|
23345
|
+
function mc(e) {
|
|
23330
23346
|
if (e === "system") {
|
|
23331
23347
|
var t, n;
|
|
23332
23348
|
return (t = (n = window).matchMedia) != null && t.call(n, "(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
23333
23349
|
}
|
|
23334
23350
|
return e;
|
|
23335
23351
|
}
|
|
23336
|
-
function
|
|
23337
|
-
let [i, a] = d(!1), s = u(null), c =
|
|
23352
|
+
function hc({ value: e, onChange: t, className: n, ...r }) {
|
|
23353
|
+
let [i, a] = d(!1), s = u(null), c = pc.find((t) => t.value === e) ?? pc[2];
|
|
23338
23354
|
return o(() => {
|
|
23339
23355
|
if (!i) return;
|
|
23340
23356
|
let e = (e) => {
|
|
@@ -23345,7 +23361,7 @@ function mc({ value: e, onChange: t, className: n, ...r }) {
|
|
|
23345
23361
|
...r,
|
|
23346
23362
|
className: `select-themeswitcher${n ? " " + n : ""}`,
|
|
23347
23363
|
ref: s,
|
|
23348
|
-
children: [/* @__PURE__ */ m(
|
|
23364
|
+
children: [/* @__PURE__ */ m(ra, {
|
|
23349
23365
|
active: i,
|
|
23350
23366
|
onClick: () => a((e) => !e),
|
|
23351
23367
|
children: /* @__PURE__ */ h("span", {
|
|
@@ -23354,7 +23370,7 @@ function mc({ value: e, onChange: t, className: n, ...r }) {
|
|
|
23354
23370
|
})
|
|
23355
23371
|
}), i && /* @__PURE__ */ m("div", {
|
|
23356
23372
|
className: "select-themeswitcher__popover",
|
|
23357
|
-
children: /* @__PURE__ */ m(Zi, { children:
|
|
23373
|
+
children: /* @__PURE__ */ m(Zi, { children: pc.map((n) => /* @__PURE__ */ m($i, {
|
|
23358
23374
|
icon: n.icon,
|
|
23359
23375
|
active: n.value === e,
|
|
23360
23376
|
trailing: n.value === e ? /* @__PURE__ */ m(Ve, {}) : null,
|
|
@@ -23368,8 +23384,8 @@ function mc({ value: e, onChange: t, className: n, ...r }) {
|
|
|
23368
23384
|
}
|
|
23369
23385
|
//#endregion
|
|
23370
23386
|
//#region src/SelectDetail.tsx
|
|
23371
|
-
var
|
|
23372
|
-
function
|
|
23387
|
+
var gc = n(!1);
|
|
23388
|
+
function _c({ children: e, stacked: t = !1, loading: n = !1 }) {
|
|
23373
23389
|
let r = an({
|
|
23374
23390
|
selector: ".select-detail",
|
|
23375
23391
|
y: 8,
|
|
@@ -23377,7 +23393,7 @@ function gc({ children: e, stacked: t = !1, loading: n = !1 }) {
|
|
|
23377
23393
|
stagger: .05,
|
|
23378
23394
|
scroll: !0
|
|
23379
23395
|
});
|
|
23380
|
-
return /* @__PURE__ */ m(
|
|
23396
|
+
return /* @__PURE__ */ m(gc.Provider, {
|
|
23381
23397
|
value: n,
|
|
23382
23398
|
children: /* @__PURE__ */ m("div", {
|
|
23383
23399
|
className: `select-detaillist${t ? " select-detaillist--stacked" : ""}`,
|
|
@@ -23386,8 +23402,8 @@ function gc({ children: e, stacked: t = !1, loading: n = !1 }) {
|
|
|
23386
23402
|
})
|
|
23387
23403
|
});
|
|
23388
23404
|
}
|
|
23389
|
-
var
|
|
23390
|
-
let l = a(
|
|
23405
|
+
var vc = r(function({ label: e, children: t, action: n, align: r = "center", loading: i, className: o, ...s }, c) {
|
|
23406
|
+
let l = a(gc), u = i ?? l;
|
|
23391
23407
|
return /* @__PURE__ */ h("div", {
|
|
23392
23408
|
ref: c,
|
|
23393
23409
|
...s,
|
|
@@ -23407,7 +23423,7 @@ var _c = r(function({ label: e, children: t, action: n, align: r = "center", loa
|
|
|
23407
23423
|
})
|
|
23408
23424
|
]
|
|
23409
23425
|
});
|
|
23410
|
-
}),
|
|
23426
|
+
}), yc = r(function({ steps: e, current: t, onSelect: n, orientation: r = "horizontal", className: i, ...a }, o) {
|
|
23411
23427
|
let s = r === "vertical";
|
|
23412
23428
|
return /* @__PURE__ */ m("ol", {
|
|
23413
23429
|
ref: o,
|
|
@@ -23446,7 +23462,7 @@ var _c = r(function({ label: e, children: t, action: n, align: r = "center", loa
|
|
|
23446
23462
|
});
|
|
23447
23463
|
//#endregion
|
|
23448
23464
|
//#region src/SelectSetupGuide.tsx
|
|
23449
|
-
function
|
|
23465
|
+
function bc({ status: e }) {
|
|
23450
23466
|
return /* @__PURE__ */ m("span", {
|
|
23451
23467
|
className: `select-setupguide__icon select-setupguide__icon--${e}`,
|
|
23452
23468
|
"aria-hidden": "true",
|
|
@@ -23465,13 +23481,13 @@ function yc({ status: e }) {
|
|
|
23465
23481
|
})
|
|
23466
23482
|
});
|
|
23467
23483
|
}
|
|
23468
|
-
var
|
|
23484
|
+
var xc = {
|
|
23469
23485
|
done: "feito",
|
|
23470
23486
|
todo: "a fazer",
|
|
23471
23487
|
next: "próximo passo",
|
|
23472
23488
|
skipped: "pulado",
|
|
23473
23489
|
waiting: "aguardando"
|
|
23474
|
-
},
|
|
23490
|
+
}, Sc = r(function({ title: e, description: t, progress: n, actions: r, next: i, groups: a, minimized: o = !1, tone: s = "default", className: c, ...l }, u) {
|
|
23475
23491
|
let d = n && n.total > 0 ? Math.round(n.done / n.total * 100) : 0;
|
|
23476
23492
|
return /* @__PURE__ */ h("section", {
|
|
23477
23493
|
ref: u,
|
|
@@ -23534,14 +23550,14 @@ var bc = {
|
|
|
23534
23550
|
children: e.steps.map((e) => /* @__PURE__ */ h("li", {
|
|
23535
23551
|
className: `select-setupguide__step is-${e.status}`,
|
|
23536
23552
|
children: [
|
|
23537
|
-
/* @__PURE__ */ m(
|
|
23553
|
+
/* @__PURE__ */ m(bc, { status: e.status }),
|
|
23538
23554
|
/* @__PURE__ */ h("span", {
|
|
23539
23555
|
className: "select-setupguide__text",
|
|
23540
23556
|
children: [/* @__PURE__ */ h("span", {
|
|
23541
23557
|
className: "select-setupguide__steptitle",
|
|
23542
23558
|
children: [e.title, /* @__PURE__ */ h("span", {
|
|
23543
23559
|
className: "select-setupguide__sr",
|
|
23544
|
-
children: [" — ",
|
|
23560
|
+
children: [" — ", xc[e.status]]
|
|
23545
23561
|
})]
|
|
23546
23562
|
}), e.description && /* @__PURE__ */ m("span", {
|
|
23547
23563
|
className: "select-setupguide__stepdesc",
|
|
@@ -23560,7 +23576,7 @@ var bc = {
|
|
|
23560
23576
|
})]
|
|
23561
23577
|
});
|
|
23562
23578
|
});
|
|
23563
|
-
function
|
|
23579
|
+
function Cc({ eyebrow: e, title: t, children: n, actions: r }) {
|
|
23564
23580
|
return /* @__PURE__ */ h("div", {
|
|
23565
23581
|
className: "select-setupnext",
|
|
23566
23582
|
children: [
|
|
@@ -23585,37 +23601,37 @@ function Sc({ eyebrow: e, title: t, children: n, actions: r }) {
|
|
|
23585
23601
|
}
|
|
23586
23602
|
//#endregion
|
|
23587
23603
|
//#region src/SelectTour.tsx
|
|
23588
|
-
var
|
|
23589
|
-
function
|
|
23604
|
+
var wc = 6, Tc = 12;
|
|
23605
|
+
function Ec(e) {
|
|
23590
23606
|
let t = document.querySelector(e);
|
|
23591
23607
|
if (!t) return null;
|
|
23592
23608
|
let n = t.getBoundingClientRect();
|
|
23593
23609
|
return n.width === 0 && n.height === 0 ? null : {
|
|
23594
|
-
top: n.top -
|
|
23595
|
-
left: n.left -
|
|
23610
|
+
top: n.top - wc,
|
|
23611
|
+
left: n.left - wc,
|
|
23596
23612
|
width: n.width + 12,
|
|
23597
23613
|
height: n.height + 12
|
|
23598
23614
|
};
|
|
23599
23615
|
}
|
|
23600
|
-
function
|
|
23616
|
+
function Dc(e) {
|
|
23601
23617
|
let t = document.querySelector(e);
|
|
23602
23618
|
if (!t) return !1;
|
|
23603
23619
|
let n = t.getBoundingClientRect();
|
|
23604
23620
|
return n.width === 0 && n.height === 0 || n.right <= 0 || n.left >= window.innerWidth ? !1 : getComputedStyle(t).visibility !== "hidden";
|
|
23605
23621
|
}
|
|
23606
|
-
function
|
|
23607
|
-
let s = l(() => e ? t.filter((e) =>
|
|
23622
|
+
function Oc({ open: e, steps: t, onClose: n, labels: r = {}, theme: a = "light" }) {
|
|
23623
|
+
let s = l(() => e ? t.filter((e) => Dc(e.target)) : [], [e]), [f, p] = d(0), [_, v] = d(null), [y, b] = d(null), x = u(null), S = u(null);
|
|
23608
23624
|
o(() => {
|
|
23609
23625
|
e && p(0);
|
|
23610
23626
|
}, [e]);
|
|
23611
23627
|
let C = s[f], w = f === s.length - 1, T = i(() => {
|
|
23612
23628
|
if (!C) return;
|
|
23613
|
-
let e =
|
|
23629
|
+
let e = Ec(C.target);
|
|
23614
23630
|
v(e);
|
|
23615
23631
|
let t = x.current;
|
|
23616
23632
|
if (!e || !t) return;
|
|
23617
|
-
let n = t.offsetWidth, r = t.offsetHeight, i = window.innerWidth, a = window.innerHeight, o = e.left + e.width +
|
|
23618
|
-
o + n > i - 8 && (o = Math.min(Math.max(8, e.left), i - n - 8), s = e.top + e.height +
|
|
23633
|
+
let n = t.offsetWidth, r = t.offsetHeight, i = window.innerWidth, a = window.innerHeight, o = e.left + e.width + Tc, s = e.top;
|
|
23634
|
+
o + n > i - 8 && (o = Math.min(Math.max(8, e.left), i - n - 8), s = e.top + e.height + Tc, s + r > a - 8 && (s = e.top - r - Tc)), s = Math.min(Math.max(8, s), a - r - 8), b({
|
|
23619
23635
|
top: s,
|
|
23620
23636
|
left: o
|
|
23621
23637
|
});
|
|
@@ -23695,13 +23711,13 @@ function Dc({ open: e, steps: t, onClose: n, labels: r = {}, theme: a = "light"
|
|
|
23695
23711
|
children: r.skip ?? "Pular tour"
|
|
23696
23712
|
}), /* @__PURE__ */ h("span", {
|
|
23697
23713
|
className: "select-tour__nav",
|
|
23698
|
-
children: [f > 0 && /* @__PURE__ */ m(
|
|
23714
|
+
children: [f > 0 && /* @__PURE__ */ m(V, {
|
|
23699
23715
|
variant: "secondary",
|
|
23700
23716
|
size: "sm",
|
|
23701
23717
|
inline: !0,
|
|
23702
23718
|
onClick: () => p((e) => e - 1),
|
|
23703
23719
|
children: r.prev ?? "Anterior"
|
|
23704
|
-
}), /* @__PURE__ */ m(
|
|
23720
|
+
}), /* @__PURE__ */ m(V, {
|
|
23705
23721
|
ref: S,
|
|
23706
23722
|
size: "sm",
|
|
23707
23723
|
inline: !0,
|
|
@@ -23717,7 +23733,7 @@ function Dc({ open: e, steps: t, onClose: n, labels: r = {}, theme: a = "light"
|
|
|
23717
23733
|
}
|
|
23718
23734
|
//#endregion
|
|
23719
23735
|
//#region src/SelectPlanCard.tsx
|
|
23720
|
-
var
|
|
23736
|
+
var kc = r(function({ name: e, price: t, priceSuffix: n, headerAction: r, summary: i, cta: a, featuresTitle: o, features: s, featured: c = !1, className: l, ...u }, d) {
|
|
23721
23737
|
return /* @__PURE__ */ h("div", {
|
|
23722
23738
|
ref: d,
|
|
23723
23739
|
...u,
|
|
@@ -23772,7 +23788,7 @@ var Oc = r(function({ name: e, price: t, priceSuffix: n, headerAction: r, summar
|
|
|
23772
23788
|
})]
|
|
23773
23789
|
})]
|
|
23774
23790
|
});
|
|
23775
|
-
}),
|
|
23791
|
+
}), Ac = r(function({ title: e, description: t, headerAction: n, footer: r, children: i, className: a, ...o }, s) {
|
|
23776
23792
|
return /* @__PURE__ */ h("div", {
|
|
23777
23793
|
ref: s,
|
|
23778
23794
|
...o,
|
|
@@ -23808,7 +23824,7 @@ var Oc = r(function({ name: e, price: t, priceSuffix: n, headerAction: r, summar
|
|
|
23808
23824
|
]
|
|
23809
23825
|
});
|
|
23810
23826
|
});
|
|
23811
|
-
function
|
|
23827
|
+
function jc({ media: e, title: t, secondary: n, action: r, muted: i = !1, onClick: a }) {
|
|
23812
23828
|
let o = /* @__PURE__ */ h(p, { children: [
|
|
23813
23829
|
e && /* @__PURE__ */ m("span", {
|
|
23814
23830
|
className: "select-listrow__media",
|
|
@@ -23842,7 +23858,7 @@ function Ac({ media: e, title: t, secondary: n, action: r, muted: i = !1, onClic
|
|
|
23842
23858
|
}
|
|
23843
23859
|
//#endregion
|
|
23844
23860
|
//#region src/SelectThumbnail.tsx
|
|
23845
|
-
var
|
|
23861
|
+
var Mc = r(function({ src: e, alt: t = "", size: n = 40, className: r, ...i }, a) {
|
|
23846
23862
|
let [s, c] = d(!1);
|
|
23847
23863
|
return o(() => c(!1), [e]), /* @__PURE__ */ m("span", {
|
|
23848
23864
|
ref: a,
|
|
@@ -23867,8 +23883,8 @@ var jc = r(function({ src: e, alt: t = "", size: n = 40, className: r, ...i }, a
|
|
|
23867
23883
|
});
|
|
23868
23884
|
//#endregion
|
|
23869
23885
|
//#region src/SelectImageZoomModal.tsx
|
|
23870
|
-
function
|
|
23871
|
-
return /* @__PURE__ */ m(
|
|
23886
|
+
function Nc({ open: e, onClose: t, src: n, alt: r, title: i }) {
|
|
23887
|
+
return /* @__PURE__ */ m(pa, {
|
|
23872
23888
|
open: e,
|
|
23873
23889
|
onClose: t,
|
|
23874
23890
|
title: i,
|
|
@@ -23886,7 +23902,7 @@ function Mc({ open: e, onClose: t, src: n, alt: r, title: i }) {
|
|
|
23886
23902
|
}
|
|
23887
23903
|
//#endregion
|
|
23888
23904
|
//#region src/SelectZoomThumbnail.tsx
|
|
23889
|
-
function
|
|
23905
|
+
function Pc({ src: e, alt: t = "", size: n = 40, title: r }) {
|
|
23890
23906
|
let [i, a] = d(!1);
|
|
23891
23907
|
return e ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("button", {
|
|
23892
23908
|
type: "button",
|
|
@@ -23899,25 +23915,25 @@ function Nc({ src: e, alt: t = "", size: n = 40, title: r }) {
|
|
|
23899
23915
|
cursor: "zoom-in",
|
|
23900
23916
|
display: "inline-flex"
|
|
23901
23917
|
},
|
|
23902
|
-
children: /* @__PURE__ */ m(
|
|
23918
|
+
children: /* @__PURE__ */ m(Mc, {
|
|
23903
23919
|
src: e,
|
|
23904
23920
|
size: n,
|
|
23905
23921
|
alt: t
|
|
23906
23922
|
})
|
|
23907
|
-
}), i && /* @__PURE__ */ m(
|
|
23923
|
+
}), i && /* @__PURE__ */ m(Nc, {
|
|
23908
23924
|
open: !0,
|
|
23909
23925
|
onClose: () => a(!1),
|
|
23910
23926
|
src: e,
|
|
23911
23927
|
alt: t,
|
|
23912
23928
|
title: r ?? t
|
|
23913
|
-
})] }) : /* @__PURE__ */ m(
|
|
23929
|
+
})] }) : /* @__PURE__ */ m(Mc, {
|
|
23914
23930
|
size: n,
|
|
23915
23931
|
alt: t
|
|
23916
23932
|
});
|
|
23917
23933
|
}
|
|
23918
23934
|
//#endregion
|
|
23919
23935
|
//#region src/SelectMediaCell.tsx
|
|
23920
|
-
var
|
|
23936
|
+
var Fc = r(function({ media: e, title: t, secondary: n, className: r, ...i }, a) {
|
|
23921
23937
|
return /* @__PURE__ */ h("span", {
|
|
23922
23938
|
ref: a,
|
|
23923
23939
|
...i,
|
|
@@ -23939,14 +23955,14 @@ var Pc = r(function({ media: e, title: t, secondary: n, className: r, ...i }, a)
|
|
|
23939
23955
|
});
|
|
23940
23956
|
//#endregion
|
|
23941
23957
|
//#region src/SelectOfflineModal.tsx
|
|
23942
|
-
function
|
|
23958
|
+
function Ic() {
|
|
23943
23959
|
let [e, t] = d(() => typeof navigator < "u" && navigator.onLine === !1);
|
|
23944
23960
|
return o(() => {
|
|
23945
23961
|
let e = () => t(!1), n = () => t(!0);
|
|
23946
23962
|
return window.addEventListener("online", e), window.addEventListener("offline", n), () => {
|
|
23947
23963
|
window.removeEventListener("online", e), window.removeEventListener("offline", n);
|
|
23948
23964
|
};
|
|
23949
|
-
}, []), /* @__PURE__ */ m(
|
|
23965
|
+
}, []), /* @__PURE__ */ m(pa, {
|
|
23950
23966
|
open: e,
|
|
23951
23967
|
onClose: () => {},
|
|
23952
23968
|
showClose: !1,
|
|
@@ -23962,7 +23978,7 @@ function Fc() {
|
|
|
23962
23978
|
}
|
|
23963
23979
|
//#endregion
|
|
23964
23980
|
//#region src/SelectKeyValueEditor.tsx
|
|
23965
|
-
function
|
|
23981
|
+
function Lc(e) {
|
|
23966
23982
|
return Array.isArray(e) ? e.filter((e) => typeof e == "object" && !!e).map((e) => ({
|
|
23967
23983
|
name: String(e.name ?? e.key ?? ""),
|
|
23968
23984
|
value: e.value == null ? "" : String(e.value)
|
|
@@ -23971,8 +23987,8 @@ function Ic(e) {
|
|
|
23971
23987
|
value: t == null ? "" : String(t)
|
|
23972
23988
|
})) : [];
|
|
23973
23989
|
}
|
|
23974
|
-
var
|
|
23975
|
-
let d =
|
|
23990
|
+
var Rc = r(function({ pairs: e, onChange: t, keyPlaceholder: n = "Chave", valuePlaceholder: r = "Valor", keyOptions: i, addLabel: a = "Adicionar", max: o, helpText: s = "Linhas vazias serão ignoradas.", className: c, ...l }, u) {
|
|
23991
|
+
let d = Lc(e), f = (e, n) => t(d.map((t, r) => r === e ? {
|
|
23976
23992
|
...t,
|
|
23977
23993
|
...n
|
|
23978
23994
|
} : t)), p = (e) => t(d.filter((t, n) => n !== e)), g = () => t([...d, {
|
|
@@ -24036,7 +24052,7 @@ var Lc = r(function({ pairs: e, onChange: t, keyPlaceholder: n = "Chave", valueP
|
|
|
24036
24052
|
})
|
|
24037
24053
|
]
|
|
24038
24054
|
});
|
|
24039
|
-
}),
|
|
24055
|
+
}), zc = (e) => String(e).padStart(2, "0"), Bc = {
|
|
24040
24056
|
"en-US": {
|
|
24041
24057
|
weekdays: [
|
|
24042
24058
|
"Su",
|
|
@@ -24095,34 +24111,34 @@ var Lc = r(function({ pairs: e, onChange: t, keyPlaceholder: n = "Chave", valueP
|
|
|
24095
24111
|
to: "Até",
|
|
24096
24112
|
cancel: "Cancelar",
|
|
24097
24113
|
apply: "Aplicar",
|
|
24098
|
-
formatDate: (e) => `${
|
|
24114
|
+
formatDate: (e) => `${zc(e.getDate())} / ${zc(e.getMonth() + 1)} / ${e.getFullYear()}`
|
|
24099
24115
|
}
|
|
24100
|
-
},
|
|
24116
|
+
}, Vc = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Hc = (e) => new Date(e.getFullYear(), e.getMonth(), 1), Uc = (e, t) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + t), Wc = (e, t) => new Date(e.getFullYear(), e.getMonth() + t, 1), Gc = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), Kc = (e) => {
|
|
24101
24117
|
let t = /* @__PURE__ */ new Date();
|
|
24102
24118
|
return {
|
|
24103
24119
|
from: /* @__PURE__ */ new Date(t.getTime() - e * 6e4),
|
|
24104
24120
|
to: t
|
|
24105
24121
|
};
|
|
24106
|
-
},
|
|
24122
|
+
}, qc = [
|
|
24107
24123
|
{
|
|
24108
24124
|
id: "15m",
|
|
24109
24125
|
label: "Last 15 minutes",
|
|
24110
|
-
range: () =>
|
|
24126
|
+
range: () => Kc(15)
|
|
24111
24127
|
},
|
|
24112
24128
|
{
|
|
24113
24129
|
id: "1h",
|
|
24114
24130
|
label: "Last 1 hour",
|
|
24115
|
-
range: () =>
|
|
24131
|
+
range: () => Kc(60)
|
|
24116
24132
|
},
|
|
24117
24133
|
{
|
|
24118
24134
|
id: "3h",
|
|
24119
24135
|
label: "Last 3 hours",
|
|
24120
|
-
range: () =>
|
|
24136
|
+
range: () => Kc(180)
|
|
24121
24137
|
},
|
|
24122
24138
|
{
|
|
24123
24139
|
id: "24h",
|
|
24124
24140
|
label: "Last 24 hours",
|
|
24125
|
-
range: () =>
|
|
24141
|
+
range: () => Kc(1440)
|
|
24126
24142
|
},
|
|
24127
24143
|
{
|
|
24128
24144
|
id: "3d",
|
|
@@ -24138,78 +24154,78 @@ var Lc = r(function({ pairs: e, onChange: t, keyPlaceholder: n = "Chave", valueP
|
|
|
24138
24154
|
id: "all",
|
|
24139
24155
|
label: "All",
|
|
24140
24156
|
range: () => ({
|
|
24141
|
-
from:
|
|
24142
|
-
to:
|
|
24157
|
+
from: Vc(/* @__PURE__ */ new Date()),
|
|
24158
|
+
to: Vc(/* @__PURE__ */ new Date())
|
|
24143
24159
|
})
|
|
24144
24160
|
}
|
|
24145
|
-
],
|
|
24146
|
-
let t =
|
|
24161
|
+
], Jc = (e) => {
|
|
24162
|
+
let t = Vc(/* @__PURE__ */ new Date());
|
|
24147
24163
|
return {
|
|
24148
|
-
from:
|
|
24164
|
+
from: Uc(t, -e),
|
|
24149
24165
|
to: t
|
|
24150
24166
|
};
|
|
24151
|
-
},
|
|
24152
|
-
let t =
|
|
24167
|
+
}, Yc = (e) => {
|
|
24168
|
+
let t = Uc(Vc(/* @__PURE__ */ new Date()), -e);
|
|
24153
24169
|
return {
|
|
24154
24170
|
from: t,
|
|
24155
24171
|
to: t
|
|
24156
24172
|
};
|
|
24157
|
-
},
|
|
24173
|
+
}, Xc = [
|
|
24158
24174
|
{
|
|
24159
24175
|
id: "today",
|
|
24160
24176
|
label: "Hoje",
|
|
24161
|
-
range: () =>
|
|
24177
|
+
range: () => Jc(0)
|
|
24162
24178
|
},
|
|
24163
24179
|
{
|
|
24164
24180
|
id: "yesterday",
|
|
24165
24181
|
label: "Ontem",
|
|
24166
|
-
range: () =>
|
|
24182
|
+
range: () => Yc(1)
|
|
24167
24183
|
},
|
|
24168
24184
|
{
|
|
24169
24185
|
id: "7d",
|
|
24170
24186
|
label: "Últimos 7 dias",
|
|
24171
|
-
range: () =>
|
|
24187
|
+
range: () => Jc(6)
|
|
24172
24188
|
},
|
|
24173
24189
|
{
|
|
24174
24190
|
id: "10d",
|
|
24175
24191
|
label: "Últimos 10 dias",
|
|
24176
|
-
range: () =>
|
|
24192
|
+
range: () => Jc(9)
|
|
24177
24193
|
},
|
|
24178
24194
|
{
|
|
24179
24195
|
id: "15d",
|
|
24180
24196
|
label: "Últimos 15 dias",
|
|
24181
|
-
range: () =>
|
|
24197
|
+
range: () => Jc(14)
|
|
24182
24198
|
},
|
|
24183
24199
|
{
|
|
24184
24200
|
id: "20d",
|
|
24185
24201
|
label: "Últimos 20 dias",
|
|
24186
|
-
range: () =>
|
|
24202
|
+
range: () => Jc(19)
|
|
24187
24203
|
},
|
|
24188
24204
|
{
|
|
24189
24205
|
id: "30d",
|
|
24190
24206
|
label: "Últimos 30 dias",
|
|
24191
|
-
range: () =>
|
|
24207
|
+
range: () => Jc(29)
|
|
24192
24208
|
},
|
|
24193
24209
|
{
|
|
24194
24210
|
id: "90d",
|
|
24195
24211
|
label: "Últimos 90 dias",
|
|
24196
|
-
range: () =>
|
|
24212
|
+
range: () => Jc(89)
|
|
24197
24213
|
}
|
|
24198
24214
|
];
|
|
24199
|
-
function
|
|
24215
|
+
function Zc(e) {
|
|
24200
24216
|
if (!e) return "—";
|
|
24201
24217
|
let t = e.getHours(), n = t < 12 ? "AM" : "PM";
|
|
24202
24218
|
return t = t % 12 || 12, `${t} : ${String(e.getMinutes()).padStart(2, "0")} ${n}`;
|
|
24203
24219
|
}
|
|
24204
|
-
var
|
|
24205
|
-
let p =
|
|
24220
|
+
var Qc = r(function({ value: e, presets: t = qc, onApply: n, onCancel: r, accentVar: i, locale: a = "en-US", showTime: o = !0, maxDate: s, embedded: c = !1, className: l, ...u }, f) {
|
|
24221
|
+
let p = Bc[a], g = Vc(/* @__PURE__ */ new Date()), _ = s ? Vc(s) : null, [v, y] = d(e ?? {
|
|
24206
24222
|
from: g,
|
|
24207
24223
|
to: g
|
|
24208
|
-
}), [b, x] = d(
|
|
24224
|
+
}), [b, x] = d(Hc((e == null ? void 0 : e.from) ?? /* @__PURE__ */ new Date())), [S, C] = d(null), w = Uc(Hc(b), -Hc(b).getDay()), T = Array.from({ length: 42 }, (e, t) => Uc(w, t)), E = (e) => _ ? Vc(e) > _ : !1, D = (e) => e ? p.formatDate(e) : /* @__PURE__ */ m("span", {
|
|
24209
24225
|
className: "select-datepicker__placeholder",
|
|
24210
24226
|
children: "— / — / ——"
|
|
24211
24227
|
}), O = (e) => {
|
|
24212
|
-
E(e) || (C(null), y((t) => !t.from || t.from && t.to || e <
|
|
24228
|
+
E(e) || (C(null), y((t) => !t.from || t.from && t.to || e < Vc(t.from) ? {
|
|
24213
24229
|
from: e,
|
|
24214
24230
|
to: null
|
|
24215
24231
|
} : {
|
|
@@ -24219,7 +24235,7 @@ var Zc = r(function({ value: e, presets: t = Kc, onApply: n, onCancel: r, accent
|
|
|
24219
24235
|
}, k = (e) => {
|
|
24220
24236
|
if (e.disabled || !e.range) return;
|
|
24221
24237
|
let t = e.range();
|
|
24222
|
-
y(t), C(e.id), t.from && x(
|
|
24238
|
+
y(t), C(e.id), t.from && x(Hc(t.from));
|
|
24223
24239
|
}, A = i ? { "--select-dp-accent": `var(${i})` } : void 0;
|
|
24224
24240
|
return /* @__PURE__ */ m("div", {
|
|
24225
24241
|
ref: f,
|
|
@@ -24265,7 +24281,7 @@ var Zc = r(function({ value: e, presets: t = Kc, onApply: n, onCancel: r, accent
|
|
|
24265
24281
|
}),
|
|
24266
24282
|
o && /* @__PURE__ */ m("span", {
|
|
24267
24283
|
className: "select-datepicker__pill select-datepicker__pill--time",
|
|
24268
|
-
children:
|
|
24284
|
+
children: Zc(v[e])
|
|
24269
24285
|
})
|
|
24270
24286
|
]
|
|
24271
24287
|
}, e))
|
|
@@ -24277,8 +24293,8 @@ var Zc = r(function({ value: e, presets: t = Kc, onApply: n, onCancel: r, accent
|
|
|
24277
24293
|
type: "button",
|
|
24278
24294
|
className: "select-datepicker__nav",
|
|
24279
24295
|
"aria-label": a === "pt-BR" ? "Mês anterior" : "Previous month",
|
|
24280
|
-
onClick: () => x((e) =>
|
|
24281
|
-
children: /* @__PURE__ */ m(
|
|
24296
|
+
onClick: () => x((e) => Wc(e, -1)),
|
|
24297
|
+
children: /* @__PURE__ */ m(U, {})
|
|
24282
24298
|
}),
|
|
24283
24299
|
/* @__PURE__ */ h("span", {
|
|
24284
24300
|
className: "select-datepicker__monthlabel",
|
|
@@ -24292,8 +24308,8 @@ var Zc = r(function({ value: e, presets: t = Kc, onApply: n, onCancel: r, accent
|
|
|
24292
24308
|
type: "button",
|
|
24293
24309
|
className: "select-datepicker__nav",
|
|
24294
24310
|
"aria-label": a === "pt-BR" ? "Próximo mês" : "Next month",
|
|
24295
|
-
onClick: () => x((e) =>
|
|
24296
|
-
children: /* @__PURE__ */ m(
|
|
24311
|
+
onClick: () => x((e) => Wc(e, 1)),
|
|
24312
|
+
children: /* @__PURE__ */ m(ae, {})
|
|
24297
24313
|
})
|
|
24298
24314
|
]
|
|
24299
24315
|
}),
|
|
@@ -24304,7 +24320,7 @@ var Zc = r(function({ value: e, presets: t = Kc, onApply: n, onCancel: r, accent
|
|
|
24304
24320
|
className: "select-datepicker__weekday",
|
|
24305
24321
|
children: e
|
|
24306
24322
|
}, t)), T.map((e) => {
|
|
24307
|
-
let t = e.getMonth() !== b.getMonth(), n = E(e), r = !!v.from &&
|
|
24323
|
+
let t = e.getMonth() !== b.getMonth(), n = E(e), r = !!v.from && Gc(e, v.from), i = !!v.to && Gc(e, v.to), a = r || i, o = !!v.from && !!v.to && !Gc(v.from, v.to), s = "select-datepicker__day" + (v.from && v.to && e > Vc(v.from) && e < Vc(v.to) ? " select-datepicker__day--in-range" : "") + (o && r ? " select-datepicker__day--range-start" : "") + (o && i ? " select-datepicker__day--range-end" : ""), c = "select-datepicker__daybtn" + (a ? " is-selected" : "") + (Gc(e, g) && !a ? " is-today" : "") + (t ? " is-outside" : "");
|
|
24308
24324
|
return /* @__PURE__ */ m("div", {
|
|
24309
24325
|
className: s,
|
|
24310
24326
|
children: /* @__PURE__ */ m("button", {
|
|
@@ -24319,12 +24335,12 @@ var Zc = r(function({ value: e, presets: t = Kc, onApply: n, onCancel: r, accent
|
|
|
24319
24335
|
}),
|
|
24320
24336
|
/* @__PURE__ */ h("div", {
|
|
24321
24337
|
className: "select-datepicker__footer",
|
|
24322
|
-
children: [/* @__PURE__ */ m(
|
|
24338
|
+
children: [/* @__PURE__ */ m(V, {
|
|
24323
24339
|
variant: "secondary",
|
|
24324
24340
|
inline: !0,
|
|
24325
24341
|
onClick: r,
|
|
24326
24342
|
children: p.cancel
|
|
24327
|
-
}), /* @__PURE__ */ m(
|
|
24343
|
+
}), /* @__PURE__ */ m(V, {
|
|
24328
24344
|
variant: "primary",
|
|
24329
24345
|
inline: !0,
|
|
24330
24346
|
onClick: () => n == null ? void 0 : n(v),
|
|
@@ -24335,23 +24351,23 @@ var Zc = r(function({ value: e, presets: t = Kc, onApply: n, onCancel: r, accent
|
|
|
24335
24351
|
})]
|
|
24336
24352
|
})
|
|
24337
24353
|
});
|
|
24338
|
-
}),
|
|
24339
|
-
function
|
|
24354
|
+
}), $c = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), el = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), tl = (e) => `${String(e.getDate()).padStart(2, "0")}/${String(e.getMonth() + 1).padStart(2, "0")}/${e.getFullYear()}`;
|
|
24355
|
+
function nl(e, t) {
|
|
24340
24356
|
for (let r of t) {
|
|
24341
24357
|
var n;
|
|
24342
24358
|
let t = (n = r.range) == null ? void 0 : n.call(r);
|
|
24343
|
-
if (t != null && t.from && t != null && t.to &&
|
|
24359
|
+
if (t != null && t.from && t != null && t.to && el(t.from, e.start) && el(t.to, e.end)) return r.label;
|
|
24344
24360
|
}
|
|
24345
|
-
return
|
|
24361
|
+
return el(e.start, e.end) ? tl(e.start) : `${tl(e.start)} – ${tl(e.end)}`;
|
|
24346
24362
|
}
|
|
24347
|
-
function
|
|
24348
|
-
let [c, l] = d(!1), u = r === null ? null : r ??
|
|
24363
|
+
function rl({ value: e, onChange: t, presets: n = Xc, maxDate: r, placement: i = "bottom-end", size: a = "md", disabled: o = !1, block: s = !1 }) {
|
|
24364
|
+
let [c, l] = d(!1), u = r === null ? null : r ?? $c(/* @__PURE__ */ new Date());
|
|
24349
24365
|
return /* @__PURE__ */ m(fn, {
|
|
24350
24366
|
active: c,
|
|
24351
24367
|
onClose: () => l(!1),
|
|
24352
24368
|
placement: i,
|
|
24353
24369
|
role: "dialog",
|
|
24354
|
-
activator: /* @__PURE__ */ m(
|
|
24370
|
+
activator: /* @__PURE__ */ m(V, {
|
|
24355
24371
|
variant: "secondary",
|
|
24356
24372
|
size: a,
|
|
24357
24373
|
inline: !s,
|
|
@@ -24359,9 +24375,9 @@ function nl({ value: e, onChange: t, presets: n = Yc, maxDate: r, placement: i =
|
|
|
24359
24375
|
icon: /* @__PURE__ */ m(rt, {}),
|
|
24360
24376
|
trailingIcon: /* @__PURE__ */ m(W, {}),
|
|
24361
24377
|
onClick: () => l((e) => !e),
|
|
24362
|
-
children:
|
|
24378
|
+
children: nl(e, n)
|
|
24363
24379
|
}),
|
|
24364
|
-
children: /* @__PURE__ */ m(
|
|
24380
|
+
children: /* @__PURE__ */ m(Qc, {
|
|
24365
24381
|
embedded: !0,
|
|
24366
24382
|
locale: "pt-BR",
|
|
24367
24383
|
showTime: !1,
|
|
@@ -24374,8 +24390,8 @@ function nl({ value: e, onChange: t, presets: n = Yc, maxDate: r, placement: i =
|
|
|
24374
24390
|
onCancel: () => l(!1),
|
|
24375
24391
|
onApply: (e) => {
|
|
24376
24392
|
e.from && t({
|
|
24377
|
-
start:
|
|
24378
|
-
end:
|
|
24393
|
+
start: $c(e.from),
|
|
24394
|
+
end: $c(e.to ?? e.from)
|
|
24379
24395
|
}), l(!1);
|
|
24380
24396
|
}
|
|
24381
24397
|
})
|
|
@@ -24383,7 +24399,7 @@ function nl({ value: e, onChange: t, presets: n = Yc, maxDate: r, placement: i =
|
|
|
24383
24399
|
}
|
|
24384
24400
|
//#endregion
|
|
24385
24401
|
//#region src/SelectNumberField.tsx
|
|
24386
|
-
var
|
|
24402
|
+
var il = r(function({ label: e, value: t, onChange: n, min: r, max: i, step: a = 1, decimal: o = !1, disabled: c = !1, hint: l, error: u, onBlur: f, placeholder: p, size: g = "md", className: _, ...v }, y) {
|
|
24387
24403
|
let b = s(), x = (e) => Math.min(i ?? Infinity, Math.max(r ?? -Infinity, e)), S = (e) => Math.round(e * 1e6) / 1e6, C = t ?? 0, w = r != null && C <= r, T = i != null && C >= i, [E, D] = d(!1), [O, k] = d(""), A = o && E ? O : t == null ? "" : String(t), j = (e) => {
|
|
24388
24404
|
let t = o ? e.replace(/[^\d.,-]/g, "").replace(",", ".") : e.replace(/[^\d-]/g, "");
|
|
24389
24405
|
if (o && k(t), t === "" || t === "-" || t === ".") return n(null);
|
|
@@ -24457,7 +24473,7 @@ var rl = r(function({ label: e, value: t, onChange: n, min: r, max: i, step: a =
|
|
|
24457
24473
|
});
|
|
24458
24474
|
//#endregion
|
|
24459
24475
|
//#region src/SelectRepeatingFieldArray.tsx
|
|
24460
|
-
function
|
|
24476
|
+
function al({ items: e, onChange: t, renderRow: n, newItem: r, addLabel: i = "Adicionar", rowLabel: a, min: o = 0, max: s, addDisabled: c = !1, reorderable: l = !1, chrome: u = "card", emptyState: d, helpText: f }) {
|
|
24461
24477
|
let g = !c && (s == null || e.length < s), _ = e.length > o, v = (n, r) => t(e.map((e, t) => t === n ? r : e)), y = (n) => t(e.filter((e, t) => t !== n)), b = (n, r) => {
|
|
24462
24478
|
let i = n + r;
|
|
24463
24479
|
if (i < 0 || i >= e.length) return;
|
|
@@ -24532,7 +24548,7 @@ function il({ items: e, onChange: t, renderRow: n, newItem: r, addLabel: i = "Ad
|
|
|
24532
24548
|
align: "space-between",
|
|
24533
24549
|
blockAlign: "center",
|
|
24534
24550
|
gap: "200",
|
|
24535
|
-
children: [/* @__PURE__ */ m(
|
|
24551
|
+
children: [/* @__PURE__ */ m(V, {
|
|
24536
24552
|
variant: "secondary",
|
|
24537
24553
|
size: "sm",
|
|
24538
24554
|
inline: !0,
|
|
@@ -24552,7 +24568,7 @@ function il({ items: e, onChange: t, renderRow: n, newItem: r, addLabel: i = "Ad
|
|
|
24552
24568
|
}
|
|
24553
24569
|
//#endregion
|
|
24554
24570
|
//#region src/SelectBuilderLayout.tsx
|
|
24555
|
-
function
|
|
24571
|
+
function ol({ title: e, subtitle: t, backTo: n, onSave: r, saving: i = !1, saveLabel: a = "Salvar", saveDisabled: o = !1, cancelTo: s, error: c, preview: l, children: u }) {
|
|
24556
24572
|
let d = v();
|
|
24557
24573
|
return /* @__PURE__ */ m(li, {
|
|
24558
24574
|
title: e,
|
|
@@ -24592,7 +24608,7 @@ function al({ title: e, subtitle: t, backTo: n, onSave: r, saving: i = !1, saveL
|
|
|
24592
24608
|
}
|
|
24593
24609
|
//#endregion
|
|
24594
24610
|
//#region src/SelectBuilderWorkspace.tsx
|
|
24595
|
-
function
|
|
24611
|
+
function sl({ title: e, subtitle: t, backTo: n, onSave: r, saving: i = !1, saveLabel: a = "Salvar", saveDisabled: o = !1, cancelTo: s, error: c, sections: u, activeId: f, onActiveChange: g, searchable: _ = !1, preview: y, previewLayout: b = "fill", toolbar: x, dirty: S = !1, dirtyLabel: C = "Alterações não salvas" }) {
|
|
24596
24612
|
var w;
|
|
24597
24613
|
let T = v(), [E, D] = d(((w = u[0]) == null ? void 0 : w.id) ?? ""), [O, k] = d(""), A = f ?? E, j = u.find((e) => e.id === A) ?? u[0], M = (e) => {
|
|
24598
24614
|
f === void 0 && D(e), g == null || g(e);
|
|
@@ -24642,7 +24658,7 @@ function ol({ title: e, subtitle: t, backTo: n, onSave: r, saving: i = !1, saveL
|
|
|
24642
24658
|
role: "status",
|
|
24643
24659
|
children: C
|
|
24644
24660
|
}),
|
|
24645
|
-
s && /* @__PURE__ */ m(
|
|
24661
|
+
s && /* @__PURE__ */ m(V, {
|
|
24646
24662
|
inline: !0,
|
|
24647
24663
|
size: "sm",
|
|
24648
24664
|
variant: "secondary",
|
|
@@ -24650,7 +24666,7 @@ function ol({ title: e, subtitle: t, backTo: n, onSave: r, saving: i = !1, saveL
|
|
|
24650
24666
|
disabled: i,
|
|
24651
24667
|
children: "Cancelar"
|
|
24652
24668
|
}),
|
|
24653
|
-
/* @__PURE__ */ m(
|
|
24669
|
+
/* @__PURE__ */ m(V, {
|
|
24654
24670
|
inline: !0,
|
|
24655
24671
|
size: "sm",
|
|
24656
24672
|
onClick: r,
|
|
@@ -24752,10 +24768,10 @@ function ol({ title: e, subtitle: t, backTo: n, onSave: r, saving: i = !1, saveL
|
|
|
24752
24768
|
}
|
|
24753
24769
|
//#endregion
|
|
24754
24770
|
//#region src/SelectFlowCanvas.tsx
|
|
24755
|
-
var
|
|
24756
|
-
function
|
|
24771
|
+
var cl = (e) => Math.round(e * 100) / 100;
|
|
24772
|
+
function ll({ width: e, height: t, edges: n, labels: r = [], pluses: i = [], children: a, zoom: o, defaultZoom: c = 1, onZoomChange: l, minZoom: u = .5, maxZoom: f = 1.3, onBackgroundClick: p, ariaLabel: g }) {
|
|
24757
24773
|
let _ = s().replace(/:/g, ""), [v, y] = d(c), b = o ?? v, x = (e) => {
|
|
24758
|
-
let t =
|
|
24774
|
+
let t = cl(Math.min(f, Math.max(u, e)));
|
|
24759
24775
|
o === void 0 && y(t), l == null || l(t);
|
|
24760
24776
|
}, S = `select-flow-arrow-${_}`, C = `select-flow-arrow-on-${_}`;
|
|
24761
24777
|
return /* @__PURE__ */ h("div", {
|
|
@@ -24871,7 +24887,7 @@ function cl({ width: e, height: t, edges: n, labels: r = [], pluses: i = [], chi
|
|
|
24871
24887
|
})]
|
|
24872
24888
|
});
|
|
24873
24889
|
}
|
|
24874
|
-
function
|
|
24890
|
+
function ul({ x: e, y: t, width: n, height: r, shape: i = "card", tone: a = "neutral", icon: o, order: s, eyebrow: c, title: l, subtitle: u, tags: d, titleTone: f = "default", selected: p = !1, active: g = !1, muted: _ = !1, invalid: v = !1, onClick: y, ariaLabel: b }) {
|
|
24875
24891
|
let x = `${p ? " is-selected" : v ? " is-invalid" : g ? " is-on" : ""}${_ ? " is-muted" : ""}`, S = {
|
|
24876
24892
|
left: e,
|
|
24877
24893
|
top: t,
|
|
@@ -24947,7 +24963,7 @@ function ll({ x: e, y: t, width: n, height: r, shape: i = "card", tone: a = "neu
|
|
|
24947
24963
|
})]
|
|
24948
24964
|
});
|
|
24949
24965
|
}
|
|
24950
|
-
function
|
|
24966
|
+
function dl({ title: e, subtitle: t, onBack: n, backLabel: r = "Voltar", toolbar: i, actions: a, error: o, canvas: s, inspectorHead: c, inspector: l, inspectorLabel: u = "Painel" }) {
|
|
24951
24967
|
return /* @__PURE__ */ h("div", {
|
|
24952
24968
|
className: "select-flowpage",
|
|
24953
24969
|
children: [
|
|
@@ -25009,7 +25025,7 @@ function ul({ title: e, subtitle: t, onBack: n, backLabel: r = "Voltar", toolbar
|
|
|
25009
25025
|
}
|
|
25010
25026
|
//#endregion
|
|
25011
25027
|
//#region src/SelectSwitchField.tsx
|
|
25012
|
-
var
|
|
25028
|
+
var fl = r(function({ label: e, checked: t, onChange: n, disabled: r = !1, hint: i, help: a, className: o, ...s }, c) {
|
|
25013
25029
|
return /* @__PURE__ */ h("div", {
|
|
25014
25030
|
ref: c,
|
|
25015
25031
|
...s,
|
|
@@ -25037,7 +25053,7 @@ var dl = r(function({ label: e, checked: t, onChange: n, disabled: r = !1, hint:
|
|
|
25037
25053
|
children: i
|
|
25038
25054
|
})]
|
|
25039
25055
|
});
|
|
25040
|
-
}),
|
|
25056
|
+
}), pl = [
|
|
25041
25057
|
"#212529",
|
|
25042
25058
|
"#495057",
|
|
25043
25059
|
"#868E96",
|
|
@@ -25054,13 +25070,13 @@ var dl = r(function({ label: e, checked: t, onChange: n, disabled: r = !1, hint:
|
|
|
25054
25070
|
"#DB2777",
|
|
25055
25071
|
"#9333EA",
|
|
25056
25072
|
"#6D28D9"
|
|
25057
|
-
],
|
|
25058
|
-
function
|
|
25059
|
-
let t =
|
|
25073
|
+
], ml = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i;
|
|
25074
|
+
function hl(e) {
|
|
25075
|
+
let t = ml.exec((e ?? "").trim());
|
|
25060
25076
|
return t ? `#${(t[1].length === 3 ? t[1].split("").map((e) => e + e).join("") : t[1]).toUpperCase()}` : null;
|
|
25061
25077
|
}
|
|
25062
|
-
function
|
|
25063
|
-
let t =
|
|
25078
|
+
function gl(e) {
|
|
25079
|
+
let t = hl(e);
|
|
25064
25080
|
if (!t) return 0;
|
|
25065
25081
|
let [n, r, i] = [
|
|
25066
25082
|
1,
|
|
@@ -25069,13 +25085,13 @@ function hl(e) {
|
|
|
25069
25085
|
].map((e) => parseInt(t.slice(e, e + 2), 16) / 255).map((e) => e <= .03928 ? e / 12.92 : ((e + .055) / 1.055) ** 2.4);
|
|
25070
25086
|
return .2126 * n + .7152 * r + .0722 * i;
|
|
25071
25087
|
}
|
|
25072
|
-
function
|
|
25073
|
-
let [n, r] = [
|
|
25088
|
+
function _l(e, t) {
|
|
25089
|
+
let [n, r] = [gl(e), gl(t)].sort((e, t) => t - e);
|
|
25074
25090
|
return (n + .05) / (r + .05);
|
|
25075
25091
|
}
|
|
25076
|
-
var
|
|
25077
|
-
function
|
|
25078
|
-
let t =
|
|
25092
|
+
var vl = (e) => Math.min(1, Math.max(0, e));
|
|
25093
|
+
function yl(e) {
|
|
25094
|
+
let t = hl(e) ?? "#000000", [n, r, i] = [
|
|
25079
25095
|
1,
|
|
25080
25096
|
3,
|
|
25081
25097
|
5
|
|
@@ -25086,7 +25102,7 @@ function vl(e) {
|
|
|
25086
25102
|
v: a
|
|
25087
25103
|
};
|
|
25088
25104
|
}
|
|
25089
|
-
function
|
|
25105
|
+
function bl({ h: e, s: t, v: n }) {
|
|
25090
25106
|
let r = (r) => {
|
|
25091
25107
|
let i = (r + e / 60) % 6;
|
|
25092
25108
|
return n - n * t * Math.max(0, Math.min(i, 4 - i, 1));
|
|
@@ -25097,26 +25113,26 @@ function yl({ h: e, s: t, v: n }) {
|
|
|
25097
25113
|
r(1)
|
|
25098
25114
|
].map((e) => Math.round(e * 255).toString(16).padStart(2, "0")).join("").toUpperCase()}`;
|
|
25099
25115
|
}
|
|
25100
|
-
function
|
|
25101
|
-
let [n, r] = d(() =>
|
|
25116
|
+
function xl({ hex: e, onPick: t }) {
|
|
25117
|
+
let [n, r] = d(() => yl(e ?? "#1D4ED8")), i = u(n), a = (e) => {
|
|
25102
25118
|
i.current = e, r(e);
|
|
25103
25119
|
};
|
|
25104
25120
|
o(() => {
|
|
25105
|
-
if (!e ||
|
|
25106
|
-
let t =
|
|
25121
|
+
if (!e || bl(i.current) === e) return;
|
|
25122
|
+
let t = yl(e);
|
|
25107
25123
|
a(t.s === 0 || t.v === 0 ? {
|
|
25108
25124
|
...t,
|
|
25109
25125
|
h: i.current.h
|
|
25110
25126
|
} : t);
|
|
25111
25127
|
}, [e]);
|
|
25112
25128
|
let s = (e) => {
|
|
25113
|
-
a(e), t(
|
|
25129
|
+
a(e), t(bl(e));
|
|
25114
25130
|
}, c = (e, t, n) => {
|
|
25115
25131
|
var r;
|
|
25116
25132
|
(r = e.setPointerCapture) == null || r.call(e, t.pointerId);
|
|
25117
25133
|
let i = (t) => {
|
|
25118
25134
|
let r = e.getBoundingClientRect();
|
|
25119
|
-
n(
|
|
25135
|
+
n(vl((t.clientX - r.left) / (r.width || 1)), vl((t.clientY - r.top) / (r.height || 1)));
|
|
25120
25136
|
};
|
|
25121
25137
|
i(t);
|
|
25122
25138
|
let a = (e) => i(e), o = () => {
|
|
@@ -25126,20 +25142,20 @@ function bl({ hex: e, onPick: t }) {
|
|
|
25126
25142
|
}, l = (e) => {
|
|
25127
25143
|
let t = e.shiftKey ? .1 : .01, { h: n, s: r, v: a } = i.current, o = e.key === "ArrowLeft" ? {
|
|
25128
25144
|
h: n,
|
|
25129
|
-
s:
|
|
25145
|
+
s: vl(r - t),
|
|
25130
25146
|
v: a
|
|
25131
25147
|
} : e.key === "ArrowRight" ? {
|
|
25132
25148
|
h: n,
|
|
25133
|
-
s:
|
|
25149
|
+
s: vl(r + t),
|
|
25134
25150
|
v: a
|
|
25135
25151
|
} : e.key === "ArrowUp" ? {
|
|
25136
25152
|
h: n,
|
|
25137
25153
|
s: r,
|
|
25138
|
-
v:
|
|
25154
|
+
v: vl(a + t)
|
|
25139
25155
|
} : e.key === "ArrowDown" ? {
|
|
25140
25156
|
h: n,
|
|
25141
25157
|
s: r,
|
|
25142
|
-
v:
|
|
25158
|
+
v: vl(a - t)
|
|
25143
25159
|
} : null;
|
|
25144
25160
|
o && (e.preventDefault(), s(o));
|
|
25145
25161
|
}, f = (e) => {
|
|
@@ -25149,11 +25165,11 @@ function bl({ hex: e, onPick: t }) {
|
|
|
25149
25165
|
s: r,
|
|
25150
25166
|
v: a
|
|
25151
25167
|
}));
|
|
25152
|
-
}, g =
|
|
25168
|
+
}, g = bl({
|
|
25153
25169
|
h: n.h,
|
|
25154
25170
|
s: 1,
|
|
25155
25171
|
v: 1
|
|
25156
|
-
}), _ =
|
|
25172
|
+
}), _ = bl(n);
|
|
25157
25173
|
return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("div", {
|
|
25158
25174
|
className: "select-colorfield__sv",
|
|
25159
25175
|
style: { backgroundColor: g },
|
|
@@ -25197,24 +25213,24 @@ function bl({ hex: e, onPick: t }) {
|
|
|
25197
25213
|
})
|
|
25198
25214
|
})] });
|
|
25199
25215
|
}
|
|
25200
|
-
var
|
|
25201
|
-
function
|
|
25216
|
+
var Sl = (e) => e.toFixed(1).replace(".", ",");
|
|
25217
|
+
function Cl({ label: e, help: t, hint: n, error: r, value: i, onChange: a, presets: c = pl, disabled: l = !1, allowEmpty: u = !1, contrastWith: f, contrastLabel: g = "o texto", id: _ }) {
|
|
25202
25218
|
let v = s(), y = _ ?? `color-${v}`, [b, x] = d(!1), [S, C] = d(i ?? ""), [w, T] = d(null);
|
|
25203
25219
|
o(() => {
|
|
25204
25220
|
C(i ?? ""), T(null);
|
|
25205
25221
|
}, [i]);
|
|
25206
|
-
let E =
|
|
25222
|
+
let E = hl(i ?? ""), D = (e) => {
|
|
25207
25223
|
if (!e.trim()) {
|
|
25208
25224
|
u ? (T(null), a("")) : C(i ?? "");
|
|
25209
25225
|
return;
|
|
25210
25226
|
}
|
|
25211
|
-
let t =
|
|
25227
|
+
let t = hl(e);
|
|
25212
25228
|
if (!t) {
|
|
25213
25229
|
T("Use o formato #RRGGBB (ex.: #1D4ED8).");
|
|
25214
25230
|
return;
|
|
25215
25231
|
}
|
|
25216
25232
|
T(null), C(t), t !== E && a(t);
|
|
25217
|
-
}, O = f ?
|
|
25233
|
+
}, O = f ? hl(f) : null, k = E && O ? _l(E, O) : null, A = r ?? w, j = A ? `${y}-err` : n || k != null ? `${y}-hint` : void 0;
|
|
25218
25234
|
return /* @__PURE__ */ h("div", {
|
|
25219
25235
|
className: `select-field select-colorfield${l ? " is-disabled" : ""}`,
|
|
25220
25236
|
children: [
|
|
@@ -25242,7 +25258,7 @@ function Sl({ label: e, help: t, hint: n, error: r, value: i, onChange: a, prese
|
|
|
25242
25258
|
children: /* @__PURE__ */ h("div", {
|
|
25243
25259
|
className: "select-colorfield__panel",
|
|
25244
25260
|
children: [
|
|
25245
|
-
/* @__PURE__ */ m(
|
|
25261
|
+
/* @__PURE__ */ m(xl, {
|
|
25246
25262
|
hex: E,
|
|
25247
25263
|
onPick: D
|
|
25248
25264
|
}),
|
|
@@ -25251,7 +25267,7 @@ function Sl({ label: e, help: t, hint: n, error: r, value: i, onChange: a, prese
|
|
|
25251
25267
|
role: "group",
|
|
25252
25268
|
"aria-label": "Cores prontas",
|
|
25253
25269
|
children: c.map((e) => {
|
|
25254
|
-
let t =
|
|
25270
|
+
let t = hl(e) ?? e, n = t === E;
|
|
25255
25271
|
return /* @__PURE__ */ m("button", {
|
|
25256
25272
|
type: "button",
|
|
25257
25273
|
className: `select-colorfield__preset${n ? " is-selected" : ""}`,
|
|
@@ -25282,7 +25298,7 @@ function Sl({ label: e, help: t, hint: n, error: r, value: i, onChange: a, prese
|
|
|
25282
25298
|
className: "select-input select-input--mono select-colorfield__hex",
|
|
25283
25299
|
value: S,
|
|
25284
25300
|
onChange: (e) => {
|
|
25285
|
-
C(e.target.value), e.target.value.replace("#", "").length === 6 &&
|
|
25301
|
+
C(e.target.value), e.target.value.replace("#", "").length === 6 && hl(e.target.value) && D(e.target.value);
|
|
25286
25302
|
},
|
|
25287
25303
|
onBlur: () => D(S),
|
|
25288
25304
|
placeholder: u ? "Padrão" : "#000000",
|
|
@@ -25305,14 +25321,14 @@ function Sl({ label: e, help: t, hint: n, error: r, value: i, onChange: a, prese
|
|
|
25305
25321
|
}) : null : /* @__PURE__ */ h("p", {
|
|
25306
25322
|
id: `${y}-hint`,
|
|
25307
25323
|
className: `select-field__hint select-colorfield__contrast${k < 4.5 ? " is-low" : ""}`,
|
|
25308
|
-
children: [k >= 4.5 ? `Contraste com ${g}: ${
|
|
25324
|
+
children: [k >= 4.5 ? `Contraste com ${g}: ${Sl(k)}:1 — legível.` : `Contraste com ${g}: ${Sl(k)}:1 — difícil de ler. Escolha uma cor ${gl(E) < gl(O) ? "mais escura" : "mais clara"}.`, n ? /* @__PURE__ */ h(p, { children: [" ", n] }) : null]
|
|
25309
25325
|
})
|
|
25310
25326
|
]
|
|
25311
25327
|
});
|
|
25312
25328
|
}
|
|
25313
25329
|
//#endregion
|
|
25314
25330
|
//#region src/SelectProgressBar.tsx
|
|
25315
|
-
var
|
|
25331
|
+
var wl = r(function({ value: e = 0, max: t = 100, tone: n = "brand", size: r = "md", label: i, valueLabel: a, caption: o, indeterminate: s = !1, ariaLabel: c, loading: l = !1, className: u, ...d }, f) {
|
|
25316
25332
|
if (l) return /* @__PURE__ */ h("div", {
|
|
25317
25333
|
ref: f,
|
|
25318
25334
|
...d,
|
|
@@ -25357,7 +25373,7 @@ var Cl = r(function({ value: e = 0, max: t = 100, tone: n = "brand", size: r = "
|
|
|
25357
25373
|
})
|
|
25358
25374
|
]
|
|
25359
25375
|
});
|
|
25360
|
-
}),
|
|
25376
|
+
}), Tl = r(function({ icon: e, accent: t, title: n, description: r, badge: i, meta: a, cta: o, to: s, onClick: c, selected: l, disabled: u = !1, className: d, ...f }, g) {
|
|
25361
25377
|
let v = `select-choicecard${l ? " is-selected" : ""}${u ? " is-disabled" : ""}${d ? " " + d : ""}`, y = t ? { "--select-choice-accent": t } : void 0, b = /* @__PURE__ */ h(p, { children: [
|
|
25362
25378
|
/* @__PURE__ */ h("span", {
|
|
25363
25379
|
className: "select-choicecard__top",
|
|
@@ -25418,7 +25434,7 @@ var Cl = r(function({ value: e = 0, max: t = 100, tone: n = "brand", size: r = "
|
|
|
25418
25434
|
children: b
|
|
25419
25435
|
});
|
|
25420
25436
|
});
|
|
25421
|
-
function
|
|
25437
|
+
function El({ badge: e = !0 }) {
|
|
25422
25438
|
return /* @__PURE__ */ h("div", {
|
|
25423
25439
|
className: "select-choicecard select-choicecard--skeleton",
|
|
25424
25440
|
"aria-hidden": "true",
|
|
@@ -25439,7 +25455,7 @@ function Tl({ badge: e = !0 }) {
|
|
|
25439
25455
|
]
|
|
25440
25456
|
});
|
|
25441
25457
|
}
|
|
25442
|
-
var
|
|
25458
|
+
var Dl = r(function({ children: e, minCardWidth: t = "15rem", loading: n = !1, skeletonCount: r = 4, className: i, style: a, ...o }, s) {
|
|
25443
25459
|
return /* @__PURE__ */ m("div", {
|
|
25444
25460
|
ref: s,
|
|
25445
25461
|
...o,
|
|
@@ -25449,16 +25465,16 @@ var El = r(function({ children: e, minCardWidth: t = "15rem", loading: n = !1, s
|
|
|
25449
25465
|
"--select-choice-min": t,
|
|
25450
25466
|
...a
|
|
25451
25467
|
},
|
|
25452
|
-
children: n ? Array.from({ length: r }, (e, t) => /* @__PURE__ */ m(
|
|
25468
|
+
children: n ? Array.from({ length: r }, (e, t) => /* @__PURE__ */ m(El, {}, t)) : e
|
|
25453
25469
|
});
|
|
25454
|
-
}),
|
|
25470
|
+
}), Ol = 960, kl = Math.round(Ol * 210 / 297), Al = r(function({ side: e = "front", accent: t, courseTitle: n, subtitle: r, memberName: i = "Nome do aluno", body: a, signatures: s = [], issuedAt: c, verificationCode: l, eyebrow: f, className: g }, _) {
|
|
25455
25471
|
let v = u(null), [y, b] = d(.5);
|
|
25456
25472
|
o(() => {
|
|
25457
25473
|
let e = v.current;
|
|
25458
25474
|
if (!e) return;
|
|
25459
25475
|
let t = () => {
|
|
25460
25476
|
let t = e.clientWidth;
|
|
25461
|
-
t > 0 && b(Math.min(1, t /
|
|
25477
|
+
t > 0 && b(Math.min(1, t / Ol));
|
|
25462
25478
|
};
|
|
25463
25479
|
if (t(), typeof ResizeObserver > "u") return;
|
|
25464
25480
|
let n = new ResizeObserver(t);
|
|
@@ -25466,7 +25482,7 @@ var El = r(function({ children: e, minCardWidth: t = "15rem", loading: n = !1, s
|
|
|
25466
25482
|
}, []);
|
|
25467
25483
|
let x = e === "front", S = {
|
|
25468
25484
|
"--select-cert-accent": t || void 0,
|
|
25469
|
-
height:
|
|
25485
|
+
height: kl * y + 2
|
|
25470
25486
|
};
|
|
25471
25487
|
return /* @__PURE__ */ m("div", {
|
|
25472
25488
|
ref: (e) => {
|
|
@@ -25479,8 +25495,8 @@ var El = r(function({ children: e, minCardWidth: t = "15rem", loading: n = !1, s
|
|
|
25479
25495
|
children: /* @__PURE__ */ m("div", {
|
|
25480
25496
|
className: "select-certpreview__sheet",
|
|
25481
25497
|
style: {
|
|
25482
|
-
width:
|
|
25483
|
-
height:
|
|
25498
|
+
width: Ol,
|
|
25499
|
+
height: kl,
|
|
25484
25500
|
transform: `scale(${y})`
|
|
25485
25501
|
},
|
|
25486
25502
|
children: /* @__PURE__ */ h("div", {
|
|
@@ -25553,13 +25569,13 @@ var El = r(function({ children: e, minCardWidth: t = "15rem", loading: n = !1, s
|
|
|
25553
25569
|
});
|
|
25554
25570
|
//#endregion
|
|
25555
25571
|
//#region src/SelectImageField.tsx
|
|
25556
|
-
function
|
|
25572
|
+
function jl(e) {
|
|
25557
25573
|
return new Promise((t, n) => {
|
|
25558
25574
|
let r = new FileReader();
|
|
25559
25575
|
r.onload = () => t(String(r.result)), r.onerror = () => n(r.error), r.readAsDataURL(e);
|
|
25560
25576
|
});
|
|
25561
25577
|
}
|
|
25562
|
-
var
|
|
25578
|
+
var Ml = r(function({ label: e, value: t, onChange: n, accept: r = "image/*", maxSizeMB: i = 3, urlPlaceholder: a, hint: o, uploadFile: s, className: c, ...l }, u) {
|
|
25563
25579
|
let [f, p] = d([]), [g, _] = d(null), v = t ? [t] : [], y = async (e) => {
|
|
25564
25580
|
let t = e[0];
|
|
25565
25581
|
if (!t) {
|
|
@@ -25567,7 +25583,7 @@ var jl = r(function({ label: e, value: t, onChange: n, accept: r = "image/*", ma
|
|
|
25567
25583
|
return;
|
|
25568
25584
|
}
|
|
25569
25585
|
if (_(null), !s) {
|
|
25570
|
-
n(await
|
|
25586
|
+
n(await jl(t)), p([]);
|
|
25571
25587
|
return;
|
|
25572
25588
|
}
|
|
25573
25589
|
p([t]);
|
|
@@ -25599,7 +25615,7 @@ var jl = r(function({ label: e, value: t, onChange: n, accept: r = "image/*", ma
|
|
|
25599
25615
|
children: g
|
|
25600
25616
|
})]
|
|
25601
25617
|
});
|
|
25602
|
-
}),
|
|
25618
|
+
}), Nl = r(function({ items: e, multiple: t = !1, defaultOpenIds: n = [], className: r, ...i }, a) {
|
|
25603
25619
|
let [o, s] = d(() => new Set(n)), c = (e) => s((n) => {
|
|
25604
25620
|
let r = n.has(e), i = new Set(t ? n : []);
|
|
25605
25621
|
return r ? i.delete(e) : i.add(e), i;
|
|
@@ -25645,6 +25661,6 @@ var jl = r(function({ label: e, value: t, onChange: n, accept: r = "image/*", ma
|
|
|
25645
25661
|
});
|
|
25646
25662
|
});
|
|
25647
25663
|
//#endregion
|
|
25648
|
-
export { C as AUTH_FX_VARIANTS, Le as AppleIcon, mt as AppsIcon, G as ArrowLeftIcon, ze as ArrowRightIcon, Ge as AtIcon, Pe as AuthAppIcon, St as AwardIcon, Ce as BellIcon, bt as BookIcon, pe as BookmarkIcon, lt as BroadcastIcon, qe as BuildingIcon, rt as CalendarIcon, gt as CartIcon, ft as ChartLineIcon, We as CheckCircleIcon, Ve as CheckIcon, W as ChevronDownIcon,
|
|
25664
|
+
export { C as AUTH_FX_VARIANTS, Le as AppleIcon, mt as AppsIcon, G as ArrowLeftIcon, ze as ArrowRightIcon, Ge as AtIcon, Pe as AuthAppIcon, St as AwardIcon, Ce as BellIcon, bt as BookIcon, pe as BookmarkIcon, lt as BroadcastIcon, qe as BuildingIcon, rt as CalendarIcon, gt as CartIcon, ft as ChartLineIcon, We as CheckCircleIcon, Ve as CheckIcon, W as ChevronDownIcon, U as ChevronLeftIcon, ae as ChevronRightIcon, it as ChevronUpIcon, ot as ClipboardIcon, fe as ClockIcon, le as CloseIcon, ce as CopyIcon, $e as CreditCardIcon, Ee as CubeIcon, ct as DiscountIcon, ue as DotsHorizontalIcon, et as EditIcon, at as ExportIcon, q as ExternalLinkIcon, He as EyeIcon, Ue as EyeOffIcon, Ie as FacebookIcon, xt as FileDownloadIcon, K as FilterIcon, ie as GithubIcon, _e as GlobeIcon, H as GoogleIcon, be as HelpIcon, Xe as HomeIcon, ye as InfoIcon, Je as KeyIcon, dt as LinkIcon, nt as LockIcon, Fe as MailIcon, _t as MenuIcon, ht as MinusCircleIcon, Ae as MobileIcon, ke as MonitorIcon, Oe as MoonIcon, st as NoteIcon, wt as PaletteIcon, Re as PasskeyIcon, Ne as PhoneIcon, me as PinIcon, yt as PlayCircleIcon, Me as PlusIcon, je as RefreshIcon, Te as RocketIcon, tr as SELECT_CARD_BRANDS, pl as SELECT_COLOR_PRESETS, _a as SELECT_COL_DATETIME, va as SELECT_COL_ID, Pn as SELECT_COUNTRIES, Xc as SELECT_DAILY_PRESETS, qc as SELECT_DATE_PRESETS, Wn as SELECT_SPACE, Bn as SELECT_TRANSACTION_STATUS, oe as SearchIcon, Nl as SelectAccordion, ca as SelectActionCard, Hn as SelectActionList, Un as SelectActionMenu, Qt as SelectAddButton, Aa as SelectAddCard, Ut as SelectAlert, la as SelectAppTile, B as SelectAuthFx, qr as SelectAvatar, ei as SelectBackLink, zn as SelectBadge, Io as SelectBalanceCard, vn as SelectBankAccountField, es as SelectBarChart, Qn as SelectBox, As as SelectBoxPlot, ol as SelectBuilderLayout, sl as SelectBuilderWorkspace, Cs as SelectBullet, tc as SelectBump, V as SelectButton, Ms as SelectCalendarHeatmap, ks as SelectCandlestick, re as SelectCard, ja as SelectCardGrid, Al as SelectCertificatePreview, zo as SelectChartCard, Mt as SelectCheckbox, Tl as SelectChoiceCard, El as SelectChoiceCardSkeleton, Dl as SelectChoiceGrid, Vs as SelectChord, cc as SelectCirclePack, sa as SelectCollapsible, Cl as SelectColorField, as as SelectColumnChart, rs as SelectComboChart, mn as SelectCombobox, ha as SelectConfirmModal, aa as SelectCopyRow, oa as SelectCopyableId, ua as SelectCreateTile, ka as SelectDataTable, go as SelectDateField, Qc as SelectDatePicker, rl as SelectDateRangeField, _c as SelectDetailList, vc as SelectDetailRow, ur as SelectDisclosureButton, Kr as SelectDivider, Ht as SelectDocumentField, is as SelectDonut, S as SelectDotField, Fs as SelectDumbbell, Lo as SelectFeeBreakdown, jt as SelectField, hn as SelectFieldGrid, Zt as SelectFileDropzone, Wt as SelectFileTile, xo as SelectFilterBar, ia as SelectFilterChip, ll as SelectFlowCanvas, dl as SelectFlowLayout, ul as SelectFlowNode, fi as SelectFormLayout, ga as SelectFormModal, os as SelectFunnel, ds as SelectGauge, Ls as SelectGaugeBands, Xs as SelectGlobe, Yn as SelectGrid, fs as SelectHeatmap, Hs as SelectHexbin, Qa as SelectHideMoneyToggle, bs as SelectHorizontalBar, ac as SelectIcicle, xi as SelectIcon, J as SelectIconButton, Xr as SelectIdentityFooter, Ml as SelectImageField, en as SelectImageUploadField, $t as SelectImageUrlsField, Nc as SelectImageZoomModal, kt as SelectInfoTip, Jn as SelectInline, Hr as SelectJsonViewer, Rc as SelectKeyValueEditor, Ro as SelectKpiCard, At as SelectLabelRow, Pa as SelectLayoutThumb, ts as SelectLineChart, Gr as SelectLinkButton, Ac as SelectListCard, jc as SelectListRow, ci as SelectLoader, Is as SelectMarimekko, ro as SelectMarkStack, Fc as SelectMediaCell, Zi as SelectMenu, ra as SelectMenuButton, na as SelectMenuDivider, ta as SelectMenuHeading, $i as SelectMenuItem, ea as SelectMenuLink, Za as SelectMetricDelta, pa as SelectModal, Ya as SelectMoney, Rt as SelectMoneyField, lc as SelectNetwork, Si as SelectNote, il as SelectNumberField, $a as SelectOfferPrice, Ic as SelectOfflineModal, Jr as SelectOptionList, Yr as SelectOptionRow, Zr as SelectOtpInput, li as SelectPage, Ii as SelectPagination, Ti as SelectPanel, nc as SelectParallel, Qs as SelectPareto, si as SelectPasswordStrength, lr as SelectPaymentBrand, In as SelectPhoneField, kc as SelectPlanCard, Ns as SelectPolarArea, fn as SelectPopover, Fo as SelectPreviewFrame, wl as SelectProgressBar, ps as SelectProgressList, ec as SelectPyramid, Ds as SelectRadar, hs as SelectRadialBar, Ln as SelectRadioGroup, js as SelectRangeBar, to as SelectRating, no as SelectRatingQuote, Ma as SelectRecordCard, al as SelectRepeatingFieldArray, ti as SelectResendButton, ri as SelectRetryStatus, ma as SelectRowActions, Os as SelectSankey, Es as SelectScatter, Ni as SelectSearchInput, uc as SelectSearchMenu, fc as SelectSearchMenuOption, Ei as SelectSection, Rn as SelectSegmented, tn as SelectSelect, Ja as SelectSensitiveValue, Ci as SelectSettingList, wi as SelectSettingRow, Sc as SelectSetupGuide, Cc as SelectSetupNext, Mi as SelectSideNav, yi as SelectSkeleton, Ps as SelectSlope, $o as SelectSparkline, La as SelectSplitChain, qn as SelectStack, ns as SelectStackedArea, Vn as SelectStatusBadge, yc as SelectSteps, Rs as SelectStreamGraph, zs as SelectSunburst, Co as SelectSurface, yn as SelectSwitch, fl as SelectSwitchField, Gi as SelectTable, Yi as SelectTableCell, Xi as SelectTableEmpty, Ji as SelectTableRow, Di as SelectTabs, So as SelectTagSelect, $n as SelectText, Nt as SelectTextarea, hc as SelectThemeSwitcher, Mc as SelectThumbnail, Zs as SelectTicker, Wr as SelectTimeline, Ao as SelectToastProvider, bn as SelectToggleList, Sn as SelectTogglePanel, xn as SelectToggleRow, Ot as SelectTooltip, Oc as SelectTour, oc as SelectTree, Ts as SelectTreemap, Pt as SelectUnitInput, qi as SelectUserCell, Ka as SelectValueVisibilityProvider, sc as SelectVenn, Bs as SelectViolin, $s as SelectWaffle, xs as SelectWaterfall, Us as SelectWordCloud, da as SelectWorkspaceSwitcher, Pc as SelectZoomThumbnail, ve as SelectorIcon, tt as SendIcon, de as Setting4Icon, Ze as SettingsIcon, Be as ShieldIcon, ge as SplitIcon, he as StarIcon, pt as StoreIcon, vt as StorefrontIcon, De as SunIcon, we as TerminalIcon, Ye as TrashIcon, ut as TruckIcon, se as UploadIcon, Se as UserIcon, Ct as UsersIcon, Qe as WalletIcon, xe as WarningIcon, Ke as Web3Icon, _l as contrastRatio, un as detectSelectTheme, Fn as dialCodeOf, yl as hexToHsv, bl as hsvToHex, hl as normalizeHex, oi as passwordScore, mc as resolveSelectTheme, ir as selectCardBrand, ar as selectCardBrandLabel, Da as useSelectPageSize, jo as useSelectToast, qa as useSelectValueVisibility };
|
|
25649
25665
|
|
|
25650
25666
|
//# sourceMappingURL=index.js.map
|