@unizap/uniui 1.0.40 → 1.0.42
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/README.md +41 -325
- package/dist/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.types.d.ts +2 -0
- package/dist/uniui.js +1067 -1061
- package/dist/uniui.umd.cjs +66 -66
- package/package.json +5 -2
package/dist/uniui.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as Vt from "react";
|
|
2
|
-
import Ce, { useRef as
|
|
3
|
-
import { createPortal as
|
|
2
|
+
import Ce, { useRef as pe, useState as K, useEffect as de, useMemo as Le, useReducer as eo, useCallback as oe, forwardRef as Oe, useImperativeHandle as Sn, Fragment as to, memo as no, useLayoutEffect as oo } from "react";
|
|
3
|
+
import { createPortal as Ie } from "react-dom";
|
|
4
4
|
function $n(e) {
|
|
5
5
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
6
|
}
|
|
7
|
-
var qe = { exports: {} },
|
|
7
|
+
var qe = { exports: {} }, Ae = {};
|
|
8
8
|
/**
|
|
9
9
|
* @license React
|
|
10
10
|
* react-jsx-runtime.production.js
|
|
@@ -16,7 +16,7 @@ var qe = { exports: {} }, Fe = {};
|
|
|
16
16
|
*/
|
|
17
17
|
var Ht;
|
|
18
18
|
function ro() {
|
|
19
|
-
if (Ht) return
|
|
19
|
+
if (Ht) return Ae;
|
|
20
20
|
Ht = 1;
|
|
21
21
|
var e = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
22
22
|
function t(o, r, i) {
|
|
@@ -34,9 +34,9 @@ function ro() {
|
|
|
34
34
|
props: i
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
return
|
|
37
|
+
return Ae.Fragment = n, Ae.jsx = t, Ae.jsxs = t, Ae;
|
|
38
38
|
}
|
|
39
|
-
var
|
|
39
|
+
var Ne = {};
|
|
40
40
|
/**
|
|
41
41
|
* @license React
|
|
42
42
|
* react-jsx-runtime.development.js
|
|
@@ -57,15 +57,15 @@ function io() {
|
|
|
57
57
|
switch (x) {
|
|
58
58
|
case f:
|
|
59
59
|
return "Fragment";
|
|
60
|
-
case
|
|
60
|
+
case y:
|
|
61
61
|
return "Profiler";
|
|
62
|
-
case
|
|
62
|
+
case w:
|
|
63
63
|
return "StrictMode";
|
|
64
64
|
case b:
|
|
65
65
|
return "Suspense";
|
|
66
|
-
case
|
|
66
|
+
case O:
|
|
67
67
|
return "SuspenseList";
|
|
68
|
-
case
|
|
68
|
+
case Y:
|
|
69
69
|
return "Activity";
|
|
70
70
|
}
|
|
71
71
|
if (typeof x == "object")
|
|
@@ -74,19 +74,19 @@ function io() {
|
|
|
74
74
|
), x.$$typeof) {
|
|
75
75
|
case v:
|
|
76
76
|
return "Portal";
|
|
77
|
-
case
|
|
77
|
+
case j:
|
|
78
78
|
return (x.displayName || "Context") + ".Provider";
|
|
79
|
-
case
|
|
79
|
+
case E:
|
|
80
80
|
return (x._context.displayName || "Context") + ".Consumer";
|
|
81
|
-
case
|
|
82
|
-
var
|
|
83
|
-
return x = x.displayName, x || (x =
|
|
84
|
-
case
|
|
85
|
-
return
|
|
81
|
+
case M:
|
|
82
|
+
var C = x.render;
|
|
83
|
+
return x = x.displayName, x || (x = C.displayName || C.name || "", x = x !== "" ? "ForwardRef(" + x + ")" : "ForwardRef"), x;
|
|
84
|
+
case F:
|
|
85
|
+
return C = x.displayName || null, C !== null ? C : e(x.type) || "Memo";
|
|
86
86
|
case H:
|
|
87
|
-
|
|
87
|
+
C = x._payload, x = x._init;
|
|
88
88
|
try {
|
|
89
|
-
return e(x(
|
|
89
|
+
return e(x(C));
|
|
90
90
|
} catch {
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -98,17 +98,17 @@ function io() {
|
|
|
98
98
|
function t(x) {
|
|
99
99
|
try {
|
|
100
100
|
n(x);
|
|
101
|
-
var
|
|
101
|
+
var C = !1;
|
|
102
102
|
} catch {
|
|
103
|
-
|
|
103
|
+
C = !0;
|
|
104
104
|
}
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
-
var
|
|
108
|
-
return
|
|
109
|
-
|
|
105
|
+
if (C) {
|
|
106
|
+
C = console;
|
|
107
|
+
var _ = C.error, $ = typeof Symbol == "function" && Symbol.toStringTag && x[Symbol.toStringTag] || x.constructor.name || "Object";
|
|
108
|
+
return _.call(
|
|
109
|
+
C,
|
|
110
110
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
111
|
-
|
|
111
|
+
$
|
|
112
112
|
), n(x);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
@@ -117,52 +117,52 @@ function io() {
|
|
|
117
117
|
if (typeof x == "object" && x !== null && x.$$typeof === H)
|
|
118
118
|
return "<...>";
|
|
119
119
|
try {
|
|
120
|
-
var
|
|
121
|
-
return
|
|
120
|
+
var C = e(x);
|
|
121
|
+
return C ? "<" + C + ">" : "<...>";
|
|
122
122
|
} catch {
|
|
123
123
|
return "<...>";
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
function r() {
|
|
127
|
-
var x =
|
|
127
|
+
var x = Z.A;
|
|
128
128
|
return x === null ? null : x.getOwner();
|
|
129
129
|
}
|
|
130
130
|
function i() {
|
|
131
131
|
return Error("react-stack-top-frame");
|
|
132
132
|
}
|
|
133
133
|
function l(x) {
|
|
134
|
-
if (
|
|
135
|
-
var
|
|
136
|
-
if (
|
|
134
|
+
if (se.call(x, "key")) {
|
|
135
|
+
var C = Object.getOwnPropertyDescriptor(x, "key").get;
|
|
136
|
+
if (C && C.isReactWarning) return !1;
|
|
137
137
|
}
|
|
138
138
|
return x.key !== void 0;
|
|
139
139
|
}
|
|
140
|
-
function s(x,
|
|
141
|
-
function
|
|
142
|
-
|
|
140
|
+
function s(x, C) {
|
|
141
|
+
function _() {
|
|
142
|
+
W || (W = !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
|
));
|
|
146
146
|
}
|
|
147
|
-
|
|
148
|
-
get:
|
|
147
|
+
_.isReactWarning = !0, Object.defineProperty(x, "key", {
|
|
148
|
+
get: _,
|
|
149
149
|
configurable: !0
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
function c() {
|
|
153
153
|
var x = e(this.type);
|
|
154
|
-
return
|
|
154
|
+
return N[x] || (N[x] = !0, console.error(
|
|
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 u(x,
|
|
159
|
-
return
|
|
158
|
+
function u(x, C, _, $, P, D, A, k) {
|
|
159
|
+
return _ = D.ref, x = {
|
|
160
160
|
$$typeof: g,
|
|
161
161
|
type: x,
|
|
162
|
-
key:
|
|
163
|
-
props:
|
|
164
|
-
_owner:
|
|
165
|
-
}, (
|
|
162
|
+
key: C,
|
|
163
|
+
props: D,
|
|
164
|
+
_owner: P
|
|
165
|
+
}, (_ !== void 0 ? _ : null) !== null ? Object.defineProperty(x, "ref", {
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
get: c
|
|
168
168
|
}) : Object.defineProperty(x, "ref", { enumerable: !1, value: null }), x._store = {}, Object.defineProperty(x._store, "validated", {
|
|
@@ -187,52 +187,52 @@ function io() {
|
|
|
187
187
|
value: k
|
|
188
188
|
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
|
|
189
189
|
}
|
|
190
|
-
function p(x,
|
|
191
|
-
var R =
|
|
190
|
+
function p(x, C, _, $, P, D, A, k) {
|
|
191
|
+
var R = C.children;
|
|
192
192
|
if (R !== void 0)
|
|
193
|
-
if (
|
|
193
|
+
if ($)
|
|
194
194
|
if (U(R)) {
|
|
195
|
-
for (
|
|
196
|
-
m(R[
|
|
195
|
+
for ($ = 0; $ < R.length; $++)
|
|
196
|
+
m(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
202
|
else m(R);
|
|
203
|
-
if (
|
|
203
|
+
if (se.call(C, "key")) {
|
|
204
204
|
R = e(x);
|
|
205
|
-
var
|
|
206
|
-
return
|
|
205
|
+
var I = Object.keys(C).filter(function(re) {
|
|
206
|
+
return re !== "key";
|
|
207
207
|
});
|
|
208
|
-
|
|
208
|
+
$ = 0 < I.length ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}", X[R + $] || (I = 0 < I.length ? "{" + I.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
209
209
|
`A props object containing a "key" prop is being spread into JSX:
|
|
210
210
|
let props = %s;
|
|
211
211
|
<%s {...props} />
|
|
212
212
|
React keys must be passed directly to JSX without using spread:
|
|
213
213
|
let props = %s;
|
|
214
214
|
<%s key={someKey} {...props} />`,
|
|
215
|
-
|
|
215
|
+
$,
|
|
216
216
|
R,
|
|
217
|
-
|
|
217
|
+
I,
|
|
218
218
|
R
|
|
219
|
-
),
|
|
219
|
+
), X[R + $] = !0);
|
|
220
220
|
}
|
|
221
|
-
if (R = null,
|
|
222
|
-
|
|
223
|
-
for (var
|
|
224
|
-
|
|
225
|
-
} else
|
|
221
|
+
if (R = null, _ !== void 0 && (t(_), R = "" + _), l(C) && (t(C.key), R = "" + C.key), "key" in C) {
|
|
222
|
+
_ = {};
|
|
223
|
+
for (var V in C)
|
|
224
|
+
V !== "key" && (_[V] = C[V]);
|
|
225
|
+
} else _ = C;
|
|
226
226
|
return R && s(
|
|
227
|
-
|
|
227
|
+
_,
|
|
228
228
|
typeof x == "function" ? x.displayName || x.name || "Unknown" : x
|
|
229
229
|
), u(
|
|
230
230
|
x,
|
|
231
231
|
R,
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
D,
|
|
233
|
+
P,
|
|
234
234
|
r(),
|
|
235
|
-
|
|
235
|
+
_,
|
|
236
236
|
A,
|
|
237
237
|
k
|
|
238
238
|
);
|
|
@@ -240,7 +240,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
240
240
|
function m(x) {
|
|
241
241
|
typeof x == "object" && x !== null && x.$$typeof === g && x._store && (x._store.validated = 1);
|
|
242
242
|
}
|
|
243
|
-
var d = Ce, g = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), f = Symbol.for("react.fragment"),
|
|
243
|
+
var d = Ce, g = Symbol.for("react.transitional.element"), v = Symbol.for("react.portal"), f = Symbol.for("react.fragment"), w = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), j = Symbol.for("react.context"), M = 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"), Y = Symbol.for("react.activity"), ee = Symbol.for("react.client.reference"), Z = d.__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
|
d = {
|
|
@@ -248,43 +248,43 @@ React keys must be passed directly to JSX without using spread:
|
|
|
248
248
|
return x();
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
var
|
|
251
|
+
var W, N = {}, J = d["react-stack-bottom-frame"].bind(
|
|
252
252
|
d,
|
|
253
253
|
i
|
|
254
|
-
)(),
|
|
255
|
-
|
|
256
|
-
var
|
|
254
|
+
)(), ge = z(o(i)), X = {};
|
|
255
|
+
Ne.Fragment = f, Ne.jsx = function(x, C, _, $, P) {
|
|
256
|
+
var D = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
257
257
|
return p(
|
|
258
258
|
x,
|
|
259
|
-
|
|
260
|
-
E,
|
|
261
|
-
!1,
|
|
259
|
+
C,
|
|
262
260
|
_,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
261
|
+
!1,
|
|
262
|
+
$,
|
|
263
|
+
P,
|
|
264
|
+
D ? Error("react-stack-top-frame") : J,
|
|
265
|
+
D ? z(o(x)) : ge
|
|
266
266
|
);
|
|
267
|
-
},
|
|
268
|
-
var
|
|
267
|
+
}, Ne.jsxs = function(x, C, _, $, P) {
|
|
268
|
+
var D = 1e4 > Z.recentlyCreatedOwnerStacks++;
|
|
269
269
|
return p(
|
|
270
270
|
x,
|
|
271
|
-
|
|
272
|
-
E,
|
|
273
|
-
!0,
|
|
271
|
+
C,
|
|
274
272
|
_,
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
273
|
+
!0,
|
|
274
|
+
$,
|
|
275
|
+
P,
|
|
276
|
+
D ? Error("react-stack-top-frame") : J,
|
|
277
|
+
D ? z(o(x)) : ge
|
|
278
278
|
);
|
|
279
279
|
};
|
|
280
|
-
}()),
|
|
280
|
+
}()), Ne;
|
|
281
281
|
}
|
|
282
282
|
var Bt;
|
|
283
283
|
function ao() {
|
|
284
284
|
return Bt || (Bt = 1, process.env.NODE_ENV === "production" ? qe.exports = ro() : qe.exports = io()), qe.exports;
|
|
285
285
|
}
|
|
286
286
|
var a = ao();
|
|
287
|
-
const
|
|
287
|
+
const xe = {
|
|
288
288
|
dark: {
|
|
289
289
|
filled: "bg-color-gray-800 text-color-gray-200 hover:bg-color-gray-900",
|
|
290
290
|
outline: "border-color-gray-900 text-color-gray-900 hover:bg-color-gray-50",
|
|
@@ -454,7 +454,7 @@ const me = {
|
|
|
454
454
|
text: "text-color-rose-500"
|
|
455
455
|
}
|
|
456
456
|
}, Ri = (e) => {
|
|
457
|
-
Object.assign(
|
|
457
|
+
Object.assign(xe, e);
|
|
458
458
|
}, St = {
|
|
459
459
|
dark: {
|
|
460
460
|
track: "bg-color-gray-200",
|
|
@@ -622,24 +622,24 @@ const me = {
|
|
|
622
622
|
autoFocus: g = !1,
|
|
623
623
|
href: v,
|
|
624
624
|
target: f,
|
|
625
|
-
...
|
|
625
|
+
...w
|
|
626
626
|
}) => {
|
|
627
627
|
var b;
|
|
628
|
-
const
|
|
629
|
-
const
|
|
630
|
-
if (!
|
|
631
|
-
const H = document.createElement("span"),
|
|
632
|
-
H.style.width = H.style.height = `${ee}px`, H.style.left = `${
|
|
633
|
-
},
|
|
628
|
+
const y = pe(null), E = pe(null), j = (O) => {
|
|
629
|
+
const F = y.current;
|
|
630
|
+
if (!F) return;
|
|
631
|
+
const H = document.createElement("span"), Y = F.getBoundingClientRect(), ee = Math.max(Y.width, Y.height);
|
|
632
|
+
H.style.width = H.style.height = `${ee}px`, H.style.left = `${O.clientX - Y.left - ee / 2}px`, H.style.top = `${O.clientY - Y.top - ee / 2}px`, H.className = "ripple", F.appendChild(H), setTimeout(() => H.remove(), 600), l == null || l(O);
|
|
633
|
+
}, M = ((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: E,
|
|
638
638
|
href: v,
|
|
639
639
|
target: f,
|
|
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
|
+
${M}
|
|
643
643
|
${s}
|
|
644
644
|
${m === "small" ? "text-sm h-8 px-3" : m === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
|
|
645
645
|
${c ? "w-full" : ""}
|
|
@@ -655,13 +655,13 @@ const me = {
|
|
|
655
655
|
) : /* @__PURE__ */ a.jsxs(
|
|
656
656
|
"button",
|
|
657
657
|
{
|
|
658
|
-
ref:
|
|
658
|
+
ref: y,
|
|
659
659
|
type: d,
|
|
660
660
|
disabled: u,
|
|
661
|
-
onClick:
|
|
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
|
+
${M}
|
|
665
665
|
${s}
|
|
666
666
|
${m === "small" ? "text-sm h-8 px-3" : m === "large" ? "text-lg h-12 px-6" : "text-base h-10 px-5"}
|
|
667
667
|
${c ? "w-full" : ""}
|
|
@@ -669,7 +669,7 @@ const me = {
|
|
|
669
669
|
${u ? `${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,
|
|
673
673
|
children: [
|
|
674
674
|
r && /* @__PURE__ */ a.jsx("span", { className: "mr-1", children: r }),
|
|
675
675
|
n || e,
|
|
@@ -742,8 +742,8 @@ const me = {
|
|
|
742
742
|
menuClassName: o = "",
|
|
743
743
|
stayOpenOnSelect: r = !1
|
|
744
744
|
}) => {
|
|
745
|
-
const [i, l] =
|
|
746
|
-
return
|
|
745
|
+
const [i, l] = K(!1), s = pe(null);
|
|
746
|
+
return de(() => {
|
|
747
747
|
const c = (u) => {
|
|
748
748
|
s.current && !s.current.contains(u.target) && l(!1);
|
|
749
749
|
};
|
|
@@ -801,11 +801,11 @@ 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, u = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, d = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121,
|
|
805
|
-
function
|
|
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, u = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, d = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
|
|
805
|
+
function j(b) {
|
|
806
806
|
if (typeof b == "object" && b !== null) {
|
|
807
|
-
var
|
|
808
|
-
switch (
|
|
807
|
+
var O = b.$$typeof;
|
|
808
|
+
switch (O) {
|
|
809
809
|
case n:
|
|
810
810
|
switch (b = b.type, b) {
|
|
811
811
|
case c:
|
|
@@ -824,44 +824,44 @@ function lo() {
|
|
|
824
824
|
case l:
|
|
825
825
|
return b;
|
|
826
826
|
default:
|
|
827
|
-
return
|
|
827
|
+
return O;
|
|
828
828
|
}
|
|
829
829
|
}
|
|
830
830
|
case t:
|
|
831
|
-
return
|
|
831
|
+
return O;
|
|
832
832
|
}
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
|
-
function
|
|
836
|
-
return
|
|
835
|
+
function M(b) {
|
|
836
|
+
return j(b) === u;
|
|
837
837
|
}
|
|
838
838
|
return te.AsyncMode = c, te.ConcurrentMode = u, te.ContextConsumer = s, te.ContextProvider = l, te.Element = n, te.ForwardRef = p, te.Fragment = o, te.Lazy = v, te.Memo = g, te.Portal = t, te.Profiler = i, te.StrictMode = r, te.Suspense = m, te.isAsyncMode = function(b) {
|
|
839
|
-
return
|
|
840
|
-
}, te.isConcurrentMode =
|
|
841
|
-
return
|
|
839
|
+
return M(b) || j(b) === c;
|
|
840
|
+
}, te.isConcurrentMode = M, te.isContextConsumer = function(b) {
|
|
841
|
+
return j(b) === s;
|
|
842
842
|
}, te.isContextProvider = function(b) {
|
|
843
|
-
return
|
|
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
|
|
847
|
+
return j(b) === p;
|
|
848
848
|
}, te.isFragment = function(b) {
|
|
849
|
-
return
|
|
849
|
+
return j(b) === o;
|
|
850
850
|
}, te.isLazy = function(b) {
|
|
851
|
-
return
|
|
851
|
+
return j(b) === v;
|
|
852
852
|
}, te.isMemo = function(b) {
|
|
853
|
-
return
|
|
853
|
+
return j(b) === g;
|
|
854
854
|
}, te.isPortal = function(b) {
|
|
855
|
-
return
|
|
855
|
+
return j(b) === t;
|
|
856
856
|
}, te.isProfiler = function(b) {
|
|
857
|
-
return
|
|
857
|
+
return j(b) === i;
|
|
858
858
|
}, te.isStrictMode = function(b) {
|
|
859
|
-
return
|
|
859
|
+
return j(b) === r;
|
|
860
860
|
}, te.isSuspense = function(b) {
|
|
861
|
-
return
|
|
861
|
+
return j(b) === m;
|
|
862
862
|
}, te.isValidElementType = function(b) {
|
|
863
|
-
return typeof b == "string" || typeof b == "function" || b === o || b === u || b === i || b === r || b === m || b === d || typeof b == "object" && b !== null && (b.$$typeof === v || b.$$typeof === g || b.$$typeof === l || b.$$typeof === s || b.$$typeof === p || b.$$typeof ===
|
|
864
|
-
}, te.typeOf =
|
|
863
|
+
return typeof b == "string" || typeof b == "function" || b === o || b === u || b === i || b === r || b === m || b === d || typeof b == "object" && b !== null && (b.$$typeof === v || b.$$typeof === g || b.$$typeof === l || b.$$typeof === s || b.$$typeof === p || b.$$typeof === w || b.$$typeof === y || b.$$typeof === E || b.$$typeof === f);
|
|
864
|
+
}, te.typeOf = j, te;
|
|
865
865
|
}
|
|
866
866
|
var ne = {};
|
|
867
867
|
/** @license React v16.13.1
|
|
@@ -875,84 +875,84 @@ var ne = {};
|
|
|
875
875
|
var Zt;
|
|
876
876
|
function so() {
|
|
877
877
|
return Zt || (Zt = 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, u = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, d = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121,
|
|
879
|
-
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, u = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, m = e ? Symbol.for("react.suspense") : 60113, d = e ? Symbol.for("react.suspense_list") : 60120, g = e ? Symbol.for("react.memo") : 60115, v = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, w = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
|
|
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 === u || S === i || S === r || S === m || S === d || typeof S == "object" && S !== null && (S.$$typeof === v || S.$$typeof === g || S.$$typeof === l || S.$$typeof === s || S.$$typeof === p || S.$$typeof ===
|
|
881
|
+
S === o || S === u || S === i || S === r || S === m || S === d || typeof S == "object" && S !== null && (S.$$typeof === v || S.$$typeof === g || S.$$typeof === l || S.$$typeof === s || S.$$typeof === p || S.$$typeof === w || S.$$typeof === y || S.$$typeof === E || S.$$typeof === f);
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function M(S) {
|
|
884
884
|
if (typeof S == "object" && S !== null) {
|
|
885
|
-
var
|
|
886
|
-
switch (
|
|
885
|
+
var h = S.$$typeof;
|
|
886
|
+
switch (h) {
|
|
887
887
|
case n:
|
|
888
|
-
var
|
|
889
|
-
switch (
|
|
888
|
+
var T = S.type;
|
|
889
|
+
switch (T) {
|
|
890
890
|
case c:
|
|
891
891
|
case u:
|
|
892
892
|
case o:
|
|
893
893
|
case i:
|
|
894
894
|
case r:
|
|
895
895
|
case m:
|
|
896
|
-
return
|
|
896
|
+
return T;
|
|
897
897
|
default:
|
|
898
|
-
var
|
|
899
|
-
switch (
|
|
898
|
+
var Q = T && T.$$typeof;
|
|
899
|
+
switch (Q) {
|
|
900
900
|
case s:
|
|
901
901
|
case p:
|
|
902
902
|
case v:
|
|
903
903
|
case g:
|
|
904
904
|
case l:
|
|
905
|
-
return
|
|
905
|
+
return Q;
|
|
906
906
|
default:
|
|
907
|
-
return
|
|
907
|
+
return h;
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
case t:
|
|
911
|
-
return
|
|
911
|
+
return h;
|
|
912
912
|
}
|
|
913
913
|
}
|
|
914
914
|
}
|
|
915
|
-
var b = c,
|
|
916
|
-
function
|
|
917
|
-
return
|
|
915
|
+
var b = c, O = u, F = s, H = l, Y = n, ee = p, Z = o, se = v, U = g, z = t, W = i, N = r, J = m, ge = !1;
|
|
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) || M(S) === c;
|
|
918
918
|
}
|
|
919
919
|
function x(S) {
|
|
920
|
-
return
|
|
921
|
-
}
|
|
922
|
-
function y(S) {
|
|
923
|
-
return L(S) === s;
|
|
920
|
+
return M(S) === u;
|
|
924
921
|
}
|
|
925
|
-
function
|
|
926
|
-
return
|
|
922
|
+
function C(S) {
|
|
923
|
+
return M(S) === s;
|
|
927
924
|
}
|
|
928
925
|
function _(S) {
|
|
926
|
+
return M(S) === l;
|
|
927
|
+
}
|
|
928
|
+
function $(S) {
|
|
929
929
|
return typeof S == "object" && S !== null && S.$$typeof === n;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
932
|
-
return
|
|
931
|
+
function P(S) {
|
|
932
|
+
return M(S) === p;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
return
|
|
934
|
+
function D(S) {
|
|
935
|
+
return M(S) === o;
|
|
936
936
|
}
|
|
937
937
|
function A(S) {
|
|
938
|
-
return
|
|
938
|
+
return M(S) === v;
|
|
939
939
|
}
|
|
940
940
|
function k(S) {
|
|
941
|
-
return
|
|
941
|
+
return M(S) === g;
|
|
942
942
|
}
|
|
943
943
|
function R(S) {
|
|
944
|
-
return
|
|
944
|
+
return M(S) === t;
|
|
945
|
+
}
|
|
946
|
+
function I(S) {
|
|
947
|
+
return M(S) === i;
|
|
945
948
|
}
|
|
946
949
|
function V(S) {
|
|
947
|
-
return
|
|
950
|
+
return M(S) === r;
|
|
948
951
|
}
|
|
949
|
-
function
|
|
950
|
-
return
|
|
952
|
+
function re(S) {
|
|
953
|
+
return M(S) === m;
|
|
951
954
|
}
|
|
952
|
-
|
|
953
|
-
return L(S) === m;
|
|
954
|
-
}
|
|
955
|
-
ne.AsyncMode = b, ne.ConcurrentMode = I, ne.ContextConsumer = T, ne.ContextProvider = H, ne.Element = N, ne.ForwardRef = ee, ne.Fragment = ie, ne.Lazy = ce, ne.Memo = U, ne.Portal = O, ne.Profiler = Y, ne.StrictMode = D, ne.Suspense = Q, ne.isAsyncMode = K, ne.isConcurrentMode = x, ne.isContextConsumer = y, ne.isContextProvider = E, ne.isElement = _, ne.isForwardRef = F, ne.isFragment = z, ne.isLazy = A, ne.isMemo = k, ne.isPortal = R, ne.isProfiler = V, ne.isStrictMode = q, ne.isSuspense = j, ne.isValidElementType = w, ne.typeOf = L;
|
|
955
|
+
ne.AsyncMode = b, ne.ConcurrentMode = O, ne.ContextConsumer = F, ne.ContextProvider = H, ne.Element = Y, ne.ForwardRef = ee, ne.Fragment = Z, ne.Lazy = se, ne.Memo = U, ne.Portal = z, ne.Profiler = W, ne.StrictMode = N, ne.Suspense = J, 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 = M;
|
|
956
956
|
}()), ne;
|
|
957
957
|
}
|
|
958
958
|
var Yt;
|
|
@@ -1090,236 +1090,236 @@ function po() {
|
|
|
1090
1090
|
return gt = function(s, c) {
|
|
1091
1091
|
var u = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator";
|
|
1092
1092
|
function m(x) {
|
|
1093
|
-
var
|
|
1094
|
-
if (typeof
|
|
1095
|
-
return
|
|
1093
|
+
var C = x && (u && x[u] || x[p]);
|
|
1094
|
+
if (typeof C == "function")
|
|
1095
|
+
return C;
|
|
1096
1096
|
}
|
|
1097
1097
|
var d = "<<anonymous>>", g = {
|
|
1098
|
-
array:
|
|
1099
|
-
bigint:
|
|
1100
|
-
bool:
|
|
1101
|
-
func:
|
|
1102
|
-
number:
|
|
1103
|
-
object:
|
|
1104
|
-
string:
|
|
1105
|
-
symbol:
|
|
1106
|
-
any:
|
|
1107
|
-
arrayOf:
|
|
1108
|
-
element:
|
|
1098
|
+
array: y("array"),
|
|
1099
|
+
bigint: y("bigint"),
|
|
1100
|
+
bool: y("boolean"),
|
|
1101
|
+
func: y("function"),
|
|
1102
|
+
number: y("number"),
|
|
1103
|
+
object: y("object"),
|
|
1104
|
+
string: y("string"),
|
|
1105
|
+
symbol: y("symbol"),
|
|
1106
|
+
any: E(),
|
|
1107
|
+
arrayOf: j,
|
|
1108
|
+
element: M(),
|
|
1109
1109
|
elementType: b(),
|
|
1110
|
-
instanceOf:
|
|
1110
|
+
instanceOf: O,
|
|
1111
1111
|
node: ee(),
|
|
1112
1112
|
objectOf: H,
|
|
1113
|
-
oneOf:
|
|
1114
|
-
oneOfType:
|
|
1115
|
-
shape:
|
|
1113
|
+
oneOf: F,
|
|
1114
|
+
oneOfType: Y,
|
|
1115
|
+
shape: se,
|
|
1116
1116
|
exact: U
|
|
1117
1117
|
};
|
|
1118
|
-
function v(x,
|
|
1119
|
-
return x ===
|
|
1118
|
+
function v(x, C) {
|
|
1119
|
+
return x === C ? x !== 0 || 1 / x === 1 / C : x !== x && C !== C;
|
|
1120
1120
|
}
|
|
1121
|
-
function f(x,
|
|
1122
|
-
this.message = x, this.data =
|
|
1121
|
+
function f(x, C) {
|
|
1122
|
+
this.message = x, this.data = C && typeof C == "object" ? C : {}, this.stack = "";
|
|
1123
1123
|
}
|
|
1124
1124
|
f.prototype = Error.prototype;
|
|
1125
|
-
function
|
|
1125
|
+
function w(x) {
|
|
1126
1126
|
if (process.env.NODE_ENV !== "production")
|
|
1127
|
-
var
|
|
1128
|
-
function
|
|
1129
|
-
if (R = R || d,
|
|
1127
|
+
var C = {}, _ = 0;
|
|
1128
|
+
function $(D, A, k, R, I, V, re) {
|
|
1129
|
+
if (R = R || d, 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"
|
|
1133
1133
|
);
|
|
1134
1134
|
throw S.name = "Invariant Violation", S;
|
|
1135
1135
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1136
|
-
var
|
|
1137
|
-
!
|
|
1138
|
-
|
|
1139
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
1140
|
-
),
|
|
1136
|
+
var h = R + ":" + k;
|
|
1137
|
+
!C[h] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1138
|
+
_ < 3 && (i(
|
|
1139
|
+
"You are manually calling a React.PropTypes validation function for the `" + V + "` prop on `" + R + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1140
|
+
), C[h] = !0, _++);
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
|
-
return A[k] == null ?
|
|
1143
|
+
return A[k] == null ? D ? A[k] === null ? new f("The " + I + " `" + V + "` is marked as required " + ("in `" + R + "`, but its value is `null`.")) : new f("The " + I + " `" + V + "` is marked as required in " + ("`" + R + "`, but its value is `undefined`.")) : null : x(A, k, R, I, V);
|
|
1144
1144
|
}
|
|
1145
|
-
var
|
|
1146
|
-
return
|
|
1145
|
+
var P = $.bind(null, !1);
|
|
1146
|
+
return P.isRequired = $.bind(null, !0), P;
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1149
|
-
function
|
|
1150
|
-
var R =
|
|
1151
|
-
if (
|
|
1152
|
-
var
|
|
1148
|
+
function y(x) {
|
|
1149
|
+
function C(_, $, P, D, A, k) {
|
|
1150
|
+
var R = _[$], I = N(R);
|
|
1151
|
+
if (I !== x) {
|
|
1152
|
+
var V = J(R);
|
|
1153
1153
|
return new f(
|
|
1154
|
-
"Invalid " +
|
|
1154
|
+
"Invalid " + D + " `" + A + "` of type " + ("`" + V + "` supplied to `" + P + "`, expected ") + ("`" + x + "`."),
|
|
1155
1155
|
{ expectedType: x }
|
|
1156
1156
|
);
|
|
1157
1157
|
}
|
|
1158
1158
|
return null;
|
|
1159
1159
|
}
|
|
1160
|
-
return
|
|
1160
|
+
return w(C);
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1163
|
-
return
|
|
1162
|
+
function E() {
|
|
1163
|
+
return w(l);
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1166
|
-
function
|
|
1165
|
+
function j(x) {
|
|
1166
|
+
function C(_, $, P, D, A) {
|
|
1167
1167
|
if (typeof x != "function")
|
|
1168
|
-
return new f("Property `" + A + "` of component `" +
|
|
1169
|
-
var k =
|
|
1168
|
+
return new f("Property `" + A + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
|
|
1169
|
+
var k = _[$];
|
|
1170
1170
|
if (!Array.isArray(k)) {
|
|
1171
|
-
var R =
|
|
1172
|
-
return new f("Invalid " +
|
|
1171
|
+
var R = N(k);
|
|
1172
|
+
return new f("Invalid " + D + " `" + A + "` of type " + ("`" + R + "` supplied to `" + P + "`, expected an array."));
|
|
1173
1173
|
}
|
|
1174
|
-
for (var
|
|
1175
|
-
var
|
|
1176
|
-
if (
|
|
1177
|
-
return
|
|
1174
|
+
for (var I = 0; I < k.length; I++) {
|
|
1175
|
+
var V = x(k, I, P, D, A + "[" + I + "]", t);
|
|
1176
|
+
if (V instanceof Error)
|
|
1177
|
+
return V;
|
|
1178
1178
|
}
|
|
1179
1179
|
return null;
|
|
1180
1180
|
}
|
|
1181
|
-
return
|
|
1181
|
+
return w(C);
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1184
|
-
function x(
|
|
1185
|
-
var A =
|
|
1183
|
+
function M() {
|
|
1184
|
+
function x(C, _, $, P, D) {
|
|
1185
|
+
var A = C[_];
|
|
1186
1186
|
if (!s(A)) {
|
|
1187
|
-
var k =
|
|
1188
|
-
return new f("Invalid " +
|
|
1187
|
+
var k = N(A);
|
|
1188
|
+
return new f("Invalid " + P + " `" + D + "` of type " + ("`" + k + "` supplied to `" + $ + "`, expected a single ReactElement."));
|
|
1189
1189
|
}
|
|
1190
1190
|
return null;
|
|
1191
1191
|
}
|
|
1192
|
-
return
|
|
1192
|
+
return w(x);
|
|
1193
1193
|
}
|
|
1194
1194
|
function b() {
|
|
1195
|
-
function x(
|
|
1196
|
-
var A =
|
|
1195
|
+
function x(C, _, $, P, D) {
|
|
1196
|
+
var A = C[_];
|
|
1197
1197
|
if (!e.isValidElementType(A)) {
|
|
1198
|
-
var k =
|
|
1199
|
-
return new f("Invalid " +
|
|
1198
|
+
var k = N(A);
|
|
1199
|
+
return new f("Invalid " + P + " `" + D + "` of type " + ("`" + k + "` supplied to `" + $ + "`, expected a single ReactElement type."));
|
|
1200
1200
|
}
|
|
1201
1201
|
return null;
|
|
1202
1202
|
}
|
|
1203
|
-
return
|
|
1203
|
+
return w(x);
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
function
|
|
1207
|
-
if (!(
|
|
1208
|
-
var k = x.name || d, R =
|
|
1209
|
-
return new f("Invalid " +
|
|
1205
|
+
function O(x) {
|
|
1206
|
+
function C(_, $, P, D, A) {
|
|
1207
|
+
if (!(_[$] instanceof x)) {
|
|
1208
|
+
var k = x.name || d, R = X(_[$]);
|
|
1209
|
+
return new f("Invalid " + D + " `" + A + "` of type " + ("`" + R + "` supplied to `" + P + "`, expected ") + ("instance of `" + k + "`."));
|
|
1210
1210
|
}
|
|
1211
1211
|
return null;
|
|
1212
1212
|
}
|
|
1213
|
-
return
|
|
1213
|
+
return w(C);
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1215
|
+
function F(x) {
|
|
1216
1216
|
if (!Array.isArray(x))
|
|
1217
1217
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
1218
1218
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1219
1219
|
) : i("Invalid argument supplied to oneOf, expected an array.")), l;
|
|
1220
|
-
function
|
|
1221
|
-
for (var k =
|
|
1220
|
+
function C(_, $, P, D, A) {
|
|
1221
|
+
for (var k = _[$], R = 0; R < x.length; R++)
|
|
1222
1222
|
if (v(k, x[R]))
|
|
1223
1223
|
return null;
|
|
1224
|
-
var
|
|
1225
|
-
var
|
|
1226
|
-
return
|
|
1224
|
+
var I = JSON.stringify(x, function(re, S) {
|
|
1225
|
+
var h = J(S);
|
|
1226
|
+
return h === "symbol" ? String(S) : S;
|
|
1227
1227
|
});
|
|
1228
|
-
return new f("Invalid " +
|
|
1228
|
+
return new f("Invalid " + D + " `" + A + "` of value `" + String(k) + "` " + ("supplied to `" + P + "`, expected one of " + I + "."));
|
|
1229
1229
|
}
|
|
1230
|
-
return
|
|
1230
|
+
return w(C);
|
|
1231
1231
|
}
|
|
1232
1232
|
function H(x) {
|
|
1233
|
-
function
|
|
1233
|
+
function C(_, $, P, D, A) {
|
|
1234
1234
|
if (typeof x != "function")
|
|
1235
|
-
return new f("Property `" + A + "` of component `" +
|
|
1236
|
-
var k =
|
|
1235
|
+
return new f("Property `" + A + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
|
|
1236
|
+
var k = _[$], R = N(k);
|
|
1237
1237
|
if (R !== "object")
|
|
1238
|
-
return new f("Invalid " +
|
|
1239
|
-
for (var
|
|
1240
|
-
if (o(k,
|
|
1241
|
-
var
|
|
1242
|
-
if (
|
|
1243
|
-
return
|
|
1238
|
+
return new f("Invalid " + D + " `" + A + "` of type " + ("`" + R + "` supplied to `" + P + "`, expected an object."));
|
|
1239
|
+
for (var I in k)
|
|
1240
|
+
if (o(k, I)) {
|
|
1241
|
+
var V = x(k, I, P, D, A + "." + I, t);
|
|
1242
|
+
if (V instanceof Error)
|
|
1243
|
+
return V;
|
|
1244
1244
|
}
|
|
1245
1245
|
return null;
|
|
1246
1246
|
}
|
|
1247
|
-
return
|
|
1247
|
+
return w(C);
|
|
1248
1248
|
}
|
|
1249
|
-
function
|
|
1249
|
+
function Y(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
|
-
for (var
|
|
1253
|
-
var
|
|
1254
|
-
if (typeof
|
|
1252
|
+
for (var C = 0; C < x.length; C++) {
|
|
1253
|
+
var _ = x[C];
|
|
1254
|
+
if (typeof _ != "function")
|
|
1255
1255
|
return i(
|
|
1256
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
1256
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ge(_) + " at index " + C + "."
|
|
1257
1257
|
), l;
|
|
1258
1258
|
}
|
|
1259
|
-
function
|
|
1260
|
-
for (var
|
|
1261
|
-
var
|
|
1259
|
+
function $(P, D, A, k, R) {
|
|
1260
|
+
for (var I = [], V = 0; V < x.length; V++) {
|
|
1261
|
+
var re = x[V], S = re(P, D, A, k, R, t);
|
|
1262
1262
|
if (S == null)
|
|
1263
1263
|
return null;
|
|
1264
|
-
S.data && o(S.data, "expectedType") &&
|
|
1264
|
+
S.data && o(S.data, "expectedType") && I.push(S.data.expectedType);
|
|
1265
1265
|
}
|
|
1266
|
-
var
|
|
1267
|
-
return new f("Invalid " + k + " `" + R + "` supplied to " + ("`" + A + "`" +
|
|
1266
|
+
var h = I.length > 0 ? ", expected one of type [" + I.join(", ") + "]" : "";
|
|
1267
|
+
return new f("Invalid " + k + " `" + R + "` supplied to " + ("`" + A + "`" + h + "."));
|
|
1268
1268
|
}
|
|
1269
|
-
return
|
|
1269
|
+
return w($);
|
|
1270
1270
|
}
|
|
1271
1271
|
function ee() {
|
|
1272
|
-
function x(
|
|
1273
|
-
return
|
|
1272
|
+
function x(C, _, $, P, D) {
|
|
1273
|
+
return z(C[_]) ? null : new f("Invalid " + P + " `" + D + "` supplied to " + ("`" + $ + "`, expected a ReactNode."));
|
|
1274
1274
|
}
|
|
1275
|
-
return
|
|
1275
|
+
return w(x);
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function Z(x, C, _, $, P) {
|
|
1278
1278
|
return new f(
|
|
1279
|
-
(x || "React class") + ": " +
|
|
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
|
}
|
|
1282
|
-
function
|
|
1283
|
-
function
|
|
1284
|
-
var k =
|
|
1282
|
+
function se(x) {
|
|
1283
|
+
function C(_, $, P, D, A) {
|
|
1284
|
+
var k = _[$], R = N(k);
|
|
1285
1285
|
if (R !== "object")
|
|
1286
|
-
return new f("Invalid " +
|
|
1287
|
-
for (var
|
|
1288
|
-
var
|
|
1289
|
-
if (typeof
|
|
1290
|
-
return
|
|
1291
|
-
var
|
|
1292
|
-
if (
|
|
1293
|
-
return
|
|
1286
|
+
return new f("Invalid " + D + " `" + A + "` of type `" + R + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
1287
|
+
for (var I in x) {
|
|
1288
|
+
var V = x[I];
|
|
1289
|
+
if (typeof V != "function")
|
|
1290
|
+
return Z(P, D, A, I, J(V));
|
|
1291
|
+
var re = V(k, I, P, D, A + "." + I, t);
|
|
1292
|
+
if (re)
|
|
1293
|
+
return re;
|
|
1294
1294
|
}
|
|
1295
1295
|
return null;
|
|
1296
1296
|
}
|
|
1297
|
-
return
|
|
1297
|
+
return w(C);
|
|
1298
1298
|
}
|
|
1299
1299
|
function U(x) {
|
|
1300
|
-
function
|
|
1301
|
-
var k =
|
|
1300
|
+
function C(_, $, P, D, A) {
|
|
1301
|
+
var k = _[$], R = N(k);
|
|
1302
1302
|
if (R !== "object")
|
|
1303
|
-
return new f("Invalid " +
|
|
1304
|
-
var
|
|
1305
|
-
for (var
|
|
1306
|
-
var
|
|
1307
|
-
if (o(x,
|
|
1308
|
-
return
|
|
1309
|
-
if (!
|
|
1303
|
+
return new f("Invalid " + D + " `" + A + "` of type `" + R + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
1304
|
+
var I = n({}, _[$], x);
|
|
1305
|
+
for (var V in I) {
|
|
1306
|
+
var re = x[V];
|
|
1307
|
+
if (o(x, V) && typeof re != "function")
|
|
1308
|
+
return Z(P, D, A, V, J(re));
|
|
1309
|
+
if (!re)
|
|
1310
1310
|
return new f(
|
|
1311
|
-
"Invalid " +
|
|
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
|
);
|
|
1314
|
-
var S =
|
|
1314
|
+
var S = re(k, V, P, D, A + "." + V, t);
|
|
1315
1315
|
if (S)
|
|
1316
1316
|
return S;
|
|
1317
1317
|
}
|
|
1318
1318
|
return null;
|
|
1319
1319
|
}
|
|
1320
|
-
return
|
|
1320
|
+
return w(C);
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function z(x) {
|
|
1323
1323
|
switch (typeof x) {
|
|
1324
1324
|
case "number":
|
|
1325
1325
|
case "string":
|
|
@@ -1329,20 +1329,20 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1329
1329
|
return !x;
|
|
1330
1330
|
case "object":
|
|
1331
1331
|
if (Array.isArray(x))
|
|
1332
|
-
return x.every(
|
|
1332
|
+
return x.every(z);
|
|
1333
1333
|
if (x === null || s(x))
|
|
1334
1334
|
return !0;
|
|
1335
|
-
var
|
|
1336
|
-
if (
|
|
1337
|
-
var
|
|
1338
|
-
if (
|
|
1339
|
-
for (; !(
|
|
1340
|
-
if (!
|
|
1335
|
+
var C = m(x);
|
|
1336
|
+
if (C) {
|
|
1337
|
+
var _ = C.call(x), $;
|
|
1338
|
+
if (C !== x.entries) {
|
|
1339
|
+
for (; !($ = _.next()).done; )
|
|
1340
|
+
if (!z($.value))
|
|
1341
1341
|
return !1;
|
|
1342
1342
|
} else
|
|
1343
|
-
for (; !(
|
|
1344
|
-
var
|
|
1345
|
-
if (
|
|
1343
|
+
for (; !($ = _.next()).done; ) {
|
|
1344
|
+
var P = $.value;
|
|
1345
|
+
if (P && !z(P[1]))
|
|
1346
1346
|
return !1;
|
|
1347
1347
|
}
|
|
1348
1348
|
} else
|
|
@@ -1352,40 +1352,40 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1352
1352
|
return !1;
|
|
1353
1353
|
}
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return x === "symbol" ? !0 :
|
|
1355
|
+
function W(x, C) {
|
|
1356
|
+
return x === "symbol" ? !0 : C ? C["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && C instanceof Symbol : !1;
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1359
|
-
var
|
|
1360
|
-
return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" :
|
|
1358
|
+
function N(x) {
|
|
1359
|
+
var C = typeof x;
|
|
1360
|
+
return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : W(C, x) ? "symbol" : C;
|
|
1361
1361
|
}
|
|
1362
|
-
function
|
|
1362
|
+
function J(x) {
|
|
1363
1363
|
if (typeof x > "u" || x === null)
|
|
1364
1364
|
return "" + x;
|
|
1365
|
-
var
|
|
1366
|
-
if (
|
|
1365
|
+
var C = N(x);
|
|
1366
|
+
if (C === "object") {
|
|
1367
1367
|
if (x instanceof Date)
|
|
1368
1368
|
return "date";
|
|
1369
1369
|
if (x instanceof RegExp)
|
|
1370
1370
|
return "regexp";
|
|
1371
1371
|
}
|
|
1372
|
-
return
|
|
1372
|
+
return C;
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1375
|
-
var
|
|
1376
|
-
switch (
|
|
1374
|
+
function ge(x) {
|
|
1375
|
+
var C = J(x);
|
|
1376
|
+
switch (C) {
|
|
1377
1377
|
case "array":
|
|
1378
1378
|
case "object":
|
|
1379
|
-
return "an " +
|
|
1379
|
+
return "an " + C;
|
|
1380
1380
|
case "boolean":
|
|
1381
1381
|
case "date":
|
|
1382
1382
|
case "regexp":
|
|
1383
|
-
return "a " +
|
|
1383
|
+
return "a " + C;
|
|
1384
1384
|
default:
|
|
1385
|
-
return
|
|
1385
|
+
return C;
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function X(x) {
|
|
1389
1389
|
return !x.constructor || !x.constructor.name ? d : x.constructor.name;
|
|
1390
1390
|
}
|
|
1391
1391
|
return g.checkPropTypes = r, g.resetWarningCache = r.resetWarningCache, g.PropTypes = g, g;
|
|
@@ -1450,8 +1450,8 @@ function fo() {
|
|
|
1450
1450
|
return Be.exports;
|
|
1451
1451
|
}
|
|
1452
1452
|
var mo = /* @__PURE__ */ fo();
|
|
1453
|
-
const
|
|
1454
|
-
function
|
|
1453
|
+
const ie = /* @__PURE__ */ $n(mo);
|
|
1454
|
+
function Ee(e, n, t, o) {
|
|
1455
1455
|
function r(i) {
|
|
1456
1456
|
return i instanceof t ? i : new t(function(l) {
|
|
1457
1457
|
l(i);
|
|
@@ -2681,7 +2681,7 @@ const xo = /* @__PURE__ */ new Map([
|
|
|
2681
2681
|
["zmm", "application/vnd.handheld-entertainment+xml"],
|
|
2682
2682
|
["zsh", "text/x-scriptzsh"]
|
|
2683
2683
|
]);
|
|
2684
|
-
function
|
|
2684
|
+
function Pe(e, n, t) {
|
|
2685
2685
|
const o = vo(e), { webkitRelativePath: r } = e, i = typeof n == "string" ? n : typeof r == "string" && r.length > 0 ? r : `./${e.name}`;
|
|
2686
2686
|
return typeof o.path != "string" && tn(o, "path", i), tn(o, "relativePath", i), o;
|
|
2687
2687
|
}
|
|
@@ -2714,7 +2714,7 @@ const ho = [
|
|
|
2714
2714
|
// Windows
|
|
2715
2715
|
];
|
|
2716
2716
|
function bo(e) {
|
|
2717
|
-
return
|
|
2717
|
+
return Ee(this, void 0, void 0, function* () {
|
|
2718
2718
|
return Je(e) && wo(e.dataTransfer) ? So(e.dataTransfer, e.type) : yo(e) ? Co(e) : Array.isArray(e) && e.every((n) => "getFile" in n && typeof n.getFile == "function") ? jo(e) : [];
|
|
2719
2719
|
});
|
|
2720
2720
|
}
|
|
@@ -2728,15 +2728,15 @@ function Je(e) {
|
|
|
2728
2728
|
return typeof e == "object" && e !== null;
|
|
2729
2729
|
}
|
|
2730
2730
|
function Co(e) {
|
|
2731
|
-
return kt(e.target.files).map((n) =>
|
|
2731
|
+
return kt(e.target.files).map((n) => Pe(n));
|
|
2732
2732
|
}
|
|
2733
2733
|
function jo(e) {
|
|
2734
|
-
return
|
|
2735
|
-
return (yield Promise.all(e.map((t) => t.getFile()))).map((t) =>
|
|
2734
|
+
return Ee(this, void 0, void 0, function* () {
|
|
2735
|
+
return (yield Promise.all(e.map((t) => t.getFile()))).map((t) => Pe(t));
|
|
2736
2736
|
});
|
|
2737
2737
|
}
|
|
2738
2738
|
function So(e, n) {
|
|
2739
|
-
return
|
|
2739
|
+
return Ee(this, void 0, void 0, function* () {
|
|
2740
2740
|
if (e.items) {
|
|
2741
2741
|
const t = kt(e.items).filter((r) => r.kind === "file");
|
|
2742
2742
|
if (n !== "drop")
|
|
@@ -2744,7 +2744,7 @@ function So(e, n) {
|
|
|
2744
2744
|
const o = yield Promise.all(t.map($o));
|
|
2745
2745
|
return nn(_n(o));
|
|
2746
2746
|
}
|
|
2747
|
-
return nn(kt(e.files).map((t) =>
|
|
2747
|
+
return nn(kt(e.files).map((t) => Pe(t)));
|
|
2748
2748
|
});
|
|
2749
2749
|
}
|
|
2750
2750
|
function nn(e) {
|
|
@@ -2773,7 +2773,7 @@ function _n(e) {
|
|
|
2773
2773
|
], []);
|
|
2774
2774
|
}
|
|
2775
2775
|
function on(e, n) {
|
|
2776
|
-
return
|
|
2776
|
+
return Ee(this, void 0, void 0, function* () {
|
|
2777
2777
|
var t;
|
|
2778
2778
|
if (globalThis.isSecureContext && typeof e.getAsFileSystemHandle == "function") {
|
|
2779
2779
|
const i = yield e.getAsFileSystemHandle();
|
|
@@ -2781,17 +2781,17 @@ function on(e, n) {
|
|
|
2781
2781
|
throw new Error(`${e} is not a File`);
|
|
2782
2782
|
if (i !== void 0) {
|
|
2783
2783
|
const l = yield i.getFile();
|
|
2784
|
-
return l.handle = i,
|
|
2784
|
+
return l.handle = i, Pe(l);
|
|
2785
2785
|
}
|
|
2786
2786
|
}
|
|
2787
2787
|
const o = e.getAsFile();
|
|
2788
2788
|
if (!o)
|
|
2789
2789
|
throw new Error(`${e} is not a File`);
|
|
2790
|
-
return
|
|
2790
|
+
return Pe(o, (t = n == null ? void 0 : n.fullPath) !== null && t !== void 0 ? t : void 0);
|
|
2791
2791
|
});
|
|
2792
2792
|
}
|
|
2793
2793
|
function ko(e) {
|
|
2794
|
-
return
|
|
2794
|
+
return Ee(this, void 0, void 0, function* () {
|
|
2795
2795
|
return e.isDirectory ? En(e) : Ro(e);
|
|
2796
2796
|
});
|
|
2797
2797
|
}
|
|
@@ -2800,7 +2800,7 @@ function En(e) {
|
|
|
2800
2800
|
return new Promise((t, o) => {
|
|
2801
2801
|
const r = [];
|
|
2802
2802
|
function i() {
|
|
2803
|
-
n.readEntries((l) =>
|
|
2803
|
+
n.readEntries((l) => Ee(this, void 0, void 0, function* () {
|
|
2804
2804
|
if (l.length) {
|
|
2805
2805
|
const s = Promise.all(l.map(ko));
|
|
2806
2806
|
r.push(s), i();
|
|
@@ -2819,10 +2819,10 @@ function En(e) {
|
|
|
2819
2819
|
});
|
|
2820
2820
|
}
|
|
2821
2821
|
function Ro(e) {
|
|
2822
|
-
return
|
|
2822
|
+
return Ee(this, void 0, void 0, function* () {
|
|
2823
2823
|
return new Promise((n, t) => {
|
|
2824
2824
|
e.file((o) => {
|
|
2825
|
-
const r =
|
|
2825
|
+
const r = Pe(o, e.fullPath);
|
|
2826
2826
|
n(r);
|
|
2827
2827
|
}, (o) => {
|
|
2828
2828
|
t(o);
|
|
@@ -2885,7 +2885,7 @@ function sn(e) {
|
|
|
2885
2885
|
function Mn(e, n, t) {
|
|
2886
2886
|
return n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
|
|
2887
2887
|
}
|
|
2888
|
-
function
|
|
2888
|
+
function Te(e, n) {
|
|
2889
2889
|
return No(e) || Ao(e, n) || Ln(e, n) || Fo();
|
|
2890
2890
|
}
|
|
2891
2891
|
function Fo() {
|
|
@@ -2953,23 +2953,23 @@ function Pn(e, n) {
|
|
|
2953
2953
|
return [t, t ? null : Vo(n)];
|
|
2954
2954
|
}
|
|
2955
2955
|
function Fn(e, n, t) {
|
|
2956
|
-
if (
|
|
2957
|
-
if (
|
|
2956
|
+
if (_e(e.size))
|
|
2957
|
+
if (_e(n) && _e(t)) {
|
|
2958
2958
|
if (e.size > t) return [!1, cn(t)];
|
|
2959
2959
|
if (e.size < n) return [!1, un(n)];
|
|
2960
2960
|
} else {
|
|
2961
|
-
if (
|
|
2962
|
-
if (
|
|
2961
|
+
if (_e(n) && e.size < n) return [!1, un(n)];
|
|
2962
|
+
if (_e(t) && e.size > t) return [!1, cn(t)];
|
|
2963
2963
|
}
|
|
2964
2964
|
return [!0, null];
|
|
2965
2965
|
}
|
|
2966
|
-
function
|
|
2966
|
+
function _e(e) {
|
|
2967
2967
|
return e != null;
|
|
2968
2968
|
}
|
|
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 u = Pn(c, t), p =
|
|
2972
|
+
var u = Pn(c, t), p = Te(u, 1), m = p[0], d = Fn(c, o, r), g = Te(d, 1), v = g[0], f = s ? s(c) : null;
|
|
2973
2973
|
return m && v && !f;
|
|
2974
2974
|
});
|
|
2975
2975
|
}
|
|
@@ -3009,12 +3009,12 @@ function Yo() {
|
|
|
3009
3009
|
return "showOpenFilePicker" in window;
|
|
3010
3010
|
}
|
|
3011
3011
|
function Wo(e) {
|
|
3012
|
-
if (
|
|
3012
|
+
if (_e(e)) {
|
|
3013
3013
|
var n = Object.entries(e).filter(function(t) {
|
|
3014
|
-
var o =
|
|
3014
|
+
var o = Te(t, 2), r = o[0], i = o[1], l = !0;
|
|
3015
3015
|
return An(r) || (console.warn('Skipped "'.concat(r, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), l = !1), (!Array.isArray(i) || !i.every(Nn)) && (console.warn('Skipped "'.concat(r, '" because an invalid file extension was provided.')), l = !1), l;
|
|
3016
3016
|
}).reduce(function(t, o) {
|
|
3017
|
-
var r =
|
|
3017
|
+
var r = Te(o, 2), i = r[0], l = r[1];
|
|
3018
3018
|
return sn(sn({}, t), {}, Mn({}, i, l));
|
|
3019
3019
|
}, {});
|
|
3020
3020
|
return [{
|
|
@@ -3026,9 +3026,9 @@ function Wo(e) {
|
|
|
3026
3026
|
return e;
|
|
3027
3027
|
}
|
|
3028
3028
|
function Uo(e) {
|
|
3029
|
-
if (
|
|
3029
|
+
if (_e(e))
|
|
3030
3030
|
return Object.entries(e).reduce(function(n, t) {
|
|
3031
|
-
var o =
|
|
3031
|
+
var o = Te(t, 2), r = o[0], i = o[1];
|
|
3032
3032
|
return [].concat(an(n), [r], an(i));
|
|
3033
3033
|
}, []).filter(function(n) {
|
|
3034
3034
|
return An(n) || Nn(n);
|
|
@@ -3113,7 +3113,7 @@ function dn(e, n) {
|
|
|
3113
3113
|
}
|
|
3114
3114
|
return t;
|
|
3115
3115
|
}
|
|
3116
|
-
function
|
|
3116
|
+
function ue(e) {
|
|
3117
3117
|
for (var n = 1; n < arguments.length; n++) {
|
|
3118
3118
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
3119
3119
|
n % 2 ? dn(Object(t), !0).forEach(function(o) {
|
|
@@ -3144,13 +3144,13 @@ 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 zt = /* @__PURE__ */
|
|
3147
|
+
var zt = /* @__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 {
|
|
3151
3151
|
open: i
|
|
3152
3152
|
};
|
|
3153
|
-
}, [i]), /* @__PURE__ */ Ce.createElement(to, null, t(
|
|
3153
|
+
}, [i]), /* @__PURE__ */ Ce.createElement(to, null, t(ue(ue({}, l), {}, {
|
|
3154
3154
|
open: i
|
|
3155
3155
|
})));
|
|
3156
3156
|
});
|
|
@@ -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: ie.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: ie.objectOf(ie.arrayOf(ie.string)),
|
|
3200
3200
|
/**
|
|
3201
3201
|
* Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
|
3202
3202
|
*/
|
|
3203
|
-
multiple:
|
|
3203
|
+
multiple: ie.bool,
|
|
3204
3204
|
/**
|
|
3205
3205
|
* If false, allow dropped items to take over the current browser window
|
|
3206
3206
|
*/
|
|
3207
|
-
preventDropOnDocument:
|
|
3207
|
+
preventDropOnDocument: ie.bool,
|
|
3208
3208
|
/**
|
|
3209
3209
|
* If true, disables click to open the native file selection dialog
|
|
3210
3210
|
*/
|
|
3211
|
-
noClick:
|
|
3211
|
+
noClick: ie.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: ie.bool,
|
|
3217
3217
|
/**
|
|
3218
3218
|
* If true, disables drag 'n' drop
|
|
3219
3219
|
*/
|
|
3220
|
-
noDrag:
|
|
3220
|
+
noDrag: ie.bool,
|
|
3221
3221
|
/**
|
|
3222
3222
|
* If true, stops drag event propagation to parents
|
|
3223
3223
|
*/
|
|
3224
|
-
noDragEventsBubbling:
|
|
3224
|
+
noDragEventsBubbling: ie.bool,
|
|
3225
3225
|
/**
|
|
3226
3226
|
* Minimum file size (in bytes)
|
|
3227
3227
|
*/
|
|
3228
|
-
minSize:
|
|
3228
|
+
minSize: ie.number,
|
|
3229
3229
|
/**
|
|
3230
3230
|
* Maximum file size (in bytes)
|
|
3231
3231
|
*/
|
|
3232
|
-
maxSize:
|
|
3232
|
+
maxSize: ie.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: ie.number,
|
|
3238
3238
|
/**
|
|
3239
3239
|
* Enable/disable the dropzone
|
|
3240
3240
|
*/
|
|
3241
|
-
disabled:
|
|
3241
|
+
disabled: ie.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: ie.func,
|
|
3248
3248
|
/**
|
|
3249
3249
|
* Cb for when closing the file dialog with no selection
|
|
3250
3250
|
*/
|
|
3251
|
-
onFileDialogCancel:
|
|
3251
|
+
onFileDialogCancel: ie.func,
|
|
3252
3252
|
/**
|
|
3253
3253
|
* Cb for when opening the file dialog
|
|
3254
3254
|
*/
|
|
3255
|
-
onFileDialogOpen:
|
|
3255
|
+
onFileDialogOpen: ie.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: ie.bool,
|
|
3261
3261
|
/**
|
|
3262
3262
|
* Set to true to focus the root element on render
|
|
3263
3263
|
*/
|
|
3264
|
-
autoFocus:
|
|
3264
|
+
autoFocus: ie.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: ie.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: ie.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: ie.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: ie.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: ie.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: ie.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: ie.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: ie.func
|
|
3342
3342
|
};
|
|
3343
3343
|
var Mt = {
|
|
3344
3344
|
isFocused: !1,
|
|
@@ -3350,185 +3350,185 @@ var Mt = {
|
|
|
3350
3350
|
fileRejections: []
|
|
3351
3351
|
};
|
|
3352
3352
|
function Tn() {
|
|
3353
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n =
|
|
3353
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = ue(ue({}, zn), e), t = n.accept, o = n.disabled, r = n.getFilesFromEvent, i = n.maxSize, l = n.minSize, s = n.multiple, c = n.maxFiles, u = n.onDragEnter, p = n.onDragLeave, m = n.onDragOver, d = n.onDrop, g = n.onDropAccepted, v = n.onDropRejected, f = n.onFileDialogCancel, w = n.onFileDialogOpen, y = n.useFsAccessApi, E = n.autoFocus, j = n.preventDropOnDocument, M = n.noClick, b = n.noKeyboard, O = n.noDrag, F = n.noDragEventsBubbling, H = n.onError, Y = n.validator, ee = Le(function() {
|
|
3354
3354
|
return Uo(t);
|
|
3355
|
-
}, [t]),
|
|
3355
|
+
}, [t]), Z = Le(function() {
|
|
3356
3356
|
return Wo(t);
|
|
3357
|
-
}, [t]),
|
|
3358
|
-
return typeof
|
|
3359
|
-
}, [
|
|
3357
|
+
}, [t]), se = Le(function() {
|
|
3358
|
+
return typeof w == "function" ? w : gn;
|
|
3359
|
+
}, [w]), U = Le(function() {
|
|
3360
3360
|
return typeof f == "function" ? f : gn;
|
|
3361
|
-
}, [f]),
|
|
3362
|
-
!
|
|
3363
|
-
if (
|
|
3364
|
-
var
|
|
3365
|
-
|
|
3361
|
+
}, [f]), z = pe(null), W = pe(null), N = eo(ur, Mt), J = xt(N, 2), ge = J[0], X = J[1], x = ge.isFocused, C = ge.isFileDialogActive, _ = pe(typeof window < "u" && window.isSecureContext && y && Yo()), $ = function() {
|
|
3362
|
+
!_.current && C && setTimeout(function() {
|
|
3363
|
+
if (W.current) {
|
|
3364
|
+
var q = W.current.files;
|
|
3365
|
+
q.length || (X({
|
|
3366
3366
|
type: "closeDialog"
|
|
3367
3367
|
}), U());
|
|
3368
3368
|
}
|
|
3369
3369
|
}, 300);
|
|
3370
3370
|
};
|
|
3371
|
-
|
|
3372
|
-
return window.addEventListener("focus",
|
|
3373
|
-
window.removeEventListener("focus",
|
|
3371
|
+
de(function() {
|
|
3372
|
+
return window.addEventListener("focus", $, !1), function() {
|
|
3373
|
+
window.removeEventListener("focus", $, !1);
|
|
3374
3374
|
};
|
|
3375
|
-
}, [
|
|
3376
|
-
var
|
|
3377
|
-
|
|
3375
|
+
}, [W, C, U, _]);
|
|
3376
|
+
var P = pe([]), D = function(q) {
|
|
3377
|
+
z.current && z.current.contains(q.target) || (q.preventDefault(), P.current = []);
|
|
3378
3378
|
};
|
|
3379
|
-
|
|
3380
|
-
return
|
|
3381
|
-
|
|
3379
|
+
de(function() {
|
|
3380
|
+
return j && (document.addEventListener("dragover", pn, !1), document.addEventListener("drop", D, !1)), function() {
|
|
3381
|
+
j && (document.removeEventListener("dragover", pn), document.removeEventListener("drop", D));
|
|
3382
3382
|
};
|
|
3383
|
-
}, [
|
|
3384
|
-
return !o &&
|
|
3383
|
+
}, [z, j]), de(function() {
|
|
3384
|
+
return !o && E && z.current && z.current.focus(), function() {
|
|
3385
3385
|
};
|
|
3386
|
-
}, [
|
|
3387
|
-
var A = oe(function(
|
|
3388
|
-
H ? H(
|
|
3389
|
-
}, [H]), k = oe(function(
|
|
3390
|
-
|
|
3391
|
-
if (!(Qe(
|
|
3392
|
-
var
|
|
3393
|
-
files:
|
|
3386
|
+
}, [z, E, o]);
|
|
3387
|
+
var A = oe(function(L) {
|
|
3388
|
+
H ? H(L) : console.error(L);
|
|
3389
|
+
}, [H]), k = oe(function(L) {
|
|
3390
|
+
L.preventDefault(), L.persist(), Ve(L), P.current = [].concat(nr(P.current), [L.target]), Ye(L) && Promise.resolve(r(L)).then(function(q) {
|
|
3391
|
+
if (!(Qe(L) && !F)) {
|
|
3392
|
+
var fe = q.length, me = fe > 0 && qo({
|
|
3393
|
+
files: q,
|
|
3394
3394
|
accept: ee,
|
|
3395
3395
|
minSize: l,
|
|
3396
3396
|
maxSize: i,
|
|
3397
3397
|
multiple: s,
|
|
3398
3398
|
maxFiles: c,
|
|
3399
|
-
validator:
|
|
3400
|
-
}), he =
|
|
3401
|
-
|
|
3402
|
-
isDragAccept:
|
|
3399
|
+
validator: Y
|
|
3400
|
+
}), he = fe > 0 && !me;
|
|
3401
|
+
X({
|
|
3402
|
+
isDragAccept: me,
|
|
3403
3403
|
isDragReject: he,
|
|
3404
3404
|
isDragActive: !0,
|
|
3405
3405
|
type: "setDraggedFiles"
|
|
3406
|
-
}), u && u(
|
|
3406
|
+
}), u && u(L);
|
|
3407
3407
|
}
|
|
3408
|
-
}).catch(function(
|
|
3409
|
-
return A(
|
|
3408
|
+
}).catch(function(q) {
|
|
3409
|
+
return A(q);
|
|
3410
3410
|
});
|
|
3411
|
-
}, [r, u, A,
|
|
3412
|
-
|
|
3413
|
-
var
|
|
3414
|
-
if (
|
|
3411
|
+
}, [r, u, A, F, ee, l, i, s, c, Y]), R = oe(function(L) {
|
|
3412
|
+
L.preventDefault(), L.persist(), Ve(L);
|
|
3413
|
+
var q = Ye(L);
|
|
3414
|
+
if (q && L.dataTransfer)
|
|
3415
3415
|
try {
|
|
3416
|
-
|
|
3416
|
+
L.dataTransfer.dropEffect = "copy";
|
|
3417
3417
|
} catch {
|
|
3418
3418
|
}
|
|
3419
|
-
return
|
|
3420
|
-
}, [m,
|
|
3421
|
-
|
|
3422
|
-
var
|
|
3423
|
-
return
|
|
3424
|
-
}),
|
|
3425
|
-
|
|
3419
|
+
return q && m && m(L), !1;
|
|
3420
|
+
}, [m, F]), I = oe(function(L) {
|
|
3421
|
+
L.preventDefault(), L.persist(), Ve(L);
|
|
3422
|
+
var q = P.current.filter(function(me) {
|
|
3423
|
+
return z.current && z.current.contains(me);
|
|
3424
|
+
}), fe = q.indexOf(L.target);
|
|
3425
|
+
fe !== -1 && q.splice(fe, 1), P.current = q, !(q.length > 0) && (X({
|
|
3426
3426
|
type: "setDraggedFiles",
|
|
3427
3427
|
isDragActive: !1,
|
|
3428
3428
|
isDragAccept: !1,
|
|
3429
3429
|
isDragReject: !1
|
|
3430
|
-
}), Ye(
|
|
3431
|
-
}, [
|
|
3432
|
-
var
|
|
3433
|
-
|
|
3434
|
-
var
|
|
3430
|
+
}), Ye(L) && p && p(L));
|
|
3431
|
+
}, [z, p, F]), V = oe(function(L, q) {
|
|
3432
|
+
var fe = [], me = [];
|
|
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 = Y ? Y(he) : null;
|
|
3435
3435
|
if (nt && it && !lt)
|
|
3436
|
-
|
|
3436
|
+
fe.push(he);
|
|
3437
3437
|
else {
|
|
3438
3438
|
var st = [ot, at];
|
|
3439
|
-
lt && (st = st.concat(lt)),
|
|
3439
|
+
lt && (st = st.concat(lt)), me.push({
|
|
3440
3440
|
file: he,
|
|
3441
3441
|
errors: st.filter(function(Qn) {
|
|
3442
3442
|
return Qn;
|
|
3443
3443
|
})
|
|
3444
3444
|
});
|
|
3445
3445
|
}
|
|
3446
|
-
}), (!s &&
|
|
3447
|
-
|
|
3446
|
+
}), (!s && fe.length > 1 || s && c >= 1 && fe.length > c) && (fe.forEach(function(he) {
|
|
3447
|
+
me.push({
|
|
3448
3448
|
file: he,
|
|
3449
3449
|
errors: [Ho]
|
|
3450
3450
|
});
|
|
3451
|
-
}),
|
|
3452
|
-
acceptedFiles:
|
|
3453
|
-
fileRejections:
|
|
3454
|
-
isDragReject:
|
|
3451
|
+
}), fe.splice(0)), X({
|
|
3452
|
+
acceptedFiles: fe,
|
|
3453
|
+
fileRejections: me,
|
|
3454
|
+
isDragReject: me.length > 0,
|
|
3455
3455
|
type: "setFiles"
|
|
3456
|
-
}), d && d(
|
|
3457
|
-
}, [
|
|
3458
|
-
|
|
3459
|
-
Qe(
|
|
3460
|
-
}).catch(function(
|
|
3461
|
-
return A(
|
|
3462
|
-
}),
|
|
3456
|
+
}), d && d(fe, me, q), me.length > 0 && v && v(me, q), fe.length > 0 && g && g(fe, q);
|
|
3457
|
+
}, [X, s, ee, l, i, c, d, g, v, Y]), re = oe(function(L) {
|
|
3458
|
+
L.preventDefault(), L.persist(), Ve(L), P.current = [], Ye(L) && Promise.resolve(r(L)).then(function(q) {
|
|
3459
|
+
Qe(L) && !F || V(q, L);
|
|
3460
|
+
}).catch(function(q) {
|
|
3461
|
+
return A(q);
|
|
3462
|
+
}), X({
|
|
3463
3463
|
type: "reset"
|
|
3464
3464
|
});
|
|
3465
|
-
}, [r,
|
|
3466
|
-
if (
|
|
3467
|
-
|
|
3465
|
+
}, [r, V, A, F]), S = oe(function() {
|
|
3466
|
+
if (_.current) {
|
|
3467
|
+
X({
|
|
3468
3468
|
type: "openDialog"
|
|
3469
|
-
}),
|
|
3470
|
-
var
|
|
3469
|
+
}), se();
|
|
3470
|
+
var L = {
|
|
3471
3471
|
multiple: s,
|
|
3472
|
-
types:
|
|
3472
|
+
types: Z
|
|
3473
3473
|
};
|
|
3474
|
-
window.showOpenFilePicker(
|
|
3475
|
-
return r(
|
|
3476
|
-
}).then(function(
|
|
3477
|
-
q
|
|
3474
|
+
window.showOpenFilePicker(L).then(function(q) {
|
|
3475
|
+
return r(q);
|
|
3476
|
+
}).then(function(q) {
|
|
3477
|
+
V(q, null), X({
|
|
3478
3478
|
type: "closeDialog"
|
|
3479
3479
|
});
|
|
3480
|
-
}).catch(function(
|
|
3481
|
-
Ko(
|
|
3480
|
+
}).catch(function(q) {
|
|
3481
|
+
Ko(q) ? (U(q), X({
|
|
3482
3482
|
type: "closeDialog"
|
|
3483
|
-
})) : Xo(
|
|
3483
|
+
})) : Xo(q) ? (_.current = !1, W.current ? (W.current.value = null, W.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
|
+
W.current && (X({
|
|
3488
3488
|
type: "openDialog"
|
|
3489
|
-
}),
|
|
3490
|
-
}, [
|
|
3491
|
-
!
|
|
3492
|
-
}, [
|
|
3493
|
-
|
|
3489
|
+
}), se(), W.current.value = null, W.current.click());
|
|
3490
|
+
}, [X, se, U, y, V, A, Z, s]), h = oe(function(L) {
|
|
3491
|
+
!z.current || !z.current.isEqualNode(L.target) || (L.key === " " || L.key === "Enter" || L.keyCode === 32 || L.keyCode === 13) && (L.preventDefault(), S());
|
|
3492
|
+
}, [z, S]), T = oe(function() {
|
|
3493
|
+
X({
|
|
3494
3494
|
type: "focus"
|
|
3495
3495
|
});
|
|
3496
|
-
}, []),
|
|
3497
|
-
|
|
3496
|
+
}, []), Q = oe(function() {
|
|
3497
|
+
X({
|
|
3498
3498
|
type: "blur"
|
|
3499
3499
|
});
|
|
3500
|
-
}, []),
|
|
3501
|
-
|
|
3502
|
-
}, [
|
|
3503
|
-
return o ? null :
|
|
3504
|
-
},
|
|
3505
|
-
return b ? null :
|
|
3506
|
-
},
|
|
3507
|
-
return
|
|
3508
|
-
}, Ve = function(
|
|
3509
|
-
|
|
3510
|
-
}, Kn =
|
|
3500
|
+
}, []), ae = oe(function() {
|
|
3501
|
+
M || (Zo() ? setTimeout(S, 0) : S());
|
|
3502
|
+
}, [M, S]), le = function(q) {
|
|
3503
|
+
return o ? null : q;
|
|
3504
|
+
}, ce = function(q) {
|
|
3505
|
+
return b ? null : le(q);
|
|
3506
|
+
}, $e = function(q) {
|
|
3507
|
+
return O ? null : le(q);
|
|
3508
|
+
}, Ve = function(q) {
|
|
3509
|
+
F && q.stopPropagation();
|
|
3510
|
+
}, Kn = Le(function() {
|
|
3511
3511
|
return function() {
|
|
3512
|
-
var
|
|
3513
|
-
return
|
|
3514
|
-
onKeyDown:
|
|
3515
|
-
onFocus:
|
|
3516
|
-
onBlur:
|
|
3517
|
-
onClick:
|
|
3518
|
-
onDragEnter:
|
|
3519
|
-
onDragOver:
|
|
3520
|
-
onDragLeave:
|
|
3521
|
-
onDrop:
|
|
3522
|
-
role: typeof
|
|
3523
|
-
},
|
|
3512
|
+
var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, q = L.refKey, fe = q === void 0 ? "ref" : q, me = L.role, he = L.onKeyDown, Fe = L.onFocus, Me = L.onBlur, nt = L.onClick, ot = L.onDragEnter, rt = L.onDragOver, He = L.onDragLeave, it = L.onDrop, at = et(L, er);
|
|
3513
|
+
return ue(ue(Et({
|
|
3514
|
+
onKeyDown: ce(ye(he, h)),
|
|
3515
|
+
onFocus: ce(ye(Fe, T)),
|
|
3516
|
+
onBlur: ce(ye(Me, Q)),
|
|
3517
|
+
onClick: le(ye(nt, ae)),
|
|
3518
|
+
onDragEnter: $e(ye(ot, k)),
|
|
3519
|
+
onDragOver: $e(ye(rt, R)),
|
|
3520
|
+
onDragLeave: $e(ye(He, I)),
|
|
3521
|
+
onDrop: $e(ye(it, re)),
|
|
3522
|
+
role: typeof me == "string" && me !== "" ? me : "presentation"
|
|
3523
|
+
}, fe, z), !o && !b ? {
|
|
3524
3524
|
tabIndex: 0
|
|
3525
3525
|
} : {}), at);
|
|
3526
3526
|
};
|
|
3527
|
-
}, [
|
|
3528
|
-
|
|
3529
|
-
}, []), Jn =
|
|
3527
|
+
}, [z, h, T, Q, ae, k, R, I, re, b, O, o]), Xn = oe(function(L) {
|
|
3528
|
+
L.stopPropagation();
|
|
3529
|
+
}, []), Jn = Le(function() {
|
|
3530
3530
|
return function() {
|
|
3531
|
-
var
|
|
3531
|
+
var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, q = L.refKey, fe = q === void 0 ? "ref" : q, me = L.onChange, he = L.onClick, Fe = et(L, tr), Me = Et({
|
|
3532
3532
|
accept: ee,
|
|
3533
3533
|
multiple: s,
|
|
3534
3534
|
type: "file",
|
|
@@ -3544,54 +3544,54 @@ function Tn() {
|
|
|
3544
3544
|
width: "1px",
|
|
3545
3545
|
whiteSpace: "nowrap"
|
|
3546
3546
|
},
|
|
3547
|
-
onChange:
|
|
3548
|
-
onClick:
|
|
3547
|
+
onChange: le(ye(me, re)),
|
|
3548
|
+
onClick: le(ye(he, Xn)),
|
|
3549
3549
|
tabIndex: -1
|
|
3550
|
-
},
|
|
3551
|
-
return
|
|
3550
|
+
}, fe, W);
|
|
3551
|
+
return ue(ue({}, Me), Fe);
|
|
3552
3552
|
};
|
|
3553
|
-
}, [
|
|
3554
|
-
return
|
|
3553
|
+
}, [W, t, s, re, o]);
|
|
3554
|
+
return ue(ue({}, ge), {}, {
|
|
3555
3555
|
isFocused: x && !o,
|
|
3556
3556
|
getRootProps: Kn,
|
|
3557
3557
|
getInputProps: Jn,
|
|
3558
|
-
rootRef:
|
|
3559
|
-
inputRef:
|
|
3560
|
-
open:
|
|
3558
|
+
rootRef: z,
|
|
3559
|
+
inputRef: W,
|
|
3560
|
+
open: le(S)
|
|
3561
3561
|
});
|
|
3562
3562
|
}
|
|
3563
3563
|
function ur(e, n) {
|
|
3564
3564
|
switch (n.type) {
|
|
3565
3565
|
case "focus":
|
|
3566
|
-
return
|
|
3566
|
+
return ue(ue({}, e), {}, {
|
|
3567
3567
|
isFocused: !0
|
|
3568
3568
|
});
|
|
3569
3569
|
case "blur":
|
|
3570
|
-
return
|
|
3570
|
+
return ue(ue({}, e), {}, {
|
|
3571
3571
|
isFocused: !1
|
|
3572
3572
|
});
|
|
3573
3573
|
case "openDialog":
|
|
3574
|
-
return
|
|
3574
|
+
return ue(ue({}, Mt), {}, {
|
|
3575
3575
|
isFileDialogActive: !0
|
|
3576
3576
|
});
|
|
3577
3577
|
case "closeDialog":
|
|
3578
|
-
return
|
|
3578
|
+
return ue(ue({}, e), {}, {
|
|
3579
3579
|
isFileDialogActive: !1
|
|
3580
3580
|
});
|
|
3581
3581
|
case "setDraggedFiles":
|
|
3582
|
-
return
|
|
3582
|
+
return ue(ue({}, e), {}, {
|
|
3583
3583
|
isDragActive: n.isDragActive,
|
|
3584
3584
|
isDragAccept: n.isDragAccept,
|
|
3585
3585
|
isDragReject: n.isDragReject
|
|
3586
3586
|
});
|
|
3587
3587
|
case "setFiles":
|
|
3588
|
-
return
|
|
3588
|
+
return ue(ue({}, e), {}, {
|
|
3589
3589
|
acceptedFiles: n.acceptedFiles,
|
|
3590
3590
|
fileRejections: n.fileRejections,
|
|
3591
3591
|
isDragReject: n.isDragReject
|
|
3592
3592
|
});
|
|
3593
3593
|
case "reset":
|
|
3594
|
-
return
|
|
3594
|
+
return ue({}, Mt);
|
|
3595
3595
|
default:
|
|
3596
3596
|
return e;
|
|
3597
3597
|
}
|
|
@@ -3620,37 +3620,37 @@ const Pi = ({
|
|
|
3620
3620
|
subLabelClass: g = "",
|
|
3621
3621
|
showList: v = !0,
|
|
3622
3622
|
listView: f = !0,
|
|
3623
|
-
showListImage:
|
|
3624
|
-
uploadedFiles:
|
|
3623
|
+
showListImage: w = !1,
|
|
3624
|
+
uploadedFiles: y = [],
|
|
3625
3625
|
// New prop for pre-uploaded files
|
|
3626
|
-
onDeleteCallback:
|
|
3626
|
+
onDeleteCallback: E = () => {
|
|
3627
3627
|
}
|
|
3628
3628
|
//
|
|
3629
3629
|
}) => {
|
|
3630
|
-
const [
|
|
3631
|
-
|
|
3632
|
-
(
|
|
3633
|
-
}, [
|
|
3634
|
-
const
|
|
3635
|
-
(U,
|
|
3636
|
-
const
|
|
3637
|
-
if (
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
`${
|
|
3641
|
-
),
|
|
3642
|
-
`${
|
|
3630
|
+
const [j, M] = K(y), [b, O] = K([]);
|
|
3631
|
+
de(() => {
|
|
3632
|
+
(y.length !== j.length || y.some((U, z) => U !== j[z])) && M(y);
|
|
3633
|
+
}, [y]);
|
|
3634
|
+
const F = oe(
|
|
3635
|
+
(U, z) => {
|
|
3636
|
+
const W = [];
|
|
3637
|
+
if (z.length > 0 && z.forEach((N) => {
|
|
3638
|
+
N.errors.forEach((J) => {
|
|
3639
|
+
J.code === "file-too-large" && W.push(
|
|
3640
|
+
`${N.file.name} is too large (max ${(r / 1024 / 1024).toFixed(2)}MB)`
|
|
3641
|
+
), J.code === "file-invalid-type" && W.push(
|
|
3642
|
+
`${N.file.name} has an invalid file type`
|
|
3643
3643
|
);
|
|
3644
3644
|
});
|
|
3645
|
-
}), i !== void 0 && (o ?
|
|
3645
|
+
}), i !== void 0 && (o ? j.length : 0) + U.length > i && W.push(
|
|
3646
3646
|
`You can only upload up to ${i} file${i > 1 ? "s" : ""}.`
|
|
3647
|
-
),
|
|
3648
|
-
|
|
3647
|
+
), W.length > 0) {
|
|
3648
|
+
O(W), n == null || n(W);
|
|
3649
3649
|
return;
|
|
3650
3650
|
} else
|
|
3651
|
-
|
|
3652
|
-
U.length > 0 && (
|
|
3653
|
-
(
|
|
3651
|
+
O([]);
|
|
3652
|
+
U.length > 0 && (M(
|
|
3653
|
+
(N) => o ? [...N, ...U] : U
|
|
3654
3654
|
), e(U));
|
|
3655
3655
|
},
|
|
3656
3656
|
[
|
|
@@ -3658,13 +3658,13 @@ const Pi = ({
|
|
|
3658
3658
|
n,
|
|
3659
3659
|
r,
|
|
3660
3660
|
i,
|
|
3661
|
-
|
|
3661
|
+
j,
|
|
3662
3662
|
o
|
|
3663
3663
|
]
|
|
3664
3664
|
), H = (U) => {
|
|
3665
|
-
|
|
3666
|
-
}, { getRootProps:
|
|
3667
|
-
onDrop:
|
|
3665
|
+
M((z) => z.filter((W, N) => N !== U)), E(j);
|
|
3666
|
+
}, { getRootProps: Y, getInputProps: ee, isDragActive: Z, isDragReject: se } = Tn({
|
|
3667
|
+
onDrop: F,
|
|
3668
3668
|
accept: t,
|
|
3669
3669
|
multiple: o,
|
|
3670
3670
|
maxSize: r,
|
|
@@ -3675,8 +3675,8 @@ const Pi = ({
|
|
|
3675
3675
|
{
|
|
3676
3676
|
className: `
|
|
3677
3677
|
border border-style-dashed rounded-lg p-0 overflow-hidden transition
|
|
3678
|
-
${
|
|
3679
|
-
${
|
|
3678
|
+
${Z ? "border-color-blue-500 bg-color-blue-50" : "border-color-gray-200 bg-color-gray-50"}
|
|
3679
|
+
${se ? "border-color-red-500 bg-color-red-50" : ""}
|
|
3680
3680
|
${l ? "opacity-50 cursor-not-allowed" : ""}
|
|
3681
3681
|
${p}
|
|
3682
3682
|
`,
|
|
@@ -3684,7 +3684,7 @@ const Pi = ({
|
|
|
3684
3684
|
/* @__PURE__ */ a.jsxs(
|
|
3685
3685
|
"div",
|
|
3686
3686
|
{
|
|
3687
|
-
...
|
|
3687
|
+
...Y(),
|
|
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() }),
|
|
@@ -3694,21 +3694,21 @@ const Pi = ({
|
|
|
3694
3694
|
]
|
|
3695
3695
|
}
|
|
3696
3696
|
),
|
|
3697
|
-
b.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "text-left text-sm text-color-red-600 px-6 pb-2 space-y-1", children: b.map((U,
|
|
3697
|
+
b.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "text-left text-sm text-color-red-600 px-6 pb-2 space-y-1", children: b.map((U, z) => /* @__PURE__ */ a.jsxs("p", { children: [
|
|
3698
3698
|
"• ",
|
|
3699
3699
|
U
|
|
3700
|
-
] },
|
|
3701
|
-
v &&
|
|
3700
|
+
] }, z)) }),
|
|
3701
|
+
v && j.length > 0 && /* @__PURE__ */ a.jsx(
|
|
3702
3702
|
"ul",
|
|
3703
3703
|
{
|
|
3704
3704
|
className: `w-full ${f ? "space-y-2" : "grid grid-columns-2 gap-2"} px-4 pb-4`,
|
|
3705
|
-
children:
|
|
3705
|
+
children: j.map((U, z) => /* @__PURE__ */ a.jsxs(
|
|
3706
3706
|
"li",
|
|
3707
3707
|
{
|
|
3708
3708
|
className: "flex items-center justify-between bg-color-white rounded-md px-4 py-2 shadow-sm",
|
|
3709
3709
|
children: [
|
|
3710
3710
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
3711
|
-
|
|
3711
|
+
w && /* @__PURE__ */ a.jsx("div", { className: "w-10 h-10 rounded bg-color-gray-100 overflow-hidden flex-shrink-0", children: /* @__PURE__ */ a.jsx(
|
|
3712
3712
|
"img",
|
|
3713
3713
|
{
|
|
3714
3714
|
src: U.type.startsWith("image/") ? URL.createObjectURL(U) : "https://img.icons8.com/ios-filled/50/pdf-2.png",
|
|
@@ -3727,14 +3727,14 @@ const Pi = ({
|
|
|
3727
3727
|
"button",
|
|
3728
3728
|
{
|
|
3729
3729
|
className: "ml-2 p-1 bg-color-red-50 rounded-full text-color-red-500 hover:text-color-red-700 cursor-pointer",
|
|
3730
|
-
onClick: () => H(
|
|
3730
|
+
onClick: () => H(z),
|
|
3731
3731
|
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.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z" }) })
|
|
3732
3732
|
}
|
|
3733
3733
|
)
|
|
3734
3734
|
] })
|
|
3735
3735
|
]
|
|
3736
3736
|
},
|
|
3737
|
-
|
|
3737
|
+
z
|
|
3738
3738
|
))
|
|
3739
3739
|
}
|
|
3740
3740
|
)
|
|
@@ -3749,8 +3749,8 @@ function pr({
|
|
|
3749
3749
|
},
|
|
3750
3750
|
placementTop: o
|
|
3751
3751
|
}) {
|
|
3752
|
-
const [r, i] =
|
|
3753
|
-
return
|
|
3752
|
+
const [r, i] = K(!1), l = pe(null);
|
|
3753
|
+
return de(() => {
|
|
3754
3754
|
function s(c) {
|
|
3755
3755
|
l.current && !l.current.contains(c.target) && i(!1);
|
|
3756
3756
|
}
|
|
@@ -3801,7 +3801,7 @@ const dr = {
|
|
|
3801
3801
|
}, fr = {
|
|
3802
3802
|
outlined: "border border-color-gray-300 bg-transparent",
|
|
3803
3803
|
filled: "border border-color-gray-300 bg-color-gray-50"
|
|
3804
|
-
}, mr =
|
|
3804
|
+
}, mr = Oe(
|
|
3805
3805
|
({
|
|
3806
3806
|
className: e = "",
|
|
3807
3807
|
inputClass: n = "",
|
|
@@ -3815,23 +3815,23 @@ const dr = {
|
|
|
3815
3815
|
rounded: u = "medium",
|
|
3816
3816
|
...p
|
|
3817
3817
|
}, m) => {
|
|
3818
|
-
const d =
|
|
3819
|
-
var
|
|
3820
|
-
const
|
|
3821
|
-
if (!
|
|
3822
|
-
const
|
|
3823
|
-
o == null || o(
|
|
3824
|
-
}, v = (f,
|
|
3825
|
-
var
|
|
3826
|
-
f.key === "Backspace" && !t[
|
|
3827
|
-
t.substring(0,
|
|
3828
|
-
), (
|
|
3818
|
+
const d = pe([]), g = (f, w) => {
|
|
3819
|
+
var j;
|
|
3820
|
+
const y = f.target.value.replace(/[^0-9]/g, "").slice(0, 1);
|
|
3821
|
+
if (!y && t[w] === void 0) return;
|
|
3822
|
+
const E = t.substring(0, w) + y + t.substring(w + 1, i);
|
|
3823
|
+
o == null || o(E), y && w < i - 1 && ((j = d.current[w + 1]) == null || j.focus()), r && E.length === i && !E.split("").some((M) => !M) && r(E);
|
|
3824
|
+
}, v = (f, w) => {
|
|
3825
|
+
var y, E, j;
|
|
3826
|
+
f.key === "Backspace" && !t[w] && w > 0 ? (o == null || o(
|
|
3827
|
+
t.substring(0, w - 1) + "" + t.substring(w, i)
|
|
3828
|
+
), (y = d.current[w - 1]) == null || y.focus(), f.preventDefault()) : f.key === "ArrowLeft" && w > 0 ? ((E = d.current[w - 1]) == null || E.focus(), f.preventDefault()) : f.key === "ArrowRight" && w < i - 1 && ((j = d.current[w + 1]) == null || j.focus(), f.preventDefault());
|
|
3829
3829
|
};
|
|
3830
|
-
return /* @__PURE__ */ a.jsx("div", { className: `flex justify-center gap-2 ${e}`, children: Array.from({ length: i }).map((f,
|
|
3830
|
+
return /* @__PURE__ */ a.jsx("div", { className: `flex justify-center gap-2 ${e}`, children: Array.from({ length: i }).map((f, w) => /* @__PURE__ */ a.jsx(
|
|
3831
3831
|
"input",
|
|
3832
3832
|
{
|
|
3833
|
-
ref: (
|
|
3834
|
-
d.current[
|
|
3833
|
+
ref: (y) => {
|
|
3834
|
+
d.current[w] = y;
|
|
3835
3835
|
},
|
|
3836
3836
|
type: "text",
|
|
3837
3837
|
inputMode: "numeric",
|
|
@@ -3845,12 +3845,12 @@ const dr = {
|
|
|
3845
3845
|
${gr[u]}
|
|
3846
3846
|
${n}
|
|
3847
3847
|
`,
|
|
3848
|
-
value: t[
|
|
3849
|
-
onChange: (
|
|
3850
|
-
onKeyDown: (
|
|
3848
|
+
value: t[w] || "",
|
|
3849
|
+
onChange: (y) => g(y, w),
|
|
3850
|
+
onKeyDown: (y) => v(y, w),
|
|
3851
3851
|
...p
|
|
3852
3852
|
},
|
|
3853
|
-
|
|
3853
|
+
w
|
|
3854
3854
|
)) });
|
|
3855
3855
|
}
|
|
3856
3856
|
);
|
|
@@ -3862,7 +3862,7 @@ const xr = {
|
|
|
3862
3862
|
}, vr = {
|
|
3863
3863
|
filled: "bg-color-gray-100 border-color-gray-200",
|
|
3864
3864
|
outlined: "border-color-gray-200 bg-color-transparent"
|
|
3865
|
-
}, On =
|
|
3865
|
+
}, On = Oe(
|
|
3866
3866
|
({
|
|
3867
3867
|
placeholder: e,
|
|
3868
3868
|
value: n,
|
|
@@ -3880,17 +3880,17 @@ const xr = {
|
|
|
3880
3880
|
variant: g = "outlined",
|
|
3881
3881
|
size: v = "medium",
|
|
3882
3882
|
...f
|
|
3883
|
-
},
|
|
3884
|
-
const
|
|
3883
|
+
}, w) => {
|
|
3884
|
+
const y = u ? "border-color-red-500 focus-within:ring-color-red-500" : "border-color-gray-200", E = u ? "text-color-red-500" : l;
|
|
3885
3885
|
return /* @__PURE__ */ a.jsxs("div", { className: "w-full", children: [
|
|
3886
3886
|
m && /* @__PURE__ */ a.jsx("label", { className: `text-sm font-medium text-color-gray-700 mb-1 block ${d}`, children: m }),
|
|
3887
|
-
/* @__PURE__ */ a.jsxs("div", { className: `flex items-center w-full rounded-md border focus-within:ring-1 ${
|
|
3888
|
-
s && /* @__PURE__ */ a.jsx("span", { className: `pl-3 ${
|
|
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 ${E}`, children: s }),
|
|
3889
3889
|
/* @__PURE__ */ a.jsx(
|
|
3890
3890
|
"input",
|
|
3891
3891
|
{
|
|
3892
3892
|
...f,
|
|
3893
|
-
ref:
|
|
3893
|
+
ref: w,
|
|
3894
3894
|
type: o,
|
|
3895
3895
|
placeholder: e,
|
|
3896
3896
|
defaultValue: n,
|
|
@@ -3899,15 +3899,15 @@ const xr = {
|
|
|
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 ${E}`, children: c })
|
|
3903
3903
|
] }),
|
|
3904
3904
|
u && /* @__PURE__ */ a.jsx("p", { className: "text-color-red-500 text-xs mt-1", children: u })
|
|
3905
3905
|
] });
|
|
3906
3906
|
}
|
|
3907
3907
|
);
|
|
3908
3908
|
On.displayName = "TextInput";
|
|
3909
|
-
const hr =
|
|
3910
|
-
const [t, o] =
|
|
3909
|
+
const hr = Oe((e, n) => {
|
|
3910
|
+
const [t, o] = K(!1);
|
|
3911
3911
|
return /* @__PURE__ */ a.jsx(
|
|
3912
3912
|
On,
|
|
3913
3913
|
{
|
|
@@ -3952,7 +3952,7 @@ const In = ({
|
|
|
3952
3952
|
return /* @__PURE__ */ a.jsx(
|
|
3953
3953
|
"div",
|
|
3954
3954
|
{
|
|
3955
|
-
className: `inline-flex items-center justify-center font-medium overflow-hidden ${s[t]} ${c[l]} ${
|
|
3955
|
+
className: `inline-flex items-center justify-center font-medium overflow-hidden ${s[t]} ${c[l]} ${xe[i].filled} ${r}`,
|
|
3956
3956
|
children: e ? /* @__PURE__ */ a.jsx(
|
|
3957
3957
|
"img",
|
|
3958
3958
|
{
|
|
@@ -3976,12 +3976,12 @@ const In = ({
|
|
|
3976
3976
|
...u
|
|
3977
3977
|
}) => {
|
|
3978
3978
|
var g;
|
|
3979
|
-
const p =
|
|
3979
|
+
const p = pe(null), m = (v) => {
|
|
3980
3980
|
const f = p.current;
|
|
3981
3981
|
if (!f) return;
|
|
3982
|
-
const
|
|
3983
|
-
|
|
3984
|
-
}, d = ((g =
|
|
3982
|
+
const w = document.createElement("span"), y = f.getBoundingClientRect(), E = Math.max(y.width, y.height);
|
|
3983
|
+
w.style.width = w.style.height = `${E}px`, w.style.left = `${v.clientX - y.left - E / 2}px`, w.style.top = `${v.clientY - y.top - E / 2}px`, w.className = "ripple_small", f.appendChild(w), setTimeout(() => w.remove(), 600), o == null || o(v);
|
|
3984
|
+
}, d = ((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
|
{
|
|
@@ -4024,8 +4024,8 @@ const In = ({
|
|
|
4024
4024
|
avatar: p,
|
|
4025
4025
|
icon: m
|
|
4026
4026
|
}) => {
|
|
4027
|
-
var
|
|
4028
|
-
const d = (
|
|
4027
|
+
var y, E;
|
|
4028
|
+
const d = (y = xe[n]) == null ? void 0 : y.filled, g = (E = xe[n]) == null ? void 0 : E.outline, v = br[o], f = `inline-flex items-center rounded-full font-medium leading-none ${t === "outlined" ? `border ${g}` : d} ${v} ${i ? "cursor-pointer transition hover:opacity-80" : ""}`.trim(), w = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4029
4029
|
p && /* @__PURE__ */ a.jsx(In, { ...typeof p == "object" ? p : {}, className: `-ml-1 mr-1 ${fn[o]}` }),
|
|
4030
4030
|
m && /* @__PURE__ */ a.jsx("span", { className: "mr-1 -ml-1", children: m }),
|
|
4031
4031
|
/* @__PURE__ */ a.jsx("span", { children: e }),
|
|
@@ -4035,8 +4035,8 @@ const In = ({
|
|
|
4035
4035
|
type: "button",
|
|
4036
4036
|
className: `ml-1 -mr-1 ${fn[o]}`,
|
|
4037
4037
|
tabIndex: -1,
|
|
4038
|
-
onClick: (
|
|
4039
|
-
|
|
4038
|
+
onClick: (j) => {
|
|
4039
|
+
j.stopPropagation(), l(j);
|
|
4040
4040
|
},
|
|
4041
4041
|
color: "pearl",
|
|
4042
4042
|
roundedFull: !0,
|
|
@@ -4051,14 +4051,14 @@ const In = ({
|
|
|
4051
4051
|
target: u,
|
|
4052
4052
|
className: `no-underline ${f} ${r}`,
|
|
4053
4053
|
onClick: i,
|
|
4054
|
-
children:
|
|
4054
|
+
children: w
|
|
4055
4055
|
}
|
|
4056
4056
|
) : /* @__PURE__ */ a.jsx(
|
|
4057
4057
|
"span",
|
|
4058
4058
|
{
|
|
4059
4059
|
className: `${f} ${r}`,
|
|
4060
4060
|
onClick: i,
|
|
4061
|
-
children:
|
|
4061
|
+
children: w
|
|
4062
4062
|
}
|
|
4063
4063
|
);
|
|
4064
4064
|
}, Ai = ({
|
|
@@ -4133,14 +4133,14 @@ const In = ({
|
|
|
4133
4133
|
*
|
|
4134
4134
|
* @license MIT
|
|
4135
4135
|
*/
|
|
4136
|
-
function
|
|
4136
|
+
function ke(e, n) {
|
|
4137
4137
|
return typeof e == "function" ? e(n) : e;
|
|
4138
4138
|
}
|
|
4139
4139
|
function be(e, n) {
|
|
4140
4140
|
return (t) => {
|
|
4141
4141
|
n.setState((o) => ({
|
|
4142
4142
|
...o,
|
|
4143
|
-
[e]:
|
|
4143
|
+
[e]: ke(t, o[e])
|
|
4144
4144
|
}));
|
|
4145
4145
|
};
|
|
4146
4146
|
}
|
|
@@ -4160,7 +4160,7 @@ function yr(e, n) {
|
|
|
4160
4160
|
};
|
|
4161
4161
|
return o(e), t;
|
|
4162
4162
|
}
|
|
4163
|
-
function
|
|
4163
|
+
function B(e, n, t) {
|
|
4164
4164
|
let o = [], r;
|
|
4165
4165
|
return (i) => {
|
|
4166
4166
|
let l;
|
|
@@ -4184,7 +4184,7 @@ function G(e, n, t) {
|
|
|
4184
4184
|
return r;
|
|
4185
4185
|
};
|
|
4186
4186
|
}
|
|
4187
|
-
function
|
|
4187
|
+
function G(e, n, t, o) {
|
|
4188
4188
|
return {
|
|
4189
4189
|
debug: () => {
|
|
4190
4190
|
var r;
|
|
@@ -4204,14 +4204,14 @@ function Cr(e, n, t, o) {
|
|
|
4204
4204
|
column: t,
|
|
4205
4205
|
getValue: () => n.getValue(o),
|
|
4206
4206
|
renderValue: r,
|
|
4207
|
-
getContext:
|
|
4207
|
+
getContext: B(() => [e, t, n, i], (l, s, c, u) => ({
|
|
4208
4208
|
table: l,
|
|
4209
4209
|
column: s,
|
|
4210
4210
|
row: c,
|
|
4211
4211
|
cell: u,
|
|
4212
4212
|
getValue: u.getValue,
|
|
4213
4213
|
renderValue: u.renderValue
|
|
4214
|
-
}),
|
|
4214
|
+
}), G(e.options, "debugCells", "cell.getContext"))
|
|
4215
4215
|
};
|
|
4216
4216
|
return e._features.forEach((l) => {
|
|
4217
4217
|
l.createCell == null || l.createCell(i, t, n, e);
|
|
@@ -4240,24 +4240,24 @@ function jr(e, n, t, o) {
|
|
|
4240
4240
|
depth: t,
|
|
4241
4241
|
columnDef: s,
|
|
4242
4242
|
columns: [],
|
|
4243
|
-
getFlatColumns:
|
|
4243
|
+
getFlatColumns: B(() => [!0], () => {
|
|
4244
4244
|
var d;
|
|
4245
4245
|
return [m, ...(d = m.columns) == null ? void 0 : d.flatMap((g) => g.getFlatColumns())];
|
|
4246
|
-
},
|
|
4247
|
-
getLeafColumns:
|
|
4246
|
+
}, G(e.options, "debugColumns", "column.getFlatColumns")),
|
|
4247
|
+
getLeafColumns: B(() => [e._getOrderColumnsFn()], (d) => {
|
|
4248
4248
|
var g;
|
|
4249
4249
|
if ((g = m.columns) != null && g.length) {
|
|
4250
4250
|
let v = m.columns.flatMap((f) => f.getLeafColumns());
|
|
4251
4251
|
return d(v);
|
|
4252
4252
|
}
|
|
4253
4253
|
return [m];
|
|
4254
|
-
},
|
|
4254
|
+
}, G(e.options, "debugColumns", "column.getLeafColumns"))
|
|
4255
4255
|
};
|
|
4256
4256
|
for (const d of e._features)
|
|
4257
4257
|
d.createColumn == null || d.createColumn(m, e);
|
|
4258
4258
|
return m;
|
|
4259
4259
|
}
|
|
4260
|
-
const
|
|
4260
|
+
const ve = "debugHeaders";
|
|
4261
4261
|
function mn(e, n, t) {
|
|
4262
4262
|
var o;
|
|
4263
4263
|
let i = {
|
|
@@ -4289,31 +4289,31 @@ function mn(e, n, t) {
|
|
|
4289
4289
|
}
|
|
4290
4290
|
const Sr = {
|
|
4291
4291
|
createTable: (e) => {
|
|
4292
|
-
e.getHeaderGroups =
|
|
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
4294
|
const s = (i = o == null ? void 0 : o.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? i : [], c = (l = r == null ? void 0 : r.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? l : [], u = t.filter((m) => !(o != null && o.includes(m.id)) && !(r != null && r.includes(m.id)));
|
|
4295
4295
|
return We(n, [...s, ...u, ...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 : [];
|
|
4299
4299
|
return We(n, i, e, "left");
|
|
4300
|
-
},
|
|
4300
|
+
}, G(e.options, ve, "getLeftHeaderGroups")), e.getRightHeaderGroups = B(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (n, t, o) => {
|
|
4301
4301
|
var r;
|
|
4302
4302
|
const i = (r = o == null ? void 0 : o.map((l) => t.find((s) => s.id === l)).filter(Boolean)) != null ? r : [];
|
|
4303
4303
|
return We(n, i, e, "right");
|
|
4304
|
-
},
|
|
4304
|
+
}, G(e.options, ve, "getRightHeaderGroups")), e.getFooterGroups = B(() => [e.getHeaderGroups()], (n) => [...n].reverse(), G(e.options, ve, "getFooterGroups")), e.getLeftFooterGroups = B(() => [e.getLeftHeaderGroups()], (n) => [...n].reverse(), G(e.options, ve, "getLeftFooterGroups")), e.getCenterFooterGroups = B(() => [e.getCenterHeaderGroups()], (n) => [...n].reverse(), G(e.options, ve, "getCenterFooterGroups")), e.getRightFooterGroups = B(() => [e.getRightHeaderGroups()], (n) => [...n].reverse(), G(e.options, ve, "getRightFooterGroups")), e.getFlatHeaders = B(() => [e.getHeaderGroups()], (n) => n.map((t) => t.headers).flat(), G(e.options, ve, "getFlatHeaders")), e.getLeftFlatHeaders = B(() => [e.getLeftHeaderGroups()], (n) => n.map((t) => t.headers).flat(), G(e.options, ve, "getLeftFlatHeaders")), e.getCenterFlatHeaders = B(() => [e.getCenterHeaderGroups()], (n) => n.map((t) => t.headers).flat(), G(e.options, ve, "getCenterFlatHeaders")), e.getRightFlatHeaders = B(() => [e.getRightHeaderGroups()], (n) => n.map((t) => t.headers).flat(), G(e.options, ve, "getRightFlatHeaders")), e.getCenterLeafHeaders = B(() => [e.getCenterFlatHeaders()], (n) => n.filter((t) => {
|
|
4305
4305
|
var o;
|
|
4306
4306
|
return !((o = t.subHeaders) != null && o.length);
|
|
4307
|
-
}),
|
|
4307
|
+
}), G(e.options, ve, "getCenterLeafHeaders")), e.getLeftLeafHeaders = B(() => [e.getLeftFlatHeaders()], (n) => n.filter((t) => {
|
|
4308
4308
|
var o;
|
|
4309
4309
|
return !((o = t.subHeaders) != null && o.length);
|
|
4310
|
-
}),
|
|
4310
|
+
}), G(e.options, ve, "getLeftLeafHeaders")), e.getRightLeafHeaders = B(() => [e.getRightFlatHeaders()], (n) => n.filter((t) => {
|
|
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
4314
|
var r, i, l, s, c, u;
|
|
4315
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 = (u = o[0]) == null ? void 0 : u.headers) != null ? c : []].map((p) => p.getLeafHeaders()).flat();
|
|
4316
|
-
},
|
|
4316
|
+
}, G(e.options, ve, "getLeafHeaders"));
|
|
4317
4317
|
}
|
|
4318
4318
|
};
|
|
4319
4319
|
function We(e, n, t, o) {
|
|
@@ -4333,22 +4333,22 @@ function We(e, n, t, o) {
|
|
|
4333
4333
|
id: [o, `${g}`].filter(Boolean).join("_"),
|
|
4334
4334
|
headers: []
|
|
4335
4335
|
}, f = [];
|
|
4336
|
-
d.forEach((
|
|
4337
|
-
const
|
|
4338
|
-
let
|
|
4339
|
-
if (
|
|
4340
|
-
|
|
4336
|
+
d.forEach((w) => {
|
|
4337
|
+
const y = [...f].reverse()[0], E = w.column.depth === v.depth;
|
|
4338
|
+
let j, M = !1;
|
|
4339
|
+
if (E && w.column.parent ? j = w.column.parent : (j = w.column, M = !0), y && (y == null ? void 0 : y.column) === j)
|
|
4340
|
+
y.subHeaders.push(w);
|
|
4341
4341
|
else {
|
|
4342
|
-
const b = mn(t,
|
|
4343
|
-
id: [o, g,
|
|
4344
|
-
isPlaceholder:
|
|
4345
|
-
placeholderId:
|
|
4342
|
+
const b = mn(t, j, {
|
|
4343
|
+
id: [o, g, j.id, w == null ? void 0 : w.id].filter(Boolean).join("_"),
|
|
4344
|
+
isPlaceholder: M,
|
|
4345
|
+
placeholderId: M ? `${f.filter((O) => O.column === j).length}` : void 0,
|
|
4346
4346
|
depth: g,
|
|
4347
4347
|
index: f.length
|
|
4348
4348
|
});
|
|
4349
|
-
b.subHeaders.push(
|
|
4349
|
+
b.subHeaders.push(w), f.push(b);
|
|
4350
4350
|
}
|
|
4351
|
-
v.headers.push(
|
|
4351
|
+
v.headers.push(w), w.headerGroup = v;
|
|
4352
4352
|
}), c.push(v), g > 0 && u(f, g - 1);
|
|
4353
4353
|
}, p = n.map((d, g) => mn(t, d, {
|
|
4354
4354
|
depth: l,
|
|
@@ -4356,18 +4356,18 @@ function We(e, n, t, o) {
|
|
|
4356
4356
|
}));
|
|
4357
4357
|
u(p, l - 1), c.reverse();
|
|
4358
4358
|
const m = (d) => d.filter((v) => v.column.getIsVisible()).map((v) => {
|
|
4359
|
-
let f = 0,
|
|
4360
|
-
v.subHeaders && v.subHeaders.length ? (
|
|
4359
|
+
let f = 0, w = 0, y = [0];
|
|
4360
|
+
v.subHeaders && v.subHeaders.length ? (y = [], m(v.subHeaders).forEach((j) => {
|
|
4361
4361
|
let {
|
|
4362
|
-
colSpan:
|
|
4362
|
+
colSpan: M,
|
|
4363
4363
|
rowSpan: b
|
|
4364
|
-
} =
|
|
4365
|
-
f +=
|
|
4364
|
+
} = j;
|
|
4365
|
+
f += M, y.push(b);
|
|
4366
4366
|
})) : f = 1;
|
|
4367
|
-
const
|
|
4368
|
-
return
|
|
4367
|
+
const E = Math.min(...y);
|
|
4368
|
+
return w = w + E, v.colSpan = f, v.rowSpan = w, {
|
|
4369
4369
|
colSpan: f,
|
|
4370
|
-
rowSpan:
|
|
4370
|
+
rowSpan: w
|
|
4371
4371
|
};
|
|
4372
4372
|
});
|
|
4373
4373
|
return m((r = (i = c[0]) == null ? void 0 : i.headers) != null ? r : []), c;
|
|
@@ -4411,8 +4411,8 @@ const $r = (e, n, t, o, r, i, l) => {
|
|
|
4411
4411
|
}
|
|
4412
4412
|
return c.reverse();
|
|
4413
4413
|
},
|
|
4414
|
-
getAllCells:
|
|
4415
|
-
_getAllCellsByColumnId:
|
|
4414
|
+
getAllCells: B(() => [e.getAllLeafColumns()], (c) => c.map((u) => Cr(e, s, u, u.id)), G(e.options, "debugRows", "getAllCells")),
|
|
4415
|
+
_getAllCellsByColumnId: B(() => [s.getAllCells()], (c) => c.reduce((u, p) => (u[p.column.id] = p, u), {}), G(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
4416
4416
|
};
|
|
4417
4417
|
for (let c = 0; c < e._features.length; c++) {
|
|
4418
4418
|
const u = e._features[c];
|
|
@@ -4523,7 +4523,7 @@ 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((p) => p.id === e.id), l =
|
|
4526
|
+
const r = e.getFilterFn(), i = o == null ? void 0 : o.find((p) => p.id === e.id), l = ke(t, i ? i.value : void 0);
|
|
4527
4527
|
if (xn(r, l, e)) {
|
|
4528
4528
|
var s;
|
|
4529
4529
|
return (s = o == null ? void 0 : o.filter((p) => p.id !== e.id)) != null ? s : [];
|
|
@@ -4547,7 +4547,7 @@ const Rr = {
|
|
|
4547
4547
|
e.setColumnFilters = (n) => {
|
|
4548
4548
|
const t = e.getAllLeafColumns(), o = (r) => {
|
|
4549
4549
|
var i;
|
|
4550
|
-
return (i =
|
|
4550
|
+
return (i = ke(n, r)) == null ? void 0 : i.filter((l) => {
|
|
4551
4551
|
const s = t.find((c) => c.id === l.id);
|
|
4552
4552
|
if (s) {
|
|
4553
4553
|
const c = s.getFilterFn();
|
|
@@ -4696,12 +4696,12 @@ const Or = {
|
|
|
4696
4696
|
onColumnOrderChange: be("columnOrder", e)
|
|
4697
4697
|
}),
|
|
4698
4698
|
createColumn: (e, n) => {
|
|
4699
|
-
e.getIndex =
|
|
4699
|
+
e.getIndex = B((t) => [ze(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 = ze(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 = ze(n, t);
|
|
4705
4705
|
return ((o = r[r.length - 1]) == null ? void 0 : o.id) === e.id;
|
|
4706
4706
|
};
|
|
4707
4707
|
},
|
|
@@ -4709,7 +4709,7 @@ const Or = {
|
|
|
4709
4709
|
e.setColumnOrder = (n) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(n), e.resetColumnOrder = (n) => {
|
|
4710
4710
|
var t;
|
|
4711
4711
|
e.setColumnOrder(n ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
|
4712
|
-
}, e._getOrderColumnsFn =
|
|
4712
|
+
}, e._getOrderColumnsFn = B(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (n, t, o) => (r) => {
|
|
4713
4713
|
let i = [];
|
|
4714
4714
|
if (!(n != null && n.length))
|
|
4715
4715
|
i = r;
|
|
@@ -4722,7 +4722,7 @@ const Or = {
|
|
|
4722
4722
|
i = [...i, ...s];
|
|
4723
4723
|
}
|
|
4724
4724
|
return Tr(i, t, o);
|
|
4725
|
-
},
|
|
4725
|
+
}, G(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
4726
4726
|
}
|
|
4727
4727
|
}, ht = () => ({
|
|
4728
4728
|
left: [],
|
|
@@ -4775,16 +4775,16 @@ const Or = {
|
|
|
4775
4775
|
};
|
|
4776
4776
|
},
|
|
4777
4777
|
createRow: (e, n) => {
|
|
4778
|
-
e.getCenterVisibleCells =
|
|
4778
|
+
e.getCenterVisibleCells = B(() => [e._getAllVisibleCells(), n.getState().columnPinning.left, n.getState().columnPinning.right], (t, o, r) => {
|
|
4779
4779
|
const i = [...o ?? [], ...r ?? []];
|
|
4780
4780
|
return t.filter((l) => !i.includes(l.column.id));
|
|
4781
|
-
},
|
|
4781
|
+
}, G(n.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = B(() => [e._getAllVisibleCells(), n.getState().columnPinning.left], (t, o) => (o ?? []).map((i) => t.find((l) => l.column.id === i)).filter(Boolean).map((i) => ({
|
|
4782
4782
|
...i,
|
|
4783
4783
|
position: "left"
|
|
4784
|
-
})),
|
|
4784
|
+
})), G(n.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = B(() => [e._getAllVisibleCells(), n.getState().columnPinning.right], (t, o) => (o ?? []).map((i) => t.find((l) => l.column.id === i)).filter(Boolean).map((i) => ({
|
|
4785
4785
|
...i,
|
|
4786
4786
|
position: "right"
|
|
4787
|
-
})),
|
|
4787
|
+
})), G(n.options, "debugRows", "getRightVisibleCells"));
|
|
4788
4788
|
},
|
|
4789
4789
|
createTable: (e) => {
|
|
4790
4790
|
e.setColumnPinning = (n) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(n), e.resetColumnPinning = (n) => {
|
|
@@ -4798,10 +4798,10 @@ const Or = {
|
|
|
4798
4798
|
return !!((r = o.left) != null && r.length || (i = o.right) != null && i.length);
|
|
4799
4799
|
}
|
|
4800
4800
|
return !!((t = o[n]) != null && t.length);
|
|
4801
|
-
}, e.getLeftLeafColumns =
|
|
4801
|
+
}, e.getLeftLeafColumns = B(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), G(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = B(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (n, t) => (t ?? []).map((o) => n.find((r) => r.id === o)).filter(Boolean), G(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = B(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, o) => {
|
|
4802
4802
|
const r = [...t ?? [], ...o ?? []];
|
|
4803
4803
|
return n.filter((i) => !r.includes(i.id));
|
|
4804
|
-
},
|
|
4804
|
+
}, G(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
4805
4805
|
}
|
|
4806
4806
|
}, Ue = {
|
|
4807
4807
|
size: 150,
|
|
@@ -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 =
|
|
4835
|
+
}, e.getStart = B((t) => [t, ze(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, ze(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,25 +4868,25 @@ 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((
|
|
4872
|
-
typeof
|
|
4873
|
-
var
|
|
4874
|
-
const
|
|
4875
|
-
return
|
|
4876
|
-
let [ee,
|
|
4877
|
-
u[ee] = Math.round(Math.max(
|
|
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, u = {}, p = (y, E) => {
|
|
4872
|
+
typeof E == "number" && (n.setColumnSizingInfo((j) => {
|
|
4873
|
+
var M, b;
|
|
4874
|
+
const O = n.options.columnResizeDirection === "rtl" ? -1 : 1, F = (E - ((M = j == null ? void 0 : j.startOffset) != null ? M : 0)) * O, H = Math.max(F / ((b = j == null ? void 0 : j.startSize) != null ? b : 0), -0.999999);
|
|
4875
|
+
return j.columnSizingStart.forEach((Y) => {
|
|
4876
|
+
let [ee, Z] = Y;
|
|
4877
|
+
u[ee] = Math.round(Math.max(Z + Z * H, 0) * 100) / 100;
|
|
4878
4878
|
}), {
|
|
4879
|
-
...
|
|
4880
|
-
deltaOffset:
|
|
4879
|
+
...j,
|
|
4880
|
+
deltaOffset: F,
|
|
4881
4881
|
deltaPercentage: H
|
|
4882
4882
|
};
|
|
4883
|
-
}), (n.options.columnResizeMode === "onChange" ||
|
|
4884
|
-
...
|
|
4883
|
+
}), (n.options.columnResizeMode === "onChange" || y === "end") && n.setColumnSizing((j) => ({
|
|
4884
|
+
...j,
|
|
4885
4885
|
...u
|
|
4886
4886
|
})));
|
|
4887
|
-
}, m = (
|
|
4888
|
-
p("end",
|
|
4889
|
-
...
|
|
4887
|
+
}, m = (y) => p("move", y), d = (y) => {
|
|
4888
|
+
p("end", y), n.setColumnSizingInfo((E) => ({
|
|
4889
|
+
...E,
|
|
4890
4890
|
isResizingColumn: !1,
|
|
4891
4891
|
startOffset: null,
|
|
4892
4892
|
startSize: null,
|
|
@@ -4895,21 +4895,21 @@ const Or = {
|
|
|
4895
4895
|
columnSizingStart: []
|
|
4896
4896
|
}));
|
|
4897
4897
|
}, g = t || typeof document < "u" ? document : null, v = {
|
|
4898
|
-
moveHandler: (
|
|
4899
|
-
upHandler: (
|
|
4900
|
-
g == null || g.removeEventListener("mousemove", v.moveHandler), g == null || g.removeEventListener("mouseup", v.upHandler), d(
|
|
4898
|
+
moveHandler: (y) => m(y.clientX),
|
|
4899
|
+
upHandler: (y) => {
|
|
4900
|
+
g == null || g.removeEventListener("mousemove", v.moveHandler), g == null || g.removeEventListener("mouseup", v.upHandler), d(y.clientX);
|
|
4901
4901
|
}
|
|
4902
4902
|
}, f = {
|
|
4903
|
-
moveHandler: (
|
|
4904
|
-
upHandler: (
|
|
4905
|
-
var
|
|
4906
|
-
g == null || g.removeEventListener("touchmove", f.moveHandler), g == null || g.removeEventListener("touchend", f.upHandler),
|
|
4903
|
+
moveHandler: (y) => (y.cancelable && (y.preventDefault(), y.stopPropagation()), m(y.touches[0].clientX), !1),
|
|
4904
|
+
upHandler: (y) => {
|
|
4905
|
+
var E;
|
|
4906
|
+
g == null || g.removeEventListener("touchmove", f.moveHandler), g == null || g.removeEventListener("touchend", f.upHandler), y.cancelable && (y.preventDefault(), y.stopPropagation()), d((E = y.touches[0]) == null ? void 0 : E.clientX);
|
|
4907
4907
|
}
|
|
4908
|
-
},
|
|
4908
|
+
}, w = Hr() ? {
|
|
4909
4909
|
passive: !1
|
|
4910
4910
|
} : !1;
|
|
4911
|
-
wt(i) ? (g == null || g.addEventListener("touchmove", f.moveHandler,
|
|
4912
|
-
...
|
|
4911
|
+
wt(i) ? (g == null || g.addEventListener("touchmove", f.moveHandler, w), g == null || g.addEventListener("touchend", f.upHandler, w)) : (g == null || g.addEventListener("mousemove", v.moveHandler, w), g == null || g.addEventListener("mouseup", v.upHandler, w)), n.setColumnSizingInfo((y) => ({
|
|
4912
|
+
...y,
|
|
4913
4913
|
startOffset: c,
|
|
4914
4914
|
startSize: l,
|
|
4915
4915
|
deltaOffset: 0,
|
|
@@ -4988,10 +4988,10 @@ const qr = {
|
|
|
4988
4988
|
};
|
|
4989
4989
|
},
|
|
4990
4990
|
createRow: (e, n) => {
|
|
4991
|
-
e._getAllVisibleCells =
|
|
4991
|
+
e._getAllVisibleCells = B(() => [e.getAllCells(), n.getState().columnVisibility], (t) => t.filter((o) => o.column.getIsVisible()), G(n.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = B(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, o, r) => [...t, ...o, ...r], G(n.options, "debugRows", "getVisibleCells"));
|
|
4992
4992
|
},
|
|
4993
4993
|
createTable: (e) => {
|
|
4994
|
-
const n = (t, o) =>
|
|
4994
|
+
const n = (t, o) => B(() => [o(), o().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), G(e.options, "debugColumns", t));
|
|
4995
4995
|
e.getVisibleFlatColumns = n("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = n("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = n("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = n("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = n("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
|
|
4996
4996
|
var o;
|
|
4997
4997
|
e.setColumnVisibility(t ? {} : (o = e.initialState.columnVisibility) != null ? o : {});
|
|
@@ -5007,7 +5007,7 @@ const qr = {
|
|
|
5007
5007
|
};
|
|
5008
5008
|
}
|
|
5009
5009
|
};
|
|
5010
|
-
function
|
|
5010
|
+
function ze(e, n) {
|
|
5011
5011
|
return n ? n === "center" ? e.getCenterVisibleLeafColumns() : n === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
5012
5012
|
}
|
|
5013
5013
|
const Br = {
|
|
@@ -5168,14 +5168,14 @@ const Br = {
|
|
|
5168
5168
|
});
|
|
5169
5169
|
}
|
|
5170
5170
|
}, e.setPagination = (o) => {
|
|
5171
|
-
const r = (i) =>
|
|
5171
|
+
const r = (i) => ke(o, i);
|
|
5172
5172
|
return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
|
|
5173
5173
|
}, e.resetPagination = (o) => {
|
|
5174
5174
|
var r;
|
|
5175
5175
|
e.setPagination(o ? yt() : (r = e.initialState.pagination) != null ? r : yt());
|
|
5176
5176
|
}, e.setPageIndex = (o) => {
|
|
5177
5177
|
e.setPagination((r) => {
|
|
5178
|
-
let i =
|
|
5178
|
+
let i = ke(o, r.pageIndex);
|
|
5179
5179
|
const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
|
|
5180
5180
|
return i = Math.max(0, Math.min(i, l)), {
|
|
5181
5181
|
...r,
|
|
@@ -5190,7 +5190,7 @@ const Br = {
|
|
|
5190
5190
|
e.setPageSize(o ? Pt : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : Pt);
|
|
5191
5191
|
}, e.setPageSize = (o) => {
|
|
5192
5192
|
e.setPagination((r) => {
|
|
5193
|
-
const i = Math.max(1,
|
|
5193
|
+
const i = Math.max(1, ke(o, r.pageSize)), l = r.pageSize * r.pageIndex, s = Math.floor(l / i);
|
|
5194
5194
|
return {
|
|
5195
5195
|
...r,
|
|
5196
5196
|
pageIndex: s,
|
|
@@ -5199,15 +5199,15 @@ const Br = {
|
|
|
5199
5199
|
});
|
|
5200
5200
|
}, e.setPageCount = (o) => e.setPagination((r) => {
|
|
5201
5201
|
var i;
|
|
5202
|
-
let l =
|
|
5202
|
+
let l = ke(o, (i = e.options.pageCount) != null ? i : -1);
|
|
5203
5203
|
return typeof l == "number" && (l = Math.max(-1, l)), {
|
|
5204
5204
|
...r,
|
|
5205
5205
|
pageCount: l
|
|
5206
5206
|
};
|
|
5207
|
-
}), e.getPageOptions =
|
|
5207
|
+
}), e.getPageOptions = B(() => [e.getPageCount()], (o) => {
|
|
5208
5208
|
let r = [];
|
|
5209
5209
|
return o && o > 0 && (r = [...new Array(o)].fill(null).map((i, l) => l)), r;
|
|
5210
|
-
},
|
|
5210
|
+
}, G(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
5211
5211
|
const {
|
|
5212
5212
|
pageIndex: o
|
|
5213
5213
|
} = e.getState().pagination, r = e.getPageCount();
|
|
@@ -5319,10 +5319,10 @@ const Br = {
|
|
|
5319
5319
|
...l,
|
|
5320
5320
|
position: o
|
|
5321
5321
|
}));
|
|
5322
|
-
}, e.getTopRows =
|
|
5322
|
+
}, e.getTopRows = B(() => [e.getRowModel().rows, e.getState().rowPinning.top], (n, t) => e._getPinnedRows(n, t, "top"), G(e.options, "debugRows", "getTopRows")), e.getBottomRows = B(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (n, t) => e._getPinnedRows(n, t, "bottom"), G(e.options, "debugRows", "getBottomRows")), e.getCenterRows = B(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (n, t, o) => {
|
|
5323
5323
|
const r = /* @__PURE__ */ new Set([...t ?? [], ...o ?? []]);
|
|
5324
5324
|
return n.filter((i) => !r.has(i.id));
|
|
5325
|
-
},
|
|
5325
|
+
}, G(e.options, "debugRows", "getCenterRows"));
|
|
5326
5326
|
}
|
|
5327
5327
|
}, Ur = {
|
|
5328
5328
|
getInitialState: (e) => ({
|
|
@@ -5361,19 +5361,19 @@ const Br = {
|
|
|
5361
5361
|
return e.getRowModel().rows.forEach((i) => {
|
|
5362
5362
|
Ft(r, i.id, o, !0, e);
|
|
5363
5363
|
}), r;
|
|
5364
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel =
|
|
5364
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = B(() => [e.getState().rowSelection, e.getCoreRowModel()], (n, t) => Object.keys(n).length ? jt(e, t) : {
|
|
5365
5365
|
rows: [],
|
|
5366
5366
|
flatRows: [],
|
|
5367
5367
|
rowsById: {}
|
|
5368
|
-
},
|
|
5368
|
+
}, G(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = B(() => [e.getState().rowSelection, e.getFilteredRowModel()], (n, t) => Object.keys(n).length ? jt(e, t) : {
|
|
5369
5369
|
rows: [],
|
|
5370
5370
|
flatRows: [],
|
|
5371
5371
|
rowsById: {}
|
|
5372
|
-
},
|
|
5372
|
+
}, G(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = B(() => [e.getState().rowSelection, e.getSortedRowModel()], (n, t) => Object.keys(n).length ? jt(e, t) : {
|
|
5373
5373
|
rows: [],
|
|
5374
5374
|
flatRows: [],
|
|
5375
5375
|
rowsById: {}
|
|
5376
|
-
},
|
|
5376
|
+
}, G(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
|
|
5377
5377
|
const n = e.getFilteredRowModel().flatRows, {
|
|
5378
5378
|
rowSelection: t
|
|
5379
5379
|
} = e.getState();
|
|
@@ -5480,14 +5480,14 @@ function At(e, n, t) {
|
|
|
5480
5480
|
}
|
|
5481
5481
|
}), r ? "all" : i ? "some" : !1;
|
|
5482
5482
|
}
|
|
5483
|
-
const Nt = /([0-9]+)/gm, Kr = (e, n, t) => Un(
|
|
5483
|
+
const Nt = /([0-9]+)/gm, Kr = (e, n, t) => Un(Re(e.getValue(t)).toLowerCase(), Re(n.getValue(t)).toLowerCase()), Xr = (e, n, t) => Un(Re(e.getValue(t)), Re(n.getValue(t))), Jr = (e, n, t) => It(Re(e.getValue(t)).toLowerCase(), Re(n.getValue(t)).toLowerCase()), Qr = (e, n, t) => It(Re(e.getValue(t)), Re(n.getValue(t))), ei = (e, n, t) => {
|
|
5484
5484
|
const o = e.getValue(t), r = n.getValue(t);
|
|
5485
5485
|
return o > r ? 1 : o < r ? -1 : 0;
|
|
5486
5486
|
}, ti = (e, n, t) => It(e.getValue(t), n.getValue(t));
|
|
5487
5487
|
function It(e, n) {
|
|
5488
5488
|
return e === n ? 0 : e > n ? 1 : -1;
|
|
5489
5489
|
}
|
|
5490
|
-
function
|
|
5490
|
+
function Re(e) {
|
|
5491
5491
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
5492
5492
|
}
|
|
5493
5493
|
function Un(e, n) {
|
|
@@ -5510,7 +5510,7 @@ function Un(e, n) {
|
|
|
5510
5510
|
}
|
|
5511
5511
|
return t.length - o.length;
|
|
5512
5512
|
}
|
|
5513
|
-
const
|
|
5513
|
+
const De = {
|
|
5514
5514
|
alphanumeric: Kr,
|
|
5515
5515
|
alphanumericCaseSensitive: Xr,
|
|
5516
5516
|
text: Jr,
|
|
@@ -5537,11 +5537,11 @@ const Ne = {
|
|
|
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 De.datetime;
|
|
5541
5541
|
if (typeof i == "string" && (o = !0, i.split(Nt).length > 1))
|
|
5542
|
-
return
|
|
5542
|
+
return De.alphanumeric;
|
|
5543
5543
|
}
|
|
5544
|
-
return o ?
|
|
5544
|
+
return o ? De.text : De.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,7 +5549,7 @@ const Ne = {
|
|
|
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 : De[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) => {
|
|
@@ -5667,7 +5667,7 @@ function ri(e) {
|
|
|
5667
5667
|
r.setState(r.initialState);
|
|
5668
5668
|
},
|
|
5669
5669
|
setOptions: (d) => {
|
|
5670
|
-
const g =
|
|
5670
|
+
const g = ke(d, r.options);
|
|
5671
5671
|
r.options = l(g);
|
|
5672
5672
|
},
|
|
5673
5673
|
getState: () => r.options.state,
|
|
@@ -5689,7 +5689,7 @@ function ri(e) {
|
|
|
5689
5689
|
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
|
|
5690
5690
|
return v;
|
|
5691
5691
|
},
|
|
5692
|
-
_getDefaultColumnDef:
|
|
5692
|
+
_getDefaultColumnDef: B(() => [r.options.defaultColumn], (d) => {
|
|
5693
5693
|
var g;
|
|
5694
5694
|
return d = (g = d) != null ? g : {}, {
|
|
5695
5695
|
header: (v) => {
|
|
@@ -5698,29 +5698,29 @@ function ri(e) {
|
|
|
5698
5698
|
},
|
|
5699
5699
|
// footer: props => props.header.column.id,
|
|
5700
5700
|
cell: (v) => {
|
|
5701
|
-
var f,
|
|
5702
|
-
return (f = (
|
|
5701
|
+
var f, w;
|
|
5702
|
+
return (f = (w = v.renderValue()) == null || w.toString == null ? void 0 : w.toString()) != null ? f : null;
|
|
5703
5703
|
},
|
|
5704
5704
|
...r._features.reduce((v, f) => Object.assign(v, f.getDefaultColumnDef == null ? void 0 : f.getDefaultColumnDef()), {}),
|
|
5705
5705
|
...d
|
|
5706
5706
|
};
|
|
5707
|
-
},
|
|
5707
|
+
}, G(e, "debugColumns", "_getDefaultColumnDef")),
|
|
5708
5708
|
_getColumnDefs: () => r.options.columns,
|
|
5709
|
-
getAllColumns:
|
|
5710
|
-
const g = function(v, f,
|
|
5711
|
-
return
|
|
5712
|
-
const
|
|
5713
|
-
return
|
|
5709
|
+
getAllColumns: B(() => [r._getColumnDefs()], (d) => {
|
|
5710
|
+
const g = function(v, f, w) {
|
|
5711
|
+
return w === void 0 && (w = 0), v.map((y) => {
|
|
5712
|
+
const E = jr(r, y, w, f), j = y;
|
|
5713
|
+
return E.columns = j.columns ? g(j.columns, E, w + 1) : [], E;
|
|
5714
5714
|
});
|
|
5715
5715
|
};
|
|
5716
5716
|
return g(d);
|
|
5717
|
-
},
|
|
5718
|
-
getAllFlatColumns:
|
|
5719
|
-
_getAllFlatColumnsById:
|
|
5720
|
-
getAllLeafColumns:
|
|
5717
|
+
}, G(e, "debugColumns", "getAllColumns")),
|
|
5718
|
+
getAllFlatColumns: B(() => [r.getAllColumns()], (d) => d.flatMap((g) => g.getFlatColumns()), G(e, "debugColumns", "getAllFlatColumns")),
|
|
5719
|
+
_getAllFlatColumnsById: B(() => [r.getAllFlatColumns()], (d) => d.reduce((g, v) => (g[v.id] = v, g), {}), G(e, "debugColumns", "getAllFlatColumnsById")),
|
|
5720
|
+
getAllLeafColumns: B(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, g) => {
|
|
5721
5721
|
let v = d.flatMap((f) => f.getLeafColumns());
|
|
5722
5722
|
return g(v);
|
|
5723
|
-
},
|
|
5723
|
+
}, G(e, "debugColumns", "getAllLeafColumns")),
|
|
5724
5724
|
getColumn: (d) => {
|
|
5725
5725
|
const g = r._getAllFlatColumnsById()[d];
|
|
5726
5726
|
return process.env.NODE_ENV !== "production" && !g && console.error(`[Table] Column with id '${d}' does not exist.`), g;
|
|
@@ -5734,7 +5734,7 @@ function ri(e) {
|
|
|
5734
5734
|
return r;
|
|
5735
5735
|
}
|
|
5736
5736
|
function ii() {
|
|
5737
|
-
return (e) =>
|
|
5737
|
+
return (e) => B(() => [e.options.data], (n) => {
|
|
5738
5738
|
const t = {
|
|
5739
5739
|
rows: [],
|
|
5740
5740
|
flatRows: [],
|
|
@@ -5752,7 +5752,7 @@ function ii() {
|
|
|
5752
5752
|
return s;
|
|
5753
5753
|
};
|
|
5754
5754
|
return t.rows = o(n), t;
|
|
5755
|
-
},
|
|
5755
|
+
}, G(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
5756
5756
|
}
|
|
5757
5757
|
/**
|
|
5758
5758
|
* react-table
|
|
@@ -5825,7 +5825,7 @@ const li = {
|
|
|
5825
5825
|
caption: "span",
|
|
5826
5826
|
overline: "span"
|
|
5827
5827
|
}[e] || "p";
|
|
5828
|
-
return /* @__PURE__ */ a.jsx(l, { className: `${li[e]} ${(s =
|
|
5828
|
+
return /* @__PURE__ */ a.jsx(l, { className: `${li[e]} ${(s = xe[r]) == null ? void 0 : s.text} ${t}`, children: o });
|
|
5829
5829
|
}, ci = ({
|
|
5830
5830
|
total: e,
|
|
5831
5831
|
currentPage: n,
|
|
@@ -6122,7 +6122,7 @@ const li = {
|
|
|
6122
6122
|
large: { track: "h-3", thumb: "w-5 h-5" }
|
|
6123
6123
|
};
|
|
6124
6124
|
function gi(e) {
|
|
6125
|
-
const n =
|
|
6125
|
+
const n = pe(null), t = pe(null), o = pe(null), r = (c, u) => {
|
|
6126
6126
|
if (c === u) return !0;
|
|
6127
6127
|
if (Array.isArray(c) && Array.isArray(u)) {
|
|
6128
6128
|
if (c.length !== u.length) return !1;
|
|
@@ -6166,178 +6166,178 @@ const Vi = no(function({
|
|
|
6166
6166
|
showMarks: g = !1,
|
|
6167
6167
|
marks: v = [],
|
|
6168
6168
|
range: f = !1,
|
|
6169
|
-
minDistance:
|
|
6169
|
+
minDistance: w = 0
|
|
6170
6170
|
}) {
|
|
6171
|
-
const
|
|
6172
|
-
(
|
|
6171
|
+
const y = n !== void 0, [E, j] = K(() => t !== void 0 ? t : f ? [i, l] : i), M = y ? n : E, b = Array.isArray(M) ? M[0] : M, [O, F] = Array.isArray(M) ? M : [M, M], H = St[c] || St.blue, Y = vn[u] ?? vn.medium, ee = oe(
|
|
6172
|
+
(h) => (h - i) / (l - i) * 100,
|
|
6173
6173
|
[i, l]
|
|
6174
|
-
),
|
|
6175
|
-
(
|
|
6176
|
-
|
|
6174
|
+
), Z = ee(b), se = ee(O), U = ee(F), z = oe((h) => Math.max(i, Math.min(l, h)), [i, l]), W = oe((h) => Math.round(h / s) * s, [s]), N = gi(o), J = oe(
|
|
6175
|
+
(h, T = !0) => {
|
|
6176
|
+
y || j(h), T ? N.schedule(h) : N.flush(h);
|
|
6177
6177
|
},
|
|
6178
|
-
[
|
|
6179
|
-
),
|
|
6180
|
-
const
|
|
6181
|
-
|
|
6182
|
-
}, [
|
|
6183
|
-
(
|
|
6184
|
-
if (f && Array.isArray(
|
|
6185
|
-
let [
|
|
6186
|
-
return
|
|
6187
|
-
} else if (!f && typeof
|
|
6188
|
-
return
|
|
6189
|
-
return
|
|
6178
|
+
[y, N]
|
|
6179
|
+
), ge = oe(() => {
|
|
6180
|
+
const h = N.last.current;
|
|
6181
|
+
h != null && (N.flush(h), r == null || r(h));
|
|
6182
|
+
}, [N, r]), X = oe(
|
|
6183
|
+
(h, T) => {
|
|
6184
|
+
if (f && Array.isArray(h)) {
|
|
6185
|
+
let [Q, ae] = h, le = W(z(Q)), ce = W(z(ae));
|
|
6186
|
+
return ce - le < w && (T === "min" ? ce = z(le + w) : T === "max" && (le = z(ce - w))), le > ce && (T === "min" ? le = ce : ce = le), [le, ce];
|
|
6187
|
+
} else if (!f && typeof h == "number")
|
|
6188
|
+
return W(z(h));
|
|
6189
|
+
return h;
|
|
6190
6190
|
},
|
|
6191
|
-
[f,
|
|
6192
|
-
), x =
|
|
6193
|
-
(
|
|
6194
|
-
var
|
|
6195
|
-
const
|
|
6196
|
-
if (!
|
|
6197
|
-
const
|
|
6198
|
-
return i +
|
|
6191
|
+
[f, z, W, w]
|
|
6192
|
+
), x = pe(null), C = oe(
|
|
6193
|
+
(h) => {
|
|
6194
|
+
var ae;
|
|
6195
|
+
const T = (ae = x.current) == null ? void 0 : ae.getBoundingClientRect();
|
|
6196
|
+
if (!T) return f ? i : b;
|
|
6197
|
+
const Q = Math.max(0, Math.min(1, (h - T.left) / T.width));
|
|
6198
|
+
return i + Q * (l - i);
|
|
6199
6199
|
},
|
|
6200
6200
|
[i, l, f, b]
|
|
6201
|
-
),
|
|
6202
|
-
(
|
|
6203
|
-
const
|
|
6204
|
-
return
|
|
6201
|
+
), _ = oe(
|
|
6202
|
+
(h) => {
|
|
6203
|
+
const T = Math.abs(h - O), Q = Math.abs(h - F);
|
|
6204
|
+
return T <= Q ? "min" : "max";
|
|
6205
6205
|
},
|
|
6206
|
-
[
|
|
6207
|
-
), [
|
|
6208
|
-
(
|
|
6209
|
-
var
|
|
6206
|
+
[O, F]
|
|
6207
|
+
), [$, P] = K(null), [D, A] = K(null), [k, R] = K(null), I = oe(
|
|
6208
|
+
(h, T) => {
|
|
6209
|
+
var ae, le;
|
|
6210
6210
|
if (p) return;
|
|
6211
|
-
|
|
6212
|
-
const
|
|
6211
|
+
h.preventDefault(), (le = (ae = h.currentTarget).setPointerCapture) == null || le.call(ae, h.pointerId), R(h.pointerId);
|
|
6212
|
+
const Q = C(h.clientX);
|
|
6213
6213
|
if (f) {
|
|
6214
|
-
const
|
|
6215
|
-
|
|
6214
|
+
const ce = T || _(Q);
|
|
6215
|
+
P(ce), J(ce === "min" ? X([Q, F], "min") : X([O, Q], "max"));
|
|
6216
6216
|
} else
|
|
6217
|
-
|
|
6217
|
+
P("single"), J(X(Q, "single"));
|
|
6218
6218
|
},
|
|
6219
6219
|
[
|
|
6220
6220
|
p,
|
|
6221
6221
|
f,
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6222
|
+
C,
|
|
6223
|
+
_,
|
|
6224
|
+
X,
|
|
6225
|
+
O,
|
|
6226
|
+
F,
|
|
6227
|
+
J
|
|
6228
6228
|
]
|
|
6229
|
-
),
|
|
6230
|
-
(
|
|
6231
|
-
if (p || k == null ||
|
|
6232
|
-
const
|
|
6233
|
-
f ?
|
|
6229
|
+
), V = oe(
|
|
6230
|
+
(h) => {
|
|
6231
|
+
if (p || k == null || $ == null) return;
|
|
6232
|
+
const T = C(h.clientX);
|
|
6233
|
+
f ? $ === "min" ? J(X([T, F], "min")) : $ === "max" && J(X([O, T], "max")) : J(X(T, "single"));
|
|
6234
6234
|
},
|
|
6235
6235
|
[
|
|
6236
6236
|
p,
|
|
6237
6237
|
k,
|
|
6238
|
-
|
|
6238
|
+
$,
|
|
6239
6239
|
f,
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6240
|
+
C,
|
|
6241
|
+
X,
|
|
6242
|
+
O,
|
|
6243
|
+
F,
|
|
6244
|
+
J
|
|
6245
6245
|
]
|
|
6246
|
-
),
|
|
6247
|
-
|
|
6248
|
-
}, [
|
|
6249
|
-
(
|
|
6246
|
+
), re = oe(() => {
|
|
6247
|
+
$ != null && (P(null), R(null), ge());
|
|
6248
|
+
}, [$, ge]), S = oe(
|
|
6249
|
+
(h, T) => {
|
|
6250
6250
|
if (p) return;
|
|
6251
|
-
const
|
|
6252
|
-
let
|
|
6253
|
-
const
|
|
6254
|
-
switch (
|
|
6251
|
+
const Q = f ? T === "min" ? O : F : b;
|
|
6252
|
+
let ae = Q;
|
|
6253
|
+
const le = (l - i) / 10;
|
|
6254
|
+
switch (h.key) {
|
|
6255
6255
|
case "ArrowLeft":
|
|
6256
6256
|
case "ArrowDown":
|
|
6257
|
-
|
|
6257
|
+
ae = Q - s;
|
|
6258
6258
|
break;
|
|
6259
6259
|
case "ArrowRight":
|
|
6260
6260
|
case "ArrowUp":
|
|
6261
|
-
|
|
6261
|
+
ae = Q + s;
|
|
6262
6262
|
break;
|
|
6263
6263
|
case "PageDown":
|
|
6264
|
-
|
|
6264
|
+
ae = Q - le;
|
|
6265
6265
|
break;
|
|
6266
6266
|
case "PageUp":
|
|
6267
|
-
|
|
6267
|
+
ae = Q + le;
|
|
6268
6268
|
break;
|
|
6269
6269
|
case "Home":
|
|
6270
|
-
|
|
6270
|
+
ae = i;
|
|
6271
6271
|
break;
|
|
6272
6272
|
case "End":
|
|
6273
|
-
|
|
6273
|
+
ae = l;
|
|
6274
6274
|
break;
|
|
6275
6275
|
default:
|
|
6276
6276
|
return;
|
|
6277
6277
|
}
|
|
6278
|
-
|
|
6278
|
+
h.preventDefault(), J(f ? T === "min" ? X([ae, F], "min") : X([O, ae], "max") : X(ae, "single"), !1), r == null || r(y ? n : M);
|
|
6279
6279
|
},
|
|
6280
6280
|
[
|
|
6281
6281
|
p,
|
|
6282
6282
|
f,
|
|
6283
6283
|
b,
|
|
6284
|
-
|
|
6285
|
-
|
|
6284
|
+
O,
|
|
6285
|
+
F,
|
|
6286
6286
|
s,
|
|
6287
6287
|
i,
|
|
6288
6288
|
l,
|
|
6289
|
-
|
|
6290
|
-
|
|
6289
|
+
X,
|
|
6290
|
+
J,
|
|
6291
6291
|
r,
|
|
6292
|
-
|
|
6292
|
+
y,
|
|
6293
6293
|
n,
|
|
6294
|
-
|
|
6294
|
+
M
|
|
6295
6295
|
]
|
|
6296
6296
|
);
|
|
6297
|
-
return
|
|
6298
|
-
if (
|
|
6299
|
-
const
|
|
6297
|
+
return de(() => {
|
|
6298
|
+
if (!$) return;
|
|
6299
|
+
const h = document.body.style.userSelect;
|
|
6300
6300
|
return document.body.style.userSelect = "none", () => {
|
|
6301
|
-
document.body.style.userSelect =
|
|
6301
|
+
document.body.style.userSelect = h;
|
|
6302
6302
|
};
|
|
6303
|
-
}, [
|
|
6304
|
-
f && /* @__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:
|
|
6303
|
+
}, [$]), /* @__PURE__ */ a.jsx("div", { className: `w-full ${m}`, children: /* @__PURE__ */ a.jsxs("div", { className: "relative flex items-center", children: [
|
|
6304
|
+
f && /* @__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 ${
|
|
6311
|
+
relative w-full ${Y.track} ${H.track} rounded-full
|
|
6312
6312
|
${p ? "opacity-60 cursor-not-allowed" : "cursor-pointer"}
|
|
6313
6313
|
`,
|
|
6314
|
-
onPointerDown: (
|
|
6315
|
-
onPointerMove:
|
|
6316
|
-
onPointerUp:
|
|
6317
|
-
onPointerCancel:
|
|
6314
|
+
onPointerDown: (h) => I(h),
|
|
6315
|
+
onPointerMove: V,
|
|
6316
|
+
onPointerUp: re,
|
|
6317
|
+
onPointerCancel: re,
|
|
6318
6318
|
children: [
|
|
6319
6319
|
f ? /* @__PURE__ */ a.jsx(
|
|
6320
6320
|
"div",
|
|
6321
6321
|
{
|
|
6322
|
-
className: `absolute top-0 ${
|
|
6323
|
-
style: { left: `${
|
|
6322
|
+
className: `absolute top-0 ${Y.track} ${H.progress} rounded-full ${$ ? "" : "transition-all duration-150"}`,
|
|
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 ${Y.track} ${H.progress} rounded-full ${$ ? "" : "transition-all duration-150"}`,
|
|
6329
|
+
style: { width: `${Z}%` }
|
|
6330
6330
|
}
|
|
6331
6331
|
),
|
|
6332
|
-
g && v.map((
|
|
6333
|
-
const
|
|
6332
|
+
g && v.map((h, T) => {
|
|
6333
|
+
const Q = 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: `${Q}%` }
|
|
6339
6339
|
},
|
|
6340
|
-
|
|
6340
|
+
T
|
|
6341
6341
|
);
|
|
6342
6342
|
}),
|
|
6343
6343
|
!f && /* @__PURE__ */ a.jsx(
|
|
@@ -6345,13 +6345,13 @@ const Vi = no(function({
|
|
|
6345
6345
|
{
|
|
6346
6346
|
className: `
|
|
6347
6347
|
absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2
|
|
6348
|
-
${
|
|
6348
|
+
${Y.thumb} ${H.thumb} ${H.thumbHover} ${H.thumbActive}
|
|
6349
6349
|
rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6350
|
-
${
|
|
6351
|
-
${
|
|
6350
|
+
${$ === "single" ? "cursor-grabbing scale-110" : $ ? "" : "transition-all duration-150"}
|
|
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: `${
|
|
6354
|
+
style: { left: `${Z}%` },
|
|
6355
6355
|
tabIndex: p ? -1 : 0,
|
|
6356
6356
|
role: "slider",
|
|
6357
6357
|
"aria-orientation": "horizontal",
|
|
@@ -6359,10 +6359,10 @@ const Vi = no(function({
|
|
|
6359
6359
|
"aria-valuemax": l,
|
|
6360
6360
|
"aria-valuenow": b,
|
|
6361
6361
|
"aria-disabled": p,
|
|
6362
|
-
onKeyDown: (
|
|
6362
|
+
onKeyDown: (h) => S(h, "single"),
|
|
6363
6363
|
onFocus: () => A("single"),
|
|
6364
6364
|
onBlur: () => A(null),
|
|
6365
|
-
onPointerDown: (
|
|
6365
|
+
onPointerDown: (h) => I(h, "single")
|
|
6366
6366
|
}
|
|
6367
6367
|
),
|
|
6368
6368
|
f && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -6371,25 +6371,25 @@ const Vi = no(function({
|
|
|
6371
6371
|
{
|
|
6372
6372
|
className: `
|
|
6373
6373
|
absolute top-1/2 transform -translate-y-1/2 -translate-x-1/2 z-10
|
|
6374
|
-
${
|
|
6374
|
+
${Y.thumb} ${H.thumb} ${H.thumbHover} ${H.thumbActive}
|
|
6375
6375
|
rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6376
|
-
${
|
|
6377
|
-
${
|
|
6376
|
+
${$ === "min" ? "cursor-grabbing scale-110 z-20" : $ ? "" : "transition-all duration-150"}
|
|
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
|
-
style: { left: `${
|
|
6380
|
+
style: { left: `${se}%` },
|
|
6381
6381
|
tabIndex: p ? -1 : 0,
|
|
6382
6382
|
role: "slider",
|
|
6383
6383
|
"aria-orientation": "horizontal",
|
|
6384
6384
|
"aria-valuemin": i,
|
|
6385
6385
|
"aria-valuemax": l,
|
|
6386
|
-
"aria-valuenow":
|
|
6386
|
+
"aria-valuenow": O,
|
|
6387
6387
|
"aria-disabled": p,
|
|
6388
6388
|
"aria-label": "Minimum value",
|
|
6389
|
-
onKeyDown: (
|
|
6389
|
+
onKeyDown: (h) => S(h, "min"),
|
|
6390
6390
|
onFocus: () => A("min"),
|
|
6391
6391
|
onBlur: () => A(null),
|
|
6392
|
-
onPointerDown: (
|
|
6392
|
+
onPointerDown: (h) => I(h, "min")
|
|
6393
6393
|
}
|
|
6394
6394
|
),
|
|
6395
6395
|
/* @__PURE__ */ a.jsx(
|
|
@@ -6397,10 +6397,10 @@ 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
|
-
${
|
|
6400
|
+
${Y.thumb} ${H.thumb} ${H.thumbHover} ${H.thumbActive}
|
|
6401
6401
|
rounded-full border-2 ${p ? "opacity-60 cursor-not-allowed" : "cursor-grab"}
|
|
6402
|
-
${
|
|
6403
|
-
${
|
|
6402
|
+
${$ === "max" ? "cursor-grabbing scale-110 z-20" : $ ? "" : "transition-all duration-150"}
|
|
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}%` },
|
|
@@ -6409,13 +6409,13 @@ const Vi = no(function({
|
|
|
6409
6409
|
"aria-orientation": "horizontal",
|
|
6410
6410
|
"aria-valuemin": i,
|
|
6411
6411
|
"aria-valuemax": l,
|
|
6412
|
-
"aria-valuenow":
|
|
6412
|
+
"aria-valuenow": F,
|
|
6413
6413
|
"aria-disabled": p,
|
|
6414
6414
|
"aria-label": "Maximum value",
|
|
6415
|
-
onKeyDown: (
|
|
6415
|
+
onKeyDown: (h) => S(h, "max"),
|
|
6416
6416
|
onFocus: () => A("max"),
|
|
6417
6417
|
onBlur: () => A(null),
|
|
6418
|
-
onPointerDown: (
|
|
6418
|
+
onPointerDown: (h) => I(h, "max")
|
|
6419
6419
|
}
|
|
6420
6420
|
)
|
|
6421
6421
|
] })
|
|
@@ -6426,22 +6426,22 @@ const Vi = no(function({
|
|
|
6426
6426
|
"div",
|
|
6427
6427
|
{
|
|
6428
6428
|
className: "relative mt-2 text-xs text-color-gray-500 dark:text-color-gray-200",
|
|
6429
|
-
children: v.map((
|
|
6430
|
-
const
|
|
6429
|
+
children: v.map((h, T) => {
|
|
6430
|
+
const Q = 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: `${
|
|
6436
|
-
children:
|
|
6435
|
+
style: { left: `${Q}%` },
|
|
6436
|
+
children: h.label || h.value
|
|
6437
6437
|
},
|
|
6438
|
-
|
|
6438
|
+
T
|
|
6439
6439
|
);
|
|
6440
6440
|
})
|
|
6441
6441
|
}
|
|
6442
6442
|
)
|
|
6443
6443
|
] }),
|
|
6444
|
-
d && /* @__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: f ? /* @__PURE__ */ a.jsx("div", { className: "range-max", children: /* @__PURE__ */ a.jsx("div", { children:
|
|
6444
|
+
d && /* @__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: f ? /* @__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,
|
|
@@ -6454,14 +6454,14 @@ const Vi = no(function({
|
|
|
6454
6454
|
className: s = ""
|
|
6455
6455
|
}) => {
|
|
6456
6456
|
var m;
|
|
6457
|
-
|
|
6457
|
+
de(() => {
|
|
6458
6458
|
if (e && t > 0 && i) {
|
|
6459
6459
|
const d = setTimeout(() => {
|
|
6460
6460
|
i();
|
|
6461
6461
|
}, t);
|
|
6462
6462
|
return () => clearTimeout(d);
|
|
6463
6463
|
}
|
|
6464
|
-
}, [e, t, i]),
|
|
6464
|
+
}, [e, t, i]), de(() => {
|
|
6465
6465
|
const d = (g) => {
|
|
6466
6466
|
g.key === "Escape" && e && i && i();
|
|
6467
6467
|
};
|
|
@@ -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
|
-
}, p = (m =
|
|
6490
|
+
}, p = (m = xe[r]) == null ? void 0 : m.filled;
|
|
6491
6491
|
return e ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6492
6492
|
e && /* @__PURE__ */ a.jsx(
|
|
6493
6493
|
"div",
|
|
@@ -6534,7 +6534,7 @@ const Vi = no(function({
|
|
|
6534
6534
|
...i
|
|
6535
6535
|
}) => {
|
|
6536
6536
|
var p, m;
|
|
6537
|
-
const l = (p =
|
|
6537
|
+
const l = (p = xe[t]) == null ? void 0 : p.outline, s = (m = xe[t]) == null ? void 0 : m.filled, c = Math.min(Math.max(n, 0), 100);
|
|
6538
6538
|
if (e === "circular") {
|
|
6539
6539
|
const { size: d = 40, thickness: g = 4 } = i, v = o ? c / 100 * 360 : 270;
|
|
6540
6540
|
return /* @__PURE__ */ a.jsxs(
|
|
@@ -6633,27 +6633,27 @@ const Vi = no(function({
|
|
|
6633
6633
|
labels: d = {}
|
|
6634
6634
|
// <-- Add this
|
|
6635
6635
|
}) => {
|
|
6636
|
-
const [g, v] = Ce.useState(null), f = (
|
|
6636
|
+
const [g, v] = Ce.useState(null), f = (j, M) => {
|
|
6637
6637
|
if (t || o || !n) return;
|
|
6638
|
-
const { left: b, width:
|
|
6639
|
-
let H =
|
|
6638
|
+
const { left: b, width: O } = j.target.getBoundingClientRect(), F = (j.clientX - b) / O;
|
|
6639
|
+
let H = M - 1 + Math.ceil(F / r) * r;
|
|
6640
6640
|
H = Math.min(i, Math.max(r, Math.round(H / r) * r)), n(H);
|
|
6641
|
-
},
|
|
6641
|
+
}, w = (j, M) => {
|
|
6642
6642
|
if (t || o) return;
|
|
6643
|
-
const { left: b, width:
|
|
6644
|
-
let H =
|
|
6643
|
+
const { left: b, width: O } = j.target.getBoundingClientRect(), F = (j.clientX - b) / O;
|
|
6644
|
+
let H = M - 1 + Math.ceil(F / r) * r;
|
|
6645
6645
|
H = Math.min(i, Math.max(r, Math.round(H / r) * r)), v(H);
|
|
6646
|
-
},
|
|
6647
|
-
for (let
|
|
6648
|
-
let
|
|
6646
|
+
}, y = () => v(null), E = [];
|
|
6647
|
+
for (let j = 1; j <= i; j++) {
|
|
6648
|
+
let M = (g !== null ? g : e) >= j, b = !M && (g !== null ? g : e) > j - 1, O = M ? 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
|
-
const
|
|
6651
|
-
|
|
6650
|
+
const F = ((g !== null ? g : e) - (j - 1)) * 100;
|
|
6651
|
+
O = /* @__PURE__ */ a.jsxs("span", { className: "relative block", children: [
|
|
6652
6652
|
/* @__PURE__ */ a.jsx(
|
|
6653
6653
|
"span",
|
|
6654
6654
|
{
|
|
6655
6655
|
className: "absolute top-0 left-0 overflow-hidden",
|
|
6656
|
-
style: { width: `${
|
|
6656
|
+
style: { width: `${F}%` },
|
|
6657
6657
|
children: s || Ce.cloneElement(hn, {
|
|
6658
6658
|
className: `fill-color-yellow-500 ${Xe[l]}`
|
|
6659
6659
|
})
|
|
@@ -6664,26 +6664,26 @@ const Vi = no(function({
|
|
|
6664
6664
|
})
|
|
6665
6665
|
] });
|
|
6666
6666
|
}
|
|
6667
|
-
|
|
6667
|
+
E.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: (
|
|
6673
|
-
onMouseMove: (
|
|
6674
|
-
onMouseLeave:
|
|
6672
|
+
onClick: (F) => f(F, j),
|
|
6673
|
+
onMouseMove: (F) => w(F, j),
|
|
6674
|
+
onMouseLeave: y,
|
|
6675
6675
|
tabIndex: t || o ? -1 : 0,
|
|
6676
|
-
"aria-label": `Rate ${
|
|
6676
|
+
"aria-label": `Rate ${j}`,
|
|
6677
6677
|
role: "radio",
|
|
6678
|
-
"aria-checked": e ===
|
|
6679
|
-
children:
|
|
6678
|
+
"aria-checked": e === j,
|
|
6679
|
+
children: O
|
|
6680
6680
|
},
|
|
6681
|
-
|
|
6681
|
+
j
|
|
6682
6682
|
)
|
|
6683
6683
|
);
|
|
6684
6684
|
}
|
|
6685
6685
|
return /* @__PURE__ */ a.jsxs("div", { className: `flex items-center gap-1 ${u}`, role: "radiogroup", "aria-disabled": o, children: [
|
|
6686
|
-
|
|
6686
|
+
E,
|
|
6687
6687
|
p && g !== null ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs", children: d[g] || g }) : m ? /* @__PURE__ */ a.jsx("span", { className: "ml-2 text-xs", children: d[e] || e }) : null
|
|
6688
6688
|
] });
|
|
6689
6689
|
}, Gi = ({
|
|
@@ -6703,57 +6703,57 @@ const Vi = no(function({
|
|
|
6703
6703
|
swipeable: g = !0,
|
|
6704
6704
|
thumbWidth: v = 60,
|
|
6705
6705
|
orientation: f = "horizontal",
|
|
6706
|
-
nextIcon:
|
|
6707
|
-
prevIcon:
|
|
6708
|
-
className:
|
|
6706
|
+
nextIcon: w,
|
|
6707
|
+
prevIcon: y,
|
|
6708
|
+
className: E
|
|
6709
6709
|
}) => {
|
|
6710
|
-
const
|
|
6711
|
-
s &&
|
|
6712
|
-
),
|
|
6713
|
-
s &&
|
|
6710
|
+
const j = e.length, M = Math.min(Math.max(c, 0.1), j), [b, O] = K(0), [F, H] = K(!1), [Y, ee] = K(!1), [Z, se] = K(0), U = pe(null), z = pe(0), W = pe(0), N = M >= j ? 0 : Math.max(0, j - M), J = (k) => Math.max(0, Math.min(k, N)), ge = (k) => O(
|
|
6711
|
+
s && N > 0 ? (k % (N + 1) + (N + 1)) % (N + 1) : J(k)
|
|
6712
|
+
), X = () => {
|
|
6713
|
+
s && N > 0 ? O(b === 0 ? N : b - 1) : ge(b - 1);
|
|
6714
6714
|
}, x = () => {
|
|
6715
|
-
s &&
|
|
6715
|
+
s && N > 0 ? O(b >= N ? 0 : b + 1) : ge(b + 1);
|
|
6716
6716
|
};
|
|
6717
|
-
|
|
6718
|
-
if (!i || d &&
|
|
6717
|
+
de(() => {
|
|
6718
|
+
if (!i || d && F || Y || N === 0)
|
|
6719
6719
|
return;
|
|
6720
6720
|
const k = setInterval(() => {
|
|
6721
|
-
|
|
6722
|
-
const
|
|
6723
|
-
return
|
|
6721
|
+
O((R) => {
|
|
6722
|
+
const I = R + 1;
|
|
6723
|
+
return I > N ? s ? 0 : R : I;
|
|
6724
6724
|
});
|
|
6725
6725
|
}, l);
|
|
6726
6726
|
return () => clearInterval(k);
|
|
6727
6727
|
}, [
|
|
6728
6728
|
i,
|
|
6729
6729
|
l,
|
|
6730
|
-
|
|
6730
|
+
F,
|
|
6731
6731
|
d,
|
|
6732
|
+
Y,
|
|
6732
6733
|
N,
|
|
6733
|
-
D,
|
|
6734
6734
|
s
|
|
6735
6735
|
]);
|
|
6736
|
-
const
|
|
6737
|
-
!g ||
|
|
6738
|
-
},
|
|
6739
|
-
|
|
6740
|
-
},
|
|
6741
|
-
if (!
|
|
6742
|
-
Math.abs(
|
|
6743
|
-
},
|
|
6736
|
+
const C = (k, R) => {
|
|
6737
|
+
!g || N === 0 || (ee(!0), z.current = f === "horizontal" ? k : R, W.current = z.current);
|
|
6738
|
+
}, _ = (k, R) => {
|
|
6739
|
+
Y && (W.current = f === "horizontal" ? k : R, se(W.current - z.current));
|
|
6740
|
+
}, $ = () => {
|
|
6741
|
+
if (!Y) return;
|
|
6742
|
+
Math.abs(W.current - z.current) > 50 && (W.current < z.current ? x() : X()), ee(!1), se(0);
|
|
6743
|
+
}, P = () => {
|
|
6744
6744
|
const k = f === "horizontal" ? "X" : "Y";
|
|
6745
6745
|
let R = 0;
|
|
6746
|
-
if (
|
|
6747
|
-
const
|
|
6748
|
-
R =
|
|
6746
|
+
if (Y && U.current && N > 0) {
|
|
6747
|
+
const T = f === "horizontal" ? U.current.offsetWidth : U.current.offsetHeight;
|
|
6748
|
+
R = Z / T * 100 * (M / j);
|
|
6749
6749
|
}
|
|
6750
|
-
const
|
|
6751
|
-
return `translate${k}(calc(-${
|
|
6752
|
-
},
|
|
6750
|
+
const V = Math.min(b, N) * (100 / j) - R, re = b >= N, h = b <= 0 ? 0 : re ? u / (c / 2) : u / c;
|
|
6751
|
+
return `translate${k}(calc(-${V}% - ${h}px))`;
|
|
6752
|
+
}, D = () => M >= 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 ${E}`,
|
|
6757
6757
|
style: { width: n, height: t },
|
|
6758
6758
|
onMouseEnter: () => d && H(!0),
|
|
6759
6759
|
onMouseLeave: () => d && H(!1),
|
|
@@ -6762,55 +6762,55 @@ const Vi = no(function({
|
|
|
6762
6762
|
"div",
|
|
6763
6763
|
{
|
|
6764
6764
|
ref: U,
|
|
6765
|
-
className: `w-full overflow-hidden relative ${g &&
|
|
6765
|
+
className: `w-full overflow-hidden relative ${g && N > 0 ? Y ? "cursor-grabbing" : "cursor-grab" : "cursor-default"}`,
|
|
6766
6766
|
style: {
|
|
6767
6767
|
height: m ? `calc(${t} - ${v + 20}px)` : t
|
|
6768
6768
|
},
|
|
6769
6769
|
onMouseDown: (k) => {
|
|
6770
|
-
k.preventDefault(),
|
|
6770
|
+
k.preventDefault(), C(k.clientX, k.clientY);
|
|
6771
6771
|
},
|
|
6772
|
-
onMouseMove: (k) =>
|
|
6773
|
-
onMouseUp:
|
|
6774
|
-
onMouseLeave:
|
|
6775
|
-
onTouchStart: (k) =>
|
|
6776
|
-
onTouchMove: (k) =>
|
|
6777
|
-
onTouchEnd:
|
|
6772
|
+
onMouseMove: (k) => _(k.clientX, k.clientY),
|
|
6773
|
+
onMouseUp: $,
|
|
6774
|
+
onMouseLeave: $,
|
|
6775
|
+
onTouchStart: (k) => C(k.touches[0].clientX, k.touches[0].clientY),
|
|
6776
|
+
onTouchMove: (k) => _(k.touches[0].clientX, k.touches[0].clientY),
|
|
6777
|
+
onTouchEnd: $,
|
|
6778
6778
|
children: [
|
|
6779
6779
|
/* @__PURE__ */ a.jsx(
|
|
6780
6780
|
"div",
|
|
6781
6781
|
{
|
|
6782
6782
|
className: `flex ${f === "horizontal" ? "flex-row" : "flex-col"} transition-transform duration-300 ease-in-out`,
|
|
6783
6783
|
style: {
|
|
6784
|
-
width: f === "horizontal" ? `${
|
|
6785
|
-
height: f === "vertical" ? `${
|
|
6786
|
-
transform:
|
|
6784
|
+
width: f === "horizontal" ? `${j * 100 / M}%` : "100%",
|
|
6785
|
+
height: f === "vertical" ? `${j * 100 / M}%` : "100%",
|
|
6786
|
+
transform: P(),
|
|
6787
6787
|
gap: `${u}px`,
|
|
6788
|
-
transitionProperty:
|
|
6788
|
+
transitionProperty: Y ? "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: f === "horizontal" ? `calc(${100 /
|
|
6796
|
-
height: f === "vertical" ? `calc(${100 /
|
|
6795
|
+
width: f === "horizontal" ? `calc(${100 / j}% - ${u / c}px)` : "100%",
|
|
6796
|
+
height: f === "vertical" ? `calc(${100 / j}% - ${u * (j - 1) / j}px)` : "100%"
|
|
6797
6797
|
},
|
|
6798
|
-
onClick: () => !
|
|
6798
|
+
onClick: () => !Y && (p == null ? void 0 : p(R)),
|
|
6799
6799
|
children: k
|
|
6800
6800
|
},
|
|
6801
6801
|
R
|
|
6802
6802
|
))
|
|
6803
6803
|
}
|
|
6804
6804
|
),
|
|
6805
|
-
r &&
|
|
6805
|
+
r && N > 0 && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6806
6806
|
/* @__PURE__ */ a.jsx(
|
|
6807
6807
|
"button",
|
|
6808
6808
|
{
|
|
6809
6809
|
"aria-label": "prev",
|
|
6810
|
-
onClick:
|
|
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
6812
|
${f === "horizontal" ? "left-2 top-1/2 -translate-y-1/2" : "left-1/2 top-2 -translate-x-1/2"}`,
|
|
6813
|
-
children:
|
|
6813
|
+
children: y || (f === "horizontal" ? "‹" : "↑")
|
|
6814
6814
|
}
|
|
6815
6815
|
),
|
|
6816
6816
|
/* @__PURE__ */ a.jsx(
|
|
@@ -6820,21 +6820,21 @@ const Vi = no(function({
|
|
|
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
6822
|
${f === "horizontal" ? "right-2 top-1/2 -translate-y-1/2" : "left-1/2 bottom-2 -translate-x-1/2"}`,
|
|
6823
|
-
children:
|
|
6823
|
+
children: w || (f === "horizontal" ? "›" : "↓")
|
|
6824
6824
|
}
|
|
6825
6825
|
)
|
|
6826
6826
|
] }),
|
|
6827
|
-
o &&
|
|
6827
|
+
o && D() > 1 && /* @__PURE__ */ a.jsx(
|
|
6828
6828
|
"div",
|
|
6829
6829
|
{
|
|
6830
6830
|
className: `flex gap-1 mt-3 justify-center absolute bg-color-white/90 py-1 px-[5px] rounded-full ${f === "horizontal" ? "bottom-3 left-1/2 -translate-x-1/2" : "top-1/2 right-3 -translate-y-1/2 rotate-90"} z-10`,
|
|
6831
|
-
children: Array.from({ length:
|
|
6831
|
+
children: Array.from({ length: D() }).map(
|
|
6832
6832
|
(k, R) => /* @__PURE__ */ a.jsx(
|
|
6833
6833
|
"button",
|
|
6834
6834
|
{
|
|
6835
|
-
onClick: () =>
|
|
6835
|
+
onClick: () => ge(
|
|
6836
6836
|
Math.round(
|
|
6837
|
-
R / (
|
|
6837
|
+
R / (D() - 1) * N
|
|
6838
6838
|
)
|
|
6839
6839
|
),
|
|
6840
6840
|
className: `size-[10px] rounded-full transition-color hover:bg-color-gray-600 cursor-pointer ${R === A() ? "bg-color-gray-800" : "bg-color-gray-400"}`
|
|
@@ -6848,21 +6848,21 @@ const Vi = no(function({
|
|
|
6848
6848
|
}
|
|
6849
6849
|
),
|
|
6850
6850
|
m && /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 mt-3 justify-center flex-wrap", children: e.map((k, R) => {
|
|
6851
|
-
const
|
|
6851
|
+
const I = R === Math.round(b);
|
|
6852
6852
|
return /* @__PURE__ */ a.jsx(
|
|
6853
6853
|
"div",
|
|
6854
6854
|
{
|
|
6855
6855
|
onClick: () => {
|
|
6856
|
-
const
|
|
6856
|
+
const V = Math.max(
|
|
6857
6857
|
0,
|
|
6858
6858
|
Math.min(
|
|
6859
|
-
|
|
6860
|
-
R - Math.floor(
|
|
6859
|
+
N,
|
|
6860
|
+
R - Math.floor(M / 2)
|
|
6861
6861
|
)
|
|
6862
6862
|
);
|
|
6863
|
-
|
|
6863
|
+
ge(V);
|
|
6864
6864
|
},
|
|
6865
|
-
className: `overflow-hidden rounded-md cursor-pointer transition-all hover:opacity-100 ${
|
|
6865
|
+
className: `overflow-hidden rounded-md cursor-pointer transition-all hover:opacity-100 ${I ? "border-2 border-color-gray-800 opacity-100 scale-105" : "border-2 border-color-gray-300 opacity-70"}`,
|
|
6866
6866
|
style: {
|
|
6867
6867
|
width: v,
|
|
6868
6868
|
height: v
|
|
@@ -6920,7 +6920,7 @@ const Vi = no(function({
|
|
|
6920
6920
|
// <-- default to ios
|
|
6921
6921
|
}) => {
|
|
6922
6922
|
var m, d, g;
|
|
6923
|
-
const [l, s] =
|
|
6923
|
+
const [l, s] = K(e), [c, u] = K(!1), p = async () => {
|
|
6924
6924
|
if (!(t || c))
|
|
6925
6925
|
if (n) {
|
|
6926
6926
|
u(!0);
|
|
@@ -6943,11 +6943,11 @@ const Vi = no(function({
|
|
|
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 ? `${(m =
|
|
6946
|
+
/* @__PURE__ */ a.jsx("span", { className: `absolute rounded-full inset-0 opacity-50 ${l ? `${(m = xe[r]) == null ? void 0 : m.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 ${(d =
|
|
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 ${(d = xe[r]) == null ? void 0 : d.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
|
)
|
|
@@ -6959,7 +6959,7 @@ const Vi = no(function({
|
|
|
6959
6959
|
onClick: p,
|
|
6960
6960
|
type: o,
|
|
6961
6961
|
disabled: t,
|
|
6962
|
-
className: `relative w-11 h-6 flex items-center rounded-full transition-color duration-300 ${l ? (g =
|
|
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"}`,
|
|
6963
6963
|
children: /* @__PURE__ */ a.jsx(
|
|
6964
6964
|
"div",
|
|
6965
6965
|
{
|
|
@@ -7009,7 +7009,7 @@ const Vi = no(function({
|
|
|
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
|
-
${p(d.value) ? ((v =
|
|
7012
|
+
${p(d.value) ? ((v = xe[i]) == null ? void 0 : v.filled) || i : "bg-color-transparent text-color-gray-700"}
|
|
7013
7013
|
${u || d.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer"}
|
|
7014
7014
|
${c}
|
|
7015
7015
|
`,
|
|
@@ -7152,10 +7152,10 @@ const Vi = no(function({
|
|
|
7152
7152
|
/* @__PURE__ */ a.jsx(
|
|
7153
7153
|
"div",
|
|
7154
7154
|
{
|
|
7155
|
-
className: `w-5 h-5 rounded-full border-2 border-color-gray-400 peer-checked:border-[7px] transition-all duration-150 ${(g =
|
|
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 =
|
|
7158
|
+
/* @__PURE__ */ a.jsx("span", { className: `ml-2 text-sm ${(v = xe[l]) == null ? void 0 : v.peer}`, children: u })
|
|
7159
7159
|
]
|
|
7160
7160
|
},
|
|
7161
7161
|
p
|
|
@@ -7207,8 +7207,8 @@ const Vi = no(function({
|
|
|
7207
7207
|
children: n,
|
|
7208
7208
|
position: t = "top"
|
|
7209
7209
|
}) => {
|
|
7210
|
-
const [o, r] =
|
|
7211
|
-
return
|
|
7210
|
+
const [o, r] = K(!1), [i, l] = K({ top: 0, left: 0 }), s = pe(null), c = pe(null);
|
|
7211
|
+
return de(() => {
|
|
7212
7212
|
if (o && s.current && c.current) {
|
|
7213
7213
|
const u = s.current.getBoundingClientRect(), p = c.current.getBoundingClientRect();
|
|
7214
7214
|
let m = 0, d = 0;
|
|
@@ -7239,7 +7239,7 @@ const Vi = no(function({
|
|
|
7239
7239
|
children: n
|
|
7240
7240
|
}
|
|
7241
7241
|
),
|
|
7242
|
-
o &&
|
|
7242
|
+
o && Ie(
|
|
7243
7243
|
/* @__PURE__ */ a.jsx(
|
|
7244
7244
|
"div",
|
|
7245
7245
|
{
|
|
@@ -7264,7 +7264,7 @@ const vi = {
|
|
|
7264
7264
|
"2xl": "max-w-2xl",
|
|
7265
7265
|
"4xl": "max-w-4xl",
|
|
7266
7266
|
"6xl": "max-w-6xl"
|
|
7267
|
-
}, hi =
|
|
7267
|
+
}, hi = Oe(
|
|
7268
7268
|
({
|
|
7269
7269
|
open: e,
|
|
7270
7270
|
onClose: n,
|
|
@@ -7277,29 +7277,29 @@ const vi = {
|
|
|
7277
7277
|
fullWidth: c = !1,
|
|
7278
7278
|
maxWidth: u
|
|
7279
7279
|
}, p) => {
|
|
7280
|
-
const [m, d] =
|
|
7281
|
-
|
|
7280
|
+
const [m, d] = K(e || !1), [g, v] = K(!1), [f, w] = K(!1);
|
|
7281
|
+
de(() => {
|
|
7282
7282
|
e !== void 0 && d(e);
|
|
7283
7283
|
}, [e]), Sn(p, () => ({
|
|
7284
7284
|
open: () => d(!0),
|
|
7285
7285
|
close: () => {
|
|
7286
|
-
|
|
7286
|
+
w(!1), setTimeout(() => d(!1), 300);
|
|
7287
7287
|
}
|
|
7288
|
-
})),
|
|
7289
|
-
let
|
|
7290
|
-
return m ? (v(!0),
|
|
7288
|
+
})), de(() => {
|
|
7289
|
+
let E;
|
|
7290
|
+
return m ? (v(!0), E = setTimeout(() => w(!0), 10)) : w(!1), () => clearTimeout(E);
|
|
7291
7291
|
}, [m]);
|
|
7292
|
-
const
|
|
7292
|
+
const y = () => {
|
|
7293
7293
|
m || v(!1);
|
|
7294
7294
|
};
|
|
7295
|
-
return
|
|
7296
|
-
const
|
|
7297
|
-
|
|
7295
|
+
return de(() => {
|
|
7296
|
+
const E = (j) => {
|
|
7297
|
+
j.key === "Escape" && (n == null || n());
|
|
7298
7298
|
};
|
|
7299
|
-
return m && document.addEventListener("keydown",
|
|
7300
|
-
}, [m, n]),
|
|
7299
|
+
return m && document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
|
|
7300
|
+
}, [m, n]), de(() => (m ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
7301
7301
|
document.body.style.overflow = "";
|
|
7302
|
-
}), [m]), g ?
|
|
7302
|
+
}), [m]), g ? Ie(
|
|
7303
7303
|
/* @__PURE__ */ a.jsxs(
|
|
7304
7304
|
"div",
|
|
7305
7305
|
{
|
|
@@ -7321,7 +7321,7 @@ const vi = {
|
|
|
7321
7321
|
"div",
|
|
7322
7322
|
{
|
|
7323
7323
|
className: `relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${f ? "opacity-100 scale-100" : "opacity-0 scale-95"} ${s ? "w-full h-[calc(100%_-_40px)] m-5" : `${c ? "w-full" : "w-auto"} ${u ? vi[u] : ""} mx-5`} ${t}`,
|
|
7324
|
-
onTransitionEnd:
|
|
7324
|
+
onTransitionEnd: y,
|
|
7325
7325
|
children: [
|
|
7326
7326
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between mb-4", children: [
|
|
7327
7327
|
o && /* @__PURE__ */ a.jsx("h2", { className: "text-xl font-semibold", children: o }),
|
|
@@ -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] =
|
|
7355
|
+
const [r, i] = K(!1), [l, s] = K({ top: 0, left: 0 }), [c, u] = K(!1), p = pe(null), m = pe(null), d = (v) => {
|
|
7356
7356
|
v.stopPropagation(), i((f) => !f), u(!1);
|
|
7357
7357
|
};
|
|
7358
7358
|
oo(() => {
|
|
7359
7359
|
if (r && p.current && m.current) {
|
|
7360
|
-
const v = p.current.getBoundingClientRect(), f = m.current.getBoundingClientRect(),
|
|
7361
|
-
let
|
|
7362
|
-
v.right + f.width >
|
|
7360
|
+
const v = p.current.getBoundingClientRect(), f = m.current.getBoundingClientRect(), w = window.innerWidth, y = window.innerHeight;
|
|
7361
|
+
let E = v.left + window.scrollX, j = v.bottom + window.scrollY;
|
|
7362
|
+
v.right + f.width > w && (E = v.right + window.scrollX - f.width), E + f.width > w && (E = w - f.width - 12), j + f.height > y && (j = v.top + window.scrollY - f.height), s({ top: j, left: E }), setTimeout(() => {
|
|
7363
7363
|
u(!0);
|
|
7364
7364
|
}, 150);
|
|
7365
7365
|
}
|
|
7366
|
-
}, [r]),
|
|
7366
|
+
}, [r]), de(() => {
|
|
7367
7367
|
const v = (f) => {
|
|
7368
|
-
var
|
|
7369
|
-
m.current && !m.current.contains(f.target) && !((
|
|
7368
|
+
var w;
|
|
7369
|
+
m.current && !m.current.contains(f.target) && !((w = p.current) != null && w.contains(f.target)) && i(!1);
|
|
7370
7370
|
};
|
|
7371
7371
|
return r && document.addEventListener("mousedown", v), () => {
|
|
7372
7372
|
document.removeEventListener("mousedown", v);
|
|
@@ -7386,8 +7386,8 @@ function Qi({ items: e, trigger: n, className: t, dropdownItemClass: o }) {
|
|
|
7386
7386
|
{
|
|
7387
7387
|
disabled: v.disabled,
|
|
7388
7388
|
onClick: () => {
|
|
7389
|
-
var
|
|
7390
|
-
(
|
|
7389
|
+
var w;
|
|
7390
|
+
(w = v.onClick) == null || w.call(v), i(!1);
|
|
7391
7391
|
},
|
|
7392
7392
|
className: `flex items-center gap-3 w-full text-left px-3 py-2 bg-color-transparent hover:bg-color-gray-100 transition-all cursor-pointer rounded-md text-md text-color-gray-700 ${v.disabled ? "opacity-50 hover:bg-color-transparent !cursor-not-allowed" : ""} ${o} ${v.itemClass}`,
|
|
7393
7393
|
children: [
|
|
@@ -7401,7 +7401,7 @@ function Qi({ items: e, trigger: n, className: t, dropdownItemClass: o }) {
|
|
|
7401
7401
|
);
|
|
7402
7402
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7403
7403
|
/* @__PURE__ */ a.jsx("div", { ref: p, onClick: d, className: "cursor-pointer", children: n }),
|
|
7404
|
-
r &&
|
|
7404
|
+
r && Ie(g, document.body)
|
|
7405
7405
|
] });
|
|
7406
7406
|
}
|
|
7407
7407
|
function bi(...e) {
|
|
@@ -7418,22 +7418,22 @@ const wi = ({
|
|
|
7418
7418
|
showCloseIcon: s = !0,
|
|
7419
7419
|
anchor: c = "left"
|
|
7420
7420
|
}) => {
|
|
7421
|
-
const [u, p] =
|
|
7422
|
-
|
|
7423
|
-
let
|
|
7424
|
-
return e ? (p(!0),
|
|
7421
|
+
const [u, p] = K(!1), [m, d] = K(!1);
|
|
7422
|
+
de(() => {
|
|
7423
|
+
let w;
|
|
7424
|
+
return e ? (p(!0), w = setTimeout(() => {
|
|
7425
7425
|
d(!0);
|
|
7426
|
-
}, 10)) : d(!1), () => clearTimeout(
|
|
7426
|
+
}, 10)) : d(!1), () => clearTimeout(w);
|
|
7427
7427
|
}, [e]);
|
|
7428
7428
|
const g = () => {
|
|
7429
7429
|
e || p(!1);
|
|
7430
7430
|
};
|
|
7431
|
-
if (
|
|
7432
|
-
const
|
|
7433
|
-
|
|
7431
|
+
if (de(() => {
|
|
7432
|
+
const w = (y) => {
|
|
7433
|
+
y.key === "Escape" && (n == null || n());
|
|
7434
7434
|
};
|
|
7435
|
-
return e && document.addEventListener("keydown",
|
|
7436
|
-
}, [e, n]),
|
|
7435
|
+
return e && document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
|
|
7436
|
+
}, [e, n]), de(() => (e ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
7437
7437
|
document.body.style.overflow = "";
|
|
7438
7438
|
}), [e]), !u) return null;
|
|
7439
7439
|
const v = {
|
|
@@ -7447,7 +7447,7 @@ const wi = ({
|
|
|
7447
7447
|
top: m ? "translate-y-0" : "-translate-y-full",
|
|
7448
7448
|
bottom: m ? "translate-y-0" : "translate-y-full"
|
|
7449
7449
|
};
|
|
7450
|
-
return
|
|
7450
|
+
return Ie(
|
|
7451
7451
|
/* @__PURE__ */ a.jsxs(
|
|
7452
7452
|
"div",
|
|
7453
7453
|
{
|
|
@@ -7503,11 +7503,11 @@ const wi = ({
|
|
|
7503
7503
|
titleClass: c = "",
|
|
7504
7504
|
contentClass: u = ""
|
|
7505
7505
|
}) => {
|
|
7506
|
-
const [p, m] =
|
|
7506
|
+
const [p, m] = K(i), d = r !== void 0, g = d ? r : p, v = () => {
|
|
7507
7507
|
const f = !g;
|
|
7508
7508
|
d || m(f), l == null || l(f);
|
|
7509
7509
|
};
|
|
7510
|
-
return
|
|
7510
|
+
return de(() => {
|
|
7511
7511
|
d && m(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(
|
|
@@ -7555,8 +7555,8 @@ const wi = ({
|
|
|
7555
7555
|
className: r = "",
|
|
7556
7556
|
autoCloseDuration: i = 5e3
|
|
7557
7557
|
}) => {
|
|
7558
|
-
const [l, s] =
|
|
7559
|
-
return
|
|
7558
|
+
const [l, s] = K(!0), c = pe(null);
|
|
7559
|
+
return de(() => {
|
|
7560
7560
|
let u;
|
|
7561
7561
|
return o && (requestAnimationFrame(() => {
|
|
7562
7562
|
c.current && (c.current.style.transition = `width ${i}ms linear`, c.current.style.width = "0%");
|
|
@@ -7605,13 +7605,13 @@ const wi = ({
|
|
|
7605
7605
|
const l = () => {
|
|
7606
7606
|
var u, p;
|
|
7607
7607
|
if (t)
|
|
7608
|
-
return /* @__PURE__ */ a.jsx("span", { className: `h-2 w-2 rounded-full ${(u =
|
|
7608
|
+
return /* @__PURE__ */ a.jsx("span", { className: `h-2 w-2 rounded-full ${(u = xe[r]) == null ? void 0 : u.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 ${(p =
|
|
7614
|
+
className: `text-color-white text-xs px-[10px] py-1 rounded-full whitespace-nowrap ${(p = xe[r]) == null ? void 0 : p.filled}`,
|
|
7615
7615
|
children: c
|
|
7616
7616
|
}
|
|
7617
7617
|
);
|
|
@@ -7685,100 +7685,106 @@ const wi = ({
|
|
|
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
7687
|
disableAfter: u,
|
|
7688
|
-
selectedDate: p
|
|
7688
|
+
selectedDate: p,
|
|
7689
|
+
hideFutureDates: m = !1,
|
|
7690
|
+
defaultDate: d = new Date(1997, 0, 1).getTime()
|
|
7689
7691
|
}) => {
|
|
7690
|
-
const [
|
|
7691
|
-
|
|
7692
|
-
), [
|
|
7693
|
-
p ? new Date(p) : null
|
|
7694
|
-
), [O, Y] =
|
|
7695
|
-
|
|
7696
|
-
|
|
7692
|
+
const [g, v] = K(!1), [f, w] = K(null), [y, E] = K(
|
|
7693
|
+
d ? new Date(d) : /* @__PURE__ */ new Date()
|
|
7694
|
+
), [j, M] = K(
|
|
7695
|
+
p ? new Date(p) : d ? new Date(d) : null
|
|
7696
|
+
), [b, O] = K(null), [F, H] = K(null), [Y, ee] = K(null), [Z, se] = K({ hour: 12, minute: 0, ampm: "AM" }), U = pe(null), [z, W] = K(
|
|
7697
|
+
p ? new Date(p) : d ? new Date(d) : null
|
|
7698
|
+
), [N, J] = K(null), [ge, X] = K(null);
|
|
7699
|
+
de(() => {
|
|
7700
|
+
M(p ? new Date(p) : null), W(p ? new Date(p) : null);
|
|
7697
7701
|
}, [p]);
|
|
7698
|
-
const
|
|
7699
|
-
|
|
7700
|
-
},
|
|
7701
|
-
|
|
7702
|
-
},
|
|
7703
|
-
n === "inline" &&
|
|
7702
|
+
const x = (h) => {
|
|
7703
|
+
h.stopPropagation(), w(h.currentTarget), v(!0);
|
|
7704
|
+
}, C = () => {
|
|
7705
|
+
v(!1);
|
|
7706
|
+
}, _ = (h) => !!(c && h.getTime() < c || u && h.getTime() > u || m && h.getTime() > (/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999)), $ = (h) => {
|
|
7707
|
+
n === "inline" && U.current && !U.current.contains(h.target) && (e === "single" ? j || M(null) : e === "range" && (!b || !F) && (O(null), H(null)), v(!1));
|
|
7704
7708
|
};
|
|
7705
|
-
|
|
7706
|
-
document.removeEventListener("mousedown",
|
|
7707
|
-
}), [
|
|
7708
|
-
const
|
|
7709
|
-
!
|
|
7710
|
-
},
|
|
7711
|
-
if (!
|
|
7712
|
-
|
|
7709
|
+
de(() => (g ? document.addEventListener("mousedown", $) : document.removeEventListener("mousedown", $), () => {
|
|
7710
|
+
document.removeEventListener("mousedown", $);
|
|
7711
|
+
}), [g]);
|
|
7712
|
+
const P = (h) => {
|
|
7713
|
+
!h || _(h) || (e === "single" ? M(h) : e === "range" && (!b || b && F ? (O(h), H(null)) : h >= b ? H(h) : O(h)));
|
|
7714
|
+
}, D = (h) => {
|
|
7715
|
+
if (!h || _(h)) {
|
|
7716
|
+
ee(null);
|
|
7713
7717
|
return;
|
|
7714
7718
|
}
|
|
7715
|
-
e === "range" &&
|
|
7716
|
-
},
|
|
7717
|
-
|
|
7718
|
-
},
|
|
7719
|
-
if (
|
|
7720
|
-
const
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7719
|
+
e === "range" && b && !F && ee(h);
|
|
7720
|
+
}, A = () => {
|
|
7721
|
+
ee(null);
|
|
7722
|
+
}, k = () => {
|
|
7723
|
+
if (v(!1), e === "single") {
|
|
7724
|
+
const h = o ? /* @__PURE__ */ new Date() : j, T = h ? new Date(
|
|
7725
|
+
h.getFullYear(),
|
|
7726
|
+
h.getMonth(),
|
|
7727
|
+
h.getDate(),
|
|
7728
|
+
Z.ampm === "PM" && Z.hour !== 12 ? Z.hour + 12 : Z.ampm === "AM" && Z.hour === 12 ? 0 : Z.hour,
|
|
7729
|
+
Z.minute
|
|
7726
7730
|
) : null;
|
|
7727
|
-
|
|
7728
|
-
} else e === "range" && (
|
|
7729
|
-
startDate:
|
|
7730
|
-
endDate:
|
|
7731
|
+
W(T), i == null || i(T ? T.getTime() : null);
|
|
7732
|
+
} else e === "range" && (J(b), X(F), i == null || i({
|
|
7733
|
+
startDate: b ? b.getTime() : null,
|
|
7734
|
+
endDate: F ? F.getTime() : null
|
|
7731
7735
|
}));
|
|
7732
|
-
},
|
|
7733
|
-
const
|
|
7734
|
-
for (let
|
|
7735
|
-
|
|
7736
|
-
for (let
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7736
|
+
}, R = () => {
|
|
7737
|
+
const h = new Date(y.getFullYear(), y.getMonth(), 1), T = new Date(y.getFullYear(), y.getMonth() + 1, 0), Q = (/* @__PURE__ */ new Date()).setHours(23, 59, 59, 999), ae = [], le = h.getDay();
|
|
7738
|
+
for (let ce = 0; ce < le; ce++)
|
|
7739
|
+
ae.push(null);
|
|
7740
|
+
for (let ce = 1; ce <= T.getDate(); ce++) {
|
|
7741
|
+
const $e = new Date(y.getFullYear(), y.getMonth(), ce);
|
|
7742
|
+
m && $e.getTime() > Q || ae.push($e);
|
|
7743
|
+
}
|
|
7744
|
+
return ae;
|
|
7745
|
+
}, I = (h) => {
|
|
7746
|
+
if (!h) return !1;
|
|
7741
7747
|
if (e === "single")
|
|
7742
|
-
return (
|
|
7748
|
+
return (j == null ? void 0 : j.toDateString()) === h.toDateString();
|
|
7743
7749
|
if (e === "range") {
|
|
7744
|
-
if (
|
|
7745
|
-
const
|
|
7746
|
-
return
|
|
7750
|
+
if (b && !F && Y) {
|
|
7751
|
+
const T = b < Y ? b : Y, Q = b < Y ? Y : b;
|
|
7752
|
+
return h >= T && h <= Q;
|
|
7747
7753
|
}
|
|
7748
|
-
return
|
|
7754
|
+
return b && F && h >= b && h <= F;
|
|
7749
7755
|
}
|
|
7750
7756
|
return !1;
|
|
7751
|
-
},
|
|
7752
|
-
if (!
|
|
7753
|
-
return e === "range" ?
|
|
7757
|
+
}, V = (h, T) => {
|
|
7758
|
+
if (!h)
|
|
7759
|
+
return e === "range" ? T === "end" ? "End Date" : "Start Date" : o ? `${String(Z.hour).padStart(2, "0")}:${String(Z.minute).padStart(2, "0")} ${Z.ampm}` : l;
|
|
7754
7760
|
if (o)
|
|
7755
|
-
return `${String(
|
|
7756
|
-
const
|
|
7757
|
-
return `${
|
|
7758
|
-
},
|
|
7761
|
+
return `${String(Z.hour).padStart(2, "0")}:${String(Z.minute).padStart(2, "0")} ${Z.ampm}`;
|
|
7762
|
+
const Q = h.getDate().toString().padStart(2, "0"), ae = jn[h.getMonth()], le = h.getFullYear(), ce = t ? ` ${String(Z.hour).padStart(2, "0")}:${String(Z.minute).padStart(2, "0")} ${Z.ampm}` : "";
|
|
7763
|
+
return `${Q} ${ae} ${le}${ce}`;
|
|
7764
|
+
}, re = /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full border border-color-gray-300 rounded-md p-2", children: [
|
|
7759
7765
|
/* @__PURE__ */ a.jsx(
|
|
7760
7766
|
"select",
|
|
7761
7767
|
{
|
|
7762
|
-
value:
|
|
7763
|
-
onChange: (
|
|
7768
|
+
value: Z.hour,
|
|
7769
|
+
onChange: (h) => se({ ...Z, hour: parseInt(h.target.value) }),
|
|
7764
7770
|
className: "w-16 border-0 text-center bg-color-transparent outline-0",
|
|
7765
|
-
children: Array.from({ length: 12 }, (
|
|
7771
|
+
children: Array.from({ length: 12 }, (h, T) => T + 1).map((h) => /* @__PURE__ */ a.jsx("option", { value: h, children: h.toString().padStart(2, "0") }, h))
|
|
7766
7772
|
}
|
|
7767
7773
|
),
|
|
7768
7774
|
/* @__PURE__ */ a.jsx(
|
|
7769
7775
|
"select",
|
|
7770
7776
|
{
|
|
7771
|
-
value:
|
|
7772
|
-
onChange: (
|
|
7777
|
+
value: Z.minute,
|
|
7778
|
+
onChange: (h) => se({ ...Z, minute: parseInt(h.target.value) }),
|
|
7773
7779
|
className: "w-16 border-0 text-center bg-color-transparent outline-0 border-l border-color-gray-300",
|
|
7774
|
-
children: Array.from({ length: 60 }, (
|
|
7780
|
+
children: Array.from({ length: 60 }, (h, T) => T).map((h) => /* @__PURE__ */ a.jsx("option", { value: h, children: h.toString().padStart(2, "0") }, h))
|
|
7775
7781
|
}
|
|
7776
7782
|
),
|
|
7777
7783
|
/* @__PURE__ */ a.jsxs(
|
|
7778
7784
|
"select",
|
|
7779
7785
|
{
|
|
7780
|
-
value:
|
|
7781
|
-
onChange: (
|
|
7786
|
+
value: Z.ampm,
|
|
7787
|
+
onChange: (h) => se({ ...Z, ampm: h.target.value }),
|
|
7782
7788
|
className: "w-16 border-0 text-center bg-color-transparent outline-0 border-l border-color-gray-300",
|
|
7783
7789
|
children: [
|
|
7784
7790
|
/* @__PURE__ */ a.jsx("option", { value: "AM", children: "AM" }),
|
|
@@ -7786,15 +7792,15 @@ const wi = ({
|
|
|
7786
7792
|
]
|
|
7787
7793
|
}
|
|
7788
7794
|
)
|
|
7789
|
-
] }),
|
|
7795
|
+
] }), S = /* @__PURE__ */ a.jsxs(
|
|
7790
7796
|
"div",
|
|
7791
7797
|
{
|
|
7792
|
-
ref:
|
|
7798
|
+
ref: U,
|
|
7793
7799
|
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"}`,
|
|
7794
7800
|
style: n === "dialog" ? void 0 : {
|
|
7795
7801
|
position: "absolute",
|
|
7796
|
-
left:
|
|
7797
|
-
top:
|
|
7802
|
+
left: f == null ? void 0 : f.getBoundingClientRect().left,
|
|
7803
|
+
top: f ? f.getBoundingClientRect().bottom + window.scrollY : 0
|
|
7798
7804
|
},
|
|
7799
7805
|
children: [
|
|
7800
7806
|
!o && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -7806,7 +7812,7 @@ const wi = ({
|
|
|
7806
7812
|
size: "small",
|
|
7807
7813
|
color: "gray",
|
|
7808
7814
|
roundedFull: !0,
|
|
7809
|
-
onClick: () =>
|
|
7815
|
+
onClick: () => E(new Date(y.getFullYear(), y.getMonth() - 1, 1)),
|
|
7810
7816
|
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" }) })
|
|
7811
7817
|
}
|
|
7812
7818
|
),
|
|
@@ -7815,18 +7821,18 @@ const wi = ({
|
|
|
7815
7821
|
"select",
|
|
7816
7822
|
{
|
|
7817
7823
|
className: "text-sm outline-none",
|
|
7818
|
-
value:
|
|
7819
|
-
onChange: (
|
|
7820
|
-
children: jn.map((
|
|
7824
|
+
value: y.getMonth(),
|
|
7825
|
+
onChange: (h) => E(new Date(y.getFullYear(), parseInt(h.target.value), 1)),
|
|
7826
|
+
children: jn.map((h, T) => /* @__PURE__ */ a.jsx("option", { value: T, children: h }, h))
|
|
7821
7827
|
}
|
|
7822
7828
|
),
|
|
7823
7829
|
/* @__PURE__ */ a.jsx(
|
|
7824
7830
|
"select",
|
|
7825
7831
|
{
|
|
7826
7832
|
className: "text-sm outline-none",
|
|
7827
|
-
value:
|
|
7828
|
-
onChange: (
|
|
7829
|
-
children: Array.from({ length: 150 }, (
|
|
7833
|
+
value: y.getFullYear(),
|
|
7834
|
+
onChange: (h) => E(new Date(parseInt(h.target.value), y.getMonth(), 1)),
|
|
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))
|
|
7830
7836
|
}
|
|
7831
7837
|
)
|
|
7832
7838
|
] }),
|
|
@@ -7837,37 +7843,37 @@ const wi = ({
|
|
|
7837
7843
|
size: "small",
|
|
7838
7844
|
color: "gray",
|
|
7839
7845
|
roundedFull: !0,
|
|
7840
|
-
onClick: () =>
|
|
7846
|
+
onClick: () => E(new Date(y.getFullYear(), y.getMonth() + 1, 1)),
|
|
7841
7847
|
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" }) })
|
|
7842
7848
|
}
|
|
7843
7849
|
)
|
|
7844
7850
|
] }),
|
|
7845
7851
|
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-columns-7 gap-1 text-center text-sm mb-2", children: [
|
|
7846
|
-
Si.map((
|
|
7847
|
-
|
|
7852
|
+
Si.map((h) => /* @__PURE__ */ a.jsx("div", { className: "font-semibold", children: h }, h)),
|
|
7853
|
+
R().map((h, T) => /* @__PURE__ */ a.jsx(
|
|
7848
7854
|
"div",
|
|
7849
7855
|
{
|
|
7850
7856
|
className: `size-8 flex justify-center items-center text-sm rounded-full transition-all
|
|
7851
|
-
${
|
|
7852
|
-
${
|
|
7853
|
-
${
|
|
7854
|
-
onClick: () =>
|
|
7855
|
-
onMouseEnter: () =>
|
|
7856
|
-
onMouseLeave:
|
|
7857
|
-
children:
|
|
7857
|
+
${h ? "hover:bg-color-blue-100 cursor-pointer" : ""}
|
|
7858
|
+
${h && I(h) ? "bg-color-blue-500 hover:bg-color-blue-500 text-color-white" : ""}
|
|
7859
|
+
${h && _(h) ? "bg-color-gray-100 text-color-gray-400 !cursor-not-allowed hover:bg-color-gray-100" : ""}`,
|
|
7860
|
+
onClick: () => h && P(h),
|
|
7861
|
+
onMouseEnter: () => h && D(h),
|
|
7862
|
+
onMouseLeave: A,
|
|
7863
|
+
children: h ? h.getDate() : ""
|
|
7858
7864
|
},
|
|
7859
|
-
|
|
7865
|
+
T
|
|
7860
7866
|
))
|
|
7861
7867
|
] })
|
|
7862
7868
|
] }),
|
|
7863
|
-
(t || o) &&
|
|
7869
|
+
(t || o) && re,
|
|
7864
7870
|
/* @__PURE__ */ a.jsx("div", { className: "mt-4 flex justify-end", children: /* @__PURE__ */ a.jsx(
|
|
7865
7871
|
$t,
|
|
7866
7872
|
{
|
|
7867
7873
|
fullWidth: !0,
|
|
7868
|
-
onClick:
|
|
7869
|
-
disabled: e === "range" && !
|
|
7870
|
-
className: `${e === "range" && !
|
|
7874
|
+
onClick: k,
|
|
7875
|
+
disabled: e === "range" && !F && !o,
|
|
7876
|
+
className: `${e === "range" && !F && !o ? "bg-color-gray-400 cursor-not-allowed" : ""}`,
|
|
7871
7877
|
children: "Confirm"
|
|
7872
7878
|
}
|
|
7873
7879
|
) })
|
|
@@ -7878,26 +7884,26 @@ const wi = ({
|
|
|
7878
7884
|
/* @__PURE__ */ a.jsxs(
|
|
7879
7885
|
$t,
|
|
7880
7886
|
{
|
|
7881
|
-
onClick:
|
|
7887
|
+
onClick: x,
|
|
7882
7888
|
fullWidth: !0,
|
|
7883
7889
|
color: "gray",
|
|
7884
7890
|
variant: "outlined",
|
|
7885
7891
|
className: `!justify-between gap-2 ${r || ""}`,
|
|
7886
7892
|
children: [
|
|
7887
|
-
e === "single" ?
|
|
7893
|
+
e === "single" ? z ? V(z) : d ? V(new Date(d)) : l : (
|
|
7888
7894
|
// Display rangeStart immediately if set, even if rangeEnd is null
|
|
7889
|
-
|
|
7890
|
-
|
|
7895
|
+
b || N || ge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
7896
|
+
V(b || N, "start"),
|
|
7891
7897
|
" -",
|
|
7892
7898
|
" ",
|
|
7893
|
-
|
|
7899
|
+
V(F || ge, "end")
|
|
7894
7900
|
] }) : l
|
|
7895
7901
|
),
|
|
7896
7902
|
s
|
|
7897
7903
|
]
|
|
7898
7904
|
}
|
|
7899
7905
|
),
|
|
7900
|
-
n === "inline" ? /* @__PURE__ */ a.jsx(a.Fragment, { children:
|
|
7906
|
+
n === "inline" ? /* @__PURE__ */ a.jsx(a.Fragment, { children: g && Ie(S, document.body) }) : /* @__PURE__ */ a.jsx(hi, { open: g, title: o ? "Select Time" : l, onClose: C, children: /* @__PURE__ */ a.jsx("div", { className: "w-72", children: S }) })
|
|
7901
7907
|
] });
|
|
7902
7908
|
}, aa = ({
|
|
7903
7909
|
tabs: e,
|
|
@@ -7982,7 +7988,7 @@ function sa({
|
|
|
7982
7988
|
onItemSelect: l,
|
|
7983
7989
|
className: s = ""
|
|
7984
7990
|
}) {
|
|
7985
|
-
const [c, u] =
|
|
7991
|
+
const [c, u] = K(o), p = (m) => {
|
|
7986
7992
|
u(m), m.onClick && m.onClick(), l && l(m);
|
|
7987
7993
|
};
|
|
7988
7994
|
return /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(
|
|
@@ -8045,7 +8051,7 @@ export {
|
|
|
8045
8051
|
oa as BottomNavigation,
|
|
8046
8052
|
ra as Breadcrumbs,
|
|
8047
8053
|
$t as Button,
|
|
8048
|
-
|
|
8054
|
+
xe as COLOR_MAP,
|
|
8049
8055
|
mi as Card,
|
|
8050
8056
|
Ei as CardWrapper,
|
|
8051
8057
|
Gi as Carousel,
|