@unizap/uniui 1.0.42 → 1.0.43
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/components/DatePicker/DatePicker.types.d.ts +1 -1
- package/dist/uniui.js +952 -943
- package/dist/uniui.umd.cjs +65 -65
- package/package.json +1 -1
package/dist/uniui.js
CHANGED
|
@@ -55,7 +55,7 @@ function io() {
|
|
|
55
55
|
return x.$$typeof === ee ? null : x.displayName || x.name || null;
|
|
56
56
|
if (typeof x == "string") return x;
|
|
57
57
|
switch (x) {
|
|
58
|
-
case
|
|
58
|
+
case m:
|
|
59
59
|
return "Fragment";
|
|
60
60
|
case y:
|
|
61
61
|
return "Profiler";
|
|
@@ -65,7 +65,7 @@ function io() {
|
|
|
65
65
|
return "Suspense";
|
|
66
66
|
case O:
|
|
67
67
|
return "SuspenseList";
|
|
68
|
-
case
|
|
68
|
+
case W:
|
|
69
69
|
return "Activity";
|
|
70
70
|
}
|
|
71
71
|
if (typeof x == "object")
|
|
@@ -76,9 +76,9 @@ function io() {
|
|
|
76
76
|
return "Portal";
|
|
77
77
|
case j:
|
|
78
78
|
return (x.displayName || "Context") + ".Provider";
|
|
79
|
-
case E:
|
|
80
|
-
return (x._context.displayName || "Context") + ".Consumer";
|
|
81
79
|
case M:
|
|
80
|
+
return (x._context.displayName || "Context") + ".Consumer";
|
|
81
|
+
case E:
|
|
82
82
|
var C = x.render;
|
|
83
83
|
return x = x.displayName, x || (x = C.displayName || C.name || "", x = x !== "" ? "ForwardRef(" + x + ")" : "ForwardRef"), x;
|
|
84
84
|
case F:
|
|
@@ -113,7 +113,7 @@ function io() {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
function o(x) {
|
|
116
|
-
if (x ===
|
|
116
|
+
if (x === m) return "<>";
|
|
117
117
|
if (typeof x == "object" && x !== null && x.$$typeof === H)
|
|
118
118
|
return "<...>";
|
|
119
119
|
try {
|
|
@@ -124,7 +124,7 @@ function io() {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
function r() {
|
|
127
|
-
var x =
|
|
127
|
+
var x = Y.A;
|
|
128
128
|
return x === null ? null : x.getOwner();
|
|
129
129
|
}
|
|
130
130
|
function i() {
|
|
@@ -139,7 +139,7 @@ function io() {
|
|
|
139
139
|
}
|
|
140
140
|
function s(x, C) {
|
|
141
141
|
function _() {
|
|
142
|
-
|
|
142
|
+
Z || (Z = !0, console.error(
|
|
143
143
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
144
144
|
C
|
|
145
145
|
));
|
|
@@ -155,7 +155,7 @@ function io() {
|
|
|
155
155
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
156
156
|
)), x = this.props.ref, x !== void 0 ? x : null;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function p(x, C, _, $, P, D, A, k) {
|
|
159
159
|
return _ = D.ref, x = {
|
|
160
160
|
$$typeof: g,
|
|
161
161
|
type: x,
|
|
@@ -187,19 +187,19 @@ function io() {
|
|
|
187
187
|
value: k
|
|
188
188
|
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function d(x, C, _, $, P, D, A, k) {
|
|
191
191
|
var R = C.children;
|
|
192
192
|
if (R !== void 0)
|
|
193
193
|
if ($)
|
|
194
194
|
if (U(R)) {
|
|
195
195
|
for ($ = 0; $ < R.length; $++)
|
|
196
|
-
|
|
196
|
+
f(R[$]);
|
|
197
197
|
Object.freeze && Object.freeze(R);
|
|
198
198
|
} else
|
|
199
199
|
console.error(
|
|
200
200
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
201
201
|
);
|
|
202
|
-
else
|
|
202
|
+
else f(R);
|
|
203
203
|
if (se.call(C, "key")) {
|
|
204
204
|
R = e(x);
|
|
205
205
|
var I = Object.keys(C).filter(function(re) {
|
|
@@ -226,7 +226,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
226
226
|
return R && s(
|
|
227
227
|
_,
|
|
228
228
|
typeof x == "function" ? x.displayName || x.name || "Unknown" : x
|
|
229
|
-
),
|
|
229
|
+
), p(
|
|
230
230
|
x,
|
|
231
231
|
R,
|
|
232
232
|
D,
|
|
@@ -237,43 +237,43 @@ React keys must be passed directly to JSX without using spread:
|
|
|
237
237
|
k
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function f(x) {
|
|
241
241
|
typeof x == "object" && x !== null && x.$$typeof === g && x._store && (x._store.validated = 1);
|
|
242
242
|
}
|
|
243
|
-
var
|
|
243
|
+
var u = Ce, g = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), M = Symbol.for("react.consumer"), j = Symbol.for("react.context"), E = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), O = Symbol.for("react.suspense_list"), F = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), W = Symbol.for("react.activity"), ee = Symbol.for("react.client.reference"), Y = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, se = Object.prototype.hasOwnProperty, U = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
244
244
|
return null;
|
|
245
245
|
};
|
|
246
|
-
|
|
246
|
+
u = {
|
|
247
247
|
"react-stack-bottom-frame": function(x) {
|
|
248
248
|
return x();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var
|
|
252
|
-
|
|
251
|
+
var Z, N = {}, Q = u["react-stack-bottom-frame"].bind(
|
|
252
|
+
u,
|
|
253
253
|
i
|
|
254
254
|
)(), ge = z(o(i)), X = {};
|
|
255
|
-
Ne.Fragment =
|
|
256
|
-
var D = 1e4 >
|
|
257
|
-
return
|
|
255
|
+
Ne.Fragment = m, Ne.jsx = function(x, C, _, $, P) {
|
|
256
|
+
var D = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
257
|
+
return d(
|
|
258
258
|
x,
|
|
259
259
|
C,
|
|
260
260
|
_,
|
|
261
261
|
!1,
|
|
262
262
|
$,
|
|
263
263
|
P,
|
|
264
|
-
D ? Error("react-stack-top-frame") :
|
|
264
|
+
D ? Error("react-stack-top-frame") : Q,
|
|
265
265
|
D ? z(o(x)) : ge
|
|
266
266
|
);
|
|
267
267
|
}, Ne.jsxs = function(x, C, _, $, P) {
|
|
268
|
-
var D = 1e4 >
|
|
269
|
-
return
|
|
268
|
+
var D = 1e4 > Y.recentlyCreatedOwnerStacks++;
|
|
269
|
+
return d(
|
|
270
270
|
x,
|
|
271
271
|
C,
|
|
272
272
|
_,
|
|
273
273
|
!0,
|
|
274
274
|
$,
|
|
275
275
|
P,
|
|
276
|
-
D ? Error("react-stack-top-frame") :
|
|
276
|
+
D ? Error("react-stack-top-frame") : Q,
|
|
277
277
|
D ? z(o(x)) : ge
|
|
278
278
|
);
|
|
279
279
|
};
|
|
@@ -615,36 +615,36 @@ const xe = {
|
|
|
615
615
|
onClick: l,
|
|
616
616
|
className: s = "",
|
|
617
617
|
fullWidth: c = !1,
|
|
618
|
-
disabled:
|
|
619
|
-
roundedFull:
|
|
620
|
-
size:
|
|
621
|
-
type:
|
|
618
|
+
disabled: p = !1,
|
|
619
|
+
roundedFull: d = !1,
|
|
620
|
+
size: f = "medium",
|
|
621
|
+
type: u = "button",
|
|
622
622
|
autoFocus: g = !1,
|
|
623
623
|
href: v,
|
|
624
|
-
target:
|
|
624
|
+
target: m,
|
|
625
625
|
...w
|
|
626
626
|
}) => {
|
|
627
627
|
var b;
|
|
628
|
-
const y = pe(null),
|
|
628
|
+
const y = pe(null), M = pe(null), j = (O) => {
|
|
629
629
|
const F = y.current;
|
|
630
630
|
if (!F) return;
|
|
631
|
-
const H = document.createElement("span"),
|
|
632
|
-
H.style.width = H.style.height = `${ee}px`, H.style.left = `${O.clientX -
|
|
633
|
-
},
|
|
631
|
+
const H = document.createElement("span"), W = F.getBoundingClientRect(), ee = Math.max(W.width, W.height);
|
|
632
|
+
H.style.width = H.style.height = `${ee}px`, H.style.left = `${O.clientX - W.left - ee / 2}px`, H.style.top = `${O.clientY - W.top - ee / 2}px`, H.className = "ripple", F.appendChild(H), setTimeout(() => H.remove(), 600), l == null || l(O);
|
|
633
|
+
}, E = ((b = xe[o]) == null ? void 0 : b[t === "filled" ? "filled" : t === "outlined" ? "outline" : "transparent"]) || "";
|
|
634
634
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: v ? /* @__PURE__ */ a.jsxs(
|
|
635
635
|
"a",
|
|
636
636
|
{
|
|
637
|
-
ref:
|
|
637
|
+
ref: M,
|
|
638
638
|
href: v,
|
|
639
|
-
target:
|
|
639
|
+
target: m,
|
|
640
640
|
className: `relative leading-none no-underline inline-flex font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
641
641
|
${t === "outlined" && "border"}
|
|
642
|
-
${
|
|
642
|
+
${E}
|
|
643
643
|
${s}
|
|
644
|
-
${
|
|
644
|
+
${f === "small" ? "text-sm h-8 px-3" : f === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
|
|
645
645
|
${c ? "w-full" : ""}
|
|
646
|
-
${
|
|
647
|
-
${
|
|
646
|
+
${d ? "rounded-full" : "rounded-md"}
|
|
647
|
+
${p ? `${t === "filled" && "!bg-color-gray-300 !text-color-white"} ${t === "outlined" && "!border-color-gray-200 !text-color-gray-300"} cursor-not-allowed hover:bg-color-transparent !text-color-gray-300` : "cursor-pointer"}
|
|
648
648
|
`,
|
|
649
649
|
children: [
|
|
650
650
|
r && /* @__PURE__ */ a.jsx("span", { className: "mr-1", children: r }),
|
|
@@ -656,17 +656,17 @@ const xe = {
|
|
|
656
656
|
"button",
|
|
657
657
|
{
|
|
658
658
|
ref: y,
|
|
659
|
-
type:
|
|
660
|
-
disabled:
|
|
659
|
+
type: u,
|
|
660
|
+
disabled: p,
|
|
661
661
|
onClick: j,
|
|
662
662
|
className: `relative leading-none font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
663
663
|
${t === "outlined" && "border"}
|
|
664
|
-
${
|
|
664
|
+
${E}
|
|
665
665
|
${s}
|
|
666
|
-
${
|
|
666
|
+
${f === "small" ? "text-sm h-8 px-3" : f === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
|
|
667
667
|
${c ? "w-full" : ""}
|
|
668
|
-
${
|
|
669
|
-
${
|
|
668
|
+
${d ? "rounded-full" : "rounded-md"}
|
|
669
|
+
${p ? `${t === "filled" && "!bg-color-gray-300 !text-color-white"} ${t === "outlined" && "!border-color-gray-200 !text-color-gray-300"} cursor-not-allowed hover:bg-color-transparent !text-color-gray-300` : "cursor-pointer"}
|
|
670
670
|
`,
|
|
671
671
|
autoFocus: g,
|
|
672
672
|
...w,
|
|
@@ -744,8 +744,8 @@ const xe = {
|
|
|
744
744
|
}) => {
|
|
745
745
|
const [i, l] = K(!1), s = pe(null);
|
|
746
746
|
return de(() => {
|
|
747
|
-
const c = (
|
|
748
|
-
s.current && !s.current.contains(
|
|
747
|
+
const c = (p) => {
|
|
748
|
+
s.current && !s.current.contains(p.target) && l(!1);
|
|
749
749
|
};
|
|
750
750
|
return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
|
|
751
751
|
}, []), /* @__PURE__ */ a.jsxs("div", { ref: s, className: "relative inline-block w-full", children: [
|
|
@@ -764,8 +764,8 @@ const xe = {
|
|
|
764
764
|
"ul",
|
|
765
765
|
{
|
|
766
766
|
className: `absolute mt-2 right-0 z-10 w-full rounded-xl bg-color-white shadow-lg shadow-color-zinc-200 dark:shadow-color-gray-900 border border-color-gray-100 py-2 ${o}`,
|
|
767
|
-
children: n.map((c,
|
|
768
|
-
const
|
|
767
|
+
children: n.map((c, p) => {
|
|
768
|
+
const d = c.label === (e == null ? void 0 : e.label);
|
|
769
769
|
return /* @__PURE__ */ a.jsx(
|
|
770
770
|
"li",
|
|
771
771
|
{
|
|
@@ -776,12 +776,12 @@ const xe = {
|
|
|
776
776
|
"div",
|
|
777
777
|
{
|
|
778
778
|
className: `block cursor-pointer w-full px-4 py-2 text-left text-sm text-color-gray-700
|
|
779
|
-
${
|
|
779
|
+
${d ? " bg-color-gray-200" : " hover:bg-color-gray-100 "}`,
|
|
780
780
|
children: c.label
|
|
781
781
|
}
|
|
782
782
|
)
|
|
783
783
|
},
|
|
784
|
-
|
|
784
|
+
p
|
|
785
785
|
);
|
|
786
786
|
})
|
|
787
787
|
}
|
|
@@ -801,7 +801,7 @@ var Gt;
|
|
|
801
801
|
function lo() {
|
|
802
802
|
if (Gt) return te;
|
|
803
803
|
Gt = 1;
|
|
804
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111,
|
|
804
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, u = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, M = e ? Symbol.for("react.scope") : 60119;
|
|
805
805
|
function j(b) {
|
|
806
806
|
if (typeof b == "object" && b !== null) {
|
|
807
807
|
var O = b.$$typeof;
|
|
@@ -809,16 +809,16 @@ function lo() {
|
|
|
809
809
|
case n:
|
|
810
810
|
switch (b = b.type, b) {
|
|
811
811
|
case c:
|
|
812
|
-
case
|
|
812
|
+
case p:
|
|
813
813
|
case o:
|
|
814
814
|
case i:
|
|
815
815
|
case r:
|
|
816
|
-
case
|
|
816
|
+
case f:
|
|
817
817
|
return b;
|
|
818
818
|
default:
|
|
819
819
|
switch (b = b && b.$$typeof, b) {
|
|
820
820
|
case s:
|
|
821
|
-
case
|
|
821
|
+
case d:
|
|
822
822
|
case v:
|
|
823
823
|
case g:
|
|
824
824
|
case l:
|
|
@@ -832,19 +832,19 @@ function lo() {
|
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
|
-
function
|
|
836
|
-
return j(b) ===
|
|
835
|
+
function E(b) {
|
|
836
|
+
return j(b) === p;
|
|
837
837
|
}
|
|
838
|
-
return te.AsyncMode = c, te.ConcurrentMode =
|
|
839
|
-
return
|
|
840
|
-
}, te.isConcurrentMode =
|
|
838
|
+
return te.AsyncMode = c, te.ConcurrentMode = p, te.ContextConsumer = s, te.ContextProvider = l, te.Element = n, te.ForwardRef = d, te.Fragment = o, te.Lazy = v, te.Memo = g, te.Portal = t, te.Profiler = i, te.StrictMode = r, te.Suspense = f, te.isAsyncMode = function(b) {
|
|
839
|
+
return E(b) || j(b) === c;
|
|
840
|
+
}, te.isConcurrentMode = E, te.isContextConsumer = function(b) {
|
|
841
841
|
return j(b) === s;
|
|
842
842
|
}, te.isContextProvider = function(b) {
|
|
843
843
|
return j(b) === l;
|
|
844
844
|
}, te.isElement = function(b) {
|
|
845
845
|
return typeof b == "object" && b !== null && b.$$typeof === n;
|
|
846
846
|
}, te.isForwardRef = function(b) {
|
|
847
|
-
return j(b) ===
|
|
847
|
+
return j(b) === d;
|
|
848
848
|
}, te.isFragment = function(b) {
|
|
849
849
|
return j(b) === o;
|
|
850
850
|
}, te.isLazy = function(b) {
|
|
@@ -858,9 +858,9 @@ function lo() {
|
|
|
858
858
|
}, te.isStrictMode = function(b) {
|
|
859
859
|
return j(b) === r;
|
|
860
860
|
}, te.isSuspense = function(b) {
|
|
861
|
-
return j(b) ===
|
|
861
|
+
return j(b) === f;
|
|
862
862
|
}, te.isValidElementType = function(b) {
|
|
863
|
-
return typeof b == "string" || typeof b == "function" || b === o || b ===
|
|
863
|
+
return typeof b == "string" || typeof b == "function" || b === o || b === p || b === i || b === r || b === f || b === u || typeof b == "object" && b !== null && (b.$$typeof === v || b.$$typeof === g || b.$$typeof === l || b.$$typeof === s || b.$$typeof === d || b.$$typeof === w || b.$$typeof === y || b.$$typeof === M || b.$$typeof === m);
|
|
864
864
|
}, te.typeOf = j, te;
|
|
865
865
|
}
|
|
866
866
|
var ne = {};
|
|
@@ -872,15 +872,15 @@ var ne = {};
|
|
|
872
872
|
* This source code is licensed under the MIT license found in the
|
|
873
873
|
* LICENSE file in the root directory of this source tree.
|
|
874
874
|
*/
|
|
875
|
-
var
|
|
875
|
+
var Yt;
|
|
876
876
|
function so() {
|
|
877
|
-
return
|
|
878
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111,
|
|
877
|
+
return Yt || (Yt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
878
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, r = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, u = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, M = e ? Symbol.for("react.scope") : 60119;
|
|
879
879
|
function j(S) {
|
|
880
880
|
return typeof S == "string" || typeof S == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
881
|
-
S === o || S ===
|
|
881
|
+
S === o || S === p || S === i || S === r || S === f || S === u || typeof S == "object" && S !== null && (S.$$typeof === v || S.$$typeof === g || S.$$typeof === l || S.$$typeof === s || S.$$typeof === d || S.$$typeof === w || S.$$typeof === y || S.$$typeof === M || S.$$typeof === m);
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function E(S) {
|
|
884
884
|
if (typeof S == "object" && S !== null) {
|
|
885
885
|
var h = S.$$typeof;
|
|
886
886
|
switch (h) {
|
|
@@ -888,21 +888,21 @@ function so() {
|
|
|
888
888
|
var T = S.type;
|
|
889
889
|
switch (T) {
|
|
890
890
|
case c:
|
|
891
|
-
case
|
|
891
|
+
case p:
|
|
892
892
|
case o:
|
|
893
893
|
case i:
|
|
894
894
|
case r:
|
|
895
|
-
case
|
|
895
|
+
case f:
|
|
896
896
|
return T;
|
|
897
897
|
default:
|
|
898
|
-
var
|
|
899
|
-
switch (
|
|
898
|
+
var J = T && T.$$typeof;
|
|
899
|
+
switch (J) {
|
|
900
900
|
case s:
|
|
901
|
-
case
|
|
901
|
+
case d:
|
|
902
902
|
case v:
|
|
903
903
|
case g:
|
|
904
904
|
case l:
|
|
905
|
-
return
|
|
905
|
+
return J;
|
|
906
906
|
default:
|
|
907
907
|
return h;
|
|
908
908
|
}
|
|
@@ -912,52 +912,52 @@ function so() {
|
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
|
-
var b = c, O =
|
|
915
|
+
var b = c, O = p, F = s, H = l, W = n, ee = d, Y = o, se = v, U = g, z = t, Z = i, N = r, Q = f, ge = !1;
|
|
916
916
|
function X(S) {
|
|
917
|
-
return ge || (ge = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), x(S) ||
|
|
917
|
+
return ge || (ge = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), x(S) || E(S) === c;
|
|
918
918
|
}
|
|
919
919
|
function x(S) {
|
|
920
|
-
return
|
|
920
|
+
return E(S) === p;
|
|
921
921
|
}
|
|
922
922
|
function C(S) {
|
|
923
|
-
return
|
|
923
|
+
return E(S) === s;
|
|
924
924
|
}
|
|
925
925
|
function _(S) {
|
|
926
|
-
return
|
|
926
|
+
return E(S) === l;
|
|
927
927
|
}
|
|
928
928
|
function $(S) {
|
|
929
929
|
return typeof S == "object" && S !== null && S.$$typeof === n;
|
|
930
930
|
}
|
|
931
931
|
function P(S) {
|
|
932
|
-
return
|
|
932
|
+
return E(S) === d;
|
|
933
933
|
}
|
|
934
934
|
function D(S) {
|
|
935
|
-
return
|
|
935
|
+
return E(S) === o;
|
|
936
936
|
}
|
|
937
937
|
function A(S) {
|
|
938
|
-
return
|
|
938
|
+
return E(S) === v;
|
|
939
939
|
}
|
|
940
940
|
function k(S) {
|
|
941
|
-
return
|
|
941
|
+
return E(S) === g;
|
|
942
942
|
}
|
|
943
943
|
function R(S) {
|
|
944
|
-
return
|
|
944
|
+
return E(S) === t;
|
|
945
945
|
}
|
|
946
946
|
function I(S) {
|
|
947
|
-
return
|
|
947
|
+
return E(S) === i;
|
|
948
948
|
}
|
|
949
949
|
function V(S) {
|
|
950
|
-
return
|
|
950
|
+
return E(S) === r;
|
|
951
951
|
}
|
|
952
952
|
function re(S) {
|
|
953
|
-
return
|
|
953
|
+
return E(S) === f;
|
|
954
954
|
}
|
|
955
|
-
ne.AsyncMode = b, ne.ConcurrentMode = O, ne.ContextConsumer = F, ne.ContextProvider = H, ne.Element =
|
|
955
|
+
ne.AsyncMode = b, ne.ConcurrentMode = O, ne.ContextConsumer = F, ne.ContextProvider = H, ne.Element = W, ne.ForwardRef = ee, ne.Fragment = Y, ne.Lazy = se, ne.Memo = U, ne.Portal = z, ne.Profiler = Z, ne.StrictMode = N, ne.Suspense = Q, ne.isAsyncMode = X, ne.isConcurrentMode = x, ne.isContextConsumer = C, ne.isContextProvider = _, ne.isElement = $, ne.isForwardRef = P, ne.isFragment = D, ne.isLazy = A, ne.isMemo = k, ne.isPortal = R, ne.isProfiler = I, ne.isStrictMode = V, ne.isSuspense = re, ne.isValidElementType = j, ne.typeOf = E;
|
|
956
956
|
}()), ne;
|
|
957
957
|
}
|
|
958
|
-
var
|
|
958
|
+
var Zt;
|
|
959
959
|
function kn() {
|
|
960
|
-
return
|
|
960
|
+
return Zt || (Zt = 1, process.env.NODE_ENV === "production" ? Ge.exports = lo() : Ge.exports = so()), Ge.exports;
|
|
961
961
|
}
|
|
962
962
|
/*
|
|
963
963
|
object-assign
|
|
@@ -983,35 +983,35 @@ function co() {
|
|
|
983
983
|
return !1;
|
|
984
984
|
for (var l = {}, s = 0; s < 10; s++)
|
|
985
985
|
l["_" + String.fromCharCode(s)] = s;
|
|
986
|
-
var c = Object.getOwnPropertyNames(l).map(function(
|
|
987
|
-
return l[
|
|
986
|
+
var c = Object.getOwnPropertyNames(l).map(function(d) {
|
|
987
|
+
return l[d];
|
|
988
988
|
});
|
|
989
989
|
if (c.join("") !== "0123456789")
|
|
990
990
|
return !1;
|
|
991
|
-
var
|
|
992
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
993
|
-
|
|
994
|
-
}), Object.keys(Object.assign({},
|
|
991
|
+
var p = {};
|
|
992
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(d) {
|
|
993
|
+
p[d] = d;
|
|
994
|
+
}), Object.keys(Object.assign({}, p)).join("") === "abcdefghijklmnopqrst";
|
|
995
995
|
} catch {
|
|
996
996
|
return !1;
|
|
997
997
|
}
|
|
998
998
|
}
|
|
999
999
|
return ct = r() ? Object.assign : function(i, l) {
|
|
1000
|
-
for (var s, c = o(i),
|
|
1001
|
-
s = Object(arguments[
|
|
1002
|
-
for (var
|
|
1003
|
-
n.call(s,
|
|
1000
|
+
for (var s, c = o(i), p, d = 1; d < arguments.length; d++) {
|
|
1001
|
+
s = Object(arguments[d]);
|
|
1002
|
+
for (var f in s)
|
|
1003
|
+
n.call(s, f) && (c[f] = s[f]);
|
|
1004
1004
|
if (e) {
|
|
1005
|
-
|
|
1006
|
-
for (var
|
|
1007
|
-
t.call(s, u
|
|
1005
|
+
p = e(s);
|
|
1006
|
+
for (var u = 0; u < p.length; u++)
|
|
1007
|
+
t.call(s, p[u]) && (c[p[u]] = s[p[u]]);
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
1010
|
return c;
|
|
1011
1011
|
}, ct;
|
|
1012
1012
|
}
|
|
1013
1013
|
var ut, Ut;
|
|
1014
|
-
function
|
|
1014
|
+
function zt() {
|
|
1015
1015
|
if (Ut) return ut;
|
|
1016
1016
|
Ut = 1;
|
|
1017
1017
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
@@ -1028,7 +1028,7 @@ function uo() {
|
|
|
1028
1028
|
var e = function() {
|
|
1029
1029
|
};
|
|
1030
1030
|
if (process.env.NODE_ENV !== "production") {
|
|
1031
|
-
var n = /* @__PURE__ */
|
|
1031
|
+
var n = /* @__PURE__ */ zt(), t = {}, o = /* @__PURE__ */ Rn();
|
|
1032
1032
|
e = function(i) {
|
|
1033
1033
|
var l = "Warning: " + i;
|
|
1034
1034
|
typeof console < "u" && console.error(l);
|
|
@@ -1038,29 +1038,29 @@ function uo() {
|
|
|
1038
1038
|
}
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
|
-
function r(i, l, s, c,
|
|
1041
|
+
function r(i, l, s, c, p) {
|
|
1042
1042
|
if (process.env.NODE_ENV !== "production") {
|
|
1043
|
-
for (var
|
|
1044
|
-
if (o(i,
|
|
1045
|
-
var
|
|
1043
|
+
for (var d in i)
|
|
1044
|
+
if (o(i, d)) {
|
|
1045
|
+
var f;
|
|
1046
1046
|
try {
|
|
1047
|
-
if (typeof i[
|
|
1048
|
-
var
|
|
1049
|
-
(c || "React class") + ": " + s + " type `" +
|
|
1047
|
+
if (typeof i[d] != "function") {
|
|
1048
|
+
var u = Error(
|
|
1049
|
+
(c || "React class") + ": " + s + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1050
1050
|
);
|
|
1051
|
-
throw
|
|
1051
|
+
throw u.name = "Invariant Violation", u;
|
|
1052
1052
|
}
|
|
1053
|
-
|
|
1053
|
+
f = i[d](l, d, c, s, null, n);
|
|
1054
1054
|
} catch (v) {
|
|
1055
|
-
|
|
1055
|
+
f = v;
|
|
1056
1056
|
}
|
|
1057
|
-
if (
|
|
1058
|
-
(c || "React class") + ": type specification of " + s + " `" +
|
|
1059
|
-
),
|
|
1060
|
-
t[
|
|
1061
|
-
var g =
|
|
1057
|
+
if (f && !(f instanceof Error) && e(
|
|
1058
|
+
(c || "React class") + ": type specification of " + s + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof f + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1059
|
+
), f instanceof Error && !(f.message in t)) {
|
|
1060
|
+
t[f.message] = !0;
|
|
1061
|
+
var g = p ? p() : "";
|
|
1062
1062
|
e(
|
|
1063
|
-
"Failed " + s + " type: " +
|
|
1063
|
+
"Failed " + s + " type: " + f.message + (g ?? "")
|
|
1064
1064
|
);
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
@@ -1074,7 +1074,7 @@ var gt, Jt;
|
|
|
1074
1074
|
function po() {
|
|
1075
1075
|
if (Jt) return gt;
|
|
1076
1076
|
Jt = 1;
|
|
1077
|
-
var e = kn(), n = co(), t = /* @__PURE__ */
|
|
1077
|
+
var e = kn(), n = co(), t = /* @__PURE__ */ zt(), o = /* @__PURE__ */ Rn(), r = /* @__PURE__ */ uo(), i = function() {
|
|
1078
1078
|
};
|
|
1079
1079
|
process.env.NODE_ENV !== "production" && (i = function(s) {
|
|
1080
1080
|
var c = "Warning: " + s;
|
|
@@ -1088,13 +1088,13 @@ function po() {
|
|
|
1088
1088
|
return null;
|
|
1089
1089
|
}
|
|
1090
1090
|
return gt = function(s, c) {
|
|
1091
|
-
var
|
|
1092
|
-
function
|
|
1093
|
-
var C = x && (
|
|
1091
|
+
var p = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
1092
|
+
function f(x) {
|
|
1093
|
+
var C = x && (p && x[p] || x[d]);
|
|
1094
1094
|
if (typeof C == "function")
|
|
1095
1095
|
return C;
|
|
1096
1096
|
}
|
|
1097
|
-
var
|
|
1097
|
+
var u = "<<anonymous>>", g = {
|
|
1098
1098
|
array: y("array"),
|
|
1099
1099
|
bigint: y("bigint"),
|
|
1100
1100
|
bool: y("boolean"),
|
|
@@ -1103,30 +1103,30 @@ function po() {
|
|
|
1103
1103
|
object: y("object"),
|
|
1104
1104
|
string: y("string"),
|
|
1105
1105
|
symbol: y("symbol"),
|
|
1106
|
-
any:
|
|
1106
|
+
any: M(),
|
|
1107
1107
|
arrayOf: j,
|
|
1108
|
-
element:
|
|
1108
|
+
element: E(),
|
|
1109
1109
|
elementType: b(),
|
|
1110
1110
|
instanceOf: O,
|
|
1111
1111
|
node: ee(),
|
|
1112
1112
|
objectOf: H,
|
|
1113
1113
|
oneOf: F,
|
|
1114
|
-
oneOfType:
|
|
1114
|
+
oneOfType: W,
|
|
1115
1115
|
shape: se,
|
|
1116
1116
|
exact: U
|
|
1117
1117
|
};
|
|
1118
1118
|
function v(x, C) {
|
|
1119
1119
|
return x === C ? x !== 0 || 1 / x === 1 / C : x !== x && C !== C;
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function m(x, C) {
|
|
1122
1122
|
this.message = x, this.data = C && typeof C == "object" ? C : {}, this.stack = "";
|
|
1123
1123
|
}
|
|
1124
|
-
|
|
1124
|
+
m.prototype = Error.prototype;
|
|
1125
1125
|
function w(x) {
|
|
1126
1126
|
if (process.env.NODE_ENV !== "production")
|
|
1127
1127
|
var C = {}, _ = 0;
|
|
1128
1128
|
function $(D, A, k, R, I, V, re) {
|
|
1129
|
-
if (R = R ||
|
|
1129
|
+
if (R = R || u, V = V || k, re !== t) {
|
|
1130
1130
|
if (c) {
|
|
1131
1131
|
var S = new Error(
|
|
1132
1132
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -1140,7 +1140,7 @@ function po() {
|
|
|
1140
1140
|
), C[h] = !0, _++);
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
|
-
return A[k] == null ? D ? A[k] === null ? new
|
|
1143
|
+
return A[k] == null ? D ? A[k] === null ? new m("The " + I + " `" + V + "` is marked as required " + ("in `" + R + "`, but its value is `null`.")) : new m("The " + I + " `" + V + "` is marked as required in " + ("`" + R + "`, but its value is `undefined`.")) : null : x(A, k, R, I, V);
|
|
1144
1144
|
}
|
|
1145
1145
|
var P = $.bind(null, !1);
|
|
1146
1146
|
return P.isRequired = $.bind(null, !0), P;
|
|
@@ -1149,8 +1149,8 @@ function po() {
|
|
|
1149
1149
|
function C(_, $, P, D, A, k) {
|
|
1150
1150
|
var R = _[$], I = N(R);
|
|
1151
1151
|
if (I !== x) {
|
|
1152
|
-
var V =
|
|
1153
|
-
return new
|
|
1152
|
+
var V = Q(R);
|
|
1153
|
+
return new m(
|
|
1154
1154
|
"Invalid " + D + " `" + A + "` of type " + ("`" + V + "` supplied to `" + P + "`, expected ") + ("`" + x + "`."),
|
|
1155
1155
|
{ expectedType: x }
|
|
1156
1156
|
);
|
|
@@ -1159,17 +1159,17 @@ function po() {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
return w(C);
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1162
|
+
function M() {
|
|
1163
1163
|
return w(l);
|
|
1164
1164
|
}
|
|
1165
1165
|
function j(x) {
|
|
1166
1166
|
function C(_, $, P, D, A) {
|
|
1167
1167
|
if (typeof x != "function")
|
|
1168
|
-
return new
|
|
1168
|
+
return new m("Property `" + A + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
|
|
1169
1169
|
var k = _[$];
|
|
1170
1170
|
if (!Array.isArray(k)) {
|
|
1171
1171
|
var R = N(k);
|
|
1172
|
-
return new
|
|
1172
|
+
return new m("Invalid " + D + " `" + A + "` of type " + ("`" + R + "` supplied to `" + P + "`, expected an array."));
|
|
1173
1173
|
}
|
|
1174
1174
|
for (var I = 0; I < k.length; I++) {
|
|
1175
1175
|
var V = x(k, I, P, D, A + "[" + I + "]", t);
|
|
@@ -1180,12 +1180,12 @@ function po() {
|
|
|
1180
1180
|
}
|
|
1181
1181
|
return w(C);
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1183
|
+
function E() {
|
|
1184
1184
|
function x(C, _, $, P, D) {
|
|
1185
1185
|
var A = C[_];
|
|
1186
1186
|
if (!s(A)) {
|
|
1187
1187
|
var k = N(A);
|
|
1188
|
-
return new
|
|
1188
|
+
return new m("Invalid " + P + " `" + D + "` of type " + ("`" + k + "` supplied to `" + $ + "`, expected a single ReactElement."));
|
|
1189
1189
|
}
|
|
1190
1190
|
return null;
|
|
1191
1191
|
}
|
|
@@ -1196,7 +1196,7 @@ function po() {
|
|
|
1196
1196
|
var A = C[_];
|
|
1197
1197
|
if (!e.isValidElementType(A)) {
|
|
1198
1198
|
var k = N(A);
|
|
1199
|
-
return new
|
|
1199
|
+
return new m("Invalid " + P + " `" + D + "` of type " + ("`" + k + "` supplied to `" + $ + "`, expected a single ReactElement type."));
|
|
1200
1200
|
}
|
|
1201
1201
|
return null;
|
|
1202
1202
|
}
|
|
@@ -1205,8 +1205,8 @@ function po() {
|
|
|
1205
1205
|
function O(x) {
|
|
1206
1206
|
function C(_, $, P, D, A) {
|
|
1207
1207
|
if (!(_[$] instanceof x)) {
|
|
1208
|
-
var k = x.name ||
|
|
1209
|
-
return new
|
|
1208
|
+
var k = x.name || u, R = X(_[$]);
|
|
1209
|
+
return new m("Invalid " + D + " `" + A + "` of type " + ("`" + R + "` supplied to `" + P + "`, expected ") + ("instance of `" + k + "`."));
|
|
1210
1210
|
}
|
|
1211
1211
|
return null;
|
|
1212
1212
|
}
|
|
@@ -1222,20 +1222,20 @@ function po() {
|
|
|
1222
1222
|
if (v(k, x[R]))
|
|
1223
1223
|
return null;
|
|
1224
1224
|
var I = JSON.stringify(x, function(re, S) {
|
|
1225
|
-
var h =
|
|
1225
|
+
var h = Q(S);
|
|
1226
1226
|
return h === "symbol" ? String(S) : S;
|
|
1227
1227
|
});
|
|
1228
|
-
return new
|
|
1228
|
+
return new m("Invalid " + D + " `" + A + "` of value `" + String(k) + "` " + ("supplied to `" + P + "`, expected one of " + I + "."));
|
|
1229
1229
|
}
|
|
1230
1230
|
return w(C);
|
|
1231
1231
|
}
|
|
1232
1232
|
function H(x) {
|
|
1233
1233
|
function C(_, $, P, D, A) {
|
|
1234
1234
|
if (typeof x != "function")
|
|
1235
|
-
return new
|
|
1235
|
+
return new m("Property `" + A + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
|
|
1236
1236
|
var k = _[$], R = N(k);
|
|
1237
1237
|
if (R !== "object")
|
|
1238
|
-
return new
|
|
1238
|
+
return new m("Invalid " + D + " `" + A + "` of type " + ("`" + R + "` supplied to `" + P + "`, expected an object."));
|
|
1239
1239
|
for (var I in k)
|
|
1240
1240
|
if (o(k, I)) {
|
|
1241
1241
|
var V = x(k, I, P, D, A + "." + I, t);
|
|
@@ -1246,7 +1246,7 @@ function po() {
|
|
|
1246
1246
|
}
|
|
1247
1247
|
return w(C);
|
|
1248
1248
|
}
|
|
1249
|
-
function
|
|
1249
|
+
function W(x) {
|
|
1250
1250
|
if (!Array.isArray(x))
|
|
1251
1251
|
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), l;
|
|
1252
1252
|
for (var C = 0; C < x.length; C++) {
|
|
@@ -1264,18 +1264,18 @@ function po() {
|
|
|
1264
1264
|
S.data && o(S.data, "expectedType") && I.push(S.data.expectedType);
|
|
1265
1265
|
}
|
|
1266
1266
|
var h = I.length > 0 ? ", expected one of type [" + I.join(", ") + "]" : "";
|
|
1267
|
-
return new
|
|
1267
|
+
return new m("Invalid " + k + " `" + R + "` supplied to " + ("`" + A + "`" + h + "."));
|
|
1268
1268
|
}
|
|
1269
1269
|
return w($);
|
|
1270
1270
|
}
|
|
1271
1271
|
function ee() {
|
|
1272
1272
|
function x(C, _, $, P, D) {
|
|
1273
|
-
return z(C[_]) ? null : new
|
|
1273
|
+
return z(C[_]) ? null : new m("Invalid " + P + " `" + D + "` supplied to " + ("`" + $ + "`, expected a ReactNode."));
|
|
1274
1274
|
}
|
|
1275
1275
|
return w(x);
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1278
|
-
return new
|
|
1277
|
+
function Y(x, C, _, $, P) {
|
|
1278
|
+
return new m(
|
|
1279
1279
|
(x || "React class") + ": " + C + " type `" + _ + "." + $ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
|
|
1280
1280
|
);
|
|
1281
1281
|
}
|
|
@@ -1283,11 +1283,11 @@ function po() {
|
|
|
1283
1283
|
function C(_, $, P, D, A) {
|
|
1284
1284
|
var k = _[$], R = N(k);
|
|
1285
1285
|
if (R !== "object")
|
|
1286
|
-
return new
|
|
1286
|
+
return new m("Invalid " + D + " `" + A + "` of type `" + R + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
1287
1287
|
for (var I in x) {
|
|
1288
1288
|
var V = x[I];
|
|
1289
1289
|
if (typeof V != "function")
|
|
1290
|
-
return
|
|
1290
|
+
return Y(P, D, A, I, Q(V));
|
|
1291
1291
|
var re = V(k, I, P, D, A + "." + I, t);
|
|
1292
1292
|
if (re)
|
|
1293
1293
|
return re;
|
|
@@ -1300,14 +1300,14 @@ function po() {
|
|
|
1300
1300
|
function C(_, $, P, D, A) {
|
|
1301
1301
|
var k = _[$], R = N(k);
|
|
1302
1302
|
if (R !== "object")
|
|
1303
|
-
return new
|
|
1303
|
+
return new m("Invalid " + D + " `" + A + "` of type `" + R + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
1304
1304
|
var I = n({}, _[$], x);
|
|
1305
1305
|
for (var V in I) {
|
|
1306
1306
|
var re = x[V];
|
|
1307
1307
|
if (o(x, V) && typeof re != "function")
|
|
1308
|
-
return
|
|
1308
|
+
return Y(P, D, A, V, Q(re));
|
|
1309
1309
|
if (!re)
|
|
1310
|
-
return new
|
|
1310
|
+
return new m(
|
|
1311
1311
|
"Invalid " + D + " `" + A + "` key `" + V + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(_[$], null, " ") + `
|
|
1312
1312
|
Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
1313
1313
|
);
|
|
@@ -1332,7 +1332,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1332
1332
|
return x.every(z);
|
|
1333
1333
|
if (x === null || s(x))
|
|
1334
1334
|
return !0;
|
|
1335
|
-
var C =
|
|
1335
|
+
var C = f(x);
|
|
1336
1336
|
if (C) {
|
|
1337
1337
|
var _ = C.call(x), $;
|
|
1338
1338
|
if (C !== x.entries) {
|
|
@@ -1352,14 +1352,14 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1352
1352
|
return !1;
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function Z(x, C) {
|
|
1356
1356
|
return x === "symbol" ? !0 : C ? C["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && C instanceof Symbol : !1;
|
|
1357
1357
|
}
|
|
1358
1358
|
function N(x) {
|
|
1359
1359
|
var C = typeof x;
|
|
1360
|
-
return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" :
|
|
1360
|
+
return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : Z(C, x) ? "symbol" : C;
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function Q(x) {
|
|
1363
1363
|
if (typeof x > "u" || x === null)
|
|
1364
1364
|
return "" + x;
|
|
1365
1365
|
var C = N(x);
|
|
@@ -1372,7 +1372,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1372
1372
|
return C;
|
|
1373
1373
|
}
|
|
1374
1374
|
function ge(x) {
|
|
1375
|
-
var C =
|
|
1375
|
+
var C = Q(x);
|
|
1376
1376
|
switch (C) {
|
|
1377
1377
|
case "array":
|
|
1378
1378
|
case "object":
|
|
@@ -1386,7 +1386,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
1388
|
function X(x) {
|
|
1389
|
-
return !x.constructor || !x.constructor.name ?
|
|
1389
|
+
return !x.constructor || !x.constructor.name ? u : x.constructor.name;
|
|
1390
1390
|
}
|
|
1391
1391
|
return g.checkPropTypes = r, g.resetWarningCache = r.resetWarningCache, g.PropTypes = g, g;
|
|
1392
1392
|
}, gt;
|
|
@@ -1395,18 +1395,18 @@ var ft, Qt;
|
|
|
1395
1395
|
function go() {
|
|
1396
1396
|
if (Qt) return ft;
|
|
1397
1397
|
Qt = 1;
|
|
1398
|
-
var e = /* @__PURE__ */
|
|
1398
|
+
var e = /* @__PURE__ */ zt();
|
|
1399
1399
|
function n() {
|
|
1400
1400
|
}
|
|
1401
1401
|
function t() {
|
|
1402
1402
|
}
|
|
1403
1403
|
return t.resetWarningCache = n, ft = function() {
|
|
1404
|
-
function o(l, s, c,
|
|
1405
|
-
if (
|
|
1406
|
-
var
|
|
1404
|
+
function o(l, s, c, p, d, f) {
|
|
1405
|
+
if (f !== e) {
|
|
1406
|
+
var u = new Error(
|
|
1407
1407
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1408
1408
|
);
|
|
1409
|
-
throw
|
|
1409
|
+
throw u.name = "Invariant Violation", u;
|
|
1410
1410
|
}
|
|
1411
1411
|
}
|
|
1412
1412
|
o.isRequired = o;
|
|
@@ -1450,7 +1450,7 @@ function fo() {
|
|
|
1450
1450
|
return Be.exports;
|
|
1451
1451
|
}
|
|
1452
1452
|
var mo = /* @__PURE__ */ fo();
|
|
1453
|
-
const
|
|
1453
|
+
const le = /* @__PURE__ */ $n(mo);
|
|
1454
1454
|
function Ee(e, n, t, o) {
|
|
1455
1455
|
function r(i) {
|
|
1456
1456
|
return i instanceof t ? i : new t(function(l) {
|
|
@@ -1458,24 +1458,24 @@ function Ee(e, n, t, o) {
|
|
|
1458
1458
|
});
|
|
1459
1459
|
}
|
|
1460
1460
|
return new (t || (t = Promise))(function(i, l) {
|
|
1461
|
-
function s(
|
|
1461
|
+
function s(d) {
|
|
1462
1462
|
try {
|
|
1463
|
-
|
|
1464
|
-
} catch (
|
|
1465
|
-
l(
|
|
1463
|
+
p(o.next(d));
|
|
1464
|
+
} catch (f) {
|
|
1465
|
+
l(f);
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
|
-
function c(
|
|
1468
|
+
function c(d) {
|
|
1469
1469
|
try {
|
|
1470
|
-
|
|
1471
|
-
} catch (
|
|
1472
|
-
l(
|
|
1470
|
+
p(o.throw(d));
|
|
1471
|
+
} catch (f) {
|
|
1472
|
+
l(f);
|
|
1473
1473
|
}
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1476
|
-
|
|
1475
|
+
function p(d) {
|
|
1476
|
+
d.done ? i(d.value) : r(d.value).then(s, c);
|
|
1477
1477
|
}
|
|
1478
|
-
|
|
1478
|
+
p((o = o.apply(e, n || [])).next());
|
|
1479
1479
|
});
|
|
1480
1480
|
}
|
|
1481
1481
|
const xo = /* @__PURE__ */ new Map([
|
|
@@ -2830,9 +2830,9 @@ function Ro(e) {
|
|
|
2830
2830
|
});
|
|
2831
2831
|
});
|
|
2832
2832
|
}
|
|
2833
|
-
var
|
|
2833
|
+
var Ye = {}, rn;
|
|
2834
2834
|
function _o() {
|
|
2835
|
-
return rn || (rn = 1,
|
|
2835
|
+
return rn || (rn = 1, Ye.__esModule = !0, Ye.default = function(e, n) {
|
|
2836
2836
|
if (e && n) {
|
|
2837
2837
|
var t = Array.isArray(n) ? n : n.split(",");
|
|
2838
2838
|
if (t.length === 0)
|
|
@@ -2844,7 +2844,7 @@ function _o() {
|
|
|
2844
2844
|
});
|
|
2845
2845
|
}
|
|
2846
2846
|
return !0;
|
|
2847
|
-
}),
|
|
2847
|
+
}), Ye;
|
|
2848
2848
|
}
|
|
2849
2849
|
var Eo = _o();
|
|
2850
2850
|
const mt = /* @__PURE__ */ $n(Eo);
|
|
@@ -2928,10 +2928,10 @@ function Ao(e, n) {
|
|
|
2928
2928
|
function No(e) {
|
|
2929
2929
|
if (Array.isArray(e)) return e;
|
|
2930
2930
|
}
|
|
2931
|
-
var
|
|
2931
|
+
var zo = typeof mt == "function" ? mt : mt.default, Do = "file-invalid-type", To = "file-too-large", Oo = "file-too-small", Io = "too-many-files", Vo = function() {
|
|
2932
2932
|
var n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = n.split(","), o = t.length > 1 ? "one of ".concat(t.join(", ")) : t[0];
|
|
2933
2933
|
return {
|
|
2934
|
-
code:
|
|
2934
|
+
code: Do,
|
|
2935
2935
|
message: "File type must be ".concat(o)
|
|
2936
2936
|
};
|
|
2937
2937
|
}, cn = function(n) {
|
|
@@ -2949,7 +2949,7 @@ var Do = typeof mt == "function" ? mt : mt.default, zo = "file-invalid-type", To
|
|
|
2949
2949
|
message: "Too many files"
|
|
2950
2950
|
};
|
|
2951
2951
|
function Pn(e, n) {
|
|
2952
|
-
var t = e.type === "application/x-moz-file" ||
|
|
2952
|
+
var t = e.type === "application/x-moz-file" || zo(e, n);
|
|
2953
2953
|
return [t, t ? null : Vo(n)];
|
|
2954
2954
|
}
|
|
2955
2955
|
function Fn(e, n, t) {
|
|
@@ -2969,14 +2969,14 @@ function _e(e) {
|
|
|
2969
2969
|
function qo(e) {
|
|
2970
2970
|
var n = e.files, t = e.accept, o = e.minSize, r = e.maxSize, i = e.multiple, l = e.maxFiles, s = e.validator;
|
|
2971
2971
|
return !i && n.length > 1 || i && l >= 1 && n.length > l ? !1 : n.every(function(c) {
|
|
2972
|
-
var
|
|
2973
|
-
return
|
|
2972
|
+
var p = Pn(c, t), d = Te(p, 1), f = d[0], u = Fn(c, o, r), g = Te(u, 1), v = g[0], m = s ? s(c) : null;
|
|
2973
|
+
return f && v && !m;
|
|
2974
2974
|
});
|
|
2975
2975
|
}
|
|
2976
2976
|
function Qe(e) {
|
|
2977
2977
|
return typeof e.isPropagationStopped == "function" ? e.isPropagationStopped() : typeof e.cancelBubble < "u" ? e.cancelBubble : !1;
|
|
2978
2978
|
}
|
|
2979
|
-
function
|
|
2979
|
+
function Ze(e) {
|
|
2980
2980
|
return e.dataTransfer ? Array.prototype.some.call(e.dataTransfer.types, function(n) {
|
|
2981
2981
|
return n === "Files" || n === "application/x-moz-file";
|
|
2982
2982
|
}) : !!e.target && !!e.target.files;
|
|
@@ -2990,7 +2990,7 @@ function Bo(e) {
|
|
|
2990
2990
|
function Go(e) {
|
|
2991
2991
|
return e.indexOf("Edge/") !== -1;
|
|
2992
2992
|
}
|
|
2993
|
-
function
|
|
2993
|
+
function Yo() {
|
|
2994
2994
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
|
2995
2995
|
return Bo(e) || Go(e);
|
|
2996
2996
|
}
|
|
@@ -3005,7 +3005,7 @@ function ye() {
|
|
|
3005
3005
|
});
|
|
3006
3006
|
};
|
|
3007
3007
|
}
|
|
3008
|
-
function
|
|
3008
|
+
function Zo() {
|
|
3009
3009
|
return "showOpenFilePicker" in window;
|
|
3010
3010
|
}
|
|
3011
3011
|
function Wo(e) {
|
|
@@ -3048,7 +3048,7 @@ function Nn(e) {
|
|
|
3048
3048
|
}
|
|
3049
3049
|
var Jo = ["children"], Qo = ["open"], er = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], tr = ["refKey", "onChange", "onClick"];
|
|
3050
3050
|
function nr(e) {
|
|
3051
|
-
return ir(e) || rr(e) ||
|
|
3051
|
+
return ir(e) || rr(e) || zn(e) || or();
|
|
3052
3052
|
}
|
|
3053
3053
|
function or() {
|
|
3054
3054
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
@@ -3061,13 +3061,13 @@ function ir(e) {
|
|
|
3061
3061
|
if (Array.isArray(e)) return _t(e);
|
|
3062
3062
|
}
|
|
3063
3063
|
function xt(e, n) {
|
|
3064
|
-
return sr(e) || lr(e, n) ||
|
|
3064
|
+
return sr(e) || lr(e, n) || zn(e, n) || ar();
|
|
3065
3065
|
}
|
|
3066
3066
|
function ar() {
|
|
3067
3067
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3068
3068
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3069
3069
|
}
|
|
3070
|
-
function
|
|
3070
|
+
function zn(e, n) {
|
|
3071
3071
|
if (e) {
|
|
3072
3072
|
if (typeof e == "string") return _t(e, n);
|
|
3073
3073
|
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -3144,7 +3144,7 @@ function cr(e, n) {
|
|
|
3144
3144
|
r = o[i], !(n.indexOf(r) >= 0) && (t[r] = e[r]);
|
|
3145
3145
|
return t;
|
|
3146
3146
|
}
|
|
3147
|
-
var
|
|
3147
|
+
var Dt = /* @__PURE__ */ Oe(function(e, n) {
|
|
3148
3148
|
var t = e.children, o = et(e, Jo), r = Tn(o), i = r.open, l = et(r, Qo);
|
|
3149
3149
|
return Sn(n, function() {
|
|
3150
3150
|
return {
|
|
@@ -3154,8 +3154,8 @@ var zt = /* @__PURE__ */ Oe(function(e, n) {
|
|
|
3154
3154
|
open: i
|
|
3155
3155
|
})));
|
|
3156
3156
|
});
|
|
3157
|
-
|
|
3158
|
-
var
|
|
3157
|
+
Dt.displayName = "Dropzone";
|
|
3158
|
+
var Dn = {
|
|
3159
3159
|
disabled: !1,
|
|
3160
3160
|
getFilesFromEvent: bo,
|
|
3161
3161
|
maxSize: 1 / 0,
|
|
@@ -3171,8 +3171,8 @@ var zn = {
|
|
|
3171
3171
|
useFsAccessApi: !1,
|
|
3172
3172
|
autoFocus: !1
|
|
3173
3173
|
};
|
|
3174
|
-
|
|
3175
|
-
|
|
3174
|
+
Dt.defaultProps = Dn;
|
|
3175
|
+
Dt.propTypes = {
|
|
3176
3176
|
/**
|
|
3177
3177
|
* Render function that exposes the dropzone state and prop getter fns
|
|
3178
3178
|
*
|
|
@@ -3188,7 +3188,7 @@ zt.propTypes = {
|
|
|
3188
3188
|
* @param {File[]} params.acceptedFiles Accepted files
|
|
3189
3189
|
* @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
|
|
3190
3190
|
*/
|
|
3191
|
-
children:
|
|
3191
|
+
children: le.func,
|
|
3192
3192
|
/**
|
|
3193
3193
|
* Set accepted file types.
|
|
3194
3194
|
* Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
|
|
@@ -3196,90 +3196,90 @@ zt.propTypes = {
|
|
|
3196
3196
|
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
3197
3197
|
* Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
|
|
3198
3198
|
*/
|
|
3199
|
-
accept:
|
|
3199
|
+
accept: le.objectOf(le.arrayOf(le.string)),
|
|
3200
3200
|
/**
|
|
3201
3201
|
* Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
|
3202
3202
|
*/
|
|
3203
|
-
multiple:
|
|
3203
|
+
multiple: le.bool,
|
|
3204
3204
|
/**
|
|
3205
3205
|
* If false, allow dropped items to take over the current browser window
|
|
3206
3206
|
*/
|
|
3207
|
-
preventDropOnDocument:
|
|
3207
|
+
preventDropOnDocument: le.bool,
|
|
3208
3208
|
/**
|
|
3209
3209
|
* If true, disables click to open the native file selection dialog
|
|
3210
3210
|
*/
|
|
3211
|
-
noClick:
|
|
3211
|
+
noClick: le.bool,
|
|
3212
3212
|
/**
|
|
3213
3213
|
* If true, disables SPACE/ENTER to open the native file selection dialog.
|
|
3214
3214
|
* Note that it also stops tracking the focus state.
|
|
3215
3215
|
*/
|
|
3216
|
-
noKeyboard:
|
|
3216
|
+
noKeyboard: le.bool,
|
|
3217
3217
|
/**
|
|
3218
3218
|
* If true, disables drag 'n' drop
|
|
3219
3219
|
*/
|
|
3220
|
-
noDrag:
|
|
3220
|
+
noDrag: le.bool,
|
|
3221
3221
|
/**
|
|
3222
3222
|
* If true, stops drag event propagation to parents
|
|
3223
3223
|
*/
|
|
3224
|
-
noDragEventsBubbling:
|
|
3224
|
+
noDragEventsBubbling: le.bool,
|
|
3225
3225
|
/**
|
|
3226
3226
|
* Minimum file size (in bytes)
|
|
3227
3227
|
*/
|
|
3228
|
-
minSize:
|
|
3228
|
+
minSize: le.number,
|
|
3229
3229
|
/**
|
|
3230
3230
|
* Maximum file size (in bytes)
|
|
3231
3231
|
*/
|
|
3232
|
-
maxSize:
|
|
3232
|
+
maxSize: le.number,
|
|
3233
3233
|
/**
|
|
3234
3234
|
* Maximum accepted number of files
|
|
3235
3235
|
* The default value is 0 which means there is no limitation to how many files are accepted.
|
|
3236
3236
|
*/
|
|
3237
|
-
maxFiles:
|
|
3237
|
+
maxFiles: le.number,
|
|
3238
3238
|
/**
|
|
3239
3239
|
* Enable/disable the dropzone
|
|
3240
3240
|
*/
|
|
3241
|
-
disabled:
|
|
3241
|
+
disabled: le.bool,
|
|
3242
3242
|
/**
|
|
3243
3243
|
* Use this to provide a custom file aggregator
|
|
3244
3244
|
*
|
|
3245
3245
|
* @param {(DragEvent|Event|Array<FileSystemFileHandle>)} event A drag event or input change event (if files were selected via the file dialog)
|
|
3246
3246
|
*/
|
|
3247
|
-
getFilesFromEvent:
|
|
3247
|
+
getFilesFromEvent: le.func,
|
|
3248
3248
|
/**
|
|
3249
3249
|
* Cb for when closing the file dialog with no selection
|
|
3250
3250
|
*/
|
|
3251
|
-
onFileDialogCancel:
|
|
3251
|
+
onFileDialogCancel: le.func,
|
|
3252
3252
|
/**
|
|
3253
3253
|
* Cb for when opening the file dialog
|
|
3254
3254
|
*/
|
|
3255
|
-
onFileDialogOpen:
|
|
3255
|
+
onFileDialogOpen: le.func,
|
|
3256
3256
|
/**
|
|
3257
3257
|
* Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
|
|
3258
3258
|
* to open the file picker instead of using an `<input type="file">` click event.
|
|
3259
3259
|
*/
|
|
3260
|
-
useFsAccessApi:
|
|
3260
|
+
useFsAccessApi: le.bool,
|
|
3261
3261
|
/**
|
|
3262
3262
|
* Set to true to focus the root element on render
|
|
3263
3263
|
*/
|
|
3264
|
-
autoFocus:
|
|
3264
|
+
autoFocus: le.bool,
|
|
3265
3265
|
/**
|
|
3266
3266
|
* Cb for when the `dragenter` event occurs.
|
|
3267
3267
|
*
|
|
3268
3268
|
* @param {DragEvent} event
|
|
3269
3269
|
*/
|
|
3270
|
-
onDragEnter:
|
|
3270
|
+
onDragEnter: le.func,
|
|
3271
3271
|
/**
|
|
3272
3272
|
* Cb for when the `dragleave` event occurs
|
|
3273
3273
|
*
|
|
3274
3274
|
* @param {DragEvent} event
|
|
3275
3275
|
*/
|
|
3276
|
-
onDragLeave:
|
|
3276
|
+
onDragLeave: le.func,
|
|
3277
3277
|
/**
|
|
3278
3278
|
* Cb for when the `dragover` event occurs
|
|
3279
3279
|
*
|
|
3280
3280
|
* @param {DragEvent} event
|
|
3281
3281
|
*/
|
|
3282
|
-
onDragOver:
|
|
3282
|
+
onDragOver: le.func,
|
|
3283
3283
|
/**
|
|
3284
3284
|
* Cb for when the `drop` event occurs.
|
|
3285
3285
|
* Note that this callback is invoked after the `getFilesFromEvent` callback is done.
|
|
@@ -3310,7 +3310,7 @@ zt.propTypes = {
|
|
|
3310
3310
|
* @param {FileRejection[]} fileRejections
|
|
3311
3311
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
3312
3312
|
*/
|
|
3313
|
-
onDrop:
|
|
3313
|
+
onDrop: le.func,
|
|
3314
3314
|
/**
|
|
3315
3315
|
* Cb for when the `drop` event occurs.
|
|
3316
3316
|
* Note that if no files are accepted, this callback is not invoked.
|
|
@@ -3318,7 +3318,7 @@ zt.propTypes = {
|
|
|
3318
3318
|
* @param {File[]} files
|
|
3319
3319
|
* @param {(DragEvent|Event)} event
|
|
3320
3320
|
*/
|
|
3321
|
-
onDropAccepted:
|
|
3321
|
+
onDropAccepted: le.func,
|
|
3322
3322
|
/**
|
|
3323
3323
|
* Cb for when the `drop` event occurs.
|
|
3324
3324
|
* Note that if no files are rejected, this callback is not invoked.
|
|
@@ -3326,19 +3326,19 @@ zt.propTypes = {
|
|
|
3326
3326
|
* @param {FileRejection[]} fileRejections
|
|
3327
3327
|
* @param {(DragEvent|Event)} event
|
|
3328
3328
|
*/
|
|
3329
|
-
onDropRejected:
|
|
3329
|
+
onDropRejected: le.func,
|
|
3330
3330
|
/**
|
|
3331
3331
|
* Cb for when there's some error from any of the promises.
|
|
3332
3332
|
*
|
|
3333
3333
|
* @param {Error} error
|
|
3334
3334
|
*/
|
|
3335
|
-
onError:
|
|
3335
|
+
onError: le.func,
|
|
3336
3336
|
/**
|
|
3337
3337
|
* Custom validation function. It must return null if there's no errors.
|
|
3338
3338
|
* @param {File} file
|
|
3339
3339
|
* @returns {FileError|FileError[]|null}
|
|
3340
3340
|
*/
|
|
3341
|
-
validator:
|
|
3341
|
+
validator: le.func
|
|
3342
3342
|
};
|
|
3343
3343
|
var Mt = {
|
|
3344
3344
|
isFocused: !1,
|
|
@@ -3350,18 +3350,18 @@ var Mt = {
|
|
|
3350
3350
|
fileRejections: []
|
|
3351
3351
|
};
|
|
3352
3352
|
function Tn() {
|
|
3353
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = ue(ue({},
|
|
3353
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = ue(ue({}, Dn), e), t = n.accept, o = n.disabled, r = n.getFilesFromEvent, i = n.maxSize, l = n.minSize, s = n.multiple, c = n.maxFiles, p = n.onDragEnter, d = n.onDragLeave, f = n.onDragOver, u = n.onDrop, g = n.onDropAccepted, v = n.onDropRejected, m = n.onFileDialogCancel, w = n.onFileDialogOpen, y = n.useFsAccessApi, M = n.autoFocus, j = n.preventDropOnDocument, E = n.noClick, b = n.noKeyboard, O = n.noDrag, F = n.noDragEventsBubbling, H = n.onError, W = n.validator, ee = Le(function() {
|
|
3354
3354
|
return Uo(t);
|
|
3355
|
-
}, [t]),
|
|
3355
|
+
}, [t]), Y = Le(function() {
|
|
3356
3356
|
return Wo(t);
|
|
3357
3357
|
}, [t]), se = Le(function() {
|
|
3358
3358
|
return typeof w == "function" ? w : gn;
|
|
3359
3359
|
}, [w]), U = Le(function() {
|
|
3360
|
-
return typeof
|
|
3361
|
-
}, [
|
|
3360
|
+
return typeof m == "function" ? m : gn;
|
|
3361
|
+
}, [m]), z = pe(null), Z = pe(null), N = eo(ur, Mt), Q = xt(N, 2), ge = Q[0], X = Q[1], x = ge.isFocused, C = ge.isFileDialogActive, _ = pe(typeof window < "u" && window.isSecureContext && y && Zo()), $ = function() {
|
|
3362
3362
|
!_.current && C && setTimeout(function() {
|
|
3363
|
-
if (
|
|
3364
|
-
var q =
|
|
3363
|
+
if (Z.current) {
|
|
3364
|
+
var q = Z.current.files;
|
|
3365
3365
|
q.length || (X({
|
|
3366
3366
|
type: "closeDialog"
|
|
3367
3367
|
}), U());
|
|
@@ -3372,7 +3372,7 @@ function Tn() {
|
|
|
3372
3372
|
return window.addEventListener("focus", $, !1), function() {
|
|
3373
3373
|
window.removeEventListener("focus", $, !1);
|
|
3374
3374
|
};
|
|
3375
|
-
}, [
|
|
3375
|
+
}, [Z, C, U, _]);
|
|
3376
3376
|
var P = pe([]), D = function(q) {
|
|
3377
3377
|
z.current && z.current.contains(q.target) || (q.preventDefault(), P.current = []);
|
|
3378
3378
|
};
|
|
@@ -3381,13 +3381,13 @@ function Tn() {
|
|
|
3381
3381
|
j && (document.removeEventListener("dragover", pn), document.removeEventListener("drop", D));
|
|
3382
3382
|
};
|
|
3383
3383
|
}, [z, j]), de(function() {
|
|
3384
|
-
return !o &&
|
|
3384
|
+
return !o && M && z.current && z.current.focus(), function() {
|
|
3385
3385
|
};
|
|
3386
|
-
}, [z,
|
|
3386
|
+
}, [z, M, o]);
|
|
3387
3387
|
var A = oe(function(L) {
|
|
3388
3388
|
H ? H(L) : console.error(L);
|
|
3389
3389
|
}, [H]), k = oe(function(L) {
|
|
3390
|
-
L.preventDefault(), L.persist(), Ve(L), P.current = [].concat(nr(P.current), [L.target]),
|
|
3390
|
+
L.preventDefault(), L.persist(), Ve(L), P.current = [].concat(nr(P.current), [L.target]), Ze(L) && Promise.resolve(r(L)).then(function(q) {
|
|
3391
3391
|
if (!(Qe(L) && !F)) {
|
|
3392
3392
|
var fe = q.length, me = fe > 0 && qo({
|
|
3393
3393
|
files: q,
|
|
@@ -3396,28 +3396,28 @@ function Tn() {
|
|
|
3396
3396
|
maxSize: i,
|
|
3397
3397
|
multiple: s,
|
|
3398
3398
|
maxFiles: c,
|
|
3399
|
-
validator:
|
|
3399
|
+
validator: W
|
|
3400
3400
|
}), he = fe > 0 && !me;
|
|
3401
3401
|
X({
|
|
3402
3402
|
isDragAccept: me,
|
|
3403
3403
|
isDragReject: he,
|
|
3404
3404
|
isDragActive: !0,
|
|
3405
3405
|
type: "setDraggedFiles"
|
|
3406
|
-
}),
|
|
3406
|
+
}), p && p(L);
|
|
3407
3407
|
}
|
|
3408
3408
|
}).catch(function(q) {
|
|
3409
3409
|
return A(q);
|
|
3410
3410
|
});
|
|
3411
|
-
}, [r,
|
|
3411
|
+
}, [r, p, A, F, ee, l, i, s, c, W]), R = oe(function(L) {
|
|
3412
3412
|
L.preventDefault(), L.persist(), Ve(L);
|
|
3413
|
-
var q =
|
|
3413
|
+
var q = Ze(L);
|
|
3414
3414
|
if (q && L.dataTransfer)
|
|
3415
3415
|
try {
|
|
3416
3416
|
L.dataTransfer.dropEffect = "copy";
|
|
3417
3417
|
} catch {
|
|
3418
3418
|
}
|
|
3419
|
-
return q &&
|
|
3420
|
-
}, [
|
|
3419
|
+
return q && f && f(L), !1;
|
|
3420
|
+
}, [f, F]), I = oe(function(L) {
|
|
3421
3421
|
L.preventDefault(), L.persist(), Ve(L);
|
|
3422
3422
|
var q = P.current.filter(function(me) {
|
|
3423
3423
|
return z.current && z.current.contains(me);
|
|
@@ -3427,11 +3427,11 @@ function Tn() {
|
|
|
3427
3427
|
isDragActive: !1,
|
|
3428
3428
|
isDragAccept: !1,
|
|
3429
3429
|
isDragReject: !1
|
|
3430
|
-
}),
|
|
3431
|
-
}, [z,
|
|
3430
|
+
}), Ze(L) && d && d(L));
|
|
3431
|
+
}, [z, d, F]), V = oe(function(L, q) {
|
|
3432
3432
|
var fe = [], me = [];
|
|
3433
3433
|
L.forEach(function(he) {
|
|
3434
|
-
var Fe = Pn(he, ee), Me = xt(Fe, 2), nt = Me[0], ot = Me[1], rt = Fn(he, l, i), He = xt(rt, 2), it = He[0], at = He[1], lt =
|
|
3434
|
+
var Fe = Pn(he, ee), Me = xt(Fe, 2), nt = Me[0], ot = Me[1], rt = Fn(he, l, i), He = xt(rt, 2), it = He[0], at = He[1], lt = W ? W(he) : null;
|
|
3435
3435
|
if (nt && it && !lt)
|
|
3436
3436
|
fe.push(he);
|
|
3437
3437
|
else {
|
|
@@ -3453,9 +3453,9 @@ function Tn() {
|
|
|
3453
3453
|
fileRejections: me,
|
|
3454
3454
|
isDragReject: me.length > 0,
|
|
3455
3455
|
type: "setFiles"
|
|
3456
|
-
}),
|
|
3457
|
-
}, [X, s, ee, l, i, c,
|
|
3458
|
-
L.preventDefault(), L.persist(), Ve(L), P.current = [],
|
|
3456
|
+
}), u && u(fe, me, q), me.length > 0 && v && v(me, q), fe.length > 0 && g && g(fe, q);
|
|
3457
|
+
}, [X, s, ee, l, i, c, u, g, v, W]), re = oe(function(L) {
|
|
3458
|
+
L.preventDefault(), L.persist(), Ve(L), P.current = [], Ze(L) && Promise.resolve(r(L)).then(function(q) {
|
|
3459
3459
|
Qe(L) && !F || V(q, L);
|
|
3460
3460
|
}).catch(function(q) {
|
|
3461
3461
|
return A(q);
|
|
@@ -3469,7 +3469,7 @@ function Tn() {
|
|
|
3469
3469
|
}), se();
|
|
3470
3470
|
var L = {
|
|
3471
3471
|
multiple: s,
|
|
3472
|
-
types:
|
|
3472
|
+
types: Y
|
|
3473
3473
|
};
|
|
3474
3474
|
window.showOpenFilePicker(L).then(function(q) {
|
|
3475
3475
|
return r(q);
|
|
@@ -3480,31 +3480,31 @@ function Tn() {
|
|
|
3480
3480
|
}).catch(function(q) {
|
|
3481
3481
|
Ko(q) ? (U(q), X({
|
|
3482
3482
|
type: "closeDialog"
|
|
3483
|
-
})) : Xo(q) ? (_.current = !1,
|
|
3483
|
+
})) : Xo(q) ? (_.current = !1, Z.current ? (Z.current.value = null, Z.current.click()) : A(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : A(q);
|
|
3484
3484
|
});
|
|
3485
3485
|
return;
|
|
3486
3486
|
}
|
|
3487
|
-
|
|
3487
|
+
Z.current && (X({
|
|
3488
3488
|
type: "openDialog"
|
|
3489
|
-
}), se(),
|
|
3490
|
-
}, [X, se, U, y, V, A,
|
|
3489
|
+
}), se(), Z.current.value = null, Z.current.click());
|
|
3490
|
+
}, [X, se, U, y, V, A, Y, s]), h = oe(function(L) {
|
|
3491
3491
|
!z.current || !z.current.isEqualNode(L.target) || (L.key === " " || L.key === "Enter" || L.keyCode === 32 || L.keyCode === 13) && (L.preventDefault(), S());
|
|
3492
3492
|
}, [z, S]), T = oe(function() {
|
|
3493
3493
|
X({
|
|
3494
3494
|
type: "focus"
|
|
3495
3495
|
});
|
|
3496
|
-
}, []),
|
|
3496
|
+
}, []), J = oe(function() {
|
|
3497
3497
|
X({
|
|
3498
3498
|
type: "blur"
|
|
3499
3499
|
});
|
|
3500
|
-
}, []),
|
|
3501
|
-
|
|
3502
|
-
}, [
|
|
3500
|
+
}, []), ie = oe(function() {
|
|
3501
|
+
E || (Yo() ? setTimeout(S, 0) : S());
|
|
3502
|
+
}, [E, S]), ae = function(q) {
|
|
3503
3503
|
return o ? null : q;
|
|
3504
3504
|
}, ce = function(q) {
|
|
3505
|
-
return b ? null :
|
|
3505
|
+
return b ? null : ae(q);
|
|
3506
3506
|
}, $e = function(q) {
|
|
3507
|
-
return O ? null :
|
|
3507
|
+
return O ? null : ae(q);
|
|
3508
3508
|
}, Ve = function(q) {
|
|
3509
3509
|
F && q.stopPropagation();
|
|
3510
3510
|
}, Kn = Le(function() {
|
|
@@ -3513,8 +3513,8 @@ function Tn() {
|
|
|
3513
3513
|
return ue(ue(Et({
|
|
3514
3514
|
onKeyDown: ce(ye(he, h)),
|
|
3515
3515
|
onFocus: ce(ye(Fe, T)),
|
|
3516
|
-
onBlur: ce(ye(Me,
|
|
3517
|
-
onClick:
|
|
3516
|
+
onBlur: ce(ye(Me, J)),
|
|
3517
|
+
onClick: ae(ye(nt, ie)),
|
|
3518
3518
|
onDragEnter: $e(ye(ot, k)),
|
|
3519
3519
|
onDragOver: $e(ye(rt, R)),
|
|
3520
3520
|
onDragLeave: $e(ye(He, I)),
|
|
@@ -3524,7 +3524,7 @@ function Tn() {
|
|
|
3524
3524
|
tabIndex: 0
|
|
3525
3525
|
} : {}), at);
|
|
3526
3526
|
};
|
|
3527
|
-
}, [z, h, T,
|
|
3527
|
+
}, [z, h, T, J, ie, k, R, I, re, b, O, o]), Xn = oe(function(L) {
|
|
3528
3528
|
L.stopPropagation();
|
|
3529
3529
|
}, []), Jn = Le(function() {
|
|
3530
3530
|
return function() {
|
|
@@ -3544,20 +3544,20 @@ function Tn() {
|
|
|
3544
3544
|
width: "1px",
|
|
3545
3545
|
whiteSpace: "nowrap"
|
|
3546
3546
|
},
|
|
3547
|
-
onChange:
|
|
3548
|
-
onClick:
|
|
3547
|
+
onChange: ae(ye(me, re)),
|
|
3548
|
+
onClick: ae(ye(he, Xn)),
|
|
3549
3549
|
tabIndex: -1
|
|
3550
|
-
}, fe,
|
|
3550
|
+
}, fe, Z);
|
|
3551
3551
|
return ue(ue({}, Me), Fe);
|
|
3552
3552
|
};
|
|
3553
|
-
}, [
|
|
3553
|
+
}, [Z, t, s, re, o]);
|
|
3554
3554
|
return ue(ue({}, ge), {}, {
|
|
3555
3555
|
isFocused: x && !o,
|
|
3556
3556
|
getRootProps: Kn,
|
|
3557
3557
|
getInputProps: Jn,
|
|
3558
3558
|
rootRef: z,
|
|
3559
|
-
inputRef:
|
|
3560
|
-
open:
|
|
3559
|
+
inputRef: Z,
|
|
3560
|
+
open: ae(S)
|
|
3561
3561
|
});
|
|
3562
3562
|
}
|
|
3563
3563
|
function ur(e, n) {
|
|
@@ -3613,43 +3613,43 @@ const Pi = ({
|
|
|
3613
3613
|
disabled: l = !1,
|
|
3614
3614
|
label: s = "Upload PDF",
|
|
3615
3615
|
subLabel: c = "Maximum size: 2 MB",
|
|
3616
|
-
icon:
|
|
3617
|
-
wrapperClass:
|
|
3618
|
-
iconClass:
|
|
3619
|
-
labelClass:
|
|
3616
|
+
icon: p = /* @__PURE__ */ a.jsx("svg", { className: "size-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z" }) }),
|
|
3617
|
+
wrapperClass: d = "",
|
|
3618
|
+
iconClass: f = "",
|
|
3619
|
+
labelClass: u = "",
|
|
3620
3620
|
subLabelClass: g = "",
|
|
3621
3621
|
showList: v = !0,
|
|
3622
|
-
listView:
|
|
3622
|
+
listView: m = !0,
|
|
3623
3623
|
showListImage: w = !1,
|
|
3624
3624
|
uploadedFiles: y = [],
|
|
3625
3625
|
// New prop for pre-uploaded files
|
|
3626
|
-
onDeleteCallback:
|
|
3626
|
+
onDeleteCallback: M = () => {
|
|
3627
3627
|
}
|
|
3628
3628
|
//
|
|
3629
3629
|
}) => {
|
|
3630
|
-
const [j,
|
|
3630
|
+
const [j, E] = K(y), [b, O] = K([]);
|
|
3631
3631
|
de(() => {
|
|
3632
|
-
(y.length !== j.length || y.some((U, z) => U !== j[z])) &&
|
|
3632
|
+
(y.length !== j.length || y.some((U, z) => U !== j[z])) && E(y);
|
|
3633
3633
|
}, [y]);
|
|
3634
3634
|
const F = oe(
|
|
3635
3635
|
(U, z) => {
|
|
3636
|
-
const
|
|
3636
|
+
const Z = [];
|
|
3637
3637
|
if (z.length > 0 && z.forEach((N) => {
|
|
3638
|
-
N.errors.forEach((
|
|
3639
|
-
|
|
3638
|
+
N.errors.forEach((Q) => {
|
|
3639
|
+
Q.code === "file-too-large" && Z.push(
|
|
3640
3640
|
`${N.file.name} is too large (max ${(r / 1024 / 1024).toFixed(2)}MB)`
|
|
3641
|
-
),
|
|
3641
|
+
), Q.code === "file-invalid-type" && Z.push(
|
|
3642
3642
|
`${N.file.name} has an invalid file type`
|
|
3643
3643
|
);
|
|
3644
3644
|
});
|
|
3645
|
-
}), i !== void 0 && (o ? j.length : 0) + U.length > i &&
|
|
3645
|
+
}), i !== void 0 && (o ? j.length : 0) + U.length > i && Z.push(
|
|
3646
3646
|
`You can only upload up to ${i} file${i > 1 ? "s" : ""}.`
|
|
3647
|
-
),
|
|
3648
|
-
O(
|
|
3647
|
+
), Z.length > 0) {
|
|
3648
|
+
O(Z), n == null || n(Z);
|
|
3649
3649
|
return;
|
|
3650
3650
|
} else
|
|
3651
3651
|
O([]);
|
|
3652
|
-
U.length > 0 && (
|
|
3652
|
+
U.length > 0 && (E(
|
|
3653
3653
|
(N) => o ? [...N, ...U] : U
|
|
3654
3654
|
), e(U));
|
|
3655
3655
|
},
|
|
@@ -3662,8 +3662,8 @@ const Pi = ({
|
|
|
3662
3662
|
o
|
|
3663
3663
|
]
|
|
3664
3664
|
), H = (U) => {
|
|
3665
|
-
|
|
3666
|
-
}, { getRootProps:
|
|
3665
|
+
E((z) => z.filter((Z, N) => N !== U)), M(j);
|
|
3666
|
+
}, { getRootProps: W, getInputProps: ee, isDragActive: Y, isDragReject: se } = Tn({
|
|
3667
3667
|
onDrop: F,
|
|
3668
3668
|
accept: t,
|
|
3669
3669
|
multiple: o,
|
|
@@ -3675,21 +3675,21 @@ const Pi = ({
|
|
|
3675
3675
|
{
|
|
3676
3676
|
className: `
|
|
3677
3677
|
border border-style-dashed rounded-lg p-0 overflow-hidden transition
|
|
3678
|
-
${
|
|
3678
|
+
${Y ? "border-color-blue-500 bg-color-blue-50" : "border-color-gray-200 bg-color-gray-50"}
|
|
3679
3679
|
${se ? "border-color-red-500 bg-color-red-50" : ""}
|
|
3680
3680
|
${l ? "opacity-50 cursor-not-allowed" : ""}
|
|
3681
|
-
${
|
|
3681
|
+
${d}
|
|
3682
3682
|
`,
|
|
3683
3683
|
children: [
|
|
3684
3684
|
/* @__PURE__ */ a.jsxs(
|
|
3685
3685
|
"div",
|
|
3686
3686
|
{
|
|
3687
|
-
...
|
|
3687
|
+
...W(),
|
|
3688
3688
|
className: "flex flex-col items-center justify-center text-center px-6 pt-6 pb-4 cursor-pointer",
|
|
3689
3689
|
children: [
|
|
3690
3690
|
/* @__PURE__ */ a.jsx("input", { ...ee() }),
|
|
3691
|
-
/* @__PURE__ */ a.jsx("div", { className: `text-4xl mb-2 ${
|
|
3692
|
-
/* @__PURE__ */ a.jsx("p", { className: `text-sm font-medium ${
|
|
3691
|
+
/* @__PURE__ */ a.jsx("div", { className: `text-4xl mb-2 ${f}`, children: p }),
|
|
3692
|
+
/* @__PURE__ */ a.jsx("p", { className: `text-sm font-medium ${u}`, children: s }),
|
|
3693
3693
|
c && /* @__PURE__ */ a.jsx("p", { className: `text-xs mt-1 ${g}`, children: c })
|
|
3694
3694
|
]
|
|
3695
3695
|
}
|
|
@@ -3701,7 +3701,7 @@ const Pi = ({
|
|
|
3701
3701
|
v && j.length > 0 && /* @__PURE__ */ a.jsx(
|
|
3702
3702
|
"ul",
|
|
3703
3703
|
{
|
|
3704
|
-
className: `w-full ${
|
|
3704
|
+
className: `w-full ${m ? "space-y-2" : "grid grid-columns-2 gap-2"} px-4 pb-4`,
|
|
3705
3705
|
children: j.map((U, z) => /* @__PURE__ */ a.jsxs(
|
|
3706
3706
|
"li",
|
|
3707
3707
|
{
|
|
@@ -3812,26 +3812,26 @@ const dr = {
|
|
|
3812
3812
|
disabled: l = !1,
|
|
3813
3813
|
size: s = "medium",
|
|
3814
3814
|
variant: c = "outlined",
|
|
3815
|
-
rounded:
|
|
3816
|
-
...
|
|
3817
|
-
},
|
|
3818
|
-
const
|
|
3815
|
+
rounded: p = "medium",
|
|
3816
|
+
...d
|
|
3817
|
+
}, f) => {
|
|
3818
|
+
const u = pe([]), g = (m, w) => {
|
|
3819
3819
|
var j;
|
|
3820
|
-
const y =
|
|
3820
|
+
const y = m.target.value.replace(/[^0-9]/g, "").slice(0, 1);
|
|
3821
3821
|
if (!y && t[w] === void 0) return;
|
|
3822
|
-
const
|
|
3823
|
-
o == null || o(
|
|
3824
|
-
}, v = (
|
|
3825
|
-
var y,
|
|
3826
|
-
|
|
3822
|
+
const M = t.substring(0, w) + y + t.substring(w + 1, i);
|
|
3823
|
+
o == null || o(M), y && w < i - 1 && ((j = u.current[w + 1]) == null || j.focus()), r && M.length === i && !M.split("").some((E) => !E) && r(M);
|
|
3824
|
+
}, v = (m, w) => {
|
|
3825
|
+
var y, M, j;
|
|
3826
|
+
m.key === "Backspace" && !t[w] && w > 0 ? (o == null || o(
|
|
3827
3827
|
t.substring(0, w - 1) + "" + t.substring(w, i)
|
|
3828
|
-
), (y =
|
|
3828
|
+
), (y = u.current[w - 1]) == null || y.focus(), m.preventDefault()) : m.key === "ArrowLeft" && w > 0 ? ((M = u.current[w - 1]) == null || M.focus(), m.preventDefault()) : m.key === "ArrowRight" && w < i - 1 && ((j = u.current[w + 1]) == null || j.focus(), m.preventDefault());
|
|
3829
3829
|
};
|
|
3830
|
-
return /* @__PURE__ */ a.jsx("div", { className: `flex justify-center gap-2 ${e}`, children: Array.from({ length: i }).map((
|
|
3830
|
+
return /* @__PURE__ */ a.jsx("div", { className: `flex justify-center gap-2 ${e}`, children: Array.from({ length: i }).map((m, w) => /* @__PURE__ */ a.jsx(
|
|
3831
3831
|
"input",
|
|
3832
3832
|
{
|
|
3833
3833
|
ref: (y) => {
|
|
3834
|
-
|
|
3834
|
+
u.current[w] = y;
|
|
3835
3835
|
},
|
|
3836
3836
|
type: "text",
|
|
3837
3837
|
inputMode: "numeric",
|
|
@@ -3842,13 +3842,13 @@ const dr = {
|
|
|
3842
3842
|
text-center font-semibold focus:ring-1 ring-color-primary outline-0 transition-all
|
|
3843
3843
|
${dr[s]}
|
|
3844
3844
|
${fr[c]}
|
|
3845
|
-
${gr[
|
|
3845
|
+
${gr[p]}
|
|
3846
3846
|
${n}
|
|
3847
3847
|
`,
|
|
3848
3848
|
value: t[w] || "",
|
|
3849
3849
|
onChange: (y) => g(y, w),
|
|
3850
3850
|
onKeyDown: (y) => v(y, w),
|
|
3851
|
-
...
|
|
3851
|
+
...d
|
|
3852
3852
|
},
|
|
3853
3853
|
w
|
|
3854
3854
|
)) });
|
|
@@ -3873,35 +3873,35 @@ const xr = {
|
|
|
3873
3873
|
iconStyle: l = "",
|
|
3874
3874
|
startIcon: s,
|
|
3875
3875
|
endIcon: c,
|
|
3876
|
-
error:
|
|
3877
|
-
maxLength:
|
|
3878
|
-
label:
|
|
3879
|
-
labelClass:
|
|
3876
|
+
error: p,
|
|
3877
|
+
maxLength: d,
|
|
3878
|
+
label: f,
|
|
3879
|
+
labelClass: u = "",
|
|
3880
3880
|
variant: g = "outlined",
|
|
3881
3881
|
size: v = "medium",
|
|
3882
|
-
...
|
|
3882
|
+
...m
|
|
3883
3883
|
}, w) => {
|
|
3884
|
-
const y =
|
|
3884
|
+
const y = p ? "border-color-red-500 focus-within:ring-color-red-500" : "border-color-gray-200", M = p ? "text-color-red-500" : l;
|
|
3885
3885
|
return /* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
3886
|
-
|
|
3886
|
+
f && /* @__PURE__ */ a.jsx("label", { className: `text-sm font-medium text-color-gray-700 mb-1 block ${u}`, children: f }),
|
|
3887
3887
|
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center w-full rounded-md border focus-within:ring-1 ${y} ${vr[g]} ${r}`, children: [
|
|
3888
|
-
s && /* @__PURE__ */ a.jsx("span", { className: `pl-3 ${
|
|
3888
|
+
s && /* @__PURE__ */ a.jsx("span", { className: `pl-3 ${M}`, children: s }),
|
|
3889
3889
|
/* @__PURE__ */ a.jsx(
|
|
3890
3890
|
"input",
|
|
3891
3891
|
{
|
|
3892
|
-
...
|
|
3892
|
+
...m,
|
|
3893
3893
|
ref: w,
|
|
3894
3894
|
type: o,
|
|
3895
3895
|
placeholder: e,
|
|
3896
3896
|
defaultValue: n,
|
|
3897
|
-
maxLength:
|
|
3897
|
+
maxLength: d,
|
|
3898
3898
|
onChange: t,
|
|
3899
3899
|
className: `grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${xr[v]} ${i}`
|
|
3900
3900
|
}
|
|
3901
3901
|
),
|
|
3902
|
-
c && /* @__PURE__ */ a.jsx("span", { className: `pr-3 ${
|
|
3902
|
+
c && /* @__PURE__ */ a.jsx("span", { className: `pr-3 ${M}`, children: c })
|
|
3903
3903
|
] }),
|
|
3904
|
-
|
|
3904
|
+
p && /* @__PURE__ */ a.jsx("p", { className: "text-color-red-500 text-xs mt-1", children: p })
|
|
3905
3905
|
] });
|
|
3906
3906
|
}
|
|
3907
3907
|
);
|
|
@@ -3938,7 +3938,7 @@ const In = ({
|
|
|
3938
3938
|
color: i = "pearl",
|
|
3939
3939
|
shape: l = "circle"
|
|
3940
3940
|
}) => {
|
|
3941
|
-
var
|
|
3941
|
+
var p;
|
|
3942
3942
|
const s = {
|
|
3943
3943
|
small: "w-8 h-8 text-sm",
|
|
3944
3944
|
medium: "w-10 h-10 text-base",
|
|
@@ -3960,7 +3960,7 @@ const In = ({
|
|
|
3960
3960
|
alt: n,
|
|
3961
3961
|
className: `object-cover w-full h-full ${c[l]}`
|
|
3962
3962
|
}
|
|
3963
|
-
) : o || ((
|
|
3963
|
+
) : o || ((p = n == null ? void 0 : n[0]) == null ? void 0 : p.toUpperCase()) || "?"
|
|
3964
3964
|
}
|
|
3965
3965
|
);
|
|
3966
3966
|
}, je = ({
|
|
@@ -3973,24 +3973,24 @@ const In = ({
|
|
|
3973
3973
|
roundedFull: l = !1,
|
|
3974
3974
|
size: s = "medium",
|
|
3975
3975
|
autoFocus: c = !1,
|
|
3976
|
-
...
|
|
3976
|
+
...p
|
|
3977
3977
|
}) => {
|
|
3978
3978
|
var g;
|
|
3979
|
-
const
|
|
3980
|
-
const
|
|
3981
|
-
if (!
|
|
3982
|
-
const w = document.createElement("span"), y =
|
|
3983
|
-
w.style.width = w.style.height = `${
|
|
3984
|
-
},
|
|
3979
|
+
const d = pe(null), f = (v) => {
|
|
3980
|
+
const m = d.current;
|
|
3981
|
+
if (!m) return;
|
|
3982
|
+
const w = document.createElement("span"), y = m.getBoundingClientRect(), M = Math.max(y.width, y.height);
|
|
3983
|
+
w.style.width = w.style.height = `${M}px`, w.style.left = `${v.clientX - y.left - M / 2}px`, w.style.top = `${v.clientY - y.top - M / 2}px`, w.className = "ripple_small", m.appendChild(w), setTimeout(() => w.remove(), 600), o == null || o(v);
|
|
3984
|
+
}, u = ((g = xe[n]) == null ? void 0 : g[e === "filled" ? "filled" : e === "outlined" ? "outline" : "transparent"]) || "";
|
|
3985
3985
|
return /* @__PURE__ */ a.jsx(
|
|
3986
3986
|
"button",
|
|
3987
3987
|
{
|
|
3988
|
-
ref:
|
|
3988
|
+
ref: d,
|
|
3989
3989
|
type: "button",
|
|
3990
3990
|
disabled: i,
|
|
3991
|
-
onClick:
|
|
3991
|
+
onClick: f,
|
|
3992
3992
|
className: `relative overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
3993
|
-
${
|
|
3993
|
+
${u}
|
|
3994
3994
|
${e === "outlined" && "border"}
|
|
3995
3995
|
${r}
|
|
3996
3996
|
${s === "small" ? "text-sm size-8" : s === "large" ? "text-lg size-12" : "text-base size-10"}
|
|
@@ -3998,7 +3998,7 @@ const In = ({
|
|
|
3998
3998
|
${i ? `!text-color-gray-400 hover:bg-color-transparent ${e === "filled" && "!bg-color-gray-200"} !border-color-gray-200 cursor-not-allowed` : "cursor-pointer hover:opacity-90"}
|
|
3999
3999
|
`,
|
|
4000
4000
|
autoFocus: c,
|
|
4001
|
-
...
|
|
4001
|
+
...p,
|
|
4002
4002
|
children: t && /* @__PURE__ */ a.jsx(a.Fragment, { children: t })
|
|
4003
4003
|
}
|
|
4004
4004
|
);
|
|
@@ -4020,14 +4020,14 @@ const In = ({
|
|
|
4020
4020
|
onDelete: l,
|
|
4021
4021
|
deleteIcon: s,
|
|
4022
4022
|
href: c,
|
|
4023
|
-
target:
|
|
4024
|
-
avatar:
|
|
4025
|
-
icon:
|
|
4023
|
+
target: p = "_self",
|
|
4024
|
+
avatar: d,
|
|
4025
|
+
icon: f
|
|
4026
4026
|
}) => {
|
|
4027
|
-
var y,
|
|
4028
|
-
const
|
|
4029
|
-
|
|
4030
|
-
|
|
4027
|
+
var y, M;
|
|
4028
|
+
const u = (y = xe[n]) == null ? void 0 : y.filled, g = (M = xe[n]) == null ? void 0 : M.outline, v = br[o], m = `inline-flex items-center rounded-full font-medium leading-none ${t === "outlined" ? `border ${g}` : u} ${v} ${i ? "cursor-pointer transition hover:opacity-80" : ""}`.trim(), w = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4029
|
+
d && /* @__PURE__ */ a.jsx(In, { ...typeof d == "object" ? d : {}, className: `-ml-1 mr-1 ${fn[o]}` }),
|
|
4030
|
+
f && /* @__PURE__ */ a.jsx("span", { className: "mr-1 -ml-1", children: f }),
|
|
4031
4031
|
/* @__PURE__ */ a.jsx("span", { children: e }),
|
|
4032
4032
|
l && /* @__PURE__ */ a.jsx(
|
|
4033
4033
|
je,
|
|
@@ -4048,15 +4048,15 @@ const In = ({
|
|
|
4048
4048
|
"a",
|
|
4049
4049
|
{
|
|
4050
4050
|
href: c,
|
|
4051
|
-
target:
|
|
4052
|
-
className: `no-underline ${
|
|
4051
|
+
target: p,
|
|
4052
|
+
className: `no-underline ${m} ${r}`,
|
|
4053
4053
|
onClick: i,
|
|
4054
4054
|
children: w
|
|
4055
4055
|
}
|
|
4056
4056
|
) : /* @__PURE__ */ a.jsx(
|
|
4057
4057
|
"span",
|
|
4058
4058
|
{
|
|
4059
|
-
className: `${
|
|
4059
|
+
className: `${m} ${r}`,
|
|
4060
4060
|
onClick: i,
|
|
4061
4061
|
children: w
|
|
4062
4062
|
}
|
|
@@ -4097,31 +4097,31 @@ const In = ({
|
|
|
4097
4097
|
iconCompletedClass: l = "",
|
|
4098
4098
|
labelClass: s = "",
|
|
4099
4099
|
activeLabelClass: c = "",
|
|
4100
|
-
separatorClass:
|
|
4101
|
-
onChange:
|
|
4102
|
-
}) => /* @__PURE__ */ a.jsx("div", { className: `flex items-center ${t}`, children: e.map((
|
|
4103
|
-
const g =
|
|
4100
|
+
separatorClass: p = "",
|
|
4101
|
+
onChange: d
|
|
4102
|
+
}) => /* @__PURE__ */ a.jsx("div", { className: `flex items-center ${t}`, children: e.map((f, u) => {
|
|
4103
|
+
const g = u === n, v = u < n;
|
|
4104
4104
|
return /* @__PURE__ */ a.jsxs(Ce.Fragment, { children: [
|
|
4105
4105
|
/* @__PURE__ */ a.jsxs(
|
|
4106
4106
|
"div",
|
|
4107
4107
|
{
|
|
4108
4108
|
className: "flex items-center space-x-2 cursor-pointer",
|
|
4109
|
-
onClick: () =>
|
|
4109
|
+
onClick: () => d == null ? void 0 : d(u),
|
|
4110
4110
|
children: [
|
|
4111
4111
|
/* @__PURE__ */ a.jsx(
|
|
4112
4112
|
"div",
|
|
4113
4113
|
{
|
|
4114
4114
|
className: `flex items-center font-semibold justify-center w-7 h-7 rounded-full text-sm transition-color duration-200 leading-none
|
|
4115
4115
|
${g ? `bg-color-blue-500 text-color-white ${i} ` : v ? `bg-color-green-500 text-color-white ${l} ` : `bg-color-white text-color-gray-400 ring ${o} `}`,
|
|
4116
|
-
children: v ? /* @__PURE__ */ a.jsx("svg", { className: `size-5 ${r}`, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" }) }) :
|
|
4116
|
+
children: v ? /* @__PURE__ */ a.jsx("svg", { className: `size-5 ${r}`, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z" }) }) : u + 1
|
|
4117
4117
|
}
|
|
4118
4118
|
),
|
|
4119
|
-
/* @__PURE__ */ a.jsx("span", { className: `text-sm ${g ? `text-color-blue-600 ${c}` : `text-color-gray-600 ${s}`}`, children:
|
|
4119
|
+
/* @__PURE__ */ a.jsx("span", { className: `text-sm ${g ? `text-color-blue-600 ${c}` : `text-color-gray-600 ${s}`}`, children: f.label })
|
|
4120
4120
|
]
|
|
4121
4121
|
}
|
|
4122
4122
|
),
|
|
4123
|
-
|
|
4124
|
-
] },
|
|
4123
|
+
u < e.length - 1 && /* @__PURE__ */ a.jsx("svg", { className: `mx-4 text-color-gray-400 size-6 ${p}`, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" }) })
|
|
4124
|
+
] }, u);
|
|
4125
4125
|
}) });
|
|
4126
4126
|
/**
|
|
4127
4127
|
* table-core
|
|
@@ -4166,20 +4166,20 @@ function B(e, n, t) {
|
|
|
4166
4166
|
let l;
|
|
4167
4167
|
t.key && t.debug && (l = Date.now());
|
|
4168
4168
|
const s = e(i);
|
|
4169
|
-
if (!(s.length !== o.length || s.some((
|
|
4169
|
+
if (!(s.length !== o.length || s.some((d, f) => o[f] !== d)))
|
|
4170
4170
|
return r;
|
|
4171
4171
|
o = s;
|
|
4172
|
-
let
|
|
4173
|
-
if (t.key && t.debug && (
|
|
4174
|
-
const
|
|
4175
|
-
for (v = String(v); v.length <
|
|
4172
|
+
let p;
|
|
4173
|
+
if (t.key && t.debug && (p = Date.now()), r = n(...s), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
|
|
4174
|
+
const d = Math.round((Date.now() - l) * 100) / 100, f = Math.round((Date.now() - p) * 100) / 100, u = f / 16, g = (v, m) => {
|
|
4175
|
+
for (v = String(v); v.length < m; )
|
|
4176
4176
|
v = " " + v;
|
|
4177
4177
|
return v;
|
|
4178
4178
|
};
|
|
4179
|
-
console.info(`%c⏱ ${g(
|
|
4179
|
+
console.info(`%c⏱ ${g(f, 5)} /${g(d, 5)} ms`, `
|
|
4180
4180
|
font-size: .6rem;
|
|
4181
4181
|
font-weight: bold;
|
|
4182
|
-
color: hsl(${Math.max(0, Math.min(120 - 120 *
|
|
4182
|
+
color: hsl(${Math.max(0, Math.min(120 - 120 * u, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
4183
4183
|
}
|
|
4184
4184
|
return r;
|
|
4185
4185
|
};
|
|
@@ -4204,13 +4204,13 @@ function Cr(e, n, t, o) {
|
|
|
4204
4204
|
column: t,
|
|
4205
4205
|
getValue: () => n.getValue(o),
|
|
4206
4206
|
renderValue: r,
|
|
4207
|
-
getContext: B(() => [e, t, n, i], (l, s, c,
|
|
4207
|
+
getContext: B(() => [e, t, n, i], (l, s, c, p) => ({
|
|
4208
4208
|
table: l,
|
|
4209
4209
|
column: s,
|
|
4210
4210
|
row: c,
|
|
4211
|
-
cell:
|
|
4212
|
-
getValue:
|
|
4213
|
-
renderValue:
|
|
4211
|
+
cell: p,
|
|
4212
|
+
getValue: p.getValue,
|
|
4213
|
+
renderValue: p.renderValue
|
|
4214
4214
|
}), G(e.options, "debugCells", "cell.getContext"))
|
|
4215
4215
|
};
|
|
4216
4216
|
return e._features.forEach((l) => {
|
|
@@ -4223,39 +4223,39 @@ function jr(e, n, t, o) {
|
|
|
4223
4223
|
...e._getDefaultColumnDef(),
|
|
4224
4224
|
...n
|
|
4225
4225
|
}, c = s.accessorKey;
|
|
4226
|
-
let
|
|
4227
|
-
if (s.accessorFn ?
|
|
4228
|
-
let g =
|
|
4229
|
-
for (const
|
|
4226
|
+
let p = (r = (i = s.id) != null ? i : c ? typeof String.prototype.replaceAll == "function" ? c.replaceAll(".", "_") : c.replace(/\./g, "_") : void 0) != null ? r : typeof s.header == "string" ? s.header : void 0, d;
|
|
4227
|
+
if (s.accessorFn ? d = s.accessorFn : c && (c.includes(".") ? d = (u) => {
|
|
4228
|
+
let g = u;
|
|
4229
|
+
for (const m of c.split(".")) {
|
|
4230
4230
|
var v;
|
|
4231
|
-
g = (v = g) == null ? void 0 : v[
|
|
4231
|
+
g = (v = g) == null ? void 0 : v[m], process.env.NODE_ENV !== "production" && g === void 0 && console.warn(`"${m}" in deeply nested key "${c}" returned undefined.`);
|
|
4232
4232
|
}
|
|
4233
4233
|
return g;
|
|
4234
|
-
} :
|
|
4234
|
+
} : d = (u) => u[s.accessorKey]), !p)
|
|
4235
4235
|
throw process.env.NODE_ENV !== "production" ? new Error(s.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
4236
|
-
let
|
|
4237
|
-
id: `${String(
|
|
4238
|
-
accessorFn:
|
|
4236
|
+
let f = {
|
|
4237
|
+
id: `${String(p)}`,
|
|
4238
|
+
accessorFn: d,
|
|
4239
4239
|
parent: o,
|
|
4240
4240
|
depth: t,
|
|
4241
4241
|
columnDef: s,
|
|
4242
4242
|
columns: [],
|
|
4243
4243
|
getFlatColumns: B(() => [!0], () => {
|
|
4244
|
-
var
|
|
4245
|
-
return [
|
|
4244
|
+
var u;
|
|
4245
|
+
return [f, ...(u = f.columns) == null ? void 0 : u.flatMap((g) => g.getFlatColumns())];
|
|
4246
4246
|
}, G(e.options, "debugColumns", "column.getFlatColumns")),
|
|
4247
|
-
getLeafColumns: B(() => [e._getOrderColumnsFn()], (
|
|
4247
|
+
getLeafColumns: B(() => [e._getOrderColumnsFn()], (u) => {
|
|
4248
4248
|
var g;
|
|
4249
|
-
if ((g =
|
|
4250
|
-
let v =
|
|
4251
|
-
return
|
|
4249
|
+
if ((g = f.columns) != null && g.length) {
|
|
4250
|
+
let v = f.columns.flatMap((m) => m.getLeafColumns());
|
|
4251
|
+
return u(v);
|
|
4252
4252
|
}
|
|
4253
|
-
return [
|
|
4253
|
+
return [f];
|
|
4254
4254
|
}, G(e.options, "debugColumns", "column.getLeafColumns"))
|
|
4255
4255
|
};
|
|
4256
|
-
for (const
|
|
4257
|
-
|
|
4258
|
-
return
|
|
4256
|
+
for (const u of e._features)
|
|
4257
|
+
u.createColumn == null || u.createColumn(f, e);
|
|
4258
|
+
return f;
|
|
4259
4259
|
}
|
|
4260
4260
|
const ve = "debugHeaders";
|
|
4261
4261
|
function mn(e, n, t) {
|
|
@@ -4291,8 +4291,8 @@ const Sr = {
|
|
|
4291
4291
|
createTable: (e) => {
|
|
4292
4292
|
e.getHeaderGroups = B(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => {
|
|
4293
4293
|
var i, l;
|
|
4294
|
-
const s = (i = o == null ? void 0 : o.map((
|
|
4295
|
-
return We(n, [...s, ...
|
|
4294
|
+
const s = (i = o == null ? void 0 : o.map((f) => t.find((u) => u.id === f)).filter(Boolean)) != null ? i : [], c = (l = r == null ? void 0 : r.map((f) => t.find((u) => u.id === f)).filter(Boolean)) != null ? l : [], p = t.filter((f) => !(o != null && o.includes(f.id)) && !(r != null && r.includes(f.id)));
|
|
4295
|
+
return We(n, [...s, ...p, ...c], e);
|
|
4296
4296
|
}, G(e.options, ve, "getHeaderGroups")), e.getCenterHeaderGroups = B(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o, r) => (t = t.filter((i) => !(o != null && o.includes(i.id)) && !(r != null && r.includes(i.id))), We(n, t, e, "center")), G(e.options, ve, "getCenterHeaderGroups")), e.getLeftHeaderGroups = B(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, o) => {
|
|
4297
4297
|
var r;
|
|
4298
4298
|
const i = (r = o == null ? void 0 : o.map((l) => t.find((s) => s.id === l)).filter(Boolean)) != null ? r : [];
|
|
@@ -4311,66 +4311,66 @@ const Sr = {
|
|
|
4311
4311
|
var o;
|
|
4312
4312
|
return !((o = t.subHeaders) != null && o.length);
|
|
4313
4313
|
}), G(e.options, ve, "getRightLeafHeaders")), e.getLeafHeaders = B(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, o) => {
|
|
4314
|
-
var r, i, l, s, c,
|
|
4315
|
-
return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [], ...(c = (
|
|
4314
|
+
var r, i, l, s, c, p;
|
|
4315
|
+
return [...(r = (i = n[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (s = t[0]) == null ? void 0 : s.headers) != null ? l : [], ...(c = (p = o[0]) == null ? void 0 : p.headers) != null ? c : []].map((d) => d.getLeafHeaders()).flat();
|
|
4316
4316
|
}, G(e.options, ve, "getLeafHeaders"));
|
|
4317
4317
|
}
|
|
4318
4318
|
};
|
|
4319
4319
|
function We(e, n, t, o) {
|
|
4320
4320
|
var r, i;
|
|
4321
4321
|
let l = 0;
|
|
4322
|
-
const s = function(
|
|
4323
|
-
g === void 0 && (g = 1), l = Math.max(l, g),
|
|
4324
|
-
var
|
|
4325
|
-
(
|
|
4322
|
+
const s = function(u, g) {
|
|
4323
|
+
g === void 0 && (g = 1), l = Math.max(l, g), u.filter((v) => v.getIsVisible()).forEach((v) => {
|
|
4324
|
+
var m;
|
|
4325
|
+
(m = v.columns) != null && m.length && s(v.columns, g + 1);
|
|
4326
4326
|
}, 0);
|
|
4327
4327
|
};
|
|
4328
4328
|
s(e);
|
|
4329
4329
|
let c = [];
|
|
4330
|
-
const
|
|
4330
|
+
const p = (u, g) => {
|
|
4331
4331
|
const v = {
|
|
4332
4332
|
depth: g,
|
|
4333
4333
|
id: [o, `${g}`].filter(Boolean).join("_"),
|
|
4334
4334
|
headers: []
|
|
4335
|
-
},
|
|
4336
|
-
|
|
4337
|
-
const y = [...
|
|
4338
|
-
let j,
|
|
4339
|
-
if (
|
|
4335
|
+
}, m = [];
|
|
4336
|
+
u.forEach((w) => {
|
|
4337
|
+
const y = [...m].reverse()[0], M = w.column.depth === v.depth;
|
|
4338
|
+
let j, E = !1;
|
|
4339
|
+
if (M && w.column.parent ? j = w.column.parent : (j = w.column, E = !0), y && (y == null ? void 0 : y.column) === j)
|
|
4340
4340
|
y.subHeaders.push(w);
|
|
4341
4341
|
else {
|
|
4342
4342
|
const b = mn(t, j, {
|
|
4343
4343
|
id: [o, g, j.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
|
|
4344
|
-
isPlaceholder:
|
|
4345
|
-
placeholderId:
|
|
4344
|
+
isPlaceholder: E,
|
|
4345
|
+
placeholderId: E ? `${m.filter((O) => O.column === j).length}` : void 0,
|
|
4346
4346
|
depth: g,
|
|
4347
|
-
index:
|
|
4347
|
+
index: m.length
|
|
4348
4348
|
});
|
|
4349
|
-
b.subHeaders.push(w),
|
|
4349
|
+
b.subHeaders.push(w), m.push(b);
|
|
4350
4350
|
}
|
|
4351
4351
|
v.headers.push(w), w.headerGroup = v;
|
|
4352
|
-
}), c.push(v), g > 0 &&
|
|
4353
|
-
},
|
|
4352
|
+
}), c.push(v), g > 0 && p(m, g - 1);
|
|
4353
|
+
}, d = n.map((u, g) => mn(t, u, {
|
|
4354
4354
|
depth: l,
|
|
4355
4355
|
index: g
|
|
4356
4356
|
}));
|
|
4357
|
-
|
|
4358
|
-
const
|
|
4359
|
-
let
|
|
4360
|
-
v.subHeaders && v.subHeaders.length ? (y = [],
|
|
4357
|
+
p(d, l - 1), c.reverse();
|
|
4358
|
+
const f = (u) => u.filter((v) => v.column.getIsVisible()).map((v) => {
|
|
4359
|
+
let m = 0, w = 0, y = [0];
|
|
4360
|
+
v.subHeaders && v.subHeaders.length ? (y = [], f(v.subHeaders).forEach((j) => {
|
|
4361
4361
|
let {
|
|
4362
|
-
colSpan:
|
|
4362
|
+
colSpan: E,
|
|
4363
4363
|
rowSpan: b
|
|
4364
4364
|
} = j;
|
|
4365
|
-
|
|
4366
|
-
})) :
|
|
4367
|
-
const
|
|
4368
|
-
return w = w +
|
|
4369
|
-
colSpan:
|
|
4365
|
+
m += E, y.push(b);
|
|
4366
|
+
})) : m = 1;
|
|
4367
|
+
const M = Math.min(...y);
|
|
4368
|
+
return w = w + M, v.colSpan = m, v.rowSpan = w, {
|
|
4369
|
+
colSpan: m,
|
|
4370
4370
|
rowSpan: w
|
|
4371
4371
|
};
|
|
4372
4372
|
});
|
|
4373
|
-
return
|
|
4373
|
+
return f((r = (i = c[0]) == null ? void 0 : i.headers) != null ? r : []), c;
|
|
4374
4374
|
}
|
|
4375
4375
|
const $r = (e, n, t, o, r, i, l) => {
|
|
4376
4376
|
let s = {
|
|
@@ -4384,39 +4384,39 @@ const $r = (e, n, t, o, r, i, l) => {
|
|
|
4384
4384
|
getValue: (c) => {
|
|
4385
4385
|
if (s._valuesCache.hasOwnProperty(c))
|
|
4386
4386
|
return s._valuesCache[c];
|
|
4387
|
-
const
|
|
4388
|
-
if (
|
|
4389
|
-
return s._valuesCache[c] =
|
|
4387
|
+
const p = e.getColumn(c);
|
|
4388
|
+
if (p != null && p.accessorFn)
|
|
4389
|
+
return s._valuesCache[c] = p.accessorFn(s.original, o), s._valuesCache[c];
|
|
4390
4390
|
},
|
|
4391
4391
|
getUniqueValues: (c) => {
|
|
4392
4392
|
if (s._uniqueValuesCache.hasOwnProperty(c))
|
|
4393
4393
|
return s._uniqueValuesCache[c];
|
|
4394
|
-
const
|
|
4395
|
-
if (
|
|
4396
|
-
return
|
|
4394
|
+
const p = e.getColumn(c);
|
|
4395
|
+
if (p != null && p.accessorFn)
|
|
4396
|
+
return p.columnDef.getUniqueValues ? (s._uniqueValuesCache[c] = p.columnDef.getUniqueValues(s.original, o), s._uniqueValuesCache[c]) : (s._uniqueValuesCache[c] = [s.getValue(c)], s._uniqueValuesCache[c]);
|
|
4397
4397
|
},
|
|
4398
4398
|
renderValue: (c) => {
|
|
4399
|
-
var
|
|
4400
|
-
return (
|
|
4399
|
+
var p;
|
|
4400
|
+
return (p = s.getValue(c)) != null ? p : e.options.renderFallbackValue;
|
|
4401
4401
|
},
|
|
4402
4402
|
subRows: [],
|
|
4403
4403
|
getLeafRows: () => yr(s.subRows, (c) => c.subRows),
|
|
4404
4404
|
getParentRow: () => s.parentId ? e.getRow(s.parentId, !0) : void 0,
|
|
4405
4405
|
getParentRows: () => {
|
|
4406
|
-
let c = [],
|
|
4406
|
+
let c = [], p = s;
|
|
4407
4407
|
for (; ; ) {
|
|
4408
|
-
const
|
|
4409
|
-
if (!
|
|
4410
|
-
c.push(
|
|
4408
|
+
const d = p.getParentRow();
|
|
4409
|
+
if (!d) break;
|
|
4410
|
+
c.push(d), p = d;
|
|
4411
4411
|
}
|
|
4412
4412
|
return c.reverse();
|
|
4413
4413
|
},
|
|
4414
|
-
getAllCells: B(() => [e.getAllLeafColumns()], (c) => c.map((
|
|
4415
|
-
_getAllCellsByColumnId: B(() => [s.getAllCells()], (c) => c.reduce((
|
|
4414
|
+
getAllCells: B(() => [e.getAllLeafColumns()], (c) => c.map((p) => Cr(e, s, p, p.id)), G(e.options, "debugRows", "getAllCells")),
|
|
4415
|
+
_getAllCellsByColumnId: B(() => [s.getAllCells()], (c) => c.reduce((p, d) => (p[d.column.id] = d, p), {}), G(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
4416
4416
|
};
|
|
4417
4417
|
for (let c = 0; c < e._features.length; c++) {
|
|
4418
|
-
const
|
|
4419
|
-
|
|
4418
|
+
const p = e._features[c];
|
|
4419
|
+
p == null || p.createRow == null || p.createRow(s, e);
|
|
4420
4420
|
}
|
|
4421
4421
|
return s;
|
|
4422
4422
|
}, kr = {
|
|
@@ -4452,13 +4452,13 @@ const Gn = (e, n, t) => !t.some((o) => {
|
|
|
4452
4452
|
return !((r = e.getValue(n)) != null && r.includes(o));
|
|
4453
4453
|
});
|
|
4454
4454
|
Gn.autoRemove = (e) => we(e) || !(e != null && e.length);
|
|
4455
|
-
const
|
|
4455
|
+
const Yn = (e, n, t) => t.some((o) => {
|
|
4456
4456
|
var r;
|
|
4457
4457
|
return (r = e.getValue(n)) == null ? void 0 : r.includes(o);
|
|
4458
4458
|
});
|
|
4459
|
-
|
|
4460
|
-
const
|
|
4461
|
-
|
|
4459
|
+
Yn.autoRemove = (e) => we(e) || !(e != null && e.length);
|
|
4460
|
+
const Zn = (e, n, t) => e.getValue(n) === t;
|
|
4461
|
+
Zn.autoRemove = (e) => we(e);
|
|
4462
4462
|
const Wn = (e, n, t) => e.getValue(n) == t;
|
|
4463
4463
|
Wn.autoRemove = (e) => we(e);
|
|
4464
4464
|
const Tt = (e, n, t) => {
|
|
@@ -4481,8 +4481,8 @@ const Se = {
|
|
|
4481
4481
|
equalsString: qn,
|
|
4482
4482
|
arrIncludes: Bn,
|
|
4483
4483
|
arrIncludesAll: Gn,
|
|
4484
|
-
arrIncludesSome:
|
|
4485
|
-
equals:
|
|
4484
|
+
arrIncludesSome: Yn,
|
|
4485
|
+
equals: Zn,
|
|
4486
4486
|
weakEquals: Wn,
|
|
4487
4487
|
inNumberRange: Tt
|
|
4488
4488
|
};
|
|
@@ -4523,18 +4523,18 @@ const Rr = {
|
|
|
4523
4523
|
return (t = (o = n.getState().columnFilters) == null ? void 0 : o.findIndex((r) => r.id === e.id)) != null ? t : -1;
|
|
4524
4524
|
}, e.setFilterValue = (t) => {
|
|
4525
4525
|
n.setColumnFilters((o) => {
|
|
4526
|
-
const r = e.getFilterFn(), i = o == null ? void 0 : o.find((
|
|
4526
|
+
const r = e.getFilterFn(), i = o == null ? void 0 : o.find((d) => d.id === e.id), l = ke(t, i ? i.value : void 0);
|
|
4527
4527
|
if (xn(r, l, e)) {
|
|
4528
4528
|
var s;
|
|
4529
|
-
return (s = o == null ? void 0 : o.filter((
|
|
4529
|
+
return (s = o == null ? void 0 : o.filter((d) => d.id !== e.id)) != null ? s : [];
|
|
4530
4530
|
}
|
|
4531
4531
|
const c = {
|
|
4532
4532
|
id: e.id,
|
|
4533
4533
|
value: l
|
|
4534
4534
|
};
|
|
4535
4535
|
if (i) {
|
|
4536
|
-
var
|
|
4537
|
-
return (
|
|
4536
|
+
var p;
|
|
4537
|
+
return (p = o == null ? void 0 : o.map((d) => d.id === e.id ? c : d)) != null ? p : [];
|
|
4538
4538
|
}
|
|
4539
4539
|
return o != null && o.length ? [...o, c] : [c];
|
|
4540
4540
|
});
|
|
@@ -4604,7 +4604,7 @@ const _r = (e, n, t) => t.reduce((o, r) => {
|
|
|
4604
4604
|
return t[0];
|
|
4605
4605
|
const o = Math.floor(t.length / 2), r = t.sort((i, l) => i - l);
|
|
4606
4606
|
return t.length % 2 !== 0 ? r[o] : (r[o - 1] + r[o]) / 2;
|
|
4607
|
-
}, Ar = (e, n) => Array.from(new Set(n.map((t) => t.getValue(e))).values()), Nr = (e, n) => new Set(n.map((t) => t.getValue(e))).size,
|
|
4607
|
+
}, Ar = (e, n) => Array.from(new Set(n.map((t) => t.getValue(e))).values()), Nr = (e, n) => new Set(n.map((t) => t.getValue(e))).size, zr = (e, n) => n.length, vt = {
|
|
4608
4608
|
sum: _r,
|
|
4609
4609
|
min: Er,
|
|
4610
4610
|
max: Mr,
|
|
@@ -4613,8 +4613,8 @@ const _r = (e, n, t) => t.reduce((o, r) => {
|
|
|
4613
4613
|
median: Fr,
|
|
4614
4614
|
unique: Ar,
|
|
4615
4615
|
uniqueCount: Nr,
|
|
4616
|
-
count:
|
|
4617
|
-
},
|
|
4616
|
+
count: zr
|
|
4617
|
+
}, Dr = {
|
|
4618
4618
|
getDefaultColumnDef: () => ({
|
|
4619
4619
|
aggregatedCell: (e) => {
|
|
4620
4620
|
var n, t;
|
|
@@ -4696,12 +4696,12 @@ const Or = {
|
|
|
4696
4696
|
onColumnOrderChange: be("columnOrder", e)
|
|
4697
4697
|
}),
|
|
4698
4698
|
createColumn: (e, n) => {
|
|
4699
|
-
e.getIndex = B((t) => [
|
|
4699
|
+
e.getIndex = B((t) => [De(n, t)], (t) => t.findIndex((o) => o.id === e.id), G(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
4700
4700
|
var o;
|
|
4701
|
-
return ((o =
|
|
4701
|
+
return ((o = De(n, t)[0]) == null ? void 0 : o.id) === e.id;
|
|
4702
4702
|
}, e.getIsLastColumn = (t) => {
|
|
4703
4703
|
var o;
|
|
4704
|
-
const r =
|
|
4704
|
+
const r = De(n, t);
|
|
4705
4705
|
return ((o = r[r.length - 1]) == null ? void 0 : o.id) === e.id;
|
|
4706
4706
|
};
|
|
4707
4707
|
},
|
|
@@ -4716,8 +4716,8 @@ const Or = {
|
|
|
4716
4716
|
else {
|
|
4717
4717
|
const l = [...n], s = [...r];
|
|
4718
4718
|
for (; s.length && l.length; ) {
|
|
4719
|
-
const c = l.shift(),
|
|
4720
|
-
|
|
4719
|
+
const c = l.shift(), p = s.findIndex((d) => d.id === c);
|
|
4720
|
+
p > -1 && i.push(s.splice(p, 1)[0]);
|
|
4721
4721
|
}
|
|
4722
4722
|
i = [...i, ...s];
|
|
4723
4723
|
}
|
|
@@ -4743,20 +4743,20 @@ const Or = {
|
|
|
4743
4743
|
if (t === "right") {
|
|
4744
4744
|
var s, c;
|
|
4745
4745
|
return {
|
|
4746
|
-
left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((
|
|
4747
|
-
right: [...((c = r == null ? void 0 : r.right) != null ? c : []).filter((
|
|
4746
|
+
left: ((s = r == null ? void 0 : r.left) != null ? s : []).filter((f) => !(o != null && o.includes(f))),
|
|
4747
|
+
right: [...((c = r == null ? void 0 : r.right) != null ? c : []).filter((f) => !(o != null && o.includes(f))), ...o]
|
|
4748
4748
|
};
|
|
4749
4749
|
}
|
|
4750
4750
|
if (t === "left") {
|
|
4751
|
-
var
|
|
4751
|
+
var p, d;
|
|
4752
4752
|
return {
|
|
4753
|
-
left: [...((
|
|
4754
|
-
right: ((
|
|
4753
|
+
left: [...((p = r == null ? void 0 : r.left) != null ? p : []).filter((f) => !(o != null && o.includes(f))), ...o],
|
|
4754
|
+
right: ((d = r == null ? void 0 : r.right) != null ? d : []).filter((f) => !(o != null && o.includes(f)))
|
|
4755
4755
|
};
|
|
4756
4756
|
}
|
|
4757
4757
|
return {
|
|
4758
|
-
left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((
|
|
4759
|
-
right: ((l = r == null ? void 0 : r.right) != null ? l : []).filter((
|
|
4758
|
+
left: ((i = r == null ? void 0 : r.left) != null ? i : []).filter((f) => !(o != null && o.includes(f))),
|
|
4759
|
+
right: ((l = r == null ? void 0 : r.right) != null ? l : []).filter((f) => !(o != null && o.includes(f)))
|
|
4760
4760
|
};
|
|
4761
4761
|
});
|
|
4762
4762
|
}, e.getCanPin = () => e.getLeafColumns().some((o) => {
|
|
@@ -4832,7 +4832,7 @@ const Or = {
|
|
|
4832
4832
|
var t, o, r;
|
|
4833
4833
|
const i = n.getState().columnSizing[e.id];
|
|
4834
4834
|
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : Ue.minSize, (o = i ?? e.columnDef.size) != null ? o : Ue.size), (r = e.columnDef.maxSize) != null ? r : Ue.maxSize);
|
|
4835
|
-
}, e.getStart = B((t) => [t,
|
|
4835
|
+
}, e.getStart = B((t) => [t, De(n, t), n.getState().columnSizing], (t, o) => o.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), G(n.options, "debugColumns", "getStart")), e.getAfter = B((t) => [t, De(n, t), n.getState().columnSizing], (t, o) => o.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), G(n.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
4836
4836
|
n.setColumnSizing((t) => {
|
|
4837
4837
|
let {
|
|
4838
4838
|
[e.id]: o,
|
|
@@ -4868,13 +4868,13 @@ const Or = {
|
|
|
4868
4868
|
return (i) => {
|
|
4869
4869
|
if (!o || !r || (i.persist == null || i.persist(), wt(i) && i.touches && i.touches.length > 1))
|
|
4870
4870
|
return;
|
|
4871
|
-
const l = e.getSize(), s = e ? e.getLeafHeaders().map((y) => [y.column.id, y.column.getSize()]) : [[o.id, o.getSize()]], c = wt(i) ? Math.round(i.touches[0].clientX) : i.clientX,
|
|
4872
|
-
typeof
|
|
4873
|
-
var
|
|
4874
|
-
const O = n.options.columnResizeDirection === "rtl" ? -1 : 1, F = (
|
|
4875
|
-
return j.columnSizingStart.forEach((
|
|
4876
|
-
let [ee,
|
|
4877
|
-
|
|
4871
|
+
const l = e.getSize(), s = e ? e.getLeafHeaders().map((y) => [y.column.id, y.column.getSize()]) : [[o.id, o.getSize()]], c = wt(i) ? Math.round(i.touches[0].clientX) : i.clientX, p = {}, d = (y, M) => {
|
|
4872
|
+
typeof M == "number" && (n.setColumnSizingInfo((j) => {
|
|
4873
|
+
var E, b;
|
|
4874
|
+
const O = n.options.columnResizeDirection === "rtl" ? -1 : 1, F = (M - ((E = j == null ? void 0 : j.startOffset) != null ? E : 0)) * O, H = Math.max(F / ((b = j == null ? void 0 : j.startSize) != null ? b : 0), -0.999999);
|
|
4875
|
+
return j.columnSizingStart.forEach((W) => {
|
|
4876
|
+
let [ee, Y] = W;
|
|
4877
|
+
p[ee] = Math.round(Math.max(Y + Y * H, 0) * 100) / 100;
|
|
4878
4878
|
}), {
|
|
4879
4879
|
...j,
|
|
4880
4880
|
deltaOffset: F,
|
|
@@ -4882,11 +4882,11 @@ const Or = {
|
|
|
4882
4882
|
};
|
|
4883
4883
|
}), (n.options.columnResizeMode === "onChange" || y === "end") && n.setColumnSizing((j) => ({
|
|
4884
4884
|
...j,
|
|
4885
|
-
...
|
|
4885
|
+
...p
|
|
4886
4886
|
})));
|
|
4887
|
-
},
|
|
4888
|
-
|
|
4889
|
-
...
|
|
4887
|
+
}, f = (y) => d("move", y), u = (y) => {
|
|
4888
|
+
d("end", y), n.setColumnSizingInfo((M) => ({
|
|
4889
|
+
...M,
|
|
4890
4890
|
isResizingColumn: !1,
|
|
4891
4891
|
startOffset: null,
|
|
4892
4892
|
startSize: null,
|
|
@@ -4895,20 +4895,20 @@ const Or = {
|
|
|
4895
4895
|
columnSizingStart: []
|
|
4896
4896
|
}));
|
|
4897
4897
|
}, g = t || typeof document < "u" ? document : null, v = {
|
|
4898
|
-
moveHandler: (y) =>
|
|
4898
|
+
moveHandler: (y) => f(y.clientX),
|
|
4899
4899
|
upHandler: (y) => {
|
|
4900
|
-
g == null || g.removeEventListener("mousemove", v.moveHandler), g == null || g.removeEventListener("mouseup", v.upHandler),
|
|
4900
|
+
g == null || g.removeEventListener("mousemove", v.moveHandler), g == null || g.removeEventListener("mouseup", v.upHandler), u(y.clientX);
|
|
4901
4901
|
}
|
|
4902
|
-
},
|
|
4903
|
-
moveHandler: (y) => (y.cancelable && (y.preventDefault(), y.stopPropagation()),
|
|
4902
|
+
}, m = {
|
|
4903
|
+
moveHandler: (y) => (y.cancelable && (y.preventDefault(), y.stopPropagation()), f(y.touches[0].clientX), !1),
|
|
4904
4904
|
upHandler: (y) => {
|
|
4905
|
-
var
|
|
4906
|
-
g == null || g.removeEventListener("touchmove",
|
|
4905
|
+
var M;
|
|
4906
|
+
g == null || g.removeEventListener("touchmove", m.moveHandler), g == null || g.removeEventListener("touchend", m.upHandler), y.cancelable && (y.preventDefault(), y.stopPropagation()), u((M = y.touches[0]) == null ? void 0 : M.clientX);
|
|
4907
4907
|
}
|
|
4908
4908
|
}, w = Hr() ? {
|
|
4909
4909
|
passive: !1
|
|
4910
4910
|
} : !1;
|
|
4911
|
-
wt(i) ? (g == null || g.addEventListener("touchmove",
|
|
4911
|
+
wt(i) ? (g == null || g.addEventListener("touchmove", m.moveHandler, w), g == null || g.addEventListener("touchend", m.upHandler, w)) : (g == null || g.addEventListener("mousemove", v.moveHandler, w), g == null || g.addEventListener("mouseup", v.upHandler, w)), n.setColumnSizingInfo((y) => ({
|
|
4912
4912
|
...y,
|
|
4913
4913
|
startOffset: c,
|
|
4914
4914
|
startSize: l,
|
|
@@ -5007,7 +5007,7 @@ const qr = {
|
|
|
5007
5007
|
};
|
|
5008
5008
|
}
|
|
5009
5009
|
};
|
|
5010
|
-
function
|
|
5010
|
+
function De(e, n) {
|
|
5011
5011
|
return n ? n === "center" ? e.getCenterVisibleLeafColumns() : n === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
5012
5012
|
}
|
|
5013
5013
|
const Br = {
|
|
@@ -5050,7 +5050,7 @@ const Br = {
|
|
|
5050
5050
|
e.setGlobalFilter(n ? void 0 : e.initialState.globalFilter);
|
|
5051
5051
|
};
|
|
5052
5052
|
}
|
|
5053
|
-
},
|
|
5053
|
+
}, Yr = {
|
|
5054
5054
|
getInitialState: (e) => ({
|
|
5055
5055
|
expanded: {},
|
|
5056
5056
|
...e
|
|
@@ -5140,7 +5140,7 @@ const Br = {
|
|
|
5140
5140
|
}, Lt = 0, Pt = 10, yt = () => ({
|
|
5141
5141
|
pageIndex: Lt,
|
|
5142
5142
|
pageSize: Pt
|
|
5143
|
-
}),
|
|
5143
|
+
}), Zr = {
|
|
5144
5144
|
getInitialState: (e) => ({
|
|
5145
5145
|
...e,
|
|
5146
5146
|
pagination: {
|
|
@@ -5235,34 +5235,34 @@ const Br = {
|
|
|
5235
5235
|
e.pin = (t, o, r) => {
|
|
5236
5236
|
const i = o ? e.getLeafRows().map((c) => {
|
|
5237
5237
|
let {
|
|
5238
|
-
id:
|
|
5238
|
+
id: p
|
|
5239
5239
|
} = c;
|
|
5240
|
-
return
|
|
5240
|
+
return p;
|
|
5241
5241
|
}) : [], l = r ? e.getParentRows().map((c) => {
|
|
5242
5242
|
let {
|
|
5243
|
-
id:
|
|
5243
|
+
id: p
|
|
5244
5244
|
} = c;
|
|
5245
|
-
return
|
|
5245
|
+
return p;
|
|
5246
5246
|
}) : [], s = /* @__PURE__ */ new Set([...l, e.id, ...i]);
|
|
5247
5247
|
n.setRowPinning((c) => {
|
|
5248
|
-
var
|
|
5248
|
+
var p, d;
|
|
5249
5249
|
if (t === "bottom") {
|
|
5250
|
-
var
|
|
5250
|
+
var f, u;
|
|
5251
5251
|
return {
|
|
5252
|
-
top: ((
|
|
5253
|
-
bottom: [...((
|
|
5252
|
+
top: ((f = c == null ? void 0 : c.top) != null ? f : []).filter((m) => !(s != null && s.has(m))),
|
|
5253
|
+
bottom: [...((u = c == null ? void 0 : c.bottom) != null ? u : []).filter((m) => !(s != null && s.has(m))), ...Array.from(s)]
|
|
5254
5254
|
};
|
|
5255
5255
|
}
|
|
5256
5256
|
if (t === "top") {
|
|
5257
5257
|
var g, v;
|
|
5258
5258
|
return {
|
|
5259
|
-
top: [...((g = c == null ? void 0 : c.top) != null ? g : []).filter((
|
|
5260
|
-
bottom: ((v = c == null ? void 0 : c.bottom) != null ? v : []).filter((
|
|
5259
|
+
top: [...((g = c == null ? void 0 : c.top) != null ? g : []).filter((m) => !(s != null && s.has(m))), ...Array.from(s)],
|
|
5260
|
+
bottom: ((v = c == null ? void 0 : c.bottom) != null ? v : []).filter((m) => !(s != null && s.has(m)))
|
|
5261
5261
|
};
|
|
5262
5262
|
}
|
|
5263
5263
|
return {
|
|
5264
|
-
top: ((
|
|
5265
|
-
bottom: ((
|
|
5264
|
+
top: ((p = c == null ? void 0 : c.top) != null ? p : []).filter((m) => !(s != null && s.has(m))),
|
|
5265
|
+
bottom: ((d = c == null ? void 0 : c.bottom) != null ? d : []).filter((m) => !(s != null && s.has(m)))
|
|
5266
5266
|
};
|
|
5267
5267
|
});
|
|
5268
5268
|
}, e.getCanPin = () => {
|
|
@@ -5450,12 +5450,12 @@ const Br = {
|
|
|
5450
5450
|
function jt(e, n) {
|
|
5451
5451
|
const t = e.getState().rowSelection, o = [], r = {}, i = function(l, s) {
|
|
5452
5452
|
return l.map((c) => {
|
|
5453
|
-
var
|
|
5454
|
-
const
|
|
5455
|
-
if (
|
|
5453
|
+
var p;
|
|
5454
|
+
const d = Ot(c, t);
|
|
5455
|
+
if (d && (o.push(c), r[c.id] = c), (p = c.subRows) != null && p.length && (c = {
|
|
5456
5456
|
...c,
|
|
5457
5457
|
subRows: i(c.subRows)
|
|
5458
|
-
}),
|
|
5458
|
+
}), d)
|
|
5459
5459
|
return c;
|
|
5460
5460
|
}).filter(Boolean);
|
|
5461
5461
|
};
|
|
@@ -5510,7 +5510,7 @@ function Un(e, n) {
|
|
|
5510
5510
|
}
|
|
5511
5511
|
return t.length - o.length;
|
|
5512
5512
|
}
|
|
5513
|
-
const
|
|
5513
|
+
const ze = {
|
|
5514
5514
|
alphanumeric: Kr,
|
|
5515
5515
|
alphanumericCaseSensitive: Xr,
|
|
5516
5516
|
text: Jr,
|
|
@@ -5537,11 +5537,11 @@ const De = {
|
|
|
5537
5537
|
for (const r of t) {
|
|
5538
5538
|
const i = r == null ? void 0 : r.getValue(e.id);
|
|
5539
5539
|
if (Object.prototype.toString.call(i) === "[object Date]")
|
|
5540
|
-
return
|
|
5540
|
+
return ze.datetime;
|
|
5541
5541
|
if (typeof i == "string" && (o = !0, i.split(Nt).length > 1))
|
|
5542
|
-
return
|
|
5542
|
+
return ze.alphanumeric;
|
|
5543
5543
|
}
|
|
5544
|
-
return o ?
|
|
5544
|
+
return o ? ze.text : ze.basic;
|
|
5545
5545
|
}, e.getAutoSortDir = () => {
|
|
5546
5546
|
const t = n.getFilteredRowModel().flatRows[0];
|
|
5547
5547
|
return typeof (t == null ? void 0 : t.getValue(e.id)) == "string" ? "asc" : "desc";
|
|
@@ -5549,26 +5549,26 @@ const De = {
|
|
|
5549
5549
|
var t, o;
|
|
5550
5550
|
if (!e)
|
|
5551
5551
|
throw new Error();
|
|
5552
|
-
return tt(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (o = n.options.sortingFns) == null ? void 0 : o[e.columnDef.sortingFn]) != null ? t :
|
|
5552
|
+
return tt(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (o = n.options.sortingFns) == null ? void 0 : o[e.columnDef.sortingFn]) != null ? t : ze[e.columnDef.sortingFn];
|
|
5553
5553
|
}, e.toggleSorting = (t, o) => {
|
|
5554
5554
|
const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
|
|
5555
5555
|
n.setSorting((l) => {
|
|
5556
5556
|
const s = l == null ? void 0 : l.find((g) => g.id === e.id), c = l == null ? void 0 : l.findIndex((g) => g.id === e.id);
|
|
5557
|
-
let
|
|
5558
|
-
if (l != null && l.length && e.getCanMultiSort() && o ? s ?
|
|
5559
|
-
var
|
|
5560
|
-
|
|
5557
|
+
let p = [], d, f = i ? t : r === "desc";
|
|
5558
|
+
if (l != null && l.length && e.getCanMultiSort() && o ? s ? d = "toggle" : d = "add" : l != null && l.length && c !== l.length - 1 ? d = "replace" : s ? d = "toggle" : d = "replace", d === "toggle" && (i || r || (d = "remove")), d === "add") {
|
|
5559
|
+
var u;
|
|
5560
|
+
p = [...l, {
|
|
5561
5561
|
id: e.id,
|
|
5562
|
-
desc:
|
|
5563
|
-
}],
|
|
5564
|
-
} else
|
|
5562
|
+
desc: f
|
|
5563
|
+
}], p.splice(0, p.length - ((u = n.options.maxMultiSortColCount) != null ? u : Number.MAX_SAFE_INTEGER));
|
|
5564
|
+
} else d === "toggle" ? p = l.map((g) => g.id === e.id ? {
|
|
5565
5565
|
...g,
|
|
5566
|
-
desc:
|
|
5567
|
-
} : g) :
|
|
5566
|
+
desc: f
|
|
5567
|
+
} : g) : d === "remove" ? p = l.filter((g) => g.id !== e.id) : p = [{
|
|
5568
5568
|
id: e.id,
|
|
5569
|
-
desc:
|
|
5569
|
+
desc: f
|
|
5570
5570
|
}];
|
|
5571
|
-
return
|
|
5571
|
+
return p;
|
|
5572
5572
|
});
|
|
5573
5573
|
}, e.getFirstSortDir = () => {
|
|
5574
5574
|
var t, o;
|
|
@@ -5618,10 +5618,10 @@ const De = {
|
|
|
5618
5618
|
Gr,
|
|
5619
5619
|
//depends on ColumnFiltering
|
|
5620
5620
|
ni,
|
|
5621
|
-
|
|
5621
|
+
Dr,
|
|
5622
5622
|
//depends on RowSorting
|
|
5623
|
-
Zr,
|
|
5624
5623
|
Yr,
|
|
5624
|
+
Zr,
|
|
5625
5625
|
Wr,
|
|
5626
5626
|
Ur,
|
|
5627
5627
|
Vr
|
|
@@ -5633,32 +5633,32 @@ function ri(e) {
|
|
|
5633
5633
|
let r = {
|
|
5634
5634
|
_features: o
|
|
5635
5635
|
};
|
|
5636
|
-
const i = r._features.reduce((
|
|
5636
|
+
const i = r._features.reduce((u, g) => Object.assign(u, g.getDefaultOptions == null ? void 0 : g.getDefaultOptions(r)), {}), l = (u) => r.options.mergeOptions ? r.options.mergeOptions(i, u) : {
|
|
5637
5637
|
...i,
|
|
5638
|
-
...
|
|
5638
|
+
...u
|
|
5639
5639
|
};
|
|
5640
5640
|
let c = {
|
|
5641
5641
|
...{},
|
|
5642
5642
|
...(t = e.initialState) != null ? t : {}
|
|
5643
5643
|
};
|
|
5644
|
-
r._features.forEach((
|
|
5644
|
+
r._features.forEach((u) => {
|
|
5645
5645
|
var g;
|
|
5646
|
-
c = (g =
|
|
5646
|
+
c = (g = u.getInitialState == null ? void 0 : u.getInitialState(c)) != null ? g : c;
|
|
5647
5647
|
});
|
|
5648
|
-
const
|
|
5649
|
-
let
|
|
5650
|
-
const
|
|
5648
|
+
const p = [];
|
|
5649
|
+
let d = !1;
|
|
5650
|
+
const f = {
|
|
5651
5651
|
_features: o,
|
|
5652
5652
|
options: {
|
|
5653
5653
|
...i,
|
|
5654
5654
|
...e
|
|
5655
5655
|
},
|
|
5656
5656
|
initialState: c,
|
|
5657
|
-
_queue: (
|
|
5658
|
-
|
|
5659
|
-
for (;
|
|
5660
|
-
|
|
5661
|
-
|
|
5657
|
+
_queue: (u) => {
|
|
5658
|
+
p.push(u), d || (d = !0, Promise.resolve().then(() => {
|
|
5659
|
+
for (; p.length; )
|
|
5660
|
+
p.shift()();
|
|
5661
|
+
d = !1;
|
|
5662
5662
|
}).catch((g) => setTimeout(() => {
|
|
5663
5663
|
throw g;
|
|
5664
5664
|
})));
|
|
@@ -5666,69 +5666,69 @@ function ri(e) {
|
|
|
5666
5666
|
reset: () => {
|
|
5667
5667
|
r.setState(r.initialState);
|
|
5668
5668
|
},
|
|
5669
|
-
setOptions: (
|
|
5670
|
-
const g = ke(
|
|
5669
|
+
setOptions: (u) => {
|
|
5670
|
+
const g = ke(u, r.options);
|
|
5671
5671
|
r.options = l(g);
|
|
5672
5672
|
},
|
|
5673
5673
|
getState: () => r.options.state,
|
|
5674
|
-
setState: (
|
|
5675
|
-
r.options.onStateChange == null || r.options.onStateChange(
|
|
5674
|
+
setState: (u) => {
|
|
5675
|
+
r.options.onStateChange == null || r.options.onStateChange(u);
|
|
5676
5676
|
},
|
|
5677
|
-
_getRowId: (
|
|
5678
|
-
var
|
|
5679
|
-
return (
|
|
5677
|
+
_getRowId: (u, g, v) => {
|
|
5678
|
+
var m;
|
|
5679
|
+
return (m = r.options.getRowId == null ? void 0 : r.options.getRowId(u, g, v)) != null ? m : `${v ? [v.id, g].join(".") : g}`;
|
|
5680
5680
|
},
|
|
5681
5681
|
getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
|
|
5682
5682
|
// The final calls start at the bottom of the model,
|
|
5683
5683
|
// expanded rows, which then work their way up
|
|
5684
5684
|
getRowModel: () => r.getPaginationRowModel(),
|
|
5685
5685
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
5686
|
-
getRow: (
|
|
5687
|
-
let v = (g ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[
|
|
5688
|
-
if (!v && (v = r.getCoreRowModel().rowsById[
|
|
5689
|
-
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${
|
|
5686
|
+
getRow: (u, g) => {
|
|
5687
|
+
let v = (g ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[u];
|
|
5688
|
+
if (!v && (v = r.getCoreRowModel().rowsById[u], !v))
|
|
5689
|
+
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${u}`) : new Error();
|
|
5690
5690
|
return v;
|
|
5691
5691
|
},
|
|
5692
|
-
_getDefaultColumnDef: B(() => [r.options.defaultColumn], (
|
|
5692
|
+
_getDefaultColumnDef: B(() => [r.options.defaultColumn], (u) => {
|
|
5693
5693
|
var g;
|
|
5694
|
-
return
|
|
5694
|
+
return u = (g = u) != null ? g : {}, {
|
|
5695
5695
|
header: (v) => {
|
|
5696
|
-
const
|
|
5697
|
-
return
|
|
5696
|
+
const m = v.header.column.columnDef;
|
|
5697
|
+
return m.accessorKey ? m.accessorKey : m.accessorFn ? m.id : null;
|
|
5698
5698
|
},
|
|
5699
5699
|
// footer: props => props.header.column.id,
|
|
5700
5700
|
cell: (v) => {
|
|
5701
|
-
var
|
|
5702
|
-
return (
|
|
5701
|
+
var m, w;
|
|
5702
|
+
return (m = (w = v.renderValue()) == null || w.toString == null ? void 0 : w.toString()) != null ? m : null;
|
|
5703
5703
|
},
|
|
5704
|
-
...r._features.reduce((v,
|
|
5705
|
-
...
|
|
5704
|
+
...r._features.reduce((v, m) => Object.assign(v, m.getDefaultColumnDef == null ? void 0 : m.getDefaultColumnDef()), {}),
|
|
5705
|
+
...u
|
|
5706
5706
|
};
|
|
5707
5707
|
}, G(e, "debugColumns", "_getDefaultColumnDef")),
|
|
5708
5708
|
_getColumnDefs: () => r.options.columns,
|
|
5709
|
-
getAllColumns: B(() => [r._getColumnDefs()], (
|
|
5710
|
-
const g = function(v,
|
|
5709
|
+
getAllColumns: B(() => [r._getColumnDefs()], (u) => {
|
|
5710
|
+
const g = function(v, m, w) {
|
|
5711
5711
|
return w === void 0 && (w = 0), v.map((y) => {
|
|
5712
|
-
const
|
|
5713
|
-
return
|
|
5712
|
+
const M = jr(r, y, w, m), j = y;
|
|
5713
|
+
return M.columns = j.columns ? g(j.columns, M, w + 1) : [], M;
|
|
5714
5714
|
});
|
|
5715
5715
|
};
|
|
5716
|
-
return g(
|
|
5716
|
+
return g(u);
|
|
5717
5717
|
}, G(e, "debugColumns", "getAllColumns")),
|
|
5718
|
-
getAllFlatColumns: B(() => [r.getAllColumns()], (
|
|
5719
|
-
_getAllFlatColumnsById: B(() => [r.getAllFlatColumns()], (
|
|
5720
|
-
getAllLeafColumns: B(() => [r.getAllColumns(), r._getOrderColumnsFn()], (
|
|
5721
|
-
let v =
|
|
5718
|
+
getAllFlatColumns: B(() => [r.getAllColumns()], (u) => u.flatMap((g) => g.getFlatColumns()), G(e, "debugColumns", "getAllFlatColumns")),
|
|
5719
|
+
_getAllFlatColumnsById: B(() => [r.getAllFlatColumns()], (u) => u.reduce((g, v) => (g[v.id] = v, g), {}), G(e, "debugColumns", "getAllFlatColumnsById")),
|
|
5720
|
+
getAllLeafColumns: B(() => [r.getAllColumns(), r._getOrderColumnsFn()], (u, g) => {
|
|
5721
|
+
let v = u.flatMap((m) => m.getLeafColumns());
|
|
5722
5722
|
return g(v);
|
|
5723
5723
|
}, G(e, "debugColumns", "getAllLeafColumns")),
|
|
5724
|
-
getColumn: (
|
|
5725
|
-
const g = r._getAllFlatColumnsById()[
|
|
5726
|
-
return process.env.NODE_ENV !== "production" && !g && console.error(`[Table] Column with id '${
|
|
5724
|
+
getColumn: (u) => {
|
|
5725
|
+
const g = r._getAllFlatColumnsById()[u];
|
|
5726
|
+
return process.env.NODE_ENV !== "production" && !g && console.error(`[Table] Column with id '${u}' does not exist.`), g;
|
|
5727
5727
|
}
|
|
5728
5728
|
};
|
|
5729
|
-
Object.assign(r,
|
|
5730
|
-
for (let
|
|
5731
|
-
const g = r._features[
|
|
5729
|
+
Object.assign(r, f);
|
|
5730
|
+
for (let u = 0; u < r._features.length; u++) {
|
|
5731
|
+
const g = r._features[u];
|
|
5732
5732
|
g == null || g.createTable == null || g.createTable(r);
|
|
5733
5733
|
}
|
|
5734
5734
|
return r;
|
|
@@ -5742,11 +5742,11 @@ function ii() {
|
|
|
5742
5742
|
}, o = function(r, i, l) {
|
|
5743
5743
|
i === void 0 && (i = 0);
|
|
5744
5744
|
const s = [];
|
|
5745
|
-
for (let
|
|
5746
|
-
const
|
|
5747
|
-
if (t.flatRows.push(
|
|
5745
|
+
for (let p = 0; p < r.length; p++) {
|
|
5746
|
+
const d = $r(e, e._getRowId(r[p], p, l), r[p], p, i, void 0, l == null ? void 0 : l.id);
|
|
5747
|
+
if (t.flatRows.push(d), t.rowsById[d.id] = d, s.push(d), e.options.getSubRows) {
|
|
5748
5748
|
var c;
|
|
5749
|
-
|
|
5749
|
+
d.originalSubRows = e.options.getSubRows(r[p], p), (c = d.originalSubRows) != null && c.length && (d.subRows = o(d.originalSubRows, i + 1, d));
|
|
5750
5750
|
}
|
|
5751
5751
|
}
|
|
5752
5752
|
return s;
|
|
@@ -5836,7 +5836,7 @@ const li = {
|
|
|
5836
5836
|
iconClass: l = "",
|
|
5837
5837
|
pageClass: s = ""
|
|
5838
5838
|
}) => {
|
|
5839
|
-
const c = Math.ceil(e / t),
|
|
5839
|
+
const c = Math.ceil(e / t), p = n === 1, d = n === c;
|
|
5840
5840
|
return c <= 1 ? null : /* @__PURE__ */ a.jsxs("div", { className: `flex items-center space-x-1 ${i}`, children: [
|
|
5841
5841
|
!r && /* @__PURE__ */ a.jsx(
|
|
5842
5842
|
je,
|
|
@@ -5844,7 +5844,7 @@ const li = {
|
|
|
5844
5844
|
color: "dark",
|
|
5845
5845
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M4.83582 12L11.0429 18.2071L12.4571 16.7929L7.66424 12L12.4571 7.20712L11.0429 5.79291L4.83582 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z" }) }),
|
|
5846
5846
|
onClick: () => o(1),
|
|
5847
|
-
disabled:
|
|
5847
|
+
disabled: p,
|
|
5848
5848
|
roundedFull: !0,
|
|
5849
5849
|
size: "small",
|
|
5850
5850
|
variant: "transparent",
|
|
@@ -5857,7 +5857,7 @@ const li = {
|
|
|
5857
5857
|
color: "dark",
|
|
5858
5858
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" }) }),
|
|
5859
5859
|
onClick: () => o(n - 1),
|
|
5860
|
-
disabled:
|
|
5860
|
+
disabled: p,
|
|
5861
5861
|
roundedFull: !0,
|
|
5862
5862
|
size: "small",
|
|
5863
5863
|
variant: "transparent",
|
|
@@ -5876,7 +5876,7 @@ const li = {
|
|
|
5876
5876
|
color: "dark",
|
|
5877
5877
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" }) }),
|
|
5878
5878
|
onClick: () => o(n + 1),
|
|
5879
|
-
disabled:
|
|
5879
|
+
disabled: d,
|
|
5880
5880
|
roundedFull: !0,
|
|
5881
5881
|
size: "small",
|
|
5882
5882
|
variant: "transparent",
|
|
@@ -5889,7 +5889,7 @@ const li = {
|
|
|
5889
5889
|
color: "dark",
|
|
5890
5890
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M19.1642 12L12.9571 5.79291L11.5429 7.20712L16.3358 12L11.5429 16.7929L12.9571 18.2071L19.1642 12ZM13.5143 12L7.30722 5.79291L5.89301 7.20712L10.6859 12L5.89301 16.7929L7.30722 18.2071L13.5143 12Z" }) }),
|
|
5891
5891
|
onClick: () => o(c),
|
|
5892
|
-
disabled:
|
|
5892
|
+
disabled: d,
|
|
5893
5893
|
roundedFull: !0,
|
|
5894
5894
|
size: "small",
|
|
5895
5895
|
variant: "transparent",
|
|
@@ -5897,7 +5897,7 @@ const li = {
|
|
|
5897
5897
|
}
|
|
5898
5898
|
)
|
|
5899
5899
|
] });
|
|
5900
|
-
},
|
|
5900
|
+
}, zi = ({
|
|
5901
5901
|
data: e,
|
|
5902
5902
|
columns: n = [],
|
|
5903
5903
|
pageSize: t,
|
|
@@ -5907,10 +5907,10 @@ const li = {
|
|
|
5907
5907
|
rowOptionArray: l = [5, 10, 15],
|
|
5908
5908
|
totalRecords: s = e.length,
|
|
5909
5909
|
className: c = "",
|
|
5910
|
-
paginationClassName:
|
|
5911
|
-
tdClassName:
|
|
5912
|
-
thClassName:
|
|
5913
|
-
responsive:
|
|
5910
|
+
paginationClassName: p = "",
|
|
5911
|
+
tdClassName: d = "",
|
|
5912
|
+
thClassName: f = "",
|
|
5913
|
+
responsive: u = !1
|
|
5914
5914
|
}) => {
|
|
5915
5915
|
const g = ai({
|
|
5916
5916
|
data: e,
|
|
@@ -5927,30 +5927,30 @@ const li = {
|
|
|
5927
5927
|
{
|
|
5928
5928
|
className: `relative overflow-y-auto flex flex-col ${c} `,
|
|
5929
5929
|
children: [
|
|
5930
|
-
/* @__PURE__ */ a.jsx("div", { className: `${
|
|
5931
|
-
/* @__PURE__ */ a.jsx("thead", { className: "sticky top-0 left-0 rounded-xl bg-color-[#FAFBFB] z-10 h-10", children: g.getHeaderGroups().map((v) => /* @__PURE__ */ a.jsx("tr", { children: v.headers.map((
|
|
5930
|
+
/* @__PURE__ */ a.jsx("div", { className: `${u ? "overflow-x-auto" : ""}`, children: /* @__PURE__ */ a.jsxs("table", { className: "w-full relative border-collapse", children: [
|
|
5931
|
+
/* @__PURE__ */ a.jsx("thead", { className: "sticky top-0 left-0 rounded-xl bg-color-[#FAFBFB] z-10 h-10", children: g.getHeaderGroups().map((v) => /* @__PURE__ */ a.jsx("tr", { children: v.headers.map((m) => /* @__PURE__ */ a.jsx(
|
|
5932
5932
|
"th",
|
|
5933
5933
|
{
|
|
5934
|
-
className: `bg-color-[#FAFBFB] p-2 text-left text-xs font-semibold text-color-gray-500 border-b border-color-gray-200 ${
|
|
5935
|
-
children:
|
|
5936
|
-
|
|
5937
|
-
) :
|
|
5934
|
+
className: `bg-color-[#FAFBFB] p-2 text-left text-xs font-semibold text-color-gray-500 border-b border-color-gray-200 ${f}`,
|
|
5935
|
+
children: m.isPlaceholder ? null : m.column.columnDef.header instanceof Function ? m.column.columnDef.header(
|
|
5936
|
+
m.getContext()
|
|
5937
|
+
) : m.column.columnDef.header
|
|
5938
5938
|
},
|
|
5939
|
-
|
|
5939
|
+
m.id
|
|
5940
5940
|
)) }, v.id)) }),
|
|
5941
5941
|
/* @__PURE__ */ a.jsx("tbody", { className: "", children: g.getRowModel().rows.map((v) => /* @__PURE__ */ a.jsx(
|
|
5942
5942
|
"tr",
|
|
5943
5943
|
{
|
|
5944
5944
|
className: "border-b border-color-gray-200",
|
|
5945
|
-
children: v.getVisibleCells().map((
|
|
5945
|
+
children: v.getVisibleCells().map((m) => /* @__PURE__ */ a.jsx(
|
|
5946
5946
|
"td",
|
|
5947
5947
|
{
|
|
5948
|
-
className: `px-2 py-4 font-normal text-sm text-color-gray-800 ${
|
|
5949
|
-
children:
|
|
5950
|
-
|
|
5951
|
-
) :
|
|
5948
|
+
className: `px-2 py-4 font-normal text-sm text-color-gray-800 ${d}`,
|
|
5949
|
+
children: m.column.columnDef.cell instanceof Function ? m.column.columnDef.cell(
|
|
5950
|
+
m.getContext()
|
|
5951
|
+
) : m.getValue()
|
|
5952
5952
|
},
|
|
5953
|
-
|
|
5953
|
+
m.id
|
|
5954
5954
|
))
|
|
5955
5955
|
},
|
|
5956
5956
|
v.id
|
|
@@ -5959,7 +5959,7 @@ const li = {
|
|
|
5959
5959
|
/* @__PURE__ */ a.jsxs(
|
|
5960
5960
|
"div",
|
|
5961
5961
|
{
|
|
5962
|
-
className: `w-full py-4 px-2 border-t border-color-gray-200 bg-color-[#FAFBFB] flex justify-between items-center ${
|
|
5962
|
+
className: `w-full py-4 px-2 border-t border-color-gray-200 bg-color-[#FAFBFB] flex justify-between items-center ${p} sticky bottom-0 z-10`,
|
|
5963
5963
|
children: [
|
|
5964
5964
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5965
5965
|
/* @__PURE__ */ a.jsx(si, { variant: "body2", className: "hidden md:!flex", children: "Rows per page" }),
|
|
@@ -5990,7 +5990,7 @@ const li = {
|
|
|
5990
5990
|
]
|
|
5991
5991
|
}
|
|
5992
5992
|
) });
|
|
5993
|
-
},
|
|
5993
|
+
}, Di = ({ children: e, className: n = "" }) => /* @__PURE__ */ a.jsx("ul", { className: `divide-y divide-color-gray-200 rounded-md bg-color-white shadow-sm border border-color-gray-200 ${n}`, children: e }), Ti = ({ children: e, secondaryAction: n, className: t = "" }) => /* @__PURE__ */ a.jsxs("li", { className: `flex items-center justify-between overflow-hidden px-4 py-3 hover:bg-color-gray-50 transition ${t}`, children: [
|
|
5994
5994
|
/* @__PURE__ */ a.jsx("div", { className: "flex-1", children: e }),
|
|
5995
5995
|
n && /* @__PURE__ */ a.jsx("div", { className: "ml-4", children: n })
|
|
5996
5996
|
] }), Oi = ({
|
|
@@ -6058,8 +6058,8 @@ const li = {
|
|
|
6058
6058
|
defaultHeight: 100
|
|
6059
6059
|
};
|
|
6060
6060
|
}
|
|
6061
|
-
}, { classes: c, defaultWidth:
|
|
6062
|
-
|
|
6061
|
+
}, { classes: c, defaultWidth: p, defaultHeight: d } = s(), f = t ?? p, u = o ?? d, g = {};
|
|
6062
|
+
f !== void 0 && (g.width = `${f}px`), u !== void 0 && (g.height = `${u}px`), n === "text" && t === void 0 && (g.width = "100%");
|
|
6063
6063
|
const v = [
|
|
6064
6064
|
i,
|
|
6065
6065
|
c,
|
|
@@ -6122,11 +6122,11 @@ const li = {
|
|
|
6122
6122
|
large: { track: "h-3", thumb: "w-5 h-5" }
|
|
6123
6123
|
};
|
|
6124
6124
|
function gi(e) {
|
|
6125
|
-
const n = pe(null), t = pe(null), o = pe(null), r = (c,
|
|
6126
|
-
if (c ===
|
|
6127
|
-
if (Array.isArray(c) && Array.isArray(
|
|
6128
|
-
if (c.length !==
|
|
6129
|
-
for (let
|
|
6125
|
+
const n = pe(null), t = pe(null), o = pe(null), r = (c, p) => {
|
|
6126
|
+
if (c === p) return !0;
|
|
6127
|
+
if (Array.isArray(c) && Array.isArray(p)) {
|
|
6128
|
+
if (c.length !== p.length) return !1;
|
|
6129
|
+
for (let d = 0; d < c.length; d++) if (c[d] !== p[d]) return !1;
|
|
6130
6130
|
return !0;
|
|
6131
6131
|
}
|
|
6132
6132
|
return !1;
|
|
@@ -6159,19 +6159,19 @@ const Vi = no(function({
|
|
|
6159
6159
|
max: l = 100,
|
|
6160
6160
|
step: s = 1,
|
|
6161
6161
|
color: c = "blue",
|
|
6162
|
-
size:
|
|
6163
|
-
disabled:
|
|
6164
|
-
className:
|
|
6165
|
-
showValue:
|
|
6162
|
+
size: p = "medium",
|
|
6163
|
+
disabled: d = !1,
|
|
6164
|
+
className: f = "",
|
|
6165
|
+
showValue: u = !0,
|
|
6166
6166
|
showMarks: g = !1,
|
|
6167
6167
|
marks: v = [],
|
|
6168
|
-
range:
|
|
6168
|
+
range: m = !1,
|
|
6169
6169
|
minDistance: w = 0
|
|
6170
6170
|
}) {
|
|
6171
|
-
const y = n !== void 0, [
|
|
6171
|
+
const y = n !== void 0, [M, j] = K(() => t !== void 0 ? t : m ? [i, l] : i), E = y ? n : M, b = Array.isArray(E) ? E[0] : E, [O, F] = Array.isArray(E) ? E : [E, E], H = St[c] || St.blue, W = vn[p] ?? vn.medium, ee = oe(
|
|
6172
6172
|
(h) => (h - i) / (l - i) * 100,
|
|
6173
6173
|
[i, l]
|
|
6174
|
-
),
|
|
6174
|
+
), Y = ee(b), se = ee(O), U = ee(F), z = oe((h) => Math.max(i, Math.min(l, h)), [i, l]), Z = oe((h) => Math.round(h / s) * s, [s]), N = gi(o), Q = oe(
|
|
6175
6175
|
(h, T = !0) => {
|
|
6176
6176
|
y || j(h), T ? N.schedule(h) : N.flush(h);
|
|
6177
6177
|
},
|
|
@@ -6181,105 +6181,105 @@ const Vi = no(function({
|
|
|
6181
6181
|
h != null && (N.flush(h), r == null || r(h));
|
|
6182
6182
|
}, [N, r]), X = oe(
|
|
6183
6183
|
(h, T) => {
|
|
6184
|
-
if (
|
|
6185
|
-
let [
|
|
6186
|
-
return ce -
|
|
6187
|
-
} else if (!
|
|
6188
|
-
return
|
|
6184
|
+
if (m && Array.isArray(h)) {
|
|
6185
|
+
let [J, ie] = h, ae = Z(z(J)), ce = Z(z(ie));
|
|
6186
|
+
return ce - ae < w && (T === "min" ? ce = z(ae + w) : T === "max" && (ae = z(ce - w))), ae > ce && (T === "min" ? ae = ce : ce = ae), [ae, ce];
|
|
6187
|
+
} else if (!m && typeof h == "number")
|
|
6188
|
+
return Z(z(h));
|
|
6189
6189
|
return h;
|
|
6190
6190
|
},
|
|
6191
|
-
[
|
|
6191
|
+
[m, z, Z, w]
|
|
6192
6192
|
), x = pe(null), C = oe(
|
|
6193
6193
|
(h) => {
|
|
6194
|
-
var
|
|
6195
|
-
const T = (
|
|
6196
|
-
if (!T) return
|
|
6197
|
-
const
|
|
6198
|
-
return i +
|
|
6194
|
+
var ie;
|
|
6195
|
+
const T = (ie = x.current) == null ? void 0 : ie.getBoundingClientRect();
|
|
6196
|
+
if (!T) return m ? i : b;
|
|
6197
|
+
const J = Math.max(0, Math.min(1, (h - T.left) / T.width));
|
|
6198
|
+
return i + J * (l - i);
|
|
6199
6199
|
},
|
|
6200
|
-
[i, l,
|
|
6200
|
+
[i, l, m, b]
|
|
6201
6201
|
), _ = oe(
|
|
6202
6202
|
(h) => {
|
|
6203
|
-
const T = Math.abs(h - O),
|
|
6204
|
-
return T <=
|
|
6203
|
+
const T = Math.abs(h - O), J = Math.abs(h - F);
|
|
6204
|
+
return T <= J ? "min" : "max";
|
|
6205
6205
|
},
|
|
6206
6206
|
[O, F]
|
|
6207
6207
|
), [$, P] = K(null), [D, A] = K(null), [k, R] = K(null), I = oe(
|
|
6208
6208
|
(h, T) => {
|
|
6209
|
-
var
|
|
6210
|
-
if (
|
|
6211
|
-
h.preventDefault(), (
|
|
6212
|
-
const
|
|
6213
|
-
if (
|
|
6214
|
-
const ce = T || _(
|
|
6215
|
-
P(ce),
|
|
6209
|
+
var ie, ae;
|
|
6210
|
+
if (d) return;
|
|
6211
|
+
h.preventDefault(), (ae = (ie = h.currentTarget).setPointerCapture) == null || ae.call(ie, h.pointerId), R(h.pointerId);
|
|
6212
|
+
const J = C(h.clientX);
|
|
6213
|
+
if (m) {
|
|
6214
|
+
const ce = T || _(J);
|
|
6215
|
+
P(ce), Q(ce === "min" ? X([J, F], "min") : X([O, J], "max"));
|
|
6216
6216
|
} else
|
|
6217
|
-
P("single"),
|
|
6217
|
+
P("single"), Q(X(J, "single"));
|
|
6218
6218
|
},
|
|
6219
6219
|
[
|
|
6220
|
-
|
|
6221
|
-
|
|
6220
|
+
d,
|
|
6221
|
+
m,
|
|
6222
6222
|
C,
|
|
6223
6223
|
_,
|
|
6224
6224
|
X,
|
|
6225
6225
|
O,
|
|
6226
6226
|
F,
|
|
6227
|
-
|
|
6227
|
+
Q
|
|
6228
6228
|
]
|
|
6229
6229
|
), V = oe(
|
|
6230
6230
|
(h) => {
|
|
6231
|
-
if (
|
|
6231
|
+
if (d || k == null || $ == null) return;
|
|
6232
6232
|
const T = C(h.clientX);
|
|
6233
|
-
|
|
6233
|
+
m ? $ === "min" ? Q(X([T, F], "min")) : $ === "max" && Q(X([O, T], "max")) : Q(X(T, "single"));
|
|
6234
6234
|
},
|
|
6235
6235
|
[
|
|
6236
|
-
|
|
6236
|
+
d,
|
|
6237
6237
|
k,
|
|
6238
6238
|
$,
|
|
6239
|
-
|
|
6239
|
+
m,
|
|
6240
6240
|
C,
|
|
6241
6241
|
X,
|
|
6242
6242
|
O,
|
|
6243
6243
|
F,
|
|
6244
|
-
|
|
6244
|
+
Q
|
|
6245
6245
|
]
|
|
6246
6246
|
), re = oe(() => {
|
|
6247
6247
|
$ != null && (P(null), R(null), ge());
|
|
6248
6248
|
}, [$, ge]), S = oe(
|
|
6249
6249
|
(h, T) => {
|
|
6250
|
-
if (
|
|
6251
|
-
const
|
|
6252
|
-
let
|
|
6253
|
-
const
|
|
6250
|
+
if (d) return;
|
|
6251
|
+
const J = m ? T === "min" ? O : F : b;
|
|
6252
|
+
let ie = J;
|
|
6253
|
+
const ae = (l - i) / 10;
|
|
6254
6254
|
switch (h.key) {
|
|
6255
6255
|
case "ArrowLeft":
|
|
6256
6256
|
case "ArrowDown":
|
|
6257
|
-
|
|
6257
|
+
ie = J - s;
|
|
6258
6258
|
break;
|
|
6259
6259
|
case "ArrowRight":
|
|
6260
6260
|
case "ArrowUp":
|
|
6261
|
-
|
|
6261
|
+
ie = J + s;
|
|
6262
6262
|
break;
|
|
6263
6263
|
case "PageDown":
|
|
6264
|
-
|
|
6264
|
+
ie = J - ae;
|
|
6265
6265
|
break;
|
|
6266
6266
|
case "PageUp":
|
|
6267
|
-
|
|
6267
|
+
ie = J + ae;
|
|
6268
6268
|
break;
|
|
6269
6269
|
case "Home":
|
|
6270
|
-
|
|
6270
|
+
ie = i;
|
|
6271
6271
|
break;
|
|
6272
6272
|
case "End":
|
|
6273
|
-
|
|
6273
|
+
ie = l;
|
|
6274
6274
|
break;
|
|
6275
6275
|
default:
|
|
6276
6276
|
return;
|
|
6277
6277
|
}
|
|
6278
|
-
h.preventDefault(),
|
|
6278
|
+
h.preventDefault(), Q(m ? T === "min" ? X([ie, F], "min") : X([O, ie], "max") : X(ie, "single"), !1), r == null || r(y ? n : E);
|
|
6279
6279
|
},
|
|
6280
6280
|
[
|
|
6281
|
-
|
|
6282
|
-
|
|
6281
|
+
d,
|
|
6282
|
+
m,
|
|
6283
6283
|
b,
|
|
6284
6284
|
O,
|
|
6285
6285
|
F,
|
|
@@ -6287,11 +6287,11 @@ const Vi = no(function({
|
|
|
6287
6287
|
i,
|
|
6288
6288
|
l,
|
|
6289
6289
|
X,
|
|
6290
|
-
|
|
6290
|
+
Q,
|
|
6291
6291
|
r,
|
|
6292
6292
|
y,
|
|
6293
6293
|
n,
|
|
6294
|
-
|
|
6294
|
+
E
|
|
6295
6295
|
]
|
|
6296
6296
|
);
|
|
6297
6297
|
return de(() => {
|
|
@@ -6300,91 +6300,91 @@ const Vi = no(function({
|
|
|
6300
6300
|
return document.body.style.userSelect = "none", () => {
|
|
6301
6301
|
document.body.style.userSelect = h;
|
|
6302
6302
|
};
|
|
6303
|
-
}, [$]), /* @__PURE__ */ a.jsx("div", { className: `w-full ${
|
|
6304
|
-
|
|
6303
|
+
}, [$]), /* @__PURE__ */ a.jsx("div", { className: `w-full ${f}`, children: /* @__PURE__ */ a.jsxs("div", { className: "relative flex items-center", children: [
|
|
6304
|
+
m && /* @__PURE__ */ a.jsx("div", { className: "mr-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem]", children: /* @__PURE__ */ a.jsx("div", { className: "range-min", children: /* @__PURE__ */ a.jsx("div", { children: O }) }) }),
|
|
6305
6305
|
/* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
6306
6306
|
/* @__PURE__ */ a.jsxs(
|
|
6307
6307
|
"div",
|
|
6308
6308
|
{
|
|
6309
6309
|
ref: x,
|
|
6310
6310
|
className: `
|
|
6311
|
-
relative w-full ${
|
|
6312
|
-
${
|
|
6311
|
+
relative w-full ${W.track} ${H.track} rounded-full
|
|
6312
|
+
${d ? "opacity-60 cursor-not-allowed" : "cursor-pointer"}
|
|
6313
6313
|
`,
|
|
6314
6314
|
onPointerDown: (h) => I(h),
|
|
6315
6315
|
onPointerMove: V,
|
|
6316
6316
|
onPointerUp: re,
|
|
6317
6317
|
onPointerCancel: re,
|
|
6318
6318
|
children: [
|
|
6319
|
-
|
|
6319
|
+
m ? /* @__PURE__ */ a.jsx(
|
|
6320
6320
|
"div",
|
|
6321
6321
|
{
|
|
6322
|
-
className: `absolute top-0 ${
|
|
6322
|
+
className: `absolute top-0 ${W.track} ${H.progress} rounded-full ${$ ? "" : "transition-all duration-150"}`,
|
|
6323
6323
|
style: { left: `${se}%`, width: `${U - se}%` }
|
|
6324
6324
|
}
|
|
6325
6325
|
) : /* @__PURE__ */ a.jsx(
|
|
6326
6326
|
"div",
|
|
6327
6327
|
{
|
|
6328
|
-
className: `absolute top-0 left-0 ${
|
|
6329
|
-
style: { width: `${
|
|
6328
|
+
className: `absolute top-0 left-0 ${W.track} ${H.progress} rounded-full ${$ ? "" : "transition-all duration-150"}`,
|
|
6329
|
+
style: { width: `${Y}%` }
|
|
6330
6330
|
}
|
|
6331
6331
|
),
|
|
6332
6332
|
g && v.map((h, T) => {
|
|
6333
|
-
const
|
|
6333
|
+
const J = ee(h.value);
|
|
6334
6334
|
return /* @__PURE__ */ a.jsx(
|
|
6335
6335
|
"div",
|
|
6336
6336
|
{
|
|
6337
6337
|
className: "absolute top-1/2 transform -translate-y-1/2 w-1 h-1 bg-gray-400 rounded-full",
|
|
6338
|
-
style: { left: `${
|
|
6338
|
+
style: { left: `${J}%` }
|
|
6339
6339
|
},
|
|
6340
6340
|
T
|
|
6341
6341
|
);
|
|
6342
6342
|
}),
|
|
6343
|
-
!
|
|
6343
|
+
!m && /* @__PURE__ */ a.jsx(
|
|
6344
6344
|
"div",
|
|
6345
6345
|
{
|
|
6346
6346
|
className: `
|
|
6347
6347
|
absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2
|
|
6348
|
-
${
|
|
6349
|
-
rounded-full border-2 ${
|
|
6348
|
+
${W.thumb} ${H.thumb} ${H.thumbHover} ${H.thumbActive}
|
|
6349
|
+
rounded-full border-2 ${d ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6350
6350
|
${$ === "single" ? "cursor-grabbing scale-110" : $ ? "" : "transition-all duration-150"}
|
|
6351
6351
|
${D === "single" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
|
|
6352
6352
|
shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
|
|
6353
6353
|
`,
|
|
6354
|
-
style: { left: `${
|
|
6355
|
-
tabIndex:
|
|
6354
|
+
style: { left: `${Y}%` },
|
|
6355
|
+
tabIndex: d ? -1 : 0,
|
|
6356
6356
|
role: "slider",
|
|
6357
6357
|
"aria-orientation": "horizontal",
|
|
6358
6358
|
"aria-valuemin": i,
|
|
6359
6359
|
"aria-valuemax": l,
|
|
6360
6360
|
"aria-valuenow": b,
|
|
6361
|
-
"aria-disabled":
|
|
6361
|
+
"aria-disabled": d,
|
|
6362
6362
|
onKeyDown: (h) => S(h, "single"),
|
|
6363
6363
|
onFocus: () => A("single"),
|
|
6364
6364
|
onBlur: () => A(null),
|
|
6365
6365
|
onPointerDown: (h) => I(h, "single")
|
|
6366
6366
|
}
|
|
6367
6367
|
),
|
|
6368
|
-
|
|
6368
|
+
m && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6369
6369
|
/* @__PURE__ */ a.jsx(
|
|
6370
6370
|
"div",
|
|
6371
6371
|
{
|
|
6372
6372
|
className: `
|
|
6373
6373
|
absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2 z-10
|
|
6374
|
-
${
|
|
6375
|
-
rounded-full border-2 ${
|
|
6374
|
+
${W.thumb} ${H.thumb} ${H.thumbHover} ${H.thumbActive}
|
|
6375
|
+
rounded-full border-2 ${d ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6376
6376
|
${$ === "min" ? "cursor-grabbing scale-110 z-20" : $ ? "" : "transition-all duration-150"}
|
|
6377
6377
|
${D === "min" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
|
|
6378
6378
|
shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
|
|
6379
6379
|
`,
|
|
6380
6380
|
style: { left: `${se}%` },
|
|
6381
|
-
tabIndex:
|
|
6381
|
+
tabIndex: d ? -1 : 0,
|
|
6382
6382
|
role: "slider",
|
|
6383
6383
|
"aria-orientation": "horizontal",
|
|
6384
6384
|
"aria-valuemin": i,
|
|
6385
6385
|
"aria-valuemax": l,
|
|
6386
6386
|
"aria-valuenow": O,
|
|
6387
|
-
"aria-disabled":
|
|
6387
|
+
"aria-disabled": d,
|
|
6388
6388
|
"aria-label": "Minimum value",
|
|
6389
6389
|
onKeyDown: (h) => S(h, "min"),
|
|
6390
6390
|
onFocus: () => A("min"),
|
|
@@ -6397,20 +6397,20 @@ const Vi = no(function({
|
|
|
6397
6397
|
{
|
|
6398
6398
|
className: `
|
|
6399
6399
|
absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2 z-10
|
|
6400
|
-
${
|
|
6401
|
-
rounded-full border-2 ${
|
|
6400
|
+
${W.thumb} ${H.thumb} ${H.thumbHover} ${H.thumbActive}
|
|
6401
|
+
rounded-full border-2 ${d ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6402
6402
|
${$ === "max" ? "cursor-grabbing scale-110 z-20" : $ ? "" : "transition-all duration-150"}
|
|
6403
6403
|
${D === "max" ? "ring-2 ring-offset-1 ring-blue-300" : ""}
|
|
6404
6404
|
shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
|
|
6405
6405
|
`,
|
|
6406
6406
|
style: { left: `${U}%` },
|
|
6407
|
-
tabIndex:
|
|
6407
|
+
tabIndex: d ? -1 : 0,
|
|
6408
6408
|
role: "slider",
|
|
6409
6409
|
"aria-orientation": "horizontal",
|
|
6410
6410
|
"aria-valuemin": i,
|
|
6411
6411
|
"aria-valuemax": l,
|
|
6412
6412
|
"aria-valuenow": F,
|
|
6413
|
-
"aria-disabled":
|
|
6413
|
+
"aria-disabled": d,
|
|
6414
6414
|
"aria-label": "Maximum value",
|
|
6415
6415
|
onKeyDown: (h) => S(h, "max"),
|
|
6416
6416
|
onFocus: () => A("max"),
|
|
@@ -6427,12 +6427,12 @@ const Vi = no(function({
|
|
|
6427
6427
|
{
|
|
6428
6428
|
className: "relative mt-2 text-xs text-color-gray-500 dark:text-color-gray-200",
|
|
6429
6429
|
children: v.map((h, T) => {
|
|
6430
|
-
const
|
|
6430
|
+
const J = ee(h.value);
|
|
6431
6431
|
return /* @__PURE__ */ a.jsx(
|
|
6432
6432
|
"div",
|
|
6433
6433
|
{
|
|
6434
6434
|
className: "absolute transform -translate-x-1/2 text-xs",
|
|
6435
|
-
style: { left: `${
|
|
6435
|
+
style: { left: `${J}%` },
|
|
6436
6436
|
children: h.label || h.value
|
|
6437
6437
|
},
|
|
6438
6438
|
T
|
|
@@ -6441,7 +6441,7 @@ const Vi = no(function({
|
|
|
6441
6441
|
}
|
|
6442
6442
|
)
|
|
6443
6443
|
] }),
|
|
6444
|
-
|
|
6444
|
+
u && /* @__PURE__ */ a.jsx("div", { className: "ml-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem] text-right", children: m ? /* @__PURE__ */ a.jsx("div", { className: "range-max", children: /* @__PURE__ */ a.jsx("div", { children: F }) }) : /* @__PURE__ */ a.jsx("span", { children: b }) })
|
|
6445
6445
|
] }) });
|
|
6446
6446
|
}), Hi = ({
|
|
6447
6447
|
open: e = !1,
|
|
@@ -6453,26 +6453,26 @@ const Vi = no(function({
|
|
|
6453
6453
|
action: l,
|
|
6454
6454
|
className: s = ""
|
|
6455
6455
|
}) => {
|
|
6456
|
-
var
|
|
6456
|
+
var f;
|
|
6457
6457
|
de(() => {
|
|
6458
6458
|
if (e && t > 0 && i) {
|
|
6459
|
-
const
|
|
6459
|
+
const u = setTimeout(() => {
|
|
6460
6460
|
i();
|
|
6461
6461
|
}, t);
|
|
6462
|
-
return () => clearTimeout(
|
|
6462
|
+
return () => clearTimeout(u);
|
|
6463
6463
|
}
|
|
6464
6464
|
}, [e, t, i]), de(() => {
|
|
6465
|
-
const
|
|
6465
|
+
const u = (g) => {
|
|
6466
6466
|
g.key === "Escape" && e && i && i();
|
|
6467
6467
|
};
|
|
6468
6468
|
if (e)
|
|
6469
|
-
return document.addEventListener("keydown",
|
|
6469
|
+
return document.addEventListener("keydown", u), () => document.removeEventListener("keydown", u);
|
|
6470
6470
|
}, [e, i]);
|
|
6471
6471
|
const c = oe(() => {
|
|
6472
6472
|
i && i();
|
|
6473
|
-
}, [i]),
|
|
6473
|
+
}, [i]), p = (u) => {
|
|
6474
6474
|
const g = "fixed z-50 transform transition-all duration-300 ease-in-out";
|
|
6475
|
-
switch (
|
|
6475
|
+
switch (u) {
|
|
6476
6476
|
case "top-center":
|
|
6477
6477
|
return `${g} top-4 left-1/2 -translate-x-1/2 ${e ? "translate-y-0 opacity-100" : "-translate-y-full opacity-0"}`;
|
|
6478
6478
|
case "top-left":
|
|
@@ -6487,7 +6487,7 @@ const Vi = no(function({
|
|
|
6487
6487
|
default:
|
|
6488
6488
|
return `${g} bottom-4 left-1/2 -translate-x-1/2 ${e ? "translate-y-0 opacity-100" : "translate-y-full opacity-0"}`;
|
|
6489
6489
|
}
|
|
6490
|
-
},
|
|
6490
|
+
}, d = (f = xe[r]) == null ? void 0 : f.filled;
|
|
6491
6491
|
return e ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6492
6492
|
e && /* @__PURE__ */ a.jsx(
|
|
6493
6493
|
"div",
|
|
@@ -6500,7 +6500,7 @@ const Vi = no(function({
|
|
|
6500
6500
|
"div",
|
|
6501
6501
|
{
|
|
6502
6502
|
className: `min-w-72 max-w-lg mx-4 px-4 py-2 rounded-lg shadow-xl flex items-center justify-between gap-3 backdrop-blur-sm border border-color-white/20
|
|
6503
|
-
${
|
|
6503
|
+
${p(o)} ${d} ${s}`,
|
|
6504
6504
|
role: "alert",
|
|
6505
6505
|
"aria-live": "assertive",
|
|
6506
6506
|
"aria-atomic": "true",
|
|
@@ -6533,15 +6533,15 @@ const Vi = no(function({
|
|
|
6533
6533
|
className: r = "",
|
|
6534
6534
|
...i
|
|
6535
6535
|
}) => {
|
|
6536
|
-
var
|
|
6537
|
-
const l = (
|
|
6536
|
+
var d, f;
|
|
6537
|
+
const l = (d = xe[t]) == null ? void 0 : d.outline, s = (f = xe[t]) == null ? void 0 : f.filled, c = Math.min(Math.max(n, 0), 100);
|
|
6538
6538
|
if (e === "circular") {
|
|
6539
|
-
const { size:
|
|
6539
|
+
const { size: u = 40, thickness: g = 4 } = i, v = o ? c / 100 * 360 : 270;
|
|
6540
6540
|
return /* @__PURE__ */ a.jsxs(
|
|
6541
6541
|
"div",
|
|
6542
6542
|
{
|
|
6543
6543
|
className: `relative inline-block ${r}`,
|
|
6544
|
-
style: { width:
|
|
6544
|
+
style: { width: u, height: u },
|
|
6545
6545
|
role: "progressbar",
|
|
6546
6546
|
"aria-valuenow": o ? c : void 0,
|
|
6547
6547
|
"aria-valuemin": 0,
|
|
@@ -6553,8 +6553,8 @@ const Vi = no(function({
|
|
|
6553
6553
|
className: "absolute inset-0 rounded-full border-4 border-color-gray-200 dark:border-color-gray-700",
|
|
6554
6554
|
style: {
|
|
6555
6555
|
borderWidth: g,
|
|
6556
|
-
width:
|
|
6557
|
-
height:
|
|
6556
|
+
width: u,
|
|
6557
|
+
height: u,
|
|
6558
6558
|
boxSizing: "border-box"
|
|
6559
6559
|
}
|
|
6560
6560
|
}
|
|
@@ -6564,8 +6564,8 @@ const Vi = no(function({
|
|
|
6564
6564
|
{
|
|
6565
6565
|
className: `absolute inset-0 rounded-full ${l} ${o ? "" : "animate-circular-indeterminate"}`,
|
|
6566
6566
|
style: {
|
|
6567
|
-
width:
|
|
6568
|
-
height:
|
|
6567
|
+
width: u,
|
|
6568
|
+
height: u,
|
|
6569
6569
|
borderWidth: g,
|
|
6570
6570
|
borderStyle: "solid",
|
|
6571
6571
|
transform: "rotate(-90deg)",
|
|
@@ -6582,7 +6582,7 @@ const Vi = no(function({
|
|
|
6582
6582
|
}
|
|
6583
6583
|
);
|
|
6584
6584
|
}
|
|
6585
|
-
const { thickness:
|
|
6585
|
+
const { thickness: p = 4 } = i;
|
|
6586
6586
|
return /* @__PURE__ */ a.jsx(
|
|
6587
6587
|
"div",
|
|
6588
6588
|
{
|
|
@@ -6595,7 +6595,7 @@ const Vi = no(function({
|
|
|
6595
6595
|
"div",
|
|
6596
6596
|
{
|
|
6597
6597
|
className: "w-full bg-color-gray-200 dark:bg-color-gray-700 rounded-full overflow-hidden relative",
|
|
6598
|
-
style: { height: `${
|
|
6598
|
+
style: { height: `${p}px` },
|
|
6599
6599
|
children: o ? /* @__PURE__ */ a.jsx(
|
|
6600
6600
|
"div",
|
|
6601
6601
|
{
|
|
@@ -6627,25 +6627,25 @@ const Vi = no(function({
|
|
|
6627
6627
|
size: l = "medium",
|
|
6628
6628
|
icon: s,
|
|
6629
6629
|
emptyIcon: c,
|
|
6630
|
-
className:
|
|
6631
|
-
showHoverValue:
|
|
6632
|
-
showValue:
|
|
6633
|
-
labels:
|
|
6630
|
+
className: p = "",
|
|
6631
|
+
showHoverValue: d = !1,
|
|
6632
|
+
showValue: f = !1,
|
|
6633
|
+
labels: u = {}
|
|
6634
6634
|
// <-- Add this
|
|
6635
6635
|
}) => {
|
|
6636
|
-
const [g, v] = Ce.useState(null),
|
|
6636
|
+
const [g, v] = Ce.useState(null), m = (j, E) => {
|
|
6637
6637
|
if (t || o || !n) return;
|
|
6638
6638
|
const { left: b, width: O } = j.target.getBoundingClientRect(), F = (j.clientX - b) / O;
|
|
6639
|
-
let H =
|
|
6639
|
+
let H = E - 1 + Math.ceil(F / r) * r;
|
|
6640
6640
|
H = Math.min(i, Math.max(r, Math.round(H / r) * r)), n(H);
|
|
6641
|
-
}, w = (j,
|
|
6641
|
+
}, w = (j, E) => {
|
|
6642
6642
|
if (t || o) return;
|
|
6643
6643
|
const { left: b, width: O } = j.target.getBoundingClientRect(), F = (j.clientX - b) / O;
|
|
6644
|
-
let H =
|
|
6644
|
+
let H = E - 1 + Math.ceil(F / r) * r;
|
|
6645
6645
|
H = Math.min(i, Math.max(r, Math.round(H / r) * r)), v(H);
|
|
6646
|
-
}, y = () => v(null),
|
|
6646
|
+
}, y = () => v(null), M = [];
|
|
6647
6647
|
for (let j = 1; j <= i; j++) {
|
|
6648
|
-
let
|
|
6648
|
+
let E = (g !== null ? g : e) >= j, b = !E && (g !== null ? g : e) > j - 1, O = E ? s || Ce.cloneElement(hn, { className: `fill-color-yellow-500 ${Xe[l]}` }) : c || Ce.cloneElement(bn, { className: `stroke-color-gray-300 ${Xe[l]}` });
|
|
6649
6649
|
if (b) {
|
|
6650
6650
|
const F = ((g !== null ? g : e) - (j - 1)) * 100;
|
|
6651
6651
|
O = /* @__PURE__ */ a.jsxs("span", { className: "relative block", children: [
|
|
@@ -6664,12 +6664,12 @@ const Vi = no(function({
|
|
|
6664
6664
|
})
|
|
6665
6665
|
] });
|
|
6666
6666
|
}
|
|
6667
|
-
|
|
6667
|
+
M.push(
|
|
6668
6668
|
/* @__PURE__ */ a.jsx(
|
|
6669
6669
|
"span",
|
|
6670
6670
|
{
|
|
6671
6671
|
className: `inline-block ${o ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
6672
|
-
onClick: (F) =>
|
|
6672
|
+
onClick: (F) => m(F, j),
|
|
6673
6673
|
onMouseMove: (F) => w(F, j),
|
|
6674
6674
|
onMouseLeave: y,
|
|
6675
6675
|
tabIndex: t || o ? -1 : 0,
|
|
@@ -6682,9 +6682,9 @@ const Vi = no(function({
|
|
|
6682
6682
|
)
|
|
6683
6683
|
);
|
|
6684
6684
|
}
|
|
6685
|
-
return /* @__PURE__ */ a.jsxs("div", { className: `flex items-center gap-1 ${
|
|
6686
|
-
|
|
6687
|
-
|
|
6685
|
+
return /* @__PURE__ */ a.jsxs("div", { className: `flex items-center gap-1 ${p}`, role: "radiogroup", "aria-disabled": o, children: [
|
|
6686
|
+
M,
|
|
6687
|
+
d && g !== null ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs", children: u[g] || g }) : f ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs", children: u[e] || e }) : null
|
|
6688
6688
|
] });
|
|
6689
6689
|
}, Gi = ({
|
|
6690
6690
|
children: e,
|
|
@@ -6696,26 +6696,26 @@ const Vi = no(function({
|
|
|
6696
6696
|
interval: l = 3e3,
|
|
6697
6697
|
infiniteLoop: s = !1,
|
|
6698
6698
|
perview: c = 1,
|
|
6699
|
-
gap:
|
|
6700
|
-
onClickItem:
|
|
6701
|
-
showThumbs:
|
|
6702
|
-
pauseOnHover:
|
|
6699
|
+
gap: p = 0,
|
|
6700
|
+
onClickItem: d,
|
|
6701
|
+
showThumbs: f = !1,
|
|
6702
|
+
pauseOnHover: u = !1,
|
|
6703
6703
|
swipeable: g = !0,
|
|
6704
6704
|
thumbWidth: v = 60,
|
|
6705
|
-
orientation:
|
|
6705
|
+
orientation: m = "horizontal",
|
|
6706
6706
|
nextIcon: w,
|
|
6707
6707
|
prevIcon: y,
|
|
6708
|
-
className:
|
|
6708
|
+
className: M
|
|
6709
6709
|
}) => {
|
|
6710
|
-
const j = e.length,
|
|
6711
|
-
s && N > 0 ? (k % (N + 1) + (N + 1)) % (N + 1) :
|
|
6710
|
+
const j = e.length, E = Math.min(Math.max(c, 0.1), j), [b, O] = K(0), [F, H] = K(!1), [W, ee] = K(!1), [Y, se] = K(0), U = pe(null), z = pe(0), Z = pe(0), N = E >= j ? 0 : Math.max(0, j - E), Q = (k) => Math.max(0, Math.min(k, N)), ge = (k) => O(
|
|
6711
|
+
s && N > 0 ? (k % (N + 1) + (N + 1)) % (N + 1) : Q(k)
|
|
6712
6712
|
), X = () => {
|
|
6713
6713
|
s && N > 0 ? O(b === 0 ? N : b - 1) : ge(b - 1);
|
|
6714
6714
|
}, x = () => {
|
|
6715
6715
|
s && N > 0 ? O(b >= N ? 0 : b + 1) : ge(b + 1);
|
|
6716
6716
|
};
|
|
6717
6717
|
de(() => {
|
|
6718
|
-
if (!i ||
|
|
6718
|
+
if (!i || u && F || W || N === 0)
|
|
6719
6719
|
return;
|
|
6720
6720
|
const k = setInterval(() => {
|
|
6721
6721
|
O((R) => {
|
|
@@ -6728,43 +6728,43 @@ const Vi = no(function({
|
|
|
6728
6728
|
i,
|
|
6729
6729
|
l,
|
|
6730
6730
|
F,
|
|
6731
|
-
|
|
6732
|
-
|
|
6731
|
+
u,
|
|
6732
|
+
W,
|
|
6733
6733
|
N,
|
|
6734
6734
|
s
|
|
6735
6735
|
]);
|
|
6736
6736
|
const C = (k, R) => {
|
|
6737
|
-
!g || N === 0 || (ee(!0), z.current =
|
|
6737
|
+
!g || N === 0 || (ee(!0), z.current = m === "horizontal" ? k : R, Z.current = z.current);
|
|
6738
6738
|
}, _ = (k, R) => {
|
|
6739
|
-
|
|
6739
|
+
W && (Z.current = m === "horizontal" ? k : R, se(Z.current - z.current));
|
|
6740
6740
|
}, $ = () => {
|
|
6741
|
-
if (!
|
|
6742
|
-
Math.abs(
|
|
6741
|
+
if (!W) return;
|
|
6742
|
+
Math.abs(Z.current - z.current) > 50 && (Z.current < z.current ? x() : X()), ee(!1), se(0);
|
|
6743
6743
|
}, P = () => {
|
|
6744
|
-
const k =
|
|
6744
|
+
const k = m === "horizontal" ? "X" : "Y";
|
|
6745
6745
|
let R = 0;
|
|
6746
|
-
if (
|
|
6747
|
-
const T =
|
|
6748
|
-
R =
|
|
6746
|
+
if (W && U.current && N > 0) {
|
|
6747
|
+
const T = m === "horizontal" ? U.current.offsetWidth : U.current.offsetHeight;
|
|
6748
|
+
R = Y / T * 100 * (E / j);
|
|
6749
6749
|
}
|
|
6750
|
-
const V = Math.min(b, N) * (100 / j) - R, re = b >= N, h = b <= 0 ? 0 : re ?
|
|
6750
|
+
const V = Math.min(b, N) * (100 / j) - R, re = b >= N, h = b <= 0 ? 0 : re ? p / (c / 2) : p / c;
|
|
6751
6751
|
return `translate${k}(calc(-${V}% - ${h}px))`;
|
|
6752
|
-
}, D = () =>
|
|
6752
|
+
}, D = () => E >= j ? 1 : Math.floor(N) + 1, A = () => N === 0 ? 0 : Math.round(b / N * (D() - 1));
|
|
6753
6753
|
return /* @__PURE__ */ a.jsxs(
|
|
6754
6754
|
"div",
|
|
6755
6755
|
{
|
|
6756
|
-
className: `relative flex flex-col items-center select-none ${
|
|
6756
|
+
className: `relative flex flex-col items-center select-none ${M}`,
|
|
6757
6757
|
style: { width: n, height: t },
|
|
6758
|
-
onMouseEnter: () =>
|
|
6759
|
-
onMouseLeave: () =>
|
|
6758
|
+
onMouseEnter: () => u && H(!0),
|
|
6759
|
+
onMouseLeave: () => u && H(!1),
|
|
6760
6760
|
children: [
|
|
6761
6761
|
/* @__PURE__ */ a.jsxs(
|
|
6762
6762
|
"div",
|
|
6763
6763
|
{
|
|
6764
6764
|
ref: U,
|
|
6765
|
-
className: `w-full overflow-hidden relative ${g && N > 0 ?
|
|
6765
|
+
className: `w-full overflow-hidden relative ${g && N > 0 ? W ? "cursor-grabbing" : "cursor-grab" : "cursor-default"}`,
|
|
6766
6766
|
style: {
|
|
6767
|
-
height:
|
|
6767
|
+
height: f ? `calc(${t} - ${v + 20}px)` : t
|
|
6768
6768
|
},
|
|
6769
6769
|
onMouseDown: (k) => {
|
|
6770
6770
|
k.preventDefault(), C(k.clientX, k.clientY);
|
|
@@ -6779,23 +6779,23 @@ const Vi = no(function({
|
|
|
6779
6779
|
/* @__PURE__ */ a.jsx(
|
|
6780
6780
|
"div",
|
|
6781
6781
|
{
|
|
6782
|
-
className: `flex ${
|
|
6782
|
+
className: `flex ${m === "horizontal" ? "flex-row" : "flex-col"} transition-transform duration-300 ease-in-out`,
|
|
6783
6783
|
style: {
|
|
6784
|
-
width:
|
|
6785
|
-
height:
|
|
6784
|
+
width: m === "horizontal" ? `${j * 100 / E}%` : "100%",
|
|
6785
|
+
height: m === "vertical" ? `${j * 100 / E}%` : "100%",
|
|
6786
6786
|
transform: P(),
|
|
6787
|
-
gap: `${
|
|
6788
|
-
transitionProperty:
|
|
6787
|
+
gap: `${p}px`,
|
|
6788
|
+
transitionProperty: W ? "none" : "transform"
|
|
6789
6789
|
},
|
|
6790
6790
|
children: e.map((k, R) => /* @__PURE__ */ a.jsx(
|
|
6791
6791
|
"div",
|
|
6792
6792
|
{
|
|
6793
6793
|
className: "shrink-0 flex items-center justify-center",
|
|
6794
6794
|
style: {
|
|
6795
|
-
width:
|
|
6796
|
-
height:
|
|
6795
|
+
width: m === "horizontal" ? `calc(${100 / j}% - ${p / c}px)` : "100%",
|
|
6796
|
+
height: m === "vertical" ? `calc(${100 / j}% - ${p * (j - 1) / j}px)` : "100%"
|
|
6797
6797
|
},
|
|
6798
|
-
onClick: () => !
|
|
6798
|
+
onClick: () => !W && (d == null ? void 0 : d(R)),
|
|
6799
6799
|
children: k
|
|
6800
6800
|
},
|
|
6801
6801
|
R
|
|
@@ -6809,8 +6809,8 @@ const Vi = no(function({
|
|
|
6809
6809
|
"aria-label": "prev",
|
|
6810
6810
|
onClick: X,
|
|
6811
6811
|
className: `absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-10 h-10 flex items-center justify-center text-lg font-bold text-color-gray-800 hover:bg-color-white transition-color cursor-pointer
|
|
6812
|
-
${
|
|
6813
|
-
children: y || (
|
|
6812
|
+
${m === "horizontal" ? "left-2 top-1/2 -translate-y-1/2" : "left-1/2 top-2 -translate-x-1/2"}`,
|
|
6813
|
+
children: y || (m === "horizontal" ? "‹" : "↑")
|
|
6814
6814
|
}
|
|
6815
6815
|
),
|
|
6816
6816
|
/* @__PURE__ */ a.jsx(
|
|
@@ -6819,15 +6819,15 @@ const Vi = no(function({
|
|
|
6819
6819
|
"aria-label": "next",
|
|
6820
6820
|
onClick: x,
|
|
6821
6821
|
className: `absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-10 h-10 flex items-center justify-center text-lg font-bold text-color-gray-800 hover:bg-color-white transition-colo cursor-pointer
|
|
6822
|
-
${
|
|
6823
|
-
children: w || (
|
|
6822
|
+
${m === "horizontal" ? "right-2 top-1/2 -translate-y-1/2" : "left-1/2 bottom-2 -translate-x-1/2"}`,
|
|
6823
|
+
children: w || (m === "horizontal" ? "›" : "↓")
|
|
6824
6824
|
}
|
|
6825
6825
|
)
|
|
6826
6826
|
] }),
|
|
6827
6827
|
o && D() > 1 && /* @__PURE__ */ a.jsx(
|
|
6828
6828
|
"div",
|
|
6829
6829
|
{
|
|
6830
|
-
className: `flex gap-1 mt-3 justify-center absolute bg-color-white/90 py-1 px-[5px] rounded-full ${
|
|
6830
|
+
className: `flex gap-1 mt-3 justify-center absolute bg-color-white/90 py-1 px-[5px] rounded-full ${m === "horizontal" ? "bottom-3 left-1/2 -translate-x-1/2" : "top-1/2 right-3 -translate-y-1/2 rotate-90"} z-10`,
|
|
6831
6831
|
children: Array.from({ length: D() }).map(
|
|
6832
6832
|
(k, R) => /* @__PURE__ */ a.jsx(
|
|
6833
6833
|
"button",
|
|
@@ -6847,7 +6847,7 @@ const Vi = no(function({
|
|
|
6847
6847
|
]
|
|
6848
6848
|
}
|
|
6849
6849
|
),
|
|
6850
|
-
|
|
6850
|
+
f && /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 mt-3 justify-center flex-wrap", children: e.map((k, R) => {
|
|
6851
6851
|
const I = R === Math.round(b);
|
|
6852
6852
|
return /* @__PURE__ */ a.jsx(
|
|
6853
6853
|
"div",
|
|
@@ -6857,7 +6857,7 @@ const Vi = no(function({
|
|
|
6857
6857
|
0,
|
|
6858
6858
|
Math.min(
|
|
6859
6859
|
N,
|
|
6860
|
-
R - Math.floor(
|
|
6860
|
+
R - Math.floor(E / 2)
|
|
6861
6861
|
)
|
|
6862
6862
|
);
|
|
6863
6863
|
ge(V);
|
|
@@ -6875,7 +6875,7 @@ const Vi = no(function({
|
|
|
6875
6875
|
]
|
|
6876
6876
|
}
|
|
6877
6877
|
);
|
|
6878
|
-
},
|
|
6878
|
+
}, Yi = ({
|
|
6879
6879
|
title: e,
|
|
6880
6880
|
description: n,
|
|
6881
6881
|
actionLabel: t,
|
|
@@ -6885,7 +6885,7 @@ const Vi = no(function({
|
|
|
6885
6885
|
children: l,
|
|
6886
6886
|
color: s = "gray",
|
|
6887
6887
|
titleClass: c = "",
|
|
6888
|
-
descriptionClass:
|
|
6888
|
+
descriptionClass: p = ""
|
|
6889
6889
|
}) => /* @__PURE__ */ a.jsxs(
|
|
6890
6890
|
"section",
|
|
6891
6891
|
{
|
|
@@ -6905,12 +6905,12 @@ const Vi = no(function({
|
|
|
6905
6905
|
}
|
|
6906
6906
|
),
|
|
6907
6907
|
/* @__PURE__ */ a.jsx("h2", { className: `text-lg mt-4 font-semibold text-color-gray-800 ${c}`, children: e }),
|
|
6908
|
-
n && /* @__PURE__ */ a.jsx("p", { className: `text-sm mt-2 text-color-gray-600 ${
|
|
6908
|
+
n && /* @__PURE__ */ a.jsx("p", { className: `text-sm mt-2 text-color-gray-600 ${p}`, children: n }),
|
|
6909
6909
|
t && o && /* @__PURE__ */ a.jsx($t, { onClick: o, color: s, className: "mt-4", children: t }),
|
|
6910
6910
|
l
|
|
6911
6911
|
]
|
|
6912
6912
|
}
|
|
6913
|
-
),
|
|
6913
|
+
), Zi = ({
|
|
6914
6914
|
initialState: e = !1,
|
|
6915
6915
|
onToggle: n,
|
|
6916
6916
|
disabled: t = !1,
|
|
@@ -6919,17 +6919,17 @@ const Vi = no(function({
|
|
|
6919
6919
|
variant: i = "ios"
|
|
6920
6920
|
// <-- default to ios
|
|
6921
6921
|
}) => {
|
|
6922
|
-
var
|
|
6923
|
-
const [l, s] = K(e), [c,
|
|
6922
|
+
var f, u, g;
|
|
6923
|
+
const [l, s] = K(e), [c, p] = K(!1), d = async () => {
|
|
6924
6924
|
if (!(t || c))
|
|
6925
6925
|
if (n) {
|
|
6926
|
-
|
|
6926
|
+
p(!0);
|
|
6927
6927
|
try {
|
|
6928
6928
|
await n(!l), s(!l);
|
|
6929
6929
|
} catch (v) {
|
|
6930
6930
|
console.error("Toggle failed", v);
|
|
6931
6931
|
} finally {
|
|
6932
|
-
|
|
6932
|
+
p(!1);
|
|
6933
6933
|
}
|
|
6934
6934
|
} else
|
|
6935
6935
|
s(!l);
|
|
@@ -6937,17 +6937,17 @@ const Vi = no(function({
|
|
|
6937
6937
|
return i === "android" ? /* @__PURE__ */ a.jsxs(
|
|
6938
6938
|
"button",
|
|
6939
6939
|
{
|
|
6940
|
-
onClick:
|
|
6940
|
+
onClick: d,
|
|
6941
6941
|
type: o,
|
|
6942
6942
|
disabled: t,
|
|
6943
6943
|
className: `relative w-10 h-3 flex items-center transition-color duration-300
|
|
6944
6944
|
} ${t ? "bg-color-gray-200 opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
6945
6945
|
children: [
|
|
6946
|
-
/* @__PURE__ */ a.jsx("span", { className: `absolute rounded-full inset-0 opacity-50 ${l ? `${(
|
|
6946
|
+
/* @__PURE__ */ a.jsx("span", { className: `absolute rounded-full inset-0 opacity-50 ${l ? `${(f = xe[r]) == null ? void 0 : f.filled}` : "bg-color-gray-400"}` }),
|
|
6947
6947
|
/* @__PURE__ */ a.jsx(
|
|
6948
6948
|
"div",
|
|
6949
6949
|
{
|
|
6950
|
-
className: `flex justify-center items-center absolute shadow-md top-0.5 left-0.5 size-5 rounded-full shadow transition-all duration-300 ${l ? `translate-x-5 ${(
|
|
6950
|
+
className: `flex justify-center items-center absolute shadow-md top-0.5 left-0.5 size-5 rounded-full shadow transition-all duration-300 ${l ? `translate-x-5 ${(u = xe[r]) == null ? void 0 : u.filled}` : "translate-x-0 bg-color-white"}`,
|
|
6951
6951
|
children: c ? /* @__PURE__ */ a.jsx("svg", { className: "animate-spin text-color-gray-500 size-3", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z" }) }) : null
|
|
6952
6952
|
}
|
|
6953
6953
|
)
|
|
@@ -6956,7 +6956,7 @@ const Vi = no(function({
|
|
|
6956
6956
|
) : /* @__PURE__ */ a.jsx(
|
|
6957
6957
|
"button",
|
|
6958
6958
|
{
|
|
6959
|
-
onClick:
|
|
6959
|
+
onClick: d,
|
|
6960
6960
|
type: o,
|
|
6961
6961
|
disabled: t,
|
|
6962
6962
|
className: `relative w-11 h-6 flex items-center rounded-full transition-color duration-300 ${l ? (g = xe[r]) == null ? void 0 : g.filled : "bg-color-gray-300"} ${t ? "bg-color-gray-300 opacity-50 cursor-not-allowed" : "cursor-pointer"}`,
|
|
@@ -6983,44 +6983,44 @@ const Vi = no(function({
|
|
|
6983
6983
|
orientation: l = "horizontal",
|
|
6984
6984
|
className: s = "",
|
|
6985
6985
|
buttonClass: c = "",
|
|
6986
|
-
disabled:
|
|
6986
|
+
disabled: p = !1
|
|
6987
6987
|
}) => {
|
|
6988
|
-
const
|
|
6989
|
-
if (!
|
|
6988
|
+
const d = (u) => Array.isArray(e) ? e.includes(u) : e === u, f = (u) => {
|
|
6989
|
+
if (!p)
|
|
6990
6990
|
if (o) {
|
|
6991
6991
|
if (!Array.isArray(e)) return;
|
|
6992
|
-
e.includes(
|
|
6992
|
+
e.includes(u) ? n(e.filter((g) => g !== u)) : n([...e, u]);
|
|
6993
6993
|
} else
|
|
6994
|
-
n(
|
|
6994
|
+
n(u);
|
|
6995
6995
|
};
|
|
6996
6996
|
return /* @__PURE__ */ a.jsx(
|
|
6997
6997
|
"div",
|
|
6998
6998
|
{
|
|
6999
6999
|
className: `inline-flex ${l === "vertical" ? "flex-col" : "flex-row"} rounded-md overflow-hidden border border-color-gray-200 bg-color-white ${s}`,
|
|
7000
7000
|
role: "group",
|
|
7001
|
-
"aria-disabled":
|
|
7002
|
-
children: t.map((
|
|
7001
|
+
"aria-disabled": p,
|
|
7002
|
+
children: t.map((u, g) => {
|
|
7003
7003
|
var v;
|
|
7004
7004
|
return /* @__PURE__ */ a.jsxs(
|
|
7005
7005
|
"button",
|
|
7006
7006
|
{
|
|
7007
7007
|
type: "button",
|
|
7008
|
-
disabled:
|
|
7008
|
+
disabled: p || u.disabled,
|
|
7009
7009
|
className: `
|
|
7010
7010
|
flex items-center justify-center gap-2 border-0 ${l === "vertical" ? "not-last:border-b-1" : "not-last:border-r-1"} border-color-gray-200
|
|
7011
7011
|
${fi[r]}
|
|
7012
|
-
${
|
|
7013
|
-
${
|
|
7012
|
+
${d(u.value) ? ((v = xe[i]) == null ? void 0 : v.filled) || i : "bg-color-transparent text-color-gray-700"}
|
|
7013
|
+
${p || u.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
7014
7014
|
${c}
|
|
7015
7015
|
`,
|
|
7016
|
-
"aria-pressed":
|
|
7017
|
-
onClick: () => !(
|
|
7016
|
+
"aria-pressed": d(u.value),
|
|
7017
|
+
onClick: () => !(p || u.disabled) && f(u.value),
|
|
7018
7018
|
children: [
|
|
7019
|
-
|
|
7020
|
-
|
|
7019
|
+
u.icon,
|
|
7020
|
+
u.label
|
|
7021
7021
|
]
|
|
7022
7022
|
},
|
|
7023
|
-
|
|
7023
|
+
u.value
|
|
7024
7024
|
);
|
|
7025
7025
|
})
|
|
7026
7026
|
}
|
|
@@ -7049,10 +7049,10 @@ const Vi = no(function({
|
|
|
7049
7049
|
actionMenu: l,
|
|
7050
7050
|
divider: s = !0,
|
|
7051
7051
|
children: c,
|
|
7052
|
-
className:
|
|
7053
|
-
hoverable:
|
|
7054
|
-
bordered:
|
|
7055
|
-
onClick:
|
|
7052
|
+
className: p = "",
|
|
7053
|
+
hoverable: d = !1,
|
|
7054
|
+
bordered: f = !1,
|
|
7055
|
+
onClick: u,
|
|
7056
7056
|
loaderJsx: g = !1
|
|
7057
7057
|
}) => {
|
|
7058
7058
|
const v = [
|
|
@@ -7063,11 +7063,11 @@ const Vi = no(function({
|
|
|
7063
7063
|
wn[t] || wn.medium,
|
|
7064
7064
|
yn[o] || yn.small,
|
|
7065
7065
|
Cn[r] || Cn.medium,
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7066
|
+
d ? "hover:shadow-xl transition-shadow duration-300 cursor-pointer" : "",
|
|
7067
|
+
f ? "border border-color-gray-200" : "",
|
|
7068
|
+
p
|
|
7069
7069
|
].join(" ").trim();
|
|
7070
|
-
return /* @__PURE__ */ a.jsxs("div", { className: v, onClick:
|
|
7070
|
+
return /* @__PURE__ */ a.jsxs("div", { className: v, onClick: u, children: [
|
|
7071
7071
|
i && /* @__PURE__ */ a.jsx("img", { src: i, alt: "Card", className: "w-full h-auto mb-4 rounded" }),
|
|
7072
7072
|
(e || n) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7073
7073
|
/* @__PURE__ */ a.jsxs("div", { className: "flex justify-between items-start mb-2", children: [
|
|
@@ -7129,23 +7129,23 @@ const Vi = no(function({
|
|
|
7129
7129
|
color: l = "blue",
|
|
7130
7130
|
className: s = "",
|
|
7131
7131
|
radioClass: c
|
|
7132
|
-
}) => /* @__PURE__ */ a.jsx("div", { className: `flex ${r === "row" ? "flex-row gap-6" : "flex-col gap-3"} ${s}`, children: n.map(({ label:
|
|
7132
|
+
}) => /* @__PURE__ */ a.jsx("div", { className: `flex ${r === "row" ? "flex-row gap-6" : "flex-col gap-3"} ${s}`, children: n.map(({ label: p, value: d, disabled: f }) => {
|
|
7133
7133
|
var g, v;
|
|
7134
|
-
const
|
|
7134
|
+
const u = i || f;
|
|
7135
7135
|
return /* @__PURE__ */ a.jsxs(
|
|
7136
7136
|
"label",
|
|
7137
7137
|
{
|
|
7138
|
-
className: `relative flex items-center cursor-pointer select-none transition ${
|
|
7138
|
+
className: `relative flex items-center cursor-pointer select-none transition ${u ? "opacity-50 cursor-not-allowed" : "hover:opacity-90"}`,
|
|
7139
7139
|
children: [
|
|
7140
7140
|
/* @__PURE__ */ a.jsx(
|
|
7141
7141
|
"input",
|
|
7142
7142
|
{
|
|
7143
7143
|
type: "radio",
|
|
7144
7144
|
name: e,
|
|
7145
|
-
value:
|
|
7146
|
-
disabled:
|
|
7147
|
-
checked: t ===
|
|
7148
|
-
onChange: () => !
|
|
7145
|
+
value: d,
|
|
7146
|
+
disabled: u,
|
|
7147
|
+
checked: t === d,
|
|
7148
|
+
onChange: () => !u && (o == null ? void 0 : o(d)),
|
|
7149
7149
|
className: "sr-only peer"
|
|
7150
7150
|
}
|
|
7151
7151
|
),
|
|
@@ -7155,10 +7155,10 @@ const Vi = no(function({
|
|
|
7155
7155
|
className: `w-5 h-5 rounded-full border-2 border-color-gray-400 peer-checked:border-[7px] transition-all duration-150 ${(g = xe[l]) == null ? void 0 : g.peer} ${c}`
|
|
7156
7156
|
}
|
|
7157
7157
|
),
|
|
7158
|
-
/* @__PURE__ */ a.jsx("span", { className: `ml-2 text-sm ${(v = xe[l]) == null ? void 0 : v.peer}`, children:
|
|
7158
|
+
/* @__PURE__ */ a.jsx("span", { className: `ml-2 text-sm ${(v = xe[l]) == null ? void 0 : v.peer}`, children: p })
|
|
7159
7159
|
]
|
|
7160
7160
|
},
|
|
7161
|
-
|
|
7161
|
+
d
|
|
7162
7162
|
);
|
|
7163
7163
|
}) }), Xi = ({
|
|
7164
7164
|
label: e,
|
|
@@ -7170,11 +7170,11 @@ const Vi = no(function({
|
|
|
7170
7170
|
inputClass: l = "",
|
|
7171
7171
|
disabled: s = !1,
|
|
7172
7172
|
size: c = "medium",
|
|
7173
|
-
variant:
|
|
7174
|
-
rounded:
|
|
7175
|
-
shadow:
|
|
7173
|
+
variant: p = "outlined",
|
|
7174
|
+
rounded: d = "medium",
|
|
7175
|
+
shadow: f = !1
|
|
7176
7176
|
}) => {
|
|
7177
|
-
const
|
|
7177
|
+
const u = {
|
|
7178
7178
|
small: "p-2",
|
|
7179
7179
|
medium: "p-3",
|
|
7180
7180
|
large: "p-4"
|
|
@@ -7194,9 +7194,9 @@ const Vi = no(function({
|
|
|
7194
7194
|
{
|
|
7195
7195
|
disabled: s,
|
|
7196
7196
|
value: n,
|
|
7197
|
-
onChange: (
|
|
7198
|
-
className: `appearance-none focus:ring-1 text-color-gray-800 w-full border outline-none transition-all ${g[
|
|
7199
|
-
children: o.map((
|
|
7197
|
+
onChange: (m) => t(m.target.value),
|
|
7198
|
+
className: `appearance-none focus:ring-1 text-color-gray-800 w-full border outline-none transition-all ${g[d]} ${u[c]} ${v[p]} ${s ? "!bg-color-gray-50 opacity-60 cursor-not-allowed" : ""} ${f ? "shadow-md shadow-color-zinc-100" : ""} ${l}`,
|
|
7199
|
+
children: o.map((m) => /* @__PURE__ */ a.jsx("option", { value: m.value, className: "text-color-gray-900", children: m.label }, m.value))
|
|
7200
7200
|
}
|
|
7201
7201
|
),
|
|
7202
7202
|
/* @__PURE__ */ a.jsx("span", { className: `absolute right-3 text-sm top-1/2 -translate-y-1/2 ${s ? "opacity-60" : ""}`, children: /* @__PURE__ */ a.jsx("svg", { className: "size-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z" }) }) })
|
|
@@ -7210,23 +7210,23 @@ const Vi = no(function({
|
|
|
7210
7210
|
const [o, r] = K(!1), [i, l] = K({ top: 0, left: 0 }), s = pe(null), c = pe(null);
|
|
7211
7211
|
return de(() => {
|
|
7212
7212
|
if (o && s.current && c.current) {
|
|
7213
|
-
const
|
|
7214
|
-
let
|
|
7213
|
+
const p = s.current.getBoundingClientRect(), d = c.current.getBoundingClientRect();
|
|
7214
|
+
let f = 0, u = 0;
|
|
7215
7215
|
switch (t) {
|
|
7216
7216
|
case "top":
|
|
7217
|
-
|
|
7217
|
+
f = p.top - d.height - 8, u = p.left + p.width / 2 - d.width / 2;
|
|
7218
7218
|
break;
|
|
7219
7219
|
case "bottom":
|
|
7220
|
-
|
|
7220
|
+
f = p.bottom + 8, u = p.left + p.width / 2 - d.width / 2;
|
|
7221
7221
|
break;
|
|
7222
7222
|
case "left":
|
|
7223
|
-
|
|
7223
|
+
f = p.top + p.height / 2 - d.height / 2, u = p.left - d.width - 8;
|
|
7224
7224
|
break;
|
|
7225
7225
|
case "right":
|
|
7226
|
-
|
|
7226
|
+
f = p.top + p.height / 2 - d.height / 2, u = p.right + 8;
|
|
7227
7227
|
break;
|
|
7228
7228
|
}
|
|
7229
|
-
l({ top:
|
|
7229
|
+
l({ top: f, left: u });
|
|
7230
7230
|
}
|
|
7231
7231
|
}, [o, t]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7232
7232
|
/* @__PURE__ */ a.jsx(
|
|
@@ -7275,37 +7275,37 @@ const vi = {
|
|
|
7275
7275
|
showCloseIcon: l = !0,
|
|
7276
7276
|
fullscreen: s = !1,
|
|
7277
7277
|
fullWidth: c = !1,
|
|
7278
|
-
maxWidth:
|
|
7279
|
-
},
|
|
7280
|
-
const [
|
|
7278
|
+
maxWidth: p
|
|
7279
|
+
}, d) => {
|
|
7280
|
+
const [f, u] = K(e || !1), [g, v] = K(!1), [m, w] = K(!1);
|
|
7281
7281
|
de(() => {
|
|
7282
|
-
e !== void 0 &&
|
|
7283
|
-
}, [e]), Sn(
|
|
7284
|
-
open: () =>
|
|
7282
|
+
e !== void 0 && u(e);
|
|
7283
|
+
}, [e]), Sn(d, () => ({
|
|
7284
|
+
open: () => u(!0),
|
|
7285
7285
|
close: () => {
|
|
7286
|
-
w(!1), setTimeout(() =>
|
|
7286
|
+
w(!1), setTimeout(() => u(!1), 300);
|
|
7287
7287
|
}
|
|
7288
7288
|
})), de(() => {
|
|
7289
|
-
let
|
|
7290
|
-
return
|
|
7291
|
-
}, [
|
|
7289
|
+
let M;
|
|
7290
|
+
return f ? (v(!0), M = setTimeout(() => w(!0), 10)) : w(!1), () => clearTimeout(M);
|
|
7291
|
+
}, [f]);
|
|
7292
7292
|
const y = () => {
|
|
7293
|
-
|
|
7293
|
+
f || v(!1);
|
|
7294
7294
|
};
|
|
7295
7295
|
return de(() => {
|
|
7296
|
-
const
|
|
7296
|
+
const M = (j) => {
|
|
7297
7297
|
j.key === "Escape" && (n == null || n());
|
|
7298
7298
|
};
|
|
7299
|
-
return
|
|
7300
|
-
}, [
|
|
7299
|
+
return f && document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
|
|
7300
|
+
}, [f, n]), de(() => (f ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
7301
7301
|
document.body.style.overflow = "";
|
|
7302
|
-
}), [
|
|
7302
|
+
}), [f]), g ? Ie(
|
|
7303
7303
|
/* @__PURE__ */ a.jsxs(
|
|
7304
7304
|
"div",
|
|
7305
7305
|
{
|
|
7306
7306
|
className: xi(
|
|
7307
7307
|
"fixed inset-0 z-50 flex items-center justify-center transition-opacity duration-300",
|
|
7308
|
-
|
|
7308
|
+
m ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
7309
7309
|
),
|
|
7310
7310
|
children: [
|
|
7311
7311
|
/* @__PURE__ */ a.jsx(
|
|
@@ -7313,14 +7313,14 @@ const vi = {
|
|
|
7313
7313
|
{
|
|
7314
7314
|
className: "fixed inset-0 bg-color-black/50",
|
|
7315
7315
|
onClick: () => {
|
|
7316
|
-
n == null || n(),
|
|
7316
|
+
n == null || n(), u(!1);
|
|
7317
7317
|
}
|
|
7318
7318
|
}
|
|
7319
7319
|
),
|
|
7320
7320
|
/* @__PURE__ */ a.jsxs(
|
|
7321
7321
|
"div",
|
|
7322
7322
|
{
|
|
7323
|
-
className: `relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${
|
|
7323
|
+
className: `relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${m ? "opacity-100 scale-100" : "opacity-0 scale-95"} ${s ? "w-full h-[calc(100%_-_40px)] m-5" : `${c ? "w-full" : "w-auto"} ${p ? vi[p] : ""} mx-5`} ${t}`,
|
|
7324
7324
|
onTransitionEnd: y,
|
|
7325
7325
|
children: [
|
|
7326
7326
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
@@ -7333,7 +7333,7 @@ const vi = {
|
|
|
7333
7333
|
size: "small",
|
|
7334
7334
|
roundedFull: !0,
|
|
7335
7335
|
onClick: () => {
|
|
7336
|
-
n == null || n(),
|
|
7336
|
+
n == null || n(), u(!1);
|
|
7337
7337
|
},
|
|
7338
7338
|
variant: "transparent"
|
|
7339
7339
|
}
|
|
@@ -7352,21 +7352,21 @@ const vi = {
|
|
|
7352
7352
|
}
|
|
7353
7353
|
);
|
|
7354
7354
|
function Qi({ items: e, trigger: n, className: t, dropdownItemClass: o }) {
|
|
7355
|
-
const [r, i] = K(!1), [l, s] = K({ top: 0, left: 0 }), [c,
|
|
7356
|
-
v.stopPropagation(), i((
|
|
7355
|
+
const [r, i] = K(!1), [l, s] = K({ top: 0, left: 0 }), [c, p] = K(!1), d = pe(null), f = pe(null), u = (v) => {
|
|
7356
|
+
v.stopPropagation(), i((m) => !m), p(!1);
|
|
7357
7357
|
};
|
|
7358
7358
|
oo(() => {
|
|
7359
|
-
if (r &&
|
|
7360
|
-
const v =
|
|
7361
|
-
let
|
|
7362
|
-
v.right +
|
|
7363
|
-
|
|
7359
|
+
if (r && d.current && f.current) {
|
|
7360
|
+
const v = d.current.getBoundingClientRect(), m = f.current.getBoundingClientRect(), w = window.innerWidth, y = window.innerHeight;
|
|
7361
|
+
let M = v.left + window.scrollX, j = v.bottom + window.scrollY;
|
|
7362
|
+
v.right + m.width > w && (M = v.right + window.scrollX - m.width), M + m.width > w && (M = w - m.width - 12), j + m.height > y && (j = v.top + window.scrollY - m.height), s({ top: j, left: M }), setTimeout(() => {
|
|
7363
|
+
p(!0);
|
|
7364
7364
|
}, 150);
|
|
7365
7365
|
}
|
|
7366
7366
|
}, [r]), de(() => {
|
|
7367
|
-
const v = (
|
|
7367
|
+
const v = (m) => {
|
|
7368
7368
|
var w;
|
|
7369
|
-
|
|
7369
|
+
f.current && !f.current.contains(m.target) && !((w = d.current) != null && w.contains(m.target)) && i(!1);
|
|
7370
7370
|
};
|
|
7371
7371
|
return r && document.addEventListener("mousedown", v), () => {
|
|
7372
7372
|
document.removeEventListener("mousedown", v);
|
|
@@ -7375,13 +7375,13 @@ function Qi({ items: e, trigger: n, className: t, dropdownItemClass: o }) {
|
|
|
7375
7375
|
const g = /* @__PURE__ */ a.jsx(
|
|
7376
7376
|
"div",
|
|
7377
7377
|
{
|
|
7378
|
-
ref:
|
|
7378
|
+
ref: f,
|
|
7379
7379
|
className: `absolute mt-2 z-50 rounded-xl bg-color-white shadow-xl p-2 min-w-[160px] transition-all duration-200 transform ${c ? "opacity-100 scale-100" : "opacity-0 scale-95"} ${t}`,
|
|
7380
7380
|
style: {
|
|
7381
7381
|
top: l.top,
|
|
7382
7382
|
left: l.left
|
|
7383
7383
|
},
|
|
7384
|
-
children: e.map((v,
|
|
7384
|
+
children: e.map((v, m) => /* @__PURE__ */ a.jsxs(
|
|
7385
7385
|
"button",
|
|
7386
7386
|
{
|
|
7387
7387
|
disabled: v.disabled,
|
|
@@ -7395,12 +7395,12 @@ function Qi({ items: e, trigger: n, className: t, dropdownItemClass: o }) {
|
|
|
7395
7395
|
/* @__PURE__ */ a.jsx("span", { children: v.label })
|
|
7396
7396
|
]
|
|
7397
7397
|
},
|
|
7398
|
-
|
|
7398
|
+
m
|
|
7399
7399
|
))
|
|
7400
7400
|
}
|
|
7401
7401
|
);
|
|
7402
7402
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7403
|
-
/* @__PURE__ */ a.jsx("div", { ref:
|
|
7403
|
+
/* @__PURE__ */ a.jsx("div", { ref: d, onClick: u, className: "cursor-pointer", children: n }),
|
|
7404
7404
|
r && Ie(g, document.body)
|
|
7405
7405
|
] });
|
|
7406
7406
|
}
|
|
@@ -7418,15 +7418,15 @@ const wi = ({
|
|
|
7418
7418
|
showCloseIcon: s = !0,
|
|
7419
7419
|
anchor: c = "left"
|
|
7420
7420
|
}) => {
|
|
7421
|
-
const [
|
|
7421
|
+
const [p, d] = K(!1), [f, u] = K(!1);
|
|
7422
7422
|
de(() => {
|
|
7423
7423
|
let w;
|
|
7424
|
-
return e ? (
|
|
7425
|
-
|
|
7426
|
-
}, 10)) :
|
|
7424
|
+
return e ? (d(!0), w = setTimeout(() => {
|
|
7425
|
+
u(!0);
|
|
7426
|
+
}, 10)) : u(!1), () => clearTimeout(w);
|
|
7427
7427
|
}, [e]);
|
|
7428
7428
|
const g = () => {
|
|
7429
|
-
e ||
|
|
7429
|
+
e || d(!1);
|
|
7430
7430
|
};
|
|
7431
7431
|
if (de(() => {
|
|
7432
7432
|
const w = (y) => {
|
|
@@ -7435,17 +7435,17 @@ const wi = ({
|
|
|
7435
7435
|
return e && document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
|
|
7436
7436
|
}, [e, n]), de(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
7437
7437
|
document.body.style.overflow = "";
|
|
7438
|
-
}), [e]), !
|
|
7438
|
+
}), [e]), !p) return null;
|
|
7439
7439
|
const v = {
|
|
7440
7440
|
left: "left-0 top-0 h-full min-w-96 transition-all duration-300",
|
|
7441
7441
|
right: "right-0 top-0 h-full min-w-96 transition-all duration-300",
|
|
7442
7442
|
top: "top-0 left-0 w-full min-h-40 transition-all duration-300",
|
|
7443
7443
|
bottom: "bottom-0 left-0 w-full min-h-40 transition-all duration-300"
|
|
7444
|
-
},
|
|
7445
|
-
left:
|
|
7446
|
-
right:
|
|
7447
|
-
top:
|
|
7448
|
-
bottom:
|
|
7444
|
+
}, m = {
|
|
7445
|
+
left: f ? "translate-x-0" : "-translate-x-full",
|
|
7446
|
+
right: f ? "translate-x-0" : "translate-x-full",
|
|
7447
|
+
top: f ? "translate-y-0" : "-translate-y-full",
|
|
7448
|
+
bottom: f ? "translate-y-0" : "translate-y-full"
|
|
7449
7449
|
};
|
|
7450
7450
|
return Ie(
|
|
7451
7451
|
/* @__PURE__ */ a.jsxs(
|
|
@@ -7453,7 +7453,7 @@ const wi = ({
|
|
|
7453
7453
|
{
|
|
7454
7454
|
className: bi(
|
|
7455
7455
|
"fixed inset-0 z-50 transition-opacity duration-300",
|
|
7456
|
-
|
|
7456
|
+
f ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
7457
7457
|
),
|
|
7458
7458
|
children: [
|
|
7459
7459
|
/* @__PURE__ */ a.jsx("div", { className: "fixed inset-0 bg-color-black/50", onClick: n }),
|
|
@@ -7463,7 +7463,7 @@ const wi = ({
|
|
|
7463
7463
|
className: `
|
|
7464
7464
|
fixed bg-color-white shadow-lg z-50 p-6 flex flex-col
|
|
7465
7465
|
${v[c]}
|
|
7466
|
-
${
|
|
7466
|
+
${m[c]}
|
|
7467
7467
|
${t}
|
|
7468
7468
|
`,
|
|
7469
7469
|
onTransitionEnd: g,
|
|
@@ -7501,14 +7501,14 @@ const wi = ({
|
|
|
7501
7501
|
onToggle: l,
|
|
7502
7502
|
className: s = "",
|
|
7503
7503
|
titleClass: c = "",
|
|
7504
|
-
contentClass:
|
|
7504
|
+
contentClass: p = ""
|
|
7505
7505
|
}) => {
|
|
7506
|
-
const [
|
|
7507
|
-
const
|
|
7508
|
-
|
|
7506
|
+
const [d, f] = K(i), u = r !== void 0, g = u ? r : d, v = () => {
|
|
7507
|
+
const m = !g;
|
|
7508
|
+
u || f(m), l == null || l(m);
|
|
7509
7509
|
};
|
|
7510
7510
|
return de(() => {
|
|
7511
|
-
|
|
7511
|
+
u && f(r);
|
|
7512
7512
|
}, [r]), /* @__PURE__ */ a.jsxs("div", { className: `overflow-hidden w-full border border-color-gray-100 ${s}`, children: [
|
|
7513
7513
|
/* @__PURE__ */ a.jsxs(
|
|
7514
7514
|
"button",
|
|
@@ -7527,7 +7527,7 @@ const wi = ({
|
|
|
7527
7527
|
]
|
|
7528
7528
|
}
|
|
7529
7529
|
),
|
|
7530
|
-
/* @__PURE__ */ a.jsx("div", { className: `grid overflow-hidden transition-all duration-300 ease-in-out grid-rows-[0fr] ${g ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}`, children: /* @__PURE__ */ a.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ a.jsx("div", { className: `p-4 text-sm text-color-gray-700 ${
|
|
7530
|
+
/* @__PURE__ */ a.jsx("div", { className: `grid overflow-hidden transition-all duration-300 ease-in-out grid-rows-[0fr] ${g ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"}`, children: /* @__PURE__ */ a.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ a.jsx("div", { className: `p-4 text-sm text-color-gray-700 ${p}`, children: n }) }) })
|
|
7531
7531
|
] });
|
|
7532
7532
|
}, yi = {
|
|
7533
7533
|
info: "bg-color-blue-50 border-color-blue-300 text-color-blue-800",
|
|
@@ -7557,12 +7557,12 @@ const wi = ({
|
|
|
7557
7557
|
}) => {
|
|
7558
7558
|
const [l, s] = K(!0), c = pe(null);
|
|
7559
7559
|
return de(() => {
|
|
7560
|
-
let
|
|
7560
|
+
let p;
|
|
7561
7561
|
return o && (requestAnimationFrame(() => {
|
|
7562
7562
|
c.current && (c.current.style.transition = `width ${i}ms linear`, c.current.style.width = "0%");
|
|
7563
|
-
}),
|
|
7563
|
+
}), p = setTimeout(() => {
|
|
7564
7564
|
s(!1), t == null || t();
|
|
7565
|
-
}, i)), () => clearTimeout(
|
|
7565
|
+
}, i)), () => clearTimeout(p);
|
|
7566
7566
|
}, [o, i, t]), l ? /* @__PURE__ */ a.jsxs(
|
|
7567
7567
|
"div",
|
|
7568
7568
|
{
|
|
@@ -7603,15 +7603,15 @@ const wi = ({
|
|
|
7603
7603
|
position: i = "top-right"
|
|
7604
7604
|
}) => {
|
|
7605
7605
|
const l = () => {
|
|
7606
|
-
var
|
|
7606
|
+
var p, d;
|
|
7607
7607
|
if (t)
|
|
7608
|
-
return /* @__PURE__ */ a.jsx("span", { className: `h-2 w-2 rounded-full ${(
|
|
7608
|
+
return /* @__PURE__ */ a.jsx("span", { className: `h-2 w-2 rounded-full ${(p = xe[r]) == null ? void 0 : p.filled} block` });
|
|
7609
7609
|
if (n === 0 || n === void 0) return null;
|
|
7610
7610
|
const c = n > o ? `${o}+` : n;
|
|
7611
7611
|
return /* @__PURE__ */ a.jsx(
|
|
7612
7612
|
"span",
|
|
7613
7613
|
{
|
|
7614
|
-
className: `text-color-white text-xs px-[10px] py-1 rounded-full whitespace-nowrap ${(
|
|
7614
|
+
className: `text-color-white text-xs px-[10px] py-1 rounded-full whitespace-nowrap ${(d = xe[r]) == null ? void 0 : d.filled}`,
|
|
7615
7615
|
children: c
|
|
7616
7616
|
}
|
|
7617
7617
|
);
|
|
@@ -7649,7 +7649,7 @@ const wi = ({
|
|
|
7649
7649
|
}) => {
|
|
7650
7650
|
let s = "flex justify-around items-center bg-color-white shadow-sm text-color-gray-600 py-2 px-4";
|
|
7651
7651
|
return e === "fixed" ? s += " fixed bottom-0 left-0 right-0" : e === "floating" ? s += " fixed bottom-4 left-4 right-4 rounded-full" : e === "static" && (s += " static w-full"), /* @__PURE__ */ a.jsx("nav", { className: `${s} ${r}`, children: t.map((c) => {
|
|
7652
|
-
const
|
|
7652
|
+
const p = c.label === n;
|
|
7653
7653
|
return /* @__PURE__ */ a.jsxs(
|
|
7654
7654
|
"a",
|
|
7655
7655
|
{
|
|
@@ -7657,8 +7657,8 @@ const wi = ({
|
|
|
7657
7657
|
onClick: () => o(c.label),
|
|
7658
7658
|
className: `flex flex-col items-center text-sm cursor-pointer text-color-gray-500 no-underline ${l}`,
|
|
7659
7659
|
children: [
|
|
7660
|
-
/* @__PURE__ */ a.jsx("span", { className: `text-xl ${
|
|
7661
|
-
/* @__PURE__ */ a.jsx("span", { className: `text-xs font-medium mt-1 ${
|
|
7660
|
+
/* @__PURE__ */ a.jsx("span", { className: `text-xl ${p ? `text-color-blue-500 ${i}` : ""}`, children: c.icon }),
|
|
7661
|
+
/* @__PURE__ */ a.jsx("span", { className: `text-xs font-medium mt-1 ${p ? `text-color-blue-500 ${i}` : ""}`, children: c.label })
|
|
7662
7662
|
]
|
|
7663
7663
|
},
|
|
7664
7664
|
c.label
|
|
@@ -7684,33 +7684,39 @@ const wi = ({
|
|
|
7684
7684
|
placeholder: l = "Select date",
|
|
7685
7685
|
icon: s = /* @__PURE__ */ a.jsx("svg", { className: "text-color-gray-500 size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M7 3V1H9V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V9H20V5H17V7H15V5H9V7H7V5H4V19H10V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7ZM17 12C14.7909 12 13 13.7909 13 16C13 18.2091 14.7909 20 17 20C19.2091 20 21 18.2091 21 16C21 13.7909 19.2091 12 17 12ZM11 16C11 12.6863 13.6863 10 17 10C20.3137 10 23 12.6863 23 16C23 19.3137 20.3137 22 17 22C13.6863 22 11 19.3137 11 16ZM16 13V16.4142L18.2929 18.7071L19.7071 17.2929L18 15.5858V13H16Z" }) }),
|
|
7686
7686
|
disableBefore: c,
|
|
7687
|
-
disableAfter:
|
|
7688
|
-
selectedDate:
|
|
7689
|
-
hideFutureDates:
|
|
7690
|
-
defaultDate:
|
|
7687
|
+
disableAfter: p,
|
|
7688
|
+
selectedDate: d,
|
|
7689
|
+
hideFutureDates: f = !1,
|
|
7690
|
+
defaultDate: u = new Date(1997, 0, 1).getTime()
|
|
7691
7691
|
}) => {
|
|
7692
|
-
const [g, v] = K(!1), [
|
|
7693
|
-
|
|
7694
|
-
), [j,
|
|
7695
|
-
|
|
7696
|
-
), [b, O] = K(null), [F, H] = K(null), [
|
|
7697
|
-
|
|
7698
|
-
), [N,
|
|
7692
|
+
const [g, v] = K(!1), [m, w] = K(null), [y, M] = K(
|
|
7693
|
+
u ? new Date(typeof u == "string" ? parseInt(u) : u) : /* @__PURE__ */ new Date()
|
|
7694
|
+
), [j, E] = K(
|
|
7695
|
+
d ? new Date(d) : u && !d ? new Date(typeof u == "string" ? parseInt(u) : u) : null
|
|
7696
|
+
), [b, O] = K(null), [F, H] = K(null), [W, ee] = K(null), [Y, se] = K({ hour: 12, minute: 0, ampm: "AM" }), U = pe(null), [z, Z] = K(
|
|
7697
|
+
d ? new Date(d) : u && !d ? new Date(typeof u == "string" ? parseInt(u) : u) : null
|
|
7698
|
+
), [N, Q] = K(null), [ge, X] = K(null);
|
|
7699
7699
|
de(() => {
|
|
7700
|
-
|
|
7701
|
-
|
|
7700
|
+
if (d)
|
|
7701
|
+
E(new Date(d)), Z(new Date(d));
|
|
7702
|
+
else if (!d && u) {
|
|
7703
|
+
const h = new Date(typeof u == "string" ? parseInt(u) : u);
|
|
7704
|
+
E(h), Z(h);
|
|
7705
|
+
} else
|
|
7706
|
+
E(null), Z(null);
|
|
7707
|
+
}, [d, u]);
|
|
7702
7708
|
const x = (h) => {
|
|
7703
7709
|
h.stopPropagation(), w(h.currentTarget), v(!0);
|
|
7704
7710
|
}, C = () => {
|
|
7705
7711
|
v(!1);
|
|
7706
|
-
}, _ = (h) => !!(c && h.getTime() < c ||
|
|
7707
|
-
n === "inline" && U.current && !U.current.contains(h.target) && (e === "single" ? j ||
|
|
7712
|
+
}, _ = (h) => !!(c && h.getTime() < c || p && h.getTime() > p || f && h.getTime() > (/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999)), $ = (h) => {
|
|
7713
|
+
n === "inline" && U.current && !U.current.contains(h.target) && (e === "single" ? j || E(null) : e === "range" && (!b || !F) && (O(null), H(null)), v(!1));
|
|
7708
7714
|
};
|
|
7709
7715
|
de(() => (g ? document.addEventListener("mousedown", $) : document.removeEventListener("mousedown", $), () => {
|
|
7710
7716
|
document.removeEventListener("mousedown", $);
|
|
7711
7717
|
}), [g]);
|
|
7712
7718
|
const P = (h) => {
|
|
7713
|
-
!h || _(h) || (e === "single" ?
|
|
7719
|
+
!h || _(h) || (e === "single" ? E(h) : e === "range" && (!b || b && F ? (O(h), H(null)) : h >= b ? H(h) : O(h)));
|
|
7714
7720
|
}, D = (h) => {
|
|
7715
7721
|
if (!h || _(h)) {
|
|
7716
7722
|
ee(null);
|
|
@@ -7725,48 +7731,48 @@ const wi = ({
|
|
|
7725
7731
|
h.getFullYear(),
|
|
7726
7732
|
h.getMonth(),
|
|
7727
7733
|
h.getDate(),
|
|
7728
|
-
|
|
7729
|
-
|
|
7734
|
+
Y.ampm === "PM" && Y.hour !== 12 ? Y.hour + 12 : Y.ampm === "AM" && Y.hour === 12 ? 0 : Y.hour,
|
|
7735
|
+
Y.minute
|
|
7730
7736
|
) : null;
|
|
7731
|
-
|
|
7732
|
-
} else e === "range" && (
|
|
7737
|
+
Z(T), i == null || i(T ? T.getTime() : null);
|
|
7738
|
+
} else e === "range" && (Q(b), X(F), i == null || i({
|
|
7733
7739
|
startDate: b ? b.getTime() : null,
|
|
7734
7740
|
endDate: F ? F.getTime() : null
|
|
7735
7741
|
}));
|
|
7736
7742
|
}, R = () => {
|
|
7737
|
-
const h = new Date(y.getFullYear(), y.getMonth(), 1), T = new Date(y.getFullYear(), y.getMonth() + 1, 0),
|
|
7738
|
-
for (let ce = 0; ce <
|
|
7739
|
-
|
|
7743
|
+
const h = new Date(y.getFullYear(), y.getMonth(), 1), T = new Date(y.getFullYear(), y.getMonth() + 1, 0), J = (/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999), ie = [], ae = h.getDay();
|
|
7744
|
+
for (let ce = 0; ce < ae; ce++)
|
|
7745
|
+
ie.push(null);
|
|
7740
7746
|
for (let ce = 1; ce <= T.getDate(); ce++) {
|
|
7741
7747
|
const $e = new Date(y.getFullYear(), y.getMonth(), ce);
|
|
7742
|
-
|
|
7748
|
+
f && $e.getTime() > J || ie.push($e);
|
|
7743
7749
|
}
|
|
7744
|
-
return
|
|
7750
|
+
return ie;
|
|
7745
7751
|
}, I = (h) => {
|
|
7746
7752
|
if (!h) return !1;
|
|
7747
7753
|
if (e === "single")
|
|
7748
|
-
return (j == null ? void 0 : j.toDateString()) === h.toDateString();
|
|
7754
|
+
return (j == null ? void 0 : j.toDateString()) === h.toDateString() || (z == null ? void 0 : z.toDateString()) === h.toDateString();
|
|
7749
7755
|
if (e === "range") {
|
|
7750
|
-
if (b && !F &&
|
|
7751
|
-
const T = b <
|
|
7752
|
-
return h >= T && h <=
|
|
7756
|
+
if (b && !F && W) {
|
|
7757
|
+
const T = b < W ? b : W, J = b < W ? W : b;
|
|
7758
|
+
return h >= T && h <= J;
|
|
7753
7759
|
}
|
|
7754
7760
|
return b && F && h >= b && h <= F;
|
|
7755
7761
|
}
|
|
7756
7762
|
return !1;
|
|
7757
7763
|
}, V = (h, T) => {
|
|
7758
7764
|
if (!h)
|
|
7759
|
-
return e === "range" ? T === "end" ? "End Date" : "Start Date" : o ? `${String(
|
|
7765
|
+
return e === "range" ? T === "end" ? "End Date" : "Start Date" : o ? `${String(Y.hour).padStart(2, "0")}:${String(Y.minute).padStart(2, "0")} ${Y.ampm}` : l;
|
|
7760
7766
|
if (o)
|
|
7761
|
-
return `${String(
|
|
7762
|
-
const
|
|
7763
|
-
return `${
|
|
7767
|
+
return `${String(Y.hour).padStart(2, "0")}:${String(Y.minute).padStart(2, "0")} ${Y.ampm}`;
|
|
7768
|
+
const J = h.getDate().toString().padStart(2, "0"), ie = jn[h.getMonth()], ae = h.getFullYear(), ce = t ? ` ${String(Y.hour).padStart(2, "0")}:${String(Y.minute).padStart(2, "0")} ${Y.ampm}` : "";
|
|
7769
|
+
return `${J} ${ie} ${ae}${ce}`;
|
|
7764
7770
|
}, re = /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full border border-color-gray-300 rounded-md p-2", children: [
|
|
7765
7771
|
/* @__PURE__ */ a.jsx(
|
|
7766
7772
|
"select",
|
|
7767
7773
|
{
|
|
7768
|
-
value:
|
|
7769
|
-
onChange: (h) => se({ ...
|
|
7774
|
+
value: Y.hour,
|
|
7775
|
+
onChange: (h) => se({ ...Y, hour: parseInt(h.target.value) }),
|
|
7770
7776
|
className: "w-16 border-0 text-center bg-color-transparent outline-0",
|
|
7771
7777
|
children: Array.from({ length: 12 }, (h, T) => T + 1).map((h) => /* @__PURE__ */ a.jsx("option", { value: h, children: h.toString().padStart(2, "0") }, h))
|
|
7772
7778
|
}
|
|
@@ -7774,8 +7780,8 @@ const wi = ({
|
|
|
7774
7780
|
/* @__PURE__ */ a.jsx(
|
|
7775
7781
|
"select",
|
|
7776
7782
|
{
|
|
7777
|
-
value:
|
|
7778
|
-
onChange: (h) => se({ ...
|
|
7783
|
+
value: Y.minute,
|
|
7784
|
+
onChange: (h) => se({ ...Y, minute: parseInt(h.target.value) }),
|
|
7779
7785
|
className: "w-16 border-0 text-center bg-color-transparent outline-0 border-l border-color-gray-300",
|
|
7780
7786
|
children: Array.from({ length: 60 }, (h, T) => T).map((h) => /* @__PURE__ */ a.jsx("option", { value: h, children: h.toString().padStart(2, "0") }, h))
|
|
7781
7787
|
}
|
|
@@ -7783,8 +7789,8 @@ const wi = ({
|
|
|
7783
7789
|
/* @__PURE__ */ a.jsxs(
|
|
7784
7790
|
"select",
|
|
7785
7791
|
{
|
|
7786
|
-
value:
|
|
7787
|
-
onChange: (h) => se({ ...
|
|
7792
|
+
value: Y.ampm,
|
|
7793
|
+
onChange: (h) => se({ ...Y, ampm: h.target.value }),
|
|
7788
7794
|
className: "w-16 border-0 text-center bg-color-transparent outline-0 border-l border-color-gray-300",
|
|
7789
7795
|
children: [
|
|
7790
7796
|
/* @__PURE__ */ a.jsx("option", { value: "AM", children: "AM" }),
|
|
@@ -7799,8 +7805,8 @@ const wi = ({
|
|
|
7799
7805
|
className: `${n === "dialog" ? "relative w-full" : "absolute z-50 mt-2 w-72 rounded-lg border border-color-gray-200 bg-color-white shadow-xl p-4"}`,
|
|
7800
7806
|
style: n === "dialog" ? void 0 : {
|
|
7801
7807
|
position: "absolute",
|
|
7802
|
-
left:
|
|
7803
|
-
top:
|
|
7808
|
+
left: m == null ? void 0 : m.getBoundingClientRect().left,
|
|
7809
|
+
top: m ? m.getBoundingClientRect().bottom + window.scrollY : 0
|
|
7804
7810
|
},
|
|
7805
7811
|
children: [
|
|
7806
7812
|
!o && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -7812,7 +7818,7 @@ const wi = ({
|
|
|
7812
7818
|
size: "small",
|
|
7813
7819
|
color: "gray",
|
|
7814
7820
|
roundedFull: !0,
|
|
7815
|
-
onClick: () =>
|
|
7821
|
+
onClick: () => M(new Date(y.getFullYear(), y.getMonth() - 1, 1)),
|
|
7816
7822
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z" }) })
|
|
7817
7823
|
}
|
|
7818
7824
|
),
|
|
@@ -7822,8 +7828,11 @@ const wi = ({
|
|
|
7822
7828
|
{
|
|
7823
7829
|
className: "text-sm outline-none",
|
|
7824
7830
|
value: y.getMonth(),
|
|
7825
|
-
onChange: (h) =>
|
|
7826
|
-
children: jn.map((h, T) =>
|
|
7831
|
+
onChange: (h) => M(new Date(y.getFullYear(), parseInt(h.target.value), 1)),
|
|
7832
|
+
children: jn.map((h, T) => {
|
|
7833
|
+
const J = y.getFullYear(), ie = T, ae = /* @__PURE__ */ new Date();
|
|
7834
|
+
return f && J === ae.getFullYear() && ie > ae.getMonth() ? null : /* @__PURE__ */ a.jsx("option", { value: T, children: h }, h);
|
|
7835
|
+
})
|
|
7827
7836
|
}
|
|
7828
7837
|
),
|
|
7829
7838
|
/* @__PURE__ */ a.jsx(
|
|
@@ -7831,8 +7840,8 @@ const wi = ({
|
|
|
7831
7840
|
{
|
|
7832
7841
|
className: "text-sm outline-none",
|
|
7833
7842
|
value: y.getFullYear(),
|
|
7834
|
-
onChange: (h) =>
|
|
7835
|
-
children: Array.from({ length: 150 }, (h, T) => (/* @__PURE__ */ new Date()).getFullYear() - 100 + T).map((h) => /* @__PURE__ */ a.jsx("option", { value: h, children: h }, h))
|
|
7843
|
+
onChange: (h) => M(new Date(parseInt(h.target.value), y.getMonth(), 1)),
|
|
7844
|
+
children: Array.from({ length: 150 }, (h, T) => (/* @__PURE__ */ new Date()).getFullYear() - 100 + T).filter((h) => !f || h <= (/* @__PURE__ */ new Date()).getFullYear()).map((h) => /* @__PURE__ */ a.jsx("option", { value: h, children: h }, h))
|
|
7836
7845
|
}
|
|
7837
7846
|
)
|
|
7838
7847
|
] }),
|
|
@@ -7843,13 +7852,13 @@ const wi = ({
|
|
|
7843
7852
|
size: "small",
|
|
7844
7853
|
color: "gray",
|
|
7845
7854
|
roundedFull: !0,
|
|
7846
|
-
onClick: () =>
|
|
7855
|
+
onClick: () => M(new Date(y.getFullYear(), y.getMonth() + 1, 1)),
|
|
7847
7856
|
icon: /* @__PURE__ */ a.jsx("svg", { className: "size-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ a.jsx("path", { d: "M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z" }) })
|
|
7848
7857
|
}
|
|
7849
7858
|
)
|
|
7850
7859
|
] }),
|
|
7851
7860
|
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-columns-7 gap-1 text-center text-sm mb-2", children: [
|
|
7852
|
-
Si.map((h) => /* @__PURE__ */ a.jsx("div", { className: "font-semibold", children: h }, h)),
|
|
7861
|
+
!f && Si.map((h) => /* @__PURE__ */ a.jsx("div", { className: "font-semibold", children: h }, h)),
|
|
7853
7862
|
R().map((h, T) => /* @__PURE__ */ a.jsx(
|
|
7854
7863
|
"div",
|
|
7855
7864
|
{
|
|
@@ -7890,7 +7899,7 @@ const wi = ({
|
|
|
7890
7899
|
variant: "outlined",
|
|
7891
7900
|
className: `!justify-between gap-2 ${r || ""}`,
|
|
7892
7901
|
children: [
|
|
7893
|
-
e === "single" ? z ? V(z) :
|
|
7902
|
+
e === "single" ? z ? V(z) : u ? V(new Date(typeof u == "string" ? parseInt(u) : u)) : l : (
|
|
7894
7903
|
// Display rangeStart immediately if set, even if rangeEnd is null
|
|
7895
7904
|
b || N || ge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7896
7905
|
V(b || N, "start"),
|
|
@@ -7915,42 +7924,42 @@ const wi = ({
|
|
|
7915
7924
|
tabItemActiveClass: l = "",
|
|
7916
7925
|
tabContentClass: s = "",
|
|
7917
7926
|
indicatorClass: c = "",
|
|
7918
|
-
variant:
|
|
7927
|
+
variant: p = "horizontal"
|
|
7919
7928
|
}) => {
|
|
7920
|
-
const
|
|
7929
|
+
const d = e.find((u) => u.key === n), f = p === "vertical";
|
|
7921
7930
|
return /* @__PURE__ */ a.jsxs(
|
|
7922
7931
|
"div",
|
|
7923
7932
|
{
|
|
7924
|
-
className: `w-full flex ${
|
|
7933
|
+
className: `w-full flex ${f ? "flex-row" : "flex-col"} ${o}`,
|
|
7925
7934
|
children: [
|
|
7926
7935
|
/* @__PURE__ */ a.jsx(
|
|
7927
7936
|
"div",
|
|
7928
7937
|
{
|
|
7929
|
-
className: `${
|
|
7930
|
-
children: e.map((
|
|
7931
|
-
const g = n ===
|
|
7938
|
+
className: `${f ? "flex flex-col min-w-[160px] border-r border-color-gray-200" : "flex space-x-6 border-b border-color-gray-200"} ${r}`,
|
|
7939
|
+
children: e.map((u) => {
|
|
7940
|
+
const g = n === u.key;
|
|
7932
7941
|
return /* @__PURE__ */ a.jsxs(
|
|
7933
7942
|
"button",
|
|
7934
7943
|
{
|
|
7935
|
-
onClick: () => t(
|
|
7936
|
-
className: `relative flex ${
|
|
7944
|
+
onClick: () => t(u.key),
|
|
7945
|
+
className: `relative flex ${f ? "flex-row items-center px-4 py-3" : "flex-col items-center py-4"}
|
|
7937
7946
|
text-sm font-medium transition-color duration-200 bg-color-transparent
|
|
7938
7947
|
${g ? `text-color-blue-500 ${l} ` : "text-color-gray-600 hover:text-color-blue-500 cursor-pointer"}
|
|
7939
7948
|
${i}`,
|
|
7940
7949
|
children: [
|
|
7941
|
-
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center ${
|
|
7942
|
-
|
|
7943
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
7950
|
+
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center ${f ? "space-x-3" : "space-x-2"}`, children: [
|
|
7951
|
+
u.icon && /* @__PURE__ */ a.jsx("span", { children: u.icon }),
|
|
7952
|
+
/* @__PURE__ */ a.jsx("span", { children: u.label })
|
|
7944
7953
|
] }),
|
|
7945
|
-
g && (
|
|
7954
|
+
g && (f ? /* @__PURE__ */ a.jsx("div", { className: `absolute right-0 top-3 bottom-3 w-1 bg-color-blue-500 rounded-full ${c}` }) : /* @__PURE__ */ a.jsx("div", { className: `absolute bottom-0 left-0 right-0 h-1 bg-color-blue-500 rounded-full ${c}` }))
|
|
7946
7955
|
]
|
|
7947
7956
|
},
|
|
7948
|
-
|
|
7957
|
+
u.key
|
|
7949
7958
|
);
|
|
7950
7959
|
})
|
|
7951
7960
|
}
|
|
7952
7961
|
),
|
|
7953
|
-
/* @__PURE__ */ a.jsx("div", { className: `mt-4 ${
|
|
7962
|
+
/* @__PURE__ */ a.jsx("div", { className: `mt-4 ${f ? "ml-6 mt-0" : ""} ${s}`, children: d == null ? void 0 : d.content })
|
|
7954
7963
|
]
|
|
7955
7964
|
}
|
|
7956
7965
|
);
|
|
@@ -7988,8 +7997,8 @@ function sa({
|
|
|
7988
7997
|
onItemSelect: l,
|
|
7989
7998
|
className: s = ""
|
|
7990
7999
|
}) {
|
|
7991
|
-
const [c,
|
|
7992
|
-
|
|
8000
|
+
const [c, p] = K(o), d = (f) => {
|
|
8001
|
+
p(f), f.onClick && f.onClick(), l && l(f);
|
|
7993
8002
|
};
|
|
7994
8003
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(
|
|
7995
8004
|
wi,
|
|
@@ -8006,33 +8015,33 @@ function sa({
|
|
|
8006
8015
|
children: [
|
|
8007
8016
|
n && /* @__PURE__ */ a.jsx("div", { className: "pb-6", children: n }),
|
|
8008
8017
|
/* @__PURE__ */ a.jsx("nav", { className: "space-y-2 text-sm font-medium text-color-gray-700", children: e.map(
|
|
8009
|
-
(
|
|
8018
|
+
(f) => f.href ? /* @__PURE__ */ a.jsxs(
|
|
8010
8019
|
"a",
|
|
8011
8020
|
{
|
|
8012
|
-
href:
|
|
8021
|
+
href: f.href,
|
|
8013
8022
|
className: `flex items-center gap-3 py-3 px-4 cursor-pointer rounded-full w-full no-underline
|
|
8014
|
-
${
|
|
8023
|
+
${f.label === (c == null ? void 0 : c.label) ? "bg-color-blue-500 text-color-white font-medium " : "hover:bg-color-gray-50 text-color-gray-600"}
|
|
8015
8024
|
`,
|
|
8016
|
-
onClick: () =>
|
|
8025
|
+
onClick: () => d(f),
|
|
8017
8026
|
children: [
|
|
8018
|
-
/* @__PURE__ */ a.jsx("span", { className: "text-lg", children:
|
|
8019
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
8027
|
+
/* @__PURE__ */ a.jsx("span", { className: "text-lg", children: f.icon }),
|
|
8028
|
+
/* @__PURE__ */ a.jsx("span", { children: f.label })
|
|
8020
8029
|
]
|
|
8021
8030
|
},
|
|
8022
|
-
|
|
8031
|
+
f.label
|
|
8023
8032
|
) : /* @__PURE__ */ a.jsxs(
|
|
8024
8033
|
"button",
|
|
8025
8034
|
{
|
|
8026
|
-
onClick: () =>
|
|
8035
|
+
onClick: () => d(f),
|
|
8027
8036
|
className: `flex items-center gap-3 py-3 px-4 cursor-pointer rounded-full w-full no-underline
|
|
8028
|
-
${
|
|
8037
|
+
${f.label === (c == null ? void 0 : c.label) ? "bg-color-blue-500 text-color-white font-medium " : "hover:bg-color-gray-50 text-color-gray-600 bg-color-transparent"}
|
|
8029
8038
|
`,
|
|
8030
8039
|
children: [
|
|
8031
|
-
/* @__PURE__ */ a.jsx("span", { className: "text-lg", children:
|
|
8032
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
8040
|
+
/* @__PURE__ */ a.jsx("span", { className: "text-lg", children: f.icon }),
|
|
8041
|
+
/* @__PURE__ */ a.jsx("span", { children: f.label })
|
|
8033
8042
|
]
|
|
8034
8043
|
},
|
|
8035
|
-
|
|
8044
|
+
f.label
|
|
8036
8045
|
)
|
|
8037
8046
|
) })
|
|
8038
8047
|
]
|
|
@@ -8063,9 +8072,9 @@ export {
|
|
|
8063
8072
|
wi as Drawer,
|
|
8064
8073
|
Li as Dropdown,
|
|
8065
8074
|
Pi as DropzoneUploader,
|
|
8066
|
-
|
|
8075
|
+
Yi as EmptyState,
|
|
8067
8076
|
je as IconButton,
|
|
8068
|
-
|
|
8077
|
+
Di as List,
|
|
8069
8078
|
Ti as ListItem,
|
|
8070
8079
|
pr as Menu,
|
|
8071
8080
|
mr as OtpInput,
|
|
@@ -8084,12 +8093,12 @@ export {
|
|
|
8084
8093
|
Vi as Slider,
|
|
8085
8094
|
Hi as Snackbar,
|
|
8086
8095
|
Ni as Stepper,
|
|
8087
|
-
|
|
8096
|
+
zi as Table,
|
|
8088
8097
|
aa as Tabs,
|
|
8089
8098
|
Ii as TextArea,
|
|
8090
8099
|
On as TextInput,
|
|
8091
8100
|
Wi as ToggleButton,
|
|
8092
|
-
|
|
8101
|
+
Zi as ToggleSwitch,
|
|
8093
8102
|
Ji as Tooltip,
|
|
8094
8103
|
si as Typography,
|
|
8095
8104
|
Ri as extendColorMap,
|