@krosoft/react 0.0.82 → 0.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AppTitle-BOhhDNS5.js → AppTitle-CJZdhpRm.js} +2 -2
- package/dist/FormDialog-CwxZPmv4.js +472 -0
- package/dist/{MetricCard-bpuqueI5.js → MetricCard-5kWhYPKJ.js} +1 -1
- package/dist/{SearchInput-Dh-92XhU.js → SearchInput-Dpy2amwO.js} +28 -28
- package/dist/{TableFilter-BoNsBNbv.js → TableFilter-w9BHeObX.js} +2 -2
- package/dist/{TableSettings-D2qjh0E9.js → TableSettings-DNkdLgCN.js} +21 -21
- package/dist/components/core/cards/index.js +1 -1
- package/dist/components/core/dialogs/AppDialog.d.ts +28 -0
- package/dist/components/core/dialogs/AppDialog.d.ts.map +1 -0
- package/dist/components/core/dialogs/FormDialog.d.ts +32 -0
- package/dist/components/core/dialogs/FormDialog.d.ts.map +1 -0
- package/dist/components/core/dialogs/index.d.ts +7 -0
- package/dist/components/core/dialogs/index.d.ts.map +1 -0
- package/dist/components/core/dialogs/index.js +16 -0
- package/dist/components/core/filters/index.js +1 -1
- package/dist/components/core/index.d.ts +1 -0
- package/dist/components/core/index.d.ts.map +1 -1
- package/dist/components/core/index.js +46 -32
- package/dist/components/core/inputs/index.js +1 -1
- package/dist/components/core/layouts/index.js +1 -1
- package/dist/components/core/table/index.js +1 -1
- package/dist/components/index.js +96 -82
- package/dist/components/ui/dialog.d.ts +20 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/index.js +1 -1
- package/dist/components/ui/progress.d.ts +8 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/{dropdown-menu-D6j1GdTA.js → dropdown-menu-Q_WkonPk.js} +1 -1
- package/dist/{popover-DVVl_ccN.js → popover-BMvYmQOM.js} +598 -590
- package/dist/tailwind/index.d.ts +9 -0
- package/dist/tailwind/index.d.ts.map +1 -1
- package/dist/tailwind/index.js +6 -1
- package/package.json +5 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as y, jsxs as Oe, Fragment as
|
|
1
|
+
import { jsx as y, jsxs as Oe, Fragment as Ke } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
import M, { createContext as
|
|
4
|
-
import { c as gt, u as H, p as re, a as bt, t as wt, e as F, g as sr, q as He, d as rn, f as te, v as
|
|
3
|
+
import M, { createContext as qa, useContext as za, useCallback as ie, useRef as mt, useLayoutEffect as Ga, useState as Kt, useEffect as Ka, useMemo as ht } from "react";
|
|
4
|
+
import { c as gt, u as H, p as re, a as bt, t as wt, e as F, g as sr, q as He, d as rn, f as te, v as Xa, w as Qa, r as pt, b as Ft, h as Za, o as Ja, s as es, l as ts, i as ns, j as rs, k as os, m as as, n as ss } from "./floating-ui.react-dom-BIcsGc3t.js";
|
|
5
5
|
import { c as L } from "./index-gWiv5-6R.js";
|
|
6
|
-
import { l as
|
|
6
|
+
import { l as is, C as cs, R as ir, k as cr, j as ur } from "./select-CtU681LB.js";
|
|
7
7
|
import * as Et from "react-dom";
|
|
8
8
|
import on from "react-dom";
|
|
9
9
|
import { c as an } from "./createLucideIcon-CRdjzt2A.js";
|
|
10
|
-
const
|
|
10
|
+
const us = gt(
|
|
11
11
|
"relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
12
12
|
{
|
|
13
13
|
variants: {
|
|
@@ -20,24 +20,24 @@ const ls = gt(
|
|
|
20
20
|
variant: "default"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
),
|
|
24
|
-
({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ y("div", { ref: r, role: "alert", className: L(
|
|
23
|
+
), ls = l.forwardRef(
|
|
24
|
+
({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ y("div", { ref: r, role: "alert", className: L(us({ variant: t }), e), ...n })
|
|
25
25
|
);
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
function
|
|
26
|
+
ls.displayName = "Alert";
|
|
27
|
+
const ds = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("h5", { ref: n, className: L("mb-1 font-medium leading-none tracking-tight", e), ...t }));
|
|
28
|
+
ds.displayName = "AlertTitle";
|
|
29
|
+
const fs = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y("div", { ref: n, className: L("text-sm [&_p]:leading-relaxed", e), ...t }));
|
|
30
|
+
fs.displayName = "AlertDescription";
|
|
31
|
+
function ms(e, t) {
|
|
32
32
|
return l.useReducer((n, r) => t[n][r] ?? n, e);
|
|
33
33
|
}
|
|
34
34
|
var lr = (e) => {
|
|
35
|
-
const { present: t, children: n } = e, r =
|
|
35
|
+
const { present: t, children: n } = e, r = hs(t), o = typeof n == "function" ? n({ present: r.isPresent }) : l.Children.only(n), a = H(r.ref, ps(o));
|
|
36
36
|
return typeof n == "function" || r.isPresent ? l.cloneElement(o, { ref: a }) : null;
|
|
37
37
|
};
|
|
38
38
|
lr.displayName = "Presence";
|
|
39
|
-
function
|
|
40
|
-
const [t, n] = l.useState(), r = l.useRef(null), o = l.useRef(e), a = l.useRef("none"), i = e ? "mounted" : "unmounted", [s, u] =
|
|
39
|
+
function hs(e) {
|
|
40
|
+
const [t, n] = l.useState(), r = l.useRef(null), o = l.useRef(e), a = l.useRef("none"), i = e ? "mounted" : "unmounted", [s, u] = ms(i, {
|
|
41
41
|
mounted: {
|
|
42
42
|
UNMOUNT: "unmounted",
|
|
43
43
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -88,15 +88,15 @@ function ps(e) {
|
|
|
88
88
|
function ct(e) {
|
|
89
89
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function ps(e) {
|
|
92
92
|
var r, o;
|
|
93
93
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
94
94
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
95
95
|
}
|
|
96
96
|
// @__NO_SIDE_EFFECTS__
|
|
97
|
-
function
|
|
98
|
-
const t = /* @__PURE__ */
|
|
99
|
-
const { children: a, ...i } = r, s = l.Children.toArray(a), u = s.find(
|
|
97
|
+
function vs(e) {
|
|
98
|
+
const t = /* @__PURE__ */ ys(e), n = l.forwardRef((r, o) => {
|
|
99
|
+
const { children: a, ...i } = r, s = l.Children.toArray(a), u = s.find(bs);
|
|
100
100
|
if (u) {
|
|
101
101
|
const c = u.props.children, d = s.map((f) => f === u ? l.Children.count(c) > 1 ? l.Children.only(null) : l.isValidElement(c) ? c.props.children : null : f);
|
|
102
102
|
return /* @__PURE__ */ y(t, { ...i, ref: o, children: l.isValidElement(c) ? l.cloneElement(c, void 0, d) : null });
|
|
@@ -106,22 +106,22 @@ function ys(e) {
|
|
|
106
106
|
return n.displayName = `${e}.Slot`, n;
|
|
107
107
|
}
|
|
108
108
|
// @__NO_SIDE_EFFECTS__
|
|
109
|
-
function
|
|
109
|
+
function ys(e) {
|
|
110
110
|
const t = l.forwardRef((n, r) => {
|
|
111
111
|
const { children: o, ...a } = n;
|
|
112
112
|
if (l.isValidElement(o)) {
|
|
113
|
-
const i =
|
|
113
|
+
const i = Es(o), s = ws(a, o.props);
|
|
114
114
|
return o.type !== l.Fragment && (s.ref = r ? bt(r, i) : i), l.cloneElement(o, s);
|
|
115
115
|
}
|
|
116
116
|
return l.Children.count(o) > 1 ? l.Children.only(null) : null;
|
|
117
117
|
});
|
|
118
118
|
return t.displayName = `${e}.SlotClone`, t;
|
|
119
119
|
}
|
|
120
|
-
var
|
|
121
|
-
function
|
|
122
|
-
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
120
|
+
var gs = Symbol("radix.slottable");
|
|
121
|
+
function bs(e) {
|
|
122
|
+
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === gs;
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function ws(e, t) {
|
|
125
125
|
const n = { ...t };
|
|
126
126
|
for (const r in t) {
|
|
127
127
|
const o = e[r], a = t[r];
|
|
@@ -132,12 +132,12 @@ function Es(e, t) {
|
|
|
132
132
|
}
|
|
133
133
|
return { ...e, ...n };
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Es(e) {
|
|
136
136
|
var r, o;
|
|
137
137
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
138
138
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
139
139
|
}
|
|
140
|
-
var
|
|
140
|
+
var Os = [
|
|
141
141
|
"a",
|
|
142
142
|
"button",
|
|
143
143
|
"div",
|
|
@@ -155,14 +155,14 @@ var Cs = [
|
|
|
155
155
|
"span",
|
|
156
156
|
"svg",
|
|
157
157
|
"ul"
|
|
158
|
-
], sn =
|
|
159
|
-
const n = /* @__PURE__ */
|
|
158
|
+
], sn = Os.reduce((e, t) => {
|
|
159
|
+
const n = /* @__PURE__ */ vs(`Primitive.${t}`), r = l.forwardRef((o, a) => {
|
|
160
160
|
const { asChild: i, ...s } = o, u = i ? n : t;
|
|
161
161
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ y(u, { ...s, ref: a });
|
|
162
162
|
});
|
|
163
163
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
164
|
-
}, {}), Ot = "Checkbox", [
|
|
165
|
-
function
|
|
164
|
+
}, {}), Ot = "Checkbox", [Cs] = He(Ot), [Ds, cn] = Cs(Ot);
|
|
165
|
+
function Ns(e) {
|
|
166
166
|
const {
|
|
167
167
|
__scopeCheckbox: t,
|
|
168
168
|
checked: n,
|
|
@@ -181,14 +181,14 @@ function Ms(e) {
|
|
|
181
181
|
defaultProp: o ?? !1,
|
|
182
182
|
onChange: u,
|
|
183
183
|
caller: Ot
|
|
184
|
-
}), [
|
|
184
|
+
}), [D, h] = l.useState(null), [w, O] = l.useState(null), g = l.useRef(!1), b = D ? !!i || !!D.closest("form") : (
|
|
185
185
|
// We set this to true by default so that events bubble to forms without JS (SSR)
|
|
186
186
|
!0
|
|
187
187
|
), C = {
|
|
188
188
|
checked: p,
|
|
189
189
|
disabled: a,
|
|
190
190
|
setChecked: v,
|
|
191
|
-
control:
|
|
191
|
+
control: D,
|
|
192
192
|
setControl: h,
|
|
193
193
|
name: s,
|
|
194
194
|
form: i,
|
|
@@ -205,7 +205,7 @@ function Ms(e) {
|
|
|
205
205
|
{
|
|
206
206
|
scope: t,
|
|
207
207
|
...C,
|
|
208
|
-
children:
|
|
208
|
+
children: Ms(f) ? f(C) : r
|
|
209
209
|
}
|
|
210
210
|
);
|
|
211
211
|
}
|
|
@@ -221,7 +221,7 @@ var dr = "CheckboxTrigger", fr = l.forwardRef(
|
|
|
221
221
|
setChecked: f,
|
|
222
222
|
hasConsumerStoppedPropagationRef: p,
|
|
223
223
|
isFormControl: v,
|
|
224
|
-
bubbleInput:
|
|
224
|
+
bubbleInput: D
|
|
225
225
|
} = cn(dr, e), h = H(o, d), w = l.useRef(u);
|
|
226
226
|
return l.useEffect(() => {
|
|
227
227
|
const O = a == null ? void 0 : a.form;
|
|
@@ -246,7 +246,7 @@ var dr = "CheckboxTrigger", fr = l.forwardRef(
|
|
|
246
246
|
O.key === "Enter" && O.preventDefault();
|
|
247
247
|
}),
|
|
248
248
|
onClick: F(n, (O) => {
|
|
249
|
-
f((g) => Se(g) ? !0 : !g),
|
|
249
|
+
f((g) => Se(g) ? !0 : !g), D && v && (p.current = O.isPropagationStopped(), p.current || O.stopPropagation());
|
|
250
250
|
})
|
|
251
251
|
}
|
|
252
252
|
);
|
|
@@ -268,7 +268,7 @@ var un = l.forwardRef(
|
|
|
268
268
|
...f
|
|
269
269
|
} = e;
|
|
270
270
|
return /* @__PURE__ */ y(
|
|
271
|
-
|
|
271
|
+
Ns,
|
|
272
272
|
{
|
|
273
273
|
__scopeCheckbox: n,
|
|
274
274
|
checked: o,
|
|
@@ -279,7 +279,7 @@ var un = l.forwardRef(
|
|
|
279
279
|
name: r,
|
|
280
280
|
form: d,
|
|
281
281
|
value: u,
|
|
282
|
-
internal_do_not_use_render: ({ isFormControl: p }) => /* @__PURE__ */ Oe(
|
|
282
|
+
internal_do_not_use_render: ({ isFormControl: p }) => /* @__PURE__ */ Oe(Ke, { children: [
|
|
283
283
|
/* @__PURE__ */ y(
|
|
284
284
|
fr,
|
|
285
285
|
{
|
|
@@ -336,17 +336,17 @@ var pr = "CheckboxBubbleInput", vr = l.forwardRef(
|
|
|
336
336
|
form: f,
|
|
337
337
|
bubbleInput: p,
|
|
338
338
|
setBubbleInput: v
|
|
339
|
-
} = cn(pr, e),
|
|
339
|
+
} = cn(pr, e), D = H(n, v), h = is(a), w = sr(r);
|
|
340
340
|
l.useEffect(() => {
|
|
341
341
|
const g = p;
|
|
342
342
|
if (!g) return;
|
|
343
|
-
const b = window.HTMLInputElement.prototype,
|
|
343
|
+
const b = window.HTMLInputElement.prototype, N = Object.getOwnPropertyDescriptor(
|
|
344
344
|
b,
|
|
345
345
|
"checked"
|
|
346
346
|
).set, m = !o.current;
|
|
347
|
-
if (h !== a &&
|
|
347
|
+
if (h !== a && N) {
|
|
348
348
|
const E = new Event("click", { bubbles: m });
|
|
349
|
-
g.indeterminate = Se(a),
|
|
349
|
+
g.indeterminate = Se(a), N.call(g, Se(a) ? !1 : a), g.dispatchEvent(E);
|
|
350
350
|
}
|
|
351
351
|
}, [p, h, a, o]);
|
|
352
352
|
const O = l.useRef(Se(a) ? !1 : a);
|
|
@@ -363,7 +363,7 @@ var pr = "CheckboxBubbleInput", vr = l.forwardRef(
|
|
|
363
363
|
form: f,
|
|
364
364
|
...t,
|
|
365
365
|
tabIndex: -1,
|
|
366
|
-
ref:
|
|
366
|
+
ref: D,
|
|
367
367
|
style: {
|
|
368
368
|
...t.style,
|
|
369
369
|
...w,
|
|
@@ -381,7 +381,7 @@ var pr = "CheckboxBubbleInput", vr = l.forwardRef(
|
|
|
381
381
|
}
|
|
382
382
|
);
|
|
383
383
|
vr.displayName = pr;
|
|
384
|
-
function
|
|
384
|
+
function Ms(e) {
|
|
385
385
|
return typeof e == "function";
|
|
386
386
|
}
|
|
387
387
|
function Se(e) {
|
|
@@ -396,24 +396,24 @@ function yr(e) {
|
|
|
396
396
|
* This source code is licensed under the ISC license.
|
|
397
397
|
* See the LICENSE file in the root directory of this source tree.
|
|
398
398
|
*/
|
|
399
|
-
const
|
|
399
|
+
const Ps = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], Ss = an("chevron-left", Ps);
|
|
400
400
|
/**
|
|
401
401
|
* @license lucide-react v1.16.0 - ISC
|
|
402
402
|
*
|
|
403
403
|
* This source code is licensed under the ISC license.
|
|
404
404
|
* See the LICENSE file in the root directory of this source tree.
|
|
405
405
|
*/
|
|
406
|
-
const
|
|
406
|
+
const Ts = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], ks = an("chevron-right", Ts);
|
|
407
407
|
/**
|
|
408
408
|
* @license lucide-react v1.16.0 - ISC
|
|
409
409
|
*
|
|
410
410
|
* This source code is licensed under the ISC license.
|
|
411
411
|
* See the LICENSE file in the root directory of this source tree.
|
|
412
412
|
*/
|
|
413
|
-
const
|
|
413
|
+
const xs = [
|
|
414
414
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
415
415
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
416
|
-
], gr = an("x",
|
|
416
|
+
], gr = an("x", xs), Rs = l.forwardRef(
|
|
417
417
|
({ className: e, ...t }, n) => /* @__PURE__ */ y(
|
|
418
418
|
un,
|
|
419
419
|
{
|
|
@@ -423,12 +423,12 @@ const Rs = [
|
|
|
423
423
|
e
|
|
424
424
|
),
|
|
425
425
|
...t,
|
|
426
|
-
children: /* @__PURE__ */ y(hr, { className: L("flex items-center justify-center text-current"), children: t.checked === "indeterminate" ? /* @__PURE__ */ y("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, className: "size-3", children: /* @__PURE__ */ y("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) }) : /* @__PURE__ */ y(
|
|
426
|
+
children: /* @__PURE__ */ y(hr, { className: L("flex items-center justify-center text-current"), children: t.checked === "indeterminate" ? /* @__PURE__ */ y("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 3, className: "size-3", children: /* @__PURE__ */ y("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) }) : /* @__PURE__ */ y(cs, { className: "size-3" }) })
|
|
427
427
|
}
|
|
428
428
|
)
|
|
429
429
|
);
|
|
430
|
-
|
|
431
|
-
const
|
|
430
|
+
Rs.displayName = un.displayName;
|
|
431
|
+
const As = l.forwardRef(({ className: e, type: t, ...n }, r) => /* @__PURE__ */ y(
|
|
432
432
|
"input",
|
|
433
433
|
{
|
|
434
434
|
type: t,
|
|
@@ -440,11 +440,11 @@ const _s = l.forwardRef(({ className: e, type: t, ...n }, r) => /* @__PURE__ */
|
|
|
440
440
|
...n
|
|
441
441
|
}
|
|
442
442
|
));
|
|
443
|
-
|
|
443
|
+
As.displayName = "Input";
|
|
444
444
|
// @__NO_SIDE_EFFECTS__
|
|
445
445
|
function Xt(e) {
|
|
446
|
-
const t = /* @__PURE__ */
|
|
447
|
-
const { children: a, ...i } = r, s = l.Children.toArray(a), u = s.find(
|
|
446
|
+
const t = /* @__PURE__ */ _s(e), n = l.forwardRef((r, o) => {
|
|
447
|
+
const { children: a, ...i } = r, s = l.Children.toArray(a), u = s.find(Is);
|
|
448
448
|
if (u) {
|
|
449
449
|
const c = u.props.children, d = s.map((f) => f === u ? l.Children.count(c) > 1 ? l.Children.only(null) : l.isValidElement(c) ? c.props.children : null : f);
|
|
450
450
|
return /* @__PURE__ */ y(t, { ...i, ref: o, children: l.isValidElement(c) ? l.cloneElement(c, void 0, d) : null });
|
|
@@ -454,22 +454,22 @@ function Xt(e) {
|
|
|
454
454
|
return n.displayName = `${e}.Slot`, n;
|
|
455
455
|
}
|
|
456
456
|
// @__NO_SIDE_EFFECTS__
|
|
457
|
-
function
|
|
457
|
+
function _s(e) {
|
|
458
458
|
const t = l.forwardRef((n, r) => {
|
|
459
459
|
const { children: o, ...a } = n;
|
|
460
460
|
if (l.isValidElement(o)) {
|
|
461
|
-
const i =
|
|
461
|
+
const i = $s(o), s = Fs(a, o.props);
|
|
462
462
|
return o.type !== l.Fragment && (s.ref = r ? bt(r, i) : i), l.cloneElement(o, s);
|
|
463
463
|
}
|
|
464
464
|
return l.Children.count(o) > 1 ? l.Children.only(null) : null;
|
|
465
465
|
});
|
|
466
466
|
return t.displayName = `${e}.SlotClone`, t;
|
|
467
467
|
}
|
|
468
|
-
var
|
|
469
|
-
function
|
|
470
|
-
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
468
|
+
var Ws = Symbol("radix.slottable");
|
|
469
|
+
function Is(e) {
|
|
470
|
+
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ws;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Fs(e, t) {
|
|
473
473
|
const n = { ...t };
|
|
474
474
|
for (const r in t) {
|
|
475
475
|
const o = e[r], a = t[r];
|
|
@@ -480,12 +480,12 @@ function $s(e, t) {
|
|
|
480
480
|
}
|
|
481
481
|
return { ...e, ...n };
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function $s(e) {
|
|
484
484
|
var r, o;
|
|
485
485
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
486
486
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
487
487
|
}
|
|
488
|
-
function
|
|
488
|
+
function Ys(e) {
|
|
489
489
|
const t = e + "CollectionProvider", [n, r] = He(t), [o, a] = n(
|
|
490
490
|
t,
|
|
491
491
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
@@ -503,12 +503,12 @@ function Bs(e) {
|
|
|
503
503
|
c.displayName = s;
|
|
504
504
|
const d = e + "CollectionItemSlot", f = "data-radix-collection-item", p = /* @__PURE__ */ Xt(d), v = M.forwardRef(
|
|
505
505
|
(h, w) => {
|
|
506
|
-
const { scope: O, children: g, ...b } = h, C = M.useRef(null),
|
|
507
|
-
return M.useEffect(() => (m.itemMap.set(C, { ref: C, ...b }), () => void m.itemMap.delete(C))), /* @__PURE__ */ y(p, { [f]: "", ref:
|
|
506
|
+
const { scope: O, children: g, ...b } = h, C = M.useRef(null), N = H(w, C), m = a(d, O);
|
|
507
|
+
return M.useEffect(() => (m.itemMap.set(C, { ref: C, ...b }), () => void m.itemMap.delete(C))), /* @__PURE__ */ y(p, { [f]: "", ref: N, children: g });
|
|
508
508
|
}
|
|
509
509
|
);
|
|
510
510
|
v.displayName = d;
|
|
511
|
-
function
|
|
511
|
+
function D(h) {
|
|
512
512
|
const w = a(e + "CollectionConsumer", h);
|
|
513
513
|
return M.useCallback(() => {
|
|
514
514
|
const g = w.collectionRef.current;
|
|
@@ -521,11 +521,11 @@ function Bs(e) {
|
|
|
521
521
|
}
|
|
522
522
|
return [
|
|
523
523
|
{ Provider: i, Slot: c, ItemSlot: v },
|
|
524
|
-
|
|
524
|
+
D,
|
|
525
525
|
r
|
|
526
526
|
];
|
|
527
527
|
}
|
|
528
|
-
var
|
|
528
|
+
var Bs = [
|
|
529
529
|
"a",
|
|
530
530
|
"button",
|
|
531
531
|
"div",
|
|
@@ -543,7 +543,7 @@ var Ls = [
|
|
|
543
543
|
"span",
|
|
544
544
|
"svg",
|
|
545
545
|
"ul"
|
|
546
|
-
], ve =
|
|
546
|
+
], ve = Bs.reduce((e, t) => {
|
|
547
547
|
const n = /* @__PURE__ */ Xt(`Primitive.${t}`), r = l.forwardRef((o, a) => {
|
|
548
548
|
const { asChild: i, ...s } = o, u = i ? n : t;
|
|
549
549
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ y(u, { ...s, ref: a });
|
|
@@ -553,7 +553,7 @@ var Ls = [
|
|
|
553
553
|
function br(e, t) {
|
|
554
554
|
e && Et.flushSync(() => e.dispatchEvent(t));
|
|
555
555
|
}
|
|
556
|
-
var
|
|
556
|
+
var Ls = "DismissableLayer", Qt = "dismissableLayer.update", Hs = "dismissableLayer.pointerDownOutside", Us = "dismissableLayer.focusOutside", xn, wr = l.createContext({
|
|
557
557
|
layers: /* @__PURE__ */ new Set(),
|
|
558
558
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
559
559
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -567,10 +567,10 @@ var Hs = "DismissableLayer", Qt = "dismissableLayer.update", Us = "dismissableLa
|
|
|
567
567
|
onInteractOutside: i,
|
|
568
568
|
onDismiss: s,
|
|
569
569
|
...u
|
|
570
|
-
} = e, c = l.useContext(wr), [d, f] = l.useState(null), p = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = l.useState({}),
|
|
570
|
+
} = e, c = l.useContext(wr), [d, f] = l.useState(null), p = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = l.useState({}), D = H(t, (E) => f(E)), h = Array.from(c.layers), [w] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), O = h.indexOf(w), g = d ? h.indexOf(d) : -1, b = c.layersWithOutsidePointerEventsDisabled.size > 0, C = g >= O, N = js((E) => {
|
|
571
571
|
const S = E.target, x = [...c.branches].some((k) => k.contains(S));
|
|
572
572
|
!C || x || (o == null || o(E), i == null || i(E), E.defaultPrevented || s == null || s());
|
|
573
|
-
}, p), m =
|
|
573
|
+
}, p), m = qs((E) => {
|
|
574
574
|
const S = E.target;
|
|
575
575
|
[...c.branches].some((k) => k.contains(S)) || (a == null || a(E), i == null || i(E), E.defaultPrevented || s == null || s());
|
|
576
576
|
}, p);
|
|
@@ -590,7 +590,7 @@ var Hs = "DismissableLayer", Qt = "dismissableLayer.update", Us = "dismissableLa
|
|
|
590
590
|
ve.div,
|
|
591
591
|
{
|
|
592
592
|
...u,
|
|
593
|
-
ref:
|
|
593
|
+
ref: D,
|
|
594
594
|
style: {
|
|
595
595
|
pointerEvents: b ? C ? "auto" : "none" : void 0,
|
|
596
596
|
...e.style
|
|
@@ -599,14 +599,14 @@ var Hs = "DismissableLayer", Qt = "dismissableLayer.update", Us = "dismissableLa
|
|
|
599
599
|
onBlurCapture: F(e.onBlurCapture, m.onBlurCapture),
|
|
600
600
|
onPointerDownCapture: F(
|
|
601
601
|
e.onPointerDownCapture,
|
|
602
|
-
|
|
602
|
+
N.onPointerDownCapture
|
|
603
603
|
)
|
|
604
604
|
}
|
|
605
605
|
);
|
|
606
606
|
}
|
|
607
607
|
);
|
|
608
|
-
Er.displayName =
|
|
609
|
-
var
|
|
608
|
+
Er.displayName = Ls;
|
|
609
|
+
var Vs = "DismissableLayerBranch", Or = l.forwardRef((e, t) => {
|
|
610
610
|
const n = l.useContext(wr), r = l.useRef(null), o = H(t, r);
|
|
611
611
|
return l.useEffect(() => {
|
|
612
612
|
const a = r.current;
|
|
@@ -616,8 +616,8 @@ var js = "DismissableLayerBranch", Or = l.forwardRef((e, t) => {
|
|
|
616
616
|
};
|
|
617
617
|
}, [n.branches]), /* @__PURE__ */ y(ve.div, { ...e, ref: o });
|
|
618
618
|
});
|
|
619
|
-
Or.displayName =
|
|
620
|
-
function
|
|
619
|
+
Or.displayName = Vs;
|
|
620
|
+
function js(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
621
621
|
const n = te(e), r = l.useRef(!1), o = l.useRef(() => {
|
|
622
622
|
});
|
|
623
623
|
return l.useEffect(() => {
|
|
@@ -625,7 +625,7 @@ function qs(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
625
625
|
if (s.target && !r.current) {
|
|
626
626
|
let u = function() {
|
|
627
627
|
Cr(
|
|
628
|
-
|
|
628
|
+
Hs,
|
|
629
629
|
n,
|
|
630
630
|
c,
|
|
631
631
|
{ discrete: !0 }
|
|
@@ -647,11 +647,11 @@ function qs(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
647
647
|
onPointerDownCapture: () => r.current = !0
|
|
648
648
|
};
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function qs(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
651
651
|
const n = te(e), r = l.useRef(!1);
|
|
652
652
|
return l.useEffect(() => {
|
|
653
653
|
const o = (a) => {
|
|
654
|
-
a.target && !r.current && Cr(
|
|
654
|
+
a.target && !r.current && Cr(Us, n, { originalEvent: a }, {
|
|
655
655
|
discrete: !1
|
|
656
656
|
});
|
|
657
657
|
};
|
|
@@ -669,24 +669,24 @@ function Cr(e, t, n, { discrete: r }) {
|
|
|
669
669
|
const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
670
670
|
t && o.addEventListener(e, t, { once: !0 }), r ? br(o, a) : o.dispatchEvent(a);
|
|
671
671
|
}
|
|
672
|
-
var
|
|
672
|
+
var zs = Er, Gs = Or, Ks = "Portal", Dr = l.forwardRef((e, t) => {
|
|
673
673
|
var s;
|
|
674
674
|
const { container: n, ...r } = e, [o, a] = l.useState(!1);
|
|
675
675
|
re(() => a(!0), []);
|
|
676
676
|
const i = n || o && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
|
|
677
677
|
return i ? on.createPortal(/* @__PURE__ */ y(ve.div, { ...r, ref: t }), i) : null;
|
|
678
678
|
});
|
|
679
|
-
|
|
680
|
-
function
|
|
679
|
+
Dr.displayName = Ks;
|
|
680
|
+
function Xs(e, t) {
|
|
681
681
|
return l.useReducer((n, r) => t[n][r] ?? n, e);
|
|
682
682
|
}
|
|
683
|
-
var
|
|
684
|
-
const { present: t, children: n } = e, r =
|
|
683
|
+
var Nr = (e) => {
|
|
684
|
+
const { present: t, children: n } = e, r = Qs(t), o = typeof n == "function" ? n({ present: r.isPresent }) : l.Children.only(n), a = H(r.ref, Zs(o));
|
|
685
685
|
return typeof n == "function" || r.isPresent ? l.cloneElement(o, { ref: a }) : null;
|
|
686
686
|
};
|
|
687
|
-
|
|
688
|
-
function
|
|
689
|
-
const [t, n] = l.useState(), r = l.useRef(null), o = l.useRef(e), a = l.useRef("none"), i = e ? "mounted" : "unmounted", [s, u] =
|
|
687
|
+
Nr.displayName = "Presence";
|
|
688
|
+
function Qs(e) {
|
|
689
|
+
const [t, n] = l.useState(), r = l.useRef(null), o = l.useRef(e), a = l.useRef("none"), i = e ? "mounted" : "unmounted", [s, u] = Xs(i, {
|
|
690
690
|
mounted: {
|
|
691
691
|
UNMOUNT: "unmounted",
|
|
692
692
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -737,12 +737,12 @@ function Zs(e) {
|
|
|
737
737
|
function ut(e) {
|
|
738
738
|
return (e == null ? void 0 : e.animationName) || "none";
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function Zs(e) {
|
|
741
741
|
var r, o;
|
|
742
742
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
743
743
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
744
744
|
}
|
|
745
|
-
var
|
|
745
|
+
var Js = Object.freeze({
|
|
746
746
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
747
747
|
position: "absolute",
|
|
748
748
|
border: 0,
|
|
@@ -754,18 +754,18 @@ var ei = Object.freeze({
|
|
|
754
754
|
clip: "rect(0, 0, 0, 0)",
|
|
755
755
|
whiteSpace: "nowrap",
|
|
756
756
|
wordWrap: "normal"
|
|
757
|
-
}),
|
|
757
|
+
}), ei = "VisuallyHidden", ln = l.forwardRef(
|
|
758
758
|
(e, t) => /* @__PURE__ */ y(
|
|
759
759
|
ve.span,
|
|
760
760
|
{
|
|
761
761
|
...e,
|
|
762
762
|
ref: t,
|
|
763
|
-
style: { ...
|
|
763
|
+
style: { ...Js, ...e.style }
|
|
764
764
|
}
|
|
765
765
|
)
|
|
766
766
|
);
|
|
767
|
-
ln.displayName =
|
|
768
|
-
var dn = "ToastProvider", [fn,
|
|
767
|
+
ln.displayName = ei;
|
|
768
|
+
var dn = "ToastProvider", [fn, ti, ni] = Ys("Toast"), [Mr] = He("Toast", [ni]), [ri, Ct] = Mr(dn), Pr = (e) => {
|
|
769
769
|
const {
|
|
770
770
|
__scopeToast: t,
|
|
771
771
|
label: n = "Notification",
|
|
@@ -777,7 +777,7 @@ var dn = "ToastProvider", [fn, ni, ri] = Bs("Toast"), [Mr] = He("Toast", [ri]),
|
|
|
777
777
|
return n.trim() || console.error(
|
|
778
778
|
`Invalid prop \`label\` supplied to \`${dn}\`. Expected non-empty \`string\`.`
|
|
779
779
|
), /* @__PURE__ */ y(fn.Provider, { scope: t, children: /* @__PURE__ */ y(
|
|
780
|
-
|
|
780
|
+
ri,
|
|
781
781
|
{
|
|
782
782
|
scope: t,
|
|
783
783
|
label: n,
|
|
@@ -796,14 +796,14 @@ var dn = "ToastProvider", [fn, ni, ri] = Bs("Toast"), [Mr] = He("Toast", [ri]),
|
|
|
796
796
|
) });
|
|
797
797
|
};
|
|
798
798
|
Pr.displayName = dn;
|
|
799
|
-
var Sr = "ToastViewport",
|
|
799
|
+
var Sr = "ToastViewport", oi = ["F8"], Zt = "toast.viewportPause", Jt = "toast.viewportResume", Tr = l.forwardRef(
|
|
800
800
|
(e, t) => {
|
|
801
801
|
const {
|
|
802
802
|
__scopeToast: n,
|
|
803
|
-
hotkey: r =
|
|
803
|
+
hotkey: r = oi,
|
|
804
804
|
label: o = "Notifications ({hotkey})",
|
|
805
805
|
...a
|
|
806
|
-
} = e, i = Ct(Sr, n), s =
|
|
806
|
+
} = e, i = Ct(Sr, n), s = ti(n), u = l.useRef(null), c = l.useRef(null), d = l.useRef(null), f = l.useRef(null), p = H(t, f, i.onViewportChange), v = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), D = i.toastCount > 0;
|
|
807
807
|
l.useEffect(() => {
|
|
808
808
|
const w = (O) => {
|
|
809
809
|
var b;
|
|
@@ -812,7 +812,7 @@ var Sr = "ToastViewport", ai = ["F8"], Zt = "toast.viewportPause", Jt = "toast.v
|
|
|
812
812
|
return document.addEventListener("keydown", w), () => document.removeEventListener("keydown", w);
|
|
813
813
|
}, [r]), l.useEffect(() => {
|
|
814
814
|
const w = u.current, O = f.current;
|
|
815
|
-
if (
|
|
815
|
+
if (D && w && O) {
|
|
816
816
|
const g = () => {
|
|
817
817
|
if (!i.isClosePausedRef.current) {
|
|
818
818
|
const m = new CustomEvent(Zt);
|
|
@@ -825,19 +825,19 @@ var Sr = "ToastViewport", ai = ["F8"], Zt = "toast.viewportPause", Jt = "toast.v
|
|
|
825
825
|
}
|
|
826
826
|
}, C = (m) => {
|
|
827
827
|
!w.contains(m.relatedTarget) && b();
|
|
828
|
-
},
|
|
828
|
+
}, N = () => {
|
|
829
829
|
w.contains(document.activeElement) || b();
|
|
830
830
|
};
|
|
831
|
-
return w.addEventListener("focusin", g), w.addEventListener("focusout", C), w.addEventListener("pointermove", g), w.addEventListener("pointerleave",
|
|
832
|
-
w.removeEventListener("focusin", g), w.removeEventListener("focusout", C), w.removeEventListener("pointermove", g), w.removeEventListener("pointerleave",
|
|
831
|
+
return w.addEventListener("focusin", g), w.addEventListener("focusout", C), w.addEventListener("pointermove", g), w.addEventListener("pointerleave", N), window.addEventListener("blur", g), window.addEventListener("focus", b), () => {
|
|
832
|
+
w.removeEventListener("focusin", g), w.removeEventListener("focusout", C), w.removeEventListener("pointermove", g), w.removeEventListener("pointerleave", N), window.removeEventListener("blur", g), window.removeEventListener("focus", b);
|
|
833
833
|
};
|
|
834
834
|
}
|
|
835
|
-
}, [
|
|
835
|
+
}, [D, i.isClosePausedRef]);
|
|
836
836
|
const h = l.useCallback(
|
|
837
837
|
({ tabbingDirection: w }) => {
|
|
838
838
|
const g = s().map((b) => {
|
|
839
|
-
const C = b.ref.current,
|
|
840
|
-
return w === "forwards" ?
|
|
839
|
+
const C = b.ref.current, N = [C, ...yi(C)];
|
|
840
|
+
return w === "forwards" ? N : N.reverse();
|
|
841
841
|
});
|
|
842
842
|
return (w === "forwards" ? g.reverse() : g).flat();
|
|
843
843
|
},
|
|
@@ -847,12 +847,12 @@ var Sr = "ToastViewport", ai = ["F8"], Zt = "toast.viewportPause", Jt = "toast.v
|
|
|
847
847
|
const w = f.current;
|
|
848
848
|
if (w) {
|
|
849
849
|
const O = (g) => {
|
|
850
|
-
var
|
|
850
|
+
var N, m, E;
|
|
851
851
|
const b = g.altKey || g.ctrlKey || g.metaKey;
|
|
852
852
|
if (g.key === "Tab" && !b) {
|
|
853
853
|
const S = document.activeElement, x = g.shiftKey;
|
|
854
854
|
if (g.target === w && x) {
|
|
855
|
-
(
|
|
855
|
+
(N = c.current) == null || N.focus();
|
|
856
856
|
return;
|
|
857
857
|
}
|
|
858
858
|
const z = h({ tabbingDirection: x ? "backwards" : "forwards" }), U = z.findIndex((T) => T === S);
|
|
@@ -868,9 +868,9 @@ var Sr = "ToastViewport", ai = ["F8"], Zt = "toast.viewportPause", Jt = "toast.v
|
|
|
868
868
|
role: "region",
|
|
869
869
|
"aria-label": o.replace("{hotkey}", v),
|
|
870
870
|
tabIndex: -1,
|
|
871
|
-
style: { pointerEvents:
|
|
871
|
+
style: { pointerEvents: D ? void 0 : "none" },
|
|
872
872
|
children: [
|
|
873
|
-
|
|
873
|
+
D && /* @__PURE__ */ y(
|
|
874
874
|
en,
|
|
875
875
|
{
|
|
876
876
|
ref: c,
|
|
@@ -883,7 +883,7 @@ var Sr = "ToastViewport", ai = ["F8"], Zt = "toast.viewportPause", Jt = "toast.v
|
|
|
883
883
|
}
|
|
884
884
|
),
|
|
885
885
|
/* @__PURE__ */ y(fn.Slot, { scope: n, children: /* @__PURE__ */ y(ve.ol, { tabIndex: -1, ...a, ref: p }) }),
|
|
886
|
-
|
|
886
|
+
D && /* @__PURE__ */ y(
|
|
887
887
|
en,
|
|
888
888
|
{
|
|
889
889
|
ref: d,
|
|
@@ -921,7 +921,7 @@ var kr = "ToastFocusProxy", en = l.forwardRef(
|
|
|
921
921
|
}
|
|
922
922
|
);
|
|
923
923
|
en.displayName = kr;
|
|
924
|
-
var Ze = "Toast",
|
|
924
|
+
var Ze = "Toast", ai = "toast.swipeStart", si = "toast.swipeMove", ii = "toast.swipeCancel", ci = "toast.swipeEnd", xr = l.forwardRef(
|
|
925
925
|
(e, t) => {
|
|
926
926
|
const { forceMount: n, open: r, defaultOpen: o, onOpenChange: a, ...i } = e, [s, u] = wt({
|
|
927
927
|
prop: r,
|
|
@@ -929,8 +929,8 @@ var Ze = "Toast", si = "toast.swipeStart", ii = "toast.swipeMove", ci = "toast.s
|
|
|
929
929
|
onChange: a,
|
|
930
930
|
caller: Ze
|
|
931
931
|
});
|
|
932
|
-
return /* @__PURE__ */ y(
|
|
933
|
-
|
|
932
|
+
return /* @__PURE__ */ y(Nr, { present: n || s, children: /* @__PURE__ */ y(
|
|
933
|
+
di,
|
|
934
934
|
{
|
|
935
935
|
open: s,
|
|
936
936
|
...i,
|
|
@@ -957,10 +957,10 @@ var Ze = "Toast", si = "toast.swipeStart", ii = "toast.swipeMove", ci = "toast.s
|
|
|
957
957
|
}
|
|
958
958
|
);
|
|
959
959
|
xr.displayName = Ze;
|
|
960
|
-
var [
|
|
960
|
+
var [ui, li] = Mr(Ze, {
|
|
961
961
|
onClose() {
|
|
962
962
|
}
|
|
963
|
-
}),
|
|
963
|
+
}), di = l.forwardRef(
|
|
964
964
|
(e, t) => {
|
|
965
965
|
const {
|
|
966
966
|
__scopeToast: n,
|
|
@@ -975,8 +975,8 @@ var [li, di] = Mr(Ze, {
|
|
|
975
975
|
onSwipeMove: f,
|
|
976
976
|
onSwipeCancel: p,
|
|
977
977
|
onSwipeEnd: v,
|
|
978
|
-
...
|
|
979
|
-
} = e, h = Ct(Ze, n), [w, O] = l.useState(null), g = H(t, (T) => O(T)), b = l.useRef(null), C = l.useRef(null),
|
|
978
|
+
...D
|
|
979
|
+
} = e, h = Ct(Ze, n), [w, O] = l.useState(null), g = H(t, (T) => O(T)), b = l.useRef(null), C = l.useRef(null), N = o || h.duration, m = l.useRef(0), E = l.useRef(N), S = l.useRef(0), { onToastAdd: x, onToastRemove: k } = h, $ = te(() => {
|
|
980
980
|
var j;
|
|
981
981
|
(w == null ? void 0 : w.contains(document.activeElement)) && ((j = h.viewport) == null || j.focus()), i();
|
|
982
982
|
}), z = l.useCallback(
|
|
@@ -998,13 +998,13 @@ var [li, di] = Mr(Ze, {
|
|
|
998
998
|
T.removeEventListener(Zt, X), T.removeEventListener(Jt, j);
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
|
-
}, [h.viewport,
|
|
1002
|
-
a && !h.isClosePausedRef.current && z(
|
|
1003
|
-
}, [a,
|
|
1001
|
+
}, [h.viewport, N, u, c, z]), l.useEffect(() => {
|
|
1002
|
+
a && !h.isClosePausedRef.current && z(N);
|
|
1003
|
+
}, [a, N, h.isClosePausedRef, z]), l.useEffect(() => (x(), () => k()), [x, k]);
|
|
1004
1004
|
const U = l.useMemo(() => w ? $r(w) : null, [w]);
|
|
1005
|
-
return h.viewport ? /* @__PURE__ */ Oe(
|
|
1005
|
+
return h.viewport ? /* @__PURE__ */ Oe(Ke, { children: [
|
|
1006
1006
|
U && /* @__PURE__ */ y(
|
|
1007
|
-
|
|
1007
|
+
fi,
|
|
1008
1008
|
{
|
|
1009
1009
|
__scopeToast: n,
|
|
1010
1010
|
role: "status",
|
|
@@ -1012,9 +1012,9 @@ var [li, di] = Mr(Ze, {
|
|
|
1012
1012
|
children: U
|
|
1013
1013
|
}
|
|
1014
1014
|
),
|
|
1015
|
-
/* @__PURE__ */ y(
|
|
1015
|
+
/* @__PURE__ */ y(ui, { scope: n, onClose: $, children: Et.createPortal(
|
|
1016
1016
|
/* @__PURE__ */ y(fn.ItemSlot, { scope: n, children: /* @__PURE__ */ y(
|
|
1017
|
-
|
|
1017
|
+
zs,
|
|
1018
1018
|
{
|
|
1019
1019
|
asChild: !0,
|
|
1020
1020
|
onEscapeKeyDown: F(s, () => {
|
|
@@ -1026,7 +1026,7 @@ var [li, di] = Mr(Ze, {
|
|
|
1026
1026
|
tabIndex: 0,
|
|
1027
1027
|
"data-state": a ? "open" : "closed",
|
|
1028
1028
|
"data-swipe-direction": h.swipeDirection,
|
|
1029
|
-
...
|
|
1029
|
+
...D,
|
|
1030
1030
|
ref: g,
|
|
1031
1031
|
style: { userSelect: "none", touchAction: "none", ...e.style },
|
|
1032
1032
|
onKeyDown: F(e.onKeyDown, (T) => {
|
|
@@ -1037,10 +1037,10 @@ var [li, di] = Mr(Ze, {
|
|
|
1037
1037
|
}),
|
|
1038
1038
|
onPointerMove: F(e.onPointerMove, (T) => {
|
|
1039
1039
|
if (!b.current) return;
|
|
1040
|
-
const j = T.clientX - b.current.x, X = T.clientY - b.current.y, ne = !!C.current, Q = ["left", "right"].includes(h.swipeDirection),
|
|
1041
|
-
ne ? (C.current = se, lt(
|
|
1040
|
+
const j = T.clientX - b.current.x, X = T.clientY - b.current.y, ne = !!C.current, Q = ["left", "right"].includes(h.swipeDirection), K = ["left", "up"].includes(h.swipeDirection) ? Math.min : Math.max, ee = Q ? K(0, j) : 0, Z = Q ? 0 : K(0, X), ge = T.pointerType === "touch" ? 10 : 2, se = { x: ee, y: Z }, fe = { originalEvent: T, delta: se };
|
|
1041
|
+
ne ? (C.current = se, lt(si, f, fe, {
|
|
1042
1042
|
discrete: !1
|
|
1043
|
-
})) : An(se, h.swipeDirection, ge) ? (C.current = se, lt(
|
|
1043
|
+
})) : An(se, h.swipeDirection, ge) ? (C.current = se, lt(ai, d, fe, {
|
|
1044
1044
|
discrete: !1
|
|
1045
1045
|
}), T.target.setPointerCapture(T.pointerId)) : (Math.abs(j) > ge || Math.abs(X) > ge) && (b.current = null);
|
|
1046
1046
|
}),
|
|
@@ -1048,16 +1048,16 @@ var [li, di] = Mr(Ze, {
|
|
|
1048
1048
|
const j = C.current, X = T.target;
|
|
1049
1049
|
if (X.hasPointerCapture(T.pointerId) && X.releasePointerCapture(T.pointerId), C.current = null, b.current = null, j) {
|
|
1050
1050
|
const ne = T.currentTarget, Q = { originalEvent: T, delta: j };
|
|
1051
|
-
An(j, h.swipeDirection, h.swipeThreshold) ? lt(
|
|
1051
|
+
An(j, h.swipeDirection, h.swipeThreshold) ? lt(ci, v, Q, {
|
|
1052
1052
|
discrete: !0
|
|
1053
1053
|
}) : lt(
|
|
1054
|
-
|
|
1054
|
+
ii,
|
|
1055
1055
|
p,
|
|
1056
1056
|
Q,
|
|
1057
1057
|
{
|
|
1058
1058
|
discrete: !0
|
|
1059
1059
|
}
|
|
1060
|
-
), ne.addEventListener("click", (
|
|
1060
|
+
), ne.addEventListener("click", (K) => K.preventDefault(), {
|
|
1061
1061
|
once: !0
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
@@ -1070,30 +1070,30 @@ var [li, di] = Mr(Ze, {
|
|
|
1070
1070
|
) })
|
|
1071
1071
|
] }) : null;
|
|
1072
1072
|
}
|
|
1073
|
-
),
|
|
1073
|
+
), fi = (e) => {
|
|
1074
1074
|
const { __scopeToast: t, children: n, ...r } = e, o = Ct(Ze, t), [a, i] = l.useState(!1), [s, u] = l.useState(!1);
|
|
1075
|
-
return
|
|
1075
|
+
return pi(() => i(!0)), l.useEffect(() => {
|
|
1076
1076
|
const c = window.setTimeout(() => u(!0), 1e3);
|
|
1077
1077
|
return () => window.clearTimeout(c);
|
|
1078
|
-
}, []), s ? null : /* @__PURE__ */ y(
|
|
1078
|
+
}, []), s ? null : /* @__PURE__ */ y(Dr, { asChild: !0, children: /* @__PURE__ */ y(ln, { ...r, children: a && /* @__PURE__ */ Oe(Ke, { children: [
|
|
1079
1079
|
o.label,
|
|
1080
1080
|
" ",
|
|
1081
1081
|
n
|
|
1082
1082
|
] }) }) });
|
|
1083
|
-
},
|
|
1083
|
+
}, mi = "ToastTitle", Rr = l.forwardRef(
|
|
1084
1084
|
(e, t) => {
|
|
1085
1085
|
const { __scopeToast: n, ...r } = e;
|
|
1086
1086
|
return /* @__PURE__ */ y(ve.div, { ...r, ref: t });
|
|
1087
1087
|
}
|
|
1088
1088
|
);
|
|
1089
|
-
Rr.displayName =
|
|
1090
|
-
var
|
|
1089
|
+
Rr.displayName = mi;
|
|
1090
|
+
var hi = "ToastDescription", Ar = l.forwardRef(
|
|
1091
1091
|
(e, t) => {
|
|
1092
1092
|
const { __scopeToast: n, ...r } = e;
|
|
1093
1093
|
return /* @__PURE__ */ y(ve.div, { ...r, ref: t });
|
|
1094
1094
|
}
|
|
1095
1095
|
);
|
|
1096
|
-
Ar.displayName =
|
|
1096
|
+
Ar.displayName = hi;
|
|
1097
1097
|
var _r = "ToastAction", Wr = l.forwardRef(
|
|
1098
1098
|
(e, t) => {
|
|
1099
1099
|
const { altText: n, ...r } = e;
|
|
@@ -1105,7 +1105,7 @@ var _r = "ToastAction", Wr = l.forwardRef(
|
|
|
1105
1105
|
Wr.displayName = _r;
|
|
1106
1106
|
var Ir = "ToastClose", mn = l.forwardRef(
|
|
1107
1107
|
(e, t) => {
|
|
1108
|
-
const { __scopeToast: n, ...r } = e, o =
|
|
1108
|
+
const { __scopeToast: n, ...r } = e, o = li(Ir, n);
|
|
1109
1109
|
return /* @__PURE__ */ y(Fr, { asChild: !0, children: /* @__PURE__ */ y(
|
|
1110
1110
|
ve.button,
|
|
1111
1111
|
{
|
|
@@ -1133,7 +1133,7 @@ var Fr = l.forwardRef((e, t) => {
|
|
|
1133
1133
|
function $r(e) {
|
|
1134
1134
|
const t = [];
|
|
1135
1135
|
return Array.from(e.childNodes).forEach((r) => {
|
|
1136
|
-
if (r.nodeType === r.TEXT_NODE && r.textContent && t.push(r.textContent),
|
|
1136
|
+
if (r.nodeType === r.TEXT_NODE && r.textContent && t.push(r.textContent), vi(r)) {
|
|
1137
1137
|
const o = r.ariaHidden || r.hidden || r.style.display === "none", a = r.dataset.radixToastAnnounceExclude === "";
|
|
1138
1138
|
if (!o)
|
|
1139
1139
|
if (a) {
|
|
@@ -1152,7 +1152,7 @@ var An = (e, t, n = 0) => {
|
|
|
1152
1152
|
const r = Math.abs(e.x), o = Math.abs(e.y), a = r > o;
|
|
1153
1153
|
return t === "left" || t === "right" ? a && r > n : !a && o > n;
|
|
1154
1154
|
};
|
|
1155
|
-
function
|
|
1155
|
+
function pi(e = () => {
|
|
1156
1156
|
}) {
|
|
1157
1157
|
const t = te(e);
|
|
1158
1158
|
re(() => {
|
|
@@ -1162,10 +1162,10 @@ function vi(e = () => {
|
|
|
1162
1162
|
};
|
|
1163
1163
|
}, [t]);
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function vi(e) {
|
|
1166
1166
|
return e.nodeType === e.ELEMENT_NODE;
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function yi(e) {
|
|
1169
1169
|
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
1170
1170
|
acceptNode: (r) => {
|
|
1171
1171
|
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
@@ -1179,8 +1179,8 @@ function $t(e) {
|
|
|
1179
1179
|
const t = document.activeElement;
|
|
1180
1180
|
return e.some((n) => n === t ? !0 : (n.focus(), document.activeElement !== t));
|
|
1181
1181
|
}
|
|
1182
|
-
var
|
|
1183
|
-
const bf =
|
|
1182
|
+
var gi = Pr, Yr = Tr, Br = xr, Lr = Rr, Hr = Ar, Ur = Wr, Vr = mn;
|
|
1183
|
+
const bf = gi, bi = l.forwardRef(
|
|
1184
1184
|
({ className: e, ...t }, n) => /* @__PURE__ */ y(
|
|
1185
1185
|
Yr,
|
|
1186
1186
|
{
|
|
@@ -1193,8 +1193,8 @@ const bf = bi, wi = l.forwardRef(
|
|
|
1193
1193
|
}
|
|
1194
1194
|
)
|
|
1195
1195
|
);
|
|
1196
|
-
|
|
1197
|
-
const
|
|
1196
|
+
bi.displayName = Yr.displayName;
|
|
1197
|
+
const wi = gt(
|
|
1198
1198
|
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
1199
1199
|
{
|
|
1200
1200
|
variants: {
|
|
@@ -1207,9 +1207,9 @@ const Ei = gt(
|
|
|
1207
1207
|
variant: "default"
|
|
1208
1208
|
}
|
|
1209
1209
|
}
|
|
1210
|
-
),
|
|
1211
|
-
|
|
1212
|
-
const
|
|
1210
|
+
), Ei = l.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ y(Br, { ref: r, className: L(wi({ variant: t }), e), ...n }));
|
|
1211
|
+
Ei.displayName = Br.displayName;
|
|
1212
|
+
const Oi = l.forwardRef(
|
|
1213
1213
|
({ className: e, ...t }, n) => /* @__PURE__ */ y(
|
|
1214
1214
|
Ur,
|
|
1215
1215
|
{
|
|
@@ -1222,8 +1222,8 @@ const Ci = l.forwardRef(
|
|
|
1222
1222
|
}
|
|
1223
1223
|
)
|
|
1224
1224
|
);
|
|
1225
|
-
|
|
1226
|
-
const
|
|
1225
|
+
Oi.displayName = Ur.displayName;
|
|
1226
|
+
const Ci = l.forwardRef(
|
|
1227
1227
|
({ className: e, ...t }, n) => /* @__PURE__ */ y(
|
|
1228
1228
|
Vr,
|
|
1229
1229
|
{
|
|
@@ -1238,14 +1238,14 @@ const Ni = l.forwardRef(
|
|
|
1238
1238
|
}
|
|
1239
1239
|
)
|
|
1240
1240
|
);
|
|
1241
|
-
|
|
1241
|
+
Ci.displayName = Vr.displayName;
|
|
1242
1242
|
const Di = l.forwardRef(
|
|
1243
1243
|
({ className: e, ...t }, n) => /* @__PURE__ */ y(Lr, { ref: n, className: L("text-sm font-semibold", e), ...t })
|
|
1244
1244
|
);
|
|
1245
1245
|
Di.displayName = Lr.displayName;
|
|
1246
|
-
const
|
|
1247
|
-
|
|
1248
|
-
var
|
|
1246
|
+
const Ni = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(Hr, { ref: n, className: L("text-sm opacity-90", e), ...t }));
|
|
1247
|
+
Ni.displayName = Hr.displayName;
|
|
1248
|
+
var Mi = [
|
|
1249
1249
|
"a",
|
|
1250
1250
|
"button",
|
|
1251
1251
|
"div",
|
|
@@ -1263,14 +1263,14 @@ var Pi = [
|
|
|
1263
1263
|
"span",
|
|
1264
1264
|
"svg",
|
|
1265
1265
|
"ul"
|
|
1266
|
-
],
|
|
1267
|
-
const n =
|
|
1266
|
+
], Pi = Mi.reduce((e, t) => {
|
|
1267
|
+
const n = Xa(`Primitive.${t}`), r = l.forwardRef((o, a) => {
|
|
1268
1268
|
const { asChild: i, ...s } = o, u = i ? n : t;
|
|
1269
1269
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ y(u, { ...s, ref: a });
|
|
1270
1270
|
});
|
|
1271
1271
|
return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
|
|
1272
|
-
}, {}),
|
|
1273
|
-
|
|
1272
|
+
}, {}), Si = "Label", jr = l.forwardRef((e, t) => /* @__PURE__ */ y(
|
|
1273
|
+
Pi.label,
|
|
1274
1274
|
{
|
|
1275
1275
|
...e,
|
|
1276
1276
|
ref: t,
|
|
@@ -1280,12 +1280,12 @@ var Pi = [
|
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
1282
|
));
|
|
1283
|
-
jr.displayName =
|
|
1284
|
-
var
|
|
1285
|
-
const ki = gt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), xi = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
|
|
1286
|
-
xi.displayName =
|
|
1283
|
+
jr.displayName = Si;
|
|
1284
|
+
var Ti = jr;
|
|
1285
|
+
const ki = gt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"), xi = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(Ti, { ref: n, className: L(ki(), e), ...t }));
|
|
1286
|
+
xi.displayName = "Label";
|
|
1287
1287
|
// @__NO_SIDE_EFFECTS__
|
|
1288
|
-
function
|
|
1288
|
+
function qr(e) {
|
|
1289
1289
|
const t = /* @__PURE__ */ Ri(e), n = l.forwardRef((r, o) => {
|
|
1290
1290
|
const { children: a, ...i } = r, s = l.Children.toArray(a), u = s.find(_i);
|
|
1291
1291
|
if (u) {
|
|
@@ -1347,7 +1347,7 @@ var Fi = [
|
|
|
1347
1347
|
"svg",
|
|
1348
1348
|
"ul"
|
|
1349
1349
|
], Ce = Fi.reduce((e, t) => {
|
|
1350
|
-
const n = /* @__PURE__ */
|
|
1350
|
+
const n = /* @__PURE__ */ qr(`Primitive.${t}`), r = l.forwardRef((o, a) => {
|
|
1351
1351
|
const { asChild: i, ...s } = o, u = i ? n : t;
|
|
1352
1352
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ y(u, { ...s, ref: a });
|
|
1353
1353
|
});
|
|
@@ -1356,7 +1356,7 @@ var Fi = [
|
|
|
1356
1356
|
function $i(e, t) {
|
|
1357
1357
|
e && Et.flushSync(() => e.dispatchEvent(t));
|
|
1358
1358
|
}
|
|
1359
|
-
var Yi = "DismissableLayer", tn = "dismissableLayer.update", Bi = "dismissableLayer.pointerDownOutside", Li = "dismissableLayer.focusOutside", _n,
|
|
1359
|
+
var Yi = "DismissableLayer", tn = "dismissableLayer.update", Bi = "dismissableLayer.pointerDownOutside", Li = "dismissableLayer.focusOutside", _n, zr = l.createContext({
|
|
1360
1360
|
layers: /* @__PURE__ */ new Set(),
|
|
1361
1361
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
1362
1362
|
branches: /* @__PURE__ */ new Set()
|
|
@@ -1370,7 +1370,7 @@ var Yi = "DismissableLayer", tn = "dismissableLayer.update", Bi = "dismissableLa
|
|
|
1370
1370
|
onInteractOutside: i,
|
|
1371
1371
|
onDismiss: s,
|
|
1372
1372
|
...u
|
|
1373
|
-
} = e, c = l.useContext(
|
|
1373
|
+
} = e, c = l.useContext(zr), [d, f] = l.useState(null), p = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = l.useState({}), D = H(t, (E) => f(E)), h = Array.from(c.layers), [w] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), O = h.indexOf(w), g = d ? h.indexOf(d) : -1, b = c.layersWithOutsidePointerEventsDisabled.size > 0, C = g >= O, N = Vi((E) => {
|
|
1374
1374
|
const S = E.target, x = [...c.branches].some((k) => k.contains(S));
|
|
1375
1375
|
!C || x || (o == null || o(E), i == null || i(E), E.defaultPrevented || s == null || s());
|
|
1376
1376
|
}, p), m = ji((E) => {
|
|
@@ -1393,7 +1393,7 @@ var Yi = "DismissableLayer", tn = "dismissableLayer.update", Bi = "dismissableLa
|
|
|
1393
1393
|
Ce.div,
|
|
1394
1394
|
{
|
|
1395
1395
|
...u,
|
|
1396
|
-
ref:
|
|
1396
|
+
ref: D,
|
|
1397
1397
|
style: {
|
|
1398
1398
|
pointerEvents: b ? C ? "auto" : "none" : void 0,
|
|
1399
1399
|
...e.style
|
|
@@ -1402,7 +1402,7 @@ var Yi = "DismissableLayer", tn = "dismissableLayer.update", Bi = "dismissableLa
|
|
|
1402
1402
|
onBlurCapture: F(e.onBlurCapture, m.onBlurCapture),
|
|
1403
1403
|
onPointerDownCapture: F(
|
|
1404
1404
|
e.onPointerDownCapture,
|
|
1405
|
-
|
|
1405
|
+
N.onPointerDownCapture
|
|
1406
1406
|
)
|
|
1407
1407
|
}
|
|
1408
1408
|
);
|
|
@@ -1410,7 +1410,7 @@ var Yi = "DismissableLayer", tn = "dismissableLayer.update", Bi = "dismissableLa
|
|
|
1410
1410
|
);
|
|
1411
1411
|
Gr.displayName = Yi;
|
|
1412
1412
|
var Hi = "DismissableLayerBranch", Ui = l.forwardRef((e, t) => {
|
|
1413
|
-
const n = l.useContext(
|
|
1413
|
+
const n = l.useContext(zr), r = l.useRef(null), o = H(t, r);
|
|
1414
1414
|
return l.useEffect(() => {
|
|
1415
1415
|
const a = r.current;
|
|
1416
1416
|
if (a)
|
|
@@ -1427,7 +1427,7 @@ function Vi(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
1427
1427
|
const a = (s) => {
|
|
1428
1428
|
if (s.target && !r.current) {
|
|
1429
1429
|
let u = function() {
|
|
1430
|
-
|
|
1430
|
+
Kr(
|
|
1431
1431
|
Bi,
|
|
1432
1432
|
n,
|
|
1433
1433
|
c,
|
|
@@ -1454,7 +1454,7 @@ function ji(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
1454
1454
|
const n = te(e), r = l.useRef(!1);
|
|
1455
1455
|
return l.useEffect(() => {
|
|
1456
1456
|
const o = (a) => {
|
|
1457
|
-
a.target && !r.current &&
|
|
1457
|
+
a.target && !r.current && Kr(Li, n, { originalEvent: a }, {
|
|
1458
1458
|
discrete: !1
|
|
1459
1459
|
});
|
|
1460
1460
|
};
|
|
@@ -1468,11 +1468,11 @@ function Wn() {
|
|
|
1468
1468
|
const e = new CustomEvent(tn);
|
|
1469
1469
|
document.dispatchEvent(e);
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1471
|
+
function Kr(e, t, n, { discrete: r }) {
|
|
1472
1472
|
const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
1473
1473
|
t && o.addEventListener(e, t, { once: !0 }), r ? $i(o, a) : o.dispatchEvent(a);
|
|
1474
1474
|
}
|
|
1475
|
-
var Yt = "focusScope.autoFocusOnMount", Bt = "focusScope.autoFocusOnUnmount", In = { bubbles: !1, cancelable: !0 }, qi = "FocusScope",
|
|
1475
|
+
var Yt = "focusScope.autoFocusOnMount", Bt = "focusScope.autoFocusOnUnmount", In = { bubbles: !1, cancelable: !0 }, qi = "FocusScope", Xr = l.forwardRef((e, t) => {
|
|
1476
1476
|
const {
|
|
1477
1477
|
loop: n = !1,
|
|
1478
1478
|
trapped: r = !1,
|
|
@@ -1500,8 +1500,8 @@ var Yt = "focusScope.autoFocusOnMount", Bt = "focusScope.autoFocusOnUnmount", In
|
|
|
1500
1500
|
C !== null && (s.contains(C) || Me(f.current, { select: !0 }));
|
|
1501
1501
|
}, O = function(b) {
|
|
1502
1502
|
if (document.activeElement === document.body)
|
|
1503
|
-
for (const
|
|
1504
|
-
|
|
1503
|
+
for (const N of b)
|
|
1504
|
+
N.removedNodes.length > 0 && Me(s);
|
|
1505
1505
|
};
|
|
1506
1506
|
document.addEventListener("focusin", h), document.addEventListener("focusout", w);
|
|
1507
1507
|
const g = new MutationObserver(O);
|
|
@@ -1515,7 +1515,7 @@ var Yt = "focusScope.autoFocusOnMount", Bt = "focusScope.autoFocusOnUnmount", In
|
|
|
1515
1515
|
const h = document.activeElement;
|
|
1516
1516
|
if (!s.contains(h)) {
|
|
1517
1517
|
const O = new CustomEvent(Yt, In);
|
|
1518
|
-
s.addEventListener(Yt, c), s.dispatchEvent(O), O.defaultPrevented || (zi(Zi(
|
|
1518
|
+
s.addEventListener(Yt, c), s.dispatchEvent(O), O.defaultPrevented || (zi(Zi(Qr(s)), { select: !0 }), document.activeElement === h && Me(s));
|
|
1519
1519
|
}
|
|
1520
1520
|
return () => {
|
|
1521
1521
|
s.removeEventListener(Yt, c), setTimeout(() => {
|
|
@@ -1525,30 +1525,30 @@ var Yt = "focusScope.autoFocusOnMount", Bt = "focusScope.autoFocusOnUnmount", In
|
|
|
1525
1525
|
};
|
|
1526
1526
|
}
|
|
1527
1527
|
}, [s, c, d, v]);
|
|
1528
|
-
const
|
|
1528
|
+
const D = l.useCallback(
|
|
1529
1529
|
(h) => {
|
|
1530
1530
|
if (!n && !r || v.paused) return;
|
|
1531
1531
|
const w = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, O = document.activeElement;
|
|
1532
1532
|
if (w && O) {
|
|
1533
|
-
const g = h.currentTarget, [b, C] =
|
|
1533
|
+
const g = h.currentTarget, [b, C] = Gi(g);
|
|
1534
1534
|
b && C ? !h.shiftKey && O === C ? (h.preventDefault(), n && Me(b, { select: !0 })) : h.shiftKey && O === b && (h.preventDefault(), n && Me(C, { select: !0 })) : O === g && h.preventDefault();
|
|
1535
1535
|
}
|
|
1536
1536
|
},
|
|
1537
1537
|
[n, r, v.paused]
|
|
1538
1538
|
);
|
|
1539
|
-
return /* @__PURE__ */ y(Ce.div, { tabIndex: -1, ...i, ref: p, onKeyDown:
|
|
1539
|
+
return /* @__PURE__ */ y(Ce.div, { tabIndex: -1, ...i, ref: p, onKeyDown: D });
|
|
1540
1540
|
});
|
|
1541
|
-
|
|
1541
|
+
Xr.displayName = qi;
|
|
1542
1542
|
function zi(e, { select: t = !1 } = {}) {
|
|
1543
1543
|
const n = document.activeElement;
|
|
1544
1544
|
for (const r of e)
|
|
1545
1545
|
if (Me(r, { select: t }), document.activeElement !== n) return;
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1548
|
-
const t =
|
|
1547
|
+
function Gi(e) {
|
|
1548
|
+
const t = Qr(e), n = Fn(t, e), r = Fn(t.reverse(), e);
|
|
1549
1549
|
return [n, r];
|
|
1550
1550
|
}
|
|
1551
|
-
function
|
|
1551
|
+
function Qr(e) {
|
|
1552
1552
|
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
1553
1553
|
acceptNode: (r) => {
|
|
1554
1554
|
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
@@ -1560,9 +1560,9 @@ function Zr(e) {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
function Fn(e, t) {
|
|
1562
1562
|
for (const n of e)
|
|
1563
|
-
if (!
|
|
1563
|
+
if (!Ki(n, { upTo: t })) return n;
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1565
|
+
function Ki(e, { upTo: t }) {
|
|
1566
1566
|
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
1567
1567
|
for (; e; ) {
|
|
1568
1568
|
if (t !== void 0 && e === t) return !1;
|
|
@@ -1601,22 +1601,22 @@ function Yn(e, t) {
|
|
|
1601
1601
|
function Zi(e) {
|
|
1602
1602
|
return e.filter((t) => t.tagName !== "A");
|
|
1603
1603
|
}
|
|
1604
|
-
var Ji = "Portal",
|
|
1604
|
+
var Ji = "Portal", Zr = l.forwardRef((e, t) => {
|
|
1605
1605
|
var s;
|
|
1606
1606
|
const { container: n, ...r } = e, [o, a] = l.useState(!1);
|
|
1607
1607
|
re(() => a(!0), []);
|
|
1608
1608
|
const i = n || o && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
|
|
1609
1609
|
return i ? on.createPortal(/* @__PURE__ */ y(Ce.div, { ...r, ref: t }), i) : null;
|
|
1610
1610
|
});
|
|
1611
|
-
|
|
1611
|
+
Zr.displayName = Ji;
|
|
1612
1612
|
function ec(e, t) {
|
|
1613
1613
|
return l.useReducer((n, r) => t[n][r] ?? n, e);
|
|
1614
1614
|
}
|
|
1615
|
-
var
|
|
1615
|
+
var Dt = (e) => {
|
|
1616
1616
|
const { present: t, children: n } = e, r = tc(t), o = typeof n == "function" ? n({ present: r.isPresent }) : l.Children.only(n), a = H(r.ref, nc(o));
|
|
1617
1617
|
return typeof n == "function" || r.isPresent ? l.cloneElement(o, { ref: a }) : null;
|
|
1618
1618
|
};
|
|
1619
|
-
|
|
1619
|
+
Dt.displayName = "Presence";
|
|
1620
1620
|
function tc(e) {
|
|
1621
1621
|
const [t, n] = l.useState(), r = l.useRef(null), o = l.useRef(e), a = l.useRef("none"), i = e ? "mounted" : "unmounted", [s, u] = ec(i, {
|
|
1622
1622
|
mounted: {
|
|
@@ -1674,7 +1674,7 @@ function nc(e) {
|
|
|
1674
1674
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
1675
1675
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
1676
1676
|
}
|
|
1677
|
-
var
|
|
1677
|
+
var Nt = "Dialog", [Jr] = He(Nt), [rc, de] = Jr(Nt), eo = (e) => {
|
|
1678
1678
|
const {
|
|
1679
1679
|
__scopeDialog: t,
|
|
1680
1680
|
children: n,
|
|
@@ -1686,7 +1686,7 @@ var Dt = "Dialog", [eo] = He(Dt), [rc, de] = eo(Dt), to = (e) => {
|
|
|
1686
1686
|
prop: r,
|
|
1687
1687
|
defaultProp: o ?? !1,
|
|
1688
1688
|
onChange: a,
|
|
1689
|
-
caller:
|
|
1689
|
+
caller: Nt
|
|
1690
1690
|
});
|
|
1691
1691
|
return /* @__PURE__ */ y(
|
|
1692
1692
|
rc,
|
|
@@ -1705,10 +1705,10 @@ var Dt = "Dialog", [eo] = He(Dt), [rc, de] = eo(Dt), to = (e) => {
|
|
|
1705
1705
|
}
|
|
1706
1706
|
);
|
|
1707
1707
|
};
|
|
1708
|
-
|
|
1709
|
-
var
|
|
1708
|
+
eo.displayName = Nt;
|
|
1709
|
+
var to = "DialogTrigger", no = l.forwardRef(
|
|
1710
1710
|
(e, t) => {
|
|
1711
|
-
const { __scopeDialog: n, ...r } = e, o = de(
|
|
1711
|
+
const { __scopeDialog: n, ...r } = e, o = de(to, n), a = H(t, o.triggerRef);
|
|
1712
1712
|
return /* @__PURE__ */ y(
|
|
1713
1713
|
Ce.button,
|
|
1714
1714
|
{
|
|
@@ -1724,22 +1724,22 @@ var no = "DialogTrigger", ro = l.forwardRef(
|
|
|
1724
1724
|
);
|
|
1725
1725
|
}
|
|
1726
1726
|
);
|
|
1727
|
-
|
|
1728
|
-
var hn = "DialogPortal", [oc,
|
|
1727
|
+
no.displayName = to;
|
|
1728
|
+
var hn = "DialogPortal", [oc, ro] = Jr(hn, {
|
|
1729
1729
|
forceMount: void 0
|
|
1730
|
-
}),
|
|
1730
|
+
}), oo = (e) => {
|
|
1731
1731
|
const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = de(hn, t);
|
|
1732
|
-
return /* @__PURE__ */ y(oc, { scope: t, forceMount: n, children: l.Children.map(r, (i) => /* @__PURE__ */ y(
|
|
1732
|
+
return /* @__PURE__ */ y(oc, { scope: t, forceMount: n, children: l.Children.map(r, (i) => /* @__PURE__ */ y(Dt, { present: n || a.open, children: /* @__PURE__ */ y(Zr, { asChild: !0, container: o, children: i }) })) });
|
|
1733
1733
|
};
|
|
1734
|
-
|
|
1735
|
-
var vt = "DialogOverlay",
|
|
1734
|
+
oo.displayName = hn;
|
|
1735
|
+
var vt = "DialogOverlay", ao = l.forwardRef(
|
|
1736
1736
|
(e, t) => {
|
|
1737
|
-
const n =
|
|
1738
|
-
return a.modal ? /* @__PURE__ */ y(
|
|
1737
|
+
const n = ro(vt, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = de(vt, e.__scopeDialog);
|
|
1738
|
+
return a.modal ? /* @__PURE__ */ y(Dt, { present: r || a.open, children: /* @__PURE__ */ y(sc, { ...o, ref: t }) }) : null;
|
|
1739
1739
|
}
|
|
1740
1740
|
);
|
|
1741
|
-
|
|
1742
|
-
var ac = /* @__PURE__ */
|
|
1741
|
+
ao.displayName = vt;
|
|
1742
|
+
var ac = /* @__PURE__ */ qr("DialogOverlay.RemoveScroll"), sc = l.forwardRef(
|
|
1743
1743
|
(e, t) => {
|
|
1744
1744
|
const { __scopeDialog: n, ...r } = e, o = de(vt, n);
|
|
1745
1745
|
return (
|
|
@@ -1756,13 +1756,13 @@ var ac = /* @__PURE__ */ zr("DialogOverlay.RemoveScroll"), sc = l.forwardRef(
|
|
|
1756
1756
|
) })
|
|
1757
1757
|
);
|
|
1758
1758
|
}
|
|
1759
|
-
), _e = "DialogContent",
|
|
1759
|
+
), _e = "DialogContent", so = l.forwardRef(
|
|
1760
1760
|
(e, t) => {
|
|
1761
|
-
const n =
|
|
1762
|
-
return /* @__PURE__ */ y(
|
|
1761
|
+
const n = ro(_e, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = de(_e, e.__scopeDialog);
|
|
1762
|
+
return /* @__PURE__ */ y(Dt, { present: r || a.open, children: a.modal ? /* @__PURE__ */ y(ic, { ...o, ref: t }) : /* @__PURE__ */ y(cc, { ...o, ref: t }) });
|
|
1763
1763
|
}
|
|
1764
1764
|
);
|
|
1765
|
-
|
|
1765
|
+
so.displayName = _e;
|
|
1766
1766
|
var ic = l.forwardRef(
|
|
1767
1767
|
(e, t) => {
|
|
1768
1768
|
const n = de(_e, e.__scopeDialog), r = l.useRef(null), o = H(t, n.contentRef, r);
|
|
@@ -1770,7 +1770,7 @@ var ic = l.forwardRef(
|
|
|
1770
1770
|
const a = r.current;
|
|
1771
1771
|
if (a) return cr(a);
|
|
1772
1772
|
}, []), /* @__PURE__ */ y(
|
|
1773
|
-
|
|
1773
|
+
io,
|
|
1774
1774
|
{
|
|
1775
1775
|
...e,
|
|
1776
1776
|
ref: o,
|
|
@@ -1795,7 +1795,7 @@ var ic = l.forwardRef(
|
|
|
1795
1795
|
(e, t) => {
|
|
1796
1796
|
const n = de(_e, e.__scopeDialog), r = l.useRef(!1), o = l.useRef(!1);
|
|
1797
1797
|
return /* @__PURE__ */ y(
|
|
1798
|
-
|
|
1798
|
+
io,
|
|
1799
1799
|
{
|
|
1800
1800
|
...e,
|
|
1801
1801
|
ref: t,
|
|
@@ -1814,12 +1814,12 @@ var ic = l.forwardRef(
|
|
|
1814
1814
|
}
|
|
1815
1815
|
);
|
|
1816
1816
|
}
|
|
1817
|
-
),
|
|
1817
|
+
), io = l.forwardRef(
|
|
1818
1818
|
(e, t) => {
|
|
1819
1819
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...i } = e, s = de(_e, n), u = l.useRef(null), c = H(t, u);
|
|
1820
|
-
return ur(), /* @__PURE__ */ Oe(
|
|
1820
|
+
return ur(), /* @__PURE__ */ Oe(Ke, { children: [
|
|
1821
1821
|
/* @__PURE__ */ y(
|
|
1822
|
-
|
|
1822
|
+
Xr,
|
|
1823
1823
|
{
|
|
1824
1824
|
asChild: !0,
|
|
1825
1825
|
loop: !0,
|
|
@@ -1841,29 +1841,29 @@ var ic = l.forwardRef(
|
|
|
1841
1841
|
)
|
|
1842
1842
|
}
|
|
1843
1843
|
),
|
|
1844
|
-
/* @__PURE__ */ Oe(
|
|
1844
|
+
/* @__PURE__ */ Oe(Ke, { children: [
|
|
1845
1845
|
/* @__PURE__ */ y(uc, { titleId: s.titleId }),
|
|
1846
1846
|
/* @__PURE__ */ y(dc, { contentRef: u, descriptionId: s.descriptionId })
|
|
1847
1847
|
] })
|
|
1848
1848
|
] });
|
|
1849
1849
|
}
|
|
1850
|
-
), pn = "DialogTitle",
|
|
1850
|
+
), pn = "DialogTitle", co = l.forwardRef(
|
|
1851
1851
|
(e, t) => {
|
|
1852
1852
|
const { __scopeDialog: n, ...r } = e, o = de(pn, n);
|
|
1853
1853
|
return /* @__PURE__ */ y(Ce.h2, { id: o.titleId, ...r, ref: t });
|
|
1854
1854
|
}
|
|
1855
1855
|
);
|
|
1856
|
-
|
|
1857
|
-
var
|
|
1856
|
+
co.displayName = pn;
|
|
1857
|
+
var uo = "DialogDescription", lo = l.forwardRef(
|
|
1858
1858
|
(e, t) => {
|
|
1859
|
-
const { __scopeDialog: n, ...r } = e, o = de(
|
|
1859
|
+
const { __scopeDialog: n, ...r } = e, o = de(uo, n);
|
|
1860
1860
|
return /* @__PURE__ */ y(Ce.p, { id: o.descriptionId, ...r, ref: t });
|
|
1861
1861
|
}
|
|
1862
1862
|
);
|
|
1863
|
-
|
|
1864
|
-
var
|
|
1863
|
+
lo.displayName = uo;
|
|
1864
|
+
var fo = "DialogClose", mo = l.forwardRef(
|
|
1865
1865
|
(e, t) => {
|
|
1866
|
-
const { __scopeDialog: n, ...r } = e, o = de(
|
|
1866
|
+
const { __scopeDialog: n, ...r } = e, o = de(fo, n);
|
|
1867
1867
|
return /* @__PURE__ */ y(
|
|
1868
1868
|
Ce.button,
|
|
1869
1869
|
{
|
|
@@ -1875,16 +1875,16 @@ var mo = "DialogClose", ho = l.forwardRef(
|
|
|
1875
1875
|
);
|
|
1876
1876
|
}
|
|
1877
1877
|
);
|
|
1878
|
-
|
|
1878
|
+
mo.displayName = fo;
|
|
1879
1879
|
function vn(e) {
|
|
1880
1880
|
return e ? "open" : "closed";
|
|
1881
1881
|
}
|
|
1882
|
-
var
|
|
1882
|
+
var ho = "DialogTitleWarning", [wf, po] = Qa(ho, {
|
|
1883
1883
|
contentName: _e,
|
|
1884
1884
|
titleName: pn,
|
|
1885
1885
|
docsSlug: "dialog"
|
|
1886
1886
|
}), uc = ({ titleId: e }) => {
|
|
1887
|
-
const t =
|
|
1887
|
+
const t = po(ho), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
1888
1888
|
|
|
1889
1889
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
1890
1890
|
|
|
@@ -1893,16 +1893,16 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
1893
1893
|
e && (document.getElementById(e) || console.error(n));
|
|
1894
1894
|
}, [n, e]), null;
|
|
1895
1895
|
}, lc = "DialogDescriptionWarning", dc = ({ contentRef: e, descriptionId: t }) => {
|
|
1896
|
-
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
1896
|
+
const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${po(lc).contentName}}.`;
|
|
1897
1897
|
return l.useEffect(() => {
|
|
1898
1898
|
var a;
|
|
1899
1899
|
const o = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
|
|
1900
1900
|
t && o && (document.getElementById(t) || console.warn(r));
|
|
1901
1901
|
}, [r, e, t]), null;
|
|
1902
|
-
}, fc =
|
|
1903
|
-
const Ef = fc, Of = mc, Cf =
|
|
1902
|
+
}, fc = eo, mc = no, hc = oo, vo = ao, yo = so, go = co, bo = lo, wo = mo;
|
|
1903
|
+
const Ef = fc, Of = mc, Cf = wo, pc = hc, Eo = l.forwardRef(
|
|
1904
1904
|
({ className: e, ...t }, n) => /* @__PURE__ */ y(
|
|
1905
|
-
|
|
1905
|
+
vo,
|
|
1906
1906
|
{
|
|
1907
1907
|
className: L(
|
|
1908
1908
|
"fixed inset-0 z-[70] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -1913,7 +1913,7 @@ const Ef = fc, Of = mc, Cf = Eo, pc = hc, Oo = l.forwardRef(
|
|
|
1913
1913
|
}
|
|
1914
1914
|
)
|
|
1915
1915
|
);
|
|
1916
|
-
|
|
1916
|
+
Eo.displayName = vo.displayName;
|
|
1917
1917
|
const vc = gt(
|
|
1918
1918
|
"fixed z-[70] gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
1919
1919
|
{
|
|
@@ -1931,27 +1931,27 @@ const vc = gt(
|
|
|
1931
1931
|
}
|
|
1932
1932
|
), yc = l.forwardRef(
|
|
1933
1933
|
({ side: e = "right", className: t, children: n, ...r }, o) => /* @__PURE__ */ Oe(pc, { children: [
|
|
1934
|
-
/* @__PURE__ */ y(
|
|
1935
|
-
/* @__PURE__ */ Oe(
|
|
1934
|
+
/* @__PURE__ */ y(Eo, {}),
|
|
1935
|
+
/* @__PURE__ */ Oe(yo, { ref: o, className: L(vc({ side: e }), t), ...r, children: [
|
|
1936
1936
|
n,
|
|
1937
|
-
/* @__PURE__ */ Oe(
|
|
1937
|
+
/* @__PURE__ */ Oe(wo, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none", children: [
|
|
1938
1938
|
/* @__PURE__ */ y(gr, { className: "size-4" }),
|
|
1939
1939
|
/* @__PURE__ */ y("span", { className: "sr-only", children: "Close" })
|
|
1940
1940
|
] })
|
|
1941
1941
|
] })
|
|
1942
1942
|
] })
|
|
1943
1943
|
);
|
|
1944
|
-
yc.displayName =
|
|
1944
|
+
yc.displayName = yo.displayName;
|
|
1945
1945
|
const gc = ({ className: e, ...t }) => /* @__PURE__ */ y("div", { className: L("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
1946
1946
|
gc.displayName = "SheetHeader";
|
|
1947
1947
|
const bc = ({ className: e, ...t }) => /* @__PURE__ */ y("div", { className: L("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1948
1948
|
bc.displayName = "SheetFooter";
|
|
1949
1949
|
const wc = l.forwardRef(
|
|
1950
|
-
({ className: e, ...t }, n) => /* @__PURE__ */ y(
|
|
1950
|
+
({ className: e, ...t }, n) => /* @__PURE__ */ y(go, { ref: n, className: L("text-lg font-semibold text-foreground", e), ...t })
|
|
1951
1951
|
);
|
|
1952
|
-
wc.displayName =
|
|
1953
|
-
const Ec = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(
|
|
1954
|
-
Ec.displayName =
|
|
1952
|
+
wc.displayName = go.displayName;
|
|
1953
|
+
const Ec = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ y(bo, { ref: n, className: L("text-sm text-muted-foreground", e), ...t }));
|
|
1954
|
+
Ec.displayName = bo.displayName;
|
|
1955
1955
|
function Oc(e, t, n = "long") {
|
|
1956
1956
|
return new Intl.DateTimeFormat("en-US", {
|
|
1957
1957
|
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
|
@@ -1982,7 +1982,7 @@ function Bn(e, t) {
|
|
|
1982
1982
|
class pe extends Date {
|
|
1983
1983
|
//#region static
|
|
1984
1984
|
constructor(...t) {
|
|
1985
|
-
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(be(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)),
|
|
1985
|
+
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(be(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), Oo(this, t)) : this.setTime(Date.now());
|
|
1986
1986
|
}
|
|
1987
1987
|
static tz(t, ...n) {
|
|
1988
1988
|
return n.length ? new pe(...n, t) : new pe(Date.now(), t);
|
|
@@ -2015,7 +2015,7 @@ Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
|
|
|
2015
2015
|
pe.prototype[t] && (e.startsWith("get") ? pe.prototype[e] = function() {
|
|
2016
2016
|
return this.internal[t]();
|
|
2017
2017
|
} : (pe.prototype[e] = function() {
|
|
2018
|
-
return Date.prototype[t].apply(this.internal, arguments),
|
|
2018
|
+
return Date.prototype[t].apply(this.internal, arguments), Dc(this), +this;
|
|
2019
2019
|
}, pe.prototype[t] = function() {
|
|
2020
2020
|
return Date.prototype[t].apply(this, arguments), yt(this), +this;
|
|
2021
2021
|
}));
|
|
@@ -2025,11 +2025,11 @@ function yt(e) {
|
|
|
2025
2025
|
// precision errors from historical offsets.
|
|
2026
2026
|
Math.round(-be(e.timeZone, e) * 60));
|
|
2027
2027
|
}
|
|
2028
|
-
function
|
|
2029
|
-
Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()),
|
|
2028
|
+
function Dc(e) {
|
|
2029
|
+
Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()), Oo(e);
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2032
|
-
const n = Array.isArray(t) ?
|
|
2031
|
+
function Oo(e, t) {
|
|
2032
|
+
const n = Array.isArray(t) ? Nc(t) : +e.internal, r = be(e.timeZone, e), o = r > 0 ? Math.floor(r) : Math.ceil(r), a = /* @__PURE__ */ new Date(+e);
|
|
2033
2033
|
a.setUTCHours(a.getUTCHours() - 1);
|
|
2034
2034
|
const i = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), s = -(/* @__PURE__ */ new Date(+a)).getTimezoneOffset(), u = i - s;
|
|
2035
2035
|
let c = i;
|
|
@@ -2048,7 +2048,7 @@ function Co(e, t) {
|
|
|
2048
2048
|
f.setUTCSeconds(0);
|
|
2049
2049
|
const p = i > 0 ? f.getSeconds() : (f.getSeconds() - 60) % 60, v = Math.round(-(be(e.timeZone, e) * 60)) % 60;
|
|
2050
2050
|
(v || p) && Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + v + p);
|
|
2051
|
-
const
|
|
2051
|
+
const D = be(e.timeZone, e), h = D > 0 ? Math.floor(D) : Math.ceil(D), O = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - h, g = h !== o, b = O - d, C = h - o, N = n - h * 60 * 1e3, m = C > 0 && Hn(e) - n === C * 60 * 1e3 && Hn(e, N) !== n;
|
|
2052
2052
|
if (g && b && !m) {
|
|
2053
2053
|
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + b);
|
|
2054
2054
|
const x = be(e.timeZone, e), k = x > 0 ? Math.floor(x) : Math.ceil(x), $ = h - k;
|
|
@@ -2058,7 +2058,7 @@ function Co(e, t) {
|
|
|
2058
2058
|
const S = (t ? n : n + v * 1e3) - +e.internal;
|
|
2059
2059
|
S && Math.abs(S) < 1800 * 1e3 && (Date.prototype.setTime.call(e, +e + S), yt(e));
|
|
2060
2060
|
}
|
|
2061
|
-
function
|
|
2061
|
+
function Nc(e) {
|
|
2062
2062
|
return Date.UTC(e[0], e.length > 1 ? e[1] : 0, e.length > 2 ? e[2] : 1, ...e.slice(3));
|
|
2063
2063
|
}
|
|
2064
2064
|
function Hn(e, t) {
|
|
@@ -2121,23 +2121,23 @@ class J extends pe {
|
|
|
2121
2121
|
}
|
|
2122
2122
|
//#endregion
|
|
2123
2123
|
}
|
|
2124
|
-
const
|
|
2125
|
-
function
|
|
2124
|
+
const Co = 6048e5, Mc = 864e5, Un = Symbol.for("constructDateFrom");
|
|
2125
|
+
function G(e, t) {
|
|
2126
2126
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && Un in e ? e[Un](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
2127
2127
|
}
|
|
2128
2128
|
function B(e, t) {
|
|
2129
|
-
return
|
|
2129
|
+
return G(t || e, e);
|
|
2130
2130
|
}
|
|
2131
2131
|
function Do(e, t, n) {
|
|
2132
2132
|
const r = B(e, n == null ? void 0 : n.in);
|
|
2133
|
-
return isNaN(t) ?
|
|
2133
|
+
return isNaN(t) ? G(e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
2134
2134
|
}
|
|
2135
|
-
function
|
|
2135
|
+
function No(e, t, n) {
|
|
2136
2136
|
const r = B(e, n == null ? void 0 : n.in);
|
|
2137
|
-
if (isNaN(t)) return
|
|
2137
|
+
if (isNaN(t)) return G(e, NaN);
|
|
2138
2138
|
if (!t)
|
|
2139
2139
|
return r;
|
|
2140
|
-
const o = r.getDate(), a =
|
|
2140
|
+
const o = r.getDate(), a = G(e, r.getTime());
|
|
2141
2141
|
a.setMonth(r.getMonth() + t + 1, 0);
|
|
2142
2142
|
const i = a.getDate();
|
|
2143
2143
|
return o >= i ? a : (r.setFullYear(
|
|
@@ -2158,10 +2158,10 @@ function Be(e, t) {
|
|
|
2158
2158
|
function Xe(e, t) {
|
|
2159
2159
|
return Be(e, { ...t, weekStartsOn: 1 });
|
|
2160
2160
|
}
|
|
2161
|
-
function
|
|
2162
|
-
const n = B(e, t == null ? void 0 : t.in), r = n.getFullYear(), o =
|
|
2161
|
+
function Mo(e, t) {
|
|
2162
|
+
const n = B(e, t == null ? void 0 : t.in), r = n.getFullYear(), o = G(n, 0);
|
|
2163
2163
|
o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
2164
|
-
const a = Xe(o), i =
|
|
2164
|
+
const a = Xe(o), i = G(n, 0);
|
|
2165
2165
|
i.setFullYear(r, 0, 4), i.setHours(0, 0, 0, 0);
|
|
2166
2166
|
const s = Xe(i);
|
|
2167
2167
|
return n.getTime() >= a.getTime() ? r + 1 : n.getTime() >= s.getTime() ? r : r - 1;
|
|
@@ -2181,7 +2181,7 @@ function Vn(e) {
|
|
|
2181
2181
|
return n.setUTCFullYear(t.getFullYear()), +e - +n;
|
|
2182
2182
|
}
|
|
2183
2183
|
function Ue(e, ...t) {
|
|
2184
|
-
const n =
|
|
2184
|
+
const n = G.bind(
|
|
2185
2185
|
null,
|
|
2186
2186
|
t.find((r) => typeof r == "object")
|
|
2187
2187
|
);
|
|
@@ -2200,30 +2200,30 @@ function yn(e, t, n) {
|
|
|
2200
2200
|
return Math.round((s - u) / Mc);
|
|
2201
2201
|
}
|
|
2202
2202
|
function Sc(e, t) {
|
|
2203
|
-
const n =
|
|
2203
|
+
const n = Mo(e, t), r = G(e, 0);
|
|
2204
2204
|
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), Xe(r);
|
|
2205
2205
|
}
|
|
2206
2206
|
function Tc(e, t, n) {
|
|
2207
2207
|
return Do(e, t * 7, n);
|
|
2208
2208
|
}
|
|
2209
2209
|
function kc(e, t, n) {
|
|
2210
|
-
return
|
|
2210
|
+
return No(e, t * 12, n);
|
|
2211
2211
|
}
|
|
2212
2212
|
function xc(e, t) {
|
|
2213
2213
|
let n, r = t == null ? void 0 : t.in;
|
|
2214
2214
|
return e.forEach((o) => {
|
|
2215
|
-
!r && typeof o == "object" && (r =
|
|
2215
|
+
!r && typeof o == "object" && (r = G.bind(null, o));
|
|
2216
2216
|
const a = B(o, r);
|
|
2217
2217
|
(!n || n < a || isNaN(+a)) && (n = a);
|
|
2218
|
-
}),
|
|
2218
|
+
}), G(r, n || NaN);
|
|
2219
2219
|
}
|
|
2220
2220
|
function Rc(e, t) {
|
|
2221
2221
|
let n, r = t == null ? void 0 : t.in;
|
|
2222
2222
|
return e.forEach((o) => {
|
|
2223
|
-
!r && typeof o == "object" && (r =
|
|
2223
|
+
!r && typeof o == "object" && (r = G.bind(null, o));
|
|
2224
2224
|
const a = B(o, r);
|
|
2225
2225
|
(!n || n > a || isNaN(+a)) && (n = a);
|
|
2226
|
-
}),
|
|
2226
|
+
}), G(r, n || NaN);
|
|
2227
2227
|
}
|
|
2228
2228
|
function Ac(e, t, n) {
|
|
2229
2229
|
const [r, o] = Ue(
|
|
@@ -2233,13 +2233,13 @@ function Ac(e, t, n) {
|
|
|
2233
2233
|
);
|
|
2234
2234
|
return +Qe(r) == +Qe(o);
|
|
2235
2235
|
}
|
|
2236
|
-
function
|
|
2236
|
+
function Po(e) {
|
|
2237
2237
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
2238
2238
|
}
|
|
2239
2239
|
function _c(e) {
|
|
2240
|
-
return !(!
|
|
2240
|
+
return !(!Po(e) && typeof e != "number" || isNaN(+B(e)));
|
|
2241
2241
|
}
|
|
2242
|
-
function
|
|
2242
|
+
function So(e, t, n) {
|
|
2243
2243
|
const [r, o] = Ue(
|
|
2244
2244
|
n == null ? void 0 : n.in,
|
|
2245
2245
|
e,
|
|
@@ -2251,19 +2251,19 @@ function Wc(e, t) {
|
|
|
2251
2251
|
const n = B(e, t == null ? void 0 : t.in), r = n.getMonth();
|
|
2252
2252
|
return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
|
|
2253
2253
|
}
|
|
2254
|
-
function
|
|
2254
|
+
function To(e, t) {
|
|
2255
2255
|
const [n, r] = Ue(e, t.start, t.end);
|
|
2256
2256
|
return { start: n, end: r };
|
|
2257
2257
|
}
|
|
2258
2258
|
function Ic(e, t) {
|
|
2259
|
-
const { start: n, end: r } =
|
|
2259
|
+
const { start: n, end: r } = To(t == null ? void 0 : t.in, e);
|
|
2260
2260
|
let o = +n > +r;
|
|
2261
2261
|
const a = o ? +n : +r, i = o ? r : n;
|
|
2262
2262
|
i.setHours(0, 0, 0, 0), i.setDate(1);
|
|
2263
2263
|
let s = 1;
|
|
2264
2264
|
const u = [];
|
|
2265
2265
|
for (; +i <= a; )
|
|
2266
|
-
u.push(
|
|
2266
|
+
u.push(G(n, i)), i.setMonth(i.getMonth() + s);
|
|
2267
2267
|
return o ? u.reverse() : u;
|
|
2268
2268
|
}
|
|
2269
2269
|
function Fc(e, t) {
|
|
@@ -2274,28 +2274,28 @@ function $c(e, t) {
|
|
|
2274
2274
|
const n = B(e, t == null ? void 0 : t.in), r = n.getFullYear();
|
|
2275
2275
|
return n.setFullYear(r + 1, 0, 0), n.setHours(23, 59, 59, 999), n;
|
|
2276
2276
|
}
|
|
2277
|
-
function
|
|
2277
|
+
function ko(e, t) {
|
|
2278
2278
|
const n = B(e, t == null ? void 0 : t.in);
|
|
2279
2279
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
2280
2280
|
}
|
|
2281
2281
|
function Yc(e, t) {
|
|
2282
|
-
const { start: n, end: r } =
|
|
2282
|
+
const { start: n, end: r } = To(t == null ? void 0 : t.in, e);
|
|
2283
2283
|
let o = +n > +r;
|
|
2284
2284
|
const a = o ? +n : +r, i = o ? r : n;
|
|
2285
2285
|
i.setHours(0, 0, 0, 0), i.setMonth(0, 1);
|
|
2286
2286
|
let s = 1;
|
|
2287
2287
|
const u = [];
|
|
2288
2288
|
for (; +i <= a; )
|
|
2289
|
-
u.push(
|
|
2289
|
+
u.push(G(n, i)), i.setFullYear(i.getFullYear() + s);
|
|
2290
2290
|
return o ? u.reverse() : u;
|
|
2291
2291
|
}
|
|
2292
|
-
function
|
|
2292
|
+
function xo(e, t) {
|
|
2293
2293
|
var s, u, c, d;
|
|
2294
2294
|
const n = Je(), r = (t == null ? void 0 : t.weekStartsOn) ?? ((u = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : u.weekStartsOn) ?? n.weekStartsOn ?? ((d = (c = n.locale) == null ? void 0 : c.options) == null ? void 0 : d.weekStartsOn) ?? 0, o = B(e, t == null ? void 0 : t.in), a = o.getDay(), i = (a < r ? -7 : 0) + 6 - (a - r);
|
|
2295
2295
|
return o.setDate(o.getDate() + i), o.setHours(23, 59, 59, 999), o;
|
|
2296
2296
|
}
|
|
2297
2297
|
function Bc(e, t) {
|
|
2298
|
-
return
|
|
2298
|
+
return xo(e, { ...t, weekStartsOn: 1 });
|
|
2299
2299
|
}
|
|
2300
2300
|
const Lc = {
|
|
2301
2301
|
lessThanXSeconds: {
|
|
@@ -2405,7 +2405,7 @@ const Uc = {
|
|
|
2405
2405
|
tomorrow: "'tomorrow at' p",
|
|
2406
2406
|
nextWeek: "eeee 'at' p",
|
|
2407
2407
|
other: "P"
|
|
2408
|
-
},
|
|
2408
|
+
}, Gc = (e, t, n, r) => zc[e];
|
|
2409
2409
|
function je(e) {
|
|
2410
2410
|
return (t, n) => {
|
|
2411
2411
|
const r = n != null && n.context ? String(n.context) : "standalone";
|
|
@@ -2421,7 +2421,7 @@ function je(e) {
|
|
|
2421
2421
|
return o[a];
|
|
2422
2422
|
};
|
|
2423
2423
|
}
|
|
2424
|
-
const
|
|
2424
|
+
const Kc = {
|
|
2425
2425
|
narrow: ["B", "A"],
|
|
2426
2426
|
abbreviated: ["BC", "AD"],
|
|
2427
2427
|
wide: ["Before Christ", "Anno Domini"]
|
|
@@ -2549,7 +2549,7 @@ const Gc = {
|
|
|
2549
2549
|
}, nu = {
|
|
2550
2550
|
ordinalNumber: tu,
|
|
2551
2551
|
era: je({
|
|
2552
|
-
values:
|
|
2552
|
+
values: Kc,
|
|
2553
2553
|
defaultWidth: "wide"
|
|
2554
2554
|
}),
|
|
2555
2555
|
quarter: je({
|
|
@@ -2720,7 +2720,7 @@ const su = /^(\d+)(th|st|nd|rd)?/i, iu = /\d+/i, cu = {
|
|
|
2720
2720
|
code: "en-US",
|
|
2721
2721
|
formatDistance: Hc,
|
|
2722
2722
|
formatLong: qc,
|
|
2723
|
-
formatRelative:
|
|
2723
|
+
formatRelative: Gc,
|
|
2724
2724
|
localize: nu,
|
|
2725
2725
|
match: gu,
|
|
2726
2726
|
options: {
|
|
@@ -2730,35 +2730,35 @@ const su = /^(\d+)(th|st|nd|rd)?/i, iu = /\d+/i, cu = {
|
|
|
2730
2730
|
};
|
|
2731
2731
|
function bu(e, t) {
|
|
2732
2732
|
const n = B(e, t == null ? void 0 : t.in);
|
|
2733
|
-
return yn(n,
|
|
2733
|
+
return yn(n, ko(n)) + 1;
|
|
2734
2734
|
}
|
|
2735
2735
|
function gn(e, t) {
|
|
2736
2736
|
const n = B(e, t == null ? void 0 : t.in), r = +Xe(n) - +Sc(n);
|
|
2737
|
-
return Math.round(r /
|
|
2737
|
+
return Math.round(r / Co) + 1;
|
|
2738
2738
|
}
|
|
2739
|
-
function
|
|
2739
|
+
function Ro(e, t) {
|
|
2740
2740
|
var d, f, p, v;
|
|
2741
|
-
const n = B(e, t == null ? void 0 : t.in), r = n.getFullYear(), o = Je(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((v = (p = o.locale) == null ? void 0 : p.options) == null ? void 0 : v.firstWeekContainsDate) ?? 1, i =
|
|
2741
|
+
const n = B(e, t == null ? void 0 : t.in), r = n.getFullYear(), o = Je(), a = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((f = (d = t == null ? void 0 : t.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? o.firstWeekContainsDate ?? ((v = (p = o.locale) == null ? void 0 : p.options) == null ? void 0 : v.firstWeekContainsDate) ?? 1, i = G((t == null ? void 0 : t.in) || e, 0);
|
|
2742
2742
|
i.setFullYear(r + 1, 0, a), i.setHours(0, 0, 0, 0);
|
|
2743
|
-
const s = Be(i, t), u =
|
|
2743
|
+
const s = Be(i, t), u = G((t == null ? void 0 : t.in) || e, 0);
|
|
2744
2744
|
u.setFullYear(r, 0, a), u.setHours(0, 0, 0, 0);
|
|
2745
2745
|
const c = Be(u, t);
|
|
2746
2746
|
return +n >= +s ? r + 1 : +n >= +c ? r : r - 1;
|
|
2747
2747
|
}
|
|
2748
2748
|
function wu(e, t) {
|
|
2749
2749
|
var s, u, c, d;
|
|
2750
|
-
const n = Je(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((u = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : u.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((d = (c = n.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o =
|
|
2750
|
+
const n = Je(), r = (t == null ? void 0 : t.firstWeekContainsDate) ?? ((u = (s = t == null ? void 0 : t.locale) == null ? void 0 : s.options) == null ? void 0 : u.firstWeekContainsDate) ?? n.firstWeekContainsDate ?? ((d = (c = n.locale) == null ? void 0 : c.options) == null ? void 0 : d.firstWeekContainsDate) ?? 1, o = Ro(e, t), a = G((t == null ? void 0 : t.in) || e, 0);
|
|
2751
2751
|
return a.setFullYear(o, 0, r), a.setHours(0, 0, 0, 0), Be(a, t);
|
|
2752
2752
|
}
|
|
2753
2753
|
function bn(e, t) {
|
|
2754
2754
|
const n = B(e, t == null ? void 0 : t.in), r = +Be(n, t) - +wu(n, t);
|
|
2755
|
-
return Math.round(r /
|
|
2755
|
+
return Math.round(r / Co) + 1;
|
|
2756
2756
|
}
|
|
2757
2757
|
function Y(e, t) {
|
|
2758
2758
|
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
2759
2759
|
return n + r;
|
|
2760
2760
|
}
|
|
2761
|
-
const
|
|
2761
|
+
const Ne = {
|
|
2762
2762
|
// Year
|
|
2763
2763
|
y(e, t) {
|
|
2764
2764
|
const n = e.getFullYear(), r = n > 0 ? n : 1 - n;
|
|
@@ -2844,11 +2844,11 @@ const De = {
|
|
|
2844
2844
|
const r = e.getFullYear(), o = r > 0 ? r : 1 - r;
|
|
2845
2845
|
return n.ordinalNumber(o, { unit: "year" });
|
|
2846
2846
|
}
|
|
2847
|
-
return
|
|
2847
|
+
return Ne.y(e, t);
|
|
2848
2848
|
},
|
|
2849
2849
|
// Local week-numbering year
|
|
2850
2850
|
Y: function(e, t, n, r) {
|
|
2851
|
-
const o =
|
|
2851
|
+
const o = Ro(e, r), a = o > 0 ? o : 1 - o;
|
|
2852
2852
|
if (t === "YY") {
|
|
2853
2853
|
const i = a % 100;
|
|
2854
2854
|
return Y(i, 2);
|
|
@@ -2857,7 +2857,7 @@ const De = {
|
|
|
2857
2857
|
},
|
|
2858
2858
|
// ISO week-numbering year
|
|
2859
2859
|
R: function(e, t) {
|
|
2860
|
-
const n =
|
|
2860
|
+
const n = Mo(e);
|
|
2861
2861
|
return Y(n, t.length);
|
|
2862
2862
|
},
|
|
2863
2863
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -2947,7 +2947,7 @@ const De = {
|
|
|
2947
2947
|
switch (t) {
|
|
2948
2948
|
case "M":
|
|
2949
2949
|
case "MM":
|
|
2950
|
-
return
|
|
2950
|
+
return Ne.M(e, t);
|
|
2951
2951
|
// 1st, 2nd, ..., 12th
|
|
2952
2952
|
case "Mo":
|
|
2953
2953
|
return n.ordinalNumber(r + 1, { unit: "month" });
|
|
@@ -3012,7 +3012,7 @@ const De = {
|
|
|
3012
3012
|
},
|
|
3013
3013
|
// Day of the month
|
|
3014
3014
|
d: function(e, t, n) {
|
|
3015
|
-
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) :
|
|
3015
|
+
return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : Ne.d(e, t);
|
|
3016
3016
|
},
|
|
3017
3017
|
// Day of year
|
|
3018
3018
|
D: function(e, t, n) {
|
|
@@ -3258,11 +3258,11 @@ const De = {
|
|
|
3258
3258
|
let r = e.getHours() % 12;
|
|
3259
3259
|
return r === 0 && (r = 12), n.ordinalNumber(r, { unit: "hour" });
|
|
3260
3260
|
}
|
|
3261
|
-
return
|
|
3261
|
+
return Ne.h(e, t);
|
|
3262
3262
|
},
|
|
3263
3263
|
// Hour [0-23]
|
|
3264
3264
|
H: function(e, t, n) {
|
|
3265
|
-
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) :
|
|
3265
|
+
return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : Ne.H(e, t);
|
|
3266
3266
|
},
|
|
3267
3267
|
// Hour [0-11]
|
|
3268
3268
|
K: function(e, t, n) {
|
|
@@ -3276,15 +3276,15 @@ const De = {
|
|
|
3276
3276
|
},
|
|
3277
3277
|
// Minute
|
|
3278
3278
|
m: function(e, t, n) {
|
|
3279
|
-
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) :
|
|
3279
|
+
return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : Ne.m(e, t);
|
|
3280
3280
|
},
|
|
3281
3281
|
// Second
|
|
3282
3282
|
s: function(e, t, n) {
|
|
3283
|
-
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) :
|
|
3283
|
+
return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : Ne.s(e, t);
|
|
3284
3284
|
},
|
|
3285
3285
|
// Fraction of second
|
|
3286
3286
|
S: function(e, t) {
|
|
3287
|
-
return
|
|
3287
|
+
return Ne.S(e, t);
|
|
3288
3288
|
},
|
|
3289
3289
|
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
3290
3290
|
X: function(e, t, n) {
|
|
@@ -3385,7 +3385,7 @@ function Ae(e, t = "") {
|
|
|
3385
3385
|
const n = e > 0 ? "-" : "+", r = Math.abs(e), o = Y(Math.trunc(r / 60), 2), a = Y(r % 60, 2);
|
|
3386
3386
|
return n + o + t + a;
|
|
3387
3387
|
}
|
|
3388
|
-
const
|
|
3388
|
+
const Gn = (e, t) => {
|
|
3389
3389
|
switch (e) {
|
|
3390
3390
|
case "P":
|
|
3391
3391
|
return t.date({ width: "short" });
|
|
@@ -3397,7 +3397,7 @@ const Kn = (e, t) => {
|
|
|
3397
3397
|
default:
|
|
3398
3398
|
return t.date({ width: "full" });
|
|
3399
3399
|
}
|
|
3400
|
-
},
|
|
3400
|
+
}, Ao = (e, t) => {
|
|
3401
3401
|
switch (e) {
|
|
3402
3402
|
case "p":
|
|
3403
3403
|
return t.time({ width: "short" });
|
|
@@ -3412,7 +3412,7 @@ const Kn = (e, t) => {
|
|
|
3412
3412
|
}, Eu = (e, t) => {
|
|
3413
3413
|
const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
|
|
3414
3414
|
if (!o)
|
|
3415
|
-
return
|
|
3415
|
+
return Gn(e, t);
|
|
3416
3416
|
let a;
|
|
3417
3417
|
switch (r) {
|
|
3418
3418
|
case "P":
|
|
@@ -3429,29 +3429,29 @@ const Kn = (e, t) => {
|
|
|
3429
3429
|
a = t.dateTime({ width: "full" });
|
|
3430
3430
|
break;
|
|
3431
3431
|
}
|
|
3432
|
-
return a.replace("{{date}}",
|
|
3432
|
+
return a.replace("{{date}}", Gn(r, t)).replace("{{time}}", Ao(o, t));
|
|
3433
3433
|
}, Ou = {
|
|
3434
|
-
p:
|
|
3434
|
+
p: Ao,
|
|
3435
3435
|
P: Eu
|
|
3436
|
-
}, Cu = /^D+$/,
|
|
3436
|
+
}, Cu = /^D+$/, Du = /^Y+$/, Nu = ["D", "DD", "YY", "YYYY"];
|
|
3437
3437
|
function Mu(e) {
|
|
3438
3438
|
return Cu.test(e);
|
|
3439
3439
|
}
|
|
3440
3440
|
function Pu(e) {
|
|
3441
|
-
return
|
|
3441
|
+
return Du.test(e);
|
|
3442
3442
|
}
|
|
3443
3443
|
function Su(e, t, n) {
|
|
3444
3444
|
const r = Tu(e, t, n);
|
|
3445
|
-
if (console.warn(r),
|
|
3445
|
+
if (console.warn(r), Nu.includes(e)) throw new RangeError(r);
|
|
3446
3446
|
}
|
|
3447
3447
|
function Tu(e, t, n) {
|
|
3448
3448
|
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
3449
3449
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
3450
3450
|
}
|
|
3451
3451
|
const ku = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, xu = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Ru = /^'([^]*?)'?$/, Au = /''/g, _u = /[a-zA-Z]/;
|
|
3452
|
-
function
|
|
3453
|
-
var d, f, p, v,
|
|
3454
|
-
const r = Je(), o = (n == null ? void 0 : n.locale) ?? r.locale ?? Ye, a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((v = (p = r.locale) == null ? void 0 : p.options) == null ? void 0 : v.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((h = (
|
|
3452
|
+
function Ge(e, t, n) {
|
|
3453
|
+
var d, f, p, v, D, h, w, O;
|
|
3454
|
+
const r = Je(), o = (n == null ? void 0 : n.locale) ?? r.locale ?? Ye, a = (n == null ? void 0 : n.firstWeekContainsDate) ?? ((f = (d = n == null ? void 0 : n.locale) == null ? void 0 : d.options) == null ? void 0 : f.firstWeekContainsDate) ?? r.firstWeekContainsDate ?? ((v = (p = r.locale) == null ? void 0 : p.options) == null ? void 0 : v.firstWeekContainsDate) ?? 1, i = (n == null ? void 0 : n.weekStartsOn) ?? ((h = (D = n == null ? void 0 : n.locale) == null ? void 0 : D.options) == null ? void 0 : h.weekStartsOn) ?? r.weekStartsOn ?? ((O = (w = r.locale) == null ? void 0 : w.options) == null ? void 0 : O.weekStartsOn) ?? 0, s = B(e, n == null ? void 0 : n.in);
|
|
3455
3455
|
if (!_c(s))
|
|
3456
3456
|
throw new RangeError("Invalid time value");
|
|
3457
3457
|
let u = t.match(xu).map((g) => {
|
|
@@ -3494,7 +3494,7 @@ function Wu(e) {
|
|
|
3494
3494
|
return t ? t[1].replace(Au, "'") : e;
|
|
3495
3495
|
}
|
|
3496
3496
|
function Iu(e, t) {
|
|
3497
|
-
const n = B(e, t == null ? void 0 : t.in), r = n.getFullYear(), o = n.getMonth(), a =
|
|
3497
|
+
const n = B(e, t == null ? void 0 : t.in), r = n.getFullYear(), o = n.getMonth(), a = G(n, 0);
|
|
3498
3498
|
return a.setFullYear(r, o + 1, 0), a.setHours(0, 0, 0, 0), a.getDate();
|
|
3499
3499
|
}
|
|
3500
3500
|
function Fu(e, t) {
|
|
@@ -3526,34 +3526,34 @@ function Hu(e, t, n) {
|
|
|
3526
3526
|
return r.getFullYear() === o.getFullYear();
|
|
3527
3527
|
}
|
|
3528
3528
|
function Uu(e, t, n) {
|
|
3529
|
-
const r = B(e, n == null ? void 0 : n.in), o = r.getFullYear(), a = r.getDate(), i =
|
|
3529
|
+
const r = B(e, n == null ? void 0 : n.in), o = r.getFullYear(), a = r.getDate(), i = G(e, 0);
|
|
3530
3530
|
i.setFullYear(o, t, 15), i.setHours(0, 0, 0, 0);
|
|
3531
3531
|
const s = Iu(i);
|
|
3532
3532
|
return r.setMonth(t, Math.min(a, s)), r;
|
|
3533
3533
|
}
|
|
3534
3534
|
function Vu(e, t, n) {
|
|
3535
3535
|
const r = B(e, n == null ? void 0 : n.in);
|
|
3536
|
-
return isNaN(+r) ?
|
|
3536
|
+
return isNaN(+r) ? G(e, NaN) : (r.setFullYear(t), r);
|
|
3537
3537
|
}
|
|
3538
|
-
const
|
|
3538
|
+
const Kn = 5, ju = 4;
|
|
3539
3539
|
function qu(e, t) {
|
|
3540
|
-
const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, o = t.addDays(e, -r + 1), a = t.addDays(o,
|
|
3541
|
-
return t.getMonth(e) === t.getMonth(a) ?
|
|
3540
|
+
const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, o = t.addDays(e, -r + 1), a = t.addDays(o, Kn * 7 - 1);
|
|
3541
|
+
return t.getMonth(e) === t.getMonth(a) ? Kn : ju;
|
|
3542
3542
|
}
|
|
3543
|
-
function
|
|
3543
|
+
function _o(e, t) {
|
|
3544
3544
|
const n = t.startOfMonth(e), r = n.getDay();
|
|
3545
3545
|
return r === 1 ? n : r === 0 ? t.addDays(n, -6) : t.addDays(n, -1 * (r - 1));
|
|
3546
3546
|
}
|
|
3547
3547
|
function zu(e, t) {
|
|
3548
|
-
const n =
|
|
3548
|
+
const n = _o(e, t), r = qu(e, t);
|
|
3549
3549
|
return t.addDays(n, r * 7 - 1);
|
|
3550
3550
|
}
|
|
3551
|
-
const
|
|
3551
|
+
const Wo = {
|
|
3552
3552
|
...Ye,
|
|
3553
3553
|
labels: {
|
|
3554
3554
|
labelDayButton: (e, t, n, r) => {
|
|
3555
3555
|
let o;
|
|
3556
|
-
r && typeof r.format == "function" ? o = r.format.bind(r) : o = (i, s) =>
|
|
3556
|
+
r && typeof r.format == "function" ? o = r.format.bind(r) : o = (i, s) => Ge(i, s, { locale: Ye, ...n });
|
|
3557
3557
|
let a = o(e, "PPPP");
|
|
3558
3558
|
return t.today && (a = `Today, ${a}`), t.selected && (a = `${a}, selected`), a;
|
|
3559
3559
|
},
|
|
@@ -3564,11 +3564,11 @@ const Io = {
|
|
|
3564
3564
|
labelYearDropdown: "Choose the Year",
|
|
3565
3565
|
labelGrid: (e, t, n) => {
|
|
3566
3566
|
let r;
|
|
3567
|
-
return n && typeof n.format == "function" ? r = n.format.bind(n) : r = (o, a) =>
|
|
3567
|
+
return n && typeof n.format == "function" ? r = n.format.bind(n) : r = (o, a) => Ge(o, a, { locale: Ye, ...t }), r(e, "LLLL yyyy");
|
|
3568
3568
|
},
|
|
3569
3569
|
labelGridcell: (e, t, n, r) => {
|
|
3570
3570
|
let o;
|
|
3571
|
-
r && typeof r.format == "function" ? o = r.format.bind(r) : o = (i, s) =>
|
|
3571
|
+
r && typeof r.format == "function" ? o = r.format.bind(r) : o = (i, s) => Ge(i, s, { locale: Ye, ...n });
|
|
3572
3572
|
let a = o(e, "PPPP");
|
|
3573
3573
|
return t != null && t.today && (a = `Today, ${a}`), a;
|
|
3574
3574
|
},
|
|
@@ -3576,7 +3576,7 @@ const Io = {
|
|
|
3576
3576
|
labelWeekNumberHeader: "Week Number",
|
|
3577
3577
|
labelWeekday: (e, t, n) => {
|
|
3578
3578
|
let r;
|
|
3579
|
-
return n && typeof n.format == "function" ? r = n.format.bind(n) : r = (o, a) =>
|
|
3579
|
+
return n && typeof n.format == "function" ? r = n.format.bind(n) : r = (o, a) => Ge(o, a, { locale: Ye, ...t }), r(e, "cccc");
|
|
3580
3580
|
}
|
|
3581
3581
|
}
|
|
3582
3582
|
};
|
|
@@ -3604,7 +3604,7 @@ class ae {
|
|
|
3604
3604
|
return (a = this.overrides) != null && a.addDays ? this.overrides.addDays(r, o) : Do(r, o);
|
|
3605
3605
|
}, this.addMonths = (r, o) => {
|
|
3606
3606
|
var a;
|
|
3607
|
-
return (a = this.overrides) != null && a.addMonths ? this.overrides.addMonths(r, o) :
|
|
3607
|
+
return (a = this.overrides) != null && a.addMonths ? this.overrides.addMonths(r, o) : No(r, o);
|
|
3608
3608
|
}, this.addWeeks = (r, o) => {
|
|
3609
3609
|
var a;
|
|
3610
3610
|
return (a = this.overrides) != null && a.addWeeks ? this.overrides.addWeeks(r, o) : Tc(r, o);
|
|
@@ -3616,7 +3616,7 @@ class ae {
|
|
|
3616
3616
|
return (a = this.overrides) != null && a.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, o) : yn(r, o);
|
|
3617
3617
|
}, this.differenceInCalendarMonths = (r, o) => {
|
|
3618
3618
|
var a;
|
|
3619
|
-
return (a = this.overrides) != null && a.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, o) :
|
|
3619
|
+
return (a = this.overrides) != null && a.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, o) : So(r, o);
|
|
3620
3620
|
}, this.eachMonthOfInterval = (r) => {
|
|
3621
3621
|
var o;
|
|
3622
3622
|
return (o = this.overrides) != null && o.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : Ic(r);
|
|
@@ -3640,13 +3640,13 @@ class ae {
|
|
|
3640
3640
|
return (o = this.overrides) != null && o.endOfMonth ? this.overrides.endOfMonth(r) : Wc(r);
|
|
3641
3641
|
}, this.endOfWeek = (r, o) => {
|
|
3642
3642
|
var a;
|
|
3643
|
-
return (a = this.overrides) != null && a.endOfWeek ? this.overrides.endOfWeek(r, o) :
|
|
3643
|
+
return (a = this.overrides) != null && a.endOfWeek ? this.overrides.endOfWeek(r, o) : xo(r, this.options);
|
|
3644
3644
|
}, this.endOfYear = (r) => {
|
|
3645
3645
|
var o;
|
|
3646
3646
|
return (o = this.overrides) != null && o.endOfYear ? this.overrides.endOfYear(r) : $c(r);
|
|
3647
3647
|
}, this.format = (r, o, a) => {
|
|
3648
3648
|
var s;
|
|
3649
|
-
const i = (s = this.overrides) != null && s.format ? this.overrides.format(r, o, this.options) :
|
|
3649
|
+
const i = (s = this.overrides) != null && s.format ? this.overrides.format(r, o, this.options) : Ge(r, o, this.options);
|
|
3650
3650
|
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i;
|
|
3651
3651
|
}, this.getISOWeek = (r) => {
|
|
3652
3652
|
var o;
|
|
@@ -3668,7 +3668,7 @@ class ae {
|
|
|
3668
3668
|
return (a = this.overrides) != null && a.isBefore ? this.overrides.isBefore(r, o) : Bu(r, o);
|
|
3669
3669
|
}, this.isDate = (r) => {
|
|
3670
3670
|
var o;
|
|
3671
|
-
return (o = this.overrides) != null && o.isDate ? this.overrides.isDate(r) :
|
|
3671
|
+
return (o = this.overrides) != null && o.isDate ? this.overrides.isDate(r) : Po(r);
|
|
3672
3672
|
}, this.isSameDay = (r, o) => {
|
|
3673
3673
|
var a;
|
|
3674
3674
|
return (a = this.overrides) != null && a.isSameDay ? this.overrides.isSameDay(r, o) : Ac(r, o);
|
|
@@ -3692,7 +3692,7 @@ class ae {
|
|
|
3692
3692
|
return (a = this.overrides) != null && a.setYear ? this.overrides.setYear(r, o) : Vu(r, o);
|
|
3693
3693
|
}, this.startOfBroadcastWeek = (r, o) => {
|
|
3694
3694
|
var a;
|
|
3695
|
-
return (a = this.overrides) != null && a.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) :
|
|
3695
|
+
return (a = this.overrides) != null && a.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : _o(r, this);
|
|
3696
3696
|
}, this.startOfDay = (r) => {
|
|
3697
3697
|
var o;
|
|
3698
3698
|
return (o = this.overrides) != null && o.startOfDay ? this.overrides.startOfDay(r) : Qe(r);
|
|
@@ -3707,8 +3707,8 @@ class ae {
|
|
|
3707
3707
|
return (a = this.overrides) != null && a.startOfWeek ? this.overrides.startOfWeek(r, this.options) : Be(r, this.options);
|
|
3708
3708
|
}, this.startOfYear = (r) => {
|
|
3709
3709
|
var o;
|
|
3710
|
-
return (o = this.overrides) != null && o.startOfYear ? this.overrides.startOfYear(r) :
|
|
3711
|
-
}, this.options = { locale:
|
|
3710
|
+
return (o = this.overrides) != null && o.startOfYear ? this.overrides.startOfYear(r) : ko(r);
|
|
3711
|
+
}, this.options = { locale: Wo, ...t }, this.overrides = n;
|
|
3712
3712
|
}
|
|
3713
3713
|
/**
|
|
3714
3714
|
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
@@ -3796,7 +3796,7 @@ ae.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
|
3796
3796
|
"zh-TW"
|
|
3797
3797
|
]);
|
|
3798
3798
|
const ye = new ae();
|
|
3799
|
-
class
|
|
3799
|
+
class Io {
|
|
3800
3800
|
constructor(t, n, r = ye) {
|
|
3801
3801
|
this.date = t, this.displayMonth = n, this.outside = !!(n && !r.isSameMonth(t, n)), this.dateLib = r, this.isoDate = r.format(t, "yyyy-MM-dd"), this.displayMonthId = r.format(n, "yyyy-MM"), this.dateMonthId = r.format(t, "yyyy-MM");
|
|
3802
3802
|
}
|
|
@@ -3811,12 +3811,12 @@ class Fo {
|
|
|
3811
3811
|
return this.dateLib.isSameDay(t.date, this.date) && this.dateLib.isSameMonth(t.displayMonth, this.displayMonth);
|
|
3812
3812
|
}
|
|
3813
3813
|
}
|
|
3814
|
-
class
|
|
3814
|
+
class Gu {
|
|
3815
3815
|
constructor(t, n) {
|
|
3816
3816
|
this.date = t, this.weeks = n;
|
|
3817
3817
|
}
|
|
3818
3818
|
}
|
|
3819
|
-
class
|
|
3819
|
+
class Ku {
|
|
3820
3820
|
constructor(t, n) {
|
|
3821
3821
|
this.days = n, this.weekNumber = t;
|
|
3822
3822
|
}
|
|
@@ -3862,9 +3862,9 @@ var oe;
|
|
|
3862
3862
|
(function(e) {
|
|
3863
3863
|
e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit";
|
|
3864
3864
|
})(oe || (oe = {}));
|
|
3865
|
-
const
|
|
3865
|
+
const Fo = qa(void 0);
|
|
3866
3866
|
function Mt() {
|
|
3867
|
-
const e =
|
|
3867
|
+
const e = za(Fo);
|
|
3868
3868
|
if (e === void 0)
|
|
3869
3869
|
throw new Error("useDayPicker() must be used within a custom component.");
|
|
3870
3870
|
return e;
|
|
@@ -4017,10 +4017,10 @@ function En(e) {
|
|
|
4017
4017
|
function On(e) {
|
|
4018
4018
|
return !!(e && typeof e == "object" && "before" in e);
|
|
4019
4019
|
}
|
|
4020
|
-
function
|
|
4020
|
+
function $o(e) {
|
|
4021
4021
|
return !!(e && typeof e == "object" && "dayOfWeek" in e);
|
|
4022
4022
|
}
|
|
4023
|
-
function
|
|
4023
|
+
function Yo(e, t) {
|
|
4024
4024
|
return Array.isArray(e) && e.every(t.isDate);
|
|
4025
4025
|
}
|
|
4026
4026
|
function Ee(e, t, n = ye) {
|
|
@@ -4030,11 +4030,11 @@ function Ee(e, t, n = ye) {
|
|
|
4030
4030
|
return s;
|
|
4031
4031
|
if (n.isDate(s))
|
|
4032
4032
|
return o(e, s);
|
|
4033
|
-
if (
|
|
4033
|
+
if (Yo(s, n))
|
|
4034
4034
|
return s.some((u) => o(e, u));
|
|
4035
4035
|
if (Pt(s))
|
|
4036
4036
|
return we(s, e, !1, n);
|
|
4037
|
-
if (
|
|
4037
|
+
if ($o(s))
|
|
4038
4038
|
return Array.isArray(s.dayOfWeek) ? s.dayOfWeek.includes(e.getDay()) : s.dayOfWeek === e.getDay();
|
|
4039
4039
|
if (wn(s)) {
|
|
4040
4040
|
const u = a(s.before, e), c = a(s.after, e), d = u > 0, f = c < 0;
|
|
@@ -4044,22 +4044,22 @@ function Ee(e, t, n = ye) {
|
|
|
4044
4044
|
});
|
|
4045
4045
|
}
|
|
4046
4046
|
function Ol(e, t, n, r, o) {
|
|
4047
|
-
const { disabled: a, hidden: i, modifiers: s, showOutsideDays: u, broadcastCalendar: c, today: d = o.today() } = t, { isSameDay: f, isSameMonth: p, startOfMonth: v, isBefore:
|
|
4047
|
+
const { disabled: a, hidden: i, modifiers: s, showOutsideDays: u, broadcastCalendar: c, today: d = o.today() } = t, { isSameDay: f, isSameMonth: p, startOfMonth: v, isBefore: D, endOfMonth: h, isAfter: w } = o, O = n && v(n), g = r && h(r), b = {
|
|
4048
4048
|
[V.focused]: [],
|
|
4049
4049
|
[V.outside]: [],
|
|
4050
4050
|
[V.disabled]: [],
|
|
4051
4051
|
[V.hidden]: [],
|
|
4052
4052
|
[V.today]: []
|
|
4053
4053
|
}, C = {};
|
|
4054
|
-
for (const
|
|
4055
|
-
const { date: m, displayMonth: E } =
|
|
4054
|
+
for (const N of e) {
|
|
4055
|
+
const { date: m, displayMonth: E } = N, S = !!(E && !p(m, E)), x = !!(O && D(m, O)), k = !!(g && w(m, g)), $ = !!(a && Ee(m, a, o)), z = !!(i && Ee(m, i, o)) || x || k || // Broadcast calendar will show outside days as default
|
|
4056
4056
|
!c && !u && S || c && u === !1 && S, U = f(m, d);
|
|
4057
|
-
S && b.outside.push(
|
|
4057
|
+
S && b.outside.push(N), $ && b.disabled.push(N), z && b.hidden.push(N), U && b.today.push(N), s && Object.keys(s).forEach((T) => {
|
|
4058
4058
|
const j = s == null ? void 0 : s[T];
|
|
4059
|
-
j && Ee(m, j, o) && (C[T] ? C[T].push(
|
|
4059
|
+
j && Ee(m, j, o) && (C[T] ? C[T].push(N) : C[T] = [N]);
|
|
4060
4060
|
});
|
|
4061
4061
|
}
|
|
4062
|
-
return (
|
|
4062
|
+
return (N) => {
|
|
4063
4063
|
const m = {
|
|
4064
4064
|
[V.focused]: !1,
|
|
4065
4065
|
[V.disabled]: !1,
|
|
@@ -4069,10 +4069,10 @@ function Ol(e, t, n, r, o) {
|
|
|
4069
4069
|
}, E = {};
|
|
4070
4070
|
for (const S in b) {
|
|
4071
4071
|
const x = b[S];
|
|
4072
|
-
m[S] = x.some((k) => k ===
|
|
4072
|
+
m[S] = x.some((k) => k === N);
|
|
4073
4073
|
}
|
|
4074
4074
|
for (const S in C)
|
|
4075
|
-
E[S] = C[S].some((x) => x ===
|
|
4075
|
+
E[S] = C[S].some((x) => x === N);
|
|
4076
4076
|
return {
|
|
4077
4077
|
...m,
|
|
4078
4078
|
// custom modifiers should override all the previous ones
|
|
@@ -4083,13 +4083,13 @@ function Ol(e, t, n, r, o) {
|
|
|
4083
4083
|
function Cl(e, t, n = {}) {
|
|
4084
4084
|
return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [a]) => (n[a] ? o.push(n[a]) : t[V[a]] ? o.push(t[V[a]]) : t[le[a]] && o.push(t[le[a]]), o), [t[P.Day]]);
|
|
4085
4085
|
}
|
|
4086
|
-
function
|
|
4086
|
+
function Dl(e) {
|
|
4087
4087
|
return {
|
|
4088
4088
|
...El,
|
|
4089
4089
|
...e
|
|
4090
4090
|
};
|
|
4091
4091
|
}
|
|
4092
|
-
function
|
|
4092
|
+
function Nl(e) {
|
|
4093
4093
|
const t = {
|
|
4094
4094
|
"data-mode": e.mode ?? void 0,
|
|
4095
4095
|
"data-required": "required" in e ? e.required : void 0,
|
|
@@ -4151,55 +4151,55 @@ function Wl(e) {
|
|
|
4151
4151
|
...e
|
|
4152
4152
|
};
|
|
4153
4153
|
}
|
|
4154
|
-
function
|
|
4154
|
+
function Bo(e, t, n, r) {
|
|
4155
4155
|
let o = (r ?? new ae(n)).format(e, "PPPP");
|
|
4156
4156
|
return t.today && (o = `Today, ${o}`), t.selected && (o = `${o}, selected`), o;
|
|
4157
4157
|
}
|
|
4158
|
-
function
|
|
4158
|
+
function Lo(e, t, n) {
|
|
4159
4159
|
return (n ?? new ae(t)).formatMonthYear(e);
|
|
4160
4160
|
}
|
|
4161
|
-
function
|
|
4161
|
+
function Ho(e, t, n, r) {
|
|
4162
4162
|
let o = (r ?? new ae(n)).format(e, "PPPP");
|
|
4163
4163
|
return t != null && t.today && (o = `Today, ${o}`), o;
|
|
4164
4164
|
}
|
|
4165
|
-
function
|
|
4165
|
+
function Uo(e) {
|
|
4166
4166
|
return "Choose the Month";
|
|
4167
4167
|
}
|
|
4168
|
-
function
|
|
4168
|
+
function Vo() {
|
|
4169
4169
|
return "";
|
|
4170
4170
|
}
|
|
4171
4171
|
const Il = "Go to the Next Month";
|
|
4172
|
-
function
|
|
4172
|
+
function jo(e, t) {
|
|
4173
4173
|
return Il;
|
|
4174
4174
|
}
|
|
4175
|
-
function
|
|
4175
|
+
function qo(e) {
|
|
4176
4176
|
return "Go to the Previous Month";
|
|
4177
4177
|
}
|
|
4178
|
-
function
|
|
4178
|
+
function zo(e, t, n) {
|
|
4179
4179
|
return (n ?? new ae(t)).format(e, "cccc");
|
|
4180
4180
|
}
|
|
4181
4181
|
function Go(e, t) {
|
|
4182
4182
|
return `Week ${e}`;
|
|
4183
4183
|
}
|
|
4184
|
-
function
|
|
4184
|
+
function Ko(e) {
|
|
4185
4185
|
return "Week Number";
|
|
4186
4186
|
}
|
|
4187
|
-
function
|
|
4187
|
+
function Xo(e) {
|
|
4188
4188
|
return "Choose the Year";
|
|
4189
4189
|
}
|
|
4190
4190
|
const Fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4191
4191
|
__proto__: null,
|
|
4192
|
-
labelDayButton:
|
|
4193
|
-
labelGrid:
|
|
4194
|
-
labelGridcell:
|
|
4195
|
-
labelMonthDropdown:
|
|
4196
|
-
labelNav:
|
|
4197
|
-
labelNext:
|
|
4198
|
-
labelPrevious:
|
|
4192
|
+
labelDayButton: Bo,
|
|
4193
|
+
labelGrid: Lo,
|
|
4194
|
+
labelGridcell: Ho,
|
|
4195
|
+
labelMonthDropdown: Uo,
|
|
4196
|
+
labelNav: Vo,
|
|
4197
|
+
labelNext: jo,
|
|
4198
|
+
labelPrevious: qo,
|
|
4199
4199
|
labelWeekNumber: Go,
|
|
4200
|
-
labelWeekNumberHeader:
|
|
4201
|
-
labelWeekday:
|
|
4202
|
-
labelYearDropdown:
|
|
4200
|
+
labelWeekNumberHeader: Ko,
|
|
4201
|
+
labelWeekday: zo,
|
|
4202
|
+
labelYearDropdown: Xo
|
|
4203
4203
|
}, Symbol.toStringTag, { value: "Module" })), ue = (e, t, n) => t || (n ? typeof n == "function" ? n : (...r) => n : e);
|
|
4204
4204
|
function $l(e, t) {
|
|
4205
4205
|
var r;
|
|
@@ -4207,17 +4207,17 @@ function $l(e, t) {
|
|
|
4207
4207
|
return {
|
|
4208
4208
|
...Fl,
|
|
4209
4209
|
...e ?? {},
|
|
4210
|
-
labelDayButton: ue(
|
|
4211
|
-
labelMonthDropdown: ue(
|
|
4212
|
-
labelNext: ue(
|
|
4213
|
-
labelPrevious: ue(
|
|
4210
|
+
labelDayButton: ue(Bo, e == null ? void 0 : e.labelDayButton, n.labelDayButton),
|
|
4211
|
+
labelMonthDropdown: ue(Uo, e == null ? void 0 : e.labelMonthDropdown, n.labelMonthDropdown),
|
|
4212
|
+
labelNext: ue(jo, e == null ? void 0 : e.labelNext, n.labelNext),
|
|
4213
|
+
labelPrevious: ue(qo, e == null ? void 0 : e.labelPrevious, n.labelPrevious),
|
|
4214
4214
|
labelWeekNumber: ue(Go, e == null ? void 0 : e.labelWeekNumber, n.labelWeekNumber),
|
|
4215
|
-
labelYearDropdown: ue(
|
|
4216
|
-
labelGrid: ue(
|
|
4217
|
-
labelGridcell: ue(
|
|
4218
|
-
labelNav: ue(
|
|
4219
|
-
labelWeekNumberHeader: ue(
|
|
4220
|
-
labelWeekday: ue(
|
|
4215
|
+
labelYearDropdown: ue(Xo, e == null ? void 0 : e.labelYearDropdown, n.labelYearDropdown),
|
|
4216
|
+
labelGrid: ue(Lo, e == null ? void 0 : e.labelGrid, n.labelGrid),
|
|
4217
|
+
labelGridcell: ue(Ho, e == null ? void 0 : e.labelGridcell, n.labelGridcell),
|
|
4218
|
+
labelNav: ue(Vo, e == null ? void 0 : e.labelNav, n.labelNav),
|
|
4219
|
+
labelWeekNumberHeader: ue(Ko, e == null ? void 0 : e.labelWeekNumberHeader, n.labelWeekNumberHeader),
|
|
4220
|
+
labelWeekday: ue(zo, e == null ? void 0 : e.labelWeekday, n.labelWeekday)
|
|
4221
4221
|
};
|
|
4222
4222
|
}
|
|
4223
4223
|
function Yl(e, t, n, r, o) {
|
|
@@ -4226,8 +4226,8 @@ function Yl(e, t, n, r, o) {
|
|
|
4226
4226
|
start: i(e),
|
|
4227
4227
|
end: s(e)
|
|
4228
4228
|
}).map((p) => {
|
|
4229
|
-
const v = r.formatMonthDropdown(p, o),
|
|
4230
|
-
return { value:
|
|
4229
|
+
const v = r.formatMonthDropdown(p, o), D = c(p), h = t && p < a(t) || n && p > a(n) || !1;
|
|
4230
|
+
return { value: D, label: v, disabled: h };
|
|
4231
4231
|
});
|
|
4232
4232
|
}
|
|
4233
4233
|
function Bl(e, t = {}, n = {}) {
|
|
@@ -4353,7 +4353,7 @@ function Ul(e, t = {}) {
|
|
|
4353
4353
|
},
|
|
4354
4354
|
differenceInCalendarMonths: (u, c) => {
|
|
4355
4355
|
const d = i(u), f = i(c);
|
|
4356
|
-
return
|
|
4356
|
+
return So(d, f);
|
|
4357
4357
|
}
|
|
4358
4358
|
};
|
|
4359
4359
|
}
|
|
@@ -4368,26 +4368,26 @@ function zl(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
|
|
|
4368
4368
|
!(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
|
|
4369
4369
|
r.length === 0 || c.length === 0 || r.length !== c.length)
|
|
4370
4370
|
return;
|
|
4371
|
-
const d = a.isSameMonth(r[0].date, c[0].date), f = a.isAfter(r[0].date, c[0].date), p = f ? n[oe.caption_after_enter] : n[oe.caption_before_enter], v = f ? n[oe.weeks_after_enter] : n[oe.weeks_before_enter],
|
|
4371
|
+
const d = a.isSameMonth(r[0].date, c[0].date), f = a.isAfter(r[0].date, c[0].date), p = f ? n[oe.caption_after_enter] : n[oe.caption_before_enter], v = f ? n[oe.weeks_after_enter] : n[oe.weeks_before_enter], D = i.current, h = e.current.cloneNode(!0);
|
|
4372
4372
|
if (h instanceof HTMLElement ? (Ut(h).forEach((b) => {
|
|
4373
4373
|
if (!(b instanceof HTMLElement))
|
|
4374
4374
|
return;
|
|
4375
4375
|
const C = Vl(b);
|
|
4376
4376
|
C && b.contains(C) && b.removeChild(C);
|
|
4377
|
-
const
|
|
4378
|
-
|
|
4377
|
+
const N = Vt(b);
|
|
4378
|
+
N && N.classList.remove(p);
|
|
4379
4379
|
const m = jt(b);
|
|
4380
4380
|
m && m.classList.remove(v);
|
|
4381
4381
|
}), i.current = h) : i.current = null, u.current || d || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
4382
4382
|
o)
|
|
4383
4383
|
return;
|
|
4384
|
-
const w =
|
|
4384
|
+
const w = D instanceof HTMLElement ? Ut(D) : [], O = Ut(e.current);
|
|
4385
4385
|
if (O != null && O.every((g) => g instanceof HTMLElement) && (w != null && w.every((g) => g instanceof HTMLElement))) {
|
|
4386
4386
|
u.current = !0, e.current.style.isolation = "isolate";
|
|
4387
4387
|
const g = jl(e.current);
|
|
4388
4388
|
g && (g.style.zIndex = "1"), O.forEach((b, C) => {
|
|
4389
|
-
const
|
|
4390
|
-
if (!
|
|
4389
|
+
const N = w[C];
|
|
4390
|
+
if (!N)
|
|
4391
4391
|
return;
|
|
4392
4392
|
b.style.position = "relative", b.style.overflow = "hidden";
|
|
4393
4393
|
const m = Vt(b);
|
|
@@ -4395,21 +4395,21 @@ function zl(e, t, { classNames: n, months: r, focused: o, dateLib: a }) {
|
|
|
4395
4395
|
const E = jt(b);
|
|
4396
4396
|
E && E.classList.add(v);
|
|
4397
4397
|
const S = () => {
|
|
4398
|
-
u.current = !1, e.current && (e.current.style.isolation = ""), g && (g.style.zIndex = ""), m && m.classList.remove(p), E && E.classList.remove(v), b.style.position = "", b.style.overflow = "", b.contains(
|
|
4398
|
+
u.current = !1, e.current && (e.current.style.isolation = ""), g && (g.style.zIndex = ""), m && m.classList.remove(p), E && E.classList.remove(v), b.style.position = "", b.style.overflow = "", b.contains(N) && b.removeChild(N);
|
|
4399
4399
|
};
|
|
4400
|
-
|
|
4401
|
-
const x = ql(
|
|
4400
|
+
N.style.pointerEvents = "none", N.style.position = "absolute", N.style.overflow = "hidden", N.setAttribute("aria-hidden", "true");
|
|
4401
|
+
const x = ql(N);
|
|
4402
4402
|
x && (x.style.opacity = "0");
|
|
4403
|
-
const k = Vt(
|
|
4403
|
+
const k = Vt(N);
|
|
4404
4404
|
k && (k.classList.add(f ? n[oe.caption_before_exit] : n[oe.caption_after_exit]), k.addEventListener("animationend", S));
|
|
4405
|
-
const $ = jt(
|
|
4406
|
-
$ && $.classList.add(f ? n[oe.weeks_before_exit] : n[oe.weeks_after_exit]), b.insertBefore(
|
|
4405
|
+
const $ = jt(N);
|
|
4406
|
+
$ && $.classList.add(f ? n[oe.weeks_before_exit] : n[oe.weeks_after_exit]), b.insertBefore(N, b.firstChild);
|
|
4407
4407
|
});
|
|
4408
4408
|
}
|
|
4409
4409
|
});
|
|
4410
4410
|
}
|
|
4411
|
-
function
|
|
4412
|
-
const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: u } = n ?? {}, { addDays: c, differenceInCalendarDays: d, differenceInCalendarMonths: f, endOfBroadcastWeek: p, endOfISOWeek: v, endOfMonth:
|
|
4411
|
+
function Gl(e, t, n, r) {
|
|
4412
|
+
const o = e[0], a = e[e.length - 1], { ISOWeek: i, fixedWeeks: s, broadcastCalendar: u } = n ?? {}, { addDays: c, differenceInCalendarDays: d, differenceInCalendarMonths: f, endOfBroadcastWeek: p, endOfISOWeek: v, endOfMonth: D, endOfWeek: h, isAfter: w, startOfBroadcastWeek: O, startOfISOWeek: g, startOfWeek: b } = r, C = u ? O(o, r) : i ? g(o) : b(o), N = u ? p(a) : i ? v(D(a)) : h(D(a)), m = t && (u ? p(t) : i ? v(t) : h(t)), E = m && w(N, m) ? m : N, S = d(E, C), x = f(a, o) + 1, k = [];
|
|
4413
4413
|
for (let U = 0; U <= S; U++) {
|
|
4414
4414
|
const T = c(C, U);
|
|
4415
4415
|
k.push(T);
|
|
@@ -4424,7 +4424,7 @@ function Kl(e, t, n, r) {
|
|
|
4424
4424
|
}
|
|
4425
4425
|
return k;
|
|
4426
4426
|
}
|
|
4427
|
-
function
|
|
4427
|
+
function Kl(e) {
|
|
4428
4428
|
const t = [];
|
|
4429
4429
|
return e.reduce((n, r) => {
|
|
4430
4430
|
const o = r.weeks.reduce((a, i) => a.concat(i.days.slice()), t.slice());
|
|
@@ -4452,7 +4452,7 @@ function Xn(e, t, n, r) {
|
|
|
4452
4452
|
return t && c(u, t) < 0 && (u = t), f(u);
|
|
4453
4453
|
}
|
|
4454
4454
|
function Ql(e, t, n, r) {
|
|
4455
|
-
const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: u, getISOWeek: c, getWeek: d, startOfBroadcastWeek: f, startOfISOWeek: p, startOfWeek: v } = r,
|
|
4455
|
+
const { addDays: o, endOfBroadcastWeek: a, endOfISOWeek: i, endOfMonth: s, endOfWeek: u, getISOWeek: c, getWeek: d, startOfBroadcastWeek: f, startOfISOWeek: p, startOfWeek: v } = r, D = e.reduce((h, w) => {
|
|
4456
4456
|
const O = n.broadcastCalendar ? f(w, r) : n.ISOWeek ? p(w) : v(w), g = n.broadcastCalendar ? a(w) : n.ISOWeek ? i(s(w)) : u(s(w)), b = t.filter((E) => E >= O && E <= g), C = n.broadcastCalendar ? 35 : 42;
|
|
4457
4457
|
if (n.fixedWeeks && b.length < C) {
|
|
4458
4458
|
const E = t.filter((S) => {
|
|
@@ -4461,13 +4461,13 @@ function Ql(e, t, n, r) {
|
|
|
4461
4461
|
});
|
|
4462
4462
|
b.push(...E);
|
|
4463
4463
|
}
|
|
4464
|
-
const
|
|
4465
|
-
const x = n.ISOWeek ? c(S) : d(S), k = E.find((z) => z.weekNumber === x), $ = new
|
|
4466
|
-
return k ? k.days.push($) : E.push(new
|
|
4467
|
-
}, []), m = new
|
|
4464
|
+
const N = b.reduce((E, S) => {
|
|
4465
|
+
const x = n.ISOWeek ? c(S) : d(S), k = E.find((z) => z.weekNumber === x), $ = new Io(S, w, r);
|
|
4466
|
+
return k ? k.days.push($) : E.push(new Ku(x, [$])), E;
|
|
4467
|
+
}, []), m = new Gu(w, N);
|
|
4468
4468
|
return h.push(m), h;
|
|
4469
4469
|
}, []);
|
|
4470
|
-
return n.reverseMonths ?
|
|
4470
|
+
return n.reverseMonths ? D.reverse() : D;
|
|
4471
4471
|
}
|
|
4472
4472
|
function Zl(e, t) {
|
|
4473
4473
|
let { startMonth: n, endMonth: r } = e;
|
|
@@ -4500,7 +4500,7 @@ function td(e) {
|
|
|
4500
4500
|
return e.reduce((n, r) => n.concat(r.weeks.slice()), t.slice());
|
|
4501
4501
|
}
|
|
4502
4502
|
function St(e, t) {
|
|
4503
|
-
const [n, r] =
|
|
4503
|
+
const [n, r] = Kt(e);
|
|
4504
4504
|
return [t === void 0 ? n : t, r];
|
|
4505
4505
|
}
|
|
4506
4506
|
function nd(e, t) {
|
|
@@ -4510,21 +4510,21 @@ function nd(e, t) {
|
|
|
4510
4510
|
// initialMonth is always computed from props.month if provided
|
|
4511
4511
|
e.month ? i : void 0
|
|
4512
4512
|
);
|
|
4513
|
-
|
|
4514
|
-
const
|
|
4515
|
-
u(
|
|
4513
|
+
Ka(() => {
|
|
4514
|
+
const N = Xn(e, n, r, t);
|
|
4515
|
+
u(N);
|
|
4516
4516
|
}, [e.timeZone]);
|
|
4517
4517
|
const { months: c, weeks: d, days: f, previousMonth: p, nextMonth: v } = ht(() => {
|
|
4518
|
-
const
|
|
4518
|
+
const N = Xl(s, r, { numberOfMonths: e.numberOfMonths }, t), m = Gl(N, e.endMonth ? a(e.endMonth) : void 0, {
|
|
4519
4519
|
ISOWeek: e.ISOWeek,
|
|
4520
4520
|
fixedWeeks: e.fixedWeeks,
|
|
4521
4521
|
broadcastCalendar: e.broadcastCalendar
|
|
4522
|
-
}, t), E = Ql(
|
|
4522
|
+
}, t), E = Ql(N, m, {
|
|
4523
4523
|
broadcastCalendar: e.broadcastCalendar,
|
|
4524
4524
|
fixedWeeks: e.fixedWeeks,
|
|
4525
4525
|
ISOWeek: e.ISOWeek,
|
|
4526
4526
|
reverseMonths: e.reverseMonths
|
|
4527
|
-
}, t), S = td(E), x =
|
|
4527
|
+
}, t), S = td(E), x = Kl(E), k = ed(s, n, e, t), $ = Jl(s, r, e, t);
|
|
4528
4528
|
return {
|
|
4529
4529
|
months: E,
|
|
4530
4530
|
weeks: S,
|
|
@@ -4545,10 +4545,10 @@ function nd(e, t) {
|
|
|
4545
4545
|
e.numberOfMonths,
|
|
4546
4546
|
e.pagedNavigation,
|
|
4547
4547
|
e.reverseMonths
|
|
4548
|
-
]), { disableNavigation:
|
|
4549
|
-
if (
|
|
4548
|
+
]), { disableNavigation: D, onMonthChange: h } = e, w = (N) => d.some((m) => m.days.some((E) => E.isEqualTo(N))), O = (N) => {
|
|
4549
|
+
if (D)
|
|
4550
4550
|
return;
|
|
4551
|
-
let m = o(
|
|
4551
|
+
let m = o(N);
|
|
4552
4552
|
n && m < o(n) && (m = o(n)), r && m > o(r) && (m = o(r)), u(m), h == null || h(m);
|
|
4553
4553
|
};
|
|
4554
4554
|
return {
|
|
@@ -4560,8 +4560,8 @@ function nd(e, t) {
|
|
|
4560
4560
|
previousMonth: p,
|
|
4561
4561
|
nextMonth: v,
|
|
4562
4562
|
goToMonth: O,
|
|
4563
|
-
goToDay: (
|
|
4564
|
-
w(
|
|
4563
|
+
goToDay: (N) => {
|
|
4564
|
+
w(N) || O(N.date);
|
|
4565
4565
|
}
|
|
4566
4566
|
};
|
|
4567
4567
|
}
|
|
@@ -4581,25 +4581,25 @@ function rd(e, t, n, r) {
|
|
|
4581
4581
|
return o || (o = e.find((i) => Qn(t(i)))), o;
|
|
4582
4582
|
}
|
|
4583
4583
|
function od(e, t, n, r, o, a, i) {
|
|
4584
|
-
const { ISOWeek: s, broadcastCalendar: u } = a, { addDays: c, addMonths: d, addWeeks: f, addYears: p, endOfBroadcastWeek: v, endOfISOWeek:
|
|
4584
|
+
const { ISOWeek: s, broadcastCalendar: u } = a, { addDays: c, addMonths: d, addWeeks: f, addYears: p, endOfBroadcastWeek: v, endOfISOWeek: D, endOfWeek: h, max: w, min: O, startOfBroadcastWeek: g, startOfISOWeek: b, startOfWeek: C } = i;
|
|
4585
4585
|
let m = {
|
|
4586
4586
|
day: c,
|
|
4587
4587
|
week: f,
|
|
4588
4588
|
month: d,
|
|
4589
4589
|
year: p,
|
|
4590
4590
|
startOfWeek: (E) => u ? g(E, i) : s ? b(E) : C(E),
|
|
4591
|
-
endOfWeek: (E) => u ? v(E) : s ?
|
|
4591
|
+
endOfWeek: (E) => u ? v(E) : s ? D(E) : h(E)
|
|
4592
4592
|
}[e](n, t === "after" ? 1 : -1);
|
|
4593
4593
|
return t === "before" && r ? m = w([r, m]) : t === "after" && o && (m = O([o, m])), m;
|
|
4594
4594
|
}
|
|
4595
|
-
function
|
|
4595
|
+
function Qo(e, t, n, r, o, a, i, s = 0) {
|
|
4596
4596
|
if (s > 365)
|
|
4597
4597
|
return;
|
|
4598
|
-
const u = od(e, t, n.date, r, o, a, i), c = !!(a.disabled && Ee(u, a.disabled, i)), d = !!(a.hidden && Ee(u, a.hidden, i)), f = u, p = new
|
|
4599
|
-
return !c && !d ? p :
|
|
4598
|
+
const u = od(e, t, n.date, r, o, a, i), c = !!(a.disabled && Ee(u, a.disabled, i)), d = !!(a.hidden && Ee(u, a.hidden, i)), f = u, p = new Io(u, f, i);
|
|
4599
|
+
return !c && !d ? p : Qo(e, t, p, r, o, a, i, s + 1);
|
|
4600
4600
|
}
|
|
4601
4601
|
function ad(e, t, n, r, o) {
|
|
4602
|
-
const { autoFocus: a } = e, [i, s] =
|
|
4602
|
+
const { autoFocus: a } = e, [i, s] = Kt(), u = rd(t.days, n, r || (() => !1), i), [c, d] = Kt(a ? u : void 0);
|
|
4603
4603
|
return {
|
|
4604
4604
|
isFocusTarget: (h) => !!(u != null && u.isEqualTo(h)),
|
|
4605
4605
|
setFocused: d,
|
|
@@ -4610,16 +4610,16 @@ function ad(e, t, n, r, o) {
|
|
|
4610
4610
|
moveFocus: (h, w) => {
|
|
4611
4611
|
if (!c)
|
|
4612
4612
|
return;
|
|
4613
|
-
const O =
|
|
4613
|
+
const O = Qo(h, w, c, t.navStart, t.navEnd, e, o);
|
|
4614
4614
|
O && (e.disableNavigation && !t.days.some((b) => b.isEqualTo(O)) || (t.goToDay(O), d(O)));
|
|
4615
4615
|
}
|
|
4616
4616
|
};
|
|
4617
4617
|
}
|
|
4618
4618
|
function sd(e, t) {
|
|
4619
|
-
const { selected: n, required: r, onSelect: o } = e, [a, i] = St(n, o ? n : void 0), s = o ? n : a, { isSameDay: u } = t, c = (v) => (s == null ? void 0 : s.some((
|
|
4619
|
+
const { selected: n, required: r, onSelect: o } = e, [a, i] = St(n, o ? n : void 0), s = o ? n : a, { isSameDay: u } = t, c = (v) => (s == null ? void 0 : s.some((D) => u(D, v))) ?? !1, { min: d, max: f } = e;
|
|
4620
4620
|
return {
|
|
4621
4621
|
selected: s,
|
|
4622
|
-
select: (v,
|
|
4622
|
+
select: (v, D, h) => {
|
|
4623
4623
|
let w = [...s ?? []];
|
|
4624
4624
|
if (c(v)) {
|
|
4625
4625
|
if ((s == null ? void 0 : s.length) === d || r && (s == null ? void 0 : s.length) === 1)
|
|
@@ -4627,7 +4627,7 @@ function sd(e, t) {
|
|
|
4627
4627
|
w = s == null ? void 0 : s.filter((O) => !u(O, v));
|
|
4628
4628
|
} else
|
|
4629
4629
|
(s == null ? void 0 : s.length) === f ? w = [v] : w = [...w, v];
|
|
4630
|
-
return o || i(w), o == null || o(w, v,
|
|
4630
|
+
return o || i(w), o == null || o(w, v, D, h), w;
|
|
4631
4631
|
},
|
|
4632
4632
|
isSelected: c
|
|
4633
4633
|
};
|
|
@@ -4676,7 +4676,7 @@ function Zn(e, t, n = ye) {
|
|
|
4676
4676
|
}
|
|
4677
4677
|
function ud(e, t, n = ye) {
|
|
4678
4678
|
const r = Array.isArray(t) ? t : [t];
|
|
4679
|
-
if (r.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : n.isDate(s) ? we(e, s, !1, n) :
|
|
4679
|
+
if (r.filter((s) => typeof s != "function").some((s) => typeof s == "boolean" ? s : n.isDate(s) ? we(e, s, !1, n) : Yo(s, n) ? s.some((u) => we(e, u, !1, n)) : Pt(s) ? s.from && s.to ? Zn(e, { from: s.from, to: s.to }, n) : !1 : $o(s) ? cd(e, s.dayOfWeek, n) : wn(s) ? n.isAfter(s.before, s.after) ? Zn(e, {
|
|
4680
4680
|
from: n.addDays(s.after, 1),
|
|
4681
4681
|
to: n.addDays(s.before, -1)
|
|
4682
4682
|
}, n) : Ee(e.from, s, n) || Ee(e.to, s, n) : En(s) || On(s) ? Ee(e.from, s, n) || Ee(e.to, s, n) : !1))
|
|
@@ -4697,14 +4697,14 @@ function ld(e, t) {
|
|
|
4697
4697
|
const { disabled: n, excludeDisabled: r, resetOnSelect: o, selected: a, required: i, onSelect: s } = e, [u, c] = St(a, s ? a : void 0), d = s ? a : u;
|
|
4698
4698
|
return {
|
|
4699
4699
|
selected: d,
|
|
4700
|
-
select: (v,
|
|
4700
|
+
select: (v, D, h) => {
|
|
4701
4701
|
const { min: w, max: O } = e;
|
|
4702
4702
|
let g;
|
|
4703
4703
|
if (v) {
|
|
4704
|
-
const b = d == null ? void 0 : d.from, C = d == null ? void 0 : d.to,
|
|
4705
|
-
o && (
|
|
4704
|
+
const b = d == null ? void 0 : d.from, C = d == null ? void 0 : d.to, N = !!b && !!C, m = !!b && !!C && t.isSameDay(b, C) && t.isSameDay(v, b);
|
|
4705
|
+
o && (N || !(d != null && d.from)) ? !i && m ? g = void 0 : g = { from: v, to: void 0 } : g = id(v, d, w, O, i, t);
|
|
4706
4706
|
}
|
|
4707
|
-
return r && n && (g != null && g.from) && g.to && ud({ from: g.from, to: g.to }, n, t) && (g.from = v, g.to = void 0), s || c(g), s == null || s(g, v,
|
|
4707
|
+
return r && n && (g != null && g.from) && g.to && ud({ from: g.from, to: g.to }, n, t) && (g.from = v, g.to = void 0), s || c(g), s == null || s(g, v, D, h), g;
|
|
4708
4708
|
},
|
|
4709
4709
|
isSelected: (v) => d && we(d, v, !1, t)
|
|
4710
4710
|
};
|
|
@@ -4714,8 +4714,8 @@ function dd(e, t) {
|
|
|
4714
4714
|
return {
|
|
4715
4715
|
selected: s,
|
|
4716
4716
|
select: (f, p, v) => {
|
|
4717
|
-
let
|
|
4718
|
-
return !r && s && s && u(f, s) && (
|
|
4717
|
+
let D = f;
|
|
4718
|
+
return !r && s && s && u(f, s) && (D = void 0), o || i(D), o == null || o(D, f, p, v), D;
|
|
4719
4719
|
},
|
|
4720
4720
|
isSelected: (f) => s ? u(s, f) : !1
|
|
4721
4721
|
};
|
|
@@ -4774,7 +4774,7 @@ function md(e) {
|
|
|
4774
4774
|
}), t.modifiers = R;
|
|
4775
4775
|
}
|
|
4776
4776
|
const { components: r, formatters: o, labels: a, dateLib: i, locale: s, classNames: u } = ht(() => {
|
|
4777
|
-
const R = { ...
|
|
4777
|
+
const R = { ...Wo, ...t.locale }, _ = t.broadcastCalendar ? 1 : t.weekStartsOn, A = t.noonSafe && t.timeZone ? Ul(t.timeZone, {
|
|
4778
4778
|
weekStartsOn: _,
|
|
4779
4779
|
locale: R
|
|
4780
4780
|
}) : void 0, q = t.dateLib && A ? { ...A, ...t.dateLib } : t.dateLib ?? A, I = new ae({
|
|
@@ -4788,7 +4788,7 @@ function md(e) {
|
|
|
4788
4788
|
}, q);
|
|
4789
4789
|
return {
|
|
4790
4790
|
dateLib: I,
|
|
4791
|
-
components:
|
|
4791
|
+
components: Dl(t.components),
|
|
4792
4792
|
formatters: Wl(t.formatters),
|
|
4793
4793
|
labels: $l(t.labels, I.options),
|
|
4794
4794
|
locale: R,
|
|
@@ -4811,17 +4811,17 @@ function md(e) {
|
|
|
4811
4811
|
t.classNames
|
|
4812
4812
|
]);
|
|
4813
4813
|
t.today || (t = { ...t, today: i.today() });
|
|
4814
|
-
const { captionLayout: c, mode: d, navLayout: f, numberOfMonths: p = 1, onDayBlur: v, onDayClick:
|
|
4815
|
-
|
|
4816
|
-
}, [
|
|
4814
|
+
const { captionLayout: c, mode: d, navLayout: f, numberOfMonths: p = 1, onDayBlur: v, onDayClick: D, onDayFocus: h, onDayKeyDown: w, onDayMouseEnter: O, onDayMouseLeave: g, onNextClick: b, onPrevClick: C, showWeekNumber: N, styles: m } = t, { formatCaption: E, formatDay: S, formatMonthDropdown: x, formatWeekNumber: k, formatWeekNumberHeader: $, formatWeekdayName: z, formatYearDropdown: U } = o, T = nd(t, i), { days: j, months: X, navStart: ne, navEnd: Q, previousMonth: K, nextMonth: ee, goToMonth: Z } = T, ge = Ol(j, t, ne, Q, i), { isSelected: se, select: fe, selected: We } = fd(t, i) ?? {}, { blur: nt, focused: ke, isFocusTarget: rt, moveFocus: Ve, setFocused: xe } = ad(t, T, ge, se ?? (() => !1), i), { labelDayButton: ot, labelGridcell: at, labelGrid: Re, labelMonthDropdown: st, labelNav: it, labelPrevious: kt, labelNext: xt, labelWeekday: Rt, labelWeekNumber: Ie, labelWeekNumberHeader: Sa, labelYearDropdown: Ta } = a, ka = ht(() => Ll(i, t.ISOWeek, t.broadcastCalendar, t.today), [i, t.ISOWeek, t.broadcastCalendar, t.today]), Pn = d !== void 0 || D !== void 0, At = ie(() => {
|
|
4815
|
+
K && (Z(K), C == null || C(K));
|
|
4816
|
+
}, [K, Z, C]), _t = ie(() => {
|
|
4817
4817
|
ee && (Z(ee), b == null || b(ee));
|
|
4818
|
-
}, [Z, ee, b]),
|
|
4819
|
-
A.preventDefault(), A.stopPropagation(), xe(R), !_.disabled && (fe == null || fe(R.date, _, A),
|
|
4820
|
-
}, [fe,
|
|
4818
|
+
}, [Z, ee, b]), xa = ie((R, _) => (A) => {
|
|
4819
|
+
A.preventDefault(), A.stopPropagation(), xe(R), !_.disabled && (fe == null || fe(R.date, _, A), D == null || D(R.date, _, A));
|
|
4820
|
+
}, [fe, D, xe]), Ra = ie((R, _) => (A) => {
|
|
4821
4821
|
xe(R), h == null || h(R.date, _, A);
|
|
4822
|
-
}, [h, xe]),
|
|
4822
|
+
}, [h, xe]), Aa = ie((R, _) => (A) => {
|
|
4823
4823
|
nt(), v == null || v(R.date, _, A);
|
|
4824
|
-
}, [nt, v]),
|
|
4824
|
+
}, [nt, v]), _a = ie((R, _) => (A) => {
|
|
4825
4825
|
const q = {
|
|
4826
4826
|
ArrowLeft: [
|
|
4827
4827
|
A.shiftKey ? "month" : "day",
|
|
@@ -4844,20 +4844,20 @@ function md(e) {
|
|
|
4844
4844
|
Ve(I, me);
|
|
4845
4845
|
}
|
|
4846
4846
|
w == null || w(R.date, _, A);
|
|
4847
|
-
}, [Ve, w, t.dir]),
|
|
4847
|
+
}, [Ve, w, t.dir]), Wa = ie((R, _) => (A) => {
|
|
4848
4848
|
O == null || O(R.date, _, A);
|
|
4849
|
-
}, [O]),
|
|
4849
|
+
}, [O]), Ia = ie((R, _) => (A) => {
|
|
4850
4850
|
g == null || g(R.date, _, A);
|
|
4851
|
-
}, [g]),
|
|
4851
|
+
}, [g]), Fa = ie((R, _) => (A) => {
|
|
4852
4852
|
const q = Number(A.target.value), I = i.setMonth(i.startOfMonth(R), q);
|
|
4853
4853
|
Z(i.addMonths(I, -_));
|
|
4854
|
-
}, [i, Z]),
|
|
4854
|
+
}, [i, Z]), $a = ie((R, _) => (A) => {
|
|
4855
4855
|
const q = Number(A.target.value), I = i.setYear(i.startOfMonth(R), q);
|
|
4856
4856
|
Z(i.addMonths(I, -_));
|
|
4857
|
-
}, [i, Z]), { className:
|
|
4857
|
+
}, [i, Z]), { className: Ya, style: Ba } = ht(() => ({
|
|
4858
4858
|
className: [u[P.Root], t.className].filter(Boolean).join(" "),
|
|
4859
4859
|
style: { ...m == null ? void 0 : m[P.Root], ...t.style }
|
|
4860
|
-
}), [u, t.className, t.style, m]),
|
|
4860
|
+
}), [u, t.className, t.style, m]), La = Nl(t), Sn = (R) => {
|
|
4861
4861
|
const _ = m == null ? void 0 : m[P.Dropdown], A = m == null ? void 0 : m[R];
|
|
4862
4862
|
if (!(!_ && !A))
|
|
4863
4863
|
return {
|
|
@@ -4871,14 +4871,14 @@ function md(e) {
|
|
|
4871
4871
|
focused: ke,
|
|
4872
4872
|
dateLib: i
|
|
4873
4873
|
});
|
|
4874
|
-
const
|
|
4874
|
+
const Ha = {
|
|
4875
4875
|
dayPickerProps: t,
|
|
4876
4876
|
selected: We,
|
|
4877
4877
|
select: fe,
|
|
4878
4878
|
isSelected: se,
|
|
4879
4879
|
months: X,
|
|
4880
4880
|
nextMonth: ee,
|
|
4881
|
-
previousMonth:
|
|
4881
|
+
previousMonth: K,
|
|
4882
4882
|
goToMonth: Z,
|
|
4883
4883
|
getModifiers: ge,
|
|
4884
4884
|
components: r,
|
|
@@ -4888,15 +4888,15 @@ function md(e) {
|
|
|
4888
4888
|
formatters: o
|
|
4889
4889
|
};
|
|
4890
4890
|
return M.createElement(
|
|
4891
|
-
|
|
4892
|
-
{ value:
|
|
4891
|
+
Fo.Provider,
|
|
4892
|
+
{ value: Ha },
|
|
4893
4893
|
M.createElement(
|
|
4894
4894
|
r.Root,
|
|
4895
|
-
{ rootRef: t.animate ? Tn : void 0, className:
|
|
4895
|
+
{ rootRef: t.animate ? Tn : void 0, className: Ya, style: Ba, dir: t.dir, id: t.id, lang: t.lang ?? s.code, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...La },
|
|
4896
4896
|
M.createElement(
|
|
4897
4897
|
r.Months,
|
|
4898
4898
|
{ className: u[P.Months], style: m == null ? void 0 : m[P.Months] },
|
|
4899
|
-
!t.hideNavigation && !f && M.createElement(r.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: u[P.Nav], style: m == null ? void 0 : m[P.Nav], "aria-label": it(), onPreviousClick: At, onNextClick: _t, previousMonth:
|
|
4899
|
+
!t.hideNavigation && !f && M.createElement(r.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: u[P.Nav], style: m == null ? void 0 : m[P.Nav], "aria-label": it(), onPreviousClick: At, onNextClick: _t, previousMonth: K, nextMonth: ee }),
|
|
4900
4900
|
X.map((R, _) => {
|
|
4901
4901
|
const A = t.reverseMonths ? X.length - 1 - _ : _;
|
|
4902
4902
|
return M.createElement(
|
|
@@ -4912,14 +4912,14 @@ function md(e) {
|
|
|
4912
4912
|
},
|
|
4913
4913
|
f === "around" && !t.hideNavigation && _ === 0 && M.createElement(
|
|
4914
4914
|
r.PreviousMonthButton,
|
|
4915
|
-
{ type: "button", className: u[P.PreviousMonthButton], style: m == null ? void 0 : m[P.PreviousMonthButton], tabIndex:
|
|
4916
|
-
M.createElement(r.Chevron, { disabled:
|
|
4915
|
+
{ type: "button", className: u[P.PreviousMonthButton], style: m == null ? void 0 : m[P.PreviousMonthButton], tabIndex: K ? void 0 : -1, "aria-disabled": K ? void 0 : !0, "aria-label": kt(K), onClick: At, "data-animated-button": t.animate ? "true" : void 0 },
|
|
4916
|
+
M.createElement(r.Chevron, { disabled: K ? void 0 : !0, className: u[P.Chevron], style: m == null ? void 0 : m[P.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
|
|
4917
4917
|
),
|
|
4918
4918
|
M.createElement(r.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: u[P.MonthCaption], style: m == null ? void 0 : m[P.MonthCaption], calendarMonth: R, displayIndex: _ }, c != null && c.startsWith("dropdown") ? M.createElement(
|
|
4919
4919
|
r.DropdownNav,
|
|
4920
4920
|
{ className: u[P.Dropdowns], style: m == null ? void 0 : m[P.Dropdowns] },
|
|
4921
4921
|
(() => {
|
|
4922
|
-
const q = c === "dropdown" || c === "dropdown-months" ? M.createElement(r.MonthsDropdown, { key: "month", className: u[P.MonthsDropdown], "aria-label": st(), disabled: !!t.disableNavigation, onChange:
|
|
4922
|
+
const q = c === "dropdown" || c === "dropdown-months" ? M.createElement(r.MonthsDropdown, { key: "month", className: u[P.MonthsDropdown], "aria-label": st(), disabled: !!t.disableNavigation, onChange: Fa(R.date, A), options: Yl(R.date, ne, Q, o, i), style: Sn(P.MonthsDropdown), value: i.getMonth(R.date) }) : M.createElement("span", { key: "month" }, x(R.date, i)), I = c === "dropdown" || c === "dropdown-years" ? M.createElement(r.YearsDropdown, { key: "year", className: u[P.YearsDropdown], "aria-label": Ta(i.options), disabled: !!t.disableNavigation, onChange: $a(R.date, A), options: Hl(ne, Q, o, i, !!t.reverseYears), style: Sn(P.YearsDropdown), value: i.getYear(R.date) }) : M.createElement("span", { key: "year" }, U(R.date, i));
|
|
4923
4923
|
return i.getMonthYearOrder() === "year-first" ? [I, q] : [q, I];
|
|
4924
4924
|
})(),
|
|
4925
4925
|
M.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
@@ -4940,20 +4940,20 @@ function md(e) {
|
|
|
4940
4940
|
{ type: "button", className: u[P.NextMonthButton], style: m == null ? void 0 : m[P.NextMonthButton], tabIndex: ee ? void 0 : -1, "aria-disabled": ee ? void 0 : !0, "aria-label": xt(ee), onClick: _t, "data-animated-button": t.animate ? "true" : void 0 },
|
|
4941
4941
|
M.createElement(r.Chevron, { disabled: ee ? void 0 : !0, className: u[P.Chevron], style: m == null ? void 0 : m[P.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
|
|
4942
4942
|
),
|
|
4943
|
-
_ === p - 1 && f === "after" && !t.hideNavigation && M.createElement(r.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: u[P.Nav], style: m == null ? void 0 : m[P.Nav], "aria-label": it(), onPreviousClick: At, onNextClick: _t, previousMonth:
|
|
4943
|
+
_ === p - 1 && f === "after" && !t.hideNavigation && M.createElement(r.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: u[P.Nav], style: m == null ? void 0 : m[P.Nav], "aria-label": it(), onPreviousClick: At, onNextClick: _t, previousMonth: K, nextMonth: ee }),
|
|
4944
4944
|
M.createElement(
|
|
4945
4945
|
r.MonthGrid,
|
|
4946
4946
|
{ role: "grid", "aria-multiselectable": d === "multiple" || d === "range", "aria-label": Re(R.date, i.options, i) || void 0, className: u[P.MonthGrid], style: m == null ? void 0 : m[P.MonthGrid] },
|
|
4947
4947
|
!t.hideWeekdays && M.createElement(
|
|
4948
4948
|
r.Weekdays,
|
|
4949
4949
|
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: u[P.Weekdays], style: m == null ? void 0 : m[P.Weekdays] },
|
|
4950
|
-
|
|
4951
|
-
|
|
4950
|
+
N && M.createElement(r.WeekNumberHeader, { "aria-label": Sa(i.options), className: u[P.WeekNumberHeader], style: m == null ? void 0 : m[P.WeekNumberHeader], scope: "col" }, $()),
|
|
4951
|
+
ka.map((q) => M.createElement(r.Weekday, { "aria-label": Rt(q, i.options, i), className: u[P.Weekday], key: String(q), style: m == null ? void 0 : m[P.Weekday], scope: "col" }, z(q, i.options, i)))
|
|
4952
4952
|
),
|
|
4953
4953
|
M.createElement(r.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: u[P.Weeks], style: m == null ? void 0 : m[P.Weeks] }, R.weeks.map((q) => M.createElement(
|
|
4954
4954
|
r.Week,
|
|
4955
4955
|
{ className: u[P.Week], key: q.weekNumber, style: m == null ? void 0 : m[P.Week], week: q },
|
|
4956
|
-
|
|
4956
|
+
N && M.createElement(r.WeekNumber, { week: q, style: m == null ? void 0 : m[P.WeekNumber], "aria-label": Ie(q.weekNumber, {
|
|
4957
4957
|
locale: s
|
|
4958
4958
|
}), className: u[P.WeekNumber], scope: "row", role: "rowheader" }, k(q.weekNumber, i)),
|
|
4959
4959
|
q.days.map((I) => {
|
|
@@ -4962,8 +4962,8 @@ function md(e) {
|
|
|
4962
4962
|
const { from: Wt, to: It } = We;
|
|
4963
4963
|
W[le.range_start] = !!(Wt && It && i.isSameDay(me, Wt)), W[le.range_end] = !!(Wt && It && i.isSameDay(me, It)), W[le.range_middle] = we(We, me, !0, i);
|
|
4964
4964
|
}
|
|
4965
|
-
const
|
|
4966
|
-
return M.createElement(r.Day, { key: `${I.isoDate}_${I.displayMonthId}`, day: I, modifiers: W, className:
|
|
4965
|
+
const Ua = Bl(W, m, t.modifiersStyles), Va = Cl(W, u, t.modifiersClassNames), ja = !Pn && !W.hidden ? at(me, W, i.options, i) : void 0;
|
|
4966
|
+
return M.createElement(r.Day, { key: `${I.isoDate}_${I.displayMonthId}`, day: I, modifiers: W, className: Va.join(" "), style: Ua, role: "gridcell", "aria-selected": W.selected || void 0, "aria-label": ja, "data-day": I.isoDate, "data-month": I.outside ? I.dateMonthId : void 0, "data-selected": W.selected || void 0, "data-disabled": W.disabled || void 0, "data-hidden": W.hidden || void 0, "data-outside": I.outside || void 0, "data-focused": W.focused || void 0, "data-today": W.today || void 0 }, !W.hidden && Pn ? M.createElement(r.DayButton, { className: u[P.DayButton], style: m == null ? void 0 : m[P.DayButton], type: "button", day: I, modifiers: W, disabled: !W.focused && W.disabled || void 0, "aria-disabled": W.focused && W.disabled || void 0, tabIndex: rt(I) ? 0 : -1, "aria-label": ot(me, W, i.options, i), onClick: xa(I, W), onBlur: Aa(I, W), onFocus: Ra(I, W), onKeyDown: _a(I, W), onMouseEnter: Wa(I, W), onMouseLeave: Ia(I, W) }, S(me, i.options, i)) : !W.hidden && S(I.date, i.options, i));
|
|
4967
4967
|
})
|
|
4968
4968
|
)))
|
|
4969
4969
|
)
|
|
@@ -5011,7 +5011,7 @@ function hd({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
|
|
|
5011
5011
|
...t
|
|
5012
5012
|
},
|
|
5013
5013
|
components: {
|
|
5014
|
-
Chevron: ({ orientation: o, ...a }) => /* @__PURE__ */ y(o === "left" ?
|
|
5014
|
+
Chevron: ({ orientation: o, ...a }) => /* @__PURE__ */ y(o === "left" ? Ss : ks, { className: "size-4", ...a })
|
|
5015
5015
|
},
|
|
5016
5016
|
...r
|
|
5017
5017
|
}
|
|
@@ -5019,7 +5019,7 @@ function hd({ className: e, classNames: t, showOutsideDays: n = !0, ...r }) {
|
|
|
5019
5019
|
}
|
|
5020
5020
|
hd.displayName = "Calendar";
|
|
5021
5021
|
// @__NO_SIDE_EFFECTS__
|
|
5022
|
-
function
|
|
5022
|
+
function Zo(e) {
|
|
5023
5023
|
const t = /* @__PURE__ */ pd(e), n = l.forwardRef((r, o) => {
|
|
5024
5024
|
const { children: a, ...i } = r, s = l.Children.toArray(a), u = s.find(yd);
|
|
5025
5025
|
if (u) {
|
|
@@ -5080,8 +5080,8 @@ var wd = [
|
|
|
5080
5080
|
"span",
|
|
5081
5081
|
"svg",
|
|
5082
5082
|
"ul"
|
|
5083
|
-
],
|
|
5084
|
-
const n = /* @__PURE__ */
|
|
5083
|
+
], De = wd.reduce((e, t) => {
|
|
5084
|
+
const n = /* @__PURE__ */ Zo(`Primitive.${t}`), r = l.forwardRef((o, a) => {
|
|
5085
5085
|
const { asChild: i, ...s } = o, u = i ? n : t;
|
|
5086
5086
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ y(u, { ...s, ref: a });
|
|
5087
5087
|
});
|
|
@@ -5090,11 +5090,11 @@ var wd = [
|
|
|
5090
5090
|
function Ed(e, t) {
|
|
5091
5091
|
e && Et.flushSync(() => e.dispatchEvent(t));
|
|
5092
5092
|
}
|
|
5093
|
-
var Od = "DismissableLayer", nn = "dismissableLayer.update", Cd = "dismissableLayer.pointerDownOutside",
|
|
5093
|
+
var Od = "DismissableLayer", nn = "dismissableLayer.update", Cd = "dismissableLayer.pointerDownOutside", Dd = "dismissableLayer.focusOutside", er, Jo = l.createContext({
|
|
5094
5094
|
layers: /* @__PURE__ */ new Set(),
|
|
5095
5095
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
5096
5096
|
branches: /* @__PURE__ */ new Set()
|
|
5097
|
-
}),
|
|
5097
|
+
}), ea = l.forwardRef(
|
|
5098
5098
|
(e, t) => {
|
|
5099
5099
|
const {
|
|
5100
5100
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -5104,7 +5104,7 @@ var Od = "DismissableLayer", nn = "dismissableLayer.update", Cd = "dismissableLa
|
|
|
5104
5104
|
onInteractOutside: i,
|
|
5105
5105
|
onDismiss: s,
|
|
5106
5106
|
...u
|
|
5107
|
-
} = e, c = l.useContext(
|
|
5107
|
+
} = e, c = l.useContext(Jo), [d, f] = l.useState(null), p = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = l.useState({}), D = H(t, (E) => f(E)), h = Array.from(c.layers), [w] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), O = h.indexOf(w), g = d ? h.indexOf(d) : -1, b = c.layersWithOutsidePointerEventsDisabled.size > 0, C = g >= O, N = Pd((E) => {
|
|
5108
5108
|
const S = E.target, x = [...c.branches].some((k) => k.contains(S));
|
|
5109
5109
|
!C || x || (o == null || o(E), i == null || i(E), E.defaultPrevented || s == null || s());
|
|
5110
5110
|
}, p), m = Sd((E) => {
|
|
@@ -5124,10 +5124,10 @@ var Od = "DismissableLayer", nn = "dismissableLayer.update", Cd = "dismissableLa
|
|
|
5124
5124
|
const E = () => v({});
|
|
5125
5125
|
return document.addEventListener(nn, E), () => document.removeEventListener(nn, E);
|
|
5126
5126
|
}, []), /* @__PURE__ */ y(
|
|
5127
|
-
|
|
5127
|
+
De.div,
|
|
5128
5128
|
{
|
|
5129
5129
|
...u,
|
|
5130
|
-
ref:
|
|
5130
|
+
ref: D,
|
|
5131
5131
|
style: {
|
|
5132
5132
|
pointerEvents: b ? C ? "auto" : "none" : void 0,
|
|
5133
5133
|
...e.style
|
|
@@ -5136,24 +5136,24 @@ var Od = "DismissableLayer", nn = "dismissableLayer.update", Cd = "dismissableLa
|
|
|
5136
5136
|
onBlurCapture: F(e.onBlurCapture, m.onBlurCapture),
|
|
5137
5137
|
onPointerDownCapture: F(
|
|
5138
5138
|
e.onPointerDownCapture,
|
|
5139
|
-
|
|
5139
|
+
N.onPointerDownCapture
|
|
5140
5140
|
)
|
|
5141
5141
|
}
|
|
5142
5142
|
);
|
|
5143
5143
|
}
|
|
5144
5144
|
);
|
|
5145
|
-
|
|
5146
|
-
var
|
|
5147
|
-
const n = l.useContext(
|
|
5145
|
+
ea.displayName = Od;
|
|
5146
|
+
var Nd = "DismissableLayerBranch", Md = l.forwardRef((e, t) => {
|
|
5147
|
+
const n = l.useContext(Jo), r = l.useRef(null), o = H(t, r);
|
|
5148
5148
|
return l.useEffect(() => {
|
|
5149
5149
|
const a = r.current;
|
|
5150
5150
|
if (a)
|
|
5151
5151
|
return n.branches.add(a), () => {
|
|
5152
5152
|
n.branches.delete(a);
|
|
5153
5153
|
};
|
|
5154
|
-
}, [n.branches]), /* @__PURE__ */ y(
|
|
5154
|
+
}, [n.branches]), /* @__PURE__ */ y(De.div, { ...e, ref: o });
|
|
5155
5155
|
});
|
|
5156
|
-
Md.displayName =
|
|
5156
|
+
Md.displayName = Nd;
|
|
5157
5157
|
function Pd(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
5158
5158
|
const n = te(e), r = l.useRef(!1), o = l.useRef(() => {
|
|
5159
5159
|
});
|
|
@@ -5161,7 +5161,7 @@ function Pd(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
5161
5161
|
const a = (s) => {
|
|
5162
5162
|
if (s.target && !r.current) {
|
|
5163
5163
|
let u = function() {
|
|
5164
|
-
|
|
5164
|
+
ta(
|
|
5165
5165
|
Cd,
|
|
5166
5166
|
n,
|
|
5167
5167
|
c,
|
|
@@ -5188,7 +5188,7 @@ function Sd(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
5188
5188
|
const n = te(e), r = l.useRef(!1);
|
|
5189
5189
|
return l.useEffect(() => {
|
|
5190
5190
|
const o = (a) => {
|
|
5191
|
-
a.target && !r.current &&
|
|
5191
|
+
a.target && !r.current && ta(Dd, n, { originalEvent: a }, {
|
|
5192
5192
|
discrete: !1
|
|
5193
5193
|
});
|
|
5194
5194
|
};
|
|
@@ -5202,11 +5202,11 @@ function tr() {
|
|
|
5202
5202
|
const e = new CustomEvent(nn);
|
|
5203
5203
|
document.dispatchEvent(e);
|
|
5204
5204
|
}
|
|
5205
|
-
function
|
|
5205
|
+
function ta(e, t, n, { discrete: r }) {
|
|
5206
5206
|
const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
5207
5207
|
t && o.addEventListener(e, t, { once: !0 }), r ? Ed(o, a) : o.dispatchEvent(a);
|
|
5208
5208
|
}
|
|
5209
|
-
var zt = "focusScope.autoFocusOnMount",
|
|
5209
|
+
var zt = "focusScope.autoFocusOnMount", Gt = "focusScope.autoFocusOnUnmount", nr = { bubbles: !1, cancelable: !0 }, Td = "FocusScope", na = l.forwardRef((e, t) => {
|
|
5210
5210
|
const {
|
|
5211
5211
|
loop: n = !1,
|
|
5212
5212
|
trapped: r = !1,
|
|
@@ -5234,8 +5234,8 @@ var zt = "focusScope.autoFocusOnMount", Kt = "focusScope.autoFocusOnUnmount", nr
|
|
|
5234
5234
|
C !== null && (s.contains(C) || Pe(f.current, { select: !0 }));
|
|
5235
5235
|
}, O = function(b) {
|
|
5236
5236
|
if (document.activeElement === document.body)
|
|
5237
|
-
for (const
|
|
5238
|
-
|
|
5237
|
+
for (const N of b)
|
|
5238
|
+
N.removedNodes.length > 0 && Pe(s);
|
|
5239
5239
|
};
|
|
5240
5240
|
document.addEventListener("focusin", h), document.addEventListener("focusout", w);
|
|
5241
5241
|
const g = new MutationObserver(O);
|
|
@@ -5249,17 +5249,17 @@ var zt = "focusScope.autoFocusOnMount", Kt = "focusScope.autoFocusOnUnmount", nr
|
|
|
5249
5249
|
const h = document.activeElement;
|
|
5250
5250
|
if (!s.contains(h)) {
|
|
5251
5251
|
const O = new CustomEvent(zt, nr);
|
|
5252
|
-
s.addEventListener(zt, c), s.dispatchEvent(O), O.defaultPrevented || (kd(Wd(
|
|
5252
|
+
s.addEventListener(zt, c), s.dispatchEvent(O), O.defaultPrevented || (kd(Wd(ra(s)), { select: !0 }), document.activeElement === h && Pe(s));
|
|
5253
5253
|
}
|
|
5254
5254
|
return () => {
|
|
5255
5255
|
s.removeEventListener(zt, c), setTimeout(() => {
|
|
5256
|
-
const O = new CustomEvent(
|
|
5257
|
-
s.addEventListener(
|
|
5256
|
+
const O = new CustomEvent(Gt, nr);
|
|
5257
|
+
s.addEventListener(Gt, d), s.dispatchEvent(O), O.defaultPrevented || Pe(h ?? document.body, { select: !0 }), s.removeEventListener(Gt, d), or.remove(v);
|
|
5258
5258
|
}, 0);
|
|
5259
5259
|
};
|
|
5260
5260
|
}
|
|
5261
5261
|
}, [s, c, d, v]);
|
|
5262
|
-
const
|
|
5262
|
+
const D = l.useCallback(
|
|
5263
5263
|
(h) => {
|
|
5264
5264
|
if (!n && !r || v.paused) return;
|
|
5265
5265
|
const w = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, O = document.activeElement;
|
|
@@ -5270,19 +5270,19 @@ var zt = "focusScope.autoFocusOnMount", Kt = "focusScope.autoFocusOnUnmount", nr
|
|
|
5270
5270
|
},
|
|
5271
5271
|
[n, r, v.paused]
|
|
5272
5272
|
);
|
|
5273
|
-
return /* @__PURE__ */ y(
|
|
5273
|
+
return /* @__PURE__ */ y(De.div, { tabIndex: -1, ...i, ref: p, onKeyDown: D });
|
|
5274
5274
|
});
|
|
5275
|
-
|
|
5275
|
+
na.displayName = Td;
|
|
5276
5276
|
function kd(e, { select: t = !1 } = {}) {
|
|
5277
5277
|
const n = document.activeElement;
|
|
5278
5278
|
for (const r of e)
|
|
5279
5279
|
if (Pe(r, { select: t }), document.activeElement !== n) return;
|
|
5280
5280
|
}
|
|
5281
5281
|
function xd(e) {
|
|
5282
|
-
const t =
|
|
5282
|
+
const t = ra(e), n = rr(t, e), r = rr(t.reverse(), e);
|
|
5283
5283
|
return [n, r];
|
|
5284
5284
|
}
|
|
5285
|
-
function
|
|
5285
|
+
function ra(e) {
|
|
5286
5286
|
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
5287
5287
|
acceptNode: (r) => {
|
|
5288
5288
|
const o = r.tagName === "INPUT" && r.type === "hidden";
|
|
@@ -5335,10 +5335,10 @@ function ar(e, t) {
|
|
|
5335
5335
|
function Wd(e) {
|
|
5336
5336
|
return e.filter((t) => t.tagName !== "A");
|
|
5337
5337
|
}
|
|
5338
|
-
var Id = "Arrow",
|
|
5338
|
+
var Id = "Arrow", oa = l.forwardRef((e, t) => {
|
|
5339
5339
|
const { children: n, width: r = 10, height: o = 5, ...a } = e;
|
|
5340
5340
|
return /* @__PURE__ */ y(
|
|
5341
|
-
|
|
5341
|
+
De.svg,
|
|
5342
5342
|
{
|
|
5343
5343
|
...a,
|
|
5344
5344
|
ref: t,
|
|
@@ -5350,23 +5350,23 @@ var Id = "Arrow", aa = l.forwardRef((e, t) => {
|
|
|
5350
5350
|
}
|
|
5351
5351
|
);
|
|
5352
5352
|
});
|
|
5353
|
-
|
|
5354
|
-
var Fd =
|
|
5353
|
+
oa.displayName = Id;
|
|
5354
|
+
var Fd = oa, Cn = "Popper", [aa, sa] = He(Cn), [$d, ia] = aa(Cn), ca = (e) => {
|
|
5355
5355
|
const { __scopePopper: t, children: n } = e, [r, o] = l.useState(null);
|
|
5356
5356
|
return /* @__PURE__ */ y($d, { scope: t, anchor: r, onAnchorChange: o, children: n });
|
|
5357
5357
|
};
|
|
5358
|
-
|
|
5359
|
-
var
|
|
5358
|
+
ca.displayName = Cn;
|
|
5359
|
+
var ua = "PopperAnchor", la = l.forwardRef(
|
|
5360
5360
|
(e, t) => {
|
|
5361
|
-
const { __scopePopper: n, virtualRef: r, ...o } = e, a =
|
|
5361
|
+
const { __scopePopper: n, virtualRef: r, ...o } = e, a = ia(ua, n), i = l.useRef(null), s = H(t, i), u = l.useRef(null);
|
|
5362
5362
|
return l.useEffect(() => {
|
|
5363
5363
|
const c = u.current;
|
|
5364
5364
|
u.current = (r == null ? void 0 : r.current) || i.current, c !== u.current && a.onAnchorChange(u.current);
|
|
5365
|
-
}), r ? null : /* @__PURE__ */ y(
|
|
5365
|
+
}), r ? null : /* @__PURE__ */ y(De.div, { ...o, ref: s });
|
|
5366
5366
|
}
|
|
5367
5367
|
);
|
|
5368
|
-
|
|
5369
|
-
var
|
|
5368
|
+
la.displayName = ua;
|
|
5369
|
+
var Dn = "PopperContent", [Yd, Bd] = aa(Dn), da = l.forwardRef(
|
|
5370
5370
|
(e, t) => {
|
|
5371
5371
|
var ke, rt, Ve, xe, ot, at;
|
|
5372
5372
|
const {
|
|
@@ -5382,44 +5382,44 @@ var Nn = "PopperContent", [Yd, Bd] = sa(Nn), fa = l.forwardRef(
|
|
|
5382
5382
|
sticky: f = "partial",
|
|
5383
5383
|
hideWhenDetached: p = !1,
|
|
5384
5384
|
updatePositionStrategy: v = "optimized",
|
|
5385
|
-
onPlaced:
|
|
5385
|
+
onPlaced: D,
|
|
5386
5386
|
...h
|
|
5387
|
-
} = e, w =
|
|
5387
|
+
} = e, w = ia(Dn, n), [O, g] = l.useState(null), b = H(t, (Re) => g(Re)), [C, N] = l.useState(null), m = sr(C), E = (m == null ? void 0 : m.width) ?? 0, S = (m == null ? void 0 : m.height) ?? 0, x = r + (a !== "center" ? "-" + a : ""), k = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, $ = Array.isArray(c) ? c : [c], z = $.length > 0, U = {
|
|
5388
5388
|
padding: k,
|
|
5389
5389
|
boundary: $.filter(Hd),
|
|
5390
5390
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
5391
5391
|
altBoundary: z
|
|
5392
|
-
}, { refs: T, floatingStyles: j, placement: X, isPositioned: ne, middlewareData: Q } =
|
|
5392
|
+
}, { refs: T, floatingStyles: j, placement: X, isPositioned: ne, middlewareData: Q } = Za({
|
|
5393
5393
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
5394
5394
|
strategy: "fixed",
|
|
5395
5395
|
placement: x,
|
|
5396
|
-
whileElementsMounted: (...Re) =>
|
|
5396
|
+
whileElementsMounted: (...Re) => ss(...Re, {
|
|
5397
5397
|
animationFrame: v === "always"
|
|
5398
5398
|
}),
|
|
5399
5399
|
elements: {
|
|
5400
5400
|
reference: w.anchor
|
|
5401
5401
|
},
|
|
5402
5402
|
middleware: [
|
|
5403
|
-
|
|
5404
|
-
u &&
|
|
5403
|
+
Ja({ mainAxis: o + S, alignmentAxis: i }),
|
|
5404
|
+
u && es({
|
|
5405
5405
|
mainAxis: !0,
|
|
5406
5406
|
crossAxis: !1,
|
|
5407
|
-
limiter: f === "partial" ?
|
|
5407
|
+
limiter: f === "partial" ? ts() : void 0,
|
|
5408
5408
|
...U
|
|
5409
5409
|
}),
|
|
5410
|
-
u &&
|
|
5411
|
-
|
|
5410
|
+
u && ns({ ...U }),
|
|
5411
|
+
rs({
|
|
5412
5412
|
...U,
|
|
5413
5413
|
apply: ({ elements: Re, rects: st, availableWidth: it, availableHeight: kt }) => {
|
|
5414
5414
|
const { width: xt, height: Rt } = st.reference, Ie = Re.floating.style;
|
|
5415
5415
|
Ie.setProperty("--radix-popper-available-width", `${it}px`), Ie.setProperty("--radix-popper-available-height", `${kt}px`), Ie.setProperty("--radix-popper-anchor-width", `${xt}px`), Ie.setProperty("--radix-popper-anchor-height", `${Rt}px`);
|
|
5416
5416
|
}
|
|
5417
5417
|
}),
|
|
5418
|
-
C &&
|
|
5418
|
+
C && os({ element: C, padding: s }),
|
|
5419
5419
|
Ud({ arrowWidth: E, arrowHeight: S }),
|
|
5420
|
-
p &&
|
|
5420
|
+
p && as({ strategy: "referenceHidden", ...U })
|
|
5421
5421
|
]
|
|
5422
|
-
}), [
|
|
5422
|
+
}), [K, ee] = ha(X), Z = te(D);
|
|
5423
5423
|
re(() => {
|
|
5424
5424
|
ne && (Z == null || Z());
|
|
5425
5425
|
}, [ne, Z]);
|
|
@@ -5454,15 +5454,15 @@ var Nn = "PopperContent", [Yd, Bd] = sa(Nn), fa = l.forwardRef(
|
|
|
5454
5454
|
Yd,
|
|
5455
5455
|
{
|
|
5456
5456
|
scope: n,
|
|
5457
|
-
placedSide:
|
|
5458
|
-
onArrowChange:
|
|
5457
|
+
placedSide: K,
|
|
5458
|
+
onArrowChange: N,
|
|
5459
5459
|
arrowX: ge,
|
|
5460
5460
|
arrowY: se,
|
|
5461
5461
|
shouldHideArrow: fe,
|
|
5462
5462
|
children: /* @__PURE__ */ y(
|
|
5463
|
-
|
|
5463
|
+
De.div,
|
|
5464
5464
|
{
|
|
5465
|
-
"data-side":
|
|
5465
|
+
"data-side": K,
|
|
5466
5466
|
"data-align": ee,
|
|
5467
5467
|
...h,
|
|
5468
5468
|
ref: b,
|
|
@@ -5480,14 +5480,14 @@ var Nn = "PopperContent", [Yd, Bd] = sa(Nn), fa = l.forwardRef(
|
|
|
5480
5480
|
);
|
|
5481
5481
|
}
|
|
5482
5482
|
);
|
|
5483
|
-
|
|
5484
|
-
var
|
|
5483
|
+
da.displayName = Dn;
|
|
5484
|
+
var fa = "PopperArrow", Ld = {
|
|
5485
5485
|
top: "bottom",
|
|
5486
5486
|
right: "left",
|
|
5487
5487
|
bottom: "top",
|
|
5488
5488
|
left: "right"
|
|
5489
|
-
},
|
|
5490
|
-
const { __scopePopper: r, ...o } = t, a = Bd(
|
|
5489
|
+
}, ma = l.forwardRef(function(t, n) {
|
|
5490
|
+
const { __scopePopper: r, ...o } = t, a = Bd(fa, r), i = Ld[a.placedSide];
|
|
5491
5491
|
return (
|
|
5492
5492
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
5493
5493
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -5531,7 +5531,7 @@ var ma = "PopperArrow", Ld = {
|
|
|
5531
5531
|
)
|
|
5532
5532
|
);
|
|
5533
5533
|
});
|
|
5534
|
-
|
|
5534
|
+
ma.displayName = fa;
|
|
5535
5535
|
function Hd(e) {
|
|
5536
5536
|
return e !== null;
|
|
5537
5537
|
}
|
|
@@ -5540,33 +5540,33 @@ var Ud = (e) => ({
|
|
|
5540
5540
|
options: e,
|
|
5541
5541
|
fn(t) {
|
|
5542
5542
|
var w, O, g;
|
|
5543
|
-
const { placement: n, rects: r, middlewareData: o } = t, i = ((w = o.arrow) == null ? void 0 : w.centerOffset) !== 0, s = i ? 0 : e.arrowWidth, u = i ? 0 : e.arrowHeight, [c, d] =
|
|
5544
|
-
let
|
|
5545
|
-
return c === "bottom" ? (
|
|
5543
|
+
const { placement: n, rects: r, middlewareData: o } = t, i = ((w = o.arrow) == null ? void 0 : w.centerOffset) !== 0, s = i ? 0 : e.arrowWidth, u = i ? 0 : e.arrowHeight, [c, d] = ha(n), f = { start: "0%", center: "50%", end: "100%" }[d], p = (((O = o.arrow) == null ? void 0 : O.x) ?? 0) + s / 2, v = (((g = o.arrow) == null ? void 0 : g.y) ?? 0) + u / 2;
|
|
5544
|
+
let D = "", h = "";
|
|
5545
|
+
return c === "bottom" ? (D = i ? f : `${p}px`, h = `${-u}px`) : c === "top" ? (D = i ? f : `${p}px`, h = `${r.floating.height + u}px`) : c === "right" ? (D = `${-u}px`, h = i ? f : `${v}px`) : c === "left" && (D = `${r.floating.width + u}px`, h = i ? f : `${v}px`), { data: { x: D, y: h } };
|
|
5546
5546
|
}
|
|
5547
5547
|
});
|
|
5548
|
-
function
|
|
5548
|
+
function ha(e) {
|
|
5549
5549
|
const [t, n = "center"] = e.split("-");
|
|
5550
5550
|
return [t, n];
|
|
5551
5551
|
}
|
|
5552
|
-
var Vd =
|
|
5552
|
+
var Vd = ca, pa = la, jd = da, qd = ma, zd = "Portal", va = l.forwardRef((e, t) => {
|
|
5553
5553
|
var s;
|
|
5554
5554
|
const { container: n, ...r } = e, [o, a] = l.useState(!1);
|
|
5555
5555
|
re(() => a(!0), []);
|
|
5556
5556
|
const i = n || o && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
|
|
5557
|
-
return i ? on.createPortal(/* @__PURE__ */ y(
|
|
5557
|
+
return i ? on.createPortal(/* @__PURE__ */ y(De.div, { ...r, ref: t }), i) : null;
|
|
5558
5558
|
});
|
|
5559
|
-
|
|
5560
|
-
function
|
|
5559
|
+
va.displayName = zd;
|
|
5560
|
+
function Gd(e, t) {
|
|
5561
5561
|
return l.useReducer((n, r) => t[n][r] ?? n, e);
|
|
5562
5562
|
}
|
|
5563
|
-
var
|
|
5564
|
-
const { present: t, children: n } = e, r =
|
|
5563
|
+
var Nn = (e) => {
|
|
5564
|
+
const { present: t, children: n } = e, r = Kd(t), o = typeof n == "function" ? n({ present: r.isPresent }) : l.Children.only(n), a = H(r.ref, Xd(o));
|
|
5565
5565
|
return typeof n == "function" || r.isPresent ? l.cloneElement(o, { ref: a }) : null;
|
|
5566
5566
|
};
|
|
5567
|
-
|
|
5568
|
-
function
|
|
5569
|
-
const [t, n] = l.useState(), r = l.useRef(null), o = l.useRef(e), a = l.useRef("none"), i = e ? "mounted" : "unmounted", [s, u] =
|
|
5567
|
+
Nn.displayName = "Presence";
|
|
5568
|
+
function Kd(e) {
|
|
5569
|
+
const [t, n] = l.useState(), r = l.useRef(null), o = l.useRef(e), a = l.useRef("none"), i = e ? "mounted" : "unmounted", [s, u] = Gd(i, {
|
|
5570
5570
|
mounted: {
|
|
5571
5571
|
UNMOUNT: "unmounted",
|
|
5572
5572
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -5622,9 +5622,9 @@ function Xd(e) {
|
|
|
5622
5622
|
let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
5623
5623
|
return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
5624
5624
|
}
|
|
5625
|
-
var Tt = "Popover", [
|
|
5626
|
-
|
|
5627
|
-
]), tt =
|
|
5625
|
+
var Tt = "Popover", [ya] = He(Tt, [
|
|
5626
|
+
sa
|
|
5627
|
+
]), tt = sa(), [Qd, Te] = ya(Tt), ga = (e) => {
|
|
5628
5628
|
const {
|
|
5629
5629
|
__scopePopover: t,
|
|
5630
5630
|
children: n,
|
|
@@ -5655,48 +5655,48 @@ var Tt = "Popover", [ga] = He(Tt, [
|
|
|
5655
5655
|
}
|
|
5656
5656
|
) });
|
|
5657
5657
|
};
|
|
5658
|
-
|
|
5659
|
-
var
|
|
5658
|
+
ga.displayName = Tt;
|
|
5659
|
+
var ba = "PopoverAnchor", Zd = l.forwardRef(
|
|
5660
5660
|
(e, t) => {
|
|
5661
|
-
const { __scopePopover: n, ...r } = e, o = Te(
|
|
5662
|
-
return l.useEffect(() => (i(), () => s()), [i, s]), /* @__PURE__ */ y(
|
|
5661
|
+
const { __scopePopover: n, ...r } = e, o = Te(ba, n), a = tt(n), { onCustomAnchorAdd: i, onCustomAnchorRemove: s } = o;
|
|
5662
|
+
return l.useEffect(() => (i(), () => s()), [i, s]), /* @__PURE__ */ y(pa, { ...a, ...r, ref: t });
|
|
5663
5663
|
}
|
|
5664
5664
|
);
|
|
5665
|
-
Zd.displayName =
|
|
5666
|
-
var
|
|
5665
|
+
Zd.displayName = ba;
|
|
5666
|
+
var wa = "PopoverTrigger", Ea = l.forwardRef(
|
|
5667
5667
|
(e, t) => {
|
|
5668
|
-
const { __scopePopover: n, ...r } = e, o = Te(
|
|
5669
|
-
|
|
5668
|
+
const { __scopePopover: n, ...r } = e, o = Te(wa, n), a = tt(n), i = H(t, o.triggerRef), s = /* @__PURE__ */ y(
|
|
5669
|
+
De.button,
|
|
5670
5670
|
{
|
|
5671
5671
|
type: "button",
|
|
5672
5672
|
"aria-haspopup": "dialog",
|
|
5673
5673
|
"aria-expanded": o.open,
|
|
5674
5674
|
"aria-controls": o.contentId,
|
|
5675
|
-
"data-state":
|
|
5675
|
+
"data-state": Ma(o.open),
|
|
5676
5676
|
...r,
|
|
5677
5677
|
ref: i,
|
|
5678
5678
|
onClick: F(e.onClick, o.onOpenToggle)
|
|
5679
5679
|
}
|
|
5680
5680
|
);
|
|
5681
|
-
return o.hasCustomAnchor ? s : /* @__PURE__ */ y(
|
|
5681
|
+
return o.hasCustomAnchor ? s : /* @__PURE__ */ y(pa, { asChild: !0, ...a, children: s });
|
|
5682
5682
|
}
|
|
5683
5683
|
);
|
|
5684
|
-
|
|
5685
|
-
var Mn = "PopoverPortal", [Jd, ef] =
|
|
5684
|
+
Ea.displayName = wa;
|
|
5685
|
+
var Mn = "PopoverPortal", [Jd, ef] = ya(Mn, {
|
|
5686
5686
|
forceMount: void 0
|
|
5687
|
-
}),
|
|
5687
|
+
}), Oa = (e) => {
|
|
5688
5688
|
const { __scopePopover: t, forceMount: n, children: r, container: o } = e, a = Te(Mn, t);
|
|
5689
|
-
return /* @__PURE__ */ y(Jd, { scope: t, forceMount: n, children: /* @__PURE__ */ y(
|
|
5689
|
+
return /* @__PURE__ */ y(Jd, { scope: t, forceMount: n, children: /* @__PURE__ */ y(Nn, { present: n || a.open, children: /* @__PURE__ */ y(va, { asChild: !0, container: o, children: r }) }) });
|
|
5690
5690
|
};
|
|
5691
|
-
|
|
5692
|
-
var Le = "PopoverContent",
|
|
5691
|
+
Oa.displayName = Mn;
|
|
5692
|
+
var Le = "PopoverContent", Ca = l.forwardRef(
|
|
5693
5693
|
(e, t) => {
|
|
5694
5694
|
const n = ef(Le, e.__scopePopover), { forceMount: r = n.forceMount, ...o } = e, a = Te(Le, e.__scopePopover);
|
|
5695
|
-
return /* @__PURE__ */ y(
|
|
5695
|
+
return /* @__PURE__ */ y(Nn, { present: r || a.open, children: a.modal ? /* @__PURE__ */ y(nf, { ...o, ref: t }) : /* @__PURE__ */ y(rf, { ...o, ref: t }) });
|
|
5696
5696
|
}
|
|
5697
5697
|
);
|
|
5698
|
-
|
|
5699
|
-
var tf = /* @__PURE__ */
|
|
5698
|
+
Ca.displayName = Le;
|
|
5699
|
+
var tf = /* @__PURE__ */ Zo("PopoverContent.RemoveScroll"), nf = l.forwardRef(
|
|
5700
5700
|
(e, t) => {
|
|
5701
5701
|
const n = Te(Le, e.__scopePopover), r = l.useRef(null), o = H(t, r), a = l.useRef(!1);
|
|
5702
5702
|
return l.useEffect(() => {
|
|
@@ -5767,7 +5767,7 @@ var tf = /* @__PURE__ */ Jo("PopoverContent.RemoveScroll"), nf = l.forwardRef(
|
|
|
5767
5767
|
...f
|
|
5768
5768
|
} = e, p = Te(Le, n), v = tt(n);
|
|
5769
5769
|
return ur(), /* @__PURE__ */ y(
|
|
5770
|
-
|
|
5770
|
+
na,
|
|
5771
5771
|
{
|
|
5772
5772
|
asChild: !0,
|
|
5773
5773
|
loop: !0,
|
|
@@ -5775,7 +5775,7 @@ var tf = /* @__PURE__ */ Jo("PopoverContent.RemoveScroll"), nf = l.forwardRef(
|
|
|
5775
5775
|
onMountAutoFocus: o,
|
|
5776
5776
|
onUnmountAutoFocus: a,
|
|
5777
5777
|
children: /* @__PURE__ */ y(
|
|
5778
|
-
|
|
5778
|
+
ea,
|
|
5779
5779
|
{
|
|
5780
5780
|
asChild: !0,
|
|
5781
5781
|
disableOutsidePointerEvents: i,
|
|
@@ -5787,7 +5787,7 @@ var tf = /* @__PURE__ */ Jo("PopoverContent.RemoveScroll"), nf = l.forwardRef(
|
|
|
5787
5787
|
children: /* @__PURE__ */ y(
|
|
5788
5788
|
jd,
|
|
5789
5789
|
{
|
|
5790
|
-
"data-state":
|
|
5790
|
+
"data-state": Ma(p.open),
|
|
5791
5791
|
role: "dialog",
|
|
5792
5792
|
id: p.contentId,
|
|
5793
5793
|
...v,
|
|
@@ -5808,11 +5808,11 @@ var tf = /* @__PURE__ */ Jo("PopoverContent.RemoveScroll"), nf = l.forwardRef(
|
|
|
5808
5808
|
}
|
|
5809
5809
|
);
|
|
5810
5810
|
}
|
|
5811
|
-
),
|
|
5811
|
+
), Na = "PopoverClose", of = l.forwardRef(
|
|
5812
5812
|
(e, t) => {
|
|
5813
|
-
const { __scopePopover: n, ...r } = e, o = Te(
|
|
5813
|
+
const { __scopePopover: n, ...r } = e, o = Te(Na, n);
|
|
5814
5814
|
return /* @__PURE__ */ y(
|
|
5815
|
-
|
|
5815
|
+
De.button,
|
|
5816
5816
|
{
|
|
5817
5817
|
type: "button",
|
|
5818
5818
|
...r,
|
|
@@ -5822,7 +5822,7 @@ var tf = /* @__PURE__ */ Jo("PopoverContent.RemoveScroll"), nf = l.forwardRef(
|
|
|
5822
5822
|
);
|
|
5823
5823
|
}
|
|
5824
5824
|
);
|
|
5825
|
-
of.displayName =
|
|
5825
|
+
of.displayName = Na;
|
|
5826
5826
|
var af = "PopoverArrow", sf = l.forwardRef(
|
|
5827
5827
|
(e, t) => {
|
|
5828
5828
|
const { __scopePopover: n, ...r } = e, o = tt(n);
|
|
@@ -5830,13 +5830,13 @@ var af = "PopoverArrow", sf = l.forwardRef(
|
|
|
5830
5830
|
}
|
|
5831
5831
|
);
|
|
5832
5832
|
sf.displayName = af;
|
|
5833
|
-
function
|
|
5833
|
+
function Ma(e) {
|
|
5834
5834
|
return e ? "open" : "closed";
|
|
5835
5835
|
}
|
|
5836
|
-
var cf =
|
|
5837
|
-
const
|
|
5836
|
+
var cf = ga, uf = Ea, lf = Oa, Pa = Ca;
|
|
5837
|
+
const Df = cf, Nf = uf, df = l.forwardRef(
|
|
5838
5838
|
({ className: e, align: t = "center", sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ y(lf, { children: /* @__PURE__ */ y(
|
|
5839
|
-
|
|
5839
|
+
Pa,
|
|
5840
5840
|
{
|
|
5841
5841
|
ref: o,
|
|
5842
5842
|
align: t,
|
|
@@ -5849,41 +5849,49 @@ const Nf = cf, Df = uf, df = l.forwardRef(
|
|
|
5849
5849
|
}
|
|
5850
5850
|
) })
|
|
5851
5851
|
);
|
|
5852
|
-
df.displayName =
|
|
5852
|
+
df.displayName = Pa.displayName;
|
|
5853
5853
|
export {
|
|
5854
|
-
|
|
5855
|
-
|
|
5854
|
+
ls as A,
|
|
5855
|
+
ks as B,
|
|
5856
5856
|
hd as C,
|
|
5857
|
-
|
|
5857
|
+
bo as D,
|
|
5858
|
+
Ht as E,
|
|
5859
|
+
je as F,
|
|
5860
|
+
qe as G,
|
|
5861
|
+
au as H,
|
|
5862
|
+
As as I,
|
|
5863
|
+
Ge as J,
|
|
5858
5864
|
xi as L,
|
|
5859
|
-
|
|
5865
|
+
vo as O,
|
|
5866
|
+
Df as P,
|
|
5867
|
+
fc as R,
|
|
5860
5868
|
Ef as S,
|
|
5861
|
-
|
|
5869
|
+
Ei as T,
|
|
5862
5870
|
gr as X,
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5871
|
+
fs as a,
|
|
5872
|
+
ds as b,
|
|
5873
|
+
Rs as c,
|
|
5866
5874
|
df as d,
|
|
5867
|
-
|
|
5875
|
+
Nf as e,
|
|
5868
5876
|
Cf as f,
|
|
5869
5877
|
yc as g,
|
|
5870
5878
|
Ec as h,
|
|
5871
5879
|
bc as i,
|
|
5872
5880
|
gc as j,
|
|
5873
|
-
|
|
5881
|
+
Eo as k,
|
|
5874
5882
|
pc as l,
|
|
5875
5883
|
wc as m,
|
|
5876
5884
|
Of as n,
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5885
|
+
Oi as o,
|
|
5886
|
+
Ci as p,
|
|
5887
|
+
Ni as q,
|
|
5880
5888
|
bf as r,
|
|
5881
5889
|
Di as s,
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
|
|
5890
|
+
bi as t,
|
|
5891
|
+
hc as u,
|
|
5892
|
+
yo as v,
|
|
5893
|
+
wo as w,
|
|
5894
|
+
go as x,
|
|
5895
|
+
mc as y,
|
|
5896
|
+
Ss as z
|
|
5889
5897
|
};
|